@hanzo/team 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/dist/404.html +2 -2
  2. package/dist/admin/index.html +2 -2
  3. package/dist/agents/algo/index.html +2 -2
  4. package/dist/agents/art/index.html +2 -2
  5. package/dist/agents/biz/index.html +2 -2
  6. package/dist/agents/cal/index.html +2 -2
  7. package/dist/agents/core/index.html +2 -2
  8. package/dist/agents/cyber/index.html +2 -2
  9. package/dist/agents/data/index.html +2 -2
  10. package/dist/agents/db/index.html +2 -2
  11. package/dist/agents/des/index.html +2 -2
  12. package/dist/agents/dev/index.html +2 -2
  13. package/dist/agents/doc/index.html +2 -2
  14. package/dist/agents/ed/index.html +2 -2
  15. package/dist/agents/fin/index.html +2 -2
  16. package/dist/agents/gov/index.html +2 -2
  17. package/dist/agents/huma/index.html +2 -2
  18. package/dist/agents/index.html +2 -2
  19. package/dist/agents/lang/index.html +2 -2
  20. package/dist/agents/law/index.html +2 -2
  21. package/dist/agents/mana/index.html +2 -2
  22. package/dist/agents/mark/index.html +2 -2
  23. package/dist/agents/mo/index.html +2 -2
  24. package/dist/agents/mu/index.html +2 -2
  25. package/dist/agents/opera/index.html +2 -2
  26. package/dist/agents/rev/index.html +2 -2
  27. package/dist/agents/sal/index.html +2 -2
  28. package/dist/agents/sci/index.html +2 -2
  29. package/dist/agents/sec/index.html +2 -2
  30. package/dist/agents/su/index.html +2 -2
  31. package/dist/agents/vi/index.html +2 -2
  32. package/dist/apps/ads/index.html +2 -2
  33. package/dist/apps/ai-chat/index.html +2 -2
  34. package/dist/apps/analytics/index.html +2 -2
  35. package/dist/apps/billing/index.html +2 -2
  36. package/dist/apps/bots/index.html +2 -2
  37. package/dist/apps/cal/index.html +2 -2
  38. package/dist/apps/chat/index.html +2 -2
  39. package/dist/apps/cms/index.html +2 -2
  40. package/dist/apps/commerce/index.html +2 -2
  41. package/dist/apps/console/index.html +2 -2
  42. package/dist/apps/crm/index.html +2 -2
  43. package/dist/apps/dataroom/index.html +2 -2
  44. package/dist/apps/dev/index.html +2 -2
  45. package/dist/apps/email/index.html +2 -2
  46. package/dist/apps/index.html +2 -2
  47. package/dist/apps/meet/index.html +2 -2
  48. package/dist/apps/platform/index.html +2 -2
  49. package/dist/apps/sign/index.html +2 -2
  50. package/dist/apps/social/index.html +2 -2
  51. package/dist/apps/tracker/index.html +2 -2
  52. package/dist/assets/{Bots-CPIU0Xgd.js → Bots-ide2SG3J.js} +86 -86
  53. package/dist/assets/Bots-ide2SG3J.js.map +1 -0
  54. package/dist/assets/ModelPickerMenu-DzpTQicd.js +2 -0
  55. package/dist/assets/{ModelPickerMenu-Dx9FATCv.js.map → ModelPickerMenu-DzpTQicd.js.map} +1 -1
  56. package/dist/assets/{ThemeToggleNext-Cb-dedIF.js → ThemeToggleNext-D2dISWgu.js} +2 -2
  57. package/dist/assets/{ThemeToggleNext-Cb-dedIF.js.map → ThemeToggleNext-D2dISWgu.js.map} +1 -1
  58. package/dist/assets/index-CWfH_-pI.js +194 -0
  59. package/dist/assets/{index-BSvxo5-z.js.map → index-CWfH_-pI.js.map} +1 -1
  60. package/dist/assets/index-CngqRawd.css +1 -0
  61. package/dist/assets/integrations-DW-vmr60.js.map +1 -1
  62. package/dist/auth/callback/index.html +2 -2
  63. package/dist/auth/index.html +2 -2
  64. package/dist/bots/index.html +2 -2
  65. package/dist/cal/index.html +2 -2
  66. package/dist/calendar/index.html +2 -2
  67. package/dist/chat/c-design/index.html +2 -2
  68. package/dist/chat/c-general/index.html +2 -2
  69. package/dist/chat/c-lux-bank/index.html +2 -2
  70. package/dist/chat/c-lux-bridge/index.html +2 -2
  71. package/dist/chat/c-revenue/index.html +2 -2
  72. package/dist/chat/c-support/index.html +2 -2
  73. package/dist/chat/c-tracker/index.html +2 -2
  74. package/dist/chat/c-ui/index.html +2 -2
  75. package/dist/chat/c-video/index.html +2 -2
  76. package/dist/chat/dm-algo/index.html +2 -2
  77. package/dist/chat/dm-art/index.html +2 -2
  78. package/dist/chat/dm-biz/index.html +2 -2
  79. package/dist/chat/dm-cal/index.html +2 -2
  80. package/dist/chat/dm-core/index.html +2 -2
  81. package/dist/chat/dm-cyber/index.html +2 -2
  82. package/dist/chat/dm-data/index.html +2 -2
  83. package/dist/chat/dm-db/index.html +2 -2
  84. package/dist/chat/dm-des/index.html +2 -2
  85. package/dist/chat/dm-dev/index.html +2 -2
  86. package/dist/chat/dm-doc/index.html +2 -2
  87. package/dist/chat/dm-ed/index.html +2 -2
  88. package/dist/chat/dm-fin/index.html +2 -2
  89. package/dist/chat/dm-gov/index.html +2 -2
  90. package/dist/chat/dm-huma/index.html +2 -2
  91. package/dist/chat/dm-lang/index.html +2 -2
  92. package/dist/chat/dm-law/index.html +2 -2
  93. package/dist/chat/dm-mana/index.html +2 -2
  94. package/dist/chat/dm-mark/index.html +2 -2
  95. package/dist/chat/dm-mo/index.html +2 -2
  96. package/dist/chat/dm-mu/index.html +2 -2
  97. package/dist/chat/dm-opera/index.html +2 -2
  98. package/dist/chat/dm-rev/index.html +2 -2
  99. package/dist/chat/dm-sal/index.html +2 -2
  100. package/dist/chat/dm-sci/index.html +2 -2
  101. package/dist/chat/dm-sec/index.html +2 -2
  102. package/dist/chat/dm-su/index.html +2 -2
  103. package/dist/chat/dm-vi/index.html +2 -2
  104. package/dist/chat/index.html +2 -2
  105. package/dist/crm/analytics/index.html +2 -2
  106. package/dist/crm/automations/index.html +2 -2
  107. package/dist/crm/campaigns/index.html +2 -2
  108. package/dist/crm/companies/index.html +2 -2
  109. package/dist/crm/contacts/index.html +2 -2
  110. package/dist/crm/customers/index.html +2 -2
  111. package/dist/crm/deliverability/index.html +2 -2
  112. package/dist/crm/forms/index.html +2 -2
  113. package/dist/crm/funds/index.html +2 -2
  114. package/dist/crm/index.html +2 -2
  115. package/dist/crm/investors/index.html +2 -2
  116. package/dist/crm/journeys/index.html +2 -2
  117. package/dist/crm/leads/index.html +2 -2
  118. package/dist/crm/lists/index.html +2 -2
  119. package/dist/crm/opportunities/index.html +2 -2
  120. package/dist/crm/segments/index.html +2 -2
  121. package/dist/crm/settings/index.html +2 -2
  122. package/dist/crm/templates/index.html +2 -2
  123. package/dist/crm/webhooks/index.html +2 -2
  124. package/dist/docs/index.html +2 -2
  125. package/dist/files/index.html +2 -2
  126. package/dist/inbox/index.html +2 -2
  127. package/dist/index.html +2 -2
  128. package/dist/issues/index.html +2 -2
  129. package/dist/issues/kanban/index.html +2 -2
  130. package/dist/issues/list/index.html +2 -2
  131. package/dist/login/index.html +2 -2
  132. package/dist/mail/index.html +2 -2
  133. package/dist/meet/index.html +2 -2
  134. package/dist/mine/index.html +2 -2
  135. package/dist/people/index.html +2 -2
  136. package/dist/personas/abai_qunanbaiuly.svg +3 -3
  137. package/dist/personas/ada.svg +3 -3
  138. package/dist/personas/adonis.svg +3 -3
  139. package/dist/personas/aime_cesaire.svg +3 -3
  140. package/dist/personas/al_biruni.svg +3 -3
  141. package/dist/personas/al_farabi.svg +3 -3
  142. package/dist/personas/al_khwarizmi.svg +3 -3
  143. package/dist/personas/al_kindi.svg +3 -3
  144. package/dist/personas/alan_watts.svg +3 -3
  145. package/dist/personas/alexandra_david_neel.svg +3 -3
  146. package/dist/personas/alisher_navoi.svg +3 -3
  147. package/dist/personas/amir_khusrau.svg +3 -3
  148. package/dist/personas/angelou.svg +3 -3
  149. package/dist/personas/anne_sexton.svg +3 -3
  150. package/dist/personas/aquinas.svg +3 -3
  151. package/dist/personas/aryabhata.svg +3 -3
  152. package/dist/personas/attar.svg +3 -3
  153. package/dist/personas/augustine.svg +3 -3
  154. package/dist/personas/averroes.svg +3 -3
  155. package/dist/personas/avicenna.svg +3 -3
  156. package/dist/personas/baal_shem_tov.svg +3 -3
  157. package/dist/personas/baha_ullah.svg +3 -3
  158. package/dist/personas/basho.svg +3 -3
  159. package/dist/personas/basil_great.svg +3 -3
  160. package/dist/personas/bernard_clairvaux.svg +3 -3
  161. package/dist/personas/bhaskara_ii.svg +3 -3
  162. package/dist/personas/brahmagupta.svg +3 -3
  163. package/dist/personas/cao_xueqin.svg +3 -3
  164. package/dist/personas/cesare_beccaria.svg +3 -3
  165. package/dist/personas/chikamatsu_monzaemon.svg +3 -3
  166. package/dist/personas/christiaan_huygens.svg +3 -3
  167. package/dist/personas/cicero.svg +3 -3
  168. package/dist/personas/clarice_lispector.svg +3 -3
  169. package/dist/personas/claudio_monteverdi.svg +3 -3
  170. package/dist/personas/clement_alexandria.svg +3 -3
  171. package/dist/personas/coltrane.svg +3 -3
  172. package/dist/personas/constance_garnett.svg +3 -3
  173. package/dist/personas/creative.svg +3 -3
  174. package/dist/personas/cv_raman.svg +3 -3
  175. package/dist/personas/cynthia_dwork.svg +3 -3
  176. package/dist/personas/dali.svg +3 -3
  177. package/dist/personas/david_bowie.svg +3 -3
  178. package/dist/personas/david_chaum.svg +3 -3
  179. package/dist/personas/davis.svg +3 -3
  180. package/dist/personas/desmond_tutu.svg +3 -3
  181. package/dist/personas/dogen.svg +3 -3
  182. package/dist/personas/donald_knuth.svg +3 -3
  183. package/dist/personas/du_fu.svg +3 -3
  184. package/dist/personas/edgar_codd.svg +3 -3
  185. package/dist/personas/eileen_chang.svg +3 -3
  186. package/dist/personas/emilie_du_chatelet.svg +3 -3
  187. package/dist/personas/emmeline_pankhurst.svg +3 -3
  188. package/dist/personas/forugh_farrokhzad.svg +3 -3
  189. package/dist/personas/france_preseren.svg +3 -3
  190. package/dist/personas/frances_perkins.svg +3 -3
  191. package/dist/personas/franz_schubert.svg +3 -3
  192. package/dist/personas/gabriel_garcia_marquez.svg +3 -3
  193. package/dist/personas/gabriela_mistral.svg +3 -3
  194. package/dist/personas/galois.svg +3 -3
  195. package/dist/personas/gandhi.svg +3 -3
  196. package/dist/personas/gao_xingjian.svg +3 -3
  197. package/dist/personas/geoffrey_hinton.svg +2 -2
  198. package/dist/personas/george_eliot.svg +3 -3
  199. package/dist/personas/george_martin.svg +3 -3
  200. package/dist/personas/georges_lemaitre.svg +3 -3
  201. package/dist/personas/giambattista_vico.svg +3 -3
  202. package/dist/personas/godel.svg +3 -3
  203. package/dist/personas/goethe.svg +3 -3
  204. package/dist/personas/gregory_nazianzus.svg +3 -3
  205. package/dist/personas/gregory_palamas.svg +3 -3
  206. package/dist/personas/grothendieck.svg +3 -3
  207. package/dist/personas/guru_nanak.svg +3 -3
  208. package/dist/personas/hafez.svg +3 -3
  209. package/dist/personas/hickey.svg +2 -2
  210. package/dist/personas/hildegard_bingen.svg +3 -3
  211. package/dist/personas/hua_luogeng.svg +3 -3
  212. package/dist/personas/hubert_dreyfus.svg +3 -3
  213. package/dist/personas/hugo.svg +3 -3
  214. package/dist/personas/ibn_al_haytham.svg +3 -3
  215. package/dist/personas/ibn_arabi.svg +3 -3
  216. package/dist/personas/jack_ma.svg +3 -3
  217. package/dist/personas/jamsetji_tata.svg +3 -3
  218. package/dist/personas/janis_joplin.svg +3 -3
  219. package/dist/personas/jcr_licklider.svg +3 -3
  220. package/dist/personas/jerome.svg +3 -3
  221. package/dist/personas/jimi_hendrix.svg +3 -3
  222. package/dist/personas/john_cage.svg +3 -3
  223. package/dist/personas/john_maynard_keynes.svg +3 -3
  224. package/dist/personas/john_wanamaker.svg +3 -3
  225. package/dist/personas/joseph_weizenbaum.svg +3 -3
  226. package/dist/personas/junichiro_tanizaki.svg +3 -3
  227. package/dist/personas/kalidasa.svg +3 -3
  228. package/dist/personas/kamo_no_chomei.svg +3 -3
  229. package/dist/personas/kaoru_ishikawa.svg +3 -3
  230. package/dist/personas/karen_sparck_jones.svg +3 -3
  231. package/dist/personas/katsushika_hokusai.svg +3 -3
  232. package/dist/personas/khalil_gibran.svg +3 -3
  233. package/dist/personas/kovalevskaya.svg +3 -3
  234. package/dist/personas/kunihiko_fukushima.svg +3 -3
  235. package/dist/personas/kwasi_wiredu.svg +3 -3
  236. package/dist/personas/leibniz.svg +3 -3
  237. package/dist/personas/leo_burnett.svg +3 -3
  238. package/dist/personas/li_qingzhao.svg +3 -3
  239. package/dist/personas/liu_hui.svg +3 -3
  240. package/dist/personas/lu_xun.svg +3 -3
  241. package/dist/personas/lucretius.svg +3 -3
  242. package/dist/personas/madhava.svg +3 -3
  243. package/dist/personas/madonna.svg +3 -3
  244. package/dist/personas/mahmoud_darwish.svg +3 -3
  245. package/dist/personas/maimonides.svg +3 -3
  246. package/dist/personas/mandela.svg +3 -3
  247. package/dist/personas/mandela_contextual.svg +3 -3
  248. package/dist/personas/mariama_ba.svg +3 -3
  249. package/dist/personas/marina_tsvetaeva.svg +3 -3
  250. package/dist/personas/mary_parker_follett.svg +3 -3
  251. package/dist/personas/mary_shelley.svg +3 -3
  252. package/dist/personas/massimo_vignelli.svg +2 -2
  253. package/dist/personas/meister_eckhart.svg +3 -3
  254. package/dist/personas/miguel_angel_asturias.svg +3 -3
  255. package/dist/personas/mircea_eliade.svg +3 -3
  256. package/dist/personas/mirza_ghalib.svg +3 -3
  257. package/dist/personas/morrison.svg +3 -3
  258. package/dist/personas/muhammad_ali.svg +3 -3
  259. package/dist/personas/murasaki_shikibu.svg +3 -3
  260. package/dist/personas/nagarjuna.svg +3 -3
  261. package/dist/personas/nazim_hikmet.svg +3 -3
  262. package/dist/personas/nguyen_du.svg +3 -3
  263. package/dist/personas/nina_simone.svg +3 -3
  264. package/dist/personas/nishida_kitaro.svg +3 -3
  265. package/dist/personas/nizami.svg +3 -3
  266. package/dist/personas/norbert_wiener.svg +3 -3
  267. package/dist/personas/paglia.svg +2 -2
  268. package/dist/personas/pascal.svg +3 -3
  269. package/dist/personas/plato.svg +3 -3
  270. package/dist/personas/plotinus.svg +3 -3
  271. package/dist/personas/plutarch.svg +3 -3
  272. package/dist/personas/pramoedya_ananta_toer.svg +3 -3
  273. package/dist/personas/premchand.svg +3 -3
  274. package/dist/personas/prince.svg +3 -3
  275. package/dist/personas/pseudo_dionysius.svg +3 -3
  276. package/dist/personas/ptolemy.svg +3 -3
  277. package/dist/personas/pythagoras.svg +3 -3
  278. package/dist/personas/qu_yuan.svg +3 -3
  279. package/dist/personas/queen_liliuokalani.svg +3 -3
  280. package/dist/personas/rabia_al_adawiyya.svg +3 -3
  281. package/dist/personas/radia_perlman.svg +3 -3
  282. package/dist/personas/ralph_ellison.svg +3 -3
  283. package/dist/personas/ralph_merkle.svg +3 -3
  284. package/dist/personas/ramanujan.svg +3 -3
  285. package/dist/personas/ravi_shankar.svg +3 -3
  286. package/dist/personas/richard_victor.svg +3 -3
  287. package/dist/personas/robert_boyle.svg +3 -3
  288. package/dist/personas/romulo_gallegos.svg +3 -3
  289. package/dist/personas/ruben_dario.svg +3 -3
  290. package/dist/personas/rumi.svg +3 -3
  291. package/dist/personas/rumi_contextual.svg +3 -3
  292. package/dist/personas/saadi.svg +3 -3
  293. package/dist/personas/samuel_johnson.svg +3 -3
  294. package/dist/personas/sei_shonagon.svg +3 -3
  295. package/dist/personas/seki_takakazu.svg +3 -3
  296. package/dist/personas/sergey_brin.svg +3 -3
  297. package/dist/personas/sesshu_toyo.svg +3 -3
  298. package/dist/personas/shafi_goldwasser.svg +3 -3
  299. package/dist/personas/shen_congwen.svg +3 -3
  300. package/dist/personas/shen_kuo.svg +3 -3
  301. package/dist/personas/shitao.svg +3 -3
  302. package/dist/personas/sima_guang.svg +3 -3
  303. package/dist/personas/sima_qian.svg +3 -3
  304. package/dist/personas/sor_juana_ines_de_la_cruz.svg +3 -3
  305. package/dist/personas/stanley_marcus.svg +3 -3
  306. package/dist/personas/taher_elgamal.svg +3 -3
  307. package/dist/personas/tatsumi_hijikata.svg +3 -3
  308. package/dist/personas/tesla.svg +3 -3
  309. package/dist/personas/thelonious_monk.svg +3 -3
  310. package/dist/personas/thurgood_marshall.svg +3 -3
  311. package/dist/personas/tim_burton.svg +3 -3
  312. package/dist/personas/toru_takemitsu.svg +3 -3
  313. package/dist/personas/tpope.svg +3 -3
  314. package/dist/personas/trevor_noah.svg +3 -3
  315. package/dist/personas/tsongkhapa.svg +3 -3
  316. package/dist/personas/u_thant.svg +3 -3
  317. package/dist/personas/verghese_kurien.svg +3 -3
  318. package/dist/personas/vs_naipaul.svg +3 -3
  319. package/dist/personas/wang_anshi.svg +3 -3
  320. package/dist/personas/wang_wei.svg +3 -3
  321. package/dist/personas/wang_yangming.svg +3 -3
  322. package/dist/personas/whitfield_diffie.svg +3 -3
  323. package/dist/personas/william_harvey.svg +3 -3
  324. package/dist/personas/xunzi.svg +3 -3
  325. package/dist/personas/yasunari_kawabata.svg +3 -3
  326. package/dist/personas/yogananda.svg +3 -3
  327. package/dist/personas/yukio_mishima.svg +3 -3
  328. package/dist/personas/zeami_motokiyo.svg +3 -3
  329. package/dist/personas/zeekay.svg +2 -2
  330. package/dist/personas/zhu_xi.svg +3 -3
  331. package/dist/personas/zora_neale_hurston.svg +3 -3
  332. package/dist/projects/index.html +2 -2
  333. package/dist/projects/proj-crm/components/index.html +2 -2
  334. package/dist/projects/proj-crm/index.html +2 -2
  335. package/dist/projects/proj-crm/issues/index.html +2 -2
  336. package/dist/projects/proj-crm/issues/kanban/index.html +2 -2
  337. package/dist/projects/proj-crm/issues/list/index.html +2 -2
  338. package/dist/projects/proj-crm/milestones/index.html +2 -2
  339. package/dist/projects/proj-crm/templates/index.html +2 -2
  340. package/dist/projects/proj-dev/components/index.html +2 -2
  341. package/dist/projects/proj-dev/index.html +2 -2
  342. package/dist/projects/proj-dev/issues/index.html +2 -2
  343. package/dist/projects/proj-dev/issues/kanban/index.html +2 -2
  344. package/dist/projects/proj-dev/issues/list/index.html +2 -2
  345. package/dist/projects/proj-dev/milestones/index.html +2 -2
  346. package/dist/projects/proj-dev/templates/index.html +2 -2
  347. package/dist/projects/proj-mkt/components/index.html +2 -2
  348. package/dist/projects/proj-mkt/index.html +2 -2
  349. package/dist/projects/proj-mkt/issues/index.html +2 -2
  350. package/dist/projects/proj-mkt/issues/kanban/index.html +2 -2
  351. package/dist/projects/proj-mkt/issues/list/index.html +2 -2
  352. package/dist/projects/proj-mkt/milestones/index.html +2 -2
  353. package/dist/projects/proj-mkt/templates/index.html +2 -2
  354. package/dist/projects/proj-next/components/index.html +2 -2
  355. package/dist/projects/proj-next/index.html +2 -2
  356. package/dist/projects/proj-next/issues/index.html +2 -2
  357. package/dist/projects/proj-next/issues/kanban/index.html +2 -2
  358. package/dist/projects/proj-next/issues/list/index.html +2 -2
  359. package/dist/projects/proj-next/milestones/index.html +2 -2
  360. package/dist/projects/proj-next/templates/index.html +2 -2
  361. package/dist/settings/index.html +2 -2
  362. package/dist/time/index.html +2 -2
  363. package/package.json +2 -2
  364. package/dist/assets/Bots-CPIU0Xgd.js.map +0 -1
  365. package/dist/assets/ModelPickerMenu-Dx9FATCv.js +0 -2
  366. package/dist/assets/index-BSvxo5-z.js +0 -203
  367. package/dist/assets/index-DUEuN8sV.css +0 -1
@@ -1,203 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ModelPickerMenu-Dx9FATCv.js","assets/rolldown-runtime-B0Z9INg1.js","assets/react-DIaL9_ob.js","assets/catalog-BM2B7gTj.js","assets/Anchor-Avsca6-o.js","assets/ThemeToggleNext-Cb-dedIF.js","assets/Bots-CPIU0Xgd.js","assets/instrument-CmZcxFxx.js"])))=>i.map(i=>d[i]);
2
- import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{$ as n,A as r,C as i,D as a,Dt as o,Et as s,F as c,G as l,H as u,I as d,J as f,L as p,M as m,N as h,O as g,Ot as _,Q as v,R as y,St as b,T as x,Tt as S,U as C,W as w,X as T,Y as E,a as D,at as O,c as k,ct as ee,d as A,dt as j,et as M,f as N,g as P,gt as te,h as F,ht as I,i as ne,it as re,j as ie,l as L,m as ae,mt as oe,n as R,nt as se,o as ce,ot as le,p as ue,pt as de,r as fe,rt as pe,s as me,st as he,t as ge,tt as _e,u as ve,wt as ye,xt as be,y as xe,yt as Se,z}from"./react-DIaL9_ob.js";import{A as Ce,C as we,D as Te,E as Ee,O as De,S as Oe,T as ke,_ as Ae,a as je,b as Me,c as Ne,d as Pe,f as Fe,g as Ie,h as Le,i as Re,k as ze,l as Be,m as Ve,n as He,o as Ue,p as We,r as Ge,s as Ke,t as qe,u as Je,v as Ye,w as Xe,x as Ze,y as Qe}from"./instrument-CmZcxFxx.js";import{$ as $e,$t as et,A as tt,At as nt,B as rt,Bt as it,C as at,Ct as ot,D as st,Dt as ct,E as lt,Et as ut,F as dt,Ft as ft,G as pt,Gt as mt,H as ht,Ht as gt,I as _t,It as vt,J as yt,Jt as bt,K as xt,Kt as St,L as B,Lt as Ct,M as wt,Mt as Tt,N as Et,Nt as Dt,O as Ot,Ot as kt,P as At,Pt as jt,Q as Mt,Qt as Nt,Rt as Pt,S as Ft,St as It,T as Lt,Tt as Rt,U as zt,Ut as Bt,V as Vt,Vt as Ht,W as Ut,Wt,X as Gt,Xt as Kt,Y as qt,Yt as Jt,Z as Yt,Zt as Xt,_ as Zt,_t as Qt,an as $t,at as en,bt as tn,ct as nn,dt as rn,en as an,et as on,f as sn,ft as cn,gt as ln,ht as un,in as dn,it as fn,j as pn,k as mn,kt as hn,lt as gn,mt as _n,nn as vn,nt as yn,on as bn,ot as xn,pt as Sn,q as Cn,qt as wn,r as Tn,rn as En,rt as Dn,st as On,tn as kn,tt as An,ut as jn,v as Mn,vt as Nn,w as Pn,wt as Fn,xt as In,yt as Ln,z as Rn,zt as zn}from"./catalog-BM2B7gTj.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Bn=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,ee=k.port2;k.port1.onmessage=D,O=function(){ee.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),eee=t(((e,t)=>{t.exports=Bn()})),Vn=t((e=>{var t=eee(),n=_(),r=o();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(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 l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(s(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return u(a),e;if(o===r)return u(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),S=Symbol.for(`react.context`),C=Symbol.for(`react.forward_ref`),w=Symbol.for(`react.suspense`),T=Symbol.for(`react.suspense_list`),E=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),O=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),ee=Symbol.iterator;function A(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var j=Symbol.for(`react.client.reference`);function M(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===j?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case w:return`Suspense`;case T:return`SuspenseList`;case O:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case S:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case C:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case E:return t=e.displayName||null,t===null?M(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return M(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},I=[],ne=-1;function re(e){return{current:e}}function ie(e){0>ne||(e.current=I[ne],I[ne]=null,ne--)}function L(e,t){ne++,I[ne]=e.current,e.current=t}var ae=re(null),oe=re(null),R=re(null),se=re(null);function ce(e,t){switch(L(R,t),L(oe,e),L(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ie(ae),L(ae,e)}function le(){ie(ae),ie(oe),ie(R)}function ue(e){e.memoizedState!==null&&L(se,e);var t=ae.current,n=Qd(t,e.type);t!==n&&(L(oe,e),L(ae,n))}function de(e){oe.current===e&&(ie(ae),ie(oe)),se.current===e&&(ie(se),sp._currentValue=F)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{he=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?me(n):``}function _e(e,t){switch(e.tag){case 26:case 27:case 5:return me(e.type);case 16:return me(`Lazy`);case 13:return e.child!==t&&t!==null?me(`Suspense Fallback`):me(`Suspense`);case 19:return me(`SuspenseList`);case 0:case 15:return ge(e.type,!1);case 11:return ge(e.type.render,!1);case 1:return ge(e.type,!0);case 31:return me(`Activity`);default:return``}}function ve(e){try{var t=``,n=null;do t+=_e(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var ye=Object.prototype.hasOwnProperty,be=t.unstable_scheduleCallback,xe=t.unstable_cancelCallback,Se=t.unstable_shouldYield,z=t.unstable_requestPaint,Ce=t.unstable_now,we=t.unstable_getCurrentPriorityLevel,Te=t.unstable_ImmediatePriority,Ee=t.unstable_UserBlockingPriority,De=t.unstable_NormalPriority,Oe=t.unstable_LowPriority,ke=t.unstable_IdlePriority,Ae=t.log,je=t.unstable_setDisableYieldValue,Me=null,Ne=null;function Pe(e){if(typeof Ae==`function`&&je(e),Ne&&typeof Ne.setStrictMode==`function`)try{Ne.setStrictMode(Me,e)}catch{}}var Fe=Math.clz32?Math.clz32:Re,Ie=Math.log,Le=Math.LN2;function Re(e){return e>>>=0,e===0?32:31-(Ie(e)/Le|0)|0}var ze=256,Be=262144,Ve=4194304;function He(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ue(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=He(n))):i=He(o):i=He(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=He(n))):i=He(o)):i=He(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function We(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ge(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ke(){var e=Ve;return Ve<<=1,!(Ve&62914560)&&(Ve=4194304),e}function qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Je(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ye(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Fe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Xe(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Xe(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Fe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function Ze(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Fe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Qe(e,t){var n=t&-t;return n=n&42?1:$e(n),(n&(e.suspendedLanes|t))===0?n:0}function $e(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function et(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function tt(){var e=te.p;return e===0?(e=window.event,e===void 0?32:Cp(e.type)):e}function nt(e,t){var n=te.p;try{return te.p=e,t()}finally{te.p=n}}var rt=Math.random().toString(36).slice(2),it=`__reactFiber$`+rt,at=`__reactProps$`+rt,ot=`__reactContainer$`+rt,st=`__reactEvents$`+rt,ct=`__reactListeners$`+rt,lt=`__reactHandles$`+rt,ut=`__reactResources$`+rt,dt=`__reactMarker$`+rt;function ft(e){delete e[it],delete e[at],delete e[st],delete e[ct],delete e[lt]}function pt(e){var t=e[it];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ot]||n[it]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[it])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function mt(e){if(e=e[it]||e[ot]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ht(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function gt(e){var t=e[ut];return t||=e[ut]={hoistableStyles:new Map,hoistableScripts:new Map},t}function _t(e){e[dt]=!0}var vt=new Set,yt={};function bt(e,t){xt(e,t),xt(e+`Capture`,t)}function xt(e,t){for(yt[e]=t,e=0;e<t.length;e++)vt.add(t[e])}var St=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),B={},Ct={};function wt(e){return ye.call(Ct,e)?!0:ye.call(B,e)?!1:St.test(e)?Ct[e]=!0:(B[e]=!0,!1)}function Tt(e,t,n){if(wt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}}function Et(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Dt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ot(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function kt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function At(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function jt(e){if(!e._valueTracker){var t=kt(e)?`checked`:`value`;e._valueTracker=At(e,t,``+e[t])}}function Mt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=kt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Nt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Pt=/[\n"\\]/g;function Ft(e){return e.replace(Pt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function It(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ot(t)):e.value!==``+Ot(t)&&(e.value=``+Ot(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Rt(e,o,Ot(n)):Rt(e,o,Ot(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ot(s):e.removeAttribute(`name`)}function Lt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){jt(e);return}n=n==null?``:``+Ot(n),t=t==null?n:``+Ot(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),jt(e)}function Rt(e,t,n){t===`number`&&Nt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function zt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ot(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Bt(e,t,n){if(t!=null&&(t=``+Ot(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ot(n)}function Vt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(N(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ot(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),jt(e)}function Ht(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ut=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Wt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Ut.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Gt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Wt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Wt(e,o,t[o])}function Kt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var qt=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Jt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yt(e){return Jt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Xt(){}var Zt=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $t=null,en=null;function tn(e){var t=mt(e);if(t&&(e=t.stateNode)){var n=e[at]||null;a:switch(e=t.stateNode,t.type){case`input`:if(It(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Ft(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[at]||null;if(!a)throw Error(i(90));It(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Mt(r)}break a;case`textarea`:Bt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&zt(e,!!n.multiple,t,!1)}}}var nn=!1;function rn(e,t,n){if(nn)return e(t,n);nn=!0;try{return e(t)}finally{if(nn=!1,($t!==null||en!==null)&&(Du(),$t&&(t=$t,e=en,en=$t=null,tn(t),e)))for(t=0;t<e.length;t++)tn(e[t])}}function an(e,t){var n=e.stateNode;if(n===null)return null;var r=n[at]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var on=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),sn=!1;if(on)try{var cn={};Object.defineProperty(cn,"passive",{get:function(){sn=!0}}),window.addEventListener(`test`,cn,cn),window.removeEventListener(`test`,cn,cn)}catch{sn=!1}var ln=null,un=null,dn=null;function fn(){if(dn)return dn;var e,t=un,n=t.length,r,i=`value`in ln?ln.value:ln.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return dn=i.slice(e,1<r?1-r:void 0)}function pn(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 mn(){return!0}function hn(){return!1}function gn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?mn:hn,this.isPropagationStopped=hn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=mn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var _n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vn=gn(_n),yn=p({},_n,{view:0,detail:0}),bn=gn(yn),xn,Sn,Cn,wn=p({},yn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fn,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!==Cn&&(Cn&&e.type===`mousemove`?(xn=e.screenX-Cn.screenX,Sn=e.screenY-Cn.screenY):Sn=xn=0,Cn=e),xn)},movementY:function(e){return`movementY`in e?e.movementY:Sn}}),Tn=gn(wn),En=gn(p({},wn,{dataTransfer:0})),Dn=gn(p({},yn,{relatedTarget:0})),On=gn(p({},_n,{animationName:0,elapsedTime:0,pseudoElement:0})),kn=gn(p({},_n,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),An=gn(p({},_n,{data:0})),jn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Mn={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`},Nn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Pn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nn[e])?!!t[e]:!1}function Fn(){return Pn}var In=gn(p({},yn,{key:function(e){if(e.key){var t=jn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=pn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Mn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fn,charCode:function(e){return e.type===`keypress`?pn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?pn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Ln=gn(p({},wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=gn(p({},yn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fn})),zn=gn(p({},_n,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=gn(p({},wn,{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})),Vn=gn(p({},_n,{newState:0,oldState:0})),Hn=[9,13,27,32],V=on&&`CompositionEvent`in window,Un=null;on&&`documentMode`in document&&(Un=document.documentMode);var Wn=on&&`TextEvent`in window&&!Un,Gn=on&&(!V||Un&&8<Un&&11>=Un),Kn=` `,qn=!1;function Jn(e,t){switch(e){case`keyup`:return Hn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Xn=!1;function Zn(e,t){switch(e){case`compositionend`:return Yn(t);case`keypress`:return t.which===32?(qn=!0,Kn):null;case`textInput`:return e=t.data,e===Kn&&qn?null:e;default:return null}}function Qn(e,t){if(Xn)return e===`compositionend`||!V&&Jn(e,t)?(e=fn(),dn=un=ln=null,Xn=!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 Gn&&t.locale!==`ko`?null:t.data;default:return null}}var $n={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 er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!$n[e.type]:t===`textarea`}function tr(e,t,n,r){$t?en?en.push(r):en=[r]:$t=r,t=Fd(t,`onChange`),0<t.length&&(n=new vn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var nr=null,rr=null;function ir(e){Dd(e,0)}function ar(e){if(Mt(ht(e)))return e}function or(e,t){if(e===`change`)return t}var sr=!1;if(on){var cr;if(on){var lr=`oninput`in document;if(!lr){var ur=document.createElement(`div`);ur.setAttribute(`oninput`,`return;`),lr=typeof ur.oninput==`function`}cr=lr}else cr=!1;sr=cr&&(!document.documentMode||9<document.documentMode)}function dr(){nr&&(nr.detachEvent(`onpropertychange`,fr),rr=nr=null)}function fr(e){if(e.propertyName===`value`&&ar(rr)){var t=[];tr(t,rr,e,Qt(e)),rn(ir,t)}}function pr(e,t,n){e===`focusin`?(dr(),nr=t,rr=n,nr.attachEvent(`onpropertychange`,fr)):e===`focusout`&&dr()}function mr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ar(rr)}function hr(e,t){if(e===`click`)return ar(t)}function gr(e,t){if(e===`input`||e===`change`)return ar(t)}function _r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var vr=typeof Object.is==`function`?Object.is:_r;function yr(e,t){if(vr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ye.call(t,i)||!vr(e[i],t[i]))return!1}return!0}function br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xr(e,t){var n=br(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=br(n)}}function Sr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Cr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Nt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Nt(e.document)}return t}function wr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Tr=on&&`documentMode`in document&&11>=document.documentMode,Er=null,Dr=null,Or=null,kr=!1;function Ar(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;kr||Er==null||Er!==Nt(r)||(r=Er,`selectionStart`in r&&wr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Or&&yr(Or,r)||(Or=r,r=Fd(Dr,`onSelect`),0<r.length&&(t=new vn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Er)))}function jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Mr={animationend:jr(`Animation`,`AnimationEnd`),animationiteration:jr(`Animation`,`AnimationIteration`),animationstart:jr(`Animation`,`AnimationStart`),transitionrun:jr(`Transition`,`TransitionRun`),transitionstart:jr(`Transition`,`TransitionStart`),transitioncancel:jr(`Transition`,`TransitionCancel`),transitionend:jr(`Transition`,`TransitionEnd`)},Nr={},Pr={};on&&(Pr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Mr.animationend.animation,delete Mr.animationiteration.animation,delete Mr.animationstart.animation),`TransitionEvent`in window||delete Mr.transitionend.transition);function Fr(e){if(Nr[e])return Nr[e];if(!Mr[e])return e;var t=Mr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Pr)return Nr[e]=t[n];return e}var Ir=Fr(`animationend`),Lr=Fr(`animationiteration`),Rr=Fr(`animationstart`),zr=Fr(`transitionrun`),Br=Fr(`transitionstart`),Vr=Fr(`transitioncancel`),Hr=Fr(`transitionend`),Ur=new Map,Wr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Wr.push(`scrollEnd`);function Gr(e,t){Ur.set(e,t),bt(t,[e])}var Kr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},qr=[],Jr=0,Yr=0;function Xr(){for(var e=Jr,t=Yr=Jr=0;t<e;){var n=qr[t];qr[t++]=null;var r=qr[t];qr[t++]=null;var i=qr[t];qr[t++]=null;var a=qr[t];if(qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ei(n,i,a)}}function Zr(e,t,n,r){qr[Jr++]=e,qr[Jr++]=t,qr[Jr++]=n,qr[Jr++]=r,Yr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Qr(e,t,n,r){return Zr(e,t,n,r),ti(e)}function $r(e,t){return Zr(e,null,null,t),ti(e)}function ei(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Fe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ti(e){if(50<vu)throw vu=0,yu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ni={};function ri(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ii(e,t,n,r){return new ri(e,t,n,r)}function ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oi(e,t){var n=e.alternate;return n===null?(n=ii(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function si(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ci(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)ai(e)&&(s=1);else if(typeof e==`string`)s=$f(e,n,ae.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case O:return e=ii(31,n,t,a),e.elementType=O,e.lanes=o,e;case v:return li(n.children,a,o,t);case y:s=8,a|=24;break;case b:return e=ii(12,n,t,a|2),e.elementType=b,e.lanes=o,e;case w:return e=ii(13,n,t,a),e.elementType=w,e.lanes=o,e;case T:return e=ii(19,n,t,a),e.elementType=T,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case S:s=10;break a;case x:s=9;break a;case C:s=11;break a;case E:s=14;break a;case D:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ii(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function li(e,t,n,r){return e=ii(7,e,r,t),e.lanes=n,e}function ui(e,t,n){return e=ii(6,e,null,t),e.lanes=n,e}function di(e){var t=ii(18,null,null,0);return t.stateNode=e,t}function fi(e,t,n){return t=ii(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pi=new WeakMap;function mi(e,t){if(typeof e==`object`&&e){var n=pi.get(e);return n===void 0?(t={value:e,source:t,stack:ve(t)},pi.set(e,t),t):n}return{value:e,source:t,stack:ve(t)}}var hi=[],gi=0,_i=null,vi=0,yi=[],bi=0,xi=null,Si=1,Ci=``;function wi(e,t){hi[gi++]=vi,hi[gi++]=_i,_i=e,vi=t}function Ti(e,t,n){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,xi=e;var r=Si;e=Ci;var i=32-Fe(r)-1;r&=~(1<<i),n+=1;var a=32-Fe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Si=1<<32-Fe(t)+i|n<<i|r,Ci=a+e}else Si=1<<a|n<<i|r,Ci=e}function Ei(e){e.return!==null&&(wi(e,1),Ti(e,1,0))}function Di(e){for(;e===_i;)_i=hi[--gi],hi[gi]=null,vi=hi[--gi],hi[gi]=null;for(;e===xi;)xi=yi[--bi],yi[bi]=null,Ci=yi[--bi],yi[bi]=null,Si=yi[--bi],yi[bi]=null}function Oi(e,t){yi[bi++]=Si,yi[bi++]=Ci,yi[bi++]=xi,Si=t.id,Ci=t.overflow,xi=e}var ki=null,Ai=null,ji=!1,Mi=null,Ni=!1,Pi=Error(i(519));function Fi(e){throw Vi(mi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Pi}function Ii(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[it]=e,t[at]=r,n){case`dialog`:Od(`cancel`,t),Od(`close`,t);break;case`iframe`:case`object`:case`embed`:Od(`load`,t);break;case`video`:case`audio`:for(n=0;n<Td.length;n++)Od(Td[n],t);break;case`source`:Od(`error`,t);break;case`img`:case`image`:case`link`:Od(`error`,t),Od(`load`,t);break;case`details`:Od(`toggle`,t);break;case`input`:Od(`invalid`,t),Lt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Od(`invalid`,t);break;case`textarea`:Od(`invalid`,t),Vt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Vd(t.textContent,n)?(r.popover!=null&&(Od(`beforetoggle`,t),Od(`toggle`,t)),r.onScroll!=null&&Od(`scroll`,t),r.onScrollEnd!=null&&Od(`scrollend`,t),r.onClick!=null&&(t.onclick=Xt),t=!0):t=!1,t||Fi(e,!0)}function Li(e){for(ki=e.return;ki;)switch(ki.tag){case 5:case 31:case 13:Ni=!1;return;case 27:case 3:Ni=!0;return;default:ki=ki.return}}function Ri(e){if(e!==ki)return!1;if(!ji)return Li(e),ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||$d(e.type,e.memoizedProps)),n=!n),n&&Ai&&Fi(e),Li(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=bf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ai=bf(e)}else t===27?(t=Ai,cf(e.type)?(e=yf,yf=null,Ai=e):Ai=t):Ai=ki?vf(e.stateNode.nextSibling):null;return!0}function zi(){Ai=ki=null,ji=!1}function Bi(){var e=Mi;return e!==null&&(iu===null?iu=e:iu.push.apply(iu,e),Mi=null),e}function Vi(e){Mi===null?Mi=[e]:Mi.push(e)}var Hi=re(null),Ui=null,Wi=null;function Gi(e,t,n){L(Hi,t._currentValue),t._currentValue=n}function Ki(e){e._currentValue=Hi.current,ie(Hi)}function qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ji(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Yi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;vr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===se.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sp]:e.push(sp))}a=a.return}e!==null&&Ji(t,e,n,r),t.flags|=262144}function Xi(e){for(e=e.firstContext;e!==null;){if(!vr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Zi(e){Ui=e,Wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Qi(e){return ea(Ui,e)}function $i(e,t){return Ui===null&&Zi(e),ea(e,t)}function ea(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Wi===null){if(e===null)throw Error(i(308));Wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wi=Wi.next=t;return n}var ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},na=t.unstable_scheduleCallback,ra=t.unstable_NormalPriority,ia={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function aa(){return{controller:new ta,data:new Map,refCount:0}}function oa(e){e.refCount--,e.refCount===0&&na(ra,function(){e.controller.abort()})}var sa=null,ca=0,la=0,ua=null;function da(e,t){if(sa===null){var n=sa=[];ca=0,la=yd(),ua={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ca++,t.then(fa,fa),t}function fa(){if(--ca===0&&sa!==null){ua!==null&&(ua.status=`fulfilled`);var e=sa;sa=null,la=0,ua=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ma=P.S;P.S=function(e,t){su=Ce(),typeof t==`object`&&t&&typeof t.then==`function`&&da(e,t),ma!==null&&ma(e,t)};var ha=re(null);function ga(){var e=ha.current;return e===null?Hl.pooledCache:e}function _a(e,t){t===null?L(ha,ha.current):L(ha,t.pool)}function va(){var e=ga();return e===null?null:{parent:ia._currentValue,pool:e}}var ya=Error(i(460)),ba=Error(i(474)),xa=Error(i(542)),Sa={then:function(){}};function Ca(e){return e=e.status,e===`fulfilled`||e===`rejected`}function wa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xt,Xt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e;default:if(typeof t.status==`string`)t.then(Xt,Xt);else{if(e=Hl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Oa(e),e}throw Ea=t,ya}}function Ta(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ea=e,ya):e}}var Ea=null;function Da(){if(Ea===null)throw Error(i(459));var e=Ea;return Ea=null,e}function Oa(e){if(e===ya||e===xa)throw Error(i(483))}var ka=null,Aa=0;function ja(e){var t=Aa;return Aa+=1,ka===null&&(ka=[]),wa(ka,e,t)}function Ma(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Na(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Pa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=oi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ui(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===v?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===D&&Ta(i)===t.type)?(t=a(t,n.props),Ma(t,n),t.return=e,t):(t=ci(n.type,n.key,n.props,null,e.mode,r),Ma(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=fi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=li(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ui(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=ci(t.type,t.key,t.props,null,e.mode,n),Ma(n,t),n.return=e,n;case g:return t=fi(t,e.mode,n),t.return=e,t;case D:return t=Ta(t),f(e,t,n)}if(N(t)||A(t))return t=li(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ja(t),n);if(t.$$typeof===S)return f(e,$i(e,t),n);Na(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case D:return n=Ta(n),p(e,t,n,r)}if(N(n)||A(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ja(n),r);if(n.$$typeof===S)return p(e,t,$i(e,n),r);Na(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=Ta(r),m(e,t,n,r,i)}if(N(r)||A(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ja(r),i);if(r.$$typeof===S)return m(e,t,n,$i(t,r),i);Na(t,r)}return null}function _(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),ji&&wi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return ji&&wi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),ji&&wi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),ji&&wi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return ji&&wi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),ji&&wi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===v&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===v){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&Ta(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ma(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===v?(c=li(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ci(o.type,o.key,o.props,null,e.mode,c),Ma(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=fi(o,e.mode,c),c.return=e,e=c}return s(e);case D:return o=Ta(o),b(e,r,o,c)}if(N(o))return _(e,r,o,c);if(A(o)){if(l=A(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,ja(o),c);if(o.$$typeof===S)return b(e,r,$i(e,o),c);Na(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ui(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Aa=0;var i=b(e,t,n,r);return ka=null,i}catch(t){if(t===ya||t===xa)throw t;var a=ii(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Fa=Pa(!0),Ia=Pa(!1),La=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ti(e),ei(e,null,n),t}return Zr(e,r,t,n),ti(e)}function Ha(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}function Ua(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Wa=!1;function Ga(){if(Wa){var e=ua;if(e!==null)throw e}}function Ka(e,t,n,r){Wa=!1;var i=e.updateQueue;La=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Wl&f)===f:(r&f)===f){f!==0&&f===la&&(Wa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:La=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ql|=o,e.lanes=o,e.memoizedState=d}}function qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ja(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)qa(n[e],t)}var Ya=re(null),Xa=re(0);function Za(e,t){e=Xl,L(Xa,e),L(Ya,t),Xl=e|t.baseLanes}function H(){L(Xa,Xl),L(Ya,Ya.current)}function Qa(){Xl=Xa.current,ie(Ya),ie(Xa)}var $a=re(null),eo=null;function to(e){var t=e.alternate;L(oo,oo.current&1),L($a,e),eo===null&&(t===null||Ya.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){L(oo,oo.current),L($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(L(oo,oo.current),L($a,e),eo===null&&(eo=e)):io(e)}function io(){L(oo,oo.current),L($a,$a.current)}function ao(e){ie($a),eo===e&&(eo=null),ie(oo)}var oo=re(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||hf(n)||gf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,lo=null,uo=null,fo=null,po=!1,mo=!1,ho=!1,go=0,_o=0,vo=null,yo=0;function bo(){throw Error(i(321))}function xo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!vr(e[n],t[n]))return!1;return!0}function So(e,t,n,r,i,a){return co=a,lo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?zs:Bs,ho=!1,a=n(r,i),ho=!1,mo&&(a=wo(t,n,r,i)),Co(e),a}function Co(e){P.H=Rs;var t=uo!==null&&uo.next!==null;if(co=0,fo=uo=lo=null,po=!1,_o=0,vo=null,t)throw Error(i(300));e===null||rc||(e=e.dependencies,e!==null&&Xi(e)&&(rc=!0))}function wo(e,t,n,r){lo=e;var a=0;do{if(mo&&(vo=null),_o=0,mo=!1,25<=a)throw Error(i(301));if(a+=1,fo=uo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Vs,o=t(n,r)}while(mo);return o}function To(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Mo(t):t,e=e.useState()[0],(uo===null?null:uo.memoizedState)!==e&&(lo.flags|=1024),t}function Eo(){var e=go!==0;return go=0,e}function Do(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Oo(e){if(po){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}po=!1}co=0,fo=uo=lo=null,mo=!1,_o=go=0,vo=null}function ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fo===null?lo.memoizedState=fo=e:fo=fo.next=e,fo}function Ao(){if(uo===null){var e=lo.alternate;e=e===null?null:e.memoizedState}else e=uo.next;var t=fo===null?lo.memoizedState:fo.next;if(t!==null)fo=t,uo=e;else{if(e===null)throw lo.alternate===null?Error(i(467)):Error(i(310));uo=e,e={memoizedState:uo.memoizedState,baseState:uo.baseState,baseQueue:uo.baseQueue,queue:uo.queue,next:null},fo===null?lo.memoizedState=fo=e:fo=fo.next=e}return fo}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Mo(e){var t=_o;return _o+=1,vo===null&&(vo=[]),e=wa(vo,e,t),t=lo,(fo===null?t.memoizedState:fo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?zs:Bs),e}function No(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Mo(e);if(e.$$typeof===S)return Qi(e)}throw Error(i(438,String(e)))}function Po(e){var t=null,n=lo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=lo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=jo(),lo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function Fo(e,t){return typeof t==`function`?t(e):t}function Io(e){return Lo(Ao(),uo,e)}function Lo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Wl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===la&&(d=!0);else if((co&p)===p){u=u.next,p===la&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,lo.lanes|=p,Ql|=p;f=u.action,ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,lo.lanes|=f,Ql|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!vr(o,e.memoizedState)&&(rc=!0,d&&(n=ua,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ro(e){var t=Ao(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);vr(o,t.memoizedState)||(rc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function zo(e,t,n){var r=lo,a=Ao(),o=ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!vr((uo||a).memoizedState,n);if(s&&(a.memoizedState=n,rc=!0),a=a.queue,us(Ho.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||fo!==null&&fo.memoizedState.tag&1){if(r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,a,n,t),null),Hl===null)throw Error(i(349));o||co&127||Bo(r,t,n)}return n}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=lo.updateQueue,t===null?(t=jo(),lo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vo(e,t,n,r){t.value=n,t.getSnapshot=r,Uo(t)&&Wo(e)}function Ho(e,t,n){return n(function(){Uo(t)&&Wo(e)})}function Uo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!vr(e,n)}catch{return!0}}function Wo(e){var t=$r(e,2);t!==null&&Su(t,e,2)}function Go(e){var t=ko();if(typeof e==`function`){var n=e;if(e=n(),ho){Pe(!0);try{n()}finally{Pe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:e},t}function Ko(e,t,n,r){return e.baseState=n,Lo(e,uo,typeof r==`function`?r:Fo)}function qo(e,t,n,r,a){if(Fs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Jo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Jo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Yo(e,t,s)}catch(n){Zo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Yo(e,t,a)}catch(n){Zo(e,t,n)}}function Yo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Xo(e,t,n)},function(n){return Zo(e,t,n)}):Xo(e,t,n)}function Xo(e,t,n){t.status=`fulfilled`,t.value=n,Qo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jo(e,n)))}function Zo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Qo(t),t=t.next;while(t!==r)}e.action=null}function Qo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $o(e,t){return t}function es(e,t){if(ji){var n=Hl.formState;if(n!==null){a:{var r=lo;if(ji){if(Ai){b:{for(var i=Ai,a=Ni;i.nodeType!==8;){if(!a){i=null;break b}if(i=vf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ai=vf(i.nextSibling),r=i.data===`F!`;break a}}Fi(r)}r=!1}r&&(t=n[0])}}return n=ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$o,lastRenderedState:t},n.queue=r,n=Ms.bind(null,lo,r),r.dispatch=n,r=Go(!1),a=Ps.bind(null,lo,!1,r.queue),r=ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=qo.bind(null,lo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ts(e){return ns(Ao(),uo,e)}function ns(e,t,n){if(t=Lo(e,t,$o)[0],e=Io(Fo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Mo(t)}catch(e){throw e===ya?xa:e}else r=t;t=Ao();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(lo.flags|=2048,as(9,{destroy:void 0},rs.bind(null,i,n),null)),[r,a,e]}function rs(e,t){e.action=t}function is(e){var t=Ao(),n=uo;if(n!==null)return ns(t,n,e);Ao(),t=t.memoizedState,n=Ao();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function as(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=lo.updateQueue,t===null&&(t=jo(),lo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function os(){return Ao().memoizedState}function ss(e,t,n,r){var i=ko();lo.flags|=e,i.memoizedState=as(1|t,{destroy:void 0},n,r===void 0?null:r)}function cs(e,t,n,r){var i=Ao();r=r===void 0?null:r;var a=i.memoizedState.inst;uo!==null&&r!==null&&xo(r,uo.memoizedState.deps)?i.memoizedState=as(t,a,n,r):(lo.flags|=e,i.memoizedState=as(1|t,a,n,r))}function ls(e,t){ss(8390656,8,e,t)}function us(e,t){cs(2048,8,e,t)}function ds(e){lo.flags|=4;var t=lo.updateQueue;if(t===null)t=jo(),lo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function fs(e){var t=Ao().memoizedState;return ds({ref:t,nextImpl:e}),function(){if(Vl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function ps(e,t){return cs(4,2,e,t)}function ms(e,t){return cs(4,4,e,t)}function hs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gs(e,t,n){n=n==null?null:n.concat([e]),cs(4,4,hs.bind(null,t,e),n)}function _s(){}function vs(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&xo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ys(e,t){var n=Ao();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&xo(t,r[1]))return r[0];if(r=e(),ho){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r}function bs(e,t,n){return n===void 0||co&1073741824&&!(Wl&261930)?e.memoizedState=t:(e.memoizedState=n,e=xu(),lo.lanes|=e,Ql|=e,n)}function xs(e,t,n,r){return vr(n,t)?n:Ya.current===null?!(co&42)||co&1073741824&&!(Wl&261930)?(rc=!0,e.memoizedState=n):(e=xu(),lo.lanes|=e,Ql|=e,t):(e=bs(e,n,r),vr(e,t)||(rc=!0),e)}function Ss(e,t,n,r,i){var a=te.p;te.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Ps(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,pa(c,r),bu(e)):Ns(e,t,r,bu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{te.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,F,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},bu())}function Ds(){return Qi(sp)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=Ba(n);var r=Va(t,e,n);r!==null&&(Su(r,t,n),Ha(r,t,n)),t={cache:aa()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=Qr(e,t,n,r),n!==null&&(Su(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,bu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,vr(s,o))return Zr(e,t,i,0),Hl===null&&Xr(),!1}catch{}if(n=Qr(e,t,i,r),n!==null)return Su(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=Qr(e,n,r,2),t!==null&&Su(t,e,2)}function Fs(e){var t=e.alternate;return e===lo||t!==null&&t===lo}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ze(e,n)}}var Rs={readContext:Qi,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:Qi,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:Qi,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){Pe(!0);try{e()}finally{Pe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){Pe(!0);try{n(t)}finally{Pe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,lo,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,lo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,lo,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=lo,a=ko();if(ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=Hl.identifierPrefix;if(ji){var n=Ci,r=Si;n=(r&~(1<<32-Fe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=yo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ds,useFormState:es,useActionState:es,useOptimistic:function(e){var t=ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ps.bind(null,lo,!0,n),n.dispatch=t,[e,t]},useMemoCache:Po,useCacheRefresh:function(){return ko().memoizedState=As.bind(null,lo)},useEffectEvent:function(e){var t=ko(),n={impl:e};return t.memoizedState=n,function(){if(Vl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Bs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Io,useRef:os,useState:function(){return Io(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){return xs(Ao(),uo.memoizedState,e,t)},useTransition:function(){var e=Io(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:ts,useActionState:ts,useOptimistic:function(e,t){return Ko(Ao(),uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Bs.useEffectEvent=fs;var Vs={readContext:Qi,use:No,useCallback:vs,useContext:Qi,useEffect:us,useImperativeHandle:gs,useInsertionEffect:ps,useLayoutEffect:ms,useMemo:ys,useReducer:Ro,useRef:os,useState:function(){return Ro(Fo)},useDebugValue:_s,useDeferredValue:function(e,t){var n=Ao();return uo===null?bs(n,e,t):xs(n,uo.memoizedState,e,t)},useTransition:function(){var e=Ro(Fo)[0],t=Ao().memoizedState;return[typeof e==`boolean`?e:Mo(e),t]},useSyncExternalStore:zo,useId:Os,useHostTransitionStatus:Ds,useFormState:is,useActionState:is,useOptimistic:function(e,t){var n=Ao();return uo===null?(n.baseState=e,[e,n.queue.dispatch]):Ko(n,uo,e,t)},useMemoCache:Po,useCacheRefresh:ks};Vs.useEffectEvent=fs;function Hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Us={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bu(),i=Ba(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,r),t!==null&&(Su(t,e,r),Ha(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bu(),r=Ba(n);r.tag=2,t!=null&&(r.callback=t),t=Va(e,r,n),t!==null&&(Su(t,e,n),Ha(t,e,n))}};function Ws(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!yr(n,r)||!yr(i,a):!0}function Gs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Us.enqueueReplaceState(t,t.state,null)}function Ks(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function qs(e){Kr(e)}function Js(e){console.error(e)}function Ys(e){Kr(e)}function Xs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Qs(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Xs(e,t)},n}function $s(e){return e=Ba(e),e.tag=3,e}function ec(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Zs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Zs(t,n,r),typeof i!=`function`&&(uu===null?uu=new Set([this]):uu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function tc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Yi(t,n,a,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Pu():n.alternate===null&&Zl===0&&(Zl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$u(e,r,a)),!1;case 22:return n.flags|=65536,r===Sa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$u(e,r,a)),!1}throw Error(i(435,n.tag))}return $u(e,r,a),Pu(),!1}if(ji)return t=$a.current,t===null?(r!==Pi&&(t=Error(i(423),{cause:r}),Vi(mi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=mi(r,n),a=Qs(e.stateNode,r,a),Ua(e,a),Zl!==4&&(Zl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Pi&&(e=Error(i(422),{cause:r}),Vi(mi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=mi(o,n),ru===null?ru=[o]:ru.push(o),Zl!==4&&(Zl=2),t===null)return!0;r=mi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Qs(n.stateNode,r,e),Ua(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(uu===null||!uu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$s(a),ec(a,e,n,r),Ua(n,a),!1}n=n.return}while(n!==null);return!1}var nc=Error(i(461)),rc=!1;function ic(e,t,n,r){t.child=e===null?Ia(t,null,n,r):Fa(t,e.child,n,r)}function ac(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Zi(t),r=So(e,t,n,o,a,i),s=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(ji&&s&&Ei(t),t.flags|=1,ic(e,t,r,i),t.child)}function oc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,sc(e,t,a,r,i)):(e=ci(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ac(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?yr:n,n(o,r)&&e.ref===t.ref)return kc(e,t,i)}return t.flags|=1,e=oi(a,r),e.ref=t.ref,e.return=t,t.child=e}function sc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(yr(a,r)&&e.ref===t.ref){if(rc=!1,t.pendingProps=r=a,Ac(e,i))e.flags&131072&&(rc=!0);else return t.lanes=e.lanes,kc(e,t,i)}}return hc(e,t,n,r,i)}function cc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return uc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&_a(t,a===null?null:a.cachePool),a===null?H():Za(t,a),ro(t);else return r=t.lanes=536870912,uc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&_a(t,null),H(),io(t)):(_a(t,a.cachePool),Za(t,a),io(t),t.memoizedState=null);return ic(e,t,i,n),t.child}function lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function uc(e,t,n,r,i){var a=ga();return a=a===null?null:{parent:ia._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&_a(t,null),H(),ro(t),e!==null&&Yi(e,t,r,!0),t.childLanes=i,null}function dc(e,t){return t=wc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function fc(e,t,n){return Fa(t,e.child,null,n),e=dc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function pc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(ji){if(r.mode===`hidden`)return e=dc(t,r),t.lanes=536870912,lc(null,e);if(no(t),(e=Ai)?(e=mf(e,Ni),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return t.lanes=536870912,null}return dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(no(t),a){if(t.flags&256)t.flags&=-257,t=fc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(rc||Yi(e,t,n,!1),a=(n&e.childLanes)!==0,rc||a){if(r=Hl,r!==null&&(s=Qe(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,$r(e,s),Su(r,e,s),nc;Pu(),t=fc(e,t,n)}else e=o.treeContext,Ai=vf(s.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=dc(t,r),t.flags|=4096;return t}return e=oi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function mc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function hc(e,t,n,r,i){return Zi(t),n=So(e,t,n,r,void 0,i),r=Eo(),e!==null&&!rc?(Do(e,t,i),kc(e,t,i)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,i),t.child)}function gc(e,t,n,r,i,a){return Zi(t),t.updateQueue=null,n=wo(t,r,n,i),Co(e),r=Eo(),e!==null&&!rc?(Do(e,t,a),kc(e,t,a)):(ji&&r&&Ei(t),t.flags|=1,ic(e,t,n,a),t.child)}function _c(e,t,n,r,i){if(Zi(t),t.stateNode===null){var a=ni,o=n.contextType;typeof o==`object`&&o&&(a=Qi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Us,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ra(t),o=n.contextType,a.context=typeof o==`object`&&o?Qi(o):ni,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Hs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Us.enqueueReplaceState(a,a.state,null),Ka(t,r,a,i),Ga(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ks(n,s);a.props=c;var l=a.context,u=n.contextType;o=ni,typeof u==`object`&&u&&(o=Qi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Gs(t,a,r,o),La=!1;var f=t.memoizedState;a.state=f,Ka(t,r,a,i),Ga(),l=t.memoizedState,s||f!==l||La?(typeof d==`function`&&(Hs(t,n,d,r),l=t.memoizedState),(c=La||Ws(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),o=t.memoizedProps,u=Ks(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ni,typeof l==`object`&&l&&(c=Qi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Gs(t,a,r,c),La=!1,f=t.memoizedState,a.state=f,Ka(t,r,a,i),Ga();var p=t.memoizedState;o!==d||f!==p||La||e!==null&&e.dependencies!==null&&Xi(e.dependencies)?(typeof s==`function`&&(Hs(t,n,s,r),p=t.memoizedState),(u=La||Ws(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Xi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,mc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Fa(t,e.child,null,i),t.child=Fa(t,null,n,i)):ic(e,t,n,i),t.memoizedState=a.state,e=t.child):e=kc(e,t,i),e}function vc(e,t,n,r){return zi(),t.flags|=256,ic(e,t,n,r),t.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:va()}}function xc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=tu),e}function Sc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(oo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(ji){if(a?to(t):io(t),(e=Ai)?(e=mf(e,Ni),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi===null?null:{id:Si,overflow:Ci},retryLane:536870912,hydrationErrors:null},n=di(e),n.return=t,t.child=n,ki=t,Ai=null)):e=null,e===null)throw Fi(t);return gf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(io(t),a=t.mode,c=wc({mode:`hidden`,children:c},a),r=li(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(null,r)):(to(t),Cc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=Tc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,a=t.mode,r=wc({mode:`visible`,children:r.children},a),c=li(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Fa(t,e.child,null,n),r=t.child,r.memoizedState=bc(n),r.childLanes=xc(e,s,n),t.memoizedState=yc,t=lc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),gf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Vi({value:r,source:null,stack:null}),t=Tc(e,t,n)}else if(rc||Yi(e,t,n,!1),s=(n&e.childLanes)!==0,rc||s){if(s=Hl,s!==null&&(r=Qe(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,$r(e,r),Su(s,e,r),nc;hf(c)||Pu(),t=Tc(e,t,n)}else hf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ai=vf(c.nextSibling),ki=t,ji=!0,Mi=null,Ni=!1,e!==null&&Oi(t,e),t=Cc(t,r.children),t.flags|=4096);return t}return a?(io(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=oi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=li(c,a,n,null),c.flags|=2):c=oi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,lc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=bc(n):(a=c.cachePool,a===null?a=va():(l=ia._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=xc(e,s,n),t.memoizedState=yc,lc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=oi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Cc(e,t){return t=wc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function wc(e,t){return e=ii(22,e,null,t),e.lanes=0,e}function Tc(e,t,n){return Fa(t,e.child,null,n),e=Cc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ec(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function Dc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Oc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,L(oo,o),ic(e,t,r,n),r=ji?vi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ec(e,n,t);else if(e.tag===19)Ec(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Dc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Dc(t,!0,n,null,a,r);break;case`together`:Dc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function kc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=oi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=oi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ac(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&Xi(e)))}function jc(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Gi(t,ia,e.memoizedState.cache),zi();break;case 27:case 5:ue(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=kc(e,t,n),e===null?null:e.sibling):Sc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Yi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Oc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(oo,oo.current),r)break;return null;case 22:return t.lanes=0,cc(e,t,n,t.pendingProps);case 24:Gi(t,ia,e.memoizedState.cache)}return kc(e,t,n)}function Mc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)rc=!0;else{if(!Ac(e,n)&&!(t.flags&128))return rc=!1,jc(e,t,n);rc=!!(e.flags&131072)}}else rc=!1,ji&&t.flags&1048576&&Ti(t,vi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ta(t.elementType),t.type=e,typeof e==`function`)ai(e)?(r=Ks(e,r),t.tag=1,t=_c(null,t,e,r,n)):(t.tag=0,t=hc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===C){t.tag=11,t=ac(null,t,e,r,n);break a}if(a===E){t.tag=14,t=oc(null,t,e,r,n);break a}}throw t=M(e)||e,Error(i(306,t,``))}}return t;case 0:return hc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ks(r,t.pendingProps),_c(e,t,r,a,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,za(e,t),Ka(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Gi(t,ia,r),r!==o.cache&&Ji(t,[ia],n,!0),Ga(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=vc(e,t,r,n);break a}if(r!==a){a=mi(Error(i(424)),t),Vi(a),t=vc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ai=vf(e.firstChild),ki=t,ji=!0,Mi=null,Ni=!0,n=Ia(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(zi(),r===a){t=kc(e,t,n);break a}ic(e,t,r,n)}t=t.child}return t;case 26:return mc(e,t),e===null?(n=zf(t.type,null,t.pendingProps,null))?t.memoizedState=n:ji||(n=t.type,e=t.pendingProps,r=Xd(R.current).createElement(n),r[it]=t,r[at]=e,Wd(r,n,e),_t(r),t.stateNode=r):t.memoizedState=zf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ue(t),e===null&&ji&&(r=t.stateNode=Sf(t.type,t.pendingProps,R.current),ki=t,Ni=!0,a=Ai,cf(t.type)?(yf=a,Ai=vf(r.firstChild)):Ai=a),ic(e,t,t.pendingProps.children,n),mc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ji&&((a=r=Ai)&&(r=ff(r,t.type,t.pendingProps,Ni),r===null?a=!1:(t.stateNode=r,ki=t,Ai=vf(r.firstChild),Ni=!1,a=!0)),a||Fi(t)),ue(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,$d(a,o)?r=null:s!==null&&$d(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=So(e,t,To,null,null,n),sp._currentValue=a),mc(e,t),ic(e,t,r,n),t.child;case 6:return e===null&&ji&&((e=n=Ai)&&(n=pf(n,t.pendingProps,Ni),n===null?e=!1:(t.stateNode=n,ki=t,Ai=null,e=!0)),e||Fi(t)),null;case 13:return Sc(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fa(t,null,r,n):ic(e,t,r,n),t.child;case 11:return ac(e,t,t.type,t.pendingProps,n);case 7:return ic(e,t,t.pendingProps,n),t.child;case 8:return ic(e,t,t.pendingProps.children,n),t.child;case 12:return ic(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Gi(t,t.type,r.value),ic(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Zi(t),a=Qi(a),r=r(a),t.flags|=1,ic(e,t,r,n),t.child;case 14:return oc(e,t,t.type,t.pendingProps,n);case 15:return sc(e,t,t.type,t.pendingProps,n);case 19:return Oc(e,t,n);case 31:return pc(e,t,n);case 22:return cc(e,t,n,t.pendingProps);case 24:return Zi(t),r=Qi(ia),e===null?(a=ga(),a===null&&(a=Hl,o=aa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ra(t),Gi(t,ia,a)):((e.lanes&n)!==0&&(za(e,t),Ka(t,null,null,n),Ga()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Gi(t,ia,r),r!==a.cache&&Ji(t,[ia],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Gi(t,ia,r))),ic(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Nc(e){e.flags|=4}function Pc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw Ea=Sa,ba}}else e.flags&=-16777217}function Fc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ep(t)){if(ju())e.flags|=8192;else throw Ea=Sa,ba}}function Ic(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ke(),e.lanes|=t,nu|=t)}function Lc(e,t){if(!ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Rc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zc(e,t,n){var r=t.pendingProps;switch(Di(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rc(t),null;case 1:return Rc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Ki(ia),le(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ri(t)?Nc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Bi())),Rc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Nc(t),o===null?(Rc(t),Pc(t,a,null,r,n)):(Rc(t),Fc(t,o))):o?o===e.memoizedState?(Rc(t),t.flags&=-16777217):(Nc(t),Rc(t),Fc(t,o)):(e=e.memoizedProps,e!==r&&Nc(t),Rc(t),Pc(t,a,e,r,n)),null;case 27:if(de(t),n=R.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}e=ae.current,Ri(t)?Ii(t,e):(e=Sf(a,r,n),t.stateNode=e,Nc(t))}return Rc(t),null;case 5:if(de(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Rc(t),null}if(o=ae.current,Ri(t))Ii(t,o);else{var s=Xd(R.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[it]=t,o[at]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=R.current,Ri(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[it]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Fi(t,!0)}else e=Xd(e).createTextNode(r),e[it]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ri(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ri(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[it]=t}else zi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=Bi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return le(),e===null&&jd(t.stateNode.containerInfo),Rc(t),null;case 10:return Ki(t.type),Rc(t),null;case 19:if(ie(oo),r=t.memoizedState,r===null)return Rc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)si(n,e),n=n.sibling;return L(oo,oo.current&1|2),ji&&wi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ce()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ji)return Rc(t),null}else 2*Ce()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ce(),e.sibling=null,n=oo.current,L(oo,a?n&1|2:n&1),ji&&wi(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ie(ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Ki(ia),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Di(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ki(ia),le(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));zi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ie(oo),null;case 4:return le(),null;case 10:return Ki(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&ie(ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ki(ia),null;case 25:return null;default:return null}}function Vc(e,t){switch(Di(t),t.tag){case 3:Ki(ia),le();break;case 26:case 27:case 5:de(t);break;case 4:le();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:ie(oo);break;case 10:Ki(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&ie(ha);break;case 24:Ki(ia)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Qu(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ja(t,n)}catch(t){Qu(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Qu(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Qu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[at]=t}catch(t){Qu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&cf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xt));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[it]=e,t[at]=n}catch(t){Qu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Jd=gp,e=Cr(e),wr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},gp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ks(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Qu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)df(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:df(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,al=e;break}al=t.return}}function sl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Hc(5,n);break;case 1:if(Sl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Qu(n,n.return,e)}else{var i=Ks(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Qu(n,n.return,e)}}}r&64&&Wc(n),r&512&&Kc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Ja(e,t)}catch(e){Qu(n,n.return,e)}}break;case 27:t===null&&r&4&&el(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Jc(n),r&512&&Kc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&pl(e,n);break;case 13:Sl(e,n),r&4&&ml(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=nd.bind(null,n),_f(e,n))));break;case 22:if(r=n.memoizedState!==null||tl,!r){t=t!==null&&t.memoizedState!==null||nl,i=tl;var a=nl;tl=r,(nl=t)&&!a?wl(e,n,!!(n.subtreeFlags&8772)):Sl(e,n),tl=i,nl=a}break;case 30:break;default:Sl(e,n)}}function cl(e){var t=e.alternate;t!==null&&(e.alternate=null,cl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ft(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ll=null,ul=!1;function dl(e,t,n){for(n=n.child;n!==null;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(Ne&&typeof Ne.onCommitFiberUnmount==`function`)try{Ne.onCommitFiberUnmount(Me,n)}catch{}switch(n.tag){case 26:nl||qc(n,t),dl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nl||qc(n,t);var r=ll,i=ul;cf(n.type)&&(ll=n.stateNode,ul=!1),dl(e,t,n),Cf(n.stateNode),ll=r,ul=i;break;case 5:nl||qc(n,t);case 6:if(r=ll,i=ul,ll=null,dl(e,t,n),ll=r,ul=i,ll!==null){if(ul)try{(ll.nodeType===9?ll.body:ll.nodeName===`HTML`?ll.ownerDocument.body:ll).removeChild(n.stateNode)}catch(e){Qu(n,t,e)}else try{ll.removeChild(n.stateNode)}catch(e){Qu(n,t,e)}}break;case 18:ll!==null&&(ul?(e=ll,lf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hp(e)):lf(ll,n.stateNode));break;case 4:r=ll,i=ul,ll=n.stateNode.containerInfo,ul=!0,dl(e,t,n),ll=r,ul=i;break;case 0:case 11:case 14:case 15:Uc(2,n,t),nl||Uc(4,n,t),dl(e,t,n);break;case 1:nl||(qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Gc(n,t,r)),dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:nl=(r=nl)||n.memoizedState!==null,dl(e,t,n),nl=r;break;default:dl(e,t,n)}}function pl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hp(e)}catch(e){Qu(t,t.return,e)}}}function ml(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hp(e)}catch(e){Qu(t,t.return,e)}}function hl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new il),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new il),t;default:throw Error(i(435,e.tag))}}function gl(e,t){var n=hl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=rd.bind(null,e,t);t.then(r,r)}})}function _l(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(cf(c.type)){ll=c.stateNode,ul=!1;break a}break;case 5:ll=c.stateNode,ul=!1;break a;case 3:case 4:ll=c.stateNode.containerInfo,ul=!0;break a}c=c.return}if(ll===null)throw Error(i(160));fl(o,s,a),ll=null,ul=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)yl(t,e),t=t.sibling}var vl=null;function yl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:_l(t,e),bl(e),r&4&&(Uc(3,e,e.return),Hc(3,e),Uc(5,e,e.return));break;case 1:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&64&&tl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=vl;if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[dt]||o[it]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Wd(o,r,n),o[it]=e,_t(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Zf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Wd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[it]=e,_t(o),r=o}e.stateNode=r}else Qf(a,e.type,e.stateNode)}else e.stateNode=Kf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&Yc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Qf(a,e.type,e.stateNode):Kf(a,r,e.memoizedProps))}break;case 27:_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),n!==null&&r&4&&Yc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(_l(t,e),bl(e),r&512&&(nl||n===null||qc(n,n.return)),e.flags&32){a=e.stateNode;try{Ht(a,``)}catch(t){Qu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Yc(e,a,n===null?a:n.memoizedProps)),r&1024&&(rl=!0);break;case 6:if(_l(t,e),bl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Qu(e,e.return,t)}}break;case 3:if(Xf=null,a=vl,vl=Ef(t.containerInfo),_l(t,e),vl=a,bl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Hp(t.containerInfo)}catch(t){Qu(e,e.return,t)}rl&&(rl=!1,xl(e));break;case 4:r=vl,vl=Ef(e.stateNode.containerInfo),_l(t,e),bl(e),vl=r;break;case 12:_l(t,e),bl(e);break;case 31:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 13:_l(t,e),bl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ou=Ce()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=tl,d=nl;if(tl=u||a,nl=d||l,_l(t,e),nl=d,tl=u,bl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||tl||nl||Cl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Qu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Qu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?uf(m,!0):uf(l.stateNode,!1)}catch(e){Qu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,gl(e,n))));break;case 19:_l(t,e),bl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gl(e,r)));break;case 30:break;case 21:break;default:_l(t,e),bl(e)}}function bl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Xc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;$c(e,Zc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Ht(o,``),n.flags&=-33),$c(e,Zc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Qc(e,Zc(e),s);break;default:throw Error(i(161))}}catch(t){Qu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)sl(e,t.alternate,t),t=t.sibling}function Cl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Uc(4,t,t.return),Cl(t);break;case 1:qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Gc(t,t.return,n),Cl(t);break;case 27:Cf(t.stateNode);case 26:case 5:qc(t,t.return),Cl(t);break;case 22:t.memoizedState===null&&Cl(t);break;case 30:Cl(t);break;default:Cl(t)}e=e.sibling}}function wl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:wl(i,a,n),Hc(4,a);break;case 1:if(wl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Qu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)qa(c[i],s)}catch(e){Qu(r,r.return,e)}}n&&o&64&&Wc(a),Kc(a,a.return);break;case 27:el(a);case 26:case 5:wl(i,a,n),n&&r===null&&o&4&&Jc(a),Kc(a,a.return);break;case 12:wl(i,a,n);break;case 31:wl(i,a,n),n&&o&4&&pl(i,a);break;case 13:wl(i,a,n),n&&o&4&&ml(i,a);break;case 22:a.memoizedState===null&&wl(i,a,n),Kc(a,a.return);break;case 30:break;default:wl(i,a,n)}t=t.sibling}}function Tl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&oa(n))}function El(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e))}function Dl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ol(e,t,n,r),t=t.sibling}function Ol(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Dl(e,t,n,r),i&2048&&Hc(9,t);break;case 1:Dl(e,t,n,r);break;case 3:Dl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&oa(e)));break;case 12:if(i&2048){Dl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Qu(t,t.return,e)}}else Dl(e,t,n,r);break;case 31:Dl(e,t,n,r);break;case 13:Dl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Dl(e,t,n,r):(a._visibility|=2,kl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Dl(e,t,n,r):Al(e,t),i&2048&&Tl(o,t);break;case 24:Dl(e,t,n,r),i&2048&&El(t.alternate,t);break;default:Dl(e,t,n,r)}}function kl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:kl(a,o,s,c,i),Hc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,kl(a,o,s,c,i)):u._visibility&2?kl(a,o,s,c,i):Al(a,o),i&&l&2048&&Tl(o.alternate,o);break;case 24:kl(a,o,s,c,i),i&&l&2048&&El(o.alternate,o);break;default:kl(a,o,s,c,i)}t=t.sibling}}function Al(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Al(n,r),i&2048&&Tl(r.alternate,r);break;case 24:Al(n,r),i&2048&&El(r.alternate,r);break;default:Al(n,r)}t=t.sibling}}var jl=8192;function Ml(e,t,n){if(e.subtreeFlags&jl)for(e=e.child;e!==null;)Nl(e,t,n),e=e.sibling}function Nl(e,t,n){switch(e.tag){case 26:Ml(e,t,n),e.flags&jl&&e.memoizedState!==null&&tp(n,vl,e.memoizedState,e.memoizedProps);break;case 5:Ml(e,t,n);break;case 3:case 4:var r=vl;vl=Ef(e.stateNode.containerInfo),Ml(e,t,n),vl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=jl,jl=16777216,Ml(e,t,n),jl=r):Ml(e,t,n));break;default:Ml(e,t,n)}}function Pl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Il(e),e=e.sibling}function Il(e){switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Uc(9,e,e.return);break;case 3:Fl(e);break;case 12:Fl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):Fl(e);break;default:Fl(e)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];al=r,Rl(r,e)}Pl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Uc(8,t,t.return),Ll(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Rl(e,t){for(;al!==null;){var n=al;switch(n.tag){case 0:case 11:case 15:Uc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:oa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,al=r;else a:for(n=e;al!==null;){r=al;var i=r.sibling,a=r.return;if(cl(r),r===n){al=null;break a}if(i!==null){i.return=a,al=i;break a}al=a}}}var zl={getCacheForType:function(e){var t=Qi(ia),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Qi(ia).controller.signal}},Bl=typeof WeakMap==`function`?WeakMap:Map,Vl=0,Hl=null,Ul=null,Wl=0,Gl=0,Kl=null,ql=!1,Jl=!1,Yl=!1,Xl=0,Zl=0,Ql=0,$l=0,eu=0,tu=0,nu=0,ru=null,iu=null,au=!1,ou=0,su=0,cu=1/0,lu=null,uu=null,du=0,fu=null,pu=null,mu=0,hu=0,gu=null,_u=null,vu=0,yu=null;function bu(){return Vl&2&&Wl!==0?Wl&-Wl:P.T===null?tt():yd()}function xu(){if(tu===0){if(!(Wl&536870912)||ji){var e=Be;Be<<=1,!(Be&3932160)&&(Be=262144),tu=e}else tu=536870912}return e=$a.current,e!==null&&(e.flags|=32),tu}function Su(e,t,n){(e===Hl&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)&&(ku(e,0),Eu(e,Wl,tu,!1)),Je(e,n),(!(Vl&2)||e!==Hl)&&(e===Hl&&(!(Vl&2)&&($l|=n),Zl===4&&Eu(e,Wl,tu,!1)),dd(e))}function Cu(e,t,n){if(Vl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||We(e,t),a=r?Lu(e,t):Fu(e,t,!0),o=r;do{if(a===0){Jl&&!r&&Eu(e,t,0,!1);break}if(n=e.current.alternate,o&&!Tu(n)){a=Fu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=ru;var l=c.current.memoizedState.isDehydrated;if(l&&(ku(c,s).flags|=256),s=Fu(c,s,!1),s!==2){if(Yl&&!l){c.errorRecoveryDisabledLanes|=o,$l|=o,a=4;break a}o=iu,iu=a,o!==null&&(iu===null?iu=o:iu.push.apply(iu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){ku(e,0),Eu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Eu(r,t,tu,!ql);break a;case 2:iu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=ou+300-Ce(),10<a)){if(Eu(r,t,tu,!ql),Ue(r,0,!0)!==0)break a;mu=t,r.timeoutHandle=nf(wu.bind(null,r,n,iu,lu,au,t,tu,$l,nu,ql,o,`Throttled`,-0,0),a);break a}wu(r,n,iu,lu,au,t,tu,$l,nu,ql,o,null,-0,0)}break}while(1);dd(e)}function wu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xt},Nl(t,a,d);var m=(a&62914560)===a?ou-Ce():(a&4194048)===a?su-Ce():0;if(m=rp(d,m),m!==null){mu=a,e.cancelPendingCommit=m(Wu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Eu(e,a,o,!l);return}}Wu(e,t,a,n,r,i,o,s,c)}function Tu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!vr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Eu(e,t,n,r){t&=~eu,t&=~$l,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Fe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Xe(e,n,t)}function Du(){return Vl&6?!0:(fd(0,!1),!1)}function Ou(){if(Ul!==null){if(Gl===0)var e=Ul.return;else e=Ul,Wi=Ui=null,Oo(e),ka=null,Aa=0,e=Ul;for(;e!==null;)Vc(e.alternate,e),e=e.return;Ul=null}}function ku(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),mu=0,Ou(),Hl=e,Ul=n=oi(e.current,null),Wl=t,Gl=0,Kl=null,ql=!1,Jl=We(e,t),Yl=!1,nu=tu=eu=$l=Ql=Zl=0,iu=ru=null,au=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Fe(r),a=1<<i;t|=e[i],r&=~a}return Xl=t,Xr(),n}function Au(e,t){lo=null,P.H=Rs,t===ya||t===xa?(t=Da(),Gl=3):t===ba?(t=Da(),Gl=4):Gl=t===nc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Kl=t,Ul===null&&(Zl=1,Xs(e,mi(t,e.current)))}function ju(){var e=$a.current;return e===null?!0:(Wl&4194048)===Wl?eo===null:(Wl&62914560)===Wl||Wl&536870912?e===eo:!1}function Mu(){var e=P.H;return P.H=Rs,e===null?Rs:e}function Nu(){var e=P.A;return P.A=zl,e}function Pu(){Zl=4,ql||(Wl&4194048)!==Wl&&$a.current!==null||(Jl=!0),!(Ql&134217727)&&!($l&134217727)||Hl===null||Eu(Hl,Wl,tu,!1)}function Fu(e,t,n){var r=Vl;Vl|=2;var i=Mu(),a=Nu();(Hl!==e||Wl!==t)&&(lu=null,ku(e,t)),t=!1;var o=Zl;a:do try{if(Gl!==0&&Ul!==null){var s=Ul,c=Kl;switch(Gl){case 8:Ou(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=Gl;if(Gl=0,Kl=null,Vu(e,s,c,l),n&&Jl){o=0;break a}break;default:l=Gl,Gl=0,Kl=null,Vu(e,s,c,l)}}Iu(),o=Zl;break}catch(t){Au(e,t)}while(1);return t&&e.shellSuspendCounter++,Wi=Ui=null,Vl=r,P.H=i,P.A=a,Ul===null&&(Hl=null,Wl=0,Xr()),o}function Iu(){for(;Ul!==null;)zu(Ul)}function Lu(e,t){var n=Vl;Vl|=2;var r=Mu(),a=Nu();Hl!==e||Wl!==t?(lu=null,cu=Ce()+500,ku(e,t)):Jl=We(e,t);a:do try{if(Gl!==0&&Ul!==null){t=Ul;var o=Kl;b:switch(Gl){case 1:Gl=0,Kl=null,Vu(e,t,o,1);break;case 2:case 9:if(Ca(o)){Gl=0,Kl=null,Bu(t);break}t=function(){Gl!==2&&Gl!==9||Hl!==e||(Gl=7),dd(e)},o.then(t,t);break a;case 3:Gl=7;break a;case 4:Gl=5;break a;case 7:Ca(o)?(Gl=0,Kl=null,Bu(t)):(Gl=0,Kl=null,Vu(e,t,o,7));break;case 5:var s=null;switch(Ul.tag){case 26:s=Ul.memoizedState;case 5:case 27:var c=Ul;if(s?ep(s):c.stateNode.complete){Gl=0,Kl=null;var l=c.sibling;if(l!==null)Ul=l;else{var u=c.return;u===null?Ul=null:(Ul=u,Hu(u))}break b}}Gl=0,Kl=null,Vu(e,t,o,5);break;case 6:Gl=0,Kl=null,Vu(e,t,o,6);break;case 8:Ou(),Zl=6;break a;default:throw Error(i(462))}}Ru();break}catch(t){Au(e,t)}while(1);return Wi=Ui=null,P.H=r,P.A=a,Vl=n,Ul===null?(Hl=null,Wl=0,Xr(),Zl):0}function Ru(){for(;Ul!==null&&!Se();)zu(Ul)}function zu(e){var t=Mc(e.alternate,e,Xl);e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Bu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gc(n,t,t.pendingProps,t.type,void 0,Wl);break;case 11:t=gc(n,t,t.pendingProps,t.type.render,t.ref,Wl);break;case 5:Oo(t);default:Vc(n,t),t=Ul=si(t,Xl),t=Mc(n,t,Xl)}e.memoizedProps=e.pendingProps,t===null?Hu(e):Ul=t}function Vu(e,t,n,r){Wi=Ui=null,Oo(t),ka=null,Aa=0;var i=t.return;try{if(tc(e,i,t,n,Wl)){Zl=1,Xs(e,mi(n,e.current)),Ul=null;return}}catch(t){if(i!==null)throw Ul=i,t;Zl=1,Xs(e,mi(n,e.current)),Ul=null;return}t.flags&32768?(ji||r===1?e=!0:Jl||Wl&536870912?e=!1:(ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Uu(t,e)):Hu(t)}function Hu(e){var t=e;do{if(t.flags&32768){Uu(t,ql);return}e=t.return;var n=zc(t.alternate,t,Xl);if(n!==null){Ul=n;return}if(t=t.sibling,t!==null){Ul=t;return}Ul=t=e}while(t!==null);Zl===0&&(Zl=5)}function Uu(e,t){do{var n=Bc(e.alternate,e);if(n!==null){n.flags&=32767,Ul=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ul=e;return}Ul=e=n}while(e!==null);Zl=6,Ul=null}function Wu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Yu();while(du!==0);if(Vl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Yr,Ye(e,n,o,s,c,l),e===Hl&&(Ul=Hl=null,Wl=0),pu=t,fu=e,mu=n,hu=o,gu=a,_u=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,id(De,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=te.p,te.p=2,s=Vl,Vl|=4;try{ol(e,t,n)}finally{Vl=s,te.p=a,P.T=r}}du=1,Gu(),Ku(),qu()}}function Gu(){if(du===1){du=0;var e=fu,t=pu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=te.p;te.p=2;var i=Vl;Vl|=4;try{yl(t,e);var a=Yd,o=Cr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Sr(s.ownerDocument.documentElement,s)){if(c!==null&&wr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=xr(s,h),v=xr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gp=!!Jd,Yd=Jd=null}finally{Vl=i,te.p=r,P.T=n}}e.current=t,du=2}}function Ku(){if(du===2){du=0;var e=fu,t=pu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=te.p;te.p=2;var i=Vl;Vl|=4;try{sl(e,t.alternate,t)}finally{Vl=i,te.p=r,P.T=n}}du=3}}function qu(){if(du===4||du===3){du=0,z();var e=fu,t=pu,n=mu,r=_u;t.subtreeFlags&10256||t.flags&10256?du=5:(du=0,pu=fu=null,Ju(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(uu=null),et(n),t=t.stateNode,Ne&&typeof Ne.onCommitFiberRoot==`function`)try{Ne.onCommitFiberRoot(Me,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=te.p,te.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,te.p=i}}mu&3&&Yu(),dd(e),i=e.pendingLanes,n&261930&&i&42?e===yu?vu++:(vu=0,yu=e):vu=0,fd(0,!1)}}function Ju(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oa(t)))}function Yu(){return Gu(),Ku(),qu(),Xu()}function Xu(){if(du!==5)return!1;var e=fu,t=hu;hu=0;var n=et(mu),r=P.T,a=te.p;try{te.p=32>n?32:n,P.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,fd(0,!1),Ne&&typeof Ne.onPostCommitFiberRoot==`function`)try{Ne.onPostCommitFiberRoot(Me,o)}catch{}return!0}finally{te.p=a,P.T=r,Ju(e,t)}}function Zu(e,t,n){t=mi(n,t),t=Qs(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Je(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=mi(n,e),n=$s(2),r=Va(t,n,2),r!==null&&(ec(n,r,t,e),Je(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>Ce()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=Ke()),e=$r(e,t),e!==null&&(Je(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return be(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Fe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=Wl,a=Ue(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||We(r,a)||(n=!0,_d(r,a))}r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&tf()&&(e=ud);for(var t=Ce(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Fe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ge(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Hl,n=Wl,n=Ue(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Gl===2||Gl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&xe(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||We(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&xe(r),et(n)){case 2:case 8:n=Ee;break;case 32:n=De;break;case 268435456:n=ke;break;default:n=De}return r=gd.bind(null,e),n=be(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&xe(r),e.callbackPriority=2,e.callbackNode=null,2}function gd(e,t){if(du!==0&&du!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=Wl;return r=Ue(e,e===Hl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Cu(e,r,t),hd(e,Ce()),e.callbackNode!=null&&e.callbackNode===n?gd.bind(null,e):null)}function _d(e,t){if(Yu())return null;Cu(e,t,!0)}function vd(){of(function(){Vl&6?be(Te,pd):md()})}function yd(){if(ud===0){var e=la;e===0&&(e=ze,ze<<=1,!(ze&261888)&&(ze=256)),ud=e}return ud}function bd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Yt(``+e)}function xd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Sd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=bd((i[at]||null).action),o=r.submitter;o&&(t=(t=o[at]||null)?bd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new vn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ud!==0){var e=o?xd(i,o):new FormData(i);ws(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?xd(i,o):new FormData(i),ws(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Cd=0;Cd<Wr.length;Cd++){var wd=Wr[Cd];Gr(wd.toLowerCase(),`on`+(wd[0].toUpperCase()+wd.slice(1)))}Gr(Ir,`onAnimationEnd`),Gr(Lr,`onAnimationIteration`),Gr(Rr,`onAnimationStart`),Gr(`dblclick`,`onDoubleClick`),Gr(`focusin`,`onFocus`),Gr(`focusout`,`onBlur`),Gr(zr,`onTransitionRun`),Gr(Br,`onTransitionStart`),Gr(Vr,`onTransitionCancel`),Gr(Hr,`onTransitionEnd`),xt(`onMouseEnter`,[`mouseout`,`mouseover`]),xt(`onMouseLeave`,[`mouseout`,`mouseover`]),xt(`onPointerEnter`,[`pointerout`,`pointerover`]),xt(`onPointerLeave`,[`pointerout`,`pointerover`]),bt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),bt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),bt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),bt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),bt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Td=`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(` `),Ed=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Td));function Dd(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Kr(e)}i.currentTarget=null,a=c}}}}function Od(e,t){var n=t[st];n===void 0&&(n=t[st]=new Set);var r=e+`__bubble`;n.has(r)||(Md(t,e,2,!1),n.add(r))}function kd(e,t,n){var r=0;t&&(r|=4),Md(n,e,r,t)}var Ad=`_reactListening`+Math.random().toString(36).slice(2);function jd(e){if(!e[Ad]){e[Ad]=!0,vt.forEach(function(t){t!==`selectionchange`&&(Ed.has(t)||kd(t,!1,e),kd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ad]||(t[Ad]=!0,kd(`selectionchange`,!1,t))}}function Md(e,t,n,r){switch(Cp(t)){case 2:var i=_p;break;case 8:i=vp;break;default:i=yp}n=i.bind(null,t,n,e),i=void 0,!sn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Nd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=pt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}rn(function(){var r=a,i=Qt(n),o=[];a:{var c=Ur.get(e);if(c!==void 0){var l=vn,u=e;switch(e){case`keypress`:if(pn(n)===0)break a;case`keydown`:case`keyup`:l=In;break;case`focusin`:u=`focus`,l=Dn;break;case`focusout`:u=`blur`,l=Dn;break;case`beforeblur`:case`afterblur`:l=Dn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Tn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=En;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Rn;break;case Ir:case Lr:case Rr:l=On;break;case Hr:l=zn;break;case`scroll`:case`scrollend`:l=bn;break;case`wheel`:l=Bn;break;case`copy`:case`cut`:case`paste`:l=kn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Ln;break;case`toggle`:case`beforetoggle`:l=Vn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=an(m,p),g!=null&&d.push(Pd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==Zt&&(u=n.relatedTarget||n.fromElement)&&(pt(u)||u[ot]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?pt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Tn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Ln,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ht(l),h=u==null?c:ht(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,pt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Id,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Ld(o,c,l,d,!1),u!==null&&f!==null&&Ld(o,f,u,d,!0)}}a:{if(c=r?ht(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=or;else if(er(c)){if(sr)v=gr;else{v=mr;var y=pr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Kt(r.elementType)&&(v=or):v=hr;if(v&&=v(e,r)){tr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Rt(c,`number`,c.value)}switch(y=r?ht(r):window,e){case`focusin`:(er(y)||y.contentEditable===`true`)&&(Er=y,Dr=r,Or=null);break;case`focusout`:Or=Dr=Er=null;break;case`mousedown`:kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:kr=!1,Ar(o,n,i);break;case`selectionchange`:if(Tr)break;case`keydown`:case`keyup`:Ar(o,n,i)}var b;if(V)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Xn?Jn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Gn&&n.locale!==`ko`&&(Xn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Xn&&(b=fn()):(ln=i,un=`value`in ln?ln.value:ln.textContent,Xn=!0)),y=Fd(r,x),0<y.length&&(x=new An(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Yn(n),b!==null&&(x.data=b)))),(b=Wn?Zn(e,n):Qn(e,n))&&(x=Fd(r,`onBeforeInput`),0<x.length&&(y=new An(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),Sd(o,e,r,n,i)}Dd(o,t)})}function Pd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=an(e,n),i!=null&&r.unshift(Pd(e,i,a)),i=an(e,t),i!=null&&r.push(Pd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Id(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=an(n,a),l!=null&&o.unshift(Pd(n,l,c))):i||(l=an(n,a),l!=null&&o.push(Pd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Rd=/\r\n?/g,zd=/\u0000|\uFFFD/g;function Bd(e){return(typeof e==`string`?e:``+e).replace(Rd,`
10
- `).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ht(e,``+r);break;case`className`:Et(e,`class`,r);break;case`tabIndex`:Et(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Et(e,n,r);break;case`style`:Gt(e,r,o);break;case`data`:if(t!==`object`){Et(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Yt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Yt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Od(`beforetoggle`,e),Od(`toggle`,e),Tt(e,`popover`,r);break;case`xlinkActuate`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Dt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Dt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Tt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=qt.get(n)||n,Tt(e,n,r))}}function Ud(e,t,n,r,a,o){switch(n){case`style`:Gt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ht(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ht(e,``+r);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Xt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!yt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[at]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Tt(e,n,r)}}}function Wd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Od(`error`,e),Od(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,o,s,n,null)}}a&&Hd(e,t,`srcSet`,n.srcSet,n,null),r&&Hd(e,t,`src`,n.src,n,null);return;case`input`:Od(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Hd(e,t,r,d,n,null)}}Lt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Od(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Hd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&zt(e,!!r,n,!0):zt(e,!!r,t,!1);return;case`textarea`:for(s in Od(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Hd(e,t,s,c,n,null)}Vt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Hd(e,t,l,r,n,null)}return;case`dialog`:Od(`beforetoggle`,e),Od(`toggle`,e),Od(`cancel`,e),Od(`close`,e);break;case`iframe`:case`object`:Od(`load`,e);break;case`video`:case`audio`:for(r=0;r<Td.length;r++)Od(Td[r],e);break;case`image`:Od(`error`,e),Od(`load`,e);break;case`details`:Od(`toggle`,e);break;case`embed`:case`source`:case`link`:Od(`error`,e),Od(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Hd(e,t,u,r,n,null)}return;default:if(Kt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Ud(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Hd(e,t,c,r,n,null))}function Gd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Hd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Hd(e,t,p,m,r,f)}}It(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Hd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Hd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?zt(e,!!n,n?[]:``,!1):zt(e,!!n,t,!0)):zt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Hd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Hd(e,t,s,a,r,o)}Bt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Hd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Hd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Hd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Hd(e,t,u,p,r,m)}return;default:if(Kt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Ud(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Ud(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Hd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Hd(e,t,f,p,r,m)}function Kd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function qd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Kd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Kd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Jd=null,Yd=null;function Xd(e){return e.nodeType===9?e:e.ownerDocument}function Zd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function $d(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ef=null;function tf(){var e=window.event;return e&&e.type===`popstate`?e!==ef&&(ef=e,!0):(ef=null,!1)}var nf=typeof setTimeout==`function`?setTimeout:void 0,rf=typeof clearTimeout==`function`?clearTimeout:void 0,af=typeof Promise==`function`?Promise:void 0,of=typeof queueMicrotask==`function`?queueMicrotask:af===void 0?nf:function(e){return af.resolve(null).then(e).catch(sf)};function sf(e){setTimeout(function(){throw e})}function cf(e){return e===`head`}function lf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Cf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Cf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[dt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Cf(e.ownerDocument.body)}n=i}while(n);Hp(t)}function uf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function df(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:df(n),ft(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function ff(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[dt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=vf(e.nextSibling),e===null)break}return null}function pf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=vf(e.nextSibling),e===null))return null;return e}function mf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=vf(e.nextSibling),e===null))return null;return e}function hf(e){return e.data===`$?`||e.data===`$~`}function gf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function _f(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function vf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var yf=null;function bf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return vf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function xf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Sf(e,t,n){switch(t=Xd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Cf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ft(e)}var wf=new Map,Tf=new Set;function Ef(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Df=te.d;te.d={f:Of,r:kf,D:Mf,C:Nf,L:Pf,m:Ff,X:Lf,S:If,M:Rf};function Of(){var e=Df.f(),t=Du();return e||t}function kf(e){var t=mt(e);t!==null&&t.tag===5&&t.type===`form`?Es(t):Df.r(e)}var Af=typeof document>`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ft(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ft(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ft(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ft(n.imageSizes)+`"]`)):i+=`[href="`+Ft(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),_t(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ft(r)+`"][href="`+Ft(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),_t(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=gt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);_t(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=gt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=p({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),_t(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=gt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),_t(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=R.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=gt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=gt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=gt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ft(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),_t(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ft(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ft(n.href)+`"]`);if(r)return t.instance=r,_t(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),_t(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,_t(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),_t(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,_t(a),a):(r=n,(a=wf.get(o))&&(r=p({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),_t(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Jf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Yf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Xf=null;function Zf(e,t,n){if(Xf===null){var r=new Map,i=Xf=new Map;i.set(n,r)}else i=Xf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[dt]||a[it]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),_t(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&U(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&U(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&np===0&&(np=62500*qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&U(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)U(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function U(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(op,e),ap=null,ip.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ip.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sp={$$typeof:S,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function cp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qe(0),this.hiddenUpdates=qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new cp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ii(3,null,null,t),e.current=a,a.stateNode=e,t=aa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ra(a),e}function up(e){return e?(e=ni,e):ni}function dp(e,t,n,r,i,a){i=up(i),r.context===null?r.context=i:r.pendingContext=i,r=Ba(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Va(e,r,t),n!==null&&(Su(n,e,t),Ha(n,e,t))}function fp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pp(e,t){fp(e,t),(e=e.alternate)&&fp(e,t)}function mp(e){if(e.tag===13||e.tag===31){var t=$r(e,67108864);t!==null&&Su(t,e,67108864),pp(e,67108864)}}function hp(e){if(e.tag===13||e.tag===31){var t=bu();t=$e(t);var n=$r(e,t);n!==null&&Su(n,e,t),pp(e,t)}}var gp=!0;function _p(e,t,n,r){var i=P.T;P.T=null;var a=te.p;try{te.p=2,yp(e,t,n,r)}finally{te.p=a,P.T=i}}function vp(e,t,n,r){var i=P.T;P.T=null;var a=te.p;try{te.p=8,yp(e,t,n,r)}finally{te.p=a,P.T=i}}function yp(e,t,n,r){if(gp){var i=bp(r);if(i===null)Nd(e,t,r,xp,n),Mp(e,r);else if(Pp(i,e,t,n,r))r.stopPropagation();else if(Mp(e,r),t&4&&-1<jp.indexOf(e)){for(;i!==null;){var a=mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=He(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Fe(o);s.entanglements[1]|=c,o&=~c}dd(a),!(Vl&6)&&(cu=Ce()+500,fd(0,!1))}}break;case 31:case 13:s=$r(a,2),s!==null&&Su(s,a,2),Du(),pp(a,2)}if(a=bp(r),a===null&&Nd(e,t,r,xp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Nd(e,t,r,null,n)}}function bp(e){return e=Qt(e),Sp(e)}var xp=null;function Sp(e){if(xp=null,e=pt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xp=e,null}function Cp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(we()){case Te:return 2;case Ee:return 8;case De:case Oe:return 32;case ke:return 268435456;default:return 32}default:return 32}}var wp=!1,Tp=null,Ep=null,Dp=null,Op=new Map,kp=new Map,Ap=[],jp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mp(e,t){switch(e){case`focusin`:case`focusout`:Tp=null;break;case`dragenter`:case`dragleave`:Ep=null;break;case`mouseover`:case`mouseout`:Dp=null;break;case`pointerover`:case`pointerout`:Op.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kp.delete(t.pointerId)}}function Np(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=mt(t),t!==null&&mp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Pp(e,t,n,r,i){switch(t){case`focusin`:return Tp=Np(Tp,e,t,n,r,i),!0;case`dragenter`:return Ep=Np(Ep,e,t,n,r,i),!0;case`mouseover`:return Dp=Np(Dp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Op.set(a,Np(Op.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kp.set(a,Np(kp.get(a)||null,e,t,n,r,i)),!0}return!1}function Fp(e){var t=pt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,nt(e.priority,function(){hp(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,nt(e.priority,function(){hp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ip(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zt=r,n.target.dispatchEvent(r),Zt=null}else return t=mt(n),t!==null&&mp(t),e.blockedOn=n,!1;t.shift()}return!0}function Lp(e,t,n){Ip(e)&&n.delete(t)}function Rp(){wp=!1,Tp!==null&&Ip(Tp)&&(Tp=null),Ep!==null&&Ip(Ep)&&(Ep=null),Dp!==null&&Ip(Dp)&&(Dp=null),Op.forEach(Lp),kp.forEach(Lp)}function zp(e,n){e.blockedOn===n&&(e.blockedOn=null,wp||(wp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rp)))}var Bp=null;function Vp(e){Bp!==e&&(Bp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bp===e&&(Bp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sp(r||n)===null)continue;break}var a=mt(n);a!==null&&(e.splice(t,3),t-=3,ws(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hp(e){function t(t){return zp(t,e)}Tp!==null&&zp(Tp,e),Ep!==null&&zp(Ep,e),Dp!==null&&zp(Dp,e),Op.forEach(t),kp.forEach(t);for(var n=0;n<Ap.length;n++){var r=Ap[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ap.length&&(n=Ap[0],n.blockedOn===null);)Fp(n),n.blockedOn===null&&Ap.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[at]||null;if(typeof a==`function`)o||Vp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[at]||null)s=o.formAction;else if(Sp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vp(n)}}}function Up(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wp(e){this._internalRoot=e}Gp.prototype.render=Wp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dp(n,bu(),e,t,null,null)},Gp.prototype.unmount=Wp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dp(e.current,2,null,e,null,null),Du(),t[ot]=null}};function Gp(e){this._internalRoot=e}Gp.prototype.unstable_scheduleHydration=function(e){if(e){var t=tt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ap.length&&t!==0&&t<Ap[n].priority;n++);Ap.splice(n,0,e),n===0&&Fp(e)}};var Kp=n.version;if(Kp!==`19.2.8`)throw Error(i(527,Kp,`19.2.8`));te.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var qp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jp.isDisabled&&Jp.supportsFiber)try{Me=Jp.inject(qp),Ne=Jp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=qs,s=Js,c=Ys;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lp(e,1,!1,null,null,n,r,null,o,s,c,Up),e[ot]=t.current,jd(e),new Wp(t)}})),Hn=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Vn()})),V=e(_(),1),Un=Hn(),Wn=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Gn=/^[\\/]{2}/;function Kn(e,t){return t+e.replace(/\\/g,`/`)}var qn=`popstate`;function Jn(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function Yn(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return er(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:tr(t)}return rr(t,n,null,e)}function Xn(e,t){if(e===!1||e==null)throw Error(t)}function Zn(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Qn(){return Math.random().toString(36).substring(2,10)}function $n(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function er(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?nr(t):t,state:n,key:t&&t.key||r||Qn(),mask:i}}function tr({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function nr(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function rr(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Jn(e)?e:er(h.location,e,t);n&&n(r,e),l=u()+1;let d=$n(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Jn(e)?e:er(h.location,e,t);n&&n(r,e),l=u();let i=$n(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ir(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(qn,d),c=e,()=>{i.removeEventListener(qn,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ir(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),Xn(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:tr(t);return i=i.replace(/ $/,`%20`),!n&&Gn.test(i)&&(i=r+i),new URL(i,r)}function ar(e,t,n=`/`){return or(e,t,n,!1)}function or(e,t,n,r,i){let a=Dr((typeof t==`string`?nr(t):t).pathname||`/`,n);if(a==null)return null;let o=i??sr(e),s=null,c=Er(a);for(let e=0;s==null&&e<o.length;++e)s=Sr(o[e],c,r);return s}function sr(e){let t=cr(e);return ur(t),t}function cr(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;Xn(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Fr([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(Xn(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),cr(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:br(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Tr(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of lr(e.path))a(e,t,!0,n)}),t}function lr(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=lr(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function ur(e){e.sort((e,t)=>e.score===t.score?xr(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var dr=/^:[\w-]+$/,fr=/^:[\w-]+/,pr=3.5,mr=3,hr=2,gr=1,_r=10,vr=-2,yr=e=>e===`*`;function br(e,t){let n=e.split(`/`),r=n.length;return n.some(yr)&&(r+=vr),t&&(r+=hr),n.filter(e=>!yr(e)).reduce((e,t)=>e+(dr.test(t)?mr:fr.test(t)?pr:t===``?gr:_r),r)}function xr(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Sr(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?wr(u,l,s.matcher,s.compiledParams):Cr(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Cr({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Fr([a,d.pathname]),pathnameBase:Lr(Fr([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Fr([a,d.pathnameBase]))}return o}function Cr(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Tr(e.path,e.caseSensitive,e.end);return wr(e,t,n,r)}function wr(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=Ir(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=Ir(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Tr(e,t=!1,n=!0){Zn(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Er(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Zn(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Dr(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Or(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?nr(e):e,a;return n?(n=Pr(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?kr(n.substring(1),`/`):kr(n,t)):a=t,{pathname:a,search:Rr(r),hash:zr(i)}}function kr(e,t){let n=Ir(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Ar(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function jr(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Mr(e){let t=jr(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Nr(e,t,n,r=!1){let i;typeof e==`string`?i=nr(e):(i={...e},Xn(!i.pathname||!i.pathname.includes(`?`),Ar(`?`,`pathname`,`search`,i)),Xn(!i.pathname||!i.pathname.includes(`#`),Ar(`#`,`pathname`,`hash`,i)),Xn(!i.search||!i.search.includes(`#`),Ar(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Or(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Pr=e=>e.replace(/[\\/]{2,}/g,`/`),Fr=e=>Pr(e.join(`/`));function Ir(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var Lr=e=>Ir(e).replace(/^\/*/,`/`),Rr=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,zr=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Br=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Vr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Hr(e){return Fr(e.map(e=>e.route.path).filter(Boolean))||`/`}var Ur=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Wr(e,t){let n=e;if(typeof n!=`string`||!Wn.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ur)try{let e=new URL(window.location.href),r=Gn.test(n)?new URL(Kn(n,e.protocol)):new URL(n),a=Dr(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{Zn(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Gr=new URL(`http://localhost`);function Kr(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Gr)}catch{return Gr}}function qr(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Jr(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Yr(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!qr(i,n),s=!qr(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Jr(e,i)||!qr(i,a)))throw Error(`External navigation is not allowed`)}var Xr=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Xr);var Zr=[`GET`,...Xr];new Set(Zr);var Qr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function $r(e){try{return Qr.includes(new URL(e).protocol)}catch{return!1}}var ei=V.createContext(null);ei.displayName=`DataRouter`;var ti=V.createContext(null);ti.displayName=`DataRouterState`;var ni=V.createContext(!1);function ri(){return V.useContext(ni)}var ii=V.createContext({isTransitioning:!1});ii.displayName=`ViewTransition`;var ai=V.createContext(new Map);ai.displayName=`Fetchers`;var oi=V.createContext(null);oi.displayName=`Await`;var si=V.createContext(null);si.displayName=`Navigation`;var ci=V.createContext(null);ci.displayName=`Location`;var li=V.createContext({outlet:null,matches:[],isDataRoute:!1});li.displayName=`Route`;var ui=V.createContext(null);ui.displayName=`RouteError`;var di=`REACT_ROUTER_ERROR`,fi=`REDIRECT`,pi=`ROUTE_ERROR_RESPONSE`;function mi(e){if(e.startsWith(`${di}:${fi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function hi(e){if(e.startsWith(`${di}:${pi}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Br(t.status,t.statusText,t.data)}catch{}}function gi(e,{relative:t}={}){Xn(_i(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=V.useContext(si),{hash:i,pathname:a,search:o}=Ci(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:Fr([n,a])),r.createHref({pathname:s,search:o,hash:i})}function _i(){return V.useContext(ci)!=null}function vi(){return Xn(_i(),`useLocation() may be used only in the context of a <Router> component.`),V.useContext(ci).location}var yi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function bi(){let{isDataRoute:e}=V.useContext(li);return e?Bi():xi()}function xi(){Xn(_i(),`useNavigate() may be used only in the context of a <Router> component.`);let e=V.useContext(ei),{basename:t,navigator:n}=V.useContext(si),{matches:r}=V.useContext(li),{pathname:i}=vi(),a=JSON.stringify(Mr(r)),o=V.useRef(!1);return V.useLayoutEffect(()=>{o.current=!0}),V.useCallback((r,s={})=>{if(Zn(o.current,yi),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Nr(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Fr([t,c.pathname])),Yr(typeof r==`string`?r:tr(r),n.createHref(c),Kr(n),`reject`),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}V.createContext(null);function Si(){let{matches:e}=V.useContext(li);return e[e.length-1]?.params??{}}function Ci(e,{relative:t}={}){let{matches:n}=V.useContext(li),{pathname:r}=vi(),i=JSON.stringify(Mr(n));return V.useMemo(()=>Nr(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function wi(e,t){return Ti(e,t)}function Ti(e,t,n){Xn(_i(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=V.useContext(si),{matches:i}=V.useContext(li),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=vi(),l;if(t){let e=typeof t==`string`?nr(t):t;Xn(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):ar(e,{pathname:d}),p=Mi(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:Fr([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:Fr([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?V.createElement(ci.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function Ei(){let e=zi(),t=Vr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return V.createElement(V.Fragment,null,V.createElement(`h2`,null,`Unexpected Application Error!`),V.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?V.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Di=V.createElement(Ei,null),Oi=class extends V.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=ni;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=hi(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:V.createElement(li.Provider,{value:this.props.routeContext},V.createElement(ui.Provider,{value:e,children:this.props.component}));return this.context?V.createElement(Ai,{error:e},t):t}},ki=new WeakMap;function Ai({children:e,error:t}){let{basename:n,navigator:r}=V.useContext(si);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=mi(t.digest);if(e){let i=ki.get(t);if(i)throw i;let a=Wr(e.location,n),o=a.absoluteURL||a.to;if(Yr(e.location,o,Kr(r),`allow-explicit`),$r(o))throw Error(`Invalid redirect location`);if(Ur&&!ki.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=o;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw ki.set(t,n),n}}return V.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${o}`})}}return e}function ji({routeContext:e,match:t,children:n}){let r=V.useContext(ei);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),V.createElement(li.Provider,{value:e},n)}function Mi(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);Xn(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Hr(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Di,o&&(s<0&&c===0?(Hi(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?V.createElement(n.route.Component,null):n.route.element?n.route.element:e,V.createElement(ji,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?V.createElement(Oi,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function Ni(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pi(e){let t=V.useContext(ei);return Xn(t,Ni(e)),t}function Fi(e){let t=V.useContext(ti);return Xn(t,Ni(e)),t}function Ii(e){let t=V.useContext(li);return Xn(t,Ni(e)),t}function Li(e){let t=Ii(e),n=t.matches[t.matches.length-1];return Xn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Ri(){return Li(`useRouteId`)}function zi(){let e=V.useContext(ui),t=Fi(`useRouteError`),n=Li(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Bi(){let{router:e}=Pi(`useNavigate`),t=Li(`useNavigate`),n=V.useRef(!1);return V.useLayoutEffect(()=>{n.current=!0}),V.useCallback(async(r,i={})=>{Zn(n.current,yi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Vi={};function Hi(e,t,n){!t&&!Vi[e]&&(Vi[e]=!0,Zn(!1,n))}V.memo(Ui);function Ui({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ti(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Wi({to:e,replace:t,state:n,relative:r}){Xn(_i(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=V.useContext(si);Zn(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:o}=V.useContext(li),{pathname:s}=vi(),c=bi(),l=Nr(e,Mr(o),s,r===`path`);Yr(typeof e==`string`?e:tr(e),a.createHref(l),Kr(a),`reject`);let u=JSON.stringify(l);return V.useEffect(()=>{c(JSON.parse(u),{replace:t,state:n,relative:r})},[c,u,r,t,n]),null}function Gi({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){Xn(!_i(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=V.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=nr(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=V.useMemo(()=>{let e=Dr(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return Zn(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:V.createElement(si.Provider,{value:c},V.createElement(ci.Provider,{children:t,value:h}))}V.Component;var Ki=`application/x-www-form-urlencoded`;function qi(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Ji(e){return qi(e)&&e.tagName.toLowerCase()===`button`}function Yi(e){return qi(e)&&e.tagName.toLowerCase()===`form`}function Xi(e){return qi(e)&&e.tagName.toLowerCase()===`input`}function Zi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qi(e,t){return e.button===0&&(!t||t===`_self`)&&!Zi(e)}function $i(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ea(e,t){let n=$i(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ta=null;function na(){if(ta===null)try{new FormData(document.createElement(`form`),0),ta=!1}catch{ta=!0}return ta}var ra=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ia(e){return e!=null&&!ra.has(e)?(Zn(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ki}"`),null):e}function aa(e,t){let n,r,i,a,o;if(Yi(e)){let o=e.getAttribute(`action`);r=o?Dr(o,t):null,n=e.getAttribute(`method`)||`get`,i=ia(e.getAttribute(`enctype`))||Ki,a=new FormData(e)}else if(Ji(e)||Xi(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Dr(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=ia(e.getAttribute(`formenctype`))||ia(o.getAttribute(`enctype`))||Ki,a=new FormData(o,e),!na()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(qi(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Ki,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function oa(e,t){if(e===!1||e==null)throw Error(t)}function sa(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}async function ca(e,t){if(e.id in t)return t[e.id];try{let n=await Le(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function la(e){return e!=null&&typeof e.page==`string`}function ua(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function da(e,t,n){return ga((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await ca(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ua).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function fa(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function pa(e,t,{includeHydrateFallback:n}={}){return ma(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function ma(e){return[...new Set(e)]}function ha(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function ga(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!la(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(ha(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function _a(){let e=V.useContext(ei);return oa(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function va(){let e=V.useContext(ti);return oa(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var ya=V.createContext(void 0);ya.displayName=`FrameworkContext`;function ba(){let e=V.useContext(ya);return oa(e,`You must render this element inside a <HydratedRouter> element`),e}function xa(e,t){let n=V.useContext(ya),[r,i]=V.useState(!1),[a,o]=V.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=V.useRef(null);V.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),V.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Sa(s,p),onBlur:Sa(c,m),onMouseEnter:Sa(l,p),onMouseLeave:Sa(u,m),onTouchStart:Sa(d,p)}]:[a,f,{}]:[!1,f,{}]}function Sa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ca({page:e,...t}){let n=ri(),{nonce:r}=ba(),{router:i}=_a(),a=V.useMemo(()=>ar(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?V.createElement(Ta,{page:e,matches:a,...t}):V.createElement(Ea,{page:e,matches:a,...t})):null}function wa(e){let{manifest:t,routeModules:n}=ba(),[r,i]=V.useState([]);return V.useEffect(()=>{let r=!1;return da(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ta({page:e,matches:t,...n}){let r=vi(),i=V.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=sa(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return V.createElement(V.Fragment,null,i.map(e=>V.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ea({page:e,matches:t,...n}){let r=vi(),{manifest:i,routeModules:a}=ba(),{loaderData:o,matches:s}=va(),c=V.useMemo(()=>fa(e,t,s,i,r,`data`),[e,t,s,i,r]),l=V.useMemo(()=>fa(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=V.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=sa(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=V.useMemo(()=>pa(l,i),[l,i]),f=wa(l);return V.createElement(V.Fragment,null,u.map(e=>V.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>V.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>V.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Da(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Oa=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Oa&&(window.__reactRouterVersion=`8`)}catch{}function ka({basename:e,children:t,useTransitions:n,window:r}){let i=V.useRef(null);i.current??=Yn({window:r,v5Compat:!0});let a=i.current,[o,s]=V.useState({action:a.action,location:a.location}),c=V.useCallback(e=>{n===!1?s(e):V.startTransition(()=>s(e))},[n]);return V.useLayoutEffect(()=>a.listen(c),[a,c]),V.createElement(Gi,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var Aa=V.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=V.useContext(si),v=typeof l==`string`&&Wn.test(l),y=Wr(l,h);l=y.to;let b=gi(l,{relative:r}),x=vi(),S=null;if(o){let e=Nr(o,[],x.mask?x.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:Fr([h,e.pathname])),S=g.createHref(e)}let[C,w,T]=xa(n,p),E=Fa(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function D(t){e&&e(t),t.defaultPrevented||E(t)}let O=!(y.isExternal||i),k=V.createElement(`a`,{...p,...T,href:(O?S:void 0)||y.absoluteURL||b,onClick:O?D:e,ref:Da(m,w),target:c,"data-discover":!v&&t===`render`?`true`:void 0});return C&&!v?V.createElement(V.Fragment,null,k,V.createElement(Ca,{page:b})):k});Aa.displayName=`Link`;var ja=V.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=Ci(a,{relative:c.relative}),d=vi(),f=V.useContext(ti),{navigator:p,basename:m}=V.useContext(si),h=f!=null&&Va(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=Dr(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return V.createElement(Aa,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});ja.displayName=`NavLink`;var Ma=V.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=V.useContext(si),g=za(),_=Ba(s,{relative:l}),v=o.toLowerCase()===`get`?`get`:`post`,y=typeof s==`string`&&Wn.test(s);return V.createElement(`form`,{ref:m,method:v,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?V.startTransition(()=>p()):p()},...p,"data-discover":!y&&e===`render`?`true`:void 0})});Ma.displayName=`Form`;function Na(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Pa(e){let t=V.useContext(ei);return Xn(t,Na(e)),t}function Fa(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=bi(),d=vi(),f=Ci(e,{relative:o});return V.useCallback(p=>{if(Qi(p,t)){p.preventDefault();let t=n===void 0?tr(d)===tr(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?V.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Ia(e){Zn(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=V.useRef($i(e)),n=V.useRef(!1),r=vi(),i=V.useMemo(()=>ea(r.search,n.current?null:t.current),[r.search]),a=bi();return[i,V.useCallback((e,t)=>{let r=$i(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var La=0,Ra=()=>`__${String(++La)}__`;function za(){let{router:e}=Pa(`useSubmit`),{basename:t}=V.useContext(si),n=Ri(),r=e.fetch,i=e.navigate;return V.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=aa(e,t);a.navigate===!1?await r(a.fetcherKey||Ra(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,relative:a.relative,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ba(e,{relative:t}={}){let{basename:n}=V.useContext(si),r=V.useContext(li);Xn(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ci(e||`.`,{relative:t})},o=vi();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Fr([n,a.pathname])),tr(a)}function Va(e,{relative:t}={}){let n=V.useContext(ii);Xn(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Pa(`useViewTransitionState`),i=Ci(e,{relative:t});if(!n.isTransitioning)return!1;let a=Dr(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Dr(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Cr(i.pathname,o)!=null||Cr(i.pathname,a)!=null}var Ha=[`web`,`android`,`ios`];function Ua(e){if(!e)return null;let t=Wa(e);for(let e of Ha)if(e===`web`&&t.has(e))return e;return null}function Wa(e){let t=new Set(e===!0?Ha:e===!1?[]:Array.isArray(e)?e:[e]);return t.has(`mobile`)&&(t.add(`android`),t.add(`ios`),t.delete(`mobile`)),t}var Ga;bn(`gesture`,{enabled:!1,Gesture:null,GestureDetector:null,ScrollView:null,RootView:null});var Ka=`__hanzogui_press_state__`;(Ga=globalThis)[Ka]??(Ga[Ka]={owner:null,ownerId:null,ownerSource:null,ownerPointerId:null,timestamp:0}),bn(`zeego`,{enabled:!1,DropdownMenu:null,ContextMenu:null}),(0,V.createContext)(!1);var qa=[`100`,`200`,`300`,`400`,`500`,`600`,`700`,`800`,`900`],Ja=(e,t,n)=>{if(typeof e==`string`)return e;let r=Object.keys(e),i=e[r[0]];return Object.fromEntries([...new Set([...t,...r])].map(t=>{let r=e[t]??n??i;return i=r,n=r,[t,r]}))},Ya=e=>{let t=Object.keys(e.size||{}),n=Object.fromEntries(Object.entries(e).map(([n,r])=>[n,Ja(r,n===`face`?qa:t,n===`face`?{normal:e.family}:void 0)]));return Object.freeze(n)},Xa=()=>pe()?be:!1;function Za(){let e=V.useContext(vn);if(!e)return[!0,null,e];let{id:t,isPresent:n,onExitComplete:r,register:i}=e;return V.useEffect(()=>i(t),[]),!n&&r?[!1,()=>r?.(t),e]:[!0,void 0,e]}var H=s();function Qa(e){let{Provider:t,useStyledContext:n}=S({collectionRef:{current:void 0},itemMap:new Map},`Toast`),r=e=>{let{scope:n,children:r}=e,i=V.useRef(void 0),a=V.useRef(new Map).current;return(0,H.jsx)(t,{scope:n,itemMap:a,collectionRef:i,children:r})};r.displayName=`CollectionProvider`;let i=e+`CollectionSlot`,a=V.forwardRef((e,t)=>{let{scope:r,children:i}=e,a=n(r),o=he(t,a.collectionRef);return(0,H.jsx)(_e,{ref:o,children:i})});a.displayName=i;let o=e+`CollectionItemSlot`,s=`data-collection-item`,c=V.forwardRef((e,t)=>{let{scope:r,children:i,...a}=e,o=V.useRef(void 0),c=he(t,o),l=n(r);return V.useEffect(()=>(l.itemMap.set(o,{ref:o,...a}),()=>void l.itemMap.delete(o))),(0,H.jsx)(_e,{[s]:``,ref:c,children:i})});c.displayName=o;function l(e){let t=n(e);return V.useCallback(()=>{let e=t.collectionRef.current;if(!e)return[];let n=Array.from(e.querySelectorAll(`[${s}]`));return Array.from(t.itemMap.values()).sort((e,t)=>n.indexOf(e.ref.current)-n.indexOf(t.ref.current))},[t.collectionRef,t.itemMap])}return[{Provider:r,Slot:a,ItemSlot:c},l]}var $a=M(h,{name:`SizableStack`,variants:{unstyled:{true:{elevate:!1,bordered:!1}},circular:d,elevate:p,bordered:{true:c},size:{"...size":(e,t)=>r(e,t)}}}),eo=V.createContext(void 0);function to(e){let t=V.useContext(eo);return e||t||`ltr`}var no=[`animating`,`color`,`hidesWhenStopped`,`size`,`style`],ro=e=>V.createElement(`circle`,{cx:`16`,cy:`16`,fill:`none`,r:`14`,strokeWidth:`4`,style:e}),io=V.forwardRef((e,t)=>{var n=e.animating,r=n===void 0||n,i=e.color,a=i===void 0?`#1976D2`:i,o=e.hidesWhenStopped,s=o===void 0||o,c=e.size,l=c===void 0?`small`:c,u=e.style,d=x(e,no),f=V.createElement(`svg`,{height:`100%`,viewBox:`0 0 32 32`,width:`100%`},ro({stroke:a,opacity:.2}),ro({stroke:a,strokeDasharray:80,strokeDashoffset:60}));return V.createElement(xe,Tt({},d,{"aria-valuemax":1,"aria-valuemin":0,ref:t,role:`progressbar`,style:[ao.container,u]}),V.createElement(xe,{children:f,style:[typeof l==`number`?{height:l,width:l}:oo[l],ao.animation,!r&&ao.animationPause,!r&&s&&ao.hidesWhenStopped]}))});io.displayName=`ActivityIndicator`;var ao=i.create({container:{alignItems:`center`,justifyContent:`center`},hidesWhenStopped:{visibility:`hidden`},animation:{animationDuration:`0.75s`,animationKeyframes:[{"0%":{transform:`rotate(0deg)`},"100%":{transform:`rotate(360deg)`}}],animationTimingFunction:`linear`,animationIterationCount:`infinite`},animationPause:{animationPlayState:`paused`}}),oo=i.create({small:{width:20,height:20},large:{width:36,height:36}}),so=M(n,{name:`Image`,render:`img`}),co=so.styleable((e,t)=>{let{blurRadius:n,capInsets:r,defaultSource:i,fadeDuration:a,loadingIndicatorSource:o,onLoadEnd:s,onPartialLoad:c,progressiveRenderingEnabled:l,resizeMethod:u,tintColor:d,...f}=e;return(0,H.jsx)(so,{ref:t,...f})},{staticConfig:{memo:!0}}),lo=(()=>{});co.getSize=lo,co.getSizeWithHeaders=lo,co.prefetch=lo,co.prefetchWithMetadata=lo,co.abortPrefetch=lo,co.queryCache=lo;var uo=(e,{tokens:t})=>{let n=t.size[e]??e,r=t.size[e]??e;return{width:n,height:r,minWidth:n,maxWidth:n,maxHeight:r,minHeight:r}},fo=M(h,{name:`Square`,alignItems:`center`,justifyContent:`center`,variants:{size:{"...size":uo,":number":uo}}},{memo:!0}),po=`Avatar`,[mo,ho]=Ht(po),[go,_o]=mo(po),vo=`AvatarImage`,yo=V.forwardRef((e,t)=>{let{__scopeAvatar:n,src:r,source:i,onLoadingStatusChange:a=()=>{},...o}=e,s=_o(vo,n),[c,l]=V.useState(`idle`),u=r||(i&&typeof i==`object`&&`uri`in i?i.uri:i);return V.useEffect(()=>{l(u?`idle`:`error`)},[u]),V.useEffect(()=>{a(c),s.onImageLoadingStatusChange(c)},[c]),u?(0,H.jsx)(z,{fullscreen:!0,zIndex:1,children:(0,H.jsx)(co,{position:`absolute`,top:0,left:0,right:0,bottom:0,objectFit:`cover`,width:`100%`,height:`100%`,...o,ref:t,src:u,onError:()=>{l(`error`)},onLoad:()=>{l(`loaded`)}})}):null});yo.displayName=vo;var bo=`AvatarFallback`,xo=M(z,{name:bo,position:`absolute`,fullscreen:!0,zIndex:0}),So=xo.styleable((e,t)=>{let{__scopeAvatar:n,delayMs:r,...i}=e,a=_o(bo,n),[o,s]=V.useState(r===void 0);return V.useEffect(()=>{if(r!==void 0){let e=setTimeout(()=>s(!0),r);return()=>clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,H.jsx)(xo,{...i,ref:t}):null});So.displayName=bo;var Co=M(fo,{name:po,position:`relative`,overflow:`hidden`}),wo=oe(V.forwardRef((e,t)=>{let{__scopeAvatar:n,size:r=`$true`,...i}=e,[a,o]=V.useState(`idle`);return(0,H.jsx)(go,{size:r,scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:o,children:(0,H.jsx)(Co,{size:r,...i,ref:t})})}),{Image:yo,Fallback:So});wo.displayName=po;var To=e=>{let t=Fe(e.color);return n=>n&&(V.isValidElement(n)?V.cloneElement(n,{...e,color:t,...n.props}):V.createElement(n,e))},Eo=S({size:`$true`,scaleIcon:1,unstyled:{}.GUI_HEADLESS===`1`,active:!1,disabled:!1}),Do=M(z,{name:`CheckboxIndicator`,context:Eo,variants:{unstyled:{false:{}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),Oo=M(z,{name:`Checkbox`,render:`button`,context:Eo,variants:{unstyled:{false:{size:`$true`,backgroundColor:`$background`,alignItems:`center`,justifyContent:`center`,borderWidth:1,borderColor:`$borderColor`,hoverStyle:{borderColor:`$borderColorHover`},pressStyle:{backgroundColor:`$backgroundPress`,borderColor:`$borderColorPress`},focusStyle:{borderColor:`$borderColorFocus`},focusVisibleStyle:{outlineStyle:`solid`,outlineWidth:2,outlineColor:`$outlineColor`}}},disabled:{true:{pointerEvents:`none`,userSelect:`none`,cursor:`not-allowed`,hoverStyle:{borderColor:`$borderColor`,backgroundColor:`$background`},pressStyle:{borderColor:`$borderColor`,backgroundColor:`$background`},focusStyle:{outlineWidth:0}}},size:{"...size":e=>({borderRadius:j(ie(e))/8})}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),[ko,Ao]=it(`Label`,{id:void 0,controlRef:{current:null}}),jo=M(a,{name:`Label`,render:`label`,variants:{unstyled:{false:{size:`$true`,color:`$color`,backgroundColor:`transparent`,display:`flex`,alignItems:`center`,userSelect:`none`,cursor:`default`,pressStyle:{color:`$colorPress`}}},size:{"...size":(e,t)=>{let n=r(e,t)?.height;return{...g(e,t),lineHeight:n?t.tokens.size[n]:void 0}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});jo.styleable(function(e,t){let{htmlFor:n,id:r,...i}=e,a=V.useRef(null),o=V.useRef(null),s=he(t,o),c=V.useId(),l=r??c;return b(()=>{if(n){let e=document.getElementById(n);if(o.current&&e){let t=()=>e.getAttribute(`aria-labelledby`),n=[l,t()].filter(Boolean).join(` `);return e.setAttribute(`aria-labelledby`,n),a.current=e,()=>{if(!l)return;let n=t()?.replace(l,``);n===``?e.removeAttribute(`aria-labelledby`):n&&e.setAttribute(`aria-labelledby`,n)}}}},[l,n]),(0,H.jsx)(ko,{id:l,controlRef:a,children:(0,H.jsx)(jo,{id:l,htmlFor:n,...i,ref:s,onMouseDown:t=>{e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()},onPress:t=>{e.onPress?.(t);{if(n||!a.current||t.defaultPrevented)return;let e=a.current.contains(t.target),r=t.isTrusted===!0;!e&&r&&(a.current.click(),a.current.focus())}}})})});var Mo=e=>{let t=Ao(`LabelConsumer`),{controlRef:n}=t;return V.useEffect(()=>{e&&(n.current=e)},[e,n]),t.id};function No(e){let t=V.useRef({value:e,previous:e});return V.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Po(e){return e===`indeterminate`}function Fo(e){return Po(e)?`indeterminate`:e?`checked`:`unchecked`}var Io=e=>{let{checked:t,bubbles:n=!0,control:r,isHidden:i,...a}=e,o=V.useRef(null),s=No(t);return V.useEffect(()=>{let e=o.current,r=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(r,`checked`).set;if(s!==t&&i){let r=new Event(`click`,{bubbles:n});e.indeterminate=Po(t),i.call(e,!Po(t)&&t),e.dispatchEvent(r)}},[s,t,n]),(0,H.jsx)(`input`,{type:`checkbox`,defaultChecked:!Po(t)&&t,...a,tabIndex:-1,ref:o,"aria-hidden":i,style:{...i?{position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}:{appearance:`auto`,accentColor:`var(--color6)`},...e.style}})};function Lo(e,[t,n],r){let{labelledBy:i,name:a,required:o,disabled:s,value:c=`on`,onCheckedChange:l,...u}=e,[d,f]=V.useState(null),p=he(r,f),m=V.useRef(!1),h=!d||!!d.closest(`form`),g=Mo(d),_=i||g,v=e.onKeyDown,y=(0,V.useMemo)(()=>I(v,e=>{e.key===`Enter`&&e.preventDefault()}),[v]),b=(0,V.useMemo)(()=>I(e.onPress,e=>{n(e=>Po(e)?!0:!e),h&&`isPropagationStopped`in e&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}),[h]);return{bubbleInput:h?(0,H.jsx)(Io,{isHidden:!0,control:d,bubbles:!m.current,name:a,value:c,checked:t,required:o,disabled:s}):null,checkboxRef:p,checkboxProps:{role:`checkbox`,"aria-labelledby":_,"aria-checked":Po(t)?`mixed`:t,...u,type:`button`,value:c,"data-state":Fo(t),"data-disabled":s?``:void 0,disabled:s,onKeyDown:s?void 0:y,onPress:s?void 0:b}}}var Ro=V.createContext({checked:!1,disabled:!1}),zo=e=>{e.context||=Ro};function Bo(e){let{Frame:t=Oo,Indicator:n=Do}=e;zo(t),zo(n);let r=t.styleable(function(e,n){let{scaleSize:r=.45,sizeAdjust:i=0,scaleIcon:a,checked:o,defaultChecked:s,onCheckedChange:c,native:l,unstyled:u=!1,activeStyle:d,activeTheme:f,...p}=e,m=v(p),h=V.useContext(Eo.context),g=0,_=0;u||(g=j(ie(m.size??h?.size??`$true`,{shift:i})),_=r?Math.round(g*r):g);let[y=!1,b]=et({prop:o,defaultProp:s,onChange:c}),{checkboxProps:x,checkboxRef:S,bubbleInput:C}=Lo(m,[y,b],n);if(Ua(l)===`web`)return(0,H.jsx)(`input`,{type:`checkbox`,defaultChecked:!Po(y)&&y,tabIndex:-1,ref:S,disabled:x.disabled,style:{appearance:`auto`,accentColor:`var(--color6)`,...x.style}});let w=(0,V.useMemo)(()=>({checked:y,disabled:x.disabled}),[y,x.disabled]),T=!!y,E=x.disabled;return(0,H.jsx)(Ro.Provider,{value:w,children:(0,H.jsxs)(Eo.Provider,{size:m.size??h?.size??`$true`,scaleIcon:a??h?.scaleIcon??1,unstyled:u,active:T,disabled:E,children:[(0,H.jsx)(t,{render:`button`,ref:S,unstyled:u,theme:f??null,type:`button`,...!u&&{width:_,height:_,size:_},checked:y,disabled:E,...x,...p,...T&&{...!u&&!d&&{backgroundColor:`$backgroundActive`},...d},children:m.children}),C]})})}),i=n.styleable((e,t)=>{let{children:r,forceMount:i,disablePassStyles:a,unstyled:o=!1,activeStyle:s,...c}=e,l=Eo.useStyledContext(),{active:u}=l,d=r;if(!o){let e=To({size:(typeof l.size==`number`?l.size*.65:We(l.size))*l.scaleIcon,color:ee().color});d=V.Children.toArray(r).map(t=>a||!V.isValidElement(t)?t:e(t))}let f=V.useContext(Ro);return i||Po(f.checked)||f.checked===!0?(0,H.jsx)(n,{pointerEvents:`none`,...c,...u&&s,ref:t,children:d}):null});return oe(r,{Indicator:i})}var Vo=Bo({Frame:Oo,Indicator:Do}),Ho=V.createContext([]),Uo=V.createContext(null);function Wo(){let e=V.useContext(Ho),t=V.useContext(Uo);return V.useMemo(()=>{if(t===null)return null;let n=Ko(t),r=e[e.length-1],i=n[n.length-1];return{maxIndex:r,maxIndexPath:e,index:i,indexPath:n,indexPathString:t,isFirst:i===0,isLast:i===r,isEven:i%2==0,isOdd:Math.abs(i%2)===1}},[e,t])}function Go(e){let t=V.useContext(Ho),n=V.useContext(Uo),r=V.Children.count(e),i=V.useMemo(()=>t.concat(r-1),[r]);return(0,H.jsx)(Ho.Provider,{value:i,children:V.Children.map(e,(e,t)=>V.isValidElement(e)?(0,H.jsx)(Uo.Provider,{value:n?`${n}.${t.toString()}`:t.toString(),children:e},e.key):e)})}function Ko(e){return e.split(`.`).map(e=>Number.parseInt(e,10))}var qo=`Group`,[Jo,Yo]=Ht(qo),[Xo,Zo]=Jo(qo),Qo=M(z,{name:`GroupFrame`,variants:{unstyled:{false:{size:`$true`}},size:(e,{tokens:t})=>({borderRadius:t.radius[e]??e??t.radius.$true})},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}});function $o(e){return oe(Qo.styleable((t,n)=>{let{__scopeGroup:r,children:i,orientation:a=e?`vertical`:`horizontal`,disabled:o,...s}=t,c=a===`vertical`,l=Go(V.Children.toArray(i));return(0,H.jsx)(Xo,{vertical:c,disabled:o,scope:r,children:(0,H.jsx)(Qo,{ref:n,flexDirection:c?`column`:`row`,...s,children:l})})}),{Item:es})}function es(e){let{__scopeGroup:t,children:n,forcePlacement:r,...i}=e,a=Zo(`GroupItem`,t),o=Wo();if(!o)throw Error(`<Group.Item/> should only be used within a <Group/>`);if(!V.isValidElement(n))return n;let s=is(r===`first`||r!==`last`&&o.index===0,r===`last`||r!==`first`&&o.index===o.maxIndex,a.vertical),c={...i,...s};a.disabled!=null&&(c.disabled=n.props.disabled??a.disabled);let l=re(c,n.props);return V.cloneElement(n,l)}var ts=(e,t,n)=>{let r=Wo(),i=Zo(`GroupItem`,n);if(!r)throw Error(`useGroupItem should only be used within a <Group/>`);let a=is(t===`first`||t!==`last`&&r.index===0,t===`last`||t!==`first`&&r.index===r.maxIndex,i.vertical);return{disabled:e.disabled??i.disabled,...a}},ns=$o(!0),rs=$o(!1);function is(e,t,n){return n?{...e?null:{borderTopLeftRadius:0,borderTopRightRadius:0},...t?null:{borderBottomLeftRadius:0,borderBottomRightRadius:0}}:{...e?null:{borderTopLeftRadius:0,borderBottomLeftRadius:0},...t?null:{borderTopRightRadius:0,borderBottomRightRadius:0}}}var as=`ListItem`,os=S({size:void 0,variant:void 0,color:void 0}),ss=M(n,{context:os,name:as,render:`li`,role:`listitem`,variants:{unstyled:{false:{size:`$true`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`nowrap`,borderColor:`$borderColor`,width:`100%`,maxWidth:`100%`,overflow:`hidden`,flexDirection:`row`,backgroundColor:`$background`,cursor:`default`,hoverStyle:{backgroundColor:`$backgroundHover`,borderColor:`$borderColorHover`},pressStyle:{backgroundColor:`$backgroundPress`,borderColor:`$borderColorPress`}}},variant:{outlined:{}.GUI_HEADLESS===`1`?{}:{backgroundColor:`transparent`,borderWidth:1,borderColor:`$borderColor`,hoverStyle:{backgroundColor:`transparent`,borderColor:`$borderColorHover`},pressStyle:{backgroundColor:`transparent`,borderColor:`$borderColorPress`}}},size:{"...size":(e,{tokens:t})=>({minHeight:t.size[e],paddingHorizontal:t.space[e],paddingVertical:m(t.space[e],{shift:-4})})},active:{true:{hoverStyle:{backgroundColor:`$background`}}},disabled:{true:{opacity:.5,pointerEvents:`none`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),cs=M(a,{context:os,name:`ListItemText`,variants:{unstyled:{false:{color:`$color`,size:`$true`,flexGrow:1,flexShrink:1,ellipsis:!0,cursor:`inherit`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),ls=M(cs,{name:`ListItemSubtitle`,context:os,variants:{unstyled:{false:{opacity:.6,maxWidth:`100%`,color:`$color`}},size:{"...size":(e,t)=>{let n=ie(e,{shift:-1,excludeHalfSteps:!0});return g(n.key,t)}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),us=M(cs,{name:`ListItemTitle`,context:os,variants:{unstyled:{false:{}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),ds=e=>{let{children:t,size:n,scaleIcon:r=1}=e,i=os.useStyledContext();if(!i)throw Error(`ListItem.Icon must be used within a ListItem`);let a=n??i.size??`$true`,o=Fe(i.color),s=We(a)*r;return Pe(t,{size:s,color:o})},fs=ss.styleable(function(e,t){let{children:r,icon:i,iconAfter:a,scaleIcon:o=1,unstyled:s=!1,subTitle:c,title:l,iconSize:u,...d}=e,f=e.size||`$true`,p=os.useStyledContext(),m=Fe(p?.color),h=We(u||f)*o,g=h*.4,_=i?(0,H.jsx)(n,{marginRight:g,children:Pe(i,{size:h,color:m})}):null,v=a?(0,H.jsx)(n,{marginLeft:g,children:Pe(a,{size:h,color:m})}):null,y=Ve(cs,{children:r},e.unstyled===!0?void 0:{unstyled:{}.GUI_HEADLESS===`1`,fontSize:e.size});return(0,H.jsxs)(ss,{ref:t,...d,children:[_,l||c?(0,H.jsxs)(z,{flex:1,children:[l?typeof l==`string`?(0,H.jsx)(us,{unstyled:s,size:f,children:l}):l:null,c?(0,H.jsx)(H.Fragment,{children:typeof c==`string`?(0,H.jsx)(ls,{unstyled:s,size:f,children:c}):c}):null,y]}):y,v]})}),ps=oe(fs,{Apply:os.Provider,Frame:ss,Text:cs,Subtitle:ls,Icon:ds,Title:us}),ms=0;function hs(){V.useEffect(()=>{let e=document.querySelectorAll(`[data-hanzogui-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??gs()),document.body.insertAdjacentElement(`beforeend`,e[1]??gs()),ms++,()=>{ms===1&&document.querySelectorAll(`[data-hanzogui-focus-guard]`).forEach(e=>e.remove()),ms--}},[])}function gs(){let e=document.createElement(`span`);return e.setAttribute(`data-hanzogui-focus-guard`,``),e.tabIndex=0,e.style.cssText=`outline: none; opacity: 0; position: fixed; pointer-events: none`,e}function _s(e){return ln(e.target)&&e.target.tagName===`BUTTON`}function vs(e){return ln(e.target)&&e.target.tagName===`A`}function ys(e){return tn(e)}function bs(e,t={}){let{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=(0,V.useRef)(void 0),p=(0,V.useRef)(!1),m=(0,V.useMemo)(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current;e.button===0&&s!==`click`&&(Nn(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent||e,`click`):(e.preventDefault(),r(!0,e.nativeEvent||e,`click`))))},onClick(e){let t=f.current;if(s===`mousedown`&&f.current){f.current=void 0;return}Nn(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`click`)?r(!1,e.nativeEvent||e,`click`):r(!0,e.nativeEvent||e,`click`))},onKeyDown(e){f.current=void 0,!(e.defaultPrevented||!u||_s(e))&&(e.key===` `&&!ys(a)&&(e.preventDefault(),p.current=!0),!vs(e)&&e.key===`Enter`&&r(!(n&&c),e.nativeEvent||e,`click`))},onKeyUp(e){e.defaultPrevented||!u||_s(e)||ys(a)||e.key===` `&&p.current&&(p.current=!1,r(!(n&&c),e.nativeEvent||e,`click`))}}),[i,a,s,l,u,r,n,d,c]);return(0,V.useMemo)(()=>o?{reference:m}:{},[o,m])}var xs=`ArrowUp`,Ss=`ArrowDown`,Cs=`ArrowLeft`,ws=`ArrowRight`;function Ts(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function Es(e,t){return Ts(t,e===xs||e===Ss,e===Cs||e===ws)}function Ds(e,t,n){return Ts(t,e===Ss,n?e===Cs:e===ws)||e===`Enter`||e===` `||e===``}function Os(e,t,n){return Ts(t,n?e===Cs:e===ws,e===Ss)}function ks(e,t,n){return Ts(t,n?e===ws:e===Cs,e===xs)}function As(e,t){let{open:n,onOpenChange:r,elements:i}=e,{listRef:a,activeIndex:o,onNavigate:s=()=>{},enabled:c=!0,selectedIndex:l=null,allowEscape:u=!1,loop:d=!1,nested:p=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:g=`auto`,focusItemOnHover:_=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:b=`vertical`,scrollItemIntoView:x=!0}=t,S=Ln(i.domReference),C=(0,V.useRef)(g),w=(0,V.useRef)(l??-1),T=(0,V.useRef)(null),E=(0,V.useRef)(!0),D=(0,V.useRef)(!!i.floating),O=(0,V.useRef)(n),k=(0,V.useRef)(!1),ee=(0,V.useRef)(!1),A=(0,V.useRef)(y);A.current=y;let j=(0,V.useRef)(n);j.current=n;let M=(0,V.useRef)(x);M.current=x;let N=(0,V.useRef)(l);N.current=l;let P=f(s),[te,F]=(0,V.useState)(),I=f(()=>{P(w.current===-1?null:w.current)}),ne=(0,V.useRef)(I),re=f(()=>{function e(e){h?F(e.id):cn(e,{sync:k.current,preventScroll:!0})}let t=a.current[w.current],n=ee.current;t&&e(t),(k.current?e=>e():requestAnimationFrame)(()=>{let r=a.current[w.current]||t;if(!r)return;t||e(r);let i=M.current;i&&r&&(n||!E.current)&&r.scrollIntoView?.(typeof i==`boolean`?{block:`nearest`,inline:`nearest`}:i)})});(0,V.useLayoutEffect)(()=>{c&&(n&&i.floating?C.current&&l!=null&&(ee.current=!0,w.current=l,I()):D.current&&(w.current=-1,ne.current()))},[c,n,i.floating,l,I]),(0,V.useLayoutEffect)(()=>{if(c&&n&&i.floating){if(o==null){if(k.current=!1,N.current!=null)return;if(D.current&&(w.current=-1,re()),(!O.current||!D.current)&&C.current&&(T.current!=null||C.current===!0&&T.current==null)){let e=0,t=()=>{a.current[0]==null?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(w.current=T.current==null||Ds(T.current,b,m)||p?un(a,A.current):_n(a,A.current),T.current=null,I())};t()}}else Qt(a,o)||(w.current=o,re(),ee.current=!1)}},[c,n,i.floating,o,N,p,a,b,m,I,re,A]),(0,V.useLayoutEffect)(()=>{ne.current=I,O.current=n,D.current=!!i.floating}),(0,V.useLayoutEffect)(()=>{n||(T.current=null,C.current=g)},[n,g]);let ie=o!=null,L=f(e=>{if(E.current=!1,k.current=!0,e.which===229||!j.current&&e.currentTarget===i.floating)return;if(p&&ks(e.key,b,m)){ot(e),r(!1,e.nativeEvent,`list-navigation`),ln(i.domReference)&&i.domReference.focus();return}let t=w.current,o=un(a,y),s=_n(a,y);if(S||(e.key===`Home`&&(ot(e),w.current=o,I()),e.key===`End`&&(ot(e),w.current=s,I())),Es(e.key,b)){if(ot(e),n&&!h&&jn(e.currentTarget.ownerDocument)===e.currentTarget){w.current=Ds(e.key,b,m)?o:s,I();return}Ds(e.key,b,m)?d?w.current=t>=s?u&&t!==a.current.length?-1:o:Sn(a,{startingIndex:t,disabledIndices:y}):w.current=Math.min(s,Sn(a,{startingIndex:t,disabledIndices:y})):d?w.current=t<=o?u&&t!==-1?a.current.length:s:Sn(a,{startingIndex:t,decrement:!0,disabledIndices:y}):w.current=Math.max(o,Sn(a,{startingIndex:t,decrement:!0,disabledIndices:y})),Qt(a,w.current)&&(w.current=-1),I()}}),ae=(0,V.useMemo)(()=>h&&n&&ie&&{"aria-activedescendant":te},[h,n,ie,te]),oe=(0,V.useMemo)(()=>({"aria-orientation":b===`both`?void 0:b,...S?{}:ae,onKeyDown:L,onPointerMove(){E.current=!0}}),[ae,L,b,S]),R=(0,V.useMemo)(()=>{function e(e){g===`auto`&&In(e.nativeEvent)&&(C.current=!0)}function t(e){C.current=g,g===`auto`&&It(e.nativeEvent)&&(C.current=!0)}return{...ae,onKeyDown(e){E.current=!1;let t=e.key.startsWith(`Arrow`),i=Os(e.key,b,m),o=Es(e.key,b),s=(p?i:o)||e.key===`Enter`||e.key.trim()===``;if(h&&n)return L(e);if(n||v||!t){if(s&&(T.current=e.key),p){i&&(ot(e),n?(w.current=un(a,A.current),I()):r(!0,e.nativeEvent,`list-navigation`));return}o&&(l!=null&&(w.current=l),ot(e),!n&&v?r(!0,e.nativeEvent,`list-navigation`):L(e),n&&I())}},onFocus(){n&&!h&&(w.current=-1,I())},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[ae,L,A,g,a,p,I,r,n,v,b,m,l,h]),se=(0,V.useMemo)(()=>{function e(e){if(!j.current)return;let t=a.current.indexOf(e);t!==-1&&w.current!==t&&(w.current=t,I())}return{onFocus({currentTarget:t}){k.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove({currentTarget:t}){k.current=!0,ee.current=!1,_&&e(t)},onPointerLeave({pointerType:e}){E.current&&e!==`touch`&&(k.current=!0,_&&(w.current=-1,I(),h||i.floating?.focus({preventScroll:!0})))}}},[j,_,a,I,h,i.floating]);return(0,V.useMemo)(()=>c?{reference:R,floating:oe,item:se}:{},[c,R,oe,se])}function js(e,t){let{open:n,dataRef:r}=e,{listRef:i,activeIndex:a,onMatch:o,onTypingChange:s,enabled:c=!0,findMatch:l=null,resetMs:u=750,ignoreKeys:d=[],selectedIndex:p=null}=t,m=(0,V.useRef)(-1),h=(0,V.useRef)(``),g=(0,V.useRef)(p??a??-1),_=(0,V.useRef)(null),v=f(o||(()=>{})),y=f(s||(()=>{})),b=(0,V.useRef)(l);b.current=l;let x=(0,V.useRef)(d);x.current=d,(0,V.useLayoutEffect)(()=>{n&&(rn(m),_.current=null,h.current=``)},[n]),(0,V.useLayoutEffect)(()=>{n&&h.current===``&&(g.current=p??a??-1)},[n,p,a]);let S=e=>{e?r.current.typing||(r.current.typing=e,y(e)):r.current.typing&&(r.current.typing=e,y(e))},C=e=>{function t(e,t,n){let r=b.current?b.current(t,n):t.find(e=>e?.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())===0);return r?e.indexOf(r):-1}let r=i.current;if(h.current.length>0&&h.current[0]!==` `&&(t(r,r,h.current)===-1?S(!1):e.key===` `&&ot(e)),r==null||x.current.includes(e.key)||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;n&&e.key!==` `&&(ot(e),S(!0)),r.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&h.current===e.key&&(h.current=``,g.current=_.current),h.current+=e.key,rn(m),m.current=window.setTimeout(()=>{h.current=``,g.current=_.current,S(!1)},u);let a=g.current,o=t(r,[...r.slice((a||0)+1),...r.slice(0,(a||0)+1)],h.current);o===-1?e.key!==` `&&(h.current=``,S(!1)):(v(o),_.current=o)},w=(0,V.useMemo)(()=>({onKeyDown:C}),[n,c]),T=(0,V.useMemo)(()=>({onKeyDown:C,onKeyUp(e){e.key===` `&&S(!1)}}),[n,c]);return(0,V.useMemo)(()=>c?{reference:w,floating:T}:{},[c,w,T])}var Ms=e(o(),1);function Ns(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:a,scrollRef:o,onChange:s}=t,c=f(s),l=V.useRef(!1),u=V.useRef(null),d=V.useRef(null);V.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||a.current==null)return;let n=e.deltaY,r=a.current.top>=-.5,i=a.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,l=n<0?`max`:`min`;t.scrollHeight<=t.clientHeight||(!r&&n>0||!i&&n<0?(e.preventDefault(),Ms.flushSync(()=>{c(e=>e+Math[l](n,o*s))})):/firefox/i.test(navigator.userAgent)&&(t.scrollTop+=n))}let t=o?.current||r.floating;if(n&&t)return t.addEventListener(`wheel`,e),requestAnimationFrame(()=>{u.current=t.scrollTop,a.current!=null&&(d.current={...a.current})}),()=>{u.current=null,d.current=null,t.removeEventListener(`wheel`,e)}},[i,n,r.floating,a,o,c]);let p=V.useMemo(()=>({onKeyDown(){l.current=!0},onWheel(){l.current=!1},onPointerMove(){l.current=!1},onScroll(){let e=o?.current||r.floating;if(a.current&&e&&l.current){if(u.current!==null){let t=e.scrollTop-u.current;(a.current.bottom<-.5&&t<-1||a.current.top<-.5&&t>1)&&Ms.flushSync(()=>c(e=>e+t))}requestAnimationFrame(()=>{u.current=e.scrollTop})}}}),[r.floating,c,a,o]);return V.useMemo(()=>i?{floating:p}:{},[i,p])}function Ps(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var Fs=e=>({name:`inner`,options:e,async fn(t){let{listRef:n,overflowRef:r,onFallbackChange:i,offset:a=0,index:o=0,minItemsVisible:s=4,referenceOverflowThreshold:c=0,scrollRef:l,padding:u=0}=e,{rects:d,elements:{floating:f}}=t,p=n.current?.[o??0],m=l?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,_=m.clientTop!==0,v=f===m;if(!p||o==null)return i?.(!0),{};let y={...t,...await ut(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-a).fn(t)},b={padding:u},x=await nt(Ps(y,m.scrollHeight+h+f.clientTop),b),S=await nt(y,{...b,elementContext:`reference`}),C=Math.max(0,x.top),w=y.y+C,T=(m.scrollHeight>m.clientHeight?e=>e:Math.round)(Math.max(0,m.scrollHeight+(g&&v||_?h*2:0)-C-Math.max(0,x.bottom)));if(m.style.maxHeight=`${T}px`,m.scrollTop=C,i){let e=m.offsetHeight<p.offsetHeight*Math.min(s,n.current?.length??0)-1||S.top>=-c||S.bottom>=-c;Ms.flushSync(()=>i(e))}return r&&(r.current=await nt(Ps({...y,y:w},m.offsetHeight+h+f.clientTop),b)),{y:w}}}),Is=`rovingFocusGroup.onEntryFocus`,Ls={bubbles:!1,cancelable:!0},Rs=V.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,asChild:u,...d}=e,p=V.useRef(null),m=he(t,p),h=to(a),[g=null,_]=et({prop:o,defaultProp:s??null,onChange:c}),[v,y]=V.useState(!1),b=f(l),x=Us(n||Ks),S=V.useRef(!1),[C,T]=V.useState(0),E=u?_e:w;return(0,H.jsx)(Ws,{scope:n,orientation:r,dir:h,loop:i,currentTabStopId:g,onItemFocus:V.useCallback(e=>_(e),[_]),onItemShiftTab:V.useCallback(()=>y(!0),[]),onFocusableItemAdd:V.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:V.useCallback(()=>T(e=>e-1),[]),children:(0,H.jsx)(E,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:m,outlineStyle:`none`,onMouseDown:I(e.onMouseDown,()=>{S.current=!0}),onFocus:I(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!v){let e=new CustomEvent(Is,Ls);if(b(e),!e.defaultPrevented){let e=x().filter(e=>e.focusable);Zs([e.find(e=>e.active),e.find(e=>e.id===g),...e].filter(Boolean).map(e=>e.ref.current),{focusVisible:!1})}}S.current=!1}),onBlur:I(e.onBlur,()=>y(!1))})})}),zs=`RovingFocusGroupItem`,Bs=V.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,...o}=e,s=V.useId(),c=a||s,l=Gs(n);l.currentTabStopId;let u=Us(n||Ks),{onFocusableItemAdd:d,onFocusableItemRemove:f}=l;return V.useEffect(()=>{if(r)return d(),()=>f()},[r,d,f]),(0,H.jsx)(Hs.ItemSlot,{scope:n||Ks,id:c,focusable:r,active:i,children:(0,H.jsx)(w,{tabIndex:r?0:-1,"data-orientation":l.orientation,...o,ref:t,onMouseDown:I(e.onMouseDown,e=>{r?l.onItemFocus(c):e.preventDefault()}),onFocus:I(e.onFocus,()=>l.onItemFocus(c)),onKeyDown:I(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){l.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Xs(e,l.orientation,l.dir);if(t!==void 0){e.preventDefault();let n=u().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=l.loop?Qs(n,r+1):n.slice(r+1)}setTimeout(()=>Zs(n,{focusVisible:!0}))}})})})});Bs.displayName=zs;var Vs=`RovingFocusGroup`,[Hs,Us]=Qa(Vs),{Provider:Ws,useStyledContext:Gs}=S(),Ks=`RovingFocusGroupContext`,qs=oe(V.forwardRef((e,t)=>(0,H.jsx)(Hs.Provider,{scope:e.__scopeRovingFocusGroup||Ks,children:(0,H.jsx)(Hs.Slot,{scope:e.__scopeRovingFocusGroup||Ks,children:(0,H.jsx)(Rs,{...e,ref:t})})})),{Item:Bs});qs.displayName=Vs;var Js={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function Ys(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function Xs(e,t,n){let r=Ys(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Js[r]}function Zs(e,t){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({focusVisible:t?.focusVisible}),document.activeElement!==n))return}function Qs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $s=M(n,{name:`MenuGroup`,variants:{unstyled:{false:{role:`group`,width:`100%`,borderRadius:0,borderWidth:0,borderColor:`$borderColor`,overflow:`hidden`,backgroundColor:`$background`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),ec=M(a,{name:`MenuLabel`,variants:{unstyled:{false:{cursor:`default`,color:`$color`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),tc=M(n,{name:`MenuSeparator`,role:`separator`,"aria-orientation":`horizontal`,variants:{unstyled:{false:{borderColor:`$borderColor`,flexShrink:0,borderWidth:0,height:1,marginVertical:3,marginHorizontal:10,backgroundColor:`$borderColor`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),nc={MenuIcon:M(n,{name:`MenuIcon`,variants:{unstyled:{false:{width:20,height:20,alignItems:`center`,justifyContent:`center`,marginLeft:`auto`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),MenuImage:M(co,{name:`MenuImage`}),MenuIndicator:M(n,{name:`MenuIndicator`,variants:{unstyled:{false:{justifyContent:`center`,alignItems:`center`,marginLeft:`auto`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),MenuItem:M(n,{name:`MenuItem`,variants:{unstyled:{false:{flexDirection:`row`,width:`100%`,alignItems:`center`,cursor:`pointer`,borderRadius:6,paddingVertical:4,paddingHorizontal:8,focusStyle:{backgroundColor:`$backgroundHover`},pressStyle:{backgroundColor:`$backgroundPress`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Title:M(a,{name:`MenuTitle`,variants:{unstyled:{false:{cursor:`default`,color:`$color`,flexGrow:1,flexShrink:1}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),SubTitle:M(a,{name:`MenuSubTitle`,variants:{unstyled:{false:{cursor:`default`,color:`$colorFaint`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),MenuGroup:$s,MenuSeparator:tc,MenuLabel:ec};function rc(e){return t=>t.pointerType===`mouse`?e(t):void 0}var ic=[`Enter`,` `],ac=[`ArrowDown`,`PageUp`,`Home`],oc=[`ArrowUp`,`PageDown`,`End`],sc=[...ac,...oc],cc={ltr:[...ic,`ArrowRight`],rtl:[...ic,`ArrowLeft`]},lc={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},uc=`Menu`,[dc,fc]=Qa(uc),{Provider:pc,useStyledContext:mc}=S(),{Provider:hc,useStyledContext:gc}=S(),_c=`MenuContext`;function vc({Item:e=nc.MenuItem,Title:t=nc.Title,SubTitle:r=nc.SubTitle,Image:i=nc.MenuImage,Icon:a=nc.MenuIcon,Indicator:o=nc.MenuIndicator,Separator:s=nc.MenuSeparator,MenuGroup:c=nc.MenuGroup,Label:l=nc.MenuLabel}){let u=e=>{let t=to(e.dir),n=t===`rtl`?`bottom-end`:`bottom-start`,{scope:r=_c,open:i=!1,children:a,dir:o,onOpenChange:s,modal:c=!0,allowFlip:l={padding:10},stayInFrame:u={padding:10},placement:d=n,resize:f=!0,offset:p=10,...m}=e,[h,g]=V.useState(null),_=V.useRef(!1),v=zn(s);return V.useEffect(()=>{let e=()=>{_.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>_.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,H.jsx)($e,{scope:r,open:i,placement:d,allowFlip:l,stayInFrame:u,resize:f,offset:p,...m,children:(0,H.jsx)(pc,{scope:r,open:i,onOpenChange:v,content:h,onContentChange:g,children:(0,H.jsx)(hc,{scope:r,open:i,onClose:V.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:_,dir:t,modal:c,children:(0,H.jsx)(fe,{scope:r,children:a})})})})},d=e=>{let{scope:t=_c,menuContext:n,rootContext:r,popperContext:i,menuSubContext:a,children:o}=e;return(0,H.jsx)(fn,{...i,scope:t,children:(0,H.jsx)(pc,{scope:t,...n,children:(0,H.jsx)(hc,{scope:t,...r,children:a?(0,H.jsx)(fe,{scope:t,...a,children:o}):o})})})};u.displayName=uc;let f=e=>(0,H.jsx)(on,{scope:_c,...e});f.displayName=`MenuAnchor`;let{Provider:p,useStyledContext:m}=S(void 0,`Portal`),h=e=>{let{scope:t=_c,forceMount:r,zIndex:i,children:a}=e,o=mc(t),s=gc(t),c=en(t),l=pe(t),u=dn(),f=(0,H.jsx)(se,{forceClassName:!0,name:u,children:a}),m=bt()?(0,H.jsx)(d,{menuContext:o,rootContext:s,popperContext:c,menuSubContext:l,scope:t,children:f}):f,h=r||s.open&&o.open;return(0,H.jsx)(gt,{type:`presence`,present:h,children:(0,H.jsx)(Jt,{stackZIndex:!0,children:(0,H.jsx)(H.Fragment,{children:(0,H.jsx)(p,{scope:t,forceMount:r,children:(0,H.jsxs)(n,{zIndex:i||100,inset:0,position:`absolute`,children:[!!o.open&&!1,m]})})})})})};h.displayName=`MenuPortal`;let g=`MenuContent`,{Provider:_,useStyledContext:v}=S(),y=M(Dn,{name:g}).styleable((e,t)=>{let n=e.scope||_c,r=m(n),{forceMount:i=r.forceMount,...a}=e,o=gc(n);return(0,H.jsx)(dc.Provider,{scope:n,children:(0,H.jsx)(dc.Slot,{scope:n,children:o.modal?(0,H.jsx)(b,{...a,ref:t}):(0,H.jsx)(x,{...a,ref:t})})})}),b=V.forwardRef((e,t)=>{let n=e.scope||_c,r=mc(n),i=V.useRef(null),a=he(t,i);return(0,H.jsx)(C,{...e,scope:n,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!1,onFocusOutside:I(e.onFocusOutside,e=>e.preventDefault(),{checkDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),x=V.forwardRef((e,t)=>{let n=e.scope||_c,r=mc(n);return(0,H.jsx)(C,{...e,scope:n,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),C=V.forwardRef((e,t)=>{let{scope:n=_c,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,disableDismissOnScroll:h=!1,unstyled:g={}.GUI_HEADLESS===`1`,...v}=e,y=mc(n),b=gc(n),x=en(n),S=fc(n),[C,w]=V.useState(null),T=V.useRef(null),E=V.useRef(null),D=he(t,T,y.onContentChange),O=V.useRef(0),k=V.useRef(``),ee=V.useRef(0),A=V.useRef(null),j=V.useRef(`right`),M=V.useRef(0),N=e=>{let t=k.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=wc(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){k.current=t,clearTimeout(O.current),t!==``&&(O.current=setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};V.useEffect(()=>()=>clearTimeout(O.current),[]),V.useEffect(()=>{if(!y.open)return;let e=requestAnimationFrame(()=>{let e=T.current?.querySelector(`[data-hanzogui-menu-content]`);e&&(E.current=e)});return()=>cancelAnimationFrame(e)},[y.open]),V.useEffect(()=>{if(h||!y.open)return;let e=e=>{let t=e.target;if(!t||T.current?.contains(t))return;let n=x.refs?.reference?.current,r=n instanceof Element?n:n?.contextElement??null;(!r||t.contains(r))&&p?.()};return window.addEventListener(`scroll`,e,{capture:!0,passive:!0}),()=>{window.removeEventListener(`scroll`,e,{capture:!0})}},[h,y.open,p,x.refs]),hs();let P=V.useCallback(e=>{let t=j.current===A.current?.side,n=Ec(e,A.current?.area);return t&&n},[]),te=(0,H.jsx)(yn,{role:`menu`,tabIndex:-1,unstyled:g,...!g&&{backgroundColor:`$background`,borderWidth:1,borderColor:`$borderColor`,outlineWidth:0,minWidth:180},"aria-orientation":`vertical`,"data-state":yc(y.open),"data-hanzogui-menu-content":``,dir:b.dir,scope:n||_c,...v,ref:D,className:v.transition?void 0:v.className,onKeyDown:I(v.onKeyDown,e=>{let t=e.target.closest(`[data-hanzogui-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&N(e.key));let i=e.target.hasAttribute(`data-hanzogui-menu-content`);if(!t||!i||!sc.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);oc.includes(e.key)&&a.reverse(),Sc(a,{focusVisible:!0})}),onBlur:I(e.onBlur,e=>{e.currentTarget?.contains(e.target)||(clearTimeout(O.current),k.current=``)}),onPointerMove:I(e.onPointerMove,e=>{if(e.pointerType!==`mouse`)return;let t=e.target,n=M.current!==e.clientX;if(e.currentTarget?.contains(t)&&n){let t=e.clientX>M.current?`right`:`left`;j.current=t,M.current=e.clientX}})});return(0,H.jsx)(_,{scope:n,searchRef:k,onItemEnter:V.useCallback(e=>{P(e)&&e.preventDefault()},[P]),onItemLeave:V.useCallback(e=>{P(e)||(E.current?.focus(),w(null))},[P]),onTriggerLeave:V.useCallback(e=>{P(e)&&e.preventDefault()},[P]),pointerGraceTimerRef:ee,onPointerGraceIntentChange:V.useCallback(e=>{A.current=e},[]),children:(0,H.jsx)(jt,{enabled:m,children:(0,H.jsx)(ft,{asChild:!1,trapped:i,onMountAutoFocus:I(a,e=>{e.preventDefault(),document.querySelector(`[data-hanzogui-menu-content]`)?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,H.jsx)(Ct,{disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,asChild:!0,children:(0,H.jsx)(qs,{asChild:!0,__scopeRovingFocusGroup:n||_c,dir:b.dir,orientation:`vertical`,loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:I(c,e=>{b.isUsingKeyboardRef.current||e.preventDefault()}),children:te})})})})})});y.displayName=g;let w=`MenuItem`,E=`menu.itemSelect`,D=e.styleable((e,t)=>{let{disabled:n=!1,onSelect:r,preventCloseOnSelect:i,children:a,scope:o=_c,destructive:s,hidden:c,androidIconName:l,iosIconName:u,...d}=e,f=V.useRef(null),p=gc(o),m=v(o),h=he(t,f),g=V.useRef(!1),_=()=>{let e=f.current;if(!n&&e){let t=e,n=new CustomEvent(E,{bubbles:!0,cancelable:!0});t.addEventListener(E,e=>r?.(e),{once:!0}),Pt(t,n),n.defaultPrevented||i?g.current=!1:p.onClose()}},y=typeof a==`string`?(0,H.jsx)(T,{children:a}):a;return(0,H.jsx)(O,{outlineStyle:`none`,...d,scope:o,ref:h,disabled:n,onPress:I(e.onPress,_),onPointerDown:t=>{e.onPointerDown?.(t),g.current=!0},onPointerUp:I(e.onPointerUp,e=>{g.current||e.currentTarget?.click()}),onKeyDown:I(e.onKeyDown,e=>{let t=m.searchRef.current!==``;n||t&&e.key===` `||ic.includes(e.key)&&(e.currentTarget?.click(),e.preventDefault())}),children:y})}),O=V.forwardRef((t,n)=>{let{scope:r=_c,disabled:i=!1,textValue:a,unstyled:o={}.GUI_HEADLESS===`1`,...s}=t,c=v(r),l=V.useRef(null),u=he(n,l),[d,f]=V.useState(!1),[p,m]=V.useState(``);return V.useEffect(()=>{let e=l.current;e&&m((e.textContent??``).trim())},[s.children]),(0,H.jsx)(dc.ItemSlot,{scope:r,disabled:i,textValue:a??p,children:(0,H.jsx)(qs.Item,{asChild:!0,__scopeRovingFocusGroup:r,focusable:!i,children:(0,H.jsx)(e,{unstyled:o,componentName:w,role:`menuitem`,"data-highlighted":d?``:void 0,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,...s,ref:u,onPointerMove:I(t.onPointerMove,e=>{e.pointerType===`mouse`&&(i?c.onItemLeave(e):(c.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0,focusVisible:!1})))}),onPointerLeave:I(t.onPointerLeave,e=>{c.onItemLeave(e)}),onFocus:I(t.onFocus,()=>f(!0)),onBlur:I(t.onBlur,()=>f(!1))})})})});D.displayName=w;let k=t.styleable((e,n)=>(0,H.jsx)(t,{...e,ref:n}));k.displayName=`MenuItemTitle`;let ee=r.styleable((e,t)=>(0,H.jsx)(r,{...e,ref:t}));ee.displayName=`MenuItemSubTitle`;let A=V.forwardRef((e,t)=>{let{ios:n,androidIconName:r,iosIconName:a,...o}=e;return(0,H.jsx)(i,{...o,ref:t})});A.displayName=`MenuItemImage`;let j=a.styleable((e,t)=>{let{ios:n,android:r,androidIconName:i,iosIconName:o,...s}=e;return(0,H.jsx)(a,{...s,ref:t})});j.displayName=`MenuItemIcon`;let N=`MenuCheckboxItem`,P=e.styleable((e,t)=>{let{checked:n=!1,onCheckedChange:r,scope:i=_c,value:a,onValueChange:o,...s}=e;return(0,H.jsx)(R,{scope:i,checked:n,children:(0,H.jsx)(D,{componentName:N,role:`menuitemcheckbox`,"aria-checked":bc(n)?`mixed`:n,...s,scope:i,ref:t,"data-state":xc(n),onSelect:I(s.onSelect,()=>r?.(bc(n)?!0:!n),{checkDefaultPrevented:!1})})})});P.displayName=N;let te=`MenuRadioGroup`,{Provider:F,useStyledContext:ne}=S(),re=c.styleable((e,t)=>{let{value:n,onValueChange:r,scope:i=_c,...a}=e,o=zn(r);return(0,H.jsx)(F,{scope:i,value:n,onValueChange:o,children:(0,H.jsx)(c,{componentName:te,...a,ref:t})})});re.displayName=te;let ie=`MenuRadioItem`,L=e.styleable((e,t)=>{let{value:n,scope:r=_c,...i}=e,a=ne(r),o=n===a.value;return(0,H.jsx)(R,{scope:r,checked:o,children:(0,H.jsx)(D,{componentName:ie,...i,scope:r,"aria-checked":o,ref:t,role:`menuitemradio`,"data-state":xc(o),onSelect:I(i.onSelect,()=>a.onValueChange?.(n),{checkDefaultPrevented:!1})})})});L.displayName=ie;let ae=`MenuItemIndicator`,{Provider:R,useStyledContext:ce}=S(),ue=o.styleable((e,t)=>{let{scope:n=_c,forceMount:r,...i}=e,a=ce(n);return(0,H.jsx)(kn,{children:r||bc(a.checked)||a.checked===!0?(0,H.jsx)(o,{componentName:ae,render:`span`,...i,ref:t,"data-state":xc(a.checked)}):null})});ue.displayName=ae;let de=V.forwardRef(function(e,t){let{scope:n=_c,unstyled:r={}.GUI_HEADLESS===`1`,...i}=e;return(0,H.jsx)(An,{scope:n,componentName:`PopperArrow`,unstyled:r,...!r&&{backgroundColor:`$background`},...i,ref:t})}),{Provider:fe,useStyledContext:pe}=S(),me=e=>{let t=Xa(),{scope:n=_c}=e,r=gc(n),i=en(n).placement?.split(`-`)[0],a=i===`left`||i===`right`,o=t?`bottom`:a?`${i}-start`:r.dir===`rtl`?`left-start`:`right-start`,{children:s,open:c=!1,onOpenChange:l,allowFlip:u={padding:10},stayInFrame:d={padding:10},placement:f=o,...p}=e,m=V.useMemo(()=>{if(!a||typeof u==`boolean`||u.fallbackPlacements)return u;let e=f.split(`-`)[0],t=f.split(`-`)[1]||`start`,n=t===`start`?`end`:`start`;if(e===`left`||e===`right`){let r=e===`right`?`left`:`right`;return{...typeof u==`object`?u:{},fallbackPlacements:[`${e}-${n}`,`${r}-${t}`,`${r}-${n}`]}}return u},[a,u,f]),h=mc(n),[g,_]=V.useState(null),[v,y]=V.useState(null),b=zn(l);return V.useEffect(()=>(h.open===!1&&b(!1),()=>b(!1)),[h.open,b]),(0,H.jsx)($e,{open:c,placement:f,allowFlip:m,stayInFrame:d,...p,scope:n,children:(0,H.jsx)(pc,{scope:n,open:c,onOpenChange:b,content:v,onContentChange:y,children:(0,H.jsx)(fe,{scope:n,contentId:(0,V.useId)(),triggerId:(0,V.useId)(),trigger:g,onTriggerChange:_,children:s})})})};me.displayName=`MenuSub`;let ge=`MenuSubTrigger`,_e=V.forwardRef((e,t)=>{let n=e.scope||_c,r=mc(n),i=gc(n),a=pe(n),o=v(n),s=en(n),c=V.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:u}=o,d=i.dir,p=V.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return V.useEffect(()=>p,[p]),V.useEffect(()=>{let e=l.current;return()=>{window.clearTimeout(e),u(null)}},[l,u]),(0,H.jsx)(f,{componentName:ge,asChild:`except-style`,scope:n,children:(0,H.jsx)(O,{id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":r.open,"aria-controls":a.contentId,"data-state":yc(r.open),outlineStyle:`none`,...e,ref:le(t,a.onTriggerChange),onPress:t=>{e.onPress?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,rc(t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(o.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),p()},100))})),onPointerLeave:I(e.onPointerLeave,e=>{let t=e;p();let n=r.content?.getBoundingClientRect();if(n){let e=r.content,i=(e?.dataset?.side?e:e?.querySelector(`[data-side]`))?.dataset?.side||`right`,a=i===`right`,s=a?-5:5,c=n[a?`left`:`right`],u=n[a?`right`:`left`],d={area:[{x:t.clientX+s,y:t.clientY},{x:c,y:n.top},{x:u,y:n.top},{x:u,y:n.bottom},{x:c,y:n.bottom}],side:i};o.onPointerGraceIntentChange(d),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else if(a.trigger){let e=a.trigger?.getBoundingClientRect();if(e){let n=s.placement?.split(`-`)[0],r=n===`left`||n===`right`?n:i.dir===`rtl`?`left`:`right`,a=r===`right`,c=a?-5:5,u=a?e.right+4:e.left-4,d=a?u+200:u-200,f={area:[{x:t.clientX+c,y:t.clientY},{x:u,y:e.top-50},{x:d,y:e.top-50},{x:d,y:e.bottom+50},{x:u,y:e.bottom+50}],side:r};o.onPointerGraceIntentChange(f),window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}}else{if(o.onTriggerLeave(t),t.defaultPrevented)return;o.onPointerGraceIntentChange(null)}}),onKeyDown:I(e.onKeyDown,t=>{let n=o.searchRef.current!==``;if(!(e.disabled||n&&t.key===` `)&&cc[d].includes(t.key)){if(r.open&&r.content){let e=r.content.querySelector?.(`[role="menuitem"]:not([data-disabled])`);if(e){e.focus({focusVisible:!0}),t.preventDefault();return}}let e=t.currentTarget;s.refs?.setReference(e),r.onOpenChange(!0),requestAnimationFrame(()=>{s.update?.()}),r.content?.focus({focusVisible:!0}),t.preventDefault()}})})})});_e.displayName=ge;let ve=`MenuSubContent`,ye=M(Dn,{name:ve}).styleable((e,t)=>{let n=e.scope||_c,r=m(n),{forceMount:i=r.forceMount,...a}=e,o=mc(n),s=gc(n),c=pe(n),l=en(n),u=V.useRef(null),d=he(t,u),f=l.placement?.split(`-`)[0],p=f===`left`||f===`right`?f:s.dir===`rtl`?`left`:`right`,h=s.dir;return(0,H.jsx)(dc.Provider,{scope:n,children:(0,H.jsx)(dc.Slot,{scope:n,children:(0,H.jsx)(C,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:d,"data-side":p,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{if(s.isUsingKeyboardRef.current){let e=u.current;(e?.querySelector?.(`[data-hanzogui-menu-content]`)||e)?.focus({preventScroll:!0})}e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:I(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,e=>{o.onOpenChange(!1),c.trigger?.focus({focusVisible:!0}),e.preventDefault()}),onKeyDown:I(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=lc[h].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus({focusVisible:!0}),e.preventDefault())})})})})});ye.displayName=ve;let be=f,xe=h,Se=y,z=c.styleable((e,t)=>(0,H.jsx)(c,{...e,ref:t}));z.displayName=`MenuGroup`;let Ce=l.styleable((e,t)=>(0,H.jsx)(l,{...e,ref:t}));Ce.displayName=`MenuLabel`;let we=D,Te=P,Ee=re,De=L,Oe=ue,ke=s.styleable((e,t)=>(0,H.jsx)(s,{...e,ref:t}));return ke.displayName=`MenuSeparator`,{Menu:oe(u,{Anchor:be,Portal:xe,Content:Se,Group:z,Label:Ce,Item:we,CheckboxItem:Te,RadioGroup:Ee,RadioItem:De,ItemIndicator:Oe,Separator:ke,Arrow:de,Sub:me,SubTrigger:_e,SubContent:ye,ItemTitle:k,ItemSubtitle:ee,ItemImage:A,ItemIcon:j})}}function yc(e){return e?`open`:`closed`}function bc(e){return e===`indeterminate`}function xc(e){return bc(e)?`indeterminate`:e?`checked`:`unchecked`}function Sc(e,t){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:!0,focusVisible:t?.focusVisible}),document.activeElement!==n))return}function Cc(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function wc(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Cc(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function Tc(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e].x,s=t[e].y,c=t[a].x,l=t[a].y;s>r!=l>r&&n<(c-o)*(r-s)/(l-s)+o&&(i=!i)}return i}function Ec(e,t){return t?Tc({x:e.clientX,y:e.clientY},t):!1}var Dc=(()=>null);function Oc(){return{Menu:oe(Dc,{Trigger:Dc,Content:Dc,Item:Dc,ItemTitle:Dc,ItemSubtitle:Dc,SubTrigger:Dc,Group:Dc,ItemIcon:Dc,Separator:Dc,CheckboxItem:Dc,ItemIndicator:Dc,ItemImage:Dc,Label:Dc,Arrow:Dc,Sub:Dc,SubContent:Dc,Preview:Dc,Portal:Dc,RadioGroup:Dc,RadioItem:Dc,Auxiliary:Dc})}}var kc=e=>Oc();function Ac({Component:e,NativeComponent:t}){return e}var jc=`MenuContext`;function Mc(e){let t=V.useRef(new Map),n=V.useRef(null),r=f(r=>{let i=n.current;i!==r&&(i&&t.current.get(i)?.(!1),n.current=r,r&&e&&t.current.get(r)?.(!0))}),i=f((r,i)=>{t.current.set(r,i),i(n.current===r&&e)}),a=f(e=>{t.current.delete(e),n.current===e&&(n.current=null)});return V.useEffect(()=>{if(!e){r(null);return}let i=n.current;i&&t.current.get(i)?.(!0)},[e,r]),{setActiveTrigger:r,registerTrigger:i,unregisterTrigger:a}}function Nc(e){let{Menu:t}=vc(e),{Provider:r,useStyledContext:i}=S(),a=e=>{let{scope:n,children:i,dir:a,open:o,defaultOpen:s,onOpenChange:c,modal:l=!0,...u}=e,d=V.useRef(null),[f=!1,p]=et({prop:o,defaultProp:s,onChange:c}),m=V.useRef(f);m.current=f;let{setActiveTrigger:h,registerTrigger:g,unregisterTrigger:_}=Mc(f);return(0,H.jsx)(r,{scope:n,triggerId:(0,V.useId)(),triggerRef:d,contentId:(0,V.useId)(),openRef:m,onOpenChange:V.useCallback(e=>p(e),[p]),onOpenToggle:V.useCallback(()=>p(e=>!e),[p]),modal:l,setActiveTrigger:h,registerTrigger:g,unregisterTrigger:_,children:(0,H.jsx)(t,{scope:n||`MenuContext`,open:f,onOpenChange:p,dir:a,modal:l,...u,children:i})})};a.displayName=`Menu`;let o=`MenuTrigger`,s=t.Anchor,c=n.styleable((e,t)=>{let{scope:r,asChild:a,children:c,disabled:l=!1,onKeydown:u,...d}=e,f=i(r),p=xn(r||`MenuContext`),m=a?_e:n,h=Xa(),g=V.useRef(null),_=V.useId(),[v,y]=V.useState(!1),{registerTrigger:b,unregisterTrigger:x}=f;V.useEffect(()=>(b(_,y),()=>x(_)),[b,x,_]);let S=V.useCallback(()=>{f.setActiveTrigger(_);let e=g.current;e&&(f.triggerRef.current=e,e instanceof HTMLElement&&(p.refs?.setReference(e),requestAnimationFrame(()=>p.update?.())))},[f,_,p]),C=h?`onClick`:`onPointerDown`;return(0,H.jsx)(s,{asChild:!0,componentName:o,scope:r||`MenuContext`,children:(0,H.jsx)(m,{role:`button`,id:f.triggerId,"aria-haspopup":`menu`,"aria-expanded":v,"aria-controls":v?f.contentId:void 0,"data-state":v?`open`:`closed`,"data-disabled":l?``:void 0,"aria-disabled":l||void 0,ref:le(t,f.triggerRef,g),[C]:I(e[C],e=>{if(!l){if(e instanceof PointerEvent&&e.button!==0&&e.ctrlKey===!0)return;f.openRef.current?f.setActiveTrigger(null):S(),f.onOpenToggle(),f.openRef.current||e.preventDefault()}}),onKeyDown:I(u,e=>{l||([`Enter`,` `].includes(e.key)&&(f.openRef.current?f.setActiveTrigger(null):S(),f.onOpenToggle()),e.key===`ArrowDown`&&(S(),f.onOpenChange(!0)),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())}),...d,children:c})})});c.displayName=o;let l=e=>{let{scope:n,children:a,...o}=e,s=Se?i(n):null,c=Se?(0,H.jsx)(r,{...s,children:a}):a;return(0,H.jsx)(t.Portal,{scope:n||`MenuContext`,...o,children:c})};l.displayName=`MenuPortal`;let u=V.forwardRef((e,n)=>{let{scope:r,...a}=e,o=i(r),s=V.useRef(!1);return(0,H.jsx)(t.Content,{id:o.contentId,"aria-labelledby":o.triggerId,scope:r||`MenuContext`,...a,ref:n,onCloseAutoFocus:I(e.onCloseAutoFocus,e=>{s.current||requestAnimationFrame(()=>{let e=document.activeElement;(!e||e===document.body)&&o.triggerRef.current?.focus()}),s.current=!1,e.preventDefault()}),onInteractOutside:I(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!o.modal||r)&&(s.current=!0)}),style:{...e.style,"--hanzogui-menu-content-transform-origin":`var(--hanzogui-popper-transform-origin)`,"--hanzogui-menu-content-available-width":`var(--hanzogui-popper-available-width)`,"--hanzogui-menu-content-available-height":`var(--hanzogui-popper-available-height)`,"--hanzogui-menu-trigger-width":`var(--hanzogui-popper-anchor-width)`,"--hanzogui-menu-trigger-height":`var(--hanzogui-popper-anchor-height)`}})});u.displayName=`MenuContent`;let d=e=>{let{scope:n,children:r,open:i,onOpenChange:a,defaultOpen:o,...s}=e,[c=!1,l]=et({prop:i,defaultProp:o,onChange:a});return(0,H.jsx)(t.Sub,{scope:n||`MenuContext`,open:c,onOpenChange:l,...s,children:r})};d.displayName=`MenuSub`;let f=V.forwardRef((e,n)=>{let{scope:r,...i}=e;return(0,H.jsx)(t.SubContent,{scope:r||`MenuContext`,...i,ref:n,style:{...e.style,"--hanzogui-menu-content-transform-origin":`var(--hanzogui-popper-transform-origin)`,"--hanzogui-menu-content-available-width":`var(--hanzogui-popper-available-width)`,"--hanzogui-menu-content-available-height":`var(--hanzogui-popper-available-height)`,"--hanzogui-menu-trigger-width":`var(--hanzogui-popper-anchor-width)`,"--hanzogui-menu-trigger-height":`var(--hanzogui-popper-anchor-height)`}})});f.displayName=`MenuSubContent`;let p=M(Mt,{flexShrink:1,alignSelf:`stretch`,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,"$platform-web":{maxHeight:`var(--hanzogui-menu-content-available-height)`}}),m=t.Group,h=t.Label,g=t.Item,_=t.CheckboxItem,v=t.RadioGroup,y=t.RadioItem,b=t.ItemIndicator,x=t.Separator,C=t.Arrow,w=t.SubTrigger,T=t.ItemTitle,E=t.ItemSubtitle,D=t.ItemImage,O=t.ItemIcon;return oe(a,{Root:a,Trigger:c,Portal:l,Content:u,Group:m,Label:h,Item:g,CheckboxItem:_,RadioGroup:v,RadioItem:y,ItemIndicator:b,Separator:x,Arrow:C,Sub:d,SubTrigger:w,SubContent:f,ItemTitle:T,ItemSubtitle:E,ItemImage:D,ItemIcon:O,ScrollView:p})}function Pc(e){let{Menu:t}=kc(`Menu`),n=Nc(e),r={isRoot:!1,scope:jc},i=Ac({...r,Component:n.Root,NativeComponent:t,isRoot:!0}),a=Ac({...r,Component:n.Trigger,NativeComponent:t.Trigger}),o=Ac({...r,Component:n.Portal,NativeComponent:V.Fragment}),s=Ac({...r,Component:n.Content,NativeComponent:t.Content}),c=Ac({...r,Component:n.Group,NativeComponent:t.Group}),l=Ac({...r,Component:n.Label,NativeComponent:t.Label}),u=Ac({...r,Component:n.Item,NativeComponent:t.Item}),d=Ac({...r,Component:n.ItemTitle,NativeComponent:t.ItemTitle}),f=Ac({...r,Component:n.ItemSubtitle,NativeComponent:t.ItemSubtitle}),p=Ac({...r,Component:n.ItemIcon,NativeComponent:t.ItemIcon}),m=Ac({...r,Component:n.ItemImage,NativeComponent:t.ItemImage}),h=Ac({...r,Component:n.CheckboxItem,NativeComponent:t.CheckboxItem}),g=Ac({...r,Component:n.RadioGroup,NativeComponent:({children:e})=>(0,H.jsx)(H.Fragment,{children:e})}),_=Ac({...r,Component:n.RadioItem,NativeComponent:({children:e})=>(0,H.jsx)(H.Fragment,{children:e})}),v=Ac({...r,Component:n.ItemIndicator,NativeComponent:t.ItemIndicator}),y=Ac({...r,Component:n.Separator,NativeComponent:t.Separator}),b=Ac({...r,Component:n.Arrow,NativeComponent:t.Arrow}),x=Ac({...r,Component:n.Sub,NativeComponent:t.Sub}),S=Ac({...r,Component:n.SubTrigger,NativeComponent:t.SubTrigger}),C=Ac({...r,Component:n.SubContent,NativeComponent:t.SubContent}),w=n.ScrollView;return oe(i,{Trigger:a,Portal:o,Content:s,Group:c,Label:l,Item:u,CheckboxItem:h,RadioGroup:g,RadioItem:_,ItemIndicator:v,Separator:y,Arrow:b,Sub:x,SubTrigger:S,SubContent:C,ItemTitle:d,ItemSubtitle:f,ItemIcon:p,ItemImage:m,ScrollView:w})}var Fc=Pc({Icon:nc.MenuIcon,Image:nc.MenuImage,Indicator:nc.MenuIndicator,Item:nc.MenuItem,Label:nc.MenuLabel,MenuGroup:nc.MenuGroup,Separator:nc.MenuSeparator,SubTitle:nc.SubTitle,Title:nc.Title}),Ic=M(w,{name:`Separator`,variants:{unstyled:{false:{borderColor:`$borderColor`,flexShrink:0,borderWidth:0,flex:1,height:0,maxHeight:0,borderBottomWidth:1,y:-.5}},vertical:{true:{y:0,x:-.5,height:`initial`,maxHeight:`initial`,width:0,maxWidth:0,borderBottomWidth:0,borderRightWidth:1}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Lc=(0,V.createContext)(void 0),{Provider:Rc,useStyledContext:zc}=S(null,`Select`),{Provider:Bc,useStyledContext:Vc}=S(null,`SelectItem`),Hc=({context:e,itemContext:t,children:n})=>$t().state.type===`teleport`?n:(0,H.jsx)(Rc,{isInSheet:!0,scope:e.scopeName,...e,children:(0,H.jsx)(Bc,{scope:e.scopeName,...t,children:n})}),Uc=e=>{let t=St(e.adaptScope);return e.open!==!1&&t},Wc=({children:e,scope:t,...n})=>{let r=zc(t),i=Vc(t),a=(0,V.useContext)(Lc),o=Uc(r),s=e;return i.shouldRenderWebNative?(0,H.jsx)(H.Fragment,{children:e}):o?r.open?(0,H.jsx)(H.Fragment,{children:s}):null:(0,H.jsx)(Jt,{open:r.open,zIndex:a,stackZIndex:1e5,children:(0,H.jsx)(jt,{enabled:r.open&&!r.disablePreventBodyScroll,children:(0,H.jsx)(Ct,{asChild:!0,forceUnmount:!r.open,onDismiss:()=>i.setOpen(!1),onFocusOutside:e=>e.preventDefault(),onPointerDownOutside:e=>e.preventDefault(),children:(0,H.jsx)(ft,{...n,enabled:!!r.open,trapped:!0,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:e=>{e.preventDefault();let t=r.floatingContext?.refs?.reference?.current;t instanceof HTMLElement&&t.focus()},children:(0,H.jsx)(`div`,{style:{display:`contents`},children:s})})})})})},Gc=`SelectViewport`,Kc=e=>{let{scope:t,children:n,open:r=!1,listContentRef:i,setActiveIndexFast:a}=e,o=zc(t),s=Vc(t),{setActiveIndex:c,selectedIndex:l,activeIndexRef:u}=o,{setOpen:d,setSelectedIndex:p}=s,[m,h]=V.useState(0),g=Xa(),_=V.useRef([]),v=V.useRef(null),y=V.useRef(null),x=V.useRef(null),S=V.useRef(!1),C=V.useRef(!0),w=V.useRef(null),T=V.useRef({isMouseOutside:!1,isTyping:!1}),[E,D]=V.useState(!1),[O,k]=V.useState(!1),[ee,A]=V.useState(0),[j,M]=V.useState(!1),N=V.useRef({});V.useEffect(()=>{r?a(l??0):(h(0),k(!1),a(null),D(!1))},[r,l,a]),b(()=>{if(!r)return;let e=e=>{T.current.isMouseOutside&&d(!1)};return document.addEventListener(`mouseup`,e),()=>{document.removeEventListener(`mouseup`,e)}},[r]);let{x:P,y:te,strategy:F,refs:I,update:ne,placement:re}=kt({open:r,placement:`bottom-start`,whileElementsMounted:hn,middleware:[ct({apply({rects:{reference:{width:e}}}){Object.assign(N.current,{minWidth:e+8}),I.floating.current&&Object.assign(I.floating.current.style,N.current)}}),Fs({listRef:_,overflowRef:v,index:l,offset:ee,onFallbackChange:k,padding:10,minItemsVisible:g?10:4,referenceOverflowThreshold:20}),ut({crossAxis:-5})]}),ie=I.floating,L=r&&m>8,ae=r&&ie.current&&m<ie.current.scrollHeight-ie.current.clientHeight-8,oe=ae||L;b(()=>{if(!(typeof window>`u`))return window.addEventListener(`resize`,ne),r&&ne(),()=>window.removeEventListener(`resize`,ne)},[ne,r]);let R=f(e=>(r?c:p)(e)),se=V.useRef({});se.current.placement=re;let ce={open:r,onOpenChange:e=>d(e),refs:{reference:I.reference,floating:I.floating,domReference:I.reference},elements:{reference:I.reference?.current||null,floating:I.floating?.current||null,domReference:I.reference?.current||null},dataRef:se},le=[bs(ce,{event:`mousedown`,keyboardHandlers:!1}),gn(ce,{role:`listbox`}),Ns(ce,{enabled:!O&&oe,onChange:A,overflowRef:v,scrollRef:I.floating}),As(ce,{listRef:_,activeIndex:o.activeIndex??0,selectedIndex:l,onNavigate:e=>{e!==null&&c(e)},scrollItemIntoView:!1}),js(ce,{listRef:i,onMatch:R,selectedIndex:l,activeIndex:o.activeIndex,onTypingChange:e=>{T.current.isTyping=e}})],ue=Fn(V.useMemo(()=>le,le)),de=V.useMemo(()=>({...ue,getReferenceProps(){return ue.getReferenceProps({ref:I.reference,className:`SelectTrigger`,onKeyDown(e){(e.key===`Enter`||e.code===`Space`||e.key===` `&&!T.current.isTyping)&&(e.preventDefault(),d(!0))}})},getFloatingProps(e){return ue.getFloatingProps({ref:I.floating,className:`Select`,...e,style:{position:F,top:te??``,left:P??``,outline:0,scrollbarWidth:`none`,...N.current,...e?.style},onPointerEnter(){D(!1),T.current.isMouseOutside=!1},onPointerLeave(){T.current.isMouseOutside=!0},onPointerMove(){T.current.isMouseOutside=!1,D(!1)},onKeyDown(){D(!0)},onContextMenu(e){e.preventDefault()},onScroll(e){(0,Ms.flushSync)(()=>{h(e.currentTarget.scrollTop)})}})}}),[I.reference.current,P,te,I.floating.current,ue]);b(()=>{if(r)return C.current=!1,w.current=setTimeout(()=>{S.current=!0,C.current=!0},300),()=>{clearTimeout(w.current)};S.current=!1,C.current=!0,A(0),k(!1),M(!1)},[r]),b(()=>{!r&&T.current.isMouseOutside&&(T.current.isMouseOutside=!1)},[r]),b(()=>{function e(e){let t=e.target;I.floating.current?.contains(t)||y.current?.contains(t)||x.current?.contains(t)||(d(!1),D(!1))}if(r)return document.addEventListener(`pointerdown`,e),()=>{document.removeEventListener(`pointerdown`,e)}},[r,I,d]),V.useEffect(()=>{if(!r)return;let e=e=>{E&&e!=null&&_.current[e]?.scrollIntoView({block:`nearest`}),h(I.floating.current?.scrollTop??0)};return e(u.current),s.activeIndexSubscribe(e)},[r,I,E,s.activeIndexSubscribe]),V.useEffect(()=>{r&&O&&l!=null&&_.current[l]?.scrollIntoView({block:`nearest`})},[r,O,l]),b(()=>{I.floating.current&&O&&(I.floating.current.style.maxHeight=``)},[I,O]);let fe=V.useMemo(()=>({refs:I,dataRef:se}),[I]);return(0,H.jsx)(Rc,{scope:t,...o,setScrollTop:h,setInnerOffset:A,fallback:O,floatingContext:fe,canScrollDown:!!ae,canScrollUp:!!L,controlledScrolling:E,blockSelection:j,upArrowRef:y,downArrowRef:x,update:ne,children:(0,H.jsx)(Bc,{scope:t,...s,allowMouseUpRef:C,allowSelectRef:S,dataRef:se,interactions:de,listRef:_,selectTimeoutRef:w,children:n})})},qc=`SelectItem`,{Provider:Jc,useStyledContext:Yc}=S(null,qc),Xc=ps.Frame.styleable(function(e,t){let{scope:n,value:r,disabled:i=!1,textValue:a,index:o,...s}=e,{setSelectedIndex:c,listRef:l,setOpen:u,onChange:d,activeIndexSubscribe:f,activeIndexRef:p,valueSubscribe:m,allowMouseUpRef:h,allowSelectRef:g,setValueAtIndex:_,selectTimeoutRef:v,dataRef:y,interactions:x,shouldRenderWebNative:S,size:C,onActiveChange:w,initialValue:T,setActiveIndexFast:E}=Vc(n),[D,O]=V.useState(T===r);b(()=>{T===r&&c(o)},[]),V.useEffect(()=>{let e=e=>{o===e&&(w(r,o),requestAnimationFrame(()=>{l?.current[o]?.focus()}))},t=p?.current;return t!=null&&e(t),f(e)},[o]),V.useEffect(()=>m(e=>{O(e===r)}),[r]);let k=V.useId(),ee=V.useCallback(e=>{e instanceof HTMLElement&&l&&(l.current[o]=e)},[o,l]),A=he(t,ee);b(()=>{_(o,r)},[o,_,r]);function j(){c(o),d(r),u(!1)}let M=V.useMemo(()=>x?x.getItemProps({onTouchMove(){g.current=!0,h.current=!1},onTouchEnd(){g.current=!1,h.current=!0},onKeyDown(e){if(e.key===`Enter`||e.key===` `&&!y?.current.typing)e.preventDefault(),j();else if(e.key===`ArrowDown`||e.key===`ArrowUp`){e.preventDefault(),e.stopPropagation();let t=l?.current.length??0;if(t===0)return;let n;n=e.key===`ArrowDown`?o+1>=t?0:o+1:o-1<0?t-1:o-1,E?.(n)}else g.current=!0},onClick(){g.current&&j()},onMouseUp(){if(!h.current){h.current=!0,g.current=!0;return}g.current&&j(),clearTimeout(v.current),v.current=setTimeout(()=>{g.current=!0})}}):{onPress:j},[j,o,l,E]);return(0,H.jsx)(Jc,{scope:n,value:r,textId:k||``,isSelected:D,children:S?(0,H.jsx)(`option`,{value:r,children:e.children}):(0,H.jsx)(ps.Frame,{render:`div`,componentName:qc,ref:A,role:`option`,"aria-labelledby":k,"aria-selected":D,"data-state":D?`active`:`inactive`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...!e.unstyled&&{cursor:`default`,size:C,outlineOffset:-.5,zIndex:100,hoverStyle:{backgroundColor:`$backgroundHover`},pressStyle:{backgroundColor:`$backgroundPress`},focusStyle:{backgroundColor:`$backgroundFocus`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:1,outlineStyle:`solid`}},...s,...M})})},{disableTheme:!0}),Zc=M(a,{name:`SelectItemText`,variants:{unstyled:{false:{userSelect:`none`,color:`$color`,ellipsis:!0}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Qc=Zc.styleable(function(e,t){let{scope:n,className:r,...i}=e,a=Vc(n),o=V.useRef(null),s=he(t,o),c=Yc(n),l=V.useRef(null);return l.current=(0,H.jsx)(Zc,{className:r,size:a.size,id:c.textId,...i,ref:s}),b(()=>{a.initialValue===c.value&&a.setSelectedItem(l.current)},[]),b(()=>a.valueSubscribe(e=>{e===c.value&&a.setSelectedItem(l.current)}),[c.value]),a.shouldRenderWebNative?(0,H.jsx)(H.Fragment,{children:e.children}):(0,H.jsx)(H.Fragment,{children:l.current})}),$c=`SelectScrollUpButton`,el=V.forwardRef((e,t)=>(0,H.jsx)(rl,{componentName:$c,...e,dir:`up`,ref:t}));el.displayName=$c;var tl=`SelectScrollDownButton`,nl=V.forwardRef((e,t)=>(0,H.jsx)(rl,{componentName:tl,...e,dir:`down`,ref:t}));nl.displayName=tl;var rl=V.memo(V.forwardRef((e,t)=>{let{scope:n,dir:r,componentName:i,...a}=e,{forceUpdate:o,open:s,fallback:c,setScrollTop:l,setInnerOffset:u,...d}=zc(n),f=d.floatingContext?.refs.floating,p=V.useRef(`idle`),m=d[r===`down`?`canScrollDown`:`canScrollUp`],h=V.useRef(null),{x:g,y:_,refs:v,strategy:y}=kt({open:s&&m,strategy:`fixed`,elements:{reference:f?.current},placement:r===`up`?`top`:`bottom`,middleware:[ut(({rects:e})=>-e.floating.height)],whileElementsMounted:(...e)=>hn(...e,{animationFrame:!0})}),b=he(t,v.setFloating);if(!m)return null;let x=e=>{let t=f;t&&(c?t.current&&(t.current.scrollTop-=e,(0,Ms.flushSync)(()=>l(t.current?.scrollTop??0))):(0,Ms.flushSync)(()=>u(t=>t-e)))};return(0,H.jsx)(z,{ref:b,componentName:i,"aria-hidden":!0,...a,zIndex:1e3,position:y,left:g||0,top:_||0,width:`calc(${(f?.current?.offsetWidth??0)-2}px)`,onPointerEnter:()=>{p.current=`active`;let e=Date.now();function t(){let n=f?.current;if(n){let i=Date.now(),a=i-e;e=i;let o=a/2,s=r===`up`?n.scrollTop:n.scrollHeight-n.clientHeight-n.scrollTop,c=r===`up`?n.scrollTop-o>0:n.scrollTop+o<n.scrollHeight-n.clientHeight;x(r===`up`?Math.min(o,s):Math.max(-o,-s)),c&&(h.current=requestAnimationFrame(t))}}cancelAnimationFrame(h.current),h.current=requestAnimationFrame(t)},onPointerLeave:()=>{p.current=`idle`,cancelAnimationFrame(h.current)}})})),il=`SelectTrigger`,al=typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(pointer:coarse)`).matches:!0,ol=V.forwardRef(function(e,t){let{scope:n,disabled:r=!1,unstyled:i=!1,...a}=e,o=zc(n),s=Vc(n),c=he(t,o.floatingContext?.refs.setReference);return s.shouldRenderWebNative?null:(0,H.jsx)(ps,{componentName:il,unstyled:i,render:`button`,type:`button`,id:s.id,...!i&&{focusVisibleStyle:{outlineStyle:`solid`,outlineWidth:2,outlineColor:`$outlineColor`},borderWidth:1,size:s.size},role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":o.open,"aria-autocomplete":`none`,dir:o.dir,disabled:r,"data-disabled":r?``:void 0,...a,ref:c,...s.interactions?{...s.interactions.getReferenceProps(),...al?{onPress(){s.setOpen(!o.open)}}:{onMouseDown(){o.floatingContext?.update?.(),s.setOpen(!o.open)}}}:{onPress(){s.setOpen(!o.open)}}})}),sl=M(h,{name:Gc,variants:{unstyled:{false:{size:`$2`,backgroundColor:`$background`,elevate:!0,bordered:!0,userSelect:`none`,outlineWidth:0}},size:{"...size":(e,{tokens:t})=>({borderRadius:t.radius[e]??e})}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),cl=bt(),ll=sl.styleable(function(e,t){let{scope:n,children:r,disableScroll:i,...a}=e,o=zc(n),s=Vc(n),c=St(o.adaptScope),[l,u]=V.useState(!o.lazyMount);V.useEffect(()=>{o.lazyMount&&o.open&&(l||an(()=>{u(!0)}))},[o.lazyMount,o.open,l]);let d=he(t,o.floatingContext?.refs.setFloating);if(b(()=>{o.update&&o.update()},[c]),b(()=>{o.lazyMount&&l&&o.open&&o.update&&o.update()},[l]),s.shouldRenderWebNative)return(0,H.jsx)(z,{position:`relative`,children:r});if(c){let e=r;return cl&&(e=(0,H.jsx)(Hc,{itemContext:s,context:o,children:e})),(0,H.jsx)(mt,{scope:o.adaptScope,children:e})}if(!s.interactions)return null;let{style:f,className:p,...m}=s.interactions.getFloatingProps();return(0,H.jsxs)(H.Fragment,{children:[!i&&!e.unstyled&&(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:ul}}),(0,H.jsx)(kn,{children:o.open?(0,H.jsx)(sl,{size:s.size,role:`presentation`,...a,...f,...m,...!e.unstyled&&{overflowY:i?void 0:f.overflow??`auto`},ref:d,children:l?r:null},`select-viewport`):null}),!o.open&&!(o.lazyMount&&o.renderValue)&&l&&(0,H.jsx)(`div`,{style:{display:`none`},children:r})]})}),ul=`
11
- .is_SelectViewport {
12
- scrollbar-width: none;
13
- -webkit-overflow-scrolling: touch;
14
- overscroll-behavior: contain;
15
- }
16
-
17
- .is_SelectViewport::-webkit-scrollbar{
18
- display:none
19
- }
20
- `,dl=M(a,{name:`SelectValue`,userSelect:`none`}),fl=dl.styleable(function({scope:e,children:t,placeholder:n,...r},i){let a=zc(e),o=Vc(e),s=he(i,a.onValueNodeChange),c=a.value==null||a.value===``,l=a.renderValue?.(a.value),u=t??l??o.selectedItem??a.value,d=c?n??u:u;return(0,H.jsx)(dl,{...!r.unstyled&&{size:o.size,ellipsis:!0,pointerEvents:`none`},ref:s,...r,children:pl(d)})});function pl(e){return V.Children.map(e,e=>{if(e){if(e.type?.staticConfig?.componentName===`SelectItemText`)return e.props.children;if(e.props?.children)return pl(e.props.children)}return e})}var ml=M(y,{name:`SelectIcon`,"aria-hidden":!0,children:(0,H.jsx)(Nt,{children:`▼`})}),hl=M(y,{name:`SelectItemIndicator`}),gl=V.forwardRef(function(e,t){let{scope:n,...r}=e,i=Vc(n),a=Yc(n);return i.shouldRenderWebNative?null:a.isSelected?(0,H.jsx)(hl,{"aria-hidden":!0,...r,ref:t}):null}),_l=M(z,{name:`SelectIndicator`,variants:{unstyled:{false:{position:`absolute`,top:0,left:0,pointerEvents:`none`,zIndex:10,backgroundColor:`$background`,borderRadius:0}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),vl=_l.styleable(function({scope:e,...t},n){let r=Vc(e),i=zc(e),[a,o]=V.useState(null),s=V.useRef(0);return V.useLayoutEffect(()=>{let e=e=>{typeof e==`number`&&(cancelAnimationFrame(s.current),s.current=requestAnimationFrame(()=>{let t=r.listRef?.current?.[e];t&&o({width:Math.round(t.offsetWidth),height:Math.round(t.offsetHeight),x:Math.round(t.offsetLeft),y:Math.round(t.offsetTop)})}))};return i.open&&i.activeIndexRef.current!==null&&e(i.activeIndexRef.current),r.activeIndexSubscribe(e)},[i.open,r.listRef]),a?(0,H.jsx)(_l,{ref:n,...t,width:a.width,height:a.height,x:a.x,y:a.y}):null}),yl=`SelectGroup`,{Provider:bl,useStyledContext:xl}=S({id:``},`SelectGroup`),Sl=M(z,{name:yl,width:`100%`}),Cl=M(a,{render:`select`,backgroundColor:`$background`,borderColor:`$borderColor`,hoverStyle:{backgroundColor:`$backgroundHover`}}),wl=M(z,{name:`NativeSelect`,variants:{size:{"...size":(e,t)=>{let{tokens:n}=t,r=j(n.space[e]);return{borderRadius:n.radius[e]??e,minHeight:n.size[e],paddingRight:r+20,paddingLeft:r,paddingVertical:m(e,{shift:-3})}}},unstyled:{false:{borderWidth:1,borderColor:`$borderColor`,userSelect:`none`,outlineWidth:0,paddingRight:10}}},defaultVariants:{size:`$2`,unstyled:{}.GUI_HEADLESS===`1`}}),Tl=V.forwardRef((e,t)=>{let{scope:n,...r}=e,i=V.useId(),a=zc(n),o=Vc(n),s=o.size??`$true`,c=V.useRef(null),l=o.shouldRenderWebNative?(0,H.jsx)(wl,{asChild:!0,size:s,value:a.value,id:o.id,children:(0,H.jsx)(Cl,{onChange:e=>{o.onChange(e.currentTarget.value)},size:s,ref:c,style:{color:`var(--color)`,appearance:`none`},children:e.children})}):(0,H.jsx)(Sl,{role:`group`,"aria-labelledby":i,...r,ref:t});return(0,H.jsx)(bl,{scope:n,id:i||``,children:l})});Tl.displayName=yl;var El=M(a,{name:`SelectLabel`,variants:{unstyled:{false:{size:`$true`,ellipsis:!0,maxWidth:`100%`,cursor:`default`}},size:{"...size":(e,{tokens:t})=>({paddingHorizontal:t.space[e],paddingVertical:m(t.space[e],{shift:-4})})}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Dl=El.styleable((e,t)=>{let{scope:n,...r}=e,i=Vc(n),a=xl(n);return i.shouldRenderWebNative?null:(0,H.jsx)(El,{render:`div`,id:a.id,size:i.size,...r,ref:t})});M(Ic,{name:`SelectSeparator`});var Ol=e=>{let t=zc(e.scope),n=Uc(t),r=St(t.adaptScope),i=E(n);return(0,H.jsx)(Dt,{onOpenChange:t=>{i()&&e.onOpenChange(t)},open:t.open,hidden:!r,children:e.children})},kl=e=>(0,H.jsx)(H.Fragment,{children:e.children}),Al=oe(function(e){let t=`AdaptSelect${e.scope||``}`;return(0,H.jsx)(Wt,{scope:t,portal:!0,children:(0,H.jsx)(Ml,{scope:e.scope,adaptScope:t,...e})})},{Adapt:Bt,Content:Wc,Group:Tl,Icon:ml,Item:Xc,ItemIndicator:gl,ItemText:Qc,Label:Dl,ScrollDownButton:nl,ScrollUpButton:el,Trigger:ol,Value:fl,Viewport:ll,Indicator:vl,FocusScope:vt});function jl(){let e=V.useRef(new Set);return[V.useCallback(t=>{e.current.forEach(e=>e(t))},[]),V.useCallback(t=>(e.current.add(t),()=>{e.current.delete(t)}),[])]}function Ml(e){let{scope:t=``,adaptScope:n,native:r,children:i,open:a,defaultOpen:o,onOpenChange:s,value:c,defaultValue:l,onValueChange:u,disablePreventBodyScroll:d,size:p=`$true`,onActiveChange:m,dir:h,id:g,renderValue:_,lazyMount:v,zIndex:y}=e,x=St(n)?kl:Kc,S=V.useReducer(()=>({}),{})[1],[C,w]=V.useState(null),[T,E]=et({prop:a,defaultProp:o||!1,onChange:s}),[D,O]=et({prop:c,defaultProp:l||``,onChange:u,transition:!0});V.useEffect(()=>{T&&j(D)},[T]),V.useEffect(()=>{j(D)},[D]);let k=V.useRef(null),[ee,A]=V.useState(null),[j,M]=jl(),[N,P]=jl(),te=V.useRef(null),F=V.useRef([]),[I,ne]=V.useState(0),[re,ie]=V.useState(null);b(()=>{te.current=I});let L=r===!0||r===`web`||Array.isArray(r)&&r.includes(`web`),ae=V.useCallback(e=>{k.current!==e&&(k.current=e,typeof e==`number`&&N(e))},[N]),oe=V.useCallback(e=>{ae(e),A(e)},[ae]),R=(0,H.jsx)(Bc,{scopeName:t,scope:t,adaptScope:n,initialValue:V.useMemo(()=>D,[T]),size:p,activeIndexSubscribe:P,activeIndexRef:k,valueSubscribe:M,setOpen:E,id:g,onChange:V.useCallback(e=>{O(e),j(e)},[]),onActiveChange:f((e,t)=>{m?.(e,t)}),setSelectedIndex:ne,setValueAtIndex:V.useCallback((e,t)=>{F.current[e]=t},[]),shouldRenderWebNative:L,setActiveIndexFast:ae,selectedItem:C,setSelectedItem:w,children:(0,H.jsx)(Rc,{scope:t,scopeName:t,adaptScope:n,disablePreventBodyScroll:d,dir:h,blockSelection:!1,fallback:!1,forceUpdate:S,valueNode:re,onValueNodeChange:ie,activeIndex:ee,activeIndexRef:k,selectedIndex:I,setActiveIndex:oe,value:D,open:T,native:r,renderValue:_,lazyMount:v,children:(0,H.jsx)(Ol,{onOpenChange:E,scope:t,children:L?i:(0,H.jsx)(x,{activeIndexRef:k,listContentRef:F,selectedIndexRef:te,setActiveIndexFast:ae,...e,open:T,value:D,children:i})})})});return y===void 0?R:(0,H.jsx)(Lc.Provider,{value:y,children:R})}function Nl(e){return e?`checked`:`unchecked`}var Pl=e=>{let{control:t,checked:n,bubbles:r=!0,...i}=e,a=V.useRef(null),o=No(n);return V.useEffect(()=>{let e=a.current,t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(o!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[o,n,r]),(0,H.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...e.style,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})};function Fl(e,[t,n],r){{let{disabled:i,name:a,value:o,required:s}=e,c=V.useRef(!1),[l,u]=V.useState(null),d=he(r,u),f=!l||!!l.closest(`form`),p=Mo(l),m=e[`aria-labelledby`]||e.labeledBy||p;return{switchProps:{role:`switch`,"aria-checked":t,tabIndex:i?void 0:0,"data-state":Nl(t),"data-disabled":i?``:void 0,disabled:i,"aria-labelledby":m,onPress:I(e.onPress,e=>{n(e=>!e),f&&(c.current=e.isPropagationStopped(),c.current||e.stopPropagation())})},switchRef:d,bubbleInput:f?(0,H.jsx)(Pl,{control:l,bubbles:!c.current,name:a,value:o,checked:t,required:s,disabled:i,style:{transform:`translateX(-100%)`}}):null}}}var Il=S({active:!1,disabled:!1,frameWidth:void 0,size:void 0,unstyled:{}.GUI_HEADLESS===`1`}),Ll=M(z,{name:`SwitchThumb`,variants:{unstyled:{false:{size:`$true`,backgroundColor:`$background`,borderRadius:1e3}},size:{"...size":e=>{let t=Rl(e);return{height:t,width:t}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),Rl=e=>Math.round(j(ie(e))*.65),zl=e=>Rl(e)*2,Bl=M(z,{name:`Switch`,render:`button`,tabIndex:0,variants:{unstyled:{false:{borderRadius:1e3,backgroundColor:`$background`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineStyle:`solid`,outlineWidth:2}}},size:{"...size":(e,{props:t})=>{if(t.unstyled)return;let n=Rl(e);return{height:n,minHeight:n,width:zl(e)}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}});function Vl(e){return null}function Hl(e){let{Frame:t=Bl,Thumb:n=Ll}=e;t.staticConfig.context=Il,n.staticConfig.context=Il;let r=n.styleable(function(e,t){let{size:r,unstyled:i,activeStyle:a,...o}=e,{unstyled:s,size:c,active:l,disabled:u,frameWidth:d=0}=Il.useStyledContext(),f={}.GUI_HEADLESS===`1`?!0:i??s??!1,p=r??c??`$true`,m=V.useRef(l).current,h=j(e.width||p,`size`),[g,_]=V.useState(typeof h==`number`?h:0),v=d-g,y=m?l?0:-v:l?v:0;return(0,H.jsx)(n,{ref:t,unstyled:f,...f===!1&&{size:p},alignSelf:m?`flex-end`:`flex-start`,x:y,onLayout:I(e.onLayout,e=>{let t=e.nativeEvent.layout.width;_(t)}),disabled:u,...o,...l&&a})}),i=t.styleable(function(e,n){let{native:r,nativeProps:i,checked:a,defaultChecked:o,onCheckedChange:s,activeStyle:c,unstyled:l,activeTheme:u,...d}=e,[f,p]=et({prop:a,defaultProp:o||!1,onChange:s,transition:!0}),m=V.useContext(Il.context),[h,g]=V.useState(0),{switchProps:_,bubbleInput:v,switchRef:y}=Fl(d,[f,p],n),b=Vl({id:d.id,disabled:d.disabled,native:r,nativeProps:i,checked:f,setChecked:p});if(b)return b;let x=d.disabled,S=e=>{let t=e.nativeEvent.layout.width;t!==h&&g(t)},C=m.unstyled??l??!1;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Il.Provider,{size:m.size??d.size??`$true`,unstyled:C,active:f,disabled:x,frameWidth:h,children:(0,H.jsx)(t,{ref:y,render:`button`,theme:u??null,type:`button`,...!C&&{size:m.size??d.size??`$true`},unstyled:C,...d,..._,disabled:x,...f&&{...!C&&!c&&{backgroundColor:`$backgroundActive`},...c},children:(0,H.jsx)(w,{alignSelf:`stretch`,flex:1,onLayout:S,children:d.children})})}),v]})},{disableTheme:!0});return oe(i,{Thumb:r})}var Ul=Hl({Frame:Bl,Thumb:Ll}),{Provider:Wl,useStyledContext:Gl}=S(),Kl=M($a,{name:`Tabs`}),ql=M(w,{name:`TabsTrigger`,role:`tab`,variants:{size:{"...size":r},disabled:{true:{pointerEvents:`none`}},unstyled:{false:{borderWidth:0,backgroundColor:`$background`,userSelect:`none`,justifyContent:`center`,alignItems:`center`,flexWrap:`nowrap`,flexDirection:`row`,cursor:`pointer`,pressStyle:{backgroundColor:`$backgroundPress`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`,zIndex:10}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}},{accept:{activeStyle:`style`}}),Jl=M(h,{name:`TabsContent`});function Yl(e){let{ContentFrame:t=Jl,TabFrame:n=ql,TabsFrame:r=Kl}=e,i=`TabsContext`,a=`TabsList`,o=V.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,children:o,...s}=e,c=Gl(n);return(0,H.jsx)(qs,{__scopeRovingFocusGroup:n||i,orientation:c.orientation,dir:c.dir,loop:r,asChild:!0,children:(0,H.jsx)(ns,{role:`tablist`,componentName:a,"aria-orientation":c.orientation,ref:t,orientation:c.orientation,...s,children:o})})});o.displayName=a;let s=n.styleable((e,t)=>{let{__scopeTabs:r,value:a,disabled:o=!1,onInteraction:s,activeStyle:c,activeTheme:l,unstyled:u=!1,...d}=e,f=Gl(r),p=Xl(f.baseId,a),m=Zl(f.baseId,a),h=a===f.value,[g,_]=V.useState(null),v=V.useRef(null),y=ts({disabled:!!o});return V.useEffect(()=>(f.registerTrigger(),()=>f.unregisterTrigger()),[]),V.useEffect(()=>{if(!v.current)return;let e=v.current;function t(){e&&_({width:e.offsetWidth,height:e.offsetHeight,x:e.offsetLeft,y:e.offsetTop})}t();let n=new ResizeObserver(t);return n.observe(e),()=>{n.disconnect()}},[f.triggersCount]),V.useEffect(()=>{h&&g&&s?.(`select`,g)},[h,a,g]),(0,H.jsx)(qs.Item,{__scopeRovingFocusGroup:r||i,asChild:!0,focusable:!o,active:h,children:(0,H.jsx)(n,{onMouseEnter:I(e.onMouseEnter,()=>{g&&s?.(`hover`,g)}),onMouseLeave:I(e.onMouseLeave,()=>{s?.(`hover`,null)}),role:`tab`,"aria-selected":h,"aria-controls":m,"data-state":h?`active`:`inactive`,"data-disabled":o?``:void 0,id:p,theme:l??null,unstyled:u,...!u&&{size:f.size},...h&&{...!u&&!c&&{backgroundColor:`$backgroundActive`},...c},...y,disabled:o??y.disabled,...d,ref:le(t,v),onPress:I(e.onPress??void 0,e=>{let t=e.button===0&&e.ctrlKey===!1;!o&&!h&&t&&f.onChange(a)}),onKeyDown:I(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&(f.onChange(a),e.preventDefault())}),onFocus:I(e.onFocus,e=>{g&&s?.(`focus`,g);let t=f.activationMode!==`manual`;!h&&!o&&t&&f.onChange(a)}),onBlur:I(e.onBlur,()=>{s?.(`focus`,null)})})})});s.displayName=`TabsTrigger`;let c=t.styleable(function(e,n){let{__scopeTabs:r,value:i,forceMount:a,children:o,...s}=e,c=Gl(r),l=i===c.value,u=a||l,d=Xl(c.baseId,i),f=Zl(c.baseId,i);return u?(0,H.jsx)(t,{"data-state":l?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":d,hidden:!u,id:f,tabIndex:0,...s,ref:n,children:o},i):null}),l=r.styleable(function(e,t){let{__scopeTabs:n,value:i,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:c,activationMode:l=`manual`,size:u=`$true`,...d}=e,p=to(c),[m,h]=et({prop:i,onChange:a,defaultProp:o??``}),[g,_]=V.useState(0),v=f(()=>_(e=>e+1)),y=f(()=>_(e=>e-1));return(0,H.jsx)(P.Provider,{size:u,children:(0,H.jsx)(Wl,{scope:n,baseId:V.useId(),value:m,onChange:h,orientation:s,dir:p,activationMode:l,size:u,registerTrigger:v,triggersCount:g,unregisterTrigger:y,children:(0,H.jsx)(r,{direction:p,"data-orientation":s,...d,ref:t})})})});return oe(l,{List:o,Trigger:s,Tab:s,Content:c})}function Xl(e,t){return`${e}-trigger-${t}`}function Zl(e,t){return`${e}-content-${t}`}var Ql=Yl({ContentFrame:Jl,TabFrame:ql,TabsFrame:Kl}),$l=M(T,{position:`absolute`,width:1,height:1,margin:-1,zIndex:-1e4,overflow:`hidden`,opacity:1e-8,pointerEvents:`none`,variants:{preserveDimensions:{true:{position:`relative`,width:`auto`,height:`auto`}},visible:{true:{position:`relative`,width:`auto`,height:`auto`,margin:0,zIndex:1,overflow:`visible`,opacity:1,pointerEvents:`auto`}}}});$l.isVisuallyHidden=!0;var eu=(e,{message:t,notificationOptions:n})=>!(`Notification`in window)||Notification.permission!==`granted`?!1:{nativeToastRef:new Notification(e,{body:t,...n})},tu=``,nu={focus:!0,"remove-scroll":!0},ru=Dn.styleable((e,t)=>{let n=V.useContext(au),r=V.useContext(ou);return(0,H.jsx)(yt,{scope:e.scope||tu,alwaysDisable:nu,...!e.unstyled&&{backgroundColor:`$background`,alignItems:`center`,pointerEvents:`none`,size:`$true`},ref:t,...r!==void 0&&{zIndex:r},...e,...n&&{transition:null}})},{staticConfig:{componentName:`Tooltip`}}),iu=V.forwardRef((e,t)=>(0,H.jsx)(Cn,{scope:e.scope||tu,componentName:`Tooltip`,ref:t,...e})),au=V.createContext(!1),ou=V.createContext(void 0),su=({children:e,delay:t,preventAnimation:n=!1,timeoutMs:r})=>(0,H.jsx)(au.Provider,{value:n,children:(0,H.jsx)(On,{timeoutMs:r,delay:V.useMemo(()=>t,[JSON.stringify(t)]),children:e})}),cu=new Set,lu=V.forwardRef(function(e,t){"use no memo";let{children:n,delay:r,restMs:i,onOpenChange:a,focus:o,open:s,disableAutoCloseOnScroll:c,zIndex:l,scope:u=tu,...d}=e,p=V.useRef(null),[m,h]=V.useState(!1),{delay:g,setCurrentId:_}=nn(),v=r===void 0?g??400:r,y=i??(typeof v==`number`?v:0),[b,x]=et({prop:s,defaultProp:!1,onChange:a}),S=e.groupId,C=f(e=>{e&&_(S),x(e)});V.useEffect(()=>{if(!b||c||typeof document>`u`)return;let e=()=>{x(!1)};return cu.add(x),document.documentElement.addEventListener(`scroll`,e),()=>{cu.delete(x),document.documentElement.removeEventListener(`scroll`,e)}},[b,c]);let w=Yt({open:b,setOpen:C,disable:!1,disableFocus:!1,hoverable:!0,role:`tooltip`,focus:o,groupId:S,delay:v,restMs:y}),T=V.useCallback(()=>h(!0),[]),E=V.useCallback(()=>h(!1),[]),D=V.useId(),O=e.unstyled?null:ie(`$true`,{shift:-2,bounds:[0]}),k=(0,H.jsx)(Rt.Provider,{value:w,children:(0,H.jsx)($e,{scope:u,size:O?.key,allowFlip:!0,stayInFrame:!0,open:b,...d,children:(0,H.jsx)(qt,{scope:u,contentId:D,triggerRef:p,open:b,onOpenChange:x,onOpenToggle:pu,hasCustomAnchor:m,onCustomAnchorAdd:T,onCustomAnchorRemove:E,children:n})})});return l===void 0?k:(0,H.jsx)(ou.Provider,{value:l,children:k})}),uu=V.forwardRef(function(e,t){let{scope:n,...r}=e;return(0,H.jsx)(Gt,{...r,scope:n||tu,ref:t})}),du=V.forwardRef(function(e,t){let{scope:n,...r}=e;return(0,H.jsx)(xt,{...r,scope:n||tu,ref:t})}),fu=oe(lu,{Anchor:du,Arrow:iu,Content:ru,Trigger:uu}),pu=()=>{},mu=l,hu=[`facebook.`,`instagram.`,`twitter.`,`x.com`,`t.co`,`linkedin.`,`reddit.`,`youtube.`,`tiktok.`,`pinterest.`,`news.ycombinator.com`],gu=[`google.`,`bing.`,`duckduckgo.`,`yahoo.`,`baidu.`,`ecosia.`];function _u(e,t){let n=new URLSearchParams(e||``),r=e=>{let t=n.get(e);return t?t.trim():void 0},i={utm:{source:r(`utm_source`),medium:r(`utm_medium`),campaign:r(`utm_campaign`),term:r(`utm_term`),content:r(`utm_content`)},referrer:t?t.trim():void 0,refCode:r(`ref`)||r(`refCode`)||r(`ref_code`)||void 0};return i.channel=vu(i),i}function vu(e){let t=(e.utm.medium||``).toLowerCase();if(/(cpc|ppc|paid|paidsearch|display|cpm)/.test(t))return`paid`;if(e.utm.source||e.utm.campaign)return`campaign`;if(e.refCode)return`referral`;let n=yu(e.referrer);return n?hu.some(e=>n.includes(e))?`social`:gu.some(e=>n.includes(e))?`organic`:`referral`:`direct`}function yu(e){if(!e)return``;let t=e.trim(),n=t.indexOf(`://`);n>=0&&(t=t.slice(n+3));let r=t.search(/[/?#]/);r>=0&&(t=t.slice(0,r));let i=t.indexOf(`@`);i>=0&&(t=t.slice(i+1));let a=t.indexOf(`:`);return a>=0&&(t=t.slice(0,a)),t.toLowerCase().trim()}function bu(e){return!!(e.utm.source||e.utm.medium||e.utm.campaign||e.utm.term||e.utm.content||e.refCode||e.referrer&&yu(e.referrer))}var xu=Object.freeze({hanzo:Object.freeze([`hanzo.ai`,`hanzo.agency`,`hanzo.app`,`hanzo.bot`,`hanzo.chat`,`hanzo.codes`,`hanzo.community`,`hanzo.computer`,`hanzo.help`,`hanzo.id`,`hanzo.industries`,`hanzo.market`,`hanzo.network`,`hanzo.sh`,`hanzo.team`,`hanzo.ventures`,`hanzo.works`,`hanzoskills.com`]),lux:Object.freeze([`lux.network`,`lux.exchange`,`lux.market`,`lux.finance`,`lux.financial`,`lux.credit`,`lux.fund`,`lux.id`]),zoo:Object.freeze([`zoo.ngo`,`zoo.network`,`zoolabs.id`,`zoolabs.io`])}),Su=Object.freeze({hanzo:`pk-CmfLA2K6kvsPflrS9DSkt06H_kSoQB_21sjedt6VJdc`,lux:`pk-gUZp6ZVfhJzSwK-rb4oLbVkpCnMBx5uSCpxf_5yEhQk`,zoo:`pk-3TKpKnERV9AQSsBUERWkZejC1O1mUxc1jRzsP3MPbs4`}),Cu=Object.freeze({"hanzo.ai":`pk-CmfLA2K6kvsPflrS9DSkt06H_kSoQB_21sjedt6VJdc`,"www.hanzo.ai":`pk-CmfLA2K6kvsPflrS9DSkt06H_kSoQB_21sjedt6VJdc`,"hanzo.app":`pk-wlnXN2a9_vmCm60yTFtQ629Q8TyuaxBNZbY1RWT72gQ`,"hanzo.team":`pk-NCzD2FiHpZv8KUpkCX4olT1LJOJsMxBC_Z8NkiQsOFQ`,"pay.hanzo.ai":`pk-eX6kv7JZNoiYn1WkeJH3tT_8OvkVYScmCXnLMwxTKf8`,"platform.hanzo.ai":`pk-My1RpZLEUnTj8vAdPbWKYdDUuhxZJ4dVjHcwjZN4rZ8`,"docs.hanzo.ai":`pk-jukhtjMT2ymoeBDAeFjINQWlBv-v9sNn1TPztiCrrwk`,"hanzo.bot":`pk-W5d7Mn7ZukT7igyscIy6Pqe8JpA0Ge604Yn4xNR4JCU`,"hanzo.chat":`pk-ATxWeB2jNyRSxDgqnkGoDj3CCbzrmTxSktUh9zlrO-E`,"hanzo.id":`pk-_GVF3KlaqprlPHDumBMRFeFU1lIGOaarQfgimNVDIo8`,"hanzo.industries":`pk-Vh1wvL2HqIAv9qpVvmrznTI9uMHrTD-jyIC-vnlBsgY`,"hanzo.market":`pk-DN3xQFa0H61epUVg9OkiOYLzCdteNt9hE6f-S-ednjQ`,"hanzo.network":`pk-YJ2eiA_7ckLStMPte8Ar8FsmRp_ycmeIeRbpGprZYmM`,"hanzo.agency":`pk-26a2clOaJFe24aKJZ0PkI-GWR9F4EEa8rthHzgy_Efw`,"console.hanzo.ai":`pk-oFNXoiO1wOD8PqGdHYyiSq6jaNCdrd7TpztGpwM2ZiQ`,"admin.hanzo.ai":`pk-RYZwxkomW-tlAnEu2DKo_kAzcxFbSF2YiYcsUY48QL0`,"bot.hanzo.ai":`pk-W5d7Mn7ZukT7igyscIy6Pqe8JpA0Ge604Yn4xNR4JCU`,"cloud.hanzo.ai":`pk-RAfEGHPoNdCEU9fnA_cPd_Xo9Tci44rlYQV9xuJ1Ob0`});function wu(e){let t=Eu(e).replace(/^www\./,``);return Cu[t]??(t.endsWith(`.hanzo.app`)?Cu[`hanzo.app`]:void 0)}var Tu=`pk-`,Eu=e=>e.trim().toLowerCase().replace(/\.$/,``).split(`:`)[0]??``;function Du(e){let t=Eu(e);if(!t)return;let n,r=0;for(let[e,i]of Object.entries(xu))for(let a of i)(t===a||t.endsWith(`.${a}`))&&a.length>r&&(n=e,r=a.length);return n}function Ou(e,t=Su){if(t===Su){let t=wu(e);if(t)return t}let n=Du(e);if(!n)return;let r=t[n];if(typeof r!=`string`)return;let i=r.trim();return i.startsWith(Tu)?i:void 0}function ku(e=Su){if(!(typeof location>`u`))return Ou(location.hostname,e)}var Au=`[redacted]`,ju=`[email]`,Mu=`[ip]`,Nu=[/-----BEGIN[ A-Z]*PRIVATE KEY-----[\s\S]*?-----END[ A-Z]*PRIVATE KEY-----/g,/eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{6,}\.[A-Za-z0-9_-]{6,}/g,/\bbearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,/\b(?:sk|pk|rk)-[A-Za-z0-9]{2,}-?[A-Za-z0-9]{12,}/g,/\b(?:sk|pk)_(?:live|test)_[A-Za-z0-9]{16,}/g,/\bhk-[A-Za-z0-9]{16,}/g,/\bAKIA[0-9A-Z]{16}\b/g,/\bASIA[0-9A-Z]{16}\b/g,/\bAIza[0-9A-Za-z_-]{20,}/g,/\bgh[posru]_[A-Za-z0-9]{20,}/g,/\bxox[baprs]-[A-Za-z0-9-]{10,}/g,/[a-zA-Z][a-zA-Z0-9+.-]{0,32}:\/\/[^\s:@/]{1,256}:[^\s@/]{1,256}@/g],Pu=/\b(?:\d[ -]?){13,19}\b/g;function Fu(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function Iu(e){return e.replace(Pu,e=>{let t=e.replace(/[ -]/g,``);return t.length<13||t.length>19?e:Fu(t)?Au:e})}var Lu=/[A-Za-z0-9._%+-]{1,64}@[A-Za-z0-9.-]{1,255}\.[A-Za-z]{2,24}/g,Ru=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,zu=/\b(?:[0-9A-Fa-f]{1,4}:){2,7}[0-9A-Fa-f]{1,4}\b/g,Bu=RegExp(`([?&#;](?:`+`code.state.token.access_token.id_token.refresh_token.auth.authorization.secret.client_secret.password.passwd.pwd.api_key.apikey.key.session.session_id.sid.sig.signature.nonce.otp.invite.invitation.reset_token.confirmation_token.magic.ticket.assertion`.split(`.`).join(`|`)+`)=)[^&#;\\s]{1,4096}`,`gi`);function Vu(e){return e.replace(Bu,(e,t)=>t+Au)}var Hu=/(^|[^A-Za-z0-9_-]|%[0-9A-Fa-f]{2})((?=[A-Za-z0-9_-]{0,42}[a-z])(?=[A-Za-z0-9_-]{0,42}[A-Z])[A-Za-z0-9_-]{43})(?![A-Za-z0-9_-])/g;function Uu(e){e=Vu(e);for(let t of Nu)e=e.replace(t,Au);return e=e.replace(Hu,(e,t)=>t+Au),Iu(e)}function Wu(e){let t=e.indexOf(`#`);return t<0?e:e.slice(0,t)}function Gu(e){return e=e.replace(Lu,ju),e=e.replace(zu,Mu),e=e.replace(Ru,Mu),e}var Ku=8192;function qu(e,t=Ku){return e.length>t?e.slice(0,t)+`… [truncated]`:e}function Ju(e,t=!1){return e?(e=qu(e),e=Uu(e),t||(e=Gu(e)),e):e??``}var Yu=50,Xu=500,Zu=2048,Qu=/^\s*at\s+(?:(.+?)\s+\()?(?:(.+?):(\d+):(\d+)|([^)]+))\)?\s*$/,$u=/^\s*(?:(.*?)@)?(.+?):(\d+):(\d+)\s*$/;function ed(e){return e?!(e.includes(`node_modules`)||e.startsWith(`webpack-internal`)||e.startsWith(`webpack://`)||e.startsWith(`chrome-extension://`)||e.startsWith(`moz-extension://`)):!1}function td(e){if(!e)return[];let t=e.split(`
21
- `,Xu),n=[];for(let e of t){if(e.length>Zu)continue;let t=e.trimEnd();if(!t)continue;let r,i=``,a=0,o=0,s=Qu.exec(t);if(s)r=s[1],s[2]?(i=s[2],a=Number(s[3])||0,o=Number(s[4])||0):i=(s[5]||``).trim();else{let e=$u.exec(t);if(!e)continue;r=e[1],i=e[2],a=Number(e[3])||0,o=Number(e[4])||0}(i||r)&&n.push({function:r||`<anonymous>`,filename:i,abs_path:i,lineno:a,colno:o,in_app:ed(i)})}return n.reverse(),n.length>Yu?n.slice(n.length-Yu):n}function nd(e){if(e instanceof Error){let t=rd(e,`name`),n=rd(e,`message`),r=rd(e,`stack`);return{name:typeof t==`string`&&t?t:`Error`,message:typeof n==`string`&&n?n:id(e),stack:typeof r==`string`?r:void 0}}if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)??id(e)}}catch{return{name:`Error`,message:id(e)}}}function rd(e,t){try{return e[t]}catch{return}}function id(e){try{return String(e)}catch{return`[unstringifiable]`}}var ad=`iam-anon-id`,od=[`hz_anon_id`,`hz_id`],sd=`hanzo.ai`,cd=63072e3,ld;function ud(e){var t=new Uint8Array(16),n,r=typeof crypto<`u`?crypto:void 0;if(r&&typeof r.getRandomValues==`function`)r.getRandomValues(t);else for(n=0;n<16;n++)t[n]=Math.random()*256|0;var i=Math.floor(e===void 0?Date.now():e);for(n=5;n>=0;n--)t[n]=i%256,i=Math.floor(i/256);t[6]=112|t[6]&15,t[8]=128|t[8]&63;var a=``;for(n=0;n<16;n++)a+=(t[n]+256).toString(16).slice(1),(n===3||n===5||n===7||n===9)&&(a+=`-`);return a}function dd(){try{return typeof document>`u`||typeof document.cookie!=`string`?null:document}catch{return null}}function fd(){try{return typeof window>`u`||!window.localStorage?null:window.localStorage}catch{return null}}function pd(e,t){try{return e&&e.getItem(t)||``}catch{return``}}function md(e){var t=dd();if(!t)return``;for(var n=t.cookie.split(`;`),r=0;r<n.length;r++){var i=n[r].indexOf(`=`);if(!(i<0||n[r].slice(0,i).trim()!==e)){var a=n[r].slice(i+1).trim();if(a)try{return decodeURIComponent(a)}catch{return a}}}return``}function hd(e,t){var n=dd();if(n){var r=``,i=!1;try{typeof window<`u`&&window.location&&(r=window.location.hostname||``,i=window.location.protocol===`https:`)}catch{}var a=e+`=`+encodeURIComponent(t);a+=`; Path=/; Max-Age=`+cd+`; SameSite=Lax`,(`.`+r).slice(-(sd.length+1))===`.`+sd&&(a+=`; Domain=`+sd),i&&(a+=`; Secure`);try{n.cookie=a}catch{}}}function gd(e){for(var t=0;t<od.length;t++){var n=md(od[t])||pd(e,od[t]);if(n)return n}return``}function _d(){if(typeof window>`u`)return``;var e=fd(),t=md(ad)||pd(e,ad)||gd(e)||ld||ud();ld=t,hd(ad,t);try{e&&e.getItem(ad)!==t&&e.setItem(ad,t)}catch{}return t}function vd(e){ld=e,hd(ad,e);try{var t=fd();t&&t.setItem(ad,e)}catch{}}var yd={session:`hz_session`,firstTouch:`hz_first_touch`,lastTouch:`hz_last_touch`,cohort:`hz_cohort`},bd=7776e6,xd=18e5;function Sd(){try{return typeof window>`u`||!window.localStorage?void 0:window.localStorage}catch{return}}function Cd(){return _d()||void 0}function wd(e=Date.now()){let t=Sd();if(!t)return;let n=null;try{n=JSON.parse(t.getItem(yd.session)||`null`)}catch{n=null}return!n||e-n.last>xd?n={id:ud(e),last:e}:n.last=e,t.setItem(yd.session,JSON.stringify(n)),n.id}function Td(e,t=Date.now()){let n=Sd();n&&n.setItem(yd.session,JSON.stringify({id:e,last:t}))}function Ed(e){vd(e)}function Dd(){let e=Sd();if(e)try{let t=e.getItem(yd.firstTouch);return t?JSON.parse(t):void 0}catch{return}}function Od(e){let t=Sd();return Dd()||(t&&t.setItem(yd.firstTouch,JSON.stringify(e)),e)}function kd(e=Date.now()){let t=Sd();if(t)try{let n=JSON.parse(t.getItem(yd.lastTouch)||`null`);return!n?.utm||typeof n.at!=`number`||e-n.at>bd?void 0:n.utm}catch{return}}function Ad(e,t=Date.now()){let n=Sd();n&&n.setItem(yd.lastTouch,JSON.stringify({utm:e,at:t}))}function jd(){let e=Sd();if(e)try{let t=e.getItem(yd.cohort);return t?JSON.parse(t):void 0}catch{return}}function Md(e){let t=Sd(),n=jd()||{},r={signupWeek:n.signupWeek||e.signupWeek,channel:e.channel||n.channel,refCode:n.refCode||e.refCode};return t&&t.setItem(yd.cohort,JSON.stringify(r)),r}var Nd=86400,Pd=new Set([`hanzo.app`]);function Fd(e){for(let t of Object.values(xu))for(let n of t)if(!Pd.has(n)&&(e===n||e.endsWith(`.${n}`)))return n;return``}function Id(){let e=Fd(window.location.hostname.toLowerCase());return e?`; Domain=.${e}`:``}function Ld(e){if(typeof document>`u`||typeof document.cookie!=`string`)return;let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`));return t?decodeURIComponent(t.slice(e.length+1)):void 0}function Rd(e,t,n){if(typeof document>`u`)return;let r=window.location.protocol===`https:`?`; Secure`:``;document.cookie=`${e}=${encodeURIComponent(t)}; Max-Age=${n*Nd}; Path=/; SameSite=Lax${Id()}${r}`}function zd(e){return typeof window<`u`&&window.location?.protocol===`https:`?`__Host-${e}`:e}function Bd(e,t,n){if(typeof document>`u`)return;let r=window.location.protocol===`https:`?`; Secure`:``;document.cookie=`${zd(e)}=${encodeURIComponent(t)}; Max-Age=${n*Nd}; Path=/; SameSite=Lax${r}`}function Vd(e,t=[]){if(typeof document>`u`||typeof document.cookie!=`string`)return;let n=document.cookie.split(`; `).map(e=>e.slice(0,e.indexOf(`=`))),r=new Set([...e,...n.filter(e=>t.some(t=>t.test(e)))]),i=window.location.hostname.split(`.`),a=new Set([``,Id(),...i.slice(0,-1).map((e,t)=>`; Domain=.${i.slice(t).join(`.`)}`)]);for(let e of r)for(let t of a)document.cookie=`${e}=; Max-Age=0; Path=/${t}`}var Hd=()=>typeof navigator<`u`&&navigator.webdriver===!0,Ud=`hz_internal`;function Wd(){if(Hd())return!0;if(typeof window>`u`||typeof document>`u`||typeof document.cookie!=`string`)return!1;let e=new URLSearchParams(window.location?.search??``).get(Ud);return e===`1`&&Rd(Ud,`1`,365),e===`0`?(Rd(Ud,``,0),!1):e===`1`||Ld(Ud)===`1`}var Gd={anon:`hz_aid`,session:`hz_sid`,firstTouch:`hz_ft`},Kd=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,qd=e=>!!e&&Kd.test(e);function Jd(e){return JSON.stringify([e.utm.source,e.utm.medium,e.utm.campaign,e.utm.term,e.utm.content,e.refCode,e.referrer,e.channel].map(e=>e??``))}function Yd(e){if(!(!e||e.length>1024))try{let t=JSON.parse(e);if(!Array.isArray(t)||t.length!==8||t.some(e=>typeof e!=`string`))return;let[n,r,i,a,o,s,c,l]=t,u=e=>e||void 0;return{utm:{source:u(n),medium:u(r),campaign:u(i),term:u(a),content:u(o)},refCode:u(s),referrer:u(c),channel:u(l)}}catch{return}}function Xd(e,t,n,r){let i;try{i=new URL(e,r)}catch{return e}if(i.protocol!==`https:`&&i.protocol!==`http:`||!Du(i.hostname)||i.hostname===n)return e;let a=(e,t)=>t&&i.searchParams.set(e,t);return qd(t.anonId)&&a(Gd.anon,t.anonId),qd(t.sessionId)&&a(Gd.session,t.sessionId),t.firstTouch&&a(Gd.firstTouch,Jd(t.firstTouch)),i.toString()}function Zd(e){let t=new URLSearchParams(e||``),n=t.get(Gd.anon),r=t.get(Gd.session);return{anonId:qd(n)?n:void 0,sessionId:qd(r)?r:void 0,firstTouch:Yd(t.get(Gd.firstTouch))}}function Qd(e){let t=new URL(e),n=!1;for(let e of Object.values(Gd))t.searchParams.has(e)&&(t.searchParams.delete(e),n=!0);return n?t.pathname+t.search+t.hash:void 0}var $d=`hz_consent`,ef=`hz_consent_v`,tf=`hz_consent_rule`,nf=3,rf=2,af=`hzconsent`,of={analytics:!1,marketing:!1,ads:!1},sf={analytics:!0,marketing:!0,ads:!0},cf=[`eu`,`us_privacy`,`global`],lf=`hz_consent_policy`,uf=Symbol.for(`hanzo.event.consent`);function df(){let e=globalThis;return e[uf]??(e[uf]={})}function ff(e){if(typeof e!=`object`||!e)return;let t=e;if(typeof t.version==`number`||typeof t.mode==`string`)return{mode:cf.includes(t.mode)?t.mode:`eu`,refused:t.refused===!0,version:Number(t.version)||0,region:String(t.region??``),floor:Number(t.floor)||rf}}function pf(){try{return typeof window>`u`?void 0:window.sessionStorage}catch{return}}function mf(){let e=df().served;if(e)return e;try{let e=ff(JSON.parse(pf()?.getItem(lf)??`null`));if(e)return e}catch{}return{mode:`eu`,refused:!1,version:nf,region:``,floor:rf}}function hf(){let e=mf();return{mode:e.mode,refused:e.refused||_f(),version:vf(),region:e.region}}function gf(){return typeof navigator>`u`?!1:navigator.globalPrivacyControl===!0}function _f(){if(typeof window>`u`)return!1;let e=typeof navigator>`u`?{}:navigator,t=e.doNotTrack??window.doNotTrack??e.msDoNotTrack;return gf()||t===`1`||t===`yes`}var vf=()=>Math.max(df().served?.version??0,nf),yf=()=>hf().refused;function bf(){let e=Ld(zd($d));if(e===void 0)return;let t=Number(Ld(zd(ef))),n=Ld(zd(tf));if(hf().mode===`eu`&&!(n===`eu`||n===void 0&&t===2))return;let r=e.split(`,`);return{held:{analytics:r.includes(`analytics`),marketing:r.includes(`marketing`),ads:r.includes(`ads`)},current:t>=mf().floor&&t<=vf()}}var xf=e=>e.analytics||e.marketing||e.ads;function Sf(){let e=hf();if(e.refused)return{...of};let t=e.mode===`eu`?of:sf,n=bf();return n?n.current?{...n.held}:{analytics:t.analytics&&n.held.analytics,marketing:t.marketing&&n.held.marketing,ads:t.ads&&n.held.ads}:{...t}}function Cf(){let e=bf();yf()&&e&&xf(e.held)&&Tf({...of})}function wf(e){return[`analytics`,`marketing`,`ads`].filter(t=>e[t]).join(`,`)}function Tf(e){let t=hf(),n=t.refused?{...of}:{analytics:e.analytics,marketing:e.marketing,ads:e.ads};Bd($d,wf(n),395),Bd(ef,String(vf()),395),Bd(tf,t.mode,395),n.analytics||kf(Ef),n.marketing||kf(Df),n.ads||kf(Of),typeof window<`u`&&window.dispatchEvent(new Event(af))}var Ef={cookies:[`_ga`,`_gid`,`_gat`,`hz_cid`],patterns:[/^_ga_[A-Z0-9]+$/,/^_gat_[\w-]+$/],storage:[]},Df={cookies:[`hz_touch`,`_fbp`,`_fbc`,`_ttp`,`_tt_enable_cookie`,`ttcsid`,`_twclid`,`li_fat_id`,`li_giant`,`_uetsid`,`_uetvid`,`_pin_unauth`,`_epik`,`_derived_epik`,`_rdt_uuid`,`_rdt_cid`],patterns:[/^ttcsid_[A-Z0-9]+$/],storage:[]},Of={cookies:[],patterns:[/^_gcl_[a-z]+$/,/^_gac_[\w-]+$/],storage:[]};function kf(e){if(Vd(e.cookies,e.patterns),!(typeof window>`u`))try{for(let t of e.storage)window.localStorage?.removeItem(t)}catch{}}var Af=`0.3.66`,jf=`/v1/event`,Mf=`https://api.hanzo.ai`,Nf=`text/plain`;function Pf(e){try{if(typeof process<`u`)return{}[e]||void 0}catch{}}function Ff(e,t,n){return e+(e.includes(`?`)?`&`:`?`)+t+`=`+encodeURIComponent(n)}function If(e){let t=nd(e),n=td(t.stack).slice(-50).map(e=>({function:e.function,file:e.filename,line:e.lineno,column:e.colno}));return{type:t.name,message:t.message,stack:t.stack,frames:n}}var Lf=()=>Rf()?{screen:`${window.screen?.width??0}x${window.screen?.height??0}`,language:navigator.language||``}:{},Rf=()=>typeof window<`u`&&typeof document<`u`;function zf(e){if(!Rf())return e;let t=new Set(wf(Sf()).split(`,`).filter(Boolean)),n=String(e.properties?.consent??``).split(`,`).filter(e=>t.has(e)).join(`,`);return{...e,properties:{...e.properties,consent:n}}}function Bf(e){try{return JSON.stringify({batch:e})}catch{}let t=[];for(let n of e)try{t.push(JSON.stringify(n))}catch{try{t.push(JSON.stringify({...n,properties:{$unserializable:!0}}))}catch{}}return t.length>0?`{"batch":[`+t.join(`,`)+`]}`:null}var Vf=class{send(e,t,n){if(n.beacon&&Rf()&&typeof navigator.sendBeacon==`function`){let r=n.ingestKey?Ff(e,`ingest_key`,n.ingestKey):e;try{if(navigator.sendBeacon(r,new Blob([t],{type:Nf})))return;n.debug&&console.warn(`[event] beacon refused, falling back to fetch`)}catch{}}if(typeof fetch!=`function`)return;let r=n.ingestKey!==void 0&&n.token===void 0&&n.contentType===void 0,i={"Content-Type":r?Nf:n.contentType??`application/json`},a=r?void 0:n.token??n.ingestKey;a&&(i.Authorization=`Bearer ${a}`),fetch(n.ingestKey?Ff(e,`ingest_key`,n.ingestKey):e,{method:`POST`,headers:i,body:t,keepalive:!0,credentials:r?`omit`:`include`}).then(t=>{!t.ok&&n.debug&&console.warn(`[event] ingest rejected`,t.status,e.split(`?`)[0])}).catch(t=>{n.debug&&console.warn(`[event] ingest failed`,e.split(`?`)[0],t)})}},Hf=class{constructor(e){this.queue=[],this.timer=null,this.attribution={utm:{}},this.cohort={},this.started=!1,this.reentrant=!1,this.cfg={host:Mf,batchSize:20,flushIntervalMs:5e3,enabled:!0,captureErrors:!0,...e,ingestKey:e.ingestKey??Pf(`NEXT_PUBLIC_PUBLISHABLE_KEY`)??ku()},this.transport=e.transport??new Vf}adopt(e){e.ingestKey&&!this.cfg.ingestKey&&(this.cfg.ingestKey=e.ingestKey),e.getToken&&!this.cfg.getToken&&(this.cfg.getToken=e.getToken)}init(){if(this.started||!this.cfg.enabled||(this.started=!0,!Rf()))return;let e=Zd(window.location.search),t=Qd(window.location.href);if(t!==void 0)try{window.history.replaceState(window.history.state,``,t)}catch{}this.settle(e,_u(window.location.search,document.referrer)),Cf(),window.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&this.flush(!0)}),window.addEventListener(`pagehide`,()=>this.flush(!0)),this.cfg.captureErrors&&(window.addEventListener(`error`,e=>{this.captureError(e.error??e.message,{handled:!1})}),window.addEventListener(`unhandledrejection`,e=>{this.captureError(e.reason,{handled:!1})}))}settle(e,t){e.anonId&&Ed(e.anonId),e.sessionId&&Td(e.sessionId);let n=e.firstTouch&&!Dd()?Od(e.firstTouch):void 0;this.attribution=n??(bu(t)?Od(t):Dd()??t),(t.utm.source||t.utm.campaign)&&Ad(t.utm),this.lastUtm=kd(),this.cohort=Md({channel:this.attribution.channel??vu(this.attribution),refCode:this.attribution.refCode})}link(e){return Rf()?(this.started||this.init(),Xd(e,{anonId:Cd(),sessionId:wd(),firstTouch:this.attribution},window.location.hostname,window.location.href)):e}authorize(e){let t=this.link(e);return this.flush(!0),t}identify(e,t){this.personId=e,this.enqueue(`identify`,void 0,{properties:t})}group(e,t){this.enqueue(`group`,void 0,{groupId:e,properties:t})}pageview(e,t){let n=e??(Rf()?window.location.pathname:void 0),r=(n??``)+`\0`+(Rf()?window.location.href:``);r!==this.counted&&(this.counted=r,this.enqueue(`pageview`,Ce,{path:n,properties:{...Lf(),...t}}))}capture(e,t,n){this.enqueue(`event`,e,{properties:t,...n})}captureError(e,t){if(!this.reentrant){this.reentrant=!0;try{let n=t?.handled??!0,r=If(e);r.handled=n,this.enqueue(`error`,void 0,{error:r,level:t?.level??(n?`error`:`fatal`),release:this.cfg.release??Pf(`NEXT_PUBLIC_HANZO_RELEASE`),environment:this.cfg.environment??Pf(`NODE_ENV`),site:Rf()?window.location.hostname:void 0,properties:t?.properties}),this.flush()}catch{}finally{this.reentrant=!1}}}setCohort(e){this.cohort=Md(e)}flush(e=!1){if(!this.cfg.enabled||this.queue.length===0)return;let t=this.queue.map(zf);if(this.queue=[],this.clearTimer(),t.length===0)return;let n=this.cfg.getToken?.()??void 0,r=this.cfg.ingestKey?.trim()||void 0,i=e&&!n,a=Bf(t);if(a===null){this.cfg.debug&&console.debug(`[event] flush → dropped, batch unserializable`);return}this.cfg.debug&&console.debug(`[event] flush →`,jf,t.length),this.transport.send(this.cfg.host+jf,a,{beacon:i,token:n,ingestKey:r,debug:this.cfg.debug})}enqueue(e,t,n){this.cfg.enabled&&(this.started||this.init(),this.queue.push(this.build(e,t,n)),this.queue.length>=this.cfg.batchSize?this.flush():this.schedule())}build(e,t,n){let r=Cd(),i={messageId:ud(),type:e,event:t,timestamp:new Date().toISOString(),distinctId:this.personId??r,anonymousId:r,personId:this.personId,sessionId:wd(),product:this.cfg.product,referrer:this.attribution.referrer,utm:this.attribution.utm,lastUtm:this.lastUtm,refCode:this.cohort.refCode??this.attribution.refCode,channel:this.cohort.channel??this.attribution.channel,signupWeek:this.cohort.signupWeek,url:Rf()?window.location.href:void 0,path:Rf()?window.location.pathname:void 0,library:`@hanzo/event`,libraryVersion:Af,...n},a=this.cfg.capturePII??!1;return i.url&&=Ju(Wu(i.url),a),i.path&&=Ju(Wu(i.path),a),i.referrer&&=Ju(Wu(i.referrer),a),Wd()&&(i.properties={...i.properties,internal:!0}),Rf()&&(i.properties={...i.properties,consent:wf(Sf())}),i}schedule(){!this.timer&&this.cfg.enabled&&(this.timer=setTimeout(()=>{this.timer=null,this.flush()},this.cfg.flushIntervalMs))}clearTimer(){this.timer&&=(clearTimeout(this.timer),null)}},Uf=Symbol.for(`hanzo.event.clients.optin`);function Wf(){let e=globalThis,t=e[Uf];if(t)return t;let n=new Map;return e[Uf]=n,n}function Gf(e){if(!Rf()||e.enabled===!1)return new Hf(e);let t=(e.host??Mf)+`\0`+e.product,n=Wf(),r=n.get(t);if(r)return r.adopt(e),r;let i=new Hf(e);return n.set(t,i),i}var Kf=(0,V.createContext)(null);function qf(e){let{client:t,config:n,autoPageview:r=!0,children:i}=e;if(!t&&!n)throw Error("AnalyticsProvider requires `client` or `config`");let a=t??Gf(n);return(0,V.useEffect)(()=>{a.init(),r&&a.pageview()},[a,r]),(0,V.createElement)(Kf.Provider,{value:a},i)}new Hf({product:`unknown`,enabled:!1});var Jf=class extends V.Component{constructor(){super(...arguments),this.state={error:null},this.reset=()=>this.setState({error:null})}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){(this.props.client??this.context??void 0)?.captureError(e,{handled:!1,properties:{componentStack:t.componentStack,react:!0}})}render(){let{error:e}=this.state;if(e===null)return this.props.children;let{fallback:t}=this.props;return typeof t==`function`?t(e,this.reset):t??null}};Jf.contextType=Kf;var Yf=Jf.contextType;function Xf(){return(0,V.useContext)(Yf)}function Zf(e,t,n){(0,V.useEffect)(()=>{if(!t||typeof window>`u`||typeof document>`u`)return;let r=!1,i,a=()=>{r||Le(async()=>{let{observe:e,wireProps:t}=await import(`./dist-Cy8E8G3S.js`);return{observe:e,wireProps:t}},[]).then(({observe:t,wireProps:a})=>{if(r)return;let o=t(t=>{t.kind!==`nav`&&e.track(t.name,a(t))},{nav:!1,redaction:n});i=()=>o.stop()}).catch(()=>{})},o=window,s=typeof o.requestIdleCallback==`function`,c=s?o.requestIdleCallback(a,{timeout:3e3}):window.setTimeout(a,1200);return()=>{r=!0;try{s?o.cancelIdleCallback?.(c):window.clearTimeout(c)}catch{}i?.()}},[e,t])}var Qf=e=>{try{let t=window.location,n=e==null||e===``?t:new URL(String(e),t.href);return{key:n.pathname+n.search+n.hash,path:n.pathname}}catch{return{key:``,path:void 0}}};function $f(e,t,n){let r=(0,V.useRef)(null),i=n!==void 0;(0,V.useEffect)(()=>{if(!t||!i||!je())return;let a=n??Qf().path??``;r.current!==a&&(r.current=a,e.pageview(a))},[e,t,i,n]),(0,V.useEffect)(()=>{if(!t||i||!je())return;let n=t=>{let{key:n,path:i}=Qf(t);r.current!==n&&(r.current=n,e.pageview(i))};n();let a=window.history,o=a.pushState,s=a.replaceState;a.pushState=function(...e){let t=o.apply(this,e);return n(e[2]),t},a.replaceState=function(...e){let t=s.apply(this,e);return n(e[2]),t};let c=()=>n();return window.addEventListener(`popstate`,c),window.addEventListener(`hashchange`,c),()=>{a.pushState=o,a.replaceState=s,window.removeEventListener(`popstate`,c),window.removeEventListener(`hashchange`,c)}},[e,t,i])}var ep=(0,V.createContext)(null);function tp(e){let{owner:t=`app`,path:n,fallback:r,client:i,children:a,host:o,product:s,ingestKey:c,getToken:l,enabled:u,consent:d,replay:f,errors:p,pageviews:m,redaction:h,debug:g}=e,_=t===`gui`,v=Xf(),y=v!==null&&_,[b,x]=(0,V.useState)(!1),S=!_||b&&!y;(0,V.useEffect)(()=>{if(!_||y)return;let e=()=>x(!Ue());return e(),Ke(e)},[_,y]);let C=(0,V.useRef)(l);C.current=l;let w=(0,V.useRef)(h);w.current=h;let[T,E]=(0,V.useState)(0);(0,V.useEffect)(()=>{let e=()=>E(e=>e+1),t=Be(e);if(!je())return t;let n=t=>{(t.key===null||t.key===`hz_consent`)&&e()};return window.addEventListener(`storage`,n),()=>{t(),window.removeEventListener(`storage`,n)}},[]);let D=(0,V.useMemo)(()=>i??Ge({host:o,product:s,ingestKey:c,getToken:C.current?()=>C.current?.():void 0,enabled:S?u:!1,consent:d,replay:f,errors:p,pageviews:m,debug:g}),[i,o,s,c,S,u,d,f,p,m,g,T]);(0,V.useEffect)(()=>{if(S)return Ne(D,{app:!_}),D.client.init(),()=>{Re()===D&&Ne(void 0)}},[D,S,_]);let O=D.enabled;return $f(D,O&&(m??!0),n),Zf(D,O&&(f??!0),w.current),(0,H.jsx)(ep.Provider,{value:D,children:(0,H.jsx)(qf,{client:y&&v?v:D.client,autoPageview:!1,children:(0,H.jsx)(np,{telemetry:D,enabled:O&&(p??!0),fallback:r,children:a})})})}var np=class extends V.Component{constructor(){super(...arguments),this.state={error:null},this.reset=()=>this.setState({error:null})}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){if(this.props.enabled&&this.props.telemetry.captureError(e,{handled:!1,properties:{componentStack:t.componentStack,react:!0}}),this.props.fallback===void 0)throw e}render(){let{error:e}=this.state;if(!e)return this.props.children;let{fallback:t}=this.props;return t===void 0?null:typeof t==`function`?t(e,this.reset):t}},rp=({children:e,telemetry:t,...n})=>{let r=(0,H.jsx)(u,{...n,children:(0,H.jsx)(Kt.Provider,{value:1,children:(0,H.jsx)(wn,{shouldAddRootHost:!0,children:e})})});return t===!1?r:(0,H.jsx)(tp,{owner:`gui`,...typeof t==`object`?t:null,children:r})},ip=M(ht,{name:`TextArea`,render:`textarea`,whiteSpace:`pre-wrap`,variants:{unstyled:{false:{height:`auto`,...zt,rows:3}},size:{"...size":Ut}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),ap=z.styleable((e,t)=>{let{size:n,color:r,...i}=e,a=ee(),o=r;return o&&o[0]===`$`&&(o=de(a[o])),(0,H.jsx)(z,{ref:t,...i,children:(0,H.jsx)(io,{size:n,color:o})})}),U=M(C,{variants:{unstyled:{false:{color:`$color`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),op=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M20 19.5v.5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8.5L18 5.5`,stroke:t}),(0,H.jsx)(N,{d:`M8 18h1`,stroke:t}),(0,H.jsx)(N,{d:`M18.42 9.61a2.1 2.1 0 1 1 2.97 2.97L16.95 17 13 18l.99-3.95 4.43-4.44Z`,stroke:t})]})})),sp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,stroke:t})]})})),cp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M3 3v18h18`,stroke:t}),(0,H.jsx)(N,{d:`M18 17V9`,stroke:t}),(0,H.jsx)(N,{d:`M13 17V5`,stroke:t}),(0,H.jsx)(N,{d:`M8 17v-3`,stroke:t})]})})),lp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`19`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`5`,cy:`12`,r:`1`,stroke:t})]})})),up=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,stroke:t})})})),dp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M15 12H3`,stroke:t}),(0,H.jsx)(N,{d:`M17 18H3`,stroke:t}),(0,H.jsx)(N,{d:`M21 6H3`,stroke:t})]})})),fp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M10 4v4`,stroke:t}),(0,H.jsx)(N,{d:`M2 8h20`,stroke:t}),(0,H.jsx)(N,{d:`M6 4v4`,stroke:t})]})})),pp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,stroke:t}),(0,H.jsx)(N,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,stroke:t}),(0,H.jsx)(N,{d:`M10 12h4`,stroke:t})]})})),mp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m3 16 4 4 4-4`,stroke:t}),(0,H.jsx)(N,{d:`M7 20V4`,stroke:t}),(0,H.jsx)(N,{d:`m21 8-4-4-4 4`,stroke:t}),(0,H.jsx)(N,{d:`M17 4v16`,stroke:t})]})})),hp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M12 5v14`,stroke:t}),(0,H.jsx)(N,{d:`m19 12-7 7-7-7`,stroke:t})]})})),gp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m12 19-7-7 7-7`,stroke:t}),(0,H.jsx)(N,{d:`M19 12H5`,stroke:t})]})})),_p=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M5 12h14`,stroke:t}),(0,H.jsx)(N,{d:`m12 5 7 7-7 7`,stroke:t})]})})),vp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m5 12 7-7 7 7`,stroke:t}),(0,H.jsx)(N,{d:`M12 19V5`,stroke:t})]})})),yp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M10.268 21a2 2 0 0 0 3.464 0`,stroke:t}),(0,H.jsx)(N,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,stroke:t})]})})),bp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M12 8V4H8`,stroke:t}),(0,H.jsx)(ae,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M2 14h2`,stroke:t}),(0,H.jsx)(N,{d:`M20 14h2`,stroke:t}),(0,H.jsx)(N,{d:`M15 13v2`,stroke:t}),(0,H.jsx)(N,{d:`M9 13v2`,stroke:t})]})})),xp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,stroke:t}),(0,H.jsx)(N,{d:`m7 16.5-4.74-2.85`,stroke:t}),(0,H.jsx)(N,{d:`m7 16.5 5-3`,stroke:t}),(0,H.jsx)(N,{d:`M7 16.5v5.17`,stroke:t}),(0,H.jsx)(N,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,stroke:t}),(0,H.jsx)(N,{d:`m17 16.5-5-3`,stroke:t}),(0,H.jsx)(N,{d:`m17 16.5 4.74-2.85`,stroke:t}),(0,H.jsx)(N,{d:`M17 16.5v5.17`,stroke:t}),(0,H.jsx)(N,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,stroke:t}),(0,H.jsx)(N,{d:`M12 8 7.26 5.15`,stroke:t}),(0,H.jsx)(N,{d:`m12 8 4.74-2.85`,stroke:t}),(0,H.jsx)(N,{d:`M12 13.5V8`,stroke:t})]})})),Sp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16`,stroke:t}),(0,H.jsx)(ae,{width:`20`,height:`14`,x:`2`,y:`6`,rx:`2`,stroke:t})]})})),Cp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z`,stroke:t}),(0,H.jsx)(N,{d:`M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2`,stroke:t}),(0,H.jsx)(N,{d:`M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2`,stroke:t}),(0,H.jsx)(N,{d:`M10 6h4`,stroke:t}),(0,H.jsx)(N,{d:`M10 10h4`,stroke:t}),(0,H.jsx)(N,{d:`M10 14h4`,stroke:t}),(0,H.jsx)(N,{d:`M10 18h4`,stroke:t})]})})),wp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M8 2v4`,stroke:t}),(0,H.jsx)(N,{d:`M16 2v4`,stroke:t}),(0,H.jsx)(ae,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M3 10h18`,stroke:t}),(0,H.jsx)(N,{d:`M8 14h.01`,stroke:t}),(0,H.jsx)(N,{d:`M12 14h.01`,stroke:t}),(0,H.jsx)(N,{d:`M16 14h.01`,stroke:t}),(0,H.jsx)(N,{d:`M8 18h.01`,stroke:t}),(0,H.jsx)(N,{d:`M12 18h.01`,stroke:t}),(0,H.jsx)(N,{d:`M16 18h.01`,stroke:t})]})})),Tp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M8 2v4`,stroke:t}),(0,H.jsx)(N,{d:`M16 2v4`,stroke:t}),(0,H.jsx)(ae,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M3 10h18`,stroke:t})]})})),Ep=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`m6 9 6 6 6-6`,stroke:t})})})),Dp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`m15 18-6-6 6-6`,stroke:t})})})),Op=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`m18 15-6-6-6 6`,stroke:t})})})),kp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m7 15 5 5 5-5`,stroke:t}),(0,H.jsx)(N,{d:`m7 9 5-5 5 5`,stroke:t})]})})),Ap=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,stroke:t})]})})),jp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(N,{d:`m9 12 2 2 4-4`,stroke:t})]})})),Mp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m2 2 20 20`,stroke:t}),(0,H.jsx)(N,{d:`M8.35 2.69A10 10 0 0 1 21.3 15.65`,stroke:t}),(0,H.jsx)(N,{d:`M19.08 19.08A10 10 0 1 1 4.92 4.92`,stroke:t})]})})),Np=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ue,{points:`16 18 22 12 16 6`,stroke:t}),(0,H.jsx)(ue,{points:`8 6 2 12 8 18`,stroke:t})]})})),Pp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`8`,cy:`8`,r:`6`,stroke:t}),(0,H.jsx)(N,{d:`M18.09 10.37A6 6 0 1 1 10.34 18`,stroke:t}),(0,H.jsx)(N,{d:`M7 6h1v4`,stroke:t}),(0,H.jsx)(N,{d:`m16.71 13.88.7.71-2.82 2.82`,stroke:t})]})})),Fp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M9 3v18`,stroke:t}),(0,H.jsx)(N,{d:`M15 3v18`,stroke:t})]})})),Ip=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m12 15 2 2 4-4`,stroke:t}),(0,H.jsx)(ae,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,stroke:t}),(0,H.jsx)(N,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,stroke:t})]})})),Lp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,stroke:t}),(0,H.jsx)(N,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,stroke:t})]})})),Rp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`,stroke:t}),(0,H.jsx)(A,{x1:`2`,x2:`22`,y1:`10`,y2:`10`,stroke:t})]})})),zp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(A,{x1:`12`,x2:`12`,y1:`2`,y2:`22`,stroke:t}),(0,H.jsx)(N,{d:`M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6`,stroke:t})]})})),Bp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,stroke:t}),(0,H.jsx)(ue,{points:`7 10 12 15 17 10`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,stroke:t})]})})),Vp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`12`,cy:`5`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`12`,cy:`19`,r:`1`,stroke:t})]})})),Hp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M15 3h6v6`,stroke:t}),(0,H.jsx)(N,{d:`M10 14 21 3`,stroke:t}),(0,H.jsx)(N,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,stroke:t})]})})),Up=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,stroke:t}),(0,H.jsx)(N,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,stroke:t}),(0,H.jsx)(N,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,stroke:t}),(0,H.jsx)(N,{d:`m2 2 20 20`,stroke:t})]})})),Wp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,stroke:t}),(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`3`,stroke:t})]})})),Gp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,stroke:t}),(0,H.jsx)(N,{d:`M14 2v4a2 2 0 0 0 2 2h4`,stroke:t}),(0,H.jsx)(N,{d:`M10 9H8`,stroke:t}),(0,H.jsx)(N,{d:`M16 13H8`,stroke:t}),(0,H.jsx)(N,{d:`M16 17H8`,stroke:t})]})})),Kp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z`,stroke:t}),(0,H.jsx)(N,{d:`M8 10v4`,stroke:t}),(0,H.jsx)(N,{d:`M12 10v2`,stroke:t}),(0,H.jsx)(N,{d:`M16 10v6`,stroke:t})]})})),qp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`8`,height:`5`,x:`14`,y:`17`,rx:`1`,stroke:t}),(0,H.jsx)(N,{d:`M10 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v2.5`,stroke:t}),(0,H.jsx)(N,{d:`M20 17v-2a2 2 0 1 0-4 0v2`,stroke:t})]})})),Jp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,stroke:t})})})),Yp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`18`,cy:`18`,r:`3`,stroke:t}),(0,H.jsx)(ve,{cx:`6`,cy:`6`,r:`3`,stroke:t}),(0,H.jsx)(N,{d:`M13 6h3a2 2 0 0 1 2 2v7`,stroke:t}),(0,H.jsx)(A,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,stroke:t})]})})),Xp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(N,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,stroke:t}),(0,H.jsx)(N,{d:`M2 12h20`,stroke:t})]})})),Zp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`9`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`9`,cy:`5`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`9`,cy:`19`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`15`,cy:`12`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`15`,cy:`5`,r:`1`,stroke:t}),(0,H.jsx)(ve,{cx:`15`,cy:`19`,r:`1`,stroke:t})]})})),Qp=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(A,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,stroke:t}),(0,H.jsx)(A,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,stroke:t}),(0,H.jsx)(A,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,stroke:t}),(0,H.jsx)(A,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,stroke:t})]})})),$p=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`10`,stroke:t}),(0,H.jsx)(N,{d:`M12 16v-4`,stroke:t}),(0,H.jsx)(N,{d:`M12 8h.01`,stroke:t})]})})),em=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M6 5v11`,stroke:t}),(0,H.jsx)(N,{d:`M12 5v6`,stroke:t}),(0,H.jsx)(N,{d:`M18 5v14`,stroke:t})]})})),tm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,stroke:t}),(0,H.jsx)(N,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,stroke:t}),(0,H.jsx)(N,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,stroke:t})]})})),nm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,stroke:t}),(0,H.jsx)(ae,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,stroke:t}),(0,H.jsx)(ae,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,stroke:t}),(0,H.jsx)(ae,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,stroke:t})]})})),rm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M9 17H7A5 5 0 0 1 7 7h2`,stroke:t}),(0,H.jsx)(N,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,stroke:t}),(0,H.jsx)(A,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,stroke:t})]})})),im=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M3 6h18`,stroke:t}),(0,H.jsx)(N,{d:`M7 12h10`,stroke:t}),(0,H.jsx)(N,{d:`M10 18h4`,stroke:t})]})})),am=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M3 12h.01`,stroke:t}),(0,H.jsx)(N,{d:`M3 18h.01`,stroke:t}),(0,H.jsx)(N,{d:`M3 6h.01`,stroke:t}),(0,H.jsx)(N,{d:`M8 12h13`,stroke:t}),(0,H.jsx)(N,{d:`M8 18h13`,stroke:t}),(0,H.jsx)(N,{d:`M8 6h13`,stroke:t})]})})),om=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,stroke:t}),(0,H.jsx)(N,{d:`M7 11V7a5 5 0 0 1 10 0v4`,stroke:t})]})})),sm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,stroke:t}),(0,H.jsx)(ue,{points:`16 17 21 12 16 7`,stroke:t}),(0,H.jsx)(A,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,stroke:t})]})})),cm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,stroke:t}),(0,H.jsx)(ae,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,stroke:t})]})})),lm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,stroke:t}),(0,H.jsx)(ve,{cx:`12`,cy:`10`,r:`3`,stroke:t})]})})),tee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ue,{points:`15 3 21 3 21 9`,stroke:t}),(0,H.jsx)(ue,{points:`9 21 3 21 3 15`,stroke:t}),(0,H.jsx)(A,{x1:`21`,x2:`14`,y1:`3`,y2:`10`,stroke:t}),(0,H.jsx)(A,{x1:`3`,x2:`10`,y1:`21`,y2:`14`,stroke:t})]})})),nee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m3 11 18-5v12L3 14v-3z`,stroke:t}),(0,H.jsx)(N,{d:`M11.6 16.8a3 3 0 1 1-5.8-1.6`,stroke:t})]})})),ree=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,stroke:t}),(0,H.jsx)(N,{d:`M8 12h.01`,stroke:t}),(0,H.jsx)(N,{d:`M12 12h.01`,stroke:t}),(0,H.jsx)(N,{d:`M16 12h.01`,stroke:t})]})})),iee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M7.9 20A9 9 0 1 0 4 16.1L2 22Z`,stroke:t})})})),um=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,stroke:t})})})),dm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z`,stroke:t}),(0,H.jsx)(N,{d:`M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1`,stroke:t})]})})),fm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M5 12h14`,stroke:t})})})),aee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,stroke:t})})})),pm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M9 3v18`,stroke:t})]})})),mm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M13.234 20.252 21 12.3`,stroke:t}),(0,H.jsx)(N,{d:`m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.486`,stroke:t})]})})),hm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M5 12h14`,stroke:t}),(0,H.jsx)(N,{d:`M12 5v14`,stroke:t})]})})),gm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,stroke:t}),(0,H.jsx)(N,{d:`M21 3v5h-5`,stroke:t}),(0,H.jsx)(N,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,stroke:t}),(0,H.jsx)(N,{d:`M8 16H3v5`,stroke:t})]})})),_m=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m21 21-4.34-4.34`,stroke:t}),(0,H.jsx)(ve,{cx:`11`,cy:`11`,r:`8`,stroke:t})]})})),vm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,stroke:t}),(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`3`,stroke:t})]})})),ym=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`18`,cy:`5`,r:`3`,stroke:t}),(0,H.jsx)(ve,{cx:`6`,cy:`12`,r:`3`,stroke:t}),(0,H.jsx)(ve,{cx:`18`,cy:`19`,r:`3`,stroke:t}),(0,H.jsx)(A,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,stroke:t}),(0,H.jsx)(A,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,stroke:t})]})})),bm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,stroke:t}),(0,H.jsx)(N,{d:`m9 12 2 2 4-4`,stroke:t})]})})),xm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z`,stroke:t}),(0,H.jsx)(N,{d:`M3 6h18`,stroke:t}),(0,H.jsx)(N,{d:`M16 10a4 4 0 0 1-8 0`,stroke:t})]})})),Sm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(A,{x1:`21`,x2:`14`,y1:`4`,y2:`4`,stroke:t}),(0,H.jsx)(A,{x1:`10`,x2:`3`,y1:`4`,y2:`4`,stroke:t}),(0,H.jsx)(A,{x1:`21`,x2:`12`,y1:`12`,y2:`12`,stroke:t}),(0,H.jsx)(A,{x1:`8`,x2:`3`,y1:`12`,y2:`12`,stroke:t}),(0,H.jsx)(A,{x1:`21`,x2:`16`,y1:`20`,y2:`20`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`3`,y1:`20`,y2:`20`,stroke:t}),(0,H.jsx)(A,{x1:`14`,x2:`14`,y1:`2`,y2:`6`,stroke:t}),(0,H.jsx)(A,{x1:`8`,x2:`8`,y1:`10`,y2:`14`,stroke:t}),(0,H.jsx)(A,{x1:`16`,x2:`16`,y1:`18`,y2:`22`,stroke:t})]})})),Cm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M22 11v1a10 10 0 1 1-9-10`,stroke:t}),(0,H.jsx)(N,{d:`M8 14s1.5 2 4 2 4-2 4-2`,stroke:t}),(0,H.jsx)(A,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,stroke:t}),(0,H.jsx)(A,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,stroke:t}),(0,H.jsx)(N,{d:`M16 5h6`,stroke:t}),(0,H.jsx)(N,{d:`M19 2v6`,stroke:t})]})})),wm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,stroke:t}),(0,H.jsx)(N,{d:`M20 3v4`,stroke:t}),(0,H.jsx)(N,{d:`M22 5h-4`,stroke:t}),(0,H.jsx)(N,{d:`M4 17v2`,stroke:t}),(0,H.jsx)(N,{d:`M5 18H3`,stroke:t})]})})),Tm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`m9 12 2 2 4-4`,stroke:t})]})})),Em=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,stroke:t})})})),oee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ve,{cx:`12`,cy:`12`,r:`4`,stroke:t}),(0,H.jsx)(N,{d:`M12 2v2`,stroke:t}),(0,H.jsx)(N,{d:`M12 20v2`,stroke:t}),(0,H.jsx)(N,{d:`m4.93 4.93 1.41 1.41`,stroke:t}),(0,H.jsx)(N,{d:`m17.66 17.66 1.41 1.41`,stroke:t}),(0,H.jsx)(N,{d:`M2 12h2`,stroke:t}),(0,H.jsx)(N,{d:`M20 12h2`,stroke:t}),(0,H.jsx)(N,{d:`m6.34 17.66-1.41 1.41`,stroke:t}),(0,H.jsx)(N,{d:`m19.07 4.93-1.41 1.41`,stroke:t})]})})),Dm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,stroke:t})})})),see=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,stroke:t}),(0,H.jsx)(ve,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,stroke:t})]})})),cee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ue,{points:`4 17 10 11 4 5`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,stroke:t})]})})),lee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M3 6h18`,stroke:t}),(0,H.jsx)(N,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,stroke:t}),(0,H.jsx)(N,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,stroke:t}),(0,H.jsx)(A,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,stroke:t}),(0,H.jsx)(A,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,stroke:t})]})})),Om=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ue,{points:`22 7 13.5 15.5 8.5 10.5 2 17`,stroke:t}),(0,H.jsx)(ue,{points:`16 7 22 7 22 13`,stroke:t})]})})),km=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,stroke:t}),(0,H.jsx)(N,{d:`M12 9v4`,stroke:t}),(0,H.jsx)(N,{d:`M12 17h.01`,stroke:t})]})})),uee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ue,{points:`4 7 4 4 20 4 20 7`,stroke:t}),(0,H.jsx)(A,{x1:`9`,x2:`15`,y1:`20`,y2:`20`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12`,y1:`4`,y2:`20`,stroke:t})]})})),Am=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,stroke:t}),(0,H.jsx)(ue,{points:`17 8 12 3 7 8`,stroke:t}),(0,H.jsx)(A,{x1:`12`,x2:`12`,y1:`3`,y2:`15`,stroke:t})]})})),dee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,stroke:t}),(0,H.jsx)(ve,{cx:`9`,cy:`7`,r:`4`,stroke:t}),(0,H.jsx)(A,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,stroke:t}),(0,H.jsx)(A,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,stroke:t})]})})),jm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,stroke:t}),(0,H.jsx)(ve,{cx:`12`,cy:`7`,r:`4`,stroke:t})]})})),Mm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,stroke:t}),(0,H.jsx)(N,{d:`M16 3.128a4 4 0 0 1 0 7.744`,stroke:t}),(0,H.jsx)(N,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,stroke:t}),(0,H.jsx)(ve,{cx:`9`,cy:`7`,r:`4`,stroke:t})]})})),fee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2`,stroke:t}),(0,H.jsx)(N,{d:`m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06`,stroke:t}),(0,H.jsx)(N,{d:`m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8`,stroke:t})]})})),pee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(N,{d:`M12 20h.01`,stroke:t}),(0,H.jsx)(N,{d:`M2 8.82a15 15 0 0 1 20 0`,stroke:t}),(0,H.jsx)(N,{d:`M5 12.859a10 10 0 0 1 14 0`,stroke:t}),(0,H.jsx)(N,{d:`M8.5 16.429a5 5 0 0 1 7 0`,stroke:t})]})})),mee=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsxs)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:[(0,H.jsx)(ae,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,stroke:t}),(0,H.jsx)(N,{d:`M7 11v4a2 2 0 0 0 2 2h4`,stroke:t}),(0,H.jsx)(ae,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,stroke:t})]})})),Nm=L((0,V.memo)(function(e){let{color:t=`black`,size:n=24,...r}=e;return(0,H.jsx)(F,{width:n,height:n,viewBox:`0 0 24 24`,fill:`none`,stroke:t,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,...r,children:(0,H.jsx)(N,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,stroke:t})})})),Pm=(e,t=a,n={})=>V.Children.map(e,e=>typeof e==`string`||typeof e==`number`?(0,V.createElement)(t,n,e):e),Fm=(0,V.createContext)(null),Im={borderWidth:1,borderColor:`$rim`,rounded:`$xs`,p:`$0.5`,bg:`$panel`};function Lm({attached:e=!0,framed:t=!1,size:n,variant:r,tone:i,children:a,...o}){let s=V.Children.toArray(a).filter(V.isValidElement),c={size:n,variant:r,tone:i,framed:t},l=t?Im:null;return e?(0,H.jsx)(Fm.Provider,{value:c,children:(0,H.jsx)(rs,{...B(`button-group`),"data-attached":``,role:`group`,unstyled:!0,display:`inline-flex`,self:`flex-start`,items:`center`,...l,...o,children:s.map((e,t)=>(0,H.jsx)(rs.Item,{...t>0?{marginInlineStart:-1}:null,focusStyle:{zIndex:1},children:e},e.key??t))})}):(0,H.jsx)(Fm.Provider,{value:c,children:(0,H.jsx)(y,{...B(`button-group`),role:`group`,display:`inline-flex`,self:`flex-start`,items:`center`,gap:`$0.5`,...l,...o,children:s})})}var Rm=10,zm=600,Bm=300,Vm=(0,V.createContext)(null),Hm=(0,V.createContext)(!1),Um=({offset:e=Rm,delay:t,...n})=>{let[r,i]=(0,V.useState)({}),a=(0,V.useCallback)(e=>i(t=>({...t,...e})),[]),o=(0,V.useContext)(Hm);return(0,H.jsx)(Vm.Provider,{value:a,children:(0,H.jsx)(fu,{offset:r.offset??e,delay:t??(o?void 0:zm),...n})})},Wm=fu.Trigger,Gm=({delay:e=zm,...t})=>(0,H.jsx)(Hm.Provider,{value:!0,children:(0,H.jsx)(su,{delay:e,...t})}),Km=({sideOffset:e,startIcon:t,description:n,children:r,...i})=>{let a=dn(),o=(0,V.useContext)(Vm);return(0,V.useEffect)(()=>{e!==void 0&&o?.({offset:e})},[o,e]),(0,H.jsx)(_t,{name:a,children:(0,H.jsx)(fu.Content,{...B(`tooltip-content`),componentName:`Hint`,bg:`$panel`,borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,px:`$1.5`,py:`$1`,maxW:Bm,...i,children:t||n?(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$1`,children:[t?(0,H.jsx)(y,{shrink:0,children:t}):null,Pm(r,void 0,{size:`$1`,fontWeight:`500`})]}),n?typeof n==`string`?(0,H.jsx)(U,{...B(`tooltip-description`),fontSize:`$1`,lineHeight:`$1`,color:`$aside`,style:{whiteSpace:`pre-line`},children:n}):n:null]}):Pm(r,void 0,{size:`$1`})})})},qm={"data-i18n-mirror":``},Jm={"data-i18n-ltr":``},Ym=e=>typeof e==`string`?`\u2066${e}\u2069`:e,Xm=e=>({textAlign:e}),Zm=e=>typeof Element<`u`&&e instanceof Element&&getComputedStyle(e).direction===`rtl`,Qm=e=>{let t=e.key??``;return Zm(e.currentTarget)?t===`ArrowLeft`?`ArrowRight`:t===`ArrowRight`?`ArrowLeft`:t:t},$m=20,eh=M(y,{name:`Kbd`,render:`kbd`,display:`inline-flex`,pointerEvents:`none`,style:{userSelect:`none`},items:`center`,justify:`center`,gap:`$1`,height:$m,minW:$m,px:`$1`,rounded:`$1`,bg:`$hover`}),th=M(a,{name:`KbdText`,size:`$1`,fontWeight:`500`,color:`$quiet`}),nh={height:18,minW:16,px:`$0.5`,bg:`$panel`,borderWidth:1,borderColor:`$rim`,rounded:`$xs`,style:{userSelect:`none`,boxShadow:`var(--shadow-underline, 0 1px 0 0 var(--border-strong))`}};function rh({children:e,variant:t=`default`,...n}){return(0,H.jsx)(eh,{"data-slot":`kbd`,...Jm,...t===`cap`?{"data-variant":`cap`,...nh}:null,...n,children:Pm(e,th,t===`cap`?{color:`$aside`}:{})})}var ih=e=>{let t=e===`mac`,n=t?{glyph:`⌘`,word:`Command`}:{glyph:`Ctrl`,word:`Control`};return{mod:n,commandorcontrol:n,cmdorctrl:n,command:{glyph:`⌘`,word:`Command`},cmd:{glyph:`⌘`,word:`Command`},meta:{glyph:`⌘`,word:`Command`},control:t?{glyph:`⌃`,word:`Control`}:{glyph:`Ctrl`,word:`Control`},ctrl:t?{glyph:`⌃`,word:`Control`}:{glyph:`Ctrl`,word:`Control`},alt:t?{glyph:`⌥`,word:`Option`}:{glyph:`Alt`,word:`Alt`},option:t?{glyph:`⌥`,word:`Option`}:{glyph:`Alt`,word:`Alt`},shift:{glyph:`⇧`,word:`Shift`},enter:{glyph:`⏎`,word:`Enter`},return:{glyph:`⏎`,word:`Enter`},backspace:{glyph:`⌫`,word:`Backspace`},delete:{glyph:`⌦`,word:`Delete`},escape:{glyph:`esc`,word:`Escape`},esc:{glyph:`esc`,word:`Escape`},tab:{glyph:`⇥`,word:`Tab`},space:{glyph:`Space`,word:`Space`},arrowup:{glyph:`↑`,word:`Up arrow`},arrowdown:{glyph:`↓`,word:`Down arrow`},arrowleft:{glyph:`←`,word:`Left arrow`},arrowright:{glyph:`→`,word:`Right arrow`},up:{glyph:`↑`,word:`Up arrow`},down:{glyph:`↓`,word:`Down arrow`},left:{glyph:`←`,word:`Left arrow`},right:{glyph:`→`,word:`Right arrow`}}},ah=(e,t)=>{let n=ih(t)[e.toLowerCase()];if(n)return n;let r=e.length===1?e.toUpperCase():e;return{glyph:r,word:r}},oh=e=>e.length>0&&Array.isArray(e[0])?e.map(e=>[...e]):[[...e]];function sh(e,t={}){let n=t.platform??lh(),r=t.combinationSeparator??(n===`mac`?``:` `);return oh(e).map(e=>e.map(e=>ah(e,n).glyph).join(r)).join(` ${t.sequenceJoinLabel??`then`} `)}function ch(e,t,n=`then`){return oh(e).map(e=>e.map(e=>ah(e,t).word).join(` + `)).join(` ${n} `)}function lh(){if(typeof navigator>`u`)return`other`;let e=navigator,t=e.userAgentData?.platform??e.platform??e.userAgent??``;return/mac|iphone|ipad|ipod/i.test(t)?`mac`:`other`}var uh=()=>()=>{};function dh({keys:e,platform:t,variant:n=`keys`,visibility:r=`always`,sequenceJoinLabel:i,combinationSeparator:o,...s}){let{t:c}=R(),l=i??c(`then`),u=(0,V.useSyncExternalStore)(uh,lh,()=>`other`),d=t??u,f=ch(e,d,l),p=r===`desktop`?{$touchable:{display:`none`}}:null,m={...B(`shortcut`),"data-variant":n,role:`img`,"aria-label":f,display:`inline-flex`,items:`center`,...p};if(n===`text`||n===`button`){let t=sh(e,{platform:d,sequenceJoinLabel:l,combinationSeparator:o});return(0,H.jsxs)(y,{...m,...n===`button`?{gap:6,marginInlineStart:`$1`,opacity:.5}:null,...s,children:[n===`button`?(0,H.jsx)(y,{"aria-hidden":!0,width:1,height:8,opacity:.4,style:{backgroundColor:`currentColor`}}):null,(0,H.jsx)(a,{"aria-hidden":!0,size:`$2`,...n===`button`?{fontWeight:`500`}:null,children:Ym(t)})]})}let h=oh(e);return(0,H.jsx)(y,{...m,gap:`$1`,...s,children:(0,H.jsx)(y,{...Jm,display:`inline-flex`,items:`center`,gap:`$1`,children:h.map((e,t)=>(0,H.jsxs)(y,{"aria-hidden":!0,display:`inline-flex`,items:`center`,gap:`$1`,children:[t>0?(0,H.jsx)(a,{size:`$1`,color:`$hint`,children:l}):null,e.map((e,t)=>(0,H.jsx)(rh,{variant:`cap`,children:ah(e,d).glyph},t))]},t))})})}var fh=({variant:e,size:t,className:n}={})=>[...new Set([`btn`,`btn-${e??`default`}`,`btn-${t??`default`}`,n].filter(Boolean))].join(` `),ph=({variant:e}={})=>`badge badge-${e??`default`}`,mh=44,hh={default:36,sm:32,xs:24,lg:40,icon:36,"icon-sm":32,"icon-xs":24,"icon-2xs":20,"icon-lg":40},gh={default:`$3`,sm:`$2`,xs:`$2`,lg:`$3`,icon:`$3`,"icon-sm":`$2`,"icon-xs":`$2`,"icon-2xs":`$1`,"icon-lg":`$3`},_h={default:16,sm:14,xs:14,lg:16,icon:16,"icon-sm":16,"icon-xs":14,"icon-2xs":14,"icon-lg":20},vh={default:16,sm:14,xs:12,lg:16,icon:16,"icon-sm":14,"icon-xs":12,"icon-2xs":12,"icon-lg":16},yh=M(Je.Frame,{name:`Button`,items:`center`,justify:`center`,gap:`$2`,shrink:0,rounded:`$3`,borderWidth:1,borderColor:`transparent`,cursor:`pointer`,variants:{variant:{default:{bg:`$panel`,color:`$ink`,borderColor:`$borderColor`,hoverStyle:{bg:`$hover`,borderColor:`$rim`}},primary:{bg:`$accentBackground`,color:`$accentColor`,borderColor:`$rim`,hoverStyle:{bg:`$accentHover`,borderColor:`$bound`}},destructive:{bg:`var(--destructive)`,color:`var(--destructive-foreground)`,hoverStyle:{bg:`var(--destructive-hover)`}},outline:{bg:`$background`,color:`$ink`,borderColor:`$borderColor`,hoverStyle:{bg:`$hover`}},secondary:{bg:`$edge`,color:`$ink`,hoverStyle:{opacity:.8}},ghost:{bg:`transparent`,color:`$ink`,hoverStyle:{bg:`$hover`}},link:{bg:`transparent`,color:`$ink`,hoverStyle:{textDecorationLine:`underline`}},linkFG:{bg:`transparent`,color:`$ink`,hoverStyle:{textDecorationLine:`underline`}},linkMuted:{bg:`transparent`,color:`$quiet`,hoverStyle:{color:`$ink`,textDecorationLine:`underline`}}},size:{default:{height:`auto`,minHeight:hh.default,px:`$4`,$touchable:{minHeight:mh}},sm:{height:`auto`,minHeight:hh.sm,px:`$3`,gap:`$1.5`,$touchable:{minHeight:mh}},xs:{height:`auto`,minHeight:hh.xs,px:`$2`,gap:`$1`,$touchable:{minHeight:mh}},lg:{height:`auto`,minHeight:hh.lg,px:`$6`,$touchable:{minHeight:mh}},icon:{height:`auto`,minHeight:hh.icon,width:`auto`,minWidth:hh.icon,px:0,$touchable:{minHeight:mh,minWidth:mh}},"icon-sm":{height:`auto`,minHeight:hh[`icon-sm`],width:`auto`,minWidth:hh[`icon-sm`],px:0,$touchable:{minHeight:mh,minWidth:mh}},"icon-xs":{height:`auto`,minHeight:hh[`icon-xs`],width:`auto`,minWidth:hh[`icon-xs`],px:0,$touchable:{minHeight:mh,minWidth:mh}},"icon-2xs":{height:`auto`,minHeight:hh[`icon-2xs`],width:`auto`,minWidth:hh[`icon-2xs`],px:0,rounded:`$xs`,$touchable:{minHeight:mh,minWidth:mh}},"icon-lg":{height:`auto`,minHeight:hh[`icon-lg`],width:`auto`,minWidth:hh[`icon-lg`],px:0,$touchable:{minHeight:mh,minWidth:mh}}},compact:{true:{px:`$2`,gap:`$1`}},tone:(e,{props:t})=>{let n=bh[e];if(!n)return{};switch(t.variant){case`primary`:return{bg:n.fill,color:n.fillInk,borderColor:`transparent`,hoverStyle:{bg:n.fillHover,borderColor:`transparent`}};case`secondary`:return{bg:n.soft,color:n.ink,hoverStyle:{bg:n.softHover,opacity:1}};case`ghost`:return{color:n.ink,hoverStyle:{bg:n.tint}};case`default`:case`outline`:case void 0:return{color:n.ink,borderColor:n.edge,hoverStyle:{bg:n.tint,borderColor:n.edge}};default:return{color:n.ink}}},elevated:(e,{props:t})=>e?{...t.variant==="default"||t.variant===`outline`||t.variant===void 0?{bg:`var(--surface-page)`,borderColor:`$rim`}:null}:{},fullWidth:{true:{width:`100%`,self:`stretch`}},round:{true:{rounded:`$10`}},disabled:{true:{opacity:.5,pointerEvents:`none`,cursor:`default`}}},defaultVariants:{variant:`default`,size:`default`}}),bh={accent:{ink:`var(--primary)`,edge:`var(--primary)`,tint:`$hover`,soft:`$hover`,softHover:`$raised`,fill:`var(--primary)`,fillInk:`var(--primary-foreground)`,fillHover:`var(--primary-hover)`},danger:{ink:`$bad`,edge:`$red7`,tint:`var(--state-error-bg)`,soft:`var(--state-error-bg)`,softHover:`$red4`,fill:`var(--destructive)`,fillInk:`var(--destructive-foreground)`,fillHover:`var(--destructive-hover)`},success:{ink:`$good`,edge:`$green7`,tint:`var(--state-success-bg)`,soft:`var(--state-success-bg)`,softHover:`$green4`,fill:`$green9`,fillInk:`#ffffff`,fillHover:`$green10`}},xh=(e,t)=>{if(e!==`neutral`)return t===`primary`?bh[e].fillInk:bh[e].ink},Sh=(e,t,n)=>{if(!(0,V.isValidElement)(e))return e;let r=e.props,i={...r.size==null?{size:t}:null,...n&&r.color==null?{color:n}:null};return Object.keys(i).length?(0,V.cloneElement)(e,i):e},Ch=new Set([`icon-xs`,`icon-2xs`]),wh=1e3;function W({tooltip:e,...t}){if(e==null||e===!1)return(0,H.jsx)(Th,{...t});let n=typeof e==`string`&&t[`aria-label`]==null?{"aria-label":e}:null;return(0,H.jsxs)(Um,{delay:wh,placement:`bottom`,children:[(0,H.jsx)(Wm,{asChild:!0,children:(0,H.jsx)(Th,{...t,...t.disabled?{focusableWhenDisabled:!0}:null,...n})}),(0,H.jsx)(Km,{children:e})]})}function Th({className:e,variant:t,size:n,asChild:r=!1,isLoading:i=!1,disabled:a,startIcon:o,endIcon:s,shortcut:c,shortcutJoinLabel:l,emphasis:u=`standard`,tone:d,loadingPosition:f=`start`,fullWidth:p,elevated:m,shape:h,focusableWhenDisabled:g,children:_,...v}){let b=st(),x=(0,V.useContext)(Fm),S=t??x?.variant??`default`,C=d??x?.tone??`neutral`,w=n??x?.size??(b===`compact`?`sm`:`default`),T=b===`compact`&&n==null&&x?.size==null,E=u===`subtle`?{color:`$hint`}:null,D=u===`subtle`?`$hint`:xh(C,S),O=b===`compact`?{fontWeight:`500`}:null,k=!!a&&!!g,ee=i&&f===`center`,A=(0,H.jsx)(ap,{"aria-hidden":!0,size:`small`,maxW:vh[w],maxH:vh[w]}),j=r&&(0,V.isValidElement)(_)?_:null,M=j?j.props.children:_,N=j!=null&&j.props.href!=null;return(0,H.jsxs)(yh,{"data-slot":`button`,"data-variant":S,"data-size":w,...C===`neutral`?null:{"data-tone":C},variant:S,size:w,...T?{compact:!0}:null,...C===`neutral`?null:{tone:C},...m?{elevated:!0}:null,...p?{fullWidth:!0}:null,...h===`round`?{round:!0}:null,...x?.framed?{rounded:1}:null,...ee?{position:`relative`}:null,...j?{render:(0,V.createElement)(j.type,{...j.props,children:void 0})}:null,...N?{role:void 0}:null,disabled:k?!1:a||i,...k?{"aria-disabled":!0,opacity:.5,cursor:`not-allowed`}:null,...dt(hh[w],44,`y`),...Ot(fh({variant:S,size:n,className:m?[e,`elevation-1`].filter(Boolean).join(` `):e})),...v,...k?{onPress:void 0,onClick:e=>e?.preventDefault?.()}:null,children:[i&&f===`start`?A:null,ee?(0,H.jsx)(y,{position:`absolute`,t:0,b:0,l:0,r:0,items:`center`,justify:`center`,pointerEvents:`none`,children:A}):null,o?Sh(o,_h[w],D):null,Pm(Ch.has(w)?Sh(M,_h[w],D):M,Je.Text,{fontSize:gh[w],...O,...E,...ee?{opacity:0}:null}),c&&c.length?(0,H.jsx)(dh,{keys:c,variant:`button`,sequenceJoinLabel:l,...ee?{opacity:0}:null}):null,s?Sh(s,_h[w],D):null,i&&f===`end`?A:null]})}var Eh=[`red`,`ruby`,`crimson`,`tomato`,`orange`,`amber`,`yellow`,`lime`,`grass`,`green`,`jade`,`mint`,`teal`,`cyan`,`sky`,`blue`,`iris`,`violet`,`purple`,`plum`,`pink`,`bronze`,`gold`,`brown`,`gray`],Dh={red:{light:[`#fffcfc`,`#fff7f7`,`#feebec`,`#ffdbdc`,`#ffcdce`,`#fdbdbe`,`#f4a9aa`,`#eb8e90`,`#e5484d`,`#dd3e42`,`#ce2c31`,`#641723`],dark:[`#191111`,`#201314`,`#3b1219`,`#500e1c`,`#611623`,`#73232d`,`#8c333a`,`#b54548`,`#e5484d`,`#ec5e5e`,`#ff8a88`,`#ffd1d9`]},ruby:{light:[`#fffcfd`,`#fff7f8`,`#feeaed`,`#ffdce1`,`#fecfd6`,`#f8bfc8`,`#efacb8`,`#e592a3`,`#e54666`,`#dc3b5d`,`#ca244d`,`#64172b`],dark:[`#191113`,`#1e1517`,`#3a141e`,`#4e1325`,`#5e1a2e`,`#6f2539`,`#883447`,`#b3445a`,`#e54666`,`#ec5a72`,`#ff8a94`,`#fed2e1`]},crimson:{light:[`#fffcfd`,`#fef7f9`,`#ffe9f0`,`#fedce7`,`#facedd`,`#f3bed1`,`#eaacc3`,`#e094b2`,`#e93d82`,`#df3478`,`#cb1d63`,`#621639`],dark:[`#191114`,`#201318`,`#381525`,`#4d122f`,`#5c1839`,`#6d2445`,`#873357`,`#b0436e`,`#e93d82`,`#ee528a`,`#ff87a8`,`#fdd3e8`]},tomato:{light:[`#fffcfc`,`#fff8f7`,`#ffebe7`,`#ffdcd3`,`#ffcdc2`,`#fdbdaf`,`#f5a898`,`#ec8e7b`,`#e54d2e`,`#dd4425`,`#d13415`,`#5c271f`],dark:[`#181111`,`#1f1513`,`#391714`,`#4e1511`,`#5e1c16`,`#6e2920`,`#863a2d`,`#ac4d39`,`#e54d2e`,`#ec6142`,`#ff8e6c`,`#fbd3cb`]},orange:{light:[`#fefcfb`,`#fff7ed`,`#ffefd6`,`#ffdda9`,`#ffcf8b`,`#ffc182`,`#f5ae73`,`#ec9455`,`#f76a15`,`#ef5f00`,`#d14e00`,`#582d1d`],dark:[`#17120e`,`#1e160f`,`#331e0b`,`#481f00`,`#562800`,`#66350c`,`#7e451d`,`#a35829`,`#f76a15`,`#ff791b`,`#ff9b52`,`#ffe0c2`]},amber:{light:[`#fefdfb`,`#fefbe9`,`#fff7c2`,`#ffee9c`,`#fbe577`,`#f4d673`,`#e9c163`,`#e2a336`,`#ffc100`,`#ffba18`,`#ad6200`,`#4f3422`],dark:[`#16120c`,`#1d180f`,`#302008`,`#412700`,`#4e3000`,`#5c3d05`,`#714f1a`,`#8f6424`,`#ffc100`,`#ffdc00`,`#ffc916`,`#ffe7b3`]},yellow:{light:[`#fdfdf9`,`#fefce9`,`#fffab8`,`#fff394`,`#ffe770`,`#f3d768`,`#e4c767`,`#d5ae39`,`#ffea00`,`#ffdc00`,`#a06e00`,`#473b1f`],dark:[`#14110b`,`#1b180f`,`#2c2305`,`#372b00`,`#433500`,`#524202`,`#665417`,`#836a20`,`#ffea00`,`#ffff57`,`#f5e147`,`#f6eeb4`]},lime:{light:[`#fcfdfa`,`#f8faf3`,`#eef6d6`,`#e2f0bd`,`#d3e7a6`,`#c2da91`,`#abc978`,`#8db554`,`#bdee63`,`#b0e64c`,`#5c7c2f`,`#37401c`],dark:[`#11130c`,`#151a10`,`#1f2917`,`#29371d`,`#334423`,`#3d522a`,`#496231`,`#577538`,`#bdee63`,`#d4ff70`,`#bde56b`,`#e3f7ba`]},grass:{light:[`#fbfefb`,`#f5fbf5`,`#e9f7e9`,`#daf0db`,`#c9e9ca`,`#b2deb5`,`#94ce9a`,`#65ba74`,`#46a758`,`#3e9a4f`,`#2a7e3b`,`#203c25`],dark:[`#0e1511`,`#141a15`,`#1b2a1e`,`#1d3a24`,`#25482d`,`#2d5736`,`#366740`,`#3e7949`,`#46a758`,`#53b365`,`#71d083`,`#c2f0c2`]},green:{light:[`#fbfefc`,`#f4fbf6`,`#e6f6eb`,`#d6f1df`,`#c4e8d1`,`#adddc0`,`#8eceaa`,`#5bb88b`,`#30a46c`,`#2b9a66`,`#00824d`,`#193b2d`],dark:[`#0e1512`,`#121b17`,`#132d21`,`#113b29`,`#174933`,`#1f573e`,`#28684a`,`#2f7c57`,`#30a46c`,`#33b074`,`#3dd68c`,`#b1f1cb`]},jade:{light:[`#fbfefd`,`#f4fbf7`,`#e5f7ed`,`#d6f1e3`,`#c3e9d7`,`#acdec9`,`#8bceb6`,`#55ba9f`,`#29a383`,`#26997b`,`#00825c`,`#1d3b31`],dark:[`#0d1512`,`#121c18`,`#0f2e23`,`#0a3b2c`,`#104837`,`#1b5645`,`#246854`,`#2a7e68`,`#29a383`,`#27b08b`,`#1ed8a4`,`#adf0d4`]},mint:{light:[`#f9fefd`,`#f2fbf9`,`#ddf9f2`,`#c8f4e9`,`#b3ecde`,`#9ce0d0`,`#7ecfbd`,`#4cbba5`,`#86ead4`,`#7de1cb`,`#037864`,`#16433c`],dark:[`#0d1515`,`#0f1b1b`,`#092c2b`,`#003a39`,`#004744`,`#0f5650`,`#1e685f`,`#277f70`,`#86ead4`,`#a8f5e5`,`#58d5ba`,`#c4f5e1`]},teal:{light:[`#fafefd`,`#f3fbf9`,`#e0f8f3`,`#ccf3ea`,`#b8ebe0`,`#a1ded2`,`#83cdc1`,`#53b9ab`,`#12a594`,`#0d9b8a`,`#00826d`,`#0d3d38`],dark:[`#0d1514`,`#111c1b`,`#0d2d2a`,`#023b37`,`#084843`,`#145750`,`#1c6961`,`#1f7f74`,`#12a594`,`#0db39e`,`#0ad8b6`,`#adf0dd`]},cyan:{light:[`#fafdfe`,`#f2fafb`,`#def7f9`,`#caf1f6`,`#b5e9f0`,`#9ddee7`,`#7dcedc`,`#3db9ce`,`#01a2c7`,`#0797b9`,`#007da5`,`#0d3c48`],dark:[`#0b1619`,`#101b20`,`#082c36`,`#003848`,`#004558`,`#045468`,`#12677e`,`#11809c`,`#01a2c7`,`#23afd0`,`#4ccce5`,`#b6ecf7`]},sky:{light:[`#f9feff`,`#f1fafd`,`#e1f6fd`,`#d1f0fb`,`#bee7f5`,`#a9daed`,`#8dcae3`,`#60b3d7`,`#7ce2fe`,`#74daf8`,`#00749e`,`#1d3e56`],dark:[`#0d141e`,`#111a27`,`#112840`,`#113655`,`#154467`,`#1b537b`,`#1f6692`,`#197cae`,`#7ce2fe`,`#a8eeff`,`#75c7f0`,`#c2f3ff`]},blue:{light:[`#fdfdfe`,`#f7f9ff`,`#edf2fe`,`#e0e9ff`,`#d2deff`,`#c1d0ff`,`#abbdf9`,`#8da4ef`,`#3e63dd`,`#3358d4`,`#3a5bc7`,`#1f2d5c`],dark:[`#11131f`,`#141726`,`#182449`,`#1d2e61`,`#253974`,`#304384`,`#3a4f97`,`#435db2`,`#3e63dd`,`#5472e4`,`#9db1ff`,`#d6e1ff`]},iris:{light:[`#fdfdff`,`#f8f8ff`,`#f0f1fe`,`#e6e7ff`,`#dadcff`,`#cbcdff`,`#b8b9f8`,`#9b9ef0`,`#5b5bd6`,`#5151cd`,`#5753c6`,`#272962`],dark:[`#13131e`,`#171625`,`#202248`,`#262a65`,`#303374`,`#3d3d82`,`#4a4a95`,`#5a58b1`,`#5b5bd6`,`#6e6ade`,`#b0a9ff`,`#e0dffe`]},violet:{light:[`#fdfcfe`,`#faf8ff`,`#f4f0fe`,`#ebe5ff`,`#e1d9ff`,`#d4cafe`,`#c2b5f5`,`#aa99ec`,`#6e56cf`,`#654dc4`,`#6550b9`,`#2f265f`],dark:[`#14121f`,`#1b1525`,`#291f44`,`#33255b`,`#3c2e69`,`#473876`,`#56468b`,`#6858ad`,`#6e56cf`,`#7d66d9`,`#bba5ff`,`#e2ddfe`]},purple:{light:[`#fefcfe`,`#fbf7fe`,`#f7edfd`,`#f2e2fc`,`#ead5f9`,`#e0c4f4`,`#d1afec`,`#be93e4`,`#8e4ec6`,`#8347b9`,`#8145b5`,`#402060`],dark:[`#18111b`,`#1e1523`,`#2f1c3b`,`#3d224e`,`#48295c`,`#54346b`,`#664282`,`#8357aa`,`#8e4ec6`,`#9a5cd0`,`#d59cff`,`#ecd9fa`]},plum:{light:[`#fefcff`,`#fdf7fd`,`#fbebfb`,`#f7def8`,`#f1d1f3`,`#e9c2ec`,`#deade3`,`#cf91d8`,`#ab4aba`,`#a144af`,`#953ea3`,`#53195d`],dark:[`#181118`,`#201320`,`#351935`,`#451d47`,`#502454`,`#5e3062`,`#734079`,`#92549c`,`#ab4aba`,`#b658c4`,`#e796f3`,`#f4d4f4`]},pink:{light:[`#fffcfe`,`#fef7fb`,`#fee9f6`,`#fbdcef`,`#f6cee7`,`#efbfdd`,`#e7acd1`,`#dd93c2`,`#d6409f`,`#cf3897`,`#c2298a`,`#651249`],dark:[`#191117`,`#21121d`,`#37172f`,`#4b143d`,`#591c47`,`#692955`,`#833869`,`#a84885`,`#d6409f`,`#de51a8`,`#ff80ca`,`#fdd1ea`]},bronze:{light:[`#fdfcfc`,`#fdf7f5`,`#f6edea`,`#efe4df`,`#e7d9d3`,`#dfcdc5`,`#d3bcb3`,`#c2a499`,`#a18072`,`#957468`,`#7d5e54`,`#43302b`],dark:[`#141110`,`#1c1918`,`#262120`,`#302a27`,`#3b3330`,`#493e3a`,`#5a4d47`,`#6f5f57`,`#a18072`,`#ae8d7e`,`#d4b3a5`,`#ede0d9`]},gold:{light:[`#fdfdfc`,`#faf9f2`,`#f2f0e7`,`#eae6dc`,`#e1dccf`,`#d7d0bf`,`#cbc0aa`,`#b9a88d`,`#978365`,`#8c795e`,`#71624b`,`#3b352b`],dark:[`#121211`,`#1b1a17`,`#24231f`,`#2e2b26`,`#38352f`,`#444039`,`#544f46`,`#696256`,`#978365`,`#a39073`,`#cbb99f`,`#e8e2d9`]},brown:{light:[`#fefdfc`,`#fcf9f5`,`#f6eee7`,`#f0e4d9`,`#ebdaca`,`#e4cdb8`,`#dcbc9f`,`#cea37e`,`#ad7f58`,`#a07553`,`#815e46`,`#3e332e`],dark:[`#12110f`,`#1c1816`,`#28211d`,`#322922`,`#3e3128`,`#4d3c2f`,`#614a39`,`#7c5f46`,`#ad7f58`,`#b98c67`,`#dbb594`,`#f2e1ca`]},gray:{light:[`#ffffff`,`#fcfcfc`,`#f9f9f9`,`#f1f1f1`,`#ebebeb`,`#d6d6d6`,`#cccccc`,`#b3b3b3`,`#999999`,`#838383`,`#666666`,`#333333`],dark:[`#171717`,`#1b1b1b`,`#191919`,`#1d1d1d`,`#222222`,`#484848`,`#4c4c4c`,`#666666`,`#818181`,`#7b7b7b`,`#b3b3b3`,`#ebebeb`]},mauve:{light:[`#fdfcfd`,`#faf9fb`,`#f2eff3`,`#eae7ec`,`#e2dfe6`,`#dbd8e0`,`#d0cdd7`,`#bcbac7`,`#8e8c99`,`#83818e`,`#65636d`,`#211f26`],dark:[`#121113`,`#1a191b`,`#232225`,`#2b292d`,`#323035`,`#3c393f`,`#49474e`,`#625f69`,`#6f6d78`,`#7d7a85`,`#b5b2bc`,`#eeeef0`]},olive:{light:[`#fcfdfc`,`#f8faf8`,`#eff1ef`,`#e7e9e7`,`#dfe2df`,`#d7dad7`,`#cccfcc`,`#b9bcb8`,`#898e87`,`#7f837d`,`#60655f`,`#1d211c`],dark:[`#111210`,`#181917`,`#212220`,`#282a27`,`#2f312e`,`#383a37`,`#454943`,`#5c625b`,`#687066`,`#767d74`,`#afb5ad`,`#eceeec`]},sage:{light:[`#fbfdfc`,`#f7f9f8`,`#eef1f0`,`#e6e9e8`,`#dfe2e0`,`#d7dad8`,`#cbcfcd`,`#b8bcbb`,`#868e8b`,`#7c8481`,`#5f6563`,`#1a211e`],dark:[`#101211`,`#171918`,`#202221`,`#272a28`,`#2e3130`,`#373b39`,`#444947`,`#5b625f`,`#63706b`,`#717d79`,`#adb5b2`,`#eceeed`]},sand:{light:[`#fdfdfc`,`#f9f9f8`,`#f1f0ef`,`#e9e9e6`,`#e2e1de`,`#dad9d6`,`#cfcfca`,`#bcbbb5`,`#8d8d86`,`#82827c`,`#63635e`,`#21201c`],dark:[`#111110`,`#191918`,`#222221`,`#2a2a28`,`#31312e`,`#3b3a37`,`#494844`,`#62605a`,`#6f6d66`,`#7d7b74`,`#b5b3ad`,`#eeeeec`]},slate:{light:[`#fcfcfd`,`#f9f9fb`,`#f0f0f3`,`#e7e8ec`,`#e0e1e6`,`#d9d9e0`,`#cdced6`,`#b9bbc6`,`#8b8d98`,`#80838d`,`#60646c`,`#1c2024`],dark:[`#111113`,`#18191b`,`#212225`,`#272a2d`,`#2e3135`,`#363a3f`,`#43484e`,`#5a6169`,`#696e77`,`#777b84`,`#b0b4ba`,`#edeef0`]}},Oh=e=>{let t=0;for(let n=0;n<e.length;n++)t=e.charCodeAt(n)+((t<<5)-t);return Eh[Math.abs(t)%Eh.length]},kh=e=>typeof e==`string`&&Object.hasOwn(Dh,e),Ah=(e,t=`gray`)=>kh(e)?e:t;function jh(e,t){dn();let n={};for(let r of t)n[`--tone-${r}`]=`var(--data-${e}-${r})`;return{style:n,tone:e=>`var(--tone-${e})`}}var hee=32,Mh={xs:{box:12,font:`$1`},sm:{box:14,font:`$1`},md:{box:16,font:`$1`},lg:{box:24,font:`$2`},xl:{box:40,font:`$4`}},gee={square:`$2xs`,rounded:`$xs`,circle:`$10`},_ee=e=>{let t=[...(e??``).trim()][0];return t?t.toLocaleUpperCase():`-`},Nh=({size:e,shape:t,src:n,name:r,colorSeed:i,icon:o,variant:s=`soft`,ring:c=!1,pulsing:l=!1,onPress:u,alt:d,children:f,style:p,...m})=>{let h=typeof e==`string`&&e in Mh?Mh[e]:null,g=h?.box??(e!=null&&!h?e:hee),_=gee[t??(h?`square`:`circle`)],{style:v,tone:y}=jh(Oh(i??r??``),[4,5,6,12]),b=f==null&&(n!=null||r!=null||o!=null),x=(r??``).trim(),S=b?(0,H.jsx)(Fh,{bg:o?`transparent`:x?y(s===`outline`?5:4):`$hover`,...s===`outline`&&x&&!o?{borderWidth:1,borderColor:y(6)}:null,rounded:_,children:o?(0,V.isValidElement)(o)&&o.props.size==null?(0,V.cloneElement)(o,{size:g}):o:(0,H.jsx)(a,{fontSize:h?.font??`$2`,lineHeight:g,fontWeight:`500`,color:x?y(12):`$hint`,select:`none`,children:_ee(r)})}):null;return(0,H.jsxs)(wo,{"data-slot":`avatar`,...h?{"data-size":e}:null,...u?Pn(u):null,circular:_===`$10`,size:g,...h||t?{rounded:_}:null,shrink:0,overflow:`hidden`,...u?{cursor:`pointer`,hoverStyle:{outlineColor:`$hover`,outlineWidth:4,outlineStyle:`solid`},focusVisibleStyle:at}:null,...l?{"data-motion":`pulse`}:null,style:{...b&&x?v:null,...c?{boxShadow:`0 0 0 1px var(--border), 0 0 0 3px var(--background)`}:null,...p},...m,children:[b&&n?(0,H.jsx)(Ph,{src:n,...d?{alt:d}:null}):null,S,f]})},Ph=e=>(0,H.jsx)(wo.Image,{"data-slot":`avatar-image`,width:`100%`,height:`100%`,...e}),Fh=({children:e,...t})=>(0,H.jsx)(wo.Fallback,{"data-slot":`avatar-fallback`,bg:`$edge`,items:`center`,justify:`center`,...t,children:typeof e==`string`||typeof e==`number`?(0,H.jsx)(a,{size:`$2`,color:`$quiet`,children:e}):e}),Ih=44,Lh=24,Rh=S({variant:`default`}),zh=M(y,{name:`Badge`,context:Rh,display:`inline-flex`,self:`flex-start`,items:`center`,justify:`center`,shrink:0,minH:Lh,px:`$2.5`,py:`$1`,gap:`$1.5`,rounded:`$2`,borderWidth:1,borderColor:`transparent`,overflow:`hidden`,variants:{variant:{default:{bg:`$ink`},secondary:{bg:`$edge`},destructive:{bg:`$red9`},outline:{bg:`$background`,borderColor:`$borderColor`},ghost:{bg:`transparent`,hoverStyle:{bg:`$hover`}},link:{bg:`transparent`},inputAdornment:{bg:`$hover`,px:`$2`},tags:{bg:`$hover`,borderColor:`$borderColor`,rounded:`$3`},muted:{bg:`$hover`},accent:{bg:`var(--primary)`},inherit:{bg:`transparent`}},size:{xs:{minH:14,height:14,px:`$1`,py:0,gap:`$1`,rounded:`$10`},sm:{minH:16,height:16,px:`$2`,py:0,gap:`$1`,rounded:`$10`},md:{minH:18,height:18,px:`$1.5`,py:0,gap:`$0.5`,rounded:`$10`},lg:{}},circle:{true:{px:0,justify:`center`}}},defaultVariants:{variant:`default`}}),Bh={xs:{size:`$1`,lineHeight:14,fontWeight:`600`},sm:{size:`$1`,lineHeight:16,fontWeight:`500`},md:{size:`$1`,lineHeight:18,fontWeight:`500`}},Vh=M(a,{name:`BadgeText`,context:Rh,size:`$1`,fontWeight:`600`,variants:{variant:{default:{color:`$sunken`},secondary:{color:`$ink`},destructive:{color:`$white1`},outline:{color:`$ink`},ghost:{color:`$ink`},link:{color:`$ink`,textDecorationLine:`underline`},inputAdornment:{color:`$ink`,fontWeight:`500`},tags:{color:`$quiet`,fontWeight:`400`,textTransform:`capitalize`},muted:{color:`$hint`,fontWeight:`500`},accent:{color:`var(--primary-foreground)`,fontWeight:`500`},inherit:{}}}});function Hh({className:e,variant:t=`default`,size:n,shape:r=`pill`,asChild:i=!1,children:a,...o}){let s=n&&n!==`lg`?n:null,c=s?{xs:14,sm:16,md:18}[s]:Lh,l=t===`inherit`;return(0,H.jsx)(zh,{"data-slot":`badge`,"data-variant":t,...n?{"data-size":n}:null,variant:t??`default`,...n?{size:n}:null,...r===`circle`?{circle:!0,width:c,minW:c}:null,asChild:i,render:i?void 0:`span`,...dt(c,Ih,`y`),...Ot([ph({variant:t}),e].filter(Boolean).join(` `)),...l?{style:{backgroundColor:`color-mix(in srgb, currentColor 16%, transparent)`}}:null,...o,children:i?a:Pm(a,Vh,{...s?Bh[s]:null,...l?{style:{color:`inherit`,fontWeight:`inherit`,fontVariantNumeric:`tabular-nums`}}:null})})}var Uh=16,Wh=()=>{let e=(0,V.useContext)(Ro).checked===`indeterminate`?fm:Vt;return(0,H.jsx)(e,{size:13,color:`$ink`,strokeWidth:3})},Gh={sm:{box:12,edge:1,glyph:14,pad:5},md:{box:18,edge:1.5,glyph:20,pad:6}},Kh={solid:`$ink`,outline:`$hint`,soft:`$borderColor`},qh={accent:{fill:`var(--primary)`,glyph:`var(--primary-foreground)`,tint:`$raised`},success:{fill:`$good`,glyph:`$background`,tint:`var(--state-success-bg)`},warning:{fill:`var(--state-warning)`,glyph:`$background`,tint:`var(--state-warning-bg)`}},Jh=({look:e})=>{let t=(0,V.useContext)(Ro).checked,n=t===!0||t===`indeterminate`,r=t===`indeterminate`?fm:Vt,{dim:i,tone:a}=e;return(0,H.jsx)(y,{...B(`checkbox-box`),position:`relative`,width:i.box+2*i.edge,height:i.box+2*i.edge,rounded:e.round?`$10`:`$xs`,borderWidth:i.edge,borderColor:n?a.fill:e.disabled?`$rim`:Kh[e.variant],bg:n?a.fill:`transparent`,opacity:e.disabled&&n?.5:1,items:`center`,justify:`center`,pointerEvents:`none`,children:n?(0,H.jsx)(r,{size:i.glyph,color:a.glyph,strokeWidth:2.5}):null})},Yh=({variant:e,size:t,shape:n,color:r,hoverable:i,...a})=>{let o=st()===`compact`,s=e??(o||t!==void 0||n!==void 0||r!==void 0||i!==void 0?`solid`:`plain`);if(s!==`plain`){let e=Gh[t??`sm`],o=i??!0,c=e.box+2*e.edge,l=o?c+2*e.pad:c,u=a.checked===!0||a.checked===`indeterminate`,d={dim:e,variant:s,tone:qh[r??`accent`],round:n===`round`,hoverable:o,disabled:!!a.disabled};return(0,H.jsx)(Vo,{...B(`checkbox`),"data-variant":s,"data-size":t??`sm`,width:l,height:l,flexShrink:0,padding:0,position:`relative`,items:`center`,justify:`center`,borderWidth:0,rounded:n===`round`?`$10`:o?`$3`:`$xs`,backgroundColor:`transparent`,...o&&!a.disabled?{hoverStyle:{bg:u?d.tone.tint:`$hover`}}:null,activeStyle:{bg:`transparent`},cursor:a.disabled?`not-allowed`:`pointer`,...dt(l),...a,children:(0,H.jsx)(Jh,{look:d})})}return(0,H.jsx)(Vo,{...B(`checkbox`),width:Uh,height:Uh,flexShrink:0,padding:0,borderRadius:`$2`,borderWidth:1,borderColor:`$bound`,backgroundColor:`transparent`,activeStyle:{bg:`transparent`},...dt(Uh),...a,children:(0,H.jsx)(Vo.Indicator,{...B(`checkbox-indicator`),alignItems:`center`,justifyContent:`center`,children:(0,H.jsx)(Wh,{})})})},Xh=(e,t,n)=>{let r=t.trim().toLowerCase();if(!r)return 1;let i=(n?.length?`${e} ${n.join(` `)}`:e).toLowerCase();if(i===r)return 1;if(i.startsWith(r))return .9;let a=i.indexOf(r);if(a>-1)return .8-a/(i.length*100);let o=0;for(let e=0;e<i.length&&o<r.length;e++)i[e]===r[o]&&o++;return o===r.length?.4:0},Zh=(e,t,n,r=!1)=>{if(e<=0)return-1;let i=t+n;return i<0?r?e-1:0:i>=e?r?0:e-1:i},Qh=44,$h=e=>typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map($h).filter(Boolean).join(` `):(0,V.isValidElement)(e)?$h(e.props.children):``,eg=(0,V.createContext)(null),tg=(0,V.createContext)(void 0),ng=()=>{let e=(0,V.useContext)(eg);if(!e)throw Error(`Command parts must be rendered inside <Command>`);return e},rg=(0,V.forwardRef)(function({value:e,defaultValue:t,onValueChange:n,filter:r=Xh,shouldFilter:i=!0,loop:a=!1,label:o,vimBindings:s=!0,disablePointerSelection:c=!1,children:l,...u},d){let f=(0,V.useRef)(new Map).current,p=(0,V.useRef)([]).current,[m,h]=(0,V.useReducer)(e=>e+1,0),[g,_]=(0,V.useState)(``),[v,y]=(0,V.useState)(t??``),b=e??v,x=(0,V.useCallback)((e,t)=>(f.set(e,t),p.includes(e)||p.push(e),h(),()=>{f.delete(e);let t=p.indexOf(e);t>-1&&p.splice(t,1),h()}),[f,p]),S=(0,V.useMemo)(()=>p.filter(e=>{let t=f.get(e)?.current;return!!t&&(!i||r(t.value,g,t.keywords)>0)}),[m,p,f,i,r,g]),C=(0,V.useMemo)(()=>new Set(S),[S]),w=(0,V.useMemo)(()=>new Set(S.map(e=>f.get(e)?.current.group).filter(Boolean)),[S,f]),T=(0,V.useCallback)(t=>{e===void 0&&y(t),n?.(t)},[e,n]);(0,V.useEffect)(()=>{if(!S.length||b&&S.some(e=>f.get(e)?.current.value===b))return;let e=f.get(S[0])?.current.value;e&&T(e)},[S,b,f,T]);let E=(0,V.useCallback)(e=>{let t=S.filter(e=>!f.get(e)?.current.disabled),n=t.findIndex(e=>f.get(e)?.current.value===b),r=Zh(t.length,n,e,a),i=r<0?void 0:f.get(t[r])?.current.value;i&&T(i)},[S,f,b,a,T]),D=(0,V.useCallback)(e=>{let t=f.get(e)?.current;t&&!t.disabled&&(T(t.value),t.onSelect?.(t.value))},[f,T]),O=(0,V.useCallback)(e=>{let t=s&&(e.ctrlKey||e.metaKey),n=e.key===`ArrowDown`||t&&(e.key===`n`||e.key===`j`),r=e.key===`ArrowUp`||t&&(e.key===`p`||e.key===`k`);if(n||r)e.preventDefault(),E(n?1:-1);else if(e.key===`Enter`){e.preventDefault();let t=S.find(e=>f.get(e)?.current.value===b);t&&D(t)}},[s,E,S,f,b,D]),k=(0,V.useMemo)(()=>({search:g,setSearch:_,selected:b,select:T,register:x,touch:h,run:D,onKey:O,shows:e=>C.has(e),showsGroup:e=>w.has(e),empty:S.length===0,disablePointerSelection:c}),[g,b,T,x,D,O,C,w,S.length,c]);return(0,H.jsx)(eg.Provider,{value:k,children:(0,H.jsx)(z,{ref:d,"data-slot":`command`,"aria-label":o,width:`100%`,overflow:`hidden`,rounded:`$4`,bg:`$background`,onKeyDown:O,...u,children:l})})}),ig=(0,V.forwardRef)(function({value:e,onValueChange:t,placeholder:n,...r},i){let{search:a,setSearch:o,onKey:s}=ng();return(0,V.useEffect)(()=>{e!==void 0&&e!==a&&o(e)},[e,a,o]),(0,H.jsxs)(y,{"data-slot":`command-input-wrapper`,items:`center`,gap:`$2`,px:`$3`,minH:Qh,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(_m,{size:16,opacity:.5}),(0,H.jsx)(ht,{ref:i,"data-slot":`command-input`,unstyled:!0,flex:1,height:Qh,borderWidth:0,bg:`transparent`,color:`$color`,placeholder:n,value:e??a,onChangeText:e=>{o(e),t?.(e)},onKeyDown:s,...r})]})}),ag=(0,V.forwardRef)(function(e,t){return(0,H.jsx)(Mt,{ref:t,"data-slot":`command-list`,maxH:300,...e})}),og=(0,V.forwardRef)(function({children:e,...t},n){let{empty:r}=ng();return r?(0,H.jsx)(z,{ref:n,"data-slot":`command-empty`,py:`$4`,items:`center`,...t,children:typeof e==`string`?(0,H.jsx)(a,{size:`$3`,color:`$quiet`,children:e}):e}):null}),sg=(0,V.forwardRef)(function({value:e,keywords:t,disabled:n,onSelect:r,children:i,...a},o){let s=(0,V.useId)(),{register:c,touch:l,run:u,select:d,selected:f,shows:p,disablePointerSelection:m}=ng(),h=(0,V.useContext)(tg),g=e??$h(i),_=(0,V.useRef)({value:g,keywords:t,disabled:n,group:h,onSelect:r});_.current={value:g,keywords:t,disabled:n,group:h,onSelect:r},(0,V.useEffect)(()=>c(s,_),[s,c]),(0,V.useEffect)(l,[l,g,n,t?.join(`\0`)]);let v=!!g&&f===g;return(0,H.jsx)(ps,{ref:o,"data-slot":`command-item`,"data-selected":v,"data-disabled":!!n,display:p(s)?`flex`:`none`,disabled:n,minH:Qh,gap:`$2`,rounded:`$2`,bg:v?`$backgroundFocus`:`transparent`,opacity:n?.5:1,onPress:()=>u(s),onPointerEnter:n||m?void 0:()=>d(g),...a,children:i})}),cg={h:32,px:4,gap:8,icon:16,chevron:14,well:4},lg=(e,t)=>e===`danger`?t?`$bad`:`$red10`:e===`placeholder`?`$hint`:t?`$aside`:`$ink`,ug=e=>e==null||e===!1?null:typeof e==`string`?(0,H.jsx)(dh,{keys:[e]}):Array.isArray(e)?(0,H.jsx)(dh,{keys:e}):e;function dg({label:e,sub:t,contextual:n,contextualPosition:r=`left`,dot:i,icon:a,iconContainer:o=!1,grip:s=`never`,shortcut:c,check:l=!1,submenu:u=!1,tone:d=`default`,quiet:f=!1,hovered:p=!1,subColor:m=`$hint`}){let h=i?(0,H.jsx)(z,{width:8,height:8,rounded:`$10`,bg:i}):a,g=s===`always`||s===`onHover`&&p?(0,H.jsx)(Zp,{size:cg.icon,color:`$hush`}):h&&o?(0,H.jsx)(y,{p:cg.well,rounded:`$xs`,bg:`$hover`,items:`center`,justify:`center`,shrink:0,children:h}):h,_=n!=null&&n!==``?(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,numberOfLines:1,paddingInlineStart:4,shrink:1,children:n}):null;return(0,H.jsxs)(H.Fragment,{children:[s===`never`?g??null:(0,H.jsx)(y,{shrink:0,items:`center`,justify:`center`,minW:cg.icon,children:g}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsxs)(y,{items:`center`,minW:0,children:[typeof e==`string`||typeof e==`number`?(0,H.jsx)(U,{fontSize:`$2`,color:lg(d,f),numberOfLines:1,shrink:1,children:e}):e,r===`left`?_:null]}),t?typeof t==`string`?(0,H.jsx)(U,{fontSize:`$1`,color:m,numberOfLines:1,children:t}):t:null]}),r===`right`?_:null,c==null?null:(0,H.jsx)(y,{shrink:0,children:ug(c)}),l?(0,H.jsx)(Vt,{size:cg.icon,strokeWidth:2}):null,u?(0,H.jsx)(y,{shrink:0,animation:`quick`,rotate:u===`open`?`90deg`:`0deg`,"data-open":u===`open`?``:void 0,children:(0,H.jsx)(rt,{...qm,size:cg.chevron,color:`$hush`})}):null]})}var fg=32,pg=44,mg=8,hg=200,gg=32,_g=14,vg=16,yg=4,bg=176,xg=36,Sg=33,Cg=20,wg={bg:`$panel`,borderColor:`$borderColor`,borderWidth:1,rounded:`$4`,p:yg,minW:hg,overflow:`hidden`,shadowColor:`rgba(0,0,0,0.45)`,shadowRadius:20,shadowOffset:{width:0,height:10}},Tg={items:`center`,gap:mg,px:mg,minH:fg,rounded:`$xs`,select:`none`,cursor:`pointer`,...dt(fg,pg,`y`),hoverStyle:{bg:`$hover`},focusStyle:{bg:`$hover`},pressStyle:{bg:`$raised`}},Eg=({children:e})=>(0,H.jsx)(y,{position:`absolute`,insetInlineStart:mg,width:_g,height:_g,items:`center`,justify:`center`,pointerEvents:`none`,children:(0,H.jsx)(Fc.ItemIndicator,{children:e})}),Dg=V.createContext(null),Og=V.createContext(null),kg=V.createContext(null),Ag=e=>e===`compact`?8:4;function jg({offset:e,trigger:t,items:n,minWidth:r=hg,maxHeight:i,defaultPage:a,onOpenChange:o,children:s,...c}){let l=st(),u=e??Ag(l),[d,f]=V.useState(u),[p,m]=V.useState(void 0);V.useEffect(()=>f(u),[u]);let[h,g]=V.useState(a?[a]:[]),_=V.useMemo(()=>({page:h[h.length-1]??null,depth:h.length,go:e=>g(t=>[...t,e]),back:()=>g(e=>e.length>1?e.slice(0,-1):e)}),[h]),v=V.useCallback(e=>{e||g(a?[a]:[]),o?.(e)},[a,o]);return(0,H.jsx)(Dg.Provider,{value:f,children:(0,H.jsx)(Og.Provider,{value:m,children:(0,H.jsx)(kg.Provider,{value:a?_:null,children:(0,H.jsxs)(Fc,{offset:d,...p?{placement:p}:null,onOpenChange:v,...c,children:[t?(0,H.jsx)(Ng,{asChild:!0,children:t}):null,n?(0,H.jsx)(Lg,{minW:r,maxH:i,children:n.map(Mg)}):null,s]})})})})}var Mg=(e,t)=>e.type===`separator`?(0,H.jsx)(a_,{},e.key??`sep-${t}`):e.type===`label`?(0,H.jsx)(i_,{children:e.label},e.key??`label-${t}`):(0,H.jsx)(Vg,{disabled:e.disabled,variant:e.destructive?`destructive`:`default`,onSelect:e.onSelect,...e.closeOnSelect===!1?{preventCloseOnSelect:!0}:null,children:(0,H.jsx)(dg,{label:e.label,sub:e.description,icon:e.icon?(0,H.jsx)(y,{width:vg,height:vg,items:`center`,justify:`center`,shrink:0,children:e.icon}):void 0,shortcut:e.shortcut?(0,H.jsx)(o_,{children:e.shortcut}):void 0,check:!!e.selected,submenu:!!e.hasSubmenu})},e.key),Ng=Fc.Trigger;Fc.Group,Fc.Portal,Fc.Sub,Fc.RadioGroup;var Pg=(e,t)=>{if(!t)return e;let n=e?.split(`-`)[0]??`bottom`;return t===`center`?n:`${n}-${t}`},Fg=e=>[...e.querySelectorAll(`[role="menuitem"], [role="menuitemradio"], [role="menuitemcheckbox"]`)].filter(t=>t.closest(`[data-hanzogui-menu-content]`)===e&&t.getAttribute(`aria-disabled`)!==`true`&&!t.hasAttribute(`data-disabled`)),Ig=e=>e.querySelector(`[data-slot="dropdown-menu-search"] input`),Lg=V.forwardRef(function({sideOffset:e,align:t,children:n,onKeyDown:r,...i},a){let o=dn(),s=st(),c=V.useContext(kg),l=V.useContext(Dg),u=V.useContext(Og),d=e??Ag(s);V.useEffect(()=>l?.(d),[l,d]),V.useEffect(()=>u?.(Pg(void 0,t)),[u,t]);let f=e=>{if(r?.(e),e.key!==`ArrowUp`)return;let t=e.target?.closest?.(`[data-hanzogui-menu-content]`);if(!t)return;let n=Fg(t),i=Ig(t);i&&n[0]&&n[0]===document.activeElement&&(e.preventDefault(),i.focus())},p=zg(n);return(0,H.jsx)(Fc.Portal,{children:(0,H.jsx)(_t,{name:o,children:(0,H.jsx)(Lt,{value:s,children:(0,H.jsx)(kg.Provider,{value:c,children:(0,H.jsx)(Fc.Content,{ref:a,"data-slot":`dropdown-menu-content`,...wg,...p.framed?{role:`dialog`,"aria-orientation":void 0,"data-framed":``}:null,onKeyDown:f,...i,children:(0,H.jsx)(Bg,{page:c?.page??null,children:p.children})})})})})})}),Rg=e=>V.isValidElement(e)&&(e.type===Jg||e.type===n_||e.type===r_);function zg(e){let t=V.Children.toArray(e);if(!t.some(Rg))return{framed:!1,children:e};let n=[],r=[],i=()=>{r.length&&(n.push((0,H.jsx)(z,{role:`menu`,"aria-orientation":`vertical`,"data-slot":`dropdown-menu-list`,children:r},`menu-${n.length}`)),r=[])};for(let e of t)Rg(e)?(i(),n.push(e)):r.push(e);return i(),{framed:!0,children:n}}function Bg({page:e,children:t}){let n=V.useRef(null),r=V.useRef(!0);return V.useEffect(()=>{if(r.current){r.current=!1;return}let e=n.current?.closest?.(`[data-hanzogui-menu-content]`);if(!e)return;let t=requestAnimationFrame(()=>(Ig(e)??Fg(e)[0])?.focus());return()=>cancelAnimationFrame(t)},[e]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`span`,{ref:n,hidden:!0,"data-slot":`dropdown-menu-anchor`}),t]})}var Vg=V.forwardRef(function({inset:e,variant:t=`default`,disabled:n,page:r,actions:i,actionsVisibility:a=`hover`,onSelect:o,children:s,...c},l){let u=V.useContext(kg),[d,f]=V.useState(!1),p=r!==void 0&&u!==null,m=(0,H.jsx)(Fc.Item,{ref:l,"data-slot":`dropdown-menu-item`,"data-inset":e,"data-variant":t,disabled:n,...Tg,paddingInlineStart:e?gg:mg,theme:t===`destructive`?`red`:void 0,opacity:n?.5:1,cursor:n?`default`:`pointer`,...i?{flex:1,onFocus:()=>f(!0),onBlur:()=>f(!1)}:null,onSelect:e=>{r!==void 0&&u&&(e.preventDefault?.(),u.go(r)),o?.(e)},...c,children:p?(0,H.jsxs)(H.Fragment,{children:[Pm(s,U,{fontSize:`$2`}),(0,H.jsx)(rt,{...qm,size:14,marginInlineStart:`auto`,color:`$hush`})]}):Pm(s,U,{fontSize:`$2`})});return i?(0,H.jsxs)(y,{"data-slot":`dropdown-menu-item-row`,items:`center`,gap:mg,onHoverIn:()=>f(!0),onHoverOut:()=>f(!1),children:[m,(0,H.jsx)(y,{"data-slot":`dropdown-menu-item-actions`,role:`group`,shrink:0,items:`center`,gap:2,opacity:a===`always`||d?1:0,$touchable:{opacity:1},animation:`75ms`,children:V.Children.map(i,e=>V.isValidElement(e)&&e.props.role==null?V.cloneElement(e,{role:`menuitem`}):e)})]}):m}),Hg=V.forwardRef(function({children:e,checked:t,...n},r){return(0,H.jsxs)(Fc.CheckboxItem,{ref:r,"data-slot":`dropdown-menu-checkbox-item`,checked:t,...Tg,paddingInlineStart:gg,...n,children:[(0,H.jsx)(Eg,{children:(0,H.jsx)(Vt,{size:vg})}),e]})}),Ug=V.createContext(null),Wg=e=>e==null?[]:Array.isArray(e)?e:[e];function Gg({value:e,defaultValue:t=null,onValueChange:n,multiple:r=!1,closeOnSelect:i,children:a}){let[o,s]=V.useState(()=>Wg(t)),c=e===void 0?o:Wg(e),l=t=>{e===void 0&&s(t),n?.(r?t:t[0]??null)},u={multiple:r,closeOnSelect:i??!r,has:e=>c.includes(e),toggle:e=>l(r?c.includes(e)?c.filter(t=>t!==e):[...c,e]:[e])};return(0,H.jsx)(Ug.Provider,{value:u,children:r?(0,H.jsx)(Fc.Group,{"data-slot":`dropdown-menu-selection-group`,children:a}):(0,H.jsx)(Fc.RadioGroup,{"data-slot":`dropdown-menu-selection-group`,value:c[0]??``,onValueChange:e=>l(e?[e]:[]),children:a})})}var Kg=({on:e})=>(0,H.jsx)(y,{width:_g,height:_g,shrink:0,rounded:`$xs`,borderWidth:1,borderColor:e?`var(--primary)`:`$bound`,bg:e?`var(--primary)`:`transparent`,items:`center`,justify:`center`,children:e?(0,H.jsx)(Vt,{size:12,strokeWidth:3,color:`var(--primary-foreground)`}):null}),qg=V.forwardRef(function({value:e,indicator:t,closeOnSelect:n,onSelect:r,children:i,disabled:a,...o},s){let c=V.useContext(Ug),l=c?.multiple??!1,u=c?.has(e)??!1,d=t??(l?`checkbox`:`check`),f=n??c?.closeOnSelect??!l,p=(0,H.jsxs)(H.Fragment,{children:[d===`checkbox`?(0,H.jsx)(Kg,{on:u}):null,typeof i==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,numberOfLines:1,flex:1,minW:0,children:i}):i,d===`check`&&u?(0,H.jsx)(Vt,{size:vg,strokeWidth:2,marginInlineStart:`auto`}):null]}),m={ref:s,"data-slot":`dropdown-menu-option-item`,"data-indicator":d,disabled:a,...Tg,...d===`none`&&u?{bg:`$hover`}:null,opacity:a?.5:1,preventCloseOnSelect:!f,onSelect:r,...o};return l?(0,H.jsx)(Fc.CheckboxItem,{...m,checked:u,onCheckedChange:()=>c?.toggle(e),children:p}):(0,H.jsx)(Fc.RadioItem,{...m,value:e,children:p})});function Jg({value:e,defaultValue:t,onValueChange:n,placeholder:r,autoFocus:i=!0,"aria-label":a}){let{t:o}=R(),s=r??o(`Search`),c=V.useRef(null);V.useEffect(()=>{if(!i)return;let e=requestAnimationFrame(()=>{let e=setTimeout(()=>c.current?.focus(),0);t=()=>clearTimeout(e)}),t=()=>{};return()=>{cancelAnimationFrame(e),t()}},[i]);let l=e=>{if(e.key===`Escape`||e.key===`Tab`)return;let t=e.currentTarget.closest(`[data-hanzogui-menu-content]`);if(e.key===`ArrowDown`){e.preventDefault(),e.stopPropagation(),t&&Fg(t)[0]?.focus();return}if(e.key===`Enter`){if(e.stopPropagation(),e.nativeEvent.isComposing)return;e.preventDefault(),t&&Fg(t)[0]?.click();return}e.stopPropagation()};return(0,H.jsx)(y,{"data-slot":`dropdown-menu-search`,minH:xg,items:`center`,px:mg,mx:-4,mt:-4,mb:yg,borderBottomWidth:1,borderColor:`$borderColor`,children:(0,H.jsx)(ht,{ref:c,unstyled:!0,flex:1,minW:0,height:20,p:0,borderWidth:0,bg:`transparent`,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:`$1`,"aria-label":a??s,placeholder:s,...e===void 0?{defaultValue:t}:{value:e},onChangeText:e=>n?.(e),onKeyDown:l,style:{outlineStyle:`none`}})})}function Yg({label:e,scrollable:t=!1,children:n,...r}){return(0,H.jsxs)(Fc.Group,{"data-slot":`dropdown-menu-section`,...typeof e==`string`?{"aria-label":e}:null,children:[e?(0,H.jsx)(i_,{variant:`band`,children:e}):null,(0,H.jsx)(z,{gap:2,...t?{maxH:bg,style:{overflowY:`auto`,overscrollBehavior:`contain`}}:null,...r,children:n})]})}function Xg({id:e,children:t}){let n=V.useContext(kg);return!n||n.page!==e?null:(0,H.jsx)(z,{"data-slot":`dropdown-menu-page`,"data-page":e,children:t})}var Zg={minH:Sg,items:`center`,gap:mg,px:mg,mx:-4,mt:-4,mb:yg,borderBottomWidth:1,borderColor:`$borderColor`};function Qg({children:e,...t}){return(0,H.jsx)(y,{"data-slot":`dropdown-menu-header`,...Zg,...t,children:e})}function $g({children:e,...t}){return(0,H.jsx)(U,{"data-slot":`dropdown-menu-title`,fontSize:`$2`,fontWeight:`500`,color:`$ink`,numberOfLines:1,flex:1,...t,children:e})}var e_=V.forwardRef(function({children:e,onSelect:t,...n},r){let i=V.useContext(kg);return(0,H.jsxs)(Fc.Item,{ref:r,"data-slot":`dropdown-menu-back`,...Zg,rounded:0,cursor:`pointer`,hoverStyle:{bg:`$hover`},focusStyle:{bg:`$hover`},preventCloseOnSelect:!0,onSelect:e=>{i?.back(),t?.(e)},...n,children:[(0,H.jsx)(Dp,{...qm,size:vg,color:`$aside`}),typeof e==`string`?(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$ink`,numberOfLines:1,flex:1,children:e}):e]})});function t_({slot:e,children:t}){return(0,H.jsx)(y,{"data-slot":e,role:`status`,"aria-live":`polite`,items:`center`,gap:mg,p:mg,children:t})}function n_({children:e}){let{t}=R();return(0,H.jsx)(t_,{slot:`dropdown-menu-empty`,children:(0,H.jsx)(U,{fontSize:`$1`,color:`$aside`,children:e??t(`No results`)})})}function r_({children:e}){let{t}=R();return(0,H.jsxs)(t_,{slot:`dropdown-menu-loading`,children:[(0,H.jsx)(y,{"aria-hidden":!0,children:(0,H.jsx)(ap,{size:`small`,maxW:14,maxH:14})}),(0,H.jsx)(U,{fontSize:`$1`,color:`$quiet`,children:e??t(`Loading`)})]})}var i_=V.forwardRef(function({inset:e,variant:t=`default`,...n},r){return t===`band`?(0,H.jsx)(Fc.Label,{ref:r,"data-slot":`dropdown-menu-label`,"data-variant":`band`,height:Cg,lineHeight:Cg,mx:-4,px:mg,py:0,bg:`$hover`,fontSize:`$1`,fontWeight:`400`,color:`$hint`,select:`none`,...n}):(0,H.jsx)(Fc.Label,{ref:r,"data-slot":`dropdown-menu-label`,"data-inset":e,px:mg,py:4,paddingInlineStart:e?gg:mg,fontSize:`$2`,fontWeight:`500`,color:`$ink`,select:`none`,...n})}),a_=V.forwardRef(function(e,t){return(0,H.jsx)(Fc.Separator,{ref:t,"data-slot":`dropdown-menu-separator`,height:1,bg:`$borderColor`,mx:-4,my:yg,...e})});function o_(e){return(0,H.jsx)(U,{"data-slot":`dropdown-menu-shortcut`,marginInlineStart:`auto`,fontSize:`$1`,letterSpacing:1,color:`$quiet`,...e,children:Ym(e.children)})}var s_=(e=2)=>({className:`glass elevation-${e}`,backgroundColor:`$background`,borderColor:`$borderColor`});({...B(`rows`)});var c_=(e,t)=>{let[n,r]=e.split(`-`),i=t??r;return!i||i===`center`?n:`${n}-${i}`},l_=e=>e?{secureTextEntry:!0,type:`password`}:{secureTextEntry:!1,type:`text`},u_={default:{h:36,gutter:12,riser:7,font:`$3`},lg:{h:46,gutter:14,riser:12,font:`$3`},sm:{h:32,gutter:8,riser:7,font:`$2`},xs:{h:24,gutter:8,riser:3,font:`$2`}},d_={bg:`$raised`},f_={px:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,bg:`transparent`},p_=(0,V.createContext)({}),m_=()=>(0,V.useContext)(p_),h_=(e,t)=>e==null?!!t.invalid:e!==!1&&e!==`false`;M(z,{name:`FieldGroup`,width:`100%`,gap:`$7`}),M(y,{name:`Field`,context:S({orientation:`vertical`}),width:`100%`,gap:`$3`,variants:{orientation:{vertical:{flexDirection:`column`},horizontal:{flexDirection:`row`,items:`center`},responsive:{flexDirection:`column`,$md:{flexDirection:`row`,items:`center`}}},invalid:{true:{color:`$red9`}}},defaultVariants:{orientation:`vertical`}}),M(z,{name:`FieldContent`,flex:1,gap:`$1.5`});var g_=(0,V.createContext)(null),__=`color-mix(in srgb, var(--foreground) 32%, transparent)`,v_=(e,t)=>t?.4:e?.9:.6;function y_({start:e,end:t,size:n,fill:r=!1,children:i,...a}){let o=st(),s=lt(n,o),c=u_[s],[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)({invalid:!1,disabled:!1}),p=(0,V.useCallback)(e=>f(t=>t.invalid===e.invalid&&t.disabled===e.disabled?t:e),[]),m=(0,V.useMemo)(()=>({size:s,focus:u,report:p}),[s,p]),h=d.invalid?l?`$red8`:`$red7`:l?__:`$borderColor`;return(0,H.jsx)(g_.Provider,{value:m,children:(0,H.jsxs)(y,{...B(`input-group`),"data-focused":l?``:void 0,"data-invalid":d.invalid?``:void 0,"data-disabled":d.disabled?``:void 0,componentName:`Input`,...f_,...o===`compact`?{bg:`$panel`}:null,...r?d_:null,borderColor:h,hoverStyle:d.disabled||l?void 0:{borderColor:`$borderColorHover`},items:`center`,gap:`$1`,height:c.h,width:`100%`,minW:0,px:c.gutter,cursor:d.disabled?`not-allowed`:void 0,...a,children:[e?(0,H.jsx)(y,{...B(`input-group-start`),shrink:0,items:`center`,opacity:v_(l,d.disabled),children:e}):null,i,t?(0,H.jsx)(y,{...B(`input-group-end`),shrink:0,items:`center`,gap:`$1`,opacity:v_(l,d.disabled),children:t}):null]})})}var b_=24,x_=44,S_=(e,t)=>({position:`absolute`,[e===`start`?`insetInlineStart`:`insetInlineEnd`]:t,t:0,b:0,items:`center`,justify:`center`}),C_=(0,V.forwardRef)(function({startAdornment:e,endAdornment:t,reveal:n=!0,type:r,secureTextEntry:i,size:a,fill:o=!1,...s},c){let{t:l}=R(),[u,d]=(0,V.useState)(!1),f=st(),p=(0,V.useContext)(g_),m=r===`password`||i===!0,h=r===`email`||r===`url`,g=m&&n,_=u_[p?.size??lt(a,f)],v=_.gutter+b_,b=m_(),x=h_(s[`aria-invalid`],b),S=!!s.disabled,C=p?.report;if((0,V.useEffect)(()=>C?.({invalid:x,disabled:S}),[C,x,S]),p){let{onFocus:e,onBlur:t}=s;return(0,H.jsx)(ht,{ref:c,...B(`input`),...m?l_(!u):{type:r,secureTextEntry:i},flex:1,minW:0,height:_.h-2,px:0,borderWidth:0,rounded:0,bg:`transparent`,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:_.font,...x?{"aria-invalid":!0}:null,...s,style:{...s.style??null,outlineStyle:`none`},onFocus:t=>{p.focus(!0),e?.(t)},onBlur:e=>{p.focus(!1),t?.(e)}})}let w=(0,H.jsx)(ht,{ref:c,...B(`input`),...m?l_(!u):{type:r,secureTextEntry:i},...f_,...f===`compact`?{bg:`$panel`}:null,...o?d_:null,...x?{borderColor:`$red7`,focusStyle:{borderColor:`$red8`}}:null,height:_.h,...`height`in s?null:{$touchable:{height:Math.max(_.h,x_)}},width:`100%`,minW:0,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:_.font,...x?{"aria-invalid":!0}:null,paddingInlineStart:e?v:_.gutter,paddingInlineEnd:t||g?v:_.gutter,...s});return!e&&!t&&!g?w:(0,H.jsxs)(y,{position:`relative`,width:`100%`,items:`center`,...h?Jm:null,children:[e?(0,H.jsx)(y,{...S_(`start`,_.gutter),pointerEvents:`none`,opacity:.6,children:e}):null,w,g?(0,H.jsx)(y,{...dt(20),...S_(`end`,_.gutter),cursor:`pointer`,onPress:()=>d(e=>!e),"aria-label":l(u?`Hide password`:`Show password`),children:u?(0,H.jsx)(Up,{size:16}):(0,H.jsx)(Wp,{size:16})}):t?(0,H.jsx)(y,{...S_(`end`,_.gutter),opacity:.6,children:t}):null]})}),w_=4,T_=`bottom`,E_=(0,V.createContext)(null),D_=(0,V.createContext)(!1);function O_({offset:e,placement:t,...n}){let r=st();e??=r===`compact`?8:w_;let[i,a]=(0,V.useState)({}),o=(0,V.useCallback)(e=>a(t=>({...t,...e})),[]);return(0,H.jsx)(E_.Provider,{value:o,children:(0,H.jsx)(pt,{offset:i.offset??e,placement:c_(t??T_,i.align),...n})})}var k_=pt.Trigger;pt.Anchor,pt.Close;var A_=({sideOffset:e,align:t,solid:n,size:r,arrow:i=!1,children:a,...o})=>{let s=dn(),c=st(),l=(0,V.useContext)(E_),u=(0,V.useContext)(D_),d=n??u,f=(r??(c===`compact`?`sm`:`default`))===`sm`,p=e??(c===`compact`?8:w_);(0,V.useEffect)(()=>l?.({offset:p,align:t}),[l,p,t]);let m=d?`var(--popover)`:`$panel`;return(0,H.jsx)(D_.Provider,{value:d,children:(0,H.jsx)(_t,{name:s,children:(0,H.jsx)(Lt,{value:c,children:(0,H.jsxs)(pt.Content,{...B(`popover-content`),...d?{"data-material":`solid`}:null,...f?{"data-size":`sm`}:null,bg:m,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,...f?{p:`$2`,gap:`$1`,maxW:`var(--hanzogui-popper-available-width, 100vw)`}:{p:`$4`,width:288},...o,children:[i?(0,H.jsx)(pt.Arrow,{...B(`popover-arrow`),size:8.5,bg:m,borderWidth:1,borderColor:`$borderColor`}):null,a]})})})})},j_=10,M_=44,N_={offset:0,viewport:0,content:0},P_=(0,V.createContext)(null),F_=(e,t)=>e<0?0:e>t?t:e,I_=(0,V.forwardRef)(function({orientation:e=`vertical`,...t},n){let r=(0,V.useContext)(P_),[i,a]=(0,V.useState)(0),o=(0,V.useRef)(null);if(!r||r.axis!==e)return null;let s=e===`vertical`,{content:c,viewport:l,offset:u}=r.track,d=c-l,f=d>1,p=r.type===`always`?!0:f?r.type===`auto`||r.active:!1,m=Math.max(M_,l/Math.max(c,1)*i),h=Math.max(i-m,0),g=f?h*F_(u/d,1):0,_=Et({begin:e=>{o.current=At(e,!s)},move:e=>{let t=o.current;if(t===null||h===0)return;let n=At(e,!s);o.current=n,r.scrollBy((n-t)*d/h)},end:()=>{o.current=null}});return(0,H.jsx)(y,{ref:n,...B(`scroll-area-scrollbar`),position:`absolute`,...s?{t:0,b:0,...r.dir===`rtl`?{l:0}:r.dir===`ltr`?{r:0}:{insetInlineEnd:0},width:j_,flexDirection:`column`}:{l:0,r:0,b:0,height:j_,flexDirection:`row`},p:1,opacity:+!!p,pointerEvents:p?`auto`:`none`,onLayout:e=>a(s?e.nativeEvent.layout.height:e.nativeEvent.layout.width),...t,children:(0,H.jsx)(z,{...B(`scroll-area-thumb`),bg:`$borderColor`,rounded:j_,...dt(j_,M_,s?`x`:`y`),...s?{width:`100%`,height:m,y:g}:{height:`100%`,width:m,x:g},..._})})}),L_=(0,V.forwardRef)(function({type:e=`hover`,scrollHideDelay:t=600,dir:n,horizontal:r=!1,children:i,...a},o){let s=(0,V.useRef)(null),c=(0,V.useRef)(N_),[l,u]=(0,V.useState)(N_),[d,f]=(0,V.useState)(!1),p=(0,V.useRef)(null),m=r?`horizontal`:`vertical`,h=(0,V.useCallback)(e=>{let t={...c.current,...e};c.current=t,u(t)},[]),g=()=>{p.current&&clearTimeout(p.current),p.current=null},_=()=>{g(),f(!0)},v=(0,V.useCallback)(()=>{f(!0),g(),p.current=setTimeout(()=>f(!1),t)},[t]);(0,V.useEffect)(()=>g,[]);let y=(0,V.useCallback)(e=>{let t=c.current,n=F_(t.offset+e,Math.max(t.content-t.viewport,0));h({offset:n}),s.current?.scrollTo(r?{x:n,y:0,animated:!1}:{x:0,y:n,animated:!1})},[r,h]);return(0,H.jsxs)(z,{ref:o,...B(`scroll-area`),position:`relative`,overflow:`hidden`,onMouseEnter:e===`hover`?_:void 0,onMouseLeave:e===`hover`?v:void 0,...a,children:[(0,H.jsx)(Mt,{ref:s,...B(`scroll-area-viewport`),flex:1,width:`100%`,height:`100%`,horizontal:r,showsVerticalScrollIndicator:!1,showsHorizontalScrollIndicator:!1,scrollEventThrottle:16,onLayout:e=>h({viewport:r?e.nativeEvent.layout.width:e.nativeEvent.layout.height}),onContentSizeChange:(e,t)=>h({content:r?e:t}),onScroll:e=>{let{contentOffset:t}=e.nativeEvent;h({offset:r?t.x:t.y}),v()},children:Pm(i)}),(0,H.jsx)(P_.Provider,{value:{axis:m,track:l,type:e,active:d,dir:n,scrollBy:y},children:(0,H.jsx)(I_,{orientation:m})})]})}),R_=32,z_=(0,V.createContext)(!1),B_=Object.assign(({disabled:e=!1,...t})=>(0,H.jsx)(z_.Provider,{value:e,children:(0,H.jsx)(Al,{...t})}),Al);Al.Group;var V_=(0,V.createContext)(`$3`),H_=({children:e,disabled:t,size:n,...r})=>{let i=(0,V.useContext)(z_),a=st(),o=u_[lt(n,a)],s=h_(r[`aria-invalid`],m_());return(0,H.jsxs)(Al.Trigger,{...B(`select-trigger`),unstyled:!0,disabled:t??i,...f_,...a===`compact`?{bg:`$panel`}:null,...s?{borderColor:`$red7`,"aria-invalid":!0}:null,px:o.gutter,items:`center`,justify:`space-between`,gap:`$2`,height:`auto`,minHeight:o.h,py:0,cursor:`pointer`,...dt(o.h,44,`y`),...r,children:[(0,H.jsx)(V_.Provider,{value:o.font,children:Pm(e,void 0,{size:o.font})}),(0,H.jsx)(Al.Icon,{children:(0,H.jsx)(Ep,{size:16,opacity:.5})})]})},U_=({children:e,value:t,...n})=>{let r=st()===`compact`;return(0,H.jsxs)(Al.Item,{value:t,...B(`select-item`),unstyled:!0,index:n.index??0,items:`center`,justify:`flex-start`,gap:`$2`,minH:R_,paddingInlineStart:r?`$1`:`$2`,paddingInlineEnd:`$7`,rounded:`$xs`,cursor:`pointer`,...dt(R_,44,`y`),hoverStyle:{bg:r?`$hover`:`$raised`},focusStyle:{bg:r?`$hover`:`$raised`},...n,children:[(0,H.jsx)(Al.ItemText,{...r?{fontSize:`$2`,color:`$aside`}:null,children:e}),(0,H.jsx)(y,{position:`absolute`,insetInlineEnd:`$2`,items:`center`,justify:`center`,pointerEvents:`none`,children:(0,H.jsx)(Al.ItemIndicator,{children:(0,H.jsx)(Vt,{size:16,strokeWidth:2})})})]})},W_=(e,t)=>V.Children.map(e,e=>{if(!(0,V.isValidElement)(e))return e;if(e.type===U_)return(0,V.cloneElement)(e,{index:t()});let n=e.props.children;return n===void 0?e:(0,V.cloneElement)(e,void 0,W_(n,t))}),G_=e=>(0,H.jsx)(Al.ScrollUpButton,{...B(`select-scroll-up-button`),items:`center`,justify:`center`,py:`$1`,...e,children:(0,H.jsx)(Op,{size:16})}),K_=e=>(0,H.jsx)(Al.ScrollDownButton,{...B(`select-scroll-down-button`),items:`center`,justify:`center`,py:`$1`,...e,children:(0,H.jsx)(Ep,{size:16})}),q_=({children:e,...t})=>{let n=0,r=st();return(0,H.jsx)(Al.Content,{...B(`select-content`),...t,children:(0,H.jsxs)(Lt,{value:r,children:[(0,H.jsx)(G_,{}),(0,H.jsx)(Al.Viewport,{minW:128,p:`$1`,bg:`$panel`,borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,children:W_(e,()=>n++)}),(0,H.jsx)(K_,{})]})})},J_=({children:e,...t})=>(0,H.jsx)(z,{...B(`screen`),flex:1,flexBasis:`auto`,minH:0,width:`100%`,overflow:`hidden`,...t,children:e}),Y_=({size:e=16,color:t=`currentColor`,variant:n=`arc`,...r})=>n===`dot`?(0,H.jsx)(y,{...B(`spinner`),"data-variant":`dot`,"aria-hidden":!0,width:24,height:12,shrink:0,rounded:`$10`,borderWidth:1,borderColor:t,overflow:`hidden`,items:`center`,justify:`center`,...r,children:(0,H.jsx)(w,{"data-motion":`hop`,width:8,height:8,rounded:`$10`,bg:t})}):(0,H.jsx)(ap,{...B(`spinner`),"aria-hidden":!0,size:e,color:t,...r}),vee={default:{w:36,h:20,thumb:16,edge:1},md:{w:32,h:20,thumb:16,edge:0},sm:{w:24,h:16,thumb:12,edge:0}},X_=({disabled:e,size:t,...n})=>{let r=st()===`compact`,i=vee[t??(r?`md`:`default`)];return(0,H.jsx)(Ul,{...B(`switch`),"data-size":t??(r?`md`:`default`),width:i.w,height:i.h,minHeight:i.h,padding:2,flexShrink:0,backgroundColor:`$color3`,borderWidth:i.edge,borderColor:`$borderColor`,activeStyle:{backgroundColor:`$color12`,borderColor:`$color12`},disabled:e,opacity:e?.5:1,cursor:e?`not-allowed`:`pointer`,...dt(i.h,44,`y`),...n,children:(0,H.jsx)(Ul.Thumb,{...B(`switch-thumb`),width:i.thumb,height:i.thumb,backgroundColor:`$color3`,activeStyle:{bg:`$color12`}})})},Z_=36,Q_=40,$_=(0,V.createContext)({variant:`default`,value:void 0,vertical:!1}),yee=({variant:e=`default`,value:t,defaultValue:n,onValueChange:r,orientation:i,...a})=>{let[o,s]=(0,V.useState)(n),c=t??o;return(0,H.jsx)($_.Provider,{value:{variant:e,value:c,vertical:i===`vertical`},children:(0,H.jsx)(Ql,{...B(`tabs`),flexDirection:i===`vertical`?`row`:`column`,gap:`$2`,...t===void 0?{defaultValue:n}:{value:t},onValueChange:e=>{s(e),r?.(e)},...i?{orientation:i}:null,...e===`line`?{"data-variant":`line`}:null,...a})})},bee=e=>{let{variant:t,vertical:n}=(0,V.useContext)($_);return t===`line`?(0,H.jsx)(Ql.List,{...B(`tabs-list`),...n?{flexDirection:`column`,borderInlineEndWidth:1,items:`stretch`}:{flexDirection:`row`,borderBottomWidth:1,items:`flex-end`},borderColor:`$borderColor`,bg:`transparent`,gap:`$1`,p:0,rounded:0,justify:`flex-start`,...e}):(0,H.jsx)(Ql.List,{...B(`tabs-list`),items:`center`,justify:`center`,self:`flex-start`,height:Z_,p:3,gap:2,bg:`$hover`,rounded:`$4`,...e})},xee=({children:e,startIcon:t,endIcon:n,badge:r,size:i=`md`,highlighted:a=!1,disabled:o,value:s,...c})=>{let{value:l,vertical:u}=(0,V.useContext)($_),[d,f]=(0,V.useState)(!1),p=l===s,m=o?`$hush`:p?`$ink`:`$aside`;return(0,H.jsxs)(Ql.Tab,{...B(`tabs-trigger`),"data-variant":`line`,...p?{"data-chosen":``}:null,unstyled:!0,value:s,disabled:o,position:`relative`,items:`center`,justify:`center`,minH:Q_,p:0,bg:`transparent`,borderWidth:0,cursor:o?`default`:`pointer`,...dt(Q_,44,`y`),onHoverIn:()=>f(!0),onHoverOut:()=>f(!1),...c,children:[(0,H.jsxs)(y,{...B(`tabs-trigger-box`),items:`center`,gap:`$1`,px:`$2`,py:i===`sm`?`$1`:`$2`,rounded:a?`$xs`:`$3`,bg:d&&!o?`$hover`:`transparent`,...a?{outlineWidth:1,outlineStyle:`solid`,outlineColor:`var(--primary)`,outlineOffset:-1}:null,children:[t,Pm(e,void 0,{size:`$2`,fontWeight:`500`,color:m,numberOfLines:1}),r,n]}),p?(0,H.jsx)(z,{...B(`tabs-indicator`),position:`absolute`,bg:`$ink`,...u?{insetInlineEnd:-1,t:0,b:0,width:1}:{b:-1,l:0,r:0,height:1}}):null]})},See=e=>{let{variant:t}=(0,V.useContext)($_);if(t===`line`)return(0,H.jsx)(xee,{...e});let{children:n,startIcon:r,endIcon:i,badge:a,size:o,highlighted:s,...c}=e;return(0,H.jsxs)(Ql.Tab,{...B(`tabs-trigger`),unstyled:!0,items:`center`,justify:`center`,height:`100%`,px:`$3`,gap:`$1.5`,rounded:`$3`,cursor:`pointer`,...dt(Z_,44,`y`),hoverStyle:{bg:`$edge`},focusStyle:{bg:`$edge`},activeStyle:{bg:`$background`,shadowColor:`$shadowColor`,shadowOpacity:.12,shadowRadius:3,shadowOffset:{width:0,height:1}},...c,children:[r,Pm(n,void 0,{size:`$2`,fontWeight:`500`}),a,i]})},Cee=({children:e,...t})=>(0,H.jsx)(Ql.Content,{...B(`tabs-content`),flexGrow:1,...t,children:Pm(e)}),ev=3,wee={default:20,lg:20,sm:16,xs:16},tv=e=>typeof e==`string`?e.split(`
22
- `).length:0,nv=V.forwardRef(function({rows:e,value:t,defaultValue:n,style:r,size:i,fill:a=!1,maxRows:o,...s},c){let l=st(),u=m_(),d=lt(i,l),f=u_[d],p=wee[d],m=d===`sm`||d===`xs`,[h,g]=V.useState(()=>tv(n)),_=t===void 0,v=h_(s[`aria-invalid`],u),y=V.useRef(null),[b,x]=V.useState(void 0),[S,C]=V.useState(!1),w=V.useCallback(e=>{y.current=e,typeof c==`function`?c(e):c&&(c.current=e)},[c]),T=_?h:t;return V.useLayoutEffect(()=>{let e=y.current;if(!e||typeof e.scrollHeight!=`number`)return;let t=e.style.height;e.style.height=`auto`;let n=e.scrollHeight;e.style.height=t,e.offsetHeight;let r=parseFloat(getComputedStyle(e).maxHeight);C(Number.isFinite(r)&&n>r),x(e=>e===n?e:n)},[T]),(0,H.jsx)(ip,{ref:w,...B(`textarea`),rows:Math.max(e??ev,_?h:tv(t)),value:t,defaultValue:n,onChangeText:_?e=>g(tv(e)):void 0,...f_,...l===`compact`?{bg:`$panel`}:null,...a?d_:null,width:`100%`,minH:m?ev*p+2*f.riser+2:64,...o?{maxH:o*p+2*f.riser+2}:null,px:f.gutter,pt:f.riser,pb:f.riser,borderColor:v?`$red7`:`$borderColor`,...v?{focusStyle:{borderColor:`$red8`}}:null,color:`$ink`,placeholderTextColor:`$placeholderColor`,fontSize:f.font,...m?{lineHeight:p}:null,opacity:s.disabled?.5:1,...v?{"aria-invalid":!0}:null,...S?{"data-capped":``}:null,...s,style:{...r,...b?{height:b}:null}})}),rv=1,Tee=class{constructor(){this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);t>-1&&this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{title:t,...n}=e,r=typeof e?.id==`number`||typeof e?.id==`string`&&e.id.length>0?e.id:rv++,i=this.toasts.find(e=>e.id===r),a=e.dismissible??!0;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t,dismissible:a}),{...n,...e,id:r,title:t,dismissible:a}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e===void 0?this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}):(this.dismissedToasts.add(e),requestAnimationFrame(()=>{this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e),this.message=(e,t)=>this.create({...t,title:e,type:`default`}),this.success=(e,t)=>this.create({...t,title:e,type:`success`}),this.error=(e,t)=>this.create({...t,title:e,type:`error`}),this.warning=(e,t)=>this.create({...t,title:e,type:`warning`}),this.info=(e,t)=>this.create({...t,title:e,type:`info`}),this.loading=(e,t)=>this.create({...t,title:e,type:`loading`}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({promise:e,type:`loading`,title:t.loading,description:typeof t.description==`function`?void 0:t.description,duration:1/0}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],Eee(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description;this.create({id:n,type:`error`,title:r,description:a})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`success`,title:r,description:a})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description;this.create({id:n,type:`error`,title:r,description:a})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally?.()}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id??rv++;return this.create({jsx:e(n),...t,id:n}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.getHistory=()=>this.toasts}};function Eee(e){return e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`}var iv=new Tee,av=Object.assign((e,t)=>iv.create({...t,title:e}),{success:iv.success,error:iv.error,warning:iv.warning,info:iv.info,loading:iv.loading,promise:iv.promise,custom:iv.custom,dismiss:iv.dismiss,message:iv.message,getHistory:()=>iv.getHistory(),getToasts:()=>iv.getActiveToasts()});function Dee(e,t){let n=typeof e.title==`function`?e.title():e.title;if(typeof n!=`string`)return!1;let r=typeof e.description==`function`?e.description():e.description,i=e.type??`default`,a=i===`error`?`error`:i===`success`?`done`:`none`,o=i===`error`?`error`:i===`success`?`success`:i===`warning`?`warning`:`none`;return eu(n,{message:typeof r==`string`?r:void 0,duration:e.duration??t.duration,burntOptions:{preset:a,haptic:o,...t.burntOptions},notificationOptions:t.notificationOptions})!==!1}var Oee=.11;function ov(e,t=25){if(e>=0)return e;let n=Math.sqrt(Math.abs(e))*2;return-Math.min(n,t)}var sv=80;function cv(e){if(Math.abs(e)<=sv)return e;let t=e>0?1:-1,n=Math.abs(e)-sv;return t*(sv+Math.sqrt(n)*2)}function kee(e){let{direction:t,threshold:n,disabled:r,expanded:i,onDragMove:a,onDragStart:o,onDismiss:s,onCancel:c}=e,[l,u]=V.useState(!1),d=V.useRef(null),f=V.useRef(null),p=V.useRef(null),m=t===`left`||t===`right`||t===`horizontal`,h=t===`up`||t===`down`||t===`vertical`,g=V.useRef(null);function _(){if(typeof document>`u`)return;window.getSelection()?.removeAllRanges();let e=e=>e.preventDefault();g.current=e,document.addEventListener(`selectstart`,e,!0)}function v(){g.current&&=(document.removeEventListener(`selectstart`,g.current,!0),null)}let y=V.useCallback(()=>{d.current=null,f.current=null,u(!1),v()},[]);return V.useEffect(()=>()=>{if(d.current){if(p.current&&d.current.pointerId)try{p.current.releasePointerCapture(d.current.pointerId)}catch{}y()}},[y]),{isDragging:l,gestureHandlers:{onPointerDown:V.useCallback(e=>{if(r||e.button!==0||e.target.closest(`button, a, input, textarea, select, [role="button"]`)||(window.getSelection()?.toString().length??0)>0)return;let t=e.currentTarget;p.current=t,t.setPointerCapture(e.pointerId),d.current={startX:e.clientX,startY:e.clientY,startTime:Date.now(),pointerId:e.pointerId},_(),u(!0),o?.()},[r,o]),onPointerMove:V.useCallback(e=>{if(!d.current||r)return;let n=e.clientX-d.current.startX,i=e.clientY-d.current.startY;!f.current&&(Math.abs(n)>1||Math.abs(i)>1)&&(f.current=Math.abs(n)>Math.abs(i)?`x`:`y`);let o=0,s=0;t===`right`?o=n>0?cv(n):ov(n):t===`left`?o=n<0?cv(n):-ov(-n):t===`down`?s=i>0?cv(i):ov(i):t===`up`?s=i<0?cv(i):-ov(-i):t===`horizontal`?o=cv(n):t===`vertical`&&(s=cv(i)),a(o,s)},[r,t,i,m,h,a]),onPointerUp:V.useCallback(e=>{if(!d.current||r)return;let i=e.clientX-d.current.startX,a=e.clientY-d.current.startY,o=Date.now()-d.current.startTime,l=Math.abs(i)/o,u=Math.abs(a)/o,g=f.current,_=g===`y`&&m||g===`x`&&h,v=m?i:a,b=m?l:u,x=Math.abs(v)>=n,S=b>Oee,C=null;_||(t===`right`&&i>0?C=`right`:t===`left`&&i<0?C=`left`:t===`horizontal`?Math.abs(i)>Math.abs(a)&&(C=i>0?`right`:`left`):t===`down`&&a>0?C=`down`:t===`up`&&a<0?C=`up`:t===`vertical`&&Math.abs(a)>Math.abs(i)&&(C=a>0?`down`:`up`));let w=C&&(x||S);if(p.current)try{p.current.releasePointerCapture(e.pointerId)}catch{}y(),w&&C?s(C,b):c()},[r,t,n,m,h,s,c,y]),onPointerCancel:V.useCallback(e=>{if(p.current)try{p.current.releasePointerCapture(e.pointerId)}catch{}y(),c()},[c,y]),onLostPointerCapture:V.useCallback(()=>{d.current&&(y(),c())},[c,y])},gesture:null}}var lv={type:`spring`,damping:30,stiffness:400,mass:.5},uv=200;function dv(e,t,n,r,i,a,o){let{damping:s=30,stiffness:c=400,mass:l=.5,initialVelocityX:u=0,initialVelocityY:d=0,fadeOut:f=!1}=a,p=t,m=n,h=u,g=d,_=null,v=r,y=i,b=Math.sqrt((r-t)**2+(i-n)**2)||1;function x(){let r=-c*(p-v),i=-c*(m-y),a=-s*h,u=-s*g,d=(r+a)/l,S=(i+u)/l;if(h+=d*.016,g+=S*.016,p+=h*.016,m+=g*.016,e.style.transform=`translate3d(${p}px, ${m}px, 0)`,f){let r=Math.sqrt((p-t)**2+(m-n)**2),i=Math.min(r/b,1);e.style.opacity=String(1-i)}let C=Math.abs(p-v),w=Math.abs(m-y),T=Math.sqrt(h*h+g*g);if(C<.5&&w<.5&&T<.5){e.style.transform=`translate3d(${v}px, ${y}px, 0)`,f&&(e.style.opacity=`0`),o?.();return}_=requestAnimationFrame(x)}return _=requestAnimationFrame(x),()=>{_&&cancelAnimationFrame(_)}}function Aee(e={}){let{onExitComplete:t,reducedMotion:n,swipeAxis:r=`horizontal`}=e,{animationDriver:i}=ye();if(!i)throw Error(`Toast requires an animation driver to be set in GuiProvider`);let{useAnimatedNumber:a,useAnimatedNumberStyle:o,useAnimatedNumbersStyle:s}=i,c=i.View??w,l=V.useRef(null),u=V.useRef(null),d=V.useRef({x:0,y:0}),p=a(0),m=a(0),h=s?s([p,m],(e,t)=>{"worklet";return{transform:[{translateX:e},{translateY:t}]}}):o(r===`vertical`?m:p,e=>{"worklet";let t=r===`vertical`?p.getValue():m.getValue();return r===`vertical`?{transform:[{translateX:t},{translateY:e}]}:{transform:[{translateX:e},{translateY:t}]}}),g=f((e,t)=>{u.current?.(),u.current=null,d.current={x:e,y:t},l.current?(l.current.style.transform=`translate3d(${e}px, ${t}px, 0)`,l.current.style.opacity=`1`):(p.setValue(e,{type:`direct`}),m.setValue(t,{type:`direct`}))}),_=f(e=>{if(u.current?.(),n){l.current?l.current.style.transform=`translate3d(0px, 0px, 0)`:(p.setValue(0,{type:`direct`}),m.setValue(0,{type:`direct`})),d.current={x:0,y:0},e?.();return}if(l.current){let{x:t,y:n}=d.current;u.current=dv(l.current,t,n,0,0,lv,()=>{d.current={x:0,y:0},e?.()})}else p.setValue(0,lv),m.setValue(0,lv,e)}),v=f((e,r,i)=>{u.current?.();let{x:a,y:o}=d.current,s=e===`left`?-200:e===`right`?uv:0,c=e===`up`?-200:e===`down`?uv:0;if(e===`left`&&a<s?s=a-50:e===`right`&&a>s&&(s=a+50),e===`up`&&o<c?c=o-50:e===`down`&&o>c&&(c=o+50),n){l.current?l.current.style.transform=`translate3d(${s}px, ${c}px, 0)`:(p.setValue(s,{type:`direct`}),m.setValue(c,{type:`direct`})),i?.(),t?.();return}let f=(r??0)*500,h={damping:25,stiffness:350,mass:.4,initialVelocityX:e===`left`?-f:e===`right`?f:0,initialVelocityY:e===`up`?-f:e===`down`?f:0,fadeOut:!0};if(l.current){let{x:e,y:n}=d.current;u.current=dv(l.current,e,n,s,c,h,()=>{i?.(),t?.()})}else{let e={type:`spring`,damping:25,stiffness:350,mass:.4};p.setValue(s,e),m.setValue(c,e,()=>{i?.(),t?.()})}}),y=f(()=>{u.current?.(),p.stop(),m.stop()});return V.useEffect(()=>()=>{u.current?.()},[]),{setDragOffset:g,springBack:_,animateOut:v,stop:y,animatedStyle:h,AnimatedView:c,dragRef:l}}var fv=null;function jee(){return fv===null?typeof window>`u`?!1:(fv=window.matchMedia?.(`(prefers-reduced-motion: reduce)`)?.matches??!1,fv):fv}function Mee(e){let[t,n]=V.useState(()=>e??jee());return V.useEffect(()=>{if(e!==void 0){n(e);return}if(typeof window>`u`)return;let t=window.matchMedia?.(`(prefers-reduced-motion: reduce)`);if(!t)return;let r=e=>{fv=e.matches,n(e.matches)};return t.addEventListener?.(`change`,r),()=>{t.removeEventListener?.(`change`,r)}},[e]),t}var Nee=M(z,{name:`ToastPositionWrapper`,pointerEvents:`auto`,position:`absolute`,left:0,right:0,opacity:1,scale:1,y:0,x:0}),pv=M(z,{name:`ToastItem`,userSelect:`none`,cursor:`default`,focusable:!0,variants:{unstyled:{false:{backgroundColor:`$background`,borderRadius:`$6`,paddingHorizontal:`$4`,paddingVertical:`$3`,borderWidth:1,borderColor:`$borderColor`,shadowColor:`rgba(0, 0, 0, 0.15)`,shadowOffset:{width:0,height:4},shadowRadius:12,focusVisibleStyle:{outlineWidth:2,outlineColor:`$color8`,outlineStyle:`solid`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),mv=M(y,{name:`ToastClose`,render:`button`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,variants:{unstyled:{false:{width:18,height:18,borderRadius:`$10`,backgroundColor:`$background`,borderWidth:1,borderColor:`$borderColor`,shadowColor:`rgba(0, 0, 0, 0.08)`,shadowOffset:{width:0,height:1},shadowRadius:3,hoverStyle:{backgroundColor:`$color3`},pressStyle:{backgroundColor:`$color4`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),hv=M(y,{name:`ToastAction`,render:`button`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,variants:{unstyled:{false:{borderRadius:`$2`,paddingHorizontal:`$2`,height:24,backgroundColor:`$color5`,hoverStyle:{backgroundColor:`$color6`},pressStyle:{backgroundColor:`$color7`}}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Pee=()=>(0,H.jsx)(a,{size:`$1`,color:`$color11`,children:`✕`}),Fee=4,gv=16,Iee=14,_v=4e3,vv=72,yv=200,bv=[`altKey`,`KeyT`],xv=S({},`Toast__`),Sv=xv.useStyledContext;function Lee(e){return!!e&&Array.isArray(e.toasts)&&typeof e.setToastHeight==`function`&&typeof e.removeToast==`function`}function Cv(e){let t=Sv();if(!Lee(t))throw Error(`\`${e}\` must be used within \`Toast\``);return t}var wv=V.createContext(null);function Tv(){let e=V.useContext(wv);if(!e)throw Error(`useToastItemContext must be used within Toast.Item or Toast.List`);return e}function Ev(e,t){if(e!==`auto`)return e;let[n,r]=t.split(`-`);return r===`left`?`left`:r===`right`?`right`:`horizontal`}var Dv=V.forwardRef(function(e,t){let{children:n,position:r=`bottom-right`,duration:i=_v,gap:a=Iee,visibleToasts:o=Fee,swipeDirection:s=`auto`,swipeThreshold:c=50,toastHeight:l=vv,closeButton:u=!1,expand:d=!1,theme:f,reducedMotion:p,native:m=!1,burntOptions:h,notificationOptions:g,icons:_}=e,v=Mee(p),[y,b]=V.useState([]),[x,S]=V.useState({}),[C,w]=V.useState(!1),T=d||C,[E,D]=V.useState(!1),O=V.useRef(!1),k=V.useRef(T);V.useLayoutEffect(()=>{k.current!==T&&(O.current=!0,k.current=T);let e=setTimeout(()=>{O.current=!1},350);return()=>clearTimeout(e)},[T]);let ee=V.useCallback((e,t)=>{if(O.current)return;let n=Math.round(t);S(t=>{let r=t[e];return r!=null&&Math.abs(r-n)<=2?t:{...t,[e]:n}})},[]),A=V.useCallback(e=>{S(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})},[]),j=V.useRef(!1),M=V.useRef(null),N=V.useCallback(()=>{j.current=!0,M.current&&clearTimeout(M.current),M.current=setTimeout(()=>{j.current=!1},800)},[]),P=V.useCallback(()=>j.current,[]),te=V.useRef(h),F=V.useRef(g);V.useEffect(()=>{te.current=h},[h]),V.useEffect(()=>{F.current=g},[g]),V.useEffect(()=>iv.subscribe(e=>{if(e.dismiss){b(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t));return}m&&Dee(e,{duration:i,burntOptions:te.current,notificationOptions:F.current})||b(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})}),[m,i]);let I=V.useRef(y.length);V.useEffect(()=>{let e=I.current;I.current=y.length,(y.length<=1&&!j.current||y.length>e&&T)&&w(!1)},[y.length,T]);let ne=V.useCallback(e=>{b(t=>(t.find(t=>t.id===e.id)?.delete||iv.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]),re=Ev(s,r),ie=dn(),L=f===`system`||!f?ie?.includes(`dark`)?`dark`:`light`:f,ae={toasts:y,heights:x,setToastHeight:ee,removeToastHeight:A,expanded:T,setExpanded:w,interacting:E,setInteracting:D,triggerDismissCooldown:N,isInDismissCooldown:P,removeToast:ne,position:r,duration:i,gap:a,visibleToasts:o,swipeDirection:re,swipeThreshold:c,toastHeight:l,closeButton:u,reducedMotion:v,native:m,burntOptions:h,notificationOptions:g,icons:_};return(0,H.jsx)(xv.Provider,{...ae,children:(0,H.jsx)(se,{name:L,children:n})})}),Ov=M(w,{name:`ToastViewport`,variants:{unstyled:{false:{position:`fixed`,zIndex:1e5,pointerEvents:`box-none`,maxWidth:`100%`,width:356,minHeight:1}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),kv=Ov.styleable(function(e,t){let{offset:n=gv,hotkey:r=bv,label:i=`Notifications`,portalToRoot:a=!0,portalZIndex:o=2**53-1,children:s,...c}=e,l=Cv(`Toast.Viewport`),u=V.useRef(null),d=V.useRef(null),f=V.useRef(!1),p=V.useRef(null),m=V.useRef(!1),[h,g]=l.position.split(`-`),{insets:_}=ye(),v=V.useMemo(()=>{let e={},t=typeof n==`number`?n:gv,r=typeof n==`object`?n:{top:t,right:t,bottom:t,left:t},i=_?.top??0,a=_?.bottom??0,o=i>0?i:r.top??t,s=a>0?a:r.bottom??t;return h===`top`?e.top=o:e.bottom=s,g===`left`?e.left=r.left??t:g===`right`?e.right=r.right??t:(e.left=`50%`,e.transform=`translateX(-50%)`),e},[n,h,g]);if(V.useEffect(()=>{let e=e=>{r.length>0&&r.every(t=>e[t]||e.code===t)&&(l.setExpanded(!0),u.current?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),l.toasts.length===0)return null;let y=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),b=(0,H.jsx)(Ov,{ref:u,"aria-label":`${i} ${y}`,tabIndex:-1,"aria-live":`polite`,style:v,"data-y-position":h,"data-x-position":g,onMouseEnter:()=>{m.current=!0,p.current&&=(clearTimeout(p.current),null),l.toasts.length>1&&!l.interacting&&!f.current&&(d.current=setTimeout(()=>l.setExpanded(!0),50))},onMouseLeave:()=>{m.current=!1,d.current&&=(clearTimeout(d.current),null),!l.interacting&&!l.isInDismissCooldown()?l.setExpanded(!1):l.isInDismissCooldown()&&(p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{p.current=null,m.current||l.setExpanded(!1)},1200))},onPointerDown:()=>{d.current&&=(clearTimeout(d.current),null),l.setInteracting(!0)},onPointerUp:()=>l.setInteracting(!1),onPointerCancel:()=>l.setInteracting(!1),onFocus:e=>{e.currentTarget.contains(e.relatedTarget)||(l.toasts.length>1&&l.setExpanded(!0),l.setInteracting(!0))},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||(l.setInteracting(!1),l.isInDismissCooldown()||l.setExpanded(!1))},...c,children:s});return a?(0,H.jsx)(Jt,{zIndex:o,children:(0,H.jsx)(xv.Provider,{...l,children:b})}):b});function Av({renderItem:e}){let t=Cv(`Toast.List`),n=t.toasts.length;return(0,H.jsx)(kn,{children:t.toasts.slice(0,n).map((n,r)=>{let i=()=>{n.dismissible!==!1&&(n.onDismiss?.(n),t.removeToast(n))},a={toast:n,handleClose:i};return e?(0,H.jsx)(wv.Provider,{value:a,children:e({toast:n,index:r,handleClose:i})},n.id):(0,H.jsx)(wv.Provider,{value:a,children:(0,H.jsx)(Mv,{toast:n,index:r,children:(0,H.jsx)(jv,{toast:n})})},n.id)})})}function jv({toast:e}){let t=Cv(`Toast.Item`),{handleClose:n}=Tv();e.type;let r=e.dismissible!==!1,i=typeof e.title==`function`?e.title():e.title,o=typeof e.description==`function`?e.description():e.description;return(0,H.jsxs)(y,{alignItems:`flex-start`,gap:`$3`,children:[(0,H.jsx)(Iv,{}),(0,H.jsxs)(z,{flex:1,gap:`$1`,children:[i&&(0,H.jsx)(Nv,{children:i}),o&&(0,H.jsx)(Pv,{children:o}),(e.action||e.cancel)&&(0,H.jsxs)(y,{gap:`$2`,marginTop:`$2`,children:[e.cancel&&(0,H.jsx)(hv,{backgroundColor:`transparent`,onPress:t=>{e.cancel?.onClick?.(t),n()},children:(0,H.jsx)(a,{size:`$2`,color:`$color11`,children:e.cancel.label})}),e.action&&(0,H.jsx)(hv,{backgroundColor:`$color12`,hoverStyle:{backgroundColor:`$color11`},pressStyle:{backgroundColor:`$color10`},onPress:t=>{e.action?.onClick?.(t),t.defaultPrevented||n()},children:(0,H.jsx)(a,{size:`$2`,fontWeight:`600`,color:`$background`,children:e.action.label})})]})]}),t.closeButton&&r&&(0,H.jsx)(Fv,{})]})}function Ree({animatedStyle:e,gestureHandlers:t,gesture:n,AnimatedView:r,dragRef:i,children:a}){return(0,H.jsx)(`div`,{ref:i,style:{flex:1,display:`flex`,flexDirection:`column`,userSelect:`none`,WebkitUserSelect:`none`,touchAction:`none`,cursor:`default`},...t,children:a})}var Mv=pv.styleable(function(e,t){let{toast:n,index:r,children:i,...a}=e,o=Cv(`Toast.Item`),[s,c]=V.useState(!1),[l,u]=V.useState(!1),[d,p]=V.useState(!1),[m,h]=V.useState(0),g=V.useRef(null),_=V.useRef(null),v=V.useRef(0),y=V.useRef(0),b=V.useRef(n.duration??o.duration),x=r===0,S=r<o.visibleToasts,C=n.type??`default`,T=n.dismissible!==!1,E=n.duration??o.duration,[D]=o.position.split(`-`),O=D===`top`,k=(()=>{let e=0,t=0;for(let n=0;n<r;n++){let r=o.toasts[n]?.id;if(r==null)continue;let i=o.heights[r];i!==0&&(e+=i??o.toastHeight,t++)}return e+t*o.gap})(),ee=V.useRef(k);ee.current=k;let A=V.useRef(o.expanded);A.current=o.expanded;let j=V.useCallback(()=>{E!==1/0&&C!==`loading`&&(v.current=Date.now(),_.current=setTimeout(()=>{n.onAutoClose?.(n),u(!0),setTimeout(()=>o.removeToast(n),yv)},b.current))},[E,C,n,o.removeToast]),M=f(()=>{if(_.current&&clearTimeout(_.current),y.current<v.current){let e=Date.now()-v.current;b.current=Math.max(0,b.current-e)}y.current=Date.now()}),N=f(()=>{o.expanded||o.interacting||(b.current=E,j())});V.useEffect(()=>{c(!0)},[]),V.useEffect(()=>{n.delete&&(u(!0),A.current&&h(ee.current),setTimeout(()=>o.removeToast(n),yv))},[n.delete,n,o.removeToast]),V.useEffect(()=>(o.expanded||o.interacting?M():j(),()=>{_.current&&clearTimeout(_.current)}),[o.expanded,o.interacting,j]),V.useEffect(()=>{b.current=E},[E]);let{setDragOffset:P,springBack:te,animateOut:F,animatedStyle:I,AnimatedView:ne,dragRef:re}=Aee({reducedMotion:o.reducedMotion,swipeAxis:o.swipeDirection===`up`||o.swipeDirection===`down`||o.swipeDirection===`vertical`?`vertical`:`horizontal`}),{isDragging:ie,gestureHandlers:L,gesture:ae}=kee({direction:o.swipeDirection,threshold:o.swipeThreshold,disabled:!T||C===`loading`,expanded:o.expanded,onDragStart:M,onDragMove:P,onDismiss:(e,t)=>{o.triggerDismissCooldown(),p(!0),n.onDismiss?.(n),g.current=A.current?O?ee.current:-ee.current:x?0:O?o.gap*r:-o.gap*r,u(!0),o.removeToast(n),F(e,t)},onCancel:()=>{te(()=>{N()})}}),oe=V.useCallback(e=>{if(l||!o.expanded&&r!==0)return;let{height:t}=e.nativeEvent.layout;o.setToastHeight(n.id,t)},[n.id,o.setToastHeight,r,o.expanded,l]);V.useEffect(()=>()=>{o.removeToastHeight(n.id)},[n.id,o.removeToastHeight]);let R=V.useCallback(()=>{T&&(o.triggerDismissCooldown(),n.onDismiss?.(n),u(!0),A.current&&h(ee.current),setTimeout(()=>o.removeToast(n),yv))},[T,n,o.removeToast,o.triggerDismissCooldown]),se=V.useMemo(()=>({toast:n,handleClose:R}),[n,R]),ce=-1;for(let e of o.toasts){let t=o.heights[e.id];if(t!=null&&t>0){ce=t;break}}let le=!o.expanded&&!x?1-r*.05:1,ue=l?m:k,de=o.expanded?O?ue:-ue:x?0:O?o.gap*r:-o.gap*r,fe=l&&!d||r>=o.visibleToasts?0:1,pe=l?0:o.visibleToasts-r+1,me=o.expanded?o.heights[n.id]||void 0:!x&&ce>0?ce:void 0,he=r>=o.visibleToasts?`none`:`auto`,ge=o.expanded?o.gap+1:0,_e={"data-mounted":s?`true`:`false`,"data-removed":l?`true`:`false`,"data-swipe-out":d?`true`:`false`,"data-visible":S?`true`:`false`,"data-front":x?`true`:`false`,"data-index":String(r),"data-type":C,"data-expanded":o.expanded?`true`:`false`};return(0,H.jsx)(Nee,{ref:t,testID:a.testID,accessibilityLabel:a.accessibilityLabel,..._e,transition:ie||o.reducedMotion?void 0:l?`200ms`:`400ms`,animateOnly:[`transform`,`opacity`,`height`],y:de,scale:le,opacity:fe,zIndex:pe,height:me,overflow:`visible`,pointerEvents:he,top:O?0:void 0,bottom:O?void 0:0,...!x&&{style:{transformOrigin:O?`top center`:`bottom center`}},enterStyle:o.reducedMotion?{opacity:0}:{opacity:0,y:O?-80:80},exitStyle:o.reducedMotion?{opacity:0}:d?{opacity:0,y:g.current??de,scale:le}:{opacity:0,y:de,scale:le},children:(0,H.jsx)(Ree,{animatedStyle:I,gestureHandlers:L,gesture:ae,AnimatedView:ne,dragRef:re,children:(0,H.jsxs)(pv,{"data-slot":`toast`,role:`status`,"aria-live":`polite`,"aria-atomic":!0,tabIndex:0,onLayout:oe,onKeyDown:e=>{if(e.key===`Escape`&&T){let t=e.currentTarget,n=t.closest(`[aria-label]`);if(n){let e=n.querySelectorAll(`[tabindex="0"]`),r=Array.from(e),i=r.indexOf(t);(r[i+1]||r[i-1])?.focus()}R()}},...a,children:[o.expanded&&ge>0&&(0,H.jsx)(w,{position:`absolute`,left:0,right:0,height:ge,pointerEvents:`auto`,...O?{top:`100%`}:{bottom:`100%`}}),(0,H.jsx)(wv.Provider,{value:se,children:i})]})})})}),Nv=M(a,{name:`ToastTitle`,variants:{unstyled:{false:{color:`$color`,fontWeight:`600`,size:`$4`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Pv=M(a,{name:`ToastDescription`,variants:{unstyled:{false:{color:`$color11`,size:`$2`}}},defaultVariants:{unstyled:{}.GUI_HEADLESS===`1`}}),Fv=mv.styleable(function(e,t){let n;try{n=Tv().handleClose}catch{}let r=Cv(`Toast.Close`);return(0,H.jsx)(mv,{ref:t,"aria-label":`Close toast`,onPress:n,...e,children:e.children??r.icons?.close??(0,H.jsx)(Pee,{})})}),zee=hv.styleable(function(e,t){return(0,H.jsx)(hv,{ref:t,...e})});function Iv(e){let t=Cv(`Toast.Icon`),n;try{n=Tv().toast}catch{return null}if(!n)return null;if(n.icon!==void 0)return(0,H.jsx)(w,{flexShrink:0,marginTop:`$0.5`,children:n.icon});let r=n.type??`default`,i=t.icons?.[r]??null;return i?(0,H.jsx)(w,{flexShrink:0,marginTop:`$0.5`,children:i}):null}function Lv(){let e=Cv(`useToasts`);return{toasts:e.toasts,expanded:e.expanded,position:e.position}}Dv.displayName=`Toast`;var Rv=oe(Dv,{Viewport:kv,List:Av,Item:Mv,Title:Nv,Description:Pv,Close:Fv,Action:zee,Icon:Iv}),zv={neutral:`gray`,info:`blue`,success:`green`,warning:`orange`,error:`red`},Bv={gray:{ink:`$ink`,fill:`$raised`,on:`$ink`,tint:`$hover`,ground:`var(--data-gray-1)`,edge:`var(--data-gray-6)`},blue:{ink:`var(--primary)`,fill:`var(--primary)`,on:`var(--primary-foreground)`,tint:`var(--glass-strong)`,ground:`var(--data-blue-1)`,edge:`var(--data-blue-6)`},green:{ink:`var(--state-success)`,fill:`var(--state-success)`,on:`var(--neutral-950)`,tint:`var(--state-success-bg)`,ground:`var(--data-green-1)`,edge:`var(--data-green-6)`},orange:{ink:`var(--state-warning)`,fill:`var(--state-warning)`,on:`var(--neutral-950)`,tint:`var(--state-warning-bg)`,ground:`var(--data-orange-1)`,edge:`var(--data-orange-6)`},red:{ink:`var(--state-error)`,fill:`var(--destructive)`,on:`var(--destructive-foreground)`,tint:`var(--state-error-bg)`,ground:`var(--data-red-1)`,edge:`var(--data-red-6)`}},Vv=(e,t)=>t??zv[e??`neutral`],Hv=(e,t)=>Bv[Vv(e,t)],Uv=296,Wv=8,Gv=12,Kv={default:`neutral`,loading:`neutral`,info:`info`,success:`success`,warning:`warning`,error:`error`},qv={neutral:D(`neutral`),info:D(`info`),success:D(`success`),warning:D(`warning`),error:D(`error`)},Jv={neutral:km,info:$p,success:Tm,warning:km,error:km},Yv=e=>typeof e==`function`?e():e,Xv=e=>{let t=e.data?.progress;return typeof t==`number`&&Number.isFinite(t)?Math.max(0,Math.min(100,t)):null},Zv=e=>({...s_(2),width:e?`100%`:Uv,rounded:e?0:`$3`,borderWidth:0,p:0,overflow:`hidden`}),Qv={position:`relative`,pt:`$2`,px:`$2`,pb:`$1`};function $v({t:e,duration:t,paused:n=!1,onClose:r,onHold:i}){let o=R(),s=Kv[e.type??`default`]??`neutral`,c=Hv(s),l=Jv[s],u=Xv(e),d=Yv(e.title),f=e.description?Yv(e.description):null;return(0,H.jsxs)(z,{...B(`toast-body`),...Qv,...i?{onHoverIn:()=>i(!0),onHoverOut:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1)}:null,children:[u===null?t===void 0?null:(0,H.jsx)(w,{...B(`toast-countdown`),"data-motion":`drain`,"data-paused":n?``:void 0,position:`absolute`,t:0,l:0,r:0,b:0,bg:c.tint,pointerEvents:`none`,style:{"--drain":`${t}ms`}}):(0,H.jsx)(w,{...B(`toast-progress`),position:`absolute`,t:0,insetInlineStart:0,b:0,bg:c.tint,style:{width:`${u}%`,transition:`width 300ms linear`},pointerEvents:`none`}),(0,H.jsxs)(y,{...B(`toast-header`),items:`center`,gap:`$2`,mb:`$1`,minH:24,children:[(0,H.jsx)(w,{shrink:0,width:16,height:16,items:`center`,justify:`center`,children:e.icon??(0,H.jsx)(l,{size:16,color:c.ink,"aria-label":o.t(qv[s])})}),(0,H.jsx)(a,{...B(`toast-message`),flex:1,size:`$1`,fontWeight:`500`,color:`$aside`,numberOfLines:2,children:d}),e.cancel?(0,H.jsx)(W,{...B(`toast-cancel`),size:`xs`,variant:`ghost`,fontWeight:`400`,onPress:t=>{e.cancel?.onClick?.(t),r?.()},children:e.cancel.label||o.t(`Cancel`)}):null,e.dismissible===!1?null:(0,H.jsx)(W,{...B(`toast-close`),size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":o.t(`Close`),onPress:r,children:(0,H.jsx)(Rn,{})})]}),f?(0,H.jsx)(a,{...B(`toast-description`),size:`$1`,color:`$hint`,paddingInlineStart:24,maxW:224,numberOfLines:1,mb:`$1`,children:f}):null,e.action?(0,H.jsx)(z,{...B(`toast-footer`),mt:`$2`,borderTopWidth:1,borderColor:`$borderColor`,pt:`$1`,items:`flex-end`,children:(0,H.jsx)(W,{size:`xs`,variant:`ghost`,onPress:t=>{e.action?.onClick?.(t),t?.defaultPrevented||r?.()},children:e.action.label})}):null]})}function ey({t:e,index:t,fallback:n,phone:r}){let i=Xv(e),a=e.duration??n,o=i===null&&e.type!==`loading`&&Number.isFinite(a)&&a>0,[s,c]=(0,V.useState)(!1),l=(0,V.useRef)(a),u=(0,V.useRef)(!1);(0,V.useEffect)(()=>{if(!o||s||u.current)return;let t=Date.now(),n=setTimeout(()=>{u.current=!0,e.onAutoClose?.(e),av.dismiss(e.id)},l.current);return()=>{clearTimeout(n),l.current=Math.max(0,l.current-(Date.now()-t))}},[o,s,e]);let d=(0,V.useMemo)(()=>({...e,duration:1/0}),[e]),f=()=>{e.onDismiss?.(e),av.dismiss(e.id)};return(0,H.jsx)(Rv.Item,{toast:d,index:t,...Zv(r),"data-status":Kv[e.type??`default`]??`neutral`,children:(0,H.jsx)($v,{t:e,duration:o?a:void 0,paused:s,onClose:f,onHold:c})})}function ty({limit:e}){let{toasts:t}=Lv(),n=t.filter(e=>!e.delete);return(0,V.useEffect)(()=>{for(let t of n.slice(e))av.dismiss(t.id)},[n,e]),null}var ny=(0,V.forwardRef)(function(e,t){let{theme:n=`system`,toastOptions:r,richColors:i,className:a,style:o,position:s,offset:c,gap:l,limit:u=3,duration:d,containerAriaLabel:f,hotkey:p,...m}=e,h=R(),g=!!te()[`max-md`],_=r?.duration??d??6e3;return(0,H.jsx)(Rv,{...m,theme:n,position:s??(g?`top-center`:`bottom-right`),gap:l??Wv,visibleToasts:u,duration:1/0,children:(0,H.jsxs)(Rv.Viewport,{ref:t,...B(`toaster`),offset:c??(g?0:Gv),hotkey:p,label:f??h.t(`Notifications`),...g?{width:`100%`}:null,children:[(0,H.jsx)(ty,{limit:u}),(0,H.jsx)(Rv.List,{renderItem:({toast:e,index:t})=>(0,H.jsx)(ey,{t:e,index:t,fallback:_,phone:g},e.id)})]})})});function G(e){let t={};for(let[n,r]of e)t[iy[n]]=ry[r];return t}var ry=[`hsla(0, 0%, 10%, 1)`,`hsla(0, 0%, 67%, 1)`,`hsla(0, 0%, 100%, 0)`,`hsla(0, 0%, 97%, 0.2)`,`hsla(0, 0%, 97%, 0.4)`,`hsla(0, 0%, 97%, 0.6)`,`hsla(0, 0%, 97%, 0.8)`,`hsla(0, 0%, 100%, 1)`,`hsla(0, 0%, 97%, 1)`,`hsla(0, 0%, 93%, 1)`,`hsla(0, 0%, 85%, 1)`,`hsla(0, 0%, 80%, 1)`,`hsla(0, 0%, 70%, 1)`,`hsla(0, 0%, 59%, 1)`,`hsla(0, 0%, 45%, 1)`,`hsla(0, 0%, 30%, 1)`,`hsla(0, 0%, 20%, 1)`,`hsla(0, 0%, 14%, 1)`,`hsla(0, 0%, 2%, 1)`,`hsla(0, 0%, 2%, 0)`,`hsla(0, 0%, 2%, 0.2)`,`hsla(0, 0%, 2%, 0.4)`,`hsla(0, 0%, 2%, 0.6)`,`hsla(0, 0%, 2%, 0.8)`,`#090909`,`#151515`,`#191919`,`#232323`,`#333`,`#444`,`#666`,`#777`,`#858585`,`#aaa`,`#ccc`,`#ffffff`,`#fff`,`#f8f8f8`,`hsl(0, 0%, 93%)`,`hsl(0, 0%, 85%)`,`hsl(0, 0%, 80%)`,`hsl(0, 0%, 70%)`,`hsl(0, 0%, 59%)`,`hsl(0, 0%, 45%)`,`hsl(0, 0%, 30%)`,`hsl(0, 0%, 20%)`,`hsl(0, 0%, 14%)`,`hsl(0, 0%, 2%)`,`rgba(255,255,255,1)`,`rgba(255,255,255,0)`,`rgba(255,255,255,0.2)`,`rgba(255,255,255,0.4)`,`rgba(255,255,255,0.6)`,`rgba(255,255,255,0.8)`,`rgba(0,0,0,1)`,`rgba(0,0,0,0)`,`rgba(0,0,0,0.2)`,`rgba(0,0,0,0.4)`,`rgba(0,0,0,0.6)`,`rgba(0,0,0,0.8)`,`rgba(0,0,0,0.04)`,`rgba(0,0,0,0.08)`,`rgba(0,0,0,0.12)`,`rgba(0,0,0,0.22)`,`rgba(0,0,0,0.33)`,`rgba(0,0,0,0.44)`,`rgba(0,0,0,0.75)`,`rgba(255,255,255,0.05)`,`rgba(255,255,255,0.1)`,`rgba(255,255,255,0.15)`,`rgba(255,255,255,0.3)`,`rgba(255,255,255,0.55)`,`rgba(255,255,255,0.7)`,`rgba(255,255,255,0.85)`,`#fcfcfc`,`#f9f9f9`,`#f0f0f0`,`#e8e8e8`,`#e0e0e0`,`#d9d9d9`,`#cecece`,`#bbbbbb`,`#8d8d8d`,`#838383`,`#646464`,`#202020`,`#fbfdff`,`#f4faff`,`#e6f4fe`,`#d5efff`,`#c2e5ff`,`#acd8fc`,`#8ec8f6`,`#5eb1ef`,`#0090ff`,`#0588f0`,`#0d74ce`,`#113264`,`#fffcfc`,`#fff7f7`,`#feebec`,`#ffdbdc`,`#ffcdce`,`#fdbdbe`,`#f4a9aa`,`#eb8e90`,`#e5484d`,`#dc3e42`,`#ce2c31`,`#641723`,`#fdfdf9`,`#fefce9`,`#fffab8`,`#fff394`,`#ffe770`,`#f3d768`,`#e4c767`,`#d5ae39`,`#ffe629`,`#ffdc00`,`#9e6c00`,`#473b1f`,`#fbfefc`,`#f4fbf6`,`#e6f6eb`,`#d6f1df`,`#c4e8d1`,`#adddc0`,`#8eceaa`,`#5bb98b`,`#30a46c`,`#2b9a66`,`#218358`,`#193b2d`,`#fefcfb`,`#fff7ed`,`#ffefd6`,`#ffdfb5`,`#ffd19a`,`#ffc182`,`#f5ae73`,`#ec9455`,`#f76b15`,`#ef5f00`,`#cc4e00`,`#582d1d`,`#fffcfe`,`#fef7fb`,`#fee9f5`,`#fbdcef`,`#f6cee7`,`#efbfdd`,`#e7acd0`,`#dd93c2`,`#d6409f`,`#cf3897`,`#c2298a`,`#651249`,`#fefcfe`,`#fbf7fe`,`#f7edfe`,`#f2e2fc`,`#ead5f9`,`#e0c4f4`,`#d1afec`,`#be93e4`,`#8e4ec6`,`#8347b9`,`#8145b5`,`#402060`,`#fafefd`,`#f3fbf9`,`#e0f8f3`,`#ccf3ea`,`#b8eae0`,`#a1ded2`,`#83cdc1`,`#53b9ab`,`#12a594`,`#0d9b8a`,`#008573`,`#0d3d38`,`hsl(0, 0%, 68%)`,`hsl(0, 0%, 65%)`,`hsl(0, 0%, 62%)`,`hsl(0, 0%, 56%)`,`hsl(0, 0%, 53%)`,`hsl(0, 0%, 50%)`,`hsl(0, 0%, 47%)`,`hsl(0, 0%, 44%)`,`hsl(0, 0%, 41%)`,`hsl(0, 0%, 38%)`,`hsl(0, 0%, 32%)`,`hsla(0, 0%, 4%, 1)`,`hsla(0, 0%, 8%, 1)`,`hsla(0, 0%, 27%, 1)`,`hsla(0, 0%, 40%, 1)`,`hsla(0, 0%, 47%, 1)`,`hsla(0, 0%, 52%, 1)`,`hsla(0, 0%, 2%, 0.1)`,`hsla(0, 0%, 2%, 0.075)`,`hsla(0, 0%, 2%, 0.05)`,`hsla(0, 0%, 2%, 0.025)`,`hsla(0, 0%, 2%, 0.02)`,`hsla(0, 0%, 2%, 0.01)`,`hsla(0, 0%, 97%, 0.1)`,`hsla(0, 0%, 97%, 0.075)`,`hsla(0, 0%, 97%, 0.05)`,`hsla(0, 0%, 97%, 0.025)`,`hsla(0, 0%, 97%, 0.02)`,`hsla(0, 0%, 97%, 0.01)`,`hsla(0, 0%, 70%, 0.6)`,`hsla(0, 0%, 4%, 0)`,`hsla(0, 0%, 8%, 0.2)`,`hsla(0, 0%, 8%, 0.4)`,`hsla(0, 0%, 8%, 0.6)`,`hsla(0, 0%, 8%, 0.8)`,`hsla(0, 0%, 100%, 0.2)`,`hsla(0, 0%, 100%, 0.4)`,`hsla(0, 0%, 100%, 0.6)`,`hsla(0, 0%, 100%, 0.8)`,`rgba(0,0,0,0.15)`,`rgba(0,0,0,0.23)`,`rgba(0,0,0,0.45)`,`rgba(0,0,0,0.65)`,`rgba(0,0,0,0.9)`,`rgba(255,255,255,0.45)`,`rgba(255,255,255,0.65)`,`rgba(255,255,255,0.95)`,`#111111`,`#222222`,`#2a2a2a`,`#313131`,`#3a3a3a`,`#484848`,`#606060`,`#6e6e6e`,`#7b7b7b`,`#b4b4b4`,`#eeeeee`,`#0d1520`,`#111927`,`#0d2847`,`#003362`,`#004074`,`#104d87`,`#205d9e`,`#2870bd`,`#3b9eff`,`#70b8ff`,`#c2e6ff`,`#191111`,`#201314`,`#3b1219`,`#500f1c`,`#611623`,`#72232d`,`#8c333a`,`#b54548`,`#ec5d5e`,`#ff9592`,`#ffd1d9`,`#14120b`,`#1b180f`,`#2d2305`,`#362b00`,`#433500`,`#524202`,`#665417`,`#836a21`,`#ffff57`,`#f5e147`,`#f6eeb4`,`#0e1512`,`#121b17`,`#132d21`,`#113b29`,`#174933`,`#20573e`,`#28684a`,`#2f7c57`,`#33b074`,`#3dd68c`,`#b1f1cb`,`#17120e`,`#1e160f`,`#331e0b`,`#462100`,`#562800`,`#66350c`,`#7e451d`,`#a35829`,`#ff801f`,`#ffa057`,`#ffe0c2`,`#191117`,`#21121d`,`#37172f`,`#4b143d`,`#591c47`,`#692955`,`#833869`,`#a84885`,`#de51a8`,`#ff8dcc`,`#fdd1ea`,`#18111b`,`#1e1523`,`#301c3b`,`#3d224e`,`#48295c`,`#54346b`,`#664282`,`#8457aa`,`#9a5cd0`,`#d19dff`,`#ecd9fa`,`#0d1514`,`#111c1b`,`#0d2d2a`,`#023b37`,`#084843`,`#145750`,`#1c6961`,`#207e73`,`#0eb39e`,`#0bd8b6`,`#adf0dd`,`hsla(0, 0%, 100%, 0.1)`,`hsla(0, 0%, 100%, 0.075)`,`hsla(0, 0%, 100%, 0.05)`,`hsla(0, 0%, 100%, 0.025)`,`hsla(0, 0%, 100%, 0.02)`,`hsla(0, 0%, 100%, 0.01)`,`hsla(0, 0%, 8%, 0.1)`,`hsla(0, 0%, 8%, 0.075)`,`hsla(0, 0%, 8%, 0.05)`,`hsla(0, 0%, 8%, 0.025)`,`hsla(0, 0%, 8%, 0.02)`,`hsla(0, 0%, 8%, 0.01)`,`hsla(0, 0%, 27%, 0.6)`,`hsla(0, 0%, 99%, 0)`,`hsla(0, 0%, 98%, 0.2)`,`hsla(0, 0%, 98%, 0.4)`,`hsla(0, 0%, 98%, 0.6)`,`hsla(0, 0%, 98%, 0.8)`,`hsla(0, 0%, 99%, 1)`,`hsla(0, 0%, 98%, 1)`,`hsla(0, 0%, 94%, 1)`,`hsla(0, 0%, 91%, 1)`,`hsla(0, 0%, 88%, 1)`,`hsla(0, 0%, 81%, 1)`,`hsla(0, 0%, 73%, 1)`,`hsla(0, 0%, 55%, 1)`,`hsla(0, 0%, 51%, 1)`,`hsla(0, 0%, 39%, 1)`,`hsla(0, 0%, 13%, 1)`,`hsla(0, 0%, 13%, 0)`,`hsla(0, 0%, 13%, 0.2)`,`hsla(0, 0%, 13%, 0.4)`,`hsla(0, 0%, 13%, 0.6)`,`hsla(0, 0%, 13%, 0.8)`,`hsla(0, 0%, 13%, 0.1)`,`hsla(0, 0%, 13%, 0.075)`,`hsla(0, 0%, 13%, 0.05)`,`hsla(0, 0%, 13%, 0.025)`,`hsla(0, 0%, 13%, 0.02)`,`hsla(0, 0%, 13%, 0.01)`,`hsla(0, 0%, 98%, 0.1)`,`hsla(0, 0%, 98%, 0.075)`,`hsla(0, 0%, 98%, 0.05)`,`hsla(0, 0%, 98%, 0.025)`,`hsla(0, 0%, 98%, 0.02)`,`hsla(0, 0%, 98%, 0.01)`,`hsla(0, 0%, 85%, 0.6)`,`hsla(216, 100%, 99%, 0)`,`hsla(207, 100%, 98%, 0.2)`,`hsla(207, 100%, 98%, 0.4)`,`hsla(207, 100%, 98%, 0.6)`,`hsla(207, 100%, 98%, 0.8)`,`hsla(210, 100%, 99%, 1)`,`hsla(207, 100%, 98%, 1)`,`hsla(205, 92%, 95%, 1)`,`hsla(203, 100%, 92%, 1)`,`hsla(206, 100%, 88%, 1)`,`hsla(207, 93%, 83%, 1)`,`hsla(207, 85%, 76%, 1)`,`hsla(206, 82%, 65%, 1)`,`hsla(206, 100%, 50%, 1)`,`hsla(207, 96%, 48%, 1)`,`hsla(208, 88%, 43%, 1)`,`hsla(216, 71%, 23%, 1)`,`hsla(216, 71%, 23%, 0)`,`hsla(216, 71%, 23%, 0.2)`,`hsla(216, 71%, 23%, 0.4)`,`hsla(216, 71%, 23%, 0.6)`,`hsla(216, 71%, 23%, 0.8)`,`hsla(216, 71%, 23%, 0.1)`,`hsla(216, 71%, 23%, 0.075)`,`hsla(216, 71%, 23%, 0.05)`,`hsla(216, 71%, 23%, 0.025)`,`hsla(216, 71%, 23%, 0.02)`,`hsla(216, 71%, 23%, 0.01)`,`hsla(207, 100%, 98%, 0.1)`,`hsla(207, 100%, 98%, 0.075)`,`hsla(207, 100%, 98%, 0.05)`,`hsla(207, 100%, 98%, 0.025)`,`hsla(207, 100%, 98%, 0.02)`,`hsla(207, 100%, 98%, 0.01)`,`hsla(207, 93%, 83%, 0.6)`,`hsla(0, 100%, 99%, 0)`,`hsla(0, 100%, 98%, 0.2)`,`hsla(0, 100%, 98%, 0.4)`,`hsla(0, 100%, 98%, 0.6)`,`hsla(0, 100%, 98%, 0.8)`,`hsla(0, 100%, 99%, 1)`,`hsla(0, 100%, 98%, 1)`,`hsla(357, 90%, 96%, 1)`,`hsla(358, 100%, 93%, 1)`,`hsla(359, 100%, 90%, 1)`,`hsla(359, 94%, 87%, 1)`,`hsla(359, 77%, 81%, 1)`,`hsla(359, 70%, 74%, 1)`,`hsla(358, 75%, 59%, 1)`,`hsla(358, 69%, 55%, 1)`,`hsla(358, 65%, 49%, 1)`,`hsla(351, 63%, 24%, 1)`,`hsla(351, 63%, 24%, 0)`,`hsla(351, 63%, 24%, 0.2)`,`hsla(351, 63%, 24%, 0.4)`,`hsla(351, 63%, 24%, 0.6)`,`hsla(351, 63%, 24%, 0.8)`,`hsla(351, 63%, 24%, 0.1)`,`hsla(351, 63%, 24%, 0.075)`,`hsla(351, 63%, 24%, 0.05)`,`hsla(351, 63%, 24%, 0.025)`,`hsla(351, 63%, 24%, 0.02)`,`hsla(351, 63%, 24%, 0.01)`,`hsla(0, 100%, 98%, 0.1)`,`hsla(0, 100%, 98%, 0.075)`,`hsla(0, 100%, 98%, 0.05)`,`hsla(0, 100%, 98%, 0.025)`,`hsla(0, 100%, 98%, 0.02)`,`hsla(0, 100%, 98%, 0.01)`,`hsla(359, 94%, 87%, 0.6)`,`hsla(60, 45%, 98%, 0)`,`hsla(54, 91%, 95%, 0.2)`,`hsla(54, 91%, 95%, 0.4)`,`hsla(54, 91%, 95%, 0.6)`,`hsla(54, 91%, 95%, 0.8)`,`hsla(60, 50%, 98%, 1)`,`hsla(54, 91%, 95%, 1)`,`hsla(56, 100%, 86%, 1)`,`hsla(53, 100%, 79%, 1)`,`hsla(50, 100%, 72%, 1)`,`hsla(48, 85%, 68%, 1)`,`hsla(46, 70%, 65%, 1)`,`hsla(45, 65%, 53%, 1)`,`hsla(53, 100%, 58%, 1)`,`hsla(52, 100%, 50%, 1)`,`hsla(41, 100%, 31%, 1)`,`hsla(42, 39%, 20%, 1)`,`hsla(42, 39%, 20%, 0)`,`hsla(42, 39%, 20%, 0.2)`,`hsla(42, 39%, 20%, 0.4)`,`hsla(42, 39%, 20%, 0.6)`,`hsla(42, 39%, 20%, 0.8)`,`hsla(42, 39%, 20%, 0.1)`,`hsla(42, 39%, 20%, 0.075)`,`hsla(42, 39%, 20%, 0.05)`,`hsla(42, 39%, 20%, 0.025)`,`hsla(42, 39%, 20%, 0.02)`,`hsla(42, 39%, 20%, 0.01)`,`hsla(54, 91%, 95%, 0.1)`,`hsla(54, 91%, 95%, 0.075)`,`hsla(54, 91%, 95%, 0.05)`,`hsla(54, 91%, 95%, 0.025)`,`hsla(54, 91%, 95%, 0.02)`,`hsla(54, 91%, 95%, 0.01)`,`hsla(48, 85%, 68%, 0.6)`,`hsla(140, 60%, 99%, 0)`,`hsla(137, 47%, 97%, 0.2)`,`hsla(137, 47%, 97%, 0.4)`,`hsla(137, 47%, 97%, 0.6)`,`hsla(137, 47%, 97%, 0.8)`,`hsla(140, 60%, 99%, 1)`,`hsla(137, 47%, 97%, 1)`,`hsla(139, 47%, 93%, 1)`,`hsla(140, 49%, 89%, 1)`,`hsla(142, 44%, 84%, 1)`,`hsla(144, 41%, 77%, 1)`,`hsla(146, 40%, 68%, 1)`,`hsla(151, 40%, 54%, 1)`,`hsla(151, 55%, 42%, 1)`,`hsla(152, 56%, 39%, 1)`,`hsla(154, 60%, 32%, 1)`,`hsla(155, 40%, 16%, 1)`,`hsla(156, 41%, 16%, 0)`,`hsla(156, 41%, 16%, 0.2)`,`hsla(156, 41%, 16%, 0.4)`,`hsla(156, 41%, 16%, 0.6)`,`hsla(156, 41%, 16%, 0.8)`,`hsla(156, 41%, 16%, 0.1)`,`hsla(156, 41%, 16%, 0.075)`,`hsla(156, 41%, 16%, 0.05)`,`hsla(156, 41%, 16%, 0.025)`,`hsla(156, 41%, 16%, 0.02)`,`hsla(156, 41%, 16%, 0.01)`,`hsla(137, 47%, 97%, 0.1)`,`hsla(137, 47%, 97%, 0.075)`,`hsla(137, 47%, 97%, 0.05)`,`hsla(137, 47%, 97%, 0.025)`,`hsla(137, 47%, 97%, 0.02)`,`hsla(137, 47%, 97%, 0.01)`,`hsla(144, 41%, 77%, 0.6)`,`hsla(20, 60%, 99%, 0)`,`hsla(33, 100%, 96%, 0.2)`,`hsla(33, 100%, 96%, 0.4)`,`hsla(33, 100%, 96%, 0.6)`,`hsla(33, 100%, 96%, 0.8)`,`hsla(20, 60%, 99%, 1)`,`hsla(33, 100%, 96%, 1)`,`hsla(37, 100%, 92%, 1)`,`hsla(34, 100%, 85%, 1)`,`hsla(33, 100%, 80%, 1)`,`hsla(30, 100%, 75%, 1)`,`hsla(27, 87%, 71%, 1)`,`hsla(25, 80%, 63%, 1)`,`hsla(23, 93%, 53%, 1)`,`hsla(24, 100%, 47%, 1)`,`hsla(23, 100%, 40%, 1)`,`hsla(16, 50%, 23%, 1)`,`hsla(16, 50%, 23%, 0)`,`hsla(16, 50%, 23%, 0.2)`,`hsla(16, 50%, 23%, 0.4)`,`hsla(16, 50%, 23%, 0.6)`,`hsla(16, 50%, 23%, 0.8)`,`hsla(16, 50%, 23%, 0.1)`,`hsla(16, 50%, 23%, 0.075)`,`hsla(16, 50%, 23%, 0.05)`,`hsla(16, 50%, 23%, 0.025)`,`hsla(16, 50%, 23%, 0.02)`,`hsla(16, 50%, 23%, 0.01)`,`hsla(33, 100%, 96%, 0.1)`,`hsla(33, 100%, 96%, 0.075)`,`hsla(33, 100%, 96%, 0.05)`,`hsla(33, 100%, 96%, 0.025)`,`hsla(33, 100%, 96%, 0.02)`,`hsla(33, 100%, 96%, 0.01)`,`hsla(30, 100%, 75%, 0.6)`,`hsla(324, 100%, 99%, 0)`,`hsla(326, 78%, 98%, 0.2)`,`hsla(326, 78%, 98%, 0.4)`,`hsla(326, 78%, 98%, 0.6)`,`hsla(326, 78%, 98%, 0.8)`,`hsla(320, 100%, 99%, 1)`,`hsla(326, 78%, 98%, 1)`,`hsla(326, 91%, 95%, 1)`,`hsla(323, 79%, 92%, 1)`,`hsla(323, 69%, 89%, 1)`,`hsla(323, 60%, 84%, 1)`,`hsla(323, 55%, 79%, 1)`,`hsla(322, 52%, 72%, 1)`,`hsla(322, 65%, 55%, 1)`,`hsla(322, 61%, 52%, 1)`,`hsla(322, 65%, 46%, 1)`,`hsla(320, 70%, 23%, 1)`,`hsla(320, 69%, 23%, 0)`,`hsla(320, 69%, 23%, 0.2)`,`hsla(320, 69%, 23%, 0.4)`,`hsla(320, 69%, 23%, 0.6)`,`hsla(320, 69%, 23%, 0.8)`,`hsla(320, 69%, 23%, 0.1)`,`hsla(320, 69%, 23%, 0.075)`,`hsla(320, 69%, 23%, 0.05)`,`hsla(320, 69%, 23%, 0.025)`,`hsla(320, 69%, 23%, 0.02)`,`hsla(320, 69%, 23%, 0.01)`,`hsla(326, 78%, 98%, 0.1)`,`hsla(326, 78%, 98%, 0.075)`,`hsla(326, 78%, 98%, 0.05)`,`hsla(326, 78%, 98%, 0.025)`,`hsla(326, 78%, 98%, 0.02)`,`hsla(326, 78%, 98%, 0.01)`,`hsla(323, 60%, 84%, 0.6)`,`hsla(300, 60%, 99%, 0)`,`hsla(274, 78%, 98%, 0.2)`,`hsla(274, 78%, 98%, 0.4)`,`hsla(274, 78%, 98%, 0.6)`,`hsla(274, 78%, 98%, 0.8)`,`hsla(300, 50%, 99%, 1)`,`hsla(274, 78%, 98%, 1)`,`hsla(275, 89%, 96%, 1)`,`hsla(277, 81%, 94%, 1)`,`hsla(275, 75%, 91%, 1)`,`hsla(275, 69%, 86%, 1)`,`hsla(273, 62%, 81%, 1)`,`hsla(272, 60%, 74%, 1)`,`hsla(272, 51%, 54%, 1)`,`hsla(272, 45%, 50%, 1)`,`hsla(272, 45%, 49%, 1)`,`hsla(270, 50%, 25%, 1)`,`hsla(270, 50%, 25%, 0)`,`hsla(270, 50%, 25%, 0.2)`,`hsla(270, 50%, 25%, 0.4)`,`hsla(270, 50%, 25%, 0.6)`,`hsla(270, 50%, 25%, 0.8)`,`hsla(270, 50%, 25%, 0.1)`,`hsla(270, 50%, 25%, 0.075)`,`hsla(270, 50%, 25%, 0.05)`,`hsla(270, 50%, 25%, 0.025)`,`hsla(270, 50%, 25%, 0.02)`,`hsla(270, 50%, 25%, 0.01)`,`hsla(274, 78%, 98%, 0.1)`,`hsla(274, 78%, 98%, 0.075)`,`hsla(274, 78%, 98%, 0.05)`,`hsla(274, 78%, 98%, 0.025)`,`hsla(274, 78%, 98%, 0.02)`,`hsla(274, 78%, 98%, 0.01)`,`hsla(275, 69%, 86%, 0.6)`,`hsla(160, 60%, 99%, 0)`,`hsla(165, 50%, 97%, 0.2)`,`hsla(165, 50%, 97%, 0.4)`,`hsla(165, 50%, 97%, 0.6)`,`hsla(165, 50%, 97%, 0.8)`,`hsla(165, 67%, 99%, 1)`,`hsla(165, 50%, 97%, 1)`,`hsla(167, 63%, 93%, 1)`,`hsla(166, 62%, 88%, 1)`,`hsla(168, 54%, 82%, 1)`,`hsla(168, 48%, 75%, 1)`,`hsla(170, 43%, 66%, 1)`,`hsla(172, 42%, 53%, 1)`,`hsla(173, 80%, 36%, 1)`,`hsla(173, 85%, 33%, 1)`,`hsla(172, 100%, 26%, 1)`,`hsla(174, 65%, 15%, 1)`,`hsla(174, 66%, 15%, 0)`,`hsla(174, 66%, 15%, 0.2)`,`hsla(174, 66%, 15%, 0.4)`,`hsla(174, 66%, 15%, 0.6)`,`hsla(174, 66%, 15%, 0.8)`,`hsla(174, 66%, 15%, 0.1)`,`hsla(174, 66%, 15%, 0.075)`,`hsla(174, 66%, 15%, 0.05)`,`hsla(174, 66%, 15%, 0.025)`,`hsla(174, 66%, 15%, 0.02)`,`hsla(174, 66%, 15%, 0.01)`,`hsla(165, 50%, 97%, 0.1)`,`hsla(165, 50%, 97%, 0.075)`,`hsla(165, 50%, 97%, 0.05)`,`hsla(165, 50%, 97%, 0.025)`,`hsla(165, 50%, 97%, 0.02)`,`hsla(165, 50%, 97%, 0.01)`,`hsla(168, 48%, 75%, 0.6)`,`hsla(0, 0%, 68%, 0)`,`hsla(0, 0%, 65%, 0.2)`,`hsla(0, 0%, 65%, 0.4)`,`hsla(0, 0%, 65%, 0.6)`,`hsla(0, 0%, 65%, 0.8)`,`hsla(0, 0%, 68%, 1)`,`hsla(0, 0%, 65%, 1)`,`hsla(0, 0%, 62%, 1)`,`hsla(0, 0%, 56%, 1)`,`hsla(0, 0%, 53%, 1)`,`hsla(0, 0%, 50%, 1)`,`hsla(0, 0%, 44%, 1)`,`hsla(0, 0%, 41%, 1)`,`hsla(0, 0%, 38%, 1)`,`hsla(0, 0%, 32%, 1)`,`hsla(0, 0%, 32%, 0)`,`hsla(0, 0%, 32%, 0.2)`,`hsla(0, 0%, 32%, 0.4)`,`hsla(0, 0%, 32%, 0.6)`,`hsla(0, 0%, 32%, 0.8)`,`hsla(0, 0%, 32%, 0.1)`,`hsla(0, 0%, 32%, 0.075)`,`hsla(0, 0%, 32%, 0.05)`,`hsla(0, 0%, 32%, 0.025)`,`hsla(0, 0%, 32%, 0.02)`,`hsla(0, 0%, 32%, 0.01)`,`hsla(0, 0%, 65%, 0.1)`,`hsla(0, 0%, 65%, 0.075)`,`hsla(0, 0%, 65%, 0.05)`,`hsla(0, 0%, 65%, 0.025)`,`hsla(0, 0%, 65%, 0.02)`,`hsla(0, 0%, 65%, 0.01)`,`hsla(0, 0%, 53%, 0.6)`,`hsla(0, 0%, 7%, 0)`,`hsla(0, 0%, 10%, 0.2)`,`hsla(0, 0%, 10%, 0.4)`,`hsla(0, 0%, 10%, 0.6)`,`hsla(0, 0%, 10%, 0.8)`,`hsla(0, 0%, 7%, 1)`,`hsla(0, 0%, 16%, 1)`,`hsla(0, 0%, 19%, 1)`,`hsla(0, 0%, 23%, 1)`,`hsla(0, 0%, 28%, 1)`,`hsla(0, 0%, 43%, 1)`,`hsla(0, 0%, 48%, 1)`,`hsla(0, 0%, 71%, 1)`,`hsla(0, 0%, 93%, 0)`,`hsla(0, 0%, 93%, 0.2)`,`hsla(0, 0%, 93%, 0.4)`,`hsla(0, 0%, 93%, 0.6)`,`hsla(0, 0%, 93%, 0.8)`,`hsla(0, 0%, 93%, 0.1)`,`hsla(0, 0%, 93%, 0.075)`,`hsla(0, 0%, 93%, 0.05)`,`hsla(0, 0%, 93%, 0.025)`,`hsla(0, 0%, 93%, 0.02)`,`hsla(0, 0%, 93%, 0.01)`,`hsla(0, 0%, 10%, 0.1)`,`hsla(0, 0%, 10%, 0.075)`,`hsla(0, 0%, 10%, 0.05)`,`hsla(0, 0%, 10%, 0.025)`,`hsla(0, 0%, 10%, 0.02)`,`hsla(0, 0%, 10%, 0.01)`,`hsla(0, 0%, 23%, 0.6)`,`hsla(216, 43%, 9%, 0)`,`hsla(218, 39%, 11%, 0.2)`,`hsla(218, 39%, 11%, 0.4)`,`hsla(218, 39%, 11%, 0.6)`,`hsla(218, 39%, 11%, 0.8)`,`hsla(215, 42%, 9%, 1)`,`hsla(218, 39%, 11%, 1)`,`hsla(212, 69%, 16%, 1)`,`hsla(209, 100%, 19%, 1)`,`hsla(207, 100%, 23%, 1)`,`hsla(209, 79%, 30%, 1)`,`hsla(211, 66%, 37%, 1)`,`hsla(211, 65%, 45%, 1)`,`hsla(210, 100%, 62%, 1)`,`hsla(210, 100%, 72%, 1)`,`hsla(205, 100%, 88%, 1)`,`hsla(205, 100%, 88%, 0)`,`hsla(205, 100%, 88%, 0.2)`,`hsla(205, 100%, 88%, 0.4)`,`hsla(205, 100%, 88%, 0.6)`,`hsla(205, 100%, 88%, 0.8)`,`hsla(205, 100%, 88%, 0.1)`,`hsla(205, 100%, 88%, 0.075)`,`hsla(205, 100%, 88%, 0.05)`,`hsla(205, 100%, 88%, 0.025)`,`hsla(205, 100%, 88%, 0.02)`,`hsla(205, 100%, 88%, 0.01)`,`hsla(218, 39%, 11%, 0.1)`,`hsla(218, 39%, 11%, 0.075)`,`hsla(218, 39%, 11%, 0.05)`,`hsla(218, 39%, 11%, 0.025)`,`hsla(218, 39%, 11%, 0.02)`,`hsla(218, 39%, 11%, 0.01)`,`hsla(209, 79%, 30%, 0.6)`,`hsla(0, 17%, 8%, 0)`,`hsla(355, 25%, 10%, 0.2)`,`hsla(355, 25%, 10%, 0.4)`,`hsla(355, 25%, 10%, 0.6)`,`hsla(355, 25%, 10%, 0.8)`,`hsla(0, 19%, 8%, 1)`,`hsla(355, 25%, 10%, 1)`,`hsla(350, 53%, 15%, 1)`,`hsla(348, 68%, 19%, 1)`,`hsla(350, 63%, 23%, 1)`,`hsla(352, 53%, 29%, 1)`,`hsla(355, 47%, 37%, 1)`,`hsla(358, 45%, 49%, 1)`,`hsla(360, 79%, 65%, 1)`,`hsla(2, 100%, 79%, 1)`,`hsla(350, 100%, 91%, 1)`,`hsla(350, 100%, 91%, 0)`,`hsla(350, 100%, 91%, 0.2)`,`hsla(350, 100%, 91%, 0.4)`,`hsla(350, 100%, 91%, 0.6)`,`hsla(350, 100%, 91%, 0.8)`,`hsla(350, 100%, 91%, 0.1)`,`hsla(350, 100%, 91%, 0.075)`,`hsla(350, 100%, 91%, 0.05)`,`hsla(350, 100%, 91%, 0.025)`,`hsla(350, 100%, 91%, 0.02)`,`hsla(350, 100%, 91%, 0.01)`,`hsla(355, 25%, 10%, 0.1)`,`hsla(355, 25%, 10%, 0.075)`,`hsla(355, 25%, 10%, 0.05)`,`hsla(355, 25%, 10%, 0.025)`,`hsla(355, 25%, 10%, 0.02)`,`hsla(355, 25%, 10%, 0.01)`,`hsla(352, 53%, 29%, 0.6)`,`hsla(47, 29%, 6%, 0)`,`hsla(45, 29%, 8%, 0.2)`,`hsla(45, 29%, 8%, 0.4)`,`hsla(45, 29%, 8%, 0.6)`,`hsla(45, 29%, 8%, 0.8)`,`hsla(47, 29%, 6%, 1)`,`hsla(45, 29%, 8%, 1)`,`hsla(45, 80%, 10%, 1)`,`hsla(48, 100%, 11%, 1)`,`hsla(47, 100%, 13%, 1)`,`hsla(48, 95%, 16%, 1)`,`hsla(46, 63%, 25%, 1)`,`hsla(45, 60%, 32%, 1)`,`hsla(60, 100%, 67%, 1)`,`hsla(53, 90%, 62%, 1)`,`hsla(53, 79%, 84%, 1)`,`hsla(53, 78%, 84%, 0)`,`hsla(53, 78%, 84%, 0.2)`,`hsla(53, 78%, 84%, 0.4)`,`hsla(53, 78%, 84%, 0.6)`,`hsla(53, 78%, 84%, 0.8)`,`hsla(53, 78%, 84%, 0.1)`,`hsla(53, 78%, 84%, 0.075)`,`hsla(53, 78%, 84%, 0.05)`,`hsla(53, 78%, 84%, 0.025)`,`hsla(53, 78%, 84%, 0.02)`,`hsla(53, 78%, 84%, 0.01)`,`hsla(45, 29%, 8%, 0.1)`,`hsla(45, 29%, 8%, 0.075)`,`hsla(45, 29%, 8%, 0.05)`,`hsla(45, 29%, 8%, 0.025)`,`hsla(45, 29%, 8%, 0.02)`,`hsla(45, 29%, 8%, 0.01)`,`hsla(48, 95%, 16%, 0.6)`,`hsla(154, 20%, 7%, 0)`,`hsla(153, 20%, 9%, 0.2)`,`hsla(153, 20%, 9%, 0.4)`,`hsla(153, 20%, 9%, 0.6)`,`hsla(153, 20%, 9%, 0.8)`,`hsla(154, 20%, 7%, 1)`,`hsla(153, 20%, 9%, 1)`,`hsla(152, 41%, 13%, 1)`,`hsla(154, 55%, 15%, 1)`,`hsla(154, 52%, 19%, 1)`,`hsla(153, 46%, 23%, 1)`,`hsla(152, 44%, 28%, 1)`,`hsla(151, 45%, 34%, 1)`,`hsla(151, 55%, 45%, 1)`,`hsla(151, 65%, 54%, 1)`,`hsla(144, 70%, 82%, 1)`,`hsla(144, 70%, 82%, 0)`,`hsla(144, 70%, 82%, 0.2)`,`hsla(144, 70%, 82%, 0.4)`,`hsla(144, 70%, 82%, 0.6)`,`hsla(144, 70%, 82%, 0.8)`,`hsla(144, 70%, 82%, 0.1)`,`hsla(144, 70%, 82%, 0.075)`,`hsla(144, 70%, 82%, 0.05)`,`hsla(144, 70%, 82%, 0.025)`,`hsla(144, 70%, 82%, 0.02)`,`hsla(144, 70%, 82%, 0.01)`,`hsla(153, 20%, 9%, 0.1)`,`hsla(153, 20%, 9%, 0.075)`,`hsla(153, 20%, 9%, 0.05)`,`hsla(153, 20%, 9%, 0.025)`,`hsla(153, 20%, 9%, 0.02)`,`hsla(153, 20%, 9%, 0.01)`,`hsla(153, 46%, 23%, 0.6)`,`hsla(23, 22%, 7%, 0)`,`hsla(28, 33%, 9%, 0.2)`,`hsla(28, 33%, 9%, 0.4)`,`hsla(28, 33%, 9%, 0.6)`,`hsla(28, 33%, 9%, 0.8)`,`hsla(27, 24%, 7%, 1)`,`hsla(28, 33%, 9%, 1)`,`hsla(29, 65%, 12%, 1)`,`hsla(28, 100%, 14%, 1)`,`hsla(28, 100%, 17%, 1)`,`hsla(27, 79%, 22%, 1)`,`hsla(25, 63%, 30%, 1)`,`hsla(23, 60%, 40%, 1)`,`hsla(26, 100%, 56%, 1)`,`hsla(26, 100%, 67%, 1)`,`hsla(30, 100%, 88%, 1)`,`hsla(30, 100%, 88%, 0)`,`hsla(30, 100%, 88%, 0.2)`,`hsla(30, 100%, 88%, 0.4)`,`hsla(30, 100%, 88%, 0.6)`,`hsla(30, 100%, 88%, 0.8)`,`hsla(30, 100%, 88%, 0.1)`,`hsla(30, 100%, 88%, 0.075)`,`hsla(30, 100%, 88%, 0.05)`,`hsla(30, 100%, 88%, 0.025)`,`hsla(30, 100%, 88%, 0.02)`,`hsla(30, 100%, 88%, 0.01)`,`hsla(28, 33%, 9%, 0.1)`,`hsla(28, 33%, 9%, 0.075)`,`hsla(28, 33%, 9%, 0.05)`,`hsla(28, 33%, 9%, 0.025)`,`hsla(28, 33%, 9%, 0.02)`,`hsla(28, 33%, 9%, 0.01)`,`hsla(27, 79%, 22%, 0.6)`,`hsla(317, 17%, 8%, 0)`,`hsla(316, 29%, 10%, 0.2)`,`hsla(316, 29%, 10%, 0.4)`,`hsla(316, 29%, 10%, 0.6)`,`hsla(316, 29%, 10%, 0.8)`,`hsla(315, 19%, 8%, 1)`,`hsla(316, 29%, 10%, 1)`,`hsla(315, 41%, 15%, 1)`,`hsla(315, 58%, 19%, 1)`,`hsla(318, 52%, 23%, 1)`,`hsla(319, 44%, 29%, 1)`,`hsla(321, 40%, 37%, 1)`,`hsla(322, 40%, 47%, 1)`,`hsla(323, 68%, 59%, 1)`,`hsla(327, 100%, 78%, 1)`,`hsla(326, 92%, 91%, 1)`,`hsla(326, 91%, 91%, 0)`,`hsla(326, 91%, 91%, 0.2)`,`hsla(326, 91%, 91%, 0.4)`,`hsla(326, 91%, 91%, 0.6)`,`hsla(326, 91%, 91%, 0.8)`,`hsla(326, 91%, 91%, 0.1)`,`hsla(326, 91%, 91%, 0.075)`,`hsla(326, 91%, 91%, 0.05)`,`hsla(326, 91%, 91%, 0.025)`,`hsla(326, 91%, 91%, 0.02)`,`hsla(326, 91%, 91%, 0.01)`,`hsla(316, 29%, 10%, 0.1)`,`hsla(316, 29%, 10%, 0.075)`,`hsla(316, 29%, 10%, 0.05)`,`hsla(316, 29%, 10%, 0.025)`,`hsla(316, 29%, 10%, 0.02)`,`hsla(316, 29%, 10%, 0.01)`,`hsla(319, 44%, 29%, 0.6)`,`hsla(282, 22%, 9%, 0)`,`hsla(279, 25%, 11%, 0.2)`,`hsla(279, 25%, 11%, 0.4)`,`hsla(279, 25%, 11%, 0.6)`,`hsla(279, 25%, 11%, 0.8)`,`hsla(282, 23%, 9%, 1)`,`hsla(279, 25%, 11%, 1)`,`hsla(279, 36%, 17%, 1)`,`hsla(277, 39%, 22%, 1)`,`hsla(276, 38%, 26%, 1)`,`hsla(275, 35%, 31%, 1)`,`hsla(274, 33%, 38%, 1)`,`hsla(273, 33%, 50%, 1)`,`hsla(272, 55%, 59%, 1)`,`hsla(272, 100%, 81%, 1)`,`hsla(275, 77%, 92%, 1)`,`hsla(275, 76%, 92%, 0)`,`hsla(275, 76%, 92%, 0.2)`,`hsla(275, 76%, 92%, 0.4)`,`hsla(275, 76%, 92%, 0.6)`,`hsla(275, 76%, 92%, 0.8)`,`hsla(275, 76%, 92%, 0.1)`,`hsla(275, 76%, 92%, 0.075)`,`hsla(275, 76%, 92%, 0.05)`,`hsla(275, 76%, 92%, 0.025)`,`hsla(275, 76%, 92%, 0.02)`,`hsla(275, 76%, 92%, 0.01)`,`hsla(279, 25%, 11%, 0.1)`,`hsla(279, 25%, 11%, 0.075)`,`hsla(279, 25%, 11%, 0.05)`,`hsla(279, 25%, 11%, 0.025)`,`hsla(279, 25%, 11%, 0.02)`,`hsla(279, 25%, 11%, 0.01)`,`hsla(275, 35%, 31%, 0.6)`,`hsla(173, 22%, 7%, 0)`,`hsla(175, 24%, 9%, 0.2)`,`hsla(175, 24%, 9%, 0.4)`,`hsla(175, 24%, 9%, 0.6)`,`hsla(175, 24%, 9%, 0.8)`,`hsla(173, 24%, 7%, 1)`,`hsla(175, 24%, 9%, 1)`,`hsla(174, 55%, 11%, 1)`,`hsla(176, 93%, 12%, 1)`,`hsla(175, 80%, 16%, 1)`,`hsla(174, 63%, 21%, 1)`,`hsla(174, 58%, 26%, 1)`,`hsla(173, 59%, 31%, 1)`,`hsla(172, 85%, 38%, 1)`,`hsla(170, 90%, 45%, 1)`,`hsla(163, 69%, 81%, 1)`,`hsla(163, 69%, 81%, 0)`,`hsla(163, 69%, 81%, 0.2)`,`hsla(163, 69%, 81%, 0.4)`,`hsla(163, 69%, 81%, 0.6)`,`hsla(163, 69%, 81%, 0.8)`,`hsla(163, 69%, 81%, 0.1)`,`hsla(163, 69%, 81%, 0.075)`,`hsla(163, 69%, 81%, 0.05)`,`hsla(163, 69%, 81%, 0.025)`,`hsla(163, 69%, 81%, 0.02)`,`hsla(163, 69%, 81%, 0.01)`,`hsla(175, 24%, 9%, 0.1)`,`hsla(175, 24%, 9%, 0.075)`,`hsla(175, 24%, 9%, 0.05)`,`hsla(175, 24%, 9%, 0.025)`,`hsla(175, 24%, 9%, 0.02)`,`hsla(175, 24%, 9%, 0.01)`,`hsla(174, 63%, 21%, 0.6)`,`hsla(0, 0%, 4%, 0.2)`,`hsla(0, 0%, 4%, 0.4)`,`hsla(0, 0%, 4%, 0.6)`,`hsla(0, 0%, 4%, 0.8)`,`hsla(0, 0%, 99%, 0.2)`,`hsla(0, 0%, 99%, 0.4)`,`hsla(0, 0%, 99%, 0.6)`,`hsla(0, 0%, 99%, 0.8)`,`hsla(216, 100%, 99%, 0.2)`,`hsla(216, 100%, 99%, 0.4)`,`hsla(216, 100%, 99%, 0.6)`,`hsla(216, 100%, 99%, 0.8)`,`hsla(0, 100%, 99%, 0.2)`,`hsla(0, 100%, 99%, 0.4)`,`hsla(0, 100%, 99%, 0.6)`,`hsla(0, 100%, 99%, 0.8)`,`hsla(60, 45%, 98%, 0.2)`,`hsla(60, 45%, 98%, 0.4)`,`hsla(60, 45%, 98%, 0.6)`,`hsla(60, 45%, 98%, 0.8)`,`hsla(140, 60%, 99%, 0.2)`,`hsla(140, 60%, 99%, 0.4)`,`hsla(140, 60%, 99%, 0.6)`,`hsla(140, 60%, 99%, 0.8)`,`hsla(20, 60%, 99%, 0.2)`,`hsla(20, 60%, 99%, 0.4)`,`hsla(20, 60%, 99%, 0.6)`,`hsla(20, 60%, 99%, 0.8)`,`hsla(324, 100%, 99%, 0.2)`,`hsla(324, 100%, 99%, 0.4)`,`hsla(324, 100%, 99%, 0.6)`,`hsla(324, 100%, 99%, 0.8)`,`hsla(300, 60%, 99%, 0.2)`,`hsla(300, 60%, 99%, 0.4)`,`hsla(300, 60%, 99%, 0.6)`,`hsla(300, 60%, 99%, 0.8)`,`hsla(160, 60%, 99%, 0.2)`,`hsla(160, 60%, 99%, 0.4)`,`hsla(160, 60%, 99%, 0.6)`,`hsla(160, 60%, 99%, 0.8)`,`hsla(0, 0%, 68%, 0.2)`,`hsla(0, 0%, 68%, 0.4)`,`hsla(0, 0%, 68%, 0.6)`,`hsla(0, 0%, 68%, 0.8)`,`hsla(0, 0%, 7%, 0.2)`,`hsla(0, 0%, 7%, 0.4)`,`hsla(0, 0%, 7%, 0.6)`,`hsla(0, 0%, 7%, 0.8)`,`hsla(216, 43%, 9%, 0.2)`,`hsla(216, 43%, 9%, 0.4)`,`hsla(216, 43%, 9%, 0.6)`,`hsla(216, 43%, 9%, 0.8)`,`hsla(0, 17%, 8%, 0.2)`,`hsla(0, 17%, 8%, 0.4)`,`hsla(0, 17%, 8%, 0.6)`,`hsla(0, 17%, 8%, 0.8)`,`hsla(47, 29%, 6%, 0.2)`,`hsla(47, 29%, 6%, 0.4)`,`hsla(47, 29%, 6%, 0.6)`,`hsla(47, 29%, 6%, 0.8)`,`hsla(154, 20%, 7%, 0.2)`,`hsla(154, 20%, 7%, 0.4)`,`hsla(154, 20%, 7%, 0.6)`,`hsla(154, 20%, 7%, 0.8)`,`hsla(23, 22%, 7%, 0.2)`,`hsla(23, 22%, 7%, 0.4)`,`hsla(23, 22%, 7%, 0.6)`,`hsla(23, 22%, 7%, 0.8)`,`hsla(317, 17%, 8%, 0.2)`,`hsla(317, 17%, 8%, 0.4)`,`hsla(317, 17%, 8%, 0.6)`,`hsla(317, 17%, 8%, 0.8)`,`hsla(282, 22%, 9%, 0.2)`,`hsla(282, 22%, 9%, 0.4)`,`hsla(282, 22%, 9%, 0.6)`,`hsla(282, 22%, 9%, 0.8)`,`hsla(173, 22%, 7%, 0.2)`,`hsla(173, 22%, 7%, 0.4)`,`hsla(173, 22%, 7%, 0.6)`,`hsla(173, 22%, 7%, 0.8)`],iy=`accentBackground.accentColor.background0.background02.background04.background06.background08.color1.color2.color3.color4.color5.color6.color7.color8.color9.color10.color11.color12.color0.color02.color04.color06.color08.color.colorHover.colorPress.colorFocus.background.backgroundHover.backgroundPress.backgroundFocus.backgroundActive.borderColor.borderColorHover.borderColorFocus.borderColorPress.placeholderColor.colorTransparent.black1.black2.black3.black4.black5.black6.black7.black8.black9.black10.black11.black12.white1.white2.white3.white4.white5.white6.white7.white8.white9.white10.white11.white12.white.white0.white02.white04.white06.white08.black.black0.black02.black04.black06.black08.shadow1.shadow2.shadow3.shadow4.shadow5.shadow6.shadow7.shadow8.highlight1.highlight2.highlight3.highlight4.highlight5.highlight6.highlight7.highlight8.shadowColor.gray1.gray2.gray3.gray4.gray5.gray6.gray7.gray8.gray9.gray10.gray11.gray12.blue1.blue2.blue3.blue4.blue5.blue6.blue7.blue8.blue9.blue10.blue11.blue12.red1.red2.red3.red4.red5.red6.red7.red8.red9.red10.red11.red12.yellow1.yellow2.yellow3.yellow4.yellow5.yellow6.yellow7.yellow8.yellow9.yellow10.yellow11.yellow12.green1.green2.green3.green4.green5.green6.green7.green8.green9.green10.green11.green12.orange1.orange2.orange3.orange4.orange5.orange6.orange7.orange8.orange9.orange10.orange11.orange12.pink1.pink2.pink3.pink4.pink5.pink6.pink7.pink8.pink9.pink10.pink11.pink12.purple1.purple2.purple3.purple4.purple5.purple6.purple7.purple8.purple9.purple10.purple11.purple12.teal1.teal2.teal3.teal4.teal5.teal6.teal7.teal8.teal9.teal10.teal11.teal12.neutral1.neutral2.neutral3.neutral4.neutral5.neutral6.neutral7.neutral8.neutral9.neutral10.neutral11.neutral12.accent1.accent2.accent3.accent4.accent5.accent6.accent7.accent8.accent9.accent10.accent11.accent12.color01.color0075.color005.color0025.color002.color001.background01.background0075.background005.background0025.background002.background001.outlineColor`.split(`.`),ay=G([[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,18],[26,18],[27,23],[28,8],[29,7],[30,9],[31,9],[32,8],[33,10],[34,9],[35,10],[36,11],[37,15],[38,19],[39,24],[40,25],[41,26],[42,27],[43,28],[44,29],[45,30],[46,31],[47,32],[48,33],[49,34],[50,35],[51,36],[52,37],[53,38],[54,39],[55,40],[56,41],[57,42],[58,43],[59,44],[60,45],[61,46],[62,47],[63,48],[64,49],[65,50],[66,51],[67,52],[68,53],[69,54],[70,55],[71,56],[72,57],[73,58],[74,59],[75,60],[76,61],[77,62],[78,63],[79,64],[80,65],[81,58],[82,66],[83,67],[84,68],[85,69],[86,70],[87,51],[88,71],[89,72],[90,73],[91,62],[92,74],[93,75],[94,76],[95,77],[96,78],[97,79],[98,80],[99,81],[100,82],[101,83],[102,84],[103,85],[104,86],[105,87],[106,88],[107,89],[108,90],[109,91],[110,92],[111,93],[112,94],[113,95],[114,96],[115,97],[116,98],[117,99],[118,100],[119,101],[120,102],[121,103],[122,104],[123,105],[124,106],[125,107],[126,108],[127,109],[128,110],[129,111],[130,112],[131,113],[132,114],[133,115],[134,116],[135,117],[136,118],[137,119],[138,120],[139,121],[140,122],[141,123],[142,124],[143,125],[144,126],[145,127],[146,128],[147,129],[148,130],[149,131],[150,132],[151,133],[152,134],[153,135],[154,136],[155,137],[156,138],[157,139],[158,140],[159,141],[160,142],[161,143],[162,144],[163,145],[164,146],[165,147],[166,148],[167,149],[168,150],[169,151],[170,152],[171,153],[172,154],[173,155],[174,156],[175,157],[176,158],[177,159],[178,160],[179,161],[180,162],[181,163],[182,164],[183,165],[184,166],[185,167],[186,168],[187,169],[188,170],[189,171],[190,172],[191,173],[192,174],[193,175],[194,176],[195,177],[196,178],[197,179],[198,180],[199,181],[200,182],[201,183],[202,184],[203,42],[204,185],[205,186],[206,187],[207,188],[208,189],[209,190],[210,191],[211,192],[212,193],[213,194],[214,0],[215,17],[216,16],[217,195],[218,196],[219,197],[220,198],[221,1],[222,11],[223,7],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),oy=G([[0,16],[1,9],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,220],[26,7],[27,11],[28,194],[29,0],[30,193],[31,0],[32,194],[33,17],[34,16],[35,17],[36,0],[37,198],[38,2],[39,24],[40,25],[41,26],[42,27],[43,28],[44,29],[45,30],[46,31],[47,32],[48,33],[49,34],[50,35],[51,36],[52,37],[53,38],[54,39],[55,40],[56,41],[57,42],[58,43],[59,44],[60,45],[61,46],[62,47],[63,48],[64,49],[65,50],[66,51],[67,52],[68,53],[69,54],[70,55],[71,56],[72,57],[73,58],[74,59],[75,221],[76,222],[77,64],[78,223],[79,224],[80,59],[81,225],[82,54],[83,68],[84,50],[85,70],[86,226],[87,227],[88,73],[89,228],[90,48],[91,64],[92,229],[93,26],[94,230],[95,231],[96,232],[97,233],[98,234],[99,235],[100,236],[101,237],[102,238],[103,239],[104,240],[105,241],[106,242],[107,243],[108,244],[109,245],[110,246],[111,247],[112,94],[113,248],[114,249],[115,250],[116,251],[117,252],[118,253],[119,254],[120,255],[121,256],[122,257],[123,258],[124,106],[125,259],[126,260],[127,261],[128,262],[129,263],[130,264],[131,265],[132,266],[133,267],[134,268],[135,269],[136,118],[137,270],[138,271],[139,272],[140,273],[141,274],[142,275],[143,276],[144,277],[145,278],[146,279],[147,280],[148,130],[149,281],[150,282],[151,283],[152,284],[153,285],[154,286],[155,287],[156,288],[157,289],[158,290],[159,291],[160,142],[161,292],[162,293],[163,294],[164,295],[165,296],[166,297],[167,298],[168,299],[169,300],[170,301],[171,302],[172,154],[173,303],[174,304],[175,305],[176,306],[177,307],[178,308],[179,309],[180,310],[181,311],[182,312],[183,313],[184,166],[185,314],[186,315],[187,316],[188,317],[189,318],[190,319],[191,320],[192,321],[193,322],[194,323],[195,324],[196,178],[197,325],[198,326],[199,327],[200,182],[201,183],[202,184],[203,42],[204,185],[205,186],[206,187],[207,188],[208,189],[209,190],[210,191],[211,192],[212,7],[213,8],[214,9],[215,10],[216,11],[217,12],[218,13],[219,14],[220,15],[221,16],[222,17],[223,18],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),sy=G([[0,9],[1,16],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,7],[26,7],[27,220],[28,194],[29,193],[30,0],[31,0],[32,194],[33,17],[34,0],[35,17],[36,16],[37,198],[38,2],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),cy=G([[0,1],[1,0],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,23],[26,18],[27,17],[28,8],[29,9],[30,7],[31,9],[32,8],[33,10],[34,11],[35,10],[36,9],[37,15],[38,19],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),ly=G([[0,0],[1,1],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,7],[26,7],[27,220],[28,194],[29,193],[30,0],[31,0],[32,194],[33,17],[34,0],[35,17],[36,16],[37,198],[38,2],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),uy=G([[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,18],[26,18],[27,23],[28,8],[29,7],[30,9],[31,9],[32,8],[33,10],[34,9],[35,10],[36,11],[37,15],[38,19],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),dy=G([[0,0],[1,1],[2,341],[3,342],[4,343],[5,344],[6,345],[7,346],[8,347],[9,348],[10,349],[11,350],[12,10],[13,351],[14,352],[15,353],[16,354],[17,355],[18,356],[19,357],[20,358],[21,359],[22,360],[23,361],[24,356],[25,356],[26,356],[27,361],[28,347],[29,346],[30,348],[31,348],[32,347],[33,349],[34,348],[35,349],[36,350],[37,353],[38,357],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[236,374]]),fy=G([[0,0],[1,1],[2,375],[3,376],[4,377],[5,378],[6,379],[7,380],[8,381],[9,382],[10,383],[11,384],[12,385],[13,386],[14,387],[15,388],[16,389],[17,390],[18,391],[19,392],[20,393],[21,394],[22,395],[23,396],[24,391],[25,391],[26,391],[27,396],[28,381],[29,380],[30,382],[31,382],[32,381],[33,383],[34,382],[35,383],[36,384],[37,388],[38,392],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[236,409]]),py=G([[0,0],[1,1],[2,410],[3,411],[4,412],[5,413],[6,414],[7,415],[8,416],[9,417],[10,418],[11,419],[12,420],[13,421],[14,422],[15,423],[16,424],[17,425],[18,426],[19,427],[20,428],[21,429],[22,430],[23,431],[24,426],[25,426],[26,426],[27,431],[28,416],[29,415],[30,417],[31,417],[32,416],[33,418],[34,417],[35,418],[36,419],[37,423],[38,427],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[236,444]]),Bee=G([[0,0],[1,1],[2,445],[3,446],[4,447],[5,448],[6,449],[7,450],[8,451],[9,452],[10,453],[11,454],[12,455],[13,456],[14,457],[15,458],[16,459],[17,460],[18,461],[19,462],[20,463],[21,464],[22,465],[23,466],[24,461],[25,461],[26,461],[27,466],[28,451],[29,450],[30,452],[31,452],[32,451],[33,453],[34,452],[35,453],[36,454],[37,458],[38,462],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[236,479]]),my=G([[0,0],[1,1],[2,480],[3,481],[4,482],[5,483],[6,484],[7,485],[8,486],[9,487],[10,488],[11,489],[12,490],[13,491],[14,492],[15,493],[16,494],[17,495],[18,496],[19,497],[20,498],[21,499],[22,500],[23,501],[24,496],[25,496],[26,496],[27,501],[28,486],[29,485],[30,487],[31,487],[32,486],[33,488],[34,487],[35,488],[36,489],[37,493],[38,497],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[236,514]]),hy=G([[0,0],[1,1],[2,515],[3,516],[4,517],[5,518],[6,519],[7,520],[8,521],[9,522],[10,523],[11,524],[12,525],[13,526],[14,527],[15,528],[16,529],[17,530],[18,531],[19,532],[20,533],[21,534],[22,535],[23,536],[24,531],[25,531],[26,531],[27,536],[28,521],[29,520],[30,522],[31,522],[32,521],[33,523],[34,522],[35,523],[36,524],[37,528],[38,532],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[236,549]]),gy=G([[0,0],[1,1],[2,550],[3,551],[4,552],[5,553],[6,554],[7,555],[8,556],[9,557],[10,558],[11,559],[12,560],[13,561],[14,562],[15,563],[16,564],[17,565],[18,566],[19,567],[20,568],[21,569],[22,570],[23,571],[24,566],[25,566],[26,566],[27,571],[28,556],[29,555],[30,557],[31,557],[32,556],[33,558],[34,557],[35,558],[36,559],[37,563],[38,567],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[236,584]]),_y=G([[0,0],[1,1],[2,585],[3,586],[4,587],[5,588],[6,589],[7,590],[8,591],[9,592],[10,593],[11,594],[12,595],[13,596],[14,597],[15,598],[16,599],[17,600],[18,601],[19,602],[20,603],[21,604],[22,605],[23,606],[24,601],[25,601],[26,601],[27,606],[28,591],[29,590],[30,592],[31,592],[32,591],[33,593],[34,592],[35,593],[36,594],[37,598],[38,602],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[236,619]]),vy=G([[0,0],[1,1],[2,620],[3,621],[4,622],[5,623],[6,624],[7,625],[8,626],[9,627],[10,628],[11,629],[12,630],[13,631],[14,632],[15,633],[16,634],[17,635],[18,636],[19,637],[20,638],[21,639],[22,640],[23,641],[24,636],[25,636],[26,636],[27,641],[28,626],[29,625],[30,627],[31,627],[32,626],[33,628],[34,627],[35,628],[36,629],[37,633],[38,637],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[236,654]]),yy=G([[0,0],[1,1],[2,655],[3,656],[4,657],[5,658],[6,659],[7,660],[8,661],[9,662],[10,13],[11,663],[12,664],[13,665],[14,197],[15,666],[16,667],[17,668],[18,669],[19,670],[20,671],[21,672],[22,673],[23,674],[24,669],[25,669],[26,669],[27,674],[28,661],[29,660],[30,662],[31,662],[32,661],[33,13],[34,662],[35,13],[36,663],[37,666],[38,670],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),by=G([[0,16],[1,9],[2,212],[3,213],[4,214],[5,215],[6,216],[7,193],[8,194],[9,0],[10,17],[11,16],[12,195],[13,196],[14,197],[15,198],[16,1],[17,11],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,220],[26,7],[27,11],[28,194],[29,0],[30,193],[31,0],[32,194],[33,17],[34,16],[35,17],[36,0],[37,198],[38,2],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),xy=G([[0,16],[1,9],[2,2],[3,3],[4,4],[5,5],[6,6],[7,7],[8,8],[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17],[18,18],[19,19],[20,20],[21,21],[22,22],[23,23],[24,18],[25,23],[26,18],[27,17],[28,8],[29,9],[30,7],[31,9],[32,8],[33,10],[34,11],[35,10],[36,9],[37,15],[38,19],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),Sy=G([[0,16],[1,9],[2,688],[3,689],[4,690],[5,691],[6,692],[7,693],[8,0],[9,356],[10,694],[11,695],[12,696],[13,697],[14,668],[15,698],[16,699],[17,700],[18,9],[19,701],[20,702],[21,703],[22,704],[23,705],[24,9],[25,705],[26,9],[27,700],[28,0],[29,356],[30,693],[31,356],[32,0],[33,694],[34,695],[35,694],[36,356],[37,698],[38,701],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[236,718]]),Cy=G([[0,16],[1,9],[2,719],[3,720],[4,721],[5,722],[6,723],[7,724],[8,725],[9,726],[10,727],[11,728],[12,729],[13,730],[14,731],[15,388],[16,732],[17,733],[18,734],[19,735],[20,736],[21,737],[22,738],[23,739],[24,734],[25,739],[26,734],[27,733],[28,725],[29,726],[30,724],[31,726],[32,725],[33,727],[34,728],[35,727],[36,726],[37,388],[38,735],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[236,752]]),wy=G([[0,16],[1,9],[2,753],[3,754],[4,755],[5,756],[6,757],[7,758],[8,759],[9,760],[10,761],[11,762],[12,763],[13,764],[14,765],[15,423],[16,766],[17,767],[18,768],[19,769],[20,770],[21,771],[22,772],[23,773],[24,768],[25,773],[26,768],[27,767],[28,759],[29,760],[30,758],[31,760],[32,759],[33,761],[34,762],[35,761],[36,760],[37,423],[38,769],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[236,786]]),Ty=G([[0,16],[1,9],[2,787],[3,788],[4,789],[5,790],[6,791],[7,792],[8,793],[9,794],[10,795],[11,796],[12,797],[13,798],[14,799],[15,458],[16,800],[17,801],[18,802],[19,803],[20,804],[21,805],[22,806],[23,807],[24,802],[25,807],[26,802],[27,801],[28,793],[29,794],[30,792],[31,794],[32,793],[33,795],[34,796],[35,795],[36,794],[37,458],[38,803],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[236,820]]),Ey=G([[0,16],[1,9],[2,821],[3,822],[4,823],[5,824],[6,825],[7,826],[8,827],[9,828],[10,829],[11,830],[12,831],[13,832],[14,833],[15,493],[16,834],[17,835],[18,836],[19,837],[20,838],[21,839],[22,840],[23,841],[24,836],[25,841],[26,836],[27,835],[28,827],[29,828],[30,826],[31,828],[32,827],[33,829],[34,830],[35,829],[36,828],[37,493],[38,837],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[236,854]]),Dy=G([[0,16],[1,9],[2,855],[3,856],[4,857],[5,858],[6,859],[7,860],[8,861],[9,862],[10,863],[11,864],[12,865],[13,866],[14,867],[15,528],[16,868],[17,869],[18,870],[19,871],[20,872],[21,873],[22,874],[23,875],[24,870],[25,875],[26,870],[27,869],[28,861],[29,862],[30,860],[31,862],[32,861],[33,863],[34,864],[35,863],[36,862],[37,528],[38,871],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[236,888]]),Oy=G([[0,16],[1,9],[2,889],[3,890],[4,891],[5,892],[6,893],[7,894],[8,895],[9,896],[10,897],[11,898],[12,899],[13,900],[14,901],[15,563],[16,902],[17,903],[18,904],[19,905],[20,906],[21,907],[22,908],[23,909],[24,904],[25,909],[26,904],[27,903],[28,895],[29,896],[30,894],[31,896],[32,895],[33,897],[34,898],[35,897],[36,896],[37,563],[38,905],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[236,922]]),ky=G([[0,16],[1,9],[2,923],[3,924],[4,925],[5,926],[6,927],[7,928],[8,929],[9,930],[10,931],[11,932],[12,933],[13,934],[14,935],[15,598],[16,936],[17,937],[18,938],[19,939],[20,940],[21,941],[22,942],[23,943],[24,938],[25,943],[26,938],[27,937],[28,929],[29,930],[30,928],[31,930],[32,929],[33,931],[34,932],[35,931],[36,930],[37,598],[38,939],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[236,956]]),Ay=G([[0,16],[1,9],[2,957],[3,958],[4,959],[5,960],[6,961],[7,962],[8,963],[9,964],[10,965],[11,966],[12,967],[13,968],[14,969],[15,633],[16,970],[17,971],[18,972],[19,973],[20,974],[21,975],[22,976],[23,977],[24,972],[25,977],[26,972],[27,971],[28,963],[29,964],[30,962],[31,964],[32,963],[33,965],[34,966],[35,965],[36,964],[37,633],[38,973],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[236,990]]),jy=G([[0,16],[1,9],[2,655],[3,656],[4,657],[5,658],[6,659],[7,660],[8,661],[9,662],[10,13],[11,663],[12,664],[13,665],[14,197],[15,666],[16,667],[17,668],[18,669],[19,670],[20,671],[21,672],[22,673],[23,674],[24,669],[25,674],[26,669],[27,668],[28,661],[29,662],[30,660],[31,662],[32,661],[33,13],[34,663],[35,13],[36,662],[37,666],[38,670],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),My=G([[24,17],[25,17],[26,17],[27,18],[28,9],[29,8],[30,10],[31,11],[32,9],[33,11],[34,10],[35,11],[36,12],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),Ny=G([[24,17],[25,17],[26,17],[27,18],[28,10],[29,9],[30,11],[31,13],[32,10],[33,12],[34,11],[35,12],[36,13],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),Py=G([[24,11],[25,7],[26,11],[27,1],[28,0],[29,17],[30,194],[31,16],[32,0],[33,16],[34,195],[35,16],[36,17],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),Fy=G([[24,11],[25,7],[26,11],[27,1],[28,17],[29,16],[30,0],[31,196],[32,17],[33,195],[34,196],[35,195],[36,16],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),Iy=G([[0,1],[1,0],[2,2],[3,213],[4,214],[5,215],[6,216],[7,7],[8,11],[9,1],[10,198],[11,197],[12,196],[13,195],[14,16],[15,17],[16,0],[17,194],[18,193],[19,212],[20,991],[21,992],[22,993],[23,994],[24,193],[25,193],[26,193],[27,994],[28,11],[29,7],[30,1],[31,1],[32,11],[33,198],[34,1],[35,198],[36,197],[37,17],[38,212],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),Ly=G([[24,11],[25,11],[26,11],[27,7],[28,0],[29,194],[30,17],[31,16],[32,0],[33,16],[34,17],[35,16],[36,195],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),Ry=G([[24,11],[25,11],[26,11],[27,7],[28,17],[29,0],[30,16],[31,196],[32,17],[33,195],[34,16],[35,195],[36,196],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),zy=G([[0,1],[1,0],[2,19],[3,3],[4,4],[5,5],[6,6],[7,18],[8,17],[9,16],[10,15],[11,14],[12,13],[13,12],[14,11],[15,10],[16,9],[17,8],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,7],[26,7],[27,220],[28,17],[29,18],[30,16],[31,16],[32,17],[33,15],[34,16],[35,15],[36,14],[37,10],[38,2],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),By=G([[0,1],[1,0],[2,357],[3,342],[4,343],[5,344],[6,345],[7,356],[8,355],[9,354],[10,353],[11,352],[12,351],[13,10],[14,350],[15,349],[16,348],[17,347],[18,346],[19,341],[20,995],[21,996],[22,997],[23,998],[24,346],[25,346],[26,346],[27,998],[28,355],[29,356],[30,354],[31,354],[32,355],[33,353],[34,354],[35,353],[36,352],[37,349],[38,341],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[236,374]]),Vy=G([[24,355],[25,355],[26,355],[27,356],[28,348],[29,347],[30,349],[31,350],[32,348],[33,350],[34,349],[35,350],[36,10],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[3,342],[4,343],[5,344],[6,345],[236,374]]),Hy=G([[24,355],[25,355],[26,355],[27,356],[28,349],[29,348],[30,350],[31,351],[32,349],[33,10],[34,350],[35,10],[36,351],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[3,342],[4,343],[5,344],[6,345],[236,374]]),Uy=G([[0,1],[1,0],[2,392],[3,376],[4,377],[5,378],[6,379],[7,391],[8,390],[9,389],[10,388],[11,387],[12,386],[13,385],[14,384],[15,383],[16,382],[17,381],[18,380],[19,375],[20,999],[21,1e3],[22,1001],[23,1002],[24,380],[25,380],[26,380],[27,1002],[28,390],[29,391],[30,389],[31,389],[32,390],[33,388],[34,389],[35,388],[36,387],[37,383],[38,375],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[236,409]]),Wy=G([[24,390],[25,390],[26,390],[27,391],[28,382],[29,381],[30,383],[31,384],[32,382],[33,384],[34,383],[35,384],[36,385],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[3,376],[4,377],[5,378],[6,379],[236,409]]),Gy=G([[24,390],[25,390],[26,390],[27,391],[28,383],[29,382],[30,384],[31,386],[32,383],[33,385],[34,384],[35,385],[36,386],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[3,376],[4,377],[5,378],[6,379],[236,409]]),Ky=G([[0,1],[1,0],[2,427],[3,411],[4,412],[5,413],[6,414],[7,426],[8,425],[9,424],[10,423],[11,422],[12,421],[13,420],[14,419],[15,418],[16,417],[17,416],[18,415],[19,410],[20,1003],[21,1004],[22,1005],[23,1006],[24,415],[25,415],[26,415],[27,1006],[28,425],[29,426],[30,424],[31,424],[32,425],[33,423],[34,424],[35,423],[36,422],[37,418],[38,410],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[236,444]]),qy=G([[24,425],[25,425],[26,425],[27,426],[28,417],[29,416],[30,418],[31,419],[32,417],[33,419],[34,418],[35,419],[36,420],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[3,411],[4,412],[5,413],[6,414],[236,444]]),Jy=G([[24,425],[25,425],[26,425],[27,426],[28,418],[29,417],[30,419],[31,421],[32,418],[33,420],[34,419],[35,420],[36,421],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[3,411],[4,412],[5,413],[6,414],[236,444]]),Yy=G([[0,1],[1,0],[2,462],[3,446],[4,447],[5,448],[6,449],[7,461],[8,460],[9,459],[10,458],[11,457],[12,456],[13,455],[14,454],[15,453],[16,452],[17,451],[18,450],[19,445],[20,1007],[21,1008],[22,1009],[23,1010],[24,450],[25,450],[26,450],[27,1010],[28,460],[29,461],[30,459],[31,459],[32,460],[33,458],[34,459],[35,458],[36,457],[37,453],[38,445],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[236,479]]),Xy=G([[24,460],[25,460],[26,460],[27,461],[28,452],[29,451],[30,453],[31,454],[32,452],[33,454],[34,453],[35,454],[36,455],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[3,446],[4,447],[5,448],[6,449],[236,479]]),Zy=G([[24,460],[25,460],[26,460],[27,461],[28,453],[29,452],[30,454],[31,456],[32,453],[33,455],[34,454],[35,455],[36,456],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[3,446],[4,447],[5,448],[6,449],[236,479]]),Qy=G([[0,1],[1,0],[2,497],[3,481],[4,482],[5,483],[6,484],[7,496],[8,495],[9,494],[10,493],[11,492],[12,491],[13,490],[14,489],[15,488],[16,487],[17,486],[18,485],[19,480],[20,1011],[21,1012],[22,1013],[23,1014],[24,485],[25,485],[26,485],[27,1014],[28,495],[29,496],[30,494],[31,494],[32,495],[33,493],[34,494],[35,493],[36,492],[37,488],[38,480],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[236,514]]),$y=G([[24,495],[25,495],[26,495],[27,496],[28,487],[29,486],[30,488],[31,489],[32,487],[33,489],[34,488],[35,489],[36,490],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[3,481],[4,482],[5,483],[6,484],[236,514]]),eb=G([[24,495],[25,495],[26,495],[27,496],[28,488],[29,487],[30,489],[31,491],[32,488],[33,490],[34,489],[35,490],[36,491],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[3,481],[4,482],[5,483],[6,484],[236,514]]),tb=G([[0,1],[1,0],[2,532],[3,516],[4,517],[5,518],[6,519],[7,531],[8,530],[9,529],[10,528],[11,527],[12,526],[13,525],[14,524],[15,523],[16,522],[17,521],[18,520],[19,515],[20,1015],[21,1016],[22,1017],[23,1018],[24,520],[25,520],[26,520],[27,1018],[28,530],[29,531],[30,529],[31,529],[32,530],[33,528],[34,529],[35,528],[36,527],[37,523],[38,515],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[236,549]]),nb=G([[24,530],[25,530],[26,530],[27,531],[28,522],[29,521],[30,523],[31,524],[32,522],[33,524],[34,523],[35,524],[36,525],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[3,516],[4,517],[5,518],[6,519],[236,549]]),rb=G([[24,530],[25,530],[26,530],[27,531],[28,523],[29,522],[30,524],[31,526],[32,523],[33,525],[34,524],[35,525],[36,526],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[3,516],[4,517],[5,518],[6,519],[236,549]]),ib=G([[0,1],[1,0],[2,567],[3,551],[4,552],[5,553],[6,554],[7,566],[8,565],[9,564],[10,563],[11,562],[12,561],[13,560],[14,559],[15,558],[16,557],[17,556],[18,555],[19,550],[20,1019],[21,1020],[22,1021],[23,1022],[24,555],[25,555],[26,555],[27,1022],[28,565],[29,566],[30,564],[31,564],[32,565],[33,563],[34,564],[35,563],[36,562],[37,558],[38,550],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[236,584]]),ab=G([[24,565],[25,565],[26,565],[27,566],[28,557],[29,556],[30,558],[31,559],[32,557],[33,559],[34,558],[35,559],[36,560],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[3,551],[4,552],[5,553],[6,554],[236,584]]),ob=G([[24,565],[25,565],[26,565],[27,566],[28,558],[29,557],[30,559],[31,561],[32,558],[33,560],[34,559],[35,560],[36,561],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[3,551],[4,552],[5,553],[6,554],[236,584]]),sb=G([[0,1],[1,0],[2,602],[3,586],[4,587],[5,588],[6,589],[7,601],[8,600],[9,599],[10,598],[11,597],[12,596],[13,595],[14,594],[15,593],[16,592],[17,591],[18,590],[19,585],[20,1023],[21,1024],[22,1025],[23,1026],[24,590],[25,590],[26,590],[27,1026],[28,600],[29,601],[30,599],[31,599],[32,600],[33,598],[34,599],[35,598],[36,597],[37,593],[38,585],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[236,619]]),cb=G([[24,600],[25,600],[26,600],[27,601],[28,592],[29,591],[30,593],[31,594],[32,592],[33,594],[34,593],[35,594],[36,595],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[3,586],[4,587],[5,588],[6,589],[236,619]]),lb=G([[24,600],[25,600],[26,600],[27,601],[28,593],[29,592],[30,594],[31,596],[32,593],[33,595],[34,594],[35,595],[36,596],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[3,586],[4,587],[5,588],[6,589],[236,619]]),ub=G([[0,1],[1,0],[2,637],[3,621],[4,622],[5,623],[6,624],[7,636],[8,635],[9,634],[10,633],[11,632],[12,631],[13,630],[14,629],[15,628],[16,627],[17,626],[18,625],[19,620],[20,1027],[21,1028],[22,1029],[23,1030],[24,625],[25,625],[26,625],[27,1030],[28,635],[29,636],[30,634],[31,634],[32,635],[33,633],[34,634],[35,633],[36,632],[37,628],[38,620],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[236,654]]),db=G([[24,635],[25,635],[26,635],[27,636],[28,627],[29,626],[30,628],[31,629],[32,627],[33,629],[34,628],[35,629],[36,630],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[3,621],[4,622],[5,623],[6,624],[236,654]]),fb=G([[24,635],[25,635],[26,635],[27,636],[28,628],[29,627],[30,629],[31,631],[32,628],[33,630],[34,629],[35,630],[36,631],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[3,621],[4,622],[5,623],[6,624],[236,654]]),pb=G([[0,1],[1,0],[2,670],[3,656],[4,657],[5,658],[6,659],[7,669],[8,668],[9,667],[10,666],[11,197],[12,665],[13,664],[14,663],[15,13],[16,662],[17,661],[18,660],[19,655],[20,1031],[21,1032],[22,1033],[23,1034],[24,660],[25,660],[26,660],[27,1034],[28,668],[29,669],[30,667],[31,667],[32,668],[33,666],[34,667],[35,666],[36,197],[37,13],[38,655],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),mb=G([[24,668],[25,668],[26,668],[27,669],[28,662],[29,661],[30,13],[31,663],[32,662],[33,663],[34,13],[35,663],[36,664],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),hb=G([[24,668],[25,668],[26,668],[27,669],[28,13],[29,662],[30,663],[31,665],[32,13],[33,664],[34,663],[35,664],[36,665],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),gb=G([[0,9],[1,16],[2,2],[3,213],[4,214],[5,215],[6,216],[7,7],[8,11],[9,1],[10,198],[11,197],[12,196],[13,195],[14,16],[15,17],[16,0],[17,194],[18,193],[19,212],[20,991],[21,992],[22,993],[23,994],[24,193],[25,994],[26,193],[27,194],[28,11],[29,1],[30,7],[31,1],[32,11],[33,198],[34,197],[35,198],[36,1],[37,17],[38,212],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[236,340]]),_b=G([[0,9],[1,16],[2,19],[3,3],[4,4],[5,5],[6,6],[7,18],[8,17],[9,16],[10,15],[11,14],[12,13],[13,12],[14,11],[15,10],[16,9],[17,8],[18,7],[19,2],[20,217],[21,218],[22,219],[23,220],[24,7],[25,220],[26,7],[27,8],[28,17],[29,16],[30,18],[31,16],[32,17],[33,15],[34,14],[35,15],[36,16],[37,10],[38,2],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[236,211]]),vb=G([[24,17],[25,18],[26,17],[27,16],[28,9],[29,10],[30,8],[31,11],[32,9],[33,11],[34,12],[35,11],[36,10],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),yb=G([[24,17],[25,18],[26,17],[27,16],[28,10],[29,11],[30,9],[31,13],[32,10],[33,12],[34,13],[35,12],[36,11],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),bb=G([[0,9],[1,16],[2,701],[3,689],[4,690],[5,691],[6,692],[7,9],[8,700],[9,699],[10,698],[11,668],[12,697],[13,696],[14,695],[15,694],[16,356],[17,0],[18,693],[19,688],[20,1035],[21,1036],[22,1037],[23,1038],[24,693],[25,1038],[26,693],[27,0],[28,700],[29,699],[30,9],[31,699],[32,700],[33,698],[34,668],[35,698],[36,699],[37,694],[38,688],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[236,718]]),xb=G([[24,700],[25,9],[26,700],[27,699],[28,356],[29,694],[30,0],[31,695],[32,356],[33,695],[34,696],[35,695],[36,694],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[3,689],[4,690],[5,691],[6,692],[236,718]]),Sb=G([[24,700],[25,9],[26,700],[27,699],[28,694],[29,695],[30,356],[31,697],[32,694],[33,696],[34,697],[35,696],[36,695],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[3,689],[4,690],[5,691],[6,692],[236,718]]),Cb=G([[0,9],[1,16],[2,735],[3,720],[4,721],[5,722],[6,723],[7,734],[8,733],[9,732],[10,388],[11,731],[12,730],[13,729],[14,728],[15,727],[16,726],[17,725],[18,724],[19,719],[20,1039],[21,1040],[22,1041],[23,1042],[24,724],[25,1042],[26,724],[27,725],[28,733],[29,732],[30,734],[31,732],[32,733],[33,388],[34,731],[35,388],[36,732],[37,727],[38,719],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[236,752]]),wb=G([[24,733],[25,734],[26,733],[27,732],[28,726],[29,727],[30,725],[31,728],[32,726],[33,728],[34,729],[35,728],[36,727],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[3,720],[4,721],[5,722],[6,723],[236,752]]),Tb=G([[24,733],[25,734],[26,733],[27,732],[28,727],[29,728],[30,726],[31,730],[32,727],[33,729],[34,730],[35,729],[36,728],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[3,720],[4,721],[5,722],[6,723],[236,752]]),Eb=G([[0,9],[1,16],[2,769],[3,754],[4,755],[5,756],[6,757],[7,768],[8,767],[9,766],[10,423],[11,765],[12,764],[13,763],[14,762],[15,761],[16,760],[17,759],[18,758],[19,753],[20,1043],[21,1044],[22,1045],[23,1046],[24,758],[25,1046],[26,758],[27,759],[28,767],[29,766],[30,768],[31,766],[32,767],[33,423],[34,765],[35,423],[36,766],[37,761],[38,753],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[236,786]]),Db=G([[24,767],[25,768],[26,767],[27,766],[28,760],[29,761],[30,759],[31,762],[32,760],[33,762],[34,763],[35,762],[36,761],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[3,754],[4,755],[5,756],[6,757],[236,786]]),Ob=G([[24,767],[25,768],[26,767],[27,766],[28,761],[29,762],[30,760],[31,764],[32,761],[33,763],[34,764],[35,763],[36,762],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[3,754],[4,755],[5,756],[6,757],[236,786]]),kb=G([[0,9],[1,16],[2,803],[3,788],[4,789],[5,790],[6,791],[7,802],[8,801],[9,800],[10,458],[11,799],[12,798],[13,797],[14,796],[15,795],[16,794],[17,793],[18,792],[19,787],[20,1047],[21,1048],[22,1049],[23,1050],[24,792],[25,1050],[26,792],[27,793],[28,801],[29,800],[30,802],[31,800],[32,801],[33,458],[34,799],[35,458],[36,800],[37,795],[38,787],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[236,820]]),Ab=G([[24,801],[25,802],[26,801],[27,800],[28,794],[29,795],[30,793],[31,796],[32,794],[33,796],[34,797],[35,796],[36,795],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[3,788],[4,789],[5,790],[6,791],[236,820]]),jb=G([[24,801],[25,802],[26,801],[27,800],[28,795],[29,796],[30,794],[31,798],[32,795],[33,797],[34,798],[35,797],[36,796],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[3,788],[4,789],[5,790],[6,791],[236,820]]),Mb=G([[0,9],[1,16],[2,837],[3,822],[4,823],[5,824],[6,825],[7,836],[8,835],[9,834],[10,493],[11,833],[12,832],[13,831],[14,830],[15,829],[16,828],[17,827],[18,826],[19,821],[20,1051],[21,1052],[22,1053],[23,1054],[24,826],[25,1054],[26,826],[27,827],[28,835],[29,834],[30,836],[31,834],[32,835],[33,493],[34,833],[35,493],[36,834],[37,829],[38,821],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[236,854]]),Nb=G([[24,835],[25,836],[26,835],[27,834],[28,828],[29,829],[30,827],[31,830],[32,828],[33,830],[34,831],[35,830],[36,829],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[3,822],[4,823],[5,824],[6,825],[236,854]]),Pb=G([[24,835],[25,836],[26,835],[27,834],[28,829],[29,830],[30,828],[31,832],[32,829],[33,831],[34,832],[35,831],[36,830],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[3,822],[4,823],[5,824],[6,825],[236,854]]),Fb=G([[0,9],[1,16],[2,871],[3,856],[4,857],[5,858],[6,859],[7,870],[8,869],[9,868],[10,528],[11,867],[12,866],[13,865],[14,864],[15,863],[16,862],[17,861],[18,860],[19,855],[20,1055],[21,1056],[22,1057],[23,1058],[24,860],[25,1058],[26,860],[27,861],[28,869],[29,868],[30,870],[31,868],[32,869],[33,528],[34,867],[35,528],[36,868],[37,863],[38,855],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[236,888]]),Ib=G([[24,869],[25,870],[26,869],[27,868],[28,862],[29,863],[30,861],[31,864],[32,862],[33,864],[34,865],[35,864],[36,863],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[3,856],[4,857],[5,858],[6,859],[236,888]]),Lb=G([[24,869],[25,870],[26,869],[27,868],[28,863],[29,864],[30,862],[31,866],[32,863],[33,865],[34,866],[35,865],[36,864],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[3,856],[4,857],[5,858],[6,859],[236,888]]),Rb=G([[0,9],[1,16],[2,905],[3,890],[4,891],[5,892],[6,893],[7,904],[8,903],[9,902],[10,563],[11,901],[12,900],[13,899],[14,898],[15,897],[16,896],[17,895],[18,894],[19,889],[20,1059],[21,1060],[22,1061],[23,1062],[24,894],[25,1062],[26,894],[27,895],[28,903],[29,902],[30,904],[31,902],[32,903],[33,563],[34,901],[35,563],[36,902],[37,897],[38,889],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[236,922]]),zb=G([[24,903],[25,904],[26,903],[27,902],[28,896],[29,897],[30,895],[31,898],[32,896],[33,898],[34,899],[35,898],[36,897],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[3,890],[4,891],[5,892],[6,893],[236,922]]),Bb=G([[24,903],[25,904],[26,903],[27,902],[28,897],[29,898],[30,896],[31,900],[32,897],[33,899],[34,900],[35,899],[36,898],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[3,890],[4,891],[5,892],[6,893],[236,922]]),Vb=G([[0,9],[1,16],[2,939],[3,924],[4,925],[5,926],[6,927],[7,938],[8,937],[9,936],[10,598],[11,935],[12,934],[13,933],[14,932],[15,931],[16,930],[17,929],[18,928],[19,923],[20,1063],[21,1064],[22,1065],[23,1066],[24,928],[25,1066],[26,928],[27,929],[28,937],[29,936],[30,938],[31,936],[32,937],[33,598],[34,935],[35,598],[36,936],[37,931],[38,923],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[236,956]]),Hb=G([[24,937],[25,938],[26,937],[27,936],[28,930],[29,931],[30,929],[31,932],[32,930],[33,932],[34,933],[35,932],[36,931],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[3,924],[4,925],[5,926],[6,927],[236,956]]),Ub=G([[24,937],[25,938],[26,937],[27,936],[28,931],[29,932],[30,930],[31,934],[32,931],[33,933],[34,934],[35,933],[36,932],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[3,924],[4,925],[5,926],[6,927],[236,956]]),Wb=G([[0,9],[1,16],[2,973],[3,958],[4,959],[5,960],[6,961],[7,972],[8,971],[9,970],[10,633],[11,969],[12,968],[13,967],[14,966],[15,965],[16,964],[17,963],[18,962],[19,957],[20,1067],[21,1068],[22,1069],[23,1070],[24,962],[25,1070],[26,962],[27,963],[28,971],[29,970],[30,972],[31,970],[32,971],[33,633],[34,969],[35,633],[36,970],[37,965],[38,957],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[236,990]]),Gb=G([[24,971],[25,972],[26,971],[27,970],[28,964],[29,965],[30,963],[31,966],[32,964],[33,966],[34,967],[35,966],[36,965],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[3,958],[4,959],[5,960],[6,961],[236,990]]),Kb=G([[24,971],[25,972],[26,971],[27,970],[28,965],[29,966],[30,964],[31,968],[32,965],[33,967],[34,968],[35,967],[36,966],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[3,958],[4,959],[5,960],[6,961],[236,990]]),qb=G([[0,9],[1,16],[2,670],[3,656],[4,657],[5,658],[6,659],[7,669],[8,668],[9,667],[10,666],[11,197],[12,665],[13,664],[14,663],[15,13],[16,662],[17,661],[18,660],[19,655],[20,1031],[21,1032],[22,1033],[23,1034],[24,660],[25,1034],[26,660],[27,661],[28,668],[29,667],[30,669],[31,667],[32,668],[33,666],[34,197],[35,666],[36,667],[37,13],[38,655],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[236,687]]),Jb=G([[24,668],[25,669],[26,668],[27,667],[28,662],[29,13],[30,661],[31,663],[32,662],[33,663],[34,664],[35,663],[36,13],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),Yb=G([[24,668],[25,669],[26,668],[27,667],[28,13],[29,663],[30,662],[31,665],[32,13],[33,664],[34,665],[35,664],[36,663],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),Xb=G([[24,17],[25,17],[26,17],[27,18],[28,12],[29,11],[30,13],[31,17],[32,12],[33,14],[34,13],[35,14],[36,15],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),Zb=G([[24,11],[25,7],[26,11],[27,1],[28,195],[29,196],[30,16],[31,11],[32,195],[33,197],[34,198],[35,197],[36,196],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),Qb=G([[24,11],[25,11],[26,11],[27,7],[28,195],[29,16],[30,196],[31,11],[32,195],[33,197],[34,196],[35,197],[36,198],[224,328],[225,329],[226,330],[227,331],[228,332],[229,333],[230,334],[231,335],[232,336],[233,337],[234,338],[235,339],[3,213],[4,214],[5,215],[6,216],[236,340]]),$b=G([[24,355],[25,355],[26,355],[27,356],[28,10],[29,350],[30,351],[31,355],[32,10],[33,352],[34,351],[35,352],[36,353],[224,362],[225,363],[226,364],[227,365],[228,366],[229,367],[230,368],[231,369],[232,370],[233,371],[234,372],[235,373],[3,342],[4,343],[5,344],[6,345],[236,374]]),ex=G([[24,390],[25,390],[26,390],[27,391],[28,385],[29,384],[30,386],[31,390],[32,385],[33,387],[34,386],[35,387],[36,388],[224,397],[225,398],[226,399],[227,400],[228,401],[229,402],[230,403],[231,404],[232,405],[233,406],[234,407],[235,408],[3,376],[4,377],[5,378],[6,379],[236,409]]),tx=G([[24,425],[25,425],[26,425],[27,426],[28,420],[29,419],[30,421],[31,425],[32,420],[33,422],[34,421],[35,422],[36,423],[224,432],[225,433],[226,434],[227,435],[228,436],[229,437],[230,438],[231,439],[232,440],[233,441],[234,442],[235,443],[3,411],[4,412],[5,413],[6,414],[236,444]]),nx=G([[24,460],[25,460],[26,460],[27,461],[28,455],[29,454],[30,456],[31,460],[32,455],[33,457],[34,456],[35,457],[36,458],[224,467],[225,468],[226,469],[227,470],[228,471],[229,472],[230,473],[231,474],[232,475],[233,476],[234,477],[235,478],[3,446],[4,447],[5,448],[6,449],[236,479]]),rx=G([[24,495],[25,495],[26,495],[27,496],[28,490],[29,489],[30,491],[31,495],[32,490],[33,492],[34,491],[35,492],[36,493],[224,502],[225,503],[226,504],[227,505],[228,506],[229,507],[230,508],[231,509],[232,510],[233,511],[234,512],[235,513],[3,481],[4,482],[5,483],[6,484],[236,514]]),ix=G([[24,530],[25,530],[26,530],[27,531],[28,525],[29,524],[30,526],[31,530],[32,525],[33,527],[34,526],[35,527],[36,528],[224,537],[225,538],[226,539],[227,540],[228,541],[229,542],[230,543],[231,544],[232,545],[233,546],[234,547],[235,548],[3,516],[4,517],[5,518],[6,519],[236,549]]),ax=G([[24,565],[25,565],[26,565],[27,566],[28,560],[29,559],[30,561],[31,565],[32,560],[33,562],[34,561],[35,562],[36,563],[224,572],[225,573],[226,574],[227,575],[228,576],[229,577],[230,578],[231,579],[232,580],[233,581],[234,582],[235,583],[3,551],[4,552],[5,553],[6,554],[236,584]]),ox=G([[24,600],[25,600],[26,600],[27,601],[28,595],[29,594],[30,596],[31,600],[32,595],[33,597],[34,596],[35,597],[36,598],[224,607],[225,608],[226,609],[227,610],[228,611],[229,612],[230,613],[231,614],[232,615],[233,616],[234,617],[235,618],[3,586],[4,587],[5,588],[6,589],[236,619]]),sx=G([[24,635],[25,635],[26,635],[27,636],[28,630],[29,629],[30,631],[31,635],[32,630],[33,632],[34,631],[35,632],[36,633],[224,642],[225,643],[226,644],[227,645],[228,646],[229,647],[230,648],[231,649],[232,650],[233,651],[234,652],[235,653],[3,621],[4,622],[5,623],[6,624],[236,654]]),cx=G([[24,668],[25,668],[26,668],[27,669],[28,664],[29,663],[30,665],[31,668],[32,664],[33,197],[34,665],[35,197],[36,666],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),lx=G([[24,17],[25,18],[26,17],[27,16],[28,12],[29,13],[30,11],[31,17],[32,12],[33,14],[34,15],[35,14],[36,13],[224,199],[225,200],[226,201],[227,202],[228,203],[229,204],[230,205],[231,206],[232,207],[233,208],[234,209],[235,210],[3,3],[4,4],[5,5],[6,6],[236,211]]),ux=G([[24,700],[25,9],[26,700],[27,699],[28,696],[29,697],[30,695],[31,700],[32,696],[33,668],[34,698],[35,668],[36,697],[224,706],[225,707],[226,708],[227,709],[228,710],[229,711],[230,712],[231,713],[232,714],[233,715],[234,716],[235,717],[3,689],[4,690],[5,691],[6,692],[236,718]]),dx=G([[24,733],[25,734],[26,733],[27,732],[28,729],[29,730],[30,728],[31,733],[32,729],[33,731],[34,388],[35,731],[36,730],[224,740],[225,741],[226,742],[227,743],[228,744],[229,745],[230,746],[231,747],[232,748],[233,749],[234,750],[235,751],[3,720],[4,721],[5,722],[6,723],[236,752]]),fx=G([[24,767],[25,768],[26,767],[27,766],[28,763],[29,764],[30,762],[31,767],[32,763],[33,765],[34,423],[35,765],[36,764],[224,774],[225,775],[226,776],[227,777],[228,778],[229,779],[230,780],[231,781],[232,782],[233,783],[234,784],[235,785],[3,754],[4,755],[5,756],[6,757],[236,786]]),px=G([[24,801],[25,802],[26,801],[27,800],[28,797],[29,798],[30,796],[31,801],[32,797],[33,799],[34,458],[35,799],[36,798],[224,808],[225,809],[226,810],[227,811],[228,812],[229,813],[230,814],[231,815],[232,816],[233,817],[234,818],[235,819],[3,788],[4,789],[5,790],[6,791],[236,820]]),mx=G([[24,835],[25,836],[26,835],[27,834],[28,831],[29,832],[30,830],[31,835],[32,831],[33,833],[34,493],[35,833],[36,832],[224,842],[225,843],[226,844],[227,845],[228,846],[229,847],[230,848],[231,849],[232,850],[233,851],[234,852],[235,853],[3,822],[4,823],[5,824],[6,825],[236,854]]),hx=G([[24,869],[25,870],[26,869],[27,868],[28,865],[29,866],[30,864],[31,869],[32,865],[33,867],[34,528],[35,867],[36,866],[224,876],[225,877],[226,878],[227,879],[228,880],[229,881],[230,882],[231,883],[232,884],[233,885],[234,886],[235,887],[3,856],[4,857],[5,858],[6,859],[236,888]]),gx=G([[24,903],[25,904],[26,903],[27,902],[28,899],[29,900],[30,898],[31,903],[32,899],[33,901],[34,563],[35,901],[36,900],[224,910],[225,911],[226,912],[227,913],[228,914],[229,915],[230,916],[231,917],[232,918],[233,919],[234,920],[235,921],[3,890],[4,891],[5,892],[6,893],[236,922]]),_x=G([[24,937],[25,938],[26,937],[27,936],[28,933],[29,934],[30,932],[31,937],[32,933],[33,935],[34,598],[35,935],[36,934],[224,944],[225,945],[226,946],[227,947],[228,948],[229,949],[230,950],[231,951],[232,952],[233,953],[234,954],[235,955],[3,924],[4,925],[5,926],[6,927],[236,956]]),vx=G([[24,971],[25,972],[26,971],[27,970],[28,967],[29,968],[30,966],[31,971],[32,967],[33,969],[34,633],[35,969],[36,968],[224,978],[225,979],[226,980],[227,981],[228,982],[229,983],[230,984],[231,985],[232,986],[233,987],[234,988],[235,989],[3,958],[4,959],[5,960],[6,961],[236,990]]),yx=G([[24,668],[25,669],[26,668],[27,667],[28,664],[29,665],[30,663],[31,668],[32,664],[33,197],[34,666],[35,197],[36,665],[224,675],[225,676],[226,677],[227,678],[228,679],[229,680],[230,681],[231,682],[232,683],[233,684],[234,685],[235,686],[3,656],[4,657],[5,658],[6,659],[236,687]]),bx={light:ay,dark:oy,light_accent:sy,dark_accent:cy,light_black:ly,light_white:uy,light_gray:dy,light_blue:fy,light_red:py,light_yellow:Bee,light_green:my,light_orange:hy,light_pink:gy,light_purple:_y,light_teal:vy,light_neutral:yy,dark_black:by,dark_white:xy,dark_gray:Sy,dark_blue:Cy,dark_red:wy,dark_yellow:Ty,dark_green:Ey,dark_orange:Dy,dark_pink:Oy,dark_purple:ky,dark_teal:Ay,dark_neutral:jy,light_surface1:My,light_white_surface1:My,light_Input:My,light_Progress:My,light_Slider:My,light_TextArea:My,light_white_Input:My,light_white_Progress:My,light_white_Slider:My,light_white_TextArea:My,light_surface2:Ny,light_white_surface2:Ny,light_Button:Ny,light_SliderThumb:Ny,light_Switch:Ny,light_white_Button:Ny,light_white_SliderThumb:Ny,light_white_Switch:Ny,dark_surface1:Py,dark_black_surface1:Py,dark_Input:Py,dark_Progress:Py,dark_Slider:Py,dark_TextArea:Py,dark_black_Input:Py,dark_black_Progress:Py,dark_black_Slider:Py,dark_black_TextArea:Py,dark_surface2:Fy,dark_black_surface2:Fy,dark_Button:Fy,dark_SliderThumb:Fy,dark_Switch:Fy,dark_black_Button:Fy,dark_black_SliderThumb:Fy,dark_black_Switch:Fy,light_black_accent:Iy,light_black_Tooltip:Iy,light_black_SwitchThumb:Iy,light_black_surface1:Ly,light_black_Input:Ly,light_black_Progress:Ly,light_black_Slider:Ly,light_black_TextArea:Ly,light_black_surface2:Ry,light_black_Button:Ry,light_black_SliderThumb:Ry,light_black_Switch:Ry,light_white_accent:zy,light_Tooltip:zy,light_SwitchThumb:zy,light_white_Tooltip:zy,light_white_SwitchThumb:zy,light_gray_accent:By,light_gray_Tooltip:By,light_gray_SwitchThumb:By,light_gray_surface1:Vy,light_gray_Input:Vy,light_gray_Progress:Vy,light_gray_Slider:Vy,light_gray_TextArea:Vy,light_gray_surface2:Hy,light_gray_Button:Hy,light_gray_SliderThumb:Hy,light_gray_Switch:Hy,light_blue_accent:Uy,light_blue_Tooltip:Uy,light_blue_SwitchThumb:Uy,light_blue_surface1:Wy,light_blue_Input:Wy,light_blue_Progress:Wy,light_blue_Slider:Wy,light_blue_TextArea:Wy,light_blue_surface2:Gy,light_blue_Button:Gy,light_blue_SliderThumb:Gy,light_blue_Switch:Gy,light_red_accent:Ky,light_red_Tooltip:Ky,light_red_SwitchThumb:Ky,light_red_surface1:qy,light_red_Input:qy,light_red_Progress:qy,light_red_Slider:qy,light_red_TextArea:qy,light_red_surface2:Jy,light_red_Button:Jy,light_red_SliderThumb:Jy,light_red_Switch:Jy,light_yellow_accent:Yy,light_yellow_Tooltip:Yy,light_yellow_SwitchThumb:Yy,light_yellow_surface1:Xy,light_yellow_Input:Xy,light_yellow_Progress:Xy,light_yellow_Slider:Xy,light_yellow_TextArea:Xy,light_yellow_surface2:Zy,light_yellow_Button:Zy,light_yellow_SliderThumb:Zy,light_yellow_Switch:Zy,light_green_accent:Qy,light_green_Tooltip:Qy,light_green_SwitchThumb:Qy,light_green_surface1:$y,light_green_Input:$y,light_green_Progress:$y,light_green_Slider:$y,light_green_TextArea:$y,light_green_surface2:eb,light_green_Button:eb,light_green_SliderThumb:eb,light_green_Switch:eb,light_orange_accent:tb,light_orange_Tooltip:tb,light_orange_SwitchThumb:tb,light_orange_surface1:nb,light_orange_Input:nb,light_orange_Progress:nb,light_orange_Slider:nb,light_orange_TextArea:nb,light_orange_surface2:rb,light_orange_Button:rb,light_orange_SliderThumb:rb,light_orange_Switch:rb,light_pink_accent:ib,light_pink_Tooltip:ib,light_pink_SwitchThumb:ib,light_pink_surface1:ab,light_pink_Input:ab,light_pink_Progress:ab,light_pink_Slider:ab,light_pink_TextArea:ab,light_pink_surface2:ob,light_pink_Button:ob,light_pink_SliderThumb:ob,light_pink_Switch:ob,light_purple_accent:sb,light_purple_Tooltip:sb,light_purple_SwitchThumb:sb,light_purple_surface1:cb,light_purple_Input:cb,light_purple_Progress:cb,light_purple_Slider:cb,light_purple_TextArea:cb,light_purple_surface2:lb,light_purple_Button:lb,light_purple_SliderThumb:lb,light_purple_Switch:lb,light_teal_accent:ub,light_teal_Tooltip:ub,light_teal_SwitchThumb:ub,light_teal_surface1:db,light_teal_Input:db,light_teal_Progress:db,light_teal_Slider:db,light_teal_TextArea:db,light_teal_surface2:fb,light_teal_Button:fb,light_teal_SliderThumb:fb,light_teal_Switch:fb,light_neutral_accent:pb,light_neutral_Tooltip:pb,light_neutral_SwitchThumb:pb,light_neutral_surface1:mb,light_neutral_Input:mb,light_neutral_Progress:mb,light_neutral_Slider:mb,light_neutral_TextArea:mb,light_neutral_surface2:hb,light_neutral_Button:hb,light_neutral_SliderThumb:hb,light_neutral_Switch:hb,dark_black_accent:gb,dark_Tooltip:gb,dark_SwitchThumb:gb,dark_black_Tooltip:gb,dark_black_SwitchThumb:gb,dark_white_accent:_b,dark_white_Tooltip:_b,dark_white_SwitchThumb:_b,dark_white_surface1:vb,dark_white_Input:vb,dark_white_Progress:vb,dark_white_Slider:vb,dark_white_TextArea:vb,dark_white_surface2:yb,dark_white_Button:yb,dark_white_SliderThumb:yb,dark_white_Switch:yb,dark_gray_accent:bb,dark_gray_Tooltip:bb,dark_gray_SwitchThumb:bb,dark_gray_surface1:xb,dark_gray_Input:xb,dark_gray_Progress:xb,dark_gray_Slider:xb,dark_gray_TextArea:xb,dark_gray_surface2:Sb,dark_gray_Button:Sb,dark_gray_SliderThumb:Sb,dark_gray_Switch:Sb,dark_blue_accent:Cb,dark_blue_Tooltip:Cb,dark_blue_SwitchThumb:Cb,dark_blue_surface1:wb,dark_blue_Input:wb,dark_blue_Progress:wb,dark_blue_Slider:wb,dark_blue_TextArea:wb,dark_blue_surface2:Tb,dark_blue_Button:Tb,dark_blue_SliderThumb:Tb,dark_blue_Switch:Tb,dark_red_accent:Eb,dark_red_Tooltip:Eb,dark_red_SwitchThumb:Eb,dark_red_surface1:Db,dark_red_Input:Db,dark_red_Progress:Db,dark_red_Slider:Db,dark_red_TextArea:Db,dark_red_surface2:Ob,dark_red_Button:Ob,dark_red_SliderThumb:Ob,dark_red_Switch:Ob,dark_yellow_accent:kb,dark_yellow_Tooltip:kb,dark_yellow_SwitchThumb:kb,dark_yellow_surface1:Ab,dark_yellow_Input:Ab,dark_yellow_Progress:Ab,dark_yellow_Slider:Ab,dark_yellow_TextArea:Ab,dark_yellow_surface2:jb,dark_yellow_Button:jb,dark_yellow_SliderThumb:jb,dark_yellow_Switch:jb,dark_green_accent:Mb,dark_green_Tooltip:Mb,dark_green_SwitchThumb:Mb,dark_green_surface1:Nb,dark_green_Input:Nb,dark_green_Progress:Nb,dark_green_Slider:Nb,dark_green_TextArea:Nb,dark_green_surface2:Pb,dark_green_Button:Pb,dark_green_SliderThumb:Pb,dark_green_Switch:Pb,dark_orange_accent:Fb,dark_orange_Tooltip:Fb,dark_orange_SwitchThumb:Fb,dark_orange_surface1:Ib,dark_orange_Input:Ib,dark_orange_Progress:Ib,dark_orange_Slider:Ib,dark_orange_TextArea:Ib,dark_orange_surface2:Lb,dark_orange_Button:Lb,dark_orange_SliderThumb:Lb,dark_orange_Switch:Lb,dark_pink_accent:Rb,dark_pink_Tooltip:Rb,dark_pink_SwitchThumb:Rb,dark_pink_surface1:zb,dark_pink_Input:zb,dark_pink_Progress:zb,dark_pink_Slider:zb,dark_pink_TextArea:zb,dark_pink_surface2:Bb,dark_pink_Button:Bb,dark_pink_SliderThumb:Bb,dark_pink_Switch:Bb,dark_purple_accent:Vb,dark_purple_Tooltip:Vb,dark_purple_SwitchThumb:Vb,dark_purple_surface1:Hb,dark_purple_Input:Hb,dark_purple_Progress:Hb,dark_purple_Slider:Hb,dark_purple_TextArea:Hb,dark_purple_surface2:Ub,dark_purple_Button:Ub,dark_purple_SliderThumb:Ub,dark_purple_Switch:Ub,dark_teal_accent:Wb,dark_teal_Tooltip:Wb,dark_teal_SwitchThumb:Wb,dark_teal_surface1:Gb,dark_teal_Input:Gb,dark_teal_Progress:Gb,dark_teal_Slider:Gb,dark_teal_TextArea:Gb,dark_teal_surface2:Kb,dark_teal_Button:Kb,dark_teal_SliderThumb:Kb,dark_teal_Switch:Kb,dark_neutral_accent:qb,dark_neutral_Tooltip:qb,dark_neutral_SwitchThumb:qb,dark_neutral_surface1:Jb,dark_neutral_Input:Jb,dark_neutral_Progress:Jb,dark_neutral_Slider:Jb,dark_neutral_TextArea:Jb,dark_neutral_surface2:Yb,dark_neutral_Button:Yb,dark_neutral_SliderThumb:Yb,dark_neutral_Switch:Yb,light_ProgressIndicator:Xb,light_SliderActive:Xb,light_white_ProgressIndicator:Xb,light_white_SliderActive:Xb,dark_ProgressIndicator:Zb,dark_SliderActive:Zb,dark_black_ProgressIndicator:Zb,dark_black_SliderActive:Zb,light_black_ProgressIndicator:Qb,light_black_SliderActive:Qb,light_gray_ProgressIndicator:$b,light_gray_SliderActive:$b,light_blue_ProgressIndicator:ex,light_blue_SliderActive:ex,light_red_ProgressIndicator:tx,light_red_SliderActive:tx,light_yellow_ProgressIndicator:nx,light_yellow_SliderActive:nx,light_green_ProgressIndicator:rx,light_green_SliderActive:rx,light_orange_ProgressIndicator:ix,light_orange_SliderActive:ix,light_pink_ProgressIndicator:ax,light_pink_SliderActive:ax,light_purple_ProgressIndicator:ox,light_purple_SliderActive:ox,light_teal_ProgressIndicator:sx,light_teal_SliderActive:sx,light_neutral_ProgressIndicator:cx,light_neutral_SliderActive:cx,dark_white_ProgressIndicator:lx,dark_white_SliderActive:lx,dark_gray_ProgressIndicator:ux,dark_gray_SliderActive:ux,dark_blue_ProgressIndicator:dx,dark_blue_SliderActive:dx,dark_red_ProgressIndicator:fx,dark_red_SliderActive:fx,dark_yellow_ProgressIndicator:px,dark_yellow_SliderActive:px,dark_green_ProgressIndicator:mx,dark_green_SliderActive:mx,dark_orange_ProgressIndicator:hx,dark_orange_SliderActive:hx,dark_pink_ProgressIndicator:gx,dark_pink_SliderActive:gx,dark_purple_ProgressIndicator:_x,dark_purple_SliderActive:_x,dark_teal_ProgressIndicator:vx,dark_teal_SliderActive:vx,dark_neutral_ProgressIndicator:yx,dark_neutral_SliderActive:yx};function Vee(e){return e===0?0:e===2?.5:e===4?1:e===8?1.5:e<=16?Math.round(e*.333):Math.floor(e*.7-12)}var xx={$0:0,"$0.25":2,"$0.5":4,"$0.75":8,$1:20,"$1.5":24,$2:28,"$2.5":32,$3:36,"$3.5":40,$4:44,$true:44,"$4.5":48,$5:52,$6:64,$7:74,$8:84,$9:94,$10:104,$11:124,$12:144,$13:164,$14:184,$15:204,$16:224,$17:224,$18:244,$19:264,$20:284},Sx=Object.entries(xx).map(([e,t])=>[e,Vee(t)]),Hee=Sx.slice(1).map(([e,t])=>[`-${e.slice(1)}`,-t]),Uee={radius:{0:0,1:3,2:5,3:7,4:9,true:9,5:10,6:16,7:19,8:22,9:26,10:34,11:42,12:50},zIndex:{0:0,1:100,2:200,3:300,4:400,5:500},space:{...Object.fromEntries(Sx),...Object.fromEntries(Hee)},size:xx},Wee=Gee({text:`textAlign`,b:`bottom`,bg:`backgroundColor`,content:`alignContent`,grow:`flexGrow`,items:`alignItems`,justify:`justifyContent`,l:`left`,m:`margin`,maxH:`maxHeight`,maxW:`maxWidth`,mb:`marginBottom`,minH:`minHeight`,minW:`minWidth`,ml:`marginLeft`,mr:`marginRight`,mt:`marginTop`,mx:`marginHorizontal`,my:`marginVertical`,p:`padding`,pb:`paddingBottom`,pl:`paddingLeft`,pr:`paddingRight`,pt:`paddingTop`,px:`paddingHorizontal`,py:`paddingVertical`,r:`right`,rounded:`borderRadius`,select:`userSelect`,self:`alignSelf`,shrink:`flexShrink`,t:`top`,z:`zIndex`});function Gee(e){return e}var Cx=`Zen Mono`,Kee=`Zen Pixel Square`,qee=`"Zen", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,Jee=`"${Cx}", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace`;`${Kee}${Cx}`;var Yee=qee,Xee=Jee,Zee={1:12,2:13,3:14,4:15,true:15,5:16,6:18,7:22,8:26,9:30,10:40,11:46,12:52,13:60,14:70,15:85,16:100},Qee=e=>{let t=1.5-Math.max(0,(e-20)*.004);return Math.round(e*t)},wx=({font:e={},sizeLineHeight:t=Qee,sizeSize:n=e=>Math.round(e)}={})=>{let r=Object.fromEntries(Object.entries({...Zee,...e.size}).map(([e,t])=>[e,n(+t)]));return Ya({family:`-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,lineHeight:Object.fromEntries(Object.entries(r).map(([e,n])=>[e,t(j(n))])),weight:{1:`400`},letterSpacing:{4:0},...e,size:r})},$ee=e=>Math.round(e*1.12+5),Tx=Yee,ete=Xee,tte={body:wx({font:{family:Tx}}),heading:wx({font:{family:Tx,weight:{0:`600`,6:`700`,9:`800`}},sizeLineHeight:$ee}),mono:wx({font:{family:ete}})},Ex={100:100,200:200,xxxs:260,xxs:340,xs:460,sm:640,md:768,lg:1024,xl:1280,xxl:1536},Dx=.02,Ox={media:{touchable:{pointer:`coarse`},hoverable:{hover:`hover`},"max-xxl":{maxWidth:Ex.xxl-Dx},"max-xl":{maxWidth:Ex.xl-Dx},"max-lg":{maxWidth:Ex.lg-Dx},"max-md":{maxWidth:Ex.md-Dx},"max-sm":{maxWidth:Ex.sm-Dx},"max-xs":{maxWidth:Ex.xs-Dx},"max-xxs":{maxWidth:Ex.xxs-Dx},"max-xxxs":{maxWidth:Ex.xxxs-Dx},"max-200":{maxWidth:Ex[200]-Dx},"max-100":{maxWidth:Ex[100]-Dx},xxxs:{minWidth:Ex.xxxs},xxs:{minWidth:Ex.xxs},xs:{minWidth:Ex.xs},sm:{minWidth:Ex.sm},md:{minWidth:Ex.md},lg:{minWidth:Ex.lg},xl:{minWidth:Ex.xl},xxl:{minWidth:Ex.xxl},"max-height-lg":{maxHeight:Ex.lg-Dx},"max-height-md":{maxHeight:Ex.md-Dx},"max-height-sm":{maxHeight:Ex.sm-Dx},"max-height-xs":{maxHeight:Ex.xs-Dx},"max-height-xxs":{maxHeight:Ex.xxs-Dx},"max-height-xxxs":{maxHeight:Ex.xxxs-Dx},"max-height-200":{maxHeight:Ex[200]-Dx},"max-height-100":{maxHeight:Ex[100]-Dx},"height-sm":{minHeight:Ex.sm},"height-md":{minHeight:Ex.md},"height-lg":{minHeight:Ex.lg}},shorthands:Wee,themes:bx,tokens:Uee,fonts:tte,selectionStyles:e=>e.color5?{backgroundColor:e.color5,color:e.color11}:null,settings:{mediaQueryDefaultActive:{touchable:!1,hoverable:!0,"max-xxl":!0,"max-xl":!0,"max-lg":!0,"max-md":!0,"max-sm":!0,"max-xs":!0,"max-xxs":!1,"max-xxxs":!1,xxxs:!0,xxs:!0,xs:!0,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1,"max-height-sm":!1,"max-height-md":!1,"max-height-lg":!0,"height-sm":!0,"height-md":!0,"height-lg":!1},defaultFont:`body`,fastSchemeChange:!0,shouldAddPrefersColorThemes:!0,allowedStyleValues:`somewhat-strict-web`,addThemeClassName:`html`,onlyAllowShorthands:!0,styleCompat:`web`}},nte=new Set([`stiffness`,`damping`,`mass`,`tension`,`friction`,`velocity`,`overshootClamping`,`duration`,`bounciness`,`speed`]);function kx(e){return nte.has(e)}function rte(e){if(!e)return{default:null,enter:null,exit:null,delay:void 0,properties:{}};if(typeof e==`string`)return{default:e,enter:null,exit:null,delay:void 0,properties:{}};if(Array.isArray(e)){let[t,n]=e,r={},i={},a,o=null,s=null;if(n&&typeof n==`object`)for(let[e,t]of Object.entries(n))e===`delay`&&typeof t==`number`?a=t:e===`enter`&&typeof t==`string`?o=t:e===`exit`&&typeof t==`string`?s=t:kx(e)&&t!==void 0?Object.assign(i,{[e]:t}):t!==void 0&&(r[e]=t);return{default:t,enter:o,exit:s,delay:a,properties:r,config:Object.keys(i).length>0?i:void 0}}if(typeof e==`object`){let t={},n={},r=null,i=null,a=null,o;for(let[s,c]of Object.entries(e))s==="default"&&typeof c==`string`?r=c:s===`enter`&&typeof c==`string`?i=c:s===`exit`&&typeof c==`string`?a=c:s===`delay`&&typeof c==`number`?o=c:kx(s)&&c!==void 0?Object.assign(n,{[s]:c}):c!==void 0&&(t[s]=c);return{default:r,enter:i,exit:a,delay:o,properties:t,config:Object.keys(n).length>0?n:void 0}}return{default:null,enter:null,exit:null,delay:void 0,properties:{}}}function ite(e){return e.default!==null||e.enter!==null||e.exit!==null||Object.keys(e.properties).length>0}function ate(e){return Object.keys(e.properties)}function ote(e,t){return t===`enter`&&e.enter?e.enter:t===`exit`&&e.exit?e.exit:e.default}function ste(e,t,n,r){let i=new Map;for(let a of n){let n=e.properties[a],o=null;typeof n==`string`?o=t[n]??null:n&&typeof n==`object`&&n.type&&(o=t[n.type]??null),o===null&&(o=r),i.set(a,o)}return i}var cte=/(\d+(?:\.\d+)?)\s*ms/,lte=/(\d+(?:\.\d+)?)\s*s/;function Ax(e){let t=e.match(cte);if(t)return Number.parseInt(t[1],10);let n=e.match(lte);return n?Math.round(Number.parseFloat(n[1])*1e3):300}var ute=/(\d+(?:\.\d+)?)\s*ms/,dte=/(\d+(?:\.\d+)?)\s*s(?!tiffness)/;function jx(e,t){let n=e.replace(ute,`${t}ms`);if(n!==e)return n;let r=e.replace(dte,`${t}ms`);return r===e?`${t}ms ${e}`:r}var Mx=[`x`,`y`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skewX`,`skewY`];function Nx(e){if(!e)return``;let t=[];if(e.x!==void 0||e.y!==void 0){let n=e.x??0,r=e.y??0;t.push(`translate(${n}px, ${r}px)`)}if(e.scale!==void 0&&t.push(`scale(${e.scale})`),e.scaleX!==void 0&&t.push(`scaleX(${e.scaleX})`),e.scaleY!==void 0&&t.push(`scaleY(${e.scaleY})`),e.rotate!==void 0){let n=e.rotate,r=typeof n==`string`&&n.includes(`deg`)?``:`deg`;t.push(`rotate(${n}${r})`)}return e.rotateX!==void 0&&t.push(`rotateX(${e.rotateX}deg)`),e.rotateY!==void 0&&t.push(`rotateY(${e.rotateY}deg)`),e.rotateZ!==void 0&&t.push(`rotateZ(${e.rotateZ}deg)`),e.skewX!==void 0&&t.push(`skewX(${e.skewX}deg)`),e.skewY!==void 0&&t.push(`skewY(${e.skewY}deg)`),t.join(` `)}function Px(e,t){if(!t)return;let n=Nx(t);n&&(e.style.transform=n);for(let[n,r]of Object.entries(t))Mx.includes(n)||r!==void 0&&(n===`opacity`?e.style.opacity=String(r):n===`backgroundColor`?e.style.backgroundColor=String(r):n===`color`?e.style.color=String(r):e.style[n]=typeof r==`number`?`${r}px`:String(r))}function Fx(e){let t=new WeakMap;return{animations:e,usePresence:Za,ResetPresence:En,inputStyle:`css`,outputStyle:`css`,useAnimatedNumber(e){let[n,r]=V.useState(e),i=V.useRef(null);return{getInstance(){return r},getValue(){return n},setValue(e,n,a){if(r(e),i.current&&=(clearTimeout(i.current),null),a){if(!n||n.type===`direct`||n.type===`timing`&&n.duration===0)a();else{let e=n.type===`timing`?n.duration:300;i.current=setTimeout(a,e)}}let o=t.get(r);o&&o.forEach(t=>t(e))},stop(){i.current&&=(clearTimeout(i.current),null)}}},useAnimatedNumberReaction({value:e},n){V.useEffect(()=>{let r=e.getInstance(),i=t.get(r);if(!i){let e=new Set;t.set(r,e),i=e}return i.add(n),()=>{i?.delete(n)}},[])},useAnimatedNumberStyle(e,t){return t(e.getValue())},useAnimatedNumbersStyle(e,t){return t(...e.map(e=>e.getValue()))},useAnimations:({props:t,presence:n,style:r,componentState:i,stateRef:a,styleState:o})=>{let s=i.unmounted===!0,c=!!i.unmounted,l=n?.[0]===!1,u=n?.[1],d=V.useRef(c),f=d.current&&!c;V.useEffect(()=>{d.current=c});let p=V.useRef(0),m=V.useRef(!1),h=V.useRef(!1),g=V.useRef(!1),_=V.useRef(u),v=V.useRef({});_.current=u;let y=l&&!h.current,x=!l&&h.current;y&&(p.current++,m.current=!1),x&&(p.current++,g.current=!0),V.useEffect(()=>{h.current=l}),b(()=>{let e=a.current.host;if(l||!e)return;let t=getComputedStyle(e);v.current={opacity:t.opacity}});let S=rte(o?.effectiveTransition??t.transition),C=ote(S,l?`exit`:c||f?`enter`:`default`),w=C?e[C]:null,T=ate(S),E=S.default!==null||S.enter!==null||S.exit!==null,D=T.length>0,k;if(k=t.animateOnly?t.animateOnly:D&&!E?T:D&&E?[`all`,...T]:[`all`],b(()=>{let n=a.current.host;if(!u||!l||!n)return;let i=n,o=p.current,s=()=>{o===p.current&&(m.current||(m.current=!0,_.current?.()))};if(k.length===0){s();return}let c,d=g.current,f=d,h=t.enterStyle,y=t.exitStyle,b=S.delay?` ${S.delay}ms`:``,x=S.config?.duration,C=k.map(t=>{let n=S.properties[t],r=null;return typeof n==`string`?r=e[n]:n&&typeof n==`object`&&n.type?r=e[n.type]:w&&(r=w),r&&x&&(r=jx(r,x)),r?`${t} ${r}${b}`:null}).filter(Boolean).join(`, `),T=e=>e===`opacity`?r?.opacity??t.opacity??v.current.opacity??1:Mx.includes(e)?+(e===`scale`||e===`scaleX`||e===`scaleY`):h?.[e];if(d){if(g.current=!1,i.style.transition=`none`,y){let e={};for(let t of Object.keys(y)){let n=T(t);n!==void 0&&(e[t]=n)}Px(i,e)}else i.style.opacity=`1`,i.style.transform=`none`;i.offsetHeight}else if(y){f=!0,i.style.transition=`none`;let e={};for(let t of Object.keys(y)){let n=T(t);n!==void 0&&(e[t]=n)}Px(i,e),i.offsetHeight,c=requestAnimationFrame(()=>{o===p.current&&(i.style.transition=C,i.offsetHeight,Px(i,y),f=!1)})}let E=w?Ax(w):200,D=ste(S,e,k,w);for(let e of D.values())if(e){let t=Ax(e);t>E&&(E=t)}let O=S.delay??0,ee=E+O,A=setTimeout(()=>{s()},ee),j=new Set(k),M=0,N=e=>{if(e.target!==i)return;let t=e.propertyName;(j.has(t)||t===`all`)&&(M++,M>=j.size&&(clearTimeout(A),s()))},P=()=>{f||(clearTimeout(A),s())};return i.addEventListener(`transitionend`,N),i.addEventListener(`transitioncancel`,P),d&&(c=requestAnimationFrame(()=>{o===p.current&&(i.style.transition=C,i.offsetHeight,Px(i,y),f=!1)})),()=>{clearTimeout(A),c!==void 0&&cancelAnimationFrame(c),i.removeEventListener(`transitionend`,N),i.removeEventListener(`transitioncancel`,P),i.style.transition=``}},[l]),s||!ite(S))return null;Array.isArray(r.transform)&&(r.transform=O(r.transform));let ee=S.delay?` ${S.delay}ms`:``,A=S.config?.duration;return r.transition=k.map(t=>{let n=S.properties[t],r=null;return typeof n==`string`?r=e[n]:n&&typeof n==`object`&&n.type?r=e[n.type]:w&&(r=w),r&&A&&(r=jx(r,A)),r?`${t} ${r}${ee}`:null}).filter(Boolean).join(`, `),{style:r,className:c?`t_unmounted`:``}}}}var Ix={dark:{ground:`var(--neutral-900)`,line:`var(--neutral-800)`,dim:`var(--neutral-400)`,ink:`var(--neutral-300)`,bright:`var(--neutral-50)`},light:{ground:`var(--neutral-100)`,line:`var(--neutral-200)`,dim:`var(--neutral-600)`,ink:`var(--neutral-700)`,bright:`var(--neutral-950)`}},Lx={key:`ink`,string:`bright`,number:`bright`,boolean:`bright`,null:`bright`,punctuation:`dim`,comment:`dim`,keyword:`bright`},Rx=e=>Object.fromEntries(Object.entries(Lx).map(([t,n])=>[t,Ix[e][n]])),zx={dark:Rx(`dark`),light:Rx(`light`)},Bx={comment:{fontStyle:`italic`},keyword:{fontWeight:`700`},boolean:{fontWeight:`700`},null:{fontWeight:`700`}},Vx=e=>`code${e[0].toUpperCase()}${e.slice(1)}`;function Hx(e){let t=t=>`var(--${Vx(t)}, ${Ix[e][t]})`,n=t=>{let n=Bx[t],r=n?.fontStyle??(n?.fontWeight?`bold`:void 0);return{foreground:`var(--${Vx(t)}, ${zx[e][t]})`,...r?{fontStyle:r}:null}};return{name:`mono-${e}`,type:e,fg:t(`ink`),bg:t(`ground`),colors:{"editor.selectionBackground":t(`line`),"editor.lineHighlightBackground":t(`line`)},tokenColors:[{settings:{foreground:t(`ink`)}},{scope:[`comment`,`punctuation.definition.comment`,`string.quoted.docstring`],settings:n(`comment`)},{scope:[`punctuation`,`meta.brace`,`constant.character.escape.line-continuation`],settings:n(`punctuation`)},{scope:[`string`,`markup.inline.raw`],settings:n(`string`)},{scope:`constant.numeric`,settings:n(`number`)},{scope:[`constant.language`,`constant.language.boolean`],settings:n(`boolean`)},{scope:[`constant.language.null`,`constant.language.undefined`],settings:n(`null`)},{scope:[`constant`,`support.constant`,`entity.name.function`,`entity.name.command`,`support.function`,`entity.name.tag`],settings:{foreground:t(`bright`)}},{scope:[`string.unquoted`,`support.type.property-name`,`meta.object-literal.key`],settings:n(`key`)},{scope:[`keyword`,`storage`],settings:n(`keyword`)},{scope:[`keyword.operator`,`punctuation.accessor`],settings:{foreground:t(`ink`),fontStyle:``}},{scope:[`markup.heading`,`markup.bold`],settings:{foreground:t(`bright`),fontStyle:`bold`}},{scope:`markup.italic`,settings:{fontStyle:`italic`}},{scope:`markup.underline.link`,settings:{fontStyle:`underline`}},{scope:`markup.inserted`,settings:{foreground:t(`bright`)}},{scope:`markup.deleted`,settings:{foreground:t(`dim`)}}]}}Hx(`dark`),Hx(`light`);var Ux=[`dim`,`ink`,`bright`,...Object.keys(Lx)];Object.fromEntries(Ux.map(e=>{let t=e in Lx?Lx[e]:e;return[e,{key:Vx(e),light:Ix.light[t],dark:Ix.dark[t]}]}));var Wx=`var(--font-sans, 'Zen', system-ui, -apple-system, sans-serif)`,Gx=`var(--font-mono, 'Zen Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)`,Kx=`var(--font-serif, Georgia, serif)`,qx={1:`var(--text-xs, 12px)`,2:`var(--text-sm, 13px)`,3:`var(--text-base, 14px)`,4:`var(--text-lg, 15px)`,5:`var(--text-lg, 15px)`,6:`var(--text-xl, 17px)`,7:`var(--text-2xl, 21px)`,8:`var(--text-3xl, 26px)`,9:`var(--text-3xl, 26px)`,10:`var(--text-4xl, 32px)`,11:`var(--text-5xl, 40px)`,12:`calc(var(--text-5xl, 40px) + (var(--text-7xl, 64px) - var(--text-5xl, 40px)) / 3)`,13:`calc(var(--text-5xl, 40px) + 2 * (var(--text-7xl, 64px) - var(--text-5xl, 40px)) / 3)`,14:`var(--text-7xl, 64px)`,15:`calc(var(--text-7xl, 64px) + 4 * (var(--text-8xl, 84px) - var(--text-7xl, 64px)) / 5)`,16:`calc(var(--text-8xl, 84px) + 3 * (var(--text-9xl, 112px) - var(--text-8xl, 84px)) / 7)`,true:`var(--text-base, 14px)`},Jx={1:`calc(16px * var(--type-scale, 1) * var(--leading-lang, 1))`,2:`calc(18px * var(--type-scale, 1) * var(--leading-lang, 1))`,3:`calc(20px * var(--type-scale, 1) * var(--leading-lang, 1))`,4:`calc(22px * var(--type-scale, 1) * var(--leading-lang, 1))`,5:`calc(22px * var(--type-scale, 1) * var(--leading-lang, 1))`,6:`calc(24px * var(--type-scale, 1) * var(--leading-lang, 1))`,7:`calc(22px * var(--type-scale, 1) * var(--leading-lang, 1))`,8:`calc(28px * var(--type-scale, 1) * var(--leading-lang, 1))`,9:`calc(28px * var(--type-scale, 1) * var(--leading-lang, 1))`,10:`calc(34px * var(--type-scale, 1) * var(--leading-lang, 1))`,11:`calc(42px * var(--type-scale, 1) * var(--leading-lang, 1))`,12:`calc(50px * var(--type-scale, 1) * var(--leading-lang, 1))`,13:`calc(58px * var(--type-scale, 1) * var(--leading-lang, 1))`,14:`calc(66px * var(--type-scale, 1) * var(--leading-lang, 1))`,15:`calc(82px * var(--type-scale, 1) * var(--leading-lang, 1))`,16:`calc(98px * var(--type-scale, 1) * var(--leading-lang, 1))`,true:`calc(20px * var(--type-scale, 1) * var(--leading-lang, 1))`},Yx={1:0,2:0,3:0,4:0,5:0,6:0,7:`-0.025em`,8:`-0.025em`,9:`-0.025em`,10:`-0.025em`,11:`-0.025em`,12:`-0.025em`,13:`-0.025em`,14:`-0.025em`,15:`-0.025em`,16:`-0.025em`,true:0},Xx={"2xs":2,xs:4,0:0,1:6,2:6,3:8,4:8,5:12,6:12,7:12,8:12,9:12,10:9999,11:9999,12:9999,true:8},Zx={0:0,"0.25":1,"0.5":2,"0.75":3,1:4,"1.5":6,2:8,"2.5":10,3:12,"3.5":14,4:16,"4.5":20,5:24,6:32,7:40,8:48,9:56,10:64,11:80,12:96,13:112,14:128,15:144,16:160,17:160,18:176,19:192,20:208},Qx=e=>e===0?0:`calc(${e}px * var(--density, 1))`,$x=e=>e===0||e>=9999?e:`calc(${e}px * var(--radius-scale, 1))`,eS=Object.fromEntries(Object.entries(Xx).map(([e,t])=>[e,$x(t)])),tS={};for(let[e,t]of Object.entries(Zx))tS[`$${e}`]=Qx(t),tS[`-${e}`]=Qx(-t);tS.$true=Qx(Zx[4]),tS[`-true`]=Qx(-Zx[4]);var nS={dark:`rgb(255 255 255 / .10)`,light:`rgb(0 0 0 / .10)`},rS={dark:`#e5e5e5`,light:`#0a0a0a`},iS={dark:`rgb(255 255 255 / .40)`,light:`rgb(0 0 0 / .5)`},aS={bad:`var(--state-error, #ef4444)`,good:`var(--state-success, #22c55e)`},oS={dark:{aside:`rgb(255 255 255 / .78)`,hint:`rgb(255 255 255 / .55)`,hush:`rgb(255 255 255 / .3)`},light:{aside:`rgb(10 10 10 / .78)`,hint:`rgb(10 10 10 / .55)`,hush:`rgb(10 10 10 / .3)`}},sS=e=>Object.fromEntries(Object.entries({...Ix[e],...zx[e]}).map(([e,t])=>[`code${e[0].toUpperCase()}${e.slice(1)}`,t])),cS={dark:{base:`rgb(255 255 255 / .03)`,hover:`rgb(255 255 255 / .06)`,raised:`rgb(255 255 255 / .12)`},light:{base:`rgb(0 0 0 / .03)`,hover:`rgb(0 0 0 / .06)`,raised:`rgb(0 0 0 / .12)`}},lS={dark:`#0a0a0a`,light:`#f7f7f7`},uS={dark:`#333333`,light:`#e0e0e0`},dS={dark:`rgb(229 229 229 / .6)`,light:`rgb(10 10 10 / .65)`},fS=e=>e.startsWith(`light`)?`light`:`dark`,pS=e=>`color4`in e,mS=e=>e.split(`_`).slice(0,-1).join(`_`),hS=e=>{let t=Ox.themes[e];return!t||e===fS(e)?`var(--border, ${nS[fS(e)]})`:pS(t)?String(t.borderColor):hS(mS(e))},gS=Object.fromEntries(Object.entries(Ox.themes).map(([e,t])=>{let n=fS(e),r={...t,outlineColor:`var(--ring, ${iS[n]})`,...pS(t)?{}:{borderColor:hS(e)}};return[e,e===n?{...r,color2:`var(--surface-1, ${cS[n].base})`,color3:`var(--surface-2, ${cS[n].hover})`,color4:`var(--border, ${nS[n]})`,color5:`var(--surface-3, ${cS[n].raised})`,borderColor:`var(--border, ${nS[n]})`,color12:`var(--foreground, ${rS[n]})`,sunken:String(t.color1),panel:`var(--surface-1, ${cS[n].base})`,hover:`var(--surface-2, ${cS[n].hover})`,edge:`var(--border, ${nS[n]})`,raised:`var(--surface-3, ${cS[n].raised})`,rim:String(t.color6),bound:String(t.color7),dim:String(t.color8),faint:String(t.color9),soft:String(t.color10),quiet:String(t.color11),ink:`var(--foreground, ${rS[n]})`,aside:`var(--text-secondary, ${oS[n].aside})`,hint:`var(--text-tertiary, ${oS[n].hint})`,hush:`var(--text-disabled, ${oS[n].hush})`,bad:aS.bad,good:aS.good,background:lS[n],color:`var(--foreground, ${rS[n]})`,placeholderColor:`var(--text-placeholder, ${dS[n]})`,accentBackground:`var(--accent, ${cS[n].raised})`,accentColor:`var(--accent-foreground, ${rS[n]})`,accentHover:`var(--accent-hover, ${uS[n]})`,...sS(n)}:r]})),_S=e=>e,vS=`var(--ease-out, cubic-bezier(0.215, 0.61, 0.355, 1))`,yS={animations:Fx({default:`${vS} var(--duration-base, 300ms)`,"75ms":`${vS} 75ms`,"100ms":`${vS} 100ms`,"200ms":`${vS} 200ms`,quickest:`${vS} var(--duration-fast, 150ms)`,quicker:`${vS} var(--duration-base, 300ms)`,quick:`${vS} var(--duration-slow, 400ms)`,medium:`${vS} 300ms`,slow:`${vS} 500ms`,bouncy:`${vS} 200ms`,lazy:`${vS} 1000ms`,tooltip:`${vS} 400ms`}),...Ox,settings:{...Ox.settings,shouldAddPrefersColorThemes:!1},tokens:{...Ox.tokens,radius:eS,space:tS},fonts:{...Ox.fonts,body:{...Ox.fonts.body,family:Wx,size:_S(qx),lineHeight:_S(Jx),letterSpacing:_S(Yx)},heading:{...Ox.fonts.heading,family:Wx,size:_S(qx),lineHeight:_S(Jx),letterSpacing:_S(Yx)},mono:{...Ox.fonts.body,family:Gx,size:_S(qx),lineHeight:_S(Jx)},serif:{...Ox.fonts.body,family:Kx,size:_S(qx),lineHeight:_S(Jx),letterSpacing:_S(Yx)}}},bS=mu({...yS,themes:gS}),xS=new Set([`blue`,`green`,`orange`,`pink`,`purple`,`red`,`teal`,`yellow`]),SS=e=>e.split(`_`).slice(1).some(e=>xS.has(e));if(mu({...yS,themes:Object.fromEntries(Object.entries(gS).filter(([e])=>!SS(e)))}),!bS)throw Error(`@hanzo/ui: the gui config did not install`);var CS=new Set(`a.span.em.strong.b.i.u.s.small.abbr.cite.code.kbd.samp.var.sub.sup.mark.q.time.label.output.bdi.bdo.ruby.wbr`.split(`.`)),wS=[`fontSize`,`lineHeight`,`fontWeight`,`letterSpacing`,`textTransform`,`fontFamily`,`fontStyle`,`textAlign`,`color`,`textDecorationLine`,`whiteSpace`,`fontVariantNumeric`],TS={table:`table`,thead:`table-header-group`,tbody:`table-row-group`,tfoot:`table-footer-group`,tr:`table-row`,td:`table-cell`,th:`table-cell`,caption:`table-caption`,colgroup:`table-column-group`,col:`table-column`},ES=[`scrollSnapType`,`scrollSnapAlign`,`scrollSnapStop`,`WebkitBackgroundClip`,`transitionProperty`,`transitionDuration`,`transitionDelay`,`transitionTimingFunction`,`textOverflow`],DS=(0,V.forwardRef)(function({className:e,children:t,"aria-hidden":n,tag:r,...i},a){let{props:o,rest:s}=mn(e);`minHeight`in o||(o.minHeight=`auto`),`minWidth`in o||(o.minWidth=`auto`);let c={};for(let e of wS)e in o&&(c[e]=o[e],delete o[e]);for(let e of ES)e in o&&(c[e]=o[e],delete o[e]);r===`li`&&!(`display`in o)&&(c.display=`list-item`),r&&r in TS&&!(`display`in o)&&(c.display=TS[r]);let l=Object.keys(c).length?{...c,...i.style}:i.style;return(0,H.jsx)(z,{ref:r?void 0:a,asChild:r?!0:void 0,display:r&&CS.has(r)?`inline`:`block`,shrink:1,"aria-hidden":n===void 0?void 0:n!==`false`&&n!==!1,...o,...r?{}:i,className:r?void 0:s||void 0,style:r?void 0:l,children:r?(0,V.createElement)(r,{...i,ref:a,className:s||void 0,style:l},t):t})}),OS=V.createContext(`a`),kS=()=>V.useContext(OS),AS=tt,jS=wt,MS={end:{t:0,b:0,insetInlineEnd:0,height:`100%`,width:`100%`,maxW:384,borderStartStartRadius:`$5`,borderEndStartRadius:`$5`,borderStartEndRadius:0,borderEndEndRadius:0},start:{t:0,b:0,insetInlineStart:0,height:`100%`,width:`100%`,maxW:384,borderStartEndRadius:`$5`,borderEndEndRadius:`$5`,borderStartStartRadius:0,borderEndStartRadius:0},right:{t:0,b:0,r:0,height:`100%`,width:`100%`,maxW:384,btlr:`$5`,bblr:`$5`,btrr:0,bbrr:0},left:{t:0,b:0,l:0,height:`100%`,width:`100%`,maxW:384,btrr:`$5`,bbrr:`$5`,btlr:0,bblr:0},top:{t:0,l:0,r:0,width:`100%`,maxW:`100%`,maxH:`80%`,bblr:`$5`,bbrr:`$5`,btlr:0,btrr:0},bottom:{b:0,l:0,r:0,width:`100%`,maxW:`100%`,maxH:`80%`,btlr:`$5`,btrr:`$5`,bblr:0,bbrr:0}},NS=({side:e=`end`,className:t,...n})=>(0,H.jsx)(pn,{...PS(e),position:`fixed`,...MS[e],...Ot(t),...n}),PS=e=>({"data-slot":`sheet-content`,"data-side":e}),FS={xs:13,s:16,m:24,l:32,xl:40},IS=`linear-gradient(90deg, transparent 0%, var(--glass, rgba(128, 128, 128, 0.08)) 50%, transparent 100%)`;function LS({size:e,layout:t=`inline`,animated:n=!0,className:r,...i}){let{props:o,rest:s}=mn(r),c=e?FS[e]:t===`block`?`1em`:void 0;return(0,H.jsx)(z,{...B(`skeleton`),"aria-hidden":!0,"data-layout":t,"data-motion":n?`shimmer`:void 0,display:t===`inline`?`inline-flex`:`flex`,width:`100%`,...c===void 0?null:{height:c},rounded:`$xs`,bg:`$hover`,backgroundImage:n?IS:void 0,backgroundSize:`160px 100%`,backgroundRepeat:`no-repeat`,overflow:`hidden`,...o,...s?{className:s}:null,...i,children:t===`inline`&&c===void 0&&!(`height`in i)&&!(`height`in o)?(0,H.jsx)(a,{size:`$2`,"aria-hidden":!0,children:`‌`}):null})}var RS=(e,t)=>e==null?`${t}px`:typeof e==`number`?`${e}px`:e.startsWith(`$`)?`var(--space-${e.slice(1)}, ${t}px)`:e,zS=e=>typeof e==`object`&&!!e&&!Array.isArray(e),BS=e=>typeof e==`number`?`${e}px`:e,VS=e=>typeof e==`number`?`repeat(${e}, minmax(0, 1fr))`:Array.isArray(e)?e.map(BS).join(` `):e,HS=({min:e,max:t},n)=>`repeat(auto-fill, minmax(${t?`max(min(${e}px, 100%), calc((100% - ${t-1} * ${n}) / ${t}))`:`min(${e}px, 100%)`}, 1fr))`,US=(e,t=`0px`)=>zS(e)?HS(e,t):VS(e),WS={fontFamily:`inherit`,fontWeight:`inherit`,letterSpacing:`inherit`,lineHeight:`inherit`},GS=e=>(typeof e==`function`||typeof e==`object`)&&e!==null&&`staticConfig`in e,KS=e=>{if(!(0,V.isValidElement)(e)||e.type===V.Fragment||GS(e.type))return e;let t=e,n=t.props.style;return Array.isArray(n)?(0,V.cloneElement)(t,{style:[{minWidth:0},...n]}):n&&typeof n==`object`&&`minWidth`in n?t:(0,V.cloneElement)(t,{style:{minWidth:0,...n}})},qS=({columns:e={min:240},rows:t,gap:n=`$3`,style:r,children:i,...a})=>{let o=RS(n,12);return(0,H.jsx)(w,{"data-slot":`grid`,display:`grid`,gridTemplateColumns:US(e,o),...t===void 0?null:{gridTemplateRows:VS(t)},gap:o,shrink:1,minW:`auto`,minH:`auto`,style:{...WS,...r},...a,children:V.Children.map(i,KS)})},JS=e=>e===void 0?void 0:typeof e==`number`?`span ${e}`:e,YS=({col:e,row:t,style:n,...r})=>(0,H.jsx)(w,{"data-slot":`grid-cell`,...e===void 0?null:{gridColumn:JS(e)},...t===void 0?null:{gridRow:JS(t)},minW:0,shrink:1,style:{...WS,...n},...r}),XS=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],ZS=[`Su`,`Mo`,`Tu`,`We`,`Th`,`Fr`,`Sa`],QS=(e,t,n)=>new Date(e,t,n),$S=e=>`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,eC=(e,t)=>!!e&&!!t&&$S(e)===$S(t),tC=e=>QS(e.getFullYear(),e.getMonth(),e.getDate()).getTime(),nC=(e,t)=>QS(e.getFullYear(),e.getMonth(),e.getDate()+t),rC=(e,t=0)=>QS(e.getFullYear(),e.getMonth()+t,1),iC=(e,t)=>{let n=QS(e.getFullYear(),e.getMonth()+t+1,0);return QS(n.getFullYear(),n.getMonth(),Math.min(e.getDate(),n.getDate()))},aC=(e,t,n)=>{let r=(e.getDay()-t+7)%7,i=QS(e.getFullYear(),e.getMonth()+1,0).getDate();return Array.from({length:Math.ceil((r+i)/7)*7},(t,a)=>{let o=a-r+1;return n||o>=1&&o<=i?QS(e.getFullYear(),e.getMonth(),o):null})},oC=(e,t)=>{if(e.mode===`multiple`)return(e.selected??[]).some(e=>eC(e,t));if(e.mode===`range`){let{from:n,to:r}=e.selected??{};return!!n&&(r?tC(n)<=tC(t)&&tC(t)<=tC(r):eC(n,t))}return eC(e.selected,t)},sC=(e,t)=>{let{from:n,to:r}=e??{};if(!n)return{from:t,to:t};if(!r)return tC(t)<tC(n)?{from:t,to:n}:{from:n,to:t};if(!(eC(n,t)&&eC(r,t)))return eC(n,t)?{from:n,to:t}:eC(r,t)?{from:t,to:t}:tC(t)<tC(n)?{from:t,to:r}:{from:n,to:t}},cC=(e,t)=>{if(e.mode===`multiple`){let n=e.selected??[];e.onSelect?.(n.some(e=>eC(e,t))?n.filter(e=>!eC(e,t)):[...n,t])}else e.mode===`range`?e.onSelect?.(sC(e.selected,t)):e.onSelect?.(eC(e.selected,t)?void 0:t)},lC=(e,t,n)=>{let r=(t.getDay()-n+7)%7;return e===`ArrowLeft`?nC(t,-1):e===`ArrowRight`?nC(t,1):e===`ArrowUp`?nC(t,-7):e===`ArrowDown`?nC(t,7):e===`Home`?nC(t,-r):e===`End`?nC(t,6-r):e===`PageUp`?iC(t,-1):e===`PageDown`?iC(t,1):void 0};function uC(e){let{t}=R(),{month:n,defaultMonth:r,onMonthChange:i,numberOfMonths:o=1,weekStartsOn:s=0,showOutsideDays:c=!0,disabled:l,initialFocus:u,className:d}=e,[f,p]=(0,V.useState)(()=>rC(r??new Date)),m=n?rC(n):f,h=Array.from({length:o},(e,t)=>rC(m,t)),g=h.map(e=>aC(e,s,c)),_=e=>!!e&&tC(e)>=tC(m)&&tC(e)<tC(rC(m,o)),v=e=>g.some(t=>t.some(t=>eC(t,e))),b=[...ZS.slice(s),...ZS.slice(0,s)].map(e=>t(e)),x=new Date,S=e.mode===`range`?e.selected??{}:{},[C,w]=(0,V.useState)(),T=e.mode===`multiple`?e.selected??[]:e.mode===`range`?[e.selected?.from]:[e.selected],E=C&&v(C)?C:T.find(_)??(_(x)?x:m),D=(0,V.useRef)(null),O=(0,V.useRef)(!!u);(0,V.useEffect)(()=>{let e=D.current;if(!O.current||typeof HTMLElement>`u`||!(e instanceof HTMLElement))return;O.current=!1;let t=`[data-date="${$S(E)}"]`;(e.querySelector(`${t}:not([data-outside])`)??e.querySelector(t))?.focus()});let k=e=>{let t=rC(m,e);p(t),i?.(t)},ee=(e,t)=>{let n=lC(Qm(e),t,s);n&&(e.preventDefault(),O.current=!0,w(n),v(n)||k(tC(n)<tC(m)?-1:1))};return(0,H.jsx)(y,{ref:D,...B(`calendar`),flexWrap:`wrap`,gap:`$4`,p:`$3`,...Ot(d),children:h.map((n,r)=>(0,H.jsxs)(z,{...B(`calendar-month`),gap:`$4`,children:[(0,H.jsxs)(y,{...B(`calendar-caption`),items:`center`,justify:`space-between`,children:[(0,H.jsx)(z,{width:32,children:r===0&&(0,H.jsx)(W,{...B(`calendar-nav-previous`),"aria-label":t(`Previous month`),variant:`outline`,size:`icon-sm`,onClick:()=>k(-1),children:(0,H.jsx)(Dp,{...qm,size:16})})}),(0,H.jsxs)(a,{...B(`calendar-caption-label`),size:`$3`,fontWeight:`500`,children:[t(XS[n.getMonth()]),` `,n.getFullYear()]}),(0,H.jsx)(z,{width:32,items:`flex-end`,children:r===h.length-1&&(0,H.jsx)(W,{...B(`calendar-nav-next`),"aria-label":t(`Next month`),variant:`outline`,size:`icon-sm`,onClick:()=>k(1),children:(0,H.jsx)(rt,{...qm,size:16})})})]}),(0,H.jsxs)(qS,{columns:7,gap:`$1`,children:[b.map(e=>(0,H.jsx)(YS,{style:{textAlign:`center`},children:(0,H.jsx)(a,{size:`$1`,color:`$quiet`,children:e})},e)),g[r].map((t,r)=>{if(!t)return(0,H.jsx)(YS,{},r);let i=t.getMonth()!==n.getMonth(),a=oC(e,t),o=eC(S.from,t),s=eC(S.to,t),c=a&&e.mode===`range`&&!o&&!s,u=eC(t,x);return(0,H.jsx)(YS,{children:(0,H.jsx)(W,{...B(`calendar-day`),"data-date":$S(t),"data-today":u||void 0,"data-outside":i||void 0,"data-selected":a||void 0,"data-range-start":o||void 0,"data-range-end":s||void 0,"data-range-middle":c||void 0,"aria-selected":a,"aria-label":t.toDateString(),variant:a&&!c?`primary`:c||u?`secondary`:`ghost`,size:`icon`,width:`100%`,opacity:i?.5:1,disabled:!!l?.(t),tabIndex:eC(t,E)&&(!i||!_(E))?0:-1,onFocus:()=>w(t),onKeyDown:e=>ee(e,t),onClick:()=>cC(e,t),children:t.getDate()})},r)})]})]},r))})}var dC=[],fC=[];(()=>{let e=`lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2,1p,,,8,c,8,2q,,,a,b,7,21,2,r,,,,,,4,2,1d,k,,2,5,b,,10,9,,2u,b,,6,n,4,4,3,g,4,d,,,3,6,,f,,jj,3,qa,4,s,3,t,2,u,2,1s,w,9,,19,3,,,39,2,y,,3a,c,4,c,63,5,1l,a,,,,,2,o,2,,1c,1a,2,c,k,5,1b,h,12,9,c,3,u,d,1k,e,1c,k,48,3,,l,4,,6,,2,3,5i,1s,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,n,5,4,,2b,2,1e,i,q,i,d,,12,8,p,d,18,4,1b,e,10,,1v,e,c,,8,2,1a,,1f,,,3,2,2,5,2,,,15,5,5,2,6k,8,,2,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,1t,5,8t,2,25,6,1y,b,1d,4,3e,3,1h,f,15,,2,2,a,4,19,b,7,,1p,3,10,e,g,2,18,,c,3,1c,e,8,4,,2,2k,c,6,,2,,4d,c,l,4,1j,2,,7,2,2,2,3,9,,a,2,2,7,3,5,1v,9,,,2,,,4,,5,,,e,2,2a,i,n,,29,k,6j,7,2,9,r,2,2a,h,2y,d,2t,3,2,a,74,f,6t,6,,2,2,4,,,,2,3x,7,2,7,3,,s,a,14,7,,4,8,,9,b,1a,g,5i,8,5j,8,,8,2a,m,,e,3e,6,3,,,2,,7,,,1u,5,,2,,5,9n,4,9,2,,,1c,7,3,5,n,,44l,,6,f,8ug,i,1xc,5,1n,7,t4,,,1j,7,4,29,,b,2,f57,2,3mp,1a,2,n,f2,5,3,6,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5`.split(`,`).map(e=>e?parseInt(e,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?fC:dC).push(n+=e[t])})();function pC(e){if(e<768)return!1;for(let t=0,n=dC.length;;){let r=t+n>>1;if(e<dC[r])n=r;else if(e>=fC[r])t=r+1;else return!0;if(t==n)return!1}}function mC(e){return e>=127462&&e<=127487}var hC=8205;function gC(e,t,n=!0,r=!0){return(n?_C:vC)(e,t,r)}function _C(e,t,n){if(t==e.length)return t;t&&bC(e.charCodeAt(t))&&xC(e.charCodeAt(t-1))&&t--;let r=yC(e,t);for(t+=SC(r);t<e.length;){let i=yC(e,t);if(r==hC||i==hC||n&&pC(i))t+=SC(i),r=i;else if(mC(i)){let n=0,r=t-2;for(;r>=0&&mC(yC(e,r));)n++,r-=2;if(n%2==0)break;t+=2}else break}return t}function vC(e,t,n){for(;t>1;){let r=_C(e,t-2,n);if(r<t)return r;t--}return 0}function yC(e,t){let n=e.charCodeAt(t);if(!xC(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return bC(r)?(n-55296<<10)+(r-56320)+65536:n}function bC(e){return e>=56320&&e<57344}function xC(e){return e>=55296&&e<56320}function SC(e){return e<65536?1:2}var CC=class e{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=NC(this,e,t);let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),TC.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=NC(this,e,t);let n=[];return this.decompose(e,t,n,0),TC.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new kC(this),i=new kC(e);for(let e=t,a=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(a+=r.value.length,r.done||a>=n)return!0}}iter(e=1){return new kC(this,e)}iterRange(e,t=this.length){return new AC(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{t??=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new jC(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(t){if(t.length==0)throw RangeError(`A document must have at least one line`);return t.length==1&&!t[0]?e.empty:t.length<=32?new wC(t):TC.from(wC.split(t,[]))}},wC=class e extends CC{constructor(e,t=EC(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.text[i],o=r+a.length;if((t?n:o)>=e)return new MC(r,o,n,a);r=o+1,n++}}decompose(t,n,r,i){let a=t<=0&&n>=this.length?this:new e(OC(this.text,t,n),Math.min(n,this.length)-Math.max(0,t));if(i&1){let t=r.pop(),n=DC(a.text,t.text.slice(),0,a.length);if(n.length<=32)r.push(new e(n,t.length+a.length));else{let t=n.length>>1;r.push(new e(n.slice(0,t)),new e(n.slice(t)))}}else r.push(a)}replace(t,n,r){if(!(r instanceof e))return super.replace(t,n,r);[t,n]=NC(this,t,n);let i=DC(this.text,DC(r.text,OC(this.text,0,t)),n),a=this.length+r.length-(n-t);return i.length<=32?new e(i,a):TC.from(e.split(i,[]),a)}sliceString(e,t=this.length,n=`
23
- `){[e,t]=NC(this,e,t);let r=``;for(let i=0,a=0;i<=t&&a<this.text.length;a++){let o=this.text[a],s=i+o.length;i>e&&a&&(r+=n),e<s&&t>i&&(r+=o.slice(Math.max(0,e-i),t-i)),i=s+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(t,n){let r=[],i=-1;for(let a of t)r.push(a),i+=a.length+1,r.length==32&&(n.push(new e(r,i)),r=[],i=-1);return i>-1&&n.push(new e(r,i)),n}},TC=class e extends CC{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let a=this.children[i],o=r+a.length,s=n+a.lines-1;if((t?s:o)>=e)return a.lineInner(e,t,n,r);r=o+1,n=s+1}}decompose(e,t,n,r){for(let i=0,a=0;a<=t&&i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(e<=s&&t>=a){let i=r&(a<=e|(s>=t?2:0));a>=e&&s<=t&&!i?n.push(o):o.decompose(e-a,t-a,n,i)}a=s+1}}replace(t,n,r){if([t,n]=NC(this,t,n),r.lines<this.lines)for(let i=0,a=0;i<this.children.length;i++){let o=this.children[i],s=a+o.length;if(t>=a&&n<=s){let c=o.replace(t-a,n-a,r),l=this.lines-o.lines+c.lines;if(c.lines<l>>4&&c.lines>l>>6){let a=this.children.slice();return a[i]=c,new e(a,this.length-(n-t)+r.length)}return super.replace(a,s,c)}a=s+1}return super.replace(t,n,r)}sliceString(e,t=this.length,n=`
24
- `){[e,t]=NC(this,e,t);let r=``;for(let i=0,a=0;i<this.children.length&&a<=t;i++){let o=this.children[i],s=a+o.length;a>e&&i&&(r+=n),e<s&&t>a&&(r+=o.sliceString(e-a,t-a,n)),a=s+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(t,n){if(!(t instanceof e))return 0;let r=0,[i,a,o,s]=n>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=n,a+=n){if(i==o||a==s)return r;let e=this.children[i],c=t.children[a];if(e!=c)return r+e.scanIdentical(c,n);r+=e.length+1}}static from(t,n=t.reduce((e,t)=>e+t.length+1,-1)){let r=0;for(let e of t)r+=e.lines;if(r<32){let e=[];for(let n of t)n.flatten(e);return new wC(e,n)}let i=Math.max(32,r>>5),a=i<<1,o=i>>1,s=[],c=0,l=-1,u=[];function d(t){let n;if(t.lines>a&&t instanceof e)for(let e of t.children)d(e);else t.lines>o&&(c>o||!c)?(f(),s.push(t)):t instanceof wC&&c&&(n=u[u.length-1])instanceof wC&&t.lines+n.lines<=32?(c+=t.lines,l+=t.length+1,u[u.length-1]=new wC(n.text.concat(t.text),n.length+1+t.length)):(c+t.lines>i&&f(),c+=t.lines,l+=t.length+1,u.push(t))}function f(){c!=0&&(s.push(u.length==1?u[0]:e.from(u,l)),l=-1,c=u.length=0)}for(let e of t)d(e);return f(),s.length==1?s[0]:new e(s,n)}};CC.empty=new wC([``],0);function EC(e){let t=-1;for(let n of e)t+=n.length+1;return t}function DC(e,t,n=0,r=1e9){for(let i=0,a=0,o=!0;a<e.length&&i<=r;a++){let s=e[a],c=i+s.length;c>=n&&(c>r&&(s=s.slice(0,r-i)),i<n&&(s=s.slice(n-i)),o?(t[t.length-1]+=s,o=!1):t.push(s)),i=c+1}return t}function OC(e,t,n){return DC(e,[``],t,n)}var kC=class{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value=``,this.nodes=[e],this.offsets=[t>0?1:(e instanceof wC?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],a=i>>1,o=r instanceof wC?r.text.length:r.children.length;if(a==(t>0?o:0)){if(n==0)return this.done=!0,this.value=``,this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((i&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
25
- `,this;e--}else if(r instanceof wC){let i=r.text[a+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=e==0?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[a+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof wC?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}},AC=class{constructor(e,t,n){this.value=``,this.done=!1,this.cursor=new kC(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value=``,this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=``}},jC=class{constructor(e){this.inner=e,this.afterBreak=!0,this.value=``,this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t&&this.afterBreak?(this.value=``,this.afterBreak=!1):t?(this.done=!0,this.value=``):n?this.afterBreak?this.value=``:(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}};typeof Symbol<`u`&&(CC.prototype[Symbol.iterator]=function(){return this.iter()},kC.prototype[Symbol.iterator]=AC.prototype[Symbol.iterator]=jC.prototype[Symbol.iterator]=function(){return this});var MC=class{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}};function NC(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function PC(e,t,n=!0,r=!0){return gC(e,t,n,r)}function FC(e){return e>=56320&&e<57344}function IC(e){return e>=55296&&e<56320}function LC(e,t){let n=e.charCodeAt(t);if(!IC(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return FC(r)?(n-55296<<10)+(r-56320)+65536:n}function RC(e){return e<65536?1:2}var zC=/\r\n?|\n/,BC=(function(e){return e[e.Simple=0]=`Simple`,e[e.TrackDel=1]=`TrackDel`,e[e.TrackBefore=2]=`TrackBefore`,e[e.TrackAfter=3]=`TrackAfter`,e})(BC||={}),VC=class e{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let i=this.sections[t++],a=this.sections[t++];a<0?(e(n,r,i),r+=i):r+=a,n+=i}}iterChangedRanges(e,t=!1){GC(this,e,t)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new e(t)}composeDesc(e){return this.empty?e:e.empty?this:qC(this,e)}mapDesc(e,t=!1){return e.empty?this:KC(this,e,t)}mapPos(e,t=-1,n=BC.Simple){let r=0,i=0;for(let a=0;a<this.sections.length;){let o=this.sections[a++],s=this.sections[a++],c=r+o;if(s<0){if(c>e)return i+(e-r);i+=o}else{if(n!=BC.Simple&&c>=e&&(n==BC.TrackDel&&r<e&&c>e||n==BC.TrackBefore&&r<e||n==BC.TrackAfter&&c>e))return null;if(c>e||c==e&&t<0&&!o)return e==r||t<0?i:i+s;i+=s}r=c}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let i=this.sections[n++],a=this.sections[n++],o=r+i;if(a>=0&&r<=t&&o>=e)return r<e&&o>t?`cover`:!0;r=o}return!1}toString(){let e=``;for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?` `:``)+n+(r>=0?`:`+r:``)}return e}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some(e=>typeof e!=`number`))throw RangeError(`Invalid JSON representation of ChangeDesc`);return new e(t)}static create(t){return new e(t)}},HC=class e extends VC{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError(`Applying change set to a document with the wrong length`);return GC(this,(t,n,r,i,a)=>e=e.replace(r,r+(n-t),a),!1),e}mapDesc(e,t=!1){return KC(this,e,t,!0)}invert(t){let n=this.sections.slice(),r=[];for(let e=0,i=0;e<n.length;e+=2){let a=n[e],o=n[e+1];if(o>=0){n[e]=o,n[e+1]=a;let s=e>>1;for(;r.length<s;)r.push(CC.empty);r.push(a?t.slice(i,i+a):CC.empty)}i+=a}return new e(n,r)}compose(e){return this.empty?e:e.empty?this:qC(this,e,!0)}map(e,t=!1){return e.empty?this:KC(this,e,t,!0)}iterChanges(e,t=!1){GC(this,e,t)}get desc(){return VC.create(this.sections)}filter(t){let n=[],r=[],i=[],a=new JC(this);done:for(let e=0,o=0;;){let s=e==t.length?1e9:t[e++];for(;o<s||o==s&&a.len==0;){if(a.done)break done;let e=Math.min(a.len,s-o);UC(i,e,-1);let t=a.ins==-1?-1:a.off==0?a.ins:0;UC(n,e,t),t>0&&WC(r,n,a.text),a.forward(e),o+=e}let c=t[e++];for(;o<c;){if(a.done)break done;let e=Math.min(a.len,c-o);UC(n,e,-1),UC(i,e,a.ins==-1?-1:a.off==0?a.ins:0),a.forward(e),o+=e}}return{changes:new e(n,r),filtered:VC.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];r<0?e.push(n):r==0?e.push([n]):e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(t,n,r){let i=[],a=[],o=0,s=null;function c(t=!1){if(!t&&!i.length)return;o<n&&UC(i,n-o,-1);let r=new e(i,a);s=s?s.compose(r.map(s)):r,i=[],a=[],o=0}function l(t){if(Array.isArray(t))for(let e of t)l(e);else if(t instanceof e){if(t.length!=n)throw RangeError(`Mismatched change set length (got ${t.length}, expected ${n})`);c(),s=s?s.compose(t.map(s)):t}else{let{from:e,to:s=e,insert:l}=t;if(e>s||e<0||s>n)throw RangeError(`Invalid change range ${e} to ${s} (in doc of length ${n})`);let u=l?typeof l==`string`?CC.of(l.split(r||zC)):l:CC.empty,d=u.length;if(e==s&&d==0)return;e<o&&c(),e>o&&UC(i,e-o,-1),UC(i,s-e,d),WC(a,i,u),o=s}}return l(t),c(!s),s}static empty(t){return new e(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw RangeError(`Invalid JSON representation of ChangeSet`);let n=[],r=[];for(let e=0;e<t.length;e++){let i=t[e];if(typeof i==`number`)n.push(i,-1);else if(!Array.isArray(i)||typeof i[0]!=`number`||i.some((e,t)=>t&&typeof e!=`string`))throw RangeError(`Invalid JSON representation of ChangeSet`);else if(i.length==1)n.push(i[0],0);else{for(;r.length<e;)r.push(CC.empty);r[e]=CC.of(i.slice(1)),n.push(i[0],r[e].length)}}return new e(n,r)}static createSet(t,n){return new e(t,n)}};function UC(e,t,n,r=!1){if(t==0&&n<=0)return;let i=e.length-2;i>=0&&n<=0&&n==e[i+1]?e[i]+=t:i>=0&&t==0&&e[i]==0?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function WC(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{for(;e.length<r;)e.push(CC.empty);e.push(n)}}function GC(e,t,n){let r=e.inserted;for(let i=0,a=0,o=0;o<e.sections.length;){let s=e.sections[o++],c=e.sections[o++];if(c<0)i+=s,a+=s;else{let l=i,u=a,d=CC.empty;for(;l+=s,u+=c,c&&r&&(d=d.append(r[o-2>>1])),!(n||o==e.sections.length||e.sections[o+1]<0);)s=e.sections[o++],c=e.sections[o++];t(i,l,a,u,d),i=l,a=u}}}function KC(e,t,n,r=!1){let i=[],a=r?[]:null,o=new JC(e),s=new JC(t);for(let e=-1;;)if(o.done&&s.len||s.done&&o.len)throw Error(`Mismatched change set lengths`);else if(o.ins==-1&&s.ins==-1){let e=Math.min(o.len,s.len);UC(i,e,-1),o.forward(e),s.forward(e)}else if(s.ins>=0&&(o.ins<0||e==o.i||o.off==0&&(s.len<o.len||s.len==o.len&&!n))){let t=s.len;for(UC(i,s.ins,-1);t;){let n=Math.min(o.len,t);o.ins>=0&&e<o.i&&o.len<=n&&(UC(i,0,o.ins),a&&WC(a,i,o.text),e=o.i),o.forward(n),t-=n}s.next()}else if(o.ins>=0){let t=0,n=o.len;for(;n;)if(s.ins==-1){let e=Math.min(n,s.len);t+=e,n-=e,s.forward(e)}else if(s.ins==0&&s.len<n)n-=s.len,s.next();else break;UC(i,t,e<o.i?o.ins:0),a&&e<o.i&&WC(a,i,o.text),e=o.i,o.forward(o.len-n)}else if(o.done&&s.done)return a?HC.createSet(i,a):VC.create(i);else throw Error(`Mismatched change set lengths`)}function qC(e,t,n=!1){let r=[],i=n?[]:null,a=new JC(e),o=new JC(t);for(let e=!1;;)if(a.done&&o.done)return i?HC.createSet(r,i):VC.create(r);else if(a.ins==0)UC(r,a.len,0,e),a.next();else if(o.len==0&&!o.done)UC(r,0,o.ins,e),i&&WC(i,r,o.text),o.next();else if(a.done||o.done)throw Error(`Mismatched change set lengths`);else{let t=Math.min(a.len2,o.len),n=r.length;if(a.ins==-1){let n=o.ins==-1?-1:o.off?0:o.ins;UC(r,t,n,e),i&&n&&WC(i,r,o.text)}else o.ins==-1?(UC(r,a.off?0:a.len,t,e),i&&WC(i,r,a.textBit(t))):(UC(r,a.off?0:a.len,o.off?0:o.ins,e),i&&!o.off&&WC(i,r,o.text));e=(a.ins>t||o.ins>=0&&o.len>t)&&(e||r.length>n),a.forward2(t),o.forward(t)}}var JC=class{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?CC.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?CC.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}},YC=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(t,n=-1){let r,i;return this.empty?r=i=t.mapPos(this.from,n):(r=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new e(r,i,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return K.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return K.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!=`number`||typeof e.head!=`number`)throw RangeError(`Invalid JSON representation for SelectionRange`);return K.range(e.anchor,e.head)}static create(t,n,r,i){return new e(t,n,r,i)}},K=class e{constructor(e,t){this.ranges=e,this.mainIndex=t}map(t,n=-1){return t.empty?this:e.create(this.ranges.map(e=>e.map(t,n)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new e([this.main],0)}addRange(t,n=!0){return e.create([t].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(t,n=this.mainIndex){let r=this.ranges.slice();return r[n]=t,e.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!=`number`||t.main>=t.ranges.length)throw RangeError(`Invalid JSON representation for EditorSelection`);return new e(t.ranges.map(e=>YC.fromJSON(e)),t.main)}static single(t,n=t){return new e([e.range(t,n)],0)}static create(t,n=0){if(t.length==0)throw RangeError(`A selection needs at least one range`);for(let r=0,i=0;i<t.length;i++){let a=t[i];if(a.empty?a.from<=r:a.from<r)return e.normalized(t.slice(),n);r=a.to}return new e(t,n)}static cursor(e,t=0,n,r){return YC.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,i){let a=r==null?7:Math.min(6,r);return!i&&e!=t&&(i=t<e?1:-1),i&&(a|=i<0?8:16),t<e?YC.create(t,e,a|32,n):YC.create(e,t,a,n)}static undirectionalRange(e,t){return YC.create(e,t,64,void 0)}static normalized(t,n=0){let r=t[n];t.sort((e,t)=>e.from-t.from),n=t.indexOf(r);for(let r=1;r<t.length;r++){let i=t[r],a=t[r-1];if(i.empty?i.from<=a.to:i.from<a.to){let o=a.from,s=Math.max(i.to,a.to);r<=n&&n--,t.splice(--r,2,i.anchor>i.head?e.range(s,o):e.range(o,s))}}return new e(t,n)}};function XC(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError(`Selection points outside of document`)}var ZC=0,QC=class e{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=ZC++,this.default=e([]),this.extensions=typeof i==`function`?i(this):i}get reader(){return this}static define(t={}){return new e(t.combine||(e=>e),t.compareInput||((e,t)=>e===t),t.compare||(t.combine?(e,t)=>e===t:$C),!!t.static,t.enables)}of(e){return new ew([],this,0,e)}compute(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ew(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error(`Can't compute a static facet`);return new ew(e,this,2,t)}from(e,t){return t||=e=>e,this.compute([e],n=>t(n.field(e)))}};function $C(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}var ew=class{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=ZC++}dynamicSlot(e){let t=this.value,n=this.facet.compareInput,r=this.id,i=e[r]>>1,a=this.type==2,o=!1,s=!1,c=[];for(let t of this.dependencies)t==`doc`?o=!0:t==`selection`?s=!0:(e[t.id]??1)&1||c.push(e[t.id]);return{create(e){return e.values[i]=t(e),1},update(e,r){if(o&&r.docChanged||s&&(r.docChanged||r.selection)||nw(e,c)){let r=t(e);if(a?!tw(r,e.values[i],n):!n(r,e.values[i]))return e.values[i]=r,1}return 0},reconfigure:(e,o)=>{let s,c=o.config.address[r];if(c!=null){let r=hw(o,c);if(this.dependencies.every(t=>t instanceof QC?o.facet(t)===e.facet(t):t instanceof aw?o.field(t,!1)==e.field(t,!1):!0)||(a?tw(s=t(e),r,n):n(s=t(e),r)))return e.values[i]=r,0}else s=t(e);return e.values[i]=s,1}}}get extension(){return this}};function tw(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function nw(e,t){let n=!1;for(let r of t)mw(e,r)&1&&(n=!0);return n}function rw(e,t,n){let r=n.map(t=>e[t.id]),i=n.map(e=>e.type),a=r.filter(e=>!(e&1)),o=e[t.id]>>1;function s(e){let n=[];for(let t=0;t<r.length;t++){let a=hw(e,r[t]);if(i[t]==2)for(let e of a)n.push(e);else n.push(a)}return t.combine(n)}return{create(e){for(let t of r)mw(e,t);return e.values[o]=s(e),1},update(e,n){if(!nw(e,a))return 0;let r=s(e);return t.compare(r,e.values[o])?0:(e.values[o]=r,1)},reconfigure(e,i){let a=nw(e,r),c=i.config.facets[t.id],l=i.facet(t);if(c&&!a&&$C(n,c))return e.values[o]=l,0;let u=s(e);return t.compare(u,l)?(e.values[o]=l,0):(e.values[o]=u,1)}}}var iw=QC.define({static:!0}),aw=class e{constructor(e,t,n,r,i){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let n=new e(ZC++,t.create,t.update,t.compare||((e,t)=>e===t),t);return t.provide&&(n.provides=t.provide(n)),n}create(e){return(e.facet(iw).find(e=>e.field==this)?.create||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>{let r=e.facet(iw),i=n.facet(iw),a;return(a=r.find(e=>e.field==this))&&a!=i.find(e=>e.field==this)?(e.values[t]=a.create(e),1):n.config.address[this.id]==null?(e.values[t]=this.create(e),1):(e.values[t]=n.field(this),0)}}}init(e){return[this,iw.of({field:this,create:e})]}get extension(){return this}},ow={lowest:4,low:3,default:2,high:1,highest:0};function sw(e){return t=>new lw(t,e)}var cw={highest:sw(ow.highest),high:sw(ow.high),default:sw(ow.default),low:sw(ow.low),lowest:sw(ow.lowest)},lw=class{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}},uw=class e{of(e){return new dw(this,e)}reconfigure(t){return e.reconfigure.of({compartment:this,extension:t})}get(e){return e.config.compartments.get(this)}},dw=class{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}},fw=class e{constructor(e,t,n,r,i,a){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(t,n,r){let i=[],a=Object.create(null),o=new Map;for(let e of pw(t,n,o))e instanceof aw?i.push(e):(a[e.facet.id]||(a[e.facet.id]=[])).push(e);let s=Object.create(null),c=[],l=[];for(let e of i)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let u=r?.config.facets;for(let e in a){let t=a[e],n=t[0].facet,i=u&&u[e]||[];if(t.every(e=>e.type==0)){if(s[n.id]=c.length<<1|1,$C(i,t))c.push(r.facet(n));else{let e=n.combine(t.map(e=>e.value));c.push(r&&n.compare(e,r.facet(n))?r.facet(n):e)}}else{for(let e of t)e.type==0?(s[e.id]=c.length<<1|1,c.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[n.id]=l.length<<1,l.push(e=>rw(e,n,t))}}let d=l.map(e=>e(s));return new e(t,o,d,s,c,a)}};function pw(e,t,n){let r=[[],[],[],[],[]],i=new Map;function a(e,o){let s=i.get(e);if(s!=null){if(s<=o)return;let t=r[s].indexOf(e);t>-1&&r[s].splice(t,1),e instanceof dw&&n.delete(e.compartment)}if(i.set(e,o),Array.isArray(e))for(let t of e)a(t,o);else if(e instanceof dw){if(n.has(e.compartment))throw RangeError(`Duplicate use of compartment in extensions`);let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),a(r,o)}else if(e instanceof lw)a(e.inner,e.prec);else if(e instanceof aw)r[o].push(e),e.provides&&a(e.provides,o);else if(e instanceof ew)r[o].push(e),e.facet.extensions&&a(e.facet.extensions,ow.default);else{let t=e.extension;if(!t)throw Error(`Unrecognized extension value in extension set (${e}).`);if(t==e)throw Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);a(t,o)}}return a(e,ow.default),r.reduce((e,t)=>e.concat(t))}function mw(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error(`Cyclic dependency between fields and/or facets`);if(r&2)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function hw(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var gw=QC.define(),_w=QC.define({combine:e=>e.some(e=>e),static:!0}),vw=QC.define({combine:e=>e.length?e[0]:void 0,static:!0}),yw=QC.define(),bw=QC.define(),xw=QC.define(),Sw=QC.define({combine:e=>e.length?e[0]:!1}),Cw=class{constructor(e,t){this.type=e,this.value=t}static define(){return new ww}},ww=class{of(e){return new Cw(this,e)}},Tw=class{constructor(e){this.map=e}of(e){return new Ew(this,e)}},Ew=class e{constructor(e,t){this.type=e,this.value=t}map(t){let n=this.type.map(this.value,t);return n===void 0?void 0:n==this.value?this:new e(this.type,n)}is(e){return this.type==e}static define(e={}){return new Tw(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}};Ew.reconfigure=Ew.define(),Ew.appendConfig=Ew.define();var Dw=class e{constructor(t,n,r,i,a,o){this.startState=t,this.changes=n,this.selection=r,this.effects=i,this.annotations=a,this.scrollIntoView=o,this._doc=null,this._state=null,r&&XC(r,n.newLength),a.some(t=>t.type==e.time)||(this.annotations=a.concat(e.time.of(Date.now())))}static create(t,n,r,i,a,o){return new e(t,n,r,i,a,o)}get newDoc(){return this._doc||=this.changes.apply(this.startState.doc)}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let n=this.annotation(e.userEvent);return!!(n&&(n==t||n.length>t.length&&n.slice(0,t.length)==t&&n[t.length]==`.`))}};Dw.time=Cw.define(),Dw.userEvent=Cw.define(),Dw.addToHistory=Cw.define(),Dw.remote=Cw.define();function Ow(e,t){let n=[];for(let r=0,i=0;;){let a,o;if(r<e.length&&(i==t.length||t[i]>=e[r]))a=e[r++],o=e[r++];else if(i<t.length)a=t[i++],o=t[i++];else return n;!n.length||n[n.length-1]<a?n.push(a,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function kw(e,t,n){let r,i,a;return n?(r=t.changes,i=HC.empty(t.changes.length),a=e.changes.compose(t.changes)):(r=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),a=e.changes.compose(r)),{changes:a,selection:t.selection?t.selection.map(i):e.selection?.map(r),effects:Ew.mapEffects(e.effects,r).concat(Ew.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function Aw(e,t,n){let r=t.selection,i=Fw(t.annotations);return t.userEvent&&(i=i.concat(Dw.userEvent.of(t.userEvent))),{changes:t.changes instanceof HC?t.changes:HC.of(t.changes||[],n,e.facet(vw)),selection:r&&(r instanceof K?r:K.single(r.anchor,r.head)),effects:Fw(t.effects),annotations:i,scrollIntoView:!!t.scrollIntoView}}function jw(e,t,n){let r=Aw(e,t.length?t[0]:{},e.doc.length);t.length&&t[0].filter===!1&&(n=!1);for(let i=1;i<t.length;i++){t[i].filter===!1&&(n=!1);let a=!!t[i].sequential;r=kw(r,Aw(e,t[i],a?r.changes.newLength:e.doc.length),a)}let i=Dw.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Nw(n?Mw(i):i)}function Mw(e){let t=e.startState,n=!0;for(let r of t.facet(yw)){let t=r(e);if(t===!1){n=!1;break}Array.isArray(t)&&(n=n===!0?t:Ow(n,t))}if(n!==!0){let r,i;if(n===!1)i=e.changes.invertedDesc,r=HC.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Dw.create(t,r,e.selection&&e.selection.map(i),Ew.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(bw);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Dw?i:Array.isArray(i)&&i.length==1&&i[0]instanceof Dw?i[0]:jw(t,Fw(i),!1)}return e}function Nw(e){let t=e.startState,n=t.facet(xw),r=e;for(let i=n.length-1;i>=0;i--){let a=n[i](e);a&&Object.keys(a).length&&(r=kw(r,Aw(t,a,e.changes.newLength),!0))}return r==e?e:Dw.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var Pw=[];function Fw(e){return e==null?Pw:Array.isArray(e)?e:[e]}var Iw=(function(e){return e[e.Word=0]=`Word`,e[e.Space=1]=`Space`,e[e.Other=2]=`Other`,e})(Iw||={}),Lw=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Rw;try{Rw=RegExp(`[\\p{Alphabetic}\\p{Number}_]`,`u`)}catch{}function zw(e){if(Rw)return Rw.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>`€`&&(n.toUpperCase()!=n.toLowerCase()||Lw.test(n)))return!0}return!1}function Bw(e){return t=>{if(!/\S/.test(t))return Iw.Space;if(zw(t))return Iw.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Iw.Word;return Iw.Other}}var Vw=class e{constructor(e,t,n,r,i,a){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,a&&(a._state=this);for(let e=0;e<this.config.dynamicSlots.length;e++)mw(this,e<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError(`Field is not present in this state`);return}return mw(this,n),hw(this,n)}update(...e){return jw(this,e,!0)}applyTransaction(t){let n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(uw.reconfigure)?(n&&=(i=new Map,n.compartments.forEach((e,t)=>i.set(t,e)),null),i.set(e.value.compartment,e.value.extension)):e.is(Ew.reconfigure)?(n=null,r=e.value):e.is(Ew.appendConfig)&&(n=null,r=Fw(r).concat(e.value));let a;n?a=t.startState.values.slice():(n=fw.resolve(r,i,this),a=new e(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values);let o=t.startState.facet(_w)?t.newSelection:t.newSelection.asSingle();new e(n,t.newDoc,o,a,(e,n)=>n.update(e,t),t)}replaceSelection(e){return typeof e==`string`&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:K.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],a=Fw(n.effects);for(let n=1;n<t.ranges.length;n++){let o=e(t.ranges[n]),s=this.changes(o.changes),c=s.map(r);for(let e=0;e<n;e++)i[e]=i[e].map(c);let l=r.mapDesc(s,!0);i.push(o.range.map(l)),r=r.compose(c),a=Ew.mapEffects(a,c).concat(Ew.mapEffects(Fw(o.effects),l))}return{changes:r,selection:K.create(i,t.mainIndex),effects:a}}changes(t=[]){return t instanceof HC?t:HC.of(t,this.doc.length,this.facet(e.lineSeparator))}toText(t){return CC.of(t.split(this.facet(e.lineSeparator)||zC))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(mw(this,t),hw(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];r instanceof aw&&this.config.address[r.id]!=null&&(t[n]=r.spec.toJSON(this.field(e[n]),this))}return t}static fromJSON(t,n={},r){if(!t||typeof t.doc!=`string`)throw RangeError(`Invalid JSON representation for EditorState`);let i=[];if(r){for(let e in r)if(Object.prototype.hasOwnProperty.call(t,e)){let n=r[e],a=t[e];i.push(n.init(e=>n.spec.fromJSON(a,e)))}}return e.create({doc:t.doc,selection:K.fromJSON(t.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(t={}){let n=fw.resolve(t.extensions||[],new Map),r=t.doc instanceof CC?t.doc:CC.of((t.doc||``).split(n.staticFacet(e.lineSeparator)||zC)),i=t.selection?t.selection instanceof K?t.selection:K.single(t.selection.anchor,t.selection.head):K.single(0);return XC(i,r.length),n.staticFacet(_w)||(i=i.asSingle()),new e(n,r,i,n.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(e.tabSize)}get lineBreak(){return this.facet(e.lineSeparator)||`
26
- `}get readOnly(){return this.facet(Sw)}phrase(t,...n){for(let n of this.facet(e.phrases))if(Object.prototype.hasOwnProperty.call(n,t)){t=n[t];break}return n.length&&(t=t.replace(/\$(\$|\d*)/g,(e,t)=>{if(t==`$`)return`$`;let r=+(t||1);return!r||r>n.length?e:n[r-1]})),t}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(gw))for(let a of i(this,t,n))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let t=this.languageDataAt(`wordChars`,e);return Bw(t.length?t[0]:``)}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),a=e-n,o=e-n;for(;a>0;){let e=PC(t,a,!1);if(i(t.slice(e,a))!=Iw.Word)break;a=e}for(;o<r;){let e=PC(t,o);if(i(t.slice(o,e))!=Iw.Word)break;o=e}return a==o?null:K.range(a+n,o+n)}};Vw.allowMultipleSelections=_w,Vw.tabSize=QC.define({combine:e=>e.length?e[0]:4}),Vw.lineSeparator=vw,Vw.readOnly=Sw,Vw.phrases=QC.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),Vw.languageData=gw,Vw.changeFilter=yw,Vw.transactionFilter=bw,Vw.transactionExtender=xw,uw.reconfigure=Ew.define();function Hw(e,t,n={}){let r={};for(let t of e)for(let e of Object.keys(t)){let i=t[e],a=r[e];if(a===void 0)r[e]=i;else if(a!==i&&i!==void 0){if(Object.hasOwnProperty.call(n,e))r[e]=n[e](a,i);else throw Error(`Config merge conflict for field `+e)}}for(let e in t)r[e]===void 0&&(r[e]=t[e]);return r}var Uw=class{eq(e){return this==e}range(e,t=e){return Gw.create(e,t,this)}};Uw.prototype.startSide=Uw.prototype.endSide=0,Uw.prototype.point=!1,Uw.prototype.mapMode=BC.TrackDel;function Ww(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}var Gw=class e{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(t,n,r){return new e(t,n,r)}};function Kw(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}var qw=class e{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return Yw(this.to)}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let a=r,o=i.length;;){if(a==o)return a;let r=a+o>>1,s=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==a)return s>=0?a:o;s>=0?o=r:a=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),a=this.findIndex(n,1e9,!1,i);i<a;i++)if(r(this.from[i]+e,this.to[i]+e,this.value[i])===!1)return!1}map(t,n,r,i,a){let o=[],s=[],c=[],l=-1,u=-1;iter:for(let e=0;e<this.value.length;e++){let d=this.value[e],f=this.from[e]+t,p=this.to[e]+t,m,h;if(f==p){let e=n.mapPos(f,d.startSide,d.mapMode);if(e==null||(m=h=e,d.startSide!=d.endSide&&(h=n.mapPos(f,d.endSide),h<m)))continue}else if(m=n.mapPos(f,d.startSide),h=n.mapPos(p,d.endSide),m>h||m==h&&d.startSide>0&&d.endSide<=0)continue;if(!((h-m||d.endSide-d.startSide)<0)){if(l<0&&(l=m),d.point&&(u=Math.max(u,h-m)),(m-r||d.startSide-i)>=0)o.push(d),s.push(m-l),c.push(h-l),r=h,i=d.endSide;else{if(m==h)for(let e=o.length;e>0;e--){if((m-(c[e-1]+l)||d.startSide-o[e-1].endSide)>=0){o.splice(e,0,d),s.splice(e,0,m-l),c.splice(e,0,h-l);continue iter}if((m-(s[e-1]+l)||d.endSide-o[e-1].startSide)>0)break}a(m,h,d)}}}return{mapped:o.length?new e(s,c,o,u):null,pos:l}}},Jw=class e{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(t,n,r,i){return new e(t,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(t){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:a=this.length}=t,o=t.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(Kw)),this.isEmpty)return n.length?e.of(n):this;let s=new $w(this,null,-1).goto(0),c=0,l=[],u=new Zw;for(;s.value||c<n.length;)if(c<n.length&&(s.from-n[c].from||s.startSide-n[c].value.startSide)>=0){let e=n[c++];u.addInner(e.from,e.to,e.value,!1)||l.push(e)}else s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(s.chunkIndex)<n[c].from)&&(!o||i>this.chunkEnd(s.chunkIndex)||a<this.chunkPos[s.chunkIndex])&&u.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||i>s.to||a<s.from||o(s.from,s.to,s.value))&&(u.addInner(s.from,s.to,s.value,!1)||l.push(Gw.create(s.from,s.to,s.value))),s.next());return u.finishInner(this.nextLayer.isEmpty&&!l.length?e.empty:this.nextLayer.update({add:l,filter:o,filterFrom:i,filterTo:a}))}map(t){if(t.empty||this.isEmpty)return this;let n=[],r=[],i=-1,a,o=(e,t,n)=>{a||=new Zw,a.addRange(e,t,n,!1)};for(let e=0;e<this.chunk.length;e++){let a=this.chunkPos[e],s=this.chunk[e],c=t.touchesRange(a,a+s.length);if(c===!1)i=Math.max(i,s.maxPoint),n.push(s),r.push(t.mapPos(a));else if(c===!0){let[e,c]=n.length?[Yw(r)+Yw(n).length,Yw(Yw(n).value).endSide]:[-1,-1],{mapped:l,pos:u}=s.map(a,t,e,c,o);l&&(i=Math.max(i,l.maxPoint),n.push(l),r.push(u))}}let s=this.nextLayer.map(t);return a&&(s=a.finishInner(s)),n.length==0?s:new e(r,n,s||e.empty,i)}between(e,t,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],a=this.chunk[r];if(t>=i&&e<=i+a.length&&a.between(i,e-i,t-i,n)===!1)return}this.nextLayer.between(e,t,n)}}iter(e=0){return eT.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return eT.from(e).goto(t)}static compare(e,t,n,r,i=-1){let a=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),o=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=Qw(a,o,n),c=new nT(a,s,i),l=new nT(o,s,i);n.iterGaps((e,t,n)=>rT(c,e,l,t,n,r)),n.empty&&n.length==0&&rT(c,0,l,0,0,r)}static eq(e,t,n=0,r){r??=1e9-1;let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),a=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=a.length)return!1;if(!i.length)return!0;let o=Qw(i,a),s=new nT(i,o,0).goto(n),c=new nT(a,o,0).goto(n);for(;;){if(s.to!=c.to||!iT(s.active,c.active)||s.point&&(!c.point||!Ww(s.point,c.point)))return!1;if(s.to>r)return!0;s.next(),c.next()}}static spans(e,t,n,r,i=-1){let a=new nT(e,null,i).goto(t),o=t,s=a.openStart;for(;;){let e=Math.min(a.to,n);if(a.point){let n=a.activeForPoint(a.to),i=a.pointFrom<t?n.length+1:a.point.startSide<0?n.length:Math.min(n.length,s);r.point(o,e,a.point,n,i,a.pointRank),s=Math.min(a.openEnd(e),n.length)}else e>o&&(r.span(o,e,a.active,s),s=a.openEnd(e));if(a.to>n)return s+(a.point&&a.to>n?1:0);o=a.to,a.next()}}static of(e,t=!1){let n=new Zw;for(let r of e instanceof Gw?[e]:t?Xw(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return e.empty;let n=Yw(t);for(let r=t.length-2;r>=0;r--)for(let i=t[r];i!=e.empty;i=i.nextLayer)n=new e(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}};Jw.empty=new Jw([],[],null,-1);function Yw(e){return e[e.length-1]}function Xw(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(Kw(t,r)>0)return e.slice().sort(Kw);t=r}return e}Jw.empty.nextLayer=Jw.empty;var Zw=class e{finishChunk(e){this.chunks.push(new qw(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(t,n,r,i){this.addInner(t,n,r,i)||(this.nextLayer||=new e).addRange(t,n,r,i)}addInner(e,t,n,r){let i=e-this.lastTo||n.startSide-this.last.endSide;if(r&&i<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Jw.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Jw.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}};function Qw(e,t,n){let r=new Map;for(let t of e)for(let e=0;e<t.chunk.length;e++)t.chunk[e].maxPoint<=0&&r.set(t.chunk[e],t.chunkPos[e]);let i=new Set;for(let e of t)for(let t=0;t<e.chunk.length;t++){let a=r.get(e.chunk[t]);a!=null&&(n?n.mapPos(a):a)==e.chunkPos[t]&&!n?.touchesRange(a,a+e.chunk[t].length)&&i.add(e.chunk[t])}return i}var $w=class{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){for(;this.chunkIndex<this.layer.chunk.length;){let t=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(t)||this.layer.chunkEnd(this.chunkIndex)<e||t.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}},eT=class e{constructor(e){this.heap=e}static from(t,n=null,r=-1){let i=[];for(let e=0;e<t.length;e++)for(let a=t[e];!a.isEmpty;a=a.nextLayer)a.maxPoint>=r&&i.push(new $w(a,n,r,e));return i.length==1?i[0]:new e(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)tT(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)tT(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),tT(this.heap,0)}}};function tT(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let i=e[r];if(r+1<e.length&&i.compare(e[r+1])>=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}var nT=class{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=eT.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){aT(this.active,e),aT(this.activeTo,e),aT(this.activeRank,e),this.minActive=sT(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t<this.activeRank.length&&(i-this.activeRank[t]||r-this.activeTo[t])>0;)t++;oT(this.active,t,n),oT(this.activeTo,t,r),oT(this.activeRank,t,i),e&&oT(e,t,this.cursor.from),this.minActive=sT(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&aT(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let e=this.cursor.value;if(!e.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=e,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=e.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let t=n.length-1;t>=0&&n[t]<e;t--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}};function rT(e,t,n,r,i,a){e.goto(t),n.goto(r);let o=r+i,s=r,c=r-t,l=!!a.boundChange;for(let t=!1;;){let r=e.to+c-n.to,i=r||e.endSide-n.endSide,u=i<0?e.to+c:n.to,d=Math.min(u,o);if(e.point||n.point?(e.point&&n.point&&Ww(e.point,n.point)&&iT(e.activeForPoint(e.to),n.activeForPoint(n.to))||a.comparePoint(s,d,e.point,n.point),t=!1):(t&&=(a.boundChange(s),!1),d>s&&!iT(e.active,n.active)&&a.compareRange(s,d,e.active,n.active),l&&d<o&&(r||e.openEnd(u)!=n.openEnd(u))&&(t=!0)),u>o)break;s=u,i<=0&&e.next(),i>=0&&n.next()}}function iT(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!Ww(e[n],t[n]))return!1;return!0}function aT(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function oT(e,t,n){for(let n=e.length-1;n>=t;n--)e[n+1]=e[n];e[t]=n}function sT(e,t){let n=-1,r=1e9;for(let i=0;i<t.length;i++)(t[i]-r||e[i].endSide-e[n].endSide)<0&&(n=i,r=t[i]);return n}function cT(e,t,n=e.length){let r=0;for(let i=0;i<n&&i<e.length;)e.charCodeAt(i)==9?(r+=t-r%t,i++):(r++,i=PC(e,i));return r}function lT(e,t,n,r){for(let r=0,i=0;;){if(i>=t)return r;if(r==e.length)break;i+=e.charCodeAt(r)==9?n-i%n:1,r=PC(e,r)}return r===!0?-1:e.length}for(var uT=`ͼ`,dT=typeof Symbol>`u`?`__ͼ`:Symbol.for(uT),fT=typeof Symbol>`u`?`__styleSet`+Math.floor(Math.random()*1e8):Symbol(`styleSet`),pT=typeof globalThis<`u`?globalThis:typeof window<`u`?window:{},mT=class{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,a,o){let s=[],c=/^@(\w+)\b/.exec(e[0]),l=c&&c[1]==`keyframes`;if(c&&t==null)return a.push(e[0]+`;`);for(let n in t){let o=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),o,a);else if(o&&typeof o==`object`){if(!c)throw RangeError(`The value of a property (`+n+`) should be a primitive value.`);i(r(n),o,s,l)}else o!=null&&s.push(n.replace(/_.*/,``).replace(/[A-Z]/g,e=>`-`+e.toLowerCase())+`: `+o+`;`)}(s.length||l)&&a.push((n&&!c&&!o?e.map(n):e).join(`, `)+` {`+s.join(` `)+`}`)}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join(`
27
- `)}static newName(){let e=pT[dT]||1;return pT[dT]=e+1,uT+e.toString(36)}static mount(e,t,n){let r=e[fT],i=n&&n.nonce;r?i&&r.setNonce(i):r=new gT(e,i),r.mount(Array.isArray(t)?t:[t],e)}},hT=new Map,gT=class{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=hT.get(n);if(t)return e[fT]=t;this.sheet=new r.CSSStyleSheet,hT.set(n,this)}else this.styleTag=n.createElement(`style`),t&&this.styleTag.setAttribute(`nonce`,t);this.modules=[],e[fT]=this}mount(e,t){let n=this.sheet,r=0,i=0,a=!1;for(let t=0;t<e.length;t++){let o=e[t],s=this.modules.indexOf(o);if(s<i&&s>-1&&(this.modules.splice(s,1),a=!0,i--,s=-1),s==-1){if(this.modules.splice(i++,0,o),a=!0,n)for(let e=0;e<o.rules.length;e++)n.insertRule(o.rules[e],r++)}else{for(;i<s;)r+=this.modules[i++].rules.length;r+=o.rules.length,i++}}if(n)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{if(a){let e=``;for(let t=0;t<this.modules.length;t++)e+=this.modules[t].getRules()+`
28
- `;this.styleTag.textContent=e}let e=t.head||t;this.styleTag.parentNode!=e&&e.insertBefore(this.styleTag,e.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute(`nonce`)!=e&&this.styleTag.setAttribute(`nonce`,e)}},_T={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},vT={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},yT=typeof navigator<`u`&&/Mac/.test(navigator.platform),bT=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),xT=0;xT<10;xT++)_T[48+xT]=_T[96+xT]=String(xT);for(var xT=1;xT<=24;xT++)_T[xT+111]=`F`+xT;for(var xT=65;xT<=90;xT++)_T[xT]=String.fromCharCode(xT+32),vT[xT]=String.fromCharCode(xT);for(var ST in _T)vT.hasOwnProperty(ST)||(vT[ST]=_T[ST]);function CT(e){var t=!(yT&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||bT&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?vT:_T)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var wT=typeof navigator<`u`?navigator:{userAgent:``,vendor:``,platform:``},TT=typeof document<`u`?document:{documentElement:{style:{}}},ET=/Edge\/(\d+)/.exec(wT.userAgent),DT=/MSIE \d/.test(wT.userAgent),OT=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(wT.userAgent),kT=!!(DT||OT||ET),AT=!kT&&/gecko\/(\d+)/i.test(wT.userAgent),jT=!kT&&/Chrome\/(\d+)/.exec(wT.userAgent),MT=`webkitFontSmoothing`in TT.documentElement.style,NT=!kT&&/Apple Computer/.test(wT.vendor),PT=NT&&(/Mobile\/\w+/.test(wT.userAgent)||wT.maxTouchPoints>2),q={mac:PT||/Mac/.test(wT.platform),windows:/Win/.test(wT.platform),linux:/Linux|X11/.test(wT.platform),ie:kT,ie_version:DT?TT.documentMode||6:OT?+OT[1]:ET?+ET[1]:0,gecko:AT,gecko_version:AT?+(/Firefox\/(\d+)/.exec(wT.userAgent)||[0,0])[1]:0,chrome:!!jT,chrome_version:jT?+jT[1]:0,ios:PT,android:/Android\b/.test(wT.userAgent),webkit:MT,webkit_version:MT?+(/\bAppleWebKit\/(\d+)/.exec(wT.userAgent)||[0,0])[1]:0,safari:NT,safari_version:NT?+(/\bVersion\/(\d+(\.\d+)?)/.exec(wT.userAgent)||[0,0])[1]:0,tabSize:TT.documentElement.style.tabSize==null?`-moz-tab-size`:`tab-size`};function FT(e,t){for(let n in e)n==`class`&&t.class?t.class+=` `+e.class:n==`style`&&t.style?t.style+=`;`+e.style:t[n]=e[n];return t}var IT=Object.create(null);function LT(e,t,n){if(e==t)return!0;e||=IT,t||=IT;let r=Object.keys(e),i=Object.keys(t);if(r.length-0!=i.length-0)return!1;for(let a of r)if(a!=n&&(i.indexOf(a)==-1||e[a]!==t[a]))return!1;return!0}function RT(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;t[r]??e.removeAttribute(r)}for(let n in t){let r=t[n];n==`style`?e.style.cssText=r:e.getAttribute(n)!=r&&e.setAttribute(n,r)}}function zT(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,i==`style`?e.style.cssText=``:e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,i==`style`?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function BT(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}var VT=class{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}},HT=(function(e){return e[e.Text=0]=`Text`,e[e.WidgetBefore=1]=`WidgetBefore`,e[e.WidgetAfter=2]=`WidgetAfter`,e[e.WidgetRange=3]=`WidgetRange`,e})(HT||={}),UT=class extends Uw{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new WT(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new KT(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-5e8,r=4e8;else{let{start:i,end:a}=qT(e,t);n=(i?t?-3e8:-1:5e8)-1,r=(a?t?2e8:1:-6e8)+1}return new KT(e,n,r,t,e.widget||null,!0)}static line(e){return new GT(e)}static set(e,t=!1){return Jw.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}};UT.none=Jw.empty;var WT=class e extends UT{constructor(e){let{start:t,end:n}=qT(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||`span`,this.attrs=e.class&&e.attributes?FT(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||IT}eq(t){return this==t||t instanceof e&&this.tagName==t.tagName&&LT(this.attrs,t.attrs)}range(e,t=e){if(e>=t)throw RangeError(`Mark decorations may not be empty`);return super.range(e,t)}};WT.prototype.point=!1;var GT=class e extends UT{constructor(e){super(-2e8,-2e8,null,e)}eq(t){return t instanceof e&&this.spec.class==t.spec.class&&LT(this.spec.attributes,t.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError(`Line decoration ranges must be zero-length`);return super.range(e,t)}};GT.prototype.mapMode=BC.TrackBefore,GT.prototype.point=!0;var KT=class e extends UT{constructor(e,t,n,r,i,a){super(t,n,i,e),this.block=r,this.isReplace=a,this.mapMode=r?t<=0?BC.TrackBefore:BC.TrackAfter:BC.TrackDel}get type(){return this.startSide==this.endSide?this.startSide<=0?HT.WidgetBefore:HT.WidgetAfter:HT.WidgetRange}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof e&&JT(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError(`Invalid range for replacement decoration`);if(!this.isReplace&&t!=e)throw RangeError(`Widget decorations can only have zero-length ranges`);return super.range(e,t)}};KT.prototype.point=!0;function qT(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return n??=e.inclusive,r??=e.inclusive,{start:n??t,end:r??t}}function JT(e,t){return e==t||!!(e&&t&&e.compare(t))}function YT(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}var XT=class e extends Uw{constructor(e,t,n){super(),this.tagName=e,this.attributes=t,this.rank=n}eq(t){return t==this||t instanceof e&&this.tagName==t.tagName&&LT(this.attributes,t.attributes)}static create(t){return new e(t.tagName,t.attributes||IT,t.rank==null?50:Math.max(0,Math.min(t.rank,100)))}static set(e,t=!1){return Jw.of(e,t)}};XT.prototype.startSide=XT.prototype.endSide=-1;var ZT=e=>e.nodeType==1,QT=e=>e.nodeType==3;function $T(e){let t;return t=e.nodeType==11?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function eE(e,t){return t?e==t||e.contains(t.nodeType==1?t:t.parentNode):!1}function tE(e,t){if(!t.anchorNode)return!1;try{return eE(e,t.anchorNode)}catch{return!1}}function nE(e){return QT(e)?yE(e,0,e.nodeValue.length).getClientRects():ZT(e)?e.getClientRects():[]}function rE(e,t,n,r){return n?oE(e,t,n,r,-1)||oE(e,t,n,r,1):!1}function iE(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function aE(e){return ZT(e)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function oE(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:sE(e))){if(e.nodeName==`DIV`)return!1;let n=e.parentNode;if(!n||!ZT(n))return!1;t=iE(e)+(i<0?0:1),e=n}else if(ZT(e)){if(e=e.childNodes[t+(i<0?-1:0)],ZT(e)&&(e.nodeName==`IMG`||e.nodeName==`BR`||e.contentEditable==`false`))return!1;t=i<0?sE(e):0}else return!1}}function sE(e){return QT(e)?e.nodeValue.length:e.childNodes.length}function cE(e,t){let{left:n,right:r}=e;if(n==r)return e;let i=t?n:r;return{left:i,right:i,top:e.top,bottom:e.bottom}}function lE(e){let t=e.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function uE(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function dE(e,t,n,r,i,a,o,s){let c=e.ownerDocument,l=c.defaultView||window;for(let u=e,d=!1;u&&!d;)if(ZT(u)){let e,f=u==c.body,p=1,m=1,h=!0,g=!0;if(f)e=lE(l);else{let t=getComputedStyle(u);if(/^(fixed|sticky)$/.test(t.position)&&(d=!0),(u.scrollHeight<=u.clientHeight||!/auto|scroll/.test(t.overflowY))&&(g=!1),(u.scrollWidth<=u.clientWidth||!/auto|scroll/.test(t.overflowX))&&(h=!1),!h&&!g){u=u.assignedSlot||u.parentNode;continue}let n=u.getBoundingClientRect();({scaleX:p,scaleY:m}=uE(u,n)),e={left:n.left,right:n.left+u.clientWidth*p,top:n.top,bottom:n.top+u.clientHeight*m}}let _=0,v=0;if(g){if(i==`nearest`)t.top<e.top+o?(v=t.top-(e.top+o),n>0&&t.bottom>e.bottom+v&&(v=t.bottom-e.bottom+o)):t.bottom>e.bottom-o&&(v=t.bottom-e.bottom+o,n<0&&t.top-v<e.top&&(v=t.top-(e.top+o)));else{let r=t.bottom-t.top,a=e.bottom-e.top;v=(i==`center`&&r<=a?t.top+r/2-a/2:i==`start`||i==`center`&&n<0?t.top-o:t.bottom-a+o)-e.top}}if(h&&(r==`nearest`?t.left<e.left+a?(_=t.left-(e.left+a),n>0&&t.right>e.right+_&&(_=t.right-e.right+a)):t.right>e.right-a&&(_=t.right-e.right+a,n<0&&t.left<e.left+_&&(_=t.left-(e.left+a))):_=(r==`center`?t.left+(t.right-t.left)/2-(e.right-e.left)/2:r==`start`==s?t.left-a:t.right-(e.right-e.left)+a)-e.left),_||v){if(f)l.scrollBy(_,v);else{let e=0,n=0;if(v){let e=u.scrollTop;u.scrollTop+=v/m,n=(u.scrollTop-e)*m}if(_){let t=u.scrollLeft;u.scrollLeft+=_/p,e=(u.scrollLeft-t)*p}t={left:t.left-e,top:t.top-n,right:t.right-e,bottom:t.bottom-n},e&&Math.abs(e-_)<1&&(r=`nearest`),n&&Math.abs(n-v)<1&&(i=`nearest`)}}if(f)break;(t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)&&(t={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)}),u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function fE(e,t=!0){let n=e.ownerDocument,r=null,i=null;for(let a=e.parentNode;a&&!(a==n.body||(!t||r)&&i);)if(ZT(a))!i&&a.scrollHeight>a.clientHeight&&/scroll|auto/.test(getComputedStyle(a).overflowY)&&(i=a),t&&!r&&a.scrollWidth>a.clientWidth&&/scroll|auto/.test(getComputedStyle(a).overflowX)&&(r=a),a=a.assignedSlot||a.parentNode;else if(a.nodeType==11)a=a.host;else break;return{x:r,y:i}}var pE=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?sE(t):0),n,Math.min(e.focusOffset,n?sE(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}};function mE(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)ZT(n)&&t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function hE(e,t=!0){for(let{node:n,left:r,top:i}of e)t&&n.scrollTop!=i&&(n.scrollTop=i),n.scrollLeft!=r&&(n.scrollLeft=r)}var gE=null;q.safari&&q.safari_version>=26&&(gE=!1);function _E(e){if(e.setActive)return e.setActive();if(gE)return e.focus(gE);let t=mE(e);e.focus(gE==null?{get preventScroll(){return gE={preventScroll:!0},!0}}:void 0),gE||(gE=!1,hE(t))}var vE;function yE(e,t,n=t){let r=vE||=document.createRange();return r.setEnd(e,n),r.setStart(e,t),r}function bE(e,t,n,r){let i={key:t,code:t,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let a=new KeyboardEvent(`keydown`,i);a.synthetic=!0,e.dispatchEvent(a);let o=new KeyboardEvent(`keyup`,i);return o.synthetic=!0,e.dispatchEvent(o),a.defaultPrevented||o.defaultPrevented}function xE(e){for(;e;){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function SE(e,t){let n=t.focusNode,r=t.focusOffset;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;for(r=Math.min(r,sE(n));;)if(r){if(!ZT(n))return!1;let e=n.childNodes[r-1];e.contentEditable==`false`?r--:(n=e,r=sE(n))}else if(n==e)return!0;else r=iE(n),n=n.parentNode}function CE(e){return e instanceof Window?e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4):e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function wE(e,t){for(let n=e,r=t;;)if(QT(n)&&r>0)return{node:n,offset:r};else if(ZT(n)&&r>0){if(n.contentEditable==`false`)return null;n=n.childNodes[r-1],r=sE(n)}else if(n.parentNode&&!aE(n))r=iE(n),n=n.parentNode;else return null}function TE(e,t){for(let n=e,r=t;;)if(QT(n)&&r<n.nodeValue.length)return{node:n,offset:r};else if(ZT(n)&&r<n.childNodes.length){if(n.contentEditable==`false`)return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!aE(n))r=iE(n)+1,n=n.parentNode;else return null}var EE=class e{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(t,n){return new e(t.parentNode,iE(t),n)}static after(t,n){return new e(t.parentNode,iE(t)+1,n)}},DE=(function(e){return e[e.LTR=0]=`LTR`,e[e.RTL=1]=`RTL`,e})(DE||={}),OE=DE.LTR,kE=DE.RTL;function AE(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<e[n]);return t}var fte=AE(`88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008`),pte=AE(`4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333`),jE=Object.create(null),ME=[];for(let e of[`()`,`[]`,`{}`]){let t=e.charCodeAt(0),n=e.charCodeAt(1);jE[t]=n,jE[n]=-t}function NE(e){return e<=247?fte[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?pte[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var mte=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/,PE=class{get dir(){return this.level%2?kE:OE}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let i=-1;for(let a=0;a<e.length;a++){let o=e[a];if(o.from<=t&&o.to>=t){if(o.level==n)return a;(i<0||(r==0?e[i].level>o.level:r<0?o.from<t:o.to>t))&&(i=a)}}if(i<0)throw RangeError(`Index out of range`);return i}};function FE(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!FE(r.inner,i.inner))return!1}return!0}var IE=[];function hte(e,t,n,r,i){for(let a=0;a<=r.length;a++){let o=a?r[a-1].to:t,s=a<r.length?r[a].from:n,c=a?256:i;for(let t=o,n=c,r=c;t<s;t++){let i=NE(e.charCodeAt(t));i==512?i=n:i==8&&r==4&&(i=16),IE[t]=i==4?2:i,i&7&&(r=i),n=i}for(let e=o,t=c,r=c;e<s;e++){let i=IE[e];if(i==128)e<s-1&&t==IE[e+1]&&t&24?i=IE[e]=t:IE[e]=256;else if(i==64){let i=e+1;for(;i<s&&IE[i]==64;)i++;let a=e&&t==8||i<n&&IE[i]==8?r==1?1:8:256;for(let t=e;t<i;t++)IE[t]=a;e=i-1}else i==8&&r==1&&(IE[e]=1);t=i,i&7&&(r=i)}}}function gte(e,t,n,r,i){let a=i==1?2:1;for(let o=0,s=0,c=0;o<=r.length;o++){let l=o?r[o-1].to:t,u=o<r.length?r[o].from:n;for(let t=l,n,r,o;t<u;t++)if(r=jE[n=e.charCodeAt(t)]){if(r<0){for(let e=s-3;e>=0;e-=3)if(ME[e+1]==-r){let n=ME[e+2],r=n&2?i:n&4?n&1?a:i:0;r&&(IE[t]=IE[ME[e]]=r),s=e;break}}else if(ME.length==189)break;else ME[s++]=t,ME[s++]=n,ME[s++]=c}else if((o=IE[t])==2||o==1){let e=o==i;c=+!e;for(let t=s-3;t>=0;t-=3){let n=ME[t+2];if(n&2)break;if(e)ME[t+2]|=2;else{if(n&4)break;ME[t+2]|=4}}}}}function _te(e,t,n,r){for(let i=0,a=r;i<=n.length;i++){let o=i?n[i-1].to:e,s=i<n.length?n[i].from:t;for(let c=o;c<s;){let o=IE[c];if(o==256){let o=c+1;for(;;)if(o==s){if(i==n.length)break;o=n[i++].to,s=i<n.length?n[i].from:t}else if(IE[o]==256)o++;else break;let l=a==1,u=l==((o<t?IE[o]:r)==1)?l?1:2:r;for(let t=o,r=i,a=r?n[r-1].to:e;t>c;)t==a&&(t=n[--r].from,a=r?n[r-1].to:e),IE[--t]=u;c=o}else a=o,c++}}}function LE(e,t,n,r,i,a,o){let s=r%2?2:1;if(r%2==i%2)for(let c=t,l=0;c<n;){let t=!0,u=!1;if(l==a.length||c<a[l].from){let e=IE[c];e!=s&&(t=!1,u=e==16)}let d=!t&&s==1?[]:null,f=t?r:r+1,p=c;run:for(;;)if(l<a.length&&p==a[l].from){if(u)break run;let m=a[l];if(!t)for(let e=m.to,t=l+1;;){if(e==n)break run;if(t<a.length&&a[t].from==e)e=a[t++].to;else if(IE[e]==s)break run;else break}l++,d?d.push(m):(m.from>c&&o.push(new PE(c,m.from,f)),RE(e,m.direction==OE==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.to),p=m.to}else if(p==n||(t?IE[p]!=s:IE[p]==s))break;else p++;d?LE(e,c,p,r+1,i,d,o):c<p&&o.push(new PE(c,p,f)),c=p}else for(let c=n,l=a.length;c>t;){let n=!0,u=!1;if(!l||c>a[l-1].to){let e=IE[c-1];e!=s&&(n=!1,u=e==16)}let d=!n&&s==1?[]:null,f=n?r:r+1,p=c;run:for(;;)if(l&&p==a[l-1].to){if(u)break run;let m=a[--l];if(!n)for(let e=m.from,n=l;;){if(e==t)break run;if(n&&a[n-1].to==e)e=a[--n].from;else if(IE[e-1]==s)break run;else break}d?d.push(m):(m.to<c&&o.push(new PE(m.to,c,f)),RE(e,m.direction==OE==!(f%2)?r:r+1,i,m.inner,m.from,m.to,o),c=m.from),p=m.from}else if(p==t||(n?IE[p-1]!=s:IE[p-1]==s))break;else p--;d?LE(e,p,c,r+1,i,d,o):p<c&&o.push(new PE(p,c,f)),c=p}}function RE(e,t,n,r,i,a,o){let s=t%2?2:1;hte(e,i,a,r,s),gte(e,i,a,r,s),_te(i,a,r,s),LE(e,i,a,t,n,r,o)}function vte(e,t,n){if(!e)return[new PE(0,0,+(t==kE))];if(t==OE&&!n.length&&!mte.test(e))return zE(e.length);if(n.length)for(;e.length>IE.length;)IE[IE.length]=256;let r=[],i=t==OE?0:1;return RE(e,i,i,n,0,e.length,r),r}function zE(e){return[new PE(0,e,0)]}var BE=``;function yte(e,t,n,r,i){if(!e.length)return null;let a=r.head-e.from,o;if(r.head==e.from&&r.assoc<0){if(!i)return null;a=t[o=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(i)return null;a=t[o=t.length-1].side(!0,n)}else o=PE.find(t,a,r.bidiLevel??-1,r.assoc);let s=t[o],c=s.side(i,n);if(a==c){let e=o+=i?1:-1;if(e<0||e>=t.length)return null;s=t[o=e],a=s.side(!i,n),c=s.side(i,n)}let l=PC(e.text,a,s.forward(i,n));(l<s.from||l>s.to)&&(l=c),BE=e.text.slice(Math.min(a,l),Math.max(a,l));let u=o==(i?t.length-1:0)?null:t[o+(i?1:-1)];if(l==c){if(!u)return i?K.cursor(e.to,1):K.cursor(e.from,-1);if(u.level+ +!i<s.level)return K.cursor(u.side(!i,n)+e.from,u.forward(i,n)?1:-1,u.level)}return K.cursor(l+e.from,s.forward(i,n)?-1:1,s.level)}function bte(e,t,n){for(let r=t;r<n;r++){let t=NE(e.charCodeAt(r));if(t==1)return OE;if(t==2||t==4)return kE}}var VE=QC.define(),HE=QC.define(),UE=QC.define(),WE=QC.define(),GE=QC.define(),KE=QC.define(),qE=QC.define(),JE=QC.define(),YE=QC.define(),XE=QC.define({combine:e=>e.some(e=>e)}),ZE=QC.define({combine:e=>e.some(e=>e)}),QE=QC.define(),$E=class e{constructor(e,t,n,r,i,a=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=a}map(t){return t.empty?this:new e(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new e(K.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}},eD=Ew.define({map:(e,t)=>e.map(t)}),tD=Ew.define();function nD(e,t,n){let r=e.facet(WE);r.length?r[0](t):window.onerror&&window.onerror(String(t),n,void 0,void 0,t)||(n?console.error(n+`:`,t):console.error(t))}var rD=QC.define({combine:e=>!e.length||e[0]}),xte=0,iD=QC.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}}),aD=class e{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(iD.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(iD.of({plugin:this,arg:e}))}static define(t,n){let{eventHandlers:r,eventObservers:i,provide:a,decorations:o}=n||{};return new e(xte++,t,r,i,e=>{let t=[];return o&&t.push(lD.of(t=>{let n=t.plugin(e);return n?o(n):UT.none})),a&&t.push(a(e)),t})}static fromClass(t,n){return e.define((e,n)=>new t(e,n),n)}},oD=class{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){nD(e.state,t,`CodeMirror plugin crashed`),this.deactivate()}}else if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(nD(e.state,t,`CodeMirror plugin crashed`),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}return this}destroy(e){if(this.value?.destroy)try{this.value.destroy()}catch(t){nD(e.state,t,`CodeMirror plugin crashed`)}}deactivate(){this.spec=this.value=null}},sD=QC.define(),cD=QC.define(),lD=QC.define(),uD=QC.define(),dD=QC.define(),fD=QC.define(),pD=QC.define();function mD(e,t){let n=e.state.facet(pD);if(!n.length)return n;let r=n.map(t=>t instanceof Function?t(e):t),i=[];return Jw.spans(r,t.from,t.to,{point(){},span(e,n,r,a){let o=e-t.from,s=n-t.from,c=i;for(let e=r.length-1;e>=0;e--,a--){let t=r[e].spec.bidiIsolate,n;if(a>0&&c.length&&(n=c[c.length-1]).to==o&&n.direction==t)n.to=s,c=n.inner;else{let e={from:o,to:s,direction:t,inner:[]};c.push(e),c=e.inner}}}}),hD(t.text,i)}function hD(e,t){for(let n of t){if(n.direction==null){for(let t=n.from,r=0;t<n.to;r++){let i=r<n.inner.length?n.inner[r]:null,a=bte(e,t,i?i.from:n.to);if(a){n.direction=a;break}if(!i)break;t=i.to}n.direction??=DE.LTR}hD(e,n.inner)}return t}var gD=QC.define();function _D(e){let t=0,n=0,r=0,i=0;for(let a of e.state.facet(gD)){let o=a(e);o&&(o.left!=null&&(t=Math.max(t,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:t,right:n,top:r,bottom:i}}var vD=QC.define(),yD=class e{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(t){return new e(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}}return e.splice(t,0,n),e}static extendWithRanges(t,n){if(n.length==0)return t;let r=[];for(let i=0,a=0,o=0;;){let s=i<t.length?t[i].fromB:1e9,c=a<n.length?n[a]:1e9,l=Math.min(s,c);if(l==1e9)break;let u=l+o,d=l,f=u;for(;;)if(a<n.length&&n[a]<=d){let e=n[a+1];a+=2,d=Math.max(d,e);for(let e=i;e<t.length&&t[e].fromB<=d;e++)o=t[e].toA-t[e].toB;f=Math.max(f,e+o)}else if(i<t.length&&t[i].fromB<=d){let e=t[i++];d=Math.max(d,e.toB),f=Math.max(f,e.toA),o=e.toA-e.toB}else break;r.push(new e(u,f,l,d))}return r}},bD=class e{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=HC.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new yD(e,t,n,i))),this.changedRanges=r}static create(t,n,r){return new e(t,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}},Ste=[],xD=class{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return Ste}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let e=this.domAttrs;e&&RT(this.dom,e)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:``)+(this.breakAfter?`#`:``)}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let t of this.children){if(t==e)return n;n+=t.length+t.breakAfter}throw RangeError(`Invalid child in posBefore`)}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=iE(this.dom),r=this.length?e>0:t>0;return new EE(this.parent.dom,n+ +!!r,e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof wD)return e;return null}static get(e){return e.cmTile}},SD=class extends xD{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,i=e?.node==t?e:null,a=0;for(let o of this.children){if(o.sync(e),a+=o.length+o.breakAfter,r=n?n.nextSibling:t.firstChild,i&&r!=o.dom&&(i.written=!0),o.dom.parentNode==t)for(;r&&r!=o.dom;)r=CD(r);else t.insertBefore(o.dom,r);n=o.dom}for(r=n?n.nextSibling:t.firstChild,i&&r&&(i.written=!0);r;)r=CD(r);this.length=a}};function CD(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var wD=class extends SD{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=xD.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,i=0;;)if(r==n.children.length){if(!t.length)return;n=n.parent,n.breakAfter&&i++,r=t.pop()}else{let a=n.children[r++];if(a instanceof TD)t.push(r),n=a,r=0;else{let t=i+a.length,n=e(a,i);if(n!==void 0)return n;i=t+a.breakAfter}}}resolveBlock(e,t){let n,r=-1,i,a=-1;if(this.blockTiles((o,s)=>{let c=s+o.length;if(e>=s&&e<=c){if(o.isWidget()&&t>=-1&&t<=1){if(o.flags&32)return!0;o.flags&16&&(n=void 0)}(s<e||e==c&&(t<-1?o.length:o.covers(1)))&&(!n||!o.isWidget()&&n.isWidget())&&(n=o,r=e-s),(c>e||e==s&&(t>1?o.length:o.covers(-1)))&&(!i||!o.isWidget()&&i.isWidget())&&(i=o,a=e-s)}}),!n&&!i)throw Error(`No tile at position `+e);return n&&t<0||!i?{tile:n,offset:r}:{tile:i,offset:a}}},TD=class e extends SD{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},ED=class e extends SD{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(t,n,r){let i=new e(n||document.createElement(`div`),t);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,n=!1){let r=null,i=-1,a=null,o=-1;function s(e,c){for(let l=0,u=0;l<e.children.length&&u<=c;l++){let d=e.children[l],f=u+d.length;f>=c&&(d.isComposite()?s(d,c-u):(!a||n&&a.isHidden&&(t>0&&!(a.flags&32)||n&&wte(a,d)))&&(f>c||d.flags&32&&t<=1)?(a=d,o=c-u):(u<c||d.flags&16&&!(n&&d.isHidden)&&t>=-1)&&(r=d,i=c-u)),u=f}}s(this,e);let c=(t<0?r:a)||r||a;return c?{tile:c,offset:c==r?i:o}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t,n):Cte(this)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:e,offset:r}=n;if(this.dom.contains(e.dom))return e.isText()?new EE(e.dom,Math.min(e.dom.nodeValue.length,r)):e.domPosFor(r,e.flags&16?1:e.flags&32?-1:t);let i=n.tile.parent,a=!1;for(let e of i.children){if(a)return new EE(e.dom,0);e==n.tile&&(a=!0)}}return new EE(this.dom,0)}};function Cte(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=nE(t);return n[n.length-1]||null}function wte(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}var DD=class e extends SD{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(t,n){let r=new e(n||document.createElement(t.tagName),t);return n||(r.flags|=4),r}},OD=class e extends xD{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,a=e,o=0;e==0&&t<0||e==r&&t>=0?q.chrome||q.gecko||(e?(i--,o=1):a<r&&(a++,o=-1)):t<0?i--:a<r&&a++;let s=yE(this.dom,i,a).getClientRects();if(!s.length)return null;let c=s[(o?o<0:t>=0)?0:s.length-1];return q.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(s,e=>e.width)||c),n==null?c:cE(c,(o?o>0:t<0)==n)}static of(t,n){let r=new e(n||document.createTextNode(t),t);return n||(r.flags|=2),r}},kD=class e extends xD{constructor(e,t,n,r){super(e,t,r),this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return cE(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let t=this.dom.getClientRects(),n=null;if(!t.length)return null;let r=this.flags&16?!0:this.flags&32?!1:e>0;for(let i=r?t.length-1:0;n=t[i],!(e>0?i==0:i==t.length-1||n.top<n.bottom);i+=r?-1:1);return cE(n,!r)}}get overrideDOMText(){if(!this.length)return CC.empty;let{root:e}=this;if(!e)return CC.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(t,n,r,i,a){return a||(a=t.toDOM(n),t.editable||(a.contentEditable=`false`)),new e(a,r,t,i)}},AD=class extends xD{constructor(e){let t=document.createElement(`img`);t.className=`cm-widgetBuffer`,t.setAttribute(`aria-hidden`,`true`),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return CC.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:cE(r,t>0==n)}},Tte=class{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:i,beforeBreak:a,parents:o}=this;for(;e||t>0;)if(!r.isComposite()){let t=r.length;if(i<t&&e){let a=Math.min(e,t-i);n&&n.skip(r,i,i+a),e-=a,i+=a}if(i==t)a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++;else if(!e)break}else if(a){if(!e)break;n&&n.break(),e--,a=!1}else if(i==r.children.length){if(!e&&!o.length)break;n&&n.leave(r),a=!!r.breakAfter,{tile:r,index:i}=o.pop(),i++}else{let s=r.children[i],c=s.breakAfter;(t>0?s.length<=e:s.length<e)&&(!n||n.skip(s,0,s.length)!==!1||!s.isComposite)?(a=!!c,i++,e-=s.length):(o.push({tile:r,index:i}),r=s,i=0,n&&s.isComposite()&&n.enter(s))}return this.tile=r,this.index=i,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}},Ete=class{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}},Dte=class{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){this.flushBuffer();let i=this.ensureMarks(t,n),a=i.lastChild;if(a&&a.isText()&&!(a.flags&8)&&a.length+e.length<512){this.cache.reused.set(a,2);let t=i.children[i.children.length-1]=new OD(a.dom,a.text+e);t.parent=i}else i.append(r||OD.of(e,this.cache.find(OD)?.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;n.dom!=t.line.dom&&(n.setDOM(this.cache.reused.has(t.line)?PD(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let r=n;for(let e=t.marks.length-1;e>=0;e--){let n=t.marks[e],i=r.lastChild;if(i instanceof DD&&i.mark.eq(n.mark))i.dom!=n.dom&&i.setDOM(PD(n.dom)),r=i;else{let{dom:e}=n;this.cache.reused.get(n)&&xD.get(n.dom)&&(e=PD(n.dom));let t=DD.of(n.mark,e);r.append(t),r=t}this.cache.reused.set(n,2)}let i=xD.get(e.text);i&&this.cache.reused.set(i,2);let a=new OD(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let i=this.ensureMarks(t,n);!r&&!(e.flags&16)&&i.append(this.getBuffer(1)),i.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){e||=ND;let n=ED.start(e,t||this.cache.find(ED)?.dom,!!t);this.getBlockPos().append(this.lastBlock=this.curLine=n)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){let n=this.curLine;for(let r=e.length-1;r>=0;r--){let i=e[r],a;if(t>0&&(a=n.lastChild)&&a instanceof DD&&a.mark.eq(i))n=a,t--;else{let e=DD.of(i,this.cache.find(DD,e=>e.mark.eq(i))?.dom);n.append(e),n=e,t=0}}return n}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!MD(this.curLine,!1)||e.dom.nodeName!=`BR`&&e.isWidget()&&!(q.ios&&MD(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(ID,0,32)||new kD(ID.toDOM(),0,ID,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new Ete(e.from,e.to,e.value,t),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){this.updateBlockWrappers();let e=this.root;for(let t of this.wrappers){let n=e.lastChild;if(t.from<this.pos&&n instanceof TD&&n.wrapper.eq(t.wrapper))e=n;else{let n=TD.of(t.wrapper,this.cache.find(TD,e=>e.wrapper.eq(t.wrapper))?.dom);e.append(n),e=n}}return e}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(AD,void 0,1);return n&&(n.flags=t),n||new AD(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}},Ote=class{constructor(e){this.skipCount=0,this.text=``,this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text=``,this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skipCount);if(this.skipCount=0,r)throw Error(`Ran out of text content when drawing inline views`);this.text=t;let i=this.textOff=Math.min(e,t.length);return n?null:t.slice(0,i)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}},jD=[kD,ED,OD,DD,AD,TD,wD];for(let e=0;e<jD.length;e++)jD[e].bucket=e;var kte=class{constructor(e){this.view=e,this.buckets=jD.map(()=>[]),this.index=jD.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];n.length<6?n.push(e):n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,i=this.buckets[r],a=this.index[r];for(let e=0;e<i.length;e++){let o=(e+a)%i.length,s=i[o];if((!t||t(s))&&!this.reused.has(s))return i.splice(o,1),o<a&&this.index[r]--,this.reused.set(s,n),s}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let i=0,a=0;;i++){if(i==r.length){if(a)return null;a=1,i=0}let o=r[i];if(!this.reused.has(o)&&(a==0?o.widget.compare(e):o.widget.constructor==e.constructor&&e.updateDOM(o.dom,this.view,o.widget)))return r.splice(i,1),i<this.index[0]&&this.index[0]--,o.widget==e&&o.length==t&&(o.flags&497)==n?(this.reused.set(o,1),o):(this.reused.set(o,2),new kD(o.dom,t,e,o.flags&-498|n))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}},Ate=class{constructor(e,t,n,r,i){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=i,this.openWidget=!1,this.openMarks=0,this.cache=new kte(e),this.text=new Ote(e.state.doc),this.builder=new Dte(this.cache,new wD(e,e.contentDOM),Jw.iter(n)),this.cache.reused.set(t,2),this.old=new Tte(t),this.reuseWalker={skip:(e,t,n)=>{if(this.cache.add(e),e.isComposite())return!1},enter:e=>this.cache.add(e),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,i=0,a=0;;){let o=a<e.length?e[a++]:null,s=o?o.fromA:this.old.root.length;if(s>r){let e=s-r;this.preserve(e,!a,!o),r=s,i+=e}if(!o)break;t&&o.fromA<=t.range.fromA&&o.toA>=t.range.toA?(this.forward(o.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(i,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,o.toA),this.emit(t.range.toB,o.toB)):(this.forward(o.fromA,o.toA),this.emit(i,o.toB)),i=o.toB,r=o.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,n){let r=Nte(this.old),i=this.openMarks;this.old.advance(e,n?1:-1,{skip:(e,t,n)=>{if(e.isWidget()){if(this.openWidget)this.builder.continueWidget(n-t);else{let a=n>0||t<e.length?kD.of(e.widget,this.view,n-t,e.flags&496,this.cache.maybeReuse(e)):this.cache.reuse(e);a.flags&256?(a.flags&=-2,this.builder.addBlockWidget(a)):(this.builder.ensureLine(null),this.builder.addInlineWidget(a,r,i),i=r.length)}}else if(e.isText())this.builder.ensureLine(null),!t&&n==e.length&&!this.cache.reused.has(e)?this.builder.addText(e.text,r,i,this.cache.reuse(e)):(this.cache.add(e),this.builder.addText(e.text.slice(t,n),r,i)),i=r.length;else if(e.isLine())e.flags&=-2,this.cache.reused.set(e,1),this.builder.addLine(e);else if(e instanceof AD)this.cache.add(e);else if(e instanceof DD)this.builder.ensureLine(null),this.builder.addMark(e,r,i),this.cache.reused.set(e,1),i=r.length;else return!1;this.openWidget=!1},enter:e=>{e.isLine()?this.builder.addLineStart(e.attrs,this.cache.maybeReuse(e)):(this.cache.add(e),e instanceof DD&&r.unshift(e.mark)),this.openWidget=!1},leave:e=>{e.isLine()?r.length&&=i=0:e instanceof DD&&(r.shift(),i=Math.min(i,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,i=-1,a=Jw.spans(this.decorations,e,t,{point:(e,t,a,o,s,c)=>{if(a instanceof KT){if(this.disallowBlockEffectsFor[c]){if(a.block)throw RangeError(`Block decorations may not be specified via plugins`);if(t>this.view.state.doc.lineAt(e).to)throw RangeError(`Decorations that replace line breaks may not be specified via plugins`)}if(i=o.length,s>o.length)r.continueWidget(t-e);else{let i=a.widget||(a.block?FD.block:FD.inline),c=jte(a),l=this.cache.findWidget(i,t-e,c)||kD.of(i,this.view,t-e,c);a.block?(a.startSide>0&&r.addLineStartIfNotCovered(n),r.addBlockWidget(l)):(r.ensureLine(n),r.addInlineWidget(l,o,s))}n=null}else n=Mte(n,a);t>e&&this.text.skip(t-e)},span:(e,t,a,o)=>{for(let i=e;i<t;){let s=this.text.next(Math.min(512,t-i));s==null?(r.addLineStartIfNotCovered(n),r.addBreak(),i++):(r.ensureLine(n),r.addText(s,a,i==e?o:a.length),i+=s.length),n=null}i=a.length}});i>-1&&(this.openWidget=a>i),this.openWidget||r.addLineStartIfNotCovered(n),this.openMarks=a}forward(e,t,n=1){t-e<=10?this.old.advance(t-e,n,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker))}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let e=xD.get(r);if(r==this.view.contentDOM)break;e instanceof DD?t.push(e):e?.isLine()?n=e:e instanceof TD||(r.nodeName==`DIV`&&!n?n=new ED(r,ND):n||t.push(DD.of(new WT({tagName:r.nodeName.toLowerCase(),attributes:BT(r)}),r)))}return n?{line:n,marks:t}:null}};function MD(e,t){let n=e=>{for(let r of e.children)if((t?r.isText():r.length)||n(r))return!0;return!1};return n(e)}function jte(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;return e.block&&(t|=256),t}var ND={class:`cm-line`};function Mte(e,t){let n=t.spec.attributes,r=t.spec.class;return!n&&!r?e:(e||={class:`cm-line`},n&&FT(n,e),r&&(e.class+=` `+r),e)}function Nte(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;r instanceof DD&&t.push(r.mark)}return t}function PD(e){let t=xD.get(e);return t&&t.setDOM(e.cloneNode()),e}var FD=class extends VT{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}};FD.inline=new FD(`span`),FD.block=new FD(`div`);var ID=new class extends VT{toDOM(){return document.createElement(`br`)}get isHidden(){return!0}get editable(){return!0}},LD=class{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=UT.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new wD(e,e.contentDOM),this.updateInner([new yD(0,0,0,e.state.doc.length)],null)}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>t<this.minWidthFrom||e>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let n=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(this.domChanged?.newSel?n=this.domChanged.newSel.head:!Pte(e.changes,this.hasComposition)&&!e.selectionSet&&(n=e.state.selection.main.head));let r=n>-1?VD(this.view,e.changes,n):null;if(this.domChanged=null,this.hasComposition){let{from:n,to:r}=this.hasComposition;t=new yD(n,r,e.changes.mapPos(n,-1),e.changes.mapPos(r,1)).addToSet(t.slice())}this.hasComposition=r?{from:r.range.fromB,to:r.range.toB}:null,(q.ie||q.chrome)&&!r&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,a=this.blockWrappers;this.updateDeco();let o=WD(i,this.decorations,e.changes);o.length&&(t=yD.extendWithRanges(t,o));let s=KD(a,this.blockWrappers,e.changes);return s.length&&(t=yD.extendWithRanges(t,s)),r&&!t.some(e=>e.fromA<=r.range.fromA&&e.toA>=r.range.toA)&&(t=r.range.addToSet(t.slice())),this.tile.flags&2&&t.length==0?!1:(this.updateInner(t,r),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let n=this.tile,r=new Ate(this.view,n,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&xD.get(t.text)&&r.cache.reused.set(xD.get(t.text),2),this.tile=r.run(e,t),RD(n,r.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+`px`,this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+`px`:``;let r=q.chrome||q.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(r),r&&(r.written||n.selectionRange.focusNode!=r.node||!this.tile.dom.contains(r.node))&&(this.forceSelection=!0),this.tile.dom.style.height=``});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let e of this.tile.children)e.isWidget()&&e.widget instanceof JD&&r.push(e.dom);n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let e of t.effects)e.is(tD)&&(this.editContextFormatting=e.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,i=r==n,a=!i&&!(this.view.state.facet(rD)||n.tabIndex>-1)&&tE(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(i||t||a))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,c,l;if(s.empty?l=c=this.inlineDOMNearPos(s.anchor,s.assoc||1):(l=this.inlineDOMNearPos(s.head,s.head==s.from?1:-1),c=this.inlineDOMNearPos(s.anchor,s.anchor==s.from?1:-1)),q.gecko&&s.empty&&!this.hasComposition&&zD(c)){let e=document.createTextNode(``);this.view.observer.ignore(()=>c.node.insertBefore(e,c.node.childNodes[c.offset]||null)),c=l=new EE(e,0),o=!0}let u=this.view.observer.selectionRange;(o||!u.focusNode||(!rE(c.node,c.offset,u.anchorNode,u.anchorOffset)||!rE(l.node,l.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,s))&&(this.view.observer.ignore(()=>{q.android&&q.chrome&&n.contains(u.focusNode)&&qD(u.focusNode,n)&&(n.blur(),n.focus({preventScroll:!0}));let e=$T(this.view.root);if(e){if(s.empty){if(q.gecko){let e=HD(c.node,c.offset);if(e&&e!=3){let t=(e==1?wE:TE)(c.node,c.offset);t&&(c=new EE(t.node,t.offset))}}e.collapse(c.node,c.offset),s.bidiLevel!=null&&e.caretBidiLevel!==void 0&&(e.caretBidiLevel=s.bidiLevel)}else if(e.extend){e.collapse(c.node,c.offset);try{e.extend(l.node,l.offset)}catch{}}else{let t=document.createRange();s.anchor>s.head&&([c,l]=[l,c]),t.setEnd(l.node,l.offset),t.setStart(c.node,c.offset),e.removeAllRanges(),e.addRange(t)}}a&&this.view.root.activeElement==n&&(n.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(c,l)),this.impreciseAnchor=c.precise?null:new EE(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new EE(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&rE(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=$T(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let a=this.lineAt(t.head,t.assoc);if(!a)return;let o=a.posAtStart;if(t.head==o||t.head==o+a.length)return;let s=this.coordsAt(t.head,-1),c=this.coordsAt(t.head,1);if(!s||!c||s.bottom>c.top)return;let l=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(l.node,l.offset),n.modify(`move`,t.assoc<0?`forward`:`backward`,`lineboundary`),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let i;if(e==n.dom)i=n.dom.childNodes[t];else{let r=sE(e)==0?0:t==0?-1:1;for(;;){let t=e.parentNode;if(t==n.dom)break;r==0&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}i=r<0?e:e.nextSibling}if(i==n.dom.firstChild)return r;for(;i&&!xD.get(i);)i=i.nextSibling;if(!i)return r+n.length;for(let e=0,t=r;;e++){let r=n.children[e];if(r.dom==i)return t;t+=r.length+r.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);return n.isWidget()?n.domPosFor(r,t):n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,i=!1,a,o=-1,s=!1;return this.tile.blockTiles((t,c)=>{if(t.isWidget()){if(t.flags&32&&c>=e)return!0;t.flags&16&&(i=!0)}else{let l=c+t.length;if(c<=e&&(n=t,r=e-c,i=l<e),l>=e&&!a&&(a=t,o=e-c,s=c>e),c>e&&a)return!0}}),!n&&!a?this.domAtPos(e,t):(i&&a?n=null:s&&n&&(a=null),n&&t<0||!a?n.domIn(r,t):a.domIn(o,t))}coordsAt(e,t,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof JD?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(e,t){if(e.isComposite())for(let n of e.children){if(n.length>=t){let e=r(n,t);if(e)return e}if(t-=n.length,t<0)break}else if(e.isText()&&t<e.length){let n=PC(e.text,t);if(n==t)return null;let r=yE(e.dom,t,n).getClientRects();for(let e=0;e<r.length;e++){let t=r[e];if(e==r.length-1||t.top<t.bottom&&t.left<t.right)return t}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,a=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,s=this.view.textDirection==DE.LTR,c=0,l=(e,u,d)=>{for(let f=0;f<e.children.length&&!(u>r);f++){let r=e.children[f],p=u+r.length,m=r.dom.getBoundingClientRect(),{height:h}=m;if(d&&!f&&(c+=m.top-d.top),r instanceof TD)p>n&&l(r,u,m);else if(u>=n&&(c>0&&t.push(-c),t.push(h+c),c=0,a)){let e=r.dom.lastChild,t=e?nE(e):[];if(t.length){let e=t[t.length-1],n=s?e.right-m.left:m.right-e.left;n>o&&(o=n,this.minWidth=i,this.minWidthFrom=u,this.minWidthTo=p)}}d&&f==e.children.length-1&&(c+=d.bottom-m.bottom),u=p+r.breakAfter}};return l(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction==`rtl`?DE.RTL:DE.LTR}measureTextSize(){let e=this.tile.blockTiles(e=>{if(e.isLine()&&e.children.length&&e.length<=20){let t=0,n;for(let r of e.children){if(!r.isText()||/[^ -~]/.test(r.text))return;let e=nE(r.dom);if(e.length!=1)return;t+=e[0].width,n=e[0].height}if(t)return{lineHeight:e.dom.getBoundingClientRect().height,charWidth:t/e.length,textHeight:n}}});if(e)return e;let t=document.createElement(`div`),n,r,i;return t.className=`cm-line`,t.style.width=`99999px`,t.style.position=`absolute`,t.textContent=`abc def ghi jkl mno pqr stu`,this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let e=nE(t.firstChild)[0];n=t.getBoundingClientRect().height,r=e&&e.width?e.width/27:7,i=e&&e.height?e.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],a=i?i.from-1:this.view.state.doc.length;if(a>n){let r=(t.lineBlockAt(a).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(UT.replace({widget:new JD(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,a))}if(!i)break;n=i.to+1}return UT.set(e)}updateDeco(){let e=1,t=this.view.state.facet(lD).map(t=>(this.dynamicDecorationMap[e++]=typeof t==`function`)?t(this.view):t),n=!1,r=this.view.state.facet(dD).map((e,t)=>{let r=typeof e==`function`;return r&&(n=!0),r?e(this.view):e});for(r.length&&(this.dynamicDecorationMap[e++]=n,t.push(Jw.join(r))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(uD).map(e=>typeof e==`function`?e(this.view):e)}scrollIntoView(e){if(e.isSnapshot){let t=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=t.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let t of this.view.state.facet(QE))try{if(t(this.view,e.range,e))return!0}catch(e){nD(this.view.state,e,`scroll handler`)}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)});let i=_D(this.view),a={left:n.left-i.left,top:n.top-i.top,right:n.right+i.right,bottom:n.bottom+i.bottom},{offsetWidth:o,offsetHeight:s}=this.view.scrollDOM;if(dE(this.view.scrollDOM,a,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,o),-o),Math.max(Math.min(e.yMargin,s),-s),this.view.textDirection==DE.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let e=this.view.docView.lineAt(t.head,1);if(e){let t=mE(e.dom);e.dom.scrollIntoView({block:`nearest`}),hE(t,!1)}}}lineHasWidget(e){let t=e=>e.isWidget()||e.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){RD(this.tile)}};function RD(e,t){let n=t?.get(e);if(n!=1){n??e.destroy();for(let n of e.children)RD(n,t)}}function zD(e){return ZT(e.node)&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable==`false`)&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable==`false`)}function BD(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=wE(n.focusNode,n.focusOffset),i=TE(n.focusNode,n.focusOffset),a=r||i;if(i&&r&&i.node!=r.node){let t=xD.get(i.node);if(!t||t.isText()&&t.text!=i.node.nodeValue)a=i;else if(e.docView.lastCompositionAfterCursor){let e=xD.get(r.node);!e||e.isText()&&e.text!=r.node.nodeValue||(a=i)}}if(e.docView.lastCompositionAfterCursor=a!=r,!a)return null;let o=t-a.offset;return{from:o,to:o+a.node.nodeValue.length,node:a.node}}function VD(e,t,n){let r=BD(e,n);if(!r)return null;let{node:i,from:a,to:o}=r,s=i.nodeValue;if(/[\n\r]/.test(s)||e.state.doc.sliceString(r.from,r.to)!=s)return null;let c=t.invertedDesc;return{range:new yD(c.mapPos(a),c.mapPos(o),a,o),text:i}}function HD(e,t){return ZT(e)?(t&&e.childNodes[t-1].contentEditable==`false`?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable==`false`?2:0):0}var UD=class{constructor(){this.changes=[]}compareRange(e,t){YT(e,t,this.changes)}comparePoint(e,t){YT(e,t,this.changes)}boundChange(e){YT(e,e,this.changes)}};function WD(e,t,n){let r=new UD;return Jw.compare(e,t,n,r),r.changes}var GD=class{constructor(){this.changes=[]}compareRange(e,t){YT(e,t,this.changes)}comparePoint(){}boundChange(e){YT(e,e,this.changes)}};function KD(e,t,n){let r=new GD;return Jw.compare(e,t,n,r),r.changes}function qD(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(ZT(n)&&n.contentEditable==`false`)return!0;return!1}function Pte(e,t){let n=!1;return t&&e.iterChangedRanges((e,r)=>{e<t.to&&r>t.from&&(n=!0)}),n}var JD=class extends VT{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement(`div`);return e.className=`cm-gap`,this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+`px`,!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}};function YD(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),a=t-i.from;if(i.length==0)return K.cursor(t);a==0?n=1:a==i.length&&(n=-1);let o=a,s=a;n<0?o=PC(i.text,a,!1):s=PC(i.text,a);let c=r(i.text.slice(o,s));for(;o>0;){let e=PC(i.text,o,!1);if(r(i.text.slice(e,o))!=c)break;o=e}for(;s<i.length;){let e=PC(i.text,s);if(r(i.text.slice(s,e))!=c)break;s=e}return K.undirectionalRange(o+i.from,s+i.from)}function XD(e,t,n,r,i){let a=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let t=e.viewState.heightOracle.textHeight,r=Math.floor((i-n.top-(e.defaultLineHeight-t)*.5)/t);a+=r*e.viewState.heightOracle.lineLength}let o=e.state.sliceDoc(n.from,n.to);return n.from+lT(o,a,e.state.tabSize)}function ZD(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let e;for(let i of r.type){if(i.from>t)break;if(!(i.to<t)){if(i.from<t&&i.to>t)return i;(!e||i.type==HT.Text&&(e.type!=i.type||(n<0?i.from<t:i.to>t)))&&(e=i)}}return e||r}return r}function QD(e,t,n,r){let i=ZD(e,t.head,t.assoc||-1),a=!r||i.type!=HT.Text||!(e.lineWrapping||i.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head);if(a){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),o=e.posAndSideAtCoords({x:n==(r==DE.LTR)?t.right-1:t.left+1,y:(a.top+a.bottom)/2});if(o)return K.cursor(o.pos,o.assoc)}return K.cursor(n?i.to:i.from,n?1:-1)}function $D(e,t,n,r){let i=e.state.doc.lineAt(t.head),a=e.bidiSpans(i),o=e.textDirectionAt(i.from);for(let s=t,c=null;;){let t=yte(i,a,o,s,n),l=BE;if(!t){if(i.number==(n?e.state.doc.lines:1))return s;l=`
29
- `,i=e.state.doc.line(i.number+(n?1:-1)),a=e.bidiSpans(i),t=n?K.cursor(i.from,-1):K.cursor(i.to,1)}if(!c){if(!r)return t;c=r(l)}else if(!c(l))return s;s=t}}function eO(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==Iw.Space&&(i=t),i==t}}function tO(e,t,n,r){let i=t.head,a=n?1:-1;if(i==(n?e.state.doc.length:0))return K.cursor(i,t.assoc);let o=t.goalColumn,s,c=e.contentDOM.getBoundingClientRect(),l=e.coordsAtPos(i,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(l)o??=l.left-c.left,s=a<0?l.top:l.bottom;else{let t=e.viewState.lineBlockAt(i);o??=Math.min(c.right-c.left,e.defaultCharacterWidth*(i-t.from)),s=(a<0?t.top:t.bottom)+u}let d=c.left+o,f=e.viewState.heightOracle.textHeight>>1,p=r??f;for(let t=0;;t+=f){let r=s+(p+t)*a,i=oO(e,{x:d,y:r},!1,a);if(n?r>c.bottom:r<c.top)return K.cursor(i.pos,i.assoc);let l=e.coordsAtPos(i.pos,i.assoc),u=l?(l.top+l.bottom)/2:0;if(!l||(n?u>s:u<s))return K.cursor(i.pos,i.assoc,void 0,o)}}function nO(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,a)=>{if(t>e&&t<i){let a=r||n||(t-e<i-t?-1:1);t=a<0?e:i,r=a}});if(!r)return t}}function rO(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let i=t.ranges[r],a=null;if(i.empty){let t=nO(e,i.from,0);t!=i.from&&(a=K.cursor(t,-1))}else{let t=nO(e,i.from,-1),n=nO(e,i.to,1);(t!=i.from||n!=i.to)&&(a=i.undirectional?K.undirectionalRange(i.from,i.to):K.range(i.from==i.anchor?t:n,i.from==i.head?t:n))}a&&(n||=t.ranges.slice(),n[r]=a)}return n?K.create(n,t.mainIndex):t}function iO(e,t,n){let r=nO(e.state.facet(fD).map(t=>t(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:K.cursor(r,r<n.from?1:-1)}var aO=class{constructor(e,t){this.pos=e,this.assoc=t}};function oO(e,t,n,r){let i=e.contentDOM.getBoundingClientRect(),a=i.top+e.viewState.paddingTop,{x:o,y:s}=t,c=s-a,l;for(;;){if(c<0)return new aO(0,1);if(c>e.viewState.docHeight)return new aO(e.state.doc.length,-1);if(l=e.elementAtHeight(c),r==null)break;if(l.type==HT.Text){if(r<0?l.to<e.viewport.from:l.from>e.viewport.to)break;let t=e.docView.coordsAt(r<0?l.from:l.to,r>0?-1:1);if(t&&(r<0?t.top<=c+a:t.bottom>=c+a))break}let t=e.viewState.heightOracle.textHeight/2;c=r>0?l.bottom+t:l.top-t}if(e.viewport.from>=l.to||e.viewport.to<=l.from){if(n)return null;if(l.type==HT.Text){let t=XD(e,i,l,o,s);return new aO(t,t==l.from?1:-1)}}if(l.type!=HT.Text)return c<(l.top+l.bottom)/2?new aO(l.from,1):new aO(l.to,-1);let u=e.docView.lineAt(l.from,2);return(!u||u.length!=l.length)&&(u=e.docView.lineAt(l.from,-2)),new sO(e,o,s,e.textDirectionAt(l.from)).scanTile(u,l.from)}var sO=class{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[PE.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[PE.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,i=e.length-1,a=new Set,o=this.bidiIn(e[0],e[i]),s,c,l=-1,u=1e9,d;search:for(;r<i;){let n=i-r,f=r+i>>1;adjust:if(a.has(f)){for(let e=1;e<n;e++){let t=f+e;if(t>=i&&(t-=n),!a.has(t)){f=t;break adjust}}break search}a.add(f);let p=t(f),m=0;if(p)for(let e=0;e<p.length;e++){let t=p[e];if(!(t.width==0&&p.length>1)){if(t.bottom<this.y)(!s||s.bottom<t.bottom)&&(s=t),m=1;else if(t.top>this.y)(!c||c.top>t.top)&&(c=t),m=-1;else{let e=t.left>this.x?this.x-t.left:t.right<this.x?this.x-t.right:0,n=Math.abs(e);n<u&&(l=f,u=n,d=t),e&&(m=e<0==(this.baseDir==DE.LTR)?-1:1)}}}m==-1&&(!o||this.baseDirAt(e[f],1))?i=f:m==1&&(!o||this.baseDirAt(e[f+1],-1))&&(r=f+1)}if(!d){if(!c&&!s)return{i:0,after:!1};let n=s&&(!c||this.y-s.bottom<c.top-this.y)?s:c;return this.y=(n.top+n.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:n,bottom:r}=d;if(s&&s.bottom>(n+n+r)/3)return this.y=s.bottom-1,this.scan(e,t,!0);if(c&&c.top<(n+r+r)/3)return this.y=c.top+1,this.scan(e,t,!0)}let f=(o?this.dirAt(e[l],1):this.baseDir)==DE.LTR;return{i:l,after:this.x>(d.left+d.right)/2==f}}scanText(e,t){let n=[];for(let r=0;r<e.length;r=PC(e.text,r))n.push(t+r);n.push(t+e.length);let r=this.scan(n,r=>{let i=n[r]-t,a=n[r+1]-t;return yE(e.dom,i,a).getClientRects()});return r.after?new aO(n[r.i+1],-1):new aO(n[r.i],1)}scanTile(e,t){if(!e.length)return new aO(t,1);if(e.children.length==1){let n=e.children[0];if(n.isText())return this.scanText(n,t);if(n.isComposite())return this.scanTile(n,t)}let n=[t];for(let r=0,i=t;r<e.children.length;r++)n.push(i+=e.children[r].length);let r=this.scan(n,t=>{let n=e.children[t];return n.flags&48?null:(ZT(n.dom)?n.dom:yE(n.dom,0,n.length)).getClientRects()}),i=e.children[r.i],a=n[r.i];return i.isText()?this.scanText(i,a):i.isComposite()?this.scanTile(i,a):r.after?new aO(n[r.i+1],-1):new aO(a,1)}},cO=`￿`,lO=class{constructor(e,t){this.points=e,this.view=t,this.text=``,this.lineSeparator=t.state.facet(Vw.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=cO}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=xD.get(r),a=r.nextSibling;if(a==t){i?.breakAfter&&!a&&n!=this.view.contentDOM&&this.lineBreak();break}let o=xD.get(a);(i&&o?i.breakAfter:(i?i.breakAfter:aE(r))||aE(a)&&(r.nodeName!=`BR`||i?.isWidget())&&this.text.length>e)&&!dO(a,t)&&this.lineBreak(),r=a}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i=-1,a=1,o;if(this.lineSeparator?(i=t.indexOf(this.lineSeparator,n),a=this.lineSeparator.length):(o=r.exec(t))&&(i=o.index,a=o[0].length),this.append(t.slice(n,i<0?t.length:i)),i<0)break;if(this.lineBreak(),a>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=a-1);n=i+a}}readNode(e){let t=xD.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else QT(e)?this.readTextNode(e):e.nodeName==`BR`?e.nextSibling&&this.lineBreak():ZT(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(QT(e)?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(uO(e,n.node,n.offset)?t:0))}};function uO(e,t,n){for(;;){if(!t||n<sE(t))return!1;if(t==e)return!0;n=iE(t)+1,t=t.parentNode}}function dO(e,t){let n;for(;e!=t&&e;e=e.nextSibling){let t=xD.get(e);if(!t?.isWidget())return!1;t&&(n||=[]).push(t)}if(n){for(let e of n)if(e.overrideDOMText?.length)return!1}return!0}var fO=class{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}},pO=class{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text=``,this.domChanged=t>-1;let{impreciseHead:i,impreciseAnchor:a}=e.docView,o=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=mO(e.docView.tile,t,n,0))){let t=i||a?[]:Ite(e),n=new lO(t,e);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=Lte(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!eE(e.contentDOM,t.focusNode)?o.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=a&&a.node==t.anchorNode&&a.offset==t.anchorOffset||!eE(e.contentDOM,t.anchorNode)?o.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset),s=e.viewport;if((q.ios||q.chrome)&&n!=r&&Math.min(n,r)<=o.main.from&&Math.max(n,r)>=o.main.to&&(s.from>0||s.to<e.state.doc.length)){let t=Math.min(n,r),i=Math.max(n,r),a=s.from-t,o=s.to-i;(a==0||a==1||t==0)&&(o==0||o==-1||i==e.state.doc.length)&&(n=0,r=e.state.doc.length)}if(e.inputState.composing>-1&&o.ranges.length>1)this.newSel=o.replaceRange(K.range(r,n));else if(e.lineWrapping&&r==n&&!(o.main.empty&&o.main.head==n)&&e.inputState.lastTouchTime>Date.now()-100){let t=e.coordsAtPos(n,-1),r=0;t&&(r=e.inputState.lastTouchY<=t.bottom?-1:1),this.newSel=K.create([K.cursor(n,r)])}else this.newSel=K.single(r,n)}}};function mO(e,t,n,r){if(e.isComposite()){let i=-1,a=-1,o=-1,s=-1;for(let c=0,l=r,u=r;c<e.children.length;c++){let r=e.children[c],d=l+r.length;if(l<t&&d>n)return mO(r,t,n,l);if(d>=t&&i==-1&&(i=c,a=l),l>n&&r.dom.parentNode==e.dom){o=c,s=u;break}u=d,l=d+r.breakAfter}return{from:a,to:s<0?r+e.length:s,startDOM:(i?e.children[i-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:o<e.children.length&&o>=0?e.children[o].dom:null}}return e.isText()?{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling}:null}function hO(e,t){let n,{newSel:r}=t,{state:i}=e,a=i.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:e,to:r}=t.bounds,s=a.from,c=null;(o===8||q.android&&t.text.length<r-e)&&(s=a.to,c=`end`);let l=i.doc.sliceString(e,r,cO),u,d;!a.empty&&a.from>=e&&a.to<=r&&(t.typeOver||l!=t.text)&&l.slice(0,a.from-e)==t.text.slice(0,a.from-e)&&l.slice(a.to-e)==t.text.slice(u=t.text.length-(l.length-(a.to-e)))?n={from:a.from,to:a.to,insert:CC.of(t.text.slice(a.from-e,u).split(cO))}:(d=_O(l,t.text,s-e,c))&&(q.chrome&&o==13&&d.toB==d.from+2&&t.text.slice(d.from,d.toB)==`￿￿`&&d.toB--,n={from:e+d.from,to:e+d.toA,insert:CC.of(t.text.slice(d.from,d.toB).split(cO))})}else r&&(!e.hasFocus&&i.facet(rD)||vO(r,a))&&(r=null);if(!n&&!r)return!1;if((q.mac||q.android)&&n&&n.from==n.to&&n.from==a.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute(`autocorrect`)==`off`?(r&&n.insert.length==2&&(r=K.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:CC.of([n.insert.toString().replace(`.`,` `)])}):i.doc.lineAt(a.from).to<a.to&&e.docView.lineHasWidget(a.to)&&e.inputState.insertingTextAt>Date.now()-50?n={from:a.from,to:a.to,insert:i.toText(e.inputState.insertingText)}:q.chrome&&n&&n.from==n.to&&n.from==a.head&&n.insert.toString()==`
30
- `&&e.lineWrapping&&(r&&=K.single(r.main.anchor-1,r.main.head-1),n={from:a.from,to:a.to,insert:CC.of([` `])}),n)return gO(e,n,r,o);if(r&&!vO(r,a)){let t=!1,n=`select`;return e.inputState.lastSelectionTime>Date.now()-50&&(e.inputState.lastSelectionOrigin==`select`&&(t=!0),n=e.inputState.lastSelectionOrigin,n==`select.pointer`&&(r=rO(i.facet(fD).map(t=>t(e)),r))),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}function gO(e,t,n,r=-1){if(q.ios&&e.inputState.flushIOSKey(t))return!0;let i=e.state.selection.main;if(q.android&&(t.to==i.to&&(t.from==i.from||t.from==i.from-1&&e.state.sliceDoc(t.from,i.from)==` `)&&t.insert.length==1&&t.insert.lines==2&&bE(e.contentDOM,`Enter`,13)||(t.from==i.from-1&&t.to==i.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>i.head)&&bE(e.contentDOM,`Backspace`,8)||t.from==i.from&&t.to==i.to+1&&t.insert.length==0&&bE(e.contentDOM,`Delete`,46)))return!0;let a=t.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let o,s=()=>o||=Fte(e,t,n);return e.state.facet(KE).some(n=>n(e,t.from,t.to,a,s))||e.dispatch(s()),!0}function Fte(e,t,n){let r,i=e.state,a=i.selection.main,o=-1;if(t.from==t.to&&t.from<a.from||t.from>a.to){let n=t.from<a.from?-1:1,r=n<0?a.from:a.to,s=nO(i.facet(fD).map(t=>t(e)),r,n);t.from==s&&(o=s)}if(o>-1)r={changes:t,selection:K.cursor(t.from+t.insert.length,-1)};else if(t.from>=a.from&&t.to<=a.to&&t.to-t.from>=(a.to-a.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=a.from<t.from?i.sliceDoc(a.from,t.from):``,o=a.to>t.to?i.sliceDoc(t.to,a.to):``;r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+o))}else{let o=i.changes(t),s=n&&n.main.to<=o.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=a.to+10&&t.to>=a.to-10){let c=e.state.sliceDoc(t.from,t.to),l,u=n&&BD(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(a.head);let d=a.to-t.to;r=i.changeByRange(n=>{if(n.from==a.from&&n.to==a.to)return{changes:o,range:s||n.map(o)};let r=n.to-d,u=r-c.length;if(e.state.sliceDoc(u,r)!=c||r>=l.from&&u<=l.to)return{range:n};let f=i.changes({from:u,to:r,insert:t.insert}),p=n.to-a.to;return{changes:f,range:s?K.range(Math.max(0,s.anchor+p),Math.max(0,s.head+p)):n.map(f)}})}else r={changes:o,selection:s&&i.selection.replaceRange(s)}}let s=`input.type`;return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=`.compose`,e.inputState.compositionFirstChange&&(s+=`.start`,e.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:s,scrollIntoView:!0})}function _O(e,t,n,r){let i=Math.min(e.length,t.length),a=0;for(;a<i&&e.charCodeAt(a)==t.charCodeAt(a);)a++;if(a==i&&e.length==t.length)return null;let o=e.length,s=t.length;for(;o>0&&s>0&&e.charCodeAt(o-1)==t.charCodeAt(s-1);)o--,s--;if(r==`end`){let e=Math.max(0,a-Math.min(o,s));n-=o+e-a}if(o<a&&e.length<t.length){let e=n<=a&&n>=o?a-n:0;a-=e,s=a+(s-o),o=a}else if(s<a){let e=n<=a&&n>=s?a-n:0;a-=e,o=a+(o-s),s=a}return{from:a,toA:o,toB:s}}function Ite(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}=e.observer.selectionRange;return n&&(t.push(new fO(n,r)),(i!=n||a!=r)&&t.push(new fO(i,a))),t}function Lte(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n<0||r<0?null:n==r?K.create([K.cursor(r+t,-1)]):K.single(n+t,r+t)}function vO(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}var yO=class{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText=``,this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,q.safari&&e.contentDOM.addEventListener(`input`,()=>null),q.gecko&&nk(e.contentDOM.ownerDocument)}handleEvent(e){NO(this.view,e)&&!this.ignoreDuringComposition(e)&&(e.type==`keydown`&&this.keydown(e)||(this.view.updateState==0?this.runHandlers(e.type,e):Promise.resolve().then(()=>this.runHandlers(e.type,e))))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=SO(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if(e!=`scroll`){let i=!t[e].handlers.length,a=n[e];a&&i!=!a.handlers.length&&(r.removeEventListener(e,this.handleEvent),a=null),a||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)e!=`scroll`&&!t[e]&&r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&TO.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),q.android&&q.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(q.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(CO.some(t=>t.keyCode==e.keyCode)&&!e.ctrlKey||wO.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};t.shiftKey&&q.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&bO(this.view.win)&&(t.shiftKey=!1);let n=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t};return setTimeout(()=>{this.pendingIOSKey==n&&this.flushIOSKey()},50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let t=this.pendingIOSKey;return!t||this.view.observer.pendingRecords().length||t.key==`Enter`&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,bE(this.view.contentDOM,t.key,t.keyCode,t.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:q.safari&&!q.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}};function bO(e){return e.visualViewport?e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<.85:!1}function xO(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){nD(n.state,e)}}}function SO(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec,r=e&&e.plugin.domEventHandlers,i=e&&e.plugin.domEventObservers;if(r)for(let e in r){let i=r[e];i&&n(e).handlers.push(xO(t.value,i))}if(i)for(let e in i){let r=i[e];r&&n(e).observers.push(xO(t.value,r))}}for(let e in PO)n(e).handlers.push(PO[e]);for(let e in FO)n(e).observers.push(FO[e]);return t}var CO=[{key:`Backspace`,keyCode:8,inputType:`deleteContentBackward`},{key:`Enter`,keyCode:13,inputType:`insertParagraph`},{key:`Enter`,keyCode:13,inputType:`insertLineBreak`},{key:`Delete`,keyCode:46,inputType:`deleteContentForward`}],wO=`dthko`,TO=[16,17,18,20,91,92,224,225],EO=6;function DO(e){return Math.max(0,e)*.7+8}function OO(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}var kO=class{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=fE(e.contentDOM),this.atoms=e.state.facet(fD).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener(`mousemove`,this.move=this.move.bind(this)),i.addEventListener(`mouseup`,this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Vw.allowMultipleSelections)&&AO(e,t),this.dragging=MO(e,t)&&GO(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&OO(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,i=0,a=this.view.win.innerWidth,o=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:i,bottom:o}=this.scrollParents.y.getBoundingClientRect());let s=_D(this.view);e.clientX-s.left<=r+EO?t=-DO(r-e.clientX):e.clientX+s.right>=a-EO&&(t=DO(e.clientX-a)),e.clientY-s.top<=i+EO?n=-DO(i-e.clientY):e.clientY+s.bottom>=o-EO&&(n=DO(e.clientY-o)),this.setScrollSpeed(t,n)}up(e){this.dragging??this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener(`mousemove`,this.move),e.removeEventListener(`mouseup`,this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,n=rO(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:n,userEvent:`select.pointer`}),this.mustSelect=!1}update(e){e.transactions.some(e=>e.isUserEvent(`input.type`))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}};function AO(e,t){let n=e.state.facet(VE);return n.length?n[0](t):q.mac?t.metaKey:t.ctrlKey}function jO(e,t){let n=e.state.facet(HE);return n.length?n[0](t):q.mac?!t.altKey:!t.ctrlKey}function MO(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=$T(e.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e<i.length;e++){let n=i[e];if(n.left<=t.clientX&&n.right>=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}function NO(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=xD.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var PO=Object.create(null),FO=Object.create(null),IO=q.ie&&q.ie_version<15||q.ios&&q.webkit_version<604;function LO(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement(`textarea`));n.style.cssText=`position: fixed; left: -10000px; top: 10px`,n.focus(),setTimeout(()=>{e.focus(),n.remove(),zO(e,n.value)},50)}function RO(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function zO(e,t){t=RO(e.state,JE,t);let{state:n}=e,r,i=1,a=n.toText(t),o=a.lines==n.selection.ranges.length;if(ZO!=null&&n.selection.ranges.every(e=>e.empty)&&ZO==a.toString()){let e=-1;r=n.changeByRange(r=>{let s=n.doc.lineAt(r.from);if(s.from==e)return{range:r};e=s.from;let c=n.toText((o?a.line(i++).text:t)+n.lineBreak);return{changes:{from:s.from,insert:c},range:K.cursor(r.from+c.length,-1)}})}else r=o?n.changeByRange(e=>{let t=a.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:K.cursor(e.from+t.length,-1)}}):n.replaceSelection(a);e.dispatch(r,{userEvent:`input.paste`,scrollIntoView:!0})}FO.scroll=e=>{let t=e.inputState;t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,q.ios&&!t.touchActive&&(t.lastIOSMomentumScroll=Date.now())},FO.wheel=FO.mousewheel=e=>{e.inputState.lastWheelEvent=Date.now()},PO.keydown=(e,t)=>(e.inputState.setSelectionOrigin(`select`),t.keyCode==27&&e.inputState.tabFocusMode!=0&&(e.inputState.tabFocusMode=Date.now()+2e3),!1),FO.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin(`select.pointer`)},FO.touchmove=e=>{e.inputState.setSelectionOrigin(`select.pointer`)},FO.touchend=(e,t)=>{e.inputState.touchActive=!1},PO.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(UE))if(n=r(e,t),n)break;if(!n&&t.button==0&&(n=KO(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new kO(e,t,n,r)),r&&e.observer.ignore(()=>{_E(e.contentDOM);let t=e.root.activeElement;t&&!t.contains(e.contentDOM)&&t.blur()});let i=e.inputState.mouseSelection;if(i)return i.start(t),i.dragging===!1}else e.inputState.setSelectionOrigin(`select.pointer`);return!1};function BO(e,t,n,r){if(r==1)return K.cursor(t,n);if(r==2)return YD(e.state,t,n);{let r=e.docView.lineAt(t,n),i=e.state.doc.lineAt(r?r.posAtEnd:t),a=r?r.posAtStart:i.from,o=r?r.posAtEnd:i.to;return o<e.state.doc.length&&o==i.to&&o++,K.undirectionalRange(a,o)}}var VO=q.ie&&q.ie_version<=11,HO=null,UO=0,WO=0;function GO(e){if(!VO)return e.detail;let t=HO,n=WO;return HO=e,WO=Date.now(),UO=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(UO+1)%3:1}function KO(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=GO(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,a,o){let s=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),c,l=BO(e,s.pos,s.assoc,r);if(n.pos!=s.pos&&!a){let t=BO(e,n.pos,n.assoc,r),i=Math.min(t.from,l.from),a=Math.max(t.to,l.to);l=i<l.from?K.range(i,a,l.assoc):K.range(a,i,l.assoc)}return a?i.replaceRange(i.main.extend(l.from,l.to,l.assoc)):o&&r==1&&i.ranges.length>1&&(c=qO(i,s.pos))?c:o?i.addRange(l):K.create([l])}}}function qO(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:i}=e.ranges[n];if(r<=t&&i>=t)return K.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-+(e.mainIndex>n))}return null}PO.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.tile.nearest(t.target);if(r&&r.isWidget()){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=K.undirectionalRange(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData(`Text`,RO(e.state,YE,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed=`copyMove`),!1},PO.dragend=e=>(e.inputState.draggedContent=null,!1);function JO(e,t,n,r){if(n=RO(e.state,JE,n),!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:a}=e.inputState,o=r&&a&&jO(e,t)?{from:a.from,to:a.to}:null,s={from:i,insert:n},c=e.state.changes(o?[o,s]:s);e.focus(),e.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?`move.drop`:`input.drop`}),e.inputState.draggedContent=null}PO.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,a=()=>{++i==n.length&&JO(e,t,r.filter(e=>e!=null).join(e.state.lineBreak),!1)};for(let e=0;e<n.length;e++){let t=new FileReader;t.onerror=a,t.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),a()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData(`Text`);if(n)return JO(e,t,n,!0),!0}return!1},PO.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=IO?null:t.clipboardData;return n?(zO(e,n.getData(`text/plain`)||n.getData(`text/uri-list`)),!0):(LO(e),!1)};function YO(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement(`textarea`));r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function XO(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let a=e.doc.lineAt(r);a.number>i&&(t.push(a.text),n.push({from:a.from,to:Math.min(e.doc.length,a.to+1)})),i=a.number}r=!0}return{text:RO(e,YE,t.join(e.lineBreak)),ranges:n,linewise:r}}var ZO=null;PO.copy=PO.cut=(e,t)=>{if(!tE(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=XO(e.state);if(!n&&!i)return!1;ZO=i?n:null,t.type==`cut`&&!e.state.readOnly&&e.dispatch({changes:r,scrollIntoView:!0,userEvent:`delete.cut`});let a=IO?null:t.clipboardData;return a?(a.clearData(),a.setData(`text/plain`,n),!0):(YO(e,n),!1)};var QO=Cw.define();function $O(e,t){let n=[];for(let r of e.facet(qE)){let i=r(e,t);i&&n.push(i)}return n.length?e.update({effects:n,annotations:QO.of(!0)}):null}function ek(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=$O(e.state,t);n?e.dispatch(n):e.update([])}},10)}FO.focus=e=>{e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft)&&(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),ek(e)},FO.blur=e=>{e.observer.clearSelectionRange(),ek(e)},FO.compositionstart=FO.compositionupdate=(e,t)=>{if(!e.observer.editContext&&(e.inputState.compositionFirstChange??(e.inputState.compositionFirstChange=!0),e.inputState.composing<0)){let{main:t}=e.state.selection;!t.empty&&e.lineBlockAt(t.from).from!=e.lineBlockAt(t.to).from&&!e.state.readOnly&&e.dispatch({changes:e.state.selection.ranges.filter(e=>!e.empty).map(e=>({from:e.from,to:e.to})),userEvent:`input`}),e.inputState.composing=0}},FO.compositionend=e=>{e.observer.editContext||(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,q.chrome&&q.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50))},FO.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},PO.beforeinput=(e,t)=>{if((t.inputType==`insertText`||t.inputType==`insertCompositionText`)&&(e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now()),t.inputType==`insertReplacementText`&&e.observer.editContext){let n=t.dataTransfer?.getData(`text/plain`),r=t.getTargetRanges();if(n&&r.length){let t=r[0];return gO(e,{from:e.posAtDOM(t.startContainer,t.startOffset),to:e.posAtDOM(t.endContainer,t.endOffset),insert:e.state.toText(n)},null),!0}}let n;if(q.chrome&&q.android&&(n=CO.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(n.key,n.keyCode),n.key==`Backspace`||n.key==`Delete`)){let t=window.visualViewport?.height||0;setTimeout(()=>{(window.visualViewport?.height||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return q.ios&&t.inputType==`deleteContentForward`&&e.observer.flushSoon(),q.safari&&t.inputType==`insertText`&&e.inputState.composing>=0&&setTimeout(()=>FO.compositionend(e,t),20),!1};var tk=new Set;function nk(e){tk.has(e)||(tk.add(e),e.addEventListener(`copy`,()=>{}),e.addEventListener(`cut`,()=>{}))}var rk=[`pre-wrap`,`normal`,`pre-line`,`break-spaces`],ik=!1;function ak(){ik=!1}var ok=class{constructor(e){this.lineWrapping=e,this.doc=CC.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return rk.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r<0?n++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,n,r,i,a){let o=rk.indexOf(e)>-1,s=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,s){this.heightSamples={};for(let e=0;e<a.length;e++){let t=a[e];t<0?e++:this.heightSamples[Math.floor(t*10)]=!0}}return s}},sk=class{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}},ck=class e{constructor(e,t,n,r,i){this.from=e,this.length=t,this.top=n,this.height=r,this._content=i}get type(){return typeof this._content==`number`?HT.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof KT?this._content.widget:null}get widgetLineBreaks(){return typeof this._content==`number`?this._content:0}join(t){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new e(this.from,this.length+t.length,this.top,this.height+t.height,n)}},lk=(function(e){return e[e.ByPos=0]=`ByPos`,e[e.ByHeight=1]=`ByHeight`,e[e.ByPosNoHeight=2]=`ByPosNoHeight`,e})(lk||={}),uk=.001,dk=class e{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>uk&&(ik=!0),this.height=e)}replace(t,n,r){return e.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,a=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:s,toA:c,fromB:l,toB:u}=r[o],d=i.lineAt(s,lk.ByPosNoHeight,n.setDoc(t),0,0),f=d.to>=c?d:i.lineAt(c,lk.ByPosNoHeight,n,0,0);for(u+=f.to-c,c=f.to;o>0&&d.from<=r[o-1].toA;)s=r[o-1].fromA,l=r[o-1].fromB,o--,s<d.from&&(d=i.lineAt(s,lk.ByPosNoHeight,n,0,0));l+=d.from-s,s=d.from;let p=Vte.build(n.setDoc(a),e,l,u);i=fk(i,i.replace(s,c,p))}return i.updateHeight(n,0)}static empty(){return new mk(0,0,0)}static of(t){if(t.length==1)return t[0];let n=0,r=t.length,i=0,a=0;for(;;)if(n==r){if(i>a*2){let e=t[n-1];e.break?t.splice(--n,1,e.left,null,e.right):t.splice(--n,1,e.left,e.right),r+=1+e.break,i-=e.size}else if(a>i*2){let e=t[r];e.break?t.splice(r,1,e.left,null,e.right):t.splice(r,1,e.left,e.right),r+=2+e.break,a-=e.size}else break}else if(i<a){let e=t[n++];e&&(i+=e.size)}else{let e=t[--r];e&&(a+=e.size)}let o=!1;return t[n-1]==null?(o=!0,n--):t[n]??(o=!0,r++),new zte(e.of(t.slice(0,n)),o,e.of(t.slice(r)))}};function fk(e,t){return e==t?e:(e.constructor!=t.constructor&&(ik=!0),t)}dk.prototype.size=1;var Rte=UT.replace({}),pk=class extends dk{constructor(e,t,n){super(e,t),this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new ck(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new ck(r,0,n,this.spaceAbove,Rte):this.mainBlock(n,r)}lineAt(e,t,n,r,i){let a=this.mainBlock(r,i);return this.spaceAbove?this.blockAt(0,n,r,i).join(a):a}forEachLine(e,t,n,r,i,a){e<=i+this.length&&t>=i&&a(this.lineAt(0,lk.ByPos,n,r,i))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}},mk=class e extends pk{constructor(e,t,n){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new ck(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(t,n,r){let i=r[0];return r.length==1&&(i instanceof e||i instanceof hk&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof hk?i=new e(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):dk.of(r)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setMeasuredHeight(r):(n||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:``}${this.widgetHeight?`:`+this.widgetHeight:``})`}},hk=class e extends dk{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,i=r-n+1,a,o=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*i);a=t/i,this.length>i+1&&(o=(this.height-t)/(this.length-i-1))}else a=this.height/i;return{firstLine:n,lastLine:r,perLine:a,perChar:o}}blockAt(e,t,n,r){let{firstLine:i,lastLine:a,perLine:o,perChar:s}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),a=t.doc.lineAt(i),c=o+a.length*s,l=Math.max(n,e-c/2);return new ck(a.from,a.length,l,c,0)}{let r=Math.max(0,Math.min(a-i,Math.floor((e-n)/o))),{from:s,length:c}=t.doc.line(i+r);return new ck(s,c,n+o*r,o,0)}}lineAt(e,t,n,r,i){if(t==lk.ByHeight)return this.blockAt(e,n,r,i);if(t==lk.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new ck(t,r-t,0,0,0)}let{firstLine:a,perLine:o,perChar:s}=this.heightMetrics(n,i),c=n.doc.lineAt(e),l=o+c.length*s,u=c.number-a,d=r+o*u+s*(c.from-i-u);return new ck(c.from,c.length,Math.max(r,Math.min(d,r+this.height-l)),l,0)}forEachLine(e,t,n,r,i,a){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:o,perLine:s,perChar:c}=this.heightMetrics(n,i);for(let l=e,u=r;l<=t;){let t=n.doc.lineAt(l);if(l==e){let n=t.number-o;u+=s*n+c*(e-i-n)}let r=s+c*t.length;a(new ck(t.from,t.length,u,r,0)),u+=r,l=t.to+1}}replace(t,n,r){let i=this.length-n;if(i>0){let t=r[r.length-1];t instanceof e?r[r.length-1]=new e(t.length+i):r.push(null,new e(i-1))}if(t>0){let n=r[0];n instanceof e?r[0]=new e(t+n.length):r.unshift(new e(t-1),null)}return dk.of(r)}decomposeLeft(t,n){n.push(new e(t-1),null)}decomposeRight(t,n){n.push(null,new e(this.length-t-1))}updateHeight(t,n=0,r=!1,i){let a=n+this.length;if(i&&i.from<=n+this.length&&i.more){let r=[],o=Math.max(n,i.from),s=-1;for(i.from>n&&r.push(new e(i.from-n-1).updateHeight(t,n));o<=a&&i.more;){let e=t.doc.lineAt(o).length;r.length&&r.push(null);let n=i.heights[i.index++],a=0;n<0&&(a=-n,n=i.heights[i.index++]),s==-1?s=n:Math.abs(n-s)>=uk&&(s=-2);let c=new mk(e,n,a);c.outdated=!1,r.push(c),o+=e+1}o<=a&&r.push(null,new e(a-o).updateHeight(t,o));let c=dk.of(r);return(s<0||Math.abs(c.height-this.height)>=uk||Math.abs(s-this.heightMetrics(t,n).perLine)>=uk)&&(ik=!0),fk(this,c)}return(r||this.outdated)&&(this.setHeight(t.heightForGap(n,n+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}},zte=class extends dk{constructor(e,t,n){super(e.length+ +!!t+n.length,e.height+n.height,+!!t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let i=n+this.left.height;return e<i?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,i,r+this.left.length+this.break)}lineAt(e,t,n,r,i){let a=r+this.left.height,o=i+this.left.length+this.break,s=t==lk.ByHeight?e<a:e<o,c=s?this.left.lineAt(e,t,n,r,i):this.right.lineAt(e,t,n,a,o);if(this.break||(s?c.to<o:c.from>o))return c;let l=t==lk.ByPosNoHeight?lk.ByPosNoHeight:lk.ByPos;return s?c.join(this.right.lineAt(o,l,n,a,o)):this.left.lineAt(o,l,n,r,i).join(c)}forEachLine(e,t,n,r,i,a){let o=r+this.left.height,s=i+this.left.length+this.break;if(this.break)e<s&&this.left.forEachLine(e,t,n,r,i,a),t>=s&&this.right.forEachLine(e,t,n,o,s,a);else{let c=this.lineAt(s,lk.ByPos,n,r,i);e<c.from&&this.left.forEachLine(e,Math.min(t,c.from-1),n,r,i,a),c.to>=e&&c.from<=t&&a(c),t>c.to&&this.right.forEachLine(Math.max(e,c.to+1),t,n,o,s,a)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let a=i.length;for(let e of n)i.push(e);if(e>0&&gk(i,a-1),t<this.length){let e=i.length;this.decomposeRight(t,i),gk(i,e)}return dk.of(i)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(n++,e>=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<n&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?dk.of(this.break?[e,null,t]:[e,t]):(this.left=fk(this.left,e),this.right=fk(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:a}=this,o=t+i.length+this.break,s=null;return r&&r.from<=t+i.length&&r.more?s=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=o+a.length&&r.more?s=a=a.updateHeight(e,o,n,r):a.updateHeight(e,o,n),s?this.balanced(i,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?` `:`-`)+this.right}};function gk(e,t){let n,r;e[t]==null&&(n=e[t-1])instanceof hk&&(r=e[t+1])instanceof hk&&e.splice(t-1,3,new hk(n.length+1+r.length))}var Bte=5,Vte=class e{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof mk?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new mk(e-this.pos,-1,0)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=t-e;n.block?this.addBlock(new pk(a,r,n)):(a||i||r>=Bte)&&this.addLineDeco(r,i,a)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new mk(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let n=new hk(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof mk)return e;let t=new mk(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos+=e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos+=n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof mk)&&!this.isCovered?this.nodes.push(new mk(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let e of this.nodes)e instanceof mk&&e.updateHeight(this.oracle,n),n+=e?e.length:1;return this.nodes}static build(t,n,r,i){let a=new e(r,t);return Jw.spans(n,r,i,a,0),a.finish(r)}};function _k(e,t,n){let r=new vk;return Jw.compare(e,t,n,r,0),r.changes}var vk=class{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){(e<t||n&&n.heightRelevant||r&&r.heightRelevant)&&YT(e,t,this.changes,5)}};function yk(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,i=r.defaultView||window,a=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),s=Math.max(0,n.top),c=Math.min(i.innerHeight,n.bottom);for(let t=e.parentNode;t&&t!=r.body;)if(ZT(t)){let n=window.getComputedStyle(t);if((t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth)&&n.overflow!=`visible`){let n=t.getBoundingClientRect();a=Math.max(a,n.left),o=Math.min(o,n.right),s=Math.max(s,n.top),c=Math.min(t==e.parentNode?i.innerHeight:c,n.bottom)}t=n.position==`absolute`||n.position==`fixed`?t.offsetParent:t.parentNode}else if(t.nodeType==11)t=t.host;else break;return{left:a-n.left,right:Math.max(a,o)-n.left,top:s-(n.top+t),bottom:Math.max(s,c)-(n.top+t)}}function bk(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function xk(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}var Sk=class{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(e,t){return UT.replace({widget:new Ck(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}},Ck=class extends VT{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement(`div`);return this.vertical?e.style.height=this.size+`px`:(e.style.width=this.size+`px`,e.style.height=`2px`,e.style.display=`inline-block`),e}get estimatedHeight(){return this.vertical?this.size:-1}},wk=class{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Ak,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=DE.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(cD).some(e=>typeof e!=`function`&&e.class==`cm-lineWrapping`);this.heightOracle=new ok(n),this.stateDeco=jk(t),this.heightMap=dk.empty().applyChanges(this.stateDeco,CC.empty,this.heightOracle.setDoc(t.doc),[new yD(0,0,0,t.doc.length)]);for(let e=0;e<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());e++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=UT.set(this.lineGaps.map(e=>e.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new Tk(t,n))}}return this.viewports=e.sort((e,t)=>e.from-t.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?Ak:Mk.get(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Nk(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=jk(this.state);let r=e.changedRanges,i=yD.extendWithRanges(r,_k(n,this.stateDeco,e?e.changes:HC.empty(this.state.doc.length))),a=this.heightMap.height,o=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);ak(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),(this.heightMap.height!=a||ik)&&(e.flags|=2),o?(this.scrollAnchorPos=e.changes.mapPos(o.from,-1),this.scrollAnchorHeight=o.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<s.from||t.range.head>s.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let c=s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,e.flags|=this.updateForViewport(),(c||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(ZE)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection=n.direction==`rtl`?DE.RTL:DE.LTR;let a=this.heightOracle.mustRefreshForWrapping(i)||this.mustMeasureContent===`refresh`,o=t.getBoundingClientRect(),s=a||this.mustMeasureContent||this.contentDOMHeight!=o.height;this.contentDOMHeight=o.height,this.mustMeasureContent=!1;let c=0,l=0;if(o.width&&o.height){let{scaleX:e,scaleY:n}=uE(t,o);(e>.005&&Math.abs(this.scaleX-e)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=e,this.scaleY=n,c|=16,a=s=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;(this.paddingTop!=u||this.paddingBottom!=d)&&(this.paddingTop=u,this.paddingBottom=d,c|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(s=!0),this.editorWidth=e.scrollDOM.clientWidth,c|=16);let f=fE(this.view.contentDOM,!1).y;f!=this.scrollParent&&(this.scrollParent=f,this.scrollAnchorHeight=-1,this.scrollOffset=0);let p=this.getScrollOffset();this.scrollOffset!=p&&(this.scrollAnchorHeight=-1,this.scrollOffset=p),this.scrolledToBottom=CE(this.scrollParent||e.win);let m=(this.printing?xk:yk)(t,this.paddingTop),h=m.top-this.pixelViewport.top,g=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let _=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(_!=this.inView&&(this.inView=_,_&&(s=!0)),!this.inView&&!this.scrollTarget&&!bk(e.dom))return 0;let v=o.width;if((this.contentDOMWidth!=v||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=o.width,this.editorHeight=e.scrollDOM.clientHeight,c|=16),s){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(a=!0),a||r.lineWrapping&&Math.abs(v-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:o,textHeight:s}=e.docView.measureTextSize();a=n>0&&r.refresh(i,n,o,s,Math.max(5,v/o),t),a&&(e.docView.minWidth=0,c|=16)}h>0&&g>0?l=Math.max(h,g):h<0&&g<0&&(l=Math.min(h,g)),ak();for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(a?dk.empty().applyChanges(this.stateDeco,CC.empty,this.heightOracle,[new yD(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new sk(n.from,i))}ik&&(c|=2)}let y=!this.viewportIsAppropriate(this.viewport,l)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return y&&(c&2&&(c|=this.updateScaler()),this.viewport=this.getViewport(l,this.scrollTarget),c|=this.updateForViewport()),(c&2||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:a,visibleBottom:o}=this,s=new Tk(r.lineAt(a-n*1e3,lk.ByHeight,i,0,0).from,r.lineAt(o+(1-n)*1e3,lk.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(e<s.from||e>s.to){let n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),a=r.lineAt(e,lk.ByPos,i,0,0),o;o=t.y==`center`?(a.top+a.bottom)/2-n/2:t.y==`start`||t.y==`nearest`&&e<s.from?a.top:a.bottom-n,s=new Tk(r.lineAt(o-500,lk.ByHeight,i,0,0).from,r.lineAt(o+n+500,lk.ByHeight,i,0,0).to)}}return s}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new Tk(this.heightMap.lineAt(n,lk.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,lk.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,lk.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(t,lk.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:o}=this;return(e==0||r<=a-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>a-2e3&&i<o+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)t.touchesRange(r.from,r.to)||n.push(new Sk(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2e3,i=r>>1,a=r<<1;if(this.defaultTextDirection!=DE.LTR&&!n)return[];let o=[],s=(r,a,c,l)=>{if(a-r<i)return;let u=this.state.selection.main,d=[u.from];u.empty||d.push(u.to);for(let e of d)if(e>r&&e<a){s(r,e-10,c,l),s(e+10,a,c,l);return}let f=kk(e,e=>e.from>=c.from&&e.to<=c.to&&Math.abs(e.from-r)<i&&Math.abs(e.to-a)<i&&!d.some(t=>e.from<t&&e.to>t));if(!f){if(a<c.to&&t&&n&&t.visibleRanges.some(e=>e.from<=a&&e.to>=a)){let e=t.moveToLineBoundary(K.cursor(a),!1,!0).head;e>r&&(a=e)}let e=this.gapSize(c,r,a,l);f=new Sk(r,a,e,n||e<2e6?e:2e6)}o.push(f)},c=t=>{if(t.length<a||t.type!=HT.Text)return;let i=Ek(t.from,t.to,this.stateDeco);if(i.total<a)return;let o=this.scrollTarget?this.scrollTarget.range.head:null,c,l;if(n){let e=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,n,a;if(o!=null){let r=Ok(i,o),s=((this.visibleBottom-this.visibleTop)/2+e)/t.height;n=r-s,a=r+s}else n=(this.visibleTop-t.top-e)/t.height,a=(this.visibleBottom-t.top+e)/t.height;c=Dk(i,n),l=Dk(i,a)}else{let n=i.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth,s=0;if(n>2e6)for(let n of e)n.from>=t.from&&n.from<t.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+s<this.pixelViewport.left&&(s=n.size-n.displaySize);let u=this.pixelViewport.left+s,d=this.pixelViewport.right+s,f,p;if(o!=null){let e=Ok(i,o),t=((d-u)/2+a)/n;f=e-t,p=e+t}else f=(u-a)/n,p=(d+a)/n;c=Dk(i,f),l=Dk(i,p)}c>t.from&&s(t.from,c,t,i),l<t.to&&s(l,t.to,t,i)};for(let e of this.viewportLines)Array.isArray(e.type)?e.type.forEach(c):c(e);return o}gapSize(e,t,n,r){let i=Ok(r,n)-Ok(r,t);return this.heightOracle.lineWrapping?e.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(e){Sk.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=UT.set(e.map(e=>e.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let n=[];Jw.spans(t,this.viewport.from,this.viewport.to,{span(e,t){n.push({from:e,to:t})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let t=0;t<n.length&&!(r&8);t++){let i=this.visibleRanges[t],a=n[t];(i.from!=a.from||i.to!=a.to)&&(r|=4,e&&e.mapPos(i.from,-1)==a.from&&e.mapPos(i.to,1)==a.to||(r|=8))}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||Nk(this.heightMap.lineAt(e,lk.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||Nk(this.heightMap.lineAt(this.scaler.fromDOM(e),lk.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+12-this.paddingTop);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Nk(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}},Tk=class{constructor(e,t){this.from=e,this.to=t}};function Ek(e,t,n){let r=[],i=e,a=0;return Jw.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),a+=e-i),i=t}},20),i<t&&(r.push({from:i,to:t}),a+=t-i),{total:a,ranges:r}}function Dk({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],a=i-n;if(r<=a)return n+r;r-=a}}function Ok(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}function kk(e,t){for(let n of e)if(t(n))return n}var Ak={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function jk(e){let t=e.facet(lD).filter(e=>typeof e!=`function`),n=e.facet(dD).filter(e=>typeof e!=`function`);return n.length&&t.push(Jw.join(n)),t}var Mk=class e{constructor(e,t){this.scale=e,this.viewports=t}static get(t,n,r){let i=0,a=0,o=0,s=r.map(({from:e,to:r})=>{let a=n.lineAt(e,lk.ByPos,t,0,0).top,o=n.lineAt(r,lk.ByPos,t,0,0).bottom;return i+=o-a,{from:e,to:r,top:a,bottom:o,domTop:0,domBottom:0}});if(n.height-i<10)return Ak;let c=(7e6-i)/(n.height-i);for(let e of s)e.domTop=o+(e.top-a)*c,o=e.domBottom=e.domTop+(e.bottom-e.top),a=e.bottom;return new e(c,s)}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.top)return r+(e-n)*this.scale;if(e<=i.bottom)return i.domTop+(e-i.top);n=i.bottom,r=i.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let i=t<this.viewports.length?this.viewports[t]:null;if(!i||e<i.domTop)return n+(e-r)/this.scale;if(e<=i.domBottom)return i.top+(e-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof e&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to)}};function Nk(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new ck(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map(e=>Nk(e,t)):e._content)}var Pk=QC.define({combine:e=>e.join(` `)}),Fk=QC.define({combine:e=>e.indexOf(!0)>-1}),Ik=mT.newName(),Lk=mT.newName(),Rk=mT.newName(),zk={"&light":`.`+Lk,"&dark":`.`+Rk};function Bk(e,t,n){return new mT(t,{finish(t){return/&/.test(t)?t.replace(/&\w*/,t=>{if(t==`&`)return e;if(!n||!n[t])throw RangeError(`Unsupported selector: ${t}`);return n[t]}):e+` `+t}})}var Vk=Bk(`.`+Ik,{"&":{position:`relative !important`,boxSizing:`border-box`,"&.cm-focused":{outline:`1px dotted #212121`},display:`flex !important`,flexDirection:`column`},".cm-scroller":{display:`flex !important`,alignItems:`flex-start !important`,fontFamily:`monospace`,lineHeight:1.4,height:`100%`,overflowX:`auto`,position:`relative`,zIndex:0,overflowAnchor:`none`},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:`block`,whiteSpace:`pre`,wordWrap:`normal`,boxSizing:`border-box`,minHeight:`100%`,padding:`4px 0`,outline:`none`,"&[contenteditable=true]":{WebkitUserModify:`read-write-plaintext-only`}},".cm-lineWrapping":{whiteSpace_fallback:`pre-wrap`,whiteSpace:`break-spaces`,wordBreak:`break-word`,overflowWrap:`anywhere`,flexShrink:1},"&light .cm-content":{caretColor:`black`},"&dark .cm-content":{caretColor:`white`},".cm-line":{display:`block`,padding:`0 2px 0 6px`},".cm-layer":{userSelect:`none`,position:`absolute`,left:0,top:0,contain:`size style`,"& > *":{position:`absolute`}},"&light .cm-selectionBackground":{background:`#d9d9d9`},"&dark .cm-selectionBackground":{background:`#222`},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#d7d4f0`},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:`#233`},".cm-cursorLayer":{pointerEvents:`none`},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:`steps(1) cm-blink 1.2s infinite`},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:`1.2px solid black`,marginLeft:`-0.6px`,pointerEvents:`none`},".cm-cursor":{display:`none`},"&dark .cm-cursor":{borderLeftColor:`#ddd`},".cm-selectionHandle":{backgroundColor:`currentColor`,width:`1.5px`},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:`""`,backgroundColor:`inherit`,borderRadius:`50%`,width:`8px`,height:`8px`,position:`absolute`,left:`-3.25px`},".cm-selectionHandle-start::before":{top:`-8px`},".cm-selectionHandle-end::before":{bottom:`-8px`},".cm-dropCursor":{position:`absolute`},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:`block`},".cm-iso":{unicodeBidi:`isolate`},".cm-announced":{position:`fixed`,top:`-10000px`},"@media print":{".cm-announced":{display:`none`}},"&light .cm-activeLine":{backgroundColor:`#cceeff44`},"&dark .cm-activeLine":{backgroundColor:`#99eeff33`},"&light .cm-specialChar":{color:`red`},"&dark .cm-specialChar":{color:`#f78`},".cm-gutters":{flexShrink:0,display:`flex`,height:`100%`,boxSizing:`border-box`,zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:`#f5f5f5`,color:`#6c6c6c`,border:`0px solid #ddd`,"&.cm-gutters-before":{borderRightWidth:`1px`},"&.cm-gutters-after":{borderLeftWidth:`1px`}},"&dark .cm-gutters":{backgroundColor:`#333338`,color:`#ccc`},".cm-gutter":{display:`flex !important`,flexDirection:`column`,flexShrink:0,boxSizing:`border-box`,minHeight:`100%`,overflow:`hidden`},".cm-gutterElement":{boxSizing:`border-box`},".cm-lineNumbers .cm-gutterElement":{padding:`0 3px 0 5px`,minWidth:`20px`,textAlign:`right`,whiteSpace:`nowrap`},"&light .cm-activeLineGutter":{backgroundColor:`#e2f2ff`},"&dark .cm-activeLineGutter":{backgroundColor:`#222227`},".cm-panels":{boxSizing:`border-box`,position:`sticky`,left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:`#f5f5f5`,color:`black`},".cm-panels-top":{top:`0`},".cm-panels-bottom":{bottom:`0`},"&light .cm-panels-top":{borderBottom:`1px solid #ddd`},"&light .cm-panels-bottom":{borderTop:`1px solid #ddd`},"&dark .cm-panels":{backgroundColor:`#333338`,color:`white`},".cm-dialog":{padding:`2px 19px 4px 6px`,position:`relative`,"& label":{fontSize:`80%`}},".cm-dialog-close":{position:`absolute`,top:`3px`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,fontSize:`14px`,padding:`0`},".cm-tab":{display:`inline-block`,overflow:`hidden`,verticalAlign:`bottom`},".cm-widgetBuffer":{verticalAlign:`baseline`,height:`1em`,width:0,display:`inline`},".cm-placeholder":{color:`#888`,display:`inline-block`,verticalAlign:`top`,userSelect:`none`},".cm-highlightSpace":{background:`radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat`,backgroundSize:`.4em`,backgroundPosition:`calc(min(50%, 0px)) center`},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:`auto 100%`,backgroundPosition:`right 90%`,backgroundRepeat:`no-repeat`},".cm-trailingSpace":{backgroundColor:`#ff332255`},".cm-button":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,padding:`.2em 1em`,borderRadius:`1px`},"&light .cm-button":{backgroundImage:`linear-gradient(#eff1f5, #d9d9df)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#b4b4b4, #d0d3d6)`}},"&dark .cm-button":{backgroundImage:`linear-gradient(#393939, #111)`,border:`1px solid #888`,"&:active":{backgroundImage:`linear-gradient(#111, #333)`}},".cm-textfield":{verticalAlign:`middle`,color:`inherit`,fontSize:`70%`,border:`1px solid silver`,padding:`.2em .5em`},"&light .cm-textfield":{backgroundColor:`white`},"&dark .cm-textfield":{border:`1px solid #555`,backgroundColor:`inherit`}},zk),Hk={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Uk=q.ie&&q.ie_version<=11,Wk=class{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new pE,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(q.ie&&q.ie_version<=11||q.ios&&e.composing)&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&q.android&&e.constructor.EDIT_CONTEXT!==!1&&!(q.chrome&&q.chrome_version<126)&&(this.editContext=new Jk(e),e.state.facet(rD)&&(e.contentDOM.editContext=this.editContext.editContext)),Uk&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia(`print`)),typeof ResizeObserver==`function`&&(this.resizeScroll=new ResizeObserver(()=>{this.view.docView?.lastUpdate<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver==`function`&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent(`Event`)))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent(`Event`))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers(`scroll`,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(this.pendingRecords().length>0),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type!=`change`&&e.type||e.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(rD)?n.root.activeElement!=this.dom:!tE(this.dom,r))return;let i=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(i&&i.isWidget()&&i.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(q.ie&&q.ie_version<=11||q.android&&q.chrome)&&!n.state.selection.main.empty&&r.focusNode&&rE(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=$T(e.root);if(!t)return!1;let n=q.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&qk(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=tE(this.dom,n);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&SE(this.dom,n)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(ZT(n))!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n?e++:t||=this.scrollTargets.slice(0,e),t&&t.push(n),n=n.assignedSlot||n.parentNode;else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);for(let e of this.scrollTargets=t)e.addEventListener(`scroll`,this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||=(this.observer.observe(this.dom,Hk),Uk&&this.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Uk&&this.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){if(!this.delayedAndroidKey){let e=()=>{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&bE(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}(!this.delayedAndroidKey||e==`Enter`)&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!this.delayedAndroidKey?.force})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),t==-1?{from:t,to:n}=e:(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&tE(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new pO(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.selectionChanged,n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=hO(this.view,n);return this.view.state==r&&(n.domChanged||t)&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type==`attributes`),e.type==`childList`){let n=Gk(t,e.previousSibling||e.target.previousSibling,-1),r=Gk(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return e.type==`characterData`?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener(`change`,this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener(`beforeprint`,this.onPrint),e.addEventListener(`scroll`,this.onScroll),e.document.addEventListener(`selectionchange`,this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener(`scroll`,this.onScroll),e.removeEventListener(`resize`,this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener(`change`,this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener(`beforeprint`,this.onPrint),e.document.removeEventListener(`selectionchange`,this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(rD)!=e.state.facet(rD)&&(e.view.contentDOM.editContext=e.state.facet(rD)?this.editContext.editContext:null))}destroy(){var e,t,n;this.stop(),(e=this.intersection)==null||e.disconnect(),(t=this.gapIntersection)==null||t.disconnect(),(n=this.resizeScroll)==null||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener(`scroll`,this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}};function Gk(e,t,n){for(;t;){let r=xD.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i==e.dom?n>0?t.nextSibling:t.previousSibling:i}return null}function Kk(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.docView.domAtPos(e.state.selection.main.anchor,1);return rE(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function qk(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return Kk(e,n)}let n=null;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.contentDOM.addEventListener(`beforeinput`,r,!0),e.dom.ownerDocument.execCommand(`indent`),e.contentDOM.removeEventListener(`beforeinput`,r,!0),n?Kk(e,n):null}var Jk=class{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=n=>{let r=e.state.selection.main,{anchor:i,head:a}=r,o=this.toEditorPos(n.updateRangeStart),s=this.toEditorPos(n.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:n.updateRangeStart,editorBase:o,drifted:!1});let c=s-o>n.text.length;o==this.from&&i<this.from?o=i:s==this.to&&i>this.to&&(s=i);let l=_O(e.state.sliceDoc(o,s),n.text,(c?r.from:r.to)-o,c?`end`:null);if(!l){let t=K.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));vO(t,r)||e.dispatch({selection:t,userEvent:`select`});return}let u={from:l.from+o,to:l.toA+o,insert:CC.of(n.text.slice(l.from,l.toB).split(`
31
- `))};if((q.mac||q.android)&&u.from==a-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute(`autocorrect`)==`off`&&(u={from:o,to:s,insert:CC.of([n.text.replace(`.`,` `)])}),this.pendingContextChange=u,!e.state.readOnly){let t=this.to-this.from+(u.to-u.from+u.insert.length);gO(e,u,K.single(this.toEditorPos(n.selectionStart,t),this.toEditorPos(n.selectionEnd,t)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1)))&&this.handlers.compositionend(n)},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let t=this.toEditorPos(n.rangeStart),a=this.toEditorPos(n.rangeEnd);t<a;t++){let n=e.coordsForChar(t);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=t=>{let n=[];for(let e of t.getTextFormats()){let t=e.underlineStyle,r=e.underlineThickness;if(!/none/i.test(t)&&!/none/i.test(r)){let i=this.toEditorPos(e.rangeStart),a=this.toEditorPos(e.rangeEnd);if(i<a){let e=`text-decoration: underline ${/^[a-z]/.test(t)?t+` `:t==`Dashed`?`dashed `:t==`Squiggle`?`wavy `:``}${/thin/i.test(r)?1:2}px`;n.push(UT.mark({attributes:{style:e}}).range(i,a))}}}e.dispatch({effects:tD.of(UT.set(n))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:t}=this.composing;this.composing=null,t&&this.reset(e.state)}};for(let e in this.handlers)t.addEventListener(e,this.handlers[e]);this.measureReq={read:e=>{let t=$T(e.root);t&&t.rangeCount&&this.editContext.updateSelectionBounds(t.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;return e.changes.iterChanges((i,a,o,s,c)=>{if(n)return;let l=c.length-(a-i);if(r&&a>=r.to){if(r.from==i&&r.to==a&&r.insert.eq(c)){r=this.pendingContextChange=null,t+=l,this.to+=l;return}r=null,this.revertPending(e.state)}if(i+=t,a+=t,a<=this.from)this.from+=l,this.to+=l;else if(i<this.to){if(i<this.from||a>this.to||this.to-this.from+c.length>3e4){n=!0;return}this.editContext.updateText(this.toContextPos(i),this.toContextPos(a),c.toString()),this.to+=l}t+=l}),r&&!n&&this.revertPending(e.state),!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some(e=>!e.isUserEvent(`input.type`)&&e.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>3e4)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}},Yk=class e{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement(`div`),this.scrollDOM=document.createElement(`div`),this.scrollDOM.tabIndex=-1,this.scrollDOM.className=`cm-scroller`,this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement(`div`),this.announceDOM.className=`cm-announced`,this.announceDOM.setAttribute(`aria-live`,`polite`),this.dom=document.createElement(`div`),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||xE(e.parent)||document,this.viewState=new wk(this,e.state||Vw.create(e)),e.scrollTo&&e.scrollTo.is(eD)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(iD).map(e=>new oD(e));for(let e of this.plugins)e.update(this);this.observer=new Wk(this),this.inputState=new yO(this),this.inputState.ensureHandlers(this.plugins),this.docView=new LD(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),document.fonts?.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent=`refresh`,this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Dw?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(t){if(this.updateState!=0)throw Error(`Calls to EditorView.update are not allowed while an update is in progress`);let n=!1,r=!1,i,a=this.state;for(let e of t){if(e.startState!=a)throw RangeError(`Trying to update state with a transaction that doesn't start from the previous state.`);a=e.state}if(this.destroyed){this.viewState.state=a;return}let o=this.hasFocus,s=0,c=null;t.some(e=>e.annotation(QO))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=$O(a,o),c||(s=1));let l=this.observer.delayedAndroidKey,u=null;if(l?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(a.doc)||!this.state.selection.eq(a.selection))&&(u=null)):this.observer.clear(),a.facet(Vw.phrases)!=this.state.facet(Vw.phrases))return this.setState(a);i=bD.create(this,a,t),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let n of t){if(d&&=d.map(n.changes),n.scrollIntoView){let{main:t}=n.state.selection,{x:r,y:i}=this.state.facet(e.cursorScrollMargin);d=new $E(t.empty?t:K.cursor(t.head,t.head>t.anchor?-1:1),`nearest`,`nearest`,i,r)}for(let e of n.effects)e.is(eD)&&(d=e.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=Qk.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(vD)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some(e=>e.isUserEvent(`select.pointer`)))}finally{this.updateState=0}if(i.startState.facet(Pk)!=i.state.facet(Pk)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let e of this.state.facet(GE))try{e(i)}catch(e){nD(this.state,e,`update listener`)}(c||u)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),u&&!hO(this,u)&&l.force&&bE(this.contentDOM,l.key,l.keyCode)})}setState(e){if(this.updateState!=0)throw Error(`Calls to EditorView.setState are not allowed while an update is in progress`);if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new wk(this,e),this.plugins=e.facet(iD).map(e=>new oD(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView.destroy(),this.docView=new LD(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(iD),n=e.state.facet(iD);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new oD(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e<this.plugins.length;e++)this.plugins[e].update(this);t!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(e){nD(this.state,e,`doc view update listener`)}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:i,scrollAnchorHeight:a,scaleY:o}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(a<0){if(CE(n||this.win))i=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,a=e.top}o=this.viewState.scaleY}this.updateState=1;let s=this.viewState.measure();if(!s&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(e>5){console.warn(this.measureRequests.length?`Measure loop restarted more than 5 times`:`Viewport failed to stabilize`);break}let c=[];s&4||([this.measureRequests,c]=[c,this.measureRequests]);let l=c.map(e=>{try{return e.read(this)}catch(e){return nD(this.state,e),Zk}}),u=bD.create(this,this.state,[]),d=!1;u.flags|=s,t?t.flags|=s:t=u,this.updateState=2,u.empty||(this.updatePlugins(u),this.inputState.update(u),this.updateAttrs(),d=this.docView.update(u),d&&this.docViewUpdate());for(let e=0;e<c.length;e++)if(l[e]!=Zk)try{let t=c[e];t.write&&t.write(l[e],this)}catch(e){nD(this.state,e)}if(d&&this.docView.updateSelection(!0),!u.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}{let e=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)/this.viewState.scaleY-a/o;if((e>1||e<-1)&&!(q.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r+=e,n?i<0?n.scrollTop=n.scrollHeight:n.scrollTop+=e:this.win.scrollBy(0,e),a=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(GE))e(t)}get themeClasses(){return Ik+` `+(this.state.facet(Fk)?Rk:Lk)+` `+this.state.facet(Pk)}updateAttrs(){let e=$k(this,sD,{class:`cm-editor`+(this.hasFocus?` cm-focused `:` `)+this.themeClasses}),t={spellcheck:`false`,autocorrect:`off`,autocapitalize:`off`,writingsuggestions:`false`,translate:`no`,contenteditable:this.state.facet(rD)?`true`:`false`,class:`cm-content`,style:`${q.tabSize}: ${this.state.tabSize}`,role:`textbox`,"aria-multiline":`true`};this.state.readOnly&&(t[`aria-readonly`]=`true`),$k(this,cD,t);let n=this.observer.ignore(()=>{let n=zT(this.contentDOM,this.contentAttrs,t),r=zT(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(t){let n=!0;for(let r of t)for(let t of r.effects)if(t.is(e.announce)){n&&=(this.announceDOM.textContent=``,this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=`\xA0`},200),!1);let e=this.announceDOM.appendChild(document.createElement(`div`));e.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(vD);let t=this.state.facet(e.cspNonce);mT.mount(this.root,this.styleModules.concat(Vk).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(this.updateState==2)throw Error(`Reading the editor layout isn't allowed during an update`);this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(t=>t.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return iO(this,e,$D(this,e,t,n))}moveByGroup(e,t){return iO(this,e,$D(this,e,t,t=>eO(this,e.head,t)))}visualLineSide(e,t){return t?K.cursor(e.to,1):K.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return QD(this,e,t,n)}moveVertically(e,t,n){return iO(this,e,tO(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=oO(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),oO(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),i=r[PE.find(r,e-n.from,-1,t)];return n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&i.dir!=this.textDirectionAt(n.from)&&(e==n.to?(e=n.from+i.from,t=1):(e=n.from+i.to,t=-1)),this.docView.coordsAt(e,t,i.dir==DE.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(XE)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>Xk)return zE(e.length);let t=this.textDirectionAt(e.from),n;for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t&&(r.fresh||FE(r.isolates,n=mD(this,e))))return r.order;n||=mD(this,e);let r=vte(e.text,t,n);return this.bidiCache.push(new Qk(e.from,e.to,t,n,!0,r)),r}get hasFocus(){return(this.dom.ownerDocument.hasFocus()||q.safari&&this.inputState?.lastContextMenu>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{_E(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return eD.of(new $E(typeof e==`number`?K.cursor(e):e,t.y??`nearest`,t.x??`nearest`,t.yMargin??5,t.xMargin??5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return eD.of(new $E(K.cursor(n.from),`start`,`start`,n.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e==`boolean`?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return aD.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return aD.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=mT.newName(),r=[Pk.of(n),vD.of(Bk(`.${n}`,e))];return t&&t.dark&&r.push(Fk.of(!0)),r}static baseTheme(e){return cw.lowest(vD.of(Bk(`.`+Ik,e,zk)))}static findFromDOM(e){let t=e.querySelector(`.cm-content`);return(t&&xD.get(t)||xD.get(e))?.root?.view||null}};Yk.styleModule=vD,Yk.inputHandler=KE,Yk.clipboardInputFilter=JE,Yk.clipboardOutputFilter=YE,Yk.scrollHandler=QE,Yk.focusChangeEffect=qE,Yk.perLineTextDirection=XE,Yk.exceptionSink=WE,Yk.updateListener=GE,Yk.editable=rD,Yk.mouseSelectionStyle=UE,Yk.dragMovesSelection=HE,Yk.clickAddsSelectionRange=VE,Yk.decorations=lD,Yk.blockWrappers=uD,Yk.outerDecorations=dD,Yk.atomicRanges=fD,Yk.bidiIsolatedRanges=pD,Yk.cursorScrollMargin=QC.define({combine:e=>{let t=5,n=5;for(let r of e)typeof r==`number`?t=n=r:{x:t,y:n}=r;return{x:t,y:n}}}),Yk.scrollMargins=gD,Yk.darkTheme=Fk,Yk.cspNonce=QC.define({combine:e=>e.length?e[0]:``}),Yk.contentAttributes=cD,Yk.editorAttributes=sD,Yk.lineWrapping=Yk.contentAttributes.of({class:`cm-lineWrapping`}),Yk.announce=Ew.define();var Xk=4096,Zk={},Qk=class e{constructor(e,t,n,r,i,a){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=a}static update(t,n){if(n.empty&&!t.some(e=>e.fresh))return t;let r=[],i=t.length?t[t.length-1].dir:DE.LTR;for(let a=Math.max(0,t.length-10);a<t.length;a++){let o=t[a];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new e(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}};function $k(e,t,n){for(let r=e.state.facet(t),i=r.length-1;i>=0;i--){let t=r[i],a=typeof t==`function`?t(e):t;a&&FT(a,n)}return n}var eA=q.mac?`mac`:q.windows?`win`:q.linux?`linux`:`key`;function tA(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];r==`Space`&&(r=` `);let i,a,o,s;for(let e=0;e<n.length-1;++e){let r=n[e];if(/^(cmd|meta|m)$/i.test(r))s=!0;else if(/^a(lt)?$/i.test(r))i=!0;else if(/^(c|ctrl|control)$/i.test(r))a=!0;else if(/^s(hift)?$/i.test(r))o=!0;else if(/^mod$/i.test(r))t==`mac`?s=!0:a=!0;else throw Error(`Unrecognized modifier name: `+r)}return i&&(r=`Alt-`+r),a&&(r=`Ctrl-`+r),s&&(r=`Meta-`+r),o&&(r=`Shift-`+r),r}function nA(e,t,n){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n!==!1&&t.shiftKey&&(e=`Shift-`+e),e}var rA=cw.default(Yk.domEventHandlers({keydown(e,t){return dA(oA(t.state),e,t,`editor`)}})),iA=QC.define({enables:rA}),aA=new WeakMap;function oA(e){let t=e.facet(iA),n=aA.get(t);return n||aA.set(t,n=lA(t.reduce((e,t)=>e.concat(t),[]))),n}var sA=null,cA=4e3;function lA(e,t=eA){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(n==null)r[e]=t;else if(n!=t)throw Error(`Key binding `+e+` is used both as a regular binding and as a multi-stroke prefix`)},a=(e,r,a,o,s)=>{let c=n[e]||(n[e]=Object.create(null)),l=r.split(/ (?!$)/).map(e=>tA(e,t));for(let t=1;t<l.length;t++){let n=l.slice(0,t).join(` `);i(n,!0),c[n]||(c[n]={preventDefault:!0,stopPropagation:!1,run:[t=>{let r=sA={view:t,prefix:n,scope:e};return setTimeout(()=>{sA==r&&(sA=null)},cA),!0}]})}let u=l.join(` `);i(u,!1);let d=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(c._any?.run)?.slice()||[]});a&&d.run.push(a),o&&(d.preventDefault=!0),s&&(d.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(` `):[`editor`];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||={preventDefault:!1,stopPropagation:!1,run:[]};let{any:i}=r;for(let t in e)e[t].run.push(e=>i(e,uA))}let i=r[t]||r.key;if(i)for(let t of e)a(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&a(t,`Shift-`+i,r.shift,r.preventDefault,r.stopPropagation)}return n}var uA=null;function dA(e,t,n,r){uA=t;let i=CT(t),a=RC(LC(i,0))==i.length&&i!=` `,o=``,s=!1,c=!1,l=!1;sA&&sA.view==n&&sA.scope==r&&(o=sA.prefix+` `,TO.indexOf(t.keyCode)<0&&(c=!0,sA=null));let u=new Set,d=e=>{if(e){for(let t of e.run)if(!u.has(t)&&(u.add(t),t(n)))return e.stopPropagation&&(l=!0),!0;e.preventDefault&&(e.stopPropagation&&(l=!0),c=!0)}return!1},f=e[r],p,m;return f&&(d(f[o+nA(i,t,!a)])?s=!0:a&&(t.altKey||t.metaKey||t.ctrlKey)&&!(q.windows&&t.ctrlKey&&t.altKey)&&!(q.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(p=_T[t.keyCode])&&p!=i?(d(f[o+nA(p,t,!0)])||t.shiftKey&&(m=vT[t.keyCode])!=i&&m!=p&&d(f[o+nA(m,t,!1)]))&&(s=!0):a&&t.shiftKey&&d(f[o+nA(i,t,!0)])&&(s=!0),!s&&d(f._any)&&(s=!0)),c&&(s=!0),s&&l&&t.stopPropagation(),uA=null,s}var fA=class e{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement(`div`);return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+`px`,e.style.top=this.top+`px`,this.width!=null&&(e.style.width=this.width+`px`),e.style.height=this.height+`px`}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(t,n,r){if(r.empty){let i=t.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let a=pA(t);return[new e(n,i.left-a.left,i.top-a.top,null,i.bottom-i.top)]}return hA(t,n,r)}};function pA(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==DE.LTR?t.left:t.right-e.scrollDOM.clientWidth*e.scaleX)-e.scrollDOM.scrollLeft*e.scaleX,top:t.top-e.scrollDOM.scrollTop*e.scaleY}}function mA(e,t,n,r){let i=e.coordsAtPos(t,n*2);if(!i)return r;let a=e.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,s=e.posAtCoords({x:a.left+1,y:o}),c=e.posAtCoords({x:a.right-1,y:o});return s==null||c==null?r:{from:Math.max(r.from,Math.min(s,c)),to:Math.min(r.to,Math.max(s,c))}}function hA(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),a=e.textDirection==DE.LTR,o=e.contentDOM,s=o.getBoundingClientRect(),c=pA(e),l=o.querySelector(`.cm-line`),u=l&&window.getComputedStyle(l),d=s.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),f=s.right-(u?parseInt(u.paddingRight):0),p=ZD(e,r,1),m=ZD(e,i,-1),h=p.type==HT.Text?p:null,g=m.type==HT.Text?m:null;if(h&&(e.lineWrapping||p.widgetLineBreaks)&&(h=mA(e,r,1,h)),g&&(e.lineWrapping||m.widgetLineBreaks)&&(g=mA(e,i,-1,g)),h&&g&&h.from==g.from&&h.to==g.to)return v(y(n.from,n.to,h));{let t=h?y(n.from,null,h):b(p,!1),r=g?y(null,n.to,g):b(m,!0),i=[];return(h||p).to<(g||m).from-(h&&g?1:0)||p.widgetLineBreaks>1&&t.bottom+e.defaultLineHeight/2<r.top?i.push(_(d,t.bottom,f,r.top)):t.bottom<r.top&&e.elementAtHeight((t.bottom+r.top)/2).type==HT.Text&&(t.bottom=r.top=(t.bottom+r.top)/2),v(t).concat(i).concat(v(r))}function _(e,n,r,i){return new fA(t,e-c.left,n-c.top,Math.max(0,r-e),i-n)}function v({top:e,bottom:t,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(_(n[i],e,n[i+1],t));return r}function y(t,n,r){let i=1e9,o=-1e9,s=[];function c(t,n,c,l,u){let p=e.coordsAtPos(t,t==r.to?-2:2),m=e.coordsAtPos(c,c==r.from?2:-2);p&&m&&(i=Math.min(p.top,m.top,i),o=Math.max(p.bottom,m.bottom,o),u==DE.LTR?s.push(a&&n?d:p.left,a&&l?f:m.right):s.push(!a&&l?d:m.left,!a&&n?f:p.right))}let l=t??r.from,u=n??r.to;for(let r of e.visibleRanges)if(r.to>l&&r.from<u)for(let i=Math.max(r.from,l),a=Math.min(r.to,u);;){let r=e.state.doc.lineAt(i);for(let o of e.bidiSpans(r)){let e=o.from+r.from,s=o.to+r.from;if(e>=a)break;s>i&&c(Math.max(e,i),t==null&&e<=l,Math.min(s,a),n==null&&s>=u,o.dir)}if(i=r.to+1,i>=a)break}return s.length==0&&c(l,t==null,u,n==null,e.textDirection),{top:i,bottom:o,horizontal:s}}function b(e,t){let n=s.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}function gA(e,t){return e.constructor==t.constructor&&e.eq(t)}var _A=class{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement(`div`)),this.dom.classList.add(`cm-layer`),t.above&&this.dom.classList.add(`cm-layer-above`),t.class&&this.dom.classList.add(t.class),this.scale(),this.dom.setAttribute(`aria-hidden`,`true`),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(vA)!=e.state.facet(vA)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(vA);for(;t<n.length&&n[t]!=this.layer;)t++;this.dom.style.zIndex=String((this.layer.above?150:-1)-t)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:t}=this.view;(e!=this.scaleX||t!=this.scaleY)&&(this.scaleX=e,this.scaleY=t,this.dom.style.transform=`scale(${1/e}, ${1/t})`)}draw(e){if(e.length!=this.drawn.length||e.some((e,t)=>!gA(e,this.drawn[t]))){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e,q.webkit&&(this.dom.style.display=this.dom.firstChild?``:`none`)}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}},vA=QC.define();function yA(e){return[aD.define(t=>new _A(t,e)),vA.of(e)]}var bA=!q.ios,xA=QC.define({combine(e){return Hw(e,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function SA(e={}){return[xA.of(e),wA,EA,OA,ZE.of(!0)]}function CA(e){return e.startState.facet(xA)!=e.state.facet(xA)}var wA=yA({above:!0,markers(e){let{state:t}=e,n=t.facet(xA),r=[];for(let i of t.selection.ranges){let a=i==t.selection.main;if(i.empty||n.drawRangeCursor&&!(a&&q.ios&&n.iosSelectionHandles)){let t=a?`cm-cursor cm-cursor-primary`:`cm-cursor cm-cursor-secondary`,n=i.empty?i:K.cursor(i.head,i.assoc);for(let i of fA.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName=t.style.animationName==`cm-blink`?`cm-blink2`:`cm-blink`);let n=CA(e);return n&&TA(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){TA(t.state,e)},class:`cm-cursorLayer`});function TA(e,t){t.style.animationDuration=e.facet(xA).cursorBlinkRate+`ms`}var EA=yA({above:!1,markers(e){let t=[],{main:n,ranges:r}=e.state.selection;for(let i of r)if(!i.empty&&(bA||i!=n))for(let n of fA.forRange(e,`cm-selectionBackground`,i))t.push(n);if(q.ios&&!n.empty&&e.state.facet(xA).iosSelectionHandles){for(let r of fA.forRange(e,`cm-selectionHandle cm-selectionHandle-start`,K.cursor(n.from,1)))t.push(r);for(let r of fA.forRange(e,`cm-selectionHandle cm-selectionHandle-end`,K.cursor(n.to,1)))t.push(r)}return t},update(e,t){return e.docChanged||e.selectionSet||e.viewportChanged||CA(e)},class:`cm-selectionLayer`}),DA=q.gecko&&q.gecko_version==153?`#ffffff01`:`transparent`,OA=cw.highest(Yk.theme({".cm-line":{...bA?{"& ::selection, &::selection":{backgroundColor:`${DA} !important`}}:{},caretColor:`transparent !important`},".cm-content":{caretColor:`transparent !important`,"& :focus":{caretColor:`initial !important`,...bA?{"&::selection, & ::selection":{backgroundColor:`Highlight !important`}}:{}}}}));/x/.unicode;function kA(){return jA}var AA=UT.line({class:`cm-activeLine`}),jA=aD.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(AA.range(i.from)),t=i.from)}return UT.set(n)}},{decorations:e=>e.decorations}),MA=class extends VT{constructor(e){super(),this.content=e}toDOM(e){let t=document.createElement(`span`);return t.className=`cm-placeholder`,t.style.pointerEvents=`none`,t.appendChild(typeof this.content==`string`?document.createTextNode(this.content):typeof this.content==`function`?this.content(e):this.content.cloneNode(!0)),t.setAttribute(`aria-hidden`,`true`),t}coordsAt(e){let t=e.firstChild?nE(e.firstChild):[];if(!t.length)return null;let n=window.getComputedStyle(e.parentNode),r=cE(t[0],n.direction!=`rtl`),i=parseInt(n.lineHeight);return r.bottom-r.top>i*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}};function NA(e){let t=aD.fromClass(class{constructor(t){this.view=t,this.placeholder=e?UT.set([UT.widget({widget:new MA(e),side:1}).range(0)]):UT.none}get decorations(){return this.view.state.doc.length?UT.none:this.placeholder}},{decorations:e=>e.decorations});return typeof e==`string`?[t,Yk.contentAttributes.of({"aria-placeholder":e})]:t}var PA=class extends Uw{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}};PA.prototype.elementClass=``,PA.prototype.toDOM=void 0,PA.prototype.mapMode=BC.TrackBefore,PA.prototype.startSide=PA.prototype.endSide=-1,PA.prototype.point=!0;var FA=QC.define(),IA=QC.define(),LA={class:``,renderEmptyElements:!1,elementStyle:``,markers:()=>Jw.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:`before`},RA=QC.define();function zA(e){return[VA(),RA.of({...LA,...e})]}var BA=QC.define({combine:e=>e.some(e=>e)});function VA(e){let t=[HA];return e&&e.fixed===!1&&t.push(BA.of(!0)),t}var HA=aD.fromClass(class{constructor(e){this.view=e,this.domAfter=null,this.prevViewport=e.viewport,this.dom=document.createElement(`div`),this.dom.className=`cm-gutters cm-gutters-before`,this.dom.setAttribute(`aria-hidden`,`true`),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.gutters=e.state.facet(RA).map(t=>new KA(e,t)),this.fixed=!e.state.facet(BA);for(let e of this.gutters)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position=`sticky`),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement(`div`),this.domAfter.className=`cm-gutters cm-gutters-after`,this.domAfter.setAttribute(`aria-hidden`,`true`),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+`px`,this.domAfter.style.position=this.fixed?`sticky`:``,this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(e.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+`px`;this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(BA)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?`sticky`:``,this.domAfter&&(this.domAfter.style.position=this.fixed?`sticky`:``)),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Jw.iter(this.view.state.facet(FA),this.view.viewport.from),r=[],i=this.gutters.map(e=>new GA(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let a of e.type)if(a.type==HT.Text&&t){WA(n,r,a.from);for(let e of i)e.line(this.view,a,r);t=!1}else if(a.widget)for(let e of i)e.widget(this.view,a)}else if(e.type==HT.Text){WA(n,r,e.from);for(let t of i)t.line(this.view,e,r)}else if(e.widget)for(let t of i)t.widget(this.view,e);for(let e of i)e.finish();e&&(this.view.scrollDOM.insertBefore(this.dom,t),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(e){let t=e.startState.facet(RA),n=e.state.facet(RA),r=e.docChanged||e.heightChanged||e.viewportChanged||!Jw.eq(e.startState.facet(FA),e.state.facet(FA),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new KA(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)e.config.side==`after`?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:e=>Yk.scrollMargins.of(t=>{let n=t.plugin(e);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*t.scaleX,i=n.domAfter?n.domAfter.offsetWidth*t.scaleX:0;return t.textDirection==DE.LTR?{left:r,right:i}:{right:r,left:i}})});function UA(e){return Array.isArray(e)?e:[e]}function WA(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}var GA=class{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=Jw.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=(t.top-this.height)/e.scaleY,a=t.height/e.scaleY;if(this.i==r.elements.length){let t=new qA(e,a,i,n);r.elements.push(t),r.dom.appendChild(t.dom)}else r.elements[this.i].update(e,a,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];WA(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let a=this.gutter;(r.length!=0||a.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t),r=n?[n]:null;for(let n of e.state.facet(IA)){let i=n(e,t.widget,t);i&&(r||=[]).push(i)}r&&this.addElement(e,t,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}},KA=class{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement(`div`),this.dom.className=`cm-gutter`+(this.config.class?` `+this.config.class:``);for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i=r.target,a;if(i!=this.dom&&this.dom.contains(i)){for(;i.parentNode!=this.dom;)i=i.parentNode;let e=i.getBoundingClientRect();a=(e.top+e.bottom)/2}else a=r.clientY;let o=e.lineBlockAtHeight(a-e.documentTop);t.domEventHandlers[n](e,o,r)&&r.preventDefault()});this.markers=UA(t.markers(e)),t.initialSpacer&&(this.spacer=new qA(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+=`visibility: hidden; pointer-events: none`)}update(e){let t=this.markers;if(this.markers=UA(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!Jw.eq(this.markers,t,n.from,n.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}},qA=class{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement(`div`),this.dom.className=`cm-gutterElement`,this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.height=t,this.dom.style.height=t+`px`),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+`px`:``),JA(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let n=`cm-gutterElement`,r=this.dom.firstChild;for(let i=0,a=0;;){let o=a,s=i<t.length?t[i++]:null,c=!1;if(s){let e=s.elementClass;e&&(n+=` `+e);for(let e=a;e<this.markers.length;e++)if(this.markers[e].compare(s)){o=e,c=!0;break}}else o=this.markers.length;for(;a<o;){let e=this.markers[a++];if(e.toDOM){e.destroy(r);let t=r.nextSibling;r.remove(),r=t}}if(!s)break;s.toDOM&&(c?r=r.nextSibling:this.dom.insertBefore(s.toDOM(e),r)),c&&a++}this.dom.className=n,this.markers=t}destroy(){this.setMarkers(null,[])}};function JA(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].compare(t[n]))return!1;return!0}var YA=QC.define(),XA=QC.define(),ZA=QC.define({combine(e){return Hw(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})}}),QA=class extends PA{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}};function $A(e,t){return e.state.facet(ZA).formatNumber(t,e.state)}var ej=RA.compute([ZA],e=>({class:`cm-lineNumbers`,renderEmptyElements:!1,markers(e){return e.state.facet(YA)},lineMarker(e,t,n){return n.some(e=>e.toDOM)?null:new QA($A(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,n)=>{for(let r of e.state.facet(XA)){let i=r(e,t,n);if(i)return i}return null},lineMarkerChange:e=>e.startState.facet(ZA)!=e.state.facet(ZA),initialSpacer(e){return new QA($A(e,nj(e.state.doc.lines)))},updateSpacer(e,t){let n=$A(t.view,nj(t.view.state.doc.lines));return n==e.number?e:new QA(n)},domEventHandlers:e.facet(ZA).domEventHandlers,side:`before`}));function tj(e={}){return[ZA.of(e),VA(),ej]}function nj(e){let t=9;for(;t<e;)t=t*10+9;return t}var rj=new class extends PA{constructor(){super(...arguments),this.elementClass=`cm-activeLineGutter`}},ij=FA.compute([`selection`],e=>{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(rj.range(i)))}return Jw.of(t)});function aj(){return ij}var oj=1024,sj=0,cj=class{constructor(e,t){this.from=e,this.to=t}},lj=class{constructor(e={}){this.id=sj++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error(`This node type doesn't define a deserialize function`)}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError(`Can't add per-node props to node types`);return typeof e!=`function`&&(e=fj.match(e)),t=>{let n=e(t);return n===void 0?null:[this,n]}}};lj.closedBy=new lj({deserialize:e=>e.split(` `)}),lj.openedBy=new lj({deserialize:e=>e.split(` `)}),lj.group=new lj({deserialize:e=>e.split(` `)}),lj.isolate=new lj({deserialize:e=>{if(e&&e!=`rtl`&&e!=`ltr`&&e!=`auto`)throw RangeError(`Invalid value for isolate: `+e);return e||`auto`}}),lj.contextHash=new lj({perNode:!0}),lj.lookAhead=new lj({perNode:!0}),lj.mounted=new lj({perNode:!0});var uj=class{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[lj.mounted.id]}},dj=Object.create(null),fj=class e{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(t){let n=t.props&&t.props.length?Object.create(null):dj,r=+!!t.top|(t.skipped?2:0)|(t.error?4:0)|(t.name==null?8:0),i=new e(t.name||``,n,t.id,r);if(t.props){for(let e of t.props)if(Array.isArray(e)||(e=e(i)),e){if(e[0].perNode)throw RangeError(`Can't store a per-node prop on a node type`);n[e[0].id]=e[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e==`string`){if(this.name==e)return!0;let t=this.prop(lj.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(` `))t[r]=e[n];return e=>{for(let n=e.prop(lj.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}};fj.none=new fj(``,Object.create(null),0,8);var pj=class e{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError(`Node type ids should correspond to array positions when creating a node set`)}extend(...t){let n=[];for(let e of this.types){let r=null;for(let n of t){let t=n(e);if(t){r||=Object.assign({},e.props);let n=t[1],i=t[0];i.combine&&i.id in r&&(n=i.combine(r[i.id],n)),r[i.id]=n}}n.push(r?new fj(e.name,r,e.id,e.flags):e)}return new e(n)}},mj=new WeakMap,hj=new WeakMap,gj;(function(e){e[e.ExcludeBuffers=1]=`ExcludeBuffers`,e[e.IncludeAnonymous=2]=`IncludeAnonymous`,e[e.IgnoreMounts=4]=`IgnoreMounts`,e[e.IgnoreOverlays=8]=`IgnoreOverlays`,e[e.EnterBracketed=16]=`EnterBracketed`})(gj||={});var _j=class e{constructor(e,t,n,r,i){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,i&&i.length){this.props=Object.create(null);for(let[e,t]of i)this.props[typeof e==`number`?e:e.id]=t}}toString(){let e=uj.get(this);if(e&&!e.overlay)return e.tree.toString();let t=``;for(let e of this.children){let n=e.toString();n&&(t&&(t+=`,`),t+=n)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?`(`+t+`)`:``):t}cursor(e=0){return new jj(this.topNode,e)}cursorAt(e,t=0,n=0){let r=new jj(mj.get(this)||this.topNode);return r.moveTo(e,t),mj.set(this,r._tree),r}get topNode(){return new Cj(this,0,0,null)}resolve(e,t=0){let n=xj(mj.get(this)||this.topNode,e,t,!1);return mj.set(this,n),n}resolveInner(e,t=0){let n=xj(hj.get(this)||this.topNode,e,t,!0);return hj.set(this,n),n}resolveStack(e,t=0){return Aj(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:i=this.length}=e,a=e.mode||0,o=(a&gj.IncludeAnonymous)>0;for(let e=this.cursor(a|gj.IncludeAnonymous);;){let a=!1;if(e.from<=i&&e.to>=r&&(!o&&e.type.isAnonymous||t(e)!==!1)){if(e.firstChild())continue;a=!0}for(;a&&n&&(o||!e.type.isAnonymous)&&n(e),!e.nextSibling();){if(!e.parent())return;a=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(t={}){return this.children.length<=8?this:Ij(fj.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new e(this.type,t,n,r,this.propValues),t.makeTree||((t,n,r)=>new e(fj.none,t,n,r)))}static build(e){return Nj(e)}};_j.empty=new _j(fj.none,[],[],0);var vj=class e{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new e(this.buffer,this.index)}},yj=class e{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return fj.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(`,`)}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],i=r.name;if(/\W/.test(i)&&!r.isError&&(i=JSON.stringify(i)),e+=4,n==e)return i;let a=[];for(;e<n;)a.push(this.childString(e)),e=this.buffer[e+3];return i+`(`+a.join(`,`)+`)`}findChild(e,t,n,r,i){let{buffer:a}=this,o=-1;for(let s=e;s!=t&&!(bj(i,r,a[s+1],a[s+2])&&(o=s,n>0));s=a[s+3]);return o}slice(t,n,r){let i=this.buffer,a=new Uint16Array(n-t),o=0;for(let e=t,s=0;e<n;){a[s++]=i[e++],a[s++]=i[e++]-r;let n=a[s++]=i[e++]-r;a[s++]=i[e++]-t,o=Math.max(o,n)}return new e(a,o,this.set)}};function bj(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function xj(e,t,n,r){for(;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t);){let t=!r&&e instanceof Cj&&e.index<0?null:e.parent;if(!t)return e;e=t}let i=r?0:gj.IgnoreOverlays;if(r)for(let r=e,a=r.parent;a;r=a,a=r.parent)r instanceof Cj&&r.index<0&&a.enter(t,n,i)?.from!=r.from&&(e=a);for(;;){let r=e.enter(t,n,i);if(!r)return e;e=r}}var Sj=class{cursor(e=0){return new jj(this,e)}getChild(e,t=null,n=null){let r=wj(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return wj(this,e,t,n)}resolve(e,t=0){return xj(this,e,t,!1)}resolveInner(e,t=0){return xj(this,e,t,!0)}matchContext(e){return Tj(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;for(;t;){let e=t.lastChild;if(!e||e.to!=t.to)break;e.type.isError&&e.from==e.to?(n=t,t=e.prevSibling):t=e}return n}get node(){return this}get next(){return this.parent}},Cj=class e extends Sj{constructor(e,t,n,r){super(),this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,n,r,i,a=0){for(let o=this;;){for(let{children:s,positions:c}=o._tree,l=n>0?s.length:-1;t!=l;t+=n){let l=s[t],u=c[t]+o.from,d;if(a&gj.EnterBracketed&&l instanceof _j&&(d=uj.get(l))&&!d.overlay&&d.bracketed&&r>=u&&r<=u+l.length||bj(i,r,u,u+l.length)){if(l instanceof yj){if(a&gj.ExcludeBuffers)continue;let e=l.findChild(0,l.buffer.length,n,r-u,i);if(e>-1)return new Dj(new Ej(o,l,t,u),null,e)}else if(a&gj.IncludeAnonymous||!l.type.isAnonymous||Mj(l)){let s;if(!(a&gj.IgnoreMounts)&&(s=uj.get(l))&&!s.overlay)return new e(s.tree,u,t,o);let c=new e(l,u,t,o);return a&gj.IncludeAnonymous||!c.type.isAnonymous?c:c.nextChild(n<0?l.children.length-1:0,n,r,i,a)}}}if(a&gj.IncludeAnonymous||!o.type.isAnonymous||(t=o.index>=0?o.index+n:n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(t,n,r=0){let i;if(!(r&gj.IgnoreOverlays)&&(i=uj.get(this._tree))&&i.overlay){let a=t-this.from,o=r&gj.EnterBracketed&&i.bracketed;for(let{from:t,to:r}of i.overlay)if((n>0||o?t<=a:t<a)&&(n<0||o?r>=a:r>a))return new e(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function wj(e,t,n,r){let i=e.cursor(),a=[];if(!i.firstChild())return a;if(n!=null){for(let e=!1;!e;)if(e=i.type.is(n),!i.nextSibling())return a}for(;;){if(r!=null&&i.type.is(r))return a;if(i.type.is(t)&&a.push(i.node),!i.nextSibling())return r==null?a:[]}}function Tj(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}var Ej=class{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}},Dj=class e extends Sj{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super(),this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(t,n,r){let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],t,n-this.context.start,r);return a<0?null:new e(this.context,this,a)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(t,n,r=0){if(r&gj.ExcludeBuffers)return null;let{buffer:i}=this.context,a=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,t-this.context.start,n);return a<0?null:new e(this.context,this,a)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:t}=this.context,n=t.buffer[this.index+3];return n<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new e(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new e(this.context,this._parent,t.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let a=n.buffer[this.index+1];e.push(n.slice(r,i,a)),t.push(0)}return new _j(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}};function Oj(e){if(!e.length)return null;let t=0,n=e[0];for(let r=1;r<e.length;r++){let i=e[r];(i.from>n.from||i.to<n.to)&&(n=i,t=r)}let r=n instanceof Cj&&n.index<0?null:n.parent,i=e.slice();return r?i[t]=r:i.splice(t,1),new kj(i,n)}var kj=class{constructor(e,t){this.heads=e,this.node=t}get next(){return Oj(this.heads)}};function Aj(e,t,n){let r=e.resolveInner(t,n),i=null;for(let e=r instanceof Cj?r:r.context.parent;e;e=e.parent)if(e.index<0){let a=e.parent;(i||=[r]).push(a.resolve(t,n)),e=a}else{let a=uj.get(e.tree);if(a&&a.overlay&&a.overlay[0].from<=t&&a.overlay[a.overlay.length-1].to>=t){let o=new Cj(a.tree,a.overlay[0].from+e.from,-1,e);(i||=[r]).push(xj(o,t,n,!1))}}return i?Oj(i):r}var jj=class{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~gj.EnterBracketed,e instanceof Cj)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return e?e instanceof Cj?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return i<0?!1:(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?n&gj.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&gj.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&gj.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let e=0;e<this.index;e++)if(r.buffer.buffer[e+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&gj.IncludeAnonymous||e instanceof yj||!e.type.isAnonymous||Mj(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)scan:for(let r=this.index,i=this.stack.length;i>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;t=a,n=i+1;break scan}r=this.stack[--i]}for(let e=n;e<this.stack.length;e++)t=new Dj(this.buffer,t,this.stack[e]);return this.bufferNode=new Dj(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&t&&t(this),r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return Tj(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,i=this.stack.length-1;r>=0;i--){if(i<0)return Tj(this._tree,e,r);let a=n[t.buffer[this.stack[i]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}};function Mj(e){return e.children.some(e=>e instanceof yj||!e.type.isAnonymous||Mj(e))}function Nj(e){let{buffer:t,nodeSet:n,maxBufferLength:r=oj,reused:i=[],minRepeatType:a=n.types.length}=e,o=Array.isArray(t)?new vj(t,t.length):t,s=n.types,c=0,l=0;function u(e,t,_,v,y,b){let{id:x,start:S,end:C,size:w}=o,T=l,E=c;if(w<0){if(o.next(),w==-1){let t=i[x];_.push(t),v.push(S-e);return}if(w==-3){c=x;return}if(w==-4){l=x;return}throw RangeError(`Unrecognized record size: ${w}`)}let D=s[x],O,k,ee=S-e;if(C-S<=r&&(k=h(o.pos-t,y))){let t=new Uint16Array(k.size-k.skip),r=o.pos-k.size,i=t.length;for(;o.pos>r;)i=g(k.start,t,i);O=new yj(t,C-k.start,n),ee=k.start-e}else{let e=o.pos-w;o.next();let t=[],s=[],c=x>=a?x:-1,h=0,g=C,_=T;for(;o.pos>e;)c>=0&&o.id==c&&o.size>=0?(o.end<=g-r&&(p(t,s,S,h,o.end,g,c,_,E),h=t.length,g=o.end,_=l),o.next()):b>2500?d(S,e,t,s):(c>=0&&o.size==-1&&i[o.id].type==n.types[c]&&(h<t.length&&p(t,s,S,h,o.end,g,c,_,E),h=t.length+1,g=o.start,_=l),u(S,e,t,s,c,b+1));if(c>=0&&h>0&&h<t.length&&p(t,s,S,h,S,g,c,_,E),t.reverse(),s.reverse(),c>-1&&h>0){let e=f(D,E);O=Ij(D,t,s,0,t.length,0,C-S,e,e)}else O=m(D,t,s,C-S,T-C,E)}_.push(O),v.push(ee)}function d(e,t,i,a){let s=[],c=0,l=-1;for(;o.pos>t;){let{id:e,start:t,end:n,size:i}=o;if(i>4)o.next();else if(l>-1&&t<l)break;else l<0&&(l=n-r),s.push(e,t,n),c++,o.next()}if(c){let t=new Uint16Array(c*4),r=s[s.length-2];for(let e=s.length-3,n=0;e>=0;e-=3)t[n++]=s[e],t[n++]=s[e+1]-r,t[n++]=s[e+2]-r,t[n++]=n;i.push(new yj(t,s[2]-r,n)),a.push(r-e)}}function f(e,t){return(n,r,i)=>{let a=0,o=n.length-1,s,c;if(o>=0&&(s=n[o])instanceof _j){if(!o&&s.type==e&&s.length==i)return s;(c=s.prop(lj.lookAhead))&&(a=r[o]+s.length+c-i)}return m(e,n,r,i,a,t)}}function p(e,t,r,i,a,o,s,c,l){let u=[],d=[];for(;e.length>i;)u.push(e.pop()),d.push(t.pop()+r-a);e.push(m(n.types[s],u,d,o-a,c-o,l)),t.push(a-r)}function m(e,t,n,r,i,a,o){if(a){let e=[lj.contextHash,a];o=o?[e].concat(o):[e]}if(i>25){let e=[lj.lookAhead,i];o=o?[e].concat(o):[e]}return new _j(e,t,n,r,o)}function h(e,t){let n=o.fork(),i=0,s=0,c=0,l=n.end-r,u={size:0,start:0,skip:0};scan:for(let r=n.pos-e;n.pos>r;){let e=n.size;if(n.id==t&&e>=0){u.size=i,u.start=s,u.skip=c,c+=4,i+=4,n.next();continue}let o=n.pos-e;if(e<0||o<r||n.start<l)break;let d=n.id>=a?4:0,f=n.start;for(n.next();n.pos>o;){if(n.size<0){if(n.size==-3||n.size==-4)d+=4;else break scan}else n.id>=a&&(d+=4);n.next()}s=f,i+=e,c+=d}return(t<0||i==e)&&(u.size=i,u.start=s,u.skip=c),u.size>4?u:void 0}function g(e,t,n){let{id:r,start:i,end:s,size:u}=o;if(o.next(),u>=0&&r<a){let a=n;if(u>4){let r=o.pos-(u-4);for(;o.pos>r;)n=g(e,t,n)}t[--n]=a,t[--n]=s-e,t[--n]=i-e,t[--n]=r}else u==-3?c=r:u==-4&&(l=r);return n}let _=[],v=[];for(;o.pos>0;)u(e.start||0,e.bufferStart||0,_,v,-1,0);let y=e.length??(_.length?v[0]+_[0].length:0);return new _j(s[e.topID],_.reverse(),v.reverse(),y)}var Pj=new WeakMap;function Fj(e,t){if(!e.isAnonymous||t instanceof yj||t.type!=e)return 1;let n=Pj.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof _j)){n=1;break}n+=Fj(e,r)}Pj.set(t,n)}return n}function Ij(e,t,n,r,i,a,o,s,c){let l=0;for(let n=r;n<i;n++)l+=Fj(e,t[n]);let u=Math.ceil(l*1.5/8),d=[],f=[];function p(t,n,r,i,o){for(let s=r;s<i;){let r=s,l=n[s],m=Fj(e,t[s]);for(s++;s<i;s++){let n=Fj(e,t[s]);if(m+n>=u)break;m+=n}if(s==r+1){if(m>u){let e=t[r];p(e.children,e.positions,0,e.children.length,n[r]+o);continue}d.push(t[r])}else{let i=n[s-1]+t[s-1].length-l;d.push(Ij(e,t,n,r,s,l,i,null,c))}f.push(l+o-a)}}return p(t,n,r,i,0),(s||c)(d,f,o)}var Lj=class e{constructor(e,t,n,r,i=!1,a=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=!!i|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(t,n=[],r=!1){let i=[new e(0,t.length,t,0,!1,r)];for(let e of n)e.to>t.length&&i.push(e);return i}static applyChanges(t,n,r=128){if(!n.length)return t;let i=[],a=1,o=t.length?t[0]:null;for(let s=0,c=0,l=0;;s++){let u=s<n.length?n[s]:null,d=u?u.fromA:1e9;if(d-c>=r)for(;o&&o.from<d;){let n=o;if(c>=n.from||d<=n.to||l){let t=Math.max(n.from,c)-l,r=Math.min(n.to,d)-l;n=t>=r?null:new e(t,r,n.tree,n.offset+l,s>0,!!u)}if(n&&i.push(n),o.to>d)break;o=a<t.length?t[a++]:null}if(!u)break;c=u.toA,l=u.toA-u.toB}return i}},Rj=class{startParse(e,t,n){return typeof e==`string`&&(e=new zj(e)),n=n?n.length?n.map(e=>new cj(e.from,e.to)):[new cj(0,0)]:[new cj(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}},zj=class{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}};new lj({perNode:!0});var Bj=0,Vj=class e{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=Bj++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(t,n){let r=typeof t==`string`?t:`?`;if(t instanceof e&&(n=t),n?.base)throw Error(`Can not derive from a modified tag`);let i=new e(r,[],null,[]);if(i.set.push(i),n)for(let e of n.set)i.set.push(e);return i}static defineModifier(e){let t=new Uj(e);return e=>e.modified.indexOf(t)>-1?e:Uj.get(e.base||e,e.modified.concat(t).sort((e,t)=>e.id-t.id))}},Hj=0,Uj=class e{constructor(e){this.name=e,this.instances=[],this.id=Hj++}static get(t,n){if(!n.length)return t;let r=n[0].instances.find(e=>e.base==t&&Wj(n,e.modified));if(r)return r;let i=[],a=new Vj(t.name,i,t,n);for(let e of n)e.instances.push(a);let o=Gj(n);for(let n of t.set)if(!n.modified.length)for(let t of o)i.push(e.get(n,t));return a}};function Wj(e,t){return e.length==t.length&&e.every((e,n)=>e==t[n])}function Gj(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,i=t.length;r<i;r++)t.push(t[r].concat(e[n]));return t.sort((e,t)=>t.length-e.length)}function Kj(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(` `))if(e){let n=[],i=2,a=e;for(let t=0;;){if(a==`...`&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!r)throw RangeError(`Invalid path: `+e);if(n.push(r[0]==`*`?``:r[0][0]==`"`?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let o=e[t++];if(t==e.length&&o==`!`){i=0;break}if(o!=`/`)throw RangeError(`Invalid path: `+e);a=e.slice(t)}let o=n.length-1,s=n[o];if(!s)throw RangeError(`Invalid path: `+e);t[s]=new Jj(r,i,o>0?n.slice(0,o):null).sort(t[s])}}return qj.add(t)}var qj=new lj({combine(e,t){let n,r,i;for(;e||t;){if(!e||t&&e.depth<=t.depth?(i=t,t=t.next):(i=e,e=e.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let a=new Jj(i.tags,i.mode,i.context);n?n.next=a:r=a,n=a}return r}}),Jj=class{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}};Jj.empty=new Jj([],2,null);function Yj(e,t){let n=Object.create(null);for(let t of e)if(!Array.isArray(t.tag))n[t.tag.id]=t.class;else for(let e of t.tag)n[e.id]=t.class;let{scope:r,all:i=null}=t||{};return{style:e=>{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+` `+r:r;break}}return t},scope:r}}function Xj(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+` `+e:e)}return n}function Zj(e,t,n,r=0,i=e.length){let a=new Qj(r,Array.isArray(t)?t:[t],n);a.highlightRange(e.cursor(),r,i,``,a.highlighters),a.flush(i)}var Qj=class{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=``}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:a,from:o,to:s}=e;if(o>=n||s<=t)return;a.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(a)));let c=r,l=$j(e)||Jj.empty,u=Xj(i,l.tags);if(u&&(c&&(c+=` `),c+=u,l.mode==1&&(r+=(r?` `:``)+u)),this.startSpan(Math.max(t,o),c),l.opaque)return;let d=e.tree&&e.tree.prop(lj.mounted);if(d&&d.overlay){let a=e.node.enter(d.overlay[0].from+o,1),l=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let f=0,p=o;;f++){let m=f<d.overlay.length?d.overlay[f]:null,h=m?m.from+o:s,g=Math.max(t,p),_=Math.min(n,h);if(g<_&&u)for(;e.from<_&&(this.highlightRange(e,g,_,r,i),this.startSpan(Math.min(_,e.to),c),!(e.to>=h||!e.nextSibling())););if(!m||h>n)break;p=m.to+o,p>t&&(this.highlightRange(a.cursor(),Math.max(t,m.from+o),Math.min(n,p),``,l),this.startSpan(Math.min(n,p),c))}u&&e.parent()}else if(e.firstChild()){d&&(r=``);do if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),c)}while(e.nextSibling());e.parent()}}};function $j(e){let t=e.type.prop(qj);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}var J=Vj.define,eM=J(),tM=J(),nM=J(tM),rM=J(tM),iM=J(),aM=J(iM),oM=J(iM),sM=J(),cM=J(sM),lM=J(),uM=J(),dM=J(),fM=J(dM),pM=J(),Y={comment:eM,lineComment:J(eM),blockComment:J(eM),docComment:J(eM),name:tM,variableName:J(tM),typeName:nM,tagName:J(nM),propertyName:rM,attributeName:J(rM),className:J(tM),labelName:J(tM),namespace:J(tM),macroName:J(tM),literal:iM,string:aM,docString:J(aM),character:J(aM),attributeValue:J(aM),number:oM,integer:J(oM),float:J(oM),bool:J(iM),regexp:J(iM),escape:J(iM),color:J(iM),url:J(iM),keyword:lM,self:J(lM),null:J(lM),atom:J(lM),unit:J(lM),modifier:J(lM),operatorKeyword:J(lM),controlKeyword:J(lM),definitionKeyword:J(lM),moduleKeyword:J(lM),operator:uM,derefOperator:J(uM),arithmeticOperator:J(uM),logicOperator:J(uM),bitwiseOperator:J(uM),compareOperator:J(uM),updateOperator:J(uM),definitionOperator:J(uM),typeOperator:J(uM),controlOperator:J(uM),punctuation:dM,separator:J(dM),bracket:fM,angleBracket:J(fM),squareBracket:J(fM),paren:J(fM),brace:J(fM),content:sM,heading:cM,heading1:J(cM),heading2:J(cM),heading3:J(cM),heading4:J(cM),heading5:J(cM),heading6:J(cM),contentSeparator:J(sM),list:J(sM),quote:J(sM),emphasis:J(sM),strong:J(sM),link:J(sM),monospace:J(sM),strikethrough:J(sM),inserted:J(),deleted:J(),changed:J(),invalid:J(),meta:pM,documentMeta:J(pM),annotation:J(pM),processingInstruction:J(pM),definition:Vj.defineModifier(`definition`),constant:Vj.defineModifier(`constant`),function:Vj.defineModifier(`function`),standard:Vj.defineModifier(`standard`),local:Vj.defineModifier(`local`),special:Vj.defineModifier(`special`)};for(let e in Y){let t=Y[e];t instanceof Vj&&(t.name=e)}Yj([{tag:Y.link,class:`tok-link`},{tag:Y.heading,class:`tok-heading`},{tag:Y.emphasis,class:`tok-emphasis`},{tag:Y.strong,class:`tok-strong`},{tag:Y.keyword,class:`tok-keyword`},{tag:Y.atom,class:`tok-atom`},{tag:Y.bool,class:`tok-bool`},{tag:Y.url,class:`tok-url`},{tag:Y.labelName,class:`tok-labelName`},{tag:Y.inserted,class:`tok-inserted`},{tag:Y.deleted,class:`tok-deleted`},{tag:Y.literal,class:`tok-literal`},{tag:Y.string,class:`tok-string`},{tag:Y.number,class:`tok-number`},{tag:[Y.regexp,Y.escape,Y.special(Y.string)],class:`tok-string2`},{tag:Y.variableName,class:`tok-variableName`},{tag:Y.local(Y.variableName),class:`tok-variableName tok-local`},{tag:Y.definition(Y.variableName),class:`tok-variableName tok-definition`},{tag:Y.special(Y.variableName),class:`tok-variableName2`},{tag:Y.definition(Y.propertyName),class:`tok-propertyName tok-definition`},{tag:Y.typeName,class:`tok-typeName`},{tag:Y.namespace,class:`tok-namespace`},{tag:Y.className,class:`tok-className`},{tag:Y.macroName,class:`tok-macroName`},{tag:Y.propertyName,class:`tok-propertyName`},{tag:Y.operator,class:`tok-operator`},{tag:Y.comment,class:`tok-comment`},{tag:Y.meta,class:`tok-meta`},{tag:Y.invalid,class:`tok-invalid`},{tag:Y.punctuation,class:`tok-punctuation`}]);var mM=new lj;function Hte(e){return QC.define({combine:e?t=>t.concat(e):void 0})}var Ute=new lj,hM=class{constructor(e,t,n=[],r=``){this.data=e,this.name=r,Vw.prototype.hasOwnProperty(`tree`)||Object.defineProperty(Vw.prototype,"tree",{get(){return _M(this)}}),this.parser=t,this.extension=[CM.of(this),Vw.languageData.of((e,t,n)=>{let r=gM(e,t,n),i=r.type.prop(mM);if(!i)return[];let a=e.facet(i),o=r.type.prop(Ute);if(o){let i=r.resolve(t-r.from,n);for(let t of o)if(t.test(i,e)){let n=e.facet(t.facet);return t.type==`replace`?n:n.concat(a)}}return a})].concat(n)}isActiveAt(e,t,n=-1){return gM(e,t,n).type.prop(mM)==this.data}findRegions(e){let t=e.facet(CM);if(t?.data==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(mM)==this.data){n.push({from:t,to:t+e.length});return}let i=e.prop(lj.mounted);if(i){if(i.tree.prop(mM)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;n<e.children.length;n++){let i=e.children[n];i instanceof _j&&r(i,e.positions[n]+t)}};return r(_M(e),0),n}get allowsNesting(){return!0}};hM.setState=Ew.define();function gM(e,t,n){let r=e.facet(CM),i=_M(e).topNode;if(!r||r.allowsNesting)for(let e=i;e;e=e.enter(t,n,gj.ExcludeBuffers|gj.EnterBracketed))e.type.isTop&&(i=e);return i}var Wte=class e extends hM{constructor(e,t,n){super(e,t,[],n),this.parser=t}static define(t){let n=Hte(t.languageData);return new e(n,t.parser.configure({props:[mM.add(e=>e.isTop?n:void 0)]}),t.name)}configure(t,n){return new e(this.data,this.parser.configure(t),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}};function _M(e){let t=e.field(hM.state,!1);return t?t.tree:_j.empty}var Gte=class{constructor(e){this.doc=e,this.cursorPos=0,this.string=``,this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e<n||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}},vM=null,Kte=class e{constructor(e,t,n=[],r,i,a,o,s){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=a,this.skipped=o,this.scheduleOn=s,this.parse=null,this.tempSkipped=[]}static create(t,n,r){return new e(t,n,[],_j.empty,0,r,[],null)}startParse(){return this.parser.startParse(new Gte(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=_j.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{if(typeof e==`number`){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||=this.startParse(),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let n=this.parse.advance();if(n){if(this.fragments=this.withoutTempSkipped(Lj.addTree(n,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=this.parse.stoppedAt??this.state.doc.length,this.tree=n,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0}if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Lj.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=vM;vM=this;try{return e()}finally{vM=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=yM(e,t.from,t.to);return e}changes(t,n){let{fragments:r,tree:i,treeLen:a,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i})),r=Lj.applyChanges(r,e),i=_j.empty,a=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&s.push({from:n,to:r})}}}return new e(this.parser,n,r,i,a,o,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let t=0;t<this.skipped.length;t++){let{from:n,to:r}=this.skipped[t];n<e.to&&r>e.from&&(this.fragments=yM(this.fragments,n,r),this.skipped.splice(t--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&=(this.takeTree(),null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Rj{createParse(t,n,r){let i=r[0].from,a=r[r.length-1].to;return{parsedPos:i,advance(){let t=vM;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=a,new _j(fj.none,[],[],a-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return vM}};function yM(e,t,n){return Lj.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}var bM=class e{constructor(e){this.context=e,this.tree=e.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(t.changes,t.state),r=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new e(n)}static init(t){let n=Math.min(3e3,t.doc.length),r=Kte.create(t.facet(CM).parser,t,{from:0,to:n});return r.work(20,n)||r.takeTree(),new e(r)}};hM.state=aw.define({create:bM.init,update(e,t){for(let e of t.effects)if(e.is(hM.setState))return e.value;return t.startState.facet(CM)==t.state.facet(CM)?e.apply(t):bM.init(t.state)}});var xM=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};typeof requestIdleCallback<`u`&&(xM=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});var SM=typeof navigator<`u`&&navigator.scheduling?.isInputPending?()=>navigator.scheduling.isInputPending():null,qte=aD.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(hM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(hM.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=xM(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(hM.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!SM?Math.max(25,e.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,s=i.context.work(()=>SM&&SM()||Date.now()>a,r+(o?0:1e5));this.chunkBudget-=Date.now()-t,(s||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:hM.setState.of(new bM(i.context))})),this.chunkBudget>0&&(!s||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&=(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>nD(this.view.state,e)).then(()=>this.workScheduled--),null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),CM=QC.define({combine(e){return e.length?e[0]:null},enables:e=>[hM.state,qte,Yk.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]}),Jte=class{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}},Yte=QC.define(),wM=QC.define({combine:e=>{if(!e.length)return` `;let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw Error(`Invalid indent unit: `+JSON.stringify(e[0]));return t}});function TM(e){let t=e.facet(wM);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function EM(e,t){let n=``,r=e.tabSize,i=e.facet(wM)[0];if(i==` `){for(;t>=r;)n+=` `,t-=r;i=` `}for(let e=0;e<t;e++)n+=i;return n}function DM(e,t){e instanceof Vw&&(e=new OM(e));for(let n of e.state.facet(Yte)){let r=n(e,t);if(r!==void 0)return r}let n=_M(e.state);return n.length>=t?Xte(e,n,t):null}var OM=class{constructor(e,t={}){this.state=e,this.options=t,this.unit=TM(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return r!=null&&r>=n.from&&r<=n.to?i&&r==e?{text:``,from:e}:(t<0?r<e:r<=e)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return``;let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.countColumn(n,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(i+=a-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return cT(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}},kM=new lj;function Xte(e,t,n){let r=t.resolveStack(n),i=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let e=[];for(let t=i;t&&!(t.from<r.node.from||t.to>r.node.to||t.from==r.node.from&&t.type==r.node.type);t=t.parent)e.push(t);for(let t=e.length-1;t>=0;t--)r={node:e[t],next:r}}return AM(r,e,n)}function AM(e,t,n){for(let r=e;r;r=r.next){let e=Qte(r.node);if(e)return e(ene.create(t,n,r))}return 0}function Zte(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function Qte(e){let t=e.type.prop(kM);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(lj.closedBy))){let t=e.lastChild,n=t&&r.indexOf(t.name)>-1;return e=>MM(e,!0,1,void 0,n&&!Zte(e)?t.from:void 0)}return e.parent==null?$te:null}function $te(){return 0}var ene=class e extends OM{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(t,n,r){return new e(t,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(tne(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return AM(this.context.next,this.base,this.pos)}};function tne(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function jM(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,a=e.state.doc.lineAt(n.from),o=i==null||i<=a.from?a.to:Math.min(a.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let e=/^ */.exec(a.text.slice(n.to-a.from))[0].length;return{from:n.from,to:n.to+e}}e=i.to}}function MM(e,t,n,r,i){let a=e.textAfter,o=a.match(/^\s*/)[0].length,s=r&&a.slice(o,o+r.length)==r||i==e.pos+o,c=t?jM(e):null;return c?s?e.column(c.from):e.column(c.to):e.baseIndent+(s?0:e.unit*n)}function NM({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var PM=200;function FM(){return Vw.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent(`input.type`)&&!e.isUserEvent(`input.complete`))return e;let t=e.startState.languageDataAt(`indentOnInput`,e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+PM)return e;let a=n.sliceString(i.from,r);if(!t.some(e=>e.test(a)))return e;let{state:o}=e,s=-1,c=[];for(let{head:e}of o.selection.ranges){let t=o.doc.lineAt(e);if(t.from==s)continue;s=t.from;let n=DM(o,t.from);if(n==null)continue;let r=/^\s*/.exec(t.text)[0],i=EM(o,n);r!=i&&c.push({from:t.from,to:t.from+r.length,insert:i})}return c.length?[e,{changes:c,sequential:!0}]:e})}var IM=QC.define(),LM=new lj;function RM(e){let t=e.firstChild,n=e.lastChild;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}function zM(e,t,n){let r=_M(e);if(r.length<n)return null;let i=r.resolveStack(n,1),a=null;for(let o=i;o;o=o.next){let i=o.node;if(i.to<=n||i.from>n)continue;if(a&&i.from<t)break;let s=i.type.prop(LM);if(s&&(i.to<r.length-50||r.length==e.doc.length||!BM(i))){let r=s(i,e);r&&r.from<=n&&r.from>=t&&r.to>n&&(a=r)}}return a}function BM(e){let t=e.lastChild;return t&&t.to==e.to&&t.type.isError}function VM(e,t,n){for(let r of e.facet(IM)){let i=r(e,t,n);if(i)return i}return zM(e,t,n)}function HM(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}var UM=Ew.define({map:HM}),WM=Ew.define({map:HM});function GM(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}var KM=aw.define({create(){return UT.none},update(e,t){t.isUserEvent(`delete`)&&t.changes.iterChangedRanges((t,n)=>e=qM(e,t,n)),e=e.map(t.changes);let n=[];for(let r of t.effects)r.is(UM)&&!YM(e,r.value.from,r.value.to)?n.push(r.value):r.is(WM)&&(e=e.update({filter:(e,t)=>r.value.from!=e||r.value.to!=t,filterFrom:r.value.from,filterTo:r.value.to}));if(n.length){let{preparePlaceholder:r}=t.state.facet(nN),i=n.map(e=>(r?UT.replace({widget:new oN(r(t.state,e))}):aN).range(e.from,e.to));e=e.update({add:i})}return t.selection&&(e=qM(e,t.selection.main.head)),e},provide:e=>Yk.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw RangeError(`Invalid JSON for fold state`);let t=[];for(let n=0;n<e.length;){let r=e[n++],i=e[n++];if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid JSON for fold state`);t.push(aN.range(r,i))}return UT.set(t,!0)}});function qM(e,t,n=t){let r=!1;return e.between(t,n,(e,i)=>{e<n&&i>t&&(r=!0)}),r?e.update({filterFrom:t,filterTo:n,filter:(e,r)=>e>=n||r<=t}):e}function JM(e,t,n){var r;let i=null;return(r=e.field(KM,!1))==null||r.between(t,n,(e,t)=>{(!i||i.from>e)&&(i={from:e,to:t})}),i}function YM(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function XM(e,t){return e.field(KM,!1)?t:t.concat(Ew.appendConfig.of(rN()))}var ZM=e=>{for(let t of GM(e)){let n=VM(e.state,t.from,t.to);if(n)return e.dispatch({effects:XM(e.state,[UM.of(n),$M(e,n)])}),!0}return!1},QM=e=>{if(!e.state.field(KM,!1))return!1;let t=[];for(let n of GM(e)){let r=JM(e.state,n.from,n.to);r&&t.push(WM.of(r),$M(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0};function $M(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return Yk.announce.of(`${e.state.phrase(n?`Folded lines`:`Unfolded lines`)} ${r} ${e.state.phrase(`to`)} ${i}.`)}var eN=[{key:`Ctrl-Shift-[`,mac:`Cmd-Alt-[`,run:ZM},{key:`Ctrl-Shift-]`,mac:`Cmd-Alt-]`,run:QM},{key:`Ctrl-Alt-[`,run:e=>{let{state:t}=e,n=[];for(let r=0;r<t.doc.length;){let i=e.lineBlockAt(r),a=VM(t,i.from,i.to);a&&n.push(UM.of(a)),r=(a?e.lineBlockAt(a.to):i).to+1}return n.length&&e.dispatch({effects:XM(e.state,n)}),!!n.length}},{key:`Ctrl-Alt-]`,run:e=>{let t=e.state.field(KM,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(WM.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],tN={placeholderDOM:null,preparePlaceholder:null,placeholderText:`…`},nN=QC.define({combine(e){return Hw(e,tN)}});function rN(e){let t=[KM,uN];return e&&t.push(nN.of(e)),t}function iN(e,t){let{state:n}=e,r=n.facet(nN),i=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=JM(e.state,n.from,n.to);r&&e.dispatch({effects:WM.of(r)}),t.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(e,i,t);let a=document.createElement(`span`);return a.textContent=r.placeholderText,a.setAttribute(`aria-label`,n.phrase(`folded code`)),a.title=n.phrase(`unfold`),a.className=`cm-foldPlaceholder`,a.onclick=i,a}var aN=UT.replace({widget:new class extends VT{toDOM(e){return iN(e,null)}}}),oN=class extends VT{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return iN(e,this.value)}},sN={openText:`⌄`,closedText:`›`,markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1},cN=class extends PA{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement(`span`);return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?`Fold line`:`Unfold line`),t}};function lN(e={}){let t={...sN,...e},n=new cN(t,!0),r=new cN(t,!1),i=aD.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(CM)!=e.state.facet(CM)||e.startState.field(KM,!1)!=e.state.field(KM,!1)||_M(e.startState)!=_M(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new Zw;for(let i of e.viewportLineBlocks){let a=JM(e.state,i.from,i.to)?r:VM(e.state,i.from,i.to)?n:null;a&&t.add(i.from,i.from,a)}return t.finish()}}),{domEventHandlers:a}=t;return[i,zA({class:`cm-foldGutter`,markers(e){return e.plugin(i)?.markers||Jw.empty},initialSpacer(){return new cN(t,!1)},domEventHandlers:{...a,click:(e,t,n)=>{if(a.click&&a.click(e,t,n))return!0;let r=JM(e.state,t.from,t.to);if(r)return e.dispatch({effects:WM.of(r)}),!0;let i=VM(e.state,t.from,t.to);return i?(e.dispatch({effects:UM.of(i)}),!0):!1}}}),rN()]}var uN=Yk.baseTheme({".cm-foldPlaceholder":{backgroundColor:`#eee`,border:`1px solid #ddd`,color:`#888`,borderRadius:`.2em`,margin:`0 1px`,padding:`0 1px`,cursor:`pointer`},".cm-foldGutter span":{padding:`0 1px`,cursor:`pointer`}}),dN=class e{constructor(e,t){this.specs=e;let n;function r(e){let t=mT.newName();return(n||=Object.create(null))[`.`+t]=e,t}let i=typeof t.all==`string`?t.all:t.all?r(t.all):void 0,a=t.scope;this.scope=a instanceof hM?e=>e.prop(mM)==a.data:a?e=>e==a:void 0,this.style=Yj(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new mT(n):null,this.themeType=t.themeType}static define(t,n){return new e(t,n||{})}},fN=QC.define(),pN=QC.define({combine(e){return e.length?[e[0]]:null}});function mN(e){let t=e.facet(fN);return t.length?t:e.facet(pN)}function hN(e,t){let n=[_N],r;return e instanceof dN&&(e.module&&n.push(Yk.styleModule.of(e.module)),r=e.themeType),t?.fallback?n.push(pN.of(e)):r?n.push(fN.computeN([Yk.darkTheme],t=>t.facet(Yk.darkTheme)==(r==`dark`)?[e]:[])):n.push(fN.of(e)),n}var gN=class{constructor(e){this.markCache=Object.create(null),this.tree=_M(e.state),this.decorations=this.buildDeco(e,mN(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=_M(e.state),n=mN(e.state),r=n!=mN(e.startState),{viewport:i}=e.view,a=e.changes.mapPos(this.decoratedTo,1);t.length<i.to&&!r&&t.type==this.tree.type&&a>=i.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=i.to)}buildDeco(e,t){if(!t||!this.tree.length)return UT.none;let n=new Zw;for(let{from:r,to:i}of e.visibleRanges)Zj(this.tree,t,(e,t,r)=>{n.add(e,t,this.markCache[r]||(this.markCache[r]=UT.mark({class:r})))},r,i);return n.finish()}},_N=cw.high(aD.fromClass(gN,{decorations:e=>e.decorations}));Y.meta,Y.link,Y.heading,Y.emphasis,Y.strong,Y.strikethrough,Y.keyword,Y.atom,Y.bool,Y.url,Y.contentSeparator,Y.labelName,Y.literal,Y.inserted,Y.string,Y.deleted,Y.regexp,Y.escape,Y.string,Y.variableName,Y.variableName,Y.typeName,Y.namespace,Y.className,Y.variableName,Y.macroName,Y.propertyName,Y.comment,Y.invalid;var vN=Yk.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:`#328c8252`},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bb555544`}}),yN=1e4,bN=`()[]{}`,xN=QC.define({combine(e){return Hw(e,{afterCursor:!0,brackets:bN,maxScanDistance:yN,renderMatch:wN})}}),SN=UT.mark({class:`cm-matchingBracket`}),CN=UT.mark({class:`cm-nonmatchingBracket`});function wN(e){let t=[],n=e.matched?SN:CN;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}function TN(e){let t=[],n=e.facet(xN);for(let r of e.selection.ranges){if(!r.empty)continue;let i=jN(e,r.head,-1,n)||r.head>0&&jN(e,r.head-1,1,n)||n.afterCursor&&(jN(e,r.head,1,n)||r.head<e.doc.length&&jN(e,r.head+1,-1,n));i&&(t=t.concat(n.renderMatch(i,e)))}return UT.set(t,!0)}var EN=[aD.fromClass(class{constructor(e){this.paused=!1,this.decorations=TN(e.state)}update(e){(e.docChanged||e.selectionSet||this.paused)&&(e.view.composing?(this.decorations=this.decorations.map(e.changes),this.paused=!0):(this.decorations=TN(e.state),this.paused=!1))}},{decorations:e=>e.decorations}),vN];function DN(e={}){return[xN.of(e),EN]}var ON=new lj;function kN(e,t,n){let r=e.prop(t<0?lj.openedBy:lj.closedBy);if(r)return r;if(e.name.length==1){let r=n.indexOf(e.name);if(r>-1&&r%2==+(t<0))return[n[r+t]]}return null}function AN(e){let t=e.type.prop(ON);return t?t(e.node):e}function jN(e,t,n,r={}){let i=r.maxScanDistance||yN,a=r.brackets||bN,o=_M(e),s=o.resolveInner(t,n);for(let r=s;r;r=r.parent){let i=kN(r.type,n,a);if(i&&r.from<r.to){let o=AN(r);if(o&&(n>0?t>=o.from&&t<o.to:t>o.from&&t<=o.to))return MN(e,t,n,r,o,i,a)}}return NN(e,t,n,o,s.type,i,a)}function MN(e,t,n,r,i,a,o){let s=r.parent,c={from:i.from,to:i.to},l=0,u=s?.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(l==0&&a.indexOf(u.type.name)>-1&&u.from<u.to){let e=AN(u);return{start:c,end:e?{from:e.from,to:e.to}:void 0,matched:!0}}if(kN(u.type,n,o))l++;else if(kN(u.type,-n,o)){if(l==0){let e=AN(u);return{start:c,end:e&&e.from<e.to?{from:e.from,to:e.to}:void 0,matched:!1}}l--}}while(n<0?u.prevSibling():u.nextSibling());return{start:c,matched:!1}}function NN(e,t,n,r,i,a,o){if(n<0?!t:t==e.doc.length)return null;let s=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),c=o.indexOf(s);if(c<0||c%2==0!=n>0)return null;let l={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=a;){let a=u.value;n<0&&(e+=a.length);let s=t+e*n;for(let e=n>0?0:a.length-1,t=n>0?a.length:-1;e!=t;e+=n){let t=o.indexOf(a[e]);if(!(t<0||r.resolveInner(s+e,1).type!=i)){if(t%2==0==n>0)d++;else if(d==1)return{start:l,end:{from:s+e,to:s+e+1},matched:t>>1==c>>1};else d--}}n>0&&(e+=a.length)}return u.done?{start:l,matched:!1}:null}var PN=Object.create(null),FN=[fj.none],IN=[],LN=Object.create(null),RN=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])RN[e]=BN(PN,t);function zN(e,t){IN.indexOf(e)>-1||(IN.push(e),console.warn(t))}function BN(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||Y[n];r?typeof r==`function`?t.length?t=t.map(r):zN(n,`Modifier ${n} used at start of tag`):t.length?zN(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:zN(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=LN[i];if(a)return a.id;let o=LN[i]=fj.define({id:FN.length,name:r,props:[Kj({[r]:n})]});return FN.push(o),o.id}DE.RTL,DE.LTR;var VN=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=KN(e.state,n.from);return r.line?UN(e):r.block?GN(e):!1};function HN(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var UN=HN(ZN,0),WN=HN(XN,0),GN=HN((e,t)=>XN(e,t,YN(t)),0);function KN(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var qN=50;function JN(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-qN,r),o=e.sliceDoc(i,i+qN),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+qN),d=e.sliceDoc(i-qN,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function YN(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function XN(e,t,n=t.selection.ranges){let r=n.map(e=>KN(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>JN(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function ZN(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=KN(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var QN=Cw.define(),$N=Cw.define(),eP=QC.define(),tP=QC.define({combine(e){return Hw(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),nP=aw.define({create(){return xP.empty},update(e,t){let n=t.state.facet(tP),r=t.annotation(QN);if(r){let i=lP.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?uP(o,o.length,n.minDepth,i):gP(o,t.startState.selection),new xP(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation($N);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Dw.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=lP.fromTransaction(t),o=t.annotation(Dw.time),s=t.annotation(Dw.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new xP(e.done.map(lP.fromJSON),e.undone.map(lP.fromJSON))}});function rP(e={}){return[nP,tP.of(e),Yk.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?aP:e.inputType==`historyRedo`?oP:null;return n?(e.preventDefault(),n(t)):!1}})]}function iP(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(nP,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var aP=iP(0,!1),oP=iP(1,!1),sP=iP(0,!0),cP=iP(1,!0),lP=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&HC.fromJSON(t.changes),[],t.mapped&&VC.fromJSON(t.mapped),t.startSelection&&K.fromJSON(t.startSelection),t.selectionsAfter.map(K.fromJSON))}static fromTransaction(t,n){let r=mP;for(let e of t.startState.facet(eP)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,mP)}static selection(t){return new e(void 0,mP,void 0,void 0,t)}};function uP(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function dP(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function fP(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function pP(e,t){return e.length?t.length?e.concat(t):e:t}var mP=[],hP=200;function gP(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-hP));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),uP(e,e.length-1,1e9,n.setSelAfter(r)))}return[lP.selection([t])]}function _P(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function vP(e,t){if(!e.length)return e;let n=e.length,r=mP;for(;n;){let i=yP(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[lP.selection(r)]:mP}function yP(e,t,n){let r=pP(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):mP,n);if(!e.changes)return lP.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new lP(i,Ew.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var bP=/^(input\.type|delete)($|\.)/,xP=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||bP.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,dP(s.changes,t.changes))||r==`input.type.compose`)?uP(o,o.length-1,i.minDepth,new lP(t.changes.compose(s.changes),pP(Ew.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,mP)):uP(o,o.length,i.minDepth,t),new e(o,mP,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:mP;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&fP(a[a.length-1],t)?this:new e(gP(this.done,t),this.undone,n,r)}addMapping(t){return new e(vP(this.done,t),vP(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:QN.of({side:e,rest:_P(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?mP:r.slice(0,r.length-1);return i.mapped&&(n=vP(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:QN.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};xP.empty=new xP(mP,mP);var SP=[{key:`Mod-z`,run:aP,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:oP,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:oP,preventDefault:!0},{key:`Mod-u`,run:sP,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:cP,preventDefault:!0}];function CP(e,t){return K.create(e.ranges.map(t),e.mainIndex)}function wP(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function TP({state:e,dispatch:t},n){let r=CP(e.selection,n);return!r.eq(e.selection,!0)&&(t(wP(e,r)),!0)}function EP(e,t){return K.cursor(t?e.to:e.from)}function DP(e,t){return TP(e,n=>n.empty?e.moveByChar(n,t):EP(n,t))}function OP(e){return e.textDirectionAt(e.state.selection.main.head)==DE.LTR}var kP=e=>DP(e,!OP(e)),AP=e=>DP(e,OP(e));function jP(e,t){return TP(e,n=>n.empty?e.moveByGroup(n,t):EP(n,t))}var MP=e=>jP(e,!OP(e)),NP=e=>jP(e,OP(e));typeof Intl<`u`&&Intl.Segmenter;function PP(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function FP(e,t,n){let r=_M(e).resolveInner(t.head),i=n?lj.closedBy:lj.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;PP(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?jN(e,r.from,1):jN(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,K.cursor(s,n?-1:1)}var IP=e=>TP(e,t=>FP(e.state,t,!OP(e))),LP=e=>TP(e,t=>FP(e.state,t,OP(e)));function RP(e,t){return TP(e,n=>{if(!n.empty)return EP(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var zP=e=>RP(e,!1),BP=e=>RP(e,!0);function VP(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(Yk.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function HP(e,t){let n=VP(e),{state:r}=e,i=CP(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):EP(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=Yk.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(wP(r,i),{effects:a}),!0}var UP=e=>HP(e,!1),WP=e=>HP(e,!0);function GP(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=K.cursor(r.from+n))}return i}var KP=e=>TP(e,t=>GP(e,t,!0)),qP=e=>TP(e,t=>GP(e,t,!1)),JP=e=>TP(e,t=>GP(e,t,!OP(e))),YP=e=>TP(e,t=>GP(e,t,OP(e))),XP=e=>TP(e,t=>e.moveToLineBoundary(t,!1,!1)),ZP=e=>TP(e,t=>e.moveToLineBoundary(t,!0,!1));function QP(e,t,n){let r=!1,i=CP(e.selection,t=>{let i=jN(e,t.head,-1)||jN(e,t.head,1)||t.head>0&&jN(e,t.head-1,1)||t.head<e.doc.length&&jN(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?K.range(t.anchor,a):K.cursor(a)});return r?(t(wP(e,i)),!0):!1}var $P=({state:e,dispatch:t})=>QP(e,t,!1);function eF(e,t,n){let r=CP(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=K.range(e.head,e.anchor));let r=n(e);return K.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(wP(e.state,r)),!0)}function tF(e,t){return eF(e,t,n=>e.moveByChar(n,t))}var nF=e=>tF(e,!OP(e)),rF=e=>tF(e,OP(e));function iF(e,t){return eF(e,t,n=>e.moveByGroup(n,t))}var aF=e=>iF(e,!OP(e)),oF=e=>iF(e,OP(e)),sF=e=>{let t=!OP(e);return eF(e,t,n=>FP(e.state,n,t))},cF=e=>{let t=OP(e);return eF(e,t,n=>FP(e.state,n,t))};function lF(e,t){return eF(e,t,n=>e.moveVertically(n,t))}var uF=e=>lF(e,!1),dF=e=>lF(e,!0);function fF(e,t){return eF(e,t,n=>e.moveVertically(n,t,VP(e).height))}var pF=e=>fF(e,!1),mF=e=>fF(e,!0),hF=e=>eF(e,!0,t=>GP(e,t,!0)),gF=e=>eF(e,!1,t=>GP(e,t,!1)),_F=e=>{let t=!OP(e);return eF(e,t,n=>GP(e,n,t))},vF=e=>{let t=OP(e);return eF(e,t,n=>GP(e,n,t))},yF=e=>eF(e,!1,t=>K.cursor(e.lineBlockAt(t.head).from)),bF=e=>eF(e,!0,t=>K.cursor(e.lineBlockAt(t.head).to)),xF=({state:e,dispatch:t})=>(t(wP(e,{anchor:0})),!0),SF=({state:e,dispatch:t})=>(t(wP(e,{anchor:e.doc.length})),!0),CF=({state:e,dispatch:t})=>(t(wP(e,{anchor:e.selection.main.anchor,head:0})),!0),wF=({state:e,dispatch:t})=>(t(wP(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),TF=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),EF=({state:e,dispatch:t})=>{let n=GF(e).map(({from:t,to:n})=>K.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:K.create(n),userEvent:`select`})),!0},DF=({state:e,dispatch:t})=>{let n=CP(e.selection,t=>{let n=_M(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return K.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(wP(e,n)),!0)};function OF(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(wP(n,K.create(i,i.length-1))),!0)}var kF=e=>OF(e,!1),AF=e=>OF(e,!0),jF=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=K.create([n.main]):n.main.empty||(r=K.create([K.cursor(n.main.head)])),r?(t(wP(e,r)),!0):!1};function MF(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=NF(e,o,!1)):o>i&&(n=`delete.forward`,o=NF(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=NF(e,i,!1),a=NF(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:K.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?Yk.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function NF(e,t,n){if(e instanceof Yk)for(let r of e.state.facet(Yk.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var PF=(e,t,n)=>MF(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=cT(s,a.tabSize)%TM(a)||TM(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=PC(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=PC(o.text,c-o.from,!1,!1)+o.from);return c}),FF=e=>PF(e,!1,!0),IF=e=>PF(e,!0,!1),LF=(e,t)=>MF(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=PC(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),RF=e=>LF(e,!1),zF=e=>LF(e,!0),BF=e=>MF(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),VF=e=>MF(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),HF=e=>MF(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),UF=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:CC.of([``,``])},range:K.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},WF=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:PC(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:PC(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:K.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function GF(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function KF(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of GF(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(K.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(K.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:K.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var qF=({state:e,dispatch:t})=>KF(e,t,!1),JF=({state:e,dispatch:t})=>KF(e,t,!0);function YF(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of GF(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var XF=({state:e,dispatch:t})=>YF(e,t,!1),ZF=({state:e,dispatch:t})=>YF(e,t,!0),QF=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(GF(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=CP(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function $F(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=_M(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(lj.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var eI=nI(!1),tI=nI(!0);function nI(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&$F(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new OM(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=DM(s,r);for(c??=cT(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,EM(t,c)];return o&&l.push(EM(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:CC.of(l)},range:K.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function rI(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:K.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var iI=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new OM(e,{overrideIndentation:e=>n[e]??-1}),i=rI(e,(t,i,a)=>{let o=DM(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=EM(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},aI=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(rI(e,(t,n)=>{n.push({from:t.from,insert:e.facet(wM)})}),{userEvent:`input.indent`})),!0),oI=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(rI(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=cT(r,e.tabSize),a=0,o=EM(e,Math.max(0,i-TM(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),sI=e=>(e.setTabFocusMode(),!0),cI=[{key:`Ctrl-b`,run:kP,shift:nF,preventDefault:!0},{key:`Ctrl-f`,run:AP,shift:rF},{key:`Ctrl-p`,run:zP,shift:uF},{key:`Ctrl-n`,run:BP,shift:dF},{key:`Ctrl-a`,run:XP,shift:yF},{key:`Ctrl-e`,run:ZP,shift:bF},{key:`Ctrl-d`,run:IF},{key:`Ctrl-h`,run:FF},{key:`Ctrl-k`,run:BF},{key:`Ctrl-Alt-h`,run:RF},{key:`Ctrl-o`,run:UF},{key:`Ctrl-t`,run:WF},{key:`Ctrl-v`,run:WP}],lI=[{key:`ArrowLeft`,run:kP,shift:nF,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:MP,shift:aF,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:JP,shift:_F,preventDefault:!0},{key:`ArrowRight`,run:AP,shift:rF,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:NP,shift:oF,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:YP,shift:vF,preventDefault:!0},{key:`ArrowUp`,run:zP,shift:uF,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:xF,shift:CF},{mac:`Ctrl-ArrowUp`,run:UP,shift:pF},{key:`ArrowDown`,run:BP,shift:dF,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:SF,shift:wF},{mac:`Ctrl-ArrowDown`,run:WP,shift:mF},{key:`PageUp`,run:UP,shift:pF},{key:`PageDown`,run:WP,shift:mF},{key:`Home`,run:qP,shift:gF,preventDefault:!0},{key:`Mod-Home`,run:xF,shift:CF},{key:`End`,run:KP,shift:hF,preventDefault:!0},{key:`Mod-End`,run:SF,shift:wF},{key:`Enter`,run:eI,shift:eI},{key:`Mod-a`,run:TF},{key:`Backspace`,run:FF,shift:FF,preventDefault:!0},{key:`Delete`,run:IF,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:RF,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:zF,preventDefault:!0},{mac:`Mod-Backspace`,run:VF,preventDefault:!0},{mac:`Mod-Delete`,run:HF,preventDefault:!0}].concat(cI.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),uI=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:IP,shift:sF},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:LP,shift:cF},{key:`Alt-ArrowUp`,run:qF},{key:`Shift-Alt-ArrowUp`,run:XF},{key:`Alt-ArrowDown`,run:JF},{key:`Shift-Alt-ArrowDown`,run:ZF},{key:`Mod-Alt-ArrowUp`,run:kF},{key:`Mod-Alt-ArrowDown`,run:AF},{key:`Escape`,run:jF},{key:`Mod-Enter`,run:tI},{key:`Alt-l`,mac:`Ctrl-l`,run:EF},{key:`Mod-i`,run:DF,preventDefault:!0},{key:`Mod-[`,run:oI},{key:`Mod-]`,run:aI},{key:`Mod-Alt-\\`,run:iI},{key:`Shift-Mod-k`,run:QF},{key:`Shift-Mod-\\`,run:$P},{key:`Mod-/`,run:VN},{key:`Alt-A`,mac:`Ctrl-A`,run:WN},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:sI}].concat(lI),dI={key:`Tab`,run:aI,shift:oI},fI=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new pI(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.reducePos=this.pos=n+e.length;this.pushState(t,n),this.buffer.push(r,n,i,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new mI(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new pI(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},pI=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},mI=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},hI=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function gI(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var _I=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},vI=new _I,yI=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=vI,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=vI,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},bI=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;SI(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};bI.prototype.contextual=bI.prototype.fallback=bI.prototype.extend=!1;var xI=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?gI(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(SI(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};xI.prototype.contextual=bI.prototype.fallback=bI.prototype.extend=!1;function SI(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||wI(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function CI(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function wI(e,t,n,r){let i=CI(n,r,t);return i<0||CI(n,r,e)<i}var TI=typeof process<`u`&&/\bparse\b/.test({}.LOG),EI=null;function DI(e,t,n){let r=e.cursor(gj.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var OI=class{constructor(e,t){this.fragments=e,this.minRepeat=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?DI(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?DI(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;if(e<this.safeFrom)return null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof _j){let n=a>this.lastRepeatPos&&i.type.id>=this.minRepeat;if(a==e||n){let t=a+i.length,r;if(a>=this.safeFrom&&t<=this.safeTo&&(!(r=i.prop(lj.lookAhead))||t+r<this.fragment.to)&&(n&&(this.lastRepeat=i,this.lastRepeatPos=a),a==e))return i}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},kI=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new _I)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if((!n||c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new _I,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new _I,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=PI(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(PI(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(PI(o,s+1),t,n,r))}return r}},AI=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new yI(t,r),this.tokens=new kI(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[fI.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new OI(n,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&FI(r);if(e)return TI&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw TI&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return TI&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}tryReuse(e,t,n,r){if(!n)return null;let i=e.curContext&&e.curContext.tracker.strict,a=i?e.curContext.hash:0;for(;n;){let o=this.parser.nodeSet.types[n.type.id]==n.type?this.parser.getGoto(e.state,n.type.id):-1;if(o>-1&&n.length&&(!i||(n.prop(lj.contextHash)||0)==a))return e.useNode(n,o,t),n;if(n.children.length==0||n.positions[0]>0)break;let s=n.children[0];if(s instanceof _j&&(!r||s.type.id>=this.parser.minRepeatTerm))n=s;else break}return null}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=TI?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(t)return TI&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(t.type.id)})`),!0}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),TI&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),TI&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return jI(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=TI?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),TI&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(TI&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)TI&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))TI&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),TI&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),jI(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),_j.build({buffer:hI.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(EI||=new WeakMap).get(e);return t||EI.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function jI(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var MI=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},NI=class e extends Rj{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=lj[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new pj(t.map((t,i)=>fj.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=oj;let a=gI(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(II),this.states=gI(e.states,Uint32Array),this.data=gI(e.stateData),this.goto=gI(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new bI(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new AI(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=PI(n,i+2)];else if(n[i+1]==2)return PI(n,i+2);else break}if(a==t||a==0)return PI(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=PI(this.data,n+2);else break}r=t(PI(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=PI(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=II(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new MI(e,n,r)}static deserialize(t){return new e(t)}};function PI(e,t){return e[t]|e[t+1]<<16}function FI(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function II(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var LI=Kj({String:Y.string,Number:Y.number,"True False":Y.bool,PropertyName:Y.propertyName,Null:Y.null,", :":Y.separator,"[ ]":Y.squareBracket,"{ }":Y.brace}),RI=NI.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:`#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O`,goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:`⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array`,maxTerm:25,nodeProps:[[`isolate`,-2,6,11,``],[`openedBy`,7,`{`,14,`[`],[`closedBy`,8,`}`,15,`]`]],propSources:[LI],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),zI=Wte.define({name:`json`,parser:RI.configure({props:[kM.add({Object:NM({except:/^\s*\}/}),Array:NM({except:/^\s*\]/})}),LM.add({"Object Array":RM})]}),languageData:{closeBrackets:{brackets:[`[`,`{`,`"`]},indentOnInput:/^\s*[\}\]]$/}}),BI=8,VI=32,HI=48,UI=8;function WI({side:e,span:t,floor:n,ceil:r,reset:i,onReset:a,onSpan:o,onKeep:s,onShut:c,label:l,bar:u,step:d=BI,...f}){let p=e===`top`,m=t=>e===`start`?Zm(t)?`right`:`left`:e===`end`?Zm(t)?`left`:`right`:e,h=V.useRef(1),g=V.useRef(0),_=V.useRef(`none`),v=V.useRef(t),y=V.useRef(t),b=V.useRef(0),[x,S]=V.useState(!1),[C,w]=V.useState(!1),[T,E]=V.useState(!1);V.useEffect(()=>()=>cancelAnimationFrame(b.current),[]);let D=e=>Math.round(Math.min(r,Math.max(n,e))),O=e=>p?e.clientY:e.clientX,k=e=>{let n=e?.parentElement?.getBoundingClientRect();return n?p?n.height:n.width:t},ee=e=>{o(e),s?.(e)},A=()=>{_.current=`none`,cancelAnimationFrame(b.current),b.current=0,E(!1)},j=()=>{if(_.current===`none`)return;let e=_.current===`moved`;A(),e&&ee(v.current)};V.useEffect(()=>{if(!T||typeof window>`u`)return;let e=e=>{e.key===`Escape`&&_.current!==`none`&&(e.preventDefault(),A(),o(y.current))};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)});let M=p?{l:0,r:0,b:0,height:UI,justify:`center`}:{t:0,b:0,width:UI,items:`center`,...e===`start`?{insetInlineEnd:0}:e===`end`?{insetInlineStart:0}:e===`left`?{r:0}:{l:0}};return(0,H.jsx)(z,{role:`separator`,"aria-orientation":p?`horizontal`:`vertical`,"aria-label":l,"aria-valuenow":Math.round(t),"aria-valuemin":n,"aria-valuemax":r,tabIndex:0,"data-slot":`grip`,"data-side":e,"data-moving":T?``:void 0,position:`absolute`,...M,z:10,cursor:p?`row-resize`:`col-resize`,outlineWidth:0,focusVisibleStyle:{outlineWidth:0},style:{touchAction:`none`},onPointerEnter:()=>S(!0),onPointerLeave:()=>S(!1),onFocus:e=>w(e.currentTarget.matches(`:focus-visible`)),onBlur:()=>w(!1),onPointerDown:e=>{if(e.button!==0)return;e.preventDefault(),e.currentTarget.setPointerCapture?.(e.pointerId);let t=k(e.currentTarget);h.current=m(e.currentTarget)===`right`?-1:1,g.current=O(e)-h.current*t,v.current=D(t),y.current=D(t),_.current=`held`,E(!0)},onPointerMove:e=>{if(_.current===`none`)return;_.current=`moved`;let t=h.current*(O(e)-g.current);if(c&&t<n-HI){A(),e.currentTarget.releasePointerCapture?.(e.pointerId),c();return}v.current=D(t),!b.current&&(b.current=requestAnimationFrame(()=>{b.current=0,o(v.current)}))},onPointerUp:j,onPointerCancel:j,onDoubleClick:()=>a?a():ee(D(i??t)),onKeyDown:e=>{let t=e.shiftKey?VI:d,i=k(e.currentTarget),a=m(e.currentTarget),o=a===`left`?`ArrowRight`:a===`right`?`ArrowLeft`:`ArrowDown`,s=a===`left`?`ArrowLeft`:a===`right`?`ArrowRight`:`ArrowUp`,l=e.key===o?i+t:e.key===s?i-t:e.key===`Home`?n:e.key===`End`?r:null;if(l!==null){if(e.preventDefault?.(),c&&l<n)return c();ee(D(l))}},...f,children:u?(0,H.jsx)(z,{"data-slot":`grip-bar`,...(()=>{let[e,t]=u===`edge`?[4,48]:[3,32];return p?{height:e,width:t}:{width:e,height:t}})(),self:`center`,rounded:`$10`,bg:T?`$rim`:C?`$outlineColor`:x?`$hint`:`transparent`,[p?`scaleX`:`scaleY`]:T||x||C?1.2:1,animation:`quickest`,pointerEvents:`none`}):(0,H.jsx)(z,{...p?{height:2,width:`100%`}:{width:2,height:`100%`},rounded:1,bg:C||T?`$outlineColor`:x?`$rim`:`transparent`,pointerEvents:`none`})})}var GI=`
32
- \r`,KI=`"\\/bfnrt`,qI=/-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/y,JI=/[0-9a-fA-F]{4}/y,YI=/^(\{|\[\s*([[{"\]\-\d]|true\b|false\b|null\b|$))/,XI=e=>e===void 0?`end of input`:e===`
33
- `?`line break`:`character '${e}'`;function ZI(e){let t=0,n=(e,n=t)=>{throw{at:n,message:e}},r=()=>{for(;t<e.length&&GI.includes(e[t]);)t++},i=()=>{for(t++;t<e.length;){let r=e[t];if(r===`"`){t++;return}if(r===`\\`){let r=e[t+1];if(r===`u`){JI.lastIndex=t+2,JI.test(e)||n(`Expected four hex digits after \\u`,t+2),t+=6;continue}(r===void 0||!KI.includes(r))&&n(`Invalid escape '\\${r??``}' in string`,t+1),t+=2;continue}r<` `&&n(r===`
34
- `?`Unterminated string`:`Control character in string`),t++}n(`Unterminated string`)},a=()=>{qI.lastIndex=t;let r=qI.exec(e);(!r||r[0]===`-`)&&n(`Invalid number`),t+=r[0].length},o=a=>{r(),e[t]!==`"`&&n(a&&e[t]===`}`?`Trailing comma before '}'`:`Expected a double-quoted property name, found ${XI(e[t])}`),i(),r(),e[t]!==`:`&&n(`Expected ':' after property name, found ${XI(e[t])}`),t++},s=[],c=!0;try{for(;;){if(r(),c){let l=e[t];if(l===`{`||l===`[`){if(t++,r(),e[t]===(l===`{`?`}`:`]`)){t++,c=!1;continue}s.push(l),l===`{`&&o(!1);continue}if(l===`"`)i();else if(l===`-`||l!==void 0&&l>=`0`&&l<=`9`)a();else{let r=[`true`,`false`,`null`].find(n=>e.startsWith(n,t));r||n(`Unexpected ${XI(l)}`),t+=r.length}c=!1;continue}let l=s.at(-1);if(!l)return t<e.length&&n(`Unexpected ${XI(e[t])} after the JSON value`),null;if(e[t]===`,`){t++,l===`{`?o(!0):(r(),e[t]===`]`&&n(`Trailing comma before ']'`)),c=!0;continue}if(e[t]===(l===`{`?`}`:`]`)){t++,s.pop();continue}n(l===`{`?`Expected ',' or '}' after property value, found ${XI(e[t])}`:`Expected ',' or ']' after array element, found ${XI(e[t])}`)}}catch(e){return e}}function QI(e,t){let n=1,r=0;for(let i=0;i<t&&i<e.length;i++)e[i]===`
35
- `&&(n++,r=i+1);return{line:n,column:t-r+1}}function $I(e,t={}){let n=e.trim();if(!n)return{kind:`empty`};try{return{kind:`json`,value:JSON.parse(e)}}catch(r){if(t.text&&!YI.test(n))return{kind:`text`,value:e};let i=ZI(e)??{at:0,message:r instanceof Error?r.message:String(r)};return{kind:`error`,message:i.message,at:i.at,...QI(e,i.at)}}}function eL(e){let t=$I(e);return t.kind===`json`?JSON.stringify(t.value,null,2):null}var tL=[`javascript`,`typescript`,`python`,`java`,`csharp`,`cpp`,`c`,`go`,`rust`,`ruby`,`php`,`swift`,`kotlin`,`dart`,`html`,`css`,`scss`,`json`,`xml`,`yaml`,`sql`,`markdown`,`shell`,`plaintext`],nL={javascript:`JavaScript`,typescript:`TypeScript`,python:`Python`,java:`Java`,csharp:`C#`,cpp:`C++`,c:`C`,go:`Go`,rust:`Rust`,ruby:`Ruby`,php:`PHP`,swift:`Swift`,kotlin:`Kotlin`,dart:`Dart`,html:`HTML`,css:`CSS`,scss:`SCSS`,json:`JSON`,xml:`XML`,yaml:`YAML`,sql:`SQL`,markdown:`Markdown`,shell:`Shell`,plaintext:D(`Plain Text`)},rL=4096,iL=Yk.theme({"&":{color:`var(--ink)`,backgroundColor:`transparent`},"&.cm-focused":{outline:`none`},".cm-scroller":{fontFamily:`var(--font-mono, 'Zen Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace)`,lineHeight:`1.6`,overflow:`auto`,flex:`1 1 auto`,height:`auto`,minHeight:`0`},".cm-content":{padding:`8px 0`,caretColor:`var(--ink)`},".cm-line":{padding:`0 12px`},".cm-gutters":{backgroundColor:`transparent`,color:`var(--codeDim)`,border:`none`,borderInlineEnd:`1px solid var(--edge)`},".cm-lineNumbers .cm-gutterElement":{padding:`0 10px 0 12px`,minWidth:`28px`},".cm-activeLine":{backgroundColor:`var(--panel)`},".cm-activeLineGutter":{backgroundColor:`transparent`,color:`var(--quiet)`},".cm-cursor, .cm-dropCursor":{borderInlineStartColor:`var(--ink)`},".cm-selectionBackground, &.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, ::selection":{backgroundColor:`var(--raised)`},".cm-matchingBracket, &.cm-focused .cm-matchingBracket":{backgroundColor:`var(--raised)`,color:`inherit`,outline:`none`},".cm-nonmatchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`transparent`},".cm-placeholder":{color:`var(--codeDim)`},".cm-foldGutter .cm-gutterElement":{padding:`0 4px`,color:`var(--codeDim)`,cursor:`pointer`},".cm-foldGutter .cm-gutterElement:hover":{color:`var(--ink)`},".cm-foldPlaceholder":{backgroundColor:`var(--raised)`,border:`1px solid var(--edge)`,borderRadius:`4px`,color:`var(--codePunctuation)`,padding:`0 4px`,margin:`0 2px`,cursor:`pointer`},".cm-foldCount":{color:`var(--codeComment)`},".cm-fault":{backgroundColor:`var(--state-error-bg, rgb(239 68 68 / .1))`},".cm-gutterElement.cm-fault":{color:`var(--bad)`},".cm-fault-at":{textDecoration:`underline wavy var(--bad)`,textDecorationSkipInk:`none`,textUnderlineOffset:`3px`}}),aL=e=>({color:`var(--code${e[0].toUpperCase()}${e.slice(1)})`,...Bx[e]}),oL=dN.define([{tag:Y.propertyName,...aL(`key`)},{tag:Y.string,...aL(`string`)},{tag:Y.number,...aL(`number`)},{tag:Y.bool,...aL(`boolean`)},{tag:Y.null,...aL(`null`)},{tag:[Y.punctuation,Y.separator,Y.brace,Y.squareBracket],...aL(`punctuation`)},{tag:Y.comment,...aL(`comment`)},{tag:Y.keyword,...aL(`keyword`)}]),sL=new Jte(zI.configure({props:[LM.add({"Object Array":e=>({from:e.from,to:e.to})})]})),cL=(e,t)=>t===1?e(`1 key`):e(`{n} keys`,{n:t}),lL=(e,t)=>t===1?e(`1 item`):e(`{n} items`,{n:t});function uL(e,t,n){let r=_M(e).resolveInner(t.from,1);for(;r.parent&&r.name!==`Object`&&r.name!==`Array`;)r=r.parent;if(r.name===`Object`)return{open:`{`,close:`}`,count:cL(n,r.getChildren(`Property`).length)};let i=0;for(let e=r.firstChild;e;e=e.nextSibling)!/^[[\],]$/.test(e.name)&&!e.type.isError&&(i+=1);return{open:`[`,close:`]`,count:lL(n,i)}}var dL=e=>rN({preparePlaceholder:(t,n)=>uL(t,n,e),placeholderDOM:(t,n,r)=>{let i=document.createElement(`span`);i.className=`cm-foldPlaceholder`,i.title=e(`Unfold`),i.setAttribute(`aria-label`,e(`Folded, {count}`,{count:r.count})),i.textContent=`${r.open}…${r.close}`;let a=document.createElement(`span`);return a.className=`cm-foldCount`,a.textContent=` ${r.count}`,i.append(a),i.onclick=n,i}}),fL=2,pL=(e,t)=>{let n=0;for(let r of e)if(r===` `)n+=1;else if(r===` `)n+=t-n%t;else break;return n},mL=new Map,hL=e=>{let t=mL.get(e);return t||(t=UT.line({attributes:{style:`padding-inline-start: calc(${e}ch + 12px); text-indent: -${e}ch`}}),mL.set(e,t)),t},gL=aD.fromClass(class{decorations;constructor(e){this.decorations=this.build(e)}update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=this.build(e.view))}build(e){let t=new Zw;for(let{from:n,to:r}of e.visibleRanges)for(let i=n;i<=r;){let n=e.state.doc.lineAt(i);t.add(n.from,n.from,hL(pL(n.text,e.state.tabSize)+fL)),i=n.to+1}return t.finish()}},{decorations:e=>e.decorations}),_L=Cw.define(),vL=new class extends PA{elementClass=`cm-fault`},yL=UT.line({class:`cm-fault`}),bL=UT.mark({class:`cm-fault-at`});function xL(e,t){let n=$I(e.doc.toString(),{text:t});if(n.kind!==`error`)return{check:n,marks:UT.none,gutter:Jw.empty};let r=Number.isFinite(n.at)?Math.min(n.at,e.doc.length):0,i=e.doc.lineAt(r),a=Math.min(r+1,i.to),o=[yL.range(i.from),...a>r?[bL.range(r,a)]:[]];return{check:n,marks:UT.set(o,!0),gutter:Jw.of([vL.range(i.from)])}}var SL=e=>aw.define({create:t=>xL(t,e),update:(t,n)=>n.docChanged?xL(n.state,e):t,provide:e=>[Yk.decorations.from(e,e=>e.marks),FA.from(e,e=>e.gutter)]}),CL=e=>typeof e==`number`?`${e}px`:e;function wL({value:e,defaultValue:t=``,language:n=`javascript`,height:r,minHeight:i=96,maxHeight:o=480,resizable:s=r===void 0,allowText:c=!1,onChange:l,onCheck:u,onMount:d,readOnly:f=!1,lineNumbers:p=!0,wordWrap:m=`on`,fontSize:h=14,placeholder:g,showCopyButton:_=!0,showFormatButton:v,showLanguageSelector:b=!0,availableLanguages:x=tL,label:S,variant:C,title:w,actions:T,autoHeight:E=!1,...D}){let{t:O}=R(),k=S??O(`Code`),ee=V.useMemo(()=>dL(O),[O]),A=C??(w!==void 0||T!==void 0?`with-header`:`default`),j=A===`with-header`,[M,N]=V.useState(n),[P,te]=V.useState(e??t),[F,I]=V.useState(null),[ne,re]=V.useState(!1),ie=V.useRef(null),L=V.useRef([]),ae=V.useRef(null),[oe,se]=V.useState(null),ce=V.useRef(void 0),le=V.useRef({onChange:l,onCheck:u});le.current={onChange:l,onCheck:u};let ue=V.useMemo(()=>({language:new uw,gutter:new uw,wrap:new uw,edit:new uw}),[]),de=M===`json`,fe=V.useMemo(()=>SL(c),[c]),pe=V.useRef({field:fe});pe.current.field=fe;let me=()=>de?[sL,fe,ee,lN()]:[],he=()=>p?[tj(),aj()]:[],ge=()=>m===`off`?[]:[Yk.lineWrapping,gL],_e=()=>[Vw.readOnly.of(f),Yk.editable.of(!f)],ve=e=>{let t=e.field(pe.current.field,!1);t!==pe.current.seen&&(pe.current.seen=t,I(t?t.check:null),t&&le.current.onCheck?.(t.check))},ye=V.useCallback(()=>{let e=ae.current;if(!e||e.state.readOnly)return!1;let t=e.state.doc.toString(),n=eL(t);return n===null||n===t?!1:(e.dispatch({changes:{from:0,to:t.length,insert:n}}),!0)},[]);V.useEffect(()=>{let n=ie.current;if(!n)return;let r=Yk.updateListener.of(e=>{if(e.docChanged&&!e.transactions.some(e=>e.annotation(_L))){let t=e.state.doc.toString();te(t),le.current.onChange&&(L.current=[...L.current.slice(-31),t]),le.current.onChange?.(t)}ve(e.state)}),i=new Yk({parent:n,state:Vw.create({doc:e??t,extensions:[ue.gutter.of(he()),rP(),SA(),FM(),DN(),kA(),hN(oL),iA.of([{key:`Shift-Alt-f`,run:ye},dI,...eN,...uI,...SP,{key:`Escape`,run:e=>(e.contentDOM.blur(),!0)}]),ue.language.of(me()),ue.wrap.of(ge()),ue.edit.of(_e()),g?NA(g):[],Yk.contentAttributes.of({"aria-label":k,"data-slot":`code-editor-content`}),iL,r]})});return ae.current=i,ve(i.state),d?.(i),()=>{i.destroy(),ae.current=null,clearTimeout(ce.current)}},[]),V.useEffect(()=>{ae.current?.dispatch({effects:[ue.language.reconfigure(me()),ue.gutter.reconfigure(he()),ue.wrap.reconfigure(ge()),ue.edit.reconfigure(_e())]})},[de,fe,ee,p,m,f]),V.useEffect(()=>{let t=ae.current;if(!t||e===void 0)return;let n=L.current.indexOf(e);if(n!==-1){L.current=L.current.slice(n+1);return}L.current=[];let r=t.state.doc.toString();e!==r&&(t.dispatch({changes:{from:0,to:r.length,insert:e},annotations:_L.of(!0)}),te(e))},[e]),V.useEffect(()=>{let e=ae.current?.dom;if(!e)return;e.style.fontSize=`${h}px`;let t=oe===null?r===void 0?``:CL(r):`${oe}px`;e.style.height=t,e.style.minHeight=t?``:`${i}px`,e.style.maxHeight=t||E?``:`${o}px`,ae.current?.requestMeasure()},[oe,r,i,o,E,h]);let be=V.useCallback(async()=>{try{await navigator.clipboard.writeText(P),re(!0),clearTimeout(ce.current),ce.current=setTimeout(()=>re(!1),2e3),av.success(O(`Code copied to clipboard`))}catch{av.error(O(`Failed to copy code`))}},[P,O]),xe=typeof r==`string`&&r.endsWith(`%`),Se=v??(de&&!f),Ce=j||b||_||Se,we=de&&F!==null;return(0,H.jsxs)(z,{...B(`code-editor`),"data-variant":A,borderWidth:A===`borderless`?0:1,borderColor:`$borderColor`,rounded:A===`borderless`?0:`$3`,overflow:`hidden`,bg:`$background`,focusWithinStyle:A===`borderless`?void 0:{borderColor:`$outlineColor`},...D,children:[Ce&&(0,H.jsxs)(y,{...B(j?`code-editor-header`:`code-editor-toolbar`),items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$panel`,px:`$2`,py:j?0:`$1`,...j?{minH:40}:null,children:[j?(0,H.jsx)(a,{...B(`code-editor-title`),size:`$2`,fontWeight:`500`,color:`$hint`,px:`$1`,numberOfLines:1,flex:1,minW:0,children:w??k}):null,b?(0,H.jsxs)(B_,{value:M,onValueChange:N,children:[(0,H.jsx)(H_,{...B(`code-editor-language-trigger`),width:`auto`,minHeight:32,borderWidth:0,bg:`transparent`,gap:`$1.5`,px:`$2`,children:(0,H.jsx)(a,{size:`$1`,fontFamily:`$mono`,children:nL[M]?O(nL[M]):M})}),(0,H.jsx)(q_,{...B(`code-editor-language-content`),children:x.map(e=>(0,H.jsx)(U_,{value:e,children:nL[e]?O(nL[e]):e},e))})]}):(0,H.jsx)(a,{...B(`code-editor-language`),size:`$1`,fontFamily:`$mono`,color:`$soft`,px:`$2`,children:nL[M]?O(nL[M]):M}),(0,H.jsxs)(y,{items:`center`,justify:`flex-end`,flexWrap:`wrap`,gap:j?`$2`:`$1`,shrink:1,minW:0,children:[Se&&(0,H.jsxs)(W,{...B(`code-editor-format-button`),variant:`ghost`,size:`sm`,disabled:F?.kind!==`json`,onClick:ye,children:[(0,H.jsx)(dp,{size:14}),O(`Format`)]}),_&&(0,H.jsxs)(W,{...B(`code-editor-copy-button`),variant:`ghost`,size:`sm`,disabled:!P,onClick:be,children:[ne?(0,H.jsx)(Vt,{size:14}):(0,H.jsx)(Lp,{size:14}),O(ne?`Copied!`:`Copy`)]}),T]})]}),(0,H.jsxs)(z,{position:`relative`,...xe&&{flex:1,minH:0},children:[(0,H.jsx)(z,{ref:ie,...B(`code-editor-body`),...Jm,...xe&&{flex:1,minH:0}}),s&&(0,H.jsx)(WI,{side:`top`,span:oe??i,floor:i,ceil:rL,onSpan:se,onReset:()=>se(null),label:O(`Resize {label}`,{label:k}),b:-4})]}),we&&(0,H.jsx)(y,{...B(`code-editor-footer`),items:`center`,justify:`space-between`,gap:`$2`,minH:28,px:`$3`,py:`$1`,borderTopWidth:1,borderColor:`$borderColor`,bg:`$panel`,children:(0,H.jsx)(TL,{check:F})})]})}function TL({check:e}){let{t}=R(),n=e?.kind===`error`,r=e===null?``:e.kind===`error`?t(`Line {line}, column {column}: {message}`,{line:e.line,column:e.column,message:e.message}):e.kind===`text`?t(`Plain text`):e.kind===`empty`?t(`Empty`):t(`Valid JSON`);return(0,H.jsxs)(y,{...B(`code-editor-status`),"aria-live":`polite`,items:`center`,gap:`$1.5`,flex:1,minW:0,children:[n?(0,H.jsx)(Ap,{size:14,color:`$bad`}):e?.kind===`text`?(0,H.jsx)(uee,{size:14,color:`$soft`}):e?.kind===`json`?(0,H.jsx)(jp,{size:14,color:`$soft`}):null,(0,H.jsx)(a,{...B(`code-editor-status-text`),"data-kind":e?.kind,size:`$1`,fontFamily:`$mono`,color:n?`$bad`:`$soft`,numberOfLines:2,children:r})]})}var EL=e=>k(e||`en`),DL=e=>me(e||`en`),OL=e=>e&&e!==`en`?e:`en`,kL={active:!1,locale:`en-US`,dir:`ltr`,messages:{},t:(e,t)=>ce({},e,t),format:fe(`en-US`)},AL=(0,V.createContext)(kL),jL=(e,t)=>({active:!0,locale:e,dir:DL(e),messages:t,t:(e,n)=>ce(t,e,n),format:fe(e)});function ML(){let e=(0,V.useContext)(AL);return e.active?{active:!0,locale:e.locale,dir:e.dir}:{active:!1,locale:`en-US`,dir:`ltr`}}var NL=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60],[`second`,1]],PL={year:`y`,month:`mo`,week:`w`,day:`d`,hour:`h`,minute:`m`,second:`s`},FL=e=>{let t=Math.abs(e);for(let[n,r]of NL)if(t>=r||n===`second`){let i=`${Math.floor(t/r)}${PL[n]}`;return e<0?`in ${i}`:i}return`0s`},IL=(e,t)=>{if(e<0){let n=-e;return n<60?t(`in a moment`):n<120?t(`in 1 minute`):n<3600?t(`in {n} minutes`,{n:Math.floor(n/60)}):n<7200?t(`in 1 hour`):n<86400?t(`in {n} hours`,{n:Math.floor(n/3600)}):n<172800?t(`tomorrow`):n<604800?t(`in {n} days`,{n:Math.floor(n/86400)}):n<1209600?t(`in 1 week`):n<2592e3?t(`in {n} weeks`,{n:Math.floor(n/604800)}):n<5184e3?t(`in 1 month`):n<31536e3?t(`in {n} months`,{n:Math.floor(n/2592e3)}):n<63072e3?t(`in 1 year`):t(`in {n} years`,{n:Math.floor(n/31536e3)})}return e<60?t(`just now`):e<120?t(`1 minute ago`):e<3600?t(`{n} minutes ago`,{n:Math.floor(e/60)}):e<7200?t(`1 hour ago`):e<86400?t(`{n} hours ago`,{n:Math.floor(e/3600)}):e<172800?t(`1 day ago`):e<604800?t(`{n} days ago`,{n:Math.floor(e/86400)}):e<1209600?t(`1 week ago`):e<2592e3?t(`{n} weeks ago`,{n:Math.floor(e/604800)}):e<5184e3?t(`1 month ago`):e<31536e3?t(`{n} months ago`,{n:Math.floor(e/2592e3)}):e<63072e3?t(`1 year ago`):t(`{n} years ago`,{n:Math.floor(e/31536e3)})},LL=(e,t)=>{let n=new Intl.RelativeTimeFormat(t,{numeric:`auto`,style:`long`});for(let[t,r]of NL)if(Math.abs(e)>=r||t===`second`){let i=Math.round(e/r)*-1;return n.format(i,t)}return n.format(0,`second`)},RL=(e,t,n,r)=>{let i=Math.floor((Date.now()-new Date(e).getTime())/1e3);return t===`short`?FL(i):t===`long`?LL(i,r):IL(i,n)},zL=M(a,{name:`RelativeTime`,render:`time`});function BL({date:e,format:t=`auto`,updateInterval:n=6e4,...r}){let{t:i}=R(),{active:a,locale:o}=ML(),s=a?o:void 0,[c,l]=V.useState(()=>RL(e,t,i,s));return V.useEffect(()=>{l(RL(e,t,i,s));let r=setInterval(()=>l(RL(e,t,i,s)),n);return()=>clearInterval(r)},[e,t,n,i,s]),(0,H.jsx)(zL,{"data-slot":`relative-time`,"data-format":t,dateTime:new Date(e).toISOString(),...r,children:c})}var VL=(0,V.createContext)(`measure-on-hover`),HL=e=>{let t=e;return!t||typeof t.scrollWidth!=`number`?!1:t.scrollWidth>(t.clientWidth??0)||(t.scrollHeight??0)>(t.clientHeight??0)},UL=500,WL=300;function GL({text:e,lineClamp:t,tooltipContent:n,tooltipDelay:r=UL,tooltipPlace:i=`bottom`,isTooltipMultiline:o=!1,alwaysShowTooltip:s=!1,isFocusable:c=!1,...l}){let u=(0,V.useContext)(VL),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(!1),h=(0,V.useRef)(null),g=(0,V.useRef)(null),_=(0,V.useRef)(!1);(0,V.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]);let v=t&&Number.isInteger(t)&&t>0?t:1,y=t=>(0,H.jsx)(a,{...B(`truncated-text`),numberOfLines:v,maxW:`100%`,minW:0,...v>1?{style:{whiteSpace:`pre-wrap`,overflowWrap:`anywhere`}}:null,...l,...t,children:e});if(u===`disabled`&&!s)return y({});let b=e=>{h.current=e;let t=HL(e);return m(t),t},x=(e,t)=>{g.current&&clearTimeout(g.current);let n=u===`measure-on-hover`?b(e):(h.current=e,!1);g.current=setTimeout(()=>{let e=u===`measure-on-open`?b(h.current):n;(s||e)&&f(!0)},t)},S=()=>{g.current&&clearTimeout(g.current),g.current=null,_.current||f(!1)};return(0,H.jsxs)(Um,{open:d,onOpenChange:e=>!e&&f(!1),placement:i,children:[(0,H.jsx)(fu.Anchor,{asChild:!0,children:y({onPointerEnter:e=>x(e?.currentTarget,r),onPointerLeave:S,onFocus:e=>{_.current=!0,x(e?.currentTarget,0)},onBlur:()=>{_.current=!1,S()},...c?{tabIndex:0,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`}}:null,...p?{cursor:`pointer`}:null})}),(0,H.jsx)(Km,{maxW:WL,children:o&&typeof(n??e)==`string`?(0,H.jsx)(a,{size:`$1`,style:{whiteSpace:`pre-wrap`},children:n??e}):n??e})]})}var KL=20,qL=14,JL=(e,t)=>{if(!(0,V.isValidElement)(e))return e;let n=e.props;return(0,V.cloneElement)(e,{...n.size==null?{size:qL}:null,...n.color==null?{color:t}:null})};function YL({color:e=`gray`,variant:t=`soft`,weight:n=`regular`,startIcon:r,endElement:i,truncate:o=!0,borderStyle:s=`solid`,onPress:c,href:l,disabled:u=!1,children:d,style:f,...p}){let m=e===`transparent`,h=Ah(m?`gray`:e),{style:g,tone:_}=jh(h,[3,11]),v=m?`$aside`:t===`solid`?`$background`:_(11),b=m||t===`outline`||t===`ghost`?`transparent`:_(t===`solid`?11:3),x={size:`$2`,fontWeight:n===`medium`?`500`:void 0,color:v},S=!u&&(c!=null||l!=null);return(0,H.jsxs)(y,{...B(`tag`),"data-color":m?`transparent`:h,"data-variant":t,...l==null?c==null?{render:`span`}:{...Pn(u?void 0:c)}:{render:`a`,href:l},...u?{"aria-disabled":!0}:null,display:`inline-flex`,self:`flex-start`,items:`center`,gap:`$1`,height:KL,px:`$2`,maxW:`100%`,minW:0,rounded:`$xs`,bg:b,...t===`outline`?{borderWidth:1,borderColor:`$rim`,borderStyle:s}:null,overflow:`hidden`,opacity:u?.5:1,cursor:u?`not-allowed`:S?`pointer`:void 0,...S?{focusVisibleStyle:at}:null,style:{...g,...f},...p,children:[r?JL(r,v):null,typeof d==`string`||typeof d==`number`?o?(0,H.jsx)(GL,{text:String(d),...x}):(0,H.jsx)(a,{...x,children:d}):d,i?(0,H.jsx)(y,{...B(`tag-end`),shrink:0,items:`center`,children:i}):null]})}var XL={sm:20,md:24},ZL={ghost:{rest:`transparent`,hover:`$hover`,down:`$raised`},soft:{rest:`$hover`,hover:`$raised`,down:`$rim`},solid:{rest:`$raised`,hover:`$rim`,down:`$bound`}};function QL({label:e,size:t=`sm`,variant:n=`ghost`,color:r=`primary`,shape:i=`square`,weight:a=`regular`,startElement:o,endElement:s,endElementDivider:c=!1,truncate:l=!0,tooltipContent:u,onPress:d,href:f,clickable:p,disabled:m=!1,children:h,...g}){let _=ZL[n],v=!m&&(p??(d!=null||f!=null)),b={size:`$2`,fontWeight:a===`medium`?`500`:void 0,color:m?`$hush`:r===`secondary`?`$aside`:`$ink`},x=e??h;return(0,H.jsxs)(y,{...B(`chip`),"data-size":t,"data-variant":n,...f!=null&&!m?{render:`a`,href:f}:d==null?null:Pn(m?void 0:d),...m?{"aria-disabled":!0}:null,display:`inline-flex`,self:`flex-start`,items:`center`,gap:`$1`,height:XL[t],px:`$1`,maxW:`100%`,minW:0,rounded:i===`round`?`$10`:`$xs`,bg:_.rest,select:`none`,cursor:m?`not-allowed`:v?`pointer`:void 0,...v?{hoverStyle:{bg:_.hover},pressStyle:{bg:_.down},focusVisibleStyle:at,...dt(XL[t],44,`y`)}:null,...g,children:[o?(0,H.jsx)(y,{...B(`chip-start`),shrink:0,items:`center`,children:o}):null,typeof x==`string`||typeof x==`number`?l?(0,H.jsx)(GL,{text:String(x),tooltipContent:u,...b}):Pm(x,void 0,b):x,s?(0,H.jsx)(y,{...B(`chip-end`),shrink:0,items:`center`,self:`stretch`,...c?{borderInlineStartWidth:1,borderColor:`$borderColor`,paddingInlineStart:`$1`}:null,children:s}):null]})}var $L=4,eR=24,tR=220;function nR(e,t,n=1/0,r=$L,i=eR){let a=Math.min(e.length,n);if(a===0)return 0;let o=0;for(let n=0;n<a;n++){let a=o+(n>0?r:0)+e[n];if(a+(n+1<e.length?r+i:0)>t)return Math.max(1,n);o=a}return a}function rR({children:e,maxInlineCount:t,showOverflowCount:n=`hover`,overflowLabel:r,open:i,defaultOpen:o=!1,onOpenChange:s,popupProps:c,...l}){let{t:u}=R(),d=(0,V.useMemo)(()=>V.Children.toArray(e).filter(V.isValidElement),[e]),[f,p]=(0,V.useState)([]),[m,h]=(0,V.useState)(null),[g,_]=(0,V.useState)(!1),[v,b]=(0,V.useState)(o),x=i??v,S=(0,V.useCallback)(e=>{i===void 0&&b(e),s?.(e)},[i,s]),C=m!=null&&f.filter(e=>e!=null).length===d.length?nR(f,m,t):Math.min(d.length,t??d.length),w=d.length-C,T=w>0&&(n===`always`||n===`hover`&&(g||x)),E=e=>t=>{let n=t?.nativeEvent?.layout?.width;typeof n==`number`&&p(t=>{if(t[e]===n)return t;let r=t.slice();return r[e]=n,r})};return(0,H.jsxs)(y,{...B(`overflowing-list`),position:`relative`,width:`100%`,minW:0,items:`center`,gap:$L,overflow:`hidden`,onLayout:e=>h(e.nativeEvent.layout.width),onPointerEnter:()=>_(!0),onPointerLeave:()=>_(!1),onFocus:()=>_(!0),onBlur:()=>_(!1),...l,children:[(0,H.jsx)(y,{"aria-hidden":!0,position:`absolute`,t:0,l:0,opacity:0,pointerEvents:`none`,gap:$L,inert:!0,children:d.map((e,t)=>(0,H.jsx)(y,{shrink:0,onLayout:E(t),children:e},e.key??t))}),d.slice(0,C).map((e,t)=>(0,H.jsx)(y,{...t===C-1?{shrink:1,minW:0}:{shrink:0},children:e},e.key??t)),w>0&&n!==`never`?(0,H.jsxs)(O_,{open:x,onOpenChange:S,placement:`bottom-start`,children:[(0,H.jsx)(k_,{asChild:!0,children:(0,H.jsx)(y,{...B(`overflowing-list-count`),...Pn(()=>S(!x)),"aria-label":u(`{label} ({n})`,{label:r??u(`Show all items`),n:d.length}),"aria-expanded":x,shrink:0,minW:eR,height:20,px:`$1`,items:`center`,justify:`center`,rounded:`$xs`,cursor:`pointer`,hoverStyle:{bg:`$hover`},focusVisibleStyle:at,opacity:+!!T,children:(0,H.jsx)(a,{size:`$1`,color:`$ink`,children:`+${w}`})})}),(0,H.jsx)(A_,{p:`$2`,minW:tR,style:{width:Math.max(tR,Math.round(m??0))},...c,children:(0,H.jsx)(z,{...B(`overflowing-list-popup`),maxH:320,overflow:`scroll`,children:(0,H.jsx)(y,{flexWrap:`wrap`,gap:$L,children:d})})})]}):null]})}var iR=e=>{let t=new Intl.NumberFormat(e).formatToParts(-12345.6);return{group:t.find(e=>e.type===`group`)?.value??`,`,decimal:t.find(e=>e.type===`decimal`)?.value??`.`}},aR=/[\s\u00a0\u202f\u2009]/g,oR=/^[\s\u00a0\u202f\u2009]$/;function sR(e,t,n){let{group:r,decimal:i}=iR(t),a=e.replace(aR,``).replace(/[\u2212\u2012\u2013]/g,`-`);if(!a)return NaN;r&&!oR.test(r)&&(a=a.split(r).join(``));let o=n?.style===`percent`||a.includes(`%`);if(a=a.replace(/[^0-9.,\-+]/g,``),a=i===`.`?a.replace(/,/g,``):a.replace(/\./g,``).replace(i,`.`),!/^[-+]?(\d+\.?\d*|\.\d+)$/.test(a))return NaN;let s=Number(a);return o?s/100:s}var cR=e=>{let t=String(e),n=t.match(/e-(\d+)$/);return n?Number(n[1]):t.includes(`.`)?t.split(`.`)[1].length:0},lR=(e,t,n)=>Math.min(n??1/0,Math.max(t??-1/0,e)),uR={lg:`icon-lg`,default:`icon`,sm:`icon-sm`,xs:`icon-xs`};function dR({value:e,defaultValue:t=null,onValueChange:n,min:r,max:i,step:a=1,smallStep:o=.1,largeStep:s=10,format:c,locale:l,allowOutOfRange:u=!1,readOnly:d=!1,required:f,disabled:p,buttons:m=!1,decrementLabel:h,incrementLabel:g,size:_,onFocus:v,onBlur:b,...x}){let{t:S}=R(),C=st(),w=lt(_,C),T=e!==void 0,[E,D]=(0,V.useState)(t),O=T?e:E,[k,ee]=(0,V.useState)(null),A=(0,V.useRef)(O);A.current=O;let j=(0,V.useMemo)(()=>new Intl.NumberFormat(l,{maximumFractionDigits:20,...c}),[l,c]),M=k??(O==null||Number.isNaN(O)?``:j.format(O)),N=(0,V.useCallback)(e=>{T||D(e),e!==A.current&&n?.(e),A.current=e},[T,n]),P=e=>{if(d||p)return;let t=O??(e>0?(r??0)-e:(i??0)-e),n=Math.max(cR(e),cR(t)),a=Number((t+e).toFixed(n));ee(null),N(u?a:lR(a,r,i))},te=e=>{let t=e.shiftKey?s:e.altKey?o:a;if(e.key===`ArrowUp`)P(t);else if(e.key===`ArrowDown`)P(-t);else if(e.key===`Home`&&r!=null&&!d)ee(null),N(r);else if(e.key===`End`&&i!=null&&!d)ee(null),N(i);else return;e.preventDefault?.()},F=O!=null&&r!=null&&O<=r,I=O!=null&&i!=null&&O>=i,ne=(0,H.jsx)(C_,{...B(`number-field-input`),...x,size:w,role:`spinbutton`,"aria-valuenow":O??void 0,"aria-valuemin":r,"aria-valuemax":i,"aria-readonly":d||void 0,"aria-required":f||void 0,inputMode:c?.maximumFractionDigits===0?`numeric`:`decimal`,autoComplete:`off`,disabled:p,readOnly:d,value:M,onChangeText:e=>{if(ee(e),!e.trim())return N(null);let t=sR(e,l,c);Number.isNaN(t)||N(t)},onFocus:e=>{ee(M),v?.(e)},onBlur:e=>{let t=k;if(ee(null),t!=null&&t.trim()){let e=sR(t,l,c);Number.isNaN(e)||N(u?e:lR(e,r,i))}b?.(e)},onKeyDown:te});if(!m)return ne;let re=uR[w],ie=e=>()=>P(e);return(0,H.jsxs)(y,{...B(`number-field`),items:`center`,gap:`$1`,width:`100%`,minW:0,children:[(0,H.jsx)(y,{flex:1,minW:0,children:ne}),(0,H.jsx)(W,{...B(`number-field-decrement`),variant:`outline`,size:re,"aria-label":h??S(`Decrease`),tabIndex:-1,disabled:p||!u&&F,...d?{opacity:.5,cursor:`default`,hoverStyle:{bg:`$background`}}:null,onPress:ie(-a),children:(0,H.jsx)(fm,{size:16})}),(0,H.jsx)(W,{...B(`number-field-increment`),variant:`outline`,size:re,"aria-label":g??S(`Increase`),tabIndex:-1,disabled:p||!u&&I,...d?{opacity:.5,cursor:`default`,hoverStyle:{bg:`$background`}}:null,onPress:ie(a),children:(0,H.jsx)(hm,{size:16})})]})}var fR=(e,t=!1,n)=>{let[r,i]=(0,V.useState)(t);return[e??r,t=>{e===void 0&&i(t),n?.(t)}]},pR=(0,V.forwardRef)(function({disabled:e,open:t,label:n,children:r,...i},a){let o=(0,V.useContext)(g_),s=st(),c=u_[o?.size??lt(void 0,s)];return(0,H.jsx)(y,{ref:a,...B(`field-segment`),render:`button`,type:`button`,disabled:e,"aria-expanded":!!t,...n?{"aria-label":n}:null,height:c.h-2,marginInlineStart:o?-c.gutter:0,shrink:0,items:`center`,gap:`$1`,px:`$2`,bg:`transparent`,borderWidth:0,borderInlineEndWidth:1,borderColor:`$borderColor`,borderStartStartRadius:`$3`,borderEndStartRadius:`$3`,cursor:e?`not-allowed`:`pointer`,opacity:e?.5:1,hoverStyle:e?void 0:{bg:`$hover`},focusVisibleStyle:{...at,outlineOffset:-2},...i,children:r})}),mR=32;function hR({trigger:e,open:t,onOpenChange:n,options:r,value:i,onPick:o,searchLabel:s,emptyLabel:c,width:l=240}){let{t:u}=R(),d=st(),f=s??u(`Search`);return(0,H.jsxs)(O_,{open:t,onOpenChange:n,placement:`bottom-start`,children:[(0,H.jsx)(k_,{asChild:!0,children:e}),(0,H.jsx)(A_,{"data-slot":`search-list`,p:0,width:l,sideOffset:8,overflow:`hidden`,children:(0,H.jsx)(Lt,{value:d,children:(0,H.jsxs)(rg,{value:i??void 0,children:[(0,H.jsx)(ig,{placeholder:f,"aria-label":f,autoFocus:!0}),(0,H.jsxs)(ag,{p:`$1`,children:[(0,H.jsx)(og,{children:c??u(`No results`)}),r.map(e=>(0,H.jsxs)(sg,{value:e.value,keywords:[e.label,...e.keywords??[]],disabled:e.disabled,minH:mR,px:`$1`,rounded:`$xs`,...dt(mR,44,`y`),onSelect:e=>o(e),"aria-selected":e.value===i,children:[e.start?(0,H.jsx)(y,{shrink:0,items:`center`,children:e.start}):null,(0,H.jsx)(a,{size:`$2`,color:`$ink`,flex:1,minW:0,numberOfLines:1,children:e.label}),e.end==null?null:(0,H.jsx)(a,{size:`$2`,color:`$hint`,shrink:0,children:e.end}),(0,H.jsx)(Vt,{size:16,opacity:+(e.value===i),shrink:0})]},e.value))]})]})})})]})}var gR=e=>`${e.name} (${e.code})`,_R=e=>[e.name,e.code,e.symbol].filter(Boolean).join(` `);function vR({currencies:e,value:t,defaultValue:n=null,onValueChange:r,placeholder:i=`—`,renderValue:o,getOptionLabel:s=gR,getSearchText:c=_R,selectedFirst:l=!1,closeOnSelect:u=!0,open:d,defaultOpen:f,onOpenChange:p,disabled:m=!1,label:h,searchLabel:g,emptyLabel:_}){let{t:v}=R(),y=h??v(`Currency`),[b,x]=(0,V.useState)(n),S=t===void 0?b:t,[C,w]=fR(d,f,p),T=e.find(e=>e.code===S),E=(l&&T?[T,...e.filter(e=>e!==T)]:e).map(e=>({value:e.code,label:s(e),keywords:[c(e)],disabled:e.disabled,end:e.symbol}));return(0,H.jsx)(hR,{open:C&&!m,onOpenChange:e=>w(!m&&e),options:E,value:S,searchLabel:g??v(`Search currencies`),emptyLabel:_??v(`No currency found`),onPick:e=>{t===void 0&&x(e),e!==S&&r?.(e),u&&w(!1)},trigger:(0,H.jsxs)(pR,{"data-slot":`currency-picker`,disabled:m,open:C,label:T?v(`{label}: {value}`,{label:y,value:T.name}):y,children:[o?o(T):(0,H.jsx)(a,{size:`$2`,fontWeight:`500`,color:`$hint`,children:T?.code??i}),(0,H.jsx)(Ep,{size:14,color:`$hint`})]})})}var yR=e=>{let t=e?.trim().toUpperCase();return!t||!/^[A-Z]{2}$/.test(t)?null:String.fromCodePoint(...[...t].map(e=>127462+e.charCodeAt(0)-65))};function bR({iso:e,override:t}){let n=t??yR(e);return(0,H.jsx)(y,{width:16,height:12,rounded:`$2xs`,overflow:`hidden`,items:`center`,justify:`center`,shrink:0,"aria-hidden":!0,children:n==null?(0,H.jsx)(Xp,{size:14,color:`$hint`}):typeof n==`string`?(0,H.jsx)(a,{size:`$2`,lineHeight:12,children:n}):n})}function xR({countries:e,value:t,defaultValue:n=null,onValueChange:r,closeOnSelect:i=!0,open:a,defaultOpen:o,onOpenChange:s,disabled:c=!1,label:l,searchLabel:u,emptyLabel:d}){let{t:f}=R(),p=l??f(`Country calling code`),[m,h]=(0,V.useState)(n),g=t===void 0?m:t,[_,v]=fR(a,o,s),b=e.find(e=>e.value===g),x=e.map(e=>({value:e.value,label:e.label,keywords:[e.value,e.callingCode,`+${e.callingCode}`],disabled:e.disabled,start:(0,H.jsx)(y,{paddingInlineEnd:`$1`,children:(0,H.jsx)(bR,{iso:e.value,override:e.flag})}),end:`+${e.callingCode}`}));return(0,H.jsx)(hR,{open:_&&!c,onOpenChange:e=>v(!c&&e),options:x,value:g,searchLabel:u??f(`Search countries`),emptyLabel:d??f(`No country found`),width:280,onPick:e=>{t===void 0&&h(e),e!==g&&r?.(e),i&&v(!1)},trigger:(0,H.jsxs)(pR,{"data-slot":`phone-country-picker`,disabled:c,open:_,gap:`$0.5`,paddingInlineStart:`$2`,paddingInlineEnd:`$1`,children:[(0,H.jsx)(bR,{iso:b?.value,override:b?.flag}),(0,H.jsx)(Ep,{size:14,color:`$hint`}),(0,H.jsx)($l,{children:b?f(`{label}: {country} +{code}`,{label:p,country:b.label,code:b.callingCode}):p})]})})}var SR=`none`,CR=({iso:e,override:t})=>{let n=t??yR(e);return(0,H.jsx)(y,{width:16,height:16,items:`center`,justify:`center`,shrink:0,"aria-hidden":!0,children:n==null?(0,H.jsx)(Mp,{size:16,color:`$hint`}):typeof n==`string`?(0,H.jsx)(a,{size:`$3`,lineHeight:16,children:n}):n})};function wR({countries:e,value:t,defaultValue:n=null,onValueChange:r,label:i,"aria-label":o,noCountryLabel:s,searchLabel:c,noResultsLabel:l,size:u,open:d,defaultOpen:f,onOpenChange:p,disabled:m=!1}){let{t:h}=R(),g=s??h(`No country`),_=st(),v=u_[lt(u,_)],b=(0,V.useId)(),[x,S]=(0,V.useState)(n),C=t===void 0?x:t,[w,T]=fR(d,f,p),E=m||e.length===0,D=e.find(e=>e.value===C),O=[{value:SR,label:g,start:(0,H.jsx)(CR,{})},...e.map(e=>({value:e.value,label:e.label,keywords:[e.value],disabled:e.disabled,start:(0,H.jsx)(CR,{iso:e.value,override:e.flag})}))],k=(0,H.jsxs)(y,{...B(`country-select`),render:`button`,type:`button`,disabled:E,"aria-expanded":w,...i?{"aria-labelledby":b}:o?{"aria-label":o}:null,componentName:`Input`,...f_,..._===`compact`?{bg:`$panel`}:null,minH:v.h,px:v.gutter,width:`100%`,minW:0,items:`center`,gap:`$2`,cursor:E?`not-allowed`:`pointer`,opacity:E?.5:1,borderColor:w?`$borderColorFocus`:`$borderColor`,hoverStyle:E?void 0:{borderColor:`$borderColorHover`},...dt(v.h,44,`y`),children:[(0,H.jsx)(CR,{iso:D?.value,override:D?.flag}),(0,H.jsx)(a,{size:v.font,color:D?`$ink`:`$placeholderColor`,flex:1,minW:0,numberOfLines:1,...Xm(`start`),children:D?.label??g}),(0,H.jsx)(Ep,{size:16,opacity:.5,shrink:0})]});return(0,H.jsxs)(z,{...B(`country-select-field`),width:`100%`,minW:0,gap:`$1`,children:[i?(0,H.jsx)(a,{id:b,size:`$1`,fontWeight:`600`,color:`$hint`,children:i}):null,(0,H.jsx)(hR,{open:w&&!E,onOpenChange:e=>T(!E&&e),options:O,value:C??SR,searchLabel:c,emptyLabel:l,width:280,onPick:e=>{let n=e===SR?null:e;t===void 0&&S(n),n!==C&&r?.(n),T(!1)},trigger:k})]})}var TR=`appearance`;async function ER(e){return await DR(TR,e)}async function DR(e,{base:t,token:n,signal:r}){if(!(typeof window<`u`&&new URL(t,window.location.origin).origin!==window.location.origin&&!n))try{return(await AR(t,n,{},r))?.[e]}catch{return}}async function OR(e,t){return kR(TR,e,t)}async function kR(e,t,{base:n,token:r,signal:i}){if(typeof window<`u`&&new URL(n,window.location.origin).origin!==window.location.origin&&!r)return!1;try{return!!await AR(n,r,{[e]:t},i)}catch{return!1}}async function AR(e,t,n,r){let i=typeof window<`u`&&new URL(e,window.location.origin).origin!==window.location.origin,a=await fetch(`${e.replace(/\/+$/,``)}/v1/iam/preferences`,{method:`POST`,credentials:t||i?`omit`:`include`,headers:{"Content-Type":`application/json`,...t?{Authorization:`Bearer ${t}`}:{}},body:JSON.stringify(n),signal:r});if(!a.ok)return;let o=await a.json();if(o?.status===`ok`)return o.data??{}}var jR=`hanzo.composer`,MR=`hanzo:composer`;function NR(e){let t=e&&typeof e==`object`?e:{},n={};return(t.send===`enter`||t.send===`mod`)&&(n.send=t.send),typeof t.chips==`boolean`&&(n.chips=t.chips),typeof t.model==`boolean`&&(n.model=t.model),typeof t.mode==`boolean`&&(n.mode=t.mode),n}var PR=()=>{try{return typeof window>`u`?void 0:window.localStorage}catch{return}},FR,IR={},LR=null;function RR(e=PR()){if(LR)return LR;let t=null;try{t=e?.getItem(`hanzo.composer`)??null}catch{t=null}if(t===FR)return IR;FR=t;try{IR=NR(JSON.parse(t??`null`))}catch{IR={}}return IR}function zR(e,t=PR()){let n=NR(e);try{if(!t)throw Error(`no storage`);Object.keys(n).length?t.setItem(jR,JSON.stringify(n)):t.removeItem(jR),LR=null}catch{LR=n}typeof window<`u`&&window.dispatchEvent(new Event(MR))}function BR(e){return window.addEventListener(MR,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(MR,e),window.removeEventListener(`storage`,e)}}var VR={};function HR(){return(0,V.useSyncExternalStore)(BR,()=>RR(),()=>VR)}async function UR(e){let t=await DR(`composer`,e);return t===void 0?void 0:NR(t)}function WR(e,t){return kR(`composer`,NR(e),t)}var GR={"--neutral-50":`#FAFAFA`,"--neutral-100":`#F5F5F5`,"--neutral-200":`#E5E5E5`,"--neutral-300":`#D4D4D4`,"--neutral-400":`#A3A3A3`,"--neutral-500":`#737373`,"--neutral-600":`#525252`,"--neutral-700":`#404040`,"--neutral-800":`#262626`,"--neutral-900":`#171717`,"--neutral-950":`#0A0A0A`,"--pure-black":`#000000`,"--pure-white":`#FFFFFF`,"--hanzo-black":`#0A0A0B`,"--hanzo-white":`#FFFFFF`,"--art-tide":`#2F6BFF`,"--art-iris":`#8B5CF6`,"--art-ember":`#FF7A3D`,"--art-glow":`#F4F1FF`,"--white-03":`rgb(255 255 255 / .03)`,"--white-05":`rgb(255 255 255 / .05)`,"--white-06":`rgb(255 255 255 / .06)`,"--white-08":`rgb(255 255 255 / .08)`,"--white-10":`rgb(255 255 255 / .10)`,"--white-14":`rgb(255 255 255 / .14)`,"--white-15":`rgb(255 255 255 / .15)`,"--white-16":`rgb(255 255 255 / .16)`,"--white-18":`rgb(255 255 255 / .18)`,"--white-20":`rgb(255 255 255 / .20)`,"--white-22":`rgb(255 255 255 / .22)`,"--white-30":`rgb(255 255 255 / .30)`,"--white-40":`rgb(255 255 255 / .40)`,"--white-45":`rgb(255 255 255 / .45)`,"--white-55":`rgb(255 255 255 / .55)`,"--white-60":`rgb(255 255 255 / .60)`,"--white-78":`rgb(255 255 255 / .78)`,"--white-80":`rgb(255 255 255 / .80)`,"--white-92":`rgb(255 255 255 / .92)`,"--background":`#0a0a0a`,"--foreground":`#e5e5e5`,"--card":`#0f0f0f`,"--card-foreground":`#e5e5e5`,"--popover":`#0f0f0f`,"--popover-foreground":`#e5e5e5`,"--primary":`#fafafa`,"--primary-hover":`#e5e5e5`,"--primary-foreground":`#0a0a0a`,"--secondary":`#262626`,"--secondary-hover":`#333333`,"--secondary-foreground":`#fafafa`,"--muted":`#171717`,"--muted-foreground":`#a3a3a3`,"--accent":`#262626`,"--accent-hover":`var(--secondary-hover)`,"--accent-foreground":`#fafafa`,"--destructive":`#dc2626`,"--destructive-hover":`#b91c1c`,"--destructive-foreground":`#fafafa`,"--border":`var(--white-10)`,"--border-strong":`var(--white-16)`,"--border-control":`var(--white-15)`,"--border-focus":`var(--white-22)`,"--border-selected":`var(--white-30)`,"--edge":`var(--white-06)`,"--input":`var(--border-control)`,"--ring":`var(--white-40)`,"--ring-halo":`var(--white-10)`,"--brand":`#e4e4e7`,"--brand-foreground":`#09090b`,"--brand-muted":`#a3a3a3`,"--black":`#000000`,"--white":`#fafafa`,"--selection":`var(--white-20)`,"--glass":`var(--white-05)`,"--glass-strong":`var(--white-08)`,"--surface-page":`var(--background)`,"--surface-card":`rgb(38 38 38 / .5)`,"--surface-card-emphasis":`rgb(38 38 38 / .75)`,"--surface-card-quiet":`rgb(38 38 38 / .35)`,"--surface-overlay":`rgb(23 23 23 / .92)`,"--surface-header":`rgb(0 0 0 / .7)`,"--surface-scrim":`rgb(0 0 0 / .8)`,"--surface-0":`var(--background)`,"--surface-1":`var(--card)`,"--surface-2":`var(--muted)`,"--surface-3":`var(--secondary)`,"--text-primary":`#fafafa`,"--text-secondary":`var(--white-78)`,"--text-tertiary":`var(--white-55)`,"--text-helper":`var(--muted-foreground)`,"--text-disabled":`var(--white-30)`,"--state-error":`#ef4444`,"--state-error-text":`#fca5a5`,"--state-error-bg":`rgb(239 68 68 / .1)`,"--state-online":`#4ade80`,"--state-success":`#22c55e`,"--chrome-dot-red":`rgb(239 68 68 / .6)`,"--chrome-dot-yellow":`rgb(234 179 8 / .6)`,"--chrome-dot-green":`rgb(34 197 94 / .6)`,"--type-scale":`1`,"--type-ratio":`1`,"--text-floor":`0.75rem`,"--text-ceiling":`30vw`,"--text-xs":`0.75rem`,"--leading-xs":`1rem`,"--text-sm":`0.8125rem`,"--leading-sm":`1.15rem`,"--text-base":`0.875rem`,"--leading-base":`1.35rem`,"--text-lg":`0.9375rem`,"--leading-lg":`1.4rem`,"--text-xl":`1.0625rem`,"--leading-xl":`1.55rem`,"--text-2xl":`1.3125rem`,"--leading-2xl":`1.7rem`,"--text-3xl":`1.625rem`,"--leading-3xl":`1.95rem`,"--text-4xl":`2rem`,"--leading-4xl":`2.25rem`,"--text-5xl":`2.5rem`,"--leading-5xl":`1.05`,"--text-6xl":`3.25rem`,"--leading-6xl":`1`,"--text-7xl":`4rem`,"--leading-7xl":`1`,"--text-8xl":`5.25rem`,"--leading-8xl":`1`,"--text-9xl":`7rem`,"--leading-9xl":`1`,"--font-size-xs":`var(--text-xs)`,"--font-size-sm":`var(--text-sm)`,"--font-size-base":`var(--text-base)`,"--font-size-lg":`var(--text-lg)`,"--font-size-xl":`var(--text-xl)`,"--font-size-2xl":`var(--text-2xl)`,"--font-size-3xl":`var(--text-3xl)`,"--font-size-4xl":`var(--text-4xl)`,"--font-size-5xl":`var(--text-5xl)`,"--font-size-6xl":`var(--text-6xl)`,"--font-size-7xl":`var(--text-7xl)`,"--font-size-8xl":`var(--text-8xl)`,"--font-size-9xl":`var(--text-9xl)`,"--text-control":`var(--text-sm)`,"--weight-normal":`400`,"--weight-medium":`500`,"--weight-semibold":`600`,"--weight-bold":`700`,"--tracking-tight":`-0.025em`,"--tracking-normal":`0em`,"--tracking-wide":`0.025em`,"--tracking-widest":`0.1em`,"--leading-none":`1`,"--leading-tight":`1.25`,"--leading-snug":`1.375`,"--leading-normal":`1.5`,"--leading-relaxed":`1.625`,"--leading-golden":`1.618`,"--type-hero":`600 var(--text-5xl)/1.05 var(--font-display)`,"--type-h2":`700 var(--text-4xl)/var(--leading-4xl) var(--font-display)`,"--type-h3":`600 var(--text-xl)/var(--leading-xl) var(--font-display)`,"--type-lead":`400 var(--text-lg)/var(--leading-relaxed) var(--font-sans)`,"--type-body":`400 var(--text-sm)/var(--leading-sm) var(--font-sans)`,"--type-caption":`400 var(--text-xs)/var(--leading-xs) var(--font-sans)`,"--type-code":`400 var(--text-sm)/var(--leading-relaxed) var(--font-mono)`,"--type-eyebrow":`600 0.75rem/1 var(--font-sans)`,"--density":`1`,"--space-0":`0`,"--space-1":`0.25rem`,"--space-2":`0.5rem`,"--space-3":`0.75rem`,"--space-4":`1rem`,"--space-5":`1.25rem`,"--space-6":`1.5rem`,"--space-8":`2rem`,"--space-10":`2.5rem`,"--space-12":`3rem`,"--space-14":`3.5rem`,"--space-16":`4rem`,"--space-20":`5rem`,"--space-24":`6rem`,"--space-32":`8rem`,"--golden-1":`0.25rem`,"--golden-2":`0.405rem`,"--golden-3":`0.654rem`,"--golden-4":`1.059rem`,"--golden-5":`1.713rem`,"--golden-6":`2.772rem`,"--golden-7":`4.487rem`,"--golden-8":`7.26rem`,"--golden-9":`11.749rem`,"--golden-split":`38.2% 61.8%`,"--container-max":`80rem`,"--container-prose":`48rem`,"--container-wide":`72rem`,"--gutter":`max(1rem,var(--safe-left),var(--safe-right))`,"--page-gutter":`clamp(20px,4vw,72px)`,"--gutter-sm":`1.5rem`,"--gutter-lg":`2rem`,"--section-y":`2.5rem`,"--section-y-lg":`3.5rem`,"--hero-y":`3rem`,"--hero-y-lg":`4.5rem`,"--header-height":`3.5rem`,"--header":`0px`,"--dock":`0px`,"--tap-target":`44px`,"--control-height-sm":`32px`,"--control-height":`36px`,"--control-height-lg":`40px`,"--control-height-xl":`52px`,"--safe-top":`env(safe-area-inset-top,0px)`,"--safe-right":`env(safe-area-inset-right,0px)`,"--safe-bottom":`env(safe-area-inset-bottom,0px)`,"--safe-left":`env(safe-area-inset-left,0px)`,"--grid-columns":`12`,"--grid-gap":`var(--space-6)`,"--grid-gap-tight":`var(--space-4)`,"--grid-gap-loose":`var(--space-8)`,"--breakpoint-sm":`40rem`,"--breakpoint-md":`48rem`,"--breakpoint-lg":`64rem`,"--breakpoint-xl":`80rem`,"--breakpoint-2xl":`96rem`,"--grid-card-min":`18rem`,"--grid-card-min-wide":`24rem`,"--radius-scale":`1`,"--radius":`calc(0.5rem * var(--radius-scale, 1))`,"--radius-sm":`calc(0.375rem * var(--radius-scale, 1))`,"--radius-md":`calc(0.5rem * var(--radius-scale, 1))`,"--radius-lg":`calc(0.75rem * var(--radius-scale, 1))`,"--radius-xl":`calc(1rem * var(--radius-scale, 1))`,"--radius-2xl":`calc(1.5rem * var(--radius-scale, 1))`,"--radius-composer":`calc(28px * var(--radius-scale, 1))`,"--radius-full":`9999px`,"--shadow-none":`none`,"--shadow-floating":`0 24px 60px -16px rgb(0 0 0 / .75)`,"--shadow-inset-hairline":`inset 0 0 0 1px var(--white-10)`,"--edge-highlight":`inset 0 1px 0 0 rgb(255 255 255 / .10)`,"--bloom":`0 0 24px -2px rgb(255 255 255 / .28)`,"--ring-focus":`0 0 0 3px var(--ring-halo)`,"--shadow-sm":`0 1px 2px 0 rgb(0 0 0 / .40)`,"--shadow":`0 1px 3px 0 rgb(0 0 0 / .45), 0 1px 2px -1px rgb(0 0 0 / .45)`,"--shadow-md":`0 4px 6px -1px rgb(0 0 0 / .50), 0 2px 4px -2px rgb(0 0 0 / .50)`,"--shadow-lg":`0 10px 15px -3px rgb(0 0 0 / .55), 0 4px 6px -4px rgb(0 0 0 / .55)`,"--shadow-xl":`0 20px 25px -5px rgb(0 0 0 / .60), 0 8px 10px -6px rgb(0 0 0 / .60)`,"--shadow-2xl":`var(--shadow-floating)`,"--sheet-0":`var(--surface-page)`,"--sheet-1":`var(--surface-card)`,"--sheet-2":`var(--surface-card-emphasis)`,"--shadow-sheet-1":`var(--edge-highlight),0 1px 2px 0 rgb(0 0 0 / .40)`,"--shadow-sheet-2":`var(--edge-highlight),0 10px 15px -3px rgb(0 0 0 / .55),0 4px 6px -4px rgb(0 0 0 / .55)`,"--fold":`12px`,"--fold-face":`linear-gradient(315deg,var(--glass-strong) 0,var(--glass-strong) calc(var(--fold) - 1px),var(--border-strong) calc(var(--fold) - 1px),var(--border-strong) var(--fold),transparent var(--fold))`,"--glow-hero":`radial-gradient(circle,rgb(255 255 255 / .12) 0%,transparent 68%)`,"--glow-hero-blur":`120px`,"--sheen-card":`radial-gradient(120% 120% at 80% 0%,rgb(255 255 255 / .08) 0%,transparent 55%)`,"--sheen-edge":`linear-gradient(90deg,transparent,rgb(255 255 255 / .14) 50%,transparent)`,"--gradient-chrome":`linear-gradient(to right,#ffffff,var(--white-80),var(--white-60))`,"--gradient-chrome-2":`linear-gradient(to right,#ffffff,var(--neutral-500))`,"--gradient-protect":`linear-gradient(to bottom,var(--white-10),transparent)`,"--chrome":`rgb(9 9 11 / .72)`,"--chrome-blur":`blur(20px) saturate(1.8)`,"--chrome-panel":`var(--popover)`,"--pane-blur":`var(--chrome-blur)`,"--pane-edge":`var(--white-08)`,"--pane-round":`var(--radius-xl)`,"--pane-fill":`var(--sheet-1)`,"--pane-solid":`color-mix(in srgb,var(--neutral-800) 50%,var(--background))`,"--pane-floor":`var(--background)`,"--pane-gap":`var(--space-2)`,"--pane-ground":`radial-gradient(80rem 40rem at 12% -10%,rgb(255 255 255 / .035),transparent 60%),radial-gradient(60rem 34rem at 92% 108%,var(--white-03),transparent 60%)`,"--duration-fast":`150ms`,"--duration-base":`300ms`,"--duration-slow":`400ms`,"--duration-slower":`500ms`,"--duration-glow":`9s`,"--duration-press":`90ms`,"--ease-out":`cubic-bezier(0,0,0.2,1)`,"--ease-in-out":`cubic-bezier(0.4,0,0.2,1)`,"--ease-emphasis":`cubic-bezier(0.16,1,0.3,1)`,"--stagger":`60ms`,"--entry-rise":`16px`,"--entry-rise-lg":`24px`,"--z-base":`0`,"--z-raised":`10`,"--z-sticky":`200`,"--z-header":`300`,"--z-dropdown":`400`,"--z-overlay":`500`,"--z-modal":`600`,"--z-popover":`700`,"--z-toast":`800`,"--z-under":`-10`,"--z-panel":`18`,"--z-scrim":`19`,"--z-drawer":`20`,"--z-sheet":`30`,"--z-dock":`40`,"--z-banner":`50`,"--z-tooltip":`var(--z-popover)`,"--z-notification":`var(--z-toast)`,"--font-arabic-kufi":`"Noto Kufi Arabic"`,"--font-arabic-sans":`"Noto Sans Arabic"`,"--font-arabic-plex":`"IBM Plex Sans Arabic"`,"--font-arabic":`var(--font-arabic-kufi)`,"--font-sans":`var(--font-arabic), Zen, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,"--font-display":`var(--font-sans)`,"--font-mono":`var(--font-arabic), Zen Mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace`,"--font-serif":`var(--font-arabic), Georgia, serif`,"--font-feature-settings":`normal`,"--ring-offset":`-2px`},KR=.85,qR=1.4,JR=.75,YR=1.5,XR=1.05,ZR=[`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`],QR=1.0625,$R={compact:.85,default:1,comfortable:1.15},ez={system:`ui-sans-serif, system-ui, -apple-system, sans-serif`,serif:`var(--font-serif)`,mono:`var(--font-mono)`},tz={kufi:`var(--font-arabic-kufi)`,sans:`var(--font-arabic-sans)`,plex:`var(--font-arabic-plex)`},nz={narrow:{max:`64rem`,prose:`40rem`,wide:`58rem`},wide:{max:`96rem`,prose:`56rem`,wide:`86rem`}},rz={sharp:.5,round:1.5},iz=(e,t,n)=>Math.min(n,Math.max(t,e)),az=e=>String(Math.round(e*1e4)/1e4);function oz(e){let t=e.trim();return!t||t.length>64||/[;{}()]/.test(t)&&!/^(rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|color)\([^;{}]*\)$/i.test(t)?!1:/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(t)||/^(rgb|rgba|hsl|hsla|oklch|oklab|lab|lch|color)\([^;{}]*\)$/i.test(t)||/^[a-z]{3,20}$/i.test(t)}var sz=GR[`--primary-foreground`],cz=GR[`--primary`],lz=e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4,uz=(e,t,n)=>.2126*lz(e)+.7152*lz(t)+.0722*lz(n),dz=(e,t)=>{let n=parseFloat(e);return e.trim().endsWith(`%`)?n/100*t:n};function fz(e){let t=e.trim().toLowerCase(),n=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);if(n){let e=n[1],t=e.length<=4?[...e.slice(0,3)].map(e=>e+e).join(``):e.slice(0,6),[r,i,a]=[0,2,4].map(e=>parseInt(t.slice(e,e+2),16)/255);return uz(r,i,a)}let r=/^(rgba?|hsla?|oklch|oklab)\(([^)]*)\)$/.exec(t);if(!r)return;let i=r[2].split(/[\s,/]+/).filter(Boolean);if(!(i.length<3||i.slice(0,3).some(e=>!Number.isFinite(parseFloat(e))))){if(r[1].startsWith(`rgb`)){let[e,t,n]=i.slice(0,3).map(e=>iz(dz(e,255),0,255)/255);return uz(e,t,n)}if(r[1].startsWith(`hsl`)){let e=(parseFloat(i[0])%360+360)%360,t=iz(dz(i[1],1),0,1),n=iz(dz(i[2],1),0,1),r=t=>(t+e/30)%12,a=t*Math.min(n,1-n),o=e=>n-a*Math.max(-1,Math.min(r(e)-3,9-r(e),1));return uz(o(0),o(8),o(4))}return iz(dz(i[0],1),0,1)**3}}var pz=(e,t)=>(Math.max(e,t)+.05)/(Math.min(e,t)+.05);function mz(e){let t=fz(e);if(t===void 0)return;let n=fz(sz)??0,r=fz(cz)??1;return pz(t,n)>=pz(t,r)?sz:cz}function hz(e){let t={};if(typeof e.type==`number`&&Number.isFinite(e.type)&&(t[`--type-scale`]=az(iz(e.type,KR,qR))),typeof e.ratio==`number`&&Number.isFinite(e.ratio)&&(t[`--type-ratio`]=az(iz(e.ratio,JR,YR))),typeof e.modular==`number`&&Number.isFinite(e.modular)){let n=iz(e.modular,XR,2);ZR.forEach((e,r)=>{let i=QR*n**+(r+1);t[`--text-${e}`]=`clamp(var(--text-floor), calc(${az(i)}rem * var(--type-scale, 1)), var(--text-ceiling))`})}e.density&&e.density in $R&&(t[`--density`]=az($R[e.density]));let n=e.font?ez[e.font]:void 0;n&&(t[`--font-sans`]=n);let r=e.arabic?tz[e.arabic]:void 0;r&&(t[`--font-arabic`]=r);let i=e.width?nz[e.width]:void 0;i&&(t[`--container-max`]=i.max,t[`--container-prose`]=i.prose,t[`--container-wide`]=i.wide);let a=e.radius?rz[e.radius]:void 0;a&&(t[`--radius-scale`]=az(a));let o=e.accent&&oz(e.accent)?e.accent.trim():void 0,s=o?mz(o):void 0;if(o&&s){let e=`color-mix(in oklab, ${o} 85%, ${s})`;t[`--primary`]=o,t[`--primary-foreground`]=s,t[`--primary-hover`]=e,t[`--accent`]=o,t[`--accent-foreground`]=s,t[`--accent-hover`]=e}return t}var gz=[`install`,`org`,`user`,`userOrg`],_z=[`type`,`ratio`,`modular`,`density`,`font`,`arabic`,`width`,`accent`,`highlight`,`background`,`contrast`,`theme`,`radius`];function vz(e){let t={},n={};for(let r of _z)for(let i of gz){let a=e[i]?.[r];a!=null&&a!==``&&(t[r]=a,n[r]=i)}return{pref:t,from:n}}var yz=e=>e===`org`?`userOrg`:`user`,bz=/^(#[0-9a-fA-F]{3,8}|(?:rgb|hsl|oklch|oklab|lab|lch)a?\(\s*[-+0-9.%deg\s,/]+\)|[a-zA-Z]{3,20})$/;function xz(e){let t=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(e);if(!t)return`#fafafa`;let n=t[1].length===3?t[1].replace(/./g,`$&$&`):t[1].slice(0,6),[r,i,a]=[0,2,4].map(e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a>.179?`#09090b`:`#fafafa`}var Sz={oled:{"--background":`#000000`,"--foreground":`#fafafa`,"--text-primary":`#fafafa`,"--pane-floor":`#000000`,"--pane-fill":`#050505`,"--card":`#080808`,"--surface-card":`#080808`,"--card-foreground":`#fafafa`,"--popover":`#080808`,"--popover-foreground":`#fafafa`,"--muted":`#0d0d0d`,"--secondary":`#161616`,"--secondary-hover":`#1f1f1f`,"--secondary-foreground":`#fafafa`,"--composer-fill":`#111111`,"--composer-ground":`#111111`},soft:{"--background":`#181818`,"--foreground":`#fafafa`,"--text-primary":`#fafafa`,"--pane-floor":`#131312`,"--pane-fill":`#1c1c1b`,"--card":`#20201f`,"--surface-card":`#20201f`,"--card-foreground":`#fafafa`,"--popover":`#20201f`,"--popover-foreground":`#fafafa`,"--muted":`#252523`,"--secondary":`#2e2e2c`,"--secondary-hover":`#383835`,"--secondary-foreground":`#fafafa`,"--composer-fill":`#272725`,"--composer-ground":`#272725`},high:{"--background":`#000000`,"--foreground":`#ffffff`,"--text-primary":`#ffffff`,"--pane-floor":`#000000`,"--pane-fill":`#060606`,"--card":`#0a0a0a`,"--surface-card":`#0a0a0a`,"--card-foreground":`#ffffff`,"--popover":`#0a0a0a`,"--popover-foreground":`#ffffff`,"--muted":`#121212`,"--secondary":`#1f1f1f`,"--secondary-hover":`#292929`,"--secondary-foreground":`#ffffff`,"--composer-fill":`#141414`,"--composer-ground":`#141414`,"--border":`rgb(255 255 255 / .18)`}};function Cz(e){if(e.background!==void 0){let t=e.background.trim();if(bz.test(t))return xz(t)===`#09090b`?`light`:`dark`}return e.contrast&&e.contrast in Sz?`dark`:e.theme}function wz(e){let t=(e??``).trim().toLowerCase(),n=(e,t=245,n=335)=>(e%360+360)%360>=t&&(e%360+360)%360<=n,r=(e,t,r)=>{let i=Math.max(e,t,r),a=i-Math.min(e,t,r);if(a<=.15)return!1;let o=i===e?(t-r)/a%6:i===t?(r-e)/a+2:(e-t)/a+4;return n(o*60)},i=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.exec(t);if(i){let e=i[1],t=e.length<=4?[...e.slice(0,3)].map(e=>e+e).join(``):e.slice(0,6),[n,a,o]=[0,2,4].map(e=>parseInt(t.slice(e,e+2),16)/255);return r(n,a,o)}let a=/^(rgba?|hsla?|oklch)\(([^)]*)\)$/.exec(t);if(!a)return!1;let o=a[2].split(/[\s,/]+/).filter(Boolean),s=(e,t)=>o[e]?.endsWith(`%`)?parseFloat(o[e])/100*t:parseFloat(o[e]);return o.length<3||[0,1,2].some(e=>!Number.isFinite(s(e,1)))?!1:a[1].startsWith(`rgb`)?r(s(0,255)/255,s(1,255)/255,s(2,255)/255):a[1].startsWith(`hsl`)?n(s(0,360))&&s(1,1)/(o[1].endsWith(`%`)?1:100)>.2:n(s(2,360),272,340)&&s(1,1)>.04}function Tz(e){let t={...e};return wz(t.accent)&&delete t.accent,wz(t.highlight)&&delete t.highlight,t}function Ez(e){let t=Tz(e),n={...hz(t)};if(t.contrast&&t.contrast in Sz&&Object.assign(n,Sz[t.contrast]),t.background!==void 0){let e=t.background.trim();if(bz.test(e)){let t=xz(e),r=t===`#09090b`?`black`:`white`;n[`--background`]=e,n[`--foreground`]=t,n[`--text-primary`]=t,n[`--pane-floor`]=`color-mix(in oklch, ${e} 95%, black)`,n[`--pane-fill`]=`color-mix(in oklch, ${e} 97%, ${r})`,n[`--card`]=`color-mix(in oklch, ${e} 95%, ${r})`,n[`--surface-card`]=`color-mix(in oklch, ${e} 95%, ${r})`,n[`--card-foreground`]=t,n[`--popover`]=`color-mix(in oklch, ${e} 92%, ${r})`,n[`--popover-foreground`]=t,n[`--muted`]=`color-mix(in oklch, ${e} 92%, ${r})`,n[`--secondary`]=`color-mix(in oklch, ${e} 90%, ${r})`,n[`--secondary-hover`]=`color-mix(in oklch, ${e} 84%, ${r})`,n[`--secondary-foreground`]=t,n[`--composer-fill`]=`color-mix(in oklch, ${e} 90%, ${r})`,n[`--composer-ground`]=`color-mix(in oklch, ${e} 90%, ${r})`}}if(t.highlight!==void 0){let e=t.highlight.trim();bz.test(e)&&(n[`--highlight`]=e,n[`--selection`]=`color-mix(in oklab, ${e} 28%, transparent)`,n[`--ring`]=`color-mix(in oklab, ${e} 55%, transparent)`,n[`--ring-halo`]=`color-mix(in oklab, ${e} 18%, transparent)`,n[`--border-focus`]=`color-mix(in oklab, ${e} 50%, transparent)`,n[`--border-selected`]=`color-mix(in oklab, ${e} 65%, transparent)`)}return n}var Dz=`hanzo.appearance`,Oz=(e,t)=>e===`org`&&t?`${Dz}@${t}`:Dz,kz={type:1,density:`default`},Az=()=>typeof document<`u`,jz=[`kufi`,`sans`,`plex`];function Mz(e=Az()?document.documentElement:void 0){if(!e)return;let t=getComputedStyle(e),n=t.getPropertyValue(`--font-arabic`).trim();return n?jz.find(e=>t.getPropertyValue(`--font-arabic-${e}`).trim()===n):void 0}function Nz({scope:e=`everywhere`,org:t,store:n=Bz()}={}){try{let r=n?.getItem(Oz(e,t));if(!r)return{};let i=JSON.parse(r);return!i||typeof i!=`object`?{}:{...typeof i.type==`number`&&Number.isFinite(i.type)?{type:i.type}:{},...typeof i.ratio==`number`&&Number.isFinite(i.ratio)?{ratio:i.ratio}:{},...typeof i.modular==`number`&&Number.isFinite(i.modular)?{modular:i.modular}:{},...i.density===`compact`||i.density===`comfortable`||i.density==="default"?{density:i.density}:{},...i.font==="default"||i.font===`system`||i.font===`serif`||i.font===`mono`?{font:i.font}:{},...i.arabic==="default"||jz.includes(i.arabic)?{arabic:i.arabic}:{},...i.width===`narrow`||i.width==="default"||i.width===`wide`?{width:i.width}:{},...typeof i.accent==`string`&&!wz(i.accent)?{accent:i.accent}:{},...typeof i.highlight==`string`&&!wz(i.highlight)?{highlight:i.highlight}:{},...typeof i.background==`string`?{background:i.background}:{},...i.contrast===`oled`||i.contrast===`soft`||i.contrast===`high`?{contrast:i.contrast}:{},...i.theme===`system`||i.theme===`light`||i.theme===`dark`?{theme:i.theme}:{},...i.radius===`sharp`||i.radius==="default"||i.radius===`round`?{radius:i.radius}:{}}}catch{return{}}}function Pz({org:e,store:t=Bz()}={}){return{user:Nz({scope:`everywhere`,store:t}),...e?{userOrg:Nz({scope:`org`,org:e,store:t})}:{}}}var Fz=`hanzo:appearance`;function Iz(e,{scope:t=`everywhere`,org:n,store:r=Bz()}={}){try{return r?.setItem(Oz(t,n),JSON.stringify(Tz(e))),typeof window<`u`&&typeof Event==`function`&&window.dispatchEvent(new Event(Fz)),!!r}catch{return!1}}function Lz(e,t=Az()?document.documentElement:void 0,{store:n=Bz()}={}){if(!t)return;let r=Ez(e);for(let e of ane){let n=r[e];n?t.style.setProperty(e,n):t.style.removeProperty(e)}let i=Cz(e);if(Rz(i,t),Az()&&t===document.documentElement){ine(i);try{n?.setItem(nne,JSON.stringify({vars:r,...i?{theme:i}:{}}))}catch{}}}var nne=`${Dz}.painted.v2`,rne=e=>e===`dark`||e===`system`&&typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches;function Rz(e,t){if(!e&&!t.hasAttribute(`data-scheme`))return;let n=!e||rne(e);t.classList.toggle(`light`,!n),t.classList.toggle(`dark`,n),t.classList.toggle(`t_light`,!n),t.classList.toggle(`t_dark`,n),t.style.colorScheme=n?`dark`:`light`,e?t.setAttribute(`data-scheme`,e):t.removeAttribute(`data-scheme`)}var zz;function ine(e){if(e===`system`){if(zz||typeof matchMedia!=`function`)return;let e=matchMedia(`(prefers-color-scheme: dark)`),t=()=>Rz(`system`,document.documentElement);e.addEventListener?.(`change`,t),zz={query:e,on:t}}else zz&&=(zz.query.removeEventListener?.(`change`,zz.on),void 0)}var ane=Object.keys(Ez({type:1,ratio:1,modular:1.25,density:`compact`,font:`serif`,arabic:`sans`,width:`wide`,accent:`#000`,highlight:`#000`,background:`#000`,contrast:`high`,radius:`round`}));function one({install:e,org:t,orgId:n,store:r}={}){return vz({install:e,org:t,...Pz({org:n,store:r})})}function Bz(){try{return typeof localStorage<`u`?localStorage:void 0}catch{return}}var sne=[{label:`S`,title:`Small`,value:.9},{label:`M`,title:`Default`,value:1},{label:`L`,title:`Large`,value:1.15},{label:`XL`,title:`Larger`,value:1.3}],cne=[{label:`Flat`,title:`Sizes sit close together — dense screens`,value:.85},{label:`Default`,title:`The published scale`,value:1},{label:`Airy`,title:`Headings lead further — reading pages`,value:1.2}],lne=[{label:`Default`,title:`The authored ramp — tuned, not generated`},{label:`Minor 3rd`,title:`A gentle scale (1.2)`,value:1.2},{label:`Major 3rd`,title:`What this ramp already approximates (1.25)`,value:1.25},{label:`4th`,title:`A perfect fourth (1.333) — strong headings`,value:1.3333},{label:`Golden`,title:`The golden ratio (1.618) — display-first`,value:1.618}],une=[{label:`Tight`,value:`compact`},{label:`Default`,value:`default`},{label:`Roomy`,value:`comfortable`}],dne=[{label:`Sans`,value:`default`},{label:`System`,value:`system`,preview:`ui-sans-serif, system-ui`},{label:`Serif`,value:`serif`,preview:`var(--font-serif)`},{label:`Mono`,value:`mono`,preview:`var(--font-mono)`}],fne=[{label:`Kufi`,value:`kufi`},{label:`Sans`,value:`sans`},{label:`Plex`,value:`plex`}],pne=`عربي`,mne=[{label:`Narrow`,value:`narrow`},{label:`Default`,value:`default`},{label:`Wide`,value:`wide`}],hne=[{label:`System`,value:`system`},{label:`Light`,value:`light`},{label:`Dark`,value:`dark`}],gne=[{label:`Sharp`,value:`sharp`},{label:`Default`,value:`default`},{label:`Round`,value:`round`}],_ne=()=>document.documentElement.classList.contains(`light`)?`light`:`dark`;function vne(e){let t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:[`class`]}),()=>t.disconnect()}function Vz(){return(0,V.useSyncExternalStore)(vne,_ne,()=>`dark`)}var Hz=[{label:`Default`},{label:`Olive`,value:`#808000`},{label:`Blue`,value:`#3b82f6`},{label:`Emerald`,value:`#10b981`},{label:`Rose`,value:`#f43f5e`},{label:`Amber`,value:`#f59e0b`}],Uz=[{label:`Default`},{label:`Blue`,value:`#3b82f6`},{label:`Cyan`,value:`#06b6d4`},{label:`Emerald`,value:`#10b981`},{label:`Amber`,value:`#f59e0b`},{label:`Rose`,value:`#f43f5e`}],yne=[{label:`Deep`,title:`Deep black — rich dark ground with warm-neutral contrast (default)`},{label:`OLED`,title:`Pure black — #000000 floor for OLED displays`,value:`oled`},{label:`Soft`,title:`Soft charcoal — warmer, lifted dark surfaces`,value:`soft`},{label:`High`,title:`High contrast — pure black ground, bright ink and stronger hairlines`,value:`high`}],Wz=[{label:`Default`},{label:`Pure Black`,value:`#000000`},{label:`Obsidian`,value:`#0a0a0f`},{label:`Midnight`,value:`#090d16`},{label:`Forest`,value:`#07120e`},{label:`Espresso`,value:`#120d0a`},{label:`Paper`,value:`#faf8f5`}];function Gz({org:e,install:t,orgPref:n,account:r}={}){let[i,a]=(0,V.useState)(kz),[o,s]=(0,V.useState)({}),[c,l]=(0,V.useState)(`everywhere`),u=(0,V.useCallback)((r=c)=>{let i=one({install:t,org:n,orgId:e});return a(i.pref),s(i.from),Lz(i.pref),l(r),i},[t,n,e,c]);return(0,V.useEffect)(()=>{u()},[e,t,n]),(0,V.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>u();return window.addEventListener(Fz,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(Fz,e),window.removeEventListener(`storage`,e)}},[u]),(0,V.useEffect)(()=>{if(!r)return;let e=!0;return ER(r).then(t=>{e&&t&&(Iz(t,{scope:`everywhere`}),u())}),UR(r).then(t=>{e&&t&&zR(t)}),()=>{e=!1}},[r?.base,r?.token]),{pref:i,set:(0,V.useCallback)(t=>{let n={...t};wz(n.accent)&&delete n.accent,wz(n.highlight)&&delete n.highlight;let i={...Nz({scope:c,org:e}),...n};`accent`in n&&n.accent===void 0&&delete i.accent,`highlight`in n&&n.highlight===void 0&&delete i.highlight,`background`in n&&n.background===void 0&&delete i.background,`contrast`in n&&n.contrast===void 0&&delete i.contrast,Iz(i,{scope:c,org:e}),u(),r&&c===`everywhere`&&OR(i,r)},[c,e,u,r]),reset:(0,V.useCallback)(()=>{Iz({},{scope:c,org:e}),u(),r&&c===`everywhere`&&OR({},r)},[c,e,u,r]),scope:c,setScope:e=>u(e),from:o,layer:yz(c)}}var Kz={panel:{display:`flex`,flexDirection:`column`},row:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:`var(--space-3)`,minHeight:40,paddingBlock:`var(--space-2)`,flexWrap:`wrap`},label:{fontSize:`var(--text-sm)`,color:`var(--foreground)`,whiteSpace:`nowrap`},note:{fontSize:`var(--text-xs)`,lineHeight:`var(--leading-xs)`,color:`var(--muted-foreground, var(--foreground))`,opacity:.6,margin:0},track:{display:`inline-flex`,alignItems:`center`,gap:2,padding:2,borderRadius:`var(--radius-full)`,background:`var(--secondary, rgb(255 255 255 / .06))`},swatch:e=>({width:14,height:14,borderRadius:`var(--radius-full)`,background:e??`var(--foreground)`,opacity:e?1:.35,flex:`0 0 auto`})},qz=e=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,gap:`var(--space-1)`,height:24,padding:`0 var(--space-2)`,borderRadius:`var(--radius-full)`,border:`1px solid transparent`,background:e?`var(--surface-card, rgb(255 255 255 / .10))`:`transparent`,color:e?`var(--foreground)`:`var(--muted-foreground, var(--foreground))`,opacity:e?1:.7,fontSize:`var(--text-xs)`,fontFamily:`inherit`,cursor:`pointer`});function Jz({on:e,onSelect:t,children:n,title:r,style:i}){return(0,H.jsx)(`button`,{type:`button`,"aria-pressed":e,onClick:t,title:r,"aria-label":r,style:{...qz(e),...i},children:n})}function Yz({label:e,children:t,by:n,scope:r,org:i}){let a=n&&n!==yz(r??`everywhere`)?n===`org`?`Set by ${i||`your organization`}`:n===`install`?`A default for this install`:n===`user`?`Your setting for everywhere`:`Your setting for ${i||`this organization`}`:null;return(0,H.jsxs)(`div`,{style:Kz.row,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`div`,{style:Kz.label,children:e}),a?(0,H.jsx)(`p`,{style:Kz.note,children:a}):null]}),(0,H.jsx)(`div`,{style:Kz.track,children:t})]})}function bne({org:e,orgName:t,install:n,orgPref:r,account:i}={}){let{pref:a,set:o,reset:s,scope:c,setScope:l,from:u}=Gz({org:e,install:n,orgPref:r,account:i}),d=a.type??1,f=a.ratio??1,p=(e,t)=>Math.abs(e-t)<.001,m=Vz(),h=d!==1||f!==1||a.modular!==void 0||(a.density??`default`)!=="default"||(a.font??`default`)!=="default"||(a.arabic??`default`)!=="default"||(a.width??`default`)!=="default"||!!a.accent||!!a.highlight||!!a.background||!!a.contrast||!!a.theme||(a.radius??`default`)!=="default",g=t||e;return(0,H.jsxs)(`div`,{style:Kz.panel,children:[e?(0,H.jsxs)(Yz,{label:`Applies to`,children:[(0,H.jsx)(Jz,{on:c===`everywhere`,onSelect:()=>l(`everywhere`),children:`Everywhere`}),(0,H.jsx)(Jz,{on:c===`org`,onSelect:()=>l(`org`),children:g})]}):null,(0,H.jsx)(Yz,{label:`Theme`,by:u.theme,scope:c,org:g,children:hne.map(e=>(0,H.jsx)(Jz,{on:(a.theme??m)===e.value,onSelect:()=>o({theme:e.value,...a.background===void 0?{}:{background:void 0},...a.contrast===void 0?{}:{contrast:void 0}}),children:e.label},e.value))}),(0,H.jsx)(Yz,{label:`Contrast`,by:u.contrast,scope:c,org:g,children:yne.map(e=>(0,H.jsx)(Jz,{on:a.contrast===e.value,onSelect:()=>o({contrast:e.value,...e.value&&a.background!==void 0?{background:void 0}:{}}),title:e.title,children:e.label},e.label))}),(0,H.jsx)(Yz,{label:`Text size`,by:u.type,scope:c,org:g,children:sne.map(e=>(0,H.jsx)(Jz,{on:p(d,e.value),onSelect:()=>o({type:e.value}),title:e.title,children:e.label},e.label))}),(0,H.jsx)(Yz,{label:`Scale`,by:u.ratio,scope:c,org:g,children:cne.map(e=>(0,H.jsx)(Jz,{on:p(f,e.value),onSelect:()=>o({ratio:e.value}),title:e.title,children:e.label},e.label))}),(0,H.jsx)(Yz,{label:`Scale system`,by:u.modular,scope:c,org:g,children:lne.map(e=>(0,H.jsx)(Jz,{on:e.value===void 0?a.modular===void 0:Math.abs((a.modular??0)-e.value)<.001,onSelect:()=>o({modular:e.value}),title:e.title,children:e.label},e.label))}),(0,H.jsx)(Yz,{label:`Spacing`,by:u.density,scope:c,org:g,children:une.map(e=>(0,H.jsx)(Jz,{on:(a.density??`default`)===e.value,onSelect:()=>o({density:e.value}),children:e.label},e.value))}),(0,H.jsx)(Yz,{label:`Font`,by:u.font,scope:c,org:g,children:dne.map(e=>(0,H.jsx)(Jz,{on:(a.font??`default`)===e.value,onSelect:()=>o({font:e.value}),style:{fontFamily:e.preview},children:e.label},e.value))}),(0,H.jsx)(Yz,{label:`Arabic`,by:u.arabic,scope:c,org:g,children:fne.map(e=>(0,H.jsxs)(Jz,{on:(a.arabic&&a.arabic!=="default"?a.arabic:Mz())===e.value,onSelect:()=>o({arabic:e.value}),title:`Arabic in ${e.label}`,style:{fontFamily:`var(--font-arabic-${e.value}), var(--font-sans)`},children:[e.label,` `,(0,H.jsx)(`span`,{lang:`ar`,dir:`rtl`,children:pne})]},e.value))}),(0,H.jsx)(Yz,{label:`Width`,by:u.width,scope:c,org:g,children:mne.map(e=>(0,H.jsx)(Jz,{on:(a.width??`default`)===e.value,onSelect:()=>o({width:e.value}),children:e.label},e.value))}),(0,H.jsx)(Yz,{label:`Corners`,by:u.radius,scope:c,org:g,children:gne.map(e=>(0,H.jsx)(Jz,{on:(a.radius??`default`)===e.value,onSelect:()=>o({radius:e.value}),children:e.label},e.value))}),(0,H.jsxs)(Yz,{label:`Accent`,by:u.accent,scope:c,org:g,children:[Hz.map(e=>(0,H.jsx)(Jz,{on:a.accent===e.value,onSelect:()=>o({accent:e.value}),title:e.label,children:(0,H.jsx)(`span`,{style:Kz.swatch(e.value)})},e.label)),(0,H.jsxs)(`label`,{title:`Custom accent color`,style:{...qz(!(!a.accent||Hz.some(e=>e.value===a.accent))),position:`relative`,overflow:`hidden`},children:[(0,H.jsx)(`span`,{style:{...Kz.swatch(a.accent),border:`1px solid rgb(255 255 255 / .25)`}}),(0,H.jsx)(`input`,{type:`color`,"aria-label":`Custom accent color`,value:a.accent&&/^#[0-9a-fA-F]{6}$/.test(a.accent)?a.accent:`#3b82f6`,onChange:e=>o({accent:e.target.value}),style:{position:`absolute`,inset:0,opacity:0,cursor:`pointer`,width:`100%`,height:`100%`,border:0,padding:0}})]})]}),(0,H.jsxs)(Yz,{label:`Highlight`,by:u.highlight,scope:c,org:g,children:[Uz.map(e=>(0,H.jsx)(Jz,{on:a.highlight===e.value,onSelect:()=>o({highlight:e.value}),title:`Highlight: ${e.label}`,children:(0,H.jsx)(`span`,{style:Kz.swatch(e.value)})},e.label)),(0,H.jsxs)(`label`,{title:`Custom highlight color`,style:{...qz(!(!a.highlight||Uz.some(e=>e.value===a.highlight))),position:`relative`,overflow:`hidden`},children:[(0,H.jsx)(`span`,{style:{...Kz.swatch(a.highlight),border:`1px solid rgb(255 255 255 / .25)`}}),(0,H.jsx)(`input`,{type:`color`,"aria-label":`Custom highlight color`,value:a.highlight&&/^#[0-9a-fA-F]{6}$/.test(a.highlight)?a.highlight:`#ffffff`,onChange:e=>o({highlight:e.target.value}),style:{position:`absolute`,inset:0,opacity:0,cursor:`pointer`,width:`100%`,height:`100%`,border:0,padding:0}})]})]}),(0,H.jsxs)(Yz,{label:`Background`,by:u.background,scope:c,org:g,children:[Wz.map(e=>(0,H.jsx)(Jz,{on:a.background===e.value,onSelect:()=>o({background:e.value}),title:e.label,children:(0,H.jsx)(`span`,{style:{...Kz.swatch(e.value),border:e.value?`1px solid rgb(255 255 255 / .2)`:void 0}})},e.label)),(0,H.jsxs)(`label`,{title:`Custom background color`,style:{...qz(!(!a.background||Wz.some(e=>e.value===a.background))),position:`relative`,overflow:`hidden`},children:[(0,H.jsx)(`span`,{style:{...Kz.swatch(a.background),border:`1px solid rgb(255 255 255 / .25)`}}),(0,H.jsx)(`input`,{type:`color`,"aria-label":`Custom background color`,value:a.background&&/^#[0-9a-fA-F]{6}$/.test(a.background)?a.background:`#0a0a0f`,onChange:e=>o({background:e.target.value}),style:{position:`absolute`,inset:0,opacity:0,cursor:`pointer`,width:`100%`,height:`100%`,border:0,padding:0}})]})]}),(0,H.jsx)(xne,{account:i}),h?(0,H.jsx)(`div`,{style:{...Kz.row,justifyContent:`flex-end`},children:(0,H.jsx)(`button`,{type:`button`,onClick:s,style:{...qz(!1),opacity:.8},children:c===`org`?`Reset for ${g}`:`Reset`})}):null]})}var Xz=[{label:`Auto`},{label:`Show`,value:!0},{label:`Hide`,value:!1}];function xne({account:e}){let t=HR(),n=n=>{let r={...t,...n};for(let e of Object.keys(n))n[e]===void 0&&delete r[e];zR(r),e&&WR(r,e)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(Yz,{label:`Send with`,children:[(0,H.jsx)(Jz,{on:(t.send??`enter`)===`enter`,onSelect:()=>n({send:`enter`}),title:`Enter sends; Shift+Enter starts a new line`,children:`Enter`}),(0,H.jsx)(Jz,{on:t.send===`mod`,onSelect:()=>n({send:`mod`}),title:`⌘ or Ctrl+Enter sends; Enter starts a new line`,children:`⌘ Enter`})]}),(0,H.jsx)(Yz,{label:`Composer chips`,children:Xz.map(e=>(0,H.jsx)(Jz,{on:t.chips===e.value,onSelect:()=>n({chips:e.value}),children:e.label},e.label))}),(0,H.jsx)(Yz,{label:`Model in composer`,children:Xz.map(e=>(0,H.jsx)(Jz,{on:t.model===e.value,onSelect:()=>n({model:e.value}),children:e.label},e.label))}),(0,H.jsx)(Yz,{label:`Mode in composer`,children:Xz.map(e=>(0,H.jsx)(Jz,{on:t.mode===e.value,onSelect:()=>n({mode:e.value}),children:e.label},e.label))})]})}var Sne={Close:`إغلاق`,"Close window":`إغلاق النافذة`,"Minimize window":`تصغير النافذة`,"Restore window":`استعادة النافذة`,"Maximize window":`تكبير النافذة`,Resize:`تغيير الحجم`,"Select all":`تحديد الكل`,"Select row":`تحديد الصف`,"Previous month":`الشهر السابق`,"Next month":`الشهر التالي`,Dismiss:`تجاهل`,Breadcrumb:`مسار التنقل`,Cards:`بطاقات`,"Copy code":`نسخ الرمز`,Copied:`تم النسخ`,"Copied!":`تم النسخ!`,Copy:`نسخ`,"Previous slide":`الشريحة السابقة`,"Next slide":`الشريحة التالية`,"Previous card":`البطاقة السابقة`,"Next card":`البطاقة التالية`,"Zoom out":`تصغير`,"Zoom in":`تكبير`,Rotate:`تدوير`,Filter:`تصفية`,"Expand all":`توسيع الكل`,"Collapse all":`طي الكل`,"Search...":`بحث...`,"Pick a date":`اختر تاريخًا`,Select:`تحديد`,"Start typing...":`ابدأ الكتابة...`,Search:`بحث`,Decrease:`إنقاص`,Increase:`زيادة`,pagination:`ترقيم الصفحات`,"Go to previous page":`الانتقال إلى الصفحة السابقة`,"Go to next page":`الانتقال إلى الصفحة التالية`,Previous:`السابق`,Next:`التالي`,"More pages":`مزيد من الصفحات`,Remove:`إزالة`,"Go back":`رجوع`,"Go forward":`تقدم`,"Reload page":`إعادة تحميل الصفحة`,Share:`مشاركة`,"New tab":`علامة تبويب جديدة`,Menu:`القائمة`,"Copy command":`نسخ الأمر`,"Terminal input":`إدخال الطرفية`,Seek:`التمرير`,"Rewind 10 seconds":`إرجاع 10 ثوانٍ`,"Forward 10 seconds":`تقديم 10 ثوانٍ`,Volume:`مستوى الصوت`,"Toggle captions":`تبديل التعليقات`,"Playback speed":`سرعة التشغيل`,Quality:`الجودة`,"Picture in picture":`صورة داخل صورة`,Play:`تشغيل`,Pause:`إيقاف مؤقت`,Mute:`كتم الصوت`,Unmute:`إلغاء كتم الصوت`,"Exit fullscreen":`الخروج من ملء الشاشة`,"Enter fullscreen":`ملء الشاشة`,Expand:`توسيع`,Collapse:`طي`,"Copy reply":`نسخ الرد`,"Good result":`نتيجة جيدة`,"Bad result":`نتيجة سيئة`,"Dialog Close":`إغلاق مربع الحوار`,Notifications:`الإشعارات`,Account:`الحساب`,Cart:`السلة`,Call:`مكالمة`,"Video call":`مكالمة فيديو`,Message:`رسالة`,Main:`الرئيسي`,Columns:`الأعمدة`,"No results.":`لا توجد نتائج.`,"No results":`لا توجد نتائج`,"No results found":`لم يُعثر على نتائج`,"Drop files here":`أفلت الملفات هنا`,"Drag & drop files here":`اسحب الملفات وأفلتها هنا`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`أو انقر للاستعراض (بحد أقصى {maxFiles} ملفات، {maxSize} ميغابايت لكل ملف)`,"Remove {name}":`إزالة {name}`,"{selected} of {total} row(s) selected.":`تم تحديد {selected} من {total}.`,"Try again":`حاول مرة أخرى`,"What’s up next?":`ما التالي؟`,"Show password":`إظهار كلمة المرور`,"Hide password":`إخفاء كلمة المرور`,"Search icons":`البحث عن أيقونات`,"No icon matches":`لا توجد أيقونة مطابقة`,"Show all items ({n})":`عرض الكل ({n})`,"Fewer {what}":`{what} أقل`,"More {what}":`المزيد من {what}`,"No tasks available. Add tasks to display Gantt chart.":`لا توجد مهام. أضف مهامًا لعرض مخطط جانت.`,January:`يناير`,February:`فبراير`,March:`مارس`,April:`أبريل`,May:`مايو`,June:`يونيو`,July:`يوليو`,August:`أغسطس`,September:`سبتمبر`,October:`أكتوبر`,November:`نوفمبر`,December:`ديسمبر`,Su:`ح`,Mo:`ن`,Tu:`ث`,We:`ر`,Th:`خ`,Fr:`ج`,Sa:`س`,"just now":`الآن`,"in a moment":`بعد لحظات`,"in 1 minute":`خلال دقيقة واحدة`,"in {n} minutes":`خلال {n} دقائق`,"in 1 hour":`خلال ساعة واحدة`,"in {n} hours":`خلال {n} ساعات`,tomorrow:`غدًا`,"in {n} days":`خلال {n} أيام`,"in 1 week":`خلال أسبوع واحد`,"in {n} weeks":`خلال {n} أسابيع`,"in 1 month":`خلال شهر واحد`,"in {n} months":`خلال {n} أشهر`,"in 1 year":`خلال سنة واحدة`,"in {n} years":`خلال {n} سنوات`,"1 minute ago":`قبل دقيقة واحدة`,"{n} minutes ago":`قبل {n} دقائق`,"1 hour ago":`قبل ساعة واحدة`,"{n} hours ago":`قبل {n} ساعات`,"1 day ago":`قبل يوم واحد`,"{n} days ago":`قبل {n} أيام`,"1 week ago":`قبل أسبوع واحد`,"{n} weeks ago":`قبل {n} أسابيع`,"1 month ago":`قبل شهر واحد`,"{n} months ago":`قبل {n} أشهر`,"1 year ago":`قبل سنة واحدة`,"{n} years ago":`قبل {n} سنوات`,"Cookie notice":`إشعار ملفات تعريف الارتباط`,"Cookie preferences":`تفضيلات ملفات تعريف الارتباط`,"Close and use essential cookies only":`إغلاق واستخدام ملفات تعريف الارتباط الأساسية فقط`,Back:`رجوع`,"Log in":`تسجيل الدخول`,"Search Hanzo or ask AI":`ابحث في Hanzo أو اسأل الذكاء الاصطناعي`,"Search models":`البحث عن النماذج`,"Search branches…":`البحث عن الفروع…`,"Search repositories…":`البحث عن المستودعات…`,"Show options":`إظهار الخيارات`,Retry:`إعادة المحاولة`,"Donut chart":`مخطط حلقي`,"Find an organization":`العثور على مؤسسة`,Organizations:`المؤسسات`,"Organization name":`اسم المؤسسة`,"Previous page":`الصفحة السابقة`,"Next page":`الصفحة التالية`,"Continue with credits":`المتابعة باستخدام الرصيد`,"Try Hanzo":`جرّب Hanzo`,"Terms & Policies":`الشروط والسياسات`,"Who this is for":`لمن هذا`,"Bill yearly":`فوترة سنوية`,Apps:`التطبيقات`,"Card actions":`إجراءات البطاقة`,"Assign to...":`تعيين إلى...`,"Search cards...":`البحث في البطاقات...`,"Clear search":`مسح البحث`,"Open files":`الملفات المفتوحة`,"Close panel":`إغلاق اللوحة`,"Add an organization":`إضافة مؤسسة`,"Keyboard Shortcuts":`اختصارات لوحة المفاتيح`,"Run a command":`تشغيل أمر`,"Type shell command...":`اكتب أمر الصدفة...`,"Attached to the next message":`مرفق بالرسالة التالية`,"Channel Member Roster":`أعضاء القناة`,"Channel Collaborative Notes":`ملاحظات القناة المشتركة`,"Code Diff Viewer":`عارض الفروق`,"Live Voice Call":`مكالمة صوتية مباشرة`,"MCP Server Hub":`مركز خوادم MCP`,"Multi-Agent Swarm Bar":`شريط سرب الوكلاء`,"Write shared channel notes, meeting agenda, or AI summaries...":`اكتب ملاحظات القناة أو جدول الاجتماع أو ملخصات الذكاء الاصطناعي...`,"Help improve our AI models":`ساعد في تحسين نماذج الذكاء الاصطناعي`,"Your name":`اسمك`,"Your role":`دورك`,"Country or region":`البلد أو المنطقة`,"Card details":`بيانات البطاقة`,"Agree to recurring charges":`الموافقة على الرسوم المتكررة`,"How you will use Hanzo":`كيف ستستخدم Hanzo`,"Team size":`حجم الفريق`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`أوافق على شروط الخدمة وسياسة الاستخدام المقبول وأؤكد أن عمري 18 عامًا على الأقل.`,"Empty string":`سلسلة فارغة`,"Empty array":`مصفوفة فارغة`,"Empty object":`كائن فارغ`,"Copy {what}":`نسخ {what}`,"Ask anything":`اسأل عن أي شيء`,Auto:`تلقائي`,Instant:`فوري`,Low:`منخفض`,Medium:`متوسط`,High:`عالٍ`,Max:`الحد الأقصى`,Dictate:`إملاء`,"Dictating — click to stop":`جارٍ الإملاء — انقر للإيقاف`,"Dictation settings":`إعدادات الإملاء`,Language:`اللغة`,"No devices found":`لم يُعثر على أجهزة`,"Microphone {n}":`ميكروفون {n}`,"Nothing matches":`لا يوجد تطابق`,Commands:`الأوامر`,"Search commands…":`البحث عن الأوامر…`,Agents:`الوكلاء`,Skills:`المهارات`,Connectors:`الموصّلات`,"Design system":`نظام التصميم`,Plugins:`الإضافات`,Devices:`الأجهزة`,Memory:`الذاكرة`,Research:`بحث متعمق`,On:`تشغيل`,"Upload or add files":`تحميل ملفات أو إضافتها`,"Add files, agents, skills and more":`أضف ملفاتًا ووكلاء ومهارات والمزيد`,"No agents yet":`لا يوجد وكلاء بعد`,"No skills yet":`لا توجد مهارات بعد`,"No connectors yet":`لا توجد موصّلات بعد`,"No design system yet":`لا يوجد نظام تصميم بعد`,"No plugins yet":`لا توجد إضافات بعد`,"No devices yet":`لا توجد أجهزة بعد`,"Search agents":`البحث عن الوكلاء`,"Search skills":`البحث عن المهارات`,"Search connectors":`البحث عن الموصّلات`,"Search design system":`البحث في نظام التصميم`,"Search plugins":`البحث عن الإضافات`,"Search devices":`البحث عن الأجهزة`,"Reading agents":`جارٍ قراءة الوكلاء`,"Reading skills":`جارٍ قراءة المهارات`,"Reading connectors":`جارٍ قراءة الموصّلات`,"Reading design system":`جارٍ قراءة نظام التصميم`,"Reading plugins":`جارٍ قراءة الإضافات`,"Adaptive reasoning based on task complexity":`استدلال متكيف حسب تعقيد المهمة`,"Answers right away, without thinking":`يجيب فورًا دون تفكير`,"A quick pass with minimal thinking":`مرور سريع بأقل قدر من التفكير`,"Thinks before answering":`يفكر قبل الإجابة`,"Deep reasoning for complex problems":`استدلال عميق للمشكلات المعقدة`,"Maximum compute and exhaustive verification":`أقصى حساب وتحقق شامل`,Effort:`الجهد`,"Effort: {level}":`الجهد: {level}`,Mode:`الوضع`,"Mode: {mode}":`الوضع: {mode}`,Model:`النموذج`,"Model: {name}":`النموذج: {name}`,"Voice mode":`وضع الصوت`,"Hanzo is speaking — talk to interrupt":`Hanzo يتحدث — تحدّث للمقاطعة`,"In conversation — click to hang up":`في محادثة — انقر لإنهاء المكالمة`,"Go to testimonial {n}":`الانتقال إلى الشهادة {n}`,"Go to card {n}":`الانتقال إلى البطاقة {n}`,"{n} of {total}":`{n} من {total}`,"Reading…":`جارٍ القراءة…`,Skill:`مهارة`,Plugin:`إضافة`},Cne={Close:`Schließen`,"Close window":`Fenster schließen`,"Minimize window":`Fenster minimieren`,"Restore window":`Fenster wiederherstellen`,"Maximize window":`Fenster maximieren`,Resize:`Größe ändern`,"Select all":`Alle auswählen`,"Select row":`Zeile auswählen`,"Previous month":`Vorheriger Monat`,"Next month":`Nächster Monat`,Dismiss:`Schließen`,Breadcrumb:`Brotkrumen`,Cards:`Karten`,"Copy code":`Code kopieren`,Copied:`Kopiert`,"Copied!":`Kopiert!`,Copy:`Kopieren`,"Previous slide":`Vorherige Folie`,"Next slide":`Nächste Folie`,"Previous card":`Vorherige Karte`,"Next card":`Nächste Karte`,"Zoom out":`Verkleinern`,"Zoom in":`Vergrößern`,Rotate:`Drehen`,Filter:`Filtern`,"Expand all":`Alle aufklappen`,"Collapse all":`Alle zuklappen`,"Search...":`Suchen...`,"Pick a date":`Datum wählen`,Select:`Auswählen`,"Start typing...":`Schreibe etwas...`,Search:`Suchen`,Decrease:`Verringern`,Increase:`Erhöhen`,pagination:`Seitennummerierung`,"Go to previous page":`Zur vorherigen Seite`,"Go to next page":`Zur nächsten Seite`,Previous:`Zurück`,Next:`Weiter`,"More pages":`Weitere Seiten`,Remove:`Entfernen`,"Go back":`Zurück`,"Go forward":`Vorwärts`,"Reload page":`Seite neu laden`,Share:`Teilen`,"New tab":`Neuer Tab`,Menu:`Menü`,"Copy command":`Befehl kopieren`,"Terminal input":`Terminaleingabe`,Seek:`Position`,"Rewind 10 seconds":`10 Sekunden zurück`,"Forward 10 seconds":`10 Sekunden vor`,Volume:`Lautstärke`,"Toggle captions":`Untertitel umschalten`,"Playback speed":`Wiedergabegeschwindigkeit`,Quality:`Qualität`,"Picture in picture":`Bild im Bild`,Play:`Wiedergabe`,Pause:`Pause`,Mute:`Stumm`,Unmute:`Ton an`,"Exit fullscreen":`Vollbild beenden`,"Enter fullscreen":`Vollbild`,Expand:`Aufklappen`,Collapse:`Zuklappen`,"Copy reply":`Antwort kopieren`,"Good result":`Gutes Ergebnis`,"Bad result":`Schlechtes Ergebnis`,"Dialog Close":`Dialog schließen`,Notifications:`Benachrichtigungen`,Account:`Konto`,Cart:`Warenkorb`,Call:`Anruf`,"Video call":`Videoanruf`,Message:`Nachricht`,Main:`Hauptnavigation`,Columns:`Spalten`,"No results.":`Keine Ergebnisse.`,"No results":`Keine Ergebnisse`,"No results found":`Keine Ergebnisse gefunden`,"Drop files here":`Dateien hier ablegen`,"Drag & drop files here":`Dateien hierher ziehen`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`oder klicken zum Durchsuchen (max. {maxFiles} Dateien, je {maxSize} MB)`,"Remove {name}":`{name} entfernen`,"{selected} of {total} row(s) selected.":`{selected} von {total} Zeile(n) ausgewählt.`,"Try again":`Erneut versuchen`,"What’s up next?":`Was steht als Nächstes an?`,"Show password":`Passwort anzeigen`,"Hide password":`Passwort verbergen`,"Search icons":`Symbole suchen`,"No icon matches":`Kein Symbol passt`,"Show all items ({n})":`Alle anzeigen ({n})`,"Fewer {what}":`Weniger {what}`,"More {what}":`Mehr {what}`,"No tasks available. Add tasks to display Gantt chart.":`Keine Aufgaben. Fügen Sie welche hinzu, um das Gantt-Diagramm zu sehen.`,January:`Januar`,February:`Februar`,March:`März`,April:`April`,May:`Mai`,June:`Juni`,July:`Juli`,August:`August`,September:`September`,October:`Oktober`,November:`November`,December:`Dezember`,Su:`So`,Mo:`Mo`,Tu:`Di`,We:`Mi`,Th:`Do`,Fr:`Fr`,Sa:`Sa`,"just now":`gerade eben`,"in a moment":`gleich`,"in 1 minute":`in 1 Minute`,"in {n} minutes":`in {n} Minuten`,"in 1 hour":`in 1 Stunde`,"in {n} hours":`in {n} Stunden`,tomorrow:`morgen`,"in {n} days":`in {n} Tagen`,"in 1 week":`in 1 Woche`,"in {n} weeks":`in {n} Wochen`,"in 1 month":`in 1 Monat`,"in {n} months":`in {n} Monaten`,"in 1 year":`in 1 Jahr`,"in {n} years":`in {n} Jahren`,"1 minute ago":`vor 1 Minute`,"{n} minutes ago":`vor {n} Minuten`,"1 hour ago":`vor 1 Stunde`,"{n} hours ago":`vor {n} Stunden`,"1 day ago":`vor 1 Tag`,"{n} days ago":`vor {n} Tagen`,"1 week ago":`vor 1 Woche`,"{n} weeks ago":`vor {n} Wochen`,"1 month ago":`vor 1 Monat`,"{n} months ago":`vor {n} Monaten`,"1 year ago":`vor 1 Jahr`,"{n} years ago":`vor {n} Jahren`,"Cookie notice":`Hinweis zu Cookies`,"Cookie preferences":`Cookie-Einstellungen`,"Close and use essential cookies only":`Schließen und nur essenzielle Cookies verwenden`,Back:`Zurück`,"Log in":`Anmelden`,"Search Hanzo or ask AI":`Hanzo durchsuchen oder die KI fragen`,"Search models":`Modelle suchen`,"Search branches…":`Branches suchen…`,"Search repositories…":`Repositories suchen…`,"Show options":`Optionen anzeigen`,Retry:`Wiederholen`,"Donut chart":`Ringdiagramm`,"Find an organization":`Organisation finden`,Organizations:`Organisationen`,"Organization name":`Name der Organisation`,"Previous page":`Vorherige Seite`,"Next page":`Nächste Seite`,"Continue with credits":`Mit Guthaben fortfahren`,"Try Hanzo":`Hanzo ausprobieren`,"Terms & Policies":`Bedingungen und Richtlinien`,"Who this is for":`Für wen es ist`,"Bill yearly":`Jährlich abrechnen`,Apps:`Apps`,"Card actions":`Kartenaktionen`,"Assign to...":`Zuweisen an...`,"Search cards...":`Karten suchen...`,"Clear search":`Suche löschen`,"Open files":`Geöffnete Dateien`,"Close panel":`Bereich schließen`,"Add an organization":`Organisation hinzufügen`,"Keyboard Shortcuts":`Tastenkürzel`,"Run a command":`Befehl ausführen`,"Type shell command...":`Shell-Befehl eingeben...`,"Attached to the next message":`An die nächste Nachricht angehängt`,"Channel Member Roster":`Kanalmitglieder`,"Channel Collaborative Notes":`Gemeinsame Kanalnotizen`,"Code Diff Viewer":`Diff-Ansicht`,"Live Voice Call":`Live-Sprachanruf`,"MCP Server Hub":`MCP-Server-Hub`,"Multi-Agent Swarm Bar":`Leiste für den Agentenschwarm`,"Write shared channel notes, meeting agenda, or AI summaries...":`Gemeinsame Notizen, Tagesordnung oder KI-Zusammenfassungen schreiben...`,"Help improve our AI models":`Hilf mit, unsere KI-Modelle zu verbessern`,"Your name":`Dein Name`,"Your role":`Deine Rolle`,"Country or region":`Land oder Region`,"Card details":`Kartendaten`,"Agree to recurring charges":`Wiederkehrenden Abbuchungen zustimmen`,"How you will use Hanzo":`Wie du Hanzo nutzen wirst`,"Team size":`Teamgröße`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Ich stimme den Nutzungsbedingungen und der Richtlinie zur akzeptablen Nutzung zu und bestätige, dass ich mindestens 18 Jahre alt bin.`,"Empty string":`Leere Zeichenkette`,"Empty array":`Leeres Array`,"Empty object":`Leeres Objekt`,"Copy {what}":`{what} kopieren`,"Ask anything":`Frag nach allem`,Auto:`Auto`,Instant:`Sofort`,Low:`Niedrig`,Medium:`Mittel`,High:`Hoch`,Max:`Maximal`,Dictate:`Diktieren`,"Dictating — click to stop":`Diktat läuft — zum Stoppen klicken`,"Dictation settings":`Diktateinstellungen`,Language:`Sprache`,"No devices found":`Keine Geräte gefunden`,"Microphone {n}":`Mikrofon {n}`,"Nothing matches":`Nichts passt`,Commands:`Befehle`,"Search commands…":`Befehle suchen…`,Agents:`Agenten`,Skills:`Fähigkeiten`,Connectors:`Konnektoren`,"Design system":`Designsystem`,Plugins:`Plugins`,Devices:`Geräte`,Memory:`Gedächtnis`,Research:`Recherche`,On:`An`,"Upload or add files":`Dateien hochladen oder hinzufügen`,"Add files, agents, skills and more":`Dateien, Agenten, Fähigkeiten und mehr hinzufügen`,"No agents yet":`Noch keine Agenten`,"No skills yet":`Noch keine Fähigkeiten`,"No connectors yet":`Noch keine Konnektoren`,"No design system yet":`Noch kein Designsystem`,"No plugins yet":`Noch keine Plugins`,"No devices yet":`Noch keine Geräte`,"Search agents":`Agenten suchen`,"Search skills":`Fähigkeiten suchen`,"Search connectors":`Konnektoren suchen`,"Search design system":`Designsystem durchsuchen`,"Search plugins":`Plugins suchen`,"Search devices":`Geräte suchen`,"Reading agents":`Agenten werden gelesen`,"Reading skills":`Fähigkeiten werden gelesen`,"Reading connectors":`Konnektoren werden gelesen`,"Reading design system":`Designsystem wird gelesen`,"Reading plugins":`Plugins werden gelesen`,"Adaptive reasoning based on task complexity":`Adaptives Denken je nach Komplexität der Aufgabe`,"Answers right away, without thinking":`Antwortet sofort, ohne nachzudenken`,"A quick pass with minimal thinking":`Ein schneller Durchgang mit wenig Nachdenken`,"Thinks before answering":`Denkt nach, bevor es antwortet`,"Deep reasoning for complex problems":`Tiefes Nachdenken bei komplexen Problemen`,"Maximum compute and exhaustive verification":`Maximales Rechnen und gründliche Prüfung`,Effort:`Aufwand`,"Effort: {level}":`Aufwand: {level}`,Mode:`Modus`,"Mode: {mode}":`Modus: {mode}`,Model:`Modell`,"Model: {name}":`Modell: {name}`,"Voice mode":`Sprachmodus`,"Hanzo is speaking — talk to interrupt":`Hanzo spricht — sprich, um zu unterbrechen`,"In conversation — click to hang up":`Im Gespräch — zum Auflegen klicken`,"Go to testimonial {n}":`Zu Testimonial {n}`,"Go to card {n}":`Zu Karte {n}`,"{n} of {total}":`{n} von {total}`,"Reading…":`Wird gelesen…`,Skill:`Fähigkeit`,Plugin:`Plugin`},wne={Close:`Cerrar`,"Close window":`Cerrar ventana`,"Minimize window":`Minimizar ventana`,"Restore window":`Restaurar ventana`,"Maximize window":`Maximizar ventana`,Resize:`Cambiar tamaño`,"Select all":`Seleccionar todo`,"Select row":`Seleccionar fila`,"Previous month":`Mes anterior`,"Next month":`Mes siguiente`,Dismiss:`Descartar`,Breadcrumb:`Ruta de navegación`,Cards:`Tarjetas`,"Copy code":`Copiar código`,Copied:`Copiado`,"Copied!":`¡Copiado!`,Copy:`Copiar`,"Previous slide":`Diapositiva anterior`,"Next slide":`Diapositiva siguiente`,"Previous card":`Tarjeta anterior`,"Next card":`Tarjeta siguiente`,"Zoom out":`Alejar`,"Zoom in":`Acercar`,Rotate:`Girar`,Filter:`Filtrar`,"Expand all":`Expandir todo`,"Collapse all":`Contraer todo`,"Search...":`Buscar...`,"Pick a date":`Elige una fecha`,Select:`Seleccionar`,"Start typing...":`Empieza a escribir...`,Search:`Buscar`,Decrease:`Disminuir`,Increase:`Aumentar`,pagination:`paginación`,"Go to previous page":`Ir a la página anterior`,"Go to next page":`Ir a la página siguiente`,Previous:`Anterior`,Next:`Siguiente`,"More pages":`Más páginas`,Remove:`Quitar`,"Go back":`Volver`,"Go forward":`Avanzar`,"Reload page":`Recargar página`,Share:`Compartir`,"New tab":`Nueva pestaña`,Menu:`Menú`,"Copy command":`Copiar comando`,"Terminal input":`Entrada del terminal`,Seek:`Buscar posición`,"Rewind 10 seconds":`Retroceder 10 segundos`,"Forward 10 seconds":`Adelantar 10 segundos`,Volume:`Volumen`,"Toggle captions":`Mostrar u ocultar subtítulos`,"Playback speed":`Velocidad de reproducción`,Quality:`Calidad`,"Picture in picture":`Imagen en imagen`,Play:`Reproducir`,Pause:`Pausa`,Mute:`Silenciar`,Unmute:`Activar sonido`,"Exit fullscreen":`Salir de pantalla completa`,"Enter fullscreen":`Pantalla completa`,Expand:`Expandir`,Collapse:`Contraer`,"Copy reply":`Copiar respuesta`,"Good result":`Buen resultado`,"Bad result":`Mal resultado`,"Dialog Close":`Cerrar diálogo`,Notifications:`Notificaciones`,Account:`Cuenta`,Cart:`Carrito`,Call:`Llamada`,"Video call":`Videollamada`,Message:`Mensaje`,Main:`Principal`,Columns:`Columnas`,"No results.":`No hay resultados.`,"No results":`No hay resultados`,"No results found":`No se encontraron resultados`,"Drop files here":`Suelta los archivos aquí`,"Drag & drop files here":`Arrastra y suelta archivos aquí`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`o haz clic para explorar (máx. {maxFiles} archivos, {maxSize} MB cada uno)`,"Remove {name}":`Quitar {name}`,"{selected} of {total} row(s) selected.":`{selected} de {total} fila(s) seleccionada(s).`,"Try again":`Intentar de nuevo`,"What’s up next?":`¿Qué sigue?`,"Show password":`Mostrar contraseña`,"Hide password":`Ocultar contraseña`,"Search icons":`Buscar iconos`,"No icon matches":`Ningún icono coincide`,"Show all items ({n})":`Mostrar todos ({n})`,"Fewer {what}":`Menos {what}`,"More {what}":`Más {what}`,"No tasks available. Add tasks to display Gantt chart.":`No hay tareas. Añade tareas para ver el diagrama de Gantt.`,January:`Enero`,February:`Febrero`,March:`Marzo`,April:`Abril`,May:`Mayo`,June:`Junio`,July:`Julio`,August:`Agosto`,September:`Septiembre`,October:`Octubre`,November:`Noviembre`,December:`Diciembre`,Su:`do`,Mo:`lu`,Tu:`ma`,We:`mi`,Th:`ju`,Fr:`vi`,Sa:`sá`,"just now":`ahora mismo`,"in a moment":`en un momento`,"in 1 minute":`en 1 minuto`,"in {n} minutes":`en {n} minutos`,"in 1 hour":`en 1 hora`,"in {n} hours":`en {n} horas`,tomorrow:`mañana`,"in {n} days":`en {n} días`,"in 1 week":`en 1 semana`,"in {n} weeks":`en {n} semanas`,"in 1 month":`en 1 mes`,"in {n} months":`en {n} meses`,"in 1 year":`en 1 año`,"in {n} years":`en {n} años`,"1 minute ago":`hace 1 minuto`,"{n} minutes ago":`hace {n} minutos`,"1 hour ago":`hace 1 hora`,"{n} hours ago":`hace {n} horas`,"1 day ago":`hace 1 día`,"{n} days ago":`hace {n} días`,"1 week ago":`hace 1 semana`,"{n} weeks ago":`hace {n} semanas`,"1 month ago":`hace 1 mes`,"{n} months ago":`hace {n} meses`,"1 year ago":`hace 1 año`,"{n} years ago":`hace {n} años`,"Cookie notice":`Aviso de cookies`,"Cookie preferences":`Preferencias de cookies`,"Close and use essential cookies only":`Cerrar y usar solo cookies esenciales`,Back:`Atrás`,"Log in":`Iniciar sesión`,"Search Hanzo or ask AI":`Busca en Hanzo o pregunta a la IA`,"Search models":`Buscar modelos`,"Search branches…":`Buscar ramas…`,"Search repositories…":`Buscar repositorios…`,"Show options":`Mostrar opciones`,Retry:`Reintentar`,"Donut chart":`Gráfico de anillo`,"Find an organization":`Buscar una organización`,Organizations:`Organizaciones`,"Organization name":`Nombre de la organización`,"Previous page":`Página anterior`,"Next page":`Página siguiente`,"Continue with credits":`Continuar con créditos`,"Try Hanzo":`Probar Hanzo`,"Terms & Policies":`Términos y políticas`,"Who this is for":`Para quién es`,"Bill yearly":`Facturación anual`,Apps:`Aplicaciones`,"Card actions":`Acciones de la tarjeta`,"Assign to...":`Asignar a...`,"Search cards...":`Buscar tarjetas...`,"Clear search":`Borrar búsqueda`,"Open files":`Archivos abiertos`,"Close panel":`Cerrar panel`,"Add an organization":`Añadir una organización`,"Keyboard Shortcuts":`Atajos de teclado`,"Run a command":`Ejecutar un comando`,"Type shell command...":`Escribe un comando de shell...`,"Attached to the next message":`Adjunto al próximo mensaje`,"Channel Member Roster":`Miembros del canal`,"Channel Collaborative Notes":`Notas compartidas del canal`,"Code Diff Viewer":`Visor de diferencias`,"Live Voice Call":`Llamada de voz en vivo`,"MCP Server Hub":`Centro de servidores MCP`,"Multi-Agent Swarm Bar":`Barra del enjambre de agentes`,"Write shared channel notes, meeting agenda, or AI summaries...":`Escribe notas del canal, el orden del día o resúmenes de la IA...`,"Help improve our AI models":`Ayuda a mejorar nuestros modelos de IA`,"Your name":`Tu nombre`,"Your role":`Tu rol`,"Country or region":`País o región`,"Card details":`Datos de la tarjeta`,"Agree to recurring charges":`Acepto los cargos recurrentes`,"How you will use Hanzo":`Cómo usarás Hanzo`,"Team size":`Tamaño del equipo`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Acepto las Condiciones del servicio y la Política de uso aceptable y confirmo que tengo al menos 18 años.`,"Empty string":`Cadena vacía`,"Empty array":`Arreglo vacío`,"Empty object":`Objeto vacío`,"Copy {what}":`Copiar {what}`,"Ask anything":`Pregunta lo que quieras`,Auto:`Auto`,Instant:`Instantáneo`,Low:`Bajo`,Medium:`Medio`,High:`Alto`,Max:`Máximo`,Dictate:`Dictar`,"Dictating — click to stop":`Dictando — haz clic para detener`,"Dictation settings":`Ajustes de dictado`,Language:`Idioma`,"No devices found":`No se encontraron dispositivos`,"Microphone {n}":`Micrófono {n}`,"Nothing matches":`Nada coincide`,Commands:`Comandos`,"Search commands…":`Buscar comandos…`,Agents:`Agentes`,Skills:`Habilidades`,Connectors:`Conectores`,"Design system":`Sistema de diseño`,Plugins:`Complementos`,Devices:`Dispositivos`,Memory:`Memoria`,Research:`Investigación`,On:`Activado`,"Upload or add files":`Subir o añadir archivos`,"Add files, agents, skills and more":`Añade archivos, agentes, habilidades y más`,"No agents yet":`Aún no hay agentes`,"No skills yet":`Aún no hay habilidades`,"No connectors yet":`Aún no hay conectores`,"No design system yet":`Aún no hay sistema de diseño`,"No plugins yet":`Aún no hay complementos`,"No devices yet":`Aún no hay dispositivos`,"Search agents":`Buscar agentes`,"Search skills":`Buscar habilidades`,"Search connectors":`Buscar conectores`,"Search design system":`Buscar en el sistema de diseño`,"Search plugins":`Buscar complementos`,"Search devices":`Buscar dispositivos`,"Reading agents":`Leyendo agentes`,"Reading skills":`Leyendo habilidades`,"Reading connectors":`Leyendo conectores`,"Reading design system":`Leyendo el sistema de diseño`,"Reading plugins":`Leyendo complementos`,"Adaptive reasoning based on task complexity":`Razonamiento adaptativo según la complejidad de la tarea`,"Answers right away, without thinking":`Responde al instante, sin pensar`,"A quick pass with minimal thinking":`Una pasada rápida, con poco razonamiento`,"Thinks before answering":`Piensa antes de responder`,"Deep reasoning for complex problems":`Razonamiento profundo para problemas complejos`,"Maximum compute and exhaustive verification":`Cómputo máximo y verificación exhaustiva`,Effort:`Esfuerzo`,"Effort: {level}":`Esfuerzo: {level}`,Mode:`Modo`,"Mode: {mode}":`Modo: {mode}`,Model:`Modelo`,"Model: {name}":`Modelo: {name}`,"Voice mode":`Modo de voz`,"Hanzo is speaking — talk to interrupt":`Hanzo está hablando — habla para interrumpir`,"In conversation — click to hang up":`En conversación — haz clic para colgar`,"Go to testimonial {n}":`Ir al testimonio {n}`,"Go to card {n}":`Ir a la tarjeta {n}`,"{n} of {total}":`{n} de {total}`,"Reading…":`Leyendo…`,Skill:`Habilidad`,Plugin:`Complemento`},Tne={Close:`Fermer`,"Close window":`Fermer la fenêtre`,"Minimize window":`Réduire la fenêtre`,"Restore window":`Restaurer la fenêtre`,"Maximize window":`Agrandir la fenêtre`,Resize:`Redimensionner`,"Select all":`Tout sélectionner`,"Select row":`Sélectionner la ligne`,"Previous month":`Mois précédent`,"Next month":`Mois suivant`,Dismiss:`Ignorer`,Breadcrumb:`Fil d’Ariane`,Cards:`Cartes`,"Copy code":`Copier le code`,Copied:`Copié`,"Copied!":`Copié !`,Copy:`Copier`,"Previous slide":`Diapositive précédente`,"Next slide":`Diapositive suivante`,"Previous card":`Carte précédente`,"Next card":`Carte suivante`,"Zoom out":`Zoom arrière`,"Zoom in":`Zoom avant`,Rotate:`Pivoter`,Filter:`Filtrer`,"Expand all":`Tout développer`,"Collapse all":`Tout réduire`,"Search...":`Rechercher...`,"Pick a date":`Choisir une date`,Select:`Sélectionner`,"Start typing...":`Commencez à écrire...`,Search:`Rechercher`,Decrease:`Diminuer`,Increase:`Augmenter`,pagination:`pagination`,"Go to previous page":`Aller à la page précédente`,"Go to next page":`Aller à la page suivante`,Previous:`Précédent`,Next:`Suivant`,"More pages":`Plus de pages`,Remove:`Retirer`,"Go back":`Retour`,"Go forward":`Avancer`,"Reload page":`Recharger la page`,Share:`Partager`,"New tab":`Nouvel onglet`,Menu:`Menu`,"Copy command":`Copier la commande`,"Terminal input":`Saisie du terminal`,Seek:`Position de lecture`,"Rewind 10 seconds":`Reculer de 10 secondes`,"Forward 10 seconds":`Avancer de 10 secondes`,Volume:`Volume`,"Toggle captions":`Afficher ou masquer les sous-titres`,"Playback speed":`Vitesse de lecture`,Quality:`Qualité`,"Picture in picture":`Image dans l’image`,Play:`Lecture`,Pause:`Pause`,Mute:`Couper le son`,Unmute:`Réactiver le son`,"Exit fullscreen":`Quitter le plein écran`,"Enter fullscreen":`Plein écran`,Expand:`Développer`,Collapse:`Réduire`,"Copy reply":`Copier la réponse`,"Good result":`Bon résultat`,"Bad result":`Mauvais résultat`,"Dialog Close":`Fermer la boîte de dialogue`,Notifications:`Notifications`,Account:`Compte`,Cart:`Panier`,Call:`Appel`,"Video call":`Appel vidéo`,Message:`Message`,Main:`Principal`,Columns:`Colonnes`,"No results.":`Aucun résultat.`,"No results":`Aucun résultat`,"No results found":`Aucun résultat trouvé`,"Drop files here":`Déposez les fichiers ici`,"Drag & drop files here":`Glissez-déposez des fichiers ici`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`ou cliquez pour parcourir ({maxFiles} fichiers max., {maxSize} Mo chacun)`,"Remove {name}":`Retirer {name}`,"{selected} of {total} row(s) selected.":`{selected} sur {total} ligne(s) sélectionnée(s).`,"Try again":`Réessayer`,"What’s up next?":`Et ensuite ?`,"Show password":`Afficher le mot de passe`,"Hide password":`Masquer le mot de passe`,"Search icons":`Rechercher des icônes`,"No icon matches":`Aucune icône ne correspond`,"Show all items ({n})":`Tout afficher ({n})`,"Fewer {what}":`Moins de {what}`,"More {what}":`Plus de {what}`,"No tasks available. Add tasks to display Gantt chart.":`Aucune tâche. Ajoutez-en pour afficher le diagramme de Gantt.`,January:`janvier`,February:`février`,March:`mars`,April:`avril`,May:`mai`,June:`juin`,July:`juillet`,August:`août`,September:`septembre`,October:`octobre`,November:`novembre`,December:`décembre`,Su:`di`,Mo:`lu`,Tu:`ma`,We:`me`,Th:`je`,Fr:`ve`,Sa:`sa`,"just now":`à l’instant`,"in a moment":`dans un instant`,"in 1 minute":`dans 1 minute`,"in {n} minutes":`dans {n} minutes`,"in 1 hour":`dans 1 heure`,"in {n} hours":`dans {n} heures`,tomorrow:`demain`,"in {n} days":`dans {n} jours`,"in 1 week":`dans 1 semaine`,"in {n} weeks":`dans {n} semaines`,"in 1 month":`dans 1 mois`,"in {n} months":`dans {n} mois`,"in 1 year":`dans 1 an`,"in {n} years":`dans {n} ans`,"1 minute ago":`il y a 1 minute`,"{n} minutes ago":`il y a {n} minutes`,"1 hour ago":`il y a 1 heure`,"{n} hours ago":`il y a {n} heures`,"1 day ago":`il y a 1 jour`,"{n} days ago":`il y a {n} jours`,"1 week ago":`il y a 1 semaine`,"{n} weeks ago":`il y a {n} semaines`,"1 month ago":`il y a 1 mois`,"{n} months ago":`il y a {n} mois`,"1 year ago":`il y a 1 an`,"{n} years ago":`il y a {n} ans`,"Cookie notice":`Avis sur les cookies`,"Cookie preferences":`Préférences de cookies`,"Close and use essential cookies only":`Fermer et n’utiliser que les cookies essentiels`,Back:`Retour`,"Log in":`Se connecter`,"Search Hanzo or ask AI":`Rechercher dans Hanzo ou demander à l’IA`,"Search models":`Rechercher des modèles`,"Search branches…":`Rechercher des branches…`,"Search repositories…":`Rechercher des dépôts…`,"Show options":`Afficher les options`,Retry:`Réessayer`,"Donut chart":`Graphique en anneau`,"Find an organization":`Trouver une organisation`,Organizations:`Organisations`,"Organization name":`Nom de l’organisation`,"Previous page":`Page précédente`,"Next page":`Page suivante`,"Continue with credits":`Continuer avec des crédits`,"Try Hanzo":`Essayer Hanzo`,"Terms & Policies":`Conditions et politiques`,"Who this is for":`À qui cela s’adresse`,"Bill yearly":`Facturation annuelle`,Apps:`Applications`,"Card actions":`Actions de la carte`,"Assign to...":`Attribuer à...`,"Search cards...":`Rechercher des cartes...`,"Clear search":`Effacer la recherche`,"Open files":`Fichiers ouverts`,"Close panel":`Fermer le panneau`,"Add an organization":`Ajouter une organisation`,"Keyboard Shortcuts":`Raccourcis clavier`,"Run a command":`Exécuter une commande`,"Type shell command...":`Saisissez une commande shell...`,"Attached to the next message":`Joint au prochain message`,"Channel Member Roster":`Membres du canal`,"Channel Collaborative Notes":`Notes collaboratives du canal`,"Code Diff Viewer":`Visionneuse de diff`,"Live Voice Call":`Appel vocal en direct`,"MCP Server Hub":`Hub des serveurs MCP`,"Multi-Agent Swarm Bar":`Barre d’essaim multi-agents`,"Write shared channel notes, meeting agenda, or AI summaries...":`Écrivez des notes partagées, l’ordre du jour ou des résumés de l’IA...`,"Help improve our AI models":`Aidez à améliorer nos modèles d’IA`,"Your name":`Votre nom`,"Your role":`Votre rôle`,"Country or region":`Pays ou région`,"Card details":`Coordonnées de la carte`,"Agree to recurring charges":`J’accepte les prélèvements récurrents`,"How you will use Hanzo":`Comment vous utiliserez Hanzo`,"Team size":`Taille de l’équipe`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`J’accepte les Conditions d’utilisation et la Politique d’usage acceptable et je confirme avoir au moins 18 ans.`,"Empty string":`Chaîne vide`,"Empty array":`Tableau vide`,"Empty object":`Objet vide`,"Copy {what}":`Copier {what}`,"Ask anything":`Demandez n’importe quoi`,Auto:`Auto`,Instant:`Instantané`,Low:`Faible`,Medium:`Moyen`,High:`Élevé`,Max:`Max`,Dictate:`Dicter`,"Dictating — click to stop":`Dictée en cours — cliquez pour arrêter`,"Dictation settings":`Réglages de la dictée`,Language:`Langue`,"No devices found":`Aucun appareil trouvé`,"Microphone {n}":`Microphone {n}`,"Nothing matches":`Aucun résultat`,Commands:`Commandes`,"Search commands…":`Rechercher des commandes…`,Agents:`Agents`,Skills:`Compétences`,Connectors:`Connecteurs`,"Design system":`Système de design`,Plugins:`Plugins`,Devices:`Appareils`,Memory:`Mémoire`,Research:`Recherche`,On:`Activé`,"Upload or add files":`Téléverser ou ajouter des fichiers`,"Add files, agents, skills and more":`Ajoutez des fichiers, des agents, des compétences et plus`,"No agents yet":`Pas encore d’agents`,"No skills yet":`Pas encore de compétences`,"No connectors yet":`Pas encore de connecteurs`,"No design system yet":`Pas encore de système de design`,"No plugins yet":`Pas encore de plugins`,"No devices yet":`Pas encore d’appareils`,"Search agents":`Rechercher des agents`,"Search skills":`Rechercher des compétences`,"Search connectors":`Rechercher des connecteurs`,"Search design system":`Rechercher dans le système de design`,"Search plugins":`Rechercher des plugins`,"Search devices":`Rechercher des appareils`,"Reading agents":`Lecture des agents`,"Reading skills":`Lecture des compétences`,"Reading connectors":`Lecture des connecteurs`,"Reading design system":`Lecture du système de design`,"Reading plugins":`Lecture des plugins`,"Adaptive reasoning based on task complexity":`Raisonnement adaptatif selon la complexité de la tâche`,"Answers right away, without thinking":`Répond immédiatement, sans réfléchir`,"A quick pass with minimal thinking":`Un passage rapide, avec peu de réflexion`,"Thinks before answering":`Réfléchit avant de répondre`,"Deep reasoning for complex problems":`Raisonnement approfondi pour les problèmes complexes`,"Maximum compute and exhaustive verification":`Calcul maximal et vérification exhaustive`,Effort:`Effort`,"Effort: {level}":`Effort : {level}`,Mode:`Mode`,"Mode: {mode}":`Mode : {mode}`,Model:`Modèle`,"Model: {name}":`Modèle : {name}`,"Voice mode":`Mode vocal`,"Hanzo is speaking — talk to interrupt":`Hanzo parle — parlez pour interrompre`,"In conversation — click to hang up":`En conversation — cliquez pour raccrocher`,"Go to testimonial {n}":`Aller au témoignage {n}`,"Go to card {n}":`Aller à la carte {n}`,"{n} of {total}":`{n} sur {total}`,"Reading…":`Lecture…`,Skill:`Compétence`,Plugin:`Plugin`},Ene={Close:`बंद करें`,"Close window":`विंडो बंद करें`,"Minimize window":`विंडो छोटा करें`,"Restore window":`विंडो पुनर्स्थापित करें`,"Maximize window":`विंडो बड़ा करें`,Resize:`आकार बदलें`,"Select all":`सभी चुनें`,"Select row":`पंक्ति चुनें`,"Previous month":`पिछला महीना`,"Next month":`अगला महीना`,Dismiss:`खारिज करें`,Breadcrumb:`ब्रेडक्रम्ब`,Cards:`कार्ड`,"Copy code":`कोड कॉपी करें`,Copied:`कॉपी हो गया`,"Copied!":`कॉपी हो गया!`,Copy:`कॉपी करें`,"Previous slide":`पिछली स्लाइड`,"Next slide":`अगली स्लाइड`,"Previous card":`पिछला कार्ड`,"Next card":`अगला कार्ड`,"Zoom out":`ज़ूम आउट`,"Zoom in":`ज़ूम इन`,Rotate:`घुमाएँ`,Filter:`फ़िल्टर`,"Expand all":`सभी विस्तृत करें`,"Collapse all":`सभी समेटें`,"Search...":`खोजें...`,"Pick a date":`तारीख चुनें`,Select:`चुनें`,"Start typing...":`लिखना शुरू करें...`,Search:`खोजें`,Decrease:`घटाएँ`,Increase:`बढ़ाएँ`,pagination:`पृष्ठांकन`,"Go to previous page":`पिछले पृष्ठ पर जाएँ`,"Go to next page":`अगले पृष्ठ पर जाएँ`,Previous:`पिछला`,Next:`अगला`,"More pages":`और पृष्ठ`,Remove:`हटाएँ`,"Go back":`वापस जाएँ`,"Go forward":`आगे जाएँ`,"Reload page":`पृष्ठ पुनः लोड करें`,Share:`साझा करें`,"New tab":`नया टैब`,Menu:`मेनू`,"Copy command":`कमांड कॉपी करें`,"Terminal input":`टर्मिनल इनपुट`,Seek:`स्थिति`,"Rewind 10 seconds":`10 सेकंड पीछे`,"Forward 10 seconds":`10 सेकंड आगे`,Volume:`आवाज़`,"Toggle captions":`कैप्शन टॉगल करें`,"Playback speed":`प्लेबैक गति`,Quality:`गुणवत्ता`,"Picture in picture":`पिक्चर इन पिक्चर`,Play:`चलाएँ`,Pause:`रोकें`,Mute:`म्यूट`,Unmute:`अनम्यूट`,"Exit fullscreen":`पूर्ण स्क्रीन से बाहर`,"Enter fullscreen":`पूर्ण स्क्रीन`,Expand:`विस्तृत करें`,Collapse:`समेटें`,"Copy reply":`जवाब कॉपी करें`,"Good result":`अच्छा परिणाम`,"Bad result":`खराब परिणाम`,"Dialog Close":`संवाद बंद करें`,Notifications:`सूचनाएँ`,Account:`खाता`,Cart:`कार्ट`,Call:`कॉल`,"Video call":`वीडियो कॉल`,Message:`संदेश`,Main:`मुख्य`,Columns:`कॉलम`,"No results.":`कोई परिणाम नहीं।`,"No results":`कोई परिणाम नहीं`,"No results found":`कोई परिणाम नहीं मिला`,"Drop files here":`फ़ाइलें यहाँ छोड़ें`,"Drag & drop files here":`फ़ाइलें खींचकर यहाँ छोड़ें`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`या ब्राउज़ करने के लिए क्लिक करें (अधिकतम {maxFiles} फ़ाइलें, प्रत्येक {maxSize} MB)`,"Remove {name}":`{name} हटाएँ`,"{selected} of {total} row(s) selected.":`{total} में से {selected} पंक्तियाँ चुनी गईं।`,"Try again":`फिर कोशिश करें`,"What’s up next?":`आगे क्या है?`,"Show password":`पासवर्ड दिखाएँ`,"Hide password":`पासवर्ड छिपाएँ`,"Search icons":`आइकन खोजें`,"No icon matches":`कोई आइकन मेल नहीं खाता`,"Show all items ({n})":`सभी दिखाएँ ({n})`,"Fewer {what}":`कम {what}`,"More {what}":`अधिक {what}`,"No tasks available. Add tasks to display Gantt chart.":`कोई कार्य नहीं। गैंट चार्ट के लिए कार्य जोड़ें।`,January:`जनवरी`,February:`फ़रवरी`,March:`मार्च`,April:`अप्रैल`,May:`मई`,June:`जून`,July:`जुलाई`,August:`अगस्त`,September:`सितंबर`,October:`अक्टूबर`,November:`नवंबर`,December:`दिसंबर`,Su:`र`,Mo:`सो`,Tu:`मं`,We:`बु`,Th:`गु`,Fr:`शु`,Sa:`श`,"just now":`अभी`,"in a moment":`थोड़ी देर में`,"in 1 minute":`1 मिनट में`,"in {n} minutes":`{n} मिनट में`,"in 1 hour":`1 घंटे में`,"in {n} hours":`{n} घंटे में`,tomorrow:`कल`,"in {n} days":`{n} दिन में`,"in 1 week":`1 हफ़्ते में`,"in {n} weeks":`{n} हफ़्ते में`,"in 1 month":`1 महीने में`,"in {n} months":`{n} महीने में`,"in 1 year":`1 साल में`,"in {n} years":`{n} साल में`,"1 minute ago":`1 मिनट पहले`,"{n} minutes ago":`{n} मिनट पहले`,"1 hour ago":`1 घंटे पहले`,"{n} hours ago":`{n} घंटे पहले`,"1 day ago":`1 दिन पहले`,"{n} days ago":`{n} दिन पहले`,"1 week ago":`1 हफ़्ते पहले`,"{n} weeks ago":`{n} हफ़्ते पहले`,"1 month ago":`1 महीने पहले`,"{n} months ago":`{n} महीने पहले`,"1 year ago":`1 साल पहले`,"{n} years ago":`{n} साल पहले`,"Cookie notice":`कुकी सूचना`,"Cookie preferences":`कुकी प्राथमिकताएँ`,"Close and use essential cookies only":`बंद करें और केवल आवश्यक कुकीज़ का उपयोग करें`,Back:`वापस`,"Log in":`लॉग इन`,"Search Hanzo or ask AI":`Hanzo में खोजें या AI से पूछें`,"Search models":`मॉडल खोजें`,"Search branches…":`ब्रांच खोजें…`,"Search repositories…":`रिपॉज़िटरी खोजें…`,"Show options":`विकल्प दिखाएँ`,Retry:`फिर से कोशिश करें`,"Donut chart":`डोनट चार्ट`,"Find an organization":`संगठन खोजें`,Organizations:`संगठन`,"Organization name":`संगठन का नाम`,"Previous page":`पिछला पृष्ठ`,"Next page":`अगला पृष्ठ`,"Continue with credits":`क्रेडिट से जारी रखें`,"Try Hanzo":`Hanzo आज़माएँ`,"Terms & Policies":`नियम और नीतियाँ`,"Who this is for":`यह किसके लिए है`,"Bill yearly":`वार्षिक बिल`,Apps:`ऐप्स`,"Card actions":`कार्ड क्रियाएँ`,"Assign to...":`इसे असाइन करें...`,"Search cards...":`कार्ड खोजें...`,"Clear search":`खोज साफ़ करें`,"Open files":`खुली फ़ाइलें`,"Close panel":`पैनल बंद करें`,"Add an organization":`संगठन जोड़ें`,"Keyboard Shortcuts":`कीबोर्ड शॉर्टकट`,"Run a command":`कमांड चलाएँ`,"Type shell command...":`शेल कमांड लिखें...`,"Attached to the next message":`अगले संदेश से जुड़ा`,"Channel Member Roster":`चैनल सदस्य`,"Channel Collaborative Notes":`चैनल के साझा नोट`,"Code Diff Viewer":`कोड डिफ़ व्यूअर`,"Live Voice Call":`लाइव वॉइस कॉल`,"MCP Server Hub":`MCP सर्वर हब`,"Multi-Agent Swarm Bar":`मल्टी-एजेंट स्वार्म बार`,"Write shared channel notes, meeting agenda, or AI summaries...":`चैनल नोट, एजेंडा या AI सार लिखें...`,"Help improve our AI models":`हमारे AI मॉडल बेहतर बनाने में मदद करें`,"Your name":`आपका नाम`,"Your role":`आपकी भूमिका`,"Country or region":`देश या क्षेत्र`,"Card details":`कार्ड विवरण`,"Agree to recurring charges":`आवर्ती शुल्क से सहमत हूँ`,"How you will use Hanzo":`आप Hanzo का उपयोग कैसे करेंगे`,"Team size":`टीम का आकार`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`मैं सेवा की शर्तों और स्वीकार्य उपयोग नीति से सहमत हूँ और पुष्टि करता हूँ कि मेरी आयु कम से कम 18 वर्ष है।`,"Empty string":`खाली स्ट्रिंग`,"Empty array":`खाली ऐरे`,"Empty object":`खाली ऑब्जेक्ट`,"Copy {what}":`{what} कॉपी करें`,"Ask anything":`कुछ भी पूछें`,Auto:`ऑटो`,Instant:`तुरंत`,Low:`कम`,Medium:`मध्यम`,High:`उच्च`,Max:`अधिकतम`,Dictate:`डिक्टेट`,"Dictating — click to stop":`डिक्टेशन चालू है — रोकने के लिए क्लिक करें`,"Dictation settings":`डिक्टेशन सेटिंग`,Language:`भाषा`,"No devices found":`कोई डिवाइस नहीं मिला`,"Microphone {n}":`माइक्रोफ़ोन {n}`,"Nothing matches":`कुछ मेल नहीं खाता`,Commands:`कमांड`,"Search commands…":`कमांड खोजें…`,Agents:`एजेंट`,Skills:`कौशल`,Connectors:`कनेक्टर`,"Design system":`डिज़ाइन सिस्टम`,Plugins:`प्लगइन`,Devices:`डिवाइस`,Memory:`मेमोरी`,Research:`रिसर्च`,On:`चालू`,"Upload or add files":`फ़ाइलें अपलोड या जोड़ें`,"Add files, agents, skills and more":`फ़ाइलें, एजेंट, कौशल और अधिक जोड़ें`,"No agents yet":`अभी कोई एजेंट नहीं`,"No skills yet":`अभी कोई कौशल नहीं`,"No connectors yet":`अभी कोई कनेक्टर नहीं`,"No design system yet":`अभी कोई डिज़ाइन सिस्टम नहीं`,"No plugins yet":`अभी कोई प्लगइन नहीं`,"No devices yet":`अभी कोई डिवाइस नहीं`,"Search agents":`एजेंट खोजें`,"Search skills":`कौशल खोजें`,"Search connectors":`कनेक्टर खोजें`,"Search design system":`डिज़ाइन सिस्टम खोजें`,"Search plugins":`प्लगइन खोजें`,"Search devices":`डिवाइस खोजें`,"Reading agents":`एजेंट पढ़े जा रहे हैं`,"Reading skills":`कौशल पढ़े जा रहे हैं`,"Reading connectors":`कनेक्टर पढ़े जा रहे हैं`,"Reading design system":`डिज़ाइन सिस्टम पढ़ा जा रहा है`,"Reading plugins":`प्लगइन पढ़े जा रहे हैं`,"Adaptive reasoning based on task complexity":`कार्य की जटिलता के अनुसार अनुकूल तर्क`,"Answers right away, without thinking":`बिना सोचे तुरंत जवाब देता है`,"A quick pass with minimal thinking":`कम सोच के साथ एक त्वरित पास`,"Thinks before answering":`जवाब से पहले सोचता है`,"Deep reasoning for complex problems":`जटिल समस्याओं के लिए गहरा तर्क`,"Maximum compute and exhaustive verification":`अधिकतम कंप्यूट और पूरी जाँच`,Effort:`प्रयास`,"Effort: {level}":`प्रयास: {level}`,Mode:`मोड`,"Mode: {mode}":`मोड: {mode}`,Model:`मॉडल`,"Model: {name}":`मॉडल: {name}`,"Voice mode":`वॉइस मोड`,"Hanzo is speaking — talk to interrupt":`Hanzo बोल रहा है — बीच में बोलें`,"In conversation — click to hang up":`बातचीत में — काटने के लिए क्लिक करें`,"Go to testimonial {n}":`प्रशंसापत्र {n} पर जाएँ`,"Go to card {n}":`कार्ड {n} पर जाएँ`,"{n} of {total}":`{n} / {total}`,"Reading…":`पढ़ा जा रहा है…`,Skill:`कौशल`,Plugin:`प्लगइन`},Dne={Close:`Tutup`,"Close window":`Tutup jendela`,"Minimize window":`Minimalkan jendela`,"Restore window":`Pulihkan jendela`,"Maximize window":`Maksimalkan jendela`,Resize:`Ubah ukuran`,"Select all":`Pilih semua`,"Select row":`Pilih baris`,"Previous month":`Bulan sebelumnya`,"Next month":`Bulan berikutnya`,Dismiss:`Tutup`,Breadcrumb:`Jejak navigasi`,Cards:`Kartu`,"Copy code":`Salin kode`,Copied:`Disalin`,"Copied!":`Disalin!`,Copy:`Salin`,"Previous slide":`Slide sebelumnya`,"Next slide":`Slide berikutnya`,"Previous card":`Kartu sebelumnya`,"Next card":`Kartu berikutnya`,"Zoom out":`Perkecil`,"Zoom in":`Perbesar`,Rotate:`Putar`,Filter:`Filter`,"Expand all":`Bentangkan semua`,"Collapse all":`Ciutkan semua`,"Search...":`Cari...`,"Pick a date":`Pilih tanggal`,Select:`Pilih`,"Start typing...":`Mulai mengetik...`,Search:`Cari`,Decrease:`Kurangi`,Increase:`Tambah`,pagination:`paginasi`,"Go to previous page":`Ke halaman sebelumnya`,"Go to next page":`Ke halaman berikutnya`,Previous:`Sebelumnya`,Next:`Berikutnya`,"More pages":`Halaman lainnya`,Remove:`Hapus`,"Go back":`Kembali`,"Go forward":`Maju`,"Reload page":`Muat ulang halaman`,Share:`Bagikan`,"New tab":`Tab baru`,Menu:`Menu`,"Copy command":`Salin perintah`,"Terminal input":`Masukan terminal`,Seek:`Geser`,"Rewind 10 seconds":`Mundur 10 detik`,"Forward 10 seconds":`Maju 10 detik`,Volume:`Volume`,"Toggle captions":`Alihkan takarir`,"Playback speed":`Kecepatan pemutaran`,Quality:`Kualitas`,"Picture in picture":`Gambar dalam gambar`,Play:`Putar`,Pause:`Jeda`,Mute:`Bisukan`,Unmute:`Nyalakan suara`,"Exit fullscreen":`Keluar dari layar penuh`,"Enter fullscreen":`Layar penuh`,Expand:`Bentangkan`,Collapse:`Ciutkan`,"Copy reply":`Salin balasan`,"Good result":`Hasil baik`,"Bad result":`Hasil buruk`,"Dialog Close":`Tutup dialog`,Notifications:`Notifikasi`,Account:`Akun`,Cart:`Keranjang`,Call:`Panggilan`,"Video call":`Panggilan video`,Message:`Pesan`,Main:`Utama`,Columns:`Kolom`,"No results.":`Tidak ada hasil.`,"No results":`Tidak ada hasil`,"No results found":`Tidak ada hasil yang ditemukan`,"Drop files here":`Letakkan file di sini`,"Drag & drop files here":`Seret dan lepas file di sini`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`atau klik untuk menelusuri (maks. {maxFiles} file, masing-masing {maxSize} MB)`,"Remove {name}":`Hapus {name}`,"{selected} of {total} row(s) selected.":`{selected} dari {total} baris dipilih.`,"Try again":`Coba lagi`,"What’s up next?":`Selanjutnya apa?`,"Show password":`Tampilkan kata sandi`,"Hide password":`Sembunyikan kata sandi`,"Search icons":`Cari ikon`,"No icon matches":`Tidak ada ikon yang cocok`,"Show all items ({n})":`Tampilkan semua ({n})`,"Fewer {what}":`Lebih sedikit {what}`,"More {what}":`Lebih banyak {what}`,"No tasks available. Add tasks to display Gantt chart.":`Tidak ada tugas. Tambahkan tugas untuk menampilkan bagan Gantt.`,January:`Januari`,February:`Februari`,March:`Maret`,April:`April`,May:`Mei`,June:`Juni`,July:`Juli`,August:`Agustus`,September:`September`,October:`Oktober`,November:`November`,December:`Desember`,Su:`Mg`,Mo:`Sn`,Tu:`Sl`,We:`Rb`,Th:`Km`,Fr:`Jm`,Sa:`Sb`,"just now":`baru saja`,"in a moment":`sebentar lagi`,"in 1 minute":`dalam 1 menit`,"in {n} minutes":`dalam {n} menit`,"in 1 hour":`dalam 1 jam`,"in {n} hours":`dalam {n} jam`,tomorrow:`besok`,"in {n} days":`dalam {n} hari`,"in 1 week":`dalam 1 minggu`,"in {n} weeks":`dalam {n} minggu`,"in 1 month":`dalam 1 bulan`,"in {n} months":`dalam {n} bulan`,"in 1 year":`dalam 1 tahun`,"in {n} years":`dalam {n} tahun`,"1 minute ago":`1 menit yang lalu`,"{n} minutes ago":`{n} menit yang lalu`,"1 hour ago":`1 jam yang lalu`,"{n} hours ago":`{n} jam yang lalu`,"1 day ago":`1 hari yang lalu`,"{n} days ago":`{n} hari yang lalu`,"1 week ago":`1 minggu yang lalu`,"{n} weeks ago":`{n} minggu yang lalu`,"1 month ago":`1 bulan yang lalu`,"{n} months ago":`{n} bulan yang lalu`,"1 year ago":`1 tahun yang lalu`,"{n} years ago":`{n} tahun yang lalu`,"Cookie notice":`Pemberitahuan cookie`,"Cookie preferences":`Preferensi cookie`,"Close and use essential cookies only":`Tutup dan gunakan cookie penting saja`,Back:`Kembali`,"Log in":`Masuk`,"Search Hanzo or ask AI":`Cari di Hanzo atau tanya AI`,"Search models":`Cari model`,"Search branches…":`Cari cabang…`,"Search repositories…":`Cari repositori…`,"Show options":`Tampilkan opsi`,Retry:`Coba lagi`,"Donut chart":`Diagram donat`,"Find an organization":`Cari organisasi`,Organizations:`Organisasi`,"Organization name":`Nama organisasi`,"Previous page":`Halaman sebelumnya`,"Next page":`Halaman berikutnya`,"Continue with credits":`Lanjutkan dengan kredit`,"Try Hanzo":`Coba Hanzo`,"Terms & Policies":`Syarat dan kebijakan`,"Who this is for":`Untuk siapa`,"Bill yearly":`Tagihan tahunan`,Apps:`Aplikasi`,"Card actions":`Tindakan kartu`,"Assign to...":`Tetapkan ke...`,"Search cards...":`Cari kartu...`,"Clear search":`Hapus pencarian`,"Open files":`File terbuka`,"Close panel":`Tutup panel`,"Add an organization":`Tambah organisasi`,"Keyboard Shortcuts":`Pintasan keyboard`,"Run a command":`Jalankan perintah`,"Type shell command...":`Ketik perintah shell...`,"Attached to the next message":`Dilampirkan ke pesan berikutnya`,"Channel Member Roster":`Anggota kanal`,"Channel Collaborative Notes":`Catatan kolaboratif kanal`,"Code Diff Viewer":`Penampil diff kode`,"Live Voice Call":`Panggilan suara langsung`,"MCP Server Hub":`Hub server MCP`,"Multi-Agent Swarm Bar":`Bilah kawanan agen`,"Write shared channel notes, meeting agenda, or AI summaries...":`Tulis catatan kanal, agenda, atau ringkasan AI...`,"Help improve our AI models":`Bantu tingkatkan model AI kami`,"Your name":`Nama Anda`,"Your role":`Peran Anda`,"Country or region":`Negara atau wilayah`,"Card details":`Detail kartu`,"Agree to recurring charges":`Setuju dengan tagihan berulang`,"How you will use Hanzo":`Cara Anda memakai Hanzo`,"Team size":`Ukuran tim`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Saya menyetujui Ketentuan Layanan dan Kebijakan Penggunaan yang Dapat Diterima serta menyatakan berusia minimal 18 tahun.`,"Empty string":`String kosong`,"Empty array":`Array kosong`,"Empty object":`Objek kosong`,"Copy {what}":`Salin {what}`,"Ask anything":`Tanyakan apa saja`,Auto:`Otomatis`,Instant:`Instan`,Low:`Rendah`,Medium:`Sedang`,High:`Tinggi`,Max:`Maks`,Dictate:`Dikte`,"Dictating — click to stop":`Sedang mendikte — klik untuk berhenti`,"Dictation settings":`Pengaturan dikte`,Language:`Bahasa`,"No devices found":`Tidak ada perangkat`,"Microphone {n}":`Mikrofon {n}`,"Nothing matches":`Tidak ada yang cocok`,Commands:`Perintah`,"Search commands…":`Cari perintah…`,Agents:`Agen`,Skills:`Keterampilan`,Connectors:`Konektor`,"Design system":`Sistem desain`,Plugins:`Plugin`,Devices:`Perangkat`,Memory:`Memori`,Research:`Riset`,On:`Nyala`,"Upload or add files":`Unggah atau tambah file`,"Add files, agents, skills and more":`Tambah file, agen, keterampilan, dan lainnya`,"No agents yet":`Belum ada agen`,"No skills yet":`Belum ada keterampilan`,"No connectors yet":`Belum ada konektor`,"No design system yet":`Belum ada sistem desain`,"No plugins yet":`Belum ada plugin`,"No devices yet":`Belum ada perangkat`,"Search agents":`Cari agen`,"Search skills":`Cari keterampilan`,"Search connectors":`Cari konektor`,"Search design system":`Cari sistem desain`,"Search plugins":`Cari plugin`,"Search devices":`Cari perangkat`,"Reading agents":`Membaca agen`,"Reading skills":`Membaca keterampilan`,"Reading connectors":`Membaca konektor`,"Reading design system":`Membaca sistem desain`,"Reading plugins":`Membaca plugin`,"Adaptive reasoning based on task complexity":`Penalaran adaptif sesuai kompleksitas tugas`,"Answers right away, without thinking":`Langsung menjawab, tanpa berpikir`,"A quick pass with minimal thinking":`Lewatan cepat dengan sedikit penalaran`,"Thinks before answering":`Berpikir sebelum menjawab`,"Deep reasoning for complex problems":`Penalaran mendalam untuk masalah kompleks`,"Maximum compute and exhaustive verification":`Komputasi maksimum dan verifikasi menyeluruh`,Effort:`Upaya`,"Effort: {level}":`Upaya: {level}`,Mode:`Mode`,"Mode: {mode}":`Mode: {mode}`,Model:`Model`,"Model: {name}":`Model: {name}`,"Voice mode":`Mode suara`,"Hanzo is speaking — talk to interrupt":`Hanzo sedang berbicara — bicara untuk menyela`,"In conversation — click to hang up":`Sedang berbicara — klik untuk menutup`,"Go to testimonial {n}":`Ke testimoni {n}`,"Go to card {n}":`Ke kartu {n}`,"{n} of {total}":`{n} dari {total}`,"Reading…":`Membaca…`,Skill:`Keterampilan`,Plugin:`Plugin`},One={Close:`Chiudi`,"Close window":`Chiudi finestra`,"Minimize window":`Riduci a icona`,"Restore window":`Ripristina finestra`,"Maximize window":`Ingrandisci finestra`,Resize:`Ridimensiona`,"Select all":`Seleziona tutto`,"Select row":`Seleziona riga`,"Previous month":`Mese precedente`,"Next month":`Mese successivo`,Dismiss:`Chiudi`,Breadcrumb:`Percorso di navigazione`,Cards:`Schede`,"Copy code":`Copia codice`,Copied:`Copiato`,"Copied!":`Copiato!`,Copy:`Copia`,"Previous slide":`Diapositiva precedente`,"Next slide":`Diapositiva successiva`,"Previous card":`Scheda precedente`,"Next card":`Scheda successiva`,"Zoom out":`Riduci zoom`,"Zoom in":`Aumenta zoom`,Rotate:`Ruota`,Filter:`Filtra`,"Expand all":`Espandi tutto`,"Collapse all":`Comprimi tutto`,"Search...":`Cerca...`,"Pick a date":`Scegli una data`,Select:`Seleziona`,"Start typing...":`Inizia a scrivere...`,Search:`Cerca`,Decrease:`Diminuisci`,Increase:`Aumenta`,pagination:`paginazione`,"Go to previous page":`Vai alla pagina precedente`,"Go to next page":`Vai alla pagina successiva`,Previous:`Precedente`,Next:`Successivo`,"More pages":`Altre pagine`,Remove:`Rimuovi`,"Go back":`Indietro`,"Go forward":`Avanti`,"Reload page":`Ricarica pagina`,Share:`Condividi`,"New tab":`Nuova scheda`,Menu:`Menu`,"Copy command":`Copia comando`,"Terminal input":`Input del terminale`,Seek:`Posizione`,"Rewind 10 seconds":`Indietro di 10 secondi`,"Forward 10 seconds":`Avanti di 10 secondi`,Volume:`Volume`,"Toggle captions":`Attiva o disattiva i sottotitoli`,"Playback speed":`Velocità di riproduzione`,Quality:`Qualità`,"Picture in picture":`Picture in picture`,Play:`Riproduci`,Pause:`Pausa`,Mute:`Disattiva audio`,Unmute:`Attiva audio`,"Exit fullscreen":`Esci da schermo intero`,"Enter fullscreen":`Schermo intero`,Expand:`Espandi`,Collapse:`Comprimi`,"Copy reply":`Copia risposta`,"Good result":`Buon risultato`,"Bad result":`Risultato scarso`,"Dialog Close":`Chiudi finestra di dialogo`,Notifications:`Notifiche`,Account:`Account`,Cart:`Carrello`,Call:`Chiamata`,"Video call":`Videochiamata`,Message:`Messaggio`,Main:`Principale`,Columns:`Colonne`,"No results.":`Nessun risultato.`,"No results":`Nessun risultato`,"No results found":`Nessun risultato trovato`,"Drop files here":`Rilascia i file qui`,"Drag & drop files here":`Trascina i file qui`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`oppure fai clic per sfogliare (max {maxFiles} file, {maxSize} MB ciascuno)`,"Remove {name}":`Rimuovi {name}`,"{selected} of {total} row(s) selected.":`{selected} di {total} riga/righe selezionata/e.`,"Try again":`Riprova`,"What’s up next?":`Che cosa c’è dopo?`,"Show password":`Mostra password`,"Hide password":`Nascondi password`,"Search icons":`Cerca icone`,"No icon matches":`Nessuna icona corrisponde`,"Show all items ({n})":`Mostra tutti ({n})`,"Fewer {what}":`Meno {what}`,"More {what}":`Più {what}`,"No tasks available. Add tasks to display Gantt chart.":`Nessuna attività. Aggiungine per mostrare il diagramma di Gantt.`,January:`gennaio`,February:`febbraio`,March:`marzo`,April:`aprile`,May:`maggio`,June:`giugno`,July:`luglio`,August:`agosto`,September:`settembre`,October:`ottobre`,November:`novembre`,December:`dicembre`,Su:`do`,Mo:`lu`,Tu:`ma`,We:`me`,Th:`gi`,Fr:`ve`,Sa:`sa`,"just now":`proprio ora`,"in a moment":`tra un attimo`,"in 1 minute":`tra 1 minuto`,"in {n} minutes":`tra {n} minuti`,"in 1 hour":`tra 1 ora`,"in {n} hours":`tra {n} ore`,tomorrow:`domani`,"in {n} days":`tra {n} giorni`,"in 1 week":`tra 1 settimana`,"in {n} weeks":`tra {n} settimane`,"in 1 month":`tra 1 mese`,"in {n} months":`tra {n} mesi`,"in 1 year":`tra 1 anno`,"in {n} years":`tra {n} anni`,"1 minute ago":`1 minuto fa`,"{n} minutes ago":`{n} minuti fa`,"1 hour ago":`1 ora fa`,"{n} hours ago":`{n} ore fa`,"1 day ago":`1 giorno fa`,"{n} days ago":`{n} giorni fa`,"1 week ago":`1 settimana fa`,"{n} weeks ago":`{n} settimane fa`,"1 month ago":`1 mese fa`,"{n} months ago":`{n} mesi fa`,"1 year ago":`1 anno fa`,"{n} years ago":`{n} anni fa`,"Cookie notice":`Avviso sui cookie`,"Cookie preferences":`Preferenze cookie`,"Close and use essential cookies only":`Chiudi e usa solo i cookie essenziali`,Back:`Indietro`,"Log in":`Accedi`,"Search Hanzo or ask AI":`Cerca in Hanzo o chiedi all’IA`,"Search models":`Cerca modelli`,"Search branches…":`Cerca branch…`,"Search repositories…":`Cerca repository…`,"Show options":`Mostra opzioni`,Retry:`Riprova`,"Donut chart":`Grafico ad anello`,"Find an organization":`Trova un’organizzazione`,Organizations:`Organizzazioni`,"Organization name":`Nome dell’organizzazione`,"Previous page":`Pagina precedente`,"Next page":`Pagina successiva`,"Continue with credits":`Continua con i crediti`,"Try Hanzo":`Prova Hanzo`,"Terms & Policies":`Termini e politiche`,"Who this is for":`A chi è rivolto`,"Bill yearly":`Fatturazione annuale`,Apps:`App`,"Card actions":`Azioni della scheda`,"Assign to...":`Assegna a...`,"Search cards...":`Cerca schede...`,"Clear search":`Cancella ricerca`,"Open files":`File aperti`,"Close panel":`Chiudi pannello`,"Add an organization":`Aggiungi un’organizzazione`,"Keyboard Shortcuts":`Scorciatoie da tastiera`,"Run a command":`Esegui un comando`,"Type shell command...":`Digita un comando shell...`,"Attached to the next message":`Allegato al prossimo messaggio`,"Channel Member Roster":`Membri del canale`,"Channel Collaborative Notes":`Note collaborative del canale`,"Code Diff Viewer":`Visualizzatore diff`,"Live Voice Call":`Chiamata vocale dal vivo`,"MCP Server Hub":`Hub dei server MCP`,"Multi-Agent Swarm Bar":`Barra dello sciame di agenti`,"Write shared channel notes, meeting agenda, or AI summaries...":`Scrivi note condivise, l’ordine del giorno o riassunti dell’IA...`,"Help improve our AI models":`Aiuta a migliorare i nostri modelli di IA`,"Your name":`Il tuo nome`,"Your role":`Il tuo ruolo`,"Country or region":`Paese o area`,"Card details":`Dati della carta`,"Agree to recurring charges":`Accetto gli addebiti ricorrenti`,"How you will use Hanzo":`Come userai Hanzo`,"Team size":`Dimensione del team`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Accetto i Termini di servizio e la Politica di utilizzo accettabile e confermo di avere almeno 18 anni.`,"Empty string":`Stringa vuota`,"Empty array":`Array vuoto`,"Empty object":`Oggetto vuoto`,"Copy {what}":`Copia {what}`,"Ask anything":`Chiedi qualsiasi cosa`,Auto:`Auto`,Instant:`Istantaneo`,Low:`Basso`,Medium:`Medio`,High:`Alto`,Max:`Massimo`,Dictate:`Detta`,"Dictating — click to stop":`Dettatura in corso — fai clic per fermare`,"Dictation settings":`Impostazioni di dettatura`,Language:`Lingua`,"No devices found":`Nessun dispositivo trovato`,"Microphone {n}":`Microfono {n}`,"Nothing matches":`Nessuna corrispondenza`,Commands:`Comandi`,"Search commands…":`Cerca comandi…`,Agents:`Agenti`,Skills:`Competenze`,Connectors:`Connettori`,"Design system":`Sistema di design`,Plugins:`Plugin`,Devices:`Dispositivi`,Memory:`Memoria`,Research:`Ricerca`,On:`Attivo`,"Upload or add files":`Carica o aggiungi file`,"Add files, agents, skills and more":`Aggiungi file, agenti, competenze e altro`,"No agents yet":`Ancora nessun agente`,"No skills yet":`Ancora nessuna competenza`,"No connectors yet":`Ancora nessun connettore`,"No design system yet":`Ancora nessun sistema di design`,"No plugins yet":`Ancora nessun plugin`,"No devices yet":`Ancora nessun dispositivo`,"Search agents":`Cerca agenti`,"Search skills":`Cerca competenze`,"Search connectors":`Cerca connettori`,"Search design system":`Cerca nel sistema di design`,"Search plugins":`Cerca plugin`,"Search devices":`Cerca dispositivi`,"Reading agents":`Lettura degli agenti`,"Reading skills":`Lettura delle competenze`,"Reading connectors":`Lettura dei connettori`,"Reading design system":`Lettura del sistema di design`,"Reading plugins":`Lettura dei plugin`,"Adaptive reasoning based on task complexity":`Ragionamento adattivo in base alla complessità`,"Answers right away, without thinking":`Risponde subito, senza ragionare`,"A quick pass with minimal thinking":`Un passaggio rapido, con poco ragionamento`,"Thinks before answering":`Riflette prima di rispondere`,"Deep reasoning for complex problems":`Ragionamento profondo per problemi complessi`,"Maximum compute and exhaustive verification":`Calcolo massimo e verifica esaustiva`,Effort:`Sforzo`,"Effort: {level}":`Sforzo: {level}`,Mode:`Modalità`,"Mode: {mode}":`Modalità: {mode}`,Model:`Modello`,"Model: {name}":`Modello: {name}`,"Voice mode":`Modalità vocale`,"Hanzo is speaking — talk to interrupt":`Hanzo sta parlando — parla per interrompere`,"In conversation — click to hang up":`In conversazione — fai clic per riagganciare`,"Go to testimonial {n}":`Vai alla testimonianza {n}`,"Go to card {n}":`Vai alla scheda {n}`,"{n} of {total}":`{n} di {total}`,"Reading…":`Lettura…`,Skill:`Competenza`,Plugin:`Plugin`},kne={Close:`閉じる`,"Close window":`ウィンドウを閉じる`,"Minimize window":`ウィンドウを最小化`,"Restore window":`ウィンドウを元に戻す`,"Maximize window":`ウィンドウを最大化`,Resize:`サイズ変更`,"Select all":`すべて選択`,"Select row":`行を選択`,"Previous month":`前の月`,"Next month":`次の月`,Dismiss:`閉じる`,Breadcrumb:`パンくずリスト`,Cards:`カード`,"Copy code":`コードをコピー`,Copied:`コピーしました`,"Copied!":`コピーしました`,Copy:`コピー`,"Previous slide":`前のスライド`,"Next slide":`次のスライド`,"Previous card":`前のカード`,"Next card":`次のカード`,"Zoom out":`縮小`,"Zoom in":`拡大`,Rotate:`回転`,Filter:`絞り込み`,"Expand all":`すべて展開`,"Collapse all":`すべて折りたたむ`,"Search...":`検索...`,"Pick a date":`日付を選択`,Select:`選択`,"Start typing...":`入力を開始...`,Search:`検索`,Decrease:`減らす`,Increase:`増やす`,pagination:`ページネーション`,"Go to previous page":`前のページへ`,"Go to next page":`次のページへ`,Previous:`前へ`,Next:`次へ`,"More pages":`その他のページ`,Remove:`削除`,"Go back":`戻る`,"Go forward":`進む`,"Reload page":`ページを再読み込み`,Share:`共有`,"New tab":`新しいタブ`,Menu:`メニュー`,"Copy command":`コマンドをコピー`,"Terminal input":`ターミナル入力`,Seek:`シーク`,"Rewind 10 seconds":`10秒戻る`,"Forward 10 seconds":`10秒進む`,Volume:`音量`,"Toggle captions":`字幕の切り替え`,"Playback speed":`再生速度`,Quality:`画質`,"Picture in picture":`ピクチャーインピクチャー`,Play:`再生`,Pause:`一時停止`,Mute:`ミュート`,Unmute:`ミュート解除`,"Exit fullscreen":`全画面を終了`,"Enter fullscreen":`全画面`,Expand:`展開`,Collapse:`折りたたむ`,"Copy reply":`返信をコピー`,"Good result":`良い結果`,"Bad result":`悪い結果`,"Dialog Close":`ダイアログを閉じる`,Notifications:`通知`,Account:`アカウント`,Cart:`カート`,Call:`通話`,"Video call":`ビデオ通話`,Message:`メッセージ`,Main:`メイン`,Columns:`列`,"No results.":`結果がありません。`,"No results":`結果なし`,"No results found":`結果が見つかりません`,"Drop files here":`ファイルをここにドロップ`,"Drag & drop files here":`ファイルをドラッグ&ドロップ`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`またはクリックして参照(最大 {maxFiles} ファイル、各 {maxSize} MB)`,"Remove {name}":`{name} を削除`,"{selected} of {total} row(s) selected.":`{total} 行中 {selected} 行を選択`,"Try again":`もう一度試す`,"What’s up next?":`次は何?`,"Show password":`パスワードを表示`,"Hide password":`パスワードを隠す`,"Search icons":`アイコンを検索`,"No icon matches":`一致するアイコンがありません`,"Show all items ({n})":`すべて表示 ({n})`,"Fewer {what}":`{what}を減らす`,"More {what}":`{what}を増やす`,"No tasks available. Add tasks to display Gantt chart.":`タスクがありません。ガントチャートを表示するにはタスクを追加してください。`,January:`1月`,February:`2月`,March:`3月`,April:`4月`,May:`5月`,June:`6月`,July:`7月`,August:`8月`,September:`9月`,October:`10月`,November:`11月`,December:`12月`,Su:`日`,Mo:`月`,Tu:`火`,We:`水`,Th:`木`,Fr:`金`,Sa:`土`,"just now":`たった今`,"in a moment":`まもなく`,"in 1 minute":`1分後`,"in {n} minutes":`{n}分後`,"in 1 hour":`1時間後`,"in {n} hours":`{n}時間後`,tomorrow:`明日`,"in {n} days":`{n}日後`,"in 1 week":`1週間後`,"in {n} weeks":`{n}週間後`,"in 1 month":`1か月後`,"in {n} months":`{n}か月後`,"in 1 year":`1年後`,"in {n} years":`{n}年後`,"1 minute ago":`1分前`,"{n} minutes ago":`{n}分前`,"1 hour ago":`1時間前`,"{n} hours ago":`{n}時間前`,"1 day ago":`1日前`,"{n} days ago":`{n}日前`,"1 week ago":`1週間前`,"{n} weeks ago":`{n}週間前`,"1 month ago":`1か月前`,"{n} months ago":`{n}か月前`,"1 year ago":`1年前`,"{n} years ago":`{n}年前`,"Cookie notice":`Cookie の通知`,"Cookie preferences":`Cookie の設定`,"Close and use essential cookies only":`閉じて必須 Cookie のみ使う`,Back:`戻る`,"Log in":`ログイン`,"Search Hanzo or ask AI":`Hanzo を検索するか AI に聞く`,"Search models":`モデルを検索`,"Search branches…":`ブランチを検索…`,"Search repositories…":`リポジトリを検索…`,"Show options":`オプションを表示`,Retry:`再試行`,"Donut chart":`ドーナツグラフ`,"Find an organization":`組織を探す`,Organizations:`組織`,"Organization name":`組織名`,"Previous page":`前のページ`,"Next page":`次のページ`,"Continue with credits":`クレジットで続ける`,"Try Hanzo":`Hanzo を試す`,"Terms & Policies":`規約とポリシー`,"Who this is for":`対象`,"Bill yearly":`年払い`,Apps:`アプリ`,"Card actions":`カードの操作`,"Assign to...":`割り当て先...`,"Search cards...":`カードを検索...`,"Clear search":`検索をクリア`,"Open files":`開いているファイル`,"Close panel":`パネルを閉じる`,"Add an organization":`組織を追加`,"Keyboard Shortcuts":`キーボードショートカット`,"Run a command":`コマンドを実行`,"Type shell command...":`シェルコマンドを入力...`,"Attached to the next message":`次のメッセージに添付`,"Channel Member Roster":`チャンネルのメンバー`,"Channel Collaborative Notes":`チャンネルの共同メモ`,"Code Diff Viewer":`差分ビューア`,"Live Voice Call":`ライブ音声通話`,"MCP Server Hub":`MCP サーバーハブ`,"Multi-Agent Swarm Bar":`マルチエージェントの群れバー`,"Write shared channel notes, meeting agenda, or AI summaries...":`共有メモ、議題、AI の要約を書く...`,"Help improve our AI models":`AI モデルの改善に協力する`,"Your name":`お名前`,"Your role":`あなたの役割`,"Country or region":`国または地域`,"Card details":`カード情報`,"Agree to recurring charges":`継続課金に同意する`,"How you will use Hanzo":`Hanzo の使い方`,"Team size":`チームの規模`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`利用規約と許容される使用に関するポリシーに同意し、18歳以上であることを確認します。`,"Empty string":`空の文字列`,"Empty array":`空の配列`,"Empty object":`空のオブジェクト`,"Copy {what}":`{what}をコピー`,"Ask anything":`何でも聞いてください`,Auto:`自動`,Instant:`即答`,Low:`低`,Medium:`中`,High:`高`,Max:`最大`,Dictate:`音声入力`,"Dictating — click to stop":`音声入力中 — クリックで停止`,"Dictation settings":`音声入力の設定`,Language:`言語`,"No devices found":`デバイスが見つかりません`,"Microphone {n}":`マイク {n}`,"Nothing matches":`一致するものがありません`,Commands:`コマンド`,"Search commands…":`コマンドを検索…`,Agents:`エージェント`,Skills:`スキル`,Connectors:`コネクタ`,"Design system":`デザインシステム`,Plugins:`プラグイン`,Devices:`デバイス`,Memory:`メモリ`,Research:`リサーチ`,On:`オン`,"Upload or add files":`ファイルをアップロードまたは追加`,"Add files, agents, skills and more":`ファイル、エージェント、スキルなどを追加`,"No agents yet":`エージェントはまだありません`,"No skills yet":`スキルはまだありません`,"No connectors yet":`コネクタはまだありません`,"No design system yet":`デザインシステムはまだありません`,"No plugins yet":`プラグインはまだありません`,"No devices yet":`デバイスはまだありません`,"Search agents":`エージェントを検索`,"Search skills":`スキルを検索`,"Search connectors":`コネクタを検索`,"Search design system":`デザインシステムを検索`,"Search plugins":`プラグインを検索`,"Search devices":`デバイスを検索`,"Reading agents":`エージェントを読み込み中`,"Reading skills":`スキルを読み込み中`,"Reading connectors":`コネクタを読み込み中`,"Reading design system":`デザインシステムを読み込み中`,"Reading plugins":`プラグインを読み込み中`,"Adaptive reasoning based on task complexity":`タスクの複雑さに合わせた推論`,"Answers right away, without thinking":`考えずにすぐに答えます`,"A quick pass with minimal thinking":`最小限の思考による素早い処理`,"Thinks before answering":`答える前に考える`,"Deep reasoning for complex problems":`複雑な問題のための深い推論`,"Maximum compute and exhaustive verification":`最大の計算と徹底した検証`,Effort:`思考量`,"Effort: {level}":`思考量: {level}`,Mode:`モード`,"Mode: {mode}":`モード: {mode}`,Model:`モデル`,"Model: {name}":`モデル: {name}`,"Voice mode":`音声モード`,"Hanzo is speaking — talk to interrupt":`Hanzo が話しています — 話すと中断します`,"In conversation — click to hang up":`会話中 — クリックで終了`,"Go to testimonial {n}":`お客様の声 {n} へ`,"Go to card {n}":`カード {n} へ`,"{n} of {total}":`{n} / {total}`,"Reading…":`読み込み中…`,Skill:`スキル`,Plugin:`プラグイン`},Ane={Close:`닫기`,"Close window":`창 닫기`,"Minimize window":`창 최소화`,"Restore window":`창 복원`,"Maximize window":`창 최대화`,Resize:`크기 조절`,"Select all":`모두 선택`,"Select row":`행 선택`,"Previous month":`이전 달`,"Next month":`다음 달`,Dismiss:`닫기`,Breadcrumb:`이동 경로`,Cards:`카드`,"Copy code":`코드 복사`,Copied:`복사됨`,"Copied!":`복사됨!`,Copy:`복사`,"Previous slide":`이전 슬라이드`,"Next slide":`다음 슬라이드`,"Previous card":`이전 카드`,"Next card":`다음 카드`,"Zoom out":`축소`,"Zoom in":`확대`,Rotate:`회전`,Filter:`필터`,"Expand all":`모두 펼치기`,"Collapse all":`모두 접기`,"Search...":`검색...`,"Pick a date":`날짜 선택`,Select:`선택`,"Start typing...":`입력 시작...`,Search:`검색`,Decrease:`줄이기`,Increase:`늘리기`,pagination:`페이지 매김`,"Go to previous page":`이전 페이지로`,"Go to next page":`다음 페이지로`,Previous:`이전`,Next:`다음`,"More pages":`페이지 더보기`,Remove:`제거`,"Go back":`뒤로`,"Go forward":`앞으로`,"Reload page":`페이지 새로고침`,Share:`공유`,"New tab":`새 탭`,Menu:`메뉴`,"Copy command":`명령 복사`,"Terminal input":`터미널 입력`,Seek:`탐색`,"Rewind 10 seconds":`10초 되감기`,"Forward 10 seconds":`10초 빨리감기`,Volume:`음량`,"Toggle captions":`자막 전환`,"Playback speed":`재생 속도`,Quality:`화질`,"Picture in picture":`화면 속 화면`,Play:`재생`,Pause:`일시정지`,Mute:`음소거`,Unmute:`음소거 해제`,"Exit fullscreen":`전체 화면 종료`,"Enter fullscreen":`전체 화면`,Expand:`펼치기`,Collapse:`접기`,"Copy reply":`답변 복사`,"Good result":`좋은 결과`,"Bad result":`나쁜 결과`,"Dialog Close":`대화상자 닫기`,Notifications:`알림`,Account:`계정`,Cart:`장바구니`,Call:`통화`,"Video call":`영상 통화`,Message:`메시지`,Main:`기본`,Columns:`열`,"No results.":`결과가 없습니다.`,"No results":`결과 없음`,"No results found":`결과를 찾을 수 없습니다`,"Drop files here":`파일을 여기에 놓으세요`,"Drag & drop files here":`파일을 끌어다 놓으세요`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`또는 클릭하여 찾아보기 (최대 {maxFiles}개 파일, 각 {maxSize}MB)`,"Remove {name}":`{name} 제거`,"{selected} of {total} row(s) selected.":`{total}개 중 {selected}개 행 선택됨`,"Try again":`다시 시도`,"What’s up next?":`다음은 무엇인가요?`,"Show password":`비밀번호 표시`,"Hide password":`비밀번호 숨기기`,"Search icons":`아이콘 검색`,"No icon matches":`일치하는 아이콘 없음`,"Show all items ({n})":`모두 보기 ({n})`,"Fewer {what}":`{what} 줄이기`,"More {what}":`{what} 늘리기`,"No tasks available. Add tasks to display Gantt chart.":`작업이 없습니다. 간트 차트를 보려면 작업을 추가하세요.`,January:`1월`,February:`2월`,March:`3월`,April:`4월`,May:`5월`,June:`6월`,July:`7월`,August:`8월`,September:`9월`,October:`10월`,November:`11월`,December:`12월`,Su:`일`,Mo:`월`,Tu:`화`,We:`수`,Th:`목`,Fr:`금`,Sa:`토`,"just now":`방금`,"in a moment":`곧`,"in 1 minute":`1분 후`,"in {n} minutes":`{n}분 후`,"in 1 hour":`1시간 후`,"in {n} hours":`{n}시간 후`,tomorrow:`내일`,"in {n} days":`{n}일 후`,"in 1 week":`1주 후`,"in {n} weeks":`{n}주 후`,"in 1 month":`1개월 후`,"in {n} months":`{n}개월 후`,"in 1 year":`1년 후`,"in {n} years":`{n}년 후`,"1 minute ago":`1분 전`,"{n} minutes ago":`{n}분 전`,"1 hour ago":`1시간 전`,"{n} hours ago":`{n}시간 전`,"1 day ago":`1일 전`,"{n} days ago":`{n}일 전`,"1 week ago":`1주 전`,"{n} weeks ago":`{n}주 전`,"1 month ago":`1개월 전`,"{n} months ago":`{n}개월 전`,"1 year ago":`1년 전`,"{n} years ago":`{n}년 전`,"Cookie notice":`쿠키 안내`,"Cookie preferences":`쿠키 설정`,"Close and use essential cookies only":`닫고 필수 쿠키만 사용`,Back:`뒤로`,"Log in":`로그인`,"Search Hanzo or ask AI":`Hanzo 검색 또는 AI에게 질문`,"Search models":`모델 검색`,"Search branches…":`브랜치 검색…`,"Search repositories…":`저장소 검색…`,"Show options":`옵션 표시`,Retry:`다시 시도`,"Donut chart":`도넛 차트`,"Find an organization":`조직 찾기`,Organizations:`조직`,"Organization name":`조직 이름`,"Previous page":`이전 페이지`,"Next page":`다음 페이지`,"Continue with credits":`크레딧으로 계속`,"Try Hanzo":`Hanzo 체험`,"Terms & Policies":`약관 및 정책`,"Who this is for":`대상`,"Bill yearly":`연간 결제`,Apps:`앱`,"Card actions":`카드 작업`,"Assign to...":`할당 대상...`,"Search cards...":`카드 검색...`,"Clear search":`검색어 지우기`,"Open files":`열린 파일`,"Close panel":`패널 닫기`,"Add an organization":`조직 추가`,"Keyboard Shortcuts":`키보드 단축키`,"Run a command":`명령 실행`,"Type shell command...":`셸 명령 입력...`,"Attached to the next message":`다음 메시지에 첨부됨`,"Channel Member Roster":`채널 구성원`,"Channel Collaborative Notes":`채널 공동 메모`,"Code Diff Viewer":`코드 차이 보기`,"Live Voice Call":`실시간 음성 통화`,"MCP Server Hub":`MCP 서버 허브`,"Multi-Agent Swarm Bar":`다중 에이전트 군집 막대`,"Write shared channel notes, meeting agenda, or AI summaries...":`공유 메모, 안건 또는 AI 요약을 작성...`,"Help improve our AI models":`AI 모델 개선에 참여`,"Your name":`이름`,"Your role":`역할`,"Country or region":`국가 또는 지역`,"Card details":`카드 정보`,"Agree to recurring charges":`정기 결제에 동의`,"How you will use Hanzo":`Hanzo 사용 방식`,"Team size":`팀 규모`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`서비스 약관과 허용 사용 정책에 동의하며 만 18세 이상임을 확인합니다.`,"Empty string":`빈 문자열`,"Empty array":`빈 배열`,"Empty object":`빈 객체`,"Copy {what}":`{what} 복사`,"Ask anything":`무엇이든 물어보세요`,Auto:`자동`,Instant:`즉시`,Low:`낮음`,Medium:`중간`,High:`높음`,Max:`최대`,Dictate:`받아쓰기`,"Dictating — click to stop":`받아쓰는 중 — 클릭하여 중지`,"Dictation settings":`받아쓰기 설정`,Language:`언어`,"No devices found":`기기를 찾을 수 없습니다`,"Microphone {n}":`마이크 {n}`,"Nothing matches":`일치하는 항목 없음`,Commands:`명령`,"Search commands…":`명령 검색…`,Agents:`에이전트`,Skills:`스킬`,Connectors:`커넥터`,"Design system":`디자인 시스템`,Plugins:`플러그인`,Devices:`기기`,Memory:`메모리`,Research:`리서치`,On:`켜짐`,"Upload or add files":`파일 업로드 또는 추가`,"Add files, agents, skills and more":`파일, 에이전트, 스킬 등 추가`,"No agents yet":`아직 에이전트가 없습니다`,"No skills yet":`아직 스킬이 없습니다`,"No connectors yet":`아직 커넥터가 없습니다`,"No design system yet":`아직 디자인 시스템이 없습니다`,"No plugins yet":`아직 플러그인이 없습니다`,"No devices yet":`아직 기기가 없습니다`,"Search agents":`에이전트 검색`,"Search skills":`스킬 검색`,"Search connectors":`커넥터 검색`,"Search design system":`디자인 시스템 검색`,"Search plugins":`플러그인 검색`,"Search devices":`기기 검색`,"Reading agents":`에이전트 읽는 중`,"Reading skills":`스킬 읽는 중`,"Reading connectors":`커넥터 읽는 중`,"Reading design system":`디자인 시스템 읽는 중`,"Reading plugins":`플러그인 읽는 중`,"Adaptive reasoning based on task complexity":`작업 복잡도에 맞춘 추론`,"Answers right away, without thinking":`생각하지 않고 바로 답합니다`,"A quick pass with minimal thinking":`최소한의 사고로 빠르게`,"Thinks before answering":`답하기 전에 생각`,"Deep reasoning for complex problems":`복잡한 문제를 위한 깊은 추론`,"Maximum compute and exhaustive verification":`최대 연산과 철저한 검증`,Effort:`노력`,"Effort: {level}":`노력: {level}`,Mode:`모드`,"Mode: {mode}":`모드: {mode}`,Model:`모델`,"Model: {name}":`모델: {name}`,"Voice mode":`음성 모드`,"Hanzo is speaking — talk to interrupt":`Hanzo가 말하는 중 — 말하면 중단`,"In conversation — click to hang up":`대화 중 — 클릭하여 종료`,"Go to testimonial {n}":`후기 {n}(으)로`,"Go to card {n}":`카드 {n}(으)로`,"{n} of {total}":`{n} / {total}`,"Reading…":`읽는 중…`,Skill:`스킬`,Plugin:`플러그인`},jne={Close:`Fechar`,"Close window":`Fechar janela`,"Minimize window":`Minimizar janela`,"Restore window":`Restaurar janela`,"Maximize window":`Maximizar janela`,Resize:`Redimensionar`,"Select all":`Selecionar tudo`,"Select row":`Selecionar linha`,"Previous month":`Mês anterior`,"Next month":`Próximo mês`,Dismiss:`Dispensar`,Breadcrumb:`Trilha de navegação`,Cards:`Cartões`,"Copy code":`Copiar código`,Copied:`Copiado`,"Copied!":`Copiado!`,Copy:`Copiar`,"Previous slide":`Slide anterior`,"Next slide":`Próximo slide`,"Previous card":`Cartão anterior`,"Next card":`Próximo cartão`,"Zoom out":`Diminuir zoom`,"Zoom in":`Aumentar zoom`,Rotate:`Girar`,Filter:`Filtrar`,"Expand all":`Expandir tudo`,"Collapse all":`Recolher tudo`,"Search...":`Pesquisar...`,"Pick a date":`Escolha uma data`,Select:`Selecionar`,"Start typing...":`Comece a digitar...`,Search:`Pesquisar`,Decrease:`Diminuir`,Increase:`Aumentar`,pagination:`paginação`,"Go to previous page":`Ir para a página anterior`,"Go to next page":`Ir para a próxima página`,Previous:`Anterior`,Next:`Próximo`,"More pages":`Mais páginas`,Remove:`Remover`,"Go back":`Voltar`,"Go forward":`Avançar`,"Reload page":`Recarregar página`,Share:`Compartilhar`,"New tab":`Nova aba`,Menu:`Menu`,"Copy command":`Copiar comando`,"Terminal input":`Entrada do terminal`,Seek:`Posição`,"Rewind 10 seconds":`Retroceder 10 segundos`,"Forward 10 seconds":`Avançar 10 segundos`,Volume:`Volume`,"Toggle captions":`Alternar legendas`,"Playback speed":`Velocidade de reprodução`,Quality:`Qualidade`,"Picture in picture":`Picture in picture`,Play:`Reproduzir`,Pause:`Pausar`,Mute:`Silenciar`,Unmute:`Ativar som`,"Exit fullscreen":`Sair da tela cheia`,"Enter fullscreen":`Tela cheia`,Expand:`Expandir`,Collapse:`Recolher`,"Copy reply":`Copiar resposta`,"Good result":`Bom resultado`,"Bad result":`Resultado ruim`,"Dialog Close":`Fechar diálogo`,Notifications:`Notificações`,Account:`Conta`,Cart:`Carrinho`,Call:`Chamada`,"Video call":`Chamada de vídeo`,Message:`Mensagem`,Main:`Principal`,Columns:`Colunas`,"No results.":`Nenhum resultado.`,"No results":`Nenhum resultado`,"No results found":`Nenhum resultado encontrado`,"Drop files here":`Solte os arquivos aqui`,"Drag & drop files here":`Arraste e solte arquivos aqui`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`ou clique para procurar (máx. {maxFiles} arquivos, {maxSize} MB cada)`,"Remove {name}":`Remover {name}`,"{selected} of {total} row(s) selected.":`{selected} de {total} linha(s) selecionada(s).`,"Try again":`Tentar novamente`,"What’s up next?":`O que vem agora?`,"Show password":`Mostrar senha`,"Hide password":`Ocultar senha`,"Search icons":`Pesquisar ícones`,"No icon matches":`Nenhum ícone corresponde`,"Show all items ({n})":`Mostrar todos ({n})`,"Fewer {what}":`Menos {what}`,"More {what}":`Mais {what}`,"No tasks available. Add tasks to display Gantt chart.":`Nenhuma tarefa. Adicione tarefas para exibir o gráfico de Gantt.`,January:`janeiro`,February:`fevereiro`,March:`março`,April:`abril`,May:`maio`,June:`junho`,July:`julho`,August:`agosto`,September:`setembro`,October:`outubro`,November:`novembro`,December:`dezembro`,Su:`do`,Mo:`se`,Tu:`te`,We:`qa`,Th:`qi`,Fr:`sx`,Sa:`sá`,"just now":`agora mesmo`,"in a moment":`em instantes`,"in 1 minute":`em 1 minuto`,"in {n} minutes":`em {n} minutos`,"in 1 hour":`em 1 hora`,"in {n} hours":`em {n} horas`,tomorrow:`amanhã`,"in {n} days":`em {n} dias`,"in 1 week":`em 1 semana`,"in {n} weeks":`em {n} semanas`,"in 1 month":`em 1 mês`,"in {n} months":`em {n} meses`,"in 1 year":`em 1 ano`,"in {n} years":`em {n} anos`,"1 minute ago":`há 1 minuto`,"{n} minutes ago":`há {n} minutos`,"1 hour ago":`há 1 hora`,"{n} hours ago":`há {n} horas`,"1 day ago":`há 1 dia`,"{n} days ago":`há {n} dias`,"1 week ago":`há 1 semana`,"{n} weeks ago":`há {n} semanas`,"1 month ago":`há 1 mês`,"{n} months ago":`há {n} meses`,"1 year ago":`há 1 ano`,"{n} years ago":`há {n} anos`,"Cookie notice":`Aviso de cookies`,"Cookie preferences":`Preferências de cookies`,"Close and use essential cookies only":`Fechar e usar apenas cookies essenciais`,Back:`Voltar`,"Log in":`Entrar`,"Search Hanzo or ask AI":`Pesquise na Hanzo ou pergunte à IA`,"Search models":`Pesquisar modelos`,"Search branches…":`Pesquisar branches…`,"Search repositories…":`Pesquisar repositórios…`,"Show options":`Mostrar opções`,Retry:`Tentar novamente`,"Donut chart":`Gráfico de rosca`,"Find an organization":`Encontrar uma organização`,Organizations:`Organizações`,"Organization name":`Nome da organização`,"Previous page":`Página anterior`,"Next page":`Próxima página`,"Continue with credits":`Continuar com créditos`,"Try Hanzo":`Experimentar a Hanzo`,"Terms & Policies":`Termos e políticas`,"Who this is for":`Para quem é`,"Bill yearly":`Cobrança anual`,Apps:`Aplicativos`,"Card actions":`Ações do cartão`,"Assign to...":`Atribuir a...`,"Search cards...":`Pesquisar cartões...`,"Clear search":`Limpar pesquisa`,"Open files":`Arquivos abertos`,"Close panel":`Fechar painel`,"Add an organization":`Adicionar uma organização`,"Keyboard Shortcuts":`Atalhos de teclado`,"Run a command":`Executar um comando`,"Type shell command...":`Digite um comando de shell...`,"Attached to the next message":`Anexado à próxima mensagem`,"Channel Member Roster":`Membros do canal`,"Channel Collaborative Notes":`Notas colaborativas do canal`,"Code Diff Viewer":`Visualizador de diff`,"Live Voice Call":`Chamada de voz ao vivo`,"MCP Server Hub":`Hub de servidores MCP`,"Multi-Agent Swarm Bar":`Barra do enxame de agentes`,"Write shared channel notes, meeting agenda, or AI summaries...":`Escreva notas do canal, a pauta ou resumos da IA...`,"Help improve our AI models":`Ajude a melhorar nossos modelos de IA`,"Your name":`Seu nome`,"Your role":`Seu papel`,"Country or region":`País ou região`,"Card details":`Dados do cartão`,"Agree to recurring charges":`Concordo com cobranças recorrentes`,"How you will use Hanzo":`Como você usará a Hanzo`,"Team size":`Tamanho da equipe`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Concordo com os Termos de Serviço e a Política de Uso Aceitável e confirmo que tenho pelo menos 18 anos.`,"Empty string":`Texto vazio`,"Empty array":`Array vazio`,"Empty object":`Objeto vazio`,"Copy {what}":`Copiar {what}`,"Ask anything":`Pergunte qualquer coisa`,Auto:`Auto`,Instant:`Instantâneo`,Low:`Baixo`,Medium:`Médio`,High:`Alto`,Max:`Máximo`,Dictate:`Ditar`,"Dictating — click to stop":`Ditando — clique para parar`,"Dictation settings":`Configurações de ditado`,Language:`Idioma`,"No devices found":`Nenhum dispositivo encontrado`,"Microphone {n}":`Microfone {n}`,"Nothing matches":`Nada corresponde`,Commands:`Comandos`,"Search commands…":`Pesquisar comandos…`,Agents:`Agentes`,Skills:`Habilidades`,Connectors:`Conectores`,"Design system":`Sistema de design`,Plugins:`Plugins`,Devices:`Dispositivos`,Memory:`Memória`,Research:`Pesquisa`,On:`Ativado`,"Upload or add files":`Enviar ou adicionar arquivos`,"Add files, agents, skills and more":`Adicione arquivos, agentes, habilidades e mais`,"No agents yet":`Ainda não há agentes`,"No skills yet":`Ainda não há habilidades`,"No connectors yet":`Ainda não há conectores`,"No design system yet":`Ainda não há sistema de design`,"No plugins yet":`Ainda não há plugins`,"No devices yet":`Ainda não há dispositivos`,"Search agents":`Pesquisar agentes`,"Search skills":`Pesquisar habilidades`,"Search connectors":`Pesquisar conectores`,"Search design system":`Pesquisar no sistema de design`,"Search plugins":`Pesquisar plugins`,"Search devices":`Pesquisar dispositivos`,"Reading agents":`Lendo agentes`,"Reading skills":`Lendo habilidades`,"Reading connectors":`Lendo conectores`,"Reading design system":`Lendo o sistema de design`,"Reading plugins":`Lendo plugins`,"Adaptive reasoning based on task complexity":`Raciocínio adaptativo conforme a complexidade da tarefa`,"Answers right away, without thinking":`Responde na hora, sem pensar`,"A quick pass with minimal thinking":`Uma passada rápida, com pouco raciocínio`,"Thinks before answering":`Pensa antes de responder`,"Deep reasoning for complex problems":`Raciocínio profundo para problemas complexos`,"Maximum compute and exhaustive verification":`Computação máxima e verificação exaustiva`,Effort:`Esforço`,"Effort: {level}":`Esforço: {level}`,Mode:`Modo`,"Mode: {mode}":`Modo: {mode}`,Model:`Modelo`,"Model: {name}":`Modelo: {name}`,"Voice mode":`Modo de voz`,"Hanzo is speaking — talk to interrupt":`A Hanzo está falando — fale para interromper`,"In conversation — click to hang up":`Em conversa — clique para desligar`,"Go to testimonial {n}":`Ir para o depoimento {n}`,"Go to card {n}":`Ir para o cartão {n}`,"{n} of {total}":`{n} de {total}`,"Reading…":`Lendo…`,Skill:`Habilidade`,Plugin:`Plugin`},Mne={Close:`Закрыть`,"Close window":`Закрыть окно`,"Minimize window":`Свернуть окно`,"Restore window":`Восстановить окно`,"Maximize window":`Развернуть окно`,Resize:`Изменить размер`,"Select all":`Выбрать все`,"Select row":`Выбрать строку`,"Previous month":`Предыдущий месяц`,"Next month":`Следующий месяц`,Dismiss:`Закрыть`,Breadcrumb:`Навигационная цепочка`,Cards:`Карточки`,"Copy code":`Копировать код`,Copied:`Скопировано`,"Copied!":`Скопировано!`,Copy:`Копировать`,"Previous slide":`Предыдущий слайд`,"Next slide":`Следующий слайд`,"Previous card":`Предыдущая карточка`,"Next card":`Следующая карточка`,"Zoom out":`Уменьшить`,"Zoom in":`Увеличить`,Rotate:`Повернуть`,Filter:`Фильтр`,"Expand all":`Развернуть все`,"Collapse all":`Свернуть все`,"Search...":`Поиск...`,"Pick a date":`Выберите дату`,Select:`Выбрать`,"Start typing...":`Начните вводить...`,Search:`Поиск`,Decrease:`Уменьшить`,Increase:`Увеличить`,pagination:`постраничная навигация`,"Go to previous page":`К предыдущей странице`,"Go to next page":`К следующей странице`,Previous:`Назад`,Next:`Далее`,"More pages":`Ещё страницы`,Remove:`Удалить`,"Go back":`Назад`,"Go forward":`Вперёд`,"Reload page":`Обновить страницу`,Share:`Поделиться`,"New tab":`Новая вкладка`,Menu:`Меню`,"Copy command":`Копировать команду`,"Terminal input":`Ввод в терминале`,Seek:`Позиция`,"Rewind 10 seconds":`Назад на 10 секунд`,"Forward 10 seconds":`Вперёд на 10 секунд`,Volume:`Громкость`,"Toggle captions":`Субтитры`,"Playback speed":`Скорость воспроизведения`,Quality:`Качество`,"Picture in picture":`Картинка в картинке`,Play:`Воспроизвести`,Pause:`Пауза`,Mute:`Выключить звук`,Unmute:`Включить звук`,"Exit fullscreen":`Выйти из полноэкранного режима`,"Enter fullscreen":`Полный экран`,Expand:`Развернуть`,Collapse:`Свернуть`,"Copy reply":`Копировать ответ`,"Good result":`Хороший результат`,"Bad result":`Плохой результат`,"Dialog Close":`Закрыть диалог`,Notifications:`Уведомления`,Account:`Аккаунт`,Cart:`Корзина`,Call:`Звонок`,"Video call":`Видеозвонок`,Message:`Сообщение`,Main:`Основное`,Columns:`Столбцы`,"No results.":`Ничего не найдено.`,"No results":`Ничего не найдено`,"No results found":`Ничего не найдено`,"Drop files here":`Перетащите файлы сюда`,"Drag & drop files here":`Перетащите файлы сюда`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`или нажмите, чтобы выбрать (не более {maxFiles} файлов, по {maxSize} МБ)`,"Remove {name}":`Удалить {name}`,"{selected} of {total} row(s) selected.":`Выбрано {selected} из {total}.`,"Try again":`Повторить`,"What’s up next?":`Что дальше?`,"Show password":`Показать пароль`,"Hide password":`Скрыть пароль`,"Search icons":`Поиск значков`,"No icon matches":`Нет подходящих значков`,"Show all items ({n})":`Показать все ({n})`,"Fewer {what}":`Меньше: {what}`,"More {what}":`Больше: {what}`,"No tasks available. Add tasks to display Gantt chart.":`Нет задач. Добавьте их, чтобы показать диаграмму Ганта.`,January:`январь`,February:`февраль`,March:`март`,April:`апрель`,May:`май`,June:`июнь`,July:`июль`,August:`август`,September:`сентябрь`,October:`октябрь`,November:`ноябрь`,December:`декабрь`,Su:`вс`,Mo:`пн`,Tu:`вт`,We:`ср`,Th:`чт`,Fr:`пт`,Sa:`сб`,"just now":`только что`,"in a moment":`через мгновение`,"in 1 minute":`через 1 минуту`,"in {n} minutes":`через {n} мин.`,"in 1 hour":`через 1 час`,"in {n} hours":`через {n} ч.`,tomorrow:`завтра`,"in {n} days":`через {n} дн.`,"in 1 week":`через 1 неделю`,"in {n} weeks":`через {n} нед.`,"in 1 month":`через 1 месяц`,"in {n} months":`через {n} мес.`,"in 1 year":`через 1 год`,"in {n} years":`через {n} г.`,"1 minute ago":`1 минуту назад`,"{n} minutes ago":`{n} мин. назад`,"1 hour ago":`1 час назад`,"{n} hours ago":`{n} ч. назад`,"1 day ago":`1 день назад`,"{n} days ago":`{n} дн. назад`,"1 week ago":`1 неделю назад`,"{n} weeks ago":`{n} нед. назад`,"1 month ago":`1 месяц назад`,"{n} months ago":`{n} мес. назад`,"1 year ago":`1 год назад`,"{n} years ago":`{n} г. назад`,"Cookie notice":`Уведомление о cookie`,"Cookie preferences":`Настройки cookie`,"Close and use essential cookies only":`Закрыть и оставить только необходимые cookie`,Back:`Назад`,"Log in":`Войти`,"Search Hanzo or ask AI":`Искать в Hanzo или спросить ИИ`,"Search models":`Поиск моделей`,"Search branches…":`Поиск веток…`,"Search repositories…":`Поиск репозиториев…`,"Show options":`Показать параметры`,Retry:`Повторить`,"Donut chart":`Кольцевая диаграмма`,"Find an organization":`Найти организацию`,Organizations:`Организации`,"Organization name":`Название организации`,"Previous page":`Предыдущая страница`,"Next page":`Следующая страница`,"Continue with credits":`Продолжить за счёт кредитов`,"Try Hanzo":`Попробовать Hanzo`,"Terms & Policies":`Условия и политики`,"Who this is for":`Для кого это`,"Bill yearly":`Оплата за год`,Apps:`Приложения`,"Card actions":`Действия с карточкой`,"Assign to...":`Назначить...`,"Search cards...":`Поиск карточек...`,"Clear search":`Очистить поиск`,"Open files":`Открытые файлы`,"Close panel":`Закрыть панель`,"Add an organization":`Добавить организацию`,"Keyboard Shortcuts":`Сочетания клавиш`,"Run a command":`Выполнить команду`,"Type shell command...":`Введите команду оболочки...`,"Attached to the next message":`Прикреплено к следующему сообщению`,"Channel Member Roster":`Участники канала`,"Channel Collaborative Notes":`Общие заметки канала`,"Code Diff Viewer":`Просмотр различий`,"Live Voice Call":`Голосовой звонок`,"MCP Server Hub":`Хаб серверов MCP`,"Multi-Agent Swarm Bar":`Панель роя агентов`,"Write shared channel notes, meeting agenda, or AI summaries...":`Пишите общие заметки, повестку или сводки ИИ...`,"Help improve our AI models":`Помогите улучшить наши модели ИИ`,"Your name":`Ваше имя`,"Your role":`Ваша роль`,"Country or region":`Страна или регион`,"Card details":`Данные карты`,"Agree to recurring charges":`Согласие на регулярные списания`,"How you will use Hanzo":`Как вы будете использовать Hanzo`,"Team size":`Размер команды`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Я принимаю Условия обслуживания и Политику допустимого использования и подтверждаю, что мне исполнилось 18 лет.`,"Empty string":`Пустая строка`,"Empty array":`Пустой массив`,"Empty object":`Пустой объект`,"Copy {what}":`Копировать {what}`,"Ask anything":`Спросите что угодно`,Auto:`Авто`,Instant:`Мгновенно`,Low:`Низкий`,Medium:`Средний`,High:`Высокий`,Max:`Максимум`,Dictate:`Диктовка`,"Dictating — click to stop":`Идёт диктовка — нажмите, чтобы остановить`,"Dictation settings":`Настройки диктовки`,Language:`Язык`,"No devices found":`Устройства не найдены`,"Microphone {n}":`Микрофон {n}`,"Nothing matches":`Ничего не найдено`,Commands:`Команды`,"Search commands…":`Поиск команд…`,Agents:`Агенты`,Skills:`Навыки`,Connectors:`Коннекторы`,"Design system":`Дизайн-система`,Plugins:`Плагины`,Devices:`Устройства`,Memory:`Память`,Research:`Исследование`,On:`Вкл.`,"Upload or add files":`Загрузить или добавить файлы`,"Add files, agents, skills and more":`Добавьте файлы, агентов, навыки и другое`,"No agents yet":`Агентов пока нет`,"No skills yet":`Навыков пока нет`,"No connectors yet":`Коннекторов пока нет`,"No design system yet":`Дизайн-системы пока нет`,"No plugins yet":`Плагинов пока нет`,"No devices yet":`Устройств пока нет`,"Search agents":`Поиск агентов`,"Search skills":`Поиск навыков`,"Search connectors":`Поиск коннекторов`,"Search design system":`Поиск в дизайн-системе`,"Search plugins":`Поиск плагинов`,"Search devices":`Поиск устройств`,"Reading agents":`Чтение агентов`,"Reading skills":`Чтение навыков`,"Reading connectors":`Чтение коннекторов`,"Reading design system":`Чтение дизайн-системы`,"Reading plugins":`Чтение плагинов`,"Adaptive reasoning based on task complexity":`Адаптивное рассуждение по сложности задачи`,"Answers right away, without thinking":`Отвечает сразу, без размышлений`,"A quick pass with minimal thinking":`Быстрый проход с минимумом размышлений`,"Thinks before answering":`Думает перед ответом`,"Deep reasoning for complex problems":`Глубокое рассуждение для сложных задач`,"Maximum compute and exhaustive verification":`Максимум вычислений и полная проверка`,Effort:`Усилие`,"Effort: {level}":`Усилие: {level}`,Mode:`Режим`,"Mode: {mode}":`Режим: {mode}`,Model:`Модель`,"Model: {name}":`Модель: {name}`,"Voice mode":`Голосовой режим`,"Hanzo is speaking — talk to interrupt":`Hanzo говорит — говорите, чтобы прервать`,"In conversation — click to hang up":`Разговор — нажмите, чтобы завершить`,"Go to testimonial {n}":`К отзыву {n}`,"Go to card {n}":`К карточке {n}`,"{n} of {total}":`{n} из {total}`,"Reading…":`Чтение…`,Skill:`Навык`,Plugin:`Плагин`},Nne={Close:`ปิด`,"Close window":`ปิดหน้าต่าง`,"Minimize window":`ย่อหน้าต่าง`,"Restore window":`คืนค่าหน้าต่าง`,"Maximize window":`ขยายหน้าต่าง`,Resize:`ปรับขนาด`,"Select all":`เลือกทั้งหมด`,"Select row":`เลือกแถว`,"Previous month":`เดือนก่อน`,"Next month":`เดือนถัดไป`,Dismiss:`ปิด`,Breadcrumb:`เส้นทางนำทาง`,Cards:`การ์ด`,"Copy code":`คัดลอกโค้ด`,Copied:`คัดลอกแล้ว`,"Copied!":`คัดลอกแล้ว!`,Copy:`คัดลอก`,"Previous slide":`สไลด์ก่อนหน้า`,"Next slide":`สไลด์ถัดไป`,"Previous card":`การ์ดก่อนหน้า`,"Next card":`การ์ดถัดไป`,"Zoom out":`ซูมออก`,"Zoom in":`ซูมเข้า`,Rotate:`หมุน`,Filter:`กรอง`,"Expand all":`ขยายทั้งหมด`,"Collapse all":`ยุบทั้งหมด`,"Search...":`ค้นหา...`,"Pick a date":`เลือกวันที่`,Select:`เลือก`,"Start typing...":`เริ่มพิมพ์...`,Search:`ค้นหา`,Decrease:`ลด`,Increase:`เพิ่ม`,pagination:`การแบ่งหน้า`,"Go to previous page":`ไปหน้าก่อนหน้า`,"Go to next page":`ไปหน้าถัดไป`,Previous:`ก่อนหน้า`,Next:`ถัดไป`,"More pages":`หน้าเพิ่มเติม`,Remove:`นำออก`,"Go back":`ย้อนกลับ`,"Go forward":`ไปข้างหน้า`,"Reload page":`โหลดหน้าใหม่`,Share:`แชร์`,"New tab":`แท็บใหม่`,Menu:`เมนู`,"Copy command":`คัดลอกคำสั่ง`,"Terminal input":`ช่องพิมพ์เทอร์มินัล`,Seek:`เลื่อนตำแหน่ง`,"Rewind 10 seconds":`ย้อน 10 วินาที`,"Forward 10 seconds":`ไปข้างหน้า 10 วินาที`,Volume:`ระดับเสียง`,"Toggle captions":`เปิดหรือปิดคำบรรยาย`,"Playback speed":`ความเร็วเล่น`,Quality:`คุณภาพ`,"Picture in picture":`ภาพซ้อนภาพ`,Play:`เล่น`,Pause:`หยุดชั่วคราว`,Mute:`ปิดเสียง`,Unmute:`เปิดเสียง`,"Exit fullscreen":`ออกจากเต็มหน้าจอ`,"Enter fullscreen":`เต็มหน้าจอ`,Expand:`ขยาย`,Collapse:`ยุบ`,"Copy reply":`คัดลอกคำตอบ`,"Good result":`ผลลัพธ์ดี`,"Bad result":`ผลลัพธ์ไม่ดี`,"Dialog Close":`ปิดกล่องโต้ตอบ`,Notifications:`การแจ้งเตือน`,Account:`บัญชี`,Cart:`ตะกร้า`,Call:`โทร`,"Video call":`วิดีโอคอล`,Message:`ข้อความ`,Main:`หลัก`,Columns:`คอลัมน์`,"No results.":`ไม่มีผลลัพธ์`,"No results":`ไม่มีผลลัพธ์`,"No results found":`ไม่พบผลลัพธ์`,"Drop files here":`วางไฟล์ที่นี่`,"Drag & drop files here":`ลากแล้ววางไฟล์ที่นี่`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`หรือคลิกเพื่อเลือก (สูงสุด {maxFiles} ไฟล์ ไฟล์ละ {maxSize} MB)`,"Remove {name}":`นำ {name} ออก`,"{selected} of {total} row(s) selected.":`เลือกแล้ว {selected} จาก {total} แถว`,"Try again":`ลองอีกครั้ง`,"What’s up next?":`ต่อไปคืออะไร`,"Show password":`แสดงรหัสผ่าน`,"Hide password":`ซ่อนรหัสผ่าน`,"Search icons":`ค้นหาไอคอน`,"No icon matches":`ไม่มีไอคอนที่ตรงกัน`,"Show all items ({n})":`แสดงทั้งหมด ({n})`,"Fewer {what}":`ลด {what}`,"More {what}":`เพิ่ม {what}`,"No tasks available. Add tasks to display Gantt chart.":`ยังไม่มีงาน เพิ่มงานเพื่อแสดงแผนภูมิ Gantt`,January:`มกราคม`,February:`กุมภาพันธ์`,March:`มีนาคม`,April:`เมษายน`,May:`พฤษภาคม`,June:`มิถุนายน`,July:`กรกฎาคม`,August:`สิงหาคม`,September:`กันยายน`,October:`ตุลาคม`,November:`พฤศจิกายน`,December:`ธันวาคม`,Su:`อา`,Mo:`จ`,Tu:`อ`,We:`พ`,Th:`พฤ`,Fr:`ศ`,Sa:`ส`,"just now":`เมื่อสักครู่`,"in a moment":`อีกครู่`,"in 1 minute":`ใน 1 นาที`,"in {n} minutes":`ใน {n} นาที`,"in 1 hour":`ใน 1 ชั่วโมง`,"in {n} hours":`ใน {n} ชั่วโมง`,tomorrow:`พรุ่งนี้`,"in {n} days":`ใน {n} วัน`,"in 1 week":`ใน 1 สัปดาห์`,"in {n} weeks":`ใน {n} สัปดาห์`,"in 1 month":`ใน 1 เดือน`,"in {n} months":`ใน {n} เดือน`,"in 1 year":`ใน 1 ปี`,"in {n} years":`ใน {n} ปี`,"1 minute ago":`1 นาทีที่แล้ว`,"{n} minutes ago":`{n} นาทีที่แล้ว`,"1 hour ago":`1 ชั่วโมงที่แล้ว`,"{n} hours ago":`{n} ชั่วโมงที่แล้ว`,"1 day ago":`1 วันที่แล้ว`,"{n} days ago":`{n} วันที่แล้ว`,"1 week ago":`1 สัปดาห์ที่แล้ว`,"{n} weeks ago":`{n} สัปดาห์ที่แล้ว`,"1 month ago":`1 เดือนที่แล้ว`,"{n} months ago":`{n} เดือนที่แล้ว`,"1 year ago":`1 ปีที่แล้ว`,"{n} years ago":`{n} ปีที่แล้ว`,"Cookie notice":`ประกาศคุกกี้`,"Cookie preferences":`การตั้งค่าคุกกี้`,"Close and use essential cookies only":`ปิดและใช้เฉพาะคุกกี้ที่จำเป็น`,Back:`กลับ`,"Log in":`เข้าสู่ระบบ`,"Search Hanzo or ask AI":`ค้นหาใน Hanzo หรือถาม AI`,"Search models":`ค้นหาโมเดล`,"Search branches…":`ค้นหาแบรนช์…`,"Search repositories…":`ค้นหาที่เก็บ…`,"Show options":`แสดงตัวเลือก`,Retry:`ลองใหม่`,"Donut chart":`แผนภูมิโดนัท`,"Find an organization":`ค้นหาองค์กร`,Organizations:`องค์กร`,"Organization name":`ชื่อองค์กร`,"Previous page":`หน้าก่อนหน้า`,"Next page":`หน้าถัดไป`,"Continue with credits":`ใช้เครดิตต่อไป`,"Try Hanzo":`ลองใช้ Hanzo`,"Terms & Policies":`ข้อกำหนดและนโยบาย`,"Who this is for":`เหมาะกับใคร`,"Bill yearly":`คิดเงินรายปี`,Apps:`แอป`,"Card actions":`การทำงานของการ์ด`,"Assign to...":`มอบหมายให้...`,"Search cards...":`ค้นหาการ์ด...`,"Clear search":`ล้างการค้นหา`,"Open files":`ไฟล์ที่เปิดอยู่`,"Close panel":`ปิดแผง`,"Add an organization":`เพิ่มองค์กร`,"Keyboard Shortcuts":`แป้นพิมพ์ลัด`,"Run a command":`เรียกใช้คำสั่ง`,"Type shell command...":`พิมพ์คำสั่งเชลล์...`,"Attached to the next message":`แนบกับข้อความถัดไป`,"Channel Member Roster":`สมาชิกช่อง`,"Channel Collaborative Notes":`บันทึกร่วมของช่อง`,"Code Diff Viewer":`ตัวดูส่วนต่างโค้ด`,"Live Voice Call":`สายเสียงสด`,"MCP Server Hub":`ฮับเซิร์ฟเวอร์ MCP`,"Multi-Agent Swarm Bar":`แถบฝูงเอเจนต์`,"Write shared channel notes, meeting agenda, or AI summaries...":`เขียนบันทึกช่อง วาระประชุม หรือสรุปจาก AI...`,"Help improve our AI models":`ช่วยปรับปรุงโมเดล AI ของเรา`,"Your name":`ชื่อของคุณ`,"Your role":`บทบาทของคุณ`,"Country or region":`ประเทศหรือภูมิภาค`,"Card details":`รายละเอียดบัตร`,"Agree to recurring charges":`ยอมรับการเรียกเก็บซ้ำ`,"How you will use Hanzo":`คุณจะใช้ Hanzo อย่างไร`,"Team size":`ขนาดทีม`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`ฉันยอมรับข้อกำหนดการให้บริการและนโยบายการใช้งานที่ยอมรับได้ และยืนยันว่าฉันมีอายุอย่างน้อย 18 ปี`,"Empty string":`สตริงว่าง`,"Empty array":`อาร์เรย์ว่าง`,"Empty object":`อ็อบเจกต์ว่าง`,"Copy {what}":`คัดลอก {what}`,"Ask anything":`ถามอะไรก็ได้`,Auto:`อัตโนมัติ`,Instant:`ทันที`,Low:`ต่ำ`,Medium:`ปานกลาง`,High:`สูง`,Max:`สูงสุด`,Dictate:`สั่งด้วยเสียง`,"Dictating — click to stop":`กำลังสั่งด้วยเสียง — คลิกเพื่อหยุด`,"Dictation settings":`การตั้งค่าการสั่งด้วยเสียง`,Language:`ภาษา`,"No devices found":`ไม่พบอุปกรณ์`,"Microphone {n}":`ไมโครโฟน {n}`,"Nothing matches":`ไม่มีรายการที่ตรงกัน`,Commands:`คำสั่ง`,"Search commands…":`ค้นหาคำสั่ง…`,Agents:`เอเจนต์`,Skills:`ทักษะ`,Connectors:`ตัวเชื่อม`,"Design system":`ระบบดีไซน์`,Plugins:`ปลั๊กอิน`,Devices:`อุปกรณ์`,Memory:`ความจำ`,Research:`ค้นคว้า`,On:`เปิด`,"Upload or add files":`อัปโหลดหรือเพิ่มไฟล์`,"Add files, agents, skills and more":`เพิ่มไฟล์ เอเจนต์ ทักษะ และอื่นๆ`,"No agents yet":`ยังไม่มีเอเจนต์`,"No skills yet":`ยังไม่มีทักษะ`,"No connectors yet":`ยังไม่มีตัวเชื่อม`,"No design system yet":`ยังไม่มีระบบดีไซน์`,"No plugins yet":`ยังไม่มีปลั๊กอิน`,"No devices yet":`ยังไม่มีอุปกรณ์`,"Search agents":`ค้นหาเอเจนต์`,"Search skills":`ค้นหาทักษะ`,"Search connectors":`ค้นหาตัวเชื่อม`,"Search design system":`ค้นหาระบบดีไซน์`,"Search plugins":`ค้นหาปลั๊กอิน`,"Search devices":`ค้นหาอุปกรณ์`,"Reading agents":`กำลังอ่านเอเจนต์`,"Reading skills":`กำลังอ่านทักษะ`,"Reading connectors":`กำลังอ่านตัวเชื่อม`,"Reading design system":`กำลังอ่านระบบดีไซน์`,"Reading plugins":`กำลังอ่านปลั๊กอิน`,"Adaptive reasoning based on task complexity":`การใช้เหตุผลตามความซับซ้อนของงาน`,"Answers right away, without thinking":`ตอบทันทีโดยไม่ต้องคิด`,"A quick pass with minimal thinking":`ผ่านอย่างรวดเร็วโดยคิดน้อย`,"Thinks before answering":`คิดก่อนตอบ`,"Deep reasoning for complex problems":`การใช้เหตุผลเชิงลึกสำหรับปัญหาซับซ้อน`,"Maximum compute and exhaustive verification":`การคำนวณสูงสุดและการตรวจอย่างละเอียด`,Effort:`ระดับความพยายาม`,"Effort: {level}":`ระดับความพยายาม: {level}`,Mode:`โหมด`,"Mode: {mode}":`โหมด: {mode}`,Model:`โมเดล`,"Model: {name}":`โมเดล: {name}`,"Voice mode":`โหมดเสียง`,"Hanzo is speaking — talk to interrupt":`Hanzo กำลังพูด — พูดเพื่อขัดจังหวะ`,"In conversation — click to hang up":`กำลังสนทนา — คลิกเพื่อวางสาย`,"Go to testimonial {n}":`ไปยังคำรับรอง {n}`,"Go to card {n}":`ไปยังการ์ด {n}`,"{n} of {total}":`{n} จาก {total}`,"Reading…":`กำลังอ่าน…`,Skill:`ทักษะ`,Plugin:`ปลั๊กอิน`},Pne={Close:`Kapat`,"Close window":`Pencereyi kapat`,"Minimize window":`Pencereyi küçült`,"Restore window":`Pencereyi geri yükle`,"Maximize window":`Pencereyi büyüt`,Resize:`Yeniden boyutlandır`,"Select all":`Tümünü seç`,"Select row":`Satırı seç`,"Previous month":`Önceki ay`,"Next month":`Sonraki ay`,Dismiss:`Kapat`,Breadcrumb:`Gezinti yolu`,Cards:`Kartlar`,"Copy code":`Kodu kopyala`,Copied:`Kopyalandı`,"Copied!":`Kopyalandı!`,Copy:`Kopyala`,"Previous slide":`Önceki slayt`,"Next slide":`Sonraki slayt`,"Previous card":`Önceki kart`,"Next card":`Sonraki kart`,"Zoom out":`Uzaklaştır`,"Zoom in":`Yakınlaştır`,Rotate:`Döndür`,Filter:`Filtrele`,"Expand all":`Tümünü genişlet`,"Collapse all":`Tümünü daralt`,"Search...":`Ara...`,"Pick a date":`Tarih seçin`,Select:`Seç`,"Start typing...":`Yazmaya başlayın...`,Search:`Ara`,Decrease:`Azalt`,Increase:`Artır`,pagination:`sayfalama`,"Go to previous page":`Önceki sayfaya git`,"Go to next page":`Sonraki sayfaya git`,Previous:`Önceki`,Next:`Sonraki`,"More pages":`Diğer sayfalar`,Remove:`Kaldır`,"Go back":`Geri`,"Go forward":`İleri`,"Reload page":`Sayfayı yenile`,Share:`Paylaş`,"New tab":`Yeni sekme`,Menu:`Menü`,"Copy command":`Komutu kopyala`,"Terminal input":`Terminal girişi`,Seek:`Konum`,"Rewind 10 seconds":`10 saniye geri`,"Forward 10 seconds":`10 saniye ileri`,Volume:`Ses`,"Toggle captions":`Altyazıları aç veya kapat`,"Playback speed":`Oynatma hızı`,Quality:`Kalite`,"Picture in picture":`Resim içinde resim`,Play:`Oynat`,Pause:`Duraklat`,Mute:`Sessize al`,Unmute:`Sesi aç`,"Exit fullscreen":`Tam ekrandan çık`,"Enter fullscreen":`Tam ekran`,Expand:`Genişlet`,Collapse:`Daralt`,"Copy reply":`Yanıtı kopyala`,"Good result":`İyi sonuç`,"Bad result":`Kötü sonuç`,"Dialog Close":`İletişim kutusunu kapat`,Notifications:`Bildirimler`,Account:`Hesap`,Cart:`Sepet`,Call:`Arama`,"Video call":`Görüntülü arama`,Message:`Mesaj`,Main:`Ana`,Columns:`Sütunlar`,"No results.":`Sonuç yok.`,"No results":`Sonuç yok`,"No results found":`Sonuç bulunamadı`,"Drop files here":`Dosyaları buraya bırakın`,"Drag & drop files here":`Dosyaları sürükleyip bırakın`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`veya göz atmak için tıklayın (en fazla {maxFiles} dosya, her biri {maxSize} MB)`,"Remove {name}":`{name} öğesini kaldır`,"{selected} of {total} row(s) selected.":`{total} satırdan {selected} tanesi seçili.`,"Try again":`Yeniden dene`,"What’s up next?":`Sırada ne var?`,"Show password":`Şifreyi göster`,"Hide password":`Şifreyi gizle`,"Search icons":`Simge ara`,"No icon matches":`Eşleşen simge yok`,"Show all items ({n})":`Tümünü göster ({n})`,"Fewer {what}":`Daha az {what}`,"More {what}":`Daha fazla {what}`,"No tasks available. Add tasks to display Gantt chart.":`Görev yok. Gantt grafiğini görmek için görev ekleyin.`,January:`Ocak`,February:`Şubat`,March:`Mart`,April:`Nisan`,May:`Mayıs`,June:`Haziran`,July:`Temmuz`,August:`Ağustos`,September:`Eylül`,October:`Ekim`,November:`Kasım`,December:`Aralık`,Su:`Pz`,Mo:`Pt`,Tu:`Sa`,We:`Ça`,Th:`Pe`,Fr:`Cu`,Sa:`Ct`,"just now":`şimdi`,"in a moment":`birazdan`,"in 1 minute":`1 dakika içinde`,"in {n} minutes":`{n} dakika içinde`,"in 1 hour":`1 saat içinde`,"in {n} hours":`{n} saat içinde`,tomorrow:`yarın`,"in {n} days":`{n} gün içinde`,"in 1 week":`1 hafta içinde`,"in {n} weeks":`{n} hafta içinde`,"in 1 month":`1 ay içinde`,"in {n} months":`{n} ay içinde`,"in 1 year":`1 yıl içinde`,"in {n} years":`{n} yıl içinde`,"1 minute ago":`1 dakika önce`,"{n} minutes ago":`{n} dakika önce`,"1 hour ago":`1 saat önce`,"{n} hours ago":`{n} saat önce`,"1 day ago":`1 gün önce`,"{n} days ago":`{n} gün önce`,"1 week ago":`1 hafta önce`,"{n} weeks ago":`{n} hafta önce`,"1 month ago":`1 ay önce`,"{n} months ago":`{n} ay önce`,"1 year ago":`1 yıl önce`,"{n} years ago":`{n} yıl önce`,"Cookie notice":`Çerez bildirimi`,"Cookie preferences":`Çerez tercihleri`,"Close and use essential cookies only":`Kapat ve yalnızca zorunlu çerezleri kullan`,Back:`Geri`,"Log in":`Giriş yap`,"Search Hanzo or ask AI":`Hanzo’da ara veya yapay zekâya sor`,"Search models":`Model ara`,"Search branches…":`Dalları ara…`,"Search repositories…":`Depoları ara…`,"Show options":`Seçenekleri göster`,Retry:`Yeniden dene`,"Donut chart":`Halka grafik`,"Find an organization":`Kuruluş bul`,Organizations:`Kuruluşlar`,"Organization name":`Kuruluş adı`,"Previous page":`Önceki sayfa`,"Next page":`Sonraki sayfa`,"Continue with credits":`Kredilerle devam et`,"Try Hanzo":`Hanzo’yu dene`,"Terms & Policies":`Koşullar ve politikalar`,"Who this is for":`Kimler için`,"Bill yearly":`Yıllık faturalandır`,Apps:`Uygulamalar`,"Card actions":`Kart işlemleri`,"Assign to...":`Ata...`,"Search cards...":`Kart ara...`,"Clear search":`Aramayı temizle`,"Open files":`Açık dosyalar`,"Close panel":`Paneli kapat`,"Add an organization":`Kuruluş ekle`,"Keyboard Shortcuts":`Klavye kısayolları`,"Run a command":`Komut çalıştır`,"Type shell command...":`Kabuk komutu yazın...`,"Attached to the next message":`Sonraki iletiye eklendi`,"Channel Member Roster":`Kanal üyeleri`,"Channel Collaborative Notes":`Kanalın ortak notları`,"Code Diff Viewer":`Fark görüntüleyici`,"Live Voice Call":`Canlı sesli arama`,"MCP Server Hub":`MCP sunucu merkezi`,"Multi-Agent Swarm Bar":`Çoklu aracı çubuğu`,"Write shared channel notes, meeting agenda, or AI summaries...":`Paylaşılan kanal notları, gündem veya yapay zekâ özetleri yazın...`,"Help improve our AI models":`Yapay zekâ modellerimizi geliştirmeye yardım edin`,"Your name":`Adınız`,"Your role":`Rolünüz`,"Country or region":`Ülke veya bölge`,"Card details":`Kart bilgileri`,"Agree to recurring charges":`Yinelenen ücretleri kabul et`,"How you will use Hanzo":`Hanzo’yu nasıl kullanacağınız`,"Team size":`Ekip büyüklüğü`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Hizmet Şartlarını ve Kabul Edilebilir Kullanım Politikasını kabul ediyor ve en az 18 yaşında olduğumu onaylıyorum.`,"Empty string":`Boş dize`,"Empty array":`Boş dizi`,"Empty object":`Boş nesne`,"Copy {what}":`{what} kopyala`,"Ask anything":`Her şeyi sorun`,Auto:`Otomatik`,Instant:`Anında`,Low:`Düşük`,Medium:`Orta`,High:`Yüksek`,Max:`Maksimum`,Dictate:`Dikte`,"Dictating — click to stop":`Dikte ediliyor — durdurmak için tıklayın`,"Dictation settings":`Dikte ayarları`,Language:`Dil`,"No devices found":`Aygıt bulunamadı`,"Microphone {n}":`Mikrofon {n}`,"Nothing matches":`Eşleşme yok`,Commands:`Komutlar`,"Search commands…":`Komut ara…`,Agents:`Aracılar`,Skills:`Beceriler`,Connectors:`Bağlayıcılar`,"Design system":`Tasarım sistemi`,Plugins:`Eklentiler`,Devices:`Aygıtlar`,Memory:`Bellek`,Research:`Araştırma`,On:`Açık`,"Upload or add files":`Dosya yükle veya ekle`,"Add files, agents, skills and more":`Dosya, aracı, beceri ve daha fazlasını ekle`,"No agents yet":`Henüz aracı yok`,"No skills yet":`Henüz beceri yok`,"No connectors yet":`Henüz bağlayıcı yok`,"No design system yet":`Henüz tasarım sistemi yok`,"No plugins yet":`Henüz eklenti yok`,"No devices yet":`Henüz aygıt yok`,"Search agents":`Aracı ara`,"Search skills":`Beceri ara`,"Search connectors":`Bağlayıcı ara`,"Search design system":`Tasarım sisteminde ara`,"Search plugins":`Eklenti ara`,"Search devices":`Aygıt ara`,"Reading agents":`Aracılar okunuyor`,"Reading skills":`Beceriler okunuyor`,"Reading connectors":`Bağlayıcılar okunuyor`,"Reading design system":`Tasarım sistemi okunuyor`,"Reading plugins":`Eklentiler okunuyor`,"Adaptive reasoning based on task complexity":`Görevin karmaşıklığına göre uyarlanabilir akıl yürütme`,"Answers right away, without thinking":`Düşünmeden hemen yanıt verir`,"A quick pass with minimal thinking":`Az düşünerek hızlı bir geçiş`,"Thinks before answering":`Yanıtlamadan önce düşünür`,"Deep reasoning for complex problems":`Karmaşık sorunlar için derin akıl yürütme`,"Maximum compute and exhaustive verification":`En yüksek hesap ve kapsamlı doğrulama`,Effort:`Çaba`,"Effort: {level}":`Çaba: {level}`,Mode:`Mod`,"Mode: {mode}":`Mod: {mode}`,Model:`Model`,"Model: {name}":`Model: {name}`,"Voice mode":`Ses modu`,"Hanzo is speaking — talk to interrupt":`Hanzo konuşuyor — kesmek için konuşun`,"In conversation — click to hang up":`Görüşmede — kapatmak için tıklayın`,"Go to testimonial {n}":`{n}. görüşe git`,"Go to card {n}":`{n}. karta git`,"{n} of {total}":`{n} / {total}`,"Reading…":`Okunuyor…`,Skill:`Beceri`,Plugin:`Eklenti`},Fne={Close:`Đóng`,"Close window":`Đóng cửa sổ`,"Minimize window":`Thu nhỏ cửa sổ`,"Restore window":`Khôi phục cửa sổ`,"Maximize window":`Phóng to cửa sổ`,Resize:`Đổi kích thước`,"Select all":`Chọn tất cả`,"Select row":`Chọn hàng`,"Previous month":`Tháng trước`,"Next month":`Tháng sau`,Dismiss:`Bỏ qua`,Breadcrumb:`Đường dẫn`,Cards:`Thẻ`,"Copy code":`Sao chép mã`,Copied:`Đã sao chép`,"Copied!":`Đã sao chép!`,Copy:`Sao chép`,"Previous slide":`Trang trước`,"Next slide":`Trang sau`,"Previous card":`Thẻ trước`,"Next card":`Thẻ sau`,"Zoom out":`Thu nhỏ`,"Zoom in":`Phóng to`,Rotate:`Xoay`,Filter:`Lọc`,"Expand all":`Mở rộng tất cả`,"Collapse all":`Thu gọn tất cả`,"Search...":`Tìm kiếm...`,"Pick a date":`Chọn ngày`,Select:`Chọn`,"Start typing...":`Bắt đầu nhập...`,Search:`Tìm kiếm`,Decrease:`Giảm`,Increase:`Tăng`,pagination:`phân trang`,"Go to previous page":`Đến trang trước`,"Go to next page":`Đến trang sau`,Previous:`Trước`,Next:`Tiếp`,"More pages":`Thêm trang`,Remove:`Xóa`,"Go back":`Quay lại`,"Go forward":`Tiến`,"Reload page":`Tải lại trang`,Share:`Chia sẻ`,"New tab":`Tab mới`,Menu:`Menu`,"Copy command":`Sao chép lệnh`,"Terminal input":`Nhập lệnh`,Seek:`Tua`,"Rewind 10 seconds":`Tua lại 10 giây`,"Forward 10 seconds":`Tua đi 10 giây`,Volume:`Âm lượng`,"Toggle captions":`Bật hoặc tắt phụ đề`,"Playback speed":`Tốc độ phát`,Quality:`Chất lượng`,"Picture in picture":`Hình trong hình`,Play:`Phát`,Pause:`Tạm dừng`,Mute:`Tắt tiếng`,Unmute:`Bật tiếng`,"Exit fullscreen":`Thoát toàn màn hình`,"Enter fullscreen":`Toàn màn hình`,Expand:`Mở rộng`,Collapse:`Thu gọn`,"Copy reply":`Sao chép câu trả lời`,"Good result":`Kết quả tốt`,"Bad result":`Kết quả kém`,"Dialog Close":`Đóng hộp thoại`,Notifications:`Thông báo`,Account:`Tài khoản`,Cart:`Giỏ hàng`,Call:`Cuộc gọi`,"Video call":`Cuộc gọi video`,Message:`Tin nhắn`,Main:`Chính`,Columns:`Cột`,"No results.":`Không có kết quả.`,"No results":`Không có kết quả`,"No results found":`Không tìm thấy kết quả`,"Drop files here":`Thả tệp vào đây`,"Drag & drop files here":`Kéo và thả tệp vào đây`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`hoặc bấm để duyệt (tối đa {maxFiles} tệp, mỗi tệp {maxSize} MB)`,"Remove {name}":`Xóa {name}`,"{selected} of {total} row(s) selected.":`Đã chọn {selected} / {total} hàng.`,"Try again":`Thử lại`,"What’s up next?":`Tiếp theo là gì?`,"Show password":`Hiện mật khẩu`,"Hide password":`Ẩn mật khẩu`,"Search icons":`Tìm biểu tượng`,"No icon matches":`Không có biểu tượng khớp`,"Show all items ({n})":`Hiện tất cả ({n})`,"Fewer {what}":`Ít {what} hơn`,"More {what}":`Thêm {what}`,"No tasks available. Add tasks to display Gantt chart.":`Chưa có công việc. Thêm công việc để hiện biểu đồ Gantt.`,January:`tháng 1`,February:`tháng 2`,March:`tháng 3`,April:`tháng 4`,May:`tháng 5`,June:`tháng 6`,July:`tháng 7`,August:`tháng 8`,September:`tháng 9`,October:`tháng 10`,November:`tháng 11`,December:`tháng 12`,Su:`CN`,Mo:`T2`,Tu:`T3`,We:`T4`,Th:`T5`,Fr:`T6`,Sa:`T7`,"just now":`vừa xong`,"in a moment":`chốc nữa`,"in 1 minute":`sau 1 phút`,"in {n} minutes":`sau {n} phút`,"in 1 hour":`sau 1 giờ`,"in {n} hours":`sau {n} giờ`,tomorrow:`ngày mai`,"in {n} days":`sau {n} ngày`,"in 1 week":`sau 1 tuần`,"in {n} weeks":`sau {n} tuần`,"in 1 month":`sau 1 tháng`,"in {n} months":`sau {n} tháng`,"in 1 year":`sau 1 năm`,"in {n} years":`sau {n} năm`,"1 minute ago":`1 phút trước`,"{n} minutes ago":`{n} phút trước`,"1 hour ago":`1 giờ trước`,"{n} hours ago":`{n} giờ trước`,"1 day ago":`1 ngày trước`,"{n} days ago":`{n} ngày trước`,"1 week ago":`1 tuần trước`,"{n} weeks ago":`{n} tuần trước`,"1 month ago":`1 tháng trước`,"{n} months ago":`{n} tháng trước`,"1 year ago":`1 năm trước`,"{n} years ago":`{n} năm trước`,"Cookie notice":`Thông báo cookie`,"Cookie preferences":`Tùy chọn cookie`,"Close and use essential cookies only":`Đóng và chỉ dùng cookie thiết yếu`,Back:`Quay lại`,"Log in":`Đăng nhập`,"Search Hanzo or ask AI":`Tìm trong Hanzo hoặc hỏi AI`,"Search models":`Tìm mô hình`,"Search branches…":`Tìm nhánh…`,"Search repositories…":`Tìm kho…`,"Show options":`Hiện tùy chọn`,Retry:`Thử lại`,"Donut chart":`Biểu đồ vành khuyên`,"Find an organization":`Tìm tổ chức`,Organizations:`Tổ chức`,"Organization name":`Tên tổ chức`,"Previous page":`Trang trước`,"Next page":`Trang sau`,"Continue with credits":`Tiếp tục bằng tín dụng`,"Try Hanzo":`Dùng thử Hanzo`,"Terms & Policies":`Điều khoản và chính sách`,"Who this is for":`Dành cho ai`,"Bill yearly":`Thanh toán theo năm`,Apps:`Ứng dụng`,"Card actions":`Thao tác thẻ`,"Assign to...":`Gán cho...`,"Search cards...":`Tìm thẻ...`,"Clear search":`Xóa tìm kiếm`,"Open files":`Tệp đang mở`,"Close panel":`Đóng bảng`,"Add an organization":`Thêm tổ chức`,"Keyboard Shortcuts":`Phím tắt`,"Run a command":`Chạy lệnh`,"Type shell command...":`Nhập lệnh shell...`,"Attached to the next message":`Đính kèm tin nhắn tiếp theo`,"Channel Member Roster":`Thành viên kênh`,"Channel Collaborative Notes":`Ghi chú cộng tác của kênh`,"Code Diff Viewer":`Trình xem khác biệt mã`,"Live Voice Call":`Cuộc gọi thoại trực tiếp`,"MCP Server Hub":`Trung tâm máy chủ MCP`,"Multi-Agent Swarm Bar":`Thanh bầy tác nhân`,"Write shared channel notes, meeting agenda, or AI summaries...":`Viết ghi chú kênh, chương trình họp hoặc tóm tắt AI...`,"Help improve our AI models":`Giúp cải thiện mô hình AI của chúng tôi`,"Your name":`Tên của bạn`,"Your role":`Vai trò của bạn`,"Country or region":`Quốc gia hoặc khu vực`,"Card details":`Thông tin thẻ`,"Agree to recurring charges":`Đồng ý các khoản phí định kỳ`,"How you will use Hanzo":`Bạn sẽ dùng Hanzo thế nào`,"Team size":`Quy mô nhóm`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`Tôi đồng ý với Điều khoản dịch vụ và Chính sách sử dụng được chấp nhận và xác nhận tôi đủ 18 tuổi.`,"Empty string":`Chuỗi rỗng`,"Empty array":`Mảng rỗng`,"Empty object":`Đối tượng rỗng`,"Copy {what}":`Sao chép {what}`,"Ask anything":`Hỏi bất cứ điều gì`,Auto:`Tự động`,Instant:`Tức thì`,Low:`Thấp`,Medium:`Trung bình`,High:`Cao`,Max:`Tối đa`,Dictate:`Đọc chính tả`,"Dictating — click to stop":`Đang đọc — bấm để dừng`,"Dictation settings":`Cài đặt đọc chính tả`,Language:`Ngôn ngữ`,"No devices found":`Không tìm thấy thiết bị`,"Microphone {n}":`Micro {n}`,"Nothing matches":`Không có gì khớp`,Commands:`Lệnh`,"Search commands…":`Tìm lệnh…`,Agents:`Tác nhân`,Skills:`Kỹ năng`,Connectors:`Trình kết nối`,"Design system":`Hệ thống thiết kế`,Plugins:`Plugin`,Devices:`Thiết bị`,Memory:`Bộ nhớ`,Research:`Nghiên cứu`,On:`Bật`,"Upload or add files":`Tải lên hoặc thêm tệp`,"Add files, agents, skills and more":`Thêm tệp, tác nhân, kỹ năng và hơn thế`,"No agents yet":`Chưa có tác nhân`,"No skills yet":`Chưa có kỹ năng`,"No connectors yet":`Chưa có trình kết nối`,"No design system yet":`Chưa có hệ thống thiết kế`,"No plugins yet":`Chưa có plugin`,"No devices yet":`Chưa có thiết bị`,"Search agents":`Tìm tác nhân`,"Search skills":`Tìm kỹ năng`,"Search connectors":`Tìm trình kết nối`,"Search design system":`Tìm trong hệ thống thiết kế`,"Search plugins":`Tìm plugin`,"Search devices":`Tìm thiết bị`,"Reading agents":`Đang đọc tác nhân`,"Reading skills":`Đang đọc kỹ năng`,"Reading connectors":`Đang đọc trình kết nối`,"Reading design system":`Đang đọc hệ thống thiết kế`,"Reading plugins":`Đang đọc plugin`,"Adaptive reasoning based on task complexity":`Suy luận thích ứng theo độ phức tạp`,"Answers right away, without thinking":`Trả lời ngay, không suy nghĩ`,"A quick pass with minimal thinking":`Một lượt nhanh, ít suy nghĩ`,"Thinks before answering":`Suy nghĩ trước khi trả lời`,"Deep reasoning for complex problems":`Suy luận sâu cho vấn đề phức tạp`,"Maximum compute and exhaustive verification":`Tính toán tối đa và kiểm tra toàn diện`,Effort:`Mức nỗ lực`,"Effort: {level}":`Mức nỗ lực: {level}`,Mode:`Chế độ`,"Mode: {mode}":`Chế độ: {mode}`,Model:`Mô hình`,"Model: {name}":`Mô hình: {name}`,"Voice mode":`Chế độ giọng nói`,"Hanzo is speaking — talk to interrupt":`Hanzo đang nói — hãy nói để ngắt`,"In conversation — click to hang up":`Đang trò chuyện — bấm để gác máy`,"Go to testimonial {n}":`Đến lời nhận xét {n}`,"Go to card {n}":`Đến thẻ {n}`,"{n} of {total}":`{n} / {total}`,"Reading…":`Đang đọc…`,Skill:`Kỹ năng`,Plugin:`Plugin`},Ine={Close:`关闭`,"Close window":`关闭窗口`,"Minimize window":`最小化窗口`,"Restore window":`还原窗口`,"Maximize window":`最大化窗口`,Resize:`调整大小`,"Select all":`全选`,"Select row":`选择行`,"Previous month":`上个月`,"Next month":`下个月`,Dismiss:`关闭`,Breadcrumb:`面包屑`,Cards:`卡片`,"Copy code":`复制代码`,Copied:`已复制`,"Copied!":`已复制!`,Copy:`复制`,"Previous slide":`上一张`,"Next slide":`下一张`,"Previous card":`上一张卡片`,"Next card":`下一张卡片`,"Zoom out":`缩小`,"Zoom in":`放大`,Rotate:`旋转`,Filter:`筛选`,"Expand all":`全部展开`,"Collapse all":`全部折叠`,"Search...":`搜索...`,"Pick a date":`选择日期`,Select:`选择`,"Start typing...":`开始输入...`,Search:`搜索`,Decrease:`减少`,Increase:`增加`,pagination:`分页`,"Go to previous page":`转到上一页`,"Go to next page":`转到下一页`,Previous:`上一页`,Next:`下一页`,"More pages":`更多页面`,Remove:`移除`,"Go back":`返回`,"Go forward":`前进`,"Reload page":`重新加载页面`,Share:`分享`,"New tab":`新标签页`,Menu:`菜单`,"Copy command":`复制命令`,"Terminal input":`终端输入`,Seek:`拖动进度`,"Rewind 10 seconds":`后退 10 秒`,"Forward 10 seconds":`快进 10 秒`,Volume:`音量`,"Toggle captions":`开关字幕`,"Playback speed":`播放速度`,Quality:`画质`,"Picture in picture":`画中画`,Play:`播放`,Pause:`暂停`,Mute:`静音`,Unmute:`取消静音`,"Exit fullscreen":`退出全屏`,"Enter fullscreen":`全屏`,Expand:`展开`,Collapse:`折叠`,"Copy reply":`复制回复`,"Good result":`结果好`,"Bad result":`结果不好`,"Dialog Close":`关闭对话框`,Notifications:`通知`,Account:`账户`,Cart:`购物车`,Call:`通话`,"Video call":`视频通话`,Message:`消息`,Main:`主导航`,Columns:`列`,"No results.":`没有结果。`,"No results":`无结果`,"No results found":`未找到结果`,"Drop files here":`将文件拖放到此处`,"Drag & drop files here":`拖放文件到此处`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`或点击浏览(最多 {maxFiles} 个文件,每个 {maxSize} MB)`,"Remove {name}":`移除 {name}`,"{selected} of {total} row(s) selected.":`已选择 {selected}/{total} 行。`,"Try again":`重试`,"What’s up next?":`接下来做什么?`,"Show password":`显示密码`,"Hide password":`隐藏密码`,"Search icons":`搜索图标`,"No icon matches":`没有匹配的图标`,"Show all items ({n})":`显示全部 ({n})`,"Fewer {what}":`减少{what}`,"More {what}":`增加{what}`,"No tasks available. Add tasks to display Gantt chart.":`没有任务。添加任务以显示甘特图。`,January:`一月`,February:`二月`,March:`三月`,April:`四月`,May:`五月`,June:`六月`,July:`七月`,August:`八月`,September:`九月`,October:`十月`,November:`十一月`,December:`十二月`,Su:`日`,Mo:`一`,Tu:`二`,We:`三`,Th:`四`,Fr:`五`,Sa:`六`,"just now":`刚刚`,"in a moment":`片刻后`,"in 1 minute":`1 分钟后`,"in {n} minutes":`{n} 分钟后`,"in 1 hour":`1 小时后`,"in {n} hours":`{n} 小时后`,tomorrow:`明天`,"in {n} days":`{n} 天后`,"in 1 week":`1 周后`,"in {n} weeks":`{n} 周后`,"in 1 month":`1 个月后`,"in {n} months":`{n} 个月后`,"in 1 year":`1 年后`,"in {n} years":`{n} 年后`,"1 minute ago":`1 分钟前`,"{n} minutes ago":`{n} 分钟前`,"1 hour ago":`1 小时前`,"{n} hours ago":`{n} 小时前`,"1 day ago":`1 天前`,"{n} days ago":`{n} 天前`,"1 week ago":`1 周前`,"{n} weeks ago":`{n} 周前`,"1 month ago":`1 个月前`,"{n} months ago":`{n} 个月前`,"1 year ago":`1 年前`,"{n} years ago":`{n} 年前`,"Cookie notice":`Cookie 提示`,"Cookie preferences":`Cookie 偏好`,"Close and use essential cookies only":`关闭并仅使用必要 Cookie`,Back:`返回`,"Log in":`登录`,"Search Hanzo or ask AI":`搜索 Hanzo 或询问 AI`,"Search models":`搜索模型`,"Search branches…":`搜索分支…`,"Search repositories…":`搜索仓库…`,"Show options":`显示选项`,Retry:`重试`,"Donut chart":`环形图`,"Find an organization":`查找组织`,Organizations:`组织`,"Organization name":`组织名称`,"Previous page":`上一页`,"Next page":`下一页`,"Continue with credits":`使用额度继续`,"Try Hanzo":`试用 Hanzo`,"Terms & Policies":`条款与政策`,"Who this is for":`适合谁`,"Bill yearly":`按年计费`,Apps:`应用`,"Card actions":`卡片操作`,"Assign to...":`分配给...`,"Search cards...":`搜索卡片...`,"Clear search":`清除搜索`,"Open files":`打开的文件`,"Close panel":`关闭面板`,"Add an organization":`添加组织`,"Keyboard Shortcuts":`键盘快捷键`,"Run a command":`运行命令`,"Type shell command...":`输入 shell 命令...`,"Attached to the next message":`附加到下一条消息`,"Channel Member Roster":`频道成员`,"Channel Collaborative Notes":`频道协作笔记`,"Code Diff Viewer":`代码差异查看器`,"Live Voice Call":`实时语音通话`,"MCP Server Hub":`MCP 服务器中心`,"Multi-Agent Swarm Bar":`多智能体群集栏`,"Write shared channel notes, meeting agenda, or AI summaries...":`撰写频道笔记、会议议程或 AI 摘要...`,"Help improve our AI models":`帮助改进我们的 AI 模型`,"Your name":`你的名字`,"Your role":`你的角色`,"Country or region":`国家或地区`,"Card details":`银行卡信息`,"Agree to recurring charges":`同意周期性扣款`,"How you will use Hanzo":`你将如何使用 Hanzo`,"Team size":`团队规模`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`我同意服务条款和可接受使用政策,并确认我已年满 18 岁。`,"Empty string":`空字符串`,"Empty array":`空数组`,"Empty object":`空对象`,"Copy {what}":`复制{what}`,"Ask anything":`尽管问`,Auto:`自动`,Instant:`即时`,Low:`低`,Medium:`中`,High:`高`,Max:`最大`,Dictate:`听写`,"Dictating — click to stop":`正在听写 — 点击停止`,"Dictation settings":`听写设置`,Language:`语言`,"No devices found":`未找到设备`,"Microphone {n}":`麦克风 {n}`,"Nothing matches":`没有匹配项`,Commands:`命令`,"Search commands…":`搜索命令…`,Agents:`智能体`,Skills:`技能`,Connectors:`连接器`,"Design system":`设计系统`,Plugins:`插件`,Devices:`设备`,Memory:`记忆`,Research:`研究`,On:`开`,"Upload or add files":`上传或添加文件`,"Add files, agents, skills and more":`添加文件、智能体、技能等`,"No agents yet":`还没有智能体`,"No skills yet":`还没有技能`,"No connectors yet":`还没有连接器`,"No design system yet":`还没有设计系统`,"No plugins yet":`还没有插件`,"No devices yet":`还没有设备`,"Search agents":`搜索智能体`,"Search skills":`搜索技能`,"Search connectors":`搜索连接器`,"Search design system":`搜索设计系统`,"Search plugins":`搜索插件`,"Search devices":`搜索设备`,"Reading agents":`正在读取智能体`,"Reading skills":`正在读取技能`,"Reading connectors":`正在读取连接器`,"Reading design system":`正在读取设计系统`,"Reading plugins":`正在读取插件`,"Adaptive reasoning based on task complexity":`根据任务复杂度自适应推理`,"Answers right away, without thinking":`立即回答,不进行思考`,"A quick pass with minimal thinking":`快速过一遍,少思考`,"Thinks before answering":`先想再答`,"Deep reasoning for complex problems":`针对复杂问题的深度推理`,"Maximum compute and exhaustive verification":`最大算力与穷尽验证`,Effort:`力度`,"Effort: {level}":`力度:{level}`,Mode:`模式`,"Mode: {mode}":`模式:{mode}`,Model:`模型`,"Model: {name}":`模型:{name}`,"Voice mode":`语音模式`,"Hanzo is speaking — talk to interrupt":`Hanzo 正在说话 — 开口即可打断`,"In conversation — click to hang up":`通话中 — 点击挂断`,"Go to testimonial {n}":`转到评价 {n}`,"Go to card {n}":`转到卡片 {n}`,"{n} of {total}":`{n} / {total}`,"Reading…":`正在读取…`,Skill:`技能`,Plugin:`插件`},Lne={Close:`關閉`,"Close window":`關閉視窗`,"Minimize window":`最小化視窗`,"Restore window":`還原視窗`,"Maximize window":`最大化視窗`,Resize:`調整大小`,"Select all":`全選`,"Select row":`選擇列`,"Previous month":`上個月`,"Next month":`下個月`,Dismiss:`關閉`,Breadcrumb:`導覽路徑`,Cards:`卡片`,"Copy code":`複製程式碼`,Copied:`已複製`,"Copied!":`已複製!`,Copy:`複製`,"Previous slide":`上一張`,"Next slide":`下一張`,"Previous card":`上一張卡片`,"Next card":`下一張卡片`,"Zoom out":`縮小`,"Zoom in":`放大`,Rotate:`旋轉`,Filter:`篩選`,"Expand all":`全部展開`,"Collapse all":`全部摺疊`,"Search...":`搜尋...`,"Pick a date":`選擇日期`,Select:`選擇`,"Start typing...":`開始輸入...`,Search:`搜尋`,Decrease:`減少`,Increase:`增加`,pagination:`分頁`,"Go to previous page":`前往上一頁`,"Go to next page":`前往下一頁`,Previous:`上一頁`,Next:`下一頁`,"More pages":`更多頁面`,Remove:`移除`,"Go back":`返回`,"Go forward":`前進`,"Reload page":`重新載入頁面`,Share:`分享`,"New tab":`新分頁`,Menu:`選單`,"Copy command":`複製指令`,"Terminal input":`終端機輸入`,Seek:`拖曳進度`,"Rewind 10 seconds":`後退 10 秒`,"Forward 10 seconds":`快轉 10 秒`,Volume:`音量`,"Toggle captions":`開關字幕`,"Playback speed":`播放速度`,Quality:`畫質`,"Picture in picture":`子母畫面`,Play:`播放`,Pause:`暫停`,Mute:`靜音`,Unmute:`取消靜音`,"Exit fullscreen":`結束全螢幕`,"Enter fullscreen":`全螢幕`,Expand:`展開`,Collapse:`摺疊`,"Copy reply":`複製回覆`,"Good result":`結果好`,"Bad result":`結果不好`,"Dialog Close":`關閉對話方塊`,Notifications:`通知`,Account:`帳戶`,Cart:`購物車`,Call:`通話`,"Video call":`視訊通話`,Message:`訊息`,Main:`主導覽`,Columns:`欄`,"No results.":`沒有結果。`,"No results":`無結果`,"No results found":`找不到結果`,"Drop files here":`將檔案拖放到這裡`,"Drag & drop files here":`拖放檔案到這裡`,"or click to browse (max {maxFiles} files, {maxSize}MB each)":`或點擊瀏覽(最多 {maxFiles} 個檔案,每個 {maxSize} MB)`,"Remove {name}":`移除 {name}`,"{selected} of {total} row(s) selected.":`已選取 {selected}/{total} 列。`,"Try again":`再試一次`,"What’s up next?":`接下來做什麼?`,"Show password":`顯示密碼`,"Hide password":`隱藏密碼`,"Search icons":`搜尋圖示`,"No icon matches":`沒有相符的圖示`,"Show all items ({n})":`顯示全部 ({n})`,"Fewer {what}":`減少{what}`,"More {what}":`增加{what}`,"No tasks available. Add tasks to display Gantt chart.":`沒有任務。新增任務以顯示甘特圖。`,January:`一月`,February:`二月`,March:`三月`,April:`四月`,May:`五月`,June:`六月`,July:`七月`,August:`八月`,September:`九月`,October:`十月`,November:`十一月`,December:`十二月`,Su:`日`,Mo:`一`,Tu:`二`,We:`三`,Th:`四`,Fr:`五`,Sa:`六`,"just now":`剛剛`,"in a moment":`稍後`,"in 1 minute":`1 分鐘後`,"in {n} minutes":`{n} 分鐘後`,"in 1 hour":`1 小時後`,"in {n} hours":`{n} 小時後`,tomorrow:`明天`,"in {n} days":`{n} 天後`,"in 1 week":`1 週後`,"in {n} weeks":`{n} 週後`,"in 1 month":`1 個月後`,"in {n} months":`{n} 個月後`,"in 1 year":`1 年後`,"in {n} years":`{n} 年後`,"1 minute ago":`1 分鐘前`,"{n} minutes ago":`{n} 分鐘前`,"1 hour ago":`1 小時前`,"{n} hours ago":`{n} 小時前`,"1 day ago":`1 天前`,"{n} days ago":`{n} 天前`,"1 week ago":`1 週前`,"{n} weeks ago":`{n} 週前`,"1 month ago":`1 個月前`,"{n} months ago":`{n} 個月前`,"1 year ago":`1 年前`,"{n} years ago":`{n} 年前`,"Cookie notice":`Cookie 通知`,"Cookie preferences":`Cookie 偏好`,"Close and use essential cookies only":`關閉並僅使用必要 Cookie`,Back:`返回`,"Log in":`登入`,"Search Hanzo or ask AI":`搜尋 Hanzo 或詢問 AI`,"Search models":`搜尋模型`,"Search branches…":`搜尋分支…`,"Search repositories…":`搜尋存放庫…`,"Show options":`顯示選項`,Retry:`重試`,"Donut chart":`環形圖`,"Find an organization":`尋找組織`,Organizations:`組織`,"Organization name":`組織名稱`,"Previous page":`上一頁`,"Next page":`下一頁`,"Continue with credits":`使用額度繼續`,"Try Hanzo":`試用 Hanzo`,"Terms & Policies":`條款與政策`,"Who this is for":`適合誰`,"Bill yearly":`按年計費`,Apps:`應用程式`,"Card actions":`卡片操作`,"Assign to...":`指派給...`,"Search cards...":`搜尋卡片...`,"Clear search":`清除搜尋`,"Open files":`開啟的檔案`,"Close panel":`關閉面板`,"Add an organization":`新增組織`,"Keyboard Shortcuts":`鍵盤快速鍵`,"Run a command":`執行指令`,"Type shell command...":`輸入 shell 指令...`,"Attached to the next message":`附加到下一則訊息`,"Channel Member Roster":`頻道成員`,"Channel Collaborative Notes":`頻道協作筆記`,"Code Diff Viewer":`程式碼差異檢視`,"Live Voice Call":`即時語音通話`,"MCP Server Hub":`MCP 伺服器中心`,"Multi-Agent Swarm Bar":`多代理群集列`,"Write shared channel notes, meeting agenda, or AI summaries...":`撰寫頻道筆記、會議議程或 AI 摘要...`,"Help improve our AI models":`協助改進我們的 AI 模型`,"Your name":`你的名字`,"Your role":`你的角色`,"Country or region":`國家或地區`,"Card details":`卡片資訊`,"Agree to recurring charges":`同意週期性扣款`,"How you will use Hanzo":`你會如何使用 Hanzo`,"Team size":`團隊規模`,"I agree to the Terms of Service and Acceptable Use Policy and confirm that I am at least 18 years of age":`我同意服務條款與可接受使用政策,並確認我已年滿 18 歲。`,"Empty string":`空字串`,"Empty array":`空陣列`,"Empty object":`空物件`,"Copy {what}":`複製{what}`,"Ask anything":`儘管問`,Auto:`自動`,Instant:`即時`,Low:`低`,Medium:`中`,High:`高`,Max:`最大`,Dictate:`聽寫`,"Dictating — click to stop":`正在聽寫 — 點擊停止`,"Dictation settings":`聽寫設定`,Language:`語言`,"No devices found":`找不到裝置`,"Microphone {n}":`麥克風 {n}`,"Nothing matches":`沒有相符項目`,Commands:`指令`,"Search commands…":`搜尋指令…`,Agents:`代理`,Skills:`技能`,Connectors:`連接器`,"Design system":`設計系統`,Plugins:`外掛`,Devices:`裝置`,Memory:`記憶`,Research:`研究`,On:`開`,"Upload or add files":`上傳或新增檔案`,"Add files, agents, skills and more":`新增檔案、代理、技能等`,"No agents yet":`還沒有代理`,"No skills yet":`還沒有技能`,"No connectors yet":`還沒有連接器`,"No design system yet":`還沒有設計系統`,"No plugins yet":`還沒有外掛`,"No devices yet":`還沒有裝置`,"Search agents":`搜尋代理`,"Search skills":`搜尋技能`,"Search connectors":`搜尋連接器`,"Search design system":`搜尋設計系統`,"Search plugins":`搜尋外掛`,"Search devices":`搜尋裝置`,"Reading agents":`正在讀取代理`,"Reading skills":`正在讀取技能`,"Reading connectors":`正在讀取連接器`,"Reading design system":`正在讀取設計系統`,"Reading plugins":`正在讀取外掛`,"Adaptive reasoning based on task complexity":`依任務複雜度調整的推理`,"Answers right away, without thinking":`立即回答,不進行思考`,"A quick pass with minimal thinking":`快速過一遍,少思考`,"Thinks before answering":`先想再答`,"Deep reasoning for complex problems":`針對複雜問題的深度推理`,"Maximum compute and exhaustive verification":`最大算力與徹底驗證`,Effort:`力度`,"Effort: {level}":`力度:{level}`,Mode:`模式`,"Mode: {mode}":`模式:{mode}`,Model:`模型`,"Model: {name}":`模型:{name}`,"Voice mode":`語音模式`,"Hanzo is speaking — talk to interrupt":`Hanzo 正在說話 — 開口即可打斷`,"In conversation — click to hang up":`通話中 — 點擊掛斷`,"Go to testimonial {n}":`前往評價 {n}`,"Go to card {n}":`前往卡片 {n}`,"{n} of {total}":`{n} / {total}`,"Reading…":`正在讀取…`,Skill:`技能`,Plugin:`外掛`},Zz=e=>e,Rne={ar:Zz(Sne),"de-DE":Zz(Cne),"es-ES":Zz(wne),"fr-FR":Zz(Tne),"hi-IN":Zz(Ene),"id-ID":Zz(Dne),"it-IT":Zz(One),"ja-JP":Zz(kne),"ko-KR":Zz(Ane),"pt-BR":Zz(jne),ru:Zz(Mne),th:Zz(Nne),tr:Zz(Pne),vi:Zz(Fne),"zh-Hans":Zz(Ine),"zh-Hant":Zz(Lne)},Qz=e=>Rne[e]??{},zne={display:`contents`};function Bne({children:e,locale:t,messages:n,syncDocument:r=!1}){let i=EL(t),a=jL(i,n?{...Qz(i),...n}:Qz(i)),o=DL(i),s=OL(t);return(0,V.useLayoutEffect)(()=>{if(!r||typeof document>`u`)return;let e=document.documentElement,t=e.lang,n=e.dir;return e.lang=s,e.dir=o,()=>{e.lang=t,e.dir=n}},[r,s,o]),(0,H.jsx)(AL.Provider,{value:a,children:(0,H.jsx)(`div`,{dir:o,lang:s,style:zne,children:e})})}var Vne=(0,V.createContext)(null),Hne=({children:e,theme:t,analytics:n,config:r=bS,appearance:i,locale:a,messages:o})=>{let{pref:s,set:c}=Gz(i),l=(0,V.useMemo)(()=>({pref:s,set:c}),[s,c]),u=Vz(),d=a||o?(0,H.jsx)(Bne,{locale:a,messages:o,children:e}):e,f=(0,H.jsx)(Vne.Provider,{value:l,children:(0,H.jsx)(rp,{config:r,defaultTheme:t??u,disableInjectCSS:!0,children:d})});return n?(0,H.jsx)(tp,{...n===!0?{}:n,children:f}):f},Une=({size:e=11,label:t})=>(0,H.jsxs)(`svg`,{width:e*30/14,height:e,viewBox:`0 0 30 14`,focusable:`false`,...t?{role:`img`,"aria-label":t}:{"aria-hidden":!0},style:{flexShrink:0,display:`block`},children:[(0,H.jsx)(`path`,{d:`M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z`,fill:`#fff`,fillRule:`evenodd`,clipRule:`evenodd`}),(0,H.jsx)(`path`,{d:`M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z`,fill:`#06f`,fillRule:`evenodd`,clipRule:`evenodd`}),(0,H.jsx)(`path`,{d:`M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z`,fill:`#fff`}),(0,H.jsx)(`path`,{d:`M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z`,fill:`#06f`})]}),$z=`hzconsent-open`,eB=`#choices`,Wne=1500,Gne=()=>{let e=Oe();return e.region?e.mode:void 0},Kne=Symbol.for(`hanzo.ui.consent.links`),tB=`hzconsent-links`;function qne(){if((globalThis[Kne]??0)>0)return!0;for(let e of document.querySelectorAll(`a[href*="${eB}"]`))try{let t=new URL(e.getAttribute(`href`)??``,document.baseURI);if(t.hash===eB&&t.origin===window.location.origin)return!0}catch{}return!1}var Jne=(e,t,n,r)=>[{id:`necessary`,title:e(`Strictly Necessary Cookies`),body:e(`These are needed for the site to work, so they are always on. They keep you signed in and your session secure, protect forms against cross-site request forgery, spread traffic across servers, remember the choice you make here, and keep what you have typed into a form. They include {brand}'s own first-party analytics, which counts visits and finds what is broken for {brand} alone and is never sold or shared.`,{brand:t})},{id:`analytics`,key:`analytics`,title:e(`Performance Cookies`),body:e(`Google Analytics: lets Google measure visits to {brand} with its own cookies.`,{brand:t})},{id:`marketing`,key:`marketing`,title:e(`Marketing Cookies`),body:e(`The Meta pixel: lets Meta measure the sign-ups and orders {brand}'s ads led to.`,{brand:t})},{id:`ads`,key:`ads`,title:e(`Sell, Share, or Use Your Data for Targeted Advertising`),body:e(`Lets Google and Meta use your visits to choose the ads they show you on other sites and apps. Some US state privacy laws call this a “sale” or “sharing” of your personal information, or “targeted advertising”, and give you the right to opt out: {rule}`,{rule:e(r?`your browser’s signal keeps it off.`:n?`it stays off unless you turn it on.`:`turn this off to opt out.`)})}],Yne=(e,t,n)=>e(n?`We use cookies and similar technologies to provide our services. Essential cookies are required for the site to work and cannot be turned off. Learn more in our `:t?`We use cookies and similar technologies to provide our services, measure performance, and support advertising. Essential cookies are required for the site to work and cannot be turned off. You can allow or reject optional cookies below. Learn more in our `:`We use cookies and similar technologies to provide our services, measure performance, and support advertising. Google Analytics and the Meta pixel run on this site by default. Turn either off below, or turn off the last switch to opt out of the sale or sharing of your personal information for targeted advertising; each switch is saved as soon as you change it. Essential cookies are required for the site to work and cannot be turned off. Learn more in our `),Xne=D(`Your browser asks sites not to track you, so all of these stay off.`),nB={top:`max(16px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 8px))`,bottom:`max(16px, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 8px))`,left:`max(16px, calc(var(--safe-left, env(safe-area-inset-left, 0px)) + 8px))`,right:`max(16px, calc(var(--safe-right, env(safe-area-inset-right, 0px)) + 8px))`},rB={button:`var(--radius-lg, 12px)`,card:`var(--radius-xl, 16px)`},iB={bg:`$background`,borderWidth:1,borderColor:`$borderColor`,rounded:rB.card,shadowColor:`rgba(0,0,0,0.25)`,shadowRadius:24,shadowOffset:{width:0,height:8}},aB={...B(`consent`),...iB,position:`fixed`,b:nB.bottom,l:nB.left,r:nB.right,mx:`auto`,z:`var(--z-banner, 50)`,py:`$3`,paddingInlineStart:`$4`,paddingInlineEnd:56},oB={width:`fit-content`},sB={outlineColor:`var(--ring)`,outlineStyle:`solid`,outlineWidth:2,outlineOffset:2},cB=(e,t,n)=>({size:`sm`,minH:36,rounded:rB.button,bg:e,color:n,borderColor:`transparent`,hoverStyle:{bg:t,borderColor:`transparent`,opacity:1},pressStyle:{bg:t,borderColor:`transparent`,opacity:1},focusStyle:{borderColor:`transparent`},focusVisibleStyle:sB}),lB=cB(`var(--primary)`,`var(--primary-hover)`,`var(--primary-foreground)`),uB=cB(`var(--secondary)`,`var(--secondary-hover)`,`var(--secondary-foreground)`),dB={rounded:rB.button,bg:`transparent`,borderColor:`transparent`,hoverStyle:{bg:`var(--secondary)`,borderColor:`transparent`,opacity:1},pressStyle:{bg:`var(--secondary-hover)`,borderColor:`transparent`,opacity:1},focusStyle:{borderColor:`transparent`},focusVisibleStyle:sB},fB={type:`button`,variant:`link`,size:`sm`,px:0,minH:0,color:`$aside`,hoverStyle:{color:`$ink`},focusVisibleStyle:sB,startIcon:(0,H.jsx)(Une,{})},pB={color:`inherit`,textDecoration:`underline`,whiteSpace:`nowrap`},mB={position:`fixed`,t:0,r:0,b:0,l:0},Zne=`a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])`,Qne={type:`button`},$ne=({cookies:e=`https://hanzo.ai/cookies`,privacy:t=`https://hanzo.ai/privacy`,terms:n=`https://hanzo.ai/terms`,brand:r=`Hanzo`,floating:i=!0})=>{let{t:a}=R(),[o,s]=(0,V.useState)(),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)({analytics:!1,marketing:!1,ads:!1}),m=(0,V.useRef)(f);m.current=f;let[h,g]=(0,V.useState)({}),[_,v]=(0,V.useState)(!0),b=(0,V.useRef)(void 0),x=(0,V.useRef)(!1),S=(0,V.useRef)(null),C=(0,V.useRef)(null),w=(0,V.useRef)(null),T=(0,V.useRef)(!1),E=(0,V.useRef)(!1),D=(0,V.useRef)(new Set),O=(0,V.useId)(),[k,ee]=(0,V.useState)(!1),A=(e=b.current)=>e===`eu`?Ye():e===`global`&&!Ze()&&!Qe(),j=e=>{let t=we();for(let n of D.current)(e!==`eu`||!m.current[n])&&(t[n]=m.current[n]);return t},M=e=>{let t=j(e);p(t),e!==`eu`&&D.current.size&&ke(t)},N=()=>{if(x.current)return;let e=document.activeElement;S.current=e instanceof HTMLElement&&e!==document.body?e:null,x.current=!0,D.current=new Set,ee(Qe()),E.current=De(),p(we()),d(!0)},P=()=>{x.current=!1,d(!1),l(A())};(0,V.useEffect)(()=>{let e=()=>{l(A()),ee(Qe()),x.current&&E.current&&!De()&&(E.current=!1,M(b.current??`eu`))},t=t=>{let n=b.current!==t;b.current=t,s(t),e(),n&&x.current&&M(t)},n=()=>t(Oe().mode),r=Gne();r&&t(r);let i=r?void 0:window.setTimeout(()=>b.current??t(`eu`),Wne),a=0,o=()=>{a||=window.requestAnimationFrame(()=>{a=0,v(qne())})};o();let c=new MutationObserver(o);c.observe(document.body,{childList:!0,subtree:!0});let u=()=>{window.location.hash===eB&&(queueMicrotask(()=>history.replaceState(history.state,``,window.location.pathname+window.location.search)),N())},d=e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target?.closest?.(`a[href]`),n=t?.getAttribute(`href`),r=t?.getAttribute(`target`);if(!n||t?.hasAttribute(`download`)||r&&r!==`_self`)return;let i;try{i=new URL(n,document.baseURI)}catch{return}i.hash===eB&&i.origin===window.location.origin&&(e.preventDefault(),N())};return u(),window.addEventListener($z,N),window.addEventListener(Ie,n),window.addEventListener(tB,o),window.addEventListener(`hashchange`,u),document.addEventListener(`click`,d,{capture:!0}),()=>{window.clearTimeout(i),window.cancelAnimationFrame(a),c.disconnect(),window.removeEventListener($z,N),window.removeEventListener(Ie,n),window.removeEventListener(tB,o),window.removeEventListener(`hashchange`,u),document.removeEventListener(`click`,d,{capture:!0})}},[]),(0,V.useEffect)(()=>{if(u)return Ee(!0),()=>Ee(!1)},[u]),(0,V.useEffect)(()=>{if(!u){if(!T.current)return;T.current=!1;let e=S.current;S.current=null,e?.isConnected?e.focus():(w.current??document.querySelector(`[data-slot="consent-choices"] button`))?.focus();return}T.current=!0;let e=()=>[...C.current?.querySelectorAll(Zne)??[]];e()[0]?.focus();let t=t=>{if(t.key===`Escape`){t.preventDefault(),P();return}if(t.key!==`Tab`)return;let n=e(),r=n[0],i=n[n.length-1];if(!r||!i)return;let a=document.activeElement,o=!!a&&!!C.current?.contains(a);t.shiftKey&&(a===r||!o)?(t.preventDefault(),i.focus()):!t.shiftKey&&(a===i||!o)&&(t.preventDefault(),r.focus())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[u]);let te=e=>()=>{e(),x.current=!1,l(A()),d(!1)},F=null;if(u){let i=(o??`eu`)===`eu`,s=(e,t)=>{D.current.add(e);let n={...f,[e]:t};p(n),i||ke(n)};F=(0,H.jsxs)(z,{...B(`consent-sheet`),...mB,z:`var(--z-modal, 600)`,items:`center`,justify:`center`,style:{padding:`${nB.top} ${nB.right} ${nB.bottom} ${nB.left}`},children:[(0,H.jsx)(z,{...mB,position:`absolute`,z:0,bg:`rgba(0,0,0,0.6)`,"aria-hidden":!0,onPress:P}),(0,H.jsxs)(z,{...B(`consent`),...iB,ref:C,role:`dialog`,"aria-modal":!0,"aria-labelledby":`${O}-title`,position:`relative`,width:`100%`,maxW:560,maxH:`100%`,overflow:`hidden`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$3`,pt:`$5`,pb:`$3`,paddingInlineStart:`$5`,paddingInlineEnd:`$4`,children:[(0,H.jsx)(U,{render:`h2`,id:`${O}-title`,m:0,fontSize:`$6`,lineHeight:`$6`,fontWeight:`600`,color:`$ink`,children:a(`Cookie Preferences`)}),(0,H.jsx)(W,{type:`button`,size:`icon`,...dB,"aria-label":a(`Close`),onClick:P,children:(0,H.jsx)(Rn,{size:16})})]}),(0,H.jsxs)(z,{shrink:1,minH:0,overflowY:`auto`,px:`$5`,pb:`$2`,style:{overscrollBehavior:`contain`},children:[(0,H.jsxs)(Nt,{size:`$2`,color:`$aside`,m:0,pb:`$3`,children:[Yne(a,i,k),a(`{cookies}, {privacy}, and {terms}.`,{cookies:(0,H.jsx)(`a`,{href:e,style:pB,children:a(`Cookie Policy`)}),privacy:(0,H.jsx)(`a`,{href:t,style:pB,children:a(`Privacy Policy`)}),terms:(0,H.jsx)(`a`,{href:n,style:pB,children:a(`Terms of Service`)})})]}),k?(0,H.jsx)(Nt,{size:`$2`,color:`$ink`,m:0,pb:`$3`,children:a(Xne)}):null,Jne(a,r,i,k).map(e=>{let t=h[e.id]===!0,n=`${O}-${e.id}`;return(0,H.jsxs)(z,{...B(`consent-section`),borderTopWidth:1,borderColor:`$borderColor`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$3`,minH:52,py:`$2`,children:[(0,H.jsx)(y,{render:`h3`,flex:1,minW:0,m:0,children:(0,H.jsxs)(y,{render:`button`,...Qne,"aria-expanded":t,"aria-controls":n,onPress:()=>g({...h,[e.id]:!t}),flex:1,minW:0,items:`center`,gap:`$2`,p:0,bg:`transparent`,borderWidth:0,cursor:`pointer`,children:[(0,H.jsx)(y,{shrink:0,rotate:t?`180deg`:`0deg`,opacity:.7,children:(0,H.jsx)(Ep,{size:16})}),(0,H.jsx)(U,{fontSize:`$3`,lineHeight:`$3`,fontWeight:`600`,color:`$ink`,...Xm(`start`),children:e.title})]})}),e.key?(0,H.jsx)(X_,{"aria-label":e.title,"aria-describedby":n,disabled:k,checked:!k&&f[e.key],onCheckedChange:t=>s(e.key,t===!0)}):(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,whiteSpace:`nowrap`,children:a(`Always Active`)})]}),(0,H.jsx)(z,{id:n,display:t?`flex`:`none`,pb:`$3`,paddingInlineStart:24,children:(0,H.jsx)(Nt,{size:`$2`,color:`$aside`,m:0,children:e.body})})]},e.id)})]}),(0,H.jsx)(y,{flexWrap:`wrap`,gap:`$2`,px:`$5`,py:`$4`,borderTopWidth:1,borderColor:`$borderColor`,children:i?(0,H.jsxs)(H.Fragment,{children:[k?null:(0,H.jsx)(W,{type:`button`,...uB,grow:1,onClick:te(Ae),children:a(`Accept all`)}),(0,H.jsx)(W,{type:`button`,...lB,grow:1,onClick:te(()=>ke(f)),children:a(`Save preferences`)})]}):(0,H.jsx)(W,{type:`button`,...lB,grow:1,onClick:P,children:a(`Done`)})})]})]})}if(!o)return F;let I=i&&!_&&!c?(0,H.jsx)(y,{...B(`consent-choices`),position:`fixed`,b:nB.bottom,l:nB.left,z:`var(--z-banner, 50)`,px:`$2.5`,py:`$1`,bg:`$background`,borderWidth:1,borderColor:`$borderColor`,rounded:rB.button,children:(0,H.jsx)(W,{...fB,onClick:N,children:a(`Your Privacy Choices`)})}):null;return c&&o===`global`?I=(0,H.jsxs)(y,{...aB,role:`region`,"aria-label":a(`Cookie notice`),style:oB,maxW:1200,flexWrap:`wrap`,items:`center`,columnGap:`$4`,rowGap:`$2`,children:[(0,H.jsx)(z,{shrink:1,minW:0,children:(0,H.jsx)(Nt,{size:`$2`,color:`$ink`,m:0,children:a(`We use cookies to improve your experience. By continuing to browse, you agree.`)})}),(0,H.jsx)(W,{...fB,onClick:N,children:a(`Your Privacy Choices`)}),(0,H.jsx)(W,{type:`button`,size:`icon`,...dB,"aria-label":a(`Close`),position:`absolute`,t:`$3`,insetInlineEnd:`$3`,onClick:te(Me),children:(0,H.jsx)(Rn,{size:16})})]}):c&&o===`eu`&&(I=(0,H.jsxs)(y,{...aB,role:`dialog`,"aria-label":a(`Cookie preferences`),style:oB,maxW:1200,flexWrap:`wrap`,items:`center`,columnGap:`$4`,rowGap:`$3`,children:[(0,H.jsx)(z,{shrink:1,minW:0,children:(0,H.jsx)(Nt,{size:`$2`,color:`$ink`,m:0,children:a(`Essential cookies keep {brand} running. With your OK, optional cookies help us measure performance and ads.`,{brand:r})})}),(0,H.jsxs)(y,{gap:`$2`,marginInlineStart:`auto`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(W,{ref:w,type:`button`,...uB,onClick:N,children:a(`Manage preferences`)}),(0,H.jsx)(W,{type:`button`,...lB,onClick:te(Ae),children:a(`Accept all`)})]}),(0,H.jsx)(W,{type:`button`,size:`icon`,...dB,"aria-label":a(`Close and use essential cookies only`),position:`absolute`,t:`$3`,insetInlineEnd:`$3`,onClick:te(Xe),children:(0,H.jsx)(Rn,{size:16})})]})),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{inert:u||void 0,style:{display:`contents`},children:I}),F]})},hB=32;function gB(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),_B(t.buffer)}async function ere(e){let t=new TextEncoder;return crypto.subtle.digest(`SHA-256`,t.encode(e))}function _B(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function vB(){let e=gB(hB);return{codeVerifier:e,codeChallenge:_B(await ere(e))}}function yB(){return gB(hB)}var bB={discovery:`/.well-known/openid-configuration`,authorize:`/v1/iam/oauth/authorize`,token:`/v1/iam/oauth/token`,userinfo:`/v1/iam/oauth/userinfo`,jwks:`/v1/iam/.well-known/jwks`,logout:`/v1/iam/oauth/logout`,revoke:`/v1/iam/oauth/revoke`},xB={authMethods:`/v1/iam/auth/methods`,authIdentifier:`/v1/iam/auth/identifier`,authApplication:`/v1/iam/auth/application`,login:`/v1/iam/login`,sendCode:`/v1/iam/verification-codes`,federationMfa:`/v1/iam/oauth/federation/mfa`,signup:`/v1/iam/signup`,terms:`/v1/iam/terms`,password:`/v1/iam/password`,address:`/v1/iam/address`,accept:`/v1/iam/invitations/accept`,web3Nonce:`/v1/iam/web3/nonce`,web3Verify:`/v1/iam/web3/verify`};function SB(e){return e.replace(/\/+$/,``)}function CB(e,t){return`${SB(e)}${bB[t]}`}function tre(e){let t=new URL(e.endpoint??CB(e.serverUrl,`authorize`));t.searchParams.set(`client_id`,e.clientId),t.searchParams.set(`response_type`,`code`),t.searchParams.set(`redirect_uri`,e.redirectUri),t.searchParams.set(`scope`,e.scope??`openid profile email`),t.searchParams.set(`state`,e.state),e.codeChallenge&&(t.searchParams.set(`code_challenge`,e.codeChallenge),t.searchParams.set(`code_challenge_method`,`S256`)),e.prompt&&t.searchParams.set(`prompt`,e.prompt);for(let[n,r]of Object.entries(e.params??{}))t.searchParams.set(n,r);return t}function nre(e){if(!e)return{};try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):{}}catch{return{}}}var wB={chain:`evm`,scheme:`secp256k1-eip191`};async function rre(e){let t=e.trim().toLowerCase().replace(/^0x/,``);if(!/^[0-9a-f]{40}$/.test(t))throw Error(`not an Ethereum address: ${e}`);let{keccak_256:n}=await Le(async()=>{let{keccak_256:e}=await import(`./sha3-DDKddPFc.js`);return{keccak_256:e}},[]),r=n(new TextEncoder().encode(t)),i=`0x`;for(let e=0;e<t.length;e++){let n=e%2==0?r[e>>1]>>4:r[e>>1]&15;i+=n>=8?t[e].toUpperCase():t[e]}return i}function ire(e,t,n){let{domain:r,uri:i,statement:a,nonce:o,issuedAt:s,expirationTime:c,version:l}=e;if(a?.includes(`
36
- `))throw Error(`the sign-in statement must be one line`);let u=[`${r} wants you to sign in with your Ethereum account:`,t,``];return a&&u.push(a,``),u.push(`URI: ${i}`,`Version: ${l||`1`}`,`Chain ID: ${n}`,`Nonce: ${o}`,`Issued At: ${s}`),c&&u.push(`Expiration Time: ${c}`),u.join(`
37
- `)}function are(e){let t=`0x`;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return t}function ore(e){let t=typeof e==`string`?Number.parseInt(e,16):typeof e==`number`?e:NaN;return Number.isSafeInteger(t)&&t>0?t:1}var TB=1500,EB=`hanzo_iam_`,DB=`${EB}state`,OB=`${EB}code_verifier`,kB=`${EB}access_token`,AB=`${EB}refresh_token`,jB=`${EB}id_token`,MB=`${EB}expires_at`,NB=`${EB}hold`,PB=`${EB}spent`,sre=`${EB}refresh`,FB=`${EB}refresh_lease`,cre=3e4,lre=50,ure=50,IB=`${OB}:`;function LB(e){return`${IB}${e}`}var dre=12;function fre(e,t){return`${t}.${e}`}function RB(e){let t=e.indexOf(`.`);if(t>0){let n=e.slice(0,t);if(/^\d+$/.test(n))return{issuedAt:Number(n),codeVerifier:e.slice(t+1)}}return{issuedAt:0,codeVerifier:e}}var pre=`hanzo_iam_login`,mre=`hanzo-iam`;function hre(e,t){let n=new URLSearchParams({code:t});e.state&&n.set(`state`,e.state);let r=e.redirectUri.includes(`?`)?`&`:`?`;return`${e.redirectUri}${r}${n.toString()}`}var gre=9e5,zB=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`Refused`}code},_re=class extends Error{constructor(e,t=[],n){super(`this account signs in with a second factor`),this.directive=e,this.factors=t,this.request=n,this.name=`SecondFactor`}directive;factors;request},BB=class extends Error{constructor(e,t){super(`confirm the account's email address to finish signing in`),this.email=e,this.request=t,this.name=`EmailRequired`}email;request};function VB(e){return`recovery`in e?{recoveryCode:e.recovery}:{mfaType:e.type,passcode:e.passcode}}function vre(e){if(!Array.isArray(e))return[];let t=e.flatMap(e=>{let t=e??{};return typeof t.mfaType!=`string`||!t.mfaType?[]:[{type:t.mfaType,preferred:t.isPreferred===!0,remember:typeof t.mfaRememberInHours==`number`?t.mfaRememberInHours:0}]}),n=``;for(let e of t)(e.type===`email`||e.type===`sms`)&&(n===``||e.preferred)&&(n=e.type);return t.map(({type:e,remember:t})=>({type:e,sent:e===n,remember:t}))}var yre=class extends Error{constructor(){super(`no account holds this address; accept the terms to create one`),this.name=`SignupRequired`}},HB=class extends Error{constructor(e){super(`the session has ended: ${e}`),this.reason=e,this.name=`SessionEnded`}reason},UB=class extends Error{constructor(e,t){super(e),this.reason=t,this.name=`Unmatched`}reason};function WB(e){try{let t=e(),n=`${EB}probe`;return t.setItem(n,`1`),t.removeItem(n),t}catch{return null}}function bre(){return WB(()=>localStorage)??WB(()=>sessionStorage)}function xre(){let e=new Map;return{get length(){return e.size},clear:()=>e.clear(),getItem:t=>e.has(t)?e.get(t):null,key:t=>Array.from(e.keys())[t]??null,removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,String(n))}}}var GB=e=>new Promise(t=>setTimeout(t,e));function Sre(){try{return typeof navigator<`u`&&navigator.locks?navigator.locks:null}catch{return null}}async function Cre(e,t){let n=Sre();if(n)return n.request(sre,t);let r=yB(),i=()=>e.getItem(FB)?.startsWith(`${r}.`)===!0;for(;;){let t=e.getItem(FB);if((t?Number(t.slice(t.indexOf(`.`)+1)):0)>Date.now()){await GB(ure);continue}if(e.setItem(FB,`${r}.${Date.now()+cre}`),await GB(lre),i())break}try{return await t()}finally{i()&&e.removeItem(FB)}}function wre(e){try{let t=JSON.parse(e);return{error:typeof t.error==`string`?t.error:``,description:typeof t.error_description==`string`?t.error_description:``}}catch{return{error:``,description:``}}}async function KB(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.status===`error`)throw new zB(typeof n.msg==`string`&&n.msg?n.msg:`${t} (${e.status})`,typeof n.code==`string`?n.code:``);return n}async function qB(e,t){return(await KB(e,t)).data}var JB=class{config;storage;txStorage;redeemable;discoveryCache=null;callbackInFlight=null;held;refreshing=null;constructor(e){this.config=e;let t=bre();this.storage=e.storage??t??xre(),this.txStorage=t??this.storage,this.redeemable=t!==null||e.storage!==void 0,this.held=this.stored()}async getDiscovery(){if(this.discoveryCache)return this.discoveryCache;let e=SB(this.config.serverUrl);try{let t=await fetch(`${e}${bB.discovery}`,{headers:{Accept:`application/json`}});if(t.ok)return this.discoveryCache=await t.json(),this.discoveryCache}catch{}return this.discoveryCache={issuer:e,authorization_endpoint:CB(e,`authorize`),token_endpoint:CB(e,`token`),userinfo_endpoint:CB(e,`userinfo`),jwks_uri:CB(e,`jwks`),revocation_endpoint:CB(e,`revoke`),end_session_endpoint:CB(e,`logout`),response_types_supported:[`code`],grant_types_supported:[`authorization_code`,`refresh_token`],scopes_supported:[`openid`,`email`,`profile`]},this.discoveryCache}async tokenEndpoint(){return this.config.proxyBaseUrl?CB(this.config.proxyBaseUrl,`token`):(await this.getDiscovery()).token_endpoint}async userinfoEndpoint(){return this.config.proxyBaseUrl?CB(this.config.proxyBaseUrl,`userinfo`):(await this.getDiscovery()).userinfo_endpoint}async revocationEndpoint(){return this.config.proxyBaseUrl?CB(this.config.proxyBaseUrl,`revoke`):(await this.getDiscovery()).revocation_endpoint??CB(this.config.serverUrl,`revoke`)}async endSessionEndpoint(){return this.config.proxyBaseUrl?CB(this.config.proxyBaseUrl,`logout`):(await this.getDiscovery()).end_session_endpoint??CB(this.config.serverUrl,`logout`)}stashPkce(e,t){this.sweepStaleVerifiers(),this.txStorage.setItem(LB(e),fre(t,Date.now())),this.txStorage.setItem(DB,e),this.txStorage.setItem(OB,t)}sweepStaleVerifiers(){let e=[];for(let t=this.txStorage.length-1;t>=0;t--){let n=this.txStorage.key(t);if(!n||!n.startsWith(IB))continue;let r=this.txStorage.getItem(n);e.push({key:n,issuedAt:r?RB(r).issuedAt:0})}e.sort((e,t)=>t.issuedAt-e.issuedAt);for(let t of e.slice(dre-1))this.txStorage.removeItem(t.key)}async buildAuthorizeUrl(e){if(!this.redeemable)throw Error(`@hanzo/iam: this browser keeps neither localStorage nor sessionStorage, so the PKCE verifier cannot outlive the redirect to IAM and the callback would fail. Call usableStorage() before starting a login to catch this on the page.`);let t=await this.getDiscovery(),{codeVerifier:n,codeChallenge:r}=await vB(),i=yB();return this.stashPkce(i,n),{url:tre({endpoint:t.authorization_endpoint,serverUrl:this.config.serverUrl,clientId:this.config.clientId,redirectUri:this.config.redirectUri,state:i,scope:this.config.scope,codeChallenge:r,prompt:e?.prompt,params:e?.additionalParams}),codeVerifier:n,state:i}}async signinRedirect(e){let{url:t}=await this.buildAuthorizeUrl(e);window.location.replace(t.toString())}async getSigninUrl(e){let{url:t}=await this.buildAuthorizeUrl(e);return t.toString()}asking=null;parties=new Map;ask(e){this.asking=e&&e.state?{...e,state:e.state}:null}get client(){return this.asking?.clientId??this.config.clientId}async party(e){if(e===this.config.clientId)return{application:this.config.application??this.config.clientId,organization:this.config.organization};let t=this.parties.get(e);if(t)return t;let n=new URL(`${SB(this.config.serverUrl)}${xB.authApplication}`);n.searchParams.set(`clientId`,e);let r=await qB(await fetch(n.toString(),{headers:{Accept:`application/json`}}),`could not read the application`)??{};if(typeof r.organization!=`string`||!r.organization)throw Error(`IAM did not name the application's organization`);let i={application:typeof r.name==`string`&&r.name?r.name:e,organization:r.organization};return this.parties.set(e,i),i}async own(){return this.asking??await this.mine()}async mine(){let{codeVerifier:e,codeChallenge:t}=await vB(),n=yB();return this.stashPkce(n,e),{clientId:this.config.clientId,redirectUri:this.config.redirectUri,scope:this.config.scope,state:n,codeChallenge:t,codeChallengeMethod:`S256`}}async credentialLogin(e){return this.post(e,await this.own())}async post(e,t,n){let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URL(n??`${SB(r)}${xB.login}`);i.searchParams.set(`clientId`,t.clientId),i.searchParams.set(`responseType`,`code`),i.searchParams.set(`redirectUri`,t.redirectUri),i.searchParams.set(`scope`,t.scope??`openid profile email`),t.state&&i.searchParams.set(`state`,t.state),t.nonce&&i.searchParams.set(`nonce`,t.nonce),t.prompt&&i.searchParams.set(`prompt`,t.prompt),t.loginHint&&i.searchParams.set(`login_hint`,t.loginHint),i.searchParams.set(`type`,`code`),t.codeChallenge&&(i.searchParams.set(`code_challenge`,t.codeChallenge),i.searchParams.set(`code_challenge_method`,t.codeChallengeMethod??`S256`));let a=await fetch(i.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify({type:`code`,...await this.party(t.clientId),autoSignin:!0,...e})}),o;try{o=await KB(a,`sign-in failed`)}catch(e){throw e instanceof zB&&e.code===`login_required`&&this.release(),e}let s=o.data;if(s===`NextMfa`||s===`RequiredMfa`)throw s===`NextMfa`&&this.hold(),new _re(s,vre(o.data2),t);if(s===`RequiredEmail`){this.hold();let e=o.data2??{};throw new BB(typeof e.email==`string`?e.email:``,t)}if(s===`SignupRequired`)throw new yre;if(typeof s!=`string`||s.length===0)throw Error(`IAM did not return an authorization code`);return this.release(),hre(t,s)}hold(){this.txStorage.setItem(NB,String(Date.now()+gre))}release(){this.txStorage.removeItem(NB)}holding(){return Number(this.txStorage.getItem(NB)??0)>Date.now()}async resume(e){if(this.holding())return null;try{return await this.credentialLogin(e?{loginHint:e}:{})}catch{return null}}loginWithPassword(e,t){return this.credentialLogin({username:e,password:t,signinMethod:`Password`})}loginWithCode(e,t){let n=e.includes(`@`);return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,...n?{email:e}:{phone:e}})}createAccountWithCode(e,t,n){return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,email:e,create:!0,terms:n.terms,aup:n.aup})}async verifyFactor(e,t,n=!1){if(!e.request)throw Error(`this second factor names no sign-in to finish`);try{return await this.post({...VB(t),enableMfaRemember:n},e.request)}catch(e){throw e instanceof zB&&this.release(),e}}async finishFederation(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=(await KB(await fetch(`${SB(t)}${xB.federationMfa}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify(VB(e))}),`the sign-in could not be finished`)).data;if(typeof n!=`string`||!n)throw Error(`IAM did not say where the sign-in goes`);return n}confirmEmail(e,t){return this.post({passcode:t},e.request)}async changeEmail(e,t){try{await this.post({email:t},e.request)}catch(e){if(e instanceof BB)return e;throw e}throw Error(`IAM granted the sign-in without confirming the address`)}async resetPassword(e,t,n){await qB(await fetch(`${SB(this.config.serverUrl)}${xB.password}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({organization:this.config.organization,username:e,code:t,password:n})}),`could not set the password`)}async acceptInvite(e,t,n){let r=await this.getValidAccessToken();if(!r)throw new zB(`please sign in first`,`login_required`);let i=await qB(await fetch(`${SB(this.config.serverUrl)}${xB.accept}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({owner:e,code:t,...n?{emailCode:n}:{}})}),`could not join the organization`)??{};if(i.joined!==!0)throw Error(`IAM did not join the organization`);return typeof i.org==`string`&&i.org?i.org:e}async acceptTerms(e){let t=await this.getValidAccessToken();if(!t)throw Error(`No valid access token — user must log in`);let n=this.config.proxyBaseUrl??this.config.serverUrl;await qB(await fetch(`${SB(n)}${xB.terms}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({terms:e.terms,aup:e.aup})}),`could not record the acceptance`)}async addAddress(e,t){let n=await this.getValidAccessToken();if(!n)throw new zB(`please sign in first`,`login_required`);let r=this.config.proxyBaseUrl??this.config.serverUrl,i=await qB(await fetch(`${SB(r)}${xB.address}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({clientId:this.client,address:e,code:t})}),`could not add the address`)??{};return{email:typeof i.email==`string`?i.email:``,phone:typeof i.phone==`string`?i.phone:``}}async sendLoginCode(e){let t=e.includes(`@`),n=this.config.proxyBaseUrl??this.config.serverUrl;await qB(await fetch(`${SB(n)}${xB.sendCode}`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:new URLSearchParams({applicationId:`admin/${(await this.party(this.client)).application}`,dest:e,type:t?`email`:`phone`}).toString()}),`could not send code`)}async signup(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=new URL(`${SB(t)}${xB.signup}`);return n.searchParams.set(`clientId`,this.config.clientId),await qB(await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({application:this.config.application??this.config.clientId,clientId:this.config.clientId,organization:this.config.organization,email:e.email,password:e.password,code:e.code,...e.name?{name:e.name}:{},...e.terms?{terms:e.terms.terms,aup:e.terms.aup}:{}})}),`sign-up failed`),this.loginWithPassword(e.email,e.password)}async methods(){let e=new URL(`${SB(this.config.serverUrl)}${xB.authMethods}`);e.searchParams.set(`clientId`,this.client);let t=await qB(await fetch(e.toString(),{headers:{Accept:`application/json`}}),`could not read the sign-in methods`)??{},n=Array.isArray(t.oauth)?t.oauth:[];return{password:t.password===!0,code:t.code===!0,signup:t.signup===!0,wallet:t.web3===!0&&(!Array.isArray(t.web3Chains)||t.web3Chains.includes(wB.chain)),address:t.address===!0,providers:n.filter(e=>typeof e.name==`string`&&typeof e.type==`string`).map(e=>({name:e.name,type:e.type}))}}async identify(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=await qB(await fetch(`${SB(t)}${xB.authIdentifier}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({clientId:this.client,identifier:e})}),`could not look up the address`)??{};return{account:n.account===!0,password:n.password===!0}}async handleCallback(e){let t=new URL(e??window.location.href),n=t.searchParams.get(`error`);if(n)throw this.isOwnAttempt(t.searchParams.get(`state`))?new zB(`OAuth error: ${t.searchParams.get(`error_description`)??n}`,n):new UB(`OAuth error on a sign-in this browser did not start. Restart sign-in.`,`foreign`);let r=t.searchParams.get(`code`);if(!r)throw new UB(`Missing authorization code in callback URL`,`empty`);let i=this.callbackInFlight;if(i&&i.code===r)return i.promise;let a=this.exchangeCode(t,r);return this.callbackInFlight={code:r,promise:a},a.catch(()=>{this.callbackInFlight?.promise===a&&(this.callbackInFlight=null)}),a}isOwnAttempt(e){if(!e)return!1;let t=LB(e);return this.txStorage.getItem(t)??this.storage.getItem(t)?!0:(this.txStorage.getItem(DB)??this.storage.getItem(DB))===e}async exchangeCode(e,t){let n=e.searchParams.get(`state`),r=n?LB(n):null,i=r?this.txStorage.getItem(r)??this.storage.getItem(r):null,a=i?RB(i).codeVerifier:null;if(a&&r)this.txStorage.removeItem(r),this.storage.removeItem(r),(this.txStorage.getItem(DB)===n||this.storage.getItem(DB)===n)&&(this.txStorage.removeItem(DB),this.txStorage.removeItem(OB),this.storage.removeItem(DB),this.storage.removeItem(OB));else{if(n&&this.spent().includes(n))throw new UB(`This sign-in already finished in this browser.`,`spent`);let e=this.txStorage.getItem(DB)??this.storage.getItem(DB);if(!e||n!==e)throw new UB(`OAuth state mismatch — stale, concurrent, or forged login. Restart sign-in.`,`foreign`);if(a=this.txStorage.getItem(OB)??this.storage.getItem(OB),!a)throw Error(`Missing PKCE code verifier — start sign-in via signinRedirect() or the embedded credential login.`);this.txStorage.removeItem(DB),this.txStorage.removeItem(OB),this.storage.removeItem(DB),this.storage.removeItem(OB)}let o=new URLSearchParams({grant_type:`authorization_code`,client_id:this.config.clientId,code:t,redirect_uri:this.config.redirectUri,code_verifier:a}),s=await this.tokenEndpoint(),c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:o.toString()});if(!c.ok){let e=await c.text().catch(()=>``);throw Error(`Token exchange failed (${c.status}): ${e}`)}let l=await c.json();return this.storeTokens(l),n&&this.spend(n),YB(l)}spent(){try{let e=JSON.parse(this.txStorage.getItem(PB)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}spend(e){let t=this.spent().filter(t=>t!==e);t.push(e),this.txStorage.setItem(PB,JSON.stringify(t.slice(-12)))}refreshAccessToken(){return this.refreshing??=Cre(this.storage,()=>this.refreshHeld()).finally(()=>{this.refreshing=null}),this.refreshing}async refreshHeld(){let e=this.stored(),t=e.access!==this.held.access||e.refresh!==this.held.refresh;if(e.access&&t&&!this.isTokenExpired()){this.held=e;let t=this.getExpiresAt();return{accessToken:e.access,refreshToken:e.refresh??void 0,idToken:this.getIdToken()??void 0,expiresIn:t===null?void 0:Math.max(0,Math.floor((t-Date.now())/1e3)),tokenType:`Bearer`}}if(!e.refresh)throw this.clearTokens(),new HB(`no refresh token is stored`);let n=await fetch(await this.tokenEndpoint(),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`refresh_token`,client_id:this.config.clientId,refresh_token:e.refresh}).toString()});if(!n.ok){let t=await n.text().catch(()=>``),{error:r,description:i}=wre(t);throw r===`invalid_grant`?(this.storage.getItem(AB)===e.refresh&&this.clearTokens(),new HB(i||r)):Error(`Token refresh failed (${n.status}): ${t}`)}let r=await n.json();return this.storeTokens(r),YB(r)}stored(){return{access:this.storage.getItem(kB),refresh:this.storage.getItem(AB)}}async signinPopup(e){let{url:t,state:n}=await this.buildAuthorizeUrl({additionalParams:e?.additionalParams}),r=e?.width??600,i=e?.height??700,a=window.screenX+(window.outerWidth-r)/2,o=window.screenY+(window.outerHeight-i)/2,s=new URL(this.config.redirectUri,window.location.href).origin;return new Promise((c,l)=>{let u=window.open(t.toString(),pre,`width=${r},height=${i},left=${a},top=${o},menubar=no,toolbar=no`);if(!u){l(Error(`Failed to open login popup — blocked by browser?`));return}let d=!1,f=null,p=()=>{if(!d){d=!0,window.removeEventListener(`message`,m),clearInterval(h),clearTimeout(g),f&&clearTimeout(f);try{u.closed||u.close()}catch{}}},m=e=>{if(d||e.origin!==s)return;let t=e.data;if(!t||typeof t!=`object`||t.source!==mre)return;if(typeof t.state!=`string`||t.state!==n){p(),l(Error(`OAuth state mismatch — possible CSRF (popup)`));return}if(t.error){p(),l(Error(`OAuth error: ${t.error}`));return}if(typeof t.code!=`string`||t.code.length===0){p(),l(Error(`Login popup returned no authorization code`));return}let r=t.code,i=t.state;p();let a=this.config.redirectUri.includes(`?`)?`&`:`?`,o=`${this.config.redirectUri}${a}code=${encodeURIComponent(r)}&state=${encodeURIComponent(i)}`;this.handleCallback(o).then(c,l)};window.addEventListener(`message`,m);let h=setInterval(()=>{d||!u.closed||f||(f=setTimeout(()=>{d||(p(),l(Error(`Login popup was closed before completing`)))},1e3))},300),g=setTimeout(()=>{d||(p(),l(Error(`Login popup timed out`)))},e?.timeoutMs??3e5)})}async loginWithWallet(e){let t=e?.provider??globalThis.ethereum;if(!t||typeof t.request!=`function`)throw Error(`No EIP-1193 wallet provider found (window.ethereum).`);let n=await t.request({method:`eth_requestAccounts`}),r=Array.isArray(n)?n[0]:void 0;if(typeof r!=`string`||!r)throw Error(`Wallet did not return an address`);let i=await rre(r),a=ore(await t.request({method:`eth_chainId`}).catch(()=>void 0)),o=await this.own(),s=SB(this.config.serverUrl),c=new URL(`${s}${xB.web3Nonce}`);c.searchParams.set(`chain`,wB.chain),c.searchParams.set(`address`,i),c.searchParams.set(`clientId`,o.clientId);let l=await qB(await fetch(c.toString(),{headers:{Accept:`application/json`},credentials:`include`}),`could not start the wallet sign-in`);if(!l||typeof l.nonce!=`string`||typeof l.domain!=`string`)throw Error(`IAM did not return a sign-in challenge`);let u=ire(l,i,a),d=await t.request({method:`personal_sign`,params:[are(u),i]});if(typeof d!=`string`||!d)throw Error(`Wallet did not return a signature`);return this.post({...wB,address:i,message:u,signature:d,clientId:o.clientId,redirectUri:o.redirectUri,scope:o.scope??`openid profile email`,state:o.state,nonce:o.nonce,codeChallenge:o.codeChallenge,codeChallengeMethod:o.codeChallengeMethod},o,`${s}${xB.web3Verify}`)}storeTokens(e){if(this.storage.setItem(kB,e.access_token),e.refresh_token&&this.storage.setItem(AB,e.refresh_token),e.id_token&&this.storage.setItem(jB,e.id_token),e.expires_in){let t=Date.now()+e.expires_in*1e3;this.storage.setItem(MB,String(t))}else{let t=nre(e.access_token).exp;typeof t==`number`&&Number.isFinite(t)&&this.storage.setItem(MB,String(t*1e3))}this.held=this.stored()}getAccessToken(){return this.storage.getItem(kB)}getRefreshToken(){return this.storage.getItem(AB)}getIdToken(){return this.storage.getItem(jB)}getExpiresAt(){let e=this.storage.getItem(MB);if(!e)return null;let t=Number(e);return Number.isFinite(t)?t:null}isTokenExpired(){let e=this.storage.getItem(MB);return e?Date.now()>=Number(e):!1}async getValidAccessToken(){let e=this.getAccessToken();if(e&&!this.isTokenExpired())return e;if(this.getRefreshToken())try{return(await this.refreshAccessToken()).accessToken}catch{return null}return null}clearTokens(){this.storage.removeItem(kB),this.storage.removeItem(AB),this.storage.removeItem(jB),this.storage.removeItem(MB),this.held={access:null,refresh:null}}async logout(){let e=this.storage.getItem(kB),t=this.storage.getItem(AB),n=this.storage.getItem(jB);this.clearTokens();let r=await Promise.race([(async()=>(await this.revoke(t,`refresh_token`,e),await this.revoke(e,`access_token`,e),this.endSessionEndpoint()))(),new Promise(e=>setTimeout(()=>e(CB(this.config.serverUrl,`logout`)),TB))]),i=new URL(r);n&&i.searchParams.set(`id_token_hint`,n),i.searchParams.set(`client_id`,this.config.clientId),this.config.postLogoutRedirectUri&&i.searchParams.set(`post_logout_redirect_uri`,this.config.postLogoutRedirectUri),window.location.href=i.toString()}async end(){let e=this.storage.getItem(kB),t=this.storage.getItem(AB),n=this.storage.getItem(jB);this.clearTokens();let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URLSearchParams({client_id:this.config.clientId});n&&i.set(`id_token_hint`,n),await Promise.race([(async()=>{await this.revoke(t,`refresh_token`,e,CB(r,`revoke`)),await this.revoke(e,`access_token`,e,CB(r,`revoke`)),await fetch(CB(r,`logout`),{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:i.toString()}).catch(()=>void 0)})(),new Promise(e=>setTimeout(e,TB))])}async revoke(e,t,n,r){if(e)try{await fetch(r??await this.revocationEndpoint(),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...n?{Authorization:`Bearer ${n}`}:{}},body:new URLSearchParams({token:e,token_type_hint:t,client_id:this.config.clientId}).toString()})}catch{}}async getUserInfo(){let e=await this.getValidAccessToken();if(!e)throw Error(`No valid access token — user must log in`);let t=await this.userinfoEndpoint(),n=await fetch(t,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Userinfo fetch failed (${n.status})`);return await n.json()}async getUser(){if(!await this.getValidAccessToken())return null;let e=await this.getUserInfo();return{sub:e.sub??``,email:e.email,name:e.name,givenName:e.given_name,familyName:e.family_name,phoneNumber:e.phone_number,emailVerified:e.email_verified,picture:e.picture,owner:e.owner}}};function YB(e){return{accessToken:e.access_token,refreshToken:e.refresh_token,idToken:e.id_token,expiresIn:e.expires_in,tokenType:e.token_type,scope:e.scope}}var XB=[{org:`hanzo`,app:`team-native`,issuer:`https://hanzo.id`,title:`Team`,hosts:[`hanzo.team`,`www.hanzo.team`,`hanzo.app`,`localhost`,`127.0.0.1`]},{org:`hanzo`,app:`team2`,issuer:`https://hanzo.id`,title:`Team`,hosts:[`team2.hanzo.ai`,`team2.hanzo.app`,`hanzo-team.hanzo.app`]}],ZB=()=>typeof window>`u`?``:window.location.hostname,QB=XB.find(e=>e.hosts.includes(ZB()))??XB[0],$B=`${QB.org}-${QB.app}`,eV=`https://api.hanzo.ai`,tV={account:`${eV}/v1/team/account`,channels:`${eV}/v1/team/channels`,dms:`${eV}/v1/team/dms`,files:`${eV}/v1/team/files`,plan:`${eV}/v1/team/billing/plan`};`${QB.issuer}${QB.org}${QB.app}`;var nV=`/login`,rV=`/auth/callback`,iV=`openid profile email offline_access`,aV=null,oV=()=>{let e=window.location.origin;return{serverUrl:QB.issuer,clientId:$B,redirectUri:`${e}${rV}`,postLogoutRedirectUri:`${e}${nV}`,scope:iV,proxyBaseUrl:void 0}},sV=()=>aV||(aV=new JB(oV()),aV),cV=`https://hanzo.ai`,lV=e=>e?{additionalParams:{login_hint:e}}:void 0,uV=(e,t=`login`,n)=>{let r=new URL(e);return t===`another`&&r.searchParams.set(`prompt`,`select_account`),n&&r.searchParams.set(`provider`,n),`${cV}${t===`signup`?`/signup`:`/login`}${r.search}`},dV=e=>{let t=new URL(e);return t.searchParams.set(`prompt`,`none`),`${cV}/v1/iam/oauth/authorize${t.search}`},fV=e=>e===`localhost`||e===`127.0.0.1`||e===`[::1]`,pV=(e,t,n)=>{if(fV(new URL(n).hostname))return`/login?from=logout`;let r=new URLSearchParams({client_id:t,everywhere:`true`,post_logout_redirect_uri:new URL(`/`,n).href});return`${e.replace(/\/+$/,``)}/v1/iam/oauth/logout?${r}`},mV=new Map,hV=new Set,gV=0,_V=()=>{gV++;for(let e of hV)e()},vV=e=>(hV.add(e),()=>void hV.delete(e)),yV=e=>{let t=mV.get(e);return t||(t={phase:`loading`,started:!1},mV.set(e,t)),t},bV=(e,t)=>{let n=yV(e);n.started=!0,t().then(t=>{mV.set(e,{phase:`ready`,data:t,started:!0}),_V()},t=>{mV.set(e,{phase:`failure`,error:xV(t),started:!0}),_V()})},xV=e=>e instanceof Error?e:Error(String(e)),SV=(e,t,n={})=>{let r=n.enabled??!0;(0,V.useSyncExternalStore)(vV,()=>gV,()=>gV);let i=yV(e);r&&!i.started&&bV(e,t);let a=(0,V.useCallback)(()=>{mV.delete(e),bV(e,t),_V()},[e]);return{phase:i.phase,data:i.data,error:i.error,reload:a}},CV=e=>{if(!e)mV.clear();else for(let t of[...mV.keys()])t.startsWith(e)&&mV.delete(t);_V()},wV=(e,t)=>{mV.set(e,{phase:`ready`,data:t,started:!0}),_V()},TV=e=>mV.get(e)?.data,EV=(0,V.createContext)(null),DV=()=>{let e=(0,V.useContext)(EV);if(!e)throw Error(`useSession outside <Session>`);return e},OV=`team.back`,kV=()=>{let e=window.location.pathname+window.location.search;!e.startsWith(`/login`)&&!e.startsWith(`/auth/`)&&sessionStorage.setItem(OV,e)},AV=()=>{let e=sessionStorage.getItem(OV);return sessionStorage.removeItem(OV),e??`/`},jV=`team.silent`,MV=/bot|crawl|spider|slurp|preview|lighthouse|headless/i,NV=()=>{if(navigator.webdriver||MV.test(navigator.userAgent)||fV(window.location.hostname))return!1;try{return!sessionStorage.getItem(jV)}catch{return!1}},PV=()=>{try{sessionStorage.setItem(jV,`1`)}catch{}},FV=new Set([`login_required`,`interaction_required`,`consent_required`,`account_selection_required`]),IV=6e4,LV=e=>{let t=e instanceof Error?e.message:String(e);return t.includes(`(401)`)||t.includes(`(403)`)},RV=({children:e})=>{let[t,n]=(0,V.useState)(`unknown`),[r,i]=(0,V.useState)(null),a=(0,V.useCallback)(async()=>{try{let e=await sV().getUser();i(e?zV(e):null),n(`in`),CV()}catch(e){if(LV(e)){sV().clearTokens(),i(null),n(`out`),CV();return}i(null),n(`in`),CV()}},[]),o=(0,V.useCallback)(()=>{i(null),n(`out`),CV()},[]),s=(0,V.useRef)(!1);(0,V.useEffect)(()=>{s.current||(s.current=!0,(async()=>{if(!window.location.pathname.startsWith(`/auth/`)){if(new URLSearchParams(window.location.search).get(`from`)===`logout`){PV(),sV().clearTokens(),o();return}if(await sV().getValidAccessToken().catch(()=>null))return a();if(NV()){PV(),kV();try{window.location.replace(dV(await sV().getSigninUrl({additionalParams:{prompt:`none`}})));return}catch{}}o()}})())},[a,o]),(0,V.useEffect)(()=>{if(t!==`in`)return;let e=Date.now(),n=()=>{document.visibilityState!==`visible`||Date.now()-e<IV||(e=Date.now(),sV().getUserInfo().catch(e=>{LV(e)&&(sV().clearTokens(),o())}))};return document.addEventListener(`visibilitychange`,n),()=>document.removeEventListener(`visibilitychange`,n)},[t,o]);let c=(0,V.useCallback)(async(e=`login`,t={})=>{kV();let n=await sV().getSigninUrl(lV(t.hint)),r=t.provider??new URLSearchParams(window.location.search).get(`provider`);window.location.replace(uV(n,e,r))},[]),l=(0,V.useCallback)(e=>(kV(),sV().getSigninUrl(e)),[]),u=(0,V.useCallback)(()=>{let e=sV(),t=e.getAccessToken(),n=e.getRefreshToken();e.clearTokens(),o(),(async()=>{try{let e=async(e,n)=>{e&&await fetch(`/v1/iam/oauth/revoke`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...t?{Authorization:`Bearer ${t}`}:{}},body:new URLSearchParams({token:e,token_type_hint:n,client_id:$B}).toString()}).catch(()=>void 0)};await e(n,`refresh_token`),await e(t,`access_token`)}finally{window.location.assign(pV(QB.issuer,$B,window.location.origin))}})()},[o]),d=(0,V.useCallback)(async()=>{let e=AV();if(FV.has(new URLSearchParams(window.location.search).get(`error`)??``))return e;if(!(await sV().handleCallback()).accessToken)throw Error(`the issuer returned no access token`);return await a(),e},[a]),f=(0,V.useMemo)(()=>({standing:t,who:r,depart:c,request:l,leave:u,land:d}),[t,r,c,l,u,d]);return(0,H.jsx)(EV.Provider,{value:f,children:e})},zV=e=>{let t=String(e.preferred_username??e.name??e.sub??``);return{id:String(e.sub??t),name:t,label:String(e.name??e.preferred_username??t),email:typeof e.email==`string`?e.email:void 0,avatar:typeof e.picture==`string`?e.picture:void 0}},BV=class extends Error{status;detail;constructor(e,t){super(t||`HTTP ${e}`),this.status=e,this.detail=t,this.name=`Refused`}},VV=async()=>{let e=await sV().getValidAccessToken().catch(()=>null);return e?{authorization:`Bearer ${e}`}:{}},HV=async(e,t)=>{let n=await fetch(e,{...t,headers:{accept:`application/json`,...t?.body?{"content-type":`application/json`}:{},...await VV(),...t?.headers}}),r=await n.text();if(!n.ok)throw new BV(n.status,WV(r)||n.statusText);if(r)try{return JSON.parse(r)}catch{throw new BV(n.status,`expected JSON, read ${r.length} bytes of ${n.headers.get(`content-type`)??`nothing`}`)}},UV=(e,t)=>HV(e,{method:`POST`,body:JSON.stringify(t)}),WV=e=>{try{let t=JSON.parse(e);return t.detail??t.message??``}catch{return e.slice(0,200)}},GV=class extends Error{code;constructor(e,t){super(t),this.code=e,this.name=`Denied`}get unauthorized(){return this.code.endsWith(`:Unauthorized`)}},KV=async(e,t={})=>{let n=await UV(tV.account,{method:e,params:t});if(n.error)throw new GV(n.error.code,n.error.params?.message??n.error.code);return n.result},qV=()=>KV(`getUserWorkspaces`),JV=e=>KV(`selectWorkspace`,{workspaceUrl:e}),YV=()=>KV(`enrol`),XV={request:0,response:1,push:2},ZV=16,QV=16,$V=24,eH=40,tH=0,nH=4,rH=8,iH=16,aH=new TextEncoder,oH=new TextDecoder,sH=e=>{let t=aH.encode(e.method),n=e.payload,r=eH,i=r,a=t.length>0?r-24:0;t.length>0&&(r+=t.length);let o=r,s=n.length>0?r-32:0;n.length>0&&(r+=n.length);let c=new Uint8Array(r),l=new DataView(c.buffer);return c.set(aH.encode(`ZAP\0`),0),l.setUint16(4,2,!0),l.setUint16(6,0,!0),l.setUint32(8,QV,!0),l.setUint32(12,r,!0),l.setUint32(16,e.id,!0),c[20]=e.kind,l.setUint32(24,a,!0),l.setUint32(28,t.length,!0),l.setUint32(32,s,!0),l.setUint32(36,n.length,!0),c.set(t,i),c.set(n,o),c},cH=e=>{if(e.length<ZV||oH.decode(e.subarray(0,4))!==`ZAP\0`)return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=t.getUint32(8,!0);return n<ZV||n+$V>e.length?null:{id:t.getUint32(n+tH,!0),kind:e[n+nH],method:oH.decode(lH(e,t,n+rH)),payload:lH(e,t,n+iH).slice()}},lH=(e,t,n)=>{if(n+8>e.length)return new Uint8Array;let r=t.getUint32(n,!0);if(r===0)return new Uint8Array;let i=t.getUint32(n+4,!0),a=n+r;return a<ZV||a+i>e.length?new Uint8Array:e.subarray(a,a+i)},uH=(e,t,n,r)=>sH({id:e,kind:t,method:n,payload:aH.encode(JSON.stringify(r))}),dH=e=>oH.decode(e.payload),fH=e=>{if(e==null)return[];if(Array.isArray(e))return e;let t=e.value;if(Array.isArray(t))return t;throw Error(`findAll answered something that is not a list of documents`)},pH=25e3,mH=[500,1e3,2e3,5e3,1e4,2e4],hH=class{slug;socket=null;next=1;waiting=new Map;listeners=new Set;standings=new Set;beat=null;retry=null;attempt=0;closed=!1;opening=null;standing=`idle`;entry=null;get account(){return this.entry?`hanzo:${this.entry.account}`:null}constructor(e){this.slug=e}watch(e){return this.listeners.add(e),()=>void this.listeners.delete(e)}observe(e){return this.standings.add(e),()=>void this.standings.delete(e)}async open(){if(this.socket?.readyState!==WebSocket.OPEN)return this.opening||=this.connect().finally(()=>{this.opening=null}),this.opening}close(){this.closed=!0,this.stopBeat(),this.retry&&clearTimeout(this.retry),this.socket?.close(),this.socket=null,this.settle(`idle`)}async find(e,t={},n={}){return fH(await this.call(`findAll`,[e,t,n]))}async one(e,t){return(await this.find(e,t,{limit:1}))[0]}async write(e){await this.call(`tx`,[e])}async call(e,t=[]){await this.open();let n=this.socket;if(!n||n.readyState!==WebSocket.OPEN)throw Error(`the space plane is not open`);let r=this.next++;return new Promise((i,a)=>{this.waiting.set(r,{resolve:i,reject:a}),n.send(uH(r,XV.request,e,{id:r,method:e,params:t}))})}async connect(){this.closed=!1,this.settle(`opening`);let e=await JV(this.slug);this.entry=e,await new Promise((t,n)=>{let r=new WebSocket(`${e.endpoint}/${e.token}`);r.binaryType=`arraybuffer`,this.socket=r,r.onmessage=e=>this.receive(e.data),r.onerror=()=>n(Error(`the space plane refused the connection`)),r.onclose=()=>{this.stopBeat();for(let e of this.waiting.values())e.reject(Error(`the space plane closed`));this.waiting.clear(),!this.closed&&(this.settle(`lost`),this.later())},r.onopen=()=>{this.call(`hello`,[]).then(()=>{this.attempt=0,this.settle(`live`),this.startBeat(),t()}).catch(n)}})}receive(e){if(typeof e==`string`)return;let t=cH(new Uint8Array(e));if(!t)return;let n=dH(t);if(n===`pong!`)return;let r;try{r=JSON.parse(n)}catch{return}if(t.kind===XV.push||r.id===void 0){let e=Array.isArray(r.result)?r.result:[];if(e.length)for(let t of this.listeners)t(e);return}let i=this.waiting.get(r.id);i&&(this.waiting.delete(r.id),r.error?i.reject(Error(String(r.error))):i.resolve(r.result))}startBeat(){this.stopBeat(),this.beat=setInterval(()=>{this.socket?.readyState===WebSocket.OPEN&&this.socket.send(sH({id:0,kind:XV.request,method:``,payload:new TextEncoder().encode(`ping`)}))},pH)}stopBeat(){this.beat&&clearInterval(this.beat),this.beat=null}later(){let e=mH[Math.min(this.attempt++,mH.length-1)];this.retry=setTimeout(()=>void this.open().catch(()=>this.later()),e)}settle(e){this.standing=e;for(let t of this.standings)t(e)}},gH=(0,V.createContext)(null),_H=()=>{let e=(0,V.useContext)(gH);if(!e)throw Error(`useSpace outside <Space>`);return e},vH=`team.space`,yH=`${tV.account}/auth/openid`,bH=({children:e})=>{let{standing:t}=DV(),[n,r]=(0,V.useState)(`unknown`),[i,a]=(0,V.useState)([]),[o,s]=(0,V.useState)(()=>localStorage.getItem(vH)),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(`idle`),[f,p]=(0,V.useState)(null),m=(0,V.useCallback)(e=>{if(p(null),a(e),e.length===0){r(`homeless`);return}s(t=>t&&e.some(e=>e.url===t)?t:e[0].url)},[]),h=(0,V.useCallback)(async()=>{let e=await YV().catch(e=>e);return e instanceof Error?(p(e),!1):(m(e),!0)},[m]),g=(0,V.useRef)(!1),_=(0,V.useRef)(t);(0,V.useEffect)(()=>{_.current!==t&&(g.current=!1,CV()),_.current=t,!(t===`unknown`||g.current)&&(g.current=!0,(async()=>{let e=await(t===`in`?qV():Promise.resolve([])).catch(e=>e);if(t===`in`&&e instanceof GV&&e.unauthorized&&(e=await YV().catch(t=>t instanceof GV&&t.code.endsWith(`:UnknownMethod`)?e:t)),e instanceof Error){p(e),r(e instanceof GV&&e.unauthorized?`stranger`:`refused`);return}m(e)})())},[t,m]),(0,V.useEffect)(()=>{if(!o)return;localStorage.setItem(vH,o);let e=new hH(o);l(e);let t=e.observe(d);return e.open().then(()=>r(`settled`)).catch(e=>{p(e),r(`refused`)}),()=>{t(),e.close()}},[o]),(0,V.useEffect)(()=>{if(c)return c.watch(e=>{for(let t of new Set(e.map(e=>String(e.objectClass??``))))t&&CV(t)})},[c]);let v=(0,V.useCallback)(e=>{CV(),s(e)},[]),y=(0,V.useMemo)(()=>i.find(e=>e.url===o)??null,[i,o]),b=(0,V.useMemo)(()=>({standing:n,all:i,current:y,org:y?.org??null,choose:v,plane:c,connection:u,refusal:f,enrolNow:h,enrolment:yH}),[n,i,y,v,c,u,f,h]);return(0,H.jsx)(gH.Provider,{value:b,children:e})},xH={project:`tracker:class:Project`,issue:`tracker:class:Issue`,status:`tracker:class:IssueStatus`,milestone:`tracker:class:Milestone`,component:`tracker:class:Component`,person:`contact:class:Person`,channel:`chunter:class:Channel`,direct:`chunter:class:DirectMessage`,message:`chunter:class:ChatMessage`,reply:`chunter:class:ThreadMessage`,reaction:`activity:class:Reaction`,notice:`notification:class:ActivityInboxNotification`,tag:`tags:class:TagReference`},SH={create:`core:class:TxCreateDoc`,update:`core:class:TxUpdateDoc`,remove:`core:class:TxRemoveDoc`},CH={backlog:`tracker:issueStatusCategory:Backlog`,todo:`tracker:issueStatusCategory:Unstarted`,doing:`tracker:issueStatusCategory:Started`,done:`tracker:issueStatusCategory:Completed`,cancelled:`tracker:issueStatusCategory:Cancelled`},wH={none:0,urgent:1,high:2,medium:3,low:4},TH=e=>{let t=e?.name??``;if(!t.includes(`,`))return t.trim();let[n,r]=t.split(`,`);return[r,n].map(e=>e?.trim()).filter(Boolean).join(` `)},EH=(e,t)=>e?`${e.identifier}-${t.number}`:`#${t.number}`,DH=(e,...t)=>[e,...t.map(e=>e??``)].join(`|`),OH=()=>{let e=Math.floor(Date.now()/1e3),t=crypto.getRandomValues(new Uint8Array(8));return e.toString(16).padStart(8,`0`)+Array.from(t,e=>e.toString(16).padStart(2,`0`)).join(``)},kH=(e,t)=>({_id:OH(),space:`core:space:Tx`,objectSpace:e,modifiedBy:t,modifiedOn:Date.now()}),AH=(e,t,n,r,i=OH())=>({...kH(e,t),_class:SH.create,objectId:i,objectClass:n,attributes:r}),jH=(e,t,n)=>({...kH(e.space,t),_class:SH.update,objectId:e._id,objectClass:e._class,operations:n}),MH=(e,t)=>({...kH(e.space,t),_class:SH.remove,objectId:e._id,objectClass:e._class}),NH=`0123456789abcdefghijklmnopqrstuvwxyz`,PH=0,FH=35,IH=NH[18],LH=(e,t)=>NH.indexOf(e[t]),RH=(e,t)=>{let n=e??``,r=t??``,i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.slice(0,i)+zH(n.slice(i),r.slice(i))},zH=(e,t)=>{if(t===``)return BH(e);if(e===``)return VH(t);let n=LH(e,0),r=LH(t,0);return r-n>1?NH[Math.floor((n+r)/2)]:e[0]+BH(e.slice(1))},BH=e=>{for(let t=e.length-1;t>=0;t--)if(LH(e,t)<FH)return e.slice(0,t)+NH[LH(e,t)+1];return e+IH},VH=e=>{let t=LH(e,0);return t>1?NH[Math.floor(t/2)]:t===1?NH[PH]+IH:NH[PH]+VH(e.slice(1))},HH=async(e,t)=>{let n=await e.find(xH.notice,{space:t});return(n.length>0?n:await e.find(xH.notice)).sort((e,t)=>t.modifiedOn-e.modifiedOn)},UH=async(e,t)=>{let[n,r,i]=await Promise.all([e.find(xH.channel,{space:t}),e.find(xH.issue),e.find(xH.project)]),a=n.length>0?n:await e.find(xH.channel),o=new Map;for(let e of i)o.set(e._id,e.name);for(let e of a)o.set(e._id,`#${e.name}`);for(let e of r){let t=o.get(e.space);t&&o.set(e._id,t)}return o},WH=(e,t,n)=>e.write(jH(n,t,{isViewed:!0})),GH=[CH.backlog,CH.todo,CH.doing,CH.done],KH=e=>e.find(xH.project),qH=(e,t)=>e.one(xH.project,{_id:t}),JH=async(e,t)=>{let n=await e.find(xH.status,t?{space:t}:{}),r=new Map(GH.map((e,t)=>[e,t]));return n.sort((e,t)=>(r.get(e.category)??GH.length)-(r.get(t.category)??GH.length)||(e.rank??``).localeCompare(t.rank??``))},YH=async(e,t)=>(await e.find(xH.issue,t?{space:t}:{})).sort((e,t)=>(e.rank??``).localeCompare(t.rank??``)||e.number-t.number),XH=e=>e.find(xH.person),ZH=e=>e.find(xH.tag),QH=e=>e.find(xH.component),$H={projects:()=>DH(xH.project),statuses:e=>DH(xH.status,e),issues:e=>DH(xH.issue,e),people:()=>DH(xH.person),tags:()=>DH(xH.tag),components:()=>DH(xH.component)},eU=(e,t,n,r,i={})=>e.write(jH(n,t,{status:r,rank:RH(i.before?.rank,i.after?.rank)})),tU=(e,t,n,r)=>e.write(jH(n,t,r)),nU=(e,t,n,r)=>e.write(AH(n,t,xH.issue,{title:r.title,status:r.status,priority:r.priority,number:r.number,rank:RH(void 0,r.after?.rank),assignee:null,subIssues:0,comments:0,attachments:0,estimation:0,reportedTime:0,remainingTime:0})),rU=[`all`,`task`,`chat`],iU=(e,t)=>t===`all`?[...e]:e.filter(e=>e.kind===t),aU=(e,t)=>e.reduce((e,n)=>e+ +(n.kind===t&&!n.seen),0),oU=(e,t)=>e.map(e=>e.id===t?{...e,seen:!0}:e),sU=`inbox`,cU={list:()=>Promise.resolve([]),see:()=>Promise.resolve()},lU=e=>{cU=e,CV(sU)},uU=()=>SV(sU,()=>cU.list()),dU=()=>(uU().data??[]).reduce((e,t)=>e+ +!t.seen,0),fU=e=>{let t=TV(sU),n=t?.find(t=>t.id===e);t&&n&&!n.seen&&(wV(sU,oU(t,e)),cU.see(e).catch(()=>wV(sU,t)))},pU=()=>{let e=TV(sU);if(!e)return;let t=e.filter(e=>!e.seen);if(t.length!==0){wV(sU,e.map(e=>e.seen?e:{...e,seen:!0}));for(let e of t)cU.see(e.id).catch(()=>{})}},mU=`<svg role="img" aria-label="Hanzo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
38
- <!-- Origami fold-in → hover: one 3-D turn → press: squash. Pure CSS, no JS. Canonical 7-path shaded H. -->
39
-
40
- <style>.o{fill:#fff;opacity:0;transform-box:fill-box;transform-origin:left center;animation:fold 0.42s cubic-bezier(.16,1,.3,1) forwards}
41
- .s{fill:#ddd}
42
- @keyframes fold{from{opacity:0;transform:perspective(320px) rotateY(90deg)}to{opacity:1;transform:none}}
43
- .o0{animation-delay:0.00s}.o1{animation-delay:0.06s}.o2{animation-delay:0.12s}.o3{animation-delay:0.18s}.o4{animation-delay:0.24s}
44
- /* interaction — pure CSS, no JS: hover = one graceful turn (returns to rest), press = squash */
45
- .hanzo-hov{transform-box:view-box;transform-origin:33.5px 33.5px}
46
- .hanzo-prs{transform-box:view-box;transform-origin:33.5px 33.5px;transition:transform .22s cubic-bezier(.22,1,.36,1)}
47
- svg:hover .hanzo-hov{animation:hanzoTurn 0.85s cubic-bezier(.45,0,.2,1)}
48
- svg:active .hanzo-prs{transform:scale(.92)}
49
- @keyframes hanzoTurn{0%{transform:perspective(300px) rotateY(0)}100%{transform:perspective(300px) rotateY(360deg)}}
50
- @media (prefers-reduced-motion:reduce){.hanzo-hov,.hanzo-prs{animation:none!important;transform:none!important}.o{opacity:1;animation:none;transform:none}}
51
- </style>
52
- <g class="hanzo-hov"><g class="hanzo-prs">
53
- <path class="o o0" d="M22.21 0H0V22.3184H22.21V0Z"/>
54
- <path class="o o1" d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/>
55
- <path class="o o1 s" d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z"/>
56
- <path class="o o2" d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/>
57
- <path class="o o3" d="M22.21 67V44.6369H0V67H22.21Z"/>
58
- <path class="o o3 s" d="M0 44.6369L22.21 46.8285V44.6369H0Z"/>
59
- <path class="o o4" d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/>
60
- </g></g>
61
- </svg>`;function hU(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
62
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
63
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
64
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
65
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
66
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
67
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
68
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
69
- </svg>`}function gU(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
70
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#000000"/>
71
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#222222"/>
72
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#000000"/>
73
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#000000"/>
74
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#000000"/>
75
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#222222"/>
76
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#000000"/>
77
- </svg>`}function _U(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
78
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
79
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
80
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
81
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
82
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
83
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
84
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
85
- </svg>`}function vU(){return`<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
86
- <rect width="64" height="64" rx="8" fill="#000000"/>
87
- <g transform="translate(8, 8) scale(0.716)">
88
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
89
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
90
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
91
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
92
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
93
- </g>
94
- </svg>`}function yU(e={}){let{variant:t=`color`}=e,n=``;switch(t){case`mono`:n=gU();break;case`white`:n=_U();break;case`favicon`:n=vU();break;default:n=hU()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}yU(),yU({variant:`mono`}),yU({variant:`white`}),yU({variant:`favicon`});function bU(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(mU)))}bU();var xU=32;function SU(e){let t=new Uint8Array(e);return crypto.getRandomValues(t),wU(t.buffer)}async function CU(e){let t=new TextEncoder;return crypto.subtle.digest(`SHA-256`,t.encode(e))}function wU(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}async function TU(){let e=SU(xU);return{codeVerifier:e,codeChallenge:wU(await CU(e))}}function EU(){return SU(xU)}var DU={discovery:`/.well-known/openid-configuration`,authorize:`/v1/iam/oauth/authorize`,token:`/v1/iam/oauth/token`,userinfo:`/v1/iam/oauth/userinfo`,jwks:`/v1/iam/.well-known/jwks`,logout:`/v1/iam/oauth/logout`,revoke:`/v1/iam/oauth/revoke`},OU={authMethods:`/v1/iam/auth/methods`,authIdentifier:`/v1/iam/auth/identifier`,authApplication:`/v1/iam/auth/application`,onboarding:`/v1/iam/onboarding`,login:`/v1/iam/login`,sendCode:`/v1/iam/verification-codes`,federationMfa:`/v1/iam/oauth/federation/mfa`,signup:`/v1/iam/signup`,terms:`/v1/iam/terms`,password:`/v1/iam/password`,address:`/v1/iam/address`,accept:`/v1/iam/invitations/accept`,web3Nonce:`/v1/iam/web3/nonce`,web3Verify:`/v1/iam/web3/verify`};function kU(e){return e.replace(/\/+$/,``)}function AU(e,t){return`${kU(e)}${DU[t]}`}function jU(e){let t=new URL(e.endpoint??AU(e.serverUrl,`authorize`));t.searchParams.set(`client_id`,e.clientId),t.searchParams.set(`response_type`,`code`),t.searchParams.set(`redirect_uri`,e.redirectUri),t.searchParams.set(`scope`,e.scope??`openid profile email`),t.searchParams.set(`state`,e.state),e.codeChallenge&&(t.searchParams.set(`code_challenge`,e.codeChallenge),t.searchParams.set(`code_challenge_method`,`S256`)),e.prompt&&t.searchParams.set(`prompt`,e.prompt);for(let[n,r]of Object.entries(e.params??{}))t.searchParams.set(n,r);return t}function MU(e){if(!e)return{};try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):{}}catch{return{}}}function NU(e){let t=MU(e),n=Array.isArray(t.orgs)?t.orgs:[],r=[],i={};for(let e of n)e&&typeof e.org==`string`&&e.org!==``&&(r.includes(e.org)||r.push(e.org),typeof e.role==`string`&&e.role!==``&&(i[e.org]=e.role));return{organizations:r,roles:i}}function PU(e){let t=e.trim(),n=t.includes(`/`)?t.slice(t.lastIndexOf(`/`)+1):t;return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(n)||/^[0-9a-f]{24,}$/i.test(n)||/^[0-9]{10,}$/.test(n)?!0:/^[a-z0-9]{20,}$/i.test(n)&&!/[aeiou]{1}/i.test(n.slice(0,6))}function FU(e,t){let n=e??{},r=(...e)=>{for(let r of e){let e=n[r]??t[r];if(typeof e==`string`&&e.trim()!==``)return e.trim()}return null},i=(...e)=>{for(let r of e){let e=n[r]??t[r];if(typeof e==`string`&&e.trim()!==``&&!PU(e))return e.trim()}return null},a=r(`email`),o=i(`displayName`,`name`,`preferred_username`,`given_name`,`firstName`)??(a?a.split(`@`)[0]:null);if(o==null)return null;let s=o.split(/[\s._-]+/).filter(Boolean).slice(0,2).map(e=>e[0]?.toUpperCase()??``).join(``)||o.slice(0,2).toUpperCase();return{name:o,email:a,avatarUrl:r(`avatar`,`picture`,`avatarUrl`),initials:s}}var IU={chain:`evm`,scheme:`secp256k1-eip191`};async function LU(e){let t=e.trim().toLowerCase().replace(/^0x/,``);if(!/^[0-9a-f]{40}$/.test(t))throw Error(`not an Ethereum address: ${e}`);let{keccak_256:n}=await Le(async()=>{let{keccak_256:e}=await import(`./sha3-DDKddPFc.js`);return{keccak_256:e}},[]),r=n(new TextEncoder().encode(t)),i=`0x`;for(let e=0;e<t.length;e++){let n=e%2==0?r[e>>1]>>4:r[e>>1]&15;i+=n>=8?t[e].toUpperCase():t[e]}return i}function RU(e,t,n){let{domain:r,uri:i,statement:a,nonce:o,issuedAt:s,expirationTime:c,version:l}=e;if(a?.includes(`
95
- `))throw Error(`the sign-in statement must be one line`);let u=[`${r} wants you to sign in with your Ethereum account:`,t,``];return a&&u.push(a,``),u.push(`URI: ${i}`,`Version: ${l||`1`}`,`Chain ID: ${n}`,`Nonce: ${o}`,`Issued At: ${s}`),c&&u.push(`Expiration Time: ${c}`),u.join(`
96
- `)}function zU(e){let t=`0x`;for(let n of new TextEncoder().encode(e))t+=n.toString(16).padStart(2,`0`);return t}function BU(e){let t=typeof e==`string`?Number.parseInt(e,16):typeof e==`number`?e:NaN;return Number.isSafeInteger(t)&&t>0?t:1}var VU=1500,HU=`hanzo_iam_`,UU=`${HU}state`,WU=`${HU}code_verifier`,GU=`${HU}access_token`,KU=`${HU}refresh_token`,qU=`${HU}id_token`,JU=`${HU}expires_at`,YU=`${HU}hold`,XU=`${HU}spent`,ZU=`${HU}refresh`,QU=`${HU}refresh_lease`,$U=3e4,eW=50,tW=50,nW=`${WU}:`;function rW(e){return`${nW}${e}`}var iW=12;function aW(e,t){return`${t}.${e}`}function oW(e){let t=e.indexOf(`.`);if(t>0){let n=e.slice(0,t);if(/^\d+$/.test(n))return{issuedAt:Number(n),codeVerifier:e.slice(t+1)}}return{issuedAt:0,codeVerifier:e}}var sW=`hanzo_iam_login`,cW=`hanzo-iam`;function lW(e,t){let n=new URLSearchParams({code:t});e.state&&n.set(`state`,e.state);let r=e.redirectUri.includes(`?`)?`&`:`?`;return`${e.redirectUri}${r}${n.toString()}`}var uW=9e5,dW=class extends Error{constructor(e,t){super(e),this.code=t,this.name=`Refused`}code},fW=class extends Error{constructor(e,t=[],n){super(`this account signs in with a second factor`),this.directive=e,this.factors=t,this.request=n,this.name=`SecondFactor`}directive;factors;request},pW=class extends Error{constructor(e,t){super(`confirm the account's email address to finish signing in`),this.email=e,this.request=t,this.name=`EmailRequired`}email;request};function mW(e){return`recovery`in e?{recoveryCode:e.recovery}:{mfaType:e.type,passcode:e.passcode}}function hW(e){if(!Array.isArray(e))return[];let t=e.flatMap(e=>{let t=e??{};return typeof t.mfaType!=`string`||!t.mfaType?[]:[{type:t.mfaType,preferred:t.isPreferred===!0,remember:typeof t.mfaRememberInHours==`number`?t.mfaRememberInHours:0}]}),n=``;for(let e of t)(e.type===`email`||e.type===`sms`)&&(n===``||e.preferred)&&(n=e.type);return t.map(({type:e,remember:t})=>({type:e,sent:e===n,remember:t}))}var gW=class extends Error{constructor(){super(`no account holds this address; accept the terms to create one`),this.name=`SignupRequired`}},_W=class extends Error{constructor(e){super(`the session has ended: ${e}`),this.reason=e,this.name=`SessionEnded`}reason},vW=class extends Error{constructor(e,t){super(e),this.reason=t,this.name=`Unmatched`}reason};function yW(e){try{let t=e(),n=`${HU}probe`;return t.setItem(n,`1`),t.removeItem(n),t}catch{return null}}function bW(){return yW(()=>localStorage)??yW(()=>sessionStorage)}function xW(){let e=new Map;return{get length(){return e.size},clear:()=>e.clear(),getItem:t=>e.has(t)?e.get(t):null,key:t=>Array.from(e.keys())[t]??null,removeItem:t=>{e.delete(t)},setItem:(t,n)=>{e.set(t,String(n))}}}var SW=e=>new Promise(t=>setTimeout(t,e));function CW(){try{return typeof navigator<`u`&&navigator.locks?navigator.locks:null}catch{return null}}async function wW(e,t){let n=CW();if(n)return n.request(ZU,t);let r=EU(),i=()=>e.getItem(QU)?.startsWith(`${r}.`)===!0;for(;;){let t=e.getItem(QU);if((t?Number(t.slice(t.indexOf(`.`)+1)):0)>Date.now()){await SW(tW);continue}if(e.setItem(QU,`${r}.${Date.now()+$U}`),await SW(eW),i())break}try{return await t()}finally{i()&&e.removeItem(QU)}}function TW(e){try{let t=JSON.parse(e);return{error:typeof t.error==`string`?t.error:``,description:typeof t.error_description==`string`?t.error_description:``}}catch{return{error:``,description:``}}}async function EW(e,t){let n=await e.json().catch(()=>({}));if(!e.ok||n.status===`error`)throw new dW(typeof n.msg==`string`&&n.msg?n.msg:`${t} (${e.status})`,typeof n.code==`string`?n.code:``);return n}async function DW(e,t){return(await EW(e,t)).data}var OW=class{config;storage;txStorage;redeemable;discoveryCache=null;callbackInFlight=null;held;refreshing=null;constructor(e){this.config=e;let t=bW();this.storage=e.storage??t??xW(),this.txStorage=t??this.storage,this.redeemable=t!==null||e.storage!==void 0,this.held=this.stored()}async getDiscovery(){if(this.discoveryCache)return this.discoveryCache;let e=kU(this.config.serverUrl);try{let t=await fetch(`${e}${DU.discovery}`,{headers:{Accept:`application/json`}});if(t.ok)return this.discoveryCache=await t.json(),this.discoveryCache}catch{}return this.discoveryCache={issuer:e,authorization_endpoint:AU(e,`authorize`),token_endpoint:AU(e,`token`),userinfo_endpoint:AU(e,`userinfo`),jwks_uri:AU(e,`jwks`),revocation_endpoint:AU(e,`revoke`),end_session_endpoint:AU(e,`logout`),response_types_supported:[`code`],grant_types_supported:[`authorization_code`,`refresh_token`],scopes_supported:[`openid`,`email`,`profile`]},this.discoveryCache}async tokenEndpoint(){return this.config.proxyBaseUrl?AU(this.config.proxyBaseUrl,`token`):(await this.getDiscovery()).token_endpoint}async userinfoEndpoint(){return this.config.proxyBaseUrl?AU(this.config.proxyBaseUrl,`userinfo`):(await this.getDiscovery()).userinfo_endpoint}async revocationEndpoint(){return this.config.proxyBaseUrl?AU(this.config.proxyBaseUrl,`revoke`):(await this.getDiscovery()).revocation_endpoint??AU(this.config.serverUrl,`revoke`)}async endSessionEndpoint(){return this.config.proxyBaseUrl?AU(this.config.proxyBaseUrl,`logout`):(await this.getDiscovery()).end_session_endpoint??AU(this.config.serverUrl,`logout`)}stashPkce(e,t){this.sweepStaleVerifiers(),this.txStorage.setItem(rW(e),aW(t,Date.now())),this.txStorage.setItem(UU,e),this.txStorage.setItem(WU,t)}sweepStaleVerifiers(){let e=[];for(let t=this.txStorage.length-1;t>=0;t--){let n=this.txStorage.key(t);if(!n||!n.startsWith(nW))continue;let r=this.txStorage.getItem(n);e.push({key:n,issuedAt:r?oW(r).issuedAt:0})}e.sort((e,t)=>t.issuedAt-e.issuedAt);for(let t of e.slice(iW-1))this.txStorage.removeItem(t.key)}async buildAuthorizeUrl(e){if(!this.redeemable)throw Error(`@hanzo/iam: this browser keeps neither localStorage nor sessionStorage, so the PKCE verifier cannot outlive the redirect to IAM and the callback would fail. Call usableStorage() before starting a login to catch this on the page.`);let t=await this.getDiscovery(),{codeVerifier:n,codeChallenge:r}=await TU(),i=EU();return this.stashPkce(i,n),{url:jU({endpoint:t.authorization_endpoint,serverUrl:this.config.serverUrl,clientId:this.config.clientId,redirectUri:this.config.redirectUri,state:i,scope:this.config.scope,codeChallenge:r,prompt:e?.prompt,params:e?.additionalParams}),codeVerifier:n,state:i}}async signinRedirect(e){let{url:t}=await this.buildAuthorizeUrl(e);window.location.replace(t.toString())}async getSigninUrl(e){let{url:t}=await this.buildAuthorizeUrl(e);return t.toString()}asking=null;parties=new Map;ask(e){this.asking=e&&e.state?{...e,state:e.state}:null}get client(){return this.asking?.clientId??this.config.clientId}async party(e){if(e===this.config.clientId)return{application:this.config.application??this.config.clientId,organization:this.config.organization};let t=this.parties.get(e);if(t)return t;let n=new URL(`${kU(this.config.serverUrl)}${OU.authApplication}`);n.searchParams.set(`clientId`,e);let r=await DW(await fetch(n.toString(),{headers:{Accept:`application/json`}}),`could not read the application`)??{};if(typeof r.organization!=`string`||!r.organization)throw Error(`IAM did not name the application's organization`);let i={application:typeof r.name==`string`&&r.name?r.name:e,organization:r.organization};return this.parties.set(e,i),i}async own(){return this.asking??await this.mine()}async mine(){let{codeVerifier:e,codeChallenge:t}=await TU(),n=EU();return this.stashPkce(n,e),{clientId:this.config.clientId,redirectUri:this.config.redirectUri,scope:this.config.scope,state:n,codeChallenge:t,codeChallengeMethod:`S256`}}async credentialLogin(e){return this.post(e,await this.own())}async post(e,t,n){let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URL(n??`${kU(r)}${OU.login}`);i.searchParams.set(`clientId`,t.clientId),i.searchParams.set(`responseType`,`code`),i.searchParams.set(`redirectUri`,t.redirectUri),i.searchParams.set(`scope`,t.scope??`openid profile email`),t.state&&i.searchParams.set(`state`,t.state),t.nonce&&i.searchParams.set(`nonce`,t.nonce),t.prompt&&i.searchParams.set(`prompt`,t.prompt),t.loginHint&&i.searchParams.set(`login_hint`,t.loginHint),i.searchParams.set(`type`,`code`),t.codeChallenge&&(i.searchParams.set(`code_challenge`,t.codeChallenge),i.searchParams.set(`code_challenge_method`,t.codeChallengeMethod??`S256`));let a=await fetch(i.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify({type:`code`,...await this.party(t.clientId),autoSignin:!0,...e})}),o;try{o=await EW(a,`sign-in failed`)}catch(e){throw e instanceof dW&&e.code===`login_required`&&this.release(),e}let s=o.data;if(s===`NextMfa`||s===`RequiredMfa`)throw s===`NextMfa`&&this.hold(),new fW(s,hW(o.data2),t);if(s===`RequiredEmail`){this.hold();let e=o.data2??{};throw new pW(typeof e.email==`string`?e.email:``,t)}if(s===`SignupRequired`)throw new gW;if(typeof s!=`string`||s.length===0)throw Error(`IAM did not return an authorization code`);return this.release(),lW(t,s)}hold(){this.txStorage.setItem(YU,String(Date.now()+uW))}release(){this.txStorage.removeItem(YU)}holding(){return Number(this.txStorage.getItem(YU)??0)>Date.now()}async resume(e){if(this.holding())return null;try{return await this.credentialLogin(e?{loginHint:e}:{})}catch{return null}}loginWithPassword(e,t){return this.credentialLogin({username:e,password:t,signinMethod:`Password`})}loginWithCode(e,t){let n=e.includes(`@`);return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,...n?{email:e}:{phone:e}})}createAccountWithCode(e,t,n){return this.credentialLogin({username:e,code:t,signinMethod:`Verification code`,email:e,create:!0,terms:n.terms,aup:n.aup})}async verifyFactor(e,t,n=!1){if(!e.request)throw Error(`this second factor names no sign-in to finish`);try{return await this.post({...mW(t),enableMfaRemember:n},e.request)}catch(e){throw e instanceof dW&&this.release(),e}}async finishFederation(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=(await EW(await fetch(`${kU(t)}${OU.federationMfa}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},credentials:`include`,body:JSON.stringify(mW(e))}),`the sign-in could not be finished`)).data;if(typeof n!=`string`||!n)throw Error(`IAM did not say where the sign-in goes`);return n}confirmEmail(e,t){return this.post({passcode:t},e.request)}async changeEmail(e,t){try{await this.post({email:t},e.request)}catch(e){if(e instanceof pW)return e;throw e}throw Error(`IAM granted the sign-in without confirming the address`)}async resetPassword(e,t,n){await DW(await fetch(`${kU(this.config.serverUrl)}${OU.password}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({organization:this.config.organization,username:e,code:t,password:n})}),`could not set the password`)}async acceptInvite(e,t,n){let r=await this.getValidAccessToken();if(!r)throw new dW(`please sign in first`,`login_required`);let i=await DW(await fetch(`${kU(this.config.serverUrl)}${OU.accept}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${r}`},body:JSON.stringify({owner:e,code:t,...n?{emailCode:n}:{}})}),`could not join the organization`)??{};if(i.joined!==!0)throw Error(`IAM did not join the organization`);return typeof i.org==`string`&&i.org?i.org:e}async acceptTerms(e){let t=await this.getValidAccessToken();if(!t)throw Error(`No valid access token — user must log in`);let n=this.config.proxyBaseUrl??this.config.serverUrl;await DW(await fetch(`${kU(n)}${OU.terms}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${t}`},body:JSON.stringify({terms:e.terms,aup:e.aup})}),`could not record the acceptance`)}async addAddress(e,t){let n=await this.getValidAccessToken();if(!n)throw new dW(`please sign in first`,`login_required`);let r=this.config.proxyBaseUrl??this.config.serverUrl,i=await DW(await fetch(`${kU(r)}${OU.address}`,{method:`PUT`,headers:{"Content-Type":`application/json`,Accept:`application/json`,Authorization:`Bearer ${n}`},body:JSON.stringify({clientId:this.client,address:e,code:t})}),`could not add the address`)??{};return{email:typeof i.email==`string`?i.email:``,phone:typeof i.phone==`string`?i.phone:``}}async sendLoginCode(e){let t=e.includes(`@`),n=this.config.proxyBaseUrl??this.config.serverUrl;await DW(await fetch(`${kU(n)}${OU.sendCode}`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,Accept:`application/json`},body:new URLSearchParams({applicationId:`admin/${(await this.party(this.client)).application}`,dest:e,type:t?`email`:`phone`}).toString()}),`could not send code`)}async signup(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=new URL(`${kU(t)}${OU.signup}`);return n.searchParams.set(`clientId`,this.config.clientId),await DW(await fetch(n.toString(),{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({application:this.config.application??this.config.clientId,clientId:this.config.clientId,organization:this.config.organization,email:e.email,password:e.password,code:e.code,...e.name?{name:e.name}:{},...e.terms?{terms:e.terms.terms,aup:e.terms.aup}:{}})}),`sign-up failed`),this.loginWithPassword(e.email,e.password)}async methods(){let e=new URL(`${kU(this.config.serverUrl)}${OU.authMethods}`);e.searchParams.set(`clientId`,this.client);let t=await DW(await fetch(e.toString(),{headers:{Accept:`application/json`}}),`could not read the sign-in methods`)??{},n=Array.isArray(t.oauth)?t.oauth:[];return{password:t.password===!0,code:t.code===!0,signup:t.signup===!0,wallet:t.web3===!0&&(!Array.isArray(t.web3Chains)||t.web3Chains.includes(IU.chain)),address:t.address===!0,providers:n.filter(e=>typeof e.name==`string`&&typeof e.type==`string`).map(e=>({name:e.name,type:e.type}))}}async identify(e){let t=this.config.proxyBaseUrl??this.config.serverUrl,n=await DW(await fetch(`${kU(t)}${OU.authIdentifier}`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({clientId:this.client,identifier:e})}),`could not look up the address`)??{};return{account:n.account===!0,password:n.password===!0}}async handleCallback(e){let t=new URL(e??window.location.href),n=t.searchParams.get(`error`);if(n)throw this.isOwnAttempt(t.searchParams.get(`state`))?new dW(`OAuth error: ${t.searchParams.get(`error_description`)??n}`,n):new vW(`OAuth error on a sign-in this browser did not start. Restart sign-in.`,`foreign`);let r=t.searchParams.get(`code`);if(!r)throw new vW(`Missing authorization code in callback URL`,`empty`);let i=this.callbackInFlight;if(i&&i.code===r)return i.promise;let a=this.exchangeCode(t,r);return this.callbackInFlight={code:r,promise:a},a.catch(()=>{this.callbackInFlight?.promise===a&&(this.callbackInFlight=null)}),a}isOwnAttempt(e){if(!e)return!1;let t=rW(e);return this.txStorage.getItem(t)??this.storage.getItem(t)?!0:(this.txStorage.getItem(UU)??this.storage.getItem(UU))===e}async exchangeCode(e,t){let n=e.searchParams.get(`state`),r=n?rW(n):null,i=r?this.txStorage.getItem(r)??this.storage.getItem(r):null,a=i?oW(i).codeVerifier:null;if(a&&r)this.txStorage.removeItem(r),this.storage.removeItem(r),(this.txStorage.getItem(UU)===n||this.storage.getItem(UU)===n)&&(this.txStorage.removeItem(UU),this.txStorage.removeItem(WU),this.storage.removeItem(UU),this.storage.removeItem(WU));else{if(n&&this.spent().includes(n))throw new vW(`This sign-in already finished in this browser.`,`spent`);let e=this.txStorage.getItem(UU)??this.storage.getItem(UU);if(!e||n!==e)throw new vW(`OAuth state mismatch — stale, concurrent, or forged login. Restart sign-in.`,`foreign`);if(a=this.txStorage.getItem(WU)??this.storage.getItem(WU),!a)throw Error(`Missing PKCE code verifier — start sign-in via signinRedirect() or the embedded credential login.`);this.txStorage.removeItem(UU),this.txStorage.removeItem(WU),this.storage.removeItem(UU),this.storage.removeItem(WU)}let o=new URLSearchParams({grant_type:`authorization_code`,client_id:this.config.clientId,code:t,redirect_uri:this.config.redirectUri,code_verifier:a}),s=await this.tokenEndpoint(),c=await fetch(s,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:o.toString()});if(!c.ok){let e=await c.text().catch(()=>``);throw Error(`Token exchange failed (${c.status}): ${e}`)}let l=await c.json();return this.storeTokens(l),n&&this.spend(n),kW(l)}spent(){try{let e=JSON.parse(this.txStorage.getItem(XU)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}}spend(e){let t=this.spent().filter(t=>t!==e);t.push(e),this.txStorage.setItem(XU,JSON.stringify(t.slice(-12)))}refreshAccessToken(){return this.refreshing??=wW(this.storage,()=>this.refreshHeld()).finally(()=>{this.refreshing=null}),this.refreshing}async refreshHeld(){let e=this.stored(),t=e.access!==this.held.access||e.refresh!==this.held.refresh;if(e.access&&t&&!this.isTokenExpired()){this.held=e;let t=this.getExpiresAt();return{accessToken:e.access,refreshToken:e.refresh??void 0,idToken:this.getIdToken()??void 0,expiresIn:t===null?void 0:Math.max(0,Math.floor((t-Date.now())/1e3)),tokenType:`Bearer`}}if(!e.refresh)throw this.clearTokens(),new _W(`no refresh token is stored`);let n=await fetch(await this.tokenEndpoint(),{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({grant_type:`refresh_token`,client_id:this.config.clientId,refresh_token:e.refresh}).toString()});if(!n.ok){let t=await n.text().catch(()=>``),{error:r,description:i}=TW(t);throw r===`invalid_grant`?(this.storage.getItem(KU)===e.refresh&&this.clearTokens(),new _W(i||r)):Error(`Token refresh failed (${n.status}): ${t}`)}let r=await n.json();return this.storeTokens(r),kW(r)}stored(){return{access:this.storage.getItem(GU),refresh:this.storage.getItem(KU)}}async signinPopup(e){let{url:t,state:n}=await this.buildAuthorizeUrl({additionalParams:e?.additionalParams}),r=e?.width??600,i=e?.height??700,a=window.screenX+(window.outerWidth-r)/2,o=window.screenY+(window.outerHeight-i)/2,s=new URL(this.config.redirectUri,window.location.href).origin;return new Promise((c,l)=>{let u=window.open(t.toString(),sW,`width=${r},height=${i},left=${a},top=${o},menubar=no,toolbar=no`);if(!u){l(Error(`Failed to open login popup — blocked by browser?`));return}let d=!1,f=null,p=()=>{if(!d){d=!0,window.removeEventListener(`message`,m),clearInterval(h),clearTimeout(g),f&&clearTimeout(f);try{u.closed||u.close()}catch{}}},m=e=>{if(d||e.origin!==s)return;let t=e.data;if(!t||typeof t!=`object`||t.source!==cW)return;if(typeof t.state!=`string`||t.state!==n){p(),l(Error(`OAuth state mismatch — possible CSRF (popup)`));return}if(t.error){p(),l(Error(`OAuth error: ${t.error}`));return}if(typeof t.code!=`string`||t.code.length===0){p(),l(Error(`Login popup returned no authorization code`));return}let r=t.code,i=t.state;p();let a=this.config.redirectUri.includes(`?`)?`&`:`?`,o=`${this.config.redirectUri}${a}code=${encodeURIComponent(r)}&state=${encodeURIComponent(i)}`;this.handleCallback(o).then(c,l)};window.addEventListener(`message`,m);let h=setInterval(()=>{d||!u.closed||f||(f=setTimeout(()=>{d||(p(),l(Error(`Login popup was closed before completing`)))},1e3))},300),g=setTimeout(()=>{d||(p(),l(Error(`Login popup timed out`)))},e?.timeoutMs??3e5)})}async loginWithWallet(e){let t=e?.provider??globalThis.ethereum;if(!t||typeof t.request!=`function`)throw Error(`No EIP-1193 wallet provider found (window.ethereum).`);let n=await t.request({method:`eth_requestAccounts`}),r=Array.isArray(n)?n[0]:void 0;if(typeof r!=`string`||!r)throw Error(`Wallet did not return an address`);let i=await LU(r),a=BU(await t.request({method:`eth_chainId`}).catch(()=>void 0)),o=await this.own(),s=kU(this.config.serverUrl),c=new URL(`${s}${OU.web3Nonce}`);c.searchParams.set(`chain`,IU.chain),c.searchParams.set(`address`,i),c.searchParams.set(`clientId`,o.clientId);let l=await DW(await fetch(c.toString(),{headers:{Accept:`application/json`},credentials:`include`}),`could not start the wallet sign-in`);if(!l||typeof l.nonce!=`string`||typeof l.domain!=`string`)throw Error(`IAM did not return a sign-in challenge`);let u=RU(l,i,a),d=await t.request({method:`personal_sign`,params:[zU(u),i]});if(typeof d!=`string`||!d)throw Error(`Wallet did not return a signature`);return this.post({...IU,address:i,message:u,signature:d,clientId:o.clientId,redirectUri:o.redirectUri,scope:o.scope??`openid profile email`,state:o.state,nonce:o.nonce,codeChallenge:o.codeChallenge,codeChallengeMethod:o.codeChallengeMethod},o,`${s}${OU.web3Verify}`)}storeTokens(e){if(this.storage.setItem(GU,e.access_token),e.refresh_token&&this.storage.setItem(KU,e.refresh_token),e.id_token&&this.storage.setItem(qU,e.id_token),e.expires_in){let t=Date.now()+e.expires_in*1e3;this.storage.setItem(JU,String(t))}else{let t=MU(e.access_token).exp;typeof t==`number`&&Number.isFinite(t)&&this.storage.setItem(JU,String(t*1e3))}this.held=this.stored()}getAccessToken(){return this.storage.getItem(GU)}getRefreshToken(){return this.storage.getItem(KU)}getIdToken(){return this.storage.getItem(qU)}getExpiresAt(){let e=this.storage.getItem(JU);if(!e)return null;let t=Number(e);return Number.isFinite(t)?t:null}isTokenExpired(){let e=this.storage.getItem(JU);return e?Date.now()>=Number(e):!1}async getValidAccessToken(){let e=this.getAccessToken();if(e&&!this.isTokenExpired())return e;if(this.getRefreshToken())try{return(await this.refreshAccessToken()).accessToken}catch{return null}return null}clearTokens(){this.storage.removeItem(GU),this.storage.removeItem(KU),this.storage.removeItem(qU),this.storage.removeItem(JU),this.held={access:null,refresh:null}}async logout(){let e=this.storage.getItem(GU),t=this.storage.getItem(KU),n=this.storage.getItem(qU);this.clearTokens();let r=await Promise.race([(async()=>(await this.revoke(t,`refresh_token`,e),await this.revoke(e,`access_token`,e),this.endSessionEndpoint()))(),new Promise(e=>setTimeout(()=>e(AU(this.config.serverUrl,`logout`)),VU))]),i=new URL(r);n&&i.searchParams.set(`id_token_hint`,n),i.searchParams.set(`client_id`,this.config.clientId),this.config.postLogoutRedirectUri&&i.searchParams.set(`post_logout_redirect_uri`,this.config.postLogoutRedirectUri),window.location.href=i.toString()}async end(){let e=this.storage.getItem(GU),t=this.storage.getItem(KU),n=this.storage.getItem(qU);this.clearTokens();let r=this.config.proxyBaseUrl??this.config.serverUrl,i=new URLSearchParams({client_id:this.config.clientId});n&&i.set(`id_token_hint`,n),await Promise.race([(async()=>{await this.revoke(t,`refresh_token`,e,AU(r,`revoke`)),await this.revoke(e,`access_token`,e,AU(r,`revoke`)),await fetch(AU(r,`logout`),{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:i.toString()}).catch(()=>void 0)})(),new Promise(e=>setTimeout(e,VU))])}async revoke(e,t,n,r){if(e)try{await fetch(r??await this.revocationEndpoint(),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...n?{Authorization:`Bearer ${n}`}:{}},body:new URLSearchParams({token:e,token_type_hint:t,client_id:this.config.clientId}).toString()})}catch{}}async getUserInfo(){let e=await this.getValidAccessToken();if(!e)throw Error(`No valid access token — user must log in`);let t=await this.userinfoEndpoint(),n=await fetch(t,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Userinfo fetch failed (${n.status})`);return await n.json()}async getUser(){if(!await this.getValidAccessToken())return null;let e=await this.getUserInfo();return{sub:e.sub??``,email:e.email,name:e.name,givenName:e.given_name,familyName:e.family_name,phoneNumber:e.phone_number,emailVerified:e.email_verified,picture:e.picture,owner:e.owner}}};function kW(e){return{accessToken:e.access_token,refreshToken:e.refresh_token,idToken:e.id_token,expiresIn:e.expires_in,tokenType:e.token_type,scope:e.scope}}var AW=2147483647,jW=3e4,MW=(0,V.createContext)(null);MW.displayName=`IamContext`;var NW=`hanzo_iam_current_org`,PW=`hanzo_iam_current_project`;function FW(e){let{config:t,autoInit:n=!0,onAuthChange:r,children:i}=e,a=(0,V.useMemo)(()=>new OW(t),[t.serverUrl,t.clientId,t.redirectUri]),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(!1),[u,d]=(0,V.useState)(n),[f,p]=(0,V.useState)(a.getAccessToken()),[m,h]=(0,V.useState)(null),g=(0,V.useRef)(null),_=(0,V.useCallback)(()=>{if(g.current&&clearTimeout(g.current),a.isTokenExpired())return;let e=a.getExpiresAt();if(e===null)return;let t=async()=>{try{let e=await a.refreshAccessToken();p(e.accessToken),_()}catch(e){if(e instanceof _W){l(!1),s(null),p(null);return}g.current=setTimeout(t,jW)}},n=e-Date.now()-6e4;if(n>AW){g.current=setTimeout(_,AW);return}if(n<=0){t();return}g.current=setTimeout(t,n)},[a]);(0,V.useEffect)(()=>{if(!n){d(!1);return}let e=!1;return(async()=>{try{let t=await a.getValidAccessToken();if(e)return;if(t){p(t),l(!0);try{let t=await a.getUserInfo();e||s(t)}catch{}_(),r?.(!0)}else r?.(!1)}catch(t){e||(h(t instanceof Error?t:Error(String(t))),r?.(!1))}finally{e||d(!1)}})(),()=>{e=!0}},[a,n]),(0,V.useEffect)(()=>()=>{g.current&&clearTimeout(g.current)},[]);let v=(0,V.useCallback)(async e=>{p(e.accessToken),l(!0);try{let e=await a.getUserInfo();s(e)}catch{}_(),r?.(!0)},[a,_,r]),y=(0,V.useCallback)(async e=>{h(null),await a.signinRedirect(e)},[a]),b=(0,V.useCallback)(async e=>{h(null);try{let t=await a.signinPopup(e);await v(t)}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),x=(0,V.useCallback)(async e=>{h(null);try{let t=await a.handleCallback(e);return await v(t),t}catch(e){let t=e instanceof Error?e:Error(String(e));throw h(t),t}},[a,v]),S=(0,V.useCallback)(async()=>{g.current&&clearTimeout(g.current);try{localStorage.removeItem(NW),localStorage.removeItem(PW)}catch{}try{await a.logout()}catch{a.clearTokens(),s(null),l(!1),p(null),h(null),r?.(!1)}},[a,r]),C=(0,V.useMemo)(()=>({sdk:a,config:t,user:o,isAuthenticated:c,isLoading:u,accessToken:f,login:y,loginPopup:b,handleCallback:x,logout:S,error:m}),[a,t,o,c,u,f,y,b,x,S,m]);return(0,V.createElement)(MW.Provider,{value:C},i)}function IW(){let e=(0,V.useContext)(MW);if(!e)throw Error(`useIam() must be used within an <IamProvider>`);return e}function LW(){let{isAuthenticated:e,accessToken:t}=IW(),[n,r]=(0,V.useState)([]),[i,a]=(0,V.useState)({}),[o,s]=(0,V.useState)(()=>{try{return localStorage.getItem(NW)}catch{return null}}),[c,l]=(0,V.useState)(()=>{try{return localStorage.getItem(PW)}catch{return null}});(0,V.useEffect)(()=>{if(!e||!t){r([]),a({});return}let{organizations:n,roles:i}=NU(t);r(n.map(e=>({name:e,displayName:e}))),a(i);let c=n[0];if(c&&(!o||!n.includes(o))){s(c);try{localStorage.setItem(NW,c)}catch{}}},[e,t]);let u=[],d=(0,V.useMemo)(()=>n.find(e=>e.name===o)??null,[n,o]),f=(0,V.useCallback)(e=>{s(e),l(null);try{localStorage.setItem(NW,e),localStorage.removeItem(PW)}catch{}},[]),p=(0,V.useCallback)(e=>{l(e);try{e?localStorage.setItem(PW,e):localStorage.removeItem(PW)}catch{}},[]);return{organizations:n,roles:i,currentRole:o?i[o]??null:null,currentOrg:d,currentOrgId:o,switchOrg:f,projects:u,currentProject:null,currentProjectId:c,switchProject:p,isLoading:!1}}function RW(){let{sdk:e,accessToken:t,isAuthenticated:n}=IW(),r=(0,V.useCallback)(async()=>{try{return await e.getValidAccessToken()}catch{return null}},[e]);return{token:t,isValid:n&&!!t&&!e.isTokenExpired(),refresh:r}}function zW(){return BW((0,V.useContext)(MW))}function BW(e){let t=e?.user??null,n=e?.accessToken??null,r=e?.isAuthenticated??!1;return(0,V.useMemo)(()=>r?FU(t,MU(n)):null,[t,n,r])}var VW={site:``,home:`/home`,signUp:`/signup`};function HW(e){VW={...VW,...e}}var UW=()=>VW,WW=()=>VW.brand??`Hanzo`,GW=e=>`${VW.site}${e}`,KW=`admin`;function qW(e){if(!e||e.type===`application`)return!1;let t=e.orgs;return!Array.isArray(t)||t.length===0?!1:t[0]?.org===KW}var JW=[`/board`,`/bots`,`/cal`,`/chat`,`/chat/shared`,`/contacts`,`/dev`,`/drive`,`/home`,`/inbox`,`/meet`,`/settings`,`/settings/organization`,`/settings/organization/billing`,`/settings/organization/members`,`/settings/organization/usage`,`/work`],YW=[`general`,`account`,`privacy`,`billing`,`usage`,`capabilities`,`memory`,`code`,`environments`,`machines`,`keys`,`members`,`integrations`,`notifications`],XW=[`agents`,`bots`,`skills`,`connectors`,`plugins`],ZW=[`image`,`video`,`audio`,`document`,`slides`,`type`,`model`,`code`,`file`,`sites`,`new`],QW=/^sess_[0-9a-f]{32}$/,$W=/^[a-z0-9]([a-z0-9-]{0,38}[a-z0-9])?$/,eG=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,tG=/^(flow_[0-9a-f]{32}|new)$/,nG=[`artifacts`,`templates`,`projects`,`issues`,`automations`,`sync`,`mcp`,`plans`];function rG(e){let t=e.replace(/^\/+|\/+$/g,``);if(QW.test(t))return{kind:`run`,id:t};if(t===`-/settings`||t.startsWith(`-/settings/`)){let e=t.slice(11)||`general`;return YW.includes(e)?{kind:`settings`,section:e}:{kind:`new`}}if(t.startsWith(`-/customize/agents/`)){let e=t.slice(19);return eG.test(e)?{kind:`agent`,name:e}:{kind:`new`}}if(t===`-/customize`||t.startsWith(`-/customize/`)){let e=t.slice(12)||`agents`;return XW.includes(e)?{kind:`customize`,tab:e}:{kind:`new`}}if(t.startsWith(`-/automations/`)){let e=t.slice(14);return tG.test(e)?{kind:`automation`,id:e}:{kind:`new`}}if(t.startsWith(`-/artifacts/`)){let e=t.slice(12);return ZW.includes(e)?{kind:`screen`,screen:`artifacts`,of:e}:{kind:`new`}}if(t.startsWith(`-/`)){let e=t.slice(2);return nG.includes(e)?{kind:`screen`,screen:e}:{kind:`new`}}if($W.test(t))return{kind:`project`,slug:t};let[n,r,...i]=t.split(`/`);return!i.length&&n&&r&&eG.test(n)&&eG.test(r)?{kind:`repo`,org:n,name:r}:{kind:`new`}}[...nG.map(e=>({kind:`screen`,screen:e})),...YW.map(e=>({kind:`settings`,section:e})),...XW.map(e=>({kind:`customize`,tab:e}))];var iG=new Map([[`-/settings/machines`,`machines`],[`-/settings/environments`,`environments`]]);new Map([...iG].map(([e,t])=>[t,e]));function aG(e){if(e.kind===`run`)return`/run/${e.id}`;if(e.kind===`repo`)return`/projects/${e.org}/${e.name}`;if(e.kind===`project`)return`/projects/${e.slug}`;let t=oG(e);return t&&`/${iG.get(t)??t.slice(2)}`}function oG(e){switch(e.kind){case`new`:return``;case`run`:return e.id;case`screen`:return e.of?`-/${e.screen}/${e.of}`:`-/${e.screen}`;case`settings`:return e.section===`general`?`-/settings`:`-/settings/${e.section}`;case`customize`:return e.tab===`agents`?`-/customize`:`-/customize/${e.tab}`;case`agent`:return`-/customize/agents/${e.name}`;case`project`:return e.slug;case`repo`:return`${e.org}/${e.name}`;case`automation`:return`-/automations/${e.id}`}}var sG=`hanzo.optin`,cG=D(`Sign in to choose experimental features.`);async function lG(e,t,n){let r;try{r=await fetch(`${LG()}${e}`,{...t,headers:{...t?.body?{"Content-Type":`application/json`}:{},...QG()}})}catch{throw Error(n.offline)}if(r.status===401)throw Error(cG);if(r.status===403&&n.refused)throw Error(n.refused);if(!r.ok)throw Error(n.failed);return r.json()}var uG=()=>{typeof window<`u`&&window.dispatchEvent(new Event(sG))};function dG(e){let t=e??{};return{on:t.on===!0,blocked:t.blocked===!0,public:Array.isArray(t.public)?t.public.filter(e=>typeof e==`string`):[]}}async function fG(){return dG(await lG(`/v1/flag/optin`,void 0,{offline:D(`Your experimental features setting could not be read. Check your connection and try again.`),failed:D(`Your experimental features setting could not be read. Try again in a moment.`)}))}async function pG(e){let t=dG(await lG(`/v1/flag/optin`,{method:`PUT`,body:JSON.stringify({on:e})},{offline:D(`Your choice was not saved. Check your connection and try again.`),failed:D(`Your choice was not saved. Try again in a moment.`),refused:D(`Your team or organization has turned experimental features off.`)}));return uG(),t}var mG=`https://hanzo.team`;`${mG}`,`${mG}`;var hG=`/dev`,gG=`/library`,_G=`/settings`,vG=`${_G}/organization`,yG={general:_G,organization:vG,members:`${vG}/members`,billing:`${vG}/billing`,usage:`${vG}/usage`,keys:`${vG}/keys`},bG=e=>Object.hasOwn(yG,e),xG=e=>e&&bG(e)?yG[e]:_G;function SG(e){let t=rG(e),n=aG(t);return n===`/artifacts`||n.startsWith(`/artifacts/`)?`${gG}${n.slice(10)}`:t.kind===`settings`&&(n===`/settings`||n.startsWith(`/settings/`))?xG(t.section):hG+n}var CG=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}\/[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,wG=e=>GW(SG(e&&(QW.test(e)||CG.test(e)||$W.test(e))?e:``)),TG=new Set([`/chat`,`/chat/shared`,`/dev`]);JW.filter(e=>!TG.has(e)&&e!==`/settings`&&!e.startsWith(`/settings/`));var EG=[`hanzo.app`],DG=e=>EG.includes(e),OG=e=>e===`hanzo.team`||e===`www.hanzo.team`,kG=`https://hanzo.ai`,AG=e=>e===`hanzo.ai`||e===`www.hanzo.ai`,jG=`https://hanzo.app`;`${jG}`,`${jG}`;var MG=e=>e.endsWith(`.hanzo.app`)||e===`hanzo.chat`,NG=`-dev.hanzo.ai`;function PG(e){let t=e.endsWith(`.`)?e.slice(0,-1):e;if(!t.endsWith(NG))return!1;let n=t.slice(0,-9);return n.length>4&&!n.includes(`.`)}[...EG],[...EG];var FG=`https://api-dev.hanzo.ai`,IG=()=>typeof window<`u`&&PG(window.location.hostname);function LG(){if(IG())return FG;let e=UW().api;if(e)return e.replace(/\/+$/,``);if(typeof window<`u`){let e=window.location.hostname;return DG(e)||e===`hanzo.ai`||e.endsWith(`.hanzo.ai`)||OG(e)||e===`hanzo.bot`||MG(e)?`https://api.hanzo.ai`:window.location.origin}return`https://api.hanzo.ai`}var RG=`hanzo_iam_`,zG=`${RG}access_token`;`${RG}`;var BG=`${RG}expires_at`;`${RG}`;function VG(){return UW().session??window.localStorage}function HG(){if(typeof window>`u`)return null;try{return VG().getItem(zG)}catch{return null}}`${zG}${BG}`;function UG(){if(typeof window>`u`)return!1;try{return!!(HG()||GG()||window.localStorage.getItem(`hanzo_access_token`)||window.localStorage.getItem(WG)||window.sessionStorage?.getItem(zG))}catch{return!1}}var WG=`hanzo:who`;`${RG}`,`${RG}`;function GG(){let e=HG();if(e)try{let t=e.split(`.`)[1],n=JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`)));return typeof n.sub==`string`&&n.sub?n.sub:void 0}catch{return}}function KG(e){if(!e)return null;try{let t=e.split(`.`)[1];return JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`)))}catch{return null}}var qG=[`hanzo-id`,`lux-id`,`zoo-id`,`pars-id`],JG=[`hanzo`,`lux`,`zoo`,`pars`,`platform`,`hanzoai`,`luxfi`,`zooai`,`hanzo-inc`,`hanzo-apps`,`hanzo-community`];function YG(e){let t=KG(e),n=qW(t),r=t?.orgs,i=[];for(let e of Array.isArray(r)?r:[]){let t=e,r=t?.org;if(typeof r!=`string`||!r||i.includes(r)||qG.includes(r))continue;let a=typeof t?.role==`string`&&[`owner`,`admin`].includes(t.role.trim().toLowerCase());(r===`admin`?n:!JG.includes(r)||n||a)&&i.push(r)}return i}function XG(){return YG(HG())}function ZG(){try{let e=XG(),t=window.localStorage.getItem(`${RG}current_org`);return t&&e.includes(t)?t:e.length===1?e[0]:null}catch{return null}}function QG(){let e={},t=HG();t&&(e.Authorization=`Bearer ${t}`);let n=ZG();return n&&(e[`X-Org-Id`]=n),e}var $G=`hanzo:org`;function eK(e){tK(e),window.dispatchEvent(new Event($G))}function tK(e){try{window.localStorage.setItem(`${RG}current_org`,e)}catch{}}var nK=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function rK(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:nK(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var iK=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},aK=e=>{let t=iK(e);return t.charAt(0).toUpperCase()+t.slice(1)},oK=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),sK={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function cK(e){return e!=null}function lK(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??sK.width,a=e.size??e.height??sK.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?oK(...c):oK(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??sK[`stroke-width`])*Number(e.size??e.width??sK.width)/Number(t.size??t.width??sK.width):t.strokeWidth??sK[`stroke-width`];return[`svg`,{...Object.entries(sK).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&cK(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&cK(t.width)&&{[r(`width`)]:t.width},...`height`in t&&cK(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function uK(e,t={}){return lK(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var dK=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},fK=(0,V.createContext)({}),pK=()=>(0,V.useContext)(fK),mK=(0,V.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=pK()??{},y=!!c||dK(d),[b,x,S=[]]=uK(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:oK(v,s),hasA11yProp:y,attributes:d});return(0,V.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,V.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function hK(e,t=[],n=[]){let r=typeof e==`string`?rK(e,t,n):e,i=(0,V.forwardRef)(({className:e,...t},n)=>(0,V.createElement)(mK,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=aK(r.name)),i}var gK={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};gK.node;var _K=hK(gK),vK={name:`arrow-up-right`,size:24,node:[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]};vK.node;var yK=hK(vK),bK={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};bK.node;var xK=hK(bK),SK={name:`compass`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]};SK.node;var CK=hK(SK),wK={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};wK.node;var TK=hK(wK),EK={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};EK.node;var DK=hK(EK),OK={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};OK.node;var kK=hK(OK),AK={name:`palette`,size:24,node:[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]};AK.node;var jK=hK(AK),MK={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};MK.node;var NK=hK(MK),PK={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};PK.node;var FK=hK(PK),IK={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};IK.node;var LK=hK(IK),RK={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};RK.node;var zK=hK(RK),BK={name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]};BK.node;var VK=hK(BK),HK={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};HK.node;var UK=hK(HK),WK={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};WK.node;var GK=hK(WK),KK=null,qK=null,JK=()=>qK??=Le(()=>import(`./ModelPickerMenu-Dx9FATCv.js`).then(e=>KK=e.ModelPickerMenu),__vite__mapDeps([0,1,2,3,4])),YK=32,XK=44;function ZK({models:e,value:t,onChange:n,scope:r,limits:i,loading:o=!1,error:s=null,disabled:c=!1,quiet:l=!1,size:u=`md`,placeholder:d,name:f,describe:p,granted:m,onUpgrade:h,funded:g,balance:_,onTopUp:v,open:b,onOpenChange:x}){let{t:S}=R(),C=f??S(`Model`),[w,T]=(0,V.useState)(!1),E=b??w,D=(0,V.useCallback)(e=>{b===void 0&&T(e),x?.(e)},[b,x]),O=!te().sm,k=O?XK:YK,[ee,A]=(0,V.useState)(0),j=(0,V.useRef)(null),M=t?e.find(e=>e.id===t):void 0,N=M?Zt(M):t||(d??S(`Choose a model`)),P=(0,V.useCallback)(()=>{D(!1),queueMicrotask(()=>j.current?.focus?.())},[D]),[F,I]=(0,V.useState)(()=>KK),ne=(0,V.useCallback)(()=>{F||JK().then(e=>I(()=>e))},[F]);(0,V.useEffect)(()=>{E&&ne()},[E,ne]);let re=(0,V.useRef)(!1);(0,V.useEffect)(()=>{F&&re.current&&j.current?.focus?.()},[F]);let ie=u===`sm`,L=(0,H.jsxs)(y,{ref:j,...B(`model-picker`),role:`button`,tabIndex:c?-1:0,"aria-label":p??S(`{name}: {model}`,{name:C,model:N}),"aria-haspopup":`listbox`,"aria-expanded":E,"aria-disabled":c||void 0,height:l||ie?28:36,px:l?5:ie?`$2`:`$3`,gap:`$2`,items:`center`,maxW:`100%`,rounded:l?8:`$3`,...l?{"$max-sm":{height:36},transition:`quickest`}:null,borderWidth:+!l,borderColor:`$borderColor`,bg:l?`transparent`:`$background`,cursor:c?`default`:`pointer`,opacity:c?.5:1,hoverStyle:c?void 0:l?{bg:`$hover`}:{borderColor:`$rim`},pressStyle:c?void 0:{bg:`$hover`},focusVisibleStyle:at,onLayout:e=>A(e.nativeEvent?.layout?.width??0),onPress:c||F&&!O?void 0:()=>D(!0),onMouseEnter:c?void 0:ne,onFocus:c?void 0:()=>{re.current=!0,ne()},onBlur:e=>{e.relatedTarget&&(re.current=!1)},onKeyDown:e=>{c||(e.key===`Enter`||e.key===` `||e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault?.(),D(!0))},children:[(0,H.jsx)(a,{size:l?`$3`:ie?`$1`:`$2`,color:`$ink`,fontWeight:l?`500`:void 0,numberOfLines:1,shrink:1,minW:0,children:N}),M&&!l?(0,H.jsx)(a,{size:ie?`$1`:`$2`,color:`$soft`,numberOfLines:1,shrink:2,minW:0,children:sn(M)}):null,l?null:(0,H.jsx)(kp,{size:ie?12:14,color:`$soft`,shrink:0,"aria-hidden":!0})]});return F?(0,H.jsx)(F,{trigger:L,open:E,onOpen:()=>D(!0),onClose:P,disabled:c,width:ee,focusTrigger:()=>j.current?.focus?.(),models:e,value:t,onChange:n,scope:r,limits:i,loading:o,error:s,name:C,sheet:O,row:k,granted:m,onUpgrade:h,funded:g,balance:_,onTopUp:v}):L}var QK=[{id:`auto`,label:D(`Auto`),note:D(`Adaptive reasoning based on task complexity`)},{id:`instant`,label:D(`Instant`),note:D(`Answers right away, without thinking`)},{id:`low`,label:D(`Low`),note:D(`A quick pass with minimal thinking`)},{id:`medium`,label:D(`Medium`),note:D(`Thinks before answering`)},{id:`high`,label:D(`High`),note:D(`Deep reasoning for complex problems`)},{id:`max`,label:D(`Max`),note:D(`Maximum compute and exhaustive verification`)}],$K={px:`$2`,py:`$1.5`,rounded:`$3`};function eq({label:e,children:t,...n}){return(0,H.jsxs)(z,{...B(`sidebar-section`),mt:`$3`,gap:`$0.5`,...n,children:[e?(0,H.jsx)(a,{size:`$1`,px:`$2`,py:`$1`,color:`$soft`,fontWeight:`500`,children:e}):null,t]})}function tq({children:e,active:t=!1,onPress:n,icon:r,...i}){return(0,H.jsxs)(y,{...B(`sidebar-item`),...$K,items:`center`,gap:`$2`,cursor:`pointer`,onPress:n,role:`button`,tabIndex:0,"aria-current":t?`page`:void 0,bg:t?`$edge`:void 0,hoverStyle:{bg:t?`$edge`:`$hover`},pressStyle:{bg:`$raised`},...i,children:[r?(0,H.jsx)(z,{opacity:.7,children:r}):null,(0,H.jsx)(a,{size:`$2`,numberOfLines:1,flex:1,color:t?`$color`:`$quiet`,children:e})]})}var nq=(e,t)=>e.product?e.label:t(e.label),rq=[{label:D(`Settings`),rows:[{id:`general`,label:D(`General`)},{id:`account`,label:D(`Account`)},{id:`billing`,label:D(`Billing`)},{id:`referrals`,label:D(`Referrals & Rewards`)},{id:`usage`,label:D(`Usage`)},{id:`capabilities`,label:D(`Capabilities`),note:D(`What a model may reach for on your behalf.`)},{id:`privacy`,label:D(`Privacy`),href:GW(`/legal/privacy`)},{id:`dev`,label:`Hanzo Dev`,product:!0,href:wG()},{id:`browser`,label:`Hanzo Browser`,product:!0,href:GW(`/extension`)}]},{label:D(`Preferences`),rows:[{id:`model`,label:D(`Default model`)},{id:`agent`,label:D(`Personal agent`),note:D(`The agent that answers as you — its capabilities, its modes, and what it is allowed to do on your behalf. Nothing is bound to this surface yet, so there is nothing here to change; it is listed because this is where it will live.`)}]},{label:D(`Customize`),rows:[{id:`apps`,label:D(`Apps`)},{id:`channels`,label:D(`Channels`)},{id:`plugins`,label:D(`Plugins`),href:GW(SG(`-/customize/plugins`))},{id:`skills`,label:D(`Skills`),href:GW(SG(`-/customize`))},{id:`memory`,label:D(`Memory`),note:D(`Nothing is remembered between conversations yet.`)}]},{label:D(`Platform`),rows:[{id:`models`,label:D(`Models`)},{id:`base`,label:`Base`,product:!0,href:GW(`/base`)},{id:`functions`,label:`Functions`,product:!0,href:GW(`/functions`)},{id:`realtime`,label:`Realtime`,product:!0,href:GW(`/realtime`)},{id:`keys`,label:D(`API keys`),href:`https://platform.hanzo.ai/api-keys`}]},{label:D(`Help & Support`),rows:[{id:`docs`,label:D(`Documentation`),href:`https://docs.hanzo.ai`},{id:`support`,label:D(`Help center`),href:GW(`/support`)},{id:`contact`,label:D(`Contact us`),href:GW(`/contact`)},{id:`status`,label:D(`Status`),href:`https://status.hanzo.ai`},{id:`releases`,label:D(`Release notes`),href:`https://github.com/hanzoai/cli/releases`}]}],iq=rq.flatMap(e=>e.rows),aq=iq[0].id;function oq({active:e,filter:t,onPick:n,onBack:r}){let{t:i}=R(),a=t.trim().toLowerCase(),o=a?rq.map(e=>({...e,rows:e.rows.filter(e=>[nq(e,i),e.label].some(e=>e.toLowerCase().includes(a)))})).filter(e=>e.rows.length>0):rq;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(tq,{icon:(0,H.jsx)(_K,{size:15,"aria-hidden":!0,"data-i18n-mirror":!0}),onPress:r,children:i(`Workspace`)}),a&&o.length===0?(0,H.jsx)(U,{px:`$3`,py:`$2`,fontSize:`$2`,color:`$quiet`,children:i(`No matches for “{query}”.`,{query:t.trim()})}):null,o.map(t=>(0,H.jsx)(eq,{label:i(t.label),children:t.rows.map(t=>(0,H.jsx)(tq,{icon:t.href?(0,H.jsx)(yK,{size:13,"aria-hidden":!0}):void 0,active:t.id===e,"aria-current":t.id===e?`true`:void 0,onPress:()=>n(t),children:nq(t,i)},t.id))},t.label))]})}var sq=((e,t)=>ce({},e,t)),cq=class extends Error{status;constructor(e,t){super(t),this.status=e,this.name=`Refusal`}},lq=class extends Error{source;values;constructor(e,t={}){super(ce({},e,t)),this.source=e,this.values=t}};function uq(e,t=sq){return e instanceof lq?t(e.source,e.values):t(e instanceof Error?e.message:String(e))}function dq(e,t){let n=new Headers(t),r=e.token();return r&&!n.has(`Authorization`)&&n.set(`Authorization`,`Bearer ${r}`),e.org&&!n.has(`X-Org-Id`)&&n.set(`X-Org-Id`,e.org),n}async function fq(e){try{let t=await e.json(),n=typeof t.error==`string`?t.error:t.error?.message;return t.detail||n||t.msg||t.message||t.title||``}catch{return``}}var pq=e=>encodeURIComponent(e);async function mq(e,t,n,r,i){let a=dq(e,r===void 0?void 0:{"Content-Type":`application/json`}),o=await fetch(`${e.api}${n}`,{method:t,headers:a,body:r===void 0?void 0:JSON.stringify(r),cache:`no-store`,signal:i?.signal});if(!o.ok){let e=await fq(o);throw new cq(o.status,e||`${t} ${n.split(`?`)[0]} answered ${o.status}`)}if(o.status===204)return;let s=await o.text();return s?JSON.parse(s):void 0}var hq=e=>typeof e==`string`?e:``,gq=e=>typeof e==`number`&&Number.isFinite(e)?e:0,_q=e=>e&&typeof e==`object`?e:{},vq=e=>Array.isArray(e)?e:[];function yq(e,t=`usd`){let n=e%100==0;try{return new Intl.NumberFormat(`en-US`,{style:`currency`,currency:(t||`usd`).toUpperCase(),minimumFractionDigits:n?0:2,maximumFractionDigits:2}).format(e/100)}catch{return`${(e/100).toFixed(n?0:2)} ${t.toUpperCase()}`}}function bq(e){let t=e.replace(/[$,\s]/g,``);if(!/^\d+(\.\d{1,2})?$/.test(t))return null;let n=Math.round(Number(t)*100);return n>0?n:null}function xq(e){let t=_q(e),n=_q(t.card),r=_q(t.billingAddress),i=gq(n.expMonth),a=gq(n.expYear);return{id:hq(t.id),type:hq(t.type)||`card`,brand:hq(n.brand),last4:hq(n.last4),expires:i&&a?`${String(i).padStart(2,`0`)}/${String(a%100).padStart(2,`0`)}`:``,default:t.isDefault===!0,name:hq(t.name),billingAddress:r&&(r.line1||r.city||r.country||r.name||r.postalCode||r.state)?{name:hq(r.name),line1:hq(r.line1),line2:hq(r.line2),city:hq(r.city),state:hq(r.state),postalCode:hq(r.postalCode),country:hq(r.country)}:void 0}}function Sq(e){return e.last4?`${e.brand?e.brand.charAt(0).toUpperCase()+e.brand.slice(1):`Card`} •••• ${e.last4}`:e.name||e.type}async function Cq(e){let t=await mq(e,`GET`,`/v1/billing/methods`);return(Array.isArray(t)?t:vq(_q(t).data)).map(xq).filter(e=>e.id)}function wq(e){return e.find(e=>e.default)??e[0]??null}async function Tq(e){let t=_q(await mq(e,`GET`,`/v1/billing/balance`));return gq(t.available??t.balance)}async function Eq(e){return vq(_q(await mq(e,`GET`,`/v1/billing/credit-balance`)).balances).map(_q).filter(e=>(hq(e.currency)||`usd`).toLowerCase()===`usd`).reduce((e,t)=>e+gq(t.available),0)}async function Dq(e){return vq(_q(await mq(e,`GET`,`/v1/billing/credits`)).grants).map(_q).map(e=>({id:hq(e.id),name:hq(e.name),amount:gq(e.amountCents),remaining:gq(e.remainingCents),currency:hq(e.currency)||`usd`,expires:hq(e.expiresAt),active:e.active===!0&&e.voided!==!0})).filter(e=>e.id)}async function Oq(e){let t=_q(await mq(e,`GET`,`/v1/billing/tier`));return{plan:hq(t.plan),tier:hq(_q(t.tier).name),name:hq(t.planName)}}function kq(e){let t=_q(e);return{enabled:t.enabled===!0,threshold:gq(t.thresholdCents),amount:gq(t.amountCents),currency:hq(t.currency)||`usd`,last:hq(t.lastRechargedAt)}}async function Aq(e){return kq(await mq(e,`GET`,`/v1/billing/recharge`))}async function jq(e,t){return kq(await mq(e,`PUT`,`/v1/billing/recharge`,{enabled:t.enabled,thresholdCents:t.threshold,amountCents:t.amount,currency:`usd`}))}async function Mq(e,t,n){if(!Number.isInteger(t)||t<=0)throw Error(D(`Enter an amount to add`));if(!n)throw Error(D(`Add a card before buying more`));return gq(_q(await mq(e,`POST`,`/v1/billing/topup`,{amountCents:t,paymentMethodId:n})).balanceCents)}async function Nq(e){let t=_q(_q(await mq(e,`GET`,`/v1/usage/summary?range=month`)).spend);return{known:t.available===!0,total:gq(t.mtdCents)||gq(t.totalCents),categories:vq(t.byCategory).map(_q).map(e=>({name:hq(e.category)||`Uncategorized`,cents:gq(e.cents)})).filter(e=>e.cents>0)}}var Pq=e=>gq(e)>0?new Date(gq(e)*1e3).toISOString():``;async function Fq(e){let t=_q(await mq(e,`GET`,`/v1/allowance`)),n=t.pool&&typeof t.pool==`object`?_q(t.pool):null;return{plan:hq(t.plan),limit:gq(t.limit),used:gq(t.used),spent:t.spent===!0,window:hq(t.window),resets:Pq(t.resets),pooled:t.pooled===!0,pool:n&&hq(n.state)?{state:hq(n.state),resets:Pq(n.resets)}:null}}function Iq(e){let t=_q(e);return{id:hq(t.id),title:hq(t.title),threshold:gq(t.threshold),enforce:t.enforce===!0,project:hq(t.project),service:hq(t.service),spent:typeof t.periodSpentCents==`number`?t.periodSpentCents:null,resets:hq(t.resetsAt)}}async function Lq(e){return vq(await mq(e,`GET`,`/v1/billing/alerts`)).map(Iq).filter(e=>e.id)}function Rq(e){return e.find(e=>!e.project&&!e.service&&e.threshold>0)??null}async function zq(e,t,n){if(!Number.isInteger(n)||n<=0)throw Error(D(`Enter a monthly limit`));let r=Rq(t);return Iq(r?await mq(e,`PATCH`,`/v1/billing/alerts/${pq(r.id)}`,{threshold:n}):await mq(e,`POST`,`/v1/billing/alerts`,{title:`Monthly limit`,threshold:n,currency:`usd`,project:``,service:``,enforce:!0,softPct:80,rateLimitRpm:0}))}async function Bq(e,t){await mq(e,`DELETE`,`/v1/billing/alerts/${pq(t)}`)}var Vq=QK.filter(e=>[`auto`,`high`,`max`].includes(e.id)),Hq={model:Tn,effort:`auto`},Uq=`hanzo.mind`,Wq=`hanzo:mind`,Gq=e=>e===`xhigh`?`max`:Vq.some(t=>t.id===e)?e:Hq.effort;function Kq(){try{return typeof window>`u`?null:window.localStorage}catch{return null}}var qq,Jq=Hq,Yq=null;function Xq(){if(Yq)return Yq;let e=null;try{e=Kq()?.getItem(Uq)??null}catch{e=null}if(e===qq)return Jq;qq=e;try{let t=JSON.parse(e??`null`);Jq={model:typeof t?.model==`string`&&t.model.trim()?t.model:Hq.model,effort:Gq(t?.effort)}}catch{Jq=Hq}return Jq}function Zq(e){let t=Xq(),n={...t,...e,effort:e.effort===void 0?t.effort:Gq(e.effort)};try{Kq()?.setItem(Uq,JSON.stringify(n)),Yq=null}catch{Yq=n}typeof window<`u`&&window.dispatchEvent(new Event(Wq))}function Qq(e){return window.addEventListener(Wq,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(Wq,e),window.removeEventListener(`storage`,e)}}function $q(){return[(0,V.useSyncExternalStore)(Qq,Xq,()=>Hq),Zq]}Mn([{id:Tn,name:`Enso Auto`,family:`enso`,class:`ours`}]);var eJ=`auto`,tJ=`hanzo.chat.preferences`,nJ=`hanzo.agent.autonomy`,rJ=`hanzo:chat:preferences`,iJ=4,aJ={allowThirdPartyModels:!1,effort:eJ,approvalMode:`auto`,showLanguage:!1,effortVersion:iJ};function oJ(e){return Vq.some(t=>t.id===e)?e:null}function sJ(e){return QK.some(t=>t.id===e)?e:eJ}function cJ(e,t){return e===`manual`||e===`auto`?e:t===`supervised`?`manual`:`auto`}function lJ(){if(typeof window>`u`)return aJ;try{let e=window.localStorage.getItem(tJ),t=window.localStorage.getItem(nJ);if(!e)return{...aJ,approvalMode:cJ(void 0,t)};let n=JSON.parse(e),r=n.effortVersion===iJ?sJ(n.effort):eJ;return{allowThirdPartyModels:n.thirdPartyChosen?!!n.allowThirdPartyModels:n.allowThirdPartyModels===!0,...n.thirdPartyChosen?{thirdPartyChosen:!0}:{},effort:r,approvalMode:cJ(n.approvalMode,t),showLanguage:!!n.showLanguage,effortVersion:iJ}}catch{return aJ}}function uJ(e){let t={...lJ(),...e,effortVersion:iJ};if(typeof window<`u`){try{window.localStorage.setItem(tJ,JSON.stringify(t)),e.approvalMode&&window.localStorage.setItem(nJ,e.approvalMode===`manual`?`supervised`:`autonomous`)}catch{}window.dispatchEvent(new CustomEvent(rJ,{detail:t}))}return t}function dJ(){let[e,t]=(0,V.useState)(lJ);return(0,V.useEffect)(()=>{let e=e=>{let n=e.detail;t(n||lJ())};return window.addEventListener(rJ,e),window.addEventListener(`storage`,e),()=>{window.removeEventListener(rJ,e),window.removeEventListener(`storage`,e)}},[]),[e,uJ]}var fJ={display:`inline-flex`,flexDirection:`row`,items:`center`,$touchable:{minH:44,minW:44}},pJ=`#181717`,mJ=V.forwardRef(function({title:e=`GitHub`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=pJ),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`})]})}),hJ=`#4285F4`,gJ=V.forwardRef(function({title:e=`Google`,color:t=`currentColor`,size:n=24,...r},i){return t==="default"&&(t=hJ),(0,H.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:n,height:n,fill:t,viewBox:`0 0 24 24`,ref:i,...r,children:[(0,H.jsx)(`title`,{children:e}),(0,H.jsx)(`path`,{d:`M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z`})]})}),_J=`hanzo_iam_`,vJ=`${_J}access_token`,yJ=`${_J}refresh_token`;`${_J}`;var bJ=`${_J}id_token`,xJ=e=>{if(typeof window>`u`)return null;try{return window.localStorage.getItem(e)}catch{return null}},SJ=e=>{if(typeof window>`u`)return null;try{return window.sessionStorage?.getItem(e)??null}catch{return null}},CJ=e=>{if(typeof document>`u`||!document.cookie)return null;try{let t=document.cookie.split(`; `).find(t=>t.startsWith(`${e}=`));if(t){let e=t.split(`=`)[1];return e?decodeURIComponent(e):null}return null}catch{return null}},wJ=()=>xJ(vJ)||xJ(`hanzo_access_token`)||xJ(`token`)||xJ(`auth_token`)||SJ(vJ)||SJ(`hanzo_access_token`)||SJ(`token`)||CJ(vJ)||CJ(`auth_token`)||CJ(`token`)||CJ(`hanzo_access_token`),TJ=()=>xJ(yJ),EJ=()=>xJ(bJ),DJ=`https://hanzo.ai`;function OJ(e,t,n=DJ){let r=new URL(e).searchParams,i=n.replace(/\/+$/,``);switch(t.kind){case`provider`:return r.set(`provider`,t.provider),`${i}/v1/iam/oauth/authorize?${r}`;case`email`:return r.set(`login_hint`,t.email),`${i}/login?${r}`;case`another`:return r.set(`prompt`,`select_account`),`${i}/login?${r}`;case`signup`:return`${i}/signup?${r}`;case`login`:return`${i}/login?${r}`}}function kJ(e){let t=e.trim();return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:null}var AJ={google:`Google`,github:`GitHub`},jJ=`[data-slot="signin-panel"]`,MJ=`var(--popover,var(--panel))`,NJ=`var(--border,var(--edge))`,PJ=`var(--border-strong,var(--bound))`,FJ=`var(--foreground,var(--ink))`,IJ=`var(--muted-foreground,var(--quiet))`,LJ=`${jJ} [data-signin-body]{container-type:inline-size;display:flex;flex-direction:column;gap:10px;width:100%}${jJ} [data-signin-pair]{display:grid;grid-template-columns:1fr 1fr;gap:10px;width:100%}@container (max-width:379.98px){${jJ} [data-signin-pair]{grid-template-columns:1fr}}${jJ} [data-signin-btn]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:9px;width:100%;height:46px;margin:0;padding:0 14px;border-radius:14px;border:1px solid ${NJ};background:${MJ};color:${FJ};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;font-weight:500;line-height:1;white-space:nowrap;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.04);transition:transform .2s cubic-bezier(.16,1,.3,1),border-color .2s,background-color .2s,opacity .2s}${jJ} [data-signin-btn]:hover:not(:disabled){border-color:${PJ};transform:translateY(-2px)}${jJ} [data-signin-btn]:active:not(:disabled){transform:scale(.98)}${jJ} [data-signin-btn]:disabled{opacity:.55;cursor:not-allowed}${jJ} [data-signin-btn][data-solid]{background:${FJ};color:var(--background);border-color:${FJ}}${jJ} [data-signin-btn][data-solid]:hover:not(:disabled){opacity:.92;transform:none}${jJ} [data-signin-btn] svg{flex-shrink:0}${jJ} [data-signin-or]{display:flex;align-items:center;gap:12px;font-size:12.5px;color:${IJ}}${jJ} [data-signin-or]::before,${jJ} [data-signin-or]::after{content:'';flex:1;height:1px;background:${NJ}}${jJ} [data-signin-form]{display:flex;flex-direction:column;gap:10px;margin:0}${jJ} [data-signin-field]{box-sizing:border-box;width:100%;height:46px;margin:0;padding:0 16px;border-radius:14px;border:1px solid ${NJ};background-color:${MJ};color:${FJ};font-family:var(--font-sans,Zen,system-ui,sans-serif);font-size:14px;outline:none}${jJ} [data-signin-field]::placeholder{color:${IJ}}${jJ} [data-signin-field]:focus-visible{border-color:${PJ};box-shadow:0 0 0 2px var(--ring,${PJ})}${jJ} [data-signin-wrong]{margin:0;font-size:13px;color:var(--destructive,#e5484d)}${jJ} [data-signin-quiet]{margin:0;font-size:13px;color:${IJ}}${jJ} [data-signin-quiet] button{padding:0;border:0;background:none;color:${FJ};font:inherit;cursor:pointer}${jJ} [data-signin-quiet] button:hover:not(:disabled){text-decoration:underline}${jJ} [data-signin-terms]{margin:0;max-width:400px;text-align:center;font-size:12px;line-height:18px;color:${IJ}}${jJ} [data-signin-terms] a{color:${FJ};text-decoration:none}${jJ} [data-signin-terms] a:hover{text-decoration:underline;text-underline-offset:2px}`;function RJ(e){return e.request?(0,H.jsx)(BJ,{...e,mint:e.request}):(0,H.jsx)(zJ,{...e})}function zJ(e){let{sdk:t}=IW();return(0,H.jsx)(BJ,{...e,mint:e=>t.getSigninUrl(e)})}function BJ({title:e,line:t,providers:n=[`google`,`github`],signin:r=DJ,signup:i=!1,termsHref:a=`https://hanzo.ai/terms`,privacyHref:o=`https://hanzo.ai/privacy`,authorize:s=e=>e,track:c,mint:l,background:u=`$background`,borderColor:d=`$borderColor`,bare:f=!1}){let{t:p}=R(),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)(null);async function S(e,t,n){x(null),y(e),c?.(`signin_started`,{method:e});try{let e=await l(n?{additionalParams:{login_hint:n}}:void 0);window.location.assign(s(OJ(e,t,r)))}catch(e){x(e instanceof Error&&e.message?e.message:`Signing in could not start. Try again.`),y(null)}}function C(e){e.preventDefault();let t=kJ(m);if(!t){x(`Enter your email address.`);return}S(`email`,{kind:`email`,email:t},t)}let w=f?{}:{bg:u,borderWidth:1,borderColor:d,rounded:`$6`,p:`$6`},T=p(v===`email`?`One moment…`:`Continue with email`);return(0,H.jsxs)(z,{"data-slot":`signin-panel`,"data-surface":f?`bare`:`card`,width:`100%`,maxW:f?400:464,items:`center`,gap:`$3`,...w,children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:LJ}}),e?(0,H.jsx)(Xt,{render:`h1`,size:`$8`,fontWeight:`500`,color:`$ink`,m:0,text:`center`,children:e}):null,t?(0,H.jsx)(Nt,{size:`$3`,color:`$quiet`,m:0,text:`center`,maxW:360,children:t}):null,(0,H.jsxs)(`div`,{"data-signin-body":``,style:e||t?{marginTop:12}:void 0,children:[n.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{"data-signin-pair":``,children:n.map(e=>(0,H.jsxs)(`button`,{"data-signin-btn":``,type:`button`,disabled:v!==null,onClick:()=>void S(e,{kind:`provider`,provider:e}),children:[e===`google`?(0,H.jsx)(gJ,{size:17,"aria-hidden":!0}):(0,H.jsx)(mJ,{size:17,"aria-hidden":!0}),p(`Continue with {provider}`,{provider:AJ[e]})]},e))}),(0,H.jsx)(`div`,{"data-signin-or":``,children:p(`or`)})]}):null,g?(0,H.jsxs)(`form`,{"data-signin-form":``,onSubmit:C,noValidate:!0,children:[(0,H.jsx)(`input`,{id:`hanzo-signin-email`,"data-signin-field":``,type:`email`,name:`email`,autoComplete:`username`,"aria-label":p(`Email`),"aria-invalid":b?!0:void 0,value:m,onChange:e=>h(e.target.value),placeholder:`you@company.com`,autoFocus:!0}),b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`submit`,disabled:v!==null,children:T})]}):(0,H.jsxs)(H.Fragment,{children:[b?(0,H.jsx)(`p`,{"data-signin-wrong":``,role:`alert`,children:p(b)}):null,(0,H.jsx)(`button`,{"data-signin-btn":``,"data-solid":``,type:`button`,disabled:v!==null,onClick:()=>{x(null),_(!0)},children:T})]})]}),i?(0,H.jsxs)(`p`,{"data-signin-quiet":``,children:[`${p(`New to Hanzo?`)} `,(0,H.jsx)(`button`,{type:`button`,disabled:v!==null,onClick:()=>void S(`signup`,{kind:`signup`}),children:p(`Create account`)})]}):null,(0,H.jsx)(`p`,{"data-signin-terms":``,children:p(`By continuing, you agree to Hanzo's {terms} and {privacy}.`,{terms:(0,H.jsx)(`a`,{href:a,children:p(`Terms`)}),privacy:(0,H.jsx)(`a`,{href:o,children:p(`Privacy Policy`)})})})]})}async function VJ(e,t,n,r,i){if(t)try{await fetch(`${e}/v1/iam/oauth/revoke`,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`,...r?{Authorization:`Bearer ${r}`}:{}},body:new URLSearchParams({token:t,token_type_hint:n,...i?{client_id:i}:{}}).toString()})}catch{}}async function HJ(e,t,n,r){try{await fetch(`${e}/v1/iam/oauth/logout`,{method:`POST`,credentials:`include`,redirect:`manual`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:new URLSearchParams({...n?{client_id:n}:{},...t?{id_token_hint:t}:{},...r?{everywhere:`true`}:{}}).toString()})}catch{}}function UJ(e,t,n){let r=new URLSearchParams({...n?{client_id:n}:{},everywhere:`true`,post_logout_redirect_uri:new URL(t,window.location.origin).href});return`${e.replace(/\/+$/,``)}/v1/iam/oauth/logout?${r}`}async function WJ(e,{via:t,to:n=`/login?from=logout`,clientId:r,track:i,everywhere:a,issuer:o}={}){let s=t??window.location.origin,c=wJ(),l=TJ(),u=EJ();e.clearTokens();try{await VJ(s,l,`refresh_token`,c,r),await VJ(s,c,`access_token`,c,r),await HJ(s,u,r,a)}finally{i?.(`logout_completed`,{}),window.location.assign(a&&o?UJ(o,n,r):n)}}function GJ(e={}){let{sdk:t,config:n}=IW(),{via:r,to:i,track:a,clientId:o=n.clientId,everywhere:s,issuer:c=n.serverUrl}=e;return(0,V.useCallback)(()=>WJ(t,{via:r,to:i,track:a,clientId:o,everywhere:s,issuer:c}),[t,r,i,a,o,s,c])}var KJ;function qJ(e,t={}){let n=UW().track;n?n(e,t):ze(KJ,e,t)}var JJ=e=>e===`localhost`||e===`127.0.0.1`||e===`[::1]`||e.endsWith(`.localhost`);function YJ(e,t){if(JJ(t))return``;try{let t=new URL(e).hostname;if(t===`api.hanzo.ai`||t===`hanzo.id`||t===`hanzo.ai`)return kG}catch{return``}return e}function XJ(e=`/`){let{config:t}=IW(),n=GJ({to:e,track:qJ,everywhere:!0,issuer:(e===`/`||e===`/login?from=logout`)&&typeof window<`u`?YJ(t.serverUrl,window.location.hostname):``});return(0,V.useCallback)(async()=>{window.google?.accounts?.id?.disableAutoSelect?.(),await n()},[n])}var ZJ=class{constructor(e){this.http=e}http;get(e){return this.http.enveloped({method:`GET`,path:`/v1/ai/account`,...e?.signal?{signal:e.signal}:{}})}},QJ=class extends Error{constructor(e){super(e),this.name=`HanzoAIError`}},$J=class extends QJ{status;body;constructor(e,t,n){super(e),this.name=`APIError`,this.status=t,this.body=n}},eY=class extends QJ{constructor(e="No auth token available. Pass `token` or `getToken` to createAiClient."){super(e),this.name=`AuthError`}},tY=`/v1/agents`,nY=/^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/,rY=131072;function iY(e,t=``){if(!nY.test(e))throw new QJ(`Not a valid agent ref: ${JSON.stringify(e)}`);return`${tY}/${e}${t}`}var aY=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`agents`,{method:`GET`,path:tY,...e?.signal?{signal:e.signal}:{}})}create(e,t){return this.http.json({method:`POST`,path:tY,body:e,...t?.signal?{signal:t.signal}:{}})}async get(e,t){return this.http.json({method:`GET`,path:iY(e),...t?.signal?{signal:t.signal}:{}})}async update(e,t,n){return this.http.json({method:`PATCH`,path:iY(e),body:t,...n?.signal?{signal:n.signal}:{}})}async delete(e,t){await this.http.raw({method:`DELETE`,path:iY(e),...t?.signal?{signal:t.signal}:{}})}async run(e,t,n){let r=iY(e,`/run`);if(new TextEncoder().encode(t).length>rY)throw new QJ(`Input exceeds ${rY} bytes.`);return this.http.json({method:`POST`,path:r,body:{input:t},...n?.signal?{signal:n.signal}:{}})}runs(e={},t){let{agent:n,...r}=e;return this.http.collection(`runs`,{method:`GET`,path:n?iY(n,`/runs`):`${tY}/runs`,...Object.keys(r).length?{query:r}:{},...t?.signal?{signal:t.signal}:{}})}metrics(e,t){return this.http.json({method:`GET`,path:`${tY}/metrics`,...e?.range?{query:{range:e.range}}:{},...t?.signal?{signal:t.signal}:{}})}activity(e){return this.http.collection(`activity`,{method:`GET`,path:`${tY}/activity`,...e?.signal?{signal:e.signal}:{}})}};function oY(e){let t=e??{};return{status:`held`,id:typeof t.id==`string`?t.id:``,clause:typeof t.clause==`string`?t.clause:``,reason:typeof t.reason==`string`?t.reason:``}}var sY=`https://api.hanzo.ai`;function cY(e,t){return e.replace(/\/+$/,``)+(t.startsWith(`/`)?t:`/${t}`)}function lY(e){if(!e)return``;let t=new URLSearchParams;for(let[n,r]of Object.entries(e))r!==void 0&&t.set(n,String(r));let n=t.toString();return n?`?${n}`:``}function uY(e){return typeof FormData<`u`&&e instanceof FormData}var dY=class{baseUrl;issuer;auth;token;getToken;fetchImpl;extraHeaders;constructor(e){this.baseUrl=e.baseUrl??sY,this.issuer=e.issuer,this.auth=e.auth,this.token=e.token??e.secretKey??e.publishableKey,this.getToken=e.getToken,this.extraHeaders=e.headers??{};let t=e.fetch??globalThis.fetch;if(typeof t!=`function`)throw new $J("No fetch implementation available; pass `fetch` in the client config.",0);this.fetchImpl=t.bind(globalThis)}async resolveToken(){if(this.auth){let e=this.auth.getValidAccessToken?await this.auth.getValidAccessToken():this.auth.getAccessToken?.()??null;if(e)return e;if(!this.getToken&&!this.token)throw new eY}if(this.getToken)return await this.getToken();if(this.token)return this.token;throw new eY}async buildHeaders(e){let t=new Headers(this.extraHeaders);for(let[n,r]of Object.entries(e.headers??{}))t.set(n,r);return e.body!==void 0&&!uY(e.body)&&!t.has(`Content-Type`)&&t.set(`Content-Type`,`application/json`),!e.anonymous&&!t.has(`Authorization`)&&t.set(`Authorization`,`Bearer ${await this.resolveToken()}`),t}async send(e,t){let n=await this.buildHeaders(t),r={method:t.method??`GET`,headers:n};return t.body!==void 0&&(r.body=uY(t.body)?t.body:JSON.stringify(t.body)),t.signal&&(r.signal=t.signal),this.fetchImpl(e,r)}async raw(e){let t=cY(e.baseUrl??this.baseUrl,e.path)+lY(e.query),n=await this.send(t,e);return!e.anonymous&&this.auth?.invalidate&&await fY(n)&&(this.auth.invalidate(),n=await this.send(t,e)),n.ok||await mY(n),n}async result(e){let t=await this.raw(e),n=await t.json().catch(()=>({}));return t.status===202&&n.status===`held`?oY(n):{status:`done`,value:n}}scoped(e){return{baseUrl:this.baseUrl,issuer:this.issuer,auth:e,fetch:this.fetchImpl,headers:this.extraHeaders}}async json(e){return await(await this.raw(e)).json()}async collection(e,t){let n=(await this.json(t))?.[e];return Array.isArray(n)?n:[]}async bearer(){try{return await this.resolveToken()}catch{return}}async enveloped(e){let t=await this.json(e);if(t.status!==`ok`)throw new $J(t.msg||`Request failed`,200,t);return t.data}};async function fY(e){if(e.status===401)return!0;if(e.status!==403)return!1;let t=(await e.clone().json().catch(()=>void 0))?.detail;return typeof t==`string`&&t.includes(`validated principal`)}var pY={502:`The service did not answer. Nothing was run; try again.`,503:`The service is not running right now.`,504:`The service took too long to answer.`};async function mY(e){let t=await e.text().catch(()=>``),n=t,r=pY[e.status]??`HTTP ${e.status}`;if(t)try{n=JSON.parse(t),r=hY(n)??r}catch{n=t}throw new $J(r,e.status,n)}function hY(e){if(e&&typeof e==`object`){let t=e;if(typeof t.msg==`string`&&t.msg)return t.msg;let n=t.error;if(typeof n==`string`)return n;if(n&&typeof n==`object`){let e=n.message;if(typeof e==`string`)return e}if(typeof t.detail==`string`&&t.detail)return t.detail;if(typeof t.title==`string`&&t.title)return t.title}}async function*gY(e){let t=e.getReader(),n=new TextDecoder,r=``;try{for(;;){let{value:e,done:i}=await t.read();if(i)break;r+=n.decode(e,{stream:!0});let a;for(;(a=_Y(r))!==-1;){let e=r.slice(0,a);r=r.slice(vY(r,a));let t=yY(e);t&&(yield t)}}let e=r.trim();if(e){let t=yY(e);t&&(yield t)}}finally{t.releaseLock()}}function _Y(e){let t=e.indexOf(`
97
-
98
- `),n=e.indexOf(`\r
99
- \r
100
- `);return t===-1?n:n===-1?t:Math.min(t,n)}function vY(e,t){return e.startsWith(`\r
101
- \r
102
- `,t)?t+4:t+2}function yY(e){let t,n=[];for(let r of e.split(/\r?\n/))r===``||r.startsWith(`:`)||(r.startsWith(`event:`)?t=r.slice(6).trim():r.startsWith(`data:`)&&n.push(r.slice(5).replace(/^ /,``)));if(n.length===0&&t===void 0)return null;let r={data:n.join(`
103
- `)};return t!==void 0&&(r.event=t),r}function bY(e){if(!e.body)throw new $J(`Streaming response had no body`,e.status);return e.body}async function xY(e){if(/\bjson\b/i.test(e.headers.get(`content-type`)??``)){let t=await e.clone().text().catch(()=>``),n=t;try{n=JSON.parse(t)}catch{}throw n&&typeof n==`object`&&(`error`in n||`detail`in n||`msg`in n)&&await mY(e),new $J(`The service answered with a document where a stream was asked for.`,e.status,n)}return gY(bY(e))}async function*SY(e){for await(let t of await xY(e)){let e=t.data;if(e===`[DONE]`)return;e&&(yield JSON.parse(e))}}async function*CY(e){for await(let t of await xY(e)){let e=t.data;if(e===`[DONE]`)return;e&&(yield JSON.parse(e))}}async function*wY(e){for await(let t of await xY(e)){if(t.data===`[DONE]`||!t.data)continue;let e=JSON.parse(t.data);t.event&&!e.type&&(e.type=t.event);let n=e;if(yield n,n.type===`message_stop`)return}}var TY=`/v1/chat/completions`,EY=`/v1/chat/public`;function DY(e){let t={...e?.headers};return e?.maxCost!==void 0&&(t[`X-Max-Cost`]=String(e.maxCost)),e?.maxLatencyMs!==void 0&&(t[`X-Max-Latency-Ms`]=String(e.maxLatencyMs)),Object.keys(t).length>0?t:void 0}var OY=class{constructor(e){this.http=e}http;lane(e){return kY(this.http,e)}async create(e,t){let n=await this.lane(t)===`public`?EY:TY,r=DY(t),i=await this.http.raw({method:`POST`,path:n,body:e,...e.stream?{stream:!0}:{},...t?.signal?{signal:t.signal}:{},...t?.anonymous||n===EY?{anonymous:!0}:{},...r?{headers:r}:{}});return t?.onResponse?.(i),e.stream?SY(i):await i.json()}};async function kY(e,t){return t?.lane?t.lane:t?.anonymous?`public`:await e.bearer()?`account`:`public`}var AY=class{completions;constructor(e){this.completions=new OY(e)}},jY=class{constructor(e){this.http=e}http;create(e,t){return this.http.json({method:`POST`,path:`/v1/decisions`,body:e,...t?.signal?{signal:t.signal}:{}})}},MY=`https://api.hanzo.ai`,NY=new Set([`up`,`down`,`regenerate`,`switch`,`abandon`,`accept`,`revert`,`rating`,`dismiss`]);function PY(e){let t=typeof e.requestId==`string`?e.requestId.trim():``;if(!t)return null;let n=e.signal;if(!NY.has(n))return null;if(n===`rating`){let n=e.rating;return n!==1&&n!==2&&n!==3?null:{request_id:t,signal:`rating`,rating:n}}return{request_id:t,signal:n}}function FY(e){return e.signal===`rating`?`${e.request_id}:rating:${e.rating}`:`${e.request_id}:${e.signal}`}var IY=new Set;function LY(){try{let e=globalThis.process?.env?.HANZO_FEEDBACK;if(e==null)return!1;let t=String(e).trim().toLowerCase();return t===`0`||t===`false`||t===`off`}catch{return!1}}function RY(e,t={}){if(t.disabled||LY())return Promise.resolve(null);let n=PY(e);if(!n)return Promise.resolve(null);if(t.dedupe!==!1){let e=FY(n);if(IY.has(e))return Promise.resolve(null);IY.add(e)}let r=cY(t.baseUrl??MY,`/v1/ai/feedback`),i=JSON.stringify(n),a=t.token;return typeof a==`function`?Promise.resolve().then(()=>a()).then(e=>zY(r,i,e,t)).catch(()=>null):zY(r,i,a,t)}function zY(e,t,n,r){try{if(!n){let n=r.sendBeacon??(typeof navigator<`u`&&typeof navigator.sendBeacon==`function`?navigator.sendBeacon.bind(navigator):void 0);if(n){let r=typeof Blob<`u`?new Blob([t],{type:`application/json`}):t;try{if(n(e,r))return Promise.resolve(null)}catch{}}}let i=r.fetch??(typeof fetch==`function`?fetch:void 0);if(!i)return Promise.resolve(null);let a={"Content-Type":`application/json`};return n&&(a.Authorization=`Bearer ${n}`),i(e,{method:`POST`,credentials:r.credentials??`include`,keepalive:!0,headers:a,body:t}).then(async e=>{if(!e.ok)return null;let t=await e.json();return t.status===`ok`&&t.data?t.data:null}).catch(()=>null)}catch{return Promise.resolve(null)}}var BY=3e4,VY=3e5,HY=`/v1/iam/tokens/issue`,UY=`https://hanzo.id`,WY=class{constructor(e,t,n=UY){this.http=e,this.subject=t,this.issuer=n}http;subject;issuer;token;expiresAt=0;async getValidAccessToken(){return this.token&&this.expiresAt-Date.now()>BY?this.token:this.mint()}invalidate(){this.token=void 0,this.expiresAt=0}async mint(){let e=await this.http.json({method:`POST`,baseUrl:this.issuer,path:HY,query:{id:this.subject}}),t=e.accessToken;if(!t)throw new eY(`IAM issued no token for the act grant.`);return this.token=t,this.expiresAt=GY(e),t}};function GY(e){return typeof e.expiresIn==`number`?Date.now()+e.expiresIn*1e3:Date.now()+VY}var KY=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`targets`,{method:`GET`,path:`/v1/agents/targets`,...e?.signal?{signal:e.signal}:{}})}},qY=`/v1/messages`,JY=class{constructor(e){this.http=e}http;async create(e,t){return e.stream?wY(await this.http.raw({method:`POST`,path:qY,body:e,stream:!0,...t?.signal?{signal:t.signal}:{}})):this.http.json({method:`POST`,path:qY,body:e,...t?.signal?{signal:t.signal}:{}})}async*stream(e,t){yield*await this.create({...e,stream:!0},t)}countTokens(e,t){return this.http.json({method:`POST`,path:`${qY}/count_tokens`,body:e,...t?.signal?{signal:t.signal}:{}})}},YY=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`data`,{method:`GET`,path:`/v1/models`,...e?.signal?{signal:e.signal}:{}})}},XY=`/v1/iam/scim/v2/Users`,ZY=`urn:ietf:params:scim:schemas:extension:hanzo:2.0:User`;function QY(e){let t=e[ZY]??{},n=e.emails?.find(e=>e.primary)?.value??e.emails?.[0]?.value;return{id:e.id,name:e.userName,displayName:e.displayName,...n?{email:n}:{},active:e.active,service:e.userType===`service-account`,...t.owner?{org:t.owner}:{},...t.isAdmin?{admin:!0}:{}}}var $Y=class{constructor(e){this.http=e}http;async list(e,t){let n=((await this.http.json({method:`GET`,path:XY,query:{owner:e.owner},...t?.signal?{signal:t.signal}:{}}))?.Resources??[]).map(QY);return e.service===void 0?n:n.filter(t=>t.service===e.service)}},eX=class{constructor(e){this.http=e}http;lease(e,t){return this.http.json({method:`POST`,path:`/v1/sandbox/lease`,body:e??{},...t?.signal?{signal:t.signal}:{}})}run(e,t){return this.http.json({method:`POST`,path:`/v1/sandbox/run`,body:e,...t?.signal?{signal:t.signal}:{}})}read(e,t){return this.http.json({method:`POST`,path:`/v1/sandbox/read`,body:e,...t?.signal?{signal:t.signal}:{}})}write(e,t){return this.http.json({method:`POST`,path:`/v1/sandbox/write`,body:e,...t?.signal?{signal:t.signal}:{}})}stop(e,t){return this.http.json({method:`POST`,path:`/v1/sandbox/stop`,body:e,...t?.signal?{signal:t.signal}:{}})}end(e,t){return this.http.raw({method:`POST`,path:`/v1/sandbox/end`,body:e,...t?.signal?{signal:t.signal}:{}}).then(()=>void 0)}list(e,t){let n={};return e?.project&&(n.project=e.project),e?.status&&(n.status=e.status),this.http.collection(`sandboxes`,{method:`GET`,path:`/v1/sandbox`,query:n,...t?.signal?{signal:t.signal}:{}})}get(e,t){return this.http.json({method:`GET`,path:`/v1/sandbox/${encodeURIComponent(e)}`,...t?.signal?{signal:t.signal}:{}})}},tX=`/v1/agents/sessions`,nX=class{constructor(e){this.http=e}http;list(e,t){let n={};return e?.status&&(n.status=e.status),e?.project&&(n.project=e.project),e?.root&&(n.root=e.root),e?.parent&&(n.parent=e.parent),e?.limit!==void 0&&(n.limit=String(e.limit)),this.http.collection(`sessions`,{method:`GET`,path:tX,query:n,...t?.signal?{signal:t.signal}:{}})}get(e,t){return this.http.json({method:`GET`,path:`${tX}/${encodeURIComponent(e)}`,...t?.signal?{signal:t.signal}:{}})}tree(e,t){return this.http.json({method:`GET`,path:`${tX}/${encodeURIComponent(e)}/tree`,...t?.signal?{signal:t.signal}:{}})}update(e,t,n){return this.http.json({method:`PATCH`,path:`${tX}/${encodeURIComponent(e)}`,body:t,...n?.signal?{signal:n.signal}:{}})}steer(e,t,n,r){return this.http.json({method:`POST`,path:`${tX}/${encodeURIComponent(e)}/${t}`,body:n??{},...r?.signal?{signal:r.signal}:{}})}control(e,t,n){let r={};return t?.after!==void 0&&(r.after=String(t.after)),this.http.json({method:`GET`,path:`${tX}/${encodeURIComponent(e)}/control`,query:r,...n?.signal?{signal:n.signal}:{}})}async*stream(e,t){let n={};e?.root&&(n.root=e.root);let r=await this.http.raw({method:`GET`,path:`${tX}/stream`,query:n,headers:{Accept:`text/event-stream`},...t?.signal?{signal:t.signal}:{}});if(r.body)for await(let e of gY(r.body)){if(!e.data)continue;let t;try{t=JSON.parse(e.data)}catch{continue}e.event===`event`?t.event&&(yield{kind:`event`,event:t.event}):t.session&&(yield{kind:`session`,session:t.session})}}},rX=`/v1/agents/chat/conversations`,iX=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`conversations`,{method:`GET`,path:rX,...e?.archived?{query:{archived:!0}}:{},...e?.signal?{signal:e.signal}:{}})}update(e,t,n){return this.http.json({method:`PATCH`,path:`${rX}/${encodeURIComponent(e)}`,body:t,...n?.signal?{signal:n.signal}:{}})}async remove(e,t){await this.http.json({method:`DELETE`,path:`${rX}/${encodeURIComponent(e)}`,...t?.signal?{signal:t.signal}:{}})}async record(e,t,n){return(await this.http.json({method:`POST`,path:rX,body:{...t?{conversationId:t}:{},messages:e},...n?.signal?{signal:n.signal}:{}}))?.conversationId??``}async get(e,t){let n=await this.http.json({method:`GET`,path:`${rX}/${encodeURIComponent(e)}`,...t?.signal?{signal:t.signal}:{}});return n?.messages?.length?n:null}},aX=`/v1/tools`,oX=class{constructor(e){this.http=e}http;list(e,t){let n={};return e?.source&&(n.source=e.source),e?.activated!==void 0&&(n.activated=String(e.activated)),this.http.collection(`tools`,{method:`GET`,path:aX,query:n,...t?.signal?{signal:t.signal}:{}})}skills(e,t){let n={};return e?.activated!==void 0&&(n.activated=String(e.activated)),this.http.json({method:`GET`,path:`${aX}/skills`,query:n,...t?.signal?{signal:t.signal}:{}})}plugins(e,t){let n={};return e?.all!==void 0&&(n.all=String(e.all)),this.http.collection(`plugins`,{method:`GET`,path:`${aX}/plugins`,query:n,...t?.signal?{signal:t.signal}:{}})}mcp(e){return this.http.collection(`servers`,{method:`GET`,path:`${aX}/mcp/servers`,...e?.signal?{signal:e.signal}:{}})}catalog(e,t){let n={};return e?.q&&(n.q=e.q),e?.featured!==void 0&&(n.featured=String(e.featured)),e?.official!==void 0&&(n.official=String(e.official)),e?.limit!==void 0&&(n.limit=String(e.limit)),e?.offset!==void 0&&(n.offset=String(e.offset)),this.http.json({method:`GET`,path:`${aX}/catalog`,query:n,...t?.signal?{signal:t.signal}:{}})}listing(e,t){return this.http.json({method:`GET`,path:`${aX}/catalog/${encodeURIComponent(e)}`,...t?.signal?{signal:t.signal}:{}})}activation(e){return this.http.json({method:`GET`,path:`${aX}/activation`,...e?.signal?{signal:e.signal}:{}})}activate(e,t){return this.http.json({method:`PUT`,path:`${aX}/activation`,body:{enabled:e},...t?.signal?{signal:t.signal}:{}})}},sX=class{constructor(e){this.http=e}http;list(e){return this.http.collection(`transports`,{method:`GET`,path:`/v1/transport`,...e?.signal?{signal:e.signal}:{}})}inbox(e,t){let n={};return e?.since!==void 0&&(n.since=String(e.since)),e?.limit!==void 0&&(n.limit=String(e.limit)),this.http.json({method:`GET`,path:`/v1/transport/inbox`,query:n,...t?.signal?{signal:t.signal}:{}})}allowlist(e,t){return this.http.json({method:`GET`,path:`/v1/transport/allowlist`,query:{transport:e.transport},...t?.signal?{signal:t.signal}:{}})}pairing(e){return this.http.json({method:`GET`,path:`/v1/transport/pairing`,...e?.signal?{signal:e.signal}:{}})}},cX=`/v1/ask`;function lX(e){return e instanceof eY?`401 ${e.message}`:e instanceof $J?`${e.status} ${e.message}`:e instanceof Error?e.message:String(e)}async function*uX(e,t,n,r){try{yield*CY(await e.http.raw({method:`POST`,path:cX,headers:{Accept:`text/event-stream`},body:{q:t,mode:n===`deep`?`research`:n,model:r.model,sources:r.sources,language:r.language,maxSources:r.maxSources,maxQueries:r.maxQueries,followUps:r.followUps,system:r.system},...r.signal?{signal:r.signal}:{}}))}catch(e){yield{type:`error`,error:lX(e)}}}function dX(e,t,n={}){return uX(e,t,n.mode??`search`,n)}function fX(e,t,n={}){return uX(e,t,`research`,n)}var pX=class e{chat;messages;models;decisions;agents;machines;sandboxes;tools;sessions;threads;people;transports;account;http;constructor(e={}){this.http=new dY(e),this.chat=new AY(this.http),this.messages=new JY(this.http),this.models=new YY(this.http),this.decisions=new jY(this.http),this.agents=new aY(this.http),this.machines=new KY(this.http),this.sandboxes=new eX(this.http),this.sessions=new nX(this.http),this.tools=new oX(this.http),this.threads=new iX(this.http),this.people=new $Y(this.http),this.transports=new sX(this.http),this.account=new ZJ(this.http)}search(e,t){return dX(this,e,t)}deepResearch(e,t){return fX(this,e,t)}feedback(e,t={}){return RY(e,{fetch:this.http.fetchImpl,...t,baseUrl:this.http.baseUrl,token:()=>this.http.bearer()})}as(t){return new e(this.http.scoped(new WY(this.http,t,this.http.issuer)))}};function mX(e={}){return new pX(e)}var hX=(0,V.createContext)(null);function gX(){let e=(0,V.useContext)(hX);if(!e)throw new QJ(`useAi requires an <AiProvider> above it.`);return e}function _X(e){return e instanceof Error?e:new QJ(String(e))}function vX(e,t){let[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(!0),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(0),u=(0,V.useRef)(e);return u.current=e,(0,V.useEffect)(()=>{let e=new AbortController;return a(!0),u.current(e.signal).then(t=>{e.signal.aborted||(r(t),s(null),a(!1))},t=>{e.signal.aborted||(s(_X(t)),a(!1))}),()=>e.abort()},[...t,c]),{value:n,loading:i,error:o,reload:(0,V.useCallback)(()=>l(e=>e+1),[]),set:r}}function yX(){let e=gX(),{value:t,loading:n,error:r}=vX(t=>e.models.list({signal:t}),[e]);return{models:t??[],loading:n,error:r}}var bX=class extends Error{status;constructor(e,t=0){super(e),this.name=`UsageError`,this.status=t}},xX=e=>typeof e==`number`&&Number.isFinite(e)?e:0,SX=e=>typeof e==`string`?e:``,CX=e=>e===!0,wX=e=>typeof e==`number`&&Number.isFinite(e)?e:null;function TX(e){let t=e??{};return{tokens:xX(t.tokens),promptTokens:xX(t.promptTokens),completionTokens:xX(t.completionTokens),requests:xX(t.requests),spendCents:xX(t.spendCents),models:xX(t.models),providers:xX(t.providers)}}function EX(e){let t={};if(e&&typeof e==`object`)for(let[n,r]of Object.entries(e)){let e=r??{};t[n]={current:xX(e.current),prior:xX(e.prior),pct:wX(e.pct)}}return t}function DX(e){return Array.isArray(e)?e.map(e=>{let t=e??{};return{t:SX(t.t),tokens:xX(t.tokens),spendCents:xX(t.spendCents),requests:xX(t.requests),models:xX(t.models)}}):[]}function OX(e){let t=e??{},n=Array.isArray(t.items)?t.items.map(e=>{let t=e??{};return{model:SX(t.model),provider:SX(t.provider),spendCents:xX(t.spendCents),tokens:xX(t.tokens),requests:xX(t.requests),pct:xX(t.pct)}}):[],r=null;if(t.other&&typeof t.other==`object`){let e=t.other;r={spendCents:xX(e.spendCents),tokens:xX(e.tokens),requests:xX(e.requests),pct:xX(e.pct),modelCount:xX(e.modelCount)}}return{items:n,other:r,totalCents:xX(t.totalCents)}}function kX(e){let t=e??{};return{items:Array.isArray(t.items)?t.items.map(e=>{let t=e??{};return{time:SX(t.time),model:SX(t.model),provider:SX(t.provider),type:SX(t.type),status:SX(t.status),tokens:xX(t.tokens),promptTokens:xX(t.promptTokens),completionTokens:xX(t.completionTokens),costCents:xX(t.costCents),stream:CX(t.stream),premium:CX(t.premium),requestId:SX(t.requestId),org:SX(t.org),user:SX(t.user)}}):[],limit:xX(t.limit),offset:xX(t.offset),total:xX(t.total),type:SX(t.type)}}function AX(e){let t=e??{},n=t.scope??{};return{range:SX(t.range),start:SX(t.start),end:SX(t.end),interval:SX(t.interval)||`day`,scope:{org:SX(n.org),allOrgs:CX(n.allOrgs)},totals:TX(t.totals),deltas:EX(t.deltas),series:DX(t.series),byModel:OX(t.byModel),activity:kX(t.activity)}}var jX=`/v1/ai/usages/cloud`;async function MX(e){let t=e.fetch??globalThis.fetch;if(!t)throw new bX(`no fetch implementation available`);let n=e.baseUrl.replace(/\/+$/,``),r=new URLSearchParams;e.range&&r.set(`range`,e.range),e.start&&r.set(`start`,e.start),e.end&&r.set(`end`,e.end),e.org&&r.set(`org`,e.org),e.topModels!=null&&r.set(`topModels`,String(e.topModels)),e.activityType&&r.set(`activityType`,e.activityType),e.activityLimit!=null&&r.set(`activityLimit`,String(e.activityLimit)),e.activityOffset!=null&&r.set(`activityOffset`,String(e.activityOffset));let i=r.toString(),a;try{a=await t(`${n}${jX}${i?`?${i}`:``}`,{method:`GET`,headers:{Authorization:`Bearer ${e.token}`,Accept:`application/json`},signal:e.signal})}catch(e){throw new bX(e instanceof Error?e.message:String(e))}if(!a.ok)throw new bX(`GET ${jX} HTTP ${a.status}`,a.status);let o=await a.json();if(o&&typeof o==`object`&&`status`in o&&o.status&&o.status!==`ok`)throw new bX(o.msg||`usage ledger unavailable`,a.status);return AX(o&&typeof o==`object`&&`data`in o?o.data:o)}var NX=class extends Error{status;constructor(e,t){super(e),this.name=`UsageSummaryError`,this.status=t}},PX=`/v1/usage/summary`,FX=e=>typeof e==`number`&&Number.isFinite(e)?e:0,IX=e=>typeof e==`string`?e:``;function LX(e){let t=e??{},n=t.spend??{},r=t.llm??{};return{start:IX(t.start),end:IX(t.end),interval:IX(t.interval),scope:t.scope??{},spend:{available:n.available===!0,totalCents:FX(n.totalCents),mtdCents:FX(n.mtdCents),overageCents:FX(n.overageCents),balanceCents:FX(n.balanceCents),availableCents:FX(n.availableCents),byCategory:Array.isArray(n.byCategory)?n.byCategory.map(e=>{let t=e??{};return{category:IX(t.category),amountCents:FX(t.amountCents)}}):[],series:Array.isArray(n.series)?n.series.map(e=>{let t=e??{};return{t:IX(t.t),amountCents:FX(t.amountCents)}}):[],source:IX(n.source)},llm:{available:r.available===!0,requests:FX(r.requests),tokens:FX(r.tokens),promptTokens:FX(r.promptTokens),completionTokens:FX(r.completionTokens)},accounts:t.accounts,sources:t.sources??void 0}}async function RX(e){let t=e.fetch??globalThis.fetch;if(!t)throw new NX(`no fetch implementation available`);let n=e.baseUrl.replace(/\/+$/,``),r=new URLSearchParams;e.range&&r.set(`range`,e.range),e.org&&r.set(`org`,e.org);let i=r.toString(),a=await t(`${n}${PX}${i?`?${i}`:``}`,{headers:e.token?{authorization:`Bearer ${e.token}`}:{},signal:e.signal});if(!a.ok)throw new NX(`GET ${PX} HTTP ${a.status}`,a.status);let o=await a.json();return LX(o&&typeof o==`object`&&`data`in o?o.data:o)}var zX=class extends Error{status;constructor(e,t){super(e),this.name=`AllowanceError`,this.status=t}},BX=`/v1/allowance`,VX=e=>typeof e==`number`&&Number.isFinite(e)?e:0,HX=e=>typeof e==`string`?e:``,UX=e=>VX(e)>0?VX(e)*1e3:null,WX=[`available`,`busy`,`exhausted`];function GX(e){let t=e??{},n=t.pool&&typeof t.pool==`object`?t.pool:null,r=HX(n?.state);return{plan:HX(t.plan),limit:VX(t.limit),used:VX(t.used),spent:t.spent===!0,window:HX(t.window),resets:UX(t.resets),pooled:t.pooled===!0,pool:n&&WX.includes(r)?{state:r,resets:UX(n.resets)}:null}}async function KX(e){let t=e.fetch??globalThis.fetch;if(!t)throw new zX(`no fetch implementation available`);let n=await t(`${e.baseUrl.replace(/\/+$/,``)}${BX}`,{headers:e.token?{authorization:`Bearer ${e.token}`}:{},signal:e.signal});if(!n.ok)throw new zX(`GET ${BX} HTTP ${n.status}`,n.status);let r=await n.json();return GX(r&&typeof r==`object`&&`data`in r&&!(`limit`in r)?r.data:r)}function qX(e){return e.limit<=0?0:Math.min(100,Math.ceil(Math.min(e.used,e.limit)/e.limit*100/5)*5)}function JX(e){return e===`hour`?`this hour`:e===`day`?`today`:`this period`}function YX(e,t=Date.now()){if(e===null)return``;let n=new Date(e),r=new Date(t),i=`${String(n.getUTCHours()).padStart(2,`0`)}:${String(n.getUTCMinutes()).padStart(2,`0`)} UTC`;return n.getUTCFullYear()===r.getUTCFullYear()&&n.getUTCMonth()===r.getUTCMonth()&&n.getUTCDate()===r.getUTCDate()?i:`${n.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`})} ${n.getUTCDate()}, ${i}`}function XX(e,t=Date.now()){let n=YX(e.resets,t);switch(e.state){case`available`:return`Available`;case`busy`:return`Busy — try again in a minute`;case`exhausted`:return`Used up${n?` until ${n}`:` for now`}`}}function ZX(e){let t=(Number.isFinite(e)?e:0)/100,n=Math.abs(t);return n>=1e6?`$${(t/1e6).toFixed(1)}M`:n>=1e4?`$${(t/1e3).toFixed(1)}K`:`$${t.toFixed(2)}`}function QX(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e9?`${(e/1e9).toFixed(1)}B`:t>=1e6?`${(e/1e6).toFixed(1)}M`:t>=1e3?`${(e/1e3).toFixed(1)}K`:String(Math.round(e))}function $X(e){if(e==null)return`new`;let t=Math.round(e);return`${t>0?`+`:``}${t}%`}function eZ(e){return e==null||Math.round(e)===0?`flat`:e>0?`up`:`down`}function tZ(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?e:t===`hour`?`${String(n.getUTCHours()).padStart(2,`0`)}:00`:n.toLocaleDateString(void 0,{month:`short`,day:`numeric`,timeZone:`UTC`})}var nZ=[`#6ea8fe`,`#7ee787`,`#f0a868`,`#c792ea`,`#56d4c4`,`#e879a6`,`#d6c15a`,`#8b9bb4`],rZ=`rgba(128,128,128,0.18)`,iZ=`#7ee787`,aZ=`#e5534b`,oZ=e=>nZ[e%nZ.length];function sZ({points:e,width:t=120,height:n=34,color:r=nZ[0]}){let i=(e??[]).filter(e=>Number.isFinite(e));if(i.length<2)return null;let a=Math.min(...i),o=Math.max(...i)-a||1,s=t/(i.length-1),c=e=>n-2-(e-a)/o*(n-4),l=i.map((e,t)=>`${t===0?`M`:`L`}${(t*s).toFixed(1)},${c(e).toFixed(1)}`).join(` `),u=`${l} L${(t-1).toFixed(1)},${n} L1,${n} Z`;return(0,H.jsxs)(`svg`,{width:t,height:n,viewBox:`0 0 ${t} ${n}`,"aria-hidden":!0,style:{display:`block`},children:[(0,H.jsx)(`path`,{d:u,fill:r,fillOpacity:.12}),(0,H.jsx)(`path`,{d:l,fill:`none`,stroke:r,strokeWidth:1.5,strokeLinejoin:`round`,strokeLinecap:`round`})]})}function cZ({bars:e,height:t=120,color:n=nZ[0]}){if(!e.length)return null;let r=Math.max(...e.map(e=>e.value),1),i=e.length>60?1:3,a=Math.max(1,(640-i*(e.length-1))/e.length);return(0,H.jsx)(`svg`,{width:`100%`,height:t,viewBox:`0 0 640 ${t}`,preserveAspectRatio:`none`,role:`img`,"aria-label":`usage over time`,children:e.map((e,o)=>{let s=Math.max(1,e.value/r*(t-2));return(0,H.jsx)(`rect`,{x:o*(a+i),y:t-s,width:a,height:s,rx:2,fill:n,opacity:.85,children:(0,H.jsx)(`title`,{children:e.hint})},`${e.label}-${o}`)})})}function lZ({pct:e,color:t}){return(0,H.jsx)(z,{height:6,bg:rZ,rounded:`$2`,overflow:`hidden`,children:(0,H.jsx)(z,{height:6,width:`${Math.max(2,Math.max(0,Math.min(100,e)))}%`,bg:t,rounded:`$2`})})}function uZ({title:e,action:t,children:n,minW:r}){return(0,H.jsxs)(z,{flex:1,minW:r??320,gap:`$3`,p:`$4`,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,bg:`$color1`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`800`,color:`$color12`,children:e}),t]}),n]})}function dZ({icon:e,label:t,value:n,deltaPct:r,spark:i,sparkColor:a}){let o=r===void 0?`flat`:eZ(r??null),s=o===`up`?iZ:o===`down`?aZ:`$color10`;return(0,H.jsxs)(z,{p:`$4`,gap:`$2`,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,bg:`$color1`,flex:1,minW:180,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[e,(0,H.jsx)(U,{fontSize:`$2`,color:`$color11`,numberOfLines:1,children:t})]}),(0,H.jsxs)(y,{items:`flex-end`,justify:`space-between`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$7`,fontWeight:`900`,color:`$color12`,children:n}),r===void 0?null:(0,H.jsx)(U,{fontSize:`$1`,color:s,fontWeight:`700`,children:$X(r??null)})]}),i&&i.filter(e=>Number.isFinite(e)).length>=2?(0,H.jsx)(sZ,{points:i,color:a??nZ[0]}):null]})}function fZ({title:e,subtitle:t,right:n}){return(0,H.jsxs)(y,{items:`flex-start`,justify:`space-between`,gap:`$3`,flexWrap:`wrap`,children:[(0,H.jsxs)(z,{gap:`$1`,children:[(0,H.jsx)(U,{fontSize:`$6`,fontWeight:`900`,color:`$color12`,children:e}),t?(0,H.jsx)(U,{fontSize:`$2`,color:`$color10`,children:t}):null]}),n]})}function pZ({title:e,message:t,onRetry:n}){return(0,H.jsxs)(z,{p:`$5`,gap:`$3`,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,bg:`$color1`,items:`center`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`700`,color:`$color12`,children:e}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color10`,style:{textAlign:`center`},children:t}),n?(0,H.jsx)(Je,{size:`$2`,icon:(0,H.jsx)(gm,{size:15}),onPress:n,children:`Retry`}):null]})}function mZ({data:e}){let t=e.series,n=e.totals,r=e.deltas;return(0,H.jsxs)(y,{flexWrap:`wrap`,gap:`$3`,children:[(0,H.jsx)(dZ,{icon:(0,H.jsx)(zp,{size:16,color:`#7ee787`}),label:`Spend`,value:ZX(n.spendCents),deltaPct:r.spendCents?.pct??null,spark:t.map(e=>e.spendCents),sparkColor:`#7ee787`}),(0,H.jsx)(dZ,{icon:(0,H.jsx)(Pp,{size:16,color:`#6ea8fe`}),label:`Tokens`,value:QX(n.tokens),deltaPct:r.tokens?.pct??null,spark:t.map(e=>e.tokens),sparkColor:`#6ea8fe`}),(0,H.jsx)(dZ,{icon:(0,H.jsx)(up,{size:16,color:`#f0a868`}),label:`Requests`,value:QX(n.requests),deltaPct:r.requests?.pct??null,spark:t.map(e=>e.requests),sparkColor:`#f0a868`}),(0,H.jsx)(dZ,{icon:(0,H.jsx)(tm,{size:16,color:`#c792ea`}),label:`Models`,value:QX(n.models),deltaPct:r.models?.pct??null}),(0,H.jsx)(dZ,{icon:(0,H.jsx)(xp,{size:16,color:`#56d4c4`}),label:`Providers`,value:QX(n.providers)})]})}var hZ=[{key:`spendCents`,label:`Spend`,color:`#7ee787`},{key:`tokens`,label:`Tokens`,color:`#6ea8fe`},{key:`requests`,label:`Requests`,color:`#f0a868`}],gZ=(e,t)=>t===`spendCents`?e.spendCents:t===`tokens`?e.tokens:e.requests,_Z=(e,t,n)=>`${tZ(e.t,n)} · ${t===`spendCents`?ZX(e.spendCents):`${QX(gZ(e,t))} ${t}`}`;function vZ({data:e}){let[t,n]=(0,V.useState)(`spendCents`),r=hZ.find(e=>e.key===t)??hZ[0],i=e.series.map(n=>({label:n.t,value:gZ(n,t),hint:_Z(n,t,e.interval)})),a=i.some(e=>e.value>0);return(0,H.jsx)(uZ,{title:`Usage over time`,action:(0,H.jsx)(y,{gap:`$1`,children:hZ.map(e=>(0,H.jsx)(Je,{size:`$2`,chromeless:t!==e.key,onPress:()=>n(e.key),"aria-label":`Show ${e.label}`,children:e.label},e.key))}),children:a?(0,H.jsx)(cZ,{bars:i,color:r.color}):(0,H.jsxs)(U,{fontSize:`$3`,color:`$color10`,children:[`No `,r.label.toLowerCase(),` recorded in this range yet.`]})})}function yZ({data:e}){let t=e.spend,n=t.totalCents,r=t.byCategory.map((e,t)=>({key:`${e.category}-${t}`,label:e.category||`other`,amountCents:e.amountCents,pct:n>0?e.amountCents/n*100:0,color:oZ(t)}));return(0,H.jsx)(uZ,{title:`Spend by category`,action:(0,H.jsx)(U,{fontSize:`$2`,color:`$color11`,children:ZX(n)}),children:t.available?r.length?(0,H.jsx)(z,{gap:`$3`,children:r.map(e=>(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,flex:1,children:[(0,H.jsx)(z,{width:9,height:9,rounded:`$1`,bg:e.color}),(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.label})]}),(0,H.jsx)(U,{fontSize:`$3`,color:`$color12`,fontWeight:`600`,children:ZX(e.amountCents)})]}),(0,H.jsx)(lZ,{pct:e.pct,color:e.color})]},e.key))}):(0,H.jsx)(U,{fontSize:`$3`,color:`$color10`,children:`No spend in this range yet.`}):(0,H.jsx)(U,{fontSize:`$3`,color:`$color10`,children:`The ledger could not be read, so this is not a measurement.`})})}function bZ({data:e}){let t=e.byModel,n=t.items.map((e,t)=>({key:`${e.model}-${t}`,model:e.model||`unknown`,provider:e.provider,spendCents:e.spendCents,pct:e.pct,color:oZ(t)}));return t.other&&n.push({key:`other`,model:`Other (${t.other.modelCount})`,provider:`remaining models`,spendCents:t.other.spendCents,pct:t.other.pct,color:`#64748b`}),(0,H.jsx)(uZ,{title:`Spend by model`,action:(0,H.jsx)(U,{fontSize:`$2`,color:`$color11`,children:ZX(t.totalCents)}),children:n.length?(0,H.jsx)(z,{gap:`$3`,children:n.map(e=>(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,flex:1,children:[(0,H.jsx)(z,{width:9,height:9,rounded:`$1`,bg:e.color}),(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.model}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:e.provider})]}),(0,H.jsx)(U,{fontSize:`$3`,color:`$color12`,fontWeight:`600`,children:ZX(e.spendCents)})]}),(0,H.jsx)(lZ,{pct:e.pct,color:e.color})]},e.key))}):(0,H.jsx)(U,{fontSize:`$3`,color:`$color10`,children:`No model spend in this range yet.`})})}var xZ={available:iZ,busy:`#f0a868`,exhausted:aZ};function SZ({data:e,upgrade:t,now:n=Date.now()}){if(!e.pooled||e.limit<=0)return null;let r=qX(e),i=YX(e.resets,n);return(0,H.jsxs)(uZ,{title:`Free plan`,action:t?(0,H.jsx)(`a`,{href:t,style:{textDecoration:`none`},children:(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`700`,color:`$color12`,children:`Upgrade`})}):void 0,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$color11`,children:`Free — limited usage, from a pool shared by all free users.`}),(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsxs)(y,{items:`baseline`,justify:`space-between`,gap:`$2`,flexWrap:`wrap`,children:[(0,H.jsxs)(U,{fontSize:`$3`,fontWeight:`600`,color:`$color12`,children:[r,`% used `,JX(e.window)]}),i?(0,H.jsxs)(U,{fontSize:`$2`,color:`$color10`,children:[`Refills `,i]}):null]}),(0,H.jsx)(lZ,{pct:r,color:e.spent?aZ:iZ})]}),e.pool?(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(z,{width:8,height:8,rounded:`$10`,bg:xZ[e.pool.state]??`$color10`}),(0,H.jsxs)(U,{fontSize:`$2`,color:`$color11`,children:[`Shared pool: `,XX(e.pool,n)]})]}):null]})}var CZ=e=>{let t=e.toLowerCase();return t===`success`||t===`ok`||t===``?iZ:t===`error`||t===`failed`?aZ:`#f0a868`},wZ=e=>{let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})};function TZ({data:e}){let t=e.activity.items;return(0,H.jsx)(uZ,{title:`Recent activity`,action:e.activity.total?(0,H.jsxs)(U,{fontSize:`$2`,color:`$color11`,children:[QX(e.activity.total),` calls`]}):void 0,children:t.length?(0,H.jsx)(z,{children:t.map((e,n)=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,py:`$2`,borderColor:`$borderColor`,borderBottomWidth:+(n<t.length-1),children:[(0,H.jsx)(z,{width:7,height:7,rounded:`$10`,bg:CZ(e.status)}),(0,H.jsxs)(z,{flex:1,gap:`$0.5`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.model||`inference`}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:[e.provider,wZ(e.time)].filter(Boolean).join(` · `)})]}),(0,H.jsxs)(U,{fontSize:`$2`,color:`$color11`,numberOfLines:1,children:[QX(e.tokens),` tok`]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,fontWeight:`600`,numberOfLines:1,children:ZX(e.costCents)})]},e.requestId||`${e.time}-${n}`))}):(0,H.jsx)(U,{fontSize:`$3`,color:`$color10`,children:`No activity in this range yet.`})})}var EZ=[`24h`,`7d`,`30d`];function DZ({value:e,onChange:t}){return(0,H.jsx)(y,{gap:`$1`,children:EZ.map(n=>(0,H.jsx)(Je,{size:`$2`,chromeless:e!==n,onPress:()=>t(n),"aria-label":`Range ${n}`,children:n},n))})}var OZ=e=>!(`baseUrl`in e);function kZ({data:e,sections:t,summary:n,allowance:r,upgrade:i}){let a={overview:!0,chart:!0,breakdown:!0,activity:!0,categories:!1,allowance:!0,...t};return(0,H.jsxs)(z,{gap:`$4`,children:[a.allowance&&r?.pooled?(0,H.jsx)(y,{children:(0,H.jsx)(SZ,{data:r,upgrade:i})}):null,a.overview?(0,H.jsx)(mZ,{data:e}):null,a.categories&&n?(0,H.jsx)(y,{children:(0,H.jsx)(yZ,{data:n})}):null,a.chart?(0,H.jsx)(y,{children:(0,H.jsx)(vZ,{data:e})}):null,a.breakdown||a.activity?(0,H.jsxs)(y,{flexWrap:`wrap`,gap:`$4`,children:[a.breakdown?(0,H.jsx)(bZ,{data:e}):null,a.activity?(0,H.jsx)(TZ,{data:e}):null]}):null]})}var AZ=`Usage is unavailable`;function jZ(e){let t=e.title??`Usage`;if(OZ(e)){let n=e.onRangeChange&&e.range?(0,H.jsx)(DZ,{value:e.range,onChange:e.onRangeChange}):void 0;return(0,H.jsxs)(z,{gap:`$4`,children:[(0,H.jsx)(fZ,{title:t,subtitle:e.subtitle,right:n}),e.error?(0,H.jsx)(pZ,{title:AZ,message:e.error,onRetry:e.onRetry}):e.loading||!e.data?(0,H.jsx)(U,{fontSize:`$3`,color:`$color10`,children:`Loading usage…`}):(0,H.jsx)(kZ,{data:e.data,sections:e.sections})]})}return(0,H.jsx)(MZ,{...e,title:t})}function MZ(e){let[t,n]=(0,V.useState)(e.range??`24h`),[r,i]=(0,V.useState)({phase:`loading`}),[a,o]=(0,V.useState)(0),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(null),{baseUrl:d,token:f,org:p,start:m,end:h,topModels:g,activityType:_,activityLimit:v,activityOffset:y}=e,b=e.fetch,x=(0,V.useRef)(0);(0,V.useEffect)(()=>{let e=++x.current,n=new AbortController;return i({phase:`loading`}),MX({baseUrl:d,token:f,org:p,range:t,start:m,end:h,topModels:g,activityType:_,activityLimit:v,activityOffset:y,signal:n.signal,fetch:b}).then(t=>{e===x.current&&i({phase:`ready`,data:t})}).catch(t=>{n.signal.aborted||e!==x.current||i({phase:`error`,message:t instanceof Error?t.message:String(t)})}),()=>n.abort()},[d,f,p,t,m,h,g,_,v,y,b,a]),(0,V.useEffect)(()=>{if(!e.sections?.categories){c(null);return}let n=new AbortController,r=!0;return RX({baseUrl:d,token:f,org:p,range:t,signal:n.signal,fetch:b}).then(e=>{r&&c(e)}).catch(()=>{r&&c(null)}),()=>{r=!1,n.abort()}},[d,f,p,t,a,e.sections?.categories]);let S=e.sections?.allowance!==!1;return(0,V.useEffect)(()=>{if(!S){u(null);return}let e=new AbortController,t=!0;return KX({baseUrl:d,token:f,signal:e.signal,fetch:b}).then(e=>{t&&u(e)}).catch(()=>{t&&u(null)}),()=>{t=!1,e.abort()}},[d,f,b,a,S]),(0,H.jsxs)(z,{gap:`$4`,children:[(0,H.jsx)(fZ,{title:e.title,subtitle:e.subtitle,right:(0,H.jsx)(DZ,{value:t,onChange:t=>{n(t),e.onRangeChange?.(t)}})}),r.phase===`error`?(0,H.jsx)(pZ,{title:AZ,message:r.message,onRetry:()=>o(e=>e+1)}):r.phase===`loading`?(0,H.jsx)(U,{fontSize:`$3`,color:`$color10`,children:`Loading usage…`}):(0,H.jsx)(kZ,{data:r.data,sections:e.sections,summary:s,allowance:l,upgrade:e.upgrade})]})}var NZ=M(z,{name:`Card`,bg:`$background`,position:`relative`,rounded:`$true`}),PZ=`hanzo`,FZ=[{suffix:`hanzo.ai`,brand:`hanzo`},{suffix:`hanzo.id`,brand:`hanzo`},{suffix:`hanzo.chat`,brand:`hanzo`},{suffix:`hanzo.cloud`,brand:`hanzo`},{suffix:`lux.network`,brand:`lux`},{suffix:`lux.cloud`,brand:`lux`},{suffix:`lux.id`,brand:`lux`},{suffix:`lux.exchange`,brand:`lux`},{suffix:`zoo.ngo`,brand:`zoo`},{suffix:`zoo.network`,brand:`zoo`},{suffix:`zoo.cloud`,brand:`zoo`},{suffix:`zoolabs.id`,brand:`zoo`},{suffix:`pars.network`,brand:`pars`},{suffix:`pars.cloud`,brand:`pars`},{suffix:`pars.id`,brand:`pars`},{suffix:`pars.vote`,brand:`pars`},{suffix:`7stars.dev`,brand:`7stars`},{suffix:`yotoda.tech`,brand:`yotoda`}];function IZ(e){return(e??``).trim().toLowerCase().replace(/:\d+$/,``).replace(/\.+$/,``)}function LZ(e){let t=IZ(e);if(t){for(let e of FZ)if(t===e.suffix||t.endsWith(`.`+e.suffix))return e.brand}return PZ}var RZ=`<svg role="img" aria-label="Hanzo" viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
104
- <!-- Origami fold-in → hover: one 3-D turn → press: squash. Pure CSS, no JS. Canonical 7-path shaded H. -->
105
-
106
- <style>.o{fill:currentColor;opacity:0;transform-box:fill-box;transform-origin:left center;animation:fold 0.42s cubic-bezier(.16,1,.3,1) forwards}
107
- .s{fill:currentColor;opacity:.55}
108
- @keyframes fold{from{opacity:0;transform:perspective(320px) rotateY(90deg)}to{opacity:1;transform:none}}
109
- .o0{animation-delay:0.00s}.o1{animation-delay:0.06s}.o2{animation-delay:0.12s}.o3{animation-delay:0.18s}.o4{animation-delay:0.24s}
110
- /* interaction — pure CSS, no JS: hover = one graceful turn (returns to rest), press = squash */
111
- .hanzo-hov{transform-box:view-box;transform-origin:33.5px 33.5px}
112
- .hanzo-prs{transform-box:view-box;transform-origin:33.5px 33.5px;transition:transform .22s cubic-bezier(.22,1,.36,1)}
113
- svg:hover .hanzo-hov{animation:hanzoTurn 0.85s cubic-bezier(.45,0,.2,1)}
114
- svg:active .hanzo-prs{transform:scale(.92)}
115
- @keyframes hanzoTurn{0%{transform:perspective(300px) rotateY(0)}100%{transform:perspective(300px) rotateY(360deg)}}
116
- @media (prefers-reduced-motion:reduce){.hanzo-hov,.hanzo-prs{animation:none!important;transform:none!important}.o{opacity:1;animation:none;transform:none}}
117
- </style>
118
- <g class="hanzo-hov"><g class="hanzo-prs">
119
- <path class="o o0" d="M22.21 0H0V22.3184H22.21V0Z"/>
120
- <path class="o o1" d="M66.7198 0H44.5098V22.3184H66.7198V0Z"/>
121
- <path class="o o1 s" d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z"/>
122
- <path class="o o2" d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z"/>
123
- <path class="o o3" d="M22.21 67V44.6369H0V67H22.21Z"/>
124
- <path class="o o3 s" d="M0 44.6369L22.21 46.8285V44.6369H0Z"/>
125
- <path class="o o4" d="M66.7198 67V44.6369H44.5098V67H66.7198Z"/>
126
- </g></g>
127
- </svg>`,zZ=`0 0 67 67`,BZ=[`M22.21 67V44.6369H0V67H22.21Z`,`M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z`,`M22.21 0H0V22.3184H22.21V0Z`,`M66.7198 0H44.5098V22.3184H66.7198V0Z`,`M66.7198 67V44.6369H44.5098V67H66.7198Z`],VZ=[`M0 44.6369L22.21 46.8285V44.6369H0Z`,`M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z`],HZ=`<path d="${BZ[0]}"/><path class="shade" fill="#DDDDDD" d="${VZ[0]}"/><path d="${BZ[1]}"/><path d="${BZ[2]}"/><path d="${BZ[3]}"/><path class="shade" fill="#DDDDDD" d="${VZ[1]}"/><path d="${BZ[4]}"/>`,UZ=`<circle cx="12" cy="12" r="8.88" fill="none" stroke="currentColor" stroke-width="2.64" stroke-linecap="round"/>`;function WZ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
128
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
129
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
130
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
131
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
132
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
133
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
134
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
135
- </svg>`}function GZ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
136
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#000000"/>
137
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#000000"/>
138
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#000000"/>
139
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#000000"/>
140
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#000000"/>
141
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#000000"/>
142
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#000000"/>
143
- </svg>`}function KZ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
144
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="#ffffff"/>
145
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="#DDDDDD"/>
146
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="#ffffff"/>
147
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="#ffffff"/>
148
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="#ffffff"/>
149
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="#DDDDDD"/>
150
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="#ffffff"/>
151
- </svg>`}function qZ(){let e=e=>`<path d="${e}" fill="#000000"/>`,t=e=>`<path class="shade" d="${e}" fill="#222222"/>`;return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg"><rect width="67" height="67" fill="#ffffff"/>`+e(BZ[0])+t(VZ[0])+e(BZ[1])+e(BZ[2])+e(BZ[3])+t(VZ[1])+e(BZ[4])+`</svg>`}function JZ(){return`<svg viewBox="0 0 67 67" xmlns="http://www.w3.org/2000/svg">
152
- <path d="M22.21 67V44.6369H0V67H22.21Z" fill="currentColor"/>
153
- <path d="M0 44.6369L22.21 46.8285V44.6369H0Z" fill="currentColor"/>
154
- <path d="M66.7038 22.3184H22.2534L0.0878906 44.6367H44.4634L66.7038 22.3184Z" fill="currentColor"/>
155
- <path d="M22.21 0H0V22.3184H22.21V0Z" fill="currentColor"/>
156
- <path d="M66.7198 0H44.5098V22.3184H66.7198V0Z" fill="currentColor"/>
157
- <path d="M66.6753 22.3185L44.5098 20.0822V22.3185H66.6753Z" fill="currentColor"/>
158
- <path d="M66.7198 67V44.6369H44.5098V67H66.7198Z" fill="currentColor"/>
159
- </svg>`}var YZ=64,XZ=2,ZZ=48/67,QZ=8,$Z=4/ZZ,eQ=(e,t)=>` <defs><g id="m">
160
- ${BZ.map(e=>` <path d="${e}"/>`).join(`
161
- `)}
162
- </g></defs>
163
- <g transform="translate(${QZ} ${QZ}) scale(${ZZ.toFixed(4)})">
164
- <use href="#m" ${e} stroke-width="${$Z.toFixed(4)}" stroke-miterlimit="${XZ}"/>
165
- <use href="#m" ${t}/>
166
- </g>`;function tQ(){return`<svg viewBox="0 0 ${YZ} ${YZ}" xmlns="http://www.w3.org/2000/svg">
167
- <style>
168
- .core { fill: #ffffff }
169
- .rim { fill: #000000; stroke: #000000 }
170
- @media (prefers-color-scheme: light) { .core { fill: #000000 } }
171
- @media (prefers-color-scheme: dark) { .rim { fill: #ffffff; stroke: #ffffff } }
172
- </style>
173
- ${eQ(`class="rim"`,`class="core"`)}
174
- </svg>`}function nQ(e={}){let{variant:t=`current`}=e,n=``;switch(t){case`mono`:n=GZ();break;case`white`:n=KZ();break;case`light`:n=qZ();break;case`current`:n=JZ();break;case`favicon`:n=tQ();break;case`color`:n=WZ();break;default:n=JZ()}return`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(n)))}`}tQ(),nQ(),nQ({variant:`mono`}),nQ({variant:`white`}),nQ({variant:`favicon`});function rQ(){return RZ}function iQ(){return`data:image/svg+xml;base64,`+btoa(unescape(encodeURIComponent(RZ)))}iQ();var aQ=`.hanzo-motion{display:inline-flex;align-items:center;color:inherit}
175
- .hanzo-motion .hanzo-mark{display:block;line-height:0;width:1.25em;height:1.25em;animation:hanzo-flip .5s cubic-bezier(.16,1,.3,1) .2s backwards,hanzo-breathe 6s ease-in-out 3.2s infinite}
176
- .hanzo-motion .hanzo-mark svg{display:block;width:100%;height:100%}
177
- .hanzo-motion .hanzo-word{overflow:hidden;display:inline-block;margin-left:.5em}
178
- .hanzo-motion .hanzo-word>span{display:inline-block;white-space:nowrap;font-weight:600;transform:translateX(-102%);transition:transform .3s ease-out;animation:hanzo-word 2.8s ease-out}
179
- .hanzo-motion:hover .hanzo-word>span{transform:translateX(0)}
180
- @keyframes hanzo-flip{from{opacity:0;transform:perspective(320px) rotateY(180deg) scale(.6)}to{opacity:1;transform:none}}
181
- @keyframes hanzo-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}
182
- @keyframes hanzo-word{0%,40%{transform:translateX(-102%)}55%,82%{transform:translateX(0)}100%{transform:translateX(-102%)}}
183
- @media (prefers-reduced-motion:reduce){.hanzo-motion .hanzo-mark,.hanzo-motion .hanzo-word>span{animation:none!important}.hanzo-motion .hanzo-word>span{transition:none}}`,oQ=({variant:e=`current`,size:t=64,className:n,style:r,animated:i=!1,wordmark:a=`Hanzo`})=>{if(i)return(0,H.jsxs)(`span`,{className:n,style:r,children:[(0,H.jsx)(`style`,{dangerouslySetInnerHTML:{__html:aQ}}),(0,H.jsxs)(`span`,{className:`hanzo-motion`,children:[(0,H.jsx)(`span`,{className:`hanzo-mark`,style:{width:t,height:t},dangerouslySetInnerHTML:{__html:JZ()}}),(0,H.jsx)(`span`,{className:`hanzo-word`,children:(0,H.jsx)(`span`,{children:a})})]})]});let o=``;switch(e){case`mono`:o=GZ();break;case`white`:o=KZ();break;case`light`:o=qZ();break;case`current`:o=JZ();break;case`favicon`:o=tQ();break;case`animated`:o=rQ();break;case`color`:o=WZ();break;default:o=JZ()}return(0,H.jsx)(`div`,{className:n,style:{width:t,height:t,...r},dangerouslySetInnerHTML:{__html:o}})},sQ={viewBox:zZ,content:HZ},cQ={hanzo:sQ,lux:{viewBox:`0 0 100 100`,content:`<path d="M50 85 L15 25 L85 25 Z"/>`},zoo:{viewBox:`0 0 1024 1024`,colored:!0,content:`<defs><clipPath id="zooClip"><circle cx="512" cy="511" r="270"/></clipPath><clipPath id="zooGClip"><circle cx="513" cy="369" r="234"/></clipPath><clipPath id="zooRClip"><circle cx="365" cy="595" r="234"/></clipPath></defs><g clip-path="url(#zooClip)"><circle cx="513" cy="369" r="234" fill="#00A652"/><circle cx="365" cy="595" r="234" fill="#ED1C24"/><circle cx="643" cy="595" r="234" fill="#2E3192"/><g clip-path="url(#zooGClip)"><circle cx="365" cy="595" r="234" fill="#FCF006"/><circle cx="643" cy="595" r="234" fill="#01ACF1"/></g><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#EA018E"/></g><g clip-path="url(#zooGClip)"><g clip-path="url(#zooRClip)"><circle cx="643" cy="595" r="234" fill="#FFFFFF"/></g></g></g>`},pars:{viewBox:`-120 -120 240 240`,content:`<path d="M0,-100 L30,-60 L100,-40 L60,0 L100,40 L30,60 L0,100 L-30,60 L-100,40 L-60,0 L-100,-40 L-30,-60 Z" fill="none" stroke="currentColor" stroke-width="4" stroke-linejoin="round"/><path d="M0,-70 L22,-42 L70,-28 L42,0 L70,28 L22,42 L0,70 L-22,42 L-70,28 L-42,0 L-70,-28 L-22,-42 Z" fill="currentColor" fill-opacity="0.15" stroke="currentColor" stroke-width="3" stroke-linejoin="round"/><circle r="55" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="35" fill="none" stroke="currentColor" stroke-width="1.5" opacity="0.4"/><circle r="8" fill="currentColor"/>`},"7stars":sQ,yotoda:sQ},lQ={accent1:`#000000`,surface1:`#FFFFFF`,surface2:`#FAFAFA`,neutral1:`#0A0A0A`,neutral2:`rgba(10, 10, 10, 0.6)`},uQ={accent1:`#FFFFFF`,surface1:`#000000`,surface2:`#111111`,neutral1:`#FAFAFA`,neutral2:`rgba(250, 250, 250, 0.6)`},dQ=(e,t)=>`https://cdn.jsdelivr.net/npm/${e}/${t}`,fQ={id:`hanzo`,name:`Hanzo`,title:`Hanzo AI`,tagline:`Enterprise AI infrastructure and frontier models`,legalName:`Hanzo AI Inc.`,domain:`hanzo.ai`,docsDomain:`docs.hanzo.ai`,adminDomain:`hanzo.ai`,accentColor:`#FFFFFF`,theme:{light:lQ,dark:uQ},social:{twitter:`https://x.com/hanzoai`,github:`https://github.com/hanzoai`,discord:`https://discord.gg/CJCyAsm9Vr`,linkedin:`https://linkedin.com/company/hanzoai`},mark:cQ.hanzo,logoUrl:dQ(`@hanzo/brand@1.4.7`,`assets/logo/logo.svg`),faviconUrl:dQ(`@hanzo/brand@1.4.7`,`assets/logo/favicon.svg`)},pQ={hanzo:fQ,lux:{id:`lux`,name:`Lux`,title:`Lux Network`,tagline:`High-performance, post-quantum blockchain infrastructure`,legalName:`Lux Industries Inc.`,domain:`lux.network`,docsDomain:`docs.lux.network`,adminDomain:`lux.network`,accentColor:`#FFFFFF`,theme:{light:lQ,dark:uQ},social:{twitter:`https://x.com/luxdefi`,github:`https://github.com/luxfi`,discord:`https://discord.gg/lux`},mark:cQ.lux,logoUrl:dQ(`@luxfi/logo@1.0.8`,`svg/lux-icon-white.svg`),faviconUrl:dQ(`@luxfi/logo@1.0.8`,`svg/lux-favicon.svg`)},zoo:{id:`zoo`,name:`Zoo`,title:`Zoo`,tagline:`Open, decentralized AI & science research network`,legalName:`Zoo Labs Foundation`,domain:`zoo.ngo`,docsDomain:`docs.zoo.ngo`,adminDomain:`zoo.ngo`,accentColor:`#01ACF1`,theme:{light:{...lQ,accent1:`#01ACF1`},dark:{...uQ,accent1:`#01ACF1`}},social:{twitter:`https://x.com/zoo_labs`,github:`https://github.com/zooai`,discord:`https://discord.gg/zoo`},mark:cQ.zoo,logoUrl:dQ(`@zooai/brand@1.4.1`,`assets/logo/logo.svg`),faviconUrl:dQ(`@zooai/brand@1.4.1`,`assets/logo/logo.svg`)},pars:{id:`pars`,name:`Pars`,title:`Pars Network`,tagline:`A sovereign, verifiable identity layer for the Pars community`,legalName:`Parsis Foundation`,domain:`pars.network`,docsDomain:`docs.pars.network`,adminDomain:`pars.network`,accentColor:`#caa24a`,theme:{light:{...lQ,accent1:`#caa24a`},dark:{...uQ,accent1:`#caa24a`}},social:{twitter:`https://x.com/parsnetwork`,github:`https://github.com/parsdao`},mark:cQ.pars,logoUrl:dQ(`@parsdao/brand@1.0.1`,`assets/logo/logo.svg`),faviconUrl:dQ(`@parsdao/brand@1.0.1`,`assets/logo/logo.svg`)},"7stars":{id:`7stars`,name:`7Stars`,title:`7Stars`,tagline:`Cloud, powered by Hanzo`,legalName:`7Stars`,domain:`7stars.dev`,docsDomain:`docs.7stars.dev`,adminDomain:`7stars.dev`,accentColor:`#FFFFFF`,theme:{light:lQ,dark:uQ},social:{},mark:cQ[`7stars`],logoUrl:fQ.logoUrl,faviconUrl:fQ.faviconUrl},yotoda:{id:`yotoda`,name:`Yotoda`,title:`Yotoda`,tagline:`Cloud, powered by Hanzo`,legalName:`Yotoda`,domain:`yotoda.tech`,docsDomain:`docs.yotoda.tech`,adminDomain:`yotoda.tech`,accentColor:`#FFFFFF`,theme:{light:lQ,dark:uQ},social:{},mark:cQ.yotoda,logoUrl:fQ.logoUrl,faviconUrl:fQ.faviconUrl}},mQ=()=>typeof window>`u`?PZ:LZ(window.location.hostname);function hQ({size:e=20,brand:t,wordmark:n,animated:r=!0,color:i=`currentColor`}){let a=t??mQ(),o=cQ[a]??cQ.hanzo,s=pQ[a]?.name??pQ.hanzo.name,c=n===!1?s:n??s;if(typeof r==`function`){let t=r().replace(`<svg `,`<svg width="100%" height="100%" `);return(0,H.jsx)(`span`,{role:`img`,"aria-label":c,style:{width:e,height:e,display:`inline-flex`,flexShrink:0},dangerouslySetInnerHTML:{__html:t}})}return r&&a===`hanzo`?(0,H.jsx)(oQ,{animated:!0,size:e,wordmark:n===!1?void 0:c}):(0,H.jsx)(`svg`,{width:e,height:e,viewBox:o.viewBox,role:`img`,"aria-label":c,...o.colored?null:{fill:i},style:{display:`block`,flexShrink:0},dangerouslySetInnerHTML:{__html:o.content}})}function gQ(e){let t=e.trim();if(!t||/^(https?:|data:|\/)/.test(t)||!/[\p{Extended_Pictographic}\p{Regional_Indicator}]/u.test(t))return!1;let n=Intl.Segmenter;return(n?[...new n().segment(t)].length:[...t].length)<=3}function _Q(e){return(e.trim().split(/[\s._/-]+/).filter(Boolean).slice(0,2).map(e=>e[0]??``).join(``)||e.trim().slice(0,2)).toUpperCase()}var vQ=e=>e<26?`$1`:e<34?`$2`:e<44?`$4`:`$6`;function yQ({org:e,size:t=22,maxW:n}){let[r,i]=(0,V.useState)(!1);return(0,V.useEffect)(()=>i(!1),[e.logo]),e.logo&&gQ(e.logo)?(0,H.jsx)(z,{width:t,height:t,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:Math.round(t*.72),lineHeight:t,children:e.logo.trim()})}):e.logo&&!r?(0,H.jsx)(`img`,{src:e.logo,alt:``,onError:()=>i(!0),style:{height:t,width:n?`auto`:t,maxWidth:n??t,objectFit:`contain`,display:`block`,borderRadius:6,flexShrink:0}}):(0,H.jsx)(z,{width:t,height:t,rounded:`$3`,bg:`$edge`,items:`center`,justify:`center`,style:{flexShrink:0},children:(0,H.jsx)(U,{fontSize:vQ(t),fontWeight:`800`,color:`$ink`,children:_Q(e.displayName||e.name)})})}var bQ=`theme`;function xQ(){if(typeof document>`u`)return;let e=document.documentElement;if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;try{let e=window.localStorage.getItem(bQ);if(e===`light`||e===`dark`)return e}catch{}}function SQ(e){if(typeof document>`u`)return;let t=document.documentElement;t.classList.toggle(`dark`,e===`dark`),t.classList.toggle(`light`,e===`light`),t.style.colorScheme=e;try{window.localStorage.setItem(bQ,e)}catch{}}function CQ({theme:e,defaultTheme:t,onToggle:n,onThemeChange:r,size:i=`$2`,label:a}){let o=e!==void 0,[s,c]=(0,V.useState)(()=>e??t??xQ()??`dark`),l=(o?e:s)===`dark`,u=He(),{t:d}=R();return(0,H.jsx)(Je,{size:i,chromeless:!0,icon:l?(0,H.jsx)(oee,{size:16}):(0,H.jsx)(aee,{size:16}),onPress:()=>{let e=l?`light`:`dark`;u({component:`ThemeToggle`,action:`change`,value:e}),o||(c(e),SQ(e)),n?.(e),r?.(e)},"aria-label":a??d(l?`Switch to light theme`:`Switch to dark theme`)})}var wQ=(0,V.lazy)(()=>Le(()=>import(`./ThemeToggleNext-Cb-dedIF.js`),__vite__mapDeps([5,1,2]))),TQ=class extends V.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?this.props.fallback:this.props.children}};function EQ(e){if(e.theme!==void 0||e.onToggle!==void 0||e.onThemeChange!==void 0)return(0,H.jsx)(CQ,{...e});let t=(0,H.jsx)(CQ,{...e});return(0,H.jsx)(TQ,{fallback:t,children:(0,H.jsx)(V.Suspense,{fallback:t,children:(0,H.jsx)(wQ,{size:e.size,label:e.label})})})}var DQ=(0,V.createContext)({}),OQ=()=>(0,V.useContext)(DQ);function kQ(e){let t=typeof e?.status==`number`?e.status:0,n=e instanceof Error?e.message:String(e);return t===503?{kind:`not-initialized`,message:n}:t===404||t===405?{kind:`unavailable`,message:n}:t===501?{kind:`not-implemented`,message:n}:t===402?{kind:`billing`,message:n}:t===401?{kind:`signin`,message:n}:t===403?{kind:`access`,message:n}:{kind:`error`,message:n}}var AQ={"not-initialized":D(`Backend not initialized`),unavailable:D(`Not available on this deployment yet`),"not-implemented":D(`Not yet available`),access:D(`Not enabled for your account`),signin:D(`Your session expired`),billing:D(`Add credits to continue`),error:D(`Could not reach the backend`)},jQ={"not-initialized":D(`The /v1 route is mounted but its runtime (or the console API key it proxies to) is not configured on this deployment yet. Real data appears here once it is — no placeholder data is shown.`),unavailable:D(`This endpoint is not mounted at the gateway on this host yet. The view lights up automatically once the route is live.`),"not-implemented":D(`This capability is planned but not wired yet. The backend answers honestly rather than pretending it worked — nothing here is fabricated, and the view lights up automatically once it ships.`),access:D(`You're signed in, but this isn't enabled for your organization on this deployment, or it's an admin-only surface. It appears here automatically once your account has access — nothing is fabricated.`),signin:D(`Your session has expired or isn’t recognized here. Sign in again to continue where you left off.`),billing:``,error:``};function MQ({state:e,onRetry:t,hint:n}){let{signIn:r,addCredits:i}=OQ(),{t:a}=R();return(0,H.jsxs)(NZ,{borderWidth:1,borderColor:`$borderColor`,p:`$4`,gap:`$2`,maxW:640,children:[(0,H.jsxs)(y,{gap:`$2`,items:`center`,children:[(0,H.jsx)(km,{size:16}),(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`700`,children:a(AQ[e.kind])})]}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,children:jQ[e.kind]?a(jQ[e.kind]):e.message}),n?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:n}):null,e.kind===`signin`&&r?(0,H.jsx)(Je,{size:`$2`,theme:`light`,self:`flex-start`,onPress:r,children:a(`Sign in again`)}):e.kind===`billing`&&i?(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(Je,{size:`$2`,theme:`light`,self:`flex-start`,icon:(0,H.jsx)(Rp,{size:14}),onPress:i,children:a(`Add credits`)}),t?(0,H.jsx)(Je,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]}):t?(0,H.jsx)(Je,{size:`$2`,self:`flex-start`,onPress:t,children:a(`Retry`)}):null]})}var NQ={fontWeight:`600`,px:`$3`};function PQ({onPress:e,...t}){let n=He(),r=st()===`compact`;return(0,H.jsx)(Je,{bg:`var(--primary)`,color:`var(--primary-foreground)`,borderColor:`var(--primary)`,hoverStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},pressStyle:{bg:`var(--primary-hover)`,borderColor:`var(--primary-hover)`},onPress:r=>{n({component:`PrimaryButton`,action:`click`,id:qe(t.children)??t[`aria-label`]}),e?.(r)},...r?NQ:null,...t})}function FQ(e){typeof window<`u`&&window.open(e,`_blank`,`noopener`)}function IQ({icon:e,title:t,description:n,bullets:r,primary:i,secondary:a}){let o=He();return(0,H.jsxs)(NZ,{borderWidth:1,borderColor:`$borderColor`,borderStyle:`dashed`,p:`$6`,gap:`$4`,items:`center`,maxW:640,self:`center`,width:`100%`,children:[(0,H.jsx)(z,{width:48,height:48,items:`center`,justify:`center`,rounded:`$4`,bg:`$hover`,children:(0,H.jsx)(e,{size:24})}),(0,H.jsxs)(z,{gap:`$2`,items:`center`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$6`,fontWeight:`500`,text:`center`,letterSpacing:-.3,children:t}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,text:`center`,children:n})]}),r&&r.length?(0,H.jsx)(z,{gap:`$2`,self:`stretch`,maxW:420,mx:`auto`,children:r.map(e=>(0,H.jsxs)(y,{gap:`$2`,items:`flex-start`,children:[(0,H.jsx)(z,{pt:`$1`,children:(0,H.jsx)(Vt,{size:14,color:`$soft`})}),(0,H.jsx)(U,{fontSize:`$3`,color:`$quiet`,flex:1,children:e})]},e))}):null,i||a?(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,justify:`center`,children:[i?(0,H.jsx)(PQ,{icon:i.icon,iconAfter:i.href?(0,H.jsx)(Hp,{size:16}):(0,H.jsx)(_p,{...qm,size:16}),onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:i.label}),i.href?FQ(i.href):i.onPress?.()},children:i.label}):null,a?(0,H.jsx)(Je,{chromeless:!0,icon:a.icon,iconAfter:a.href?(0,H.jsx)(Hp,{size:14}):void 0,onPress:()=>{o({component:`EmptyState`,action:`click`,id:t,value:a.label}),a.href?FQ(a.href):a.onPress?.()},children:a.label}):null]}):null]})}var LQ=new Map;function RQ(e,t){LQ.set(e,t)}function zQ(e){return LQ.get(e)}var BQ={AC:`247`,AD:`376`,AE:`971`,AF:`93`,AG:`1`,AI:`1`,AL:`355`,AM:`374`,AO:`244`,AR:`54`,AS:`1`,AT:`43`,AU:`61`,AW:`297`,AX:`358`,AZ:`994`,BA:`387`,BB:`1`,BD:`880`,BE:`32`,BF:`226`,BG:`359`,BH:`973`,BI:`257`,BJ:`229`,BL:`590`,BM:`1`,BN:`673`,BO:`591`,BQ:`599`,BR:`55`,BS:`1`,BT:`975`,BW:`267`,BY:`375`,BZ:`501`,CA:`1`,CC:`61`,CD:`243`,CF:`236`,CG:`242`,CH:`41`,CI:`225`,CK:`682`,CL:`56`,CM:`237`,CN:`86`,CO:`57`,CR:`506`,CU:`53`,CV:`238`,CW:`599`,CX:`61`,CY:`357`,CZ:`420`,DE:`49`,DJ:`253`,DK:`45`,DM:`1`,DO:`1`,DZ:`213`,EC:`593`,EE:`372`,EG:`20`,EH:`212`,ER:`291`,ES:`34`,ET:`251`,FI:`358`,FJ:`679`,FK:`500`,FM:`691`,FO:`298`,FR:`33`,GA:`241`,GB:`44`,GD:`1`,GE:`995`,GF:`594`,GG:`44`,GH:`233`,GI:`350`,GL:`299`,GM:`220`,GN:`224`,GP:`590`,GQ:`240`,GR:`30`,GT:`502`,GU:`1`,GW:`245`,GY:`592`,HK:`852`,HN:`504`,HR:`385`,HT:`509`,HU:`36`,ID:`62`,IE:`353`,IL:`972`,IM:`44`,IN:`91`,IO:`246`,IQ:`964`,IR:`98`,IS:`354`,IT:`39`,JE:`44`,JM:`1`,JO:`962`,JP:`81`,KE:`254`,KG:`996`,KH:`855`,KI:`686`,KM:`269`,KN:`1`,KP:`850`,KR:`82`,KW:`965`,KY:`1`,KZ:`7`,LA:`856`,LB:`961`,LC:`1`,LI:`423`,LK:`94`,LR:`231`,LS:`266`,LT:`370`,LU:`352`,LV:`371`,LY:`218`,MA:`212`,MC:`377`,MD:`373`,ME:`382`,MF:`590`,MG:`261`,MH:`692`,MK:`389`,ML:`223`,MM:`95`,MN:`976`,MO:`853`,MP:`1`,MQ:`596`,MR:`222`,MS:`1`,MT:`356`,MU:`230`,MV:`960`,MW:`265`,MX:`52`,MY:`60`,MZ:`258`,NA:`264`,NC:`687`,NE:`227`,NF:`672`,NG:`234`,NI:`505`,NL:`31`,NO:`47`,NP:`977`,NR:`674`,NU:`683`,NZ:`64`,OM:`968`,PA:`507`,PE:`51`,PF:`689`,PG:`675`,PH:`63`,PK:`92`,PL:`48`,PM:`508`,PR:`1`,PS:`970`,PT:`351`,PW:`680`,PY:`595`,QA:`974`,RE:`262`,RO:`40`,RS:`381`,RU:`7`,RW:`250`,SA:`966`,SB:`677`,SC:`248`,SD:`249`,SE:`46`,SG:`65`,SH:`290`,SI:`386`,SJ:`47`,SK:`421`,SL:`232`,SM:`378`,SN:`221`,SO:`252`,SR:`597`,SS:`211`,ST:`239`,SV:`503`,SX:`1`,SY:`963`,SZ:`268`,TA:`290`,TC:`1`,TD:`235`,TG:`228`,TH:`66`,TJ:`992`,TK:`690`,TL:`670`,TM:`993`,TN:`216`,TO:`676`,TR:`90`,TT:`1`,TV:`688`,TW:`886`,TZ:`255`,UA:`380`,UG:`256`,US:`1`,UY:`598`,UZ:`998`,VA:`39`,VC:`1`,VE:`58`,VG:`1`,VI:`1`,VN:`84`,VU:`678`,WF:`681`,WS:`685`,XK:`383`,YE:`967`,YT:`262`,ZA:`27`,ZM:`260`,ZW:`263`},VQ=e=>e==null?``:String(e),HQ=e=>{if(e==null||e===``)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},UQ=e=>Array.isArray(e)?e:e==null||e===``?[]:[e],WQ=e=>{if(e==null||e===``)return``;if(e instanceof Date)return Number.isNaN(e.getTime())?``:e.toISOString().slice(0,10);let t=String(e),n=t.match(/^(\d{4}-\d{2}-\d{2})/);if(n)return n[1];let r=new Date(t);return Number.isNaN(r.getTime())?``:r.toISOString().slice(0,10)},GQ=e=>{if(e==null||e===``)return null;let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.getTime())?null:t},KQ=e=>{if(e==null||e===``)return{};if(typeof e==`string`){let t=e.trim(),n=t.indexOf(` `);return n<0?{first:t}:{first:t.slice(0,n),last:t.slice(n+1).trim()}}if(typeof e!=`object`)return{first:String(e)};let t=e;return{first:VQ(t.first??t.firstName).trim()||void 0,last:VQ(t.last??t.lastName).trim()||void 0}},qQ=e=>{let t=KQ(e);return[t.first,t.last].filter(Boolean).join(` `)},JQ=[`street1`,`street2`,`city`,`state`,`postcode`,`country`],YQ=e=>{if(e==null||e===``)return{};if(typeof e==`string`)return{street1:e};let t=e,n={},r={street1:`addressStreet1`,street2:`addressStreet2`,city:`addressCity`,state:`addressState`,postcode:`addressPostcode`,country:`addressCountry`};for(let e of JQ){let i=VQ(t[e]??t[r[e]]).trim();i&&(n[e]=i)}return n},XQ=(e,t)=>{if(!e)return``;if(!/^[A-Za-z]{2}$/.test(e))return e;try{return new Intl.DisplayNames(t?[t]:void 0,{type:`region`}).of(e.toUpperCase())??e}catch{return e}},ZQ=(e,t)=>{let n=YQ(e);return JQ.map(e=>e===`country`?XQ(n.country,t):n[e]).filter(Boolean).join(`, `)},QQ=e=>UQ(e).map(e=>typeof e==`string`?{url:e}:e).filter(e=>!!e&&typeof e.url==`string`&&e.url.trim()!==``),$Q=e=>{let t=e.trim();try{let e=new URL(/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`);return e.host.replace(/^www\./,``)+(e.pathname===`/`?``:e.pathname.replace(/\/$/,``))}catch{return t}},e$=e=>{let t=e.trim();if(!t)return;let n=/^[a-z][a-z0-9+.-]*:/i.test(t)?t:`https://${t}`;try{let e=new URL(n);return[`http:`,`https:`,`mailto:`,`tel:`].includes(e.protocol)?e.href:void 0}catch{return}},t$=e=>{if(e&&typeof e==`object`&&!Array.isArray(e)){let t=e;return[VQ(t.primaryEmail),...UQ(t.additionalEmails).map(VQ)].map(e=>e.trim()).filter(Boolean)}return UQ(e).flatMap(e=>VQ(e).split(/[,;]/)).map(e=>e.trim()).filter(Boolean)},n$=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim()),r$=(()=>{let e={};for(let[t,n]of Object.entries(BQ))(e[n]??=[]).push(t);for(let[t,n]of Object.entries({1:`US`,7:`RU`,44:`GB`,47:`NO`,61:`AU`,212:`MA`,262:`RE`,290:`SH`,358:`FI`,590:`GP`,599:`CW`})){let r=e[t];r?.includes(n)&&(e[t]=[n,...r.filter(e=>e!==n)])}return e})(),i$=(e,t)=>{if(e&&typeof e==`object`){let t=e,n=VQ(t.number??t.primaryPhoneNumber).trim(),r=VQ(t.country??t.countryCode??t.primaryPhoneCountryCode).trim().toUpperCase()||void 0;return{country:r,callingCode:VQ(t.callingCode??t.primaryPhoneCallingCode).replace(/^\+/,``).trim()||(r?BQ[r]:void 0),number:n}}let n=VQ(e).trim();if(!n.startsWith(`+`)){let e=t?.toUpperCase();return{country:e,callingCode:e?BQ[e]:void 0,number:n}}let r=n.slice(1).replace(/[^\d]/g,``);for(let e=Math.min(4,r.length);e>0;e--){let i=r.slice(0,e),a=r$[i];if(a)return{country:t&&a.includes(t.toUpperCase())?t.toUpperCase():a[0],callingCode:i,number:a$(n.slice(1),e)}}return{number:n}},a$=(e,t)=>{let n=0,r=0;for(;r<e.length&&n<t;)/\d/.test(e[r++])&&n++;return e.slice(r).replace(/^[\s.()-]+/,``).trim()},o$=e=>{let t=e.number.trim();return t?e.callingCode?`+${e.callingCode} ${t.replace(/^0+(?=\d)/,``)}`:t:``},s$=e=>{let t=e.number.replace(/[^\d]/g,``).replace(/^0+(?=\d)/,``);if(t)return`tel:${e.callingCode?`+${e.callingCode}`:``}${t}`},c$=e=>{if(e==null||e===``)return null;if(typeof e==`string`)return{name:e};let t=e,n=VQ(t.name??t.workspaceMemberName??t.label).trim();return n?{name:n,source:VQ(t.source).toLowerCase()||void 0,avatarUrl:VQ(t.avatarUrl).trim()||void 0}:null},l$=e=>{if(e==null||e===``)return``;if(typeof e==`object`){let t=e;return typeof t.markdown==`string`&&t.markdown.trim()?l$(t.markdown):`blocknote`in t||`content`in t||`type`in t||Array.isArray(e)?l$(u$(e).join(`
184
- `)):``}for(let t of String(e).split(`
185
- `)){let e=t.replace(/^\s{0,3}(#{1,6}\s+|>\s?|[-*+]\s+|\d+[.)]\s+|-\s\[[ x]\]\s+)/i,``).replace(/!\[[^\]]*\]\([^)]*\)/g,``).replace(/\[([^\]]*)\]\([^)]*\)/g,`$1`).replace(/(\*\*|__|\*|_|~~|`)/g,``).trim();if(e)return e}return``},u$=e=>{if(typeof e==`string`)try{return u$(JSON.parse(e))}catch{return[e]}if(Array.isArray(e))return e.flatMap(u$);if(e&&typeof e==`object`){let t=e,n=typeof t.text==`string`?[t.text]:[],r=[t.content,t.children,t.blocknote].flatMap(e=>e==null?[]:u$(e));return t.type&&r.length?[[...n,...r].join(``)]:[...n,...r]}return[]},d$=(e,t)=>{if(typeof t==`string`)return t;if(t&&typeof t==`object`){let n=t;return VQ(n[e]??n.label??n.name??n.id)}return``};function f$(){return(0,H.jsx)(U,{fontSize:`$2`,color:`var(--text-faint)`,"aria-label":`Empty`,children:`—`})}var p$=({text:e,color:t=`$ink`,mono:n})=>(0,H.jsx)(GL,{text:e,size:`$2`,color:t,...n?{fontFamily:`$mono`}:null}),m$={target:`_blank`,rel:`noopener noreferrer`};function h$({label:e,color:t}){return(0,H.jsx)(YL,{color:t??`gray`,children:e})}var g$=(e,t)=>e?.find(e=>e.value===t)??{value:t,label:t};function _$({value:e}){let t=VQ(e).trim();return t?(0,H.jsx)(p$,{text:t}):(0,H.jsx)(f$,{})}function v$({value:e}){let t=VQ(e).trim();return t?(0,H.jsx)(GL,{text:t,lineClamp:2,size:`$2`,color:`$ink`,isTooltipMultiline:!0}):(0,H.jsx)(f$,{})}function y$({value:e}){let t=l$(e);return t?(0,H.jsx)(p$,{text:t,color:`$aside`}):(0,H.jsx)(f$,{})}function b$({value:e}){let t=t$(e);return t.length===0?(0,H.jsx)(f$,{}):(0,H.jsx)(Y$,{children:t.map((e,t)=>(0,H.jsx)(QL,{shape:`round`,variant:`soft`,label:e,href:`mailto:${e}`},`${e}-${t}`))})}var x$=({url:e,label:t})=>{let n=e$(e);return(0,H.jsx)(QL,{shape:`round`,variant:`soft`,label:t?.trim()||$Q(e),tooltipContent:e,...n?{href:n,...m$}:null})};function S$({value:e}){let t=QQ(e);return t.length===0?(0,H.jsx)(f$,{}):t.length===1?(0,H.jsx)(x$,{url:t[0].url,label:t[0].label}):(0,H.jsx)(Y$,{children:t.map((e,t)=>(0,H.jsx)(x$,{url:e.url,label:e.label},`${e.url}-${t}`))})}function C$({value:e}){let t=QQ(e);return t.length===0?(0,H.jsx)(f$,{}):(0,H.jsx)(Y$,{children:t.map((e,t)=>(0,H.jsx)(x$,{url:e.url,label:e.label},`${e.url}-${t}`))})}function w$({field:e,value:t}){let n=e.metadata?.defaultCountry,r=(Array.isArray(t)?t:[t]).map(e=>i$(e,n)).filter(e=>e.number);return r.length===0?(0,H.jsx)(f$,{}):(0,H.jsx)(Y$,{children:r.map((e,t)=>{let n=s$(e);return(0,H.jsx)(QL,{shape:`round`,variant:`soft`,label:o$(e),...n?{href:n}:null},`${e.number}-${t}`)})})}var T$={fontVariant:[`tabular-nums`]},E$=({text:e})=>(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,...T$,children:e});function D$({field:e,value:t}){let n=HQ(t);if(n==null)return(0,H.jsx)(f$,{});let r=e.metadata??{},i=r.decimals==null?n.toLocaleString():n.toLocaleString(void 0,{minimumFractionDigits:r.decimals,maximumFractionDigits:r.decimals});return(0,H.jsx)(E$,{text:`${r.prefix??``}${i}${r.suffix??``}`})}function O$({field:e,value:t}){let n=HQ(t);if(n==null)return(0,H.jsx)(f$,{});let r=(e.metadata??{}).decimals??0;return(0,H.jsx)(E$,{text:`${n.toLocaleString(void 0,{minimumFractionDigits:r,maximumFractionDigits:r})}%`})}function k$({field:e,value:t}){let n=e.metadata??{},r=t??{},i=HQ(typeof r==`object`&&r?r.amount:t);if(i==null)return(0,H.jsx)(f$,{});let a=typeof r==`object`&&r?.currencyCode||n.currencyCode||`USD`,o;try{o=new Intl.NumberFormat(void 0,{style:`currency`,currency:a,maximumFractionDigits:n.decimals??2}).format(i)}catch{o=`${i} ${a}`}return(0,H.jsx)(E$,{text:o})}function A$({value:e,max:t,hover:n}){let r=ee().aside?.get?.()??`currentColor`,i=n??e;return(0,H.jsx)(y,{items:`center`,gap:2,"aria-hidden":!0,children:Array.from({length:t},(e,t)=>t+1).map(e=>(0,H.jsx)(Em,{size:16,color:e<=i?`$aside`:`$raised`,fill:e<=i?r:`none`},e))})}function j$({field:e,value:t}){let n=(e.metadata??{}).max??5,r=Math.max(0,Math.min(n,Math.round(HQ(t)??0)));return(0,H.jsx)(y,{role:`img`,"aria-label":`${r} of ${n}`,children:(0,H.jsx)(A$,{value:r,max:n})})}function M$({field:e,value:t}){if(t==null||t===``)return(0,H.jsx)(f$,{});let n=e.metadata??{},r=t===!0||t===`true`||t===1;return(0,H.jsxs)(y,{items:`center`,gap:`$1`,height:20,children:[(0,H.jsx)(r?Vt:Rn,{size:14,color:`$aside`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,children:r?n.trueLabel??`Yes`:n.falseLabel??`No`})]})}function N$({field:e,value:t}){let n=VQ(t);if(!n)return(0,H.jsx)(f$,{});let r=e.metadata?.options,i=g$(r,n);return(0,H.jsx)(h$,{label:i.label,color:i.color})}function P$({field:e,value:t}){let n=UQ(t).map(VQ).filter(Boolean);if(n.length===0)return(0,H.jsx)(f$,{});let r=e.metadata?.options;return(0,H.jsx)(Y$,{children:n.map(e=>{let t=g$(r,e);return(0,H.jsx)(h$,{label:t.label,color:t.color},e)})})}var F$=[[`year`,31536e3],[`month`,2592e3],[`week`,604800],[`day`,86400],[`hour`,3600],[`minute`,60]],I$=(e,t=Date.now())=>{let n=(e.getTime()-t)/1e3,r=new Intl.RelativeTimeFormat(void 0,{numeric:`auto`});for(let[e,t]of F$)if(Math.abs(n)>=t)return r.format(Math.round(n/t),e);return r.format(Math.round(n),`second`)};function L$({field:e,value:t}){let n=WQ(t);if(!n)return(0,H.jsx)(f$,{});let r=new Date(`${n}T00:00:00Z`);if(e.metadata?.display===`relative`){let e=new Date(new Date().toISOString().slice(0,10)+`T00:00:00Z`);return(0,H.jsx)(p$,{text:I$(r,e.getTime())})}return(0,H.jsx)(p$,{text:r.toLocaleDateString(void 0,{timeZone:`UTC`,year:`numeric`,month:`short`,day:`numeric`})})}function R$({field:e,value:t}){let n=GQ(t);if(!n)return(0,H.jsx)(f$,{});let r=e.metadata?.display===`relative`;return(0,H.jsx)(p$,{text:r?I$(n):n.toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,timeZoneName:`short`})})}function z$({label:e,seed:t,src:n,shape:r=`square`,href:i,onPress:a}){return(0,H.jsx)(QL,{label:e,startElement:(0,H.jsx)(Nh,{size:`md`,shape:r===`circle`?`circle`:`square`,name:e,colorSeed:t??e,src:n??null}),...i?{href:i}:null,...a?{onPress:a}:null})}function B$({field:e,value:t}){let n=e.metadata??{},r=n.labelField??`name`,i=UQ(t).map(e=>{let t=d$(r,e),i=e&&typeof e==`object`?e:null,a=i&&VQ(i[n.avatarField??`avatarUrl`]).trim()||void 0;return{label:t,seed:i&&VQ(i.id)||t,src:a}}).filter(e=>e.label);if(i.length===0)return(0,H.jsx)(f$,{});let a=i.map((e,t)=>(0,H.jsx)(z$,{label:e.label,seed:e.seed,src:e.src,shape:n.shape},`${e.seed}-${t}`));return i.length===1?a[0]:(0,H.jsx)(Y$,{children:a})}var V$={api:Np,import:Am,email:cm,calendar:Tp,workflow:mee,webhook:fee,system:bp,manual:Bp};function H$({value:e}){let t=c$(e);if(!t)return(0,H.jsx)(f$,{});let n=t.source&&t.source!==`member`?V$[t.source]:void 0;return(0,H.jsx)(QL,{label:t.name,startElement:n?(0,H.jsx)(n,{size:14,color:`$hint`}):(0,H.jsx)(Nh,{size:`md`,shape:`circle`,name:t.name,src:t.avatarUrl??null})})}function U$({value:e}){let t=qQ(e);return t?(0,H.jsx)(p$,{text:t}):(0,H.jsx)(f$,{})}function W$({value:e}){let t=ZQ(e);return t?(0,H.jsx)(p$,{text:t}):(0,H.jsx)(f$,{})}function G$({value:e}){let t=VQ(e);return t?(0,H.jsx)(p$,{text:t,color:`$hint`,mono:!0}):(0,H.jsx)(f$,{})}function K$({value:e}){let t=UQ(e).map(e=>typeof e==`string`?{name:e}:e).map(e=>({name:VQ(e?.label??e?.name).trim()||`file`,url:VQ(e?.url).trim()}));return t.length===0?(0,H.jsx)(f$,{}):(0,H.jsx)(Y$,{children:t.map((e,t)=>{let n=e.url?e$(e.url):void 0;return(0,H.jsx)(QL,{variant:`soft`,label:e.name,maxW:120,startElement:(0,H.jsx)(mm,{size:14,color:`$hint`}),...n?{href:n,...m$}:null},`${e.name}-${t}`)})})}function q$({value:e}){if(e==null)return(0,H.jsx)(f$,{});let t;try{t=JSON.stringify(e)}catch{t=String(e)}return(0,H.jsx)(p$,{text:t,color:`$hint`,mono:!0})}function J$({value:e}){if(typeof e==`object`&&e)return(0,H.jsx)(q$,{field:{name:``,label:``,type:`json`},value:e});let t=VQ(e);return t?(0,H.jsx)(p$,{text:t}):(0,H.jsx)(f$,{})}function Y$({children:e}){return(0,H.jsx)(rR,{flex:1,minW:0,children:e})}var X$=e=>{let t=new Map;return n=>{let r=n??``,i=t.get(r);return i===void 0&&t.set(r,i=e(n)),i}},Z$=(e,t)=>{try{return new Intl.DisplayNames(e?[e]:void 0,{type:t})}catch{return null}},Q$=X$(e=>{let t=Z$(e,`region`),n=new Intl.Collator(e);return Object.entries(BQ).map(([e,n])=>{let r=e;try{r=t?.of(e)??e}catch{r=e}return{value:e,label:r,callingCode:n}}).sort((e,t)=>n.compare(e.label,t.label))}),$$=(e,t)=>{try{let n=new Intl.NumberFormat(t,{style:`currency`,currency:e,currencyDisplay:`narrowSymbol`}).formatToParts(0).find(e=>e.type===`currency`)?.value;return n&&n!==e?n:void 0}catch{return}},e1=X$(e=>{let t=Intl.supportedValuesOf,n=t?t(`currency`):[`USD`,`EUR`,`GBP`,`JPY`,`CNY`,`CAD`,`AUD`,`CHF`,`INR`,`BRL`],r=Z$(e,`currency`);return n.map(t=>{let n=t;try{n=r?.of(t)??t}catch{n=t}return{code:t,name:n,symbol:$$(t,e)}})}),t1=e=>e.field.metadata?.options??[],n1=(e,t)=>{let n=e=>e.normalize(`NFD`).replace(/\p{M}/gu,``).toLowerCase(),r=n(t.trim());return r?e.filter(e=>n(e.label).includes(r)||n(e.value).includes(r)):e};function r1({onSubmit:e,onCancel:t,multiline:n,children:r}){return(0,H.jsx)(z,{width:`100%`,minW:0,onKeyDown:r=>{r.nativeEvent?.isComposing||(r.key===`Enter`&&!(n&&r.shiftKey)?(r.preventDefault?.(),e?.()):r.key===`Escape`&&(r.preventDefault?.(),t?.()))},children:r})}var i1=e=>e.field.label;function a1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata?.placeholder;return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(C_,{"aria-label":e.label,value:VQ(t),onChangeText:e=>n(e),placeholder:o,autoFocus:a})})}function o1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=VQ(Array.isArray(t)?t[0]:t),s=e.metadata?.placeholder??`name@example.com`;return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(C_,{"aria-label":e.label,type:`email`,inputMode:`email`,autoComplete:`email`,value:o,onChangeText:e=>n(e.trim()),placeholder:s,autoFocus:a,"aria-invalid":o!==``&&!n$(o)||void 0})})}function s1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=VQ(typeof t==`object`&&t&&!Array.isArray(t)?t.url:t),s=e.metadata?.placeholder??`https://`;return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(C_,{"aria-label":e.label,type:`url`,inputMode:`url`,value:o,onChangeText:e=>n(e.trim()),placeholder:s,autoFocus:a})})}function c1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{},s=i$(t,o.defaultCountry),[c,l]=(0,V.useState)(s.country??o.defaultCountry?.toUpperCase()),u=(0,V.useMemo)(()=>Q$(),[]),d=(e,r)=>{let i=e?BQ[e]:void 0;n(typeof t==`object`&&t&&!Array.isArray(t)?{...t,number:r,countryCode:e,callingCode:i?`+${i}`:void 0}:r.trim()?i?`+${i} ${r.trim()}`:r.trim():null)};return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(y_,{children:[(0,H.jsx)(xR,{countries:u,value:c??null,onValueChange:e=>{l(e??void 0),d(e??void 0,s.number)}}),(0,H.jsx)(C_,{"aria-label":e.label,type:`tel`,inputMode:`tel`,autoComplete:`tel`,value:s.number,onChangeText:e=>d(c,e),placeholder:o.placeholder??`Phone number`,autoFocus:a})]})})}function l1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{};return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,multiline:!0,children:(0,H.jsx)(nv,{"aria-label":e.label,value:VQ(t),onChangeText:e=>n(e),placeholder:o.placeholder,autoFocus:a,rows:o.rows??3,maxRows:o.rows&&o.rows>10?o.rows:10})})}function u1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{};return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(dR,{"aria-label":e.label,value:HQ(t),onValueChange:e=>n(e),placeholder:o.placeholder,autoFocus:a,allowOutOfRange:!0,...o.decimals==null?null:{format:{maximumFractionDigits:o.decimals}}})})}function d1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=(e.metadata??{}).decimals;return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsx)(y_,{end:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`%`}),children:(0,H.jsx)(dR,{"aria-label":e.label,value:HQ(t),onValueChange:e=>n(e),autoFocus:a,allowOutOfRange:!0,...o==null?null:{format:{maximumFractionDigits:o}}})})})}function f1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.metadata??{},s=t??{},c=HQ(typeof s==`object`&&s?s.amount:t),l=typeof s==`object`&&s?.currencyCode||o.currencyCode||`USD`,u=(0,V.useMemo)(()=>e1(),[]);return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(y_,{children:[(0,H.jsx)(vR,{currencies:u,value:l,onValueChange:e=>n({amount:c,currencyCode:e??l}),selectedFirst:!0}),(0,H.jsx)(dR,{"aria-label":e.label,value:c,onValueChange:e=>n({amount:e,currencyCode:l}),autoFocus:a,allowOutOfRange:!0,format:{maximumFractionDigits:o.decimals??2}})]})})}function p1({field:e,value:t,onChange:n}){let r=(e.metadata??{}).max??5,i=Math.max(0,Math.min(r,Math.round(HQ(t)??0))),[a,o]=(0,V.useState)(null),s=e=>n(Math.max(0,Math.min(r,e)));return(0,H.jsx)(y,{role:`slider`,tabIndex:0,onKeyDown:e=>{let t=e.key===`ArrowRight`||e.key===`ArrowUp`?i+1:e.key===`ArrowLeft`||e.key===`ArrowDown`?i-1:e.key===`Home`?0:e.key===`End`?r:null;t!=null&&(e.preventDefault?.(),s(t))},"aria-label":e.label,"aria-valuemin":0,"aria-valuemax":r,"aria-valuenow":i,"aria-valuetext":`${i} of ${r}`,items:`center`,height:20,rounded:`$xs`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},onHoverOut:()=>o(null),children:(0,H.jsxs)(y,{position:`relative`,children:[(0,H.jsx)(A$,{value:i,max:r,hover:a}),(0,H.jsx)(y,{position:`absolute`,t:0,l:0,r:0,b:0,children:Array.from({length:r},(e,t)=>t+1).map(e=>(0,H.jsx)(y,{flex:1,cursor:`pointer`,onHoverIn:()=>o(e),onPress:()=>s(e===i?0:e),"data-star":e},e))})]})})}function m1({field:e,value:t,onChange:n}){let r=e.metadata??{},i=t===!0||t===`true`||t===1;return(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(X_,{"aria-label":e.label,checked:i,onCheckedChange:e=>n(e)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,children:i?r.trueLabel??`Yes`:r.falseLabel??`No`})]})}function h1({children:e,...t}){return(0,H.jsx)(W,{variant:`outline`,width:`100%`,justify:`space-between`,endIcon:(0,H.jsx)(Ep,{color:`$hint`}),...t,children:(0,H.jsx)(y,{flex:1,minW:0,items:`center`,gap:`$1`,overflow:`hidden`,children:e})})}var g1=({text:e})=>(0,H.jsx)(U,{fontSize:`$2`,color:`$hush`,numberOfLines:1,children:e}),_1=e=>(0,V.useState)(!!e);function v1(e){let{value:t,onChange:n,autoFocus:r}=e,i=t1(e),[a,o]=_1(r),[s,c]=(0,V.useState)(``),l=VQ(t),u=i.find(e=>e.value===l),d=n1(i,s);return(0,H.jsxs)(jg,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(h1,{"aria-label":i1(e),children:u?(0,H.jsx)(h$,{label:u.label,color:u.color}):(0,H.jsx)(g1,{text:`Select…`})})}),(0,H.jsxs)(Lg,{minW:240,children:[(0,H.jsx)(Jg,{value:s,onValueChange:c,placeholder:`Search options`,"aria-label":`Search ${i1(e)}`}),l?(0,H.jsx)(Vg,{onSelect:()=>n(null),children:`No ${i1(e)}`}):null,(0,H.jsx)(Gg,{value:l||null,onValueChange:e=>n(e??null),children:(0,H.jsx)(Yg,{scrollable:!0,children:d.map(e=>(0,H.jsx)(qg,{value:e.value,children:(0,H.jsx)(h$,{label:e.label,color:e.color})},e.value))})}),d.length===0?(0,H.jsx)(n_,{children:`No options`}):null]})]})}function y1(e){let{value:t,onChange:n,autoFocus:r}=e,i=t1(e),[a,o]=_1(r),[s,c]=(0,V.useState)(``),l=UQ(t).map(VQ).filter(Boolean),u=n1(i,s);return(0,H.jsxs)(jg,{open:a,onOpenChange:e=>{o(e),e||c(``)},children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(h1,{"aria-label":i1(e),children:l.length>0?l.map(e=>{let t=i.find(t=>t.value===e)??{value:e,label:e};return(0,H.jsx)(h$,{label:t.label,color:t.color},e)}):(0,H.jsx)(g1,{text:`Select…`})})}),(0,H.jsxs)(Lg,{minW:240,children:[(0,H.jsx)(Jg,{value:s,onValueChange:c,placeholder:`Search options`,"aria-label":`Search ${i1(e)}`}),(0,H.jsx)(Gg,{multiple:!0,value:l,onValueChange:e=>n(UQ(e).map(VQ)),children:(0,H.jsx)(Yg,{scrollable:!0,children:u.map(e=>(0,H.jsx)(qg,{value:e.value,children:(0,H.jsx)(h$,{label:e.label,color:e.color})},e.value))})}),u.length===0?(0,H.jsx)(n_,{children:`No options`}):null]})]})}function b1(e){let{field:t,value:n,onChange:r,onSubmit:i,onCancel:a,autoFocus:o}=e,s=t1(e),c=(t.metadata??{}).shape??`square`,[l,u]=_1(o),[d,f]=(0,V.useState)(``);if(s.length===0){let e=VQ(typeof n==`object`&&n?n.name??n.id:n);return(0,H.jsx)(r1,{onSubmit:i,onCancel:a,children:(0,H.jsx)(C_,{"aria-label":t.label,value:e,onChangeText:e=>r(e),placeholder:`Related record id…`,autoFocus:o})})}let p=VQ(typeof n==`object`&&n?n.id??n.value:n),m=s.find(e=>e.value===p),h=n1(s,d),g=e=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,minW:0,children:[(0,H.jsx)(Nh,{size:`md`,shape:c,name:e.label,colorSeed:e.value,src:e.avatarUrl??null}),(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,children:e.label})]});return(0,H.jsxs)(jg,{open:l,onOpenChange:e=>{u(e),e||f(``)},children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(h1,{"aria-label":t.label,children:m?g(m):(0,H.jsx)(g1,{text:`Link a record…`})})}),(0,H.jsxs)(Lg,{minW:280,children:[(0,H.jsx)(Jg,{value:d,onValueChange:f,placeholder:`Search records`,"aria-label":`Search ${t.label}`}),p?(0,H.jsx)(Vg,{onSelect:()=>r(null),children:`No ${t.label}`}):null,(0,H.jsx)(Gg,{value:p||null,onValueChange:e=>r(e??null),children:(0,H.jsx)(Yg,{scrollable:!0,children:h.map(e=>(0,H.jsx)(qg,{value:e.value,children:g(e)},e.value))})}),h.length===0?(0,H.jsx)(n_,{children:`No record found`}):null]})]})}var x1=e=>String(e).padStart(2,`0`),S1=e=>{let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r)},C1=e=>`${e.getFullYear()}-${x1(e.getMonth()+1)}-${x1(e.getDate())}`;function w1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=e.type===`dateTime`,[s,c]=_1(a),l=o&&t!=null&&t!==``?new Date(t):null,u=o&&l&&!Number.isNaN(l.getTime())?C1(l):WQ(t),d=l&&!Number.isNaN(l.getTime())?`${x1(l.getHours())}:${x1(l.getMinutes())}`:``,[f,p]=(0,V.useState)(null),m=(e,t=d)=>{if(!e)return n(null);if(!o)return n(e);let r=new Date(`${e}T${/^\d{2}:\d{2}$/.test(t)?t:`00:00`}`);n(Number.isNaN(r.getTime())?null:r.toISOString())},h=u?S1(u).toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`})+(o&&d?` ${d}`:``):``;return(0,H.jsxs)(O_,{open:s,onOpenChange:c,placement:`bottom-start`,children:[(0,H.jsx)(k_,{asChild:!0,children:(0,H.jsxs)(h1,{"aria-label":e.label,children:[(0,H.jsx)(Tp,{size:14,color:`$hint`}),h?(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,children:h}):(0,H.jsx)(g1,{text:`Pick a date…`})]})}),(0,H.jsx)(A_,{size:`sm`,width:280,children:(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(C_,{"aria-label":`${e.label}, as YYYY-MM-DD`,size:`sm`,flex:1,value:f??u,placeholder:`YYYY-MM-DD`,onChangeText:e=>{p(e),/^\d{4}-\d{2}-\d{2}$/.test(e)&&!Number.isNaN(S1(e).getTime())?m(e):e===``&&m(``)},onBlur:()=>p(null)}),o?(0,H.jsx)(C_,{"aria-label":`${e.label}, time`,size:`sm`,width:72,value:d,placeholder:`HH:mm`,onChangeText:e=>{/^\d{2}:\d{2}$/.test(e)&&m(u||C1(new Date),e)}}):null]}),(0,H.jsx)(uC,{mode:`single`,selected:u?S1(u):void 0,defaultMonth:u?S1(u):void 0,onSelect:e=>{m(e?C1(e):``),o||c(!1)}}),u?(0,H.jsx)(W,{size:`xs`,variant:`ghost`,emphasis:`subtle`,onPress:()=>{m(``),c(!1)},children:`Clear`}):null]})})})]})}function T1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=QQ(t),[s,c]=(0,V.useState)(``);return(0,H.jsxs)(z,{gap:`$1`,width:`100%`,minW:0,children:[o.map((e,t)=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,minH:24,children:[(0,H.jsx)(U,{flex:1,minW:0,fontSize:`$2`,color:`$ink`,numberOfLines:1,children:e.label?.trim()||$Q(e.url)}),(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${e.label?.trim()||$Q(e.url)}`,onPress:()=>n(o.filter((e,n)=>n!==t)),children:(0,H.jsx)(Rn,{})})]},`${e.url}-${t}`)),(0,H.jsx)(r1,{onSubmit:()=>{let e=s.trim();if(!e)return r?.();n([...o,{url:e}]),c(``)},onCancel:i,children:(0,H.jsx)(C_,{"aria-label":`Add to ${e.label}`,type:`url`,inputMode:`url`,value:s,onChangeText:c,placeholder:`Add a link`,autoFocus:a})})]})}function E1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=KQ(t),s=(e,t)=>n(!e?.trim()&&!t?.trim()?null:{first:e??``,last:t??``});return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(C_,{"aria-label":`${e.label}, first name`,flex:1,value:o.first??``,placeholder:`First name`,autoFocus:a,onChangeText:e=>{let t=KQ(e);t.last&&!o.last&&e.includes(` `)?s(t.first,t.last):s(e,o.last)}}),(0,H.jsx)(C_,{"aria-label":`${e.label}, last name`,flex:1,value:o.last??``,placeholder:`Last name`,onChangeText:e=>s(o.first,e)})]})})}var D1={street1:`Address 1`,street2:`Address 2`,city:`City`,state:`State`,postcode:`Post code`,country:`Country`};function O1({field:e,value:t,onChange:n,onSubmit:r,onCancel:i,autoFocus:a}){let o=(e.metadata??{}).defaultCountry,s=YQ(t),c=(0,V.useMemo)(()=>Q$().map(e=>({value:e.value,label:e.label})),[]),l=(e,t)=>{let r={...s,[e]:t??void 0};t||delete r[e],n(Object.keys(r).length?r:null)};return(0,H.jsx)(r1,{onSubmit:r,onCancel:i,children:(0,H.jsxs)(z,{gap:`$1`,width:344,maxW:`100%`,children:[[`street1`,`street2`].map((e,t)=>(0,H.jsx)(C_,{"aria-label":D1[e],placeholder:D1[e],value:s[e]??``,autoFocus:a&&t===0,onChangeText:t=>l(e,t)},e)),(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(C_,{"aria-label":D1.city,placeholder:D1.city,flex:1,value:s.city??``,onChangeText:e=>l(`city`,e)}),(0,H.jsx)(C_,{"aria-label":D1.state,placeholder:D1.state,flex:1,value:s.state??``,onChangeText:e=>l(`state`,e)})]}),(0,H.jsxs)(y,{gap:`$1`,children:[(0,H.jsx)(C_,{"aria-label":D1.postcode,placeholder:D1.postcode,flex:1,value:s.postcode??``,onChangeText:e=>l(`postcode`,e)}),(0,H.jsx)(z,{flex:1,minW:0,children:(0,H.jsx)(wR,{"aria-label":D1.country,countries:c,value:(s.country&&/^[A-Za-z]{2}$/.test(s.country)?s.country.toUpperCase():null)??o?.toUpperCase()??null,onValueChange:e=>l(`country`,e)})})]})]})})}function k1({value:e,onChange:t}){let n=UQ(e),r=e=>typeof e==`string`?e:VQ(e?.label??e?.name??`file`);return(0,H.jsxs)(z,{gap:`$2`,children:[typeof document<`u`?(0,H.jsx)(W,{size:`sm`,variant:`outline`,startIcon:(0,H.jsx)(Am,{}),onPress:()=>{if(typeof document>`u`)return;let e=document.createElement(`input`);e.type=`file`,e.multiple=!0,e.onchange=()=>t(e.files?[...n,...Array.from(e.files)]:n),e.click()},self:`flex-start`,children:`Choose files`}):(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`File upload is available on the web.`}),n.length>0?(0,H.jsx)(y,{gap:`$1`,flexWrap:`wrap`,children:n.map((e,i)=>(0,H.jsxs)(y,{items:`center`,gap:`$1`,height:24,pl:`$2`,pr:`$1`,rounded:`$xs`,bg:`$hover`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,numberOfLines:1,maxW:160,children:r(e)}),(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${r(e)}`,onPress:()=>t(n.filter((e,t)=>t!==i)),children:(0,H.jsx)(Rn,{})})]},`${r(e)}-${i}`))}):null]})}function A1(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function j1({field:e,value:t,onChange:n,onCancel:r}){let[i,a]=(0,V.useState)(()=>t==null?``:typeof t==`string`?t:A1(t));return(0,H.jsx)(z,{gap:`$1`,width:400,maxW:`100%`,onKeyDown:e=>e.key===`Escape`&&r?.(),children:(0,H.jsx)(wL,{label:e.label,language:`json`,value:i,minHeight:120,maxHeight:300,onChange:e=>{a(e);let t=$I(e);t.kind===`empty`?n(null):t.kind===`json`&&n(t.value)}})})}var M1=!1;function N1(){M1||(M1=!0,RQ(`text`,{Display:_$,Input:a1}),RQ(`longText`,{Display:v$,Input:l1}),RQ(`richText`,{Display:y$,Input:l1}),RQ(`number`,{Display:D$,Input:u1}),RQ(`percent`,{Display:O$,Input:d1}),RQ(`currency`,{Display:k$,Input:f1}),RQ(`boolean`,{Display:M$,Input:m1}),RQ(`select`,{Display:N$,Input:v1}),RQ(`multiSelect`,{Display:P$,Input:y1}),RQ(`date`,{Display:L$,Input:w1}),RQ(`dateTime`,{Display:R$,Input:w1}),RQ(`email`,{Display:b$,Input:o1}),RQ(`url`,{Display:S$,Input:s1}),RQ(`phone`,{Display:w$,Input:c1}),RQ(`rating`,{Display:j$,Input:p1}),RQ(`links`,{Display:C$,Input:T1}),RQ(`relation`,{Display:B$,Input:b1}),RQ(`json`,{Display:q$,Input:j1}),RQ(`files`,{Display:K$,Input:k1}),RQ(`uuid`,{Display:G$}),RQ(`fullName`,{Display:U$,Input:E1}),RQ(`address`,{Display:W$,Input:O1}),RQ(`position`,{Display:D$}),RQ(`actor`,{Display:H$}))}N1();function P1(e){let t=zQ(e.field.type)?.Display??J$;return(0,H.jsx)(t,{...e})}function F1(e){let t=zQ(e.field.type)?.Input;return t?(0,H.jsx)(t,{...e}):null}function I1(e){return!!zQ(e)?.Input}function L1({trigger:e,children:t,open:n,onOpenChange:r,placement:i=`bottom-start`,width:a=240,maxHeight:o=320,header:s}){return(0,H.jsxs)(O_,{placement:i,open:n,onOpenChange:r,allowFlip:!0,children:[(0,H.jsx)(k_,{asChild:!0,children:e}),(0,H.jsxs)(A_,{size:`sm`,p:0,gap:0,width:a,overflow:`hidden`,children:[s?(0,H.jsx)(z,{p:`$1`,borderBottomWidth:1,borderColor:`$borderColor`,children:s}):null,(0,H.jsx)(Mt,{style:{maxHeight:o},children:(0,H.jsx)(z,{p:`$1`,gap:2,children:t})})]})]})}function R1({children:e,onPress:t,active:n,icon:r,trailing:i,tone:a=`default`}){return(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,onPress:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault?.(),t?.())},cursor:`pointer`,items:`center`,gap:`$2`,minH:32,px:`$2`,rounded:`$xs`,bg:n?`$hover`:`transparent`,hoverStyle:{bg:a===`danger`?`var(--state-error-bg)`:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[r?(0,H.jsx)(y,{items:`center`,justify:`center`,shrink:0,children:r}):null,(0,H.jsx)(z,{flex:1,minW:0,children:typeof e==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:a===`danger`?`$bad`:`$aside`,numberOfLines:1,children:e}):e}),i??null]})}function z1({checked:e,indeterminate:t,onChange:n,size:r=16,label:i}){return(0,H.jsx)(Yh,{size:r>16?`md`:`sm`,variant:`solid`,hoverable:!0,checked:t?`indeterminate`:!!e,onCheckedChange:()=>n?.(t?!0:!e),"aria-label":i??(t?`Select all`:`Select`)})}var B1=e=>e==null?``:String(e),V1=e=>{if(e==null||e===``)return null;if(typeof e==`object`&&!Array.isArray(e)&&`amount`in e)return V1(e.amount);let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)?t:null},H1=e=>Array.isArray(e)?e:e==null?[]:[e],U1=864e5,W1=e=>typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e.trim()),G1=e=>{if(e==null||e===``)return null;let t=(e instanceof Date?e:new Date(e)).getTime();return Number.isNaN(t)?null:t},K1=(e,t)=>(e?.metadata?.options)?.find(e=>e.value===t)?.label??t;function q1(e,t){let n=e?.metadata?.labelField??`name`;if(typeof t==`string`)return t;if(t&&typeof t==`object`){let e=t;return B1(e[n]??e.label??e.name??e.id)}return``}function J1(e,t){switch(e?.type){case`number`:case`percent`:case`rating`:case`position`:return V1(t);case`currency`:{let e=t??{};return V1(typeof e==`object`&&e?e.amount:t)}case`boolean`:return+(t===!0||t===`true`||t===1);case`date`:case`dateTime`:return G1(t);case`select`:return t==null||t===``?null:K1(e,B1(t)).toLowerCase();case`multiSelect`:return H1(t).map(t=>K1(e,B1(t))).join(`, `).toLowerCase()||null;case`relation`:return q1(e,t).toLowerCase()||null;case`links`:return H1(t).map(e=>typeof e==`string`?e:e?.url??``).join(`, `).toLowerCase()||null;case`fullName`:return qQ(t).toLowerCase()||null;case`address`:return ZQ(t).toLowerCase()||null;case`phone`:return o$(i$(t)).toLowerCase()||null;case`email`:return t$(t).join(`, `).toLowerCase()||null;case`actor`:return c$(t)?.name.toLowerCase()||null;case`richText`:return l$(t).toLowerCase()||null;default:{let e=B1(t);return e===``?null:e.toLowerCase()}}}var Y1=(e,t)=>e.find(e=>e.name===t);function X1(e,t){return typeof e==`number`&&typeof t==`number`?e-t:String(e).localeCompare(String(t))}function Z1(e,t,n){return t.length===0?e.slice():e.map((e,t)=>[e,t]).sort(([e,r],[i,a])=>{for(let r of t){let t=Y1(n,r.field),a=J1(t,e[r.field]),o=J1(t,i[r.field]);if(a===null&&o===null)continue;if(a===null)return 1;if(o===null)return-1;let s=X1(a,o);if(s!==0)return r.dir===`asc`?s:-s}return r-a}).map(([e])=>e)}function Q1(e,t){let n=e.length===1&&e[0].field===t?e[0]:void 0;return n?n.dir===`asc`?[{field:t,dir:`desc`}]:[]:[{field:t,dir:`asc`}]}function $1(e,t){return e.find(e=>e.field===t)?.dir}function e0(e){let t=Array.isArray(e)?e:[],n=e=>e==null||e===``?void 0:e;return[n(t[0]),n(t[1])]}function t0(e){return e.op===`isEmpty`||e.op===`isNotEmpty`?!0:e.op===`between`?e0(e.value).some(e=>e!==void 0):e.op===`isAnyOf`?Array.isArray(e.value)&&e.value.length>0:e.value!=null&&e.value!==``}var n0={contains:`contains`,notContains:`does not contain`,is:`is`,isNot:`is not`,gt:`is greater than`,gte:`is at least`,lt:`is less than`,lte:`is at most`,isEmpty:`is empty`,isNotEmpty:`is not empty`,isAnyOf:`is any of`,between:`is between`},r0=[`contains`,`notContains`,`is`,`isNot`,`isEmpty`,`isNotEmpty`],i0=[`is`,`isNot`,`between`,`gt`,`gte`,`lt`,`lte`,`isEmpty`,`isNotEmpty`],a0=[`is`,`isNot`,`isAnyOf`,`isEmpty`,`isNotEmpty`],o0=[`is`];function s0(e){switch(e){case`number`:case`percent`:case`currency`:case`rating`:case`date`:case`dateTime`:return i0;case`select`:case`multiSelect`:case`relation`:return a0;case`boolean`:return o0;default:return r0}}var c0=(e,t)=>t==null||t===``?!0:Array.isArray(t)?t.length===0:e?.type===`currency`&&V1(t?.amount)==null,l0=e=>e===`number`||e===`percent`||e===`currency`||e===`rating`||e===`date`||e===`dateTime`;function u0(e,t){if(e?.type===`multiSelect`)return H1(t).map(B1).filter(e=>e!==``);if(e?.type===`relation`){let e=d0(t);return e?[e]:[]}let n=B1(t);return n===``?[]:[n]}var d0=e=>{if(typeof e==`string`)return e;if(e&&typeof e==`object`){let t=e;return B1(t.id??t.value??``)}return``};function f0(e,t,n){if(n.op===`isEmpty`)return c0(e,t);if(n.op===`isNotEmpty`)return!c0(e,t);let r=e?.type;if(r===`boolean`){let e=t===!0||t===`true`||t===1,r=n.value===!0||n.value===`true`||n.value===1;return n.op===`isNot`?e!==r:e===r}if(r===`select`||r===`multiSelect`||r===`relation`){let r=new Set(u0(e,t));if(n.op===`isAnyOf`){let e=new Set((Array.isArray(n.value)?n.value:[]).map(B1));return e.size===0||[...r].some(t=>e.has(t))}let i=B1(n.value);return n.op===`is`?r.has(i):n.op!==`isNot`||!r.has(i)}if(l0(r)){let i=J1(e,t),a=typeof i==`number`?i:null,o=r===`date`||r===`dateTime`,s=e=>o?G1(e):V1(e);if(n.op===`between`){let[e,t]=e0(n.value),r=e===void 0?null:s(e),i=t===void 0?null:s(t);if(a==null)return!1;let c=i!=null&&o&&W1(t)?i+U1-1:i;return(r==null||a>=r)&&(c==null||a<=c)}let c=s(n.value);if(a==null||c==null)return n.op===`isNot`;switch(n.op){case`is`:return a===c;case`isNot`:return a!==c;case`gt`:return a>c;case`gte`:return a>=c;case`lt`:return a<c;case`lte`:return a<=c;default:return!0}}let i=B1(J1(e,t)),a=B1(n.value).toLowerCase();switch(n.op){case`contains`:return i.includes(a);case`notContains`:return!i.includes(a);case`is`:return i===a;case`isNot`:return i!==a;default:return!0}}function p0(e,t,n,r=`and`){let i=t.filter(t0);if(i.length===0)return e.slice();let a=e=>t=>f0(Y1(n,t.field),e[t.field],t);return e.filter(e=>r===`or`?i.some(a(e)):i.every(a(e)))}function m0(e,t,n){let r=t.trim().toLowerCase();return r?e.filter(e=>n.some(t=>{let n=J1(t,e[t.name]);return n!=null&&String(n).toLowerCase().includes(r)})):e.slice()}function h0(e,t,n){let r=e.length,i=Math.max(1,Math.ceil(r/n)),a=Math.min(Math.max(1,t),i),o=(a-1)*n,s=e.slice(o,o+n);return{items:s,page:a,pageCount:i,total:r,from:r===0?0:o+1,to:o+s.length}}function g0(e,t,n){let r=e.filter(e=>!n?.has(e.name));if(!t||t.length===0)return r;let i=new Map(r.map(e=>[e.name,e])),a=[];for(let e of t){let t=i.get(e);t&&(a.push(t),i.delete(e))}for(let e of r)i.has(e.name)&&a.push(e);return a}var _0=new Set([`boolean`,`select`,`multiSelect`,`date`,`dateTime`,`relation`,`rating`,`files`]),v0=80,y0={regular:{row:44,pad:12,select:44},compact:{row:32,pad:8,select:28}};function b0(e){let{fields:t,records:n,getRowKey:r,loading:i,empty:a=`No records yet.`,sorts:o=[],onSortChange:s,onOpen:c,selectable:l,onSelectionChange:u,bulkActions:d,editable:f,onEditCommit:p,fieldOptions:m,columnOrder:h,onColumnOrderChange:g,hiddenFields:_,pageSize:v=25,remote:b}=e,x=y0[st()],S=e.rowHeight??x.row,C=x.select,w=(0,V.useMemo)(()=>new Set(_??[]),[_]),[T,E]=(0,V.useState)(h);(0,V.useEffect)(()=>{h&&E(h)},[h]);let D=(0,V.useMemo)(()=>g0(t,T,w),[t,T,w]),[O,k]=(0,V.useState)({}),[ee,A]=(0,V.useState)(new Set),[j,M]=(0,V.useState)(null),[N,P]=(0,V.useState)(void 0),[te,F]=(0,V.useState)(null),[I,ne]=(0,V.useState)(1),re=(0,V.useCallback)((e,t)=>r?r(e,t):e.id==null?String(t):String(e.id),[r]),ie=(0,V.useMemo)(()=>{if(b){let e=v>0?v:Math.max(1,n.length),t=b.total===0||n.length===0?0:(b.page-1)*e+1;return{items:n,page:b.page,pageCount:Math.max(1,Math.ceil(b.total/e)),total:b.total,from:t,to:t===0?0:t+n.length-1}}return v>0?h0(n,I,v):{items:n,page:1,pageCount:1,total:n.length,from:+!!n.length,to:n.length}},[n,I,v,b]);(0,V.useEffect)(()=>{!b&&I>ie.pageCount&&ne(ie.pageCount)},[b,I,ie.pageCount]);let L=e=>{let t=Math.min(Math.max(1,e),ie.pageCount);b?b.onPage(t):ne(t)},ae=(0,V.useCallback)(e=>{A(e),u?.([...e])},[u]),oe=ie.items.map((e,t)=>re(e,t)),R=oe.length>0&&oe.every(e=>ee.has(e)),se=oe.some(e=>ee.has(e)),ce=()=>{let e=new Set(ee);R?oe.forEach(t=>e.delete(t)):oe.forEach(t=>e.add(t)),ae(e)},le=e=>{let t=new Set(ee);t.has(e)?t.delete(e):t.add(e),ae(t)},ue=e=>s?.(Q1(o,e)),de=(0,V.useRef)([]),[fe,pe]=(0,V.useState)(null),me=(e,t)=>n=>{let r=n.clientX??n.nativeEvent?.clientX??0,i=t?.getBoundingClientRect().width??v0,a=t=>k(n=>({...n,[e]:Math.max(v0,i+(t.clientX-r))})),o=()=>{window.removeEventListener(`pointermove`,a),window.removeEventListener(`pointerup`,o)};window.addEventListener(`pointermove`,a),window.addEventListener(`pointerup`,o)},he=e=>t=>{if(!g&&h)return;let n=de.current.map(e=>e?.getBoundingClientRect()??null),r=t.clientX??t.nativeEvent?.clientX??0;pe({from:e,x:r,target:e});let i=t=>{let r=n.length-1;for(let e=0;e<n.length;e++){let i=n[e];if(i&&t.clientX<i.left+i.width/2){r=e;break}}pe({from:e,x:t.clientX,target:r})},a=()=>{window.removeEventListener(`pointermove`,i),window.removeEventListener(`pointerup`,a),pe(e=>{if(e&&e.target!==e.from){let t=D.map(e=>e.name),[n]=t.splice(e.from,1);t.splice(e.target,0,n),E(t),g?.(t)}return null})};window.addEventListener(`pointermove`,i),window.addEventListener(`pointerup`,a)},ge=(e,t,n)=>{f&&!t.readOnly&&I1(t.type)&&(M({key:e,field:t.name}),P(n))},_e=()=>{M(null),P(void 0)},ve=(0,V.useCallback)(async(e,t,n)=>{let r=`${j?.key}:${t.name}`;if(M(null),P(void 0),p)try{F(r),await p(e,t,n)}finally{F(null)}},[j,p]),ye=!f&&!!c,be=(l?C:0)+D.reduce((e,t)=>e+(O[t.name]??t.width??160),0),xe=e=>{let t=O[e.name]??e.width;return t?{width:t}:{flex:1,minW:140}},Se={borderBottomWidth:1,borderColor:`$borderColor`};return(0,H.jsxs)(z,{"data-slot":`data-table`,rounded:`$3`,overflow:`hidden`,borderWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[l&&ee.size>0?(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:x.pad,py:`$2`,bg:`$panel`,...Se,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:`${ee.size} selected`}),(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[d?.([...ee]),(0,H.jsx)(W,{size:`xs`,variant:`ghost`,emphasis:`subtle`,onPress:()=>ae(new Set),children:`Clear`})]})]}):null,(0,H.jsxs)(z,{role:`table`,"aria-rowcount":ie.total+1,style:{minWidth:be},children:[(0,H.jsxs)(y,{bg:`$panel`,minH:S,...Se,role:`row`,children:[l?(0,H.jsx)(y,{width:C,items:`center`,justify:`center`,shrink:0,role:`columnheader`,children:(0,H.jsx)(z1,{checked:R,indeterminate:!R&&se,onChange:ce,label:`Select all rows`})}):null,D.map((e,t)=>{let n=$1(o,e.name),r=fe&&fe.target===t&&fe.from!==t;return(0,H.jsxs)(y,{...xe(e),role:`columnheader`,"aria-sort":n===`asc`?`ascending`:n===`desc`?`descending`:void 0,items:`center`,gap:`$1`,px:x.pad,borderLeftWidth:r?2:0,borderLeftColor:`var(--primary)`,opacity:fe?.from===t?.5:1,ref:e=>{de.current[t]=e},style:{position:`relative`},children:[(0,H.jsxs)(y,{items:`center`,gap:`$1`,flex:1,minW:0,cursor:`pointer`,onPress:()=>ue(e.name),onPointerDown:he(t),children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,numberOfLines:1,color:`$aside`,children:e.label}),n===`asc`?(0,H.jsx)(vp,{size:12,color:`$hint`}):n===`desc`?(0,H.jsx)(hp,{size:12,color:`$hint`}):s?(0,H.jsx)(kp,{size:12,color:`$hush`}):null]}),(0,H.jsx)(z,{width:8,height:`100%`,cursor:`col-resize`,onPointerDown:me(e.name,de.current[t]),style:{position:`absolute`,right:-4,top:0,zIndex:2}})]},e.name)})]}),i?(0,H.jsx)(y,{role:`row`,children:(0,H.jsxs)(y,{flex:1,px:`$4`,py:`$6`,items:`center`,justify:`center`,gap:`$2`,role:`cell`,"aria-live":`polite`,children:[(0,H.jsx)(ap,{size:`small`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`Loading…`})]})}):ie.items.length===0?(0,H.jsx)(y,{role:`row`,children:(0,H.jsx)(z,{flex:1,px:`$4`,py:`$7`,items:`center`,gap:`$1`,role:`cell`,children:typeof a==`string`?(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:a}):a})}):ie.items.map((e,t)=>{let n=re(e,t),r=ee.has(n);return(0,H.jsxs)(y,{group:!0,role:`row`,"aria-selected":l?r:void 0,items:`stretch`,cursor:ye?`pointer`:void 0,onPress:ye?()=>c?.(e):void 0,bg:r?`$hover`:`transparent`,hoverStyle:{bg:`$hover`},minH:S,...Se,children:[l?(0,H.jsx)(y,{width:C,items:`center`,justify:`center`,shrink:0,role:`cell`,children:(0,H.jsx)(z1,{checked:r,onChange:()=>le(n),label:`Select row ${ie.from+t}`})}):null,D.map((t,r)=>{let i=f&&j?.key===n&&j.field===t.name,a=f&&!t.readOnly&&I1(t.type),o=`${n}:${t.name}`,s=m?.(t)?{...t,metadata:{...t.metadata,options:m(t)}}:t;return(0,H.jsxs)(y,{...xe(t),role:`cell`,items:`center`,px:x.pad,minW:0,style:{position:`relative`},children:[i?(0,H.jsx)(z,{flex:1,minW:0,py:`$1`,onPress:e=>e.stopPropagation?.(),children:(0,H.jsx)(F1,{field:s,value:N,autoFocus:!0,onChange:n=>_0.has(t.type)?void ve(e,t,n):P(n),onSubmit:()=>void ve(e,t,N),onCancel:_e})}):(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:`$1`,minH:S-8,cursor:a?`text`:void 0,onPress:a?()=>ge(n,t,e[t.name]):void 0,hoverStyle:a?{bg:`$raised`}:void 0,rounded:`$xs`,px:a?`$1`:0,mx:a?-4:0,overflow:`hidden`,children:[(0,H.jsx)(P1,{field:t,value:e[t.name]}),te===o?(0,H.jsx)(ap,{size:`small`,"aria-hidden":!0}):null]}),r===0&&c&&f&&!i?(0,H.jsx)(y,{position:`absolute`,r:x.pad/2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:(0,H.jsx)(Lm,{framed:!0,size:`icon-2xs`,variant:`ghost`,children:(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Open record`,onPress:()=>c(e),children:(0,H.jsx)(tee,{})})})}):null]},t.name)})]},n)})]}),!i&&v>0&&ie.total>0?(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:x.pad,py:`$1`,bg:`$panel`,borderTopWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:`${ie.from.toLocaleString()}–${ie.to.toLocaleString()} of ${ie.total.toLocaleString()}`}),(0,H.jsxs)(y,{items:`center`,gap:`$1`,children:[(0,H.jsx)(W,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Previous page`,disabled:ie.page<=1,onPress:()=>L(ie.page-1),children:(0,H.jsx)(Dp,{})}),(0,H.jsx)(U,{fontSize:`$1`,px:`$1`,color:`$hint`,children:`${ie.page.toLocaleString()} / ${ie.pageCount.toLocaleString()}`}),(0,H.jsx)(W,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Next page`,disabled:ie.page>=ie.pageCount,onPress:()=>L(ie.page+1),children:(0,H.jsx)(rt,{})})]})]}):null]})}var x0=`red.ruby.crimson.tomato.orange.amber.yellow.lime.grass.green.jade.mint.teal.cyan.sky.blue.iris.violet.purple.plum.pink.bronze.gold.brown.gray.mauve.olive.sage.sand.slate`.split(`.`),S0=e=>({bg:`var(--data-${e}-3)`,fg:`var(--data-${e}-11)`,border:`var(--data-${e}-6)`});Object.fromEntries(x0.map(e=>[e,S0(e)]));var C0={text:`#f4f4f5`,textMuted:`#a1a1aa`,textFaint:`#71717a`,surface:`#09090b`,surfaceRaised:`#0a0a0a`,border:`#27272a`,hover:`#18181b`,accent:`#60a5fa`,danger:`#fca5a5`},w0=M(z,{name:`Card`,backgroundColor:`$background`,position:`relative`,borderRadius:`$true`}),T0={header:32,check:24,value:156,icon:16,rows:2};function E0(e){return st()===`compact`?(0,H.jsx)(k0,{...e}):(0,H.jsx)(A0,{...e})}var D0=(e,t,n)=>{let r=e??t[0]?.name,i=r==null?void 0:n[r];return{name:r,text:i==null||i===``?`Untitled`:String(i)}},O0=e=>{let t=e?.target;return!!(t instanceof Element&&t.closest(`button, a, [role="button"], [role="checkbox"], [role="link"]`))};function k0({titleField:e,fields:t,record:n,onPress:r,selected:i=!1,onSelectedChange:a,active:o=!1,fieldIcons:s,imageField:c,drag:l}){let[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1),m=D0(e,t,n),h=t.filter(e=>e.name!==m.name&&e.name!==c),g=n.id==null?m.text:String(n.id),_=c?n[c]:void 0,v=r?()=>r(n):void 0,b=a&&(u||i);return(0,H.jsxs)(z,{"data-slot":`record-card`,"data-selected":i?``:void 0,"data-active":o?``:void 0,bg:i||o||f?`$hover`:`$panel`,borderWidth:1,borderColor:o?`$rim`:`$borderColor`,hoverStyle:{borderColor:`$rim`},rounded:`$xs`,overflow:`hidden`,cursor:v?`pointer`:void 0,opacity:l===`source`?.3:1,scale:l===`preview`?1.02:1,onHoverIn:()=>d(!0),onHoverOut:()=>d(!1),onFocus:()=>p(!0),onBlur:()=>p(!1),onPress:v?e=>O0(e)?void 0:v():void 0,children:[(0,H.jsxs)(y,{"data-slot":`record-card-header`,minH:T0.header,items:`center`,pt:`$2`,pr:`$2`,pb:`$1`,pl:`$2`,children:[(0,H.jsx)(y,{flex:1,minW:0,children:(0,H.jsx)(QL,{size:`sm`,weight:`medium`,label:m.text,startElement:(0,H.jsx)(Nh,{size:`sm`,shape:`rounded`,name:m.text,colorSeed:g,src:_??null}),...v?{onPress:v}:null})}),a?(0,H.jsx)(y,{"data-slot":`record-card-check`,height:20,width:b?T0.check:0,$touchable:{width:T0.check},overflow:`hidden`,justify:`flex-end`,items:`center`,shrink:0,style:{transition:`width 160ms var(--ease-out, ease)`},children:(0,H.jsx)(Yh,{variant:`outline`,checked:i,onCheckedChange:e=>a(e===!0),"aria-label":`Select ${m.text}`})}):null]}),h.length?(0,H.jsx)(z,{"data-slot":`record-card-body`,gap:T0.rows,pt:0,pr:`$2`,pb:`$2`,pl:10,children:h.map(e=>(0,H.jsxs)(y,{items:`center`,gap:`$2`,minH:24,children:[s?.[e.name]?(0,H.jsx)(y,{width:T0.icon,height:T0.icon,items:`center`,justify:`center`,shrink:0,children:s[e.name]}):(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,numberOfLines:1,shrink:0,children:e.label}),(0,H.jsx)(z,{flex:1,minW:0,maxW:T0.value,children:(0,H.jsx)(P1,{field:e,value:n[e.name]})})]},e.name))}):null]})}function A0({titleField:e,fields:t,record:n,onPress:r}){let i=D0(e,t,n),a=t.filter(e=>e.name!==i.name);return(0,H.jsxs)(w0,{p:12,gap:8,borderWidth:1,rounded:8,cursor:r?`pointer`:void 0,hoverStyle:r?{bg:C0.hover}:void 0,onPress:r?()=>r(n):void 0,style:{backgroundColor:C0.surface,borderColor:C0.border},children:[(0,H.jsx)(U,{fontSize:14,fontWeight:`700`,numberOfLines:1,style:{color:C0.text},children:i.text}),a.map(e=>(0,H.jsxs)(y,{gap:8,items:`center`,children:[(0,H.jsx)(U,{fontSize:11,numberOfLines:1,width:84,style:{color:C0.textFaint},children:e.label}),(0,H.jsx)(z,{flex:1,children:(0,H.jsx)(P1,{field:e,value:n[e.name]})})]},e.name))]})}var j0=e=>e==null?``:String(e),M0=new Set([`select`,`boolean`,`relation`]);function N0(e){return e.filter(e=>M0.has(e.type))}function P0(e){let t=e.filter(e=>e.type===`select`);return t.length>0?t[0].name:N0(e)[0]?.name}function F0(e,t){if(e.type===`boolean`)return t==null||t===``?``:t===!0||t===`true`||t===1?`true`:`false`;if(e.type===`relation`){if(t&&typeof t==`object`){let e=t;return j0(e.id??e.value??``)}return j0(t)}return j0(t)}function I0(e){if(e.type===`boolean`){let t=e.metadata??{};return[{key:`true`,label:t.trueLabel??`Yes`,color:`green`},{key:`false`,label:t.falseLabel??`No`,color:`gray`}]}return(e.metadata?.options??[]).map(e=>({key:e.value,label:e.label,color:e.color}))}function L0(e,t,n={}){let r=n.includeEmpty??!0,i=I0(t),a=[],o=new Map,s=new Map,c=(e,t,n)=>{s.has(e)||(s.set(e,[]),a.push(e),o.set(e,{label:t,color:n}))};r&&c(``,n.emptyLabel??`No ${t.label.toLowerCase()}`);for(let e of i)c(e.key,e.label,e.color);for(let i of e){let e=F0(t,i[t.name]);(e!==``||r)&&(s.has(e)||c(e,e||(n.emptyLabel??`No ${t.label.toLowerCase()}`)),s.get(e).push(i))}return a.filter(e=>!(e===``&&(s.get(e)?.length??0)===0&&i.length>0)).map(e=>({key:e,...o.get(e),records:s.get(e)??[]}))}function R0(e,t){return e.type===`boolean`?{[e.name]:t===`true`}:{[e.name]:t===``?null:t}}var z0=300,B0=200;function V0(e){let{fields:t,records:n,groupField:r,titleField:i,cardFields:a,onOpen:o,onRecordChange:s,onCreate:c,getRowKey:l}=e,{selectedIds:u,onSelectedChange:d,activeId:f,fieldIcons:p}=e,m=e=>l?l(e):String(e.id??``),h=st()===`compact`,g=h?B0:z0,_=(e,t)=>h?{selected:u?.has(m(e))??!1,onSelectedChange:d?t=>d(e,t):void 0,active:f!=null&&f===m(e),fieldIcons:p,drag:t}:null,v=t.find(e=>e.name===r),[b,x]=(0,V.useState)({});(0,V.useEffect)(()=>{x({})},[n]);let S=(0,V.useRef)(null),C=(0,V.useRef)([]),[w,T]=(0,V.useState)(null),E=(0,V.useMemo)(()=>v?n.map(e=>b[m(e)]==null?e:{...e,[v.name]:b[m(e)]===``?null:b[m(e)]}):n,[n,b,v]),D=(0,V.useMemo)(()=>v?L0(E,v):[],[E,v]);if(!v)return h?(0,H.jsx)(z,{p:`$5`,items:`center`,borderWidth:1,rounded:`$xs`,borderColor:`$borderColor`,bg:`$panel`,children:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`Pick a select or status field to group the board by.`})}):(0,H.jsx)(z,{p:24,items:`center`,borderWidth:1,rounded:10,style:{borderColor:C0.border,backgroundColor:C0.surface},children:(0,H.jsx)(U,{style:{color:C0.textFaint},children:`Pick a select or status field to group the board by.`})});let O=e=>t=>{if(!s)return;let n=m(e),r=F0(v,e[v.name]),i=C.current.map(e=>e?.getBoundingClientRect()??null),a=t.clientX??t.nativeEvent?.clientX??0,o=t.clientY??t.nativeEvent?.clientY??0;T({id:n,from:r,x:a,y:o,target:r});let c=e=>{let t=r;for(let n=0;n<i.length;n++){let a=i[n];if(a&&e.clientX>=a.left&&e.clientX<=a.right){t=D[n]?.key??r;break}}T({id:n,from:r,x:e.clientX,y:e.clientY,target:t})},l=()=>{window.removeEventListener(`pointermove`,c),window.removeEventListener(`pointerup`,l),T(t=>(t&&t.target!==t.from&&(x(e=>({...e,[t.id]:t.target})),Promise.resolve(s(e,R0(v,t.target))).catch(()=>x(e=>{let n={...e};return delete n[t.id],n}))),null))};window.addEventListener(`pointermove`,c),window.addEventListener(`pointerup`,l)},k=w?E.find(e=>m(e)===w.id):void 0,ee=()=>S.current?.getBoundingClientRect();return(0,H.jsxs)(z,{ref:e=>{S.current=e},style:{position:`relative`},children:[(0,H.jsx)(Mt,{horizontal:!0,showsHorizontalScrollIndicator:!1,children:(0,H.jsx)(y,{gap:h?8:12,py:2,items:`flex-start`,children:D.map((e,n)=>{let r=w&&w.target===e.key&&w.from!==e.key,l=h?{gap:8,p:4,rounded:`$xs`,bg:r?`$hover`:`transparent`}:{gap:8,p:8,rounded:12,style:{backgroundColor:C0.surfaceRaised,borderWidth:1,borderColor:r?C0.accent:C0.border}};return(0,H.jsxs)(z,{"data-slot":`board-column`,width:g,ref:e=>{C.current[n]=e},...l,children:[h?(0,H.jsxs)(y,{items:`center`,justify:`space-between`,minH:24,px:4,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,minW:0,children:[e.key===``?(0,H.jsx)(YL,{variant:`outline`,borderStyle:`dashed`,color:`transparent`,children:e.label}):(0,H.jsx)(YL,{color:e.color??`gray`,children:e.label}),(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:e.records.length})]}),c?(0,H.jsx)(W,{size:`icon-xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Add to ${e.label}`,onPress:()=>c(e.key),children:(0,H.jsx)(hm,{})}):null]}):(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:4,py:2,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[e.key===``?(0,H.jsx)(U,{fontSize:13,fontWeight:`700`,style:{color:C0.textMuted},children:e.label}):(0,H.jsx)(h$,{label:e.label,color:e.color}),(0,H.jsx)(U,{fontSize:12,style:{color:C0.textFaint},children:e.records.length})]}),c?(0,H.jsx)(z,{cursor:`pointer`,p:3,rounded:6,hoverStyle:{bg:C0.hover},onPress:()=>c(e.key),children:(0,H.jsx)(hm,{size:14,color:C0.textMuted})}):null]}),(0,H.jsxs)(z,{gap:8,style:{minHeight:40},children:[e.records.map(e=>{let n=w?.id===m(e);return(0,H.jsx)(z,{onPointerDown:O(e),style:{opacity:n&&!h?.35:1,cursor:s?`grab`:void 0},children:(0,H.jsx)(E0,{titleField:i,fields:a??t.filter(e=>e.name!==v.name),record:e,onPress:o,..._(e,n?`source`:void 0)})},m(e))}),e.records.length===0?h?(0,H.jsx)(z,{items:`center`,justify:`center`,py:`$4`,rounded:`$xs`,borderWidth:1,borderStyle:`dashed`,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$1`,color:`$hint`,children:`Drop here`})}):(0,H.jsx)(z,{items:`center`,justify:`center`,py:16,rounded:8,style:{borderWidth:1,borderColor:C0.border,borderStyle:`dashed`},children:(0,H.jsx)(U,{fontSize:12,style:{color:C0.textFaint},children:`Drop here`})}):null]})]},e.key||`∅`)})})}),w&&k?(0,H.jsx)(z,{width:g-(h?8:20),style:{position:`absolute`,left:w.x-(ee()?.left??0)-(g-(h?8:20))/2,top:w.y-(ee()?.top??0)-20,pointerEvents:`none`,zIndex:50,...h?null:{transform:[{rotate:`2deg`}],boxShadow:`0 12px 32px rgba(0,0,0,0.4)`}},...h?{className:`elevation-2`}:null,children:(0,H.jsx)(E0,{titleField:i,fields:a??t.filter(e=>e.name!==v.name),record:k,..._(k,`preview`)})}):null]})}var H0=new Set([`boolean`,`select`,`multiSelect`,`date`,`dateTime`,`relation`,`rating`,`files`]),U0=({children:e})=>(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`500`,color:`$hint`,numberOfLines:1,children:e});function W0({field:e,value:t,editable:n,onCommit:r,options:i}){let[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(t),l=n&&!e.readOnly&&I1(e.type)&&!!r,u=i?{...e,metadata:{...e.metadata,options:i}}:e,d=e=>{o(!1),r?.(e)};return(0,H.jsxs)(z,{gap:`$1`,py:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U0,{children:e.label}),a?(0,H.jsx)(F1,{field:u,value:s,autoFocus:!0,onChange:t=>H0.has(e.type)?d(t):c(t),onSubmit:()=>d(s),onCancel:()=>{c(t),o(!1)}}):(0,H.jsx)(y,{items:`center`,minH:24,minW:0,cursor:l?`text`:void 0,rounded:`$xs`,px:l?`$1`:0,mx:l?-4:0,hoverStyle:l?{bg:`$hover`}:void 0,...l?{role:`button`,tabIndex:0,"aria-label":`Edit ${e.label}`}:null,onKeyDown:l?e=>{e.key===`Enter`&&(e.preventDefault?.(),c(t),o(!0))}:void 0,onPress:l?()=>{c(t),o(!0)}:void 0,children:(0,H.jsx)(P1,{field:e,value:t})})]})}function G0({fields:e,record:t,title:n,editable:r,onEditCommit:i,fieldOptions:a,related:o}){return(0,H.jsxs)(z,{gap:2,children:[n?(0,H.jsx)(z,{pb:`$3`,mb:`$1`,borderBottomWidth:1,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$7`,fontWeight:`600`,numberOfLines:2,color:`$ink`,children:n})}):null,e.map(e=>(0,H.jsx)(W0,{field:e,value:t[e.name],editable:r,onCommit:i?t=>i(e,t):void 0,options:a?.(e)},e.name)),o?(0,H.jsx)(z,{pt:`$4`,gap:`$2`,children:o}):null]})}function K0(e,t=`default`,n=e===`board`?`Board`:`All records`){return{id:t,name:n,kind:e,filters:[],sorts:[]}}function q0(e,t,n){let r=e;return t.search&&t.search.trim()&&(r=m0(r,t.search,n)),r=p0(r,t.filters,n,t.match),r=Z1(r,t.sorts,n),r}function J0(e){let t=s0(e.type);return{field:e.name,op:t[0]??`contains`}}function Y0(e,t){return{...e,filters:[...e.filters,t]}}function X0(e,t,n){return{...e,filters:e.filters.map((e,r)=>r===t?{...e,...n}:e)}}function Z0(e,t){return{...e,filters:e.filters.filter((e,n)=>n!==t)}}function Q0(e,t){return{...e,match:t}}var $0=e=>e===`or`?`and`:`or`;function e2(e,t){return{...e,sorts:t}}function t2(e,t){return{...e,search:t}}function n2(e,t){return{...e,kind:t}}function r2(e,t){return{...e,groupField:t}}function i2(e,t){let n=new Set(e.hiddenFields??[]);return n.has(t)?n.delete(t):n.add(t),{...e,hiddenFields:[...n]}}var a2=new Set([`text`,`longText`,`email`,`url`]),o2=new Set([`contains`,`notContains`,`is`,`isNot`]);function s2(e,t,n){let r=e.type===`currency`||e.type===`percent`||e.type===`rating`,i=o2.has(t.op)&&!a2.has(e.type)&&e.type!==`select`&&e.type!==`multiSelect`&&e.type!==`relation`&&e.type!==`boolean`&&!r&&e.type!==`date`&&e.type!==`dateTime`&&e.type!==`number`,a=t.op===`isAnyOf`?{...e,type:`multiSelect`}:r?{...e,type:`number`}:i?{...e,type:`text`,metadata:void 0}:e;return n?{...a,metadata:{...a.metadata,options:n}}:a}function c2(e,t){let n=t?.metadata?.options,r=e=>n?.find(t=>t.value===e)?.label??String(e);if(e.op===`between`){let[t,n]=e0(e.value);return t!==void 0&&n!==void 0?`${r(t)} to ${r(n)}`:t===void 0?n===void 0?``:`to ${r(n)}`:`from ${r(t)}`}return e.value==null||e.value===``?``:Array.isArray(e.value)?e.value.map(r).join(`, `):r(e.value)}var l2=e=>e.op!==`isEmpty`&&e.op!==`isNotEmpty`;function u2({field:e,rule:t,onChange:n,fieldOptions:r}){let i=r?.(e),a=(0,V.useMemo)(()=>s2(e,t,i),[e,t,i]);if(t.op!==`between`)return(0,H.jsx)(F1,{field:a,value:t.value,onChange:n});let[o,s]=e0(t.value);return(0,H.jsxs)(y,{items:`center`,gap:6,flex:1,children:[(0,H.jsx)(y,{flex:1,minW:90,"aria-label":`From`,children:(0,H.jsx)(F1,{field:a,value:o,onChange:e=>n([e,s])})}),(0,H.jsx)(U,{fontSize:12,style:{color:C0.textFaint},children:`to`}),(0,H.jsx)(y,{flex:1,minW:90,"aria-label":`To`,children:(0,H.jsx)(F1,{field:a,value:s,onChange:e=>n([o,e])})})]})}var d2={top:39,details:32,chip:24,remove:20,name:130,menu:200,wide:240},f2=(e,t)=>e.find(e=>e.name===t),p2=(e,t)=>e.filter(e=>e.label.toLowerCase().includes(t.trim().toLowerCase()));function m2({open:e,icon:t,children:n,...r}){return(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,startIcon:t,bg:e?`$hover`:void 0,...r,children:n})}function h2(e){let{fields:t,view:n,onView:r,extra:i,onCreate:a,createLabel:o=`New`,boardDisabled:s}=e,{savedViews:c,dirty:l=!1,onResetView:u,onSaveView:d,onSaveAsView:f}=e,[p,m]=(0,V.useState)(!1),h=n.sorts.length>0||n.filters.length>0||l&&(u||d);return(0,H.jsxs)(z,{"data-slot":`view-bar`,children:[(0,H.jsxs)(y,{"data-slot":`view-bar-top`,minH:d2.top+1,items:`center`,justify:`space-between`,gap:`$2`,ml:`$1`,pr:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(g2,{...e}),(0,H.jsxs)(y,{items:`center`,gap:`$0.5`,shrink:1,minW:0,children:[(0,H.jsx)(y_,{size:`xs`,start:(0,H.jsx)(_m,{size:14}),width:180,shrink:1,children:(0,H.jsx)(C_,{value:n.search??``,onChangeText:e=>r(t2(n,e)),placeholder:`Search…`,"aria-label":`Search records`})}),(0,H.jsx)(_2,{fields:t,view:n,onView:r,open:p,onOpenChange:m,children:(0,H.jsx)(m2,{open:p,icon:(0,H.jsx)(im,{}),children:`Filter`})}),(0,H.jsx)(y2,{fields:t,view:n,onView:r}),(0,H.jsx)(b2,{fields:t,view:n,onView:r,boardDisabled:s}),i,a?(0,H.jsx)(W,{size:`xs`,variant:`primary`,startIcon:(0,H.jsx)(hm,{}),onPress:a,children:o}):null]})]}),h?(0,H.jsxs)(y,{"data-slot":`view-bar-details`,minH:d2.details,items:`center`,gap:`$2`,py:`$1`,px:`$2`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[n.sorts.map(e=>(0,H.jsx)(C2,{rule:e,fields:t,view:n,onView:r},`sort-${e.field}`)),n.sorts.length>0&&n.filters.length>0?(0,H.jsx)(z,{"data-slot":`view-bar-rule`,width:1,height:16,bg:`$raised`}):null,n.filters.map((t,i)=>(0,H.jsxs)(V.Fragment,{children:[i>0?(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,"aria-label":`Rules combine by ${n.match===`or`?`or`:`and`}; press for ${$0(n.match)}`,onPress:()=>r(Q0(n,$0(n.match))),children:n.match===`or`?`or`:`and`}):null,(0,H.jsx)(w2,{index:i,rule:t,...e})]},`filter-${i}`)),(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,startIcon:(0,H.jsx)(hm,{}),onPress:()=>m(!0),children:`Add filter`}),(0,H.jsx)(y,{flex:1}),l&&u?(0,H.jsx)(W,{size:`xs`,variant:`ghost`,color:`$aside`,fontWeight:`400`,onPress:u,children:`Reset`}):null,l&&d?(0,H.jsxs)(Lm,{size:`xs`,variant:`outline`,"aria-label":`Update view`,children:[(0,H.jsx)(W,{onPress:d,children:`Update view`}),f?(0,H.jsxs)(jg,{children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(W,{size:`icon-xs`,"aria-label":`More ways to save the view`,children:(0,H.jsx)(Ep,{})})}),(0,H.jsx)(Lg,{align:`end`,minW:d2.menu,children:(0,H.jsx)(Vg,{onSelect:f,children:`Save as new view`})})]}):null]}):null]}):null]})}function g2({view:e,onView:t,count:n,savedViews:r,boardDisabled:i}){let[a,o]=(0,V.useState)(!1),s=e.kind===`board`?nm:Dm;return(0,H.jsxs)(jg,{open:a,onOpenChange:o,children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsxs)(W,{size:`xs`,variant:`ghost`,color:`$aside`,pl:`$1`,startIcon:(0,H.jsx)(s,{size:16}),endIcon:(0,H.jsx)(Ep,{size:14,color:`$hush`}),bg:a?`$hover`:void 0,"aria-label":`View: ${e.name}`,children:[(0,H.jsx)(GL,{text:e.name,maxW:d2.name,fontSize:`$2`,fontWeight:`500`,color:`$aside`}),n==null?null:(0,H.jsx)(U,{fontSize:`$2`,color:`$hint`,children:`· ${n}`})]})}),(0,H.jsxs)(Lg,{minW:d2.menu,children:[r&&r.views.length?(0,H.jsx)(Gg,{value:r.activeId??e.id,onValueChange:e=>{let n=r?.views.find(t=>t.id===e);n&&r&&(r.onSelect(n.id),t(n))},children:(0,H.jsx)(Yg,{label:`Views`,children:r.views.map(e=>(0,H.jsx)(qg,{value:e.id,children:e.name},e.id))})}):null,i?null:(0,H.jsxs)(Gg,{value:e.kind,onValueChange:n=>n===`table`||n===`board`?t(n2(e,n)):void 0,children:[(0,H.jsx)(i_,{variant:`band`,children:`Layout`}),(0,H.jsx)(qg,{value:`table`,children:`Table`}),(0,H.jsx)(qg,{value:`board`,children:`Board`})]})]})]})}function _2({fields:e,view:t,onView:n,open:r,onOpenChange:i,children:a}){let[o,s]=(0,V.useState)(``),c=p2(e,o);return(0,H.jsxs)(jg,{open:r,onOpenChange:e=>{i(e),e||s(``)},children:[(0,H.jsx)(Ng,{asChild:!0,children:a}),(0,H.jsxs)(Lg,{minW:d2.menu,children:[(0,H.jsx)(Jg,{value:o,onValueChange:s,placeholder:`Search fields`}),(0,H.jsx)(Yg,{scrollable:!0,children:c.map(e=>(0,H.jsx)(Vg,{onSelect:()=>n(Y0(t,J0(e))),children:e.label},e.name))}),c.length===0?(0,H.jsx)(n_,{children:`No field matches`}):null]})]})}var v2=(e,t)=>{let n=e.find(e=>e.field===t);return n?n.dir===`asc`?e.map(e=>e.field===t?{...e,dir:`desc`}:e):e.filter(e=>e.field!==t):[...e,{field:t,dir:`asc`}]};function y2({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(``),s=p2(e,a);return(0,H.jsxs)(jg,{open:r,onOpenChange:e=>{i(e),e||o(``)},children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(m2,{open:r,icon:(0,H.jsx)(mp,{}),children:`Sort`})}),(0,H.jsxs)(Lg,{minW:d2.menu,children:[(0,H.jsx)(Jg,{value:a,onValueChange:o,placeholder:`Search fields`}),(0,H.jsx)(Yg,{scrollable:!0,children:s.map(e=>{let r=t.sorts.find(t=>t.field===e.name)?.dir;return(0,H.jsx)(Vg,{onSelect:()=>n(e2(t,v2(t.sorts,e.name))),children:(0,H.jsxs)(y,{flex:1,items:`center`,justify:`space-between`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$aside`,numberOfLines:1,children:e.label}),r===`asc`?(0,H.jsx)(vp,{size:14,color:`$aside`}):r===`desc`?(0,H.jsx)(hp,{size:14,color:`$aside`}):null]})},e.name)})}),s.length===0?(0,H.jsx)(n_,{children:`No field matches`}):null]})]})}function b2({fields:e,view:t,onView:n,boardDisabled:r}){let[i,a]=(0,V.useState)(!1),o=new Set(t.hiddenFields??[]),s=e.filter(e=>!o.has(e.name)).map(e=>e.name),c=N0(e);return(0,H.jsxs)(jg,{open:i,onOpenChange:a,defaultPage:`options`,children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(m2,{open:i,icon:(0,H.jsx)(Sm,{}),children:`Options`})}),(0,H.jsxs)(Lg,{align:`end`,minW:d2.wide,children:[(0,H.jsxs)(Xg,{id:`options`,children:[(0,H.jsx)(Qg,{children:(0,H.jsx)($g,{children:`View options`})}),(0,H.jsx)(Vg,{page:`fields`,children:`Fields`}),t.kind===`board`&&c.length?(0,H.jsx)(Vg,{page:`group`,children:`Group by`}):null,r?null:(0,H.jsxs)(Gg,{value:t.kind,onValueChange:e=>e===`table`||e===`board`?n(n2(t,e)):void 0,children:[(0,H.jsx)(i_,{variant:`band`,children:`Layout`}),(0,H.jsx)(qg,{value:`table`,children:`Table`}),(0,H.jsx)(qg,{value:`board`,children:`Board`})]})]}),(0,H.jsxs)(Xg,{id:`fields`,children:[(0,H.jsx)(e_,{children:`Fields`}),(0,H.jsx)(Gg,{multiple:!0,value:s,onValueChange:r=>{let i=new Set(Array.isArray(r)?r:r?[r]:[]),a=t;for(let t of e)i.has(t.name)===o.has(t.name)&&(a=i2(a,t.name));n(a)},children:(0,H.jsx)(Yg,{scrollable:!0,children:e.map(e=>(0,H.jsx)(qg,{value:e.name,children:e.label},e.name))})})]}),(0,H.jsxs)(Xg,{id:`group`,children:[(0,H.jsx)(e_,{children:`Group by`}),(0,H.jsx)(Gg,{value:t.groupField??null,onValueChange:e=>n(r2(t,typeof e==`string`?e:void 0)),children:c.map(e=>(0,H.jsx)(qg,{value:e.name,children:e.label},e.name))})]})]})]})}function x2({label:e,onRemove:t,children:n}){return(0,H.jsxs)(y,{"data-slot":`view-chip`,height:d2.chip,items:`center`,gap:`$1`,p:`$0.5`,pl:`$1`,rounded:`$xs`,bg:`$hover`,borderWidth:1,borderColor:`$borderColor`,children:[n,(0,H.jsx)(W,{size:`icon-2xs`,variant:`ghost`,emphasis:`subtle`,"aria-label":`Remove ${e}`,onPress:t,children:(0,H.jsx)(Rn,{})})]})}var S2=(e,t,n={})=>(0,H.jsxs)(y,{role:`button`,tabIndex:0,"data-slot":`view-chip-body`,items:`center`,gap:`$1`,cursor:`pointer`,rounded:`$2xs`,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},...n,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`500`,color:`$ink`,numberOfLines:1,children:e}),t]});function C2({rule:e,fields:t,view:n,onView:r}){let i=f2(t,e.field)?.label??e.field,a=()=>r(e2(n,n.sorts.map(t=>t.field===e.field?{...t,dir:t.dir===`asc`?`desc`:`asc`}:t)));return(0,H.jsx)(x2,{label:`sort by ${i}`,onRemove:()=>r(e2(n,n.sorts.filter(t=>t.field!==e.field))),children:S2(i,e.dir===`asc`?(0,H.jsx)(vp,{size:14,color:`$ink`}):(0,H.jsx)(hp,{size:14,color:`$ink`}),{"aria-label":`Sort by ${i}, ${e.dir===`asc`?`ascending`:`descending`}`,onPress:a,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault?.(),a())}})})}function w2({index:e,rule:t,fields:n,view:r,onView:i,fieldOptions:a}){let[o,s]=(0,V.useState)(!1),c=f2(n,t.field)??n[0],l=s0(c.type),u=c2(t,c);return(0,H.jsx)(x2,{label:`filter on ${c.label}`,onRemove:()=>i(Z0(r,e)),children:(0,H.jsxs)(jg,{open:o,onOpenChange:s,children:[(0,H.jsx)(Ng,{asChild:!0,children:S2(c.label,(0,H.jsx)(U,{fontSize:`$1`,color:`$ink`,numberOfLines:1,children:`: ${n0[t.op]}${u?` ${u}`:``}`}),{"aria-label":`Filter: ${c.label} ${n0[t.op]} ${u}`.trim()})}),(0,H.jsxs)(Lg,{minW:d2.wide,children:[(0,H.jsxs)(Gg,{value:t.op,closeOnSelect:!1,onValueChange:n=>{if(typeof n!=`string`)return;let a=n;i(X0(r,e,a===`between`||t.op===`between`?{op:a,value:void 0}:{op:a}))},children:[(0,H.jsx)(i_,{variant:`band`,children:c.label}),l.map(e=>(0,H.jsx)(qg,{value:e,children:n0[e]},e))]}),l2(t)?(0,H.jsx)(z,{p:`$1`,children:(0,H.jsx)(u2,{field:c,rule:t,fieldOptions:a,onChange:t=>i(X0(r,e,{value:t}))})}):null]})]})})}var T2=(e,t)=>e.find(e=>e.name===t);function E2({icon:e,label:t,count:n,active:r,style:i,...a}){return(0,H.jsxs)(y,{role:`button`,tabIndex:0,"aria-label":t,...a,items:`center`,gap:6,px:10,py:7,rounded:8,borderWidth:1,cursor:`pointer`,hoverStyle:{borderColor:C0.textMuted},style:{...i,borderColor:r?C0.accent:C0.border,backgroundColor:r?C0.hover:`transparent`},children:[e,(0,H.jsx)(U,{fontSize:13,fontWeight:`600`,style:{color:r?C0.text:C0.textMuted},children:t}),n?(0,H.jsx)(y,{items:`center`,justify:`center`,width:18,height:18,rounded:9,style:{backgroundColor:C0.accent},children:(0,H.jsx)(U,{fontSize:11,fontWeight:`700`,style:{color:`#0b1220`},children:n})}):null]})}function D2({view:e,onView:t,boardDisabled:n}){let r=(n,r,i)=>{let a=e.kind===n;return(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:7,cursor:`pointer`,onPress:()=>t(n2(e,n)),style:{backgroundColor:a?C0.surface:`transparent`},hoverStyle:a?void 0:{bg:C0.hover},children:[r,(0,H.jsx)(U,{fontSize:13,fontWeight:`600`,style:{color:a?C0.text:C0.textFaint},children:i})]})};return(0,H.jsxs)(y,{p:3,gap:2,rounded:9,borderWidth:1,style:{borderColor:C0.border,backgroundColor:C0.surfaceRaised},children:[r(`table`,(0,H.jsx)(Dm,{size:14,color:e.kind===`table`?C0.text:C0.textFaint}),`Table`),n?null:r(`board`,(0,H.jsx)(nm,{size:14,color:e.kind===`board`?C0.text:C0.textFaint}),`Board`)]})}function O2({fields:e,value:t,onPick:n,trigger:r}){let[i,a]=(0,V.useState)(!1);return(0,H.jsx)(L1,{open:i,onOpenChange:a,width:220,trigger:r,children:e.map(e=>(0,H.jsx)(R1,{active:e.name===t,onPress:()=>{n(e.name),a(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:C0.text},children:e.label})},e.name))})}function k2({ops:e,value:t,onPick:n}){let[r,i]=(0,V.useState)(!1);return(0,H.jsx)(L1,{open:r,onOpenChange:i,width:200,trigger:(0,H.jsx)(A2,{text:n0[t]}),children:e.map(e=>(0,H.jsx)(R1,{active:e===t,onPress:()=>{n(e),i(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:C0.text},children:n0[e]})},e))})}function A2({text:e,style:t,...n}){return(0,H.jsx)(y,{role:`button`,tabIndex:0,...n,items:`center`,px:8,py:5,rounded:7,borderWidth:1,cursor:`pointer`,hoverStyle:{borderColor:C0.textMuted},style:{...t,borderColor:C0.border,backgroundColor:C0.surface},children:(0,H.jsx)(U,{fontSize:12,numberOfLines:1,style:{color:C0.text},children:e})})}function j2({fields:e,view:t,onView:n,fieldOptions:r}){let[i,a]=(0,V.useState)(!1),o=t.filters.filter(t0).length;return(0,H.jsx)(L1,{open:i,onOpenChange:a,width:420,trigger:(0,H.jsx)(E2,{icon:(0,H.jsx)(im,{size:14,color:C0.textMuted}),label:`Filter`,count:o,active:o>0}),children:(0,H.jsxs)(z,{gap:8,p:4,children:[t.filters.length===0?(0,H.jsx)(U,{px:6,py:4,fontSize:12,style:{color:C0.textFaint},children:`No filters yet.`}):null,t.filters.map((i,a)=>{let o=T2(e,i.field)??e[0],s=s0(o.type);return(0,H.jsxs)(y,{items:`center`,gap:6,children:[a===0?(0,H.jsx)(U,{fontSize:12,width:36,style:{color:C0.textFaint},children:`Where`}):(0,H.jsx)(y,{width:36,cursor:`pointer`,onPress:()=>n(Q0(t,$0(t.match))),role:`button`,"aria-label":`Rules combine by ${t.match===`or`?`or`:`and`}; press for ${$0(t.match)}`,children:(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,style:{color:C0.accent},children:t.match===`or`?`or`:`and`})}),(0,H.jsx)(O2,{fields:e,value:i.field,onPick:r=>{n(X0(t,a,{field:r,op:s0(T2(e,r).type)[0],value:void 0}))},trigger:(0,H.jsx)(A2,{text:o.label})}),(0,H.jsx)(k2,{ops:s,value:i.op,onPick:e=>n(X0(t,a,e===`between`||i.op===`between`?{op:e,value:void 0}:{op:e}))}),l2(i)?(0,H.jsx)(y,{flex:1,minW:120,children:(0,H.jsx)(u2,{field:o,rule:i,fieldOptions:r,onChange:e=>n(X0(t,a,{value:e}))})}):(0,H.jsx)(y,{flex:1}),(0,H.jsx)(z,{cursor:`pointer`,p:4,rounded:6,hoverStyle:{bg:C0.hover},onPress:()=>n(Z0(t,a)),children:(0,H.jsx)(Rn,{size:14,color:C0.textFaint})})]},a)}),(0,H.jsx)(y,{children:(0,H.jsx)(Je,{size:`$2`,icon:(0,H.jsx)(hm,{size:14}),onPress:()=>n(Y0(t,J0(e[0]))),children:`Add filter`})})]})})}function M2({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),a=e=>t.sorts.find(t=>t.field===e)?.dir,o=e=>{let r=t.sorts.find(t=>t.field===e),i;i=r?r.dir===`asc`?t.sorts.map(t=>t.field===e?{...t,dir:`desc`}:t):t.sorts.filter(t=>t.field!==e):[...t.sorts,{field:e,dir:`asc`}],n(e2(t,i))};return(0,H.jsx)(L1,{open:r,onOpenChange:i,width:240,trigger:(0,H.jsx)(E2,{icon:(0,H.jsx)(mp,{size:14,color:C0.textMuted}),label:`Sort`,count:t.sorts.length,active:t.sorts.length>0}),children:e.map(e=>{let t=a(e.name);return(0,H.jsx)(R1,{active:!!t,onPress:()=>o(e.name),trailing:t===`asc`?(0,H.jsx)(vp,{size:13,color:C0.accent}):t===`desc`?(0,H.jsx)(hp,{size:13,color:C0.accent}):null,children:(0,H.jsx)(U,{fontSize:13,style:{color:C0.text},children:e.label})},e.name)})})}function N2({fields:e,view:t,onView:n}){let[r,i]=(0,V.useState)(!1),a=N0(e),o=T2(e,t.groupField??``);return(0,H.jsxs)(L1,{open:r,onOpenChange:i,width:220,trigger:(0,H.jsx)(E2,{icon:(0,H.jsx)(Fp,{size:14,color:C0.textMuted}),label:o?`Group: ${o.label}`:`Group by`,active:!!o}),children:[a.length===0?(0,H.jsx)(U,{px:10,py:6,fontSize:12,style:{color:C0.textFaint},children:`No groupable fields`}):null,a.map(e=>(0,H.jsx)(R1,{active:e.name===t.groupField,onPress:()=>{n(r2(t,e.name)),i(!1)},children:(0,H.jsx)(U,{fontSize:13,style:{color:C0.text},children:e.label})},e.name))]})}function P2(e){return st()===`compact`?(0,H.jsx)(h2,{...e}):(0,H.jsx)(F2,{...e})}function F2(e){let{fields:t,view:n,onView:r,onCreate:i,createLabel:a=`New`,extra:o,boardDisabled:s}=e;return(0,H.jsxs)(y,{items:`center`,gap:8,style:{flexWrap:`wrap`},children:[(0,H.jsx)(D2,{view:n,onView:r,boardDisabled:s}),(0,H.jsx)(j2,{...e}),(0,H.jsx)(M2,{fields:t,view:n,onView:r}),n.kind===`board`?(0,H.jsx)(N2,{fields:t,view:n,onView:r}):null,(0,H.jsxs)(y,{flex:1,minW:160,items:`center`,gap:6,px:10,py:6,rounded:8,borderWidth:1,style:{borderColor:C0.border,backgroundColor:C0.surface},children:[(0,H.jsx)(_m,{size:14,color:C0.textFaint}),(0,H.jsx)(ht,{flex:1,size:`$2`,value:n.search??``,onChangeText:e=>r(t2(n,e)),placeholder:`Search…`,style:{borderWidth:0,backgroundColor:`transparent`,paddingLeft:0,paddingRight:0}})]}),o?(0,H.jsx)(V.Fragment,{children:o}):null,i?(0,H.jsx)(Je,{size:`$3`,icon:(0,H.jsx)(hm,{size:16}),theme:`blue`,onPress:i,children:a}):null]})}function I2(e){let{fields:t,records:n,loading:r,empty:i,view:a,onViewChange:o,defaultKind:s=`table`,savedViews:c,title:l,onOpen:u,onCreate:d,createLabel:f,onEditCommit:p,onRecordChange:m,fieldOptions:h,selectable:g=!0,editable:_=!0,bulkActions:v,toolbarExtra:y,boardDisabled:b,titleField:x,cardFields:S,remote:C}=e,[w,T]=(0,V.useState)(()=>{let e=K0(s);return s===`board`?{...e,groupField:P0(t)}:e}),E=a??w,D=e=>{let n=e.kind===`board`&&!e.groupField?{...e,groupField:P0(t)}:e;o?o(n):T(n)},O=(0,V.useMemo)(()=>C?n:q0(n,E,t),[C,n,E,t]),k=st()===`compact`,ee=c?.views.find(e=>e.id===(c.activeId??E.id)),A=!!ee&&JSON.stringify(ee)!==JSON.stringify(E),j=k&&c?{savedViews:{views:c.views,activeId:c.activeId,onSelect:c.onSelect},dirty:A,onResetView:ee?()=>D(ee):void 0,onSaveView:()=>c.onSave(E),onSaveAsView:()=>c.onSave({...E,id:`view-${Date.now()}`,name:`View ${c.views.length+1}`})}:null,M=m??(p?(e,n)=>{let[r]=Object.keys(n),i=t.find(e=>e.name===r);if(i)return p(e,i,n[r])}:void 0);return(0,H.jsxs)(z,{gap:12,children:[l?typeof l==`string`?(0,H.jsx)(U,{fontSize:20,fontWeight:`800`,style:{color:C0.text},children:l}):l:null,c&&!k?(0,H.jsx)(L2,{saved:c,current:E,onLoad:D}):null,(0,H.jsx)(P2,{fields:t,view:E,onView:D,onCreate:d,createLabel:f,fieldOptions:h,extra:y,boardDisabled:b,...k?{count:C?C.total:O.length}:null,...j}),E.kind===`board`?(0,H.jsx)(V0,{fields:t,records:O,groupField:E.groupField??P0(t)??``,titleField:x,cardFields:S,onOpen:u,onRecordChange:M,onCreate:d?()=>d():void 0}):(0,H.jsx)(b0,{fields:t,records:O,loading:r,empty:i,sorts:E.sorts,onSortChange:e=>D(e2(E,e)),onOpen:u,selectable:g,bulkActions:v,editable:_,onEditCommit:p,fieldOptions:h,hiddenFields:E.hiddenFields,columnOrder:E.columnOrder,onColumnOrderChange:e=>D({...E,columnOrder:e}),pageSize:E.pageSize??25,remote:C})]})}function L2({saved:e,current:t,onLoad:n}){return(0,H.jsxs)(y,{items:`center`,gap:4,style:{flexWrap:`wrap`},children:[e.views.map(r=>{let i=r.id===(e.activeId??t.id);return(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:8,cursor:`pointer`,onPress:()=>{e.onSelect(r.id),n(r)},style:{backgroundColor:i?C0.hover:`transparent`,borderBottomWidth:2,borderBottomColor:i?C0.accent:`transparent`},hoverStyle:i?void 0:{bg:C0.surfaceRaised},children:[(0,H.jsx)(U,{fontSize:13,fontWeight:i?`700`:`500`,style:{color:i?C0.text:C0.textMuted},children:r.name}),e.onDelete&&e.views.length>1&&(e.deletable?.(r.id)??!0)?(0,H.jsx)(z,{role:`button`,tabIndex:0,"aria-label":`Delete view ${r.name}`,cursor:`pointer`,onPress:t=>{t?.stopPropagation?.(),e.onDelete?.(r.id)},children:(0,H.jsx)(Rn,{size:12,color:C0.textFaint})}):null]},r.id)}),(0,H.jsxs)(y,{items:`center`,gap:4,px:10,py:6,rounded:8,cursor:`pointer`,hoverStyle:{bg:C0.surfaceRaised},onPress:()=>e.onSave({...t,id:`view-${Date.now()}`,name:`View ${e.views.length+1}`}),children:[(0,H.jsx)(hm,{size:13,color:C0.textFaint}),(0,H.jsx)(U,{fontSize:13,style:{color:C0.textFaint},children:`New view`})]})]})}var R2=e=>(e.kind===`upgrade`||e.kind===`topup`)&&!!e.url,z2=[`premium`,`ours`,`free`],B2=(e,t)=>e===`premium`?t(`Premium`):e===`ours`?`Hanzo`:t(`Free`),V2=[`ok`,`near`,`limited`],H2=[`plan`,`credits`,`free`,`none`],U2=[`upgrade`,`topup`,`credits`,`switch`],W2={upgrade:`Upgrade`,topup:`Add prepaid credit`,credits:`Continue with credits`,switch:`Switch model`,later:`Try again later`},G2=(e,t)=>t(e===`upgrade`?`Upgrade`:e===`topup`?`Add prepaid credit`:e===`credits`?`Continue with credits`:`Switch model`),K2={ok:0,near:1,limited:2},q2=e=>typeof e==`string`?e:null,J2=(e,t)=>typeof t==`string`&&e.includes(t)?t:null,Y2=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:null,X2=e=>!!e?.plan&&e?.plan!==`free`,Z2=(e,t)=>K2[t]>K2[e]?t:e,Q2=e=>typeof e==`number`&&Number.isFinite(e)?Math.min(100,Math.max(0,Math.round(e))):null;function $2(e){let t=Y2(e),n=Q2(t?.percent);return n===null?null:{percent:n,state:J2(V2,t?.state)??(n>=80?`near`:`ok`),resets_at:q2(t?.resets_at)}}function e4(e){let t=$2(e);if(!t)return null;let n=Y2(e),r=$2(n?.window);return{...t,paying:J2(H2,n?.paying)??`plan`,...r?{window:r}:{}}}function t4(e){return Array.isArray(e)?e.flatMap(e=>{let t=Y2(e),n=J2(U2,t?.kind);if(!n)return[];let r=q2(t?.url)??void 0,i=q2(t?.model)??void 0,a=q2(t?.plan)??void 0;return(n===`upgrade`||n===`topup`)&&!r||n===`switch`&&!i?[]:[{kind:n,label:q2(t?.label)||W2[n],...r?{url:r}:{},...i?{model:i}:{},...a?{plan:a}:{}}]}):[]}var n4=e=>Array.isArray(e)?e.flatMap(e=>J2(z2,e)?[e]:[]):[];function r4(e){return Array.isArray(e)?e.flatMap(e=>{let t=Y2(e),n=q2(t?.model);if(!n)return[];let r=q2(t?.fallback);return[{model:n,...r?{fallback:r}:{},resets_at:q2(t?.resets_at)}]}):[]}function i4(e){let t=Y2(e),n=q2(t?.plan);if(n===null)return null;let r={},i=Y2(t?.classes);for(let e of z2){let t=e4(i?.[e]);t&&(r[e]=t)}let a=r4(t?.paused),o=Y2(t?.limited),s=o?{reason:q2(o.reason)??``,classes:n4(o.classes),message:q2(o.message)??``}:void 0,c=J2(V2,t?.state)??Object.values(r).reduce((e,t)=>Z2(e,t?Z2(t.state,t.window?.state??`ok`):`ok`),`ok`);return{plan:n,period_start:q2(t?.period_start)??void 0,period_end:q2(t?.period_end)??void 0,state:c,classes:r,...s?{limited:s}:{},...a.length?{paused:a}:{},actions:t4(t?.actions),upgrade:q2(t?.upgrade)??void 0,...typeof t?.credits_after_allowance==`boolean`?{creditsAfterAllowance:t.credits_after_allowance}:{}}}function a4(e){let t=J2(V2,e.get(`x-hanzo-usage`)),n=e.get(`x-hanzo-fallback`)||null,r=n&&(e.get(`x-hanzo-served`)||n);return!t&&!r?null:{state:t??`limited`,class:J2(z2,e.get(`x-hanzo-usage-class`)),paidBy:J2(H2,e.get(`x-hanzo-paid-by`)),fallback:r,reason:e.get(`x-hanzo-usage-reason`)||null}}var o4=new Map([[`free_plan_cap`,`rate_limit_error`],[`usage_cap_exceeded`,`rate_limit_error`],[`allowance_spent`,`insufficient_quota`]]),s4=86400;function c4(e,t,n){let r=Y2(Y2(e)?.error);if(!r)return null;let i=q2(r.code)??``;if(r.type!==`billing_error`&&(!o4.has(i)||o4.get(i)!==r.type))return null;let a=n?Number(n):NaN;return{status:t,code:i,message:q2(r.message)??``,class:J2(z2,r.class),resets_at:q2(r.resets_at),actions:t4(r.actions),retry:a>=0&&a<=s4?a:null}}function l4(e,t){if(!e)return null;let n={...e.classes},{served:r,refusal:i}=t;if(r?.class&&n[r.class]){let e=n[r.class];n[r.class]={...e,state:r.state}}if(i?.class&&n[i.class]){let e=n[i.class];n[i.class]={...e,state:`limited`,paying:`none`,resets_at:i.resets_at??e.resets_at}}let a=Object.values(n).reduce((e,t)=>Z2(e,t?Z2(t.state,t.window?.state??`ok`):`ok`),t.served||t.refusal?`ok`:e.state);return{...e,classes:n,state:Z2(a,i?`limited`:`ok`)}}var u4=e=>e?e.window&&K2[e.window.state]>K2[e.state]?e.window.resets_at:e.resets_at:null,d4=e=>e.reduce((e,t)=>t&&(!e||Date.parse(t)<Date.parse(e))?t:e,null);function f4(e,t=Ft){let[n,r,i]=z2.filter(t=>e.includes(t)).map(e=>B2(e,t));return n?r?i?t(`{a}, {b} and {c} models`,{a:n,b:r,c:i}):t(`{a} and {b} models`,{a:n,b:r}):t(`{a} models`,{a:n}):t(`Models`)}function p4(e,t=Date.now()){let n=e?Date.parse(e):NaN;if(Number.isNaN(n))return``;let r=new Date(n);return n-t<864e5?r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`}):r.toLocaleDateString(`en-US`,{timeZone:`UTC`,month:`short`,day:`numeric`})}var m4=(e,t)=>e===`paid_plan_required`?t(`This model needs a paid plan.`):e===`free_plan_cap`?t(`You've used the free plan's usage for now.`):e===`insufficient_balance`?t(`Your credits have run out.`):void 0,h4=(e,t,n)=>e.endsWith(`*`)?n(`{family} models`,{family:`${e.slice(0,-1).split(`/`).pop()?.replace(/[-.]$/,``)}`}):t(e),g4=(e,t,n,r)=>n?r?e(`{what} are paused until {until}.`,{what:t,until:r}):e(`{what} are paused.`,{what:t}):r?e(`{what} is paused until {until}.`,{what:t,until:r}):e(`{what} is paused.`,{what:t});function _4(e,t,n=e=>e,r=Date.now(),i=Ft){let{served:a,refusal:o}=t,s=a?.fallback??null,c=new Set(e?.limited?.classes??[]);for(let t of z2)t!==`free`&&e?.classes[t]?.state===`limited`&&c.add(t);if(o?.class&&c.add(o.class),s&&a?.class&&a.class!==`free`&&c.add(a.class),!o&&!s&&!e?.limited&&e?.state!==`limited`)return null;let l=o?.code||e?.limited?.reason||a?.reason||``,u=l===`model_cap`?e?.paused?.find(e=>s!==null&&e.fallback===s)??e?.paused?.[0]??null:null;u&&a?.class&&c.delete(a.class);let d=z2.filter(e=>c.has(e)),f=u?u.resets_at??o?.resets_at??null:d4([...d.map(t=>u4(e?.classes[t])),o?.resets_at??null]),p=l===`plan_allowance_used`||!l&&d.length>0,m=p4(f,r),h=u?g4(i,h4(u.model,n,i),u.model.endsWith(`*`),m):p?g4(i,f4(d,i),!0,m):o?.message||e?.limited?.message||(l===`paid_plan_required`&&d.length?i(`{classes} need a paid plan.`,{classes:f4(d,i)}):m4(l,i))||i(`Usage is paused for now.`),g=o?.actions.length?o.actions:e?.actions??[];return{reason:l,classes:d,message:s?`${h} ${i(`You're chatting on {model}.`,{model:n(s)})}`:h,actions:g.map(e=>e.label===W2[e.kind]?{...e,label:G2(e.kind,i)}:e),resets_at:f,fallback:s,refused:o!==null}}function v4(e,t=Date.now(),n=Ft){if(!e||e.state===`limited`)return null;let r=z2.filter(t=>{let n=e.classes[t];return t!==`free`&&n&&(n.state===`near`||n.window?.state===`near`)});if(!r.length)return null;let i=p4(d4(r.map(t=>u4(e.classes[t]))),t),a=r.length>1?n(`You're close to your plan's included premium and Hanzo model usage.`):r[0]===`premium`?n(`You're close to your plan's included premium model usage.`):n(`You're close to your plan's included Hanzo model usage.`);return i?`${a} ${n(`Resets {until}.`,{until:i})}`:a}var y4={served:null,refusal:null,at:0},b4=new Set,x4=e=>{y4=e;for(let e of b4)e()},S4=e=>(b4.add(e),()=>{b4.delete(e)}),C4=()=>y4,w4={served:null,refusal:null,at:0},T4=()=>w4;function E4(e){let t=a4(e.headers);if(e.ok){(t||y4.served||y4.refusal)&&x4({served:t,refusal:null,at:Date.now()});return}if(e.status!==402&&e.status!==429)return;let n=e.headers.get(`retry-after`);e.clone().json().then(r=>{let i=c4(r,e.status,n);i&&x4({served:t??y4.served,refusal:i,at:Date.now()})}).catch(()=>{})}function D4(e,t=null,n){let[r,i]=(0,V.useState)(null),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(0),[l,u]=(0,V.useState)(0),d=(0,V.useRef)(e);d.current=e;let f=e!==null,p=(0,V.useSyncExternalStore)(S4,C4,T4),{t:m}=R();(0,V.useEffect)(()=>{let e=d.current;if(!e){i(null);return}let t=new AbortController,n=Date.now();return e(t.signal).then(e=>{t.signal.aborted||(i(i4(e)),c(n))}).catch(()=>{t.signal.aborted||i(null)}).finally(()=>{t.signal.aborted||o(!0)}),()=>t.abort()},[f,t,l]);let h=p.at>s,g=h&&(p.refusal!==null||p.served!==null&&(p.served.fallback!==null||p.served.class!==null&&r?.classes[p.served.class]?.state!==p.served.state));(0,V.useEffect)(()=>{g&&f&&u(e=>e+1)},[g,f,p.at]);let _=(0,V.useMemo)(()=>{if(h)return p;let e=p.served;return{served:e!==null&&(e.fallback!==null&&e.reason!==`plan_allowance_used`||r?.state===`limited`)?e:null,refusal:p.refusal}},[h,p,r?.state]),v=(0,V.useMemo)(()=>l4(r,_),[r,_]),y=(0,V.useRef)(n);y.current=n;let b=(0,V.useMemo)(()=>_4(v,_,e=>y.current?.(e)??e,Date.now(),m),[v,_,m]);return{limits:v,answered:a,notice:b,near:(0,V.useMemo)(()=>b?null:v4(v,Date.now(),m),[b,v,m]),reload:(0,V.useCallback)(()=>u(e=>e+1),[])}}function O4(e,t,n){let[r,i]=(0,V.useState)(t),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(!!e),[l,u]=(0,V.useState)(0),d=(0,V.useCallback)(()=>u(e=>e+1),[]);return(0,V.useEffect)(()=>{if(!e){c(!1);return}let t=!0;return c(!0),e().then(e=>{t&&(i(e),o(null))}).catch(e=>t&&o(e)).finally(()=>t&&c(!1)),()=>{t=!1}},[...n,l]),{value:r,error:a,loading:s,reload:d}}function k4({title:e,detail:t,action:n,children:r}){return(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsxs)(z,{flex:1,minW:0,gap:`$0.5`,children:[(0,H.jsx)(a,{size:`$3`,color:`$ink`,children:e}),t?(0,H.jsx)(a,{size:`$1`,color:`$soft`,children:t}):null]}),n]}),r]})}function A4({children:e}){return(0,H.jsx)(z,{borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,overflow:`hidden`,children:e})}function j4({title:e,detail:t,leading:n,trailing:r,first:i,mono:o}){return(0,H.jsxs)(y,{items:`center`,gap:`$3`,px:`$3`,py:`$2.5`,borderTopWidth:+!i,borderColor:`$borderColor`,children:[n,(0,H.jsxs)(z,{flex:1,minW:0,gap:`$0.5`,children:[(0,H.jsx)(a,{size:`$2`,color:`$ink`,numberOfLines:1,style:o?{fontFamily:`var(--f-mono, ui-monospace, monospace)`}:void 0,children:e}),t?(0,H.jsx)(a,{size:`$1`,color:`$soft`,numberOfLines:2,children:t}):null]}),r]})}function M4({children:e}){return(0,H.jsx)(z,{py:`$5`,items:`center`,children:(0,H.jsx)(a,{size:`$2`,color:`$soft`,style:{textAlign:`center`},children:e})})}function N4(e){let t=e?new Date(e):null;return t&&!Number.isNaN(t.getTime())?t.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`,timeZone:`UTC`}):``}function P4({children:e}){return e?(0,H.jsx)(a,{size:`$1`,color:`$soft`,role:`status`,children:e}):null}var F4={free:D(`Free`),go:`Go`,dev:`Pro`,pro:`Pro`,max:`Max`,team:`Team`,agency:`Agency`,advisory:`Agency`,dedicated:`Agency`,pod:`Agency`,enterprise:`Enterprise`},I4={pro:`Pro`,enterprise:`Enterprise`},L4=/^[0-9a-f]{8}-[0-9a-f]{4}-|[0-9a-f]{12,}|^[a-z]+_[0-9a-z]{6,}$|^\d+$/i,R4=e=>/^\d+x$/.test(e)?e:e.charAt(0).toUpperCase()+e.slice(1);function z4(e,t,n){let r=(n??``).trim();if(r)return{name:r,tag:``};let i=(e??``).trim().toLowerCase(),a=()=>{let e=I4[(t??``).trim().toLowerCase()];return e?{name:e,tag:``}:null};if(!i)return a();if(L4.test(i))return a()??{name:D(`Paid plan`),tag:``};let o=i.replace(/[\s_]+/g,`-`),[s,...c]=o.split(`-`).filter(Boolean),l=F4[s];if(!l)return{name:o.split(`-`).filter(Boolean).map(R4).join(` `),tag:``};let u=c.join(`-`);return{name:l,tag:/^\d+x$/.test(u)?u:/^(annual|yearly|year)$/.test(u)?D(`Annual`):u?c.map(R4).join(` `):``}}var B4=e=>e?e.tag?`${e.name} ${e.tag}`:e.name:``,V4=[`ok`,`near`,`limited`],H4=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:null;function U4(e){let t=H4(e),n=V4.find(e=>e===t?.state);return!t||!n||typeof t.percent!=`number`||!Number.isFinite(t.percent)?null:{percent:Math.min(100,Math.max(0,Math.round(t.percent))),state:n,resets:typeof t.resets_at==`string`?t.resets_at:``}}function W4(e,t,n){let r=(e??``).trim().toLowerCase();return r&&r!==`free`||I4[(n??``).trim().toLowerCase()]?`plan`:t!==null&&t>0?`credits`:`free`}function G4(e,t=Date.now()){let n=e?Date.parse(e):NaN;if(Number.isNaN(n))return``;let r=new Date(n);return n-t<864e5?r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`}):r.toLocaleDateString(`en-US`,{timeZone:`UTC`,month:`short`,day:`numeric`})}var K4={premium:`premium`,ours:`Hanzo`},q4={"":D(`usage`),premium:D(`premium model usage`),Hanzo:D(`Hanzo model usage`),"premium and Hanzo":D(`premium and Hanzo model usage`)};function J4(e,t,n,r=Date.now(),i=sq){let a=t.map(e=>K4[e]).filter(Boolean).join(` and `),o=q4[a]===void 0?`${a} model usage`:i(q4[a]),s=G4(n,r);if(!e)return s?i(`Your plan’s included {what} is used until {time}.`,{what:o,time:s}):i(`Your plan’s included {what} is used.`,{what:o});let c=B4({name:i(e.name),tag:e.tag?i(e.tag):``});return s?i(`Your {plan} plan’s included {what} is used until {time}.`,{plan:c,what:o,time:s}):i(`Your {plan} plan’s included {what} is used.`,{plan:c,what:o})}function Y4(e,t=sq){let n=t=>e.find(e=>e.kind===t),r=n(`topup`);return[n(`credits`)??(r?{...r,label:t(`Add credits`)}:void 0),n(`upgrade`),n(`switch`)].filter(e=>e!==void 0)}var X4=[`premium`,`ours`],Z4=e=>typeof e==`string`?e:``,Q4=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},$4=e=>Array.isArray(e)?e:[],e3=[`upgrade`,`topup`,`credits`,`switch`],t3=[`ok`,`near`,`limited`];function n3(e){let t=U4(e);if(!t)return null;let n=Q4(e);return{...t,paying:Z4(n.paying)||`none`,window:U4(n.window)}}function r3(e){let t=Q4(e),n={};for(let e of X4){let r=n3(Q4(t.classes)[e]);r&&(n[e]=r)}let r=t.limited?Q4(t.limited):null;return{plan:Z4(t.plan)||`free`,start:Z4(t.period_start),end:Z4(t.period_end),state:t3.find(e=>e===t.state)??`ok`,session:U4(t.session),day:U4(t.day),classes:n,limited:r?{reason:Z4(r.reason),classes:$4(r.classes).filter(e=>X4.includes(e)),message:Z4(r.message)}:null,actions:$4(t.actions).map(Q4).flatMap(e=>{let t=e3.find(t=>t===e.kind);if(!t)return[];let n=Z4(e.url),r=Z4(e.model);return(t===`upgrade`||t===`topup`)&&!n||t===`switch`&&!r?[]:[{kind:t,label:Z4(e.label),url:n,plan:Z4(e.plan),model:r}]}),upgrade:Z4(t.upgrade),credits:t.credits_after_allowance===!0,paused:$4(t.paused).map(Q4).filter(e=>Z4(e.model)).map(e=>({model:Z4(e.model),fallback:Z4(e.fallback),resets:Z4(e.resets_at)}))}}async function i3(e){return r3(await mq(e,`GET`,`/v1/ai/limits`))}async function a3(e,t){return r3(await mq(e,`PUT`,`/v1/ai/limits`,{creditsAfterAllowance:t}))}var o3=e=>e.status===`fulfilled`?e.value:null;async function s3(e){let t=await Promise.allSettled([Oq(e),i3(e),Fq(e),Tq(e)]);if(t.every(e=>e.status===`rejected`))throw t[0].reason;let[n,r,i,a]=[o3(t[0]),o3(t[1]),o3(t[2]),o3(t[3])],o=n?.plan||(r&&r.plan!==`free`?r.plan:``),s=W4(o,a,n?.tier);return{kind:s,label:s===`plan`?z4(o,n?.tier,n?.name):s===`free`?{name:D(`Free`),tag:``}:{name:D(`Pay as you go`),tag:``},limits:r,allowance:i,balance:a}}function c3(e,t=!0){return O4(t&&e.token()?()=>s3(e):null,null,[e,t])}function l3(e){return!e||e.limit<=0?null:Math.max(0,100-Math.round(Math.min(e.used,e.limit)/e.limit*100))}var u3={ok:`$soft`,near:`$yellow10`,limited:`$red10`};D(`Session`),D(`Today`),D(`Month`);function d3({label:e,size:t=`$3`}){let{t:n}=R();return(0,H.jsxs)(y,{items:`baseline`,gap:`$1.5`,minW:0,"data-slot":`plan-name`,children:[(0,H.jsx)(a,{size:t,color:`$ink`,style:{fontWeight:600},numberOfLines:1,children:n(e.name)}),e.tag?(0,H.jsx)(a,{size:`$1`,color:`$soft`,px:`$1.5`,rounded:`$2`,borderWidth:1,borderColor:`$borderColor`,"data-slot":`plan-tag`,children:n(e.tag)}):null]})}function f3(e){if(!e)return null;try{let t=e.split(`.`)[1];return t?JSON.parse(atob(t.replace(/-/g,`+`).replace(/_/g,`/`))):null}catch{return null}}var p3=[`owner`,`admin`];function m3(e,t){if(!t)return!1;let n=f3(e)?.orgs;return(Array.isArray(n)?n:[]).some(e=>{let n=e;return n?.org===t&&p3.includes(n.role)})}var h3=D(`Credits are separate from your plan’s usage allowance. They pay for usage past it when you choose to continue with credits, and for all usage when there is no plan.`);function g3({read:e}){let{t}=R();return(0,H.jsx)(a,{size:`$2`,color:e.error?`$soft`:`$ink`,numberOfLines:1,maxW:200,children:e.error?t(`Unavailable`):e.loading?`…`:yq(e.value)})}function _3({part:e,whole:t,limit:n}){let r=Math.min(100,Math.max(0,e/t*100));return(0,H.jsx)(z,{height:6,rounded:999,bg:`$hover`,overflow:`hidden`,role:`progressbar`,"aria-valuenow":Math.round(r),"aria-valuemin":0,"aria-valuemax":100,children:(0,H.jsx)(z,{height:6,width:`${r}%`,rounded:999,bg:n&&r>=100?`$red10`:`$ink`})})}function v3({title:e,used:t,of:n,says:r,first:i,limit:o=!0}){return(0,H.jsxs)(z,{gap:`$2`,px:`$3`,py:`$3`,borderTopWidth:+!i,borderColor:`$borderColor`,children:[(0,H.jsxs)(y,{items:`baseline`,justify:`space-between`,flexWrap:`wrap`,columnGap:`$3`,rowGap:`$1`,children:[(0,H.jsx)(a,{size:`$2`,color:`$ink`,children:e}),(0,H.jsx)(a,{size:`$1`,color:`$soft`,children:r})]}),(0,H.jsx)(_3,{part:t,whole:n,limit:o})]})}var y3=(e,t)=>N4(e)?t(`Resets {date}`,{date:N4(e)}):``;function b3({target:e,admin:t,add:n,onCard:r}){let{t:i}=R(),o=O4(()=>Tq(e),0,[e]),s=O4(()=>Eq(e),0,[e]),c=O4(()=>Dq(e),[],[e]),l=O4(()=>Nq(e),null,[e]),u=O4(()=>Aq(e),null,[e]),d=O4(()=>Lq(e),[],[e]),f=O4(n?null:()=>Cq(e),[],[e,n]),[p,m]=(0,V.useState)(!1),[h,g]=(0,V.useState)(`25`),[_,v]=(0,V.useState)(``),[b,x]=(0,V.useState)(``),[S,C]=(0,V.useState)(``),[w,T]=(0,V.useState)(!1),[E,D]=(0,V.useState)(``);(0,V.useEffect)(()=>{u.value&&(x(u.value.threshold?String(u.value.threshold/100):``),C(u.value.amount?String(u.value.amount/100):``))},[u.value]);let O=async(e,t,n)=>{T(!0),D(``);try{await e(),n(),D(t)}catch(e){D(uq(e,i))}finally{T(!1)}},k=wq(f.value),ee=bq(h),A=Rq(d.value),j=d.value.filter(e=>e!==A),M=l.value,N=Math.max(0,...(M?.categories??[]).map(e=>e.cents)),P=c.value.filter(e=>e.active&&e.remaining>0),te=()=>{if(!ee)return D(i(`Enter an amount in dollars`));O(()=>Mq(e,ee,k.id),i(`{amount} is added to the balance`,{amount:yq(ee)}),()=>{m(!1),o.reload()})},F=()=>{let t=bq(_);if(!t)return D(i(`Enter a monthly limit in dollars`));O(()=>zq(e,d.value,t),i(`Spend stops at {amount} a month`,{amount:yq(t)}),()=>{v(``),d.reload()})},I=t=>{let n=b.trim()===``||b.trim()===`0`?0:bq(b),r=bq(S);if(t&&(n===null||!r))return D(i(`Enter the balance to reload below and the amount to add, in dollars`));O(()=>jq(e,{enabled:t,threshold:n??0,amount:r??u.value?.amount??0}),t?i(`Adds {amount} whenever the balance falls below {floor}`,{amount:yq(r??0),floor:yq(n??0)}):i(`Auto-reload is off`),u.reload)};return(0,H.jsxs)(z,{gap:`$6`,"data-slot":`credits`,children:[(0,H.jsxs)(k4,{title:i(`Credits`),detail:i(h3),action:n?(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:()=>window.open(n,`_blank`,`noopener`),children:i(`Add funds`)}):p||!t?void 0:(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:()=>m(!0),children:i(`Buy more`)}),children:[(0,H.jsxs)(A4,{children:[(0,H.jsx)(j4,{first:!0,title:i(`Prepaid balance`),detail:i(`Bought with a card`),trailing:(0,H.jsx)(g3,{read:o})}),(0,H.jsx)(j4,{title:i(`Granted credit`),detail:i(`Given by Hanzo; some models take only prepaid`),trailing:(0,H.jsx)(g3,{read:s})}),(0,H.jsx)(j4,{title:i(`Spent this month`),detail:M&&!M.known?i(`The ledger did not answer, so this is not a measurement`):void 0,trailing:(0,H.jsx)(g3,{read:{...l,value:M?.total??0}})}),p?(0,H.jsx)(z,{gap:`$2`,px:`$3`,py:`$3`,borderTopWidth:1,borderColor:`$borderColor`,children:k?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(z,{width:140,children:(0,H.jsx)(C_,{value:h,onChangeText:g,"aria-label":i(`Amount in dollars`),placeholder:`25`,inputMode:`decimal`})}),(0,H.jsx)(a,{flex:1,minW:160,size:`$1`,color:`$soft`,children:i(`Charged to {card}`,{card:Sq(k)})})]}),(0,H.jsxs)(y,{gap:`$2`,justify:`flex-end`,children:[(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:()=>m(!1),children:i(`Cancel`)}),(0,H.jsx)(W,{size:`sm`,disabled:w,onPress:te,children:ee?i(`Add {amount}`,{amount:yq(ee)}):i(`Add funds`)})]})]}):(0,H.jsxs)(y,{gap:`$2`,items:`center`,flexWrap:`wrap`,children:[(0,H.jsx)(a,{flex:1,minW:160,size:`$2`,color:`$soft`,children:f.loading?i(`Reading cards…`):i(`Add a card to buy more.`)}),r?(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:r,children:i(`Add card`)}):null]})}):null]}),P.length?(0,H.jsx)(A4,{children:P.map((e,t)=>(0,H.jsx)(j4,{first:t===0,title:e.name||i(`Credit grant`),detail:[i(`{left} left of {amount}`,{left:yq(e.remaining,e.currency),amount:yq(e.amount,e.currency)}),e.expires?i(`expires {date}`,{date:N4(e.expires)}):``].filter(Boolean).join(` · `)},e.id))}):null]}),(0,H.jsx)(k4,{title:i(`Auto-reload`),detail:i(`Tops the balance up from the card on file whenever it falls below a floor.`),children:u.error?(0,H.jsx)(M4,{children:uq(u.error,i)}):u.value?(0,H.jsxs)(A4,{children:[(0,H.jsx)(j4,{first:!0,title:u.value.enabled?i(`Adds {amount} below {floor}`,{amount:yq(u.value.amount),floor:yq(u.value.threshold)}):i(`Off`),detail:u.value.last?i(`Last reloaded {date}`,{date:N4(u.value.last)}):t?void 0:i(`An org admin sets auto-reload.`),trailing:t?(0,H.jsx)(X_,{"aria-label":i(`Auto-reload`),checked:u.value.enabled,disabled:w,onCheckedChange:e=>I(e)}):void 0}),t?(0,H.jsxs)(y,{gap:`$2`,items:`center`,px:`$3`,py:`$3`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[(0,H.jsx)(z,{width:150,children:(0,H.jsx)(C_,{value:b,onChangeText:x,"aria-label":i(`Reload below, in dollars`),placeholder:i(`Below {amount}`,{amount:`$5`}),inputMode:`decimal`})}),(0,H.jsx)(z,{width:150,children:(0,H.jsx)(C_,{value:S,onChangeText:C,"aria-label":i(`Amount to add, in dollars`),placeholder:i(`Add {amount}`,{amount:`$25`}),inputMode:`decimal`})}),(0,H.jsx)(y,{flex:1,justify:`flex-end`,children:(0,H.jsx)(W,{size:`sm`,variant:`outline`,disabled:w,onPress:()=>I(!0),children:u.value.enabled?i(`Save`):i(`Turn on`)})})]}):null]}):(0,H.jsx)(M4,{children:i(`Reading auto-reload…`)})}),(0,H.jsx)(k4,{title:i(`Spend this month`),detail:i(`What credits paid for, by kind.`),children:l.error?(0,H.jsx)(M4,{children:uq(l.error,i)}):M?M.categories.length===0?(0,H.jsx)(A4,{children:(0,H.jsx)(M4,{children:i(`Nothing spent this month.`)})}):(0,H.jsx)(A4,{children:M.categories.map((e,t)=>(0,H.jsx)(v3,{first:t===0,title:e.name,used:e.cents,of:N,says:yq(e.cents),limit:!1},e.name))}):(0,H.jsx)(M4,{children:i(`Reading spend…`)})}),(0,H.jsxs)(k4,{title:i(`Monthly limit`),detail:i(`Spend from credits past it is refused until the month starts over.`),children:[d.error?(0,H.jsx)(M4,{children:uq(d.error,i)}):(0,H.jsxs)(A4,{children:[A?(0,H.jsx)(v3,{first:!0,title:i(`{amount} a month`,{amount:yq(A.threshold)}),used:A.spent??0,of:A.threshold,says:[A.spent===null?i(`Spend unknown`):i(`{amount} spent`,{amount:yq(A.spent)}),y3(A.resets,i)].filter(Boolean).join(` · `)}):(0,H.jsx)(j4,{first:!0,title:i(`No monthly limit`),detail:i(`Spend is bounded by the balance alone.`)}),j.map(e=>(0,H.jsx)(j4,{title:e.title||i(`Limit`),detail:[e.project&&i(`project {name}`,{name:e.project}),e.service&&i(`service {name}`,{name:e.service}),e.enforce?i(`refuses spend past it`):i(`warns only`)].filter(Boolean).join(` · `),trailing:(0,H.jsx)(a,{size:`$2`,color:`$ink`,children:e.threshold?yq(e.threshold):`—`})},e.id)),t?(0,H.jsxs)(y,{gap:`$2`,items:`center`,px:`$3`,py:`$3`,borderTopWidth:1,borderColor:`$borderColor`,flexWrap:`wrap`,children:[(0,H.jsx)(z,{width:160,children:(0,H.jsx)(C_,{value:_,onChangeText:v,"aria-label":i(`Monthly limit in dollars`),placeholder:A?String(A.threshold/100):`500`,inputMode:`decimal`})}),(0,H.jsxs)(y,{flex:1,gap:`$2`,justify:`flex-end`,children:[A?(0,H.jsx)(W,{size:`sm`,variant:`ghost`,disabled:w,onPress:()=>void O(()=>Bq(e,A.id),i(`The monthly limit is lifted`),d.reload),children:i(`Remove`)}):null,(0,H.jsx)(W,{size:`sm`,variant:`outline`,disabled:w||!_.trim(),onPress:F,children:i(A?`Change limit`:`Set limit`)})]})]}):null]}),t?null:(0,H.jsx)(a,{size:`$1`,color:`$soft`,children:i(`An org admin sets the monthly limit.`)})]}),(0,H.jsx)(P4,{children:E})]})}var x3={premium:D(`Premium models`),ours:D(`Hanzo models`)},S3={ok:`$ink`,near:`$yellow10`,limited:`$red10`};function C3({percent:e,state:t}){return(0,H.jsx)(z,{height:6,rounded:999,bg:`$hover`,overflow:`hidden`,role:`progressbar`,"aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":100,children:(0,H.jsx)(z,{height:6,width:`${e}%`,rounded:999,bg:S3[t]})})}function w3({title:e,w:t,first:n,says:r,now:i,children:o}){let{t:s}=R(),c=G4(t.resets,i);return(0,H.jsxs)(z,{gap:`$2`,px:`$3`,py:`$3`,borderTopWidth:+!n,borderColor:`$borderColor`,"data-slot":`plan-window`,"data-state":t.state,children:[(0,H.jsxs)(y,{items:`baseline`,justify:`space-between`,flexWrap:`wrap`,columnGap:`$3`,rowGap:`$1`,children:[(0,H.jsx)(a,{size:`$2`,color:`$ink`,children:e}),(0,H.jsx)(a,{size:`$1`,color:u3[t.state],style:{fontVariantNumeric:`tabular-nums`},children:[r??s(`{n}% used`,{n:t.percent}),c?s(`Resets {time}`,{time:c}):``].filter(Boolean).join(` · `)})]}),(0,H.jsx)(C3,{percent:t.percent,state:t.state}),o]})}function T3({s:e,target:t,onPlans:n,onBilling:r,now:i}){let{t:o}=R(),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(``),p=s??e.limits,m=p?.actions.find(e=>e.kind===`upgrade`),h=async e=>{u(!0),f(``);try{c(await a3(t,e))}catch(e){f(uq(e,o))}finally{u(!1)}},g=e=>{if(e.kind===`credits`)return void h(!0);if(e.kind===`upgrade`&&n)return n();if(e.kind===`topup`)return r();e.url&&window.location.assign(e.url)},_=e.kind===`plan`&&p?X4.filter(e=>p.classes[e]?.state===`limited`):[],v=e.kind===`plan`?p?.paused[0]??null:null,b=_.map(e=>p.classes[e].resets).sort()[0]??``,x=v?G4(v.resets,i):``,S=v?v.model.replace(/\*$/,``):``,C=_.length?J4(e.label,_,b,i,o):v?v.fallback?x?o(`{model} is paused until {time}; chat continues on {fallback}.`,{model:S,time:x,fallback:v.fallback}):o(`{model} is paused; chat continues on {fallback}.`,{model:S,fallback:v.fallback}):x?o(`{model} is paused until {time}.`,{model:S,time:x}):o(`{model} is paused.`,{model:S}):``,w=(0,H.jsxs)(y,{items:`center`,gap:`$3`,flexWrap:`wrap`,"data-slot":`plan-head`,children:[(0,H.jsxs)(z,{flex:1,minW:200,gap:`$1`,children:[e.label?(0,H.jsx)(d3,{label:e.label,size:`$5`}):null,(0,H.jsx)(a,{size:`$2`,color:`$soft`,children:e.kind===`plan`?p?.start&&p.end?o(`Current period {start} – {end}`,{start:N4(p.start),end:N4(p.end)}):o(`Your plan`):e.kind===`free`?o(`Limited usage of free models, from a pool every free account shares.`):o(`No plan. Usage is paid from your credits.`)})]}),m&&!C||e.kind!==`plan`&&n?(0,H.jsx)(W,{size:`sm`,variant:e.kind===`plan`?`outline`:`primary`,onPress:()=>m?g(m):n?.(),children:m?.label||o(`Upgrade`)}):null]});if(e.kind===`free`){let t=l3(e.allowance),n=e.allowance;return(0,H.jsxs)(z,{gap:`$5`,"data-slot":`plan-usage`,"data-kind":`free`,children:[w,n&&t!==null?(0,H.jsxs)(A4,{children:[(0,H.jsx)(w3,{first:!0,title:n.window===`hour`?o(`This hour`):o(`Today`),w:{percent:100-t,state:t===0?`limited`:t<=20?`near`:`ok`,resets:n.resets},says:o(`{n}% left`,{n:t}),now:i}),n.pool?(0,H.jsx)(j4,{title:o(`Shared pool`),detail:n.pool.state===`exhausted`?G4(n.pool.resets,i)?o(`Used up until {time}`,{time:G4(n.pool.resets,i)}):o(`Used up`):n.pool.state===`busy`?o(`Busy. Try again in a minute.`):o(`Every free request is being served.`)}):null]}):(0,H.jsx)(M4,{children:o(`The free allowance could not be read.`)}),(0,H.jsxs)(y,{items:`center`,gap:`$3`,flexWrap:`wrap`,children:[(0,H.jsx)(a,{size:`$2`,color:`$soft`,flex:1,minW:200,children:o(`Credits pay as you go for any model, with or without a plan.`)}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:r,children:o(`Add credits`)})]})]})}if(e.kind===`credits`)return(0,H.jsxs)(z,{gap:`$5`,"data-slot":`plan-usage`,"data-kind":`credits`,children:[w,(0,H.jsx)(A4,{children:(0,H.jsx)(j4,{first:!0,title:o(`Credits`),detail:o(`What your usage is paid from, at each model’s list price.`),trailing:(0,H.jsx)(a,{size:`$2`,color:`$ink`,"data-slot":`plan-balance`,children:e.balance===null?o(`Unavailable`):yq(e.balance)})})}),(0,H.jsx)(y,{children:(0,H.jsx)(W,{size:`sm`,variant:`outline`,onPress:r,children:o(`Add funds`)})})]});let T=p?.credits??!1;return(0,H.jsxs)(z,{gap:`$5`,"data-slot":`plan-usage`,"data-kind":`plan`,children:[w,C?(0,H.jsxs)(y,{items:`center`,gap:`$2.5`,flexWrap:`wrap`,px:`$3`,py:`$2.5`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,"data-slot":`plan-spent`,children:[(0,H.jsx)(z,{width:8,height:8,rounded:4,bg:`$red10`,shrink:0,"aria-hidden":!0}),(0,H.jsx)(a,{size:`$2`,color:`$ink`,flex:1,minW:200,children:C}),(0,H.jsx)(y,{gap:`$2`,flexWrap:`wrap`,children:Y4(p?.actions??[],o).map((e,t)=>(0,H.jsx)(W,{size:`sm`,variant:t===0?`primary`:`outline`,disabled:l,"data-kind":e.kind,onPress:()=>g(e),children:e.label},e.kind))})]}):null,p?!p.session&&!p.day&&!Object.keys(p.classes).length?(0,H.jsx)(M4,{children:o(`This plan sets no usage limits.`)}):(0,H.jsxs)(H.Fragment,{children:[p.session||p.day?(0,H.jsx)(k4,{title:o(`Requests`),detail:o(`Every request the plan covers counts in both.`),children:(0,H.jsxs)(A4,{children:[p.session?(0,H.jsx)(w3,{first:!0,title:o(`Session`),w:p.session,says:p.session.resets?void 0:[o(`{n}% used`,{n:p.session.percent}),o(`Starts with your next request`)].join(` · `),now:i}):null,p.day?(0,H.jsx)(w3,{first:!p.session,title:o(`Today`),w:p.day,now:i}):null]})}):null,Object.keys(p.classes).length?(0,H.jsx)(k4,{title:o(`By model class`),detail:o(`Each class’s share of the billing period, and of its shorter window where the plan sets one.`),children:(0,H.jsx)(A4,{children:X4.filter(e=>p.classes[e]).map((e,t)=>{let n=p.classes[e];return(0,H.jsx)(z,{"data-class":e,children:(0,H.jsx)(w3,{first:t===0,title:o(x3[e]),w:n,says:n.paying===`credits`?[o(`{n}% used`,{n:n.percent}),o(`Paying from credits`)].join(` · `):void 0,now:i,children:n.window?(0,H.jsxs)(y,{gap:`$2`,items:`center`,"data-slot":`plan-short`,children:[(0,H.jsx)(a,{size:`$1`,color:`$soft`,shrink:0,children:o(`Shorter window`)}),(0,H.jsx)(z,{flex:1,children:(0,H.jsx)(C3,{percent:n.window.percent,state:n.window.state})}),(0,H.jsx)(a,{size:`$1`,color:`$soft`,shrink:0,children:[`${n.window.percent}%`,G4(n.window.resets,i)?o(`Resets {time}`,{time:G4(n.window.resets,i)}):``].filter(Boolean).join(` · `)})]}):null})},e)})})}):null,(0,H.jsx)(k4,{title:o(`When the allowance runs out`),detail:o(`Credits are separate from your plan’s usage allowance. They live in Billing.`),children:(0,H.jsxs)(A4,{children:[(0,H.jsx)(j4,{first:!0,title:o(`Use credits when my plan’s allowance runs out`),detail:o(T?`On. A model whose included usage is used keeps working, paid from credits — prepaid first, then granted credit where the model takes it — at its list price.`:`Off. Chat continues on a free model, and other requests wait for the plan to reset.`),trailing:(0,H.jsx)(X_,{"aria-label":o(`Use credits when my plan’s allowance runs out`),checked:T,disabled:l,onCheckedChange:e=>void h(e)})}),(0,H.jsx)(j4,{title:o(`Credits`),detail:e.balance===0?o(`There are no credits to spend yet.`):o(`The balance, top-ups and auto-reload.`),trailing:(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:r,children:e.balance===0?o(`Add credits`):o(`Billing`)})})]})})]}):(0,H.jsx)(M4,{children:o(`The plan’s usage could not be read.`)}),(0,H.jsx)(P4,{children:d})]})}function E3({target:e,onPlans:t,onBilling:n,now:r}){let{t:i}=R(),a=c3(e);return a.value?(0,H.jsx)(T3,{s:a.value,target:e,onPlans:t,onBilling:n,now:r}):(0,H.jsx)(M4,{children:a.error?uq(a.error,i):i(`Reading the plan…`)})}function D3(e){if(e.includes(`/`)){let[t,...n]=e.split(`/`);return{org:t,slug:n.join(`/`)}}return{org:`hanzo`,slug:e}}var O3={hanzo:`Hanzo`,openai:`OpenAI`,anthropic:`Anthropic`,google:`Google`,"meta-llama":`Meta`,"x-ai":`xAI`,mistralai:`Mistral`,deepseek:`DeepSeek`,qwen:`Qwen`,nvidia:`NVIDIA`,"z-ai":`Z.ai`,"arcee-ai":`Arcee AI`,minimax:`Minimax`,allenai:`Allen AI`,nousresearch:`Nous Research`,liquid:`Liquid AI`,moonshotai:`Moonshot AI`,amazon:`Amazon`,perplexity:`Perplexity`,baidu:`Baidu`,cohere:`Cohere`,"bytedance-seed":`ByteDance Seed`,openrouter:`OpenRouter`,microsoft:`Microsoft`,inflection:`Inflection`,sao10k:`Sao10K`,"aion-labs":`Aion Labs`,thedrummer:`TheDrummer`,stepfun:`StepFun`,relace:`Relace`,morph:`Morph`,inception:`Inception`,neversleep:`NeverSleep`,upstage:`Upstage`,writer:`Writer`,xiaomi:`Xiaomi`,"nex-agi":`Nex-AGI`,essentialai:`EssentialAI`,"prime-intellect":`Prime Intellect`,deepcogito:`DeepCogito`,kwaipilot:`KwaiPilot`,"ibm-granite":`IBM Granite`,alibaba:`Alibaba`,opengvlab:`OpenGVLab`,meituan:`Meituan`,ai21:`AI21`,bytedance:`ByteDance`,switchpoint:`Switchpoint`,cognitivecomputations:`Cognitive Computations`,tencent:`Tencent`,tngtech:`TNG Tech`,eleutherai:`EleutherAI`,alfredpros:`AlfredPros`,raifle:`Raifle`,"anthracite-org":`Anthracite`,alpindale:`Alpindale`,mancer:`Mancer`,undi95:`Undi95`,gryphe:`Gryphe`,meta:`Meta`,inclusionai:`inclusionAI`,thinkingmachines:`Thinking Machines`,rekaai:`Reka AI`,sakana:`Sakana AI`,perceptron:`Perceptron`};function k3(e){return e?O3[e]??e:`Hanzo`}var A3=`<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>`,j3=`</title><path d="`,M3=`"/></svg>`,N3={title:`Adroll`,slug:`adroll`,get svg(){return A3+`Adroll`+j3+this.path+M3},path:`M24 12c0-6.01-4.727-10.886-10.886-10.886a10.863 10.863 0 0 0-9.508 5.578L8.914 12c0-2.323 1.958-4.2 4.2-4.2 2.377 0 4.2 1.877 4.2 4.2s-1.836 4.2-4.2 4.2H4.065A4.07 4.07 0 0 0 0 20.266v2.62h13.114C19.232 22.886 24 18.01 24 12`,source:`https://www.adroll.com`,hex:`0DBDFF`},P3={title:`Cloudflare`,slug:`cloudflare`,get svg(){return A3+`Cloudflare`+j3+this.path+M3},path:`M16.5088 16.8447c.1475-.5068.0908-.9707-.1553-1.3154-.2246-.3164-.6045-.499-1.0615-.5205l-8.6592-.1123a.1559.1559 0 0 1-.1333-.0713c-.0283-.042-.0351-.0986-.021-.1553.0278-.084.1123-.1484.2036-.1562l8.7359-.1123c1.0351-.0489 2.1601-.8868 2.5537-1.9136l.499-1.3013c.0215-.0561.0293-.1128.0147-.168-.5625-2.5463-2.835-4.4453-5.5499-4.4453-2.5039 0-4.6284 1.6177-5.3876 3.8614-.4927-.3658-1.1187-.5625-1.794-.499-1.2026.119-2.1665 1.083-2.2861 2.2856-.0283.31-.0069.6128.0635.894C1.5683 13.171 0 14.7754 0 16.752c0 .1748.0142.3515.0352.5273.0141.083.0844.1475.1689.1475h15.9814c.0909 0 .1758-.0645.2032-.1553l.12-.4268zm2.7568-5.5634c-.0771 0-.1611 0-.2383.0112-.0566 0-.1054.0415-.127.0976l-.3378 1.1744c-.1475.5068-.0918.9707.1543 1.3164.2256.3164.6055.498 1.0625.5195l1.8437.1133c.0557 0 .1055.0263.1329.0703.0283.043.0351.1074.0214.1562-.0283.084-.1132.1485-.204.1553l-1.921.1123c-1.041.0488-2.1582.8867-2.5527 1.914l-.1406.3585c-.0283.0713.0215.1416.0986.1416h6.5977c.0771 0 .1474-.0489.169-.126.1122-.4082.1757-.837.1757-1.2803 0-2.6025-2.125-4.727-4.7344-4.727`,source:`https://www.cloudflare.com/logo/`,hex:`F38020`,guidelines:`https://www.cloudflare.com/trademark/`},F3={title:`Discord`,slug:`discord`,get svg(){return A3+`Discord`+j3+this.path+M3},path:`M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z`,source:`https://discord.com/branding`,hex:`5865F2`,guidelines:`https://discord.com/branding`},I3={title:`Facebook`,slug:`facebook`,get svg(){return A3+`Facebook`+j3+this.path+M3},path:`M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z`,source:`https://about.meta.com/brand/resources/facebook/logo`,hex:`0866FF`,guidelines:`https://about.meta.com/brand/resources/facebook/logo`},L3={title:`Farcaster`,slug:`farcaster`,get svg(){return A3+`Farcaster`+j3+this.path+M3},path:`M18.24.24H5.76C2.5789.24 0 2.8188 0 6v12c0 3.1811 2.5789 5.76 5.76 5.76h12.48c3.1812 0 5.76-2.5789 5.76-5.76V6C24 2.8188 21.4212.24 18.24.24m.8155 17.1662v.504c.2868-.0256.5458.1905.5439.479v.5688h-5.1437v-.5688c-.0019-.2885.2576-.5047.5443-.479v-.504c0-.22.1525-.402.358-.458l-.0095-4.3645c-.1589-1.7366-1.6402-3.0979-3.4435-3.0979-1.8038 0-3.2846 1.3613-3.4435 3.0979l-.0096 4.3578c.2276.0424.5318.2083.5395.4648v.504c.2863-.0256.5457.1905.5438.479v.5688H4.3915v-.5688c-.0019-.2885.2575-.5047.5438-.479v-.504c0-.2529.2011-.4548.4536-.4724v-7.895h-.4905L4.2898 7.008l2.6405-.0005V5.0419h9.9495v1.9656h2.8219l-.6091 2.0314h-.4901v7.8949c.2519.0177.453.2195.453.4724`,source:`https://www.farcaster.xyz`,hex:`855DCD`},R3={title:`GitHub`,slug:`github`,get svg(){return A3+`GitHub`+j3+this.path+M3},path:`M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12`,source:`https://github.com/logos`,hex:`181717`,guidelines:`https://github.com/logos`},z3={title:`GitLab`,slug:`gitlab`,get svg(){return A3+`GitLab`+j3+this.path+M3},path:`m23.6004 9.5927-.0337-.0862L20.3.9814a.851.851 0 0 0-.3362-.405.8748.8748 0 0 0-.9997.0539.8748.8748 0 0 0-.29.4399l-2.2055 6.748H7.5375l-2.2057-6.748a.8573.8573 0 0 0-.29-.4412.8748.8748 0 0 0-.9997-.0537.8585.8585 0 0 0-.3362.4049L.4332 9.5015l-.0325.0862a6.0657 6.0657 0 0 0 2.0119 7.0105l.0113.0087.03.0213 4.976 3.7264 2.462 1.8633 1.4995 1.1321a1.0085 1.0085 0 0 0 1.2197 0l1.4995-1.1321 2.4619-1.8633 5.006-3.7489.0125-.01a6.0682 6.0682 0 0 0 2.0094-7.003z`,source:`https://about.gitlab.com/press/press-kit/`,hex:`FC6D26`,guidelines:`https://about.gitlab.com/handbook/marketing/corporate-marketing/brand-activation/trademark-guidelines/`},B3={title:`Gmail`,slug:`gmail`,get svg(){return A3+`Gmail`+j3+this.path+M3},path:`M24 5.457v13.909c0 .904-.732 1.636-1.636 1.636h-3.819V11.73L12 16.64l-6.545-4.91v9.273H1.636A1.636 1.636 0 0 1 0 19.366V5.457c0-2.023 2.309-3.178 3.927-1.964L5.455 4.64 12 9.548l6.545-4.91 1.528-1.145C21.69 2.28 24 3.434 24 5.457z`,source:`https://fonts.gstatic.com/s/i/productlogos/gmail_2020q4/v8/192px.svg`,hex:`EA4335`},V3={title:`Google Ads`,slug:`googleads`,get svg(){return A3+`Google Ads`+j3+this.path+M3},path:`M3.9998 22.9291C1.7908 22.9291 0 21.1383 0 18.9293s1.7908-3.9998 3.9998-3.9998 3.9998 1.7908 3.9998 3.9998-1.7908 3.9998-3.9998 3.9998zm19.4643-6.0004L15.4632 3.072C14.3586 1.1587 11.9121.5028 9.9988 1.6074S7.4295 5.1585 8.5341 7.0718l8.0009 13.8567c1.1046 1.9133 3.5511 2.5679 5.4644 1.4646 1.9134-1.1046 2.568-3.5511 1.4647-5.4644zM7.5137 4.8438L1.5645 15.1484A4.5 4.5 0 0 1 4 14.4297c2.5597-.0075 4.6248 2.1585 4.4941 4.7148l3.2168-5.5723-3.6094-6.25c-.4499-.7793-.6322-1.6394-.5878-2.4784z`,source:`https://ads.google.com/home/`,hex:`4285F4`},H3={title:`Google Chrome`,slug:`googlechrome`,get svg(){return A3+`Google Chrome`+j3+this.path+M3},path:`M12 0C8.21 0 4.831 1.757 2.632 4.501l3.953 6.848A5.454 5.454 0 0 1 12 6.545h10.691A12 12 0 0 0 12 0zM1.931 5.47A11.943 11.943 0 0 0 0 12c0 6.012 4.42 10.991 10.189 11.864l3.953-6.847a5.45 5.45 0 0 1-6.865-2.29zm13.342 2.166a5.446 5.446 0 0 1 1.45 7.09l.002.001h-.002l-5.344 9.257c.206.01.413.016.621.016 6.627 0 12-5.373 12-12 0-1.54-.29-3.011-.818-4.364zM12 16.364a4.364 4.364 0 1 1 0-8.728 4.364 4.364 0 0 1 0 8.728Z`,source:`https://www.google.com/chrome`,hex:`4285F4`,guidelines:`https://partnermarketinghub.withgoogle.com/brands/chrome`},U3={title:`iCloud`,slug:`icloud`,get svg(){return A3+`iCloud`+j3+this.path+M3},path:`M13.762 4.29a6.51 6.51 0 0 0-5.669 3.332 3.571 3.571 0 0 0-1.558-.36 3.571 3.571 0 0 0-3.516 3A4.918 4.918 0 0 0 0 14.796a4.918 4.918 0 0 0 4.92 4.914 4.93 4.93 0 0 0 .617-.045h14.42c2.305-.272 4.041-2.258 4.043-4.589v-.009a4.594 4.594 0 0 0-3.727-4.508 6.51 6.51 0 0 0-6.511-6.27z`,source:`https://commons.wikimedia.org/wiki/File:ICloud_logo.svg`,hex:`3693F3`},W3={title:`Instagram`,slug:`instagram`,get svg(){return A3+`Instagram`+j3+this.path+M3},path:`M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077`,source:`https://about.meta.com/brand/resources/instagram`,hex:`FF0069`,guidelines:`https://about.meta.com/brand/resources/instagram`},G3={title:`Messenger`,slug:`messenger`,get svg(){return A3+`Messenger`+j3+this.path+M3},path:`M12 0C5.24 0 0 4.952 0 11.64c0 3.499 1.434 6.521 3.769 8.61a.96.96 0 0 1 .323.683l.065 2.135a.96.96 0 0 0 1.347.85l2.381-1.053a.96.96 0 0 1 .641-.046A13 13 0 0 0 12 23.28c6.76 0 12-4.952 12-11.64S18.76 0 12 0m6.806 7.44c.522-.03.971.567.63 1.094l-4.178 6.457a.707.707 0 0 1-.977.208l-3.87-2.504a.44.44 0 0 0-.49.007l-4.363 3.01c-.637.438-1.415-.317-.995-.966l4.179-6.457a.706.706 0 0 1 .977-.21l3.87 2.505c.15.097.344.094.491-.007l4.362-3.008a.7.7 0 0 1 .364-.13`,source:`https://about.meta.com/brand/resources/facebook/messenger-icon`,hex:`0866FF`,guidelines:`https://about.meta.com/brand/resources/facebook/messenger-icon`},K3={title:`Meta`,slug:`meta`,get svg(){return A3+`Meta`+j3+this.path+M3},path:`M6.915 4.03c-1.968 0-3.683 1.28-4.871 3.113C.704 9.208 0 11.883 0 14.449c0 .706.07 1.369.21 1.973a6.624 6.624 0 0 0 .265.86 5.297 5.297 0 0 0 .371.761c.696 1.159 1.818 1.927 3.593 1.927 1.497 0 2.633-.671 3.965-2.444.76-1.012 1.144-1.626 2.663-4.32l.756-1.339.186-.325c.061.1.121.196.183.3l2.152 3.595c.724 1.21 1.665 2.556 2.47 3.314 1.046.987 1.992 1.22 3.06 1.22 1.075 0 1.876-.355 2.455-.843a3.743 3.743 0 0 0 .81-.973c.542-.939.861-2.127.861-3.745 0-2.72-.681-5.357-2.084-7.45-1.282-1.912-2.957-2.93-4.716-2.93-1.047 0-2.088.467-3.053 1.308-.652.57-1.257 1.29-1.82 2.05-.69-.875-1.335-1.547-1.958-2.056-1.182-.966-2.315-1.303-3.454-1.303zm10.16 2.053c1.147 0 2.188.758 2.992 1.999 1.132 1.748 1.647 4.195 1.647 6.4 0 1.548-.368 2.9-1.839 2.9-.58 0-1.027-.23-1.664-1.004-.496-.601-1.343-1.878-2.832-4.358l-.617-1.028a44.908 44.908 0 0 0-1.255-1.98c.07-.109.141-.224.211-.327 1.12-1.667 2.118-2.602 3.358-2.602zm-10.201.553c1.265 0 2.058.791 2.675 1.446.307.327.737.871 1.234 1.579l-1.02 1.566c-.757 1.163-1.882 3.017-2.837 4.338-1.191 1.649-1.81 1.817-2.486 1.817-.524 0-1.038-.237-1.383-.794-.263-.426-.464-1.13-.464-2.046 0-2.221.63-4.535 1.66-6.088.454-.687.964-1.226 1.533-1.533a2.264 2.264 0 0 1 1.088-.285z`,source:`https://www.meta.com`,hex:`0467DF`,guidelines:`https://www.facebook.com/brand/resources/meta/company-brand`},q3={title:`Pinterest`,slug:`pinterest`,get svg(){return A3+`Pinterest`+j3+this.path+M3},path:`M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.663.967-2.911 2.168-2.911 1.024 0 1.518.769 1.518 1.688 0 1.029-.653 2.567-.992 3.992-.285 1.193.6 2.165 1.775 2.165 2.128 0 3.768-2.245 3.768-5.487 0-2.861-2.063-4.869-5.008-4.869-3.41 0-5.409 2.562-5.409 5.199 0 1.033.394 2.143.889 2.741.099.12.112.225.085.345-.09.375-.293 1.199-.334 1.363-.053.225-.172.271-.401.165-1.495-.69-2.433-2.878-2.433-4.646 0-3.776 2.748-7.252 7.92-7.252 4.158 0 7.392 2.967 7.392 6.923 0 4.135-2.607 7.462-6.233 7.462-1.214 0-2.354-.629-2.758-1.379l-.749 2.848c-.269 1.045-1.004 2.352-1.498 3.146 1.123.345 2.306.535 3.55.535 6.607 0 11.985-5.365 11.985-11.987C23.97 5.39 18.592.026 11.985.026L12.017 0z`,source:`https://business.pinterest.com/en/brand-guidelines`,hex:`BD081C`,guidelines:`https://business.pinterest.com/en/brand-guidelines`},J3={title:`Reddit`,slug:`reddit`,get svg(){return A3+`Reddit`+j3+this.path+M3},path:`M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z`,source:`https://www.redditinc.com/brand`,hex:`FF4500`,guidelines:`https://www.redditinc.com/brand`},Y3={title:`Signal`,slug:`signal`,get svg(){return A3+`Signal`+j3+this.path+M3},path:`M12 0q-.934 0-1.83.139l.17 1.111a11 11 0 0 1 3.32 0l.172-1.111A12 12 0 0 0 12 0M9.152.34A12 12 0 0 0 5.77 1.742l.584.961a10.8 10.8 0 0 1 3.066-1.27zm5.696 0-.268 1.094a10.8 10.8 0 0 1 3.066 1.27l.584-.962A12 12 0 0 0 14.848.34M12 2.25a9.75 9.75 0 0 0-8.539 14.459c.074.134.1.292.064.441l-1.013 4.338 4.338-1.013a.62.62 0 0 1 .441.064A9.7 9.7 0 0 0 12 21.75c5.385 0 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25m-7.092.068a12 12 0 0 0-2.59 2.59l.909.664a11 11 0 0 1 2.345-2.345zm14.184 0-.664.909a11 11 0 0 1 2.345 2.345l.909-.664a12 12 0 0 0-2.59-2.59M1.742 5.77A12 12 0 0 0 .34 9.152l1.094.268a10.8 10.8 0 0 1 1.269-3.066zm20.516 0-.961.584a10.8 10.8 0 0 1 1.27 3.066l1.093-.268a12 12 0 0 0-1.402-3.383M.138 10.168A12 12 0 0 0 0 12q0 .934.139 1.83l1.111-.17A11 11 0 0 1 1.125 12q0-.848.125-1.66zm23.723.002-1.111.17q.125.812.125 1.66c0 .848-.042 1.12-.125 1.66l1.111.172a12.1 12.1 0 0 0 0-3.662M1.434 14.58l-1.094.268a12 12 0 0 0 .96 2.591l-.265 1.14 1.096.255.36-1.539-.188-.365a10.8 10.8 0 0 1-.87-2.35m21.133 0a10.8 10.8 0 0 1-1.27 3.067l.962.584a12 12 0 0 0 1.402-3.383zm-1.793 3.848a11 11 0 0 1-2.345 2.345l.664.909a12 12 0 0 0 2.59-2.59zm-19.959 1.1L.357 21.48a1.8 1.8 0 0 0 2.162 2.161l1.954-.455-.256-1.095-1.953.455a.675.675 0 0 1-.81-.81l.454-1.954zm16.832 1.769a10.8 10.8 0 0 1-3.066 1.27l.268 1.093a12 12 0 0 0 3.382-1.402zm-10.94.213-1.54.36.256 1.095 1.139-.266c.814.415 1.683.74 2.591.961l.268-1.094a10.8 10.8 0 0 1-2.35-.869zm3.634 1.24-.172 1.111a12.1 12.1 0 0 0 3.662 0l-.17-1.111q-.812.125-1.66.125a11 11 0 0 1-1.66-.125`,source:`https://signal.org/brand`,hex:`3B45FD`,guidelines:`https://signal.org/brand`},X3={title:`Telegram`,slug:`telegram`,get svg(){return A3+`Telegram`+j3+this.path+M3},path:`M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z`,source:`https://telegram.org/tour/screenshots`,hex:`26A5E4`},Z3={title:`Threads`,slug:`threads`,get svg(){return A3+`Threads`+j3+this.path+M3},path:`M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543 1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735.798.361 1.348 1.204 1.348 2.47 0 3.387-3.907 5.232-7.22 5.232-4.885 0-8.077-3.207-8.077-8.424 0-6.392 4.223-10.487 9.9-10.487 3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0 6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066 4.878 0 9.809-2.846 9.809-7.716 0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453 0-1.483 1.822-1.934 3.606-1.934.678 0 1.34.045 1.927.173-.422 1.927-1.671 3.215-3.508 3.214Z`,source:`https://www.meta.com/brand/resources/instagram/threads`,hex:`000000`,guidelines:`https://www.meta.com/brand/resources/instagram/threads`},Q3={title:`TikTok`,slug:`tiktok`,get svg(){return A3+`TikTok`+j3+this.path+M3},path:`M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z`,source:`https://tiktok.com`,hex:`000000`},$3={title:`Twitch`,slug:`twitch`,get svg(){return A3+`Twitch`+j3+this.path+M3},path:`M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z`,source:`https://brand.twitch.tv`,hex:`9146FF`,guidelines:`https://brand.twitch.tv`},e6={title:`WhatsApp`,slug:`whatsapp`,get svg(){return A3+`WhatsApp`+j3+this.path+M3},path:`M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z`,source:`https://about.meta.com/brand/resources/whatsapp/whatsapp-brand`,hex:`25D366`,guidelines:`https://about.meta.com/brand/resources/whatsapp/whatsapp-brand`},t6={title:`X`,slug:`x`,get svg(){return A3+`X`+j3+this.path+M3},path:`M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z`,source:`https://x.com`,hex:`000000`,guidelines:`https://about.x.com/en/who-we-are/brand-toolkit`},n6={title:`YouTube`,slug:`youtube`,get svg(){return A3+`YouTube`+j3+this.path+M3},path:`M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z`,source:`https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors`,hex:`FF0000`,guidelines:`https://www.youtube.com/howyoutubeworks/resources/brand-resources/#logos-icons-and-colors`},r6={title:`Zoom`,slug:`zoom`,get svg(){return A3+`Zoom`+j3+this.path+M3},path:`M5.033 14.649H.743a.74.74 0 0 1-.686-.458.74.74 0 0 1 .16-.808L3.19 10.41H1.06A1.06 1.06 0 0 1 0 9.35h3.957c.301 0 .57.18.686.458a.74.74 0 0 1-.161.808L1.51 13.59h2.464c.585 0 1.06.475 1.06 1.06zM24 11.338c0-1.14-.927-2.066-2.066-2.066-.61 0-1.158.265-1.537.686a2.061 2.061 0 0 0-1.536-.686c-1.14 0-2.066.926-2.066 2.066v3.311a1.06 1.06 0 0 0 1.06-1.06v-2.251a1.004 1.004 0 0 1 2.013 0v2.251c0 .586.474 1.06 1.06 1.06v-3.311a1.004 1.004 0 0 1 2.012 0v2.251c0 .586.475 1.06 1.06 1.06zM16.265 12a2.728 2.728 0 1 1-5.457 0 2.728 2.728 0 0 1 5.457 0zm-1.06 0a1.669 1.669 0 1 0-3.338 0 1.669 1.669 0 0 0 3.338 0zm-4.82 0a2.728 2.728 0 1 1-5.458 0 2.728 2.728 0 0 1 5.457 0zm-1.06 0a1.669 1.669 0 1 0-3.338 0 1.669 1.669 0 0 0 3.338 0z`,source:`https://brand.zoom.us/media-library/`,hex:`0B5CFF`,guidelines:`https://brand.zoom.us/usage-legal/`},i6={enso:UZ,hanzo:`<g transform="scale(0.3582089552238806)">${HZ}</g>`,ai2:`<path d="M9.553 9.378H4.777V4.835H8.62c.513 0 .932-.42.932-.932V.058h4.544v4.777a4.542 4.542 0 01-4.544 4.543zm-4.776.467H0v4.543h3.845c.512 0 .932.42.932.932v3.845H9.32v-4.777a4.542 4.542 0 00-4.543-4.543zM20.05 9.61a.935.935 0 01-.932-.932V4.835h-4.543V9.61a4.542 4.542 0 004.543 4.544h4.777V9.612H20.05zM9.787 19.166v4.777h4.544v-3.845c0-.513.42-.932.932-.932h3.845V14.62H14.33a4.542 4.542 0 00-4.544 4.544z"></path>`,ai21:`<path d="M6.47 17l-.367-1.189H2.718L2.35 17H0l3.398-9.789h2.026L8.864 17H6.47zm-2.052-6.993l-1.17 4.028H5.56l-1.142-4.028zm4.707-2.796h2.23V17h-2.23V7.211zM11.955 15c.1-.483.277-.946.524-1.37.214-.359.482-.68.795-.951.32-.273.658-.52 1.013-.741.28-.168.54-.33.781-.483.222-.14.433-.296.632-.468.172-.148.317-.325.428-.525.107-.199.16-.423.157-.65 0-.392-.104-.674-.313-.846a1.176 1.176 0 00-.775-.259 1.207 1.207 0 00-.863.329c-.231.219-.347.585-.347 1.098H11.8a3.387 3.387 0 01.224-1.245c.146-.377.371-.716.66-.993.306-.29.667-.514 1.06-.657A4.04 4.04 0 0115.183 7c.42-.002.84.057 1.244.175.376.107.73.287 1.04.531.305.246.55.562.714.923.185.419.275.875.265 1.335.005.39-.084.774-.259 1.12-.167.328-.38.63-.632.894-.246.259-.517.49-.808.693-.29.2-.554.37-.789.51-.326.224-.596.417-.809.58a3.872 3.872 0 00-.51.455 1.229 1.229 0 00-.265.434 1.633 1.633 0 00-.074.517h4.078V17h-6.606a9.24 9.24 0 01.183-2zM18.8 8.93a5.05 5.05 0 001.135-.105c.25-.049.484-.156.686-.314.163-.139.28-.324.34-.532.068-.25.1-.51.095-.77H23V17h-2.243v-6.475H18.8V8.93z"></path>`,aionlabs:`<path d="M8.303.964c.038.016.064.01.076-.016a.487.487 0 00.048-.034L8.76.66a2.845 2.845 0 011.5-.575c.078-.007.148-.007.211 0 .12.01.19.016.21.016.01 0 .02 0 .029.004a.416.416 0 00.148.021c.016 0 .031.002.046.006a.303.303 0 00.15.015c.34-.085.613-.133.82-.144.191-.01.42.012.688.067.454.092.864.288 1.23.588.048.04.13.114.249.223.007.006.015.01.024.011.037.006.07.001.099-.015a1.06 1.06 0 01.716-.12l.367.022c.235.023.446.083.632.18.096.048.223.128.383.238a.05.05 0 00.025.009c.047.003.091-.035.125-.03.033.004.068-.02.106-.024a3.47 3.47 0 01.815 0c.135.015.264.047.386.097.306.127.583.296.83.507.3.255.57.55.765.9.133.239.22.455.263.65.021.1.046.224.073.372.002.01.005.018.009.028.07.172.167.335.23.508.04.113.07.208.087.286.024.108.047.239.069.394.006.051.018.108.034.17a.142.142 0 00.046.073c.273.233.49.514.617.841.037.095.06.207.068.337.013.199.02.41-.042.598-.046.143-.076.23-.089.26a.085.085 0 00-.005.047c.016.105.023.18.02.225-.013.152-.021.265-.026.34a1.14 1.14 0 01-.121.43c-.247.5-.7.773-1.25.844a.236.236 0 00-.09.038c-.018.01-.02.034-.007.07a.062.062 0 01.003.023 2.592 2.592 0 01-.068.463c-.068.3-.205.55-.41.748a1.68 1.68 0 01-.742.41c-.036.01-.116.022-.24.034a.033.033 0 00-.027.022c-.01.033 0 .097-.017.15-.023.069-.006.17-.026.239-.02.065-.015.134-.024.215-.006.044-.023.163-.053.357a12.686 12.686 0 01-1.535 4.4c-.105.184-.23.366-.363.564a.07.07 0 00-.01.052c.089.486.185.956.32 1.416.08.272.182.523.383.715.057.054.155.121.296.203.63.367 1.277.656 1.985.963a.019.019 0 01.007.005.02.02 0 01.004.008.02.02 0 010 .009 2.052 2.052 0 01-.135.176c-.757.875-1.549 1.639-2.448 2.277a7.977 7.977 0 01-2.65 1.23.417.417 0 01-.087.017c-.01 0-.019.002-.027.008-.04.027-.092.01-.138.037a.063.063 0 01-.033.008.275.275 0 00-.12.02.081.081 0 01-.028.007c-.14.004-.259.029-.387.031-.327.007-.686.034-1.02.025a8.142 8.142 0 01-.646-.037 5.625 5.625 0 01-.613-.13 6.23 6.23 0 01-1.764-.73 4.407 4.407 0 01-1.199-1.098 1.296 1.296 0 01-.276-.625.734.734 0 00-.029-.163.679.679 0 00-.022-.192.17.17 0 01-.006-.045.648.648 0 00-.008-.127c-.025-.112-.02-.18-.037-.31a22.16 22.16 0 00-.173-1.086.667.667 0 01-.012-.104c-.002-.053-.027-.086-.026-.14a.28.28 0 00-.023-.129.051.051 0 01-.005-.027.358.358 0 00-.016-.134c-.023-.06-.008-.123-.036-.198a.1.1 0 01-.006-.036.33.33 0 00-.012-.115c-.026-.069-.008-.136-.04-.208a.063.063 0 01-.004-.027.357.357 0 00-.015-.124c-.023-.064-.006-.12-.03-.18-.021-.052-.004-.119-.028-.17-.025-.055-.008-.125-.032-.187-.019-.047-.003-.093-.023-.148-.02-.06-.008-.13-.032-.184-.016-.036-.01-.079-.019-.125l-.05-.267a.98.98 0 00-.061-.24.022.022 0 00-.02-.014.278.278 0 01-.07-.019 2.243 2.243 0 01-.69-.397 1.597 1.597 0 01-.48-.695 2.39 2.39 0 01-.104-.4c-.03-.17-.147-.303-.217-.43a1.498 1.498 0 01-.142-.384c-.01-.041-.004-.115-.028-.147a.017.017 0 01.004-.024c.018-.013.024-.044.016-.092-.006-.037-.024-.055-.053-.054a.03.03 0 01-.013-.002.03.03 0 01-.01-.008c-.26-.308-.456-.554-.545-.897a2.623 2.623 0 01-.086-.483 4.554 4.554 0 00-.021-.279.02.02 0 01-.005-.014.497.497 0 00.046-.183.323.323 0 00-.056-.251.123.123 0 01-.023-.052l-.078-.394a.114.114 0 01-.002-.037c.017-.149.028-.237.034-.264.045-.212.126-.406.244-.583a.025.025 0 00.004-.018.026.026 0 00-.01-.015 2.888 2.888 0 01-.927-1.357A2.66 2.66 0 013 8.36c.001-.148.008-.28.02-.397a2.276 2.276 0 01.656-1.395c.166-.168.356-.318.572-.452.037-.022.053-.053.05-.092a.417.417 0 00-.024-.103.077.077 0 01-.005-.028 20.28 20.28 0 01.004-1.105c.006-.126.038-.28.096-.462.175-.556.438-1.015.79-1.379.215-.222.449-.4.7-.535.162-.087.314-.142.396-.252.173-.233.373-.45.6-.65.312-.274.68-.447 1.103-.519.104-.017.229-.01.345-.027zm.106.32l-.24-.047a1.42 1.42 0 00-.59.115c-.674.296-1.225.917-1.414 1.616-.045.17-.053.305-.075.51a.087.087 0 01-.035.06c-.113.084-.26.186-.363.302a2.227 2.227 0 00-.355.53 1.45 1.45 0 00-.133.55.745.745 0 00-.009.282l.016.24a.016.016 0 01-.015.017.264.264 0 00-.131.046c-.305.204-.512.52-.631.862-.042.12-.118.326-.078.436a.042.042 0 00.043.027.043.043 0 00.018-.005.557.557 0 00.194-.177c.237-.315.489-.593.86-.758a1.79 1.79 0 011.076-.127 7.415 7.415 0 01.518.114.012.012 0 00.007-.016 1.69 1.69 0 01-.134-.5.827.827 0 010-.142l.015-.128a1.89 1.89 0 00.61 1.269c.254.231.557.338.898.375.237.026.46.028.671.006a.32.32 0 01.128-.009 1.735 1.735 0 001.225-.678v-.006a.013.013 0 00-.005-.006.012.012 0 00-.006-.002l-.434-.048a4.718 4.718 0 00-.369-.141c-.138-.046-.271-.05-.41-.068-.453-.058-.831-.371-.914-.841-.028-.318.026-.623.244-.865.065-.072.143-.148.233-.227a.088.088 0 00.03-.096.056.056 0 01-.001-.026l.067-.312.174-.325a.014.014 0 00-.014-.02 1.24 1.24 0 00-.877.605c-.186.309-.264.69-.152 1.03a.004.004 0 01-.002.005h-.003l-.002-.002c-.222-.418-.247-.911.03-1.309.253-.36.775-.712 1.247-.67a.03.03 0 00.024-.01l.203-.214a2.28 2.28 0 01.443-.352c.112-.068.259-.128.379-.194a.016.016 0 00.001-.027.784.784 0 00-.267-.118 2.217 2.217 0 00-.79-.046c-.45.054-.943.304-1.302.596a.012.012 0 01-.013.002.013.013 0 01-.008-.01c0-.01.001-.018.005-.024.16-.231.342-.419.546-.562.507-.357 1.193-.4 1.768-.204.128.061.25.133.367.215a.219.219 0 00.073.037.52.52 0 00.287-.064.36.36 0 00.187-.269.23.23 0 00-.004-.128.065.065 0 00-.016-.023c-.057-.05-.085-.106-.085-.168 0-.12.075-.2.199-.177a.478.478 0 01.168.076.605.605 0 01.11.435l.004.004a.011.011 0 00.011.002c.214-.088.363-.079.641-.091a.019.019 0 01.014.005.019.019 0 01.005.013v.21a.011.011 0 01-.01.011c-.24.026-.398.053-.475.08-.558.201-.93.583-1.113 1.144-.105.38-.085.752.06 1.113.126.301.32.55.578.745.442.332 1.015.404 1.552.291.111-.023.209-.07.3-.11a.004.004 0 00.002-.003.005.005 0 000-.006l-.004-.001a1.237 1.237 0 01-.87-.314 1.726 1.726 0 01-.213-.235.79.79 0 00.546.172c.226-.01.468-.102.6-.297a.024.024 0 00.003-.02.025.025 0 00-.005-.009.025.025 0 00-.008-.006c-.497-.249-.698-.726-.654-1.268a.134.134 0 01.032-.054.014.014 0 01.023.009l.003.038a.537.537 0 00.053.19c.147.316.371.546.67.686.47.221 1.122.188 1.551-.114a.712.712 0 00.258-.32.417.417 0 00-.043-.41c-.122-.153-.27-.194-.44-.123-.117.048-.187.133-.296.164-.55.159-1.123-.414-.907-.96a.503.503 0 01.346-.266l.1.004a1.048 1.048 0 00-.146.241c-.103.23-.046.492.174.62.12.058.235.06.342.004.095-.05.145-.141.213-.22a.394.394 0 01.273-.14c.486-.046.884.347 1.062.77.061.201.09.398.084.591l-.037.278-.024.106c-.08.118-.138.254-.177.406-.07.28.045.482.245.662a.008.008 0 00.01 0 .008.008 0 00.003-.008.977.977 0 01.01-.526l.11-.242c.147-.198.335-.327.563-.387a1.613 1.613 0 01.412-.047.012.012 0 00.004-.003.013.013 0 00.003-.005V3.87c-.049-.26-.03-.483.054-.669.264-.578.864-.658 1.409-.47.262.091.474.247.699.383a.011.011 0 00.012 0 .011.011 0 00.004-.005.454.454 0 00-.048-.163 2.018 2.018 0 00-1.123-1.113 2.008 2.008 0 00-.558-.102.306.306 0 01.276-.158.01.01 0 00.006-.002.01.01 0 00.003-.006.01.01 0 00-.007-.01 2.14 2.14 0 01-.19-.064 1.71 1.71 0 00-1.061-.062.033.033 0 00-.02.05l.087.152a.044.044 0 00.048.021c.057-.012.135-.02.235-.025a.694.694 0 01.415.108 1.79 1.79 0 00-1.339.788.201.201 0 01-.02-.04c-.015-.034-.041-.05-.054-.08-.022-.052.029-.156.058-.2.107-.16.245-.297.412-.41a.021.021 0 00.008-.027.74.74 0 00-.18-.248 1.394 1.394 0 00-.693-.434c-.512-.143-1.04-.067-1.457.256a9.16 9.16 0 00-.268.221c-.046.04-.093.053-.14.04a.798.798 0 00-.52.017c-.307.12-.544.371-.593.71-.004.03-.002.07-.006.104a.026.026 0 01-.02.022 1.331 1.331 0 00-.347.153c-.308.174-.442.441-.403.8.01.083.036.169.079.259l-.052.216c-.064-.083-.137-.169-.18-.255a.988.988 0 01-.035-.814c.08-.214.284-.44.534-.39a.167.167 0 01.119.08.026.026 0 00.025.012.025.025 0 00.02-.019c.01-.036.02-.082.026-.138.074-.558.534-1.062 1.136-1.077.039 0 .077-.012.11-.034l.284-.182a.012.012 0 00.005-.008v-.005a2.488 2.488 0 00-1.269-.735 2.637 2.637 0 00-1.47.116.132.132 0 01-.08.003A2.257 2.257 0 009.123.71a2.2 2.2 0 00-.24.165c-.157.138-.316.274-.474.41zm.965 2.196a1.215 1.215 0 00-.388.183.453.453 0 00-.112.11.057.057 0 00-.01.025c-.061.389-.04.825.21 1.152.455.6 1.252.715 1.936.475.121-.042.246-.124.356-.174a.012.012 0 00.005-.004.011.011 0 00.001-.007.011.011 0 00-.008-.01 1.759 1.759 0 01-.896-.665 1.446 1.446 0 01-.25-.516c-.094-.44-.04-.879.164-1.317.084-.166.184-.323.302-.47a.248.248 0 00.033-.051.01.01 0 000-.006.01.01 0 00-.006-.01 1.398 1.398 0 00-.517.167c-.42.238-.757.638-.82 1.118zm-4.8 2.044c.088-.12.184-.224.285-.31a.128.128 0 00.045-.087l.03-.347c.083-.455.288-.84.613-1.152a1.54 1.54 0 01.302-.211.032.032 0 00.016-.03 1.823 1.823 0 01.121-.713.015.015 0 00-.003-.016.015.015 0 00-.016-.003.59.59 0 00-.076.037 2.595 2.595 0 00-.825.75 3.317 3.317 0 00-.53 1.224 2.961 2.961 0 00-.036.947.005.005 0 00.009 0l.064-.089zm13.143-.942c-.136.069-.282.106-.438.11-.306.01-.548-.09-.7-.357a.018.018 0 00-.027-.005l-.085.071c-.322.25-.288.603-.04.893.168.198.38.326.634.384.448.101.9.014 1.242-.295.233-.21.37-.47.41-.782.01-.071.02-.158.028-.26a.077.077 0 01.063-.069.263.263 0 01.11.012c.435.119.668.58.77.984.003.016 0 .024-.01.025-.121.005-.25.017-.386.035a.016.016 0 00-.013.013l.001.01a.016.016 0 00.007.006c.143.076.274.283.258.445-.016.163-.034.329-.053.5-.015.139-.01.249-.009.422 0 .01.002.02.006.03.04.114.082.196.217.19.01 0 .018-.003.027-.007.166-.069.242-.24.286-.403.08-.282.069-.554-.035-.816a1.831 1.831 0 00-.112-.21 1.95 1.95 0 01-.108-.211 1.833 1.833 0 00-.02-.744c-.16-.667-.796-1.429-1.555-1.175a.81.81 0 00-.56.84c.013.111.06.243.092.364zm-2.6.49a2.111 2.111 0 01-.429.433c-.291.217-.615.349-.97.394-.157.02-.335.01-.48.014a.618.618 0 00-.315.11c-.162.104-.35.23-.53.316-.347.166-.71.25-1.09.25a8.8 8.8 0 01-.405-.007.302.302 0 00-.252.105 38.7 38.7 0 01-.397.443l-.322.215-.319.16c-.223.114-.4.269-.53.466-.119.18-.17.362-.26.626a1.477 1.477 0 01-.374.58l-.337.198a.017.017 0 00-.007.02c.012.033.032.078.058.136.11.24.135.491.077.756a.989.989 0 01-.217.414.846.846 0 01-.428.221c-.456.069-.788-.255-.978-.629l-.002-.002h-.003l-.002.002-.001.003.067.316c.028.131.095.297.17.435.054.096.104.19.15.283-.013.121-.063.2-.15.238-.1.043-.238-.005-.338-.048a15.309 15.309 0 01-.44-.2.372.372 0 01-.205-.209c-.058-.165-.107-.359-.173-.494a1.045 1.045 0 00-.588-.533.36.36 0 00-.121-.024c-.008-.013-.01-.017-.004-.012l-.03-.485c-.024-.32.024-.64.37-.756.48-.057.528.515.79.722a.013.013 0 00.015 0 .012.012 0 00.006-.012c-.044-.306-.09-.588-.296-.818a.518.518 0 00-.465-.176c-.416.047-.58.386-.622.762-.021.193-.024.371-.009.535.023.356.12.796.163 1.006.047.233.11.455.188.665.07.19.212.426.299.554.13.194.301.362.51.504.366.246.76.297 1.186.153.058.431.147.86.266 1.29.026.092.057.177.093.253.186.518.478.98.876 1.384.255.26.515.48.78.664.007.012.033.03.077.05a.6.6 0 00.106.094c.484.329 1.004.613 1.56.852l.239.103c.197.087.36.15.485.191.295.094.462.146.502.158.39.113.79.172 1.2.175.312.004.598-.049.869-.184.207-.105.424-.32.505-.553.162-.468-.062-.95-.47-1.214a1.54 1.54 0 00-.665-.287 1.85 1.85 0 00-.492-.029c.07-.11.115-.178.135-.204.133-.175.385-.209.584-.177.167.028.309.053.426.077.223.045.397-.064.352-.313a.362.362 0 00-.179-.272 2.06 2.06 0 00-.65-.223.944.944 0 00-.268-.02c-.22.028-.395.05-.524.063a.519.519 0 00-.287.152.412.412 0 01-.145-.06.216.216 0 01-.063-.107c.05-.172.161-.264.336-.275a.097.097 0 01.07.026c.162.152.362.091.557.024a.99.99 0 01.715.01c.087.034.298.125.42.112.142-.016.214-.1.215-.251a.062.062 0 00-.03-.054 4.639 4.639 0 01-.144-.1.14.14 0 01-.033-.036 3.76 3.76 0 01-.135-.218c-.085-.147-.238-.192-.397-.23a.506.506 0 01-.246-.154c.1-.196.272-.313.515-.349a.596.596 0 01.32.037c.269.11.46.186.575.227.312.11.649.115.818-.213a.6.6 0 00.086-.284c.02-.508.05-1.347.092-2.517l.039-1.008c.01-.273.084-.515.323-.668.19-.11.433-.097.645-.112.428-.03.485-.436.408-.77-.064-.356-.321-.667-.634-.838a2.432 2.432 0 00-.531-.207 3.244 3.244 0 01-.357-.148 2 2 0 01-.355-.263v-.004l.004-.002h.004l.202.091c.137.056.28.076.428.06.309-.032.485-.33.288-.6-.13-.18-.364-.324-.53-.439a2.118 2.118 0 01-.405-.376 1.616 1.616 0 01-.288-.516.004.004 0 00-.005 0l-.001.002a1.46 1.46 0 01-.241.55zm3.914.445c-.011.02-.018.064-.031.082-.183.239-.33.338-.595.532a.794.794 0 00-.257.319.01.01 0 00.009.01c.105.008.212.002.322-.018.501-.093.61-.479.567-.921l-.002-.005a.008.008 0 00-.009-.002.008.008 0 00-.004.003zM3.266 7.891c-.048.295-.042.593.018.893.09.507.311 1.007.687 1.366.048.046.106.09.175.13.014.014.028.018.042.011.107-.05.223-.125.35-.223a.031.031 0 00.012-.025v-.09a.071.071 0 00-.066-.07.834.834 0 01-.453-.177 1.05 1.05 0 01-.356-.521 6.047 6.047 0 00-.07-.203l.017-.145a.007.007 0 01.015 0c.036.23.177.527.395.634a.29.29 0 00.309-.025.779.779 0 00.173-.35.079.079 0 00-.032-.081c-.355-.24-.385-.6-.078-.88.358-.325.868-.352 1.273-.125.034.019.087.053.157.104.05.036.102.072.155.107.075.074.17.158.285.25.2.163.408.24.67.25.411.017.748-.127 1.01-.432.127-.147.187-.294.292-.512a.919.919 0 01.611-.511.007.007 0 00-.004-.01l-.318-.069a1.755 1.755 0 00-.358-.045 1.02 1.02 0 00-.534.081c-.196.09-.357.28-.555.334-.267.073-.471-.005-.611-.233a.34.34 0 01-.034-.158l.009-.007c.213.276.51.121.558-.178a.66.66 0 00-.106-.473c-.213-.316-.518-.463-.916-.441-.397.022-.773.248-1.022.548-.192.232-.402.547-.709.458-.226-.066-.235-.278-.19-.477a.01.01 0 00-.015-.01c-.09.056-.165.115-.224.176a2.093 2.093 0 00-.562 1.129zm3.221 1.627a.99.99 0 00.174.337c.054.068.115.132.181.193.08.157.178.264.293.321.26.13.554.024.658-.251.078-.237.047-.444-.092-.62a.626.626 0 00-.435-.239 2.97 2.97 0 00-.527.017l-.35-.21a.01.01 0 00-.011 0 .01.01 0 00-.005.011c.016.16.054.307.114.44zM4.23 10.86a1.16 1.16 0 00-.08.132c-.074.158-.109.323-.102.495.01.26.196.672.528.6a.343.343 0 00.249-.202.3.3 0 00.042-.15 1.418 1.418 0 00-.093-.4 2.793 2.793 0 01-.16-.754.036.036 0 00-.008-.019.017.017 0 00-.01-.006c-.004-.001-.008 0-.012.002a1.674 1.674 0 00-.354.302zm.109 2.45a1.921 1.921 0 00.337.464c.002.001.003.002.005.001a.013.013 0 00.01-.004l.08-.096a1.21 1.21 0 01.622-.114c.03.003.06.005.091.004l.15.082c.084.057.17.115.257.176a2.12 2.12 0 01.272.259h.003a.005.005 0 00.002-.002v-.003a1.983 1.983 0 00-.133-.625 1.117 1.117 0 00-.635-.61 33.41 33.41 0 00-.275-.285.482.482 0 00-.413-.152.752.752 0 01-.516-.07.01.01 0 00-.008.004 1.79 1.79 0 00.151.971zm2.137 1.902c.006.025.008.037.006.037.023.307.058.602.106.887.045.443.092.81.14 1.1l.419 2.536c.092.552.126.872.185 1.457.022.214.095.407.218.578.203.283.438.53.705.744.459.367.97.646 1.534.838.444.168.906.28 1.385.339.476.054.963.053 1.461-.004.395-.038.794-.12 1.196-.245.119-.038.304-.104.554-.2a.891.891 0 00.114-.06.588.588 0 00.128-.046c.311-.15.613-.308.905-.473a2.43 2.43 0 00.276-.185v-.007a.012.012 0 00-.005-.005.011.011 0 00-.007-.002c-.716.065-1.372-.067-2.035-.383-.574-.273-1.088-.718-1.552-1.21a26.147 26.147 0 01-1.289-1.46l-2.286-2.761a9.577 9.577 0 01-.753-1.023 4.608 4.608 0 01-.577-1.342l-.147-.61a.018.018 0 00-.019-.014c-.45.038-.68.566-.688.958a3.17 3.17 0 00.026.556zm-1.47-1.214a.506.506 0 00-.027.551.638.638 0 00.231.251.105.105 0 00.088.011c.302-.095.58-.148.887-.034h.004a.008.008 0 00.004-.002.007.007 0 00.001-.008 1.908 1.908 0 00-.302-.475 1.227 1.227 0 00-.432-.357.533.533 0 00-.21-.065c-.098-.003-.18.04-.244.128zm.96 2.255a.76.76 0 00.244.08l.14.016a.033.033 0 00.031-.018 2.273 2.273 0 00-.07-.799.02.02 0 00-.007-.01.019.019 0 00-.012-.004c-.179.008-.356.033-.533.074-.009-.01-.023-.016-.043-.018a1.019 1.019 0 01-.384-.434.012.012 0 00-.017.009c-.069.454.279.892.652 1.104z"></path><path d="M7.126 3.698a2.128 2.128 0 00-.016 1.07l-.091-.023c-.31-.215-.696-.139-.966.09a.02.02 0 01-.018.005.978.978 0 00-.294-.023c.15-.23.352-.383.604-.457.083-.024.187-.044.31-.058a.023.023 0 00.018-.015c.091-.24.242-.436.453-.59zM14.187 8.01c.415.181.695.507.724.97a.035.035 0 01-.009.025l-.018.021c-.241.232-.463.462-.735.66-.23.165-.56.315-.849.297a.335.335 0 01-.24-.112.968.968 0 01-.038-.37.043.043 0 00-.038-.047.448.448 0 01-.148-.045c.06-.134.094-.251.102-.352.029-.327-.238-.5-.53-.538a1.515 1.515 0 00-.7.074c-.1.03-.193.073-.279.126a.756.756 0 00-.164.14 9.013 9.013 0 00-.144.164.02.02 0 00-.004.012c0 .005.002.01.005.013.015.016.022.031.021.046l-.178.074-.172-.031a6.66 6.66 0 00-.755-.142 3.515 3.515 0 01-.465-.116c.215.01.404 0 .565-.033a2.67 2.67 0 00.502-.156c.564-.236.991-.43 1.538-.496a.041.041 0 00.035-.032c.047-.211.19-.285.397-.327.138-.029.313-.035.526-.02.378.028.715.066 1.05.196z"></path>`,alibaba:`<path d="M24 14.014c-2.8 1.512-5.62 2.896-8.759 3.524-.7.139-1.476.139-2.187.043-.678-.085-1.017-.682-.776-1.31.23-.585.536-1.181.93-1.671.852-1.065 1.814-2.034 2.678-3.088a15.75 15.75 0 001.422-2.054c.306-.511.164-1.129-.372-1.384-.897-.437-1.859-.745-2.81-1.075-.11-.043-.274.074-.492.149.273.244.47.425.743.67-2.821.48-5.49 1.16-8.08 2.098-.012.053-.033.095-.023.117.383.585.208 1.032-.35 1.394a2.365 2.365 0 00-.568.522c1.706.5 3.226.213 4.68-.735-.087-.127-.175-.244-.262-.372.546.096.874.394.918.862.011.107-.054.213-.087.32-.077-.086-.175-.17-.24-.267-.045-.064-.056-.138-.088-.245-1.728 1.15-3.587 1.438-5.632.842 0 .404-.022.745.011 1.075.022.287-.098.415-.36.564-.591.362-1.204.735-1.696 1.214-.59.585-.371 1.299.427 1.597.907.34 1.859.35 2.81.234 1.126-.139 2.23-.32 3.456-.49-1.433.67-2.844 1.14-4.33 1.33-1.04.14-2.078.214-3.106-.084-1.476-.415-2.133-1.501-1.75-2.96.361-1.363 1.236-2.449 2.176-3.45 3.139-3.332 7.108-5.024 11.7-5.365 1.072-.074 2.155.064 3.16.511 1.411.639 2.002 1.99 1.313 3.354-.448.905-1.072 1.735-1.695 2.555-.612.809-1.301 1.554-1.946 2.331-.186.234-.361.48-.503.745-.274.5-.088.83.492.778 1.213-.118 2.45-.213 3.62-.511 1.716-.437 3.389-1.054 5.084-1.597.175-.043.339-.107.492-.17z"></path>`,anthropic:`<path d="M13.827 3.52h3.603L24 20h-3.603l-6.57-16.48zm-7.258 0h3.767L16.906 20h-3.674l-1.343-3.461H5.017l-1.344 3.46H0L6.57 3.522zm4.132 9.959L8.453 7.687 6.205 13.48H10.7z"></path>`,antigravity:`<g transform="scale(0.24)"><path d="M85.2843 88.0301C90.1329 91.6664 97.4057 89.2422 90.7389 82.5755C70.7389 63.1816 74.9813 9.84827 50.1329 9.84827C25.2843 9.84827 29.5267 63.1816 9.52673 82.5755C2.25402 89.8483 10.1328 91.6664 14.9813 88.0301C33.7692 75.3028 32.5571 52.8786 50.1329 52.8786C67.7086 52.8786 66.4965 75.3028 85.2843 88.0301Z"></path></g>`,arcee:`<path d="M13.236 2.377L2.751 20.493H0L11.863 0l1.373 2.377zm3.554 6.156l-9.606 11.96H4.13L15.511 6.32l1.279 2.212zm6.908 11.96H14.05l8.406-2.151 1.242 2.15zm-3.42-5.922l-7.843 5.92H8.482l10.597-7.997 1.2 2.077z"></path>`,aws:`<path d="M6.763 11.212c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 01-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 01-.287-.375 6.18 6.18 0 01-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.39-.384-.59-.894-.59-1.533 0-.678.24-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272-.09.04-.184.075-.28.104a.488.488 0 01-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 01.224-.167 4.577 4.577 0 011.005-.36 4.84 4.84 0 011.246-.151c.95 0 1.644.216 2.091.647.44.43.662 1.085.662 1.963v2.586h.016zm-3.24 1.214c.263 0 .534-.048.822-.144a1.78 1.78 0 00.758-.51 1.27 1.27 0 00.272-.512c.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 00-.735-.136 6.02 6.02 0 00-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 6.726a1.398 1.398 0 01-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 01.32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 01.311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 01-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 01-.303.08h-.687c-.15 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32L12.32 7.747l-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08l-.686.001zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 01-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.32.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 00.415-.758.777.777 0 00-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 01-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .36.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 01.24.2.43.43 0 01.071.263v.375c0 .168-.064.256-.184.256a.83.83 0 01-.303-.096 3.652 3.652 0 00-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.16.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926a2.157 2.157 0 01-.583.703c-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167z"></path><path d="M.378 15.475c3.384 1.963 7.56 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.44-.2.814.287.383.607-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351zm23.531-.2c.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151l.175-.439c.343-.88.802-2.198.52-2.555-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399z"></path>`,baai:`<path clip-rule="evenodd" d="M0 4.68L8.61 0l3.583 2.004 3.1-1.735L24 5.14v8.701l-3.582 2.004v3.469L12.038 24l-8.482-4.52v-3.847L0 13.9V4.68zm1.284 1.472v2.934l7.936 4.098-.032 1.419-7.904-4.08v2.658l10.043 5.303V11.77L1.284 6.152zm10.741 4.532l9.791-5.33-2.63-1.47-7.398 4.137-1.251-.736 7.366-4.12-2.61-1.46-9.806 5.34 6.538 3.64zM4.2 6.328l6.709-3.606L8.61 1.436l-6.714 3.61L4.2 6.327zm11.04 14.444l-2.618 1.465V11.94l6.512-3.642v10.298l-2.61 1.46v-8.241l-1.283.682v8.277zm-10.4-4.42l6.487 3.568v2.23L4.84 18.763v-2.41zm17.876-3.23v-6.83L20.418 7.58v6.829l2.298-1.286z"></path>`,baidu:`<path d="M8.859 11.735c1.017-1.71 4.059-3.083 6.202.286 1.579 2.284 4.284 4.397 4.284 4.397s2.027 1.601.73 4.684c-1.24 2.956-5.64 1.607-6.005 1.49l-.024-.009s-1.746-.568-3.776-.112c-2.026.458-3.773.286-3.773.286l-.045-.001c-.328-.01-2.38-.187-3.001-2.968-.675-3.028 2.365-4.687 2.592-4.968.226-.288 1.802-1.37 2.816-3.085zm.986 1.738v2.032h-1.64s-1.64.138-2.213 2.014c-.2 1.252.177 1.99.242 2.148.067.157.596 1.073 1.927 1.342h3.078v-7.514l-1.394-.022zm3.588 2.191l-1.44.024v3.956s.064.985 1.44 1.344h3.541v-5.3h-1.528v3.979h-1.46s-.466-.068-.553-.447v-3.556zM9.82 16.715v3.06H8.58s-.863-.045-1.126-1.049c-.136-.445.02-.959.088-1.16.063-.203.353-.671.951-.85H9.82zm9.525-9.036c2.086 0 2.646 2.06 2.646 2.742 0 .688.284 3.597-2.309 3.655-2.595.057-2.704-1.77-2.704-3.08 0-1.374.277-3.317 2.367-3.317zM4.24 6.08c1.523-.135 2.645 1.55 2.762 2.513.07.625.393 3.486-1.975 4-2.364.515-3.244-2.249-2.984-3.544 0 0 .28-2.797 2.197-2.969zm8.847-1.483c.14-1.31 1.69-3.316 2.931-3.028 1.236.285 2.367 1.944 2.137 3.37-.224 1.428-1.345 3.313-3.095 3.082-1.748-.226-2.143-1.823-1.973-3.424zM9.425 1c1.307 0 2.364 1.519 2.364 3.398 0 1.879-1.057 3.4-2.364 3.4s-2.367-1.521-2.367-3.4C7.058 2.518 8.118 1 9.425 1z"></path>`,bytedance:`<path d="M14.944 18.587l-1.704-.445V10.01l1.824-.462c1-.254 1.84-.461 1.88-.453.032 0 .056 2.235.056 4.972v4.973l-.176-.008c-.104 0-.952-.207-1.88-.446z"></path><path d="M7 16.542c0-2.736.024-4.98.064-4.98.032-.008.872.2 1.88.454l1.816.461-.016 4.05-.024 4.049-1.632.422c-.896.23-1.736.445-1.856.469L7 21.523v-4.98z"></path><path d="M19.24 12.477c0-9.03.008-9.515.144-9.475.072.024.784.207 1.576.406.792.207 1.576.405 1.744.445l.296.08-.016 8.56-.024 8.568-1.624.414c-.888.23-1.728.437-1.856.47l-.24.055v-9.523z"></path><path d="M1 12.509c0-4.678.024-8.505.064-8.505.032 0 .872.207 1.872.454l1.824.461v7.582c0 4.16-.016 7.574-.032 7.574-.024 0-.872.215-1.88.47L1 21.013v-8.505z"></path>`,claude:`<path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path>`,claudecode:`<path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"></path>`,codex:`<path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path>`,cohere:`<path clip-rule="evenodd" d="M8.128 14.099c.592 0 1.77-.033 3.398-.703 1.897-.781 5.672-2.2 8.395-3.656 1.905-1.018 2.74-2.366 2.74-4.18A4.56 4.56 0 0018.1 1H7.549A6.55 6.55 0 001 7.55c0 3.617 2.745 6.549 7.128 6.549z"></path><path clip-rule="evenodd" d="M9.912 18.61a4.387 4.387 0 012.705-4.052l3.323-1.38c3.361-1.394 7.06 1.076 7.06 4.715a5.104 5.104 0 01-5.105 5.104l-3.597-.001a4.386 4.386 0 01-4.386-4.387z"></path><path d="M4.776 14.962A3.775 3.775 0 001 18.738v.489a3.776 3.776 0 007.551 0v-.49a3.775 3.775 0 00-3.775-3.775z"></path>`,cursor:`<path d="M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"></path>`,deepcogito:`<path d="M19.74 21.618l4.213-10.534a.412.412 0 00.027-.1l.003-.03a.404.404 0 00-.02-.167l-.007-.026a.44.44 0 00-.045-.085l-.003-.005L16.528.13c-.002-.003 0-.006-.003-.01h.004v.173h-.01c-.102-.254-.277-.285-.445-.248l-.001-.003c-.001.001-.003-.003-.003-.003h-.006s0-.038-.002-.038L4.466 3.143c-.006.002-.012-.005-.018-.003-.022.007-.044.01-.064.021a.42.42 0 00-.039.022c-.013.008-.026.015-.037.025a.464.464 0 00-.118.154l-.01.017L0 13.919c-.004.013.023.026.023.04v.148c0 .019 0 .038.003.057l-.003.001v.006c0 .049-.011.096.016.139H.03c0 .002-.008.002-.008.002l-.01.001c.007.012.008.023.016.034l7.377 9.486v.005a.063.063 0 00.006.005c.006.008.013.013.02.02a.258.258 0 00.02.02c.008.008.015.017.023.023l.02.014a.564.564 0 00.104.053c.011.003.021.008.032.01.005.002.01.005.016.006a.445.445 0 00.172.004l11.597-2.108a.362.362 0 00.041-.01l.011.001h.001c.005 0 .01-.007.015-.009.01-.003.02-.008.03-.013a.248.248 0 00.025-.012l.01-.007a.448.448 0 00.096-.072c.004-.004.006-.01.01-.013a.419.419 0 00.069-.1l.005-.008.003-.006.001-.003.006-.015zm-.77-.894l-7.315-4.573 8.229-6.4-.915 10.973zm-7.82-5.27l-2.782-10.2 11.127 3.71-8.345 6.49zm9.611-5.883l2.267 1.512-3.022 7.554.755-9.066zm1.133-.278l-1.168-.778-1.556-3.113 2.724 3.891zm-2.35-1.22L8.862 4.514l7.122-3.56 3.56 7.12zM7.71 4.129L6.063 3.58 12.1 1.932 7.71 4.128zm-2.881-.053l2.201.734-5.137 6.605 2.936-7.34zm2.725 1.46l2.754 10.096-9.179-1.835 6.425-8.26zM10.3 16.508L7.633 22.73l-6.223-8 8.89 1.777zm.803.313l7.065 4.417-9.716 1.767 2.65-6.184z"></path>`,deepseek:`<path d="M23.748 4.482c-.254-.124-.364.113-.512.234-.051.039-.094.09-.137.136-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.156-.708-.311-.955-.65-.172-.241-.219-.51-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.093.172.187.129.323-.082.28-.18.552-.266.833-.055.179-.137.217-.329.14a5.526 5.526 0 01-1.736-1.18c-.857-.828-1.631-1.742-2.597-2.458a11.365 11.365 0 00-.689-.471c-.985-.957.13-1.743.388-1.836.27-.098.093-.432-.779-.428-.872.004-1.67.295-2.687.684a3.055 3.055 0 01-.465.137 9.597 9.597 0 00-2.883-.102c-1.885.21-3.39 1.102-4.497 2.623C.082 8.606-.231 10.684.152 12.85c.403 2.284 1.569 4.175 3.36 5.653 1.858 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.133-.284 4.994-1.86.47.234.962.327 1.78.397.63.059 1.236-.03 1.705-.128.735-.156.684-.837.419-.961-2.155-1.004-1.682-.595-2.113-.926 1.096-1.296 2.746-2.642 3.392-7.003.05-.347.007-.565 0-.845-.004-.17.035-.237.23-.256a4.173 4.173 0 001.545-.475c1.396-.763 1.96-2.015 2.093-3.517.02-.23-.004-.467-.247-.588zM11.581 18c-2.089-1.642-3.102-2.183-3.52-2.16-.392.024-.321.471-.235.763.09.288.207.486.371.739.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.167-1.361-.802-2.5-1.86-3.301-3.307-.774-1.393-1.224-2.887-1.298-4.482-.02-.386.093-.522.477-.592a4.696 4.696 0 011.529-.039c2.132.312 3.946 1.265 5.468 2.774.868.86 1.525 1.887 2.202 2.891.72 1.066 1.494 2.082 2.48 2.914.348.292.625.514.891.677-.802.09-2.14.11-3.054-.614zm1-6.44a.306.306 0 01.415-.287.302.302 0 01.2.288.306.306 0 01-.31.307.303.303 0 01-.304-.308zm3.11 1.596c-.2.081-.399.151-.59.16a1.245 1.245 0 01-.798-.254c-.274-.23-.47-.358-.552-.758a1.73 1.73 0 01.016-.588c.07-.327-.008-.537-.239-.727-.187-.156-.426-.199-.688-.199a.559.559 0 01-.254-.078c-.11-.054-.2-.19-.114-.358.028-.054.16-.186.192-.21.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.391.451.462.576.685.914.176.265.336.537.445.848.067.195-.019.354-.25.452z"></path>`,gemma:`<path d="M12.34 5.953a8.233 8.233 0 01-.247-1.125V3.72a8.25 8.25 0 015.562 2.232H12.34zm-.69 0c.113-.373.199-.755.257-1.145V3.72a8.25 8.25 0 00-5.562 2.232h5.304zm-5.433.187h5.373a7.98 7.98 0 01-.267.696 8.41 8.41 0 01-1.76 2.65L6.216 6.14zm-.264-.187H2.977v.187h2.915a8.436 8.436 0 00-2.357 5.767H0v.186h3.535a8.436 8.436 0 002.357 5.767H2.977v.186h2.976v2.977h.187v-2.915a8.436 8.436 0 005.767 2.357V24h.186v-3.535a8.436 8.436 0 005.767-2.357v2.915h.186v-2.977h2.977v-.186h-2.915a8.436 8.436 0 002.357-5.767H24v-.186h-3.535a8.436 8.436 0 00-2.357-5.767h2.915v-.187h-2.977V2.977h-.186v2.915a8.436 8.436 0 00-5.767-2.357V0h-.186v3.535A8.436 8.436 0 006.14 5.892V2.977h-.187v2.976zm6.14 14.326a8.25 8.25 0 005.562-2.233H12.34c-.108.367-.19.743-.247 1.126v1.107zm-.186-1.087a8.015 8.015 0 00-.258-1.146H6.345a8.25 8.25 0 005.562 2.233v-1.087zm-8.186-7.285h1.107a8.23 8.23 0 001.125-.247V6.345a8.25 8.25 0 00-2.232 5.562zm1.087.186H3.72a8.25 8.25 0 002.232 5.562v-5.304a8.012 8.012 0 00-1.145-.258zm15.47-.186a8.25 8.25 0 00-2.232-5.562v5.315c.367.108.743.19 1.126.247h1.107zm-1.086.186c-.39.058-.772.144-1.146.258v5.304a8.25 8.25 0 002.233-5.562h-1.087zm-1.332 5.69V12.41a7.97 7.97 0 00-.696.267 8.409 8.409 0 00-2.65 1.76l3.346 3.346zm0-6.18v-5.45l-.012-.013h-5.451c.076.235.162.468.26.696a8.698 8.698 0 001.819 2.688 8.698 8.698 0 002.688 1.82c.228.097.46.183.696.259zM6.14 17.848V12.41c.235.078.468.167.696.267a8.403 8.403 0 012.688 1.799 8.404 8.404 0 011.799 2.688c.1.228.19.46.267.696H6.152l-.012-.012zm0-6.245V6.326l3.29 3.29a8.716 8.716 0 01-2.594 1.728 8.14 8.14 0 01-.696.259zm6.257 6.257h5.277l-3.29-3.29a8.716 8.716 0 00-1.728 2.594 8.135 8.135 0 00-.259.696zm-2.347-7.81a9.435 9.435 0 01-2.88 1.96 9.14 9.14 0 012.88 1.94 9.14 9.14 0 011.94 2.88 9.435 9.435 0 011.96-2.88 9.14 9.14 0 012.88-1.94 9.435 9.435 0 01-2.88-1.96 9.434 9.434 0 01-1.96-2.88 9.14 9.14 0 01-1.94 2.88z"></path>`,google:`<path d="M23 12.245c0-.905-.075-1.565-.236-2.25h-10.54v4.083h6.186c-.124 1.014-.797 2.542-2.294 3.569l-.021.136 3.332 2.53.23.022C21.779 18.417 23 15.593 23 12.245z"></path><path d="M12.225 23c3.03 0 5.574-.978 7.433-2.665l-3.542-2.688c-.948.648-2.22 1.1-3.891 1.1a6.745 6.745 0 01-6.386-4.572l-.132.011-3.465 2.628-.045.124C4.043 20.531 7.835 23 12.225 23z"></path><path d="M5.84 14.175A6.65 6.65 0 015.463 12c0-.758.138-1.491.361-2.175l-.006-.147-3.508-2.67-.115.054A10.831 10.831 0 001 12c0 1.772.436 3.447 1.197 4.938l3.642-2.763z"></path><path d="M12.225 5.253c2.108 0 3.529.892 4.34 1.638l3.167-3.031C17.787 2.088 15.255 1 12.225 1 7.834 1 4.043 3.469 2.197 7.062l3.63 2.763a6.77 6.77 0 016.398-4.572z"></path>`,hermesagent:`<path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path>`,ibm:`<path clip-rule="evenodd" d="M24 16.333V17h-3.158v-.667H24zm-7.579 0V17h-3.158v-.667h3.158zm2.464 0L18.63 17l-.25-.667h.504zm-7.075 0a2.528 2.528 0 01-1.717.667h-5.04v-.667h6.757zm-7.389 0V17H0v-.667h4.421zm12-1.333v.667h-3.158V15h3.158zm2.958 0l-.246.667h-1L17.885 15h1.494zm-6.937 0c-.057.237-.148.46-.265.667H5.053V15h7.39zm-8.02 0v.667H0V15h4.421zM24 15v.667h-3.158V15H24zm-1.263-1.333v.666h-1.895v-.666h1.895zm-6.316 0v.666h-1.895v-.666h1.895zm3.453 0l-.248.666h-1.989l-.25-.666h2.487zm-7.52 0c.056.212.088.435.088.666h-2.337v-.666h2.249zm-4.143 0v.666H6.316v-.666H8.21zm-5.053 0v.666H1.263v-.666h1.895zm19.579-1.334V13h-1.895v-.667h1.895zm-6.316 0V13h-1.895v-.667h1.895zm3.948 0l-.247.667h-2.987l-.245-.667h3.48zm-8.792 0c.218.188.405.414.55.667H6.315v-.667h5.26zm-8.42 0V13H1.264v-.667h1.895zM18.456 11l.177.539.176-.539h3.929v.667h-1.895v-.613l-.215.613H16.63l-.209-.613v.613h-1.895V11h3.929zM3.158 11v.667H1.263V11h1.895zm8.968 0a2.555 2.555 0 01-.55.667h-5.26V11h5.81zm10.61-1.333v.666h-3.709l.224-.666h3.486zm-4.722 0l.224.666h-3.712v-.666h3.488zm-5.572 0c0 .23-.032.454-.088.666h-2.249v-.666h2.337zm-4.231 0v.666H6.316v-.666H8.21zm-5.053 0v.666H1.263v-.666h1.895zm14.419-1.334l.22.667h-4.534v-.667h4.314zm6.423 0V9h-4.536l.229-.667H24zm-11.823 0c.117.206.208.43.265.667h-7.39v-.667h7.125zm-7.756 0V9H0v-.667h4.421zM17.133 7l.224.667h-4.094V7h3.87zM24 7v.667h-4.089L20.13 7H24zM10.093 7c.662 0 1.264.253 1.717.667H5.053V7h5.04zM4.42 7v.667H0V7h4.421z"></path>`,inception:`<path d="M14.767 1H7.884L1 7.883v6.884h6.884V7.883h6.883V1zM9.234 23h6.882L23 16.116V9.233h-6.884v6.883H9.234V23z"></path>`,kimi:`<path d="M21.846 0a1.923 1.923 0 110 3.846H20.15a.226.226 0 01-.227-.226V1.923C19.923.861 20.784 0 21.846 0z"></path><path d="M11.065 11.199l7.257-7.2c.137-.136.06-.41-.116-.41H14.3a.164.164 0 00-.117.051l-7.82 7.756c-.122.12-.302.013-.302-.179V3.82c0-.127-.083-.23-.185-.23H3.186c-.103 0-.186.103-.186.23V19.77c0 .128.083.23.186.23h2.69c.103 0 .186-.102.186-.23v-3.25c0-.069.025-.135.069-.178l2.424-2.406a.158.158 0 01.205-.023l6.484 4.772a7.677 7.677 0 003.453 1.283c.108.012.2-.095.2-.23v-3.06c0-.117-.07-.212-.164-.227a5.028 5.028 0 01-2.027-.807l-5.613-4.064c-.117-.078-.132-.279-.028-.381z"></path>`,kwaipilot:`<path clip-rule="evenodd" d="M11.765.03C5.327.03.108 5.25.108 11.686c0 3.514 1.556 6.665 4.015 8.804L9.89 8.665h6.451L9.31 23.083c.807.173 1.63.26 2.455.26 6.438 0 11.657-5.22 11.657-11.658S18.202.028 11.765.028V.03z"></path>`,longcat:`<path clip-rule="evenodd" d="M.507 19.883a.507.507 0 01-.489-.642L4.29 3.745a1.013 1.013 0 011.533-.578l5.622 3.687a1.013 1.013 0 001.11 0L18.2 3.165a1.013 1.013 0 011.532.58l4.25 15.497a.506.506 0 01-.49.64H18.07a6.297 6.297 0 001.53-4.115v-.177a6.09 6.09 0 00-1.513-4.017l-.697-3.495a.438.438 0 00-.694-.266L14.07 9.781a.748.748 0 01-.654.121 5.156 5.156 0 00-2.833 0 .746.746 0 01-.653-.121L7.302 7.81a.435.435 0 00-.688.269l-.675 3.652a5.36 5.36 0 00-1.539 3.76v.333c0 1.474.527 2.9 1.488 4.02l.032.038H.507z"></path><path d="M9.213 16.843h1.52v-3.546h-1.29l-.23 3.546zm5.573 0h-1.52v-3.546h1.29l.23 3.546z"></path>`,mcp:`<path d="M15.688 2.343a2.588 2.588 0 00-3.61 0l-9.626 9.44a.863.863 0 01-1.203 0 .823.823 0 010-1.18l9.626-9.44a4.313 4.313 0 016.016 0 4.116 4.116 0 011.204 3.54 4.3 4.3 0 013.609 1.18l.05.05a4.115 4.115 0 010 5.9l-8.706 8.537a.274.274 0 000 .393l1.788 1.754a.823.823 0 010 1.18.863.863 0 01-1.203 0l-1.788-1.753a1.92 1.92 0 010-2.754l8.706-8.538a2.47 2.47 0 000-3.54l-.05-.049a2.588 2.588 0 00-3.607-.003l-7.172 7.034-.002.002-.098.097a.863.863 0 01-1.204 0 .823.823 0 010-1.18l7.273-7.133a2.47 2.47 0 00-.003-3.537z"></path><path d="M14.485 4.703a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a4.115 4.115 0 000 5.9 4.314 4.314 0 006.016 0l7.12-6.982a.823.823 0 000-1.18.863.863 0 00-1.204 0l-7.119 6.982a2.588 2.588 0 01-3.61 0 2.47 2.47 0 010-3.54l7.12-6.982z"></path>`,meta:`<path d="M6.897 4c1.915 0 3.516.932 5.43 3.376l.282-.373c.19-.246.383-.484.58-.71l.313-.35C14.588 4.788 15.792 4 17.225 4c1.273 0 2.469.557 3.491 1.516l.218.213c1.73 1.765 2.917 4.71 3.053 8.026l.011.392.002.25c0 1.501-.28 2.759-.818 3.7l-.14.23-.108.153c-.301.42-.664.758-1.086 1.009l-.265.142-.087.04a3.493 3.493 0 01-.302.118 4.117 4.117 0 01-1.33.208c-.524 0-.996-.067-1.438-.215-.614-.204-1.163-.56-1.726-1.116l-.227-.235c-.753-.812-1.534-1.976-2.493-3.586l-1.43-2.41-.544-.895-1.766 3.13-.343.592C7.597 19.156 6.227 20 4.356 20c-1.21 0-2.205-.42-2.936-1.182l-.168-.184c-.484-.573-.837-1.311-1.043-2.189l-.067-.32a8.69 8.69 0 01-.136-1.288L0 14.468c.002-.745.06-1.49.174-2.23l.1-.573c.298-1.53.828-2.958 1.536-4.157l.209-.34c1.177-1.83 2.789-3.053 4.615-3.16L6.897 4zm-.033 2.615l-.201.01c-.83.083-1.606.673-2.252 1.577l-.138.199-.01.018c-.67 1.017-1.185 2.378-1.456 3.845l-.004.022a12.591 12.591 0 00-.207 2.254l.002.188c.004.18.017.36.04.54l.043.291c.092.503.257.908.486 1.208l.117.137c.303.323.698.492 1.17.492 1.1 0 1.796-.676 3.696-3.641l2.175-3.4.454-.701-.139-.198C9.11 7.3 8.084 6.616 6.864 6.616zm10.196-.552l-.176.007c-.635.048-1.223.359-1.82.933l-.196.198c-.439.462-.887 1.064-1.367 1.807l.266.398c.18.274.362.56.55.858l.293.475 1.396 2.335.695 1.114c.583.926 1.03 1.6 1.408 2.082l.213.262c.282.326.529.54.777.673l.102.05c.227.1.457.138.718.138.176.002.35-.023.518-.073.338-.104.61-.32.813-.637l.095-.163.077-.162c.194-.459.29-1.06.29-1.785l-.006-.449c-.08-2.871-.938-5.372-2.2-6.798l-.176-.189c-.67-.683-1.444-1.074-2.27-1.074z"></path>`,microsoft:`<path d="M11.49 2H2v9.492h9.492V2h-.002z"></path><path d="M22 2h-9.492v9.492H22V2z"></path><path d="M11.49 12.508H2V22h9.492v-9.492h-.002z"></path><path d="M22 12.508h-9.492V22H22v-9.492z"></path>`,minimax:`<path d="M16.278 2c1.156 0 2.093.927 2.093 2.07v12.501a.74.74 0 00.744.709.74.74 0 00.743-.709V9.099a2.06 2.06 0 012.071-2.049A2.06 2.06 0 0124 9.1v6.561a.649.649 0 01-.652.645.649.649 0 01-.653-.645V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v7.472a2.037 2.037 0 01-2.048 2.026 2.037 2.037 0 01-2.048-2.026v-12.5a.785.785 0 00-.788-.753.785.785 0 00-.789.752l-.001 15.904A2.037 2.037 0 0113.441 22a2.037 2.037 0 01-2.048-2.026V18.04c0-.356.292-.645.652-.645.36 0 .652.289.652.645v1.934c0 .263.142.506.372.638.23.131.514.131.744 0a.734.734 0 00.372-.638V4.07c0-1.143.937-2.07 2.093-2.07zm-5.674 0c1.156 0 2.093.927 2.093 2.07v11.523a.648.648 0 01-.652.645.648.648 0 01-.652-.645V4.07a.785.785 0 00-.789-.78.785.785 0 00-.789.78v14.013a2.06 2.06 0 01-2.07 2.048 2.06 2.06 0 01-2.071-2.048V9.1a.762.762 0 00-.766-.758.762.762 0 00-.766.758v3.8a2.06 2.06 0 01-2.071 2.049A2.06 2.06 0 010 12.9v-1.378c0-.357.292-.646.652-.646.36 0 .653.29.653.646V12.9c0 .418.343.757.766.757s.766-.339.766-.757V9.099a2.06 2.06 0 012.07-2.048 2.06 2.06 0 012.071 2.048v8.984c0 .419.343.758.767.758.423 0 .766-.339.766-.758V4.07c0-1.143.937-2.07 2.093-2.07z"></path>`,mistral:`<path clip-rule="evenodd" d="M3.428 3.4h3.429v3.428h3.429v3.429h-.002 3.431V6.828h3.427V3.4h3.43v13.714H24v3.429H13.714v-3.428h-3.428v-3.429h-3.43v3.428h3.43v3.429H0v-3.429h3.428V3.4zm10.286 13.715h3.428v-3.429h-3.427v3.429z"></path>`,moonshot:`<path d="M1.052 16.916l9.539 2.552a21.007 21.007 0 00.06 2.033l5.956 1.593a11.997 11.997 0 01-5.586.865l-.18-.016-.044-.004-.084-.009-.094-.01a11.605 11.605 0 01-.157-.02l-.107-.014-.11-.016a11.962 11.962 0 01-.32-.051l-.042-.008-.075-.013-.107-.02-.07-.015-.093-.019-.075-.016-.095-.02-.097-.023-.094-.022-.068-.017-.088-.022-.09-.024-.095-.025-.082-.023-.109-.03-.062-.02-.084-.025-.093-.028-.105-.034-.058-.019-.08-.026-.09-.031-.066-.024a6.293 6.293 0 01-.044-.015l-.068-.025-.101-.037-.057-.022-.08-.03-.087-.035-.088-.035-.079-.032-.095-.04-.063-.028-.063-.027a5.655 5.655 0 01-.041-.018l-.066-.03-.103-.047-.052-.024-.096-.046-.062-.03-.084-.04-.086-.044-.093-.047-.052-.027-.103-.055-.057-.03-.058-.032a6.49 6.49 0 01-.046-.026l-.094-.053-.06-.034-.051-.03-.072-.041-.082-.05-.093-.056-.052-.032-.084-.053-.061-.039-.079-.05-.07-.047-.053-.035a7.785 7.785 0 01-.054-.036l-.044-.03-.044-.03a6.066 6.066 0 01-.04-.028l-.057-.04-.076-.054-.069-.05-.074-.054-.056-.042-.076-.057-.076-.059-.086-.067-.045-.035-.064-.052-.074-.06-.089-.073-.046-.039-.046-.039a7.516 7.516 0 01-.043-.037l-.045-.04-.061-.053-.07-.062-.068-.06-.062-.058-.067-.062-.053-.05-.088-.084a13.28 13.28 0 01-.099-.097l-.029-.028-.041-.042-.069-.07-.05-.051-.05-.053a6.457 6.457 0 01-.168-.179l-.08-.088-.062-.07-.071-.08-.042-.049-.053-.062-.058-.068-.046-.056a7.175 7.175 0 01-.027-.033l-.045-.055-.066-.082-.041-.052-.05-.064-.02-.025a11.99 11.99 0 01-1.44-2.402zm-1.02-5.794l11.353 3.037a20.468 20.468 0 00-.469 2.011l10.817 2.894a12.076 12.076 0 01-1.845 2.005L.657 15.923l-.016-.046-.035-.104a11.965 11.965 0 01-.05-.153l-.007-.023a11.896 11.896 0 01-.207-.741l-.03-.126-.018-.08-.021-.097-.018-.081-.018-.09-.017-.084-.018-.094c-.026-.141-.05-.283-.071-.426l-.017-.118-.011-.083-.013-.102a12.01 12.01 0 01-.019-.161l-.005-.047a12.12 12.12 0 01-.034-2.145zm1.593-5.15l11.948 3.196c-.368.605-.705 1.231-1.01 1.875l11.295 3.022c-.142.82-.368 1.612-.668 2.365l-11.55-3.09L.124 10.26l.015-.1.008-.049.01-.067.015-.087.018-.098c.026-.148.056-.295.088-.442l.028-.124.02-.085.024-.097c.022-.09.045-.18.07-.268l.028-.102.023-.083.03-.1.025-.082.03-.096.026-.082.031-.095a11.896 11.896 0 011.01-2.232zm4.442-4.4L17.352 4.59a20.77 20.77 0 00-1.688 1.721l7.823 2.093c.267.852.442 1.744.513 2.665L2.106 5.213l.045-.065.027-.04.04-.055.046-.065.055-.076.054-.072.064-.086.05-.065.057-.073.055-.07.06-.074.055-.069.065-.077.054-.066.066-.077.053-.06.072-.082.053-.06.067-.074.054-.058.073-.078.058-.06.063-.067.168-.17.1-.098.059-.056.076-.071a12.084 12.084 0 012.272-1.677zM12.017 0h.097l.082.001.069.001.054.002.068.002.046.001.076.003.047.002.06.003.054.002.087.005.105.007.144.011.088.007.044.004.077.008.082.008.047.005.102.012.05.006.108.014.081.01.042.006.065.01.207.032.07.012.065.011.14.026.092.018.11.022.046.01.075.016.041.01L14.7.3l.042.01.065.015.049.012.071.017.096.024.112.03.113.03.113.032.05.015.07.02.078.024.073.023.05.016.05.016.076.025.099.033.102.036.048.017.064.023.093.034.11.041.116.045.1.04.047.02.06.024.041.018.063.026.04.018.057.025.11.048.1.046.074.035.075.036.06.028.092.046.091.045.102.052.053.028.049.026.046.024.06.033.041.022.052.029.088.05.106.06.087.051.057.034.053.032.096.059.088.055.098.062.036.024.064.041.084.056.04.027.062.042.062.043.023.017c.054.037.108.075.161.114l.083.06.065.048.056.043.086.065.082.064.04.03.05.041.086.069.079.065.085.071c.712.6 1.353 1.283 1.909 2.031L7.222.994l.062-.027.065-.028.081-.034.086-.035c.113-.045.227-.09.341-.131l.096-.035.093-.033.084-.03.096-.031c.087-.03.176-.058.264-.085l.091-.027.086-.025.102-.03.085-.023.1-.026L9.04.37l.09-.023.091-.022.095-.022.09-.02.098-.021.091-.02.095-.018.092-.018.1-.018.091-.016.098-.017.092-.014.097-.015.092-.013.102-.013.091-.012.105-.012.09-.01.105-.01c.093-.01.186-.018.28-.024l.106-.008.09-.005.11-.006.093-.004.1-.004.097-.002.099-.002.197-.002z"></path>`,morph:`<path d="M7.941 2c.23 0 .452.073.638.21.186.136.325.328.397.55l.593 1.814c.073.221.212.413.397.55.186.136.409.21.638.21h2.791c.23 0 .452-.074.638-.21a1.11 1.11 0 00.397-.55l.594-1.815a1.11 1.11 0 01.397-.55c.185-.136.408-.209.637-.209h1.7c.23 0 .453.073.639.21.185.136.324.328.397.55l.652 1.994c.118.361.41.635.77.728l2.957.752c.236.06.446.199.596.394.15.195.23.436.231.684v9.376c0 .248-.081.488-.231.684a1.09 1.09 0 01-.595.394l-2.957.752a1.086 1.086 0 00-.477.263 1.114 1.114 0 00-.293.465l-.653 1.994a1.11 1.11 0 01-.396.55c-.186.136-.41.21-.638.21h-1.702c-.229 0-.452-.073-.637-.21a1.11 1.11 0 01-.397-.55l-.364-1.11a1.131 1.131 0 01.15-1.002 1.074 1.074 0 01.885-.462h2.85c.29 0 .567-.116.772-.325.204-.208.32-.49.32-.785V6.444c0-.294-.116-.577-.32-.785a1.08 1.08 0 00-.771-.326h-3.273c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v7.778c0 .295-.114.578-.319.786a1.08 1.08 0 01-.771.325h-2.182a1.08 1.08 0 01-.771-.325 1.122 1.122 0 01-.32-.786V6.444c0-.294-.115-.577-.32-.785a1.081 1.081 0 00-.77-.326H5.454c-.29 0-.567.117-.772.326-.204.208-.32.49-.32.785v11.112c0 .294.116.577.32.785.205.209.482.326.772.326h2.85a1.075 1.075 0 01.885.461 1.122 1.122 0 01.15 1.001l-.364 1.112a1.11 1.11 0 01-.397.55c-.185.136-.408.209-.637.209H6.24c-.229 0-.452-.073-.638-.21a1.11 1.11 0 01-.397-.55l-.652-1.994a1.114 1.114 0 00-.294-.465 1.086 1.086 0 00-.477-.263l-2.956-.752a1.09 1.09 0 01-.595-.394A1.124 1.124 0 010 16.688V7.312c0-.248.081-.489.231-.684.15-.195.36-.334.595-.394l2.957-.753c.178-.045.342-.136.477-.263.134-.127.235-.287.293-.464l.653-1.995a1.11 1.11 0 01.397-.55C5.788 2.075 6.01 2 6.24 2h1.701z"></path>`,nousresearch:`<path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path>`,nvidia:`<path d="M10.212 8.976V7.62c.127-.01.256-.017.388-.021 3.596-.117 5.957 3.184 5.957 3.184s-2.548 3.647-5.282 3.647a3.227 3.227 0 01-1.063-.175v-4.109c1.4.174 1.681.812 2.523 2.258l1.873-1.627a4.905 4.905 0 00-3.67-1.846 6.594 6.594 0 00-.729.044m0-4.476v2.025c.13-.01.259-.019.388-.024 5.002-.174 8.261 4.226 8.261 4.226s-3.743 4.69-7.643 4.69c-.338 0-.675-.031-1.007-.092v1.25c.278.038.558.057.838.057 3.629 0 6.253-1.91 8.794-4.169.421.347 2.146 1.193 2.501 1.564-2.416 2.083-8.048 3.763-11.24 3.763-.308 0-.603-.02-.894-.048V19.5H24v-15H10.21zm0 9.756v1.068c-3.356-.616-4.287-4.21-4.287-4.21a7.173 7.173 0 014.287-2.138v1.172h-.005a3.182 3.182 0 00-2.502 1.178s.615 2.276 2.507 2.931m-5.961-3.3c1.436-1.935 3.604-3.148 5.961-3.336V6.523C5.81 6.887 2 10.723 2 10.723s2.158 6.427 8.21 7.015v-1.166C5.77 16 4.25 10.958 4.25 10.958h-.002z"></path>`,openai:`<path d="M9.205 8.658v-2.26c0-.19.072-.333.238-.428l4.543-2.616c.619-.357 1.356-.523 2.117-.523 2.854 0 4.662 2.212 4.662 4.566 0 .167 0 .357-.024.547l-4.71-2.759a.797.797 0 00-.856 0l-5.97 3.473zm10.609 8.8V12.06c0-.333-.143-.57-.429-.737l-5.97-3.473 1.95-1.118a.433.433 0 01.476 0l4.543 2.617c1.309.76 2.189 2.378 2.189 3.948 0 1.808-1.07 3.473-2.76 4.163zM7.802 12.703l-1.95-1.142c-.167-.095-.239-.238-.239-.428V5.899c0-2.545 1.95-4.472 4.591-4.472 1 0 1.927.333 2.712.928L8.23 5.067c-.285.166-.428.404-.428.737v6.898zM12 15.128l-2.795-1.57v-3.33L12 8.658l2.795 1.57v3.33L12 15.128zm1.796 7.23c-1 0-1.927-.332-2.712-.927l4.686-2.712c.285-.166.428-.404.428-.737v-6.898l1.974 1.142c.167.095.238.238.238.428v5.233c0 2.545-1.974 4.472-4.614 4.472zm-5.637-5.303l-4.544-2.617c-1.308-.761-2.188-2.378-2.188-3.948A4.482 4.482 0 014.21 6.327v5.423c0 .333.143.571.428.738l5.947 3.449-1.95 1.118a.432.432 0 01-.476 0zm-.262 3.9c-2.688 0-4.662-2.021-4.662-4.519 0-.19.024-.38.047-.57l4.686 2.71c.286.167.571.167.856 0l5.97-3.448v2.26c0 .19-.07.333-.237.428l-4.543 2.616c-.619.357-1.356.523-2.117.523zm5.899 2.83a5.947 5.947 0 005.827-4.756C22.287 18.339 24 15.84 24 13.296c0-1.665-.713-3.282-1.998-4.448.119-.5.19-.999.19-1.498 0-3.401-2.759-5.947-5.946-5.947-.642 0-1.26.095-1.88.31A5.962 5.962 0 0010.205 0a5.947 5.947 0 00-5.827 4.757C1.713 5.447 0 7.945 0 10.49c0 1.666.713 3.283 1.998 4.448-.119.5-.19 1-.19 1.499 0 3.401 2.759 5.946 5.946 5.946.642 0 1.26-.095 1.88-.309a5.96 5.96 0 004.162 1.713z"></path>`,openclaw:`<g clip-path="url(#a)"><path d="M9.046 7.104a.527.527 0 110 1.055.527.527 0 010-1.055z"></path><path d="M15.376 7.104a.528.528 0 110 1.056.528.528 0 010-1.056z"></path><path clip-rule="evenodd" d="M16.877 1.912c.58-.27 1.14-.323 1.616-.037a.317.317 0 01-.326.542c-.227-.136-.547-.153-1.022.068-.352.165-.765.45-1.234.866 2.683 1.17 4.4 3.5 5.148 5.921a6.421 6.421 0 00-.704.184c-.578.016-1.174.204-1.502.735-.338.55-.268 1.276.072 2.069l.005.012.007.014c.523 1.045 1.318 1.91 2.2 2.284-.912 3.274-3.44 6.144-5.972 6.988v2.109h-2.11v-2.11c-1.043.417-2.086.01-2.11 0v2.11h-2.11v-2.11c-2.531-.843-5.061-3.713-5.973-6.987.882-.373 1.678-1.238 2.2-2.284l.007-.014.006-.012c.34-.793.41-1.518.071-2.069-.327-.531-.923-.719-1.503-.735a6.409 6.409 0 00-.704-.183c.749-2.421 2.466-4.751 5.149-5.922-.47-.416-.88-.701-1.234-.866-.474-.221-.794-.204-1.021-.068a.318.318 0 01-.435-.109.317.317 0 01.109-.433c.476-.286 1.036-.233 1.615.037.49.229 1.031.628 1.621 1.182A9.924 9.924 0 0112 2.568c1.199 0 2.284.19 3.256.526.59-.554 1.13-.953 1.62-1.182zM8.835 6.577a1.266 1.266 0 100 2.532 1.266 1.266 0 000-2.532zm6.33 0a1.267 1.267 0 100 2.533 1.267 1.267 0 000-2.533z"></path><path d="M.395 13.118c-.966-1.932-.163-3.863 2.41-3.365v-.001l.05.01c.084.018.17.038.26.06.033.009.067.017.1.027.084.022.168.048.255.076l.09.027c.528 0 .95.158 1.16.501.212.343.212.87-.105 1.61-.085.17-.178.333-.276.489l-.01.017a4.967 4.967 0 01-.62.791l-.019.02c-1.092 1.117-2.496 1.336-3.295-.262z"></path><path d="M21.193 9.753c2.574-.5 3.378 1.433 2.411 3.365-.58 1.159-1.476 1.361-2.342.96l-.011-.005a2.419 2.419 0 01-.114-.056l-.019-.01a2.751 2.751 0 01-.115-.067l-.023-.014c-.035-.022-.071-.044-.106-.068l-.05-.035c-.55-.388-1.062-1.007-1.44-1.76-.276-.647-.311-1.132-.174-1.472.176-.439.636-.639 1.23-.639.032-.011.066-.02.099-.03.08-.026.16-.05.238-.072l.117-.03a5.502 5.502 0 01.3-.067z"></path></g><defs><linearGradient gradientUnits="userSpaceOnUse" id="b" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="c" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="d" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="e" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="f" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="#FF4D4D"></stop><stop offset="1" stop-color="#991B1B"></stop></linearGradient><clipPath id="a"><path d="M0 0h24v24H0z"></path></clipPath></defs>`,openrouter:`<path d="M18.654 3.87a5.087 5.087 0 110 10.174L23.7 19.09c.64.641.187 1.737-.72 1.737H8.48a8.479 8.479 0 010-16.958h10.175zM8.479 7.26a5.087 5.087 0 100 10.176 5.087 5.087 0 000-10.175z"></path>`,perplexity:`<path d="M19.785 0v7.272H22.5V17.62h-2.935V24l-7.037-6.194v6.145h-1.091v-6.152L4.392 24v-6.465H1.5V7.188h2.884V0l7.053 6.494V.19h1.09v6.49L19.786 0zm-7.257 9.044v7.319l5.946 5.234V14.44l-5.946-5.397zm-1.099-.08l-5.946 5.398v7.235l5.946-5.234V8.965zm8.136 7.58h1.844V8.349H13.46l6.105 5.54v2.655zm-8.982-8.28H2.59v8.195h1.8v-2.576l6.192-5.62zM5.475 2.476v4.71h5.115l-5.115-4.71zm13.219 0l-5.115 4.71h5.115v-4.71z"></path>`,poolside:`<g clip-path="url(#lobe-icons-poolside-0-_R_0_)"><mask height="24" id="lobe-icons-poolside-4-_R_0_" maskUnits="userSpaceOnUse" style="mask-type:alpha" width="24" x="0" y="0"><path d="M24 0H0v24h24V0z" fill="url(#lobe-icons-poolside-1-_R_0_)"></path><path d="M24 0H0v24h24V0z" fill="url(#lobe-icons-poolside-2-_R_0_)"></path><path d="M24 0H0v24h24V0z" fill="url(#lobe-icons-poolside-3-_R_0_)"></path></mask><g mask="url(#lobe-icons-poolside-4-_R_0_)"><path d="M6.742 22.786a11.93 11.93 0 01-5.232-4.963 11.98 11.98 0 01-1.463-6.886.975.975 0 011.943.173c-.178 2.005.246 4 1.226 5.769a9.968 9.968 0 003.526 3.685l4.586-9.405c-1.795-.598-3.29-.338-3.425-.312l-.058.012a.972.972 0 01-1.054-.576c-.24-.448-.96-1.544-1.834-1.97-.873-.426-2.218-.289-2.651-.195a.977.977 0 01-1.087-1.38C4.117.792 11.315-1.686 17.262 1.215c5.946 2.9 8.422 10.093 5.529 16.038l-.01.02c-2.903 5.94-10.095 8.414-16.039 5.514zm6.338-10.773l-4.586 9.405c4.629 1.73 9.896-.192 12.304-4.558-.338-.524-.932-1.275-1.62-1.61-.888-.434-2.19-.292-2.637-.198a.989.989 0 01-.616-.055.984.984 0 01-.49-.473c-.028-.058-.739-1.438-2.355-2.51zM5.81 6.56c.747.365 1.356.944 1.81 1.49 1.406-2.15 3.314-3.774 4.787-4.82a20.81 20.81 0 011.66-1.067A10.078 10.078 0 003.882 6.077c.617.042 1.297.174 1.929.482zm12.671-2.243c.09.624.152 1.294.182 1.965.083 1.801-.021 4.296-.844 6.722.686.018 1.484.14 2.214.495.652.318 1.198.8 1.628 1.28a10.082 10.082 0 00-3.18-10.462zm-5.394 5.46a9.522 9.522 0 012.984 2.287c1.075-3.493.606-7.402.215-8.85-1.381.584-4.75 2.62-6.84 5.618a9.515 9.515 0 013.64.944z"></path></g></g><defs><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-poolside-1-_R_0_" x1="6.75" x2="5.625" y1="20.55" y2="20.55"><stop stop-color="currentColor"></stop><stop offset="1" stop-color="currentColor" stop-opacity="0"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-poolside-2-_R_0_" x1="6.825" x2="7.2" y1="11.85" y2="11.137"><stop stop-color="currentColor" stop-opacity="0"></stop><stop offset="1" stop-color="currentColor"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="lobe-icons-poolside-3-_R_0_" x1=".975" x2=".975" y1="20.512" y2="10.912"><stop stop-color="currentColor"></stop><stop offset=".105" stop-color="currentColor" stop-opacity=".9"></stop><stop offset=".904" stop-color="currentColor" stop-opacity=".04"></stop><stop offset="1" stop-color="currentColor" stop-opacity="0"></stop></linearGradient><clipPath id="lobe-icons-poolside-0-_R_0_"><path d="M0 0h24v24H0z" fill="currentColor"></path></clipPath></defs>`,qwen:`<path d="M12.604 1.34c.393.69.784 1.382 1.174 2.075a.18.18 0 00.157.091h5.552c.174 0 .322.11.446.327l1.454 2.57c.19.337.24.478.024.837-.26.43-.513.864-.76 1.3l-.367.658c-.106.196-.223.28-.04.512l2.652 4.637c.172.301.111.494-.043.77-.437.785-.882 1.564-1.335 2.34-.159.272-.352.375-.68.37-.777-.016-1.552-.01-2.327.016a.099.099 0 00-.081.05 575.097 575.097 0 01-2.705 4.74c-.169.293-.38.363-.725.364-.997.003-2.002.004-3.017.002a.537.537 0 01-.465-.271l-1.335-2.323a.09.09 0 00-.083-.049H4.982c-.285.03-.553-.001-.805-.092l-1.603-2.77a.543.543 0 01-.002-.54l1.207-2.12a.198.198 0 000-.197 550.951 550.951 0 01-1.875-3.272l-.79-1.395c-.16-.31-.173-.496.095-.965.465-.813.927-1.625 1.387-2.436.132-.234.304-.334.584-.335a338.3 338.3 0 012.589-.001.124.124 0 00.107-.063l2.806-4.895a.488.488 0 01.422-.246c.524-.001 1.053 0 1.583-.006L11.704 1c.341-.003.724.032.9.34zm-3.432.403a.06.06 0 00-.052.03L6.254 6.788a.157.157 0 01-.135.078H3.253c-.056 0-.07.025-.041.074l5.81 10.156c.025.042.013.062-.034.063l-2.795.015a.218.218 0 00-.2.116l-1.32 2.31c-.044.078-.021.118.068.118l5.716.008c.046 0 .08.02.104.061l1.403 2.454c.046.081.092.082.139 0l5.006-8.76.783-1.382a.055.055 0 01.096 0l1.424 2.53a.122.122 0 00.107.062l2.763-.02a.04.04 0 00.035-.02.041.041 0 000-.04l-2.9-5.086a.108.108 0 010-.113l.293-.507 1.12-1.977c.024-.041.012-.062-.035-.062H9.2c-.059 0-.073-.026-.043-.077l1.434-2.505a.107.107 0 000-.114L9.225 1.774a.06.06 0 00-.053-.031zm6.29 8.02c.046 0 .058.02.034.06l-.832 1.465-2.613 4.585a.056.056 0 01-.05.029.058.058 0 01-.05-.029L8.498 9.841c-.02-.034-.01-.052.028-.054l.216-.012 6.722-.012z"></path>`,relace:`<path d="M23 23H1V1h22v22zM2.962 15.232c1.969.3 5.028.42 7.78-.171.904-.195 1.743-.46 2.49-.803-1.395-3.4-1.675-5.766-1.264-7.378.466-1.823 1.799-2.59 2.998-2.602h.01c.688 0 2.117.177 3.081 1.35 1.003 1.22 1.216 3.152.26 5.991-.504 1.493-1.437 2.616-2.594 3.456 1.323 2.993 2.11 4.498 2.588 5.284.223.367.372.564.467.679h2.26V2.962H2.962v12.27zm11.05.827c-.912.413-1.887.711-2.857.92-2.91.626-6.059.527-8.193.234v3.825h13.471c-.527-.92-1.287-2.424-2.421-4.98zm.97-9.82c-.323.005-.87.181-1.112 1.127-.25.975-.161 2.776 1.055 5.84.705-.598 1.233-1.329 1.531-2.213.868-2.576.455-3.67.086-4.119-.406-.494-1.09-.633-1.56-.634z"></path>`,stability:`<path d="M7.223 21c4.252 0 7.018-2.22 7.018-5.56 0-2.59-1.682-4.236-4.69-4.918l-1.93-.571c-1.694-.375-2.683-.825-2.45-1.975.194-.957.773-1.497 2.122-1.497 4.285 0 5.873 1.497 5.873 1.497v-3.6S11.62 3 7.293 3C3.213 3 1 5.07 1 8.273c0 2.59 1.534 4.097 4.645 4.812l.334.083c.473.144 1.112.335 1.916.572 1.59.375 1.999.773 1.999 1.966 0 1.09-1.15 1.71-2.67 1.71C2.841 17.416 1 15.231 1 15.231v3.989S2.152 21 7.223 21z"></path><path d="M20.374 20.73c1.505 0 2.626-1.073 2.626-2.526 0-1.484-1.089-2.526-2.626-2.526-1.505 0-2.594 1.042-2.594 2.526 0 1.484 1.089 2.526 2.594 2.526z"></path>`,stepfun:`<path d="M12 0C5.372 0 0 5.372 0 12s5.372 12 12 12 12-5.372 12-12S18.628 0 12 0zM8.762 19.614H4.376v-4.386h4.386v4.386zm5.423 0H9.798v-4.386h4.387v4.386zm0-5.42H9.798V9.81h4.387v4.386zm0-5.418H9.798V4.39h4.387v4.386zm5.422-.004h-4.386V4.386h4.386v4.386z"></path>`,tencent:`<path d="M9.976 1L24 9.8l-10.587.015L10.723 23H5.489L8.18 9.8H3.244L1 5.4h8.077L9.976 1z"></path>`,upstage:`<path d="M19.763 0l-.373 1.297h2.594L22.354 0h-2.591z"></path><path d="M16.192 2.27l-.376 1.298h5.52l.37-1.298h-5.514z"></path><path d="M12.897 4.54l-.377 1.298h8.167l.37-1.297h-8.16z"></path><path d="M2.85 6.81l-.377 1.298h17.565l.37-1.297H2.85z"></path><path d="M3.884 9.081l-.376 1.297H19.39l.37-1.297H3.883z"></path><path d="M4.088 24l.376-1.297H1.866L1.5 24h2.588z"></path><path d="M7.662 21.73l.376-1.298H2.515L2.15 21.73h5.513z"></path><path d="M10.957 19.46l.377-1.298h-8.17l-.367 1.297h8.16z"></path><path d="M21.005 17.19l.376-1.298H3.812l-.366 1.297h17.559z"></path><path d="M19.967 14.919l.376-1.297H4.461l-.366 1.297h15.872z"></path><path d="M18.787 12.649l.376-1.298H4.26l-.366 1.298h14.893z"></path>`,xai:`<path d="M6.469 8.776L16.512 23h-4.464L2.005 8.776H6.47zm-.004 7.9l2.233 3.164L6.467 23H2l4.465-6.324zM22 2.582V23h-3.659V7.764L22 2.582zM22 1l-9.952 14.095-2.233-3.163L17.533 1H22z"></path>`,xiaomimimo:`<path d="M.958 15.936a.459.459 0 01.459.44v2.729a.46.46 0 01-.918 0v-2.729a.459.459 0 01.459-.44zm4.814-2.035a.46.46 0 01.553.45v4.754a.458.458 0 11-.918 0V15.48L3.74 17.202a.462.462 0 01-.655.016.462.462 0 01-.065-.082L.628 14.67a.459.459 0 01.658-.637l2.124 2.187 2.127-2.188a.46.46 0 01.235-.13zm2.068.004a.46.46 0 01.458.445v4.755a.46.46 0 01-.458.458.459.459 0 01-.458-.458V14.35a.459.459 0 01.458-.445zm1.973 2.014a.46.46 0 01.46.457v2.729a.46.46 0 01-.784.324.46.46 0 01-.134-.324v-2.729a.46.46 0 01.458-.458zm.002-2.045a.458.458 0 01.328.157l2.127 2.19 2.125-2.19a.459.459 0 01.784.318v4.756a.46.46 0 01-.455.458.46.46 0 01-.458-.458V15.48l-1.667 1.723a.46.46 0 01-.65.008l-.005-.005c0-.002-.002-.002-.004-.003l-2.455-2.534a.46.46 0 01-.008-.667.461.461 0 01.338-.128zm6.797 1.206a.46.46 0 01.53.651A1.966 1.966 0 0019.81 18.4a.462.462 0 01.623.18.46.46 0 01-.181.624 2.863 2.863 0 01-1.38.353l-.142-.004a2.88 2.88 0 01-2.393-4.263.461.461 0 01.274-.21zm.864-.931a2.884 2.884 0 013.915 3.914.46.46 0 01-.402.24l-.057-.004a.458.458 0 01-.164-.055.46.46 0 01-.182-.622 1.967 1.967 0 00-2.669-2.67.459.459 0 11-.441-.803zM9.59 6.368c1.481 0 1.696 1.202 1.696 1.654v2.648h-.917v-.432c-.26.346-.792.535-1.36.535-.133 0-1.289-.03-1.384-1.136-.082-.932.675-1.61 2.053-1.61h.691c0-.563-.367-.886-.983-.886-.44.013-.864.174-1.2.458l-.36-.664c.484-.379 1.012-.567 1.764-.567zm4.427.1c1.263 0 2.082.97 2.083 2.15 0 1.181-.824 2.154-2.083 2.154-1.26 0-2.084-.972-2.084-2.152 0-1.18.82-2.153 2.084-2.153zm6.801.015c.68 0 1.202.465 1.197 1.548v2.642H21.1V8.29c0-.312-.002-.98-.63-.98s-.628.667-.628.838v2.524h-.89V8.148c0-.17-.001-.838-.63-.838-.628 0-.628.668-.628.98v2.383h-.917v-4.03h.917V7a1.22 1.22 0 01.947-.516c.398 0 .76.193.982.686a1.321 1.321 0 011.195-.686zm-18.093.872l1.457-1.772H5.32L3.311 8.07l2.14 2.602H4.24L2.725 8.796 1.21 10.672H0L2.138 8.07.13 5.583h1.138l1.458 1.772zm4.149 3.317h-.916V6.644h.916v4.028zm16.99 0h-.916V6.644h.916v4.028zM9.925 8.71c-1.055 0-1.359.412-1.326.742.032.329.324.537.757.537a1.013 1.013 0 001.014-.968l.002-.31h-.447zM14.018 7.3c-.663 0-1.184.487-1.184 1.32 0 .832.52 1.32 1.184 1.32.662 0 1.182-.49 1.182-1.32 0-.832-.52-1.32-1.182-1.32zM6.417 5.001a.568.568 0 01.587.582.588.588 0 01-1.175 0A.57.57 0 016.417 5zm16.991 0a.57.57 0 01.592.582.588.588 0 01-1.174 0 .57.57 0 01.357-.542.572.572 0 01.225-.04z"></path>`,zai:`<path d="M12.105 2L9.927 4.953H.653L2.83 2h9.276zM23.254 19.048L21.078 22h-9.242l2.174-2.952h9.244zM24 2L9.264 22H0L14.736 2H24z"></path>`,zoo:`<defs><clipPath id="zoo-cut"><circle cx="12" cy="12" r="12"></circle></clipPath></defs><g clip-path="url(#zoo-cut)" fill="none" stroke="currentColor"><circle cx="12.203" cy="6.27" r="9.509" stroke-width="2.4" stroke="#00A652"></circle><circle cx="6.189" cy="15.454" r="9.509" stroke-width="2.4" stroke="#ED1C24"></circle><circle cx="17.486" cy="15.454" r="9.509" stroke-width="2.4" stroke="#2E3192"></circle><circle cx="12" cy="12" r="10.8" stroke-width="2.4"></circle></g>`,adroll:`<path d="${N3.path}"></path>`,chrome:`<path d="${H3.path}"></path>`,cloudflare:`<path d="${P3.path}"></path>`,discord:`<path d="${F3.path}"></path>`,facebook:`<path d="${I3.path}"></path>`,github:`<path d="${R3.path}"></path>`,gitlab:`<path d="${z3.path}"></path>`,google_ads:`<path d="${V3.path}"></path>`,instagram:`<path d="${W3.path}"></path>`,meta_ads:`<path d="${K3.path}"></path>`,pinterest:`<path d="${q3.path}"></path>`,reddit:`<path d="${J3.path}"></path>`,reddit_ads:`<path d="${J3.path}"></path>`,telegram:`<path d="${X3.path}"></path>`,threads:`<path d="${Z3.path}"></path>`,tiktok:`<path d="${Q3.path}"></path>`,tiktok_ads:`<path d="${Q3.path}"></path>`,twitch:`<path d="${$3.path}"></path>`,warpcast:`<path d="${L3.path}"></path>`,whatsapp:`<path d="${e6.path}"></path>`,x:`<path d="${t6.path}"></path>`,youtube:`<path d="${n6.path}"></path>`},a6={"aion-labs":`aionlabs`,allenai:`ai2`,amazon:`aws`,"arcee-ai":`arcee`,bge:`baai`,"bytedance-seed":`bytedance`,e:`microsoft`,glm:`zai`,gpt:`openai`,gte:`alibaba`,"ibm-granite":`ibm`,llama:`meta`,meituan:`longcat`,"meta-llama":`meta`,mimo:`xiaomimimo`,mistralai:`mistral`,moonshotai:`moonshot`,nemotron:`nvidia`,o:`openai`,rerank:`baai`,stable:`stability`,trinity:`arcee`,wan:`alibaba`,"x-ai":`xai`,xiaomi:`xiaomimimo`,"z-ai":`zai`,zen:`zoo`},o6=/ stroke="#[0-9A-Fa-f]{6}"/g,s6=e=>e?i6[e]?e:i6[a6[e]??``]?a6[e]:void 0:void 0,c6={alibaba:`#FF6A00`,aws:`#FF9900`,baidu:`#2932E1`,claude:`#C37E4E`,deepseek:`#4D6BFE`,gemma:`#4285F4`,google:`#4285F4`,ibm:`#0F62FE`,meta:`#0064E0`,minimax:`#F23F5D`,mistral:`#FA520F`,nvidia:`#76B900`,perplexity:`#20808D`,qwen:`#615CED`,tencent:`#0052D9`,xiaomimimo:`#EF6200`,zai:`#3859FF`,adroll:`#`+N3.hex,chrome:`#`+H3.hex,cloudflare:`#`+P3.hex,discord:`#`+F3.hex,facebook:`#`+I3.hex,github:`#`+R3.hex,gitlab:`#`+z3.hex,google_ads:`#`+V3.hex,instagram:`#`+W3.hex,meta_ads:`#`+K3.hex,pinterest:`#`+q3.hex,reddit:`#`+J3.hex,reddit_ads:`#`+J3.hex,telegram:`#`+X3.hex,threads:`#`+Z3.hex,tiktok:`#`+Q3.hex,tiktok_ads:`#`+Q3.hex,twitch:`#`+$3.hex,warpcast:`#`+L3.hex,whatsapp:`#`+e6.hex,x:`#`+t6.hex,youtube:`#`+n6.hex};function l6(e,t){return s6((t?D3(t).slug.toLowerCase().match(/^[a-z]+/)?.[0]:void 0)??``)??s6(e.replace(/^~/,``).toLowerCase())}function u6({org:e,provider:t,model:n,size:r=32,ink:i}){let a=l6(e||t||`enso`,n);return a?(0,H.jsx)(w,{render:`span`,children:(0,H.jsx)(`svg`,{"aria-hidden":!0,focusable:`false`,width:r,height:r,viewBox:`0 0 24 24`,fill:`currentColor`,fillRule:`evenodd`,color:i?void 0:c6[a],dangerouslySetInnerHTML:{__html:i?i6[a].replace(o6,``):i6[a]}})}):(0,H.jsx)(U,{"aria-hidden":!0,display:`flex`,shrink:0,items:`center`,justify:`center`,width:r,height:r,rounded:`var(--radius-lg)`,bg:`var(--secondary)`,fontSize:r*.44,fontWeight:`700`,textTransform:`uppercase`,color:`var(--muted-foreground)`,children:(k3(e)||`Hanzo`).replace(/^~/,``).charAt(0)})}function d6(e){let t=e?.body;if(t&&typeof t==`object`){let e=t;for(let t of[`detail`,`message`,`msg`,`error`,`title`]){let n=e[t];if(typeof n==`string`&&n.trim())return n.trim();if(t===`error`&&n&&typeof n==`object`){let e=n.message;if(typeof e==`string`&&e.trim())return e.trim()}}}}var f6=e=>{let t=e?.status;return typeof t==`number`&&Number.isFinite(t)?t:null},p6=e=>/no instance running|not running|service unavailable|503|econnrefused|failed to fetch|network/i.test(e),m6=e=>/401|403|forbidden|unauthori[sz]ed|not authori[sz]ed|authentication required|validated principal|permission|serve anonymous|anonymous completions/i.test(e);function h6(e,t,n=`read`,r=ne){let i=e instanceof Error?e.message:String(e??``),a=f6(e);return a===502||a===503||a===504||p6(i)?r(`Could not reach {subject}. Nothing has been lost — try again shortly.`,{subject:t}):a===401||a===403||m6(i)?r(n===`save`?`This account cannot change {subject}.`:`This account cannot open {subject}.`,{subject:t}):r(n===`save`?`Could not save {subject}.`:`Could not read {subject}.`,{subject:t})}function g6(e,t,n=ne){let r=e instanceof Error?e.message:String(e??``);return p6(r)||m6(r)?h6(e,t,`read`,n):d6(e)??r}function _6(e){let t=f6(e);return t!==402&&t!==429?null:c4(e?.body,t)}function v6(e){if(typeof e==`string`)try{let t=new URL(e),n=t.hostname;return t.protocol===`https:`&&(n===`hanzo.ai`||n.endsWith(`.hanzo.ai`))?t.toString():void 0}catch{return}}var y6=`signin.destination`,b6=new Set([`/login`,`/signup`,`/auth/callback`]);function x6(){try{let{pathname:e,search:t,hash:n}=window.location;window.sessionStorage.setItem(y6,e+t+n)}catch{}}var S6=`/login`,C6=()=>UW().signUp,w6=`hz_known`;function T6(){try{return window.localStorage.getItem(w6)===`1`?S6:C6()}catch{return C6()}}function E6(e=T6()){let{pathname:t,search:n,hash:r}=window.location,i=`${t}${n}${r}`;k6(i)||(x6(),window.location.assign(O6(e,i)))}var D6=[`utm_source`,`utm_medium`,`utm_campaign`,`utm_term`,`utm_content`,`gclid`,`gbraid`,`wbraid`,`fbclid`,`li_fat_id`,`twclid`,`ttclid`];function O6(e,t){let[n,r=``]=e.split(`?`),i=new URLSearchParams(r),a=A6(t,``);a&&a!==`/`&&i.set(`next`,a);let o=new URLSearchParams(t.split(`#`)[0].split(`?`)[1]??``);for(let e of D6){let t=o.get(e)?.trim();t&&!i.has(e)&&i.set(e,t)}let s=i.toString();return s?`${n}?${s}`:n}function k6(e){if(typeof window>`u`)return!1;let t=window.location.hostname,n=new URLSearchParams(e.split(`#`)[0].split(`?`)[1]??``).has(`client_id`);return!MG(t)&&(!AG(t)||n)?!1:(window.location.assign(jG+e),!0)}function A6(e,t=`/`){if(!e||!e.startsWith(`/`)||e.startsWith(`//`)||e.startsWith(`/\\`))return t;let n;try{n=new URL(e,j6)}catch{return t}if(n.origin!==j6)return t;let r=n.pathname.replace(/\/+$/,``)||`/`;return b6.has(r)?t:e}var j6=`https://hanzo.invalid`,M6=(e,t,n)=>{let r=kS();return e===void 0?t===void 0?n:r!==`a`&&N6(t)?(0,V.createElement)(r,{href:t}):`a`:e},N6=e=>e.startsWith(`/`)&&!e.startsWith(`//`)&&!/\.[a-z][a-z0-9]{1,4}$/i.test(e.split(/[?#]/)[0]),P6={display:`inline-flex`,items:`center`,whiteSpace:`inherit`,textDecorationLine:`none`},F6={fontSize:`$2`,lineHeight:`calc(1.25 / 0.875)`},I6=(e,t,n)=>{let r=t=>Object.fromEntries(Object.entries(t).filter(([t])=>!(t in e))),{hoverStyle:i,...a}=n;return{...e.hoverStyle===void 0?{hoverStyle:r(t)}:null,...e[`$theme-light`]===void 0?{"$theme-light":{...r(a),...i&&e.hoverStyle===void 0?{hoverStyle:r(i)}:null}}:null}},L6=({render:e,fill:t=!1,...n})=>{let r=M6(e,n.href,`a`);return(0,H.jsx)(U,{...B(`action`),...t?{"data-fill":``}:null,render:r,...P6,...F6,justify:`center`,gap:`$2`,minH:44,px:`$5`,rounded:9999,fontWeight:`500`,backdropFilter:`var(--chrome-blur)`,...t?{borderWidth:0,bg:`var(--pure-white)`,color:`var(--pure-black)`,boxShadow:`0 4px 20px -2px var(--white-22), 0 2px 8px 0 color-mix(in srgb, var(--pure-black) 40%, transparent)`,...I6(n,{opacity:.92,bg:`var(--neutral-100)`,color:`var(--pure-black)`},{bg:`var(--foreground)`,color:`var(--background)`,boxShadow:`0 4px 16px -6px color-mix(in srgb, var(--pure-black) 40%, transparent)`,hoverStyle:{bg:`var(--foreground)`,color:`var(--background)`}})}:{borderWidth:1,borderStyle:`solid`,borderColor:`var(--white-14)`,bg:`color-mix(in srgb, var(--neutral-900) 65%, transparent)`,color:`var(--foreground)`,boxShadow:`inset 0 1px 0 0 var(--white-14), 0 4px 16px -2px color-mix(in srgb, var(--pure-black) 30%, transparent)`,...I6(n,{bg:`color-mix(in srgb, var(--neutral-800) 80%, transparent)`,borderColor:`var(--white-22)`,color:`var(--pure-white)`},{borderColor:`color-mix(in srgb, var(--pure-black) 14%, transparent)`,bg:`color-mix(in srgb, var(--pure-white) 72%, transparent)`,color:`var(--foreground)`,boxShadow:`0 2px 10px -4px color-mix(in srgb, var(--pure-black) 18%, transparent)`,hoverStyle:{borderColor:`color-mix(in srgb, var(--pure-black) 26%, transparent)`,bg:`var(--pure-white)`,color:`var(--foreground)`}})},...n})},R6=(e,t)=>`color-mix(in srgb, ${e} ${t}%, var(--foreground))`,z6=R6(`var(--state-success)`,55);R6(`var(--destructive)`,70),D(`Works with`),D(`Channels`);var B6=`/v1/provider`,V6=(e,t)=>e.connected?e.account||t(`Connected`):e.available?e.publisher:t(`Needs app credentials`),H6=[`tiktok`,`instagram`,`linkedin`,`slack`,`x`,`whatsapp`,`discord`,`telegram`,`facebook`,`teams`,`threads`,`youtube`],U6=null,W6=()=>U6??=Le(async()=>{let{INTEGRATIONS:e}=await import(`./integrations-DW-vmr60.js`);return{INTEGRATIONS:e}},[]).then(({INTEGRATIONS:e})=>e.map(e=>({id:e.slug,name:e.name,publisher:e.creator,description:e.description.split(`. `)[0]+`.`,kind:`native`}))).catch(()=>[]),G6=e=>e.charAt(0).toUpperCase()+e.slice(1);function K6(e){let t=e??{},n=e=>{let t=H6.indexOf(e);return t<0?H6.length:t};return(t.providers??[]).map(e=>{let t=e.connection??{},n=String(t.account??t.label??``);return{id:String(e.id),name:String(e.name??G6(String(e.id))),publisher:String(e.category??``),description:String(e.description??``),kind:`native`,connected:!!e.connected,available:!!e.available,account:n}}).sort((e,t)=>n(e.id)-n(t.id))}var q6=e=>Object.assign(Error(String(e.status)),{status:e.status});function J6({tab:e}){let{t}=R(),{isAuthenticated:n,accessToken:r}=IW(),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(0),f=t(e===`channels`?`Search channels`:`Search works with`),p=n&&!!r;(0,V.useEffect)(()=>{let t=!0;s(null),l(null);let n=p?QG():null;if(e===`apps`)return W6().then(e=>{t&&s(e)}),n&&Promise.all([W6(),fetch(`${LG()}/v1/connection`,{headers:n}).then(e=>e.ok?e.json():null)]).then(([e,n])=>{if(!t||!n?.connectors)return;let r=new Set(n.connectors.map(e=>String(e.provider)));s(e.map(e=>r.has(e.id)?{...e,connected:!0}:e))}).catch(()=>{}),()=>{t=!1};if(n)return fetch(`${LG()}${B6}`,{headers:n}).then(e=>{if(!e.ok)throw q6(e);return e.json()}).then(e=>t&&s(K6(e))).catch(e=>t&&l(e)),()=>{t=!1}},[e,p,u]),(0,V.useEffect)(()=>{if(e!==`channels`)return;let t=()=>{document.visibilityState===`visible`&&d(e=>e+1)};return document.addEventListener(`visibilitychange`,t),()=>document.removeEventListener(`visibilitychange`,t)},[e]);let m=(0,V.useMemo)(()=>{let e=i.trim().toLowerCase();return(o??[]).filter(t=>!e||t.name.toLowerCase().includes(e)||t.description.toLowerCase().includes(e))},[o,i]),h=(e,t)=>(0,H.jsxs)(z,{gap:`$3`,py:`$4`,items:`flex-start`,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e}),t]});return(0,H.jsxs)(z,{gap:`$4`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$2`,flexWrap:`wrap`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,flex:1,minW:180,children:[(0,H.jsx)(FK,{size:14,"aria-hidden":!0}),(0,H.jsx)(C_,{value:i,onChangeText:a,placeholder:f,"aria-label":f,flex:1})]}),(0,H.jsx)(L6,{render:`button`,onPress:()=>window.open(`https://hanzo.market`,`_blank`,`noopener,noreferrer`),$touchable:{minH:36},children:(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(CK,{size:14,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,children:t(`Explore on hanzo.market`)}),(0,H.jsx)(yK,{size:13,"aria-hidden":!0})]})})]}),e===`channels`&&!p?h(t(`Sign in to see the channels your organization can connect.`),(0,H.jsx)(L6,{render:`button`,onPress:()=>E6(),$touchable:{minH:44,minW:44},children:t(`Sign in`)})):c?h(h6(c,t(`the channels`),`read`,t),(0,H.jsx)(L6,{render:`button`,onPress:()=>d(e=>e+1),$touchable:{minH:44,minW:44},children:t(`Try again`)})):o===null?h(t(e===`channels`?`Loading channels…`:`Loading works with…`)):m.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:m.length===1?t(`1 result`):t(`{n} results`,{n:m.length})}),(0,H.jsx)(z,{maxH:380,overflowY:`auto`,overflowX:`hidden`,paddingInlineEnd:`$1`,width:`100%`,children:(0,H.jsx)(qS,{columns:e===`channels`?{min:168,max:4}:{min:240,max:2},gap:12,children:m.map(t=>e===`channels`?(0,H.jsx)(X6,{row:t,onChange:()=>d(e=>e+1)},t.id):(0,H.jsx)(Y6,{row:t,tab:e},t.id))})})]}):h(i?t(`Nothing matches “{query}”.`,{query:i}):t(e===`channels`?`No channel can be connected here yet.`:`Nothing is listed yet.`))]})}function Y6({row:e,tab:t}){let{t:n}=R(),r=GW(`/integrations/${e.id}`);return(0,H.jsxs)(z,{gap:`$2`,p:`$3`,borderWidth:1,borderColor:`$borderColor`,rounded:`$3`,height:`100%`,bg:`$raised`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(u6,{org:e.id.replace(/-sdk$/,``),size:20}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`500`,color:`$ink`,numberOfLines:1,children:e.name}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,numberOfLines:1,children:e.publisher})]}),e.connected?(0,H.jsxs)(y,{items:`center`,gap:`$1`,px:`$2`,py:`$1`,rounded:`$2`,bg:`$hover`,children:[(0,H.jsx)(xK,{size:12,color:z6,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$1`,color:z6,fontWeight:`600`,children:n(`Connected`)})]}):(0,H.jsx)(DS,{render:(0,H.jsx)(`a`,{href:r,target:t===`apps`?void 0:`_blank`,rel:`noreferrer`,"aria-label":n(`Open {name}`,{name:e.name})}),...fJ,children:(0,H.jsxs)(y,{items:`center`,gap:`$1`,px:`$2`,py:`$1`,rounded:`$2`,borderWidth:1,borderColor:`$borderColor`,bg:`var(--white-05)`,hoverStyle:{bg:`$hover`},children:[(0,H.jsx)(U,{fontSize:`$1`,color:`$color`,fontWeight:`600`,children:n(t===`apps`?`Docs`:`Install`)}),(0,H.jsx)(yK,{size:11,"aria-hidden":!0})]})})]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,numberOfLines:2,flex:1,children:e.description}),(0,H.jsx)(y,{items:`center`,pt:`$1`,children:(0,H.jsx)(U,{fontFamily:`$mono`,fontVariant:[`tabular-nums`],fontSize:`$1`,color:`$soft`,children:e.kind===`MCP`?`MCP`:n(`native`)})})]})}function X6({row:e,onChange:t}){let{t:n}=R(),{isAuthenticated:r,accessToken:i}=IW(),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(null),l=async n=>{if(!r||!i){E6();return}o(!0),c(null);try{let r=await fetch(`${LG()}/v1/provider/${encodeURIComponent(e.id)}/${n}`,{method:`POST`,headers:{...QG(),"Content-Type":`application/json`},body:`{}`});if(!r.ok)throw q6(r);let i=await r.json();i.authorizeUrl&&window.open(i.authorizeUrl,`_blank`,`noopener,noreferrer`),t()}catch(e){c(e)}finally{o(!1)}},u=(e,t,n,r)=>(0,H.jsxs)(DS,{render:`button`,onClick:()=>void l(n),"aria-label":t,"aria-disabled":a,px:`$3`,py:`$1.5`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,hoverStyle:{bg:`$hover`},opacity:a?.5:1,display:`flex`,items:`center`,gap:`$1`,children:[r,(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,fontWeight:`500`,children:e})]});return(0,H.jsxs)(z,{items:`center`,gap:`$2`,p:`$4`,borderWidth:1,borderColor:`$borderColor`,rounded:`$4`,bg:`$raised`,children:[e.connected?(0,H.jsxs)(y,{self:`flex-start`,items:`center`,gap:`$1`,"aria-label":n(`Connected`),children:[(0,H.jsx)(DS,{width:6,height:6,rounded:3,bg:`$ink`}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:n(`Connected`)})]}):null,(0,H.jsxs)(z,{items:`center`,gap:`$2`,pt:e.connected?0:`$3`,children:[(0,H.jsx)(u6,{org:e.id,size:40}),(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`500`,color:`$ink`,text:`center`,numberOfLines:1,children:e.name}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,text:`center`,numberOfLines:1,children:V6(e,n)})]}),(0,H.jsx)(y,{gap:`$1.5`,items:`center`,justify:`center`,flexWrap:`wrap`,children:e.connected?(0,H.jsxs)(H.Fragment,{children:[u(n(`Disconnect`),n(`Disconnect {name}`,{name:e.name}),`disconnect`),e.available?u(n(`Add`),n(`Add {name}`,{name:e.name}),`connect`,(0,H.jsx)(NK,{size:12,"aria-hidden":!0})):null]}):e.available?u(n(`Connect`),n(`Connect {name}`,{name:e.name}),`connect`):null}),s?(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,text:`center`,children:h6(s,e.name,`read`,n)}):null]})}var Z6=`https://hanzo.ai/pay`,Q6=`https://app-dev.hanzo.ai/pay`;function $6(){return typeof window<`u`&&PG(window.location.hostname)?Q6:Z6}function e8(e=`/`){return t8(e,{org:ZG()})}function t8(e,t){let n=new URLSearchParams;for(let[e,r]of Object.entries(t))r&&n.set(e,r);let r=n.toString(),i=$6();return e===`/`&&!r?i:`${i}${e}${r?`?${r}`:``}`}var n8=e=>`$${e.toFixed(2)}`,r8=(e,t=`en-US`)=>t===`en-US`?Number.isInteger(e)?`$${e.toLocaleString(`en-US`)}`:n8(e):new Intl.NumberFormat(t,{style:`currency`,currency:`USD`,minimumFractionDigits:Number.isInteger(e)?0:2,maximumFractionDigits:Number.isInteger(e)?0:2}).format(e);function i8(e){return Array.isArray(e)?e:[]}function a8(e,t=`en-US`){let n=e?Date.parse(e):NaN;return Number.isNaN(n)?``:new Date(n).toLocaleDateString(t,{timeZone:`UTC`,year:`numeric`,month:`short`,day:`numeric`})}var o8=(e,t)=>Object.assign(Error(t),{status:e});async function s8(e,t){let n=await fetch(`${LG()}${e}`,{headers:QG(),signal:t});if(!n.ok){let e=``;try{e=(await n.json()).detail??``}catch{}throw o8(n.status,e||`Billing answered ${n.status}`)}return await n.json()}async function c8(e){if(!HG())throw o8(401,`Sign in to see your plan`);let[t,n]=await Promise.all([s8(`/v1/billing/tier`,e),s8(`/v1/billing/balance`,e)]);return t.balance={...t.balance,effectiveAvailable:n.available,account:n.account},t}var l8=new Set([`active`,`trialing`]);async function u8(e){return i8((await s8(`/v1/billing/subscriptions`,e))?.subscriptions).find(e=>l8.has(e?.status)&&typeof e?.plan?.price==`number`)??null}function d8(e,t=ne,n=`en-US`){let r=r8(e.plan.price*Math.max(1,e.quantity||1)/100,n),i=a8(e.currentPeriodEnd,n),a=e.plan.interval||`month`,o=a===`month`?t(`{price}/month`,{price:r}):a===`year`?t(`{price}/year`,{price:r}):`${r}/${a}`;return i?e.cancelAtPeriodEnd?t(`{price} subscription, ends {date}`,{price:o,date:i}):t(`{price} subscription, renews {date}`,{price:o,date:i}):t(`{price} subscription`,{price:o})}function f8(e=!0,t=null){let[n,r]=(0,V.useState)(null);return(0,V.useEffect)(()=>{if(!e)return;let t=new AbortController;return u8(t.signal).then(e=>{t.signal.aborted||r(e)}).catch(()=>{t.signal.aborted||r(null)}),()=>t.abort()},[e,t]),n}function p8(e){let t=e?.status;return typeof t!=`number`||t===408||t===429||t>=500}function m8(e,t,n){if(`tier`in n)return{tier:n.tier,wrong:null,last:{org:t,tier:n.tier}};let r=e&&e.org===t?e:null;return p8(n.wrong)&&r?{tier:r.tier,wrong:null,last:r}:{tier:null,wrong:n.wrong,last:p8(n.wrong)?e:null}}function h8(e,t){return e&&e.org===t?{tier:e.tier,wrong:e.wrong}:{tier:null,wrong:null}}function g8(e=!0,t=null){let[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(0),o=(0,V.useRef)(null);return(0,V.useEffect)(()=>{if(!e)return;let n=new AbortController;r(e=>e&&e.org===t?{...e,wrong:null}:e);let i=e=>{if(n.signal.aborted)return;let i=m8(o.current,t,e);o.current=i.last,r({org:t,tier:i.tier,wrong:i.wrong})};return c8(n.signal).then(e=>i({tier:e}),e=>i({wrong:e})),()=>n.abort()},[e,i,t]),{...h8(n,t),reload:(0,V.useCallback)(()=>a(e=>e+1),[])}}async function _8(e){let t=await fetch(`${LG()}/v1/ai/limits`,{headers:QG(),signal:e});if(!t.ok)throw Object.assign(Error(`Limits answered ${t.status}`),{status:t.status});return t.json()}var v8=(e=!0,t=null,n)=>D4(e?_8:null,t,n),y8=({limits:e,answered:t})=>t&&!X2(e),b8={thread:null,session:null,channel:null,bucket:null,emptied:0,settings:null,agents:[],aside:null},x8=b8;if(typeof window<`u`)try{let e=new URLSearchParams(window.location.search),t=e.get(`thread`),n=e.get(`session`),r=e.get(`agent`),i=e.get(`aside`);(t||n||r||i)&&(x8={...b8,thread:t??b8.thread,session:n??b8.session,agents:r?r.split(`,`).map(e=>e.trim()).filter(Boolean):b8.agents,aside:i??b8.aside})}catch{}var S8=new Set;function C8(e){if(e.thread!==x8.thread||e.session!==x8.session||e.channel!==x8.channel||e.bucket!==x8.bucket||e.emptied!==x8.emptied||e.settings!==x8.settings||e.agents.join(`
186
- `)!==x8.agents.join(`
187
- `)||e.aside!==x8.aside){x8=e;for(let e of S8)e()}}function w8(e){C8({...x8,settings:e})}var T8={ios:{id:`ios`,name:`Apple iOS`,fontFamily:`-apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", sans-serif`,fontMono:`"SF Mono", ui-monospace, Menlo, monospace`,radiusCard:22,radiusPill:9999,glassBlur:24,glassSaturate:190,specularBorder:!0,touchFeedback:`spring`},android:{id:`android`,name:`Google Android`,fontFamily:`Roboto, "Google Sans", system-ui, sans-serif`,fontMono:`"Roboto Mono", monospace`,radiusCard:16,radiusPill:16,glassBlur:16,glassSaturate:130,specularBorder:!1,touchFeedback:`ripple`},macos:{id:`macos`,name:`Apple macOS`,fontFamily:`-apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif`,fontMono:`"SF Mono", Menlo, monospace`,radiusCard:12,radiusPill:9999,glassBlur:20,glassSaturate:160,specularBorder:!0,touchFeedback:`subtle`},windows:{id:`windows`,name:`Microsoft Windows`,fontFamily:`"Segoe UI Variable", "Segoe UI", system-ui, sans-serif`,fontMono:`"Cascadia Code", Consolas, monospace`,radiusCard:8,radiusPill:9999,glassBlur:18,glassSaturate:125,specularBorder:!1,touchFeedback:`subtle`},linux:{id:`linux`,name:`Linux / Desktop`,fontFamily:`system-ui, -apple-system, "Cantarell", sans-serif`,fontMono:`"Ubuntu Mono", monospace`,radiusCard:10,radiusPill:9999,glassBlur:14,glassSaturate:110,specularBorder:!1,touchFeedback:`subtle`}},E8=`hanzo.mod.platform`;function D8(e){let t=(e??(typeof navigator<`u`?navigator.userAgent:``)).toLowerCase();return/iphone|ipad|ipod/.test(t)||typeof navigator<`u`&&navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1?`ios`:/android/.test(t)?`android`:/macintosh|mac os x/.test(t)?`macos`:/windows|win32|win64/.test(t)?`windows`:/linux|x11/.test(t)?`linux`:`ios`}var O8=[`--platform-font-sans`,`--platform-font-mono`,`--platform-radius-card`,`--platform-radius-pill`,`--glass-blur`,`--glass-saturate`,`--font-sans`,`--font-display`,`--font-mono`,`--pane-round`,`--radius-scale`,`--chrome-blur`,`--pane-blur`];function k8(){if(typeof document>`u`)return;let e=document.documentElement;for(let t of O8)e.style.removeProperty(t)}function A8(e){if(!(typeof window>`u`)){try{e===`auto`?window.localStorage.removeItem(E8):window.localStorage.setItem(E8,e)}catch{}e===`auto`?(k8(),typeof document<`u`&&document.documentElement.setAttribute(`data-platform`,D8())):j8(e),window.dispatchEvent(new CustomEvent(`hanzo:mod:change`,{detail:{platform:e}}))}}function j8(e){if(typeof document>`u`)return;let t=T8[e]??T8.ios,n=document.documentElement,r=typeof t.radiusCard==`number`?`${t.radiusCard}px`:t.radiusCard,i=typeof t.radiusPill==`number`?`${t.radiusPill}px`:t.radiusPill,a=typeof t.radiusCard==`number`?String(Math.round(t.radiusCard/12*100)/100):`1`;n.setAttribute(`data-platform`,t.id),n.style.setProperty(`--platform-font-sans`,t.fontFamily),n.style.setProperty(`--platform-font-mono`,t.fontMono),n.style.setProperty(`--platform-radius-card`,r),n.style.setProperty(`--platform-radius-pill`,i),n.style.setProperty(`--glass-blur`,`${t.glassBlur}px`),n.style.setProperty(`--glass-saturate`,`${t.glassSaturate}%`),n.style.setProperty(`--font-sans`,`var(--font-arabic), ${t.fontFamily}`),n.style.setProperty(`--font-display`,`var(--font-arabic), ${t.fontFamily}`),n.style.setProperty(`--font-mono`,`var(--font-arabic), ${t.fontMono}`),n.style.setProperty(`--pane-round`,r),n.style.setProperty(`--radius-scale`,a),n.style.setProperty(`--chrome-blur`,`${t.glassBlur}px`),n.style.setProperty(`--pane-blur`,`${Math.round(t.glassBlur*1.5)}px`)}var M8=[{id:`ios-liquid`,name:`Apple iOS Liquid`,description:`Continuous squircles, high-specular liquid glass, and Apple SF Pro typography.`,author:`Hanzo Design`,platform:`ios`,theme:`dark`,background:`#000000`,glassBlur:24,radius:22,density:`comfortable`},{id:`android-material`,name:`Android Material 3`,description:`Google Material 3 tonal elevations, Roboto Sans, and smooth dynamic rounded cards.`,author:`Hanzo Design`,platform:`android`,theme:`dark`,background:`#0b0e14`,glassBlur:16,radius:16,density:`default`},{id:`macos-vibrant`,name:`macOS Vibrant`,description:`Translucent sidebars, vibrant visual effect filters, and clean desktop density.`,author:`Hanzo Design`,platform:`macos`,theme:`dark`,background:`#09090b`,glassBlur:20,radius:12,density:`compact`},{id:`windows-fluent`,name:`Windows Mica Fluent`,description:`Microsoft Fluent Design Mica acrylic and Segoe UI Variable geometry.`,author:`Hanzo Design`,platform:`windows`,theme:`dark`,background:`#0a0d12`,glassBlur:18,radius:8,density:`default`},{id:`cyber-zen`,name:`Cyber Zen (OLED)`,description:`High contrast deep OLED black with electric cyan and magenta accents.`,author:`Hanzo Labs`,platform:`ios`,theme:`dark`,background:`#000000`,primary:`#00f0ff`,accent:`#ff007f`,glassBlur:28,radius:20,density:`comfortable`},{id:`nordic-frost`,name:`Nordic Frost`,description:`Pure arctic monochrome glass, high clarity, and minimalist typography.`,author:`Hanzo Design`,platform:`macos`,theme:`dark`,background:`#090d16`,primary:`#e2e8f0`,accent:`#38bdf8`,glassBlur:22,radius:14,density:`default`},{id:`studio-light`,name:`Studio Paper (Light)`,description:`Warm editorial paper ground, crisp ink typography, and subtle daylight glass.`,author:`Hanzo Design`,platform:`macos`,theme:`light`,background:`#faf8f5`,primary:`#18181b`,accent:`#2563eb`,glassBlur:16,radius:12,density:`default`}],N8=`hanzo.mod.active`;function Tre(e){return JSON.stringify(e,null,2)}function Ere(e){let t=JSON.parse(e);if(!t||typeof t!=`object`||!t.name)throw Error(`Invalid Hanzo mod: missing theme name`);return{id:t.id||`mod-${Date.now()}`,name:String(t.name).slice(0,64),description:t.description?String(t.description).slice(0,256):void 0,author:t.author?String(t.author).slice(0,64):void 0,org:t.org,platform:t.platform&&t.platform in T8?t.platform:void 0,theme:t.theme===`light`||t.theme===`dark`||t.theme===`system`?t.theme:void 0,background:t.background,surface:t.surface,foreground:t.foreground,fontHeading:t.fontHeading,fontBody:t.fontBody,fontMono:t.fontMono,customFontUrl:t.customFontUrl,primary:t.primary,accent:t.accent,glassTint:t.glassTint,glassBlur:typeof t.glassBlur==`number`?t.glassBlur:void 0,radius:typeof t.radius==`number`?t.radius:void 0,density:t.density,customCss:t.customCss}}function P8(e){let t=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.exec(e.trim());if(!t)return`#fafafa`;let n=t[1].length===3?t[1].replace(/./g,`$&$&`):t[1].slice(0,6),[r,i,a]=[0,2,4].map(e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.04045?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a>.179?`#09090b`:`#fafafa`}var F8=`--background.--foreground.--text-primary.--card.--surface-card.--card-foreground.--popover.--popover-foreground.--muted.--secondary.--secondary-hover.--secondary-foreground.--pane-floor.--pane-fill.--composer-fill.--composer-ground.--primary.--primary-foreground.--primary-hover.--accent.--accent-foreground.--accent-hover.--ring.--liquid-glass-bg.--glass-blur.--chrome-blur.--pane-blur.--radius.--pane-round.--radius-scale.--density.--font-heading.--font-display.--font-body.--font-sans.--font-mono`.split(`.`);function Dre(e){if(typeof document>`u`)return;let t=document.documentElement;for(let e of F8)t.style.removeProperty(e);e.platform&&j8(e.platform);let n=e.theme??(e.background?P8(e.background)===`#09090b`?`light`:`dark`:void 0);if(n){let e=n===`dark`||n===`system`&&typeof matchMedia==`function`&&matchMedia(`(prefers-color-scheme: dark)`).matches;t.classList.toggle(`light`,!e),t.classList.toggle(`dark`,e),t.classList.toggle(`t_light`,!e),t.classList.toggle(`t_dark`,e),t.style.colorScheme=e?`dark`:`light`,t.setAttribute(`data-scheme`,n)}if(e.background){let n=e.background.trim(),r=e.foreground?.trim()||P8(n),i=r===`#09090b`?`black`:`white`,a=e.surface?.trim()||`color-mix(in oklch, ${n} 95%, ${i})`;t.style.setProperty(`--background`,n),t.style.setProperty(`--foreground`,r),t.style.setProperty(`--text-primary`,r),t.style.setProperty(`--card`,a),t.style.setProperty(`--surface-card`,a),t.style.setProperty(`--card-foreground`,r),t.style.setProperty(`--popover`,`color-mix(in oklch, ${n} 92%, ${i})`),t.style.setProperty(`--popover-foreground`,r),t.style.setProperty(`--muted`,`color-mix(in oklch, ${n} 92%, ${i})`),t.style.setProperty(`--secondary`,`color-mix(in oklch, ${n} 90%, ${i})`),t.style.setProperty(`--secondary-hover`,`color-mix(in oklch, ${n} 84%, ${i})`),t.style.setProperty(`--secondary-foreground`,r),t.style.setProperty(`--pane-floor`,`color-mix(in oklch, ${n} 95%, black)`),t.style.setProperty(`--pane-fill`,`color-mix(in oklch, ${n} 97%, ${i})`),t.style.setProperty(`--composer-fill`,`color-mix(in oklch, ${n} 90%, ${i})`),t.style.setProperty(`--composer-ground`,`color-mix(in oklch, ${n} 90%, ${i})`)}let r=e.accent||e.primary;if(r){let n=P8(r),i=`color-mix(in oklch, ${r} 88%, white)`;t.style.setProperty(`--primary`,e.primary||r),t.style.setProperty(`--primary-foreground`,n),t.style.setProperty(`--primary-hover`,i),t.style.setProperty(`--accent`,r),t.style.setProperty(`--accent-foreground`,n),t.style.setProperty(`--accent-hover`,i),t.style.setProperty(`--ring`,r)}if(e.glassTint&&t.style.setProperty(`--liquid-glass-bg`,e.glassTint),typeof e.glassBlur==`number`&&(t.style.setProperty(`--glass-blur`,`${e.glassBlur}px`),t.style.setProperty(`--chrome-blur`,`${e.glassBlur}px`),t.style.setProperty(`--pane-blur`,`${Math.round(e.glassBlur*1.5)}px`)),typeof e.radius==`number`&&(t.style.setProperty(`--radius`,`${e.radius}px`),t.style.setProperty(`--pane-round`,`${e.radius}px`),t.style.setProperty(`--radius-scale`,String(Math.round(e.radius/12*100)/100))),e.density){let n=e.density===`compact`?`0.85`:e.density===`comfortable`?`1.15`:`1`;t.style.setProperty(`--density`,n)}e.fontHeading&&(t.style.setProperty(`--font-heading`,e.fontHeading),t.style.setProperty(`--font-display`,e.fontHeading)),e.fontBody&&(t.style.setProperty(`--font-body`,e.fontBody),t.style.setProperty(`--font-sans`,e.fontBody)),e.fontMono&&t.style.setProperty(`--font-mono`,e.fontMono);let i=document.getElementById(`hanzo-custom-mod-css`);e.customCss?(i||(i=document.createElement(`style`),i.id=`hanzo-custom-mod-css`,document.head.appendChild(i)),i.textContent=e.customCss):i&&i.remove();try{window.localStorage.setItem(N8,JSON.stringify(e)),window.dispatchEvent(new CustomEvent(`hanzo:mod:applied`,{detail:{mod:e}}))}catch{}}function Ore(){if(!(typeof window>`u`))try{window.localStorage.removeItem(N8);let e=document.getElementById(`hanzo-custom-mod-css`);if(e&&e.remove(),typeof document<`u`){let e=document.documentElement;for(let t of F8)e.style.removeProperty(t);k8()}window.dispatchEvent(new CustomEvent(`hanzo:mod:cleared`))}catch{}}var kre=`hanzo-font-`;function Are(e){if(typeof document>`u`)return;let t=`${kre}${e.family.toLowerCase().replace(/[^a-z0-9]/g,`-`)}`,n=document.getElementById(t);if(n&&n.remove(),e.isStylesheet||e.url.endsWith(`.css`)||e.url.includes(`fonts.googleapis.com`)){let n=document.createElement(`link`);n.id=t,n.rel=`stylesheet`,n.href=e.url,document.head.appendChild(n)}else{let n=e.format||(e.url.endsWith(`.woff2`)?`woff2`:e.url.endsWith(`.woff`)?`woff`:`truetype`),r=e.weights||[400,500,600,700],i=``;for(let t of r)i+=`
188
- @font-face {
189
- font-family: "${e.family}";
190
- src: url("${e.url}") format("${n}");
191
- font-weight: ${t};
192
- font-style: normal;
193
- font-display: swap;
194
- }
195
- `;let a=document.createElement(`style`);a.id=t,a.textContent=i,document.head.appendChild(a)}}function I8(e,t){if(typeof document>`u`)return;let n=e===`heading`?`--font-heading`:e===`mono`?`--font-mono`:`--font-sans`;document.documentElement.style.setProperty(n,t)}(0,V.createContext)({router:{push:e=>window.location.assign(e),replace:e=>window.location.replace(e),back:()=>window.history.back(),forward:()=>window.history.forward()},path:null,route:`/`,Link:({prefetch:e,...t})=>(0,H.jsx)(`a`,{...t})});function L8(){let{currentOrg:e}=LW(),t=e;return{id:t?.id||t?.name,name:t?.displayName||t?.name}}var jre={theme:`system`};function Mre(){let{accessToken:e}=IW();return Gz({org:L8().id,account:e?{base:LG(),token:e}:void 0,install:jre})}var R8={rounded:8,borderWidth:1,borderStyle:`solid`,cursor:`pointer`},Nre=[{id:`auto`,label:D(`Auto (System OS)`),note:D(`Automatically detects your device operating system`)},{id:`ios`,label:D(`Apple iOS (Liquid Glass)`),note:D(`Continuous squircles, specular liquid glass, SF Pro typography`)},{id:`android`,label:D(`Android (Material 3)`),note:D(`Material 3 tonal elevations and Google Sans geometry`)},{id:`macos`,label:D(`Apple macOS (Vibrant)`),note:D(`Translucent glass sidebars and compact desktop density`)},{id:`windows`,label:D(`Windows (Mica Fluent)`),note:D(`Fluent Design acrylic Mica and Segoe UI Variable`)},{id:`linux`,label:D(`Linux (Clean System)`),note:D(`Crisp system geometry and flat modern edges`)}];function Pre(){let{t:e}=R(),{accessToken:t}=IW(),n=L8(),r=Mre(),[i,a]=dJ(),[o,s]=(0,V.useState)(()=>typeof window>`u`?`auto`:window.localStorage.getItem(`hanzo.mod.platform`)??`auto`),[c,l]=(0,V.useState)(()=>{if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(`hanzo.mod.active`);return e?JSON.parse(e)?.id??null:null}catch{return null}}),[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(!1),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1);(0,V.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>l(null),t=e=>{let t=e.detail;t?.mod?.id&&l(t.mod.id)};return window.addEventListener(`hanzo:mod:cleared`,e),window.addEventListener(`hanzo:mod:applied`,t),()=>{window.removeEventListener(`hanzo:mod:cleared`,e),window.removeEventListener(`hanzo:mod:applied`,t)}},[]);let v=e=>{s(e),A8(e),e===`auto`&&Lz(r.pref)},b=e=>{if(c===e.id){Ore(),l(null),Lz(r.pref);return}l(e.id),e.platform&&s(e.platform),r.set({...e.theme?{theme:e.theme}:{},background:e.background,accent:e.accent??e.primary,...e.density?{density:e.density}:{}}),Dre(e)},x=()=>{if(!u.trim())return;let e=u.trim(),t=e.startsWith(`http://`)||e.startsWith(`https://`)?`CustomBrandFont`:e;t===`CustomBrandFont`&&Are({family:t,url:e,isStylesheet:!0}),I8(`heading`,`var(--font-arabic), ${t}, sans-serif`),I8(`sans`,`var(--font-arabic), ${t}, sans-serif`),p(!0),setTimeout(()=>p(!1),2500)},S=e=>{let t=Tre(e);navigator.clipboard?.writeText(t),_(!0),setTimeout(()=>_(!1),2e3)};return(0,H.jsxs)(z,{gap:`$5`,maxW:540,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Customized per organization and kept with your account across all Hanzo surfaces.`)}),(0,H.jsx)(bne,{org:n.id,orgName:n.name||WW(),account:{base:LG(),token:t??void 0}}),(0,H.jsxs)(z,{gap:`$2.5`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(LK,{size:16,color:`var(--primary)`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Native Platform Look & Feel`)})]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Adaptive styling tailored to your OS: iOS Liquid Glass, Material 3, macOS Vibrant, or Windows Mica.`)}),(0,H.jsx)(z,{gap:`$1.5`,pt:`$1`,children:Nre.map(t=>{let n=o===t.id;return(0,H.jsx)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>v(t.id),...R8,p:`$2.5`,bg:n?`var(--edge, var(--white-14))`:`transparent`,borderColor:n?`var(--borderColor, var(--white-22))`:`var(--white-08)`,children:(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:n?`600`:`500`,color:`$ink`,children:e(t.label)}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:e(t.note)})]}),n?(0,H.jsx)(xK,{size:16,color:`var(--primary)`,"aria-hidden":!0}):null]})},t.id)})})]}),(0,H.jsxs)(z,{gap:`$3`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(jK,{size:16,color:`var(--primary)`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Organization Theme Mods (@hanzo/mod)`)})]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Select or fork designer themes for custom organization branding.`)}),(0,H.jsx)(y,{gap:`$2`,flexWrap:`wrap`,children:M8.map(e=>{let t=c===e.id;return(0,H.jsx)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>b(e),...R8,py:6,px:12,bg:t?`var(--edge, var(--white-14))`:`transparent`,borderColor:t?`var(--borderColor, var(--white-22))`:`var(--white-10)`,hoverStyle:{bg:`$hover`},children:(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`400`,color:`$ink`,children:e.name}),t?(0,H.jsx)(xK,{size:12,color:`var(--primary)`,"aria-hidden":!0}):null]})},e.id)})}),(0,H.jsxs)(z,{gap:`$2`,p:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(VK,{size:15,color:`var(--primary)`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Custom Typography`)})]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Enter a font family name (e.g. "Zen", "Inter", "Cabinet Grotesk") or a webfont stylesheet URL.`)}),(0,H.jsxs)(y,{gap:`$2`,items:`center`,children:[(0,H.jsx)(C_,{flex:1,size:`sm`,value:u,onChange:e=>d(e.target.value),placeholder:`e.g. Cabinet Grotesk or https://fonts.googleapis.com/...`}),(0,H.jsx)(W,{size:`sm`,onClick:x,children:e(f?`Applied!`:`Apply Font`)})]})]}),(0,H.jsxs)(z,{gap:`$2`,p:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Fork & Share Theme Mods`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Export current mod configuration or paste a mod JSON to import.`)}),(0,H.jsxs)(y,{gap:`$2`,items:`center`,children:[(0,H.jsx)(C_,{flex:1,size:`sm`,value:m,onChange:e=>h(e.target.value),placeholder:e(`Paste mod JSON here to import`)}),(0,H.jsxs)(W,{size:`sm`,variant:`outline`,onClick:()=>{if(m.trim())try{let t=Ere(m.trim());b(t),alert(e(`Mod "{name}" successfully applied!`,{name:t.name})),h(``)}catch(t){alert(e(`Failed to import mod: {message}`,{message:t.message}))}},children:[(0,H.jsx)(UK,{size:13,"aria-hidden":!0}),e(`Import`)]}),(0,H.jsxs)(W,{size:`sm`,variant:`outline`,onClick:()=>S(M8[0]),children:[(0,H.jsx)(TK,{size:13,"aria-hidden":!0}),e(g?`Copied!`:`Export JSON`)]})]})]})]}),(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Language`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`The language Hanzo is shown in, on every Hanzo surface you sign in to.`)}),(0,H.jsx)(y,{pt:`$1`,children:(0,H.jsx)(ge,{})})]}),(0,H.jsxs)(z,{gap:`$2`,"data-slot":`settings-approval-mode`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Tool & Action Approval`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Control whether tools, connectors, and actions execute automatically or require manual approval first.`)}),(0,H.jsx)(y,{gap:`$2`,pt:`$1`,children:[{id:`auto`,label:e(`Auto`),note:e(`Runs tools on its own; pauses only for anything risky.`)},{id:`manual`,label:e(`Manual`),note:e(`Asks before each tool, connector or site it opens.`)}].map(e=>{let t=(i.approvalMode||`auto`)===e.id;return(0,H.jsxs)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>a({approvalMode:e.id}),...R8,flex:1,p:`$2.5`,bg:t?`var(--edge, var(--white-14))`:`transparent`,borderColor:t?`var(--borderColor, var(--white-22))`:`var(--white-08)`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:t?`600`:`500`,color:`$ink`,children:e.label}),t?(0,H.jsx)(xK,{size:16,color:`var(--primary)`,"aria-hidden":!0}):null]}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:e.note})]},e.id)})})]}),(0,H.jsxs)(z,{gap:`$2`,"data-slot":`settings-reasoning-effort`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Default Reasoning Effort`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Sets how deeply models think before answering. Defaults to Auto, where the router decides.`)}),(0,H.jsx)(y,{gap:`$2`,pt:`$1`,flexWrap:`wrap`,children:QK.map(e=>{let t=(i.effort||`auto`)===e.id;return(0,H.jsx)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>a({effort:e.id}),...R8,py:6,px:12,bg:t?`var(--edge, var(--white-14))`:`transparent`,borderColor:t?`var(--borderColor, var(--white-22))`:`var(--white-08)`,children:(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`400`,color:t?`$ink`:`$soft`,children:e.label}),t?(0,H.jsx)(xK,{size:12,color:`var(--primary)`,"aria-hidden":!0}):null]})},e.id)})})]})]})}function z8(e,t){let n=QG(),r=!!n.Authorization,i=V8(n),[a,o]=(0,V.useState)(()=>W8(e,t)),[s,c]=(0,V.useState)(!r);return(0,V.useEffect)(()=>{if(!r)return;let i=!0;return Fre().then(r=>{if(!i)return;let a=`${n.Authorization}:${e}`;if(B8.has(a)){let t=B8.get(a);o(t),G8(e,t)}else if(r){if(e in r){let t=r[e];o(t),G8(e,t)}else{let n=W8(e,t);n===t?(o(t),G8(e,t)):(o(n),U8({[e]:n}))}}c(!0)}),()=>{i=!1}},[e,r,i]),[a,t=>{o(t),G8(e,t),U8({[e]:t})},s]}var B8=new Map;function V8(e){return e.Authorization?`${e.Authorization}:${e[`X-Org-Id`]??``}`:``}var H8=null;function Fre(){let e=QG();if(!e.Authorization)return Promise.resolve(null);let t=V8(e);return H8?.auth!==t&&(H8={auth:t,doc:fetch(`${LG()}/v1/pref`,{headers:e}).then(e=>e.ok?e.json():null).then(e=>e&&e.prefs&&typeof e.prefs==`object`?e.prefs:e?{}:null).catch(()=>null)}),H8.doc}function U8(e){let t=QG();if(!t.Authorization)return;for(let[n,r]of Object.entries(e))B8.set(`${t.Authorization}:${n}`,r);let n=V8(t);H8?.auth===n&&(H8={auth:n,doc:H8.doc.then(t=>({...t??{},...e}))}),fetch(`${LG()}/v1/pref`,{method:`PATCH`,keepalive:!0,headers:{...t,"Content-Type":`application/json`},body:JSON.stringify(e)}).catch(()=>{})}function W8(e,t){try{let n=localStorage.getItem(e);return n===null?t:JSON.parse(n)}catch{return t}}function G8(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}function Ire(){let{t:e}=R(),{isAuthenticated:t}=IW(),[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(!1),[o,s]=(0,V.useState)(null);if((0,V.useEffect)(()=>{if(!t)return;let e=!0;return fG().then(t=>e&&r(t)).catch(t=>e&&s(t instanceof Error?t.message:String(t))),()=>{e=!1}},[t]),!t)return null;let c=n?.blocked===!0,l=e(`Automatically opt-in for future experimental features`);return(0,H.jsxs)(z,{p:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,gap:`$3`,"data-slot":`optin`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:`$3`,children:[(0,H.jsxs)(z,{flex:1,pr:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:l}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Automatically opt into new experimental features, unless disabled by your team or organization`)})]}),(0,H.jsx)(X_,{"aria-label":l,checked:n?.on===!0&&!c,disabled:!n||i||c,onCheckedChange:e=>{a(!0),s(null),pG(e).then(r).catch(e=>s(e instanceof Error?e.message:String(e))).finally(()=>a(!1))}})]}),c?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,"data-slot":`optin-blocked`,children:e(`Turned off by your team or organization.`)}):null,o?(0,H.jsx)(U,{fontSize:`$2`,color:`$red10`,children:e(o)}):null]})}var K8={rounded:8,borderWidth:1,borderStyle:`solid`,cursor:`pointer`};function Lre({id:e}){let{t}=R(),n=iq.find(t=>t.id===e);return(0,H.jsx)(z,{flex:1,minH:0,overflowY:`auto`,overflowX:`hidden`,children:(0,H.jsxs)(z,{p:`$5`,gap:`$4`,maxW:860,children:[(0,H.jsx)(U,{fontSize:`$6`,fontWeight:`600`,color:`$ink`,children:n?nq(n,t):t(`Settings`)}),(0,H.jsx)(Rre,{id:e,note:n?.note?t(n.note):void 0})]})})}function Rre({id:e,note:t}){let{t:n}=R();return e===`apps`||e===`channels`?(0,H.jsx)(J6,{tab:e}):e===`general`?(0,H.jsxs)(z,{gap:`$5`,children:[(0,H.jsx)(Pre,{}),(0,H.jsx)(Ire,{})]}):e===`account`?(0,H.jsx)(Vre,{}):e===`billing`?(0,H.jsx)(Ure,{}):e===`referrals`?(0,H.jsx)(Hre,{}):e===`usage`?(0,H.jsx)(Wre,{}):e===`model`?(0,H.jsx)(zre,{}):e===`models`?(0,H.jsx)(Bre,{}):e===`agent`?(0,H.jsx)(Kre,{}):e===`capabilities`?(0,H.jsx)(qre,{}):e===`memory`?(0,H.jsx)(Jre,{}):(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:t??n(`Nothing to configure here yet.`)})}function zre(){let{t:e}=R(),{models:t}=yX(),n=(0,V.useMemo)(()=>Mn(t).filter(e=>e.class!==`premium`),[t]),[r,i]=$q(),[a,o]=dJ(),{isAuthenticated:s}=IW(),{tier:c}=g8(s,ZG()),l=!!(c?.plan&&c.plan!==`free`);return(0,H.jsxs)(z,{gap:`$5`,maxW:540,children:[(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Default model`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Used for new chats and runs. An agent with its own model keeps that choice.`)}),(0,H.jsx)(y,{self:`flex-start`,pt:`$1`,children:(0,H.jsx)(ZK,{models:n,scope:`chat`,value:r.model,onChange:e=>i({model:e}),size:`sm`})})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Default reasoning effort`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Sets how deeply models think before answering. Defaults to Auto, where the router decides.`)}),(0,H.jsx)(y,{gap:`$2`,pt:`$1`,flexWrap:`wrap`,children:QK.map(e=>{let t=(a.effort||`auto`)===e.id;return(0,H.jsx)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>{o({effort:e.id});let t=oJ(e.id);t&&i({effort:t})},...K8,bg:t?`var(--edge, var(--white-14))`:`transparent`,borderColor:t?`var(--borderColor, var(--white-22))`:`var(--white-08)`,py:6,px:12,children:(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`400`,color:t?`$ink`:`$soft`,children:e.label}),t?(0,H.jsx)(xK,{size:12,color:`var(--primary)`,"aria-hidden":!0}):null]})},e.id)})})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$2`,"data-slot":`settings-approval-mode`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Tool & action approval`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Choose whether agents run tools and connectors automatically or ask for manual approval before each action.`)}),(0,H.jsx)(y,{gap:`$2`,pt:`$1`,children:[{id:`auto`,label:e(`Auto`),desc:e(`Runs tools on its own; pauses only for anything risky.`)},{id:`manual`,label:e(`Manual`),desc:e(`Asks before each tool, connector or site it opens.`)}].map(e=>{let t=(a.approvalMode||`auto`)===e.id;return(0,H.jsxs)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>o({approvalMode:e.id}),...K8,flex:1,p:10,bg:t?`var(--edge, var(--white-14))`:`transparent`,borderColor:t?`var(--borderColor, var(--white-22))`:`var(--white-08)`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:e.label}),t?(0,H.jsx)(xK,{size:12,color:`var(--primary)`,"aria-hidden":!0}):null]}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:e.desc})]},e.id)})})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$3`,children:[(0,H.jsx)(y,{items:`center`,justify:`space-between`,children:(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Advanced composer controls`)}),l?null:(0,H.jsxs)(y,{items:`center`,gap:`$1`,px:`$2`,py:`$0.5`,rounded:9999,bg:`var(--edge, var(--white-10))`,children:[(0,H.jsx)(kK,{size:11,color:`$soft`,"aria-hidden":!0}),(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`600`,color:`$soft`,children:e(`Paid plan`)})]})]}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Third-party model access, and the language dictation listens in.`)})]})}),(0,H.jsx)(z,{p:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,gap:`$2`,children:(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsxs)(z,{flex:1,pr:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Enable third-party models`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Third-party models (OpenAI, Anthropic, Google, DeepSeek) are paid from your pre-paid balance on any plan. First-party models (Enso, Zen, Kai) are covered by your plan.`)})]}),(0,H.jsx)(W,{size:`sm`,variant:a.allowThirdPartyModels?`default`:`outline`,onClick:()=>o({allowThirdPartyModels:!a.allowThirdPartyModels,thirdPartyChosen:!0}),children:a.allowThirdPartyModels?e(`Enabled`):e(`Disabled`)})]})}),(0,H.jsx)(z,{p:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,gap:`$2`,children:(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsxs)(z,{flex:1,pr:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Show language selector beside +`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Display the dictation language indicator next to the + context button on the composer row.`)})]}),(0,H.jsx)(W,{size:`sm`,variant:a.showLanguage?`default`:`outline`,onClick:()=>o({showLanguage:!a.showLanguage}),children:a.showLanguage?e(`Enabled`):e(`Disabled`)})]})}),l?null:(0,H.jsx)(y,{pt:`$1`,children:(0,H.jsxs)(W,{size:`sm`,variant:`outline`,onClick:()=>window.location.assign(GW(`/pricing`)),children:[(0,H.jsx)(zK,{size:14,color:`var(--primary)`,"aria-hidden":!0}),e(`Upgrade to unlock advanced model controls`)]})})]})]})}function Bre(){let{t:e}=R(),{models:t,loading:n,error:r}=yX();return n?(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Reading the catalog.`)}):r?(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`The catalog did not answer: {message}`,{message:r.message})}):t.length===0?(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`No model answers on this account. Sign in to reach the ones your org opens.`)}):(0,H.jsxs)(z,{gap:`$3`,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`{count} models answer at {path} on this account.`,{count:t.length,path:`/v1/models`})}),(0,H.jsx)(z,{children:t.map(e=>(0,H.jsxs)(y,{items:`center`,gap:`$2.5`,py:`$2`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(u6,{model:e.id,org:e.owned_by,size:16,ink:!0}),(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,flex:1,children:(0,H.jsx)(`bdi`,{dir:`ltr`,children:e.id})}),e.owned_by?(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:(0,H.jsx)(`bdi`,{dir:`ltr`,children:e.owned_by})}):null]},e.id))}),(0,H.jsx)(y,{children:(0,H.jsx)(DS,{render:(0,H.jsx)(`a`,{href:GW(`/models`)}),...fJ,children:(0,H.jsxs)(y,{items:`center`,gap:`$2`,py:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$ink`,children:e(`Browse the model catalog`)}),(0,H.jsx)(yK,{size:13,"aria-hidden":!0})]})})})]})}function Vre(){let{t:e}=R(),t=zW(),{isAuthenticated:n}=IW(),r=XJ(),{organizations:i,currentOrgId:a,currentRole:o,switchOrg:s}=LW();return!n||!t?(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Sign in to see your account.`)}):(0,H.jsxs)(z,{gap:`$4`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$3`,children:[(0,H.jsx)(z,{width:44,height:44,rounded:22,bg:`$borderColor`,items:`center`,justify:`center`,children:(0,H.jsx)(U,{fontSize:`$3`,color:`$ink`,children:t.initials})}),(0,H.jsxs)(z,{gap:`$1`,flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$4`,color:`$ink`,children:t.name}),t.email?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:(0,H.jsx)(`bdi`,{dir:`ltr`,children:t.email})}):null]})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Organizations`)}),i.length===0?(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`You are not a member of an organization.`)}):i.map(e=>{let t=e.name===a;return(0,H.jsx)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),onClick:()=>{eK(e.name),s(e.name)},...fJ,children:(0,H.jsxs)(y,{items:`center`,justify:`space-between`,py:`$2`,width:`100%`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,color:t?`$ink`:`$soft`,children:e.displayName||e.name}),t&&o?(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:o}):null]})},e.name)})]}),(0,H.jsx)(Ic,{}),(0,H.jsx)(q8,{}),(0,H.jsx)(Ic,{}),(0,H.jsx)(y,{children:(0,H.jsx)(W,{size:`sm`,onClick:()=>r(),children:e(`Sign out`)})})]})}function q8(){let{t:e}=R(),[t,n]=z8(`rewards_payout_wallet`,``),[,r]=z8(`rewards_payout_provider`,``),[i,a]=(0,V.useState)(!1),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(``),u=async(e,t)=>{let i=e.trim();n(i),r(i?t:``),s(!0),setTimeout(()=>s(!1),2400)},d=async()=>{l(``),a(!0);try{let t=typeof window<`u`?window.ethereum:void 0;if(!t?.request){l(e(`No EVM browser wallet detected. Install MetaMask, Coinbase Wallet, or Brave Wallet, or paste your payout address below.`));return}let n=(await t.request({method:`eth_requestAccounts`}))?.[0];n&&await u(n,`evm`)}catch(t){l(t instanceof Error?t.message:e(`Wallet connection cancelled.`))}finally{a(!1)}},f=async()=>{l(``),a(!0);try{let t=typeof window<`u`?window.solana:void 0;if(!t?.connect){l(e(`No Solana wallet detected. Install Phantom or Backpack, or paste your payout address below.`));return}let n=(await t.connect())?.publicKey?.toString();n&&await u(n,`solana`)}catch(t){l(t instanceof Error?t.message:e(`Wallet connection cancelled.`))}finally{a(!1)}};return(0,H.jsxs)(z,{gap:`$2.5`,"data-slot":`wallet-payouts`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Web3 Wallet & Rewards Payouts`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Connect your Web3 wallet (MetaMask, EVM / Base, or Solana) or enter a payout address to collect referral rewards, affiliate commissions, and AI compute rebates.`)}),(0,H.jsxs)(y,{gap:`$2`,flexWrap:`wrap`,children:[(0,H.jsx)(W,{size:`sm`,variant:`outline`,disabled:i,onClick:()=>void d(),children:e(`Connect EVM / MetaMask`)}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,disabled:i,onClick:()=>void f(),children:e(`Connect Solana Wallet`)})]}),(0,H.jsxs)(y,{gap:`$2`,items:`center`,children:[(0,H.jsx)(C_,{flex:1,size:`sm`,placeholder:e(`0x... (EVM / Base) or Solana payout address`),value:t,onChange:e=>n(e.target.value)}),(0,H.jsx)(W,{size:`sm`,onClick:()=>void u(t,`manual`),children:e(o?`Saved!`:`Save Payout Wallet`)})]}),c?(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:c}):null]})}function Hre(){let{t:e}=R(),t=zW(),{isAuthenticated:n}=IW(),[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(!1);if(!n||!t)return(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Sign in to view your referral program.`)});let l=t.name?t.name.toLowerCase().replace(/\s+/g,`-`):t.email?t.email.split(`@`)[0]:`user`,u=`https://hanzo.ai/?ref=${encodeURIComponent(l)}`;return(0,H.jsxs)(z,{gap:`$5`,maxW:640,children:[(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsx)(y,{items:`center`,gap:`$2`,children:(0,H.jsx)(U,{fontSize:`$4`,fontWeight:`600`,color:`$ink`,children:e(`Give $20, Get 20%`)})}),(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Invite developers, creators, and colleagues to Hanzo. They get $20 in free cloud compute credits, and you earn 20% recurring revenue share on their compute spend for 12 months.`)})]}),(0,H.jsxs)(z,{gap:`$2`,p:`$3`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:e(`Your Personal Referral Link`)}),(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(DS,{flex:1,p:`$2`,rounded:`$2`,bg:`$hover`,borderWidth:1,borderColor:`$borderColor`,children:(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,fontFamily:`$mono`,numberOfLines:1,children:u})}),(0,H.jsx)(W,{size:`sm`,onClick:()=>{navigator.clipboard.writeText(u),i(!0),setTimeout(()=>i(!1),2e3)},children:e(r?`Copied!`:`Copy Link`)})]}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,pt:`$2`,flexWrap:`wrap`,gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:e(`1-Click Social Share:`)}),(0,H.jsxs)(y,{gap:`$2`,flexWrap:`wrap`,children:[(0,H.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>{window.open(`https://twitter.com/intent/tweet?text=Deploy%20AI%20agents%2C%20sites%2C%20and%20apps%20on%20%40HanzoAI.%20Get%20%2420%20in%20free%20cloud%20compute%20credits%3A&url=${encodeURIComponent(u)}`,`_blank`,`noopener,noreferrer`)},children:`𝕏 (Twitter)`}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>{window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(u)}`,`_blank`,`noopener,noreferrer`)},children:`LinkedIn`}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>{window.open(`https://t.me/share/url?url=${encodeURIComponent(u)}&text=Get%20%2420%20free%20Hanzo%20cloud%20compute%20credits%3A`,`_blank`,`noopener,noreferrer`)},children:`Telegram`}),(0,H.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>{window.open(`https://api.whatsapp.com/send?text=${encodeURIComponent(`Deploy with Hanzo — get $20 in free cloud credits: `+u)}`,`_blank`,`noopener,noreferrer`)},children:`WhatsApp`})]})]})]}),(0,H.jsx)(Ic,{}),(0,H.jsx)(q8,{}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Referral Rules & Offer Details`)}),(0,H.jsxs)(z,{gap:`$1`,children:[(0,H.jsxs)(U,{fontSize:`$2`,color:`$soft`,children:[`• `,e(`30-day attribution window: First click binds to user identity upon registration.`)]}),(0,H.jsxs)(U,{fontSize:`$2`,color:`$soft`,children:[`• `,e(`20% recurring margin share: Calculated against net platform margin (safe from wholesale token dilution).`)]}),(0,H.jsxs)(U,{fontSize:`$2`,color:`$soft`,children:[`• `,e(`Payout options: Platform credits, direct wire/ACH, or on-chain EVM wallet settlement.`)]})]})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$3`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Official Affiliate & Creator Program`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Building an open-source project, template, or dev community? Apply for official affiliate status for custom vanity links (hanzo.ai/?aff=code) and elevated commission tiers.`)}),s?(0,H.jsx)(DS,{p:`$3`,rounded:`$2`,bg:`$hover`,children:(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,children:e(`Application submitted for review. Manage payouts and advanced settings in platform.hanzo.ai/dashboard/settings/referrals`)})}):(0,H.jsxs)(y,{gap:`$2`,children:[(0,H.jsx)(C_,{flex:1,size:`sm`,placeholder:e(`Desired vanity code (e.g. your project)`),value:a,onChange:e=>o(e.target.value)}),(0,H.jsx)(W,{size:`sm`,onClick:()=>{a.trim()&&c(!0)},children:e(`Apply for Partner`)})]}),(0,H.jsx)(y,{pt:`$1`,children:(0,H.jsx)(DS,{render:(0,H.jsx)(`a`,{href:`https://platform.hanzo.ai/dashboard/settings/referrals`,target:`_blank`,rel:`noreferrer`}),...fJ,children:(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$ink`,children:e(`Open Full Referrals & Affiliate Portal`)}),(0,H.jsx)(yK,{size:13,"aria-hidden":!0})]})})})]})]})}function J8(){let e=ZG();return(0,V.useMemo)(()=>({api:LG(),token:HG,org:e}),[e])}function Ure(){let{t:e,locale:t}=R(),{isAuthenticated:n}=IW(),r=J8(),{tier:i}=g8(n,ZG()),a=f8(n,ZG());if(!n)return(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Sign in to see billing.`)});let o=i?z4(i.plan,i.tier.name)??{name:`Free`,tag:``}:null;return(0,H.jsxs)(z,{gap:`$5`,children:[o?(0,H.jsxs)(z,{gap:`$1`,"data-slot":`billing-plan`,children:[(0,H.jsx)(d3,{label:o,size:`$5`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:a?d8(a,e,t):i?.plan?e(`Your plan.`):e(`No paid plan. Usage is paid from credits.`)})]}):(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Reading your plan…`)}),(0,H.jsx)(b3,{target:r,admin:m3(HG(),ZG()),add:e8()}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$2`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Payment`)}),(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`A card is entered on the payment host and nowhere else, so this is the one control here that opens another surface.`)}),(0,H.jsx)(y,{children:(0,H.jsx)(DS,{render:(0,H.jsx)(`a`,{href:e8(),target:`_blank`,rel:`noreferrer`}),...fJ,children:(0,H.jsxs)(y,{items:`center`,gap:`$2`,py:`$2`,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$ink`,children:e(`Manage plan, payment method and invoices`)}),(0,H.jsx)(DK,{size:13,"aria-hidden":!0})]})})})]})]})}function Wre(){let{t:e}=R(),{accessToken:t,isAuthenticated:n}=IW(),r=J8(),i=v8(n,ZG());if(!n||!t)return(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Sign in to see your usage.`)});let a=(0,H.jsx)(E3,{target:r,onPlans:()=>window.location.assign(GW(`/pricing`)),onBilling:()=>w8(`billing`)});return y8(i)?(0,H.jsxs)(z,{gap:`$6`,children:[a,(0,H.jsx)(jZ,{baseUrl:LG(),token:t,upgrade:e8(),title:e(`Spend`)})]}):a}var Gre=[{id:`architect`,name:D(`Software Architect`),role:`Full-stack & systems design`,words:!0},{id:`satoshi`,name:`Satoshi Nakamoto`,role:`Distributed cryptography & consensus`},{id:`turing`,name:`Alan Turing`,role:`Algorithmic logic & formal verification`},{id:`ada`,name:`Ada Lovelace`,role:`Computational precision & analysis`},{id:`davinci`,name:`Leonardo da Vinci`,role:`Polymathic engineering & design`}];function Kre(){let{t:e}=R(),[t,n]=(0,V.useState)(()=>typeof window>`u`?``:localStorage.getItem(`hanzo.agent.instructions`)||`You are an autonomous AI software engineer at Hanzo. Think step-by-step and write robust code.`),[r,i]=(0,V.useState)(()=>typeof window>`u`?`architect`:localStorage.getItem(`hanzo.agent.persona`)||`architect`),[a,o]=(0,V.useState)(()=>typeof window>`u`?`autonomous`:localStorage.getItem(`hanzo.agent.autonomy`)||`autonomous`),[s,c]=(0,V.useState)(!1),[,l]=dJ(),u=()=>{localStorage.setItem(`hanzo.agent.instructions`,t),localStorage.setItem(`hanzo.agent.persona`,r),localStorage.setItem(`hanzo.agent.autonomy`,a),l({approvalMode:a===`supervised`?`manual`:`auto`}),c(!0),setTimeout(()=>c(!1),2e3)};return(0,H.jsxs)(z,{gap:`$4`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Nothing is bound to this surface yet — when you bind a personal agent, its persona, tools and memory live here rather than in a shared team.`)}),(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Persona & Historical Character`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Pick an intellectual archetype for agent reasoning and tone.`)}),(0,H.jsx)(y,{flexWrap:`wrap`,gap:`$2`,pt:`$1`,children:Gre.map(t=>{let n=r===t.id;return(0,H.jsx)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>i(t.id),...K8,bg:n?`var(--edge, var(--white-14))`:`transparent`,borderColor:n?`var(--borderColor, var(--white-22))`:`var(--white-08)`,py:6,px:12,children:(0,H.jsx)(U,{fontSize:`$2`,fontWeight:n?`600`:`400`,color:n?`$ink`:`$soft`,children:t.words?e(t.name):t.name})},t.id)})})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`System Prompt Instructions`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Custom system directions prepended to all coding and research runs.`)}),(0,H.jsx)(U,{render:(0,H.jsx)(`textarea`,{value:t,onChange:e=>n(e.target.value),rows:4}),width:`100%`,bg:`var(--panel, color-mix(in srgb, var(--pure-black) 30%, transparent))`,color:`inherit`,borderWidth:1,borderColor:`var(--borderColor, var(--white-15))`,rounded:8,p:10,fontSize:`$2`,fontFamily:`$mono`})]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(z,{gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Autonomy & Permissions`)}),(0,H.jsxs)(y,{gap:`$2`,children:[(0,H.jsxs)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>o(`autonomous`),...K8,flex:1,p:10,bg:a===`autonomous`?`var(--edge, var(--white-14))`:`transparent`,borderColor:a===`autonomous`?`var(--borderColor, var(--white-22))`:`var(--white-08)`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:e(`Autonomous`)}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:e(`Executes tools & writes code without interrupting.`)})]}),(0,H.jsxs)(DS,{render:(0,H.jsx)(`button`,{type:`button`}),...fJ,onClick:()=>o(`supervised`),...K8,flex:1,p:10,bg:a===`supervised`?`var(--edge, var(--white-14))`:`transparent`,borderColor:a===`supervised`?`var(--borderColor, var(--white-22))`:`var(--white-08)`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$ink`,children:e(`Supervised`)}),(0,H.jsx)(U,{fontSize:`$1`,color:`$soft`,children:e(`Requests confirmation before file writes and commands.`)})]})]})]}),(0,H.jsx)(y,{self:`flex-start`,pt:`$2`,children:(0,H.jsx)(W,{size:`sm`,onClick:u,children:e(s?`Saved`:`Save agent preferences`)})})]})}function qre(){let{t:e}=R();return(0,H.jsxs)(z,{gap:`$3`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`What models and agent swarms are granted access to during tasks.`)}),(0,H.jsx)(z,{gap:`$2`,pt:`$1`,children:[{id:`files`,title:e(`Filesystem (Read / Write)`),desc:e(`Create, modify, and delete workspace files in the target repository.`)},{id:`shell`,title:e(`Shell & Terminal Exec`),desc:e(`Execute build, test, and shell commands in isolated sandbox VMs.`)},{id:`web`,title:e(`Live Web & Search`),desc:e(`Query internet search APIs and fetch web documentation.`)},{id:`mcp`,title:e(`MCP Protocol Server`),desc:e(`Expose local and remote tools via Model Context Protocol at /mcp.`)}].map(e=>(0,H.jsxs)(z,{gap:`$0.5`,p:`$2.5`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e.title}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e.desc})]},e.id))})]})}function Jre(){let{t:e}=R(),[t,n]=(0,V.useState)(!1);return(0,H.jsxs)(z,{gap:`$3`,maxW:480,children:[(0,H.jsx)(U,{fontSize:`$3`,color:`$soft`,children:e(`Semantic memory and conversation recall across sessions.`)}),(0,H.jsxs)(z,{gap:`$0.5`,p:`$2.5`,rounded:`$3`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:e(`Semantic Vector Index`)}),(0,H.jsx)(U,{fontSize:`$2`,color:`$soft`,children:e(`Automatically indexes past workspace sessions into vector memory.`)})]}),(0,H.jsx)(y,{self:`flex-start`,pt:`$2`,children:(0,H.jsx)(W,{size:`sm`,variant:`outline`,onClick:()=>{localStorage.removeItem(`hanzo.chat.history`),n(!0),setTimeout(()=>n(!1),2e3)},children:e(t?`Memory cleared`:`Clear local memory cache`)})})]})}function Y8({open:e,onOpenChange:t,initialSection:n=aq}){let{t:r}=R(),[i,a]=(0,V.useState)(n),[o,s]=(0,V.useState)(``);return(0,V.useEffect)(()=>{e&&a(n)},[e,n]),(0,H.jsx)(tt,{open:e,onOpenChange:t,children:(0,H.jsxs)(pn,{"data-slot":`preferences-dialog`,width:`94vw`,maxW:980,height:`84vh`,maxH:760,p:0,gap:0,rounded:14,overflow:`hidden`,bg:`var(--pane-fill, var(--card))`,borderWidth:1,borderColor:`var(--pane-edge, var(--border))`,children:[(0,H.jsx)(wt,{display:`none`,children:r(`Settings`)}),(0,H.jsxs)(y,{flex:1,minH:0,width:`100%`,children:[(0,H.jsxs)(z,{width:236,shrink:0,height:`100%`,bg:`var(--side-fill, var(--background))`,borderRightWidth:1,borderColor:`var(--pane-edge, var(--border))`,"$max-md":{width:184},children:[(0,H.jsx)(y,{px:12,pt:12,pb:8,shrink:0,children:(0,H.jsxs)(y,{flex:1,height:32,px:10,gap:7,items:`center`,rounded:8,bg:`var(--surface-card-emphasis)`,borderWidth:1,borderColor:`var(--pane-edge, var(--border))`,children:[(0,H.jsx)(FK,{size:13,color:`var(--muted-foreground)`,"aria-hidden":!0}),(0,H.jsx)(C_,{unstyled:!0,value:o,onChange:e=>s(e.target.value),placeholder:r(`Search settings`),"aria-label":r(`Search settings`),flex:1,minW:0,fontSize:13,color:`var(--foreground)`,placeholderTextColor:`$placeholderColor`})]})}),(0,H.jsx)(z,{flex:1,minH:0,px:8,pb:12,overflowY:`auto`,overflowX:`hidden`,children:(0,H.jsx)(oq,{active:i,filter:o,onPick:e=>{if(e.href){window.open(e.href,`_blank`,`noopener,noreferrer`);return}a(e.id)},onBack:()=>t(!1)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,minH:0,height:`100%`,bg:`var(--pane-fill, var(--card))`,position:`relative`,children:[(0,H.jsx)(y,{position:`absolute`,t:12,r:14,z:5,children:(0,H.jsx)(y,{render:`button`,type:`button`,"aria-label":r(`Close`),onClick:()=>t(!1),width:32,height:32,rounded:999,items:`center`,justify:`center`,bg:`var(--surface-card-emphasis)`,borderWidth:1,borderColor:`var(--pane-edge, var(--border))`,cursor:`pointer`,hoverStyle:{bg:`var(--secondary)`},children:(0,H.jsx)(GK,{size:15,color:`var(--foreground)`,"aria-hidden":!0})})}),(0,H.jsx)(Lre,{id:i})]})]})]})})}HW({site:`https://hanzo.ai`,home:`/`,brand:`Hanzo Team`,signUp:`/start`});var X8=new Set,Z8=null;function Q8(e=`general`){Z8=e;for(let e of X8)e(Z8)}function $8(){Z8=null;for(let e of X8)e(null)}function Yre(e){return e===`ai`?`model`:e===`account`?`account`:`general`}function Xre(e){let t=(0,V.useMemo)(()=>oV(),[]),{current:n}=_H(),[r,i]=(0,V.useState)(Z8);return(0,V.useEffect)(()=>{n?.org&&eK(n.org)},[n?.org]),(0,V.useEffect)(()=>{let e=e=>i(e);X8.add(e);let t=e=>{(e.metaKey||e.ctrlKey)&&e.key===`,`?(e.preventDefault(),Q8(Z8??`general`)):e.key===`Escape`&&Z8&&$8()};return window.addEventListener(`keydown`,t),()=>{X8.delete(e),window.removeEventListener(`keydown`,t)}},[]),(0,H.jsx)(FW,{config:t,children:(0,H.jsx)(Y8,{open:r!==null,onOpenChange:e=>{e||$8()},initialSection:r?Yre(r):`general`})})}var e5=e=>`var(--team-${e})`,X={ground:e5(`ground`),panel:e5(`panel`),card:e5(`card`),rule:e5(`rule`),bar:e5(`bar`),barRule:e5(`bar-rule`),rail:e5(`rail`),railRule:e5(`rail-rule`),railActive:e5(`rail-active`),railFg:e5(`rail-fg`),railFgActive:e5(`rail-fg-active`),sidebar:e5(`sidebar`),sidebarRule:e5(`sidebar-rule`),rowActive:e5(`row-active`),rowHover:e5(`row-hover`),avatar:e5(`avatar`),avatarInk:e5(`avatar-ink`),composer:e5(`composer`),composerRule:e5(`composer-rule`),composerAccent:e5(`composer-accent`),composerAccentInk:e5(`composer-accent-ink`),composerWarn:e5(`composer-warn`),chatUser:e5(`chat-user`),chatUserInk:e5(`chat-user-ink`),ink:e5(`ink`),mute:e5(`mute`),dim:e5(`dim`),accent:e5(`accent`),alert:e5(`alert`)},t5={backlog:e5(`backlog`),todo:e5(`todo`),doing:e5(`doing`),done:e5(`done`)},Zre=6,n5=e=>{let t=e.toLowerCase(),n=0;for(let e=0;e<t.length;e++)n=n*31+t.charCodeAt(e)|0;return Math.abs(n)%Zre+1},r5=e=>({background:`var(--team-hue-${n5(e)})`,color:`var(--team-chip-ink)`}),i5=e=>`var(--team-hue-${n5(e)})`,Qre=e=>e===1||e===2,$re=e=>Qre(e)?{background:`var(--team-urgent)`,color:`var(--team-chip-ink)`}:{background:`var(--team-quiet)`,color:X.ink},Z={title:`$7`,row:`$4`,body:`$3`,small:`$2`,chip:`$1`,figure:`$7`},a5={tight:`$2`,inset:`$3`,wide:`$4`,edge:`$5`},Q={card:`$1`,panel:`$1`,field:`$1`,pill:`$10`},o5={textTransform:`uppercase`,letterSpacing:.08},s5={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},c5=`team.aside`,l5=`team.aside.kind`,eie=()=>{try{return localStorage.getItem(c5)===`yes`}catch{return!1}},tie=()=>{try{return localStorage.getItem(l5)===`inspector`?`inspector`:`inbox`}catch{return`inbox`}},u5=eie(),d5=tie(),f5=new Set,p5=()=>{for(let e of f5)e()},m5=e=>{if(e!==u5){u5=e;try{localStorage.setItem(c5,e?`yes`:`no`)}catch{}p5()}},h5=e=>{let t=e!==d5;d5=e;try{localStorage.setItem(l5,e)}catch{}u5?t&&p5():m5(!0)},g5=e=>{u5&&d5===e?m5(!1):h5(e)},_5=()=>m5(!1),v5=()=>(0,V.useSyncExternalStore)(e=>(f5.add(e),()=>f5.delete(e)),()=>u5,()=>!1),y5=()=>(0,V.useSyncExternalStore)(e=>(f5.add(e),()=>f5.delete(e)),()=>d5,()=>`inbox`),nie=`with-`,b5=e=>`/bots?bot=${encodeURIComponent(e.name)}`,x5=e=>e?.startsWith(nie)?e.slice(5):void 0,S5=e=>e.filter(e=>e.bot&&!e.gone).sort((e,t)=>e.name.localeCompare(t.name)),C5=(e,t)=>e.kind===`direct`?t.find(t=>t.bot&&e.members.includes(t.id)):void 0,rie=e=>(iie(e)?aie(e):e).replace(/<\/(p|div|li|h[1-6])>|<br\s*\/?>/gi,`
196
- `).replace(/<[^>]*>/g,``).split(`
197
- `).map(e=>lie(e).trim()).filter(e=>e!==``),iie=e=>e.trimStart().startsWith(`{"type"`),aie=e=>{let t;try{t=JSON.parse(e)}catch{return e}let n=e=>e.type===`reference`?`@${e.attrs?.label??``}`:(e.text??``)+(e.content??[]).map(n).join(``);return(t.content??[]).map(e=>`<p>${T5(n(e))}</p>`).join(``)},w5=(e,t=[])=>oie(e,t)??sie(e),oie=(e,t)=>{let n=new Map;for(let e of t)e.name.trim()&&n.set(e.name.trim().toLowerCase(),e);if(n.size===0)return null;let r=!1,i=e.replace(/\r\n/g,`
198
- `).split(`
199
- `).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>{let t=[],i=0;for(let a of e.matchAll(/(?<![\w.@-])@([\w.-]+)/g)){let o=n.get(a[1].replace(/[.-]+$/,``).toLowerCase());if(!o)continue;let s=a.index+1+a[1].replace(/[.-]+$/,``).length;a.index>i&&t.push({type:`text`,text:e.slice(i,a.index)}),t.push({type:`reference`,attrs:{id:`person-${o.id}`,objectclass:`contact:class:Person`,label:o.name}}),i=s,r=!0}return i<e.length&&t.push({type:`text`,text:e.slice(i)}),{type:`paragraph`,content:t}});return r?JSON.stringify({type:`doc`,content:i}):null},sie=e=>e.replace(/\r\n/g,`
200
- `).split(`
201
- `).map(e=>e.trimEnd()).filter(e=>e!==``).map(e=>`<p>${T5(e)}</p>`).join(``)||`<p></p>`,cie={"&amp;":`&`,"&lt;":`<`,"&gt;":`>`,"&quot;":`"`,"&#39;":`'`,"&#34;":`"`,"&nbsp;":` `},lie=e=>e.replace(/&(?:amp|lt|gt|quot|nbsp|#39|#34);/g,e=>cie[e]??e),T5=e=>e.replace(/[&<>"']/g,e=>`&${{"&":`amp`,"<":`lt`,">":`gt`,'"':`quot`,"'":`#39`}[e]};`),uie=/(?<![\w.@-])(@[\w.-]+)|(https?:\/\/[^\s<>()]+)/g,die=e=>{let t=[],n=0;for(let r of e.matchAll(uie)){let i=r.index;i>n&&t.push({kind:`text`,value:e.slice(n,i)}),t.push(r[1]?{kind:`mention`,value:r[1]}:{kind:`link`,value:r[2]}),n=i+r[0].length}return n<e.length&&t.push({kind:`text`,value:e.slice(n)}),t},E5={channel:xH.channel,direct:xH.direct,message:xH.message,reply:xH.reply,reaction:xH.reaction,person:xH.person},D5=SH.create,fie=SH.remove,O5=(e,t)=>e.name||e.members.map(e=>t.find(t=>t.id===e)?.name).filter(e=>!!e).join(`, `),k5=e=>typeof e==`string`?e:``,A5=e=>typeof e==`number`?e:0,pie=async e=>{let[t,n]=await Promise.all([e.find(E5.channel),e.find(E5.direct)]);return[...t.map(e=>j5(e,`channel`)),...n.map(e=>j5(e,`direct`))].filter(e=>!e.archived)},mie=e=>{let t=new Set;if(Array.isArray(e.bindings))for(let n of e.bindings)typeof n==`string`&&n.startsWith(`connect:`)&&t.add(n.slice(8));let n=k5(e.topic)||k5(e.description);for(let e of n.matchAll(/connect:([a-z0-9_-]+)/gi))e[1]&&t.add(e[1].toLowerCase());let r=k5(e.name).match(/^[a-z0-9]+-x-([a-z0-9_-]+)$/i);return r?.[1]&&t.add(r[1].toLowerCase()),t.size>0?[...t]:void 0},j5=(e,t)=>({id:k5(e._id),kind:t,name:k5(e.name),topic:k5(e.topic)||void 0,private:e.private===!0,archived:e.archived===!0,members:Array.isArray(e.members)?e.members.filter(e=>typeof e==`string`):[],connectedOrgs:mie(e)}),hie=async(e,t)=>(await e.find(E5.message,{attachedTo:t})).map(e=>N5(e,t)).sort(M5),M5=(e,t)=>e.at-t.at||(e.id<t.id?-1:1),N5=(e,t)=>({id:k5(e._id),room:t,author:k5(e.createdBy)||k5(e.modifiedBy),lines:rie(k5(e.message)),at:A5(e.createdOn)||A5(e.modifiedOn),replies:A5(e.replies),pinned:e.isPinned===!0}),gie=async(e,t)=>(await e.find(E5.reply,{attachedTo:t})).map(e=>({..._ie(e),room:t})).sort(M5),_ie=e=>N5(e,k5(e.attachedTo)),vie=async(e,t)=>t.length===0?[]:(await e.find(E5.reaction,{attachedTo:{$in:t}})).map(e=>({id:k5(e._id),message:k5(e.attachedTo),emoji:k5(e.emoji),by:k5(e.createBy)||k5(e.createdBy)})),yie=e=>TH({name:e}).replace(/\s+/g,` `),bie=e=>{let t=e[`contact:mixin:Employee`];return k5(e.position)||(t&&typeof t==`object`?k5(t.position):``)},xie=e=>{let t=e[`contact:mixin:Employee`],n=t&&typeof t==`object`?t.active:e.active;return typeof n==`boolean`?n:void 0},Sie=async e=>(await e.find(E5.person)).map(e=>({id:k5(e.personUuid)||k5(e._id),name:yie(k5(e.name)),avatar:k5(e.avatar)||void 0,bot:bie(e)===`Agent`||void 0,gone:xie(e)===!1||void 0})),Cie=(e,t,n,r=[])=>e.write(I5(L5(),E5.message,t.id,t.id,P5(t),`messages`,F5(e),{message:w5(n,r)})),wie=(e,t,n,r,i=[])=>e.write(I5(L5(),E5.reply,t.id,n.id,E5.message,`replies`,F5(e),{message:w5(r,i),objectId:t.id,objectClass:P5(t)})),Tie=(e,t,n,r)=>e.write(I5(L5(),E5.reaction,t.id,n.id,E5.message,`reactions`,F5(e),{emoji:r})),Eie=(e,t,n)=>e.write({_class:fie,objectId:n.id,objectClass:E5.reaction,objectSpace:t.id,modifiedBy:F5(e),modifiedOn:Date.now()}),Die=async(e,t,n,r)=>{let i=t.trim().replace(/^#+/,``).toLowerCase().replace(/[^a-z0-9_-]+/g,`-`),a=n.map(e=>e.trim().toLowerCase().replace(/[^a-z0-9_-]+/g,``)).filter(Boolean),o=`connect-${i}-${L5().slice(0,8)}`,s=Date.now(),c=F5(e),l=a.map(e=>`connect:${e}`),u=[r?.trim(),...l].filter(Boolean).join(` · `);return await e.write({_class:D5,objectId:o,objectClass:E5.channel,objectSpace:`core:space:Space`,modifiedBy:c,modifiedOn:s,createdBy:c,createdOn:s,attributes:{name:i,topic:u,description:u,private:!1,archived:!1,members:c?[c]:[],owners:c?[c]:[],life:`standing`,bindings:l}}),o},P5=e=>e.kind===`direct`?E5.direct:E5.channel,F5=e=>e.account??``,I5=(e,t,n,r,i,a,o,s)=>{let c=Date.now();return{_class:D5,objectId:e,objectClass:t,objectSpace:n,modifiedBy:o,modifiedOn:c,createdBy:o,createdOn:c,attributes:s,attachedTo:r,attachedToClass:i,collection:a}},L5=()=>[...crypto.getRandomValues(new Uint8Array(16))].map(e=>e.toString(16).padStart(2,`0`)).join(``),Oie=(e,t)=>e.some(e=>{let n=k5(e.objectClass);return n!==E5.message&&n!==E5.reaction&&n!==E5.reply?!1:k5(e.objectSpace)===t||k5(e.attachedTo)===t||n!==E5.message}),R5=()=>{let{plane:e,current:t}=_H();return SV(`chat:rooms:${t?.uuid??`-`}`,()=>e?pie(e):Promise.resolve([]),{enabled:!!e})},kie=e=>{let{plane:t}=_H();return SV(`chat:messages:${e??`-`}`,()=>t&&e?hie(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},Aie=e=>{let{plane:t}=_H();return SV(`chat:reactions:${e.join(`,`).slice(0,200)}:${e.length}`,()=>t?vie(t,e):Promise.resolve([]),{enabled:!!t&&e.length>0})},jie=e=>{let{plane:t}=_H();return SV(`chat:replies:${e??`-`}`,()=>t&&e?gie(t,e):Promise.resolve([]),{enabled:!!(t&&e)})},z5=()=>{let{plane:e,current:t}=_H();return SV(`chat:people:${t?.uuid??`-`}`,()=>e?Sie(e):Promise.resolve([]),{enabled:!!e})},Mie=e=>{let{plane:t}=_H();(0,V.useEffect)(()=>{if(t&&e)return t.watch(t=>{Oie(t,e)&&(CV(`chat:messages:${e}`),CV(`chat:reactions:`),CV(`chat:replies:`))})},[t,e])},B5=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.name||Nie(n)},Nie=e=>(e.length>12?`${e.slice(0,8)}…`:e)||`Someone`,Pie=e=>e.split(/[\s._-]+/).filter(Boolean).slice(0,2).map(e=>e[0].toUpperCase()).join(``)||`?`;function V5(e,t){return e?.trim()?e.trim():(t?.split(`@`)[0])?.trim()||``}function Fie(e,t){let n=V5(e,t).replace(/,/g,` `).trim();if(!n)return`HZ`;let r=n.split(/\s+/).filter(Boolean);return r.length>=2?`${r[0][0]??``}${r[r.length-1][0]??``}`.toUpperCase():n.slice(0,2).toUpperCase()}var Iie=[{id:`crm`,label:`CRM`,productTitle:`Hanzo CRM`,description:`Pipeline, contacts, investors & deals`,href:`https://crm.hanzo.ai`,supportsFreshAuth:!0},{id:`team`,label:`Work`,productTitle:`Hanzo Team`,description:`Shared workspace, docs, tasks & drive`,href:`https://hanzo.team`,supportsFreshAuth:!1},{id:`cms`,label:`CMS`,productTitle:`Hanzo CMS`,description:`Content, pages, collections & media`,href:`https://cms.hanzo.ai/admin`,supportsFreshAuth:!1},{id:`email`,label:`Email`,productTitle:`Hanzo Email`,description:`Campaigns, journeys & broadcasts`,href:`https://marketing.hanzo.ai`,supportsFreshAuth:!0},{id:`ads`,label:`Ads`,productTitle:`Hanzo Ads`,description:`Ad spend, ROAS & attribution`,href:`https://ads.hanzo.ai`,supportsFreshAuth:!0},{id:`cal`,label:`Cal`,productTitle:`Hanzo Cal`,description:`Scheduling, bookings & availability`,href:`https://hanzo.team/cal`,supportsFreshAuth:!1},{id:`bots`,label:`Bots`,productTitle:`Hanzo Bots`,description:`Autonomous AI agents & workflows`,href:`https://hanzo.bot`,supportsFreshAuth:!1},{id:`post`,label:`Post`,productTitle:`Hanzo Post`,description:`AI social & blog publishing across 28+ channels`,href:`https://post.hanzo.ai`,supportsFreshAuth:!1},{id:`social`,label:`Social`,productTitle:`Hanzo Publish`,description:`Social scheduling, inbox & listening`,href:`https://social.hanzo.ai`,supportsFreshAuth:!0},{id:`chat`,label:`Chat`,productTitle:`Hanzo Chat`,description:`AI assistant, models & playground`,href:`https://hanzo.ai/chat`,supportsFreshAuth:!1},{id:`dev`,label:`Dev`,productTitle:`Hanzo Dev`,description:`Coding agents & cloud workspaces`,href:`https://hanzo.ai/dev`,supportsFreshAuth:!1},{id:`commerce`,label:`Commerce`,productTitle:`Hanzo Commerce`,description:`Store, products, orders & subscriptions`,href:`https://commerce-admin.hanzo.ai/admin/`,supportsFreshAuth:!1},{id:`analytics`,label:`Analytics`,productTitle:`Hanzo Analytics`,description:`Web traffic, funnels & retention`,href:`https://analytics.hanzo.ai`,supportsFreshAuth:!1},{id:`dataroom`,label:`Data Room`,productTitle:`Hanzo Data Room`,description:`Secure investor & deal data rooms`,href:`https://dataroom.hanzo.ai`,supportsFreshAuth:!1},{id:`sign`,label:`Sign`,productTitle:`Hanzo Sign`,description:`Document e-signatures & agreements`,href:`https://esign.hanzo.ai`,supportsFreshAuth:!1},{id:`billing`,label:`Billing`,productTitle:`Hanzo Billing`,description:`Usage, balance, invoices & payment methods`,href:`https://billing.hanzo.ai`,supportsFreshAuth:!1},{id:`console`,label:`Console`,productTitle:`Hanzo Console`,description:`Cloud, AI infrastructure & IAM`,href:`https://console.hanzo.ai`,supportsFreshAuth:!0},{id:`platform`,label:`Platform`,productTitle:`Hanzo Platform`,description:`PaaS deployments, clusters & containers`,href:`https://platform.hanzo.ai`,supportsFreshAuth:!0}];function Lie({id:e,size:t=16}){switch(e){case`crm`:return(0,H.jsx)(Sp,{size:t});case`team`:case`work`:return(0,H.jsx)(Mm,{size:t});case`cms`:return(0,H.jsx)(Xp,{size:t});case`email`:case`marketing`:return(0,H.jsx)(cm,{size:t});case`ads`:return(0,H.jsx)(nee,{size:t});case`cal`:return(0,H.jsx)(Tp,{size:t});case`bots`:return(0,H.jsx)(bp,{size:t});case`post`:case`social`:return(0,H.jsx)(ym,{size:t});case`chat`:return(0,H.jsx)(iee,{size:t});case`dev`:return(0,H.jsx)(cee,{size:t});case`commerce`:return(0,H.jsx)(xm,{size:t});case`analytics`:return(0,H.jsx)(cp,{size:t});case`dataroom`:return(0,H.jsx)(qp,{size:t});case`sign`:return(0,H.jsx)(op,{size:t});case`billing`:return(0,H.jsx)(Rp,{size:t});case`console`:return(0,H.jsx)(wm,{size:t});case`platform`:return(0,H.jsx)(nm,{size:t});default:return(0,H.jsx)(fp,{size:t})}}function Rie(e,t){try{let n=new URL(e.href);if(e.supportsFreshAuth&&t?.who){let e=t?.org?`/?org=${encodeURIComponent(t.org)}`:`/`;return`${n.origin}/auth/fresh?next=${encodeURIComponent(e)}&who=${encodeURIComponent(t.who)}`}return t?.org&&!n.searchParams.has(`org`)&&n.searchParams.set(`org`,t.org),n.toString()}catch{return e.href}}var zie=[{id:`issues`,label:`Tracker — All issues`,desc:`Kanban board, list & project issues`,path:`/issues`},{id:`projects`,label:`Projects`,desc:`Every project in this space`,path:`/projects`}];function Bie({appId:e=`team`,appTitle:t,showAppTitle:n=!1,apps:r=Iie,onSelectApp:i,brandMark:a,currentOrg:o,orgs:s=[],onSelectOrg:c,onAllOrgs:l,onCreateOrg:u,navSpan:d,navOpen:f=!1,onToggleNav:p,surfaceTitle:m,leftSlot:h,children:g,rightSlot:_,onNavigate:v,onSettings:b,user:x}){let[S,C]=(0,V.useState)(!1),[w,T]=(0,V.useState)(!1),[E,D]=(0,V.useState)(!1),[O,k]=(0,V.useState)(``),[ee,A]=(0,V.useState)(()=>typeof window>`u`?1200:window.innerWidth),j=ee<680,M=r.find(t=>t.id===e)??r[0],N=t||M?.productTitle||`Hanzo Team`,P=o?.displayName?.trim()||o?.name||`Hanzo AI`,te=x?.sub||``;(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),D(e=>!e))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let F=z5().data??[],I=R5().data??[],ne=(0,V.useMemo)(()=>{let e=O.trim().toLowerCase(),t=S5(F).map(e=>({id:`bot-${e.id}`,kind:`bot`,label:e.name,desc:`Agent`,path:b5(e)})),n=I.filter(e=>e.kind===`channel`).map(e=>({id:e.id,kind:`channel`,label:`#${e.name}`,desc:e.topic??``,path:`/chat/${e.id}`})),r=[...zie.map(e=>({...e,kind:`surface`})),...n,...t];return e?r.filter(t=>t.label.toLowerCase().includes(e)||t.desc.toLowerCase().includes(e)).slice(0,14):r.slice(0,12)},[O,F,I]),re=e=>{if(C(!1),i){i(e);return}if(typeof window<`u`){let t=Rie(e,{who:te||void 0,org:o?.name||void 0});window.location.assign(t)}},ie=e=>{D(!1),k(``),v?v(e):typeof window<`u`&&window.location.assign(e)};return(0,H.jsxs)(y,{render:`header`,height:38,items:`center`,borderBottomWidth:1,shrink:0,style:{backgroundColor:X.bar,borderBottomColor:X.barRule},onLayout:e=>A(e.nativeEvent.layout.width),"data-testid":`hanzo-business-header`,children:[(0,H.jsxs)(y,{height:`100%`,width:f&&d?44+d:void 0,minW:f&&d?44+d:void 0,px:`$2.5`,gap:2,items:`center`,borderRightWidth:f&&d?1:0,shrink:0,style:{borderRightColor:X.barRule},children:[h,j?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go back`,onPress:()=>{typeof window<`u`&&window.history.back()},children:(0,H.jsx)(gp,{size:15,color:`$color10`})}),(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Go forward`,onPress:()=>{typeof window<`u`&&window.history.forward()},children:(0,H.jsx)(_p,{size:15,color:`$color10`})})]}),p?(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":f?`Collapse sidebar`:`Expand sidebar`,"data-testid":`toggle-team-sidebar`,onPress:p,children:(0,H.jsx)(pm,{size:15,color:`$color10`})}):null]}),(0,H.jsxs)(y,{flex:1,height:`100%`,pl:12,pr:10,gap:`$2`,items:`center`,justify:`space-between`,minW:0,children:[(0,H.jsxs)(y,{items:`center`,gap:`$1`,minW:0,shrink:1,children:[(0,H.jsxs)(pt,{open:S,onOpenChange:C,placement:`bottom-start`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$1`,height:30,px:`$2`,rounded:`$3`,hoverStyle:{bg:`$color3`},"aria-label":`${N} — Switch application`,"aria-haspopup":`menu`,"aria-expanded":S,"data-testid":`business-app-switcher-trigger`,children:[(0,H.jsx)(z,{items:`center`,justify:`center`,width:20,height:20,shrink:0,children:a??(0,H.jsx)(hQ,{size:17,wordmark:``})}),n?(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`700`,color:`$color12`,numberOfLines:1,children:N}):null,(0,H.jsx)(Ep,{size:12,color:`$color10`})]})}),(0,H.jsx)(pt.Content,{role:`menu`,"aria-label":`Hanzo Business Applications`,borderWidth:1,elevation:`$4`,p:`$2.5`,width:350,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$2`,width:`100%`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:`$2`,pt:`$1`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.6,children:`Hanzo Business Suite`}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,children:P})]}),(0,H.jsx)(z,{gap:`$0.5`,maxH:420,style:{overflowY:`auto`},children:r.map(t=>{let n=t.id===e;return(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2.5`,py:`$2`,rounded:`$3`,bg:n?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>re(t),"data-testid":`app-switcher-item-${t.id}`,children:[(0,H.jsx)(z,{width:30,height:30,rounded:`$3`,bg:n?`$color4`:`$color2`,items:`center`,justify:`center`,shrink:0,children:(0,H.jsx)(Lie,{id:t.id,size:15})}),(0,H.jsxs)(z,{flex:1,minW:0,gap:1,children:[(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:t.label}),n?(0,H.jsx)(U,{fontSize:10,fontWeight:`600`,color:`$color10`,px:`$1.5`,py:1,rounded:`$2`,bg:`$color4`,children:`Current`}):null]}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:t.description})]}),n?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},t.id)})})]})})]}),(0,H.jsxs)(pt,{open:w,onOpenChange:T,placement:`bottom-start`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$1.5`,height:30,px:`$2`,rounded:`$3`,hoverStyle:{bg:`$color3`},"aria-label":`Current organization: ${P}. Click to switch organization.`,"data-testid":`business-org-subtitle-trigger`,children:[(0,H.jsx)(yQ,{org:{name:P,logo:o?.logo},size:20}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`600`,color:`$color12`,numberOfLines:1,maxW:180,children:P}),(0,H.jsx)(Ep,{size:12,color:`$color10`})]})}),(0,H.jsx)(pt.Content,{role:`menu`,"aria-label":`Switch organization`,borderWidth:1,elevation:`$4`,p:`$2`,width:260,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$1`,width:`100%`,children:[(0,H.jsx)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch organization`})}),s.map(e=>{let t=e.name===o?.name,n=e.displayName?.trim()||e.name;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":t,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:t?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{T(!1),c?.(e.name)},children:[(0,H.jsx)(yQ,{org:{name:n,logo:e.logo},size:20}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,fontWeight:t?`600`:`500`,color:`$color12`,numberOfLines:1,children:n}),t?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.name)}),l||u?(0,H.jsx)(Ic,{borderColor:`$borderColor`,my:`$1`}):null,l?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{T(!1),l()},children:[(0,H.jsx)(Cp,{size:14,color:`$color10`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`All organizations…`})]}):null,u?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{T(!1),u()},children:[(0,H.jsx)(hm,{size:14,color:`$color10`}),(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Create organization`})]}):null]})})]}),m&&!j?(0,H.jsxs)(y,{items:`center`,gap:6,minW:0,shrink:1,pl:2,children:[(0,H.jsx)(U,{fontSize:12,color:`$color9`,children:`/`}),(0,H.jsx)(U,{fontSize:13,fontWeight:`500`,color:`$color12`,numberOfLines:1,children:m})]}):null]}),(0,H.jsxs)(y,{items:`center`,justify:`flex-end`,gap:`$1.5`,minW:0,shrink:0,children:[g??(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(pt,{open:E,onOpenChange:D,placement:`bottom-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:j?28:220,maxW:j?28:`38vw`,height:26,px:j?0:`$2`,rounded:7,borderWidth:1,items:`center`,justify:j?`center`:`space-between`,style:{backgroundColor:X.sidebar,borderColor:X.sidebarRule},hoverStyle:{bg:`$color3`},"aria-label":`Search ${P}`,"data-testid":`slack-top-search-trigger`,children:j?(0,H.jsx)(_m,{size:13,color:`$color10`}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,minW:0,flex:1,children:[(0,H.jsx)(_m,{size:12,color:`$color10`}),(0,H.jsx)(U,{fontSize:12,color:`$color10`,numberOfLines:1,children:`Search ${P}…`})]}),(0,H.jsx)(U,{fontSize:10,fontWeight:`600`,color:`$color9`,px:`$1`,py:1,rounded:`$1`,children:`⌘K`})]})})}),(0,H.jsx)(pt.Content,{role:`dialog`,"aria-label":`Jump to channel, bot, or surface`,borderWidth:1,elevation:`$4`,p:`$2`,width:460,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$2`,width:`100%`,children:[(0,H.jsxs)(y,{height:34,px:`$2.5`,items:`center`,gap:`$2`,rounded:`$3`,bg:`$color2`,borderWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(_m,{size:14,color:`$color10`}),(0,H.jsx)(ht,{flex:1,height:30,fontSize:13,borderWidth:0,bg:`transparent`,placeholder:`Jump to a channel, bot or issue board…`,value:O,onChangeText:k,autoFocus:!0})]}),(0,H.jsx)(z,{gap:`$0.5`,maxH:340,style:{overflowY:`auto`},children:ne.map(e=>(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2.5`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>ie(e.path),children:[(0,H.jsx)(z,{width:24,height:24,rounded:`$2`,bg:`$color3`,items:`center`,justify:`center`,shrink:0,children:e.kind===`bot`?(0,H.jsx)(bp,{size:13,color:`$color11`}):e.kind===`channel`?(0,H.jsx)(Qp,{size:13,color:`$color11`}):(0,H.jsx)(Tm,{size:13,color:`$color11`})}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:12,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:e.label}),(0,H.jsx)(U,{fontSize:11,color:`$color10`,numberOfLines:1,children:e.desc})]})]},e.id))})]})})]})}),b?(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:26,height:26,rounded:6,items:`center`,justify:`center`,hoverStyle:{bg:`$color3`},"aria-label":`Settings`,"data-testid":`header-settings-trigger`,onPress:b,children:(0,H.jsx)(vm,{size:14,color:`$color10`})}):null,_]})]})]})}function Vie({user:e,currentOrg:t,orgs:n=[],onSelectOrg:r,onCreateOrg:i,onConnectOrg:a,accounts:o=[],onSwitchAccount:s,onAddAccount:c,onSettings:l,onSignOut:u}){let[d,f]=(0,V.useState)(!1),p=t?.displayName?.trim()||t?.name||`Hanzo AI`,m=V5(e?.name,e?.email)||`Account`,h=e?.email||``,g=e?.sub||``,_=(()=>{let n=[],r=new Set;g&&(r.add(g),n.push({sub:g,owner:e?.owner||t?.name||`hanzo`,name:m,email:h||void 0,avatar:e?.avatar}));for(let e of o)e.sub&&!r.has(e.sub)&&(r.add(e.sub),n.push(e));return n})();return(0,H.jsxs)(pt,{open:d,onOpenChange:f,placement:`right-end`,allowFlip:!0,stayInFrame:!0,children:[(0,H.jsx)(pt.Trigger,{asChild:!0,children:(0,H.jsx)(z,{role:`button`,tabIndex:0,cursor:`pointer`,width:32,height:32,rounded:Q.pill,items:`center`,justify:`center`,position:`relative`,hoverStyle:{bg:`$color3`},"aria-label":`${m} · Account & settings`,"aria-haspopup":`menu`,"aria-expanded":d,"data-testid":`rail-account-menu-trigger`,onKeyDown:e=>{(e?.key===`Enter`||e?.key===` `)&&(e.preventDefault?.(),f(!d))},children:e?.avatar?(0,H.jsx)(yQ,{org:{name:m,logo:e.avatar},size:28}):(0,H.jsx)(z,{width:28,height:28,rounded:Q.pill,items:`center`,justify:`center`,style:{backgroundColor:X.avatar},children:(0,H.jsx)(U,{fontSize:11,fontWeight:`600`,style:{color:X.avatarInk},children:Fie(e?.name,e?.email)})})})}),(0,H.jsx)(pt.Content,{role:`menu`,"aria-label":`Account menu`,borderWidth:1,elevation:`$4`,p:`$2`,width:300,bg:`$background`,borderColor:`$borderColor`,rounded:`$4`,style:{zIndex:1e5},children:(0,H.jsxs)(z,{gap:`$1`,width:`100%`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2.5`,px:`$2`,py:`$2`,rounded:`$3`,bg:`$color2`,children:[(0,H.jsx)(yQ,{org:{name:m,logo:e?.avatar},size:36}),(0,H.jsxs)(z,{flex:1,minW:0,gap:1,children:[(0,H.jsx)(U,{fontSize:`$3`,fontWeight:`700`,color:`$color12`,numberOfLines:1,children:m}),h&&h!==m?(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:h}):null,(0,H.jsxs)(y,{items:`center`,gap:`$1.5`,mt:2,children:[(0,H.jsx)(z,{width:6,height:6,rounded:Q.pill,style:{backgroundColor:t5.done}}),(0,H.jsxs)(U,{fontSize:11,fontWeight:`600`,color:`$color10`,children:[`Active · `,p]})]})]})]}),(0,H.jsx)(Ic,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch account`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`Identities`})]}),_.map(e=>{let t=!!(g&&e.sub===g),n=e.name||e.email||e.sub;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":t,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:t?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),t||s?.(e)},children:[(0,H.jsx)(yQ,{org:{name:n,logo:e.avatar},size:24}),(0,H.jsxs)(z,{flex:1,minW:0,children:[(0,H.jsx)(U,{fontSize:`$2`,fontWeight:t?`600`:`500`,color:`$color12`,numberOfLines:1,children:n}),(0,H.jsx)(U,{fontSize:`$1`,color:`$color10`,numberOfLines:1,children:e.email&&e.email!==n?e.email:t?`Current account`:`Identity · ${e.owner}`})]}),t?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.sub)}),c?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),c()},children:[(0,H.jsx)(z,{width:24,height:24,rounded:Q.pill,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(dee,{size:13,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Add another account`})]}):null]}),(0,H.jsx)(Ic,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{px:`$2`,py:`$1`,items:`center`,justify:`space-between`,children:[(0,H.jsx)(U,{fontSize:`$1`,fontWeight:`700`,color:`$color10`,textTransform:`uppercase`,letterSpacing:.5,children:`Switch organization`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:p})]}),n.slice(0,5).map(e=>{let n=e.name===t?.name,i=e.displayName?.trim()||e.name;return(0,H.jsxs)(y,{role:`menuitem`,"aria-checked":n,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,bg:n?`$color3`:`transparent`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),n||r?.(e.name)},children:[(0,H.jsx)(yQ,{org:{name:i,logo:e.logo},size:20}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,fontWeight:n?`600`:`500`,color:`$color12`,numberOfLines:1,children:i}),n?(0,H.jsx)(Vt,{size:14,color:`$color12`}):null]},e.name)}),i?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),i()},children:[(0,H.jsx)(z,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(hm,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Create new organization…`})]}):null,a?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),a()},children:[(0,H.jsx)(z,{width:20,height:20,rounded:Q.field,bg:`$color3`,items:`center`,justify:`center`,children:(0,H.jsx)(ym,{size:12,color:`$color11`})}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,color:`$color12`,children:`Hanzo Connect (share channel)…`})]}):null]}),(0,H.jsx)(Ic,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(z,{gap:`$0.5`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,px:`$2`,py:`$1.5`,rounded:`$3`,children:[(0,H.jsx)(U,{fontSize:`$2`,color:`$color12`,children:`Theme`}),(0,H.jsx)(EQ,{})]}),l?(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),l()},children:[(0,H.jsx)(vm,{size:15,color:`$color10`}),(0,H.jsx)(U,{flex:1,fontSize:`$2`,color:`$color12`,children:`Settings & Preferences`}),(0,H.jsx)(U,{fontSize:11,color:`$color9`,children:`⌘,`})]}):null]}),u?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Ic,{borderColor:`$borderColor`,my:`$1`}),(0,H.jsxs)(y,{role:`menuitem`,tabIndex:0,cursor:`pointer`,items:`center`,gap:`$2.5`,px:`$2`,py:`$1.5`,rounded:`$3`,hoverStyle:{bg:`$color3`},onPress:()=>{f(!1),u()},children:[(0,H.jsx)(sm,{size:15,color:X.alert}),(0,H.jsx)(U,{fontSize:`$2`,fontWeight:`500`,style:{color:X.alert},children:`Sign out`})]})]}):null]})})]})}var H5=(e,t)=>({role:`button`,tabIndex:0,cursor:`pointer`,...t?{"aria-label":t}:{},onPress:e,onKeyDown:t=>{(t.nativeEvent.key===`Enter`||t.nativeEvent.key===` `)&&(t.preventDefault(),e())}}),U5=new Set,W5=null,G5=(e=`connect`)=>{W5=e;for(let e of U5)e(W5)},K5=()=>{W5=null;for(let e of U5)e(null)};function Hie(){let[e,t]=(0,V.useState)(W5),n=bi(),{all:r,current:i,plane:o}=_H(),[s,c]=(0,V.useState)(`lux`),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(`hanzo-x-lux`),[p,m]=(0,V.useState)(`Cross-organization engineering, shared agents & delivery`),[h,g]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let e=e=>t(e);return U5.add(e),()=>{U5.delete(e)}},[]);let _=i?.url??`hanzo`,v=i?.name??`Hanzo AI`,b=r.filter(e=>e.url!==_),x=(l.trim()||s||`partner`).toLowerCase().replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``);if((0,V.useEffect)(()=>{x&&f(`${_}-x-${x}`)},[_,x]),!e)return null;let S=async()=>{if(!o||h)return;let e=x||`partner`,t=d.trim().toLowerCase().replace(/^#+/,``).replace(/[^a-z0-9-]+/g,`-`).replace(/^-|-$/g,``)||`${_}-x-${e}`;g(!0);try{let r=await Die(o,t,[e],p);CV(`chat:rooms:`),K5(),n(`/chat/${r}`)}finally{g(!1)}};return(0,H.jsx)(z,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e5,items:`center`,justify:`center`,p:16,style:{backgroundColor:`var(--team-backdrop, rgba(0, 0, 0, 0.65))`,backdropFilter:`blur(4px)`},onPress:()=>K5(),children:(0,H.jsxs)(z,{width:`100%`,maxW:520,rounded:Q.card,bg:`$panel`,borderWidth:1,borderColor:`$edge`,p:20,gap:16,onPress:e=>e.stopPropagation?.(),"data-testid":`hanzo-connect-modal`,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:12,children:[(0,H.jsxs)(y,{items:`center`,gap:10,children:[(0,H.jsx)(z,{width:32,height:32,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(ym,{size:16,color:`$ink`})}),(0,H.jsxs)(z,{children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`700`,color:`$ink`,children:`Hanzo Connect`}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$soft`,children:`Multi-org shared channels & isolated organization workspaces`})]})]}),(0,H.jsx)(y,{...H5(()=>K5(),`Close Hanzo Connect modal`),px:8,py:4,rounded:Q.field,hoverStyle:{background:`$hover`},children:(0,H.jsx)(a,{fontSize:Z.body,color:`$soft`,children:`✕`})})]}),(0,H.jsx)(y,{bg:`$background`,p:3,rounded:Q.field,borderWidth:1,borderColor:`$edge`,gap:4,children:(0,H.jsxs)(y,{flex:1,...H5(()=>t(`connect`),`Connect organizations tab`),py:7,px:10,rounded:Q.field,items:`center`,justify:`center`,gap:6,bg:e===`connect`?`$panel`:`transparent`,children:[(0,H.jsx)(ym,{size:14,color:e===`connect`?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:e===`connect`?`600`:`500`,color:e===`connect`?`$ink`:`$soft`,children:`Connect Orgs (Shared Channel)`})]})}),(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(z,{gap:14,children:[(0,H.jsxs)(y,{p:12,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`space-between`,gap:8,children:[(0,H.jsxs)(z,{gap:2,children:[(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:`HOST ORGANIZATION`}),(0,H.jsxs)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:[v,` (`,_,`)`]})]}),(0,H.jsxs)(y,{px:8,py:3,rounded:Q.pill,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,gap:5,children:[(0,H.jsx)(Xp,{size:12,color:`$ink`}),(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,children:[`connect:`,x||`org`]})]}),(0,H.jsxs)(z,{gap:2,items:`flex-end`,children:[(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:`PARTNER ORGANIZATION`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:x||`partner`})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Select or enter partner organization slug`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:b.map(e=>{let t=!l.trim()&&s===e.url;return(0,H.jsxs)(y,{...H5(()=>{u(``),c(e.url)},`Select ${e.name}`),px:10,py:5,rounded:Q.pill,bg:t?`$ink`:`$background`,borderWidth:1,borderColor:t?`$ink`:`$edge`,items:`center`,gap:5,children:[t?(0,H.jsx)(Vt,{size:12,color:`$background`}):null,(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:`600`,color:t?`$background`:`$ink`,children:[e.name,` (`,e.url,`)`]})]},e.url)})}),(0,H.jsx)(y,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:l,onChange:e=>u(e.target.value),placeholder:`Or enter external organization slug (e.g. acme, skully, partner)...`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Shared channel name`}),(0,H.jsxs)(y,{items:`center`,gap:6,px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:[(0,H.jsx)(Qp,{size:14,color:`$soft`}),(0,H.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`hanzo-x-partner`,style:{flex:1,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$quiet`,children:`Channel purpose & agent scope`}),(0,H.jsx)(y,{px:10,py:6,rounded:Q.field,bg:`$background`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`Cross-org engineering, shared agents & delivery`,style:{width:`100%`,border:`none`,background:`transparent`,color:`inherit`,fontSize:13,outline:`none`}})})]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,children:[`Both organizations keep strict tenant isolation (separate IAM, KMS secrets, private repos, and billing) while humans and AI agents (@vi, @dev, @mark) collaborate in real time inside #`,d||`${_}-x-${x}`,`.`]}),(0,H.jsxs)(y,{justify:`flex-end`,gap:8,pt:4,children:[(0,H.jsx)(y,{...H5(()=>K5(),`Cancel`),px:12,py:8,rounded:Q.field,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,children:`Cancel`})}),(0,H.jsxs)(y,{...H5(()=>void S(),`Connect and create shared channel`),px:14,py:8,rounded:Q.field,bg:`$ink`,items:`center`,gap:6,children:[(0,H.jsx)(ym,{size:14,color:`$background`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$background`,children:h?`Connecting…`:`Connect & Share Channel`})]})]})]})})]})})}var q5=1120,J5=e=>{let t=e,n=new Set;return{set:e=>{if(e!==t){t=e;for(let e of n)e()}},use:()=>(0,V.useSyncExternalStore)(e=>(n.add(e),()=>n.delete(e)),()=>t,()=>e)}},Y5=J5(0),X5=J5(null),Uie=Y5.set,Z5=Y5.use,Wie=X5.set;X5.use;var Q5=[{id:`chat`,label:`Chat`,icon:dm,path:`/chat`},{id:`bots`,label:`Bots`,icon:bp,path:`/bots`},{id:`tracker`,label:`Tracker`,icon:Tm,path:`/issues`},{id:`crm`,label:`CRM`,icon:Sp,path:`/crm`}],$5=e=>Q5.find(t=>e===t.path||e.startsWith(`${t.path}/`)||t.id===`tracker`&&(e===`/mine`||e.startsWith(`/mine/`)||e===`/projects`||e===`/projects/`||e.startsWith(`/projects/`))),e7={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},t7={backgroundColor:X.railActive},Gie={background:X.alert},Kie=({notices:e,onNotices:t,onSurface:n,account:r})=>{let{pathname:i}=vi(),o=Z5(),s=r?.orgs&&r.orgs.length>0?r.orgs:r?.currentOrg?.name||r?.currentOrg?.displayName?[r.currentOrg]:[];return(0,H.jsxs)(z,{width:44,shrink:0,height:`100%`,items:`center`,justify:`space-between`,pt:6,pb:8,borderRightWidth:1,style:{backgroundColor:X.rail,borderRightColor:X.railRule},"data-parity-key":`shell.rail`,children:[(0,H.jsx)(L_,{flex:1,minH:0,width:`100%`,children:(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:4,children:[s.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:5,"data-parity-key":`shell.orgs`,children:[s.slice(0,5).map(e=>{let t=e.name===r?.currentOrg?.name||s.length===1,n=e.displayName?.trim()||e.name||`Workspace`;return(0,H.jsxs)(Um,{children:[(0,H.jsx)(Wm,{children:(0,H.jsxs)(z,{...H5(()=>r?.onSelectOrg?.(e.name),`${n} organization`),width:32,height:32,rounded:9,items:`center`,justify:`center`,position:`relative`,style:t?t7:void 0,hoverStyle:t?void 0:{background:`$hover`},focusVisibleStyle:e7,children:[t?(0,H.jsx)(z,{position:`absolute`,l:-6,width:3,height:16,rounded:Q.pill,style:{backgroundColor:X.railFgActive}}):null,(0,H.jsx)(yQ,{org:{name:n,logo:e.logo},size:22})]})}),(0,H.jsx)(Km,{children:n})]},e.name||n)}),r?.onConnectOrg?(0,H.jsxs)(Um,{children:[(0,H.jsx)(Wm,{children:(0,H.jsx)(z,{...H5(r.onConnectOrg,`Connect or switch organization`),width:28,height:28,rounded:8,items:`center`,justify:`center`,hoverStyle:{background:`$hover`},focusVisibleStyle:e7,children:(0,H.jsx)(hm,{size:15,color:X.railFg})})}),(0,H.jsx)(Km,{children:`Connect organization`})]}):null]}),(0,H.jsx)(n7,{})]}):null,(0,H.jsxs)(r7,{label:o>0?`${e?`Hide`:`Show`} Activity (${o} unread)`:e?`Hide Activity`:`Show Activity`,pressed:e,onPress:t,children:[(0,H.jsx)(yp,{size:18,color:e?X.railFgActive:X.railFg}),o>0?(0,H.jsx)(z,{position:`absolute`,t:2,r:2,minW:14,height:14,px:3,rounded:Q.pill,items:`center`,justify:`center`,style:Gie,children:(0,H.jsx)(a,{fontSize:9,lineHeight:11,fontWeight:`700`,style:{color:X.panel},children:o})}):null]}),(0,H.jsx)(n7,{}),Q5.map(e=>{let t=$5(i)?.id===e.id;return(0,H.jsx)(r7,{label:e.label,here:t,onPress:()=>n(e.path),children:(0,H.jsx)(e.icon,{size:18,color:t?X.railFgActive:X.railFg})},e.id)})]})}),(0,H.jsxs)(z,{items:`center`,width:`100%`,gap:6,pt:6,children:[r?.onSettings?(0,H.jsx)(r7,{label:`Preferences (⌘,)`,onPress:r.onSettings,children:(0,H.jsx)(Sm,{size:16,color:X.railFg})}):null,(0,H.jsx)(Vie,{...r})]})]})},n7=()=>(0,H.jsx)(Ic,{width:20,my:4,borderColor:`$edge`}),r7=({label:e,here:t=!1,pressed:n,onPress:r,children:i})=>{let a=!!(t||n);return(0,H.jsxs)(Um,{children:[(0,H.jsx)(Wm,{children:(0,H.jsx)(z,{...H5(r,e),"aria-current":t?`page`:void 0,"aria-pressed":n,width:32,height:32,items:`center`,justify:`center`,position:`relative`,rounded:8,style:a?t7:void 0,hoverStyle:a?void 0:{background:`$hover`},focusVisibleStyle:e7,children:i})}),(0,H.jsx)(Km,{children:e})]})},i7=({nav:e,children:t,aside:n})=>{let{pathname:r}=vi(),i=bi(),{who:a,leave:o,depart:s}=DV(),{all:c,current:l,choose:u}=_H(),[d,f]=(0,V.useState)(()=>typeof window>`u`?q5:window.innerWidth),[p,m]=(0,V.useState)(240),[h,g]=(0,V.useState)(!1),[_,v]=(0,V.useState)(!1),[b,x]=(0,V.useState)(!1),S=v5(),C=y5(),w=d>=q5,T=d>=800,E=!!(T&&e&&!h),D=t=>{if(!T&&e&&(r===t||r.startsWith(`${t}/`)))return v(!0);if(T&&e&&h&&(r===t||r.startsWith(`${t}/`))){g(!1);return}i(t)},O=c,k=l??O[0],ee=r.startsWith(`/crm`)?`crm`:`team`,A=e=>{e.id===`crm`?i(`/crm/investors`):e.id===`team`||e.id===`work`?i(`/issues`):e.id===`chat`?i(`/chat`):typeof window<`u`&&(window.location.href=e.href)},j=a?{sub:a.id,name:a.label||a.name,email:a.email,avatar:a.avatar,owner:k?.org??``}:{sub:``,name:``,email:``,owner:``},M={name:k?.url??``,displayName:k?.name??``},N=O.map(e=>({name:e.url,displayName:e.name}));return(0,H.jsxs)(J_,{bg:`$background`,children:[(0,H.jsx)(Bie,{appId:ee,showAppTitle:r.startsWith(`/crm`),currentOrg:M,orgs:N,onSelectOrg:e=>u(e),onSelectApp:A,onNavigate:D,onSettings:()=>Q8(`general`),navSpan:p+1,navOpen:E,onToggleNav:e?()=>{T?g(e=>!e):v(e=>!e)}:void 0,surfaceTitle:$5(r)?.label,user:j}),(0,H.jsxs)(y,{flex:1,minH:0,onLayout:e=>f(e.nativeEvent.layout.width),children:[(0,H.jsx)(Kie,{notices:!!n&&(w?S&&C===`inbox`:b),onNotices:()=>{w?g5(`inbox`):(h5(`inbox`),x(!b))},onSurface:D,account:{user:j,currentOrg:M,orgs:N,onSelectOrg:e=>u(e),onConnectOrg:()=>G5(`connect`),onAddAccount:()=>void s(`another`),onSettings:()=>Q8(`general`),onSignOut:()=>o()}}),E?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z,{width:p,shrink:0,minH:0,style:{backgroundColor:X.sidebar},"data-parity-key":`shell.nav`,children:e}),(0,H.jsx)(qie,{value:p,onChange:m})]}):null,(0,H.jsxs)(y,{flex:1,minW:0,minH:0,pt:0,pb:0,pr:0,gap:0,children:[(0,H.jsx)(a7,{parity:`shell.main`,children:t}),n&&S&&w?(0,H.jsx)(z,{width:304,shrink:0,borderLeftWidth:1,style:{borderLeftColor:X.sidebarRule},children:(0,H.jsx)(a7,{parity:`shell.aside`,children:n})}):null]})]}),(0,H.jsx)(AS,{open:!!n&&!w&&b,onOpenChange:x,children:(0,H.jsx)(NS,{side:`right`,width:304,p:0,bg:`$panel`,children:n})}),(0,H.jsx)(AS,{open:!!e&&_&&!T,onOpenChange:v,children:(0,H.jsx)(NS,{side:`left`,width:240,p:0,style:{backgroundColor:X.sidebar},children:e})}),(0,H.jsx)(Hie,{}),(0,H.jsx)(Xre,{user:j,orgName:M.displayName})]})},a7=({parity:e,children:t})=>(0,H.jsx)(z,{flex:1,minW:0,minH:0,rounded:0,overflow:`hidden`,style:{backgroundColor:X.panel},"data-parity-key":e,children:t}),qie=({value:e,onChange:t})=>{let n=(0,V.useRef)(0),r=(0,V.useRef)(e),i=(0,V.useRef)(!1),a=e=>Math.min(380,Math.max(200,e));return(0,H.jsx)(z,{role:`separator`,"aria-orientation":`vertical`,"aria-label":`Resize the navigator`,"aria-valuenow":e,"aria-valuemin":200,"aria-valuemax":380,tabIndex:0,width:1,shrink:0,position:`relative`,cursor:`col-resize`,style:{backgroundColor:X.sidebarRule},hoverStyle:{bg:`$soft`},focusVisibleStyle:{bg:`$outlineColor`},onPointerDown:t=>{i.current=!0,n.current=t.clientX,r.current=e,t.currentTarget.setPointerCapture?.(t.pointerId)},onPointerMove:e=>{i.current&&t(a(r.current+e.clientX-n.current))},onPointerUp:e=>{i.current=!1,e.currentTarget.releasePointerCapture?.(e.pointerId)},onPointerCancel:()=>{i.current=!1},onKeyDown:n=>{let r=n.shiftKey?1:8;n.key===`ArrowLeft`&&t(a(e-r)),n.key===`ArrowRight`&&t(a(e+r))},children:(0,H.jsx)(z,{position:`absolute`,t:0,b:0,l:-8,r:-8})})},o7={outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},s7={flexDirection:`row`},c7=({title:e,children:t})=>(0,H.jsxs)(z,{flex:1,minH:0,pt:6,pb:8,children:[(0,H.jsx)(y,{height:36,px:12,pb:4,items:`center`,justify:`space-between`,children:(0,H.jsxs)(y,{items:`center`,gap:4,minW:0,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:e}),(0,H.jsx)(Ep,{size:13,color:`$soft`})]})}),t]}),l7=({value:e,onChange:t})=>(0,H.jsxs)(y,{mx:12,height:30,items:`center`,gap:8,px:12,rounded:Q.field,borderWidth:1,borderColor:`$edge`,bg:`$panel`,focusWithinStyle:o7,children:[(0,H.jsx)(_m,{size:16,color:`$soft`}),(0,H.jsx)(C_,{flex:1,unstyled:!0,height:28,borderWidth:0,bg:`transparent`,fontSize:Z.body,color:`$ink`,placeholderTextColor:`$faint`,placeholder:`Search…`,value:e,onChangeText:t})]}),u7=()=>(0,H.jsx)(Ic,{my:6,mx:12,borderColor:`$edge`}),d7=({children:e,count:t,open:n=!0,onToggle:r})=>(0,H.jsxs)(y,{...r?H5(r):{},height:26,items:`center`,justify:`space-between`,px:12,gap:5,children:[(0,H.jsxs)(y,{items:`center`,gap:4,minW:0,flex:1,children:[r?(0,H.jsx)(Jie,{open:n}):null,(0,H.jsx)(a,{fontSize:12,fontWeight:`500`,color:`$soft`,numberOfLines:1,children:e})]}),t===void 0?null:(0,H.jsx)(a,{fontSize:Z.chip,color:`$faint`,children:t})]}),Jie=({open:e=!0})=>(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,rotate:e?`0deg`:`-90deg`,children:(0,H.jsx)(z,{width:7,height:7,borderBottomWidth:1.5,borderRightWidth:1.5,borderColor:`$soft`,rotate:`45deg`,mt:-3})}),f7=({to:e,icon:t,children:n,indent:r})=>{let{pathname:i}=vi(),o=i===e||i.startsWith(`${e}/`);return(0,H.jsx)(y,{asChild:!0,style:o?{...s7,backgroundColor:X.rowActive}:s7,height:r?27:29,items:`center`,gap:8,pl:r?34:10,pr:10,mx:6,rounded:8,hoverStyle:o?void 0:{bg:`$hover`},focusVisibleStyle:o7,children:(0,H.jsxs)(Aa,{to:e,"aria-current":o?`page`:void 0,children:[t?(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,children:t}):null,(0,H.jsx)(a,{fontSize:Z.small,fontWeight:o?`500`:`400`,color:o?`$ink`:`$quiet`,numberOfLines:1,children:n})]})})},Yie=({icon:e,children:t,open:n,onPress:r})=>(0,H.jsxs)(y,{...H5(r),"aria-expanded":n,height:29,items:`center`,gap:8,px:12,mx:4,rounded:Q.field,hoverStyle:{bg:`$hover`},focusVisibleStyle:o7,children:[e?(0,H.jsx)(z,{width:18,height:18,items:`center`,justify:`center`,children:e}):null,(0,H.jsx)(a,{fontSize:Z.row,color:`$quiet`,numberOfLines:1,children:t})]}),Xie=({children:e})=>(0,H.jsxs)(z,{position:`relative`,children:[(0,H.jsx)(z,{position:`absolute`,l:25,t:0,b:0,width:1,bg:`$edge`}),e]}),p7=({children:e})=>(0,H.jsx)(L_,{flex:1,minH:0,children:(0,H.jsx)(z,{pb:12,children:e})}),m7={[CH.backlog]:`backlog`,[CH.todo]:`todo`,[CH.doing]:`progress`,[CH.done]:`done`,[CH.cancelled]:`done`},Zie=[void 0,`urgent`,`high`,`medium`,`low`],h7={urgent:wH.urgent,high:wH.high,medium:wH.medium,low:wH.low},Qie=e=>{let t=e.estimation??0;return t<=0?0:Math.max(0,Math.min(1,(e.reportedTime??0)/t))},g7=e=>({id:e._id,name:TH(e),face:e.avatar??void 0}),$ie=(e,t)=>{let n=[e.assignee,...e.collaborators??[]].filter(e=>!!e),r=new Set,i=[];for(let e of n){if(r.has(e))continue;r.add(e);let n=t.get(e);n&&i.push(g7(n))}return i},eae=(e,t)=>({id:e._id,key:EH(t.project??t.projects.get(e.space),e),title:e.title,description:e.description,projectId:e.space,status:t.columns.get(e.status)??`backlog`,priority:Zie[e.priority]??void 0,labels:t.words.get(e._id)??[],done:Qie(e),people:$ie(e,t.crowd),origin:e.component?tae(t.parts.get(e.component)):void 0,files:e.attachments??0,replies:e.comments??0}),tae=e=>e?{name:e}:void 0,_7=e=>new Map(e.map(e=>[e._id,m7[e.category]??`backlog`])),nae=(e,t)=>async(n,r,i)=>{let a=t??`proj-crm`,[o,s,c]=await Promise.all([YH(e,a),JH(e,a),qH(e,a)]),l=s.find(e=>(m7[e.category]??`backlog`)===n)??s[0];if(!l)throw Error(`this project has no ${n} column`);let u=Math.max(c?.sequence??0,...o.map(e=>e.number))+1,d=i?.priority?h7[i.priority]:0;if(await nU(e,e.account??``,a,{title:r,status:l._id,priority:d,number:u,after:o.find(e=>e.status===l._id)}),i&&(i.description||i.assigneeId||i.labels&&i.labels.length>0)){let t=(await YH(e,a)).find(e=>e.number===u&&e.title===r);if(t&&(await tU(e,e.account??``,t,{...i.description===void 0?{}:{description:i.description},...i.assigneeId===void 0?{}:{assignee:i.assigneeId,collaborators:i.assigneeId?[i.assigneeId]:[]}}),i.labels&&i.labels.length>0))for(let n of i.labels)await e.write(AH(a,e.account??``,xH.tag,{attachedTo:t._id,attachedToClass:xH.issue,collection:`labels`,tag:`tag-${n.toLowerCase()}`,title:n}))}},rae=(e,t)=>({watch(n,r){let i=!0,a=()=>{Promise.all([JH(e,t),YH(e,t),XH(e),ZH(e),QH(e),KH(e)]).then(async([r,a,o,s,c,l])=>{if(!i)return;let u=t&&a.length?await qH(e,t):void 0;if(!i)return;let d=new Map;for(let e of s){let t=d.get(e.attachedTo);t?t.push(e.title):d.set(e.attachedTo,[e.title])}let f={columns:_7(r),crowd:new Map(o.map(e=>[e._id,e])),words:d,parts:new Map(c.map(e=>[e._id,e.label])),project:u,projects:new Map(l.map(e=>[e._id,e]))};n(a.map(e=>eae(e,f)))}).catch(e=>i&&r(e instanceof Error?e:Error(String(e))))};a();let o=e.watch(a);return()=>{i=!1,o()}},add:nae(e,t),async move(n,r,i){let a=await YH(e,t),o=a.find(e=>e._id===n);if(!o)throw Error(`no issue to move`);let s=(await JH(e,o.space)).find(e=>(m7[e.category]??`backlog`)===r);if(!s)throw Error(`no column to move into`);let c=a.filter(e=>e.status===s._id&&e._id!==n),l=i?c.findIndex(e=>e._id===i):c.length,u=l<0?c.length:l;await eU(e,e.account??``,o,s._id,{before:c[u-1],after:c[u]})},async update(n,r){let i=(await YH(e,t)).find(e=>e._id===n);if(!i)return;let a={};if(r.title!==void 0&&(a.title=r.title),r.description!==void 0&&(a.description=r.description),r.priority!==void 0&&(a.priority=r.priority?h7[r.priority]:0),r.done!==void 0){let e=i.estimation&&i.estimation>0?i.estimation:100;a.estimation=e,a.reportedTime=Math.round(Math.max(0,Math.min(1,r.done))*e)}if(r.assigneeId!==void 0){a.assignee=r.assigneeId;let e=(i.collaborators??[]).filter(e=>e!==r.assigneeId);a.collaborators=r.assigneeId?[r.assigneeId,...e]:e}if(r.replies!==void 0&&(a.comments=r.replies),r.status!==void 0){let t=(await JH(e,i.space)).find(e=>(m7[e.category]??`backlog`)===r.status);t&&(a.status=t._id)}if(Object.keys(a).length>0&&await tU(e,e.account??``,i,a),r.labels!==void 0){let t=(await ZH(e)).filter(e=>e.attachedTo===n);for(let n of t)await e.write(MH(n,e.account??``));for(let t of r.labels)await e.write(AH(i.space,e.account??``,xH.tag,{attachedTo:n,attachedToClass:xH.issue,collection:`labels`,tag:`tag-${t.toLowerCase()}`,title:t}))}},async remove(n){let r=(await YH(e,t)).find(e=>e._id===n);r&&await e.write(MH(r,e.account??``))}}),v7=e=>{let{plane:t,current:n}=_H();return(0,V.useMemo)(()=>t&&n?rae(t,e):null,[t,n,e])},y7=e=>{let{plane:t}=_H(),n=SV($H.people(),()=>XH(t),{enabled:!!t}),r=SV($H.projects(),()=>KH(t),{enabled:!!t}),i=e?(r.data??[]).find(t=>t._id===e)?.members:void 0,a=new Map((n.data??[]).map(e=>[e._id,e]));return(i?i.map(e=>a.get(e)):n.data??[]).filter(e=>!!e).map(g7)},b7=e=>e===`refused`?`refused`:e===`homeless`?`nowhere`:`opening`,x7=()=>{let{plane:e}=_H();return SV($H.projects(),()=>KH(e),{enabled:!!e})},iae=e=>{let t=x7();return e?(t.data??[]).find(t=>t._id===e):void 0},aae=/(@[\w.-]+)/g,S7=(e,t)=>e?[{text:e,[t]:!0}]:[],oae=(e,t,n)=>{let r=[{text:e,strong:!0}];return(n?t.split(n):[t]).forEach((e,t)=>{t>0&&r.push(...S7(n,`strong`));for(let t of e.split(aae))t&&(t.startsWith(`@`)?r.push(...S7(t,`mention`)):r.push({text:t}))}),r.map((e,t)=>t===1&&e.text?{...e,text:` ${e.text}`}:e)},sae=(e,t,n)=>{let r=t.get(String(e.modifiedBy??``)),i=r?TH(r):`Somebody`,a=n.get(String(e.attachedTo??``));return{id:e._id,kind:e.attachedToClass===xH.channel||e.attachedToClass===xH.direct||e.attachedToClass===xH.message?`chat`:`task`,actor:{name:i,face:r?.avatar??void 0},line:oae(i,e.body??e.title??``,a),at:e.modifiedOn,place:a,seen:e.isViewed}},cae=()=>{let{plane:e,current:t,standing:n}=_H();return(0,V.useEffect)(()=>{if(!e||!t){let e=b7(n);lU({list:e===`refused`?()=>Promise.reject(Error(`Your workspace is not answering.`)):e===`nowhere`?()=>Promise.resolve([]):()=>new Promise(()=>{}),see:()=>Promise.resolve()});return}let r=t.uuid;lU({async list(){let[t,n,i]=await Promise.all([HH(e,r),XH(e),UH(e,r)]),a=new Map(n.map(e=>[e._id,e]));return t.map(e=>sae(e,a,i))},async see(t){let n=(await HH(e,r)).find(e=>e._id===t);n&&!n.isViewed&&await WH(e,e.account??``,n)}})},[e,t,n]),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(lae,{}),(0,H.jsx)(uae,{})]})},lae=()=>{let e=dU();return(0,V.useEffect)(()=>Uie(e),[e]),null},uae=()=>{let{plane:e}=_H(),t=SV($H.statuses(),()=>JH(e),{enabled:!!e}),n=SV($H.issues(),()=>YH(e),{enabled:!!e}),r=_7(t.data??[]),i=n.data??[],a=i.filter(e=>r.get(e.status)!==`done`).length,o=i.length?Math.round(a/i.length*100):null;return(0,V.useEffect)(()=>Wie(o),[o]),null},dae=36,C7=21,w7=9,T7=18,fae=e=>e.split(/\s+/).slice(0,2).map(e=>e[0]??``).join(``).toUpperCase(),E7=({spans:e,clamp:t,parity:n})=>(0,H.jsx)(a,{"data-parity-key":n,size:Z.body,lineHeight:C7,color:X.mute,numberOfLines:t,children:e.map((e,t)=>(0,H.jsx)(a,{size:Z.body,lineHeight:C7,fontWeight:e.strong?`600`:`400`,color:e.mention?X.alert:e.strong?X.ink:X.mute,children:e.text},t))}),pae=({note:e,onSee:t})=>(0,H.jsxs)(y,{"data-parity-key":`inbox.row`,"data-seen":e.seen?`yes`:`no`,...H5(()=>t(e.id),e.line.map(e=>e.text).join(``)),px:12,py:a5.inset,gap:a5.tight,bg:e.seen?`transparent`:X.card,borderBottomWidth:1,borderColor:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:s5,children:[(0,H.jsxs)(Nh,{"data-parity-key":`inbox.face`,size:dae,children:[e.actor.face?(0,H.jsx)(Ph,{src:e.actor.face,alt:``}):null,(0,H.jsx)(Fh,{bg:r5(e.actor.name).background,children:(0,H.jsx)(a,{size:Z.small,fontWeight:`600`,color:r5(e.actor.name).color,children:fae(e.actor.name)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,gap:a5.tight,children:[(0,H.jsxs)(z,{children:[(0,H.jsx)(E7,{spans:e.line,parity:`inbox.line`}),e.quote?(0,H.jsx)(E7,{spans:e.quote,clamp:1,parity:`inbox.quote`}):null]}),(0,H.jsxs)(y,{"data-parity-key":`inbox.meta`,items:`center`,gap:a5.tight,overflow:`hidden`,children:[(0,H.jsx)(a,{size:Z.small,lineHeight:T7,color:X.dim,children:(0,H.jsx)(BL,{date:new Date(e.at),format:`short`,style:{fontSize:`inherit`,lineHeight:`inherit`,color:`inherit`,whiteSpace:`nowrap`}})}),e.place?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a,{size:Z.small,lineHeight:T7,color:X.dim,children:`•`}),(0,H.jsx)(a,{size:Z.small,lineHeight:T7,color:X.dim,numberOfLines:1,children:e.place})]}):null]})]}),(0,H.jsx)(z,{"data-parity-key":`inbox.lane`,width:w7,shrink:0,pt:6,children:e.seen?null:(0,H.jsx)(z,{"data-parity-key":`inbox.dot`,role:`img`,"aria-label":`unread`,width:w7,height:w7,rounded:Q.pill,bg:X.alert})})]}),mae=12,hae=12,gae=36,_ae=6,vae=17,D7=16,O7=24,yae={all:am,task:Ip,chat:ree},bae={all:`All`,task:`Tasks`,chat:`Chat`},k7=e=>e.line.some(e=>e.mention||e.text.includes(`mentioned`))||(e.quote?.some(e=>e.mention)??!1),A7=({children:e})=>(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,p:12,gap:a5.inset,children:e}),xae=({tab:e,filter:t})=>{let n=uU();if(n.phase===`loading`)return(0,H.jsx)(A7,{children:(0,H.jsx)(Y_,{})});if(n.phase===`failure`)return(0,H.jsxs)(A7,{children:[(0,H.jsx)(a,{size:Z.body,color:X.mute,children:`The inbox is not answering.`}),(0,H.jsx)(a,{size:Z.body,color:X.ink,textDecorationLine:`underline`,...H5(n.reload),focusVisibleStyle:s5,children:`Try again`})]});let r=iU(n.data??[],e).filter(e=>t===`unread`?!e.seen:t!==`mentions`||k7(e));return r.length===0?(0,H.jsx)(A7,{children:(0,H.jsx)(a,{size:Z.body,color:X.dim,children:t===`unread`?`All caught up — no unread notifications.`:t===`mentions`?`No mentions in this view.`:`Nothing here.`})}):(0,H.jsx)(L_,{"data-parity-key":`inbox.list`,flex:1,pt:_ae,children:(0,H.jsx)(z,{role:`list`,children:r.map(e=>(0,H.jsx)(pae,{note:e,onSee:fU},e.id))})})},j7=()=>{let[e,t]=(0,V.useState)(`all`),[n,r]=(0,V.useState)(`all`),i=uU().data??[],o=dU(),s=i.filter(k7).length;return(0,H.jsxs)(z,{"data-parity-key":`inbox.panel`,flex:1,minH:0,children:[(0,H.jsxs)(y,{px:12,pt:mae,items:`center`,justify:`space-between`,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(a,{"data-parity-key":`inbox.title`,size:Z.row,fontWeight:`600`,color:X.ink,children:`Inbox`}),o>0?(0,H.jsx)(y,{px:7,py:2,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`700`,color:X.panel,children:`${o} unread`})}):null]}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[o>0?(0,H.jsx)(y,{...H5(pU,`Mark all notifications as read`),px:7,py:3,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:s5,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`500`,color:X.mute,children:`Mark all read`})}):null,(0,H.jsx)(y,{"data-parity-key":`inbox.close`,...H5(_5,`Close the inbox`),width:O7,height:O7,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:s5,children:(0,H.jsx)(Rn,{size:14,color:X.dim})})]})]}),(0,H.jsxs)(yee,{value:e,onValueChange:e=>t(e),orientation:`horizontal`,flex:1,minH:0,gap:0,mt:hae,children:[(0,H.jsx)(z,{"data-parity-key":`inbox.rail`,borderBottomWidth:1,borderColor:X.rule,children:(0,H.jsx)(bee,{height:gae,self:`stretch`,justify:`flex-start`,items:`stretch`,p:0,pl:a5.tight,gap:a5.tight,bg:`transparent`,rounded:0,children:rU.map(t=>{let n=t===e,r=yae[t],o=t===`all`?0:aU(i,t);return(0,H.jsxs)(See,{"data-parity-key":`inbox.tab.${t}`,value:t,height:`100%`,flexDirection:`row`,px:a5.tight,gap:`$1.5`,items:`center`,justify:`center`,rounded:0,bg:`transparent`,borderBottomWidth:2,borderColor:n?X.accent:`transparent`,activeStyle:{background:`transparent`},hoverStyle:{background:`transparent`},focusStyle:{background:`transparent`},focusVisibleStyle:s5,children:[(0,H.jsx)(r,{size:vae,color:n?X.ink:X.dim}),(0,H.jsx)(a,{size:Z.small,fontWeight:n?`600`:`500`,color:n?X.ink:X.dim,children:bae[t]}),o>0?(0,H.jsx)(z,{"data-parity-key":`inbox.badge`,minW:D7,height:D7,px:4,rounded:Q.pill,items:`center`,justify:`center`,bg:X.alert,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:`600`,color:X.panel,children:o})}):null]},t)})})}),(0,H.jsx)(y,{px:12,py:8,gap:6,items:`center`,borderBottomWidth:1,borderColor:X.rule,children:[[`all`,`All (${i.length})`],[`unread`,`Unread (${o})`],[`mentions`,`Mentions (${s})`]].map(([e,t])=>{let i=n===e;return(0,H.jsx)(y,{...H5(()=>r(e),`Filter ${t}`),px:8,py:3,rounded:Q.pill,bg:i?X.card:`transparent`,borderWidth:1,borderColor:i?X.ink:X.rule,hoverStyle:{background:X.card},focusVisibleStyle:s5,children:(0,H.jsx)(a,{size:Z.chip,fontWeight:i?`600`:`500`,color:i?X.ink:X.mute,children:t})},e)})}),rU.map(t=>(0,H.jsx)(Cee,{value:t,flex:1,minH:0,children:t===e?(0,H.jsx)(xae,{tab:t,filter:n}):null},t))]})]})},Sae=()=>{let{id:e}=Si(),t=z5().data??[],n=R5().data??[],r=x5(e);if(r)return t.find(e=>e.id===r&&e.bot);let i=n.find(t=>t.id===e);return i?C5(i,t):void 0},M7=({person:e,size:t})=>(0,H.jsx)(z,{width:t,height:t,rounded:Q.pill,overflow:`hidden`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,justify:`center`,shrink:0,children:e.avatar?(0,H.jsx)(`img`,{src:e.avatar,alt:e.name,width:t,height:t,style:{width:t,height:t,objectFit:`cover`,display:`block`}}):(0,H.jsx)(a,{fontSize:Math.max(10,t*.42),fontWeight:`600`,color:`$quiet`,children:e.name.slice(0,1).toUpperCase()})});function Cae(){let e=y5(),t=Sae();return!t||e===`inbox`?(0,H.jsx)(j7,{}):(0,H.jsxs)(z,{flex:1,minH:0,px:12,pt:12,pb:12,gap:14,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$quiet`,children:`${t.name} · Agent`}),(0,H.jsx)(y,{...H5(_5,`Close inspector`),width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:X.card},focusVisibleStyle:s5,children:(0,H.jsx)(Rn,{size:14,color:X.dim})})]}),(0,H.jsxs)(z,{items:`center`,gap:6,children:[(0,H.jsx)(M7,{person:t,size:52}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,children:t.name})]})]})}var wae=async(e,t)=>{let n=await UV(tV.dms,{space:e,members:[t.id]});return{id:n.channel.id,kind:`direct`,name:t.name,private:!0,archived:n.channel.archived===!0,members:n.channel.members??[]}},N7=`hanzo.appearance`,P7=`hanzo.chat.preferences`,Tae=new Set([`system`,`light`,`dark`]),F7=new Set([`compact`,`default`,`spacious`]),I7=new Set([`compact`,`default`,`large`]),L7=new Set([`ink`,`iris`,`jade`,`amber`,`coral`,`plum`]),Eae=new Set([`low`,`medium`,`high`]),Dae=new Set([`auto`,`manual`]),R7={theme:`dark`,density:`default`,font:`default`},z7={effort:`medium`,approvalMode:`auto`,allowThirdPartyModels:!0,spokenLanguage:`auto`},B7=new Set,V7=()=>{for(let e of B7)e()};function H7(e){if(!e||typeof e!=`object`)return{...R7};let t=e,n=Tae.has(t.theme)?t.theme:R7.theme,r=F7.has(t.density)?t.density:R7.density,i=I7.has(t.font)?t.font:R7.font,a=L7.has(t.accent)?t.accent:void 0;return a?{theme:n,density:r,font:i,accent:a}:{theme:n,density:r,font:i}}function U7(e){if(!e||typeof e!=`object`)return{...z7};let t=e;return{effort:Eae.has(t.effort)?t.effort:z7.effort,approvalMode:Dae.has(t.approvalMode)?t.approvalMode:z7.approvalMode,allowThirdPartyModels:typeof t.allowThirdPartyModels==`boolean`?t.allowThirdPartyModels:z7.allowThirdPartyModels,spokenLanguage:typeof t.spokenLanguage==`string`&&t.spokenLanguage.trim()?t.spokenLanguage.trim():z7.spokenLanguage}}function W7(){if(typeof window>`u`)return{...R7};try{let e=window.localStorage.getItem(N7);return e?H7(JSON.parse(e)):{...R7}}catch{return{...R7}}}function G7(){if(typeof window>`u`)return{...z7};try{let e=window.localStorage.getItem(P7);return e?U7(JSON.parse(e)):{...z7}}catch{return{...z7}}}function K7(e){return e===`light`||e===`dark`?e:typeof window<`u`&&typeof window.matchMedia==`function`?window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:`dark`}function Oae(e){return e===`compact`?`0.92`:e===`large`?`1.08`:`1`}function q7(e){let t=K7(e.theme);if(typeof document>`u`)return t;let n=document.documentElement;n.dataset.theme=t,n.dataset.density=e.density,n.classList.toggle(`dark`,t===`dark`),n.classList.toggle(`light`,t===`light`),n.style.setProperty(`--hanzo-font-scale`,Oae(e.font)),e.accent&&(n.dataset.accent=e.accent);let r=window.getComputedStyle(n).getPropertyValue(`--background`).trim(),i=document.querySelector(`meta[name="theme-color"]`);return i&&r&&i.setAttribute(`content`,r),t}function J7(e){let t=H7({...W7(),...e});if(typeof window<`u`)try{window.localStorage.setItem(N7,JSON.stringify(t))}catch{}return q7(t),V7(),t}function kae(e){let t=U7({...G7(),...e});if(typeof window<`u`)try{window.localStorage.setItem(P7,JSON.stringify(t))}catch{}return V7(),t}async function Aae(e){if(e&&typeof fetch==`function`)try{let t=await fetch(`https://api.hanzo.ai/v1/account/appearance`,{method:`GET`,headers:{Authorization:`Bearer ${e}`,Accept:`application/json`}});if(!t.ok)return;let n=await t.json();if(!n||typeof n!=`object`)return;let r=n,i={};I7.has(r.font)&&(i.font=r.font),F7.has(r.density)&&(i.density=r.density),L7.has(r.accent)&&(i.accent=r.accent),Object.keys(i).length>0&&J7(i)}catch{}}function Y7(){let[,e]=(0,V.useState)(0);(0,V.useEffect)(()=>{let t=()=>e(e=>e+1);B7.add(t);let n=e=>{(e.key===`hanzo.appearance`||e.key===`hanzo.chat.preferences`)&&(q7(W7()),t())};return window.addEventListener(`storage`,n),()=>{B7.delete(t),window.removeEventListener(`storage`,n)}},[]);let t=W7();return{appearance:t,chat:G7(),effectiveTheme:K7(t.theme),setAppearance:J7,setChat:kae}}var X7=22,jae=44,Z7=198;function Q7({placeholder:e,disabled:t,onSend:n}){let[r,i]=(0,V.useState)(``),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(null),{chat:u,setChat:d}=Y7(),f=u.approvalMode===`auto`,p=r.trim()!==``&&!o&&!t,m=async()=>{if(!p)return;let e=r;s(!0),l(null);try{await n(e),i(``)}catch(e){l(e instanceof Error?e.message:String(e))}finally{s(!1)}},h=Math.min(8,r.split(`
202
- `).length),g=Math.max(jae,Math.min(Z7,h*X7+22));return(0,H.jsxs)(z,{px:24,pb:16,pt:8,gap:6,children:[c?(0,H.jsx)(a,{fontSize:`$1`,style:{color:X.alert},children:c}):null,(0,H.jsxs)(z,{gap:4,px:12,pt:8,pb:8,rounded:18,borderWidth:1,opacity:t?.6:1,style:{backgroundColor:X.composer,borderTopColor:X.composerRule,borderRightColor:X.composerRule,borderBottomColor:X.composerRule,borderLeftColor:X.composerRule},focusWithinStyle:{borderColor:`$bound`},"data-testid":`team-composer`,children:[(0,H.jsx)(nv,{flex:1,unstyled:!0,rows:1,height:g-12,minH:g-12,maxH:Z7,py:4,px:2,borderWidth:0,bg:`transparent`,fontSize:`$3`,lineHeight:X7,color:`$ink`,placeholderTextColor:`$placeholderColor`,placeholder:t??e,value:r,disabled:!!t,"aria-label":e,onChangeText:i,onKeyDown:e=>{e.nativeEvent.key!==`Enter`||e.shiftKey||(e.preventDefault?.(),m())}}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,pt:2,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(z,{width:26,height:26,rounded:13,items:`center`,justify:`center`,hoverStyle:{bg:`$hover`},children:(0,H.jsx)(hm,{size:15,color:`$soft`})}),(0,H.jsxs)(y,{...H5(()=>d({approvalMode:f?`manual`:`auto`}),f?`Switch to manual approval`:`Switch to full access`),height:24,px:7,gap:5,rounded:7,items:`center`,hoverStyle:{bg:`$hover`},"data-testid":`composer-approval-toggle`,children:[f?(0,H.jsx)(sp,{size:13,color:X.composerWarn}):(0,H.jsx)(bm,{size:13,color:`$soft`}),(0,H.jsx)(a,{fontSize:12,fontWeight:`500`,style:{color:f?X.composerWarn:void 0},color:f?void 0:`$soft`,children:f?`Full access`:`Manual approval`})]})]}),(0,H.jsx)(z,{"aria-disabled":!p,...H5(()=>void m(),`Send`),cursor:p?`pointer`:`default`,width:30,height:30,items:`center`,justify:`center`,rounded:15,style:{backgroundColor:X.composerAccent},opacity:p?1:.92,focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(vp,{size:16,color:X.composerAccentInk})})]})]})]})}var Mae=3e5,Nae=e=>{let t=[],n=null,r=``;for(let i of e){let e=Fae(i.at);if(e!==r&&(r=e,n=null,t.push({kind:`day`,id:`day:${e}`,at:i.at})),n&&n.author===i.author&&i.at-Pae(n).at<=Mae){n.messages.push(i);continue}n={id:i.id,author:i.author,at:i.at,messages:[i]},t.push({kind:`run`,...n})}return t},Pae=e=>e.messages[e.messages.length-1],Fae=e=>{let t=new Date(e);return`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}`},Iae=(e,t=Date.now())=>{let n=$7(t)-$7(e);if(n===0)return`Today`;if(n===1)return`Yesterday`;let r=new Date(e),i=r.getFullYear()===new Date(t).getFullYear()?void 0:`numeric`;return r.toLocaleDateString(void 0,{month:`long`,day:`numeric`,year:i})},$7=e=>{let t=new Date(e);return Math.floor((e-t.getTimezoneOffset()*6e4)/864e5)},Lae=e=>new Date(e).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`});function e9({author:e,at:t,messages:n,people:r,reactions:i,me:o,onReact:s,onOpen:c,open:l}){let u=B5(r,e),d=r.find(e=>e.name===u);return(0,H.jsxs)(y,{px:24,pt:12,gap:12,items:`flex-start`,children:[(0,H.jsxs)(Nh,{circular:!0,size:36,children:[d?.avatar?(0,H.jsx)(Ph,{src:d.avatar,alt:``}):null,(0,H.jsx)(Fh,{bg:`$raised`,children:(0,H.jsx)(a,{fontSize:`$2`,color:`$quiet`,children:Pie(u)})})]}),(0,H.jsxs)(z,{flex:1,minW:0,gap:2,children:[(0,H.jsxs)(y,{gap:8,items:`baseline`,children:[(0,H.jsx)(a,{fontSize:`$3`,fontWeight:`600`,color:`$ink`,children:u}),(0,H.jsx)(a,{fontSize:`$1`,color:`$dim`,children:Lae(t)})]}),n.map(e=>(0,H.jsx)(Rae,{message:e,reactions:i.filter(t=>t.message===e.id),me:o,onReact:s,onOpen:c,open:l===e.id},e.id))]})]})}function Rae({message:e,reactions:t,me:n,onReact:r,onOpen:i,open:o}){let s=n9(t),c=!!n&&e.author===n;return(0,H.jsxs)(z,{group:!0,position:`relative`,pr:72,py:2,rounded:`$1`,bg:o?`$hover`:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(z,{self:c?`flex-start`:void 0,px:c?12:0,py:c?6:0,rounded:c?12:0,style:c?{backgroundColor:X.chatUser}:void 0,children:e.lines.map((e,t)=>(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,color:c?void 0:`$ink`,style:c?{color:X.chatUserInk}:void 0,children:die(e).map((e,t)=>e.kind===`text`?(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,color:c?void 0:`$ink`,style:c?{color:X.chatUserInk}:void 0,children:e.value},t):(0,H.jsx)(a,{fontSize:`$3`,lineHeight:22,style:{color:e.kind===`mention`?X.alert:X.accent},fontWeight:e.kind===`mention`?`500`:`400`,...e.kind===`link`?{tag:`a`,href:e.value,target:`_blank`,rel:`noreferrer`}:{},children:e.value},t))},t))}),s.length>0?(0,H.jsx)(y,{gap:4,pt:4,flexWrap:`wrap`,children:s.map(t=>(0,H.jsx)(zae,{emoji:t.emoji,count:t.by.length,mine:t.by.includes(n),onPress:()=>r(e,t.emoji)},t.emoji))}):null,e.replies>0?(0,H.jsxs)(y,{items:`center`,gap:5,pt:4,...H5(()=>i(e)),children:[(0,H.jsx)(um,{size:13,color:X.accent}),(0,H.jsx)(a,{fontSize:`$1`,style:{color:X.accent},children:e.replies===1?`1 reply`:`${e.replies} replies`})]}):null,(0,H.jsxs)(y,{position:`absolute`,t:0,r:8,gap:2,opacity:0,"$group-hover":{opacity:1},focusWithinStyle:{opacity:1},children:[(0,H.jsx)(t9,{label:`React`,onPress:()=>r(e,`👍`),children:(0,H.jsx)(Cm,{size:15,color:`$soft`})}),(0,H.jsx)(t9,{label:`Reply in thread`,onPress:()=>i(e),children:(0,H.jsx)(um,{size:15,color:`$soft`})})]})]})}var t9=({label:e,onPress:t,children:n})=>(0,H.jsx)(z,{width:26,height:26,items:`center`,justify:`center`,rounded:`$1`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,...H5(t,e),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:n}),zae=({emoji:e,count:t,mine:n,onPress:r})=>(0,H.jsxs)(y,{"aria-pressed":n,height:22,items:`center`,gap:4,px:7,rounded:11,borderWidth:1,borderColor:n?`$bound`:`$edge`,bg:n?`$hover`:`$raised`,...H5(r),hoverStyle:{borderColor:`$bound`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:[(0,H.jsx)(a,{fontSize:12,lineHeight:14,children:e}),(0,H.jsx)(a,{fontSize:`$1`,color:n?`$ink`:`$quiet`,children:t})]}),n9=e=>{let t=[];for(let n of e){let e=t.find(e=>e.emoji===n.emoji);e?e.by.push(n.by):t.push({emoji:n.emoji,by:[n.by]})}return t};function r9({room:e,phase:t,error:n,messages:r,people:i,reactions:a,me:o,onRetry:s,onReact:c,onOpen:l,open:u}){return t===`loading`?(0,H.jsx)(a9,{}):t===`failure`?(0,H.jsx)(o9,{error:n,onRetry:s}):r.length===0?(0,H.jsx)(Hae,{room:e}):(0,H.jsx)(Bae,{messages:r,people:i,reactions:a,me:o,onReact:c,onOpen:l,open:u})}function Bae({messages:e,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o}){let s=(0,V.useRef)(null),c=e[e.length-1]?.id;return(0,V.useEffect)(()=>{s.current?.scrollIntoView({block:`end`})},[c]),(0,H.jsx)(z,{flex:1,minH:0,style:{overflowY:`auto`},children:(0,H.jsxs)(z,{pt:4,pb:12,children:[Nae(e).map(e=>e.kind===`day`?(0,H.jsx)(Vae,{at:e.at},e.id):(0,H.jsx)(e9,{author:e.author,at:e.at,messages:e.messages,people:t,reactions:n,me:r,onReact:i,onOpen:a,open:o},e.id)),(0,H.jsx)(`div`,{ref:e=>void(s.current=e)})]})})}var Vae=({at:e})=>(0,H.jsx)(z,{px:24,pt:20,pb:4,children:(0,H.jsx)(z,{height:1,bg:`$edge`,position:`relative`,justify:`center`,children:(0,H.jsx)(a,{position:`absolute`,self:`center`,px:10,style:{backgroundColor:X.panel},fontSize:`$1`,color:`$dim`,children:Iae(e)})})}),i9=({children:e})=>(0,H.jsx)(z,{flex:1,minH:0,items:`center`,justify:`center`,p:24,children:e}),a9=()=>(0,H.jsx)(i9,{children:(0,H.jsx)(Y_,{size:16})}),o9=({error:e,onRetry:t})=>(0,H.jsx)(i9,{children:(0,H.jsx)(MQ,{state:kQ(e),onRetry:t})}),Hae=({room:e})=>(0,H.jsx)(i9,{children:(0,H.jsxs)(z,{gap:6,maxW:340,items:`center`,children:[(0,H.jsx)(a,{fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:e.kind===`direct`?e.name:`#${e.name}`}),(0,H.jsx)(a,{fontSize:`$2`,color:`$dim`,text:`center`,children:e.topic?e.topic:e.kind===`direct`?`The beginning of your conversation.`:`This is the beginning of the channel. Say something.`})]})}),s9=({people:e,size:t=28,show:n=3,ground:r=X.ground})=>{if(e.length===0)return null;let i=e.slice(0,n),o=e.length-i.length,s=Math.round(t*.575);return(0,H.jsxs)(y,{items:`center`,"aria-label":`${e.length} assigned`,children:[i.map((e,n)=>(0,H.jsx)(z,{ml:n===0?0:s-t,rounded:9999,borderWidth:2,style:{backgroundColor:r,borderColor:r},children:(0,H.jsxs)(Nh,{size:t,"aria-label":e.name,children:[e.face?(0,H.jsx)(Ph,{src:e.face,alt:``}):null,(0,H.jsx)(Fh,{children:Uae(e.name)})]})},e.id)),o>0?(0,H.jsxs)(a,{fontSize:`$2`,color:`$quiet`,ml:6,children:[`+`,o]}):null]})},Uae=e=>(e[0]??``).toUpperCase();function Wae({members:e,people:t}){return e.length===0?null:(0,H.jsx)(s9,{people:e.map(e=>({id:e,name:B5(t,e),face:Gae(t,e)})),size:28,show:4,ground:`$panel`})}var Gae=(e,t)=>{let n=t.startsWith(`hanzo:`)?t.slice(6):t;return e.find(e=>e.id===n||e.id===t)?.avatar};function Kae({room:e,parent:t,replies:n,phase:r,error:i,people:o,reactions:s,me:c,onClose:l,onRetry:u,onReact:d,onSend:f}){return(0,H.jsxs)(z,{width:360,shrink:0,minH:0,borderLeftWidth:1,borderLeftColor:`$edge`,children:[(0,H.jsxs)(y,{height:56,items:`center`,px:20,gap:8,children:[(0,H.jsx)(a,{flex:1,fontSize:`$4`,fontWeight:`500`,color:`$ink`,children:`Thread`}),(0,H.jsx)(z,{width:28,height:28,items:`center`,justify:`center`,rounded:`$1`,...H5(l,`Close the thread`),hoverStyle:{background:`$hover`},focusVisibleStyle:{outlineColor:`$outlineColor`,outlineWidth:2,outlineStyle:`solid`},children:(0,H.jsx)(Rn,{size:16,color:`$soft`})})]}),(0,H.jsx)(z,{pb:8,borderBottomWidth:1,borderBottomColor:`$edge`,children:(0,H.jsx)(e9,{author:t.author,at:t.at,messages:[t],people:o,reactions:s,me:c,onReact:d,onOpen:()=>{}})}),(0,H.jsx)(r9,{room:e,phase:r,error:i,messages:n,people:o,reactions:s,me:c,onRetry:u,onReact:d,onOpen:()=>{}}),(0,H.jsx)(Q7,{placeholder:`Reply…`,onSend:f})]})}var qae={"dm-algo":`dm-sci`,"dm-cal":`dm-mana`,"dm-core":`dm-opera`,"dm-db":`dm-data`,"dm-sec":`dm-cyber`};function c9(){let{id:e}=Si(),t=e&&(qae[e]??e),{plane:n,current:r}=_H(),i=R5(),a=z5(),o=x5(t),s=(0,V.useMemo)(()=>o?(a.data??[]).find(e=>e.id===o):void 0,[o,a.data]),c=r?.uuid??``,l=SV(`chat:dm:${c}:${s?.id??`-`}`,()=>wae(c,s),{enabled:!!(n&&s&&c)}),u=(0,V.useMemo)(()=>(i.data??[]).find(e=>e.id===t)??null,[i.data,t]),d=o?l.data??null:u,f=d?C5(d,a.data??[]):void 0,p=kie(d?.id??null),m=p.data??[],h=Aie((0,V.useMemo)(()=>m.map(e=>e.id),[m]));Mie(d?.id??null);let[g,_]=(0,V.useState)(null),v=m.find(e=>e.id===g)??null,b=jie(v?.id??null),x=n?.account??``,S=a.data??[],C=h.data??[],w=(0,V.useCallback)((e,t)=>{if(!n||!d)return;let r=n9(C.filter(t=>t.message===e.id)).find(e=>e.emoji===t),i=C.find(n=>n.message===e.id&&n.emoji===t&&n.by===x);(r&&i?Eie(n,d,i):Tie(n,d,e,t)).then(()=>CV(`chat:reactions:`))},[n,d,C,x]);if(!t)return(0,H.jsx)(Yae,{});if(o){if(a.phase===`failure`)return(0,H.jsx)(o9,{error:a.error,onRetry:a.reload});if(a.phase===`loading`||!n)return(0,H.jsx)(a9,{});if(!s)return(0,H.jsx)(l9,{});if(l.phase===`failure`)return(0,H.jsx)(o9,{error:l.error,onRetry:l.reload});if(!d)return(0,H.jsx)(a9,{})}else if(i.phase===`failure`)return(0,H.jsx)(o9,{error:i.error,onRetry:i.reload});else if(i.phase===`loading`||!n)return(0,H.jsx)(a9,{});return d?(0,H.jsxs)(y,{flex:1,minH:0,children:[(0,H.jsxs)(z,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(Jae,{room:d,people:S,agent:f}),(0,H.jsx)(r9,{room:d,phase:p.phase,error:p.error,messages:m,people:S,reactions:C,me:x,onRetry:p.reload,onReact:w,onOpen:e=>_(e.id),open:g??void 0}),(0,H.jsx)(Q7,{placeholder:d.kind===`direct`?`Message ${O5(d,S)}`:`Message #${d.name}`,onSend:e=>Cie(n,d,e,S)})]}),v?(0,H.jsx)(Kae,{room:d,parent:v,replies:b.data??[],phase:b.phase,error:b.error,people:S,reactions:C,me:x,onClose:()=>_(null),onRetry:b.reload,onReact:w,onSend:e=>wie(n,d,v,e,S)}):null]}):(0,H.jsx)(l9,{})}function Jae({room:e,people:t,agent:n}){let r=Z5(),i=v5(),o=y5();return(0,H.jsx)(z,{borderBottomWidth:1,borderBottomColor:`$edge`,bg:`$panel`,children:(0,H.jsxs)(y,{px:20,py:10,items:`center`,justify:`space-between`,gap:12,children:[n?(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:12,children:[(0,H.jsx)(M7,{person:n,size:34}),(0,H.jsxs)(y,{items:`center`,gap:8,flexWrap:`wrap`,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:n.name}),(0,H.jsx)(y,{px:7,py:2,rounded:Q.field,bg:`$raised`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`500`,color:`$quiet`,children:`Agent`})})]})]}):(0,H.jsxs)(y,{flex:1,minW:0,items:`center`,gap:10,children:[(0,H.jsxs)(y,{items:`center`,gap:6,shrink:0,children:[e.kind===`direct`?null:e.private?(0,H.jsx)(om,{size:16,color:`$quiet`}):(0,H.jsx)(Qp,{size:17,color:`$quiet`}),(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,numberOfLines:1,children:O5(e,t??[])})]}),e.topic?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(z,{width:1,height:14,bg:`$edge`,shrink:0}),(0,H.jsx)(a,{fontSize:Z.small,color:`$dim`,numberOfLines:1,flex:1,children:e.topic})]}):null]}),(0,H.jsxs)(y,{items:`center`,gap:8,shrink:0,children:[n?null:(0,H.jsx)(Wae,{members:e.members,people:t??[]}),(0,H.jsxs)(y,{...H5(()=>g5(`inbox`),`Toggle Inbox drawer`),"aria-pressed":i&&o===`inbox`,px:9,py:5,rounded:Q.field,bg:i&&o===`inbox`?`$hover`:`$raised`,borderWidth:1,borderColor:i&&o===`inbox`?`$bound`:`$edge`,items:`center`,gap:6,hoverStyle:{background:`$hover`},focusVisibleStyle:s5,children:[(0,H.jsx)(yp,{size:13,color:i&&o===`inbox`?`$ink`:`$quiet`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`500`,color:i&&o===`inbox`?`$ink`:`$quiet`,children:`Inbox`}),r>0?(0,H.jsx)(z,{minW:16,height:16,px:4,rounded:Q.pill,items:`center`,justify:`center`,style:{background:X.alert},children:(0,H.jsx)(a,{fontSize:10,lineHeight:12,fontWeight:`700`,style:{color:X.panel},children:r})}):null]})]})]})})}var Yae=()=>(0,H.jsx)(i9,{children:(0,H.jsx)(IQ,{icon:dm,title:`Chat`,description:`Choose a channel or a conversation to read it.`})}),l9=()=>(0,H.jsx)(i9,{children:(0,H.jsx)(IQ,{icon:dm,title:`No such room`,description:`It may have been archived, or it may belong to another space.`})});function Xae(){let{pathname:e}=vi(),t=bi(),[n,r]=(0,V.useState)(``),[i,o]=(0,V.useState)(!0),[s,c]=(0,V.useState)(!0),[l,u]=(0,V.useState)(!0),d=R5(),f=z5().data??[],p=d.data??[],m=n.trim().toLowerCase(),h=m?p.filter(e=>e.name.toLowerCase().includes(m)):p,g=h.filter(e=>e.kind===`channel`),_=g.filter(e=>!e.connectedOrgs||e.connectedOrgs.length===0),v=g.filter(e=>e.connectedOrgs&&e.connectedOrgs.length>0),b=h.filter(e=>e.kind===`direct`),x=S5(f).filter(e=>!m||e.name.toLowerCase().includes(m));return(0,H.jsxs)(c7,{title:$5(e)?.label??`Chat`,children:[(0,H.jsx)(l7,{value:n,onChange:r}),(0,H.jsx)(z,{height:8}),(0,H.jsx)(u7,{}),(0,H.jsxs)(p7,{children:[d.phase===`loading`?(0,H.jsx)(z,{px:12,py:12,children:(0,H.jsx)(Y_,{size:16})}):null,d.phase===`failure`?(0,H.jsx)(d9,{children:`Your rooms could not be read.`}):null,d.phase===`ready`&&p.length===0&&x.length===0?(0,H.jsx)(d9,{children:`No rooms yet.`}):null,d.phase===`ready`&&p.length>0&&h.length===0&&x.length===0?(0,H.jsx)(d9,{children:`Nothing matches “${n.trim()}”.`}):null,_.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(d7,{count:_.length,open:i,onToggle:()=>o(e=>!e),children:`Channels`}),i?_.map(e=>(0,H.jsx)(u9,{room:e,roster:f},e.id)):null]}):null,d.phase===`ready`&&(!m||v.length>0)?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u7,{}),(0,H.jsx)(d7,{count:v.length,open:s,onToggle:()=>c(e=>!e),children:`Hanzo Connect`}),s?(0,H.jsxs)(H.Fragment,{children:[v.map(e=>(0,H.jsx)(u9,{room:e,roster:f},e.id)),(0,H.jsxs)(y,{...H5(()=>G5(`connect`),`Connect external organization channel`),px:12,py:6,mx:4,gap:8,items:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},"data-testid":`hanzo-connect-add-trigger`,children:[(0,H.jsx)(hm,{size:14,color:`$soft`}),(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,fontWeight:`500`,children:`Connect organization…`})]})]}):null]}):null,x.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u7,{}),(0,H.jsx)(d7,{count:x.length,open:l,onToggle:()=>u(e=>!e),children:`Bots`}),l?x.map(e=>{let n=b5(e);return(0,H.jsxs)(y,{...H5(()=>t(n),e.name),px:10,py:6,mx:6,gap:10,items:`center`,rounded:8,bg:`transparent`,hoverStyle:{background:`$hover`},children:[(0,H.jsx)(M7,{person:e,size:26}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`600`,color:`$ink`,numberOfLines:1,flex:1,children:e.name})]},e.id)}):null]}):null,b.length>0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(u7,{}),(0,H.jsx)(d7,{count:b.length,children:`Direct`}),b.map(e=>(0,H.jsx)(u9,{room:e,roster:f},e.id))]}):null]})]})}var u9=({room:e,roster:t})=>{let n=e.connectedOrgs&&e.connectedOrgs.length>0?`${e.name} · ${e.connectedOrgs.join(`, `)}`:O5(e,t);return(0,H.jsx)(f7,{to:`/chat/${e.id}`,icon:(0,H.jsx)(Zae,{room:e}),children:n})},Zae=({room:e})=>e.kind===`direct`?null:e.connectedOrgs&&e.connectedOrgs.length>0?(0,H.jsx)(ym,{size:14,color:`$soft`}):e.private?(0,H.jsx)(om,{size:14,color:`$soft`}):(0,H.jsx)(Qp,{size:16,color:`$soft`}),d9=({children:e})=>(0,H.jsx)(a,{px:12,py:8,fontSize:`$2`,color:`$faint`,children:e});N1();var Qae=`https://api.hanzo.ai`,f9=e=>HV(`${Qae}${e}`),$ae=[`investors`,`funds`,`customers`,`leads`,`feedback`,`errors`,`lists`],p9=[{value:`NEW`,label:`New`,color:`pink`},{value:`SCREENING`,label:`Screening`,color:`cyan`},{value:`MEETING`,label:`Meeting`,color:`blue`},{value:`PROPOSAL`,label:`Proposal`,color:`amber`},{value:`CUSTOMER`,label:`Customer`,color:`green`}],eoe=[{name:`name`,label:`Investor`,type:`text`,metadata:{avatar:`circle`}},{name:`company`,label:`Firm / Fund`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`category`,label:`Category`,type:`select`,metadata:{options:[{value:`vc`,label:`Institutional VC`,color:`blue`},{value:`crypto_vc`,label:`Crypto / Web3 VC`,color:`cyan`},{value:`accredited`,label:`Accredited High-Check`,color:`green`},{value:`angel`,label:`Angel Investor`,color:`amber`},{value:`family_office`,label:`Family Office`,color:`cyan`},{value:`crowdfunding_republic`,label:`Republic / Reg CF`,color:`orange`}]}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:p9}},{name:`email`,label:`Email`,type:`email`},{name:`title`,label:`Title`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`location`,label:`Location`,type:`text`}],toe=[{name:`name`,label:`Fund / Firm`,type:`text`,metadata:{avatar:`square`}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:p9}},{name:`aum`,label:`AUM`,type:`text`},{name:`checkSize`,label:`Check Size`,type:`text`},{name:`primaryEmail`,label:`Primary Email`,type:`email`},{name:`website`,label:`Url`,type:`url`},{name:`location`,label:`Location`,type:`text`}],noe=[{name:`name`,label:`Customer`,type:`text`,metadata:{avatar:`circle`}},{name:`email`,label:`Email`,type:`email`},{name:`product`,label:`Product`,type:`text`},{name:`totalSpent`,label:`Total Spent`,type:`currency`,metadata:{currencyCode:`USD`,decimals:0}},{name:`stage`,label:`Stage`,type:`select`,metadata:{options:p9}},{name:`location`,label:`Location`,type:`text`}],roe=[{name:`name`,label:`Developer`,type:`text`,metadata:{avatar:`circle`}},{name:`handle`,label:`GitHub`,type:`text`},{name:`email`,label:`Email`,type:`email`},{name:`company`,label:`Company`,type:`relation`,metadata:{labelField:`name`,shape:`square`}},{name:`stars`,label:`Stars`,type:`number`},{name:`followers`,label:`Followers`,type:`number`},{name:`location`,label:`Location`,type:`text`}],ioe=[{name:`name`,label:`Audience / Segment`,type:`text`,metadata:{avatar:`square`}},{name:`purpose`,label:`Engine`,type:`text`},{name:`totalCount`,label:`Total Contacts`,type:`number`},{name:`eligibleCount`,label:`Deliverable`,type:`number`},{name:`description`,label:`Description`,type:`text`}],aoe=[{name:`name`,label:`Subject / Summary`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Kind`,type:`text`},{name:`email`,label:`Submitter`,type:`email`},{name:`company`,label:`Organization`,type:`text`},{name:`source`,label:`Source`,type:`text`},{name:`recordCode`,label:`Ref / Report ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Submitted At`,type:`date`}],ooe=[{name:`name`,label:`Exception / Fault`,type:`text`,metadata:{avatar:`square`}},{name:`program`,label:`Class / Type`,type:`text`},{name:`company`,label:`Service / App`,type:`text`},{name:`location`,label:`Origin / File`,type:`text`},{name:`source`,label:`Env & Release`,type:`text`},{name:`recordCode`,label:`Event / Issue ID`,type:`text`,readOnly:!0},{name:`closeDate`,label:`Occurred At`,type:`date`}],soe={name:(0,H.jsx)(Cp,{size:14,color:`$color10`}),domainName:(0,H.jsx)(rm,{size:14,color:`$color10`}),website:(0,H.jsx)(rm,{size:14,color:`$color10`}),createdBy:(0,H.jsx)(jm,{size:14,color:`$color10`}),city:(0,H.jsx)(lm,{size:14,color:`$color10`}),location:(0,H.jsx)(lm,{size:14,color:`$color10`}),country:(0,H.jsx)(Xp,{size:14,color:`$color10`}),employees:(0,H.jsx)(Mm,{size:14,color:`$color10`}),arr:(0,H.jsx)(zp,{size:14,color:`$color10`}),amount:(0,H.jsx)(zp,{size:14,color:`$color10`}),totalSpent:(0,H.jsx)(zp,{size:14,color:`$color10`}),company:(0,H.jsx)(Cp,{size:14,color:`$color10`}),pointOfContact:(0,H.jsx)(jm,{size:14,color:`$color10`}),rating:(0,H.jsx)(Em,{size:14,color:`$color10`}),closeDate:(0,H.jsx)(Tp,{size:14,color:`$color10`}),recordCode:(0,H.jsx)(Qp,{size:14,color:`$color10`}),email:(0,H.jsx)(cm,{size:14,color:`$color10`}),primaryEmail:(0,H.jsx)(cm,{size:14,color:`$color10`}),jobTitle:(0,H.jsx)(Sp,{size:14,color:`$color10`}),title:(0,H.jsx)(Sp,{size:14,color:`$color10`})};function coe(){let[e,t]=(0,V.useState)(``),n=e.trim().toLowerCase(),r=[{to:`investors`,label:`Investors`,icon:(0,H.jsx)(Om,{size:15,color:i5(`investors`)}),group:`Audiences`},{to:`funds`,label:`Funds`,icon:(0,H.jsx)(Sp,{size:15,color:i5(`funds`)}),group:`Audiences`},{to:`customers`,label:`Customers`,icon:(0,H.jsx)(Mm,{size:15,color:i5(`customers`)}),group:`Audiences`},{to:`leads`,label:`Developer Leads`,icon:(0,H.jsx)(Nm,{size:15,color:i5(`leads`)}),group:`Audiences`},{to:`feedback`,label:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Gp,{size:15,color:i5(`feedback`)}),group:`Inbound`},{to:`errors`,label:`Runtime & CLI Errors`,icon:(0,H.jsx)(up,{size:15,color:i5(`errors`)}),group:`Inbound`},{to:`lists`,label:`Lists & Segments`,icon:(0,H.jsx)(tm,{size:15,color:`$soft`}),group:`Engagement`}].filter(e=>!n||e.label.toLowerCase().includes(n)),i=[...new Set(r.map(e=>e.group))];return(0,H.jsxs)(c7,{title:`CRM`,children:[(0,H.jsx)(l7,{value:e,onChange:t}),(0,H.jsx)(z,{height:12}),(0,H.jsx)(p7,{children:i.map((e,t)=>(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(u7,{}):null,(0,H.jsx)(d7,{children:e}),r.filter(t=>t.group===e).map(e=>(0,H.jsx)(f7,{to:`/crm/${e.to}`,icon:e.icon,children:e.label},e.to))]},e))})]})}var m9=e=>[e.city,e.state,e.country].filter(Boolean).join(`, `)||String(e.location??``),h9=e=>typeof e==`string`?e.slice(0,10):``,loe=async(e,t,n)=>{switch(e){case`investors`:{let e=await f9(`/v1/crm/investors?limit=250&category=${n===`all`?`vc`:n}`),t=(e.items??[]).filter(e=>e.name||e.email).map(e=>({id:String(e.id),name:String(e.name??e.email),company:String(e.company??e.fund_name??``),category:String(e.category??``),stage:String(e.stage??``).toUpperCase(),email:String(e.email??``),title:String(e.title??``),checkSize:String(e.check_size??``),location:m9(e)}));return{rows:t,total:e.total??t.length}}case`funds`:{let e=await f9(`/v1/crm/funds?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),stage:String(e.stage??``).toUpperCase(),aum:String(e.aum??``),checkSize:String(e.check_size??``),primaryEmail:String(e.primary_email??``),website:String(e.website??``),location:String(e.location??e.country??``)}));return{rows:t,total:e.total??t.length}}case`customers`:{let e=await f9(`/v1/crm/customers?limit=250`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??e.email??``),email:String(e.email??``),product:String(e.products??e.product??``),totalSpent:Number(e.total_spent??e.amount??0),stage:`CUSTOMER`,location:m9(e)}));return{rows:t,total:e.total??t.length}}case`leads`:{let e=new URLSearchParams({limit:`200`}),[n,r]=t===`all`?[]:t.endsWith(`+`)?[t.slice(0,-1)]:t.split(`-`);n&&e.set(`min_stars`,n===`0`?`1`:n),r&&e.set(`max_stars`,r);let i=await f9(`/v1/crm/leads?${e}`),a=(i.leads??[]).map((e,t)=>({id:String(e.id??e.github_login??t),name:String(e.name??e.github_login??e.email??``),handle:e.github_login?`@${e.github_login}`:``,email:String(e.email??``),company:String(e.company??``),stars:Number(e.total_stars??e.stars??0),followers:Number(e.followers??0),location:String(e.location??e.country??``)}));return{rows:a,total:i.total??a.length}}case`feedback`:{let[e,t]=await Promise.all([f9(`/v1/base/collections/activities/records?perPage=150&sort=-at,-created`),f9(`/v1/base/collections/people/records?perPage=250`)]),n=new Map((t.items??[]).map(e=>[String(e.id),e])),r=(e.items??[]).filter(e=>e.kind===`form`||e.data?.program).map((e,t)=>{let r=e.data??{},i=n.get(String(e.person_id??``))??{};return{id:String(e.id??t),name:String(e.subject??r.need??r.description??``),program:String(r.program??r.kind??`feedback`),email:String(i.email??r.email??``),company:String(i.company??i.name??r.company??``),source:String(r.source??e.channel??``),recordCode:String(r.public_ref??e.source_id??e.id??``),closeDate:h9(e.at??e.created)}});return{rows:r,total:e.totalItems??r.length}}case`errors`:{let e=await f9(`/v1/event/errors?limit=100`),t=(Array.isArray(e)?e:e.items??e.errors??[]).map((e,t)=>{let n=String(e.environment??e.env??``),r=String(e.release??``);return{id:String(e.id??e.event_id??t),name:String(e.value??e.message??e.title??``),program:String(e.type??e.class??e.name??``),company:String(e.app??e.service??e.product??``),location:String(e.culprit??e.origin??e.path??``),source:[n,r].filter(Boolean).join(` · `),recordCode:String(e.issue??e.id??e.event_id??``),closeDate:h9(e.timestamp??e.time??e.created_at)}});return{rows:t,total:t.length}}case`lists`:{let e=await f9(`/v1/crm/lists`),t=(e.items??[]).map(e=>({id:String(e.id),name:String(e.name??``),purpose:String(e.purpose??e.kind??``),totalCount:Number(e.total_count??e.eligible_count??0),eligibleCount:Number(e.eligible_count??e.total_count??0),description:String(e.description??``)}));return{rows:t,total:e.total??t.length}}}},uoe={investors:eoe,funds:toe,customers:noe,leads:roe,feedback:aoe,errors:ooe,lists:ioe},doe={investors:{title:`Investors`,icon:(0,H.jsx)(Om,{size:14})},funds:{title:`Funds`,icon:(0,H.jsx)(Sp,{size:14})},customers:{title:`Customers`,icon:(0,H.jsx)(Mm,{size:14})},leads:{title:`Developer Leads`,icon:(0,H.jsx)(Nm,{size:14})},feedback:{title:`Feedback, Bugs & Forms`,icon:(0,H.jsx)(Gp,{size:14})},errors:{title:`Runtime & CLI Errors`,icon:(0,H.jsx)(up,{size:14})},lists:{title:`Lists & Segments`,icon:(0,H.jsx)(tm,{size:14})}},foe=[{id:`all`,label:`Institutional VCs`},{id:`crypto_vc`,label:`Crypto / Web3 VCs`},{id:`accredited`,label:`Accredited High-Check`},{id:`family_office`,label:`Family Offices`},{id:`crowdfunding_republic`,label:`Republic / Reg CF`}],poe=[`all`,`0-100`,`100-500`,`500-1000`,`1000-5000`,`5000-15000`,`15000+`];function moe(){let{section:e}=Si(),t=$ae.includes(e)?e:`investors`,[n,r]=(0,V.useState)(`all`),[i,o]=(0,V.useState)(`all`),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(null),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(null),h=(0,V.useCallback)(async()=>{f(!0),m(null),u(null);try{c(await loe(t,n,i))}catch(e){c(null),u(e instanceof Error?e.message:`The read failed.`)}finally{f(!1)}},[t,n,i]);(0,V.useEffect)(()=>{h()},[h]);let g=uoe[t],_=(0,V.useMemo)(()=>r5(t),[t]),{title:v,icon:b}=doe[t],x=(e,t,n)=>(0,H.jsx)(y,{height:36,px:`$3`,items:`center`,gap:`$1.5`,borderBottomWidth:1,borderColor:`$borderColor`,bg:`$background`,children:e.map(e=>(0,H.jsx)(W,{size:`xs`,height:24,px:`$2`,rounded:`$2`,chromeless:t!==e.id,bg:t===e.id?`$color3`:`transparent`,onPress:()=>n(e.id),children:(0,H.jsx)(a,{fontSize:11,fontWeight:t===e.id?`600`:`400`,color:t===e.id?`$color12`:`$color10`,children:e.label})},e.id))});return(0,H.jsx)(Lt,{value:`compact`,children:(0,H.jsxs)(z,{flex:1,minH:0,bg:`$background`,children:[(0,H.jsxs)(y,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,gap:`$2`,children:[(0,H.jsxs)(y,{items:`center`,gap:`$2`,children:[(0,H.jsx)(y,{width:22,height:22,rounded:`$2`,items:`center`,justify:`center`,style:{backgroundColor:_.background,color:_.color},children:b}),(0,H.jsx)(a,{fontSize:14,fontWeight:`600`,color:`$color12`,children:v}),s?(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:`${s.total.toLocaleString()} total`}):null]}),(0,H.jsx)(W,{size:`xs`,height:24,px:`$2`,chromeless:!0,startIcon:(0,H.jsx)(gm,{size:12}),onPress:()=>void h(),children:(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:`Refresh`})})]}),t===`leads`?x(poe.map(e=>({id:e,label:e===`all`?`All`:`★ ${e}`})),n,r):null,t===`investors`?x(foe,i,o):null,l?(0,H.jsxs)(z,{p:`$4`,gap:`$2`,children:[(0,H.jsx)(a,{fontSize:13,fontWeight:`600`,color:`$color12`,children:`This list could not be read.`}),(0,H.jsx)(a,{fontSize:12,color:`$color10`,children:l})]}):(0,H.jsxs)(y,{flex:1,minW:0,minH:0,children:[(0,H.jsx)(L_,{flex:1,minW:0,minH:0,children:(0,H.jsx)(I2,{fields:g,records:s?.rows??[],loading:d,editable:!1,selectable:!1,defaultKind:`table`,boardDisabled:!0,fieldIcons:soe,onOpen:e=>m(e),empty:`No records.`},t)}),p?(0,H.jsxs)(z,{width:380,shrink:0,borderLeftWidth:1,borderColor:`$borderColor`,bg:`$background`,children:[(0,H.jsxs)(y,{height:44,px:`$3`,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$borderColor`,children:[(0,H.jsx)(a,{fontSize:13,fontWeight:`600`,color:`$color12`,numberOfLines:1,children:String(p.name||p.email||`Record`)}),(0,H.jsx)(W,{size:`xs`,width:26,height:26,p:`$0`,chromeless:!0,onPress:()=>m(null),children:(0,H.jsx)(Rn,{size:14,color:`$color10`})})]}),(0,H.jsx)(L_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:`$3`,children:(0,H.jsx)(G0,{fields:g,record:p})})})]}):null]})]})})}var hoe=[`issues`,`components`,`milestones`,`templates`],goe=e=>e[0].toUpperCase()+e.slice(1),_oe=()=>{let[e,t]=(0,V.useState)(``),{pathname:n}=vi(),{plane:r}=_H(),i=SV($H.projects(),()=>KH(r),{enabled:!!r}),a=(i.data??[]).filter(t=>t.name.toLowerCase().includes(e.trim().toLowerCase()));return(0,H.jsxs)(c7,{title:$5(n)?.label??`Tracker`,children:[(0,H.jsx)(l7,{value:e,onChange:t}),(0,H.jsx)(z,{height:24}),(0,H.jsx)(f7,{to:`/mine`,icon:(0,H.jsx)(Jp,{size:16,color:`$soft`}),children:`My issues`}),(0,H.jsx)(f7,{to:`/issues`,icon:(0,H.jsx)(Tm,{size:16,color:`$soft`}),children:`All issues`}),(0,H.jsx)(u7,{}),(0,H.jsx)(f7,{to:`/projects`,icon:(0,H.jsx)(pp,{size:16,color:`$soft`}),children:`All projects`}),(0,H.jsx)(u7,{}),(0,H.jsxs)(p7,{children:[(0,H.jsx)(d7,{children:`Your projects`}),i.phase===`loading`?(0,H.jsx)(z,{px:12,py:12,children:(0,H.jsx)(Y_,{size:16})}):null,i.phase===`failure`?(0,H.jsx)(_9,{children:`Your projects could not be read.`}):null,i.phase===`ready`&&a.length===0?(0,H.jsx)(_9,{children:e.trim()?`No project by that name.`:`No projects yet.`}):null,a.map(e=>(0,H.jsx)(voe,{project:e},e._id))]})]})},voe=({project:e})=>{let t=Si().id===e._id,[n,r]=(0,V.useState)(t);return(0,H.jsxs)(z,{children:[(0,H.jsx)(Yie,{open:n,onPress:()=>r(!n),icon:(0,H.jsx)(yoe,{id:e._id}),children:e.name}),n?(0,H.jsx)(Xie,{children:hoe.map(t=>(0,H.jsx)(f7,{to:`/projects/${e._id}/${t}`,indent:!0,children:goe(t)},t))}):null]})},g9=[`M8 1.5 14.5 8 8 14.5 1.5 8Z`,`M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Z`,`M8 1.5 15 14.5H1Z`,`M2 2h12v12H2Z`],yoe=({id:e})=>(0,H.jsx)(`svg`,{width:16,height:16,viewBox:`0 0 16 16`,fill:`none`,"aria-hidden":!0,children:(0,H.jsx)(`path`,{d:g9[n5(e)%g9.length],stroke:i5(e),strokeWidth:1.5,strokeLinejoin:`round`})}),_9=({children:e})=>(0,H.jsx)(a,{px:12,py:8,fontSize:Z.small,color:`$faint`,children:e}),v9=({glyph:e,n:t,label:n})=>t>0?(0,H.jsxs)(y,{items:`center`,gap:4,"aria-label":`${t} ${n}`,children:[e,(0,H.jsx)(a,{fontSize:`$3`,color:`$dim`,children:t})]}):null,y9=[`backlog`,`todo`,`progress`,`done`],b9=[`low`,`medium`,`high`,`urgent`],x9={backlog:`Backlog`,todo:`To do`,progress:`In progress`,done:`Done`},boe={urgent:1,high:2,medium:3,low:4},S9=(e,t)=>t&&e.toLowerCase()===t?$re(boe[t]):r5(e),C9={backlog:t5.backlog,todo:t5.todo,progress:t5.doing,done:t5.done},w9={arc:X.accent,track:X.rule},T9=({done:e,size:t=16,width:n=2})=>{let r=Math.min(1,Math.max(0,e)),i=(t-n)/2,a=2*Math.PI*i;return(0,H.jsxs)(`svg`,{width:t,height:t,viewBox:`0 0 ${t} ${t}`,role:`img`,"aria-label":`${Math.round(r*100)}% done`,children:[(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:w9.track,strokeWidth:n}),r>0?(0,H.jsx)(`circle`,{cx:t/2,cy:t/2,r:i,fill:`none`,stroke:w9.arc,strokeWidth:n,strokeLinecap:`round`,strokeDasharray:`${a*r} ${a}`,transform:`rotate(-90 ${t/2} ${t/2})`}):null]})},E9=12,xoe=48,Soe=({issue:e,dragging:t,onOpen:n,...r})=>{let i=e.priority?[woe(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(z,{"data-slot":`issue`,"data-issue":e.id,bg:`$raised`,rounded:Q.card,overflow:`hidden`,opacity:t?.4:1,cursor:n?`pointer`:`grab`,hoverStyle:{background:`$hover`},role:`article`,tabIndex:0,"aria-label":`${e.key} ${e.title}`,onPress:()=>n?.(e),...Toe(r),children:[(0,H.jsxs)(z,{p:E9,gap:a5.tight,children:[e.cover?(0,H.jsx)(co,{src:e.cover,alt:``,width:`100%`,aspectRatio:1.44,rounded:`$1`,mb:4}):null,(0,H.jsx)(y,{items:`center`,justify:`space-between`,gap:6,children:(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$dim`,children:e.key})}),(0,H.jsx)(a,{fontSize:Z.body,lineHeight:20,color:`$ink`,style:Doe,children:e.title}),i.length>0?(0,H.jsx)(y,{gap:a5.tight,flexWrap:`wrap`,children:i.map(t=>{let{background:n,color:r}=S9(t,e.priority);return(0,H.jsx)(Hh,{variant:`default`,style:{...Coe,backgroundColor:n},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)})}):null,e.done!==void 0||e.origin?(0,H.jsxs)(y,{items:`center`,gap:`$4`,mt:`$2`,children:[e.done===void 0?null:(0,H.jsxs)(y,{items:`center`,gap:4,children:[(0,H.jsx)(T9,{done:e.done}),(0,H.jsxs)(a,{fontSize:Z.body,color:`$soft`,children:[Math.round(e.done*100),`%`]})]}),e.origin?(0,H.jsx)(Eoe,{name:e.origin.name,mark:e.origin.mark}):null]}):null]}),(0,H.jsx)(Ic,{}),(0,H.jsxs)(y,{height:xoe,px:E9,items:`center`,justify:`space-between`,children:[(0,H.jsx)(s9,{people:e.people}),(0,H.jsxs)(y,{items:`center`,gap:`$3`,children:[(0,H.jsx)(v9,{glyph:(0,H.jsx)(mm,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(v9,{glyph:(0,H.jsx)(um,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]})]})]})},Coe={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},woe=e=>e[0].toUpperCase()+e.slice(1),Toe=e=>({draggable:!0,...e}),Eoe=({name:e,mark:t})=>(0,H.jsxs)(y,{items:`center`,gap:6,children:[t?(0,H.jsx)(co,{src:t,alt:``,width:20,height:20,rounded:9999}):(0,H.jsx)(y,{width:20,height:20,rounded:9999,bg:`$edge`,items:`center`,justify:`center`,children:(0,H.jsx)(a,{fontSize:`$1`,color:`$quiet`,children:e[0]?.toUpperCase()})}),(0,H.jsx)(a,{fontSize:`$2`,color:`$quiet`,children:e})]}),Doe={display:`-webkit-box`,WebkitBoxOrient:`vertical`,WebkitLineClamp:3,overflow:`hidden`},Ooe=({column:e,drag:t,over:n,onOver:r,onDrop:i,onAdd:o,onOpen:s,onLift:c,onLand:l})=>{let u=t=>n=>{n.preventDefault(),n.stopPropagation(),i(e.status,t)},d=t=>n=>{n.preventDefault(),r(e.status,t)};return(0,H.jsxs)(z,{"data-slot":`column`,"data-status":e.status,width:208,shrink:0,gap:a5.tight,role:`list`,"aria-label":e.name,onDragOver:d(`end`),onDrop:u(),children:[(0,H.jsxs)(y,{items:`center`,gap:a5.tight,height:24,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:C9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...o5,children:e.name}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$dim`,children:[`– `,e.issues.length]}),(0,H.jsx)(y,{flex:1}),o?(0,H.jsxs)(jg,{children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`${e.name} actions`,children:(0,H.jsx)(lp,{size:14})})}),(0,H.jsx)(Lg,{align:`end`,children:(0,H.jsx)(Vg,{onSelect:()=>o(e.status),children:`Add issue`})})]}):null]}),o?(0,H.jsx)(W,{variant:`ghost`,height:36,width:`100%`,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`,rounded:Q.card,"aria-label":`Add issue to ${e.name}`,onPress:()=>o(e.status),children:(0,H.jsx)(hm,{size:16})}):null,e.issues.map(e=>(0,H.jsxs)(z,{role:`listitem`,gap:a5.tight,onDragOver:d(e.id),onDrop:u(e.id),children:[t&&n===e.id?(0,H.jsx)(D9,{height:t.cover?260:176}):null,(0,H.jsx)(Soe,{issue:e,dragging:t?.id===e.id,onOpen:s,onDragStart:()=>c(e),onDragEnd:l})]},e.id)),t&&n===`end`?(0,H.jsx)(D9,{height:t.cover?260:176}):null,(0,H.jsx)(z,{flex:1,minH:24})]})},D9=({height:e})=>(0,H.jsx)(z,{height:e,rounded:Q.card,borderWidth:1,borderStyle:`dashed`,borderColor:`$edge`}),O9=e=>y9.map(t=>({status:t,name:x9[t],issues:e.filter(e=>e.status===t)})),k9=(e,t,n,r)=>{let i=e.find(e=>e.id===t);if(!i||i.status===n&&r===void 0&&koe(e,n)?.id===t||t===r)return e;let a=e.filter(e=>e.id!==t),o={...i,status:n},s=r?a.findIndex(e=>e.id===r):-1;if(s<0){let e=a.map(e=>e.status===n).lastIndexOf(!0);return A9(a,e<0?a.length:e+1,o)}return A9(a,s,o)},A9=(e,t,n)=>[...e.slice(0,t),n,...e.slice(t)],koe=(e,t)=>e.filter(e=>e.status===t).at(-1),j9=16,M9=24,Aoe=({source:e,only:t,onOpen:n,onCreateIn:r})=>{let[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)(0);(0,V.useEffect)(()=>(a(null),s(null),e.watch(e=>{a(e),s(null)},s)),[e,f]);let m=(0,V.useCallback)((t,n)=>{d(null);let r=c;l(null),r&&i&&(a(k9(i,r.id,t,n)),e.move(r.id,t,n).catch(s))},[c,i,e]),h=e.add?.bind(e),g=r??(h?e=>{h(e,`New issue`).catch(s)}:void 0);if(o)return(0,H.jsx)(Noe,{why:o.message,onRetry:()=>p(e=>e+1)});if(!i)return(0,H.jsx)(joe,{});if(i.length===0)return(0,H.jsx)(Moe,{onAdd:g&&(()=>g(`backlog`))});let _=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i;return(0,H.jsx)(Mt,{horizontal:!0,contentContainerStyle:{p:M9,gap:j9,shrink:0},children:O9(_).map(e=>(0,H.jsx)(Ooe,{column:e,drag:c,over:u?.status===e.status?u.before:null,onOver:(e,t)=>d({status:e,before:t}),onDrop:m,onAdd:g,onOpen:n,onLift:l,onLand:()=>{l(null),d(null)}},e.status))})},joe=()=>(0,H.jsx)(y,{p:M9,gap:j9,"aria-busy":!0,"aria-label":`Loading issues`,children:[0,1,2,3].map(e=>(0,H.jsxs)(z,{width:208,gap:`$2`,children:[(0,H.jsx)(LS,{height:12,width:96}),(0,H.jsx)(LS,{height:36}),[0,1,2].map(e=>(0,H.jsx)(LS,{height:176},e))]},e))}),Moe=({onAdd:e})=>(0,H.jsx)(z,{p:M9,items:`flex-start`,children:(0,H.jsx)(IQ,{icon:nm,title:`No issues yet`,description:`Issues you open appear here, one column per status.`,primary:e?{label:`New issue`,onPress:e}:void 0})}),Noe=({why:e,onRetry:t})=>(0,H.jsxs)(z,{p:M9,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:e}),(0,H.jsx)(W,{variant:`outline`,size:`sm`,onPress:t,children:`Try again`})]}),Poe=()=>new Promise(()=>{}),N9=e=>({watch(t,n){return e===`refused`&&n(Error(`Your workspace is not answering.`)),e===`nowhere`&&t([]),()=>{}},move:Poe}),P9=24,Foe=20,Ioe=20,Loe=8,Roe=28,zoe=20,Boe=36,F9=[{id:`kanban`,label:`Kanban`,icon:em},{id:`list`,label:`List`,icon:am},{id:`timeline`,label:`Timeline`,icon:wp}],Voe=({trail:e,title:t,base:n,here:r,people:i,only:o,onOnly:s,onAdd:c})=>(0,H.jsxs)(z,{"data-parity-key":`board.head`,pt:Foe,children:[(0,H.jsxs)(y,{px:P9,height:Ioe,items:`center`,gap:8,children:[(0,H.jsx)(Hoe,{steps:e}),(0,H.jsx)(y,{flex:1,minW:0}),i.length>0?(0,H.jsx)(y,{rounded:Q.pill,bg:`$hover`,px:6,py:2,items:`center`,children:(0,H.jsx)(s9,{people:i,size:24,show:4,ground:X.card})}):null,c?(0,H.jsx)(Koe,{onAdd:c}):null]}),(0,H.jsx)(z,{height:Loe}),(0,H.jsx)(y,{px:P9,height:Roe,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.title,fontWeight:`500`,color:`$ink`,children:t})}),(0,H.jsx)(z,{height:zoe}),(0,H.jsxs)(y,{px:18,height:Boe,items:`flex-end`,gap:4,children:[F9.map(e=>(0,H.jsxs)(Woe,{to:e.id===`kanban`?n:`${n}/${e.id}`,here:e.id===r,children:[(0,H.jsx)(e.icon,{size:16,color:e.id===r?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.row,color:e.id===r?`$ink`:`$soft`,children:e.label})]},e.id)),(0,H.jsx)(y,{flex:1,minW:0}),(0,H.jsx)(Goe,{only:o,onOnly:s}),c?(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,height:28,mb:3,px:10,items:`center`,gap:6,rounded:Q.field,style:{backgroundColor:X.accent},focusVisibleStyle:s5,"aria-label":`New issue`,onPress:c,children:[(0,H.jsx)(hm,{size:14,color:X.ground}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,style:{color:X.ground},children:`New issue`})]}):null]}),(0,H.jsx)(Ic,{borderColor:`$edge`})]}),Hoe=({steps:e})=>(0,H.jsx)(y,{items:`center`,gap:8,minW:0,children:e.map((e,t)=>(0,H.jsxs)(y,{items:`center`,gap:8,minW:0,children:[t>0?(0,H.jsx)(a,{fontSize:Z.small,color:`$faint`,children:`/`}):null,e.to?(0,H.jsx)(y,{asChild:!0,style:Uoe,rounded:Q.field,focusVisibleStyle:s5,children:(0,H.jsx)(Aa,{to:e.to,children:(0,H.jsx)(a,{fontSize:Z.small,color:`$soft`,numberOfLines:1,hoverStyle:{color:`$ink`},children:e.label})})}):(0,H.jsx)(a,{fontSize:Z.small,numberOfLines:1,"aria-current":`page`,style:{color:X.accent},children:e.label})]},`${e.label}-${t}`))}),Uoe={flexDirection:`row`,alignItems:`center`},Woe=({to:e,here:t,children:n})=>(0,H.jsx)(z,{asChild:!0,style:{alignItems:`center`},rounded:Q.field,focusVisibleStyle:s5,children:(0,H.jsxs)(Aa,{to:e,"aria-current":t?`page`:void 0,children:[(0,H.jsx)(y,{height:32,px:6,items:`center`,gap:8,children:n}),(0,H.jsx)(z,{height:2,width:`100%`,rounded:Q.pill,style:{backgroundColor:t?X.accent:`transparent`}})]})}),Goe=({only:e,onOnly:t})=>{let n=new Set(e),r=r=>t(n.has(r)?e.filter(e=>e!==r):[...e,r]);return(0,H.jsxs)(jg,{children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,height:32,px:8,items:`center`,gap:8,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:s5,"aria-label":`Filter issues`,children:[(0,H.jsx)(Sm,{size:16,color:e.length?`$ink`:`$soft`}),(0,H.jsx)(a,{fontSize:Z.row,color:e.length?`$ink`:`$soft`,children:e.length?`Filter · ${e.length}`:`Filter`})]})}),(0,H.jsxs)(Lg,{align:`end`,children:[(0,H.jsx)(i_,{children:`Priority`}),b9.map(e=>(0,H.jsx)(Hg,{checked:n.has(e),onCheckedChange:()=>r(e),children:(0,H.jsx)(a,{...o5,fontSize:Z.small,children:e})},e)),e.length?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a_,{}),(0,H.jsx)(Vg,{onSelect:()=>t([]),children:`Show every priority`})]}):null]})]})},Koe=({onAdd:e})=>(0,H.jsxs)(jg,{children:[(0,H.jsx)(Ng,{asChild:!0,children:(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,width:24,height:24,items:`center`,justify:`center`,rounded:Q.field,hoverStyle:{background:`$hover`},focusVisibleStyle:s5,"aria-label":`Board actions`,children:(0,H.jsx)(Vp,{size:16,color:`$soft`})})}),(0,H.jsx)(Lg,{align:`end`,children:(0,H.jsx)(Vg,{onSelect:e,children:`New issue`})})]}),I9=[`Backend`,`Frontend`,`Devops`,`Feature`,`Design`,`Sales`,`Marketing`,`QA`,`Research`],qoe=[0,.25,.5,.75,1],L9=e=>e[0].toUpperCase()+e.slice(1);function Joe({issue:e,source:t,people:n,onClose:r}){let[i,o]=(0,V.useState)(e.title),[s,c]=(0,V.useState)(e.description??``),[l,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(!1);(0,V.useEffect)(()=>{o(e.title),c(e.description??``)},[e.id,e.title,e.description]);let p=n=>{t.update?t.update(e.id,n):n.status&&t.move(e.id,n.status),f(!0),setTimeout(()=>f(!1),1200)},m=()=>{let t=i.trim()||e.title;p({title:t,description:s.trim()})},h=t=>{let n=e.labels.includes(t)?e.labels.filter(e=>e!==t):[...e.labels,t];p({labels:n})},g=()=>{let t=l.trim();t&&(e.labels.includes(t)||p({labels:[...e.labels,t]}),u(``))},_=e.people[0]?.id??null;return(0,H.jsxs)(z,{"data-slot":`issue-drawer`,width:420,shrink:0,borderLeftWidth:1,borderColor:`$edge`,bg:`$panel`,height:`100%`,children:[(0,H.jsxs)(y,{height:48,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,style:{backgroundColor:C9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:e.key}),e.origin?(0,H.jsx)(y,{px:8,height:20,rounded:9999,bg:`$raised`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.chip,color:`$soft`,children:e.origin.name})}):null,d?(0,H.jsxs)(y,{items:`center`,gap:4,px:6,py:2,rounded:Q.pill,bg:`$hover`,children:[(0,H.jsx)(Vt,{size:11,color:`$ink`}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$ink`,children:`Saved`})]}):null]}),(0,H.jsxs)(y,{items:`center`,gap:4,children:[t.remove?(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Delete issue`,onPress:()=>{t.remove?.(e.id),r()},children:(0,H.jsx)(lee,{size:14,color:`$soft`})}):null,(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close issue drawer`,onPress:r,children:(0,H.jsx)(Rn,{size:15,color:`$soft`})})]})]}),(0,H.jsx)(L_,{flex:1,minH:0,children:(0,H.jsxs)(z,{p:16,gap:16,children:[(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Title`}),(0,H.jsx)(C_,{height:32,value:i,onChangeText:o,onBlur:m,fontSize:13,fontWeight:`600`,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Specification & Notes`}),(0,H.jsx)(W,{size:`xs`,height:22,px:8,rounded:Q.field,style:{backgroundColor:X.accent},onPress:m,children:(0,H.jsx)(a,{fontSize:11,fontWeight:`600`,style:{color:X.ground},children:`Save`})})]}),(0,H.jsx)(C_,{height:32,value:s,onChangeText:c,onBlur:m,placeholder:`Add acceptance criteria, PR links, or technical context...`,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsx)(Ic,{borderColor:`$edge`}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Workflow Status`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:y9.map(t=>{let n=e.status===t;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:28,rounded:Q.field,items:`center`,gap:6,bg:n?`$hover`:`$raised`,borderWidth:1,borderColor:n?`$ink`:`$edge`,focusVisibleStyle:s5,onPress:()=>p({status:t}),children:[(0,H.jsx)(z,{width:7,height:7,rounded:9999,style:{backgroundColor:C9[t]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:n?`700`:`500`,color:n?`$ink`:`$soft`,children:x9[t]})]},t)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Priority`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:b9.map(t=>{let n=e.priority===t,{background:r,color:i}=S9(L9(t),t);return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:n?`$ink`:`transparent`,style:{backgroundColor:r},onPress:()=>p({priority:n?null:t}),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:i},children:L9(t)})},t)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Completion Progress`}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(T9,{done:e.done??0}),(0,H.jsxs)(a,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round((e.done??0)*100),`%`]})]})]}),(0,H.jsx)(y,{gap:6,children:qoe.map(t=>{let n=Math.round(t*100),r=Math.round((e.done??0)*100)===n;return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,flex:1,height:26,rounded:Q.field,items:`center`,justify:`center`,bg:r?`$hover`:`$raised`,borderWidth:1,borderColor:r?`$ink`:`$edge`,onPress:()=>p({done:t}),children:(0,H.jsxs)(a,{fontSize:Z.chip,fontWeight:r?`700`:`500`,color:r?`$ink`:`$soft`,children:[n,`%`]})},n)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(jm,{size:12,color:`$dim`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Assignee`})]}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:n.slice(0,10).map(e=>{let t=_===e.id;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:28,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>p({assigneeId:e.id}),children:[(0,H.jsx)(s9,{people:[e],size:18,show:1}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(z,{gap:8,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(see,{size:12,color:`$dim`}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Labels`})]}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:I9.map(t=>{let n=e.labels.includes(t),{background:r,color:i}=S9(t);return(0,H.jsx)(Hh,{variant:`default`,style:{minHeight:22,height:22,paddingLeft:9,paddingRight:9,borderRadius:9999,cursor:`pointer`,backgroundColor:n?r:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:n?i:X.rule,opacity:n?1:.7},onClick:()=>h(t),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:n?i:X.mute},children:n?`✓ ${t}`:t})},t)})}),(0,H.jsxs)(y,{gap:6,children:[(0,H.jsx)(C_,{flex:1,height:26,fontSize:11,placeholder:`Add custom label...`,value:l,onChangeText:u,bg:`$raised`,borderColor:`$edge`}),(0,H.jsx)(W,{size:`xs`,height:26,px:10,variant:`outline`,onPress:g,children:(0,H.jsx)(hm,{size:12})})]})]})]})})]})}function Yoe({initialStatus:e=`backlog`,people:t,onCreate:n,onClose:r}){let[i,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(e),[d,f]=(0,V.useState)(`medium`),[p,m]=(0,V.useState)(t[0]?.id??null),[h,g]=(0,V.useState)([`Feature`]),[_,v]=(0,V.useState)(!1),b=e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},x=async()=>{let e=i.trim();if(e&&!_){v(!0);try{await n(l,e,{description:s.trim()||void 0,priority:d,assigneeId:p,labels:h}),r()}finally{v(!1)}}};return(0,H.jsx)(z,{position:`fixed`,t:0,l:0,r:0,b:0,z:1e3,bg:X.ground,items:`center`,justify:`center`,p:16,children:(0,H.jsxs)(z,{width:`100%`,maxW:520,rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$panel`,overflow:`hidden`,children:[(0,H.jsxs)(y,{height:46,px:16,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:`$edge`,children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(bp,{size:15,color:`$ink`}),(0,H.jsx)(a,{fontSize:Z.body,fontWeight:`700`,color:`$ink`,children:`Create New Issue`})]}),(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Close modal`,onPress:r,children:(0,H.jsx)(Rn,{size:15,color:`$soft`})})]}),(0,H.jsxs)(z,{p:16,gap:14,children:[(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Issue Title`}),(0,H.jsx)(C_,{autoFocus:!0,placeholder:`e.g. Wire real-time webhook retry metrics in hanzo/cloud`,value:i,onChangeText:o,fontSize:13,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Description & Acceptance Criteria`}),(0,H.jsx)(C_,{placeholder:`Context, repository, and target milestone...`,value:s,onChangeText:c,fontSize:12,bg:`$raised`,borderColor:`$edge`})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Status`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:y9.map(e=>{let t=l===e;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:26,rounded:Q.field,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>u(e),children:[(0,H.jsx)(z,{width:7,height:7,rounded:9999,style:{backgroundColor:C9[e]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:x9[e]})]},e)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Priority`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:b9.map(e=>{let t=d===e,{background:n,color:r}=S9(L9(e),e);return(0,H.jsx)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:10,height:24,rounded:Q.pill,items:`center`,borderWidth:1,borderColor:t?`$ink`:`transparent`,style:{backgroundColor:n},onPress:()=>f(e),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:r},children:L9(e)})},e)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Assign to a team member`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:t.slice(0,8).map(e=>{let t=p===e.id;return(0,H.jsxs)(y,{role:`button`,tabIndex:0,cursor:`pointer`,px:8,height:26,rounded:Q.pill,items:`center`,gap:6,bg:t?`$hover`:`$raised`,borderWidth:1,borderColor:t?`$ink`:`$edge`,onPress:()=>m(e.id),children:[(0,H.jsx)(s9,{people:[e],size:16,show:1}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:t?`700`:`500`,color:t?`$ink`:`$soft`,children:e.name.split(` `)[0]})]},e.id)})})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,color:`$dim`,...o5,children:`Labels`}),(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:I9.slice(0,6).map(e=>{let t=h.includes(e),{background:n,color:r}=S9(e);return(0,H.jsx)(Hh,{variant:`default`,style:{minHeight:20,height:20,paddingLeft:8,paddingRight:8,borderRadius:9999,cursor:`pointer`,backgroundColor:t?n:`transparent`,borderWidth:1,borderStyle:`solid`,borderColor:t?r:X.rule},onClick:()=>b(e),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:t?r:X.mute},children:e})},e)})})]})]}),(0,H.jsxs)(y,{px:16,py:12,items:`center`,justify:`flex-end`,gap:8,borderTopWidth:1,borderColor:`$edge`,bg:`$raised`,children:[(0,H.jsx)(W,{size:`sm`,variant:`ghost`,onPress:r,children:`Cancel`}),(0,H.jsx)(W,{size:`sm`,style:{backgroundColor:X.accent},disabled:!i.trim()||_,onPress:()=>void x(),children:(0,H.jsx)(a,{fontSize:12,fontWeight:`600`,style:{color:X.ground},children:_?`Creating…`:`Create issue`})})]})]})})}var Xoe={minHeight:18,height:18,paddingHorizontal:8,borderRadius:9999},Zoe=e=>e[0].toUpperCase()+e.slice(1),R9=e=>y9[(y9.indexOf(e)+1)%y9.length]??`backlog`,Qoe=({source:e,only:t,mine:n,onOpen:r,onCreateIn:i})=>{let[o,s]=(0,V.useState)(null),[c,l]=(0,V.useState)(null),[u,d]=(0,V.useState)(0);(0,V.useEffect)(()=>(s(null),l(null),e.watch(e=>{s(e),l(null)},l)),[e,u]);let f=e.add?.bind(e),p=i??(f?e=>void f(e,`New issue`).catch(l):void 0),m=t=>{if(!o)return;let n=R9(t.status);s(k9(o,t.id,n)),e.move(t.id,n).catch(l)};if(c)return(0,H.jsxs)(z,{p:24,gap:`$3`,items:`flex-start`,role:`alert`,children:[(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:c.message}),(0,H.jsx)(W,{variant:`outline`,size:`sm`,onPress:()=>d(e=>e+1),children:`Try again`})]});if(!o)return(0,H.jsx)(z,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading issue list`,children:[0,1,2,3,4,5].map(e=>(0,H.jsx)(LS,{height:44},e))});let h=t?.length?o.filter(e=>e.priority&&t.includes(e.priority)):o,g=n?h.filter((e,t)=>t%2==0||h.length<=6):h;return g.length===0?(0,H.jsx)(z,{p:24,items:`flex-start`,children:(0,H.jsx)(IQ,{icon:am,title:`No matching issues`,description:`Issues appear here grouped by workflow status.`,primary:p?{label:`New issue`,onPress:()=>p(`backlog`)}:void 0})}):(0,H.jsx)(L_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:24,gap:20,children:O9(g).map(e=>(0,H.jsxs)(z,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(y,{px:16,height:40,items:`center`,gap:a5.tight,bg:`$panel`,borderBottomWidth:+(e.issues.length>0),borderColor:`$edge`,children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:C9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...o5,children:e.name}),(0,H.jsx)(a,{fontSize:Z.small,color:`$dim`,children:e.issues.length}),(0,H.jsx)(y,{flex:1}),p?(0,H.jsx)(W,{variant:`ghost`,size:`icon-sm`,"aria-label":`Add issue to ${e.name}`,onPress:()=>p(e.status),children:(0,H.jsx)(hm,{size:14})}):null]}),e.issues.map((e,t)=>{let n=e.priority?[Zoe(e.priority),...e.labels]:e.labels;return(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(Ic,{borderColor:`$edge`}):null,(0,H.jsxs)(y,{px:16,py:10,items:`center`,gap:12,cursor:r?`pointer`:`default`,hoverStyle:{background:`$hover`},onPress:()=>r?.(e),children:[(0,H.jsx)(y,{...H5(t=>{t?.stopPropagation?.(),m(e)},`Advance ${e.key} status`),width:20,height:20,rounded:9999,items:`center`,justify:`center`,borderWidth:1,borderColor:`$edge`,bg:`$panel`,children:(0,H.jsx)(z,{width:8,height:8,rounded:9999,style:{backgroundColor:C9[e.status]}})}),(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`$soft`,width:68,shrink:0,children:e.key}),(0,H.jsx)(a,{fontSize:Z.body,color:`$ink`,flex:1,minW:160,numberOfLines:1,children:e.title}),(0,H.jsxs)(y,{gap:a5.tight,items:`center`,flexWrap:`wrap`,children:[n.map(t=>{let{background:n,color:r}=S9(t,e.priority);return(0,H.jsx)(Hh,{variant:`default`,style:{...Xoe,backgroundColor:n},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,style:{color:r},children:t})},t)}),e.origin?(0,H.jsx)(y,{px:8,height:18,rounded:9999,bg:`$panel`,borderWidth:1,borderColor:`$edge`,items:`center`,children:(0,H.jsx)(a,{fontSize:Z.chip,color:`$quiet`,children:e.origin.name})}):null]}),(0,H.jsx)(y,{width:64,items:`center`,justify:`flex-end`,gap:4,shrink:0,children:e.done===void 0?null:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(T9,{done:e.done}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$soft`,children:[Math.round(e.done*100),`%`]})]})}),(0,H.jsxs)(y,{width:64,items:`center`,justify:`flex-end`,gap:`$2`,shrink:0,children:[(0,H.jsx)(v9,{glyph:(0,H.jsx)(mm,{size:12,color:`$dim`}),n:e.files,label:`attachments`}),(0,H.jsx)(v9,{glyph:(0,H.jsx)(um,{size:12,color:`$dim`}),n:e.replies,label:`replies`})]}),(0,H.jsx)(y,{width:76,justify:`flex-end`,shrink:0,children:(0,H.jsx)(s9,{people:e.people,size:24,show:3})})]})]},e.id)})]},e.status))})})},z9=[{id:`w1`,label:`W1 · Oct 20`,sub:`Sprint 14`},{id:`w2`,label:`W2 · Oct 27`,sub:`Sprint 14`},{id:`w3`,label:`W3 · Nov 03`,sub:`Current · Active`,now:!0},{id:`w4`,label:`W4 · Nov 10`,sub:`Sprint 15`},{id:`w5`,label:`W5 · Nov 17`,sub:`Sprint 15`},{id:`w6`,label:`W6 · Nov 24`,sub:`Release Cut`}],$oe=(e,t)=>{switch(e){case`done`:return{start:t%2==0?0:1,span:2};case`progress`:return{start:1+t%2,span:2};case`todo`:return{start:2+t%2,span:2};default:return{start:3+t%2,span:2}}},ese=({source:e,only:t,mine:n,onOpen:r})=>{let[i,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(null);(0,V.useEffect)(()=>(o(null),c(null),e.watch(e=>{o(e),c(null)},c)),[e]);let l=t=>{if(!i)return;let n=R9(t.status);o(k9(i,t.id,n)),e.move(t.id,n).catch(c)};if(s)return(0,H.jsx)(z,{p:24,children:(0,H.jsx)(a,{fontSize:`$4`,color:`$ink`,children:s.message})});if(!i)return(0,H.jsx)(z,{p:24,gap:`$3`,"aria-busy":!0,"aria-label":`Loading timeline`,children:[0,1,2,3,4].map(e=>(0,H.jsx)(LS,{height:48},e))});let u=t?.length?i.filter(e=>e.priority&&t.includes(e.priority)):i,d=n?u.filter((e,t)=>t%2==0||u.length<=6):u;return d.length===0?(0,H.jsx)(z,{p:24,items:`flex-start`,children:(0,H.jsx)(IQ,{icon:wp,title:`No issues on timeline`,description:`Scheduled issues and sprint milestones appear here across weeks.`})}):(0,H.jsx)(L_,{flex:1,minH:0,children:(0,H.jsx)(z,{p:24,gap:16,children:(0,H.jsxs)(z,{rounded:Q.card,borderWidth:1,borderColor:`$edge`,bg:`$background`,overflow:`hidden`,children:[(0,H.jsxs)(y,{bg:`$panel`,borderBottomWidth:1,borderColor:`$edge`,height:48,items:`center`,children:[(0,H.jsxs)(y,{width:280,shrink:0,px:16,items:`center`,justify:`space-between`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,children:[(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`700`,color:`$ink`,...o5,children:`Issue / Assignee`}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,children:[d.length,` tracked`]})]}),(0,H.jsx)(y,{flex:1,height:`100%`,children:z9.map(e=>(0,H.jsxs)(z,{flex:1,px:10,justify:`center`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$hover`:`transparent`,children:[(0,H.jsxs)(y,{items:`center`,gap:6,children:[`now`in e&&e.now?(0,H.jsx)(z,{width:6,height:6,rounded:9999,style:{backgroundColor:X.accent}}):null,(0,H.jsx)(a,{fontSize:Z.small,fontWeight:`600`,color:`now`in e&&e.now?`$ink`:`$soft`,children:e.label})]}),(0,H.jsx)(a,{fontSize:Z.chip,color:`$quiet`,children:e.sub})]},e.id))})]}),d.map((e,t)=>{let{start:n,span:i}=$oe(e.status,t),o=n/z9.length*100,s=i/z9.length*100,c=Math.round((e.done??(e.status===`done`?1:.25))*100);return(0,H.jsxs)(z,{children:[t>0?(0,H.jsx)(Ic,{borderColor:`$edge`}):null,(0,H.jsxs)(y,{height:46,items:`center`,hoverStyle:{background:`$hover`},children:[(0,H.jsxs)(y,{width:280,shrink:0,px:16,gap:8,items:`center`,borderRightWidth:1,borderColor:`$edge`,height:`100%`,cursor:r?`pointer`:`default`,onPress:()=>r?.(e),children:[(0,H.jsx)(z,{width:8,height:8,rounded:9999,shrink:0,style:{backgroundColor:C9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,width:54,shrink:0,children:e.key}),(0,H.jsx)(a,{fontSize:Z.small,color:`$ink`,flex:1,numberOfLines:1,children:e.title}),(0,H.jsx)(s9,{people:e.people,size:20,show:1})]}),(0,H.jsxs)(y,{flex:1,height:`100%`,position:`relative`,items:`center`,children:[z9.map(e=>(0,H.jsx)(z,{flex:1,height:`100%`,borderRightWidth:1,borderColor:`$edge`,bg:`now`in e&&e.now?`$panel`:`transparent`},e.id)),(0,H.jsxs)(y,{...H5(()=>l(e),`${e.key} (${c}% done) — click to advance status`),position:`absolute`,style:{left:`${o+1}%`,width:`${s-2}%`},height:26,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,overflow:`hidden`,items:`center`,px:8,justify:`space-between`,children:[(0,H.jsx)(z,{position:`absolute`,l:0,t:0,b:0,width:`${c}%`,opacity:.22,pointerEvents:`none`,style:{backgroundColor:C9[e.status]}}),(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$ink`,numberOfLines:1,z:1,children:e.title}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$soft`,shrink:0,ml:6,z:1,children:[c,`%`]})]})]})]})]},e.id)})]})})})},tse=e=>F9.find(t=>t.id===e)?.id??`kanban`,B9=({mine:e=!1})=>{let{id:t,view:n}=Si(),r=iae(t),{standing:i}=_H(),a=v7(t)??N9(b7(i)),o=a.add?.bind(a),s=y7(t),[c,l]=(0,V.useState)([]),[u,d]=(0,V.useState)(null),[f,p]=(0,V.useState)([]),[m,h]=(0,V.useState)(null),g=tse(n);(0,V.useEffect)(()=>a.watch(e=>p(e),()=>{}),[a]);let _=u?f.find(e=>e.id===u)??null:null,v=e?`/mine`:t?`/projects/${t}/issues`:`/issues`,b=[{label:`Your projects`,to:`/projects`},...t?[{label:r?.name??`…`,to:v}]:[],{label:e?`My issues`:t?`Issues`:`All issues`}];return(0,H.jsxs)(z,{flex:1,minH:0,children:[(0,H.jsx)(Voe,{trail:b,title:e?`My issues`:t?`Issues`:`All issues`,base:v,here:g,people:s,only:c,onOnly:l,onAdd:o?()=>h(`backlog`):void 0}),(0,H.jsxs)(y,{flex:1,minH:0,minW:0,children:[(0,H.jsx)(z,{flex:1,minH:0,minW:0,children:g===`kanban`?(0,H.jsx)(Aoe,{source:a,only:c,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):g===`list`?(0,H.jsx)(Qoe,{source:a,only:c,mine:e,onOpen:e=>d(e.id),onCreateIn:o?e=>h(e):void 0}):(0,H.jsx)(ese,{source:a,only:c,mine:e,onOpen:e=>d(e.id)})}),_?(0,H.jsx)(Joe,{issue:_,source:a,people:s,onClose:()=>d(null)}):null]}),m&&o?(0,H.jsx)(Yoe,{initialStatus:m,people:s,onCreate:async(e,t,n)=>{await o(e,t,n)},onClose:()=>h(null)}):null]})};function nse(){let e=bi(),{current:t,standing:n}=_H(),r=x7(),i=v7()??N9(b7(n)),o=y7(),[s,c]=(0,V.useState)([]);(0,V.useEffect)(()=>i.watch(e=>c(e),()=>{}),[i]);let l=r.data??[];return(0,H.jsx)(L_,{flex:1,minH:0,children:(0,H.jsxs)(z,{p:24,gap:20,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:12,children:[(0,H.jsxs)(z,{gap:4,children:[(0,H.jsxs)(a,{...o5,fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:[t?.name??`Hanzo AI`,` · Portfolio & Tracker`]}),(0,H.jsxs)(a,{fontSize:Z.title,fontWeight:`600`,color:`$ink`,children:[`All projects (`,l.length,`)`]}),(0,H.jsx)(a,{fontSize:Z.body,color:`$quiet`,children:`The projects in this space and the issues on their boards.`})]}),(0,H.jsxs)(y,{gap:8,items:`center`,children:[(0,H.jsx)(s9,{people:o,size:26,show:5}),(0,H.jsxs)(W,{onPress:()=>e(`/issues`),children:[`All Issues (`,s.length,`)`]})]})]}),(0,H.jsx)(y,{flexWrap:`wrap`,gap:16,children:l.map(t=>{let n=t.identifier.toUpperCase(),r=s.filter(e=>e.key.startsWith(`${n}-`)),i=r.length||t.sequence,o=r.filter(e=>e.status===`done`).length,c=r.filter(e=>e.status===`progress`).length,l=r.filter(e=>e.status===`todo`).length,u=r.filter(e=>e.status===`backlog`).length,d=r.length>0?o/r.length:0;return(0,H.jsxs)(z,{width:380,grow:1,p:20,rounded:Q.card,bg:`$background`,borderWidth:1,borderColor:`$edge`,gap:14,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,gap:10,children:[(0,H.jsxs)(y,{items:`center`,gap:10,children:[(0,H.jsx)(z,{width:36,height:36,rounded:Q.field,items:`center`,justify:`center`,bg:`$panel`,borderWidth:1,borderColor:`$edge`,children:(0,H.jsx)(Kp,{size:18,color:`$ink`})}),(0,H.jsxs)(z,{children:[(0,H.jsxs)(y,{items:`center`,gap:8,children:[(0,H.jsx)(a,{fontSize:Z.row,fontWeight:`600`,color:`$ink`,children:t.name}),(0,H.jsx)(y,{px:8,py:2,rounded:Q.pill,style:r5(t.identifier),children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`700`,style:{color:r5(t.identifier).color},children:t.identifier})})]}),(0,H.jsxs)(a,{fontSize:Z.small,color:`$soft`,children:[r.length,` active issues · `,(t.members??[]).length,` members`]})]})]}),(0,H.jsxs)(y,{items:`center`,gap:6,children:[(0,H.jsx)(T9,{done:d,size:20,width:2.5}),(0,H.jsxs)(a,{fontSize:Z.small,fontWeight:`600`,color:`$ink`,children:[Math.round(d*100),`%`]})]})]}),(0,H.jsxs)(z,{gap:6,children:[(0,H.jsxs)(y,{height:6,rounded:Q.pill,bg:`$panel`,overflow:`hidden`,gap:2,children:[(0,H.jsx)(z,{flex:Math.max(1,o),style:{backgroundColor:t5.done}}),(0,H.jsx)(z,{flex:Math.max(1,c),style:{backgroundColor:t5.doing}}),(0,H.jsx)(z,{flex:Math.max(1,l),style:{backgroundColor:t5.todo}}),(0,H.jsx)(z,{flex:Math.max(1,u),style:{backgroundColor:t5.backlog}})]}),(0,H.jsxs)(y,{justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`Backlog: `,u]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`To do: `,l]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`In progress: `,c]}),(0,H.jsxs)(a,{fontSize:Z.chip,color:`$quiet`,children:[`Done: `,o,` / `,i]})]})]}),(0,H.jsxs)(y,{items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:8,children:[(0,H.jsx)(y,{gap:6,flexWrap:`wrap`,children:[[`issues`,`Board`],[`issues/list`,`List`],[`issues/timeline`,`Timeline`]].map(([n,r])=>(0,H.jsx)(y,{...H5(()=>e(`/projects/${t._id}/${n}`),`${t.name} ${r}`),px:10,py:5,rounded:Q.field,bg:`$panel`,borderWidth:1,borderColor:`$edge`,hoverStyle:{background:`$hover`},children:(0,H.jsx)(a,{fontSize:Z.chip,fontWeight:`600`,color:`$soft`,children:r})},n))}),(0,H.jsx)(W,{size:`sm`,onPress:()=>e(`/projects/${t._id}/issues`),children:`Open Board →`})]})]},t._id)})})]})})}var rse=(0,V.lazy)(()=>Le(()=>import(`./Bots-CPIU0Xgd.js`).then(e=>({default:e.Bots})),__vite__mapDeps([6,1,2,7,3,4]))),V9=()=>{let{id:e}=Si();return(0,H.jsx)(Wi,{to:e?`/projects/${e}/issues`:`/projects`,replace:!0})},H9=()=>{let e=x7();if(e.phase===`loading`)return U9(null);let t=[...e.data??[]].sort((e,t)=>e.name.localeCompare(t.name))[0];return(0,H.jsx)(Wi,{to:t?`/projects/${t._id}/issues`:`/issues`,replace:!0})},U9=e=>(0,H.jsx)(i7,{nav:(0,H.jsx)(_oe,{}),aside:(0,H.jsx)(j7,{}),children:e}),W9=e=>(0,H.jsx)(i7,{nav:(0,H.jsx)(Xae,{}),aside:(0,H.jsx)(Cae,{}),children:e}),ise=[{path:`/`,element:(0,H.jsx)(H9,{})},{path:`/login`,element:(0,H.jsx)(H9,{})},{path:`/auth`,element:(0,H.jsx)(H9,{})},{path:`/auth/callback`,element:(0,H.jsx)(H9,{})},{path:`/issues`,element:U9((0,H.jsx)(B9,{}))},{path:`/issues/:view`,element:U9((0,H.jsx)(B9,{}))},{path:`/mine`,element:U9((0,H.jsx)(B9,{mine:!0}))},{path:`/mine/:view`,element:U9((0,H.jsx)(B9,{mine:!0}))},{path:`/projects`,element:U9((0,H.jsx)(nse,{}))},{path:`/projects/:id`,element:(0,H.jsx)(V9,{})},{path:`/projects/:id/issues`,element:U9((0,H.jsx)(B9,{}))},{path:`/projects/:id/issues/:view`,element:U9((0,H.jsx)(B9,{}))},{path:`/projects/:id/:page`,element:(0,H.jsx)(V9,{})},{path:`/chat`,element:W9((0,H.jsx)(c9,{}))},{path:`/chat/:id`,element:W9((0,H.jsx)(c9,{}))},{path:`/bots`,element:(0,H.jsx)(i7,{nav:null,children:(0,H.jsx)(V.Suspense,{fallback:null,children:(0,H.jsx)(rse,{})})})},{path:`/crm`,element:(0,H.jsx)(Wi,{to:`/crm/investors`,replace:!0})},{path:`/crm/:section`,element:(e=>(0,H.jsx)(i7,{nav:(0,H.jsx)(coe,{}),children:e}))((0,H.jsx)(moe,{}))},{path:`/overview`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/agents`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/agents/:id`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/apps`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/apps/:appId`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/calendar`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/cal`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/time`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/meet`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/inbox`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/docs`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/files`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/mail`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/admin`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/settings`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})},{path:`/people`,element:(0,H.jsx)(Wi,{to:`/crm/investors`,replace:!0})},{path:`*`,element:(0,H.jsx)(Wi,{to:`/chat`,replace:!0})}],ase=()=>{let{land:e}=DV(),[t,n]=(0,V.useState)(null);return(0,V.useEffect)(()=>{e().then(e=>window.location.replace(e)).catch(e=>n(e instanceof Error?e.message:String(e)))},[e]),(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,gap:a5.inset,bg:X.ground,children:t?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(a,{size:Z.body,color:X.alert,children:t}),(0,H.jsx)(a,{size:Z.small,color:X.mute,onPress:()=>window.location.replace(`/login`),children:`Try again`})]}):(0,H.jsx)(Y_,{})})},G9=[{id:`chat`,label:`Chat`,scene:0},{id:`projects`,label:`Projects`,scene:1},{id:`tasks`,label:`Tasks`,scene:1},{id:`crm`,label:`CRM`,scene:2},{id:`docs`,label:`Docs`,scene:2}],ose=[`bugfix`,`engineering`,`launch`,`security`,`ops`],K9=`PR #418`,sse=[{name:`Dev`,role:K9,hue:`var(--pv-blue)`},{name:`Sci`,role:`42/42 E2E`,hue:`var(--pv-green)`},{name:`Mark`,role:`v2.4.1`,hue:`var(--pv-amber)`},{name:`Opera`,role:`us-west`,hue:`var(--pv-violet)`}],q9=[{name:`Dev`,domain:`Engineering`,sandbox:`sbx-eng-01`,task:`Merged ${K9} · release PaySheet lock`,badge:`+14 −3`,hue:`var(--pv-blue)`},{name:`Sci`,domain:`QA & Eval`,sandbox:`sbx-webkit-02`,task:`iOS 18.2 Safari checkout suite green`,badge:`42/42 PASS`,hue:`var(--pv-green)`},{name:`Cyber`,domain:`Security`,sandbox:`sbx-sec-03`,task:`Diff & webhook signature audit clean`,badge:`0 CVEs`,hue:`var(--pv-rose)`},{name:`Mark`,domain:`Growth`,sandbox:`sbx-mkt-04`,task:`Drafted release note for #launch`,badge:`READY`,hue:`var(--pv-amber)`},{name:`Opera`,domain:`Infra & SRE`,sandbox:`sbx-sre-05`,task:`Canary rollout 100% healthy · 18ms p95`,badge:`LIVE`,hue:`var(--pv-violet)`},{name:`Fin`,domain:`Revenue Ops`,sandbox:`sbx-fin-06`,task:`Apple Pay settlement ledger reconciled`,badge:`$0 DRIFT`,hue:`var(--pv-green)`}],cse=[{id:0,label:`Chat · #engineering`,short:`Chat`},{id:1,label:`Projects · Board`,short:`Projects`},{id:2,label:`Agents · Live Ops`,short:`Live Ops`}];function J9({pct:e,color:t}){let n=2*Math.PI*6,r=n*(1-Math.max(0,Math.min(100,e))/100);return(0,H.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,style:{flexShrink:0,transform:`rotate(-90deg)`},children:[(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:6,fill:`none`,stroke:`var(--pv-rule-strong)`,strokeWidth:`2`}),(0,H.jsx)(`circle`,{cx:`8`,cy:`8`,r:6,fill:`none`,stroke:t,strokeWidth:`2`,strokeDasharray:n,strokeDashoffset:r,strokeLinecap:`round`,style:{transition:`stroke-dashoffset 0.55s ease`}})]})}function lse({x:e,y:t,label:n}){return(0,H.jsxs)(`div`,{className:`hz-pv-cursor`,style:{transform:`translate3d(${e}px, ${t}px, 0)`},children:[(0,H.jsx)(`svg`,{width:`13`,height:`15`,viewBox:`0 0 14 16`,fill:`none`,children:(0,H.jsx)(`path`,{d:`M1.5 1.2L12.4 7.1L7.3 8.6L4.9 13.7L1.5 1.2Z`,fill:`var(--pv-ink)`,stroke:`var(--pv-bar)`,strokeWidth:`1.2`,strokeLinejoin:`round`})}),(0,H.jsx)(`span`,{className:`hz-pv-cursor-tag`,children:n})]})}var use=()=>{let e=(0,V.useRef)(null),[t,n]=(0,V.useState)(680),[r,i]=(0,V.useState)(0),[a,o]=(0,V.useState)(2),[s,c]=(0,V.useState)(`engineering`),[l,u]=(0,V.useState)(!1);(0,V.useEffect)(()=>{let t=e.current;if(!t)return;let r=()=>{let e=t.getBoundingClientRect().width;e>0&&n(e)};r();let i=new ResizeObserver(r);return i.observe(t),()=>i.disconnect()},[]),(0,V.useEffect)(()=>{if(l)return;let e=window.setInterval(()=>{o(e=>e<3?e+1:(i(e=>(e+1)%3),0))},1650);return()=>window.clearInterval(e)},[l]);let d=e=>{i(e),o(2)},f=t>=540,p=f?640:500,m=f?400:336,h=f?540:412,g=f?338:284,_=f?184:156,v=f?348:292,y=Math.max(.45,Math.min(1.16,t/p)),b=Math.round(m*y),x=r===0?a===0?{x:f?248:124,y:108,label:`◆ Dev`}:a===1?{x:f?316:186,y:184,label:`◆ Dev`}:a===2?{x:f?298:174,y:238,label:`◆ Sci`}:{x:f?344:196,y:g-28,label:`◆ Zoe`}:r===1?a<=1?{x:f?336:188,y:158,label:`◆ Dev`}:{x:f?378:218,y:132,label:`◆ Dev`}:{x:(f?204:84)+a%3*(f?82:68),y:a<2?126:212,label:a%2==0?`◆ Opera`:`◆ Sci`},S=r===1&&a>=2,C=r===1?a===0?76:a===1?84:a===2?94:100:94;return(0,H.jsxs)(`div`,{style:{width:`100%`,maxWidth:740},onPointerEnter:()=>u(!0),onPointerLeave:()=>u(!1),children:[(0,H.jsx)(`div`,{ref:e,className:`hz-pv-host`,style:{height:b},children:(0,H.jsxs)(`div`,{className:`hz-pv-stage`,style:{width:p,height:m,transform:`scale(${y})`},children:[(0,H.jsxs)(`div`,{className:`hz-pv-desk`,style:{width:h,height:g},children:[(0,H.jsxs)(`div`,{className:`hz-pv-topbar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:7},children:[(0,H.jsxs)(`div`,{className:`hz-pv-traffic`,children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-red)`}}),(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-yellow)`}}),(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{background:`var(--pv-dot-green)`}})]}),(0,H.jsx)(`span`,{style:{color:`var(--pv-mute)`,display:`inline-flex`},children:(0,H.jsx)(pm,{size:12,color:`var(--pv-mute)`})}),(0,H.jsxs)(`span`,{className:`hz-pv-pill`,children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{children:`hanzo.team`})]})]}),(0,H.jsx)(`div`,{className:`hz-pv-tabs`,role:`tablist`,"aria-label":`Hanzo Team preview surfaces`,children:(f?G9:G9.slice(0,4)).map(e=>{let t=e.id===`chat`&&r===0||e.id===`projects`&&r===1||e.id===`crm`&&r===2;return(0,H.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`hz-pv-tab`,"data-active":t?`true`:`false`,onClick:()=>d(e.scene),children:e.label},e.id)})})]}),(0,H.jsxs)(`div`,{className:`hz-pv-body`,children:[(0,H.jsxs)(`div`,{className:`hz-pv-rail`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`button`,{type:`button`,"aria-label":`Hanzo AI organization`,onClick:()=>d(0),style:{width:22,height:22,borderRadius:6,border:0,background:`var(--pv-ink)`,color:`var(--pv-bar)`,fontSize:10,fontWeight:800,cursor:`pointer`,marginBottom:2},children:`H`}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Chat channels`,className:`hz-pv-rail-btn`,"data-active":r===0?`true`:`false`,onClick:()=>d(0),children:(0,H.jsx)(um,{size:13,color:r===0?`var(--pv-ink)`:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Project boards`,className:`hz-pv-rail-btn`,"data-active":r===1?`true`:`false`,onClick:()=>d(1),children:(0,H.jsx)(Tm,{size:13,color:r===1?`var(--pv-ink)`:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Activity inbox`,className:`hz-pv-rail-btn`,"data-active":`false`,onClick:()=>d(0),children:(0,H.jsx)(yp,{size:13,color:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`Workspace docs`,className:`hz-pv-rail-btn`,"data-active":`false`,onClick:()=>d(1),children:(0,H.jsx)(Gp,{size:13,color:`var(--pv-mute)`})}),(0,H.jsx)(`button`,{type:`button`,"aria-label":`AI Teammates`,className:`hz-pv-rail-btn`,"data-active":r===2?`true`:`false`,onClick:()=>d(2),children:(0,H.jsx)(bp,{size:13,color:r===2?`var(--pv-ink)`:`var(--pv-mute)`})})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:5},children:[(0,H.jsx)(`span`,{className:`hz-pv-rail-btn`,"aria-hidden":`true`,children:(0,H.jsx)(vm,{size:12,color:`var(--pv-mute)`})}),(0,H.jsxs)(`div`,{style:{position:`relative`,width:20,height:20,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`,fontSize:8,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[`ZK`,(0,H.jsx)(`span`,{style:{position:`absolute`,right:-1,bottom:-1,width:6,height:6,borderRadius:999,background:`var(--pv-green)`,border:`1.5px solid var(--pv-rail)`}})]})]})]}),f?(0,H.jsxs)(`div`,{className:`hz-pv-sidebar`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{className:`hz-pv-sec-head`,children:`Channels`}),ose.map(e=>{let t=r===0&&s===e;return(0,H.jsxs)(`button`,{type:`button`,className:`hz-pv-nav-row`,"data-active":t?`true`:`false`,onClick:()=>{c(e),d(0)},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,minWidth:0},children:[(0,H.jsx)(Qp,{size:10,color:t?`var(--pv-ink)`:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e})]}),e===`engineering`?(0,H.jsx)(`span`,{style:{fontSize:7.5,fontWeight:700,padding:`1px 4px`,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`},children:`3`}):null]},e)})]}),(0,H.jsx)(`div`,{style:{height:1,background:`var(--pv-rule)`}}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:2},children:[(0,H.jsx)(`div`,{className:`hz-pv-sec-head`,children:`Teammates`}),sse.map(e=>(0,H.jsxs)(`button`,{type:`button`,className:`hz-pv-nav-row`,"data-active":r===2&&e.name===`Dev`?`true`:`false`,onClick:()=>d(2),children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{children:e.name})]}),(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-dim)`},children:e.role})]},e.name))]})]}):null,(0,H.jsxs)(`div`,{className:`hz-pv-main`,children:[r===0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,minWidth:0},children:[(0,H.jsx)(Qp,{size:12,color:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:s}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`,whiteSpace:`nowrap`},children:`· Checkout & Apple Pay`})]}),(0,H.jsx)(`span`,{style:{marginRight:f?78:98,fontSize:8,fontWeight:600,padding:`2px 6px`,borderRadius:999,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`,flexShrink:0},children:`Agents active`})]}),(0,H.jsxs)(`div`,{style:{flex:1,padding:`8px 11px 6px`,paddingRight:f?96:122,display:`flex`,flexDirection:`column`,gap:7,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-amber)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`Z`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`baseline`,gap:5,marginBottom:2},children:[(0,H.jsx)(`span`,{style:{fontSize:9.5,fontWeight:600},children:`Zoe`}),(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-dim)`},children:`9:40 AM`})]}),(0,H.jsxs)(`div`,{style:{display:`inline-block`,padding:`5px 9px`,borderRadius:9,background:`var(--pv-bubble)`,color:`var(--pv-bubble-ink)`,fontSize:9.2,lineHeight:1.35,maxWidth:f?`92%`:`88%`},children:[(0,H.jsx)(`span`,{style:{color:`var(--pv-amber)`,fontWeight:600},children:`@Dev`}),` Checkout fails on mobile Safari when Apple Pay closes early.`]})]})]}),a>=1?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-blue)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`D`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,marginBottom:2},children:[(0,H.jsx)(`span`,{style:{fontSize:9.5,fontWeight:600},children:`Dev`}),(0,H.jsx)(`span`,{style:{fontSize:7.5,padding:`0.5px 4px`,borderRadius:4,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,color:`var(--pv-mute)`},children:`Agent`})]}),(0,H.jsxs)(`div`,{style:{fontSize:9,color:`var(--pv-mute)`,lineHeight:1.32},children:[`PaySheet mutex stayed locked on cancel. Opened PR and linked`,` `,(0,H.jsx)(`span`,{style:{color:`var(--pv-ink)`,fontWeight:600},children:`TEAM-142`}),`:`]}),(0,H.jsxs)(`div`,{style:{marginTop:4,padding:`4.5px 7px`,borderRadius:7,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:6,maxWidth:f?`86%`:`76%`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:5,fontSize:8.5,fontWeight:600,minWidth:0},children:[(0,H.jsx)(Yp,{size:11,color:`var(--pv-green)`}),(0,H.jsx)(`span`,{style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:`${K9} · fix(checkout): release PaySheet lock`})]}),(0,H.jsx)(`span`,{style:{fontSize:8,color:`var(--pv-green)`,fontWeight:700,flexShrink:0},children:`+14 −3`})]})]})]}):(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,alignItems:`center`,gap:6,paddingLeft:27,paddingTop:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{style:{fontSize:8.8,color:`var(--pv-mute)`},children:`Dev is inspecting checkout/pay-sheet.ts…`})]}),a>=2?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{display:`flex`,gap:7,alignItems:`flex-start`},children:[(0,H.jsx)(`div`,{style:{width:20,height:20,borderRadius:999,background:`var(--pv-green)`,color:`var(--pv-bar)`,fontSize:9,fontWeight:800,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0},children:`S`}),(0,H.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,alignItems:`center`,gap:6,flexWrap:`wrap`},children:[(0,H.jsx)(`span`,{style:{fontSize:9.2,fontWeight:600},children:`Sci`}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3,fontSize:8,fontWeight:700,padding:`2px 6px`,borderRadius:5,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`},children:[(0,H.jsx)(Vt,{size:9,color:`var(--pv-green)`}),`42/42 E2E GREEN`]}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-mute)`},children:`WebKit iOS 18.2 verified`})]})]}):null]}),(0,H.jsxs)(`div`,{className:`hz-pv-composer`,style:{marginRight:f?92:118},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,minWidth:0},children:[(0,H.jsx)(hm,{size:11,color:`var(--pv-mute)`}),(0,H.jsx)(`span`,{style:{fontSize:8.8,color:a===3?`var(--pv-ink)`:`var(--pv-mute)`,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:a===3?(0,H.jsxs)(H.Fragment,{children:[`@Opera deploy v2.4.1 to prod`,(0,H.jsx)(`span`,{className:`hz-pv-caret`})]}):`Message #${s}`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,flexShrink:0},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3,fontSize:7.8,fontWeight:600,color:`var(--pv-warn)`},children:[(0,H.jsx)(sp,{size:9,color:`var(--pv-warn)`}),`Full access`]}),(0,H.jsx)(`span`,{className:`hz-pv-send`,children:(0,H.jsx)(vp,{size:11,color:`var(--pv-ink)`})})]})]})]}):null,r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(Tm,{size:12,color:`var(--pv-blue)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:`Projects · Cycle 18`}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`},children:`4 columns`})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:5,paddingRight:f?78:96},children:[(0,H.jsx)(J9,{pct:C,color:`var(--pv-green)`}),(0,H.jsxs)(`span`,{style:{fontSize:8.5,fontWeight:700,color:`var(--pv-ink)`},children:[C,`%`]})]})]}),(0,H.jsxs)(`div`,{style:{flex:1,padding:`8px 9px`,paddingRight:f?92:118,display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:6,overflow:`hidden`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-amber)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-mute)`},children:`Backlog`})]}),(0,H.jsx)(Y9,{code:`TEAM-151`,title:`Webhook retry jitter`,agent:`O`,hue:`var(--pv-violet)`,pct:25})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-mute)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-mute)`},children:`To Do`})]}),(0,H.jsx)(Y9,{code:`TEAM-148`,title:`Apple Pay telemetry`,agent:`M`,hue:`var(--pv-amber)`,pct:40})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-blue)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-ink)`},children:`In Progress`})]}),(0,H.jsx)(Y9,{code:`TEAM-145`,title:`Stripe 3DS fallback`,agent:`S`,hue:`var(--pv-green)`,pct:a>=1?82:64}),S?null:(0,H.jsx)(Y9,{code:`TEAM-142`,title:`Release PaySheet lock`,agent:`D`,hue:`var(--pv-blue)`,pct:a===0?68:92,highlight:!0})]}),(0,H.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:5},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{className:`hz-pv-dot`,style:{width:6,height:6,background:`var(--pv-green)`}}),(0,H.jsx)(`span`,{style:{fontSize:8,fontWeight:700,color:`var(--pv-green)`},children:`Done`})]}),S?(0,H.jsx)(Y9,{code:`TEAM-142`,title:`Release PaySheet lock`,agent:`D`,hue:`var(--pv-green)`,pct:100,done:!0,highlight:!0}):null,(0,H.jsx)(Y9,{code:`TEAM-139`,title:`Unified SSO cookie`,agent:`C`,hue:`var(--pv-rose)`,pct:100,done:!0})]})]})]}):null,r===2?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`hz-pv-pane-head`,children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,H.jsx)(wm,{size:12,color:`var(--pv-amber)`}),(0,H.jsx)(`span`,{style:{fontSize:10.5,fontWeight:600},children:`Agents · Live Ops`}),(0,H.jsx)(`span`,{style:{fontSize:8.5,color:`var(--pv-dim)`},children:`6 teammates online`})]}),(0,H.jsx)(`span`,{style:{marginRight:f?78:96,fontSize:7.8,fontWeight:700,color:`var(--pv-green)`},children:`Sandboxes healthy`})]}),(0,H.jsx)(`div`,{style:{flex:1,padding:`8px 10px 6px`,paddingRight:f?92:118,display:`grid`,gridTemplateColumns:`repeat(3, minmax(0, 1fr))`,gap:6,alignContent:`start`},children:q9.map((e,t)=>{let n=t===a||a===3&&t===4;return(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`6px 7px`,borderRadius:8,background:n?`var(--pv-card-hi)`:`var(--pv-card)`,border:n?`1px solid var(--pv-blue)`:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:3.5,transition:`border-color 0.2s ease, background-color 0.2s ease`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4},children:[(0,H.jsx)(`span`,{style:{width:14,height:14,borderRadius:999,background:e.hue,color:`var(--pv-bar)`,fontSize:7.5,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:e.name[0]}),(0,H.jsx)(`span`,{style:{fontSize:8.8,fontWeight:700},children:e.name})]}),(0,H.jsx)(`span`,{className:`hz-pv-live-dot`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.6,color:`var(--pv-mute)`,lineHeight:1.28,display:`-webkit-box`,WebkitLineClamp:2,WebkitBoxOrient:`vertical`,overflow:`hidden`},children:e.task}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginTop:`auto`,paddingTop:1},children:[(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-dim)`},children:e.sandbox}),(0,H.jsx)(`span`,{style:{fontSize:7,fontWeight:700,color:e.hue},children:e.badge})]})]},e.name)})}),(0,H.jsxs)(`div`,{style:{margin:`0 10px 8px`,marginRight:f?92:118,padding:`4.5px 8px`,borderRadius:7,background:`var(--pv-bar)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,fontSize:8,color:`var(--pv-mute)`},children:[(0,H.jsx)(`span`,{children:`Handoff: #engineering → @Dev → @Sci → @Opera`}),(0,H.jsx)(`span`,{style:{color:`var(--pv-green)`,fontWeight:700},children:`v2.4.1 live · 48s`})]})]}):null]})]}),(0,H.jsx)(lse,{x:x.x,y:x.y,label:x.label})]}),(0,H.jsx)(`div`,{className:`hz-pv-phone`,style:{width:_,height:v},children:(0,H.jsxs)(`div`,{className:`hz-pv-phone-screen`,children:[(0,H.jsxs)(`div`,{className:`hz-pv-phone-status`,children:[(0,H.jsx)(`span`,{children:`9:41`}),(0,H.jsx)(`div`,{className:`hz-pv-island`,children:(0,H.jsx)(`span`,{className:`hz-pv-island-lens`})}),(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:3},children:[(0,H.jsx)(pee,{size:8.5,color:`var(--pv-ink)`}),(0,H.jsx)(`span`,{style:{width:12,height:6.5,borderRadius:2,border:`1px solid var(--pv-mute)`,padding:1,display:`inline-flex`},children:(0,H.jsx)(`span`,{style:{flex:1,background:`var(--pv-green)`,borderRadius:.5}})})]})]}),(0,H.jsxs)(`div`,{style:{height:25,padding:`0 9px`,borderBottom:`1px solid var(--pv-rule)`,background:`var(--pv-bar)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexShrink:0},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,fontSize:8.5,fontWeight:700},children:[(0,H.jsx)(`span`,{style:{width:13,height:13,borderRadius:4,background:`var(--pv-ink)`,color:`var(--pv-bar)`,fontSize:7.5,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:`H`}),(0,H.jsx)(`span`,{children:r===0?`#${s}`:r===1?`Projects`:`Live Ops`})]}),(0,H.jsx)(`span`,{className:`hz-pv-live-dot`})]}),(0,H.jsxs)(`div`,{style:{flex:1,minHeight:0,background:`var(--pv-canvas)`,padding:`7px 8px`,display:`flex`,flexDirection:`column`,gap:6,overflow:`hidden`},children:[r===0?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{style:{alignSelf:`flex-end`,padding:`5px 7px`,borderRadius:`9px 9px 3px 9px`,background:`var(--pv-bubble)`,color:`var(--pv-bubble-ink)`,fontSize:7.8,lineHeight:1.32,maxWidth:`92%`},children:`@Dev Safari Apple Pay closes early on checkout`}),a>=1?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:3},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.8,fontWeight:700,color:`var(--pv-blue)`},children:`◆ Dev`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-green)`,fontWeight:700},children:`+14 −3`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.5,color:`var(--pv-ink)`},children:`${K9} · Release PaySheet lock`})]}):(0,H.jsx)(`div`,{style:{fontSize:7.5,color:`var(--pv-mute)`},children:`◆ Dev is fixing PaySheet…`}),a>=2?(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`4px 7px`,borderRadius:7,background:`var(--pv-green-bg)`,border:`1px solid var(--pv-green-edge)`,color:`var(--pv-green)`,fontSize:7.5,fontWeight:700,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{children:`◆ Sci · 42/42 E2E`}),(0,H.jsx)(`span`,{children:`GREEN`})]}):null]}):null,r===1?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5,color:`var(--pv-mute)`,fontWeight:600},children:`Cycle 18 Sprint`}),(0,H.jsxs)(`span`,{style:{fontSize:7.8,color:`var(--pv-green)`,fontWeight:700},children:[C,`%`]})]}),(0,H.jsxs)(`div`,{style:{padding:`5.5px 7px`,borderRadius:8,background:`var(--pv-card-hi)`,border:S?`1px solid var(--pv-green)`:`1px solid var(--pv-blue)`,display:`flex`,flexDirection:`column`,gap:3},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.2,color:`var(--pv-dim)`,fontWeight:700},children:`TEAM-142`}),(0,H.jsx)(`span`,{style:{fontSize:6.8,fontWeight:700,color:S?`var(--pv-green)`:`var(--pv-blue)`},children:S?`✓ Done`:`In Progress`})]}),(0,H.jsx)(`div`,{style:{fontSize:7.8,fontWeight:600},children:`Release PaySheet lock`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5},children:`TEAM-145 · 3DS`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-mute)`},children:`82%`})]}),(0,H.jsxs)(`div`,{style:{padding:`5px 7px`,borderRadius:8,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.5},children:`TEAM-139 · SSO`}),(0,H.jsx)(`span`,{style:{fontSize:7,color:`var(--pv-green)`,fontWeight:700},children:`Done`})]})]}):null,r===2?(0,H.jsx)(H.Fragment,{children:q9.slice(0,4).map(e=>(0,H.jsxs)(`div`,{style:{padding:`4.5px 6.5px`,borderRadius:7,background:`var(--pv-card)`,border:`1px solid var(--pv-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,gap:4},children:[(0,H.jsxs)(`span`,{style:{display:`inline-flex`,alignItems:`center`,gap:4,minWidth:0},children:[(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}),(0,H.jsx)(`span`,{style:{fontSize:7.8,fontWeight:700},children:e.name})]}),(0,H.jsx)(`span`,{style:{fontSize:6.8,fontWeight:700,color:e.hue},children:e.badge})]},e.name))}):null]}),(0,H.jsxs)(`div`,{style:{padding:`4px 7px 5px`,background:`var(--pv-canvas)`},children:[(0,H.jsxs)(`div`,{style:{height:22,padding:`0 4px 0 8px`,borderRadius:999,background:`var(--pv-composer)`,border:`1px solid var(--pv-composer-rule)`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.4,color:`var(--pv-mute)`},children:`Message team…`}),(0,H.jsx)(`span`,{style:{width:15,height:15,borderRadius:999,background:`var(--pv-send)`,color:`var(--pv-ink)`,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:(0,H.jsx)(vp,{size:9,color:`var(--pv-ink)`})})]}),(0,H.jsx)(`div`,{style:{width:48,height:3,borderRadius:999,background:`var(--pv-rule-strong)`,margin:`5px auto 0`}})]})]})})]})}),(0,H.jsx)(`div`,{className:`hz-pv-scene-pills`,role:`tablist`,"aria-label":`Preview scenes`,children:cse.map(e=>{let t=r===e.id;return(0,H.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":t,className:`hz-pv-scene-pill`,"data-active":t?`true`:`false`,onClick:()=>d(e.id),children:[t?(0,H.jsx)(`span`,{className:`hz-pv-live-dot`}):(0,H.jsx)(bm,{size:11,color:`var(--muted-foreground)`}),(0,H.jsx)(`span`,{children:f?e.label:e.short})]},e.id)})})]})};function Y9({code:e,title:t,agent:n,hue:r,pct:i,done:a=!1,highlight:o=!1}){return(0,H.jsxs)(`div`,{className:`hz-pv-rise`,style:{padding:`6px 6.5px`,borderRadius:7,background:o?`var(--pv-card-hi)`:`var(--pv-card)`,border:o?a?`1px solid var(--pv-green)`:`1px solid var(--pv-blue)`:`1px solid var(--pv-rule-strong)`,display:`flex`,flexDirection:`column`,gap:4},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{fontSize:7.2,fontWeight:700,color:`var(--pv-dim)`},children:e}),(0,H.jsx)(J9,{pct:i,color:a?`var(--pv-green)`:r})]}),(0,H.jsx)(`div`,{style:{fontSize:8,fontWeight:600,lineHeight:1.25,color:`var(--pv-ink)`},children:t}),(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,H.jsx)(`span`,{style:{width:13,height:13,borderRadius:999,background:r,color:`var(--pv-bar)`,fontSize:7,fontWeight:800,display:`inline-flex`,alignItems:`center`,justifyContent:`center`},children:n}),(0,H.jsx)(`span`,{style:{fontSize:7,fontWeight:700,color:a?`var(--pv-green)`:`var(--pv-mute)`},children:a?`Merged`:`${i}%`})]})]})}var dse=[[`Channels`,`Your people and your agents, in one conversation.`],[`Agents`,`Hand an agent the work; it reports back when it is done.`],[`Issue boards`,`Every task from backlog to done, on one board.`]],fse=()=>(0,H.jsx)(y,{width:`100%`,maxW:740,gap:a5.wide,flexWrap:`wrap`,children:dse.map(([e,t])=>(0,H.jsxs)(z,{flex:1,minW:180,gap:4,children:[(0,H.jsx)(a,{size:Z.body,color:X.ink,fontWeight:`600`,children:e}),(0,H.jsx)(a,{size:Z.small,color:X.mute,children:t})]},e))}),pse=`https://pay.hanzo.ai/cart`,mse=(e,t)=>{let n=new URL(pse);return new URLSearchParams(e).forEach((e,t)=>n.searchParams.set(t,e)),n.searchParams.get(`plan`)||n.searchParams.set(`plan`,`team`),n.searchParams.set(`returnUrl`,`${t}/`),n.toString()},hse=`/auth/callback`,$=`https://hanzo.ai`,X9=`https://docs.hanzo.ai`,gse=`https://github.com/hanzoai`,_se=`https://status.hanzo.ai`,vse=`https://hanzo.agency`,yse=`https://hanzo.university`,bse=[{label:`Features`,href:`https://hanzo.ai/team`},{label:`Docs`,href:`https://docs.hanzo.ai`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo App`,href:`https://hanzo.app`},{label:`API Platform`,href:`https://platform.hanzo.ai`},{label:`Hanzo AI`,href:`https://hanzo.ai`}],xse=[{id:`damon`,name:`Damon Motorcycles`,logo:`/logos/customers/damon-motorcycles.svg`,href:`${$}/customers/damon-motorcycles`},{id:`kanoa`,name:`KANOA`,logo:`/logos/customers/kanoa.png`,href:`${$}/customers/kanoa`},{id:`skully`,name:`SKULLY`,logo:`/logos/customers/skully.png`,href:`${$}/customers#skully`},{id:`bellabeat`,name:`Bellabeat`,logo:`/logos/customers/bellabeat.svg`,href:`${$}/customers#bellabeat`},{id:`stoned`,name:`STONED Audio`,logo:`/logos/customers/stoned.svg`,href:`${$}/customers#stoned`},{id:`unikrn`,name:`Unikrn`,logo:`/logos/customers/unikoin-gold.svg`,href:`${$}/customers#unikoin-gold`},{id:`arca`,name:`Arca`,logo:`/logos/customers/arca.png`,href:`${$}/customers#arca`},{id:`casper`,name:`Casper Labs`,logo:`/logos/customers/casper-blockchain.svg`,href:`${$}/customers#casper-blockchain`},{id:`triller`,name:`Triller`,logo:`/logos/customers/trillerfest.png`,href:`${$}/customers#trillerfest`},{id:`cover`,name:`Cover Build`,logo:`/logos/customers/cover-build.svg`,href:`${$}/customers#cover-build`},{id:`myle`,name:`Myle Tap`,logo:`/logos/customers/myle-tap.png`,href:`${$}/customers#myle-tap`},{id:`keek`,name:`Personas Social`,logo:`/logos/customers/keek-social.svg`,href:`${$}/customers#keek-social`}],Sse=[[{title:`Products`,href:`${$}/products`,links:[{label:`Hanzo App`,href:`https://hanzo.app`},{label:`Hanzo Dev`,href:`${$}/dev`},{label:`Hanzo Bot`,href:`https://hanzo.bot`},{label:`Hanzo Team`,href:`https://hanzo.team`},{label:`Hanzo Science`,href:`${$}/science`},{label:`Hanzo Security`,href:`${$}/security`},{label:`Download app`,href:`${$}/download`},{label:`Pricing`,href:`${$}/pricing`},{label:`Log in`,href:`/login`}]},{title:`Capabilities`,links:[{label:`Hanzo Design`,href:`${$}/design`},{label:`MCP`,href:`${$}/mcp`},{label:`Skills`,href:`${$}/skills`},{label:`Integrations`,href:`${$}/integrations`},{label:`Hanzo CLI`,href:`${$}/cli`}]},{title:`Extensions`,links:[{label:`Hanzo in Chrome`,href:`${$}/extension`},{label:`Desktop app`,href:`${$}/desktop`},{label:`Hanzo IDE`,href:`${$}/ide`}]},{title:`Models`,href:`${$}/models`,links:[{label:`All models`,href:`${$}/models`},{label:`Zen`,href:`${$}/zen`},{label:`Enso`,href:`${$}/enso`},{label:`Kai`,href:`${$}/kai`},{label:`Video · Koma`,href:`${$}/koma`},{label:`Images · Iro`,href:`${$}/iro`},{label:`3D · Mori`,href:`${$}/mori`},{label:`Voice · Koe`,href:`${$}/koe`},{label:`Benchmarks`,href:`${$}/benchmarks`}]}],[{title:`Enterprise`,href:`${$}/enterprise`,links:[{label:`Overview`,href:`${$}/enterprise`},{label:`All solutions`,href:`${$}/solutions`},{label:`Customer stories`,href:`${$}/customers`},{label:`Contact sales`,href:`${$}/contact-sales`}]},{title:`Teams`,href:`${$}/solutions`,links:[{label:`Engineering`,href:`${$}/solutions/engineering`},{label:`Operations`,href:`${$}/solutions/operations`},{label:`Finance`,href:`${$}/solutions/finance`},{label:`Data`,href:`${$}/solutions/data`},{label:`Sales`,href:`${$}/solutions/sales`},{label:`Marketing`,href:`${$}/solutions/marketing`},{label:`Design`,href:`${$}/solutions/design`}]},{title:`Industries`,href:`${$}/solutions`,links:[{label:`Cybersecurity`,href:`${$}/solutions/cybersecurity`},{label:`Financial services`,href:`${$}/solutions/financial-services`},{label:`Government`,href:`${$}/solutions/government`},{label:`Healthcare`,href:`${$}/solutions/healthcare`},{label:`Education`,href:`${$}/solutions/education`},{label:`Law`,href:`${$}/solutions/law`},{label:`Retail`,href:`${$}/solutions/retail`}]},{title:`Programs`,href:`${$}/startups`,links:[{label:`Startups`,href:`${$}/startups`},{label:`Affiliate program`,href:`${$}/affiliate`},{label:`Referral program`,href:`${$}/referral`},{label:`Reserved tier`,href:`${$}/solutions/reserved`},{label:`OSS grants`,href:`${$}/open-source`}]}],[{title:`Developers`,href:X9,links:[{label:`Developer docs`,href:X9},{label:`API reference`,href:`${X9}/docs/openapi/`},{label:`Quickstart`,href:`${X9}/docs/quickstart/`},{label:`SDKs`,href:`${$}/sdks`},{label:`Console`,href:`https://platform.hanzo.ai`},{label:`GitHub`,href:gse}]},{title:`API Platform`,href:`${$}/platform`,links:[{label:`Overview`,href:`${$}/platform`},{label:`API keys`,href:`https://platform.hanzo.ai/settings/organization/keys`},{label:`Gateway`,href:`${$}/gateway`},{label:`Agents`,href:`${$}/agents`},{label:`Playground`,href:`${$}/playground`}]},{title:`Cloud`,href:`${$}/products`,links:[{label:`Base`,href:`${$}/base`},{label:`Machines`,href:`${$}/machines`},{label:`Search`,href:`${$}/search`},{label:`Datastore`,href:`${$}/datastore`},{label:`Memory`,href:`${$}/products/memory`},{label:`Realtime`,href:`${$}/realtime`},{label:`Observability`,href:`${$}/o11y`},{label:`Insights`,href:`${$}/insights`},{label:`Commerce`,href:`${$}/commerce`}]},{title:`Help and security`,links:[{label:`Availability`,href:_se},{label:`Help center`,href:`${$}/support`},{label:`Security and compliance`,href:`${$}/security`},{label:`Trust & transparency`,href:`${$}/trust`}]}],[{title:`Company`,href:`${$}/about`,links:[{label:`Hanzo AI`,href:`${$}/about`},{label:`Careers`,href:`${$}/careers`},{label:`Philosophy`,href:`${$}/philosophy`},{label:`Research`,href:`${$}/research`},{label:`News`,href:`${$}/press`},{label:`Investors`,href:`${$}/investors`},{label:`Brand`,href:`${$}/brand`},{label:`Open source`,href:`${$}/open-source`},{label:`Contact`,href:`${$}/contact`}]},{title:`Resources`,href:`${$}/learn`,links:[{label:`Blog`,href:`${$}/blog`},{label:`Guides`,href:`${X9}/docs/guides/`},{label:`Cookbook`,href:`${X9}/docs/guides/cookbook/`},{label:`Hanzo University`,href:yse},{label:`Hanzo Agency`,href:vse},{label:`Cost calculator`,href:`${$}/calculator`}]},{title:`Terms and policies`,href:`${$}/legal`,links:[{label:`Privacy choices`,href:`${$}/privacy#choices`},{label:`Privacy policy`,href:`${$}/privacy`},{label:`Terms of service`,href:`${$}/terms`},{label:`Usage policy`,href:`${$}/aup`},{label:`Cookie policy`,href:`${$}/cookies`},{label:`Other policies`,href:`${$}/legal`}]}]],Cse=[{label:`Discord`,href:`https://discord.gg/XthHQQj`},{label:`Telegram`,href:`https://t.me/hanzoai`},{label:`X`,href:`https://x.com/hanzoai`},{label:`GitHub`,href:`https://github.com/hanzoai`},{label:`LinkedIn`,href:`https://linkedin.com/company/hanzo-ai`},{label:`Facebook`,href:`https://facebook.com/hanzoinc`},{label:`Bluesky`,href:`https://bsky.app/profile/hanzoai.bsky.social`},{label:`Reddit`,href:`https://www.reddit.com/r/HanzoAI/`},{label:`TikTok`,href:`https://www.tiktok.com/@hanzoinc`},{label:`Instagram`,href:`https://www.instagram.com/hanzoinc`}],wse=[{num:`01`,title:`Channels for every part of the work`,body:`A channel for each team and project, direct messages, and threads that keep a decision next to the question that started it.`},{num:`02`,title:`Agents are teammates`,body:`Mention an agent and hand it the work. It answers in the channel with the work done: a pull request, a drafted reply, an updated deck.`},{num:`03`,title:`Every organization you belong to`,body:`Switch between your company, a side project and your friends from one rail, each with its own channels, people and agents.`}],Tse=[{title:`Coding`,body:`A bug report becomes a pull request; a person reviews it, the checks pass, and it ships, all in the channel.`},{title:`Support`,body:`An agent drafts the reply, a person makes it warmer, and it goes out.`},{title:`Email`,body:`The inbox is sorted and the replies are drafted in your voice. You approve them as a batch.`},{title:`Fundraising`,body:`The deck and the model are built, the intros are drafted, and the meeting lands on the calendar.`},{title:`Docs & Specs`,body:`Shared specifications stay linked to issues, pull requests, and channel decisions without drifting out of date.`},{title:`Science & R&D Ops`,body:`Run LillyMol MedChem screens, targets + crew Slurm DAGs, pytest-wdl proteomics, and admiral/brms.mmrm clinical tables right from #research.`}],Ese=[{title:`Board`,body:`Cards in Backlog, Doing and Done, each with its owner, person or agent.`},{title:`Drive`,body:`The team's documents and files, in folders.`},{title:`Calendar`,body:`The week's meetings and agent routines on one schedule.`},{title:`Meet`,body:`Calls with notes taken for you, in the same workspace as the work they are about.`},{title:`Inbox`,body:`Every mention, thread reply, and review request collected in one triage queue.`},{title:`Agents`,body:`Dedicated AI teammates configured with your repos, docs, and permissions.`}],Dse=[{num:`01`,channel:`#bugfix`,category:`Engineering & QA`,title:`E2E Bug Reproduction, Patch & Verification`,body:`A human drops a one-line bug report in #bugfix. @Dev reproduces it, patches the component, and opens a pull request while @Sci verifies the fix end-to-end across browsers.`,badge:`42/42 E2E GREEN`},{num:`02`,channel:`#security`,category:`Security & SecOps`,title:`Continuous Zero-Trust Audit & Secret Rotation`,body:`Every new endpoint or auth change is audited in #security. @Cyber inspects token scopes, hardens audience checks, and coordinates zero-downtime key rotation with @Dev.`,badge:`0 CRITICAL CVEs`},{num:`03`,channel:`#launch`,category:`Marketing & Design`,title:`Coordinated Product Launch & Creative Assets`,body:`From a single launch brief in #launch, @Mark drafts the announcement post, social thread, and changelog while @Des renders the hero reel and OpenGraph cards.`,badge:`LAUNCH READY`},{num:`04`,channel:`#revenue`,category:`Sales & RevOps`,title:`Outbound Research, Deal Desk & CRM Triage`,body:`@Sales enriches inbound leads, drafts personalized follow-ups in #revenue, and coordinates custom enterprise terms with @Fin and @Law.`,badge:`PIPELINE SYNCED`},{num:`05`,channel:`#research`,category:`Science & BioOps`,title:`MedChem Screens, Proteomics & Clinical Tables`,body:`@Sci executes LillyMol molecular screens, Slurm compute DAGs, and clinical statistical models directly from #research with reproducible artifacts.`,badge:`REPRODUCIBLE`},{num:`06`,channel:`#ops`,category:`Operations & Finance`,title:`Close the Books, Vendor Audits & Runbooks`,body:`@Fin reconciles multi-cloud billing and stripe payouts in #ops while @Ops keeps infrastructure runbooks and incident response on schedule.`,badge:`RECONCILED`}];function Ose(){let e=(0,V.useRef)(null);return(0,V.useEffect)(()=>{let t=e.current,n=t?.parentElement;if(!t||!n)return;let r=t.getContext(`2d`);if(!r)return;let i=.14,a=0,o=0,s=1,c=0,l={x:-9999,y:-9999},u={x:-9999,y:-9999},d=()=>{let e=n.getBoundingClientRect();s=Math.min(window.devicePixelRatio||1,2),a=e.width,o=e.height,t.width=Math.max(1,Math.round(a*s)),t.height=Math.max(1,Math.round(o*s)),r.setTransform(s,0,0,s,0,0)},f=e=>{let n=(e||0)*.001;r.clearRect(0,0,a,o),r.fillStyle=getComputedStyle(t).color;let i=Math.ceil(a/14),s=Math.ceil(o/14),c=(a-(i-1)*14)*.5,u=(o-(s-1)*14)*.5,d=a*.5,f=o*.45,p=a*.56,m=o*.58,h=l.x,g=l.y,_=h>-999,v=a*(.5+.28*Math.cos(n*.42)),y=o*(.45+.22*Math.sin(n*.31)),b=a*(.5+.32*Math.sin(n*.27+1.8)),x=o*(.48+.24*Math.cos(n*.36+.9)),S=Math.max(a,o)*.28,C=1/(S*S);for(let e=0;e<s;e++){let t=u+e*14,a=(t-f)/m;for(let o=0;o<i;o++){let i=c+o*14,s=(i-d)/p,l=Math.hypot(s,a),u=Math.max(0,Math.min(1,(l-.16)/.88)),f=Math.max(0,1-Math.max(0,l-.72)*1.45),m=.5+.5*Math.sin(o*.18+e*.14-n*1.15+Math.cos(o*.09-e*.11+n*.65)*1.3),S=(i-v)*(i-v)+(t-y)*(t-y),w=(i-b)*(i-b)+(t-x)*(t-x),T=Math.exp(-S*C)*.65+Math.exp(-w*C)*.55,E=(.7+u*2.1+m*.42+T*.95)*(.45+f*.55),D=(.045+u*.18+m*.035+T*.11)*f;if(_){let e=i-h,n=t-g,r=e*e+n*n;if(r<36100){let e=1-Math.sqrt(r)/190,t=e*e*(3-2*e);E+=t*1.9,D=Math.min(.68,D+t*.34)}}D<.01||E<.3||(r.globalAlpha=D,r.beginPath(),r.arc(i,t,E,0,Math.PI*2),r.fill())}}r.globalAlpha=1},p=e=>{l.x+=(u.x-l.x)*i,l.y+=(u.y-l.y)*i,f(e),c=requestAnimationFrame(p)},m=e=>{let t=n.getBoundingClientRect();u.x=e.clientX-t.left,u.y=e.clientY-t.top,l.x<-999&&(l.x=u.x,l.y=u.y)},h=()=>{u.x=-9999,u.y=-9999};d(),c=requestAnimationFrame(p);let g=new ResizeObserver(()=>d());return g.observe(n),n.addEventListener(`pointermove`,m,{passive:!0}),n.addEventListener(`pointerleave`,h,{passive:!0}),()=>{cancelAnimationFrame(c),g.disconnect(),n.removeEventListener(`pointermove`,m),n.removeEventListener(`pointerleave`,h)}},[]),(0,H.jsx)(`canvas`,{ref:e,"aria-hidden":`true`,style:{position:`absolute`,inset:0,width:`100%`,height:`100%`,pointerEvents:`none`,zIndex:0,color:`var(--foreground)`}})}var kse=()=>{let{standing:e,depart:t,request:n}=DV(),[r,i]=(0,V.useState)(null);if(e===`in`)return null;let o=(e,n)=>{i(e),t(n).catch(()=>i(null))},s=r!==null,c=(e,t)=>r===e?`One moment…`:t;return(0,H.jsxs)(z,{flex:1,bg:X.ground,overflow:`scroll`,children:[(0,H.jsxs)(y,{width:`100%`,minH:68,px:a5.wide,py:a5.tight,items:`center`,justify:`space-between`,borderBottomWidth:1,borderColor:X.rule,bg:X.ground,style:{position:`sticky`,top:0,zIndex:40},children:[(0,H.jsx)(y,{items:`center`,gap:a5.tight,cursor:`pointer`,shrink:0,onPress:()=>window.location.assign(`/`),children:(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo ${QB.title}`})}),(0,H.jsxs)(y,{items:`center`,gap:a5.tight,shrink:0,children:[(0,H.jsxs)(`div`,{className:`hz-landing-nav-links`,children:[bse.map(e=>(0,H.jsx)(W,{size:`sm`,chromeless:!0,rounded:Q.pill,onPress:()=>window.location.assign(e.href),children:(0,H.jsx)(a,{size:Z.small,color:X.mute,children:e.label})},e.label)),(0,H.jsx)(W,{size:`sm`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`https://hanzo.ai/contact-sales`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,children:`Contact sales`})})]}),(0,H.jsx)(W,{size:`sm`,chromeless:!0,rounded:Q.pill,disabled:s,onPress:()=>o(`nav`,`login`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Log in`})}),(0,H.jsx)(W,{size:`sm`,rounded:Q.pill,bg:X.ink,disabled:s,onPress:()=>o(`open`,`login`),children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:c(`open`,`Open Hanzo Team`)})})]})]}),(0,H.jsxs)(`main`,{className:`hz-signin`,children:[(0,H.jsx)(Ose,{}),(0,H.jsxs)(`div`,{className:`hz-signin-row`,children:[(0,H.jsxs)(`div`,{className:`hz-signin-copy`,children:[(0,H.jsx)(RJ,{bare:!0,title:`Sign in to Hanzo ${QB.title}`,line:`AI cockpit, live streams, issue boards, channels, and bots for your team.`,request:n,termsHref:`${$}/terms`,privacyHref:`${$}/privacy`}),(0,H.jsx)(y,{items:`center`,justify:`center`,pt:a5.tight,children:(0,H.jsx)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(`${$}/team`),style:{textDecoration:`underline`,textUnderlineOffset:`3px`},children:`Learn more about Hanzo Team →`})})]}),(0,H.jsxs)(`div`,{className:`hz-signin-figure`,children:[(0,H.jsx)(use,{}),(0,H.jsx)(fse,{})]})]})]}),(0,H.jsxs)(z,{width:`100%`,items:`center`,px:a5.wide,py:a5.edge,gap:a5.inset,bg:X.ground,children:[(0,H.jsx)(a,{size:Z.small,color:X.mute,fontWeight:`500`,style:{textAlign:`center`},children:`Companies building with the Hanzo API`}),(0,H.jsx)(`div`,{className:`hz-mq-view`,children:(0,H.jsx)(`div`,{className:`hz-mq-track`,children:[0,1].map(e=>xse.map(t=>{let n=e>0;return(0,H.jsx)(`a`,{href:t.href,className:`hz-logo`,"aria-label":n?void 0:t.name,"aria-hidden":n||void 0,tabIndex:n?-1:void 0,target:`_blank`,rel:`noopener noreferrer`,title:t.name,children:(0,H.jsx)(`img`,{src:t.logo,alt:n?``:t.name,loading:`lazy`})},`${e}-${t.id}`)}))})})]}),(0,H.jsxs)(z,{width:`100%`,bg:X.ground,px:a5.wide,py:a5.edge,gap:a5.edge,borderTopWidth:1,borderColor:X.rule,children:[(0,H.jsxs)(z,{width:`100%`,maxW:1160,mx:`auto`,gap:a5.inset,py:a5.inset,children:[(0,H.jsxs)(z,{items:`center`,gap:a5.tight,style:{textAlign:`center`},children:[(0,H.jsx)(a,{size:Z.chip,color:X.mute,fontWeight:`600`,style:{letterSpacing:`0.08em`,textTransform:`uppercase`},children:`What it is`}),(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`One workspace. Everything connected.`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{maxWidth:620},children:`Stop jumping between tools just to get work done.`})]}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(280px, 1fr))`,gap:`20px`,width:`100%`},children:wse.map(e=>(0,H.jsxs)(z,{p:a5.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,gap:a5.tight,children:[(0,H.jsx)(a,{size:Z.small,color:X.dim,fontWeight:`600`,children:e.num}),(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:e.title}),(0,H.jsx)(a,{size:Z.small,color:X.mute,style:{lineHeight:`1.5`},children:e.body})]},e.num))})]}),(0,H.jsxs)(z,{width:`100%`,maxW:1160,mx:`auto`,gap:a5.inset,py:a5.inset,children:[(0,H.jsxs)(z,{items:`center`,gap:a5.tight,style:{textAlign:`center`},children:[(0,H.jsx)(a,{size:Z.chip,color:X.mute,fontWeight:`600`,style:{letterSpacing:`0.08em`,textTransform:`uppercase`},children:`Together`}),(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`Humans and agents, on the same work`})]}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(300px, 1fr))`,gap:`20px`,width:`100%`},children:Tse.map(e=>(0,H.jsxs)(z,{p:a5.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,gap:a5.tight,children:[(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:e.title}),(0,H.jsx)(a,{size:Z.small,color:X.mute,style:{lineHeight:`1.5`},children:e.body})]},e.title))})]}),(0,H.jsxs)(z,{width:`100%`,maxW:1160,mx:`auto`,gap:a5.inset,py:a5.inset,children:[(0,H.jsxs)(z,{items:`center`,gap:a5.tight,style:{textAlign:`center`},children:[(0,H.jsx)(a,{size:Z.chip,color:X.mute,fontWeight:`600`,style:{letterSpacing:`0.08em`,textTransform:`uppercase`},children:`The rooms`}),(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`Everything the team works in`})]}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(300px, 1fr))`,gap:`20px`,width:`100%`},children:Ese.map(e=>(0,H.jsxs)(z,{p:a5.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,gap:a5.tight,children:[(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:e.title}),(0,H.jsx)(a,{size:Z.small,color:X.mute,style:{lineHeight:`1.5`},children:e.body})]},e.title))})]}),(0,H.jsxs)(z,{width:`100%`,maxW:1160,mx:`auto`,gap:a5.inset,py:a5.inset,children:[(0,H.jsxs)(z,{items:`center`,gap:a5.tight,style:{textAlign:`center`},children:[(0,H.jsx)(a,{size:Z.chip,color:X.mute,fontWeight:`600`,style:{letterSpacing:`0.08em`,textTransform:`uppercase`},children:`Every department`}),(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`Real work shipped in channels`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{maxWidth:680},children:`Mention @Dev, @Sci, @Cyber, @Mark, @Sales, or @Fin in any channel and get verified pull requests, audits, and deliverables.`})]}),(0,H.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(auto-fit, minmax(320px, 1fr))`,gap:`20px`,width:`100%`},children:Dse.map(e=>(0,H.jsx)(z,{p:a5.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,gap:a5.tight,justify:`space-between`,children:(0,H.jsxs)(z,{gap:a5.tight,children:[(0,H.jsxs)(y,{items:`center`,justify:`space-between`,children:[(0,H.jsxs)(a,{size:Z.chip,color:X.mute,fontWeight:`600`,children:[e.channel,` · `,e.category]}),(0,H.jsx)(a,{size:Z.chip,color:X.dim,fontWeight:`600`,children:e.badge})]}),(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:e.title}),(0,H.jsx)(a,{size:Z.small,color:X.mute,style:{lineHeight:`1.5`},children:e.body})]})},e.num))})]}),(0,H.jsxs)(z,{width:`100%`,maxW:896,mx:`auto`,p:a5.edge,rounded:Q.card,borderWidth:1,borderColor:X.rule,bg:X.panel,items:`center`,gap:a5.inset,style:{textAlign:`center`},children:[(0,H.jsx)(a,{size:Z.chip,color:X.mute,fontWeight:`600`,style:{letterSpacing:`0.08em`,textTransform:`uppercase`},children:`Hanzo Team`}),(0,H.jsx)(a,{size:Z.title,color:X.ink,fontWeight:`700`,children:`One workspace for how your team actually works.`}),(0,H.jsx)(a,{size:Z.body,color:X.mute,style:{maxWidth:560},children:`Bring your projects, tasks, conversations, docs, meetings, and knowledge together.`}),(0,H.jsxs)(y,{gap:a5.tight,flexWrap:`wrap`,justify:`center`,pt:a5.tight,children:[(0,H.jsx)(W,{size:`lg`,rounded:Q.pill,bg:X.ink,disabled:s,onPress:()=>o(`open`,`login`),children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`600`,children:c(`open`,`Open Hanzo Team`)})}),(0,H.jsx)(W,{size:`lg`,variant:`outline`,rounded:Q.pill,onPress:()=>window.location.assign(`${$}/team`),children:(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`500`,children:`Learn more on hanzo.ai →`})})]})]})]}),(0,H.jsx)(z,{width:`100%`,borderTopWidth:1,borderColor:X.rule,bg:X.ground,px:a5.wide,py:a5.edge,children:(0,H.jsxs)(z,{width:`100%`,maxW:1240,mx:`auto`,gap:a5.edge,children:[(0,H.jsxs)(y,{justify:`space-between`,items:`flex-start`,gap:a5.edge,flexWrap:`wrap`,children:[(0,H.jsx)(z,{minW:160,gap:a5.tight,children:(0,H.jsxs)(y,{items:`center`,gap:a5.tight,cursor:`pointer`,onPress:()=>window.location.assign($),children:[(0,H.jsx)(z,{width:22,height:22,rounded:Q.field,bg:X.ink,items:`center`,justify:`center`,children:(0,H.jsx)(a,{size:Z.small,color:X.ground,fontWeight:`700`,children:`H`})}),(0,H.jsx)(a,{size:Z.row,color:X.ink,fontWeight:`600`,children:`Hanzo`})]})}),(0,H.jsx)(y,{gap:a5.edge,flexWrap:`wrap`,grow:1,justify:`space-between`,children:Sse.map((e,t)=>(0,H.jsx)(z,{minW:150,gap:a5.inset,children:e.map(e=>(0,H.jsxs)(z,{gap:a5.tight,children:[(0,H.jsx)(a,{size:Z.small,color:X.ink,fontWeight:`600`,cursor:e.href?`pointer`:void 0,onPress:e.href?()=>window.location.assign(e.href):void 0,style:{lineHeight:`1.35`},children:e.title}),(0,H.jsx)(z,{style:{gap:`2.5px`},children:e.links.map(e=>(0,H.jsx)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.32`},children:e.label},e.href+e.label))})]},e.title))},t))})]}),(0,H.jsx)(y,{pt:a5.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,flexWrap:`wrap`,style:{columnGap:`24px`,rowGap:`8px`},children:Cse.map(e=>(0,H.jsxs)(a,{size:Z.small,color:X.mute,cursor:`pointer`,onPress:()=>window.location.assign(e.href),style:{lineHeight:`1.35`},children:[e.label,` ↗`]},e.label))}),(0,H.jsxs)(y,{pt:a5.inset,borderTopWidth:1,borderColor:X.rule,items:`center`,justify:`space-between`,flexWrap:`wrap`,gap:a5.tight,children:[(0,H.jsx)(a,{size:Z.chip,color:X.dim,children:`© 2026 Hanzo AI, Inc. All rights reserved.`}),(0,H.jsx)(y,{gap:a5.inset,flexWrap:`wrap`,children:[[`Terms`,`${$}/terms`],[`Privacy`,`${$}/privacy`],[`Usage policy`,`${$}/aup`],[`Privacy choices`,`${$}/privacy#choices`]].map(([e,t])=>(0,H.jsx)(a,{size:Z.chip,color:X.dim,cursor:`pointer`,onPress:()=>window.location.assign(t),children:e},e))})]})]})})]})},Ase=({children:e})=>{let{standing:t}=DV(),{standing:n,refusal:r,enrolNow:i,enrolment:a}=_H(),[o,s]=(0,V.useState)(!1);return window.location.pathname===hse?(0,H.jsx)(ase,{}):window.location.pathname===`/start`?(0,H.jsx)(jse,{to:mse(window.location.search,window.location.origin)}):t===`unknown`?(0,H.jsx)(Z9,{}):t===`out`?(0,H.jsx)(kse,{}):n===`stranger`?(0,H.jsx)(Q9,{title:`One more step`,body:`Set up your workspace to see your projects.`,children:(0,H.jsx)(W,{disabled:o,onPress:()=>{s(!0),i().then(e=>{e?s(!1):window.location.assign(a)})},children:o?`Setting up…`:`Set up`})}):n===`refused`?(0,H.jsx)(Q9,{title:`Your workspace is not answering`,body:r?.message??``,children:(0,H.jsx)(W,{onPress:()=>window.location.reload(),children:`Try again`})}):n===`unknown`?(0,H.jsx)(Z9,{}):(0,H.jsx)(H.Fragment,{children:e})},jse=({to:e})=>((0,V.useEffect)(()=>window.location.replace(e),[e]),(0,H.jsx)(Z9,{})),Z9=()=>(0,H.jsx)(z,{flex:1,items:`center`,justify:`center`,bg:X.ground,children:(0,H.jsx)(Y_,{})}),Q9=({title:e,body:t,children:n})=>(0,H.jsxs)(z,{flex:1,items:`center`,justify:`center`,gap:a5.inset,bg:X.ground,p:a5.wide,children:[(0,H.jsx)(a,{size:Z.title,color:X.ink,children:e}),t?(0,H.jsx)(a,{size:Z.body,color:X.mute,children:t}):null,n]}),Mse=()=>wi(ise),Nse=200,Pse=()=>{let{effectiveTheme:e}=Y7();return(0,V.useEffect)(()=>{q7(W7()),Aae(sV().getAccessToken())},[]),(0,H.jsx)(ny,{theme:e,position:`top-center`})},Fse=()=>(0,H.jsxs)(Hne,{children:[(0,H.jsx)(Gm,{delay:Nse,children:(0,H.jsx)(RV,{children:(0,H.jsxs)(bH,{children:[(0,H.jsx)(cae,{}),(0,H.jsx)(Ase,{children:(0,H.jsx)(ka,{children:(0,H.jsx)(Mse,{})})})]})})}),(0,H.jsx)(Pse,{}),(0,H.jsx)($ne,{floating:!1})]});Te({token:()=>sV().getAccessToken()??void 0});var $9=document.getElementById(`root`);if(!$9)throw Error(`no #root`);(0,Un.createRoot)($9).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Fse,{})}));export{i_ as $,hK as A,RW as B,SY as C,NK as D,FK as E,eK as F,jS as G,oV as H,LG as I,A_ as J,X_ as K,HW as L,HG as M,UG as N,xK as O,ZG as P,Vg as Q,FW as R,mX as S,GK as T,AS as U,_H as V,NS as W,jg as X,k_ as Y,Lg as Z,t6 as _,h6 as a,Ep as at,R2 as b,B3 as c,G3 as d,a_ as et,J3 as f,e6 as g,Q3 as h,g6 as i,Lp as it,$G as j,_K as k,U3 as l,X3 as m,_6 as n,W as nt,F3 as o,U as ot,Y3 as p,O_ as q,v6 as r,_m as rt,I3 as s,Ia as st,Y8 as t,Ng as tt,W3 as u,r6 as v,XJ as w,CQ as x,E4 as y,IW as z};
203
- //# sourceMappingURL=index-BSvxo5-z.js.map