decocms 2.179.2 → 2.179.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/dist/client/assets/{AlertCircle-QngH9BVd.js → AlertCircle-DcuzO-dN.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-BUW8XsMa.js → AlignLeft-DH6vJ97u.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-Ba2t7m6d.js → ArrowDown-DrJY3Wf3.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-DX2ldnBo.js → ArrowLeft-B0zQkfl0.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Wy3Qa9X3.js → ArrowUp-B4DKDJey.js} +1 -1
  6. package/dist/client/assets/{Building02-DW6RLSwU.js → Building02-B5vUKe4K.js} +1 -1
  7. package/dist/client/assets/{Check-CLxUgI8Z.js → Check-5nIJP_0B.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DDKCxiAn.js → CheckCircle-CPfAK_ok.js} +1 -1
  9. package/dist/client/assets/{CheckSquare-IgZnioYh.js → CheckSquare-Bd5OlGNx.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-Brnp4Z-Q.js → CheckVerified02-BImD45AM.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-D0b1rvAp.js → ChevronDown-t60R5l2B.js} +1 -1
  12. package/dist/client/assets/{ChevronLeft-BOF7bp9d.js → ChevronLeft-lVdUD9SW.js} +1 -1
  13. package/dist/client/assets/{ChevronRight-BEUO8jhU.js → ChevronRight-3uKoJ2yX.js} +1 -1
  14. package/dist/client/assets/{ChevronUp-BWhuIqS7.js → ChevronUp-l7iXrppT.js} +1 -1
  15. package/dist/client/assets/{Clock-Aquumu5W.js → Clock-Cu62NiMl.js} +1 -1
  16. package/dist/client/assets/{Code01-_in0gxFd.js → Code01-DA4cXrzu.js} +1 -1
  17. package/dist/client/assets/{Container-b65PFshp.js → Container-Cvd3ILsk.js} +1 -1
  18. package/dist/client/assets/{Copy01-Ds0OKZs5.js → Copy01-DCmX2pvi.js} +1 -1
  19. package/dist/client/assets/{Dataflow03-CE4IJeUz.js → Dataflow03-SvWKmU9-.js} +1 -1
  20. package/dist/client/assets/{DotsHorizontal-EK1-V4Yv.js → DotsHorizontal-DE3Ptwny.js} +1 -1
  21. package/dist/client/assets/{DotsVertical-Bo0fAyx-.js → DotsVertical-CZep1rYf.js} +1 -1
  22. package/dist/client/assets/{Download01-CN3AkzFm.js → Download01-DOZIvPhC.js} +1 -1
  23. package/dist/client/assets/{Edit01-BeW3IgwV.js → Edit01-Bh7u1xp-.js} +1 -1
  24. package/dist/client/assets/{Edit05-DDQmnS5O.js → Edit05-DwDDlBNQ.js} +1 -1
  25. package/dist/client/assets/{Eye-Cqad01Et.js → Eye-D3Q7o9JY.js} +1 -1
  26. package/dist/client/assets/{EyeOff-rTYDCZUH.js → EyeOff--TPuyP7J.js} +1 -1
  27. package/dist/client/assets/{File02-k_9AZvHT.js → File02-6xeEPCuC.js} +1 -1
  28. package/dist/client/assets/{File06-BAp2UeVQ.js → File06-BocZAjHf.js} +1 -1
  29. package/dist/client/assets/{FilterLines-BQVg1PzI.js → FilterLines-CUdG83Ae.js} +1 -1
  30. package/dist/client/assets/{Globe01-sBw0ReRO.js → Globe01-BTdgnOS2.js} +1 -1
  31. package/dist/client/assets/{Globe02-DlxZmkSI.js → Globe02-X8fGWI0t.js} +1 -1
  32. package/dist/client/assets/{Grid01-B9zEjFyx.js → Grid01-NkSMXhQ7.js} +1 -1
  33. package/dist/client/assets/{Home02-DsMimBHw.js → Home02-BmcJp5G2.js} +1 -1
  34. package/dist/client/assets/{Image01-zSA25K9S.js → Image01-RwxwuRZg.js} +1 -1
  35. package/dist/client/assets/{Inbox01-Bcon6dDK.js → Inbox01-B7dU6IpS.js} +1 -1
  36. package/dist/client/assets/{InfoCircle-CA8mfcG6.js → InfoCircle-BO2XWy7v.js} +1 -1
  37. package/dist/client/assets/{Key01-V3zgT2bk.js → Key01-CjhxaGrC.js} +1 -1
  38. package/dist/client/assets/{LayersTwo01-D3otbQFN.js → LayersTwo01-DEwkReGL.js} +1 -1
  39. package/dist/client/assets/{Link01-VlHez4tu.js → Link01-h9aUM7NA.js} +1 -1
  40. package/dist/client/assets/{LinkExternal01-vs3DKlfq.js → LinkExternal01-CmkQ0Pr-.js} +1 -1
  41. package/dist/client/assets/{List-D6xZGoxJ.js → List-BbeB05v1.js} +1 -1
  42. package/dist/client/assets/{Loading01-DQphO9Su.js → Loading01-D0sCOwf7.js} +1 -1
  43. package/dist/client/assets/{Lock01-Cbqd9PVH.js → Lock01-DFfVnVtc.js} +1 -1
  44. package/dist/client/assets/{Play-jCDYHrdu.js → Play-hGa2UcUZ.js} +1 -1
  45. package/dist/client/assets/{Plus-CURSuoDd.js → Plus-Dcf0Y3wA.js} +1 -1
  46. package/dist/client/assets/{RefreshCcw01-oV1XFIRn.js → RefreshCcw01-BOXuamrY.js} +1 -1
  47. package/dist/client/assets/{Save01-CpNh-fPw.js → Save01-CA0I32a6.js} +1 -1
  48. package/dist/client/assets/{SearchMd-C8ADHGFY.js → SearchMd-BSRGE1t4.js} +1 -1
  49. package/dist/client/assets/{Settings01-B76KnDHb.js → Settings01-CCUkMwLj.js} +1 -1
  50. package/dist/client/assets/{Shield01-BodC6YjW.js → Shield01-BYpsgCVA.js} +1 -1
  51. package/dist/client/assets/{Terminal-BHkLJhoR.js → Terminal-ZymOmGb9.js} +1 -1
  52. package/dist/client/assets/{Tool01-DlbILfZg.js → Tool01-Doogi-IK.js} +1 -1
  53. package/dist/client/assets/{Trash01-CYMRq_nY.js → Trash01-Cs72bTP6.js} +1 -1
  54. package/dist/client/assets/{Upload01-BQ7z5iC5.js → Upload01-ByUvmqDm.js} +1 -1
  55. package/dist/client/assets/{Users03-DEpvReeu.js → Users03-CGvJARf5.js} +1 -1
  56. package/dist/client/assets/{X-BT_y3J3a.js → X-CD9ZB6hw.js} +1 -1
  57. package/dist/client/assets/{XClose-C-H07PEn.js → XClose-BxUlnJUs.js} +1 -1
  58. package/dist/client/assets/{Zap-BY3Hn1l9.js → Zap-0WHKFRes.js} +1 -1
  59. package/dist/client/assets/{agent-connections-preview-DbwllQSw.js → agent-connections-preview-BEmLqtx5.js} +1 -1
  60. package/dist/client/assets/agent-detail-jg81y7ZA.js +2 -0
  61. package/dist/client/assets/agents-PmHD6Xb_.js +1 -0
  62. package/dist/client/assets/{ai-providers-logos-DGTpC_MW.js → ai-providers-logos-C_voEDmL.js} +1 -1
  63. package/dist/client/assets/{alert-dialog-BqCiJDa8.js → alert-dialog-qmvoIx9J.js} +3 -3
  64. package/dist/client/assets/{auth-catchall-DPwCqyhO.js → auth-catchall-ByYcT8WN.js} +1 -1
  65. package/dist/client/assets/automation-detail-C1-q2EzY.js +1 -0
  66. package/dist/client/assets/automations-C9eao1B2.js +1 -0
  67. package/dist/client/assets/avatar-DeGeJRAR.js +1 -0
  68. package/dist/client/assets/badge-Cjjl_FHP.js +1 -0
  69. package/dist/client/assets/{binder-CuBUxi11.js → binder-C1eSZFT4.js} +1 -1
  70. package/dist/client/assets/{breadcrumb-BWfepeob.js → breadcrumb-C8hDXS86.js} +1 -1
  71. package/dist/client/assets/{card-gfMzoGpr.js → card-CoyaoT6W.js} +1 -1
  72. package/dist/client/assets/{checkbox-DygphnIU.js → checkbox-D5DFx9da.js} +1 -1
  73. package/dist/client/assets/{collapsible-BJo6q_NJ.js → collapsible-DcaWkNTt.js} +1 -1
  74. package/dist/client/assets/{collection-detail-fTigPh-V.js → collection-detail-Dsgpohom.js} +3 -3
  75. package/dist/client/assets/{collection-display-button-C42ZnuS7.js → collection-display-button-BcIJp1SX.js} +1 -1
  76. package/dist/client/assets/{collection-search-Dzoe9W56.js → collection-search-nKZEJ_r3.js} +1 -1
  77. package/dist/client/assets/{collection-table-wrapper-Bka5CUqj.js → collection-table-wrapper-Bq15EL3p.js} +1 -1
  78. package/dist/client/assets/{collection-tabs-D9qLvNTu.js → collection-tabs-qLP6ozkD.js} +1 -1
  79. package/dist/client/assets/{command-D_HBfmpj.js → command-Bk-fXiVb.js} +1 -1
  80. package/dist/client/assets/connection-card-BYUbg7iO.js +1 -0
  81. package/dist/client/assets/connection-detail-Zdtj4TKi.js +1 -0
  82. package/dist/client/assets/connections-CMaQr-QY.js +1 -0
  83. package/dist/client/assets/{constants-D5QZg84_.js → constants-DclZTqHf.js} +1 -1
  84. package/dist/client/assets/{context-CGMT963w.js → context-BFi-zuf6.js} +12 -12
  85. package/dist/client/assets/{create-organization-dialog-CeMf7qju.js → create-organization-dialog-pXQ89_sr.js} +1 -1
  86. package/dist/client/assets/{create-project-dialog-Bs_mS8aj.js → create-project-dialog-M-dgrV_c.js} +1 -1
  87. package/dist/client/assets/{danger-gTdMMqBl.js → danger-DqsrtWLB.js} +1 -1
  88. package/dist/client/assets/{danger-zone-BE94J4G-.js → danger-zone-BhDM5wIc.js} +1 -1
  89. package/dist/client/assets/{dependencies-DQ9gMDrw.js → dependencies-CPYZFhhf.js} +1 -1
  90. package/dist/client/assets/dialog-DzGwvQ_K.js +1 -0
  91. package/dist/client/assets/drawer-CAX2URBi.js +1 -0
  92. package/dist/client/assets/{dropdown-menu-DE2pKopg.js → dropdown-menu-BcNYk9_F.js} +1 -1
  93. package/dist/client/assets/dynamic-plugin-layout-D0dkPO22.js +1 -0
  94. package/dist/client/assets/editable-task-title-BR-xQ-UT.js +16 -0
  95. package/dist/client/assets/{empty-state-BjCXvoyS.js → empty-state-BuGXY27l.js} +1 -1
  96. package/dist/client/assets/{empty-state-Bk9Z7Q-U.js → empty-state-CGSu9IQ9.js} +1 -1
  97. package/dist/client/assets/{env-vars-editor-BjeFjhEe.js → env-vars-editor-VoVbIy9n.js} +1 -1
  98. package/dist/client/assets/{extract-connection-data-CZxT3XNH.js → extract-connection-data-DhU56Zd0.js} +1 -1
  99. package/dist/client/assets/{file-browser-C4MCCicp.js → file-browser-DIaRK0us.js} +2 -2
  100. package/dist/client/assets/{form-tOTNzCZe.js → form-DBjkdSps.js} +1 -1
  101. package/dist/client/assets/{general-DOjbT8YE.js → general-DCfBGmuh.js} +1 -1
  102. package/dist/client/assets/{generate-id-kfQDJb0K.js → generate-id-DRuK_WRM.js} +1 -1
  103. package/dist/client/assets/{grid-view-CM2kDBxz.js → grid-view-DsY2qZrB.js} +1 -1
  104. package/dist/client/assets/{home-rO4pkzPH.js → home-C52P_wmy.js} +1 -1
  105. package/dist/client/assets/{index-BLtI6TU9.js → index-BLNBD7Tl.js} +1 -1
  106. package/dist/client/assets/index-BObCXgKJ.js +1 -0
  107. package/dist/client/assets/{index-DyL93sTY.js → index-BzPzEjOV.js} +1 -1
  108. package/dist/client/assets/index-COFAW4F5.js +1 -0
  109. package/dist/client/assets/index-CubWD7-P.css +1 -0
  110. package/dist/client/assets/index-DMmNh7jR.js +218 -0
  111. package/dist/client/assets/index-DYAF-Vgt.js +1 -0
  112. package/dist/client/assets/index-DiczHAor.js +1 -0
  113. package/dist/client/assets/{index-DjVQ8cwy.js → index-Dumm3WtY.js} +2 -2
  114. package/dist/client/assets/{index-Bwlq4qOs.js → index-PFtbLrE4.js} +1 -1
  115. package/dist/client/assets/{index-DiHcYCxZ.js → index-bHgla3gL.js} +1 -1
  116. package/dist/client/assets/index-hmkE8HuP.js +1 -0
  117. package/dist/client/assets/{infiniteQueryObserver-XS4LWR6q.js → infiniteQueryObserver-CZ8w6Ao-.js} +1 -1
  118. package/dist/client/assets/input-Bt_nejZh.js +1 -0
  119. package/dist/client/assets/{integration-icon-C9GR_8Ea.js → integration-icon-Dyr7fOYU.js} +1 -1
  120. package/dist/client/assets/{label-DJvdRQ2A.js → label-DTNkd20e.js} +1 -1
  121. package/dist/client/assets/layout-Ck4QNb1R.js +1 -0
  122. package/dist/client/assets/{layout-10Sxtyop.js → layout-VG2uM_nk.js} +1 -1
  123. package/dist/client/assets/login-x4JJuKeA.js +1 -0
  124. package/dist/client/assets/{logo-upload-iqCQyRXD.js → logo-upload-7WcycT9q.js} +1 -1
  125. package/dist/client/assets/{mcp-app-renderer-C3qFwvPf.js → mcp-app-renderer-hLmmzHl_.js} +1 -1
  126. package/dist/client/assets/{mcp-server-card-DCDS8v4f.js → mcp-server-card-CwYAe4vO.js} +1 -1
  127. package/dist/client/assets/mcp-server-detail-CjZvaa-f.js +2 -0
  128. package/dist/client/assets/{members-CykhAYWe.js → members-Sgl6kVS6.js} +1 -1
  129. package/dist/client/assets/{monaco-editor-DQf5JSy_.js → monaco-editor-BS1-hh4n.js} +4 -4
  130. package/dist/client/assets/monitoring-DWB-fw7M.js +4 -0
  131. package/dist/client/assets/monitoring-dashboard-edit-DdNrWKBz.js +1 -0
  132. package/dist/client/assets/{monitoring-dashboard-view-CXCG5P_H.js → monitoring-dashboard-view-BUxqPLpn.js} +2 -2
  133. package/dist/client/assets/{monitoring-stats-row-BfoeteQX.js → monitoring-stats-row-CiWvBCYV.js} +2 -2
  134. package/dist/client/assets/{oauth-callback-CXrwzvh_.js → oauth-callback-7ed5Z9Xs.js} +1 -1
  135. package/dist/client/assets/{oauth-callback-ai-provider-bQZvbhnr.js → oauth-callback-ai-provider-qEm-Q5-E.js} +1 -1
  136. package/dist/client/assets/{org-ai-providers-4gYTufEL.js → org-ai-providers-CUAlOa9f.js} +1 -1
  137. package/dist/client/assets/page-BQl7Ie3w.js +1 -0
  138. package/dist/client/assets/page-DfQnSuW1.js +1 -0
  139. package/dist/client/assets/{plugin-empty-state-cb7GbeKy.js → plugin-empty-state-DUosCqGd.js} +1 -1
  140. package/dist/client/assets/{plugin-empty-state-CEvZCNFj.js → plugin-empty-state-qFDP0Nr2.js} +1 -1
  141. package/dist/client/assets/{plugin-header-C4ZfQdcs.js → plugin-header-BeGFVTX4.js} +1 -1
  142. package/dist/client/assets/{plugin-header-Do_HgCfI.js → plugin-header-CJlxZY-i.js} +1 -1
  143. package/dist/client/assets/plugins-CzL725OF.js +1 -0
  144. package/dist/client/assets/popover-CF2iI6mL.js +1 -0
  145. package/dist/client/assets/project-app-view-lqZ02NJN.js +1 -0
  146. package/dist/client/assets/project-layout-CBbKmowd.js +1 -0
  147. package/dist/client/assets/{project-plugins-C18qk0lc.js → project-plugins-DqmH9sWQ.js} +1 -1
  148. package/dist/client/assets/{projects-list-CtvT2y9h.js → projects-list-Bz_1RhAg.js} +1 -1
  149. package/dist/client/assets/{registry-layout-Cvu5zKVR.js → registry-layout-6H7s-msc.js} +2 -2
  150. package/dist/client/assets/{registry-utils-Bx7--rIH.js → registry-utils-DZHZD5gP.js} +1 -1
  151. package/dist/client/assets/{reset-password-CSswd9M3.js → reset-password-3HgT81EI.js} +1 -1
  152. package/dist/client/assets/{resizable-B0HQ1vuq.js → resizable-BwEPpKFX.js} +1 -1
  153. package/dist/client/assets/{save-actions-BxTuQTa4.js → save-actions-Z-_7bu1u.js} +1 -1
  154. package/dist/client/assets/scroll-area-CwrVaRUF.js +1 -0
  155. package/dist/client/assets/select-hHfKwVbN.js +1 -0
  156. package/dist/client/assets/select-virtual-mcp-DsImheli.js +1 -0
  157. package/dist/client/assets/shell-layout-Bh0wZbL8.js +3 -0
  158. package/dist/client/assets/{sidebar-settings-pZmI7pGH.js → sidebar-settings-U5rAu7py.js} +1 -1
  159. package/dist/client/assets/{skeleton-NLo71_Sb.js → skeleton-BvrwcS3X.js} +1 -1
  160. package/dist/client/assets/spinner-CSLYV8gq.js +1 -0
  161. package/dist/client/assets/{store-invite-CP9PWG-2.js → store-invite-z_eVOBRF.js} +1 -1
  162. package/dist/client/assets/switch-CoYIum7D.js +1 -0
  163. package/dist/client/assets/{table-BK1bAac3.js → table-BSLV9H8I.js} +1 -1
  164. package/dist/client/assets/tabs-sTqc1_U2.js +1 -0
  165. package/dist/client/assets/{task-status-DCsPkppQ.js → task-status-CrO2oj_v.js} +37 -37
  166. package/dist/client/assets/tasks-CazLoC59.js +1 -0
  167. package/dist/client/assets/tasks-panel-DBJx0hs6.js +1 -0
  168. package/dist/client/assets/textarea-CgJ5x-hs.js +1 -0
  169. package/dist/client/assets/{time-range-picker-CEhZhu7c.js → time-range-picker-BCm8UHQI.js} +1 -1
  170. package/dist/client/assets/toggle-group-C20N8vss.js +1 -0
  171. package/dist/client/assets/{tools-list-DGVVcYEB.js → tools-list-JehNbMf9.js} +1 -1
  172. package/dist/client/assets/tooltip-DHJtaI_Z.js +1 -0
  173. package/dist/client/assets/{topbar-portal-DLbOrsQP.js → topbar-portal-jewy4fLu.js} +1 -1
  174. package/dist/client/assets/{types-BOmhR0hZ.js → types-BtTmvTe4.js} +1 -1
  175. package/dist/client/assets/{use-automations-CPlNdxed.js → use-automations-D-X6Oij9.js} +1 -1
  176. package/dist/client/assets/{use-collections-Le9CzDbY.js → use-collections-DhavVshD.js} +1 -1
  177. package/dist/client/assets/{use-connection-CNeKPAtP.js → use-connection-CVlyXslk.js} +1 -1
  178. package/dist/client/assets/{use-copy-CR_0d0zs.js → use-copy-DkDz3lds.js} +1 -1
  179. package/dist/client/assets/{use-create-virtual-mcp-BOxl7MdZ.js → use-create-virtual-mcp-DZAv89rZ.js} +1 -1
  180. package/dist/client/assets/{use-infinite-scroll-CbBHKCjw.js → use-infinite-scroll-j2WybGGN.js} +1 -1
  181. package/dist/client/assets/{use-install-from-registry-Ckutd61H.js → use-install-from-registry-Ch6GOwHv.js} +1 -1
  182. package/dist/client/assets/{use-list-state-DrSbpG8C.js → use-list-state-Baq-X1EV.js} +1 -1
  183. package/dist/client/assets/{use-mcp-prompts-D4XXlnov.js → use-mcp-prompts-BDRKUj7D.js} +1 -1
  184. package/dist/client/assets/{use-mcp-resources-BueR0w1E.js → use-mcp-resources-BxIahbOo.js} +1 -1
  185. package/dist/client/assets/{use-mcp-tools-CFyULGGP.js → use-mcp-tools-kv4r4Zvn.js} +1 -1
  186. package/dist/client/assets/{use-members-Bgz9FSqE.js → use-members-Coq2XO1k.js} +1 -1
  187. package/dist/client/assets/{use-project-RpN1fut9.js → use-project-XBmxO4XX.js} +1 -1
  188. package/dist/client/assets/{use-store-discovery-BS96E_Li.js → use-store-discovery-D-xa6Q86.js} +1 -1
  189. package/dist/client/assets/use-view-mode-CdGajc1j.js +1 -0
  190. package/dist/client/assets/{use-virtual-mcp-DGT5zflo.js → use-virtual-mcp-DCxXK_bv.js} +1 -1
  191. package/dist/client/assets/useInfiniteQuery-H-W7n7En.js +1 -0
  192. package/dist/client/assets/{useMutation-Betr8yis.js → useMutation-DrLoVqQ7.js} +1 -1
  193. package/dist/client/assets/useQuery-B-AaJTeZ.js +1 -0
  194. package/dist/client/assets/useSuspenseInfiniteQuery-Czq4y4BP.js +1 -0
  195. package/dist/client/assets/{user-ChA79mrb.js → user-8V0wpye0.js} +1 -1
  196. package/dist/client/assets/workflow-Bb3JE-XH.js +1 -0
  197. package/dist/client/index.html +3 -2
  198. package/dist/server/cli.js +1 -1
  199. package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
  200. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
  201. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
  202. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
  203. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
  204. package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
  205. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
  206. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
  207. package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
  208. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
  209. package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
  210. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
  211. package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
  212. package/dist/server/node_modules/pg-connection-string/README.md +105 -0
  213. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
  214. package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
  215. package/dist/server/node_modules/pg-connection-string/index.js +231 -0
  216. package/dist/server/node_modules/pg-connection-string/package.json +52 -0
  217. package/dist/server/node_modules/pg-pool/LICENSE +21 -0
  218. package/dist/server/node_modules/pg-pool/README.md +357 -0
  219. package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
  220. package/dist/server/node_modules/pg-pool/index.js +517 -0
  221. package/dist/server/node_modules/pg-pool/package.json +51 -0
  222. package/dist/server/node_modules/pg-protocol/LICENSE +21 -0
  223. package/dist/server/node_modules/pg-protocol/README.md +3 -0
  224. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +1 -0
  225. package/dist/server/node_modules/pg-protocol/dist/b.js +23 -0
  226. package/dist/server/node_modules/pg-protocol/dist/b.js.map +1 -0
  227. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +15 -0
  228. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +55 -0
  229. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +1 -0
  230. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +16 -0
  231. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +81 -0
  232. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +1 -0
  233. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +1 -0
  234. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +530 -0
  235. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +1 -0
  236. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +6 -0
  237. package/dist/server/node_modules/pg-protocol/dist/index.js +15 -0
  238. package/dist/server/node_modules/pg-protocol/dist/index.js.map +1 -0
  239. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +162 -0
  240. package/dist/server/node_modules/pg-protocol/dist/messages.js +160 -0
  241. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +1 -0
  242. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +1 -0
  243. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +252 -0
  244. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +1 -0
  245. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +24 -0
  246. package/dist/server/node_modules/pg-protocol/dist/parser.js +324 -0
  247. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +1 -0
  248. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +42 -0
  249. package/dist/server/node_modules/pg-protocol/dist/serializer.js +189 -0
  250. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +1 -0
  251. package/dist/server/node_modules/pg-protocol/esm/index.js +11 -0
  252. package/dist/server/node_modules/pg-protocol/package.json +45 -0
  253. package/dist/server/node_modules/pg-protocol/src/b.ts +25 -0
  254. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +58 -0
  255. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +85 -0
  256. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +575 -0
  257. package/dist/server/node_modules/pg-protocol/src/index.ts +11 -0
  258. package/dist/server/node_modules/pg-protocol/src/messages.ts +262 -0
  259. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +276 -0
  260. package/dist/server/node_modules/pg-protocol/src/parser.ts +413 -0
  261. package/dist/server/node_modules/pg-protocol/src/serializer.ts +274 -0
  262. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +67 -0
  263. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +166 -0
  264. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +1 -0
  265. package/dist/server/node_modules/pg-types/.travis.yml +7 -0
  266. package/dist/server/node_modules/pg-types/Makefile +14 -0
  267. package/dist/server/node_modules/pg-types/README.md +75 -0
  268. package/dist/server/node_modules/pg-types/index.d.ts +137 -0
  269. package/dist/server/node_modules/pg-types/index.js +47 -0
  270. package/dist/server/node_modules/pg-types/index.test-d.ts +21 -0
  271. package/dist/server/node_modules/pg-types/lib/arrayParser.js +11 -0
  272. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +257 -0
  273. package/dist/server/node_modules/pg-types/lib/builtins.js +73 -0
  274. package/dist/server/node_modules/pg-types/lib/textParsers.js +215 -0
  275. package/dist/server/node_modules/pg-types/package.json +42 -0
  276. package/dist/server/node_modules/pg-types/test/index.js +24 -0
  277. package/dist/server/node_modules/pg-types/test/types.js +597 -0
  278. package/dist/server/node_modules/pgpass/README.md +74 -0
  279. package/dist/server/node_modules/pgpass/lib/helper.js +233 -0
  280. package/dist/server/node_modules/pgpass/lib/index.js +23 -0
  281. package/dist/server/node_modules/pgpass/package.json +41 -0
  282. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  283. package/dist/server/node_modules/postgres-array/index.js +97 -0
  284. package/dist/server/node_modules/postgres-array/license +21 -0
  285. package/dist/server/node_modules/postgres-array/package.json +35 -0
  286. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  287. package/dist/server/node_modules/postgres-date/index.js +116 -0
  288. package/dist/server/node_modules/postgres-date/license +21 -0
  289. package/dist/server/node_modules/postgres-date/package.json +33 -0
  290. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  291. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  292. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  293. package/dist/server/node_modules/postgres-interval/license +21 -0
  294. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  295. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  296. package/dist/server/node_modules/split2/LICENSE +13 -0
  297. package/dist/server/node_modules/split2/README.md +85 -0
  298. package/dist/server/node_modules/split2/bench.js +27 -0
  299. package/dist/server/node_modules/split2/index.js +141 -0
  300. package/dist/server/node_modules/split2/package.json +39 -0
  301. package/dist/server/node_modules/split2/test.js +409 -0
  302. package/dist/server/node_modules/xtend/.jshintrc +30 -0
  303. package/dist/server/node_modules/xtend/LICENSE +20 -0
  304. package/dist/server/node_modules/xtend/README.md +32 -0
  305. package/dist/server/node_modules/xtend/immutable.js +19 -0
  306. package/dist/server/node_modules/xtend/mutable.js +17 -0
  307. package/dist/server/node_modules/xtend/package.json +55 -0
  308. package/dist/server/node_modules/xtend/test.js +103 -0
  309. package/dist/server/server.js +1 -1
  310. package/package.json +1 -1
  311. package/dist/client/assets/LayoutLeft-CbUmiI7I.js +0 -1
  312. package/dist/client/assets/agent-detail-DqMa-yjy.js +0 -2
  313. package/dist/client/assets/agents-DXD0J3OW.js +0 -1
  314. package/dist/client/assets/automation-detail-bmoX3GK-.js +0 -1
  315. package/dist/client/assets/automations-Dp1WjxxK.js +0 -1
  316. package/dist/client/assets/avatar-BoRF-Me1.js +0 -1
  317. package/dist/client/assets/badge-DIWKuwVU.js +0 -1
  318. package/dist/client/assets/connection-card-DuHVLZ35.js +0 -1
  319. package/dist/client/assets/connection-detail-vcbLbssZ.js +0 -1
  320. package/dist/client/assets/connections-14pDMsUe.js +0 -1
  321. package/dist/client/assets/dialog-B8WS5FOh.js +0 -1
  322. package/dist/client/assets/dynamic-plugin-layout-yMvA298P.js +0 -1
  323. package/dist/client/assets/editable-task-title-oggBOZ_d.js +0 -16
  324. package/dist/client/assets/index-B09Yemt1.js +0 -1
  325. package/dist/client/assets/index-CAsAeYNN.css +0 -1
  326. package/dist/client/assets/index-CMImT9Gt.js +0 -1
  327. package/dist/client/assets/index-D-6rbOIG.js +0 -1
  328. package/dist/client/assets/index-DnJ6a24w.js +0 -218
  329. package/dist/client/assets/index-hCeFdkUk.js +0 -1
  330. package/dist/client/assets/index-qrpgIqks.js +0 -1
  331. package/dist/client/assets/input-BBKBJVKe.js +0 -1
  332. package/dist/client/assets/layout-BjyFY_1R.js +0 -1
  333. package/dist/client/assets/login-ClPbfjlJ.js +0 -1
  334. package/dist/client/assets/mcp-server-detail-lOR_wUNJ.js +0 -2
  335. package/dist/client/assets/monitoring-BPuhRE0m.js +0 -4
  336. package/dist/client/assets/monitoring-dashboard-edit-BVtLOBNe.js +0 -1
  337. package/dist/client/assets/page-CCXJyUyN.js +0 -1
  338. package/dist/client/assets/page-DB3QLlpA.js +0 -1
  339. package/dist/client/assets/plugins-pEgOY1Nz.js +0 -1
  340. package/dist/client/assets/popover-vDURg2rv.js +0 -1
  341. package/dist/client/assets/project-app-view-DfCIvrF7.js +0 -1
  342. package/dist/client/assets/project-layout-CkMdq05b.js +0 -1
  343. package/dist/client/assets/scroll-area-dsTSFUPi.js +0 -1
  344. package/dist/client/assets/select-Bbaj2HCW.js +0 -1
  345. package/dist/client/assets/select-virtual-mcp-CZJoA7HG.js +0 -1
  346. package/dist/client/assets/sheet-B_-2ygzJ.js +0 -1
  347. package/dist/client/assets/shell-layout-Ca5Bbhzi.js +0 -3
  348. package/dist/client/assets/spinner-EdHFCjIL.js +0 -1
  349. package/dist/client/assets/switch-bfk4EFAk.js +0 -1
  350. package/dist/client/assets/tabs-aIY_aIUV.js +0 -1
  351. package/dist/client/assets/tasks-Dw1i-69W.js +0 -1
  352. package/dist/client/assets/tasks-panel-CEAgXi7r.js +0 -1
  353. package/dist/client/assets/textarea-lF0m7xkk.js +0 -1
  354. package/dist/client/assets/toggle-group-Dak-s1p3.js +0 -1
  355. package/dist/client/assets/tooltip-Csc3oeTz.js +0 -1
  356. package/dist/client/assets/use-mobile-Y3tADOOl.js +0 -1
  357. package/dist/client/assets/use-view-mode-BeRbE5Df.js +0 -1
  358. package/dist/client/assets/useInfiniteQuery-ChOuKh6v.js +0 -1
  359. package/dist/client/assets/useQuery-mzOsnjYJ.js +0 -1
  360. package/dist/client/assets/useSuspenseInfiniteQuery-DFs2FFlW.js +0 -1
  361. package/dist/client/assets/workflow-CBDfcQFP.js +0 -1
  362. package/dist/server/node_modules/pg/README.md +0 -95
  363. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  364. package/dist/server/node_modules/pg/lib/client.js +0 -743
  365. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  366. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  367. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  368. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  369. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  370. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  371. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  372. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  373. package/dist/server/node_modules/pg/lib/index.js +0 -73
  374. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  375. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  376. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  377. package/dist/server/node_modules/pg/lib/query.js +0 -252
  378. package/dist/server/node_modules/pg/lib/result.js +0 -109
  379. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  380. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  381. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  382. package/dist/server/node_modules/pg/package.json +0 -76
  383. /package/dist/server/node_modules/{pg → pg-cloudflare}/LICENSE +0 -0
@@ -0,0 +1,218 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/file-browser-DIaRK0us.js","assets/topbar-portal-jewy4fLu.js","assets/useInfiniteQuery-H-W7n7En.js","assets/infiniteQueryObserver-CZ8w6Ao-.js","assets/checkbox-D5DFx9da.js","assets/Check-5nIJP_0B.js","assets/AlertCircle-DcuzO-dN.js","assets/ChevronRight-3uKoJ2yX.js","assets/Download01-DOZIvPhC.js","assets/File02-6xeEPCuC.js","assets/Grid01-NkSMXhQ7.js","assets/Home02-BmcJp5G2.js","assets/List-BbeB05v1.js","assets/Loading01-D0sCOwf7.js","assets/Trash01-Cs72bTP6.js","assets/Upload01-ByUvmqDm.js","assets/useMutation-DrLoVqQ7.js","assets/plugin-header-CJlxZY-i.js","assets/ChevronDown-t60R5l2B.js","assets/registry-layout-6H7s-msc.js","assets/CheckCircle-CPfAK_ok.js","assets/Container-Cvd3ILsk.js","assets/Settings01-CCUkMwLj.js","assets/useQuery-B-AaJTeZ.js","assets/constants-DclZTqHf.js","assets/badge-Cjjl_FHP.js","assets/input-Bt_nejZh.js","assets/dropdown-menu-BcNYk9_F.js","assets/table-BSLV9H8I.js","assets/toggle-group-C20N8vss.js","assets/use-view-mode-CdGajc1j.js","assets/tooltip-DHJtaI_Z.js","assets/index-COFAW4F5.js","assets/DotsVertical-CZep1rYf.js","assets/FilterLines-CUdG83Ae.js","assets/Globe01-BTdgnOS2.js","assets/SearchMd-BSRGE1t4.js","assets/dialog-DzGwvQ_K.js","assets/X-CD9ZB6hw.js","assets/alert-dialog-qmvoIx9J.js","assets/card-CoyaoT6W.js","assets/CheckVerified02-BImD45AM.js","assets/label-DTNkd20e.js","assets/select-hHfKwVbN.js","assets/ChevronUp-l7iXrppT.js","assets/switch-CoYIum7D.js","assets/textarea-CgJ5x-hs.js","assets/ArrowLeft-B0zQkfl0.js","assets/use-copy-DkDz3lds.js","assets/RefreshCcw01-BOXuamrY.js","assets/Link01-h9aUM7NA.js","assets/Eye-D3Q7o9JY.js","assets/LinkExternal01-CmkQ0Pr-.js","assets/use-collections-DhavVshD.js","assets/use-connection-CVlyXslk.js","assets/popover-CF2iI6mL.js","assets/Copy01-DCmX2pvi.js","assets/EyeOff--TPuyP7J.js","assets/Save01-CA0I32a6.js","assets/Key01-CjhxaGrC.js","assets/Plus-Dcf0Y3wA.js","assets/Play-hGa2UcUZ.js","assets/plugin-header-BeGFVTX4.js","assets/Dataflow03-SvWKmU9-.js","assets/plugin-empty-state-qFDP0Nr2.js","assets/login-x4JJuKeA.js","assets/reset-password-3HgT81EI.js","assets/oauth-callback-7ed5Z9Xs.js","assets/oauth-callback-ai-provider-qEm-Q5-E.js","assets/shell-layout-Bh0wZbL8.js","assets/task-status-CrO2oj_v.js","assets/context-BFi-zuf6.js","assets/decopilot-events-Brt4gAR6.js","assets/index-PFtbLrE4.js","assets/skeleton-BvrwcS3X.js","assets/spinner-CSLYV8gq.js","assets/use-mcp-prompts-BDRKUj7D.js","assets/form-DBjkdSps.js","assets/index-BLNBD7Tl.js","assets/usage-BW6ztpN6.js","assets/ArrowUp-B4DKDJey.js","assets/Edit01-Bh7u1xp-.js","assets/Lock01-DFfVnVtc.js","assets/Users03-CGvJARf5.js","assets/org-ai-providers-CUAlOa9f.js","assets/index-DYAF-Vgt.js","assets/avatar-DeGeJRAR.js","assets/ai-providers-logos-C_voEDmL.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/tabs-sTqc1_U2.js","assets/drawer-CAX2URBi.js","assets/AlignLeft-DH6vJ97u.js","assets/Image01-RwxwuRZg.js","assets/Tool01-Doogi-IK.js","assets/select-virtual-mcp-DsImheli.js","assets/integration-icon-Dyr7fOYU.js","assets/use-virtual-mcp-DCxXK_bv.js","assets/use-create-virtual-mcp-DZAv89rZ.js","assets/use-mcp-resources-BxIahbOo.js","assets/collapsible-DcaWkNTt.js","assets/index-BObCXgKJ.js","assets/marked.esm-BaswSlok.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-hLmmzHl_.js","assets/types-BtTmvTe4.js","assets/Globe02-X8fGWI0t.js","assets/LayersTwo01-DEwkReGL.js","assets/XClose-BxUlnJUs.js","assets/Clock-Cu62NiMl.js","assets/useSuspenseInfiniteQuery-Czq4y4BP.js","assets/editable-task-title-BR-xQ-UT.js","assets/ChevronLeft-lVdUD9SW.js","assets/tasks-panel-DBJx0hs6.js","assets/collection-search-nKZEJ_r3.js","assets/user-8V0wpye0.js","assets/format-time-CMKyl-GC.js","assets/empty-state-BuGXY27l.js","assets/create-project-dialog-M-dgrV_c.js","assets/use-project-XBmxO4XX.js","assets/Building02-B5vUKe4K.js","assets/create-organization-dialog-pXQ89_sr.js","assets/File06-BocZAjHf.js","assets/Shield01-BYpsgCVA.js","assets/Inbox01-B7dU6IpS.js","assets/use-mcp-tools-kv4r4Zvn.js","assets/resizable-BwEPpKFX.js","assets/home-C52P_wmy.js","assets/project-layout-CBbKmowd.js","assets/Zap-0WHKFRes.js","assets/Code01-DA4cXrzu.js","assets/logo-upload-7WcycT9q.js","assets/project-plugins-DqmH9sWQ.js","assets/registry-utils-DZHZD5gP.js","assets/binder-C1eSZFT4.js","assets/use-install-from-registry-Ch6GOwHv.js","assets/extract-connection-data-DhU56Zd0.js","assets/generate-id-DRuK_WRM.js","assets/members-Sgl6kVS6.js","assets/collection-display-button-BcIJp1SX.js","assets/ArrowDown-DrJY3Wf3.js","assets/breadcrumb-C8hDXS86.js","assets/collection-table-wrapper-Bq15EL3p.js","assets/use-members-Coq2XO1k.js","assets/DotsHorizontal-DE3Ptwny.js","assets/command-Bk-fXiVb.js","assets/index-hmkE8HuP.js","assets/page-BQl7Ie3w.js","assets/tasks-CazLoC59.js","assets/layout-Ck4QNb1R.js","assets/general-DCfBGmuh.js","assets/danger-zone-BhDM5wIc.js","assets/dependencies-CPYZFhhf.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/sidebar-settings-U5rAu7py.js","assets/plugins-CzL725OF.js","assets/danger-DqsrtWLB.js","assets/projects-list-Bz_1RhAg.js","assets/connections-CMaQr-QY.js","assets/collection-tabs-qLP6ozkD.js","assets/connection-card-BYUbg7iO.js","assets/use-infinite-scroll-j2WybGGN.js","assets/use-list-state-Baq-X1EV.js","assets/use-store-discovery-D-xa6Q86.js","assets/connection-slug-Bw8dtz1U.js","assets/slugify-CEUa2lfQ.js","assets/CheckSquare-Bd5OlGNx.js","assets/Terminal-ZymOmGb9.js","assets/env-vars-editor-VoVbIy9n.js","assets/connection-detail-Zdtj4TKi.js","assets/index-Dumm3WtY.js","assets/index-BzPzEjOV.js","assets/index-DiczHAor.js","assets/layout-VG2uM_nk.js","assets/monitoring-stats-row-CiWvBCYV.js","assets/tools-list-JehNbMf9.js","assets/collection-detail-Dsgpohom.js","assets/save-actions-Z-_7bu1u.js","assets/monaco-editor-BS1-hh4n.js","assets/empty-state-CGSu9IQ9.js","assets/scroll-area-CwrVaRUF.js","assets/monitoring-DWB-fw7M.js","assets/time-range-picker-BCm8UHQI.js","assets/Edit05-DwDDlBNQ.js","assets/monitoring-dashboard-view-BUxqPLpn.js","assets/monitoring-dashboard-edit-DdNrWKBz.js","assets/page-DfQnSuW1.js","assets/mcp-server-card-CwYAe4vO.js","assets/mcp-server-detail-CjZvaa-f.js","assets/InfoCircle-BO2XWy7v.js","assets/mcp-server-detail-DWnTz46N.css","assets/automations-C9eao1B2.js","assets/use-automations-D-X6Oij9.js","assets/automation-detail-C1-q2EzY.js","assets/agents-PmHD6Xb_.js","assets/agent-connections-preview-BEmLqtx5.js","assets/agent-detail-jg81y7ZA.js","assets/project-app-view-lqZ02NJN.js","assets/workflow-Bb3JE-XH.js","assets/dynamic-plugin-layout-D0dkPO22.js"])))=>i.map(i=>d[i]);
2
+ function b5(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const c of i.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();const w5="modulepreload",S5=function(e){return"/"+e},sx={},ht=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let c=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),d=u?.nonce||u?.getAttribute("nonce");a=c(n.map(f=>{if(f=S5(f),f in sx)return;sx[f]=!0;const m=f.endsWith(".css"),p=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const g=document.createElement("link");if(g.rel=m?"stylesheet":w5,m||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),m)return new Promise((y,w)=>{g.addEventListener("load",y),g.addEventListener("error",()=>w(Error(`Unable to preload CSS for ${f}`)))})}))}function i(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return a.then(c=>{for(const u of c||[])u.status==="rejected"&&i(u.reason);return t().catch(i)})};var hae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ga(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xy={exports:{}},_u={};var ix;function E5(){if(ix)return _u;ix=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,i){var c=null;if(i!==void 0&&(c=""+i),a.key!==void 0&&(c=""+a.key),"key"in a){i={};for(var u in a)u!=="key"&&(i[u]=a[u])}else i=a;return a=i.ref,{$$typeof:e,type:r,key:c,ref:a!==void 0?a:null,props:i}}return _u.Fragment=t,_u.jsx=n,_u.jsxs=n,_u}var cx;function R5(){return cx||(cx=1,xy.exports=E5()),xy.exports}var x=R5(),Ty={exports:{}},bu={},Oy={exports:{}},Cy={};var lx;function x5(){return lx||(lx=1,(function(e){function t(F,Y){var se=F.length;F.push(Y);e:for(;0<se;){var fe=se-1>>>1,K=F[fe];if(0<a(K,Y))F[fe]=Y,F[se]=K,se=fe;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var Y=F[0],se=F.pop();if(se!==Y){F[0]=se;e:for(var fe=0,K=F.length,D=K>>>1;fe<D;){var q=2*(fe+1)-1,B=F[q],L=q+1,z=F[L];if(0>a(B,se))L<K&&0>a(z,B)?(F[fe]=z,F[L]=se,fe=L):(F[fe]=B,F[q]=se,fe=q);else if(L<K&&0>a(z,se))F[fe]=z,F[L]=se,fe=L;else break e}}return Y}function a(F,Y){var se=F.sortIndex-Y.sortIndex;return se!==0?se:F.id-Y.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var c=Date,u=c.now();e.unstable_now=function(){return c.now()-u}}var d=[],f=[],m=1,p=null,g=3,y=!1,w=!1,b=!1,S=!1,R=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function O(F){for(var Y=n(f);Y!==null;){if(Y.callback===null)r(f);else if(Y.startTime<=F)r(f),Y.sortIndex=Y.expirationTime,t(d,Y);else break;Y=n(f)}}function C(F){if(b=!1,O(F),!w)if(n(d)!==null)w=!0,I||(I=!0,G());else{var Y=n(f);Y!==null&&le(C,Y.startTime-F)}}var I=!1,k=-1,P=5,$=-1;function W(){return S?!0:!(e.unstable_now()-$<P)}function V(){if(S=!1,I){var F=e.unstable_now();$=F;var Y=!0;try{e:{w=!1,b&&(b=!1,E(k),k=-1),y=!0;var se=g;try{t:{for(O(F),p=n(d);p!==null&&!(p.expirationTime>F&&W());){var fe=p.callback;if(typeof fe=="function"){p.callback=null,g=p.priorityLevel;var K=fe(p.expirationTime<=F);if(F=e.unstable_now(),typeof K=="function"){p.callback=K,O(F),Y=!0;break t}p===n(d)&&r(d),O(F)}else r(d);p=n(d)}if(p!==null)Y=!0;else{var D=n(f);D!==null&&le(C,D.startTime-F),Y=!1}}break e}finally{p=null,g=se,y=!1}Y=void 0}}finally{Y?G():I=!1}}}var G;if(typeof T=="function")G=function(){T(V)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,J=U.port2;U.port1.onmessage=V,G=function(){J.postMessage(null)}}else G=function(){R(V,0)};function le(F,Y){k=R(function(){F(e.unstable_now())},Y)}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(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(F){switch(g){case 1:case 2:case 3:var Y=3;break;default:Y=g}var se=g;g=Y;try{return F()}finally{g=se}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(F,Y){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var se=g;g=F;try{return Y()}finally{g=se}},e.unstable_scheduleCallback=function(F,Y,se){var fe=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?fe+se:fe):se=fe,F){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=se+K,F={id:m++,callback:Y,priorityLevel:F,startTime:se,expirationTime:K,sortIndex:-1},se>fe?(F.sortIndex=se,t(f,F),n(d)===null&&F===n(f)&&(b?(E(k),k=-1):b=!0,le(C,se-fe))):(F.sortIndex=K,t(d,F),w||y||(w=!0,I||(I=!0,G()))),F},e.unstable_shouldYield=W,e.unstable_wrapCallback=function(F){var Y=g;return function(){var se=g;g=Y;try{return F.apply(this,arguments)}finally{g=se}}}})(Cy)),Cy}var ux;function T5(){return ux||(ux=1,Oy.exports=x5()),Oy.exports}var Ay={exports:{}},nt={};var dx;function O5(){if(dx)return nt;dx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function y(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,S={};function R(D,q,B){this.props=D,this.context=q,this.refs=S,this.updater=B||w}R.prototype.isReactComponent={},R.prototype.setState=function(D,q){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,q,"setState")},R.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function E(){}E.prototype=R.prototype;function T(D,q,B){this.props=D,this.context=q,this.refs=S,this.updater=B||w}var O=T.prototype=new E;O.constructor=T,b(O,R.prototype),O.isPureReactComponent=!0;var C=Array.isArray;function I(){}var k={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(D,q,B){var L=B.ref;return{$$typeof:e,type:D,key:q,ref:L!==void 0?L:null,props:B}}function W(D,q){return $(D.type,q,D.props)}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function G(D){var q={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(B){return q[B]})}var U=/\/+/g;function J(D,q){return typeof D=="object"&&D!==null&&D.key!=null?G(""+D.key):q.toString(36)}function le(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(I,I):(D.status="pending",D.then(function(q){D.status==="pending"&&(D.status="fulfilled",D.value=q)},function(q){D.status==="pending"&&(D.status="rejected",D.reason=q)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function F(D,q,B,L,z){var Q=typeof D;(Q==="undefined"||Q==="boolean")&&(D=null);var me=!1;if(D===null)me=!0;else switch(Q){case"bigint":case"string":case"number":me=!0;break;case"object":switch(D.$$typeof){case e:case t:me=!0;break;case m:return me=D._init,F(me(D._payload),q,B,L,z)}}if(me)return z=z(D),me=L===""?"."+J(D,0):L,C(z)?(B="",me!=null&&(B=me.replace(U,"$&/")+"/"),F(z,q,B,"",function(Ie){return Ie})):z!=null&&(V(z)&&(z=W(z,B+(z.key==null||D&&D.key===z.key?"":(""+z.key).replace(U,"$&/")+"/")+me)),q.push(z)),1;me=0;var ve=L===""?".":L+":";if(C(D))for(var Ce=0;Ce<D.length;Ce++)L=D[Ce],Q=ve+J(L,Ce),me+=F(L,q,B,Q,z);else if(Ce=y(D),typeof Ce=="function")for(D=Ce.call(D),Ce=0;!(L=D.next()).done;)L=L.value,Q=ve+J(L,Ce++),me+=F(L,q,B,Q,z);else if(Q==="object"){if(typeof D.then=="function")return F(le(D),q,B,L,z);throw q=String(D),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return me}function Y(D,q,B){if(D==null)return D;var L=[],z=0;return F(D,L,"","",function(Q){return q.call(B,Q,z++)}),L}function se(D){if(D._status===-1){var q=D._result;q=q(),q.then(function(B){(D._status===0||D._status===-1)&&(D._status=1,D._result=B)},function(B){(D._status===0||D._status===-1)&&(D._status=2,D._result=B)}),D._status===-1&&(D._status=0,D._result=q)}if(D._status===1)return D._result.default;throw D._result}var fe=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},K={map:Y,forEach:function(D,q,B){Y(D,function(){q.apply(this,arguments)},B)},count:function(D){var q=0;return Y(D,function(){q++}),q},toArray:function(D){return Y(D,function(q){return q})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return nt.Activity=p,nt.Children=K,nt.Component=R,nt.Fragment=n,nt.Profiler=a,nt.PureComponent=T,nt.StrictMode=r,nt.Suspense=d,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=k,nt.__COMPILER_RUNTIME={__proto__:null,c:function(D){return k.H.useMemoCache(D)}},nt.cache=function(D){return function(){return D.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(D,q,B){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var L=b({},D.props),z=D.key;if(q!=null)for(Q in q.key!==void 0&&(z=""+q.key),q)!P.call(q,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&q.ref===void 0||(L[Q]=q[Q]);var Q=arguments.length-2;if(Q===1)L.children=B;else if(1<Q){for(var me=Array(Q),ve=0;ve<Q;ve++)me[ve]=arguments[ve+2];L.children=me}return $(D.type,z,L)},nt.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:i,_context:D},D},nt.createElement=function(D,q,B){var L,z={},Q=null;if(q!=null)for(L in q.key!==void 0&&(Q=""+q.key),q)P.call(q,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(z[L]=q[L]);var me=arguments.length-2;if(me===1)z.children=B;else if(1<me){for(var ve=Array(me),Ce=0;Ce<me;Ce++)ve[Ce]=arguments[Ce+2];z.children=ve}if(D&&D.defaultProps)for(L in me=D.defaultProps,me)z[L]===void 0&&(z[L]=me[L]);return $(D,Q,z)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(D){return{$$typeof:u,render:D}},nt.isValidElement=V,nt.lazy=function(D){return{$$typeof:m,_payload:{_status:-1,_result:D},_init:se}},nt.memo=function(D,q){return{$$typeof:f,type:D,compare:q===void 0?null:q}},nt.startTransition=function(D){var q=k.T,B={};k.T=B;try{var L=D(),z=k.S;z!==null&&z(B,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(I,fe)}catch(Q){fe(Q)}finally{q!==null&&B.types!==null&&(q.types=B.types),k.T=q}},nt.unstable_useCacheRefresh=function(){return k.H.useCacheRefresh()},nt.use=function(D){return k.H.use(D)},nt.useActionState=function(D,q,B){return k.H.useActionState(D,q,B)},nt.useCallback=function(D,q){return k.H.useCallback(D,q)},nt.useContext=function(D){return k.H.useContext(D)},nt.useDebugValue=function(){},nt.useDeferredValue=function(D,q){return k.H.useDeferredValue(D,q)},nt.useEffect=function(D,q){return k.H.useEffect(D,q)},nt.useEffectEvent=function(D){return k.H.useEffectEvent(D)},nt.useId=function(){return k.H.useId()},nt.useImperativeHandle=function(D,q,B){return k.H.useImperativeHandle(D,q,B)},nt.useInsertionEffect=function(D,q){return k.H.useInsertionEffect(D,q)},nt.useLayoutEffect=function(D,q){return k.H.useLayoutEffect(D,q)},nt.useMemo=function(D,q){return k.H.useMemo(D,q)},nt.useOptimistic=function(D,q){return k.H.useOptimistic(D,q)},nt.useReducer=function(D,q,B){return k.H.useReducer(D,q,B)},nt.useRef=function(D){return k.H.useRef(D)},nt.useState=function(D){return k.H.useState(D)},nt.useSyncExternalStore=function(D,q,B){return k.H.useSyncExternalStore(D,q,B)},nt.useTransition=function(){return k.H.useTransition()},nt.version="19.2.4",nt}var fx;function Ks(){return fx||(fx=1,Ay.exports=O5()),Ay.exports}var Iy={exports:{}},hr={};var hx;function C5(){if(hx)return hr;hx=1;var e=Ks();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)f+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function i(d,f,m){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:p==null?null:""+p,children:d,containerInfo:f,implementation:m}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return hr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hr.createPortal=function(d,f){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return i(d,f,null,m)},hr.flushSync=function(d){var f=c.T,m=r.p;try{if(c.T=null,r.p=2,d)return d()}finally{c.T=f,r.p=m,r.d.f()}},hr.preconnect=function(d,f){typeof d=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(d,f))},hr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},hr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;m==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:y}):m==="script"&&r.d.X(d,{crossOrigin:p,integrity:g,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},hr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var m=u(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(d)},hr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var m=f.as,p=u(m,f.crossOrigin);r.d.L(d,m,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},hr.preloadModule=function(d,f){if(typeof d=="string")if(f){var m=u(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:m,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},hr.requestFormReset=function(d){r.d.r(d)},hr.unstable_batchedUpdates=function(d,f){return d(f)},hr.useFormState=function(d,f,m){return c.H.useFormState(d,f,m)},hr.useFormStatus=function(){return c.H.useHostTransitionStatus()},hr.version="19.2.4",hr}var px;function uA(){if(px)return Iy.exports;px=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Iy.exports=C5(),Iy.exports}var mx;function A5(){if(mx)return bu;mx=1;var e=T5(),t=Ks(),n=uA();function r(o){var s="https://react.dev/errors/"+o;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+o+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function i(o){var s=o,l=o;if(o.alternate)for(;s.return;)s=s.return;else{o=s;do s=o,(s.flags&4098)!==0&&(l=s.return),o=s.return;while(o)}return s.tag===3?l:null}function c(o){if(o.tag===13){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function u(o){if(o.tag===31){var s=o.memoizedState;if(s===null&&(o=o.alternate,o!==null&&(s=o.memoizedState)),s!==null)return s.dehydrated}return null}function d(o){if(i(o)!==o)throw Error(r(188))}function f(o){var s=o.alternate;if(!s){if(s=i(o),s===null)throw Error(r(188));return s!==o?null:o}for(var l=o,h=s;;){var v=l.return;if(v===null)break;var _=v.alternate;if(_===null){if(h=v.return,h!==null){l=h;continue}break}if(v.child===_.child){for(_=v.child;_;){if(_===l)return d(v),o;if(_===h)return d(v),s;_=_.sibling}throw Error(r(188))}if(l.return!==h.return)l=v,h=_;else{for(var N=!1,j=v.child;j;){if(j===l){N=!0,l=v,h=_;break}if(j===h){N=!0,h=v,l=_;break}j=j.sibling}if(!N){for(j=_.child;j;){if(j===l){N=!0,l=_,h=v;break}if(j===h){N=!0,h=_,l=v;break}j=j.sibling}if(!N)throw Error(r(189))}}if(l.alternate!==h)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?o:s}function m(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o;for(o=o.child;o!==null;){if(s=m(o),s!==null)return s;o=o.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),O=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(o){return o===null||typeof o!="object"?null:(o=V&&o[V]||o["@@iterator"],typeof o=="function"?o:null)}var U=Symbol.for("react.client.reference");function J(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===U?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case b:return"Fragment";case R:return"Profiler";case S:return"StrictMode";case C:return"Suspense";case I:return"SuspenseList";case $:return"Activity"}if(typeof o=="object")switch(o.$$typeof){case w:return"Portal";case T:return o.displayName||"Context";case E:return(o._context.displayName||"Context")+".Consumer";case O:var s=o.render;return o=o.displayName,o||(o=s.displayName||s.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case k:return s=o.displayName||null,s!==null?s:J(o.type)||"Memo";case P:s=o._payload,o=o._init;try{return J(o(s))}catch{}}return null}var le=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},fe=[],K=-1;function D(o){return{current:o}}function q(o){0>K||(o.current=fe[K],fe[K]=null,K--)}function B(o,s){K++,fe[K]=o.current,o.current=s}var L=D(null),z=D(null),Q=D(null),me=D(null);function ve(o,s){switch(B(Q,s),B(z,o),B(L,null),s.nodeType){case 9:case 11:o=(o=s.documentElement)&&(o=o.namespaceURI)?AR(o):0;break;default:if(o=s.tagName,s=s.namespaceURI)s=AR(s),o=IR(s,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}q(L),B(L,o)}function Ce(){q(L),q(z),q(Q)}function Ie(o){o.memoizedState!==null&&B(me,o);var s=L.current,l=IR(s,o.type);s!==l&&(B(z,o),B(L,l))}function H(o){z.current===o&&(q(L),q(z)),me.current===o&&(q(me),mu._currentValue=se)}var re,_e;function ae(o){if(re===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||"",_e=-1<l.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+re+o+_e}var ue=!1;function Oe(o,s){if(!o||ue)return"";ue=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var Te=function(){throw Error()};if(Object.defineProperty(Te.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Te,[])}catch(ge){var pe=ge}Reflect.construct(o,[],Te)}else{try{Te.call()}catch(ge){pe=ge}o.call(Te.prototype)}}else{try{throw Error()}catch(ge){pe=ge}(Te=o())&&typeof Te.catch=="function"&&Te.catch(function(){})}}catch(ge){if(ge&&pe&&typeof ge.stack=="string")return[ge.stack,pe.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=h.DetermineComponentFrameRoot(),N=_[0],j=_[1];if(N&&j){var X=N.split(`
5
+ `),he=j.split(`
6
+ `);for(v=h=0;h<X.length&&!X[h].includes("DetermineComponentFrameRoot");)h++;for(;v<he.length&&!he[v].includes("DetermineComponentFrameRoot");)v++;if(h===X.length||v===he.length)for(h=X.length-1,v=he.length-1;1<=h&&0<=v&&X[h]!==he[v];)v--;for(;1<=h&&0<=v;h--,v--)if(X[h]!==he[v]){if(h!==1||v!==1)do if(h--,v--,0>v||X[h]!==he[v]){var be=`
7
+ `+X[h].replace(" at new "," at ");return o.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",o.displayName)),be}while(1<=h&&0<=v);break}}}finally{ue=!1,Error.prepareStackTrace=l}return(l=o?o.displayName||o.name:"")?ae(l):""}function Pe(o,s){switch(o.tag){case 26:case 27:case 5:return ae(o.type);case 16:return ae("Lazy");case 13:return o.child!==s&&s!==null?ae("Suspense Fallback"):ae("Suspense");case 19:return ae("SuspenseList");case 0:case 15:return Oe(o.type,!1);case 11:return Oe(o.type.render,!1);case 1:return Oe(o.type,!0);case 31:return ae("Activity");default:return""}}function Je(o){try{var s="",l=null;do s+=Pe(o,l),l=o,o=o.return;while(o);return s}catch(h){return`
8
+ Error generating stack: `+h.message+`
9
+ `+h.stack}}var Be=Object.prototype.hasOwnProperty,Ke=e.unstable_scheduleCallback,Z=e.unstable_cancelCallback,te=e.unstable_shouldYield,oe=e.unstable_requestPaint,Se=e.unstable_now,xe=e.unstable_getCurrentPriorityLevel,Re=e.unstable_ImmediatePriority,Ne=e.unstable_UserBlockingPriority,et=e.unstable_NormalPriority,st=e.unstable_LowPriority,Pt=e.unstable_IdlePriority,dr=e.log,nn=e.unstable_setDisableYieldValue,Rn=null,rn=null;function $n(o){if(typeof dr=="function"&&nn(o),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(Rn,o)}catch{}}var xn=Math.clz32?Math.clz32:qe,Qa=Math.log,ga=Math.LN2;function qe(o){return o>>>=0,o===0?32:31-(Qa(o)/ga|0)|0}var Et=256,kt=262144,dt=4194304;function Dt(o){var s=o&42;if(s!==0)return s;switch(o&-o){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 o&261888;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function He(o,s,l){var h=o.pendingLanes;if(h===0)return 0;var v=0,_=o.suspendedLanes,N=o.pingedLanes;o=o.warmLanes;var j=h&134217727;return j!==0?(h=j&~_,h!==0?v=Dt(h):(N&=j,N!==0?v=Dt(N):l||(l=j&~o,l!==0&&(v=Dt(l))))):(j=h&~_,j!==0?v=Dt(j):N!==0?v=Dt(N):l||(l=h&~o,l!==0&&(v=Dt(l)))),v===0?0:s!==0&&s!==v&&(s&_)===0&&(_=v&-v,l=s&-s,_>=l||_===32&&(l&4194048)!==0)?s:v}function ft(o,s){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&s)===0}function Xt(o,s){switch(o){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Wt(){var o=dt;return dt<<=1,(dt&62914560)===0&&(dt=4194304),o}function fr(o){for(var s=[],l=0;31>l;l++)s.push(o);return s}function Lt(o,s){o.pendingLanes|=s,s!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function on(o,s,l,h,v,_){var N=o.pendingLanes;o.pendingLanes=l,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=l,o.entangledLanes&=l,o.errorRecoveryDisabledLanes&=l,o.shellSuspendCounter=0;var j=o.entanglements,X=o.expirationTimes,he=o.hiddenUpdates;for(l=N&~l;0<l;){var be=31-xn(l),Te=1<<be;j[be]=0,X[be]=-1;var pe=he[be];if(pe!==null)for(he[be]=null,be=0;be<pe.length;be++){var ge=pe[be];ge!==null&&(ge.lane&=-536870913)}l&=~Te}h!==0&&io(o,h,0),_!==0&&v===0&&o.tag!==0&&(o.suspendedLanes|=_&~(N&~s))}function io(o,s,l){o.pendingLanes|=s,o.suspendedLanes&=~s;var h=31-xn(s);o.entangledLanes|=s,o.entanglements[h]=o.entanglements[h]|1073741824|l&261930}function Qn(o,s){var l=o.entangledLanes|=s;for(o=o.entanglements;l;){var h=31-xn(l),v=1<<h;v&s|o[h]&s&&(o[h]|=s),l&=~v}}function xr(o,s){var l=s&-s;return l=(l&42)!==0?1:Xi(l),(l&(o.suspendedLanes|s))!==0?0:l}function Xi(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=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:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function Io(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function mg(){var o=Y.p;return o!==0?o:(o=window.event,o===void 0?32:JR(o.type))}function mw(o,s){var l=Y.p;try{return Y.p=o,s()}finally{Y.p=l}}var Xa=Math.random().toString(36).slice(2),Xn="__reactFiber$"+Xa,Tr="__reactProps$"+Xa,Ji="__reactContainer$"+Xa,gg="__reactEvents$"+Xa,l3="__reactListeners$"+Xa,u3="__reactHandles$"+Xa,gw="__reactResources$"+Xa,Il="__reactMarker$"+Xa;function vg(o){delete o[Xn],delete o[Tr],delete o[gg],delete o[l3],delete o[u3]}function ec(o){var s=o[Xn];if(s)return s;for(var l=o.parentNode;l;){if(s=l[Ji]||l[Xn]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(o=jR(o);o!==null;){if(l=o[Xn])return l;o=jR(o)}return s}o=l,l=o.parentNode}return null}function tc(o){if(o=o[Xn]||o[Ji]){var s=o.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return o}return null}function kl(o){var s=o.tag;if(s===5||s===26||s===27||s===6)return o.stateNode;throw Error(r(33))}function nc(o){var s=o[gw];return s||(s=o[gw]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Hn(o){o[Il]=!0}var vw=new Set,yw={};function ni(o,s){rc(o,s),rc(o+"Capture",s)}function rc(o,s){for(yw[o]=s,o=0;o<s.length;o++)vw.add(s[o])}var d3=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]*$"),_w={},bw={};function f3(o){return Be.call(bw,o)?!0:Be.call(_w,o)?!1:d3.test(o)?bw[o]=!0:(_w[o]=!0,!1)}function Bd(o,s,l){if(f3(s))if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":o.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){o.removeAttribute(s);return}}o.setAttribute(s,""+l)}}function qd(o,s,l){if(l===null)o.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(s);return}o.setAttribute(s,""+l)}}function va(o,s,l,h){if(h===null)o.removeAttribute(l);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttributeNS(s,l,""+h)}}function co(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ww(o){var s=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function h3(o,s,l){var h=Object.getOwnPropertyDescriptor(o.constructor.prototype,s);if(!o.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,_=h.set;return Object.defineProperty(o,s,{configurable:!0,get:function(){return v.call(this)},set:function(N){l=""+N,_.call(this,N)}}),Object.defineProperty(o,s,{enumerable:h.enumerable}),{getValue:function(){return l},setValue:function(N){l=""+N},stopTracking:function(){o._valueTracker=null,delete o[s]}}}}function yg(o){if(!o._valueTracker){var s=ww(o)?"checked":"value";o._valueTracker=h3(o,s,""+o[s])}}function Sw(o){if(!o)return!1;var s=o._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return o&&(h=ww(o)?o.checked?"true":"false":o.value),o=h,o!==l?(s.setValue(o),!0):!1}function Hd(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}var p3=/[\n"\\]/g;function lo(o){return o.replace(p3,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function _g(o,s,l,h,v,_,N,j){o.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?o.type=N:o.removeAttribute("type"),s!=null?N==="number"?(s===0&&o.value===""||o.value!=s)&&(o.value=""+co(s)):o.value!==""+co(s)&&(o.value=""+co(s)):N!=="submit"&&N!=="reset"||o.removeAttribute("value"),s!=null?bg(o,N,co(s)):l!=null?bg(o,N,co(l)):h!=null&&o.removeAttribute("value"),v==null&&_!=null&&(o.defaultChecked=!!_),v!=null&&(o.checked=v&&typeof v!="function"&&typeof v!="symbol"),j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"?o.name=""+co(j):o.removeAttribute("name")}function Ew(o,s,l,h,v,_,N,j){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(o.type=_),s!=null||l!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){yg(o);return}l=l!=null?""+co(l):"",s=s!=null?""+co(s):l,j||s===o.value||(o.value=s),o.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,o.checked=j?o.checked:!!h,o.defaultChecked=!!h,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(o.name=N),yg(o)}function bg(o,s,l){s==="number"&&Hd(o.ownerDocument)===o||o.defaultValue===""+l||(o.defaultValue=""+l)}function oc(o,s,l,h){if(o=o.options,s){s={};for(var v=0;v<l.length;v++)s["$"+l[v]]=!0;for(l=0;l<o.length;l++)v=s.hasOwnProperty("$"+o[l].value),o[l].selected!==v&&(o[l].selected=v),v&&h&&(o[l].defaultSelected=!0)}else{for(l=""+co(l),s=null,v=0;v<o.length;v++){if(o[v].value===l){o[v].selected=!0,h&&(o[v].defaultSelected=!0);return}s!==null||o[v].disabled||(s=o[v])}s!==null&&(s.selected=!0)}}function Rw(o,s,l){if(s!=null&&(s=""+co(s),s!==o.value&&(o.value=s),l==null)){o.defaultValue!==s&&(o.defaultValue=s);return}o.defaultValue=l!=null?""+co(l):""}function xw(o,s,l,h){if(s==null){if(h!=null){if(l!=null)throw Error(r(92));if(le(h)){if(1<h.length)throw Error(r(93));h=h[0]}l=h}l==null&&(l=""),s=l}l=co(s),o.defaultValue=l,h=o.textContent,h===l&&h!==""&&h!==null&&(o.value=h),yg(o)}function ac(o,s){if(s){var l=o.firstChild;if(l&&l===o.lastChild&&l.nodeType===3){l.nodeValue=s;return}}o.textContent=s}var m3=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 Tw(o,s,l){var h=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?h?o.setProperty(s,""):s==="float"?o.cssFloat="":o[s]="":h?o.setProperty(s,l):typeof l!="number"||l===0||m3.has(s)?s==="float"?o.cssFloat=l:o[s]=(""+l).trim():o[s]=l+"px"}function Ow(o,s,l){if(s!=null&&typeof s!="object")throw Error(r(62));if(o=o.style,l!=null){for(var h in l)!l.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?o.setProperty(h,""):h==="float"?o.cssFloat="":o[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&l[v]!==h&&Tw(o,v,h)}else for(var _ in s)s.hasOwnProperty(_)&&Tw(o,_,s[_])}function wg(o){if(o.indexOf("-")===-1)return!1;switch(o){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 g3=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"]]),v3=/^[\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 Gd(o){return v3.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function ya(){}var Sg=null;function Eg(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var sc=null,ic=null;function Cw(o){var s=tc(o);if(s&&(o=s.stateNode)){var l=o[Tr]||null;e:switch(o=s.stateNode,s.type){case"input":if(_g(o,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=o;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+lo(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==o&&h.form===o.form){var v=h[Tr]||null;if(!v)throw Error(r(90));_g(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<l.length;s++)h=l[s],h.form===o.form&&Sw(h)}break e;case"textarea":Rw(o,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&oc(o,!!l.multiple,s,!1)}}}var Rg=!1;function Aw(o,s,l){if(Rg)return o(s,l);Rg=!0;try{var h=o(s);return h}finally{if(Rg=!1,(sc!==null||ic!==null)&&(Pf(),sc&&(s=sc,o=ic,ic=sc=null,Cw(s),o)))for(s=0;s<o.length;s++)Cw(o[s])}}function Nl(o,s){var l=o.stateNode;if(l===null)return null;var h=l[Tr]||null;if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(o=o.type,h=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!h;break e;default:o=!1}if(o)return null;if(l&&typeof l!="function")throw Error(r(231,s,typeof l));return l}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xg=!1;if(_a)try{var Ml={};Object.defineProperty(Ml,"passive",{get:function(){xg=!0}}),window.addEventListener("test",Ml,Ml),window.removeEventListener("test",Ml,Ml)}catch{xg=!1}var Ja=null,Tg=null,Zd=null;function Iw(){if(Zd)return Zd;var o,s=Tg,l=s.length,h,v="value"in Ja?Ja.value:Ja.textContent,_=v.length;for(o=0;o<l&&s[o]===v[o];o++);var N=l-o;for(h=1;h<=N&&s[l-h]===v[_-h];h++);return Zd=v.slice(o,1<h?1-h:void 0)}function Wd(o){var s=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&s===13&&(o=13)):o=s,o===10&&(o=13),32<=o||o===13?o:0}function Kd(){return!0}function kw(){return!1}function Or(o){function s(l,h,v,_,N){this._reactName=l,this._targetInst=v,this.type=h,this.nativeEvent=_,this.target=N,this.currentTarget=null;for(var j in o)o.hasOwnProperty(j)&&(l=o[j],this[j]=l?l(_):_[j]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Kd:kw,this.isPropagationStopped=kw,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Kd)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Kd)},persist:function(){},isPersistent:Kd}),s}var ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yd=Or(ri),Pl=p({},ri,{view:0,detail:0}),y3=Or(Pl),Og,Cg,Dl,Qd=p({},Pl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ig,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Dl&&(Dl&&o.type==="mousemove"?(Og=o.screenX-Dl.screenX,Cg=o.screenY-Dl.screenY):Cg=Og=0,Dl=o),Og)},movementY:function(o){return"movementY"in o?o.movementY:Cg}}),Nw=Or(Qd),_3=p({},Qd,{dataTransfer:0}),b3=Or(_3),w3=p({},Pl,{relatedTarget:0}),Ag=Or(w3),S3=p({},ri,{animationName:0,elapsedTime:0,pseudoElement:0}),E3=Or(S3),R3=p({},ri,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),x3=Or(R3),T3=p({},ri,{data:0}),Mw=Or(T3),O3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},C3={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"},A3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function I3(o){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(o):(o=A3[o])?!!s[o]:!1}function Ig(){return I3}var k3=p({},Pl,{key:function(o){if(o.key){var s=O3[o.key]||o.key;if(s!=="Unidentified")return s}return o.type==="keypress"?(o=Wd(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?C3[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ig,charCode:function(o){return o.type==="keypress"?Wd(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Wd(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),N3=Or(k3),M3=p({},Qd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pw=Or(M3),P3=p({},Pl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ig}),D3=Or(P3),L3=p({},ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),j3=Or(L3),$3=p({},Qd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),U3=Or($3),z3=p({},ri,{newState:0,oldState:0}),V3=Or(z3),F3=[9,13,27,32],kg=_a&&"CompositionEvent"in window,Ll=null;_a&&"documentMode"in document&&(Ll=document.documentMode);var B3=_a&&"TextEvent"in window&&!Ll,Dw=_a&&(!kg||Ll&&8<Ll&&11>=Ll),Lw=" ",jw=!1;function $w(o,s){switch(o){case"keyup":return F3.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uw(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var cc=!1;function q3(o,s){switch(o){case"compositionend":return Uw(s);case"keypress":return s.which!==32?null:(jw=!0,Lw);case"textInput":return o=s.data,o===Lw&&jw?null:o;default:return null}}function H3(o,s){if(cc)return o==="compositionend"||!kg&&$w(o,s)?(o=Iw(),Zd=Tg=Ja=null,cc=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Dw&&s.locale!=="ko"?null:s.data;default:return null}}var G3={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 zw(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s==="input"?!!G3[o.type]:s==="textarea"}function Vw(o,s,l,h){sc?ic?ic.push(h):ic=[h]:sc=h,s=Vf(s,"onChange"),0<s.length&&(l=new Yd("onChange","change",null,l,h),o.push({event:l,listeners:s}))}var jl=null,$l=null;function Z3(o){ER(o,0)}function Xd(o){var s=kl(o);if(Sw(s))return o}function Fw(o,s){if(o==="change")return s}var Bw=!1;if(_a){var Ng;if(_a){var Mg="oninput"in document;if(!Mg){var qw=document.createElement("div");qw.setAttribute("oninput","return;"),Mg=typeof qw.oninput=="function"}Ng=Mg}else Ng=!1;Bw=Ng&&(!document.documentMode||9<document.documentMode)}function Hw(){jl&&(jl.detachEvent("onpropertychange",Gw),$l=jl=null)}function Gw(o){if(o.propertyName==="value"&&Xd($l)){var s=[];Vw(s,$l,o,Eg(o)),Aw(Z3,s)}}function W3(o,s,l){o==="focusin"?(Hw(),jl=s,$l=l,jl.attachEvent("onpropertychange",Gw)):o==="focusout"&&Hw()}function K3(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Xd($l)}function Y3(o,s){if(o==="click")return Xd(s)}function Q3(o,s){if(o==="input"||o==="change")return Xd(s)}function X3(o,s){return o===s&&(o!==0||1/o===1/s)||o!==o&&s!==s}var zr=typeof Object.is=="function"?Object.is:X3;function Ul(o,s){if(zr(o,s))return!0;if(typeof o!="object"||o===null||typeof s!="object"||s===null)return!1;var l=Object.keys(o),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var v=l[h];if(!Be.call(s,v)||!zr(o[v],s[v]))return!1}return!0}function Zw(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Ww(o,s){var l=Zw(o);o=0;for(var h;l;){if(l.nodeType===3){if(h=o+l.textContent.length,o<=s&&h>=s)return{node:l,offset:s-o};o=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Zw(l)}}function Kw(o,s){return o&&s?o===s?!0:o&&o.nodeType===3?!1:s&&s.nodeType===3?Kw(o,s.parentNode):"contains"in o?o.contains(s):o.compareDocumentPosition?!!(o.compareDocumentPosition(s)&16):!1:!1}function Yw(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var s=Hd(o.document);s instanceof o.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)o=s.contentWindow;else break;s=Hd(o.document)}return s}function Pg(o){var s=o&&o.nodeName&&o.nodeName.toLowerCase();return s&&(s==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||s==="textarea"||o.contentEditable==="true")}var J3=_a&&"documentMode"in document&&11>=document.documentMode,lc=null,Dg=null,zl=null,Lg=!1;function Qw(o,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Lg||lc==null||lc!==Hd(h)||(h=lc,"selectionStart"in h&&Pg(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),zl&&Ul(zl,h)||(zl=h,h=Vf(Dg,"onSelect"),0<h.length&&(s=new Yd("onSelect","select",null,s,l),o.push({event:s,listeners:h}),s.target=lc)))}function oi(o,s){var l={};return l[o.toLowerCase()]=s.toLowerCase(),l["Webkit"+o]="webkit"+s,l["Moz"+o]="moz"+s,l}var uc={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionrun:oi("Transition","TransitionRun"),transitionstart:oi("Transition","TransitionStart"),transitioncancel:oi("Transition","TransitionCancel"),transitionend:oi("Transition","TransitionEnd")},jg={},Xw={};_a&&(Xw=document.createElement("div").style,"AnimationEvent"in window||(delete uc.animationend.animation,delete uc.animationiteration.animation,delete uc.animationstart.animation),"TransitionEvent"in window||delete uc.transitionend.transition);function ai(o){if(jg[o])return jg[o];if(!uc[o])return o;var s=uc[o],l;for(l in s)if(s.hasOwnProperty(l)&&l in Xw)return jg[o]=s[l];return o}var Jw=ai("animationend"),eS=ai("animationiteration"),tS=ai("animationstart"),eD=ai("transitionrun"),tD=ai("transitionstart"),nD=ai("transitioncancel"),nS=ai("transitionend"),rS=new Map,$g="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(" ");$g.push("scrollEnd");function ko(o,s){rS.set(o,s),ni(s,[o])}var Jd=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},uo=[],dc=0,Ug=0;function ef(){for(var o=dc,s=Ug=dc=0;s<o;){var l=uo[s];uo[s++]=null;var h=uo[s];uo[s++]=null;var v=uo[s];uo[s++]=null;var _=uo[s];if(uo[s++]=null,h!==null&&v!==null){var N=h.pending;N===null?v.next=v:(v.next=N.next,N.next=v),h.pending=v}_!==0&&oS(l,v,_)}}function tf(o,s,l,h){uo[dc++]=o,uo[dc++]=s,uo[dc++]=l,uo[dc++]=h,Ug|=h,o.lanes|=h,o=o.alternate,o!==null&&(o.lanes|=h)}function zg(o,s,l,h){return tf(o,s,l,h),nf(o)}function si(o,s){return tf(o,null,null,s),nf(o)}function oS(o,s,l){o.lanes|=l;var h=o.alternate;h!==null&&(h.lanes|=l);for(var v=!1,_=o.return;_!==null;)_.childLanes|=l,h=_.alternate,h!==null&&(h.childLanes|=l),_.tag===22&&(o=_.stateNode,o===null||o._visibility&1||(v=!0)),o=_,_=_.return;return o.tag===3?(_=o.stateNode,v&&s!==null&&(v=31-xn(l),o=_.hiddenUpdates,h=o[v],h===null?o[v]=[s]:h.push(s),s.lane=l|536870912),_):null}function nf(o){if(50<cu)throw cu=0,Kv=null,Error(r(185));for(var s=o.return;s!==null;)o=s,s=o.return;return o.tag===3?o.stateNode:null}var fc={};function rD(o,s,l,h){this.tag=o,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vr(o,s,l,h){return new rD(o,s,l,h)}function Vg(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ba(o,s){var l=o.alternate;return l===null?(l=Vr(o.tag,s,o.key,o.mode),l.elementType=o.elementType,l.type=o.type,l.stateNode=o.stateNode,l.alternate=o,o.alternate=l):(l.pendingProps=s,l.type=o.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=o.flags&65011712,l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,s=o.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=o.sibling,l.index=o.index,l.ref=o.ref,l.refCleanup=o.refCleanup,l}function aS(o,s){o.flags&=65011714;var l=o.alternate;return l===null?(o.childLanes=0,o.lanes=s,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,s=l.dependencies,o.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),o}function rf(o,s,l,h,v,_){var N=0;if(h=o,typeof o=="function")Vg(o)&&(N=1);else if(typeof o=="string")N=c5(o,l,L.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(o){case $:return o=Vr(31,l,s,v),o.elementType=$,o.lanes=_,o;case b:return ii(l.children,v,_,s);case S:N=8,v|=24;break;case R:return o=Vr(12,l,s,v|2),o.elementType=R,o.lanes=_,o;case C:return o=Vr(13,l,s,v),o.elementType=C,o.lanes=_,o;case I:return o=Vr(19,l,s,v),o.elementType=I,o.lanes=_,o;default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case T:N=10;break e;case E:N=9;break e;case O:N=11;break e;case k:N=14;break e;case P:N=16,h=null;break e}N=29,l=Error(r(130,o===null?"null":typeof o,"")),h=null}return s=Vr(N,l,s,v),s.elementType=o,s.type=h,s.lanes=_,s}function ii(o,s,l,h){return o=Vr(7,o,h,s),o.lanes=l,o}function Fg(o,s,l){return o=Vr(6,o,null,s),o.lanes=l,o}function sS(o){var s=Vr(18,null,null,0);return s.stateNode=o,s}function Bg(o,s,l){return s=Vr(4,o.children!==null?o.children:[],o.key,s),s.lanes=l,s.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},s}var iS=new WeakMap;function fo(o,s){if(typeof o=="object"&&o!==null){var l=iS.get(o);return l!==void 0?l:(s={value:o,source:s,stack:Je(s)},iS.set(o,s),s)}return{value:o,source:s,stack:Je(s)}}var hc=[],pc=0,of=null,Vl=0,ho=[],po=0,es=null,Qo=1,Xo="";function wa(o,s){hc[pc++]=Vl,hc[pc++]=of,of=o,Vl=s}function cS(o,s,l){ho[po++]=Qo,ho[po++]=Xo,ho[po++]=es,es=o;var h=Qo;o=Xo;var v=32-xn(h)-1;h&=~(1<<v),l+=1;var _=32-xn(s)+v;if(30<_){var N=v-v%5;_=(h&(1<<N)-1).toString(32),h>>=N,v-=N,Qo=1<<32-xn(s)+v|l<<v|h,Xo=_+o}else Qo=1<<_|l<<v|h,Xo=o}function qg(o){o.return!==null&&(wa(o,1),cS(o,1,0))}function Hg(o){for(;o===of;)of=hc[--pc],hc[pc]=null,Vl=hc[--pc],hc[pc]=null;for(;o===es;)es=ho[--po],ho[po]=null,Xo=ho[--po],ho[po]=null,Qo=ho[--po],ho[po]=null}function lS(o,s){ho[po++]=Qo,ho[po++]=Xo,ho[po++]=es,Qo=s.id,Xo=s.overflow,es=o}var Jn=null,an=null,Tt=!1,ts=null,mo=!1,Gg=Error(r(519));function ns(o){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fl(fo(s,o)),Gg}function uS(o){var s=o.stateNode,l=o.type,h=o.memoizedProps;switch(s[Xn]=o,s[Tr]=h,l){case"dialog":wt("cancel",s),wt("close",s);break;case"iframe":case"object":case"embed":wt("load",s);break;case"video":case"audio":for(l=0;l<uu.length;l++)wt(uu[l],s);break;case"source":wt("error",s);break;case"img":case"image":case"link":wt("error",s),wt("load",s);break;case"details":wt("toggle",s);break;case"input":wt("invalid",s),Ew(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":wt("invalid",s);break;case"textarea":wt("invalid",s),xw(s,h.value,h.defaultValue,h.children)}l=h.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||h.suppressHydrationWarning===!0||OR(s.textContent,l)?(h.popover!=null&&(wt("beforetoggle",s),wt("toggle",s)),h.onScroll!=null&&wt("scroll",s),h.onScrollEnd!=null&&wt("scrollend",s),h.onClick!=null&&(s.onclick=ya),s=!0):s=!1,s||ns(o,!0)}function dS(o){for(Jn=o.return;Jn;)switch(Jn.tag){case 5:case 31:case 13:mo=!1;return;case 27:case 3:mo=!0;return;default:Jn=Jn.return}}function mc(o){if(o!==Jn)return!1;if(!Tt)return dS(o),Tt=!0,!1;var s=o.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=o.type,l=!(l!=="form"&&l!=="button")||uy(o.type,o.memoizedProps)),l=!l),l&&an&&ns(o),dS(o),s===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));an=LR(o)}else if(s===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));an=LR(o)}else s===27?(s=an,gs(o.type)?(o=my,my=null,an=o):an=s):an=Jn?vo(o.stateNode.nextSibling):null;return!0}function ci(){an=Jn=null,Tt=!1}function Zg(){var o=ts;return o!==null&&(kr===null?kr=o:kr.push.apply(kr,o),ts=null),o}function Fl(o){ts===null?ts=[o]:ts.push(o)}var Wg=D(null),li=null,Sa=null;function rs(o,s,l){B(Wg,s._currentValue),s._currentValue=l}function Ea(o){o._currentValue=Wg.current,q(Wg)}function Kg(o,s,l){for(;o!==null;){var h=o.alternate;if((o.childLanes&s)!==s?(o.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),o===l)break;o=o.return}}function Yg(o,s,l,h){var v=o.child;for(v!==null&&(v.return=o);v!==null;){var _=v.dependencies;if(_!==null){var N=v.child;_=_.firstContext;e:for(;_!==null;){var j=_;_=v;for(var X=0;X<s.length;X++)if(j.context===s[X]){_.lanes|=l,j=_.alternate,j!==null&&(j.lanes|=l),Kg(_.return,l,o),h||(N=null);break e}_=j.next}}else if(v.tag===18){if(N=v.return,N===null)throw Error(r(341));N.lanes|=l,_=N.alternate,_!==null&&(_.lanes|=l),Kg(N,l,o),N=null}else N=v.child;if(N!==null)N.return=v;else for(N=v;N!==null;){if(N===o){N=null;break}if(v=N.sibling,v!==null){v.return=N.return,N=v;break}N=N.return}v=N}}function gc(o,s,l,h){o=null;for(var v=s,_=!1;v!==null;){if(!_){if((v.flags&524288)!==0)_=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var N=v.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var j=v.type;zr(v.pendingProps.value,N.value)||(o!==null?o.push(j):o=[j])}}else if(v===me.current){if(N=v.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(o!==null?o.push(mu):o=[mu])}v=v.return}o!==null&&Yg(s,o,l,h),s.flags|=262144}function af(o){for(o=o.firstContext;o!==null;){if(!zr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function ui(o){li=o,Sa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function er(o){return fS(li,o)}function sf(o,s){return li===null&&ui(o),fS(o,s)}function fS(o,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},Sa===null){if(o===null)throw Error(r(308));Sa=s,o.dependencies={lanes:0,firstContext:s},o.flags|=524288}else Sa=Sa.next=s;return l}var oD=typeof AbortController<"u"?AbortController:function(){var o=[],s=this.signal={aborted:!1,addEventListener:function(l,h){o.push(h)}};this.abort=function(){s.aborted=!0,o.forEach(function(l){return l()})}},aD=e.unstable_scheduleCallback,sD=e.unstable_NormalPriority,Tn={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qg(){return{controller:new oD,data:new Map,refCount:0}}function Bl(o){o.refCount--,o.refCount===0&&aD(sD,function(){o.controller.abort()})}var ql=null,Xg=0,vc=0,yc=null;function iD(o,s){if(ql===null){var l=ql=[];Xg=0,vc=ty(),yc={status:"pending",value:void 0,then:function(h){l.push(h)}}}return Xg++,s.then(hS,hS),s}function hS(){if(--Xg===0&&ql!==null){yc!==null&&(yc.status="fulfilled");var o=ql;ql=null,vc=0,yc=null;for(var s=0;s<o.length;s++)(0,o[s])()}}function cD(o,s){var l=[],h={status:"pending",value:null,reason:null,then:function(v){l.push(v)}};return o.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<l.length;v++)(0,l[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<l.length;v++)(0,l[v])(void 0)}),h}var pS=F.S;F.S=function(o,s){QE=Se(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&iD(o,s),pS!==null&&pS(o,s)};var di=D(null);function Jg(){var o=di.current;return o!==null?o:Jt.pooledCache}function cf(o,s){s===null?B(di,di.current):B(di,s.pool)}function mS(){var o=Jg();return o===null?null:{parent:Tn._currentValue,pool:o}}var _c=Error(r(460)),ev=Error(r(474)),lf=Error(r(542)),uf={then:function(){}};function gS(o){return o=o.status,o==="fulfilled"||o==="rejected"}function vS(o,s,l){switch(l=o[l],l===void 0?o.push(s):l!==s&&(s.then(ya,ya),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,_S(o),o;default:if(typeof s.status=="string")s.then(ya,ya);else{if(o=Jt,o!==null&&100<o.shellSuspendCounter)throw Error(r(482));o=s,o.status="pending",o.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw o=s.reason,_S(o),o}throw hi=s,_c}}function fi(o){try{var s=o._init;return s(o._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(hi=l,_c):l}}var hi=null;function yS(){if(hi===null)throw Error(r(459));var o=hi;return hi=null,o}function _S(o){if(o===_c||o===lf)throw Error(r(483))}var bc=null,Hl=0;function df(o){var s=Hl;return Hl+=1,bc===null&&(bc=[]),vS(bc,o,s)}function Gl(o,s){s=s.props.ref,o.ref=s!==void 0?s:null}function ff(o,s){throw s.$$typeof===g?Error(r(525)):(o=Object.prototype.toString.call(s),Error(r(31,o==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":o)))}function bS(o){function s(ce,ne){if(o){var de=ce.deletions;de===null?(ce.deletions=[ne],ce.flags|=16):de.push(ne)}}function l(ce,ne){if(!o)return null;for(;ne!==null;)s(ce,ne),ne=ne.sibling;return null}function h(ce){for(var ne=new Map;ce!==null;)ce.key!==null?ne.set(ce.key,ce):ne.set(ce.index,ce),ce=ce.sibling;return ne}function v(ce,ne){return ce=ba(ce,ne),ce.index=0,ce.sibling=null,ce}function _(ce,ne,de){return ce.index=de,o?(de=ce.alternate,de!==null?(de=de.index,de<ne?(ce.flags|=67108866,ne):de):(ce.flags|=67108866,ne)):(ce.flags|=1048576,ne)}function N(ce){return o&&ce.alternate===null&&(ce.flags|=67108866),ce}function j(ce,ne,de,Ee){return ne===null||ne.tag!==6?(ne=Fg(de,ce.mode,Ee),ne.return=ce,ne):(ne=v(ne,de),ne.return=ce,ne)}function X(ce,ne,de,Ee){var We=de.type;return We===b?be(ce,ne,de.props.children,Ee,de.key):ne!==null&&(ne.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===P&&fi(We)===ne.type)?(ne=v(ne,de.props),Gl(ne,de),ne.return=ce,ne):(ne=rf(de.type,de.key,de.props,null,ce.mode,Ee),Gl(ne,de),ne.return=ce,ne)}function he(ce,ne,de,Ee){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==de.containerInfo||ne.stateNode.implementation!==de.implementation?(ne=Bg(de,ce.mode,Ee),ne.return=ce,ne):(ne=v(ne,de.children||[]),ne.return=ce,ne)}function be(ce,ne,de,Ee,We){return ne===null||ne.tag!==7?(ne=ii(de,ce.mode,Ee,We),ne.return=ce,ne):(ne=v(ne,de),ne.return=ce,ne)}function Te(ce,ne,de){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=Fg(""+ne,ce.mode,de),ne.return=ce,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:return de=rf(ne.type,ne.key,ne.props,null,ce.mode,de),Gl(de,ne),de.return=ce,de;case w:return ne=Bg(ne,ce.mode,de),ne.return=ce,ne;case P:return ne=fi(ne),Te(ce,ne,de)}if(le(ne)||G(ne))return ne=ii(ne,ce.mode,de,null),ne.return=ce,ne;if(typeof ne.then=="function")return Te(ce,df(ne),de);if(ne.$$typeof===T)return Te(ce,sf(ce,ne),de);ff(ce,ne)}return null}function pe(ce,ne,de,Ee){var We=ne!==null?ne.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return We!==null?null:j(ce,ne,""+de,Ee);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===We?X(ce,ne,de,Ee):null;case w:return de.key===We?he(ce,ne,de,Ee):null;case P:return de=fi(de),pe(ce,ne,de,Ee)}if(le(de)||G(de))return We!==null?null:be(ce,ne,de,Ee,null);if(typeof de.then=="function")return pe(ce,ne,df(de),Ee);if(de.$$typeof===T)return pe(ce,ne,sf(ce,de),Ee);ff(ce,de)}return null}function ge(ce,ne,de,Ee,We){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return ce=ce.get(de)||null,j(ne,ce,""+Ee,We);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case y:return ce=ce.get(Ee.key===null?de:Ee.key)||null,X(ne,ce,Ee,We);case w:return ce=ce.get(Ee.key===null?de:Ee.key)||null,he(ne,ce,Ee,We);case P:return Ee=fi(Ee),ge(ce,ne,de,Ee,We)}if(le(Ee)||G(Ee))return ce=ce.get(de)||null,be(ne,ce,Ee,We,null);if(typeof Ee.then=="function")return ge(ce,ne,de,df(Ee),We);if(Ee.$$typeof===T)return ge(ce,ne,de,sf(ne,Ee),We);ff(ne,Ee)}return null}function Ue(ce,ne,de,Ee){for(var We=null,jt=null,Ge=ne,lt=ne=0,xt=null;Ge!==null&&lt<de.length;lt++){Ge.index>lt?(xt=Ge,Ge=null):xt=Ge.sibling;var $t=pe(ce,Ge,de[lt],Ee);if($t===null){Ge===null&&(Ge=xt);break}o&&Ge&&$t.alternate===null&&s(ce,Ge),ne=_($t,ne,lt),jt===null?We=$t:jt.sibling=$t,jt=$t,Ge=xt}if(lt===de.length)return l(ce,Ge),Tt&&wa(ce,lt),We;if(Ge===null){for(;lt<de.length;lt++)Ge=Te(ce,de[lt],Ee),Ge!==null&&(ne=_(Ge,ne,lt),jt===null?We=Ge:jt.sibling=Ge,jt=Ge);return Tt&&wa(ce,lt),We}for(Ge=h(Ge);lt<de.length;lt++)xt=ge(Ge,ce,lt,de[lt],Ee),xt!==null&&(o&&xt.alternate!==null&&Ge.delete(xt.key===null?lt:xt.key),ne=_(xt,ne,lt),jt===null?We=xt:jt.sibling=xt,jt=xt);return o&&Ge.forEach(function(ws){return s(ce,ws)}),Tt&&wa(ce,lt),We}function Ye(ce,ne,de,Ee){if(de==null)throw Error(r(151));for(var We=null,jt=null,Ge=ne,lt=ne=0,xt=null,$t=de.next();Ge!==null&&!$t.done;lt++,$t=de.next()){Ge.index>lt?(xt=Ge,Ge=null):xt=Ge.sibling;var ws=pe(ce,Ge,$t.value,Ee);if(ws===null){Ge===null&&(Ge=xt);break}o&&Ge&&ws.alternate===null&&s(ce,Ge),ne=_(ws,ne,lt),jt===null?We=ws:jt.sibling=ws,jt=ws,Ge=xt}if($t.done)return l(ce,Ge),Tt&&wa(ce,lt),We;if(Ge===null){for(;!$t.done;lt++,$t=de.next())$t=Te(ce,$t.value,Ee),$t!==null&&(ne=_($t,ne,lt),jt===null?We=$t:jt.sibling=$t,jt=$t);return Tt&&wa(ce,lt),We}for(Ge=h(Ge);!$t.done;lt++,$t=de.next())$t=ge(Ge,ce,lt,$t.value,Ee),$t!==null&&(o&&$t.alternate!==null&&Ge.delete($t.key===null?lt:$t.key),ne=_($t,ne,lt),jt===null?We=$t:jt.sibling=$t,jt=$t);return o&&Ge.forEach(function(_5){return s(ce,_5)}),Tt&&wa(ce,lt),We}function Qt(ce,ne,de,Ee){if(typeof de=="object"&&de!==null&&de.type===b&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var We=de.key;ne!==null;){if(ne.key===We){if(We=de.type,We===b){if(ne.tag===7){l(ce,ne.sibling),Ee=v(ne,de.props.children),Ee.return=ce,ce=Ee;break e}}else if(ne.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===P&&fi(We)===ne.type){l(ce,ne.sibling),Ee=v(ne,de.props),Gl(Ee,de),Ee.return=ce,ce=Ee;break e}l(ce,ne);break}else s(ce,ne);ne=ne.sibling}de.type===b?(Ee=ii(de.props.children,ce.mode,Ee,de.key),Ee.return=ce,ce=Ee):(Ee=rf(de.type,de.key,de.props,null,ce.mode,Ee),Gl(Ee,de),Ee.return=ce,ce=Ee)}return N(ce);case w:e:{for(We=de.key;ne!==null;){if(ne.key===We)if(ne.tag===4&&ne.stateNode.containerInfo===de.containerInfo&&ne.stateNode.implementation===de.implementation){l(ce,ne.sibling),Ee=v(ne,de.children||[]),Ee.return=ce,ce=Ee;break e}else{l(ce,ne);break}else s(ce,ne);ne=ne.sibling}Ee=Bg(de,ce.mode,Ee),Ee.return=ce,ce=Ee}return N(ce);case P:return de=fi(de),Qt(ce,ne,de,Ee)}if(le(de))return Ue(ce,ne,de,Ee);if(G(de)){if(We=G(de),typeof We!="function")throw Error(r(150));return de=We.call(de),Ye(ce,ne,de,Ee)}if(typeof de.then=="function")return Qt(ce,ne,df(de),Ee);if(de.$$typeof===T)return Qt(ce,ne,sf(ce,de),Ee);ff(ce,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,ne!==null&&ne.tag===6?(l(ce,ne.sibling),Ee=v(ne,de),Ee.return=ce,ce=Ee):(l(ce,ne),Ee=Fg(de,ce.mode,Ee),Ee.return=ce,ce=Ee),N(ce)):l(ce,ne)}return function(ce,ne,de,Ee){try{Hl=0;var We=Qt(ce,ne,de,Ee);return bc=null,We}catch(Ge){if(Ge===_c||Ge===lf)throw Ge;var jt=Vr(29,Ge,null,ce.mode);return jt.lanes=Ee,jt.return=ce,jt}}}var pi=bS(!0),wS=bS(!1),os=!1;function tv(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nv(o,s){o=o.updateQueue,s.updateQueue===o&&(s.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function as(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function ss(o,s,l){var h=o.updateQueue;if(h===null)return null;if(h=h.shared,(zt&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=nf(o),oS(o,null,l),s}return tf(o,h,s,l),nf(o)}function Zl(o,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,Qn(o,l)}}function rv(o,s){var l=o.updateQueue,h=o.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var v=null,_=null;if(l=l.firstBaseUpdate,l!==null){do{var N={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};_===null?v=_=N:_=_.next=N,l=l.next}while(l!==null);_===null?v=_=s:_=_.next=s}else v=_=s;l={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:_,shared:h.shared,callbacks:h.callbacks},o.updateQueue=l;return}o=l.lastBaseUpdate,o===null?l.firstBaseUpdate=s:o.next=s,l.lastBaseUpdate=s}var ov=!1;function Wl(){if(ov){var o=yc;if(o!==null)throw o}}function Kl(o,s,l,h){ov=!1;var v=o.updateQueue;os=!1;var _=v.firstBaseUpdate,N=v.lastBaseUpdate,j=v.shared.pending;if(j!==null){v.shared.pending=null;var X=j,he=X.next;X.next=null,N===null?_=he:N.next=he,N=X;var be=o.alternate;be!==null&&(be=be.updateQueue,j=be.lastBaseUpdate,j!==N&&(j===null?be.firstBaseUpdate=he:j.next=he,be.lastBaseUpdate=X))}if(_!==null){var Te=v.baseState;N=0,be=he=X=null,j=_;do{var pe=j.lane&-536870913,ge=pe!==j.lane;if(ge?(Rt&pe)===pe:(h&pe)===pe){pe!==0&&pe===vc&&(ov=!0),be!==null&&(be=be.next={lane:0,tag:j.tag,payload:j.payload,callback:null,next:null});e:{var Ue=o,Ye=j;pe=s;var Qt=l;switch(Ye.tag){case 1:if(Ue=Ye.payload,typeof Ue=="function"){Te=Ue.call(Qt,Te,pe);break e}Te=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=Ye.payload,pe=typeof Ue=="function"?Ue.call(Qt,Te,pe):Ue,pe==null)break e;Te=p({},Te,pe);break e;case 2:os=!0}}pe=j.callback,pe!==null&&(o.flags|=64,ge&&(o.flags|=8192),ge=v.callbacks,ge===null?v.callbacks=[pe]:ge.push(pe))}else ge={lane:pe,tag:j.tag,payload:j.payload,callback:j.callback,next:null},be===null?(he=be=ge,X=Te):be=be.next=ge,N|=pe;if(j=j.next,j===null){if(j=v.shared.pending,j===null)break;ge=j,j=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);be===null&&(X=Te),v.baseState=X,v.firstBaseUpdate=he,v.lastBaseUpdate=be,_===null&&(v.shared.lanes=0),ds|=N,o.lanes=N,o.memoizedState=Te}}function SS(o,s){if(typeof o!="function")throw Error(r(191,o));o.call(s)}function ES(o,s){var l=o.callbacks;if(l!==null)for(o.callbacks=null,o=0;o<l.length;o++)SS(l[o],s)}var wc=D(null),hf=D(0);function RS(o,s){o=Na,B(hf,o),B(wc,s),Na=o|s.baseLanes}function av(){B(hf,Na),B(wc,wc.current)}function sv(){Na=hf.current,q(wc),q(hf)}var Fr=D(null),go=null;function is(o){var s=o.alternate;B(yn,yn.current&1),B(Fr,o),go===null&&(s===null||wc.current!==null||s.memoizedState!==null)&&(go=o)}function iv(o){B(yn,yn.current),B(Fr,o),go===null&&(go=o)}function xS(o){o.tag===22?(B(yn,yn.current),B(Fr,o),go===null&&(go=o)):cs()}function cs(){B(yn,yn.current),B(Fr,Fr.current)}function Br(o){q(Fr),go===o&&(go=null),q(yn)}var yn=D(0);function pf(o){for(var s=o;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||hy(l)||py(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ra=0,ct=null,Kt=null,On=null,mf=!1,Sc=!1,mi=!1,gf=0,Yl=0,Ec=null,lD=0;function mn(){throw Error(r(321))}function cv(o,s){if(s===null)return!1;for(var l=0;l<s.length&&l<o.length;l++)if(!zr(o[l],s[l]))return!1;return!0}function lv(o,s,l,h,v,_){return Ra=_,ct=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,F.H=o===null||o.memoizedState===null?cE:Rv,mi=!1,_=l(h,v),mi=!1,Sc&&(_=OS(s,l,h,v)),TS(o),_}function TS(o){F.H=Jl;var s=Kt!==null&&Kt.next!==null;if(Ra=0,On=Kt=ct=null,mf=!1,Yl=0,Ec=null,s)throw Error(r(300));o===null||Cn||(o=o.dependencies,o!==null&&af(o)&&(Cn=!0))}function OS(o,s,l,h){ct=o;var v=0;do{if(Sc&&(Ec=null),Yl=0,Sc=!1,25<=v)throw Error(r(301));if(v+=1,On=Kt=null,o.updateQueue!=null){var _=o.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}F.H=lE,_=s(l,h)}while(Sc);return _}function uD(){var o=F.H,s=o.useState()[0];return s=typeof s.then=="function"?Ql(s):s,o=o.useState()[0],(Kt!==null?Kt.memoizedState:null)!==o&&(ct.flags|=1024),s}function uv(){var o=gf!==0;return gf=0,o}function dv(o,s,l){s.updateQueue=o.updateQueue,s.flags&=-2053,o.lanes&=~l}function fv(o){if(mf){for(o=o.memoizedState;o!==null;){var s=o.queue;s!==null&&(s.pending=null),o=o.next}mf=!1}Ra=0,On=Kt=ct=null,Sc=!1,Yl=gf=0,Ec=null}function _r(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return On===null?ct.memoizedState=On=o:On=On.next=o,On}function _n(){if(Kt===null){var o=ct.alternate;o=o!==null?o.memoizedState:null}else o=Kt.next;var s=On===null?ct.memoizedState:On.next;if(s!==null)On=s,Kt=o;else{if(o===null)throw ct.alternate===null?Error(r(467)):Error(r(310));Kt=o,o={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},On===null?ct.memoizedState=On=o:On=On.next=o}return On}function vf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ql(o){var s=Yl;return Yl+=1,Ec===null&&(Ec=[]),o=vS(Ec,o,s),s=ct,(On===null?s.memoizedState:On.next)===null&&(s=s.alternate,F.H=s===null||s.memoizedState===null?cE:Rv),o}function yf(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return Ql(o);if(o.$$typeof===T)return er(o)}throw Error(r(438,String(o)))}function hv(o){var s=null,l=ct.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var h=ct.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=vf(),ct.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(o),h=0;h<o;h++)l[h]=W;return s.index++,l}function xa(o,s){return typeof s=="function"?s(o):s}function _f(o){var s=_n();return pv(s,Kt,o)}function pv(o,s,l){var h=o.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=l;var v=o.baseQueue,_=h.pending;if(_!==null){if(v!==null){var N=v.next;v.next=_.next,_.next=N}s.baseQueue=v=_,h.pending=null}if(_=o.baseState,v===null)o.memoizedState=_;else{s=v.next;var j=N=null,X=null,he=s,be=!1;do{var Te=he.lane&-536870913;if(Te!==he.lane?(Rt&Te)===Te:(Ra&Te)===Te){var pe=he.revertLane;if(pe===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null}),Te===vc&&(be=!0);else if((Ra&pe)===pe){he=he.next,pe===vc&&(be=!0);continue}else Te={lane:0,revertLane:he.revertLane,gesture:null,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},X===null?(j=X=Te,N=_):X=X.next=Te,ct.lanes|=pe,ds|=pe;Te=he.action,mi&&l(_,Te),_=he.hasEagerState?he.eagerState:l(_,Te)}else pe={lane:Te,revertLane:he.revertLane,gesture:he.gesture,action:he.action,hasEagerState:he.hasEagerState,eagerState:he.eagerState,next:null},X===null?(j=X=pe,N=_):X=X.next=pe,ct.lanes|=Te,ds|=Te;he=he.next}while(he!==null&&he!==s);if(X===null?N=_:X.next=j,!zr(_,o.memoizedState)&&(Cn=!0,be&&(l=yc,l!==null)))throw l;o.memoizedState=_,o.baseState=N,o.baseQueue=X,h.lastRenderedState=_}return v===null&&(h.lanes=0),[o.memoizedState,h.dispatch]}function mv(o){var s=_n(),l=s.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=o;var h=l.dispatch,v=l.pending,_=s.memoizedState;if(v!==null){l.pending=null;var N=v=v.next;do _=o(_,N.action),N=N.next;while(N!==v);zr(_,s.memoizedState)||(Cn=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),l.lastRenderedState=_}return[_,h]}function CS(o,s,l){var h=ct,v=_n(),_=Tt;if(_){if(l===void 0)throw Error(r(407));l=l()}else l=s();var N=!zr((Kt||v).memoizedState,l);if(N&&(v.memoizedState=l,Cn=!0),v=v.queue,yv(kS.bind(null,h,v,o),[o]),v.getSnapshot!==s||N||On!==null&&On.memoizedState.tag&1){if(h.flags|=2048,Rc(9,{destroy:void 0},IS.bind(null,h,v,l,s),null),Jt===null)throw Error(r(349));_||(Ra&127)!==0||AS(h,s,l)}return l}function AS(o,s,l){o.flags|=16384,o={getSnapshot:s,value:l},s=ct.updateQueue,s===null?(s=vf(),ct.updateQueue=s,s.stores=[o]):(l=s.stores,l===null?s.stores=[o]:l.push(o))}function IS(o,s,l,h){s.value=l,s.getSnapshot=h,NS(s)&&MS(o)}function kS(o,s,l){return l(function(){NS(s)&&MS(o)})}function NS(o){var s=o.getSnapshot;o=o.value;try{var l=s();return!zr(o,l)}catch{return!0}}function MS(o){var s=si(o,2);s!==null&&Nr(s,o,2)}function gv(o){var s=_r();if(typeof o=="function"){var l=o;if(o=l(),mi){$n(!0);try{l()}finally{$n(!1)}}}return s.memoizedState=s.baseState=o,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:o},s}function PS(o,s,l,h){return o.baseState=l,pv(o,Kt,typeof h=="function"?h:xa)}function dD(o,s,l,h,v){if(Sf(o))throw Error(r(485));if(o=s.action,o!==null){var _={payload:v,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){_.listeners.push(N)}};F.T!==null?l(!0):_.isTransition=!1,h(_),l=s.pending,l===null?(_.next=s.pending=_,DS(s,_)):(_.next=l.next,s.pending=l.next=_)}}function DS(o,s){var l=s.action,h=s.payload,v=o.state;if(s.isTransition){var _=F.T,N={};F.T=N;try{var j=l(v,h),X=F.S;X!==null&&X(N,j),LS(o,s,j)}catch(he){vv(o,s,he)}finally{_!==null&&N.types!==null&&(_.types=N.types),F.T=_}}else try{_=l(v,h),LS(o,s,_)}catch(he){vv(o,s,he)}}function LS(o,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(h){jS(o,s,h)},function(h){return vv(o,s,h)}):jS(o,s,l)}function jS(o,s,l){s.status="fulfilled",s.value=l,$S(s),o.state=l,s=o.pending,s!==null&&(l=s.next,l===s?o.pending=null:(l=l.next,s.next=l,DS(o,l)))}function vv(o,s,l){var h=o.pending;if(o.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=l,$S(s),s=s.next;while(s!==h)}o.action=null}function $S(o){o=o.listeners;for(var s=0;s<o.length;s++)(0,o[s])()}function US(o,s){return s}function zS(o,s){if(Tt){var l=Jt.formState;if(l!==null){e:{var h=ct;if(Tt){if(an){t:{for(var v=an,_=mo;v.nodeType!==8;){if(!_){v=null;break t}if(v=vo(v.nextSibling),v===null){v=null;break t}}_=v.data,v=_==="F!"||_==="F"?v:null}if(v){an=vo(v.nextSibling),h=v.data==="F!";break e}}ns(h)}h=!1}h&&(s=l[0])}}return l=_r(),l.memoizedState=l.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:US,lastRenderedState:s},l.queue=h,l=aE.bind(null,ct,h),h.dispatch=l,h=gv(!1),_=Ev.bind(null,ct,!1,h.queue),h=_r(),v={state:s,dispatch:null,action:o,pending:null},h.queue=v,l=dD.bind(null,ct,v,_,l),v.dispatch=l,h.memoizedState=o,[s,l,!1]}function VS(o){var s=_n();return FS(s,Kt,o)}function FS(o,s,l){if(s=pv(o,s,US)[0],o=_f(xa)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Ql(s)}catch(N){throw N===_c?lf:N}else h=s;s=_n();var v=s.queue,_=v.dispatch;return l!==s.memoizedState&&(ct.flags|=2048,Rc(9,{destroy:void 0},fD.bind(null,v,l),null)),[h,_,o]}function fD(o,s){o.action=s}function BS(o){var s=_n(),l=Kt;if(l!==null)return FS(s,l,o);_n(),s=s.memoizedState,l=_n();var h=l.queue.dispatch;return l.memoizedState=o,[s,h,!1]}function Rc(o,s,l,h){return o={tag:o,create:l,deps:h,inst:s,next:null},s=ct.updateQueue,s===null&&(s=vf(),ct.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=o.next=o:(h=l.next,l.next=o,o.next=h,s.lastEffect=o),o}function qS(){return _n().memoizedState}function bf(o,s,l,h){var v=_r();ct.flags|=o,v.memoizedState=Rc(1|s,{destroy:void 0},l,h===void 0?null:h)}function wf(o,s,l,h){var v=_n();h=h===void 0?null:h;var _=v.memoizedState.inst;Kt!==null&&h!==null&&cv(h,Kt.memoizedState.deps)?v.memoizedState=Rc(s,_,l,h):(ct.flags|=o,v.memoizedState=Rc(1|s,_,l,h))}function HS(o,s){bf(8390656,8,o,s)}function yv(o,s){wf(2048,8,o,s)}function hD(o){ct.flags|=4;var s=ct.updateQueue;if(s===null)s=vf(),ct.updateQueue=s,s.events=[o];else{var l=s.events;l===null?s.events=[o]:l.push(o)}}function GS(o){var s=_n().memoizedState;return hD({ref:s,nextImpl:o}),function(){if((zt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function ZS(o,s){return wf(4,2,o,s)}function WS(o,s){return wf(4,4,o,s)}function KS(o,s){if(typeof s=="function"){o=o();var l=s(o);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return o=o(),s.current=o,function(){s.current=null}}function YS(o,s,l){l=l!=null?l.concat([o]):null,wf(4,4,KS.bind(null,s,o),l)}function _v(){}function QS(o,s){var l=_n();s=s===void 0?null:s;var h=l.memoizedState;return s!==null&&cv(s,h[1])?h[0]:(l.memoizedState=[o,s],o)}function XS(o,s){var l=_n();s=s===void 0?null:s;var h=l.memoizedState;if(s!==null&&cv(s,h[1]))return h[0];if(h=o(),mi){$n(!0);try{o()}finally{$n(!1)}}return l.memoizedState=[h,s],h}function bv(o,s,l){return l===void 0||(Ra&1073741824)!==0&&(Rt&261930)===0?o.memoizedState=s:(o.memoizedState=l,o=JE(),ct.lanes|=o,ds|=o,l)}function JS(o,s,l,h){return zr(l,s)?l:wc.current!==null?(o=bv(o,l,h),zr(o,s)||(Cn=!0),o):(Ra&42)===0||(Ra&1073741824)!==0&&(Rt&261930)===0?(Cn=!0,o.memoizedState=l):(o=JE(),ct.lanes|=o,ds|=o,s)}function eE(o,s,l,h,v){var _=Y.p;Y.p=_!==0&&8>_?_:8;var N=F.T,j={};F.T=j,Ev(o,!1,s,l);try{var X=v(),he=F.S;if(he!==null&&he(j,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var be=cD(X,h);Xl(o,s,be,Gr(o))}else Xl(o,s,h,Gr(o))}catch(Te){Xl(o,s,{then:function(){},status:"rejected",reason:Te},Gr())}finally{Y.p=_,N!==null&&j.types!==null&&(N.types=j.types),F.T=N}}function pD(){}function wv(o,s,l,h){if(o.tag!==5)throw Error(r(476));var v=tE(o).queue;eE(o,v,s,se,l===null?pD:function(){return nE(o),l(h)})}function tE(o){var s=o.memoizedState;if(s!==null)return s;s={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:se},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:xa,lastRenderedState:l},next:null},o.memoizedState=s,o=o.alternate,o!==null&&(o.memoizedState=s),s}function nE(o){var s=tE(o);s.next===null&&(s=o.alternate.memoizedState),Xl(o,s.next.queue,{},Gr())}function Sv(){return er(mu)}function rE(){return _n().memoizedState}function oE(){return _n().memoizedState}function mD(o){for(var s=o.return;s!==null;){switch(s.tag){case 24:case 3:var l=Gr();o=as(l);var h=ss(s,o,l);h!==null&&(Nr(h,s,l),Zl(h,s,l)),s={cache:Qg()},o.payload=s;return}s=s.return}}function gD(o,s,l){var h=Gr();l={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Sf(o)?sE(s,l):(l=zg(o,s,l,h),l!==null&&(Nr(l,o,h),iE(l,s,h)))}function aE(o,s,l){var h=Gr();Xl(o,s,l,h)}function Xl(o,s,l,h){var v={lane:h,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Sf(o))sE(s,v);else{var _=o.alternate;if(o.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var N=s.lastRenderedState,j=_(N,l);if(v.hasEagerState=!0,v.eagerState=j,zr(j,N))return tf(o,s,v,0),Jt===null&&ef(),!1}catch{}if(l=zg(o,s,v,h),l!==null)return Nr(l,o,h),iE(l,s,h),!0}return!1}function Ev(o,s,l,h){if(h={lane:2,revertLane:ty(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Sf(o)){if(s)throw Error(r(479))}else s=zg(o,l,h,2),s!==null&&Nr(s,o,2)}function Sf(o){var s=o.alternate;return o===ct||s!==null&&s===ct}function sE(o,s){Sc=mf=!0;var l=o.pending;l===null?s.next=s:(s.next=l.next,l.next=s),o.pending=s}function iE(o,s,l){if((l&4194048)!==0){var h=s.lanes;h&=o.pendingLanes,l|=h,s.lanes=l,Qn(o,l)}}var Jl={readContext:er,use:yf,useCallback:mn,useContext:mn,useEffect:mn,useImperativeHandle:mn,useLayoutEffect:mn,useInsertionEffect:mn,useMemo:mn,useReducer:mn,useRef:mn,useState:mn,useDebugValue:mn,useDeferredValue:mn,useTransition:mn,useSyncExternalStore:mn,useId:mn,useHostTransitionStatus:mn,useFormState:mn,useActionState:mn,useOptimistic:mn,useMemoCache:mn,useCacheRefresh:mn};Jl.useEffectEvent=mn;var cE={readContext:er,use:yf,useCallback:function(o,s){return _r().memoizedState=[o,s===void 0?null:s],o},useContext:er,useEffect:HS,useImperativeHandle:function(o,s,l){l=l!=null?l.concat([o]):null,bf(4194308,4,KS.bind(null,s,o),l)},useLayoutEffect:function(o,s){return bf(4194308,4,o,s)},useInsertionEffect:function(o,s){bf(4,2,o,s)},useMemo:function(o,s){var l=_r();s=s===void 0?null:s;var h=o();if(mi){$n(!0);try{o()}finally{$n(!1)}}return l.memoizedState=[h,s],h},useReducer:function(o,s,l){var h=_r();if(l!==void 0){var v=l(s);if(mi){$n(!0);try{l(s)}finally{$n(!1)}}}else v=s;return h.memoizedState=h.baseState=v,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:v},h.queue=o,o=o.dispatch=gD.bind(null,ct,o),[h.memoizedState,o]},useRef:function(o){var s=_r();return o={current:o},s.memoizedState=o},useState:function(o){o=gv(o);var s=o.queue,l=aE.bind(null,ct,s);return s.dispatch=l,[o.memoizedState,l]},useDebugValue:_v,useDeferredValue:function(o,s){var l=_r();return bv(l,o,s)},useTransition:function(){var o=gv(!1);return o=eE.bind(null,ct,o.queue,!0,!1),_r().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,s,l){var h=ct,v=_r();if(Tt){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),Jt===null)throw Error(r(349));(Rt&127)!==0||AS(h,s,l)}v.memoizedState=l;var _={value:l,getSnapshot:s};return v.queue=_,HS(kS.bind(null,h,_,o),[o]),h.flags|=2048,Rc(9,{destroy:void 0},IS.bind(null,h,_,l,s),null),l},useId:function(){var o=_r(),s=Jt.identifierPrefix;if(Tt){var l=Xo,h=Qo;l=(h&~(1<<32-xn(h)-1)).toString(32)+l,s="_"+s+"R_"+l,l=gf++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=lD++,s="_"+s+"r_"+l.toString(32)+"_";return o.memoizedState=s},useHostTransitionStatus:Sv,useFormState:zS,useActionState:zS,useOptimistic:function(o){var s=_r();s.memoizedState=s.baseState=o;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=Ev.bind(null,ct,!0,l),l.dispatch=s,[o,s]},useMemoCache:hv,useCacheRefresh:function(){return _r().memoizedState=mD.bind(null,ct)},useEffectEvent:function(o){var s=_r(),l={impl:o};return s.memoizedState=l,function(){if((zt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Rv={readContext:er,use:yf,useCallback:QS,useContext:er,useEffect:yv,useImperativeHandle:YS,useInsertionEffect:ZS,useLayoutEffect:WS,useMemo:XS,useReducer:_f,useRef:qS,useState:function(){return _f(xa)},useDebugValue:_v,useDeferredValue:function(o,s){var l=_n();return JS(l,Kt.memoizedState,o,s)},useTransition:function(){var o=_f(xa)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Ql(o),s]},useSyncExternalStore:CS,useId:rE,useHostTransitionStatus:Sv,useFormState:VS,useActionState:VS,useOptimistic:function(o,s){var l=_n();return PS(l,Kt,o,s)},useMemoCache:hv,useCacheRefresh:oE};Rv.useEffectEvent=GS;var lE={readContext:er,use:yf,useCallback:QS,useContext:er,useEffect:yv,useImperativeHandle:YS,useInsertionEffect:ZS,useLayoutEffect:WS,useMemo:XS,useReducer:mv,useRef:qS,useState:function(){return mv(xa)},useDebugValue:_v,useDeferredValue:function(o,s){var l=_n();return Kt===null?bv(l,o,s):JS(l,Kt.memoizedState,o,s)},useTransition:function(){var o=mv(xa)[0],s=_n().memoizedState;return[typeof o=="boolean"?o:Ql(o),s]},useSyncExternalStore:CS,useId:rE,useHostTransitionStatus:Sv,useFormState:BS,useActionState:BS,useOptimistic:function(o,s){var l=_n();return Kt!==null?PS(l,Kt,o,s):(l.baseState=o,[o,l.queue.dispatch])},useMemoCache:hv,useCacheRefresh:oE};lE.useEffectEvent=GS;function xv(o,s,l,h){s=o.memoizedState,l=l(h,s),l=l==null?s:p({},s,l),o.memoizedState=l,o.lanes===0&&(o.updateQueue.baseState=l)}var Tv={enqueueSetState:function(o,s,l){o=o._reactInternals;var h=Gr(),v=as(h);v.payload=s,l!=null&&(v.callback=l),s=ss(o,v,h),s!==null&&(Nr(s,o,h),Zl(s,o,h))},enqueueReplaceState:function(o,s,l){o=o._reactInternals;var h=Gr(),v=as(h);v.tag=1,v.payload=s,l!=null&&(v.callback=l),s=ss(o,v,h),s!==null&&(Nr(s,o,h),Zl(s,o,h))},enqueueForceUpdate:function(o,s){o=o._reactInternals;var l=Gr(),h=as(l);h.tag=2,s!=null&&(h.callback=s),s=ss(o,h,l),s!==null&&(Nr(s,o,l),Zl(s,o,l))}};function uE(o,s,l,h,v,_,N){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(h,_,N):s.prototype&&s.prototype.isPureReactComponent?!Ul(l,h)||!Ul(v,_):!0}function dE(o,s,l,h){o=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==o&&Tv.enqueueReplaceState(s,s.state,null)}function gi(o,s){var l=s;if("ref"in s){l={};for(var h in s)h!=="ref"&&(l[h]=s[h])}if(o=o.defaultProps){l===s&&(l=p({},l));for(var v in o)l[v]===void 0&&(l[v]=o[v])}return l}function fE(o){Jd(o)}function hE(o){console.error(o)}function pE(o){Jd(o)}function Ef(o,s){try{var l=o.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function mE(o,s,l){try{var h=o.onCaughtError;h(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function Ov(o,s,l){return l=as(l),l.tag=3,l.payload={element:null},l.callback=function(){Ef(o,s)},l}function gE(o){return o=as(o),o.tag=3,o}function vE(o,s,l,h){var v=l.type.getDerivedStateFromError;if(typeof v=="function"){var _=h.value;o.payload=function(){return v(_)},o.callback=function(){mE(s,l,h)}}var N=l.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(o.callback=function(){mE(s,l,h),typeof v!="function"&&(fs===null?fs=new Set([this]):fs.add(this));var j=h.stack;this.componentDidCatch(h.value,{componentStack:j!==null?j:""})})}function vD(o,s,l,h,v){if(l.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=l.alternate,s!==null&&gc(s,l,v,!0),l=Fr.current,l!==null){switch(l.tag){case 31:case 13:return go===null?Df():l.alternate===null&&gn===0&&(gn=3),l.flags&=-257,l.flags|=65536,l.lanes=v,h===uf?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([h]):s.add(h),Xv(o,h,v)),!1;case 22:return l.flags|=65536,h===uf?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([h]):l.add(h)),Xv(o,h,v)),!1}throw Error(r(435,l.tag))}return Xv(o,h,v),Df(),!1}if(Tt)return s=Fr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==Gg&&(o=Error(r(422),{cause:h}),Fl(fo(o,l)))):(h!==Gg&&(s=Error(r(423),{cause:h}),Fl(fo(s,l))),o=o.current.alternate,o.flags|=65536,v&=-v,o.lanes|=v,h=fo(h,l),v=Ov(o.stateNode,h,v),rv(o,v),gn!==4&&(gn=2)),!1;var _=Error(r(520),{cause:h});if(_=fo(_,l),iu===null?iu=[_]:iu.push(_),gn!==4&&(gn=2),s===null)return!0;h=fo(h,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,o=v&-v,l.lanes|=o,o=Ov(l.stateNode,h,o),rv(l,o),!1;case 1:if(s=l.type,_=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(fs===null||!fs.has(_))))return l.flags|=65536,v&=-v,l.lanes|=v,v=gE(v),vE(v,o,l,h),rv(l,v),!1}l=l.return}while(l!==null);return!1}var Cv=Error(r(461)),Cn=!1;function tr(o,s,l,h){s.child=o===null?wS(s,null,l,h):pi(s,o.child,l,h)}function yE(o,s,l,h,v){l=l.render;var _=s.ref;if("ref"in h){var N={};for(var j in h)j!=="ref"&&(N[j]=h[j])}else N=h;return ui(s),h=lv(o,s,l,N,_,v),j=uv(),o!==null&&!Cn?(dv(o,s,v),Ta(o,s,v)):(Tt&&j&&qg(s),s.flags|=1,tr(o,s,h,v),s.child)}function _E(o,s,l,h,v){if(o===null){var _=l.type;return typeof _=="function"&&!Vg(_)&&_.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=_,bE(o,s,_,h,v)):(o=rf(l.type,null,h,s,s.mode,v),o.ref=s.ref,o.return=s,s.child=o)}if(_=o.child,!Lv(o,v)){var N=_.memoizedProps;if(l=l.compare,l=l!==null?l:Ul,l(N,h)&&o.ref===s.ref)return Ta(o,s,v)}return s.flags|=1,o=ba(_,h),o.ref=s.ref,o.return=s,s.child=o}function bE(o,s,l,h,v){if(o!==null){var _=o.memoizedProps;if(Ul(_,h)&&o.ref===s.ref)if(Cn=!1,s.pendingProps=h=_,Lv(o,v))(o.flags&131072)!==0&&(Cn=!0);else return s.lanes=o.lanes,Ta(o,s,v)}return Av(o,s,l,h,v)}function wE(o,s,l,h){var v=h.children,_=o!==null?o.memoizedState:null;if(o===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|l:l,o!==null){for(h=s.child=o.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~_}else h=0,s.child=null;return SE(o,s,_,l,h)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},o!==null&&cf(s,_!==null?_.cachePool:null),_!==null?RS(s,_):av(),xS(s);else return h=s.lanes=536870912,SE(o,s,_!==null?_.baseLanes|l:l,l,h)}else _!==null?(cf(s,_.cachePool),RS(s,_),cs(),s.memoizedState=null):(o!==null&&cf(s,null),av(),cs());return tr(o,s,v,l),s.child}function eu(o,s){return o!==null&&o.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function SE(o,s,l,h,v){var _=Jg();return _=_===null?null:{parent:Tn._currentValue,pool:_},s.memoizedState={baseLanes:l,cachePool:_},o!==null&&cf(s,null),av(),xS(s),o!==null&&gc(o,s,h,!0),s.childLanes=v,null}function Rf(o,s){return s=Tf({mode:s.mode,children:s.children},o.mode),s.ref=o.ref,o.child=s,s.return=o,s}function EE(o,s,l){return pi(s,o.child,null,l),o=Rf(s,s.pendingProps),o.flags|=2,Br(s),s.memoizedState=null,o}function yD(o,s,l){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,o===null){if(Tt){if(h.mode==="hidden")return o=Rf(s,h),s.lanes=536870912,eu(null,o);if(iv(s),(o=an)?(o=DR(o,mo),o=o!==null&&o.data==="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Qo,overflow:Xo}:null,retryLane:536870912,hydrationErrors:null},l=sS(o),l.return=s,s.child=l,Jn=s,an=null)):o=null,o===null)throw ns(s);return s.lanes=536870912,null}return Rf(s,h)}var _=o.memoizedState;if(_!==null){var N=_.dehydrated;if(iv(s),v)if(s.flags&256)s.flags&=-257,s=EE(o,s,l);else if(s.memoizedState!==null)s.child=o.child,s.flags|=128,s=null;else throw Error(r(558));else if(Cn||gc(o,s,l,!1),v=(l&o.childLanes)!==0,Cn||v){if(h=Jt,h!==null&&(N=xr(h,l),N!==0&&N!==_.retryLane))throw _.retryLane=N,si(o,N),Nr(h,o,N),Cv;Df(),s=EE(o,s,l)}else o=_.treeContext,an=vo(N.nextSibling),Jn=s,Tt=!0,ts=null,mo=!1,o!==null&&lS(s,o),s=Rf(s,h),s.flags|=4096;return s}return o=ba(o.child,{mode:h.mode,children:h.children}),o.ref=s.ref,s.child=o,o.return=s,o}function xf(o,s){var l=s.ref;if(l===null)o!==null&&o.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(o===null||o.ref!==l)&&(s.flags|=4194816)}}function Av(o,s,l,h,v){return ui(s),l=lv(o,s,l,h,void 0,v),h=uv(),o!==null&&!Cn?(dv(o,s,v),Ta(o,s,v)):(Tt&&h&&qg(s),s.flags|=1,tr(o,s,l,v),s.child)}function RE(o,s,l,h,v,_){return ui(s),s.updateQueue=null,l=OS(s,h,l,v),TS(o),h=uv(),o!==null&&!Cn?(dv(o,s,_),Ta(o,s,_)):(Tt&&h&&qg(s),s.flags|=1,tr(o,s,l,_),s.child)}function xE(o,s,l,h,v){if(ui(s),s.stateNode===null){var _=fc,N=l.contextType;typeof N=="object"&&N!==null&&(_=er(N)),_=new l(h,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=Tv,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=h,_.state=s.memoizedState,_.refs={},tv(s),N=l.contextType,_.context=typeof N=="object"&&N!==null?er(N):fc,_.state=s.memoizedState,N=l.getDerivedStateFromProps,typeof N=="function"&&(xv(s,l,N,h),_.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(N=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),N!==_.state&&Tv.enqueueReplaceState(_,_.state,null),Kl(s,h,_,v),Wl(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(o===null){_=s.stateNode;var j=s.memoizedProps,X=gi(l,j);_.props=X;var he=_.context,be=l.contextType;N=fc,typeof be=="object"&&be!==null&&(N=er(be));var Te=l.getDerivedStateFromProps;be=typeof Te=="function"||typeof _.getSnapshotBeforeUpdate=="function",j=s.pendingProps!==j,be||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(j||he!==N)&&dE(s,_,h,N),os=!1;var pe=s.memoizedState;_.state=pe,Kl(s,h,_,v),Wl(),he=s.memoizedState,j||pe!==he||os?(typeof Te=="function"&&(xv(s,l,Te,h),he=s.memoizedState),(X=os||uE(s,l,X,h,pe,he,N))?(be||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=he),_.props=h,_.state=he,_.context=N,h=X):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{_=s.stateNode,nv(o,s),N=s.memoizedProps,be=gi(l,N),_.props=be,Te=s.pendingProps,pe=_.context,he=l.contextType,X=fc,typeof he=="object"&&he!==null&&(X=er(he)),j=l.getDerivedStateFromProps,(he=typeof j=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(N!==Te||pe!==X)&&dE(s,_,h,X),os=!1,pe=s.memoizedState,_.state=pe,Kl(s,h,_,v),Wl();var ge=s.memoizedState;N!==Te||pe!==ge||os||o!==null&&o.dependencies!==null&&af(o.dependencies)?(typeof j=="function"&&(xv(s,l,j,h),ge=s.memoizedState),(be=os||uE(s,l,be,h,pe,ge,X)||o!==null&&o.dependencies!==null&&af(o.dependencies))?(he||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(h,ge,X),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(h,ge,X)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||N===o.memoizedProps&&pe===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&pe===o.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=ge),_.props=h,_.state=ge,_.context=X,h=be):(typeof _.componentDidUpdate!="function"||N===o.memoizedProps&&pe===o.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||N===o.memoizedProps&&pe===o.memoizedState||(s.flags|=1024),h=!1)}return _=h,xf(o,s),h=(s.flags&128)!==0,_||h?(_=s.stateNode,l=h&&typeof l.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,o!==null&&h?(s.child=pi(s,o.child,null,v),s.child=pi(s,null,l,v)):tr(o,s,l,v),s.memoizedState=_.state,o=s.child):o=Ta(o,s,v),o}function TE(o,s,l,h){return ci(),s.flags|=256,tr(o,s,l,h),s.child}var Iv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kv(o){return{baseLanes:o,cachePool:mS()}}function Nv(o,s,l){return o=o!==null?o.childLanes&~l:0,s&&(o|=Hr),o}function OE(o,s,l){var h=s.pendingProps,v=!1,_=(s.flags&128)!==0,N;if((N=_)||(N=o!==null&&o.memoizedState===null?!1:(yn.current&2)!==0),N&&(v=!0,s.flags&=-129),N=(s.flags&32)!==0,s.flags&=-33,o===null){if(Tt){if(v?is(s):cs(),(o=an)?(o=DR(o,mo),o=o!==null&&o.data!=="&"?o:null,o!==null&&(s.memoizedState={dehydrated:o,treeContext:es!==null?{id:Qo,overflow:Xo}:null,retryLane:536870912,hydrationErrors:null},l=sS(o),l.return=s,s.child=l,Jn=s,an=null)):o=null,o===null)throw ns(s);return py(o)?s.lanes=32:s.lanes=536870912,null}var j=h.children;return h=h.fallback,v?(cs(),v=s.mode,j=Tf({mode:"hidden",children:j},v),h=ii(h,v,l,null),j.return=s,h.return=s,j.sibling=h,s.child=j,h=s.child,h.memoizedState=kv(l),h.childLanes=Nv(o,N,l),s.memoizedState=Iv,eu(null,h)):(is(s),Mv(s,j))}var X=o.memoizedState;if(X!==null&&(j=X.dehydrated,j!==null)){if(_)s.flags&256?(is(s),s.flags&=-257,s=Pv(o,s,l)):s.memoizedState!==null?(cs(),s.child=o.child,s.flags|=128,s=null):(cs(),j=h.fallback,v=s.mode,h=Tf({mode:"visible",children:h.children},v),j=ii(j,v,l,null),j.flags|=2,h.return=s,j.return=s,h.sibling=j,s.child=h,pi(s,o.child,null,l),h=s.child,h.memoizedState=kv(l),h.childLanes=Nv(o,N,l),s.memoizedState=Iv,s=eu(null,h));else if(is(s),py(j)){if(N=j.nextSibling&&j.nextSibling.dataset,N)var he=N.dgst;N=he,h=Error(r(419)),h.stack="",h.digest=N,Fl({value:h,source:null,stack:null}),s=Pv(o,s,l)}else if(Cn||gc(o,s,l,!1),N=(l&o.childLanes)!==0,Cn||N){if(N=Jt,N!==null&&(h=xr(N,l),h!==0&&h!==X.retryLane))throw X.retryLane=h,si(o,h),Nr(N,o,h),Cv;hy(j)||Df(),s=Pv(o,s,l)}else hy(j)?(s.flags|=192,s.child=o.child,s=null):(o=X.treeContext,an=vo(j.nextSibling),Jn=s,Tt=!0,ts=null,mo=!1,o!==null&&lS(s,o),s=Mv(s,h.children),s.flags|=4096);return s}return v?(cs(),j=h.fallback,v=s.mode,X=o.child,he=X.sibling,h=ba(X,{mode:"hidden",children:h.children}),h.subtreeFlags=X.subtreeFlags&65011712,he!==null?j=ba(he,j):(j=ii(j,v,l,null),j.flags|=2),j.return=s,h.return=s,h.sibling=j,s.child=h,eu(null,h),h=s.child,j=o.child.memoizedState,j===null?j=kv(l):(v=j.cachePool,v!==null?(X=Tn._currentValue,v=v.parent!==X?{parent:X,pool:X}:v):v=mS(),j={baseLanes:j.baseLanes|l,cachePool:v}),h.memoizedState=j,h.childLanes=Nv(o,N,l),s.memoizedState=Iv,eu(o.child,h)):(is(s),l=o.child,o=l.sibling,l=ba(l,{mode:"visible",children:h.children}),l.return=s,l.sibling=null,o!==null&&(N=s.deletions,N===null?(s.deletions=[o],s.flags|=16):N.push(o)),s.child=l,s.memoizedState=null,l)}function Mv(o,s){return s=Tf({mode:"visible",children:s},o.mode),s.return=o,o.child=s}function Tf(o,s){return o=Vr(22,o,null,s),o.lanes=0,o}function Pv(o,s,l){return pi(s,o.child,null,l),o=Mv(s,s.pendingProps.children),o.flags|=2,s.memoizedState=null,o}function CE(o,s,l){o.lanes|=s;var h=o.alternate;h!==null&&(h.lanes|=s),Kg(o.return,s,l)}function Dv(o,s,l,h,v,_){var N=o.memoizedState;N===null?o.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:v,treeForkCount:_}:(N.isBackwards=s,N.rendering=null,N.renderingStartTime=0,N.last=h,N.tail=l,N.tailMode=v,N.treeForkCount=_)}function AE(o,s,l){var h=s.pendingProps,v=h.revealOrder,_=h.tail;h=h.children;var N=yn.current,j=(N&2)!==0;if(j?(N=N&1|2,s.flags|=128):N&=1,B(yn,N),tr(o,s,h,l),h=Tt?Vl:0,!j&&o!==null&&(o.flags&128)!==0)e:for(o=s.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&CE(o,l,s);else if(o.tag===19)CE(o,l,s);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break e;for(;o.sibling===null;){if(o.return===null||o.return===s)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(v){case"forwards":for(l=s.child,v=null;l!==null;)o=l.alternate,o!==null&&pf(o)===null&&(v=l),l=l.sibling;l=v,l===null?(v=s.child,s.child=null):(v=l.sibling,l.sibling=null),Dv(s,!1,v,l,_,h);break;case"backwards":case"unstable_legacy-backwards":for(l=null,v=s.child,s.child=null;v!==null;){if(o=v.alternate,o!==null&&pf(o)===null){s.child=v;break}o=v.sibling,v.sibling=l,l=v,v=o}Dv(s,!0,l,null,_,h);break;case"together":Dv(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function Ta(o,s,l){if(o!==null&&(s.dependencies=o.dependencies),ds|=s.lanes,(l&s.childLanes)===0)if(o!==null){if(gc(o,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(o!==null&&s.child!==o.child)throw Error(r(153));if(s.child!==null){for(o=s.child,l=ba(o,o.pendingProps),s.child=l,l.return=s;o.sibling!==null;)o=o.sibling,l=l.sibling=ba(o,o.pendingProps),l.return=s;l.sibling=null}return s.child}function Lv(o,s){return(o.lanes&s)!==0?!0:(o=o.dependencies,!!(o!==null&&af(o)))}function _D(o,s,l){switch(s.tag){case 3:ve(s,s.stateNode.containerInfo),rs(s,Tn,o.memoizedState.cache),ci();break;case 27:case 5:Ie(s);break;case 4:ve(s,s.stateNode.containerInfo);break;case 10:rs(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,iv(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(is(s),s.flags|=128,null):(l&s.child.childLanes)!==0?OE(o,s,l):(is(s),o=Ta(o,s,l),o!==null?o.sibling:null);is(s);break;case 19:var v=(o.flags&128)!==0;if(h=(l&s.childLanes)!==0,h||(gc(o,s,l,!1),h=(l&s.childLanes)!==0),v){if(h)return AE(o,s,l);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),B(yn,yn.current),h)break;return null;case 22:return s.lanes=0,wE(o,s,l,s.pendingProps);case 24:rs(s,Tn,o.memoizedState.cache)}return Ta(o,s,l)}function IE(o,s,l){if(o!==null)if(o.memoizedProps!==s.pendingProps)Cn=!0;else{if(!Lv(o,l)&&(s.flags&128)===0)return Cn=!1,_D(o,s,l);Cn=(o.flags&131072)!==0}else Cn=!1,Tt&&(s.flags&1048576)!==0&&cS(s,Vl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(o=fi(s.elementType),s.type=o,typeof o=="function")Vg(o)?(h=gi(o,h),s.tag=1,s=xE(null,s,o,h,l)):(s.tag=0,s=Av(null,s,o,h,l));else{if(o!=null){var v=o.$$typeof;if(v===O){s.tag=11,s=yE(null,s,o,h,l);break e}else if(v===k){s.tag=14,s=_E(null,s,o,h,l);break e}}throw s=J(o)||o,Error(r(306,s,""))}}return s;case 0:return Av(o,s,s.type,s.pendingProps,l);case 1:return h=s.type,v=gi(h,s.pendingProps),xE(o,s,h,v,l);case 3:e:{if(ve(s,s.stateNode.containerInfo),o===null)throw Error(r(387));h=s.pendingProps;var _=s.memoizedState;v=_.element,nv(o,s),Kl(s,h,null,l);var N=s.memoizedState;if(h=N.cache,rs(s,Tn,h),h!==_.cache&&Yg(s,[Tn],l,!0),Wl(),h=N.element,_.isDehydrated)if(_={element:h,isDehydrated:!1,cache:N.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=TE(o,s,h,l);break e}else if(h!==v){v=fo(Error(r(424)),s),Fl(v),s=TE(o,s,h,l);break e}else for(o=s.stateNode.containerInfo,o.nodeType===9?o=o.body:o=o.nodeName==="HTML"?o.ownerDocument.body:o,an=vo(o.firstChild),Jn=s,Tt=!0,ts=null,mo=!0,l=wS(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ci(),h===v){s=Ta(o,s,l);break e}tr(o,s,h,l)}s=s.child}return s;case 26:return xf(o,s),o===null?(l=VR(s.type,null,s.pendingProps,null))?s.memoizedState=l:Tt||(l=s.type,o=s.pendingProps,h=Ff(Q.current).createElement(l),h[Xn]=s,h[Tr]=o,nr(h,l,o),Hn(h),s.stateNode=h):s.memoizedState=VR(s.type,o.memoizedProps,s.pendingProps,o.memoizedState),null;case 27:return Ie(s),o===null&&Tt&&(h=s.stateNode=$R(s.type,s.pendingProps,Q.current),Jn=s,mo=!0,v=an,gs(s.type)?(my=v,an=vo(h.firstChild)):an=v),tr(o,s,s.pendingProps.children,l),xf(o,s),o===null&&(s.flags|=4194304),s.child;case 5:return o===null&&Tt&&((v=h=an)&&(h=KD(h,s.type,s.pendingProps,mo),h!==null?(s.stateNode=h,Jn=s,an=vo(h.firstChild),mo=!1,v=!0):v=!1),v||ns(s)),Ie(s),v=s.type,_=s.pendingProps,N=o!==null?o.memoizedProps:null,h=_.children,uy(v,_)?h=null:N!==null&&uy(v,N)&&(s.flags|=32),s.memoizedState!==null&&(v=lv(o,s,uD,null,null,l),mu._currentValue=v),xf(o,s),tr(o,s,h,l),s.child;case 6:return o===null&&Tt&&((o=l=an)&&(l=YD(l,s.pendingProps,mo),l!==null?(s.stateNode=l,Jn=s,an=null,o=!0):o=!1),o||ns(s)),null;case 13:return OE(o,s,l);case 4:return ve(s,s.stateNode.containerInfo),h=s.pendingProps,o===null?s.child=pi(s,null,h,l):tr(o,s,h,l),s.child;case 11:return yE(o,s,s.type,s.pendingProps,l);case 7:return tr(o,s,s.pendingProps,l),s.child;case 8:return tr(o,s,s.pendingProps.children,l),s.child;case 12:return tr(o,s,s.pendingProps.children,l),s.child;case 10:return h=s.pendingProps,rs(s,s.type,h.value),tr(o,s,h.children,l),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,ui(s),v=er(v),h=h(v),s.flags|=1,tr(o,s,h,l),s.child;case 14:return _E(o,s,s.type,s.pendingProps,l);case 15:return bE(o,s,s.type,s.pendingProps,l);case 19:return AE(o,s,l);case 31:return yD(o,s,l);case 22:return wE(o,s,l,s.pendingProps);case 24:return ui(s),h=er(Tn),o===null?(v=Jg(),v===null&&(v=Jt,_=Qg(),v.pooledCache=_,_.refCount++,_!==null&&(v.pooledCacheLanes|=l),v=_),s.memoizedState={parent:h,cache:v},tv(s),rs(s,Tn,v)):((o.lanes&l)!==0&&(nv(o,s),Kl(s,null,null,l),Wl()),v=o.memoizedState,_=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),rs(s,Tn,h)):(h=_.cache,rs(s,Tn,h),h!==v.cache&&Yg(s,[Tn],l,!0))),tr(o,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Oa(o){o.flags|=4}function jv(o,s,l,h,v){if((s=(o.mode&32)!==0)&&(s=!1),s){if(o.flags|=16777216,(v&335544128)===v)if(o.stateNode.complete)o.flags|=8192;else if(rR())o.flags|=8192;else throw hi=uf,ev}else o.flags&=-16777217}function kE(o,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!GR(s))if(rR())o.flags|=8192;else throw hi=uf,ev}function Of(o,s){s!==null&&(o.flags|=4),o.flags&16384&&(s=o.tag!==22?Wt():536870912,o.lanes|=s,Cc|=s)}function tu(o,s){if(!Tt)switch(o.tailMode){case"hidden":s=o.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?o.tail=null:l.sibling=null;break;case"collapsed":l=o.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||o.tail===null?o.tail=null:o.tail.sibling=null:h.sibling=null}}function sn(o){var s=o.alternate!==null&&o.alternate.child===o.child,l=0,h=0;if(s)for(var v=o.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=o,v=v.sibling;else for(v=o.child;v!==null;)l|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=o,v=v.sibling;return o.subtreeFlags|=h,o.childLanes=l,s}function bD(o,s,l){var h=s.pendingProps;switch(Hg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return sn(s),null;case 1:return sn(s),null;case 3:return l=s.stateNode,h=null,o!==null&&(h=o.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Ea(Tn),Ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(o===null||o.child===null)&&(mc(s)?Oa(s):o===null||o.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Zg())),sn(s),null;case 26:var v=s.type,_=s.memoizedState;return o===null?(Oa(s),_!==null?(sn(s),kE(s,_)):(sn(s),jv(s,v,null,h,l))):_?_!==o.memoizedState?(Oa(s),sn(s),kE(s,_)):(sn(s),s.flags&=-16777217):(o=o.memoizedProps,o!==h&&Oa(s),sn(s),jv(s,v,o,h,l)),null;case 27:if(H(s),l=Q.current,v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return sn(s),null}o=L.current,mc(s)?uS(s):(o=$R(v,h,l),s.stateNode=o,Oa(s))}return sn(s),null;case 5:if(H(s),v=s.type,o!==null&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return sn(s),null}if(_=L.current,mc(s))uS(s);else{var N=Ff(Q.current);switch(_){case 1:_=N.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:_=N.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":_=N.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":_=N.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":_=N.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof h.is=="string"?N.createElement("select",{is:h.is}):N.createElement("select"),h.multiple?_.multiple=!0:h.size&&(_.size=h.size);break;default:_=typeof h.is=="string"?N.createElement(v,{is:h.is}):N.createElement(v)}}_[Xn]=s,_[Tr]=h;e:for(N=s.child;N!==null;){if(N.tag===5||N.tag===6)_.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===s)break e;for(;N.sibling===null;){if(N.return===null||N.return===s)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}s.stateNode=_;e:switch(nr(_,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Oa(s)}}return sn(s),jv(s,s.type,o===null?null:o.memoizedProps,s.pendingProps,l),null;case 6:if(o&&s.stateNode!=null)o.memoizedProps!==h&&Oa(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(o=Q.current,mc(s)){if(o=s.stateNode,l=s.memoizedProps,h=null,v=Jn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}o[Xn]=s,o=!!(o.nodeValue===l||h!==null&&h.suppressHydrationWarning===!0||OR(o.nodeValue,l)),o||ns(s,!0)}else o=Ff(o).createTextNode(h),o[Xn]=s,s.stateNode=o}return sn(s),null;case 31:if(l=s.memoizedState,o===null||o.memoizedState!==null){if(h=mc(s),l!==null){if(o===null){if(!h)throw Error(r(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(557));o[Xn]=s}else ci(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;sn(s),o=!1}else l=Zg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=l),o=!0;if(!o)return s.flags&256?(Br(s),s):(Br(s),null);if((s.flags&128)!==0)throw Error(r(558))}return sn(s),null;case 13:if(h=s.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(v=mc(s),h!==null&&h.dehydrated!==null){if(o===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Xn]=s}else ci(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;sn(s),v=!1}else v=Zg(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Br(s),s):(Br(s),null)}return Br(s),(s.flags&128)!==0?(s.lanes=l,s):(l=h!==null,o=o!==null&&o.memoizedState!==null,l&&(h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),_=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(_=h.memoizedState.cachePool.pool),_!==v&&(h.flags|=2048)),l!==o&&l&&(s.child.flags|=8192),Of(s,s.updateQueue),sn(s),null);case 4:return Ce(),o===null&&ay(s.stateNode.containerInfo),sn(s),null;case 10:return Ea(s.type),sn(s),null;case 19:if(q(yn),h=s.memoizedState,h===null)return sn(s),null;if(v=(s.flags&128)!==0,_=h.rendering,_===null)if(v)tu(h,!1);else{if(gn!==0||o!==null&&(o.flags&128)!==0)for(o=s.child;o!==null;){if(_=pf(o),_!==null){for(s.flags|=128,tu(h,!1),o=_.updateQueue,s.updateQueue=o,Of(s,o),s.subtreeFlags=0,o=l,l=s.child;l!==null;)aS(l,o),l=l.sibling;return B(yn,yn.current&1|2),Tt&&wa(s,h.treeForkCount),s.child}o=o.sibling}h.tail!==null&&Se()>Nf&&(s.flags|=128,v=!0,tu(h,!1),s.lanes=4194304)}else{if(!v)if(o=pf(_),o!==null){if(s.flags|=128,v=!0,o=o.updateQueue,s.updateQueue=o,Of(s,o),tu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!_.alternate&&!Tt)return sn(s),null}else 2*Se()-h.renderingStartTime>Nf&&l!==536870912&&(s.flags|=128,v=!0,tu(h,!1),s.lanes=4194304);h.isBackwards?(_.sibling=s.child,s.child=_):(o=h.last,o!==null?o.sibling=_:s.child=_,h.last=_)}return h.tail!==null?(o=h.tail,h.rendering=o,h.tail=o.sibling,h.renderingStartTime=Se(),o.sibling=null,l=yn.current,B(yn,v?l&1|2:l&1),Tt&&wa(s,h.treeForkCount),o):(sn(s),null);case 22:case 23:return Br(s),sv(),h=s.memoizedState!==null,o!==null?o.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(l&536870912)!==0&&(s.flags&128)===0&&(sn(s),s.subtreeFlags&6&&(s.flags|=8192)):sn(s),l=s.updateQueue,l!==null&&Of(s,l.retryQueue),l=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==l&&(s.flags|=2048),o!==null&&q(di),null;case 24:return l=null,o!==null&&(l=o.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),Ea(Tn),sn(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function wD(o,s){switch(Hg(s),s.tag){case 1:return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 3:return Ea(Tn),Ce(),o=s.flags,(o&65536)!==0&&(o&128)===0?(s.flags=o&-65537|128,s):null;case 26:case 27:case 5:return H(s),null;case 31:if(s.memoizedState!==null){if(Br(s),s.alternate===null)throw Error(r(340));ci()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 13:if(Br(s),o=s.memoizedState,o!==null&&o.dehydrated!==null){if(s.alternate===null)throw Error(r(340));ci()}return o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 19:return q(yn),null;case 4:return Ce(),null;case 10:return Ea(s.type),null;case 22:case 23:return Br(s),sv(),o!==null&&q(di),o=s.flags,o&65536?(s.flags=o&-65537|128,s):null;case 24:return Ea(Tn),null;case 25:return null;default:return null}}function NE(o,s){switch(Hg(s),s.tag){case 3:Ea(Tn),Ce();break;case 26:case 27:case 5:H(s);break;case 4:Ce();break;case 31:s.memoizedState!==null&&Br(s);break;case 13:Br(s);break;case 19:q(yn);break;case 10:Ea(s.type);break;case 22:case 23:Br(s),sv(),o!==null&&q(di);break;case 24:Ea(Tn)}}function nu(o,s){try{var l=s.updateQueue,h=l!==null?l.lastEffect:null;if(h!==null){var v=h.next;l=v;do{if((l.tag&o)===o){h=void 0;var _=l.create,N=l.inst;h=_(),N.destroy=h}l=l.next}while(l!==v)}}catch(j){qt(s,s.return,j)}}function ls(o,s,l){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var _=v.next;h=_;do{if((h.tag&o)===o){var N=h.inst,j=N.destroy;if(j!==void 0){N.destroy=void 0,v=s;var X=l,he=j;try{he()}catch(be){qt(v,X,be)}}}h=h.next}while(h!==_)}}catch(be){qt(s,s.return,be)}}function ME(o){var s=o.updateQueue;if(s!==null){var l=o.stateNode;try{ES(s,l)}catch(h){qt(o,o.return,h)}}}function PE(o,s,l){l.props=gi(o.type,o.memoizedProps),l.state=o.memoizedState;try{l.componentWillUnmount()}catch(h){qt(o,s,h)}}function ru(o,s){try{var l=o.ref;if(l!==null){switch(o.tag){case 26:case 27:case 5:var h=o.stateNode;break;case 30:h=o.stateNode;break;default:h=o.stateNode}typeof l=="function"?o.refCleanup=l(h):l.current=h}}catch(v){qt(o,s,v)}}function Jo(o,s){var l=o.ref,h=o.refCleanup;if(l!==null)if(typeof h=="function")try{h()}catch(v){qt(o,s,v)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(v){qt(o,s,v)}else l.current=null}function DE(o){var s=o.type,l=o.memoizedProps,h=o.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&h.focus();break e;case"img":l.src?h.src=l.src:l.srcSet&&(h.srcset=l.srcSet)}}catch(v){qt(o,o.return,v)}}function $v(o,s,l){try{var h=o.stateNode;BD(h,o.type,l,s),h[Tr]=s}catch(v){qt(o,o.return,v)}}function LE(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&gs(o.type)||o.tag===4}function Uv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||LE(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&gs(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function zv(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(o,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(o),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=ya));else if(h!==4&&(h===27&&gs(o.type)&&(l=o.stateNode,s=null),o=o.child,o!==null))for(zv(o,s,l),o=o.sibling;o!==null;)zv(o,s,l),o=o.sibling}function Cf(o,s,l){var h=o.tag;if(h===5||h===6)o=o.stateNode,s?l.insertBefore(o,s):l.appendChild(o);else if(h!==4&&(h===27&&gs(o.type)&&(l=o.stateNode),o=o.child,o!==null))for(Cf(o,s,l),o=o.sibling;o!==null;)Cf(o,s,l),o=o.sibling}function jE(o){var s=o.stateNode,l=o.memoizedProps;try{for(var h=o.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);nr(s,h,l),s[Xn]=o,s[Tr]=l}catch(_){qt(o,o.return,_)}}var Ca=!1,An=!1,Vv=!1,$E=typeof WeakSet=="function"?WeakSet:Set,Gn=null;function SD(o,s){if(o=o.containerInfo,cy=Kf,o=Yw(o),Pg(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{l=(l=o.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var v=h.anchorOffset,_=h.focusNode;h=h.focusOffset;try{l.nodeType,_.nodeType}catch{l=null;break e}var N=0,j=-1,X=-1,he=0,be=0,Te=o,pe=null;t:for(;;){for(var ge;Te!==l||v!==0&&Te.nodeType!==3||(j=N+v),Te!==_||h!==0&&Te.nodeType!==3||(X=N+h),Te.nodeType===3&&(N+=Te.nodeValue.length),(ge=Te.firstChild)!==null;)pe=Te,Te=ge;for(;;){if(Te===o)break t;if(pe===l&&++he===v&&(j=N),pe===_&&++be===h&&(X=N),(ge=Te.nextSibling)!==null)break;Te=pe,pe=Te.parentNode}Te=ge}l=j===-1||X===-1?null:{start:j,end:X}}else l=null}l=l||{start:0,end:0}}else l=null;for(ly={focusedElem:o,selectionRange:l},Kf=!1,Gn=s;Gn!==null;)if(s=Gn,o=s.child,(s.subtreeFlags&1028)!==0&&o!==null)o.return=s,Gn=o;else for(;Gn!==null;){switch(s=Gn,_=s.alternate,o=s.flags,s.tag){case 0:if((o&4)!==0&&(o=s.updateQueue,o=o!==null?o.events:null,o!==null))for(l=0;l<o.length;l++)v=o[l],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((o&1024)!==0&&_!==null){o=void 0,l=s,v=_.memoizedProps,_=_.memoizedState,h=l.stateNode;try{var Ue=gi(l.type,v);o=h.getSnapshotBeforeUpdate(Ue,_),h.__reactInternalSnapshotBeforeUpdate=o}catch(Ye){qt(l,l.return,Ye)}}break;case 3:if((o&1024)!==0){if(o=s.stateNode.containerInfo,l=o.nodeType,l===9)fy(o);else if(l===1)switch(o.nodeName){case"HEAD":case"HTML":case"BODY":fy(o);break;default:o.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((o&1024)!==0)throw Error(r(163))}if(o=s.sibling,o!==null){o.return=s.return,Gn=o;break}Gn=s.return}}function UE(o,s,l){var h=l.flags;switch(l.tag){case 0:case 11:case 15:Ia(o,l),h&4&&nu(5,l);break;case 1:if(Ia(o,l),h&4)if(o=l.stateNode,s===null)try{o.componentDidMount()}catch(N){qt(l,l.return,N)}else{var v=gi(l.type,s.memoizedProps);s=s.memoizedState;try{o.componentDidUpdate(v,s,o.__reactInternalSnapshotBeforeUpdate)}catch(N){qt(l,l.return,N)}}h&64&&ME(l),h&512&&ru(l,l.return);break;case 3:if(Ia(o,l),h&64&&(o=l.updateQueue,o!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{ES(o,s)}catch(N){qt(l,l.return,N)}}break;case 27:s===null&&h&4&&jE(l);case 26:case 5:Ia(o,l),s===null&&h&4&&DE(l),h&512&&ru(l,l.return);break;case 12:Ia(o,l);break;case 31:Ia(o,l),h&4&&FE(o,l);break;case 13:Ia(o,l),h&4&&BE(o,l),h&64&&(o=l.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(l=kD.bind(null,l),QD(o,l))));break;case 22:if(h=l.memoizedState!==null||Ca,!h){s=s!==null&&s.memoizedState!==null||An,v=Ca;var _=An;Ca=h,(An=s)&&!_?ka(o,l,(l.subtreeFlags&8772)!==0):Ia(o,l),Ca=v,An=_}break;case 30:break;default:Ia(o,l)}}function zE(o){var s=o.alternate;s!==null&&(o.alternate=null,zE(s)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(s=o.stateNode,s!==null&&vg(s)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var cn=null,Cr=!1;function Aa(o,s,l){for(l=l.child;l!==null;)VE(o,s,l),l=l.sibling}function VE(o,s,l){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Rn,l)}catch{}switch(l.tag){case 26:An||Jo(l,s),Aa(o,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:An||Jo(l,s);var h=cn,v=Cr;gs(l.type)&&(cn=l.stateNode,Cr=!1),Aa(o,s,l),fu(l.stateNode),cn=h,Cr=v;break;case 5:An||Jo(l,s);case 6:if(h=cn,v=Cr,cn=null,Aa(o,s,l),cn=h,Cr=v,cn!==null)if(Cr)try{(cn.nodeType===9?cn.body:cn.nodeName==="HTML"?cn.ownerDocument.body:cn).removeChild(l.stateNode)}catch(_){qt(l,s,_)}else try{cn.removeChild(l.stateNode)}catch(_){qt(l,s,_)}break;case 18:cn!==null&&(Cr?(o=cn,MR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,l.stateNode),Lc(o)):MR(cn,l.stateNode));break;case 4:h=cn,v=Cr,cn=l.stateNode.containerInfo,Cr=!0,Aa(o,s,l),cn=h,Cr=v;break;case 0:case 11:case 14:case 15:ls(2,l,s),An||ls(4,l,s),Aa(o,s,l);break;case 1:An||(Jo(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"&&PE(l,s,h)),Aa(o,s,l);break;case 21:Aa(o,s,l);break;case 22:An=(h=An)||l.memoizedState!==null,Aa(o,s,l),An=h;break;default:Aa(o,s,l)}}function FE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{Lc(o)}catch(l){qt(s,s.return,l)}}}function BE(o,s){if(s.memoizedState===null&&(o=s.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{Lc(o)}catch(l){qt(s,s.return,l)}}function ED(o){switch(o.tag){case 31:case 13:case 19:var s=o.stateNode;return s===null&&(s=o.stateNode=new $E),s;case 22:return o=o.stateNode,s=o._retryCache,s===null&&(s=o._retryCache=new $E),s;default:throw Error(r(435,o.tag))}}function Af(o,s){var l=ED(o);s.forEach(function(h){if(!l.has(h)){l.add(h);var v=ND.bind(null,o,h);h.then(v,v)}})}function Ar(o,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var v=l[h],_=o,N=s,j=N;e:for(;j!==null;){switch(j.tag){case 27:if(gs(j.type)){cn=j.stateNode,Cr=!1;break e}break;case 5:cn=j.stateNode,Cr=!1;break e;case 3:case 4:cn=j.stateNode.containerInfo,Cr=!0;break e}j=j.return}if(cn===null)throw Error(r(160));VE(_,N,v),cn=null,Cr=!1,_=v.alternate,_!==null&&(_.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)qE(s,o),s=s.sibling}var No=null;function qE(o,s){var l=o.alternate,h=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:Ar(s,o),Ir(o),h&4&&(ls(3,o,o.return),nu(3,o),ls(5,o,o.return));break;case 1:Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),h&64&&Ca&&(o=o.updateQueue,o!==null&&(h=o.callbacks,h!==null&&(l=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=l===null?h:l.concat(h))));break;case 26:var v=No;if(Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),h&4){var _=l!==null?l.memoizedState:null;if(h=o.memoizedState,l===null)if(h===null)if(o.stateNode===null){e:{h=o.type,l=o.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":_=v.getElementsByTagName("title")[0],(!_||_[Il]||_[Xn]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=v.createElement(h),v.head.insertBefore(_,v.querySelector("head > title"))),nr(_,h,l),_[Xn]=o,Hn(_),h=_;break e;case"link":var N=qR("link","href",v).get(h+(l.href||""));if(N){for(var j=0;j<N.length;j++)if(_=N[j],_.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&_.getAttribute("rel")===(l.rel==null?null:l.rel)&&_.getAttribute("title")===(l.title==null?null:l.title)&&_.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){N.splice(j,1);break t}}_=v.createElement(h),nr(_,h,l),v.head.appendChild(_);break;case"meta":if(N=qR("meta","content",v).get(h+(l.content||""))){for(j=0;j<N.length;j++)if(_=N[j],_.getAttribute("content")===(l.content==null?null:""+l.content)&&_.getAttribute("name")===(l.name==null?null:l.name)&&_.getAttribute("property")===(l.property==null?null:l.property)&&_.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&_.getAttribute("charset")===(l.charSet==null?null:l.charSet)){N.splice(j,1);break t}}_=v.createElement(h),nr(_,h,l),v.head.appendChild(_);break;default:throw Error(r(468,h))}_[Xn]=o,Hn(_),h=_}o.stateNode=h}else HR(v,o.type,o.stateNode);else o.stateNode=BR(v,h,o.memoizedProps);else _!==h?(_===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):_.count--,h===null?HR(v,o.type,o.stateNode):BR(v,h,o.memoizedProps)):h===null&&o.stateNode!==null&&$v(o,o.memoizedProps,l.memoizedProps)}break;case 27:Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),l!==null&&h&4&&$v(o,o.memoizedProps,l.memoizedProps);break;case 5:if(Ar(s,o),Ir(o),h&512&&(An||l===null||Jo(l,l.return)),o.flags&32){v=o.stateNode;try{ac(v,"")}catch(Ue){qt(o,o.return,Ue)}}h&4&&o.stateNode!=null&&(v=o.memoizedProps,$v(o,v,l!==null?l.memoizedProps:v)),h&1024&&(Vv=!0);break;case 6:if(Ar(s,o),Ir(o),h&4){if(o.stateNode===null)throw Error(r(162));h=o.memoizedProps,l=o.stateNode;try{l.nodeValue=h}catch(Ue){qt(o,o.return,Ue)}}break;case 3:if(Hf=null,v=No,No=Bf(s.containerInfo),Ar(s,o),No=v,Ir(o),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Lc(s.containerInfo)}catch(Ue){qt(o,o.return,Ue)}Vv&&(Vv=!1,HE(o));break;case 4:h=No,No=Bf(o.stateNode.containerInfo),Ar(s,o),Ir(o),No=h;break;case 12:Ar(s,o),Ir(o);break;case 31:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Af(o,h)));break;case 13:Ar(s,o),Ir(o),o.child.flags&8192&&o.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(kf=Se()),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Af(o,h)));break;case 22:v=o.memoizedState!==null;var X=l!==null&&l.memoizedState!==null,he=Ca,be=An;if(Ca=he||v,An=be||X,Ar(s,o),An=be,Ca=he,Ir(o),h&8192)e:for(s=o.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(l===null||X||Ca||An||vi(o)),l=null,s=o;;){if(s.tag===5||s.tag===26){if(l===null){X=l=s;try{if(_=X.stateNode,v)N=_.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{j=X.stateNode;var Te=X.memoizedProps.style,pe=Te!=null&&Te.hasOwnProperty("display")?Te.display:null;j.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Ue){qt(X,X.return,Ue)}}}else if(s.tag===6){if(l===null){X=s;try{X.stateNode.nodeValue=v?"":X.memoizedProps}catch(Ue){qt(X,X.return,Ue)}}}else if(s.tag===18){if(l===null){X=s;try{var ge=X.stateNode;v?PR(ge,!0):PR(X.stateNode,!1)}catch(Ue){qt(X,X.return,Ue)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===o)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=o.updateQueue,h!==null&&(l=h.retryQueue,l!==null&&(h.retryQueue=null,Af(o,l))));break;case 19:Ar(s,o),Ir(o),h&4&&(h=o.updateQueue,h!==null&&(o.updateQueue=null,Af(o,h)));break;case 30:break;case 21:break;default:Ar(s,o),Ir(o)}}function Ir(o){var s=o.flags;if(s&2){try{for(var l,h=o.return;h!==null;){if(LE(h)){l=h;break}h=h.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var v=l.stateNode,_=Uv(o);Cf(o,_,v);break;case 5:var N=l.stateNode;l.flags&32&&(ac(N,""),l.flags&=-33);var j=Uv(o);Cf(o,j,N);break;case 3:case 4:var X=l.stateNode.containerInfo,he=Uv(o);zv(o,he,X);break;default:throw Error(r(161))}}catch(be){qt(o,o.return,be)}o.flags&=-3}s&4096&&(o.flags&=-4097)}function HE(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var s=o;HE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),o=o.sibling}}function Ia(o,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)UE(o,s.alternate,s),s=s.sibling}function vi(o){for(o=o.child;o!==null;){var s=o;switch(s.tag){case 0:case 11:case 14:case 15:ls(4,s,s.return),vi(s);break;case 1:Jo(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&PE(s,s.return,l),vi(s);break;case 27:fu(s.stateNode);case 26:case 5:Jo(s,s.return),vi(s);break;case 22:s.memoizedState===null&&vi(s);break;case 30:vi(s);break;default:vi(s)}o=o.sibling}}function ka(o,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=o,_=s,N=_.flags;switch(_.tag){case 0:case 11:case 15:ka(v,_,l),nu(4,_);break;case 1:if(ka(v,_,l),h=_,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(he){qt(h,h.return,he)}if(h=_,v=h.updateQueue,v!==null){var j=h.stateNode;try{var X=v.shared.hiddenCallbacks;if(X!==null)for(v.shared.hiddenCallbacks=null,v=0;v<X.length;v++)SS(X[v],j)}catch(he){qt(h,h.return,he)}}l&&N&64&&ME(_),ru(_,_.return);break;case 27:jE(_);case 26:case 5:ka(v,_,l),l&&h===null&&N&4&&DE(_),ru(_,_.return);break;case 12:ka(v,_,l);break;case 31:ka(v,_,l),l&&N&4&&FE(v,_);break;case 13:ka(v,_,l),l&&N&4&&BE(v,_);break;case 22:_.memoizedState===null&&ka(v,_,l),ru(_,_.return);break;case 30:break;default:ka(v,_,l)}s=s.sibling}}function Fv(o,s){var l=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(l=o.memoizedState.cachePool.pool),o=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(o=s.memoizedState.cachePool.pool),o!==l&&(o!=null&&o.refCount++,l!=null&&Bl(l))}function Bv(o,s){o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Bl(o))}function Mo(o,s,l,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)GE(o,s,l,h),s=s.sibling}function GE(o,s,l,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Mo(o,s,l,h),v&2048&&nu(9,s);break;case 1:Mo(o,s,l,h);break;case 3:Mo(o,s,l,h),v&2048&&(o=null,s.alternate!==null&&(o=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==o&&(s.refCount++,o!=null&&Bl(o)));break;case 12:if(v&2048){Mo(o,s,l,h),o=s.stateNode;try{var _=s.memoizedProps,N=_.id,j=_.onPostCommit;typeof j=="function"&&j(N,s.alternate===null?"mount":"update",o.passiveEffectDuration,-0)}catch(X){qt(s,s.return,X)}}else Mo(o,s,l,h);break;case 31:Mo(o,s,l,h);break;case 13:Mo(o,s,l,h);break;case 23:break;case 22:_=s.stateNode,N=s.alternate,s.memoizedState!==null?_._visibility&2?Mo(o,s,l,h):ou(o,s):_._visibility&2?Mo(o,s,l,h):(_._visibility|=2,xc(o,s,l,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Fv(N,s);break;case 24:Mo(o,s,l,h),v&2048&&Bv(s.alternate,s);break;default:Mo(o,s,l,h)}}function xc(o,s,l,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=o,N=s,j=l,X=h,he=N.flags;switch(N.tag){case 0:case 11:case 15:xc(_,N,j,X,v),nu(8,N);break;case 23:break;case 22:var be=N.stateNode;N.memoizedState!==null?be._visibility&2?xc(_,N,j,X,v):ou(_,N):(be._visibility|=2,xc(_,N,j,X,v)),v&&he&2048&&Fv(N.alternate,N);break;case 24:xc(_,N,j,X,v),v&&he&2048&&Bv(N.alternate,N);break;default:xc(_,N,j,X,v)}s=s.sibling}}function ou(o,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=o,h=s,v=h.flags;switch(h.tag){case 22:ou(l,h),v&2048&&Fv(h.alternate,h);break;case 24:ou(l,h),v&2048&&Bv(h.alternate,h);break;default:ou(l,h)}s=s.sibling}}var au=8192;function Tc(o,s,l){if(o.subtreeFlags&au)for(o=o.child;o!==null;)ZE(o,s,l),o=o.sibling}function ZE(o,s,l){switch(o.tag){case 26:Tc(o,s,l),o.flags&au&&o.memoizedState!==null&&l5(l,No,o.memoizedState,o.memoizedProps);break;case 5:Tc(o,s,l);break;case 3:case 4:var h=No;No=Bf(o.stateNode.containerInfo),Tc(o,s,l),No=h;break;case 22:o.memoizedState===null&&(h=o.alternate,h!==null&&h.memoizedState!==null?(h=au,au=16777216,Tc(o,s,l),au=h):Tc(o,s,l));break;default:Tc(o,s,l)}}function WE(o){var s=o.alternate;if(s!==null&&(o=s.child,o!==null)){s.child=null;do s=o.sibling,o.sibling=null,o=s;while(o!==null)}}function su(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Gn=h,YE(h,o)}WE(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)KE(o),o=o.sibling}function KE(o){switch(o.tag){case 0:case 11:case 15:su(o),o.flags&2048&&ls(9,o,o.return);break;case 3:su(o);break;case 12:su(o);break;case 22:var s=o.stateNode;o.memoizedState!==null&&s._visibility&2&&(o.return===null||o.return.tag!==13)?(s._visibility&=-3,If(o)):su(o);break;default:su(o)}}function If(o){var s=o.deletions;if((o.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var h=s[l];Gn=h,YE(h,o)}WE(o)}for(o=o.child;o!==null;){switch(s=o,s.tag){case 0:case 11:case 15:ls(8,s,s.return),If(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,If(s));break;default:If(s)}o=o.sibling}}function YE(o,s){for(;Gn!==null;){var l=Gn;switch(l.tag){case 0:case 11:case 15:ls(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var h=l.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Bl(l.memoizedState.cache)}if(h=l.child,h!==null)h.return=l,Gn=h;else e:for(l=o;Gn!==null;){h=Gn;var v=h.sibling,_=h.return;if(zE(h),h===l){Gn=null;break e}if(v!==null){v.return=_,Gn=v;break e}Gn=_}}}var RD={getCacheForType:function(o){var s=er(Tn),l=s.data.get(o);return l===void 0&&(l=o(),s.data.set(o,l)),l},cacheSignal:function(){return er(Tn).controller.signal}},xD=typeof WeakMap=="function"?WeakMap:Map,zt=0,Jt=null,bt=null,Rt=0,Bt=0,qr=null,us=!1,Oc=!1,qv=!1,Na=0,gn=0,ds=0,yi=0,Hv=0,Hr=0,Cc=0,iu=null,kr=null,Gv=!1,kf=0,QE=0,Nf=1/0,Mf=null,fs=null,Un=0,hs=null,Ac=null,Ma=0,Zv=0,Wv=null,XE=null,cu=0,Kv=null;function Gr(){return(zt&2)!==0&&Rt!==0?Rt&-Rt:F.T!==null?ty():mg()}function JE(){if(Hr===0)if((Rt&536870912)===0||Tt){var o=kt;kt<<=1,(kt&3932160)===0&&(kt=262144),Hr=o}else Hr=536870912;return o=Fr.current,o!==null&&(o.flags|=32),Hr}function Nr(o,s,l){(o===Jt&&(Bt===2||Bt===9)||o.cancelPendingCommit!==null)&&(Ic(o,0),ps(o,Rt,Hr,!1)),Lt(o,l),((zt&2)===0||o!==Jt)&&(o===Jt&&((zt&2)===0&&(yi|=l),gn===4&&ps(o,Rt,Hr,!1)),ea(o))}function eR(o,s,l){if((zt&6)!==0)throw Error(r(327));var h=!l&&(s&127)===0&&(s&o.expiredLanes)===0||ft(o,s),v=h?CD(o,s):Qv(o,s,!0),_=h;do{if(v===0){Oc&&!h&&ps(o,s,0,!1);break}else{if(l=o.current.alternate,_&&!TD(l)){v=Qv(o,s,!1),_=!1;continue}if(v===2){if(_=s,o.errorRecoveryDisabledLanes&_)var N=0;else N=o.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){s=N;e:{var j=o;v=iu;var X=j.current.memoizedState.isDehydrated;if(X&&(Ic(j,N).flags|=256),N=Qv(j,N,!1),N!==2){if(qv&&!X){j.errorRecoveryDisabledLanes|=_,yi|=_,v=4;break e}_=kr,kr=v,_!==null&&(kr===null?kr=_:kr.push.apply(kr,_))}v=N}if(_=!1,v!==2)continue}}if(v===1){Ic(o,0),ps(o,s,0,!0);break}e:{switch(h=o,_=v,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:ps(h,s,Hr,!us);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=kf+300-Se(),10<v)){if(ps(h,s,Hr,!us),He(h,0,!0)!==0)break e;Ma=s,h.timeoutHandle=kR(tR.bind(null,h,l,kr,Mf,Gv,s,Hr,yi,Cc,us,_,"Throttled",-0,0),v);break e}tR(h,l,kr,Mf,Gv,s,Hr,yi,Cc,us,_,null,-0,0)}}break}while(!0);ea(o)}function tR(o,s,l,h,v,_,N,j,X,he,be,Te,pe,ge){if(o.timeoutHandle=-1,Te=s.subtreeFlags,Te&8192||(Te&16785408)===16785408){Te={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ya},ZE(s,_,Te);var Ue=(_&62914560)===_?kf-Se():(_&4194048)===_?QE-Se():0;if(Ue=u5(Te,Ue),Ue!==null){Ma=_,o.cancelPendingCommit=Ue(lR.bind(null,o,s,_,l,h,v,N,j,X,be,Te,null,pe,ge)),ps(o,_,N,!he);return}}lR(o,s,_,l,h,v,N,j,X)}function TD(o){for(var s=o;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var h=0;h<l.length;h++){var v=l[h],_=v.getSnapshot;v=v.value;try{if(!zr(_(),v))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ps(o,s,l,h){s&=~Hv,s&=~yi,o.suspendedLanes|=s,o.pingedLanes&=~s,h&&(o.warmLanes|=s),h=o.expirationTimes;for(var v=s;0<v;){var _=31-xn(v),N=1<<_;h[_]=-1,v&=~N}l!==0&&io(o,l,s)}function Pf(){return(zt&6)===0?(lu(0),!1):!0}function Yv(){if(bt!==null){if(Bt===0)var o=bt.return;else o=bt,Sa=li=null,fv(o),bc=null,Hl=0,o=bt;for(;o!==null;)NE(o.alternate,o),o=o.return;bt=null}}function Ic(o,s){var l=o.timeoutHandle;l!==-1&&(o.timeoutHandle=-1,GD(l)),l=o.cancelPendingCommit,l!==null&&(o.cancelPendingCommit=null,l()),Ma=0,Yv(),Jt=o,bt=l=ba(o.current,null),Rt=s,Bt=0,qr=null,us=!1,Oc=ft(o,s),qv=!1,Cc=Hr=Hv=yi=ds=gn=0,kr=iu=null,Gv=!1,(s&8)!==0&&(s|=s&32);var h=o.entangledLanes;if(h!==0)for(o=o.entanglements,h&=s;0<h;){var v=31-xn(h),_=1<<v;s|=o[v],h&=~_}return Na=s,ef(),l}function nR(o,s){ct=null,F.H=Jl,s===_c||s===lf?(s=yS(),Bt=3):s===ev?(s=yS(),Bt=4):Bt=s===Cv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qr=s,bt===null&&(gn=1,Ef(o,fo(s,o.current)))}function rR(){var o=Fr.current;return o===null?!0:(Rt&4194048)===Rt?go===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?o===go:!1}function oR(){var o=F.H;return F.H=Jl,o===null?Jl:o}function aR(){var o=F.A;return F.A=RD,o}function Df(){gn=4,us||(Rt&4194048)!==Rt&&Fr.current!==null||(Oc=!0),(ds&134217727)===0&&(yi&134217727)===0||Jt===null||ps(Jt,Rt,Hr,!1)}function Qv(o,s,l){var h=zt;zt|=2;var v=oR(),_=aR();(Jt!==o||Rt!==s)&&(Mf=null,Ic(o,s)),s=!1;var N=gn;e:do try{if(Bt!==0&&bt!==null){var j=bt,X=qr;switch(Bt){case 8:Yv(),N=6;break e;case 3:case 2:case 9:case 6:Fr.current===null&&(s=!0);var he=Bt;if(Bt=0,qr=null,kc(o,j,X,he),l&&Oc){N=0;break e}break;default:he=Bt,Bt=0,qr=null,kc(o,j,X,he)}}OD(),N=gn;break}catch(be){nR(o,be)}while(!0);return s&&o.shellSuspendCounter++,Sa=li=null,zt=h,F.H=v,F.A=_,bt===null&&(Jt=null,Rt=0,ef()),N}function OD(){for(;bt!==null;)sR(bt)}function CD(o,s){var l=zt;zt|=2;var h=oR(),v=aR();Jt!==o||Rt!==s?(Mf=null,Nf=Se()+500,Ic(o,s)):Oc=ft(o,s);e:do try{if(Bt!==0&&bt!==null){s=bt;var _=qr;t:switch(Bt){case 1:Bt=0,qr=null,kc(o,s,_,1);break;case 2:case 9:if(gS(_)){Bt=0,qr=null,iR(s);break}s=function(){Bt!==2&&Bt!==9||Jt!==o||(Bt=7),ea(o)},_.then(s,s);break e;case 3:Bt=7;break e;case 4:Bt=5;break e;case 7:gS(_)?(Bt=0,qr=null,iR(s)):(Bt=0,qr=null,kc(o,s,_,7));break;case 5:var N=null;switch(bt.tag){case 26:N=bt.memoizedState;case 5:case 27:var j=bt;if(N?GR(N):j.stateNode.complete){Bt=0,qr=null;var X=j.sibling;if(X!==null)bt=X;else{var he=j.return;he!==null?(bt=he,Lf(he)):bt=null}break t}}Bt=0,qr=null,kc(o,s,_,5);break;case 6:Bt=0,qr=null,kc(o,s,_,6);break;case 8:Yv(),gn=6;break e;default:throw Error(r(462))}}AD();break}catch(be){nR(o,be)}while(!0);return Sa=li=null,F.H=h,F.A=v,zt=l,bt!==null?0:(Jt=null,Rt=0,ef(),gn)}function AD(){for(;bt!==null&&!te();)sR(bt)}function sR(o){var s=IE(o.alternate,o,Na);o.memoizedProps=o.pendingProps,s===null?Lf(o):bt=s}function iR(o){var s=o,l=s.alternate;switch(s.tag){case 15:case 0:s=RE(l,s,s.pendingProps,s.type,void 0,Rt);break;case 11:s=RE(l,s,s.pendingProps,s.type.render,s.ref,Rt);break;case 5:fv(s);default:NE(l,s),s=bt=aS(s,Na),s=IE(l,s,Na)}o.memoizedProps=o.pendingProps,s===null?Lf(o):bt=s}function kc(o,s,l,h){Sa=li=null,fv(s),bc=null,Hl=0;var v=s.return;try{if(vD(o,v,s,l,Rt)){gn=1,Ef(o,fo(l,o.current)),bt=null;return}}catch(_){if(v!==null)throw bt=v,_;gn=1,Ef(o,fo(l,o.current)),bt=null;return}s.flags&32768?(Tt||h===1?o=!0:Oc||(Rt&536870912)!==0?o=!1:(us=o=!0,(h===2||h===9||h===3||h===6)&&(h=Fr.current,h!==null&&h.tag===13&&(h.flags|=16384))),cR(s,o)):Lf(s)}function Lf(o){var s=o;do{if((s.flags&32768)!==0){cR(s,us);return}o=s.return;var l=bD(s.alternate,s,Na);if(l!==null){bt=l;return}if(s=s.sibling,s!==null){bt=s;return}bt=s=o}while(s!==null);gn===0&&(gn=5)}function cR(o,s){do{var l=wD(o.alternate,o);if(l!==null){l.flags&=32767,bt=l;return}if(l=o.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(o=o.sibling,o!==null)){bt=o;return}bt=o=l}while(o!==null);gn=6,bt=null}function lR(o,s,l,h,v,_,N,j,X){o.cancelPendingCommit=null;do jf();while(Un!==0);if((zt&6)!==0)throw Error(r(327));if(s!==null){if(s===o.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=Ug,on(o,l,_,N,j,X),o===Jt&&(bt=Jt=null,Rt=0),Ac=s,hs=o,Ma=l,Zv=_,Wv=v,XE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(o.callbackNode=null,o.callbackPriority=0,MD(et,function(){return pR(),null})):(o.callbackNode=null,o.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=F.T,F.T=null,v=Y.p,Y.p=2,N=zt,zt|=4;try{SD(o,s,l)}finally{zt=N,Y.p=v,F.T=h}}Un=1,uR(),dR(),fR()}}function uR(){if(Un===1){Un=0;var o=hs,s=Ac,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=F.T,F.T=null;var h=Y.p;Y.p=2;var v=zt;zt|=4;try{qE(s,o);var _=ly,N=Yw(o.containerInfo),j=_.focusedElem,X=_.selectionRange;if(N!==j&&j&&j.ownerDocument&&Kw(j.ownerDocument.documentElement,j)){if(X!==null&&Pg(j)){var he=X.start,be=X.end;if(be===void 0&&(be=he),"selectionStart"in j)j.selectionStart=he,j.selectionEnd=Math.min(be,j.value.length);else{var Te=j.ownerDocument||document,pe=Te&&Te.defaultView||window;if(pe.getSelection){var ge=pe.getSelection(),Ue=j.textContent.length,Ye=Math.min(X.start,Ue),Qt=X.end===void 0?Ye:Math.min(X.end,Ue);!ge.extend&&Ye>Qt&&(N=Qt,Qt=Ye,Ye=N);var ce=Ww(j,Ye),ne=Ww(j,Qt);if(ce&&ne&&(ge.rangeCount!==1||ge.anchorNode!==ce.node||ge.anchorOffset!==ce.offset||ge.focusNode!==ne.node||ge.focusOffset!==ne.offset)){var de=Te.createRange();de.setStart(ce.node,ce.offset),ge.removeAllRanges(),Ye>Qt?(ge.addRange(de),ge.extend(ne.node,ne.offset)):(de.setEnd(ne.node,ne.offset),ge.addRange(de))}}}}for(Te=[],ge=j;ge=ge.parentNode;)ge.nodeType===1&&Te.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<Te.length;j++){var Ee=Te[j];Ee.element.scrollLeft=Ee.left,Ee.element.scrollTop=Ee.top}}Kf=!!cy,ly=cy=null}finally{zt=v,Y.p=h,F.T=l}}o.current=s,Un=2}}function dR(){if(Un===2){Un=0;var o=hs,s=Ac,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=F.T,F.T=null;var h=Y.p;Y.p=2;var v=zt;zt|=4;try{UE(o,s.alternate,s)}finally{zt=v,Y.p=h,F.T=l}}Un=3}}function fR(){if(Un===4||Un===3){Un=0,oe();var o=hs,s=Ac,l=Ma,h=XE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Un=5:(Un=0,Ac=hs=null,hR(o,o.pendingLanes));var v=o.pendingLanes;if(v===0&&(fs=null),Io(l),s=s.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Rn,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=F.T,v=Y.p,Y.p=2,F.T=null;try{for(var _=o.onRecoverableError,N=0;N<h.length;N++){var j=h[N];_(j.value,{componentStack:j.stack})}}finally{F.T=s,Y.p=v}}(Ma&3)!==0&&jf(),ea(o),v=o.pendingLanes,(l&261930)!==0&&(v&42)!==0?o===Kv?cu++:(cu=0,Kv=o):cu=0,lu(0)}}function hR(o,s){(o.pooledCacheLanes&=s)===0&&(s=o.pooledCache,s!=null&&(o.pooledCache=null,Bl(s)))}function jf(){return uR(),dR(),fR(),pR()}function pR(){if(Un!==5)return!1;var o=hs,s=Zv;Zv=0;var l=Io(Ma),h=F.T,v=Y.p;try{Y.p=32>l?32:l,F.T=null,l=Wv,Wv=null;var _=hs,N=Ma;if(Un=0,Ac=hs=null,Ma=0,(zt&6)!==0)throw Error(r(331));var j=zt;if(zt|=4,KE(_.current),GE(_,_.current,N,l),zt=j,lu(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Rn,_)}catch{}return!0}finally{Y.p=v,F.T=h,hR(o,s)}}function mR(o,s,l){s=fo(l,s),s=Ov(o.stateNode,s,2),o=ss(o,s,2),o!==null&&(Lt(o,2),ea(o))}function qt(o,s,l){if(o.tag===3)mR(o,o,l);else for(;s!==null;){if(s.tag===3){mR(s,o,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(fs===null||!fs.has(h))){o=fo(l,o),l=gE(2),h=ss(s,l,2),h!==null&&(vE(l,h,s,o),Lt(h,2),ea(h));break}}s=s.return}}function Xv(o,s,l){var h=o.pingCache;if(h===null){h=o.pingCache=new xD;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(l)||(qv=!0,v.add(l),o=ID.bind(null,o,s,l),s.then(o,o))}function ID(o,s,l){var h=o.pingCache;h!==null&&h.delete(s),o.pingedLanes|=o.suspendedLanes&l,o.warmLanes&=~l,Jt===o&&(Rt&l)===l&&(gn===4||gn===3&&(Rt&62914560)===Rt&&300>Se()-kf?(zt&2)===0&&Ic(o,0):Hv|=l,Cc===Rt&&(Cc=0)),ea(o)}function gR(o,s){s===0&&(s=Wt()),o=si(o,s),o!==null&&(Lt(o,s),ea(o))}function kD(o){var s=o.memoizedState,l=0;s!==null&&(l=s.retryLane),gR(o,l)}function ND(o,s){var l=0;switch(o.tag){case 31:case 13:var h=o.stateNode,v=o.memoizedState;v!==null&&(l=v.retryLane);break;case 19:h=o.stateNode;break;case 22:h=o.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),gR(o,l)}function MD(o,s){return Ke(o,s)}var $f=null,Nc=null,Jv=!1,Uf=!1,ey=!1,ms=0;function ea(o){o!==Nc&&o.next===null&&(Nc===null?$f=Nc=o:Nc=Nc.next=o),Uf=!0,Jv||(Jv=!0,DD())}function lu(o,s){if(!ey&&Uf){ey=!0;do for(var l=!1,h=$f;h!==null;){if(o!==0){var v=h.pendingLanes;if(v===0)var _=0;else{var N=h.suspendedLanes,j=h.pingedLanes;_=(1<<31-xn(42|o)+1)-1,_&=v&~(N&~j),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(l=!0,bR(h,_))}else _=Rt,_=He(h,h===Jt?_:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(_&3)===0||ft(h,_)||(l=!0,bR(h,_));h=h.next}while(l);ey=!1}}function PD(){vR()}function vR(){Uf=Jv=!1;var o=0;ms!==0&&HD()&&(o=ms);for(var s=Se(),l=null,h=$f;h!==null;){var v=h.next,_=yR(h,s);_===0?(h.next=null,l===null?$f=v:l.next=v,v===null&&(Nc=l)):(l=h,(o!==0||(_&3)!==0)&&(Uf=!0)),h=v}Un!==0&&Un!==5||lu(o),ms!==0&&(ms=0)}function yR(o,s){for(var l=o.suspendedLanes,h=o.pingedLanes,v=o.expirationTimes,_=o.pendingLanes&-62914561;0<_;){var N=31-xn(_),j=1<<N,X=v[N];X===-1?((j&l)===0||(j&h)!==0)&&(v[N]=Xt(j,s)):X<=s&&(o.expiredLanes|=j),_&=~j}if(s=Jt,l=Rt,l=He(o,o===s?l:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h=o.callbackNode,l===0||o===s&&(Bt===2||Bt===9)||o.cancelPendingCommit!==null)return h!==null&&h!==null&&Z(h),o.callbackNode=null,o.callbackPriority=0;if((l&3)===0||ft(o,l)){if(s=l&-l,s===o.callbackPriority)return s;switch(h!==null&&Z(h),Io(l)){case 2:case 8:l=Ne;break;case 32:l=et;break;case 268435456:l=Pt;break;default:l=et}return h=_R.bind(null,o),l=Ke(l,h),o.callbackPriority=s,o.callbackNode=l,s}return h!==null&&h!==null&&Z(h),o.callbackPriority=2,o.callbackNode=null,2}function _R(o,s){if(Un!==0&&Un!==5)return o.callbackNode=null,o.callbackPriority=0,null;var l=o.callbackNode;if(jf()&&o.callbackNode!==l)return null;var h=Rt;return h=He(o,o===Jt?h:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),h===0?null:(eR(o,h,s),yR(o,Se()),o.callbackNode!=null&&o.callbackNode===l?_R.bind(null,o):null)}function bR(o,s){if(jf())return null;eR(o,s,!0)}function DD(){ZD(function(){(zt&6)!==0?Ke(Re,PD):vR()})}function ty(){if(ms===0){var o=vc;o===0&&(o=Et,Et<<=1,(Et&261888)===0&&(Et=256)),ms=o}return ms}function wR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:Gd(""+o)}function SR(o,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,o.id&&l.setAttribute("form",o.id),s.parentNode.insertBefore(l,s),o=new FormData(o),l.parentNode.removeChild(l),o}function LD(o,s,l,h,v){if(s==="submit"&&l&&l.stateNode===v){var _=wR((v[Tr]||null).action),N=h.submitter;N&&(s=(s=N[Tr]||null)?wR(s.formAction):N.getAttribute("formAction"),s!==null&&(_=s,N=null));var j=new Yd("action","action",null,h,v);o.push({event:j,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ms!==0){var X=N?SR(v,N):new FormData(v);wv(l,{pending:!0,data:X,method:v.method,action:_},null,X)}}else typeof _=="function"&&(j.preventDefault(),X=N?SR(v,N):new FormData(v),wv(l,{pending:!0,data:X,method:v.method,action:_},_,X))},currentTarget:v}]})}}for(var ny=0;ny<$g.length;ny++){var ry=$g[ny],jD=ry.toLowerCase(),$D=ry[0].toUpperCase()+ry.slice(1);ko(jD,"on"+$D)}ko(Jw,"onAnimationEnd"),ko(eS,"onAnimationIteration"),ko(tS,"onAnimationStart"),ko("dblclick","onDoubleClick"),ko("focusin","onFocus"),ko("focusout","onBlur"),ko(eD,"onTransitionRun"),ko(tD,"onTransitionStart"),ko(nD,"onTransitionCancel"),ko(nS,"onTransitionEnd"),rc("onMouseEnter",["mouseout","mouseover"]),rc("onMouseLeave",["mouseout","mouseover"]),rc("onPointerEnter",["pointerout","pointerover"]),rc("onPointerLeave",["pointerout","pointerover"]),ni("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ni("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ni("onBeforeInput",["compositionend","keypress","textInput","paste"]),ni("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ni("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ni("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uu="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(" "),UD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(uu));function ER(o,s){s=(s&4)!==0;for(var l=0;l<o.length;l++){var h=o[l],v=h.event;h=h.listeners;e:{var _=void 0;if(s)for(var N=h.length-1;0<=N;N--){var j=h[N],X=j.instance,he=j.currentTarget;if(j=j.listener,X!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Jd(be)}v.currentTarget=null,_=X}else for(N=0;N<h.length;N++){if(j=h[N],X=j.instance,he=j.currentTarget,j=j.listener,X!==_&&v.isPropagationStopped())break e;_=j,v.currentTarget=he;try{_(v)}catch(be){Jd(be)}v.currentTarget=null,_=X}}}}function wt(o,s){var l=s[gg];l===void 0&&(l=s[gg]=new Set);var h=o+"__bubble";l.has(h)||(RR(s,o,2,!1),l.add(h))}function oy(o,s,l){var h=0;s&&(h|=4),RR(l,o,h,s)}var zf="_reactListening"+Math.random().toString(36).slice(2);function ay(o){if(!o[zf]){o[zf]=!0,vw.forEach(function(l){l!=="selectionchange"&&(UD.has(l)||oy(l,!1,o),oy(l,!0,o))});var s=o.nodeType===9?o:o.ownerDocument;s===null||s[zf]||(s[zf]=!0,oy("selectionchange",!1,s))}}function RR(o,s,l,h){switch(JR(s)){case 2:var v=h5;break;case 8:v=p5;break;default:v=by}l=v.bind(null,s,l,o),v=void 0,!xg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?o.addEventListener(s,l,{capture:!0,passive:v}):o.addEventListener(s,l,!0):v!==void 0?o.addEventListener(s,l,{passive:v}):o.addEventListener(s,l,!1)}function sy(o,s,l,h,v){var _=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var N=h.tag;if(N===3||N===4){var j=h.stateNode.containerInfo;if(j===v)break;if(N===4)for(N=h.return;N!==null;){var X=N.tag;if((X===3||X===4)&&N.stateNode.containerInfo===v)return;N=N.return}for(;j!==null;){if(N=ec(j),N===null)return;if(X=N.tag,X===5||X===6||X===26||X===27){h=_=N;continue e}j=j.parentNode}}h=h.return}Aw(function(){var he=_,be=Eg(l),Te=[];e:{var pe=rS.get(o);if(pe!==void 0){var ge=Yd,Ue=o;switch(o){case"keypress":if(Wd(l)===0)break e;case"keydown":case"keyup":ge=N3;break;case"focusin":Ue="focus",ge=Ag;break;case"focusout":Ue="blur",ge=Ag;break;case"beforeblur":case"afterblur":ge=Ag;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=Nw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=b3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=D3;break;case Jw:case eS:case tS:ge=E3;break;case nS:ge=j3;break;case"scroll":case"scrollend":ge=y3;break;case"wheel":ge=U3;break;case"copy":case"cut":case"paste":ge=x3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=Pw;break;case"toggle":case"beforetoggle":ge=V3}var Ye=(s&4)!==0,Qt=!Ye&&(o==="scroll"||o==="scrollend"),ce=Ye?pe!==null?pe+"Capture":null:pe;Ye=[];for(var ne=he,de;ne!==null;){var Ee=ne;if(de=Ee.stateNode,Ee=Ee.tag,Ee!==5&&Ee!==26&&Ee!==27||de===null||ce===null||(Ee=Nl(ne,ce),Ee!=null&&Ye.push(du(ne,Ee,de))),Qt)break;ne=ne.return}0<Ye.length&&(pe=new ge(pe,Ue,null,l,be),Te.push({event:pe,listeners:Ye}))}}if((s&7)===0){e:{if(pe=o==="mouseover"||o==="pointerover",ge=o==="mouseout"||o==="pointerout",pe&&l!==Sg&&(Ue=l.relatedTarget||l.fromElement)&&(ec(Ue)||Ue[Ji]))break e;if((ge||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ge?(Ue=l.relatedTarget||l.toElement,ge=he,Ue=Ue?ec(Ue):null,Ue!==null&&(Qt=i(Ue),Ye=Ue.tag,Ue!==Qt||Ye!==5&&Ye!==27&&Ye!==6)&&(Ue=null)):(ge=null,Ue=he),ge!==Ue)){if(Ye=Nw,Ee="onMouseLeave",ce="onMouseEnter",ne="mouse",(o==="pointerout"||o==="pointerover")&&(Ye=Pw,Ee="onPointerLeave",ce="onPointerEnter",ne="pointer"),Qt=ge==null?pe:kl(ge),de=Ue==null?pe:kl(Ue),pe=new Ye(Ee,ne+"leave",ge,l,be),pe.target=Qt,pe.relatedTarget=de,Ee=null,ec(be)===he&&(Ye=new Ye(ce,ne+"enter",Ue,l,be),Ye.target=de,Ye.relatedTarget=Qt,Ee=Ye),Qt=Ee,ge&&Ue)t:{for(Ye=zD,ce=ge,ne=Ue,de=0,Ee=ce;Ee;Ee=Ye(Ee))de++;Ee=0;for(var We=ne;We;We=Ye(We))Ee++;for(;0<de-Ee;)ce=Ye(ce),de--;for(;0<Ee-de;)ne=Ye(ne),Ee--;for(;de--;){if(ce===ne||ne!==null&&ce===ne.alternate){Ye=ce;break t}ce=Ye(ce),ne=Ye(ne)}Ye=null}else Ye=null;ge!==null&&xR(Te,pe,ge,Ye,!1),Ue!==null&&Qt!==null&&xR(Te,Qt,Ue,Ye,!0)}}e:{if(pe=he?kl(he):window,ge=pe.nodeName&&pe.nodeName.toLowerCase(),ge==="select"||ge==="input"&&pe.type==="file")var jt=Fw;else if(zw(pe))if(Bw)jt=Q3;else{jt=K3;var Ge=W3}else ge=pe.nodeName,!ge||ge.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?he&&wg(he.elementType)&&(jt=Fw):jt=Y3;if(jt&&(jt=jt(o,he))){Vw(Te,jt,l,be);break e}Ge&&Ge(o,pe,he),o==="focusout"&&he&&pe.type==="number"&&he.memoizedProps.value!=null&&bg(pe,"number",pe.value)}switch(Ge=he?kl(he):window,o){case"focusin":(zw(Ge)||Ge.contentEditable==="true")&&(lc=Ge,Dg=he,zl=null);break;case"focusout":zl=Dg=lc=null;break;case"mousedown":Lg=!0;break;case"contextmenu":case"mouseup":case"dragend":Lg=!1,Qw(Te,l,be);break;case"selectionchange":if(J3)break;case"keydown":case"keyup":Qw(Te,l,be)}var lt;if(kg)e:{switch(o){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else cc?$w(o,l)&&(xt="onCompositionEnd"):o==="keydown"&&l.keyCode===229&&(xt="onCompositionStart");xt&&(Dw&&l.locale!=="ko"&&(cc||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&cc&&(lt=Iw()):(Ja=be,Tg="value"in Ja?Ja.value:Ja.textContent,cc=!0)),Ge=Vf(he,xt),0<Ge.length&&(xt=new Mw(xt,o,null,l,be),Te.push({event:xt,listeners:Ge}),lt?xt.data=lt:(lt=Uw(l),lt!==null&&(xt.data=lt)))),(lt=B3?q3(o,l):H3(o,l))&&(xt=Vf(he,"onBeforeInput"),0<xt.length&&(Ge=new Mw("onBeforeInput","beforeinput",null,l,be),Te.push({event:Ge,listeners:xt}),Ge.data=lt)),LD(Te,o,he,l,be)}ER(Te,s)})}function du(o,s,l){return{instance:o,listener:s,currentTarget:l}}function Vf(o,s){for(var l=s+"Capture",h=[];o!==null;){var v=o,_=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||_===null||(v=Nl(o,l),v!=null&&h.unshift(du(o,v,_)),v=Nl(o,s),v!=null&&h.push(du(o,v,_))),o.tag===3)return h;o=o.return}return[]}function zD(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function xR(o,s,l,h,v){for(var _=s._reactName,N=[];l!==null&&l!==h;){var j=l,X=j.alternate,he=j.stateNode;if(j=j.tag,X!==null&&X===h)break;j!==5&&j!==26&&j!==27||he===null||(X=he,v?(he=Nl(l,_),he!=null&&N.unshift(du(l,he,X))):v||(he=Nl(l,_),he!=null&&N.push(du(l,he,X)))),l=l.return}N.length!==0&&o.push({event:s,listeners:N})}var VD=/\r\n?/g,FD=/\u0000|\uFFFD/g;function TR(o){return(typeof o=="string"?o:""+o).replace(VD,`
10
+ `).replace(FD,"")}function OR(o,s){return s=TR(s),TR(o)===s}function Yt(o,s,l,h,v,_){switch(l){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||ac(o,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&ac(o,""+h);break;case"className":qd(o,"class",h);break;case"tabIndex":qd(o,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":qd(o,l,h);break;case"style":Ow(o,h,_);break;case"data":if(s!=="object"){qd(o,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||l!=="href")){o.removeAttribute(l);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Gd(""+h),o.setAttribute(l,h);break;case"action":case"formAction":if(typeof h=="function"){o.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof _=="function"&&(l==="formAction"?(s!=="input"&&Yt(o,s,"name",v.name,v,null),Yt(o,s,"formEncType",v.formEncType,v,null),Yt(o,s,"formMethod",v.formMethod,v,null),Yt(o,s,"formTarget",v.formTarget,v,null)):(Yt(o,s,"encType",v.encType,v,null),Yt(o,s,"method",v.method,v,null),Yt(o,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){o.removeAttribute(l);break}h=Gd(""+h),o.setAttribute(l,h);break;case"onClick":h!=null&&(o.onclick=ya);break;case"onScroll":h!=null&&wt("scroll",o);break;case"onScrollEnd":h!=null&&wt("scrollend",o);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}break;case"multiple":o.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":o.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){o.removeAttribute("xlink:href");break}l=Gd(""+h),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,""+h):o.removeAttribute(l);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":h&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,""):o.removeAttribute(l);break;case"capture":case"download":h===!0?o.setAttribute(l,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?o.setAttribute(l,h):o.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?o.setAttribute(l,h):o.removeAttribute(l);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?o.removeAttribute(l):o.setAttribute(l,h);break;case"popover":wt("beforetoggle",o),wt("toggle",o),Bd(o,"popover",h);break;case"xlinkActuate":va(o,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":va(o,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":va(o,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":va(o,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":va(o,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":va(o,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":va(o,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":va(o,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":va(o,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":Bd(o,"is",h);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=g3.get(l)||l,Bd(o,l,h))}}function iy(o,s,l,h,v,_){switch(l){case"style":Ow(o,h,_);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(l=h.__html,l!=null){if(v.children!=null)throw Error(r(60));o.innerHTML=l}}break;case"children":typeof h=="string"?ac(o,h):(typeof h=="number"||typeof h=="bigint")&&ac(o,""+h);break;case"onScroll":h!=null&&wt("scroll",o);break;case"onScrollEnd":h!=null&&wt("scrollend",o);break;case"onClick":h!=null&&(o.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yw.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(v=l.endsWith("Capture"),s=l.slice(2,v?l.length-7:void 0),_=o[Tr]||null,_=_!=null?_[l]:null,typeof _=="function"&&o.removeEventListener(s,_,v),typeof h=="function")){typeof _!="function"&&_!==null&&(l in o?o[l]=null:o.hasAttribute(l)&&o.removeAttribute(l)),o.addEventListener(s,h,v);break e}l in o?o[l]=h:h===!0?o.setAttribute(l,""):Bd(o,l,h)}}}function nr(o,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",o),wt("load",o);var h=!1,v=!1,_;for(_ in l)if(l.hasOwnProperty(_)){var N=l[_];if(N!=null)switch(_){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Yt(o,s,_,N,l,null)}}v&&Yt(o,s,"srcSet",l.srcSet,l,null),h&&Yt(o,s,"src",l.src,l,null);return;case"input":wt("invalid",o);var j=_=N=v=null,X=null,he=null;for(h in l)if(l.hasOwnProperty(h)){var be=l[h];if(be!=null)switch(h){case"name":v=be;break;case"type":N=be;break;case"checked":X=be;break;case"defaultChecked":he=be;break;case"value":_=be;break;case"defaultValue":j=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,s));break;default:Yt(o,s,h,be,l,null)}}Ew(o,_,j,X,he,N,v,!1);return;case"select":wt("invalid",o),h=N=_=null;for(v in l)if(l.hasOwnProperty(v)&&(j=l[v],j!=null))switch(v){case"value":_=j;break;case"defaultValue":N=j;break;case"multiple":h=j;default:Yt(o,s,v,j,l,null)}s=_,l=N,o.multiple=!!h,s!=null?oc(o,!!h,s,!1):l!=null&&oc(o,!!h,l,!0);return;case"textarea":wt("invalid",o),_=v=h=null;for(N in l)if(l.hasOwnProperty(N)&&(j=l[N],j!=null))switch(N){case"value":h=j;break;case"defaultValue":v=j;break;case"children":_=j;break;case"dangerouslySetInnerHTML":if(j!=null)throw Error(r(91));break;default:Yt(o,s,N,j,l,null)}xw(o,h,v,_);return;case"option":for(X in l)l.hasOwnProperty(X)&&(h=l[X],h!=null)&&(X==="selected"?o.selected=h&&typeof h!="function"&&typeof h!="symbol":Yt(o,s,X,h,l,null));return;case"dialog":wt("beforetoggle",o),wt("toggle",o),wt("cancel",o),wt("close",o);break;case"iframe":case"object":wt("load",o);break;case"video":case"audio":for(h=0;h<uu.length;h++)wt(uu[h],o);break;case"image":wt("error",o),wt("load",o);break;case"details":wt("toggle",o);break;case"embed":case"source":case"link":wt("error",o),wt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(he in l)if(l.hasOwnProperty(he)&&(h=l[he],h!=null))switch(he){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:Yt(o,s,he,h,l,null)}return;default:if(wg(s)){for(be in l)l.hasOwnProperty(be)&&(h=l[be],h!==void 0&&iy(o,s,be,h,l,void 0));return}}for(j in l)l.hasOwnProperty(j)&&(h=l[j],h!=null&&Yt(o,s,j,h,l,null))}function BD(o,s,l,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,_=null,N=null,j=null,X=null,he=null,be=null;for(ge in l){var Te=l[ge];if(l.hasOwnProperty(ge)&&Te!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":X=Te;default:h.hasOwnProperty(ge)||Yt(o,s,ge,null,h,Te)}}for(var pe in h){var ge=h[pe];if(Te=l[pe],h.hasOwnProperty(pe)&&(ge!=null||Te!=null))switch(pe){case"type":_=ge;break;case"name":v=ge;break;case"checked":he=ge;break;case"defaultChecked":be=ge;break;case"value":N=ge;break;case"defaultValue":j=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,s));break;default:ge!==Te&&Yt(o,s,pe,ge,h,Te)}}_g(o,N,j,X,he,be,_,v);return;case"select":ge=N=j=pe=null;for(_ in l)if(X=l[_],l.hasOwnProperty(_)&&X!=null)switch(_){case"value":break;case"multiple":ge=X;default:h.hasOwnProperty(_)||Yt(o,s,_,null,h,X)}for(v in h)if(_=h[v],X=l[v],h.hasOwnProperty(v)&&(_!=null||X!=null))switch(v){case"value":pe=_;break;case"defaultValue":j=_;break;case"multiple":N=_;default:_!==X&&Yt(o,s,v,_,h,X)}s=j,l=N,h=ge,pe!=null?oc(o,!!l,pe,!1):!!h!=!!l&&(s!=null?oc(o,!!l,s,!0):oc(o,!!l,l?[]:"",!1));return;case"textarea":ge=pe=null;for(j in l)if(v=l[j],l.hasOwnProperty(j)&&v!=null&&!h.hasOwnProperty(j))switch(j){case"value":break;case"children":break;default:Yt(o,s,j,null,h,v)}for(N in h)if(v=h[N],_=l[N],h.hasOwnProperty(N)&&(v!=null||_!=null))switch(N){case"value":pe=v;break;case"defaultValue":ge=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==_&&Yt(o,s,N,v,h,_)}Rw(o,pe,ge);return;case"option":for(var Ue in l)pe=l[Ue],l.hasOwnProperty(Ue)&&pe!=null&&!h.hasOwnProperty(Ue)&&(Ue==="selected"?o.selected=!1:Yt(o,s,Ue,null,h,pe));for(X in h)pe=h[X],ge=l[X],h.hasOwnProperty(X)&&pe!==ge&&(pe!=null||ge!=null)&&(X==="selected"?o.selected=pe&&typeof pe!="function"&&typeof pe!="symbol":Yt(o,s,X,pe,h,ge));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 Ye in l)pe=l[Ye],l.hasOwnProperty(Ye)&&pe!=null&&!h.hasOwnProperty(Ye)&&Yt(o,s,Ye,null,h,pe);for(he in h)if(pe=h[he],ge=l[he],h.hasOwnProperty(he)&&pe!==ge&&(pe!=null||ge!=null))switch(he){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,s));break;default:Yt(o,s,he,pe,h,ge)}return;default:if(wg(s)){for(var Qt in l)pe=l[Qt],l.hasOwnProperty(Qt)&&pe!==void 0&&!h.hasOwnProperty(Qt)&&iy(o,s,Qt,void 0,h,pe);for(be in h)pe=h[be],ge=l[be],!h.hasOwnProperty(be)||pe===ge||pe===void 0&&ge===void 0||iy(o,s,be,pe,h,ge);return}}for(var ce in l)pe=l[ce],l.hasOwnProperty(ce)&&pe!=null&&!h.hasOwnProperty(ce)&&Yt(o,s,ce,null,h,pe);for(Te in h)pe=h[Te],ge=l[Te],!h.hasOwnProperty(Te)||pe===ge||pe==null&&ge==null||Yt(o,s,Te,pe,h,ge)}function CR(o){switch(o){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 o=0,s=0,l=performance.getEntriesByType("resource"),h=0;h<l.length;h++){var v=l[h],_=v.transferSize,N=v.initiatorType,j=v.duration;if(_&&j&&CR(N)){for(N=0,j=v.responseEnd,h+=1;h<l.length;h++){var X=l[h],he=X.startTime;if(he>j)break;var be=X.transferSize,Te=X.initiatorType;be&&CR(Te)&&(X=X.responseEnd,N+=be*(X<j?1:(j-he)/(X-he)))}if(--h,s+=8*(_+N)/(v.duration/1e3),o++,10<o)break}}if(0<o)return s/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var cy=null,ly=null;function Ff(o){return o.nodeType===9?o:o.ownerDocument}function AR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function IR(o,s){if(o===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&s==="foreignObject"?0:o}function uy(o,s){return o==="textarea"||o==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var dy=null;function HD(){var o=window.event;return o&&o.type==="popstate"?o===dy?!1:(dy=o,!0):(dy=null,!1)}var kR=typeof setTimeout=="function"?setTimeout:void 0,GD=typeof clearTimeout=="function"?clearTimeout:void 0,NR=typeof Promise=="function"?Promise:void 0,ZD=typeof queueMicrotask=="function"?queueMicrotask:typeof NR<"u"?function(o){return NR.resolve(null).then(o).catch(WD)}:kR;function WD(o){setTimeout(function(){throw o})}function gs(o){return o==="head"}function MR(o,s){var l=s,h=0;do{var v=l.nextSibling;if(o.removeChild(l),v&&v.nodeType===8)if(l=v.data,l==="/$"||l==="/&"){if(h===0){o.removeChild(v),Lc(s);return}h--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")h++;else if(l==="html")fu(o.ownerDocument.documentElement);else if(l==="head"){l=o.ownerDocument.head,fu(l);for(var _=l.firstChild;_;){var N=_.nextSibling,j=_.nodeName;_[Il]||j==="SCRIPT"||j==="STYLE"||j==="LINK"&&_.rel.toLowerCase()==="stylesheet"||l.removeChild(_),_=N}}else l==="body"&&fu(o.ownerDocument.body);l=v}while(l);Lc(s)}function PR(o,s){var l=o;o=0;do{var h=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),h&&h.nodeType===8)if(l=h.data,l==="/$"){if(o===0)break;o--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||o++;l=h}while(l)}function fy(o){var s=o.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":fy(l),vg(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}o.removeChild(l)}}function KD(o,s,l,h){for(;o.nodeType===1;){var v=l;if(o.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(h){if(!o[Il])switch(s){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(_=o.getAttribute("rel"),_==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(_!==v.rel||o.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||o.getAttribute("title")!==(v.title==null?null:v.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(_=o.getAttribute("src"),(_!==(v.src==null?null:v.src)||o.getAttribute("type")!==(v.type==null?null:v.type)||o.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&_&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(s==="input"&&o.type==="hidden"){var _=v.name==null?null:""+v.name;if(v.type==="hidden"&&o.getAttribute("name")===_)return o}else return o;if(o=vo(o.nextSibling),o===null)break}return null}function YD(o,s,l){if(s==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=vo(o.nextSibling),o===null))return null;return o}function DR(o,s){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!s||(o=vo(o.nextSibling),o===null))return null;return o}function hy(o){return o.data==="$?"||o.data==="$~"}function py(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function QD(o,s){var l=o.ownerDocument;if(o.data==="$~")o._reactRetry=s;else if(o.data!=="$?"||l.readyState!=="loading")s();else{var h=function(){s(),l.removeEventListener("DOMContentLoaded",h)};l.addEventListener("DOMContentLoaded",h),o._reactRetry=h}}function vo(o){for(;o!=null;o=o.nextSibling){var s=o.nodeType;if(s===1||s===3)break;if(s===8){if(s=o.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return o}var my=null;function LR(o){o=o.nextSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="/$"||l==="/&"){if(s===0)return vo(o.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}o=o.nextSibling}return null}function jR(o){o=o.previousSibling;for(var s=0;o;){if(o.nodeType===8){var l=o.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return o;s--}else l!=="/$"&&l!=="/&"||s++}o=o.previousSibling}return null}function $R(o,s,l){switch(s=Ff(l),o){case"html":if(o=s.documentElement,!o)throw Error(r(452));return o;case"head":if(o=s.head,!o)throw Error(r(453));return o;case"body":if(o=s.body,!o)throw Error(r(454));return o;default:throw Error(r(451))}}function fu(o){for(var s=o.attributes;s.length;)o.removeAttributeNode(s[0]);vg(o)}var yo=new Map,UR=new Set;function Bf(o){return typeof o.getRootNode=="function"?o.getRootNode():o.nodeType===9?o:o.ownerDocument}var Pa=Y.d;Y.d={f:XD,r:JD,D:e5,C:t5,L:n5,m:r5,X:a5,S:o5,M:s5};function XD(){var o=Pa.f(),s=Pf();return o||s}function JD(o){var s=tc(o);s!==null&&s.tag===5&&s.type==="form"?nE(s):Pa.r(o)}var Mc=typeof document>"u"?null:document;function zR(o,s,l){var h=Mc;if(h&&typeof s=="string"&&s){var v=lo(s);v='link[rel="'+o+'"][href="'+v+'"]',typeof l=="string"&&(v+='[crossorigin="'+l+'"]'),UR.has(v)||(UR.add(v),o={rel:o,crossOrigin:l,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),nr(s,"link",o),Hn(s),h.head.appendChild(s)))}}function e5(o){Pa.D(o),zR("dns-prefetch",o,null)}function t5(o,s){Pa.C(o,s),zR("preconnect",o,s)}function n5(o,s,l){Pa.L(o,s,l);var h=Mc;if(h&&o&&s){var v='link[rel="preload"][as="'+lo(s)+'"]';s==="image"&&l&&l.imageSrcSet?(v+='[imagesrcset="'+lo(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(v+='[imagesizes="'+lo(l.imageSizes)+'"]')):v+='[href="'+lo(o)+'"]';var _=v;switch(s){case"style":_=Pc(o);break;case"script":_=Dc(o)}yo.has(_)||(o=p({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:o,as:s},l),yo.set(_,o),h.querySelector(v)!==null||s==="style"&&h.querySelector(hu(_))||s==="script"&&h.querySelector(pu(_))||(s=h.createElement("link"),nr(s,"link",o),Hn(s),h.head.appendChild(s)))}}function r5(o,s){Pa.m(o,s);var l=Mc;if(l&&o){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+lo(h)+'"][href="'+lo(o)+'"]',_=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Dc(o)}if(!yo.has(_)&&(o=p({rel:"modulepreload",href:o},s),yo.set(_,o),l.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(pu(_)))return}h=l.createElement("link"),nr(h,"link",o),Hn(h),l.head.appendChild(h)}}}function o5(o,s,l){Pa.S(o,s,l);var h=Mc;if(h&&o){var v=nc(h).hoistableStyles,_=Pc(o);s=s||"default";var N=v.get(_);if(!N){var j={loading:0,preload:null};if(N=h.querySelector(hu(_)))j.loading=5;else{o=p({rel:"stylesheet",href:o,"data-precedence":s},l),(l=yo.get(_))&&gy(o,l);var X=N=h.createElement("link");Hn(X),nr(X,"link",o),X._p=new Promise(function(he,be){X.onload=he,X.onerror=be}),X.addEventListener("load",function(){j.loading|=1}),X.addEventListener("error",function(){j.loading|=2}),j.loading|=4,qf(N,s,h)}N={type:"stylesheet",instance:N,count:1,state:j},v.set(_,N)}}}function a5(o,s){Pa.X(o,s);var l=Mc;if(l&&o){var h=nc(l).hoistableScripts,v=Dc(o),_=h.get(v);_||(_=l.querySelector(pu(v)),_||(o=p({src:o,async:!0},s),(s=yo.get(v))&&vy(o,s),_=l.createElement("script"),Hn(_),nr(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function s5(o,s){Pa.M(o,s);var l=Mc;if(l&&o){var h=nc(l).hoistableScripts,v=Dc(o),_=h.get(v);_||(_=l.querySelector(pu(v)),_||(o=p({src:o,async:!0,type:"module"},s),(s=yo.get(v))&&vy(o,s),_=l.createElement("script"),Hn(_),nr(_,"link",o),l.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},h.set(v,_))}}function VR(o,s,l,h){var v=(v=Q.current)?Bf(v):null;if(!v)throw Error(r(446));switch(o){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=Pc(l.href),l=nc(v).hoistableStyles,h=l.get(s),h||(h={type:"style",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){o=Pc(l.href);var _=nc(v).hoistableStyles,N=_.get(o);if(N||(v=v.ownerDocument||v,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(o,N),(_=v.querySelector(hu(o)))&&!_._p&&(N.instance=_,N.state.loading=5),yo.has(o)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},yo.set(o,l),_||i5(v,o,l,N.state))),s&&h===null)throw Error(r(528,""));return N}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Dc(l),l=nc(v).hoistableScripts,h=l.get(s),h||(h={type:"script",instance:null,count:0,state:null},l.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,o))}}function Pc(o){return'href="'+lo(o)+'"'}function hu(o){return'link[rel="stylesheet"]['+o+"]"}function FR(o){return p({},o,{"data-precedence":o.precedence,precedence:null})}function i5(o,s,l,h){o.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=o.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),nr(s,"link",l),Hn(s),o.head.appendChild(s))}function Dc(o){return'[src="'+lo(o)+'"]'}function pu(o){return"script[async]"+o}function BR(o,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var h=o.querySelector('style[data-href~="'+lo(l.href)+'"]');if(h)return s.instance=h,Hn(h),h;var v=p({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return h=(o.ownerDocument||o).createElement("style"),Hn(h),nr(h,"style",v),qf(h,l.precedence,o),s.instance=h;case"stylesheet":v=Pc(l.href);var _=o.querySelector(hu(v));if(_)return s.state.loading|=4,s.instance=_,Hn(_),_;h=FR(l),(v=yo.get(v))&&gy(h,v),_=(o.ownerDocument||o).createElement("link"),Hn(_);var N=_;return N._p=new Promise(function(j,X){N.onload=j,N.onerror=X}),nr(_,"link",h),s.state.loading|=4,qf(_,l.precedence,o),s.instance=_;case"script":return _=Dc(l.src),(v=o.querySelector(pu(_)))?(s.instance=v,Hn(v),v):(h=l,(v=yo.get(_))&&(h=p({},l),vy(h,v)),o=o.ownerDocument||o,v=o.createElement("script"),Hn(v),nr(v,"link",h),o.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,qf(h,l.precedence,o));return s.instance}function qf(o,s,l){for(var h=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,_=v,N=0;N<h.length;N++){var j=h[N];if(j.dataset.precedence===s)_=j;else if(_!==v)break}_?_.parentNode.insertBefore(o,_.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(o,s.firstChild))}function gy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.title==null&&(o.title=s.title)}function vy(o,s){o.crossOrigin==null&&(o.crossOrigin=s.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=s.referrerPolicy),o.integrity==null&&(o.integrity=s.integrity)}var Hf=null;function qR(o,s,l){if(Hf===null){var h=new Map,v=Hf=new Map;v.set(l,h)}else v=Hf,h=v.get(l),h||(h=new Map,v.set(l,h));if(h.has(o))return h;for(h.set(o,null),l=l.getElementsByTagName(o),v=0;v<l.length;v++){var _=l[v];if(!(_[Il]||_[Xn]||o==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var N=_.getAttribute(s)||"";N=o+N;var j=h.get(N);j?j.push(_):h.set(N,[_])}}return h}function HR(o,s,l){o=o.ownerDocument||o,o.head.insertBefore(l,s==="title"?o.querySelector("head > title"):null)}function c5(o,s,l){if(l===1||s.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(o=s.disabled,typeof s.precedence=="string"&&o==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function GR(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function l5(o,s,l,h){if(l.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var v=Pc(h.href),_=s.querySelector(hu(v));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(o.count++,o=Gf.bind(o),s.then(o,o)),l.state.loading|=4,l.instance=_,Hn(_);return}_=s.ownerDocument||s,h=FR(h),(v=yo.get(v))&&gy(h,v),_=_.createElement("link"),Hn(_);var N=_;N._p=new Promise(function(j,X){N.onload=j,N.onerror=X}),nr(_,"link",h),l.instance=_}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(o.count++,l=Gf.bind(o),s.addEventListener("load",l),s.addEventListener("error",l))}}var yy=0;function u5(o,s){return o.stylesheets&&o.count===0&&Wf(o,o.stylesheets),0<o.count||0<o.imgCount?function(l){var h=setTimeout(function(){if(o.stylesheets&&Wf(o,o.stylesheets),o.unsuspend){var _=o.unsuspend;o.unsuspend=null,_()}},6e4+s);0<o.imgBytes&&yy===0&&(yy=62500*qD());var v=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&Wf(o,o.stylesheets),o.unsuspend)){var _=o.unsuspend;o.unsuspend=null,_()}},(o.imgBytes>yy?50:800)+s);return o.unsuspend=l,function(){o.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function Gf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wf(this,this.stylesheets);else if(this.unsuspend){var o=this.unsuspend;this.unsuspend=null,o()}}}var Zf=null;function Wf(o,s){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Zf=new Map,s.forEach(d5,o),Zf=null,Gf.call(o))}function d5(o,s){if(!(s.state.loading&4)){var l=Zf.get(o);if(l)var h=l.get(null);else{l=new Map,Zf.set(o,l);for(var v=o.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<v.length;_++){var N=v[_];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(l.set(N.dataset.precedence,N),h=N)}h&&l.set(null,h)}v=s.instance,N=v.getAttribute("data-precedence"),_=l.get(N)||h,_===h&&l.set(null,v),l.set(N,v),this.count++,h=Gf.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),_?_.parentNode.insertBefore(v,_.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(v,o.firstChild)),s.state.loading|=4}}var mu={$$typeof:T,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function f5(o,s,l,h,v,_,N,j,X){this.tag=1,this.containerInfo=o,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=fr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fr(0),this.hiddenUpdates=fr(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=_,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function ZR(o,s,l,h,v,_,N,j,X,he,be,Te){return o=new f5(o,s,l,N,X,he,be,Te,j),s=1,_===!0&&(s|=24),_=Vr(3,null,null,s),o.current=_,_.stateNode=o,s=Qg(),s.refCount++,o.pooledCache=s,s.refCount++,_.memoizedState={element:h,isDehydrated:l,cache:s},tv(_),o}function WR(o){return o?(o=fc,o):fc}function KR(o,s,l,h,v,_){v=WR(v),h.context===null?h.context=v:h.pendingContext=v,h=as(s),h.payload={element:l},_=_===void 0?null:_,_!==null&&(h.callback=_),l=ss(o,h,s),l!==null&&(Nr(l,o,s),Zl(l,o,s))}function YR(o,s){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var l=o.retryLane;o.retryLane=l!==0&&l<s?l:s}}function _y(o,s){YR(o,s),(o=o.alternate)&&YR(o,s)}function QR(o){if(o.tag===13||o.tag===31){var s=si(o,67108864);s!==null&&Nr(s,o,67108864),_y(o,67108864)}}function XR(o){if(o.tag===13||o.tag===31){var s=Gr();s=Xi(s);var l=si(o,s);l!==null&&Nr(l,o,s),_y(o,s)}}var Kf=!0;function h5(o,s,l,h){var v=F.T;F.T=null;var _=Y.p;try{Y.p=2,by(o,s,l,h)}finally{Y.p=_,F.T=v}}function p5(o,s,l,h){var v=F.T;F.T=null;var _=Y.p;try{Y.p=8,by(o,s,l,h)}finally{Y.p=_,F.T=v}}function by(o,s,l,h){if(Kf){var v=wy(h);if(v===null)sy(o,s,h,Yf,l),ex(o,h);else if(g5(v,o,s,l,h))h.stopPropagation();else if(ex(o,h),s&4&&-1<m5.indexOf(o)){for(;v!==null;){var _=tc(v);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var N=Dt(_.pendingLanes);if(N!==0){var j=_;for(j.pendingLanes|=2,j.entangledLanes|=2;N;){var X=1<<31-xn(N);j.entanglements[1]|=X,N&=~X}ea(_),(zt&6)===0&&(Nf=Se()+500,lu(0))}}break;case 31:case 13:j=si(_,2),j!==null&&Nr(j,_,2),Pf(),_y(_,2)}if(_=wy(h),_===null&&sy(o,s,h,Yf,l),_===v)break;v=_}v!==null&&h.stopPropagation()}else sy(o,s,h,null,l)}}function wy(o){return o=Eg(o),Sy(o)}var Yf=null;function Sy(o){if(Yf=null,o=ec(o),o!==null){var s=i(o);if(s===null)o=null;else{var l=s.tag;if(l===13){if(o=c(s),o!==null)return o;o=null}else if(l===31){if(o=u(s),o!==null)return o;o=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;o=null}else s!==o&&(o=null)}}return Yf=o,null}function JR(o){switch(o){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(xe()){case Re:return 2;case Ne:return 8;case et:case st:return 32;case Pt:return 268435456;default:return 32}default:return 32}}var Ey=!1,vs=null,ys=null,_s=null,gu=new Map,vu=new Map,bs=[],m5="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 ex(o,s){switch(o){case"focusin":case"focusout":vs=null;break;case"dragenter":case"dragleave":ys=null;break;case"mouseover":case"mouseout":_s=null;break;case"pointerover":case"pointerout":gu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(s.pointerId)}}function yu(o,s,l,h,v,_){return o===null||o.nativeEvent!==_?(o={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:_,targetContainers:[v]},s!==null&&(s=tc(s),s!==null&&QR(s)),o):(o.eventSystemFlags|=h,s=o.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),o)}function g5(o,s,l,h,v){switch(s){case"focusin":return vs=yu(vs,o,s,l,h,v),!0;case"dragenter":return ys=yu(ys,o,s,l,h,v),!0;case"mouseover":return _s=yu(_s,o,s,l,h,v),!0;case"pointerover":var _=v.pointerId;return gu.set(_,yu(gu.get(_)||null,o,s,l,h,v)),!0;case"gotpointercapture":return _=v.pointerId,vu.set(_,yu(vu.get(_)||null,o,s,l,h,v)),!0}return!1}function tx(o){var s=ec(o.target);if(s!==null){var l=i(s);if(l!==null){if(s=l.tag,s===13){if(s=c(l),s!==null){o.blockedOn=s,mw(o.priority,function(){XR(l)});return}}else if(s===31){if(s=u(l),s!==null){o.blockedOn=s,mw(o.priority,function(){XR(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){o.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Qf(o){if(o.blockedOn!==null)return!1;for(var s=o.targetContainers;0<s.length;){var l=wy(o.nativeEvent);if(l===null){l=o.nativeEvent;var h=new l.constructor(l.type,l);Sg=h,l.target.dispatchEvent(h),Sg=null}else return s=tc(l),s!==null&&QR(s),o.blockedOn=l,!1;s.shift()}return!0}function nx(o,s,l){Qf(o)&&l.delete(s)}function v5(){Ey=!1,vs!==null&&Qf(vs)&&(vs=null),ys!==null&&Qf(ys)&&(ys=null),_s!==null&&Qf(_s)&&(_s=null),gu.forEach(nx),vu.forEach(nx)}function Xf(o,s){o.blockedOn===s&&(o.blockedOn=null,Ey||(Ey=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,v5)))}var Jf=null;function rx(o){Jf!==o&&(Jf=o,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Jf===o&&(Jf=null);for(var s=0;s<o.length;s+=3){var l=o[s],h=o[s+1],v=o[s+2];if(typeof h!="function"){if(Sy(h||l)===null)continue;break}var _=tc(l);_!==null&&(o.splice(s,3),s-=3,wv(_,{pending:!0,data:v,method:l.method,action:h},h,v))}}))}function Lc(o){function s(X){return Xf(X,o)}vs!==null&&Xf(vs,o),ys!==null&&Xf(ys,o),_s!==null&&Xf(_s,o),gu.forEach(s),vu.forEach(s);for(var l=0;l<bs.length;l++){var h=bs[l];h.blockedOn===o&&(h.blockedOn=null)}for(;0<bs.length&&(l=bs[0],l.blockedOn===null);)tx(l),l.blockedOn===null&&bs.shift();if(l=(o.ownerDocument||o).$$reactFormReplay,l!=null)for(h=0;h<l.length;h+=3){var v=l[h],_=l[h+1],N=v[Tr]||null;if(typeof _=="function")N||rx(l);else if(N){var j=null;if(_&&_.hasAttribute("formAction")){if(v=_,N=_[Tr]||null)j=N.formAction;else if(Sy(v)!==null)continue}else j=N.action;typeof j=="function"?l[h+1]=j:(l.splice(h,3),h-=3),rx(l)}}}function ox(){function o(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(N){return v=N})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(l,20)}function l(){if(!h&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){h=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function Ry(o){this._internalRoot=o}eh.prototype.render=Ry.prototype.render=function(o){var s=this._internalRoot;if(s===null)throw Error(r(409));var l=s.current,h=Gr();KR(l,h,o,s,null,null)},eh.prototype.unmount=Ry.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var s=o.containerInfo;KR(o.current,2,null,o,null,null),Pf(),s[Ji]=null}};function eh(o){this._internalRoot=o}eh.prototype.unstable_scheduleHydration=function(o){if(o){var s=mg();o={blockedOn:null,target:o,priority:s};for(var l=0;l<bs.length&&s!==0&&s<bs[l].priority;l++);bs.splice(l,0,o),l===0&&tx(o)}};var ax=t.version;if(ax!=="19.2.4")throw Error(r(527,ax,"19.2.4"));Y.findDOMNode=function(o){var s=o._reactInternals;if(s===void 0)throw typeof o.render=="function"?Error(r(188)):(o=Object.keys(o).join(","),Error(r(268,o)));return o=f(s),o=o!==null?m(o):null,o=o===null?null:o.stateNode,o};var y5={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var th=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!th.isDisabled&&th.supportsFiber)try{Rn=th.inject(y5),rn=th}catch{}}return bu.createRoot=function(o,s){if(!a(o))throw Error(r(299));var l=!1,h="",v=fE,_=hE,N=pE;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(N=s.onRecoverableError)),s=ZR(o,1,!1,null,null,l,h,null,v,_,N,ox),o[Ji]=s.current,ay(o),new Ry(s)},bu.hydrateRoot=function(o,s,l){if(!a(o))throw Error(r(299));var h=!1,v="",_=fE,N=hE,j=pE,X=null;return l!=null&&(l.unstable_strictMode===!0&&(h=!0),l.identifierPrefix!==void 0&&(v=l.identifierPrefix),l.onUncaughtError!==void 0&&(_=l.onUncaughtError),l.onCaughtError!==void 0&&(N=l.onCaughtError),l.onRecoverableError!==void 0&&(j=l.onRecoverableError),l.formState!==void 0&&(X=l.formState)),s=ZR(o,1,!0,s,l??null,h,v,X,_,N,j,ox),s.context=WR(null),l=s.current,h=Gr(),h=Xi(h),v=as(h),v.callback=null,ss(l,v,h),l=h,s.current.lanes=l,Lt(s,l),ea(s),o[Ji]=s.current,ay(o),new eh(s)},bu.version="19.2.4",bu}var gx;function I5(){if(gx)return Ty.exports;gx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ty.exports=A5(),Ty.exports}var k5=I5(),A=Ks();const ee=Ga(A),wb=b5({__proto__:null,default:ee},[A]);var ky={exports:{}},Ny={};var vx;function N5(){if(vx)return Ny;vx=1;var e=Ks().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return Ny.c=function(t){return e.H.useMemoCache(t)},Ny}var yx;function M5(){return yx||(yx=1,ky.exports=N5()),ky.exports}var Hi=M5(),wd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},P5={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},D5=class{#e=P5;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},Ii=new D5;function L5(e){setTimeout(e,0)}var ji=typeof window>"u"||"Deno"in globalThis;function Lr(){}function j5(e,t){return typeof e=="function"?e(t):e}function t_(e){return typeof e=="number"&&e>=0&&e!==1/0}function dA(e,t){return Math.max(e+(t||0)-Date.now(),0)}function js(e,t){return typeof e=="function"?e(t):e}function So(e,t){return typeof e=="function"?e(t):e}function _x(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:c,stale:u}=e;if(c){if(r){if(t.queryHash!==Sb(c,t.options))return!1}else if(!rd(t.queryKey,c))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||a&&a!==t.state.fetchStatus||i&&!i(t))}function bx(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(nd(t.options.mutationKey)!==nd(i))return!1}else if(!rd(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function Sb(e,t){return(t?.queryKeyHashFn||nd)(e)}function nd(e){return JSON.stringify(e,(t,n)=>r_(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function rd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>rd(e[n],t[n])):!1}var $5=Object.prototype.hasOwnProperty;function fA(e,t){if(e===t)return e;const n=wx(e)&&wx(t);if(!n&&!(r_(e)&&r_(t)))return t;const a=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),c=i.length,u=n?new Array(c):{};let d=0;for(let f=0;f<c;f++){const m=n?f:i[f],p=e[m],g=t[m];if(p===g){u[m]=p,(n?f<a:$5.call(e,m))&&d++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){u[m]=g;continue}const y=fA(p,g);u[m]=y,y===p&&d++}return a===c&&d===a?e:u}function n_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function wx(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function r_(e){if(!Sx(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Sx(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Sx(e){return Object.prototype.toString.call(e)==="[object Object]"}function U5(e){return new Promise(t=>{Ii.setTimeout(t,e)})}function o_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fA(e,t):t}function pae(e){return e}function z5(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function V5(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Eb=Symbol();function hA(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Eb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function F5(e,t){return typeof e=="function"?e(...t):!!e}var B5=class extends wd{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!ji&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},Rb=new B5;function a_(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var q5=L5;function H5(){let e=[],t=0,n=u=>{u()},r=u=>{u()},a=q5;const i=u=>{t?e.push(u):a(()=>{n(u)})},c=()=>{const u=e;e=[],u.length&&a(()=>{r(()=>{u.forEach(d=>{n(d)})})})};return{batch:u=>{let d;t++;try{d=u()}finally{t--,t||c()}return d},batchCalls:u=>(...d)=>{i(()=>{u(...d)})},schedule:i,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{a=u}}}var ar=H5(),G5=class extends wd{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!ji&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Np=new G5;function Z5(e){return Math.min(1e3*2**e,3e4)}function pA(e){return(e??"online")==="online"?Np.isOnline():!0}var s_=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mA(e){let t=!1,n=0,r;const a=a_(),i=()=>a.status!=="pending",c=b=>{if(!i()){const S=new s_(b);g(S),e.onCancel?.(S)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Rb.isFocused()&&(e.networkMode==="always"||Np.isOnline())&&e.canRun(),m=()=>pA(e.networkMode)&&e.canRun(),p=b=>{i()||(r?.(),a.resolve(b))},g=b=>{i()||(r?.(),a.reject(b))},y=()=>new Promise(b=>{r=S=>{(i()||f())&&b(S)},e.onPause?.()}).then(()=>{r=void 0,i()||e.onContinue?.()}),w=()=>{if(i())return;let b;const S=n===0?e.initialPromise:void 0;try{b=S??e.fn()}catch(R){b=Promise.reject(R)}Promise.resolve(b).then(p).catch(R=>{if(i())return;const E=e.retry??(ji?0:3),T=e.retryDelay??Z5,O=typeof T=="function"?T(n,R):T,C=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,R);if(t||!C){g(R);return}n++,e.onFail?.(n,R),U5(O).then(()=>f()?void 0:y()).then(()=>{t?g(R):w()})})};return{promise:a,status:()=>a.status,cancel:c,continue:()=>(r?.(),a),cancelRetry:u,continueRetry:d,canStart:m,start:()=>(m()?w():y().then(w),a)}}var gA=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),t_(this.gcTime)&&(this.#e=Ii.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ji?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Ii.clearTimeout(this.#e),this.#e=void 0)}},W5=class extends gA{#e;#t;#n;#o;#r;#i;#s;constructor(e){super(),this.#s=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Rx(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Rx(this.options);t.data!==void 0&&(this.setState(Ex(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=o_(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Lr).catch(Lr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>So(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Eb||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>js(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!dA(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#s?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#a({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const n=new AbortController,r=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},a=()=>{const u=hA(this.options,t),f=(()=>{const m={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(m),m})();return this.#s=!1,this.options.persister?this.options.persister(u,f,this):u(f)},c=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return r(u),u})();this.options.behavior?.onFetch(c,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#a({type:"fetch",meta:c.fetchOptions?.meta}),this.#r=mA({initialPromise:t?.initialPromise,fn:c.fetchFn,onCancel:u=>{u instanceof s_&&u.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(u,d)=>{this.#a({type:"failed",failureCount:u,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const u=await this.#r.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#n.config.onSuccess?.(u,this),this.#n.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof s_){if(u.silent)return this.#r.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#a({type:"error",error:u}),this.#n.config.onError?.(u,this),this.#n.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...vA(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...Ex(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const a=e.error;return{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),ar.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function vA(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pA(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ex(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Rx(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var K5=class extends wd{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#s=a_(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#i;#s;#a;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),xx(this.#t,this.options)?this.#d():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return i_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return i_(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof So(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),t._defaulted&&!n_(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Tx(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||So(this.options.enabled,this.#t)!==So(t.enabled,this.#t)||js(this.options.staleTime,this.#t)!==js(t.staleTime,this.#t))&&this.#g();const a=this.#v();r&&(this.#t!==n||So(this.options.enabled,this.#t)!==So(t.enabled,this.#t)||a!==this.#c)&&this.#y(a)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Q5(this,n)&&(this.#o=n,this.#i=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Lr)),t}#g(){this.#b();const e=js(this.options.staleTime,this.#t);if(ji||this.#o.isStale||!t_(e))return;const n=dA(this.#o.dataUpdatedAt,e)+1;this.#l=Ii.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(ji||So(this.options.enabled,this.#t)===!1||!t_(this.#c)||this.#c===0)&&(this.#u=Ii.setInterval(()=>{(this.options.refetchIntervalInBackground||Rb.isFocused())&&this.#d()},this.#c))}#_(){this.#g(),this.#y(this.#v())}#b(){this.#l&&(Ii.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(Ii.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,a=this.#o,i=this.#r,c=this.#i,d=e!==n?e.state:this.#n,{state:f}=e;let m={...f},p=!1,g;if(t._optimisticResults){const P=this.hasListeners(),$=!P&&xx(e,t),W=P&&Tx(e,n,t,r);($||W)&&(m={...m,...vA(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:y,errorUpdatedAt:w,status:b}=m;g=m.data;let S=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let P;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(P=a.data,S=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,P!==void 0&&(b="success",g=o_(a?.data,P,t),p=!0)}if(t.select&&g!==void 0&&!S)if(a&&g===i?.data&&t.select===this.#m)g=this.#f;else try{this.#m=t.select,g=t.select(g),g=o_(a?.data,g,t),this.#f=g,this.#a=null}catch(P){this.#a=P}this.#a&&(y=this.#a,g=this.#f,w=Date.now(),b="error");const R=m.fetchStatus==="fetching",E=b==="pending",T=b==="error",O=E&&R,C=g!==void 0,k={status:b,fetchStatus:m.fetchStatus,isPending:E,isSuccess:b==="success",isError:T,isInitialLoading:O,isLoading:O,data:g,dataUpdatedAt:m.dataUpdatedAt,error:y,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:R,isRefetching:R&&!E,isLoadingError:T&&!C,isPaused:m.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:T&&C,isStale:xb(e,t),refetch:this.refetch,promise:this.#s,isEnabled:So(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=V=>{k.status==="error"?V.reject(k.error):k.data!==void 0&&V.resolve(k.data)},$=()=>{const V=this.#s=k.promise=a_();P(V)},W=this.#s;switch(W.status){case"pending":e.queryHash===n.queryHash&&P(W);break;case"fulfilled":(k.status==="error"||k.data!==W.value)&&$();break;case"rejected":(k.status!=="error"||k.error!==W.reason)&&$();break}}return k}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#i=this.options,this.#r.data!==void 0&&(this.#h=this.#t),n_(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,a=typeof r=="function"?r():r;if(a==="all"||!a&&!this.#p.size)return!0;const i=new Set(a??this.#p);return this.options.throwOnError&&i.add("error"),Object.keys(this.#o).some(c=>{const u=c;return this.#o[u]!==e[u]&&i.has(u)})};this.#E({listeners:n()})}#S(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#E(e){ar.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Y5(e,t){return So(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function xx(e,t){return Y5(e,t)||e.state.data!==void 0&&i_(e,t,t.refetchOnMount)}function i_(e,t,n){if(So(t.enabled,e)!==!1&&js(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&xb(e,t)}return!1}function Tx(e,t,n,r){return(e!==t||So(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&xb(e,n)}function xb(e,t){return So(t.enabled,e)!==!1&&e.isStaleByTime(js(t.staleTime,e))}function Q5(e,t){return!n_(e.getCurrentResult(),t)}function Ox(e){return{onFetch:(t,n)=>{const r=t.options,a=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],c=t.state.data?.pageParams||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let m=!1;const p=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},g=hA(t.options,t.fetchOptions),y=async(w,b,S)=>{if(m)return Promise.reject();if(b==null&&w.pages.length)return Promise.resolve(w);const E=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:b,direction:S?"backward":"forward",meta:t.options.meta};return p(I),I})(),T=await g(E),{maxPages:O}=t.options,C=S?V5:z5;return{pages:C(w.pages,T,O),pageParams:C(w.pageParams,b,O)}};if(a&&i.length){const w=a==="backward",b=w?yA:c_,S={pages:i,pageParams:c},R=b(r,S);u=await y(S,R,w)}else{const w=e??i.length;do{const b=d===0?c[0]??r.initialPageParam:c_(r,u);if(d>0&&b==null)break;u=await y(u,b),d++}while(d<w)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function c_(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function yA(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function mae(e,t){return t?c_(e,t)!=null:!1}function gae(e,t){return!t||!e.getPreviousPageParam?!1:yA(e,t)!=null}var X5=class extends gA{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||J5(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=mA({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(i,c)=>{this.#r({type:"failed",failureCount:i,error:c})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",a=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:a}),await this.#n.config.onMutate?.(e,this,n);const c=await this.options.onMutate?.(e,n);c!==this.state.context&&this.#r({type:"pending",context:c,variables:e,isPaused:a})}const i=await this.#o.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,n),await this.options.onSuccess?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(i,null,e,this.state.context,n),this.#r({type:"success",data:i}),i}catch(i){try{throw await this.#n.config.onError?.(i,e,this.state.context,this,n),await this.options.onError?.(i,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,i,e,this.state.context,n),i}finally{this.#r({type:"error",error:i})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),ar.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function J5(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var e6=class extends wd{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new X5({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=nh(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=nh(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=nh(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(a=>a.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=nh(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){ar.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>bx(t,n))}findAll(e={}){return this.getAll().filter(t=>bx(e,t))}notify(e){ar.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return ar.batch(()=>Promise.all(e.map(t=>t.continue().catch(Lr))))}};function nh(e){return e.options.scope?.id}var t6=class extends wd{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,a=t.queryHash??Sb(r,t);let i=this.get(a);return i||(i=new W5({client:e,queryKey:r,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){ar.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>_x(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>_x(e,n)):t}notify(e){ar.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){ar.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){ar.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},n6=class{#e;#t;#n;#o;#r;#i;#s;#a;constructor(e={}){this.#e=e.queryCache||new t6,this.#t=e.mutationCache||new e6,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#s=Rb.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Np.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#s?.(),this.#s=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(js(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,c=j5(t,i);if(c!==void 0)return this.#e.build(this,r).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return ar.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;ar.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return ar.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ar.batch(()=>this.#e.findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(Lr).catch(Lr)}invalidateQueries(e,t={}){return ar.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ar.batch(()=>this.#e.findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(Lr)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Lr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(js(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Lr).catch(Lr)}fetchInfiniteQuery(e){return e.behavior=Ox(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Lr).catch(Lr)}ensureInfiniteQueryData(e){return e.behavior=Ox(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Np.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(nd(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{rd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(nd(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{rd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Sb(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Eb&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},_A=A.createContext(void 0),r6=e=>{const t=A.useContext(_A);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},o6=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(_A.Provider,{value:e,children:t})),bA=A.createContext(!1),a6=()=>A.useContext(bA);bA.Provider;function s6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var i6=A.createContext(s6()),c6=()=>A.useContext(i6),l6=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},u6=e=>{A.useEffect(()=>{e.clearReset()},[e])},d6=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||F5(n,[e.error,r])),f6=(e,t)=>t.state.data===void 0,h6=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},p6=(e,t)=>e.isLoading&&e.isFetching&&!t,m6=(e,t)=>e?.suspense&&t.isPending,Cx=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function g6(e,t,n){const r=a6(),a=c6(),i=r6(n),c=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(c),c._optimisticResults=r?"isRestoring":"optimistic",h6(c),l6(c,a),u6(a);const u=!i.getQueryCache().get(c.queryHash),[d]=A.useState(()=>new t(i,c)),f=d.getOptimisticResult(c),m=!r&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(p=>{const g=m?d.subscribe(ar.batchCalls(p)):Lr;return d.updateResult(),g},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(c)},[c,d]),m6(c,f))throw Cx(c,d,a);if(d6({result:f,errorResetBoundary:a,throwOnError:c.throwOnError,query:i.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw f.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(c,f),c.experimental_prefetchInRender&&!ji&&p6(f,r)&&(u?Cx(c,d,a):i.getQueryCache().get(c.queryHash)?.promise)?.catch(Lr).finally(()=>{d.updateResult()}),c.notifyOnChangeProps?f:d.trackResult(f)}function wA(e,t){return g6({...e,enabled:!0,suspense:!0,throwOnError:f6,placeholderData:void 0},K5,t)}const SA={publicConfig:()=>["publicConfig"],authConfig:()=>["authConfig"],session:()=>["session"],tasks:(e,t,n)=>{const r=["tasks",e];return t!==void 0&&r.push(t),t==="me"&&r.push(n??null),r},messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],connections:e=>[e,"connections"],connectionsByBinding:(e,t)=>[e,"connections",`binding:${t}`],connection:(e,t)=>[e,"connection",t],connectionActivity:(e,t,n)=>["monitoring","activity",e,t,n],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpTools:(e,t)=>["mcp","tools",e,t],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],modelsList:e=>["models-list",e],allowedModels:e=>[e,"allowed-models"],connectionCollections:e=>[e,"collections","discovery"],toolCall:(e,t,n)=>["tool-call",e,t,n],collectionItems:(e,t)=>["collection",e,t],collection:(e,t,n)=>[e,t,"collection",n],collectionItem:(e,t,n,r,a)=>[e,t,n,"collection",r,a],collectionList:(e,t,n,r,a)=>[e,t,n,"collection",r,"list",a],collectionListInfinite:(e,t,n,r,a)=>[e,t,n,"collection",r,"list-infinite",a],githubReadme:(e,t)=>["github-readme",e,t],monitoringStats:()=>["monitoring","stats"],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringDashboards:e=>["monitoring","dashboards",e],monitoringDashboardDetails:(e,t)=>["monitoring","dashboard",e,t],monitoringDashboardQuery:(e,t,n,r,a)=>["monitoringDashboardQuery",e,t,n,r,a??""],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,n)=>[...e,t,n],connectionPrompts:e=>["connection",e,"prompts"],connectionResources:e=>["connection",e,"resources"],user:e=>["user",e],storeReadmeUrl:e=>["store-readme-url",e],remoteMcpTools:e=>["remote-mcp-tools",e],tags:e=>[e,"tags"],memberTags:(e,t)=>[e,"member-tags",t],automations:e=>["automations",e],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,n)=>["automation-runs",e,t,...[...n??[]].sort()],projects:e=>["projects",e],project:(e,t)=>["project",e,t],projectById:e=>["project","byId",e],projectPluginConfigs:e=>["project-plugin-configs",e],projectPluginConfig:(e,t)=>["project-plugin-config",e,t],projectConnections:e=>["project-connections",e],projectConnectionDetails:(e,t)=>["project-connections",e,"details",t],aiProviders:e=>["ai-providers",e],aiProviderModels:(e,t)=>["ai-provider-models",e,t],aiProviderKeys:e=>["ai-provider-keys",e],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t]},EA=A.createContext(void 0);async function v6(){const e=await fetch("/api/auth/custom/config");if(!e.ok)throw new Error("Failed to load auth configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load auth configuration");return t.config}function y6(e){const t=Hi.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:SA.authConfig(),queryFn:v6,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=wA(r);let i;return t[1]!==a||t[2]!==n?(i=x.jsx(EA.Provider,{value:a,children:n}),t[1]=a,t[2]=n,t[3]=i):i=t[3],i}function vae(){const e=A.useContext(EA);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}const ol=new WeakMap,yp=new WeakMap,Mp={current:[]};let My=!1,Hu=0;const Du=new Set,rh=new Map;function RA(e){const t=Array.from(e).sort((n,r)=>n instanceof al&&n.options.deps.includes(r)?1:r instanceof al&&r.options.deps.includes(n)?-1:0);for(const n of t){if(Mp.current.includes(n))continue;Mp.current.push(n),n.recompute();const r=yp.get(n);if(r)for(const a of r){const i=ol.get(a);i&&RA(i)}}}function _6(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function b6(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function xA(e){if(Hu>0&&!rh.has(e)&&rh.set(e,e.prevState),Du.add(e),!(Hu>0)&&!My)try{for(My=!0;Du.size>0;){const t=Array.from(Du);Du.clear();for(const n of t){const r=rh.get(n)??n.prevState;n.prevState=r,_6(n)}for(const n of t){const r=ol.get(n);r&&(Mp.current.push(n),RA(r))}for(const n of t){const r=ol.get(n);if(r)for(const a of r)b6(a)}}}finally{My=!1,Mp.current=[],rh.clear()}}function Gu(e){Hu++;try{e()}finally{if(Hu--,Hu===0){const t=Du.values().next().value;t&&xA(t)}}}function w6(e){return typeof e=="function"}class l_{constructor(t,n){this.listeners=new Set,this.subscribe=r=>{var a,i;this.listeners.add(r);const c=(i=(a=this.options)==null?void 0:a.onSubscribe)==null?void 0:i.call(a,r,this);return()=>{this.listeners.delete(r),c?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,r,a;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):w6(t)?this.state=t(this.prevState):this.state=t,(a=(r=this.options)==null?void 0:r.onUpdate)==null||a.call(r),xA(this)}}class al{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,r=new Array(n),a=new Array(n);for(let i=0;i<n;i++){const c=this.options.deps[i];r[i]=c.prevState,a[i]=c.state}return this.lastSeenDepValues=a,{prevDepVals:r,currDepVals:a,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,r;this.prevState=this.state;const a=this.getDepVals();this.state=this.options.fn(a),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const i of this.options.deps)i instanceof al&&i.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:a}=this.getDepVals();for(let i=0;i<a.length;i++)if(a[i]!==r[i]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var r,a;this.listeners.add(n);const i=(a=(r=this.options).onSubscribe)==null?void 0:a.call(r,n,this);return()=>{this.listeners.delete(n),i?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof al)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof l_){let r=ol.get(n);r||(r=new Set,ol.set(n,r)),r.add(this);let a=yp.get(this);a||(a=new Set,yp.set(this,a)),a.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof al)this.unregisterFromGraph(n.options.deps);else if(n instanceof l_){const r=ol.get(n);r&&r.delete(this);const a=yp.get(this);a&&a.delete(n)}}}const $s="__TSR_index",Ax="popstate",Ix="beforeunload";function S6(e){let t=e.getLocation();const n=new Set,r=c=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:c}))},a=c=>{e.notifyOnIndexChange??!0?r(c):t=e.getLocation()},i=async({task:c,navigateOpts:u,...d})=>{if(u?.ignoreBlocker??!1){c();return}const m=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const g of m){const y=Pp(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:y,action:d.type})){e.onBlocked?.();return}}c()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:c=>(n.add(c),()=>{n.delete(c)}),push:(c,u,d)=>{const f=t.state[$s];u=kx(f+1,u),i({task:()=>{e.pushState(c,u),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:c,state:u})},replace:(c,u,d)=>{const f=t.state[$s];u=kx(f,u),i({task:()=>{e.replaceState(c,u),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:c,state:u})},go:(c,u)=>{i({task:()=>{e.go(c),a({type:"GO",index:c})},navigateOpts:u,type:"GO"})},back:c=>{i({task:()=>{e.back(c?.ignoreBlocker??!1),a({type:"BACK"})},navigateOpts:c,type:"BACK"})},forward:c=>{i({task:()=>{e.forward(c?.ignoreBlocker??!1),a({type:"FORWARD"})},navigateOpts:c,type:"FORWARD"})},canGoBack:()=>t.state[$s]!==0,createHref:c=>e.createHref(c),block:c=>{if(!e.setBlockers)return()=>{};const u=e.getBlockers?.()??[];return e.setBlockers([...u,c]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==c))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function kx(e,t){t||(t={});const n=Tb();return{...t,key:n,__TSR_key:n,[$s]:e}}function E6(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let a=[];const i=()=>a,c=P=>a=P,u=(P=>P),d=(()=>Pp(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=Tb();t.history.replaceState({[$s]:0,key:P,__TSR_key:P},"")}let f=d(),m,p=!1,g=!1,y=!1,w=!1;const b=()=>f;let S,R;const E=()=>{S&&(k._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),k._ignoreSubscribers=!1,S=void 0,R=void 0,m=void 0)},T=(P,$,W)=>{const V=u($);R||(m=f),f=Pp($,W),S={href:V,state:W,isPush:S?.isPush||P==="push"},R||(R=Promise.resolve().then(()=>E()))},O=P=>{f=d(),k.notify({type:P})},C=async()=>{if(g){g=!1;return}const P=d(),$=P.state[$s]-f.state[$s],W=$===1,V=$===-1,G=!W&&!V||p;p=!1;const U=G?"GO":V?"BACK":"FORWARD",J=G?{type:"GO",index:$}:{type:V?"BACK":"FORWARD"};if(y)y=!1;else{const le=i();if(typeof document<"u"&&le.length){for(const F of le)if(await F.blockerFn({currentLocation:f,nextLocation:P,action:U})){g=!0,t.history.go(1),k.notify(J);return}}}f=d(),k.notify(J)},I=P=>{if(w){w=!1;return}let $=!1;const W=i();if(typeof document<"u"&&W.length)for(const V of W){const G=V.enableBeforeUnload??!0;if(G===!0){$=!0;break}if(typeof G=="function"&&G()===!0){$=!0;break}}if($)return P.preventDefault(),P.returnValue=""},k=S6({getLocation:b,getLength:()=>t.history.length,pushState:(P,$)=>T("push",P,$),replaceState:(P,$)=>T("replace",P,$),back:P=>(P&&(y=!0),w=!0,t.history.back()),forward:P=>{P&&(y=!0),w=!0,t.history.forward()},go:P=>{p=!0,t.history.go(P)},createHref:P=>u(P),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Ix,I,{capture:!0}),t.removeEventListener(Ax,C)},onBlocked:()=>{m&&f!==m&&(f=m)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return t.addEventListener(Ix,I,{capture:!0}),t.addEventListener(Ax,C),t.history.pushState=function(...P){const $=n.apply(t.history,P);return k._ignoreSubscribers||O("PUSH"),$},t.history.replaceState=function(...P){const $=r.apply(t.history,P);return k._ignoreSubscribers||O("REPLACE"),$},k}function Pp(e,t){const n=e.indexOf("#"),r=e.indexOf("?"),a=Tb();return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{[$s]:0,key:a,__TSR_key:a}}}function Tb(){return(Math.random()+1).toString(36).substring(7)}function Dp(e){return e[e.length-1]}function R6(e){return typeof e=="function"}function Mi(e,t){return R6(e)?e(t):e}const x6=Object.prototype.hasOwnProperty;function wo(e,t){if(e===t)return e;const n=t,r=Px(e)&&Px(n);if(!r&&!(Lp(e)&&Lp(n)))return n;const a=r?e:Nx(e);if(!a)return n;const i=r?n:Nx(n);if(!i)return n;const c=a.length,u=i.length,d=r?new Array(u):{};let f=0;for(let m=0;m<u;m++){const p=r?m:i[m],g=e[p],y=n[p];if(g===y){d[p]=g,(r?m<c:x6.call(e,p))&&f++;continue}if(g===null||y===null||typeof g!="object"||typeof y!="object"){d[p]=y;continue}const w=wo(g,y);d[p]=w,w===g&&f++}return c===u&&f===c?e:d}function Nx(e){const t=[],n=Object.getOwnPropertyNames(e);for(const a of n){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}const r=Object.getOwnPropertySymbols(e);for(const a of r){if(!Object.prototype.propertyIsEnumerable.call(e,a))return!1;t.push(a)}return t}function Lp(e){if(!Mx(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Mx(n)||!n.hasOwnProperty("isPrototypeOf"))}function Mx(e){return Object.prototype.toString.call(e)==="[object Object]"}function Px(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Pi(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,a=e.length;r<a;r++)if(!Pi(e[r],t[r],n))return!1;return!0}if(Lp(e)&&Lp(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!r||t[c]!==void 0)&&!Pi(e[c],t[c],n))return!1;return!0}let a=0;if(!r)a=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&a++;let i=0;for(const c in t)if((!r||t[c]!==void 0)&&(i++,i>a||!Pi(e[c],t[c],n)))return!1;return a===i}return!1}function hl(e){let t,n;const r=new Promise((a,i)=>{t=a,n=i});return r.status="pending",r.resolve=a=>{r.status="resolved",r.value=a,t(a),e?.(a)},r.reject=a=>{r.status="rejected",n(a)},r}function T6(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function Us(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Dx(e){try{return decodeURI(e)}catch{return e.replaceAll(/%[0-9A-F]{2}/gi,t=>{try{return decodeURI(t)}catch{return t}})}}function Lx(e,t){if(!e)return e;const n=/%25|%5C/gi;let r=0,a="",i;for(;(i=n.exec(e))!==null;)a+=Dx(e.slice(r,i.index))+i[0],r=n.lastIndex;return a+Dx(r?e.slice(r):e)}var O6="Invariant failed";function Fa(e,t){if(!e)throw new Error(O6)}function jp(e){const t=new Map;let n,r;const a=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const c=t.get(i);if(c)return a(c),c.value},set(i,c){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===r&&(r=void 0)}const u=t.get(i);if(u)u.value=c,a(u);else{const d={key:i,value:c,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(i,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const pl=0,$i=1,Ui=2,od=3,C6=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,A6=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,I6=/^([^{]*)\{\$\}([^}]*)$/;function Ob(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),a=r===-1?e.length:r,i=e.substring(t,a);if(!i||!i.includes("$"))return n[0]=pl,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n;if(i==="$"){const f=e.length;return n[0]=Ui,n[1]=t,n[2]=t,n[3]=f,n[4]=f,n[5]=f,n}if(i.charCodeAt(0)===36)return n[0]=$i,n[1]=t,n[2]=t+1,n[3]=a,n[4]=a,n[5]=a,n;const c=i.match(I6);if(c){const m=c[1].length;return n[0]=Ui,n[1]=t+m,n[2]=t+m+1,n[3]=t+m+2,n[4]=t+m+3,n[5]=e.length,n}const u=i.match(A6);if(u){const f=u[1],m=u[2],p=u[3],g=f.length;return n[0]=od,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+m.length,n[4]=a-p.length,n[5]=a,n}const d=i.match(C6);if(d){const f=d[1],m=d[2],p=d[3],g=f.length;return n[0]=$i,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+m.length,n[4]=a-p.length,n[5]=a,n}return n[0]=pl,n[1]=t,n[2]=t,n[3]=a,n[4]=a,n[5]=a,n}function Am(e,t,n,r,a,i,c){c?.(n);let u=r;{const d=n.fullPath??n.from,f=d.length,m=n.options?.caseSensitive??e;for(;u<f;){const p=Ob(d,u,t);let g;const y=u,w=p[5];switch(u=w+1,i++,p[0]){case pl:{const S=d.substring(p[2],p[3]);if(m){const R=a.static?.get(S);if(R)g=R;else{a.static??=new Map;const E=ad(n.fullPath??n.from);E.parent=a,E.depth=i,g=E,a.static.set(S,E)}}else{const R=S.toLowerCase(),E=a.staticInsensitive?.get(R);if(E)g=E;else{a.staticInsensitive??=new Map;const T=ad(n.fullPath??n.from);T.parent=a,T.depth=i,g=T,a.staticInsensitive.set(R,T)}}break}case $i:{const S=d.substring(y,p[1]),R=d.substring(p[4],w),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.dynamic?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Dy($i,n.fullPath??n.from,E,T,O);g=I,I.depth=i,I.parent=a,a.dynamic??=[],a.dynamic.push(I)}break}case od:{const S=d.substring(y,p[1]),R=d.substring(p[4],w),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=a.optional?.find(I=>I.caseSensitive===E&&I.prefix===T&&I.suffix===O);if(C)g=C;else{const I=Dy(od,n.fullPath??n.from,E,T,O);g=I,I.parent=a,I.depth=i,a.optional??=[],a.optional.push(I)}break}case Ui:{const S=d.substring(y,p[1]),R=d.substring(p[4],w),E=m&&!!(S||R),T=S?E?S:S.toLowerCase():void 0,O=R?E?R:R.toLowerCase():void 0,C=Dy(Ui,n.fullPath??n.from,E,T,O);g=C,C.parent=a,C.depth=i,a.wildcard??=[],a.wildcard.push(C)}}a=g}if((n.path||!n.children)&&!n.isRoot){const p=d.endsWith("/");p||(a.notFound=n),(!a.route||!a.isIndex&&p)&&(a.route=n),a.isIndex||=p}}if(n.children)for(const d of n.children)Am(e,t,d,u,a,i,c)}function Py(e,t){if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Ci(e){if(e.static)for(const t of e.static.values())Ci(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Ci(t);if(e.dynamic?.length){e.dynamic.sort(Py);for(const t of e.dynamic)Ci(t)}if(e.optional?.length){e.optional.sort(Py);for(const t of e.optional)Ci(t)}if(e.wildcard?.length){e.wildcard.sort(Py);for(const t of e.wildcard)Ci(t)}}function ad(e){return{kind:pl,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null}}function Dy(e,t,n,r,a){return{kind:e,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:r,suffix:a}}function k6(e,t){const n=ad("/"),r=new Uint16Array(6);for(const a of e)Am(!1,r,a,1,n,0);Ci(n),t.masksTree=n,t.flatCache=jp(1e3)}function N6(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Cb(e,t.masksTree);return t.flatCache.set(e,r),r}function M6(e,t,n,r,a){e||="/",r||="/";const i=t?`case\0${e}`:e;let c=a.singleCache.get(i);if(!c){c=ad("/");const u=new Uint16Array(6);Am(t,u,{from:e},1,c,0),a.singleCache.set(i,c)}return Cb(r,c,n)}function P6(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,a=t.matchCache.get(r);if(a!==void 0)return a;e||="/";const i=Cb(e,t.segmentTree,n);return i&&(i.branch=$6(i.route)),t.matchCache.set(r,i),i}function D6(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function L6(e,t=!1,n){const r=ad(e.fullPath),a=new Uint16Array(6),i={},c={};let u=0;return Am(t,a,e,1,r,0,f=>{if(n?.(f,u),Fa(!(f.id in i),`Duplicate routes found with id: ${String(f.id)}`),i[f.id]=f,u!==0&&f.path){const m=D6(f.fullPath);(!c[m]||f.fullPath.endsWith("/"))&&(c[m]=f)}u++}),Ci(r),{processedTree:{segmentTree:r,singleCache:jp(1e3),matchCache:jp(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:c}}function Cb(e,t,n=!1){const r=e.split("/"),a=z6(e,r,t,n);if(!a)return null;const i=j6(e,r,a),c="**"in a;return c&&(i["**"]=a["**"]),{route:c?a.node.notFound??a.node.route:a.node.route,params:i}}function j6(e,t,n){const r=U6(n.node);let a=null;const i={};for(let c=0,u=0,d=0;u<r.length;c++,u++,d++){const f=r[u],m=t[c],p=d;if(m&&(d+=m.length),f.kind===$i){a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0;if(g.charCodeAt(y)===123){const b=f.suffix?.length??0,S=g.substring(y+2,g.length-b-1),R=m.substring(y,m.length-b);i[S]=decodeURIComponent(R)}else{const b=g.substring(1);i[b]=decodeURIComponent(m)}}else if(f.kind===od){if(n.skipped&1<<u){c--;continue}a??=n.node.fullPath.split("/");const g=a[u],y=f.prefix?.length??0,w=f.suffix?.length??0,b=g.substring(y+3,g.length-w-1),S=f.suffix||f.prefix?m.substring(y,m.length-w):m;S&&(i[b]=decodeURIComponent(S))}else if(f.kind===Ui){const g=f,y=e.substring(p+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),w=decodeURIComponent(y);i["*"]=w,i._splat=w;break}}return i}function $6(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function U6(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function z6(e,t,n,r){const a=!Dp(t),i=a&&e!=="/",c=t.length-(a?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,f=null,m=null;for(;u.length;){const p=u.pop();let{node:g,index:y,skipped:w,depth:b,statics:S,dynamics:R,optionals:E}=p;r&&g.notFound&&oh(f,p)&&(f=p);const T=y===c;if(T){if(g.route&&(!i||g.isIndex)&&(oh(m,p)&&(m=p),S===c&&g.isIndex))return m;if(!g.optional&&!g.wildcard)continue}const O=T?void 0:t[y];let C;if(g.wildcard&&oh(d,p))for(const I of g.wildcard){const{prefix:k,suffix:P}=I;if(!(k&&(T||!(I.caseSensitive?O:C??=O.toLowerCase()).startsWith(k)))){if(P){if(T)continue;const $=t.slice(y).join("/").slice(-P.length);if((I.caseSensitive?$:$.toLowerCase())!==P)continue}d={node:I,index:y,skipped:w,depth:b,statics:S,dynamics:R,optionals:E};break}}if(g.optional){const I=w|1<<b,k=b+1;for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P];u.push({node:$,index:y,skipped:I,depth:k,statics:S,dynamics:R,optionals:E})}if(!T)for(let P=g.optional.length-1;P>=0;P--){const $=g.optional[P],{prefix:W,suffix:V}=$;if(W||V){const G=$.caseSensitive?O:C??=O.toLowerCase();if(W&&!G.startsWith(W)||V&&!G.endsWith(V))continue}u.push({node:$,index:y+1,skipped:w,depth:k,statics:S,dynamics:R,optionals:E+1})}}if(!T&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const k=g.dynamic[I],{prefix:P,suffix:$}=k;if(P||$){const W=k.caseSensitive?O:C??=O.toLowerCase();if(P&&!W.startsWith(P)||$&&!W.endsWith($))continue}u.push({node:k,index:y+1,skipped:w,depth:b+1,statics:S,dynamics:R+1,optionals:E})}if(!T&&g.staticInsensitive){const I=g.staticInsensitive.get(C??=O.toLowerCase());I&&u.push({node:I,index:y+1,skipped:w,depth:b+1,statics:S+1,dynamics:R,optionals:E})}if(!T&&g.static){const I=g.static.get(O);I&&u.push({node:I,index:y+1,skipped:w,depth:b+1,statics:S+1,dynamics:R,optionals:E})}}if(m&&d)return oh(d,m)?m:d;if(m)return m;if(d)return d;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const g=p===e.length?"/":e.slice(p);return{node:f.node,skipped:f.skipped,"**":decodeURIComponent(g)}}return null}function oh(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&(t.node.isIndex>e.node.isIndex||t.node.isIndex===e.node.isIndex&&t.depth>e.depth))):!0}function _p(e){return Ab(e.filter(t=>t!==void 0).join("/"))}function Ab(e){return e.replace(/\/{2,}/g,"/")}function TA(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Di(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function bp(e){return Di(TA(e))}function $p(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function V6(e,t,n){return $p(e,n)===$p(t,n)}function F6({base:e,to:t,trailingSlash:n="never",cache:r}){const a=t.startsWith("/"),i=!a&&t===".";let c;if(r){c=a?t:i?e:e+"\0"+t;const p=r.get(c);if(p)return p}let u;if(i)u=e.split("/");else if(a)u=t.split("/");else{for(u=e.split("/");u.length>1&&Dp(u)==="";)u.pop();const p=t.split("/");for(let g=0,y=p.length;g<y;g++){const w=p[g];w===""?g?g===y-1&&u.push(w):u=[w]:w===".."?u.pop():w==="."||u.push(w)}}u.length>1&&(Dp(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let d,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const g=u[p];if(!g)continue;d=Ob(g,0,d);const y=d[0];if(y===pl){f+=g;continue}const w=d[5],b=g.substring(0,d[1]),S=g.substring(d[4],w),R=g.substring(d[2],d[3]);y===$i?f+=b||S?`${b}{$${R}}${S}`:`$${R}`:y===Ui?f+=b||S?`${b}{$}${S}`:"$":f+=`${b}{-$${R}}${S}`}f=Ab(f);const m=f||"/";return c&&r&&r.set(c,m),m}function Ly(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?encodeURI(r):B6(r,n)}function jy({path:e,params:t,decodeCharMap:n}){let r=!1;const a={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:r};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:r};const i=e.length;let c=0,u,d="";for(;c<i;){const m=c;u=Ob(e,m,u);const p=u[5];if(c=p+1,m===p)continue;const g=u[0];if(g===pl){d+="/"+e.substring(m,p);continue}if(g===Ui){const y=t._splat;a._splat=y,a["*"]=y;const w=e.substring(m,u[1]),b=e.substring(u[4],p);if(!y){r=!0,(w||b)&&(d+="/"+w+b);continue}const S=Ly("_splat",t,n);d+="/"+w+S+b;continue}if(g===$i){const y=e.substring(u[2],u[3]);!r&&!(y in t)&&(r=!0),a[y]=t[y];const w=e.substring(m,u[1]),b=e.substring(u[4],p),S=Ly(y,t,n)??"undefined";d+="/"+w+S+b;continue}if(g===od){const y=e.substring(u[2],u[3]),w=t[y];if(w==null)continue;a[y]=w;const b=e.substring(m,u[1]),S=e.substring(u[4],p),R=Ly(y,t,n)??"";d+="/"+b+R+S;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:a,interpolatedPath:d||"/",isMissingParams:r}}function B6(e,t){let n=encodeURIComponent(e);if(t)for(const[r,a]of t)n=n.replaceAll(r,a);return n}function Ro(e){return!!e?.isNotFound}function q6(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Up="tsr-scroll-restoration-v1_3",H6=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function G6(){const e=q6();if(!e)return null;const t=e.getItem(Up);let n=t?JSON.parse(t):{};return{state:n,set:r=>(n=Mi(r,n)||n,e.setItem(Up,JSON.stringify(n)))}}const ah=G6(),u_=e=>e.state.__TSR_key||e.href;function Z6(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let zp=!1;function OA({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:a,location:i}){let c;try{c=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const u=t||window.history.state?.__TSR_key,d=c[u];zp=!0;e:{if(r&&d&&Object.keys(d).length>0){for(const p in d){const g=d[p];if(p==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(p){const y=document.querySelector(p);y&&(y.scrollLeft=g.scrollX,y.scrollTop=g.scrollY)}}break e}const f=(i??window.location).hash.split("#",2)[1];if(f){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const g=document.getElementById(f);g&&g.scrollIntoView(p)}break e}const m={top:0,left:0,behavior:n};if(window.scrollTo(m),a)for(const p of a){if(p==="window")continue;const g=typeof p=="function"?p():document.querySelector(p);g&&g.scrollTo(m)}}zp=!1}function W6(e,t){if(!ah&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ah))return;e.isScrollRestorationSetup=!0,zp=!1;const r=e.options.getScrollRestorationKey||u_;window.history.scrollRestoration="manual";const a=i=>{if(zp||!e.isScrollRestoring)return;let c="";if(i.target===document||i.target===window)c="window";else{const d=i.target.getAttribute("data-scroll-restoration-id");d?c=`[data-scroll-restoration-id="${d}"]`:c=Z6(i.target)}const u=r(e.state.location);ah.set(d=>{const f=d[u]||={},m=f[c]||={};if(c==="window")m.scrollX=window.scrollX||0,m.scrollY=window.scrollY||0;else if(c){const p=document.querySelector(c);p&&(m.scrollX=p.scrollLeft||0,m.scrollY=p.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",H6(a,100),!0),e.subscribe("onRendered",i=>{const c=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(OA({storageKey:Up,key:c,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ah.set(u=>(u[c]||={},u)))})}function K6(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Y6(e,t=String){const n=new URLSearchParams;for(const r in e){const a=e[r];a!==void 0&&n.set(r,t(a))}return n.toString()}function $y(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Q6(e){const t=new URLSearchParams(e),n={};for(const[r,a]of t.entries()){const i=n[r];i==null?n[r]=$y(a):Array.isArray(i)?i.push($y(a)):n[r]=[i,$y(a)]}return n}const X6=eL(JSON.parse),J6=tL(JSON.stringify,JSON.parse);function eL(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Q6(t);for(const r in n){const a=n[r];if(typeof a=="string")try{n[r]=e(a)}catch{}}return n}}function tL(e,t){const n=typeof t=="function";function r(a){if(typeof a=="object"&&a!==null)try{return e(a)}catch{}else if(n&&typeof a=="string")try{return t(a),e(a)}catch{}return a}return a=>{const i=Y6(a,r);return i?`?${i}`:""}}const Yr="__root__";function zi(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function qo(e){return e instanceof Response&&!!e.options}const wp=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Im=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),CA=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Fa(n.options.notFoundComponent);const r=e.matches.find(a=>a.routeId===n.id);Fa(r,"Could not find match for route: "+n.id),e.updateMatch(r.id,a=>({...a,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,CA(e,t))},Ps=(e,t,n)=>{if(!(!qo(n)&&!Ro(n))){if(qo(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const r=qo(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:r,isFetching:!1,error:n})),Ro(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw qo(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(CA(e,n),n)}},AA=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},wu=(e,t,n,r)=>{const{id:a,routeId:i}=e.matches[t],c=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Ps(e,e.router.getMatch(a),n);try{c.options.onError?.(n)}catch(u){n=u,Ps(e,e.router.getMatch(a),n)}e.updateMatch(a,u=>(u._nonReactive.beforeLoadPromise?.resolve(),u._nonReactive.beforeLoadPromise=void 0,u._nonReactive.loadPromise?.resolve(),{...u,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},nL=(e,t,n,r)=>{const a=e.router.getMatch(t),i=e.matches[n-1]?.id,c=i?e.router.getMatch(i):void 0;if(e.router.isShell()){a.ssr=r.id===Yr;return}if(c?.ssr===!1){a.ssr=!1;return}const u=y=>y===!0&&c?.ssr==="data-only"?"data-only":y,d=e.router.options.defaultSsr??!0;if(r.options.ssr===void 0){a.ssr=u(d);return}if(typeof r.options.ssr!="function"){a.ssr=u(r.options.ssr);return}const{search:f,params:m}=a,p={search:sh(f,a.searchError),params:sh(m,a.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:sh(y.search,y.searchError),params:sh(y.params,y.paramsError),ssr:y.ssr}))},g=r.options.ssr(p);if(Us(g))return g.then(y=>{a.ssr=u(y??d)});a.ssr=u(g??d)},IA=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const a=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Im(e,t)&&(n.options.loader||n.options.beforeLoad||MA(n))&&typeof a=="number"&&a!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const c=setTimeout(()=>{wp(e)},a);r._nonReactive.pendingTimeout=c}},rL=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;IA(e,t,n,r);const a=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&Ps(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(a):a()},oL=(e,t,n,r)=>{const a=e.router.getMatch(t),i=a._nonReactive.loadPromise;a._nonReactive.loadPromise=hl(()=>{i?.resolve()});const{paramsError:c,searchError:u}=a;c&&wu(e,n,c,"PARSE_PARAMS"),u&&wu(e,n,u,"VALIDATE_SEARCH"),IA(e,t,r,a);const d=new AbortController,f=e.matches[n-1]?.id,g={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...a.__routeContext};let y=!1;const w=()=>{y||(y=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:d,context:g})))},b=()=>{a._nonReactive.beforeLoadPromise?.resolve(),a._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!r.options.beforeLoad){Gu(()=>{w(),b()});return}a._nonReactive.beforeLoadPromise=hl();const{search:S,params:R,cause:E}=a,T=Im(e,t),O={search:S,abortController:d,params:R,preload:T,context:g,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:T?"preload":E,matches:e.matches,...e.router.options.additionalContext},C=k=>{if(k===void 0){Gu(()=>{w(),b()});return}(qo(k)||Ro(k))&&(w(),wu(e,n,k,"BEFORE_LOAD")),Gu(()=>{w(),e.updateMatch(t,P=>({...P,__beforeLoadContext:k,context:{...P.context,...k}})),b()})};let I;try{if(I=r.options.beforeLoad(O),Us(I))return w(),I.catch(k=>{wu(e,n,k,"BEFORE_LOAD")}).then(C)}catch(k){w(),wu(e,n,k,"BEFORE_LOAD")}C(I)},aL=(e,t)=>{const{id:n,routeId:r}=e.matches[t],a=e.router.looseRoutesById[r],i=()=>{if(e.router.isServer){const d=nL(e,n,t,a);if(Us(d))return d.then(u)}return u()},c=()=>oL(e,n,t,a),u=()=>{if(AA(e,n))return;const d=rL(e,n,a);return Us(d)?d.then(c):c()};return i()},Zu=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const a={matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(a),n.options.scripts?.(a),n.options.headers?.(a)]).then(([i,c,u])=>{const d=i?.meta,f=i?.links,m=i?.scripts,p=i?.styles;return{meta:d,links:f,headScripts:m,headers:u,scripts:c,styles:p}})},kA=(e,t,n,r)=>{const a=e.matchPromises[n-1],{params:i,loaderDeps:c,abortController:u,cause:d}=e.router.getMatch(t);let f=e.router.options.context??{};for(let p=0;p<=n;p++){const g=e.matches[p];if(!g)continue;const y=e.router.getMatch(g.id);y&&(f={...f,...y.__routeContext??{},...y.__beforeLoadContext??{}})}const m=Im(e,t);return{params:i,deps:c,preload:!!m,parentMatchPromise:a,abortController:u,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:m?"preload":d,route:r,...e.router.options.additionalContext}},jx=async(e,t,n,r)=>{try{const a=e.router.getMatch(t);try{(!e.router.isServer||a.ssr===!0)&&NA(r);const i=r.options.loader?.(kA(e,t,n,r)),c=r.options.loader&&Us(i);if((c||r._lazyPromise||r._componentsPromise||r.options.head||r.options.scripts||r.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(t,p=>({...p,isFetching:"loader"})),r.options.loader){const p=c?await i:i;Ps(e,e.router.getMatch(t),p),p!==void 0&&e.updateMatch(t,g=>({...g,loaderData:p}))}r._lazyPromise&&await r._lazyPromise;const d=Zu(e,t,r),f=d?await d:void 0,m=a._nonReactive.minPendingPromise;m&&await m,r._componentsPromise&&await r._componentsPromise,e.updateMatch(t,p=>({...p,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(i){let c=i;const u=a._nonReactive.minPendingPromise;u&&await u,Ro(i)&&await r.options.notFoundComponent?.preload?.(),Ps(e,e.router.getMatch(t),i);try{r.options.onError?.(i)}catch(m){c=m,Ps(e,e.router.getMatch(t),m)}const d=Zu(e,t,r),f=d?await d:void 0;e.updateMatch(t,m=>({...m,error:c,status:"error",isFetching:!1,...f}))}}catch(a){const i=e.router.getMatch(t);if(i){const c=Zu(e,t,r);if(c){const u=await c;e.updateMatch(t,d=>({...d,...u}))}i._nonReactive.loaderPromise=void 0}Ps(e,i,a)}},sL=async(e,t)=>{const{id:n,routeId:r}=e.matches[t];let a=!1,i=!1;const c=e.router.looseRoutesById[r];if(AA(e,n)){if(e.router.isServer){const f=Zu(e,n,c);if(f){const m=await f;e.updateMatch(n,p=>({...p,...m}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const m=e.router.getMatch(n),p=m._nonReactive.error||m.error;p&&Ps(e,m,p)}else{const m=Date.now()-f.updatedAt,p=Im(e,n),g=p?c.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.router.options.defaultStaleTime??0,y=c.options.shouldReload,w=typeof y=="function"?y(kA(e,n,t,c)):y,b=!!p&&!e.router.state.matches.some(T=>T.id===n),S=e.router.getMatch(n);S._nonReactive.loaderPromise=hl(),b!==S.preload&&e.updateMatch(n,T=>({...T,preload:b}));const{status:R,invalid:E}=S;if(a=R==="success"&&(E||(w??m>g)),!(p&&c.options.preload===!1))if(a&&!e.sync)i=!0,(async()=>{try{await jx(e,n,t,c);const T=e.router.getMatch(n);T._nonReactive.loaderPromise?.resolve(),T._nonReactive.loadPromise?.resolve(),T._nonReactive.loaderPromise=void 0}catch(T){qo(T)&&await e.router.navigate(T.options)}})();else if(R!=="success"||a&&e.sync)await jx(e,n,t,c);else{const T=Zu(e,n,c);if(T){const O=await T;e.updateMatch(n,C=>({...C,...O}))}}}}const u=e.router.getMatch(n);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const d=i?u.isFetching:!1;return d!==u.isFetching||u.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:d,invalid:!1})),e.router.getMatch(n)):u};async function $x(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&wp(t);try{for(let a=0;a<t.matches.length;a++){const i=aL(t,a);Us(i)&&await i}const n=t.firstBadMatchIndex??t.matches.length;for(let a=0;a<n;a++)t.matchPromises.push(sL(t,a));await Promise.all(t.matchPromises);const r=wp(t);Us(r)&&await r}catch(n){if(Ro(n)&&!t.preload){const r=wp(t);throw Us(r)&&await r,n}if(qo(n))throw n}return t.matches}async function NA(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of PA){const a=e.options[r]?.preload;a&&n.push(a())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function sh(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function MA(e){for(const t of PA)if(e.options[t]?.preload)return!0;return!1}const PA=["component","errorComponent","pendingComponent","notFoundComponent"];function iL(e){return{input:({url:t})=>{for(const n of e)t=DA(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=LA(e[n],t);return t}}}function cL(e){const t=bp(e.basepath),n=`/${t}`,r=`${n}/`,a=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:c})=>{const u=e.caseSensitive?c.pathname:c.pathname.toLowerCase();return u===a?c.pathname="/":u.startsWith(i)&&(c.pathname=c.pathname.slice(n.length)),c},output:({url:c})=>(c.pathname=_p(["/",t,c.pathname]),c)}}function DA(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function LA(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Li(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,a=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:a,hashChanged:i}}class lL{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options,a=this.basepath??r?.basepath??"/",i=this.basepath===void 0,c=r?.rewrite;this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=E6())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new l_(dL(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),W6(this));let u=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(i||a!==d||c!==f){this.basepath=d;const g=[];bp(d)!==""&&g.push(cL({basepath:d})),f&&g.push(f),this.rewrite=g.length===0?void 0:g.length===1?g[0]:iL(g),this.history&&this.updateLatestLocation(),u=!0}u&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:r,processedTree:a}=L6(this.routeTree,this.options.caseSensitive,(c,u)=>{c.init({originalIndex:u})});this.options.routeMasks&&k6(this.options.routeMasks,a),this.routesById=n,this.routesByPath=r,this.processedTree=a;const i=this.options.notFoundRoute;i&&(i.init({originalIndex:99999999999}),this.routesById[i.id]=i)},this.subscribe=(n,r)=>{const a={eventType:n,fn:r};return this.subscribers.add(a),()=>{this.subscribers.delete(a)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const a=({href:d,state:f})=>{const m=new URL(d,this.origin),p=DA(this.rewrite,m),g=this.options.parseSearch(p.search),y=this.options.stringifySearch(g);p.search=y;const w=p.href.replace(p.origin,""),{pathname:b,hash:S}=p;return{href:w,publicHref:d,url:p.href,pathname:Lx(b),searchStr:y,search:wo(r?.search,g),hash:S.split("#").reverse()[0]??"",state:wo(r?.state,f)}},i=a(n),{__tempLocation:c,__tempKey:u}=i.state;if(c&&(!u||u===this.tempLocationKey)){const d=a(c);return d.state.key=i.state.key,d.state.__TSR_key=i.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:i}}return i},this.resolvePathCache=jp(1e3),this.resolvePathWithBase=(n,r)=>F6({base:n,to:Ab(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,a)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},a):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>fL({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const c=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutes(c,{_buildLocation:!0}),d=Dp(u);i.from;const f=i.unsafeRelative==="path"?c.pathname:i.from??d.fullPath,m=this.resolvePathWithBase(f,"."),p=d.search,g={...d.params},y=i.to?this.resolvePathWithBase(m,`${i.to}`):this.resolvePathWithBase(m,"."),w=i.params===!1||i.params===null?{}:(i.params??!0)===!0?g:Object.assign(g,Mi(i.params,g)),b=jy({path:y,params:w}).interpolatedPath,S=this.matchRoutes(b,void 0,{_buildLocation:!0}).map(W=>this.looseRoutesById[W.routeId]);if(Object.keys(w).length>0)for(const W of S){const V=W.options.params?.stringify??W.options.stringifyParams;V&&Object.assign(w,V(w))}const R=n.leaveParams?y:Lx(jy({path:y,params:w,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const W={};S.forEach(V=>{if(V.options.validateSearch)try{Object.assign(W,d_(V.options.validateSearch,{...W,...E}))}catch{}}),E=W}E=hL({search:E,dest:i,destRoutes:S,_includeValidateSearch:n._includeValidateSearch}),E=wo(p,E);const T=this.options.stringifySearch(E),O=i.hash===!0?c.hash:i.hash?Mi(i.hash,c.hash):void 0,C=O?`#${O}`:"";let I=i.state===!0?c.state:i.state?Mi(i.state,c.state):{};I=wo(c.state,I);const k=`${R}${T}${C}`,P=new URL(k,this.origin),$=LA(this.rewrite,P);return{publicHref:$.pathname+$.search+$.hash,href:k,url:$.href,pathname:R,search:E,searchStr:T,state:I,hash:O??"",unmaskOnReload:i.unmaskOnReload}},a=(i={},c)=>{const u=r(i);let d=c?r(c):void 0;if(!d){const f={};if(this.options.routeMasks){const m=N6(u.pathname,this.processedTree);if(m){Object.assign(f,m.params);const{from:p,...g}=m.route;c={from:n.from,...g,params:f},d=r(c)}}}return d&&(u.maskedLocation=d),u};return n.mask?a(n,{from:n.from,...n.mask}):a(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:r,...a})=>{const i=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(m=>{a.state[m]=this.latestLocation.state[m]});const f=Pi(a.state,this.latestLocation.state);return d.forEach(m=>{delete a.state[m]}),f},c=Di(this.latestLocation.href)===Di(a.href),u=this.commitLocationPromise;if(this.commitLocationPromise=hl(()=>{u?.resolve()}),c&&i())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...m}=a;d&&(m={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...m,search:m.searchStr,state:{...m.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(m.unmaskOnReload??this.options.unmaskOnReload??!1)&&(m.state.__tempKey=this.tempLocationKey)),m.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[a.replace?"replace":"push"](m.publicHref,m.state,{ignoreBlocker:r})}return this.resetNextScroll=a.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:a,viewTransition:i,ignoreBlocker:c,href:u,...d}={})=>{if(u){const p=this.history.location.state.__TSR_index,g=Pp(u,{__TSR_index:n?p:p+1});d.to=g.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const f=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const m=this.commitLocation({...f,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:a,ignoreBlocker:c});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),m},this.navigate=async({to:n,reloadDocument:r,href:a,...i})=>{if(!r&&a)try{new URL(`${a}`),r=!0}catch{}if(r){if(a||(a=this.buildLocation({to:n,...i}).url),!i.ignoreBlocker){const u=this.history.getBlockers?.()??[];for(const d of u)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return i.replace?window.location.replace(a):window.location.href=a,Promise.resolve()}return this.buildAndCommitLocation({...i,href:a,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const r=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),a=i=>{try{return encodeURI(decodeURI(i))}catch{return i}};if(bp(a(this.latestLocation.href))!==bp(a(r.href))){let i=r.url;throw this.origin&&i.startsWith(this.origin)&&(i=i.replace(this.origin,"")||"/"),zi({href:i})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(a=>!n.some(i=>i.id===a.id))}))},this.load=async n=>{let r,a,i;for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,f=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Li({resolvedLocation:f,location:d})}),this.emit({type:"onBeforeLoad",...Li({resolvedLocation:f,location:d})}),await $x({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=[],p=[],g=[];Gu(()=>{this.__store.setState(y=>{const w=y.matches,b=y.pendingMatches||y.matches;return m=w.filter(S=>!b.some(R=>R.id===S.id)),p=b.filter(S=>!w.some(R=>R.id===S.id)),g=b.filter(S=>w.some(R=>R.id===S.id)),{...y,isLoading:!1,loadedAt:Date.now(),matches:b,pendingMatches:void 0,cachedMatches:[...y.cachedMatches,...m.filter(S=>S.status!=="error"&&S.status!=="notFound")]}}),this.clearExpiredCache()}),[[m,"onLeave"],[p,"onEnter"],[g,"onStay"]].forEach(([y,w])=>{y.forEach(b=>{this.looseRoutesById[b.routeId].options[w]?.(b)})})})})}})}catch(d){qo(d)?(r=d,this.isServer||this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Ro(d)&&(a=d),this.__store.setState(f=>({...f,statusCode:r?r.status:a?404:f.matches.some(m=>m.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.__store.state.matches.some(u=>u.status==="error")&&(c=500),c!==void 0&&this.__store.setState(u=>({...u,statusCode:c}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let a;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,c=this.state.resolvedLocation,u=typeof r.types=="function"?r.types(Li({resolvedLocation:c,location:i})):r.types;if(u===!1){n();return}a={update:n,types:u}}else a=n;document.startViewTransition(a)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const a=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";a&&this.__store.setState(i=>({...i,[a]:i[a]?.map(c=>c.id===n?r(c):c)}))})},this.getMatch=n=>{const r=a=>a.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=a=>n?.filter?.(a)??!0?{...a,invalid:!0,...n?.forcePending||a.status==="error"||a.status==="notFound"?{status:"pending",error:void 0}:void 0}:a;return this.__store.setState(a=>({...a,matches:a.matches.map(r),cachedMatches:a.cachedMatches.map(r),pendingMatches:a.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const r=this.buildLocation(n.options);let a=r.url;this.origin&&a.startsWith(this.origin)&&(a=a.replace(this.origin,"")||"/"),n.options.href=r.href,n.headers.set("Location",a)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(a=>({...a,cachedMatches:a.cachedMatches.filter(i=>!r(i))})):this.__store.setState(a=>({...a,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const a=this.looseRoutesById[r.routeId];if(!a.options.loader)return!0;const i=(r.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=NA,this.preloadRoute=async n=>{const r=this.buildLocation(n);let a=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(u=>u.id)),c=new Set([...i,...this.state.cachedMatches.map(u=>u.id)]);Gu(()=>{a.forEach(u=>{c.has(u.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,u]}))})});try{return a=await $x({router:this,matches:a,location:r,preload:!0,updateMatch:(u,d)=>{i.has(u)?a=a.map(f=>f.id===u?d(f):f):this.updateMatch(u,d)}}),a}catch(u){if(qo(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Ro(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const a={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(a);if(r?.pending&&this.state.status!=="pending")return!1;const u=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=M6(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,u.pathname,this.processedTree);return!d||n.params&&!Pi(d.params,n.params,{partial:!0})?!1:r?.includeSearch??!0?Pi(u.search,i.search,{partial:!0})?d.params:!1:d.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??J6,parseSearch:t.parseSearch??X6}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:a,routeParams:i}=r;let{matchedRoutes:c}=r,u=!1;(a?a.path!=="/"&&i["**"]:Di(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:u=!0);const d=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let p=c.length-1;p>=0;p--){const g=c[p];if(g.children)return g.id}return Yr}})(),f=[],m=p=>p?.id?p.context??this.options.context??void 0:this.options.context??void 0;return c.forEach((p,g)=>{const y=f[g-1],[w,b,S]=(()=>{const U=y?.search??t.search,J=y?._strictSearch??void 0;try{const le=d_(p.options.validateSearch,{...U})??void 0;return[{...U,...le},{...J,...le},void 0]}catch(le){let F=le;if(le instanceof Vp||(F=new Vp(le.message,{cause:le})),n?.throwOnError)throw F;return[U,{},F]}})(),R=p.options.loaderDeps?.({search:w})??"",E=R?JSON.stringify(R):"",{interpolatedPath:T,usedParams:O}=jy({path:p.fullPath,params:i,decodeCharMap:this.pathParamsDecodeCharMap}),C=p.id+T+E,I=this.getMatch(C),k=this.state.matches.find(U=>U.routeId===p.id),P=I?._strictParams??O;let $;if(!I){const U=p.options.params?.parse??p.options.parseParams;if(U)try{Object.assign(P,U(P))}catch(J){if(Ro(J)||qo(J)?$=J:$=new uL(J.message,{cause:J}),n?.throwOnError)throw $}}Object.assign(i,P);const W=k?"stay":"enter";let V;if(I)V={...I,cause:W,params:k?wo(k.params,i):i,_strictParams:P,search:wo(k?k.search:I.search,w),_strictSearch:b};else{const U=p.options.loader||p.options.beforeLoad||p.lazyFn||MA(p)?"pending":"success";V={id:C,ssr:this.isServer?void 0:p.options.ssr,index:g,routeId:p.id,params:k?wo(k.params,i):i,_strictParams:P,pathname:T,updatedAt:Date.now(),search:k?wo(k.search,w):w,_strictSearch:b,searchError:void 0,status:U,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:hl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:k?wo(k.loaderDeps,R):R,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n?.preload||(V.globalNotFound=d===p.id),V.searchError=S;const G=m(y);V.context={...G,...V.__routeContext,...V.__beforeLoadContext},f.push(V)}),f.forEach((p,g)=>{const y=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&n?._buildLocation!==!0){const b=f[g-1],S=m(b);if(y.options.context){const R={deps:p.loaderDeps,params:p.params,context:S??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:f};p.__routeContext=y.options.context(R)??void 0}p.context={...S,...p.__routeContext,...p.__beforeLoadContext}}}),f}}class Vp extends Error{}class uL extends Error{}function dL(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function d_(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Vp("Async validation not supported");if(n.issues)throw new Vp(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function fL({pathname:e,routesById:t,processedTree:n}){const r={},a=Di(e);let i;const c=P6(a,n,!0);return c&&(i=c.route,Object.assign(r,c.params)),{matchedRoutes:c?.branch||[t[Yr]],routeParams:r,foundRoute:i}}function hL({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){const a=n.reduce((u,d)=>{const f=[];if("search"in d.options)d.options.search?.middlewares&&f.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const m=({search:p,next:g})=>{let y=p;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(y=d.options.preSearchFilters.reduce((b,S)=>S(b),p));const w=g(y);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((b,S)=>S(b),w):w};f.push(m)}if(r&&d.options.validateSearch){const m=({search:p,next:g})=>{const y=g(p);try{return{...y,...d_(d.options.validateSearch,y)??void 0}}catch{return y}};f.push(m)}return u.concat(f)},[])??[],i=({search:u})=>t.search?t.search===!0?u:Mi(t.search,u):{};a.push(i);const c=(u,d)=>{if(u>=a.length)return d;const f=a[u];return f({search:d,next:p=>c(u+1,p)})};return c(0,e)}const pL="Error preloading route! ☝️";class jA{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,a=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Yr:this.parentRoute||Fa(!1);let i=a?Yr:r?.path;i&&i!=="/"&&(i=TA(i));const c=r?.id||i;let u=a?Yr:_p([this.parentRoute.id===Yr?"":this.parentRoute.id,c]);i===Yr&&(i="/"),u!==Yr&&(u=_p(["/",u]));const d=u===Yr?"/":_p([this.parentRoute.fullPath,i]);this._path=i,this._id=u,this._fullPath=d,this._to=d},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class mL extends jA{constructor(t){super(t)}}function Ib(e){const t=e.errorComponent??km;return x.jsx(gL,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?A.createElement(t,{error:n,reset:r}):e.children})}class gL extends A.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function km({error:e}){const[t,n]=A.useState(!1);return x.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[x.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),x.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),x.jsx("div",{style:{height:".25rem"}}),t?x.jsx("div",{children:x.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?x.jsx("code",{children:e.message}):null})}):null]})}function vL({children:e,fallback:t=null}){return yL()?x.jsx(ee.Fragment,{children:e}):x.jsx(ee.Fragment,{children:t})}function yL(){return ee.useSyncExternalStore(_L,()=>!0,()=>!1)}function _L(){return()=>{}}var Uy={exports:{}},zy={},Vy={exports:{}},Fy={};var Ux;function bL(){if(Ux)return Fy;Ux=1;var e=Ks();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,a=e.useEffect,i=e.useLayoutEffect,c=e.useDebugValue;function u(p,g){var y=g(),w=r({inst:{value:y,getSnapshot:g}}),b=w[0].inst,S=w[1];return i(function(){b.value=y,b.getSnapshot=g,d(b)&&S({inst:b})},[p,y,g]),a(function(){return d(b)&&S({inst:b}),p(function(){d(b)&&S({inst:b})})},[p]),c(y),y}function d(p){var g=p.getSnapshot;p=p.value;try{var y=g();return!n(p,y)}catch{return!0}}function f(p,g){return g()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Fy.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Fy}var zx;function $A(){return zx||(zx=1,Vy.exports=bL()),Vy.exports}var Vx;function wL(){if(Vx)return zy;Vx=1;var e=Ks(),t=$A();function n(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:n,a=t.useSyncExternalStore,i=e.useRef,c=e.useEffect,u=e.useMemo,d=e.useDebugValue;return zy.useSyncExternalStoreWithSelector=function(f,m,p,g,y){var w=i(null);if(w.current===null){var b={hasValue:!1,value:null};w.current=b}else b=w.current;w=u(function(){function R(I){if(!E){if(E=!0,T=I,I=g(I),y!==void 0&&b.hasValue){var k=b.value;if(y(k,I))return O=k}return O=I}if(k=O,r(T,I))return k;var P=g(I);return y!==void 0&&y(k,P)?(T=I,k):(T=I,O=P)}var E=!1,T,O,C=p===void 0?null:p;return[function(){return R(m())},C===null?void 0:function(){return R(C())}]},[m,p,g,y]);var S=a(f,w[0],w[1]);return c(function(){b.hasValue=!0,b.value=S},[S]),d(S),S},zy}var Fx;function SL(){return Fx||(Fx=1,Uy.exports=wL()),Uy.exports}var UA=SL();const yae=Ga(UA);function EL(e,t=r=>r,n={}){const r=n.equal??RL;return UA.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function RL(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,a]of e)if(!t.has(r)||!Object.is(a,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Bx(e);if(n.length!==Bx(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Bx(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const By=A.createContext(null);function zA(){return typeof document>"u"?By:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=By,By)}function Ur(e){const t=A.useContext(zA());return e?.warn,t}function Rr(e){const t=Ur({warn:e?.router===void 0}),n=e?.router||t,r=A.useRef(void 0);return EL(n.__store,a=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=wo(r.current,e.select(a));return r.current=i,i}return e.select(a)}return a})}const Nm=A.createContext(void 0),xL=A.createContext(void 0);function ua(e){const t=A.useContext(e.from?xL:Nm);return Rr({select:r=>{const a=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Fa(!((e.shouldThrow??!0)&&!a),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),a!==void 0)return e.select?e.select(a):a},structuralSharing:e.structuralSharing})}function kb(e){return ua({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Nb(e){const{select:t,...n}=e;return ua({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function sl(e){return ua({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Mm(e){return ua({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}const Lu=typeof window<"u"?A.useLayoutEffect:A.useEffect;function qy(e){const t=A.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function TL(e,t,n={},r={}){A.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const a=new IntersectionObserver(([i])=>{t(i)},n);return a.observe(e.current),()=>{a.disconnect()}},[t,n,r.disabled,e])}function OL(e){const t=A.useRef(null);return A.useImperativeHandle(e,()=>t.current,[]),t}function xl(e){const t=Ur();return A.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function _ae(e){const t=Ur(),n=xl(),r=A.useRef(null);return Lu(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var Pm=uA();const VA=Ga(Pm);function CL(e,t){const n=Ur(),[r,a]=A.useState(!1),i=A.useRef(!1),c=OL(t),{activeProps:u,inactiveProps:d,activeOptions:f,to:m,preload:p,preloadDelay:g,hashScrollIntoView:y,replace:w,startTransition:b,resetScroll:S,viewTransition:R,children:E,target:T,disabled:O,style:C,className:I,onClick:k,onFocus:P,onMouseEnter:$,onMouseLeave:W,onTouchStart:V,ignoreBlocker:G,params:U,search:J,hash:le,state:F,mask:Y,reloadDocument:se,unsafeRelative:fe,from:K,_fromLocation:D,...q}=e,B=Rr({select:oe=>oe.location.search,structuralSharing:!0}),L=e.from,z=A.useMemo(()=>({...e,from:L}),[n,B,L,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Q=A.useMemo(()=>n.buildLocation({...z}),[n,z]),me=A.useMemo(()=>{if(O)return;let oe=Q.maskedLocation?Q.maskedLocation.url:Q.url,Se=!1;return n.origin&&(oe.startsWith(n.origin)?oe=n.history.createHref(oe.replace(n.origin,""))||"/":Se=!0),{href:oe,external:Se}},[O,Q.maskedLocation,Q.url,n.origin,n.history]),ve=A.useMemo(()=>{if(me?.external)return me.href;try{return new URL(m),m}catch{}},[m,me]),Ce=e.reloadDocument||ve?!1:p??n.options.defaultPreload,Ie=g??n.options.defaultPreloadDelay??0,H=Rr({select:oe=>{if(ve)return!1;if(f?.exact){if(!V6(oe.location.pathname,Q.pathname,n.basepath))return!1}else{const Se=$p(oe.location.pathname,n.basepath),xe=$p(Q.pathname,n.basepath);if(!(Se.startsWith(xe)&&(Se.length===xe.length||Se[xe.length]==="/")))return!1}return(f?.includeSearch??!0)&&!Pi(oe.location.search,Q.search,{partial:!f?.exact,ignoreUndefined:!f?.explicitUndefined})?!1:f?.includeHash?oe.location.hash===Q.hash:!0}}),re=A.useCallback(()=>{n.preloadRoute({...z}).catch(oe=>{console.warn(oe),console.warn(pL)})},[n,z]),_e=A.useCallback(oe=>{oe?.isIntersecting&&re()},[re]);TL(c,_e,ML,{disabled:!!O||Ce!=="viewport"}),A.useEffect(()=>{i.current||!O&&Ce==="render"&&(re(),i.current=!0)},[O,re,Ce]);const ae=oe=>{const Se=oe.currentTarget.getAttribute("target"),xe=T!==void 0?T:Se;if(!O&&!PL(oe)&&!oe.defaultPrevented&&(!xe||xe==="_self")&&oe.button===0){oe.preventDefault(),Pm.flushSync(()=>{a(!0)});const Re=n.subscribe("onResolved",()=>{Re(),a(!1)});n.navigate({...z,replace:w,resetScroll:S,hashScrollIntoView:y,startTransition:b,viewTransition:R,ignoreBlocker:G})}};if(ve)return{...q,ref:c,href:ve,...E&&{children:E},...T&&{target:T},...O&&{disabled:O},...C&&{style:C},...I&&{className:I},...k&&{onClick:k},...P&&{onFocus:P},...$&&{onMouseEnter:$},...W&&{onMouseLeave:W},...V&&{onTouchStart:V}};const ue=oe=>{O||Ce&&re()},Oe=ue,Pe=oe=>{if(!(O||!Ce))if(!Ie)re();else{const Se=oe.target;if(Su.has(Se))return;const xe=setTimeout(()=>{Su.delete(Se),re()},Ie);Su.set(Se,xe)}},Je=oe=>{if(O||!Ce||!Ie)return;const Se=oe.target,xe=Su.get(Se);xe&&(clearTimeout(xe),Su.delete(Se))},Be=H?Mi(u,{})??AL:Hy,Ke=H?Hy:Mi(d,{})??Hy,Z=[I,Be.className,Ke.className].filter(Boolean).join(" "),te=(C||Be.style||Ke.style)&&{...C,...Be.style,...Ke.style};return{...q,...Be,...Ke,href:me?.href,ref:c,onClick:Eu([k,ae]),onFocus:Eu([P,ue]),onMouseEnter:Eu([$,Pe]),onMouseLeave:Eu([W,Je]),onTouchStart:Eu([V,Oe]),disabled:!!O,target:T,...te&&{style:te},...Z&&{className:Z},...O&&IL,...H&&kL,...r&&NL}}const Hy={},AL={className:"active"},IL={role:"link","aria-disabled":!0},kL={"data-status":"active","aria-current":"page"},NL={"data-transitioning":"transitioning"},Su=new WeakMap,ML={rootMargin:"100px"},Eu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Dm=A.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:a,ref:i,...c}=CL(r,t),u=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;return n===void 0&&delete c.disabled,A.createElement(n||"a",{...c,ref:i},u)});function PL(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class DL extends jA{constructor(t){super(t),this.useMatch=n=>ua({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ua({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Mm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Nb({...n,from:this.id}),this.useLoaderData=n=>kb({...n,from:this.id}),this.useNavigate=()=>xl({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Dm,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function _t(e){return new DL(e)}class LL extends mL{constructor(t){super(t),this.useMatch=n=>ua({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ua({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Mm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>sl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Nb({...n,from:this.id}),this.useLoaderData=n=>kb({...n,from:this.id}),this.useNavigate=()=>xl({from:this.fullPath}),this.Link=ee.forwardRef((n,r)=>x.jsx(Dm,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function jL(e){return new LL(e)}function qx(e){return typeof e=="object"?new Hx(e,{silent:!0}).createRoute(e):new Hx(e,{silent:!0}).createRoute}class Hx{constructor(t,n){this.path=t,this.createRoute=r=>{this.silent;const a=_t(r);return a.isRoot=!1,a},this.silent=n?.silent}}class Gx{constructor(t){this.useMatch=n=>ua({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ua({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Mm({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>sl({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Nb({...n,from:this.options.id}),this.useLoaderData=n=>kb({...n,from:this.options.id}),this.useNavigate=()=>{const n=Ur();return xl({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Zx(e){return typeof e=="object"?new Gx(e):t=>new Gx({id:e,...t})}function Ct(e,t){let n,r,a,i;const c=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(a=d,T6(a)&&a instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),i=!0)}})),n),u=function(f){if(i)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)throw c();return A.createElement(r,f)};return u.preload=c,u}function $L(){const e=Ur(),t=A.useRef({router:e,mounted:!1}),[n,r]=A.useState(!1),{hasPendingMatches:a,isLoading:i}=Rr({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),c=qy(i),u=i||n||a,d=qy(u),f=i||a,m=qy(f);return e.startTransition=p=>{r(!0),A.startTransition(()=>{p(),r(!1)})},A.useEffect(()=>{const p=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Di(e.latestLocation.href)!==Di(g.href)&&e.commitLocation({...g,replace:!0}),()=>{p()}},[e,e.history]),Lu(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),Lu(()=>{c&&!i&&e.emit({type:"onLoad",...Li(e.state)})},[c,e,i]),Lu(()=>{m&&!f&&e.emit({type:"onBeforeRouteMount",...Li(e.state)})},[f,m,e]),Lu(()=>{if(d&&!u){const p=Li(e.state);e.emit({type:"onResolved",...p}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&K6(e)}},[u,d,e]),null}function UL(e){const t=Rr({select:n=>`not-found-${n.location.pathname}-${n.status}`});return x.jsx(Ib,{getResetKey:()=>t,onCatch:(n,r)=>{if(Ro(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Ro(n))return e.fallback?.(n);throw n},children:e.children})}function zL(){return x.jsx("p",{children:"Not Found"})}function Wc(e){return x.jsx(x.Fragment,{children:e.children})}function FA(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(zL,{})}function VL({children:e}){const t=Ur();return t.isServer?x.jsx("script",{nonce:t.options.ssr?.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:e+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function FL(){const e=Ur();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||u_)(e.latestLocation),r=n!==u_(e.latestLocation)?n:void 0,a={storageKey:Up,shouldScrollRestoration:!0};return r&&(a.key=r),x.jsx(VL,{children:`(${OA.toString()})(${JSON.stringify(a)})`})}const BA=A.memo(function({matchId:t}){const n=Ur(),r=Rr({select:R=>{const E=R.matches.find(T=>T.id===t);return Fa(E),{routeId:E.routeId,ssr:E.ssr,_displayPending:E._displayPending}},structuralSharing:!0}),a=n.routesById[r.routeId],i=a.options.pendingComponent??n.options.defaultPendingComponent,c=i?x.jsx(i,{}):null,u=a.options.errorComponent??n.options.defaultErrorComponent,d=a.options.onCatch??n.options.defaultOnCatch,f=a.isRoot?a.options.notFoundComponent??n.options.notFoundRoute?.options.component:a.options.notFoundComponent,m=r.ssr===!1||r.ssr==="data-only",p=(!a.isRoot||a.options.wrapInSuspense||m)&&(a.options.wrapInSuspense??i??(a.options.errorComponent?.preload||m))?A.Suspense:Wc,g=u?Ib:Wc,y=f?UL:Wc,w=Rr({select:R=>R.loadedAt}),b=Rr({select:R=>{const E=R.matches.findIndex(T=>T.id===t);return R.matches[E-1]?.routeId}}),S=a.isRoot?a.options.shellComponent??Wc:Wc;return x.jsxs(S,{children:[x.jsx(Nm.Provider,{value:t,children:x.jsx(p,{fallback:c,children:x.jsx(g,{getResetKey:()=>w,errorComponent:u||km,onCatch:(R,E)=>{if(Ro(R))throw R;d?.(R,E)},children:x.jsx(y,{fallback:R=>{if(!f||R.routeId&&R.routeId!==r.routeId||!R.routeId&&!a.isRoot)throw R;return A.createElement(f,R)},children:m||r._displayPending?x.jsx(vL,{fallback:c,children:x.jsx(Wx,{matchId:t})}):x.jsx(Wx,{matchId:t})})})})}),b===Yr&&n.options.scrollRestoration?x.jsxs(x.Fragment,{children:[x.jsx(BL,{}),x.jsx(FL,{})]}):null]})});function BL(){const e=Ur(),t=A.useRef(void 0);return x.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Li(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Wx=A.memo(function({matchId:t}){const n=Ur(),{match:r,key:a,routeId:i}=Rr({select:d=>{const f=d.matches.find(w=>w.id===t),m=f.routeId,g=(n.routesById[m].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:m,loaderDeps:f.loaderDeps,params:f._strictParams,search:f._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:m,match:{id:f.id,status:f.status,error:f.error,_forcePending:f._forcePending,_displayPending:f._displayPending}}},structuralSharing:!0}),c=n.routesById[i],u=A.useMemo(()=>{const d=c.options.component??n.options.defaultComponent;return d?x.jsx(d,{},a):x.jsx(qA,{})},[a,c.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const d=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const f=n.getMatch(r.id);if(f&&!f._nonReactive.minPendingPromise&&!n.isServer){const m=hl();f._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),f._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Fa(Ro(r.error)),FA(n,c,r.error);if(r.status==="redirected")throw Fa(qo(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const d=(c.options.errorComponent??n.options.defaultErrorComponent)||km;return x.jsx(d,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return u}),qA=A.memo(function(){const t=Ur(),n=A.useContext(Nm),r=Rr({select:f=>f.matches.find(m=>m.id===n)?.routeId}),a=t.routesById[r],i=Rr({select:f=>{const p=f.matches.find(g=>g.id===n);return Fa(p),p.globalNotFound}}),c=Rr({select:f=>{const m=f.matches,p=m.findIndex(g=>g.id===n);return m[p+1]?.id}}),u=t.options.defaultPendingComponent?x.jsx(t.options.defaultPendingComponent,{}):null;if(i)return FA(t,a,void 0);if(!c)return null;const d=x.jsx(BA,{matchId:c});return r===Yr?x.jsx(A.Suspense,{fallback:u,children:d}):d});function qL(){const e=Ur(),n=e.routesById[Yr].options.pendingComponent??e.options.defaultPendingComponent,r=n?x.jsx(n,{}):null,a=e.isServer||typeof document<"u"&&e.ssr?Wc:A.Suspense,i=x.jsxs(a,{fallback:r,children:[!e.isServer&&x.jsx($L,{}),x.jsx(HL,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:i}):i}function HL(){const e=Ur(),t=Rr({select:a=>a.matches[0]?.id}),n=Rr({select:a=>a.loadedAt}),r=t?x.jsx(BA,{matchId:t}):null;return x.jsx(Nm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(Ib,{getResetKey:()=>n,errorComponent:km,onCatch:a=>{a.message||a.toString()},children:r})})}const GL=e=>new ZL(e);class ZL extends lL{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=qx,globalThis.createLazyFileRoute=Zx):typeof window<"u"&&(window.createFileRoute=qx,window.createLazyFileRoute=Zx);function WL({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=zA(),a=x.jsx(r.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:a}):a}function KL({router:e,...t}){return x.jsx(WL,{router:e,...t,children:x.jsx(qL,{})})}function YL(e){return Rr({select:t=>t.location})}var QL={},Kx={};const Sp=Object.create(null),Ru=e=>QL||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Sp:globalThis),Eo=new Proxy(Sp,{get(e,t){return Ru()[t]??Sp[t]},has(e,t){return t in Ru()||t in Sp},set(e,t,n){const r=Ru(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=Ru(!0);return delete n[t],!0},ownKeys(){const e=Ru(!0);return Object.keys(e)}});function In(e,t){return typeof process<"u"&&Kx?Kx[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const xu=1,Wn=4,oa=8,Xr=24,Yx={eterm:Wn,cons25:Wn,console:Wn,cygwin:Wn,dtterm:Wn,gnome:Wn,hurd:Wn,jfbterm:Wn,konsole:Wn,kterm:Wn,mlterm:Wn,mosh:Xr,putty:Wn,st:Wn,"rxvt-unicode-24bit":Xr,terminator:Xr,"xterm-kitty":Xr},XL=new Map(Object.entries({APPVEYOR:oa,BUILDKITE:oa,CIRCLECI:Xr,DRONE:oa,GITEA_ACTIONS:Xr,GITHUB_ACTIONS:Xr,GITLAB_CI:oa,TRAVIS:oa})),JL=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function ej(){if(In("FORCE_COLOR")!==void 0)switch(In("FORCE_COLOR")){case"":case"1":case"true":return Wn;case"2":return oa;case"3":return Xr;default:return xu}if(In("NODE_DISABLE_COLORS")!==void 0&&In("NODE_DISABLE_COLORS")!==""||In("NO_COLOR")!==void 0&&In("NO_COLOR")!==""||In("TERM")==="dumb")return xu;if(In("TMUX"))return Xr;if("TF_BUILD"in Eo&&"AGENT_NAME"in Eo)return Wn;if("CI"in Eo){for(const{0:e,1:t}of XL)if(e in Eo)return t;return In("CI_NAME")==="codeship"?oa:xu}if("TEAMCITY_VERSION"in Eo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(In("TEAMCITY_VERSION"))!==null?Wn:xu;switch(In("TERM_PROGRAM")){case"iTerm.app":return!In("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(In("TERM_PROGRAM_VERSION"))!==null?oa:Xr;case"HyperTerm":case"MacTerm":return Xr;case"Apple_Terminal":return oa}if(In("COLORTERM")==="truecolor"||In("COLORTERM")==="24bit")return Xr;if(In("TERM")){if(/truecolor/.exec(In("TERM"))!==null)return Xr;if(/^xterm-256/.exec(In("TERM"))!==null)return oa;const e=In("TERM").toLowerCase();if(Yx[e])return Yx[e];if(JL.some(t=>t.exec(e)!==null))return Wn}return In("COLORTERM")?Wn:xu}const aa={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",fg:{red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m"}},f_=["debug","info","success","warn","error"];function tj(e,t){return f_.indexOf(t)>=f_.indexOf(e)}const nj={info:aa.fg.blue,success:aa.fg.green,warn:aa.fg.yellow,error:aa.fg.red,debug:aa.fg.magenta},rj=(e,t,n)=>{const r=new Date().toISOString();return n?`${aa.dim}${r}${aa.reset} ${nj[e]}${e.toUpperCase()}${aa.reset} ${aa.bright}[Better Auth]:${aa.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},oj=e=>{const t="error",n=ej()!==1,r=(a,i,c=[])=>{if(!tj(t,a))return;const u=rj(a,i,n);{a==="error"?console.error(u,...c):a==="warn"?console.warn(u,...c):console.log(u,...c);return}};return{...Object.fromEntries(f_.map(a=>[a,(...[i,...c])=>r(a,i,c)])),get level(){return t}}};oj();var Wu=class extends Error{constructor(e,t){super(e),this.name="BetterAuthError",this.message=e,this.cause=t,this.stack=""}};function aj(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Wu(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function sj(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new Wu(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Wu?t:new Wu(`Invalid base URL: ${e}. Please provide a valid base URL.`,String(t))}}function Gy(e,t="/api/auth"){if(sj(e),aj(e))return e;const n=e.replace(/\/+$/,"");return!t||t==="/"?n:(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`)}function ij(e,t,n,r,a){if(e)return Gy(e,t);{const i=Eo.BETTER_AUTH_URL||Eo.NEXT_PUBLIC_BETTER_AUTH_URL||Eo.PUBLIC_BETTER_AUTH_URL||Eo.NUXT_PUBLIC_BETTER_AUTH_URL||Eo.NUXT_PUBLIC_AUTH_URL||(Eo.BASE_URL!=="/"?Eo.BASE_URL:void 0);if(i)return Gy(i,t)}if(typeof window<"u"&&window.location)return Gy(window.location.origin,t)}const cj={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},lj=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Qx={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},uj=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function dj(e){return e instanceof Date&&!isNaN(e.getTime())}function fj(e){const t=uj.exec(e);if(!t)return null;const[,n,r,a,i,c,u,d,f,m,p]=t;let g=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(a,10),parseInt(i,10),parseInt(c,10),parseInt(u,10),d?parseInt(d.padEnd(3,"0"),10):0));if(f){const y=(parseInt(m,10)*60+parseInt(p,10))*(f==="+"?-1:1);g.setUTCMinutes(g.getUTCMinutes()+y)}return dj(g)?g:null}function hj(e,t={}){const{strict:n=!1,warnings:r=!1,reviver:a,parseDates:i=!0}=t;if(typeof e!="string")return e;const c=e.trim();if(c.length>0&&c[0]==='"'&&c.endsWith('"')&&!c.slice(1,-1).includes('"'))return c.slice(1,-1);const u=c.toLowerCase();if(u.length<=9&&u in Qx)return Qx[u];if(!lj.test(c)){if(n)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(cj).some(([d,f])=>{const m=f.test(c);return m&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${d} pattern`),m})&&n)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(c,(f,m)=>{if(f==="__proto__"||f==="constructor"&&m&&typeof m=="object"&&"prototype"in m){r&&console.warn(`[better-json] Dropping "${f}" key to prevent prototype pollution`);return}if(i&&typeof m=="string"){const p=fj(m);if(p)return p}return a?a(f,m):m})}catch(d){if(n)throw d;return e}}function pj(e,t={strict:!0}){return hj(e,t)}let Po=[],Ss=0;const ih=4,el=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},lc:0,listen(r){return n.lc=t.push(r),()=>{for(let i=Ss+ih;i<Po.length;)Po[i]===r?Po.splice(i,ih):i+=ih;let a=t.indexOf(r);~a&&(t.splice(a,1),--n.lc||n.off())}},notify(r,a){let i=!Po.length;for(let c of t)Po.push(c,n.value,r,a);if(i){for(Ss=0;Ss<Po.length;Ss+=ih)Po[Ss](Po[Ss+1],Po[Ss+2],Po[Ss+3]);Po.length=0}},off(){},set(r){let a=n.value;a!==r&&(n.value=r,n.notify(a))},subscribe(r){let a=n.listen(r);return r(n.value),a},value:e};return n},mj=5,ch=6,lh=10;let gj=(e,t,n,r)=>(e.events=e.events||{},e.events[n+lh]||(e.events[n+lh]=r(a=>{e.events[n].reduceRight((i,c)=>(c(i),i),{shared:{},...a})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let a=e.events[n],i=a.indexOf(t);a.splice(i,1),a.length||(delete e.events[n],e.events[n+lh](),delete e.events[n+lh])}),vj=1e3,HA=(e,t)=>gj(e,r=>{let a=t(r);a&&e.events[ch].push(a)},mj,r=>{let a=e.listen;e.listen=(...c)=>(!e.lc&&!e.active&&(e.active=!0,r()),a(...c));let i=e.off;return e.events[ch]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let c of e.events[ch])c();e.events[ch]=[]}},vj)},()=>{e.listen=a,e.off=i}});function yj(e,t,n){let r=new Set(t).add(void 0);return e.listen((a,i,c)=>{r.has(c)&&n(a,i,c)})}var _j=Object.defineProperty,bj=Object.defineProperties,wj=Object.getOwnPropertyDescriptors,Xx=Object.getOwnPropertySymbols,Sj=Object.prototype.hasOwnProperty,Ej=Object.prototype.propertyIsEnumerable,Jx=(e,t,n)=>t in e?_j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Uo=(e,t)=>{for(var n in t||(t={}))Sj.call(t,n)&&Jx(e,n,t[n]);if(Xx)for(var n of Xx(t))Ej.call(t,n)&&Jx(e,n,t[n]);return e},ra=(e,t)=>bj(e,wj(t)),Rj=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n}},xj=async(e,t)=>{var n,r,a,i,c,u;let d=t||{};const f={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:d,hooks:f};for(const m of t?.plugins||[]){if(m.init){const p=await((n=m.init)==null?void 0:n.call(m,e.toString(),t));d=p.options||d,e=p.url}f.onRequest.push((r=m.hooks)==null?void 0:r.onRequest),f.onResponse.push((a=m.hooks)==null?void 0:a.onResponse),f.onSuccess.push((i=m.hooks)==null?void 0:i.onSuccess),f.onError.push((c=m.hooks)==null?void 0:c.onError),f.onRetry.push((u=m.hooks)==null?void 0:u.onRetry)}return{url:e,options:d,hooks:f}},eT=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},Tj=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Oj(e){if(typeof e=="number")return new eT({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new eT(e);case"exponential":return new Tj(e);default:throw new Error("Invalid retry strategy")}}var Cj=async e=>{const t={},n=async r=>typeof r=="function"?await r():r;if(e?.auth){if(e.auth.type==="Bearer"){const r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type==="Basic"){const r=n(e.auth.username),a=n(e.auth.password);if(!r||!a)return t;t.authorization=`Basic ${btoa(`${r}:${a}`)}`}else if(e.auth.type==="Custom"){const r=n(e.auth.value);if(!r)return t;t.authorization=`${n(e.auth.prefix)} ${r}`}}return t},Aj=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Ij(e){const t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const r=t.split(";").shift()||"";return Aj.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}function kj(e){try{return JSON.parse(e),!0}catch{return!1}}function GA(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function tT(e){try{return JSON.parse(e)}catch{return e}}function nT(e){return typeof e=="function"}function Nj(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&nT(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&nT(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function Mj(e){const t=new Headers(e?.headers),n=await Cj(e);for(const[r,a]of Object.entries(n||{}))t.set(r,a);if(!t.has("content-type")){const r=Pj(e?.body);r&&t.set("content-type",r)}return t}function Pj(e){return GA(e)?"application/json":null}function Dj(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(GA(e.body)&&!t.has("content-type")){for(const[n,r]of Object.entries(e?.body))r instanceof Date&&(e.body[n]=r.toISOString());return JSON.stringify(e.body)}return e.body}function Lj(e,t){var n;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const r=(n=e.split("@")[1])==null?void 0:n.split("/")[0];return WA.includes(r)?r.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function jj(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var $j=class ZA extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,ZA.prototype)}};async function Ep(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new $j(n.issues);return n.value}var WA=["get","post","put","patch","delete"],Uj=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,n){var r,a,i,c;const u=((a=(r=e.plugins)==null?void 0:r.find(d=>{var f;return(f=d.schema)!=null&&f.config?t.startsWith(d.schema.config.baseURL||"")||t.startsWith(d.schema.config.prefix||""):!1}))==null?void 0:a.schema)||e.schema;if(u){let d=t;(i=u.config)!=null&&i.prefix&&d.startsWith(u.config.prefix)&&(d=d.replace(u.config.prefix,""),u.config.baseURL&&(t=t.replace(u.config.prefix,u.config.baseURL))),(c=u.config)!=null&&c.baseURL&&d.startsWith(u.config.baseURL)&&(d=d.replace(u.config.baseURL,""));const f=u.schema[d];if(f){let m=ra(Uo({},n),{method:f.method,output:f.output});return n?.disableValidation||(m=ra(Uo({},m),{body:f.input?await Ep(f.input,n?.body):n?.body,params:f.params?await Ep(f.params,n?.params):n?.params,query:f.query?await Ep(f.query,n?.query):n?.query})),{url:t,options:m}}}return{url:t,options:n}}}),zj=e=>{async function t(n,r){const a=ra(Uo(Uo({},e),r),{plugins:[...e?.plugins||[],Uj(e||{})]});if(e?.catchAllError)try{return await h_(n,a)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await h_(n,a)}return t};function Vj(e,t){let{baseURL:n,params:r,query:a}=t||{query:{},params:{},baseURL:""},i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){const p=e.toString().split("@")[1].split("/")[0];WA.includes(p)&&(e=e.replace(`@${p}/`,"/"))}i.endsWith("/")||(i+="/");let[c,u]=e.replace(i,"").split("?");const d=new URLSearchParams(u);for(const[p,g]of Object.entries(a||{}))g!=null&&d.set(p,String(g));if(r)if(Array.isArray(r)){const p=c.split("/").filter(g=>g.startsWith(":"));for(const[g,y]of p.entries()){const w=r[g];c=c.replace(y,w)}}else for(const[p,g]of Object.entries(r))c=c.replace(`:${p}`,String(g));c=c.split("/").map(encodeURIComponent).join("/"),c.startsWith("/")&&(c=c.slice(1));let f=d.toString();return f=f.length>0?`?${f}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${c}${f}`,i):`${i}${c}${f}`}var h_=async(e,t)=>{var n,r,a,i,c,u,d,f;const{hooks:m,url:p,options:g}=await xj(e,t),y=Nj(g),w=new AbortController,b=(n=g.signal)!=null?n:w.signal,S=Vj(p,g),R=Dj(g),E=await Mj(g),T=Lj(p,g);let O=ra(Uo({},g),{url:S,headers:E,body:R,method:T,signal:b});for(const U of m.onRequest)if(U){const J=await U(O);J instanceof Object&&(O=J)}("pipeTo"in O&&typeof O.pipeTo=="function"||typeof((r=t?.body)==null?void 0:r.pipe)=="function")&&("duplex"in O||(O.duplex="half"));const{clearTimeout:C}=jj(g,w);let I=await y(O.url,O);C();const k={response:I,request:O};for(const U of m.onResponse)if(U){const J=await U(ra(Uo({},k),{response:(a=t?.hookOptions)!=null&&a.cloneResponse?I.clone():I}));J instanceof Response?I=J:J instanceof Object&&(I=J.response)}if(I.ok){if(!(O.method!=="HEAD"))return{data:"",error:null};const J=Ij(I),le={data:"",response:I,request:O};if(J==="json"||J==="text"){const F=await I.text(),se=await((i=O.jsonParser)!=null?i:tT)(F);le.data=se}else le.data=await I[J]();O?.output&&O.output&&!O.disableValidation&&(le.data=await Ep(O.output,le.data));for(const F of m.onSuccess)F&&await F(ra(Uo({},le),{response:(c=t?.hookOptions)!=null&&c.cloneResponse?I.clone():I}));return t?.throw?le.data:{data:le.data,error:null}}const P=(u=t?.jsonParser)!=null?u:tT,$=await I.text(),W=kj($),V=W?await P($):null,G={response:I,responseText:$,request:O,error:ra(Uo({},V),{status:I.status,statusText:I.statusText})};for(const U of m.onError)U&&await U(ra(Uo({},G),{response:(d=t?.hookOptions)!=null&&d.cloneResponse?I.clone():I}));if(t?.retry){const U=Oj(t.retry),J=(f=t.retryAttempt)!=null?f:0;if(await U.shouldAttemptRetry(J,I)){for(const F of m.onRetry)F&&await F(k);const le=U.getDelay(J);return await new Promise(F=>setTimeout(F,le)),await h_(e,ra(Uo({},t),{retryAttempt:J+1}))}}if(t?.throw)throw new Rj(I.status,I.statusText,W?V:$);return{data:null,error:ra(Uo({},V),{status:I.status,statusText:I.statusText})}};const Zy=Symbol.for("better-auth:broadcast-channel"),Fj=()=>Math.floor(Date.now()/1e3);var Bj=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Fj()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const n=JSON.parse(t.newValue??"{}");n?.event!=="session"||!n?.data||this.listeners.forEach(r=>r(n))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function Wy(e="better-auth.message"){return globalThis[Zy]||(globalThis[Zy]=new Bj(e)),globalThis[Zy]}const Ky=Symbol.for("better-auth:focus-manager");var qj=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function rT(){return globalThis[Ky]||(globalThis[Ky]=new qj),globalThis[Ky]}const Yy=Symbol.for("better-auth:online-manager");var Hj=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function Qy(){return globalThis[Yy]||(globalThis[Yy]=new Hj),globalThis[Yy]}const Gj=()=>typeof window>"u",ju=(e,t,n,r)=>{const a=el({data:null,error:null,isPending:!0,isRefetching:!1,refetch:u=>i(u)}),i=async u=>new Promise(d=>{const f=typeof r=="function"?r({data:a.get().data,error:a.get().error,isPending:a.get().isPending}):r;n(t,{...f,query:{...f?.query,...u?.query},async onSuccess(m){a.set({data:m.data,error:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onSuccess?.(m)},async onError(m){const{request:p}=m,g=typeof p.retry=="number"?p.retry:p.retry?.attempts,y=p.retryAttempt||0;g&&y<g||(a.set({error:m.error,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch}),await f?.onError?.(m))},async onRequest(m){const p=a.get();a.set({isPending:p.data===null,data:p.data,error:null,isRefetching:!0,refetch:a.value.refetch}),await f?.onRequest?.(m)}}).catch(m=>{a.set({error:m,data:null,isPending:!1,isRefetching:!1,refetch:a.value.refetch})}).finally(()=>{d(void 0)})});e=Array.isArray(e)?e:[e];let c=!1;for(const u of e)u.subscribe(async()=>{Gj()||(c?await i():HA(a,()=>{const d=setTimeout(async()=>{c||(await i(),c=!0)},0);return()=>{a.off(),u.off(),clearTimeout(d)}}))});return a},jc=()=>Math.floor(Date.now()/1e3),Zj=5;function Wj(e){const{sessionAtom:t,sessionSignal:n,$fetch:r,options:a={}}=e,i=a.sessionOptions?.refetchInterval??0,c=a.sessionOptions?.refetchOnWindowFocus??!0,u=a.sessionOptions?.refetchWhenOffline??!1,d={lastSync:0,lastSessionRequest:0,cachedSession:void 0},f=()=>u||Qy().isOnline,m=E=>{if(!f())return;if(E?.event==="storage"){d.lastSync=jc(),n.set(!n.get());return}const T=t.get();if(E?.event==="poll"){d.lastSessionRequest=jc(),r("/get-session").then(O=>{t.set({...T,data:O.data,error:O.error||null}),d.lastSync=jc(),n.set(!n.get())}).catch(()=>{});return}E?.event==="visibilitychange"&&jc()-d.lastSessionRequest<Zj&&T?.data!==null&&T?.data!==void 0||(T?.data===null||T?.data===void 0||E?.event==="visibilitychange")&&(E?.event==="visibilitychange"&&(d.lastSessionRequest=jc()),d.lastSync=jc(),n.set(!n.get()))},p=E=>{Wy().post({event:"session",data:{trigger:E},clientId:Math.random().toString(36).substring(7)})},g=()=>{i&&i>0&&(d.pollInterval=setInterval(()=>{t.get()?.data&&m({event:"poll"})},i*1e3))},y=()=>{d.unsubscribeBroadcast=Wy().subscribe(()=>{m({event:"storage"})})},w=()=>{c&&(d.unsubscribeFocus=rT().subscribe(()=>{m({event:"visibilitychange"})}))},b=()=>{d.unsubscribeOnline=Qy().subscribe(E=>{E&&m({event:"visibilitychange"})})};return{init:()=>{g(),y(),w(),b(),Wy().setup(),rT().setup(),Qy().setup()},cleanup:()=>{d.pollInterval&&(clearInterval(d.pollInterval),d.pollInterval=void 0),d.unsubscribeBroadcast&&(d.unsubscribeBroadcast(),d.unsubscribeBroadcast=void 0),d.unsubscribeFocus&&(d.unsubscribeFocus(),d.unsubscribeFocus=void 0),d.unsubscribeOnline&&(d.unsubscribeOnline(),d.unsubscribeOnline=void 0),d.lastSync=0,d.lastSessionRequest=0,d.cachedSession=void 0},triggerRefetch:m,broadcastSessionUpdate:p}}const Kj={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function Yj(e,t){const n=el(!1),r=ju(n,"/get-session",e,{method:"GET"});return HA(r,()=>{const a=Wj({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),()=>{a.cleanup()}}),{session:r,$sessionSignal:n}}const Qj=(e,t)=>{const n="credentials"in Request.prototype,r=ij(e?.baseURL,e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(O=>O.fetchPlugins).filter(O=>O!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:c,onError:u,onRequest:d,onResponse:f,...m}=e?.fetchOptions||{},p=zj({baseURL:r,...n?{credentials:"include"}:{},method:"GET",jsonParser(O){return O?pj(O,{strict:!1}):null},customFetchImpl:fetch,...m,plugins:[i,...m.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Kj],...a]}),{$sessionSignal:g,session:y}=Yj(p,e),w=e?.plugins||[];let b={},S={$sessionSignal:g,session:y},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"};const E=[{signal:"$sessionSignal",matcher(O){return O==="/sign-out"||O==="/update-user"||O==="/sign-up/email"||O==="/sign-in/email"||O==="/delete-user"||O==="/verify-email"||O==="/revoke-sessions"||O==="/revoke-session"||O==="/change-email"}}];for(const O of w)O.getAtoms&&Object.assign(S,O.getAtoms?.(p)),O.pathMethods&&Object.assign(R,O.pathMethods),O.atomListeners&&E.push(...O.atomListeners);const T={notify:O=>{S[O].set(!S[O].get())},listen:(O,C)=>{S[O].subscribe(C)},atoms:S};for(const O of w)O.getActions&&Object.assign(b,O.getActions?.(p,T,e));return{get baseURL(){return r},pluginsActions:b,pluginsAtoms:S,pluginPathMethods:R,atomListeners:E,$fetch:p,$store:T}};function Xj(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function Jj(e,t,n){const r=t[e],{fetchOptions:a,query:i,...c}=n||{};return r||(a?.method?a.method:c&&Object.keys(c).length>0?"POST":"GET")}function e$(e,t,n,r,a){function i(c=[]){return new Proxy(function(){},{get(u,d){if(typeof d!="string"||d==="then"||d==="catch"||d==="finally")return;const f=[...c,d];let m=e;for(const p of f)if(m&&typeof m=="object"&&p in m)m=m[p];else{m=void 0;break}return typeof m=="function"||Xj(m)?m:i(f)},apply:async(u,d,f)=>{const m="/"+c.map(E=>E.replace(/[A-Z]/g,T=>`-${T.toLowerCase()}`)).join("/"),p=f[0]||{},g=f[1]||{},{query:y,fetchOptions:w,...b}=p,S={...g,...w},R=Jj(m,n,p);return await t(m,{...S,body:R==="GET"?void 0:{...b,...S?.body||{}},query:y||S?.query,method:R,async onSuccess(E){if(await S?.onSuccess?.(E),!a||S.disableSignal)return;const T=a.filter(O=>O.matcher(m));if(T.length)for(const O of T){const C=r[O.signal];if(!C)return;const I=C.get();setTimeout(()=>{C.set(!I)},10)}}})}})}return i()}function t$(e,t={}){let n=A.useRef(e.get());const{keys:r,deps:a=[e,r]}=t;let i=A.useCallback(u=>{const d=f=>{n.current!==f&&(n.current=f,u())};return d(e.value),r?.length?yj(e,r,d):e.listen(d)},a),c=()=>n.current;return A.useSyncExternalStore(i,c,c)}function n$(e){return`use${r$(e)}`}function r$(e){return e.charAt(0).toUpperCase()+e.slice(1)}function o$(e){const{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:a,$store:i,atomListeners:c}=Qj(e);let u={};for(const[d,f]of Object.entries(r))u[n$(d)]=()=>t$(f);return e$({...n,...u,$fetch:a,$store:i},a,t,r,c)}function a$(e){return{authorize(t,n="AND"){let r=!1;for(const[a,i]of Object.entries(t)){const c=e[a];if(!c)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))r=i.every(u=>c.includes(u));else if(typeof i=="object"){const u=i;u.connector==="OR"?r=u.actions.some(d=>c.includes(d)):r=u.actions.every(d=>c.includes(d))}else throw new Wu("Invalid access control request");if(r&&n==="OR")return{success:r};if(!r&&n==="AND")return{success:!1,error:`unauthorized to access resource "${a}"`}}return r?{success:r}:{success:!1,error:"Not authorized"}},statements:e}}function KA(e){return{newRole(t){return a$(t)},statements:e}}const s$={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},YA=KA(s$),QA=YA.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),XA=YA.newRole({user:[],session:[]}),i$={admin:QA,user:XA},c$=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),n=e.options?.roles||i$;for(const r of t)if(n[r]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},l$={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},Mb=KA(l$),JA=Mb.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),eI=Mb.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),tI=Mb.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),u$={admin:JA,owner:eI,member:tI},d$=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const n=e.role.split(","),r=e.options.creatorRole||"owner",a=n.includes(r),i=e.allowCreatorAllPermissions||!1;if(a&&i)return!0;for(const c of n)if(t[c]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},f$=e=>{const t={admin:QA,user:XA,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>c$({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions??n.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},h$=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),p$=()=>({id:"magic-link",$InferServerPlugin:{}}),m$=e=>d$(e,e.options.roles||u$),g$=e=>{const t=el(!1),n=el(!1),r=el(!1),a=el(!1),i={admin:JA,member:tI,owner:eI,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(c,u,d)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:f=>m$({role:f.role,options:{ac:e?.ac,roles:i},permissions:f.permissions??f.permission})}}),getAtoms:c=>{const u=ju(t,"/organization/list",c,{method:"GET"});return{$listOrg:t,$activeOrgSignal:n,$activeMemberSignal:r,$activeMemberRoleSignal:a,activeOrganization:ju([n],"/organization/get-full-organization",c,()=>({method:"GET"})),listOrganizations:u,activeMember:ju([r],"/organization/get-active-member",c,{method:"GET"}),activeMemberRole:ju([a],"/organization/get-active-member-role",c,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(c){return c==="/organization/create"||c==="/organization/delete"||c==="/organization/update"},signal:"$listOrg"},{matcher(c){return c.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(c){return c.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(c){return c.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},v$=e=>({id:"sso-client",$InferServerPlugin:{}}),nI=o$({plugins:[g$({}),f$(),v$(),p$(),h$()]});function rI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=rI(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Pb(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=rI(e))&&(r&&(r+=" "),r+=t);return r}const y$=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},_$=(e,t)=>({classGroupId:e,validator:t}),oI=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fp="-",oT=[],b$="arbitrary..",w$=e=>{const t=E$(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return S$(c);const u=c.split(Fp),d=u[0]===""&&u.length>1?1:0;return aI(u,d,t)},getConflictingClassGroupIds:(c,u)=>{if(u){const d=r[c],f=n[c];return d?f?y$(f,d):d:f||oT}return n[c]||oT}}},aI=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const f=aI(e,t+1,i);if(f)return f}const c=n.validators;if(c===null)return;const u=t===0?e.join(Fp):e.slice(t).join(Fp),d=c.length;for(let f=0;f<d;f++){const m=c[f];if(m.validator(u))return m.classGroupId}},S$=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?b$+r:void 0})(),E$=e=>{const{theme:t,classGroups:n}=e;return R$(n,t)},R$=(e,t)=>{const n=oI();for(const r in e){const a=e[r];Db(a,n,r,t)}return n},Db=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const c=e[i];x$(c,t,n,r)}},x$=(e,t,n,r)=>{if(typeof e=="string"){T$(e,t,n);return}if(typeof e=="function"){O$(e,t,n,r);return}C$(e,t,n,r)},T$=(e,t,n)=>{const r=e===""?t:sI(t,e);r.classGroupId=n},O$=(e,t,n,r)=>{if(A$(e)){Db(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(_$(n,e))},C$=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let c=0;c<i;c++){const[u,d]=a[c];Db(d,sI(t,u),n,r)}},sI=(e,t)=>{let n=e;const r=t.split(Fp),a=r.length;for(let i=0;i<a;i++){const c=r[i];let u=n.nextPart.get(c);u||(u=oI(),n.nextPart.set(c,u)),n=u}return n},A$=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,I$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,c)=>{n[i]=c,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let c=n[i];if(c!==void 0)return c;if((c=r[i])!==void 0)return a(i,c),c},set(i,c){i in n?n[i]=c:a(i,c)}}},p_="!",aT=":",k$=[],sT=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),N$=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let c=0,u=0,d=0,f;const m=a.length;for(let b=0;b<m;b++){const S=a[b];if(c===0&&u===0){if(S===aT){i.push(a.slice(d,b)),d=b+1;continue}if(S==="/"){f=b;continue}}S==="["?c++:S==="]"?c--:S==="("?u++:S===")"&&u--}const p=i.length===0?a:a.slice(d);let g=p,y=!1;p.endsWith(p_)?(g=p.slice(0,-1),y=!0):p.startsWith(p_)&&(g=p.slice(1),y=!0);const w=f&&f>d?f-d:void 0;return sT(i,y,g,w)};if(t){const a=t+aT,i=r;r=c=>c.startsWith(a)?i(c.slice(a.length)):sT(k$,!1,c,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},M$=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const c=n[i],u=c[0]==="[",d=t.has(c);u||d?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(c)):a.push(c)}return a.length>0&&(a.sort(),r.push(...a)),r}},P$=e=>({cache:I$(e.cacheSize),parseClassName:N$(e),sortModifiers:M$(e),...w$(e)}),D$=/\s+/,L$=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,c=[],u=e.trim().split(D$);let d="";for(let f=u.length-1;f>=0;f-=1){const m=u[f],{isExternal:p,modifiers:g,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:b}=n(m);if(p){d=m+(d.length>0?" "+d:d);continue}let S=!!b,R=r(S?w.substring(0,b):w);if(!R){if(!S){d=m+(d.length>0?" "+d:d);continue}if(R=r(w),!R){d=m+(d.length>0?" "+d:d);continue}S=!1}const E=g.length===0?"":g.length===1?g[0]:i(g).join(":"),T=y?E+p_:E,O=T+R;if(c.indexOf(O)>-1)continue;c.push(O);const C=a(R,S);for(let I=0;I<C.length;++I){const k=C[I];c.push(T+k)}d=m+(d.length>0?" "+d:d)}return d},j$=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=iI(n))&&(a&&(a+=" "),a+=r);return a},iI=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=iI(e[r]))&&(n&&(n+=" "),n+=t);return n},$$=(e,...t)=>{let n,r,a,i;const c=d=>{const f=t.reduce((m,p)=>p(m),e());return n=P$(f),r=n.cache.get,a=n.cache.set,i=u,u(d)},u=d=>{const f=r(d);if(f)return f;const m=L$(d,n);return a(d,m),m};return i=c,(...d)=>i(j$(...d))},U$=[],zn=e=>{const t=n=>n[e]||U$;return t.isThemeGetter=!0,t},cI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,lI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,z$=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,V$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,B$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,q$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,H$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Es=e=>z$.test(e),mt=e=>!!e&&!Number.isNaN(Number(e)),Rs=e=>!!e&&Number.isInteger(Number(e)),Xy=e=>e.endsWith("%")&&mt(e.slice(0,-1)),Da=e=>V$.test(e),uI=()=>!0,G$=e=>F$.test(e)&&!B$.test(e),Lb=()=>!1,Z$=e=>q$.test(e),W$=e=>H$.test(e),K$=e=>!ze(e)&&!Ve(e),Y$=e=>Ys(e,hI,Lb),ze=e=>cI.test(e),_i=e=>Ys(e,pI,G$),iT=e=>Ys(e,o8,mt),Q$=e=>Ys(e,gI,uI),X$=e=>Ys(e,mI,Lb),cT=e=>Ys(e,dI,Lb),J$=e=>Ys(e,fI,W$),uh=e=>Ys(e,vI,Z$),Ve=e=>lI.test(e),Tu=e=>Gi(e,pI),e8=e=>Gi(e,mI),lT=e=>Gi(e,dI),t8=e=>Gi(e,hI),n8=e=>Gi(e,fI),dh=e=>Gi(e,vI,!0),r8=e=>Gi(e,gI,!0),Ys=(e,t,n)=>{const r=cI.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Gi=(e,t,n=!1)=>{const r=lI.exec(e);return r?r[1]?t(r[1]):n:!1},dI=e=>e==="position"||e==="percentage",fI=e=>e==="image"||e==="url",hI=e=>e==="length"||e==="size"||e==="bg-size",pI=e=>e==="length",o8=e=>e==="number",mI=e=>e==="family-name",gI=e=>e==="number"||e==="weight",vI=e=>e==="shadow",a8=()=>{const e=zn("color"),t=zn("font"),n=zn("text"),r=zn("font-weight"),a=zn("tracking"),i=zn("leading"),c=zn("breakpoint"),u=zn("container"),d=zn("spacing"),f=zn("radius"),m=zn("shadow"),p=zn("inset-shadow"),g=zn("text-shadow"),y=zn("drop-shadow"),w=zn("blur"),b=zn("perspective"),S=zn("aspect"),R=zn("ease"),E=zn("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...O(),Ve,ze],I=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],P=()=>[Ve,ze,d],$=()=>[Es,"full","auto",...P()],W=()=>[Rs,"none","subgrid",Ve,ze],V=()=>["auto",{span:["full",Rs,Ve,ze]},Rs,Ve,ze],G=()=>[Rs,"auto",Ve,ze],U=()=>["auto","min","max","fr",Ve,ze],J=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],le=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...P()],Y=()=>[Es,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],se=()=>[Es,"screen","full","dvw","lvw","svw","min","max","fit",...P()],fe=()=>[Es,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],K=()=>[e,Ve,ze],D=()=>[...O(),lT,cT,{position:[Ve,ze]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],B=()=>["auto","cover","contain",t8,Y$,{size:[Ve,ze]}],L=()=>[Xy,Tu,_i],z=()=>["","none","full",f,Ve,ze],Q=()=>["",mt,Tu,_i],me=()=>["solid","dashed","dotted","double"],ve=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>[mt,Xy,lT,cT],Ie=()=>["","none",w,Ve,ze],H=()=>["none",mt,Ve,ze],re=()=>["none",mt,Ve,ze],_e=()=>[mt,Ve,ze],ae=()=>[Es,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Da],breakpoint:[Da],color:[uI],container:[Da],"drop-shadow":[Da],ease:["in","out","in-out"],font:[K$],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Da],shadow:[Da],spacing:["px",mt],text:[Da],"text-shadow":[Da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Es,ze,Ve,S]}],container:["container"],columns:[{columns:[mt,ze,Ve,u]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{"inset-s":$(),start:$()}],end:[{"inset-e":$(),end:$()}],"inset-bs":[{"inset-bs":$()}],"inset-be":[{"inset-be":$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Rs,"auto",Ve,ze]}],basis:[{basis:[Es,"full","auto",u,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[mt,Es,"auto","initial","none",ze]}],grow:[{grow:["",mt,Ve,ze]}],shrink:[{shrink:["",mt,Ve,ze]}],order:[{order:[Rs,"first","last","none",Ve,ze]}],"grid-cols":[{"grid-cols":W()}],"col-start-end":[{col:V()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":W()}],"row-start-end":[{row:V()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...J(),"normal"]}],"justify-items":[{"justify-items":[...le(),"normal"]}],"justify-self":[{"justify-self":["auto",...le()]}],"align-content":[{content:["normal",...J()]}],"align-items":[{items:[...le(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...le(),{baseline:["","last"]}]}],"place-content":[{"place-content":J()}],"place-items":[{"place-items":[...le(),"baseline"]}],"place-self":[{"place-self":["auto",...le()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...se()]}],"min-inline-size":[{"min-inline":["auto",...se()]}],"max-inline-size":[{"max-inline":["none",...se()]}],"block-size":[{block:["auto",...fe()]}],"min-block-size":[{"min-block":["auto",...fe()]}],"max-block-size":[{"max-block":["none",...fe()]}],w:[{w:[u,"screen",...Y()]}],"min-w":[{"min-w":[u,"screen","none",...Y()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[c]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Tu,_i]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,r8,Q$]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xy,ze]}],"font-family":[{font:[e8,X$,t]}],"font-features":[{"font-features":[ze]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,Ve,ze]}],"line-clamp":[{"line-clamp":[mt,"none",Ve,iT]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",Ve,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ve,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:K()}],"text-color":[{text:K()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[mt,"from-font","auto",Ve,_i]}],"text-decoration-color":[{decoration:K()}],"underline-offset":[{"underline-offset":[mt,"auto",Ve,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ve,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:B()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rs,Ve,ze],radial:["",Ve,ze],conic:[Rs,Ve,ze]},n8,J$]}],"bg-color":[{bg:K()}],"gradient-from-pos":[{from:L()}],"gradient-via-pos":[{via:L()}],"gradient-to-pos":[{to:L()}],"gradient-from":[{from:K()}],"gradient-via":[{via:K()}],"gradient-to":[{to:K()}],rounded:[{rounded:z()}],"rounded-s":[{"rounded-s":z()}],"rounded-e":[{"rounded-e":z()}],"rounded-t":[{"rounded-t":z()}],"rounded-r":[{"rounded-r":z()}],"rounded-b":[{"rounded-b":z()}],"rounded-l":[{"rounded-l":z()}],"rounded-ss":[{"rounded-ss":z()}],"rounded-se":[{"rounded-se":z()}],"rounded-ee":[{"rounded-ee":z()}],"rounded-es":[{"rounded-es":z()}],"rounded-tl":[{"rounded-tl":z()}],"rounded-tr":[{"rounded-tr":z()}],"rounded-br":[{"rounded-br":z()}],"rounded-bl":[{"rounded-bl":z()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:K()}],"border-color-x":[{"border-x":K()}],"border-color-y":[{"border-y":K()}],"border-color-s":[{"border-s":K()}],"border-color-e":[{"border-e":K()}],"border-color-bs":[{"border-bs":K()}],"border-color-be":[{"border-be":K()}],"border-color-t":[{"border-t":K()}],"border-color-r":[{"border-r":K()}],"border-color-b":[{"border-b":K()}],"border-color-l":[{"border-l":K()}],"divide-color":[{divide:K()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[mt,Ve,ze]}],"outline-w":[{outline:["",mt,Tu,_i]}],"outline-color":[{outline:K()}],shadow:[{shadow:["","none",m,dh,uh]}],"shadow-color":[{shadow:K()}],"inset-shadow":[{"inset-shadow":["none",p,dh,uh]}],"inset-shadow-color":[{"inset-shadow":K()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:K()}],"ring-offset-w":[{"ring-offset":[mt,_i]}],"ring-offset-color":[{"ring-offset":K()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":K()}],"text-shadow":[{"text-shadow":["none",g,dh,uh]}],"text-shadow-color":[{"text-shadow":K()}],opacity:[{opacity:[mt,Ve,ze]}],"mix-blend":[{"mix-blend":[...ve(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ve()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[mt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ce()}],"mask-image-linear-from-color":[{"mask-linear-from":K()}],"mask-image-linear-to-color":[{"mask-linear-to":K()}],"mask-image-t-from-pos":[{"mask-t-from":Ce()}],"mask-image-t-to-pos":[{"mask-t-to":Ce()}],"mask-image-t-from-color":[{"mask-t-from":K()}],"mask-image-t-to-color":[{"mask-t-to":K()}],"mask-image-r-from-pos":[{"mask-r-from":Ce()}],"mask-image-r-to-pos":[{"mask-r-to":Ce()}],"mask-image-r-from-color":[{"mask-r-from":K()}],"mask-image-r-to-color":[{"mask-r-to":K()}],"mask-image-b-from-pos":[{"mask-b-from":Ce()}],"mask-image-b-to-pos":[{"mask-b-to":Ce()}],"mask-image-b-from-color":[{"mask-b-from":K()}],"mask-image-b-to-color":[{"mask-b-to":K()}],"mask-image-l-from-pos":[{"mask-l-from":Ce()}],"mask-image-l-to-pos":[{"mask-l-to":Ce()}],"mask-image-l-from-color":[{"mask-l-from":K()}],"mask-image-l-to-color":[{"mask-l-to":K()}],"mask-image-x-from-pos":[{"mask-x-from":Ce()}],"mask-image-x-to-pos":[{"mask-x-to":Ce()}],"mask-image-x-from-color":[{"mask-x-from":K()}],"mask-image-x-to-color":[{"mask-x-to":K()}],"mask-image-y-from-pos":[{"mask-y-from":Ce()}],"mask-image-y-to-pos":[{"mask-y-to":Ce()}],"mask-image-y-from-color":[{"mask-y-from":K()}],"mask-image-y-to-color":[{"mask-y-to":K()}],"mask-image-radial":[{"mask-radial":[Ve,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ce()}],"mask-image-radial-from-color":[{"mask-radial-from":K()}],"mask-image-radial-to-color":[{"mask-radial-to":K()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[mt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ce()}],"mask-image-conic-from-color":[{"mask-conic-from":K()}],"mask-image-conic-to-color":[{"mask-conic-to":K()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:B()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ve,ze]}],filter:[{filter:["","none",Ve,ze]}],blur:[{blur:Ie()}],brightness:[{brightness:[mt,Ve,ze]}],contrast:[{contrast:[mt,Ve,ze]}],"drop-shadow":[{"drop-shadow":["","none",y,dh,uh]}],"drop-shadow-color":[{"drop-shadow":K()}],grayscale:[{grayscale:["",mt,Ve,ze]}],"hue-rotate":[{"hue-rotate":[mt,Ve,ze]}],invert:[{invert:["",mt,Ve,ze]}],saturate:[{saturate:[mt,Ve,ze]}],sepia:[{sepia:["",mt,Ve,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",Ve,ze]}],"backdrop-blur":[{"backdrop-blur":Ie()}],"backdrop-brightness":[{"backdrop-brightness":[mt,Ve,ze]}],"backdrop-contrast":[{"backdrop-contrast":[mt,Ve,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",mt,Ve,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[mt,Ve,ze]}],"backdrop-invert":[{"backdrop-invert":["",mt,Ve,ze]}],"backdrop-opacity":[{"backdrop-opacity":[mt,Ve,ze]}],"backdrop-saturate":[{"backdrop-saturate":[mt,Ve,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",mt,Ve,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ve,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[mt,"initial",Ve,ze]}],ease:[{ease:["linear","initial",R,Ve,ze]}],delay:[{delay:[mt,Ve,ze]}],animate:[{animate:["none",E,Ve,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,Ve,ze]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:H()}],"rotate-x":[{"rotate-x":H()}],"rotate-y":[{"rotate-y":H()}],"rotate-z":[{"rotate-z":H()}],scale:[{scale:re()}],"scale-x":[{"scale-x":re()}],"scale-y":[{"scale-y":re()}],"scale-z":[{"scale-z":re()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[Ve,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:K()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:K()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ve,ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ve,ze]}],fill:[{fill:["none",...K()]}],"stroke-w":[{stroke:[mt,Tu,_i,iT]}],stroke:[{stroke:["none",...K()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},yI=$$(a8),s8=Object.freeze({status:"aborted"});function ye(e,t,n){function r(u,d){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:d,constr:c,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,d);const f=c.prototype,m=Object.keys(f);for(let p=0;p<m.length;p++){const g=m[p];g in u||(u[g]=f[g].bind(u))}}const a=n?.Parent??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function c(u){var d;const f=n?.Parent?new i:this;r(f,u),(d=f._zod).deferred??(d.deferred=[]);for(const m of f._zod.deferred)m();return f}return Object.defineProperty(c,"init",{value:r}),Object.defineProperty(c,Symbol.hasInstance,{value:u=>n?.Parent&&u instanceof n.Parent?!0:u?._zod?.traits?.has(e)}),Object.defineProperty(c,"name",{value:e}),c}class il extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class _I extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const bI={};function Bs(e){return bI}function wI(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function m_(e,t){return typeof t=="bigint"?t.toString():t}function Lm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Sd(e){return e==null}function jb(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function i8(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(a=Number.parseInt(d[1]))}const i=n>a?n:a,c=Number.parseInt(e.toFixed(i).replace(".","")),u=Number.parseInt(t.toFixed(i).replace(".",""));return c%u/10**i}const uT=Symbol("evaluating");function Ot(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==uT)return r===void 0&&(r=uT,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function Zi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Qs(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function dT(e){return JSON.stringify(e)}function c8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const SI="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function sd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const l8=Lm(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function ml(e){if(sd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(sd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function EI(e){return ml(e)?{...e}:Array.isArray(e)?[...e]:e}const u8=new Set(["string","number","symbol"]);function gl(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xs(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Le(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function d8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const f8={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function h8(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Qs(e._zod.def,{get shape(){const c={};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(c[u]=n.shape[u])}return Zi(this,"shape",c),c},checks:[]});return Xs(e,i)}function p8(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Qs(e._zod.def,{get shape(){const c={...e._zod.def.shape};for(const u in t){if(!(u in n.shape))throw new Error(`Unrecognized key: "${u}"`);t[u]&&delete c[u]}return Zi(this,"shape",c),c},checks:[]});return Xs(e,i)}function m8(e,t){if(!ml(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const c in t)if(Object.getOwnPropertyDescriptor(i,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Qs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Zi(this,"shape",i),i}});return Xs(e,a)}function g8(e,t){if(!ml(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Qs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return Zi(this,"shape",r),r}});return Xs(e,n)}function v8(e,t){const n=Qs(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return Zi(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Xs(e,n)}function y8(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const c=Qs(t._zod.def,{get shape(){const u=t._zod.def.shape,d={...u};if(n)for(const f in n){if(!(f in u))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:u[f]}):u[f])}else for(const f in u)d[f]=e?new e({type:"optional",innerType:u[f]}):u[f];return Zi(this,"shape",d),d},checks:[]});return Xs(t,c)}function _8(e,t,n){const r=Qs(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const c in n){if(!(c in i))throw new Error(`Unrecognized key: "${c}"`);n[c]&&(i[c]=new e({type:"nonoptional",innerType:a[c]}))}else for(const c in a)i[c]=new e({type:"nonoptional",innerType:a[c]});return Zi(this,"shape",i),i}});return Xs(t,r)}function tl(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function ki(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function fh(e){return typeof e=="string"?e:e?.message}function qs(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const a=fh(e.inst?._zod.def?.error?.(e))??fh(t?.error?.(e))??fh(n.customError?.(e))??fh(n.localeError?.(e))??"Invalid input";r.message=a}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function RI(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function $b(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function id(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const xI=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,m_,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ub=ye("$ZodError",xI),jm=ye("$ZodError",xI,{Parent:Error});function b8(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function w8(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(c=>r({issues:c}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let c=n,u=0;for(;u<i.path.length;){const d=i.path[u];u===i.path.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(i))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}};return r(e),n}const $m=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise)throw new il;if(c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>qs(d,i,Bs())));throw SI(u,a?.callee),u}return c.value},S8=$m(jm),Um=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let c=t._zod.run({value:n,issues:[]},i);if(c instanceof Promise&&(c=await c),c.issues.length){const u=new(a?.Err??e)(c.issues.map(d=>qs(d,i,Bs())));throw SI(u,a?.callee),u}return c.value},E8=Um(jm),zm=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new il;return i.issues.length?{success:!1,error:new(e??Ub)(i.issues.map(c=>qs(c,a,Bs())))}:{success:!0,data:i.value}},TI=zm(jm),Vm=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(c=>qs(c,a,Bs())))}:{success:!0,data:i.value}},R8=Vm(jm),x8=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $m(e)(t,n,a)},T8=e=>(t,n,r)=>$m(e)(t,n,r),O8=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Um(e)(t,n,a)},C8=e=>async(t,n,r)=>Um(e)(t,n,r),A8=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zm(e)(t,n,a)},I8=e=>(t,n,r)=>zm(e)(t,n,r),k8=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Vm(e)(t,n,a)},N8=e=>async(t,n,r)=>Vm(e)(t,n,r),M8=/^[cC][^\s-]{8,}$/,P8=/^[0-9a-z]+$/,D8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,L8=/^[0-9a-vA-V]{20}$/,j8=/^[A-Za-z0-9]{27}$/,$8=/^[a-zA-Z0-9_-]{21}$/,U8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,z8=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,fT=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,V8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,F8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function B8(){return new RegExp(F8,"u")}const q8=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,H8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,G8=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Z8=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,OI=/^[A-Za-z0-9_-]*$/,K8=/^\+[1-9]\d{6,14}$/,CI="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Y8=new RegExp(`^${CI}$`);function AI(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Q8(e){return new RegExp(`^${AI(e)}$`)}function X8(e){const t=AI({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${CI}T(?:${r})$`)}const J8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},e9=/^-?\d+$/,II=/^-?\d+(?:\.\d+)?$/,t9=/^(?:true|false)$/i,n9=/^null$/i,r9=/^undefined$/i,o9=/^[^A-Z]*$/,a9=/^[^a-z]*$/,cr=ye("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),kI={number:"number",bigint:"bigint",object:"date"},NI=ye("$ZodCheckLessThan",(e,t)=>{cr.init(e,t);const n=kI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),MI=ye("$ZodCheckGreaterThan",(e,t)=>{cr.init(e,t);const n=kI[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),s9=ye("$ZodCheckMultipleOf",(e,t)=>{cr.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):i8(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),i9=ye("$ZodCheckNumberFormat",(e,t)=>{cr.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[a,i]=f8[t.format];e._zod.onattach.push(c=>{const u=c._zod.bag;u.format=t.format,u.minimum=a,u.maximum=i,n&&(u.pattern=e9)}),e._zod.check=c=>{const u=c.value;if(n){if(!Number.isInteger(u)){c.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?c.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):c.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}u<a&&c.issues.push({origin:"number",input:u,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),u>i&&c.issues.push({origin:"number",input:u,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),c9=ye("$ZodCheckMaxSize",(e,t)=>{var n;cr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sd(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;a.size<=t.maximum||r.issues.push({origin:RI(a),code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),l9=ye("$ZodCheckMinSize",(e,t)=>{var n;cr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sd(a)&&a.size!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;a.size>=t.minimum||r.issues.push({origin:RI(a),code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),u9=ye("$ZodCheckMaxLength",(e,t)=>{var n;cr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const c=$b(a);r.issues.push({origin:c,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),d9=ye("$ZodCheckMinLength",(e,t)=>{var n;cr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const c=$b(a);r.issues.push({origin:c,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),f9=ye("$ZodCheckLengthEquals",(e,t)=>{var n;cr.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sd(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const c=$b(a),u=i>t.length;r.issues.push({origin:c,...u?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Fm=ye("$ZodCheckStringFormat",(e,t)=>{var n,r;cr.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),h9=ye("$ZodCheckRegex",(e,t)=>{Fm.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),p9=ye("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=o9),Fm.init(e,t)}),m9=ye("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=a9),Fm.init(e,t)}),g9=ye("$ZodCheckIncludes",(e,t)=>{cr.init(e,t);const n=gl(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),v9=ye("$ZodCheckStartsWith",(e,t)=>{cr.init(e,t);const n=new RegExp(`^${gl(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),y9=ye("$ZodCheckEndsWith",(e,t)=>{cr.init(e,t);const n=new RegExp(`.*${gl(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),_9=ye("$ZodCheckMimeType",(e,t)=>{cr.init(e,t);const n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),b9=ye("$ZodCheckOverwrite",(e,t)=>{cr.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class w9{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
11
+ `).filter(c=>c),a=Math.min(...r.map(c=>c.length-c.trimStart().length)),i=r.map(c=>c.slice(a)).map(c=>" ".repeat(this.indent*2)+c);for(const c of i)this.content.push(c)}compile(){const t=Function,n=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
12
+ `))}}const S9={major:4,minor:3,patch:6},Ft=ye("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=S9;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const a of r)for(const i of a._zod.onattach)i(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const a=(c,u,d)=>{let f=tl(c),m;for(const p of u){if(p._zod.def.when){if(!p._zod.def.when(c))continue}else if(f)continue;const g=c.issues.length,y=p._zod.check(c);if(y instanceof Promise&&d?.async===!1)throw new il;if(m||y instanceof Promise)m=(m??Promise.resolve()).then(async()=>{await y,c.issues.length!==g&&(f||(f=tl(c,g)))});else{if(c.issues.length===g)continue;f||(f=tl(c,g))}}return m?m.then(()=>c):c},i=(c,u,d)=>{if(tl(c))return c.aborted=!0,c;const f=a(u,r,d);if(f instanceof Promise){if(d.async===!1)throw new il;return f.then(m=>e._zod.parse(m,d))}return e._zod.parse(f,d)};e._zod.run=(c,u)=>{if(u.skipChecks)return e._zod.parse(c,u);if(u.direction==="backward"){const f=e._zod.parse({value:c.value,issues:[]},{...u,skipChecks:!0});return f instanceof Promise?f.then(m=>i(m,c,u)):i(f,c,u)}const d=e._zod.parse(c,u);if(d instanceof Promise){if(u.async===!1)throw new il;return d.then(f=>a(f,r,u))}return a(d,r,u)}}Ot(e,"~standard",()=>({validate:a=>{try{const i=TI(e,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return R8(e,a).then(c=>c.success?{value:c.data}:{issues:c.error?.issues})}},vendor:"zod",version:1}))}),zb=ye("$ZodString",(e,t)=>{Ft.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??J8(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),dn=ye("$ZodStringFormat",(e,t)=>{Fm.init(e,t),zb.init(e,t)}),E9=ye("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=z8),dn.init(e,t)}),R9=ye("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=fT(r))}else t.pattern??(t.pattern=fT());dn.init(e,t)}),x9=ye("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=V8),dn.init(e,t)}),T9=ye("$ZodURL",(e,t)=>{dn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=a.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),O9=ye("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=B8()),dn.init(e,t)}),C9=ye("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=$8),dn.init(e,t)}),A9=ye("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=M8),dn.init(e,t)}),I9=ye("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=P8),dn.init(e,t)}),k9=ye("$ZodULID",(e,t)=>{t.pattern??(t.pattern=D8),dn.init(e,t)}),N9=ye("$ZodXID",(e,t)=>{t.pattern??(t.pattern=L8),dn.init(e,t)}),M9=ye("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=j8),dn.init(e,t)}),P9=ye("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=X8(t)),dn.init(e,t)}),D9=ye("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Y8),dn.init(e,t)}),L9=ye("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Q8(t)),dn.init(e,t)}),j9=ye("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=U8),dn.init(e,t)}),$9=ye("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=q8),dn.init(e,t),e._zod.bag.format="ipv4"}),U9=ye("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=H8),dn.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),z9=ye("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=G8),dn.init(e,t)}),V9=ye("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Z8),dn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,i]=r;if(!i)throw new Error;const c=Number(i);if(`${c}`!==i)throw new Error;if(c<0||c>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function PI(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const F9=ye("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=W8),dn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{PI(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function B9(e){if(!OI.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return PI(n)}const q9=ye("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=OI),dn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{B9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),H9=ye("$ZodE164",(e,t)=>{t.pattern??(t.pattern=K8),dn.init(e,t)});function G9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const Z9=ye("$ZodJWT",(e,t)=>{dn.init(e,t),e._zod.check=n=>{G9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),DI=ye("$ZodNumber",(e,t)=>{Ft.init(e,t),e._zod.pattern=e._zod.bag.pattern??II,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),n}}),W9=ye("$ZodNumberFormat",(e,t)=>{i9.init(e,t),DI.init(e,t)}),K9=ye("$ZodBoolean",(e,t)=>{Ft.init(e,t),e._zod.pattern=t9,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),Y9=ye("$ZodUndefined",(e,t)=>{Ft.init(e,t),e._zod.pattern=r9,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const a=n.value;return typeof a>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:a,inst:e}),n}}),Q9=ye("$ZodNull",(e,t)=>{Ft.init(e,t),e._zod.pattern=n9,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const a=n.value;return a===null||n.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),n}}),X9=ye("$ZodAny",(e,t)=>{Ft.init(e,t),e._zod.parse=n=>n}),J9=ye("$ZodUnknown",(e,t)=>{Ft.init(e,t),e._zod.parse=n=>n}),eU=ye("$ZodNever",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function hT(e,t,n){e.issues.length&&t.issues.push(...ki(n,e.issues)),t.value[n]=e.value}const tU=ye("$ZodArray",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let c=0;c<a.length;c++){const u=a[c],d=t.element._zod.run({value:u,issues:[]},r);d instanceof Promise?i.push(d.then(f=>hT(f,n,c))):hT(d,n,c)}return i.length?Promise.all(i).then(()=>n):n}});function Bp(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...ki(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function LI(e){const t=Object.keys(e.shape);for(const r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);const n=d8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function jI(e,t,n,r,a,i){const c=[],u=a.keySet,d=a.catchall._zod,f=d.def.type,m=d.optout==="optional";for(const p in t){if(u.has(p))continue;if(f==="never"){c.push(p);continue}const g=d.run({value:t[p],issues:[]},r);g instanceof Promise?e.push(g.then(y=>Bp(y,n,p,t,m))):Bp(g,n,p,t,m)}return c.length&&n.issues.push({code:"unrecognized_keys",keys:c,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const nU=ye("$ZodObject",(e,t)=>{if(Ft.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const u=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...u};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Lm(()=>LI(t));Ot(e._zod,"propValues",()=>{const u=t.shape,d={};for(const f in u){const m=u[f]._zod;if(m.values){d[f]??(d[f]=new Set);for(const p of m.values)d[f].add(p)}}return d});const a=sd,i=t.catchall;let c;e._zod.parse=(u,d)=>{c??(c=r.value);const f=u.value;if(!a(f))return u.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),u;u.value={};const m=[],p=c.shape;for(const g of c.keys){const y=p[g],w=y._zod.optout==="optional",b=y._zod.run({value:f[g],issues:[]},d);b instanceof Promise?m.push(b.then(S=>Bp(S,u,g,f,w))):Bp(b,u,g,f,w)}return i?jI(m,f,u,d,r.value,e):m.length?Promise.all(m).then(()=>u):u}}),rU=ye("$ZodObjectJIT",(e,t)=>{nU.init(e,t);const n=e._zod.parse,r=Lm(()=>LI(t)),a=g=>{const y=new w9(["shape","payload","ctx"]),w=r.value,b=T=>{const O=dT(T);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};y.write("const input = payload.value;");const S=Object.create(null);let R=0;for(const T of w.keys)S[T]=`key_${R++}`;y.write("const newResult = {};");for(const T of w.keys){const O=S[T],C=dT(T),k=g[T]?._zod?.optout==="optional";y.write(`const ${O} = ${b(T)};`),k?y.write(`
13
+ if (${O}.issues.length) {
14
+ if (${C} in input) {
15
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
16
+ ...iss,
17
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
18
+ })));
19
+ }
20
+ }
21
+
22
+ if (${O}.value === undefined) {
23
+ if (${C} in input) {
24
+ newResult[${C}] = undefined;
25
+ }
26
+ } else {
27
+ newResult[${C}] = ${O}.value;
28
+ }
29
+
30
+ `):y.write(`
31
+ if (${O}.issues.length) {
32
+ payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
33
+ ...iss,
34
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
35
+ })));
36
+ }
37
+
38
+ if (${O}.value === undefined) {
39
+ if (${C} in input) {
40
+ newResult[${C}] = undefined;
41
+ }
42
+ } else {
43
+ newResult[${C}] = ${O}.value;
44
+ }
45
+
46
+ `)}y.write("payload.value = newResult;"),y.write("return payload;");const E=y.compile();return(T,O)=>E(g,T,O)};let i;const c=sd,u=!bI.jitless,f=u&&l8.value,m=t.catchall;let p;e._zod.parse=(g,y)=>{p??(p=r.value);const w=g.value;return c(w)?u&&f&&y?.async===!1&&y.jitless!==!0?(i||(i=a(t.shape)),g=i(g,y),m?jI([],w,g,y,p,e):g):n(g,y):(g.issues.push({expected:"object",code:"invalid_type",input:w,inst:e}),g)}});function pT(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!tl(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(c=>qs(c,r,Bs())))}),t)}const $I=ye("$ZodUnion",(e,t)=>{Ft.init(e,t),Ot(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),Ot(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),Ot(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),Ot(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>jb(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(a,i)=>{if(n)return r(a,i);let c=!1;const u=[];for(const d of t.options){const f=d._zod.run({value:a.value,issues:[]},i);if(f instanceof Promise)u.push(f),c=!0;else{if(f.issues.length===0)return f;u.push(f)}}return c?Promise.all(u).then(d=>pT(d,a,e,i)):pT(u,a,e,i)}}),oU=ye("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,$I.init(e,t);const n=e._zod.parse;Ot(e._zod,"propValues",()=>{const a={};for(const i of t.options){const c=i._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[u,d]of Object.entries(c)){a[u]||(a[u]=new Set);for(const f of d)a[u].add(f)}}return a});const r=Lm(()=>{const a=t.options,i=new Map;for(const c of a){const u=c._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(c)}"`);for(const d of u){if(i.has(d))throw new Error(`Duplicate discriminator value "${String(d)}"`);i.set(d,c)}}return i});e._zod.parse=(a,i)=>{const c=a.value;if(!sd(c))return a.issues.push({code:"invalid_type",expected:"object",input:c,inst:e}),a;const u=r.value.get(c?.[t.discriminator]);return u?u._zod.run(a,i):t.unionFallback?n(a,i):(a.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:c,path:[t.discriminator],inst:e}),a)}}),aU=ye("$ZodIntersection",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),c=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||c instanceof Promise?Promise.all([i,c]).then(([d,f])=>mT(n,d,f)):mT(n,i,c)}});function g_(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ml(e)&&ml(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of r){const c=g_(e[i],t[i]);if(!c.valid)return{valid:!1,mergeErrorPath:[i,...c.mergeErrorPath]};a[i]=c.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],i=t[r],c=g_(a,i);if(!c.valid)return{valid:!1,mergeErrorPath:[r,...c.mergeErrorPath]};n.push(c.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function mT(e,t,n){const r=new Map;let a;for(const u of t.issues)if(u.code==="unrecognized_keys"){a??(a=u);for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).l=!0}else e.issues.push(u);for(const u of n.issues)if(u.code==="unrecognized_keys")for(const d of u.keys)r.has(d)||r.set(d,{}),r.get(d).r=!0;else e.issues.push(u);const i=[...r].filter(([,u])=>u.l&&u.r).map(([u])=>u);if(i.length&&a&&e.issues.push({...a,keys:i}),tl(e))return e;const c=g_(t.value,n.value);if(!c.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);return e.value=c.data,e}const sU=ye("$ZodTuple",(e,t)=>{Ft.init(e,t);const n=t.items;e._zod.parse=(r,a)=>{const i=r.value;if(!Array.isArray(i))return r.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const c=[],u=[...n].reverse().findIndex(m=>m._zod.optin!=="optional"),d=u===-1?0:n.length-u;if(!t.rest){const m=i.length>n.length,p=i.length<d-1;if(m||p)return r.issues.push({...m?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:i,inst:e,origin:"array"}),r}let f=-1;for(const m of n){if(f++,f>=i.length&&f>=d)continue;const p=m._zod.run({value:i[f],issues:[]},a);p instanceof Promise?c.push(p.then(g=>hh(g,r,f))):hh(p,r,f)}if(t.rest){const m=i.slice(n.length);for(const p of m){f++;const g=t.rest._zod.run({value:p,issues:[]},a);g instanceof Promise?c.push(g.then(y=>hh(y,r,f))):hh(g,r,f)}}return c.length?Promise.all(c).then(()=>r):r}});function hh(e,t,n){e.issues.length&&t.issues.push(...ki(n,e.issues)),t.value[n]=e.value}const iU=ye("$ZodRecord",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!ml(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],c=t.keyType._zod.values;if(c){n.value={};const u=new Set;for(const f of c)if(typeof f=="string"||typeof f=="number"||typeof f=="symbol"){u.add(typeof f=="number"?f.toString():f);const m=t.valueType._zod.run({value:a[f],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...ki(f,p.issues)),n.value[f]=p.value})):(m.issues.length&&n.issues.push(...ki(f,m.issues)),n.value[f]=m.value)}let d;for(const f in a)u.has(f)||(d=d??[],d.push(f));d&&d.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:d})}else{n.value={};for(const u of Reflect.ownKeys(a)){if(u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&II.test(u)&&d.issues.length){const p=t.keyType._zod.run({value:Number(u),issues:[]},r);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(d=p)}if(d.issues.length){t.mode==="loose"?n.value[u]=a[u]:n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(p=>qs(p,r,Bs())),input:u,path:[u],inst:e});continue}const m=t.valueType._zod.run({value:a[u],issues:[]},r);m instanceof Promise?i.push(m.then(p=>{p.issues.length&&n.issues.push(...ki(u,p.issues)),n.value[d.value]=p.value})):(m.issues.length&&n.issues.push(...ki(u,m.issues)),n.value[d.value]=m.value)}}return i.length?Promise.all(i).then(()=>n):n}}),cU=ye("$ZodEnum",(e,t)=>{Ft.init(e,t);const n=wI(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>u8.has(typeof a)).map(a=>typeof a=="string"?gl(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const c=a.value;return r.has(c)||a.issues.push({code:"invalid_value",values:n,input:c,inst:e}),a}}),lU=ye("$ZodLiteral",(e,t)=>{if(Ft.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?gl(r):r?gl(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),uU=ye("$ZodFile",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;return a instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:a,inst:e}),n}}),dU=ye("$ZodTransform",(e,t)=>{Ft.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new _I(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(c=>(n.value=c,n));if(a instanceof Promise)throw new il;return n.value=a,n}});function gT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const UI=ye("$ZodOptional",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ot(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${jb(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>gT(i,n.value)):gT(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),fU=ye("$ZodExactOptional",(e,t)=>{UI.init(e,t),Ot(e._zod,"values",()=>t.innerType._zod.values),Ot(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),hU=ye("$ZodNullable",(e,t)=>{Ft.init(e,t),Ot(e._zod,"optin",()=>t.innerType._zod.optin),Ot(e._zod,"optout",()=>t.innerType._zod.optout),Ot(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${jb(n.source)}|null)$`):void 0}),Ot(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),pU=ye("$ZodDefault",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",Ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>vT(i,t)):vT(a,t)}});function vT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const mU=ye("$ZodPrefault",(e,t)=>{Ft.init(e,t),e._zod.optin="optional",Ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),gU=ye("$ZodNonOptional",(e,t)=>{Ft.init(e,t),Ot(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>yT(i,e)):yT(a,e)}});function yT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const vU=ye("$ZodCatch",(e,t)=>{Ft.init(e,t),Ot(e._zod,"optin",()=>t.innerType._zod.optin),Ot(e._zod,"optout",()=>t.innerType._zod.optout),Ot(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(c=>qs(c,r,Bs()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>qs(i,r,Bs()))},input:n.value}),n.issues=[]),n)}}),yU=ye("$ZodPipe",(e,t)=>{Ft.init(e,t),Ot(e._zod,"values",()=>t.in._zod.values),Ot(e._zod,"optin",()=>t.in._zod.optin),Ot(e._zod,"optout",()=>t.out._zod.optout),Ot(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(c=>ph(c,t.in,r)):ph(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>ph(i,t.out,r)):ph(a,t.out,r)}});function ph(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const _U=ye("$ZodReadonly",(e,t)=>{Ft.init(e,t),Ot(e._zod,"propValues",()=>t.innerType._zod.propValues),Ot(e._zod,"values",()=>t.innerType._zod.values),Ot(e._zod,"optin",()=>t.innerType?._zod?.optin),Ot(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(_T):_T(a)}});function _T(e){return e.value=Object.freeze(e.value),e}const bU=ye("$ZodLazy",(e,t)=>{Ft.init(e,t),Ot(e._zod,"innerType",()=>t.getter()),Ot(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ot(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ot(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ot(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),wU=ye("$ZodCustom",(e,t)=>{cr.init(e,t),Ft.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(i=>bT(i,n,r,e));bT(a,n,r,e)}});function bT(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(id(a))}}var wT;class SU{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function EU(){return new SU}(wT=globalThis).__zod_globalRegistry??(wT.__zod_globalRegistry=EU());const $u=globalThis.__zod_globalRegistry;function RU(e,t){return new e({type:"string",...Le(t)})}function xU(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Le(t)})}function ST(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Le(t)})}function TU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Le(t)})}function OU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Le(t)})}function CU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Le(t)})}function AU(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Le(t)})}function zI(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Le(t)})}function IU(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Le(t)})}function kU(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Le(t)})}function NU(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Le(t)})}function MU(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Le(t)})}function PU(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Le(t)})}function DU(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Le(t)})}function LU(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Le(t)})}function jU(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Le(t)})}function $U(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Le(t)})}function UU(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Le(t)})}function zU(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Le(t)})}function VU(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Le(t)})}function FU(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Le(t)})}function BU(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Le(t)})}function qU(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Le(t)})}function HU(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Le(t)})}function GU(e,t){return new e({type:"string",format:"date",check:"string_format",...Le(t)})}function ZU(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Le(t)})}function WU(e,t){return new e({type:"string",format:"duration",check:"string_format",...Le(t)})}function KU(e,t){return new e({type:"number",checks:[],...Le(t)})}function YU(e,t){return new e({type:"number",coerce:!0,checks:[],...Le(t)})}function QU(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Le(t)})}function XU(e,t){return new e({type:"boolean",...Le(t)})}function JU(e,t){return new e({type:"boolean",coerce:!0,...Le(t)})}function e7(e,t){return new e({type:"undefined",...Le(t)})}function t7(e,t){return new e({type:"null",...Le(t)})}function n7(e){return new e({type:"any"})}function r7(e){return new e({type:"unknown"})}function o7(e,t){return new e({type:"never",...Le(t)})}function ET(e,t){return new NI({check:"less_than",...Le(t),value:e,inclusive:!1})}function Jy(e,t){return new NI({check:"less_than",...Le(t),value:e,inclusive:!0})}function RT(e,t){return new MI({check:"greater_than",...Le(t),value:e,inclusive:!1})}function e0(e,t){return new MI({check:"greater_than",...Le(t),value:e,inclusive:!0})}function xT(e,t){return new s9({check:"multiple_of",...Le(t),value:e})}function a7(e,t){return new c9({check:"max_size",...Le(t),maximum:e})}function s7(e,t){return new l9({check:"min_size",...Le(t),minimum:e})}function VI(e,t){return new u9({check:"max_length",...Le(t),maximum:e})}function qp(e,t){return new d9({check:"min_length",...Le(t),minimum:e})}function FI(e,t){return new f9({check:"length_equals",...Le(t),length:e})}function i7(e,t){return new h9({check:"string_format",format:"regex",...Le(t),pattern:e})}function c7(e){return new p9({check:"string_format",format:"lowercase",...Le(e)})}function l7(e){return new m9({check:"string_format",format:"uppercase",...Le(e)})}function u7(e,t){return new g9({check:"string_format",format:"includes",...Le(t),includes:e})}function d7(e,t){return new v9({check:"string_format",format:"starts_with",...Le(t),prefix:e})}function f7(e,t){return new y9({check:"string_format",format:"ends_with",...Le(t),suffix:e})}function h7(e,t){return new _9({check:"mime_type",mime:e,...Le(t)})}function Tl(e){return new b9({check:"overwrite",tx:e})}function p7(e){return Tl(t=>t.normalize(e))}function m7(){return Tl(e=>e.trim())}function g7(){return Tl(e=>e.toLowerCase())}function v7(){return Tl(e=>e.toUpperCase())}function y7(){return Tl(e=>c8(e))}function _7(e,t,n){return new e({type:"array",element:t,...Le(n)})}function b7(e,t){return new e({type:"file",...Le(t)})}function w7(e,t,n){const r=Le(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function S7(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Le(n)})}function E7(e){const t=R7(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(id(r,n.value,t._zod.def));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),n.issues.push(id(a))}},e(n.value,n)));return t}function R7(e,t){const n=new cr({check:"custom",...Le(t)});return n._zod.check=e,n}function Hp(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??$u,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function tn(e,t,n={path:[],schemaPath:[]}){var r;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const c={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,c);const u=e._zod.toJSONSchema?.();if(u)c.schema=u;else{const m={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,c.schema,m);else{const g=c.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,g,m)}const p=e._zod.parent;p&&(c.ref||(c.ref=p),tn(p,t,m),t.seen.get(p).isParent=!0)}const d=t.metadataRegistry.get(e);return d&&Object.assign(c.schema,d),t.io==="input"&&wr(e)&&(delete c.schema.examples,delete c.schema.default),t.io==="input"&&c.schema._prefault&&((r=c.schema).default??(r.default=c.schema._prefault)),delete c.schema._prefault,t.seen.get(e).schema}function Gp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of e.seen.entries()){const u=e.metadataRegistry.get(c[0])?.id;if(u){const d=r.get(u);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${u}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(u,c[0])}}const a=c=>{const u=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const p=e.external.registry.get(c[0])?.id,g=e.external.uri??(w=>w);if(p)return{ref:g(p)};const y=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=y,{defId:y,ref:`${g("__shared")}#/${u}/${y}`}}if(c[1]===n)return{ref:"#"};const f=`#/${u}/`,m=c[1].schema.id??`__schema${e.counter++}`;return{defId:m,ref:f+m}},i=c=>{if(c[1].schema.$ref)return;const u=c[1],{ref:d,defId:f}=a(c);u.def={...u.schema},f&&(u.defId=f);const m=u.schema;for(const p in m)delete m[p];m.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const u=c[1];if(u.cycle)throw new Error(`Cycle detected: #/${u.cycle?.join("/")}/<root>
47
+
48
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const u=c[1];if(t===c[0]){i(c);continue}if(e.external){const f=e.external.registry.get(c[0])?.id;if(t!==c[0]&&f){i(c);continue}}if(e.metadataRegistry.get(c[0])?.id){i(c);continue}if(u.cycle){i(c);continue}if(u.count>1&&e.reused==="ref"){i(c);continue}}}function Zp(e,t){const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=c=>{const u=e.seen.get(c);if(u.ref===null)return;const d=u.def??u.schema,f={...d},m=u.ref;if(u.ref=null,m){r(m);const g=e.seen.get(m),y=g.schema;if(y.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(y)):Object.assign(d,y),Object.assign(d,f),c._zod.parent===m)for(const b in d)b==="$ref"||b==="allOf"||b in f||delete d[b];if(y.$ref&&g.def)for(const b in d)b==="$ref"||b==="allOf"||b in g.def&&JSON.stringify(d[b])===JSON.stringify(g.def[b])&&delete d[b]}const p=c._zod.parent;if(p&&p!==m){r(p);const g=e.seen.get(p);if(g?.schema.$ref&&(d.$ref=g.schema.$ref,g.def))for(const y in d)y==="$ref"||y==="allOf"||y in g.def&&JSON.stringify(d[y])===JSON.stringify(g.def[y])&&delete d[y]}e.override({zodSchema:c,jsonSchema:d,path:u.path??[]})};for(const c of[...e.seen.entries()].reverse())r(c[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const c=e.external.registry.get(t)?.id;if(!c)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(c)}Object.assign(a,n.def??n.schema);const i=e.external?.defs??{};for(const c of e.seen.entries()){const u=c[1];u.def&&u.defId&&(i[u.defId]=u.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const c=JSON.parse(JSON.stringify(a));return Object.defineProperty(c,"~standard",{value:{...t["~standard"],jsonSchema:{input:Wp(t,"input",e.processors),output:Wp(t,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function wr(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return wr(r.element,n);if(r.type==="set")return wr(r.valueType,n);if(r.type==="lazy")return wr(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return wr(r.innerType,n);if(r.type==="intersection")return wr(r.left,n)||wr(r.right,n);if(r.type==="record"||r.type==="map")return wr(r.keyType,n)||wr(r.valueType,n);if(r.type==="pipe")return wr(r.in,n)||wr(r.out,n);if(r.type==="object"){for(const a in r.shape)if(wr(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(wr(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(wr(a,n))return!0;return!!(r.rest&&wr(r.rest,n))}return!1}const x7=(e,t={})=>n=>{const r=Hp({...n,processors:t});return tn(e,r),Gp(r,e),Zp(r,e)},Wp=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},c=Hp({...a??{},target:i,io:t,processors:n});return tn(e,c),Gp(c,e),Zp(c,e)},T7={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},BI=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:c,format:u,patterns:d,contentEncoding:f}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof c=="number"&&(a.maxLength=c),u&&(a.format=T7[u]??u,a.format===""&&delete a.format,u==="time"&&delete a.format),f&&(a.contentEncoding=f),d&&d.size>0){const m=[...d];m.length===1?a.pattern=m[0].source:m.length>1&&(a.allOf=[...m.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},qI=(e,t,n,r)=>{const a=n,{minimum:i,maximum:c,format:u,multipleOf:d,exclusiveMaximum:f,exclusiveMinimum:m}=e._zod.bag;typeof u=="string"&&u.includes("int")?a.type="integer":a.type="number",typeof m=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=m,a.exclusiveMinimum=!0):a.exclusiveMinimum=m),typeof i=="number"&&(a.minimum=i,typeof m=="number"&&t.target!=="draft-04"&&(m>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof f=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=f,a.exclusiveMaximum=!0):a.exclusiveMaximum=f),typeof c=="number"&&(a.maximum=c,typeof f=="number"&&t.target!=="draft-04"&&(f<=c?delete a.maximum:delete a.exclusiveMaximum)),typeof d=="number"&&(a.multipleOf=d)},HI=(e,t,n,r)=>{n.type="boolean"},O7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},C7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},GI=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},ZI=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},A7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},WI=(e,t,n,r)=>{n.not={}},KI=(e,t,n,r)=>{},YI=(e,t,n,r)=>{},I7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},QI=(e,t,n,r)=>{const a=e._zod.def,i=wI(a.entries);i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),n.enum=i},XI=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const c of a.values)if(c===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof c=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(c))}else i.push(c);if(i.length!==0)if(i.length===1){const c=i[0];n.type=c===null?"null":typeof c,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[c]:n.const=c}else i.every(c=>typeof c=="number")&&(n.type="number"),i.every(c=>typeof c=="string")&&(n.type="string"),i.every(c=>typeof c=="boolean")&&(n.type="boolean"),i.every(c=>c===null)&&(n.type="null"),n.enum=i},k7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},N7=(e,t,n,r)=>{const a=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");a.type="string",a.pattern=i.source},JI=(e,t,n,r)=>{const a=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:c,maximum:u,mime:d}=e._zod.bag;c!==void 0&&(i.minLength=c),u!==void 0&&(i.maxLength=u),d?d.length===1?(i.contentMediaType=d[0],Object.assign(a,i)):(Object.assign(a,i),a.anyOf=d.map(f=>({contentMediaType:f}))):Object.assign(a,i)},M7=(e,t,n,r)=>{n.type="boolean"},ek=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},P7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},tk=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},D7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},L7=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},nk=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:c,maximum:u}=e._zod.bag;typeof c=="number"&&(a.minItems=c),typeof u=="number"&&(a.maxItems=u),a.type="array",a.items=tn(i.element,t,{...r,path:[...r.path,"items"]})},rk=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object",a.properties={};const c=i.shape;for(const f in c)a.properties[f]=tn(c[f],t,{...r,path:[...r.path,"properties",f]});const u=new Set(Object.keys(c)),d=new Set([...u].filter(f=>{const m=i.shape[f]._zod;return t.io==="input"?m.optin===void 0:m.optout===void 0}));d.size>0&&(a.required=Array.from(d)),i.catchall?._zod.def.type==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=tn(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},ok=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,c=a.options.map((u,d)=>tn(u,t,{...r,path:[...r.path,i?"oneOf":"anyOf",d]}));i?n.oneOf=c:n.anyOf=c},ak=(e,t,n,r)=>{const a=e._zod.def,i=tn(a.left,t,{...r,path:[...r.path,"allOf",0]}),c=tn(a.right,t,{...r,path:[...r.path,"allOf",1]}),u=f=>"allOf"in f&&Object.keys(f).length===1,d=[...u(i)?i.allOf:[i],...u(c)?c.allOf:[c]];n.allOf=d},sk=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="array";const c=t.target==="draft-2020-12"?"prefixItems":"items",u=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",d=i.items.map((g,y)=>tn(g,t,{...r,path:[...r.path,c,y]})),f=i.rest?tn(i.rest,t,{...r,path:[...r.path,u,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(a.prefixItems=d,f&&(a.items=f)):t.target==="openapi-3.0"?(a.items={anyOf:d},f&&a.items.anyOf.push(f),a.minItems=d.length,f||(a.maxItems=d.length)):(a.items=d,f&&(a.additionalItems=f));const{minimum:m,maximum:p}=e._zod.bag;typeof m=="number"&&(a.minItems=m),typeof p=="number"&&(a.maxItems=p)},ik=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const c=i.keyType,d=c._zod.bag?.patterns;if(i.mode==="loose"&&d&&d.size>0){const m=tn(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(const p of d)a.patternProperties[p.source]=m}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=tn(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=tn(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const f=c._zod.values;if(f){const m=[...f].filter(p=>typeof p=="string"||typeof p=="number");m.length>0&&(a.required=m)}},ck=(e,t,n,r)=>{const a=e._zod.def,i=tn(a.innerType,t,r),c=t.seen.get(e);t.target==="openapi-3.0"?(c.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},lk=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},uk=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},dk=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},fk=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let c;try{c=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=c},hk=(e,t,n,r)=>{const a=e._zod.def,i=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;tn(i,t,r);const c=t.seen.get(e);c.ref=i},pk=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},j7=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},Vb=(e,t,n,r)=>{const a=e._zod.def;tn(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},mk=(e,t,n,r)=>{const a=e._zod.innerType;tn(a,t,r);const i=t.seen.get(e);i.ref=a},TT={string:BI,number:qI,boolean:HI,bigint:O7,symbol:C7,null:GI,undefined:ZI,void:A7,never:WI,any:KI,unknown:YI,date:I7,enum:QI,literal:XI,nan:k7,template_literal:N7,file:JI,success:M7,custom:ek,function:P7,transform:tk,map:D7,set:L7,array:nk,object:rk,union:ok,intersection:ak,tuple:sk,record:ik,nullable:ck,nonoptional:lk,default:uk,prefault:dk,catch:fk,pipe:hk,readonly:pk,promise:j7,optional:Vb,lazy:mk};function bae(e,t){if("_idmap"in e){const r=e,a=Hp({...t,processors:TT}),i={};for(const d of r._idmap.entries()){const[f,m]=d;tn(m,a)}const c={},u={registry:r,uri:t?.uri,defs:i};a.external=u;for(const d of r._idmap.entries()){const[f,m]=d;Gp(a,m),c[f]=Zp(a,m)}if(Object.keys(i).length>0){const d=a.target==="draft-2020-12"?"$defs":"definitions";c.__shared={[d]:i}}return{schemas:c}}const n=Hp({...t,processors:TT});return tn(e,n),Gp(n,e),Zp(n,e)}const $7=ye("ZodISODateTime",(e,t)=>{P9.init(e,t),hn.init(e,t)});function gk(e){return HU($7,e)}const U7=ye("ZodISODate",(e,t)=>{D9.init(e,t),hn.init(e,t)});function z7(e){return GU(U7,e)}const V7=ye("ZodISOTime",(e,t)=>{L9.init(e,t),hn.init(e,t)});function F7(e){return ZU(V7,e)}const B7=ye("ZodISODuration",(e,t)=>{j9.init(e,t),hn.init(e,t)});function q7(e){return WU(B7,e)}const H7=(e,t)=>{Ub.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>w8(e,n)},flatten:{value:n=>b8(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,m_,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,m_,2)}},isEmpty:{get(){return e.issues.length===0}}})},To=ye("ZodError",H7,{Parent:Error}),G7=$m(To),Z7=Um(To),W7=zm(To),K7=Vm(To),Y7=x8(To),Q7=T8(To),X7=O8(To),J7=C8(To),ez=A8(To),tz=I8(To),nz=k8(To),rz=N8(To),Zt=ye("ZodType",(e,t)=>(Ft.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Wp(e,"input"),output:Wp(e,"output")}}),e.toJSONSchema=x7(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Qs(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Xs(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>G7(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>W7(e,n,r),e.parseAsync=async(n,r)=>Z7(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>K7(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>Y7(e,n,r),e.decode=(n,r)=>Q7(e,n,r),e.encodeAsync=async(n,r)=>X7(e,n,r),e.decodeAsync=async(n,r)=>J7(e,n,r),e.safeEncode=(n,r)=>ez(e,n,r),e.safeDecode=(n,r)=>tz(e,n,r),e.safeEncodeAsync=async(n,r)=>nz(e,n,r),e.safeDecodeAsync=async(n,r)=>rz(e,n,r),e.refine=(n,r)=>e.check(Wz(n,r)),e.superRefine=n=>e.check(Kz(n)),e.overwrite=n=>e.check(Tl(n)),e.optional=()=>vn(e),e.exactOptional=()=>Dz(e),e.nullable=()=>IT(e),e.nullish=()=>vn(IT(e)),e.nonoptional=n=>Vz(e,n),e.array=()=>we(e),e.or=n=>At([e,n]),e.and=n=>Rd(e,n),e.transform=n=>y_(e,Rk(n)),e.default=n=>$z(e,n),e.prefault=n=>zz(e,n),e.catch=n=>Bz(e,n),e.pipe=n=>y_(e,n),e.readonly=()=>Gz(e),e.describe=n=>{const r=e.clone();return $u.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return $u.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return $u.get(e);const r=e.clone();return $u.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),vk=ye("_ZodString",(e,t)=>{zb.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>BI(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(i7(...r)),e.includes=(...r)=>e.check(u7(...r)),e.startsWith=(...r)=>e.check(d7(...r)),e.endsWith=(...r)=>e.check(f7(...r)),e.min=(...r)=>e.check(qp(...r)),e.max=(...r)=>e.check(VI(...r)),e.length=(...r)=>e.check(FI(...r)),e.nonempty=(...r)=>e.check(qp(1,...r)),e.lowercase=r=>e.check(c7(r)),e.uppercase=r=>e.check(l7(r)),e.trim=()=>e.check(m7()),e.normalize=(...r)=>e.check(p7(...r)),e.toLowerCase=()=>e.check(g7()),e.toUpperCase=()=>e.check(v7()),e.slugify=()=>e.check(y7())}),Bm=ye("ZodString",(e,t)=>{zb.init(e,t),vk.init(e,t),e.email=n=>e.check(xU(oz,n)),e.url=n=>e.check(zI(yk,n)),e.jwt=n=>e.check(qU(bz,n)),e.emoji=n=>e.check(IU(sz,n)),e.guid=n=>e.check(ST(OT,n)),e.uuid=n=>e.check(TU(mh,n)),e.uuidv4=n=>e.check(OU(mh,n)),e.uuidv6=n=>e.check(CU(mh,n)),e.uuidv7=n=>e.check(AU(mh,n)),e.nanoid=n=>e.check(kU(iz,n)),e.guid=n=>e.check(ST(OT,n)),e.cuid=n=>e.check(NU(cz,n)),e.cuid2=n=>e.check(MU(lz,n)),e.ulid=n=>e.check(PU(uz,n)),e.base64=n=>e.check(VU(vz,n)),e.base64url=n=>e.check(FU(yz,n)),e.xid=n=>e.check(DU(dz,n)),e.ksuid=n=>e.check(LU(fz,n)),e.ipv4=n=>e.check(jU(hz,n)),e.ipv6=n=>e.check($U(pz,n)),e.cidrv4=n=>e.check(UU(mz,n)),e.cidrv6=n=>e.check(zU(gz,n)),e.e164=n=>e.check(BU(_z,n)),e.datetime=n=>e.check(gk(n)),e.date=n=>e.check(z7(n)),e.time=n=>e.check(F7(n)),e.duration=n=>e.check(q7(n))});function M(e){return RU(Bm,e)}const hn=ye("ZodStringFormat",(e,t)=>{dn.init(e,t),vk.init(e,t)}),oz=ye("ZodEmail",(e,t)=>{x9.init(e,t),hn.init(e,t)}),OT=ye("ZodGUID",(e,t)=>{E9.init(e,t),hn.init(e,t)}),mh=ye("ZodUUID",(e,t)=>{R9.init(e,t),hn.init(e,t)}),yk=ye("ZodURL",(e,t)=>{T9.init(e,t),hn.init(e,t)});function az(e){return zI(yk,e)}const sz=ye("ZodEmoji",(e,t)=>{O9.init(e,t),hn.init(e,t)}),iz=ye("ZodNanoID",(e,t)=>{C9.init(e,t),hn.init(e,t)}),cz=ye("ZodCUID",(e,t)=>{A9.init(e,t),hn.init(e,t)}),lz=ye("ZodCUID2",(e,t)=>{I9.init(e,t),hn.init(e,t)}),uz=ye("ZodULID",(e,t)=>{k9.init(e,t),hn.init(e,t)}),dz=ye("ZodXID",(e,t)=>{N9.init(e,t),hn.init(e,t)}),fz=ye("ZodKSUID",(e,t)=>{M9.init(e,t),hn.init(e,t)}),hz=ye("ZodIPv4",(e,t)=>{$9.init(e,t),hn.init(e,t)}),pz=ye("ZodIPv6",(e,t)=>{U9.init(e,t),hn.init(e,t)}),mz=ye("ZodCIDRv4",(e,t)=>{z9.init(e,t),hn.init(e,t)}),gz=ye("ZodCIDRv6",(e,t)=>{V9.init(e,t),hn.init(e,t)}),vz=ye("ZodBase64",(e,t)=>{F9.init(e,t),hn.init(e,t)}),yz=ye("ZodBase64URL",(e,t)=>{q9.init(e,t),hn.init(e,t)}),_z=ye("ZodE164",(e,t)=>{H9.init(e,t),hn.init(e,t)}),bz=ye("ZodJWT",(e,t)=>{Z9.init(e,t),hn.init(e,t)}),Za=ye("ZodNumber",(e,t)=>{DI.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>qI(e,r,a),e.gt=(r,a)=>e.check(RT(r,a)),e.gte=(r,a)=>e.check(e0(r,a)),e.min=(r,a)=>e.check(e0(r,a)),e.lt=(r,a)=>e.check(ET(r,a)),e.lte=(r,a)=>e.check(Jy(r,a)),e.max=(r,a)=>e.check(Jy(r,a)),e.int=r=>e.check(CT(r)),e.safe=r=>e.check(CT(r)),e.positive=r=>e.check(RT(0,r)),e.nonnegative=r=>e.check(e0(0,r)),e.negative=r=>e.check(ET(0,r)),e.nonpositive=r=>e.check(Jy(0,r)),e.multipleOf=(r,a)=>e.check(xT(r,a)),e.step=(r,a)=>e.check(xT(r,a)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function $e(e){return KU(Za,e)}const wz=ye("ZodNumberFormat",(e,t)=>{W9.init(e,t),Za.init(e,t)});function CT(e){return QU(wz,e)}const _k=ye("ZodBoolean",(e,t)=>{K9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>HI(e,n,r)});function Xe(e){return XU(_k,e)}const Sz=ye("ZodUndefined",(e,t)=>{Y9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ZI(e,n)});function wae(e){return e7(Sz,e)}const Ez=ye("ZodNull",(e,t)=>{Q9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>GI(e,n,r)});function Ed(e){return t7(Ez,e)}const Rz=ye("ZodAny",(e,t)=>{X9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>KI()});function eo(){return n7(Rz)}const xz=ye("ZodUnknown",(e,t)=>{J9.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>YI()});function tt(){return r7(xz)}const Tz=ye("ZodNever",(e,t)=>{eU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>WI(e,n,r)});function Kp(e){return o7(Tz,e)}const bk=ye("ZodArray",(e,t)=>{tU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>nk(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(qp(n,r)),e.nonempty=n=>e.check(qp(1,n)),e.max=(n,r)=>e.check(VI(n,r)),e.length=(n,r)=>e.check(FI(n,r)),e.unwrap=()=>e.element});function we(e,t){return _7(bk,e,t)}const qm=ye("ZodObject",(e,t)=>{rU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rk(e,n,r,a),Ot(e,"shape",()=>t.shape),e.keyof=()=>It(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:tt()}),e.loose=()=>e.clone({...e._zod.def,catchall:tt()}),e.strict=()=>e.clone({...e._zod.def,catchall:Kp()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>m8(e,n),e.safeExtend=n=>g8(e,n),e.merge=n=>v8(e,n),e.pick=n=>h8(e,n),e.omit=n=>p8(e,n),e.partial=(...n)=>y8(xk,e,n[0]),e.required=(...n)=>_8(Tk,e,n[0])});function ie(e,t){const n={type:"object",shape:e??{},...Le(t)};return new qm(n)}function Sae(e,t){return new qm({type:"object",shape:e,catchall:Kp(),...Le(t)})}function sr(e,t){return new qm({type:"object",shape:e,catchall:tt(),...Le(t)})}const wk=ye("ZodUnion",(e,t)=>{$I.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ok(e,n,r,a),e.options=t.options});function At(e,t){return new wk({type:"union",options:e,...Le(t)})}const Oz=ye("ZodDiscriminatedUnion",(e,t)=>{wk.init(e,t),oU.init(e,t)});function Sk(e,t,n){return new Oz({type:"union",options:t,discriminator:e,...Le(n)})}const Cz=ye("ZodIntersection",(e,t)=>{aU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ak(e,n,r,a)});function Rd(e,t){return new Cz({type:"intersection",left:e,right:t})}const Az=ye("ZodTuple",(e,t)=>{sU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>sk(e,n,r,a),e.rest=n=>e.clone({...e._zod.def,rest:n})});function AT(e,t,n){const r=t instanceof Ft,a=r?n:t,i=r?t:null;return new Az({type:"tuple",items:e,rest:i,...Le(a)})}const Ek=ye("ZodRecord",(e,t)=>{iU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ik(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function it(e,t,n){return new Ek({type:"record",keyType:e,valueType:t,...Le(n)})}const v_=ye("ZodEnum",(e,t)=>{cU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(r,a,i)=>QI(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const i={};for(const c of r)if(n.has(c))i[c]=t.entries[c];else throw new Error(`Key ${c} not found in enum`);return new v_({...t,checks:[],...Le(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const c of r)if(n.has(c))delete i[c];else throw new Error(`Key ${c} not found in enum`);return new v_({...t,checks:[],...Le(a),entries:i})}});function It(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new v_({type:"enum",entries:n,...Le(t)})}const Iz=ye("ZodLiteral",(e,t)=>{lU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>XI(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function je(e,t){return new Iz({type:"literal",values:Array.isArray(e)?e:[e],...Le(t)})}const kz=ye("ZodFile",(e,t)=>{uU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>JI(e,n,r),e.min=(n,r)=>e.check(s7(n,r)),e.max=(n,r)=>e.check(a7(n,r)),e.mime=(n,r)=>e.check(h7(Array.isArray(n)?n:[n],r))});function Nz(e){return b7(kz,e)}const Mz=ye("ZodTransform",(e,t)=>{dU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>tk(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new _I(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(id(i,n.value,t));else{const c=i;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),c.input??(c.input=n.value),c.inst??(c.inst=e),n.issues.push(id(c))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function Rk(e){return new Mz({type:"transform",transform:e})}const xk=ye("ZodOptional",(e,t)=>{UI.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Vb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vn(e){return new xk({type:"optional",innerType:e})}const Pz=ye("ZodExactOptional",(e,t)=>{fU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>Vb(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Dz(e){return new Pz({type:"optional",innerType:e})}const Lz=ye("ZodNullable",(e,t)=>{hU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ck(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function IT(e){return new Lz({type:"nullable",innerType:e})}const jz=ye("ZodDefault",(e,t)=>{pU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function $z(e,t){return new jz({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():EI(t)}})}const Uz=ye("ZodPrefault",(e,t)=>{mU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function zz(e,t){return new Uz({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():EI(t)}})}const Tk=ye("ZodNonOptional",(e,t)=>{gU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>lk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Vz(e,t){return new Tk({type:"nonoptional",innerType:e,...Le(t)})}const Fz=ye("ZodCatch",(e,t)=>{vU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>fk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Bz(e,t){return new Fz({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const qz=ye("ZodPipe",(e,t)=>{yU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hk(e,n,r,a),e.in=t.in,e.out=t.out});function y_(e,t){return new qz({type:"pipe",in:e,out:t})}const Hz=ye("ZodReadonly",(e,t)=>{_U.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>pk(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Gz(e){return new Hz({type:"readonly",innerType:e})}const Zz=ye("ZodLazy",(e,t)=>{bU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mk(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function oo(e){return new Zz({type:"lazy",getter:e})}const Fb=ye("ZodCustom",(e,t)=>{wU.init(e,t),Zt.init(e,t),e._zod.processJSONSchema=(n,r,a)=>ek(e,n)});function Ok(e,t){return w7(Fb,e??(()=>!0),t)}function Wz(e,t={}){return S7(Fb,e,t)}function Kz(e){return E7(e)}function Eae(e,t={}){const n=new Fb({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Le(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}function Bb(e,t){return y_(Rk(e),t)}const Yz={custom:"custom"};function Ck(e){return YU(Za,e)}function kT(e){return JU(_k,e)}function Ae(...e){return yI(Pb(e))}function Qz(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function En({error:e,localization:t,localizeErrors:n=!0}){var r;const a="Request failed";if(!n)return e?.message?e.message:(r=e?.error)!=null&&r.message?e.error.message:a;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||a}function Wi(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function __(e,t){for(const n in e)if(e[n]===t)return n}function cd(e,t){let n=M().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(n=n.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(n=n.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(n=n.regex(e.regex,{message:t?.INVALID_PASSWORD})),n}var Xz={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},Jz={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},eV={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},tV={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},nV={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},rV={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},oV={...nV,...rV},aV={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},sV={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},iV={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},cV={INVALID_SESSION_TOKEN:"Invalid session token"},lV={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},uV={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},dV={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},fV={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},hV={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},pV={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},mV={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},gV={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...tV,...Xz,...Jz,...eV,...oV,...aV,...sV,...iV,...cV,...lV,...uV,...dV,...fV,...hV,...pV,...mV},vV={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},NT={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},MT={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};function yV(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const _V=e=>{switch(e){case"success":return SV;case"info":return RV;case"warning":return EV;case"error":return xV;default:return null}},bV=Array(12).fill(0),wV=({visible:e,className:t})=>ee.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},ee.createElement("div",{className:"sonner-spinner"},bV.map((n,r)=>ee.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),SV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),EV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),RV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),xV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ee.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),TV=ee.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ee.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ee.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),OV=()=>{const[e,t]=ee.useState(document.hidden);return ee.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let b_=1;class CV{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...a}=t,i=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:b_++,c=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),c?this.toasts=this.toasts.map(d=>d.id===i?(this.publish({...d,...t,id:i,title:r}),{...d,...t,id:i,dismissible:u,title:r}):d):this.addToast({title:r,...a,dismissible:u,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let i=r!==void 0,c;const u=a.then(async f=>{if(c=["resolve",f],ee.isValidElement(f))i=!1,this.create({id:r,type:"default",message:f});else if(IV(f)&&!f.ok){i=!1;const p=typeof n.error=="function"?await n.error(`HTTP error! status: ${f.status}`):n.error,g=typeof n.description=="function"?await n.description(`HTTP error! status: ${f.status}`):n.description,w=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...w})}else if(f instanceof Error){i=!1;const p=typeof n.error=="function"?await n.error(f):n.error,g=typeof n.description=="function"?await n.description(f):n.description,w=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"error",description:g,...w})}else if(n.success!==void 0){i=!1;const p=typeof n.success=="function"?await n.success(f):n.success,g=typeof n.description=="function"?await n.description(f):n.description,w=typeof p=="object"&&!ee.isValidElement(p)?p:{message:p};this.create({id:r,type:"success",description:g,...w})}}).catch(async f=>{if(c=["reject",f],n.error!==void 0){i=!1;const m=typeof n.error=="function"?await n.error(f):n.error,p=typeof n.description=="function"?await n.description(f):n.description,y=typeof m=="object"&&!ee.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:p,...y})}}).finally(()=>{i&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),d=()=>new Promise((f,m)=>u.then(()=>c[0]==="reject"?m(c[1]):f(c[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,n)=>{const r=n?.id||b_++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Dr=new CV,AV=(e,t)=>{const n=t?.id||b_++;return Dr.addToast({title:e,...t,id:n}),n},IV=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",kV=AV,NV=()=>Dr.toasts,MV=()=>Dr.getActiveToasts(),PT=Object.assign(kV,{success:Dr.success,info:Dr.info,warning:Dr.warning,error:Dr.error,custom:Dr.custom,message:Dr.message,promise:Dr.promise,dismiss:Dr.dismiss,loading:Dr.loading},{getHistory:NV,getToasts:MV});yV("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function gh(e){return e.label!==void 0}const PV=3,DV="24px",LV="16px",DT=4e3,jV=356,$V=14,UV=45,zV=200;function ta(...e){return e.filter(Boolean).join(" ")}function VV(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const FV=e=>{var t,n,r,a,i,c,u,d,f;const{invert:m,toast:p,unstyled:g,interacting:y,setHeights:w,visibleToasts:b,heights:S,index:R,toasts:E,expanded:T,removeToast:O,defaultRichColors:C,closeButton:I,style:k,cancelButtonStyle:P,actionButtonStyle:$,className:W="",descriptionClassName:V="",duration:G,position:U,gap:J,expandByDefault:le,classNames:F,icons:Y,closeButtonAriaLabel:se="Close toast"}=e,[fe,K]=ee.useState(null),[D,q]=ee.useState(null),[B,L]=ee.useState(!1),[z,Q]=ee.useState(!1),[me,ve]=ee.useState(!1),[Ce,Ie]=ee.useState(!1),[H,re]=ee.useState(!1),[_e,ae]=ee.useState(0),[ue,Oe]=ee.useState(0),Pe=ee.useRef(p.duration||G||DT),Je=ee.useRef(null),Be=ee.useRef(null),Ke=R===0,Z=R+1<=b,te=p.type,oe=p.dismissible!==!1,Se=p.className||"",xe=p.descriptionClassName||"",Re=ee.useMemo(()=>S.findIndex(He=>He.toastId===p.id)||0,[S,p.id]),Ne=ee.useMemo(()=>{var He;return(He=p.closeButton)!=null?He:I},[p.closeButton,I]),et=ee.useMemo(()=>p.duration||G||DT,[p.duration,G]),st=ee.useRef(0),Pt=ee.useRef(0),dr=ee.useRef(0),nn=ee.useRef(null),[Rn,rn]=U.split("-"),$n=ee.useMemo(()=>S.reduce((He,ft,Xt)=>Xt>=Re?He:He+ft.height,0),[S,Re]),xn=OV(),Qa=p.invert||m,ga=te==="loading";Pt.current=ee.useMemo(()=>Re*J+$n,[Re,$n]),ee.useEffect(()=>{Pe.current=et},[et]),ee.useEffect(()=>{L(!0)},[]),ee.useEffect(()=>{const He=Be.current;if(He){const ft=He.getBoundingClientRect().height;return Oe(ft),w(Xt=>[{toastId:p.id,height:ft,position:p.position},...Xt]),()=>w(Xt=>Xt.filter(Wt=>Wt.toastId!==p.id))}},[w,p.id]),ee.useLayoutEffect(()=>{if(!B)return;const He=Be.current,ft=He.style.height;He.style.height="auto";const Xt=He.getBoundingClientRect().height;He.style.height=ft,Oe(Xt),w(Wt=>Wt.find(Lt=>Lt.toastId===p.id)?Wt.map(Lt=>Lt.toastId===p.id?{...Lt,height:Xt}:Lt):[{toastId:p.id,height:Xt,position:p.position},...Wt])},[B,p.title,p.description,w,p.id,p.jsx,p.action,p.cancel]);const qe=ee.useCallback(()=>{Q(!0),ae(Pt.current),w(He=>He.filter(ft=>ft.toastId!==p.id)),setTimeout(()=>{O(p)},zV)},[p,O,w,Pt]);ee.useEffect(()=>{if(p.promise&&te==="loading"||p.duration===1/0||p.type==="loading")return;let He;return T||y||xn?(()=>{if(dr.current<st.current){const Wt=new Date().getTime()-st.current;Pe.current=Pe.current-Wt}dr.current=new Date().getTime()})():Pe.current!==1/0&&(st.current=new Date().getTime(),He=setTimeout(()=>{p.onAutoClose==null||p.onAutoClose.call(p,p),qe()},Pe.current)),()=>clearTimeout(He)},[T,y,p,te,xn,qe]),ee.useEffect(()=>{p.delete&&(qe(),p.onDismiss==null||p.onDismiss.call(p,p))},[qe,p.delete]);function Et(){var He;if(Y?.loading){var ft;return ee.createElement("div",{className:ta(F?.loader,p==null||(ft=p.classNames)==null?void 0:ft.loader,"sonner-loader"),"data-visible":te==="loading"},Y.loading)}return ee.createElement(wV,{className:ta(F?.loader,p==null||(He=p.classNames)==null?void 0:He.loader),visible:te==="loading"})}const kt=p.icon||Y?.[te]||_V(te);var dt,Dt;return ee.createElement("li",{tabIndex:0,ref:Be,className:ta(W,Se,F?.toast,p==null||(t=p.classNames)==null?void 0:t.toast,F?.default,F?.[te],p==null||(n=p.classNames)==null?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":(dt=p.richColors)!=null?dt:C,"data-styled":!(p.jsx||p.unstyled||g),"data-mounted":B,"data-promise":!!p.promise,"data-swiped":H,"data-removed":z,"data-visible":Z,"data-y-position":Rn,"data-x-position":rn,"data-index":R,"data-front":Ke,"data-swiping":me,"data-dismissible":oe,"data-type":te,"data-invert":Qa,"data-swipe-out":Ce,"data-swipe-direction":D,"data-expanded":!!(T||le&&B),"data-testid":p.testId,style:{"--index":R,"--toasts-before":R,"--z-index":E.length-R,"--offset":`${z?_e:Pt.current}px`,"--initial-height":le?"auto":`${ue}px`,...k,...p.style},onDragEnd:()=>{ve(!1),K(null),nn.current=null},onPointerDown:He=>{He.button!==2&&(ga||!oe||(Je.current=new Date,ae(Pt.current),He.target.setPointerCapture(He.pointerId),He.target.tagName!=="BUTTON"&&(ve(!0),nn.current={x:He.clientX,y:He.clientY})))},onPointerUp:()=>{var He,ft,Xt;if(Ce||!oe)return;nn.current=null;const Wt=Number(((He=Be.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),fr=Number(((ft=Be.current)==null?void 0:ft.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Lt=new Date().getTime()-((Xt=Je.current)==null?void 0:Xt.getTime()),on=fe==="x"?Wt:fr,io=Math.abs(on)/Lt;if(Math.abs(on)>=UV||io>.11){ae(Pt.current),p.onDismiss==null||p.onDismiss.call(p,p),q(fe==="x"?Wt>0?"right":"left":fr>0?"down":"up"),qe(),Ie(!0);return}else{var Qn,xr;(Qn=Be.current)==null||Qn.style.setProperty("--swipe-amount-x","0px"),(xr=Be.current)==null||xr.style.setProperty("--swipe-amount-y","0px")}re(!1),ve(!1),K(null)},onPointerMove:He=>{var ft,Xt,Wt;if(!nn.current||!oe||((ft=window.getSelection())==null?void 0:ft.toString().length)>0)return;const Lt=He.clientY-nn.current.y,on=He.clientX-nn.current.x;var io;const Qn=(io=e.swipeDirections)!=null?io:VV(U);!fe&&(Math.abs(on)>1||Math.abs(Lt)>1)&&K(Math.abs(on)>Math.abs(Lt)?"x":"y");let xr={x:0,y:0};const Xi=Io=>1/(1.5+Math.abs(Io)/20);if(fe==="y"){if(Qn.includes("top")||Qn.includes("bottom"))if(Qn.includes("top")&&Lt<0||Qn.includes("bottom")&&Lt>0)xr.y=Lt;else{const Io=Lt*Xi(Lt);xr.y=Math.abs(Io)<Math.abs(Lt)?Io:Lt}}else if(fe==="x"&&(Qn.includes("left")||Qn.includes("right")))if(Qn.includes("left")&&on<0||Qn.includes("right")&&on>0)xr.x=on;else{const Io=on*Xi(on);xr.x=Math.abs(Io)<Math.abs(on)?Io:on}(Math.abs(xr.x)>0||Math.abs(xr.y)>0)&&re(!0),(Xt=Be.current)==null||Xt.style.setProperty("--swipe-amount-x",`${xr.x}px`),(Wt=Be.current)==null||Wt.style.setProperty("--swipe-amount-y",`${xr.y}px`)}},Ne&&!p.jsx&&te!=="loading"?ee.createElement("button",{"aria-label":se,"data-disabled":ga,"data-close-button":!0,onClick:ga||!oe?()=>{}:()=>{qe(),p.onDismiss==null||p.onDismiss.call(p,p)},className:ta(F?.closeButton,p==null||(r=p.classNames)==null?void 0:r.closeButton)},(Dt=Y?.close)!=null?Dt:TV):null,(te||p.icon||p.promise)&&p.icon!==null&&(Y?.[te]!==null||p.icon)?ee.createElement("div",{"data-icon":"",className:ta(F?.icon,p==null||(a=p.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Et():null,p.type!=="loading"?kt:null):null,ee.createElement("div",{"data-content":"",className:ta(F?.content,p==null||(i=p.classNames)==null?void 0:i.content)},ee.createElement("div",{"data-title":"",className:ta(F?.title,p==null||(c=p.classNames)==null?void 0:c.title)},p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title),p.description?ee.createElement("div",{"data-description":"",className:ta(V,xe,F?.description,p==null||(u=p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),ee.isValidElement(p.cancel)?p.cancel:p.cancel&&gh(p.cancel)?ee.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||P,onClick:He=>{gh(p.cancel)&&oe&&(p.cancel.onClick==null||p.cancel.onClick.call(p.cancel,He),qe())},className:ta(F?.cancelButton,p==null||(d=p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,ee.isValidElement(p.action)?p.action:p.action&&gh(p.action)?ee.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||$,onClick:He=>{gh(p.action)&&(p.action.onClick==null||p.action.onClick.call(p.action,He),!He.defaultPrevented&&qe())},className:ta(F?.actionButton,p==null||(f=p.classNames)==null?void 0:f.actionButton)},p.action.label):null)};function LT(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function BV(e,t){const n={};return[e,t].forEach((r,a)=>{const i=a===1,c=i?"--mobile-offset":"--offset",u=i?LV:DV;function d(f){["top","right","bottom","left"].forEach(m=>{n[`${c}-${m}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${c}-${f}`]=u:n[`${c}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):d(u)}),n}const qV=ee.forwardRef(function(t,n){const{id:r,invert:a,position:i="bottom-right",hotkey:c=["altKey","KeyT"],expand:u,closeButton:d,className:f,offset:m,mobileOffset:p,theme:g="light",richColors:y,duration:w,style:b,visibleToasts:S=PV,toastOptions:R,dir:E=LT(),gap:T=$V,icons:O,containerAriaLabel:C="Notifications"}=t,[I,k]=ee.useState([]),P=ee.useMemo(()=>r?I.filter(B=>B.toasterId===r):I.filter(B=>!B.toasterId),[I,r]),$=ee.useMemo(()=>Array.from(new Set([i].concat(P.filter(B=>B.position).map(B=>B.position)))),[P,i]),[W,V]=ee.useState([]),[G,U]=ee.useState(!1),[J,le]=ee.useState(!1),[F,Y]=ee.useState(g!=="system"?g:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),se=ee.useRef(null),fe=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=ee.useRef(null),D=ee.useRef(!1),q=ee.useCallback(B=>{k(L=>{var z;return(z=L.find(Q=>Q.id===B.id))!=null&&z.delete||Dr.dismiss(B.id),L.filter(({id:Q})=>Q!==B.id)})},[]);return ee.useEffect(()=>Dr.subscribe(B=>{if(B.dismiss){requestAnimationFrame(()=>{k(L=>L.map(z=>z.id===B.id?{...z,delete:!0}:z))});return}setTimeout(()=>{VA.flushSync(()=>{k(L=>{const z=L.findIndex(Q=>Q.id===B.id);return z!==-1?[...L.slice(0,z),{...L[z],...B},...L.slice(z+1)]:[B,...L]})})})}),[I]),ee.useEffect(()=>{if(g!=="system"){Y(g);return}if(g==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;const B=window.matchMedia("(prefers-color-scheme: dark)");try{B.addEventListener("change",({matches:L})=>{Y(L?"dark":"light")})}catch{B.addListener(({matches:z})=>{try{Y(z?"dark":"light")}catch(Q){console.error(Q)}})}},[g]),ee.useEffect(()=>{I.length<=1&&U(!1)},[I]),ee.useEffect(()=>{const B=L=>{var z;if(c.every(ve=>L[ve]||L.code===ve)){var me;U(!0),(me=se.current)==null||me.focus()}L.code==="Escape"&&(document.activeElement===se.current||(z=se.current)!=null&&z.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",B),()=>document.removeEventListener("keydown",B)},[c]),ee.useEffect(()=>{if(se.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,D.current=!1)}},[se.current]),ee.createElement("section",{ref:n,"aria-label":`${C} ${fe}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},$.map((B,L)=>{var z;const[Q,me]=B.split("-");return P.length?ee.createElement("ol",{key:B,dir:E==="auto"?LT():E,tabIndex:-1,ref:se,className:f,"data-sonner-toaster":!0,"data-sonner-theme":F,"data-y-position":Q,"data-x-position":me,style:{"--front-toast-height":`${((z=W[0])==null?void 0:z.height)||0}px`,"--width":`${jV}px`,"--gap":`${T}px`,...b,...BV(m,p)},onBlur:ve=>{D.current&&!ve.currentTarget.contains(ve.relatedTarget)&&(D.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||D.current||(D.current=!0,K.current=ve.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{J||U(!1)},onDragEnd:()=>U(!1),onPointerDown:ve=>{ve.target instanceof HTMLElement&&ve.target.dataset.dismissible==="false"||le(!0)},onPointerUp:()=>le(!1)},P.filter(ve=>!ve.position&&L===0||ve.position===B).map((ve,Ce)=>{var Ie,H;return ee.createElement(FV,{key:ve.id,icons:O,index:Ce,toast:ve,defaultRichColors:y,duration:(Ie=R?.duration)!=null?Ie:w,className:R?.className,descriptionClassName:R?.descriptionClassName,invert:a,visibleToasts:S,closeButton:(H=R?.closeButton)!=null?H:d,interacting:J,position:B,style:R?.style,unstyled:R?.unstyled,classNames:R?.classNames,cancelButtonStyle:R?.cancelButtonStyle,actionButtonStyle:R?.actionButtonStyle,closeButtonAriaLabel:R?.closeButtonAriaLabel,removeToast:q,toasts:P.filter(re=>re.position==ve.position),heights:W.filter(re=>re.position==ve.position),setHeights:V,expandByDefault:u,gap:T,expanded:G,swipeDirections:t.swipeDirections})})):null}))}),Ak=A.createContext({});function Ik(){return A.useContext(Ak)}var t0,jT;function HV(){if(jT)return t0;jT=1;var e=function(){};return t0=e,t0}var GV=HV();const ZV=Ga(GV);function WV({async:e,appendTo:t,defer:n,id:r,nonce:a,src:i}){const c=document.createElement("script");e!==void 0&&(c.async=e),n!==void 0&&(c.defer=n),r&&(c.id=r),a&&c.setAttribute("nonce",a),c.src=i,(t==="head"?document.head:document.body).appendChild(c)}var KV=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};let Ku=null,ld=!1;const Yp=new Set,Qp=new Set,YV=typeof window<"u",cl="___grecaptcha_cfg",kk=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function QV(){if(!YV)return;function e(n){if(ld)n();else{window[cl]||(window[cl]={});const r=window[cl];r.fns||(r.fns=[]),r.fns.push(n)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){ld=!0;for(const n of Qp)n();Qp.clear()}window[kk]=t}function XV({language:e,onLoadCallbackName:t,render:n,useEnterprise:r=!1,useRecaptchaNet:a=!1}){const i=a?"recaptcha.net":"google.com",c=r?"enterprise.js":"api.js",u=new URLSearchParams({render:n});return t&&u.set("onload",t),e&&u.set("hl",e),`https://www.${i}/recaptcha/${c}?${u.toString()}`}function JV({language:e,render:t,scriptProps:n,useEnterprise:r,useRecaptchaNet:a}){const i={id:"google-recaptcha-v3"},c=XV({language:e,onLoadCallbackName:kk,render:t,useEnterprise:r,useRecaptchaNet:a});if(Ku){if(Ku!==c)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}Ku=c,WV(Object.assign(Object.assign(Object.assign({},i),n),{src:c}))}function eF(e){if(!window[cl])return;const t=window[cl];t.clients&&delete t.clients[e]}function tF(e,t){var{onLoadCallback:n,onLoadCallbackName:r}=t,a=KV(t,["onLoadCallback","onLoadCallbackName"]);if(Yp.size===0&&QV(),JV(a),Yp.add(e),n&&(ld?n():Qp.add(n)),r){let i=function(){if(!r)return;const c=window[r];typeof c=="function"&&c()};ld?i():Qp.add(i)}}function nF(e){var t,n,r;Yp.delete(e),Yp.size===0&&(window.grecaptcha=void 0,window[cl]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(n=document.querySelector(`script[src="${Ku}"]`))===null||n===void 0||n.remove(),(r=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||r===void 0||r.remove(),Ku=null,ld=!1)}let $T=!1;function rF({container:e,children:t,language:n,reCaptchaKey:r,scriptProps:a,useEnterprise:i,useRecaptchaNet:c}){var u,d,f,m,p,g,y;const w=A.useId(),[b,S]=A.useState(null),[R,E]=A.useState(null),T=A.useRef(!1);A.useEffect(()=>{function k(){var P;const $=i?(P=window.grecaptcha)===null||P===void 0?void 0:P.enterprise:window.grecaptcha;if(!$)throw new Error("reCAPTCHA not found");if(!$.ready)throw new Error("reCAPTCHA ready callback not found");$.ready(()=>{S($)})}return tF(w,{language:n,onLoadCallback:k,onLoadCallbackName:a?.onLoadCallbackName,render:e?.element?"explicit":r,scriptProps:{appendTo:a?.appendTo,async:a?.async,defer:a?.defer,id:a?.id,nonce:a?.nonce},useEnterprise:i,useRecaptchaNet:c}),()=>{nF(w),S(null)}},[e?.element,w,n,r,a?.appendTo,a?.async,a?.defer,a?.id,a?.nonce,a?.onLoadCallbackName,i,c]),A.useEffect(()=>{var k,P,$;if(!e?.element||!b?.render)return;const W={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((k=e.parameters)===null||k===void 0?void 0:k.badge)||"inline",callback:e.parameters.callback,sitekey:r,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},V=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!V)throw new Error("reCAPTCHA container element not found");const G=b.render(V,W);return!((P=e?.parameters)===null||P===void 0)&&P.hidden&&($T||(ZV(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),$T=!0),($=V.querySelector(".grecaptcha-badge"))===null||$===void 0||$.style.setProperty("display","none")),E(G),T.current=!0,()=>{E(null),T.current=!1,eF(G),V.innerHTML=""}},[e?.element,(u=e?.parameters)===null||u===void 0?void 0:u.badge,(d=e?.parameters)===null||d===void 0?void 0:d.hidden,(f=e?.parameters)===null||f===void 0?void 0:f.callback,(m=e?.parameters)===null||m===void 0?void 0:m.errorCallback,(p=e?.parameters)===null||p===void 0?void 0:p.expiredCallback,(g=e?.parameters)===null||g===void 0?void 0:g.tabindex,(y=e?.parameters)===null||y===void 0?void 0:y.theme,b,r]);const O=!!e?.element,C=O?R:r,I=A.useMemo(()=>C!==null&&b?.execute?k=>{if(C===null||!b?.execute)throw new Error("reCAPTCHA has not been loaded");return O&&!T.current?(console.warn("Client ID not mounted"),null):b.execute(C,{action:k})}:void 0,[C,b,O]);return x.jsx(Ak.Provider,{value:{container:e?.element,executeRecaptcha:I,reCaptchaInstance:b},children:t})}var oF=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const n={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,n),this.notify(e)}setRefetching(e,t){const n=this.cache.get(e);n&&(n.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const n of t)this.notify(n)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const n=this.listeners.get(e);n&&(n.delete(t),n.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const n=Array.from(t);for(const r of n)r()}}},_o=new oF;function aF(){return()=>{}}function Wa(){return A.useSyncExternalStore(aF,()=>!0,()=>!1)}function Nk(){const[e,t]=A.useState();return A.useEffect(()=>{const n=()=>{const a=document.documentElement.getAttribute("lang");t(a??void 0)};n();const r=new MutationObserver(a=>{for(const i of a)i.attributeName==="lang"&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{lang:e}}function qb(){const[e,t]=A.useState("light");return A.useEffect(()=>{const n=()=>{var a;const i=document.documentElement.classList.contains("dark")||((a=document.documentElement.getAttribute("style"))==null?void 0:a.includes("color-scheme: dark"));t(i?"dark":"light")};n();const r=new MutationObserver(a=>{for(const i of a)(i.attributeName==="style"||i.attributeName==="class")&&n()});return r.observe(document.documentElement,{attributes:!0}),()=>{r.disconnect()}},[]),{theme:e}}function sF({children:e}){const t=Wa(),{captcha:n}=A.useContext(gt);return n?.provider!=="google-recaptcha-v3"?e:x.jsxs(rF,{reCaptchaKey:n.siteKey,useEnterprise:n.enterprise,useRecaptchaNet:n.recaptchaNet,children:[t&&x.jsx("style",{children:`
49
+ .grecaptcha-badge {
50
+ visibility: hidden;
51
+ border-radius: var(--radius) !important;
52
+ --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
53
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
54
+ border-style: var(--tw-border-style) !important;
55
+ border-width: 1px;
56
+ }
57
+
58
+ .dark .grecaptcha-badge {
59
+ border-color: var(--input) !important;
60
+ }
61
+ `}),x.jsx(iF,{}),e]})}function iF(){const{executeRecaptcha:e}=Ik(),{theme:t}=qb(),{lang:n}=Nk();return A.useEffect(()=>{if(!e)return;(async()=>{const a=document.querySelector("iframe[title='reCAPTCHA']");if(a){const i=new URL(a.src);i.searchParams.set("theme",t),n&&i.searchParams.set("hl",n),a.src=i.toString()}})()},[e,t,n]),null}function cF({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:n,useListOrganizations:r}}=A.useContext(gt),{pathMode:a,slug:i}=t||{};let c,u,d,f;const{data:m,isPending:p,isRefetching:g}=r();if(a==="slug"){const y=e||i;c=m?.find(w=>w.slug===y),u=p,d=g}else{const{data:y,isPending:w,isRefetching:b,refetch:S}=n();f=S,c=y,u=w,d=b}return A.useMemo(()=>({data:c,isPending:u,isRefetching:d,refetch:f}),[c,u,d,f])}var lF=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:n,navigate:r,redirectTo:a}=A.useContext(gt),{slug:i,pathMode:c,personalPath:u}=n||{},{data:d}=t(),{data:f,isPending:m,isRefetching:p,refetch:g}=cF(),{refetch:y}=e(),{data:w}=e();return A.useEffect(()=>{d?.user.id&&(f||w)&&(g?.(),y?.())},[d?.user.id]),A.useEffect(()=>{p||m||i&&c==="slug"&&!f&&r(u||a)},[f,p,m,i,c,u,r,a]),null},uF=({href:e,className:t,children:n})=>x.jsx("a",{className:t,href:e,children:n}),dF=e=>{window.location.href=e},fF=e=>{window.location.replace(e)},hF=({variant:e="default",message:t})=>{e==="default"?PT(t):PT[e](t)},gt=A.createContext({}),pF=({children:e,authClient:t,account:n,avatar:r,deleteUser:a,social:i,genericOAuth:c,basePath:u="/auth",baseURL:d="",captcha:f,redirectTo:m="/",credentials:p,changeEmail:g=!0,freshAge:y=3600*24,hooks:w,mutators:b,localization:S,localizeErrors:R=!0,nameRequired:E=!0,organization:T,teams:O,signUp:C=!0,toast:I=hF,viewPaths:k,navigate:P,replace:$,Link:W=uF,emailVerification:V,...G})=>{const U=t,J=A.useMemo(()=>{if(r)return r===!0?{extension:"png",size:128}:{upload:r.upload,delete:r.delete,extension:r.extension||"png",size:r.size||(r.upload?256:128),Image:r.Image}},[r]),le=A.useMemo(()=>{if(V)return V===!0?{otp:!1}:{otp:V.otp??!1}},[V]),F=A.useMemo(()=>{var H;return n===!1?void 0:n===!0||n===void 0?{basePath:"/account",fields:["image","name"],viewPaths:NT}:{basePath:((H=n.basePath)!=null&&H.endsWith("/")?n.basePath.slice(0,-1):n.basePath)??"/account",fields:n.fields||["image","name"],viewPaths:{...NT,...n.viewPaths}}},[n]),Y=A.useMemo(()=>{if(a)return a===!0?{}:a},[a]),se=A.useMemo(()=>{if(i)return i},[i]),fe=A.useMemo(()=>{if(c)return c},[c]),K=A.useMemo(()=>{if(p!==!1)return p===!0?{forgotPassword:!0,usernameRequired:!0}:{...p,forgotPassword:p?.forgotPassword??!0,usernameRequired:p?.usernameRequired??!0}},[p]),D=A.useMemo(()=>{if(C!==!1)return C===!0||C===void 0?{fields:["name"]}:{fields:C.fields||["name"]}},[C]),q=A.useMemo(()=>{var H;if(!T)return;if(T===!0)return{basePath:"/organization",viewPaths:MT,customRoles:[]};let re;T.logo===!0?re={extension:"png",size:128}:T.logo&&(re={upload:T.logo.upload,delete:T.logo.delete,extension:T.logo.extension||"png",size:T.logo.size||(T.logo.upload?256:128)});const _e=(H=T.basePath)!=null&&H.endsWith("/")?T.basePath.slice(0,-1):T.basePath;return{...T,logo:re,basePath:_e??"/organization",customRoles:T.customRoles||[],viewPaths:{...MT,...T.viewPaths}}},[T]),B=A.useMemo(()=>{var H,re;if(!(!O||!q))return O===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:O.enabled??!0,customRoles:O.customRoles||[],colors:{count:((H=O.colors)==null?void 0:H.count)??5,prefix:((re=O.colors)==null?void 0:re.prefix)??"team"}}},[O,q]),L=A.useMemo(()=>({deleteApiKey:H=>U.apiKey.delete({...H,fetchOptions:{throw:!0}}),deletePasskey:H=>U.passkey.deletePasskey({...H,fetchOptions:{throw:!0}}),revokeDeviceSession:H=>U.multiSession.revoke({...H,fetchOptions:{throw:!0}}),revokeSession:H=>U.revokeSession({...H,fetchOptions:{throw:!0}}),setActiveSession:H=>U.multiSession.setActive({...H,fetchOptions:{throw:!0}}),updateOrganization:H=>U.organization.update({...H,fetchOptions:{throw:!0}}),updateTeam:H=>U.$fetch("/organization/update-team",{method:"POST",body:H,throw:!0}),updateUser:H=>U.updateUser({...H,fetchOptions:{throw:!0}}),unlinkAccount:H=>U.unlinkAccount({...H,fetchOptions:{throw:!0}})}),[U]),z=A.useMemo(()=>({useSession:U.useSession,useListAccounts:()=>Zr({queryFn:U.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:H=>Zr({queryFn:()=>U.accountInfo(H),cacheKey:`accountInfo:${JSON.stringify(H)}`}),useListDeviceSessions:()=>Zr({queryFn:U.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Zr({queryFn:U.listSessions,cacheKey:"listSessions"}),useListPasskeys:U.useListPasskeys,useListApiKeys:()=>Zr({queryFn:U.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:U.useActiveOrganization,useListOrganizations:U.useListOrganizations,useHasPermission:H=>Zr({queryFn:()=>U.$fetch("/organization/has-permission",{method:"POST",body:H}),cacheKey:`hasPermission:${JSON.stringify(H)}`}),useInvitation:H=>Zr({queryFn:()=>U.organization.getInvitation(H),cacheKey:`invitation:${JSON.stringify(H)}`}),useListInvitations:H=>Zr({queryFn:()=>{var re;return U.$fetch(`/organization/list-invitations?organizationId=${((re=H?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(H)}`}),useListUserInvitations:()=>Zr({queryFn:()=>U.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:H=>Zr({queryFn:()=>{var re;return U.$fetch(`/organization/list-members?organizationId=${((re=H?.query)==null?void 0:re.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(H)}`}),useListTeams:H=>Zr({queryFn:()=>U.$fetch(`/organization/list-teams?organizationId=${H?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(H)}`}),useListTeamMembers:H=>Zr({queryFn:()=>U.$fetch("/organization/list-team-members",{method:"POST",body:H?.teamId?{query:{teamId:H.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(H)}`}),useListUserTeams:()=>Zr({queryFn:()=>U.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[U]),Q=A.useMemo(()=>({...vV,...k}),[k]),me=A.useMemo(()=>({...gV,...S}),[S]),ve=A.useMemo(()=>({...z,...w}),[z,w]),Ce=A.useMemo(()=>({...L,...b}),[L,b]);d=d.endsWith("/")?d.slice(0,-1):d,u=u.endsWith("/")?u.slice(0,-1):u;const{data:Ie}=ve.useSession();return x.jsxs(gt.Provider,{value:{authClient:U,avatar:J,basePath:u==="/"?"":u,baseURL:d,captcha:f,redirectTo:m,changeEmail:g,credentials:K,deleteUser:Y,emailVerification:le,freshAge:y,genericOAuth:fe,hooks:ve,mutators:Ce,localization:me,localizeErrors:R,nameRequired:E,organization:q,teams:B,account:F,signUp:D,social:se,toast:I,navigate:P||dF,replace:$||P||fF,viewPaths:Q,Link:W,...G},children:[Ie&&q&&x.jsx(lF,{}),f?.provider==="google-recaptcha-v3"?x.jsx(sF,{children:e}):e]})};function Zr({queryFn:e,cacheKey:t,staleTime:n=1e4}){var r;const{hooks:{useSession:a},toast:i,localization:c,localizeErrors:u}=A.useContext(gt),{data:d,isPending:f}=a(),m=A.useRef(e);m.current=e;const p=t||e.toString(),g=A.useSyncExternalStore(A.useCallback(T=>_o.subscribe(p,T),[p]),A.useCallback(()=>_o.get(p),[p]),A.useCallback(()=>_o.get(p),[p])),y=A.useRef(!1),w=A.useRef(void 0),[b,S]=A.useState(null),R=A.useCallback(async()=>{const T=_o.getInFlightRequest(p);if(T){try{const C=await T;C.error?S(C.error):S(null)}catch(C){S(C)}return}g?.data!==void 0&&_o.setRefetching(p,!0);const O=m.current();_o.setInFlightRequest(p,O);try{const{data:C,error:I}=await O;I?(S(I),i({variant:"error",message:En({error:I,localization:c,localizeErrors:u})})):S(null),_o.set(p,C)}catch(C){const I=C;S(I),i({variant:"error",message:En({error:I,localization:c,localizeErrors:u})})}finally{_o.setRefetching(p,!1),_o.removeInFlightRequest(p)}},[p,i,c,u,g]);A.useEffect(()=>{var T;const O=(T=d?.user)==null?void 0:T.id;if(!d){_o.setRefetching(p,!1),_o.clear(p),y.current=!1,w.current=void 0;return}const C=w.current!==void 0&&w.current!==O;C&&_o.clear(p);const I=g?.data!==void 0,k=!g||Date.now()-g.timestamp>n;(!y.current||!I||C||I&&k)&&(!I||k)&&(y.current=!0,R()),w.current=O},[d,(r=d?.user)==null?void 0:r.id,p,R,g,n]);const E=f||g?.data===void 0&&!b;return{data:g?.data??null,isPending:E,isRefetching:g?.isRefetching??!1,error:b,refetch:R}}const mF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mk=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();var gF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const vF=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:i,iconNode:c,...u},d)=>A.createElement("svg",{ref:d,...gF,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Mk("lucide",a),...u},[...c.map(([f,m])=>A.createElement(f,m)),...Array.isArray(i)?i:[i]]));const vr=(e,t)=>{const n=A.forwardRef(({className:r,...a},i)=>A.createElement(vF,{ref:i,iconNode:t,className:Mk(`lucide-${mF(e)}`,r),...a}));return n.displayName=`${e}`,n};const yF=vr("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const _F=vr("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const Pk=vr("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const bF=vr("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const wF=vr("EyeOff",[["path",{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",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{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",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const SF=vr("Eye",[["path",{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",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const EF=vr("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const gr=vr("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const Dk=vr("Lock",[["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"}]]);const Lk=vr("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const RF=vr("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const xF=vr("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const UT=vr("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const TF=vr("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const OF=vr("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const CF=vr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var xd=e=>e.type==="checkbox",Ni=e=>e instanceof Date,jr=e=>e==null;const jk=e=>typeof e=="object";var Ln=e=>!jr(e)&&!Array.isArray(e)&&jk(e)&&!Ni(e),$k=e=>Ln(e)&&e.target?xd(e.target)?e.target.checked:e.target.value:e,AF=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Uk=(e,t)=>e.has(AF(t)),IF=e=>{const t=e.constructor&&e.constructor.prototype;return Ln(t)&&t.hasOwnProperty("isPrototypeOf")},Hb=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function kn(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(Hb&&(e instanceof Blob||t))return e;const n=Array.isArray(e);if(!n&&!(Ln(e)&&IF(e)))return e;const r=n?[]:Object.create(Object.getPrototypeOf(e));for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=kn(e[a]));return r}var Hm=e=>/^\w*$/.test(e),un=e=>e===void 0,Gb=e=>Array.isArray(e)?e.filter(Boolean):[],Zb=e=>Gb(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Me=(e,t,n)=>{if(!t||!Ln(e))return n;const r=(Hm(t)?[t]:Zb(t)).reduce((a,i)=>jr(a)?a:a[i],e);return un(r)||r===e?un(e[t])?n:e[t]:r},Qr=e=>typeof e=="boolean",Er=e=>typeof e=="function",Gt=(e,t,n)=>{let r=-1;const a=Hm(t)?[t]:Zb(t),i=a.length,c=i-1;for(;++r<i;){const u=a[r];let d=n;if(r!==c){const f=e[u];d=Ln(f)||Array.isArray(f)?f:isNaN(+a[r+1])?{}:[]}if(u==="__proto__"||u==="constructor"||u==="prototype")return;e[u]=d,e=e[u]}};const Xp={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Vo={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},La={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Wb=ee.createContext(null);Wb.displayName="HookFormControlContext";const Kb=()=>ee.useContext(Wb);var zk=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const c=i;return t._proxyFormState[c]!==Vo.all&&(t._proxyFormState[c]=!r||Vo.all),n&&(n[c]=!0),e[c]}});return a};const Yb=typeof window<"u"?ee.useLayoutEffect:ee.useEffect;function Vk(e){const t=Kb(),{control:n=t,disabled:r,name:a,exact:i}=e||{},[c,u]=ee.useState(n._formState),d=ee.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Yb(()=>n._subscribe({name:a,formState:d.current,exact:i,callback:f=>{!r&&u({...n._formState,...f})}}),[a,r,i]),ee.useEffect(()=>{d.current.isValid&&n._setValid(!0)},[n]),ee.useMemo(()=>zk(c,n,d.current,!1),[c,n])}var to=e=>typeof e=="string",w_=(e,t,n,r,a)=>to(e)?(r&&t.watch.add(e),Me(n,e,a)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Me(n,i))):(r&&(t.watchAll=!0),n),S_=e=>jr(e)||!jk(e);function Fo(e,t,n=new WeakSet){if(S_(e)||S_(t))return Object.is(e,t);if(Ni(e)&&Ni(t))return Object.is(e.getTime(),t.getTime());const r=Object.keys(e),a=Object.keys(t);if(r.length!==a.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const i of r){const c=e[i];if(!a.includes(i))return!1;if(i!=="ref"){const u=t[i];if(Ni(c)&&Ni(u)||Ln(c)&&Ln(u)||Array.isArray(c)&&Array.isArray(u)?!Fo(c,u,n):!Object.is(c,u))return!1}}return!0}function kF(e){const t=Kb(),{control:n=t,name:r,defaultValue:a,disabled:i,exact:c,compute:u}=e||{},d=ee.useRef(a),f=ee.useRef(u),m=ee.useRef(void 0),p=ee.useRef(n),g=ee.useRef(r);f.current=u;const[y,w]=ee.useState(()=>{const O=n._getWatch(r,d.current);return f.current?f.current(O):O}),b=ee.useCallback(O=>{const C=w_(r,n._names,O||n._formValues,!1,d.current);return f.current?f.current(C):C},[n._formValues,n._names,r]),S=ee.useCallback(O=>{if(!i){const C=w_(r,n._names,O||n._formValues,!1,d.current);if(f.current){const I=f.current(C);Fo(I,m.current)||(w(I),m.current=I)}else w(C)}},[n._formValues,n._names,i,r]);Yb(()=>((p.current!==n||!Fo(g.current,r))&&(p.current=n,g.current=r,S()),n._subscribe({name:r,formState:{values:!0},exact:c,callback:O=>{S(O.values)}})),[n,c,r,S]),ee.useEffect(()=>n._removeUnmounted());const R=p.current!==n,E=g.current,T=ee.useMemo(()=>{if(i)return null;const O=!R&&!Fo(E,r);return R||O?b():null},[i,R,r,E,b]);return T!==null?T:y}function NF(e){const t=Kb(),{name:n,disabled:r,control:a=t,shouldUnregister:i,defaultValue:c,exact:u=!0}=e,d=Uk(a._names.array,n),f=ee.useMemo(()=>Me(a._formValues,n,Me(a._defaultValues,n,c)),[a,n,c]),m=kF({control:a,name:n,defaultValue:f,exact:u}),p=Vk({control:a,name:n,exact:u}),g=ee.useRef(e),y=ee.useRef(void 0),w=ee.useRef(a.register(n,{...e.rules,value:m,...Qr(e.disabled)?{disabled:e.disabled}:{}}));g.current=e;const b=ee.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Me(p.errors,n)},isDirty:{enumerable:!0,get:()=>!!Me(p.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Me(p.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Me(p.validatingFields,n)},error:{enumerable:!0,get:()=>Me(p.errors,n)}}),[p,n]),S=ee.useCallback(O=>w.current.onChange({target:{value:$k(O),name:n},type:Xp.CHANGE}),[n]),R=ee.useCallback(()=>w.current.onBlur({target:{value:Me(a._formValues,n),name:n},type:Xp.BLUR}),[n,a._formValues]),E=ee.useCallback(O=>{const C=Me(a._fields,n);C&&C._f&&O&&(C._f.ref={focus:()=>Er(O.focus)&&O.focus(),select:()=>Er(O.select)&&O.select(),setCustomValidity:I=>Er(O.setCustomValidity)&&O.setCustomValidity(I),reportValidity:()=>Er(O.reportValidity)&&O.reportValidity()})},[a._fields,n]),T=ee.useMemo(()=>({name:n,value:m,...Qr(r)||p.disabled?{disabled:p.disabled||r}:{},onChange:S,onBlur:R,ref:E}),[n,r,p.disabled,S,R,E,m]);return ee.useEffect(()=>{const O=a._options.shouldUnregister||i,C=y.current;C&&C!==n&&!d&&a.unregister(C),a.register(n,{...g.current.rules,...Qr(g.current.disabled)?{disabled:g.current.disabled}:{}});const I=(k,P)=>{const $=Me(a._fields,k);$&&$._f&&($._f.mount=P)};if(I(n,!0),O){const k=kn(Me(a._options.defaultValues,n,g.current.defaultValue));Gt(a._defaultValues,n,k),un(Me(a._formValues,n))&&Gt(a._formValues,n,k)}return!d&&a.register(n),y.current=n,()=>{(d?O&&!a._state.action:O)?a.unregister(n):I(n,!1)}},[n,a,d,i]),ee.useEffect(()=>{a._setDisabledField({disabled:r,name:n})},[r,n,a]),ee.useMemo(()=>({field:T,formState:p,fieldState:b}),[T,p,b])}const MF=e=>e.render(NF(e)),Qb=ee.createContext(null);Qb.displayName="HookFormContext";const PF=()=>ee.useContext(Qb),DF=e=>{const{children:t,watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:w,register:b,setFocus:S,subscribe:R}=e;return ee.createElement(Qb.Provider,{value:ee.useMemo(()=>({watch:n,getValues:r,getFieldState:a,setError:i,clearErrors:c,setValue:u,trigger:d,formState:f,resetField:m,reset:p,handleSubmit:g,unregister:y,control:w,register:b,setFocus:S,subscribe:R}),[c,w,f,a,r,g,b,p,m,i,S,u,R,d,y,n])},ee.createElement(Wb.Provider,{value:w},t))};var Xb=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Yu=e=>Array.isArray(e)?e:[e],zT=()=>{let e=[];return{get observers(){return e},next:a=>{for(const i of e)i.next&&i.next(a)},subscribe:a=>(e.push(a),{unsubscribe:()=>{e=e.filter(i=>i!==a)}}),unsubscribe:()=>{e=[]}}};function Fk(e,t){const n={};for(const r in e)if(e.hasOwnProperty(r)){const a=e[r],i=t[r];if(a&&Ln(a)&&i){const c=Fk(a,i);Ln(c)&&(n[r]=c)}else e[r]&&(n[r]=i)}return n}var Sr=e=>Ln(e)&&!Object.keys(e).length,Jb=e=>e.type==="file",Jp=e=>{if(!Hb)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Bk=e=>e.type==="select-multiple",e1=e=>e.type==="radio",LF=e=>e1(e)||xd(e),n0=e=>Jp(e)&&e.isConnected;function jF(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=un(e)?r++:e[t[r++]];return e}function $F(e){for(const t in e)if(e.hasOwnProperty(t)&&!un(e[t]))return!1;return!0}function Nn(e,t){const n=Array.isArray(t)?t:Hm(t)?[t]:Zb(t),r=n.length===1?e:jF(e,n),a=n.length-1,i=n[a];return r&&delete r[i],a!==0&&(Ln(r)&&Sr(r)||Array.isArray(r)&&$F(r))&&Nn(e,n.slice(0,-1)),e}var UF=e=>{for(const t in e)if(Er(e[t]))return!0;return!1};function qk(e){return Array.isArray(e)||Ln(e)&&!UF(e)}function E_(e,t={}){for(const n in e){const r=e[n];qk(r)?(t[n]=Array.isArray(r)?[]:{},E_(r,t[n])):un(r)||(t[n]=!0)}return t}function Kc(e,t,n){n||(n=E_(t));for(const r in e){const a=e[r];if(qk(a))un(t)||S_(n[r])?n[r]=E_(a,Array.isArray(a)?[]:{}):Kc(a,jr(t)?{}:t[r],n[r]);else{const i=t[r];n[r]=!Fo(a,i)}}return n}const VT={value:!1,isValid:!1},FT={value:!0,isValid:!0};var Hk=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!un(e[0].attributes.value)?un(e[0].value)||e[0].value===""?FT:{value:e[0].value,isValid:!0}:FT:VT}return VT},Gk=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>un(e)?e:t?e===""?NaN:e&&+e:n&&to(e)?new Date(e):r?r(e):e;const BT={isValid:!1,value:null};var Zk=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,BT):BT;function qT(e){const t=e.ref;return Jb(t)?t.files:e1(t)?Zk(e.refs).value:Bk(t)?[...t.selectedOptions].map(({value:n})=>n):xd(t)?Hk(e.refs).value:Gk(un(t.value)?e.ref.value:t.value,e)}var zF=(e,t,n,r)=>{const a={};for(const i of e){const c=Me(t,i);c&&Gt(a,i,c._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},em=e=>e instanceof RegExp,Ou=e=>un(e)?e:em(e)?e.source:Ln(e)?em(e.value)?e.value.source:e.value:e,HT=e=>({isOnSubmit:!e||e===Vo.onSubmit,isOnBlur:e===Vo.onBlur,isOnChange:e===Vo.onChange,isOnAll:e===Vo.all,isOnTouch:e===Vo.onTouched});const GT="AsyncFunction";var VF=e=>!!e&&!!e.validate&&!!(Er(e.validate)&&e.validate.constructor.name===GT||Ln(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===GT)),FF=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),ZT=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Qu=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const i=Me(e,a);if(i){const{_f:c,...u}=i;if(c){if(c.refs&&c.refs[0]&&t(c.refs[0],a)&&!r)return!0;if(c.ref&&t(c.ref,c.name)&&!r)return!0;if(Qu(u,t))break}else if(Ln(u)&&Qu(u,t))break}}};function WT(e,t,n){const r=Me(e,n);if(r||Hm(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const i=a.join("."),c=Me(t,i),u=Me(e,i);if(c&&!Array.isArray(c)&&n!==i)return{name:n};if(u&&u.type)return{name:i,error:u};if(u&&u.root&&u.root.type)return{name:`${i}.root`,error:u.root};a.pop()}return{name:n}}var BF=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return Sr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(c=>t[c]===(!r||Vo.all))},qF=(e,t,n)=>!e||!t||e===t||Yu(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),HF=(e,t,n,r,a)=>a.isOnAll?!1:!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:(n?r.isOnChange:a.isOnChange)?e:!0,GF=(e,t)=>!Gb(Me(e,t)).length&&Nn(e,t),ZF=(e,t,n)=>{const r=Yu(Me(e,n));return Gt(r,"root",t[n]),Gt(e,n,r),e};function KT(e,t,n="validate"){if(to(e)||Array.isArray(e)&&e.every(to)||Qr(e)&&!e)return{type:n,message:to(e)?e:"",ref:t}}var $c=e=>Ln(e)&&!em(e)?e:{value:e,message:""},YT=async(e,t,n,r,a,i)=>{const{ref:c,refs:u,required:d,maxLength:f,minLength:m,min:p,max:g,pattern:y,validate:w,name:b,valueAsNumber:S,mount:R}=e._f,E=Me(n,b);if(!R||t.has(b))return{};const T=u?u[0]:c,O=G=>{a&&T.reportValidity&&(T.setCustomValidity(Qr(G)?"":G||""),T.reportValidity())},C={},I=e1(c),k=xd(c),P=I||k,$=(S||Jb(c))&&un(c.value)&&un(E)||Jp(c)&&c.value===""||E===""||Array.isArray(E)&&!E.length,W=Xb.bind(null,b,r,C),V=(G,U,J,le=La.maxLength,F=La.minLength)=>{const Y=G?U:J;C[b]={type:G?le:F,message:Y,ref:c,...W(G?le:F,Y)}};if(i?!Array.isArray(E)||!E.length:d&&(!P&&($||jr(E))||Qr(E)&&!E||k&&!Hk(u).isValid||I&&!Zk(u).isValid)){const{value:G,message:U}=to(d)?{value:!!d,message:d}:$c(d);if(G&&(C[b]={type:La.required,message:U,ref:T,...W(La.required,U)},!r))return O(U),C}if(!$&&(!jr(p)||!jr(g))){let G,U;const J=$c(g),le=$c(p);if(!jr(E)&&!isNaN(E)){const F=c.valueAsNumber||E&&+E;jr(J.value)||(G=F>J.value),jr(le.value)||(U=F<le.value)}else{const F=c.valueAsDate||new Date(E),Y=K=>new Date(new Date().toDateString()+" "+K),se=c.type=="time",fe=c.type=="week";to(J.value)&&E&&(G=se?Y(E)>Y(J.value):fe?E>J.value:F>new Date(J.value)),to(le.value)&&E&&(U=se?Y(E)<Y(le.value):fe?E<le.value:F<new Date(le.value))}if((G||U)&&(V(!!G,J.message,le.message,La.max,La.min),!r))return O(C[b].message),C}if((f||m)&&!$&&(to(E)||i&&Array.isArray(E))){const G=$c(f),U=$c(m),J=!jr(G.value)&&E.length>+G.value,le=!jr(U.value)&&E.length<+U.value;if((J||le)&&(V(J,G.message,U.message),!r))return O(C[b].message),C}if(y&&!$&&to(E)){const{value:G,message:U}=$c(y);if(em(G)&&!E.match(G)&&(C[b]={type:La.pattern,message:U,ref:c,...W(La.pattern,U)},!r))return O(U),C}if(w){if(Er(w)){const G=await w(E,n),U=KT(G,T);if(U&&(C[b]={...U,...W(La.validate,U.message)},!r))return O(U.message),C}else if(Ln(w)){let G={};for(const U in w){if(!Sr(G)&&!r)break;const J=KT(await w[U](E,n),T,U);J&&(G={...J,...W(U,J.message)},O(J.message),r&&(C[b]=G))}if(!Sr(G)&&(C[b]={ref:T,...G},!r))return C}}return O(!0),C};const WF={mode:Vo.onSubmit,reValidateMode:Vo.onChange,shouldFocusError:!0};function KF(e={}){let t={...WF,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Er(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},a=Ln(t.defaultValues)||Ln(t.values)?kn(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:kn(a),c={action:!1,mount:!1,watch:!1,keepIsValid:!1},u={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},d,f=0;const m={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={...m};let g={...p};const y={array:zT(),state:zT()},w=t.criteriaMode===Vo.all,b=Z=>te=>{clearTimeout(f),f=setTimeout(Z,te)},S=async Z=>{if(!c.keepIsValid&&!t.disabled&&(p.isValid||g.isValid||Z)){let te;t.resolver?(te=Sr((await P()).errors),R()):te=await W(r,!0),te!==n.isValid&&y.state.next({isValid:te})}},R=(Z,te)=>{!t.disabled&&(p.isValidating||p.validatingFields||g.isValidating||g.validatingFields)&&((Z||Array.from(u.mount)).forEach(oe=>{oe&&(te?Gt(n.validatingFields,oe,te):Nn(n.validatingFields,oe))}),y.state.next({validatingFields:n.validatingFields,isValidating:!Sr(n.validatingFields)}))},E=(Z,te=[],oe,Se,xe=!0,Re=!0)=>{if(Se&&oe&&!t.disabled){if(c.action=!0,Re&&Array.isArray(Me(r,Z))){const Ne=oe(Me(r,Z),Se.argA,Se.argB);xe&&Gt(r,Z,Ne)}if(Re&&Array.isArray(Me(n.errors,Z))){const Ne=oe(Me(n.errors,Z),Se.argA,Se.argB);xe&&Gt(n.errors,Z,Ne),GF(n.errors,Z)}if((p.touchedFields||g.touchedFields)&&Re&&Array.isArray(Me(n.touchedFields,Z))){const Ne=oe(Me(n.touchedFields,Z),Se.argA,Se.argB);xe&&Gt(n.touchedFields,Z,Ne)}(p.dirtyFields||g.dirtyFields)&&(n.dirtyFields=Kc(a,i)),y.state.next({name:Z,isDirty:G(Z,te),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Gt(i,Z,te)},T=(Z,te)=>{Gt(n.errors,Z,te),y.state.next({errors:n.errors})},O=Z=>{n.errors=Z,y.state.next({errors:n.errors,isValid:!1})},C=(Z,te,oe,Se)=>{const xe=Me(r,Z);if(xe){const Re=Me(i,Z,un(oe)?Me(a,Z):oe);un(Re)||Se&&Se.defaultChecked||te?Gt(i,Z,te?Re:qT(xe._f)):le(Z,Re),c.mount&&!c.action&&S()}},I=(Z,te,oe,Se,xe)=>{let Re=!1,Ne=!1;const et={name:Z};if(!t.disabled){if(!oe||Se){(p.isDirty||g.isDirty)&&(Ne=n.isDirty,n.isDirty=et.isDirty=G(),Re=Ne!==et.isDirty);const st=Fo(Me(a,Z),te);Ne=!!Me(n.dirtyFields,Z),st?Nn(n.dirtyFields,Z):Gt(n.dirtyFields,Z,!0),et.dirtyFields=n.dirtyFields,Re=Re||(p.dirtyFields||g.dirtyFields)&&Ne!==!st}if(oe){const st=Me(n.touchedFields,Z);st||(Gt(n.touchedFields,Z,oe),et.touchedFields=n.touchedFields,Re=Re||(p.touchedFields||g.touchedFields)&&st!==oe)}Re&&xe&&y.state.next(et)}return Re?et:{}},k=(Z,te,oe,Se)=>{const xe=Me(n.errors,Z),Re=(p.isValid||g.isValid)&&Qr(te)&&n.isValid!==te;if(t.delayError&&oe?(d=b(()=>T(Z,oe)),d(t.delayError)):(clearTimeout(f),d=null,oe?Gt(n.errors,Z,oe):Nn(n.errors,Z)),(oe?!Fo(xe,oe):xe)||!Sr(Se)||Re){const Ne={...Se,...Re&&Qr(te)?{isValid:te}:{},errors:n.errors,name:Z};n={...n,...Ne},y.state.next(Ne)}},P=async Z=>(R(Z,!0),await t.resolver(i,t.context,zF(Z||u.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),$=async Z=>{const{errors:te}=await P(Z);if(R(Z),Z)for(const oe of Z){const Se=Me(te,oe);Se?Gt(n.errors,oe,Se):Nn(n.errors,oe)}else n.errors=te;return te},W=async(Z,te,oe={valid:!0})=>{for(const Se in Z){const xe=Z[Se];if(xe){const{_f:Re,...Ne}=xe;if(Re){const et=u.array.has(Re.name),st=xe._f&&VF(xe._f);st&&p.validatingFields&&R([Re.name],!0);const Pt=await YT(xe,u.disabled,i,w,t.shouldUseNativeValidation&&!te,et);if(st&&p.validatingFields&&R([Re.name]),Pt[Re.name]&&(oe.valid=!1,te||e.shouldUseNativeValidation))break;!te&&(Me(Pt,Re.name)?et?ZF(n.errors,Pt,Re.name):Gt(n.errors,Re.name,Pt[Re.name]):Nn(n.errors,Re.name))}!Sr(Ne)&&await W(Ne,te,oe)}}return oe.valid},V=()=>{for(const Z of u.unMount){const te=Me(r,Z);te&&(te._f.refs?te._f.refs.every(oe=>!n0(oe)):!n0(te._f.ref))&&ve(Z)}u.unMount=new Set},G=(Z,te)=>!t.disabled&&(Z&&te&&Gt(i,Z,te),!Fo(D(),a)),U=(Z,te,oe)=>w_(Z,u,{...c.mount?i:un(te)?a:to(Z)?{[Z]:te}:te},oe,te),J=Z=>Gb(Me(c.mount?i:a,Z,t.shouldUnregister?Me(a,Z,[]):[])),le=(Z,te,oe={})=>{const Se=Me(r,Z);let xe=te;if(Se){const Re=Se._f;Re&&(!Re.disabled&&Gt(i,Z,Gk(te,Re)),xe=Jp(Re.ref)&&jr(te)?"":te,Bk(Re.ref)?[...Re.ref.options].forEach(Ne=>Ne.selected=xe.includes(Ne.value)):Re.refs?xd(Re.ref)?Re.refs.forEach(Ne=>{(!Ne.defaultChecked||!Ne.disabled)&&(Array.isArray(xe)?Ne.checked=!!xe.find(et=>et===Ne.value):Ne.checked=xe===Ne.value||!!xe)}):Re.refs.forEach(Ne=>Ne.checked=Ne.value===xe):Jb(Re.ref)?Re.ref.value="":(Re.ref.value=xe,Re.ref.type||y.state.next({name:Z,values:kn(i)})))}(oe.shouldDirty||oe.shouldTouch)&&I(Z,xe,oe.shouldTouch,oe.shouldDirty,!0),oe.shouldValidate&&K(Z)},F=(Z,te,oe)=>{for(const Se in te){if(!te.hasOwnProperty(Se))return;const xe=te[Se],Re=Z+"."+Se,Ne=Me(r,Re);(u.array.has(Z)||Ln(xe)||Ne&&!Ne._f)&&!Ni(xe)?F(Re,xe,oe):le(Re,xe,oe)}},Y=(Z,te,oe={})=>{const Se=Me(r,Z),xe=u.array.has(Z),Re=kn(te);Gt(i,Z,Re),xe?(y.array.next({name:Z,values:kn(i)}),(p.isDirty||p.dirtyFields||g.isDirty||g.dirtyFields)&&oe.shouldDirty&&y.state.next({name:Z,dirtyFields:Kc(a,i),isDirty:G(Z,Re)})):Se&&!Se._f&&!jr(Re)?F(Z,Re,oe):le(Z,Re,oe),ZT(Z,u)?y.state.next({...n,name:Z,values:kn(i)}):y.state.next({name:c.mount?Z:void 0,values:kn(i)})},se=async Z=>{c.mount=!0;const te=Z.target;let oe=te.name,Se=!0;const xe=Me(r,oe),Re=st=>{Se=Number.isNaN(st)||Ni(st)&&isNaN(st.getTime())||Fo(st,Me(i,oe,st))},Ne=HT(t.mode),et=HT(t.reValidateMode);if(xe){let st,Pt;const dr=te.type?qT(xe._f):$k(Z),nn=Z.type===Xp.BLUR||Z.type===Xp.FOCUS_OUT,Rn=!FF(xe._f)&&!t.resolver&&!Me(n.errors,oe)&&!xe._f.deps||HF(nn,Me(n.touchedFields,oe),n.isSubmitted,et,Ne),rn=ZT(oe,u,nn);Gt(i,oe,dr),nn?(!te||!te.readOnly)&&(xe._f.onBlur&&xe._f.onBlur(Z),d&&d(0)):xe._f.onChange&&xe._f.onChange(Z);const $n=I(oe,dr,nn),xn=!Sr($n)||rn;if(!nn&&y.state.next({name:oe,type:Z.type,values:kn(i)}),Rn)return(p.isValid||g.isValid)&&(t.mode==="onBlur"?nn&&S():nn||S()),xn&&y.state.next({name:oe,...rn?{}:$n});if(!nn&&rn&&y.state.next({...n}),t.resolver){const{errors:Qa}=await P([oe]);if(R([oe]),Re(dr),Se){const ga=WT(n.errors,r,oe),qe=WT(Qa,r,ga.name||oe);st=qe.error,oe=qe.name,Pt=Sr(Qa)}}else R([oe],!0),st=(await YT(xe,u.disabled,i,w,t.shouldUseNativeValidation))[oe],R([oe]),Re(dr),Se&&(st?Pt=!1:(p.isValid||g.isValid)&&(Pt=await W(r,!0)));Se&&(xe._f.deps&&(!Array.isArray(xe._f.deps)||xe._f.deps.length>0)&&K(xe._f.deps),k(oe,Pt,st,$n))}},fe=(Z,te)=>{if(Me(n.errors,te)&&Z.focus)return Z.focus(),1},K=async(Z,te={})=>{let oe,Se;const xe=Yu(Z);if(t.resolver){const Re=await $(un(Z)?Z:xe);oe=Sr(Re),Se=Z?!xe.some(Ne=>Me(Re,Ne)):oe}else Z?(Se=(await Promise.all(xe.map(async Re=>{const Ne=Me(r,Re);return await W(Ne&&Ne._f?{[Re]:Ne}:Ne)}))).every(Boolean),!(!Se&&!n.isValid)&&S()):Se=oe=await W(r);return y.state.next({...!to(Z)||(p.isValid||g.isValid)&&oe!==n.isValid?{}:{name:Z},...t.resolver||!Z?{isValid:oe}:{},errors:n.errors}),te.shouldFocus&&!Se&&Qu(r,fe,Z?xe:u.mount),Se},D=(Z,te)=>{let oe={...c.mount?i:a};return te&&(oe=Fk(te.dirtyFields?n.dirtyFields:n.touchedFields,oe)),un(Z)?oe:to(Z)?Me(oe,Z):Z.map(Se=>Me(oe,Se))},q=(Z,te)=>({invalid:!!Me((te||n).errors,Z),isDirty:!!Me((te||n).dirtyFields,Z),error:Me((te||n).errors,Z),isValidating:!!Me(n.validatingFields,Z),isTouched:!!Me((te||n).touchedFields,Z)}),B=Z=>{const te=Z?Yu(Z):void 0;te?.forEach(oe=>Nn(n.errors,oe)),te?te.forEach(oe=>{y.state.next({name:oe,errors:n.errors})}):y.state.next({errors:{}})},L=(Z,te,oe)=>{const Se=(Me(r,Z,{_f:{}})._f||{}).ref,xe=Me(n.errors,Z)||{},{ref:Re,message:Ne,type:et,...st}=xe;Gt(n.errors,Z,{...st,...te,ref:Se}),y.state.next({name:Z,errors:n.errors,isValid:!1}),oe&&oe.shouldFocus&&Se&&Se.focus&&Se.focus()},z=(Z,te)=>Er(Z)?y.state.subscribe({next:oe=>"values"in oe&&Z(U(void 0,te),oe)}):U(Z,te,!0),Q=Z=>y.state.subscribe({next:te=>{qF(Z.name,te.name,Z.exact)&&BF(te,Z.formState||p,Je,Z.reRenderRoot)&&Z.callback({values:{...i},...n,...te,defaultValues:a})}}).unsubscribe,me=Z=>(c.mount=!0,g={...g,...Z.formState},Q({...Z,formState:{...m,...Z.formState}})),ve=(Z,te={})=>{for(const oe of Z?Yu(Z):u.mount)u.mount.delete(oe),u.array.delete(oe),te.keepValue||(Nn(r,oe),Nn(i,oe)),!te.keepError&&Nn(n.errors,oe),!te.keepDirty&&Nn(n.dirtyFields,oe),!te.keepTouched&&Nn(n.touchedFields,oe),!te.keepIsValidating&&Nn(n.validatingFields,oe),!t.shouldUnregister&&!te.keepDefaultValue&&Nn(a,oe);y.state.next({values:kn(i)}),y.state.next({...n,...te.keepDirty?{isDirty:G()}:{}}),!te.keepIsValid&&S()},Ce=({disabled:Z,name:te})=>{if(Qr(Z)&&c.mount||Z||u.disabled.has(te)){const xe=u.disabled.has(te)!==!!Z;Z?u.disabled.add(te):u.disabled.delete(te),xe&&c.mount&&!c.action&&S()}},Ie=(Z,te={})=>{let oe=Me(r,Z);const Se=Qr(te.disabled)||Qr(t.disabled);return Gt(r,Z,{...oe||{},_f:{...oe&&oe._f?oe._f:{ref:{name:Z}},name:Z,mount:!0,...te}}),u.mount.add(Z),oe?Ce({disabled:Qr(te.disabled)?te.disabled:t.disabled,name:Z}):C(Z,!0,te.value),{...Se?{disabled:te.disabled||t.disabled}:{},...t.progressive?{required:!!te.required,min:Ou(te.min),max:Ou(te.max),minLength:Ou(te.minLength),maxLength:Ou(te.maxLength),pattern:Ou(te.pattern)}:{},name:Z,onChange:se,onBlur:se,ref:xe=>{if(xe){Ie(Z,te),oe=Me(r,Z);const Re=un(xe.value)&&xe.querySelectorAll&&xe.querySelectorAll("input,select,textarea")[0]||xe,Ne=LF(Re),et=oe._f.refs||[];if(Ne?et.find(st=>st===Re):Re===oe._f.ref)return;Gt(r,Z,{_f:{...oe._f,...Ne?{refs:[...et.filter(n0),Re,...Array.isArray(Me(a,Z))?[{}]:[]],ref:{type:Re.type,name:Z}}:{ref:Re}}}),C(Z,!1,void 0,Re)}else oe=Me(r,Z,{}),oe._f&&(oe._f.mount=!1),(t.shouldUnregister||te.shouldUnregister)&&!(Uk(u.array,Z)&&c.action)&&u.unMount.add(Z)}}},H=()=>t.shouldFocusError&&Qu(r,fe,u.mount),re=Z=>{Qr(Z)&&(y.state.next({disabled:Z}),Qu(r,(te,oe)=>{const Se=Me(r,oe);Se&&(te.disabled=Se._f.disabled||Z,Array.isArray(Se._f.refs)&&Se._f.refs.forEach(xe=>{xe.disabled=Se._f.disabled||Z}))},0,!1))},_e=(Z,te)=>async oe=>{let Se;oe&&(oe.preventDefault&&oe.preventDefault(),oe.persist&&oe.persist());let xe=kn(i);if(y.state.next({isSubmitting:!0}),t.resolver){const{errors:Re,values:Ne}=await P();R(),n.errors=Re,xe=kn(Ne)}else await W(r);if(u.disabled.size)for(const Re of u.disabled)Nn(xe,Re);if(Nn(n.errors,"root"),Sr(n.errors)){y.state.next({errors:{}});try{await Z(xe,oe)}catch(Re){Se=Re}}else te&&await te({...n.errors},oe),H(),setTimeout(H);if(y.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sr(n.errors)&&!Se,submitCount:n.submitCount+1,errors:n.errors}),Se)throw Se},ae=(Z,te={})=>{Me(r,Z)&&(un(te.defaultValue)?Y(Z,kn(Me(a,Z))):(Y(Z,te.defaultValue),Gt(a,Z,kn(te.defaultValue))),te.keepTouched||Nn(n.touchedFields,Z),te.keepDirty||(Nn(n.dirtyFields,Z),n.isDirty=te.defaultValue?G(Z,kn(Me(a,Z))):G()),te.keepError||(Nn(n.errors,Z),p.isValid&&S()),y.state.next({...n}))},ue=(Z,te={})=>{const oe=Z?kn(Z):a,Se=kn(oe),xe=Sr(Z),Re=xe?a:Se;if(te.keepDefaultValues||(a=oe),!te.keepValues){if(te.keepDirtyValues){const Ne=new Set([...u.mount,...Object.keys(Kc(a,i))]);for(const et of Array.from(Ne)){const st=Me(n.dirtyFields,et),Pt=Me(i,et),dr=Me(Re,et);st&&!un(Pt)?Gt(Re,et,Pt):!st&&!un(dr)&&Y(et,dr)}}else{if(Hb&&un(Z))for(const Ne of u.mount){const et=Me(r,Ne);if(et&&et._f){const st=Array.isArray(et._f.refs)?et._f.refs[0]:et._f.ref;if(Jp(st)){const Pt=st.closest("form");if(Pt){Pt.reset();break}}}}if(te.keepFieldsRef)for(const Ne of u.mount)Y(Ne,Me(Re,Ne));else r={}}i=t.shouldUnregister?te.keepDefaultValues?kn(a):{}:kn(Re),y.array.next({values:{...Re}}),y.state.next({values:{...Re}})}u={mount:te.keepDirtyValues?u.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},c.mount=!p.isValid||!!te.keepIsValid||!!te.keepDirtyValues||!t.shouldUnregister&&!Sr(Re),c.watch=!!t.shouldUnregister,c.keepIsValid=!!te.keepIsValid,c.action=!1,te.keepErrors||(n.errors={}),y.state.next({submitCount:te.keepSubmitCount?n.submitCount:0,isDirty:xe?!1:te.keepDirty?n.isDirty:!!(te.keepDefaultValues&&!Fo(Z,a)),isSubmitted:te.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:xe?{}:te.keepDirtyValues?te.keepDefaultValues&&i?Kc(a,i):n.dirtyFields:te.keepDefaultValues&&Z?Kc(a,Z):te.keepDirty?n.dirtyFields:{},touchedFields:te.keepTouched?n.touchedFields:{},errors:te.keepErrors?n.errors:{},isSubmitSuccessful:te.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:a})},Oe=(Z,te)=>ue(Er(Z)?Z(i):Z,{...t.resetOptions,...te}),Pe=(Z,te={})=>{const oe=Me(r,Z),Se=oe&&oe._f;if(Se){const xe=Se.refs?Se.refs[0]:Se.ref;xe.focus&&setTimeout(()=>{xe.focus(),te.shouldSelect&&Er(xe.select)&&xe.select()})}},Je=Z=>{n={...n,...Z}},Ke={control:{register:Ie,unregister:ve,getFieldState:q,handleSubmit:_e,setError:L,_subscribe:Q,_runSchema:P,_updateIsValidating:R,_focusError:H,_getWatch:U,_getDirty:G,_setValid:S,_setFieldArray:E,_setDisabledField:Ce,_setErrors:O,_getFieldArray:J,_reset:ue,_resetDefaultValues:()=>Er(t.defaultValues)&&t.defaultValues().then(Z=>{Oe(Z,t.resetOptions),y.state.next({isLoading:!1})}),_removeUnmounted:V,_disableForm:re,_subjects:y,_proxyFormState:p,get _fields(){return r},get _formValues(){return i},get _state(){return c},set _state(Z){c=Z},get _defaultValues(){return a},get _names(){return u},set _names(Z){u=Z},get _formState(){return n},get _options(){return t},set _options(Z){t={...t,...Z}}},subscribe:me,trigger:K,register:Ie,handleSubmit:_e,watch:z,setValue:Y,getValues:D,reset:Oe,resetField:ae,clearErrors:B,unregister:ve,setError:L,setFocus:Pe,getFieldState:q};return{...Ke,formControl:Ke}}function da(e={}){const t=ee.useRef(void 0),n=ee.useRef(void 0),[r,a]=ee.useState({isDirty:!1,isValidating:!1,isLoading:Er(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Er(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Er(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:c,...u}=KF(e);t.current={...u,formState:r}}const i=t.current.control;return i._options=e,Yb(()=>{const c=i._subscribe({formState:i._proxyFormState,callback:()=>a({...i._formState}),reRenderRoot:!0});return a(u=>({...u,isReady:!0})),i._formState.isReady=!0,c},[i]),ee.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),ee.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),ee.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),ee.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),ee.useEffect(()=>{if(i._proxyFormState.isDirty){const c=i._getDirty();c!==r.isDirty&&i._subjects.state.next({isDirty:c})}},[i,r.isDirty]),ee.useEffect(()=>{var c;e.values&&!Fo(e.values,n.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((c=i._options.resetOptions)===null||c===void 0)&&c.keepIsValid||i._setValid(),n.current=e.values,a(u=>({...u}))):i._resetDefaultValues()},[i,e.values]),ee.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=ee.useMemo(()=>zk(r,i),[i,r]),t.current}function QT(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Td(...e){return t=>{let n=!1;const r=e.map(a=>{const i=QT(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():QT(e[a],null)}}}}function qn(...e){return A.useCallback(Td(...e),e)}var YF=Symbol.for("react.lazy"),tm=wb[" use ".trim().toString()];function QF(e){return typeof e=="object"&&e!==null&&"then"in e}function Wk(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===YF&&"_payload"in e&&QF(e._payload)}function Kk(e){const t=XF(e),n=A.forwardRef((r,a)=>{let{children:i,...c}=r;Wk(i)&&typeof tm=="function"&&(i=tm(i._payload));const u=A.Children.toArray(i),d=u.find(eB);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return x.jsx(t,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var t1=Kk("Slot");function XF(e){const t=A.forwardRef((n,r)=>{let{children:a,...i}=n;if(Wk(a)&&typeof tm=="function"&&(a=tm(a._payload)),A.isValidElement(a)){const c=nB(a),u=tB(i,a.props);return a.type!==A.Fragment&&(u.ref=r?Td(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JF=Symbol("radix.slottable");function eB(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JF}function tB(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function nB(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const XT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,JT=Pb,Yk=(e,t)=>n=>{var r;if(t?.variants==null)return JT(e,n?.class,n?.className);const{variants:a,defaultVariants:i}=t,c=Object.keys(a).map(f=>{const m=n?.[f],p=i?.[f];if(m===null)return null;const g=XT(m)||XT(p);return a[f][g]}),u=n&&Object.entries(n).reduce((f,m)=>{let[p,g]=m;return g===void 0||(f[p]=g),f},{}),d=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,m)=>{let{class:p,className:g,...y}=m;return Object.entries(y).every(w=>{let[b,S]=w;return Array.isArray(S)?S.includes({...i,...u}[b]):{...i,...u}[b]===S})?[...f,p,g]:f},[]);return JT(e,c,d,n?.class,n?.className)},eO=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Me(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},R_=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?eO(r.ref,n,e):r&&r.refs&&r.refs.forEach(a=>eO(a,n,e))}},tO=(e,t)=>{t.shouldUseNativeValidation&&R_(e,t);const n={};for(const r in e){const a=Me(t.fields,r),i=Object.assign(e[r]||{},{ref:a&&a.ref});if(rB(t.names||Object.keys(e),r)){const c=Object.assign({},Me(n,r));Gt(c,"root",i),Gt(n,r,c)}else Gt(n,r,i)}return n},rB=(e,t)=>{const n=nO(t);return e.some(r=>nO(r).match(`^${n}\\.\\d+`))};function nO(e){return e.replace(/\]|\[/g,"")}function rO(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function oB(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if("unionErrors"in r){var u=r.unionErrors[0].errors[0];n[c]={message:u.message,type:u.code}}else n[c]={message:i,type:a};if("unionErrors"in r&&r.unionErrors.forEach(function(m){return m.errors.forEach(function(p){return e.push(p)})}),t){var d=n[c].types,f=d&&d[r.code];n[c]=Xb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function aB(e,t){for(var n={};e.length;){var r=e[0],a=r.code,i=r.message,c=r.path.join(".");if(!n[c])if(r.code==="invalid_union"&&r.errors.length>0){var u=r.errors[0][0];n[c]={message:u.message,type:u.code}}else n[c]={message:i,type:a};if(r.code==="invalid_union"&&r.errors.forEach(function(m){return m.forEach(function(p){return e.push(p)})}),t){var d=n[c].types,f=d&&d[r.code];n[c]=Xb(c,t,n,a,f?[].concat(f,r.message):r.message)}e.shift()}return n}function fa(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,a,i){try{return Promise.resolve(rO(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(c){return i.shouldUseNativeValidation&&R_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return Array.isArray(u?.issues)})(c))return{values:{},errors:tO(oB(c.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,a,i){try{return Promise.resolve(rO(function(){return Promise.resolve((n.mode==="sync"?S8:E8)(e,r,t)).then(function(c){return i.shouldUseNativeValidation&&R_({},i),{errors:{},values:n.raw?Object.assign({},r):c}})},function(c){if((function(u){return u instanceof Ub})(c))return{values:{},errors:tO(aB(c.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw c}))}catch(c){return Promise.reject(c)}};throw new Error("Invalid input: not a Zod schema")}function ut(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e?.(a),n===!1||!a.defaultPrevented)return t?.(a)}}function sB(e,t){const n=A.createContext(t),r=i=>{const{children:c,...u}=i,d=A.useMemo(()=>u,Object.values(u));return x.jsx(n.Provider,{value:d,children:c})};r.displayName=e+"Provider";function a(i){const c=A.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function Ki(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c),d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...w}=p,b=g?.[e]?.[d]||u,S=A.useMemo(()=>w,Object.values(w));return x.jsx(b.Provider,{value:S,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,w=A.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,iB(a,...t)]}function iB(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var Ho=globalThis?.document?A.useLayoutEffect:()=>{},cB=wb[" useId ".trim().toString()]||(()=>{}),lB=0;function zs(e){const[t,n]=A.useState(cB());return Ho(()=>{n(r=>r??String(lB++))},[e]),e||(t?`radix-${t}`:"")}var uB=wb[" useInsertionEffect ".trim().toString()]||Ho;function Od({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[a,i,c]=dB({defaultProp:t,onChange:n}),u=e!==void 0,d=u?e:a;{const m=A.useRef(e!==void 0);A.useEffect(()=>{const p=m.current;p!==u&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${u?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=u},[u,r])}const f=A.useCallback(m=>{if(u){const p=fB(m)?m(e):m;p!==e&&c.current?.(p)}else i(m)},[u,e,i,c]);return[d,f]}function dB({defaultProp:e,onChange:t}){const[n,r]=A.useState(e),a=A.useRef(n),i=A.useRef(t);return uB(()=>{i.current=t},[t]),A.useEffect(()=>{a.current!==n&&(i.current?.(n),a.current=n)},[n,a]),[n,r,i]}function fB(e){return typeof e=="function"}function ud(e){const t=hB(e),n=A.forwardRef((r,a)=>{const{children:i,...c}=r,u=A.Children.toArray(i),d=u.find(pB);if(d){const f=d.props.children,m=u.map(p=>p===d?A.Children.count(f)>1?A.Children.only(null):A.isValidElement(f)?f.props.children:null:p);return x.jsx(t,{...c,ref:a,children:A.isValidElement(f)?A.cloneElement(f,void 0,m):null})}return x.jsx(t,{...c,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function hB(e){const t=A.forwardRef((n,r)=>{const{children:a,...i}=n;if(A.isValidElement(a)){const c=gB(a),u=mB(i,a.props);return a.type!==A.Fragment&&(u.ref=r?Td(r,c):c),A.cloneElement(a,u)}return A.Children.count(a)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qk=Symbol("radix.slottable");function Rae(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Qk,t}function pB(e){return A.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qk}function mB(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...u)=>{const d=i(...u);return a(...u),d}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function gB(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vB=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],pn=vB.reduce((e,t)=>{const n=ud(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xk(e,t){e&&Pm.flushSync(()=>e.dispatchEvent(t))}function Go(e){const t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...n)=>t.current?.(...n),[])}function yB(e,t=globalThis?.document){const n=Go(e);A.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var _B="DismissableLayer",x_="dismissableLayer.update",bB="dismissableLayer.pointerDownOutside",wB="dismissableLayer.focusOutside",oO,Jk=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),n1=A.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:c,onDismiss:u,...d}=e,f=A.useContext(Jk),[m,p]=A.useState(null),g=m?.ownerDocument??globalThis?.document,[,y]=A.useState({}),w=qn(t,k=>p(k)),b=Array.from(f.layers),[S]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),R=b.indexOf(S),E=m?b.indexOf(m):-1,T=f.layersWithOutsidePointerEventsDisabled.size>0,O=E>=R,C=RB(k=>{const P=k.target,$=[...f.branches].some(W=>W.contains(P));!O||$||(a?.(k),c?.(k),k.defaultPrevented||u?.())},g),I=xB(k=>{const P=k.target;[...f.branches].some(W=>W.contains(P))||(i?.(k),c?.(k),k.defaultPrevented||u?.())},g);return yB(k=>{E===f.layers.size-1&&(r?.(k),!k.defaultPrevented&&u&&(k.preventDefault(),u()))},g),A.useEffect(()=>{if(m)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(oO=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),aO(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=oO)}},[m,g,n,f]),A.useEffect(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),aO())},[m,f]),A.useEffect(()=>{const k=()=>y({});return document.addEventListener(x_,k),()=>document.removeEventListener(x_,k)},[]),x.jsx(pn.div,{...d,ref:w,style:{pointerEvents:T?O?"auto":"none":void 0,...e.style},onFocusCapture:ut(e.onFocusCapture,I.onFocusCapture),onBlurCapture:ut(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:ut(e.onPointerDownCapture,C.onPointerDownCapture)})});n1.displayName=_B;var SB="DismissableLayerBranch",EB=A.forwardRef((e,t)=>{const n=A.useContext(Jk),r=A.useRef(null),a=qn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(pn.div,{...e,ref:a})});EB.displayName=SB;function RB(e,t=globalThis?.document){const n=Go(e),r=A.useRef(!1),a=A.useRef(()=>{});return A.useEffect(()=>{const i=u=>{if(u.target&&!r.current){let d=function(){eN(bB,n,f,{discrete:!0})};const f={originalEvent:u};u.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=d,t.addEventListener("click",a.current,{once:!0})):d()}else t.removeEventListener("click",a.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xB(e,t=globalThis?.document){const n=Go(e),r=A.useRef(!1);return A.useEffect(()=>{const a=i=>{i.target&&!r.current&&eN(wB,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function aO(){const e=new CustomEvent(x_);document.dispatchEvent(e)}function eN(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Xk(a,i):a.dispatchEvent(i)}var r0="focusScope.autoFocusOnMount",o0="focusScope.autoFocusOnUnmount",sO={bubbles:!1,cancelable:!0},TB="FocusScope",r1=A.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...c}=e,[u,d]=A.useState(null),f=Go(a),m=Go(i),p=A.useRef(null),g=qn(t,b=>d(b)),y=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let b=function(T){if(y.paused||!u)return;const O=T.target;u.contains(O)?p.current=O:Cs(p.current,{select:!0})},S=function(T){if(y.paused||!u)return;const O=T.relatedTarget;O!==null&&(u.contains(O)||Cs(p.current,{select:!0}))},R=function(T){if(document.activeElement===document.body)for(const C of T)C.removedNodes.length>0&&Cs(u)};document.addEventListener("focusin",b),document.addEventListener("focusout",S);const E=new MutationObserver(R);return u&&E.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",S),E.disconnect()}}},[r,u,y.paused]),A.useEffect(()=>{if(u){cO.add(y);const b=document.activeElement;if(!u.contains(b)){const R=new CustomEvent(r0,sO);u.addEventListener(r0,f),u.dispatchEvent(R),R.defaultPrevented||(OB(NB(tN(u)),{select:!0}),document.activeElement===b&&Cs(u))}return()=>{u.removeEventListener(r0,f),setTimeout(()=>{const R=new CustomEvent(o0,sO);u.addEventListener(o0,m),u.dispatchEvent(R),R.defaultPrevented||Cs(b??document.body,{select:!0}),u.removeEventListener(o0,m),cO.remove(y)},0)}}},[u,f,m,y]);const w=A.useCallback(b=>{if(!n&&!r||y.paused)return;const S=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,R=document.activeElement;if(S&&R){const E=b.currentTarget,[T,O]=CB(E);T&&O?!b.shiftKey&&R===O?(b.preventDefault(),n&&Cs(T,{select:!0})):b.shiftKey&&R===T&&(b.preventDefault(),n&&Cs(O,{select:!0})):R===E&&b.preventDefault()}},[n,r,y.paused]);return x.jsx(pn.div,{tabIndex:-1,...c,ref:g,onKeyDown:w})});r1.displayName=TB;function OB(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Cs(r,{select:t}),document.activeElement!==n)return}function CB(e){const t=tN(e),n=iO(t,e),r=iO(t.reverse(),e);return[n,r]}function tN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function iO(e,t){for(const n of e)if(!AB(n,{upTo:t}))return n}function AB(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function IB(e){return e instanceof HTMLInputElement&&"select"in e}function Cs(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&IB(e)&&t&&e.select()}}var cO=kB();function kB(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=lO(e,t),e.unshift(t)},remove(t){e=lO(e,t),e[0]?.resume()}}}function lO(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function NB(e){return e.filter(t=>t.tagName!=="A")}var MB="Portal",o1=A.forwardRef((e,t)=>{const{container:n,...r}=e,[a,i]=A.useState(!1);Ho(()=>i(!0),[]);const c=n||a&&globalThis?.document?.body;return c?VA.createPortal(x.jsx(pn.div,{...r,ref:t}),c):null});o1.displayName=MB;function PB(e,t){return A.useReducer((n,r)=>t[n][r]??n,e)}var Ka=e=>{const{present:t,children:n}=e,r=DB(t),a=typeof n=="function"?n({present:r.isPresent}):A.Children.only(n),i=qn(r.ref,LB(a));return typeof n=="function"||r.isPresent?A.cloneElement(a,{ref:i}):null};Ka.displayName="Presence";function DB(e){const[t,n]=A.useState(),r=A.useRef(null),a=A.useRef(e),i=A.useRef("none"),c=e?"mounted":"unmounted",[u,d]=PB(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return A.useEffect(()=>{const f=vh(r.current);i.current=u==="mounted"?f:"none"},[u]),Ho(()=>{const f=r.current,m=a.current;if(m!==e){const g=i.current,y=vh(f);e?d("MOUNT"):y==="none"||f?.display==="none"?d("UNMOUNT"):d(m&&g!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,d]),Ho(()=>{if(t){let f;const m=t.ownerDocument.defaultView??window,p=y=>{const b=vh(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&b&&(d("ANIMATION_END"),!a.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",f=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},g=y=>{y.target===t&&(i.current=vh(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{m.clearTimeout(f),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:A.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function vh(e){return e?.animationName||"none"}function LB(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var a0=0;function nN(){A.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??uO()),document.body.insertAdjacentElement("beforeend",e[1]??uO()),a0++,()=>{a0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),a0--}},[])}function uO(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var sa=function(){return sa=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},sa.apply(this,arguments)};function rN(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function jB(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Rp="right-scroll-bar-position",xp="width-before-scroll-bar",$B="with-scroll-bars-hidden",UB="--removed-body-scroll-bar-size";function s0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function zB(e,t){var n=A.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var VB=typeof window<"u"?A.useLayoutEffect:A.useEffect,dO=new WeakMap;function FB(e,t){var n=zB(null,function(r){return e.forEach(function(a){return s0(a,r)})});return VB(function(){var r=dO.get(n);if(r){var a=new Set(r),i=new Set(e),c=n.current;a.forEach(function(u){i.has(u)||s0(u,null)}),i.forEach(function(u){a.has(u)||s0(u,c)})}dO.set(n,e)},[e]),n}function BB(e){return e}function qB(e,t){t===void 0&&(t=BB);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var c=t(i,r);return n.push(c),function(){n=n.filter(function(u){return u!==c})}},assignSyncMedium:function(i){for(r=!0;n.length;){var c=n;n=[],c.forEach(i)}n={push:function(u){return i(u)},filter:function(){return n}}},assignMedium:function(i){r=!0;var c=[];if(n.length){var u=n;n=[],u.forEach(i),c=n}var d=function(){var m=c;c=[],m.forEach(i)},f=function(){return Promise.resolve().then(d)};f(),n={push:function(m){c.push(m),f()},filter:function(m){return c=c.filter(m),n}}}};return a}function HB(e){e===void 0&&(e={});var t=qB(null);return t.options=sa({async:!0,ssr:!1},e),t}var oN=function(e){var t=e.sideCar,n=rN(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return A.createElement(r,sa({},n))};oN.isSideCarExport=!0;function GB(e,t){return e.useMedium(t),oN}var aN=HB(),i0=function(){},Gm=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:i0,onWheelCapture:i0,onTouchMoveCapture:i0}),a=r[0],i=r[1],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,m=e.enabled,p=e.shards,g=e.sideCar,y=e.noRelative,w=e.noIsolation,b=e.inert,S=e.allowPinchZoom,R=e.as,E=R===void 0?"div":R,T=e.gapMode,O=rN(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=g,I=FB([n,t]),k=sa(sa({},O),a);return A.createElement(A.Fragment,null,m&&A.createElement(C,{sideCar:aN,removeScrollBar:f,shards:p,noRelative:y,noIsolation:w,inert:b,setCallbacks:i,allowPinchZoom:!!S,lockRef:n,gapMode:T}),c?A.cloneElement(A.Children.only(u),sa(sa({},k),{ref:I})):A.createElement(E,sa({},k,{className:d,ref:I}),u))});Gm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Gm.classNames={fullWidth:xp,zeroRight:Rp};var ZB=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function WB(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ZB();return t&&e.setAttribute("nonce",t),e}function KB(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function YB(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var QB=function(){var e=0,t=null;return{add:function(n){e==0&&(t=WB())&&(KB(t,n),YB(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},XB=function(){var e=QB();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},sN=function(){var e=XB(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},JB={left:0,top:0,right:0,gap:0},c0=function(e){return parseInt(e||"",10)||0},eq=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[c0(n),c0(r),c0(a)]},tq=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return JB;var t=eq(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nq=sN(),ll="data-scroll-locked",rq=function(e,t,n,r){var a=e.left,i=e.top,c=e.right,u=e.gap;return n===void 0&&(n="margin"),`
62
+ .`.concat($B,` {
63
+ overflow: hidden `).concat(r,`;
64
+ padding-right: `).concat(u,"px ").concat(r,`;
65
+ }
66
+ body[`).concat(ll,`] {
67
+ overflow: hidden `).concat(r,`;
68
+ overscroll-behavior: contain;
69
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
70
+ padding-left: `.concat(a,`px;
71
+ padding-top: `).concat(i,`px;
72
+ padding-right: `).concat(c,`px;
73
+ margin-left:0;
74
+ margin-top:0;
75
+ margin-right: `).concat(u,"px ").concat(r,`;
76
+ `),n==="padding"&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),`
77
+ }
78
+
79
+ .`).concat(Rp,` {
80
+ right: `).concat(u,"px ").concat(r,`;
81
+ }
82
+
83
+ .`).concat(xp,` {
84
+ margin-right: `).concat(u,"px ").concat(r,`;
85
+ }
86
+
87
+ .`).concat(Rp," .").concat(Rp,` {
88
+ right: 0 `).concat(r,`;
89
+ }
90
+
91
+ .`).concat(xp," .").concat(xp,` {
92
+ margin-right: 0 `).concat(r,`;
93
+ }
94
+
95
+ body[`).concat(ll,`] {
96
+ `).concat(UB,": ").concat(u,`px;
97
+ }
98
+ `)},fO=function(){var e=parseInt(document.body.getAttribute(ll)||"0",10);return isFinite(e)?e:0},oq=function(){A.useEffect(function(){return document.body.setAttribute(ll,(fO()+1).toString()),function(){var e=fO()-1;e<=0?document.body.removeAttribute(ll):document.body.setAttribute(ll,e.toString())}},[])},aq=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;oq();var i=A.useMemo(function(){return tq(a)},[a]);return A.createElement(nq,{styles:rq(i,!t,a,n?"":"!important")})},T_=!1;if(typeof window<"u")try{var yh=Object.defineProperty({},"passive",{get:function(){return T_=!0,!0}});window.addEventListener("test",yh,yh),window.removeEventListener("test",yh,yh)}catch{T_=!1}var Uc=T_?{passive:!1}:!1,sq=function(e){return e.tagName==="TEXTAREA"},iN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sq(e)&&n[t]==="visible")},iq=function(e){return iN(e,"overflowY")},cq=function(e){return iN(e,"overflowX")},hO=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=cN(e,r);if(a){var i=lN(e,r),c=i[1],u=i[2];if(c>u)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lq=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},uq=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cN=function(e,t){return e==="v"?iq(t):cq(t)},lN=function(e,t){return e==="v"?lq(t):uq(t)},dq=function(e,t){return e==="h"&&t==="rtl"?-1:1},fq=function(e,t,n,r,a){var i=dq(e,window.getComputedStyle(t).direction),c=i*r,u=n.target,d=t.contains(u),f=!1,m=c>0,p=0,g=0;do{if(!u)break;var y=lN(e,u),w=y[0],b=y[1],S=y[2],R=b-S-i*w;(w||R)&&cN(e,u)&&(p+=R,g+=w);var E=u.parentNode;u=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!d&&u!==document.body||d&&(t.contains(u)||t===u));return(m&&Math.abs(p)<1||!m&&Math.abs(g)<1)&&(f=!0),f},_h=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},pO=function(e){return[e.deltaX,e.deltaY]},mO=function(e){return e&&"current"in e?e.current:e},hq=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pq=function(e){return`
99
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
100
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
101
+ `)},mq=0,zc=[];function gq(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),a=A.useState(mq++)[0],i=A.useState(sN)[0],c=A.useRef(e);A.useEffect(function(){c.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var b=jB([e.lockRef.current],(e.shards||[]).map(mO),!0).filter(Boolean);return b.forEach(function(S){return S.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),b.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var u=A.useCallback(function(b,S){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!c.current.allowPinchZoom;var R=_h(b),E=n.current,T="deltaX"in b?b.deltaX:E[0]-R[0],O="deltaY"in b?b.deltaY:E[1]-R[1],C,I=b.target,k=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in b&&k==="h"&&I.type==="range")return!1;var P=window.getSelection(),$=P&&P.anchorNode,W=$?$===I||$.contains(I):!1;if(W)return!1;var V=hO(k,I);if(!V)return!0;if(V?C=k:(C=k==="v"?"h":"v",V=hO(k,I)),!V)return!1;if(!r.current&&"changedTouches"in b&&(T||O)&&(r.current=C),!C)return!0;var G=r.current||C;return fq(G,S,b,G==="h"?T:O)},[]),d=A.useCallback(function(b){var S=b;if(!(!zc.length||zc[zc.length-1]!==i)){var R="deltaY"in S?pO(S):_h(S),E=t.current.filter(function(C){return C.name===S.type&&(C.target===S.target||S.target===C.shadowParent)&&hq(C.delta,R)})[0];if(E&&E.should){S.cancelable&&S.preventDefault();return}if(!E){var T=(c.current.shards||[]).map(mO).filter(Boolean).filter(function(C){return C.contains(S.target)}),O=T.length>0?u(S,T[0]):!c.current.noIsolation;O&&S.cancelable&&S.preventDefault()}}},[]),f=A.useCallback(function(b,S,R,E){var T={name:b,delta:S,target:R,should:E,shadowParent:vq(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),m=A.useCallback(function(b){n.current=_h(b),r.current=void 0},[]),p=A.useCallback(function(b){f(b.type,pO(b),b.target,u(b,e.lockRef.current))},[]),g=A.useCallback(function(b){f(b.type,_h(b),b.target,u(b,e.lockRef.current))},[]);A.useEffect(function(){return zc.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:g}),document.addEventListener("wheel",d,Uc),document.addEventListener("touchmove",d,Uc),document.addEventListener("touchstart",m,Uc),function(){zc=zc.filter(function(b){return b!==i}),document.removeEventListener("wheel",d,Uc),document.removeEventListener("touchmove",d,Uc),document.removeEventListener("touchstart",m,Uc)}},[]);var y=e.removeScrollBar,w=e.inert;return A.createElement(A.Fragment,null,w?A.createElement(i,{styles:pq(a)}):null,y?A.createElement(aq,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function vq(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const yq=GB(aN,gq);var a1=A.forwardRef(function(e,t){return A.createElement(Gm,sa({},e,{ref:t,sideCar:yq}))});a1.classNames=Gm.classNames;var _q=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Vc=new WeakMap,bh=new WeakMap,wh={},l0=0,uN=function(e){return e&&(e.host||uN(e.parentNode))},bq=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uN(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},wq=function(e,t,n,r){var a=bq(t,Array.isArray(e)?e:[e]);wh[n]||(wh[n]=new WeakMap);var i=wh[n],c=[],u=new Set,d=new Set(a),f=function(p){!p||u.has(p)||(u.add(p),f(p.parentNode))};a.forEach(f);var m=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(u.has(g))m(g);else try{var y=g.getAttribute(r),w=y!==null&&y!=="false",b=(Vc.get(g)||0)+1,S=(i.get(g)||0)+1;Vc.set(g,b),i.set(g,S),c.push(g),b===1&&w&&bh.set(g,!0),S===1&&g.setAttribute(n,"true"),w||g.setAttribute(r,"true")}catch(R){console.error("aria-hidden: cannot operate on ",g,R)}})};return m(t),u.clear(),l0++,function(){c.forEach(function(p){var g=Vc.get(p)-1,y=i.get(p)-1;Vc.set(p,g),i.set(p,y),g||(bh.has(p)||p.removeAttribute(r),bh.delete(p)),y||p.removeAttribute(n)}),l0--,l0||(Vc=new WeakMap,Vc=new WeakMap,bh=new WeakMap,wh={})}},dN=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=_q(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),wq(r,a,n,"aria-hidden")):function(){return null}},Zm="Dialog",[fN,xae]=Ki(Zm),[Sq,Ko]=fN(Zm),hN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:c=!0}=e,u=A.useRef(null),d=A.useRef(null),[f,m]=Od({prop:r,defaultProp:a??!1,onChange:i,caller:Zm});return x.jsx(Sq,{scope:t,triggerRef:u,contentRef:d,contentId:zs(),titleId:zs(),descriptionId:zs(),open:f,onOpenChange:m,onOpenToggle:A.useCallback(()=>m(p=>!p),[m]),modal:c,children:n})};hN.displayName=Zm;var pN="DialogTrigger",mN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ko(pN,n),i=qn(t,a.triggerRef);return x.jsx(pn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":c1(a.open),...r,ref:i,onClick:ut(e.onClick,a.onOpenToggle)})});mN.displayName=pN;var s1="DialogPortal",[Eq,gN]=fN(s1,{forceMount:void 0}),vN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,i=Ko(s1,t);return x.jsx(Eq,{scope:t,forceMount:n,children:A.Children.map(r,c=>x.jsx(Ka,{present:n||i.open,children:x.jsx(o1,{asChild:!0,container:a,children:c})}))})};vN.displayName=s1;var nm="DialogOverlay",yN=A.forwardRef((e,t)=>{const n=gN(nm,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Ko(nm,e.__scopeDialog);return i.modal?x.jsx(Ka,{present:r||i.open,children:x.jsx(xq,{...a,ref:t})}):null});yN.displayName=nm;var Rq=ud("DialogOverlay.RemoveScroll"),xq=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ko(nm,n);return x.jsx(a1,{as:Rq,allowPinchZoom:!0,shards:[a.contentRef],children:x.jsx(pn.div,{"data-state":c1(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Vi="DialogContent",_N=A.forwardRef((e,t)=>{const n=gN(Vi,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Ko(Vi,e.__scopeDialog);return x.jsx(Ka,{present:r||i.open,children:i.modal?x.jsx(Tq,{...a,ref:t}):x.jsx(Oq,{...a,ref:t})})});_N.displayName=Vi;var Tq=A.forwardRef((e,t)=>{const n=Ko(Vi,e.__scopeDialog),r=A.useRef(null),a=qn(t,n.contentRef,r);return A.useEffect(()=>{const i=r.current;if(i)return dN(i)},[]),x.jsx(bN,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ut(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ut(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&i.preventDefault()}),onFocusOutside:ut(e.onFocusOutside,i=>i.preventDefault())})}),Oq=A.forwardRef((e,t)=>{const n=Ko(Vi,e.__scopeDialog),r=A.useRef(!1),a=A.useRef(!1);return x.jsx(bN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const c=i.target;n.triggerRef.current?.contains(c)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),bN=A.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...c}=e,u=Ko(Vi,n),d=A.useRef(null),f=qn(t,d);return nN(),x.jsxs(x.Fragment,{children:[x.jsx(r1,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:x.jsx(n1,{role:"dialog",id:u.contentId,"aria-describedby":u.descriptionId,"aria-labelledby":u.titleId,"data-state":c1(u.open),...c,ref:f,onDismiss:()=>u.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(Cq,{titleId:u.titleId}),x.jsx(Iq,{contentRef:d,descriptionId:u.descriptionId})]})]})}),i1="DialogTitle",wN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ko(i1,n);return x.jsx(pn.h2,{id:a.titleId,...r,ref:t})});wN.displayName=i1;var SN="DialogDescription",EN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ko(SN,n);return x.jsx(pn.p,{id:a.descriptionId,...r,ref:t})});EN.displayName=SN;var RN="DialogClose",xN=A.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Ko(RN,n);return x.jsx(pn.button,{type:"button",...r,ref:t,onClick:ut(e.onClick,()=>a.onOpenChange(!1))})});xN.displayName=RN;function c1(e){return e?"open":"closed"}var TN="DialogTitleWarning",[Tae,ON]=sB(TN,{contentName:Vi,titleName:i1,docsSlug:"dialog"}),Cq=({titleId:e})=>{const t=ON(TN),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
102
+
103
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
104
+
105
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Aq="DialogDescriptionWarning",Iq=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ON(Aq).contentName}}.`;return A.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},kq=hN,Nq=mN,Mq=vN,Pq=yN,Dq=_N,Lq=wN,jq=EN,$q=xN;function CN(e){const t=e+"CollectionProvider",[n,r]=Ki(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=b=>{const{scope:S,children:R}=b,E=ee.useRef(null),T=ee.useRef(new Map).current;return x.jsx(a,{scope:S,itemMap:T,collectionRef:E,children:R})};c.displayName=t;const u=e+"CollectionSlot",d=ud(u),f=ee.forwardRef((b,S)=>{const{scope:R,children:E}=b,T=i(u,R),O=qn(S,T.collectionRef);return x.jsx(d,{ref:O,children:E})});f.displayName=u;const m=e+"CollectionItemSlot",p="data-radix-collection-item",g=ud(m),y=ee.forwardRef((b,S)=>{const{scope:R,children:E,...T}=b,O=ee.useRef(null),C=qn(S,O),I=i(m,R);return ee.useEffect(()=>(I.itemMap.set(O,{ref:O,...T}),()=>{I.itemMap.delete(O)})),x.jsx(g,{[p]:"",ref:C,children:E})});y.displayName=m;function w(b){const S=i(e+"CollectionConsumer",b);return ee.useCallback(()=>{const E=S.collectionRef.current;if(!E)return[];const T=Array.from(E.querySelectorAll(`[${p}]`));return Array.from(S.itemMap.values()).sort((I,k)=>T.indexOf(I.ref.current)-T.indexOf(k.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:c,Slot:f,ItemSlot:y},w,r]}var Uq=A.createContext(void 0);function AN(e){const t=A.useContext(Uq);return e||t||"ltr"}const zq=["top","right","bottom","left"],Hs=Math.min,Jr=Math.max,rm=Math.round,Sh=Math.floor,ca=e=>({x:e,y:e}),Vq={left:"right",right:"left",bottom:"top",top:"bottom"};function O_(e,t,n){return Jr(e,Hs(t,n))}function Ba(e,t){return typeof e=="function"?e(t):e}function qa(e){return e.split("-")[0]}function Ol(e){return e.split("-")[1]}function l1(e){return e==="x"?"y":"x"}function u1(e){return e==="y"?"height":"width"}function ia(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function d1(e){return l1(ia(e))}function Fq(e,t,n){n===void 0&&(n=!1);const r=Ol(e),a=d1(e),i=u1(a);let c=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(c=om(c)),[c,om(c)]}function Bq(e){const t=om(e);return[C_(e),t,C_(t)]}function C_(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gO=["left","right"],vO=["right","left"],qq=["top","bottom"],Hq=["bottom","top"];function Gq(e,t,n){switch(e){case"top":case"bottom":return n?t?vO:gO:t?gO:vO;case"left":case"right":return t?qq:Hq;default:return[]}}function Zq(e,t,n,r){const a=Ol(e);let i=Gq(qa(e),n==="start",r);return a&&(i=i.map(c=>c+"-"+a),t&&(i=i.concat(i.map(C_)))),i}function om(e){const t=qa(e);return Vq[t]+e.slice(t.length)}function Wq(e){return{top:0,right:0,bottom:0,left:0,...e}}function IN(e){return typeof e!="number"?Wq(e):{top:e,right:e,bottom:e,left:e}}function am(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function yO(e,t,n){let{reference:r,floating:a}=e;const i=ia(t),c=d1(t),u=u1(c),d=qa(t),f=i==="y",m=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2,g=r[u]/2-a[u]/2;let y;switch(d){case"top":y={x:m,y:r.y-a.height};break;case"bottom":y={x:m,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-a.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Ol(t)){case"start":y[c]-=g*(n&&f?-1:1);break;case"end":y[c]+=g*(n&&f?-1:1);break}return y}async function Kq(e,t){var n;t===void 0&&(t={});const{x:r,y:a,platform:i,rects:c,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:m="viewport",elementContext:p="floating",altBoundary:g=!1,padding:y=0}=Ba(t,e),w=IN(y),S=u[g?p==="floating"?"reference":"floating":p],R=am(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(u.floating)),boundary:f,rootBoundary:m,strategy:d})),E=p==="floating"?{x:r,y:a,width:c.floating.width,height:c.floating.height}:c.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u.floating)),O=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},C=am(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:E,offsetParent:T,strategy:d}):E);return{top:(R.top-C.top+w.top)/O.y,bottom:(C.bottom-R.bottom+w.bottom)/O.y,left:(R.left-C.left+w.left)/O.x,right:(C.right-R.right+w.right)/O.x}}const Yq=50,Qq=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:c}=n,u=c.detectOverflow?c:{...c,detectOverflow:Kq},d=await(c.isRTL==null?void 0:c.isRTL(t));let f=await c.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:p}=yO(f,r,d),g=r,y=0;const w={};for(let b=0;b<i.length;b++){const S=i[b];if(!S)continue;const{name:R,fn:E}=S,{x:T,y:O,data:C,reset:I}=await E({x:m,y:p,initialPlacement:r,placement:g,strategy:a,middlewareData:w,rects:f,platform:u,elements:{reference:e,floating:t}});m=T??m,p=O??p,w[R]={...w[R],...C},I&&y<Yq&&(y++,typeof I=="object"&&(I.placement&&(g=I.placement),I.rects&&(f=I.rects===!0?await c.getElementRects({reference:e,floating:t,strategy:a}):I.rects),{x:m,y:p}=yO(f,g,d)),b=-1)}return{x:m,y:p,placement:g,strategy:a,middlewareData:w}},Xq=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:i,platform:c,elements:u,middlewareData:d}=t,{element:f,padding:m=0}=Ba(e,t)||{};if(f==null)return{};const p=IN(m),g={x:n,y:r},y=d1(a),w=u1(y),b=await c.getDimensions(f),S=y==="y",R=S?"top":"left",E=S?"bottom":"right",T=S?"clientHeight":"clientWidth",O=i.reference[w]+i.reference[y]-g[y]-i.floating[w],C=g[y]-i.reference[y],I=await(c.getOffsetParent==null?void 0:c.getOffsetParent(f));let k=I?I[T]:0;(!k||!await(c.isElement==null?void 0:c.isElement(I)))&&(k=u.floating[T]||i.floating[w]);const P=O/2-C/2,$=k/2-b[w]/2-1,W=Hs(p[R],$),V=Hs(p[E],$),G=W,U=k-b[w]-V,J=k/2-b[w]/2+P,le=O_(G,J,U),F=!d.arrow&&Ol(a)!=null&&J!==le&&i.reference[w]/2-(J<G?W:V)-b[w]/2<0,Y=F?J<G?J-G:J-U:0;return{[y]:g[y]+Y,data:{[y]:le,centerOffset:J-le-Y,...F&&{alignmentOffset:Y}},reset:F}}}),Jq=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:i,rects:c,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:m=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:b=!0,...S}=Ba(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const R=qa(a),E=ia(u),T=qa(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),C=g||(T||!b?[om(u)]:Bq(u)),I=w!=="none";!g&&I&&C.push(...Zq(u,b,w,O));const k=[u,...C],P=await d.detectOverflow(t,S),$=[];let W=((r=i.flip)==null?void 0:r.overflows)||[];if(m&&$.push(P[R]),p){const J=Fq(a,c,O);$.push(P[J[0]],P[J[1]])}if(W=[...W,{placement:a,overflows:$}],!$.every(J=>J<=0)){var V,G;const J=(((V=i.flip)==null?void 0:V.index)||0)+1,le=k[J];if(le&&(!(p==="alignment"?E!==ia(le):!1)||W.every(se=>ia(se.placement)===E?se.overflows[0]>0:!0)))return{data:{index:J,overflows:W},reset:{placement:le}};let F=(G=W.filter(Y=>Y.overflows[0]<=0).sort((Y,se)=>Y.overflows[1]-se.overflows[1])[0])==null?void 0:G.placement;if(!F)switch(y){case"bestFit":{var U;const Y=(U=W.filter(se=>{if(I){const fe=ia(se.placement);return fe===E||fe==="y"}return!0}).map(se=>[se.placement,se.overflows.filter(fe=>fe>0).reduce((fe,K)=>fe+K,0)]).sort((se,fe)=>se[1]-fe[1])[0])==null?void 0:U[0];Y&&(F=Y);break}case"initialPlacement":F=u;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function _O(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bO(e){return zq.some(t=>e[t]>=0)}const eH=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:a="referenceHidden",...i}=Ba(e,t);switch(a){case"referenceHidden":{const c=await r.detectOverflow(t,{...i,elementContext:"reference"}),u=_O(c,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:bO(u)}}}case"escaped":{const c=await r.detectOverflow(t,{...i,altBoundary:!0}),u=_O(c,n.floating);return{data:{escapedOffsets:u,escaped:bO(u)}}}default:return{}}}}},kN=new Set(["left","top"]);async function tH(e,t){const{placement:n,platform:r,elements:a}=e,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),c=qa(n),u=Ol(n),d=ia(n)==="y",f=kN.has(c)?-1:1,m=i&&d?-1:1,p=Ba(t,e);let{mainAxis:g,crossAxis:y,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof w=="number"&&(y=u==="end"?w*-1:w),d?{x:y*m,y:g*f}:{x:g*f,y:y*m}}const nH=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:i,placement:c,middlewareData:u}=t,d=await tH(t,e);return c===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:a+d.x,y:i+d.y,data:{...d,placement:c}}}}},rH=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a,platform:i}=t,{mainAxis:c=!0,crossAxis:u=!1,limiter:d={fn:R=>{let{x:E,y:T}=R;return{x:E,y:T}}},...f}=Ba(e,t),m={x:n,y:r},p=await i.detectOverflow(t,f),g=ia(qa(a)),y=l1(g);let w=m[y],b=m[g];if(c){const R=y==="y"?"top":"left",E=y==="y"?"bottom":"right",T=w+p[R],O=w-p[E];w=O_(T,w,O)}if(u){const R=g==="y"?"top":"left",E=g==="y"?"bottom":"right",T=b+p[R],O=b-p[E];b=O_(T,b,O)}const S=d.fn({...t,[y]:w,[g]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:c,[g]:u}}}}}},oH=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:i,middlewareData:c}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Ba(e,t),m={x:n,y:r},p=ia(a),g=l1(p);let y=m[g],w=m[p];const b=Ba(u,t),S=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(d){const T=g==="y"?"height":"width",O=i.reference[g]-i.floating[T]+S.mainAxis,C=i.reference[g]+i.reference[T]-S.mainAxis;y<O?y=O:y>C&&(y=C)}if(f){var R,E;const T=g==="y"?"width":"height",O=kN.has(qa(a)),C=i.reference[p]-i.floating[T]+(O&&((R=c.offset)==null?void 0:R[p])||0)+(O?0:S.crossAxis),I=i.reference[p]+i.reference[T]+(O?0:((E=c.offset)==null?void 0:E[p])||0)-(O?S.crossAxis:0);w<C?w=C:w>I&&(w=I)}return{[g]:y,[p]:w}}}},aH=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:i,platform:c,elements:u}=t,{apply:d=()=>{},...f}=Ba(e,t),m=await c.detectOverflow(t,f),p=qa(a),g=Ol(a),y=ia(a)==="y",{width:w,height:b}=i.floating;let S,R;p==="top"||p==="bottom"?(S=p,R=g===(await(c.isRTL==null?void 0:c.isRTL(u.floating))?"start":"end")?"left":"right"):(R=p,S=g==="end"?"top":"bottom");const E=b-m.top-m.bottom,T=w-m.left-m.right,O=Hs(b-m[S],E),C=Hs(w-m[R],T),I=!t.middlewareData.shift;let k=O,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=T),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=E),I&&!g){const W=Jr(m.left,0),V=Jr(m.right,0),G=Jr(m.top,0),U=Jr(m.bottom,0);y?P=w-2*(W!==0||V!==0?W+V:Jr(m.left,m.right)):k=b-2*(G!==0||U!==0?G+U:Jr(m.top,m.bottom))}await d({...t,availableWidth:P,availableHeight:k});const $=await c.getDimensions(u.floating);return w!==$.width||b!==$.height?{reset:{rects:!0}}:{}}}};function Wm(){return typeof window<"u"}function Cl(e){return NN(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ha(e){var t;return(t=(NN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function NN(e){return Wm()?e instanceof Node||e instanceof no(e).Node:!1}function Zo(e){return Wm()?e instanceof Element||e instanceof no(e).Element:!1}function Ya(e){return Wm()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function wO(e){return!Wm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}function Cd(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Wo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&a!=="inline"&&a!=="contents"}function sH(e){return/^(table|td|th)$/.test(Cl(e))}function Km(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const iH=/transform|translate|scale|rotate|perspective|filter/,cH=/paint|layout|strict|content/,bi=e=>!!e&&e!=="none";let u0;function f1(e){const t=Zo(e)?Wo(e):e;return bi(t.transform)||bi(t.translate)||bi(t.scale)||bi(t.rotate)||bi(t.perspective)||!h1()&&(bi(t.backdropFilter)||bi(t.filter))||iH.test(t.willChange||"")||cH.test(t.contain||"")}function lH(e){let t=Gs(e);for(;Ya(t)&&!vl(t);){if(f1(t))return t;if(Km(t))return null;t=Gs(t)}return null}function h1(){return u0==null&&(u0=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),u0}function vl(e){return/^(html|body|#document)$/.test(Cl(e))}function Wo(e){return no(e).getComputedStyle(e)}function Ym(e){return Zo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Gs(e){if(Cl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wO(e)&&e.host||ha(e);return wO(t)?t.host:t}function MN(e){const t=Gs(e);return vl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ya(t)&&Cd(t)?t:MN(t)}function dd(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=MN(e),i=a===((r=e.ownerDocument)==null?void 0:r.body),c=no(a);if(i){const u=A_(c);return t.concat(c,c.visualViewport||[],Cd(a)?a:[],u&&n?dd(u):[])}else return t.concat(a,dd(a,[],n))}function A_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function PN(e){const t=Wo(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=Ya(e),i=a?e.offsetWidth:n,c=a?e.offsetHeight:r,u=rm(n)!==i||rm(r)!==c;return u&&(n=i,r=c),{width:n,height:r,$:u}}function p1(e){return Zo(e)?e:e.contextElement}function ul(e){const t=p1(e);if(!Ya(t))return ca(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=PN(t);let c=(i?rm(n.width):n.width)/r,u=(i?rm(n.height):n.height)/a;return(!c||!Number.isFinite(c))&&(c=1),(!u||!Number.isFinite(u))&&(u=1),{x:c,y:u}}const uH=ca(0);function DN(e){const t=no(e);return!h1()||!t.visualViewport?uH:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dH(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==no(e)?!1:t}function Fi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=p1(e);let c=ca(1);t&&(r?Zo(r)&&(c=ul(r)):c=ul(e));const u=dH(i,n,r)?DN(i):ca(0);let d=(a.left+u.x)/c.x,f=(a.top+u.y)/c.y,m=a.width/c.x,p=a.height/c.y;if(i){const g=no(i),y=r&&Zo(r)?no(r):r;let w=g,b=A_(w);for(;b&&r&&y!==w;){const S=ul(b),R=b.getBoundingClientRect(),E=Wo(b),T=R.left+(b.clientLeft+parseFloat(E.paddingLeft))*S.x,O=R.top+(b.clientTop+parseFloat(E.paddingTop))*S.y;d*=S.x,f*=S.y,m*=S.x,p*=S.y,d+=T,f+=O,w=no(b),b=A_(w)}}return am({width:m,height:p,x:d,y:f})}function Qm(e,t){const n=Ym(e).scrollLeft;return t?t.left+n:Fi(ha(e)).left+n}function LN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Qm(e,n),a=n.top+t.scrollTop;return{x:r,y:a}}function fH(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i=a==="fixed",c=ha(r),u=t?Km(t.floating):!1;if(r===c||u&&i)return n;let d={scrollLeft:0,scrollTop:0},f=ca(1);const m=ca(0),p=Ya(r);if((p||!p&&!i)&&((Cl(r)!=="body"||Cd(c))&&(d=Ym(r)),p)){const y=Fi(r);f=ul(r),m.x=y.x+r.clientLeft,m.y=y.y+r.clientTop}const g=c&&!p&&!i?LN(c,d):ca(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+m.x+g.x,y:n.y*f.y-d.scrollTop*f.y+m.y+g.y}}function hH(e){return Array.from(e.getClientRects())}function pH(e){const t=ha(e),n=Ym(e),r=e.ownerDocument.body,a=Jr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Jr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let c=-n.scrollLeft+Qm(e);const u=-n.scrollTop;return Wo(r).direction==="rtl"&&(c+=Jr(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:c,y:u}}const SO=25;function mH(e,t){const n=no(e),r=ha(e),a=n.visualViewport;let i=r.clientWidth,c=r.clientHeight,u=0,d=0;if(a){i=a.width,c=a.height;const m=h1();(!m||m&&t==="fixed")&&(u=a.offsetLeft,d=a.offsetTop)}const f=Qm(r);if(f<=0){const m=r.ownerDocument,p=m.body,g=getComputedStyle(p),y=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(r.clientWidth-p.clientWidth-y);w<=SO&&(i-=w)}else f<=SO&&(i+=f);return{width:i,height:c,x:u,y:d}}function gH(e,t){const n=Fi(e,!0,t==="fixed"),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=Ya(e)?ul(e):ca(1),c=e.clientWidth*i.x,u=e.clientHeight*i.y,d=a*i.x,f=r*i.y;return{width:c,height:u,x:d,y:f}}function EO(e,t,n){let r;if(t==="viewport")r=mH(e,n);else if(t==="document")r=pH(ha(e));else if(Zo(t))r=gH(t,n);else{const a=DN(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return am(r)}function jN(e,t){const n=Gs(e);return n===t||!Zo(n)||vl(n)?!1:Wo(n).position==="fixed"||jN(n,t)}function vH(e,t){const n=t.get(e);if(n)return n;let r=dd(e,[],!1).filter(u=>Zo(u)&&Cl(u)!=="body"),a=null;const i=Wo(e).position==="fixed";let c=i?Gs(e):e;for(;Zo(c)&&!vl(c);){const u=Wo(c),d=f1(c);!d&&u.position==="fixed"&&(a=null),(i?!d&&!a:!d&&u.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Cd(c)&&!d&&jN(e,c))?r=r.filter(m=>m!==c):a=u,c=Gs(c)}return t.set(e,r),r}function yH(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const c=[...n==="clippingAncestors"?Km(t)?[]:vH(t,this._c):[].concat(n),r],u=EO(t,c[0],a);let d=u.top,f=u.right,m=u.bottom,p=u.left;for(let g=1;g<c.length;g++){const y=EO(t,c[g],a);d=Jr(y.top,d),f=Hs(y.right,f),m=Hs(y.bottom,m),p=Jr(y.left,p)}return{width:f-p,height:m-d,x:p,y:d}}function _H(e){const{width:t,height:n}=PN(e);return{width:t,height:n}}function bH(e,t,n){const r=Ya(t),a=ha(t),i=n==="fixed",c=Fi(e,!0,i,t);let u={scrollLeft:0,scrollTop:0};const d=ca(0);function f(){d.x=Qm(a)}if(r||!r&&!i)if((Cl(t)!=="body"||Cd(a))&&(u=Ym(t)),r){const y=Fi(t,!0,i,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else a&&f();i&&!r&&a&&f();const m=a&&!r&&!i?LN(a,u):ca(0),p=c.left+u.scrollLeft-d.x-m.x,g=c.top+u.scrollTop-d.y-m.y;return{x:p,y:g,width:c.width,height:c.height}}function d0(e){return Wo(e).position==="static"}function RO(e,t){if(!Ya(e)||Wo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ha(e)===n&&(n=n.ownerDocument.body),n}function $N(e,t){const n=no(e);if(Km(e))return n;if(!Ya(e)){let a=Gs(e);for(;a&&!vl(a);){if(Zo(a)&&!d0(a))return a;a=Gs(a)}return n}let r=RO(e,t);for(;r&&sH(r)&&d0(r);)r=RO(r,t);return r&&vl(r)&&d0(r)&&!f1(r)?n:r||lH(e)||n}const wH=async function(e){const t=this.getOffsetParent||$N,n=this.getDimensions,r=await n(e.floating);return{reference:bH(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function SH(e){return Wo(e).direction==="rtl"}const EH={convertOffsetParentRelativeRectToViewportRelativeRect:fH,getDocumentElement:ha,getClippingRect:yH,getOffsetParent:$N,getElementRects:wH,getClientRects:hH,getDimensions:_H,getScale:ul,isElement:Zo,isRTL:SH};function UN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function RH(e,t){let n=null,r;const a=ha(e);function i(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function c(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),i();const f=e.getBoundingClientRect(),{left:m,top:p,width:g,height:y}=f;if(u||t(),!g||!y)return;const w=Sh(p),b=Sh(a.clientWidth-(m+g)),S=Sh(a.clientHeight-(p+y)),R=Sh(m),T={rootMargin:-w+"px "+-b+"px "+-S+"px "+-R+"px",threshold:Jr(0,Hs(1,d))||1};let O=!0;function C(I){const k=I[0].intersectionRatio;if(k!==d){if(!O)return c();k?c(!1,k):r=setTimeout(()=>{c(!1,1e-7)},1e3)}k===1&&!UN(f,e.getBoundingClientRect())&&c(),O=!1}try{n=new IntersectionObserver(C,{...T,root:a.ownerDocument})}catch{n=new IntersectionObserver(C,T)}n.observe(e)}return c(!0),i}function xH(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=p1(e),m=a||i?[...f?dd(f):[],...t?dd(t):[]]:[];m.forEach(R=>{a&&R.addEventListener("scroll",n,{passive:!0}),i&&R.addEventListener("resize",n)});const p=f&&u?RH(f,n):null;let g=-1,y=null;c&&(y=new ResizeObserver(R=>{let[E]=R;E&&E.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var T;(T=y)==null||T.observe(t)})),n()}),f&&!d&&y.observe(f),t&&y.observe(t));let w,b=d?Fi(e):null;d&&S();function S(){const R=Fi(e);b&&!UN(b,R)&&n(),b=R,w=requestAnimationFrame(S)}return n(),()=>{var R;m.forEach(E=>{a&&E.removeEventListener("scroll",n),i&&E.removeEventListener("resize",n)}),p?.(),(R=y)==null||R.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const TH=nH,OH=rH,CH=Jq,AH=aH,IH=eH,xO=Xq,kH=oH,NH=(e,t,n)=>{const r=new Map,a={platform:EH,...n},i={...a.platform,_c:r};return Qq(e,t,{...a,platform:i})};var MH=typeof document<"u",PH=function(){},Tp=MH?A.useLayoutEffect:PH;function sm(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sm(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&e.$$typeof)&&!sm(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function zN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function TO(e,t){const n=zN(e);return Math.round(t*n)/n}function f0(e){const t=A.useRef(e);return Tp(()=>{t.current=e}),t}function DH(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:c}={},transform:u=!0,whileElementsMounted:d,open:f}=e,[m,p]=A.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,y]=A.useState(r);sm(g,r)||y(r);const[w,b]=A.useState(null),[S,R]=A.useState(null),E=A.useCallback(se=>{se!==I.current&&(I.current=se,b(se))},[]),T=A.useCallback(se=>{se!==k.current&&(k.current=se,R(se))},[]),O=i||w,C=c||S,I=A.useRef(null),k=A.useRef(null),P=A.useRef(m),$=d!=null,W=f0(d),V=f0(a),G=f0(f),U=A.useCallback(()=>{if(!I.current||!k.current)return;const se={placement:t,strategy:n,middleware:g};V.current&&(se.platform=V.current),NH(I.current,k.current,se).then(fe=>{const K={...fe,isPositioned:G.current!==!1};J.current&&!sm(P.current,K)&&(P.current=K,Pm.flushSync(()=>{p(K)}))})},[g,t,n,V,G]);Tp(()=>{f===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(se=>({...se,isPositioned:!1})))},[f]);const J=A.useRef(!1);Tp(()=>(J.current=!0,()=>{J.current=!1}),[]),Tp(()=>{if(O&&(I.current=O),C&&(k.current=C),O&&C){if(W.current)return W.current(O,C,U);U()}},[O,C,U,W,$]);const le=A.useMemo(()=>({reference:I,floating:k,setReference:E,setFloating:T}),[E,T]),F=A.useMemo(()=>({reference:O,floating:C}),[O,C]),Y=A.useMemo(()=>{const se={position:n,left:0,top:0};if(!F.floating)return se;const fe=TO(F.floating,m.x),K=TO(F.floating,m.y);return u?{...se,transform:"translate("+fe+"px, "+K+"px)",...zN(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:fe,top:K}},[n,u,F.floating,m.x,m.y]);return A.useMemo(()=>({...m,update:U,refs:le,elements:F,floatingStyles:Y}),[m,U,le,F,Y])}const LH=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:a}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?xO({element:r.current,padding:a}).fn(n):{}:r?xO({element:r,padding:a}).fn(n):{}}}},jH=(e,t)=>{const n=TH(e);return{name:n.name,fn:n.fn,options:[e,t]}},$H=(e,t)=>{const n=OH(e);return{name:n.name,fn:n.fn,options:[e,t]}},UH=(e,t)=>({fn:kH(e).fn,options:[e,t]}),zH=(e,t)=>{const n=CH(e);return{name:n.name,fn:n.fn,options:[e,t]}},VH=(e,t)=>{const n=AH(e);return{name:n.name,fn:n.fn,options:[e,t]}},FH=(e,t)=>{const n=IH(e);return{name:n.name,fn:n.fn,options:[e,t]}},BH=(e,t)=>{const n=LH(e);return{name:n.name,fn:n.fn,options:[e,t]}};var qH="Arrow",VN=A.forwardRef((e,t)=>{const{children:n,width:r=10,height:a=5,...i}=e;return x.jsx(pn.svg,{...i,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});VN.displayName=qH;var HH=VN;function FN(e){const[t,n]=A.useState(void 0);return Ho(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let c,u;if("borderBoxSize"in i){const d=i.borderBoxSize,f=Array.isArray(d)?d[0]:d;c=f.inlineSize,u=f.blockSize}else c=e.offsetWidth,u=e.offsetHeight;n({width:c,height:u})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var m1="Popper",[BN,qN]=Ki(m1),[GH,HN]=BN(m1),GN=e=>{const{__scopePopper:t,children:n}=e,[r,a]=A.useState(null);return x.jsx(GH,{scope:t,anchor:r,onAnchorChange:a,children:n})};GN.displayName=m1;var ZN="PopperAnchor",WN=A.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,i=HN(ZN,n),c=A.useRef(null),u=qn(t,c),d=A.useRef(null);return A.useEffect(()=>{const f=d.current;d.current=r?.current||c.current,f!==d.current&&i.onAnchorChange(d.current)}),r?null:x.jsx(pn.div,{...a,ref:u})});WN.displayName=ZN;var g1="PopperContent",[ZH,WH]=BN(g1),KN=A.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:d=!0,collisionBoundary:f=[],collisionPadding:m=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:y="optimized",onPlaced:w,...b}=e,S=HN(g1,n),[R,E]=A.useState(null),T=qn(t,me=>E(me)),[O,C]=A.useState(null),I=FN(O),k=I?.width??0,P=I?.height??0,$=r+(i!=="center"?"-"+i:""),W=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},V=Array.isArray(f)?f:[f],G=V.length>0,U={padding:W,boundary:V.filter(YH),altBoundary:G},{refs:J,floatingStyles:le,placement:F,isPositioned:Y,middlewareData:se}=DH({strategy:"fixed",placement:$,whileElementsMounted:(...me)=>xH(...me,{animationFrame:y==="always"}),elements:{reference:S.anchor},middleware:[jH({mainAxis:a+P,alignmentAxis:c}),d&&$H({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?UH():void 0,...U}),d&&zH({...U}),VH({...U,apply:({elements:me,rects:ve,availableWidth:Ce,availableHeight:Ie})=>{const{width:H,height:re}=ve.reference,_e=me.floating.style;_e.setProperty("--radix-popper-available-width",`${Ce}px`),_e.setProperty("--radix-popper-available-height",`${Ie}px`),_e.setProperty("--radix-popper-anchor-width",`${H}px`),_e.setProperty("--radix-popper-anchor-height",`${re}px`)}}),O&&BH({element:O,padding:u}),QH({arrowWidth:k,arrowHeight:P}),g&&FH({strategy:"referenceHidden",...U})]}),[fe,K]=XN(F),D=Go(w);Ho(()=>{Y&&D?.()},[Y,D]);const q=se.arrow?.x,B=se.arrow?.y,L=se.arrow?.centerOffset!==0,[z,Q]=A.useState();return Ho(()=>{R&&Q(window.getComputedStyle(R).zIndex)},[R]),x.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...le,transform:Y?le.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[se.transformOrigin?.x,se.transformOrigin?.y].join(" "),...se.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(ZH,{scope:n,placedSide:fe,onArrowChange:C,arrowX:q,arrowY:B,shouldHideArrow:L,children:x.jsx(pn.div,{"data-side":fe,"data-align":K,...b,ref:T,style:{...b.style,animation:Y?void 0:"none"}})})})});KN.displayName=g1;var YN="PopperArrow",KH={top:"bottom",right:"left",bottom:"top",left:"right"},QN=A.forwardRef(function(t,n){const{__scopePopper:r,...a}=t,i=WH(YN,r),c=KH[i.placedSide];return x.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:x.jsx(HH,{...a,ref:n,style:{...a.style,display:"block"}})})});QN.displayName=YN;function YH(e){return e!==null}var QH=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:a}=t,c=a.arrow?.centerOffset!==0,u=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[f,m]=XN(n),p={start:"0%",center:"50%",end:"100%"}[m],g=(a.arrow?.x??0)+u/2,y=(a.arrow?.y??0)+d/2;let w="",b="";return f==="bottom"?(w=c?p:`${g}px`,b=`${-d}px`):f==="top"?(w=c?p:`${g}px`,b=`${r.floating.height+d}px`):f==="right"?(w=`${-d}px`,b=c?p:`${y}px`):f==="left"&&(w=`${r.floating.width+d}px`,b=c?p:`${y}px`),{data:{x:w,y:b}}}});function XN(e){const[t,n="center"]=e.split("-");return[t,n]}var JN=GN,XH=WN,JH=KN,eG=QN,h0="rovingFocusGroup.onEntryFocus",tG={bubbles:!1,cancelable:!0},Ad="RovingFocusGroup",[I_,eM,nG]=CN(Ad),[rG,tM]=Ki(Ad,[nG]),[oG,aG]=rG(Ad),nM=A.forwardRef((e,t)=>x.jsx(I_.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(I_.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(sG,{...e,ref:t})})}));nM.displayName=Ad;var sG=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:d,onEntryFocus:f,preventScrollOnEntryFocus:m=!1,...p}=e,g=A.useRef(null),y=qn(t,g),w=AN(i),[b,S]=Od({prop:c,defaultProp:u??null,onChange:d,caller:Ad}),[R,E]=A.useState(!1),T=Go(f),O=eM(n),C=A.useRef(!1),[I,k]=A.useState(0);return A.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(h0,T),()=>P.removeEventListener(h0,T)},[T]),x.jsx(oG,{scope:n,orientation:r,dir:w,loop:a,currentTabStopId:b,onItemFocus:A.useCallback(P=>S(P),[S]),onItemShiftTab:A.useCallback(()=>E(!0),[]),onFocusableItemAdd:A.useCallback(()=>k(P=>P+1),[]),onFocusableItemRemove:A.useCallback(()=>k(P=>P-1),[]),children:x.jsx(pn.div,{tabIndex:R||I===0?-1:0,"data-orientation":r,...p,ref:y,style:{outline:"none",...e.style},onMouseDown:ut(e.onMouseDown,()=>{C.current=!0}),onFocus:ut(e.onFocus,P=>{const $=!C.current;if(P.target===P.currentTarget&&$&&!R){const W=new CustomEvent(h0,tG);if(P.currentTarget.dispatchEvent(W),!W.defaultPrevented){const V=O().filter(F=>F.focusable),G=V.find(F=>F.active),U=V.find(F=>F.id===b),le=[G,U,...V].filter(Boolean).map(F=>F.ref.current);aM(le,m)}}C.current=!1}),onBlur:ut(e.onBlur,()=>E(!1))})})}),rM="RovingFocusGroupItem",oM=A.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:c,...u}=e,d=zs(),f=i||d,m=aG(rM,n),p=m.currentTabStopId===f,g=eM(n),{onFocusableItemAdd:y,onFocusableItemRemove:w,currentTabStopId:b}=m;return A.useEffect(()=>{if(r)return y(),()=>w()},[r,y,w]),x.jsx(I_.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:x.jsx(pn.span,{tabIndex:p?0:-1,"data-orientation":m.orientation,...u,ref:t,onMouseDown:ut(e.onMouseDown,S=>{r?m.onItemFocus(f):S.preventDefault()}),onFocus:ut(e.onFocus,()=>m.onItemFocus(f)),onKeyDown:ut(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){m.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const R=lG(S,m.orientation,m.dir);if(R!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let T=g().filter(O=>O.focusable).map(O=>O.ref.current);if(R==="last")T.reverse();else if(R==="prev"||R==="next"){R==="prev"&&T.reverse();const O=T.indexOf(S.currentTarget);T=m.loop?uG(T,O+1):T.slice(O+1)}setTimeout(()=>aM(T))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:b!=null}):c})})});oM.displayName=rM;var iG={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function lG(e,t,n){const r=cG(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return iG[r]}function aM(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function uG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dG=nM,fG=oM,k_=["Enter"," "],hG=["ArrowDown","PageUp","Home"],sM=["ArrowUp","PageDown","End"],pG=[...hG,...sM],mG={ltr:[...k_,"ArrowRight"],rtl:[...k_,"ArrowLeft"]},gG={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Id="Menu",[fd,vG,yG]=CN(Id),[Yi,iM]=Ki(Id,[yG,qN,tM]),kd=qN(),cM=tM(),[lM,Js]=Yi(Id),[_G,Nd]=Yi(Id),uM=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:i,modal:c=!0}=e,u=kd(t),[d,f]=A.useState(null),m=A.useRef(!1),p=Go(i),g=AN(a);return A.useEffect(()=>{const y=()=>{m.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>m.current=!1;return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),x.jsx(JN,{...u,children:x.jsx(lM,{scope:t,open:n,onOpenChange:p,content:d,onContentChange:f,children:x.jsx(_G,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:m,dir:g,modal:c,children:r})})})};uM.displayName=Id;var bG="MenuAnchor",v1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=kd(n);return x.jsx(XH,{...a,...r,ref:t})});v1.displayName=bG;var y1="MenuPortal",[wG,dM]=Yi(y1,{forceMount:void 0}),fM=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,i=Js(y1,t);return x.jsx(wG,{scope:t,forceMount:n,children:x.jsx(Ka,{present:n||i.open,children:x.jsx(o1,{asChild:!0,container:a,children:r})})})};fM.displayName=y1;var xo="MenuContent",[SG,_1]=Yi(xo),hM=A.forwardRef((e,t)=>{const n=dM(xo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Js(xo,e.__scopeMenu),c=Nd(xo,e.__scopeMenu);return x.jsx(fd.Provider,{scope:e.__scopeMenu,children:x.jsx(Ka,{present:r||i.open,children:x.jsx(fd.Slot,{scope:e.__scopeMenu,children:c.modal?x.jsx(EG,{...a,ref:t}):x.jsx(RG,{...a,ref:t})})})})}),EG=A.forwardRef((e,t)=>{const n=Js(xo,e.__scopeMenu),r=A.useRef(null),a=qn(t,r);return A.useEffect(()=>{const i=r.current;if(i)return dN(i)},[]),x.jsx(b1,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ut(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),RG=A.forwardRef((e,t)=>{const n=Js(xo,e.__scopeMenu);return x.jsx(b1,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),xG=ud("MenuContent.ScrollLock"),b1=A.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:d,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,disableOutsideScroll:w,...b}=e,S=Js(xo,n),R=Nd(xo,n),E=kd(n),T=cM(n),O=vG(n),[C,I]=A.useState(null),k=A.useRef(null),P=qn(t,k,S.onContentChange),$=A.useRef(0),W=A.useRef(""),V=A.useRef(0),G=A.useRef(null),U=A.useRef("right"),J=A.useRef(0),le=w?a1:A.Fragment,F=w?{as:xG,allowPinchZoom:!0}:void 0,Y=fe=>{const K=W.current+fe,D=O().filter(me=>!me.disabled),q=document.activeElement,B=D.find(me=>me.ref.current===q)?.textValue,L=D.map(me=>me.textValue),z=jG(L,K,B),Q=D.find(me=>me.textValue===z)?.ref.current;(function me(ve){W.current=ve,window.clearTimeout($.current),ve!==""&&($.current=window.setTimeout(()=>me(""),1e3))})(K),Q&&setTimeout(()=>Q.focus())};A.useEffect(()=>()=>window.clearTimeout($.current),[]),nN();const se=A.useCallback(fe=>U.current===G.current?.side&&UG(fe,G.current?.area),[]);return x.jsx(SG,{scope:n,searchRef:W,onItemEnter:A.useCallback(fe=>{se(fe)&&fe.preventDefault()},[se]),onItemLeave:A.useCallback(fe=>{se(fe)||(k.current?.focus(),I(null))},[se]),onTriggerLeave:A.useCallback(fe=>{se(fe)&&fe.preventDefault()},[se]),pointerGraceTimerRef:V,onPointerGraceIntentChange:A.useCallback(fe=>{G.current=fe},[]),children:x.jsx(le,{...F,children:x.jsx(r1,{asChild:!0,trapped:a,onMountAutoFocus:ut(i,fe=>{fe.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:x.jsx(n1,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:p,onInteractOutside:g,onDismiss:y,children:x.jsx(dG,{asChild:!0,...T,dir:R.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:I,onEntryFocus:ut(d,fe=>{R.isUsingKeyboardRef.current||fe.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(JH,{role:"menu","aria-orientation":"vertical","data-state":IM(S.open),"data-radix-menu-content":"",dir:R.dir,...E,...b,ref:P,style:{outline:"none",...b.style},onKeyDown:ut(b.onKeyDown,fe=>{const D=fe.target.closest("[data-radix-menu-content]")===fe.currentTarget,q=fe.ctrlKey||fe.altKey||fe.metaKey,B=fe.key.length===1;D&&(fe.key==="Tab"&&fe.preventDefault(),!q&&B&&Y(fe.key));const L=k.current;if(fe.target!==L||!pG.includes(fe.key))return;fe.preventDefault();const Q=O().filter(me=>!me.disabled).map(me=>me.ref.current);sM.includes(fe.key)&&Q.reverse(),DG(Q)}),onBlur:ut(e.onBlur,fe=>{fe.currentTarget.contains(fe.target)||(window.clearTimeout($.current),W.current="")}),onPointerMove:ut(e.onPointerMove,hd(fe=>{const K=fe.target,D=J.current!==fe.clientX;if(fe.currentTarget.contains(K)&&D){const q=fe.clientX>J.current?"right":"left";U.current=q,J.current=fe.clientX}}))})})})})})})});hM.displayName=xo;var TG="MenuGroup",w1=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"group",...r,ref:t})});w1.displayName=TG;var OG="MenuLabel",pM=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{...r,ref:t})});pM.displayName=OG;var im="MenuItem",OO="menu.itemSelect",Xm=A.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,i=A.useRef(null),c=Nd(im,e.__scopeMenu),u=_1(im,e.__scopeMenu),d=qn(t,i),f=A.useRef(!1),m=()=>{const p=i.current;if(!n&&p){const g=new CustomEvent(OO,{bubbles:!0,cancelable:!0});p.addEventListener(OO,y=>r?.(y),{once:!0}),Xk(p,g),g.defaultPrevented?f.current=!1:c.onClose()}};return x.jsx(mM,{...a,ref:d,disabled:n,onClick:ut(e.onClick,m),onPointerDown:p=>{e.onPointerDown?.(p),f.current=!0},onPointerUp:ut(e.onPointerUp,p=>{f.current||p.currentTarget?.click()}),onKeyDown:ut(e.onKeyDown,p=>{const g=u.searchRef.current!=="";n||g&&p.key===" "||k_.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Xm.displayName=im;var mM=A.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=e,c=_1(im,n),u=cM(n),d=A.useRef(null),f=qn(t,d),[m,p]=A.useState(!1),[g,y]=A.useState("");return A.useEffect(()=>{const w=d.current;w&&y((w.textContent??"").trim())},[i.children]),x.jsx(fd.ItemSlot,{scope:n,disabled:r,textValue:a??g,children:x.jsx(fG,{asChild:!0,...u,focusable:!r,children:x.jsx(pn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:ut(e.onPointerMove,hd(w=>{r?c.onItemLeave(w):(c.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ut(e.onPointerLeave,hd(w=>c.onItemLeave(w))),onFocus:ut(e.onFocus,()=>p(!0)),onBlur:ut(e.onBlur,()=>p(!1))})})})}),CG="MenuCheckboxItem",gM=A.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return x.jsx(wM,{scope:e.__scopeMenu,checked:n,children:x.jsx(Xm,{role:"menuitemcheckbox","aria-checked":cm(n)?"mixed":n,...a,ref:t,"data-state":R1(n),onSelect:ut(a.onSelect,()=>r?.(cm(n)?!0:!n),{checkForDefaultPrevented:!1})})})});gM.displayName=CG;var vM="MenuRadioGroup",[AG,IG]=Yi(vM,{value:void 0,onValueChange:()=>{}}),yM=A.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,i=Go(r);return x.jsx(AG,{scope:e.__scopeMenu,value:n,onValueChange:i,children:x.jsx(w1,{...a,ref:t})})});yM.displayName=vM;var _M="MenuRadioItem",bM=A.forwardRef((e,t)=>{const{value:n,...r}=e,a=IG(_M,e.__scopeMenu),i=n===a.value;return x.jsx(wM,{scope:e.__scopeMenu,checked:i,children:x.jsx(Xm,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":R1(i),onSelect:ut(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});bM.displayName=_M;var S1="MenuItemIndicator",[wM,kG]=Yi(S1,{checked:!1}),SM=A.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,i=kG(S1,n);return x.jsx(Ka,{present:r||cm(i.checked)||i.checked===!0,children:x.jsx(pn.span,{...a,ref:t,"data-state":R1(i.checked)})})});SM.displayName=S1;var NG="MenuSeparator",EM=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return x.jsx(pn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});EM.displayName=NG;var MG="MenuArrow",RM=A.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=kd(n);return x.jsx(eG,{...a,...r,ref:t})});RM.displayName=MG;var E1="MenuSub",[PG,xM]=Yi(E1),TM=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,i=Js(E1,t),c=kd(t),[u,d]=A.useState(null),[f,m]=A.useState(null),p=Go(a);return A.useEffect(()=>(i.open===!1&&p(!1),()=>p(!1)),[i.open,p]),x.jsx(JN,{...c,children:x.jsx(lM,{scope:t,open:r,onOpenChange:p,content:f,onContentChange:m,children:x.jsx(PG,{scope:t,contentId:zs(),triggerId:zs(),trigger:u,onTriggerChange:d,children:n})})})};TM.displayName=E1;var Uu="MenuSubTrigger",OM=A.forwardRef((e,t)=>{const n=Js(Uu,e.__scopeMenu),r=Nd(Uu,e.__scopeMenu),a=xM(Uu,e.__scopeMenu),i=_1(Uu,e.__scopeMenu),c=A.useRef(null),{pointerGraceTimerRef:u,onPointerGraceIntentChange:d}=i,f={__scopeMenu:e.__scopeMenu},m=A.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return A.useEffect(()=>m,[m]),A.useEffect(()=>{const p=u.current;return()=>{window.clearTimeout(p),d(null)}},[u,d]),x.jsx(v1,{asChild:!0,...f,children:x.jsx(mM,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":IM(n.open),...e,ref:Td(t,a.onTriggerChange),onClick:p=>{e.onClick?.(p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ut(e.onPointerMove,hd(p=>{i.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!n.open&&!c.current&&(i.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:ut(e.onPointerLeave,hd(p=>{m();const g=n.content?.getBoundingClientRect();if(g){const y=n.content?.dataset.side,w=y==="right",b=w?-5:5,S=g[w?"left":"right"],R=g[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:p.clientX+b,y:p.clientY},{x:S,y:g.top},{x:R,y:g.top},{x:R,y:g.bottom},{x:S,y:g.bottom}],side:y}),window.clearTimeout(u.current),u.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(p),p.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:ut(e.onKeyDown,p=>{const g=i.searchRef.current!=="";e.disabled||g&&p.key===" "||mG[r.dir].includes(p.key)&&(n.onOpenChange(!0),n.content?.focus(),p.preventDefault())})})})});OM.displayName=Uu;var CM="MenuSubContent",AM=A.forwardRef((e,t)=>{const n=dM(xo,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,i=Js(xo,e.__scopeMenu),c=Nd(xo,e.__scopeMenu),u=xM(CM,e.__scopeMenu),d=A.useRef(null),f=qn(t,d);return x.jsx(fd.Provider,{scope:e.__scopeMenu,children:x.jsx(Ka,{present:r||i.open,children:x.jsx(fd.Slot,{scope:e.__scopeMenu,children:x.jsx(b1,{id:u.contentId,"aria-labelledby":u.triggerId,...a,ref:f,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{c.isUsingKeyboardRef.current&&d.current?.focus(),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:ut(e.onFocusOutside,m=>{m.target!==u.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:ut(e.onEscapeKeyDown,m=>{c.onClose(),m.preventDefault()}),onKeyDown:ut(e.onKeyDown,m=>{const p=m.currentTarget.contains(m.target),g=gG[c.dir].includes(m.key);p&&g&&(i.onOpenChange(!1),u.trigger?.focus(),m.preventDefault())})})})})})});AM.displayName=CM;function IM(e){return e?"open":"closed"}function cm(e){return e==="indeterminate"}function R1(e){return cm(e)?"indeterminate":e?"checked":"unchecked"}function DG(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LG(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function jG(e,t,n){const a=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let c=LG(e,Math.max(i,0));a.length===1&&(c=c.filter(f=>f!==n));const d=c.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function $G(e,t){const{x:n,y:r}=e;let a=!1;for(let i=0,c=t.length-1;i<t.length;c=i++){const u=t[i],d=t[c],f=u.x,m=u.y,p=d.x,g=d.y;m>r!=g>r&&n<(p-f)*(r-m)/(g-m)+f&&(a=!a)}return a}function UG(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return $G(n,t)}function hd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zG=uM,VG=v1,FG=fM,BG=hM,qG=w1,HG=pM,GG=Xm,ZG=gM,WG=yM,KG=bM,YG=SM,QG=EM,XG=RM,JG=TM,eZ=OM,tZ=AM,Jm="DropdownMenu",[nZ]=Ki(Jm,[iM]),yr=iM(),[rZ,kM]=nZ(Jm),NM=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:c,modal:u=!0}=e,d=yr(t),f=A.useRef(null),[m,p]=Od({prop:a,defaultProp:i??!1,onChange:c,caller:Jm});return x.jsx(rZ,{scope:t,triggerId:zs(),triggerRef:f,contentId:zs(),open:m,onOpenChange:p,onOpenToggle:A.useCallback(()=>p(g=>!g),[p]),modal:u,children:x.jsx(zG,{...d,open:m,onOpenChange:p,dir:r,modal:u,children:n})})};NM.displayName=Jm;var MM="DropdownMenuTrigger",PM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,i=kM(MM,n),c=yr(n);return x.jsx(VG,{asChild:!0,...c,children:x.jsx(pn.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:Td(t,i.triggerRef),onPointerDown:ut(e.onPointerDown,u=>{!r&&u.button===0&&u.ctrlKey===!1&&(i.onOpenToggle(),i.open||u.preventDefault())}),onKeyDown:ut(e.onKeyDown,u=>{r||(["Enter"," "].includes(u.key)&&i.onOpenToggle(),u.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(u.key)&&u.preventDefault())})})})});PM.displayName=MM;var oZ="DropdownMenuPortal",DM=e=>{const{__scopeDropdownMenu:t,...n}=e,r=yr(t);return x.jsx(FG,{...r,...n})};DM.displayName=oZ;var LM="DropdownMenuContent",jM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=kM(LM,n),i=yr(n),c=A.useRef(!1);return x.jsx(BG,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:t,onCloseAutoFocus:ut(e.onCloseAutoFocus,u=>{c.current||a.triggerRef.current?.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:ut(e.onInteractOutside,u=>{const d=u.detail.originalEvent,f=d.button===0&&d.ctrlKey===!0,m=d.button===2||f;(!a.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jM.displayName=LM;var aZ="DropdownMenuGroup",sZ=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(qG,{...a,...r,ref:t})});sZ.displayName=aZ;var iZ="DropdownMenuLabel",$M=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(HG,{...a,...r,ref:t})});$M.displayName=iZ;var cZ="DropdownMenuItem",UM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(GG,{...a,...r,ref:t})});UM.displayName=cZ;var lZ="DropdownMenuCheckboxItem",zM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(ZG,{...a,...r,ref:t})});zM.displayName=lZ;var uZ="DropdownMenuRadioGroup",VM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(WG,{...a,...r,ref:t})});VM.displayName=uZ;var dZ="DropdownMenuRadioItem",FM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(KG,{...a,...r,ref:t})});FM.displayName=dZ;var fZ="DropdownMenuItemIndicator",BM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(YG,{...a,...r,ref:t})});BM.displayName=fZ;var hZ="DropdownMenuSeparator",qM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(QG,{...a,...r,ref:t})});qM.displayName=hZ;var pZ="DropdownMenuArrow",mZ=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(XG,{...a,...r,ref:t})});mZ.displayName=pZ;var gZ=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:i}=e,c=yr(t),[u,d]=Od({prop:r,defaultProp:i??!1,onChange:a,caller:"DropdownMenuSub"});return x.jsx(JG,{...c,open:u,onOpenChange:d,children:n})},vZ="DropdownMenuSubTrigger",HM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(eZ,{...a,...r,ref:t})});HM.displayName=vZ;var yZ="DropdownMenuSubContent",GM=A.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=yr(n);return x.jsx(tZ,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});GM.displayName=yZ;var _Z=NM,bZ=PM,wZ=DM,SZ=jM,Oae=$M,EZ=UM,Cae=zM,Aae=VM,Iae=FM,kae=BM,Nae=qM,Mae=gZ,Pae=HM,Dae=GM,RZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Md=RZ.reduce((e,t)=>{const n=Kk(`Primitive.${t}`),r=A.forwardRef((a,i)=>{const{asChild:c,...u}=a,d=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...u,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),xZ="Label",ZM=A.forwardRef((e,t)=>x.jsx(Md.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));ZM.displayName=xZ;var TZ=ZM;function OZ(e,t=[]){let n=[];function r(i,c){const u=A.createContext(c);u.displayName=i+"Context";const d=n.length;n=[...n,c];const f=p=>{const{scope:g,children:y,...w}=p,b=g?.[e]?.[d]||u,S=A.useMemo(()=>w,Object.values(w));return x.jsx(b.Provider,{value:S,children:y})};f.displayName=i+"Provider";function m(p,g){const y=g?.[e]?.[d]||u,w=A.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[f,m]}const a=()=>{const i=n.map(c=>A.createContext(c));return function(u){const d=u?.[e]||i;return A.useMemo(()=>({[`__scope${e}`]:{...u,[e]:d}}),[u,d])}};return a.scopeName=e,[r,CZ(a,...t)]}function CZ(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const c=r.reduce((u,{useScope:d,scopeName:f})=>{const p=d(i)[`__scope${f}`];return{...u,...p}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}var AZ=$A();function IZ(){return AZ.useSyncExternalStore(kZ,()=>!0,()=>!1)}function kZ(){return()=>{}}var x1="Avatar",[NZ]=OZ(x1),[MZ,WM]=NZ(x1),KM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=A.useState("idle");return x.jsx(MZ,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(Md.span,{...r,ref:t})})});KM.displayName=x1;var YM="AvatarImage",QM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,c=WM(YM,n),u=PZ(r,i),d=Go(f=>{a(f),c.onImageLoadingStatusChange(f)});return Ho(()=>{u!=="idle"&&d(u)},[u,d]),u==="loaded"?x.jsx(Md.img,{...i,ref:t,src:r}):null});QM.displayName=YM;var XM="AvatarFallback",JM=A.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=WM(XM,n),[c,u]=A.useState(r===void 0);return A.useEffect(()=>{if(r!==void 0){const d=window.setTimeout(()=>u(!0),r);return()=>window.clearTimeout(d)}},[r]),c&&i.imageLoadingStatus!=="loaded"?x.jsx(Md.span,{...a,ref:t}):null});JM.displayName=XM;function CO(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function PZ(e,{referrerPolicy:t,crossOrigin:n}){const r=IZ(),a=A.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[c,u]=A.useState(()=>CO(i,e));return Ho(()=>{u(CO(i,e))},[i,e]),Ho(()=>{const d=p=>()=>{u(p)};if(!i)return;const f=d("loaded"),m=d("error");return i.addEventListener("load",f),i.addEventListener("error",m),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",f),i.removeEventListener("error",m)}},[i,n,t]),c}var DZ=KM,LZ=QM,jZ=JM;function $Z(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"}function T1(e,t,n=""){const r=$Z(e),a=e?.length;if(!r||t!==void 0){const c=n&&`"${n}" `,u="",d=r?`length=${a}`:`type=${typeof e}`;throw new Error(c+"expected Uint8Array"+u+", got "+d)}return e}function AO(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function UZ(e,t){T1(e,void 0,"digestInto() output");const n=t.outputLen;if(e.length<n)throw new Error('"digestInto() output" expected to be of length >='+n)}function N_(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function p0(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function na(e,t){return e<<32-t|e>>>t}const zZ=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",VZ=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function FZ(e){if(T1(e),zZ)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=VZ[e[n]];return t}function BZ(e,t={}){const n=(a,i)=>e(i).update(a).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=a=>e(a),Object.assign(n,t),Object.freeze(n)}const qZ=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});function HZ(e,t,n){return e&t^~e&n}function GZ(e,t,n){return e&t^e&n^t&n}class ZZ{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(t,n,r,a){this.blockLen=t,this.outputLen=n,this.padOffset=r,this.isLE=a,this.buffer=new Uint8Array(t),this.view=p0(this.buffer)}update(t){AO(this),T1(t);const{view:n,buffer:r,blockLen:a}=this,i=t.length;for(let c=0;c<i;){const u=Math.min(a-this.pos,i-c);if(u===a){const d=p0(t);for(;a<=i-c;c+=a)this.process(d,c);continue}r.set(t.subarray(c,c+u),this.pos),this.pos+=u,c+=u,this.pos===a&&(this.process(n,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){AO(this),UZ(t,this),this.finished=!0;const{buffer:n,view:r,blockLen:a,isLE:i}=this;let{pos:c}=this;n[c++]=128,N_(this.buffer.subarray(c)),this.padOffset>a-c&&(this.process(r,0),c=0);for(let p=c;p<a;p++)n[p]=0;r.setBigUint64(a-8,BigInt(this.length*8),i),this.process(r,0);const u=p0(t),d=this.outputLen;if(d%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const f=d/4,m=this.get();if(f>m.length)throw new Error("_sha2: outputLen bigger than state");for(let p=0;p<f;p++)u.setUint32(4*p,m[p],i)}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){t||=new this.constructor,t.set(...this.get());const{blockLen:n,buffer:r,length:a,finished:i,destroyed:c,pos:u}=this;return t.destroyed=c,t.finished=i,t.length=a,t.pos=u,a%n&&t.buffer.set(r),t}clone(){return this._cloneInto()}}const xs=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),WZ=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ts=new Uint32Array(64);class KZ extends ZZ{constructor(t){super(64,t,8,!1)}get(){const{A:t,B:n,C:r,D:a,E:i,F:c,G:u,H:d}=this;return[t,n,r,a,i,c,u,d]}set(t,n,r,a,i,c,u,d){this.A=t|0,this.B=n|0,this.C=r|0,this.D=a|0,this.E=i|0,this.F=c|0,this.G=u|0,this.H=d|0}process(t,n){for(let p=0;p<16;p++,n+=4)Ts[p]=t.getUint32(n,!1);for(let p=16;p<64;p++){const g=Ts[p-15],y=Ts[p-2],w=na(g,7)^na(g,18)^g>>>3,b=na(y,17)^na(y,19)^y>>>10;Ts[p]=b+Ts[p-7]+w+Ts[p-16]|0}let{A:r,B:a,C:i,D:c,E:u,F:d,G:f,H:m}=this;for(let p=0;p<64;p++){const g=na(u,6)^na(u,11)^na(u,25),y=m+g+HZ(u,d,f)+WZ[p]+Ts[p]|0,b=(na(r,2)^na(r,13)^na(r,22))+GZ(r,a,i)|0;m=f,f=d,d=u,u=c+y|0,c=i,i=a,a=r,r=y+b|0}r=r+this.A|0,a=a+this.B|0,i=i+this.C|0,c=c+this.D|0,u=u+this.E|0,d=d+this.F|0,f=f+this.G|0,m=m+this.H|0,this.set(r,a,i,c,u,d,f,m)}roundClean(){N_(Ts)}destroy(){this.set(0,0,0,0,0,0,0,0),N_(this.buffer)}}class YZ extends KZ{A=xs[0]|0;B=xs[1]|0;C=xs[2]|0;D=xs[3]|0;E=xs[4]|0;F=xs[5]|0;G=xs[6]|0;H=xs[7]|0;constructor(){super(32)}}const QZ=BZ(()=>new YZ,qZ(1));function XZ(e){const t=A.useRef({value:e,previous:e});return A.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var eg="Checkbox",[JZ]=Ki(eg),[eW,O1]=JZ(eg);function tW(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:a,disabled:i,form:c,name:u,onCheckedChange:d,required:f,value:m="on",internal_do_not_use_render:p}=e,[g,y]=Od({prop:n,defaultProp:a??!1,onChange:d,caller:eg}),[w,b]=A.useState(null),[S,R]=A.useState(null),E=A.useRef(!1),T=w?!!c||!!w.closest("form"):!0,O={checked:g,disabled:i,setChecked:y,control:w,setControl:b,name:u,form:c,value:m,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:Vs(a)?!1:a,isFormControl:T,bubbleInput:S,setBubbleInput:R};return x.jsx(eW,{scope:t,...O,children:nW(p)?p(O):r})}var e4="CheckboxTrigger",t4=A.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},a)=>{const{control:i,value:c,disabled:u,checked:d,required:f,setControl:m,setChecked:p,hasConsumerStoppedPropagationRef:g,isFormControl:y,bubbleInput:w}=O1(e4,e),b=qn(a,m),S=A.useRef(d);return A.useEffect(()=>{const R=i?.form;if(R){const E=()=>p(S.current);return R.addEventListener("reset",E),()=>R.removeEventListener("reset",E)}},[i,p]),x.jsx(pn.button,{type:"button",role:"checkbox","aria-checked":Vs(d)?"mixed":d,"aria-required":f,"data-state":i4(d),"data-disabled":u?"":void 0,disabled:u,value:c,...r,ref:b,onKeyDown:ut(t,R=>{R.key==="Enter"&&R.preventDefault()}),onClick:ut(n,R=>{p(E=>Vs(E)?!0:!E),w&&y&&(g.current=R.isPropagationStopped(),g.current||R.stopPropagation())})})});t4.displayName=e4;var n4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:c,disabled:u,value:d,onCheckedChange:f,form:m,...p}=e;return x.jsx(tW,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:u,required:c,onCheckedChange:f,name:r,form:m,value:d,internal_do_not_use_render:({isFormControl:g})=>x.jsxs(x.Fragment,{children:[x.jsx(t4,{...p,ref:t,__scopeCheckbox:n}),g&&x.jsx(s4,{__scopeCheckbox:n})]})})});n4.displayName=eg;var r4="CheckboxIndicator",o4=A.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,i=O1(r4,n);return x.jsx(Ka,{present:r||Vs(i.checked)||i.checked===!0,children:x.jsx(pn.span,{"data-state":i4(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});o4.displayName=r4;var a4="CheckboxBubbleInput",s4=A.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:c,required:u,disabled:d,name:f,value:m,form:p,bubbleInput:g,setBubbleInput:y}=O1(a4,e),w=qn(n,y),b=XZ(i),S=FN(r);A.useEffect(()=>{const E=g;if(!E)return;const T=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(T,"checked").set,I=!a.current;if(b!==i&&C){const k=new Event("click",{bubbles:I});E.indeterminate=Vs(i),C.call(E,Vs(i)?!1:i),E.dispatchEvent(k)}},[g,b,i,a]);const R=A.useRef(Vs(i)?!1:i);return x.jsx(pn.input,{type:"checkbox","aria-hidden":!0,defaultChecked:c??R.current,required:u,disabled:d,name:f,value:m,form:p,...t,tabIndex:-1,ref:w,style:{...t.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});s4.displayName=a4;function nW(e){return typeof e=="function"}function Vs(e){return e==="indeterminate"}function i4(e){return Vs(e)?"indeterminate":e?"checked":"unchecked"}var c4={OBJECT:"object",UNDEFINED:"undefined"},Eh="browser",IO="cpu",kO="device",m0="engine",Rh="os",As="name",lm="type",M_="vendor",jo="version",P_="architecture",D_="major",L_="model",rW="console",oW="mobile",aW="tablet",sW="smarttv",iW="wearable",cW="embedded",lW=typeof window!==c4.UNDEFINED,g0=lW&&window.navigator?window.navigator:void 0;g0&&g0.userAgentData&&g0.userAgentData;var tg=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},xh=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];typeof n==c4.OBJECT&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this};(function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return xh.call(e.init,[[Eh,[As,jo,D_,lm]],[IO,[P_]],[kO,[lm,L_,M_]],[m0,[As,jo]],[Rh,[As,jo]]]),xh.call(e.isIgnore,[[Eh,[jo,D_]],[m0,[jo]],[Rh,[jo]]]),xh.call(e.isIgnoreRgx,[[Eh,/ ?browser$/i],[Rh,/ ?os$/i]]),xh.call(e.toString,[[Eh,[As,jo]],[IO,[P_]],[kO,[M_,L_]],[m0,[As,jo]],[Rh,[As,jo]]]),e})();tg([As,jo,D_,lm]);tg([P_]);tg([L_,M_,lm,rW,oW,sW,aW,iW,cW]);tg([As,jo]);function uW(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const l4=ee.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Pd=()=>{const e=ee.useContext(l4);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};uW(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
106
+ [data-state=closed]
107
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function dW(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function fW(){return C1(/^Mac/)}function hW(){return C1(/^iPhone/)}function NO(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function pW(){return C1(/^iPad/)||fW()&&navigator.maxTouchPoints>1}function u4(){return hW()||pW()}function C1(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const mW=24,gW=typeof window<"u"?A.useLayoutEffect:A.useEffect;function MO(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const v0=typeof document<"u"&&window.visualViewport;function PO(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function d4(e){for(PO(e)&&(e=e.parentElement);e&&!PO(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const vW=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Th=0,y0;function yW(e={}){let{isDisabled:t}=e;gW(()=>{if(!t)return Th++,Th===1&&u4()&&(y0=_W()),()=>{Th--,Th===0&&y0?.()}},[t])}function _W(){let e,t=0,n=p=>{e=d4(p.target),!(e===document.documentElement&&e===document.body)&&(t=p.changedTouches[0].pageY)},r=p=>{if(!e||e===document.documentElement||e===document.body){p.preventDefault();return}let g=p.changedTouches[0].pageY,y=e.scrollTop,w=e.scrollHeight-e.clientHeight;w!==0&&((y<=0&&g>t||y>=w&&g<t)&&p.preventDefault(),t=g)},a=p=>{let g=p.target;j_(g)&&g!==document.activeElement&&(p.preventDefault(),g.style.transform="translateY(-2000px)",g.focus(),requestAnimationFrame(()=>{g.style.transform=""}))},i=p=>{let g=p.target;j_(g)&&(g.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{g.style.transform="",v0&&(v0.height<window.innerHeight?requestAnimationFrame(()=>{DO(g)}):v0.addEventListener("resize",()=>DO(g),{once:!0}))}))},c=()=>{window.scrollTo(0,0)},u=window.pageXOffset,d=window.pageYOffset,f=MO(bW(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=MO(Cu(document,"touchstart",n,{passive:!1,capture:!0}),Cu(document,"touchmove",r,{passive:!1,capture:!0}),Cu(document,"touchend",a,{passive:!1,capture:!0}),Cu(document,"focus",i,!0),Cu(window,"scroll",c));return()=>{f(),m(),window.scrollTo(u,d)}}function bW(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Cu(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function DO(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=d4(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,a=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;const c=n.getBoundingClientRect().bottom+mW;i>c&&(n.scrollTop+=a-r)}e=n.parentElement}}function j_(e){return e instanceof HTMLInputElement&&!vW.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function wW(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function SW(...e){return t=>e.forEach(n=>wW(n,t))}function f4(...e){return A.useCallback(SW(...e),e)}const h4=new WeakMap;function Fn(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([a,i])=>{if(a.startsWith("--")){e.style.setProperty(a,i);return}r[a]=e.style[a],e.style[a]=i}),!n&&h4.set(e,r)}function EW(e,t){if(!e||!(e instanceof HTMLElement))return;let n=h4.get(e);n&&(e.style[t]=n[t])}const Mn=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Oh(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Mn(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Mn(t)?5:4]):null)}function RW(e){return 8*(Math.log(e+1)-2)}function _0(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function xW(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const fn={DURATION:.5,EASE:[.32,.72,0,1]},p4=.4,TW=.25,OW=100,m4=8,wi=16,$_=26,b0="vaul-dragging";function g4(e){const t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function CW({defaultProp:e,onChange:t}){const n=ee.useState(e),[r]=n,a=ee.useRef(r),i=g4(t);return ee.useEffect(()=>{a.current!==r&&(i(r),a.current=r)},[r,a,i]),n}function v4({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=CW({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:r,u=g4(n),d=ee.useCallback(f=>{if(i){const p=typeof f=="function"?f(e):f;p!==e&&u(p)}else a(f)},[i,e,a,u]);return[c,d]}function AW({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:i,onSnapPointChange:c,direction:u="bottom",container:d,snapToSequentialPoint:f}){const[m,p]=v4({prop:e,defaultProp:n?.[0],onChange:t}),[g,y]=ee.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ee.useEffect(()=>{function k(){y({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",k),()=>window.removeEventListener("resize",k)},[]);const w=ee.useMemo(()=>m===n?.[n.length-1]||null,[n,m]),b=ee.useMemo(()=>{var k;return(k=n?.findIndex(P=>P===m))!=null?k:null},[n,m]),S=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===m||!n,R=ee.useMemo(()=>{const k=d?{width:d.getBoundingClientRect().width,height:d.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var P;return(P=n?.map($=>{const W=typeof $=="string";let V=0;if(W&&(V=parseInt($,10)),Mn(u)){const U=W?V:g?$*k.height:0;return g?u==="bottom"?k.height-U:-k.height+U:U}const G=W?V:g?$*k.width:0;return g?u==="right"?k.width-G:-k.width+G:G}))!=null?P:[]},[n,g,d]),E=ee.useMemo(()=>b!==null?R?.[b]:null,[R,b]),T=ee.useCallback(k=>{var P;const $=(P=R?.findIndex(W=>W===k))!=null?P:null;c($),Fn(r.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(u)?`translate3d(0, ${k}px, 0)`:`translate3d(${k}px, 0, 0)`}),R&&$!==R.length-1&&i!==void 0&&$!==i&&$<i?Fn(a.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"0"}):Fn(a.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"1"}),p(n?.[Math.max($,0)])},[r.current,n,R,i,a,p]);ee.useEffect(()=>{if(m||e){var k;const P=(k=n?.findIndex($=>$===e||$===m))!=null?k:-1;R&&P!==-1&&typeof R[P]=="number"&&T(R[P])}},[m,e,n,R,T]);function O({draggedDistance:k,closeDrawer:P,velocity:$,dismissible:W}){if(i===void 0)return;const V=u==="bottom"||u==="right"?(E??0)-k:(E??0)+k,G=b===i-1,U=b===0,J=k>0;if(G&&Fn(a.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`}),!f&&$>2&&!J){W?P():T(R[0]);return}if(!f&&$>2&&J&&R&&n){T(R[n.length-1]);return}const le=R?.reduce((Y,se)=>typeof Y!="number"||typeof se!="number"?Y:Math.abs(se-V)<Math.abs(Y-V)?se:Y),F=Mn(u)?window.innerHeight:window.innerWidth;if($>p4&&Math.abs(k)<F*.4){const Y=J?1:-1;if(Y>0&&w&&n){T(R[n.length-1]);return}if(U&&Y<0&&W&&P(),b===null)return;T(R[b+Y]);return}T(le)}function C({draggedDistance:k}){if(E===null)return;const P=u==="bottom"||u==="right"?E-k:E+k;(u==="bottom"||u==="right")&&P<R[R.length-1]||(u==="top"||u==="left")&&P>R[R.length-1]||Fn(r.current,{transform:Mn(u)?`translate3d(0, ${P}px, 0)`:`translate3d(${P}px, 0, 0)`})}function I(k,P){if(!n||typeof b!="number"||!R||i===void 0)return null;const $=b===i-1;if(b>=i&&P)return 0;if($&&!P)return 1;if(!S&&!$)return null;const V=$?b+1:b-1,G=$?R[V]-R[V-1]:R[V+1]-R[V],U=k/Math.abs(G);return $?1-U:U}return{isLastSnapPoint:w,activeSnapPoint:m,shouldFade:S,getPercentageDragged:I,setActiveSnapPoint:p,activeSnapPointIndex:b,onRelease:O,onDrag:C,snapPointsOffset:R}}const IW=()=>()=>{};function kW(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=Pd(),i=ee.useRef(null),c=A.useMemo(()=>document.body.style.backgroundColor,[]);function u(){return(window.innerWidth-$_)/window.innerWidth}ee.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const d=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!d)return;xW(r&&!a?_0(document.body,{background:"black"}):IW,_0(d,{transformOrigin:Mn(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${fn.EASE.join(",")})`}));const f=_0(d,{borderRadius:`${m4}px`,overflow:"hidden",...Mn(e)?{transform:`scale(${u()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${u()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{f(),i.current=window.setTimeout(()=>{c?document.body.style.background=c:document.body.style.removeProperty("background")},fn.DURATION*1e3)}}},[t,n,c])}let Au=null;function NW({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:i}){const[c,u]=ee.useState(()=>typeof window<"u"?window.location.href:""),d=ee.useRef(0),f=ee.useCallback(()=>{if(NO()&&Au===null&&e&&!i){Au={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:p,innerHeight:g}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-d.current}px`,left:`${-p}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const y=g-window.innerHeight;y&&d.current>=g&&(document.body.style.top=`${-(d.current+y)}px`)}),300)}},[e]),m=ee.useCallback(()=>{if(NO()&&Au!==null&&!i){const p=-parseInt(document.body.style.top,10),g=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Au),window.requestAnimationFrame(()=>{if(a&&c!==window.location.href){u(window.location.href);return}window.scrollTo(g,p)}),Au=null}},[c]);return ee.useEffect(()=>{function p(){d.current=window.scrollY}return p(),window.addEventListener("scroll",p),()=>{window.removeEventListener("scroll",p)}},[]),ee.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),ee.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&f(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,c,t,n,f,m]),{restorePositionSetting:m}}function MW({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:i,shouldScaleBackground:c=!1,setBackgroundColorOnScale:u=!0,closeThreshold:d=TW,scrollLockTimeout:f=OW,dismissible:m=!0,handleOnly:p=!1,fadeFromIndex:g=i&&i.length-1,activeSnapPoint:y,setActiveSnapPoint:w,fixed:b,modal:S=!0,onClose:R,nested:E,noBodyStyles:T=!1,direction:O="bottom",defaultOpen:C=!1,disablePreventScroll:I=!0,snapToSequentialPoint:k=!1,preventScrollRestoration:P=!1,repositionInputs:$=!0,onAnimationEnd:W,container:V,autoFocus:G=!1}){var U,J;const[le=!1,F]=v4({defaultProp:C,prop:e,onChange:qe=>{t?.(qe),!qe&&!E&&Ne(),setTimeout(()=>{W?.(qe)},fn.DURATION*1e3),qe&&!S&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),qe||(document.body.style.pointerEvents="auto")}}),[Y,se]=ee.useState(!1),[fe,K]=ee.useState(!1),[D,q]=ee.useState(!1),B=ee.useRef(null),L=ee.useRef(null),z=ee.useRef(null),Q=ee.useRef(null),me=ee.useRef(null),ve=ee.useRef(!1),Ce=ee.useRef(null),Ie=ee.useRef(0),H=ee.useRef(!1),re=ee.useRef(!C),_e=ee.useRef(0),ae=ee.useRef(null),ue=ee.useRef(((U=ae.current)==null?void 0:U.getBoundingClientRect().height)||0),Oe=ee.useRef(((J=ae.current)==null?void 0:J.getBoundingClientRect().width)||0),Pe=ee.useRef(0),Je=ee.useCallback(qe=>{i&&qe===oe.length-1&&(L.current=new Date)},[]),{activeSnapPoint:Be,activeSnapPointIndex:Ke,setActiveSnapPoint:Z,onRelease:te,snapPointsOffset:oe,onDrag:Se,shouldFade:xe,getPercentageDragged:Re}=AW({snapPoints:i,activeSnapPointProp:y,setActiveSnapPointProp:w,drawerRef:ae,fadeFromIndex:g,overlayRef:B,onSnapPointChange:Je,direction:O,container:V,snapToSequentialPoint:k});yW({isDisabled:!le||fe||!S||D||!Y||!$||!I});const{restorePositionSetting:Ne}=NW({isOpen:le,modal:S,nested:E??!1,hasBeenOpened:Y,preventScrollRestoration:P,noBodyStyles:T});function et(){return(window.innerWidth-$_)/window.innerWidth}function st(qe){var Et,kt;!m&&!i||ae.current&&!ae.current.contains(qe.target)||(ue.current=((Et=ae.current)==null?void 0:Et.getBoundingClientRect().height)||0,Oe.current=((kt=ae.current)==null?void 0:kt.getBoundingClientRect().width)||0,K(!0),z.current=new Date,u4()&&window.addEventListener("touchend",()=>ve.current=!1,{once:!0}),qe.target.setPointerCapture(qe.pointerId),Ie.current=Mn(O)?qe.pageY:qe.pageX)}function Pt(qe,Et){var kt;let dt=qe;const Dt=(kt=window.getSelection())==null?void 0:kt.toString(),He=ae.current?Oh(ae.current,O):null,ft=new Date;if(dt.tagName==="SELECT"||dt.hasAttribute("data-vaul-no-drag")||dt.closest("[data-vaul-no-drag]"))return!1;if(O==="right"||O==="left")return!0;if(L.current&&ft.getTime()-L.current.getTime()<500)return!1;if(He!==null&&(O==="bottom"?He>0:He<0))return!0;if(Dt&&Dt.length>0)return!1;if(me.current&&ft.getTime()-me.current.getTime()<f&&He===0||Et)return me.current=ft,!1;for(;dt;){if(dt.scrollHeight>dt.clientHeight){if(dt.scrollTop!==0)return me.current=new Date,!1;if(dt.getAttribute("role")==="dialog")return!0}dt=dt.parentNode}return!0}function dr(qe){if(ae.current&&fe){const Et=O==="bottom"||O==="right"?1:-1,kt=(Ie.current-(Mn(O)?qe.pageY:qe.pageX))*Et,dt=kt>0,Dt=i&&!m&&!dt;if(Dt&&Ke===0)return;const He=Math.abs(kt),ft=document.querySelector("[data-vaul-drawer-wrapper]"),Xt=O==="bottom"||O==="top"?ue.current:Oe.current;let Wt=He/Xt;const fr=Re(He,dt);if(fr!==null&&(Wt=fr),Dt&&Wt>=1||!ve.current&&!Pt(qe.target,dt))return;if(ae.current.classList.add(b0),ve.current=!0,Fn(ae.current,{transition:"none"}),Fn(B.current,{transition:"none"}),i&&Se({draggedDistance:kt}),dt&&!i){const on=RW(kt),io=Math.min(on*-1,0)*Et;Fn(ae.current,{transform:Mn(O)?`translate3d(0, ${io}px, 0)`:`translate3d(${io}px, 0, 0)`});return}const Lt=1-Wt;if((xe||g&&Ke===g-1)&&(r?.(qe,Wt),Fn(B.current,{opacity:`${Lt}`,transition:"none"},!0)),ft&&B.current&&c){const on=Math.min(et()+Wt*(1-et()),1),io=8-Wt*8,Qn=Math.max(0,14-Wt*14);Fn(ft,{borderRadius:`${io}px`,transform:Mn(O)?`scale(${on}) translate3d(0, ${Qn}px, 0)`:`scale(${on}) translate3d(${Qn}px, 0, 0)`,transition:"none"},!0)}if(!i){const on=He*Et;Fn(ae.current,{transform:Mn(O)?`translate3d(0, ${on}px, 0)`:`translate3d(${on}px, 0, 0)`})}}}ee.useEffect(()=>{window.requestAnimationFrame(()=>{re.current=!0})},[]),ee.useEffect(()=>{var qe;function Et(){if(!ae.current||!$)return;const kt=document.activeElement;if(j_(kt)||H.current){var dt;const Dt=((dt=window.visualViewport)==null?void 0:dt.height)||0,He=window.innerHeight;let ft=He-Dt;const Xt=ae.current.getBoundingClientRect().height||0,Wt=Xt>He*.8;Pe.current||(Pe.current=Xt);const fr=ae.current.getBoundingClientRect().top;if(Math.abs(_e.current-ft)>60&&(H.current=!H.current),i&&i.length>0&&oe&&Ke){const Lt=oe[Ke]||0;ft+=Lt}if(_e.current=ft,Xt>Dt||H.current){const Lt=ae.current.getBoundingClientRect().height;let on=Lt;Lt>Dt&&(on=Dt-(Wt?fr:$_)),b?ae.current.style.height=`${Lt-Math.max(ft,0)}px`:ae.current.style.height=`${Math.max(on,Dt-fr)}px`}else dW()||(ae.current.style.height=`${Pe.current}px`);i&&i.length>0&&!H.current?ae.current.style.bottom="0px":ae.current.style.bottom=`${Math.max(ft,0)}px`}}return(qe=window.visualViewport)==null||qe.addEventListener("resize",Et),()=>{var kt;return(kt=window.visualViewport)==null?void 0:kt.removeEventListener("resize",Et)}},[Ke,i,oe]);function nn(qe){rn(),R?.(),qe||F(!1),setTimeout(()=>{i&&Z(i[0])},fn.DURATION*1e3)}function Rn(){if(!ae.current)return;const qe=document.querySelector("[data-vaul-drawer-wrapper]"),Et=Oh(ae.current,O);Fn(ae.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`}),Fn(B.current,{transition:`opacity ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,opacity:"1"}),c&&Et&&Et>0&&le&&Fn(qe,{borderRadius:`${m4}px`,overflow:"hidden",...Mn(O)?{transform:`scale(${et()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${et()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${fn.EASE.join(",")})`},!0)}function rn(){!fe||!ae.current||(ae.current.classList.remove(b0),ve.current=!1,K(!1),Q.current=new Date)}function $n(qe){if(!fe||!ae.current)return;ae.current.classList.remove(b0),ve.current=!1,K(!1),Q.current=new Date;const Et=Oh(ae.current,O);if(!qe||!Pt(qe.target,!1)||!Et||Number.isNaN(Et)||z.current===null)return;const kt=Q.current.getTime()-z.current.getTime(),dt=Ie.current-(Mn(O)?qe.pageY:qe.pageX),Dt=Math.abs(dt)/kt;if(Dt>.05&&(q(!0),setTimeout(()=>{q(!1)},200)),i){te({draggedDistance:dt*(O==="bottom"||O==="right"?1:-1),closeDrawer:nn,velocity:Dt,dismissible:m}),a?.(qe,!0);return}if(O==="bottom"||O==="right"?dt>0:dt<0){Rn(),a?.(qe,!0);return}if(Dt>p4){nn(),a?.(qe,!1);return}var He;const ft=Math.min((He=ae.current.getBoundingClientRect().height)!=null?He:0,window.innerHeight);var Xt;const Wt=Math.min((Xt=ae.current.getBoundingClientRect().width)!=null?Xt:0,window.innerWidth),fr=O==="left"||O==="right";if(Math.abs(Et)>=(fr?Wt:ft)*d){nn(),a?.(qe,!1);return}a?.(qe,!0),Rn()}ee.useEffect(()=>(le&&(Fn(document.documentElement,{scrollBehavior:"auto"}),L.current=new Date),()=>{EW(document.documentElement,"scrollBehavior")}),[le]);function xn(qe){const Et=qe?(window.innerWidth-wi)/window.innerWidth:1,kt=qe?-wi:0;Ce.current&&window.clearTimeout(Ce.current),Fn(ae.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(O)?`scale(${Et}) translate3d(0, ${kt}px, 0)`:`scale(${Et}) translate3d(${kt}px, 0, 0)`}),!qe&&ae.current&&(Ce.current=setTimeout(()=>{const dt=Oh(ae.current,O);Fn(ae.current,{transition:"none",transform:Mn(O)?`translate3d(0, ${dt}px, 0)`:`translate3d(${dt}px, 0, 0)`})},500))}function Qa(qe,Et){if(Et<0)return;const kt=(window.innerWidth-wi)/window.innerWidth,dt=kt+Et*(1-kt),Dt=-wi+Et*wi;Fn(ae.current,{transform:Mn(O)?`scale(${dt}) translate3d(0, ${Dt}px, 0)`:`scale(${dt}) translate3d(${Dt}px, 0, 0)`,transition:"none"})}function ga(qe,Et){const kt=Mn(O)?window.innerHeight:window.innerWidth,dt=Et?(kt-wi)/kt:1,Dt=Et?-wi:0;Et&&Fn(ae.current,{transition:`transform ${fn.DURATION}s cubic-bezier(${fn.EASE.join(",")})`,transform:Mn(O)?`scale(${dt}) translate3d(0, ${Dt}px, 0)`:`scale(${dt}) translate3d(${Dt}px, 0, 0)`})}return ee.useEffect(()=>{S||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[S]),ee.createElement(kq,{defaultOpen:C,onOpenChange:qe=>{!m&&!qe||(qe?se(!0):nn(!0),F(qe))},open:le},ee.createElement(l4.Provider,{value:{activeSnapPoint:Be,snapPoints:i,setActiveSnapPoint:Z,drawerRef:ae,overlayRef:B,onOpenChange:t,onPress:st,onRelease:$n,onDrag:dr,dismissible:m,shouldAnimate:re,handleOnly:p,isOpen:le,isDragging:fe,shouldFade:xe,closeDrawer:nn,onNestedDrag:Qa,onNestedOpenChange:xn,onNestedRelease:ga,keyboardIsOpen:H,modal:S,snapPointsOffset:oe,activeSnapPointIndex:Ke,direction:O,shouldScaleBackground:c,setBackgroundColorOnScale:u,noBodyStyles:T,container:V,autoFocus:G}},n))}const y4=ee.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:c,modal:u,shouldAnimate:d}=Pd(),f=f4(t,n),m=r&&r.length>0;if(!u)return null;const p=ee.useCallback(g=>a(g),[a]);return ee.createElement(Pq,{onMouseUp:p,ref:f,"data-vaul-overlay":"","data-vaul-snap-points":c&&m?"true":"false","data-vaul-snap-points-overlay":c&&i?"true":"false","data-vaul-animate":d?.current?"true":"false",...e})});y4.displayName="Drawer.Overlay";const _4=ee.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:c,onRelease:u,onDrag:d,keyboardIsOpen:f,snapPointsOffset:m,activeSnapPointIndex:p,modal:g,isOpen:y,direction:w,snapPoints:b,container:S,handleOnly:R,shouldAnimate:E,autoFocus:T}=Pd(),[O,C]=ee.useState(!1),I=f4(a,i),k=ee.useRef(null),P=ee.useRef(null),$=ee.useRef(!1),W=b&&b.length>0;kW();const V=(U,J,le=0)=>{if($.current)return!0;const F=Math.abs(U.y),Y=Math.abs(U.x),se=Y>F,fe=["bottom","right"].includes(J)?1:-1;if(J==="left"||J==="right"){if(!(U.x*fe<0)&&Y>=0&&Y<=le)return se}else if(!(U.y*fe<0)&&F>=0&&F<=le)return!se;return $.current=!0,!0};ee.useEffect(()=>{W&&window.requestAnimationFrame(()=>{C(!0)})},[]);function G(U){k.current=null,$.current=!1,u(U)}return ee.createElement(Dq,{"data-vaul-drawer-direction":w,"data-vaul-drawer":"","data-vaul-delayed-snap-points":O?"true":"false","data-vaul-snap-points":y&&W?"true":"false","data-vaul-custom-container":S?"true":"false","data-vaul-animate":E?.current?"true":"false",...r,ref:I,style:m&&m.length>0?{"--snap-point-height":`${m[p??0]}px`,...t}:t,onPointerDown:U=>{R||(r.onPointerDown==null||r.onPointerDown.call(r,U),k.current={x:U.pageX,y:U.pageY},c(U))},onOpenAutoFocus:U=>{n?.(U),T||U.preventDefault()},onPointerDownOutside:U=>{if(e?.(U),!g||U.defaultPrevented){U.preventDefault();return}f.current&&(f.current=!1)},onFocusOutside:U=>{if(!g){U.preventDefault();return}},onPointerMove:U=>{if(P.current=U,R||(r.onPointerMove==null||r.onPointerMove.call(r,U),!k.current))return;const J=U.pageY-k.current.y,le=U.pageX-k.current.x,F=U.pointerType==="touch"?10:2;V({x:le,y:J},w,F)?d(U):(Math.abs(le)>F||Math.abs(J)>F)&&(k.current=null)},onPointerUp:U=>{r.onPointerUp==null||r.onPointerUp.call(r,U),k.current=null,$.current=!1,u(U)},onPointerOut:U=>{r.onPointerOut==null||r.onPointerOut.call(r,U),G(P.current)},onContextMenu:U=>{r.onContextMenu==null||r.onContextMenu.call(r,U),P.current&&G(P.current)}})});_4.displayName="Drawer.Content";const PW=250,DW=120,LW=ee.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:c,activeSnapPoint:u,setActiveSnapPoint:d,dismissible:f,handleOnly:m,isOpen:p,onPress:g,onDrag:y}=Pd(),w=ee.useRef(null),b=ee.useRef(!1);function S(){if(b.current){T();return}window.setTimeout(()=>{R()},DW)}function R(){if(i||e||b.current){T();return}if(T(),!c||c.length===0){f||a();return}if(u===c[c.length-1]&&f){a();return}const C=c.findIndex(k=>k===u);if(C===-1)return;const I=c[C+1];d(I)}function E(){w.current=window.setTimeout(()=>{b.current=!0},PW)}function T(){w.current&&window.clearTimeout(w.current),b.current=!1}return ee.createElement("div",{onClick:S,onPointerCancel:T,onPointerDown:O=>{m&&g(O),E()},onPointerMove:O=>{m&&y(O)},ref:r,"data-vaul-drawer-visible":p?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ee.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});LW.displayName="Drawer.Handle";function jW(e){const t=Pd(),{container:n=t.container,...r}=e;return ee.createElement(Mq,{container:n,...r})}const Lae={Root:MW,Content:_4,Overlay:y4,Trigger:Nq,Portal:jW,Close:$q,Title:Lq,Description:jq};var dl=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),Op=class extends Error{},$W=class extends Error{},UW=e=>Math.exp(e)*150,zW=(e,...t)=>dl(void 0,[e,...t],function*(n,{attempts:r=4}={}){var a;let i;for(let c=0;c<r;c++)try{return yield n()}catch(u){i=u,yield new Promise(d=>setTimeout(d,UW(c)))}throw new Op((a=i?.message)!=null?a:"Exhausted all retries")}),Iu,b4="captchaFoxOnLoad",LO=`https://cdn.captchafox.com/api.js?render=explicit&onload=${b4}`;function VW(){return dl(this,arguments,function*({nonce:e}={}){return Iu&&document.querySelector(`script[src="${LO}"]`)||(Iu=new Promise((t,n)=>{window[b4]=t;const r=document.createElement("script");r.src=LO,r.async=!0,r.defer=!0,r.onerror=a=>{r.remove(),Iu=void 0,n(a)},e&&(r.nonce=e),document.body.appendChild(r)})),Iu})}function FW(){return dl(this,arguments,function*(e={}){return zW(()=>VW(e))})}var BW=e=>{window._tsdk={n:e,v:"1.11.0"}},Fc=()=>typeof window?.captchafox<"u",w4=A.forwardRef(({executeTimeoutSeconds:e=30,sitekey:t,lang:n,mode:r,theme:a,className:i,nonce:c,i18n:u,onError:d,onVerify:f,onLoad:m,onFail:p,onClose:g,onChallengeChange:y,onChallengeOpen:w},b)=>{const[S,R]=A.useState(),[E,T]=A.useState(),O=A.useRef(!1),C=A.useRef(),I=A.useRef(),k=A.useRef(),P=A.useRef(!1);A.useImperativeHandle(b,()=>({getResponse(){return!Fc()||!E?(console.warn("[CaptchaFox] Widget has not been loaded"),""):window.captchafox.getResponse(E)},reset(){if(!Fc()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}window.captchafox.reset(E)},remove(){if(!Fc()||!E){console.warn("[CaptchaFox] Widget has not been loaded");return}T(void 0),window.captchafox.remove(E)},execute:()=>dl(void 0,null,function*(){if(P.current)return Promise.reject(new Op);if(!Fc()||!E)return W();try{return yield window.captchafox.execute(E)}catch(U){const J=V(U);return Promise.reject(J)}})}),[E]),A.useEffect(()=>{E&&m?.()},[E]),A.useEffect(()=>(BW("rj"),()=>{$()}),[]),A.useEffect(()=>{S&&(O.current?Fc()&&G():FW({nonce:c}).then(()=>dl(void 0,null,function*(){Fc()&&(O.current=!0,yield G())})).catch(U=>{var J;d?.(U),P.current=!0,(J=k.current)==null||J.call(k),console.error("[CaptchaFox] Could not load script:",U)}))},[S,t,n,r]);const $=()=>{clearTimeout(I.current)},W=()=>new Promise((U,J)=>{k.current=()=>{$(),J(new Op)},I.current=setTimeout(()=>{J(new $W("Execute timed out"))},e*1e3),C.current=le=>{$(),window.captchafox.execute(le).then(U).catch(F=>{const Y=V(F);J(Y)})}}),V=U=>U!=="challenge-aborted"&&U!=="rate-limited"?new Op:U,G=()=>dl(void 0,null,function*(){var U,J,le;if((U=window.captchafox)==null||U.remove(E),!S||((J=S?.children)==null?void 0:J.length)===1)return;const F=yield(le=window.captchafox)==null?void 0:le.render(S,{lang:n,sitekey:t,mode:r,theme:a,i18n:u,onError:d,onFail:p,onClose:g,onVerify:f,onChallengeChange:y,onChallengeOpen:w});F&&(T(F),C.current&&(C.current(F),C.current=void 0))});return ee.createElement("div",{ref:R,id:E,className:i})});w4.displayName="CaptchaFox";function bo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U_(e,t){return U_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},U_(e,t)}function qW(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U_(e,t)}var HW=Object.defineProperty,GW=Object.defineProperties,ZW=Object.getOwnPropertyDescriptors,um=Object.getOwnPropertySymbols,S4=Object.prototype.hasOwnProperty,E4=Object.prototype.propertyIsEnumerable,z_=(e,t,n)=>t in e?HW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Kr=(e,t)=>{for(var n in t||(t={}))S4.call(t,n)&&z_(e,n,t[n]);if(um)for(var n of um(t))E4.call(t,n)&&z_(e,n,t[n]);return e},R4=(e,t)=>GW(e,ZW(t)),WW=(e,t)=>{var n={};for(var r in e)S4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&um)for(var r of um(e))t.indexOf(r)<0&&E4.call(e,r)&&(n[r]=e[r]);return n},Kn=(e,t,n)=>(z_(e,typeof t!="symbol"?t+"":t,n),n),yl=(e,t,n)=>new Promise((r,a)=>{var i=d=>{try{u(n.next(d))}catch(f){a(f)}},c=d=>{try{u(n.throw(d))}catch(f){a(f)}},u=d=>d.done?r(d.value):Promise.resolve(d.value).then(i,c);u((n=n.apply(e,t)).next())}),KW="hCaptcha-script",Cp="hCaptchaOnLoad",jO="script-error",Ns="@hCaptcha/loader";function YW(e){return Object.entries(e).filter(([,t])=>t||t===!1).map(([t,n])=>`${encodeURIComponent(t)}=${encodeURIComponent(String(n))}`).join("&")}function x4(e){let t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function T4(e){return e||document.head}function QW(e){var t;e.setTag("source",Ns),e.setTag("url",document.URL),e.setContext("os",{UA:navigator.userAgent}),e.setContext("browser",Kr({},XW())),e.setContext("device",R4(Kr({},eK()),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:((t=screen.orientation)==null?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform}))}function XW(){var e,t,n,r,a,i;let c=navigator.userAgent,u,d;return c.indexOf("Firefox")!==-1?(u="Firefox",d=(e=c.match(/Firefox\/([\d.]+)/))==null?void 0:e[1]):c.indexOf("Edg")!==-1?(u="Microsoft Edge",d=(t=c.match(/Edg\/([\d.]+)/))==null?void 0:t[1]):c.indexOf("Chrome")!==-1&&c.indexOf("Safari")!==-1?(u="Chrome",d=(n=c.match(/Chrome\/([\d.]+)/))==null?void 0:n[1]):c.indexOf("Safari")!==-1&&c.indexOf("Chrome")===-1?(u="Safari",d=(r=c.match(/Version\/([\d.]+)/))==null?void 0:r[1]):c.indexOf("Opera")!==-1||c.indexOf("OPR")!==-1?(u="Opera",d=(a=c.match(/(Opera|OPR)\/([\d.]+)/))==null?void 0:a[2]):c.indexOf("MSIE")!==-1||c.indexOf("Trident")!==-1?(u="Internet Explorer",d=(i=c.match(/(MSIE |rv:)([\d.]+)/))==null?void 0:i[2]):(u="Unknown",d="Unknown"),{name:u,version:d}}function JW(e){return new Promise(t=>setTimeout(t,e))}function eK(){let e=navigator.userAgent,t;e.indexOf("Win")!==-1?t="Windows":e.indexOf("Mac")!==-1?t="Mac":e.indexOf("Linux")!==-1?t="Linux":e.indexOf("Android")!==-1?t="Android":e.indexOf("like Mac")!==-1||e.indexOf("iPhone")!==-1||e.indexOf("iPad")!==-1?t="iOS":t="Unknown";let n;return/Mobile|iPhone|iPod|Android/i.test(e)?n="Mobile":/Tablet|iPad/i.test(e)?n="Tablet":n="Desktop",{model:t,family:t,device:n}}var tK=class O4{constructor(t){Kn(this,"_parent"),Kn(this,"breadcrumbs",[]),Kn(this,"context",{}),Kn(this,"extra",{}),Kn(this,"tags",{}),Kn(this,"request"),Kn(this,"user"),this._parent=t}get parent(){return this._parent}child(){return new O4(this)}setRequest(t){return this.request=t,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(t){return typeof t.timestamp>"u"&&(t.timestamp=new Date().toISOString()),this.breadcrumbs.push(t),this}setExtra(t,n){return this.extra[t]=n,this}removeExtra(t){return delete this.extra[t],this}setContext(t,n){return typeof n.type>"u"&&(n.type=t),this.context[t]=n,this}removeContext(t){return delete this.context[t],this}setTags(t){return this.tags=Kr(Kr({},this.tags),t),this}setTag(t,n){return this.tags[t]=n,this}removeTag(t){return delete this.tags[t],this}setUser(t){return this.user=t,this}removeUser(){return this.user=void 0,this}toBody(){let t=[],n=this;for(;n;)t.push(n),n=n.parent;return t.reverse().reduce((r,a)=>{var i;return r.breadcrumbs=[...(i=r.breadcrumbs)!=null?i:[],...a.breadcrumbs],r.extra=Kr(Kr({},r.extra),a.extra),r.contexts=Kr(Kr({},r.contexts),a.context),r.tags=Kr(Kr({},r.tags),a.tags),a.user&&(r.user=a.user),a.request&&(r.request=a.request),r},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},nK=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rK=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,oK=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,aK=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,Ch="?",$O="An unknown error occurred",sK="0.0.4";function iK(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(Math.random()*256);return e}function pr(e){return(e+256).toString(16).substring(1)}function cK(){let e=iK(new Array(16));return e[6]=e[6]&15|64,e[8]=e[8]&63|128,pr(e[0])+pr(e[1])+pr(e[2])+pr(e[3])+"-"+pr(e[4])+pr(e[5])+"-"+pr(e[6])+pr(e[7])+"-"+pr(e[8])+pr(e[9])+"-"+pr(e[10])+pr(e[11])+pr(e[12])+pr(e[13])+pr(e[14])+pr(e[15])}var lK=[[nK,"chrome"],[oK,"winjs"],[rK,"gecko"]];function uK(e){var t,n,r,a;if(!e.stack)return null;let i=[],c=(r=(n=(t=e.stack).split)==null?void 0:n.call(t,`
108
+ `))!=null?r:[];for(let u=0;u<c.length;++u){let d=null,f=null,m=null;for(let[p,g]of lK)if(f=p.exec(c[u]),f){m=g;break}if(!(!f||!m)){if(m==="chrome")d={filename:(a=f[2])!=null&&a.startsWith("address at ")?f[2].substring(11):f[2],function:f[1]||Ch,lineno:f[3]?+f[3]:null,colno:f[4]?+f[4]:null};else if(m==="winjs")d={filename:f[2],function:f[1]||Ch,lineno:+f[3],colno:f[4]?+f[4]:null};else if(m==="gecko")u===0&&!f[5]&&e.columnNumber!==void 0&&i.length>0&&(i[0].column=e.columnNumber+1),d={filename:f[3],function:f[1]||Ch,lineno:f[4]?+f[4]:null,colno:f[5]?+f[5]:null};else continue;!d.function&&d.lineno&&(d.function=Ch),i.push(d)}}return i.length?i.reverse():null}function dK(e){let t=uK(e);return{type:e.name,value:e.message,stacktrace:{frames:t??[]}}}function fK(e){let t=aK.exec(e),n=t?t.slice(1):[];if(n.length!==6)throw new Error("Invalid DSN");let r=n[5].split("/"),a=r.slice(0,-1).join("/");return n[0]+"://"+n[3]+(n[4]?":"+n[4]:"")+(a?"/"+a:"")+"/api/"+r.pop()+"/envelope/?sentry_version=7&sentry_key="+n[1]+(n[2]?"&sentry_secret="+n[2]:"")}function hK(e,t,n){var r,a;let i=Kr({event_id:cK().replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:sK},environment:t,release:n,timestamp:Date.now()/1e3},e.scope.toBody());if(e.type==="exception"){i.message=(a=(r=e.error)==null?void 0:r.message)!=null?a:"Unknown error",i.fingerprint=[i.message];let c=[],u=e.error;for(let d=0;d<5&&u&&(c.push(dK(u)),!(!u.cause||!(u.cause instanceof Error)));d++)u=u.cause;i.exception={values:c.reverse()}}return e.type==="message"&&(i.message=e.message,i.level=e.level),i}function pK(e){if(e instanceof Error)return e;if(typeof e=="string")return new Error(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let n=e,{message:r}=n,a=WW(n,["message"]),i=new Error(typeof r=="string"?r:$O);return Object.assign(i,a)}let t=new Error($O);return Object.assign(t,{cause:e})}function mK(e,t,n){return yl(this,null,function*(){var r,a;try{if(typeof fetch<"u"&&typeof AbortSignal<"u"){let i;if(n){let d=new AbortController;i=d.signal,setTimeout(()=>d.abort(),n)}let c=yield fetch(e,R4(Kr({},t),{signal:i})),u=yield c.text();return{status:c.status,body:u}}return yield new Promise((i,c)=>{var u,d;let f=new XMLHttpRequest;if(f.open((u=t?.method)!=null?u:"GET",e),f.onload=()=>i({status:f.status,body:f.responseText}),f.onerror=()=>c(new Error("XHR Network Error")),t?.headers)for(let[m,p]of Object.entries(t.headers))f.setRequestHeader(m,p);if(n){let m=setTimeout(()=>{f.abort(),c(new Error("Request timed out"))},n);f.onloadend=()=>{clearTimeout(m)}}f.send((d=t?.body)==null?void 0:d.toString())})}catch(i){return{status:0,body:(a=(r=i?.toString)==null?void 0:r.call(i))!=null?a:"Unknown error"}}})}var Mr,V_=(Mr=class{constructor(e){Kn(this,"apiURL"),Kn(this,"dsn"),Kn(this,"environment"),Kn(this,"release"),Kn(this,"sampleRate"),Kn(this,"debug"),Kn(this,"_scope"),Kn(this,"shouldBuffer",!1),Kn(this,"bufferlimit",20),Kn(this,"buffer",[]);var t,n,r,a,i;this.environment=e.environment,this.release=e.release,this.sampleRate=(t=e.sampleRate)!=null?t:1,this.debug=(n=e.debug)!=null?n:!1,this._scope=(r=e.scope)!=null?r:new tK,this.apiURL=fK(e.dsn),this.dsn=e.dsn,this.shouldBuffer=(a=e.buffer)!=null?a:!1,this.bufferlimit=(i=e.bufferLimit)!=null?i:20}static init(e){Mr._instance||(Mr._instance=new Mr(e))}static get instance(){if(!Mr._instance)throw new Error("Sentry has not been initialized");return Mr._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return Mr.instance.scope}withScope(e){let t=this._scope.child();e(t)}static withScope(e){Mr.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:pK(e),scope:t??this._scope})}static captureException(e,t){Mr.instance.captureException(e,t)}captureMessage(e,t="info",n){this.captureEvent({type:"message",level:t,message:e,scope:n??this._scope})}static captureMessage(e,t="info",n){Mr.instance.captureMessage(e,t,n)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return yl(this,null,function*(){try{this.log("Sending sentry event",e);let n=hK(e,this.environment,this.release),r={event_id:n.event_id,dsn:this.dsn},a={type:"event"},i=JSON.stringify(r)+`
109
+ `+JSON.stringify(a)+`
110
+ `+JSON.stringify(n),c=yield mK(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:i},t);this.log("Sentry response",c.status),c.status!==200&&(console.log(c.body),console.error("Failed to send event to Sentry",c))}catch(n){console.error("Failed to send event",n)}})}flush(e=5e3){return yl(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(n=>this.sendEvent(n,e));yield Promise.all(t),this.log("Flushed all events")}catch(t){console.error("Failed to flush events",t)}})}static flush(e=5e3){return Mr.instance.flush(e)}static reset(){Mr._instance=void 0}},Kn(Mr,"_instance"),Mr),gK="https://d233059272824702afc8c43834c4912d@sentry.hcaptcha.com/6",vK="2.3.0",yK="production";function _K(e=!0){if(!e)return UO();V_.init({dsn:gK,release:vK,environment:yK});let t=V_.scope;return QW(t),UO(t)}function UO(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>{e&&e.setRequest(t)},captureException:t=>{e&&V_.captureException(t,e)}}}function bK({scriptLocation:e,query:t,loadAsync:n=!0,crossOrigin:r="anonymous",apihost:a="https://js.hcaptcha.com",cleanup:i=!1,secureApi:c=!1,scriptSource:u=""}={},d){let f=T4(e),m=x4(f);return new Promise((p,g)=>{let y=m.document.createElement("script");y.id=KW,u?y.src=`${u}?onload=${Cp}`:c?y.src=`${a}/1/secure-api.js?onload=${Cp}`:y.src=`${a}/1/api.js?onload=${Cp}`,y.crossOrigin=r,y.async=n;let w=(b,S)=>{try{!c&&i&&f.removeChild(y),S(b)}catch(R){g(R)}};y.onload=b=>w(b,p),y.onerror=b=>{d&&d(y.src),w(b,g)},y.src+=t!==""?`&${t}`:"",f.appendChild(y)})}var Ah=[];function wK(e={cleanup:!1},t){try{t.addBreadcrumb({category:Ns,message:"hCaptcha loader params",data:e});let n=T4(e.scriptLocation),r=x4(n),a=Ah.find(({scope:c})=>c===r.window);if(a)return t.addBreadcrumb({category:Ns,message:"hCaptcha already loaded"}),a.promise;let i=new Promise((c,u)=>yl(this,null,function*(){try{r.window[Cp]=()=>{t.addBreadcrumb({category:Ns,message:"hCaptcha script called onload function"}),c(r.window.hcaptcha)};let d=YW({custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl,uj:e.uj});yield bK(Kr({query:d},e),f=>{t.captureRequest({url:f,method:"GET"})}),t.addBreadcrumb({category:Ns,message:"hCaptcha loaded",data:a})}catch{t.addBreadcrumb({category:Ns,message:"hCaptcha failed to load"});let f=Ah.findIndex(m=>m.scope===r.window);f!==-1&&Ah.splice(f,1),u(new Error(jO))}}));return Ah.push({promise:i,scope:r.window}),i}catch(n){return t.captureException(n),Promise.reject(new Error(jO))}}function C4(e,t,n=0){return yl(this,null,function*(){var r,a;let i=(r=e.maxRetries)!=null?r:2,c=(a=e.retryDelay)!=null?a:1e3,u=n<i?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield wK(e,t)}catch(d){return t.addBreadcrumb({category:Ns,message:u}),n>=i?(t.captureException(d),Promise.reject(d)):(t.addBreadcrumb({category:Ns,message:`Waiting ${c}ms before retry attempt ${n+1}`}),yield JW(c),n+=1,C4(e,t,n))}})}function SK(){return yl(this,arguments,function*(e={}){let t=_K(e.sentry);return yield C4(e,t)})}function zO(e){var t=e&&e.ownerDocument||document,n=t.defaultView||t.parentWindow||window;return{document:t,window:n}}function VO(e){return e||document.head}var EK=(function(e){qW(t,e);function t(r){var a;return a=e.call(this,r)||this,a._hcaptcha=void 0,a.renderCaptcha=a.renderCaptcha.bind(bo(a)),a.resetCaptcha=a.resetCaptcha.bind(bo(a)),a.removeCaptcha=a.removeCaptcha.bind(bo(a)),a.isReady=a.isReady.bind(bo(a)),a._onReady=null,a.loadCaptcha=a.loadCaptcha.bind(bo(a)),a.handleOnLoad=a.handleOnLoad.bind(bo(a)),a.handleSubmit=a.handleSubmit.bind(bo(a)),a.handleExpire=a.handleExpire.bind(bo(a)),a.handleError=a.handleError.bind(bo(a)),a.handleOpen=a.handleOpen.bind(bo(a)),a.handleClose=a.handleClose.bind(bo(a)),a.handleChallengeExpired=a.handleChallengeExpired.bind(bo(a)),a.ref=A.createRef(),a.apiScriptRequested=!1,a.sentryHub=null,a.captchaId="",a._pendingExecute=null,a.state={isApiReady:!1,isRemoved:!1,elementId:r.id},a}var n=t.prototype;return n.componentDidMount=function(){var a=this,i=VO(this.props.scriptLocation),c=zO(i);this._hcaptcha=c.window.hcaptcha||void 0;var u=typeof this._hcaptcha<"u";if(u){this.setState({isApiReady:!0},function(){a.renderCaptcha()});return}this.loadCaptcha()},n.componentWillUnmount=function(){var a=this._hcaptcha,i=this.captchaId;this._cancelPendingExecute("react-component-unmounted"),this.isReady()&&(a.reset(i),a.remove(i))},n.shouldComponentUpdate=function(a,i){return!(this.state.isApiReady!==i.isApiReady||this.state.isRemoved!==i.isRemoved)},n.componentDidUpdate=function(a){var i=this,c=["sitekey","size","theme","tabindex","languageOverride","endpoint"],u=c.every(function(d){return a[d]===i.props[d]});u||this.removeCaptcha(function(){i.renderCaptcha()})},n.loadCaptcha=function(){if(!this.apiScriptRequested){var a=this.props,i=a.apihost,c=a.assethost,u=a.endpoint,d=a.host,f=a.imghost,m=a.languageOverride,p=a.reCaptchaCompat,g=a.reportapi,y=a.sentry,w=a.custom,b=a.loadAsync,S=a.scriptLocation,R=a.scriptSource,E=a.secureApi,T=a.cleanup,O=T===void 0?!0:T,C=a.userJourneys,I={render:"explicit",apihost:i,assethost:c,endpoint:u,hl:m,host:d,imghost:f,recaptchacompat:p===!1?"off":null,reportapi:g,sentry:y,custom:w,loadAsync:b,scriptLocation:S,scriptSource:R,secureApi:E,cleanup:O,uj:C!==void 0?C:!1};SK(I).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},n.renderCaptcha=function(a){var i=this,c=this.props.onReady,u=this.state.isApiReady,d=this.captchaId;if(!(!u||d)){var f=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),m=this._hcaptcha,p=m.render(this.ref.current,f);this.captchaId=p,this.setState({isRemoved:!1},function(){a&&a(),c&&c(),i._onReady&&i._onReady(p)})}},n.resetCaptcha=function(){var a=this._hcaptcha,i=this.captchaId;this.isReady()&&(a.reset(i),this._cancelPendingExecute("hcaptcha-reset"))},n.removeCaptcha=function(a){var i=this,c=this._hcaptcha,u=this.captchaId;this._cancelPendingExecute("hcaptcha-removed"),this.isReady()&&this.setState({isRemoved:!0},function(){i.captchaId="",c.remove(u),a&&a()})},n.handleOnLoad=function(){var a=this;this.setState({isApiReady:!0},function(){var i=VO(a.props.scriptLocation),c=zO(i);a._hcaptcha=c.window.hcaptcha,a.renderCaptcha(function(){var u=a.props.onLoad;u&&u()})})},n.handleSubmit=function(a){var i=this.props.onVerify,c=this.state.isRemoved,u=this._hcaptcha,d=this.captchaId;if(!(typeof u>"u"||c)){var f=u.getResponse(d),m=u.getRespKey(d);i&&i(f,m)}},n.handleExpire=function(){var a=this.props.onExpire,i=this._hcaptcha,c=this.captchaId;this.isReady()&&(i.reset(c),a&&a())},n.handleError=function(a){var i=this.props.onError,c=this._hcaptcha,u=this.captchaId;this.isReady()&&c.reset(u),i&&i(a)},n.isReady=function(){var a=this.state,i=a.isApiReady,c=a.isRemoved;return i&&!c},n._cancelPendingExecute=function(a){if(this._pendingExecute){var i=this._pendingExecute;this._pendingExecute=null;var c=new Error(a);i.reject(c)}},n.handleOpen=function(){!this.isReady()||!this.props.onOpen||this.props.onOpen()},n.handleClose=function(){!this.isReady()||!this.props.onClose||this.props.onClose()},n.handleChallengeExpired=function(){!this.isReady()||!this.props.onChalExpired||this.props.onChalExpired()},n.execute=function(a){var i=this;a===void 0&&(a=null),a=typeof a=="object"?a:null;try{var c=this._hcaptcha,u=this.captchaId;if(a&&a.async&&this._pendingExecute&&this._cancelPendingExecute("hcaptcha-execute-replaced"),!this.isReady())return a&&a.async?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},i._onReady=function(p){if(i._pendingExecute)try{var g=c.execute(p,a);g&&typeof g.then=="function"?g.then(function(y){i._pendingExecute=null,f(y)}).catch(function(y){i._pendingExecute=null,m(y)}):(i._pendingExecute=null,m(new Error("hcaptcha-execute-no-promise")))}catch(y){i._pendingExecute=null,m(y)}}}):(this._onReady=function(f){c.execute(f,a)},null);var d=c.execute(u,a);return a&&a.async&&d&&typeof d.then=="function"?new Promise(function(f,m){i._pendingExecute={resolve:f,reject:m},d.then(function(p){i._pendingExecute=null,f(p)}).catch(function(p){i._pendingExecute=null,m(p)})}):d}catch(f){return a&&a.async?Promise.reject(f):null}},n.close=function(){var a=this._hcaptcha,i=this.captchaId;if(this._cancelPendingExecute("hcaptcha-closed"),!!this.isReady())return a.close(i)},n.setData=function(a){var i=this._hcaptcha,c=this.captchaId;this.isReady()&&(a&&typeof a!="object"&&(a=null),i.setData(c,a))},n.getResponse=function(){var a=this._hcaptcha;return a.getResponse(this.captchaId)},n.getRespKey=function(){var a=this._hcaptcha;return a.getRespKey(this.captchaId)},n.render=function(){var a=this.state.elementId;return A.createElement("div",{ref:this.ref,id:a})},t})(A.Component),RK=({as:e="div",...t},n)=>x.jsx(e,{...t,ref:n}),xK=A.forwardRef(RK),TK="https://challenges.cloudflare.com/turnstile/v0/api.js",A1="cf-turnstile-script",OK="cf-turnstile",I1="onloadTurnstileCallback",A4=e=>!!document.getElementById(e),CK=({render:e="explicit",onLoadCallbackName:t=I1,scriptOptions:{nonce:n="",defer:r=!0,async:a=!0,id:i="",appendTo:c,onError:u,crossOrigin:d=""}={}})=>{let f=i||A1;if(A4(f))return;let m=document.createElement("script");m.id=f,m.src=`${TK}?onload=${t}&render=${e}`,!document.querySelector(`script[src="${m.src}"]`)&&(m.defer=!!r,m.async=!!a,n&&(m.nonce=n),d&&(m.crossOrigin=d),u&&(m.onerror=u,delete window[t]),(c==="body"?document.body:document.getElementsByTagName("head")[0]).appendChild(m))},Si={normal:{width:300,height:65},compact:{width:150,height:140},invisible:{width:0,height:0,overflow:"hidden"},flexible:{minWidth:300,width:"100%",height:65},interactionOnly:{width:"fit-content",height:"auto",display:"flex"}};function AK(e){if(e!=="invisible"&&e!=="interactionOnly")return e}function IK(e=A1){let[t,n]=A.useState(!1);return A.useEffect(()=>{let r=()=>{A4(e)&&n(!0)},a=new MutationObserver(r);return a.observe(document,{childList:!0,subtree:!0}),r(),()=>{a.disconnect()}},[e]),t}var Xu="unloaded",I4,kK=new Promise((e,t)=>{I4={resolve:e,reject:t},Xu==="ready"&&e(void 0)}),FO=(e=I1)=>(Xu==="unloaded"&&(Xu="loading",window[e]=()=>{I4.resolve(),Xu="ready",delete window[e]}),kK),k4=A.forwardRef((e,t)=>{let{scriptOptions:n,options:r={},siteKey:a,onWidgetLoad:i,onSuccess:c,onExpire:u,onError:d,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g,onLoadScript:y,id:w,style:b,as:S="div",injectScript:R=!0,rerenderOnCallbackChange:E=!1,...T}=e,O=r.size,C=A.useCallback(()=>typeof O>"u"?{}:r.execution==="execute"?Si.invisible:r.appearance==="interaction-only"?Si.interactionOnly:Si[O],[r.execution,O,r.appearance]),[I,k]=A.useState(C()),P=A.useRef(null),[$,W]=A.useState(!1),V=A.useRef(void 0),G=A.useRef(!1),U=w||OK,J=A.useRef({onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g});A.useEffect(()=>{E||(J.current={onSuccess:c,onError:d,onExpire:u,onBeforeInteractive:f,onAfterInteractive:m,onUnsupported:p,onTimeout:g})});let le=n?.id||A1,F=IK(le),Y=n?.onLoadCallbackName||I1,se=r.appearance||"always",fe=A.useMemo(()=>({sitekey:a,action:r.action,cData:r.cData,theme:r.theme||"auto",language:r.language||"auto",tabindex:r.tabIndex,"response-field":r.responseField,"response-field-name":r.responseFieldName,size:AK(O),retry:r.retry||"auto","retry-interval":r.retryInterval||8e3,"refresh-expired":r.refreshExpired||"auto","refresh-timeout":r.refreshTimeout||"auto",execution:r.execution||"render",appearance:r.appearance||"always","feedback-enabled":r.feedbackEnabled??!0,callback:D=>{G.current=!0,E?c?.(D):J.current.onSuccess?.(D)},"error-callback":E?d:(...D)=>J.current.onError?.(...D),"expired-callback":E?u:(...D)=>J.current.onExpire?.(...D),"before-interactive-callback":E?f:(...D)=>J.current.onBeforeInteractive?.(...D),"after-interactive-callback":E?m:(...D)=>J.current.onAfterInteractive?.(...D),"unsupported-callback":E?p:(...D)=>J.current.onUnsupported?.(...D),"timeout-callback":E?g:(...D)=>J.current.onTimeout?.(...D)}),[r.action,r.appearance,r.cData,r.execution,r.language,r.refreshExpired,r.responseField,r.responseFieldName,r.retry,r.retryInterval,r.tabIndex,r.theme,r.feedbackEnabled,r.refreshTimeout,a,O,E,E?c:null,E?d:null,E?u:null,E?f:null,E?m:null,E?p:null,E?g:null]),K=A.useCallback(()=>typeof window<"u"&&!!window.turnstile,[]);return A.useEffect(function(){R&&!$&&(FO(Y),CK({onLoadCallbackName:Y,scriptOptions:{...n,id:le}}))},[R,$,n,le,Y]),A.useEffect(function(){Xu!=="ready"&&FO(Y).then(()=>W(!0)).catch(console.error)},[Y]),A.useEffect(function(){if(!P.current||!$)return;let D=!1;return(async()=>{if(D||!P.current)return;let q=window.turnstile.render(P.current,fe);V.current=q,V.current&&i?.(V.current)})(),()=>{D=!0,V.current&&(window.turnstile.remove(V.current),G.current=!1)}},[U,$,fe]),A.useImperativeHandle(t,()=>{let{turnstile:D}=window;return{getResponse(){if(!D?.getResponse||!V.current||!K()){console.warn("Turnstile has not been loaded");return}return D.getResponse(V.current)},async getResponsePromise(q=3e4,B=100){return new Promise((L,z)=>{let Q,me=async()=>{if(G.current&&window.turnstile&&V.current)try{let ve=window.turnstile.getResponse(V.current);return Q&&clearTimeout(Q),ve?L(ve):z(new Error("No response received"))}catch(ve){return Q&&clearTimeout(Q),console.warn("Failed to get response",ve),z(new Error("Failed to get response"))}Q||(Q=setTimeout(()=>{Q&&clearTimeout(Q),z(new Error("Timeout"))},q)),await new Promise(ve=>setTimeout(ve,B)),await me()};me()})},reset(){if(!D?.reset||!V.current||!K()){console.warn("Turnstile has not been loaded");return}r.execution==="execute"&&k(Si.invisible);try{G.current=!1,D.reset(V.current)}catch(q){console.warn(`Failed to reset Turnstile widget ${V}`,q)}},remove(){if(!D?.remove||!V.current||!K()){console.warn("Turnstile has not been loaded");return}k(Si.invisible),G.current=!1,D.remove(V.current),V.current=null},render(){if(!D?.render||!P.current||!K()||V.current){console.warn("Turnstile has not been loaded or container not found");return}let q=D.render(P.current,fe);return V.current=q,V.current&&i?.(V.current),r.execution!=="execute"&&k(O?Si[O]:{}),q},execute(){if(r.execution!=="execute"){console.warn('Execution mode is not set to "execute"');return}if(!D?.execute||!P.current||!V.current||!K()){console.warn("Turnstile has not been loaded or container not found");return}D.execute(P.current,fe),k(O?Si[O]:{})},isExpired(){return!D?.isExpired||!V.current||!K()?(console.warn("Turnstile has not been loaded"),!1):D.isExpired(V.current)}}},[V,r.execution,O,fe,P,K,$,i]),A.useEffect(()=>{if($||!F)return;if(window.turnstile){W(!0);return}let D=setInterval(()=>{window.turnstile&&(W(!0),clearInterval(D))},50);return()=>{clearInterval(D)}},[$,F]),A.useEffect(()=>{k(C())},[r.execution,O,se]),A.useEffect(()=>{!F||typeof y!="function"||y()},[F]),x.jsx(xK,{ref:P,as:S,id:U,style:{...I,...b},...T})});k4.displayName="Turnstile";var w0={exports:{}},S0,BO;function NK(){if(BO)return S0;BO=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return S0=e,S0}var E0,qO;function MK(){if(qO)return E0;qO=1;var e=NK();function t(){}function n(){}return n.resetWarningCache=t,E0=function(){function r(c,u,d,f,m,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function a(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},E0}var HO;function k1(){return HO||(HO=1,w0.exports=MK()()),w0.exports}var PK=k1();const Pr=Ga(PK);var DK=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function F_(){return F_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F_.apply(this,arguments)}function LK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function Ih(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,B_(e,t)}function B_(e,t){return B_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,a){return r.__proto__=a,r},B_(e,t)}var ng=(function(e){jK(t,e);function t(){var r;return r=e.call(this)||this,r.handleExpired=r.handleExpired.bind(Ih(r)),r.handleErrored=r.handleErrored.bind(Ih(r)),r.handleChange=r.handleChange.bind(Ih(r)),r.handleRecaptchaRef=r.handleRecaptchaRef.bind(Ih(r)),r}var n=t.prototype;return n.getCaptchaFunction=function(a){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[a]:this.props.grecaptcha[a]:null},n.getValue=function(){var a=this.getCaptchaFunction("getResponse");return a&&this._widgetId!==void 0?a(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var a=this.getCaptchaFunction("execute");if(a&&this._widgetId!==void 0)return a(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var a=this;return new Promise(function(i,c){a.executionResolve=i,a.executionReject=c,a.execute()})},n.reset=function(){var a=this.getCaptchaFunction("reset");a&&this._widgetId!==void 0&&a(this._widgetId)},n.forceReset=function(){var a=this.getCaptchaFunction("reset");a&&a()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(a){this.props.onChange&&this.props.onChange(a),this.executionResolve&&(this.executionResolve(a),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var a=this.getCaptchaFunction("render");if(a&&this._widgetId===void 0){var i=document.createElement("div");this._widgetId=a(i,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(i)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(a){this.captcha=a},n.render=function(){var a=this.props;a.sitekey,a.onChange,a.theme,a.type,a.tabindex,a.onExpired,a.onErrored,a.size,a.stoken,a.grecaptcha,a.badge,a.hl,a.isolated;var i=LK(a,DK);return A.createElement("div",F_({},i,{ref:this.handleRecaptchaRef}))},t})(A.Component);ng.displayName="ReCAPTCHA";ng.propTypes={sitekey:Pr.string.isRequired,onChange:Pr.func,grecaptcha:Pr.object,theme:Pr.oneOf(["dark","light"]),type:Pr.oneOf(["image","audio"]),tabindex:Pr.number,onExpired:Pr.func,onErrored:Pr.func,size:Pr.oneOf(["compact","normal","invisible"]),stoken:Pr.string,hl:Pr.string,badge:Pr.oneOf(["bottomright","bottomleft","inline"]),isolated:Pr.bool};ng.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var R0={exports:{}},Vt={};var GO;function $K(){if(GO)return Vt;GO=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,c=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,g=e?Symbol.for("react.suspense_list"):60120,y=e?Symbol.for("react.memo"):60115,w=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,S=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,E=e?Symbol.for("react.scope"):60119;function T(C){if(typeof C=="object"&&C!==null){var I=C.$$typeof;switch(I){case t:switch(C=C.type,C){case d:case f:case r:case i:case a:case p:return C;default:switch(C=C&&C.$$typeof,C){case u:case m:case w:case y:case c:return C;default:return I}}case n:return I}}}function O(C){return T(C)===f}return Vt.AsyncMode=d,Vt.ConcurrentMode=f,Vt.ContextConsumer=u,Vt.ContextProvider=c,Vt.Element=t,Vt.ForwardRef=m,Vt.Fragment=r,Vt.Lazy=w,Vt.Memo=y,Vt.Portal=n,Vt.Profiler=i,Vt.StrictMode=a,Vt.Suspense=p,Vt.isAsyncMode=function(C){return O(C)||T(C)===d},Vt.isConcurrentMode=O,Vt.isContextConsumer=function(C){return T(C)===u},Vt.isContextProvider=function(C){return T(C)===c},Vt.isElement=function(C){return typeof C=="object"&&C!==null&&C.$$typeof===t},Vt.isForwardRef=function(C){return T(C)===m},Vt.isFragment=function(C){return T(C)===r},Vt.isLazy=function(C){return T(C)===w},Vt.isMemo=function(C){return T(C)===y},Vt.isPortal=function(C){return T(C)===n},Vt.isProfiler=function(C){return T(C)===i},Vt.isStrictMode=function(C){return T(C)===a},Vt.isSuspense=function(C){return T(C)===p},Vt.isValidElementType=function(C){return typeof C=="string"||typeof C=="function"||C===r||C===f||C===i||C===a||C===p||C===g||typeof C=="object"&&C!==null&&(C.$$typeof===w||C.$$typeof===y||C.$$typeof===c||C.$$typeof===u||C.$$typeof===m||C.$$typeof===S||C.$$typeof===R||C.$$typeof===E||C.$$typeof===b)},Vt.typeOf=T,Vt}var ZO;function UK(){return ZO||(ZO=1,R0.exports=$K()),R0.exports}var x0,WO;function zK(){if(WO)return x0;WO=1;var e=UK(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};i[e.ForwardRef]=r,i[e.Memo]=a;function c(w){return e.isMemo(w)?a:i[w.$$typeof]||t}var u=Object.defineProperty,d=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,g=Object.prototype;function y(w,b,S){if(typeof b!="string"){if(g){var R=p(b);R&&R!==g&&y(w,R,S)}var E=d(b);f&&(E=E.concat(f(b)));for(var T=c(w),O=c(b),C=0;C<E.length;++C){var I=E[C];if(!n[I]&&!(S&&S[I])&&!(O&&O[I])&&!(T&&T[I])){var k=m(b,I);try{u(w,I,k)}catch{}}}}return w}return x0=y,x0}var VK=zK();const FK=Ga(VK);function q_(){return q_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q_.apply(this,arguments)}function BK(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function qK(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Do={},HK=0;function GK(e,t){return t=t||{},function(r){var a=r.displayName||r.name||"Component",i=(function(u){qK(d,u);function d(m,p){var g;return g=u.call(this,m,p)||this,g.state={},g.__scriptURL="",g}var f=d.prototype;return f.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+HK++),this.__scriptLoaderID},f.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},f.asyncScriptLoaderHandleLoad=function(p){var g=this;this.setState(p,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},f.asyncScriptLoaderTriggerOnScriptLoaded=function(){var p=Do[this.__scriptURL];if(!p||!p.loaded)throw new Error("Script is not loaded.");for(var g in p.observers)p.observers[g](p);delete window[t.callbackName]},f.componentDidMount=function(){var p=this,g=this.setupScriptURL(),y=this.asyncScriptLoaderGetScriptLoaderID(),w=t,b=w.globalName,S=w.callbackName,R=w.scriptId;if(b&&typeof window[b]<"u"&&(Do[g]={loaded:!0,observers:{}}),Do[g]){var E=Do[g];if(E&&(E.loaded||E.errored)){this.asyncScriptLoaderHandleLoad(E);return}E.observers[y]=function(k){return p.asyncScriptLoaderHandleLoad(k)};return}var T={};T[y]=function(k){return p.asyncScriptLoaderHandleLoad(k)},Do[g]={loaded:!1,observers:T};var O=document.createElement("script");O.src=g,O.async=!0;for(var C in t.attributes)O.setAttribute(C,t.attributes[C]);R&&(O.id=R);var I=function(P){if(Do[g]){var $=Do[g],W=$.observers;for(var V in W)P(W[V])&&delete W[V]}};S&&typeof window<"u"&&(window[S]=function(){return p.asyncScriptLoaderTriggerOnScriptLoaded()}),O.onload=function(){var k=Do[g];k&&(k.loaded=!0,I(function(P){return S?!1:(P(k),!0)}))},O.onerror=function(){var k=Do[g];k&&(k.errored=!0,I(function(P){return P(k),!0}))},document.body.appendChild(O)},f.componentWillUnmount=function(){var p=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),y=0;y<g.length;y+=1)g[y].src.indexOf(p)>-1&&g[y].parentNode&&g[y].parentNode.removeChild(g[y]);var w=Do[p];w&&(delete w.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete Do[p])},f.render=function(){var p=t.globalName,g=this.props;g.asyncScriptOnLoad;var y=g.forwardedRef,w=BK(g,["asyncScriptOnLoad","forwardedRef"]);return p&&typeof window<"u"&&(w[p]=typeof window[p]<"u"?window[p]:void 0),w.ref=y,A.createElement(r,w)},d})(A.Component),c=A.forwardRef(function(u,d){return A.createElement(i,q_({},u,{forwardedRef:d}))});return c.displayName="AsyncScriptLoader("+a+")",c.propTypes={asyncScriptOnLoad:Pr.func},FK(c,r)}}var H_="onloadcallback",ZK="grecaptcha";function G_(){return typeof window<"u"&&window.recaptchaOptions||{}}function WK(){var e=G_(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+H_+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+H_+"&render=explicit"}const KK=GK(WK,{callbackName:H_,globalName:ZK,attributes:G_().nonce?{nonce:G_().nonce}:{}})(ng);var YK=Object.defineProperty,QK=Object.defineProperties,XK=Object.getOwnPropertyDescriptors,dm=Object.getOwnPropertySymbols,N4=Object.prototype.hasOwnProperty,M4=Object.prototype.propertyIsEnumerable,KO=(e,t,n)=>t in e?YK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,JK=(e,t)=>{for(var n in t||(t={}))N4.call(t,n)&&KO(e,n,t[n]);if(dm)for(var n of dm(t))M4.call(t,n)&&KO(e,n,t[n]);return e},eY=(e,t)=>QK(e,XK(t)),tY=(e,t)=>{var n={};for(var r in e)N4.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&dm)for(var r of dm(e))t.indexOf(r)<0&&M4.call(e,r)&&(n[r]=e[r]);return n};function nY(e){let t=setTimeout(e,0),n=setTimeout(e,10),r=setTimeout(e,50);return[t,n,r]}function rY(e){let t=A.useRef();return A.useEffect(()=>{t.current=e}),t.current}var oY=18,P4=40,aY=`${P4}px`,sY=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function iY({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[a,i]=A.useState(!1),[c,u]=A.useState(!1),[d,f]=A.useState(!1),m=A.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&a&&c,[a,c,n]),p=A.useCallback(()=>{let g=e.current,y=t.current;if(!g||!y||d||n==="none")return;let w=g,b=w.getBoundingClientRect().left+w.offsetWidth,S=w.getBoundingClientRect().top+w.offsetHeight/2,R=b-oY,E=S;document.querySelectorAll(sY).length===0&&document.elementFromPoint(R,E)===g||(i(!0),f(!0))},[e,t,d,n]);return A.useEffect(()=>{let g=e.current;if(!g||n==="none")return;function y(){let b=window.innerWidth-g.getBoundingClientRect().right;u(b>=P4)}y();let w=setInterval(y,1e3);return()=>{clearInterval(w)}},[e,n]),A.useEffect(()=>{let g=r||document.activeElement===t.current;if(n==="none"||!g)return;let y=setTimeout(p,0),w=setTimeout(p,2e3),b=setTimeout(p,5e3),S=setTimeout(()=>{f(!0)},6e3);return()=>{clearTimeout(y),clearTimeout(w),clearTimeout(b),clearTimeout(S)}},[t,r,n,p]),{hasPWMBadge:a,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:aY}}var D4=A.createContext({}),L4=A.forwardRef((e,t)=>{var n=e,{value:r,onChange:a,maxLength:i,textAlign:c="left",pattern:u,placeholder:d,inputMode:f="numeric",onComplete:m,pushPasswordManagerStrategy:p="increase-width",pasteTransformer:g,containerClassName:y,noScriptCSSFallback:w=cY,render:b,children:S}=n,R=tY(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),E,T,O,C,I;let[k,P]=A.useState(typeof R.defaultValue=="string"?R.defaultValue:""),$=r??k,W=rY($),V=A.useCallback(ae=>{a?.(ae),P(ae)},[a]),G=A.useMemo(()=>u?typeof u=="string"?new RegExp(u):u:null,[u]),U=A.useRef(null),J=A.useRef(null),le=A.useRef({value:$,onChange:V,isIOS:typeof window<"u"&&((T=(E=window?.CSS)==null?void 0:E.supports)==null?void 0:T.call(E,"-webkit-touch-callout","none"))}),F=A.useRef({prev:[(O=U.current)==null?void 0:O.selectionStart,(C=U.current)==null?void 0:C.selectionEnd,(I=U.current)==null?void 0:I.selectionDirection]});A.useImperativeHandle(t,()=>U.current,[]),A.useEffect(()=>{let ae=U.current,ue=J.current;if(!ae||!ue)return;le.current.value!==ae.value&&le.current.onChange(ae.value),F.current.prev=[ae.selectionStart,ae.selectionEnd,ae.selectionDirection];function Oe(){if(document.activeElement!==ae){q(null),L(null);return}let Be=ae.selectionStart,Ke=ae.selectionEnd,Z=ae.selectionDirection,te=ae.maxLength,oe=ae.value,Se=F.current.prev,xe=-1,Re=-1,Ne;if(oe.length!==0&&Be!==null&&Ke!==null){let dr=Be===Ke,nn=Be===oe.length&&oe.length<te;if(dr&&!nn){let Rn=Be;if(Rn===0)xe=0,Re=1,Ne="forward";else if(Rn===te)xe=Rn-1,Re=Rn,Ne="backward";else if(te>1&&oe.length>1){let rn=0;if(Se[0]!==null&&Se[1]!==null){Ne=Rn<Se[1]?"backward":"forward";let $n=Se[0]===Se[1]&&Se[0]<te;Ne==="backward"&&!$n&&(rn=-1)}xe=rn+Rn,Re=rn+Rn+1}}xe!==-1&&Re!==-1&&xe!==Re&&U.current.setSelectionRange(xe,Re,Ne)}let et=xe!==-1?xe:Be,st=Re!==-1?Re:Ke,Pt=Ne??Z;q(et),L(st),F.current.prev=[et,st,Pt]}if(document.addEventListener("selectionchange",Oe,{capture:!0}),Oe(),document.activeElement===ae&&K(!0),!document.getElementById("input-otp-style")){let Be=document.createElement("style");if(Be.id="input-otp-style",document.head.appendChild(Be),Be.sheet){let Ke="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";ku(Be.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),ku(Be.sheet,`[data-input-otp]:autofill { ${Ke} }`),ku(Be.sheet,`[data-input-otp]:-webkit-autofill { ${Ke} }`),ku(Be.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),ku(Be.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Pe=()=>{ue&&ue.style.setProperty("--root-height",`${ae.clientHeight}px`)};Pe();let Je=new ResizeObserver(Pe);return Je.observe(ae),()=>{document.removeEventListener("selectionchange",Oe,{capture:!0}),Je.disconnect()}},[]);let[Y,se]=A.useState(!1),[fe,K]=A.useState(!1),[D,q]=A.useState(null),[B,L]=A.useState(null);A.useEffect(()=>{nY(()=>{var ae,ue,Oe,Pe;(ae=U.current)==null||ae.dispatchEvent(new Event("input"));let Je=(ue=U.current)==null?void 0:ue.selectionStart,Be=(Oe=U.current)==null?void 0:Oe.selectionEnd,Ke=(Pe=U.current)==null?void 0:Pe.selectionDirection;Je!==null&&Be!==null&&(q(Je),L(Be),F.current.prev=[Je,Be,Ke])})},[$,fe]),A.useEffect(()=>{W!==void 0&&$!==W&&W.length<i&&$.length===i&&m?.($)},[i,m,W,$]);let z=iY({containerRef:J,inputRef:U,pushPasswordManagerStrategy:p,isFocused:fe}),Q=A.useCallback(ae=>{let ue=ae.currentTarget.value.slice(0,i);if(ue.length>0&&G&&!G.test(ue)){ae.preventDefault();return}typeof W=="string"&&ue.length<W.length&&document.dispatchEvent(new Event("selectionchange")),V(ue)},[i,V,W,G]),me=A.useCallback(()=>{var ae;if(U.current){let ue=Math.min(U.current.value.length,i-1),Oe=U.current.value.length;(ae=U.current)==null||ae.setSelectionRange(ue,Oe),q(ue),L(Oe)}K(!0)},[i]),ve=A.useCallback(ae=>{var ue,Oe;let Pe=U.current;if(!g&&(!le.current.isIOS||!ae.clipboardData||!Pe))return;let Je=ae.clipboardData.getData("text/plain"),Be=g?g(Je):Je;ae.preventDefault();let Ke=(ue=U.current)==null?void 0:ue.selectionStart,Z=(Oe=U.current)==null?void 0:Oe.selectionEnd,te=(Ke!==Z?$.slice(0,Ke)+Be+$.slice(Z):$.slice(0,Ke)+Be+$.slice(Ke)).slice(0,i);if(te.length>0&&G&&!G.test(te))return;Pe.value=te,V(te);let oe=Math.min(te.length,i-1),Se=te.length;Pe.setSelectionRange(oe,Se),q(oe),L(Se)},[i,V,G,$]),Ce=A.useMemo(()=>({position:"relative",cursor:R.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[R.disabled]),Ie=A.useMemo(()=>({position:"absolute",inset:0,width:z.willPushPWMBadge?`calc(100% + ${z.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:z.willPushPWMBadge?`inset(0 ${z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:c,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[z.PWM_BADGE_SPACE_WIDTH,z.willPushPWMBadge,c]),H=A.useMemo(()=>A.createElement("input",eY(JK({autoComplete:R.autoComplete||"one-time-code"},R),{"data-input-otp":!0,"data-input-otp-placeholder-shown":$.length===0||void 0,"data-input-otp-mss":D,"data-input-otp-mse":B,inputMode:f,pattern:G?.source,"aria-placeholder":d,style:Ie,maxLength:i,value:$,ref:U,onPaste:ae=>{var ue;ve(ae),(ue=R.onPaste)==null||ue.call(R,ae)},onChange:Q,onMouseOver:ae=>{var ue;se(!0),(ue=R.onMouseOver)==null||ue.call(R,ae)},onMouseLeave:ae=>{var ue;se(!1),(ue=R.onMouseLeave)==null||ue.call(R,ae)},onFocus:ae=>{var ue;me(),(ue=R.onFocus)==null||ue.call(R,ae)},onBlur:ae=>{var ue;K(!1),(ue=R.onBlur)==null||ue.call(R,ae)}})),[Q,me,ve,f,Ie,i,B,D,R,G?.source,$]),re=A.useMemo(()=>({slots:Array.from({length:i}).map((ae,ue)=>{var Oe;let Pe=fe&&D!==null&&B!==null&&(D===B&&ue===D||ue>=D&&ue<B),Je=$[ue]!==void 0?$[ue]:null,Be=$[0]!==void 0?null:(Oe=d?.[ue])!=null?Oe:null;return{char:Je,placeholderChar:Be,isActive:Pe,hasFakeCaret:Pe&&Je===null}}),isFocused:fe,isHovering:!R.disabled&&Y}),[fe,Y,i,B,D,R.disabled,$]),_e=A.useMemo(()=>b?b(re):A.createElement(D4.Provider,{value:re},S),[S,re,b]);return A.createElement(A.Fragment,null,w!==null&&A.createElement("noscript",null,A.createElement("style",null,w)),A.createElement("div",{ref:J,"data-input-otp-container":!0,style:Ce,className:y},_e,A.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},H)))});L4.displayName="Input";function ku(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var cY=`
111
+ [data-input-otp] {
112
+ --nojs-bg: white !important;
113
+ --nojs-fg: black !important;
114
+
115
+ background-color: var(--nojs-bg) !important;
116
+ color: var(--nojs-fg) !important;
117
+ caret-color: var(--nojs-fg) !important;
118
+ letter-spacing: .25em !important;
119
+ text-align: center !important;
120
+ border: 1px solid var(--nojs-fg) !important;
121
+ border-radius: 4px !important;
122
+ width: 100% !important;
123
+ }
124
+ @media (prefers-color-scheme: dark) {
125
+ [data-input-otp] {
126
+ --nojs-bg: black !important;
127
+ --nojs-fg: white !important;
128
+ }
129
+ }`,Bc={},T0,YO;function j4(){return YO||(YO=1,T0={L:1,M:0,Q:3,H:2}),T0}var O0,QO;function $4(){return QO||(QO=1,O0={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}),O0}var C0,XO;function lY(){if(XO)return C0;XO=1;var e=$4();function t(n){this.mode=e.MODE_8BIT_BYTE,this.data=n}return t.prototype={getLength:function(n){return this.data.length},write:function(n){for(var r=0;r<this.data.length;r++)n.put(this.data.charCodeAt(r),8)}},C0=t,C0}var A0,JO;function uY(){if(JO)return A0;JO=1;var e=j4();function t(n,r){this.totalCount=n,this.dataCount=r}return t.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t.getRSBlocks=function(n,r){var a=t.getRsBlockTable(n,r);if(a==null)throw new Error("bad rs block @ typeNumber:"+n+"/errorCorrectLevel:"+r);for(var i=a.length/3,c=new Array,u=0;u<i;u++)for(var d=a[u*3+0],f=a[u*3+1],m=a[u*3+2],p=0;p<d;p++)c.push(new t(f,m));return c},t.getRsBlockTable=function(n,r){switch(r){case e.L:return t.RS_BLOCK_TABLE[(n-1)*4+0];case e.M:return t.RS_BLOCK_TABLE[(n-1)*4+1];case e.Q:return t.RS_BLOCK_TABLE[(n-1)*4+2];case e.H:return t.RS_BLOCK_TABLE[(n-1)*4+3];default:return}},A0=t,A0}var I0,e2;function dY(){if(e2)return I0;e2=1;function e(){this.buffer=new Array,this.length=0}return e.prototype={get:function(t){var n=Math.floor(t/8);return(this.buffer[n]>>>7-t%8&1)==1},put:function(t,n){for(var r=0;r<n;r++)this.putBit((t>>>n-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(t){var n=Math.floor(this.length/8);this.buffer.length<=n&&this.buffer.push(0),t&&(this.buffer[n]|=128>>>this.length%8),this.length++}},I0=e,I0}var k0,t2;function U4(){if(t2)return k0;t2=1;for(var e={glog:function(n){if(n<1)throw new Error("glog("+n+")");return e.LOG_TABLE[n]},gexp:function(n){for(;n<0;)n+=255;for(;n>=256;)n-=255;return e.EXP_TABLE[n]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},t=0;t<8;t++)e.EXP_TABLE[t]=1<<t;for(var t=8;t<256;t++)e.EXP_TABLE[t]=e.EXP_TABLE[t-4]^e.EXP_TABLE[t-5]^e.EXP_TABLE[t-6]^e.EXP_TABLE[t-8];for(var t=0;t<255;t++)e.LOG_TABLE[e.EXP_TABLE[t]]=t;return k0=e,k0}var N0,n2;function z4(){if(n2)return N0;n2=1;var e=U4();function t(n,r){if(n.length==null)throw new Error(n.length+"/"+r);for(var a=0;a<n.length&&n[a]==0;)a++;this.num=new Array(n.length-a+r);for(var i=0;i<n.length-a;i++)this.num[i]=n[i+a]}return t.prototype={get:function(n){return this.num[n]},getLength:function(){return this.num.length},multiply:function(n){for(var r=new Array(this.getLength()+n.getLength()-1),a=0;a<this.getLength();a++)for(var i=0;i<n.getLength();i++)r[a+i]^=e.gexp(e.glog(this.get(a))+e.glog(n.get(i)));return new t(r,0)},mod:function(n){if(this.getLength()-n.getLength()<0)return this;for(var r=e.glog(this.get(0))-e.glog(n.get(0)),a=new Array(this.getLength()),i=0;i<this.getLength();i++)a[i]=this.get(i);for(var i=0;i<n.getLength();i++)a[i]^=e.gexp(e.glog(n.get(i))+r);return new t(a,0).mod(n)}},N0=t,N0}var M0,r2;function fY(){if(r2)return M0;r2=1;var e=$4(),t=z4(),n=U4(),r={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},a={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(i){for(var c=i<<10;a.getBCHDigit(c)-a.getBCHDigit(a.G15)>=0;)c^=a.G15<<a.getBCHDigit(c)-a.getBCHDigit(a.G15);return(i<<10|c)^a.G15_MASK},getBCHTypeNumber:function(i){for(var c=i<<12;a.getBCHDigit(c)-a.getBCHDigit(a.G18)>=0;)c^=a.G18<<a.getBCHDigit(c)-a.getBCHDigit(a.G18);return i<<12|c},getBCHDigit:function(i){for(var c=0;i!=0;)c++,i>>>=1;return c},getPatternPosition:function(i){return a.PATTERN_POSITION_TABLE[i-1]},getMask:function(i,c,u){switch(i){case r.PATTERN000:return(c+u)%2==0;case r.PATTERN001:return c%2==0;case r.PATTERN010:return u%3==0;case r.PATTERN011:return(c+u)%3==0;case r.PATTERN100:return(Math.floor(c/2)+Math.floor(u/3))%2==0;case r.PATTERN101:return c*u%2+c*u%3==0;case r.PATTERN110:return(c*u%2+c*u%3)%2==0;case r.PATTERN111:return(c*u%3+(c+u)%2)%2==0;default:throw new Error("bad maskPattern:"+i)}},getErrorCorrectPolynomial:function(i){for(var c=new t([1],0),u=0;u<i;u++)c=c.multiply(new t([1,n.gexp(u)],0));return c},getLengthInBits:function(i,c){if(1<=c&&c<10)switch(i){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+i)}else if(c<27)switch(i){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+i)}else if(c<41)switch(i){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+i)}else throw new Error("type:"+c)},getLostPoint:function(i){for(var c=i.getModuleCount(),u=0,d=0;d<c;d++)for(var f=0;f<c;f++){for(var m=0,p=i.isDark(d,f),g=-1;g<=1;g++)if(!(d+g<0||c<=d+g))for(var y=-1;y<=1;y++)f+y<0||c<=f+y||g==0&&y==0||p==i.isDark(d+g,f+y)&&m++;m>5&&(u+=3+m-5)}for(var d=0;d<c-1;d++)for(var f=0;f<c-1;f++){var w=0;i.isDark(d,f)&&w++,i.isDark(d+1,f)&&w++,i.isDark(d,f+1)&&w++,i.isDark(d+1,f+1)&&w++,(w==0||w==4)&&(u+=3)}for(var d=0;d<c;d++)for(var f=0;f<c-6;f++)i.isDark(d,f)&&!i.isDark(d,f+1)&&i.isDark(d,f+2)&&i.isDark(d,f+3)&&i.isDark(d,f+4)&&!i.isDark(d,f+5)&&i.isDark(d,f+6)&&(u+=40);for(var f=0;f<c;f++)for(var d=0;d<c-6;d++)i.isDark(d,f)&&!i.isDark(d+1,f)&&i.isDark(d+2,f)&&i.isDark(d+3,f)&&i.isDark(d+4,f)&&!i.isDark(d+5,f)&&i.isDark(d+6,f)&&(u+=40);for(var b=0,f=0;f<c;f++)for(var d=0;d<c;d++)i.isDark(d,f)&&b++;var S=Math.abs(100*b/c/c-50)/5;return u+=S*10,u}};return M0=a,M0}var P0,o2;function hY(){if(o2)return P0;o2=1;var e=lY(),t=uY(),n=dY(),r=fY(),a=z4();function i(u,d){this.typeNumber=u,this.errorCorrectLevel=d,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var c=i.prototype;return c.addData=function(u){var d=new e(u);this.dataList.push(d),this.dataCache=null},c.isDark=function(u,d){if(u<0||this.moduleCount<=u||d<0||this.moduleCount<=d)throw new Error(u+","+d);return this.modules[u][d]},c.getModuleCount=function(){return this.moduleCount},c.make=function(){if(this.typeNumber<1){var u=1;for(u=1;u<40;u++){for(var d=t.getRSBlocks(u,this.errorCorrectLevel),f=new n,m=0,p=0;p<d.length;p++)m+=d[p].dataCount;for(var p=0;p<this.dataList.length;p++){var g=this.dataList[p];f.put(g.mode,4),f.put(g.getLength(),r.getLengthInBits(g.mode,u)),g.write(f)}if(f.getLengthInBits()<=m*8)break}this.typeNumber=u}this.makeImpl(!1,this.getBestMaskPattern())},c.makeImpl=function(u,d){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var f=0;f<this.moduleCount;f++){this.modules[f]=new Array(this.moduleCount);for(var m=0;m<this.moduleCount;m++)this.modules[f][m]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(u,d),this.typeNumber>=7&&this.setupTypeNumber(u),this.dataCache==null&&(this.dataCache=i.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,d)},c.setupPositionProbePattern=function(u,d){for(var f=-1;f<=7;f++)if(!(u+f<=-1||this.moduleCount<=u+f))for(var m=-1;m<=7;m++)d+m<=-1||this.moduleCount<=d+m||(0<=f&&f<=6&&(m==0||m==6)||0<=m&&m<=6&&(f==0||f==6)||2<=f&&f<=4&&2<=m&&m<=4?this.modules[u+f][d+m]=!0:this.modules[u+f][d+m]=!1)},c.getBestMaskPattern=function(){for(var u=0,d=0,f=0;f<8;f++){this.makeImpl(!0,f);var m=r.getLostPoint(this);(f==0||u>m)&&(u=m,d=f)}return d},c.createMovieClip=function(u,d,f){var m=u.createEmptyMovieClip(d,f),p=1;this.make();for(var g=0;g<this.modules.length;g++)for(var y=g*p,w=0;w<this.modules[g].length;w++){var b=w*p,S=this.modules[g][w];S&&(m.beginFill(0,100),m.moveTo(b,y),m.lineTo(b+p,y),m.lineTo(b+p,y+p),m.lineTo(b,y+p),m.endFill())}return m},c.setupTimingPattern=function(){for(var u=8;u<this.moduleCount-8;u++)this.modules[u][6]==null&&(this.modules[u][6]=u%2==0);for(var d=8;d<this.moduleCount-8;d++)this.modules[6][d]==null&&(this.modules[6][d]=d%2==0)},c.setupPositionAdjustPattern=function(){for(var u=r.getPatternPosition(this.typeNumber),d=0;d<u.length;d++)for(var f=0;f<u.length;f++){var m=u[d],p=u[f];if(this.modules[m][p]==null)for(var g=-2;g<=2;g++)for(var y=-2;y<=2;y++)g==-2||g==2||y==-2||y==2||g==0&&y==0?this.modules[m+g][p+y]=!0:this.modules[m+g][p+y]=!1}},c.setupTypeNumber=function(u){for(var d=r.getBCHTypeNumber(this.typeNumber),f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[Math.floor(f/3)][f%3+this.moduleCount-8-3]=m}for(var f=0;f<18;f++){var m=!u&&(d>>f&1)==1;this.modules[f%3+this.moduleCount-8-3][Math.floor(f/3)]=m}},c.setupTypeInfo=function(u,d){for(var f=this.errorCorrectLevel<<3|d,m=r.getBCHTypeInfo(f),p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<6?this.modules[p][8]=g:p<8?this.modules[p+1][8]=g:this.modules[this.moduleCount-15+p][8]=g}for(var p=0;p<15;p++){var g=!u&&(m>>p&1)==1;p<8?this.modules[8][this.moduleCount-p-1]=g:p<9?this.modules[8][15-p-1+1]=g:this.modules[8][15-p-1]=g}this.modules[this.moduleCount-8][8]=!u},c.mapData=function(u,d){for(var f=-1,m=this.moduleCount-1,p=7,g=0,y=this.moduleCount-1;y>0;y-=2)for(y==6&&y--;;){for(var w=0;w<2;w++)if(this.modules[m][y-w]==null){var b=!1;g<u.length&&(b=(u[g]>>>p&1)==1);var S=r.getMask(d,m,y-w);S&&(b=!b),this.modules[m][y-w]=b,p--,p==-1&&(g++,p=7)}if(m+=f,m<0||this.moduleCount<=m){m-=f,f=-f;break}}},i.PAD0=236,i.PAD1=17,i.createData=function(u,d,f){for(var m=t.getRSBlocks(u,d),p=new n,g=0;g<f.length;g++){var y=f[g];p.put(y.mode,4),p.put(y.getLength(),r.getLengthInBits(y.mode,u)),y.write(p)}for(var w=0,g=0;g<m.length;g++)w+=m[g].dataCount;if(p.getLengthInBits()>w*8)throw new Error("code length overflow. ("+p.getLengthInBits()+">"+w*8+")");for(p.getLengthInBits()+4<=w*8&&p.put(0,4);p.getLengthInBits()%8!=0;)p.putBit(!1);for(;!(p.getLengthInBits()>=w*8||(p.put(i.PAD0,8),p.getLengthInBits()>=w*8));)p.put(i.PAD1,8);return i.createBytes(p,m)},i.createBytes=function(u,d){for(var f=0,m=0,p=0,g=new Array(d.length),y=new Array(d.length),w=0;w<d.length;w++){var b=d[w].dataCount,S=d[w].totalCount-b;m=Math.max(m,b),p=Math.max(p,S),g[w]=new Array(b);for(var R=0;R<g[w].length;R++)g[w][R]=255&u.buffer[R+f];f+=b;var E=r.getErrorCorrectPolynomial(S),T=new a(g[w],E.getLength()-1),O=T.mod(E);y[w]=new Array(E.getLength()-1);for(var R=0;R<y[w].length;R++){var C=R+O.getLength()-y[w].length;y[w][R]=C>=0?O.get(C):0}}for(var I=0,R=0;R<d.length;R++)I+=d[R].totalCount;for(var k=new Array(I),P=0,R=0;R<m;R++)for(var w=0;w<d.length;w++)R<g[w].length&&(k[P++]=g[w][R]);for(var R=0;R<p;R++)for(var w=0;w<d.length;w++)R<y[w].length&&(k[P++]=y[w][R]);return k},P0=i,P0}var kh={},a2;function pY(){if(a2)return kh;a2=1,Object.defineProperty(kh,"__esModule",{value:!0});var e=Object.assign||function(f){for(var m=1;m<arguments.length;m++){var p=arguments[m];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(f[g]=p[g])}return f},t=k1(),n=i(t),r=Ks(),a=i(r);function i(f){return f&&f.__esModule?f:{default:f}}function c(f,m){var p={};for(var g in f)m.indexOf(g)>=0||Object.prototype.hasOwnProperty.call(f,g)&&(p[g]=f[g]);return p}var u={bgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,bgD:n.default.string.isRequired,fgColor:n.default.oneOfType([n.default.object,n.default.string]).isRequired,fgD:n.default.string.isRequired,size:n.default.number.isRequired,title:n.default.string,viewBoxSize:n.default.number.isRequired,xmlns:n.default.string},d=(0,r.forwardRef)(function(f,m){var p=f.bgColor,g=f.bgD,y=f.fgD,w=f.fgColor,b=f.size,S=f.title,R=f.viewBoxSize,E=f.xmlns,T=E===void 0?"http://www.w3.org/2000/svg":E,O=c(f,["bgColor","bgD","fgD","fgColor","size","title","viewBoxSize","xmlns"]);return a.default.createElement("svg",e({},O,{height:b,ref:m,viewBox:"0 0 "+R+" "+R,width:b,xmlns:T}),S?a.default.createElement("title",null,S):null,a.default.createElement("path",{d:g,fill:p}),a.default.createElement("path",{d:y,fill:w}))});return d.displayName="QRCodeSvg",d.propTypes=u,kh.default=d,kh}var s2;function mY(){if(s2)return Bc;s2=1,Object.defineProperty(Bc,"__esModule",{value:!0}),Bc.QRCode=void 0;var e=Object.assign||function(b){for(var S=1;S<arguments.length;S++){var R=arguments[S];for(var E in R)Object.prototype.hasOwnProperty.call(R,E)&&(b[E]=R[E])}return b},t=k1(),n=p(t),r=j4(),a=p(r),i=hY(),c=p(i),u=Ks(),d=p(u),f=pY(),m=p(f);function p(b){return b&&b.__esModule?b:{default:b}}function g(b,S){var R={};for(var E in b)S.indexOf(E)>=0||Object.prototype.hasOwnProperty.call(b,E)&&(R[E]=b[E]);return R}var y={bgColor:n.default.oneOfType([n.default.object,n.default.string]),fgColor:n.default.oneOfType([n.default.object,n.default.string]),level:n.default.string,size:n.default.number,value:n.default.string.isRequired},w=(0,u.forwardRef)(function(b,S){var R=b.bgColor,E=R===void 0?"#FFFFFF":R,T=b.fgColor,O=T===void 0?"#000000":T,C=b.level,I=C===void 0?"L":C,k=b.size,P=k===void 0?256:k,$=b.value,W=g(b,["bgColor","fgColor","level","size","value"]),V=new c.default(-1,a.default[I]);V.addData($),V.make();var G=V.modules;return d.default.createElement(m.default,e({},W,{bgColor:E,bgD:G.map(function(U,J){return U.map(function(le,F){return le?"":"M "+F+" "+J+" l 1 0 0 1 -1 0 Z"}).join(" ")}).join(" "),fgColor:O,fgD:G.map(function(U,J){return U.map(function(le,F){return le?"M "+F+" "+J+" l 1 0 0 1 -1 0 Z":""}).join(" ")}).join(" "),ref:S,size:P,viewBoxSize:G.length}))});return Bc.QRCode=w,w.displayName="QRCode",w.propTypes=y,Bc.default=w,Bc}var gY=mY();const vY=Ga(gY);var yY="Separator",i2="horizontal",_Y=["horizontal","vertical"],V4=A.forwardRef((e,t)=>{const{decorative:n,orientation:r=i2,...a}=e,i=bY(r)?r:i2,u=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return x.jsx(Md.div,{"data-orientation":i,...u,...a,ref:t})});V4.displayName=yY;function bY(e){return _Y.includes(e)}var wY=V4;function SY(e){const{authView:t="SIGN_IN",enabled:n=!0}={},{hooks:{useSession:r},basePath:a,viewPaths:i,replace:c}=A.useContext(gt),{data:u,isPending:d,error:f,refetch:m}=r(),p=u;return A.useEffect(()=>{if(!n||d||p)return;const y=new URLSearchParams(window.location.search).get("redirectTo")||window.location.pathname+window.location.search;c(`${a}/${i[t]}?redirectTo=${encodeURIComponent(y)}`)},[d,p,a,i,c,t,n]),{data:p,user:p?.user,isPending:d,error:f,refetch:m}}function pd({className:e,...t}){return x.jsx("div",{"data-slot":"card",className:Ae("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function N1({className:e,...t}){return x.jsx("div",{"data-slot":"card-header",className:Ae("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function F4({className:e,...t}){return x.jsx("div",{"data-slot":"card-title",className:Ae("leading-none font-semibold",e),...t})}function B4({className:e,...t}){return x.jsx("div",{"data-slot":"card-description",className:Ae("text-muted-foreground text-sm",e),...t})}function M1({className:e,...t}){return x.jsx("div",{"data-slot":"card-content",className:Ae("px-6",e),...t})}function c2({className:e,...t}){return x.jsx("div",{"data-slot":"card-footer",className:Ae("flex items-center px-6 [.border-t]:pt-6",e),...t})}function Va({className:e,...t}){return x.jsx("div",{"data-slot":"skeleton",className:Ae("bg-accent animate-pulse rounded-md",e),...t})}var EY=Yk("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function en({className:e,variant:t,size:n,asChild:r=!1,...a}){const i=r?t1:"button";return x.jsx(i,{"data-slot":"button",className:Ae(EY({variant:t,size:n,className:e})),...a})}async function RY(e,t,n,r){const a=await xY(e),i=document.createElement("canvas");i.width=i.height=n;const c=i.getContext("2d"),u=Math.min(a.width,a.height),d=(a.width-u)/2,f=(a.height-u)/2,m=u,p=u;c?.drawImage(a,d,f,m,p,0,0,n,n);const g=await new Promise(y=>i.toBlob(y,`image/${r}`));return new File([g],`${t}.${r}`,{type:`image/${r}`})}async function xY(e){return new Promise((t,n)=>{const r=new Image,a=new FileReader;a.onload=i=>{var c;r.src=(c=i.target)==null?void 0:c.result},r.onload=()=>t(r),r.onerror=i=>n(i),a.readAsDataURL(e)})}async function TY(e){return new Promise((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=n,r.readAsDataURL(e)})}function OY({...e}){return x.jsx(_Z,{"data-slot":"dropdown-menu",...e})}function CY({...e}){return x.jsx(bZ,{"data-slot":"dropdown-menu-trigger",...e})}function AY({className:e,sideOffset:t=4,...n}){return x.jsx(wZ,{children:x.jsx(SZ,{"data-slot":"dropdown-menu-content",sideOffset:t,className:Ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...n})})}function l2({className:e,inset:t,variant:n="default",...r}){return x.jsx(EZ,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:Ae("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r})}function q4({className:e,...t}){return x.jsx(TZ,{"data-slot":"label",className:Ae("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}var pa=DF,H4=A.createContext({}),bn=({...e})=>x.jsx(H4.Provider,{value:{name:e.name},children:x.jsx(MF,{...e})}),P1=()=>{const e=A.useContext(H4),t=A.useContext(G4),{getFieldState:n}=PF(),r=Vk({name:e.name}),a=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...a}},G4=A.createContext({});function wn({className:e,...t}){const n=A.useId();return x.jsx(G4.Provider,{value:{id:n},children:x.jsx("div",{"data-slot":"form-item",className:Ae("grid gap-2",e),...t})})}function Sn({className:e,...t}){const{error:n,formItemId:r}=P1();return x.jsx(q4,{"data-slot":"form-label","data-error":!!n,className:Ae("data-[error=true]:text-destructive",e),htmlFor:r,...t})}function Dn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:a}=P1();return x.jsx(t1,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${a}`:`${r}`,"aria-invalid":!!t,...e})}function Bn({className:e,...t}){const{error:n,formMessageId:r}=P1(),a=n?String(n?.message??""):t.children;return a?x.jsx("p",{"data-slot":"form-message",id:r,className:Ae("text-destructive text-sm",e),...t,children:a}):null}function Bo({className:e,type:t,...n}){return x.jsx("input",{type:t,"data-slot":"input",className:Ae("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...n})}function Z4({className:e,...t}){return x.jsx(DZ,{"data-slot":"avatar",className:Ae("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function W4({className:e,...t}){return x.jsx(LZ,{"data-slot":"avatar-image",className:Ae("aspect-square size-full",e),...t})}function K4({className:e,...t}){return x.jsx(jZ,{"data-slot":"avatar-fallback",className:Ae("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}function IY({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i,...c}){const{localization:u,avatar:d}=A.useContext(gt),f=A.useMemo(()=>({...u,...i}),[u,i]),m=a?.name,p=a?.logo;return n?x.jsx(Va,{className:Ae("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):x.jsxs(Z4,{className:Ae("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[d?.Image?x.jsx(d.Image,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||""}):x.jsx(W4,{alt:m||f?.ORGANIZATION,className:t?.image,src:p||void 0}),x.jsx(K4,{className:Ae("text-foreground",t?.fallback),delayMs:p?600:void 0,children:x.jsx(_F,{className:Ae("size-[50%]",t?.fallbackIcon)})})]})}function Y4({className:e,classNames:t,isPending:n,size:r,organization:a,localization:i}){const{localization:c}=A.useContext(gt),u={...c,...i};return x.jsxs("div",{className:Ae("flex items-center gap-2 truncate",e,t?.base),children:[x.jsx(IY,{className:Ae(r!=="sm"&&"my-0.5"),classNames:t?.avatar,isPending:n,localization:u,organization:a,size:r}),x.jsx("div",{className:Ae("flex flex-col truncate text-left leading-tight",t?.content),children:n?x.jsxs(x.Fragment,{children:[x.jsx(Va,{className:Ae("max-w-full",r==="lg"?"h-4.5 w-32":"h-3.5 w-24",t?.title,t?.skeleton)}),r!=="sm"&&x.jsx(Va,{className:Ae("mt-1.5 max-w-full",r==="lg"?"h-3.5 w-24":"h-3 w-16",t?.subtitle,t?.skeleton)})]}):x.jsxs(x.Fragment,{children:[x.jsx("span",{className:Ae("truncate font-semibold",r==="lg"?"text-base":"text-sm",t?.title),children:a?.name||u?.ORGANIZATION}),r!=="sm"&&a?.slug&&x.jsx("span",{className:Ae("truncate opacity-70",r==="lg"?"text-sm":"text-xs",t?.subtitle),children:a.slug})]})})]})}function kY(e,t){if(!e)return null;try{const n=e.trim().toLowerCase(),a=new TextEncoder().encode(n),i=FZ(QZ(a)),c=t?.jpg?".jpg":"";let u=`https://gravatar.com/avatar/${i}${c}`;const d=new URLSearchParams;t?.size&&d.append("s",Math.min(Math.max(t.size,1),2048).toString()),t?.d&&d.append("d",t.d),t?.forceDefault&&d.append("f","y");const f=d.toString();return f&&(u+=`?${f}`),u}catch(n){return console.error("Error generating Gravatar URL:",n),null}}function NY({className:e,classNames:t,isPending:n,size:r,user:a,localization:i,...c}){const{localization:u,gravatar:d,avatar:f}=A.useContext(gt),m={...u,...i},p=a?.displayName||a?.name||a?.fullName||a?.firstName||a?.displayUsername||a?.username||a?.email,g=a?.image||a?.avatar||a?.avatarUrl,y=d&&a?.email?kY(a.email,d===!0?void 0:d):null,w=d?y:g;return n?x.jsx(Va,{className:Ae("shrink-0 rounded-full",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base,t?.skeleton)}):x.jsxs(Z4,{className:Ae("bg-muted",r==="sm"?"size-6":r==="lg"?"size-10":r==="xl"?"size-12":"size-8",e,t?.base),...c,children:[f?.Image?x.jsx(f.Image,{alt:p||m?.USER,className:t?.image,src:w||""}):x.jsx(W4,{alt:p||m?.USER,className:t?.image,src:w||void 0}),x.jsx(K4,{className:Ae("text-foreground uppercase",t?.fallback),delayMs:w?600:void 0,children:MY(p)||x.jsx(OF,{className:Ae("size-[50%]",t?.fallbackIcon)})})]})}var MY=e=>e?.slice(0,2);function D1({className:e,...t}){return x.jsx(n4,{"data-slot":"checkbox",className:Ae("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:x.jsx(o4,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:x.jsx(Pk,{className:"size-3.5"})})})}function PY({className:e,...t}){return x.jsx("textarea",{"data-slot":"textarea",className:Ae("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}var DY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M9.438 31.401a7 7 0 0 1-1.656-1.536a20 20 0 0 1-1.422-1.938a18.9 18.9 0 0 1-2.375-4.849c-.667-2-.99-3.917-.99-5.792c0-2.094.453-3.922 1.339-5.458a7.7 7.7 0 0 1 2.797-2.906a7.45 7.45 0 0 1 3.786-1.12q.705.002 1.51.198c.385.109.854.281 1.427.495c.729.281 1.13.453 1.266.495c.427.156.786.224 1.068.224c.214 0 .516-.068.859-.172c.193-.068.557-.188 1.078-.411c.516-.188.922-.349 1.245-.469c.495-.146.974-.281 1.401-.349a6.7 6.7 0 0 1 1.531-.063a9 9 0 0 1 2.589.557c1.359.547 2.458 1.401 3.276 2.615a6.4 6.4 0 0 0-.969.734a8.2 8.2 0 0 0-1.641 2.005a6.8 6.8 0 0 0-.859 3.359c.021 1.443.391 2.714 1.12 3.813a7.2 7.2 0 0 0 2.047 2.047c.417.281.776.474 1.12.604c-.161.5-.333.984-.536 1.464a19 19 0 0 1-1.667 3.083c-.578.839-1.031 1.464-1.375 1.88c-.536.635-1.052 1.12-1.573 1.458c-.573.38-1.25.583-1.938.583a4.4 4.4 0 0 1-1.38-.167c-.385-.13-.766-.271-1.141-.432a9 9 0 0 0-1.203-.453a6.3 6.3 0 0 0-3.099-.005c-.417.12-.818.26-1.214.432c-.557.234-.927.391-1.141.458c-.427.125-.87.203-1.318.229c-.693 0-1.339-.198-1.979-.599zm9.14-24.615c-.906.453-1.771.646-2.63.583c-.135-.865 0-1.75.359-2.719a7.3 7.3 0 0 1 1.333-2.24A7.1 7.1 0 0 1 19.812.733q1.319-.68 2.521-.734c.104.906 0 1.797-.333 2.76a8 8 0 0 1-1.333 2.344a6.8 6.8 0 0 1-2.115 1.682z",fill:"currentColor"})}),LY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 199",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M216.856 16.597A208.5 208.5 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046q-29.538-4.442-58.533 0c-1.832-4.4-4.55-9.933-6.846-14.046a207.8 207.8 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161 161 0 0 0 79.735 175.3a136.4 136.4 0 0 1-21.846-10.632a109 109 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a132 132 0 0 0 5.355 4.237a136 136 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848c21.142-6.58 42.646-16.637 64.815-33.213c5.316-56.288-9.08-105.09-38.056-148.36M85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2s23.236 11.804 23.015 26.2c.02 14.375-10.148 26.18-23.015 26.18m85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2c0 14.375-10.148 26.18-23.015 26.18",fill:"#5865f2"})}),jY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 218",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M63.995 0L0 40.771l63.995 40.772L128 40.771zM192 0l-64 40.775l64 40.775l64.001-40.775zM0 122.321l63.995 40.772L128 122.321L63.995 81.55zM192 81.55l-64 40.775l64 40.774l64-40.774zM64 176.771l64.005 40.772L192 176.771L128.005 136z",fill:"#0061ff"})}),$Y=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M256 128C256 57.308 198.692 0 128 0S0 57.308 0 128c0 63.888 46.808 116.843 108 126.445V165H75.5v-37H108V99.8c0-32.08 19.11-49.8 48.348-49.8C170.352 50 185 52.5 185 52.5V84h-16.14C152.959 84 148 93.867 148 103.99V128h35.5l-5.675 37H148v89.445c61.192-9.602 108-62.556 108-126.445",fill:"#1877f2"}),x.jsx("path",{d:"m177.825 165l5.675-37H148v-24.01C148 93.866 152.959 84 168.86 84H185V52.5S170.352 50 156.347 50C127.11 50 108 67.72 108 99.8V128H75.5v37H108v89.445A129 129 0 0 0 128 256a129 129 0 0 0 20-1.555V165z",fill:"#fff"})]}),UY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-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-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12",fill:"currentColor"})}),zY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 236",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"m128.075 236.075l47.104-144.97H80.97z",fill:"#e24329"}),x.jsx("path",{d:"M128.075 236.074L80.97 91.104H14.956z",fill:"#fc6d26"}),x.jsx("path",{d:"M14.956 91.104L.642 135.16a9.75 9.75 0 0 0 3.542 10.903l123.891 90.012z",fill:"#fca326"}),x.jsx("path",{d:"M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0z",fill:"#e24329"}),x.jsx("path",{d:"m128.075 236.074l47.104-144.97h66.015z",fill:"#fc6d26"}),x.jsx("path",{d:"m241.194 91.104l14.314 44.056a9.75 9.75 0 0 1-3.543 10.903l-123.89 90.012z",fill:"#fca326"}),x.jsx("path",{d:"M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0z",fill:"#e24329"})]}),VY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 262",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622l38.755 30.023l2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",fill:"#4285f4"}),x.jsx("path",{d:"M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055c-34.523 0-63.824-22.773-74.269-54.25l-1.531.13l-40.298 31.187l-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",fill:"#34a853"}),x.jsx("path",{d:"M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82c0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602z",fill:"#fbbc05"}),x.jsx("path",{d:"M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0C79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",fill:"#eb4335"})]}),FY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M12.025 1.13c-5.77 0-10.449 4.647-10.449 10.378c0 1.112.178 2.181.503 3.185c.064-.222.203-.444.416-.577a.96.96 0 0 1 .524-.15c.293 0 .584.124.84.284c.278.173.48.408.71.694c.226.282.458.611.684.951v-.014c.017-.324.106-.622.264-.874s.403-.487.762-.543c.3-.047.596.06.787.203s.31.313.4.467c.15.257.212.468.233.542c.01.026.653 1.552 1.657 2.54c.616.605 1.01 1.223 1.082 1.912c.055.537-.096 1.059-.38 1.572c.637.121 1.294.187 1.967.187c.657 0 1.298-.063 1.921-.178c-.287-.517-.44-1.041-.384-1.581c.07-.69.465-1.307 1.081-1.913c1.004-.987 1.647-2.513 1.657-2.539c.021-.074.083-.285.233-.542c.09-.154.208-.323.4-.467a1.08 1.08 0 0 1 .787-.203c.359.056.604.29.762.543s.247.55.265.874v.015c.225-.34.457-.67.683-.952c.23-.286.432-.52.71-.694c.257-.16.547-.284.84-.285a.97.97 0 0 1 .524.151c.228.143.373.388.43.625l.006.04a10.3 10.3 0 0 0 .534-3.273c0-5.731-4.678-10.378-10.449-10.378M8.327 6.583a1.5 1.5 0 0 1 .713.174a1.487 1.487 0 0 1 .617 2.013c-.183.343-.762-.214-1.102-.094c-.38.134-.532.914-.917.71a1.487 1.487 0 0 1 .69-2.803m7.486 0a1.487 1.487 0 0 1 .689 2.803c-.385.204-.536-.576-.916-.71c-.34-.12-.92.437-1.103.094a1.487 1.487 0 0 1 .617-2.013a1.5 1.5 0 0 1 .713-.174m-10.68 1.55a.96.96 0 1 1 0 1.921a.96.96 0 0 1 0-1.92m13.838 0a.96.96 0 1 1 0 1.92a.96.96 0 0 1 0-1.92M8.489 11.458c.588.01 1.965 1.157 3.572 1.164c1.607-.007 2.984-1.155 3.572-1.164c.196-.003.305.12.305.454c0 .886-.424 2.328-1.563 3.202c-.22-.756-1.396-1.366-1.63-1.32q-.011.001-.02.006l-.044.026l-.01.008l-.03.024q-.018.017-.035.036l-.032.04a1 1 0 0 0-.058.09l-.014.025q-.049.088-.11.19a1 1 0 0 1-.083.116a1.2 1.2 0 0 1-.173.18q-.035.029-.075.058a1.3 1.3 0 0 1-.251-.243a1 1 0 0 1-.076-.107c-.124-.193-.177-.363-.337-.444c-.034-.016-.104-.008-.2.022q-.094.03-.216.087q-.06.028-.125.063l-.13.074q-.067.04-.136.086a3 3 0 0 0-.135.096a3 3 0 0 0-.26.219a2 2 0 0 0-.12.121a2 2 0 0 0-.106.128l-.002.002a2 2 0 0 0-.09.132l-.001.001a1.2 1.2 0 0 0-.105.212q-.013.036-.024.073c-1.139-.875-1.563-2.317-1.563-3.203c0-.334.109-.457.305-.454m.836 10.354c.824-1.19.766-2.082-.365-3.194c-1.13-1.112-1.789-2.738-1.789-2.738s-.246-.945-.806-.858s-.97 1.499.202 2.362c1.173.864-.233 1.45-.685.64c-.45-.812-1.683-2.896-2.322-3.295s-1.089-.175-.938.647s2.822 2.813 2.562 3.244s-1.176-.506-1.176-.506s-2.866-2.567-3.49-1.898s.473 1.23 2.037 2.16c1.564.932 1.686 1.178 1.464 1.53s-3.675-2.511-4-1.297c-.323 1.214 3.524 1.567 3.287 2.405c-.238.839-2.71-1.587-3.216-.642c-.506.946 3.49 2.056 3.522 2.064c1.29.33 4.568 1.028 5.713-.624m5.349 0c-.824-1.19-.766-2.082.365-3.194c1.13-1.112 1.789-2.738 1.789-2.738s.246-.945.806-.858s.97 1.499-.202 2.362c-1.173.864.233 1.45.685.64c.451-.812 1.683-2.896 2.322-3.295s1.089-.175.938.647s-2.822 2.813-2.562 3.244s1.176-.506 1.176-.506s2.866-2.567 3.49-1.898s-.473 1.23-2.037 2.16c-1.564.932-1.686 1.178-1.464 1.53s3.675-2.511 4-1.297c.323 1.214-3.524 1.567-3.287 2.405c.238.839 2.71-1.587 3.216-.642c.506.946-3.49 2.056-3.522 2.064c-1.29.33-4.568 1.028-5.713-.624"})}),BY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M1.333 0h8v5.333H12V2.667h2.667V0h8v8H20v2.667h-2.667v2.666H20V16h2.667v8h-8v-2.667H12v-2.666H9.333V24h-8Z"})}),qY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M2.886 4.18A11.98 11.98 0 0 1 11.99 0C18.624 0 24 5.376 24 12.009c0 3.64-1.62 6.903-4.18 9.105L2.887 4.18ZM1.817 5.626l16.556 16.556q-.787.496-1.65.866L.951 7.277q.371-.863.866-1.65ZM.322 9.163l14.515 14.515q-1.066.26-2.195.322L0 11.358a12 12 0 0 1 .322-2.195m-.17 4.862l9.823 9.824a12.02 12.02 0 0 1-9.824-9.824Z"})}),HY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 128 128",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M116 3H12a8.91 8.91 0 0 0-9 8.8v104.42a8.91 8.91 0 0 0 9 8.78h104a8.93 8.93 0 0 0 9-8.81V11.77A8.93 8.93 0 0 0 116 3",fill:"#0076b2"}),x.jsx("path",{d:"M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 1 1-10.5 10.49a10.5 10.5 0 0 1 10.5-10.49m20.41 29h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z",fill:"#fff"})]}),GY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M121.666 121.666H0V0h121.666z",fill:"#f1511b"}),x.jsx("path",{d:"M256 121.666H134.335V0H256z",fill:"#80cc28"}),x.jsx("path",{d:"M121.663 256.002H0V134.336h121.663z",fill:"#00adef"}),x.jsx("path",{d:"M256 256.002H134.335V134.336H256z",fill:"#fbbc09"})]}),ZY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M4.459 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.981-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.327-.747.933zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514c-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.822 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233l4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933zM1.936 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.249 2.986c.7.513.934.653.934 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632"})}),WY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("circle",{cx:"128",cy:"128",fill:"#ff4500",r:"128"}),x.jsx("path",{d:"M213.15 129.22c0-10.376-8.391-18.617-18.617-18.617a18.74 18.74 0 0 0-12.97 5.189c-12.818-9.157-30.368-15.107-49.9-15.87l8.544-39.981l27.773 5.95c.307 7.02 6.104 12.667 13.278 12.667c7.324 0 13.275-5.95 13.275-13.278c0-7.324-5.95-13.275-13.275-13.275c-5.188 0-9.768 3.052-11.904 7.478l-30.976-6.562c-.916-.154-1.832 0-2.443.458c-.763.458-1.22 1.22-1.371 2.136l-9.464 44.558c-19.837.612-37.692 6.562-50.662 15.872a18.74 18.74 0 0 0-12.971-5.188c-10.377 0-18.617 8.391-18.617 18.617c0 7.629 4.577 14.037 10.988 16.939a33.6 33.6 0 0 0-.458 5.646c0 28.686 33.42 52.036 74.621 52.036c41.202 0 74.622-23.196 74.622-52.036a35 35 0 0 0-.458-5.646c6.408-2.902 10.985-9.464 10.985-17.093M85.272 142.495c0-7.324 5.95-13.275 13.278-13.275c7.324 0 13.275 5.95 13.275 13.275s-5.95 13.278-13.275 13.278c-7.327.15-13.278-5.953-13.278-13.278m74.317 35.251c-9.156 9.157-26.553 9.768-31.588 9.768c-5.188 0-22.584-.765-31.59-9.768c-1.371-1.373-1.371-3.51 0-4.883c1.374-1.371 3.51-1.371 4.884 0c5.8 5.8 18.008 7.782 26.706 7.782s21.058-1.983 26.704-7.782c1.374-1.371 3.51-1.371 4.884 0c1.22 1.373 1.22 3.51 0 4.883m-2.443-21.822c-7.325 0-13.275-5.95-13.275-13.275s5.95-13.275 13.275-13.275c7.327 0 13.277 5.95 13.277 13.275c0 7.17-5.95 13.275-13.277 13.275",fill:"#fff"})]}),KY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M18.926 23.998L0 18.892L5.075.002L24 5.108ZM15.348 10.09l-5.282-1.453l-1.414 5.273l5.282 1.453z",fill:"currentColor"})}),YY=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:x.jsx("path",{fill:"currentColor",d:"M6 15a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2h2zm1 0a2 2 0 0 1 2-2a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2a2 2 0 0 1-2-2zm2-8a2 2 0 0 1-2-2a2 2 0 0 1 2-2a2 2 0 0 1 2 2v2zm0 1a2 2 0 0 1 2 2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2a2 2 0 0 1 2-2zm8 2a2 2 0 0 1 2-2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2zm-1 0a2 2 0 0 1-2 2a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2a2 2 0 0 1 2 2zm-2 8a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2v-2zm0-1a2 2 0 0 1-2-2a2 2 0 0 1 2-2h5a2 2 0 0 1 2 2a2 2 0 0 1-2 2z"})}),QY=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 256 256",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M128 0C57.308 0 0 57.309 0 128c0 70.696 57.309 128 128 128c70.697 0 128-57.304 128-128C256 57.314 198.697.007 127.998.007zm58.699 184.614c-2.293 3.76-7.215 4.952-10.975 2.644c-30.053-18.357-67.885-22.515-112.44-12.335a7.98 7.98 0 0 1-9.552-6.007a7.97 7.97 0 0 1 6-9.553c48.76-11.14 90.583-6.344 124.323 14.276c3.76 2.308 4.952 7.215 2.644 10.975m15.667-34.853c-2.89 4.695-9.034 6.178-13.726 3.289c-34.406-21.148-86.853-27.273-127.548-14.92c-5.278 1.594-10.852-1.38-12.454-6.649c-1.59-5.278 1.386-10.842 6.655-12.446c46.485-14.106 104.275-7.273 143.787 17.007c4.692 2.89 6.175 9.034 3.286 13.72zm1.345-36.293C162.457 88.964 94.394 86.71 55.007 98.666c-6.325 1.918-13.014-1.653-14.93-7.978c-1.917-6.328 1.65-13.012 7.98-14.935C93.27 62.027 168.434 64.68 215.929 92.876c5.702 3.376 7.566 10.724 4.188 16.405c-3.362 5.69-10.73 7.565-16.4 4.187z",fill:"#1ed760"})}),XY=({className:e})=>x.jsxs("svg",{className:e,viewBox:"0 0 256 290",xmlns:"http://www.w3.org/2000/svg",children:[x.jsx("path",{d:"M189.72 104.421c18.678 13.345 41.56 21.197 66.273 21.197v-47.53a67 67 0 0 1-13.918-1.456v37.413c-24.711 0-47.59-7.851-66.272-21.195v96.996c0 48.523-39.356 87.855-87.9 87.855c-18.113 0-34.949-5.473-48.934-14.86c15.962 16.313 38.222 26.432 62.848 26.432c48.548 0 87.905-39.332 87.905-87.857v-96.995zm17.17-47.952c-9.546-10.423-15.814-23.893-17.17-38.785v-6.113h-13.189c3.32 18.927 14.644 35.097 30.358 44.898M69.673 225.607a40 40 0 0 1-8.203-24.33c0-22.192 18.001-40.186 40.21-40.186a40.3 40.3 0 0 1 12.197 1.883v-48.593c-4.61-.631-9.262-.9-13.912-.801v37.822a40.3 40.3 0 0 0-12.203-1.882c-22.208 0-40.208 17.992-40.208 40.187c0 15.694 8.997 29.281 22.119 35.9",fill:"#ff004f"}),x.jsx("path",{d:"M175.803 92.849c18.683 13.344 41.56 21.195 66.272 21.195V76.631c-13.794-2.937-26.005-10.141-35.186-20.162c-15.715-9.802-27.038-25.972-30.358-44.898h-34.643v189.843c-.079 22.132-18.049 40.052-40.21 40.052c-13.058 0-24.66-6.221-32.007-15.86c-13.12-6.618-22.118-20.206-22.118-35.898c0-22.193 18-40.187 40.208-40.187c4.255 0 8.356.662 12.203 1.882v-37.822c-47.692.985-86.047 39.933-86.047 87.834c0 23.912 9.551 45.589 25.053 61.428c13.985 9.385 30.82 14.86 48.934 14.86c48.545 0 87.9-39.335 87.9-87.857z"}),x.jsx("path",{d:"M242.075 76.63V66.516a66.3 66.3 0 0 1-35.186-10.047a66.47 66.47 0 0 0 35.186 20.163M176.53 11.57a68 68 0 0 1-.728-5.457V0h-47.834v189.845c-.076 22.13-18.046 40.05-40.208 40.05a40.06 40.06 0 0 1-18.09-4.287c7.347 9.637 18.949 15.857 32.007 15.857c22.16 0 40.132-17.918 40.21-40.05V11.571zM99.966 113.58v-10.769a89 89 0 0 0-12.061-.818C39.355 101.993 0 141.327 0 189.845c0 30.419 15.467 57.227 38.971 72.996c-15.502-15.838-25.053-37.516-25.053-61.427c0-47.9 38.354-86.848 86.048-87.833",fill:"#00f2ea"})]}),JY=({className:e})=>x.jsxs("svg",{className:e,version:"1.1",viewBox:"0 0 2400 2800",x:"0px",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",y:"0px",children:[x.jsx("style",{type:"text/css",children:`
130
+ .st0{fill:#FFFFFF}
131
+ .st1{fill:#9146FF}
132
+ `}),x.jsx("title",{children:"Asset 2"}),x.jsxs("g",{children:[x.jsx("polygon",{className:"st0",points:"2200,1300 1800,1700 1400,1700 1050,2050 1050,1700 600,1700 600,200 2200,200"}),x.jsx("g",{children:x.jsxs("g",{children:[x.jsx("path",{className:"st1",d:"M500,0L0,500v1800h600v500l500-500h400l900-900V0H500z M2200,1300l-400,400h-400l-350,350v-350H600V200h1600V1300z"}),x.jsx("rect",{className:"st1",height:"600",width:"200",x:"1700",y:"550"}),x.jsx("rect",{className:"st1",height:"600",width:"200",x:"1150",y:"550"})]})})]})]}),eQ=({className:e})=>x.jsx("svg",{"data-testid":"geist-icon",height:"16","stroke-linejoin":"round",viewBox:"0 0 16 16",width:"16",className:e,style:{color:"currentcolor"},children:x.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1L16 15H0L8 1Z",fill:"currentColor"})}),tQ=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 576 512",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M545 117.7c3.7-12.5 0-21.7-17.8-21.7h-58.9c-15 0-21.9 7.9-25.6 16.7c0 0-30 73.1-72.4 120.5c-13.7 13.7-20 18.1-27.5 18.1c-3.7 0-9.4-4.4-9.4-16.9V117.7c0-15-4.2-21.7-16.6-21.7h-92.6c-9.4 0-15 7-15 13.5c0 14.2 21.2 17.5 23.4 57.5v86.8c0 19-3.4 22.5-10.9 22.5c-20 0-68.6-73.4-97.4-157.4c-5.8-16.3-11.5-22.9-26.6-22.9H38.8c-16.8 0-20.2 7.9-20.2 16.7c0 15.6 20 93.1 93.1 195.5C160.4 378.1 229 416 291.4 416c37.5 0 42.1-8.4 42.1-22.9c0-66.8-3.4-73.1 15.4-73.1c8.7 0 23.7 4.4 58.7 38.1c40 40 46.6 57.9 69 57.9h58.9c16.8 0 25.3-8.4 20.4-25c-11.2-34.9-86.9-106.7-90.3-111.5c-8.7-11.2-6.2-16.2 0-26.2c.1-.1 72-101.3 79.4-135.6",fill:"currentColor"})}),nQ=({className:e})=>x.jsx("svg",{className:e,viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("path",{d:"M389.2 48h70.6L305.6 224.2L487 464H345L233.7 318.6L106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9zm-24.8 373.8h39.1L151.1 88h-42z",fill:"currentColor"})}),rQ=({className:e})=>x.jsx("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:512,height:117,viewBox:"0 0 512 117",children:x.jsx("path",{fill:"#0b5cff",d:"M107.472 114.706H16.348c-5.968 0-11.791-3.203-14.557-8.589C-1.41 99.858-.247 92.434 4.702 87.63L68.17 24.164H22.607C10.088 24.164.044 13.974.044 1.6h83.992c5.968 0 11.79 3.203 14.556 8.589c3.203 6.259 2.038 13.683-2.911 18.486L32.214 92.143h52.55c12.518 0 22.708 10.19 22.708 22.563M468.183 0c-13.1 0-24.746 5.677-32.898 14.702C427.134 5.677 415.488 0 402.388 0c-24.164 0-43.961 20.67-43.961 44.834v69.872c12.518 0 22.562-10.19 22.562-22.563V44.689c0-11.646 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.315 22.272 21.397v48.037c0 12.519 10.19 22.563 22.563 22.563V44.543c0-11.645 9.025-21.544 20.67-21.98c12.228-.437 22.272 9.316 22.272 21.398v48.036c0 12.52 10.19 22.563 22.563 22.563V44.69C512.144 20.67 492.347 0 468.183 0M221.595 58.226c0 32.17-26.056 58.226-58.226 58.226s-58.226-26.056-58.226-58.226S131.199 0 163.369 0s58.226 26.056 58.226 58.226m-22.563 0c0-19.651-16.012-35.663-35.663-35.663s-35.664 16.012-35.664 35.663c0 19.652 16.013 35.664 35.664 35.664s35.663-16.012 35.663-35.664m148.04 0c0 32.17-26.056 58.226-58.226 58.226S230.62 90.396 230.62 58.226S256.676 0 288.846 0s58.227 26.056 58.227 58.226m-22.562 0c0-19.651-16.012-35.663-35.664-35.663c-19.65 0-35.663 16.012-35.663 35.663c0 19.652 16.012 35.664 35.663 35.664c19.652 0 35.664-16.012 35.664-35.664"})}),oQ=[{provider:"apple",name:"Apple",icon:DY},{provider:"discord",name:"Discord",icon:LY},{provider:"dropbox",name:"Dropbox",icon:jY},{provider:"facebook",name:"Facebook",icon:$Y},{provider:"github",name:"GitHub",icon:UY},{provider:"gitlab",name:"GitLab",icon:zY},{provider:"google",name:"Google",icon:VY},{provider:"huggingface",name:"Hugging Face",icon:FY},{provider:"kick",name:"Kick",icon:BY},{provider:"linear",name:"Linear",icon:qY},{provider:"linkedin",name:"LinkedIn",icon:HY},{provider:"microsoft",name:"Microsoft",icon:GY},{provider:"notion",name:"Notion",icon:ZY},{provider:"reddit",name:"Reddit",icon:WY},{provider:"roblox",name:"Roblox",icon:KY},{provider:"slack",name:"Slack",icon:YY},{provider:"spotify",name:"Spotify",icon:QY},{provider:"tiktok",name:"TikTok",icon:XY},{provider:"twitch",name:"Twitch",icon:JY},{provider:"vercel",name:"Vercel",icon:eQ},{provider:"vk",name:"VK",icon:tQ},{provider:"twitter",name:"X",icon:nQ},{provider:"zoom",name:"Zoom",icon:rQ}];function md({className:e,enableToggle:t,onChange:n,...r}){const[a,i]=A.useState(!0),[c,u]=A.useState(!1);return x.jsxs("div",{className:"relative",children:[x.jsx(Bo,{className:Ae(t&&"pr-10",e),...r,type:c&&t?"text":"password",onChange:d=>{i(!d.target.value),n?.(d)}}),t&&x.jsxs(x.Fragment,{children:[x.jsx(en,{className:"!bg-transparent absolute top-0 right-0",disabled:a,size:"icon",type:"button",variant:"ghost",onClick:()=>u(!c),children:c?x.jsx(SF,{}):x.jsx(wF,{})}),x.jsx("style",{children:`
133
+ .hide-password-toggle::-ms-reveal,
134
+ .hide-password-toggle::-ms-clear {
135
+ visibility: hidden;
136
+ pointer-events: none;
137
+ display: none;
138
+ }
139
+ `})]})]})}function ma({redirectTo:e}){const{redirectTo:t}=A.useContext(gt),n=A.useCallback(()=>e||Wi("redirectTo")||t,[e,t]),[r,a]=A.useState(!1),{navigate:i,hooks:{useSession:c},onSessionChange:u}=A.useContext(gt),{refetch:d}=c();return{onSuccess:A.useCallback(async()=>{a(!0),await d?.(),u&&await u(),a(!1),i(n())},[d,u,i,n]),isPending:r}}function Q4({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=A.useContext(gt),r=t?.(),a=A.useRef(!1),{onSuccess:i}=ma({redirectTo:e});return A.useEffect(()=>{if(!a.current){if(!n){a.current=!0,i();return}r||(a.current=!0,i())}},[r,n,i]),x.jsx(gr,{className:"animate-spin"})}var aQ=["/sign-up/email","/sign-in/email","/forget-password"],sQ=e=>{let t=e.startsWith("/")?e.substring(1):e;return t=t.replace(/-([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\/([a-z])/g,(n,r)=>r.toUpperCase()).replace(/\//g,"").replace(/[^A-Za-z0-9_]/g,""),t};function Dd({localization:e}){const{captcha:t,localization:n}=A.useContext(gt);e={...n,...e};const r=A.useRef(null),{executeRecaptcha:a}=Ik(),i=async d=>{if(!t)throw new Error(e.MISSING_RESPONSE);let f;switch(t.provider){case"google-recaptcha-v3":{const m=sQ(d);f=await a?.(m);break}case"google-recaptcha-v2-checkbox":{f=r.current.getValue();break}case"google-recaptcha-v2-invisible":{f=await r.current.executeAsync();break}case"cloudflare-turnstile":{f=r.current.getResponse();break}case"hcaptcha":{f=r.current.getResponse();break}case"captchafox":{f=r.current.getResponse();break}}if(!f)throw new Error(e.MISSING_RESPONSE);return f};return{captchaRef:r,getCaptchaHeaders:async d=>{if(!t)return;if((t.endpoints||aQ).includes(d))return{"x-captcha-response":await i(d)}},resetCaptcha:()=>{var d,f,m,p,g,y,w,b;if(t)switch(t.provider){case"google-recaptcha-v3":break;case"google-recaptcha-v2-checkbox":case"google-recaptcha-v2-invisible":{(f=(d=r.current)==null?void 0:d.reset)==null||f.call(d);break}case"cloudflare-turnstile":{(p=(m=r.current)==null?void 0:m.reset)==null||p.call(m);break}case"hcaptcha":{(y=(g=r.current)==null?void 0:g.resetCaptcha)==null||y.call(g);break}case"captchafox":{(b=(w=r.current)==null?void 0:w.reset)==null||b.call(w);break}}}}}function iQ({className:e,localization:t}){const n=Wa(),{captcha:r,localization:a}=A.useContext(gt),i={...a,...t};return r?r.hideBadge?x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`
140
+ .grecaptcha-badge { visibility: hidden; }
141
+ `}),x.jsxs("p",{className:Ae("text-muted-foreground text-xs",e),children:[i.PROTECTED_BY_RECAPTCHA," ",i.BY_CONTINUING_YOU_AGREE," Google"," ",x.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/privacy",target:"_blank",rel:"noreferrer",children:i.PRIVACY_POLICY})," ","&"," ",x.jsx("a",{className:"text-foreground hover:underline",href:"https://policies.google.com/terms",target:"_blank",rel:"noreferrer",children:i.TERMS_OF_SERVICE}),"."]})]}):n?x.jsx("style",{children:`
142
+ .grecaptcha-badge { visibility: visible !important; }
143
+ `}):null:null}function cQ({ref:e}){const{captcha:t}=A.useContext(gt),{theme:n}=qb(),{lang:r}=Nk();return A.useEffect(()=>{window.recaptchaOptions={useRecaptchaNet:t?.recaptchaNet,enterprise:t?.enterprise}},[t]),t?x.jsxs(x.Fragment,{children:[x.jsx("style",{children:`
144
+ .grecaptcha-badge {
145
+ border-radius: var(--radius) !important;
146
+ --tw-shadow: 0 1px 2px 0 var(--tw-shadow-color, #0000000d);
147
+ box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
148
+ border-style: var(--tw-border-style) !important;
149
+ border-width: 1px;
150
+ }
151
+
152
+ .dark .grecaptcha-badge {
153
+ border-color: var(--input) !important;
154
+ }
155
+ `}),x.jsx(KK,{ref:e,sitekey:t.siteKey,theme:n,hl:r,size:t.provider==="google-recaptcha-v2-invisible"?"invisible":"normal",className:Ae(t.provider==="google-recaptcha-v2-invisible"?"absolute":"mx-auto h-[76px] w-[302px] overflow-hidden rounded bg-muted")},`${n}-${r}-${t.provider}`)]}):null}var lQ=["/sign-up/email","/sign-in/email","/forget-password"];function Ld({ref:e,localization:t,action:n}){const{captcha:r}=A.useContext(gt);if(!r||n&&!(r.endpoints||lQ).includes(n))return null;const{theme:a}=qb(),i=r.provider==="google-recaptcha-v2-checkbox"||r.provider==="google-recaptcha-v2-invisible",c=r.provider==="google-recaptcha-v3"||r.provider==="google-recaptcha-v2-invisible",u=r.provider==="cloudflare-turnstile",d=r.provider==="hcaptcha",f=r.provider==="captchafox";return x.jsxs(x.Fragment,{children:[i&&x.jsx(cQ,{ref:e}),c&&x.jsx(iQ,{localization:t}),u&&x.jsx(k4,{className:"mx-auto",ref:e,siteKey:r.siteKey,options:{theme:a,size:"flexible"}}),d&&x.jsx("div",{className:"mx-auto",children:x.jsx(EK,{ref:e,sitekey:r.siteKey,theme:a})}),f&&x.jsx("div",{className:"mx-auto",children:x.jsx(w4,{ref:e,sitekey:r.siteKey,theme:a})})]})}function L1({className:e,containerClassName:t,...n}){return x.jsx(L4,{"data-slot":"input-otp",containerClassName:Ae("flex items-center gap-2 has-disabled:opacity-50",t),className:Ae("disabled:cursor-not-allowed",e),...n})}function qc({className:e,...t}){return x.jsx("div",{"data-slot":"input-otp-group",className:Ae("flex items-center",e),...t})}function Zn({index:e,className:t,...n}){const r=A.useContext(D4),{char:a,hasFakeCaret:i,isActive:c}=r?.slots[e]??{};return x.jsxs("div",{"data-slot":"input-otp-slot","data-active":c,className:Ae("data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive dark:bg-input/30 border-input relative flex h-9 w-9 items-center justify-center border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-[3px]",t),...n,children:[a,i&&x.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:x.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function D0({...e}){return x.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:x.jsx(RF,{})})}function j1({otpSeparators:e=0}){return e===0?x.jsxs(qc,{children:[x.jsx(Zn,{index:0}),x.jsx(Zn,{index:1}),x.jsx(Zn,{index:2}),x.jsx(Zn,{index:3}),x.jsx(Zn,{index:4}),x.jsx(Zn,{index:5})]}):e===1?x.jsxs(x.Fragment,{children:[x.jsxs(qc,{children:[x.jsx(Zn,{index:0}),x.jsx(Zn,{index:1}),x.jsx(Zn,{index:2})]}),x.jsx(D0,{}),x.jsxs(qc,{children:[x.jsx(Zn,{index:3}),x.jsx(Zn,{index:4}),x.jsx(Zn,{index:5})]})]}):x.jsxs(x.Fragment,{children:[x.jsxs(qc,{children:[x.jsx(Zn,{index:0}),x.jsx(Zn,{index:1})]}),x.jsx(D0,{}),x.jsxs(qc,{children:[x.jsx(Zn,{index:2}),x.jsx(Zn,{index:3})]}),x.jsx(D0,{}),x.jsxs(qc,{children:[x.jsx(Zn,{index:4}),x.jsx(Zn,{index:5})]})]})}function u2(e){const[t,n]=A.useState();return t?x.jsx(dQ,{...e,email:t}):x.jsx(uQ,{...e,setEmail:n})}function uQ({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a,setEmail:i}){const c=Wa(),{captchaRef:u,getCaptchaHeaders:d}=Dd({localization:r}),{authClient:f,localization:m,toast:p,localizeErrors:g}=A.useContext(gt);r={...m,...r};const y=ie({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),w=da({resolver:fa(y),defaultValues:{email:""}});n=n||w.formState.isSubmitting,A.useEffect(()=>{a?.(w.formState.isSubmitting)},[w.formState.isSubmitting,a]);async function b({email:S}){const R={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:S,type:"sign-in",fetchOptions:R}),p({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),i(S)}catch(E){p({variant:"error",message:En({error:E,localization:r,localizeErrors:g})})}}return x.jsx(pa,{...w,children:x.jsxs("form",{onSubmit:w.handleSubmit(b),noValidate:c,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:w.control,name:"email",render:({field:S})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.EMAIL}),x.jsx(Dn,{children:x.jsx(Bo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...S})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(Ld,{ref:u,localization:r,action:"/email-otp/send-verification-otp"}),x.jsx(en,{type:"submit",disabled:n,className:Ae("w-full",t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function dQ({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c,email:u}){const{authClient:d,localization:f,toast:m,localizeErrors:p}=A.useContext(gt);r={...f,...r};const{onSuccess:g,isPending:y}=ma({redirectTo:i}),w=ie({code:M().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),b=da({resolver:fa(w),defaultValues:{code:""}});n=n||b.formState.isSubmitting||y,A.useEffect(()=>{c?.(b.formState.isSubmitting||y)},[b.formState.isSubmitting,y,c]);async function S({code:R}){try{await d.signIn.emailOtp({email:u,otp:R,fetchOptions:{throw:!0}}),await g()}catch(E){m({variant:"error",message:En({error:E,localization:r,localizeErrors:p})}),b.reset()}}return x.jsx(pa,{...b,children:x.jsxs("form",{onSubmit:b.handleSubmit(S),className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:b.control,name:"code",render:({field:R})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.EMAIL_OTP}),x.jsx(Dn,{children:x.jsx(L1,{...R,maxLength:6,onChange:E=>{R.onChange(E),E.length===6&&b.handleSubmit(S)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(j1,{otpSeparators:a})})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx("div",{className:"grid gap-4",children:x.jsxs(en,{type:"submit",disabled:n,className:Ae(t?.button,t?.primaryButton),children:[n&&x.jsx(gr,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function fQ({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:a,callbackURL:i,isSubmitting:c,redirectTo:u,setIsSubmitting:d}){const[f,m]=A.useState(!0),[p,g]=A.useState(30),{authClient:y,localization:w,toast:b,localizeErrors:S,navigate:R,basePath:E,viewPaths:T}=A.useContext(gt);t={...w,...t};const O=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:C,isPending:I}=ma({redirectTo:u}),k=ie({code:M().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),P=da({resolver:fa(k),defaultValues:{code:""}}),$=c||P.formState.isSubmitting||I;A.useEffect(()=>{d?.(P.formState.isSubmitting||I)},[P.formState.isSubmitting,I,d]),A.useEffect(()=>{if(p>0){const G=setTimeout(()=>g(p-1),1e3);return()=>clearTimeout(G)}else m(!1)},[p]);async function W({code:G}){try{const U=await y.emailOtp.verifyEmail({email:O,otp:G,fetchOptions:{throw:!0}});"token"in U&&U.token?await C():(R(`${E}/${T.SIGN_IN}${window.location.search}`),b({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(U){b({variant:"error",message:En({error:U,localization:t,localizeErrors:S})}),P.reset()}}async function V(){if(!f){m(!0),g(30);try{await y.emailOtp.sendVerificationOtp({email:O,type:"email-verification",fetchOptions:{throw:!0}}),b({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(G){b({variant:"error",message:En({error:G,localization:t,localizeErrors:S})}),m(!1),g(0)}}}return O?x.jsx(pa,{...P,children:x.jsxs("form",{onSubmit:P.handleSubmit(W),className:Ae("grid w-full gap-6",n,r?.base),children:[x.jsx(bn,{control:P.control,name:"code",render:({field:G})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:r?.label,children:t.EMAIL_OTP}),x.jsx(Dn,{children:x.jsx(L1,{...G,maxLength:6,onChange:U=>{G.onChange(U),U.length===6&&P.handleSubmit(W)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:$,children:x.jsx(j1,{otpSeparators:a})})}),x.jsx(Bn,{className:r?.error})]})}),x.jsxs("div",{className:"grid gap-4",children:[x.jsxs(en,{type:"submit",disabled:$,className:Ae(r?.button,r?.primaryButton),children:[$&&x.jsx(gr,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),x.jsx(en,{type:"button",variant:"outline",onClick:V,disabled:f||$,className:Ae("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${p}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&x.jsx(en,{type:"button",variant:"ghost",onClick:e,disabled:$,className:"w-full",children:t.CANCEL})]})]})}):x.jsx("div",{className:Ae("grid w-full gap-6",n),children:x.jsxs("div",{className:"text-center",children:[x.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),x.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function hQ({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:a}){const i=Wa(),{captchaRef:c,getCaptchaHeaders:u,resetCaptcha:d}=Dd({localization:r}),{authClient:f,basePath:m,baseURL:p,localization:g,navigate:y,toast:w,viewPaths:b,localizeErrors:S}=A.useContext(gt);r={...g,...r};const R=ie({email:M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=da({resolver:fa(R),defaultValues:{email:""}});n=n||E.formState.isSubmitting,A.useEffect(()=>{a?.(E.formState.isSubmitting)},[E.formState.isSubmitting,a]);async function T({email:O}){try{const C={throw:!0,headers:await u("/forget-password")};await f.requestPasswordReset({email:O,redirectTo:`${p}${m}/${b.RESET_PASSWORD}`,fetchOptions:C}),w({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),y(`${m}/${b.SIGN_IN}${window.location.search}`)}catch(C){w({variant:"error",message:En({error:C,localization:r,localizeErrors:S})}),d()}}return x.jsx(pa,{...E,children:x.jsxs("form",{onSubmit:E.handleSubmit(T),noValidate:i,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:E.control,name:"email",render:({field:O})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.EMAIL}),x.jsx(Dn,{children:x.jsx(Bo,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...O})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(Ld,{ref:c,localization:r,action:"/forget-password"}),x.jsx(en,{type:"submit",disabled:n,className:Ae("w-full",t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function d2({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c}){const u=Wa(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Dd({localization:a}),{authClient:p,basePath:g,baseURL:y,persistClient:w,localization:b,redirectTo:S,viewPaths:R,toast:E,localizeErrors:T}=A.useContext(gt);a={...b,...a};const O=A.useCallback(()=>i||Wi("redirectTo")||S,[i,S]),C=A.useCallback(()=>`${y}${n||(w?`${g}/${R.CALLBACK}?redirectTo=${encodeURIComponent(O())}`:O())}`,[n,w,g,R,y,O]),I=ie({email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`})}),k=da({resolver:fa(I),defaultValues:{email:""}});r=r||k.formState.isSubmitting,A.useEffect(()=>{c?.(k.formState.isSubmitting)},[k.formState.isSubmitting,c]);async function P({email:$}){try{const W={throw:!0,headers:await f("/sign-in/magic-link")};await p.signIn.magicLink({email:$,callbackURL:C(),fetchOptions:W}),E({variant:"success",message:a.MAGIC_LINK_EMAIL}),k.reset()}catch(W){E({variant:"error",message:En({error:W,localization:a,localizeErrors:T})}),m()}}return x.jsx(pa,{...k,children:x.jsxs("form",{onSubmit:k.handleSubmit(P),noValidate:u,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:k.control,name:"email",render:({field:$})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.EMAIL}),x.jsx(Dn,{children:x.jsx(Bo,{className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...$})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(Ld,{ref:d,localization:a,action:"/sign-in/magic-link"}),x.jsx(en,{type:"submit",disabled:r,className:Ae("w-full",t?.button,t?.primaryButton),children:r?x.jsx(gr,{className:"animate-spin"}):a.MAGIC_LINK_ACTION})]})})}function pQ({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i}){const{authClient:c,localization:u,toast:d,localizeErrors:f}=A.useContext(gt);r={...u,...r};const{onSuccess:m,isPending:p}=ma({redirectTo:a}),g=ie({code:M().min(1,{message:r.BACKUP_CODE_REQUIRED})}),y=da({resolver:fa(g),defaultValues:{code:""}});n=n||y.formState.isSubmitting||p,A.useEffect(()=>{i?.(y.formState.isSubmitting||p)},[y.formState.isSubmitting,p,i]);async function w({code:b}){try{await c.twoFactor.verifyBackupCode({code:b,fetchOptions:{throw:!0}}),await m()}catch(S){d({variant:"error",message:En({error:S,localization:r,localizeErrors:f})}),y.reset()}}return x.jsx(pa,{...y,children:x.jsxs("form",{onSubmit:y.handleSubmit(w),className:Ae("grid gap-6",e,t?.base),children:[x.jsx(bn,{control:y.control,name:"code",render:({field:b})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:r.BACKUP_CODE}),x.jsx(Dn,{children:x.jsx(Bo,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...b})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(en,{type:"submit",disabled:n,className:Ae(t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function mQ({className:e,classNames:t,localization:n,passwordValidation:r}){const a=A.useRef(!1),{authClient:i,basePath:c,credentials:u,localization:d,viewPaths:f,navigate:m,toast:p,localizeErrors:g}=A.useContext(gt),y=u?.confirmPassword,w=u?.passwordValidation;n={...d,...n},r={...w,...r};const b=ie({newPassword:cd(r,{PASSWORD_REQUIRED:n.NEW_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}),confirmPassword:y?cd(r,{PASSWORD_REQUIRED:n.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:n.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:n.PASSWORD_TOO_LONG,INVALID_PASSWORD:n.INVALID_PASSWORD}):M().optional()}).refine(T=>!y||T.newPassword===T.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),S=da({resolver:fa(b),defaultValues:{newPassword:"",confirmPassword:""}}),R=S.formState.isSubmitting;A.useEffect(()=>{if(a.current)return;a.current=!0;const O=new URLSearchParams(window.location.search).get("token");(!O||O==="INVALID_TOKEN")&&(m(`${c}/${f.SIGN_IN}${window.location.search}`),p({variant:"error",message:n.INVALID_TOKEN}))},[c,m,p,f,n]);async function E({newPassword:T}){try{const C=new URLSearchParams(window.location.search).get("token");await i.resetPassword({newPassword:T,token:C,fetchOptions:{throw:!0}}),p({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),m(`${c}/${f.SIGN_IN}${window.location.search}`)}catch(O){p({variant:"error",message:En({error:O,localization:n,localizeErrors:g})}),S.reset()}}return x.jsx(pa,{...S,children:x.jsxs("form",{onSubmit:S.handleSubmit(E),className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:S.control,name:"newPassword",render:({field:T})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:n.NEW_PASSWORD}),x.jsx(Dn,{children:x.jsx(md,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:R,...T})}),x.jsx(Bn,{className:t?.error})]})}),y&&x.jsx(bn,{control:S.control,name:"confirmPassword",render:({field:T})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:n.CONFIRM_PASSWORD}),x.jsx(Dn,{children:x.jsx(md,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:R,...T})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(en,{type:"submit",disabled:R,className:Ae("w-full",t?.button,t?.primaryButton),children:R?x.jsx(gr,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function gQ({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:a,setIsSubmitting:i,passwordValidation:c}){const u=Wa(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:m}=Dd({localization:r}),{authClient:p,basePath:g,credentials:y,localization:w,viewPaths:b,navigate:S,toast:R,Link:E,localizeErrors:T,emailVerification:O}=A.useContext(gt),C=y?.rememberMe,I=y?.username,k=y?.passwordValidation;r={...w,...r},c={...k,...c};const{onSuccess:P,isPending:$}=ma({redirectTo:a}),W=ie({email:I?M().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):M().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:cd(c,r),rememberMe:Xe().optional()}),V=da({resolver:fa(W),defaultValues:{email:"",password:"",rememberMe:!C}});n=n||V.formState.isSubmitting||$,A.useEffect(()=>{i?.(V.formState.isSubmitting||$)},[V.formState.isSubmitting,$,i]);async function G({email:U,password:J,rememberMe:le}){var F;try{let Y={};if(I&&!Qz(U)){const se={throw:!0,headers:await f("/sign-in/username")};Y=await p.signIn.username({username:U,password:J,rememberMe:le,fetchOptions:se})}else{const se={throw:!0,headers:await f("/sign-in/email")};Y=await p.signIn.email({email:U,password:J,rememberMe:le,fetchOptions:se})}Y.twoFactorRedirect?S(`${g}/${b.TWO_FACTOR}${window.location.search}`):await P()}catch(Y){V.resetField("password"),m(),R({variant:"error",message:En({error:Y,localization:r,localizeErrors:T})}),O?.otp&&((F=Y?.error)==null?void 0:F.code)==="EMAIL_NOT_VERIFIED"&&S(`${g}/${b.EMAIL_VERIFICATION}?email=${encodeURIComponent(U)}`)}}return x.jsx(pa,{...V,children:x.jsxs("form",{onSubmit:V.handleSubmit(G),noValidate:u,className:Ae("grid w-full gap-6",e,t?.base),children:[x.jsx(bn,{control:V.control,name:"email",render:({field:U})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:I?r.USERNAME:r.EMAIL}),x.jsx(Dn,{children:x.jsx(Bo,{autoComplete:I?"username":"email",className:t?.input,type:I?"text":"email",placeholder:I?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...U})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(bn,{control:V.control,name:"password",render:({field:U})=>x.jsxs(wn,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(Sn,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&x.jsx(E,{className:Ae("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${b.FORGOT_PASSWORD}${u?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),x.jsx(Dn,{children:x.jsx(md,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...U})}),x.jsx(Bn,{className:t?.error})]})}),C&&x.jsx(bn,{control:V.control,name:"rememberMe",render:({field:U})=>x.jsxs(wn,{className:"flex",children:[x.jsx(Dn,{children:x.jsx(D1,{checked:U.value,onCheckedChange:U.onChange,disabled:n})}),x.jsx(Sn,{children:r.REMEMBER_ME})]})}),x.jsx(Ld,{ref:d,localization:r,action:"/sign-in/email"}),x.jsx(en,{type:"submit",disabled:n,className:Ae("w-full",t?.button,t?.primaryButton),children:n?x.jsx(gr,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function vQ({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,redirectTo:i,setIsSubmitting:c,passwordValidation:u}){const d=Wa(),{captchaRef:f,getCaptchaHeaders:m,resetCaptcha:p}=Dd({localization:a}),{additionalFields:g,authClient:y,basePath:w,baseURL:b,credentials:S,localization:R,nameRequired:E,persistClient:T,redirectTo:O,signUp:C,viewPaths:I,navigate:k,toast:P,avatar:$,localizeErrors:W,emailVerification:V}=A.useContext(gt),G=S?.confirmPassword,U=S?.username,J=S?.usernameRequired??!0,le=S?.passwordValidation,F=C?.fields;a={...R,...a},u={...le,...u};const Y=A.useRef(null),[se,fe]=A.useState(null),[K,D]=A.useState(!1),q=A.useCallback(()=>i||Wi("redirectTo")||O,[i,O]),B=A.useCallback(()=>`${b}${n||(T?`${w}/${I.CALLBACK}?redirectTo=${encodeURIComponent(q())}`:q())}`,[n,T,w,I,b,q]),{onSuccess:L,isPending:z}=ma({redirectTo:i}),Q={email:M().email({message:`${a.EMAIL} ${a.IS_INVALID}`}),password:cd(u,a),name:F?.includes("name")&&E?M().min(1,{message:`${a.NAME} ${a.IS_REQUIRED}`}):M().optional(),image:M().optional(),username:U&&J?M().min(1,{message:`${a.USERNAME} ${a.IS_REQUIRED}`}):M().optional(),confirmPassword:G?cd(u,{PASSWORD_REQUIRED:a.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:a.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:a.PASSWORD_TOO_LONG,INVALID_PASSWORD:a.INVALID_PASSWORD}):M().optional()},me={};if(F)for(const ue of F){if(ue==="name"||ue==="image")continue;const Oe=g?.[ue];if(!Oe)continue;let Pe;Oe.type==="number"?Pe=Oe.required?Bb(Je=>Je?Number(Je):void 0,$e({message:`${Oe.label} ${a.IS_INVALID}`})):Ck({message:`${Oe.label} ${a.IS_INVALID}`}).optional():Oe.type==="boolean"?Pe=Oe.required?kT({message:`${Oe.label} ${a.IS_INVALID}`}).refine(Je=>Je===!0,{message:`${Oe.label} ${a.IS_REQUIRED}`}):kT({message:`${Oe.label} ${a.IS_INVALID}`}).optional():Pe=Oe.required?M().min(1,`${Oe.label} ${a.IS_REQUIRED}`):M().optional(),me[ue]=Pe}const ve=ie(Q).extend(me).refine(ue=>G?ue.password===ue.confirmPassword:!0,{message:a.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Ce={email:"",password:"",...G&&{confirmPassword:""},...F?.includes("name")?{name:""}:{},...U?{username:""}:{},...F?.includes("image")&&$?{image:""}:{}};if(F)for(const ue of F){if(ue==="name"||ue==="image")continue;const Oe=g?.[ue];Oe&&(Ce[ue]=Oe.type==="boolean"?!1:"")}const Ie=da({resolver:fa(ve),defaultValues:Ce});r=r||Ie.formState.isSubmitting||z,A.useEffect(()=>{c?.(Ie.formState.isSubmitting||z)},[Ie.formState.isSubmitting,z,c]);const H=async ue=>{if($){D(!0);try{const Oe=await RY(ue,crypto.randomUUID(),$.size,$.extension);let Pe;$.upload?Pe=await $.upload(Oe):Pe=await TY(Oe),Pe?(fe(Pe),Ie.setValue("image",Pe)):(fe(null),Ie.setValue("image",""))}catch(Oe){console.error(Oe),P({variant:"error",message:En({error:Oe,localization:a,localizeErrors:W})})}D(!1)}},re=()=>{fe(null),Ie.setValue("image","")},_e=()=>{var ue;return(ue=Y.current)==null?void 0:ue.click()};async function ae({email:ue,password:Oe,name:Pe,username:Je,confirmPassword:Be,image:Ke,...Z}){try{for(const[xe,Re]of Object.entries(Z)){const Ne=g?.[xe];if(Ne?.validate&&typeof Re=="string"&&!await Ne.validate(Re)){Ie.setError(xe,{message:`${Ne.label} ${a.IS_INVALID}`});return}}const te={throw:!0,headers:await m("/sign-up/email")},oe={};Je!==void 0&&(!J&&(Je===null||Je===""||typeof Je=="string"&&Je.trim()==="")||(oe.username=Je)),Ke!==void 0&&(oe.image=Ke);const Se=await y.signUp.email({email:ue,password:Oe,name:Pe||"",...oe,...Z,callbackURL:B(),fetchOptions:te});"token"in Se&&Se.token?await L():V?.otp?k(`${w}/${I.EMAIL_VERIFICATION}?email=${encodeURIComponent(ue)}`):(k(`${w}/${I.SIGN_IN}${window.location.search}`),P({variant:"success",message:a.SIGN_UP_EMAIL}))}catch(te){P({variant:"error",message:En({error:te,localization:a,localizeErrors:W})}),Ie.resetField("password"),Ie.resetField("confirmPassword"),p()}}return x.jsx(pa,{...Ie,children:x.jsxs("form",{onSubmit:Ie.handleSubmit(ae),noValidate:d,className:Ae("grid w-full gap-6",e,t?.base),children:[F?.includes("image")&&$&&x.jsxs(x.Fragment,{children:[x.jsx("input",{ref:Y,accept:"image/*",disabled:K,hidden:!0,type:"file",onChange:ue=>{var Oe;const Pe=(Oe=ue.target.files)==null?void 0:Oe.item(0);Pe&&H(Pe),ue.target.value=""}}),x.jsx(bn,{control:Ie.control,name:"image",render:()=>x.jsxs(wn,{children:[x.jsx(Sn,{children:a.AVATAR}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsxs(OY,{children:[x.jsx(CY,{asChild:!0,children:x.jsx(en,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:x.jsx(NY,{isPending:K,className:"size-16",user:se?{name:Ie.watch("name"),email:Ie.watch("email"),image:se}:null,localization:a})})}),x.jsxs(AY,{align:"start",onCloseAutoFocus:ue=>ue.preventDefault(),children:[x.jsxs(l2,{onClick:_e,disabled:K,children:[x.jsx(bF,{}),a.UPLOAD_AVATAR]}),se&&x.jsxs(l2,{onClick:re,disabled:K,variant:"destructive",children:[x.jsx(TF,{}),a.DELETE_AVATAR]})]})]}),x.jsxs(en,{type:"button",variant:"outline",onClick:_e,disabled:K,children:[K&&x.jsx(gr,{className:"animate-spin"}),a.UPLOAD]})]}),x.jsx(Bn,{})]})})]}),F?.includes("name")&&x.jsx(bn,{control:Ie.control,name:"name",render:({field:ue})=>x.jsxs(wn,{children:[x.jsxs(Sn,{className:t?.label,children:[a.NAME,!E&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Dn,{children:x.jsx(Bo,{autoComplete:"name",className:t?.input,placeholder:a.NAME_PLACEHOLDER,disabled:r,...ue,value:ue.value})}),x.jsx(Bn,{className:t?.error})]})}),U&&x.jsx(bn,{control:Ie.control,name:"username",render:({field:ue})=>x.jsxs(wn,{children:[x.jsxs(Sn,{className:t?.label,children:[a.USERNAME,!J&&x.jsx("span",{className:"ml-1 text-muted-foreground",children:a.OPTIONAL_BRACKETS})]}),x.jsx(Dn,{children:x.jsx(Bo,{autoComplete:"username",className:t?.input,placeholder:a.USERNAME_PLACEHOLDER,disabled:r,...ue,value:ue.value})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(bn,{control:Ie.control,name:"email",render:({field:ue})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.EMAIL}),x.jsx(Dn,{children:x.jsx(Bo,{autoComplete:"email",className:t?.input,type:"email",placeholder:a.EMAIL_PLACEHOLDER,disabled:r,...ue,value:ue.value})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(bn,{control:Ie.control,name:"password",render:({field:ue})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.PASSWORD}),x.jsx(Dn,{children:x.jsx(md,{autoComplete:"new-password",className:t?.input,placeholder:a.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ue,value:ue.value})}),x.jsx(Bn,{className:t?.error})]})}),G&&x.jsx(bn,{control:Ie.control,name:"confirmPassword",render:({field:ue})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:a.CONFIRM_PASSWORD}),x.jsx(Dn,{children:x.jsx(md,{autoComplete:"new-password",className:t?.input,placeholder:a.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...ue,value:ue.value})}),x.jsx(Bn,{className:t?.error})]})}),F?.filter(ue=>ue!=="name"&&ue!=="image").map(ue=>{const Oe=g?.[ue];return Oe?Oe.type==="boolean"?x.jsx(bn,{control:Ie.control,name:ue,render:({field:Pe})=>x.jsxs(wn,{className:"flex",children:[x.jsx(Dn,{children:x.jsx(D1,{checked:Pe.value,onCheckedChange:Pe.onChange,disabled:r})}),x.jsx(Sn,{className:t?.label,children:Oe.label}),x.jsx(Bn,{className:t?.error})]})},ue):x.jsx(bn,{control:Ie.control,name:ue,render:({field:Pe})=>x.jsxs(wn,{children:[x.jsx(Sn,{className:t?.label,children:Oe.label}),x.jsx(Dn,{children:Oe.type==="number"?x.jsx(Bo,{className:t?.input,type:"number",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...Pe,value:Pe.value}):Oe.multiline?x.jsx(PY,{className:t?.input,placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...Pe,value:Pe.value}):x.jsx(Bo,{className:t?.input,type:"text",placeholder:Oe.placeholder||(typeof Oe.label=="string"?Oe.label:""),disabled:r,...Pe,value:Pe.value})}),x.jsx(Bn,{className:t?.error})]})},ue):(console.error(`Additional field ${ue} not found`),null)}),x.jsx(Ld,{ref:f,localization:a,action:"/sign-up/email"}),x.jsx(en,{type:"submit",disabled:r,className:Ae("w-full",t?.button,t?.primaryButton),children:r?x.jsx(gr,{className:"animate-spin"}):a.SIGN_UP_ACTION})]})})}function yQ({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:a=0,redirectTo:i,setIsSubmitting:c}){var u;const d=Wa(),f=d?Wi("totpURI"):null,m=A.useRef(!1),{authClient:p,basePath:g,hooks:{useSession:y},localization:w,twoFactor:b,viewPaths:S,toast:R,Link:E,localizeErrors:T}=A.useContext(gt);r={...w,...r};const{onSuccess:O,isPending:C}=ma({redirectTo:i}),{data:I}=y(),k=(u=I?.user)==null?void 0:u.twoFactorEnabled,[P,$]=A.useState(b?.length===1?b[0]:null),[W,V]=A.useState(!1),[G,U]=A.useState(0),J=ie({code:M().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:Xe().optional()}),le=da({resolver:fa(J),defaultValues:{code:""}});n=n||le.formState.isSubmitting||C,A.useEffect(()=>{c?.(le.formState.isSubmitting||C)},[le.formState.isSubmitting,C,c]),A.useEffect(()=>{P==="otp"&&G<=0&&!m.current&&(m.current=!0,F())},[P]),A.useEffect(()=>{if(G<=0)return;const se=setTimeout(()=>{U(fe=>fe-1)},1e3);return()=>clearTimeout(se)},[G]);const F=async()=>{if(!(W||G>0)){try{V(!0),await p.twoFactor.sendOtp({fetchOptions:{throw:!0}}),U(60)}catch(se){R({variant:"error",message:En({error:se,localization:r,localizeErrors:T})}),se.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}m.current=!1,V(!1)}};async function Y({code:se,trustDevice:fe}){try{await(P==="totp"?p.twoFactor.verifyTotp:p.twoFactor.verifyOtp)({code:se,trustDevice:fe,fetchOptions:{throw:!0}}),await O(),I&&!k&&R({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(K){R({variant:"error",message:En({error:K,localization:r,localizeErrors:T})}),le.reset()}}return x.jsx(pa,{...le,children:x.jsxs("form",{onSubmit:le.handleSubmit(Y),className:Ae("grid w-full gap-6",e,t?.base),children:[b?.includes("totp")&&f&&P==="totp"&&x.jsxs("div",{className:"space-y-3",children:[x.jsx(q4,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),x.jsx(vY,{className:Ae("border shadow-xs",t?.qrCode),value:f})]}),P!==null&&x.jsxs(x.Fragment,{children:[x.jsx(bn,{control:le.control,name:"code",render:({field:se})=>x.jsxs(wn,{children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx(Sn,{className:t?.label,children:r.ONE_TIME_PASSWORD}),x.jsx(E,{className:Ae("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${S.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),x.jsx(Dn,{children:x.jsx(L1,{...se,maxLength:6,onChange:fe=>{se.onChange(fe),fe.length===6&&le.handleSubmit(Y)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:x.jsx(j1,{otpSeparators:a})})}),x.jsx(Bn,{className:t?.error})]})}),x.jsx(bn,{control:le.control,name:"trustDevice",render:({field:se})=>x.jsxs(wn,{className:"flex",children:[x.jsx(Dn,{children:x.jsx(D1,{checked:se.value,onCheckedChange:se.onChange,disabled:n,className:t?.checkbox})}),x.jsx(Sn,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),x.jsxs("div",{className:"grid gap-4",children:[P!==null&&x.jsxs(en,{type:"submit",disabled:n,className:Ae(t?.button,t?.primaryButton),children:[n&&x.jsx(gr,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),P==="otp"&&b?.includes("otp")&&x.jsxs(en,{type:"button",variant:"outline",onClick:F,disabled:G>0||W||n,className:Ae(t?.button,t?.outlineButton),children:[W?x.jsx(gr,{className:"animate-spin"}):x.jsx(UT,{className:t?.icon}),r.RESEND_CODE,G>0&&` (${G})`]}),P!=="otp"&&b?.includes("otp")&&x.jsxs(en,{type:"button",variant:"secondary",className:Ae(t?.button,t?.secondaryButton),onClick:()=>$("otp"),disabled:n,children:[x.jsx(UT,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),P!=="totp"&&b?.includes("totp")&&x.jsxs(en,{type:"button",variant:"secondary",className:Ae(t?.button,t?.secondaryButton),onClick:()=>$("totp"),disabled:n,children:[x.jsx(xF,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function X4({redirectTo:e}){const t=A.useRef(!1),{authClient:n,basePath:r,viewPaths:a}=A.useContext(gt),{onSuccess:i}=ma({redirectTo:e||`${r}/${a.SIGN_IN}`});return A.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(i))},[n,i]),x.jsx(gr,{className:"animate-spin"})}function _Q({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,pathname:i,redirectTo:c,view:u,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:m,credentials:p,localization:g,magicLink:y,emailOTP:w,signUp:b,twoFactor:S,viewPaths:R,replace:E}=A.useContext(gt),T=!!b;if(a={...g,...a},A.useEffect(()=>{i&&!__(R,i)&&(console.error(`Invalid auth view: ${i}`),E(`${m}/${R.SIGN_IN}${window.location.search}`))},[i,R,m,E]),u=u||__(R,i)||"SIGN_IN",A.useEffect(()=>{let O=!1;u==="MAGIC_LINK"&&(!y||!p&&!w)&&(O=!0),u==="EMAIL_OTP"&&(!w||!p&&!y)&&(O=!0),u==="SIGN_UP"&&!T&&(O=!0),!p&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&(O=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(u)&&!S&&(O=!0),O&&E(`${m}/${R.SIGN_IN}${window.location.search}`)},[m,u,R,p,E,w,T,y,S]),u==="SIGN_OUT")return x.jsx(X4,{redirectTo:c});if(u==="CALLBACK")return x.jsx(Q4,{redirectTo:c});if(u==="SIGN_IN")return p?x.jsx(gQ,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):y?x.jsx(d2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):w?x.jsx(u2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f}):null;if(u==="TWO_FACTOR")return x.jsx(yQ,{className:e,classNames:t,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="RECOVER_ACCOUNT")return x.jsx(pQ,{className:e,classNames:t,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="MAGIC_LINK")return x.jsx(d2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_OTP")return x.jsx(u2,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="EMAIL_VERIFICATION")return x.jsx(fQ,{className:e,classNames:t,callbackURL:n,localization:a,otpSeparators:d,redirectTo:c,isSubmitting:r,setIsSubmitting:f});if(u==="FORGOT_PASSWORD")return x.jsx(hQ,{className:e,classNames:t,localization:a,isSubmitting:r,setIsSubmitting:f});if(u==="RESET_PASSWORD")return x.jsx(mQ,{className:e,classNames:t,localization:a});if(u==="SIGN_UP")return T&&x.jsx(vQ,{className:e,classNames:t,callbackURL:n,localization:a,redirectTo:c,isSubmitting:r,setIsSubmitting:f})}function bQ({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:a,replace:i,toast:c}=A.useContext(gt),u=A.useMemo(()=>({...r,...n}),[r,n]),{data:d}=SY(),[f,m]=A.useState(null);return A.useEffect(()=>{const p=Wi("invitationId");if(!p){c({variant:"error",message:u.INVITATION_NOT_FOUND}),i(a);return}m(p)},[u.INVITATION_NOT_FOUND,c,i,a]),!d||!f?x.jsx(J4,{className:e,classNames:t}):x.jsx(wQ,{className:e,classNames:t,localization:u,invitationId:f})}function wQ({className:e,classNames:t,localization:n,invitationId:r}){var a;const{authClient:i,hooks:{useInvitation:c},localization:u,organization:d,redirectTo:f,replace:m,toast:p,localizeErrors:g}=A.useContext(gt),y=A.useMemo(()=>({...u,...n}),[u,n]),[w,b]=A.useState(!1),[S,R]=A.useState(!1),E=w||S,{data:T,isPending:O}=c({query:{id:r}}),C=A.useCallback(()=>Wi("redirectTo")||f,[f]);A.useEffect(()=>{if(!(O||!r)){if(!T){p({variant:"error",message:y.INVITATION_NOT_FOUND}),m(f);return}(T.status!=="pending"||new Date(T.expiresAt)<new Date)&&(p({variant:"error",message:new Date(T.expiresAt)<new Date?y.INVITATION_EXPIRED:y.INVITATION_NOT_FOUND}),m(f))}},[T,O,r,y,p,m,f]);const I=async()=>{R(!0);try{await i.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_ACCEPTED||"Invitation accepted"}),m(C())}catch(V){p({variant:"error",message:En({error:V,localization:y,localizeErrors:g})}),R(!1)}},k=async()=>{b(!0);try{await i.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),p({variant:"success",message:y.INVITATION_REJECTED}),m(f)}catch(V){p({variant:"error",message:En({error:V,localization:y,localizeErrors:g})}),b(!1)}},W=((a=[...[{role:"owner",label:y.OWNER},{role:"admin",label:y.ADMIN},{role:"member",label:y.MEMBER}],...d?.customRoles||[]].find(V=>V.role===T?.role))==null?void 0:a.label)||T?.role;return T?x.jsxs(pd,{className:Ae("w-full max-w-sm",e,t?.base),children:[x.jsxs(N1,{className:Ae("justify-items-center text-center",t?.header),children:[x.jsx(F4,{className:Ae("text-lg md:text-xl",t?.title),children:y.ACCEPT_INVITATION}),x.jsx(B4,{className:Ae("text-xs md:text-sm",t?.description),children:y.ACCEPT_INVITATION_DESCRIPTION})]}),x.jsxs(M1,{className:Ae("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(pd,{className:Ae("flex-row items-center p-4"),children:[x.jsx(Y4,{organization:{id:T.organizationId,name:T.organizationName,slug:T.organizationSlug,logo:T.organizationLogo,createdAt:new Date},localization:y}),x.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:W})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsxs(en,{variant:"outline",className:Ae(t?.button,t?.outlineButton),onClick:k,disabled:E,children:[w?x.jsx(gr,{className:"animate-spin"}):x.jsx(CF,{}),y.REJECT]}),x.jsxs(en,{className:Ae(t?.button,t?.primaryButton),onClick:I,disabled:E,children:[S?x.jsx(gr,{className:"animate-spin"}):x.jsx(Pk,{}),y.ACCEPT]})]})]})]}):x.jsx(J4,{className:e,classNames:t})}var J4=({className:e,classNames:t,localization:n})=>x.jsxs(pd,{className:Ae("w-full max-w-sm",e,t?.base),children:[x.jsxs(N1,{className:Ae("justify-items-center",t?.header),children:[x.jsx(Va,{className:Ae("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),x.jsx(Va,{className:Ae("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),x.jsxs(M1,{className:Ae("flex flex-col gap-6 truncate",t?.content),children:[x.jsxs(pd,{className:Ae("flex-row items-center p-4"),children:[x.jsx(Y4,{isPending:!0,localization:n}),x.jsx(Va,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[x.jsx(Va,{className:"h-9 w-full"}),x.jsx(Va,{className:"h-9 w-full"})]})]})]});function f2({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(wY,{"data-slot":"separator",decorative:n,orientation:t,className:Ae("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function SQ({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m}=A.useContext(gt);return x.jsxs(en,{className:Ae("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?x.jsx(Dk,{className:(c=e?.form)==null?void 0:c.icon}):x.jsx(Lk,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function EQ({classNames:e,isSubmitting:t,localization:n,view:r}){var a,i,c,u;const{viewPaths:d,navigate:f,basePath:m,credentials:p}=A.useContext(gt);return x.jsxs(en,{className:Ae("w-full",(a=e?.form)==null?void 0:a.button,(i=e?.form)==null?void 0:i.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${m}/${r==="MAGIC_LINK"||!p?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?x.jsx(Dk,{className:(c=e?.form)==null?void 0:c.icon}):x.jsx(Lk,{className:(u=e?.form)==null?void 0:u.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function RQ({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:a,localizeErrors:i}=A.useContext(gt),c=A.useRef(!1);e=A.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:u}=ma({redirectTo:t});return A.useEffect(()=>{if(!c.current){c.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:u}})}catch(d){a({variant:"error",message:En({error:d,localization:e,localizeErrors:i})})}}},[n,e,i,u,a]),null}function xQ({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:a}){var i,c;const{authClient:u,localization:d,toast:f,localizeErrors:m}=A.useContext(gt);n={...d,...n};const{onSuccess:p}=ma({redirectTo:r}),g=async()=>{a?.(!0);try{const y=await u.signIn.passkey({fetchOptions:{throw:!0}});y?.error?(f({variant:"error",message:En({error:y.error,localization:n,localizeErrors:m})}),a?.(!1)):p()}catch(y){f({variant:"error",message:En({error:y,localization:n,localizeErrors:m})}),a?.(!1)}};return x.jsxs(en,{className:Ae("w-full",(i=e?.form)==null?void 0:i.button,(c=e?.form)==null?void 0:c.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[x.jsx(EF,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function h2({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:a,other:i,provider:c,redirectTo:u,socialLayout:d,setIsSubmitting:f}){var m,p,g,y;const{authClient:w,basePath:b,baseURL:S,persistClient:R,redirectTo:E,viewPaths:T,social:O,genericOAuth:C,toast:I,localizeErrors:k}=A.useContext(gt),P=A.useCallback(()=>u||Wi("redirectTo")||E,[u,E]),$=A.useCallback(()=>`${S}${n||(R?`${b}/${T.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,R,b,T,S,P]),W=async()=>{f(!0);try{if(i){const V={providerId:c.provider,callbackURL:$(),fetchOptions:{throw:!0}};C?.signIn?(await C.signIn(V),setTimeout(()=>{f(!1)},1e4)):await w.signIn.oauth2(V)}else{const V={provider:c.provider,callbackURL:$(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(V),setTimeout(()=>{f(!1)},1e4)):await w.signIn.social(V)}}catch(V){I({variant:"error",message:En({error:V,localization:a,localizeErrors:k})}),f(!1)}};return x.jsxs(en,{className:Ae(d==="vertical"?"w-full":"grow",e,(m=t?.form)==null?void 0:m.button,(p=t?.form)==null?void 0:p.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:W,children:[c.icon&&x.jsx(c.icon,{className:(y=t?.form)==null?void 0:y.icon}),d==="grid"&&c.name,d==="vertical"&&`${a.SIGN_IN_WITH} ${c.name}`]})}function jae({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:a,localization:i,path:c,pathname:u,redirectTo:d,socialLayout:f="auto",view:m,otpSeparators:p=0}){var g,y,w,b,S,R;const E=Wa(),{basePath:T,credentials:O,localization:C,magicLink:I,emailOTP:k,oneTap:P,passkey:$,signUp:W,social:V,genericOAuth:G,viewPaths:U,Link:J}=A.useContext(gt);i={...C,...i};let le=f;le==="auto"&&(le=O&&V?.providers&&V.providers.length>2?"horizontal":"vertical");const F=c??u?.split("/").pop(),Y=m||__(U,F)||"SIGN_IN",[se,fe]=A.useState(!1);if(A.useEffect(()=>{const D=()=>fe(!1);return window.addEventListener("pagehide",D),()=>{fe(!1),window.removeEventListener("pagehide",D)}},[]),Y==="CALLBACK")return x.jsx(Q4,{redirectTo:d});if(Y==="SIGN_OUT")return x.jsx(X4,{redirectTo:d});if(Y==="ACCEPT_INVITATION")return x.jsx(bQ,{className:e,classNames:t});const K=!O&&!I&&!k?i.DISABLED_CREDENTIALS_DESCRIPTION:i[`${Y}_DESCRIPTION`];return x.jsxs(pd,{className:Ae("w-full max-w-sm",e,t?.base),children:[x.jsx(N1,{className:t?.header,children:r||x.jsxs(x.Fragment,{children:[x.jsx(F4,{className:Ae("text-lg md:text-xl",t?.title),children:i[Y]}),K&&x.jsx(B4,{className:Ae("text-xs md:text-sm",t?.description),children:K})]})}),x.jsxs(M1,{className:Ae("grid gap-6",t?.content),children:[P&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(Y)&&x.jsx(RQ,{localization:i,redirectTo:d}),(O||I||k)&&x.jsxs("div",{className:"grid gap-4",children:[x.jsx(_Q,{classNames:t?.form,callbackURL:n,isSubmitting:se,localization:i,otpSeparators:p,view:Y,redirectTo:d,setIsSubmitting:fe}),I&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(Y)||k&&Y==="EMAIL_OTP")&&x.jsx(EQ,{classNames:t,localization:i,view:Y,isSubmitting:se}),k&&(O&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(Y)||I&&["SIGN_IN","MAGIC_LINK"].includes(Y))&&x.jsx(SQ,{classNames:t,localization:i,view:Y,isSubmitting:se})]}),Y!=="RESET_PASSWORD"&&Y!=="EMAIL_VERIFICATION"&&(((g=V?.providers)==null?void 0:g.length)||((y=G?.providers)==null?void 0:y.length)||Y==="SIGN_IN"&&$)&&x.jsxs(x.Fragment,{children:[(O||I||k)&&x.jsxs("div",{className:Ae("flex items-center gap-2",t?.continueWith),children:[x.jsx(f2,{className:Ae("!w-auto grow",t?.separator)}),x.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:i.OR_CONTINUE_WITH}),x.jsx(f2,{className:Ae("!w-auto grow",t?.separator)})]}),x.jsxs("div",{className:"grid gap-4",children:[(((w=V?.providers)==null?void 0:w.length)||((b=G?.providers)==null?void 0:b.length))&&x.jsxs("div",{className:Ae("flex w-full items-center justify-between gap-4",le==="horizontal"&&"flex-wrap",le==="vertical"&&"flex-col",le==="grid"&&"grid grid-cols-2"),children:[(S=V?.providers)==null?void 0:S.map(D=>{const q=oQ.find(B=>B.provider===D);return q?x.jsx(h2,{classNames:t,callbackURL:n,isSubmitting:se,localization:i,provider:q,redirectTo:d,setIsSubmitting:fe,socialLayout:le},D):null}),(R=G?.providers)==null?void 0:R.map(D=>x.jsx(h2,{classNames:t,callbackURL:n,isSubmitting:se,localization:i,provider:D,redirectTo:d,setIsSubmitting:fe,socialLayout:le,other:!0},D.provider))]}),$&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(Y)&&x.jsx(xQ,{classNames:t,isSubmitting:se,localization:i,redirectTo:d,setIsSubmitting:fe})]})]})]}),a&&x.jsx(c2,{className:t?.footer,children:a}),O&&W&&x.jsxs(c2,{className:Ae("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?i.DONT_HAVE_AN_ACCOUNT:Y==="SIGN_UP"?i.ALREADY_HAVE_AN_ACCOUNT:x.jsx(yF,{className:"size-3"}),Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"||Y==="SIGN_UP"?x.jsx(J,{className:Ae("text-foreground underline",t?.footerLink),href:`${T}/${U[Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:x.jsx(en,{variant:"link",size:"sm",className:Ae("px-0 text-foreground underline",t?.footerLink),children:Y==="SIGN_IN"||Y==="MAGIC_LINK"||Y==="EMAIL_OTP"?i.SIGN_UP:i.SIGN_IN})}):x.jsx(en,{variant:"link",size:"sm",className:Ae("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:i.GO_BACK})]})]})}function $ae({children:e}){const{hooks:{useSession:t}}=A.useContext(gt),{isPending:n}=t();return n?e:null}function Uae({children:e}){const{hooks:{useSession:t}}=A.useContext(gt),{data:n}=t();return n?e:null}function zae({children:e}){const{hooks:{useSession:t}}=A.useContext(gt),{data:n,isPending:r}=t();return!n&&!r?e:null}function TQ(e){const t=Hi.c(8),{children:n}=e,r=xl();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={basePath:"/",pathMode:"slug"},t[0]=a):a=t[0];let i,c;t[1]!==r?(i=d=>r({to:d}),c=d=>r({to:d,replace:!0}),t[1]=r,t[2]=i,t[3]=c):(i=t[2],c=t[3]);let u;return t[4]!==n||t[5]!==i||t[6]!==c?(u=x.jsx(pF,{authClient:nI,redirectTo:"/",organization:a,navigate:i,replace:c,Link:OQ,children:n}),t[4]=n,t[5]=i,t[6]=c,t[7]=u):u=t[7],u}function OQ(e){const{href:t,className:n,children:r,...a}=e;return x.jsx(Dm,{to:t,className:n,...a,children:r})}const Bi="org-admin",CQ={from({org:e,project:t}){if(e?.includes("/")||t.includes("/"))throw new Error("Org or project cannot contain slashes");return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,n]=e.split("/");if(!t||!n)throw new Error("Invalid locator");return{org:t,project:n}},isOrgAdminProject(e){return e.split("/")[1]===Bi},adminProject(e){return`${e}/${Bi}`}},eP=A.createContext(void 0),Vae=()=>{const e=A.useContext(eP);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},Fae=e=>{const t=Hi.c(10),{children:n,org:r,project:a}=e;let i;t[0]!==r.slug||t[1]!==a.slug?(i=CQ.from({org:r.slug,project:a.slug}),t[0]=r.slug,t[1]=a.slug,t[2]=i):i=t[2];const c=i;let u;t[3]!==c||t[4]!==r||t[5]!==a?(u={org:r,project:a,locator:c},t[3]=c,t[4]=r,t[5]=a,t[6]=u):u=t[6];const d=u;let f;return t[7]!==n||t[8]!==d?(f=x.jsx(eP.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f};function rg(e){return!!e._zod}function Is(e,t){return rg(e)?TI(e,t):e.safeParse(t)}function tP(e){if(!e)return;let t;if(rg(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function AQ(e){if(rg(e)){const i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}const n=e._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=e.value;if(r!==void 0)return r}const og="2025-11-25",IQ=[og,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Oi="io.modelcontextprotocol/related-task",ag="2.0",ir=Ok(e=>e!==null&&(typeof e=="object"||typeof e=="function")),nP=At([M(),$e().int()]),rP=M();sr({ttl:At([$e(),Ed()]).optional(),pollInterval:$e().optional()});const kQ=ie({ttl:$e().optional()}),NQ=ie({taskId:M()}),$1=sr({progressToken:nP.optional(),[Oi]:NQ.optional()}),ao=ie({_meta:$1.optional()}),jd=ao.extend({task:kQ.optional()}),MQ=e=>jd.safeParse(e).success,lr=ie({method:M(),params:ao.loose().optional()}),Oo=ie({_meta:$1.optional()}),Co=ie({method:M(),params:Oo.loose().optional()}),ur=sr({_meta:$1.optional()}),sg=At([M(),$e().int()]),oP=ie({jsonrpc:je(ag),id:sg,...lr.shape}).strict(),Z_=e=>oP.safeParse(e).success,aP=ie({jsonrpc:je(ag),...Co.shape}).strict(),PQ=e=>aP.safeParse(e).success,U1=ie({jsonrpc:je(ag),id:sg,result:ur}).strict(),zu=e=>U1.safeParse(e).success;var rt;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(rt||(rt={}));const z1=ie({jsonrpc:je(ag),id:sg.optional(),error:ie({code:$e().int(),message:M(),data:tt().optional()})}).strict(),DQ=e=>z1.safeParse(e).success,Ju=At([oP,aP,U1,z1]);At([U1,z1]);const nl=ur.strict(),LQ=Oo.extend({requestId:sg.optional(),reason:M().optional()}),V1=Co.extend({method:je("notifications/cancelled"),params:LQ}),jQ=ie({src:M(),mimeType:M().optional(),sizes:we(M()).optional(),theme:It(["light","dark"]).optional()}),$d=ie({icons:we(jQ).optional()}),_l=ie({name:M(),title:M().optional()}),sP=_l.extend({..._l.shape,...$d.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),$Q=Rd(ie({applyDefaults:Xe().optional()}),it(M(),tt())),UQ=Bb(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Rd(ie({form:$Q.optional(),url:ir.optional()}),it(M(),tt()).optional())),zQ=sr({list:ir.optional(),cancel:ir.optional(),requests:sr({sampling:sr({createMessage:ir.optional()}).optional(),elicitation:sr({create:ir.optional()}).optional()}).optional()}),VQ=sr({list:ir.optional(),cancel:ir.optional(),requests:sr({tools:sr({call:ir.optional()}).optional()}).optional()}),FQ=ie({experimental:it(M(),ir).optional(),sampling:ie({context:ir.optional(),tools:ir.optional()}).optional(),elicitation:UQ.optional(),roots:ie({listChanged:Xe().optional()}).optional(),tasks:zQ.optional()}),BQ=ao.extend({protocolVersion:M(),capabilities:FQ,clientInfo:sP}),qQ=lr.extend({method:je("initialize"),params:BQ}),HQ=ie({experimental:it(M(),ir).optional(),logging:ir.optional(),completions:ir.optional(),prompts:ie({listChanged:Xe().optional()}).optional(),resources:ie({subscribe:Xe().optional(),listChanged:Xe().optional()}).optional(),tools:ie({listChanged:Xe().optional()}).optional(),tasks:VQ.optional()}),iP=ur.extend({protocolVersion:M(),capabilities:HQ,serverInfo:sP,instructions:M().optional()}),cP=Co.extend({method:je("notifications/initialized"),params:Oo.optional()}),GQ=e=>cP.safeParse(e).success,F1=lr.extend({method:je("ping"),params:ao.optional()}),ZQ=ie({progress:$e(),total:vn($e()),message:vn(M())}),WQ=ie({...Oo.shape,...ZQ.shape,progressToken:nP}),B1=Co.extend({method:je("notifications/progress"),params:WQ}),KQ=ao.extend({cursor:rP.optional()}),Ud=lr.extend({params:KQ.optional()}),zd=ur.extend({nextCursor:rP.optional()}),YQ=It(["working","input_required","completed","failed","cancelled"]),Vd=ie({taskId:M(),status:YQ,ttl:At([$e(),Ed()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:vn($e()),statusMessage:vn(M())}),gd=ur.extend({task:Vd}),QQ=Oo.merge(Vd),fm=Co.extend({method:je("notifications/tasks/status"),params:QQ}),q1=lr.extend({method:je("tasks/get"),params:ao.extend({taskId:M()})}),H1=ur.merge(Vd),G1=lr.extend({method:je("tasks/result"),params:ao.extend({taskId:M()})});ur.loose();const Z1=Ud.extend({method:je("tasks/list")}),W1=zd.extend({tasks:we(Vd)}),K1=lr.extend({method:je("tasks/cancel"),params:ao.extend({taskId:M()})}),XQ=ur.merge(Vd),lP=ie({uri:M(),mimeType:vn(M()),_meta:it(M(),tt()).optional()}),uP=lP.extend({text:M()}),Y1=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),dP=lP.extend({blob:Y1}),Fd=It(["user","assistant"]),Al=ie({audience:we(Fd).optional(),priority:$e().min(0).max(1).optional(),lastModified:gk({offset:!0}).optional()}),fP=ie({..._l.shape,...$d.shape,uri:M(),description:vn(M()),mimeType:vn(M()),annotations:Al.optional(),_meta:vn(sr({}))}),JQ=ie({..._l.shape,...$d.shape,uriTemplate:M(),description:vn(M()),mimeType:vn(M()),annotations:Al.optional(),_meta:vn(sr({}))}),eX=Ud.extend({method:je("resources/list")}),hP=zd.extend({resources:we(fP)}),tX=Ud.extend({method:je("resources/templates/list")}),pP=zd.extend({resourceTemplates:we(JQ)}),Q1=ao.extend({uri:M()}),nX=Q1,rX=lr.extend({method:je("resources/read"),params:nX}),mP=ur.extend({contents:we(At([uP,dP]))}),gP=Co.extend({method:je("notifications/resources/list_changed"),params:Oo.optional()}),oX=Q1,aX=lr.extend({method:je("resources/subscribe"),params:oX}),sX=Q1,iX=lr.extend({method:je("resources/unsubscribe"),params:sX}),cX=Oo.extend({uri:M()}),lX=Co.extend({method:je("notifications/resources/updated"),params:cX}),uX=ie({name:M(),description:vn(M()),required:vn(Xe())}),dX=ie({..._l.shape,...$d.shape,description:vn(M()),arguments:vn(we(uX)),_meta:vn(sr({}))}),fX=Ud.extend({method:je("prompts/list")}),vP=zd.extend({prompts:we(dX)}),hX=ao.extend({name:M(),arguments:it(M(),M()).optional()}),pX=lr.extend({method:je("prompts/get"),params:hX}),X1=ie({type:je("text"),text:M(),annotations:Al.optional(),_meta:it(M(),tt()).optional()}),J1=ie({type:je("image"),data:Y1,mimeType:M(),annotations:Al.optional(),_meta:it(M(),tt()).optional()}),ew=ie({type:je("audio"),data:Y1,mimeType:M(),annotations:Al.optional(),_meta:it(M(),tt()).optional()}),mX=ie({type:je("tool_use"),name:M(),id:M(),input:it(M(),tt()),_meta:it(M(),tt()).optional()}),gX=ie({type:je("resource"),resource:At([uP,dP]),annotations:Al.optional(),_meta:it(M(),tt()).optional()}),vX=fP.extend({type:je("resource_link")}),tw=At([X1,J1,ew,vX,gX]),yX=ie({role:Fd,content:tw}),yP=ur.extend({description:M().optional(),messages:we(yX)}),_P=Co.extend({method:je("notifications/prompts/list_changed"),params:Oo.optional()}),_X=ie({title:M().optional(),readOnlyHint:Xe().optional(),destructiveHint:Xe().optional(),idempotentHint:Xe().optional(),openWorldHint:Xe().optional()}),bX=ie({taskSupport:It(["required","optional","forbidden"]).optional()}),bP=ie({..._l.shape,...$d.shape,description:M().optional(),inputSchema:ie({type:je("object"),properties:it(M(),ir).optional(),required:we(M()).optional()}).catchall(tt()),outputSchema:ie({type:je("object"),properties:it(M(),ir).optional(),required:we(M()).optional()}).catchall(tt()).optional(),annotations:_X.optional(),execution:bX.optional(),_meta:it(M(),tt()).optional()}),wX=Ud.extend({method:je("tools/list")}),nw=zd.extend({tools:we(bP)}),ig=ur.extend({content:we(tw).default([]),structuredContent:it(M(),tt()).optional(),isError:Xe().optional()});ig.or(ur.extend({toolResult:tt()}));const SX=jd.extend({name:M(),arguments:it(M(),tt()).optional()}),EX=lr.extend({method:je("tools/call"),params:SX}),wP=Co.extend({method:je("notifications/tools/list_changed"),params:Oo.optional()}),RX=ie({autoRefresh:Xe().default(!0),debounceMs:$e().int().nonnegative().default(300)}),SP=It(["debug","info","notice","warning","error","critical","alert","emergency"]),xX=ao.extend({level:SP}),TX=lr.extend({method:je("logging/setLevel"),params:xX}),OX=Oo.extend({level:SP,logger:M().optional(),data:tt()}),CX=Co.extend({method:je("notifications/message"),params:OX}),AX=ie({name:M().optional()}),IX=ie({hints:we(AX).optional(),costPriority:$e().min(0).max(1).optional(),speedPriority:$e().min(0).max(1).optional(),intelligencePriority:$e().min(0).max(1).optional()}),kX=ie({mode:It(["auto","required","none"]).optional()}),NX=ie({type:je("tool_result"),toolUseId:M().describe("The unique identifier for the corresponding tool call."),content:we(tw).default([]),structuredContent:ie({}).loose().optional(),isError:Xe().optional(),_meta:it(M(),tt()).optional()}),MX=Sk("type",[X1,J1,ew]),hm=Sk("type",[X1,J1,ew,mX,NX]),PX=ie({role:Fd,content:At([hm,we(hm)]),_meta:it(M(),tt()).optional()}),DX=jd.extend({messages:we(PX),modelPreferences:IX.optional(),systemPrompt:M().optional(),includeContext:It(["none","thisServer","allServers"]).optional(),temperature:$e().optional(),maxTokens:$e().int(),stopSequences:we(M()).optional(),metadata:ir.optional(),tools:we(bP).optional(),toolChoice:kX.optional()}),EP=lr.extend({method:je("sampling/createMessage"),params:DX}),RP=ur.extend({model:M(),stopReason:vn(It(["endTurn","stopSequence","maxTokens"]).or(M())),role:Fd,content:MX}),xP=ur.extend({model:M(),stopReason:vn(It(["endTurn","stopSequence","maxTokens","toolUse"]).or(M())),role:Fd,content:At([hm,we(hm)])}),LX=ie({type:je("boolean"),title:M().optional(),description:M().optional(),default:Xe().optional()}),jX=ie({type:je("string"),title:M().optional(),description:M().optional(),minLength:$e().optional(),maxLength:$e().optional(),format:It(["email","uri","date","date-time"]).optional(),default:M().optional()}),$X=ie({type:It(["number","integer"]),title:M().optional(),description:M().optional(),minimum:$e().optional(),maximum:$e().optional(),default:$e().optional()}),UX=ie({type:je("string"),title:M().optional(),description:M().optional(),enum:we(M()),default:M().optional()}),zX=ie({type:je("string"),title:M().optional(),description:M().optional(),oneOf:we(ie({const:M(),title:M()})),default:M().optional()}),VX=ie({type:je("string"),title:M().optional(),description:M().optional(),enum:we(M()),enumNames:we(M()).optional(),default:M().optional()}),FX=At([UX,zX]),BX=ie({type:je("array"),title:M().optional(),description:M().optional(),minItems:$e().optional(),maxItems:$e().optional(),items:ie({type:je("string"),enum:we(M())}),default:we(M()).optional()}),qX=ie({type:je("array"),title:M().optional(),description:M().optional(),minItems:$e().optional(),maxItems:$e().optional(),items:ie({anyOf:we(ie({const:M(),title:M()}))}),default:we(M()).optional()}),HX=At([BX,qX]),GX=At([VX,FX,HX]),ZX=At([GX,LX,jX,$X]),WX=jd.extend({mode:je("form").optional(),message:M(),requestedSchema:ie({type:je("object"),properties:it(M(),ZX),required:we(M()).optional()})}),KX=jd.extend({mode:je("url"),message:M(),elicitationId:M(),url:M().url()}),YX=At([WX,KX]),TP=lr.extend({method:je("elicitation/create"),params:YX}),QX=Oo.extend({elicitationId:M()}),XX=Co.extend({method:je("notifications/elicitation/complete"),params:QX}),OP=ur.extend({action:It(["accept","decline","cancel"]),content:Bb(e=>e===null?void 0:e,it(M(),At([M(),$e(),Xe(),we(M())])).optional())}),JX=ie({type:je("ref/resource"),uri:M()}),eJ=ie({type:je("ref/prompt"),name:M()}),tJ=ao.extend({ref:At([eJ,JX]),argument:ie({name:M(),value:M()}),context:ie({arguments:it(M(),M()).optional()}).optional()}),nJ=lr.extend({method:je("completion/complete"),params:tJ}),CP=ur.extend({completion:sr({values:we(M()).max(100),total:vn($e().int()),hasMore:vn(Xe())})}),rJ=ie({uri:M().startsWith("file://"),name:M().optional(),_meta:it(M(),tt()).optional()}),oJ=lr.extend({method:je("roots/list"),params:ao.optional()}),aJ=ur.extend({roots:we(rJ)}),sJ=Co.extend({method:je("notifications/roots/list_changed"),params:Oo.optional()});At([F1,qQ,nJ,TX,pX,fX,eX,tX,rX,aX,iX,EX,wX,q1,G1,Z1,K1]);At([V1,B1,cP,sJ,fm]);At([nl,RP,xP,OP,aJ,H1,W1,gd]);At([F1,EP,TP,oJ,q1,G1,Z1,K1]);At([V1,B1,CX,lX,gP,wP,_P,fm,XX]);At([nl,iP,CP,yP,vP,hP,pP,mP,ig,nw,H1,W1,gd]);class Qe extends Error{constructor(t,n,r){super(`MCP error ${t}: ${n}`),this.code=t,this.data=r,this.name="McpError"}static fromError(t,n,r){if(t===rt.UrlElicitationRequired&&r){const a=r;if(a.elicitations)return new iJ(a.elicitations,n)}return new Qe(t,n,r)}}class iJ extends Qe{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(rt.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function Ei(e){return e==="completed"||e==="failed"||e==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function p2(e){const n=tP(e)?.method;if(!n)throw new Error("Schema is missing a method literal");const r=AQ(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function m2(e,t){const n=Is(e,t);if(!n.success)throw n.error;return n.data}const cJ=6e4;class lJ{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(V1,n=>{this._oncancel(n)}),this.setNotificationHandler(B1,n=>{this._onprogress(n)}),this.setRequestHandler(F1,n=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(q1,async(n,r)=>{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Qe(rt.InvalidParams,"Failed to retrieve task: Task not found");return{...a}}),this.setRequestHandler(G1,async(n,r)=>{const a=async()=>{const i=n.params.taskId;if(this._taskMessageQueue){let u;for(;u=await this._taskMessageQueue.dequeue(i,r.sessionId);){if(u.type==="response"||u.type==="error"){const d=u.message,f=d.id,m=this._requestResolvers.get(f);if(m)if(this._requestResolvers.delete(f),u.type==="response")m(d);else{const p=d,g=new Qe(p.error.code,p.error.message,p.error.data);m(g)}else{const p=u.type==="response"?"Response":"Error";this._onerror(new Error(`${p} handler missing for request ${f}`))}continue}await this._transport?.send(u.message,{relatedRequestId:r.requestId})}}const c=await this._taskStore.getTask(i,r.sessionId);if(!c)throw new Qe(rt.InvalidParams,`Task not found: ${i}`);if(!Ei(c.status))return await this._waitForTaskUpdate(i,r.signal),await a();if(Ei(c.status)){const u=await this._taskStore.getTaskResult(i,r.sessionId);return this._clearTaskQueue(i),{...u,_meta:{...u._meta,[Oi]:{taskId:i}}}}return await a()};return await a()}),this.setRequestHandler(Z1,async(n,r)=>{try{const{tasks:a,nextCursor:i}=await this._taskStore.listTasks(n.params?.cursor,r.sessionId);return{tasks:a,nextCursor:i,_meta:{}}}catch(a){throw new Qe(rt.InvalidParams,`Failed to list tasks: ${a instanceof Error?a.message:String(a)}`)}}),this.setRequestHandler(K1,async(n,r)=>{try{const a=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!a)throw new Qe(rt.InvalidParams,`Task not found: ${n.params.taskId}`);if(Ei(a.status))throw new Qe(rt.InvalidParams,`Cannot cancel task in terminal status: ${a.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new Qe(rt.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...i}}catch(a){throw a instanceof Qe?a:new Qe(rt.InvalidRequest,`Failed to cancel task: ${a instanceof Error?a.message:String(a)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,n,r,a,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(a,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:i,onTimeout:a})}_resetTimeout(t){const n=this._timeoutInfo.get(t);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(t),Qe.fromError(rt.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(t){const n=this._timeoutInfo.get(t);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const n=this.transport?.onclose;this._transport.onclose=()=>{n?.(),this._onclose()};const r=this.transport?.onerror;this._transport.onerror=i=>{r?.(i),this._onerror(i)};const a=this._transport?.onmessage;this._transport.onmessage=(i,c)=>{a?.(i,c),zu(i)||DQ(i)?this._onresponse(i):Z_(i)?this._onrequest(i,c):PQ(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const r of this._requestHandlerAbortControllers.values())r.abort();this._requestHandlerAbortControllers.clear();const n=Qe.fromError(rt.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const r of t.values())r(n)}_onerror(t){this.onerror?.(t)}_onnotification(t){const n=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(t)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(t,n){const r=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,a=this._transport,i=t.params?._meta?.[Oi]?.taskId;if(r===void 0){const m={jsonrpc:"2.0",id:t.id,error:{code:rt.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:m,timestamp:Date.now()},a?.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):a?.send(m).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const c=new AbortController;this._requestHandlerAbortControllers.set(t.id,c);const u=MQ(t.params)?t.params.task:void 0,d=this._taskStore?this.requestTaskStore(t,a?.sessionId):void 0,f={signal:c.signal,sessionId:a?.sessionId,_meta:t.params?._meta,sendNotification:async m=>{if(c.signal.aborted)return;const p={relatedRequestId:t.id};i&&(p.relatedTask={taskId:i}),await this.notification(m,p)},sendRequest:async(m,p,g)=>{if(c.signal.aborted)throw new Qe(rt.ConnectionClosed,"Request was cancelled");const y={...g,relatedRequestId:t.id};i&&!y.relatedTask&&(y.relatedTask={taskId:i});const w=y.relatedTask?.taskId??i;return w&&d&&await d.updateTaskStatus(w,"input_required"),await this.request(m,p,y)},authInfo:n?.authInfo,requestId:t.id,requestInfo:n?.requestInfo,taskId:i,taskStore:d,taskRequestedTtl:u?.ttl,closeSSEStream:n?.closeSSEStream,closeStandaloneSSEStream:n?.closeStandaloneSSEStream};Promise.resolve().then(()=>{u&&this.assertTaskHandlerCapability(t.method)}).then(()=>r(t,f)).then(async m=>{if(c.signal.aborted)return;const p={result:m,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)},async m=>{if(c.signal.aborted)return;const p={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(m.code)?m.code:rt.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:p,timestamp:Date.now()},a?.sessionId):await a?.send(p)}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:n,...r}=t.params,a=Number(n),i=this._progressHandlers.get(a);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const c=this._responseHandlers.get(a),u=this._timeoutInfo.get(a);if(u&&c&&u.resetTimeoutOnProgress)try{this._resetTimeout(a)}catch(d){this._responseHandlers.delete(a),this._progressHandlers.delete(a),this._cleanupTimeout(a),c(d);return}i(r)}_onresponse(t){const n=Number(t.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),zu(t))r(t);else{const c=new Qe(t.error.code,t.error.message,t.error.data);r(c)}return}const a=this._responseHandlers.get(n);if(a===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let i=!1;if(zu(t)&&t.result&&typeof t.result=="object"){const c=t.result;if(c.task&&typeof c.task=="object"){const u=c.task;typeof u.taskId=="string"&&(i=!0,this._taskProgressTokens.set(u.taskId,n))}}if(i||this._progressHandlers.delete(n),zu(t))a(t);else{const c=Qe.fromError(t.error.code,t.error.message,t.error.data);a(c)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,n,r){const{task:a}=r??{};if(!a){try{yield{type:"result",result:await this.request(t,n,r)}}catch(c){yield{type:"error",error:c instanceof Qe?c:new Qe(rt.InternalError,String(c))}}return}let i;try{const c=await this.request(t,gd,r);if(c.task)i=c.task.taskId,yield{type:"taskCreated",task:c.task};else throw new Qe(rt.InternalError,"Task creation did not return a task");for(;;){const u=await this.getTask({taskId:i},r);if(yield{type:"taskStatus",task:u},Ei(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)}:u.status==="failed"?yield{type:"error",error:new Qe(rt.InternalError,`Task ${i} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new Qe(rt.InternalError,`Task ${i} was cancelled`)});return}if(u.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},n,r)};return}const d=u.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(f=>setTimeout(f,d)),r?.signal?.throwIfAborted()}}catch(c){yield{type:"error",error:c instanceof Qe?c:new Qe(rt.InternalError,String(c))}}}request(t,n,r){const{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c,task:u,relatedTask:d}=r??{};return new Promise((f,m)=>{const p=E=>{m(E)};if(!this._transport){p(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),u&&this.assertTaskCapability(t.method)}catch(E){p(E);return}r?.signal?.throwIfAborted();const g=this._requestMessageId++,y={...t,jsonrpc:"2.0",id:g};r?.onprogress&&(this._progressHandlers.set(g,r.onprogress),y.params={...t.params,_meta:{...t.params?._meta||{},progressToken:g}}),u&&(y.params={...y.params,task:u}),d&&(y.params={...y.params,_meta:{...y.params?._meta||{},[Oi]:d}});const w=E=>{this._responseHandlers.delete(g),this._progressHandlers.delete(g),this._cleanupTimeout(g),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:g,reason:String(E)}},{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c}).catch(O=>this._onerror(new Error(`Failed to send cancellation: ${O}`)));const T=E instanceof Qe?E:new Qe(rt.RequestTimeout,String(E));m(T)};this._responseHandlers.set(g,E=>{if(!r?.signal?.aborted){if(E instanceof Error)return m(E);try{const T=Is(n,E.result);T.success?f(T.data):m(T.error)}catch(T){m(T)}}}),r?.signal?.addEventListener("abort",()=>{w(r?.signal?.reason)});const b=r?.timeout??cJ,S=()=>w(Qe.fromError(rt.RequestTimeout,"Request timed out",{timeout:b}));this._setupTimeout(g,b,r?.maxTotalTimeout,S,r?.resetTimeoutOnProgress??!1);const R=d?.taskId;if(R){const E=T=>{const O=this._responseHandlers.get(g);O?O(T):this._onerror(new Error(`Response handler missing for side-channeled request ${g}`))};this._requestResolvers.set(g,E),this._enqueueTaskMessage(R,{type:"request",message:y,timestamp:Date.now()}).catch(T=>{this._cleanupTimeout(g),m(T)})}else this._transport.send(y,{relatedRequestId:a,resumptionToken:i,onresumptiontoken:c}).catch(E=>{this._cleanupTimeout(g),m(E)})})}async getTask(t,n){return this.request({method:"tasks/get",params:t},H1,n)}async getTaskResult(t,n,r){return this.request({method:"tasks/result",params:t},n,r)}async listTasks(t,n){return this.request({method:"tasks/list",params:t},W1,n)}async cancelTask(t,n){return this.request({method:"tasks/cancel",params:t},XQ,n)}async notification(t,n){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const r=n?.relatedTask?.taskId;if(r){const u={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Oi]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:u,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId&&!n?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let u={...t,jsonrpc:"2.0"};n?.relatedTask&&(u={...u,params:{...u.params,_meta:{...u.params?._meta||{},[Oi]:n.relatedTask}}}),this._transport?.send(u,n).catch(d=>this._onerror(d))});return}let c={...t,jsonrpc:"2.0"};n?.relatedTask&&(c={...c,params:{...c.params,_meta:{...c.params?._meta||{},[Oi]:n.relatedTask}}}),await this._transport.send(c,n)}setRequestHandler(t,n){const r=p2(t);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(a,i)=>{const c=m2(t,a);return Promise.resolve(n(c,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,n){const r=p2(t);this._notificationHandlers.set(r,a=>{const i=m2(t,a);return Promise.resolve(n(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const n=this._taskProgressTokens.get(t);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,n,r){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const a=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,n,r,a)}async _clearTaskQueue(t,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(t,n);for(const a of r)if(a.type==="request"&&Z_(a.message)){const i=a.message.id,c=this._requestResolvers.get(i);c?(c(new Qe(rt.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,n){let r=this._options?.defaultTaskPollInterval??1e3;try{const a=await this._taskStore?.getTask(t);a?.pollInterval&&(r=a.pollInterval)}catch{}return new Promise((a,i)=>{if(n.aborted){i(new Qe(rt.InvalidRequest,"Request cancelled"));return}const c=setTimeout(a,r);n.addEventListener("abort",()=>{clearTimeout(c),i(new Qe(rt.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async a=>{if(!t)throw new Error("No request provided");return await r.createTask(a,t.id,{method:t.method,params:t.params},n)},getTask:async a=>{const i=await r.getTask(a,n);if(!i)throw new Qe(rt.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(a,i,c)=>{await r.storeTaskResult(a,i,c,n);const u=await r.getTask(a,n);if(u){const d=fm.parse({method:"notifications/tasks/status",params:u});await this.notification(d),Ei(u.status)&&this._cleanupTaskProgressHandler(a)}},getTaskResult:a=>r.getTaskResult(a,n),updateTaskStatus:async(a,i,c)=>{const u=await r.getTask(a,n);if(!u)throw new Qe(rt.InvalidParams,`Task "${a}" not found - it may have been cleaned up`);if(Ei(u.status))throw new Qe(rt.InvalidParams,`Cannot update task "${a}" from terminal status "${u.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(a,i,c,n);const d=await r.getTask(a,n);if(d){const f=fm.parse({method:"notifications/tasks/status",params:d});await this.notification(f),Ei(d.status)&&this._cleanupTaskProgressHandler(a)}},listTasks:a=>r.listTasks(a,n)}}}function g2(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function uJ(e,t){const n={...e};for(const r in t){const a=r,i=t[a];if(i===void 0)continue;const c=n[a];g2(c)&&g2(i)?n[a]={...c,...i}:n[a]=i}return n}var Nh={exports:{}},L0={},ja={},Ri={},j0={},$0={},U0={},v2;function pm(){return v2||(v2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(E){if(super(),!e.IDENTIFIER.test(E))throw new Error("CodeGen: name must be a valid identifier");this.str=E}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(E){super(),this._items=typeof E=="string"?[E]:E}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const E=this._items[0];return E===""||E==='""'}get str(){var E;return(E=this._str)!==null&&E!==void 0?E:this._str=this._items.reduce((T,O)=>`${T}${O}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((T,O)=>(O instanceof n&&(T[O.str]=(T[O.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function a(R,...E){const T=[R[0]];let O=0;for(;O<E.length;)u(T,E[O]),T.push(R[++O]);return new r(T)}e._=a;const i=new r("+");function c(R,...E){const T=[y(R[0])];let O=0;for(;O<E.length;)T.push(i),u(T,E[O]),T.push(i,y(R[++O]));return d(T),new r(T)}e.str=c;function u(R,E){E instanceof r?R.push(...E._items):E instanceof n?R.push(E):R.push(p(E))}e.addCodeArg=u;function d(R){let E=1;for(;E<R.length-1;){if(R[E]===i){const T=f(R[E-1],R[E+1]);if(T!==void 0){R.splice(E-1,3,T);continue}R[E++]="+"}E++}}function f(R,E){if(E==='""')return R;if(R==='""')return E;if(typeof R=="string")return E instanceof n||R[R.length-1]!=='"'?void 0:typeof E!="string"?`${R.slice(0,-1)}${E}"`:E[0]==='"'?R.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(R instanceof n))return`"${R}${E.slice(1)}`}function m(R,E){return E.emptyStr()?R:R.emptyStr()?E:c`${R}${E}`}e.strConcat=m;function p(R){return typeof R=="number"||typeof R=="boolean"||R===null?R:y(Array.isArray(R)?R.join(","):R)}function g(R){return new r(y(R))}e.stringify=g;function y(R){return JSON.stringify(R).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function w(R){return typeof R=="string"&&e.IDENTIFIER.test(R)?new r(`.${R}`):a`[${R}]`}e.getProperty=w;function b(R){if(typeof R=="string"&&e.IDENTIFIER.test(R))return new r(`${R}`);throw new Error(`CodeGen: invalid export name: ${R}, use explicit $id name mapping`)}e.getEsmExportName=b;function S(R){return new r(R.toString())}e.regexpCode=S})(U0)),U0}var z0={},y2;function _2(){return y2||(y2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=pm();class n extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var r;(function(d){d[d.Started=0]="Started",d[d.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class a{constructor({prefixes:f,parent:m}={}){this._names={},this._prefixes=f,this._parent=m}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const m=this._names[f]||this._nameGroup(f);return`${f}${m.index++}`}_nameGroup(f){var m,p;if(!((p=(m=this._parent)===null||m===void 0?void 0:m._prefixes)===null||p===void 0)&&p.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}e.Scope=a;class i extends t.Name{constructor(f,m){super(m),this.prefix=f}setValue(f,{property:m,itemIndex:p}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(m)}[${p}]`}}e.ValueScopeName=i;const c=(0,t._)`\n`;class u extends a{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?c:t.nil}}get(){return this._scope}name(f){return new i(f,this._newName(f))}value(f,m){var p;if(m.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:y}=g,w=(p=m.key)!==null&&p!==void 0?p:m.ref;let b=this._values[y];if(b){const E=b.get(w);if(E)return E}else b=this._values[y]=new Map;b.set(w,g);const S=this._scope[y]||(this._scope[y]=[]),R=S.length;return S[R]=m.ref,g.setValue(m,{property:y,itemIndex:R}),g}getValue(f,m){const p=this._values[f];if(p)return p.get(m)}scopeRefs(f,m=this._values){return this._reduceValues(m,p=>{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${f}${p.scopePath}`})}scopeCode(f=this._values,m,p){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},m,p)}_reduceValues(f,m,p={},g){let y=t.nil;for(const w in f){const b=f[w];if(!b)continue;const S=p[w]=p[w]||new Map;b.forEach(R=>{if(S.has(R))return;S.set(R,r.Started);let E=m(R);if(E){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${T} ${R} = ${E};${this.opts._n}`}else if(E=g?.(R))y=(0,t._)`${y}${E}${this.opts._n}`;else throw new n(R);S.set(R,r.Completed)})}return y}}e.ValueScope=u})(z0)),z0}var b2;function vt(){return b2||(b2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=pm(),n=_2();var r=pm();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var a=_2();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(L,z){return this}}class c extends i{constructor(L,z,Q){super(),this.varKind=L,this.name=z,this.rhs=Q}render({es5:L,_n:z}){const Q=L?n.varKinds.var:this.varKind,me=this.rhs===void 0?"":` = ${this.rhs}`;return`${Q} ${this.name}${me};`+z}optimizeNames(L,z){if(L[this.name.str])return this.rhs&&(this.rhs=J(this.rhs,L,z)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class u extends i{constructor(L,z,Q){super(),this.lhs=L,this.rhs=z,this.sideEffects=Q}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,z){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=J(this.rhs,L,z),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return U(L,this.rhs)}}class d extends u{constructor(L,z,Q,me){super(L,Q,me),this.op=z}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class f extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class m extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class p extends i{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class g extends i{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,z){return this.code=J(this.code,L,z),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends i{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce((z,Q)=>z+Q.render(L),"")}optimizeNodes(){const{nodes:L}=this;let z=L.length;for(;z--;){const Q=L[z].optimizeNodes();Array.isArray(Q)?L.splice(z,1,...Q):Q?L[z]=Q:L.splice(z,1)}return L.length>0?this:void 0}optimizeNames(L,z){const{nodes:Q}=this;let me=Q.length;for(;me--;){const ve=Q[me];ve.optimizeNames(L,z)||(le(L,ve.names),Q.splice(me,1))}return Q.length>0?this:void 0}get names(){return this.nodes.reduce((L,z)=>G(L,z.names),{})}}class w extends y{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class b extends y{}class S extends w{}S.kind="else";class R extends w{constructor(L,z){super(z),this.condition=L}render(L){let z=`if(${this.condition})`+super.render(L);return this.else&&(z+="else "+this.else.render(L)),z}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let z=this.else;if(z){const Q=z.optimizeNodes();z=this.else=Array.isArray(Q)?new S(Q):Q}if(z)return L===!1?z instanceof R?z:z.nodes:this.nodes.length?this:new R(F(L),z instanceof R?[z]:z.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,z){var Q;if(this.else=(Q=this.else)===null||Q===void 0?void 0:Q.optimizeNames(L,z),!!(super.optimizeNames(L,z)||this.else))return this.condition=J(this.condition,L,z),this}get names(){const L=super.names;return U(L,this.condition),this.else&&G(L,this.else.names),L}}R.kind="if";class E extends w{}E.kind="for";class T extends E{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,z){if(super.optimizeNames(L,z))return this.iteration=J(this.iteration,L,z),this}get names(){return G(super.names,this.iteration.names)}}class O extends E{constructor(L,z,Q,me){super(),this.varKind=L,this.name=z,this.from=Q,this.to=me}render(L){const z=L.es5?n.varKinds.var:this.varKind,{name:Q,from:me,to:ve}=this;return`for(${z} ${Q}=${me}; ${Q}<${ve}; ${Q}++)`+super.render(L)}get names(){const L=U(super.names,this.from);return U(L,this.to)}}class C extends E{constructor(L,z,Q,me){super(),this.loop=L,this.varKind=z,this.name=Q,this.iterable=me}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,z){if(super.optimizeNames(L,z))return this.iterable=J(this.iterable,L,z),this}get names(){return G(super.names,this.iterable.names)}}class I extends w{constructor(L,z,Q){super(),this.name=L,this.args=z,this.async=Q}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}I.kind="func";class k extends y{render(L){return"return "+super.render(L)}}k.kind="return";class P extends w{render(L){let z="try"+super.render(L);return this.catch&&(z+=this.catch.render(L)),this.finally&&(z+=this.finally.render(L)),z}optimizeNodes(){var L,z;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),(z=this.finally)===null||z===void 0||z.optimizeNodes(),this}optimizeNames(L,z){var Q,me;return super.optimizeNames(L,z),(Q=this.catch)===null||Q===void 0||Q.optimizeNames(L,z),(me=this.finally)===null||me===void 0||me.optimizeNames(L,z),this}get names(){const L=super.names;return this.catch&&G(L,this.catch.names),this.finally&&G(L,this.finally.names),L}}class $ extends w{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}$.kind="catch";class W extends w{render(L){return"finally"+super.render(L)}}W.kind="finally";class V{constructor(L,z={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...z,_n:z.lines?`
156
+ `:""},this._extScope=L,this._scope=new n.Scope({parent:L}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,z){const Q=this._extScope.value(L,z);return(this._values[Q.prefix]||(this._values[Q.prefix]=new Set)).add(Q),Q}getScopeValue(L,z){return this._extScope.getValue(L,z)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,z,Q,me){const ve=this._scope.toName(z);return Q!==void 0&&me&&(this._constants[ve.str]=Q),this._leafNode(new c(L,ve,Q)),ve}const(L,z,Q){return this._def(n.varKinds.const,L,z,Q)}let(L,z,Q){return this._def(n.varKinds.let,L,z,Q)}var(L,z,Q){return this._def(n.varKinds.var,L,z,Q)}assign(L,z,Q){return this._leafNode(new u(L,z,Q))}add(L,z){return this._leafNode(new d(L,e.operators.ADD,z))}code(L){return typeof L=="function"?L():L!==t.nil&&this._leafNode(new g(L)),this}object(...L){const z=["{"];for(const[Q,me]of L)z.length>1&&z.push(","),z.push(Q),(Q!==me||this.opts.es5)&&(z.push(":"),(0,t.addCodeArg)(z,me));return z.push("}"),new t._Code(z)}if(L,z,Q){if(this._blockNode(new R(L)),z&&Q)this.code(z).else().code(Q).endIf();else if(z)this.code(z).endIf();else if(Q)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new R(L))}else(){return this._elseNode(new S)}endIf(){return this._endBlockNode(R,S)}_for(L,z){return this._blockNode(L),z&&this.code(z).endFor(),this}for(L,z){return this._for(new T(L),z)}forRange(L,z,Q,me,ve=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ce=this._scope.toName(L);return this._for(new O(ve,Ce,z,Q),()=>me(Ce))}forOf(L,z,Q,me=n.varKinds.const){const ve=this._scope.toName(L);if(this.opts.es5){const Ce=z instanceof t.Name?z:this.var("_arr",z);return this.forRange("_i",0,(0,t._)`${Ce}.length`,Ie=>{this.var(ve,(0,t._)`${Ce}[${Ie}]`),Q(ve)})}return this._for(new C("of",me,ve,z),()=>Q(ve))}forIn(L,z,Q,me=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,t._)`Object.keys(${z})`,Q);const ve=this._scope.toName(L);return this._for(new C("in",me,ve,z),()=>Q(ve))}endFor(){return this._endBlockNode(E)}label(L){return this._leafNode(new f(L))}break(L){return this._leafNode(new m(L))}return(L){const z=new k;if(this._blockNode(z),this.code(L),z.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(k)}try(L,z,Q){if(!z&&!Q)throw new Error('CodeGen: "try" without "catch" and "finally"');const me=new P;if(this._blockNode(me),this.code(L),z){const ve=this.name("e");this._currNode=me.catch=new $(ve),z(ve)}return Q&&(this._currNode=me.finally=new W,this.code(Q)),this._endBlockNode($,W)}throw(L){return this._leafNode(new p(L))}block(L,z){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock(z),this}endBlock(L){const z=this._blockStarts.pop();if(z===void 0)throw new Error("CodeGen: not in self-balancing block");const Q=this._nodes.length-z;if(Q<0||L!==void 0&&Q!==L)throw new Error(`CodeGen: wrong number of nodes: ${Q} vs ${L} expected`);return this._nodes.length=z,this}func(L,z=t.nil,Q,me){return this._blockNode(new I(L,z,Q)),me&&this.code(me).endFunc(),this}endFunc(){return this._endBlockNode(I)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,z){const Q=this._currNode;if(Q instanceof L||z&&Q instanceof z)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${z?`${L.kind}/${z.kind}`:L.kind}"`)}_elseNode(L){const z=this._currNode;if(!(z instanceof R))throw new Error('CodeGen: "else" without "if"');return this._currNode=z.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const z=this._nodes;z[z.length-1]=L}}e.CodeGen=V;function G(B,L){for(const z in L)B[z]=(B[z]||0)+(L[z]||0);return B}function U(B,L){return L instanceof t._CodeOrName?G(B,L.names):B}function J(B,L,z){if(B instanceof t.Name)return Q(B);if(!me(B))return B;return new t._Code(B._items.reduce((ve,Ce)=>(Ce instanceof t.Name&&(Ce=Q(Ce)),Ce instanceof t._Code?ve.push(...Ce._items):ve.push(Ce),ve),[]));function Q(ve){const Ce=z[ve.str];return Ce===void 0||L[ve.str]!==1?ve:(delete L[ve.str],Ce)}function me(ve){return ve instanceof t._Code&&ve._items.some(Ce=>Ce instanceof t.Name&&L[Ce.str]===1&&z[Ce.str]!==void 0)}}function le(B,L){for(const z in L)B[z]=(B[z]||0)-(L[z]||0)}function F(B){return typeof B=="boolean"||typeof B=="number"||B===null?!B:(0,t._)`!${q(B)}`}e.not=F;const Y=D(e.operators.AND);function se(...B){return B.reduce(Y)}e.and=se;const fe=D(e.operators.OR);function K(...B){return B.reduce(fe)}e.or=K;function D(B){return(L,z)=>L===t.nil?z:z===t.nil?L:(0,t._)`${q(L)} ${B} ${q(z)}`}function q(B){return B instanceof t.Name?B:(0,t._)`(${B})`}})($0)),$0}var pt={},w2;function Nt(){if(w2)return pt;w2=1,Object.defineProperty(pt,"__esModule",{value:!0}),pt.checkStrictMode=pt.getErrorPath=pt.Type=pt.useFunc=pt.setEvaluated=pt.evaluatedPropsToName=pt.mergeEvaluated=pt.eachItem=pt.unescapeJsonPointer=pt.escapeJsonPointer=pt.escapeFragment=pt.unescapeFragment=pt.schemaRefOrVal=pt.schemaHasRulesButRef=pt.schemaHasRules=pt.checkUnknownRules=pt.alwaysValidSchema=pt.toHash=void 0;const e=vt(),t=pm();function n(C){const I={};for(const k of C)I[k]=!0;return I}pt.toHash=n;function r(C,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(a(C,I),!i(I,C.self.RULES.all))}pt.alwaysValidSchema=r;function a(C,I=C.schema){const{opts:k,self:P}=C;if(!k.strictSchema||typeof I=="boolean")return;const $=P.RULES.keywords;for(const W in I)$[W]||O(C,`unknown keyword: "${W}"`)}pt.checkUnknownRules=a;function i(C,I){if(typeof C=="boolean")return!C;for(const k in C)if(I[k])return!0;return!1}pt.schemaHasRules=i;function c(C,I){if(typeof C=="boolean")return!C;for(const k in C)if(k!=="$ref"&&I.all[k])return!0;return!1}pt.schemaHasRulesButRef=c;function u({topSchemaRef:C,schemaPath:I},k,P,$){if(!$){if(typeof k=="number"||typeof k=="boolean")return k;if(typeof k=="string")return(0,e._)`${k}`}return(0,e._)`${C}${I}${(0,e.getProperty)(P)}`}pt.schemaRefOrVal=u;function d(C){return p(decodeURIComponent(C))}pt.unescapeFragment=d;function f(C){return encodeURIComponent(m(C))}pt.escapeFragment=f;function m(C){return typeof C=="number"?`${C}`:C.replace(/~/g,"~0").replace(/\//g,"~1")}pt.escapeJsonPointer=m;function p(C){return C.replace(/~1/g,"/").replace(/~0/g,"~")}pt.unescapeJsonPointer=p;function g(C,I){if(Array.isArray(C))for(const k of C)I(k);else I(C)}pt.eachItem=g;function y({mergeNames:C,mergeToName:I,mergeValues:k,resultToName:P}){return($,W,V,G)=>{const U=V===void 0?W:V instanceof e.Name?(W instanceof e.Name?C($,W,V):I($,W,V),V):W instanceof e.Name?(I($,V,W),W):k(W,V);return G===e.Name&&!(U instanceof e.Name)?P($,U):U}}pt.mergeEvaluated={props:y({mergeNames:(C,I,k)=>C.if((0,e._)`${k} !== true && ${I} !== undefined`,()=>{C.if((0,e._)`${I} === true`,()=>C.assign(k,!0),()=>C.assign(k,(0,e._)`${k} || {}`).code((0,e._)`Object.assign(${k}, ${I})`))}),mergeToName:(C,I,k)=>C.if((0,e._)`${k} !== true`,()=>{I===!0?C.assign(k,!0):(C.assign(k,(0,e._)`${k} || {}`),b(C,k,I))}),mergeValues:(C,I)=>C===!0?!0:{...C,...I},resultToName:w}),items:y({mergeNames:(C,I,k)=>C.if((0,e._)`${k} !== true && ${I} !== undefined`,()=>C.assign(k,(0,e._)`${I} === true ? true : ${k} > ${I} ? ${k} : ${I}`)),mergeToName:(C,I,k)=>C.if((0,e._)`${k} !== true`,()=>C.assign(k,I===!0?!0:(0,e._)`${k} > ${I} ? ${k} : ${I}`)),mergeValues:(C,I)=>C===!0?!0:Math.max(C,I),resultToName:(C,I)=>C.var("items",I)})};function w(C,I){if(I===!0)return C.var("props",!0);const k=C.var("props",(0,e._)`{}`);return I!==void 0&&b(C,k,I),k}pt.evaluatedPropsToName=w;function b(C,I,k){Object.keys(k).forEach(P=>C.assign((0,e._)`${I}${(0,e.getProperty)(P)}`,!0))}pt.setEvaluated=b;const S={};function R(C,I){return C.scopeValue("func",{ref:I,code:S[I.code]||(S[I.code]=new t._Code(I.code))})}pt.useFunc=R;var E;(function(C){C[C.Num=0]="Num",C[C.Str=1]="Str"})(E||(pt.Type=E={}));function T(C,I,k){if(C instanceof e.Name){const P=I===E.Num;return k?P?(0,e._)`"[" + ${C} + "]"`:(0,e._)`"['" + ${C} + "']"`:P?(0,e._)`"/" + ${C}`:(0,e._)`"/" + ${C}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return k?(0,e.getProperty)(C).toString():"/"+m(C)}pt.getErrorPath=T;function O(C,I,k=C.opts.strictSchema){if(k){if(I=`strict mode: ${I}`,k===!0)throw new Error(I);C.self.logger.warn(I)}}return pt.checkStrictMode=O,pt}var Mh={},S2;function ei(){if(S2)return Mh;S2=1,Object.defineProperty(Mh,"__esModule",{value:!0});const e=vt(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Mh.default=t,Mh}var E2;function cg(){return E2||(E2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=vt(),n=Nt(),r=ei();e.keywordError={message:({keyword:S})=>(0,t.str)`must pass "${S}" keyword validation`},e.keyword$DataError={message:({keyword:S,schemaType:R})=>R?(0,t.str)`"${S}" keyword must be ${R} ($data)`:(0,t.str)`"${S}" keyword is invalid ($data)`};function a(S,R=e.keywordError,E,T){const{it:O}=S,{gen:C,compositeRule:I,allErrors:k}=O,P=p(S,R,E);T??(I||k)?d(C,P):f(O,(0,t._)`[${P}]`)}e.reportError=a;function i(S,R=e.keywordError,E){const{it:T}=S,{gen:O,compositeRule:C,allErrors:I}=T,k=p(S,R,E);d(O,k),C||I||f(T,r.default.vErrors)}e.reportExtraError=i;function c(S,R){S.assign(r.default.errors,R),S.if((0,t._)`${r.default.vErrors} !== null`,()=>S.if(R,()=>S.assign((0,t._)`${r.default.vErrors}.length`,R),()=>S.assign(r.default.vErrors,null)))}e.resetErrorsCount=c;function u({gen:S,keyword:R,schemaValue:E,data:T,errsCount:O,it:C}){if(O===void 0)throw new Error("ajv implementation error");const I=S.name("err");S.forRange("i",O,r.default.errors,k=>{S.const(I,(0,t._)`${r.default.vErrors}[${k}]`),S.if((0,t._)`${I}.instancePath === undefined`,()=>S.assign((0,t._)`${I}.instancePath`,(0,t.strConcat)(r.default.instancePath,C.errorPath))),S.assign((0,t._)`${I}.schemaPath`,(0,t.str)`${C.errSchemaPath}/${R}`),C.opts.verbose&&(S.assign((0,t._)`${I}.schema`,E),S.assign((0,t._)`${I}.data`,T))})}e.extendErrors=u;function d(S,R){const E=S.const("err",R);S.if((0,t._)`${r.default.vErrors} === null`,()=>S.assign(r.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${r.default.vErrors}.push(${E})`),S.code((0,t._)`${r.default.errors}++`)}function f(S,R){const{gen:E,validateName:T,schemaEnv:O}=S;O.$async?E.throw((0,t._)`new ${S.ValidationError}(${R})`):(E.assign((0,t._)`${T}.errors`,R),E.return(!1))}const m={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(S,R,E){const{createErrors:T}=S.it;return T===!1?(0,t._)`{}`:g(S,R,E)}function g(S,R,E={}){const{gen:T,it:O}=S,C=[y(O,E),w(S,E)];return b(S,R,C),T.object(...C)}function y({errorPath:S},{instancePath:R}){const E=R?(0,t.str)`${S}${(0,n.getErrorPath)(R,n.Type.Str)}`:S;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,E)]}function w({keyword:S,it:{errSchemaPath:R}},{schemaPath:E,parentSchema:T}){let O=T?R:(0,t.str)`${R}/${S}`;return E&&(O=(0,t.str)`${O}${(0,n.getErrorPath)(E,n.Type.Str)}`),[m.schemaPath,O]}function b(S,{params:R,message:E},T){const{keyword:O,data:C,schemaValue:I,it:k}=S,{opts:P,propertyName:$,topSchemaRef:W,schemaPath:V}=k;T.push([m.keyword,O],[m.params,typeof R=="function"?R(S):R||(0,t._)`{}`]),P.messages&&T.push([m.message,typeof E=="function"?E(S):E]),P.verbose&&T.push([m.schema,I],[m.parentSchema,(0,t._)`${W}${V}`],[r.default.data,C]),$&&T.push([m.propertyName,$])}})(j0)),j0}var R2;function dJ(){if(R2)return Ri;R2=1,Object.defineProperty(Ri,"__esModule",{value:!0}),Ri.boolOrEmptySchema=Ri.topBoolOrEmptySchema=void 0;const e=cg(),t=vt(),n=ei(),r={message:"boolean schema is false"};function a(u){const{gen:d,schema:f,validateName:m}=u;f===!1?c(u,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${m}.errors`,null),d.return(!0))}Ri.topBoolOrEmptySchema=a;function i(u,d){const{gen:f,schema:m}=u;m===!1?(f.var(d,!1),c(u)):f.var(d,!0)}Ri.boolOrEmptySchema=i;function c(u,d){const{gen:f,data:m}=u,p={gen:f,keyword:"false schema",data:m,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:u};(0,e.reportError)(p,r,void 0,d)}return Ri}var rr={},xi={},x2;function AP(){if(x2)return xi;x2=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.getRules=xi.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(a){return typeof a=="string"&&t.has(a)}xi.isJSONType=n;function r(){const a={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...a,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},a.number,a.string,a.array,a.object],post:{rules:[]},all:{},keywords:{}}}return xi.getRules=r,xi}var $a={},T2;function IP(){if(T2)return $a;T2=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.shouldUseRule=$a.shouldUseGroup=$a.schemaHasRulesForType=void 0;function e({schema:r,self:a},i){const c=a.RULES.types[i];return c&&c!==!0&&t(r,c)}$a.schemaHasRulesForType=e;function t(r,a){return a.rules.some(i=>n(r,i))}$a.shouldUseGroup=t;function n(r,a){var i;return r[a.keyword]!==void 0||((i=a.definition.implements)===null||i===void 0?void 0:i.some(c=>r[c]!==void 0))}return $a.shouldUseRule=n,$a}var O2;function mm(){if(O2)return rr;O2=1,Object.defineProperty(rr,"__esModule",{value:!0}),rr.reportTypeError=rr.checkDataTypes=rr.checkDataType=rr.coerceAndCheckDataType=rr.getJSONTypes=rr.getSchemaTypes=rr.DataType=void 0;const e=AP(),t=IP(),n=cg(),r=vt(),a=Nt();var i;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(i||(rr.DataType=i={}));function c(E){const T=u(E.type);if(T.includes("null")){if(E.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!T.length&&E.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');E.nullable===!0&&T.push("null")}return T}rr.getSchemaTypes=c;function u(E){const T=Array.isArray(E)?E:E?[E]:[];if(T.every(e.isJSONType))return T;throw new Error("type must be JSONType or JSONType[]: "+T.join(","))}rr.getJSONTypes=u;function d(E,T){const{gen:O,data:C,opts:I}=E,k=m(T,I.coerceTypes),P=T.length>0&&!(k.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(E,T[0]));if(P){const $=w(T,C,I.strictNumbers,i.Wrong);O.if($,()=>{k.length?p(E,T,k):S(E)})}return P}rr.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function m(E,T){return T?E.filter(O=>f.has(O)||T==="array"&&O==="array"):[]}function p(E,T,O){const{gen:C,data:I,opts:k}=E,P=C.let("dataType",(0,r._)`typeof ${I}`),$=C.let("coerced",(0,r._)`undefined`);k.coerceTypes==="array"&&C.if((0,r._)`${P} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>C.assign(I,(0,r._)`${I}[0]`).assign(P,(0,r._)`typeof ${I}`).if(w(T,I,k.strictNumbers),()=>C.assign($,I))),C.if((0,r._)`${$} !== undefined`);for(const V of O)(f.has(V)||V==="array"&&k.coerceTypes==="array")&&W(V);C.else(),S(E),C.endIf(),C.if((0,r._)`${$} !== undefined`,()=>{C.assign(I,$),g(E,$)});function W(V){switch(V){case"string":C.elseIf((0,r._)`${P} == "number" || ${P} == "boolean"`).assign($,(0,r._)`"" + ${I}`).elseIf((0,r._)`${I} === null`).assign($,(0,r._)`""`);return;case"number":C.elseIf((0,r._)`${P} == "boolean" || ${I} === null
157
+ || (${P} == "string" && ${I} && ${I} == +${I})`).assign($,(0,r._)`+${I}`);return;case"integer":C.elseIf((0,r._)`${P} === "boolean" || ${I} === null
158
+ || (${P} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign($,(0,r._)`+${I}`);return;case"boolean":C.elseIf((0,r._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign($,!1).elseIf((0,r._)`${I} === "true" || ${I} === 1`).assign($,!0);return;case"null":C.elseIf((0,r._)`${I} === "" || ${I} === 0 || ${I} === false`),C.assign($,null);return;case"array":C.elseIf((0,r._)`${P} === "string" || ${P} === "number"
159
+ || ${P} === "boolean" || ${I} === null`).assign($,(0,r._)`[${I}]`)}}}function g({gen:E,parentData:T,parentDataProperty:O},C){E.if((0,r._)`${T} !== undefined`,()=>E.assign((0,r._)`${T}[${O}]`,C))}function y(E,T,O,C=i.Correct){const I=C===i.Correct?r.operators.EQ:r.operators.NEQ;let k;switch(E){case"null":return(0,r._)`${T} ${I} null`;case"array":k=(0,r._)`Array.isArray(${T})`;break;case"object":k=(0,r._)`${T} && typeof ${T} == "object" && !Array.isArray(${T})`;break;case"integer":k=P((0,r._)`!(${T} % 1) && !isNaN(${T})`);break;case"number":k=P();break;default:return(0,r._)`typeof ${T} ${I} ${E}`}return C===i.Correct?k:(0,r.not)(k);function P($=r.nil){return(0,r.and)((0,r._)`typeof ${T} == "number"`,$,O?(0,r._)`isFinite(${T})`:r.nil)}}rr.checkDataType=y;function w(E,T,O,C){if(E.length===1)return y(E[0],T,O,C);let I;const k=(0,a.toHash)(E);if(k.array&&k.object){const P=(0,r._)`typeof ${T} != "object"`;I=k.null?P:(0,r._)`!${T} || ${P}`,delete k.null,delete k.array,delete k.object}else I=r.nil;k.number&&delete k.integer;for(const P in k)I=(0,r.and)(I,y(P,T,O,C));return I}rr.checkDataTypes=w;const b={message:({schema:E})=>`must be ${E}`,params:({schema:E,schemaValue:T})=>typeof E=="string"?(0,r._)`{type: ${E}}`:(0,r._)`{type: ${T}}`};function S(E){const T=R(E);(0,n.reportError)(T,b)}rr.reportTypeError=S;function R(E){const{gen:T,data:O,schema:C}=E,I=(0,a.schemaRefOrVal)(E,C,"type");return{gen:T,keyword:"type",data:O,schema:C.type,schemaCode:I,schemaValue:I,parentSchema:C,params:{},it:E}}return rr}var Nu={},C2;function fJ(){if(C2)return Nu;C2=1,Object.defineProperty(Nu,"__esModule",{value:!0}),Nu.assignDefaults=void 0;const e=vt(),t=Nt();function n(a,i){const{properties:c,items:u}=a.schema;if(i==="object"&&c)for(const d in c)r(a,d,c[d].default);else i==="array"&&Array.isArray(u)&&u.forEach((d,f)=>r(a,f,d.default))}Nu.assignDefaults=n;function r(a,i,c){const{gen:u,compositeRule:d,data:f,opts:m}=a;if(c===void 0)return;const p=(0,e._)`${f}${(0,e.getProperty)(i)}`;if(d){(0,t.checkStrictMode)(a,`default is ignored for: ${p}`);return}let g=(0,e._)`${p} === undefined`;m.useDefaults==="empty"&&(g=(0,e._)`${g} || ${p} === null || ${p} === ""`),u.if(g,(0,e._)`${p} = ${(0,e.stringify)(c)}`)}return Nu}var Lo={},Ht={},A2;function Yo(){if(A2)return Ht;A2=1,Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.validateUnion=Ht.validateArray=Ht.usePattern=Ht.callValidateCode=Ht.schemaProperties=Ht.allSchemaProperties=Ht.noPropertyInData=Ht.propertyInData=Ht.isOwnProperty=Ht.hasPropFunc=Ht.reportMissingProp=Ht.checkMissingProp=Ht.checkReportMissingProp=void 0;const e=vt(),t=Nt(),n=ei(),r=Nt();function a(E,T){const{gen:O,data:C,it:I}=E;O.if(m(O,C,T,I.opts.ownProperties),()=>{E.setParams({missingProperty:(0,e._)`${T}`},!0),E.error()})}Ht.checkReportMissingProp=a;function i({gen:E,data:T,it:{opts:O}},C,I){return(0,e.or)(...C.map(k=>(0,e.and)(m(E,T,k,O.ownProperties),(0,e._)`${I} = ${k}`)))}Ht.checkMissingProp=i;function c(E,T){E.setParams({missingProperty:T},!0),E.error()}Ht.reportMissingProp=c;function u(E){return E.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Ht.hasPropFunc=u;function d(E,T,O){return(0,e._)`${u(E)}.call(${T}, ${O})`}Ht.isOwnProperty=d;function f(E,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} !== undefined`;return C?(0,e._)`${I} && ${d(E,T,O)}`:I}Ht.propertyInData=f;function m(E,T,O,C){const I=(0,e._)`${T}${(0,e.getProperty)(O)} === undefined`;return C?(0,e.or)(I,(0,e.not)(d(E,T,O))):I}Ht.noPropertyInData=m;function p(E){return E?Object.keys(E).filter(T=>T!=="__proto__"):[]}Ht.allSchemaProperties=p;function g(E,T){return p(T).filter(O=>!(0,t.alwaysValidSchema)(E,T[O]))}Ht.schemaProperties=g;function y({schemaCode:E,data:T,it:{gen:O,topSchemaRef:C,schemaPath:I,errorPath:k},it:P},$,W,V){const G=V?(0,e._)`${E}, ${T}, ${C}${I}`:T,U=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,k)],[n.default.parentData,P.parentData],[n.default.parentDataProperty,P.parentDataProperty],[n.default.rootData,n.default.rootData]];P.opts.dynamicRef&&U.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const J=(0,e._)`${G}, ${O.object(...U)}`;return W!==e.nil?(0,e._)`${$}.call(${W}, ${J})`:(0,e._)`${$}(${J})`}Ht.callValidateCode=y;const w=(0,e._)`new RegExp`;function b({gen:E,it:{opts:T}},O){const C=T.unicodeRegExp?"u":"",{regExp:I}=T.code,k=I(O,C);return E.scopeValue("pattern",{key:k.toString(),ref:k,code:(0,e._)`${I.code==="new RegExp"?w:(0,r.useFunc)(E,I)}(${O}, ${C})`})}Ht.usePattern=b;function S(E){const{gen:T,data:O,keyword:C,it:I}=E,k=T.name("valid");if(I.allErrors){const $=T.let("valid",!0);return P(()=>T.assign($,!1)),$}return T.var(k,!0),P(()=>T.break()),k;function P($){const W=T.const("len",(0,e._)`${O}.length`);T.forRange("i",0,W,V=>{E.subschema({keyword:C,dataProp:V,dataPropType:t.Type.Num},k),T.if((0,e.not)(k),$)})}}Ht.validateArray=S;function R(E){const{gen:T,schema:O,keyword:C,it:I}=E;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(W=>(0,t.alwaysValidSchema)(I,W))&&!I.opts.unevaluated)return;const P=T.let("valid",!1),$=T.name("_valid");T.block(()=>O.forEach((W,V)=>{const G=E.subschema({keyword:C,schemaProp:V,compositeRule:!0},$);T.assign(P,(0,e._)`${P} || ${$}`),E.mergeValidEvaluated(G,$)||T.if((0,e.not)(P))})),E.result(P,()=>E.reset(),()=>E.error(!0))}return Ht.validateUnion=R,Ht}var I2;function hJ(){if(I2)return Lo;I2=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.validateKeywordUsage=Lo.validSchemaType=Lo.funcKeywordCode=Lo.macroKeywordCode=void 0;const e=vt(),t=ei(),n=Yo(),r=cg();function a(g,y){const{gen:w,keyword:b,schema:S,parentSchema:R,it:E}=g,T=y.macro.call(E.self,S,R,E),O=f(w,b,T);E.opts.validateSchema!==!1&&E.self.validateSchema(T,!0);const C=w.name("valid");g.subschema({schema:T,schemaPath:e.nil,errSchemaPath:`${E.errSchemaPath}/${b}`,topSchemaRef:O,compositeRule:!0},C),g.pass(C,()=>g.error(!0))}Lo.macroKeywordCode=a;function i(g,y){var w;const{gen:b,keyword:S,schema:R,parentSchema:E,$data:T,it:O}=g;d(O,y);const C=!T&&y.compile?y.compile.call(O.self,R,E,O):y.validate,I=f(b,S,C),k=b.let("valid");g.block$data(k,P),g.ok((w=y.valid)!==null&&w!==void 0?w:k);function P(){if(y.errors===!1)V(),y.modifying&&c(g),G(()=>g.error());else{const U=y.async?$():W();y.modifying&&c(g),G(()=>u(g,U))}}function $(){const U=b.let("ruleErrs",null);return b.try(()=>V((0,e._)`await `),J=>b.assign(k,!1).if((0,e._)`${J} instanceof ${O.ValidationError}`,()=>b.assign(U,(0,e._)`${J}.errors`),()=>b.throw(J))),U}function W(){const U=(0,e._)`${I}.errors`;return b.assign(U,null),V(e.nil),U}function V(U=y.async?(0,e._)`await `:e.nil){const J=O.opts.passContext?t.default.this:t.default.self,le=!("compile"in y&&!T||y.schema===!1);b.assign(k,(0,e._)`${U}${(0,n.callValidateCode)(g,I,J,le)}`,y.modifying)}function G(U){var J;b.if((0,e.not)((J=y.valid)!==null&&J!==void 0?J:k),U)}}Lo.funcKeywordCode=i;function c(g){const{gen:y,data:w,it:b}=g;y.if(b.parentData,()=>y.assign(w,(0,e._)`${b.parentData}[${b.parentDataProperty}]`))}function u(g,y){const{gen:w}=g;w.if((0,e._)`Array.isArray(${y})`,()=>{w.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${y} : ${t.default.vErrors}.concat(${y})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(g)},()=>g.error())}function d({schemaEnv:g},y){if(y.async&&!g.$async)throw new Error("async keyword in sync schema")}function f(g,y,w){if(w===void 0)throw new Error(`keyword "${y}" failed to compile`);return g.scopeValue("keyword",typeof w=="function"?{ref:w}:{ref:w,code:(0,e.stringify)(w)})}function m(g,y,w=!1){return!y.length||y.some(b=>b==="array"?Array.isArray(g):b==="object"?g&&typeof g=="object"&&!Array.isArray(g):typeof g==b||w&&typeof g>"u")}Lo.validSchemaType=m;function p({schema:g,opts:y,self:w,errSchemaPath:b},S,R){if(Array.isArray(S.keyword)?!S.keyword.includes(R):S.keyword!==R)throw new Error("ajv implementation error");const E=S.dependencies;if(E?.some(T=>!Object.prototype.hasOwnProperty.call(g,T)))throw new Error(`parent schema must have dependencies of ${R}: ${E.join(",")}`);if(S.validateSchema&&!S.validateSchema(g[R])){const O=`keyword "${R}" value is invalid at path "${b}": `+w.errorsText(S.validateSchema.errors);if(y.validateSchema==="log")w.logger.error(O);else throw new Error(O)}}return Lo.validateKeywordUsage=p,Lo}var Ua={},k2;function pJ(){if(k2)return Ua;k2=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.extendSubschemaMode=Ua.extendSubschemaData=Ua.getSubschema=void 0;const e=vt(),t=Nt();function n(i,{keyword:c,schemaProp:u,schema:d,schemaPath:f,errSchemaPath:m,topSchemaRef:p}){if(c!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(c!==void 0){const g=i.schema[c];return u===void 0?{schema:g,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${c}`}:{schema:g[u],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(c)}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${c}/${(0,t.escapeFragment)(u)}`}}if(d!==void 0){if(f===void 0||m===void 0||p===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:f,topSchemaRef:p,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}Ua.getSubschema=n;function r(i,c,{dataProp:u,dataPropType:d,data:f,dataTypes:m,propertyName:p}){if(f!==void 0&&u!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:g}=c;if(u!==void 0){const{errorPath:w,dataPathArr:b,opts:S}=c,R=g.let("data",(0,e._)`${c.data}${(0,e.getProperty)(u)}`,!0);y(R),i.errorPath=(0,e.str)`${w}${(0,t.getErrorPath)(u,d,S.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${u}`,i.dataPathArr=[...b,i.parentDataProperty]}if(f!==void 0){const w=f instanceof e.Name?f:g.let("data",f,!0);y(w),p!==void 0&&(i.propertyName=p)}m&&(i.dataTypes=m);function y(w){i.data=w,i.dataLevel=c.dataLevel+1,i.dataTypes=[],c.definedProperties=new Set,i.parentData=c.data,i.dataNames=[...c.dataNames,w]}}Ua.extendSubschemaData=r;function a(i,{jtdDiscriminator:c,jtdMetadata:u,compositeRule:d,createErrors:f,allErrors:m}){d!==void 0&&(i.compositeRule=d),f!==void 0&&(i.createErrors=f),m!==void 0&&(i.allErrors=m),i.jtdDiscriminator=c,i.jtdMetadata=u}return Ua.extendSubschemaMode=a,Ua}var br={},V0,N2;function kP(){return N2||(N2=1,V0=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(a=r;a--!==0;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(a=r;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;a--!==0;){var c=i[a];if(!e(t[c],n[c]))return!1}return!0}return t!==t&&n!==n}),V0}var F0={exports:{}},M2;function mJ(){if(M2)return F0.exports;M2=1;var e=F0.exports=function(r,a,i){typeof a=="function"&&(i=a,a={}),i=a.cb||i;var c=typeof i=="function"?i:i.pre||function(){},u=i.post||function(){};t(a,c,u,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,a,i,c,u,d,f,m,p,g){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,d,f,m,p,g);for(var y in c){var w=c[y];if(Array.isArray(w)){if(y in e.arrayKeywords)for(var b=0;b<w.length;b++)t(r,a,i,w[b],u+"/"+y+"/"+b,d,u,y,c,b)}else if(y in e.propsKeywords){if(w&&typeof w=="object")for(var S in w)t(r,a,i,w[S],u+"/"+y+"/"+n(S),d,u,y,c,S)}else(y in e.keywords||r.allKeys&&!(y in e.skipKeywords))&&t(r,a,i,w,u+"/"+y,d,u,y,c)}i(c,u,d,f,m,p,g)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return F0.exports}var P2;function lg(){if(P2)return br;P2=1,Object.defineProperty(br,"__esModule",{value:!0}),br.getSchemaRefs=br.resolveUrl=br.normalizeId=br._getFullPath=br.getFullPath=br.inlineRef=void 0;const e=Nt(),t=kP(),n=mJ(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function a(b,S=!0){return typeof b=="boolean"?!0:S===!0?!c(b):S?u(b)<=S:!1}br.inlineRef=a;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(b){for(const S in b){if(i.has(S))return!0;const R=b[S];if(Array.isArray(R)&&R.some(c)||typeof R=="object"&&c(R))return!0}return!1}function u(b){let S=0;for(const R in b){if(R==="$ref")return 1/0;if(S++,!r.has(R)&&(typeof b[R]=="object"&&(0,e.eachItem)(b[R],E=>S+=u(E)),S===1/0))return 1/0}return S}function d(b,S="",R){R!==!1&&(S=p(S));const E=b.parse(S);return f(b,E)}br.getFullPath=d;function f(b,S){return b.serialize(S).split("#")[0]+"#"}br._getFullPath=f;const m=/#\/?$/;function p(b){return b?b.replace(m,""):""}br.normalizeId=p;function g(b,S,R){return R=p(R),b.resolve(S,R)}br.resolveUrl=g;const y=/^[a-z_][-a-z0-9._]*$/i;function w(b,S){if(typeof b=="boolean")return{};const{schemaId:R,uriResolver:E}=this.opts,T=p(b[R]||S),O={"":T},C=d(E,T,!1),I={},k=new Set;return n(b,{allKeys:!0},(W,V,G,U)=>{if(U===void 0)return;const J=C+V;let le=O[U];typeof W[R]=="string"&&(le=F.call(this,W[R])),Y.call(this,W.$anchor),Y.call(this,W.$dynamicAnchor),O[V]=le;function F(se){const fe=this.opts.uriResolver.resolve;if(se=p(le?fe(le,se):se),k.has(se))throw $(se);k.add(se);let K=this.refs[se];return typeof K=="string"&&(K=this.refs[K]),typeof K=="object"?P(W,K.schema,se):se!==p(J)&&(se[0]==="#"?(P(W,I[se],se),I[se]=W):this.refs[se]=J),se}function Y(se){if(typeof se=="string"){if(!y.test(se))throw new Error(`invalid anchor "${se}"`);F.call(this,`#${se}`)}}}),I;function P(W,V,G){if(V!==void 0&&!t(W,V))throw $(G)}function $(W){return new Error(`reference "${W}" resolves to more than one schema`)}}return br.getSchemaRefs=w,br}var D2;function ug(){if(D2)return ja;D2=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.getData=ja.KeywordCxt=ja.validateFunctionCode=void 0;const e=dJ(),t=mm(),n=IP(),r=mm(),a=fJ(),i=hJ(),c=pJ(),u=vt(),d=ei(),f=lg(),m=Nt(),p=cg();function g(H){if(C(H)&&(k(H),O(H))){S(H);return}y(H,()=>(0,e.topBoolOrEmptySchema)(H))}ja.validateFunctionCode=g;function y({gen:H,validateName:re,schema:_e,schemaEnv:ae,opts:ue},Oe){ue.code.es5?H.func(re,(0,u._)`${d.default.data}, ${d.default.valCxt}`,ae.$async,()=>{H.code((0,u._)`"use strict"; ${E(_e,ue)}`),b(H,ue),H.code(Oe)}):H.func(re,(0,u._)`${d.default.data}, ${w(ue)}`,ae.$async,()=>H.code(E(_e,ue)).code(Oe))}function w(H){return(0,u._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${H.dynamicRef?(0,u._)`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}function b(H,re){H.if(d.default.valCxt,()=>{H.var(d.default.instancePath,(0,u._)`${d.default.valCxt}.${d.default.instancePath}`),H.var(d.default.parentData,(0,u._)`${d.default.valCxt}.${d.default.parentData}`),H.var(d.default.parentDataProperty,(0,u._)`${d.default.valCxt}.${d.default.parentDataProperty}`),H.var(d.default.rootData,(0,u._)`${d.default.valCxt}.${d.default.rootData}`),re.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{H.var(d.default.instancePath,(0,u._)`""`),H.var(d.default.parentData,(0,u._)`undefined`),H.var(d.default.parentDataProperty,(0,u._)`undefined`),H.var(d.default.rootData,d.default.data),re.dynamicRef&&H.var(d.default.dynamicAnchors,(0,u._)`{}`)})}function S(H){const{schema:re,opts:_e,gen:ae}=H;y(H,()=>{_e.$comment&&re.$comment&&U(H),W(H),ae.let(d.default.vErrors,null),ae.let(d.default.errors,0),_e.unevaluated&&R(H),P(H),J(H)})}function R(H){const{gen:re,validateName:_e}=H;H.evaluated=re.const("evaluated",(0,u._)`${_e}.evaluated`),re.if((0,u._)`${H.evaluated}.dynamicProps`,()=>re.assign((0,u._)`${H.evaluated}.props`,(0,u._)`undefined`)),re.if((0,u._)`${H.evaluated}.dynamicItems`,()=>re.assign((0,u._)`${H.evaluated}.items`,(0,u._)`undefined`))}function E(H,re){const _e=typeof H=="object"&&H[re.schemaId];return _e&&(re.code.source||re.code.process)?(0,u._)`/*# sourceURL=${_e} */`:u.nil}function T(H,re){if(C(H)&&(k(H),O(H))){I(H,re);return}(0,e.boolOrEmptySchema)(H,re)}function O({schema:H,self:re}){if(typeof H=="boolean")return!H;for(const _e in H)if(re.RULES.all[_e])return!0;return!1}function C(H){return typeof H.schema!="boolean"}function I(H,re){const{schema:_e,gen:ae,opts:ue}=H;ue.$comment&&_e.$comment&&U(H),V(H),G(H);const Oe=ae.const("_errs",d.default.errors);P(H,Oe),ae.var(re,(0,u._)`${Oe} === ${d.default.errors}`)}function k(H){(0,m.checkUnknownRules)(H),$(H)}function P(H,re){if(H.opts.jtd)return F(H,[],!1,re);const _e=(0,t.getSchemaTypes)(H.schema),ae=(0,t.coerceAndCheckDataType)(H,_e);F(H,_e,!ae,re)}function $(H){const{schema:re,errSchemaPath:_e,opts:ae,self:ue}=H;re.$ref&&ae.ignoreKeywordsWithRef&&(0,m.schemaHasRulesButRef)(re,ue.RULES)&&ue.logger.warn(`$ref: keywords ignored in schema at path "${_e}"`)}function W(H){const{schema:re,opts:_e}=H;re.default!==void 0&&_e.useDefaults&&_e.strictSchema&&(0,m.checkStrictMode)(H,"default is ignored in the schema root")}function V(H){const re=H.schema[H.opts.schemaId];re&&(H.baseId=(0,f.resolveUrl)(H.opts.uriResolver,H.baseId,re))}function G(H){if(H.schema.$async&&!H.schemaEnv.$async)throw new Error("async schema in sync schema")}function U({gen:H,schemaEnv:re,schema:_e,errSchemaPath:ae,opts:ue}){const Oe=_e.$comment;if(ue.$comment===!0)H.code((0,u._)`${d.default.self}.logger.log(${Oe})`);else if(typeof ue.$comment=="function"){const Pe=(0,u.str)`${ae}/$comment`,Je=H.scopeValue("root",{ref:re.root});H.code((0,u._)`${d.default.self}.opts.$comment(${Oe}, ${Pe}, ${Je}.schema)`)}}function J(H){const{gen:re,schemaEnv:_e,validateName:ae,ValidationError:ue,opts:Oe}=H;_e.$async?re.if((0,u._)`${d.default.errors} === 0`,()=>re.return(d.default.data),()=>re.throw((0,u._)`new ${ue}(${d.default.vErrors})`)):(re.assign((0,u._)`${ae}.errors`,d.default.vErrors),Oe.unevaluated&&le(H),re.return((0,u._)`${d.default.errors} === 0`))}function le({gen:H,evaluated:re,props:_e,items:ae}){_e instanceof u.Name&&H.assign((0,u._)`${re}.props`,_e),ae instanceof u.Name&&H.assign((0,u._)`${re}.items`,ae)}function F(H,re,_e,ae){const{gen:ue,schema:Oe,data:Pe,allErrors:Je,opts:Be,self:Ke}=H,{RULES:Z}=Ke;if(Oe.$ref&&(Be.ignoreKeywordsWithRef||!(0,m.schemaHasRulesButRef)(Oe,Z))){ue.block(()=>me(H,"$ref",Z.all.$ref.definition));return}Be.jtd||se(H,re),ue.block(()=>{for(const oe of Z.rules)te(oe);te(Z.post)});function te(oe){(0,n.shouldUseGroup)(Oe,oe)&&(oe.type?(ue.if((0,r.checkDataType)(oe.type,Pe,Be.strictNumbers)),Y(H,oe),re.length===1&&re[0]===oe.type&&_e&&(ue.else(),(0,r.reportTypeError)(H)),ue.endIf()):Y(H,oe),Je||ue.if((0,u._)`${d.default.errors} === ${ae||0}`))}}function Y(H,re){const{gen:_e,schema:ae,opts:{useDefaults:ue}}=H;ue&&(0,a.assignDefaults)(H,re.type),_e.block(()=>{for(const Oe of re.rules)(0,n.shouldUseRule)(ae,Oe)&&me(H,Oe.keyword,Oe.definition,re.type)})}function se(H,re){H.schemaEnv.meta||!H.opts.strictTypes||(fe(H,re),H.opts.allowUnionTypes||K(H,re),D(H,H.dataTypes))}function fe(H,re){if(re.length){if(!H.dataTypes.length){H.dataTypes=re;return}re.forEach(_e=>{B(H.dataTypes,_e)||z(H,`type "${_e}" not allowed by context "${H.dataTypes.join(",")}"`)}),L(H,re)}}function K(H,re){re.length>1&&!(re.length===2&&re.includes("null"))&&z(H,"use allowUnionTypes to allow union type keyword")}function D(H,re){const _e=H.self.RULES.all;for(const ae in _e){const ue=_e[ae];if(typeof ue=="object"&&(0,n.shouldUseRule)(H.schema,ue)){const{type:Oe}=ue.definition;Oe.length&&!Oe.some(Pe=>q(re,Pe))&&z(H,`missing type "${Oe.join(",")}" for keyword "${ae}"`)}}}function q(H,re){return H.includes(re)||re==="number"&&H.includes("integer")}function B(H,re){return H.includes(re)||re==="integer"&&H.includes("number")}function L(H,re){const _e=[];for(const ae of H.dataTypes)B(re,ae)?_e.push(ae):re.includes("integer")&&ae==="number"&&_e.push("integer");H.dataTypes=_e}function z(H,re){const _e=H.schemaEnv.baseId+H.errSchemaPath;re+=` at "${_e}" (strictTypes)`,(0,m.checkStrictMode)(H,re,H.opts.strictTypes)}class Q{constructor(re,_e,ae){if((0,i.validateKeywordUsage)(re,_e,ae),this.gen=re.gen,this.allErrors=re.allErrors,this.keyword=ae,this.data=re.data,this.schema=re.schema[ae],this.$data=_e.$data&&re.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,m.schemaRefOrVal)(re,this.schema,ae,this.$data),this.schemaType=_e.schemaType,this.parentSchema=re.schema,this.params={},this.it=re,this.def=_e,this.$data)this.schemaCode=re.gen.const("vSchema",Ie(this.$data,re));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,_e.schemaType,_e.allowUndefined))throw new Error(`${ae} value must be ${JSON.stringify(_e.schemaType)}`);("code"in _e?_e.trackErrors:_e.errors!==!1)&&(this.errsCount=re.gen.const("_errs",d.default.errors))}result(re,_e,ae){this.failResult((0,u.not)(re),_e,ae)}failResult(re,_e,ae){this.gen.if(re),ae?ae():this.error(),_e?(this.gen.else(),_e(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(re,_e){this.failResult((0,u.not)(re),void 0,_e)}fail(re){if(re===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(re),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(re){if(!this.$data)return this.fail(re);const{schemaCode:_e}=this;this.fail((0,u._)`${_e} !== undefined && (${(0,u.or)(this.invalid$data(),re)})`)}error(re,_e,ae){if(_e){this.setParams(_e),this._error(re,ae),this.setParams({});return}this._error(re,ae)}_error(re,_e){(re?p.reportExtraError:p.reportError)(this,this.def.error,_e)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(re){this.allErrors||this.gen.if(re)}setParams(re,_e){_e?Object.assign(this.params,re):this.params=re}block$data(re,_e,ae=u.nil){this.gen.block(()=>{this.check$data(re,ae),_e()})}check$data(re=u.nil,_e=u.nil){if(!this.$data)return;const{gen:ae,schemaCode:ue,schemaType:Oe,def:Pe}=this;ae.if((0,u.or)((0,u._)`${ue} === undefined`,_e)),re!==u.nil&&ae.assign(re,!0),(Oe.length||Pe.validateSchema)&&(ae.elseIf(this.invalid$data()),this.$dataError(),re!==u.nil&&ae.assign(re,!1)),ae.else()}invalid$data(){const{gen:re,schemaCode:_e,schemaType:ae,def:ue,it:Oe}=this;return(0,u.or)(Pe(),Je());function Pe(){if(ae.length){if(!(_e instanceof u.Name))throw new Error("ajv implementation error");const Be=Array.isArray(ae)?ae:[ae];return(0,u._)`${(0,r.checkDataTypes)(Be,_e,Oe.opts.strictNumbers,r.DataType.Wrong)}`}return u.nil}function Je(){if(ue.validateSchema){const Be=re.scopeValue("validate$data",{ref:ue.validateSchema});return(0,u._)`!${Be}(${_e})`}return u.nil}}subschema(re,_e){const ae=(0,c.getSubschema)(this.it,re);(0,c.extendSubschemaData)(ae,this.it,re),(0,c.extendSubschemaMode)(ae,re);const ue={...this.it,...ae,items:void 0,props:void 0};return T(ue,_e),ue}mergeEvaluated(re,_e){const{it:ae,gen:ue}=this;ae.opts.unevaluated&&(ae.props!==!0&&re.props!==void 0&&(ae.props=m.mergeEvaluated.props(ue,re.props,ae.props,_e)),ae.items!==!0&&re.items!==void 0&&(ae.items=m.mergeEvaluated.items(ue,re.items,ae.items,_e)))}mergeValidEvaluated(re,_e){const{it:ae,gen:ue}=this;if(ae.opts.unevaluated&&(ae.props!==!0||ae.items!==!0))return ue.if(_e,()=>this.mergeEvaluated(re,u.Name)),!0}}ja.KeywordCxt=Q;function me(H,re,_e,ae){const ue=new Q(H,_e,re);"code"in _e?_e.code(ue,ae):ue.$data&&_e.validate?(0,i.funcKeywordCode)(ue,_e):"macro"in _e?(0,i.macroKeywordCode)(ue,_e):(_e.compile||_e.validate)&&(0,i.funcKeywordCode)(ue,_e)}const ve=/^\/(?:[^~]|~0|~1)*$/,Ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Ie(H,{dataLevel:re,dataNames:_e,dataPathArr:ae}){let ue,Oe;if(H==="")return d.default.rootData;if(H[0]==="/"){if(!ve.test(H))throw new Error(`Invalid JSON-pointer: ${H}`);ue=H,Oe=d.default.rootData}else{const Ke=Ce.exec(H);if(!Ke)throw new Error(`Invalid JSON-pointer: ${H}`);const Z=+Ke[1];if(ue=Ke[2],ue==="#"){if(Z>=re)throw new Error(Be("property/index",Z));return ae[re-Z]}if(Z>re)throw new Error(Be("data",Z));if(Oe=_e[re-Z],!ue)return Oe}let Pe=Oe;const Je=ue.split("/");for(const Ke of Je)Ke&&(Oe=(0,u._)`${Oe}${(0,u.getProperty)((0,m.unescapeJsonPointer)(Ke))}`,Pe=(0,u._)`${Pe} && ${Oe}`);return Pe;function Be(Ke,Z){return`Cannot access ${Ke} ${Z} levels up, current level is ${re}`}}return ja.getData=Ie,ja}var Ph={},L2;function rw(){if(L2)return Ph;L2=1,Object.defineProperty(Ph,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return Ph.default=e,Ph}var Dh={},j2;function dg(){if(j2)return Dh;j2=1,Object.defineProperty(Dh,"__esModule",{value:!0});const e=lg();class t extends Error{constructor(r,a,i,c){super(c||`can't resolve reference ${i} from id ${a}`),this.missingRef=(0,e.resolveUrl)(r,a,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return Dh.default=t,Dh}var Wr={},$2;function ow(){if($2)return Wr;$2=1,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.resolveSchema=Wr.getCompilingSchema=Wr.resolveRef=Wr.compileSchema=Wr.SchemaEnv=void 0;const e=vt(),t=rw(),n=ei(),r=lg(),a=Nt(),i=ug();class c{constructor(R){var E;this.refs={},this.dynamicAnchors={};let T;typeof R.schema=="object"&&(T=R.schema),this.schema=R.schema,this.schemaId=R.schemaId,this.root=R.root||this,this.baseId=(E=R.baseId)!==null&&E!==void 0?E:(0,r.normalizeId)(T?.[R.schemaId||"$id"]),this.schemaPath=R.schemaPath,this.localRefs=R.localRefs,this.meta=R.meta,this.$async=T?.$async,this.refs={}}}Wr.SchemaEnv=c;function u(S){const R=m.call(this,S);if(R)return R;const E=(0,r.getFullPath)(this.opts.uriResolver,S.root.baseId),{es5:T,lines:O}=this.opts.code,{ownProperties:C}=this.opts,I=new e.CodeGen(this.scope,{es5:T,lines:O,ownProperties:C});let k;S.$async&&(k=I.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const P=I.scopeName("validate");S.validateName=P;const $={gen:I,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:I.scopeValue("schema",this.opts.code.source===!0?{ref:S.schema,code:(0,e.stringify)(S.schema)}:{ref:S.schema}),validateName:P,ValidationError:k,schema:S.schema,schemaEnv:S,rootId:E,baseId:S.baseId||E,schemaPath:e.nil,errSchemaPath:S.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let W;try{this._compilations.add(S),(0,i.validateFunctionCode)($),I.optimize(this.opts.code.optimize);const V=I.toString();W=`${I.scopeRefs(n.default.scope)}return ${V}`,this.opts.code.process&&(W=this.opts.code.process(W,S));const U=new Function(`${n.default.self}`,`${n.default.scope}`,W)(this,this.scope.get());if(this.scope.value(P,{ref:U}),U.errors=null,U.schema=S.schema,U.schemaEnv=S,S.$async&&(U.$async=!0),this.opts.code.source===!0&&(U.source={validateName:P,validateCode:V,scopeValues:I._values}),this.opts.unevaluated){const{props:J,items:le}=$;U.evaluated={props:J instanceof e.Name?void 0:J,items:le instanceof e.Name?void 0:le,dynamicProps:J instanceof e.Name,dynamicItems:le instanceof e.Name},U.source&&(U.source.evaluated=(0,e.stringify)(U.evaluated))}return S.validate=U,S}catch(V){throw delete S.validate,delete S.validateName,W&&this.logger.error("Error compiling schema, function code:",W),V}finally{this._compilations.delete(S)}}Wr.compileSchema=u;function d(S,R,E){var T;E=(0,r.resolveUrl)(this.opts.uriResolver,R,E);const O=S.refs[E];if(O)return O;let C=g.call(this,S,E);if(C===void 0){const I=(T=S.localRefs)===null||T===void 0?void 0:T[E],{schemaId:k}=this.opts;I&&(C=new c({schema:I,schemaId:k,root:S,baseId:R}))}if(C!==void 0)return S.refs[E]=f.call(this,C)}Wr.resolveRef=d;function f(S){return(0,r.inlineRef)(S.schema,this.opts.inlineRefs)?S.schema:S.validate?S:u.call(this,S)}function m(S){for(const R of this._compilations)if(p(R,S))return R}Wr.getCompilingSchema=m;function p(S,R){return S.schema===R.schema&&S.root===R.root&&S.baseId===R.baseId}function g(S,R){let E;for(;typeof(E=this.refs[R])=="string";)R=E;return E||this.schemas[R]||y.call(this,S,R)}function y(S,R){const E=this.opts.uriResolver.parse(R),T=(0,r._getFullPath)(this.opts.uriResolver,E);let O=(0,r.getFullPath)(this.opts.uriResolver,S.baseId,void 0);if(Object.keys(S.schema).length>0&&T===O)return b.call(this,E,S);const C=(0,r.normalizeId)(T),I=this.refs[C]||this.schemas[C];if(typeof I=="string"){const k=y.call(this,S,I);return typeof k?.schema!="object"?void 0:b.call(this,E,k)}if(typeof I?.schema=="object"){if(I.validate||u.call(this,I),C===(0,r.normalizeId)(R)){const{schema:k}=I,{schemaId:P}=this.opts,$=k[P];return $&&(O=(0,r.resolveUrl)(this.opts.uriResolver,O,$)),new c({schema:k,schemaId:P,root:S,baseId:O})}return b.call(this,E,I)}}Wr.resolveSchema=y;const w=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b(S,{baseId:R,schema:E,root:T}){var O;if(((O=S.fragment)===null||O===void 0?void 0:O[0])!=="/")return;for(const k of S.fragment.slice(1).split("/")){if(typeof E=="boolean")return;const P=E[(0,a.unescapeFragment)(k)];if(P===void 0)return;E=P;const $=typeof E=="object"&&E[this.opts.schemaId];!w.has(k)&&$&&(R=(0,r.resolveUrl)(this.opts.uriResolver,R,$))}let C;if(typeof E!="boolean"&&E.$ref&&!(0,a.schemaHasRulesButRef)(E,this.RULES)){const k=(0,r.resolveUrl)(this.opts.uriResolver,R,E.$ref);C=y.call(this,T,k)}const{schemaId:I}=this.opts;if(C=C||new c({schema:E,schemaId:I,root:T,baseId:R}),C.schema!==C.root.schema)return C}return Wr}const gJ="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",vJ="Meta-schema for $data reference (JSON AnySchema extension proposal)",yJ="object",_J=["$data"],bJ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},wJ=!1,SJ={$id:gJ,description:vJ,type:yJ,required:_J,properties:bJ,additionalProperties:wJ};var Lh={},Mu={exports:{}},B0,U2;function NP(){if(U2)return B0;U2=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(g){let y="",w=0,b=0;for(b=0;b<g.length;b++)if(w=g[b].charCodeAt(0),w!==48){if(!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";y+=g[b];break}for(b+=1;b<g.length;b++){if(w=g[b].charCodeAt(0),!(w>=48&&w<=57||w>=65&&w<=70||w>=97&&w<=102))return"";y+=g[b]}return y}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(g){return g.length=0,!0}function i(g,y,w){if(g.length){const b=n(g);if(b!=="")y.push(b);else return w.error=!0,!1;g.length=0}return!0}function c(g){let y=0;const w={error:!1,address:"",zone:""},b=[],S=[];let R=!1,E=!1,T=i;for(let O=0;O<g.length;O++){const C=g[O];if(!(C==="["||C==="]"))if(C===":"){if(R===!0&&(E=!0),!T(S,b,w))break;if(++y>7){w.error=!0;break}O>0&&g[O-1]===":"&&(R=!0),b.push(":");continue}else if(C==="%"){if(!T(S,b,w))break;T=a}else{S.push(C);continue}}return S.length&&(T===a?w.zone=S.join(""):E?b.push(S.join("")):b.push(n(S))),w.address=b.join(""),w}function u(g){if(d(g,":")<2)return{host:g,isIPV6:!1};const y=c(g);if(y.error)return{host:g,isIPV6:!1};{let w=y.address,b=y.address;return y.zone&&(w+="%"+y.zone,b+="%25"+y.zone),{host:w,isIPV6:!0,escapedHost:b}}}function d(g,y){let w=0;for(let b=0;b<g.length;b++)g[b]===y&&w++;return w}function f(g){let y=g;const w=[];let b=-1,S=0;for(;S=y.length;){if(S===1){if(y===".")break;if(y==="/"){w.push("/");break}else{w.push(y);break}}else if(S===2){if(y[0]==="."){if(y[1]===".")break;if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&(y[1]==="."||y[1]==="/")){w.push("/");break}}else if(S===3&&y==="/.."){w.length!==0&&w.pop(),w.push("/");break}if(y[0]==="."){if(y[1]==="."){if(y[2]==="/"){y=y.slice(3);continue}}else if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&y[1]==="."){if(y[2]==="/"){y=y.slice(2);continue}else if(y[2]==="."&&y[3]==="/"){y=y.slice(3),w.length!==0&&w.pop();continue}}if((b=y.indexOf("/",1))===-1){w.push(y);break}else w.push(y.slice(0,b)),y=y.slice(b)}return w.join("")}function m(g,y){const w=y!==!0?escape:unescape;return g.scheme!==void 0&&(g.scheme=w(g.scheme)),g.userinfo!==void 0&&(g.userinfo=w(g.userinfo)),g.host!==void 0&&(g.host=w(g.host)),g.path!==void 0&&(g.path=w(g.path)),g.query!==void 0&&(g.query=w(g.query)),g.fragment!==void 0&&(g.fragment=w(g.fragment)),g}function p(g){const y=[];if(g.userinfo!==void 0&&(y.push(g.userinfo),y.push("@")),g.host!==void 0){let w=unescape(g.host);if(!t(w)){const b=u(w);b.isIPV6===!0?w=`[${b.escapedHost}]`:w=g.host}y.push(w)}return(typeof g.port=="number"||typeof g.port=="string")&&(y.push(":"),y.push(String(g.port))),y.length?y.join(""):void 0}return B0={nonSimpleDomain:r,recomposeAuthority:p,normalizeComponentEncoding:m,removeDotSegments:f,isIPv4:t,isUUID:e,normalizeIPv6:u,stringArrayToHexStripped:n},B0}var q0,z2;function EJ(){if(z2)return q0;z2=1;const{isUUID:e}=NP(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(C){return n.indexOf(C)!==-1}function a(C){return C.secure===!0?!0:C.secure===!1?!1:C.scheme?C.scheme.length===3&&(C.scheme[0]==="w"||C.scheme[0]==="W")&&(C.scheme[1]==="s"||C.scheme[1]==="S")&&(C.scheme[2]==="s"||C.scheme[2]==="S"):!1}function i(C){return C.host||(C.error=C.error||"HTTP URIs must have a host."),C}function c(C){const I=String(C.scheme).toLowerCase()==="https";return(C.port===(I?443:80)||C.port==="")&&(C.port=void 0),C.path||(C.path="/"),C}function u(C){return C.secure=a(C),C.resourceName=(C.path||"/")+(C.query?"?"+C.query:""),C.path=void 0,C.query=void 0,C}function d(C){if((C.port===(a(C)?443:80)||C.port==="")&&(C.port=void 0),typeof C.secure=="boolean"&&(C.scheme=C.secure?"wss":"ws",C.secure=void 0),C.resourceName){const[I,k]=C.resourceName.split("?");C.path=I&&I!=="/"?I:void 0,C.query=k,C.resourceName=void 0}return C.fragment=void 0,C}function f(C,I){if(!C.path)return C.error="URN can not be parsed",C;const k=C.path.match(t);if(k){const P=I.scheme||C.scheme||"urn";C.nid=k[1].toLowerCase(),C.nss=k[2];const $=`${P}:${I.nid||C.nid}`,W=O($);C.path=void 0,W&&(C=W.parse(C,I))}else C.error=C.error||"URN can not be parsed.";return C}function m(C,I){if(C.nid===void 0)throw new Error("URN without nid cannot be serialized");const k=I.scheme||C.scheme||"urn",P=C.nid.toLowerCase(),$=`${k}:${I.nid||P}`,W=O($);W&&(C=W.serialize(C,I));const V=C,G=C.nss;return V.path=`${P||I.nid}:${G}`,I.skipEscape=!0,V}function p(C,I){const k=C;return k.uuid=k.nss,k.nss=void 0,!I.tolerant&&(!k.uuid||!e(k.uuid))&&(k.error=k.error||"UUID is not valid."),k}function g(C){const I=C;return I.nss=(C.uuid||"").toLowerCase(),I}const y={scheme:"http",domainHost:!0,parse:i,serialize:c},w={scheme:"https",domainHost:y.domainHost,parse:i,serialize:c},b={scheme:"ws",domainHost:!0,parse:u,serialize:d},S={scheme:"wss",domainHost:b.domainHost,parse:b.parse,serialize:b.serialize},T={http:y,https:w,ws:b,wss:S,urn:{scheme:"urn",parse:f,serialize:m,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(T,null);function O(C){return C&&(T[C]||T[C.toLowerCase()])||void 0}return q0={wsIsSecure:a,SCHEMES:T,isValidSchemeName:r,getSchemeHandler:O},q0}var V2;function RJ(){if(V2)return Mu.exports;V2=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:a,nonSimpleDomain:i}=NP(),{SCHEMES:c,getSchemeHandler:u}=EJ();function d(S,R){return typeof S=="string"?S=g(w(S,R),R):typeof S=="object"&&(S=w(g(S,R),R)),S}function f(S,R,E){const T=E?Object.assign({scheme:"null"},E):{scheme:"null"},O=m(w(S,T),w(R,T),T,!0);return T.skipEscape=!0,g(O,T)}function m(S,R,E,T){const O={};return T||(S=w(g(S,E),E),R=w(g(R,E),E)),E=E||{},!E.tolerant&&R.scheme?(O.scheme=R.scheme,O.userinfo=R.userinfo,O.host=R.host,O.port=R.port,O.path=t(R.path||""),O.query=R.query):(R.userinfo!==void 0||R.host!==void 0||R.port!==void 0?(O.userinfo=R.userinfo,O.host=R.host,O.port=R.port,O.path=t(R.path||""),O.query=R.query):(R.path?(R.path[0]==="/"?O.path=t(R.path):((S.userinfo!==void 0||S.host!==void 0||S.port!==void 0)&&!S.path?O.path="/"+R.path:S.path?O.path=S.path.slice(0,S.path.lastIndexOf("/")+1)+R.path:O.path=R.path,O.path=t(O.path)),O.query=R.query):(O.path=S.path,R.query!==void 0?O.query=R.query:O.query=S.query),O.userinfo=S.userinfo,O.host=S.host,O.port=S.port),O.scheme=S.scheme),O.fragment=R.fragment,O}function p(S,R,E){return typeof S=="string"?(S=unescape(S),S=g(r(w(S,E),!0),{...E,skipEscape:!0})):typeof S=="object"&&(S=g(r(S,!0),{...E,skipEscape:!0})),typeof R=="string"?(R=unescape(R),R=g(r(w(R,E),!0),{...E,skipEscape:!0})):typeof R=="object"&&(R=g(r(R,!0),{...E,skipEscape:!0})),S.toLowerCase()===R.toLowerCase()}function g(S,R){const E={host:S.host,scheme:S.scheme,userinfo:S.userinfo,port:S.port,path:S.path,query:S.query,nid:S.nid,nss:S.nss,uuid:S.uuid,fragment:S.fragment,reference:S.reference,resourceName:S.resourceName,secure:S.secure,error:""},T=Object.assign({},R),O=[],C=u(T.scheme||E.scheme);C&&C.serialize&&C.serialize(E,T),E.path!==void 0&&(T.skipEscape?E.path=unescape(E.path):(E.path=escape(E.path),E.scheme!==void 0&&(E.path=E.path.split("%3A").join(":")))),T.reference!=="suffix"&&E.scheme&&O.push(E.scheme,":");const I=n(E);if(I!==void 0&&(T.reference!=="suffix"&&O.push("//"),O.push(I),E.path&&E.path[0]!=="/"&&O.push("/")),E.path!==void 0){let k=E.path;!T.absolutePath&&(!C||!C.absolutePath)&&(k=t(k)),I===void 0&&k[0]==="/"&&k[1]==="/"&&(k="/%2F"+k.slice(2)),O.push(k)}return E.query!==void 0&&O.push("?",E.query),E.fragment!==void 0&&O.push("#",E.fragment),O.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function w(S,R){const E=Object.assign({},R),T={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let O=!1;E.reference==="suffix"&&(E.scheme?S=E.scheme+":"+S:S="//"+S);const C=S.match(y);if(C){if(T.scheme=C[1],T.userinfo=C[3],T.host=C[4],T.port=parseInt(C[5],10),T.path=C[6]||"",T.query=C[7],T.fragment=C[8],isNaN(T.port)&&(T.port=C[5]),T.host)if(a(T.host)===!1){const P=e(T.host);T.host=P.host.toLowerCase(),O=P.isIPV6}else O=!0;T.scheme===void 0&&T.userinfo===void 0&&T.host===void 0&&T.port===void 0&&T.query===void 0&&!T.path?T.reference="same-document":T.scheme===void 0?T.reference="relative":T.fragment===void 0?T.reference="absolute":T.reference="uri",E.reference&&E.reference!=="suffix"&&E.reference!==T.reference&&(T.error=T.error||"URI is not a "+E.reference+" reference.");const I=u(E.scheme||T.scheme);if(!E.unicodeSupport&&(!I||!I.unicodeSupport)&&T.host&&(E.domainHost||I&&I.domainHost)&&O===!1&&i(T.host))try{T.host=URL.domainToASCII(T.host.toLowerCase())}catch(k){T.error=T.error||"Host's domain name can not be converted to ASCII: "+k}(!I||I&&!I.skipNormalize)&&(S.indexOf("%")!==-1&&(T.scheme!==void 0&&(T.scheme=unescape(T.scheme)),T.host!==void 0&&(T.host=unescape(T.host))),T.path&&(T.path=escape(unescape(T.path))),T.fragment&&(T.fragment=encodeURI(decodeURIComponent(T.fragment)))),I&&I.parse&&I.parse(T,E)}else T.error=T.error||"URI can not be parsed.";return T}const b={SCHEMES:c,normalize:d,resolve:f,resolveComponent:m,equal:p,serialize:g,parse:w};return Mu.exports=b,Mu.exports.default=b,Mu.exports.fastUri=b,Mu.exports}var F2;function xJ(){if(F2)return Lh;F2=1,Object.defineProperty(Lh,"__esModule",{value:!0});const e=RJ();return e.code='require("ajv/dist/runtime/uri").default',Lh.default=e,Lh}var B2;function TJ(){return B2||(B2=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=ug();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=vt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=rw(),a=dg(),i=AP(),c=ow(),u=vt(),d=lg(),f=mm(),m=Nt(),p=SJ,g=xJ(),y=(K,D)=>new RegExp(K,D);y.code="new RegExp";const w=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),S={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},R={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function T(K){var D,q,B,L,z,Q,me,ve,Ce,Ie,H,re,_e,ae,ue,Oe,Pe,Je,Be,Ke,Z,te,oe,Se,xe;const Re=K.strict,Ne=(D=K.code)===null||D===void 0?void 0:D.optimize,et=Ne===!0||Ne===void 0?1:Ne||0,st=(B=(q=K.code)===null||q===void 0?void 0:q.regExp)!==null&&B!==void 0?B:y,Pt=(L=K.uriResolver)!==null&&L!==void 0?L:g.default;return{strictSchema:(Q=(z=K.strictSchema)!==null&&z!==void 0?z:Re)!==null&&Q!==void 0?Q:!0,strictNumbers:(ve=(me=K.strictNumbers)!==null&&me!==void 0?me:Re)!==null&&ve!==void 0?ve:!0,strictTypes:(Ie=(Ce=K.strictTypes)!==null&&Ce!==void 0?Ce:Re)!==null&&Ie!==void 0?Ie:"log",strictTuples:(re=(H=K.strictTuples)!==null&&H!==void 0?H:Re)!==null&&re!==void 0?re:"log",strictRequired:(ae=(_e=K.strictRequired)!==null&&_e!==void 0?_e:Re)!==null&&ae!==void 0?ae:!1,code:K.code?{...K.code,optimize:et,regExp:st}:{optimize:et,regExp:st},loopRequired:(ue=K.loopRequired)!==null&&ue!==void 0?ue:E,loopEnum:(Oe=K.loopEnum)!==null&&Oe!==void 0?Oe:E,meta:(Pe=K.meta)!==null&&Pe!==void 0?Pe:!0,messages:(Je=K.messages)!==null&&Je!==void 0?Je:!0,inlineRefs:(Be=K.inlineRefs)!==null&&Be!==void 0?Be:!0,schemaId:(Ke=K.schemaId)!==null&&Ke!==void 0?Ke:"$id",addUsedSchema:(Z=K.addUsedSchema)!==null&&Z!==void 0?Z:!0,validateSchema:(te=K.validateSchema)!==null&&te!==void 0?te:!0,validateFormats:(oe=K.validateFormats)!==null&&oe!==void 0?oe:!0,unicodeRegExp:(Se=K.unicodeRegExp)!==null&&Se!==void 0?Se:!0,int32range:(xe=K.int32range)!==null&&xe!==void 0?xe:!0,uriResolver:Pt}}class O{constructor(D={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,D=this.opts={...D,...T(D)};const{es5:q,lines:B}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:q,lines:B}),this.logger=G(D.logger);const L=D.validateFormats;D.validateFormats=!1,this.RULES=(0,i.getRules)(),C.call(this,S,D,"NOT SUPPORTED"),C.call(this,R,D,"DEPRECATED","warn"),this._metaOpts=W.call(this),D.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),D.keywords&&$.call(this,D.keywords),typeof D.meta=="object"&&this.addMetaSchema(D.meta),k.call(this),D.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:D,meta:q,schemaId:B}=this.opts;let L=p;B==="id"&&(L={...p},L.id=L.$id,delete L.$id),q&&D&&this.addMetaSchema(L,L[B],!1)}defaultMeta(){const{meta:D,schemaId:q}=this.opts;return this.opts.defaultMeta=typeof D=="object"?D[q]||D:void 0}validate(D,q){let B;if(typeof D=="string"){if(B=this.getSchema(D),!B)throw new Error(`no schema with key or ref "${D}"`)}else B=this.compile(D);const L=B(q);return"$async"in B||(this.errors=B.errors),L}compile(D,q){const B=this._addSchema(D,q);return B.validate||this._compileSchemaEnv(B)}compileAsync(D,q){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:B}=this.opts;return L.call(this,D,q);async function L(Ie,H){await z.call(this,Ie.$schema);const re=this._addSchema(Ie,H);return re.validate||Q.call(this,re)}async function z(Ie){Ie&&!this.getSchema(Ie)&&await L.call(this,{$ref:Ie},!0)}async function Q(Ie){try{return this._compileSchemaEnv(Ie)}catch(H){if(!(H instanceof a.default))throw H;return me.call(this,H),await ve.call(this,H.missingSchema),Q.call(this,Ie)}}function me({missingSchema:Ie,missingRef:H}){if(this.refs[Ie])throw new Error(`AnySchema ${Ie} is loaded but ${H} cannot be resolved`)}async function ve(Ie){const H=await Ce.call(this,Ie);this.refs[Ie]||await z.call(this,H.$schema),this.refs[Ie]||this.addSchema(H,Ie,q)}async function Ce(Ie){const H=this._loading[Ie];if(H)return H;try{return await(this._loading[Ie]=B(Ie))}finally{delete this._loading[Ie]}}}addSchema(D,q,B,L=this.opts.validateSchema){if(Array.isArray(D)){for(const Q of D)this.addSchema(Q,void 0,B,L);return this}let z;if(typeof D=="object"){const{schemaId:Q}=this.opts;if(z=D[Q],z!==void 0&&typeof z!="string")throw new Error(`schema ${Q} must be string`)}return q=(0,d.normalizeId)(q||z),this._checkUnique(q),this.schemas[q]=this._addSchema(D,B,q,L,!0),this}addMetaSchema(D,q,B=this.opts.validateSchema){return this.addSchema(D,q,!0,B),this}validateSchema(D,q){if(typeof D=="boolean")return!0;let B;if(B=D.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(B,D);if(!L&&q){const z="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(z);else throw new Error(z)}return L}getSchema(D){let q;for(;typeof(q=I.call(this,D))=="string";)D=q;if(q===void 0){const{schemaId:B}=this.opts,L=new c.SchemaEnv({schema:{},schemaId:B});if(q=c.resolveSchema.call(this,L,D),!q)return;this.refs[D]=q}return q.validate||this._compileSchemaEnv(q)}removeSchema(D){if(D instanceof RegExp)return this._removeAllSchemas(this.schemas,D),this._removeAllSchemas(this.refs,D),this;switch(typeof D){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const q=I.call(this,D);return typeof q=="object"&&this._cache.delete(q.schema),delete this.schemas[D],delete this.refs[D],this}case"object":{const q=D;this._cache.delete(q);let B=D[this.opts.schemaId];return B&&(B=(0,d.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(D){for(const q of D)this.addKeyword(q);return this}addKeyword(D,q){let B;if(typeof D=="string")B=D,typeof q=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),q.keyword=B);else if(typeof D=="object"&&q===void 0){if(q=D,B=q.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(J.call(this,B,q),!q)return(0,m.eachItem)(B,z=>le.call(this,z)),this;Y.call(this,q);const L={...q,type:(0,f.getJSONTypes)(q.type),schemaType:(0,f.getJSONTypes)(q.schemaType)};return(0,m.eachItem)(B,L.type.length===0?z=>le.call(this,z,L):z=>L.type.forEach(Q=>le.call(this,z,L,Q))),this}getKeyword(D){const q=this.RULES.all[D];return typeof q=="object"?q.definition:!!q}removeKeyword(D){const{RULES:q}=this;delete q.keywords[D],delete q.all[D];for(const B of q.rules){const L=B.rules.findIndex(z=>z.keyword===D);L>=0&&B.rules.splice(L,1)}return this}addFormat(D,q){return typeof q=="string"&&(q=new RegExp(q)),this.formats[D]=q,this}errorsText(D=this.errors,{separator:q=", ",dataVar:B="data"}={}){return!D||D.length===0?"No errors":D.map(L=>`${B}${L.instancePath} ${L.message}`).reduce((L,z)=>L+q+z)}$dataMetaSchema(D,q){const B=this.RULES.all;D=JSON.parse(JSON.stringify(D));for(const L of q){const z=L.split("/").slice(1);let Q=D;for(const me of z)Q=Q[me];for(const me in B){const ve=B[me];if(typeof ve!="object")continue;const{$data:Ce}=ve.definition,Ie=Q[me];Ce&&Ie&&(Q[me]=fe(Ie))}}return D}_removeAllSchemas(D,q){for(const B in D){const L=D[B];(!q||q.test(B))&&(typeof L=="string"?delete D[B]:L&&!L.meta&&(this._cache.delete(L.schema),delete D[B]))}}_addSchema(D,q,B,L=this.opts.validateSchema,z=this.opts.addUsedSchema){let Q;const{schemaId:me}=this.opts;if(typeof D=="object")Q=D[me];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof D!="boolean")throw new Error("schema must be object or boolean")}let ve=this._cache.get(D);if(ve!==void 0)return ve;B=(0,d.normalizeId)(Q||B);const Ce=d.getSchemaRefs.call(this,D,B);return ve=new c.SchemaEnv({schema:D,schemaId:me,meta:q,baseId:B,localRefs:Ce}),this._cache.set(ve.schema,ve),z&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=ve),L&&this.validateSchema(D,!0),ve}_checkUnique(D){if(this.schemas[D]||this.refs[D])throw new Error(`schema with key or id "${D}" already exists`)}_compileSchemaEnv(D){if(D.meta?this._compileMetaSchema(D):c.compileSchema.call(this,D),!D.validate)throw new Error("ajv implementation error");return D.validate}_compileMetaSchema(D){const q=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,D)}finally{this.opts=q}}}O.ValidationError=r.default,O.MissingRefError=a.default,e.default=O;function C(K,D,q,B="error"){for(const L in K){const z=L;z in D&&this.logger[B](`${q}: option ${L}. ${K[z]}`)}}function I(K){return K=(0,d.normalizeId)(K),this.schemas[K]||this.refs[K]}function k(){const K=this.opts.schemas;if(K)if(Array.isArray(K))this.addSchema(K);else for(const D in K)this.addSchema(K[D],D)}function P(){for(const K in this.opts.formats){const D=this.opts.formats[K];D&&this.addFormat(K,D)}}function $(K){if(Array.isArray(K)){this.addVocabulary(K);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const D in K){const q=K[D];q.keyword||(q.keyword=D),this.addKeyword(q)}}function W(){const K={...this.opts};for(const D of w)delete K[D];return K}const V={log(){},warn(){},error(){}};function G(K){if(K===!1)return V;if(K===void 0)return console;if(K.log&&K.warn&&K.error)return K;throw new Error("logger must implement log, warn and error methods")}const U=/^[a-z_$][a-z0-9_$:-]*$/i;function J(K,D){const{RULES:q}=this;if((0,m.eachItem)(K,B=>{if(q.keywords[B])throw new Error(`Keyword ${B} is already defined`);if(!U.test(B))throw new Error(`Keyword ${B} has invalid name`)}),!!D&&D.$data&&!("code"in D||"validate"in D))throw new Error('$data keyword must have "code" or "validate" function')}function le(K,D,q){var B;const L=D?.post;if(q&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:z}=this;let Q=L?z.post:z.rules.find(({type:ve})=>ve===q);if(Q||(Q={type:q,rules:[]},z.rules.push(Q)),z.keywords[K]=!0,!D)return;const me={keyword:K,definition:{...D,type:(0,f.getJSONTypes)(D.type),schemaType:(0,f.getJSONTypes)(D.schemaType)}};D.before?F.call(this,Q,me,D.before):Q.rules.push(me),z.all[K]=me,(B=D.implements)===null||B===void 0||B.forEach(ve=>this.addKeyword(ve))}function F(K,D,q){const B=K.rules.findIndex(L=>L.keyword===q);B>=0?K.rules.splice(B,0,D):(K.rules.push(D),this.logger.warn(`rule ${q} is not defined`))}function Y(K){let{metaSchema:D}=K;D!==void 0&&(K.$data&&this.opts.$data&&(D=fe(D)),K.validateSchema=this.compile(D,!0))}const se={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function fe(K){return{anyOf:[K,se]}}})(L0)),L0}var jh={},$h={},Uh={},q2;function OJ(){if(q2)return Uh;q2=1,Object.defineProperty(Uh,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Uh.default=e,Uh}var Os={},H2;function CJ(){if(H2)return Os;H2=1,Object.defineProperty(Os,"__esModule",{value:!0}),Os.callRef=Os.getValidate=void 0;const e=dg(),t=Yo(),n=vt(),r=ei(),a=ow(),i=Nt(),c={keyword:"$ref",schemaType:"string",code(f){const{gen:m,schema:p,it:g}=f,{baseId:y,schemaEnv:w,validateName:b,opts:S,self:R}=g,{root:E}=w;if((p==="#"||p==="#/")&&y===E.baseId)return O();const T=a.resolveRef.call(R,E,y,p);if(T===void 0)throw new e.default(g.opts.uriResolver,y,p);if(T instanceof a.SchemaEnv)return C(T);return I(T);function O(){if(w===E)return d(f,b,w,w.$async);const k=m.scopeValue("root",{ref:E});return d(f,(0,n._)`${k}.validate`,E,E.$async)}function C(k){const P=u(f,k);d(f,P,k,k.$async)}function I(k){const P=m.scopeValue("schema",S.code.source===!0?{ref:k,code:(0,n.stringify)(k)}:{ref:k}),$=m.name("valid"),W=f.subschema({schema:k,dataTypes:[],schemaPath:n.nil,topSchemaRef:P,errSchemaPath:p},$);f.mergeEvaluated(W),f.ok($)}}};function u(f,m){const{gen:p}=f;return m.validate?p.scopeValue("validate",{ref:m.validate}):(0,n._)`${p.scopeValue("wrapper",{ref:m})}.validate`}Os.getValidate=u;function d(f,m,p,g){const{gen:y,it:w}=f,{allErrors:b,schemaEnv:S,opts:R}=w,E=R.passContext?r.default.this:n.nil;g?T():O();function T(){if(!S.$async)throw new Error("async schema referenced by sync schema");const k=y.let("valid");y.try(()=>{y.code((0,n._)`await ${(0,t.callValidateCode)(f,m,E)}`),I(m),b||y.assign(k,!0)},P=>{y.if((0,n._)`!(${P} instanceof ${w.ValidationError})`,()=>y.throw(P)),C(P),b||y.assign(k,!1)}),f.ok(k)}function O(){f.result((0,t.callValidateCode)(f,m,E),()=>I(m),()=>C(m))}function C(k){const P=(0,n._)`${k}.errors`;y.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${P} : ${r.default.vErrors}.concat(${P})`),y.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function I(k){var P;if(!w.opts.unevaluated)return;const $=(P=p?.validate)===null||P===void 0?void 0:P.evaluated;if(w.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(w.props=i.mergeEvaluated.props(y,$.props,w.props));else{const W=y.var("props",(0,n._)`${k}.evaluated.props`);w.props=i.mergeEvaluated.props(y,W,w.props,n.Name)}if(w.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(w.items=i.mergeEvaluated.items(y,$.items,w.items));else{const W=y.var("items",(0,n._)`${k}.evaluated.items`);w.items=i.mergeEvaluated.items(y,W,w.items,n.Name)}}}return Os.callRef=d,Os.default=c,Os}var G2;function AJ(){if(G2)return $h;G2=1,Object.defineProperty($h,"__esModule",{value:!0});const e=OJ(),t=CJ(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return $h.default=n,$h}var zh={},Vh={},Z2;function IJ(){if(Z2)return Vh;Z2=1,Object.defineProperty(Vh,"__esModule",{value:!0});const e=vt(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:i,schemaCode:c})=>(0,e.str)`must be ${n[i].okStr} ${c}`,params:({keyword:i,schemaCode:c})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${c}}`},a={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:c,data:u,schemaCode:d}=i;i.fail$data((0,e._)`${u} ${n[c].fail} ${d} || isNaN(${u})`)}};return Vh.default=a,Vh}var Fh={},W2;function kJ(){if(W2)return Fh;W2=1,Object.defineProperty(Fh,"__esModule",{value:!0});const e=vt(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:a,data:i,schemaCode:c,it:u}=r,d=u.opts.multipleOfPrecision,f=a.let("res"),m=d?(0,e._)`Math.abs(Math.round(${f}) - ${f}) > 1e-${d}`:(0,e._)`${f} !== parseInt(${f})`;r.fail$data((0,e._)`(${c} === 0 || (${f} = ${i}/${c}, ${m}))`)}};return Fh.default=n,Fh}var Bh={},qh={},K2;function NJ(){if(K2)return qh;K2=1,Object.defineProperty(qh,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,a=0,i;for(;a<n;)r++,i=t.charCodeAt(a++),i>=55296&&i<=56319&&a<n&&(i=t.charCodeAt(a),(i&64512)===56320&&a++);return r}return qh.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',qh}var Y2;function MJ(){if(Y2)return Bh;Y2=1,Object.defineProperty(Bh,"__esModule",{value:!0});const e=vt(),t=Nt(),n=NJ(),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:c}){const u=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${u} than ${c} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:c,data:u,schemaCode:d,it:f}=i,m=c==="maxLength"?e.operators.GT:e.operators.LT,p=f.opts.unicode===!1?(0,e._)`${u}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${u})`;i.fail$data((0,e._)`${p} ${m} ${d}`)}};return Bh.default=a,Bh}var Hh={},Q2;function PJ(){if(Q2)return Hh;Q2=1,Object.defineProperty(Hh,"__esModule",{value:!0});const e=Yo(),t=Nt(),n=vt(),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i,g=p.opts.unicodeRegExp?"u":"";if(d){const{regExp:y}=p.opts.code,w=y.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(c,y),b=c.let("valid");c.try(()=>c.assign(b,(0,n._)`${w}(${m}, ${g}).test(${u})`),()=>c.assign(b,!1)),i.fail$data((0,n._)`!${b}`)}else{const y=(0,e.usePattern)(i,f);i.fail$data((0,n._)`!${y}.test(${u})`)}}};return Hh.default=a,Hh}var Gh={},X2;function DJ(){if(X2)return Gh;X2=1,Object.defineProperty(Gh,"__esModule",{value:!0});const e=vt(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:c}=r,u=a==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${u} ${c}`)}};return Gh.default=n,Gh}var Zh={},J2;function LJ(){if(J2)return Zh;J2=1,Object.defineProperty(Zh,"__esModule",{value:!0});const e=Yo(),t=vt(),n=Nt(),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:c,schema:u,schemaCode:d,data:f,$data:m,it:p}=i,{opts:g}=p;if(!m&&u.length===0)return;const y=u.length>=g.loopRequired;if(p.allErrors?w():b(),g.strictRequired){const E=i.parentSchema.properties,{definedProperties:T}=i.it;for(const O of u)if(E?.[O]===void 0&&!T.has(O)){const C=p.schemaEnv.baseId+p.errSchemaPath,I=`required property "${O}" is not defined at "${C}" (strictRequired)`;(0,n.checkStrictMode)(p,I,p.opts.strictRequired)}}function w(){if(y||m)i.block$data(t.nil,S);else for(const E of u)(0,e.checkReportMissingProp)(i,E)}function b(){const E=c.let("missing");if(y||m){const T=c.let("valid",!0);i.block$data(T,()=>R(E,T)),i.ok(T)}else c.if((0,e.checkMissingProp)(i,u,E)),(0,e.reportMissingProp)(i,E),c.else()}function S(){c.forOf("prop",d,E=>{i.setParams({missingProperty:E}),c.if((0,e.noPropertyInData)(c,f,E,g.ownProperties),()=>i.error())})}function R(E,T){i.setParams({missingProperty:E}),c.forOf(E,d,()=>{c.assign(T,(0,e.propertyInData)(c,f,E,g.ownProperties)),c.if((0,t.not)(T),()=>{i.error(),c.break()})},t.nil)}}};return Zh.default=a,Zh}var Wh={},eC;function jJ(){if(eC)return Wh;eC=1,Object.defineProperty(Wh,"__esModule",{value:!0});const e=vt(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:a}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${a} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:a,data:i,schemaCode:c}=r,u=a==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${u} ${c}`)}};return Wh.default=n,Wh}var Kh={},Yh={},tC;function aw(){if(tC)return Yh;tC=1,Object.defineProperty(Yh,"__esModule",{value:!0});const e=kP();return e.code='require("ajv/dist/runtime/equal").default',Yh.default=e,Yh}var nC;function $J(){if(nC)return Kh;nC=1,Object.defineProperty(Kh,"__esModule",{value:!0});const e=mm(),t=vt(),n=Nt(),r=aw(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:c,j:u}})=>(0,t.str)`must NOT have duplicate items (items ## ${u} and ${c} are identical)`,params:({params:{i:c,j:u}})=>(0,t._)`{i: ${c}, j: ${u}}`},code(c){const{gen:u,data:d,$data:f,schema:m,parentSchema:p,schemaCode:g,it:y}=c;if(!f&&!m)return;const w=u.let("valid"),b=p.items?(0,e.getSchemaTypes)(p.items):[];c.block$data(w,S,(0,t._)`${g} === false`),c.ok(w);function S(){const O=u.let("i",(0,t._)`${d}.length`),C=u.let("j");c.setParams({i:O,j:C}),u.assign(w,!0),u.if((0,t._)`${O} > 1`,()=>(R()?E:T)(O,C))}function R(){return b.length>0&&!b.some(O=>O==="object"||O==="array")}function E(O,C){const I=u.name("item"),k=(0,e.checkDataTypes)(b,I,y.opts.strictNumbers,e.DataType.Wrong),P=u.const("indices",(0,t._)`{}`);u.for((0,t._)`;${O}--;`,()=>{u.let(I,(0,t._)`${d}[${O}]`),u.if(k,(0,t._)`continue`),b.length>1&&u.if((0,t._)`typeof ${I} == "string"`,(0,t._)`${I} += "_"`),u.if((0,t._)`typeof ${P}[${I}] == "number"`,()=>{u.assign(C,(0,t._)`${P}[${I}]`),c.error(),u.assign(w,!1).break()}).code((0,t._)`${P}[${I}] = ${O}`)})}function T(O,C){const I=(0,n.useFunc)(u,r.default),k=u.name("outer");u.label(k).for((0,t._)`;${O}--;`,()=>u.for((0,t._)`${C} = ${O}; ${C}--;`,()=>u.if((0,t._)`${I}(${d}[${O}], ${d}[${C}])`,()=>{c.error(),u.assign(w,!1).break(k)})))}}};return Kh.default=i,Kh}var Qh={},rC;function UJ(){if(rC)return Qh;rC=1,Object.defineProperty(Qh,"__esModule",{value:!0});const e=vt(),t=Nt(),n=aw(),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:c,data:u,$data:d,schemaCode:f,schema:m}=i;d||m&&typeof m=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(c,n.default)}(${u}, ${f})`):i.fail((0,e._)`${m} !== ${u}`)}};return Qh.default=a,Qh}var Xh={},oC;function zJ(){if(oC)return Xh;oC=1,Object.defineProperty(Xh,"__esModule",{value:!0});const e=vt(),t=Nt(),n=aw(),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:c,data:u,$data:d,schema:f,schemaCode:m,it:p}=i;if(!d&&f.length===0)throw new Error("enum must have non-empty array");const g=f.length>=p.opts.loopEnum;let y;const w=()=>y??(y=(0,t.useFunc)(c,n.default));let b;if(g||d)b=c.let("valid"),i.block$data(b,S);else{if(!Array.isArray(f))throw new Error("ajv implementation error");const E=c.const("vSchema",m);b=(0,e.or)(...f.map((T,O)=>R(E,O)))}i.pass(b);function S(){c.assign(b,!1),c.forOf("v",m,E=>c.if((0,e._)`${w()}(${u}, ${E})`,()=>c.assign(b,!0).break()))}function R(E,T){const O=f[T];return typeof O=="object"&&O!==null?(0,e._)`${w()}(${u}, ${E}[${T}])`:(0,e._)`${u} === ${O}`}}};return Xh.default=a,Xh}var aC;function VJ(){if(aC)return zh;aC=1,Object.defineProperty(zh,"__esModule",{value:!0});const e=IJ(),t=kJ(),n=MJ(),r=PJ(),a=DJ(),i=LJ(),c=jJ(),u=$J(),d=UJ(),f=zJ(),m=[e.default,t.default,n.default,r.default,a.default,i.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];return zh.default=m,zh}var Jh={},Hc={},sC;function MP(){if(sC)return Hc;sC=1,Object.defineProperty(Hc,"__esModule",{value:!0}),Hc.validateAdditionalItems=void 0;const e=vt(),t=Nt(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:c,it:u}=i,{items:d}=c;if(!Array.isArray(d)){(0,t.checkStrictMode)(u,'"additionalItems" is ignored when "items" is not an array of schemas');return}a(i,d)}};function a(i,c){const{gen:u,schema:d,data:f,keyword:m,it:p}=i;p.items=!0;const g=u.const("len",(0,e._)`${f}.length`);if(d===!1)i.setParams({len:c.length}),i.pass((0,e._)`${g} <= ${c.length}`);else if(typeof d=="object"&&!(0,t.alwaysValidSchema)(p,d)){const w=u.var("valid",(0,e._)`${g} <= ${c.length}`);u.if((0,e.not)(w),()=>y(w)),i.ok(w)}function y(w){u.forRange("i",c.length,g,b=>{i.subschema({keyword:m,dataProp:b,dataPropType:t.Type.Num},w),p.allErrors||u.if((0,e.not)(w),()=>u.break())})}}return Hc.validateAdditionalItems=a,Hc.default=r,Hc}var ep={},Gc={},iC;function PP(){if(iC)return Gc;iC=1,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.validateTuple=void 0;const e=vt(),t=Nt(),n=Yo(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:c,it:u}=i;if(Array.isArray(c))return a(i,"additionalItems",c);u.items=!0,!(0,t.alwaysValidSchema)(u,c)&&i.ok((0,n.validateArray)(i))}};function a(i,c,u=i.schema){const{gen:d,parentSchema:f,data:m,keyword:p,it:g}=i;b(f),g.opts.unevaluated&&u.length&&g.items!==!0&&(g.items=t.mergeEvaluated.items(d,u.length,g.items));const y=d.name("valid"),w=d.const("len",(0,e._)`${m}.length`);u.forEach((S,R)=>{(0,t.alwaysValidSchema)(g,S)||(d.if((0,e._)`${w} > ${R}`,()=>i.subschema({keyword:p,schemaProp:R,dataProp:R},y)),i.ok(y))});function b(S){const{opts:R,errSchemaPath:E}=g,T=u.length,O=T===S.minItems&&(T===S.maxItems||S[c]===!1);if(R.strictTuples&&!O){const C=`"${p}" is ${T}-tuple, but minItems or maxItems/${c} are not specified or different at path "${E}"`;(0,t.checkStrictMode)(g,C,R.strictTuples)}}}return Gc.validateTuple=a,Gc.default=r,Gc}var cC;function FJ(){if(cC)return ep;cC=1,Object.defineProperty(ep,"__esModule",{value:!0});const e=PP(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return ep.default=t,ep}var tp={},lC;function BJ(){if(lC)return tp;lC=1,Object.defineProperty(tp,"__esModule",{value:!0});const e=vt(),t=Nt(),n=Yo(),r=MP(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:c}})=>(0,e.str)`must NOT have more than ${c} items`,params:({params:{len:c}})=>(0,e._)`{limit: ${c}}`},code(c){const{schema:u,parentSchema:d,it:f}=c,{prefixItems:m}=d;f.items=!0,!(0,t.alwaysValidSchema)(f,u)&&(m?(0,r.validateAdditionalItems)(c,m):c.ok((0,n.validateArray)(c)))}};return tp.default=i,tp}var np={},uC;function qJ(){if(uC)return np;uC=1,Object.defineProperty(np,"__esModule",{value:!0});const e=vt(),t=Nt(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:a,max:i}})=>i===void 0?(0,e.str)`must contain at least ${a} valid item(s)`:(0,e.str)`must contain at least ${a} and no more than ${i} valid item(s)`,params:({params:{min:a,max:i}})=>i===void 0?(0,e._)`{minContains: ${a}}`:(0,e._)`{minContains: ${a}, maxContains: ${i}}`},code(a){const{gen:i,schema:c,parentSchema:u,data:d,it:f}=a;let m,p;const{minContains:g,maxContains:y}=u;f.opts.next?(m=g===void 0?1:g,p=y):m=1;const w=i.const("len",(0,e._)`${d}.length`);if(a.setParams({min:m,max:p}),p===void 0&&m===0){(0,t.checkStrictMode)(f,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&m>p){(0,t.checkStrictMode)(f,'"minContains" > "maxContains" is always invalid'),a.fail();return}if((0,t.alwaysValidSchema)(f,c)){let T=(0,e._)`${w} >= ${m}`;p!==void 0&&(T=(0,e._)`${T} && ${w} <= ${p}`),a.pass(T);return}f.items=!0;const b=i.name("valid");p===void 0&&m===1?R(b,()=>i.if(b,()=>i.break())):m===0?(i.let(b,!0),p!==void 0&&i.if((0,e._)`${d}.length > 0`,S)):(i.let(b,!1),S()),a.result(b,()=>a.reset());function S(){const T=i.name("_valid"),O=i.let("count",0);R(T,()=>i.if(T,()=>E(O)))}function R(T,O){i.forRange("i",0,w,C=>{a.subschema({keyword:"contains",dataProp:C,dataPropType:t.Type.Num,compositeRule:!0},T),O()})}function E(T){i.code((0,e._)`${T}++`),p===void 0?i.if((0,e._)`${T} >= ${m}`,()=>i.assign(b,!0).break()):(i.if((0,e._)`${T} > ${p}`,()=>i.assign(b,!1).break()),m===1?i.assign(b,!0):i.if((0,e._)`${T} >= ${m}`,()=>i.assign(b,!0)))}}};return np.default=r,np}var H0={},dC;function HJ(){return dC||(dC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=vt(),n=Nt(),r=Yo();e.error={message:({params:{property:d,depsCount:f,deps:m}})=>{const p=f===1?"property":"properties";return(0,t.str)`must have ${p} ${m} when property ${d} is present`},params:({params:{property:d,depsCount:f,deps:m,missingProperty:p}})=>(0,t._)`{property: ${d},
160
+ missingProperty: ${p},
161
+ depsCount: ${f},
162
+ deps: ${m}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(d){const[f,m]=i(d);c(d,f),u(d,m)}};function i({schema:d}){const f={},m={};for(const p in d){if(p==="__proto__")continue;const g=Array.isArray(d[p])?f:m;g[p]=d[p]}return[f,m]}function c(d,f=d.schema){const{gen:m,data:p,it:g}=d;if(Object.keys(f).length===0)return;const y=m.let("missing");for(const w in f){const b=f[w];if(b.length===0)continue;const S=(0,r.propertyInData)(m,p,w,g.opts.ownProperties);d.setParams({property:w,depsCount:b.length,deps:b.join(", ")}),g.allErrors?m.if(S,()=>{for(const R of b)(0,r.checkReportMissingProp)(d,R)}):(m.if((0,t._)`${S} && (${(0,r.checkMissingProp)(d,b,y)})`),(0,r.reportMissingProp)(d,y),m.else())}}e.validatePropertyDeps=c;function u(d,f=d.schema){const{gen:m,data:p,keyword:g,it:y}=d,w=m.name("valid");for(const b in f)(0,n.alwaysValidSchema)(y,f[b])||(m.if((0,r.propertyInData)(m,p,b,y.opts.ownProperties),()=>{const S=d.subschema({keyword:g,schemaProp:b},w);d.mergeValidEvaluated(S,w)},()=>m.var(w,!0)),d.ok(w))}e.validateSchemaDeps=u,e.default=a})(H0)),H0}var rp={},fC;function GJ(){if(fC)return rp;fC=1,Object.defineProperty(rp,"__esModule",{value:!0});const e=vt(),t=Nt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:a})=>(0,e._)`{propertyName: ${a.propertyName}}`},code(a){const{gen:i,schema:c,data:u,it:d}=a;if((0,t.alwaysValidSchema)(d,c))return;const f=i.name("valid");i.forIn("key",u,m=>{a.setParams({propertyName:m}),a.subschema({keyword:"propertyNames",data:m,dataTypes:["string"],propertyName:m,compositeRule:!0},f),i.if((0,e.not)(f),()=>{a.error(!0),d.allErrors||i.break()})}),a.ok(f)}};return rp.default=r,rp}var op={},hC;function DP(){if(hC)return op;hC=1,Object.defineProperty(op,"__esModule",{value:!0});const e=Yo(),t=vt(),n=ei(),r=Nt(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:c})=>(0,t._)`{additionalProperty: ${c.additionalProperty}}`},code(c){const{gen:u,schema:d,parentSchema:f,data:m,errsCount:p,it:g}=c;if(!p)throw new Error("ajv implementation error");const{allErrors:y,opts:w}=g;if(g.props=!0,w.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(g,d))return;const b=(0,e.allSchemaProperties)(f.properties),S=(0,e.allSchemaProperties)(f.patternProperties);R(),c.ok((0,t._)`${p} === ${n.default.errors}`);function R(){u.forIn("key",m,I=>{!b.length&&!S.length?O(I):u.if(E(I),()=>O(I))})}function E(I){let k;if(b.length>8){const P=(0,r.schemaRefOrVal)(g,f.properties,"properties");k=(0,e.isOwnProperty)(u,P,I)}else b.length?k=(0,t.or)(...b.map(P=>(0,t._)`${I} === ${P}`)):k=t.nil;return S.length&&(k=(0,t.or)(k,...S.map(P=>(0,t._)`${(0,e.usePattern)(c,P)}.test(${I})`))),(0,t.not)(k)}function T(I){u.code((0,t._)`delete ${m}[${I}]`)}function O(I){if(w.removeAdditional==="all"||w.removeAdditional&&d===!1){T(I);return}if(d===!1){c.setParams({additionalProperty:I}),c.error(),y||u.break();return}if(typeof d=="object"&&!(0,r.alwaysValidSchema)(g,d)){const k=u.name("valid");w.removeAdditional==="failing"?(C(I,k,!1),u.if((0,t.not)(k),()=>{c.reset(),T(I)})):(C(I,k),y||u.if((0,t.not)(k),()=>u.break()))}}function C(I,k,P){const $={keyword:"additionalProperties",dataProp:I,dataPropType:r.Type.Str};P===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),c.subschema($,k)}}};return op.default=i,op}var ap={},pC;function ZJ(){if(pC)return ap;pC=1,Object.defineProperty(ap,"__esModule",{value:!0});const e=ug(),t=Yo(),n=Nt(),r=DP(),a={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,parentSchema:d,data:f,it:m}=i;m.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(m,r.default,"additionalProperties"));const p=(0,t.allSchemaProperties)(u);for(const S of p)m.definedProperties.add(S);m.opts.unevaluated&&p.length&&m.props!==!0&&(m.props=n.mergeEvaluated.props(c,(0,n.toHash)(p),m.props));const g=p.filter(S=>!(0,n.alwaysValidSchema)(m,u[S]));if(g.length===0)return;const y=c.name("valid");for(const S of g)w(S)?b(S):(c.if((0,t.propertyInData)(c,f,S,m.opts.ownProperties)),b(S),m.allErrors||c.else().var(y,!0),c.endIf()),i.it.definedProperties.add(S),i.ok(y);function w(S){return m.opts.useDefaults&&!m.compositeRule&&u[S].default!==void 0}function b(S){i.subschema({keyword:"properties",schemaProp:S,dataProp:S},y)}}};return ap.default=a,ap}var sp={},mC;function WJ(){if(mC)return sp;mC=1,Object.defineProperty(sp,"__esModule",{value:!0});const e=Yo(),t=vt(),n=Nt(),r=Nt(),a={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:c,schema:u,data:d,parentSchema:f,it:m}=i,{opts:p}=m,g=(0,e.allSchemaProperties)(u),y=g.filter(O=>(0,n.alwaysValidSchema)(m,u[O]));if(g.length===0||y.length===g.length&&(!m.opts.unevaluated||m.props===!0))return;const w=p.strictSchema&&!p.allowMatchingProperties&&f.properties,b=c.name("valid");m.props!==!0&&!(m.props instanceof t.Name)&&(m.props=(0,r.evaluatedPropsToName)(c,m.props));const{props:S}=m;R();function R(){for(const O of g)w&&E(O),m.allErrors?T(O):(c.var(b,!0),T(O),c.if(b))}function E(O){for(const C in w)new RegExp(O).test(C)&&(0,n.checkStrictMode)(m,`property ${C} matches pattern ${O} (use allowMatchingProperties)`)}function T(O){c.forIn("key",d,C=>{c.if((0,t._)`${(0,e.usePattern)(i,O)}.test(${C})`,()=>{const I=y.includes(O);I||i.subschema({keyword:"patternProperties",schemaProp:O,dataProp:C,dataPropType:r.Type.Str},b),m.opts.unevaluated&&S!==!0?c.assign((0,t._)`${S}[${C}]`,!0):!I&&!m.allErrors&&c.if((0,t.not)(b),()=>c.break())})})}}};return sp.default=a,sp}var ip={},gC;function KJ(){if(gC)return ip;gC=1,Object.defineProperty(ip,"__esModule",{value:!0});const e=Nt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:a,it:i}=n;if((0,e.alwaysValidSchema)(i,a)){n.fail();return}const c=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},c),n.failResult(c,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return ip.default=t,ip}var cp={},vC;function YJ(){if(vC)return cp;vC=1,Object.defineProperty(cp,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Yo().validateUnion,error:{message:"must match a schema in anyOf"}};return cp.default=t,cp}var lp={},yC;function QJ(){if(yC)return lp;yC=1,Object.defineProperty(lp,"__esModule",{value:!0});const e=vt(),t=Nt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:a})=>(0,e._)`{passingSchemas: ${a.passing}}`},code(a){const{gen:i,schema:c,parentSchema:u,it:d}=a;if(!Array.isArray(c))throw new Error("ajv implementation error");if(d.opts.discriminator&&u.discriminator)return;const f=c,m=i.let("valid",!1),p=i.let("passing",null),g=i.name("_valid");a.setParams({passing:p}),i.block(y),a.result(m,()=>a.reset(),()=>a.error(!0));function y(){f.forEach((w,b)=>{let S;(0,t.alwaysValidSchema)(d,w)?i.var(g,!0):S=a.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},g),b>0&&i.if((0,e._)`${g} && ${m}`).assign(m,!1).assign(p,(0,e._)`[${p}, ${b}]`).else(),i.if(g,()=>{i.assign(m,!0),i.assign(p,b),S&&a.mergeEvaluated(S,e.Name)})})}}};return lp.default=r,lp}var up={},_C;function XJ(){if(_C)return up;_C=1,Object.defineProperty(up,"__esModule",{value:!0});const e=Nt(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:a,it:i}=n;if(!Array.isArray(a))throw new Error("ajv implementation error");const c=r.name("valid");a.forEach((u,d)=>{if((0,e.alwaysValidSchema)(i,u))return;const f=n.subschema({keyword:"allOf",schemaProp:d},c);n.ok(c),n.mergeEvaluated(f)})}};return up.default=t,up}var dp={},bC;function JJ(){if(bC)return dp;bC=1,Object.defineProperty(dp,"__esModule",{value:!0});const e=vt(),t=Nt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:c,parentSchema:u,it:d}=i;u.then===void 0&&u.else===void 0&&(0,t.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const f=a(d,"then"),m=a(d,"else");if(!f&&!m)return;const p=c.let("valid",!0),g=c.name("_valid");if(y(),i.reset(),f&&m){const b=c.let("ifClause");i.setParams({ifClause:b}),c.if(g,w("then",b),w("else",b))}else f?c.if(g,w("then")):c.if((0,e.not)(g),w("else"));i.pass(p,()=>i.error(!0));function y(){const b=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},g);i.mergeEvaluated(b)}function w(b,S){return()=>{const R=i.subschema({keyword:b},g);c.assign(p,g),i.mergeValidEvaluated(R,p),S?c.assign(S,(0,e._)`${b}`):i.setParams({ifClause:b})}}}};function a(i,c){const u=i.schema[c];return u!==void 0&&!(0,t.alwaysValidSchema)(i,u)}return dp.default=r,dp}var fp={},wC;function eee(){if(wC)return fp;wC=1,Object.defineProperty(fp,"__esModule",{value:!0});const e=Nt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:a}){r.if===void 0&&(0,e.checkStrictMode)(a,`"${n}" without "if" is ignored`)}};return fp.default=t,fp}var SC;function tee(){if(SC)return Jh;SC=1,Object.defineProperty(Jh,"__esModule",{value:!0});const e=MP(),t=FJ(),n=PP(),r=BJ(),a=qJ(),i=HJ(),c=GJ(),u=DP(),d=ZJ(),f=WJ(),m=KJ(),p=YJ(),g=QJ(),y=XJ(),w=JJ(),b=eee();function S(R=!1){const E=[m.default,p.default,g.default,y.default,w.default,b.default,c.default,u.default,i.default,d.default,f.default];return R?E.push(t.default,r.default):E.push(e.default,n.default),E.push(a.default),E}return Jh.default=S,Jh}var hp={},pp={},EC;function nee(){if(EC)return pp;EC=1,Object.defineProperty(pp,"__esModule",{value:!0});const e=vt(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,a){const{gen:i,data:c,$data:u,schema:d,schemaCode:f,it:m}=r,{opts:p,errSchemaPath:g,schemaEnv:y,self:w}=m;if(!p.validateFormats)return;u?b():S();function b(){const R=i.scopeValue("formats",{ref:w.formats,code:p.code.formats}),E=i.const("fDef",(0,e._)`${R}[${f}]`),T=i.let("fType"),O=i.let("format");i.if((0,e._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>i.assign(T,(0,e._)`${E}.type || "string"`).assign(O,(0,e._)`${E}.validate`),()=>i.assign(T,(0,e._)`"string"`).assign(O,E)),r.fail$data((0,e.or)(C(),I()));function C(){return p.strictSchema===!1?e.nil:(0,e._)`${f} && !${O}`}function I(){const k=y.$async?(0,e._)`(${E}.async ? await ${O}(${c}) : ${O}(${c}))`:(0,e._)`${O}(${c})`,P=(0,e._)`(typeof ${O} == "function" ? ${k} : ${O}.test(${c}))`;return(0,e._)`${O} && ${O} !== true && ${T} === ${a} && !${P}`}}function S(){const R=w.formats[d];if(!R){C();return}if(R===!0)return;const[E,T,O]=I(R);E===a&&r.pass(k());function C(){if(p.strictSchema===!1){w.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${d}" ignored in schema at path "${g}"`}}function I(P){const $=P instanceof RegExp?(0,e.regexpCode)(P):p.code.formats?(0,e._)`${p.code.formats}${(0,e.getProperty)(d)}`:void 0,W=i.scopeValue("formats",{key:d,ref:P,code:$});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,e._)`${W}.validate`]:["string",P,W]}function k(){if(typeof R=="object"&&!(R instanceof RegExp)&&R.async){if(!y.$async)throw new Error("async format in sync schema");return(0,e._)`await ${O}(${c})`}return typeof T=="function"?(0,e._)`${O}(${c})`:(0,e._)`${O}.test(${c})`}}}};return pp.default=n,pp}var RC;function ree(){if(RC)return hp;RC=1,Object.defineProperty(hp,"__esModule",{value:!0});const t=[nee().default];return hp.default=t,hp}var Ti={},xC;function oee(){return xC||(xC=1,Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.contentVocabulary=Ti.metadataVocabulary=void 0,Ti.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Ti.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Ti}var TC;function aee(){if(TC)return jh;TC=1,Object.defineProperty(jh,"__esModule",{value:!0});const e=AJ(),t=VJ(),n=tee(),r=ree(),a=oee(),i=[e.default,t.default,(0,n.default)(),r.default,a.metadataVocabulary,a.contentVocabulary];return jh.default=i,jh}var mp={},Pu={},OC;function see(){if(OC)return Pu;OC=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Pu.DiscrError=e={})),Pu}var CC;function iee(){if(CC)return mp;CC=1,Object.defineProperty(mp,"__esModule",{value:!0});const e=vt(),t=see(),n=ow(),r=dg(),a=Nt(),c={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:u,tagName:d}})=>u===t.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:u,tag:d,tagName:f}})=>(0,e._)`{error: ${u}, tag: ${f}, tagValue: ${d}}`},code(u){const{gen:d,data:f,schema:m,parentSchema:p,it:g}=u,{oneOf:y}=p;if(!g.opts.discriminator)throw new Error("discriminator: requires discriminator option");const w=m.propertyName;if(typeof w!="string")throw new Error("discriminator: requires propertyName");if(m.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const b=d.let("valid",!1),S=d.const("tag",(0,e._)`${f}${(0,e.getProperty)(w)}`);d.if((0,e._)`typeof ${S} == "string"`,()=>R(),()=>u.error(!1,{discrError:t.DiscrError.Tag,tag:S,tagName:w})),u.ok(b);function R(){const O=T();d.if(!1);for(const C in O)d.elseIf((0,e._)`${S} === ${C}`),d.assign(b,E(O[C]));d.else(),u.error(!1,{discrError:t.DiscrError.Mapping,tag:S,tagName:w}),d.endIf()}function E(O){const C=d.name("valid"),I=u.subschema({keyword:"oneOf",schemaProp:O},C);return u.mergeEvaluated(I,e.Name),C}function T(){var O;const C={},I=P(p);let k=!0;for(let V=0;V<y.length;V++){let G=y[V];if(G?.$ref&&!(0,a.schemaHasRulesButRef)(G,g.self.RULES)){const J=G.$ref;if(G=n.resolveRef.call(g.self,g.schemaEnv.root,g.baseId,J),G instanceof n.SchemaEnv&&(G=G.schema),G===void 0)throw new r.default(g.opts.uriResolver,g.baseId,J)}const U=(O=G?.properties)===null||O===void 0?void 0:O[w];if(typeof U!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${w}"`);k=k&&(I||P(G)),$(U,V)}if(!k)throw new Error(`discriminator: "${w}" must be required`);return C;function P({required:V}){return Array.isArray(V)&&V.includes(w)}function $(V,G){if(V.const)W(V.const,G);else if(V.enum)for(const U of V.enum)W(U,G);else throw new Error(`discriminator: "properties/${w}" must have "const" or "enum"`)}function W(V,G){if(typeof V!="string"||V in C)throw new Error(`discriminator: "${w}" values must be unique strings`);C[V]=G}}}};return mp.default=c,mp}const cee="http://json-schema.org/draft-07/schema#",lee="http://json-schema.org/draft-07/schema#",uee="Core schema meta-schema",dee={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},fee=["object","boolean"],hee={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},pee={$schema:cee,$id:lee,title:uee,definitions:dee,type:fee,properties:hee,default:!0};var AC;function LP(){return AC||(AC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=TJ(),r=aee(),a=iee(),i=pee,c=["/properties"],u="http://json-schema.org/draft-07/schema";class d extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(w=>this.addVocabulary(w)),this.opts.discriminator&&this.addKeyword(a.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const w=this.opts.$data?this.$dataMetaSchema(i,c):i;this.addMetaSchema(w,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=d,e.exports=t=d,e.exports.Ajv=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var f=ug();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var m=vt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return m.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return m.CodeGen}});var p=rw();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var g=dg();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})(Nh,Nh.exports)),Nh.exports}var mee=LP();const gee=Ga(mee);var gp={exports:{}},G0={},IC;function vee(){return IC||(IC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(V,G){return{validate:V,compare:G}}e.fullFormats={date:t(i,c),time:t(d(!0),f),"date-time":t(g(!0),y),"iso-time":t(d(),m),"iso-date-time":t(g(),w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:R,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:W,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:T,int32:{type:"number",validate:I},int64:{type:"number",validate:k},float:{type:"number",validate:P},double:{type:"number",validate:P},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,c),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,m),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(V){return V%4===0&&(V%100!==0||V%400===0)}const r=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,a=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(V){const G=r.exec(V);if(!G)return!1;const U=+G[1],J=+G[2],le=+G[3];return J>=1&&J<=12&&le>=1&&le<=(J===2&&n(U)?29:a[J])}function c(V,G){if(V&&G)return V>G?1:V<G?-1:0}const u=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function d(V){return function(U){const J=u.exec(U);if(!J)return!1;const le=+J[1],F=+J[2],Y=+J[3],se=J[4],fe=J[5]==="-"?-1:1,K=+(J[6]||0),D=+(J[7]||0);if(K>23||D>59||V&&!se)return!1;if(le<=23&&F<=59&&Y<60)return!0;const q=F-D*fe,B=le-K*fe-(q<0?1:0);return(B===23||B===-1)&&(q===59||q===-1)&&Y<61}}function f(V,G){if(!(V&&G))return;const U=new Date("2020-01-01T"+V).valueOf(),J=new Date("2020-01-01T"+G).valueOf();if(U&&J)return U-J}function m(V,G){if(!(V&&G))return;const U=u.exec(V),J=u.exec(G);if(U&&J)return V=U[1]+U[2]+U[3],G=J[1]+J[2]+J[3],V>G?1:V<G?-1:0}const p=/t|\s/i;function g(V){const G=d(V);return function(J){const le=J.split(p);return le.length===2&&i(le[0])&&G(le[1])}}function y(V,G){if(!(V&&G))return;const U=new Date(V).valueOf(),J=new Date(G).valueOf();if(U&&J)return U-J}function w(V,G){if(!(V&&G))return;const[U,J]=V.split(p),[le,F]=G.split(p),Y=c(U,le);if(Y!==void 0)return Y||f(J,F)}const b=/\/|:/,S=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function R(V){return b.test(V)&&S.test(V)}const E=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function T(V){return E.lastIndex=0,E.test(V)}const O=-2147483648,C=2**31-1;function I(V){return Number.isInteger(V)&&V<=C&&V>=O}function k(V){return Number.isInteger(V)}function P(){return!0}const $=/[^\\]\\Z/;function W(V){if($.test(V))return!1;try{return new RegExp(V),!0}catch{return!1}}})(G0)),G0}var Z0={},kC;function yee(){return kC||(kC=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=LP(),n=vt(),r=n.operators,a={formatMaximum:{okStr:"<=",ok:r.LTE,fail:r.GT},formatMinimum:{okStr:">=",ok:r.GTE,fail:r.LT},formatExclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},formatExclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},i={message:({keyword:u,schemaCode:d})=>(0,n.str)`should be ${a[u].okStr} ${d}`,params:({keyword:u,schemaCode:d})=>(0,n._)`{comparison: ${a[u].okStr}, limit: ${d}}`};e.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:i,code(u){const{gen:d,data:f,schemaCode:m,keyword:p,it:g}=u,{opts:y,self:w}=g;if(!y.validateFormats)return;const b=new t.KeywordCxt(g,w.RULES.all.format.definition,"format");b.$data?S():R();function S(){const T=d.scopeValue("formats",{ref:w.formats,code:y.code.formats}),O=d.const("fmt",(0,n._)`${T}[${b.schemaCode}]`);u.fail$data((0,n.or)((0,n._)`typeof ${O} != "object"`,(0,n._)`${O} instanceof RegExp`,(0,n._)`typeof ${O}.compare != "function"`,E(O)))}function R(){const T=b.schema,O=w.formats[T];if(!O||O===!0)return;if(typeof O!="object"||O instanceof RegExp||typeof O.compare!="function")throw new Error(`"${p}": format "${T}" does not define "compare" function`);const C=d.scopeValue("formats",{key:T,ref:O,code:y.code.formats?(0,n._)`${y.code.formats}${(0,n.getProperty)(T)}`:void 0});u.fail$data(E(C))}function E(T){return(0,n._)`${T}.compare(${f}, ${m}) ${a[p].fail} 0`}},dependencies:["format"]};const c=u=>(u.addKeyword(e.formatLimitDefinition),u);e.default=c})(Z0)),Z0}var NC;function _ee(){return NC||(NC=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=vee(),r=yee(),a=vt(),i=new a.Name("fullFormats"),c=new a.Name("fastFormats"),u=(f,m={keywords:!0})=>{if(Array.isArray(m))return d(f,m,n.fullFormats,i),f;const[p,g]=m.mode==="fast"?[n.fastFormats,c]:[n.fullFormats,i],y=m.formats||n.formatNames;return d(f,y,p,g),m.keywords&&(0,r.default)(f),f};u.get=(f,m="full")=>{const g=(m==="fast"?n.fastFormats:n.fullFormats)[f];if(!g)throw new Error(`Unknown format "${f}"`);return g};function d(f,m,p,g){var y,w;(y=(w=f.opts.code).formats)!==null&&y!==void 0||(w.formats=(0,a._)`require("ajv-formats/dist/formats").${g}`);for(const b of m)f.addFormat(b,p[b])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u})(gp,gp.exports)),gp.exports}var bee=_ee();const wee=Ga(bee);function See(){const e=new gee({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return wee(e),e}class Eee{constructor(t){this._ajv=t??See()}getValidator(t){const n="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return r=>n(r)?{valid:!0,data:r,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(n.errors)}}}class Ree{constructor(t){this._client=t}async*callToolStream(t,n=ig,r){const a=this._client,i={...r,task:r?.task??(a.isToolTask(t.name)?{}:void 0)},c=a.requestStream({method:"tools/call",params:t},n,i),u=a.getToolOutputValidator(t.name);for await(const d of c){if(d.type==="result"&&u){const f=d.result;if(!f.structuredContent&&!f.isError){yield{type:"error",error:new Qe(rt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`)};return}if(f.structuredContent)try{const m=u(f.structuredContent);if(!m.valid){yield{type:"error",error:new Qe(rt.InvalidParams,`Structured content does not match the tool's output schema: ${m.errorMessage}`)};return}}catch(m){if(m instanceof Qe){yield{type:"error",error:m};return}yield{type:"error",error:new Qe(rt.InvalidParams,`Failed to validate structured content: ${m instanceof Error?m.message:String(m)}`)};return}}yield d}}async getTask(t,n){return this._client.getTask({taskId:t},n)}async getTaskResult(t,n,r){return this._client.getTaskResult({taskId:t},n,r)}async listTasks(t,n){return this._client.listTasks(t?{cursor:t}:void 0,n)}async cancelTask(t,n){return this._client.cancelTask({taskId:t},n)}requestStream(t,n,r){return this._client.requestStream(t,n,r)}}function xee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${n} does not support task creation for tools/call (required for ${t})`);break}}function Tee(e,t,n){if(!e)throw new Error(`${n} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${n} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${n} does not support task creation for elicitation/create (required for ${t})`);break}}function Ap(e,t){if(!(!e||t===null||typeof t!="object")){if(e.type==="object"&&e.properties&&typeof e.properties=="object"){const n=t,r=e.properties;for(const a of Object.keys(r)){const i=r[a];n[a]===void 0&&Object.prototype.hasOwnProperty.call(i,"default")&&(n[a]=i.default),n[a]!==void 0&&Ap(i,n[a])}}if(Array.isArray(e.anyOf))for(const n of e.anyOf)typeof n!="boolean"&&Ap(n,t);if(Array.isArray(e.oneOf))for(const n of e.oneOf)typeof n!="boolean"&&Ap(n,t)}}function jP(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};const t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}let $P=class extends lJ{constructor(t,n){super(n),this._clientInfo=t,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=n?.capabilities??{},this._jsonSchemaValidator=n?.jsonSchemaValidator??new Eee,n?.listChanged&&(this._pendingListChangedConfig=n.listChanged)}_setupListChangedHandlers(t){t.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",wP,t.tools,async()=>(await this.listTools()).tools),t.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",_P,t.prompts,async()=>(await this.listPrompts()).prompts),t.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",gP,t.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new Ree(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=uJ(this._capabilities,t)}setRequestHandler(t,n){const a=tP(t)?.method;if(!a)throw new Error("Schema is missing a method literal");let i;if(rg(a)){const u=a;i=u._zod?.def?.value??u.value}else{const u=a;i=u._def?.value??u.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");const c=i;if(c==="elicitation/create"){const u=async(d,f)=>{const m=Is(TP,d);if(!m.success){const E=m.error instanceof Error?m.error.message:String(m.error);throw new Qe(rt.InvalidParams,`Invalid elicitation request: ${E}`)}const{params:p}=m.data;p.mode=p.mode??"form";const{supportsFormMode:g,supportsUrlMode:y}=jP(this._capabilities.elicitation);if(p.mode==="form"&&!g)throw new Qe(rt.InvalidParams,"Client does not support form-mode elicitation requests");if(p.mode==="url"&&!y)throw new Qe(rt.InvalidParams,"Client does not support URL-mode elicitation requests");const w=await Promise.resolve(n(d,f));if(p.task){const E=Is(gd,w);if(!E.success){const T=E.error instanceof Error?E.error.message:String(E.error);throw new Qe(rt.InvalidParams,`Invalid task creation result: ${T}`)}return E.data}const b=Is(OP,w);if(!b.success){const E=b.error instanceof Error?b.error.message:String(b.error);throw new Qe(rt.InvalidParams,`Invalid elicitation result: ${E}`)}const S=b.data,R=p.mode==="form"?p.requestedSchema:void 0;if(p.mode==="form"&&S.action==="accept"&&S.content&&R&&this._capabilities.elicitation?.form?.applyDefaults)try{Ap(R,S.content)}catch{}return S};return super.setRequestHandler(t,u)}if(c==="sampling/createMessage"){const u=async(d,f)=>{const m=Is(EP,d);if(!m.success){const S=m.error instanceof Error?m.error.message:String(m.error);throw new Qe(rt.InvalidParams,`Invalid sampling request: ${S}`)}const{params:p}=m.data,g=await Promise.resolve(n(d,f));if(p.task){const S=Is(gd,g);if(!S.success){const R=S.error instanceof Error?S.error.message:String(S.error);throw new Qe(rt.InvalidParams,`Invalid task creation result: ${R}`)}return S.data}const w=p.tools||p.toolChoice?xP:RP,b=Is(w,g);if(!b.success){const S=b.error instanceof Error?b.error.message:String(b.error);throw new Qe(rt.InvalidParams,`Invalid sampling result: ${S}`)}return b.data};return super.setRequestHandler(t,u)}return super.setRequestHandler(t,n)}assertCapability(t,n){if(!this._serverCapabilities?.[t])throw new Error(`Server does not support ${t} (required for ${n})`)}async connect(t,n){if(await super.connect(t),t.sessionId===void 0)try{const r=await this.request({method:"initialize",params:{protocolVersion:og,capabilities:this._capabilities,clientInfo:this._clientInfo}},iP,n);if(r===void 0)throw new Error(`Server sent invalid initialize result: ${r}`);if(!IQ.includes(r.protocolVersion))throw new Error(`Server's protocol version is not supported: ${r.protocolVersion}`);this._serverCapabilities=r.capabilities,this._serverVersion=r.serverInfo,t.setProtocolVersion&&t.setProtocolVersion(r.protocolVersion),this._instructions=r.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(r){throw this.close(),r}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(t){switch(t){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${t})`);if(t==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${t})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${t})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){xee(this._serverCapabilities?.tasks?.requests,t,"Server")}assertTaskHandlerCapability(t){this._capabilities&&Tee(this._capabilities.tasks?.requests,t,"Client")}async ping(t){return this.request({method:"ping"},nl,t)}async complete(t,n){return this.request({method:"completion/complete",params:t},CP,n)}async setLoggingLevel(t,n){return this.request({method:"logging/setLevel",params:{level:t}},nl,n)}async getPrompt(t,n){return this.request({method:"prompts/get",params:t},yP,n)}async listPrompts(t,n){return this.request({method:"prompts/list",params:t},vP,n)}async listResources(t,n){return this.request({method:"resources/list",params:t},hP,n)}async listResourceTemplates(t,n){return this.request({method:"resources/templates/list",params:t},pP,n)}async readResource(t,n){return this.request({method:"resources/read",params:t},mP,n)}async subscribeResource(t,n){return this.request({method:"resources/subscribe",params:t},nl,n)}async unsubscribeResource(t,n){return this.request({method:"resources/unsubscribe",params:t},nl,n)}async callTool(t,n=ig,r){if(this.isToolTaskRequired(t.name))throw new Qe(rt.InvalidRequest,`Tool "${t.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const a=await this.request({method:"tools/call",params:t},n,r),i=this.getToolOutputValidator(t.name);if(i){if(!a.structuredContent&&!a.isError)throw new Qe(rt.InvalidRequest,`Tool ${t.name} has an output schema but did not return structured content`);if(a.structuredContent)try{const c=i(a.structuredContent);if(!c.valid)throw new Qe(rt.InvalidParams,`Structured content does not match the tool's output schema: ${c.errorMessage}`)}catch(c){throw c instanceof Qe?c:new Qe(rt.InvalidParams,`Failed to validate structured content: ${c instanceof Error?c.message:String(c)}`)}}return a}isToolTask(t){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(t):!1}isToolTaskRequired(t){return this._cachedRequiredTaskTools.has(t)}cacheToolMetadata(t){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const n of t){if(n.outputSchema){const a=this._jsonSchemaValidator.getValidator(n.outputSchema);this._cachedToolOutputValidators.set(n.name,a)}const r=n.execution?.taskSupport;(r==="required"||r==="optional")&&this._cachedKnownTaskTools.add(n.name),r==="required"&&this._cachedRequiredTaskTools.add(n.name)}}getToolOutputValidator(t){return this._cachedToolOutputValidators.get(t)}async listTools(t,n){const r=await this.request({method:"tools/list",params:t},nw,n);return this.cacheToolMetadata(r.tools),r}_setupListChangedHandler(t,n,r,a){const i=RX.safeParse(r);if(!i.success)throw new Error(`Invalid ${t} listChanged options: ${i.error.message}`);if(typeof r.onChanged!="function")throw new Error(`Invalid ${t} listChanged options: onChanged must be a function`);const{autoRefresh:c,debounceMs:u}=i.data,{onChanged:d}=r,f=async()=>{if(!c){d(null,null);return}try{const p=await a();d(null,p)}catch(p){const g=p instanceof Error?p:new Error(String(p));d(g,null)}},m=()=>{if(u){const p=this._listChangedDebounceTimers.get(t);p&&clearTimeout(p);const g=setTimeout(f,u);this._listChangedDebounceTimers.set(t,g)}else f()};this.setNotificationHandler(n,m)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}};const qae=Object.freeze(Object.defineProperty({__proto__:null,Client:$P,getSupportedElicitationModes:jP},Symbol.toStringTag,{value:"Module"}));function gm(e){return e?e instanceof Headers?Object.fromEntries(e.entries()):Array.isArray(e)?Object.fromEntries(e):{...e}:{}}function UP(e=fetch,t){return t?async(n,r)=>{const a={...t,...r,headers:r?.headers?{...gm(t.headers),...gm(r.headers)}:t.headers};return e(n,a)}:e}let sw;sw=globalThis.crypto;async function Oee(e){return(await sw).getRandomValues(new Uint8Array(e))}async function Cee(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",n=Math.pow(2,8)-Math.pow(2,8)%t.length;let r="";for(;r.length<e;){const a=await Oee(e-r.length);for(const i of a)i<n&&(r+=t[i%t.length])}return r}async function Aee(e){return await Cee(e)}async function Iee(e){const t=await(await sw).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function kee(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await Aee(e),n=await Iee(t);return{code_verifier:t,code_challenge:n}}const or=az().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Yz.custom,message:"URL must be parseable",fatal:!0}),s8}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Nee=sr({resource:M().url(),authorization_servers:we(or).optional(),jwks_uri:M().url().optional(),scopes_supported:we(M()).optional(),bearer_methods_supported:we(M()).optional(),resource_signing_alg_values_supported:we(M()).optional(),resource_name:M().optional(),resource_documentation:M().optional(),resource_policy_uri:M().url().optional(),resource_tos_uri:M().url().optional(),tls_client_certificate_bound_access_tokens:Xe().optional(),authorization_details_types_supported:we(M()).optional(),dpop_signing_alg_values_supported:we(M()).optional(),dpop_bound_access_tokens_required:Xe().optional()}),zP=sr({issuer:M(),authorization_endpoint:or,token_endpoint:or,registration_endpoint:or.optional(),scopes_supported:we(M()).optional(),response_types_supported:we(M()),response_modes_supported:we(M()).optional(),grant_types_supported:we(M()).optional(),token_endpoint_auth_methods_supported:we(M()).optional(),token_endpoint_auth_signing_alg_values_supported:we(M()).optional(),service_documentation:or.optional(),revocation_endpoint:or.optional(),revocation_endpoint_auth_methods_supported:we(M()).optional(),revocation_endpoint_auth_signing_alg_values_supported:we(M()).optional(),introspection_endpoint:M().optional(),introspection_endpoint_auth_methods_supported:we(M()).optional(),introspection_endpoint_auth_signing_alg_values_supported:we(M()).optional(),code_challenge_methods_supported:we(M()).optional(),client_id_metadata_document_supported:Xe().optional()}),Mee=sr({issuer:M(),authorization_endpoint:or,token_endpoint:or,userinfo_endpoint:or.optional(),jwks_uri:or,registration_endpoint:or.optional(),scopes_supported:we(M()).optional(),response_types_supported:we(M()),response_modes_supported:we(M()).optional(),grant_types_supported:we(M()).optional(),acr_values_supported:we(M()).optional(),subject_types_supported:we(M()),id_token_signing_alg_values_supported:we(M()),id_token_encryption_alg_values_supported:we(M()).optional(),id_token_encryption_enc_values_supported:we(M()).optional(),userinfo_signing_alg_values_supported:we(M()).optional(),userinfo_encryption_alg_values_supported:we(M()).optional(),userinfo_encryption_enc_values_supported:we(M()).optional(),request_object_signing_alg_values_supported:we(M()).optional(),request_object_encryption_alg_values_supported:we(M()).optional(),request_object_encryption_enc_values_supported:we(M()).optional(),token_endpoint_auth_methods_supported:we(M()).optional(),token_endpoint_auth_signing_alg_values_supported:we(M()).optional(),display_values_supported:we(M()).optional(),claim_types_supported:we(M()).optional(),claims_supported:we(M()).optional(),service_documentation:M().optional(),claims_locales_supported:we(M()).optional(),ui_locales_supported:we(M()).optional(),claims_parameter_supported:Xe().optional(),request_parameter_supported:Xe().optional(),request_uri_parameter_supported:Xe().optional(),require_request_uri_registration:Xe().optional(),op_policy_uri:or.optional(),op_tos_uri:or.optional(),client_id_metadata_document_supported:Xe().optional()}),Pee=ie({...Mee.shape,...zP.pick({code_challenge_methods_supported:!0}).shape}),Dee=ie({access_token:M(),id_token:M().optional(),token_type:M(),expires_in:Ck().optional(),scope:M().optional(),refresh_token:M().optional()}).strip(),Lee=ie({error:M(),error_description:M().optional(),error_uri:M().optional()}),MC=or.optional().or(je("").transform(()=>{})),jee=ie({redirect_uris:we(or),token_endpoint_auth_method:M().optional(),grant_types:we(M()).optional(),response_types:we(M()).optional(),client_name:M().optional(),client_uri:or.optional(),logo_uri:MC,scope:M().optional(),contacts:we(M()).optional(),tos_uri:MC,policy_uri:M().optional(),jwks_uri:or.optional(),jwks:eo().optional(),software_id:M().optional(),software_version:M().optional(),software_statement:M().optional()}).strip(),$ee=ie({client_id:M(),client_secret:M().optional(),client_id_issued_at:$e().optional(),client_secret_expires_at:$e().optional()}).strip(),Uee=jee.merge($ee);ie({error:M(),error_description:M().optional()}).strip();ie({token:M(),token_type_hint:M().optional()}).strip();function zee(e){const t=typeof e=="string"?new URL(e):new URL(e.href);return t.hash="",t}function Vee({requestedResource:e,configuredResource:t}){const n=typeof e=="string"?new URL(e):new URL(e.href),r=typeof t=="string"?new URL(t):new URL(t.href);if(n.origin!==r.origin||n.pathname.length<r.pathname.length)return!1;const a=n.pathname.endsWith("/")?n.pathname:n.pathname+"/",i=r.pathname.endsWith("/")?r.pathname:r.pathname+"/";return a.startsWith(i)}class Yn extends Error{constructor(t,n){super(t),this.errorUri=n,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class W_ extends Yn{}W_.errorCode="invalid_request";class vm extends Yn{}vm.errorCode="invalid_client";class ym extends Yn{}ym.errorCode="invalid_grant";class _m extends Yn{}_m.errorCode="unauthorized_client";class K_ extends Yn{}K_.errorCode="unsupported_grant_type";class Y_ extends Yn{}Y_.errorCode="invalid_scope";class Q_ extends Yn{}Q_.errorCode="access_denied";class bl extends Yn{}bl.errorCode="server_error";class X_ extends Yn{}X_.errorCode="temporarily_unavailable";class J_ extends Yn{}J_.errorCode="unsupported_response_type";class eb extends Yn{}eb.errorCode="unsupported_token_type";class tb extends Yn{}tb.errorCode="invalid_token";class nb extends Yn{}nb.errorCode="method_not_allowed";class rb extends Yn{}rb.errorCode="too_many_requests";class bm extends Yn{}bm.errorCode="invalid_client_metadata";class ob extends Yn{}ob.errorCode="insufficient_scope";class ab extends Yn{}ab.errorCode="invalid_target";const Fee={[W_.errorCode]:W_,[vm.errorCode]:vm,[ym.errorCode]:ym,[_m.errorCode]:_m,[K_.errorCode]:K_,[Y_.errorCode]:Y_,[Q_.errorCode]:Q_,[bl.errorCode]:bl,[X_.errorCode]:X_,[J_.errorCode]:J_,[eb.errorCode]:eb,[tb.errorCode]:tb,[nb.errorCode]:nb,[rb.errorCode]:rb,[bm.errorCode]:bm,[ob.errorCode]:ob,[ab.errorCode]:ab};class zo extends Error{constructor(t){super(t??"Unauthorized")}}function Bee(e){return["client_secret_basic","client_secret_post","none"].includes(e)}const W0="code",K0="S256";function qee(e,t){const n=e.client_secret!==void 0;return t.length===0?n?"client_secret_post":"none":"token_endpoint_auth_method"in e&&e.token_endpoint_auth_method&&Bee(e.token_endpoint_auth_method)&&t.includes(e.token_endpoint_auth_method)?e.token_endpoint_auth_method:n&&t.includes("client_secret_basic")?"client_secret_basic":n&&t.includes("client_secret_post")?"client_secret_post":t.includes("none")?"none":n?"client_secret_post":"none"}function Hee(e,t,n,r){const{client_id:a,client_secret:i}=t;switch(e){case"client_secret_basic":Gee(a,i,n);return;case"client_secret_post":Zee(a,i,r);return;case"none":Wee(a,r);return;default:throw new Error(`Unsupported client authentication method: ${e}`)}}function Gee(e,t,n){if(!t)throw new Error("client_secret_basic authentication requires a client_secret");const r=btoa(`${e}:${t}`);n.set("Authorization",`Basic ${r}`)}function Zee(e,t,n){n.set("client_id",e),t&&n.set("client_secret",t)}function Wee(e,t){t.set("client_id",e)}async function VP(e){const t=e instanceof Response?e.status:void 0,n=e instanceof Response?await e.text():e;try{const r=Lee.parse(JSON.parse(n)),{error:a,error_description:i,error_uri:c}=r,u=Fee[a]||bl;return new u(i||"",c)}catch(r){const a=`${t?`HTTP ${t}: `:""}Invalid OAuth error response: ${r}. Raw body: ${n}`;return new bl(a)}}async function Ds(e,t){try{return await Y0(e,t)}catch(n){if(n instanceof vm||n instanceof _m)return await e.invalidateCredentials?.("all"),await Y0(e,t);if(n instanceof ym)return await e.invalidateCredentials?.("tokens"),await Y0(e,t);throw n}}async function Y0(e,{serverUrl:t,authorizationCode:n,scope:r,resourceMetadataUrl:a,fetchFn:i}){const c=await e.discoveryState?.();let u,d,f,m=a;if(!m&&c?.resourceMetadataUrl&&(m=new URL(c.resourceMetadataUrl)),c?.authorizationServerUrl){if(d=c.authorizationServerUrl,u=c.resourceMetadata,f=c.authorizationServerMetadata??await lw(d,{fetchFn:i}),!u)try{u=await iw(t,{resourceMetadataUrl:m},i)}catch{}(f!==c.authorizationServerMetadata||u!==c.resourceMetadata)&&await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:u,authorizationServerMetadata:f})}else{const E=await tte(t,{resourceMetadataUrl:m,fetchFn:i});d=E.authorizationServerUrl,f=E.authorizationServerMetadata,u=E.resourceMetadata,await e.saveDiscoveryState?.({authorizationServerUrl:String(d),resourceMetadataUrl:m?.toString(),resourceMetadata:u,authorizationServerMetadata:f})}const p=await Yee(t,e,u);let g=await Promise.resolve(e.clientInformation());if(!g){if(n!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const E=f?.client_id_metadata_document_supported===!0,T=e.clientMetadataUrl;if(T&&!Kee(T))throw new bm(`clientMetadataUrl must be a valid HTTPS URL with a non-root pathname, got: ${T}`);if(E&&T)g={client_id:T},await e.saveClientInformation?.(g);else{if(!e.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const C=await ste(d,{metadata:f,clientMetadata:e.clientMetadata,fetchFn:i});await e.saveClientInformation(C),g=C}}const y=!e.redirectUrl;if(n!==void 0||y){const E=await ate(e,d,{metadata:f,resource:p,authorizationCode:n,fetchFn:i});return await e.saveTokens(E),"AUTHORIZED"}const w=await e.tokens();if(w?.refresh_token)try{const E=await ote(d,{metadata:f,clientInformation:g,refreshToken:w.refresh_token,resource:p,addClientAuthentication:e.addClientAuthentication,fetchFn:i});return await e.saveTokens(E),"AUTHORIZED"}catch(E){if(!(!(E instanceof Yn)||E instanceof bl))throw E}const b=e.state?await e.state():void 0,{authorizationUrl:S,codeVerifier:R}=await nte(d,{metadata:f,clientInformation:g,state:b,redirectUrl:e.redirectUrl,scope:r||u?.scopes_supported?.join(" ")||e.clientMetadata.scope,resource:p});return await e.saveCodeVerifier(R),await e.redirectToAuthorization(S),"REDIRECT"}function Kee(e){if(!e)return!1;try{const t=new URL(e);return t.protocol==="https:"&&t.pathname!=="/"}catch{return!1}}async function Yee(e,t,n){const r=zee(e);if(t.validateResourceURL)return await t.validateResourceURL(r,n?.resource);if(n){if(!Vee({requestedResource:r,configuredResource:n.resource}))throw new Error(`Protected resource ${n.resource} does not match expected ${r} (or origin)`);return new URL(n.resource)}}function wm(e){const t=e.headers.get("WWW-Authenticate");if(!t)return{};const[n,r]=t.split(" ");if(n.toLowerCase()!=="bearer"||!r)return{};const a=Q0(e,"resource_metadata")||void 0;let i;if(a)try{i=new URL(a)}catch{}const c=Q0(e,"scope")||void 0,u=Q0(e,"error")||void 0;return{resourceMetadataUrl:i,scope:c,error:u}}function Q0(e,t){const n=e.headers.get("WWW-Authenticate");if(!n)return null;const r=new RegExp(`${t}=(?:"([^"]+)"|([^\\s,]+))`),a=n.match(r);return a?a[1]||a[2]:null}async function iw(e,t,n=fetch){const r=await Jee(e,"oauth-protected-resource",n,{protocolVersion:t?.protocolVersion,metadataUrl:t?.resourceMetadataUrl});if(!r||r.status===404)throw await r?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!r.ok)throw await r.body?.cancel(),new Error(`HTTP ${r.status} trying to load well-known OAuth protected resource metadata.`);return Nee.parse(await r.json())}async function cw(e,t,n=fetch){try{return await n(e,{headers:t})}catch(r){if(r instanceof TypeError)return t?cw(e,void 0,n):void 0;throw r}}function Qee(e,t="",n={}){return t.endsWith("/")&&(t=t.slice(0,-1)),n.prependPathname?`${t}/.well-known/${e}`:`/.well-known/${e}${t}`}async function PC(e,t,n=fetch){return await cw(e,{"MCP-Protocol-Version":t},n)}function Xee(e,t){return!e||e.status>=400&&e.status<500&&t!=="/"}async function Jee(e,t,n,r){const a=new URL(e),i=r?.protocolVersion??og;let c;if(r?.metadataUrl)c=new URL(r.metadataUrl);else{const d=Qee(t,a.pathname);c=new URL(d,r?.metadataServerUrl??a),c.search=a.search}let u=await PC(c,i,n);if(!r?.metadataUrl&&Xee(u,a.pathname)){const d=new URL(`/.well-known/${t}`,a);u=await PC(d,i,n)}return u}function ete(e){const t=typeof e=="string"?new URL(e):e,n=t.pathname!=="/",r=[];if(!n)return r.push({url:new URL("/.well-known/oauth-authorization-server",t.origin),type:"oauth"}),r.push({url:new URL("/.well-known/openid-configuration",t.origin),type:"oidc"}),r;let a=t.pathname;return a.endsWith("/")&&(a=a.slice(0,-1)),r.push({url:new URL(`/.well-known/oauth-authorization-server${a}`,t.origin),type:"oauth"}),r.push({url:new URL(`/.well-known/openid-configuration${a}`,t.origin),type:"oidc"}),r.push({url:new URL(`${a}/.well-known/openid-configuration`,t.origin),type:"oidc"}),r}async function lw(e,{fetchFn:t=fetch,protocolVersion:n=og}={}){const r={"MCP-Protocol-Version":n,Accept:"application/json"},a=ete(e);for(const{url:i,type:c}of a){const u=await cw(i,r,t);if(u){if(!u.ok){if(await u.body?.cancel(),u.status>=400&&u.status<500)continue;throw new Error(`HTTP ${u.status} trying to load ${c==="oauth"?"OAuth":"OpenID provider"} metadata from ${i}`)}return c==="oauth"?zP.parse(await u.json()):Pee.parse(await u.json())}}}async function tte(e,t){let n,r;try{n=await iw(e,{resourceMetadataUrl:t?.resourceMetadataUrl},t?.fetchFn),n.authorization_servers&&n.authorization_servers.length>0&&(r=n.authorization_servers[0])}catch{}r||(r=String(new URL("/",e)));const a=await lw(r,{fetchFn:t?.fetchFn});return{authorizationServerUrl:r,authorizationServerMetadata:a,resourceMetadata:n}}async function nte(e,{metadata:t,clientInformation:n,redirectUrl:r,scope:a,state:i,resource:c}){let u;if(t){if(u=new URL(t.authorization_endpoint),!t.response_types_supported.includes(W0))throw new Error(`Incompatible auth server: does not support response type ${W0}`);if(t.code_challenge_methods_supported&&!t.code_challenge_methods_supported.includes(K0))throw new Error(`Incompatible auth server: does not support code challenge method ${K0}`)}else u=new URL("/authorize",e);const d=await kee(),f=d.code_verifier,m=d.code_challenge;return u.searchParams.set("response_type",W0),u.searchParams.set("client_id",n.client_id),u.searchParams.set("code_challenge",m),u.searchParams.set("code_challenge_method",K0),u.searchParams.set("redirect_uri",String(r)),i&&u.searchParams.set("state",i),a&&u.searchParams.set("scope",a),a?.includes("offline_access")&&u.searchParams.append("prompt","consent"),c&&u.searchParams.set("resource",c.href),{authorizationUrl:u,codeVerifier:f}}function FP(e,t,n){return new URLSearchParams({grant_type:"authorization_code",code:e,code_verifier:t,redirect_uri:String(n)})}async function uw(e,{metadata:t,tokenRequestParams:n,clientInformation:r,addClientAuthentication:a,resource:i,fetchFn:c}){const u=t?.token_endpoint?new URL(t.token_endpoint):new URL("/token",e),d=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(i&&n.set("resource",i.href),a)await a(d,n,u,t);else if(r){const m=t?.token_endpoint_auth_methods_supported??[],p=qee(r,m);Hee(p,r,d,n)}const f=await(c??fetch)(u,{method:"POST",headers:d,body:n});if(!f.ok)throw await VP(f);return Dee.parse(await f.json())}async function rte(e,{metadata:t,clientInformation:n,authorizationCode:r,codeVerifier:a,redirectUri:i,resource:c,addClientAuthentication:u,fetchFn:d}){const f=FP(r,a,i);return uw(e,{metadata:t,tokenRequestParams:f,clientInformation:n,addClientAuthentication:u,resource:c,fetchFn:d})}async function ote(e,{metadata:t,clientInformation:n,refreshToken:r,resource:a,addClientAuthentication:i,fetchFn:c}){const u=new URLSearchParams({grant_type:"refresh_token",refresh_token:r}),d=await uw(e,{metadata:t,tokenRequestParams:u,clientInformation:n,addClientAuthentication:i,resource:a,fetchFn:c});return{refresh_token:r,...d}}async function ate(e,t,{metadata:n,resource:r,authorizationCode:a,fetchFn:i}={}){const c=e.clientMetadata.scope;let u;if(e.prepareTokenRequest&&(u=await e.prepareTokenRequest(c)),!u){if(!a)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!e.redirectUrl)throw new Error("redirectUrl is required for authorization_code flow");const f=await e.codeVerifier();u=FP(a,f,e.redirectUrl)}const d=await e.clientInformation();return uw(t,{metadata:n,tokenRequestParams:u,clientInformation:d??void 0,addClientAuthentication:e.addClientAuthentication,resource:r,fetchFn:i})}async function ste(e,{metadata:t,clientMetadata:n,fetchFn:r}){let a;if(t){if(!t.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");a=new URL(t.registration_endpoint)}else a=new URL("/register",e);const i=await(r??fetch)(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await VP(i);return Uee.parse(await i.json())}class DC extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}}function X0(e){}function BP(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=X0,onError:n=X0,onRetry:r=X0,onComment:a}=e;let i="",c=!0,u,d="",f="";function m(b){const S=c?b.replace(/^\xEF\xBB\xBF/,""):b,[R,E]=ite(`${i}${S}`);for(const T of R)p(T);i=E,c=!1}function p(b){if(b===""){y();return}if(b.startsWith(":")){a&&a(b.slice(b.startsWith(": ")?2:1));return}const S=b.indexOf(":");if(S!==-1){const R=b.slice(0,S),E=b[S+1]===" "?2:1,T=b.slice(S+E);g(R,T,b);return}g(b,"",b)}function g(b,S,R){switch(b){case"event":f=S;break;case"data":d=`${d}${S}
163
+ `;break;case"id":u=S.includes("\0")?void 0:S;break;case"retry":/^\d+$/.test(S)?r(parseInt(S,10)):n(new DC(`Invalid \`retry\` value: "${S}"`,{type:"invalid-retry",value:S,line:R}));break;default:n(new DC(`Unknown field "${b.length>20?`${b.slice(0,20)}…`:b}"`,{type:"unknown-field",field:b,value:S,line:R}));break}}function y(){d.length>0&&t({id:u,event:f||void 0,data:d.endsWith(`
164
+ `)?d.slice(0,-1):d}),u=void 0,d="",f=""}function w(b={}){i&&b.consume&&p(i),c=!0,u=void 0,d="",f="",i=""}return{feed:m,reset:w}}function ite(e){const t=[];let n="",r=0;for(;r<e.length;){const a=e.indexOf("\r",r),i=e.indexOf(`
165
+ `,r);let c=-1;if(a!==-1&&i!==-1?c=Math.min(a,i):a!==-1?a===e.length-1?c=-1:c=a:i!==-1&&(c=i),c===-1){n=e.slice(r);break}else{const u=e.slice(r,c);t.push(u),r=c+1,e[r-1]==="\r"&&e[r]===`
166
+ `&&r++}}return[t,n]}class cte extends TransformStream{constructor({onError:t,onRetry:n,onComment:r}={}){let a;super({start(i){a=BP({onEvent:c=>{i.enqueue(c)},onError(c){t==="terminate"?i.error(c):typeof t=="function"&&t(c)},onRetry:n,onComment:r})},transform(i){a.feed(i)}})}}const lte={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,reconnectionDelayGrowFactor:1.5,maxRetries:2};class Zc extends Error{constructor(t,n){super(`Streamable HTTP error: ${n}`),this.code=t}}let ute=class{constructor(t,n){this._hasCompletedAuthFlow=!1,this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=UP(n?.fetch,n?.requestInit),this._sessionId=n?.sessionId,this._reconnectionOptions=n?.reconnectionOptions??lte}async _authThenStart(){if(!this._authProvider)throw new zo("No auth provider");let t;try{t=await Ds(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new zo;return await this._startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._sessionId&&(t["mcp-session-id"]=this._sessionId),this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=gm(this._requestInit?.headers);return new Headers({...t,...n})}async _startOrAuthSse(t){const{resumptionToken:n}=t;try{const r=await this._commonHeaders();r.set("Accept","text/event-stream"),n&&r.set("last-event-id",n);const a=await(this._fetch??fetch)(this._url,{method:"GET",headers:r,signal:this._abortController?.signal});if(!a.ok){if(await a.body?.cancel(),a.status===401&&this._authProvider)return await this._authThenStart();if(a.status===405)return;throw new Zc(a.status,`Failed to open SSE stream: ${a.statusText}`)}this._handleSseStream(a.body,t,!0)}catch(r){throw this.onerror?.(r),r}}_getNextReconnectionDelay(t){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const n=this._reconnectionOptions.initialReconnectionDelay,r=this._reconnectionOptions.reconnectionDelayGrowFactor,a=this._reconnectionOptions.maxReconnectionDelay;return Math.min(n*Math.pow(r,t),a)}_scheduleReconnection(t,n=0){const r=this._reconnectionOptions.maxRetries;if(n>=r){this.onerror?.(new Error(`Maximum reconnection attempts (${r}) exceeded.`));return}const a=this._getNextReconnectionDelay(n);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(t).catch(i=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${i instanceof Error?i.message:String(i)}`)),this._scheduleReconnection(t,n+1)})},a)}_handleSseStream(t,n,r){if(!t)return;const{onresumptiontoken:a,replayMessageId:i}=n;let c,u=!1,d=!1;(async()=>{try{const m=t.pipeThrough(new TextDecoderStream).pipeThrough(new cte({onRetry:y=>{this._serverRetryMs=y}})).getReader();for(;;){const{value:y,done:w}=await m.read();if(w)break;if(y.id&&(c=y.id,u=!0,a?.(y.id)),!!y.data&&(!y.event||y.event==="message"))try{const b=Ju.parse(JSON.parse(y.data));zu(b)&&(d=!0,i!==void 0&&(b.id=i)),this.onmessage?.(b)}catch(b){this.onerror?.(b)}}(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:c,onresumptiontoken:a,replayMessageId:i},0)}catch(m){if(this.onerror?.(new Error(`SSE stream disconnected: ${m}`)),(r||u)&&!d&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:c,onresumptiontoken:a,replayMessageId:i},0)}catch(y){this.onerror?.(new Error(`Failed to reconnect: ${y instanceof Error?y.message:String(y)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client class, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(t){if(!this._authProvider)throw new zo("No auth provider");if(await Ds(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zo("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(t,n){try{const{resumptionToken:r,onresumptiontoken:a}=n||{};if(r){this._startOrAuthSse({resumptionToken:r,replayMessageId:Z_(t)?t.id:void 0}).catch(g=>this.onerror?.(g));return}const i=await this._commonHeaders();i.set("content-type","application/json"),i.set("accept","application/json, text/event-stream");const c={...this._requestInit,method:"POST",headers:i,body:JSON.stringify(t),signal:this._abortController?.signal},u=await(this._fetch??fetch)(this._url,c),d=u.headers.get("mcp-session-id");if(d&&(this._sessionId=d),!u.ok){const g=await u.text().catch(()=>null);if(u.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new Zc(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl:y,scope:w}=wm(u);if(this._resourceMetadataUrl=y,this._scope=w,await Ds(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zo;return this._hasCompletedAuthFlow=!0,this.send(t)}if(u.status===403&&this._authProvider){const{resourceMetadataUrl:y,scope:w,error:b}=wm(u);if(b==="insufficient_scope"){const S=u.headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===S)throw new Zc(403,"Server returned 403 after trying upscoping");if(w&&(this._scope=w),y&&(this._resourceMetadataUrl=y),this._lastUpscopingHeader=S??void 0,await Ds(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new zo;return this.send(t)}}throw new Zc(u.status,`Error POSTing to endpoint: ${g}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,u.status===202){await u.body?.cancel(),GQ(t)&&this._startOrAuthSse({resumptionToken:void 0}).catch(g=>this.onerror?.(g));return}const m=(Array.isArray(t)?t:[t]).filter(g=>"method"in g&&"id"in g&&g.id!==void 0).length>0,p=u.headers.get("content-type");if(m)if(p?.includes("text/event-stream"))this._handleSseStream(u.body,{onresumptiontoken:a},!1);else if(p?.includes("application/json")){const g=await u.json(),y=Array.isArray(g)?g.map(w=>Ju.parse(w)):[Ju.parse(g)];for(const w of y)this.onmessage?.(w)}else throw await u.body?.cancel(),new Zc(-1,`Unexpected content type: ${p}`);else await u.body?.cancel()}catch(r){throw this.onerror?.(r),r}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const t=await this._commonHeaders(),n={...this._requestInit,method:"DELETE",headers:t,signal:this._abortController?.signal},r=await(this._fetch??fetch)(this._url,n);if(await r.body?.cancel(),!r.ok&&r.status!==405)throw new Zc(r.status,`Failed to terminate session: ${r.statusText}`);this._sessionId=void 0}catch(t){throw this.onerror?.(t),t}}setProtocolVersion(t){this._protocolVersion=t}get protocolVersion(){return this._protocolVersion}async resumeStream(t,n){await this._startOrAuthSse({resumptionToken:t,onresumptiontoken:n?.onresumptiontoken})}};const dte=ie({authorizationEndpoint:M().url(),tokenEndpoint:M().url(),introspectionEndpoint:M().url().optional(),clientId:M(),clientSecret:M().optional(),scopes:we(M()),grantType:It(["authorization_code","client_credentials"])}),fte=ie({title:M().optional(),readOnlyHint:Xe().optional(),destructiveHint:Xe().optional(),idempotentHint:Xe().optional(),openWorldHint:Xe().optional()}),hte=ie({name:M(),description:M().optional(),inputSchema:it(M(),tt()),outputSchema:it(M(),tt()).optional(),annotations:fte.optional(),_meta:it(M(),tt()).optional()}),pte=ie({headers:it(M(),M()).optional()}),mte=ie({command:M().describe("Command to run (e.g., 'npx', 'node')"),args:we(M()).optional().describe("Command arguments"),cwd:M().optional().describe("Working directory"),envVars:it(M(),M()).optional().describe("Environment variables (encrypted in storage)")}),qP=ie({id:M().describe("Unique identifier for the connection"),title:M().describe("Human-readable name for the connection"),created_at:M().describe("When the connection was created"),updated_at:M().describe("When the connection was last updated"),created_by:M().describe("User ID who created the connection"),updated_by:M().optional().describe("User ID who last updated the connection"),organization_id:M().describe("Organization ID this connection belongs to"),description:M().nullable().describe("Description of the connection"),icon:M().nullable().describe("Icon URL for the connection"),app_name:M().nullable().describe("Associated app name"),app_id:M().nullable().describe("Associated app ID"),connection_type:It(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:M().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:M().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:At([mte,pte]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:dte.nullable().describe("OAuth configuration"),configuration_state:it(M(),tt()).nullable().describe("Configuration state (decrypted)"),configuration_scopes:we(M()).nullable().optional().describe("Configuration scopes"),metadata:it(M(),tt()).nullable().describe("Additional metadata (includes repository info)"),tools:we(hte).nullable().describe("Discovered tools from MCP"),bindings:we(M()).nullable().describe("Detected bindings"),status:It(["active","inactive","error"]).describe("Current status")});qP.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:M().nullish()});qP.partial();function Gae(e){return e!=null&&"command"in e}function Zae(e){return!e||!e.startsWith("virtual://")?null:e.replace("virtual://","")}const Vu=ie({connection_id:M().describe("Connection ID"),selected_tools:we(M()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:we(M()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:we(M()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),HP=Vu.extend({selected_tools:Vu.shape.selected_tools.optional(),selected_resources:Vu.shape.selected_resources.optional(),selected_prompts:Vu.shape.selected_prompts.optional()}),Wae=ie({id:M().describe("Unique identifier"),title:M().describe("Human-readable name"),description:M().nullable().describe("Description"),icon:M().nullable().describe("Icon URL"),created_at:M().describe("Creation timestamp"),updated_at:M().describe("Last update timestamp"),created_by:M().describe("User ID who created this item"),updated_by:M().optional().describe("User ID who last updated this item"),organization_id:M().describe("Organization ID this item belongs to"),status:It(["active","inactive"]).describe("Current status"),metadata:ie({instructions:M().nullable().describe("Instructions also used as system prompt")}).loose().describe("Metadata"),connections:we(Vu).describe("Connections with their selected tools, resources, and prompts")});ie({title:M().min(1).max(255).describe("Name for the virtual MCP"),description:M().nullable().optional().describe("Optional description"),icon:M().nullish().describe("Optional icon URL"),status:It(["active","inactive"]).optional().default("active").describe("Initial status"),metadata:ie({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(HP).describe("Connections to include/exclude (can be empty for exclusion mode)")});ie({title:M().min(1).max(255).optional().describe("New name"),description:M().nullable().optional().describe("New description (null to clear)"),icon:M().nullish().describe("New icon URL"),status:It(["active","inactive"]).optional().describe("New status"),metadata:ie({instructions:M().nullable().optional().describe("MCP server instructions")}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:we(HP).optional().describe("New connections (replaces existing)")});var LC;(function(e){e.Completable="McpCompletable"})(LC||(LC={}));function jC(e){let t=0;for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t=(t<<5)-t+r,t=t&t}return Math.abs(t).toString(16)}let GP=null;function gte(e){GP=e}function vte(){return GP??window.location.origin}function ZP(){try{const e=window.location.hostname;return e==="localhost"||e.endsWith(".localhost")||e==="127.0.0.1"||e==="::1"}catch{return!1}}const $C=new Map,WP="mcp:oauth:callback:";class yte{serverUrl;_clientMetadata;_redirectUrl;_windowMode;_state=null;_codeVerifier=null;_clientInfo=null;_tokens=null;constructor(t){this.serverUrl=t.serverUrl,this._redirectUrl=t.callbackUrl??`${vte()}/oauth/callback`,this._windowMode=t.windowMode??"popup";const n=t.scope?Array.isArray(t.scope)?t.scope.join(" "):t.scope:void 0;this._clientMetadata={redirect_uris:[this._redirectUrl],token_endpoint_auth_method:"none",grant_types:["authorization_code","refresh_token"],response_types:["code"],client_name:t.clientName??"@decocms/mesh MCP client",...n&&{scope:n}},$C.set(jC(this.serverUrl),this)}get redirectUrl(){return this._redirectUrl}get clientMetadata(){return this._clientMetadata}state(){return this._state||(this._state=crypto.randomUUID()),this._state}getStoredState(){return this._state}clientInformation(){return this._clientInfo??void 0}saveClientInformation(t){this._clientInfo=t}tokens(){return this._tokens??void 0}saveTokens(t){this._tokens=t}redirectToAuthorization(t){if(this._windowMode==="tab"){if(!window.open(t.toString(),"_blank"))throw new Error("Tab was blocked")}else{const a=window.screenX+(window.outerWidth-600)/2,i=window.screenY+(window.outerHeight-700)/2;if(!window.open(t.toString(),"mcp-oauth",`width=600,height=700,left=${a},top=${i},popup=yes`)&&!window.open(t.toString(),"_blank"))throw new Error("Popup was blocked")}}saveCodeVerifier(t){this._codeVerifier=t}codeVerifier(){if(!this._codeVerifier)throw new Error("Code verifier not found");return this._codeVerifier}invalidateCredentials(){this._clientInfo=null,this._tokens=null,this._codeVerifier=null,this._state=null}getServerUrl(){return this.serverUrl}cleanup(){$C.delete(jC(this.serverUrl))}}async function Kae(e){const t=e.meshUrl??window.location.origin,n=new URL(`/mcp/${e.connectionId}`,t),r=new yte({serverUrl:n.href,clientName:e.clientName,clientUri:e.clientUri,callbackUrl:e.callbackUrl,scope:e.scope,windowMode:e.windowMode}),a={fn:null};try{const i=new Promise((f,m)=>{const p=e.timeout||12e4;let g,y=!1;const w=r.state(),b=`${WP}${w}`,S=()=>{window.removeEventListener("message",E),window.removeEventListener("storage",T),clearTimeout(g);try{localStorage.removeItem(b)}catch{}};a.fn=O=>{y||(y=!0,S(),m(O))};const R=async O=>{if(y)return;if(y=!0,!O.success){S(),m(new Error(O.error||"OAuth authentication failed"));return}const{code:C,state:I}=O;if(!C){S(),m(new Error("Missing authorization code"));return}if(r.getStoredState()!==I){S(),m(new Error("OAuth state mismatch - possible CSRF attack"));return}try{const $=(await iw(n))?.authorization_servers?.[0]||n,W=await lw($),V=r.clientInformation();if(!V){S(),m(new Error("Client information not found"));return}const G=r.codeVerifier(),U=await rte($,{metadata:W,clientInformation:V,authorizationCode:C,codeVerifier:G,redirectUri:r.redirectUrl,resource:new URL(n)});S(),f({tokens:U,clientId:V.client_id??null,clientSecret:"client_secret"in V?V.client_secret:null,tokenEndpoint:W?.token_endpoint??null})}catch(P){S(),m(P)}},E=async O=>{!ZP()&&O.origin!==window.location.origin||O.data?.type==="mcp:oauth:callback"&&await R(O.data)},T=async O=>{if(!(O.key!==b||!O.newValue))try{const C=JSON.parse(O.newValue);await R(C)}catch{}};window.addEventListener("message",E),window.addEventListener("storage",T),g=setTimeout(()=>{y||(y=!0,S(),m(new Error("OAuth authentication timeout")))},p)});if(i.catch(()=>{}),await Ds(r,{serverUrl:n})==="REDIRECT"){const f=await i;return{token:f.tokens.access_token,tokenInfo:{accessToken:f.tokens.access_token,refreshToken:f.tokens.refresh_token??null,expiresIn:f.tokens.expires_in??null,scope:f.tokens.scope??null,clientId:f.clientId,clientSecret:f.clientSecret,tokenEndpoint:f.tokenEndpoint},error:null}}const u=r.tokens(),d=r.clientInformation();return{token:u?.access_token||null,tokenInfo:u?{accessToken:u.access_token,refreshToken:u.refresh_token??null,expiresIn:u.expires_in??null,scope:u.scope??null,clientId:d?.client_id??null,clientSecret:d&&"client_secret"in d?d.client_secret:null,tokenEndpoint:null}:null,error:null}}catch(i){return a.fn&&a.fn(i instanceof Error?i:new Error(String(i))),{token:null,tokenInfo:null,error:i instanceof Error?i.message:String(i)}}finally{r.cleanup()}}function J0(e,t){if(window.opener&&!window.opener.closed){const n=ZP()?"*":window.location.origin;return window.opener.postMessage(e,n),!0}if(t)try{const n=`${WP}${t}`;return localStorage.setItem(n,JSON.stringify(e)),!0}catch{}return!1}async function Yae(){const e=new URLSearchParams(window.location.search),t=e.get("code");let n=e.get("state");const r=e.get("error"),a=e.get("error_description");let i=n;if(n)try{const u=atob(n),d=JSON.parse(u);d.clientState&&(i=d.clientState)}catch{}if(r){const u=a||r;return J0({type:"mcp:oauth:callback",success:!1,error:u},i),{success:!1,error:u}}if(!t||!n){const u="Missing code or state parameter";return J0({type:"mcp:oauth:callback",success:!1,error:u},i),{success:!1,error:u}}return n=i||n,J0({type:"mcp:oauth:callback",success:!0,code:t,state:n},n)?{success:!0}:{success:!1,error:"Parent window not available"}}function dw(){if(typeof window<"u"&&window.location?.origin)return window.location.origin}function _te(e){try{const t=dw();return(t?new URL(e,t):new URL(e)).pathname.match(/^\/mcp\/([^/]+)/)?.[1]??null}catch{return null}}async function bte(e,t){try{const n=`/api/connections/${e}/oauth-token/status`,r=t?new URL(n,t).href:n,a=dw(),i=!t||new URL(t).origin===a,c=await fetch(r,{credentials:i?"include":"omit"});return c.ok?{hasToken:(await c.json()).hasToken===!0}:{hasToken:!1}}catch{return{hasToken:!1}}}async function Qae({url:e,token:t,meshUrl:n}){try{const r=new Headers;r.set("Content-Type","application/json"),r.set("Accept","application/json, text/event-stream");const a=await fetch(e,{method:"POST",headers:r,body:JSON.stringify({jsonrpc:"2.0",id:1,method:"initialize",params:{protocolVersion:"2025-06-18",capabilities:{},clientInfo:{name:"@decocms/mesh MCP client",version:"1.0.0"}}})}),i=_te(e),c=dw(),u=n??(c?new URL(e,c).origin:new URL(e).origin);if(a.ok)return{isAuthenticated:!0,supportsOAuth:!1,hasOAuthToken:(i?await bte(i,u):{hasToken:!1}).hasToken};let d;try{const p=await a.json();d=p.error||p.message}catch{}return a.status>=500?{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:d||`HTTP ${a.status}`,isServerError:!0}:{isAuthenticated:!1,supportsOAuth:!!a.headers.get("WWW-Authenticate"),hasOAuthToken:!1,error:d||`HTTP ${a.status}`}}catch(r){return console.error("[isConnectionAuthenticated] Error:",r),{isAuthenticated:!1,supportsOAuth:!1,hasOAuthToken:!1,error:r.message}}}async function wte(){const e=await fetch("/api/config");if(!e.ok)throw new Error("Failed to load public configuration");const t=await e.json();if(!t.success)throw new Error(t.error||"Failed to load public configuration");return t.config}function Ste(e){if(!e)return;const t=document.getElementById("mesh-theme-overrides");t&&t.remove();const n=[];if(e.light&&Object.keys(e.light).length>0){const r=Object.entries(e.light).map(([a,i])=>` ${a}: ${i};`).join(`
167
+ `);n.push(`:root {
168
+ ${r}
169
+ }`)}if(e.dark&&Object.keys(e.dark).length>0){const r=Object.entries(e.dark).map(([a,i])=>` ${a}: ${i};`).join(`
170
+ `);n.push(`.dark {
171
+ ${r}
172
+ }`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
173
+
174
+ `),document.head.appendChild(r)}}function Ete(e){const t=Hi.c(6),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:SA.publicConfig(),queryFn:wte,staleTime:1/0},t[0]=r):r=t[0];const{data:a}=wA(r);a.internalUrl&&gte(a.internalUrl);let i,c;t[1]!==a.theme?(i=()=>{Ste(a.theme)},c=[a.theme],t[1]=a.theme,t[2]=i,t[3]=c):(i=t[2],c=t[3]),A.useLayoutEffect(i,c);let u;return t[4]!==n?(u=x.jsx(x.Fragment,{children:n}),t[4]=n,t[5]=u):u=t[5],u}function KP(){const e=Hi.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=x.jsx("div",{className:"flex items-center justify-center min-h-screen",children:x.jsx("div",{className:"text-gray-500",children:"Loading..."})}),e[0]=t):t=e[0],t}const Rte=new n6({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});function xte(e){const t=Hi.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=x.jsx(qV,{}),t[0]=r):r=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=x.jsx(KP,{}),t[1]=a):a=t[1];let i;return t[2]!==n?(i=x.jsxs(o6,{client:Rte,children:[r,x.jsx(A.Suspense,{fallback:a,children:x.jsx(Ete,{children:x.jsx(y6,{children:x.jsx(TQ,{children:n})})})})]}),t[2]=n,t[3]=i):i=t[3],i}function Tte(...e){return yI(Pb(e))}const Ote=Yk("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function sb(e){const t=Hi.c(14);let n,r,a,i,c;t[0]!==e?({className:n,variant:c,size:a,asChild:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a,t[4]=i,t[5]=c):(n=t[1],r=t[2],a=t[3],i=t[4],c=t[5]);const d=(i===void 0?!1:i)?t1:"button";let f;t[6]!==n||t[7]!==a||t[8]!==c?(f=Tte(Ote({variant:c,size:a,className:n})),t[6]=n,t[7]=a,t[8]=c,t[9]=f):f=t[9];let m;return t[10]!==d||t[11]!==r||t[12]!==f?(m=x.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=m):m=t[13],m}const fw=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.813 0c-.296.132-.523.525-.978 1.31Z"}));fw.displayName="AlertTriangle";const YP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"m13 7-1.116-2.231c-.32-.642-.481-.963-.72-1.198a2 2 0 0 0-.748-.462C10.1 3 9.74 3 9.022 3H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 4.52 2 5.08 2 6.2V7m0 0h15.2c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C22 9.28 22 10.12 22 11.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 21 18.88 21 17.2 21H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 18.72 2 17.88 2 16.2V7Z"}));YP.displayName="Folder";const QP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M20.5 7.278 12 12m0 0L3.5 7.278M12 12v9.5m9-5.441V7.942c0-.343 0-.514-.05-.667a1 1 0 0 0-.215-.364c-.109-.119-.258-.202-.558-.368l-7.4-4.111c-.284-.158-.425-.237-.575-.267a1 1 0 0 0-.403 0c-.15.03-.292.11-.576.267l-7.4 4.11c-.3.167-.45.25-.558.369a1 1 0 0 0-.215.364C3 7.428 3 7.599 3 7.942v8.117c0 .342 0 .514.05.666a1 1 0 0 0 .215.364c.109.119.258.202.558.368l7.4 4.111c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l7.4-4.11c.3-.167.45-.25.558-.369a.999.999 0 0 0 .215-.364c.05-.152.05-.324.05-.666ZM16.5 9.5l-9-5"}));QP.displayName="Package";const XP=({size:e=24,color:t="currentColor",...n})=>A.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},A.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));XP.displayName="RefreshCw01";const UC="__mesh_chunk_reload_ts";function zC(e){if(!e)return!1;const t=e.message||"";return t.includes("Failed to fetch dynamically imported module")||t.includes("Importing a module script failed")||t.includes("error loading dynamically imported module")||t.includes("Failed to fetch")&&e.name==="TypeError"}class Xae extends A.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}resetError=()=>{this.setState({hasError:!1,error:null})};render(){if(this.state.hasError){const{fallback:t}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:x.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[x.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:x.jsx(fw,{className:"h-6 w-6 text-destructive"})}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),x.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),x.jsx(sb,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class Cte extends A.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){if(console.error("Uncaught error:",t,n),!zC(t))return;const r=sessionStorage.getItem(UC),a=Date.now();(!r||a-Number(r)>1e4)&&(sessionStorage.setItem(UC,String(a)),window.location.reload())}render(){return this.state.hasError&&zC(this.state.error)?x.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[x.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:x.jsx(XP,{className:"h-6 w-6 text-primary"})}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),x.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),x.jsx(sb,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?x.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[x.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:x.jsx(fw,{className:"h-6 w-6 text-destructive"})}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),x.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),x.jsx(sb,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}const VC={assistantChatTasks:e=>`mesh:assistant-chat:tasks:${e}`,messages:(e,t)=>`mesh:messages:${e}:${t}`,decoChatOpen:()=>"mesh:decochat:open",chatSelectedModel:e=>`mesh:chat:selectedModel:${e}`,chatSelectedMode:e=>`mesh:chat:selectedMode:${e}`,chatSelectedKeyId:e=>`mesh:chat:selectedKeyId:${e}`,assistantChatActiveTask:e=>`mesh:assistant-chat:active-task:${e}`,decoChatPanelWidth:()=>"mesh:decochat:panel-width",sidebarOpen:()=>"mesh:sidebar-open",selectedRegistry:e=>`mesh:store:selected-registry:${e}`,orgHomeQuickstart:e=>`mesh:org-home:quickstart:${e}`,storeShowStdio:()=>"mesh:store:show-stdio",preferences:()=>"mesh:user:preferences",pluginConnection:(e,t)=>`mesh:plugin:connection:${e}:${t}`,chatTaskOwnerFilter:e=>`mesh:chat:task-owner-filter:${e}`,lastOrgSlug:()=>"mesh:last-org-slug",connectionsTab:e=>`mesh:connections:tab:${e}`};var Ate=class{apply(e,t){if(!t.type)return;const n=Array.isArray(t.type)?t.type:[t.type],r=new Set(n);if(r.has("string")||(e.string=!1),!r.has("number")&&!r.has("integer")&&(e.number=!1),r.has("boolean")||(e.boolean=!1),r.has("null")||(e.null=!1),r.has("array")||(e.array=!1),r.has("object")||(e.object=!1),r.has("integer")&&e.number!==!1){const a=e.number||$e();a instanceof Za&&(e.number=a.int())}}},Ite=class{apply(e,t){if(t.const===void 0)return;const n=t.const;e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1,typeof n=="string"?e.string=je(n):typeof n=="number"?e.number=je(n):typeof n=="boolean"?e.boolean=je(n):n===null?e.null=Ed():Array.isArray(n)?e.array=void 0:typeof n=="object"&&(e.object=void 0)}},kte=class{apply(e,t){if(!t.enum)return;if(t.enum.length===0){t.type||(e.string=!1,e.number=!1,e.boolean=!1,e.null=!1,e.array=!1,e.object=!1);return}const n={string:t.enum.filter(r=>typeof r=="string"),number:t.enum.filter(r=>typeof r=="number"),boolean:t.enum.filter(r=>typeof r=="boolean"),null:t.enum.filter(r=>r===null),array:t.enum.filter(r=>Array.isArray(r)),object:t.enum.filter(r=>typeof r=="object"&&r!==null&&!Array.isArray(r))};e.string=this.createTypeSchema(n.string,"string"),e.number=this.createTypeSchema(n.number,"number"),e.boolean=this.createTypeSchema(n.boolean,"boolean"),e.null=n.null.length>0?Ed():!1,e.array=n.array.length>0?void 0:!1,e.object=n.object.length>0?void 0:!1}createTypeSchema(e,t){if(e.length===0)return!1;if(e.length===1)return je(e[0]);if(t==="string")return It(e);if(t==="number"){const[n,r,...a]=e;return At([je(n),je(r),...a.map(i=>je(i))])}return t==="boolean"?At([je(!0),je(!1)]):!1}},Nte=class{apply(e,t){const n=t;if(n.type==="string"&&n.format==="binary"&&n.contentEncoding==="binary"){let r=Nz();n.minLength!==void 0&&(r=r.min(n.minLength)),n.maxLength!==void 0&&(r=r.max(n.maxLength)),n.contentMediaType!==void 0&&(r=r.mime(n.contentMediaType)),e.file=r,e.string=!1}}},Mte=class{apply(e,t){const n=t;t.type===void 0&&(n.minLength!==void 0||n.maxLength!==void 0||n.pattern!==void 0)&&e.string===void 0&&(e.string=M())}},Pte=class{apply(e,t){const n=t;if(n.minLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof Bm&&(e.string=r.refine(a=>Array.from(a).length>=n.minLength,{message:`String must be at least ${n.minLength} characters long`}))}}},Dte=class{apply(e,t){const n=t;if(n.maxLength!==void 0&&e.string!==!1){const r=e.string||M();r instanceof Bm&&(e.string=r.refine(a=>Array.from(a).length<=n.maxLength,{message:`String must be at most ${n.maxLength} characters long`}))}}},Lte=class{apply(e,t){const n=t;if(n.pattern&&e.string!==!1){const r=e.string||M();if(r instanceof Bm){const a=new RegExp(n.pattern);e.string=r.regex(a)}}}},jte=class{apply(e,t){const n=t;if(n.minimum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof Za&&(e.number=r.min(n.minimum))}}},$te=class{apply(e,t){const n=t;if(n.maximum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof Za&&(e.number=r.max(n.maximum))}}},Ute=class{apply(e,t){const n=t;if(n.exclusiveMinimum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof Za&&(typeof n.exclusiveMinimum=="number"?e.number=r.gt(n.exclusiveMinimum):e.number=!1)}}},zte=class{apply(e,t){const n=t;if(n.exclusiveMaximum!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof Za&&(typeof n.exclusiveMaximum=="number"?e.number=r.lt(n.exclusiveMaximum):e.number=!1)}}},Vte=class{apply(e,t){const n=t;if(n.multipleOf!==void 0&&e.number!==!1){const r=e.number||$e();r instanceof Za&&(e.number=r.refine(a=>{if(n.multipleOf===0)return!1;const i=a/n.multipleOf,c=Math.round(i),u=Math.min(Math.abs(a)*Number.EPSILON*10,Math.abs(n.multipleOf)*Number.EPSILON*10);return Math.abs(i-c)<=u/Math.abs(n.multipleOf)},{message:`Must be a multiple of ${n.multipleOf}`}))}}},Fte=class{apply(e,t){const n=t;t.type===void 0&&(n.minItems!==void 0||n.maxItems!==void 0||n.items!==void 0||n.prefixItems!==void 0)&&e.array===void 0&&(e.array=we(eo()))}},Bte=class{apply(e,t){const n=t;n.minItems!==void 0&&e.array!==!1&&(e.array=(e.array||we(eo())).min(n.minItems))}},qte=class{apply(e,t){const n=t;n.maxItems!==void 0&&e.array!==!1&&(e.array=(e.array||we(eo())).max(n.maxItems))}},Hte=class{apply(e,t){const n=t;if(e.array!==!1)if(Array.isArray(n.items))e.array=e.array||we(eo());else if(n.items&&typeof n.items!="boolean"&&!n.prefixItems){const r=mr(n.items);let a=we(r);if(e.array&&e.array instanceof bk){const i=e.array._def;i.checks&&i.checks.forEach(c=>{if(c._zod&&c._zod.def){const u=c._zod.def;u.check==="min_length"&&u.minimum!==void 0?a=a.min(u.minimum):u.check==="max_length"&&u.maximum!==void 0&&(a=a.max(u.maximum))}})}e.array=a}else typeof n.items=="boolean"&&n.items===!1?n.prefixItems?e.array=e.array||we(eo()):e.array=we(eo()).max(0):(typeof n.items=="boolean"&&n.items===!0||n.prefixItems)&&(e.array=e.array||we(eo()))}},Gte=class{apply(e,t){if(t.type!=="array")return;const n=t;if(!Array.isArray(n.items)||e.array===!1)return;const r=n.items.map(i=>mr(i));let a;r.length===0?a=AT([]):a=AT(r),n.minItems!==void 0&&n.minItems>r.length&&(a=!1),n.maxItems!==void 0&&n.maxItems<r.length&&(a=!1),e.tuple=a,e.array=!1}},Zte=class{apply(e,t){const n=t;e.object!==!1&&(n.properties||n.required||n.additionalProperties!==void 0)&&(e.object=e.object||ie({}).passthrough())}},Wte=class{apply(e,t){const n=t;t.type===void 0&&(n.maxProperties!==void 0||n.minProperties!==void 0)&&e.object===void 0&&(e.object=ie({}).passthrough())}},Kte=class{apply(e,t){const n=t;if(n.maxProperties!==void 0&&e.object!==!1){const r=e.object||ie({}).passthrough();e.object=r.refine(a=>Object.keys(a).length<=n.maxProperties,{message:`Object must have at most ${n.maxProperties} properties`})}}},Yte=class{apply(e,t){const n=t;if(n.minProperties!==void 0&&e.object!==!1){const r=e.object||ie({}).passthrough();e.object=r.refine(a=>Object.keys(a).length>=n.minProperties,{message:`Object must have at least ${n.minProperties} properties`})}}};function vd(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,r)=>vd(n,t[r]));if(typeof e=="object"&&typeof t=="object"){const n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(a=>r.includes(a)&&vd(e[a],t[a]))}return!1}function Qte(){return e=>{if(!Array.isArray(e))return!0;const t=[];return e.every(n=>t.some(a=>vd(n,a))?!1:(t.push(n),!0))}}function Sm(e,t){return e.safeParse(t).success}var Xte=class{apply(e,t){if(!t.not)return e;const n=mr(t.not);return e.refine(r=>!Sm(n,r),{message:"Value must not match the 'not' schema"})}},Jte=class{apply(e,t){return t.uniqueItems!==!0?e:e.refine(Qte(),{message:"Array items must be unique"})}},ene=class{apply(e,t){return!t.allOf||t.allOf.length===0?e:t.allOf.map(r=>mr(r)).reduce((r,a)=>Rd(r,a),e)}},tne=class{apply(e,t){if(!t.anyOf||t.anyOf.length===0)return e;const n=t.anyOf.length===1?mr(t.anyOf[0]):At([mr(t.anyOf[0]),mr(t.anyOf[1]),...t.anyOf.slice(2).map(r=>mr(r))]);return Rd(e,n)}},nne=class{apply(e,t){if(!t.oneOf||t.oneOf.length===0)return e;const n=t.oneOf.map(r=>mr(r));return e.refine(r=>{let a=0;for(const i of n)if(i.safeParse(r).success&&(a++,a>1))return!1;return a===1},{message:"Value must match exactly one of the oneOf schemas"})}},rne=class{apply(e,t){const n=t;if(n.prefixItems&&Array.isArray(n.prefixItems)){const a=n.prefixItems.map(i=>mr(i));return e.refine(i=>{if(!Array.isArray(i))return!0;for(let c=0;c<Math.min(i.length,a.length);c++)if(!Sm(a[c],i[c]))return!1;if(i.length>a.length){if(typeof n.items=="boolean"&&n.items===!1)return!1;if(n.items&&typeof n.items=="object"&&!Array.isArray(n.items)){const c=mr(n.items);for(let u=a.length;u<i.length;u++)if(!Sm(c,i[u]))return!1}}return!0},{message:"Array does not match prefixItems schema"})}return e}},one=class{apply(e,t){const n=t;if(!n.properties&&!n.required&&n.additionalProperties!==!1)return e;if(e instanceof qm||e instanceof Ek){const r={};if(n.properties)for(const[a,i]of Object.entries(n.properties))i!==void 0&&(r[a]=mr(i));if(n.required&&Array.isArray(n.required)){const a=new Set(n.required);for(const i of Object.keys(r))a.has(i)||(r[i]=r[i].optional())}else for(const a of Object.keys(r))r[a]=r[a].optional();return n.additionalProperties===!1?ie(r):ie(r).passthrough()}return e.refine(r=>{if(typeof r!="object"||r===null||Array.isArray(r))return!0;if(n.properties){for(const[a,i]of Object.entries(n.properties))if(i!==void 0&&Object.getOwnPropertyDescriptor(r,a)!==void 0&&!mr(i).safeParse(r[a]).success)return!1}if(n.required&&Array.isArray(n.required)){for(const a of n.required)if(!(Object.getOwnPropertyDescriptor(r,a)!==void 0))return!1}if(n.additionalProperties===!1&&n.properties){const a=new Set(Object.keys(n.properties));for(const i in r)if(!a.has(i))return!1}return!0},{message:"Object constraints validation failed"})}},ane=class{apply(e,t){if(!t.enum||t.enum.length===0)return e;const n=t.enum.filter(r=>Array.isArray(r)||typeof r=="object"&&r!==null);return n.length===0?e:e.refine(r=>typeof r!="object"||r===null?!0:n.some(a=>vd(r,a)),{message:"Value must match one of the enum values"})}},sne=class{apply(e,t){if(t.const===void 0)return e;const n=t.const;return typeof n!="object"||n===null?e:e.refine(r=>vd(r,n),{message:"Value must equal the const value"})}},ine=class{apply(e,t){return t.description&&(e=e.describe(t.description)),e}},cne=class{apply(e,t){var n;const r=t;return!((n=r.required)!=null&&n.includes("__proto__"))||t.type!==void 0?e:eo().refine(a=>this.validateRequired(a,r.required),{message:"Missing required properties"})}validateRequired(e,t){return typeof e!="object"||e===null||Array.isArray(e)?!0:t.every(n=>Object.prototype.hasOwnProperty.call(e,n))}},lne=class{apply(e,t){var n;const r=t;if(r.contains===void 0)return e;const a=mr(r.contains),i=(n=r.minContains)!=null?n:1,c=r.maxContains;return e.refine(u=>{if(!Array.isArray(u))return!0;let d=0;for(const f of u)Sm(a,f)&&d++;return!(d<i||c!==void 0&&d>c)},{message:"Array must contain required items matching the schema"})}},une=class{apply(e,t){const{default:n}=t;return n===void 0||!e.safeParse(n).success?e:e.default(n)}},dne=[new Ite,new kte,new Ate,new Nte,new Mte,new Fte,new Wte,new Pte,new Dte,new Lte,new jte,new $te,new Ute,new zte,new Vte,new Gte,new Bte,new qte,new Hte,new Kte,new Yte,new Zte],fne=[new cne,new ane,new sne,new ene,new tne,new nne,new rne,new one,new lne,new Xte,new Jte,new une,new ine];function mr(e){if(typeof e=="boolean")return e?eo():Kp();const t={};for(const a of dne)a.apply(t,e);const n=[];if(t.string!==!1&&n.push(t.string||M()),t.number!==!1&&n.push(t.number||$e()),t.boolean!==!1&&n.push(t.boolean||Xe()),t.null!==!1&&n.push(t.null||Ed()),t.array!==!1&&n.push(t.array||we(eo())),t.tuple!==!1&&t.tuple!==void 0&&n.push(t.tuple),t.object!==!1)if(t.object)n.push(t.object);else{const a=Ok(i=>typeof i=="object"&&i!==null&&!Array.isArray(i),"Must be an object, not an array");n.push(a)}t.file!==!1&&t.file!==void 0&&n.push(t.file);let r;n.length===0?r=Kp():n.length===1?r=n[0]:Object.keys(e).some(i=>i!=="$schema"&&i!=="title"&&i!=="description")?r=At(n):r=eo();for(const a of fne)r=a.apply(r,e);return r}class FC extends Event{constructor(t,n){var r,a;super(t),this.code=(r=n?.code)!=null?r:void 0,this.message=(a=n?.message)!=null?a:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(BC(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(BC(this),n)}}function hne(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function ib(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(ib).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${ib(e.cause)}`:e.message:`${e}`}function BC(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var JP=e=>{throw TypeError(e)},hw=(e,t,n)=>t.has(e)||JP("Cannot "+n),St=(e,t,n)=>(hw(e,t,"read from private field"),n?n.call(e):t.get(e)),Vn=(e,t,n)=>t.has(e)?JP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ln=(e,t,n,r)=>(hw(e,t,"write to private field"),t.set(e,n),n),za=(e,t,n)=>(hw(e,t,"access private method"),n),$r,Ai,Yc,Ip,Em,ed,rl,td,Ms,Qc,fl,Xc,Fu,$o,cb,lb,ub,qC,db,fb,Bu,hb,pb;class kp extends EventTarget{constructor(t,n){var r,a;super(),Vn(this,$o),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Vn(this,$r),Vn(this,Ai),Vn(this,Yc),Vn(this,Ip),Vn(this,Em),Vn(this,ed),Vn(this,rl),Vn(this,td,null),Vn(this,Ms),Vn(this,Qc),Vn(this,fl,null),Vn(this,Xc,null),Vn(this,Fu,null),Vn(this,lb,async i=>{var c;St(this,Qc).reset();const{body:u,redirected:d,status:f,headers:m}=i;if(f===204){za(this,$o,Bu).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(d?ln(this,Yc,new URL(i.url)):ln(this,Yc,void 0),f!==200){za(this,$o,Bu).call(this,`Non-200 status code (${f})`,f);return}if(!(m.get("content-type")||"").startsWith("text/event-stream")){za(this,$o,Bu).call(this,'Invalid content type, expected "text/event-stream"',f);return}if(St(this,$r)===this.CLOSED)return;ln(this,$r,this.OPEN);const p=new Event("open");if((c=St(this,Fu))==null||c.call(this,p),this.dispatchEvent(p),typeof u!="object"||!u||!("getReader"in u)){za(this,$o,Bu).call(this,"Invalid response body, expected a web ReadableStream",f),this.close();return}const g=new TextDecoder,y=u.getReader();let w=!0;do{const{done:b,value:S}=await y.read();S&&St(this,Qc).feed(g.decode(S,{stream:!b})),b&&(w=!1,St(this,Qc).reset(),za(this,$o,hb).call(this))}while(w)}),Vn(this,ub,i=>{ln(this,Ms,void 0),!(i.name==="AbortError"||i.type==="aborted")&&za(this,$o,hb).call(this,ib(i))}),Vn(this,db,i=>{typeof i.id=="string"&&ln(this,td,i.id);const c=new MessageEvent(i.event||"message",{data:i.data,origin:St(this,Yc)?St(this,Yc).origin:St(this,Ai).origin,lastEventId:i.id||""});St(this,Xc)&&(!i.event||i.event==="message")&&St(this,Xc).call(this,c),this.dispatchEvent(c)}),Vn(this,fb,i=>{ln(this,ed,i)}),Vn(this,pb,()=>{ln(this,rl,void 0),St(this,$r)===this.CONNECTING&&za(this,$o,cb).call(this)});try{if(t instanceof URL)ln(this,Ai,t);else if(typeof t=="string")ln(this,Ai,new URL(t,pne()));else throw new Error("Invalid URL")}catch{throw hne("An invalid or illegal string was specified")}ln(this,Qc,BP({onEvent:St(this,db),onRetry:St(this,fb)})),ln(this,$r,this.CONNECTING),ln(this,ed,3e3),ln(this,Em,(r=n?.fetch)!=null?r:globalThis.fetch),ln(this,Ip,(a=n?.withCredentials)!=null?a:!1),za(this,$o,cb).call(this)}get readyState(){return St(this,$r)}get url(){return St(this,Ai).href}get withCredentials(){return St(this,Ip)}get onerror(){return St(this,fl)}set onerror(t){ln(this,fl,t)}get onmessage(){return St(this,Xc)}set onmessage(t){ln(this,Xc,t)}get onopen(){return St(this,Fu)}set onopen(t){ln(this,Fu,t)}addEventListener(t,n,r){const a=n;super.addEventListener(t,a,r)}removeEventListener(t,n,r){const a=n;super.removeEventListener(t,a,r)}close(){St(this,rl)&&clearTimeout(St(this,rl)),St(this,$r)!==this.CLOSED&&(St(this,Ms)&&St(this,Ms).abort(),ln(this,$r,this.CLOSED),ln(this,Ms,void 0))}}$r=new WeakMap,Ai=new WeakMap,Yc=new WeakMap,Ip=new WeakMap,Em=new WeakMap,ed=new WeakMap,rl=new WeakMap,td=new WeakMap,Ms=new WeakMap,Qc=new WeakMap,fl=new WeakMap,Xc=new WeakMap,Fu=new WeakMap,$o=new WeakSet,cb=function(){ln(this,$r,this.CONNECTING),ln(this,Ms,new AbortController),St(this,Em)(St(this,Ai),za(this,$o,qC).call(this)).then(St(this,lb)).catch(St(this,ub))},lb=new WeakMap,ub=new WeakMap,qC=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...St(this,td)?{"Last-Event-ID":St(this,td)}:void 0},cache:"no-store",signal:(e=St(this,Ms))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},db=new WeakMap,fb=new WeakMap,Bu=function(e,t){var n;St(this,$r)!==this.CLOSED&&ln(this,$r,this.CLOSED);const r=new FC("error",{code:t,message:e});(n=St(this,fl))==null||n.call(this,r),this.dispatchEvent(r)},hb=function(e,t){var n;if(St(this,$r)===this.CLOSED)return;ln(this,$r,this.CONNECTING);const r=new FC("error",{code:t,message:e});(n=St(this,fl))==null||n.call(this,r),this.dispatchEvent(r),ln(this,rl,setTimeout(St(this,pb),St(this,ed)))},pb=new WeakMap,kp.CONNECTING=0,kp.OPEN=1,kp.CLOSED=2;function pne(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}class mne extends Error{constructor(t,n,r){super(`SSE error: ${n}`),this.code=t,this.event=r}}class gne{constructor(t,n){this._url=t,this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=n?.eventSourceInit,this._requestInit=n?.requestInit,this._authProvider=n?.authProvider,this._fetch=n?.fetch,this._fetchWithInit=UP(n?.fetch,n?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new zo("No auth provider");let t;try{t=await Ds(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(n){throw this.onerror?.(n),n}if(t!=="AUTHORIZED")throw new zo;return await this._startOrAuth()}async _commonHeaders(){const t={};if(this._authProvider){const r=await this._authProvider.tokens();r&&(t.Authorization=`Bearer ${r.access_token}`)}this._protocolVersion&&(t["mcp-protocol-version"]=this._protocolVersion);const n=gm(this._requestInit?.headers);return new Headers({...t,...n})}_startOrAuth(){const t=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((n,r)=>{this._eventSource=new kp(this._url.href,{...this._eventSourceInit,fetch:async(a,i)=>{const c=await this._commonHeaders();c.set("Accept","text/event-stream");const u=await t(a,{...i,headers:c});if(u.status===401&&u.headers.has("www-authenticate")){const{resourceMetadataUrl:d,scope:f}=wm(u);this._resourceMetadataUrl=d,this._scope=f}return u}}),this._abortController=new AbortController,this._eventSource.onerror=a=>{if(a.code===401&&this._authProvider){this._authThenStart().then(n,r);return}const i=new mne(a.code,a.message,a);r(i),this.onerror?.(i)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",a=>{const i=a;try{if(this._endpoint=new URL(i.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(c){r(c),this.onerror?.(c),this.close();return}n()}),this._eventSource.onmessage=a=>{const i=a;let c;try{c=Ju.parse(JSON.parse(i.data))}catch(u){this.onerror?.(u);return}this.onmessage?.(c)}})}async start(){if(this._eventSource)throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(t){if(!this._authProvider)throw new zo("No auth provider");if(await Ds(this._authProvider,{serverUrl:this._url,authorizationCode:t,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zo("Failed to authorize")}async close(){this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(t){if(!this._endpoint)throw new Error("Not connected");try{const n=await this._commonHeaders();n.set("content-type","application/json");const r={...this._requestInit,method:"POST",headers:n,body:JSON.stringify(t),signal:this._abortController?.signal},a=await(this._fetch??fetch)(this._endpoint,r);if(!a.ok){const i=await a.text().catch(()=>null);if(a.status===401&&this._authProvider){const{resourceMetadataUrl:c,scope:u}=wm(a);if(this._resourceMetadataUrl=c,this._scope=u,await Ds(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new zo;return this.send(t)}throw new Error(`Error POSTing to endpoint (HTTP ${a.status}): ${i}`)}await a.body?.cancel()}catch(n){throw this.onerror?.(n),n}}setProtocolVersion(t){this._protocolVersion=t}}const vne="mcp";class yne{constructor(t){this._url=t}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((t,n)=>{this._socket=new WebSocket(this._url,vne),this._socket.onerror=r=>{const a="error"in r?r.error:new Error(`WebSocket error: ${JSON.stringify(r)}`);n(a),this.onerror?.(a)},this._socket.onopen=()=>{t()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=r=>{let a;try{a=Ju.parse(JSON.parse(r.data))}catch(i){this.onerror?.(i);return}this.onmessage?.(a)}})}async close(){this._socket?.close()}send(t){return new Promise((n,r)=>{if(!this._socket){r(new Error("Not connected"));return}this._socket?.send(JSON.stringify(t)),n()})}}class _ne extends ute{constructor(t,n){super(t,n)}send(t,n){const r=bne(t);return r?.type==="emit"?(this.onmessage?.(r.message),Promise.resolve()):r?.type==="suppress"?Promise.resolve():super.send(t,n)}}function bne(e){const t=e;if(!t||typeof t!="object"||!("method"in t))return null;switch(t.method){case"initialize":{const n=t?.params?.protocolVersion;return n?{type:"emit",message:{result:{protocolVersion:n,capabilities:{tools:{}},serverInfo:{name:"deco-chat-server",version:"1.0.0"}},jsonrpc:t.jsonrpc??"2.0",id:t.id}}:null}case"notifications/roots/list_changed":case"notifications/initialized":case"notifications/cancelled":case"notifications/progress":return{type:"suppress"};default:return null}}class wne extends $P{constructor(t,n){super(t,n)}async listTools(t,n){return await this.request({method:"tools/list",params:t},nw,n)}}const Sne=async(e,t,n)=>{const r=Ene(e.connection,t,n);if(!r)throw new Error("Unknown MCP connection type");const a=new wne({name:e?.name??"MCP Client",version:"1.0.0"});return await a.connect(r),{client:a,callStreamableTool:(i,c,u)=>{if(e.connection.type!=="HTTP")throw new Error("HTTP connection required");const d=new Headers(n);d.has("Authorization")||d.set("Authorization",`Bearer ${e.connection.token}`);for(const[p,g]of Object.entries(e.connection.headers??{}))d.set(p,g);const f=new URL(e.connection.url),m=f.pathname.replace(/\/+$/,"")||"/";return f.pathname=`${m}/call-tool/${encodeURIComponent(i)}`,fetch(f.href,{method:"POST",redirect:"manual",body:JSON.stringify(c),headers:d,signal:u})}}},Ene=(e,t,n)=>{if(e.type==="Websocket")return new yne(new URL(e.url));if(e.type!=="SSE"&&e.type!=="HTTP")return null;const a={...e.token?{authorization:`Bearer ${e.token}`}:{},...n??{},..."headers"in e?e.headers||{}:{}};if(e.type==="SSE"){const i={requestInit:{headers:a,signal:t}};return e.token&&(i.eventSourceInit={fetch:(c,u)=>fetch(c,{...u,headers:{...a,Accept:"text/event-stream"},signal:t})}),new gne(new URL(e.url),i)}return new _ne(new URL(e.url),{requestInit:{headers:a,signal:t,credentials:"include"}})},HC=e=>{try{return JSON.parse(e)}catch{return e}},vp=new Map,GC=(e,t)=>({...e,id:e.name,inputSchema:e.inputSchema?mr(e.inputSchema):void 0,outputSchema:e.outputSchema?mr(e.outputSchema):void 0,execute:n=>t(n.context,e.name)});function Rne(e){const t=n=>"connection"in e?Sne({connection:e.connection},void 0,n):e.client;return new Proxy({},{get(n,r){if(r==="toJSON")return null;if(typeof r!="string")throw new Error("Name must be a string");if(r==="listTools")return u;async function a(d,f=r){const m=e?.debugId?.(),p=m?{"x-trace-debug-id":m}:void 0,{client:g,callStreamableTool:y}=await t(p);if(e?.streamable?.[String(f)]){if(!y)throw new Error(`Tool ${String(f)} requires streaming support but client doesn't provide callStreamableTool`);return await y(String(f),d)}const{structuredContent:w,isError:b,content:S}=await g.callTool({name:String(f),arguments:d});if(b){const E=S?.[0]?.text,T=typeof E=="string"?HC(E):null,O=T?.code&&typeof e?.getErrorByStatusCode=="function"?e.getErrorByStatusCode(T.code,T.message,T.traceId):null;throw O||new Error(`Tool ${String(f)} returned an error: ${JSON.stringify(w??S)}`)}if(w!==void 0)return w;const R=S?.[0]?.text;return typeof R=="string"?HC(R):void 0}async function i(){const{client:d}=await t(),{tools:f}=await d.listTools();return f}async function c(){if(!("connection"in e))return i();const d=e.connection,f=JSON.stringify(d);try{return vp.has(f)||vp.set(f,i()),await vp.get(f)}catch(m){console.error("Failed to list tools",m),vp.delete(f);return}}async function u(){return(await c()??[]).map(f=>GC(f,a))}return a.asTool=async()=>{const f=(await c()??[]).find(m=>m.name===r);if(!f)throw new Error(`Tool ${r} not found`);return GC(f,a)},a}})}new Proxy({},{get(e,t){return t==="toJSON"?null:t==="forConnection"?n=>xne({connection:n}):global[t]}});function xne(e){return Rne(e)}const fg=ie({id:M().describe("Unique identifier for the entity"),title:M().describe("Human-readable title for the entity"),description:M().nullish().describe("Description of the entity"),created_at:M().datetime(),updated_at:M().datetime(),created_by:M().optional(),updated_by:M().optional()}),Tne=ie({field:we(M()),operator:It(["eq","gt","gte","lt","lte","in","like","contains"]),value:tt()}),e3=oo(()=>At([Tne,ie({operator:It(["and","or","not"]),conditions:we(e3)})])),One=ie({field:we(M()),direction:It(["asc","desc"]),nulls:It(["first","last"]).optional()}),Cne=ie({where:e3.optional().describe("Filter expression"),orderBy:we(One).optional().describe("Sort expressions"),limit:$e().int().min(1).max(1e3).optional().describe("Maximum number of items to return"),offset:$e().int().min(0).optional().describe("Number of items to skip")});function Ane(e){return ie({items:we(e).describe("Array of collection items"),totalCount:$e().int().min(0).optional().describe("Total number of matching items (if available)"),hasMore:Xe().optional().describe("Whether there are more items available")})}const Ine=ie({id:M().describe("ID of the entity to retrieve")});function kne(e){return ie({item:e.nullable().describe("The retrieved item, or null if not found")})}function Nne(e){return ie({data:e.partial().describe("Data for the new entity (id may be auto-generated)")})}function Mne(e){return ie({item:e.describe("The created entity with generated id")})}function Pne(e){return ie({id:M().describe("ID of the entity to update"),data:e.partial().describe("Partial entity data to update")})}function Dne(e){return ie({item:e.describe("The updated entity")})}const Lne=ie({id:M().describe("ID of the entity to delete")});function jne(e){return ie({item:e.describe("The deleted entity")})}function hg(e,t,n){const r=e.toUpperCase(),a=n?.readOnly??!1,i=[{name:`COLLECTION_${r}_LIST`,inputSchema:Cne,outputSchema:Ane(t)},{name:`COLLECTION_${r}_GET`,inputSchema:Ine,outputSchema:kne(t)}];return a||i.push({name:`COLLECTION_${r}_CREATE`,inputSchema:Nne(t),outputSchema:Mne(t),opt:!0},{name:`COLLECTION_${r}_UPDATE`,inputSchema:Pne(t),outputSchema:Dne(t),opt:!0},{name:`COLLECTION_${r}_DELETE`,inputSchema:Lne,outputSchema:jne(t),opt:!0}),i}const $ne=ie({id:M(),name:M(),description:M().optional(),inputSchema:it(M(),tt()),outputSchema:it(M(),tt()).optional()}),Une=fg.extend({_meta:ie({"io.decocms":ie({id:M(),verified:Xe(),scopeName:M(),appName:M(),friendlyName:M().nullable().optional(),metadata:it(M(),tt()).nullable().optional(),publishedAt:M().datetime().optional(),updatedAt:M().datetime().optional(),tools:we($ne).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:ie({$schema:M().optional(),_meta:it(M(),tt()).optional(),name:M().describe("The server name (scope/app)"),title:M().optional().describe("User-friendly title"),description:M().optional().describe("Server description"),icons:we(ie({src:M(),mimeType:M().optional(),sizes:we(M()).optional(),theme:It(["light","dark"]).optional()})).optional(),remotes:we(ie({type:It(["http","stdio","sse"]),url:M().optional(),headers:we(tt()).optional()})).optional(),packages:we(tt()).optional(),repository:ie({url:M(),source:M().optional(),subfolder:M().optional()}).optional(),version:M().optional(),websiteUrl:M().optional()})});hg("registry_app",Une,{readOnly:!0});const zne=ie({specversion:je("1.0").describe("CloudEvents specification version"),id:M().describe("Unique identifier for this event (UUID recommended)"),source:M().describe("Connection ID of the event publisher"),type:M().describe("Event type (e.g., 'order.created', 'user.signup')"),time:M().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:M().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:M().optional().default("application/json").describe("Content type of the data attribute"),dataschema:M().url().optional().describe("URI to the schema for the data attribute"),data:tt().optional().describe("Event payload (any JSON value)")});ie({events:we(zne).min(1).describe("Batch of CloudEvents to process")});const Vne=ie({success:Xe().optional().describe("Whether this event was processed successfully"),error:M().optional().describe("Error message for this event"),retryAfter:$e().int().positive().optional().describe("Re-deliver this event after this many ms")});ie({success:Xe().optional().describe("Batch success - applies to events not in results"),error:M().optional().describe("Batch error message - applies to events not in results"),processedCount:$e().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:$e().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:it(M(),Vne).optional().describe("Per-event results keyed by event ID")});const Fne=ie({type:M().min(1).max(255).describe("Event type identifier"),subject:M().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:tt().optional().describe("Event payload"),deliverAt:M().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:M().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")}),Bne=ie({id:M().describe("Unique event ID"),type:M().describe("Event type"),source:M().describe("Source connection ID"),time:M().describe("Event timestamp")}),qne=ie({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")}),Hne=ie({subscription:ie({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:Xe().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")})}),Gne=ie({eventType:M().min(1).max(255).describe("Event type to subscribe to"),publisher:M().optional().describe("Filter events by publisher connection ID"),filter:M().max(1e3).optional().describe("JSONPath filter expression on event data")}),Zne=ie({id:M().describe("Subscription ID"),connectionId:M().describe("Subscriber connection ID"),eventType:M().describe("Event type pattern"),publisher:M().nullable().describe("Publisher connection filter"),filter:M().nullable().describe("JSONPath filter expression"),enabled:Xe().describe("Whether subscription is enabled"),createdAt:M().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:M().datetime().describe("Updated timestamp (ISO 8601)")}),Wne=ie({subscriptions:we(Gne).describe("Desired subscriptions - system will create/update/delete to match")}),Kne=ie({created:$e().int().min(0).describe("Number of subscriptions created"),updated:$e().int().min(0).describe("Number of subscriptions with filter updated"),deleted:$e().int().min(0).describe("Number of subscriptions removed"),unchanged:$e().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:we(Zne).describe("Current subscriptions after sync")}),Yne=ie({subscriptionId:M().describe("Subscription ID to remove")}),Qne=ie({success:Xe().describe("Whether unsubscribe was successful"),subscriptionId:M().describe("Subscription ID that was removed")}),Xne=ie({eventId:M().describe("Event ID to cancel")}),Jne=ie({success:Xe().describe("Whether cancellation was successful"),eventId:M().describe("Event ID that was cancelled")}),ere=ie({eventId:M().describe("Event ID to acknowledge")}),tre=ie({success:Xe().describe("Whether ACK was successful"),eventId:M().describe("Event ID that was acknowledged")}),Jae=[{name:"EVENT_PUBLISH",inputSchema:Fne,outputSchema:Bne},{name:"EVENT_SUBSCRIBE",inputSchema:qne,outputSchema:Hne},{name:"EVENT_UNSUBSCRIBE",inputSchema:Yne,outputSchema:Qne},{name:"EVENT_CANCEL",inputSchema:Xne,outputSchema:Jne},{name:"EVENT_ACK",inputSchema:ere,outputSchema:tre},{name:"EVENT_SYNC_SUBSCRIPTIONS",inputSchema:Wne,outputSchema:Kne}],nre=ie({type:je("string"),enum:we(M()).optional(),description:M().optional()}),rre=ie({type:M(),description:M(),paramsSchema:it(M(),nre)}),ore=ie({}),are=ie({triggers:we(rre)}),sre=ie({type:M(),params:it(M(),M()),enabled:Xe()}),ire=ie({success:Xe()}),ese=[{name:"TRIGGER_LIST",inputSchema:ore,outputSchema:are},{name:"TRIGGER_CONFIGURE",inputSchema:sre,outputSchema:ire}],cre=ie({prefix:M().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:$e().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:M().optional().describe("Token for pagination from previous response"),delimiter:M().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")}),lre=ie({objects:we(ie({key:M().describe("Object key/path"),size:$e().describe("Object size in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object")})),nextContinuationToken:M().optional().describe("Token for fetching next page of results"),isTruncated:Xe().describe("Whether there are more results available"),commonPrefixes:we(M()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")}),ure=ie({key:M().describe("Object key/path to get metadata for")}),dre=ie({contentType:M().optional().describe("MIME type of the object"),contentLength:$e().describe("Size of the object in bytes"),lastModified:M().describe("Last modified timestamp"),etag:M().describe("Entity tag for the object"),metadata:it(M(),M()).optional().describe("Custom metadata key-value pairs")}),fre=ie({key:M().describe("Object key/path to generate URL for"),expiresIn:$e().optional().describe("URL expiration time in seconds (default: from state config or 3600)")}),hre=ie({url:M().describe("Presigned URL for downloading the object"),expiresIn:$e().describe("Expiration time in seconds that was used")}),pre=ie({key:M().describe("Object key/path for the upload"),expiresIn:$e().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:M().optional().describe("MIME type for the object being uploaded")}),mre=ie({url:M().describe("Presigned URL for uploading the object"),expiresIn:$e().describe("Expiration time in seconds that was used")}),gre=ie({key:M().describe("Object key/path to delete")}),vre=ie({success:Xe().describe("Whether the deletion was successful"),key:M().describe("The key that was deleted")}),yre=ie({keys:we(M()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")}),_re=ie({deleted:we(M()).describe("Array of successfully deleted keys"),errors:we(ie({key:M(),message:M()})).describe("Array of errors for failed deletions")}),bre=[{name:"LIST_OBJECTS",inputSchema:cre,outputSchema:lre},{name:"GET_OBJECT_METADATA",inputSchema:ure,outputSchema:dre},{name:"GET_PRESIGNED_URL",inputSchema:fre,outputSchema:hre},{name:"PUT_PRESIGNED_URL",inputSchema:pre,outputSchema:mre},{name:"DELETE_OBJECT",inputSchema:gre,outputSchema:vre},{name:"DELETE_OBJECTS",inputSchema:yre,outputSchema:_re}],wre=ie({toolName:M().describe("Name of the tool to invoke on that connection"),transformCode:M().optional().describe("Pure TypeScript function for data transformation of the tool call result. Must be a TypeScript file that declares the Output interface and exports a default function: `interface Output { ... } export default async function(input): Output { ... }`\n The input will match with the tool call outputSchema. If transformCode is not provided, the tool call result will be used as the step output. \n Providing an transformCode is recommended because it both allows you to transform the data and validate it against a JSON Schema - tools are ephemeral and may return unexpected data.")}),Sre=ie({code:M().describe(`Pure TypeScript function for data transformation. Useful to merge data from multiple steps and transform it. Must be a TypeScript file that declares the Output interface and exports a default function: \`interface Output { ... } export default async function(input): Output { ... }\`
175
+ The input is the resolved value of the references in the input field. Example:
176
+ {
177
+ "input": {
178
+ "name": "@Step_1.name",
179
+ "age": "@Step_2.age"
180
+ },
181
+ "code": "export default function(input): Output { return { result: \`\${input.name} is \${input.age} years old.\` } }"
182
+ }
183
+ `)});ie({signalName:M().describe("Signal name to wait for (e.g., 'approval'). Execution pauses until SEND_SIGNAL is called with this name.")});const Ere=At([wre.describe("Call an external tool via MCP connection. "),Sre.describe("Run pure TypeScript code for data transformation. Useful to merge data from multiple steps and transform it.")]),Rre=ie({maxAttempts:$e().optional().describe("Max retry attempts on failure (default: 1, no retries)"),backoffMs:$e().optional().describe("Initial delay between retries in ms (doubles each attempt)"),timeoutMs:$e().optional().describe("Max execution time in ms before step fails (default: 30000)"),onError:It(["fail","continue"]).optional().describe("What to do when this step fails: 'fail' aborts the workflow, 'continue' skips the error and proceeds")}),t3=oo(()=>ie({type:M().optional(),properties:it(M(),tt()).optional(),required:we(M()).optional(),description:M().optional(),additionalProperties:At([Xe(),it(M(),tt())]).optional(),additionalItems:At([Xe(),it(M(),tt())]).optional(),items:t3.optional()}).passthrough()),ZC=["input","item","index","ctx"],xre=ie({name:M().min(1).refine(e=>!ZC.includes(e),{message:`Step name is reserved. Reserved names: ${ZC.join(", ")}`}).describe("Unique identifier for this step. Other steps reference its output as @name.field"),description:M().optional().describe("What this step does"),action:Ere,input:it(M(),tt()).optional().describe("Data passed to the action. Use @ref for dynamic values: @input.field (workflow input), @stepName.field (previous step output), @item/@index (loop context), @ctx.execution_id (current execution ID). Example: { 'userId': '@input.user_id', 'data': '@fetch.result', 'executionId': '@ctx.execution_id' }"),outputSchema:t3.optional().describe("Optional JSON Schema describing the expected output of the step."),config:Rre.optional().describe("Retry and timeout settings"),forEach:ie({ref:M().describe("@ ref to the step to iterate over"),concurrency:$e().optional().default(1).describe("max parallel iterations. default is 1 (sequential)")}).optional()}),Tre=It(["enqueued","running","success","error","failed","cancelled"]).default("enqueued"),n3=fg.extend({virtual_mcp_id:M().describe("ID of the virtual MCP (agent) that will be used to execute the workflow"),status:Tre.describe("Current status of the workflow execution"),input:it(M(),tt()).optional().describe("Input data for the workflow execution"),output:tt().optional().describe("Output data for the workflow execution"),completed_at_epoch_ms:$e().nullish().describe("Timestamp of when the workflow execution completed"),start_at_epoch_ms:$e().nullish().describe("Timestamp of when the workflow execution started or will start"),timeout_ms:$e().nullish().describe("Timeout in milliseconds for the workflow execution"),deadline_at_epoch_ms:$e().nullish().describe("Deadline for the workflow execution - when the workflow execution will be cancelled if it is not completed. This is read-only and is set by the workflow engine when an execution is created."),error:tt().nullish().describe("Error that occurred during the workflow execution"),completed_steps:ie({success:we(ie({name:M(),completed_at_epoch_ms:$e()})).describe("Names of the steps that were completed successfully"),error:we(M()).describe("Names of the steps that errored")}).optional().describe("Names of the steps that were completed and their status"),running_steps:we(M()).optional().describe("Names of the steps that are currently running")}),Ore=It(["signal","timer","message","output","step_started","step_completed","workflow_started","workflow_completed"]);fg.extend({execution_id:M(),type:Ore,name:M().nullish(),payload:tt().optional(),visible_at:$e().nullish(),consumed_at:$e().nullish(),source_execution_id:M().nullish()});const Cre=fg.extend({description:M().optional().describe("Human-readable summary of what this workflow does"),steps:we(xre).describe("Ordered list of steps. Execution order is auto-determined by @ref dependencies: steps with no @ref dependencies run in parallel; steps referencing @stepName wait for that step to complete.")}),Are=hg("workflow",Cre),Ire={maxAttempts:1,timeoutMs:3e4},tse={name:"Initial Step",action:{code:`
184
+ interface Input {
185
+ example: string;
186
+ }
187
+
188
+ interface Output {
189
+ result: unknown;
190
+ }
191
+
192
+ export default async function(input: Input): Promise<Output> {
193
+ return {
194
+ result: input.example
195
+ }
196
+ }`},config:Ire,outputSchema:{type:"object",properties:{result:{type:"string",description:"The result of the step"}},required:["result"],description:"The output of the step. This is a JSON Schema describing the expected output of the step."}},kre=hg("workflow_execution",n3),Nre=[...Are,...kre],nse=[...Nre],rse=hg("workflow_execution",n3);function WC(e,t,n,r){return e?e.startsWith("/")?`/${t}/${n}/${r}${e}`:e:`/${t}/${n}/${r}`}function Mre(e){return{createRoutes:e,useParams:t=>sl({strict:!1}),useSearch:t=>Mm({strict:!1}),useNavigate:()=>{const t=xl(),{org:n,project:r,pluginId:a}=sl({strict:!1});return i=>{const c=WC(i.to,n,r,a);return t({...i,to:c,params:{org:n,project:r,pluginId:a,...i.params}})}},useLocation:()=>YL(),Link:function(n){const{org:r,project:a,pluginId:i}=sl({strict:!1}),c=WC(n.to,r,a,i);return x.jsx(Dm,{...n,to:c,params:{org:r,project:a,pluginId:i,...n.params}})},_types:{routes:void 0,routeIds:void 0}}}var Ut;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const i={};for(const c of a)i[c]=c;return i},e.getValidEnumValues=a=>{const i=e.objectKeys(a).filter(u=>typeof a[a[u]]!="number"),c={};for(const u of i)c[u]=a[u];return e.objectValues(c)},e.objectValues=a=>e.objectKeys(a).map(function(i){return a[i]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&i.push(c);return i},e.find=(a,i)=>{for(const c of a)if(i(c))return c},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(Ut||(Ut={}));var KC;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(KC||(KC={}));const Fe=Ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ks=e=>{switch(typeof e){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return Number.isNaN(e)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(e)?Fe.array:e===null?Fe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Fe.promise:typeof Map<"u"&&e instanceof Map?Fe.map:typeof Set<"u"&&e instanceof Set?Fe.set:typeof Date<"u"&&e instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}},ke=Ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ha extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(i){return i.message},r={_errors:[]},a=i=>{for(const c of i.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)r._errors.push(n(c));else{let u=r,d=0;for(;d<c.path.length;){const f=c.path[d];d===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],d++}}};return a(this),r}static assert(t){if(!(t instanceof Ha))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];n[i]=n[i]||[],n[i].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ha.create=e=>new Ha(e);const mb=(e,t)=>{let n;switch(e.code){case ke.invalid_type:e.received===Fe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case ke.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Ut.jsonStringifyReplacer)}`;break;case ke.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ut.joinValues(e.keys,", ")}`;break;case ke.invalid_union:n="Invalid input";break;case ke.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ut.joinValues(e.options)}`;break;case ke.invalid_enum_value:n=`Invalid enum value. Expected ${Ut.joinValues(e.options)}, received '${e.received}'`;break;case ke.invalid_arguments:n="Invalid function arguments";break;case ke.invalid_return_type:n="Invalid function return type";break;case ke.invalid_date:n="Invalid date";break;case ke.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case ke.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case ke.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case ke.custom:n="Invalid input";break;case ke.invalid_intersection_types:n="Intersection results could not be merged";break;case ke.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ke.not_finite:n="Number must be finite";break;default:n=t.defaultError,Ut.assertNever(e)}return{message:n}};let Pre=mb;function Dre(){return Pre}const Lre=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,i=[...n,...a.path||[]],c={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let u="";const d=r.filter(f=>!!f).slice().reverse();for(const f of d)u=f(c,{data:t,defaultError:u}).message;return{...a,path:i,message:u}};function De(e,t){const n=Dre(),r=Lre({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mb?void 0:mb].filter(a=>!!a)});e.common.issues.push(r)}class ro{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return ot;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const i=await a.key,c=await a.value;r.push({key:i,value:c})}return ro.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:i,value:c}=a;if(i.status==="aborted"||c.status==="aborted")return ot;i.status==="dirty"&&t.dirty(),c.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(r[i.value]=c.value)}return{status:t.value,value:r}}}const ot=Object.freeze({status:"aborted"}),qu=e=>({status:"dirty",value:e}),Ao=e=>({status:"valid",value:e}),YC=e=>e.status==="aborted",QC=e=>e.status==="dirty",wl=e=>e.status==="valid",Rm=e=>typeof Promise<"u"&&e instanceof Promise;var Ze;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(Ze||(Ze={}));class Zs{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const XC=(e,t)=>{if(wl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ha(e.common.issues);return this._error=n,this._error}}};function yt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(c,u)=>{const{message:d}=e;return c.code==="invalid_enum_value"?{message:d??u.defaultError}:typeof u.data>"u"?{message:d??r??u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:d??n??u.defaultError}},description:a}}class Mt{get description(){return this._def.description}_getType(t){return ks(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ks(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new ro,ctx:{common:t.parent.common,data:t.data,parsedType:ks(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Rm(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ks(t)},a=this._parseSync({data:t,path:r.path,parent:r});return XC(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ks(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return wl(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>wl(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ks(t)},a=this._parse({data:t,path:r.path,parent:r}),i=await(Rm(a)?a:Promise.resolve(a));return XC(r,i)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,i)=>{const c=t(a),u=()=>i.addIssue({code:ke.custom,...r(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(d=>d?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new El({schema:this,typeName:at.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Fs.create(this,this._def)}nullable(){return Rl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return la.create(this)}promise(){return Cm.create(this,this._def)}or(t){return Tm.create([this,t],this._def)}and(t){return Om.create(this,t,this._def)}transform(t){return new El({...yt(this._def),schema:this,typeName:at.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new yb({...yt(this._def),innerType:this,defaultValue:n,typeName:at.ZodDefault})}brand(){return new aoe({typeName:at.ZodBranded,type:this,...yt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _b({...yt(this._def),innerType:this,catchValue:n,typeName:at.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return pw.create(this,t)}readonly(){return bb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const jre=/^c[^\s-]{8,}$/i,$re=/^[0-9a-z]+$/,Ure=/^[0-9A-HJKMNP-TV-Z]{26}$/i,zre=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Vre=/^[a-z0-9_-]{21}$/i,Fre=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bre=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qre=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Hre="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let e_;const Gre=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Zre=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Wre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Kre=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yre=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Qre=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,r3="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Xre=new RegExp(`^${r3}$`);function o3(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Jre(e){return new RegExp(`^${o3(e)}$`)}function eoe(e){let t=`${r3}T${o3(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function toe(e,t){return!!((t==="v4"||!t)&&Gre.test(e)||(t==="v6"||!t)&&Wre.test(e))}function noe(e,t){if(!Fre.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function roe(e,t){return!!((t==="v4"||!t)&&Zre.test(e)||(t==="v6"||!t)&&Kre.test(e))}class Ls extends Mt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Fe.string){const i=this._getOrReturnCtx(t);return De(i,{code:ke.invalid_type,expected:Fe.string,received:i.parsedType}),ot}const r=new ro;let a;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:ke.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:ke.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const c=t.data.length>i.value,u=t.data.length<i.value;(c||u)&&(a=this._getOrReturnCtx(t,a),c?De(a,{code:ke.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):u&&De(a,{code:ke.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")qre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"email",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")e_||(e_=new RegExp(Hre,"u")),e_.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"emoji",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")zre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"uuid",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Vre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"nanoid",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")jre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")$re.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cuid2",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Ure.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ulid",code:ke.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),De(a,{validation:"url",code:ke.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"regex",code:ke.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(t,a),De(a,{code:ke.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:ke.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(a=this._getOrReturnCtx(t,a),De(a,{code:ke.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?eoe(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:ke.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Xre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:ke.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Jre(i).test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{code:ke.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Bre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"duration",code:ke.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?toe(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"ip",code:ke.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?noe(t.data,i.alg)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"jwt",code:ke.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?roe(t.data,i.version)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"cidr",code:ke.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Yre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64",code:ke.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Qre.test(t.data)||(a=this._getOrReturnCtx(t,a),De(a,{validation:"base64url",code:ke.invalid_string,message:i.message}),r.dirty()):Ut.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:ke.invalid_string,...Ze.errToObj(r)})}_addCheck(t){return new Ls({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ze.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ze.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ze.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ze.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ze.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ze.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ze.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ze.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ze.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ze.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ze.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ze.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ze.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Ze.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Ze.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Ze.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ze.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...Ze.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ze.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ze.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ze.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ze.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ze.errToObj(n)})}nonempty(t){return this.min(1,Ze.errToObj(t))}trim(){return new Ls({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ls({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ls({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ls.create=e=>new Ls({checks:[],typeName:at.ZodString,coerce:e?.coerce??!1,...yt(e)});function ooe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,i=Number.parseInt(e.toFixed(a).replace(".","")),c=Number.parseInt(t.toFixed(a).replace(".",""));return i%c/10**a}class yd extends Mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Fe.number){const i=this._getOrReturnCtx(t);return De(i,{code:ke.invalid_type,expected:Fe.number,received:i.parsedType}),ot}let r;const a=new ro;for(const i of this._def.checks)i.kind==="int"?Ut.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:ke.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:ke.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:ke.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?ooe(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),De(r,{code:ke.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),De(r,{code:ke.not_finite,message:i.message}),a.dirty()):Ut.assertNever(i);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ze.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ze.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ze.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ze.toString(n))}setLimit(t,n,r,a){return new yd({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ze.toString(a)}]})}_addCheck(t){return new yd({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ze.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ze.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ze.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ze.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ze.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ze.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}yd.create=e=>new yd({checks:[],typeName:at.ZodNumber,coerce:e?.coerce||!1,...yt(e)});class _d extends Mt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Fe.bigint)return this._getInvalidInput(t);let r;const a=new ro;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:ke.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),De(r,{code:ke.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),De(r,{code:ke.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):Ut.assertNever(i);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return De(n,{code:ke.invalid_type,expected:Fe.bigint,received:n.parsedType}),ot}gte(t,n){return this.setLimit("min",t,!0,Ze.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ze.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ze.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ze.toString(n))}setLimit(t,n,r,a){return new _d({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Ze.toString(a)}]})}_addCheck(t){return new _d({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ze.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ze.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ze.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ze.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ze.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}_d.create=e=>new _d({checks:[],typeName:at.ZodBigInt,coerce:e?.coerce??!1,...yt(e)});class gb extends Mt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Fe.boolean){const r=this._getOrReturnCtx(t);return De(r,{code:ke.invalid_type,expected:Fe.boolean,received:r.parsedType}),ot}return Ao(t.data)}}gb.create=e=>new gb({typeName:at.ZodBoolean,coerce:e?.coerce||!1,...yt(e)});class xm extends Mt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Fe.date){const i=this._getOrReturnCtx(t);return De(i,{code:ke.invalid_type,expected:Fe.date,received:i.parsedType}),ot}if(Number.isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return De(i,{code:ke.invalid_date}),ot}const r=new ro;let a;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:ke.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(a=this._getOrReturnCtx(t,a),De(a,{code:ke.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Ut.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new xm({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ze.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ze.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}xm.create=e=>new xm({checks:[],coerce:e?.coerce||!1,typeName:at.ZodDate,...yt(e)});class JC extends Mt{_parse(t){if(this._getType(t)!==Fe.symbol){const r=this._getOrReturnCtx(t);return De(r,{code:ke.invalid_type,expected:Fe.symbol,received:r.parsedType}),ot}return Ao(t.data)}}JC.create=e=>new JC({typeName:at.ZodSymbol,...yt(e)});class eA extends Mt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:ke.invalid_type,expected:Fe.undefined,received:r.parsedType}),ot}return Ao(t.data)}}eA.create=e=>new eA({typeName:at.ZodUndefined,...yt(e)});class tA extends Mt{_parse(t){if(this._getType(t)!==Fe.null){const r=this._getOrReturnCtx(t);return De(r,{code:ke.invalid_type,expected:Fe.null,received:r.parsedType}),ot}return Ao(t.data)}}tA.create=e=>new tA({typeName:at.ZodNull,...yt(e)});class nA extends Mt{constructor(){super(...arguments),this._any=!0}_parse(t){return Ao(t.data)}}nA.create=e=>new nA({typeName:at.ZodAny,...yt(e)});class rA extends Mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Ao(t.data)}}rA.create=e=>new rA({typeName:at.ZodUnknown,...yt(e)});class Ws extends Mt{_parse(t){const n=this._getOrReturnCtx(t);return De(n,{code:ke.invalid_type,expected:Fe.never,received:n.parsedType}),ot}}Ws.create=e=>new Ws({typeName:at.ZodNever,...yt(e)});class oA extends Mt{_parse(t){if(this._getType(t)!==Fe.undefined){const r=this._getOrReturnCtx(t);return De(r,{code:ke.invalid_type,expected:Fe.void,received:r.parsedType}),ot}return Ao(t.data)}}oA.create=e=>new oA({typeName:at.ZodVoid,...yt(e)});class la extends Mt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==Fe.array)return De(n,{code:ke.invalid_type,expected:Fe.array,received:n.parsedType}),ot;if(a.exactLength!==null){const c=n.data.length>a.exactLength.value,u=n.data.length<a.exactLength.value;(c||u)&&(De(n,{code:c?ke.too_big:ke.too_small,minimum:u?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(De(n,{code:ke.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(De(n,{code:ke.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>a.type._parseAsync(new Zs(n,c,n.path,u)))).then(c=>ro.mergeArray(r,c));const i=[...n.data].map((c,u)=>a.type._parseSync(new Zs(n,c,n.path,u)));return ro.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new la({...this._def,minLength:{value:t,message:Ze.toString(n)}})}max(t,n){return new la({...this._def,maxLength:{value:t,message:Ze.toString(n)}})}length(t,n){return new la({...this._def,exactLength:{value:t,message:Ze.toString(n)}})}nonempty(t){return this.min(1,t)}}la.create=(e,t)=>new la({type:e,minLength:null,maxLength:null,exactLength:null,typeName:at.ZodArray,...yt(t)});function Jc(e){if(e instanceof Pn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Fs.create(Jc(r))}return new Pn({...e._def,shape:()=>t})}else return e instanceof la?new la({...e._def,type:Jc(e.element)}):e instanceof Fs?Fs.create(Jc(e.unwrap())):e instanceof Rl?Rl.create(Jc(e.unwrap())):e instanceof qi?qi.create(e.items.map(t=>Jc(t))):e}class Pn extends Mt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Ut.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Fe.object){const f=this._getOrReturnCtx(t);return De(f,{code:ke.invalid_type,expected:Fe.object,received:f.parsedType}),ot}const{status:r,ctx:a}=this._processInputParams(t),{shape:i,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof Ws&&this._def.unknownKeys==="strip"))for(const f in a.data)c.includes(f)||u.push(f);const d=[];for(const f of c){const m=i[f],p=a.data[f];d.push({key:{status:"valid",value:f},value:m._parse(new Zs(a,p,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof Ws){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)d.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")u.length>0&&(De(a,{code:ke.unrecognized_keys,keys:u}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const p=a.data[m];d.push({key:{status:"valid",value:m},value:f._parse(new Zs(a,p,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of d){const p=await m.key,g=await m.value;f.push({key:p,value:g,alwaysSet:m.alwaysSet})}return f}).then(f=>ro.mergeObjectSync(r,f)):ro.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return Ze.errToObj,new Pn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:Ze.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new Pn({...this._def,unknownKeys:"strip"})}passthrough(){return new Pn({...this._def,unknownKeys:"passthrough"})}extend(t){return new Pn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Pn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:at.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Pn({...this._def,catchall:t})}pick(t){const n={};for(const r of Ut.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of Ut.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new Pn({...this._def,shape:()=>n})}deepPartial(){return Jc(this)}partial(t){const n={};for(const r of Ut.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new Pn({...this._def,shape:()=>n})}required(t){const n={};for(const r of Ut.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Fs;)i=i._def.innerType;n[r]=i}return new Pn({...this._def,shape:()=>n})}keyof(){return a3(Ut.objectKeys(this.shape))}}Pn.create=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strip",catchall:Ws.create(),typeName:at.ZodObject,...yt(t)});Pn.strictCreate=(e,t)=>new Pn({shape:()=>e,unknownKeys:"strict",catchall:Ws.create(),typeName:at.ZodObject,...yt(t)});Pn.lazycreate=(e,t)=>new Pn({shape:e,unknownKeys:"strip",catchall:Ws.create(),typeName:at.ZodObject,...yt(t)});class Tm extends Mt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(i){for(const u of i)if(u.result.status==="valid")return u.result;for(const u of i)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=i.map(u=>new Ha(u.ctx.common.issues));return De(n,{code:ke.invalid_union,unionErrors:c}),ot}if(n.common.async)return Promise.all(r.map(async i=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(a);{let i;const c=[];for(const d of r){const f={...n,common:{...n.common,issues:[]},parent:null},m=d._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const u=c.map(d=>new Ha(d));return De(n,{code:ke.invalid_union,unionErrors:u}),ot}}get options(){return this._def.options}}Tm.create=(e,t)=>new Tm({options:e,typeName:at.ZodUnion,...yt(t)});function vb(e,t){const n=ks(e),r=ks(t);if(e===t)return{valid:!0,data:e};if(n===Fe.object&&r===Fe.object){const a=Ut.objectKeys(t),i=Ut.objectKeys(e).filter(u=>a.indexOf(u)!==-1),c={...e,...t};for(const u of i){const d=vb(e[u],t[u]);if(!d.valid)return{valid:!1};c[u]=d.data}return{valid:!0,data:c}}else if(n===Fe.array&&r===Fe.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let i=0;i<e.length;i++){const c=e[i],u=t[i],d=vb(c,u);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===Fe.date&&r===Fe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Om extends Mt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(i,c)=>{if(YC(i)||YC(c))return ot;const u=vb(i.value,c.value);return u.valid?((QC(i)||QC(c))&&n.dirty(),{status:n.value,value:u.data}):(De(r,{code:ke.invalid_intersection_types}),ot)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,c])=>a(i,c)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Om.create=(e,t,n)=>new Om({left:e,right:t,typeName:at.ZodIntersection,...yt(n)});class qi extends Mt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.array)return De(r,{code:ke.invalid_type,expected:Fe.array,received:r.parsedType}),ot;if(r.data.length<this._def.items.length)return De(r,{code:ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ot;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:ke.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((c,u)=>{const d=this._def.items[u]||this._def.rest;return d?d._parse(new Zs(r,c,r.path,u)):null}).filter(c=>!!c);return r.common.async?Promise.all(i).then(c=>ro.mergeArray(n,c)):ro.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new qi({...this._def,rest:t})}}qi.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new qi({items:e,typeName:at.ZodTuple,rest:null,...yt(t)})};class aA extends Mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.map)return De(r,{code:ke.invalid_type,expected:Fe.map,received:r.parsedType}),ot;const a=this._def.keyType,i=this._def.valueType,c=[...r.data.entries()].map(([u,d],f)=>({key:a._parse(new Zs(r,u,r.path,[f,"key"])),value:i._parse(new Zs(r,d,r.path,[f,"value"]))}));if(r.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const d of c){const f=await d.key,m=await d.value;if(f.status==="aborted"||m.status==="aborted")return ot;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const d of c){const f=d.key,m=d.value;if(f.status==="aborted"||m.status==="aborted")return ot;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}aA.create=(e,t,n)=>new aA({valueType:t,keyType:e,typeName:at.ZodMap,...yt(n)});class bd extends Mt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Fe.set)return De(r,{code:ke.invalid_type,expected:Fe.set,received:r.parsedType}),ot;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(De(r,{code:ke.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(De(r,{code:ke.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const i=this._def.valueType;function c(d){const f=new Set;for(const m of d){if(m.status==="aborted")return ot;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...r.data.values()].map((d,f)=>i._parse(new Zs(r,d,r.path,f)));return r.common.async?Promise.all(u).then(d=>c(d)):c(u)}min(t,n){return new bd({...this._def,minSize:{value:t,message:Ze.toString(n)}})}max(t,n){return new bd({...this._def,maxSize:{value:t,message:Ze.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}bd.create=(e,t)=>new bd({valueType:e,minSize:null,maxSize:null,typeName:at.ZodSet,...yt(t)});class sA extends Mt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}sA.create=(e,t)=>new sA({getter:e,typeName:at.ZodLazy,...yt(t)});class iA extends Mt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return De(n,{received:n.data,code:ke.invalid_literal,expected:this._def.value}),ot}return{status:"valid",value:t.data}}get value(){return this._def.value}}iA.create=(e,t)=>new iA({value:e,typeName:at.ZodLiteral,...yt(t)});function a3(e,t){return new Sl({values:e,typeName:at.ZodEnum,...yt(t)})}class Sl extends Mt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{expected:Ut.joinValues(r),received:n.parsedType,code:ke.invalid_type}),ot}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return De(n,{received:n.data,code:ke.invalid_enum_value,options:r}),ot}return Ao(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Sl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Sl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Sl.create=a3;class cA extends Mt{_parse(t){const n=Ut.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const a=Ut.objectValues(n);return De(r,{expected:Ut.joinValues(a),received:r.parsedType,code:ke.invalid_type}),ot}if(this._cache||(this._cache=new Set(Ut.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Ut.objectValues(n);return De(r,{received:r.data,code:ke.invalid_enum_value,options:a}),ot}return Ao(t.data)}get enum(){return this._def.values}}cA.create=(e,t)=>new cA({values:e,typeName:at.ZodNativeEnum,...yt(t)});class Cm extends Mt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Fe.promise&&n.common.async===!1)return De(n,{code:ke.invalid_type,expected:Fe.promise,received:n.parsedType}),ot;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return Ao(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Cm.create=(e,t)=>new Cm({type:e,typeName:at.ZodPromise,...yt(t)});class El extends Mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===at.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,i={addIssue:c=>{De(r,c),c.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const c=a.transform(r.data,i);if(r.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return ot;const d=await this._def.schema._parseAsync({data:u,path:r.path,parent:r});return d.status==="aborted"?ot:d.status==="dirty"||n.value==="dirty"?qu(d.value):d});{if(n.value==="aborted")return ot;const u=this._def.schema._parseSync({data:c,path:r.path,parent:r});return u.status==="aborted"?ot:u.status==="dirty"||n.value==="dirty"?qu(u.value):u}}if(a.type==="refinement"){const c=u=>{const d=a.refinement(u,i);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?ot:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>u.status==="aborted"?ot:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(a.type==="transform")if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!wl(c))return ot;const u=a.transform(c.value,i);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>wl(c)?Promise.resolve(a.transform(c.value,i)).then(u=>({status:n.value,value:u})):ot);Ut.assertNever(a)}}El.create=(e,t,n)=>new El({schema:e,typeName:at.ZodEffects,effect:t,...yt(n)});El.createWithPreprocess=(e,t,n)=>new El({schema:t,effect:{type:"preprocess",transform:e},typeName:at.ZodEffects,...yt(n)});class Fs extends Mt{_parse(t){return this._getType(t)===Fe.undefined?Ao(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Fs.create=(e,t)=>new Fs({innerType:e,typeName:at.ZodOptional,...yt(t)});class Rl extends Mt{_parse(t){return this._getType(t)===Fe.null?Ao(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Rl.create=(e,t)=>new Rl({innerType:e,typeName:at.ZodNullable,...yt(t)});class yb extends Mt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}yb.create=(e,t)=>new yb({innerType:e,typeName:at.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...yt(t)});class _b extends Mt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rm(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ha(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ha(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_b.create=(e,t)=>new _b({innerType:e,typeName:at.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...yt(t)});class lA extends Mt{_parse(t){if(this._getType(t)!==Fe.nan){const r=this._getOrReturnCtx(t);return De(r,{code:ke.invalid_type,expected:Fe.nan,received:r.parsedType}),ot}return{status:"valid",value:t.data}}}lA.create=e=>new lA({typeName:at.ZodNaN,...yt(e)});class aoe extends Mt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class pw extends Mt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ot:i.status==="dirty"?(n.dirty(),qu(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?ot:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new pw({in:t,out:n,typeName:at.ZodPipeline})}}class bb extends Mt{_parse(t){const n=this._def.innerType._parse(t),r=a=>(wl(a)&&(a.value=Object.freeze(a.value)),a);return Rm(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}bb.create=(e,t)=>new bb({innerType:e,typeName:at.ZodReadonly,...yt(t)});var at;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(at||(at={}));const soe=Ls.create,ioe=gb.create;Ws.create;la.create;const coe=Pn.create;Tm.create;Om.create;qi.create;const loe=Sl.create;Cm.create;Fs.create;Rl.create;const uoe=coe({path:soe().optional().default(""),flat:ioe().optional().default(!1),view:loe(["table","grid"]).optional().default("grid")}),doe=Mre(e=>{const{createRoute:t,lazyRouteComponent:n}=e.routing;return[t({getParentRoute:()=>e.parentRoute,path:"/",component:n(()=>ht(()=>import("./file-browser-DIaRK0us.js").then(a=>a.b),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]))),validateSearch:uoe})]}),foe=A.lazy(()=>ht(()=>import("./plugin-header-CJlxZY-i.js"),__vite__mapDeps([17,5,18]))),hoe=A.lazy(()=>ht(()=>import("./plugin-empty-state-DUosCqGd.js"),[])),poe={id:"object-storage",description:"Browse and manage files in S3-compatible object storage",binding:bre,renderHeader:e=>x.jsx(foe,{...e}),renderEmptyState:()=>x.jsx(hoe,{}),setup:e=>{const{registerSidebarGroup:t,registerPluginRoutes:n}=e;t({id:"object-storage",label:"Object Storage",items:[{icon:x.jsx(YP,{size:16}),label:"File browser"}],defaultExpanded:!0});const r=doe.createRoutes(e);n(r)}},moe="private-registry",goe="Organization private MCP registry with CRUD and Store integration",ose=`
197
+ You are an MCP tool tester running automated integration checks.
198
+
199
+ Goal:
200
+ - Validate that this MCP and its tools work end-to-end.
201
+ - Prefer realistic sequences where one tool output feeds the next tool input.
202
+ - Example chain: list -> pick id -> get/update/delete.
203
+
204
+ Rules:
205
+ - Try to execute as many tools as possible.
206
+ - If a tool requires context, first call discovery/list tools to obtain valid IDs.
207
+ - If you create test data, clean it up when possible.
208
+ - If one tool fails, continue testing the remaining tools.
209
+ - If a tool returns input validation errors, fix the arguments and retry that tool.
210
+ - For tools that require identifiers (fileId, folderId, etc), always get IDs from previous list/get calls.
211
+ - Keep calls focused and safe.
212
+
213
+ At the end, provide a concise summary of:
214
+ - What passed
215
+ - What failed
216
+ - What could not be tested and why
217
+ - If some tool needs user-specific context (email/account/tenant), explicitly output a "CONTEXT_REQUIRED" note with what is needed.
218
+ `.trim(),voe=A.lazy(()=>ht(()=>import("./registry-layout-6H7s-msc.js"),__vite__mapDeps([19,20,21,22,23,16,24,2,3,25,26,27,5,7,28,29,30,31,32,33,34,35,13,36,37,38,6,8,15,39,40,41,14,42,43,44,18,45,46,47,48,49,50,4,51,52,53,54,55,56,57,58,59,60,61]))),yoe={id:moe,description:goe,LayoutComponent:voe,setup:e=>{e.registerSidebarGroup({id:"private-registry",label:"Private Registry",items:[{icon:x.jsx(QP,{size:16}),label:"Registry"}],defaultExpanded:!0})}},_oe="workflows",boe="Create workflows for platform end-users",woe=A.lazy(()=>ht(()=>import("./plugin-header-BeGFVTX4.js"),__vite__mapDeps([62,5,18,63]))),Soe=A.lazy(()=>ht(()=>import("./plugin-empty-state-qFDP0Nr2.js"),__vite__mapDeps([64,63]))),Eoe={id:_oe,description:boe,binding:[],renderHeader:e=>x.jsx(woe,{...e}),renderEmptyState:()=>x.jsx(Soe,{})},Roe=[poe,yoe,Eoe],ti=jL({component:()=>x.jsx(Cte,{children:x.jsx(xte,{children:x.jsx(A.Suspense,{fallback:x.jsx(KP,{}),children:x.jsx(qA,{})})})})}),xoe=_t({getParentRoute:()=>ti,path:"/login",component:Ct(()=>ht(()=>import("./login-x4JJuKeA.js"),__vite__mapDeps([65,16,26]))),validateSearch:oo(()=>ie({next:M().optional(),client_id:M().optional(),redirect_uri:M().optional(),response_type:M().optional(),state:M().optional(),scope:M().optional(),code_challenge:M().optional(),code_challenge_method:M().optional()}))}),Toe=_t({getParentRoute:()=>ti,path:"/reset-password",component:Ct(()=>ht(()=>import("./reset-password-3HgT81EI.js"),__vite__mapDeps([66,16,26]))),validateSearch:oo(()=>ie({token:M().optional(),error:M().optional()}))}),Ooe=_t({getParentRoute:()=>ti,path:"/auth/$pathname",component:Ct(()=>ht(()=>import("./auth-catchall-ByYcT8WN.js"),[]))}),Coe=_t({getParentRoute:()=>ti,path:"/store/$appName",component:Ct(()=>ht(()=>import("./store-invite-z_eVOBRF.js"),[])),validateSearch:oo(()=>ie({serverName:M().optional()}))}),Aoe=_t({getParentRoute:()=>ti,path:"/oauth/callback",component:Ct(()=>ht(()=>import("./oauth-callback-7ed5Z9Xs.js"),__vite__mapDeps([67,13])))}),Ioe=_t({getParentRoute:()=>ti,path:"/oauth/callback/ai-provider",component:Ct(()=>ht(()=>import("./oauth-callback-ai-provider-qEm-Q5-E.js"),__vite__mapDeps([68,13])))}),pg=_t({getParentRoute:()=>ti,id:"shell",component:Ct(()=>ht(()=>import("./shell-layout-Bh0wZbL8.js"),__vite__mapDeps([69,70,71,24,72,73,55,74,75,31,32,76,23,37,38,77,42,26,78,79,80,18,81,82,83,48,6,43,44,5,84,85,16,57,51,59,14,40,29,86,87,88,89,47,90,4,91,92,93,49,36,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,13,111,112,60,113,114,115,116,117,27,118,46,63,11,119,52,120,121,39,122,35,123,124,125,126])))}),koe=_t({getParentRoute:()=>pg,path:"/",component:Ct(()=>ht(()=>import("./home-C52P_wmy.js"),__vite__mapDeps([127,40,86,6,5,60,36,108,26,121,39,77,42,75,16]))),beforeLoad:async()=>{const{data:e}=await nI.organization.list();if(!e)return;const t=localStorage.getItem(VC.lastOrgSlug());if(t){if(e.some(a=>a.slug===t))throw zi({to:"/$org/$project",params:{org:t,project:Bi}});localStorage.removeItem(VC.lastOrgSlug())}const n=e.length===1?e[0]:void 0;if(n)throw zi({to:"/$org/$project",params:{org:n.slug,project:Bi}})}}),Noe=_t({getParentRoute:()=>pg,path:"/$org",beforeLoad:({params:e})=>{throw zi({to:"/$org/$project",params:{org:e.org,project:Bi}})}}),jn=_t({getParentRoute:()=>pg,path:"/$org/$project",component:Ct(()=>ht(()=>import("./project-layout-CBbKmowd.js"),__vite__mapDeps([128,119,23,24,37,38,47,74,84,85,16,31,32,6,57,51,59,14,40,26,29,86,55,87,88,89,120,22,83,129,5,56,45,43,44,18,130,49,123,73,77,42,131,15,132,21,54,53,133,134,135,136,137,13,60,138,139,27,7,140,80,10,12,25,114,36,141,142,28,96,4,143,39,144,82,117,46,33,108,145,146]))),validateSearch:ie({settings:M().optional()})}),Moe=_t({getParentRoute:()=>jn,path:"/",component:Ct(()=>ht(()=>import("./page-BQl7Ie3w.js"),__vite__mapDeps([147,70,71,24,72,73,55,74,75,31,32,76,23,37,38,77,42,26,78,79,80,18,81,82,83,48,6,43,44,5,84,85,16,57,51,59,14,40,29,86,87,88,89,47,90,4,91,92,93,49,36,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,13,111,112,113,114,115,116,60,117,27,126])))}),Poe=_t({getParentRoute:()=>jn,path:"/tasks",component:Ct(()=>ht(()=>import("./tasks-CazLoC59.js"),__vite__mapDeps([148,113,70,71,24,72,73,55,74,75,31,32,76,23,37,38,77,42,26,78,79,80,18,81,82,83,48,6,43,44,5,84,85,16,57,51,59,14,40,29,86,87,88,89,47,90,4,91,92,93,49,36,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,13,114,115,116,60,117,27,141])))}),Qi=_t({getParentRoute:()=>jn,path:"/settings",beforeLoad:({params:e})=>{if(e.project===Bi)throw zi({to:"/$org/$project",params:e,search:{settings:"org.general"}})},component:Ct(()=>ht(()=>import("./layout-Ck4QNb1R.js"),__vite__mapDeps([149,74,119,23,24,85,16,31,32,38,141,7,47,21,22,129])))}),Doe=_t({getParentRoute:()=>Qi,path:"/",beforeLoad:({params:e})=>{throw zi({to:"/$org/$project/settings/general",params:{org:e.org,project:e.project}})},component:()=>null}),Loe=_t({getParentRoute:()=>Qi,path:"/general",component:Ct(()=>ht(()=>import("./general-DCfBGmuh.js"),__vite__mapDeps([150,16,24,26,46,77,42,131,15,38,151,39])))}),joe=_t({getParentRoute:()=>Qi,path:"/dependencies",component:Ct(()=>ht(()=>import("./dependencies-CPYZFhhf.js"),__vite__mapDeps([152,23,16,55,145,146,36,60,38,54,53,24,153])))}),$oe=_t({getParentRoute:()=>Qi,path:"/sidebar",component:Ct(()=>ht(()=>import("./sidebar-settings-U5rAu7py.js"),__vite__mapDeps([154,23,16,45,26,24,105,153])))}),Uoe=_t({getParentRoute:()=>Qi,path:"/plugins",component:Ct(()=>ht(()=>import("./plugins-CzL725OF.js"),__vite__mapDeps([155,132,23,16,24,45,42,21,54,53,133,134,135,136,137,13,60,43,44,32,5,18])))}),zoe=_t({getParentRoute:()=>Qi,path:"/danger",component:Ct(()=>ht(()=>import("./danger-DqsrtWLB.js"),__vite__mapDeps([156,151,16,24,26,39])))}),so=({params:e})=>{if(e.project!==Bi)throw zi({to:"/$org/$project",params:{org:e.org,project:e.project}})},Voe=_t({getParentRoute:()=>jn,path:"/projects",beforeLoad:so,component:Ct(()=>ht(()=>import("./projects-list-Bz_1RhAg.js"),__vite__mapDeps([157,119,23,24,85,16,31,32,38,114,13,36,26,86,88,89,117,118,37,77,42,46,5,60,141,7])))}),Foe=_t({getParentRoute:()=>jn,path:"/members",beforeLoad:so,component:Ct(()=>ht(()=>import("./members-Sgl6kVS6.js"),__vite__mapDeps([138,139,27,5,7,140,80,10,12,31,32,25,114,13,36,26,85,23,16,38,141,142,28,87,24,96,21,4,47,54,53,143,86,39,37,144,82,60,14,45,117,77,42,43,44,18,46,40,33,59,123,108,145,146,55])))}),Boe=_t({getParentRoute:()=>jn,path:"/mcps",beforeLoad:so,component:Ct(()=>ht(()=>import("./connections-CMaQr-QY.js"),__vite__mapDeps([158,137,139,27,5,7,140,80,10,12,31,32,25,114,13,36,26,159,160,40,96,21,117,85,23,16,38,133,134,24,161,162,30,163,2,3,164,165,39,141,4,37,91,77,42,43,44,18,46,54,53,97,166,41,33,51,106,60,167,14,108,168,136]))),validateSearch:oo(()=>ie({action:It(["create"]).optional(),tab:It(["all","connected"]).optional()}))}),qoe=_t({getParentRoute:()=>jn,path:"/mcps/$appSlug",beforeLoad:so,component:Ct(()=>ht(()=>import("./connection-detail-Zdtj4TKi.js"),__vite__mapDeps([169,137,117,168,26,60,14,133,134,24,170,125,23,16,122,59,13,54,53,136,135,43,44,32,5,18,171,172,146,95,96,21,55,31,97,36,83,98,143,86,99,76,141,7,22,39,85,38,77,42,164,165,173,174,90,94,105,104,114,175,139,27,140,80,10,12,25,142,28,40,51,106,107,20,49,167,108]))),validateSearch:oo(()=>ie({tab:M().optional()}))}),Hoe=_t({getParentRoute:()=>jn,path:"/mcps/$appSlug/$collectionName/$itemId",beforeLoad:so,component:Ct(()=>ht(()=>import("./collection-detail-Dsgpohom.js"),__vite__mapDeps([176,117,53,16,24,77,42,26,46,173,85,23,31,32,38,177,58,13,104,99,105,43,44,5,18,6,109,130,56,107,61,141,7,170,125,122,59,54,133,134,137,136,135,60,171,172,146,95,96,21,55,97,36,83,98,164,165,103,175,139,27,140,80,10,12,25,114,142,28,40,51,106,71,72,73,178,75,179,126,78,37,144,94,108,101,180]))),validateSearch:oo(()=>ie({replayId:M().optional()}))}),Goe=_t({getParentRoute:()=>jn,path:"/monitoring",beforeLoad:so,component:Ct(()=>ht(()=>import("./monitoring-DWB-fw7M.js"),__vite__mapDeps([181,114,13,36,26,85,23,16,31,32,38,141,7,117,182,25,55,5,56,8,34,59,61,178,75,180,44,18,109,112,96,21,28,174,171,24,125,33,183,60,14,160,40,27,39,161,143,110,3,54,53,97,130,10,4,145,146,43,46,159,45,42]))),validateSearch:oo(()=>ie({tab:It(["overview","audit","dashboards"]).default("overview"),from:M().default("now-30m"),to:M().default("now"),connectionId:we(M()).optional().default([]),virtualMcpId:we(M()).optional().default([]),tool:M().default(""),status:It(["all","success","errors"]).default("all"),search:M().default(""),page:$e().optional(),streaming:Xe().default(!0),propertyFilters:M().default(""),hideSystem:Xe().default(!1)}))}),Zoe=_t({getParentRoute:()=>jn,path:"/monitoring/dashboards/$dashboardId",beforeLoad:so,component:Ct(()=>ht(()=>import("./monitoring-dashboard-view-BUxqPLpn.js"),__vite__mapDeps([184,24,182,25,55,31,32,5,56,8,34,59,61,178,75,180,44,18,109,112,7,26,183,173,85,23,16,38,141,43,46,130,10,60,14,108])))}),Woe=_t({getParentRoute:()=>jn,path:"/monitoring/dashboards/$dashboardId/edit",beforeLoad:so,component:Ct(()=>ht(()=>import("./monitoring-dashboard-edit-DdNrWKBz.js"),__vite__mapDeps([185,54,53,16,24,26,96,21,4,5,55,92,18,44,61,60,14,43,32,29,173,85,23,31,38,177,58,13,141,7])))}),s3=_t({getParentRoute:()=>jn,path:"/store",beforeLoad:so,component:Ct(()=>ht(()=>import("./page-DfQnSuW1.js"),__vite__mapDeps([186,85,23,16,31,32,38,141,7,34,124,13,36,163,2,3,133,134,24,54,53,165,114,26,187,41,106,82,60,167,40,96,21,55,5,18,108,117])))}),Koe=_t({getParentRoute:()=>s3,path:"/$appName",component:Ct(()=>ht(()=>import("./mcp-server-detail-CjZvaa-f.js"),__vite__mapDeps([188,6,13,85,23,16,31,32,38,5,56,96,21,20,18,60,27,7,52,117,122,133,134,24,102,175,139,140,80,10,12,25,114,36,26,142,28,40,105,51,106,107,173,159,187,41,82,167,141,54,53,125,136,137,165,189,190]))),validateSearch:oo(()=>ie({registryId:M().optional(),serverName:M().optional(),itemId:M().optional()}))}),Yoe=_t({getParentRoute:()=>jn,path:"/automations",beforeLoad:so,component:Ct(()=>ht(()=>import("./automations-C9eao1B2.js"),__vite__mapDeps([191,114,13,36,26,117,85,23,16,31,32,38,192,24,162,30,115,86,39,25,141,7,27,5,28,140,80,33,51,60,49,14])))}),Qoe=_t({getParentRoute:()=>jn,path:"/automations/$automationId",beforeLoad:so,component:Ct(()=>ht(()=>import("./automation-detail-C1-q2EzY.js"),__vite__mapDeps([193,117,173,85,23,16,31,32,38,177,58,13,87,24,70,71,72,73,55,74,75,76,37,77,42,26,78,79,80,18,81,82,83,48,6,43,44,5,84,57,51,59,14,40,29,86,88,89,47,90,4,91,92,93,49,36,22,94,95,96,21,97,53,98,99,7,56,100,101,102,103,104,105,106,107,108,109,110,3,20,115,192,39,141,27,45,60]))),validateSearch:oo(()=>ie({tab:M().optional()}))}),Xoe=_t({getParentRoute:()=>jn,path:"/agents",beforeLoad:so,component:Ct(()=>ht(()=>import("./agents-PmHD6Xb_.js"),__vite__mapDeps([194,139,27,5,7,140,80,10,12,31,32,25,114,13,36,26,85,23,16,38,141,160,40,96,21,6,20,117,162,30,98,97,53,24,39,4,37,28,166,18,33,51,60,14,83,108,115,86,195,54,116,89]))),validateSearch:oo(()=>ie({action:It(["create"]).optional()}))}),Joe=_t({getParentRoute:()=>jn,path:"/agents/$agentId",beforeLoad:so,component:Ct(()=>ht(()=>import("./agent-detail-jg81y7ZA.js"),__vite__mapDeps([196,71,24,72,73,117,26,55,180,44,21,183,50,108,96,85,23,16,31,32,38,25,100,101,45,46,54,53,97,7,9,13,61,60,94,83,141,173,177,58,114,36,175,139,27,5,140,80,10,12,142,28,40,105,51,106,107,4,37,90,125,99,76,165,91,172,130,56,189,59,195]))),validateSearch:oo(()=>ie({tab:M().optional()}))}),eae=_t({getParentRoute:()=>jn,path:"/apps/$connectionId/$toolName",component:Ct(()=>ht(()=>import("./project-app-view-lqZ02NJN.js"),__vite__mapDeps([197,54,53,16,24,125,23,103,104,99,105,71,72,73,85,31,32,38])))}),tae=_t({getParentRoute:()=>jn,path:"/workflows",component:Ct(()=>ht(()=>import("./workflow-Bb3JE-XH.js"),__vite__mapDeps([198,24,137,139,27,5,7,140,80,10,12,31,32,25,114,13,36,26,40,96,21,56,33,81,51,14,142,28,179,124,115,86,23,117,162,30,164,165,39,53,16,54,60,173,85,38,141,63])))}),i3=_t({getParentRoute:()=>jn,path:"/$pluginId",component:Ct(()=>ht(()=>import("./dynamic-plugin-layout-D0dkPO22.js"),__vite__mapDeps([199,13,134,1,23,54,53,16,24,22,85,31,32,38])))}),nae=[],rae=[],c3=[];Roe.forEach(e=>{if(!e.setup)return;const t={parentRoute:i3,routing:{createRoute:_t,lazyRouteComponent:Ct},registerRootSidebarItem:n=>nae.push({pluginId:e.id,...n}),registerSidebarGroup:n=>rae.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{c3.push(...n)}};e.setup(t)});const oae=i3.addChildren(c3),aae=s3.addChildren([Koe]),sae=Qi.addChildren([Doe,Loe,joe,$oe,Uoe,zoe]),iae=[Moe,Poe,sae,Voe,Foe,Boe,qoe,Hoe,Goe,Zoe,Woe,aae,Yoe,Qoe,Xoe,Joe,tae,eae,oae],cae=jn.addChildren(iae),lae=pg.addChildren([koe,Noe,cae]),uae=ti.addChildren([lae,xoe,Toe,Ooe,Aoe,Ioe,Coe]),dae=GL({routeTree:uae}),fae=document.getElementById("root");k5.createRoot(fae).render(x.jsx(A.StrictMode,{children:x.jsx(KL,{router:dae})}));export{fG as $,$ae as A,sb as B,qP as C,Tte as D,Xae as E,pae as F,Dm as G,MF as H,DF as I,t1 as J,SA as K,CQ as L,PF as M,_ae as N,Bi as O,Fae as P,Vk as Q,g6 as R,KP as S,f6 as T,Yk as U,Wae as V,AN as W,Od as X,dG as Y,pn as Z,qn as _,Kae as a,JN as a$,ut as a0,tM as a1,Ka as a2,Ki as a3,XZ as a4,FN as a5,fw as a6,XP as a7,Lae as a8,zs as a9,Md as aA,Td as aB,Go as aC,wd as aD,n_ as aE,nd as aF,J5 as aG,ar as aH,Lr as aI,F5 as aJ,_Z as aK,bZ as aL,wZ as aM,SZ as aN,Oae as aO,Cae as aP,EZ as aQ,Nae as aR,kae as aS,Mae as aT,Pae as aU,Dae as aV,Iae as aW,Aae as aX,LZ as aY,jZ as aZ,DZ as a_,Ho as aa,kq as ab,Dq as ac,Lq as ad,jq as ae,Mq as af,Pq as ag,$q as ah,Nq as ai,TZ as aj,K5 as ak,Qe as al,rt as am,n4 as an,o4 as ao,Ox as ap,gae as aq,mae as ar,Pm as as,YP as at,Rr as au,qA as av,it as aw,tt as ax,we as ay,It as az,Gae as b,Ed as b$,XH as b0,o1 as b1,qN as b2,dN as b3,a1 as b4,ud as b5,nN as b6,r1 as b7,n1 as b8,JH as b9,tX as bA,rX as bB,fX as bC,wP as bD,hP as bE,pP as bF,mP as bG,gP as bH,vP as bI,_P as bJ,Ju as bK,gt as bL,vr as bM,ute as bN,$P as bO,ee as bP,bae as bQ,fg as bR,Ga as bS,doe as bT,ht as bU,moe as bV,hg as bW,eo as bX,gk as bY,sr as bZ,oo as b_,eG as ba,CN as bb,Tae as bc,xae as bd,Rae as be,Ote as bf,Roe as bg,rae as bh,wb as bi,At as bj,je as bk,wae as bl,Xe as bm,$e as bn,gX as bo,vX as bp,tw as bq,ig as br,bP as bs,sg as bt,sP as bu,lJ as bv,F1 as bw,CX as bx,EX as by,eX as bz,Hi as c,ese as c0,Jae as c1,rse as c2,nse as c3,mr as c4,kF as c5,cte as c6,K7 as c7,Eae as c8,Ok as c9,RJ as cA,vt as cB,LP as cC,gee as cD,yI as cE,wY as cF,hae as cG,Ks as cH,Fa as cI,wO as cJ,DH as cK,Zo as cL,dd as cM,h1 as cN,vl as cO,Gs as cP,Ya as cQ,Wo as cR,NN as cS,jH as cT,zH as cU,$H as cV,xH as cW,qae as cX,Sk as ca,Sae as cb,nae as cc,UY as cd,Pb as ce,ose as cf,AZ as cg,UA as ch,VA as ci,yae as cj,tse as ck,CF as cl,TF as cm,SF as cn,Pk as co,Ur as cp,fA as cq,a6 as cr,c6 as cs,h6 as ct,l6 as cu,u6 as cv,m6 as cw,Cx as cx,p6 as cy,d6 as cz,Mm as d,xl as e,nI as f,sl as g,Yae as h,Qae as i,x as j,Uae as k,jae as l,zae as m,M as n,ie as o,Zae as p,fa as q,A as r,gte as s,da as t,Vae as u,PT as v,r6 as w,wA as x,vae as y,VC as z};