decocms 3.1.1 → 3.2.1

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 (254) hide show
  1. package/dist/client/assets/{AlertCircle-CxNILHAI.js → AlertCircle-ByuuAmrP.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CFrvlSKb.js → ArrowUpRight-7eXsw1ql.js} +1 -1
  3. package/dist/client/assets/{Check-BeL4GS1_.js → Check-BbSnE7nF.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-CBRDCM9J.js → CheckCircle-Ca1wJWW6.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-MTne56XS.js → ChevronDown-B3TWWBuw.js} +1 -1
  6. package/dist/client/assets/ChevronLeft-CuRKchB5.js +1 -0
  7. package/dist/client/assets/{ChevronRight-CvPPvt0o.js → ChevronRight-CYgA53ZB.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-YTSuZxrL.js → ChevronUp-0T6APBSE.js} +1 -1
  9. package/dist/client/assets/{Container-Bit7n1Sh.js → Container-RPSmr1XN.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-B4Bc-DLw.js → DotsVertical-BQNv4yup.js} +1 -1
  11. package/dist/client/assets/{Eye-Ds4VIJhE.js → Eye-CNWO8gM7.js} +1 -1
  12. package/dist/client/assets/{FilterLines-BFeQ9DcO.js → FilterLines-Cpimx7eF.js} +1 -1
  13. package/dist/client/assets/{Globe01-BQzG3iWN.js → Globe01-C0ij8Y-s.js} +1 -1
  14. package/dist/client/assets/{HardDrive-DTFLQufl.js → HardDrive-ChaMHCwz.js} +1 -1
  15. package/dist/client/assets/{Key01-4js0dcqW.js → Key01-Bfuisq2G.js} +1 -1
  16. package/dist/client/assets/{LinkExternal01-BhtjVlM2.js → LinkExternal01-BDqI6g0z.js} +1 -1
  17. package/dist/client/assets/{Monitor01-BVdINEC9.js → Monitor01-CcL8iOzY.js} +1 -1
  18. package/dist/client/assets/{Palette-BesE5Pxh.js → Palette-DKpoyUgd.js} +1 -1
  19. package/dist/client/assets/{Play-lA-ptqjk.js → Play-Bb6uueKI.js} +1 -1
  20. package/dist/client/assets/{Plus-qO_BvdHx.js → Plus-CZ_sF7TZ.js} +1 -1
  21. package/dist/client/assets/{RefreshCcw01-B128IIDx.js → RefreshCcw01-BPWCc7Ui.js} +1 -1
  22. package/dist/client/assets/{SearchMd-BtButnkh.js → SearchMd-BFlkVflN.js} +1 -1
  23. package/dist/client/assets/{Settings02-MdBElcG9.js → Settings02-Ch7efITK.js} +1 -1
  24. package/dist/client/assets/{Shield01-D8p4DW6d.js → Shield01-rrS6w-7t.js} +1 -1
  25. package/dist/client/assets/{Star01-COGAy9Dv.js → Star01-CNXX9diU.js} +1 -1
  26. package/dist/client/assets/{Stars01-DTRRtAlI.js → Stars01-BQswryR6.js} +1 -1
  27. package/dist/client/assets/{Stars02-BcY_Drly.js → Stars02-CSL2rgyN.js} +1 -1
  28. package/dist/client/assets/{Sun-Bas_PynU.js → Sun-Ck3cYoCA.js} +1 -1
  29. package/dist/client/assets/{SwitchHorizontal01-CxmKybBS.js → SwitchHorizontal01-DsrQHrpb.js} +1 -1
  30. package/dist/client/assets/{Tool01-BkMOx_Zg.js → Tool01-Cjv1XJEb.js} +1 -1
  31. package/dist/client/assets/{Trash01-Bn69e6b9.js → Trash01-CxCHXGOx.js} +1 -1
  32. package/dist/client/assets/{Upload01-CIZcbYFv.js → Upload01-CeYSkJhe.js} +1 -1
  33. package/dist/client/assets/{User01-2zSxOgFX.js → User01-DrA8Lgm7.js} +1 -1
  34. package/dist/client/assets/{Users01-DgModWg5.js → Users01-3z4KNhww.js} +1 -1
  35. package/dist/client/assets/{Users03-Cz4uncjJ.js → Users03-C9tAd5Ba.js} +1 -1
  36. package/dist/client/assets/{X-CE3UzM4P.js → X-DSdGdxng.js} +1 -1
  37. package/dist/client/assets/{XCircle-1-iiLXjU.js → XCircle--wEB3Wnr.js} +1 -1
  38. package/dist/client/assets/{XClose-g9G_Zn7s.js → XClose-SBhbV0jV.js} +1 -1
  39. package/dist/client/assets/{Zap-C8mTTKvq.js → Zap-BRXknHpU.js} +1 -1
  40. package/dist/client/assets/ZapSquare-DW4J95z9.js +1 -0
  41. package/dist/client/assets/ZoomOut-1w3s7N6o.js +1 -0
  42. package/dist/client/assets/{access-gate-DgvEg9zV.js → access-gate-DUP-FMW_.js} +1 -1
  43. package/dist/client/assets/accordion-Bu_taiZe.js +1 -0
  44. package/dist/client/assets/add-section-modal-BvFEBv0h.js +1 -0
  45. package/dist/client/assets/{agent-capabilities-DDgUvP6S.js → agent-capabilities-DbMxSg-C.js} +1 -1
  46. package/dist/client/assets/agent-icon-DkS6Ap-C.js +1 -0
  47. package/dist/client/assets/{agent-icons-B5BeKXhV.js → agent-icons-BU8H-xTW.js} +1 -1
  48. package/dist/client/assets/agents-list-DVZwv3E6.js +1 -0
  49. package/dist/client/assets/{ai-providers-CfrS7pK8.js → ai-providers-agn-dcob.js} +1 -1
  50. package/dist/client/assets/{alert-D25zRMkS.js → alert-DN73WALn.js} +1 -1
  51. package/dist/client/assets/{alert-dialog-CTHJKvkc.js → alert-dialog-Bw7NBbRz.js} +1 -1
  52. package/dist/client/assets/app-editor-BuMABOjf.js +1 -0
  53. package/dist/client/assets/{auth-catchall-DbQXTRY4.js → auth-catchall-BlJ-5WHw.js} +1 -1
  54. package/dist/client/assets/{auth-split-layout-CwF9ktSf.js → auth-split-layout-Dzm1aPH4.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-DgdQ33ky.js → automation-list-row-C3x-E244.js} +1 -1
  56. package/dist/client/assets/{automation-runs-DwVMM_f5.js → automation-runs-CTZmIulC.js} +1 -1
  57. package/dist/client/assets/automations-S87NSt_f.js +1 -0
  58. package/dist/client/assets/{avatar-CFfnEc-J.js → avatar-6TETgWGc.js} +1 -1
  59. package/dist/client/assets/{badge-C7r7dui9.js → badge-B8xisPo_.js} +1 -1
  60. package/dist/client/assets/{brand-context-CFlEXUcG.js → brand-context-Mfgei73B.js} +1 -1
  61. package/dist/client/assets/{buckets-DOpWF-IW.js → buckets-CVy4SLLv.js} +1 -1
  62. package/dist/client/assets/calendar-BvvsEYKA.js +1 -0
  63. package/dist/client/assets/{capability-load-error-HBMyqEVf.js → capability-load-error-VErw4nLB.js} +1 -1
  64. package/dist/client/assets/{card-CQeAx3Vx.js → card-XQIiSY-b.js} +1 -1
  65. package/dist/client/assets/{chat-context-CoDmdsVu.js → chat-context-DzUbC-xr.js} +1 -1
  66. package/dist/client/assets/{checkbox-BnUvD6mT.js → checkbox-Bpq-GtnK.js} +1 -1
  67. package/dist/client/assets/{cli-auth-success-DgBMSypx.js → cli-auth-success-BrX77bKE.js} +1 -1
  68. package/dist/client/assets/collection-detail-Dvs8YEXJ.js +1 -0
  69. package/dist/client/assets/{collection-display-button-C8INbai1.js → collection-display-button-B3IAyNvh.js} +1 -1
  70. package/dist/client/assets/{collection-search-djXmBIPE.js → collection-search-Dnrehh9Y.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-FUroqPQm.js → collection-table-wrapper-UpBeyOT3.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-Bs1OSqt5.js → collection-tabs-CoI7UjOp.js} +1 -1
  73. package/dist/client/assets/{collections-CtABKNH_.js → collections-B7jkmTPa.js} +1 -1
  74. package/dist/client/assets/{command-BHuJVvxL.js → command-B39UMlEv.js} +1 -1
  75. package/dist/client/assets/{connect-desktop-dialog-Bgqlrqoq.js → connect-desktop-dialog-B_fv-zC_.js} +1 -1
  76. package/dist/client/assets/{connection-card-DRDylcCs.js → connection-card-BxD3hzYk.js} +1 -1
  77. package/dist/client/assets/connection-detail-Bi7jbI9b.js +1 -0
  78. package/dist/client/assets/{connection-form-helpers-D5CHE7dE.js → connection-form-helpers-qDos9L_s.js} +1 -1
  79. package/dist/client/assets/connections-qXvhTW3S.js +1 -0
  80. package/dist/client/assets/{constants-BYh-snCd.js → constants-_OexfFJl.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-0-0bl-bw.js → decopilot-sse-pool-B9TJutJ9.js} +1 -1
  82. package/dist/client/assets/dialog-N8dYL9IV.js +1 -0
  83. package/dist/client/assets/{domain-settings-Bj0SU3Jh.js → domain-settings-BMZMOFLc.js} +1 -1
  84. package/dist/client/assets/{drawer-Dep0gGKV.js → drawer-BDyeiuJ6.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-CtbTHljl.js → dropdown-menu-Jaik1o9W.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-DFDLPUiJ.js → dynamic-plugin-layout-CGMYG2P8.js} +1 -1
  87. package/dist/client/assets/{empty-state-C4k8yJuW.js → empty-state-BIZp3Wzl.js} +1 -1
  88. package/dist/client/assets/{empty-state-AxYPR9mA.js → empty-state-DmuFPxSA.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-BEWjJFKe.js → extract-connection-data-BMrTOxqq.js} +1 -1
  90. package/dist/client/assets/{features-BAJOu4LV.js → features-RZhE2UVO.js} +1 -1
  91. package/dist/client/assets/file-explorer-eWHbqcdV.js +2 -0
  92. package/dist/client/assets/{file-type-icon-DdVRbJPB.js → file-type-icon-Bscuxmvi.js} +1 -1
  93. package/dist/client/assets/{files-BOX6m6w-.js → files-C6VU3gjR.js} +1 -1
  94. package/dist/client/assets/{form-CpQMhVrb.js → form-BzUl5L3O.js} +1 -1
  95. package/dist/client/assets/{general-DL2gq1lt.js → general-FkmFS6e6.js} +1 -1
  96. package/dist/client/assets/{generate-id-C_OqT9sT.js → generate-id-BHkehxKG.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-CkY8kpmI.js → github-repo-picker-BFiC9cbF.js} +1 -1
  98. package/dist/client/assets/header-tab-button-CeJ9c_tl.js +3 -0
  99. package/dist/client/assets/{hover-card-IdAGrE8c.js → hover-card-Cd5Q8igo.js} +1 -1
  100. package/dist/client/assets/{image-field-CCXEEm_r.js → image-field-UZAPAOOz.js} +1 -1
  101. package/dist/client/assets/{index-DRtry2B5.js → index-3PLXj9NO.js} +24 -26
  102. package/dist/client/assets/index-B8ILnfS6.js +1 -0
  103. package/dist/client/assets/{index-Bc32gYoS.js → index-BLB4nIBt.js} +1 -1
  104. package/dist/client/assets/index-BLLBrYfT.js +11 -0
  105. package/dist/client/assets/{index-DsSC-nYU.js → index-BQjzxwMq.js} +1 -1
  106. package/dist/client/assets/{index-tFqoM1Ue.js → index-BUA93rVM.js} +1 -1
  107. package/dist/client/assets/index-CEk4GIBJ.js +1 -0
  108. package/dist/client/assets/{index-Br_CKeN5.js → index-CUwWwcrX.js} +1 -1
  109. package/dist/client/assets/{index-BtsB6V7_.js → index-CVcc7k1H.js} +2 -2
  110. package/dist/client/assets/{index-BjwVvH1j.js → index-CXD35HrY.js} +4 -4
  111. package/dist/client/assets/{index-A1X2xYA3.js → index-CapCq4uG.js} +1 -1
  112. package/dist/client/assets/index-Dc-40HGd.js +3 -0
  113. package/dist/client/assets/{index-Clwo7vBK.js → index-Du62ET2a.js} +3 -3
  114. package/dist/client/assets/index-DzP6PZZ7.css +1 -0
  115. package/dist/client/assets/{index-BmWH7CJj.js → index-WmwIsUVI.js} +1 -1
  116. package/dist/client/assets/{index-D3GsqLC9.js → index-meHkju0S.js} +1 -1
  117. package/dist/client/assets/{index-redirect-D9hGZXDU.js → index-redirect-DDOXoojV.js} +1 -1
  118. package/dist/client/assets/{infiniteQueryObserver-zIrc5Qb-.js → infiniteQueryObserver-CGU6vZCH.js} +1 -1
  119. package/dist/client/assets/{input-TCcH2B8J.js → input-C9wjfV7v.js} +1 -1
  120. package/dist/client/assets/{integration-icon-5HuLoYU0.js → integration-icon-DsMTB170.js} +1 -1
  121. package/dist/client/assets/{label-BViApHhU.js → label-g7qALGmg.js} +1 -1
  122. package/dist/client/assets/{layout-B9a5IDDQ.js → layout-bDoXge5D.js} +1 -1
  123. package/dist/client/assets/{login-D3EioMPr.js → login-CPZKVFaQ.js} +1 -1
  124. package/dist/client/assets/{members-CN5s--K8.js → members-DWt34Meb.js} +1 -1
  125. package/dist/client/assets/monaco-editor-CIVDk0X4.js +9 -0
  126. package/dist/client/assets/{monitoring-stats-row-DGR7pZ3H.js → monitoring-stats-row-DVsMM237.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-DcFJji4Y.js → oauth-callback-CSUHKD_o.js} +1 -1
  128. package/dist/client/assets/{oauth-callback-ai-provider-D9t9n8Ym.js → oauth-callback-ai-provider-BlWETFFP.js} +1 -1
  129. package/dist/client/assets/{onboarding-DHTDbj5z.js → onboarding-D5Ic9zJG.js} +1 -1
  130. package/dist/client/assets/{org-install-CIdRAEm2.js → org-install-Bn_KoOXH.js} +1 -1
  131. package/dist/client/assets/{org-layout-DRc-KmSs.js → org-layout-BELYI7z_.js} +1 -1
  132. package/dist/client/assets/{org-plugin-layout-DgmQetHp.js → org-plugin-layout-WHwrW77i.js} +1 -1
  133. package/dist/client/assets/{page-seo-form-D5SZyBD6.js → page-seo-form-Rig1soEP.js} +1 -1
  134. package/dist/client/assets/page-seo-sheet-Bf_FSOof.js +1 -0
  135. package/dist/client/assets/{pair-Dm3vXKHB.js → pair-zYr2GmQ7.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-Bf9odw8A.js → plugin-empty-state-CaWAfurE.js} +1 -1
  137. package/dist/client/assets/{plugin-header-Cq5KYo9E.js → plugin-header-BD-ptlOP.js} +1 -1
  138. package/dist/client/assets/{plugin-layout-BkNnTwna.js → plugin-layout-CIQ_MNTQ.js} +1 -1
  139. package/dist/client/assets/{popover-B1dASX2L.js → popover-OD-r-fVD.js} +1 -1
  140. package/dist/client/assets/{post-editor-3e4Nt15j.js → post-editor-Ww43847q.js} +2 -2
  141. package/dist/client/assets/{primitives-uPNqrnk9.js → primitives-BkhZbhaK.js} +1 -1
  142. package/dist/client/assets/{profile-BgHkQW0e.js → profile-DScmkuI4.js} +1 -1
  143. package/dist/client/assets/project-app-view-DRVCBkTN.js +1 -0
  144. package/dist/client/assets/record-editor-DNW7IuYT.js +1 -0
  145. package/dist/client/assets/registry-BDe37MkZ.js +2 -0
  146. package/dist/client/assets/{registry-layout-B1Hpl1yP.js → registry-layout-aQVqpLkk.js} +1 -1
  147. package/dist/client/assets/{require-capability-KE97O8Qd.js → require-capability-B83Rfplv.js} +1 -1
  148. package/dist/client/assets/{required-auth-layout-czExuZSc.js → required-auth-layout-DCPdZlSg.js} +1 -1
  149. package/dist/client/assets/{reset-password-BKRGZfbP.js → reset-password-BSCF-TYh.js} +1 -1
  150. package/dist/client/assets/resizable-BT2keVUf.js +1 -0
  151. package/dist/client/assets/roles-DDxTqNFx.js +1 -0
  152. package/dist/client/assets/{save-status-CPJd6ss9.js → save-status-BWK9t34W.js} +1 -1
  153. package/dist/client/assets/schema-form-DMN65tMe.js +1 -0
  154. package/dist/client/assets/{scroll-area-DZWAWvpP.js → scroll-area-huDDjp9h.js} +2 -2
  155. package/dist/client/assets/{search-input-CdCRzERo.js → search-input-Bo1czWuc.js} +1 -1
  156. package/dist/client/assets/{secrets-cR95slO6.js → secrets-BSGdlXxl.js} +1 -1
  157. package/dist/client/assets/{sections-editor-CvNT1WLU.js → sections-editor-Kc6kOt9I.js} +2 -2
  158. package/dist/client/assets/{select-DNVrcssU.js → select-D_rADyeN.js} +1 -1
  159. package/dist/client/assets/{select-model-B69NuWL6.js → select-model-D4qI7a0H.js} +1 -1
  160. package/dist/client/assets/seo-editor-GY9idGrl.js +1 -0
  161. package/dist/client/assets/settings-layout-B0Ul5kvB.js +1 -0
  162. package/dist/client/assets/{settings-section-Q3UDwB5x.js → settings-section-DMc4s0vU.js} +1 -1
  163. package/dist/client/assets/{sheet-Du3LaF1v.js → sheet-Pz5-NB3k.js} +1 -1
  164. package/dist/client/assets/{shell-controls-Bk3erCNC.js → shell-controls-C0ImSETI.js} +1 -1
  165. package/dist/client/assets/{shell-layout-D_pe8ifX.js → shell-layout-Dgdt_8rv.js} +1 -1
  166. package/dist/client/assets/{shell-route-loading-BoEMybHy.js → shell-route-loading-CB1BVSfX.js} +1 -1
  167. package/dist/client/assets/{sidebar-Dd570BWA.js → sidebar-B-j-nI2l.js} +1 -1
  168. package/dist/client/assets/{skeleton-IVNi55cd.js → skeleton-DIe_hcjh.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-B3QQU5eL.js → sortable.esm-DY8YVkDQ.js} +1 -1
  170. package/dist/client/assets/{spinner-DYX6X7R4.js → spinner-B0UNMt-U.js} +1 -1
  171. package/dist/client/assets/{sso-j3NAsCEv.js → sso-B0wN1G0O.js} +1 -1
  172. package/dist/client/assets/{store-BgMFXMyn.js → store-Ck7Guxqc.js} +1 -1
  173. package/dist/client/assets/store-registry-CFkyafgO.js +2 -0
  174. package/dist/client/assets/{switch-v-IGg8-o.js → switch-CCm7Q442.js} +1 -1
  175. package/dist/client/assets/{tab-id-9wF6NJdU.js → tab-id-Bw_e4wJV.js} +1 -1
  176. package/dist/client/assets/{table-DPhKP8io.js → table-BYsCVFvU.js} +1 -1
  177. package/dist/client/assets/{tabs-DiXWlenI.js → tabs-DU8yElp1.js} +1 -1
  178. package/dist/client/assets/{task-status-X6M92gi6.js → task-status-DukwwWFW.js} +1 -1
  179. package/dist/client/assets/{textarea-C5Q-gAUC.js → textarea-Bg3_-gyq.js} +1 -1
  180. package/dist/client/assets/{toggle-group-CinhryiV.js → toggle-group-D3JRSHCm.js} +1 -1
  181. package/dist/client/assets/toolbar-BcNvXnW_.js +1 -0
  182. package/dist/client/assets/{tools-list-BQckCc_7.js → tools-list-D-XUldpQ.js} +1 -1
  183. package/dist/client/assets/{tooltip-DlPcHg_7.js → tooltip-BLOVWRLB.js} +1 -1
  184. package/dist/client/assets/{types-CxzjkgWq.js → types-BDkt4vmT.js} +1 -1
  185. package/dist/client/assets/{use-ai-providers-WePD6A-o.js → use-ai-providers-D8uqA8F3.js} +1 -1
  186. package/dist/client/assets/{use-automations-BoufmASv.js → use-automations-B9xj4bsi.js} +1 -1
  187. package/dist/client/assets/{use-capability-Cy5OhZ8q.js → use-capability-D90XVo0g.js} +1 -1
  188. package/dist/client/assets/{use-collections-CBTBl02k.js → use-collections-DoCz8MGT.js} +1 -1
  189. package/dist/client/assets/{use-connection-ByC-72lH.js → use-connection-BP0gNEj8.js} +1 -1
  190. package/dist/client/assets/{use-copy-CG7aV8Bw.js → use-copy-QEEDdK3_.js} +1 -1
  191. package/dist/client/assets/{use-create-virtual-mcp-C-9PxkTd.js → use-create-virtual-mcp-BH7S5Lx3.js} +1 -1
  192. package/dist/client/assets/{use-debounced-autosave-DzWM-CGc.js → use-debounced-autosave-CiGa02ts.js} +1 -1
  193. package/dist/client/assets/{use-delete-connection-DRg_9jbq.js → use-delete-connection-ClZdPbyx.js} +1 -1
  194. package/dist/client/assets/{use-file-configs-BZO0VMnL.js → use-file-configs-DryWc5C3.js} +1 -1
  195. package/dist/client/assets/{use-infinite-scroll-BqDKzW2x.js → use-infinite-scroll-G1byfuk0.js} +1 -1
  196. package/dist/client/assets/{use-list-state-BdNzxfM6.js → use-list-state-ao0R-NZI.js} +1 -1
  197. package/dist/client/assets/{use-mcp-prompts-BeFY3ScJ.js → use-mcp-prompts-Dsxmrp6C.js} +1 -1
  198. package/dist/client/assets/{use-mcp-tools-G51_uFwc.js → use-mcp-tools-CP1ukXK9.js} +1 -1
  199. package/dist/client/assets/{use-members-BPoi4C1A.js → use-members-DJtUNna_.js} +1 -1
  200. package/dist/client/assets/{use-navigate-to-agent-CtPEdzh1.js → use-navigate-to-agent-D4AslRZm.js} +1 -1
  201. package/dist/client/assets/{use-org-auth-client-DdXOtn0H.js → use-org-auth-client-CxpHs_Vn.js} +1 -1
  202. package/dist/client/assets/{use-org-sso-fN4GsRuW.js → use-org-sso-RJt5vtQj.js} +1 -1
  203. package/dist/client/assets/{use-organization-roles-WXW_5wWn.js → use-organization-roles-B1v3SUrz.js} +1 -1
  204. package/dist/client/assets/{use-organization-settings-By_UmZEV.js → use-organization-settings-1zemtEzS.js} +1 -1
  205. package/dist/client/assets/{use-registry-connections-BkZ2ZOJD.js → use-registry-connections-Ex6acs_f.js} +1 -1
  206. package/dist/client/assets/{use-secrets-BJelzSB8.js → use-secrets-CIR-JEqt.js} +1 -1
  207. package/dist/client/assets/{use-status-sounds-DU2Ydnj4.js → use-status-sounds-DYoN9DxD.js} +1 -1
  208. package/dist/client/assets/{use-view-mode-DogmWo4G.js → use-view-mode-ZMLCKL2b.js} +1 -1
  209. package/dist/client/assets/{use-virtual-mcp-CT-9keNI.js → use-virtual-mcp-BRv_CvsW.js} +1 -1
  210. package/dist/client/assets/useInfiniteQuery-Dsby0HYE.js +1 -0
  211. package/dist/client/assets/{useRouterState-CwEmwiBC.js → useRouterState-DNu2gJlX.js} +1 -1
  212. package/dist/client/assets/useSuspenseInfiniteQuery-DMzYQ3Lt.js +1 -0
  213. package/dist/client/assets/{user-CoJ75n6g.js → user-CDUKY7Tn.js} +1 -1
  214. package/dist/client/assets/{view-mode-toggle-Cab9lVhf.js → view-mode-toggle-DgZQSMnW.js} +1 -1
  215. package/dist/client/assets/workflow-H0Kk_Nq-.js +1 -0
  216. package/dist/client/assets/workflow-detail-G3IbeOSM.js +1 -0
  217. package/dist/client/index.html +2 -2
  218. package/dist/server/cli.js +576 -2930
  219. package/dist/server/server.js +296 -314
  220. package/package.json +1 -1
  221. package/dist/client/assets/ZapSquare-B6OY2f4C.js +0 -1
  222. package/dist/client/assets/ZoomOut-28hLmjYh.js +0 -1
  223. package/dist/client/assets/accordion-35QRcX3A.js +0 -1
  224. package/dist/client/assets/add-section-modal-DrradozH.js +0 -1
  225. package/dist/client/assets/agent-icon-Cskaw262.js +0 -1
  226. package/dist/client/assets/agents-list-VFl2m_9Z.js +0 -1
  227. package/dist/client/assets/app-editor-D4bXXFjO.js +0 -1
  228. package/dist/client/assets/automations-BEsJQmQT.js +0 -1
  229. package/dist/client/assets/calendar-DDYw9F8V.js +0 -1
  230. package/dist/client/assets/collection-detail-pzZ_eH5F.js +0 -1
  231. package/dist/client/assets/connection-detail-xAj5CM6r.js +0 -1
  232. package/dist/client/assets/connections-B2094sHk.js +0 -1
  233. package/dist/client/assets/dialog-B1WfX0fX.js +0 -1
  234. package/dist/client/assets/file-explorer-CaAsV_yv.js +0 -2
  235. package/dist/client/assets/file-preview-BGdcimIO.js +0 -1
  236. package/dist/client/assets/index-D-gelnlt.js +0 -2
  237. package/dist/client/assets/index-DvwFUL0N.js +0 -1
  238. package/dist/client/assets/index-NrIASxVs.js +0 -1
  239. package/dist/client/assets/index-uXid0yMu.css +0 -1
  240. package/dist/client/assets/monaco-editor-CE4b2z1c.js +0 -19
  241. package/dist/client/assets/page-seo-sheet-B7uG_k7J.js +0 -1
  242. package/dist/client/assets/project-app-view-DiTZBc1v.js +0 -1
  243. package/dist/client/assets/record-editor-jUcC7iQk.js +0 -1
  244. package/dist/client/assets/registry-gHvWojgu.js +0 -2
  245. package/dist/client/assets/roles-BGyrSjtm.js +0 -1
  246. package/dist/client/assets/schema-form-BLcU5y90.js +0 -1
  247. package/dist/client/assets/seo-editor-BlLr8Anw.js +0 -1
  248. package/dist/client/assets/settings-layout-JDfHTLLv.js +0 -1
  249. package/dist/client/assets/store-registry-BMLFpwYx.js +0 -2
  250. package/dist/client/assets/toolbar-CiwzJ7Ce.js +0 -1
  251. package/dist/client/assets/useInfiniteQuery-scYJJ_GM.js +0 -1
  252. package/dist/client/assets/useSuspenseInfiniteQuery-BDTBkP42.js +0 -1
  253. package/dist/client/assets/workflow-DmweYSPb.js +0 -1
  254. package/dist/client/assets/workflow-detail-Ce7Ha6ta.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-Cq5KYo9E.js","assets/Check-BeL4GS1_.js","assets/ChevronDown-MTne56XS.js","assets/login-D3EioMPr.js","assets/input-TCcH2B8J.js","assets/auth-split-layout-CwF9ktSf.js","assets/cli-auth-success-DgBMSypx.js","assets/reset-password-BKRGZfbP.js","assets/shell-layout-D_pe8ifX.js","assets/avatar-CFfnEc-J.js","assets/User01-2zSxOgFX.js","assets/Users03-Cz4uncjJ.js","assets/Stars02-BcY_Drly.js","assets/XClose-g9G_Zn7s.js","assets/CheckCircle-CBRDCM9J.js","assets/FilterLines-BFeQ9DcO.js","assets/Zap-C8mTTKvq.js","assets/dialog-B1WfX0fX.js","assets/X-CE3UzM4P.js","assets/required-auth-layout-czExuZSc.js","assets/useRouterState-CwEmwiBC.js","assets/tab-id-9wF6NJdU.js","assets/constants-BYh-snCd.js","assets/decopilot-sse-pool-0-0bl-bw.js","assets/create-sse-subscription-BS5983N4.js","assets/use-organization-settings-By_UmZEV.js","assets/use-org-sso-fN4GsRuW.js","assets/onboarding-DHTDbj5z.js","assets/label-BViApHhU.js","assets/switch-v-IGg8-o.js","assets/Palette-BesE5Pxh.js","assets/Upload01-CIZcbYFv.js","assets/index-NrIASxVs.js","assets/sidebar-Dd570BWA.js","assets/sheet-Du3LaF1v.js","assets/tooltip-DlPcHg_7.js","assets/shell-route-loading-BoEMybHy.js","assets/ZoomOut-28hLmjYh.js","assets/toolbar-CiwzJ7Ce.js","assets/ZapSquare-B6OY2f4C.js","assets/ChevronRight-CvPPvt0o.js","assets/skeleton-IVNi55cd.js","assets/popover-B1dASX2L.js","assets/drawer-Dep0gGKV.js","assets/SearchMd-BtButnkh.js","assets/Star01-COGAy9Dv.js","assets/Plus-qO_BvdHx.js","assets/use-virtual-mcp-CT-9keNI.js","assets/use-collections-CBTBl02k.js","assets/use-create-virtual-mcp-C-9PxkTd.js","assets/use-navigate-to-agent-CtPEdzh1.js","assets/github-repo-picker-CkY8kpmI.js","assets/use-connection-ByC-72lH.js","assets/RefreshCcw01-B128IIDx.js","assets/collection-search-djXmBIPE.js","assets/checkbox-BnUvD6mT.js","assets/agent-icon-Cskaw262.js","assets/AlertCircle-CxNILHAI.js","assets/Tool01-BkMOx_Zg.js","assets/SwitchHorizontal01-CxmKybBS.js","assets/XCircle-1-iiLXjU.js","assets/ArrowUpRight-CFrvlSKb.js","assets/ChevronUp-YTSuZxrL.js","assets/DotsVertical-B4Bc-DLw.js","assets/Container-Bit7n1Sh.js","assets/Eye-Ds4VIJhE.js","assets/Globe01-BQzG3iWN.js","assets/HardDrive-DTFLQufl.js","assets/Key01-4js0dcqW.js","assets/LinkExternal01-BhtjVlM2.js","assets/Monitor01-BVdINEC9.js","assets/Sun-Bas_PynU.js","assets/Play-lA-ptqjk.js","assets/Settings02-MdBElcG9.js","assets/Shield01-D8p4DW6d.js","assets/Stars01-DTRRtAlI.js","assets/Trash01-Bn69e6b9.js","assets/Users01-DgModWg5.js","assets/use-mcp-tools-G51_uFwc.js","assets/extract-connection-data-BEWjJFKe.js","assets/generate-id-C_OqT9sT.js","assets/collections-CtABKNH_.js","assets/alert-dialog-CTHJKvkc.js","assets/form-CpQMhVrb.js","assets/spinner-DYX6X7R4.js","assets/index-BmWH7CJj.js","assets/sortable.esm-B3QQU5eL.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-DRDylcCs.js","assets/use-registry-connections-BkZ2ZOJD.js","assets/useInfiniteQuery-scYJJ_GM.js","assets/infiniteQueryObserver-zIrc5Qb-.js","assets/card-CQeAx3Vx.js","assets/integration-icon-5HuLoYU0.js","assets/collection-tabs-Bs1OSqt5.js","assets/badge-C7r7dui9.js","assets/select-DNVrcssU.js","assets/textarea-C5Q-gAUC.js","assets/connection-form-helpers-D5CHE7dE.js","assets/use-infinite-scroll-BqDKzW2x.js","assets/useSuspenseInfiniteQuery-BDTBkP42.js","assets/use-ai-providers-WePD6A-o.js","assets/command-BHuJVvxL.js","assets/index-DsSC-nYU.js","assets/use-org-auth-client-DdXOtn0H.js","assets/hover-card-IdAGrE8c.js","assets/task-status-X6M92gi6.js","assets/format-time-Cy7tTmZp.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/chat-context-CoDmdsVu.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/connect-desktop-dialog-Bgqlrqoq.js","assets/shell-controls-Bk3erCNC.js","assets/index-DRtry2B5.js","assets/agent-capabilities-DDgUvP6S.js","assets/pair-Dm3vXKHB.js","assets/scroll-area-DZWAWvpP.js","assets/use-copy-CG7aV8Bw.js","assets/file-type-icon-DdVRbJPB.js","assets/content-blocks-o63cs2vh.js","assets/types-CxzjkgWq.js","assets/use-mcp-prompts-BeFY3ScJ.js","assets/tabs-DiXWlenI.js","assets/toggle-group-CinhryiV.js","assets/agent-icons-B5BeKXhV.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-Q3UDwB5x.js","assets/index-A1X2xYA3.js","assets/dropdown-menu-CtbTHljl.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-DU2Ydnj4.js","assets/empty-state-AxYPR9mA.js","assets/accordion-35QRcX3A.js","assets/use-capability-Cy5OhZ8q.js","assets/monaco-editor-CE4b2z1c.js","assets/user-CoJ75n6g.js","assets/tools-list-BQckCc_7.js","assets/use-debounced-autosave-DzWM-CGc.js","assets/index-D3GsqLC9.js","assets/search-input-CdCRzERo.js","assets/use-secrets-BJelzSB8.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/view-mode-toggle-Cab9lVhf.js","assets/select-model-B69NuWL6.js","assets/use-automations-BoufmASv.js","assets/automation-runs-DwVMM_f5.js","assets/table-DPhKP8io.js","assets/use-members-BPoi4C1A.js","assets/automation-list-row-DgdQ33ky.js","assets/file-preview-BGdcimIO.js","assets/index-DDGTF8rc.css","assets/index-DvwFUL0N.js","assets/index-D-gelnlt.js","assets/settings-layout-JDfHTLLv.js","assets/index-redirect-D9hGZXDU.js","assets/capability-load-error-HBMyqEVf.js","assets/connections-B2094sHk.js","assets/collection-display-button-C8INbai1.js","assets/use-delete-connection-DRg_9jbq.js","assets/use-list-state-BdNzxfM6.js","assets/use-view-mode-DogmWo4G.js","assets/connection-detail-xAj5CM6r.js","assets/index-Br_CKeN5.js","assets/index-tFqoM1Ue.js","assets/index-Bc32gYoS.js","assets/layout-B9a5IDDQ.js","assets/monitoring-stats-row-DGR7pZ3H.js","assets/collection-detail-pzZ_eH5F.js","assets/index-Clwo7vBK.js","assets/empty-state-C4k8yJuW.js","assets/alert-D25zRMkS.js","assets/index-BtsB6V7_.js","assets/require-capability-KE97O8Qd.js","assets/access-gate-DgvEg9zV.js","assets/calendar-DDYw9F8V.js","assets/general-DL2gq1lt.js","assets/domain-settings-Bj0SU3Jh.js","assets/features-BAJOu4LV.js","assets/brand-context-CFlEXUcG.js","assets/ai-providers-CfrS7pK8.js","assets/secrets-cR95slO6.js","assets/buckets-DOpWF-IW.js","assets/use-file-configs-BZO0VMnL.js","assets/members-CN5s--K8.js","assets/collection-table-wrapper-FUroqPQm.js","assets/use-organization-roles-WXW_5wWn.js","assets/roles-BGyrSjtm.js","assets/sso-j3NAsCEv.js","assets/profile-BgHkQW0e.js","assets/store-BgMFXMyn.js","assets/registry-gHvWojgu.js","assets/store-registry-BMLFpwYx.js","assets/workflow-DmweYSPb.js","assets/workflow-detail-Ce7Ha6ta.js","assets/org-plugin-layout-DgmQetHp.js","assets/plugin-layout-BkNnTwna.js","assets/agents-list-VFl2m_9Z.js","assets/automations-BEsJQmQT.js","assets/dynamic-plugin-layout-DFDLPUiJ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/plugin-header-BD-ptlOP.js","assets/Check-BbSnE7nF.js","assets/ChevronDown-B3TWWBuw.js","assets/login-CPZKVFaQ.js","assets/input-C9wjfV7v.js","assets/auth-split-layout-Dzm1aPH4.js","assets/cli-auth-success-BrX77bKE.js","assets/reset-password-BSCF-TYh.js","assets/shell-layout-Dgdt_8rv.js","assets/avatar-6TETgWGc.js","assets/User01-DrA8Lgm7.js","assets/Users03-C9tAd5Ba.js","assets/Stars02-CSL2rgyN.js","assets/XClose-SBhbV0jV.js","assets/CheckCircle-Ca1wJWW6.js","assets/FilterLines-Cpimx7eF.js","assets/Zap-BRXknHpU.js","assets/dialog-N8dYL9IV.js","assets/X-DSdGdxng.js","assets/required-auth-layout-DCPdZlSg.js","assets/useRouterState-DNu2gJlX.js","assets/tab-id-Bw_e4wJV.js","assets/constants-_OexfFJl.js","assets/decopilot-sse-pool-B9TJutJ9.js","assets/create-sse-subscription-BS5983N4.js","assets/use-organization-settings-1zemtEzS.js","assets/use-org-sso-RJt5vtQj.js","assets/onboarding-D5Ic9zJG.js","assets/label-g7qALGmg.js","assets/switch-CCm7Q442.js","assets/Palette-DKpoyUgd.js","assets/Upload01-CeYSkJhe.js","assets/index-B8ILnfS6.js","assets/sidebar-B-j-nI2l.js","assets/sheet-Pz5-NB3k.js","assets/tooltip-BLOVWRLB.js","assets/shell-route-loading-CB1BVSfX.js","assets/ZoomOut-1w3s7N6o.js","assets/toolbar-BcNvXnW_.js","assets/ChevronLeft-CuRKchB5.js","assets/ChevronRight-CYgA53ZB.js","assets/skeleton-DIe_hcjh.js","assets/popover-OD-r-fVD.js","assets/drawer-BDyeiuJ6.js","assets/SearchMd-BFlkVflN.js","assets/Star01-CNXX9diU.js","assets/Plus-CZ_sF7TZ.js","assets/use-virtual-mcp-BRv_CvsW.js","assets/use-collections-DoCz8MGT.js","assets/use-create-virtual-mcp-BH7S5Lx3.js","assets/use-navigate-to-agent-D4AslRZm.js","assets/github-repo-picker-BFiC9cbF.js","assets/use-connection-BP0gNEj8.js","assets/RefreshCcw01-BPWCc7Ui.js","assets/collection-search-Dnrehh9Y.js","assets/checkbox-Bpq-GtnK.js","assets/agent-icon-DkS6Ap-C.js","assets/AlertCircle-ByuuAmrP.js","assets/Tool01-Cjv1XJEb.js","assets/SwitchHorizontal01-DsrQHrpb.js","assets/XCircle--wEB3Wnr.js","assets/ArrowUpRight-7eXsw1ql.js","assets/ZapSquare-DW4J95z9.js","assets/ChevronUp-0T6APBSE.js","assets/DotsVertical-BQNv4yup.js","assets/Container-RPSmr1XN.js","assets/Eye-CNWO8gM7.js","assets/Globe01-C0ij8Y-s.js","assets/HardDrive-ChaMHCwz.js","assets/Key01-Bfuisq2G.js","assets/LinkExternal01-BDqI6g0z.js","assets/Monitor01-CcL8iOzY.js","assets/Sun-Ck3cYoCA.js","assets/Play-Bb6uueKI.js","assets/Settings02-Ch7efITK.js","assets/Shield01-rrS6w-7t.js","assets/Stars01-BQswryR6.js","assets/Trash01-CxCHXGOx.js","assets/Users01-3z4KNhww.js","assets/use-mcp-tools-CP1ukXK9.js","assets/extract-connection-data-BMrTOxqq.js","assets/generate-id-BHkehxKG.js","assets/collections-B7jkmTPa.js","assets/alert-dialog-Bw7NBbRz.js","assets/form-BzUl5L3O.js","assets/spinner-B0UNMt-U.js","assets/index-WmwIsUVI.js","assets/sortable.esm-DY8YVkDQ.js","assets/connection-slug-eyAPH6o3.js","assets/connection-card-BxD3hzYk.js","assets/use-registry-connections-Ex6acs_f.js","assets/useInfiniteQuery-Dsby0HYE.js","assets/infiniteQueryObserver-CGU6vZCH.js","assets/card-XQIiSY-b.js","assets/integration-icon-DsMTB170.js","assets/collection-tabs-CoI7UjOp.js","assets/badge-B8xisPo_.js","assets/select-D_rADyeN.js","assets/textarea-Bg3_-gyq.js","assets/connection-form-helpers-qDos9L_s.js","assets/use-infinite-scroll-G1byfuk0.js","assets/useSuspenseInfiniteQuery-DMzYQ3Lt.js","assets/use-ai-providers-D8uqA8F3.js","assets/command-B39UMlEv.js","assets/index-BQjzxwMq.js","assets/use-org-auth-client-CxpHs_Vn.js","assets/hover-card-Cd5Q8igo.js","assets/task-status-DukwwWFW.js","assets/format-time-Cy7tTmZp.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/chat-context-DzUbC-xr.js","assets/unwrap-tool-result-BYXdCQMg.js","assets/connect-desktop-dialog-B_fv-zC_.js","assets/shell-controls-C0ImSETI.js","assets/index-3PLXj9NO.js","assets/agent-capabilities-DbMxSg-C.js","assets/pair-zYr2GmQ7.js","assets/scroll-area-huDDjp9h.js","assets/use-copy-QEEDdK3_.js","assets/file-type-icon-Bscuxmvi.js","assets/content-blocks-o63cs2vh.js","assets/types-BDkt4vmT.js","assets/use-mcp-prompts-Dsxmrp6C.js","assets/tabs-DU8yElp1.js","assets/toggle-group-D3JRSHCm.js","assets/agent-icons-BU8H-xTW.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-DMc4s0vU.js","assets/index-CapCq4uG.js","assets/dropdown-menu-Jaik1o9W.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-DYoN9DxD.js","assets/empty-state-DmuFPxSA.js","assets/resizable-BT2keVUf.js","assets/use-capability-D90XVo0g.js","assets/header-tab-button-CeJ9c_tl.js","assets/index-BLLBrYfT.js","assets/user-CDUKY7Tn.js","assets/tools-list-D-XUldpQ.js","assets/use-debounced-autosave-CiGa02ts.js","assets/index-meHkju0S.js","assets/search-input-Bo1czWuc.js","assets/use-secrets-CIR-JEqt.js","assets/formatDistanceToNow-Cb2QZZJn.js","assets/accordion-Bu_taiZe.js","assets/view-mode-toggle-DgZQSMnW.js","assets/select-model-D4qI7a0H.js","assets/use-automations-B9xj4bsi.js","assets/monaco-editor-CIVDk0X4.js","assets/automation-runs-CTZmIulC.js","assets/table-BYsCVFvU.js","assets/use-members-DJtUNna_.js","assets/automation-list-row-C3x-E244.js","assets/index-DDGTF8rc.css","assets/index-CEk4GIBJ.js","assets/index-Dc-40HGd.js","assets/settings-layout-B0Ul5kvB.js","assets/index-redirect-DDOXoojV.js","assets/capability-load-error-VErw4nLB.js","assets/connections-qXvhTW3S.js","assets/collection-display-button-B3IAyNvh.js","assets/use-delete-connection-ClZdPbyx.js","assets/use-list-state-ao0R-NZI.js","assets/use-view-mode-ZMLCKL2b.js","assets/connection-detail-Bi7jbI9b.js","assets/index-CUwWwcrX.js","assets/index-BUA93rVM.js","assets/index-BLB4nIBt.js","assets/layout-bDoXge5D.js","assets/monitoring-stats-row-DVsMM237.js","assets/collection-detail-Dvs8YEXJ.js","assets/index-Du62ET2a.js","assets/empty-state-BIZp3Wzl.js","assets/alert-DN73WALn.js","assets/index-CVcc7k1H.js","assets/require-capability-B83Rfplv.js","assets/access-gate-DUP-FMW_.js","assets/calendar-BvvsEYKA.js","assets/general-FkmFS6e6.js","assets/domain-settings-BMZMOFLc.js","assets/features-RZhE2UVO.js","assets/brand-context-Mfgei73B.js","assets/ai-providers-agn-dcob.js","assets/secrets-BSGdlXxl.js","assets/buckets-CVy4SLLv.js","assets/use-file-configs-DryWc5C3.js","assets/members-DWt34Meb.js","assets/collection-table-wrapper-UpBeyOT3.js","assets/use-organization-roles-B1v3SUrz.js","assets/roles-DDxTqNFx.js","assets/sso-B0wN1G0O.js","assets/profile-DScmkuI4.js","assets/store-Ck7Guxqc.js","assets/registry-BDe37MkZ.js","assets/store-registry-CFkyafgO.js","assets/workflow-H0Kk_Nq-.js","assets/workflow-detail-G3IbeOSM.js","assets/org-plugin-layout-WHwrW77i.js","assets/plugin-layout-CIQ_MNTQ.js","assets/agents-list-DVZwv3E6.js","assets/automations-S87NSt_f.js","assets/dynamic-plugin-layout-CGMYG2P8.js"])))=>i.map(i=>d[i]);
2
2
  function Dj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const Lj="modulepreload",$j=function(e){return"/"+e},_O={},lt=function(t,n,r){let o=Promise.resolve();if(n&&n.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),d=c?.nonce||c?.getAttribute("nonce");o=l(n.map(f=>{if(f=$j(f),f in _O)return;_O[f]=!0;const p=f.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":Lj,p||(g.as="script"),g.crossOrigin="",g.href=f,d&&g.setAttribute("nonce",d),document.head.appendChild(g),p)return new Promise((v,y)=>{g.addEventListener("load",v),g.addEventListener("error",()=>y(Error(`Unable to preload CSS for ${f}`)))})}))}function s(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return o.then(l=>{for(const c of l||[])c.status==="rejected"&&s(c.reason);return t().catch(s)})};var Jce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ma(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var T_={exports:{}},Zu={};var yO;function jj(){if(yO)return Zu;yO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:r,key:l,ref:o!==void 0?o:null,props:s}}return Zu.Fragment=t,Zu.jsx=n,Zu.jsxs=n,Zu}var bO;function Uj(){return bO||(bO=1,T_.exports=jj()),T_.exports}var C=Uj(),C_={exports:{}},Yu={},A_={exports:{}},I_={};var wO;function zj(){return wO||(wO=1,(function(e){function t(q,W){var te=q.length;q.push(W);e:for(;0<te;){var le=te-1>>>1,Q=q[le];if(0<o(Q,W))q[le]=W,q[te]=Q,te=le;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var W=q[0],te=q.pop();if(te!==W){q[0]=te;e:for(var le=0,Q=q.length,k=Q>>>1;le<k;){var G=2*(le+1)-1,V=q[G],D=G+1,F=q[D];if(0>o(V,te))D<Q&&0>o(F,V)?(q[le]=F,q[D]=te,le=D):(q[le]=V,q[G]=te,le=G);else if(D<Q&&0>o(F,te))q[le]=F,q[D]=te,le=D;else break e}}return W}function o(q,W){var te=q.sortIndex-W.sortIndex;return te!==0?te:q.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var d=[],f=[],p=1,h=null,g=3,v=!1,y=!1,b=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function R(q){for(var W=n(f);W!==null;){if(W.callback===null)r(f);else if(W.startTime<=q)r(f),W.sortIndex=W.expirationTime,t(d,W);else break;W=n(f)}}function O(q){if(b=!1,R(q),!y)if(n(d)!==null)y=!0,A||(A=!0,B());else{var W=n(f);W!==null&&oe(O,W.startTime-q)}}var A=!1,I=-1,P=5,L=-1;function H(){return x?!0:!(e.unstable_now()-L<P)}function j(){if(x=!1,A){var q=e.unstable_now();L=q;var W=!0;try{e:{y=!1,b&&(b=!1,E(I),I=-1),v=!0;var te=g;try{t:{for(R(q),h=n(d);h!==null&&!(h.expirationTime>q&&H());){var le=h.callback;if(typeof le=="function"){h.callback=null,g=h.priorityLevel;var Q=le(h.expirationTime<=q);if(q=e.unstable_now(),typeof Q=="function"){h.callback=Q,R(q),W=!0;break t}h===n(d)&&r(d),R(q)}else r(d);h=n(d)}if(h!==null)W=!0;else{var k=n(f);k!==null&&oe(O,k.startTime-q),W=!1}}break e}finally{h=null,g=te,v=!1}W=void 0}}finally{W?B():A=!1}}}var B;if(typeof T=="function")B=function(){T(j)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,K=z.port2;z.port1.onmessage=j,B=function(){K.postMessage(null)}}else B=function(){w(j,0)};function oe(q,W){I=w(function(){q(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(q){switch(g){case 1:case 2:case 3:var W=3;break;default:W=g}var te=g;g=W;try{return q()}finally{g=te}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(q,W){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var te=g;g=q;try{return W()}finally{g=te}},e.unstable_scheduleCallback=function(q,W,te){var le=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?le+te:le):te=le,q){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=te+Q,q={id:p++,callback:W,priorityLevel:q,startTime:te,expirationTime:Q,sortIndex:-1},te>le?(q.sortIndex=te,t(f,q),n(d)===null&&q===n(f)&&(b?(E(I),I=-1):b=!0,oe(O,te-le))):(q.sortIndex=Q,t(d,q),y||v||(y=!0,A||(A=!0,B()))),q},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(q){var W=g;return function(){var te=g;g=W;try{return q.apply(this,arguments)}finally{g=te}}}})(I_)),I_}var SO;function Fj(){return SO||(SO=1,A_.exports=zj()),A_.exports}var M_={exports:{}},ot={};var EO;function Bj(){if(EO)return ot;EO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),g=Symbol.iterator;function v(k){return k===null||typeof k!="object"?null:(k=g&&k[g]||k["@@iterator"],typeof k=="function"?k:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,x={};function w(k,G,V){this.props=k,this.context=G,this.refs=x,this.updater=V||y}w.prototype.isReactComponent={},w.prototype.setState=function(k,G){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,G,"setState")},w.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function E(){}E.prototype=w.prototype;function T(k,G,V){this.props=k,this.context=G,this.refs=x,this.updater=V||y}var R=T.prototype=new E;R.constructor=T,b(R,w.prototype),R.isPureReactComponent=!0;var O=Array.isArray;function A(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function L(k,G,V){var D=V.ref;return{$$typeof:e,type:k,key:G,ref:D!==void 0?D:null,props:V}}function H(k,G){return L(k.type,G,k.props)}function j(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function B(k){var G={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(V){return G[V]})}var z=/\/+/g;function K(k,G){return typeof k=="object"&&k!==null&&k.key!=null?B(""+k.key):G.toString(36)}function oe(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(A,A):(k.status="pending",k.then(function(G){k.status==="pending"&&(k.status="fulfilled",k.value=G)},function(G){k.status==="pending"&&(k.status="rejected",k.reason=G)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function q(k,G,V,D,F){var X=typeof k;(X==="undefined"||X==="boolean")&&(k=null);var fe=!1;if(k===null)fe=!0;else switch(X){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(k.$$typeof){case e:case t:fe=!0;break;case p:return fe=k._init,q(fe(k._payload),G,V,D,F)}}if(fe)return F=F(k),fe=D===""?"."+K(k,0):D,O(F)?(V="",fe!=null&&(V=fe.replace(z,"$&/")+"/"),q(F,G,V,"",function(je){return je})):F!=null&&(j(F)&&(F=H(F,V+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(z,"$&/")+"/")+fe)),G.push(F)),1;fe=0;var pe=D===""?".":D+":";if(O(k))for(var xe=0;xe<k.length;xe++)D=k[xe],X=pe+K(D,xe),fe+=q(D,G,V,X,F);else if(xe=v(k),typeof xe=="function")for(k=xe.call(k),xe=0;!(D=k.next()).done;)D=D.value,X=pe+K(D,xe++),fe+=q(D,G,V,X,F);else if(X==="object"){if(typeof k.then=="function")return q(oe(k),G,V,D,F);throw G=String(k),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return fe}function W(k,G,V){if(k==null)return k;var D=[],F=0;return q(k,D,"","",function(X){return G.call(V,X,F++)}),D}function te(k){if(k._status===-1){var G=k._result;G=G(),G.then(function(V){(k._status===0||k._status===-1)&&(k._status=1,k._result=V)},function(V){(k._status===0||k._status===-1)&&(k._status=2,k._result=V)}),k._status===-1&&(k._status=0,k._result=G)}if(k._status===1)return k._result.default;throw k._result}var le=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},Q={map:W,forEach:function(k,G,V){W(k,function(){G.apply(this,arguments)},V)},count:function(k){var G=0;return W(k,function(){G++}),G},toArray:function(k){return W(k,function(G){return G})||[]},only:function(k){if(!j(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return ot.Activity=h,ot.Children=Q,ot.Component=w,ot.Fragment=n,ot.Profiler=o,ot.PureComponent=T,ot.StrictMode=r,ot.Suspense=d,ot.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,ot.__COMPILER_RUNTIME={__proto__:null,c:function(k){return I.H.useMemoCache(k)}},ot.cache=function(k){return function(){return k.apply(null,arguments)}},ot.cacheSignal=function(){return null},ot.cloneElement=function(k,G,V){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var D=b({},k.props),F=k.key;if(G!=null)for(X in G.key!==void 0&&(F=""+G.key),G)!P.call(G,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&G.ref===void 0||(D[X]=G[X]);var X=arguments.length-2;if(X===1)D.children=V;else if(1<X){for(var fe=Array(X),pe=0;pe<X;pe++)fe[pe]=arguments[pe+2];D.children=fe}return L(k.type,F,D)},ot.createContext=function(k){return k={$$typeof:l,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:s,_context:k},k},ot.createElement=function(k,G,V){var D,F={},X=null;if(G!=null)for(D in G.key!==void 0&&(X=""+G.key),G)P.call(G,D)&&D!=="key"&&D!=="__self"&&D!=="__source"&&(F[D]=G[D]);var fe=arguments.length-2;if(fe===1)F.children=V;else if(1<fe){for(var pe=Array(fe),xe=0;xe<fe;xe++)pe[xe]=arguments[xe+2];F.children=pe}if(k&&k.defaultProps)for(D in fe=k.defaultProps,fe)F[D]===void 0&&(F[D]=fe[D]);return L(k,X,F)},ot.createRef=function(){return{current:null}},ot.forwardRef=function(k){return{$$typeof:c,render:k}},ot.isValidElement=j,ot.lazy=function(k){return{$$typeof:p,_payload:{_status:-1,_result:k},_init:te}},ot.memo=function(k,G){return{$$typeof:f,type:k,compare:G===void 0?null:G}},ot.startTransition=function(k){var G=I.T,V={};I.T=V;try{var D=k(),F=I.S;F!==null&&F(V,D),typeof D=="object"&&D!==null&&typeof D.then=="function"&&D.then(A,le)}catch(X){le(X)}finally{G!==null&&V.types!==null&&(G.types=V.types),I.T=G}},ot.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},ot.use=function(k){return I.H.use(k)},ot.useActionState=function(k,G,V){return I.H.useActionState(k,G,V)},ot.useCallback=function(k,G){return I.H.useCallback(k,G)},ot.useContext=function(k){return I.H.useContext(k)},ot.useDebugValue=function(){},ot.useDeferredValue=function(k,G){return I.H.useDeferredValue(k,G)},ot.useEffect=function(k,G){return I.H.useEffect(k,G)},ot.useEffectEvent=function(k){return I.H.useEffectEvent(k)},ot.useId=function(){return I.H.useId()},ot.useImperativeHandle=function(k,G,V){return I.H.useImperativeHandle(k,G,V)},ot.useInsertionEffect=function(k,G){return I.H.useInsertionEffect(k,G)},ot.useLayoutEffect=function(k,G){return I.H.useLayoutEffect(k,G)},ot.useMemo=function(k,G){return I.H.useMemo(k,G)},ot.useOptimistic=function(k,G){return I.H.useOptimistic(k,G)},ot.useReducer=function(k,G,V){return I.H.useReducer(k,G,V)},ot.useRef=function(k){return I.H.useRef(k)},ot.useState=function(k){return I.H.useState(k)},ot.useSyncExternalStore=function(k,G,V){return I.H.useSyncExternalStore(k,G,V)},ot.useTransition=function(){return I.H.useTransition()},ot.version="19.2.6",ot}var xO;function ga(){return xO||(xO=1,M_.exports=Bj()),M_.exports}var P_={exports:{}},Sr={};var RO;function Vj(){if(RO)return Sr;RO=1;var e=ga();function t(d){var f="https://react.dev/errors/"+d;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}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},o=Symbol.for("react.portal");function s(d,f,p){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:h==null?null:""+h,children:d,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(d,f){if(d==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Sr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Sr.createPortal=function(d,f){var p=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 s(d,f,null,p)},Sr.flushSync=function(d){var f=l.T,p=r.p;try{if(l.T=null,r.p=2,d)return d()}finally{l.T=f,r.p=p,r.d.f()}},Sr.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))},Sr.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},Sr.preinit=function(d,f){if(typeof d=="string"&&f&&typeof f.as=="string"){var p=f.as,h=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?r.d.S(d,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:g,fetchPriority:v}):p==="script"&&r.d.X(d,{crossOrigin:h,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Sr.preinitModule=function(d,f){if(typeof d=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);r.d.M(d,{crossOrigin:p,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)},Sr.preload=function(d,f){if(typeof d=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,h=c(p,f.crossOrigin);r.d.L(d,p,{crossOrigin:h,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})}},Sr.preloadModule=function(d,f){if(typeof d=="string")if(f){var p=c(f.as,f.crossOrigin);r.d.m(d,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(d)},Sr.requestFormReset=function(d){r.d.r(d)},Sr.unstable_batchedUpdates=function(d,f){return d(f)},Sr.useFormState=function(d,f,p){return l.H.useFormState(d,f,p)},Sr.useFormStatus=function(){return l.H.useHostTransitionStatus()},Sr.version="19.2.6",Sr}var OO;function iP(){if(OO)return P_.exports;OO=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(),P_.exports=Vj(),P_.exports}var TO;function Hj(){if(TO)return Yu;TO=1;var e=Fj(),t=ga(),n=iP();function r(i){var a="https://react.dev/errors/"+i;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var a=i,u=i;if(i.alternate)for(;a.return;)a=a.return;else{i=a;do a=i,(a.flags&4098)!==0&&(u=a.return),i=a.return;while(i)}return a.tag===3?u:null}function l(i){if(i.tag===13){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function c(i){if(i.tag===31){var a=i.memoizedState;if(a===null&&(i=i.alternate,i!==null&&(a=i.memoizedState)),a!==null)return a.dehydrated}return null}function d(i){if(s(i)!==i)throw Error(r(188))}function f(i){var a=i.alternate;if(!a){if(a=s(i),a===null)throw Error(r(188));return a!==i?null:i}for(var u=i,m=a;;){var _=u.return;if(_===null)break;var S=_.alternate;if(S===null){if(m=_.return,m!==null){u=m;continue}break}if(_.child===S.child){for(S=_.child;S;){if(S===u)return d(_),i;if(S===m)return d(_),a;S=S.sibling}throw Error(r(188))}if(u.return!==m.return)u=_,m=S;else{for(var N=!1,U=_.child;U;){if(U===u){N=!0,u=_,m=S;break}if(U===m){N=!0,m=_,u=S;break}U=U.sibling}if(!N){for(U=S.child;U;){if(U===u){N=!0,u=S,m=_;break}if(U===m){N=!0,m=S,u=_;break}U=U.sibling}if(!N)throw Error(r(189))}}if(u.alternate!==m)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:a}function p(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i;for(i=i.child;i!==null;){if(a=p(i),a!==null)return a;i=i.sibling}return null}var h=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),j=Symbol.iterator;function B(i){return i===null||typeof i!="object"?null:(i=j&&i[j]||i["@@iterator"],typeof i=="function"?i:null)}var z=Symbol.for("react.client.reference");function K(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===z?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case b:return"Fragment";case w:return"Profiler";case x:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case L:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case y:return"Portal";case T:return i.displayName||"Context";case E:return(i._context.displayName||"Context")+".Consumer";case R:var a=i.render;return i=i.displayName,i||(i=a.displayName||a.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return a=i.displayName||null,a!==null?a:K(i.type)||"Memo";case P:a=i._payload,i=i._init;try{return K(i(a))}catch{}}return null}var oe=Array.isArray,q=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},le=[],Q=-1;function k(i){return{current:i}}function G(i){0>Q||(i.current=le[Q],le[Q]=null,Q--)}function V(i,a){Q++,le[Q]=i.current,i.current=a}var D=k(null),F=k(null),X=k(null),fe=k(null);function pe(i,a){switch(V(X,a),V(F,i),V(D,null),a.nodeType){case 9:case 11:i=(i=a.documentElement)&&(i=i.namespaceURI)?F2(i):0;break;default:if(i=a.tagName,a=a.namespaceURI)a=F2(a),i=B2(a,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}G(D),V(D,i)}function xe(){G(D),G(F),G(X)}function je(i){i.memoizedState!==null&&V(fe,i);var a=D.current,u=B2(a,i.type);a!==u&&(V(F,i),V(D,u))}function Y(i){F.current===i&&(G(D),G(F)),fe.current===i&&(G(fe),Hu._currentValue=te)}var re,ve;function se(i){if(re===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);re=a&&a[1]||"",ve=-1<u.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+re+i+ve}var Se=!1;function Te(i,a){if(!i||Se)return"";Se=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(a){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ge){var he=ge}Reflect.construct(i,[],Ee)}else{try{Ee.call()}catch(ge){he=ge}i.call(Ee.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Ee=i())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var _=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");_&&_.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var S=m.DetermineComponentFrameRoot(),N=S[0],U=S[1];if(N&&U){var J=N.split(`
@@ -7,7 +7,7 @@ function Dj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&
7
7
  `+J[m].replace(" at new "," at ");return i.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",i.displayName)),ye}while(1<=m&&0<=_);break}}}finally{Se=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?se(u):""}function tt(i,a){switch(i.tag){case 26:case 27:case 5:return se(i.type);case 16:return se("Lazy");case 13:return i.child!==a&&a!==null?se("Suspense Fallback"):se("Suspense");case 19:return se("SuspenseList");case 0:case 15:return Te(i.type,!1);case 11:return Te(i.type.render,!1);case 1:return Te(i.type,!0);case 31:return se("Activity");default:return""}}function rt(i){try{var a="",u=null;do a+=tt(i,u),u=i,i=i.return;while(i);return a}catch(m){return`
8
8
  Error generating stack: `+m.message+`
9
9
  `+m.stack}}var Be=Object.prototype.hasOwnProperty,Qe=e.unstable_scheduleCallback,Pe=e.unstable_cancelCallback,Me=e.unstable_shouldYield,ze=e.unstable_requestPaint,Z=e.unstable_now,ne=e.unstable_getCurrentPriorityLevel,ae=e.unstable_ImmediatePriority,Re=e.unstable_UserBlockingPriority,Ae=e.unstable_NormalPriority,Ie=e.unstable_LowPriority,ke=e.unstable_IdlePriority,Je=e.log,et=e.unstable_setDisableYieldValue,yt=null,Tt=null;function bt(i){if(typeof Je=="function"&&et(i),Tt&&typeof Tt.setStrictMode=="function")try{Tt.setStrictMode(yt,i)}catch{}}var Ln=Math.clz32?Math.clz32:Ye,Mi=Math.log,qo=Math.LN2;function Ye(i){return i>>>=0,i===0?32:31-(Mi(i)/qo|0)|0}var pt=256,Ct=262144,it=4194304;function Dt(i){var a=i&42;if(a!==0)return a;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function Ke(i,a,u){var m=i.pendingLanes;if(m===0)return 0;var _=0,S=i.suspendedLanes,N=i.pingedLanes;i=i.warmLanes;var U=m&134217727;return U!==0?(m=U&~S,m!==0?_=Dt(m):(N&=U,N!==0?_=Dt(N):u||(u=U&~i,u!==0&&(_=Dt(u))))):(U=m&~S,U!==0?_=Dt(U):N!==0?_=Dt(N):u||(u=m&~i,u!==0&&(_=Dt(u)))),_===0?0:a!==0&&a!==_&&(a&S)===0&&(S=_&-_,u=a&-a,S>=u||S===32&&(u&4194048)!==0)?a:_}function ft(i,a){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&a)===0}function Jt(i,a){switch(i){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 Kt(){var i=it;return it<<=1,(it&62914560)===0&&(it=4194304),i}function wr(i){for(var a=[],u=0;31>u;u++)a.push(i);return a}function Lt(i,a){i.pendingLanes|=a,a!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function sn(i,a,u,m,_,S){var N=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var U=i.entanglements,J=i.expirationTimes,de=i.hiddenUpdates;for(u=N&~u;0<u;){var ye=31-Ln(u),Ee=1<<ye;U[ye]=0,J[ye]=-1;var he=de[ye];if(he!==null)for(de[ye]=null,ye=0;ye<he.length;ye++){var ge=he[ye];ge!==null&&(ge.lane&=-536870913)}u&=~Ee}m!==0&&So(i,m,0),S!==0&&_===0&&i.tag!==0&&(i.suspendedLanes|=S&~(N&~a))}function So(i,a,u){i.pendingLanes|=a,i.suspendedLanes&=~a;var m=31-Ln(a);i.entangledLanes|=a,i.entanglements[m]=i.entanglements[m]|1073741824|u&261930}function sr(i,a){var u=i.entangledLanes|=a;for(i=i.entanglements;u;){var m=31-Ln(u),_=1<<m;_&a|i[m]&a&&(i[m]|=a),u&=~_}}function jr(i,a){var u=a&-a;return u=(u&42)!==0?1:_l(u),(u&(i.suspendedLanes|a))!==0?0:u}function _l(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function Go(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function vv(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:dO(i.type))}function TE(i,a){var u=W.p;try{return W.p=i,a()}finally{W.p=u}}var vs=Math.random().toString(36).slice(2),ar="__reactFiber$"+vs,Ur="__reactProps$"+vs,yl="__reactContainer$"+vs,_v="__reactEvents$"+vs,xL="__reactListeners$"+vs,RL="__reactHandles$"+vs,CE="__reactResources$"+vs,iu="__reactMarker$"+vs;function yv(i){delete i[ar],delete i[Ur],delete i[_v],delete i[xL],delete i[RL]}function bl(i){var a=i[ar];if(a)return a;for(var u=i.parentNode;u;){if(a=u[yl]||u[ar]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(i=Y2(i);i!==null;){if(u=i[ar])return u;i=Y2(i)}return a}i=u,u=i.parentNode}return null}function wl(i){if(i=i[ar]||i[yl]){var a=i.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return i}return null}function su(i){var a=i.tag;if(a===5||a===26||a===27||a===6)return i.stateNode;throw Error(r(33))}function Sl(i){var a=i[CE];return a||(a=i[CE]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function er(i){i[iu]=!0}var AE=new Set,IE={};function Sa(i,a){El(i,a),El(i+"Capture",a)}function El(i,a){for(IE[i]=a,i=0;i<a.length;i++)AE.add(a[i])}var OL=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]*$"),ME={},PE={};function TL(i){return Be.call(PE,i)?!0:Be.call(ME,i)?!1:OL.test(i)?PE[i]=!0:(ME[i]=!0,!1)}function Af(i,a,u){if(TL(a))if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){i.removeAttribute(a);return}}i.setAttribute(a,""+u)}}function If(i,a,u){if(u===null)i.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(a);return}i.setAttribute(a,""+u)}}function Pi(i,a,u,m){if(m===null)i.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(a,u,""+m)}}function Eo(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function NE(i){var a=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function CL(i,a,u){var m=Object.getOwnPropertyDescriptor(i.constructor.prototype,a);if(!i.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var _=m.get,S=m.set;return Object.defineProperty(i,a,{configurable:!0,get:function(){return _.call(this)},set:function(N){u=""+N,S.call(this,N)}}),Object.defineProperty(i,a,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(N){u=""+N},stopTracking:function(){i._valueTracker=null,delete i[a]}}}}function bv(i){if(!i._valueTracker){var a=NE(i)?"checked":"value";i._valueTracker=CL(i,a,""+i[a])}}function kE(i){if(!i)return!1;var a=i._valueTracker;if(!a)return!0;var u=a.getValue(),m="";return i&&(m=NE(i)?i.checked?"true":"false":i.value),i=m,i!==u?(a.setValue(i),!0):!1}function Mf(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var AL=/[\n"\\]/g;function xo(i){return i.replace(AL,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function wv(i,a,u,m,_,S,N,U){i.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.type=N:i.removeAttribute("type"),a!=null?N==="number"?(a===0&&i.value===""||i.value!=a)&&(i.value=""+Eo(a)):i.value!==""+Eo(a)&&(i.value=""+Eo(a)):N!=="submit"&&N!=="reset"||i.removeAttribute("value"),a!=null?Sv(i,N,Eo(a)):u!=null?Sv(i,N,Eo(u)):m!=null&&i.removeAttribute("value"),_==null&&S!=null&&(i.defaultChecked=!!S),_!=null&&(i.checked=_&&typeof _!="function"&&typeof _!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?i.name=""+Eo(U):i.removeAttribute("name")}function DE(i,a,u,m,_,S,N,U){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.type=S),a!=null||u!=null){if(!(S!=="submit"&&S!=="reset"||a!=null)){bv(i);return}u=u!=null?""+Eo(u):"",a=a!=null?""+Eo(a):u,U||a===i.value||(i.value=a),i.defaultValue=a}m=m??_,m=typeof m!="function"&&typeof m!="symbol"&&!!m,i.checked=U?i.checked:!!m,i.defaultChecked=!!m,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(i.name=N),bv(i)}function Sv(i,a,u){a==="number"&&Mf(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function xl(i,a,u,m){if(i=i.options,a){a={};for(var _=0;_<u.length;_++)a["$"+u[_]]=!0;for(u=0;u<i.length;u++)_=a.hasOwnProperty("$"+i[u].value),i[u].selected!==_&&(i[u].selected=_),_&&m&&(i[u].defaultSelected=!0)}else{for(u=""+Eo(u),a=null,_=0;_<i.length;_++){if(i[_].value===u){i[_].selected=!0,m&&(i[_].defaultSelected=!0);return}a!==null||i[_].disabled||(a=i[_])}a!==null&&(a.selected=!0)}}function LE(i,a,u){if(a!=null&&(a=""+Eo(a),a!==i.value&&(i.value=a),u==null)){i.defaultValue!==a&&(i.defaultValue=a);return}i.defaultValue=u!=null?""+Eo(u):""}function $E(i,a,u,m){if(a==null){if(m!=null){if(u!=null)throw Error(r(92));if(oe(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),a=u}u=Eo(a),i.defaultValue=u,m=i.textContent,m===u&&m!==""&&m!==null&&(i.value=m),bv(i)}function Rl(i,a){if(a){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=a;return}}i.textContent=a}var IL=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 jE(i,a,u){var m=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?i.setProperty(a,""):a==="float"?i.cssFloat="":i[a]="":m?i.setProperty(a,u):typeof u!="number"||u===0||IL.has(a)?a==="float"?i.cssFloat=u:i[a]=(""+u).trim():i[a]=u+"px"}function UE(i,a,u){if(a!=null&&typeof a!="object")throw Error(r(62));if(i=i.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?i.setProperty(m,""):m==="float"?i.cssFloat="":i[m]="");for(var _ in a)m=a[_],a.hasOwnProperty(_)&&u[_]!==m&&jE(i,_,m)}else for(var S in a)a.hasOwnProperty(S)&&jE(i,S,a[S])}function Ev(i){if(i.indexOf("-")===-1)return!1;switch(i){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 ML=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"]]),PL=/^[\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 Pf(i){return PL.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ni(){}var xv=null;function Rv(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ol=null,Tl=null;function zE(i){var a=wl(i);if(a&&(i=a.stateNode)){var u=i[Ur]||null;e:switch(i=a.stateNode,a.type){case"input":if(wv(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+xo(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var m=u[a];if(m!==i&&m.form===i.form){var _=m[Ur]||null;if(!_)throw Error(r(90));wv(m,_.value,_.defaultValue,_.defaultValue,_.checked,_.defaultChecked,_.type,_.name)}}for(a=0;a<u.length;a++)m=u[a],m.form===i.form&&kE(m)}break e;case"textarea":LE(i,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&xl(i,!!u.multiple,a,!1)}}}var Ov=!1;function FE(i,a,u){if(Ov)return i(a,u);Ov=!0;try{var m=i(a);return m}finally{if(Ov=!1,(Ol!==null||Tl!==null)&&(yh(),Ol&&(a=Ol,i=Tl,Tl=Ol=null,zE(a),i)))for(a=0;a<i.length;a++)zE(i[a])}}function au(i,a){var u=i.stateNode;if(u===null)return null;var m=u[Ur]||null;if(m===null)return null;u=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,a,typeof u));return u}var ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tv=!1;if(ki)try{var lu={};Object.defineProperty(lu,"passive",{get:function(){Tv=!0}}),window.addEventListener("test",lu,lu),window.removeEventListener("test",lu,lu)}catch{Tv=!1}var _s=null,Cv=null,Nf=null;function BE(){if(Nf)return Nf;var i,a=Cv,u=a.length,m,_="value"in _s?_s.value:_s.textContent,S=_.length;for(i=0;i<u&&a[i]===_[i];i++);var N=u-i;for(m=1;m<=N&&a[u-m]===_[S-m];m++);return Nf=_.slice(i,1<m?1-m:void 0)}function kf(i){var a=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&a===13&&(i=13)):i=a,i===10&&(i=13),32<=i||i===13?i:0}function Df(){return!0}function VE(){return!1}function zr(i){function a(u,m,_,S,N){this._reactName=u,this._targetInst=_,this.type=m,this.nativeEvent=S,this.target=N,this.currentTarget=null;for(var U in i)i.hasOwnProperty(U)&&(u=i[U],this[U]=u?u(S):S[U]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Df:VE,this.isPropagationStopped=VE,this}return h(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Df)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Df)},persist:function(){},isPersistent:Df}),a}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lf=zr(Ea),cu=h({},Ea,{view:0,detail:0}),NL=zr(cu),Av,Iv,uu,$f=h({},cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pv,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==uu&&(uu&&i.type==="mousemove"?(Av=i.screenX-uu.screenX,Iv=i.screenY-uu.screenY):Iv=Av=0,uu=i),Av)},movementY:function(i){return"movementY"in i?i.movementY:Iv}}),HE=zr($f),kL=h({},$f,{dataTransfer:0}),DL=zr(kL),LL=h({},cu,{relatedTarget:0}),Mv=zr(LL),$L=h({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),jL=zr($L),UL=h({},Ea,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),zL=zr(UL),FL=h({},Ea,{data:0}),qE=zr(FL),BL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VL={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"},HL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qL(i){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(i):(i=HL[i])?!!a[i]:!1}function Pv(){return qL}var GL=h({},cu,{key:function(i){if(i.key){var a=BL[i.key]||i.key;if(a!=="Unidentified")return a}return i.type==="keypress"?(i=kf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?VL[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pv,charCode:function(i){return i.type==="keypress"?kf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?kf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),KL=zr(GL),ZL=h({},$f,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),GE=zr(ZL),YL=h({},cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pv}),WL=zr(YL),QL=h({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),XL=zr(QL),JL=h({},$f,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),e$=zr(JL),t$=h({},Ea,{newState:0,oldState:0}),n$=zr(t$),r$=[9,13,27,32],Nv=ki&&"CompositionEvent"in window,du=null;ki&&"documentMode"in document&&(du=document.documentMode);var o$=ki&&"TextEvent"in window&&!du,KE=ki&&(!Nv||du&&8<du&&11>=du),ZE=" ",YE=!1;function WE(i,a){switch(i){case"keyup":return r$.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function QE(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Cl=!1;function i$(i,a){switch(i){case"compositionend":return QE(a);case"keypress":return a.which!==32?null:(YE=!0,ZE);case"textInput":return i=a.data,i===ZE&&YE?null:i;default:return null}}function s$(i,a){if(Cl)return i==="compositionend"||!Nv&&WE(i,a)?(i=BE(),Nf=Cv=_s=null,Cl=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return KE&&a.locale!=="ko"?null:a.data;default:return null}}var a$={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 XE(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a==="input"?!!a$[i.type]:a==="textarea"}function JE(i,a,u,m){Ol?Tl?Tl.push(m):Tl=[m]:Ol=m,a=Oh(a,"onChange"),0<a.length&&(u=new Lf("onChange","change",null,u,m),i.push({event:u,listeners:a}))}var fu=null,hu=null;function l$(i){D2(i,0)}function jf(i){var a=su(i);if(kE(a))return i}function ex(i,a){if(i==="change")return a}var tx=!1;if(ki){var kv;if(ki){var Dv="oninput"in document;if(!Dv){var nx=document.createElement("div");nx.setAttribute("oninput","return;"),Dv=typeof nx.oninput=="function"}kv=Dv}else kv=!1;tx=kv&&(!document.documentMode||9<document.documentMode)}function rx(){fu&&(fu.detachEvent("onpropertychange",ox),hu=fu=null)}function ox(i){if(i.propertyName==="value"&&jf(hu)){var a=[];JE(a,hu,i,Rv(i)),FE(l$,a)}}function c$(i,a,u){i==="focusin"?(rx(),fu=a,hu=u,fu.attachEvent("onpropertychange",ox)):i==="focusout"&&rx()}function u$(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return jf(hu)}function d$(i,a){if(i==="click")return jf(a)}function f$(i,a){if(i==="input"||i==="change")return jf(a)}function h$(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var eo=typeof Object.is=="function"?Object.is:h$;function pu(i,a){if(eo(i,a))return!0;if(typeof i!="object"||i===null||typeof a!="object"||a===null)return!1;var u=Object.keys(i),m=Object.keys(a);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var _=u[m];if(!Be.call(a,_)||!eo(i[_],a[_]))return!1}return!0}function ix(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function sx(i,a){var u=ix(i);i=0;for(var m;u;){if(u.nodeType===3){if(m=i+u.textContent.length,i<=a&&m>=a)return{node:u,offset:a-i};i=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ix(u)}}function ax(i,a){return i&&a?i===a?!0:i&&i.nodeType===3?!1:a&&a.nodeType===3?ax(i,a.parentNode):"contains"in i?i.contains(a):i.compareDocumentPosition?!!(i.compareDocumentPosition(a)&16):!1:!1}function lx(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var a=Mf(i.document);a instanceof i.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)i=a.contentWindow;else break;a=Mf(i.document)}return a}function Lv(i){var a=i&&i.nodeName&&i.nodeName.toLowerCase();return a&&(a==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||a==="textarea"||i.contentEditable==="true")}var p$=ki&&"documentMode"in document&&11>=document.documentMode,Al=null,$v=null,mu=null,jv=!1;function cx(i,a,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;jv||Al==null||Al!==Mf(m)||(m=Al,"selectionStart"in m&&Lv(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),mu&&pu(mu,m)||(mu=m,m=Oh($v,"onSelect"),0<m.length&&(a=new Lf("onSelect","select",null,a,u),i.push({event:a,listeners:m}),a.target=Al)))}function xa(i,a){var u={};return u[i.toLowerCase()]=a.toLowerCase(),u["Webkit"+i]="webkit"+a,u["Moz"+i]="moz"+a,u}var Il={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionrun:xa("Transition","TransitionRun"),transitionstart:xa("Transition","TransitionStart"),transitioncancel:xa("Transition","TransitionCancel"),transitionend:xa("Transition","TransitionEnd")},Uv={},ux={};ki&&(ux=document.createElement("div").style,"AnimationEvent"in window||(delete Il.animationend.animation,delete Il.animationiteration.animation,delete Il.animationstart.animation),"TransitionEvent"in window||delete Il.transitionend.transition);function Ra(i){if(Uv[i])return Uv[i];if(!Il[i])return i;var a=Il[i],u;for(u in a)if(a.hasOwnProperty(u)&&u in ux)return Uv[i]=a[u];return i}var dx=Ra("animationend"),fx=Ra("animationiteration"),hx=Ra("animationstart"),m$=Ra("transitionrun"),g$=Ra("transitionstart"),v$=Ra("transitioncancel"),px=Ra("transitionend"),mx=new Map,zv="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(" ");zv.push("scrollEnd");function Ko(i,a){mx.set(i,a),Sa(a,[i])}var Uf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Ro=[],Ml=0,Fv=0;function zf(){for(var i=Ml,a=Fv=Ml=0;a<i;){var u=Ro[a];Ro[a++]=null;var m=Ro[a];Ro[a++]=null;var _=Ro[a];Ro[a++]=null;var S=Ro[a];if(Ro[a++]=null,m!==null&&_!==null){var N=m.pending;N===null?_.next=_:(_.next=N.next,N.next=_),m.pending=_}S!==0&&gx(u,_,S)}}function Ff(i,a,u,m){Ro[Ml++]=i,Ro[Ml++]=a,Ro[Ml++]=u,Ro[Ml++]=m,Fv|=m,i.lanes|=m,i=i.alternate,i!==null&&(i.lanes|=m)}function Bv(i,a,u,m){return Ff(i,a,u,m),Bf(i)}function Oa(i,a){return Ff(i,null,null,a),Bf(i)}function gx(i,a,u){i.lanes|=u;var m=i.alternate;m!==null&&(m.lanes|=u);for(var _=!1,S=i.return;S!==null;)S.childLanes|=u,m=S.alternate,m!==null&&(m.childLanes|=u),S.tag===22&&(i=S.stateNode,i===null||i._visibility&1||(_=!0)),i=S,S=S.return;return i.tag===3?(S=i.stateNode,_&&a!==null&&(_=31-Ln(u),i=S.hiddenUpdates,m=i[_],m===null?i[_]=[a]:m.push(a),a.lane=u|536870912),S):null}function Bf(i){if(50<$u)throw $u=0,Q0=null,Error(r(185));for(var a=i.return;a!==null;)i=a,a=i.return;return i.tag===3?i.stateNode:null}var Pl={};function _$(i,a,u,m){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function to(i,a,u,m){return new _$(i,a,u,m)}function Vv(i){return i=i.prototype,!(!i||!i.isReactComponent)}function Di(i,a){var u=i.alternate;return u===null?(u=to(i.tag,a,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=a,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,a=i.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function vx(i,a){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=a,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,a=u.dependencies,i.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),i}function Vf(i,a,u,m,_,S){var N=0;if(m=i,typeof i=="function")Vv(i)&&(N=1);else if(typeof i=="string")N=Ej(i,u,D.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case L:return i=to(31,u,a,_),i.elementType=L,i.lanes=S,i;case b:return Ta(u.children,_,S,a);case x:N=8,_|=24;break;case w:return i=to(12,u,a,_|2),i.elementType=w,i.lanes=S,i;case O:return i=to(13,u,a,_),i.elementType=O,i.lanes=S,i;case A:return i=to(19,u,a,_),i.elementType=A,i.lanes=S,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:N=10;break e;case E:N=9;break e;case R:N=11;break e;case I:N=14;break e;case P:N=16,m=null;break e}N=29,u=Error(r(130,i===null?"null":typeof i,"")),m=null}return a=to(N,u,a,_),a.elementType=i,a.type=m,a.lanes=S,a}function Ta(i,a,u,m){return i=to(7,i,m,a),i.lanes=u,i}function Hv(i,a,u){return i=to(6,i,null,a),i.lanes=u,i}function _x(i){var a=to(18,null,null,0);return a.stateNode=i,a}function qv(i,a,u){return a=to(4,i.children!==null?i.children:[],i.key,a),a.lanes=u,a.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},a}var yx=new WeakMap;function Oo(i,a){if(typeof i=="object"&&i!==null){var u=yx.get(i);return u!==void 0?u:(a={value:i,source:a,stack:rt(a)},yx.set(i,a),a)}return{value:i,source:a,stack:rt(a)}}var Nl=[],kl=0,Hf=null,gu=0,To=[],Co=0,ys=null,ci=1,ui="";function Li(i,a){Nl[kl++]=gu,Nl[kl++]=Hf,Hf=i,gu=a}function bx(i,a,u){To[Co++]=ci,To[Co++]=ui,To[Co++]=ys,ys=i;var m=ci;i=ui;var _=32-Ln(m)-1;m&=~(1<<_),u+=1;var S=32-Ln(a)+_;if(30<S){var N=_-_%5;S=(m&(1<<N)-1).toString(32),m>>=N,_-=N,ci=1<<32-Ln(a)+_|u<<_|m,ui=S+i}else ci=1<<S|u<<_|m,ui=i}function Gv(i){i.return!==null&&(Li(i,1),bx(i,1,0))}function Kv(i){for(;i===Hf;)Hf=Nl[--kl],Nl[kl]=null,gu=Nl[--kl],Nl[kl]=null;for(;i===ys;)ys=To[--Co],To[Co]=null,ui=To[--Co],To[Co]=null,ci=To[--Co],To[Co]=null}function wx(i,a){To[Co++]=ci,To[Co++]=ui,To[Co++]=ys,ci=a.id,ui=a.overflow,ys=i}var lr=null,an=null,At=!1,bs=null,Ao=!1,Zv=Error(r(519));function ws(i){var a=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw vu(Oo(a,i)),Zv}function Sx(i){var a=i.stateNode,u=i.type,m=i.memoizedProps;switch(a[ar]=i,a[Ur]=m,u){case"dialog":St("cancel",a),St("close",a);break;case"iframe":case"object":case"embed":St("load",a);break;case"video":case"audio":for(u=0;u<Uu.length;u++)St(Uu[u],a);break;case"source":St("error",a);break;case"img":case"image":case"link":St("error",a),St("load",a);break;case"details":St("toggle",a);break;case"input":St("invalid",a),DE(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":St("invalid",a);break;case"textarea":St("invalid",a),$E(a,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||m.suppressHydrationWarning===!0||U2(a.textContent,u)?(m.popover!=null&&(St("beforetoggle",a),St("toggle",a)),m.onScroll!=null&&St("scroll",a),m.onScrollEnd!=null&&St("scrollend",a),m.onClick!=null&&(a.onclick=Ni),a=!0):a=!1,a||ws(i,!0)}function Ex(i){for(lr=i.return;lr;)switch(lr.tag){case 5:case 31:case 13:Ao=!1;return;case 27:case 3:Ao=!0;return;default:lr=lr.return}}function Dl(i){if(i!==lr)return!1;if(!At)return Ex(i),At=!0,!1;var a=i.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||f_(i.type,i.memoizedProps)),u=!u),u&&an&&ws(i),Ex(i),a===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));an=Z2(i)}else if(a===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));an=Z2(i)}else a===27?(a=an,Ds(i.type)?(i=v_,v_=null,an=i):an=a):an=lr?Mo(i.stateNode.nextSibling):null;return!0}function Ca(){an=lr=null,At=!1}function Yv(){var i=bs;return i!==null&&(Hr===null?Hr=i:Hr.push.apply(Hr,i),bs=null),i}function vu(i){bs===null?bs=[i]:bs.push(i)}var Wv=k(null),Aa=null,$i=null;function Ss(i,a,u){V(Wv,a._currentValue),a._currentValue=u}function ji(i){i._currentValue=Wv.current,G(Wv)}function Qv(i,a,u){for(;i!==null;){var m=i.alternate;if((i.childLanes&a)!==a?(i.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),i===u)break;i=i.return}}function Xv(i,a,u,m){var _=i.child;for(_!==null&&(_.return=i);_!==null;){var S=_.dependencies;if(S!==null){var N=_.child;S=S.firstContext;e:for(;S!==null;){var U=S;S=_;for(var J=0;J<a.length;J++)if(U.context===a[J]){S.lanes|=u,U=S.alternate,U!==null&&(U.lanes|=u),Qv(S.return,u,i),m||(N=null);break e}S=U.next}}else if(_.tag===18){if(N=_.return,N===null)throw Error(r(341));N.lanes|=u,S=N.alternate,S!==null&&(S.lanes|=u),Qv(N,u,i),N=null}else N=_.child;if(N!==null)N.return=_;else for(N=_;N!==null;){if(N===i){N=null;break}if(_=N.sibling,_!==null){_.return=N.return,N=_;break}N=N.return}_=N}}function Ll(i,a,u,m){i=null;for(var _=a,S=!1;_!==null;){if(!S){if((_.flags&524288)!==0)S=!0;else if((_.flags&262144)!==0)break}if(_.tag===10){var N=_.alternate;if(N===null)throw Error(r(387));if(N=N.memoizedProps,N!==null){var U=_.type;eo(_.pendingProps.value,N.value)||(i!==null?i.push(U):i=[U])}}else if(_===fe.current){if(N=_.alternate,N===null)throw Error(r(387));N.memoizedState.memoizedState!==_.memoizedState.memoizedState&&(i!==null?i.push(Hu):i=[Hu])}_=_.return}i!==null&&Xv(a,i,u,m),a.flags|=262144}function qf(i){for(i=i.firstContext;i!==null;){if(!eo(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Ia(i){Aa=i,$i=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function cr(i){return xx(Aa,i)}function Gf(i,a){return Aa===null&&Ia(i),xx(i,a)}function xx(i,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},$i===null){if(i===null)throw Error(r(308));$i=a,i.dependencies={lanes:0,firstContext:a},i.flags|=524288}else $i=$i.next=a;return u}var y$=typeof AbortController<"u"?AbortController:function(){var i=[],a=this.signal={aborted:!1,addEventListener:function(u,m){i.push(m)}};this.abort=function(){a.aborted=!0,i.forEach(function(u){return u()})}},b$=e.unstable_scheduleCallback,w$=e.unstable_NormalPriority,$n={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jv(){return{controller:new y$,data:new Map,refCount:0}}function _u(i){i.refCount--,i.refCount===0&&b$(w$,function(){i.controller.abort()})}var yu=null,e0=0,$l=0,jl=null;function S$(i,a){if(yu===null){var u=yu=[];e0=0,$l=r_(),jl={status:"pending",value:void 0,then:function(m){u.push(m)}}}return e0++,a.then(Rx,Rx),a}function Rx(){if(--e0===0&&yu!==null){jl!==null&&(jl.status="fulfilled");var i=yu;yu=null,$l=0,jl=null;for(var a=0;a<i.length;a++)(0,i[a])()}}function E$(i,a){var u=[],m={status:"pending",value:null,reason:null,then:function(_){u.push(_)}};return i.then(function(){m.status="fulfilled",m.value=a;for(var _=0;_<u.length;_++)(0,u[_])(a)},function(_){for(m.status="rejected",m.reason=_,_=0;_<u.length;_++)(0,u[_])(void 0)}),m}var Ox=q.S;q.S=function(i,a){c2=Z(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&S$(i,a),Ox!==null&&Ox(i,a)};var Ma=k(null);function t0(){var i=Ma.current;return i!==null?i:en.pooledCache}function Kf(i,a){a===null?V(Ma,Ma.current):V(Ma,a.pool)}function Tx(){var i=t0();return i===null?null:{parent:$n._currentValue,pool:i}}var Ul=Error(r(460)),n0=Error(r(474)),Zf=Error(r(542)),Yf={then:function(){}};function Cx(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Ax(i,a,u){switch(u=i[u],u===void 0?i.push(a):u!==a&&(a.then(Ni,Ni),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Mx(i),i;default:if(typeof a.status=="string")a.then(Ni,Ni);else{if(i=en,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=a,i.status="pending",i.then(function(m){if(a.status==="pending"){var _=a;_.status="fulfilled",_.value=m}},function(m){if(a.status==="pending"){var _=a;_.status="rejected",_.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw i=a.reason,Mx(i),i}throw Na=a,Ul}}function Pa(i){try{var a=i._init;return a(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Na=u,Ul):u}}var Na=null;function Ix(){if(Na===null)throw Error(r(459));var i=Na;return Na=null,i}function Mx(i){if(i===Ul||i===Zf)throw Error(r(483))}var zl=null,bu=0;function Wf(i){var a=bu;return bu+=1,zl===null&&(zl=[]),Ax(zl,i,a)}function wu(i,a){a=a.props.ref,i.ref=a!==void 0?a:null}function Qf(i,a){throw a.$$typeof===g?Error(r(525)):(i=Object.prototype.toString.call(a),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":i)))}function Px(i){function a(ce,ie){if(i){var ue=ce.deletions;ue===null?(ce.deletions=[ie],ce.flags|=16):ue.push(ie)}}function u(ce,ie){if(!i)return null;for(;ie!==null;)a(ce,ie),ie=ie.sibling;return null}function m(ce){for(var ie=new Map;ce!==null;)ce.key!==null?ie.set(ce.key,ce):ie.set(ce.index,ce),ce=ce.sibling;return ie}function _(ce,ie){return ce=Di(ce,ie),ce.index=0,ce.sibling=null,ce}function S(ce,ie,ue){return ce.index=ue,i?(ue=ce.alternate,ue!==null?(ue=ue.index,ue<ie?(ce.flags|=67108866,ie):ue):(ce.flags|=67108866,ie)):(ce.flags|=1048576,ie)}function N(ce){return i&&ce.alternate===null&&(ce.flags|=67108866),ce}function U(ce,ie,ue,we){return ie===null||ie.tag!==6?(ie=Hv(ue,ce.mode,we),ie.return=ce,ie):(ie=_(ie,ue),ie.return=ce,ie)}function J(ce,ie,ue,we){var Xe=ue.type;return Xe===b?ye(ce,ie,ue.props.children,we,ue.key):ie!==null&&(ie.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===P&&Pa(Xe)===ie.type)?(ie=_(ie,ue.props),wu(ie,ue),ie.return=ce,ie):(ie=Vf(ue.type,ue.key,ue.props,null,ce.mode,we),wu(ie,ue),ie.return=ce,ie)}function de(ce,ie,ue,we){return ie===null||ie.tag!==4||ie.stateNode.containerInfo!==ue.containerInfo||ie.stateNode.implementation!==ue.implementation?(ie=qv(ue,ce.mode,we),ie.return=ce,ie):(ie=_(ie,ue.children||[]),ie.return=ce,ie)}function ye(ce,ie,ue,we,Xe){return ie===null||ie.tag!==7?(ie=Ta(ue,ce.mode,we,Xe),ie.return=ce,ie):(ie=_(ie,ue),ie.return=ce,ie)}function Ee(ce,ie,ue){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return ie=Hv(""+ie,ce.mode,ue),ie.return=ce,ie;if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ue=Vf(ie.type,ie.key,ie.props,null,ce.mode,ue),wu(ue,ie),ue.return=ce,ue;case y:return ie=qv(ie,ce.mode,ue),ie.return=ce,ie;case P:return ie=Pa(ie),Ee(ce,ie,ue)}if(oe(ie)||B(ie))return ie=Ta(ie,ce.mode,ue,null),ie.return=ce,ie;if(typeof ie.then=="function")return Ee(ce,Wf(ie),ue);if(ie.$$typeof===T)return Ee(ce,Gf(ce,ie),ue);Qf(ce,ie)}return null}function he(ce,ie,ue,we){var Xe=ie!==null?ie.key:null;if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Xe!==null?null:U(ce,ie,""+ue,we);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:return ue.key===Xe?J(ce,ie,ue,we):null;case y:return ue.key===Xe?de(ce,ie,ue,we):null;case P:return ue=Pa(ue),he(ce,ie,ue,we)}if(oe(ue)||B(ue))return Xe!==null?null:ye(ce,ie,ue,we,null);if(typeof ue.then=="function")return he(ce,ie,Wf(ue),we);if(ue.$$typeof===T)return he(ce,ie,Gf(ce,ue),we);Qf(ce,ue)}return null}function ge(ce,ie,ue,we,Xe){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return ce=ce.get(ue)||null,U(ie,ce,""+we,Xe);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case v:return ce=ce.get(we.key===null?ue:we.key)||null,J(ie,ce,we,Xe);case y:return ce=ce.get(we.key===null?ue:we.key)||null,de(ie,ce,we,Xe);case P:return we=Pa(we),ge(ce,ie,ue,we,Xe)}if(oe(we)||B(we))return ce=ce.get(ue)||null,ye(ie,ce,we,Xe,null);if(typeof we.then=="function")return ge(ce,ie,ue,Wf(we),Xe);if(we.$$typeof===T)return ge(ce,ie,ue,Gf(ie,we),Xe);Qf(ie,we)}return null}function Ve(ce,ie,ue,we){for(var Xe=null,$t=null,Ze=ie,ct=ie=0,Ot=null;Ze!==null&&ct<ue.length;ct++){Ze.index>ct?(Ot=Ze,Ze=null):Ot=Ze.sibling;var jt=he(ce,Ze,ue[ct],we);if(jt===null){Ze===null&&(Ze=Ot);break}i&&Ze&&jt.alternate===null&&a(ce,Ze),ie=S(jt,ie,ct),$t===null?Xe=jt:$t.sibling=jt,$t=jt,Ze=Ot}if(ct===ue.length)return u(ce,Ze),At&&Li(ce,ct),Xe;if(Ze===null){for(;ct<ue.length;ct++)Ze=Ee(ce,ue[ct],we),Ze!==null&&(ie=S(Ze,ie,ct),$t===null?Xe=Ze:$t.sibling=Ze,$t=Ze);return At&&Li(ce,ct),Xe}for(Ze=m(Ze);ct<ue.length;ct++)Ot=ge(Ze,ce,ct,ue[ct],we),Ot!==null&&(i&&Ot.alternate!==null&&Ze.delete(Ot.key===null?ct:Ot.key),ie=S(Ot,ie,ct),$t===null?Xe=Ot:$t.sibling=Ot,$t=Ot);return i&&Ze.forEach(function(zs){return a(ce,zs)}),At&&Li(ce,ct),Xe}function nt(ce,ie,ue,we){if(ue==null)throw Error(r(151));for(var Xe=null,$t=null,Ze=ie,ct=ie=0,Ot=null,jt=ue.next();Ze!==null&&!jt.done;ct++,jt=ue.next()){Ze.index>ct?(Ot=Ze,Ze=null):Ot=Ze.sibling;var zs=he(ce,Ze,jt.value,we);if(zs===null){Ze===null&&(Ze=Ot);break}i&&Ze&&zs.alternate===null&&a(ce,Ze),ie=S(zs,ie,ct),$t===null?Xe=zs:$t.sibling=zs,$t=zs,Ze=Ot}if(jt.done)return u(ce,Ze),At&&Li(ce,ct),Xe;if(Ze===null){for(;!jt.done;ct++,jt=ue.next())jt=Ee(ce,jt.value,we),jt!==null&&(ie=S(jt,ie,ct),$t===null?Xe=jt:$t.sibling=jt,$t=jt);return At&&Li(ce,ct),Xe}for(Ze=m(Ze);!jt.done;ct++,jt=ue.next())jt=ge(Ze,ce,ct,jt.value,we),jt!==null&&(i&&jt.alternate!==null&&Ze.delete(jt.key===null?ct:jt.key),ie=S(jt,ie,ct),$t===null?Xe=jt:$t.sibling=jt,$t=jt);return i&&Ze.forEach(function(kj){return a(ce,kj)}),At&&Li(ce,ct),Xe}function Wt(ce,ie,ue,we){if(typeof ue=="object"&&ue!==null&&ue.type===b&&ue.key===null&&(ue=ue.props.children),typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case v:e:{for(var Xe=ue.key;ie!==null;){if(ie.key===Xe){if(Xe=ue.type,Xe===b){if(ie.tag===7){u(ce,ie.sibling),we=_(ie,ue.props.children),we.return=ce,ce=we;break e}}else if(ie.elementType===Xe||typeof Xe=="object"&&Xe!==null&&Xe.$$typeof===P&&Pa(Xe)===ie.type){u(ce,ie.sibling),we=_(ie,ue.props),wu(we,ue),we.return=ce,ce=we;break e}u(ce,ie);break}else a(ce,ie);ie=ie.sibling}ue.type===b?(we=Ta(ue.props.children,ce.mode,we,ue.key),we.return=ce,ce=we):(we=Vf(ue.type,ue.key,ue.props,null,ce.mode,we),wu(we,ue),we.return=ce,ce=we)}return N(ce);case y:e:{for(Xe=ue.key;ie!==null;){if(ie.key===Xe)if(ie.tag===4&&ie.stateNode.containerInfo===ue.containerInfo&&ie.stateNode.implementation===ue.implementation){u(ce,ie.sibling),we=_(ie,ue.children||[]),we.return=ce,ce=we;break e}else{u(ce,ie);break}else a(ce,ie);ie=ie.sibling}we=qv(ue,ce.mode,we),we.return=ce,ce=we}return N(ce);case P:return ue=Pa(ue),Wt(ce,ie,ue,we)}if(oe(ue))return Ve(ce,ie,ue,we);if(B(ue)){if(Xe=B(ue),typeof Xe!="function")throw Error(r(150));return ue=Xe.call(ue),nt(ce,ie,ue,we)}if(typeof ue.then=="function")return Wt(ce,ie,Wf(ue),we);if(ue.$$typeof===T)return Wt(ce,ie,Gf(ce,ue),we);Qf(ce,ue)}return typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint"?(ue=""+ue,ie!==null&&ie.tag===6?(u(ce,ie.sibling),we=_(ie,ue),we.return=ce,ce=we):(u(ce,ie),we=Hv(ue,ce.mode,we),we.return=ce,ce=we),N(ce)):u(ce,ie)}return function(ce,ie,ue,we){try{bu=0;var Xe=Wt(ce,ie,ue,we);return zl=null,Xe}catch(Ze){if(Ze===Ul||Ze===Zf)throw Ze;var $t=to(29,Ze,null,ce.mode);return $t.lanes=we,$t.return=ce,$t}}}var ka=Px(!0),Nx=Px(!1),Es=!1;function r0(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function o0(i,a){i=i.updateQueue,a.updateQueue===i&&(a.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function xs(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Rs(i,a,u){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(zt&2)!==0){var _=m.pending;return _===null?a.next=a:(a.next=_.next,_.next=a),m.pending=a,a=Bf(i),gx(i,null,u),a}return Ff(i,m,a,u),Bf(i)}function Su(i,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var m=a.lanes;m&=i.pendingLanes,u|=m,a.lanes=u,sr(i,u)}}function i0(i,a){var u=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var _=null,S=null;if(u=u.firstBaseUpdate,u!==null){do{var N={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};S===null?_=S=N:S=S.next=N,u=u.next}while(u!==null);S===null?_=S=a:S=S.next=a}else _=S=a;u={baseState:m.baseState,firstBaseUpdate:_,lastBaseUpdate:S,shared:m.shared,callbacks:m.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=a:i.next=a,u.lastBaseUpdate=a}var s0=!1;function Eu(){if(s0){var i=jl;if(i!==null)throw i}}function xu(i,a,u,m){s0=!1;var _=i.updateQueue;Es=!1;var S=_.firstBaseUpdate,N=_.lastBaseUpdate,U=_.shared.pending;if(U!==null){_.shared.pending=null;var J=U,de=J.next;J.next=null,N===null?S=de:N.next=de,N=J;var ye=i.alternate;ye!==null&&(ye=ye.updateQueue,U=ye.lastBaseUpdate,U!==N&&(U===null?ye.firstBaseUpdate=de:U.next=de,ye.lastBaseUpdate=J))}if(S!==null){var Ee=_.baseState;N=0,ye=de=J=null,U=S;do{var he=U.lane&-536870913,ge=he!==U.lane;if(ge?(Rt&he)===he:(m&he)===he){he!==0&&he===$l&&(s0=!0),ye!==null&&(ye=ye.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Ve=i,nt=U;he=a;var Wt=u;switch(nt.tag){case 1:if(Ve=nt.payload,typeof Ve=="function"){Ee=Ve.call(Wt,Ee,he);break e}Ee=Ve;break e;case 3:Ve.flags=Ve.flags&-65537|128;case 0:if(Ve=nt.payload,he=typeof Ve=="function"?Ve.call(Wt,Ee,he):Ve,he==null)break e;Ee=h({},Ee,he);break e;case 2:Es=!0}}he=U.callback,he!==null&&(i.flags|=64,ge&&(i.flags|=8192),ge=_.callbacks,ge===null?_.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:U.tag,payload:U.payload,callback:U.callback,next:null},ye===null?(de=ye=ge,J=Ee):ye=ye.next=ge,N|=he;if(U=U.next,U===null){if(U=_.shared.pending,U===null)break;ge=U,U=ge.next,ge.next=null,_.lastBaseUpdate=ge,_.shared.pending=null}}while(!0);ye===null&&(J=Ee),_.baseState=J,_.firstBaseUpdate=de,_.lastBaseUpdate=ye,S===null&&(_.shared.lanes=0),Is|=N,i.lanes=N,i.memoizedState=Ee}}function kx(i,a){if(typeof i!="function")throw Error(r(191,i));i.call(a)}function Dx(i,a){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)kx(u[i],a)}var Fl=k(null),Xf=k(0);function Lx(i,a){i=Ki,V(Xf,i),V(Fl,a),Ki=i|a.baseLanes}function a0(){V(Xf,Ki),V(Fl,Fl.current)}function l0(){Ki=Xf.current,G(Fl),G(Xf)}var no=k(null),Io=null;function Os(i){var a=i.alternate;V(Tn,Tn.current&1),V(no,i),Io===null&&(a===null||Fl.current!==null||a.memoizedState!==null)&&(Io=i)}function c0(i){V(Tn,Tn.current),V(no,i),Io===null&&(Io=i)}function $x(i){i.tag===22?(V(Tn,Tn.current),V(no,i),Io===null&&(Io=i)):Ts()}function Ts(){V(Tn,Tn.current),V(no,no.current)}function ro(i){G(no),Io===i&&(Io=null),G(Tn)}var Tn=k(0);function Jf(i){for(var a=i;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||m_(u)||g_(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Ui=0,at=null,Zt=null,jn=null,eh=!1,Bl=!1,Da=!1,th=0,Ru=0,Vl=null,x$=0;function xn(){throw Error(r(321))}function u0(i,a){if(a===null)return!1;for(var u=0;u<a.length&&u<i.length;u++)if(!eo(i[u],a[u]))return!1;return!0}function d0(i,a,u,m,_,S){return Ui=S,at=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,q.H=i===null||i.memoizedState===null?bR:O0,Da=!1,S=u(m,_),Da=!1,Bl&&(S=Ux(a,u,m,_)),jx(i),S}function jx(i){q.H=Cu;var a=Zt!==null&&Zt.next!==null;if(Ui=0,jn=Zt=at=null,eh=!1,Ru=0,Vl=null,a)throw Error(r(300));i===null||Un||(i=i.dependencies,i!==null&&qf(i)&&(Un=!0))}function Ux(i,a,u,m){at=i;var _=0;do{if(Bl&&(Vl=null),Ru=0,Bl=!1,25<=_)throw Error(r(301));if(_+=1,jn=Zt=null,i.updateQueue!=null){var S=i.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}q.H=wR,S=a(u,m)}while(Bl);return S}function R$(){var i=q.H,a=i.useState()[0];return a=typeof a.then=="function"?Ou(a):a,i=i.useState()[0],(Zt!==null?Zt.memoizedState:null)!==i&&(at.flags|=1024),a}function f0(){var i=th!==0;return th=0,i}function h0(i,a,u){a.updateQueue=i.updateQueue,a.flags&=-2053,i.lanes&=~u}function p0(i){if(eh){for(i=i.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}eh=!1}Ui=0,jn=Zt=at=null,Bl=!1,Ru=th=0,Vl=null}function Mr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jn===null?at.memoizedState=jn=i:jn=jn.next=i,jn}function Cn(){if(Zt===null){var i=at.alternate;i=i!==null?i.memoizedState:null}else i=Zt.next;var a=jn===null?at.memoizedState:jn.next;if(a!==null)jn=a,Zt=i;else{if(i===null)throw at.alternate===null?Error(r(467)):Error(r(310));Zt=i,i={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},jn===null?at.memoizedState=jn=i:jn=jn.next=i}return jn}function nh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ou(i){var a=Ru;return Ru+=1,Vl===null&&(Vl=[]),i=Ax(Vl,i,a),a=at,(jn===null?a.memoizedState:jn.next)===null&&(a=a.alternate,q.H=a===null||a.memoizedState===null?bR:O0),i}function rh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Ou(i);if(i.$$typeof===T)return cr(i)}throw Error(r(438,String(i)))}function m0(i){var a=null,u=at.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var m=at.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(_){return _.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=nh(),at.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(i),m=0;m<i;m++)u[m]=H;return a.index++,u}function zi(i,a){return typeof a=="function"?a(i):a}function oh(i){var a=Cn();return g0(a,Zt,i)}function g0(i,a,u){var m=i.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var _=i.baseQueue,S=m.pending;if(S!==null){if(_!==null){var N=_.next;_.next=S.next,S.next=N}a.baseQueue=_=S,m.pending=null}if(S=i.baseState,_===null)i.memoizedState=S;else{a=_.next;var U=N=null,J=null,de=a,ye=!1;do{var Ee=de.lane&-536870913;if(Ee!==de.lane?(Rt&Ee)===Ee:(Ui&Ee)===Ee){var he=de.revertLane;if(he===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ee===$l&&(ye=!0);else if((Ui&he)===he){de=de.next,he===$l&&(ye=!0);continue}else Ee={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(U=J=Ee,N=S):J=J.next=Ee,at.lanes|=he,Is|=he;Ee=de.action,Da&&u(S,Ee),S=de.hasEagerState?de.eagerState:u(S,Ee)}else he={lane:Ee,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},J===null?(U=J=he,N=S):J=J.next=he,at.lanes|=Ee,Is|=Ee;de=de.next}while(de!==null&&de!==a);if(J===null?N=S:J.next=U,!eo(S,i.memoizedState)&&(Un=!0,ye&&(u=jl,u!==null)))throw u;i.memoizedState=S,i.baseState=N,i.baseQueue=J,m.lastRenderedState=S}return _===null&&(m.lanes=0),[i.memoizedState,m.dispatch]}function v0(i){var a=Cn(),u=a.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var m=u.dispatch,_=u.pending,S=a.memoizedState;if(_!==null){u.pending=null;var N=_=_.next;do S=i(S,N.action),N=N.next;while(N!==_);eo(S,a.memoizedState)||(Un=!0),a.memoizedState=S,a.baseQueue===null&&(a.baseState=S),u.lastRenderedState=S}return[S,m]}function zx(i,a,u){var m=at,_=Cn(),S=At;if(S){if(u===void 0)throw Error(r(407));u=u()}else u=a();var N=!eo((Zt||_).memoizedState,u);if(N&&(_.memoizedState=u,Un=!0),_=_.queue,b0(Vx.bind(null,m,_,i),[i]),_.getSnapshot!==a||N||jn!==null&&jn.memoizedState.tag&1){if(m.flags|=2048,Hl(9,{destroy:void 0},Bx.bind(null,m,_,u,a),null),en===null)throw Error(r(349));S||(Ui&127)!==0||Fx(m,a,u)}return u}function Fx(i,a,u){i.flags|=16384,i={getSnapshot:a,value:u},a=at.updateQueue,a===null?(a=nh(),at.updateQueue=a,a.stores=[i]):(u=a.stores,u===null?a.stores=[i]:u.push(i))}function Bx(i,a,u,m){a.value=u,a.getSnapshot=m,Hx(a)&&qx(i)}function Vx(i,a,u){return u(function(){Hx(a)&&qx(i)})}function Hx(i){var a=i.getSnapshot;i=i.value;try{var u=a();return!eo(i,u)}catch{return!0}}function qx(i){var a=Oa(i,2);a!==null&&qr(a,i,2)}function _0(i){var a=Mr();if(typeof i=="function"){var u=i;if(i=u(),Da){bt(!0);try{u()}finally{bt(!1)}}}return a.memoizedState=a.baseState=i,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:i},a}function Gx(i,a,u,m){return i.baseState=u,g0(i,Zt,typeof m=="function"?m:zi)}function O$(i,a,u,m,_){if(ah(i))throw Error(r(485));if(i=a.action,i!==null){var S={payload:_,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){S.listeners.push(N)}};q.T!==null?u(!0):S.isTransition=!1,m(S),u=a.pending,u===null?(S.next=a.pending=S,Kx(a,S)):(S.next=u.next,a.pending=u.next=S)}}function Kx(i,a){var u=a.action,m=a.payload,_=i.state;if(a.isTransition){var S=q.T,N={};q.T=N;try{var U=u(_,m),J=q.S;J!==null&&J(N,U),Zx(i,a,U)}catch(de){y0(i,a,de)}finally{S!==null&&N.types!==null&&(S.types=N.types),q.T=S}}else try{S=u(_,m),Zx(i,a,S)}catch(de){y0(i,a,de)}}function Zx(i,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){Yx(i,a,m)},function(m){return y0(i,a,m)}):Yx(i,a,u)}function Yx(i,a,u){a.status="fulfilled",a.value=u,Wx(a),i.state=u,a=i.pending,a!==null&&(u=a.next,u===a?i.pending=null:(u=u.next,a.next=u,Kx(i,u)))}function y0(i,a,u){var m=i.pending;if(i.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=u,Wx(a),a=a.next;while(a!==m)}i.action=null}function Wx(i){i=i.listeners;for(var a=0;a<i.length;a++)(0,i[a])()}function Qx(i,a){return a}function Xx(i,a){if(At){var u=en.formState;if(u!==null){e:{var m=at;if(At){if(an){t:{for(var _=an,S=Ao;_.nodeType!==8;){if(!S){_=null;break t}if(_=Mo(_.nextSibling),_===null){_=null;break t}}S=_.data,_=S==="F!"||S==="F"?_:null}if(_){an=Mo(_.nextSibling),m=_.data==="F!";break e}}ws(m)}m=!1}m&&(a=u[0])}}return u=Mr(),u.memoizedState=u.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qx,lastRenderedState:a},u.queue=m,u=vR.bind(null,at,m),m.dispatch=u,m=_0(!1),S=R0.bind(null,at,!1,m.queue),m=Mr(),_={state:a,dispatch:null,action:i,pending:null},m.queue=_,u=O$.bind(null,at,_,S,u),_.dispatch=u,m.memoizedState=i,[a,u,!1]}function Jx(i){var a=Cn();return eR(a,Zt,i)}function eR(i,a,u){if(a=g0(i,a,Qx)[0],i=oh(zi)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Ou(a)}catch(N){throw N===Ul?Zf:N}else m=a;a=Cn();var _=a.queue,S=_.dispatch;return u!==a.memoizedState&&(at.flags|=2048,Hl(9,{destroy:void 0},T$.bind(null,_,u),null)),[m,S,i]}function T$(i,a){i.action=a}function tR(i){var a=Cn(),u=Zt;if(u!==null)return eR(a,u,i);Cn(),a=a.memoizedState,u=Cn();var m=u.queue.dispatch;return u.memoizedState=i,[a,m,!1]}function Hl(i,a,u,m){return i={tag:i,create:u,deps:m,inst:a,next:null},a=at.updateQueue,a===null&&(a=nh(),at.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=i.next=i:(m=u.next,u.next=i,i.next=m,a.lastEffect=i),i}function nR(){return Cn().memoizedState}function ih(i,a,u,m){var _=Mr();at.flags|=i,_.memoizedState=Hl(1|a,{destroy:void 0},u,m===void 0?null:m)}function sh(i,a,u,m){var _=Cn();m=m===void 0?null:m;var S=_.memoizedState.inst;Zt!==null&&m!==null&&u0(m,Zt.memoizedState.deps)?_.memoizedState=Hl(a,S,u,m):(at.flags|=i,_.memoizedState=Hl(1|a,S,u,m))}function rR(i,a){ih(8390656,8,i,a)}function b0(i,a){sh(2048,8,i,a)}function C$(i){at.flags|=4;var a=at.updateQueue;if(a===null)a=nh(),at.updateQueue=a,a.events=[i];else{var u=a.events;u===null?a.events=[i]:u.push(i)}}function oR(i){var a=Cn().memoizedState;return C$({ref:a,nextImpl:i}),function(){if((zt&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}function iR(i,a){return sh(4,2,i,a)}function sR(i,a){return sh(4,4,i,a)}function aR(i,a){if(typeof a=="function"){i=i();var u=a(i);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return i=i(),a.current=i,function(){a.current=null}}function lR(i,a,u){u=u!=null?u.concat([i]):null,sh(4,4,aR.bind(null,a,i),u)}function w0(){}function cR(i,a){var u=Cn();a=a===void 0?null:a;var m=u.memoizedState;return a!==null&&u0(a,m[1])?m[0]:(u.memoizedState=[i,a],i)}function uR(i,a){var u=Cn();a=a===void 0?null:a;var m=u.memoizedState;if(a!==null&&u0(a,m[1]))return m[0];if(m=i(),Da){bt(!0);try{i()}finally{bt(!1)}}return u.memoizedState=[m,a],m}function S0(i,a,u){return u===void 0||(Ui&1073741824)!==0&&(Rt&261930)===0?i.memoizedState=a:(i.memoizedState=u,i=d2(),at.lanes|=i,Is|=i,u)}function dR(i,a,u,m){return eo(u,a)?u:Fl.current!==null?(i=S0(i,u,m),eo(i,a)||(Un=!0),i):(Ui&42)===0||(Ui&1073741824)!==0&&(Rt&261930)===0?(Un=!0,i.memoizedState=u):(i=d2(),at.lanes|=i,Is|=i,a)}function fR(i,a,u,m,_){var S=W.p;W.p=S!==0&&8>S?S:8;var N=q.T,U={};q.T=U,R0(i,!1,a,u);try{var J=_(),de=q.S;if(de!==null&&de(U,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var ye=E$(J,m);Tu(i,a,ye,so(i))}else Tu(i,a,m,so(i))}catch(Ee){Tu(i,a,{then:function(){},status:"rejected",reason:Ee},so())}finally{W.p=S,N!==null&&U.types!==null&&(N.types=U.types),q.T=N}}function A$(){}function E0(i,a,u,m){if(i.tag!==5)throw Error(r(476));var _=hR(i).queue;fR(i,_,a,te,u===null?A$:function(){return pR(i),u(m)})}function hR(i){var a=i.memoizedState;if(a!==null)return a;a={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:te},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:u},next:null},i.memoizedState=a,i=i.alternate,i!==null&&(i.memoizedState=a),a}function pR(i){var a=hR(i);a.next===null&&(a=i.alternate.memoizedState),Tu(i,a.next.queue,{},so())}function x0(){return cr(Hu)}function mR(){return Cn().memoizedState}function gR(){return Cn().memoizedState}function I$(i){for(var a=i.return;a!==null;){switch(a.tag){case 24:case 3:var u=so();i=xs(u);var m=Rs(a,i,u);m!==null&&(qr(m,a,u),Su(m,a,u)),a={cache:Jv()},i.payload=a;return}a=a.return}}function M$(i,a,u){var m=so();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ah(i)?_R(a,u):(u=Bv(i,a,u,m),u!==null&&(qr(u,i,m),yR(u,a,m)))}function vR(i,a,u){var m=so();Tu(i,a,u,m)}function Tu(i,a,u,m){var _={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ah(i))_R(a,_);else{var S=i.alternate;if(i.lanes===0&&(S===null||S.lanes===0)&&(S=a.lastRenderedReducer,S!==null))try{var N=a.lastRenderedState,U=S(N,u);if(_.hasEagerState=!0,_.eagerState=U,eo(U,N))return Ff(i,a,_,0),en===null&&zf(),!1}catch{}if(u=Bv(i,a,_,m),u!==null)return qr(u,i,m),yR(u,a,m),!0}return!1}function R0(i,a,u,m){if(m={lane:2,revertLane:r_(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},ah(i)){if(a)throw Error(r(479))}else a=Bv(i,u,m,2),a!==null&&qr(a,i,2)}function ah(i){var a=i.alternate;return i===at||a!==null&&a===at}function _R(i,a){Bl=eh=!0;var u=i.pending;u===null?a.next=a:(a.next=u.next,u.next=a),i.pending=a}function yR(i,a,u){if((u&4194048)!==0){var m=a.lanes;m&=i.pendingLanes,u|=m,a.lanes=u,sr(i,u)}}var Cu={readContext:cr,use:rh,useCallback:xn,useContext:xn,useEffect:xn,useImperativeHandle:xn,useLayoutEffect:xn,useInsertionEffect:xn,useMemo:xn,useReducer:xn,useRef:xn,useState:xn,useDebugValue:xn,useDeferredValue:xn,useTransition:xn,useSyncExternalStore:xn,useId:xn,useHostTransitionStatus:xn,useFormState:xn,useActionState:xn,useOptimistic:xn,useMemoCache:xn,useCacheRefresh:xn};Cu.useEffectEvent=xn;var bR={readContext:cr,use:rh,useCallback:function(i,a){return Mr().memoizedState=[i,a===void 0?null:a],i},useContext:cr,useEffect:rR,useImperativeHandle:function(i,a,u){u=u!=null?u.concat([i]):null,ih(4194308,4,aR.bind(null,a,i),u)},useLayoutEffect:function(i,a){return ih(4194308,4,i,a)},useInsertionEffect:function(i,a){ih(4,2,i,a)},useMemo:function(i,a){var u=Mr();a=a===void 0?null:a;var m=i();if(Da){bt(!0);try{i()}finally{bt(!1)}}return u.memoizedState=[m,a],m},useReducer:function(i,a,u){var m=Mr();if(u!==void 0){var _=u(a);if(Da){bt(!0);try{u(a)}finally{bt(!1)}}}else _=a;return m.memoizedState=m.baseState=_,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:_},m.queue=i,i=i.dispatch=M$.bind(null,at,i),[m.memoizedState,i]},useRef:function(i){var a=Mr();return i={current:i},a.memoizedState=i},useState:function(i){i=_0(i);var a=i.queue,u=vR.bind(null,at,a);return a.dispatch=u,[i.memoizedState,u]},useDebugValue:w0,useDeferredValue:function(i,a){var u=Mr();return S0(u,i,a)},useTransition:function(){var i=_0(!1);return i=fR.bind(null,at,i.queue,!0,!1),Mr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,a,u){var m=at,_=Mr();if(At){if(u===void 0)throw Error(r(407));u=u()}else{if(u=a(),en===null)throw Error(r(349));(Rt&127)!==0||Fx(m,a,u)}_.memoizedState=u;var S={value:u,getSnapshot:a};return _.queue=S,rR(Vx.bind(null,m,S,i),[i]),m.flags|=2048,Hl(9,{destroy:void 0},Bx.bind(null,m,S,u,a),null),u},useId:function(){var i=Mr(),a=en.identifierPrefix;if(At){var u=ui,m=ci;u=(m&~(1<<32-Ln(m)-1)).toString(32)+u,a="_"+a+"R_"+u,u=th++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=x$++,a="_"+a+"r_"+u.toString(32)+"_";return i.memoizedState=a},useHostTransitionStatus:x0,useFormState:Xx,useActionState:Xx,useOptimistic:function(i){var a=Mr();a.memoizedState=a.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=R0.bind(null,at,!0,u),u.dispatch=a,[i,a]},useMemoCache:m0,useCacheRefresh:function(){return Mr().memoizedState=I$.bind(null,at)},useEffectEvent:function(i){var a=Mr(),u={impl:i};return a.memoizedState=u,function(){if((zt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},O0={readContext:cr,use:rh,useCallback:cR,useContext:cr,useEffect:b0,useImperativeHandle:lR,useInsertionEffect:iR,useLayoutEffect:sR,useMemo:uR,useReducer:oh,useRef:nR,useState:function(){return oh(zi)},useDebugValue:w0,useDeferredValue:function(i,a){var u=Cn();return dR(u,Zt.memoizedState,i,a)},useTransition:function(){var i=oh(zi)[0],a=Cn().memoizedState;return[typeof i=="boolean"?i:Ou(i),a]},useSyncExternalStore:zx,useId:mR,useHostTransitionStatus:x0,useFormState:Jx,useActionState:Jx,useOptimistic:function(i,a){var u=Cn();return Gx(u,Zt,i,a)},useMemoCache:m0,useCacheRefresh:gR};O0.useEffectEvent=oR;var wR={readContext:cr,use:rh,useCallback:cR,useContext:cr,useEffect:b0,useImperativeHandle:lR,useInsertionEffect:iR,useLayoutEffect:sR,useMemo:uR,useReducer:v0,useRef:nR,useState:function(){return v0(zi)},useDebugValue:w0,useDeferredValue:function(i,a){var u=Cn();return Zt===null?S0(u,i,a):dR(u,Zt.memoizedState,i,a)},useTransition:function(){var i=v0(zi)[0],a=Cn().memoizedState;return[typeof i=="boolean"?i:Ou(i),a]},useSyncExternalStore:zx,useId:mR,useHostTransitionStatus:x0,useFormState:tR,useActionState:tR,useOptimistic:function(i,a){var u=Cn();return Zt!==null?Gx(u,Zt,i,a):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:m0,useCacheRefresh:gR};wR.useEffectEvent=oR;function T0(i,a,u,m){a=i.memoizedState,u=u(m,a),u=u==null?a:h({},a,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var C0={enqueueSetState:function(i,a,u){i=i._reactInternals;var m=so(),_=xs(m);_.payload=a,u!=null&&(_.callback=u),a=Rs(i,_,m),a!==null&&(qr(a,i,m),Su(a,i,m))},enqueueReplaceState:function(i,a,u){i=i._reactInternals;var m=so(),_=xs(m);_.tag=1,_.payload=a,u!=null&&(_.callback=u),a=Rs(i,_,m),a!==null&&(qr(a,i,m),Su(a,i,m))},enqueueForceUpdate:function(i,a){i=i._reactInternals;var u=so(),m=xs(u);m.tag=2,a!=null&&(m.callback=a),a=Rs(i,m,u),a!==null&&(qr(a,i,u),Su(a,i,u))}};function SR(i,a,u,m,_,S,N){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,S,N):a.prototype&&a.prototype.isPureReactComponent?!pu(u,m)||!pu(_,S):!0}function ER(i,a,u,m){i=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,m),a.state!==i&&C0.enqueueReplaceState(a,a.state,null)}function La(i,a){var u=a;if("ref"in a){u={};for(var m in a)m!=="ref"&&(u[m]=a[m])}if(i=i.defaultProps){u===a&&(u=h({},u));for(var _ in i)u[_]===void 0&&(u[_]=i[_])}return u}function xR(i){Uf(i)}function RR(i){console.error(i)}function OR(i){Uf(i)}function lh(i,a){try{var u=i.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function TR(i,a,u){try{var m=i.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(_){setTimeout(function(){throw _})}}function A0(i,a,u){return u=xs(u),u.tag=3,u.payload={element:null},u.callback=function(){lh(i,a)},u}function CR(i){return i=xs(i),i.tag=3,i}function AR(i,a,u,m){var _=u.type.getDerivedStateFromError;if(typeof _=="function"){var S=m.value;i.payload=function(){return _(S)},i.callback=function(){TR(a,u,m)}}var N=u.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(i.callback=function(){TR(a,u,m),typeof _!="function"&&(Ms===null?Ms=new Set([this]):Ms.add(this));var U=m.stack;this.componentDidCatch(m.value,{componentStack:U!==null?U:""})})}function P$(i,a,u,m,_){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=u.alternate,a!==null&&Ll(a,u,_,!0),u=no.current,u!==null){switch(u.tag){case 31:case 13:return Io===null?bh():u.alternate===null&&Rn===0&&(Rn=3),u.flags&=-257,u.flags|=65536,u.lanes=_,m===Yf?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([m]):a.add(m),e_(i,m,_)),!1;case 22:return u.flags|=65536,m===Yf?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([m]):u.add(m)),e_(i,m,_)),!1}throw Error(r(435,u.tag))}return e_(i,m,_),bh(),!1}if(At)return a=no.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=_,m!==Zv&&(i=Error(r(422),{cause:m}),vu(Oo(i,u)))):(m!==Zv&&(a=Error(r(423),{cause:m}),vu(Oo(a,u))),i=i.current.alternate,i.flags|=65536,_&=-_,i.lanes|=_,m=Oo(m,u),_=A0(i.stateNode,m,_),i0(i,_),Rn!==4&&(Rn=2)),!1;var S=Error(r(520),{cause:m});if(S=Oo(S,u),Lu===null?Lu=[S]:Lu.push(S),Rn!==4&&(Rn=2),a===null)return!0;m=Oo(m,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,i=_&-_,u.lanes|=i,i=A0(u.stateNode,m,i),i0(u,i),!1;case 1:if(a=u.type,S=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Ms===null||!Ms.has(S))))return u.flags|=65536,_&=-_,u.lanes|=_,_=CR(_),AR(_,i,u,m),i0(u,_),!1}u=u.return}while(u!==null);return!1}var I0=Error(r(461)),Un=!1;function ur(i,a,u,m){a.child=i===null?Nx(a,null,u,m):ka(a,i.child,u,m)}function IR(i,a,u,m,_){u=u.render;var S=a.ref;if("ref"in m){var N={};for(var U in m)U!=="ref"&&(N[U]=m[U])}else N=m;return Ia(a),m=d0(i,a,u,N,S,_),U=f0(),i!==null&&!Un?(h0(i,a,_),Fi(i,a,_)):(At&&U&&Gv(a),a.flags|=1,ur(i,a,m,_),a.child)}function MR(i,a,u,m,_){if(i===null){var S=u.type;return typeof S=="function"&&!Vv(S)&&S.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=S,PR(i,a,S,m,_)):(i=Vf(u.type,null,m,a,a.mode,_),i.ref=a.ref,i.return=a,a.child=i)}if(S=i.child,!j0(i,_)){var N=S.memoizedProps;if(u=u.compare,u=u!==null?u:pu,u(N,m)&&i.ref===a.ref)return Fi(i,a,_)}return a.flags|=1,i=Di(S,m),i.ref=a.ref,i.return=a,a.child=i}function PR(i,a,u,m,_){if(i!==null){var S=i.memoizedProps;if(pu(S,m)&&i.ref===a.ref)if(Un=!1,a.pendingProps=m=S,j0(i,_))(i.flags&131072)!==0&&(Un=!0);else return a.lanes=i.lanes,Fi(i,a,_)}return M0(i,a,u,m,_)}function NR(i,a,u,m){var _=m.children,S=i!==null?i.memoizedState:null;if(i===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(S=S!==null?S.baseLanes|u:u,i!==null){for(m=a.child=i.child,_=0;m!==null;)_=_|m.lanes|m.childLanes,m=m.sibling;m=_&~S}else m=0,a.child=null;return kR(i,a,S,u,m)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},i!==null&&Kf(a,S!==null?S.cachePool:null),S!==null?Lx(a,S):a0(),$x(a);else return m=a.lanes=536870912,kR(i,a,S!==null?S.baseLanes|u:u,u,m)}else S!==null?(Kf(a,S.cachePool),Lx(a,S),Ts(),a.memoizedState=null):(i!==null&&Kf(a,null),a0(),Ts());return ur(i,a,_,u),a.child}function Au(i,a){return i!==null&&i.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function kR(i,a,u,m,_){var S=t0();return S=S===null?null:{parent:$n._currentValue,pool:S},a.memoizedState={baseLanes:u,cachePool:S},i!==null&&Kf(a,null),a0(),$x(a),i!==null&&Ll(i,a,m,!0),a.childLanes=_,null}function ch(i,a){return a=dh({mode:a.mode,children:a.children},i.mode),a.ref=i.ref,i.child=a,a.return=i,a}function DR(i,a,u){return ka(a,i.child,null,u),i=ch(a,a.pendingProps),i.flags|=2,ro(a),a.memoizedState=null,i}function N$(i,a,u){var m=a.pendingProps,_=(a.flags&128)!==0;if(a.flags&=-129,i===null){if(At){if(m.mode==="hidden")return i=ch(a,m),a.lanes=536870912,Au(null,i);if(c0(a),(i=an)?(i=K2(i,Ao),i=i!==null&&i.data==="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:ys!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},u=_x(i),u.return=a,a.child=u,lr=a,an=null)):i=null,i===null)throw ws(a);return a.lanes=536870912,null}return ch(a,m)}var S=i.memoizedState;if(S!==null){var N=S.dehydrated;if(c0(a),_)if(a.flags&256)a.flags&=-257,a=DR(i,a,u);else if(a.memoizedState!==null)a.child=i.child,a.flags|=128,a=null;else throw Error(r(558));else if(Un||Ll(i,a,u,!1),_=(u&i.childLanes)!==0,Un||_){if(m=en,m!==null&&(N=jr(m,u),N!==0&&N!==S.retryLane))throw S.retryLane=N,Oa(i,N),qr(m,i,N),I0;bh(),a=DR(i,a,u)}else i=S.treeContext,an=Mo(N.nextSibling),lr=a,At=!0,bs=null,Ao=!1,i!==null&&wx(a,i),a=ch(a,m),a.flags|=4096;return a}return i=Di(i.child,{mode:m.mode,children:m.children}),i.ref=a.ref,a.child=i,i.return=a,i}function uh(i,a){var u=a.ref;if(u===null)i!==null&&i.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(a.flags|=4194816)}}function M0(i,a,u,m,_){return Ia(a),u=d0(i,a,u,m,void 0,_),m=f0(),i!==null&&!Un?(h0(i,a,_),Fi(i,a,_)):(At&&m&&Gv(a),a.flags|=1,ur(i,a,u,_),a.child)}function LR(i,a,u,m,_,S){return Ia(a),a.updateQueue=null,u=Ux(a,m,u,_),jx(i),m=f0(),i!==null&&!Un?(h0(i,a,S),Fi(i,a,S)):(At&&m&&Gv(a),a.flags|=1,ur(i,a,u,S),a.child)}function $R(i,a,u,m,_){if(Ia(a),a.stateNode===null){var S=Pl,N=u.contextType;typeof N=="object"&&N!==null&&(S=cr(N)),S=new u(m,S),a.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=C0,a.stateNode=S,S._reactInternals=a,S=a.stateNode,S.props=m,S.state=a.memoizedState,S.refs={},r0(a),N=u.contextType,S.context=typeof N=="object"&&N!==null?cr(N):Pl,S.state=a.memoizedState,N=u.getDerivedStateFromProps,typeof N=="function"&&(T0(a,u,N,m),S.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(N=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),N!==S.state&&C0.enqueueReplaceState(S,S.state,null),xu(a,m,S,_),Eu(),S.state=a.memoizedState),typeof S.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(i===null){S=a.stateNode;var U=a.memoizedProps,J=La(u,U);S.props=J;var de=S.context,ye=u.contextType;N=Pl,typeof ye=="object"&&ye!==null&&(N=cr(ye));var Ee=u.getDerivedStateFromProps;ye=typeof Ee=="function"||typeof S.getSnapshotBeforeUpdate=="function",U=a.pendingProps!==U,ye||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(U||de!==N)&&ER(a,S,m,N),Es=!1;var he=a.memoizedState;S.state=he,xu(a,m,S,_),Eu(),de=a.memoizedState,U||he!==de||Es?(typeof Ee=="function"&&(T0(a,u,Ee,m),de=a.memoizedState),(J=Es||SR(a,u,J,m,he,de,N))?(ye||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(a.flags|=4194308)):(typeof S.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=de),S.props=m,S.state=de,S.context=N,m=J):(typeof S.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{S=a.stateNode,o0(i,a),N=a.memoizedProps,ye=La(u,N),S.props=ye,Ee=a.pendingProps,he=S.context,de=u.contextType,J=Pl,typeof de=="object"&&de!==null&&(J=cr(de)),U=u.getDerivedStateFromProps,(de=typeof U=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(N!==Ee||he!==J)&&ER(a,S,m,J),Es=!1,he=a.memoizedState,S.state=he,xu(a,m,S,_),Eu();var ge=a.memoizedState;N!==Ee||he!==ge||Es||i!==null&&i.dependencies!==null&&qf(i.dependencies)?(typeof U=="function"&&(T0(a,u,U,m),ge=a.memoizedState),(ye=Es||SR(a,u,ye,m,he,ge,J)||i!==null&&i.dependencies!==null&&qf(i.dependencies))?(de||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(m,ge,J),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(m,ge,J)),typeof S.componentDidUpdate=="function"&&(a.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof S.componentDidUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=ge),S.props=m,S.state=ge,S.context=J,m=ye):(typeof S.componentDidUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||N===i.memoizedProps&&he===i.memoizedState||(a.flags|=1024),m=!1)}return S=m,uh(i,a),m=(a.flags&128)!==0,S||m?(S=a.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:S.render(),a.flags|=1,i!==null&&m?(a.child=ka(a,i.child,null,_),a.child=ka(a,null,u,_)):ur(i,a,u,_),a.memoizedState=S.state,i=a.child):i=Fi(i,a,_),i}function jR(i,a,u,m){return Ca(),a.flags|=256,ur(i,a,u,m),a.child}var P0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function N0(i){return{baseLanes:i,cachePool:Tx()}}function k0(i,a,u){return i=i!==null?i.childLanes&~u:0,a&&(i|=io),i}function UR(i,a,u){var m=a.pendingProps,_=!1,S=(a.flags&128)!==0,N;if((N=S)||(N=i!==null&&i.memoizedState===null?!1:(Tn.current&2)!==0),N&&(_=!0,a.flags&=-129),N=(a.flags&32)!==0,a.flags&=-33,i===null){if(At){if(_?Os(a):Ts(),(i=an)?(i=K2(i,Ao),i=i!==null&&i.data!=="&"?i:null,i!==null&&(a.memoizedState={dehydrated:i,treeContext:ys!==null?{id:ci,overflow:ui}:null,retryLane:536870912,hydrationErrors:null},u=_x(i),u.return=a,a.child=u,lr=a,an=null)):i=null,i===null)throw ws(a);return g_(i)?a.lanes=32:a.lanes=536870912,null}var U=m.children;return m=m.fallback,_?(Ts(),_=a.mode,U=dh({mode:"hidden",children:U},_),m=Ta(m,_,u,null),U.return=a,m.return=a,U.sibling=m,a.child=U,m=a.child,m.memoizedState=N0(u),m.childLanes=k0(i,N,u),a.memoizedState=P0,Au(null,m)):(Os(a),D0(a,U))}var J=i.memoizedState;if(J!==null&&(U=J.dehydrated,U!==null)){if(S)a.flags&256?(Os(a),a.flags&=-257,a=L0(i,a,u)):a.memoizedState!==null?(Ts(),a.child=i.child,a.flags|=128,a=null):(Ts(),U=m.fallback,_=a.mode,m=dh({mode:"visible",children:m.children},_),U=Ta(U,_,u,null),U.flags|=2,m.return=a,U.return=a,m.sibling=U,a.child=m,ka(a,i.child,null,u),m=a.child,m.memoizedState=N0(u),m.childLanes=k0(i,N,u),a.memoizedState=P0,a=Au(null,m));else if(Os(a),g_(U)){if(N=U.nextSibling&&U.nextSibling.dataset,N)var de=N.dgst;N=de,m=Error(r(419)),m.stack="",m.digest=N,vu({value:m,source:null,stack:null}),a=L0(i,a,u)}else if(Un||Ll(i,a,u,!1),N=(u&i.childLanes)!==0,Un||N){if(N=en,N!==null&&(m=jr(N,u),m!==0&&m!==J.retryLane))throw J.retryLane=m,Oa(i,m),qr(N,i,m),I0;m_(U)||bh(),a=L0(i,a,u)}else m_(U)?(a.flags|=192,a.child=i.child,a=null):(i=J.treeContext,an=Mo(U.nextSibling),lr=a,At=!0,bs=null,Ao=!1,i!==null&&wx(a,i),a=D0(a,m.children),a.flags|=4096);return a}return _?(Ts(),U=m.fallback,_=a.mode,J=i.child,de=J.sibling,m=Di(J,{mode:"hidden",children:m.children}),m.subtreeFlags=J.subtreeFlags&65011712,de!==null?U=Di(de,U):(U=Ta(U,_,u,null),U.flags|=2),U.return=a,m.return=a,m.sibling=U,a.child=m,Au(null,m),m=a.child,U=i.child.memoizedState,U===null?U=N0(u):(_=U.cachePool,_!==null?(J=$n._currentValue,_=_.parent!==J?{parent:J,pool:J}:_):_=Tx(),U={baseLanes:U.baseLanes|u,cachePool:_}),m.memoizedState=U,m.childLanes=k0(i,N,u),a.memoizedState=P0,Au(i.child,m)):(Os(a),u=i.child,i=u.sibling,u=Di(u,{mode:"visible",children:m.children}),u.return=a,u.sibling=null,i!==null&&(N=a.deletions,N===null?(a.deletions=[i],a.flags|=16):N.push(i)),a.child=u,a.memoizedState=null,u)}function D0(i,a){return a=dh({mode:"visible",children:a},i.mode),a.return=i,i.child=a}function dh(i,a){return i=to(22,i,null,a),i.lanes=0,i}function L0(i,a,u){return ka(a,i.child,null,u),i=D0(a,a.pendingProps.children),i.flags|=2,a.memoizedState=null,i}function zR(i,a,u){i.lanes|=a;var m=i.alternate;m!==null&&(m.lanes|=a),Qv(i.return,a,u)}function $0(i,a,u,m,_,S){var N=i.memoizedState;N===null?i.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:_,treeForkCount:S}:(N.isBackwards=a,N.rendering=null,N.renderingStartTime=0,N.last=m,N.tail=u,N.tailMode=_,N.treeForkCount=S)}function FR(i,a,u){var m=a.pendingProps,_=m.revealOrder,S=m.tail;m=m.children;var N=Tn.current,U=(N&2)!==0;if(U?(N=N&1|2,a.flags|=128):N&=1,V(Tn,N),ur(i,a,m,u),m=At?gu:0,!U&&i!==null&&(i.flags&128)!==0)e:for(i=a.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&zR(i,u,a);else if(i.tag===19)zR(i,u,a);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===a)break e;for(;i.sibling===null;){if(i.return===null||i.return===a)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(_){case"forwards":for(u=a.child,_=null;u!==null;)i=u.alternate,i!==null&&Jf(i)===null&&(_=u),u=u.sibling;u=_,u===null?(_=a.child,a.child=null):(_=u.sibling,u.sibling=null),$0(a,!1,_,u,S,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,_=a.child,a.child=null;_!==null;){if(i=_.alternate,i!==null&&Jf(i)===null){a.child=_;break}i=_.sibling,_.sibling=u,u=_,_=i}$0(a,!0,u,null,S,m);break;case"together":$0(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function Fi(i,a,u){if(i!==null&&(a.dependencies=i.dependencies),Is|=a.lanes,(u&a.childLanes)===0)if(i!==null){if(Ll(i,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(i!==null&&a.child!==i.child)throw Error(r(153));if(a.child!==null){for(i=a.child,u=Di(i,i.pendingProps),a.child=u,u.return=a;i.sibling!==null;)i=i.sibling,u=u.sibling=Di(i,i.pendingProps),u.return=a;u.sibling=null}return a.child}function j0(i,a){return(i.lanes&a)!==0?!0:(i=i.dependencies,!!(i!==null&&qf(i)))}function k$(i,a,u){switch(a.tag){case 3:pe(a,a.stateNode.containerInfo),Ss(a,$n,i.memoizedState.cache),Ca();break;case 27:case 5:je(a);break;case 4:pe(a,a.stateNode.containerInfo);break;case 10:Ss(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,c0(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(Os(a),a.flags|=128,null):(u&a.child.childLanes)!==0?UR(i,a,u):(Os(a),i=Fi(i,a,u),i!==null?i.sibling:null);Os(a);break;case 19:var _=(i.flags&128)!==0;if(m=(u&a.childLanes)!==0,m||(Ll(i,a,u,!1),m=(u&a.childLanes)!==0),_){if(m)return FR(i,a,u);a.flags|=128}if(_=a.memoizedState,_!==null&&(_.rendering=null,_.tail=null,_.lastEffect=null),V(Tn,Tn.current),m)break;return null;case 22:return a.lanes=0,NR(i,a,u,a.pendingProps);case 24:Ss(a,$n,i.memoizedState.cache)}return Fi(i,a,u)}function BR(i,a,u){if(i!==null)if(i.memoizedProps!==a.pendingProps)Un=!0;else{if(!j0(i,u)&&(a.flags&128)===0)return Un=!1,k$(i,a,u);Un=(i.flags&131072)!==0}else Un=!1,At&&(a.flags&1048576)!==0&&bx(a,gu,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(i=Pa(a.elementType),a.type=i,typeof i=="function")Vv(i)?(m=La(i,m),a.tag=1,a=$R(null,a,i,m,u)):(a.tag=0,a=M0(null,a,i,m,u));else{if(i!=null){var _=i.$$typeof;if(_===R){a.tag=11,a=IR(null,a,i,m,u);break e}else if(_===I){a.tag=14,a=MR(null,a,i,m,u);break e}}throw a=K(i)||i,Error(r(306,a,""))}}return a;case 0:return M0(i,a,a.type,a.pendingProps,u);case 1:return m=a.type,_=La(m,a.pendingProps),$R(i,a,m,_,u);case 3:e:{if(pe(a,a.stateNode.containerInfo),i===null)throw Error(r(387));m=a.pendingProps;var S=a.memoizedState;_=S.element,o0(i,a),xu(a,m,null,u);var N=a.memoizedState;if(m=N.cache,Ss(a,$n,m),m!==S.cache&&Xv(a,[$n],u,!0),Eu(),m=N.element,S.isDehydrated)if(S={element:m,isDehydrated:!1,cache:N.cache},a.updateQueue.baseState=S,a.memoizedState=S,a.flags&256){a=jR(i,a,m,u);break e}else if(m!==_){_=Oo(Error(r(424)),a),vu(_),a=jR(i,a,m,u);break e}else for(i=a.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,an=Mo(i.firstChild),lr=a,At=!0,bs=null,Ao=!0,u=Nx(a,null,m,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(Ca(),m===_){a=Fi(i,a,u);break e}ur(i,a,m,u)}a=a.child}return a;case 26:return uh(i,a),i===null?(u=J2(a.type,null,a.pendingProps,null))?a.memoizedState=u:At||(u=a.type,i=a.pendingProps,m=Th(X.current).createElement(u),m[ar]=a,m[Ur]=i,dr(m,u,i),er(m),a.stateNode=m):a.memoizedState=J2(a.type,i.memoizedProps,a.pendingProps,i.memoizedState),null;case 27:return je(a),i===null&&At&&(m=a.stateNode=W2(a.type,a.pendingProps,X.current),lr=a,Ao=!0,_=an,Ds(a.type)?(v_=_,an=Mo(m.firstChild)):an=_),ur(i,a,a.pendingProps.children,u),uh(i,a),i===null&&(a.flags|=4194304),a.child;case 5:return i===null&&At&&((_=m=an)&&(m=uj(m,a.type,a.pendingProps,Ao),m!==null?(a.stateNode=m,lr=a,an=Mo(m.firstChild),Ao=!1,_=!0):_=!1),_||ws(a)),je(a),_=a.type,S=a.pendingProps,N=i!==null?i.memoizedProps:null,m=S.children,f_(_,S)?m=null:N!==null&&f_(_,N)&&(a.flags|=32),a.memoizedState!==null&&(_=d0(i,a,R$,null,null,u),Hu._currentValue=_),uh(i,a),ur(i,a,m,u),a.child;case 6:return i===null&&At&&((i=u=an)&&(u=dj(u,a.pendingProps,Ao),u!==null?(a.stateNode=u,lr=a,an=null,i=!0):i=!1),i||ws(a)),null;case 13:return UR(i,a,u);case 4:return pe(a,a.stateNode.containerInfo),m=a.pendingProps,i===null?a.child=ka(a,null,m,u):ur(i,a,m,u),a.child;case 11:return IR(i,a,a.type,a.pendingProps,u);case 7:return ur(i,a,a.pendingProps,u),a.child;case 8:return ur(i,a,a.pendingProps.children,u),a.child;case 12:return ur(i,a,a.pendingProps.children,u),a.child;case 10:return m=a.pendingProps,Ss(a,a.type,m.value),ur(i,a,m.children,u),a.child;case 9:return _=a.type._context,m=a.pendingProps.children,Ia(a),_=cr(_),m=m(_),a.flags|=1,ur(i,a,m,u),a.child;case 14:return MR(i,a,a.type,a.pendingProps,u);case 15:return PR(i,a,a.type,a.pendingProps,u);case 19:return FR(i,a,u);case 31:return N$(i,a,u);case 22:return NR(i,a,u,a.pendingProps);case 24:return Ia(a),m=cr($n),i===null?(_=t0(),_===null&&(_=en,S=Jv(),_.pooledCache=S,S.refCount++,S!==null&&(_.pooledCacheLanes|=u),_=S),a.memoizedState={parent:m,cache:_},r0(a),Ss(a,$n,_)):((i.lanes&u)!==0&&(o0(i,a),xu(a,null,null,u),Eu()),_=i.memoizedState,S=a.memoizedState,_.parent!==m?(_={parent:m,cache:m},a.memoizedState=_,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=_),Ss(a,$n,m)):(m=S.cache,Ss(a,$n,m),m!==_.cache&&Xv(a,[$n],u,!0))),ur(i,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(r(156,a.tag))}function Bi(i){i.flags|=4}function U0(i,a,u,m,_){if((a=(i.mode&32)!==0)&&(a=!1),a){if(i.flags|=16777216,(_&335544128)===_)if(i.stateNode.complete)i.flags|=8192;else if(m2())i.flags|=8192;else throw Na=Yf,n0}else i.flags&=-16777217}function VR(i,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!oO(a))if(m2())i.flags|=8192;else throw Na=Yf,n0}function fh(i,a){a!==null&&(i.flags|=4),i.flags&16384&&(a=i.tag!==22?Kt():536870912,i.lanes|=a,Zl|=a)}function Iu(i,a){if(!At)switch(i.tailMode){case"hidden":a=i.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?a||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function ln(i){var a=i.alternate!==null&&i.alternate.child===i.child,u=0,m=0;if(a)for(var _=i.child;_!==null;)u|=_.lanes|_.childLanes,m|=_.subtreeFlags&65011712,m|=_.flags&65011712,_.return=i,_=_.sibling;else for(_=i.child;_!==null;)u|=_.lanes|_.childLanes,m|=_.subtreeFlags,m|=_.flags,_.return=i,_=_.sibling;return i.subtreeFlags|=m,i.childLanes=u,a}function D$(i,a,u){var m=a.pendingProps;switch(Kv(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ln(a),null;case 1:return ln(a),null;case 3:return u=a.stateNode,m=null,i!==null&&(m=i.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),ji($n),xe(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(Dl(a)?Bi(a):i===null||i.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Yv())),ln(a),null;case 26:var _=a.type,S=a.memoizedState;return i===null?(Bi(a),S!==null?(ln(a),VR(a,S)):(ln(a),U0(a,_,null,m,u))):S?S!==i.memoizedState?(Bi(a),ln(a),VR(a,S)):(ln(a),a.flags&=-16777217):(i=i.memoizedProps,i!==m&&Bi(a),ln(a),U0(a,_,i,m,u)),null;case 27:if(Y(a),u=X.current,_=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&Bi(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return ln(a),null}i=D.current,Dl(a)?Sx(a):(i=W2(_,m,u),a.stateNode=i,Bi(a))}return ln(a),null;case 5:if(Y(a),_=a.type,i!==null&&a.stateNode!=null)i.memoizedProps!==m&&Bi(a);else{if(!m){if(a.stateNode===null)throw Error(r(166));return ln(a),null}if(S=D.current,Dl(a))Sx(a);else{var N=Th(X.current);switch(S){case 1:S=N.createElementNS("http://www.w3.org/2000/svg",_);break;case 2:S=N.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;default:switch(_){case"svg":S=N.createElementNS("http://www.w3.org/2000/svg",_);break;case"math":S=N.createElementNS("http://www.w3.org/1998/Math/MathML",_);break;case"script":S=N.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof m.is=="string"?N.createElement("select",{is:m.is}):N.createElement("select"),m.multiple?S.multiple=!0:m.size&&(S.size=m.size);break;default:S=typeof m.is=="string"?N.createElement(_,{is:m.is}):N.createElement(_)}}S[ar]=a,S[Ur]=m;e:for(N=a.child;N!==null;){if(N.tag===5||N.tag===6)S.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===a)break e;for(;N.sibling===null;){if(N.return===null||N.return===a)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}a.stateNode=S;e:switch(dr(S,_,m),_){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Bi(a)}}return ln(a),U0(a,a.type,i===null?null:i.memoizedProps,a.pendingProps,u),null;case 6:if(i&&a.stateNode!=null)i.memoizedProps!==m&&Bi(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(r(166));if(i=X.current,Dl(a)){if(i=a.stateNode,u=a.memoizedProps,m=null,_=lr,_!==null)switch(_.tag){case 27:case 5:m=_.memoizedProps}i[ar]=a,i=!!(i.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||U2(i.nodeValue,u)),i||ws(a,!0)}else i=Th(i).createTextNode(m),i[ar]=a,a.stateNode=i}return ln(a),null;case 31:if(u=a.memoizedState,i===null||i.memoizedState!==null){if(m=Dl(a),u!==null){if(i===null){if(!m)throw Error(r(318));if(i=a.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[ar]=a}else Ca(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ln(a),i=!1}else u=Yv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return a.flags&256?(ro(a),a):(ro(a),null);if((a.flags&128)!==0)throw Error(r(558))}return ln(a),null;case 13:if(m=a.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(_=Dl(a),m!==null&&m.dehydrated!==null){if(i===null){if(!_)throw Error(r(318));if(_=a.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(r(317));_[ar]=a}else Ca(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ln(a),_=!1}else _=Yv(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=_),_=!0;if(!_)return a.flags&256?(ro(a),a):(ro(a),null)}return ro(a),(a.flags&128)!==0?(a.lanes=u,a):(u=m!==null,i=i!==null&&i.memoizedState!==null,u&&(m=a.child,_=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(_=m.alternate.memoizedState.cachePool.pool),S=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(S=m.memoizedState.cachePool.pool),S!==_&&(m.flags|=2048)),u!==i&&u&&(a.child.flags|=8192),fh(a,a.updateQueue),ln(a),null);case 4:return xe(),i===null&&a_(a.stateNode.containerInfo),ln(a),null;case 10:return ji(a.type),ln(a),null;case 19:if(G(Tn),m=a.memoizedState,m===null)return ln(a),null;if(_=(a.flags&128)!==0,S=m.rendering,S===null)if(_)Iu(m,!1);else{if(Rn!==0||i!==null&&(i.flags&128)!==0)for(i=a.child;i!==null;){if(S=Jf(i),S!==null){for(a.flags|=128,Iu(m,!1),i=S.updateQueue,a.updateQueue=i,fh(a,i),a.subtreeFlags=0,i=u,u=a.child;u!==null;)vx(u,i),u=u.sibling;return V(Tn,Tn.current&1|2),At&&Li(a,m.treeForkCount),a.child}i=i.sibling}m.tail!==null&&Z()>vh&&(a.flags|=128,_=!0,Iu(m,!1),a.lanes=4194304)}else{if(!_)if(i=Jf(S),i!==null){if(a.flags|=128,_=!0,i=i.updateQueue,a.updateQueue=i,fh(a,i),Iu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!S.alternate&&!At)return ln(a),null}else 2*Z()-m.renderingStartTime>vh&&u!==536870912&&(a.flags|=128,_=!0,Iu(m,!1),a.lanes=4194304);m.isBackwards?(S.sibling=a.child,a.child=S):(i=m.last,i!==null?i.sibling=S:a.child=S,m.last=S)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=Z(),i.sibling=null,u=Tn.current,V(Tn,_?u&1|2:u&1),At&&Li(a,m.treeForkCount),i):(ln(a),null);case 22:case 23:return ro(a),l0(),m=a.memoizedState!==null,i!==null?i.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(u&536870912)!==0&&(a.flags&128)===0&&(ln(a),a.subtreeFlags&6&&(a.flags|=8192)):ln(a),u=a.updateQueue,u!==null&&fh(a,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==u&&(a.flags|=2048),i!==null&&G(Ma),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ji($n),ln(a),null;case 25:return null;case 30:return null}throw Error(r(156,a.tag))}function L$(i,a){switch(Kv(a),a.tag){case 1:return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 3:return ji($n),xe(),i=a.flags,(i&65536)!==0&&(i&128)===0?(a.flags=i&-65537|128,a):null;case 26:case 27:case 5:return Y(a),null;case 31:if(a.memoizedState!==null){if(ro(a),a.alternate===null)throw Error(r(340));Ca()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 13:if(ro(a),i=a.memoizedState,i!==null&&i.dehydrated!==null){if(a.alternate===null)throw Error(r(340));Ca()}return i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 19:return G(Tn),null;case 4:return xe(),null;case 10:return ji(a.type),null;case 22:case 23:return ro(a),l0(),i!==null&&G(Ma),i=a.flags,i&65536?(a.flags=i&-65537|128,a):null;case 24:return ji($n),null;case 25:return null;default:return null}}function HR(i,a){switch(Kv(a),a.tag){case 3:ji($n),xe();break;case 26:case 27:case 5:Y(a);break;case 4:xe();break;case 31:a.memoizedState!==null&&ro(a);break;case 13:ro(a);break;case 19:G(Tn);break;case 10:ji(a.type);break;case 22:case 23:ro(a),l0(),i!==null&&G(Ma);break;case 24:ji($n)}}function Mu(i,a){try{var u=a.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var _=m.next;u=_;do{if((u.tag&i)===i){m=void 0;var S=u.create,N=u.inst;m=S(),N.destroy=m}u=u.next}while(u!==_)}}catch(U){Ht(a,a.return,U)}}function Cs(i,a,u){try{var m=a.updateQueue,_=m!==null?m.lastEffect:null;if(_!==null){var S=_.next;m=S;do{if((m.tag&i)===i){var N=m.inst,U=N.destroy;if(U!==void 0){N.destroy=void 0,_=a;var J=u,de=U;try{de()}catch(ye){Ht(_,J,ye)}}}m=m.next}while(m!==S)}}catch(ye){Ht(a,a.return,ye)}}function qR(i){var a=i.updateQueue;if(a!==null){var u=i.stateNode;try{Dx(a,u)}catch(m){Ht(i,i.return,m)}}}function GR(i,a,u){u.props=La(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(m){Ht(i,a,m)}}function Pu(i,a){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var m=i.stateNode;break;case 30:m=i.stateNode;break;default:m=i.stateNode}typeof u=="function"?i.refCleanup=u(m):u.current=m}}catch(_){Ht(i,a,_)}}function di(i,a){var u=i.ref,m=i.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(_){Ht(i,a,_)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(_){Ht(i,a,_)}else u.current=null}function KR(i){var a=i.type,u=i.memoizedProps,m=i.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(_){Ht(i,i.return,_)}}function z0(i,a,u){try{var m=i.stateNode;oj(m,i.type,u,a),m[Ur]=a}catch(_){Ht(i,i.return,_)}}function ZR(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ds(i.type)||i.tag===4}function F0(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||ZR(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ds(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function B0(i,a,u){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(i),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Ni));else if(m!==4&&(m===27&&Ds(i.type)&&(u=i.stateNode,a=null),i=i.child,i!==null))for(B0(i,a,u),i=i.sibling;i!==null;)B0(i,a,u),i=i.sibling}function hh(i,a,u){var m=i.tag;if(m===5||m===6)i=i.stateNode,a?u.insertBefore(i,a):u.appendChild(i);else if(m!==4&&(m===27&&Ds(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(hh(i,a,u),i=i.sibling;i!==null;)hh(i,a,u),i=i.sibling}function YR(i){var a=i.stateNode,u=i.memoizedProps;try{for(var m=i.type,_=a.attributes;_.length;)a.removeAttributeNode(_[0]);dr(a,m,u),a[ar]=i,a[Ur]=u}catch(S){Ht(i,i.return,S)}}var Vi=!1,zn=!1,V0=!1,WR=typeof WeakSet=="function"?WeakSet:Set,tr=null;function $$(i,a){if(i=i.containerInfo,u_=kh,i=lx(i),Lv(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var _=m.anchorOffset,S=m.focusNode;m=m.focusOffset;try{u.nodeType,S.nodeType}catch{u=null;break e}var N=0,U=-1,J=-1,de=0,ye=0,Ee=i,he=null;t:for(;;){for(var ge;Ee!==u||_!==0&&Ee.nodeType!==3||(U=N+_),Ee!==S||m!==0&&Ee.nodeType!==3||(J=N+m),Ee.nodeType===3&&(N+=Ee.nodeValue.length),(ge=Ee.firstChild)!==null;)he=Ee,Ee=ge;for(;;){if(Ee===i)break t;if(he===u&&++de===_&&(U=N),he===S&&++ye===m&&(J=N),(ge=Ee.nextSibling)!==null)break;Ee=he,he=Ee.parentNode}Ee=ge}u=U===-1||J===-1?null:{start:U,end:J}}else u=null}u=u||{start:0,end:0}}else u=null;for(d_={focusedElem:i,selectionRange:u},kh=!1,tr=a;tr!==null;)if(a=tr,i=a.child,(a.subtreeFlags&1028)!==0&&i!==null)i.return=a,tr=i;else for(;tr!==null;){switch(a=tr,S=a.alternate,i=a.flags,a.tag){case 0:if((i&4)!==0&&(i=a.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)_=i[u],_.ref.impl=_.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&S!==null){i=void 0,u=a,_=S.memoizedProps,S=S.memoizedState,m=u.stateNode;try{var Ve=La(u.type,_);i=m.getSnapshotBeforeUpdate(Ve,S),m.__reactInternalSnapshotBeforeUpdate=i}catch(nt){Ht(u,u.return,nt)}}break;case 3:if((i&1024)!==0){if(i=a.stateNode.containerInfo,u=i.nodeType,u===9)p_(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":p_(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=a.sibling,i!==null){i.return=a.return,tr=i;break}tr=a.return}}function QR(i,a,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:qi(i,u),m&4&&Mu(5,u);break;case 1:if(qi(i,u),m&4)if(i=u.stateNode,a===null)try{i.componentDidMount()}catch(N){Ht(u,u.return,N)}else{var _=La(u.type,a.memoizedProps);a=a.memoizedState;try{i.componentDidUpdate(_,a,i.__reactInternalSnapshotBeforeUpdate)}catch(N){Ht(u,u.return,N)}}m&64&&qR(u),m&512&&Pu(u,u.return);break;case 3:if(qi(i,u),m&64&&(i=u.updateQueue,i!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{Dx(i,a)}catch(N){Ht(u,u.return,N)}}break;case 27:a===null&&m&4&&YR(u);case 26:case 5:qi(i,u),a===null&&m&4&&KR(u),m&512&&Pu(u,u.return);break;case 12:qi(i,u);break;case 31:qi(i,u),m&4&&e2(i,u);break;case 13:qi(i,u),m&4&&t2(i,u),m&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=G$.bind(null,u),fj(i,u))));break;case 22:if(m=u.memoizedState!==null||Vi,!m){a=a!==null&&a.memoizedState!==null||zn,_=Vi;var S=zn;Vi=m,(zn=a)&&!S?Gi(i,u,(u.subtreeFlags&8772)!==0):qi(i,u),Vi=_,zn=S}break;case 30:break;default:qi(i,u)}}function XR(i){var a=i.alternate;a!==null&&(i.alternate=null,XR(a)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(a=i.stateNode,a!==null&&yv(a)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var hn=null,Fr=!1;function Hi(i,a,u){for(u=u.child;u!==null;)JR(i,a,u),u=u.sibling}function JR(i,a,u){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(yt,u)}catch{}switch(u.tag){case 26:zn||di(u,a),Hi(i,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:zn||di(u,a);var m=hn,_=Fr;Ds(u.type)&&(hn=u.stateNode,Fr=!1),Hi(i,a,u),Fu(u.stateNode),hn=m,Fr=_;break;case 5:zn||di(u,a);case 6:if(m=hn,_=Fr,hn=null,Hi(i,a,u),hn=m,Fr=_,hn!==null)if(Fr)try{(hn.nodeType===9?hn.body:hn.nodeName==="HTML"?hn.ownerDocument.body:hn).removeChild(u.stateNode)}catch(S){Ht(u,a,S)}else try{hn.removeChild(u.stateNode)}catch(S){Ht(u,a,S)}break;case 18:hn!==null&&(Fr?(i=hn,q2(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),nc(i)):q2(hn,u.stateNode));break;case 4:m=hn,_=Fr,hn=u.stateNode.containerInfo,Fr=!0,Hi(i,a,u),hn=m,Fr=_;break;case 0:case 11:case 14:case 15:Cs(2,u,a),zn||Cs(4,u,a),Hi(i,a,u);break;case 1:zn||(di(u,a),m=u.stateNode,typeof m.componentWillUnmount=="function"&&GR(u,a,m)),Hi(i,a,u);break;case 21:Hi(i,a,u);break;case 22:zn=(m=zn)||u.memoizedState!==null,Hi(i,a,u),zn=m;break;default:Hi(i,a,u)}}function e2(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{nc(i)}catch(u){Ht(a,a.return,u)}}}function t2(i,a){if(a.memoizedState===null&&(i=a.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{nc(i)}catch(u){Ht(a,a.return,u)}}function j$(i){switch(i.tag){case 31:case 13:case 19:var a=i.stateNode;return a===null&&(a=i.stateNode=new WR),a;case 22:return i=i.stateNode,a=i._retryCache,a===null&&(a=i._retryCache=new WR),a;default:throw Error(r(435,i.tag))}}function ph(i,a){var u=j$(i);a.forEach(function(m){if(!u.has(m)){u.add(m);var _=K$.bind(null,i,m);m.then(_,_)}})}function Br(i,a){var u=a.deletions;if(u!==null)for(var m=0;m<u.length;m++){var _=u[m],S=i,N=a,U=N;e:for(;U!==null;){switch(U.tag){case 27:if(Ds(U.type)){hn=U.stateNode,Fr=!1;break e}break;case 5:hn=U.stateNode,Fr=!1;break e;case 3:case 4:hn=U.stateNode.containerInfo,Fr=!0;break e}U=U.return}if(hn===null)throw Error(r(160));JR(S,N,_),hn=null,Fr=!1,S=_.alternate,S!==null&&(S.return=null),_.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)n2(a,i),a=a.sibling}var Zo=null;function n2(i,a){var u=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Br(a,i),Vr(i),m&4&&(Cs(3,i,i.return),Mu(3,i),Cs(5,i,i.return));break;case 1:Br(a,i),Vr(i),m&512&&(zn||u===null||di(u,u.return)),m&64&&Vi&&(i=i.updateQueue,i!==null&&(m=i.callbacks,m!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var _=Zo;if(Br(a,i),Vr(i),m&512&&(zn||u===null||di(u,u.return)),m&4){var S=u!==null?u.memoizedState:null;if(m=i.memoizedState,u===null)if(m===null)if(i.stateNode===null){e:{m=i.type,u=i.memoizedProps,_=_.ownerDocument||_;t:switch(m){case"title":S=_.getElementsByTagName("title")[0],(!S||S[iu]||S[ar]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=_.createElement(m),_.head.insertBefore(S,_.querySelector("head > title"))),dr(S,m,u),S[ar]=i,er(S),m=S;break e;case"link":var N=nO("link","href",_).get(m+(u.href||""));if(N){for(var U=0;U<N.length;U++)if(S=N[U],S.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&S.getAttribute("rel")===(u.rel==null?null:u.rel)&&S.getAttribute("title")===(u.title==null?null:u.title)&&S.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){N.splice(U,1);break t}}S=_.createElement(m),dr(S,m,u),_.head.appendChild(S);break;case"meta":if(N=nO("meta","content",_).get(m+(u.content||""))){for(U=0;U<N.length;U++)if(S=N[U],S.getAttribute("content")===(u.content==null?null:""+u.content)&&S.getAttribute("name")===(u.name==null?null:u.name)&&S.getAttribute("property")===(u.property==null?null:u.property)&&S.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&S.getAttribute("charset")===(u.charSet==null?null:u.charSet)){N.splice(U,1);break t}}S=_.createElement(m),dr(S,m,u),_.head.appendChild(S);break;default:throw Error(r(468,m))}S[ar]=i,er(S),m=S}i.stateNode=m}else rO(_,i.type,i.stateNode);else i.stateNode=tO(_,m,i.memoizedProps);else S!==m?(S===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):S.count--,m===null?rO(_,i.type,i.stateNode):tO(_,m,i.memoizedProps)):m===null&&i.stateNode!==null&&z0(i,i.memoizedProps,u.memoizedProps)}break;case 27:Br(a,i),Vr(i),m&512&&(zn||u===null||di(u,u.return)),u!==null&&m&4&&z0(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Br(a,i),Vr(i),m&512&&(zn||u===null||di(u,u.return)),i.flags&32){_=i.stateNode;try{Rl(_,"")}catch(Ve){Ht(i,i.return,Ve)}}m&4&&i.stateNode!=null&&(_=i.memoizedProps,z0(i,_,u!==null?u.memoizedProps:_)),m&1024&&(V0=!0);break;case 6:if(Br(a,i),Vr(i),m&4){if(i.stateNode===null)throw Error(r(162));m=i.memoizedProps,u=i.stateNode;try{u.nodeValue=m}catch(Ve){Ht(i,i.return,Ve)}}break;case 3:if(Ih=null,_=Zo,Zo=Ch(a.containerInfo),Br(a,i),Zo=_,Vr(i),m&4&&u!==null&&u.memoizedState.isDehydrated)try{nc(a.containerInfo)}catch(Ve){Ht(i,i.return,Ve)}V0&&(V0=!1,r2(i));break;case 4:m=Zo,Zo=Ch(i.stateNode.containerInfo),Br(a,i),Vr(i),Zo=m;break;case 12:Br(a,i),Vr(i);break;case 31:Br(a,i),Vr(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,ph(i,m)));break;case 13:Br(a,i),Vr(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(gh=Z()),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,ph(i,m)));break;case 22:_=i.memoizedState!==null;var J=u!==null&&u.memoizedState!==null,de=Vi,ye=zn;if(Vi=de||_,zn=ye||J,Br(a,i),zn=ye,Vi=de,Vr(i),m&8192)e:for(a=i.stateNode,a._visibility=_?a._visibility&-2:a._visibility|1,_&&(u===null||J||Vi||zn||$a(i)),u=null,a=i;;){if(a.tag===5||a.tag===26){if(u===null){J=u=a;try{if(S=J.stateNode,_)N=S.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{U=J.stateNode;var Ee=J.memoizedProps.style,he=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;U.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(Ve){Ht(J,J.return,Ve)}}}else if(a.tag===6){if(u===null){J=a;try{J.stateNode.nodeValue=_?"":J.memoizedProps}catch(Ve){Ht(J,J.return,Ve)}}}else if(a.tag===18){if(u===null){J=a;try{var ge=J.stateNode;_?G2(ge,!0):G2(J.stateNode,!1)}catch(Ve){Ht(J,J.return,Ve)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===i)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===i)break e;for(;a.sibling===null;){if(a.return===null||a.return===i)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=i.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,ph(i,u))));break;case 19:Br(a,i),Vr(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,ph(i,m)));break;case 30:break;case 21:break;default:Br(a,i),Vr(i)}}function Vr(i){var a=i.flags;if(a&2){try{for(var u,m=i.return;m!==null;){if(ZR(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var _=u.stateNode,S=F0(i);hh(i,S,_);break;case 5:var N=u.stateNode;u.flags&32&&(Rl(N,""),u.flags&=-33);var U=F0(i);hh(i,U,N);break;case 3:case 4:var J=u.stateNode.containerInfo,de=F0(i);B0(i,de,J);break;default:throw Error(r(161))}}catch(ye){Ht(i,i.return,ye)}i.flags&=-3}a&4096&&(i.flags&=-4097)}function r2(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var a=i;r2(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),i=i.sibling}}function qi(i,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)QR(i,a.alternate,a),a=a.sibling}function $a(i){for(i=i.child;i!==null;){var a=i;switch(a.tag){case 0:case 11:case 14:case 15:Cs(4,a,a.return),$a(a);break;case 1:di(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&GR(a,a.return,u),$a(a);break;case 27:Fu(a.stateNode);case 26:case 5:di(a,a.return),$a(a);break;case 22:a.memoizedState===null&&$a(a);break;case 30:$a(a);break;default:$a(a)}i=i.sibling}}function Gi(i,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,_=i,S=a,N=S.flags;switch(S.tag){case 0:case 11:case 15:Gi(_,S,u),Mu(4,S);break;case 1:if(Gi(_,S,u),m=S,_=m.stateNode,typeof _.componentDidMount=="function")try{_.componentDidMount()}catch(de){Ht(m,m.return,de)}if(m=S,_=m.updateQueue,_!==null){var U=m.stateNode;try{var J=_.shared.hiddenCallbacks;if(J!==null)for(_.shared.hiddenCallbacks=null,_=0;_<J.length;_++)kx(J[_],U)}catch(de){Ht(m,m.return,de)}}u&&N&64&&qR(S),Pu(S,S.return);break;case 27:YR(S);case 26:case 5:Gi(_,S,u),u&&m===null&&N&4&&KR(S),Pu(S,S.return);break;case 12:Gi(_,S,u);break;case 31:Gi(_,S,u),u&&N&4&&e2(_,S);break;case 13:Gi(_,S,u),u&&N&4&&t2(_,S);break;case 22:S.memoizedState===null&&Gi(_,S,u),Pu(S,S.return);break;case 30:break;default:Gi(_,S,u)}a=a.sibling}}function H0(i,a){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&_u(u))}function q0(i,a){i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&_u(i))}function Yo(i,a,u,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)o2(i,a,u,m),a=a.sibling}function o2(i,a,u,m){var _=a.flags;switch(a.tag){case 0:case 11:case 15:Yo(i,a,u,m),_&2048&&Mu(9,a);break;case 1:Yo(i,a,u,m);break;case 3:Yo(i,a,u,m),_&2048&&(i=null,a.alternate!==null&&(i=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==i&&(a.refCount++,i!=null&&_u(i)));break;case 12:if(_&2048){Yo(i,a,u,m),i=a.stateNode;try{var S=a.memoizedProps,N=S.id,U=S.onPostCommit;typeof U=="function"&&U(N,a.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(J){Ht(a,a.return,J)}}else Yo(i,a,u,m);break;case 31:Yo(i,a,u,m);break;case 13:Yo(i,a,u,m);break;case 23:break;case 22:S=a.stateNode,N=a.alternate,a.memoizedState!==null?S._visibility&2?Yo(i,a,u,m):Nu(i,a):S._visibility&2?Yo(i,a,u,m):(S._visibility|=2,ql(i,a,u,m,(a.subtreeFlags&10256)!==0||!1)),_&2048&&H0(N,a);break;case 24:Yo(i,a,u,m),_&2048&&q0(a.alternate,a);break;default:Yo(i,a,u,m)}}function ql(i,a,u,m,_){for(_=_&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var S=i,N=a,U=u,J=m,de=N.flags;switch(N.tag){case 0:case 11:case 15:ql(S,N,U,J,_),Mu(8,N);break;case 23:break;case 22:var ye=N.stateNode;N.memoizedState!==null?ye._visibility&2?ql(S,N,U,J,_):Nu(S,N):(ye._visibility|=2,ql(S,N,U,J,_)),_&&de&2048&&H0(N.alternate,N);break;case 24:ql(S,N,U,J,_),_&&de&2048&&q0(N.alternate,N);break;default:ql(S,N,U,J,_)}a=a.sibling}}function Nu(i,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=i,m=a,_=m.flags;switch(m.tag){case 22:Nu(u,m),_&2048&&H0(m.alternate,m);break;case 24:Nu(u,m),_&2048&&q0(m.alternate,m);break;default:Nu(u,m)}a=a.sibling}}var ku=8192;function Gl(i,a,u){if(i.subtreeFlags&ku)for(i=i.child;i!==null;)i2(i,a,u),i=i.sibling}function i2(i,a,u){switch(i.tag){case 26:Gl(i,a,u),i.flags&ku&&i.memoizedState!==null&&xj(u,Zo,i.memoizedState,i.memoizedProps);break;case 5:Gl(i,a,u);break;case 3:case 4:var m=Zo;Zo=Ch(i.stateNode.containerInfo),Gl(i,a,u),Zo=m;break;case 22:i.memoizedState===null&&(m=i.alternate,m!==null&&m.memoizedState!==null?(m=ku,ku=16777216,Gl(i,a,u),ku=m):Gl(i,a,u));break;default:Gl(i,a,u)}}function s2(i){var a=i.alternate;if(a!==null&&(i=a.child,i!==null)){a.child=null;do a=i.sibling,i.sibling=null,i=a;while(i!==null)}}function Du(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];tr=m,l2(m,i)}s2(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)a2(i),i=i.sibling}function a2(i){switch(i.tag){case 0:case 11:case 15:Du(i),i.flags&2048&&Cs(9,i,i.return);break;case 3:Du(i);break;case 12:Du(i);break;case 22:var a=i.stateNode;i.memoizedState!==null&&a._visibility&2&&(i.return===null||i.return.tag!==13)?(a._visibility&=-3,mh(i)):Du(i);break;default:Du(i)}}function mh(i){var a=i.deletions;if((i.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var m=a[u];tr=m,l2(m,i)}s2(i)}for(i=i.child;i!==null;){switch(a=i,a.tag){case 0:case 11:case 15:Cs(8,a,a.return),mh(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,mh(a));break;default:mh(a)}i=i.sibling}}function l2(i,a){for(;tr!==null;){var u=tr;switch(u.tag){case 0:case 11:case 15:Cs(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:_u(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,tr=m;else e:for(u=i;tr!==null;){m=tr;var _=m.sibling,S=m.return;if(XR(m),m===u){tr=null;break e}if(_!==null){_.return=S,tr=_;break e}tr=S}}}var U$={getCacheForType:function(i){var a=cr($n),u=a.data.get(i);return u===void 0&&(u=i(),a.data.set(i,u)),u},cacheSignal:function(){return cr($n).controller.signal}},z$=typeof WeakMap=="function"?WeakMap:Map,zt=0,en=null,wt=null,Rt=0,Vt=0,oo=null,As=!1,Kl=!1,G0=!1,Ki=0,Rn=0,Is=0,ja=0,K0=0,io=0,Zl=0,Lu=null,Hr=null,Z0=!1,gh=0,c2=0,vh=1/0,_h=null,Ms=null,qn=0,Ps=null,Yl=null,Zi=0,Y0=0,W0=null,u2=null,$u=0,Q0=null;function so(){return(zt&2)!==0&&Rt!==0?Rt&-Rt:q.T!==null?r_():vv()}function d2(){if(io===0)if((Rt&536870912)===0||At){var i=Ct;Ct<<=1,(Ct&3932160)===0&&(Ct=262144),io=i}else io=536870912;return i=no.current,i!==null&&(i.flags|=32),io}function qr(i,a,u){(i===en&&(Vt===2||Vt===9)||i.cancelPendingCommit!==null)&&(Wl(i,0),Ns(i,Rt,io,!1)),Lt(i,u),((zt&2)===0||i!==en)&&(i===en&&((zt&2)===0&&(ja|=u),Rn===4&&Ns(i,Rt,io,!1)),fi(i))}function f2(i,a,u){if((zt&6)!==0)throw Error(r(327));var m=!u&&(a&127)===0&&(a&i.expiredLanes)===0||ft(i,a),_=m?V$(i,a):J0(i,a,!0),S=m;do{if(_===0){Kl&&!m&&Ns(i,a,0,!1);break}else{if(u=i.current.alternate,S&&!F$(u)){_=J0(i,a,!1),S=!1;continue}if(_===2){if(S=a,i.errorRecoveryDisabledLanes&S)var N=0;else N=i.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){a=N;e:{var U=i;_=Lu;var J=U.current.memoizedState.isDehydrated;if(J&&(Wl(U,N).flags|=256),N=J0(U,N,!1),N!==2){if(G0&&!J){U.errorRecoveryDisabledLanes|=S,ja|=S,_=4;break e}S=Hr,Hr=_,S!==null&&(Hr===null?Hr=S:Hr.push.apply(Hr,S))}_=N}if(S=!1,_!==2)continue}}if(_===1){Wl(i,0),Ns(i,a,0,!0);break}e:{switch(m=i,S=_,S){case 0:case 1:throw Error(r(345));case 4:if((a&4194048)!==a)break;case 6:Ns(m,a,io,!As);break e;case 2:Hr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((a&62914560)===a&&(_=gh+300-Z(),10<_)){if(Ns(m,a,io,!As),Ke(m,0,!0)!==0)break e;Zi=a,m.timeoutHandle=V2(h2.bind(null,m,u,Hr,_h,Z0,a,io,ja,Zl,As,S,"Throttled",-0,0),_);break e}h2(m,u,Hr,_h,Z0,a,io,ja,Zl,As,S,null,-0,0)}}break}while(!0);fi(i)}function h2(i,a,u,m,_,S,N,U,J,de,ye,Ee,he,ge){if(i.timeoutHandle=-1,Ee=a.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ni},i2(a,S,Ee);var Ve=(S&62914560)===S?gh-Z():(S&4194048)===S?c2-Z():0;if(Ve=Rj(Ee,Ve),Ve!==null){Zi=S,i.cancelPendingCommit=Ve(w2.bind(null,i,a,S,u,m,_,N,U,J,ye,Ee,null,he,ge)),Ns(i,S,N,!de);return}}w2(i,a,S,u,m,_,N,U,J)}function F$(i){for(var a=i;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var _=u[m],S=_.getSnapshot;_=_.value;try{if(!eo(S(),_))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===i)break;for(;a.sibling===null;){if(a.return===null||a.return===i)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ns(i,a,u,m){a&=~K0,a&=~ja,i.suspendedLanes|=a,i.pingedLanes&=~a,m&&(i.warmLanes|=a),m=i.expirationTimes;for(var _=a;0<_;){var S=31-Ln(_),N=1<<S;m[S]=-1,_&=~N}u!==0&&So(i,u,a)}function yh(){return(zt&6)===0?(ju(0),!1):!0}function X0(){if(wt!==null){if(Vt===0)var i=wt.return;else i=wt,$i=Aa=null,p0(i),zl=null,bu=0,i=wt;for(;i!==null;)HR(i.alternate,i),i=i.return;wt=null}}function Wl(i,a){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,aj(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),Zi=0,X0(),en=i,wt=u=Di(i.current,null),Rt=a,Vt=0,oo=null,As=!1,Kl=ft(i,a),G0=!1,Zl=io=K0=ja=Is=Rn=0,Hr=Lu=null,Z0=!1,(a&8)!==0&&(a|=a&32);var m=i.entangledLanes;if(m!==0)for(i=i.entanglements,m&=a;0<m;){var _=31-Ln(m),S=1<<_;a|=i[_],m&=~S}return Ki=a,zf(),u}function p2(i,a){at=null,q.H=Cu,a===Ul||a===Zf?(a=Ix(),Vt=3):a===n0?(a=Ix(),Vt=4):Vt=a===I0?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,oo=a,wt===null&&(Rn=1,lh(i,Oo(a,i.current)))}function m2(){var i=no.current;return i===null?!0:(Rt&4194048)===Rt?Io===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?i===Io:!1}function g2(){var i=q.H;return q.H=Cu,i===null?Cu:i}function v2(){var i=q.A;return q.A=U$,i}function bh(){Rn=4,As||(Rt&4194048)!==Rt&&no.current!==null||(Kl=!0),(Is&134217727)===0&&(ja&134217727)===0||en===null||Ns(en,Rt,io,!1)}function J0(i,a,u){var m=zt;zt|=2;var _=g2(),S=v2();(en!==i||Rt!==a)&&(_h=null,Wl(i,a)),a=!1;var N=Rn;e:do try{if(Vt!==0&&wt!==null){var U=wt,J=oo;switch(Vt){case 8:X0(),N=6;break e;case 3:case 2:case 9:case 6:no.current===null&&(a=!0);var de=Vt;if(Vt=0,oo=null,Ql(i,U,J,de),u&&Kl){N=0;break e}break;default:de=Vt,Vt=0,oo=null,Ql(i,U,J,de)}}B$(),N=Rn;break}catch(ye){p2(i,ye)}while(!0);return a&&i.shellSuspendCounter++,$i=Aa=null,zt=m,q.H=_,q.A=S,wt===null&&(en=null,Rt=0,zf()),N}function B$(){for(;wt!==null;)_2(wt)}function V$(i,a){var u=zt;zt|=2;var m=g2(),_=v2();en!==i||Rt!==a?(_h=null,vh=Z()+500,Wl(i,a)):Kl=ft(i,a);e:do try{if(Vt!==0&&wt!==null){a=wt;var S=oo;t:switch(Vt){case 1:Vt=0,oo=null,Ql(i,a,S,1);break;case 2:case 9:if(Cx(S)){Vt=0,oo=null,y2(a);break}a=function(){Vt!==2&&Vt!==9||en!==i||(Vt=7),fi(i)},S.then(a,a);break e;case 3:Vt=7;break e;case 4:Vt=5;break e;case 7:Cx(S)?(Vt=0,oo=null,y2(a)):(Vt=0,oo=null,Ql(i,a,S,7));break;case 5:var N=null;switch(wt.tag){case 26:N=wt.memoizedState;case 5:case 27:var U=wt;if(N?oO(N):U.stateNode.complete){Vt=0,oo=null;var J=U.sibling;if(J!==null)wt=J;else{var de=U.return;de!==null?(wt=de,wh(de)):wt=null}break t}}Vt=0,oo=null,Ql(i,a,S,5);break;case 6:Vt=0,oo=null,Ql(i,a,S,6);break;case 8:X0(),Rn=6;break e;default:throw Error(r(462))}}H$();break}catch(ye){p2(i,ye)}while(!0);return $i=Aa=null,q.H=m,q.A=_,zt=u,wt!==null?0:(en=null,Rt=0,zf(),Rn)}function H$(){for(;wt!==null&&!Me();)_2(wt)}function _2(i){var a=BR(i.alternate,i,Ki);i.memoizedProps=i.pendingProps,a===null?wh(i):wt=a}function y2(i){var a=i,u=a.alternate;switch(a.tag){case 15:case 0:a=LR(u,a,a.pendingProps,a.type,void 0,Rt);break;case 11:a=LR(u,a,a.pendingProps,a.type.render,a.ref,Rt);break;case 5:p0(a);default:HR(u,a),a=wt=vx(a,Ki),a=BR(u,a,Ki)}i.memoizedProps=i.pendingProps,a===null?wh(i):wt=a}function Ql(i,a,u,m){$i=Aa=null,p0(a),zl=null,bu=0;var _=a.return;try{if(P$(i,_,a,u,Rt)){Rn=1,lh(i,Oo(u,i.current)),wt=null;return}}catch(S){if(_!==null)throw wt=_,S;Rn=1,lh(i,Oo(u,i.current)),wt=null;return}a.flags&32768?(At||m===1?i=!0:Kl||(Rt&536870912)!==0?i=!1:(As=i=!0,(m===2||m===9||m===3||m===6)&&(m=no.current,m!==null&&m.tag===13&&(m.flags|=16384))),b2(a,i)):wh(a)}function wh(i){var a=i;do{if((a.flags&32768)!==0){b2(a,As);return}i=a.return;var u=D$(a.alternate,a,Ki);if(u!==null){wt=u;return}if(a=a.sibling,a!==null){wt=a;return}wt=a=i}while(a!==null);Rn===0&&(Rn=5)}function b2(i,a){do{var u=L$(i.alternate,i);if(u!==null){u.flags&=32767,wt=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(i=i.sibling,i!==null)){wt=i;return}wt=i=u}while(i!==null);Rn=6,wt=null}function w2(i,a,u,m,_,S,N,U,J){i.cancelPendingCommit=null;do Sh();while(qn!==0);if((zt&6)!==0)throw Error(r(327));if(a!==null){if(a===i.current)throw Error(r(177));if(S=a.lanes|a.childLanes,S|=Fv,sn(i,u,S,N,U,J),i===en&&(wt=en=null,Rt=0),Yl=a,Ps=i,Zi=u,Y0=S,W0=_,u2=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Z$(Ae,function(){return O2(),null})):(i.callbackNode=null,i.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=q.T,q.T=null,_=W.p,W.p=2,N=zt,zt|=4;try{$$(i,a,u)}finally{zt=N,W.p=_,q.T=m}}qn=1,S2(),E2(),x2()}}function S2(){if(qn===1){qn=0;var i=Ps,a=Yl,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=q.T,q.T=null;var m=W.p;W.p=2;var _=zt;zt|=4;try{n2(a,i);var S=d_,N=lx(i.containerInfo),U=S.focusedElem,J=S.selectionRange;if(N!==U&&U&&U.ownerDocument&&ax(U.ownerDocument.documentElement,U)){if(J!==null&&Lv(U)){var de=J.start,ye=J.end;if(ye===void 0&&(ye=de),"selectionStart"in U)U.selectionStart=de,U.selectionEnd=Math.min(ye,U.value.length);else{var Ee=U.ownerDocument||document,he=Ee&&Ee.defaultView||window;if(he.getSelection){var ge=he.getSelection(),Ve=U.textContent.length,nt=Math.min(J.start,Ve),Wt=J.end===void 0?nt:Math.min(J.end,Ve);!ge.extend&&nt>Wt&&(N=Wt,Wt=nt,nt=N);var ce=sx(U,nt),ie=sx(U,Wt);if(ce&&ie&&(ge.rangeCount!==1||ge.anchorNode!==ce.node||ge.anchorOffset!==ce.offset||ge.focusNode!==ie.node||ge.focusOffset!==ie.offset)){var ue=Ee.createRange();ue.setStart(ce.node,ce.offset),ge.removeAllRanges(),nt>Wt?(ge.addRange(ue),ge.extend(ie.node,ie.offset)):(ue.setEnd(ie.node,ie.offset),ge.addRange(ue))}}}}for(Ee=[],ge=U;ge=ge.parentNode;)ge.nodeType===1&&Ee.push({element:ge,left:ge.scrollLeft,top:ge.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<Ee.length;U++){var we=Ee[U];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}kh=!!u_,d_=u_=null}finally{zt=_,W.p=m,q.T=u}}i.current=a,qn=2}}function E2(){if(qn===2){qn=0;var i=Ps,a=Yl,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=q.T,q.T=null;var m=W.p;W.p=2;var _=zt;zt|=4;try{QR(i,a.alternate,a)}finally{zt=_,W.p=m,q.T=u}}qn=3}}function x2(){if(qn===4||qn===3){qn=0,ze();var i=Ps,a=Yl,u=Zi,m=u2;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?qn=5:(qn=0,Yl=Ps=null,R2(i,i.pendingLanes));var _=i.pendingLanes;if(_===0&&(Ms=null),Go(u),a=a.stateNode,Tt&&typeof Tt.onCommitFiberRoot=="function")try{Tt.onCommitFiberRoot(yt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=q.T,_=W.p,W.p=2,q.T=null;try{for(var S=i.onRecoverableError,N=0;N<m.length;N++){var U=m[N];S(U.value,{componentStack:U.stack})}}finally{q.T=a,W.p=_}}(Zi&3)!==0&&Sh(),fi(i),_=i.pendingLanes,(u&261930)!==0&&(_&42)!==0?i===Q0?$u++:($u=0,Q0=i):$u=0,ju(0)}}function R2(i,a){(i.pooledCacheLanes&=a)===0&&(a=i.pooledCache,a!=null&&(i.pooledCache=null,_u(a)))}function Sh(){return S2(),E2(),x2(),O2()}function O2(){if(qn!==5)return!1;var i=Ps,a=Y0;Y0=0;var u=Go(Zi),m=q.T,_=W.p;try{W.p=32>u?32:u,q.T=null,u=W0,W0=null;var S=Ps,N=Zi;if(qn=0,Yl=Ps=null,Zi=0,(zt&6)!==0)throw Error(r(331));var U=zt;if(zt|=4,a2(S.current),o2(S,S.current,N,u),zt=U,ju(0,!1),Tt&&typeof Tt.onPostCommitFiberRoot=="function")try{Tt.onPostCommitFiberRoot(yt,S)}catch{}return!0}finally{W.p=_,q.T=m,R2(i,a)}}function T2(i,a,u){a=Oo(u,a),a=A0(i.stateNode,a,2),i=Rs(i,a,2),i!==null&&(Lt(i,2),fi(i))}function Ht(i,a,u){if(i.tag===3)T2(i,i,u);else for(;a!==null;){if(a.tag===3){T2(a,i,u);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Ms===null||!Ms.has(m))){i=Oo(u,i),u=CR(2),m=Rs(a,u,2),m!==null&&(AR(u,m,a,i),Lt(m,2),fi(m));break}}a=a.return}}function e_(i,a,u){var m=i.pingCache;if(m===null){m=i.pingCache=new z$;var _=new Set;m.set(a,_)}else _=m.get(a),_===void 0&&(_=new Set,m.set(a,_));_.has(u)||(G0=!0,_.add(u),i=q$.bind(null,i,a,u),a.then(i,i))}function q$(i,a,u){var m=i.pingCache;m!==null&&m.delete(a),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,en===i&&(Rt&u)===u&&(Rn===4||Rn===3&&(Rt&62914560)===Rt&&300>Z()-gh?(zt&2)===0&&Wl(i,0):K0|=u,Zl===Rt&&(Zl=0)),fi(i)}function C2(i,a){a===0&&(a=Kt()),i=Oa(i,a),i!==null&&(Lt(i,a),fi(i))}function G$(i){var a=i.memoizedState,u=0;a!==null&&(u=a.retryLane),C2(i,u)}function K$(i,a){var u=0;switch(i.tag){case 31:case 13:var m=i.stateNode,_=i.memoizedState;_!==null&&(u=_.retryLane);break;case 19:m=i.stateNode;break;case 22:m=i.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(a),C2(i,u)}function Z$(i,a){return Qe(i,a)}var Eh=null,Xl=null,t_=!1,xh=!1,n_=!1,ks=0;function fi(i){i!==Xl&&i.next===null&&(Xl===null?Eh=Xl=i:Xl=Xl.next=i),xh=!0,t_||(t_=!0,W$())}function ju(i,a){if(!n_&&xh){n_=!0;do for(var u=!1,m=Eh;m!==null;){if(i!==0){var _=m.pendingLanes;if(_===0)var S=0;else{var N=m.suspendedLanes,U=m.pingedLanes;S=(1<<31-Ln(42|i)+1)-1,S&=_&~(N&~U),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(u=!0,P2(m,S))}else S=Rt,S=Ke(m,m===en?S:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(S&3)===0||ft(m,S)||(u=!0,P2(m,S));m=m.next}while(u);n_=!1}}function Y$(){A2()}function A2(){xh=t_=!1;var i=0;ks!==0&&sj()&&(i=ks);for(var a=Z(),u=null,m=Eh;m!==null;){var _=m.next,S=I2(m,a);S===0?(m.next=null,u===null?Eh=_:u.next=_,_===null&&(Xl=u)):(u=m,(i!==0||(S&3)!==0)&&(xh=!0)),m=_}qn!==0&&qn!==5||ju(i),ks!==0&&(ks=0)}function I2(i,a){for(var u=i.suspendedLanes,m=i.pingedLanes,_=i.expirationTimes,S=i.pendingLanes&-62914561;0<S;){var N=31-Ln(S),U=1<<N,J=_[N];J===-1?((U&u)===0||(U&m)!==0)&&(_[N]=Jt(U,a)):J<=a&&(i.expiredLanes|=U),S&=~U}if(a=en,u=Rt,u=Ke(i,i===a?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m=i.callbackNode,u===0||i===a&&(Vt===2||Vt===9)||i.cancelPendingCommit!==null)return m!==null&&m!==null&&Pe(m),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||ft(i,u)){if(a=u&-u,a===i.callbackPriority)return a;switch(m!==null&&Pe(m),Go(u)){case 2:case 8:u=Re;break;case 32:u=Ae;break;case 268435456:u=ke;break;default:u=Ae}return m=M2.bind(null,i),u=Qe(u,m),i.callbackPriority=a,i.callbackNode=u,a}return m!==null&&m!==null&&Pe(m),i.callbackPriority=2,i.callbackNode=null,2}function M2(i,a){if(qn!==0&&qn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(Sh()&&i.callbackNode!==u)return null;var m=Rt;return m=Ke(i,i===en?m:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m===0?null:(f2(i,m,a),I2(i,Z()),i.callbackNode!=null&&i.callbackNode===u?M2.bind(null,i):null)}function P2(i,a){if(Sh())return null;f2(i,a,!0)}function W$(){lj(function(){(zt&6)!==0?Qe(ae,Y$):A2()})}function r_(){if(ks===0){var i=$l;i===0&&(i=pt,pt<<=1,(pt&261888)===0&&(pt=256)),ks=i}return ks}function N2(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Pf(""+i)}function k2(i,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,i.id&&u.setAttribute("form",i.id),a.parentNode.insertBefore(u,a),i=new FormData(i),u.parentNode.removeChild(u),i}function Q$(i,a,u,m,_){if(a==="submit"&&u&&u.stateNode===_){var S=N2((_[Ur]||null).action),N=m.submitter;N&&(a=(a=N[Ur]||null)?N2(a.formAction):N.getAttribute("formAction"),a!==null&&(S=a,N=null));var U=new Lf("action","action",null,m,_);i.push({event:U,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ks!==0){var J=N?k2(_,N):new FormData(_);E0(u,{pending:!0,data:J,method:_.method,action:S},null,J)}}else typeof S=="function"&&(U.preventDefault(),J=N?k2(_,N):new FormData(_),E0(u,{pending:!0,data:J,method:_.method,action:S},S,J))},currentTarget:_}]})}}for(var o_=0;o_<zv.length;o_++){var i_=zv[o_],X$=i_.toLowerCase(),J$=i_[0].toUpperCase()+i_.slice(1);Ko(X$,"on"+J$)}Ko(dx,"onAnimationEnd"),Ko(fx,"onAnimationIteration"),Ko(hx,"onAnimationStart"),Ko("dblclick","onDoubleClick"),Ko("focusin","onFocus"),Ko("focusout","onBlur"),Ko(m$,"onTransitionRun"),Ko(g$,"onTransitionStart"),Ko(v$,"onTransitionCancel"),Ko(px,"onTransitionEnd"),El("onMouseEnter",["mouseout","mouseover"]),El("onMouseLeave",["mouseout","mouseover"]),El("onPointerEnter",["pointerout","pointerover"]),El("onPointerLeave",["pointerout","pointerover"]),Sa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Sa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Sa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Sa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Sa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Sa("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(" "),ej=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uu));function D2(i,a){a=(a&4)!==0;for(var u=0;u<i.length;u++){var m=i[u],_=m.event;m=m.listeners;e:{var S=void 0;if(a)for(var N=m.length-1;0<=N;N--){var U=m[N],J=U.instance,de=U.currentTarget;if(U=U.listener,J!==S&&_.isPropagationStopped())break e;S=U,_.currentTarget=de;try{S(_)}catch(ye){Uf(ye)}_.currentTarget=null,S=J}else for(N=0;N<m.length;N++){if(U=m[N],J=U.instance,de=U.currentTarget,U=U.listener,J!==S&&_.isPropagationStopped())break e;S=U,_.currentTarget=de;try{S(_)}catch(ye){Uf(ye)}_.currentTarget=null,S=J}}}}function St(i,a){var u=a[_v];u===void 0&&(u=a[_v]=new Set);var m=i+"__bubble";u.has(m)||(L2(a,i,2,!1),u.add(m))}function s_(i,a,u){var m=0;a&&(m|=4),L2(u,i,m,a)}var Rh="_reactListening"+Math.random().toString(36).slice(2);function a_(i){if(!i[Rh]){i[Rh]=!0,AE.forEach(function(u){u!=="selectionchange"&&(ej.has(u)||s_(u,!1,i),s_(u,!0,i))});var a=i.nodeType===9?i:i.ownerDocument;a===null||a[Rh]||(a[Rh]=!0,s_("selectionchange",!1,a))}}function L2(i,a,u,m){switch(dO(a)){case 2:var _=Cj;break;case 8:_=Aj;break;default:_=S_}u=_.bind(null,a,u,i),_=void 0,!Tv||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(_=!0),m?_!==void 0?i.addEventListener(a,u,{capture:!0,passive:_}):i.addEventListener(a,u,!0):_!==void 0?i.addEventListener(a,u,{passive:_}):i.addEventListener(a,u,!1)}function l_(i,a,u,m,_){var S=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var N=m.tag;if(N===3||N===4){var U=m.stateNode.containerInfo;if(U===_)break;if(N===4)for(N=m.return;N!==null;){var J=N.tag;if((J===3||J===4)&&N.stateNode.containerInfo===_)return;N=N.return}for(;U!==null;){if(N=bl(U),N===null)return;if(J=N.tag,J===5||J===6||J===26||J===27){m=S=N;continue e}U=U.parentNode}}m=m.return}FE(function(){var de=S,ye=Rv(u),Ee=[];e:{var he=mx.get(i);if(he!==void 0){var ge=Lf,Ve=i;switch(i){case"keypress":if(kf(u)===0)break e;case"keydown":case"keyup":ge=KL;break;case"focusin":Ve="focus",ge=Mv;break;case"focusout":Ve="blur",ge=Mv;break;case"beforeblur":case"afterblur":ge=Mv;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=HE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=DL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=WL;break;case dx:case fx:case hx:ge=jL;break;case px:ge=XL;break;case"scroll":case"scrollend":ge=NL;break;case"wheel":ge=e$;break;case"copy":case"cut":case"paste":ge=zL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=GE;break;case"toggle":case"beforetoggle":ge=n$}var nt=(a&4)!==0,Wt=!nt&&(i==="scroll"||i==="scrollend"),ce=nt?he!==null?he+"Capture":null:he;nt=[];for(var ie=de,ue;ie!==null;){var we=ie;if(ue=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||ue===null||ce===null||(we=au(ie,ce),we!=null&&nt.push(zu(ie,we,ue))),Wt)break;ie=ie.return}0<nt.length&&(he=new ge(he,Ve,null,u,ye),Ee.push({event:he,listeners:nt}))}}if((a&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",ge=i==="mouseout"||i==="pointerout",he&&u!==xv&&(Ve=u.relatedTarget||u.fromElement)&&(bl(Ve)||Ve[yl]))break e;if((ge||he)&&(he=ye.window===ye?ye:(he=ye.ownerDocument)?he.defaultView||he.parentWindow:window,ge?(Ve=u.relatedTarget||u.toElement,ge=de,Ve=Ve?bl(Ve):null,Ve!==null&&(Wt=s(Ve),nt=Ve.tag,Ve!==Wt||nt!==5&&nt!==27&&nt!==6)&&(Ve=null)):(ge=null,Ve=de),ge!==Ve)){if(nt=HE,we="onMouseLeave",ce="onMouseEnter",ie="mouse",(i==="pointerout"||i==="pointerover")&&(nt=GE,we="onPointerLeave",ce="onPointerEnter",ie="pointer"),Wt=ge==null?he:su(ge),ue=Ve==null?he:su(Ve),he=new nt(we,ie+"leave",ge,u,ye),he.target=Wt,he.relatedTarget=ue,we=null,bl(ye)===de&&(nt=new nt(ce,ie+"enter",Ve,u,ye),nt.target=ue,nt.relatedTarget=Wt,we=nt),Wt=we,ge&&Ve)t:{for(nt=tj,ce=ge,ie=Ve,ue=0,we=ce;we;we=nt(we))ue++;we=0;for(var Xe=ie;Xe;Xe=nt(Xe))we++;for(;0<ue-we;)ce=nt(ce),ue--;for(;0<we-ue;)ie=nt(ie),we--;for(;ue--;){if(ce===ie||ie!==null&&ce===ie.alternate){nt=ce;break t}ce=nt(ce),ie=nt(ie)}nt=null}else nt=null;ge!==null&&$2(Ee,he,ge,nt,!1),Ve!==null&&Wt!==null&&$2(Ee,Wt,Ve,nt,!0)}}e:{if(he=de?su(de):window,ge=he.nodeName&&he.nodeName.toLowerCase(),ge==="select"||ge==="input"&&he.type==="file")var $t=ex;else if(XE(he))if(tx)$t=f$;else{$t=u$;var Ze=c$}else ge=he.nodeName,!ge||ge.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?de&&Ev(de.elementType)&&($t=ex):$t=d$;if($t&&($t=$t(i,de))){JE(Ee,$t,u,ye);break e}Ze&&Ze(i,he,de),i==="focusout"&&de&&he.type==="number"&&de.memoizedProps.value!=null&&Sv(he,"number",he.value)}switch(Ze=de?su(de):window,i){case"focusin":(XE(Ze)||Ze.contentEditable==="true")&&(Al=Ze,$v=de,mu=null);break;case"focusout":mu=$v=Al=null;break;case"mousedown":jv=!0;break;case"contextmenu":case"mouseup":case"dragend":jv=!1,cx(Ee,u,ye);break;case"selectionchange":if(p$)break;case"keydown":case"keyup":cx(Ee,u,ye)}var ct;if(Nv)e:{switch(i){case"compositionstart":var Ot="onCompositionStart";break e;case"compositionend":Ot="onCompositionEnd";break e;case"compositionupdate":Ot="onCompositionUpdate";break e}Ot=void 0}else Cl?WE(i,u)&&(Ot="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Ot="onCompositionStart");Ot&&(KE&&u.locale!=="ko"&&(Cl||Ot!=="onCompositionStart"?Ot==="onCompositionEnd"&&Cl&&(ct=BE()):(_s=ye,Cv="value"in _s?_s.value:_s.textContent,Cl=!0)),Ze=Oh(de,Ot),0<Ze.length&&(Ot=new qE(Ot,i,null,u,ye),Ee.push({event:Ot,listeners:Ze}),ct?Ot.data=ct:(ct=QE(u),ct!==null&&(Ot.data=ct)))),(ct=o$?i$(i,u):s$(i,u))&&(Ot=Oh(de,"onBeforeInput"),0<Ot.length&&(Ze=new qE("onBeforeInput","beforeinput",null,u,ye),Ee.push({event:Ze,listeners:Ot}),Ze.data=ct)),Q$(Ee,i,de,u,ye)}D2(Ee,a)})}function zu(i,a,u){return{instance:i,listener:a,currentTarget:u}}function Oh(i,a){for(var u=a+"Capture",m=[];i!==null;){var _=i,S=_.stateNode;if(_=_.tag,_!==5&&_!==26&&_!==27||S===null||(_=au(i,u),_!=null&&m.unshift(zu(i,_,S)),_=au(i,a),_!=null&&m.push(zu(i,_,S))),i.tag===3)return m;i=i.return}return[]}function tj(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function $2(i,a,u,m,_){for(var S=a._reactName,N=[];u!==null&&u!==m;){var U=u,J=U.alternate,de=U.stateNode;if(U=U.tag,J!==null&&J===m)break;U!==5&&U!==26&&U!==27||de===null||(J=de,_?(de=au(u,S),de!=null&&N.unshift(zu(u,de,J))):_||(de=au(u,S),de!=null&&N.push(zu(u,de,J)))),u=u.return}N.length!==0&&i.push({event:a,listeners:N})}var nj=/\r\n?/g,rj=/\u0000|\uFFFD/g;function j2(i){return(typeof i=="string"?i:""+i).replace(nj,`
10
- `).replace(rj,"")}function U2(i,a){return a=j2(a),j2(i)===a}function Yt(i,a,u,m,_,S){switch(u){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Rl(i,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Rl(i,""+m);break;case"className":If(i,"class",m);break;case"tabIndex":If(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":If(i,u,m);break;case"style":UE(i,m,S);break;case"data":if(a!=="object"){If(i,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=Pf(""+m),i.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(u,"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 S=="function"&&(u==="formAction"?(a!=="input"&&Yt(i,a,"name",_.name,_,null),Yt(i,a,"formEncType",_.formEncType,_,null),Yt(i,a,"formMethod",_.formMethod,_,null),Yt(i,a,"formTarget",_.formTarget,_,null)):(Yt(i,a,"encType",_.encType,_,null),Yt(i,a,"method",_.method,_,null),Yt(i,a,"target",_.target,_,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=Pf(""+m),i.setAttribute(u,m);break;case"onClick":m!=null&&(i.onclick=Ni);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(_.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}u=Pf(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""+m):i.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":m===!0?i.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,m):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(u,m):i.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(u):i.setAttribute(u,m);break;case"popover":St("beforetoggle",i),St("toggle",i),Af(i,"popover",m);break;case"xlinkActuate":Pi(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Pi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Pi(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Pi(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Pi(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Pi(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Pi(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Pi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Pi(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Af(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=ML.get(u)||u,Af(i,u,m))}}function c_(i,a,u,m,_,S){switch(u){case"style":UE(i,m,S);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(_.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof m=="string"?Rl(i,m):(typeof m=="number"||typeof m=="bigint")&&Rl(i,""+m);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"onClick":m!=null&&(i.onclick=Ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!IE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(_=u.endsWith("Capture"),a=u.slice(2,_?u.length-7:void 0),S=i[Ur]||null,S=S!=null?S[u]:null,typeof S=="function"&&i.removeEventListener(a,S,_),typeof m=="function")){typeof S!="function"&&S!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,m,_);break e}u in i?i[u]=m:m===!0?i.setAttribute(u,""):Af(i,u,m)}}}function dr(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",i),St("load",i);var m=!1,_=!1,S;for(S in u)if(u.hasOwnProperty(S)){var N=u[S];if(N!=null)switch(S){case"src":m=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Yt(i,a,S,N,u,null)}}_&&Yt(i,a,"srcSet",u.srcSet,u,null),m&&Yt(i,a,"src",u.src,u,null);return;case"input":St("invalid",i);var U=S=N=_=null,J=null,de=null;for(m in u)if(u.hasOwnProperty(m)){var ye=u[m];if(ye!=null)switch(m){case"name":_=ye;break;case"type":N=ye;break;case"checked":J=ye;break;case"defaultChecked":de=ye;break;case"value":S=ye;break;case"defaultValue":U=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,a));break;default:Yt(i,a,m,ye,u,null)}}DE(i,S,U,J,de,N,_,!1);return;case"select":St("invalid",i),m=N=S=null;for(_ in u)if(u.hasOwnProperty(_)&&(U=u[_],U!=null))switch(_){case"value":S=U;break;case"defaultValue":N=U;break;case"multiple":m=U;default:Yt(i,a,_,U,u,null)}a=S,u=N,i.multiple=!!m,a!=null?xl(i,!!m,a,!1):u!=null&&xl(i,!!m,u,!0);return;case"textarea":St("invalid",i),S=_=m=null;for(N in u)if(u.hasOwnProperty(N)&&(U=u[N],U!=null))switch(N){case"value":m=U;break;case"defaultValue":_=U;break;case"children":S=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(91));break;default:Yt(i,a,N,U,u,null)}$E(i,m,_,S);return;case"option":for(J in u)u.hasOwnProperty(J)&&(m=u[J],m!=null)&&(J==="selected"?i.selected=m&&typeof m!="function"&&typeof m!="symbol":Yt(i,a,J,m,u,null));return;case"dialog":St("beforetoggle",i),St("toggle",i),St("cancel",i),St("close",i);break;case"iframe":case"object":St("load",i);break;case"video":case"audio":for(m=0;m<Uu.length;m++)St(Uu[m],i);break;case"image":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"embed":case"source":case"link":St("error",i),St("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(m=u[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Yt(i,a,de,m,u,null)}return;default:if(Ev(a)){for(ye in u)u.hasOwnProperty(ye)&&(m=u[ye],m!==void 0&&c_(i,a,ye,m,u,void 0));return}}for(U in u)u.hasOwnProperty(U)&&(m=u[U],m!=null&&Yt(i,a,U,m,u,null))}function oj(i,a,u,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,S=null,N=null,U=null,J=null,de=null,ye=null;for(ge in u){var Ee=u[ge];if(u.hasOwnProperty(ge)&&Ee!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":J=Ee;default:m.hasOwnProperty(ge)||Yt(i,a,ge,null,m,Ee)}}for(var he in m){var ge=m[he];if(Ee=u[he],m.hasOwnProperty(he)&&(ge!=null||Ee!=null))switch(he){case"type":S=ge;break;case"name":_=ge;break;case"checked":de=ge;break;case"defaultChecked":ye=ge;break;case"value":N=ge;break;case"defaultValue":U=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,a));break;default:ge!==Ee&&Yt(i,a,he,ge,m,Ee)}}wv(i,N,U,J,de,ye,S,_);return;case"select":ge=N=U=he=null;for(S in u)if(J=u[S],u.hasOwnProperty(S)&&J!=null)switch(S){case"value":break;case"multiple":ge=J;default:m.hasOwnProperty(S)||Yt(i,a,S,null,m,J)}for(_ in m)if(S=m[_],J=u[_],m.hasOwnProperty(_)&&(S!=null||J!=null))switch(_){case"value":he=S;break;case"defaultValue":U=S;break;case"multiple":N=S;default:S!==J&&Yt(i,a,_,S,m,J)}a=U,u=N,m=ge,he!=null?xl(i,!!u,he,!1):!!m!=!!u&&(a!=null?xl(i,!!u,a,!0):xl(i,!!u,u?[]:"",!1));return;case"textarea":ge=he=null;for(U in u)if(_=u[U],u.hasOwnProperty(U)&&_!=null&&!m.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:Yt(i,a,U,null,m,_)}for(N in m)if(_=m[N],S=u[N],m.hasOwnProperty(N)&&(_!=null||S!=null))switch(N){case"value":he=_;break;case"defaultValue":ge=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:_!==S&&Yt(i,a,N,_,m,S)}LE(i,he,ge);return;case"option":for(var Ve in u)he=u[Ve],u.hasOwnProperty(Ve)&&he!=null&&!m.hasOwnProperty(Ve)&&(Ve==="selected"?i.selected=!1:Yt(i,a,Ve,null,m,he));for(J in m)he=m[J],ge=u[J],m.hasOwnProperty(J)&&he!==ge&&(he!=null||ge!=null)&&(J==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":Yt(i,a,J,he,m,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 nt in u)he=u[nt],u.hasOwnProperty(nt)&&he!=null&&!m.hasOwnProperty(nt)&&Yt(i,a,nt,null,m,he);for(de in m)if(he=m[de],ge=u[de],m.hasOwnProperty(de)&&he!==ge&&(he!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,a));break;default:Yt(i,a,de,he,m,ge)}return;default:if(Ev(a)){for(var Wt in u)he=u[Wt],u.hasOwnProperty(Wt)&&he!==void 0&&!m.hasOwnProperty(Wt)&&c_(i,a,Wt,void 0,m,he);for(ye in m)he=m[ye],ge=u[ye],!m.hasOwnProperty(ye)||he===ge||he===void 0&&ge===void 0||c_(i,a,ye,he,m,ge);return}}for(var ce in u)he=u[ce],u.hasOwnProperty(ce)&&he!=null&&!m.hasOwnProperty(ce)&&Yt(i,a,ce,null,m,he);for(Ee in m)he=m[Ee],ge=u[Ee],!m.hasOwnProperty(Ee)||he===ge||he==null&&ge==null||Yt(i,a,Ee,he,m,ge)}function z2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ij(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var _=u[m],S=_.transferSize,N=_.initiatorType,U=_.duration;if(S&&U&&z2(N)){for(N=0,U=_.responseEnd,m+=1;m<u.length;m++){var J=u[m],de=J.startTime;if(de>U)break;var ye=J.transferSize,Ee=J.initiatorType;ye&&z2(Ee)&&(J=J.responseEnd,N+=ye*(J<U?1:(U-de)/(J-de)))}if(--m,a+=8*(S+N)/(_.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var u_=null,d_=null;function Th(i){return i.nodeType===9?i:i.ownerDocument}function F2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function B2(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function f_(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var h_=null;function sj(){var i=window.event;return i&&i.type==="popstate"?i===h_?!1:(h_=i,!0):(h_=null,!1)}var V2=typeof setTimeout=="function"?setTimeout:void 0,aj=typeof clearTimeout=="function"?clearTimeout:void 0,H2=typeof Promise=="function"?Promise:void 0,lj=typeof queueMicrotask=="function"?queueMicrotask:typeof H2<"u"?function(i){return H2.resolve(null).then(i).catch(cj)}:V2;function cj(i){setTimeout(function(){throw i})}function Ds(i){return i==="head"}function q2(i,a){var u=a,m=0;do{var _=u.nextSibling;if(i.removeChild(u),_&&_.nodeType===8)if(u=_.data,u==="/$"||u==="/&"){if(m===0){i.removeChild(_),nc(a);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Fu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Fu(u);for(var S=u.firstChild;S;){var N=S.nextSibling,U=S.nodeName;S[iu]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&S.rel.toLowerCase()==="stylesheet"||u.removeChild(S),S=N}}else u==="body"&&Fu(i.ownerDocument.body);u=_}while(u);nc(a)}function G2(i,a){var u=i;i=0;do{var m=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=m}while(u)}function p_(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":p_(u),yv(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function uj(i,a,u,m){for(;i.nodeType===1;){var _=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[iu])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(S=i.getAttribute("rel"),S==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(S!==_.rel||i.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||i.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||i.getAttribute("title")!==(_.title==null?null:_.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(S=i.getAttribute("src"),(S!==(_.src==null?null:_.src)||i.getAttribute("type")!==(_.type==null?null:_.type)||i.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&S&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var S=_.name==null?null:""+_.name;if(_.type==="hidden"&&i.getAttribute("name")===S)return i}else return i;if(i=Mo(i.nextSibling),i===null)break}return null}function dj(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Mo(i.nextSibling),i===null))return null;return i}function K2(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Mo(i.nextSibling),i===null))return null;return i}function m_(i){return i.data==="$?"||i.data==="$~"}function g_(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function fj(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var m=function(){a(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function Mo(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var v_=null;function Z2(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return Mo(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function Y2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function W2(i,a,u){switch(a=Th(u),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Fu(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);yv(i)}var Po=new Map,Q2=new Set;function Ch(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Yi=W.d;W.d={f:hj,r:pj,D:mj,C:gj,L:vj,m:_j,X:bj,S:yj,M:wj};function hj(){var i=Yi.f(),a=yh();return i||a}function pj(i){var a=wl(i);a!==null&&a.tag===5&&a.type==="form"?pR(a):Yi.r(i)}var Jl=typeof document>"u"?null:document;function X2(i,a,u){var m=Jl;if(m&&typeof a=="string"&&a){var _=xo(a);_='link[rel="'+i+'"][href="'+_+'"]',typeof u=="string"&&(_+='[crossorigin="'+u+'"]'),Q2.has(_)||(Q2.add(_),i={rel:i,crossOrigin:u,href:a},m.querySelector(_)===null&&(a=m.createElement("link"),dr(a,"link",i),er(a),m.head.appendChild(a)))}}function mj(i){Yi.D(i),X2("dns-prefetch",i,null)}function gj(i,a){Yi.C(i,a),X2("preconnect",i,a)}function vj(i,a,u){Yi.L(i,a,u);var m=Jl;if(m&&i&&a){var _='link[rel="preload"][as="'+xo(a)+'"]';a==="image"&&u&&u.imageSrcSet?(_+='[imagesrcset="'+xo(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(_+='[imagesizes="'+xo(u.imageSizes)+'"]')):_+='[href="'+xo(i)+'"]';var S=_;switch(a){case"style":S=ec(i);break;case"script":S=tc(i)}Po.has(S)||(i=h({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Po.set(S,i),m.querySelector(_)!==null||a==="style"&&m.querySelector(Bu(S))||a==="script"&&m.querySelector(Vu(S))||(a=m.createElement("link"),dr(a,"link",i),er(a),m.head.appendChild(a)))}}function _j(i,a){Yi.m(i,a);var u=Jl;if(u&&i){var m=a&&typeof a.as=="string"?a.as:"script",_='link[rel="modulepreload"][as="'+xo(m)+'"][href="'+xo(i)+'"]',S=_;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=tc(i)}if(!Po.has(S)&&(i=h({rel:"modulepreload",href:i},a),Po.set(S,i),u.querySelector(_)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Vu(S)))return}m=u.createElement("link"),dr(m,"link",i),er(m),u.head.appendChild(m)}}}function yj(i,a,u){Yi.S(i,a,u);var m=Jl;if(m&&i){var _=Sl(m).hoistableStyles,S=ec(i);a=a||"default";var N=_.get(S);if(!N){var U={loading:0,preload:null};if(N=m.querySelector(Bu(S)))U.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Po.get(S))&&__(i,u);var J=N=m.createElement("link");er(J),dr(J,"link",i),J._p=new Promise(function(de,ye){J.onload=de,J.onerror=ye}),J.addEventListener("load",function(){U.loading|=1}),J.addEventListener("error",function(){U.loading|=2}),U.loading|=4,Ah(N,a,m)}N={type:"stylesheet",instance:N,count:1,state:U},_.set(S,N)}}}function bj(i,a){Yi.X(i,a);var u=Jl;if(u&&i){var m=Sl(u).hoistableScripts,_=tc(i),S=m.get(_);S||(S=u.querySelector(Vu(_)),S||(i=h({src:i,async:!0},a),(a=Po.get(_))&&y_(i,a),S=u.createElement("script"),er(S),dr(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(_,S))}}function wj(i,a){Yi.M(i,a);var u=Jl;if(u&&i){var m=Sl(u).hoistableScripts,_=tc(i),S=m.get(_);S||(S=u.querySelector(Vu(_)),S||(i=h({src:i,async:!0,type:"module"},a),(a=Po.get(_))&&y_(i,a),S=u.createElement("script"),er(S),dr(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(_,S))}}function J2(i,a,u,m){var _=(_=X.current)?Ch(_):null;if(!_)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=ec(u.href),u=Sl(_).hoistableStyles,m=u.get(a),m||(m={type:"style",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=ec(u.href);var S=Sl(_).hoistableStyles,N=S.get(i);if(N||(_=_.ownerDocument||_,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(i,N),(S=_.querySelector(Bu(i)))&&!S._p&&(N.instance=S,N.state.loading=5),Po.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Po.set(i,u),S||Sj(_,i,u,N.state))),a&&m===null)throw Error(r(528,""));return N}if(a&&m!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=tc(u),u=Sl(_).hoistableScripts,m=u.get(a),m||(m={type:"script",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ec(i){return'href="'+xo(i)+'"'}function Bu(i){return'link[rel="stylesheet"]['+i+"]"}function eO(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function Sj(i,a,u,m){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=i.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),dr(a,"link",u),er(a),i.head.appendChild(a))}function tc(i){return'[src="'+xo(i)+'"]'}function Vu(i){return"script[async]"+i}function tO(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var m=i.querySelector('style[data-href~="'+xo(u.href)+'"]');if(m)return a.instance=m,er(m),m;var _=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),er(m),dr(m,"style",_),Ah(m,u.precedence,i),a.instance=m;case"stylesheet":_=ec(u.href);var S=i.querySelector(Bu(_));if(S)return a.state.loading|=4,a.instance=S,er(S),S;m=eO(u),(_=Po.get(_))&&__(m,_),S=(i.ownerDocument||i).createElement("link"),er(S);var N=S;return N._p=new Promise(function(U,J){N.onload=U,N.onerror=J}),dr(S,"link",m),a.state.loading|=4,Ah(S,u.precedence,i),a.instance=S;case"script":return S=tc(u.src),(_=i.querySelector(Vu(S)))?(a.instance=_,er(_),_):(m=u,(_=Po.get(S))&&(m=h({},u),y_(m,_)),i=i.ownerDocument||i,_=i.createElement("script"),er(_),dr(_,"link",m),i.head.appendChild(_),a.instance=_);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Ah(m,u.precedence,i));return a.instance}function Ah(i,a,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=m.length?m[m.length-1]:null,S=_,N=0;N<m.length;N++){var U=m[N];if(U.dataset.precedence===a)S=U;else if(S!==_)break}S?S.parentNode.insertBefore(i,S.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function __(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function y_(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var Ih=null;function nO(i,a,u){if(Ih===null){var m=new Map,_=Ih=new Map;_.set(u,m)}else _=Ih,m=_.get(u),m||(m=new Map,_.set(u,m));if(m.has(i))return m;for(m.set(i,null),u=u.getElementsByTagName(i),_=0;_<u.length;_++){var S=u[_];if(!(S[iu]||S[ar]||i==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var N=S.getAttribute(a)||"";N=i+N;var U=m.get(N);U?U.push(S):m.set(N,[S])}}return m}function rO(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function Ej(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(i=a.disabled,typeof a.precedence=="string"&&i==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function oO(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function xj(i,a,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var _=ec(m.href),S=a.querySelector(Bu(_));if(S){a=S._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=Mh.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=S,er(S);return}S=a.ownerDocument||a,m=eO(m),(_=Po.get(_))&&__(m,_),S=S.createElement("link"),er(S);var N=S;N._p=new Promise(function(U,J){N.onload=U,N.onerror=J}),dr(S,"link",m),u.instance=S}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Mh.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var b_=0;function Rj(i,a){return i.stylesheets&&i.count===0&&Nh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var m=setTimeout(function(){if(i.stylesheets&&Nh(i,i.stylesheets),i.unsuspend){var S=i.unsuspend;i.unsuspend=null,S()}},6e4+a);0<i.imgBytes&&b_===0&&(b_=62500*ij());var _=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Nh(i,i.stylesheets),i.unsuspend)){var S=i.unsuspend;i.unsuspend=null,S()}},(i.imgBytes>b_?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(_)}}:null}function Mh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Ph=null;function Nh(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Ph=new Map,a.forEach(Oj,i),Ph=null,Mh.call(i))}function Oj(i,a){if(!(a.state.loading&4)){var u=Ph.get(i);if(u)var m=u.get(null);else{u=new Map,Ph.set(i,u);for(var _=i.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<_.length;S++){var N=_[S];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(u.set(N.dataset.precedence,N),m=N)}m&&u.set(null,m)}_=a.instance,N=_.getAttribute("data-precedence"),S=u.get(N)||m,S===m&&u.set(null,_),u.set(N,_),this.count++,m=Mh.bind(this),_.addEventListener("load",m),_.addEventListener("error",m),S?S.parentNode.insertBefore(_,S.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(_,i.firstChild)),a.state.loading|=4}}var Hu={$$typeof:T,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Tj(i,a,u,m,_,S,N,U,J){this.tag=1,this.containerInfo=i,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=wr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wr(0),this.hiddenUpdates=wr(null),this.identifierPrefix=m,this.onUncaughtError=_,this.onCaughtError=S,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function iO(i,a,u,m,_,S,N,U,J,de,ye,Ee){return i=new Tj(i,a,u,N,J,de,ye,Ee,U),a=1,S===!0&&(a|=24),S=to(3,null,null,a),i.current=S,S.stateNode=i,a=Jv(),a.refCount++,i.pooledCache=a,a.refCount++,S.memoizedState={element:m,isDehydrated:u,cache:a},r0(S),i}function sO(i){return i?(i=Pl,i):Pl}function aO(i,a,u,m,_,S){_=sO(_),m.context===null?m.context=_:m.pendingContext=_,m=xs(a),m.payload={element:u},S=S===void 0?null:S,S!==null&&(m.callback=S),u=Rs(i,m,a),u!==null&&(qr(u,i,a),Su(u,i,a))}function lO(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function w_(i,a){lO(i,a),(i=i.alternate)&&lO(i,a)}function cO(i){if(i.tag===13||i.tag===31){var a=Oa(i,67108864);a!==null&&qr(a,i,67108864),w_(i,67108864)}}function uO(i){if(i.tag===13||i.tag===31){var a=so();a=_l(a);var u=Oa(i,a);u!==null&&qr(u,i,a),w_(i,a)}}var kh=!0;function Cj(i,a,u,m){var _=q.T;q.T=null;var S=W.p;try{W.p=2,S_(i,a,u,m)}finally{W.p=S,q.T=_}}function Aj(i,a,u,m){var _=q.T;q.T=null;var S=W.p;try{W.p=8,S_(i,a,u,m)}finally{W.p=S,q.T=_}}function S_(i,a,u,m){if(kh){var _=E_(m);if(_===null)l_(i,a,m,Dh,u),fO(i,m);else if(Mj(_,i,a,u,m))m.stopPropagation();else if(fO(i,m),a&4&&-1<Ij.indexOf(i)){for(;_!==null;){var S=wl(_);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var N=Dt(S.pendingLanes);if(N!==0){var U=S;for(U.pendingLanes|=2,U.entangledLanes|=2;N;){var J=1<<31-Ln(N);U.entanglements[1]|=J,N&=~J}fi(S),(zt&6)===0&&(vh=Z()+500,ju(0))}}break;case 31:case 13:U=Oa(S,2),U!==null&&qr(U,S,2),yh(),w_(S,2)}if(S=E_(m),S===null&&l_(i,a,m,Dh,u),S===_)break;_=S}_!==null&&m.stopPropagation()}else l_(i,a,m,null,u)}}function E_(i){return i=Rv(i),x_(i)}var Dh=null;function x_(i){if(Dh=null,i=bl(i),i!==null){var a=s(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Dh=i,null}function dO(i){switch(i){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(ne()){case ae:return 2;case Re:return 8;case Ae:case Ie:return 32;case ke:return 268435456;default:return 32}default:return 32}}var R_=!1,Ls=null,$s=null,js=null,qu=new Map,Gu=new Map,Us=[],Ij="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 fO(i,a){switch(i){case"focusin":case"focusout":Ls=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":qu.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gu.delete(a.pointerId)}}function Ku(i,a,u,m,_,S){return i===null||i.nativeEvent!==S?(i={blockedOn:a,domEventName:u,eventSystemFlags:m,nativeEvent:S,targetContainers:[_]},a!==null&&(a=wl(a),a!==null&&cO(a)),i):(i.eventSystemFlags|=m,a=i.targetContainers,_!==null&&a.indexOf(_)===-1&&a.push(_),i)}function Mj(i,a,u,m,_){switch(a){case"focusin":return Ls=Ku(Ls,i,a,u,m,_),!0;case"dragenter":return $s=Ku($s,i,a,u,m,_),!0;case"mouseover":return js=Ku(js,i,a,u,m,_),!0;case"pointerover":var S=_.pointerId;return qu.set(S,Ku(qu.get(S)||null,i,a,u,m,_)),!0;case"gotpointercapture":return S=_.pointerId,Gu.set(S,Ku(Gu.get(S)||null,i,a,u,m,_)),!0}return!1}function hO(i){var a=bl(i.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,TE(i.priority,function(){uO(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,TE(i.priority,function(){uO(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Lh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=E_(i.nativeEvent);if(u===null){u=i.nativeEvent;var m=new u.constructor(u.type,u);xv=m,u.target.dispatchEvent(m),xv=null}else return a=wl(u),a!==null&&cO(a),i.blockedOn=u,!1;a.shift()}return!0}function pO(i,a,u){Lh(i)&&u.delete(a)}function Pj(){R_=!1,Ls!==null&&Lh(Ls)&&(Ls=null),$s!==null&&Lh($s)&&($s=null),js!==null&&Lh(js)&&(js=null),qu.forEach(pO),Gu.forEach(pO)}function $h(i,a){i.blockedOn===a&&(i.blockedOn=null,R_||(R_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Pj)))}var jh=null;function mO(i){jh!==i&&(jh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){jh===i&&(jh=null);for(var a=0;a<i.length;a+=3){var u=i[a],m=i[a+1],_=i[a+2];if(typeof m!="function"){if(x_(m||u)===null)continue;break}var S=wl(u);S!==null&&(i.splice(a,3),a-=3,E0(S,{pending:!0,data:_,method:u.method,action:m},m,_))}}))}function nc(i){function a(J){return $h(J,i)}Ls!==null&&$h(Ls,i),$s!==null&&$h($s,i),js!==null&&$h(js,i),qu.forEach(a),Gu.forEach(a);for(var u=0;u<Us.length;u++){var m=Us[u];m.blockedOn===i&&(m.blockedOn=null)}for(;0<Us.length&&(u=Us[0],u.blockedOn===null);)hO(u),u.blockedOn===null&&Us.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var _=u[m],S=u[m+1],N=_[Ur]||null;if(typeof S=="function")N||mO(u);else if(N){var U=null;if(S&&S.hasAttribute("formAction")){if(_=S,N=S[Ur]||null)U=N.formAction;else if(x_(_)!==null)continue}else U=N.action;typeof U=="function"?u[m+1]=U:(u.splice(m,3),m-=3),mO(u)}}}function gO(){function i(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(N){return _=N})},focusReset:"manual",scroll:"manual"})}function a(){_!==null&&(_(),_=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,_=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),_!==null&&(_(),_=null)}}}function O_(i){this._internalRoot=i}Uh.prototype.render=O_.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,m=so();aO(u,m,i,a,null,null)},Uh.prototype.unmount=O_.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;aO(i.current,2,null,i,null,null),yh(),a[yl]=null}};function Uh(i){this._internalRoot=i}Uh.prototype.unstable_scheduleHydration=function(i){if(i){var a=vv();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Us.length&&a!==0&&a<Us[u].priority;u++);Us.splice(u,0,i),u===0&&hO(i)}};var vO=t.version;if(vO!=="19.2.6")throw Error(r(527,vO,"19.2.6"));W.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(a),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var Nj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zh.isDisabled&&zh.supportsFiber)try{yt=zh.inject(Nj),Tt=zh}catch{}}return Yu.createRoot=function(i,a){if(!o(i))throw Error(r(299));var u=!1,m="",_=xR,S=RR,N=OR;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(_=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=iO(i,1,!1,null,null,u,m,null,_,S,N,gO),i[yl]=a.current,a_(i),new O_(a)},Yu.hydrateRoot=function(i,a,u){if(!o(i))throw Error(r(299));var m=!1,_="",S=xR,N=RR,U=OR,J=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(_=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(N=u.onCaughtError),u.onRecoverableError!==void 0&&(U=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),a=iO(i,1,!0,a,u??null,m,_,J,S,N,U,gO),a.context=sO(null),u=a.current,m=so(),m=_l(m),_=xs(m),_.callback=null,Rs(u,_,m),u=m,a.current.lanes=u,Lt(a,u),fi(a),i[yl]=a.current,a_(i),new Uh(a)},Yu.version="19.2.6",Yu}var CO;function qj(){if(CO)return C_.exports;CO=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(),C_.exports=Hj(),C_.exports}var Gj=qj(),M=ga();const ee=ma(M),bw=Dj({__proto__:null,default:ee},[M]);var N_={exports:{}},k_={};var AO;function Kj(){if(AO)return k_;AO=1;var e=ga().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return k_.c=function(t){return e.H.useMemoCache(t)},k_}var IO;function Zj(){return IO||(IO=1,N_.exports=Kj()),N_.exports}var Jr=Zj(),Jc=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(){}},Yj=class extends Jc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&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"}},ww=new Yj,Wj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Qj=class{#e=Wj;#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)}},Xa=new Qj;function Xj(e){setTimeout(e,0)}var Jj=typeof window>"u"||"Deno"in globalThis;function Zn(){}function e8(e,t){return typeof e=="function"?e(t):e}function Ab(e){return typeof e=="number"&&e>=0&&e!==1/0}function sP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ia(e,t){return typeof e=="function"?e(t):e}function uo(e,t){return typeof e=="function"?e(t):e}function MO(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Sw(l,t.options))return!1}else if(!Fd(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function PO(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(al(t.options.mutationKey)!==al(s))return!1}else if(!Fd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Sw(e,t){return(t?.queryKeyHashFn||al)(e)}function al(e){return JSON.stringify(e,(t,n)=>Ib(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Fd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Fd(e[n],t[n])):!1}var t8=Object.prototype.hasOwnProperty;function aP(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=NO(e)&&NO(t);if(!r&&!(Ib(e)&&Ib(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const h=r?p:l[p],g=e[h],v=t[h];if(g===v){d[h]=g,(r?p<s:t8.call(e,h))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){d[h]=v;continue}const y=aP(g,v,n+1);d[h]=y,y===g&&f++}return s===c&&f===s?e:d}function Rm(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 NO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ib(e){if(!kO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!kO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kO(e){return Object.prototype.toString.call(e)==="[object Object]"}function n8(e){return new Promise(t=>{Xa.setTimeout(t,e)})}function Mb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?aP(e,t):t}function eue(e){return e}function r8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function o8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ew=Symbol();function lP(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ew?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xw(e,t){return typeof e=="function"?e(...t):!!e}function i8(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Bd=(()=>{let e=()=>Jj;return{isServer(){return e()},setIsServer(t){e=t}}})();function Pb(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function s8(e){let t;if(e.then(n=>(t=n,n),Zn)?.catch(Zn),t!==void 0)return{data:t}}function cP(e){return e}function a8(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function l8(e,t,n){const r=()=>{const o=e.promise?.then(t).catch(s=>n(s)?Promise.reject(new Error("redacted")):Promise.reject(s));return o?.catch(Zn),o};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status==="pending"&&{promise:r()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function c8(e){return e.state.isPaused}function u8(e){return e.state.status==="success"}function d8(e){return!0}function f8(e,t={}){const n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??c8,r=e.getMutationCache().getAll().flatMap(d=>n(d)?[a8(d)]:[]),o=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??u8,s=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??d8,l=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??cP,c=e.getQueryCache().getAll().flatMap(d=>o(d)?[l8(d,l,s)]:[]);return{mutations:r,queries:c}}function h8(e,t,n){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),o=e.getQueryCache(),s=e.getDefaultOptions().hydrate?.deserializeData??cP,l=t.mutations||[],c=t.queries||[];l.forEach(({state:d,...f})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...f},d)}),c.forEach(({queryKey:d,state:f,queryHash:p,meta:h,promise:g,dehydratedAt:v,queryType:y})=>{const b=g?s8(g):void 0,x=f.data===void 0?b?.data:f.data,w=x===void 0?x:s(x);let E=o.get(p);const T=E?.state.status==="pending",R=E?.state.fetchStatus==="fetching";if(E){const O=b&&v!==void 0&&v>E.state.dataUpdatedAt;if(f.dataUpdatedAt>E.state.dataUpdatedAt||O){const{fetchStatus:A,...I}=f;E.setState({...I,data:w,...f.status==="pending"&&w!==void 0&&{status:"success",...!R&&{fetchStatus:"idle"}}})}}else E=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:d,queryHash:p,meta:h,_type:y},{...f,data:w,fetchStatus:"idle",status:f.status==="pending"&&w!==void 0?"success":f.status});g&&!b&&!T&&!R&&(v===void 0||v>E.state.dataUpdatedAt)&&E.fetch(void 0,{initialPromise:Promise.resolve(g).then(s)}).catch(Zn)})}var p8=Xj;function m8(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=p8;const s=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{s(()=>{c(...d)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Wn=m8(),g8=class extends Jc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&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}},Om=new g8;function v8(e){return Math.min(1e3*2**e,3e4)}function uP(e){return(e??"online")==="online"?Om.isOnline():!0}var Nb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dP(e){let t=!1,n=0,r;const o=Pb(),s=()=>o.status!=="pending",l=b=>{if(!s()){const x=new Nb(b);g(x),e.onCancel?.(x)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>ww.isFocused()&&(e.networkMode==="always"||Om.isOnline())&&e.canRun(),p=()=>uP(e.networkMode)&&e.canRun(),h=b=>{s()||(r?.(),o.resolve(b))},g=b=>{s()||(r?.(),o.reject(b))},v=()=>new Promise(b=>{r=x=>{(s()||f())&&b(x)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),y=()=>{if(s())return;let b;const x=n===0?e.initialPromise:void 0;try{b=x??e.fn()}catch(w){b=Promise.reject(w)}Promise.resolve(b).then(h).catch(w=>{if(s())return;const E=e.retry??(Bd.isServer()?0:3),T=e.retryDelay??v8,R=typeof T=="function"?T(n,w):T,O=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,w);if(t||!O){g(w);return}n++,e.onFail?.(n,w),n8(R).then(()=>f()?void 0:v()).then(()=>{t?g(w):y()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?y():v().then(y),o)}}var fP=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ab(this.gcTime)&&(this.#e=Xa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bd.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Xa.clearTimeout(this.#e),this.#e=void 0)}};function _8(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=y=>{i8(y,()=>t.signal,()=>p=!0)},g=lP(t.options,t.fetchOptions),v=async(y,b,x)=>{if(p)return Promise.reject(t.signal.reason);if(b==null&&y.pages.length)return Promise.resolve(y);const E=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:b,direction:x?"backward":"forward",meta:t.options.meta};return h(A),A})(),T=await g(E),{maxPages:R}=t.options,O=x?o8:r8;return{pages:O(y.pages,T,R),pageParams:O(y.pageParams,b,R)}};if(o&&s.length){const y=o==="backward",b=y?hP:kb,x={pages:s,pageParams:l},w=b(r,x);c=await v(x,w,y)}else{const y=e??s.length;do{const b=d===0?l[0]??r.initialPageParam:kb(r,c);if(d>0&&b==null)break;c=await v(c,b),d++}while(d<y)}return c};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 kb(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 hP(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function tue(e,t){return t?kb(e,t)!=null:!1}function nue(e,t){return!t||!e.getPreviousPageParam?!1:hP(e,t)!=null}var y8=class extends fP{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=LO(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=LO(this.options);t.data!==void 0&&(this.setState(DO(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Mb(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>uo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ew||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ia(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:!sP(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#o&&(this.#s||this.#u()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},o=()=>{const d=lP(this.options,t),p=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#s=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(d),d})();(this.#e==="infinite"?_8(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#o=dP({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof Nb&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#o.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#r.config.onSuccess?.(d,this),this.#r.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Nb){if(d.silent)return this.#o.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#r.config.onError?.(d,this),this.#r.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(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,...pP(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...DO(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Wn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function pP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:uP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function DO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function LO(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 mP=class extends Jc{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=Pb(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#o;#a;#s;#u;#l;#p;#d;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$O(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Db(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Db(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 uo(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&&!Rm(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&jO(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||uo(this.options.enabled,this.#t)!==uo(t.enabled,this.#t)||ia(this.options.staleTime,this.#t)!==ia(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||uo(this.options.enabled,this.#t)!==uo(t.enabled,this.#t)||o!==this.#c)&&this.#_(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return w8(this,n)&&(this.#r=n,this.#o=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}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.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.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.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Zn)),t}#g(){this.#b();const e=ia(this.options.staleTime,this.#t);if(Bd.isServer()||this.#r.isStale||!Ab(e))return;const n=sP(this.#r.dataUpdatedAt,e)+1;this.#d=Xa.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#_(e){this.#w(),this.#c=e,!(Bd.isServer()||uo(this.options.enabled,this.#t)===!1||!Ab(this.#c)||this.#c===0)&&(this.#f=Xa.setInterval(()=>{(this.options.refetchIntervalInBackground||ww.isFocused())&&this.#h()},this.#c))}#y(){this.#g(),this.#_(this.#v())}#b(){this.#d!==void 0&&(Xa.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(Xa.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,s=this.#i,l=this.#o,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,g;if(t._optimisticResults){const P=this.hasListeners(),L=!P&&$O(e,t),H=P&&jO(e,n,t,r);(L||H)&&(p={...p,...pP(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=p;g=p.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let P;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(P=o.data,x=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,P!==void 0&&(b="success",g=Mb(o?.data,P,t),h=!0)}if(t.select&&g!==void 0&&!x)if(o&&g===s?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=Mb(o?.data,g,t),this.#l=g,this.#s=null}catch(P){this.#s=P}this.#s&&(v=this.#s,g=this.#l,y=Date.now(),b="error");const w=p.fetchStatus==="fetching",E=b==="pending",T=b==="error",R=E&&w,O=g!==void 0,I={status:b,fetchStatus:p.fetchStatus,isPending:E,isSuccess:b==="success",isError:T,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!E,isLoadingError:T&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:T&&O,isStale:Rw(e,t),refetch:this.refetch,promise:this.#a,isEnabled:uo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,L=I.status==="error"&&!P,H=z=>{L?z.reject(I.error):P&&z.resolve(I.data)},j=()=>{const z=this.#a=I.promise=Pb();H(z)},B=this.#a;switch(B.status){case"pending":e.queryHash===n.queryHash&&H(B);break;case"fulfilled":(L||I.data!==B.value)&&j();break;case"rejected":(!L||I.error!==B.reason)&&j();break}}return I}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#p=this.#t),Rm(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const s=new Set(o??this.#m);return this.options.throwOnError&&s.add("error"),Object.keys(this.#r).some(l=>{const c=l;return this.#r[c]!==e[c]&&s.has(c)})};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.#y()}#E(e){Wn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function b8(e,t){return uo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&uo(t.retryOnMount,e)===!1)}function $O(e,t){return b8(e,t)||e.state.data!==void 0&&Db(e,t,t.refetchOnMount)}function Db(e,t,n){if(uo(t.enabled,e)!==!1&&ia(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Rw(e,t)}return!1}function jO(e,t,n,r){return(e!==t||uo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Rw(e,n)}function Rw(e,t){return uo(t.enabled,e)!==!1&&e.isStaleByTime(ia(t.staleTime,e))}function w8(e,t){return!Rm(e.getCurrentResult(),t)}var S8=class extends fP{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||gP(),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.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=dP({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#i({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#i({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",o=!this.#r.canStart();try{if(r)t();else{this.#i({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#i({type:"pending",context:l,variables:e,isPaused:o})}const s=await this.#r.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#i({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#i({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#i(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),Wn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function gP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var E8=class extends Jc{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 S8({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=Fh(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=Fh(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=Fh(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Fh(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.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=>PO(t,n))}findAll(e={}){return this.getAll().filter(t=>PO(e,t))}notify(e){Wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Wn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Zn))))}};function Fh(e){return e.options.scope?.id}var x8=class extends Jc{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Rm(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&al(n.mutationKey)!==al(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){const t=this.#n?.state??gP();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Wn.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},R8=class extends Jc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Sw(r,t);let s=this.get(o);return s||(s=new y8({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}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(){Wn.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=>MO(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>MO(e,n)):t}notify(e){Wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},O8=class{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new R8,this.#t=e.mutationCache||new E8,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=ww.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Om.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=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(ia(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}),s=this.#e.get(r.queryHash)?.state.data,l=e8(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Wn.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;Wn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Wn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Zn).catch(Zn)}invalidateQueries(e,t={}){return Wn.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=Wn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ia(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zn).catch(Zn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Om.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.#r.set(al(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Fd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(al(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Fd(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=Sw(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===Ew&&(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()}},vP=M.createContext(void 0),Ow=e=>{const t=M.useContext(vP);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},T8=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(vP.Provider,{value:e,children:t})),_P=M.createContext(!1),C8=()=>M.useContext(_P);_P.Provider;function A8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var I8=M.createContext(A8()),M8=()=>M.useContext(I8),P8=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?xw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N8=e=>{M.useEffect(()=>{e.clearReset()},[e])},k8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||xw(n,[e.error,r])),D8=(e,t)=>t.state.data===void 0,L8=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$8=(e,t)=>e.isLoading&&e.isFetching&&!t,j8=(e,t)=>e?.suspense&&t.isPending,UO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function yP(e,t,n){const r=C8(),o=M8(),s=Ow(n),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",L8(l),P8(l,o,c),N8(o);const d=!s.getQueryCache().get(l.queryHash),[f]=M.useState(()=>new t(s,l)),p=f.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(g=>{const v=h?f.subscribe(Wn.batchCalls(g)):Zn;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),M.useEffect(()=>{f.setOptions(l)},[l,f]),j8(l,p))throw UO(l,f,o);if(k8({result:p,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Bd.isServer()&&$8(p,r)&&(d?UO(l,f,o):c?.promise)?.catch(Zn).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?p:f.trackResult(p)}function U8(e,t){return yP(e,mP,t)}function bP(e,t){return yP({...e,enabled:!0,suspense:!0,throwOnError:D8,placeholderData:void 0},mP,t)}function z8(e,t){const n=Ow(t),[r]=M.useState(()=>new x8(n,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const o=M.useSyncExternalStore(M.useCallback(l=>r.subscribe(Wn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=M.useCallback((l,c)=>{r.mutate(l,c).catch(Zn)},[r]);if(o.error&&xw(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const wP={publicConfig:()=>["publicConfig"],session:()=>["session"],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],myCapabilities:e=>[e,"my-capabilities"],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],mcpClientPrefix:()=>["mcp","client"],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],orgAccessStatus:e=>["org-access-status",e],modelsList:e=>["models-list",e],homeNextActions:e=>["home-next-actions",e],boardLayout:e=>["board-layout",e],agentPrompts:(e,t)=>["agent-prompts",e,t],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,o)=>[e,t,n,"collection",r,o],collectionList:(e,t,n,r,o)=>[e,t,n,"collection",r,"list",o],collectionListInfinite:(e,t,n,r,o)=>[e,t,n,"collection",r,"list-infinite",o],monitoringStats:()=>["monitoring","stats"],monitoringStatsToolCalls:(e,t)=>["MONITORING_STATS",e,"tool-calls",t],monitoringStatsLlm:(e,t)=>["MONITORING_STATS",e,"llm",t],monitoringThreadUsage:(e,t)=>["MONITORING_THREAD_USAGE",e,t],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringLogDetail:e=>["monitoring","log-detail",e],ensureTask:(e,t)=>["ensure-task",e,t],globalSearch:(e,t)=>["global-search",e,t],threadsInfinite:(e,t)=>["threads","list-infinite",e,t],threadMessages:(e,t)=>["threads","messages",e,t],threadModelLogs:(e,t)=>["threads","model-logs",e,t],threadSandbox:(e,t)=>["thread-sandbox","v2",e,t],threadOutputs:e=>["thread-outputs",e],fileText:e=>["file-text",e],virtualMcpTools:(e,t)=>["virtual-mcp",t,e??"default","tools"],toolDefinitionLookup:(e,t,n)=>["virtual-mcp",t,e??"default","tools","lookup",n],virtualMcpAgents:e=>["virtual-mcp",e,"agents"],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],automationsAll:e=>["automations",e],automations:(e,t)=>["automations",e,t??null],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,n)=>["automation-runs",e,t,...[...n??[]].sort()],automationRunStats:(e,t,n)=>["automation-run-stats",e,t,n],projects:e=>["projects",e],project:(e,t)=>["project",e,t],virtualMcp:(e,t)=>["virtual-mcp",e,t],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],aiProviderKeyPreview:e=>["ai-provider-key-preview",e],secrets:e=>["secrets",e],fileConfigs:e=>["file-configs",e],orgFsVolume:(e,t)=>["org-fs",e,t],orgFsList:(e,t,n)=>["org-fs",e,t,"list",n],orgFsUsage:(e,t)=>["org-fs",e,t,"usage"],orgFsStat:(e,t,n)=>["org-fs",e,t,"stat",n],orgFsPublicSets:e=>["org-fs-public-sets",e],orgFsRecent:e=>["org-fs-recent",e],filePickerObjects:(e,t)=>["file-picker-objects",e,t],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t],orgSsoConfig:e=>["org-sso-config",e],orgSsoStatus:e=>["org-sso-status",e],storeDiscovery:(e,t)=>["store-discovery",e,t],organizationDomain:e=>["organization-domain",e],domainLookup:e=>["domain-lookup",e],brandContext:e=>["brand-context",e],defaultBrand:e=>["brand-context",e,"default"],decoProfile:e=>["deco-profile",e],decoSites:e=>["deco-sites",e],decoApps:()=>["deco-apps"],webSearchBlob:e=>["web-search-blob",e],decofile:e=>["decofile",e],liveMeta:e=>["live-meta",e],sandboxInvoke:(e,t)=>["sandbox-invoke",e,t],linkStatus:()=>["link-status"],currentLink:e=>["current-link",e],githubUserOrgs:(e,t)=>["github-user-orgs",e,t],githubOrgRepos:(e,t,n,r)=>["github-org-repos",e,t,n,r],vmEnv:(e,t,n)=>["vm-env",e,t,n]};function oue(e,t){e.invalidateQueries({predicate:n=>{const r=n.queryKey;return(!t||r[1]===t)&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})}function SP(){const e=Jr.c(1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:wP.publicConfig(),queryFn:F8,staleTime:1/0},e[0]=t):t=e[0];const{data:n}=bP(t);return n}async function F8(){return(await(await fetch("/api/config")).json()).config}const iue={light:"/logos/deco logo.svg",dark:"/logos/deco logo negative.svg"},EP=M.createContext(void 0);function B8(e){const t=Jr.c(3),{children:n}=e,r=SP();let o;return t[0]!==n||t[1]!==r.auth?(o=C.jsx(EP.Provider,{value:r.auth,children:n}),t[0]=n,t[1]=r.auth,t[2]=o):o=t[2],o}function sue(){const e=M.useContext(EP);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}var zO=M.use,xc=typeof window<"u"?M.useLayoutEffect:M.useEffect;function D_(e){const t=M.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function V8(e,t,n={},r={}){M.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function H8(e){const t=M.useRef(null);return M.useImperativeHandle(e,()=>t.current,[]),t}const xP=!1;function Vd(e){return e[e.length-1]}function q8(e){return typeof e=="function"}function na(e,t){return q8(e)?e(t):e}const RP=Object.prototype.hasOwnProperty,FO=Object.prototype.propertyIsEnumerable;function OP(e){for(const t in e)if(RP.call(e,t))return!0;return!1}const G8=()=>Object.create(null),Ua=(e,t)=>Ja(e,t,G8);function Ja(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=HO(e)&&HO(o);if(!s&&!(zc(e)&&zc(o)))return o;const l=s?e:BO(e);if(!l)return o;const c=s?o:BO(o);if(!c)return o;const d=l.length,f=c.length,p=s?new Array(f):n();let h=0;for(let g=0;g<f;g++){const v=s?g:c[g],y=e[v],b=o[v];if(y===b){p[v]=y,(s?g<d:RP.call(e,v))&&h++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){p[v]=b;continue}const x=Ja(y,b,n,r+1);p[v]=x,x===y&&h++}return d===f&&h===d?e:p}function BO(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!FO.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!FO.call(e,o))return!1;r.push(o)}return r}function zc(e){if(!VO(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!VO(n)||!n.hasOwnProperty("isPrototypeOf"))}function VO(e){return Object.prototype.toString.call(e)==="[object Object]"}function HO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rl(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,o=e.length;r<o;r++)if(!rl(e[r],t[r],n))return!1;return!0}if(zc(e)&&zc(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!rl(e[l],t[l],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&o++;let s=0;for(const l in t)if((!r||t[l]!==void 0)&&(s++,s>o||!rl(e[l],t[l],n)))return!1;return o===s}return!1}function Fc(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function K8(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 Hd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Z8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function qO(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Z8(t)}const Y8=["http:","https:","mailto:","tel:"];function Tm(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Wu(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=qO(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+qO(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function W8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Q8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function cs(){throw new Error("Invariant failed")}function qd(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const l=t.get(s);if(l)return o(l),l.value},set(s,l){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 c=t.get(s);if(c)c.value=l,o(c);else{const d={key:s,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(s,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const ra=4,TP=5;function X8(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function CP(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const c=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const l=X8(s);if(l){const[c,d]=l,f=s.charCodeAt(c+1);if(f===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){const p=c+3,h=d;if(p<h)return n[0]=3,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=o,n}}else if(f===36){const p=c+1,h=c+2;return h===d?(n[0]=2,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+h,n[3]=t+d,n[4]=t+d+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Ag(e,t,n,r,o,s,l){l?.(n);let c=r;{const d=n.fullPath??n.from,f=d.length,p=n.options?.caseSensitive??e,h=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=CP(d,c,t);let y;const b=c,x=v[5];switch(c=x+1,s++,v[0]){case 0:{const w=d.substring(v[2],v[3]);if(p){const E=o.static?.get(w);if(E)y=E;else{o.static??=new Map;const T=el(n.fullPath??n.from);T.parent=o,T.depth=s,y=T,o.static.set(w,T)}}else{const E=w.toLowerCase(),T=o.staticInsensitive?.get(E);if(T)y=T;else{o.staticInsensitive??=new Map;const R=el(n.fullPath??n.from);R.parent=o,R.depth=s,y=R,o.staticInsensitive.set(E,R)}}break}case 1:{const w=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(w||E),R=w?T?w:w.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)y=A;else{const I=$_(1,n.fullPath??n.from,T,R,O);y=I,I.depth=s,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const w=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(w||E),R=w?T?w:w.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)y=A;else{const I=$_(3,n.fullPath??n.from,T,R,O);y=I,I.parent=o,I.depth=s,o.optional??=[],o.optional.push(I)}break}case 2:{const w=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(w||E),R=w?T?w:w.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=$_(2,n.fullPath??n.from,T,R,O);y=A,A.parent=o,A.depth=s,o.wildcard??=[],o.wildcard.push(A)}}o=y}if(h&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=el(n.fullPath??n.from);v.kind=TP,v.parent=o,s++,v.depth=s,o.pathless??=[],o.pathless.push(v),o=v}const g=(n.path||!n.children)&&!n.isRoot;if(g&&d.endsWith("/")){const v=el(n.fullPath??n.from);v.kind=ra,v.parent=o,s++,v.depth=s,o.index=v,o=v}o.parse=h??null,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Ag(e,t,d,c,o,s,l)}function L_(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;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 Xs(e){if(e.pathless)for(const t of e.pathless)Xs(t);if(e.static)for(const t of e.static.values())Xs(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Xs(t);if(e.dynamic?.length){e.dynamic.sort(L_);for(const t of e.dynamic)Xs(t)}if(e.optional?.length){e.optional.sort(L_);for(const t of e.optional)Xs(t)}if(e.wildcard?.length){e.wildcard.sort(L_);for(const t of e.wildcard)Xs(t)}}function el(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function $_(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,caseSensitive:n,prefix:r,suffix:o}}function J8(e,t){const n=el("/"),r=new Uint16Array(6);for(const o of e)Ag(!1,r,o,1,n,0);Xs(n),t.masksTree=n,t.flatCache=qd(1e3)}function e7(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Tw(e,t.masksTree);return t.flatCache.set(e,r),r}function t7(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let l=o.singleCache.get(s);return l||(l=el("/"),Ag(t,new Uint16Array(6),{from:e},1,l,0),o.singleCache.set(s,l)),Tw(r,l,n)}function n7(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=Tw(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)s=null;else throw l}return s&&(s.branch=IP(s.route)),t.matchCache.set(r,s),s}function r7(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function o7(e,t=!1,n){const r=el(e.fullPath),o=new Uint16Array(6),s={},l={};let c=0;return Ag(t,o,e,1,r,0,d=>{if(n?.(d,c),d.id in s&&cs(),s[d.id]=d,c!==0&&d.path){const f=r7(d.fullPath);(!l[f]||d.fullPath.endsWith("/"))&&(l[f]=d)}c++}),Xs(r),{processedTree:{segmentTree:r,singleCache:qd(1e3),matchCache:qd(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:l}}function Tw(e,t,n=!1){const r=e.split("/"),o=s7(e,r,t,n);if(!o)return null;const[s]=AP(e,r,o);return{route:o.node.route,rawParams:s}}function AP(e,t,n){const r=i7(n.node);let o=null;const s=Object.create(null);let l=n.extract?.part??0,c=n.extract?.node??0,d=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;l++,c++,d++,f++){const p=r[c];if(p.kind===ra)break;if(p.kind===TP){f--,l--,d--;continue}const h=t[l],g=d;if(h&&(d+=h.length),p.kind===1){o??=n.node.fullPath.split("/");const v=o[f],y=p.prefix?.length??0;if(v.charCodeAt(y)===123){const b=p.suffix?.length??0,x=v.substring(y+2,v.length-b-1),w=h.substring(y,h.length-b);s[x]=decodeURIComponent(w)}else{const b=v.substring(1);s[b]=decodeURIComponent(h)}}else if(p.kind===3){if(n.skipped&1<<c){l--,d=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],y=p.prefix?.length??0,b=p.suffix?.length??0,x=v.substring(y+3,v.length-b-1),w=p.suffix||p.prefix?h.substring(y,h.length-b):h;w&&(s[x]=decodeURIComponent(w))}else if(p.kind===2){const v=p,y=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),b=decodeURIComponent(y);s["*"]=b,s._splat=b;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:l,node:c,path:d,segment:f}]}function IP(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function i7(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function s7(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Vd(t),s=o&&e!=="/",l=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let d=null,f=null;for(;c.length;){const p=c.pop(),{node:h,index:g,skipped:v,depth:y,statics:b,dynamics:x,optionals:w}=p;let{extract:E,rawParams:T}=p;if(h.kind===2&&h.route&&!Vh(f,p))continue;if(h.parse){if(!GO(e,t,p))continue;T=p.rawParams,E=p.extract}r&&h.route&&h.kind!==ra&&Vh(d,p)&&(d=p);const R=g===l;if(R&&(h.route&&(!s||h.kind===ra||h.kind===2)&&Vh(f,p)&&(f=p),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const O=R?void 0:t[g];let A;if(R&&h.index){const I={node:h.index,index:g,skipped:v,depth:y+1,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T};let P=!0;if(h.index.parse&&(GO(e,t,I)||(P=!1)),P){if(!x&&!w&&!v&&a7(b,l))return I;Vh(f,I)&&(f=I)}}if(h.wildcard)for(let I=h.wildcard.length-1;I>=0;I--){const P=h.wildcard[I],{prefix:L,suffix:H}=P;if(!(L&&(R||!(P.caseSensitive?O:A??=O.toLowerCase()).startsWith(L)))){if(H){if(R)continue;const j=t.slice(g).join("/").slice(-H.length);if((P.caseSensitive?j:j.toLowerCase())!==H)continue}c.push({node:P,index:l,skipped:v,depth:y+1,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T})}}if(h.optional){const I=v|1<<y,P=y+1;for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L];c.push({node:H,index:g,skipped:I,depth:P,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T})}if(!R)for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L],{prefix:j,suffix:B}=H;if(j||B){const z=H.caseSensitive?O:A??=O.toLowerCase();if(j&&!z.startsWith(j)||B&&!z.endsWith(B))continue}c.push({node:H,index:g+1,skipped:v,depth:P,statics:b,dynamics:x,optionals:w+Bh(l,g),extract:E,rawParams:T})}}if(!R&&h.dynamic&&O)for(let I=h.dynamic.length-1;I>=0;I--){const P=h.dynamic[I],{prefix:L,suffix:H}=P;if(L||H){const j=P.caseSensitive?O:A??=O.toLowerCase();if(L&&!j.startsWith(L)||H&&!j.endsWith(H))continue}c.push({node:P,index:g+1,skipped:v,depth:y+1,statics:b,dynamics:x+Bh(l,g),optionals:w,extract:E,rawParams:T})}if(!R&&h.staticInsensitive){const I=h.staticInsensitive.get(A??=O.toLowerCase());I&&c.push({node:I,index:g+1,skipped:v,depth:y+1,statics:b+Bh(l,g),dynamics:x,optionals:w,extract:E,rawParams:T})}if(!R&&h.static){const I=h.static.get(O);I&&c.push({node:I,index:g+1,skipped:v,depth:y+1,statics:b+Bh(l,g),dynamics:x,optionals:w,extract:E,rawParams:T})}if(h.pathless){const I=y+1;for(let P=h.pathless.length-1;P>=0;P--){const L=h.pathless[P];c.push({node:L,index:g,skipped:v,depth:I,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T})}}}if(f)return f;if(r&&d){let p=d.index;for(let g=0;g<d.index;g++)p+=t[g].length;const h=p===e.length?"/":e.slice(p);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(h),d}return null}function Bh(e,t){return 2**(e-t-1)}function a7(e,t){return e===2**(t-1)-1}function GO(e,t,n){let r,o;try{[r,o]=AP(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Vh(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ra)>(e.node.kind===ra)||t.node.kind===ra==(e.node.kind===ra)&&t.depth>e.depth))):!0}function cm(e){return Cw(e.filter(t=>t!==void 0).join("/"))}function Cw(e){return e.replace(/\/{2,}/g,"/")}function MP(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ss(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function PP(e){return ss(MP(e))}function Cm(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function l7(e,t,n){return Cm(e,n)===Cm(t,n)}function c7({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let l;if(r){l=o?t:s?e:e+"\0"+t;const f=r.get(l);if(f)return f}let c;if(s)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&Vd(c)==="";)c.pop();const f=t.split("/");for(let p=0,h=f.length;p<h;p++){const g=f[p];g===""?p?p===h-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(Vd(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const d=Cw(c.join("/"))||"/";return l&&r&&r.set(l,d),d}function u7(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function j_(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>ZO(o,n)).join("/"):ZO(r,n)}function KO({path:e,params:t,decoder:n,...r}){let o=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const l=e.length;let c=0,d,f="";for(;c<l;){const p=c;d=CP(e,p,d);const h=d[5];if(c=h+1,p===h)continue;const g=d[0];if(g===0){f+="/"+e.substring(p,h);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const y=e.substring(p,d[1]),b=e.substring(d[4],h);if(!v){o=!0,(y||b)&&(f+="/"+y+b);continue}const x=j_("_splat",t,n);f+="/"+y+x+b;continue}if(g===1){const v=e.substring(d[2],d[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const y=e.substring(p,d[1]),b=e.substring(d[4],h),x=j_(v,t,n)??"undefined";f+="/"+y+x+b;continue}if(g===3){const v=e.substring(d[2],d[3]),y=t[v];if(y==null)continue;s[v]=y;const b=e.substring(p,d[1]),x=e.substring(d[4],h),w=j_(v,t,n)??"";f+="/"+b+w+x;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function ZO(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Tr(e){return e?.isNotFound===!0}function d7(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const f7="tsr-scroll-restoration-v1_3";function h7(){const e=d7();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");zc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=na(r,t)||t},persist:()=>{try{e.setItem(f7,JSON.stringify(t))}catch{}}}}const YO=h7(),p7=e=>e.state.__TSR_key||e.href;function m7(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 Hh=!1;const Qu="window",WO="data-scroll-restoration-id";function g7(e,t){if(!YO)return;const n=YO;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Hh=!1;const r=e.options.getScrollRestorationKey||p7,o=new Map;window.history.scrollRestoration="manual";const s=c=>{if(!(Hh||!e.isScrollRestoring))if(c.target===document||c.target===window)o.set(Qu,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const d=c.target;o.set(d,{scrollX:d.scrollLeft||0,scrollY:d.scrollTop||0})}},l=c=>{if(!e.isScrollRestoring||!c||o.size===0||!n)return;const d=n.state[c]||={};for(const[f,p]of o){let h;if(f===Qu)h=Qu;else if(f.isConnected){const g=f.getAttribute(WO);h=g?`[${WO}="${g}"]`:m7(f)}h&&(d[h]=p)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?r(c.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{l(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",c=>{const d=r(c.toLocation),f=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Hh=!0;try{const h=e.isScrollRestoring?n.state[d]:void 0;let g=!1;if(h)for(const v in h){const y=h[v];if(!zc(y))continue;const{scrollX:b,scrollY:x}=y;if(!(!Number.isFinite(b)||!Number.isFinite(x))){if(v===Qu)window.scrollTo({top:x,left:b,behavior:f}),g=!0;else if(v){let w;try{w=document.querySelector(v)}catch{continue}w&&(w.scrollLeft=b,w.scrollTop=x,g=!0)}}}if(!g){const v=e.history.location.hash.slice(1);if(v){const y=window.history.state?.__hashScrollIntoViewOptions??!0;if(y){const b=document.getElementById(v);b&&b.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:f};if(window.scrollTo(y),p)for(const b of p){if(b===Qu)continue;const x=typeof b=="function"?b():document.querySelector(b);x&&x.scrollTo(y)}}}}finally{Hh=!1}e.isScrollRestoring&&n.set(h=>(h[d]||={},h))}})}function v7(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function U_(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function _7(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=U_(o):Array.isArray(s)?s.push(U_(o)):n[r]=[s,U_(o)]}return n}const y7=w7(JSON.parse),b7=S7(JSON.stringify,JSON.parse);function w7(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=_7(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function S7(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=v7(o,r);return s?`?${s}`:""}}const ol="__root__";function Pd(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!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 Wr(e){return e instanceof Response&&!!e.options}function E7(e){return{input:({url:t})=>{for(const n of e)t=Lb(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=NP(e[n],t);return t}}}function x7(e){const t=PP(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===o?l.pathname="/":c.startsWith(s)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=cm(["/",t,l.pathname]),l)}}function Lb(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 NP(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 R7(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,l=new Map,c=new Map,d=new Map,f=n(e.status),p=n(e.loadedAt),h=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),y=n(e.resolvedLocation),b=n(e.statusCode),x=n(e.redirect),w=n([]),E=n([]),T=n([]),R=r(()=>z_(l,w.get())),O=r(()=>z_(c,E.get())),A=r(()=>z_(d,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(W=>l.get(W)?.get().status==="pending")),L=r(()=>({locationHref:v.get().href,resolvedLocationHref:y.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:h.get(),isTransitioning:g.get(),matches:R.get(),location:v.get(),resolvedLocation:y.get(),statusCode:b.get(),redirect:x.get()})),j=qd(64);function B(W){let te=j.get(W);return te||(te=r(()=>{const le=w.get();for(const Q of le){const k=l.get(Q);if(k&&k.routeId===W)return k.get()}}),j.set(W,te)),te}const z={status:f,loadedAt:p,isLoading:h,isTransitioning:g,location:v,resolvedLocation:y,statusCode:b,redirect:x,matchesId:w,pendingIds:E,cachedIds:T,matches:R,pendingMatches:O,cachedMatches:A,firstId:I,hasPending:P,matchRouteDeps:L,matchStores:l,pendingMatchStores:c,cachedMatchStores:d,__store:H,getRouteMatchStore:B,setMatches:K,setPending:oe,setCached:q};K(e.matches),s?.(z);function K(W){F_(W,l,w,n,o)}function oe(W){F_(W,c,E,n,o)}function q(W){F_(W,d,T,n,o)}return z}function z_(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function F_(e,t,n,r,o){const s=e.map(c=>c.id),l=new Set(s);o(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const d=t.get(c.id);if(!d){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}d.routeId=c.routeId,d.get()!==c&&d.set(c)}Q8(n.get(),s)||n.set(s)})}const $b=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},O7=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ig=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),il=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const l=e.matches[s];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},QO=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(l=>l.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let l=s;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return n?s:o},oa=(e,t,n)=>{if(!(!Wr(n)&&!Tr(n)))throw Wr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:Wr(n)?"redirected":Tr(n)?"notFound":r.status==="pending"?"success":r.status,context:il(e,t.index),isFetching:!1,error:n})),Tr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Wr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},kP=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},XO=(e,t,n)=>{const r=il(e,n);e.updateMatch(t,o=>({...o,context:r}))},Xu=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],l=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,oa(e,e.router.getMatch(o),n);try{l.options.onError?.(n)}catch(c){n=c,oa(e,e.router.getMatch(o),n)}e.updateMatch(o,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Wr(n)&&!Tr(n)&&(e.serialError??=n)},DP=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ig(e,t)&&(n.options.loader||n.options.beforeLoad||$P(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{$b(e)},o);r._nonReactive.pendingTimeout=s}},T7=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;DP(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&oa(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},C7=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Fc(()=>{s?.resolve(),s=void 0});const{paramsError:l,searchError:c}=o;l&&Xu(e,n,l,"PARSE_PARAMS"),c&&Xu(e,n,c,"VALIDATE_SEARCH"),DP(e,t,r,o);const d=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:d})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{p(),h()});return}o._nonReactive.beforeLoadPromise=Fc();const g={...il(e,n,!1),...o.__routeContext},{search:v,params:y,cause:b}=o,x=Ig(e,t),w={search:v,abortController:d,params:y,preload:x,context:g,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":b,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=R=>{if(R===void 0){e.router.batch(()=>{p(),h()});return}(Wr(R)||Tr(R))&&(p(),Xu(e,n,R,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,O=>({...O,__beforeLoadContext:R})),h()})};let T;try{if(T=r.options.beforeLoad(w),Hd(T))return p(),T.catch(R=>{Xu(e,n,R,"BEFORE_LOAD")}).then(E)}catch(R){p(),Xu(e,n,R,"BEFORE_LOAD")}E(T)},A7=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>c(),l=()=>C7(e,n,t,o),c=()=>{if(kP(e,n))return;const d=T7(e,n,o);return Hd(d)?d.then(l):l()};return s()},I7=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,l,c])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:c,scripts:l,styles:s?.styles}))},LP=(e,t,n,r,o)=>{const s=t[r-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(n),p=il(e,r),h=Ig(e,n);return{params:l,deps:c,preload:!!h,parentMatchPromise:s,abortController:d,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:h?"preload":f,route:o,...e.router.options.additionalContext}},JO=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(xP??e.router.isServer)||s.ssr===!0)&&Gd(o);const l=o.options.loader,c=typeof l=="function"?l:l?.handler,d=c?.(LP(e,t,n,r,o)),f=!!c&&Hd(d);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,h=>({...h,isFetching:"loader"})),c){const h=f?await d:d;oa(e,e.router.getMatch(n),h),h!==void 0&&e.updateMatch(n,g=>({...g,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const p=s._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,h=>({...h,error:void 0,context:il(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:il(e,r)}));return}const d=s._nonReactive.minPendingPromise;d&&await d,Tr(l)&&await o.options.notFoundComponent?.preload?.(),oa(e,e.router.getMatch(n),l);try{o.options.onError?.(l)}catch(f){c=f,oa(e,e.router.getMatch(n),f)}!Wr(c)&&!Tr(c)&&await Gd(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:il(e,r),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(n);l&&(l._nonReactive.loaderPromise=void 0),oa(e,l,s)}},M7=async(e,t,n)=>{async function r(v,y,b,x,w){const E=Date.now()-y.updatedAt,T=v?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,R=w.options.shouldReload,O=typeof R=="function"?R(LP(e,t,o,n,w)):R,{status:A,invalid:I}=x,P=E>=T&&(!!e.forceStaleReload||x.cause==="enter"||b!==void 0&&b!==x.id);l=A==="success"&&(I||(O??P)),v&&w.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{try{await JO(e,t,o,n,w);const L=e.router.getMatch(o);L._nonReactive.loaderPromise?.resolve(),L._nonReactive.loadPromise?.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){Wr(L)&&await e.router.navigate(L.options)}})()):A!=="success"||l?await JO(e,t,o,n,w):XO(e,o,n))}const{id:o,routeId:s}=e.matches[n];let l=!1,c=!1;const d=e.router.looseRoutesById[s],f=d.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(kP(e,o)){if(!e.router.getMatch(o))return e.matches[n];XO(e,o,n)}else{const v=e.router.getMatch(o),y=e.router.stores.matchesId.get()[n],b=(y&&e.router.stores.matchStores.get(y)||null)?.routeId===s?y:e.router.stores.matches.get().find(w=>w.routeId===s)?.id,x=Ig(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&p)return v;await v._nonReactive.loaderPromise;const w=e.router.getMatch(o),E=w._nonReactive.error||w.error;E&&oa(e,w,E),w.status==="pending"&&await r(x,v,b,w,d)}else{const w=x&&!e.router.stores.matchStores.has(o),E=e.router.getMatch(o);E._nonReactive.loaderPromise=Fc(),w!==E.preload&&e.updateMatch(o,T=>({...T,preload:w})),await r(x,v,b,E,d)}}const h=e.router.getMatch(o);c||(h._nonReactive.loaderPromise?.resolve(),h._nonReactive.loadPromise?.resolve(),h._nonReactive.loadPromise=void 0),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,c||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const g=c?h.isFetching:!1;return g!==h.isFetching||h.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):h};async function eT(e){const t=e,n=[];O7(t.router)&&$b(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=A7(t,g);Hd(v)&&await v}catch(v){if(Wr(v))throw v;if(Tr(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?QO(t,r):void 0,l=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let c,d;for(let g=0;g<l;g++)n.push(M7(t,n,g));try{await Promise.all(n)}catch{const g=await Promise.allSettled(n);for(const v of g){if(v.status!=="rejected")continue;const y=v.reason;if(Wr(y))throw y;Tr(y)?c??=y:d??=y}if(d!==void 0)throw d}const f=c??(r&&!t.preload?r:void 0);let p=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=QO(t,f);g===void 0&&cs();const v=t.matches[g],y=t.router.looseRoutesById[v.routeId],b=t.router.options?.defaultNotFoundComponent;!y.options.notFoundComponent&&b&&(y.options.notFoundComponent=b),f.routeId=v.routeId;const x=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,w=>({...w,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=g,await Gd(y,["notFoundComponent"])}else if(!t.preload){const g=t.matches[0];g.globalNotFound||t.router.getMatch(g.id)?.globalNotFound&&t.updateMatch(g.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const g=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Gd(g,["errorComponent"])}for(let g=0;g<=p;g++){const{id:v,routeId:y}=t.matches[g],b=t.router.looseRoutesById[y];try{const x=I7(t,v,b);if(x){const w=await x;t.updateMatch(v,E=>({...E,...w}))}}catch(x){console.error(`Error executing head for route ${y}:`,x)}}const h=$b(t);if(Hd(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function tT(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Gd(e,t=um){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:o,...s}=r.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===um?(()=>{if(e._componentsPromise===void 0){const r=tT(e,um);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():tT(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function $P(e){for(const t of um)if(e.options[t]?.preload)return!0;return!1}const um=["component","errorComponent","pendingComponent","notFoundComponent"];var sa="__TSR_index",nT="popstate",rT="beforeunload";function P7(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:l}))},o=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},s=async({task:l,navigateOpts:c,...d})=>{if(c?.ignoreBlocker??!1){l();return}const f=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const h of f){const g=Am(d.path,d.state);if(await h.blockerFn({currentLocation:t,nextLocation:g,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,c,d)=>{const f=t.state[sa];c=oT(f+1,c),s({task:()=>{e.pushState(l,c),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:c})},replace:(l,c,d)=>{const f=t.state[sa];c=oT(f,c),s({task:()=>{e.replaceState(l,c),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:c})},go:(l,c)=>{s({task:()=>{e.go(l),o({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{s({task:()=>{e.back(l?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{s({task:()=>{e.forward(l?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[sa]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function oT(e,t){t||(t={});const n=Aw();return{...t,key:n,__TSR_key:n,[sa]:e}}function N7(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,l=P=>o=P,c=(P=>P),d=(()=>Am(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=Aw();t.history.replaceState({[sa]:0,key:P,__TSR_key:P},"")}let f=d(),p,h=!1,g=!1,v=!1,y=!1;const b=()=>f;let x,w;const E=()=>{x&&(I._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),I._ignoreSubscribers=!1,x=void 0,w=void 0,p=void 0)},T=(P,L,H)=>{const j=c(L);w||(p=f),f=Am(L,H),x={href:j,state:H,isPush:x?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>E()))},R=P=>{f=d(),I.notify({type:P})},O=async()=>{if(g){g=!1;return}const P=d(),L=P.state[sa]-f.state[sa],H=L===1,j=L===-1,B=!H&&!j||h;h=!1;const z=B?"GO":j?"BACK":"FORWARD",K=B?{type:"GO",index:L}:{type:j?"BACK":"FORWARD"};if(v)v=!1;else{const oe=s();if(typeof document<"u"&&oe.length){for(const q of oe)if(await q.blockerFn({currentLocation:f,nextLocation:P,action:z})){g=!0,t.history.go(1),I.notify(K);return}}}f=d(),I.notify(K)},A=P=>{if(y){y=!1;return}let L=!1;const H=s();if(typeof document<"u"&&H.length)for(const j of H){const B=j.enableBeforeUnload??!0;if(B===!0){L=!0;break}if(typeof B=="function"&&B()===!0){L=!0;break}}if(L)return P.preventDefault(),P.returnValue=""},I=P7({getLocation:b,getLength:()=>t.history.length,pushState:(P,L)=>T("push",P,L),replaceState:(P,L)=>T("replace",P,L),back:P=>(P&&(v=!0),y=!0,t.history.back()),forward:P=>{P&&(v=!0),y=!0,t.history.forward()},go:P=>{h=!0,t.history.go(P)},createHref:P=>c(P),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(rT,A,{capture:!0}),t.removeEventListener(nT,O)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:s,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(rT,A,{capture:!0}),t.addEventListener(nT,O),t.history.pushState=function(...P){const L=n.apply(t.history,P);return I._ignoreSubscribers||R("PUSH"),L},t.history.replaceState=function(...P){const L=r.apply(t.history,P);return I._ignoreSubscribers||R("REPLACE"),L},I}function k7(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Am(e,t){const n=k7(e),r=n.indexOf("#"),o=n.indexOf("?"),s=Aw();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[sa]:0,key:s,__TSR_key:s}}}function Aw(){return(Math.random()+1).toString(36).substring(7)}function Mc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var D7=class{constructor(e,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.routeBranchCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=u7(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=N7()),this.origin=this.options.origin,this.origin||(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;let p;this.resolvePathCache=qd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=R7($7(this.latestLocation),p),g7(this)}let c=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==d||l!==f){this.basepath=d;const p=[],h=PP(d);h&&h!=="/"&&p.push(x7({basepath:d})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:E7(p),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(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 n=o7(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&J8(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:d,search:f,hash:p,href:h,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const w=this.options.parseSearch(f),E=this.options.stringifySearch(w);return{href:d+E+p,publicHref:d+E+p,pathname:Wu(d).path,external:!1,searchStr:E,search:Ua(r?.search,w),hash:Wu(p.slice(1)).path,state:Ja(r?.state,g)}}const v=new URL(h,this.origin),y=Lb(this.rewrite,v),b=this.options.parseSearch(y.search),x=this.options.stringifySearch(b);return y.search=x,{href:y.href.replace(y.origin,""),publicHref:h,pathname:Wu(y.pathname).path,external:!!this.rewrite&&y.origin!==this.origin,searchStr:x,search:Ua(r?.search,b),hash:Wu(y.hash.slice(1)).path,state:Ja(r?.state,g)}},s=o(n),{__tempLocation:l,__tempKey:c}=s.state;if(l&&(!c||c===this.tempLocationKey)){const d=o(l);return d.state.key=s.state.key,d.state.__TSR_key=s.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>c7({base:n,to:r.includes("//")?Cw(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>j7({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=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{const l=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);s.from;const d=s.unsafeRelative==="path"?l.pathname:s.from??c.fullPath,f=s.to?`${s.to}`:void 0,p=c.search,h=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(d,"."),v=f?this.resolvePathWithBase(g,f):g,y=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?h:Object.assign(h,na(s.params,h)),b=this.routesByPath[ss(v)];let x;if(b)x=this.getRouteBranch(b);else if(v.includes("$"))x=[];else{const j=this.getMatchedRoutes(v);x=j.matchedRoutes,this.options.notFoundRoute&&(!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&OP(y))for(const j of x){const B=j.options.params?.stringify??j.options.stringifyParams;if(B)try{Object.assign(y,B(y))}catch{}}const w=n.leaveParams?v:Wu(KO({path:v,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const j={};x.forEach(B=>{if(B.options.validateSearch)try{Object.assign(j,dm(B.options.validateSearch,{...j,...E}))}catch{}}),E=j}E=U7({search:E,dest:s,destRoutes:x,_includeValidateSearch:n._includeValidateSearch}),E=Ua(p,E);const T=this.options.stringifySearch(E),R=s.hash===!0?l.hash:s.hash?na(s.hash,l.hash):void 0,O=R?`#${R}`:"";let A=s.state===!0?l.state:s.state?na(s.state,l.state):{};A=Ja(l.state,A);const I=`${w}${T}${O}`;let P,L,H=!1;if(this.rewrite){const j=new URL(I,this.origin),B=NP(this.rewrite,j);P=j.href.replace(j.origin,""),B.origin!==this.origin?(L=B.href,H=!0):L=B.pathname+B.search+B.hash}else P=W8(I),L=P;return{publicHref:L,href:P,pathname:w,search:E,searchStr:T,state:A,hash:R??"",external:H,unmaskOnReload:s.unmaskOnReload}},o=(s={},l)=>{const c=r(s);let d=l?r(l):void 0;if(!d){const f=Object.create(null);if(this.options.routeMasks){const p=e7(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:h,params:g,...v}=p.route,y=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,na(g,f));l={from:n.from,...v,params:y},d=r(l)}}}return d&&(c.maskedLocation=d),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{o.state[p]=this.latestLocation.state[p]});const f=rl(o.state,this.latestLocation.state);return d.forEach(p=>{delete o.state[p]}),f},l=ss(this.latestLocation.href)===ss(o.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Fc(()=>{c?.resolve(),c=void 0}),l&&s())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...p}=o;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:l,href:c,...d}={})=>{if(c){const h=this.history.location.state.__TSR_index,g=Am(c,{__TSR_index:n?h:h+1}),v=new URL(g.pathname,this.origin);d.to=Lb(this.rewrite,v).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 p=this.commitLocation({...f,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...l})=>{let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!r&&(r=!0),r){if(n!==void 0||!o){const f=this.buildLocation({to:n,...l});o=o??f.publicHref,s=s??f.publicHref}const d=!c&&s?s:o;if(Tm(d,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(o=>!n.some(s=>s.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,o,s;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,p=Mc(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await eT({router:this,sync:n?.sync,forceStaleReload:l.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=null,g=null,v=null,y=null;this.batch(()=>{const b=this.stores.pendingMatches.get(),x=b.length,w=this.stores.matches.get();h=x?w.filter(R=>!this.stores.pendingMatchStores.has(R.id)):null;const E=new Set;for(const R of this.stores.pendingMatchStores.values())R.routeId&&E.add(R.routeId);const T=new Set;for(const R of this.stores.matchStores.values())R.routeId&&T.add(R.routeId);g=x?w.filter(R=>!E.has(R.routeId)):null,v=x?b.filter(R=>!T.has(R.routeId)):null,y=x?b.filter(R=>T.has(R.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(b),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(R=>R.status!=="error"&&R.status!=="notFound"&&R.status!=="redirected")]),this.clearExpiredCache())});for(const[b,x]of[[g,"onLeave"],[v,"onEnter"],[y,"onStay"]])if(b)for(const w of b)this.looseRoutesById[w.routeId].options[x]?.(w)})})}})}catch(f){Wr(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Tr(f)&&(o=f);const p=r?r.status:o?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(d=>d.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,l=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Mc(s,l)):r.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const l=this.stores.cachedMatchStores.get(n);if(l){const c=r(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(d=>d.filter(f=>f!==n)):l.set(c)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Tm(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!r(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=o=>{const s=this.looseRoutesById[o.routeId];if(!s.options.loader)return!0;const l=(o.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Gd,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),l=new Set([...s,...this.stores.cachedIds.get()]),c=o.filter(d=>!l.has(d.id));if(c.length){const d=this.stores.cachedMatches.get();this.stores.setCached([...d,...c])}try{return o=await eT({router:this,matches:o,location:r,preload:!0,updateMatch:(d,f)=>{s.has(d)?o=o.map(p=>p.id===d?f(p):p):this.updateMatch(d,f)}}),o}catch(d){if(Wr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:r});Tr(d)||console.error(d);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const l=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=t7(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,l.pathname,this.processedTree);return!c||n.params&&!rl(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?rl(l.search,s.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??b7,parseSearch:e.parseSearch??y7,protocolAllowlist:e.protocolAllowlist??Y8}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=IP(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n;let{matchedRoutes:s}=n,l=!1;(r?r.path!=="/"&&o["**"]:ss(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:l=!0);const c=l?F7(this.options.notFoundMode,s):void 0,d=new Array(s.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<s.length;p++){const h=s[p],g=d[p-1];let v,y,b;{const B=g?.search??e.search,z=g?._strictSearch??void 0;try{const K=dm(h.options.validateSearch,{...B})??void 0;v={...B,...K},y={...z,...K},b=void 0}catch(K){let oe=K;if(K instanceof Im||(oe=new Im(K.message,{cause:K})),t?.throwOnError)throw oe;v=B,y={},b=oe}}const x=h.options.loaderDeps?.({search:v})??"",w=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:T}=KO({path:h.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),R=h.id+E+w,O=this.getMatch(R),A=f.get(h.id),I=O?._strictParams??T;let P;if(!O)try{iT(h,I)}catch(B){if(Tr(B)||Wr(B)?P=B:P=new L7(B.message,{cause:B}),t?.throwOnError)throw P}Object.assign(o,I);const L=A?"stay":"enter";let H;if(O)H={...O,cause:L,params:A?.params??o,_strictParams:I,search:Ua(A?A.search:O.search,v),_strictSearch:y};else{const B=h.options.loader||h.options.beforeLoad||h.lazyFn||$P(h)?"pending":"success";H={id:R,ssr:h.options.ssr,index:p,routeId:h.id,params:A?.params??o,_strictParams:I,pathname:E,updatedAt:Date.now(),search:A?Ua(A.search,v):v,_strictSearch:y,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Fc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:A?Ja(A.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}t?.preload||(H.globalNotFound=c===h.id),H.searchError=b;const j=this.getParentContext(g);H.context={...j,...H.__routeContext,...H.__beforeLoadContext},d[p]=H}for(let p=0;p<d.length;p++){const h=d[p],g=this.looseRoutesById[h.routeId],v=this.getMatch(h.id),y=f.get(h.routeId);if(h.params=y?Ua(y.params,o):o,!v){const b=d[p-1],x=this.getParentContext(b);if(g.options.context){const w={deps:h.loaderDeps,params:h.params,context:x??{},location:e,navigate:E=>this.navigate({...E,_fromLocation:e}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:d,routeId:g.id};h.__routeContext=g.options.context(w)??void 0}h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=Vd(t),o={...e.search};for(const f of t)try{Object.assign(o,dm(f.options.validateSearch,o))}catch{}const s=Vd(this.stores.matchesId.get()),l=s&&this.stores.matchStores.get(s)?.get(),c=l&&l.routeId===r.id&&l.pathname===e.pathname;let d;if(c)d=l.params;else{const f=Object.assign(Object.create(null),n);for(const p of t)try{iT(p,f)}catch{}d=f}return{matchedRoutes:t,fullPath:r.fullPath,search:o,params:d}}},Im=class extends Error{},L7=class extends Error{};function $7(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function dm(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Im("Async validation not supported");if(n.issues)throw new Im(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 j7({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=ss(e);let s;const l=n7(o,n,!0);return l&&(s=l.route,Object.assign(r,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:r,foundRoute:s}}function U7({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return z7(n)(e,t,r??!1)}function z7(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:l,next:c})=>{let d=l;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(d=o.options.preSearchFilters.reduce((p,h)=>h(p),l));const f=c(d);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,h)=>h(p),f):f};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:l,next:c})=>{const d=c(l);if(!t._includeValidateSearch)return d;try{return{...d,...dm(o.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:na(s.search,o):{}};t.middlewares.push(n);const r=(o,s,l)=>{if(o>=l.length)return s;const c=l[o];return c({search:s,next:f=>r(o+1,f,l)})};return function(s,l,c){return t.dest=l,t._includeValidateSearch=c,r(0,s,t.middlewares)}}function F7(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return ol}function iT(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const r=n(t);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,r)}}const B7="Error preloading route! ☝️";var jP=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=ol:this.parentRoute||cs();let o=r?ol:n?.path;o&&o!=="/"&&(o=MP(o));const s=n?.id||o;let l=r?ol:cm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),l!=="__root__"&&(l=cm(["/",l]));const c=l==="__root__"?"/":cm([this.parentRoute.fullPath,o]);this._path=o,this._id=l,this._fullPath=c,this._to=ss(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Pd({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},V7=class extends jP{constructor(e){super(e)}};function H7(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function Iw(e){const t=e.errorComponent??Mw;return C.jsx(q7,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?M.createElement(t,{error:n,reset:r}):e.children})}var q7=class extends M.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Mw({error:e}){const[t,n]=M.useState(!1);return C.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[C.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),C.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"})]}),C.jsx("div",{style:{height:".25rem"}}),t?C.jsx("div",{children:C.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?C.jsx("code",{children:e.message}):null})}):null]})}function G7({children:e,fallback:t=null}){return UP()?C.jsx(ee.Fragment,{children:e}):C.jsx(ee.Fragment,{children:t})}function UP(){return ee.useSyncExternalStore(K7,()=>!0,()=>!1)}function K7(){return()=>{}}var zP=M.createContext(null);function bo(e){return M.useContext(zP)}var Mg=M.createContext(void 0),Z7=M.createContext(void 0),pn=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(pn||{});function Y7({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:l,shallowPropagate:c};function r(f,p,h){const g=p.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:p.deps;if(v!==void 0&&v.dep===f){v.version=h,p.depsTail=v;return}const y=f.subsTail;if(y!==void 0&&y.version===h&&y.sub===p)return;const b=p.depsTail=f.subsTail={version:h,dep:f,sub:p,prevDep:g,nextDep:v,prevSub:y,nextSub:void 0};v!==void 0&&(v.prevDep=b),g!==void 0?g.nextDep=b:p.deps=b,y!==void 0?y.nextSub=b:f.subs=b}function o(f,p=f.sub){const h=f.dep,g=f.prevDep,v=f.nextDep,y=f.nextSub,b=f.prevSub;return v!==void 0?v.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=v:p.deps=v,y!==void 0?y.prevSub=b:h.subsTail=b,b!==void 0?b.nextSub=y:(h.subs=y)===void 0&&n(h),v}function s(f){let p=f.nextSub,h;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&d(f,g)?(g.flags=v|40,v&=1):v=0:g.flags=v&-9|32:v=0:g.flags=v|32,v&2&&t(g),v&1){const y=g.subs;if(y!==void 0){const b=(f=y).nextSub;b!==void 0&&(h={value:p,prev:h},p=b);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;h!==void 0;)if(f=h.value,h=h.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let h,g=0,v=!1;e:do{const y=f.dep,b=y.flags;if(p.flags&16)v=!0;else if((b&17)===17){if(e(y)){const x=y.subs;x.nextSub!==void 0&&c(x),v=!0}}else if((b&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=y.deps,p=y,++g;continue}if(!v){const x=f.nextDep;if(x!==void 0){f=x;continue}}for(;g--;){const x=p.subs,w=x.nextSub!==void 0;if(w?(f=h.value,h=h.prev):f=x,v){if(e(p)){w&&c(x),p=f.sub;continue}v=!1}else p.flags&=-33;p=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return v}while(!0)}function c(f){do{const p=f.sub,h=p.flags;(h&48)===32&&(p.flags=h|16,(h&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function d(f,p){let h=p.depsTail;for(;h!==void 0;){if(h===f)return!0;h=h.prevDep}return!1}}function W7(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const jb=[];let fm=0;const{link:sT,unlink:Q7,propagate:X7,checkDirty:FP,shallowPropagate:aT}=Y7({update(e){return e._update()},notify(e){jb[Ub++]=e,e.flags&=~pn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=pn.Mutable|pn.Dirty,Mm(e))}});let qh=0,Ub=0,mi,zb=0;function BP(e){try{++zb,e()}finally{--zb||VP()}}function Mm(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Q7(n,e)}function VP(){if(!(zb>0)){for(;qh<Ub;){const e=jb[qh];jb[qh++]=void 0,e.notify()}qh=0,Ub=0}}function lT(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?pn.None:pn.Mutable,get(){return mi!==void 0&&sT(o,mi,fm),o._snapshot},subscribe(s){const l=W7(s),c={current:!1},d=J7(()=>{o.get(),c.current?l.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(s){const l=mi,c=t?.compare??Object.is;if(n)mi=o,++fm,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=pn.Mutable|pn.RecursedCheck);try{const d=o._snapshot,f=typeof s=="function"?s(d):s===void 0&&n?r(d):s;return d===void 0||!c(d,f)?(o._snapshot=f,!0):!1}finally{mi=l,n&&(o.flags&=~pn.RecursedCheck),Mm(o)}}};return n?(o.flags=pn.Mutable|pn.Dirty,o.get=function(){const s=o.flags;if(s&pn.Dirty||s&pn.Pending&&FP(o.deps,o)){if(o._update()){const l=o.subs;l!==void 0&&aT(l)}}else s&pn.Pending&&(o.flags=s&~pn.Pending);return mi!==void 0&&sT(o,mi,fm),o._snapshot}):o.set=function(s){if(o._update(s)){const l=o.subs;l!==void 0&&(X7(l),aT(l),VP())}},o}function J7(e){const t=()=>{const r=mi;mi=n,++fm,n.depsTail=void 0,n.flags=pn.Watching|pn.RecursedCheck;try{return e()}finally{mi=r,n.flags&=~pn.RecursedCheck,Mm(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:pn.Watching|pn.RecursedCheck,notify(){const r=this.flags;r&pn.Dirty||r&pn.Pending&&FP(this.deps,this)?t():this.flags=pn.Watching},stop(){this.flags=pn.None,this.depsTail=void 0,Mm(this)}};return t(),n}var B_={exports:{}},V_={},H_={exports:{}},q_={};var cT;function eU(){if(cT)return q_;cT=1;var e=ga();function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(h,g){var v=g(),y=r({inst:{value:v,getSnapshot:g}}),b=y[0].inst,x=y[1];return s(function(){b.value=v,b.getSnapshot=g,d(b)&&x({inst:b})},[h,v,g]),o(function(){return d(b)&&x({inst:b}),h(function(){d(b)&&x({inst:b})})},[h]),l(v),v}function d(h){var g=h.getSnapshot;h=h.value;try{var v=g();return!n(h,v)}catch{return!0}}function f(h,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return q_.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,q_}var uT;function HP(){return uT||(uT=1,H_.exports=eU()),H_.exports}var dT;function tU(){if(dT)return V_;dT=1;var e=ga(),t=HP();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return V_.useSyncExternalStoreWithSelector=function(f,p,h,g,v){var y=s(null);if(y.current===null){var b={hasValue:!1,value:null};y.current=b}else b=y.current;y=c(function(){function w(A){if(!E){if(E=!0,T=A,A=g(A),v!==void 0&&b.hasValue){var I=b.value;if(v(I,A))return R=I}return R=A}if(I=R,r(T,A))return I;var P=g(A);return v!==void 0&&v(I,P)?(T=A,I):(T=A,R=P)}var E=!1,T,R,O=h===void 0?null:h;return[function(){return w(p())},O===null?void 0:function(){return w(O())}]},[p,h,g,v]);var x=o(f,y[0],y[1]);return l(function(){b.hasValue=!0,b.value=x},[x]),d(x),x},V_}var fT;function nU(){return fT||(fT=1,B_.exports=tU()),B_.exports}var qP=nU();const aue=ma(qP);function rU(e,t){return e===t}function yo(e,t,n=rU){const r=M.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),o=M.useCallback(()=>e?.get(),[e]);return qP.useSyncExternalStoreWithSelector(r,o,o,t,n)}var oU={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function dl(e){const t=bo(),n=M.useContext(e.from?Z7:Mg),r=e.from??n,o=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=M.useRef(void 0);return yo(o??oU,l=>{if((e.shouldThrow??!0)&&!l&&cs(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const d=Ja(s.current,c);return s.current=d,d}return c})}function GP(e){return dl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function KP(e){const{select:t,...n}=e;return dl({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Pw(e){return dl({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 ZP(e){return dl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Pg(e){const t=bo();return M.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function lue(e){const t=bo(),n=Pg(),r=M.useRef(null);return xc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function YP(e){return dl({...e,select:t=>e.select?e.select(t.context):t.context})}var Ng=iP();const WP=ma(Ng);function iU(e,t){const n=bo(),r=H8(t),{activeProps:o,inactiveProps:s,activeOptions:l,to:c,preload:d,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:h,replace:g,startTransition:v,resetScroll:y,viewTransition:b,children:x,target:w,disabled:E,style:T,className:R,onClick:O,onBlur:A,onFocus:I,onMouseEnter:P,onMouseLeave:L,onTouchStart:H,ignoreBlocker:j,params:B,search:z,hash:K,state:oe,mask:q,reloadDocument:W,unsafeRelative:te,from:le,_fromLocation:Q,...k}=e,G=UP(),V=M.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),D=yo(n.stores.location,ne=>ne,(ne,ae)=>ne.href===ae.href),F=M.useMemo(()=>{const ne={_fromLocation:D,...V};return n.buildLocation(ne)},[n,D,V]),X=F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,fe=F.maskedLocation?F.maskedLocation.external:F.external,pe=M.useMemo(()=>dU(X,fe,n.history,E),[E,fe,X,n.history]),xe=M.useMemo(()=>{if(pe?.external)return Tm(pe.href,n.protocolAllowlist)?void 0:pe.href;if(!fU(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Tm(c,n.protocolAllowlist)?void 0:c}catch{}},[c,pe,n.protocolAllowlist]),je=M.useMemo(()=>{if(xe)return!1;if(l?.exact){if(!l7(D.pathname,F.pathname,n.basepath))return!1}else{const ne=Cm(D.pathname,n.basepath),ae=Cm(F.pathname,n.basepath);if(!(ne.startsWith(ae)&&(ne.length===ae.length||ne[ae.length]==="/")))return!1}return(l?.includeSearch??!0)&&!rl(D.search,F.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?G&&D.hash===F.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,D,xe,G,F.hash,F.pathname,F.search,n.basepath]),Y=je?na(o,{})??sU:G_,re=je?G_:na(s,{})??G_,ve=[R,Y.className,re.className].filter(Boolean).join(" "),se=(T||Y.style||re.style)&&{...T,...Y.style,...re.style},[Se,Te]=M.useState(!1),tt=M.useRef(!1),rt=e.reloadDocument||xe?!1:d??n.options.defaultPreload,Be=f??n.options.defaultPreloadDelay??0,Qe=M.useCallback(()=>{n.preloadRoute({...V,_builtLocation:F}).catch(ne=>{console.warn(ne),console.warn(B7)})},[n,V,F]);V8(r,M.useCallback(ne=>{ne?.isIntersecting&&Qe()},[Qe]),uU,{disabled:!!E||rt!=="viewport"}),M.useEffect(()=>{tt.current||!E&&rt==="render"&&(Qe(),tt.current=!0)},[E,Qe,rt]);const Pe=ne=>{const ae=ne.currentTarget.getAttribute("target"),Re=w!==void 0?w:ae;if(!E&&!hU(ne)&&!ne.defaultPrevented&&(!Re||Re==="_self")&&ne.button===0){ne.preventDefault(),Ng.flushSync(()=>{Te(!0)});const Ae=n.subscribe("onResolved",()=>{Ae(),Te(!1)});n.navigate({...V,replace:g,resetScroll:y,hashScrollIntoView:h,startTransition:v,viewTransition:b,ignoreBlocker:j})}};if(xe)return{...k,ref:r,href:xe,...x&&{children:x},...w&&{target:w},...E&&{disabled:E},...T&&{style:T},...R&&{className:R},...O&&{onClick:O},...A&&{onBlur:A},...I&&{onFocus:I},...P&&{onMouseEnter:P},...L&&{onMouseLeave:L},...H&&{onTouchStart:H}};const Me=ne=>{if(E||rt!=="intent")return;if(!Be){Qe();return}const ae=ne.currentTarget;if(Ju.has(ae))return;const Re=setTimeout(()=>{Ju.delete(ae),Qe()},Be);Ju.set(ae,Re)},ze=ne=>{E||rt!=="intent"||Qe()},Z=ne=>{if(E||!rt||!Be)return;const ae=ne.currentTarget,Re=Ju.get(ae);Re&&(clearTimeout(Re),Ju.delete(ae))};return{...k,...Y,...re,href:pe?.href,ref:r,onClick:rc([O,Pe]),onBlur:rc([A,Z]),onFocus:rc([I,Me]),onMouseEnter:rc([P,Me]),onMouseLeave:rc([L,Z]),onTouchStart:rc([H,ze]),disabled:!!E,target:w,...se&&{style:se},...ve&&{className:ve},...E&&aU,...je&&lU,...G&&Se&&cU}}var G_={},sU={className:"active"},aU={role:"link","aria-disabled":!0},lU={"data-status":"active","aria-current":"page"},cU={"data-transitioning":"transitioning"},Ju=new WeakMap,uU={rootMargin:"100px"},rc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function dU(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function fU(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var kg=M.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=iU(r,t),l=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...d}=s;return M.createElement("a",d,l)}return M.createElement(n,s,l)});function hU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var pU=class extends jP{constructor(e){super(e),this.useMatch=t=>dl({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>YP({...t,from:this.id}),this.useSearch=t=>ZP({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Pw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>KP({...t,from:this.id}),this.useLoaderData=t=>GP({...t,from:this.id}),this.useNavigate=()=>Pg({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(kg,{ref:n,from:this.fullPath,...t}))}};function st(e){return new pU(e)}var mU=class extends V7{constructor(e){super(e),this.useMatch=t=>dl({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>YP({...t,from:this.id}),this.useSearch=t=>ZP({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Pw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>KP({...t,from:this.id}),this.useLoaderData=t=>GP({...t,from:this.id}),this.useNavigate=()=>Pg({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(kg,{ref:n,from:this.fullPath,...t}))}};function gU(e){return new mU(e)}function dt(e,t){let n,r,o,s;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(o=d,K8(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),s=!0)}})),n),c=function(f){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(zO)zO(l());else throw l();return M.createElement(r,f)};return c.preload=l,c}function vU(e){const t=bo(),n=`not-found-${yo(t.stores.location,r=>r.pathname)}-${yo(t.stores.status,r=>r)}`;return C.jsx(Iw,{getResetKey:()=>n,onCatch:(r,o)=>{if(Tr(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Tr(r))return e.fallback?.(r);throw r},children:e.children})}function _U(){return C.jsx("p",{children:"Not Found"})}function yc(e){return C.jsx(C.Fragment,{children:e.children})}function QP(e,t,n){return t.options.notFoundComponent?C.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?C.jsx(e.options.defaultNotFoundComponent,{...n}):C.jsx(_U,{})}function yU(e){return null}function bU(){return yU(bo()),null}var XP=M.memo(function({matchId:t}){const n=bo(),r=n.stores.matchStores.get(t);r||cs();const o=yo(n.stores.loadedAt,l=>l),s=yo(r,l=>l);return C.jsx(wU,{router:n,matchId:t,resetKey:o,matchState:M.useMemo(()=>{const l=s.routeId,c=n.routesById[l].parentRoute?.id;return{routeId:l,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:c}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function wU({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,l=s?C.jsx(s,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,d=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",h=(!o.isRoot||o.options.wrapInSuspense||p)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||p))?M.Suspense:yc,g=c?Iw:yc,v=f?vU:yc;return C.jsxs(o.isRoot?o.options.shellComponent??yc:yc,{children:[C.jsx(Mg.Provider,{value:t,children:C.jsx(h,{fallback:l,children:C.jsx(g,{getResetKey:()=>n,errorComponent:c||Mw,onCatch:(y,b)=>{if(Tr(y))throw y.routeId??=r.routeId,y;d?.(y,b)},children:C.jsx(v,{fallback:y=>{if(y.routeId??=r.routeId,!f||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!o.isRoot)throw y;return M.createElement(f,y)},children:p||r._displayPending?C.jsx(G7,{fallback:l,children:C.jsx(hT,{matchId:t})}):C.jsx(hT,{matchId:t})})})})}),r.parentRouteId===ol?C.jsxs(C.Fragment,{children:[C.jsx(SU,{resetKey:n}),e.options.scrollRestoration&&xP?C.jsx(bU,{}):null]}):null]})}function SU({resetKey:e}){const t=bo(),n=M.useRef(void 0);return xc(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Mc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var hT=M.memo(function({matchId:t}){const n=bo(),r=(p,h)=>n.getMatch(p.id)?._nonReactive[h]??p._nonReactive[h],o=n.stores.matchStores.get(t);o||cs();const s=yo(o,p=>p),l=s.routeId,c=n.routesById[l],d=M.useMemo(()=>{const p=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return p?JSON.stringify(p):void 0},[l,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=M.useMemo(()=>{const p=c.options.component??n.options.defaultComponent;return p?C.jsx(p,{},d):C.jsx(JP,{})},[d,c.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const p=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const h=n.getMatch(s.id);if(h&&!h._nonReactive.minPendingPromise){const g=Fc();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},p)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Tr(s.error)||cs(),QP(n,c,s.error);if(s.status==="redirected")throw Wr(s.error)||cs(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),JP=M.memo(function(){const t=bo(),n=M.useContext(Mg);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=yo(f,p=>[p?.routeId,p?.globalNotFound??!1]),s=yo(t.stores.matchesId,p=>p[p.findIndex(h=>h===n)+1])}const l=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?C.jsx(t.options.defaultPendingComponent,{}):null;if(o)return l||cs(),QP(t,l,void 0);if(!s)return null;const d=C.jsx(XP,{matchId:s});return r===ol?C.jsx(M.Suspense,{fallback:c,children:d}):d});function EU(){const e=bo(),t=M.useRef({router:e,mounted:!1}),[n,r]=M.useState(!1),o=yo(e.stores.isLoading,h=>h),s=yo(e.stores.hasPending,h=>h),l=D_(o),c=o||n||s,d=D_(c),f=o||s,p=D_(f);return e.startTransition=h=>{r(!0),M.startTransition(()=>{h(),r(!1)})},M.useEffect(()=>{const h=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ss(e.latestLocation.publicHref)!==ss(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{h()}},[e,e.history]),xc(()=>{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]),xc(()=>{l&&!o&&e.emit({type:"onLoad",...Mc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,o]),xc(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...Mc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,p,e]),xc(()=>{if(d&&!c){const h=Mc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...h}),BP(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),h.hrefChanged&&H7(e)}},[c,d,e]),null}function xU(){const e=bo(),t=e.routesById[ol].options.pendingComponent??e.options.defaultPendingComponent,n=t?C.jsx(t,{}):null,r=C.jsxs(typeof document<"u"&&e.ssr?yc:M.Suspense,{fallback:n,children:[C.jsx(EU,{}),C.jsx(RU,{})]});return e.options.InnerWrap?C.jsx(e.options.InnerWrap,{children:r}):r}function RU(){const e=bo(),t=yo(e.stores.firstId,o=>o),n=yo(e.stores.loadedAt,o=>o),r=t?C.jsx(XP,{matchId:t}):null;return C.jsx(Mg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:C.jsx(Iw,{getResetKey:()=>n,errorComponent:Mw,onCatch:void 0,children:r})})}var OU=e=>({createMutableStore:lT,createReadonlyStore:lT,batch:BP}),TU=e=>new CU(e),CU=class extends D7{constructor(e){super(e,OU)}};function AU({router:e,children:t,...n}){OP(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=C.jsx(zP.Provider,{value:e,children:t});return e.options.Wrap?C.jsx(e.options.Wrap,{children:r}):r}function IU({router:e,...t}){return C.jsx(AU,{router:e,...t,children:C.jsx(xU,{})})}var MU={},pT={};const hm=Object.create(null),ed=e=>MU||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?hm:globalThis),Do=new Proxy(hm,{get(e,t){return ed()[t]??hm[t]},has(e,t){return t in ed()||t in hm},set(e,t,n){const r=ed(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=ed(!0);return delete n[t],!0},ownKeys(){const e=ed(!0);return Object.keys(e)}});function Fn(e,t){return typeof process<"u"&&pT?pT[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const td=1,rr=4,_i=8,po=24,mT={eterm:rr,cons25:rr,console:rr,cygwin:rr,dtterm:rr,gnome:rr,hurd:rr,jfbterm:rr,konsole:rr,kterm:rr,mlterm:rr,mosh:po,putty:rr,st:rr,"rxvt-unicode-24bit":po,terminator:po,"xterm-kitty":po},PU=new Map(Object.entries({APPVEYOR:_i,BUILDKITE:_i,CIRCLECI:po,DRONE:_i,GITEA_ACTIONS:po,GITHUB_ACTIONS:po,GITLAB_CI:_i,TRAVIS:_i})),NU=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function kU(){if(Fn("FORCE_COLOR")!==void 0)switch(Fn("FORCE_COLOR")){case"":case"1":case"true":return rr;case"2":return _i;case"3":return po;default:return td}if(Fn("NODE_DISABLE_COLORS")!==void 0&&Fn("NODE_DISABLE_COLORS")!==""||Fn("NO_COLOR")!==void 0&&Fn("NO_COLOR")!==""||Fn("TERM")==="dumb")return td;if(Fn("TMUX"))return po;if("TF_BUILD"in Do&&"AGENT_NAME"in Do)return rr;if("CI"in Do){for(const{0:e,1:t}of PU)if(e in Do)return t;return Fn("CI_NAME")==="codeship"?_i:td}if("TEAMCITY_VERSION"in Do)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Fn("TEAMCITY_VERSION"))!==null?rr:td;switch(Fn("TERM_PROGRAM")){case"iTerm.app":return!Fn("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Fn("TERM_PROGRAM_VERSION"))!==null?_i:po;case"HyperTerm":case"MacTerm":return po;case"Apple_Terminal":return _i}if(Fn("COLORTERM")==="truecolor"||Fn("COLORTERM")==="24bit")return po;if(Fn("TERM")){if(/truecolor/.exec(Fn("TERM"))!==null)return po;if(/^xterm-256/.exec(Fn("TERM"))!==null)return _i;const e=Fn("TERM").toLowerCase();if(mT[e])return mT[e];if(NU.some(t=>t.exec(e)!==null))return rr}return Fn("COLORTERM")?rr:td}const yi={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"}},Fb=["debug","info","success","warn","error"];function DU(e,t){return Fb.indexOf(t)>=Fb.indexOf(e)}const LU={info:yi.fg.blue,success:yi.fg.green,warn:yi.fg.yellow,error:yi.fg.red,debug:yi.fg.magenta},$U=(e,t,n)=>{const r=new Date().toISOString();return n?`${yi.dim}${r}${yi.reset} ${LU[e]}${e.toUpperCase()}${yi.reset} ${yi.bright}[Better Auth]:${yi.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},jU=e=>{const t="warn",n=kU()!==1,r=(o,s,l=[])=>{if(!DU(t,o))return;const c=$U(o,s,n);{o==="error"?console.error(c,...l):o==="warn"?console.warn(c,...l):console.log(c,...l);return}};return{...Object.fromEntries(Fb.map(o=>[o,(...[s,...l])=>r(o,s,l)])),get level(){return t}}};jU();const UU=Object.freeze({status:"aborted"});function _e(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);const f=l.prototype,p=Object.keys(f);for(let h=0;h<p.length;h++){const g=p[h];g in c||(c[g]=f[g].bind(c))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function l(c){var d;const f=n?.Parent?new s:this;r(f,c),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Pc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const t3={};function ua(e){return t3}function n3(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Bb(e,t){return typeof t=="bigint"?t.toString():t}function Dg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function uf(e){return e==null}function Nw(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zU(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const s=n>o?n:o,l=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return l%c/10**s}const gT=Symbol("evaluating");function It(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==gT)return r===void 0&&(r=gT,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function fl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function va(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function vT(e){return JSON.stringify(e)}function FU(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const r3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Kd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const BU=Dg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Bc(e){if(Kd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Kd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function o3(e){return Bc(e)?{...e}:Array.isArray(e)?[...e]:e}const VU=new Set(["string","number","symbol"]);function Vc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _a(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Fe(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 HU(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const qU={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 GU(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 s=va(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return fl(this,"shape",l),l},checks:[]});return _a(e,s)}function KU(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 s=va(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return fl(this,"shape",l),l},checks:[]});return _a(e,s)}function ZU(e,t){if(!Bc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(s,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=va(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return fl(this,"shape",s),s}});return _a(e,o)}function YU(e,t){if(!Bc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=va(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return fl(this,"shape",r),r}});return _a(e,n)}function WU(e,t){const n=va(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return fl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return _a(e,n)}function QU(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=va(t._zod.def,{get shape(){const c=t._zod.def.shape,d={...c};if(n)for(const f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)d[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return fl(this,"shape",d),d},checks:[]});return _a(t,l)}function XU(e,t,n){const r=va(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)s[l]=new e({type:"nonoptional",innerType:o[l]});return fl(this,"shape",s),s}});return _a(t,r)}function Rc(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 tl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Gh(e){return typeof e=="string"?e:e?.message}function da(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Gh(e.inst?._zod.def?.error?.(e))??Gh(t?.error?.(e))??Gh(n.customError?.(e))??Gh(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function i3(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function kw(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Zd(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const s3=(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,Bb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dw=_e("$ZodError",s3),Lg=_e("$ZodError",s3,{Parent:Error});function JU(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function ez(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(s))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return r(e),n}const $g=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new Pc;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>da(d,s,ua())));throw r3(c,o?.callee),c}return l.value},tz=$g(Lg),jg=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>da(d,s,ua())));throw r3(c,o?.callee),c}return l.value},nz=jg(Lg),Ug=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Pc;return s.issues.length?{success:!1,error:new(e??Dw)(s.issues.map(l=>da(l,o,ua())))}:{success:!0,data:s.value}},rz=Ug(Lg),zg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>da(l,o,ua())))}:{success:!0,data:s.value}},oz=zg(Lg),iz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $g(e)(t,n,o)},sz=e=>(t,n,r)=>$g(e)(t,n,r),az=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jg(e)(t,n,o)},lz=e=>async(t,n,r)=>jg(e)(t,n,r),cz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ug(e)(t,n,o)},uz=e=>(t,n,r)=>Ug(e)(t,n,r),dz=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zg(e)(t,n,o)},fz=e=>async(t,n,r)=>zg(e)(t,n,r),hz=/^[cC][^\s-]{8,}$/,pz=/^[0-9a-z]+$/,mz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gz=/^[0-9a-vA-V]{20}$/,vz=/^[A-Za-z0-9]{27}$/,_z=/^[a-zA-Z0-9_-]{21}$/,yz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bz=/^([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})$/,_T=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)$/,wz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Sz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ez(){return new RegExp(Sz,"u")}const xz=/^(?:(?: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])$/,Rz=/^(([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}|:))$/,Oz=/^((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])$/,Tz=/^(([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])$/,Cz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,a3=/^[A-Za-z0-9_-]*$/,Az=/^\+[1-9]\d{6,14}$/,l3="(?:(?:\\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])))",Iz=new RegExp(`^${l3}$`);function c3(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 Mz(e){return new RegExp(`^${c3(e)}$`)}function Pz(e){const t=c3({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(`^${l3}T(?:${r})$`)}const Nz=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},kz=/^-?\d+$/,u3=/^-?\d+(?:\.\d+)?$/,Dz=/^(?:true|false)$/i,Lz=/^null$/i,$z=/^undefined$/i,jz=/^[^A-Z]*$/,Uz=/^[^a-z]*$/,_r=_e("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),d3={number:"number",bigint:"bigint",object:"date"},f3=_e("$ZodCheckLessThan",(e,t)=>{_r.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.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})}}),h3=_e("$ZodCheckGreaterThan",(e,t)=>{_r.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.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})}}),zz=_e("$ZodCheckMultipleOf",(e,t)=>{_r.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):zU(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})}}),Fz=_e("$ZodCheckNumberFormat",(e,t)=>{_r.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=qU[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,n&&(c.pattern=kz)}),e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,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}):l.issues.push({input:c,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}}c<o&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Bz=_e("$ZodCheckMaxSize",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;o.size<=t.maximum||r.issues.push({origin:i3(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vz=_e("$ZodCheckMinSize",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;o.size>=t.minimum||r.issues.push({origin:i3(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Hz=_e("$ZodCheckMaxLength",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=kw(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qz=_e("$ZodCheckMinLength",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=kw(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Gz=_e("$ZodCheckLengthEquals",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const l=kw(o),c=s>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Fg=_e("$ZodCheckStringFormat",(e,t)=>{var n,r;_r.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Kz=_e("$ZodCheckRegex",(e,t)=>{Fg.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})}}),Zz=_e("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jz),Fg.init(e,t)}),Yz=_e("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Uz),Fg.init(e,t)}),Wz=_e("$ZodCheckIncludes",(e,t)=>{_r.init(e,t);const n=Vc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Qz=_e("$ZodCheckStartsWith",(e,t)=>{_r.init(e,t);const n=new RegExp(`^${Vc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.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})}}),Xz=_e("$ZodCheckEndsWith",(e,t)=>{_r.init(e,t);const n=new RegExp(`.*${Vc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.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})}}),Jz=_e("$ZodCheckMimeType",(e,t)=>{_r.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})}}),e9=_e("$ZodCheckOverwrite",(e,t)=>{_r.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class t9{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(`
10
+ `).replace(rj,"")}function U2(i,a){return a=j2(a),j2(i)===a}function Yt(i,a,u,m,_,S){switch(u){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||Rl(i,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&Rl(i,""+m);break;case"className":If(i,"class",m);break;case"tabIndex":If(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":If(i,u,m);break;case"style":UE(i,m,S);break;case"data":if(a!=="object"){If(i,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||u!=="href")){i.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=Pf(""+m),i.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(u,"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 S=="function"&&(u==="formAction"?(a!=="input"&&Yt(i,a,"name",_.name,_,null),Yt(i,a,"formEncType",_.formEncType,_,null),Yt(i,a,"formMethod",_.formMethod,_,null),Yt(i,a,"formTarget",_.formTarget,_,null)):(Yt(i,a,"encType",_.encType,_,null),Yt(i,a,"method",_.method,_,null),Yt(i,a,"target",_.target,_,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(u);break}m=Pf(""+m),i.setAttribute(u,m);break;case"onClick":m!=null&&(i.onclick=Ni);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(_.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}u=Pf(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""+m):i.removeAttribute(u);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":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":m===!0?i.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(u,m):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(u,m):i.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(u):i.setAttribute(u,m);break;case"popover":St("beforetoggle",i),St("toggle",i),Af(i,"popover",m);break;case"xlinkActuate":Pi(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Pi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Pi(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Pi(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Pi(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Pi(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Pi(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Pi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Pi(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Af(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=ML.get(u)||u,Af(i,u,m))}}function c_(i,a,u,m,_,S){switch(u){case"style":UE(i,m,S);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(_.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof m=="string"?Rl(i,m):(typeof m=="number"||typeof m=="bigint")&&Rl(i,""+m);break;case"onScroll":m!=null&&St("scroll",i);break;case"onScrollEnd":m!=null&&St("scrollend",i);break;case"onClick":m!=null&&(i.onclick=Ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!IE.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(_=u.endsWith("Capture"),a=u.slice(2,_?u.length-7:void 0),S=i[Ur]||null,S=S!=null?S[u]:null,typeof S=="function"&&i.removeEventListener(a,S,_),typeof m=="function")){typeof S!="function"&&S!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(a,m,_);break e}u in i?i[u]=m:m===!0?i.setAttribute(u,""):Af(i,u,m)}}}function dr(i,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":St("error",i),St("load",i);var m=!1,_=!1,S;for(S in u)if(u.hasOwnProperty(S)){var N=u[S];if(N!=null)switch(S){case"src":m=!0;break;case"srcSet":_=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Yt(i,a,S,N,u,null)}}_&&Yt(i,a,"srcSet",u.srcSet,u,null),m&&Yt(i,a,"src",u.src,u,null);return;case"input":St("invalid",i);var U=S=N=_=null,J=null,de=null;for(m in u)if(u.hasOwnProperty(m)){var ye=u[m];if(ye!=null)switch(m){case"name":_=ye;break;case"type":N=ye;break;case"checked":J=ye;break;case"defaultChecked":de=ye;break;case"value":S=ye;break;case"defaultValue":U=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,a));break;default:Yt(i,a,m,ye,u,null)}}DE(i,S,U,J,de,N,_,!1);return;case"select":St("invalid",i),m=N=S=null;for(_ in u)if(u.hasOwnProperty(_)&&(U=u[_],U!=null))switch(_){case"value":S=U;break;case"defaultValue":N=U;break;case"multiple":m=U;default:Yt(i,a,_,U,u,null)}a=S,u=N,i.multiple=!!m,a!=null?xl(i,!!m,a,!1):u!=null&&xl(i,!!m,u,!0);return;case"textarea":St("invalid",i),S=_=m=null;for(N in u)if(u.hasOwnProperty(N)&&(U=u[N],U!=null))switch(N){case"value":m=U;break;case"defaultValue":_=U;break;case"children":S=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(91));break;default:Yt(i,a,N,U,u,null)}$E(i,m,_,S);return;case"option":for(J in u)u.hasOwnProperty(J)&&(m=u[J],m!=null)&&(J==="selected"?i.selected=m&&typeof m!="function"&&typeof m!="symbol":Yt(i,a,J,m,u,null));return;case"dialog":St("beforetoggle",i),St("toggle",i),St("cancel",i),St("close",i);break;case"iframe":case"object":St("load",i);break;case"video":case"audio":for(m=0;m<Uu.length;m++)St(Uu[m],i);break;case"image":St("error",i),St("load",i);break;case"details":St("toggle",i);break;case"embed":case"source":case"link":St("error",i),St("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in u)if(u.hasOwnProperty(de)&&(m=u[de],m!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,a));default:Yt(i,a,de,m,u,null)}return;default:if(Ev(a)){for(ye in u)u.hasOwnProperty(ye)&&(m=u[ye],m!==void 0&&c_(i,a,ye,m,u,void 0));return}}for(U in u)u.hasOwnProperty(U)&&(m=u[U],m!=null&&Yt(i,a,U,m,u,null))}function oj(i,a,u,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var _=null,S=null,N=null,U=null,J=null,de=null,ye=null;for(ge in u){var Ee=u[ge];if(u.hasOwnProperty(ge)&&Ee!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":J=Ee;default:m.hasOwnProperty(ge)||Yt(i,a,ge,null,m,Ee)}}for(var he in m){var ge=m[he];if(Ee=u[he],m.hasOwnProperty(he)&&(ge!=null||Ee!=null))switch(he){case"type":S=ge;break;case"name":_=ge;break;case"checked":de=ge;break;case"defaultChecked":ye=ge;break;case"value":N=ge;break;case"defaultValue":U=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,a));break;default:ge!==Ee&&Yt(i,a,he,ge,m,Ee)}}wv(i,N,U,J,de,ye,S,_);return;case"select":ge=N=U=he=null;for(S in u)if(J=u[S],u.hasOwnProperty(S)&&J!=null)switch(S){case"value":break;case"multiple":ge=J;default:m.hasOwnProperty(S)||Yt(i,a,S,null,m,J)}for(_ in m)if(S=m[_],J=u[_],m.hasOwnProperty(_)&&(S!=null||J!=null))switch(_){case"value":he=S;break;case"defaultValue":U=S;break;case"multiple":N=S;default:S!==J&&Yt(i,a,_,S,m,J)}a=U,u=N,m=ge,he!=null?xl(i,!!u,he,!1):!!m!=!!u&&(a!=null?xl(i,!!u,a,!0):xl(i,!!u,u?[]:"",!1));return;case"textarea":ge=he=null;for(U in u)if(_=u[U],u.hasOwnProperty(U)&&_!=null&&!m.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:Yt(i,a,U,null,m,_)}for(N in m)if(_=m[N],S=u[N],m.hasOwnProperty(N)&&(_!=null||S!=null))switch(N){case"value":he=_;break;case"defaultValue":ge=_;break;case"children":break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:_!==S&&Yt(i,a,N,_,m,S)}LE(i,he,ge);return;case"option":for(var Ve in u)he=u[Ve],u.hasOwnProperty(Ve)&&he!=null&&!m.hasOwnProperty(Ve)&&(Ve==="selected"?i.selected=!1:Yt(i,a,Ve,null,m,he));for(J in m)he=m[J],ge=u[J],m.hasOwnProperty(J)&&he!==ge&&(he!=null||ge!=null)&&(J==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":Yt(i,a,J,he,m,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 nt in u)he=u[nt],u.hasOwnProperty(nt)&&he!=null&&!m.hasOwnProperty(nt)&&Yt(i,a,nt,null,m,he);for(de in m)if(he=m[de],ge=u[de],m.hasOwnProperty(de)&&he!==ge&&(he!=null||ge!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,a));break;default:Yt(i,a,de,he,m,ge)}return;default:if(Ev(a)){for(var Wt in u)he=u[Wt],u.hasOwnProperty(Wt)&&he!==void 0&&!m.hasOwnProperty(Wt)&&c_(i,a,Wt,void 0,m,he);for(ye in m)he=m[ye],ge=u[ye],!m.hasOwnProperty(ye)||he===ge||he===void 0&&ge===void 0||c_(i,a,ye,he,m,ge);return}}for(var ce in u)he=u[ce],u.hasOwnProperty(ce)&&he!=null&&!m.hasOwnProperty(ce)&&Yt(i,a,ce,null,m,he);for(Ee in m)he=m[Ee],ge=u[Ee],!m.hasOwnProperty(Ee)||he===ge||he==null&&ge==null||Yt(i,a,Ee,he,m,ge)}function z2(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ij(){if(typeof performance.getEntriesByType=="function"){for(var i=0,a=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var _=u[m],S=_.transferSize,N=_.initiatorType,U=_.duration;if(S&&U&&z2(N)){for(N=0,U=_.responseEnd,m+=1;m<u.length;m++){var J=u[m],de=J.startTime;if(de>U)break;var ye=J.transferSize,Ee=J.initiatorType;ye&&z2(Ee)&&(J=J.responseEnd,N+=ye*(J<U?1:(U-de)/(J-de)))}if(--m,a+=8*(S+N)/(_.duration/1e3),i++,10<i)break}}if(0<i)return a/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var u_=null,d_=null;function Th(i){return i.nodeType===9?i:i.ownerDocument}function F2(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function B2(i,a){if(i===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&a==="foreignObject"?0:i}function f_(i,a){return i==="textarea"||i==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var h_=null;function sj(){var i=window.event;return i&&i.type==="popstate"?i===h_?!1:(h_=i,!0):(h_=null,!1)}var V2=typeof setTimeout=="function"?setTimeout:void 0,aj=typeof clearTimeout=="function"?clearTimeout:void 0,H2=typeof Promise=="function"?Promise:void 0,lj=typeof queueMicrotask=="function"?queueMicrotask:typeof H2<"u"?function(i){return H2.resolve(null).then(i).catch(cj)}:V2;function cj(i){setTimeout(function(){throw i})}function Ds(i){return i==="head"}function q2(i,a){var u=a,m=0;do{var _=u.nextSibling;if(i.removeChild(u),_&&_.nodeType===8)if(u=_.data,u==="/$"||u==="/&"){if(m===0){i.removeChild(_),nc(a);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Fu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Fu(u);for(var S=u.firstChild;S;){var N=S.nextSibling,U=S.nodeName;S[iu]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&S.rel.toLowerCase()==="stylesheet"||u.removeChild(S),S=N}}else u==="body"&&Fu(i.ownerDocument.body);u=_}while(u);nc(a)}function G2(i,a){var u=i;i=0;do{var m=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=m}while(u)}function p_(i){var a=i.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":p_(u),yv(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function uj(i,a,u,m){for(;i.nodeType===1;){var _=u;if(i.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[iu])switch(a){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(S=i.getAttribute("rel"),S==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(S!==_.rel||i.getAttribute("href")!==(_.href==null||_.href===""?null:_.href)||i.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin)||i.getAttribute("title")!==(_.title==null?null:_.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(S=i.getAttribute("src"),(S!==(_.src==null?null:_.src)||i.getAttribute("type")!==(_.type==null?null:_.type)||i.getAttribute("crossorigin")!==(_.crossOrigin==null?null:_.crossOrigin))&&S&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(a==="input"&&i.type==="hidden"){var S=_.name==null?null:""+_.name;if(_.type==="hidden"&&i.getAttribute("name")===S)return i}else return i;if(i=Mo(i.nextSibling),i===null)break}return null}function dj(i,a,u){if(a==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=Mo(i.nextSibling),i===null))return null;return i}function K2(i,a){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!a||(i=Mo(i.nextSibling),i===null))return null;return i}function m_(i){return i.data==="$?"||i.data==="$~"}function g_(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function fj(i,a){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=a;else if(i.data!=="$?"||u.readyState!=="loading")a();else{var m=function(){a(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function Mo(i){for(;i!=null;i=i.nextSibling){var a=i.nodeType;if(a===1||a===3)break;if(a===8){if(a=i.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return i}var v_=null;function Z2(i){i=i.nextSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(a===0)return Mo(i.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}i=i.nextSibling}return null}function Y2(i){i=i.previousSibling;for(var a=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return i;a--}else u!=="/$"&&u!=="/&"||a++}i=i.previousSibling}return null}function W2(i,a,u){switch(a=Th(u),i){case"html":if(i=a.documentElement,!i)throw Error(r(452));return i;case"head":if(i=a.head,!i)throw Error(r(453));return i;case"body":if(i=a.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Fu(i){for(var a=i.attributes;a.length;)i.removeAttributeNode(a[0]);yv(i)}var Po=new Map,Q2=new Set;function Ch(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Yi=W.d;W.d={f:hj,r:pj,D:mj,C:gj,L:vj,m:_j,X:bj,S:yj,M:wj};function hj(){var i=Yi.f(),a=yh();return i||a}function pj(i){var a=wl(i);a!==null&&a.tag===5&&a.type==="form"?pR(a):Yi.r(i)}var Jl=typeof document>"u"?null:document;function X2(i,a,u){var m=Jl;if(m&&typeof a=="string"&&a){var _=xo(a);_='link[rel="'+i+'"][href="'+_+'"]',typeof u=="string"&&(_+='[crossorigin="'+u+'"]'),Q2.has(_)||(Q2.add(_),i={rel:i,crossOrigin:u,href:a},m.querySelector(_)===null&&(a=m.createElement("link"),dr(a,"link",i),er(a),m.head.appendChild(a)))}}function mj(i){Yi.D(i),X2("dns-prefetch",i,null)}function gj(i,a){Yi.C(i,a),X2("preconnect",i,a)}function vj(i,a,u){Yi.L(i,a,u);var m=Jl;if(m&&i&&a){var _='link[rel="preload"][as="'+xo(a)+'"]';a==="image"&&u&&u.imageSrcSet?(_+='[imagesrcset="'+xo(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(_+='[imagesizes="'+xo(u.imageSizes)+'"]')):_+='[href="'+xo(i)+'"]';var S=_;switch(a){case"style":S=ec(i);break;case"script":S=tc(i)}Po.has(S)||(i=h({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:i,as:a},u),Po.set(S,i),m.querySelector(_)!==null||a==="style"&&m.querySelector(Bu(S))||a==="script"&&m.querySelector(Vu(S))||(a=m.createElement("link"),dr(a,"link",i),er(a),m.head.appendChild(a)))}}function _j(i,a){Yi.m(i,a);var u=Jl;if(u&&i){var m=a&&typeof a.as=="string"?a.as:"script",_='link[rel="modulepreload"][as="'+xo(m)+'"][href="'+xo(i)+'"]',S=_;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=tc(i)}if(!Po.has(S)&&(i=h({rel:"modulepreload",href:i},a),Po.set(S,i),u.querySelector(_)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Vu(S)))return}m=u.createElement("link"),dr(m,"link",i),er(m),u.head.appendChild(m)}}}function yj(i,a,u){Yi.S(i,a,u);var m=Jl;if(m&&i){var _=Sl(m).hoistableStyles,S=ec(i);a=a||"default";var N=_.get(S);if(!N){var U={loading:0,preload:null};if(N=m.querySelector(Bu(S)))U.loading=5;else{i=h({rel:"stylesheet",href:i,"data-precedence":a},u),(u=Po.get(S))&&__(i,u);var J=N=m.createElement("link");er(J),dr(J,"link",i),J._p=new Promise(function(de,ye){J.onload=de,J.onerror=ye}),J.addEventListener("load",function(){U.loading|=1}),J.addEventListener("error",function(){U.loading|=2}),U.loading|=4,Ah(N,a,m)}N={type:"stylesheet",instance:N,count:1,state:U},_.set(S,N)}}}function bj(i,a){Yi.X(i,a);var u=Jl;if(u&&i){var m=Sl(u).hoistableScripts,_=tc(i),S=m.get(_);S||(S=u.querySelector(Vu(_)),S||(i=h({src:i,async:!0},a),(a=Po.get(_))&&y_(i,a),S=u.createElement("script"),er(S),dr(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(_,S))}}function wj(i,a){Yi.M(i,a);var u=Jl;if(u&&i){var m=Sl(u).hoistableScripts,_=tc(i),S=m.get(_);S||(S=u.querySelector(Vu(_)),S||(i=h({src:i,async:!0,type:"module"},a),(a=Po.get(_))&&y_(i,a),S=u.createElement("script"),er(S),dr(S,"link",i),u.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},m.set(_,S))}}function J2(i,a,u,m){var _=(_=X.current)?Ch(_):null;if(!_)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=ec(u.href),u=Sl(_).hoistableStyles,m=u.get(a),m||(m={type:"style",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=ec(u.href);var S=Sl(_).hoistableStyles,N=S.get(i);if(N||(_=_.ownerDocument||_,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(i,N),(S=_.querySelector(Bu(i)))&&!S._p&&(N.instance=S,N.state.loading=5),Po.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Po.set(i,u),S||Sj(_,i,u,N.state))),a&&m===null)throw Error(r(528,""));return N}if(a&&m!==null)throw Error(r(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=tc(u),u=Sl(_).hoistableScripts,m=u.get(a),m||(m={type:"script",instance:null,count:0,state:null},u.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function ec(i){return'href="'+xo(i)+'"'}function Bu(i){return'link[rel="stylesheet"]['+i+"]"}function eO(i){return h({},i,{"data-precedence":i.precedence,precedence:null})}function Sj(i,a,u,m){i.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=i.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),dr(a,"link",u),er(a),i.head.appendChild(a))}function tc(i){return'[src="'+xo(i)+'"]'}function Vu(i){return"script[async]"+i}function tO(i,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var m=i.querySelector('style[data-href~="'+xo(u.href)+'"]');if(m)return a.instance=m,er(m),m;var _=h({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),er(m),dr(m,"style",_),Ah(m,u.precedence,i),a.instance=m;case"stylesheet":_=ec(u.href);var S=i.querySelector(Bu(_));if(S)return a.state.loading|=4,a.instance=S,er(S),S;m=eO(u),(_=Po.get(_))&&__(m,_),S=(i.ownerDocument||i).createElement("link"),er(S);var N=S;return N._p=new Promise(function(U,J){N.onload=U,N.onerror=J}),dr(S,"link",m),a.state.loading|=4,Ah(S,u.precedence,i),a.instance=S;case"script":return S=tc(u.src),(_=i.querySelector(Vu(S)))?(a.instance=_,er(_),_):(m=u,(_=Po.get(S))&&(m=h({},u),y_(m,_)),i=i.ownerDocument||i,_=i.createElement("script"),er(_),dr(_,"link",m),i.head.appendChild(_),a.instance=_);case"void":return null;default:throw Error(r(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,Ah(m,u.precedence,i));return a.instance}function Ah(i,a,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),_=m.length?m[m.length-1]:null,S=_,N=0;N<m.length;N++){var U=m[N];if(U.dataset.precedence===a)S=U;else if(S!==_)break}S?S.parentNode.insertBefore(i,S.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(i,a.firstChild))}function __(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.title==null&&(i.title=a.title)}function y_(i,a){i.crossOrigin==null&&(i.crossOrigin=a.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=a.referrerPolicy),i.integrity==null&&(i.integrity=a.integrity)}var Ih=null;function nO(i,a,u){if(Ih===null){var m=new Map,_=Ih=new Map;_.set(u,m)}else _=Ih,m=_.get(u),m||(m=new Map,_.set(u,m));if(m.has(i))return m;for(m.set(i,null),u=u.getElementsByTagName(i),_=0;_<u.length;_++){var S=u[_];if(!(S[iu]||S[ar]||i==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var N=S.getAttribute(a)||"";N=i+N;var U=m.get(N);U?U.push(S):m.set(N,[S])}}return m}function rO(i,a,u){i=i.ownerDocument||i,i.head.insertBefore(u,a==="title"?i.querySelector("head > title"):null)}function Ej(i,a,u){if(u===1||a.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(i=a.disabled,typeof a.precedence=="string"&&i==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function oO(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function xj(i,a,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var _=ec(m.href),S=a.querySelector(Bu(_));if(S){a=S._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(i.count++,i=Mh.bind(i),a.then(i,i)),u.state.loading|=4,u.instance=S,er(S);return}S=a.ownerDocument||a,m=eO(m),(_=Po.get(_))&&__(m,_),S=S.createElement("link"),er(S);var N=S;N._p=new Promise(function(U,J){N.onload=U,N.onerror=J}),dr(S,"link",m),u.instance=S}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=Mh.bind(i),a.addEventListener("load",u),a.addEventListener("error",u))}}var b_=0;function Rj(i,a){return i.stylesheets&&i.count===0&&Nh(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var m=setTimeout(function(){if(i.stylesheets&&Nh(i,i.stylesheets),i.unsuspend){var S=i.unsuspend;i.unsuspend=null,S()}},6e4+a);0<i.imgBytes&&b_===0&&(b_=62500*ij());var _=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Nh(i,i.stylesheets),i.unsuspend)){var S=i.unsuspend;i.unsuspend=null,S()}},(i.imgBytes>b_?50:800)+a);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(_)}}:null}function Mh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Nh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Ph=null;function Nh(i,a){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Ph=new Map,a.forEach(Oj,i),Ph=null,Mh.call(i))}function Oj(i,a){if(!(a.state.loading&4)){var u=Ph.get(i);if(u)var m=u.get(null);else{u=new Map,Ph.set(i,u);for(var _=i.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<_.length;S++){var N=_[S];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(u.set(N.dataset.precedence,N),m=N)}m&&u.set(null,m)}_=a.instance,N=_.getAttribute("data-precedence"),S=u.get(N)||m,S===m&&u.set(null,_),u.set(N,_),this.count++,m=Mh.bind(this),_.addEventListener("load",m),_.addEventListener("error",m),S?S.parentNode.insertBefore(_,S.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(_,i.firstChild)),a.state.loading|=4}}var Hu={$$typeof:T,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Tj(i,a,u,m,_,S,N,U,J){this.tag=1,this.containerInfo=i,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=wr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wr(0),this.hiddenUpdates=wr(null),this.identifierPrefix=m,this.onUncaughtError=_,this.onCaughtError=S,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function iO(i,a,u,m,_,S,N,U,J,de,ye,Ee){return i=new Tj(i,a,u,N,J,de,ye,Ee,U),a=1,S===!0&&(a|=24),S=to(3,null,null,a),i.current=S,S.stateNode=i,a=Jv(),a.refCount++,i.pooledCache=a,a.refCount++,S.memoizedState={element:m,isDehydrated:u,cache:a},r0(S),i}function sO(i){return i?(i=Pl,i):Pl}function aO(i,a,u,m,_,S){_=sO(_),m.context===null?m.context=_:m.pendingContext=_,m=xs(a),m.payload={element:u},S=S===void 0?null:S,S!==null&&(m.callback=S),u=Rs(i,m,a),u!==null&&(qr(u,i,a),Su(u,i,a))}function lO(i,a){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<a?u:a}}function w_(i,a){lO(i,a),(i=i.alternate)&&lO(i,a)}function cO(i){if(i.tag===13||i.tag===31){var a=Oa(i,67108864);a!==null&&qr(a,i,67108864),w_(i,67108864)}}function uO(i){if(i.tag===13||i.tag===31){var a=so();a=_l(a);var u=Oa(i,a);u!==null&&qr(u,i,a),w_(i,a)}}var kh=!0;function Cj(i,a,u,m){var _=q.T;q.T=null;var S=W.p;try{W.p=2,S_(i,a,u,m)}finally{W.p=S,q.T=_}}function Aj(i,a,u,m){var _=q.T;q.T=null;var S=W.p;try{W.p=8,S_(i,a,u,m)}finally{W.p=S,q.T=_}}function S_(i,a,u,m){if(kh){var _=E_(m);if(_===null)l_(i,a,m,Dh,u),fO(i,m);else if(Mj(_,i,a,u,m))m.stopPropagation();else if(fO(i,m),a&4&&-1<Ij.indexOf(i)){for(;_!==null;){var S=wl(_);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var N=Dt(S.pendingLanes);if(N!==0){var U=S;for(U.pendingLanes|=2,U.entangledLanes|=2;N;){var J=1<<31-Ln(N);U.entanglements[1]|=J,N&=~J}fi(S),(zt&6)===0&&(vh=Z()+500,ju(0))}}break;case 31:case 13:U=Oa(S,2),U!==null&&qr(U,S,2),yh(),w_(S,2)}if(S=E_(m),S===null&&l_(i,a,m,Dh,u),S===_)break;_=S}_!==null&&m.stopPropagation()}else l_(i,a,m,null,u)}}function E_(i){return i=Rv(i),x_(i)}var Dh=null;function x_(i){if(Dh=null,i=bl(i),i!==null){var a=s(i);if(a===null)i=null;else{var u=a.tag;if(u===13){if(i=l(a),i!==null)return i;i=null}else if(u===31){if(i=c(a),i!==null)return i;i=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;i=null}else a!==i&&(i=null)}}return Dh=i,null}function dO(i){switch(i){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(ne()){case ae:return 2;case Re:return 8;case Ae:case Ie:return 32;case ke:return 268435456;default:return 32}default:return 32}}var R_=!1,Ls=null,$s=null,js=null,qu=new Map,Gu=new Map,Us=[],Ij="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 fO(i,a){switch(i){case"focusin":case"focusout":Ls=null;break;case"dragenter":case"dragleave":$s=null;break;case"mouseover":case"mouseout":js=null;break;case"pointerover":case"pointerout":qu.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gu.delete(a.pointerId)}}function Ku(i,a,u,m,_,S){return i===null||i.nativeEvent!==S?(i={blockedOn:a,domEventName:u,eventSystemFlags:m,nativeEvent:S,targetContainers:[_]},a!==null&&(a=wl(a),a!==null&&cO(a)),i):(i.eventSystemFlags|=m,a=i.targetContainers,_!==null&&a.indexOf(_)===-1&&a.push(_),i)}function Mj(i,a,u,m,_){switch(a){case"focusin":return Ls=Ku(Ls,i,a,u,m,_),!0;case"dragenter":return $s=Ku($s,i,a,u,m,_),!0;case"mouseover":return js=Ku(js,i,a,u,m,_),!0;case"pointerover":var S=_.pointerId;return qu.set(S,Ku(qu.get(S)||null,i,a,u,m,_)),!0;case"gotpointercapture":return S=_.pointerId,Gu.set(S,Ku(Gu.get(S)||null,i,a,u,m,_)),!0}return!1}function hO(i){var a=bl(i.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){i.blockedOn=a,TE(i.priority,function(){uO(u)});return}}else if(a===31){if(a=c(u),a!==null){i.blockedOn=a,TE(i.priority,function(){uO(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Lh(i){if(i.blockedOn!==null)return!1;for(var a=i.targetContainers;0<a.length;){var u=E_(i.nativeEvent);if(u===null){u=i.nativeEvent;var m=new u.constructor(u.type,u);xv=m,u.target.dispatchEvent(m),xv=null}else return a=wl(u),a!==null&&cO(a),i.blockedOn=u,!1;a.shift()}return!0}function pO(i,a,u){Lh(i)&&u.delete(a)}function Pj(){R_=!1,Ls!==null&&Lh(Ls)&&(Ls=null),$s!==null&&Lh($s)&&($s=null),js!==null&&Lh(js)&&(js=null),qu.forEach(pO),Gu.forEach(pO)}function $h(i,a){i.blockedOn===a&&(i.blockedOn=null,R_||(R_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Pj)))}var jh=null;function mO(i){jh!==i&&(jh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){jh===i&&(jh=null);for(var a=0;a<i.length;a+=3){var u=i[a],m=i[a+1],_=i[a+2];if(typeof m!="function"){if(x_(m||u)===null)continue;break}var S=wl(u);S!==null&&(i.splice(a,3),a-=3,E0(S,{pending:!0,data:_,method:u.method,action:m},m,_))}}))}function nc(i){function a(J){return $h(J,i)}Ls!==null&&$h(Ls,i),$s!==null&&$h($s,i),js!==null&&$h(js,i),qu.forEach(a),Gu.forEach(a);for(var u=0;u<Us.length;u++){var m=Us[u];m.blockedOn===i&&(m.blockedOn=null)}for(;0<Us.length&&(u=Us[0],u.blockedOn===null);)hO(u),u.blockedOn===null&&Us.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var _=u[m],S=u[m+1],N=_[Ur]||null;if(typeof S=="function")N||mO(u);else if(N){var U=null;if(S&&S.hasAttribute("formAction")){if(_=S,N=S[Ur]||null)U=N.formAction;else if(x_(_)!==null)continue}else U=N.action;typeof U=="function"?u[m+1]=U:(u.splice(m,3),m-=3),mO(u)}}}function gO(){function i(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(N){return _=N})},focusReset:"manual",scroll:"manual"})}function a(){_!==null&&(_(),_=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,_=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),_!==null&&(_(),_=null)}}}function O_(i){this._internalRoot=i}Uh.prototype.render=O_.prototype.render=function(i){var a=this._internalRoot;if(a===null)throw Error(r(409));var u=a.current,m=so();aO(u,m,i,a,null,null)},Uh.prototype.unmount=O_.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var a=i.containerInfo;aO(i.current,2,null,i,null,null),yh(),a[yl]=null}};function Uh(i){this._internalRoot=i}Uh.prototype.unstable_scheduleHydration=function(i){if(i){var a=vv();i={blockedOn:null,target:i,priority:a};for(var u=0;u<Us.length&&a!==0&&a<Us[u].priority;u++);Us.splice(u,0,i),u===0&&hO(i)}};var vO=t.version;if(vO!=="19.2.6")throw Error(r(527,vO,"19.2.6"));W.findDOMNode=function(i){var a=i._reactInternals;if(a===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=f(a),i=i!==null?p(i):null,i=i===null?null:i.stateNode,i};var Nj={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zh.isDisabled&&zh.supportsFiber)try{yt=zh.inject(Nj),Tt=zh}catch{}}return Yu.createRoot=function(i,a){if(!o(i))throw Error(r(299));var u=!1,m="",_=xR,S=RR,N=OR;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(_=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError)),a=iO(i,1,!1,null,null,u,m,null,_,S,N,gO),i[yl]=a.current,a_(i),new O_(a)},Yu.hydrateRoot=function(i,a,u){if(!o(i))throw Error(r(299));var m=!1,_="",S=xR,N=RR,U=OR,J=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(_=u.identifierPrefix),u.onUncaughtError!==void 0&&(S=u.onUncaughtError),u.onCaughtError!==void 0&&(N=u.onCaughtError),u.onRecoverableError!==void 0&&(U=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),a=iO(i,1,!0,a,u??null,m,_,J,S,N,U,gO),a.context=sO(null),u=a.current,m=so(),m=_l(m),_=xs(m),_.callback=null,Rs(u,_,m),u=m,a.current.lanes=u,Lt(a,u),fi(a),i[yl]=a.current,a_(i),new Uh(a)},Yu.version="19.2.6",Yu}var CO;function qj(){if(CO)return C_.exports;CO=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(),C_.exports=Hj(),C_.exports}var Gj=qj(),M=ga();const ee=ma(M),bw=Dj({__proto__:null,default:ee},[M]);var N_={exports:{}},k_={};var AO;function Kj(){if(AO)return k_;AO=1;var e=ga().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return k_.c=function(t){return e.H.useMemoCache(t)},k_}var IO;function Zj(){return IO||(IO=1,N_.exports=Kj()),N_.exports}var Jr=Zj(),Jc=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(){}},Yj=class extends Jc{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&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"}},ww=new Yj,Wj={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Qj=class{#e=Wj;#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)}},Xa=new Qj;function Xj(e){setTimeout(e,0)}var Jj=typeof window>"u"||"Deno"in globalThis;function Zn(){}function e8(e,t){return typeof e=="function"?e(t):e}function Ab(e){return typeof e=="number"&&e>=0&&e!==1/0}function sP(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ia(e,t){return typeof e=="function"?e(t):e}function uo(e,t){return typeof e=="function"?e(t):e}function MO(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==Sw(l,t.options))return!1}else if(!Fd(t.queryKey,l))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||o&&o!==t.state.fetchStatus||s&&!s(t))}function PO(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(al(t.options.mutationKey)!==al(s))return!1}else if(!Fd(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Sw(e,t){return(t?.queryKeyHashFn||al)(e)}function al(e){return JSON.stringify(e,(t,n)=>Ib(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Fd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Fd(e[n],t[n])):!1}var t8=Object.prototype.hasOwnProperty;function aP(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=NO(e)&&NO(t);if(!r&&!(Ib(e)&&Ib(t)))return t;const s=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,d=r?new Array(c):{};let f=0;for(let p=0;p<c;p++){const h=r?p:l[p],g=e[h],v=t[h];if(g===v){d[h]=g,(r?p<s:t8.call(e,h))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){d[h]=v;continue}const y=aP(g,v,n+1);d[h]=y,y===g&&f++}return s===c&&f===s?e:d}function Rm(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 NO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ib(e){if(!kO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!kO(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kO(e){return Object.prototype.toString.call(e)==="[object Object]"}function n8(e){return new Promise(t=>{Xa.setTimeout(t,e)})}function Mb(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?aP(e,t):t}function eue(e){return e}function r8(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function o8(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ew=Symbol();function lP(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ew?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function xw(e,t){return typeof e=="function"?e(...t):!!e}function i8(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var Bd=(()=>{let e=()=>Jj;return{isServer(){return e()},setIsServer(t){e=t}}})();function Pb(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function s8(e){let t;if(e.then(n=>(t=n,n),Zn)?.catch(Zn),t!==void 0)return{data:t}}function cP(e){return e}function a8(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function l8(e,t,n){const r=()=>{const o=e.promise?.then(t).catch(s=>n(s)?Promise.reject(new Error("redacted")):Promise.reject(s));return o?.catch(Zn),o};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status==="pending"&&{promise:r()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function c8(e){return e.state.isPaused}function u8(e){return e.state.status==="success"}function d8(e){return!0}function f8(e,t={}){const n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??c8,r=e.getMutationCache().getAll().flatMap(d=>n(d)?[a8(d)]:[]),o=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??u8,s=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??d8,l=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??cP,c=e.getQueryCache().getAll().flatMap(d=>o(d)?[l8(d,l,s)]:[]);return{mutations:r,queries:c}}function h8(e,t,n){if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),o=e.getQueryCache(),s=e.getDefaultOptions().hydrate?.deserializeData??cP,l=t.mutations||[],c=t.queries||[];l.forEach(({state:d,...f})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...f},d)}),c.forEach(({queryKey:d,state:f,queryHash:p,meta:h,promise:g,dehydratedAt:v,queryType:y})=>{const b=g?s8(g):void 0,x=f.data===void 0?b?.data:f.data,w=x===void 0?x:s(x);let E=o.get(p);const T=E?.state.status==="pending",R=E?.state.fetchStatus==="fetching";if(E){const O=b&&v!==void 0&&v>E.state.dataUpdatedAt;if(f.dataUpdatedAt>E.state.dataUpdatedAt||O){const{fetchStatus:A,...I}=f;E.setState({...I,data:w,...f.status==="pending"&&w!==void 0&&{status:"success",...!R&&{fetchStatus:"idle"}}})}}else E=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:d,queryHash:p,meta:h,_type:y},{...f,data:w,fetchStatus:"idle",status:f.status==="pending"&&w!==void 0?"success":f.status});g&&!b&&!T&&!R&&(v===void 0||v>E.state.dataUpdatedAt)&&E.fetch(void 0,{initialPromise:Promise.resolve(g).then(s)}).catch(Zn)})}var p8=Xj;function m8(){let e=[],t=0,n=c=>{c()},r=c=>{c()},o=p8;const s=c=>{t?e.push(c):o(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&o(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:c=>{let d;t++;try{d=c()}finally{t--,t||l()}return d},batchCalls:c=>(...d)=>{s(()=>{c(...d)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{o=c}}}var Wn=m8(),g8=class extends Jc{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<"u"&&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}},Om=new g8;function v8(e){return Math.min(1e3*2**e,3e4)}function uP(e){return(e??"online")==="online"?Om.isOnline():!0}var Nb=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dP(e){let t=!1,n=0,r;const o=Pb(),s=()=>o.status!=="pending",l=b=>{if(!s()){const x=new Nb(b);g(x),e.onCancel?.(x)}},c=()=>{t=!0},d=()=>{t=!1},f=()=>ww.isFocused()&&(e.networkMode==="always"||Om.isOnline())&&e.canRun(),p=()=>uP(e.networkMode)&&e.canRun(),h=b=>{s()||(r?.(),o.resolve(b))},g=b=>{s()||(r?.(),o.reject(b))},v=()=>new Promise(b=>{r=x=>{(s()||f())&&b(x)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),y=()=>{if(s())return;let b;const x=n===0?e.initialPromise:void 0;try{b=x??e.fn()}catch(w){b=Promise.reject(w)}Promise.resolve(b).then(h).catch(w=>{if(s())return;const E=e.retry??(Bd.isServer()?0:3),T=e.retryDelay??v8,R=typeof T=="function"?T(n,w):T,O=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,w);if(t||!O){g(w);return}n++,e.onFail?.(n,w),n8(R).then(()=>f()?void 0:v()).then(()=>{t?g(w):y()})})};return{promise:o,status:()=>o.status,cancel:l,continue:()=>(r?.(),o),cancelRetry:c,continueRetry:d,canStart:p,start:()=>(p()?y():v().then(y),o)}}var fP=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ab(this.gcTime)&&(this.#e=Xa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bd.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Xa.clearTimeout(this.#e),this.#e=void 0)}};function _8(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},d=0;const f=async()=>{let p=!1;const h=y=>{i8(y,()=>t.signal,()=>p=!0)},g=lP(t.options,t.fetchOptions),v=async(y,b,x)=>{if(p)return Promise.reject(t.signal.reason);if(b==null&&y.pages.length)return Promise.resolve(y);const E=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:b,direction:x?"backward":"forward",meta:t.options.meta};return h(A),A})(),T=await g(E),{maxPages:R}=t.options,O=x?o8:r8;return{pages:O(y.pages,T,R),pageParams:O(y.pageParams,b,R)}};if(o&&s.length){const y=o==="backward",b=y?hP:kb,x={pages:s,pageParams:l},w=b(r,x);c=await v(x,w,y)}else{const y=e??s.length;do{const b=d===0?l[0]??r.initialPageParam:kb(r,c);if(d>0&&b==null)break;c=await v(c,b),d++}while(d<y)}return c};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 kb(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 hP(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function tue(e,t){return t?kb(e,t)!=null:!1}function nue(e,t){return!t||!e.getPreviousPageParam?!1:hP(e,t)!=null}var y8=class extends fP{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e){super(),this.#s=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=LO(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#o?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=LO(this.options);t.data!==void 0&&(this.setState(DO(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=Mb(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(Zn).catch(Zn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>uo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ew||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>ia(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:!sP(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.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.#o&&(this.#s||this.#u()?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#o?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},o=()=>{const d=lP(this.options,t),p=(()=>{const h={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(h),h})();return this.#s=!1,this.options.persister?this.options.persister(d,p,this):d(p)},l=(()=>{const d={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(d),d})();(this.#e==="infinite"?_8(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#o=dP({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:d=>{d instanceof Nb&&d.revert&&this.setState({...this.#n,fetchStatus:"idle"}),n.abort()},onFail:(d,f)=>{this.#l({type:"failed",failureCount:d,error:f})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{const d=await this.#o.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#r.config.onSuccess?.(d,this),this.#r.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof Nb){if(d.silent)return this.#o.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#r.config.onError?.(d,this),this.#r.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(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,...pP(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...DO(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Wn.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function pP(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:uP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function DO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function LO(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 mP=class extends Jc{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#a=Pb(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#o;#a;#s;#u;#l;#p;#d;#f;#c;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),$O(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Db(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Db(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 uo(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&&!Rm(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&jO(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||uo(this.options.enabled,this.#t)!==uo(t.enabled,this.#t)||ia(this.options.staleTime,this.#t)!==ia(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||uo(this.options.enabled,this.#t)!==uo(t.enabled,this.#t)||o!==this.#c)&&this.#_(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return w8(this,n)&&(this.#r=n,this.#o=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}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.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#m.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.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Zn)),t}#g(){this.#b();const e=ia(this.options.staleTime,this.#t);if(Bd.isServer()||this.#r.isStale||!Ab(e))return;const n=sP(this.#r.dataUpdatedAt,e)+1;this.#d=Xa.setTimeout(()=>{this.#r.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#_(e){this.#w(),this.#c=e,!(Bd.isServer()||uo(this.options.enabled,this.#t)===!1||!Ab(this.#c)||this.#c===0)&&(this.#f=Xa.setInterval(()=>{(this.options.refetchIntervalInBackground||ww.isFocused())&&this.#h()},this.#c))}#y(){this.#g(),this.#_(this.#v())}#b(){this.#d!==void 0&&(Xa.clearTimeout(this.#d),this.#d=void 0)}#w(){this.#f!==void 0&&(Xa.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#r,s=this.#i,l=this.#o,d=e!==n?e.state:this.#n,{state:f}=e;let p={...f},h=!1,g;if(t._optimisticResults){const P=this.hasListeners(),L=!P&&$O(e,t),H=P&&jO(e,n,t,r);(L||H)&&(p={...p,...pP(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:v,errorUpdatedAt:y,status:b}=p;g=p.data;let x=!1;if(t.placeholderData!==void 0&&g===void 0&&b==="pending"){let P;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(P=o.data,x=!0):P=typeof t.placeholderData=="function"?t.placeholderData(this.#p?.state.data,this.#p):t.placeholderData,P!==void 0&&(b="success",g=Mb(o?.data,P,t),h=!0)}if(t.select&&g!==void 0&&!x)if(o&&g===s?.data&&t.select===this.#u)g=this.#l;else try{this.#u=t.select,g=t.select(g),g=Mb(o?.data,g,t),this.#l=g,this.#s=null}catch(P){this.#s=P}this.#s&&(v=this.#s,g=this.#l,y=Date.now(),b="error");const w=p.fetchStatus==="fetching",E=b==="pending",T=b==="error",R=E&&w,O=g!==void 0,I={status:b,fetchStatus:p.fetchStatus,isPending:E,isSuccess:b==="success",isError:T,isInitialLoading:R,isLoading:R,data:g,dataUpdatedAt:p.dataUpdatedAt,error:v,errorUpdatedAt:y,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:w,isRefetching:w&&!E,isLoadingError:T&&!O,isPaused:p.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:T&&O,isStale:Rw(e,t),refetch:this.refetch,promise:this.#a,isEnabled:uo(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const P=I.data!==void 0,L=I.status==="error"&&!P,H=z=>{L?z.reject(I.error):P&&z.resolve(I.data)},j=()=>{const z=this.#a=I.promise=Pb();H(z)},B=this.#a;switch(B.status){case"pending":e.queryHash===n.queryHash&&H(B);break;case"fulfilled":(L||I.data!==B.value)&&j();break;case"rejected":(!L||I.error!==B.reason)&&j();break}}return I}updateResult(){const e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#o=this.options,this.#i.data!==void 0&&(this.#p=this.#t),Rm(t,e))return;this.#r=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const s=new Set(o??this.#m);return this.options.throwOnError&&s.add("error"),Object.keys(this.#r).some(l=>{const c=l;return this.#r[c]!==e[c]&&s.has(c)})};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.#y()}#E(e){Wn.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function b8(e,t){return uo(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&uo(t.retryOnMount,e)===!1)}function $O(e,t){return b8(e,t)||e.state.data!==void 0&&Db(e,t,t.refetchOnMount)}function Db(e,t,n){if(uo(t.enabled,e)!==!1&&ia(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Rw(e,t)}return!1}function jO(e,t,n,r){return(e!==t||uo(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Rw(e,n)}function Rw(e,t){return uo(t.enabled,e)!==!1&&e.isStaleByTime(ia(t.staleTime,e))}function w8(e,t){return!Rm(e.getCurrentResult(),t)}var S8=class extends fP{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||gP(),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.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#i({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=dP({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,l)=>{this.#i({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#i({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",o=!this.#r.canStart();try{if(r)t();else{this.#i({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const l=await this.options.onMutate?.(e,n);l!==this.state.context&&this.#i({type:"pending",context:l,variables:e,isPaused:o})}const s=await this.#r.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#i({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(l){Promise.reject(l)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(l){Promise.reject(l)}throw this.#i({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#i(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),Wn.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function gP(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var E8=class extends Jc{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 S8({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=Fh(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=Fh(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=Fh(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Fh(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Wn.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=>PO(t,n))}findAll(e={}){return this.getAll().filter(t=>PO(e,t))}notify(e){Wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Wn.batch(()=>Promise.all(e.map(t=>t.continue().catch(Zn))))}};function Fh(e){return e.options.scope?.id}var x8=class extends Jc{#e;#t=void 0;#n;#r;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Rm(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&al(n.mutationKey)!==al(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#i(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(t,n){return this.#r=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#i(){const t=this.#n?.state??gP();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Wn.batch(()=>{if(this.#r&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#r.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#r.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#r.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},R8=class extends Jc{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Sw(r,t);let s=this.get(o);return s||(s=new y8({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}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(){Wn.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=>MO(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>MO(e,n)):t}notify(e){Wn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Wn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},O8=class{#e;#t;#n;#r;#i;#o;#a;#s;constructor(e={}){this.#e=e.queryCache||new R8,this.#t=e.mutationCache||new E8,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=ww.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Om.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#s?.(),this.#s=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(ia(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}),s=this.#e.get(r.queryHash)?.state.data,l=e8(t,s);if(l!==void 0)return this.#e.build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return Wn.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;Wn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Wn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Wn.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Zn).catch(Zn)}invalidateQueries(e,t={}){return Wn.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=Wn.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(Zn)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Zn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(ia(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Zn).catch(Zn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Zn).catch(Zn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Om.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.#r.set(al(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Fd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(al(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(r=>{Fd(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=Sw(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===Ew&&(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()}},vP=M.createContext(void 0),Ow=e=>{const t=M.useContext(vP);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},T8=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),C.jsx(vP.Provider,{value:e,children:t})),_P=M.createContext(!1),C8=()=>M.useContext(_P);_P.Provider;function A8(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var I8=M.createContext(A8()),M8=()=>M.useContext(I8),P8=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?xw(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},N8=e=>{M.useEffect(()=>{e.clearReset()},[e])},k8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||xw(n,[e.error,r])),D8=(e,t)=>t.state.data===void 0,L8=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},$8=(e,t)=>e.isLoading&&e.isFetching&&!t,j8=(e,t)=>e?.suspense&&t.isPending,UO=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function yP(e,t,n){const r=C8(),o=M8(),s=Ow(n),l=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=s.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",L8(l),P8(l,o,c),N8(o);const d=!s.getQueryCache().get(l.queryHash),[f]=M.useState(()=>new t(s,l)),p=f.getOptimisticResult(l),h=!r&&e.subscribed!==!1;if(M.useSyncExternalStore(M.useCallback(g=>{const v=h?f.subscribe(Wn.batchCalls(g)):Zn;return f.updateResult(),v},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),M.useEffect(()=>{f.setOptions(l)},[l,f]),j8(l,p))throw UO(l,f,o);if(k8({result:p,errorResetBoundary:o,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!Bd.isServer()&&$8(p,r)&&(d?UO(l,f,o):c?.promise)?.catch(Zn).finally(()=>{f.updateResult()}),l.notifyOnChangeProps?p:f.trackResult(p)}function U8(e,t){return yP(e,mP,t)}function bP(e,t){return yP({...e,enabled:!0,suspense:!0,throwOnError:D8,placeholderData:void 0},mP,t)}function z8(e,t){const n=Ow(t),[r]=M.useState(()=>new x8(n,e));M.useEffect(()=>{r.setOptions(e)},[r,e]);const o=M.useSyncExternalStore(M.useCallback(l=>r.subscribe(Wn.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=M.useCallback((l,c)=>{r.mutate(l,c).catch(Zn)},[r]);if(o.error&&xw(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}const wP={publicConfig:()=>["publicConfig"],session:()=>["session"],messages:e=>["messages",e],organizations:()=>["organizations"],members:e=>[e,"members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],myCapabilities:e=>[e,"my-capabilities"],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],mcpClientPrefix:()=>["mcp","client"],organizationSettings:e=>["organization-settings",e],activeOrganization:e=>["activeOrganization",e],orgAccessStatus:e=>["org-access-status",e],modelsList:e=>["models-list",e],homeNextActions:e=>["home-next-actions",e],boardLayout:e=>["board-layout",e],agentPrompts:(e,t)=>["agent-prompts",e,t],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,o)=>[e,t,n,"collection",r,o],collectionList:(e,t,n,r,o)=>[e,t,n,"collection",r,"list",o],collectionListInfinite:(e,t,n,r,o)=>[e,t,n,"collection",r,"list-infinite",o],monitoringStats:()=>["monitoring","stats"],monitoringStatsToolCalls:(e,t)=>["MONITORING_STATS",e,"tool-calls",t],monitoringStatsLlm:(e,t)=>["MONITORING_STATS",e,"llm",t],monitoringThreadUsage:(e,t)=>["MONITORING_THREAD_USAGE",e,t],monitoringLogs:e=>["monitoring","logs",e],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringLogDetail:e=>["monitoring","log-detail",e],ensureTask:(e,t)=>["ensure-task",e,t],globalSearch:(e,t)=>["global-search",e,t],threadsInfinite:(e,t)=>["threads","list-infinite",e,t],threadMessages:(e,t)=>["threads","messages",e,t],threadModelLogs:(e,t)=>["threads","model-logs",e,t],threadSandbox:(e,t)=>["thread-sandbox","v2",e,t],threadOutputs:e=>["thread-outputs",e],fileText:e=>["file-text",e],csvThumb:e=>["csv-thumb",e],virtualMcpTools:(e,t)=>["virtual-mcp",t,e??"default","tools"],toolDefinitionLookup:(e,t,n)=>["virtual-mcp",t,e??"default","tools","lookup",n],virtualMcpAgents:e=>["virtual-mcp",e,"agents"],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],automationsAll:e=>["automations",e],automations:(e,t)=>["automations",e,t??null],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,n)=>["automation-runs",e,t,...[...n??[]].sort()],automationRunStats:(e,t,n)=>["automation-run-stats",e,t,n],projects:e=>["projects",e],project:(e,t)=>["project",e,t],virtualMcp:(e,t)=>["virtual-mcp",e,t],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],aiProviderKeyPreview:e=>["ai-provider-key-preview",e],secrets:e=>["secrets",e],fileConfigs:e=>["file-configs",e],orgFsVolume:(e,t)=>["org-fs",e,t],orgFsList:(e,t,n)=>["org-fs",e,t,"list",n],orgFsUsage:(e,t)=>["org-fs",e,t,"usage"],orgFsStat:(e,t,n)=>["org-fs",e,t,"stat",n],orgFsPublicSets:e=>["org-fs-public-sets",e],orgFsRecent:e=>["org-fs-recent",e],filePickerObjects:(e,t)=>["file-picker-objects",e,t],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t],orgSsoConfig:e=>["org-sso-config",e],orgSsoStatus:e=>["org-sso-status",e],storeDiscovery:(e,t)=>["store-discovery",e,t],organizationDomain:e=>["organization-domain",e],domainLookup:e=>["domain-lookup",e],brandContext:e=>["brand-context",e],defaultBrand:e=>["brand-context",e,"default"],decoProfile:e=>["deco-profile",e],decoSites:e=>["deco-sites",e],decoApps:()=>["deco-apps"],webSearchBlob:e=>["web-search-blob",e],decofile:e=>["decofile",e],liveMeta:e=>["live-meta",e],sandboxInvoke:(e,t)=>["sandbox-invoke",e,t],linkStatus:()=>["link-status"],currentLink:e=>["current-link",e],githubUserOrgs:(e,t)=>["github-user-orgs",e,t],githubOrgRepos:(e,t,n,r)=>["github-org-repos",e,t,n,r],vmEnv:(e,t,n)=>["vm-env",e,t,n]};function oue(e,t){e.invalidateQueries({predicate:n=>{const r=n.queryKey;return(!t||r[1]===t)&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})}function SP(){const e=Jr.c(1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:wP.publicConfig(),queryFn:F8,staleTime:1/0},e[0]=t):t=e[0];const{data:n}=bP(t);return n}async function F8(){return(await(await fetch("/api/config")).json()).config}const iue={light:"/logos/deco logo.svg",dark:"/logos/deco logo negative.svg"},EP=M.createContext(void 0);function B8(e){const t=Jr.c(3),{children:n}=e,r=SP();let o;return t[0]!==n||t[1]!==r.auth?(o=C.jsx(EP.Provider,{value:r.auth,children:n}),t[0]=n,t[1]=r.auth,t[2]=o):o=t[2],o}function sue(){const e=M.useContext(EP);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}var zO=M.use,xc=typeof window<"u"?M.useLayoutEffect:M.useEffect;function D_(e){const t=M.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function V8(e,t,n={},r={}){M.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function H8(e){const t=M.useRef(null);return M.useImperativeHandle(e,()=>t.current,[]),t}const xP=!1;function Vd(e){return e[e.length-1]}function q8(e){return typeof e=="function"}function na(e,t){return q8(e)?e(t):e}const RP=Object.prototype.hasOwnProperty,FO=Object.prototype.propertyIsEnumerable;function OP(e){for(const t in e)if(RP.call(e,t))return!0;return!1}const G8=()=>Object.create(null),Ua=(e,t)=>Ja(e,t,G8);function Ja(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const o=t,s=HO(e)&&HO(o);if(!s&&!(zc(e)&&zc(o)))return o;const l=s?e:BO(e);if(!l)return o;const c=s?o:BO(o);if(!c)return o;const d=l.length,f=c.length,p=s?new Array(f):n();let h=0;for(let g=0;g<f;g++){const v=s?g:c[g],y=e[v],b=o[v];if(y===b){p[v]=y,(s?g<d:RP.call(e,v))&&h++;continue}if(y===null||b===null||typeof y!="object"||typeof b!="object"){p[v]=b;continue}const x=Ja(y,b,n,r+1);p[v]=x,x===y&&h++}return d===f&&h===d?e:p}function BO(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!FO.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!FO.call(e,o))return!1;r.push(o)}return r}function zc(e){if(!VO(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!VO(n)||!n.hasOwnProperty("isPrototypeOf"))}function VO(e){return Object.prototype.toString.call(e)==="[object Object]"}function HO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function rl(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,o=e.length;r<o;r++)if(!rl(e[r],t[r],n))return!1;return!0}if(zc(e)&&zc(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const l in t)if((!r||t[l]!==void 0)&&!rl(e[l],t[l],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&o++;let s=0;for(const l in t)if((!r||t[l]!==void 0)&&(s++,s>o||!rl(e[l],t[l],n)))return!1;return o===s}return!1}function Fc(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function K8(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 Hd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Z8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function qO(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Z8(t)}const Y8=["http:","https:","mailto:","tel:"];function Tm(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Wu(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=qO(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+qO(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function W8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Q8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function cs(){throw new Error("Invariant failed")}function qd(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const l=t.get(s);if(l)return o(l),l.value},set(s,l){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 c=t.get(s);if(c)c.value=l,o(c);else{const d={key:s,value:l,prev:r};r&&(r.next=d),r=d,n||(n=d),t.set(s,d)}},clear(){t.clear(),n=void 0,r=void 0}}}const ra=4,TP=5;function X8(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function CP(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const c=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=c,n[4]=c,n[5]=c,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const l=X8(s);if(l){const[c,d]=l,f=s.charCodeAt(c+1);if(f===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){const p=c+3,h=d;if(p<h)return n[0]=3,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=o,n}}else if(f===36){const p=c+1,h=c+2;return h===d?(n[0]=2,n[1]=t+c,n[2]=t+p,n[3]=t+h,n[4]=t+d+1,n[5]=e.length,n):(n[0]=1,n[1]=t+c,n[2]=t+h,n[3]=t+d,n[4]=t+d+1,n[5]=o,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function Ag(e,t,n,r,o,s,l){l?.(n);let c=r;{const d=n.fullPath??n.from,f=d.length,p=n.options?.caseSensitive??e,h=n.options?.params?.parse??n.options?.parseParams;for(;c<f;){const v=CP(d,c,t);let y;const b=c,x=v[5];switch(c=x+1,s++,v[0]){case 0:{const w=d.substring(v[2],v[3]);if(p){const E=o.static?.get(w);if(E)y=E;else{o.static??=new Map;const T=el(n.fullPath??n.from);T.parent=o,T.depth=s,y=T,o.static.set(w,T)}}else{const E=w.toLowerCase(),T=o.staticInsensitive?.get(E);if(T)y=T;else{o.staticInsensitive??=new Map;const R=el(n.fullPath??n.from);R.parent=o,R.depth=s,y=R,o.staticInsensitive.set(E,R)}}break}case 1:{const w=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(w||E),R=w?T?w:w.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.dynamic?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)y=A;else{const I=$_(1,n.fullPath??n.from,T,R,O);y=I,I.depth=s,I.parent=o,o.dynamic??=[],o.dynamic.push(I)}break}case 3:{const w=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(w||E),R=w?T?w:w.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=!h&&o.optional?.find(I=>!I.parse&&I.caseSensitive===T&&I.prefix===R&&I.suffix===O);if(A)y=A;else{const I=$_(3,n.fullPath??n.from,T,R,O);y=I,I.parent=o,I.depth=s,o.optional??=[],o.optional.push(I)}break}case 2:{const w=d.substring(b,v[1]),E=d.substring(v[4],x),T=p&&!!(w||E),R=w?T?w:w.toLowerCase():void 0,O=E?T?E:E.toLowerCase():void 0,A=$_(2,n.fullPath??n.from,T,R,O);y=A,A.parent=o,A.depth=s,o.wildcard??=[],o.wildcard.push(A)}}o=y}if(h&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const v=el(n.fullPath??n.from);v.kind=TP,v.parent=o,s++,v.depth=s,o.pathless??=[],o.pathless.push(v),o=v}const g=(n.path||!n.children)&&!n.isRoot;if(g&&d.endsWith("/")){const v=el(n.fullPath??n.from);v.kind=ra,v.parent=o,s++,v.depth=s,o.index=v,o=v}o.parse=h??null,g&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Ag(e,t,d,c,o,s,l)}function L_(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;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 Xs(e){if(e.pathless)for(const t of e.pathless)Xs(t);if(e.static)for(const t of e.static.values())Xs(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Xs(t);if(e.dynamic?.length){e.dynamic.sort(L_);for(const t of e.dynamic)Xs(t)}if(e.optional?.length){e.optional.sort(L_);for(const t of e.optional)Xs(t)}if(e.wildcard?.length){e.wildcard.sort(L_);for(const t of e.wildcard)Xs(t)}}function el(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null}}function $_(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,caseSensitive:n,prefix:r,suffix:o}}function J8(e,t){const n=el("/"),r=new Uint16Array(6);for(const o of e)Ag(!1,r,o,1,n,0);Xs(n),t.masksTree=n,t.flatCache=qd(1e3)}function e7(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Tw(e,t.masksTree);return t.flatCache.set(e,r),r}function t7(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let l=o.singleCache.get(s);return l||(l=el("/"),Ag(t,new Uint16Array(6),{from:e},1,l,0),o.singleCache.set(s,l)),Tw(r,l,n)}function n7(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=Tw(e,t.segmentTree,n)}catch(l){if(l instanceof URIError)s=null;else throw l}return s&&(s.branch=IP(s.route)),t.matchCache.set(r,s),s}function r7(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function o7(e,t=!1,n){const r=el(e.fullPath),o=new Uint16Array(6),s={},l={};let c=0;return Ag(t,o,e,1,r,0,d=>{if(n?.(d,c),d.id in s&&cs(),s[d.id]=d,c!==0&&d.path){const f=r7(d.fullPath);(!l[f]||d.fullPath.endsWith("/"))&&(l[f]=d)}c++}),Xs(r),{processedTree:{segmentTree:r,singleCache:qd(1e3),matchCache:qd(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:l}}function Tw(e,t,n=!1){const r=e.split("/"),o=s7(e,r,t,n);if(!o)return null;const[s]=AP(e,r,o);return{route:o.node.route,rawParams:s}}function AP(e,t,n){const r=i7(n.node);let o=null;const s=Object.create(null);let l=n.extract?.part??0,c=n.extract?.node??0,d=n.extract?.path??0,f=n.extract?.segment??0;for(;c<r.length;l++,c++,d++,f++){const p=r[c];if(p.kind===ra)break;if(p.kind===TP){f--,l--,d--;continue}const h=t[l],g=d;if(h&&(d+=h.length),p.kind===1){o??=n.node.fullPath.split("/");const v=o[f],y=p.prefix?.length??0;if(v.charCodeAt(y)===123){const b=p.suffix?.length??0,x=v.substring(y+2,v.length-b-1),w=h.substring(y,h.length-b);s[x]=decodeURIComponent(w)}else{const b=v.substring(1);s[b]=decodeURIComponent(h)}}else if(p.kind===3){if(n.skipped&1<<c){l--,d=g-1;continue}o??=n.node.fullPath.split("/");const v=o[f],y=p.prefix?.length??0,b=p.suffix?.length??0,x=v.substring(y+3,v.length-b-1),w=p.suffix||p.prefix?h.substring(y,h.length-b):h;w&&(s[x]=decodeURIComponent(w))}else if(p.kind===2){const v=p,y=e.substring(g+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),b=decodeURIComponent(y);s["*"]=b,s._splat=b;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:l,node:c,path:d,segment:f}]}function IP(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function i7(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function s7(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!Vd(t),s=o&&e!=="/",l=t.length-(o?1:0),c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let d=null,f=null;for(;c.length;){const p=c.pop(),{node:h,index:g,skipped:v,depth:y,statics:b,dynamics:x,optionals:w}=p;let{extract:E,rawParams:T}=p;if(h.kind===2&&h.route&&!Vh(f,p))continue;if(h.parse){if(!GO(e,t,p))continue;T=p.rawParams,E=p.extract}r&&h.route&&h.kind!==ra&&Vh(d,p)&&(d=p);const R=g===l;if(R&&(h.route&&(!s||h.kind===ra||h.kind===2)&&Vh(f,p)&&(f=p),!h.optional&&!h.wildcard&&!h.index&&!h.pathless))continue;const O=R?void 0:t[g];let A;if(R&&h.index){const I={node:h.index,index:g,skipped:v,depth:y+1,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T};let P=!0;if(h.index.parse&&(GO(e,t,I)||(P=!1)),P){if(!x&&!w&&!v&&a7(b,l))return I;Vh(f,I)&&(f=I)}}if(h.wildcard)for(let I=h.wildcard.length-1;I>=0;I--){const P=h.wildcard[I],{prefix:L,suffix:H}=P;if(!(L&&(R||!(P.caseSensitive?O:A??=O.toLowerCase()).startsWith(L)))){if(H){if(R)continue;const j=t.slice(g).join("/").slice(-H.length);if((P.caseSensitive?j:j.toLowerCase())!==H)continue}c.push({node:P,index:l,skipped:v,depth:y+1,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T})}}if(h.optional){const I=v|1<<y,P=y+1;for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L];c.push({node:H,index:g,skipped:I,depth:P,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T})}if(!R)for(let L=h.optional.length-1;L>=0;L--){const H=h.optional[L],{prefix:j,suffix:B}=H;if(j||B){const z=H.caseSensitive?O:A??=O.toLowerCase();if(j&&!z.startsWith(j)||B&&!z.endsWith(B))continue}c.push({node:H,index:g+1,skipped:v,depth:P,statics:b,dynamics:x,optionals:w+Bh(l,g),extract:E,rawParams:T})}}if(!R&&h.dynamic&&O)for(let I=h.dynamic.length-1;I>=0;I--){const P=h.dynamic[I],{prefix:L,suffix:H}=P;if(L||H){const j=P.caseSensitive?O:A??=O.toLowerCase();if(L&&!j.startsWith(L)||H&&!j.endsWith(H))continue}c.push({node:P,index:g+1,skipped:v,depth:y+1,statics:b,dynamics:x+Bh(l,g),optionals:w,extract:E,rawParams:T})}if(!R&&h.staticInsensitive){const I=h.staticInsensitive.get(A??=O.toLowerCase());I&&c.push({node:I,index:g+1,skipped:v,depth:y+1,statics:b+Bh(l,g),dynamics:x,optionals:w,extract:E,rawParams:T})}if(!R&&h.static){const I=h.static.get(O);I&&c.push({node:I,index:g+1,skipped:v,depth:y+1,statics:b+Bh(l,g),dynamics:x,optionals:w,extract:E,rawParams:T})}if(h.pathless){const I=y+1;for(let P=h.pathless.length-1;P>=0;P--){const L=h.pathless[P];c.push({node:L,index:g,skipped:v,depth:I,statics:b,dynamics:x,optionals:w,extract:E,rawParams:T})}}}if(f)return f;if(r&&d){let p=d.index;for(let g=0;g<d.index;g++)p+=t[g].length;const h=p===e.length?"/":e.slice(p);return d.rawParams??=Object.create(null),d.rawParams["**"]=decodeURIComponent(h),d}return null}function Bh(e,t){return 2**(e-t-1)}function a7(e,t){return e===2**(t-1)-1}function GO(e,t,n){let r,o;try{[r,o]=AP(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Vh(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===ra)>(e.node.kind===ra)||t.node.kind===ra==(e.node.kind===ra)&&t.depth>e.depth))):!0}function cm(e){return Cw(e.filter(t=>t!==void 0).join("/"))}function Cw(e){return e.replace(/\/{2,}/g,"/")}function MP(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ss(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function PP(e){return ss(MP(e))}function Cm(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function l7(e,t,n){return Cm(e,n)===Cm(t,n)}function c7({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let l;if(r){l=o?t:s?e:e+"\0"+t;const f=r.get(l);if(f)return f}let c;if(s)c=e.split("/");else if(o)c=t.split("/");else{for(c=e.split("/");c.length>1&&Vd(c)==="";)c.pop();const f=t.split("/");for(let p=0,h=f.length;p<h;p++){const g=f[p];g===""?p?p===h-1&&c.push(g):c=[g]:g===".."?c.pop():g==="."||c.push(g)}}c.length>1&&(Vd(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));const d=Cw(c.join("/"))||"/";return l&&r&&r.set(l,d),d}function u7(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function j_(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>ZO(o,n)).join("/"):ZO(r,n)}function KO({path:e,params:t,decoder:n,...r}){let o=!1;const s=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const l=e.length;let c=0,d,f="";for(;c<l;){const p=c;d=CP(e,p,d);const h=d[5];if(c=h+1,p===h)continue;const g=d[0];if(g===0){f+="/"+e.substring(p,h);continue}if(g===2){const v=t._splat;s._splat=v,s["*"]=v;const y=e.substring(p,d[1]),b=e.substring(d[4],h);if(!v){o=!0,(y||b)&&(f+="/"+y+b);continue}const x=j_("_splat",t,n);f+="/"+y+x+b;continue}if(g===1){const v=e.substring(d[2],d[3]);!o&&!(v in t)&&(o=!0),s[v]=t[v];const y=e.substring(p,d[1]),b=e.substring(d[4],h),x=j_(v,t,n)??"undefined";f+="/"+y+x+b;continue}if(g===3){const v=e.substring(d[2],d[3]),y=t[v];if(y==null)continue;s[v]=y;const b=e.substring(p,d[1]),x=e.substring(d[4],h),w=j_(v,t,n)??"";f+="/"+b+w+x;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:s,interpolatedPath:f||"/",isMissingParams:o}}function ZO(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Tr(e){return e?.isNotFound===!0}function d7(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const f7="tsr-scroll-restoration-v1_3";function h7(){const e=d7();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");zc(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=na(r,t)||t},persist:()=>{try{e.setItem(f7,JSON.stringify(t))}catch{}}}}const YO=h7(),p7=e=>e.state.__TSR_key||e.href;function m7(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 Hh=!1;const Qu="window",WO="data-scroll-restoration-id";function g7(e,t){if(!YO)return;const n=YO;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Hh=!1;const r=e.options.getScrollRestorationKey||p7,o=new Map;window.history.scrollRestoration="manual";const s=c=>{if(!(Hh||!e.isScrollRestoring))if(c.target===document||c.target===window)o.set(Qu,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const d=c.target;o.set(d,{scrollX:d.scrollLeft||0,scrollY:d.scrollTop||0})}},l=c=>{if(!e.isScrollRestoring||!c||o.size===0||!n)return;const d=n.state[c]||={};for(const[f,p]of o){let h;if(f===Qu)h=Qu;else if(f.isConnected){const g=f.getAttribute(WO);h=g?`[${WO}="${g}"]`:m7(f)}h&&(d[h]=p)}};document.addEventListener("scroll",s,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?r(c.fromLocation):void 0),o.clear()}),window.addEventListener("pagehide",()=>{l(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",c=>{const d=r(c.toLocation),f=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(o.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Hh=!0;try{const h=e.isScrollRestoring?n.state[d]:void 0;let g=!1;if(h)for(const v in h){const y=h[v];if(!zc(y))continue;const{scrollX:b,scrollY:x}=y;if(!(!Number.isFinite(b)||!Number.isFinite(x))){if(v===Qu)window.scrollTo({top:x,left:b,behavior:f}),g=!0;else if(v){let w;try{w=document.querySelector(v)}catch{continue}w&&(w.scrollLeft=b,w.scrollTop=x,g=!0)}}}if(!g){const v=e.history.location.hash.slice(1);if(v){const y=window.history.state?.__hashScrollIntoViewOptions??!0;if(y){const b=document.getElementById(v);b&&b.scrollIntoView(y)}}else{const y={top:0,left:0,behavior:f};if(window.scrollTo(y),p)for(const b of p){if(b===Qu)continue;const x=typeof b=="function"?b():document.querySelector(b);x&&x.scrollTo(y)}}}}finally{Hh=!1}e.isScrollRestoring&&n.set(h=>(h[d]||={},h))}})}function v7(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function U_(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function _7(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=U_(o):Array.isArray(s)?s.push(U_(o)):n[r]=[s,U_(o)]}return n}const y7=w7(JSON.parse),b7=S7(JSON.stringify,JSON.parse);function w7(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=_7(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function S7(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=v7(o,r);return s?`?${s}`:""}}const ol="__root__";function Pd(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!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 Wr(e){return e instanceof Response&&!!e.options}function E7(e){return{input:({url:t})=>{for(const n of e)t=Lb(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=NP(e[n],t);return t}}}function x7(e){const t=PP(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===o?l.pathname="/":c.startsWith(s)&&(l.pathname=l.pathname.slice(n.length)),l},output:({url:l})=>(l.pathname=cm(["/",t,l.pathname]),l)}}function Lb(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 NP(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 R7(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:o,init:s}=t,l=new Map,c=new Map,d=new Map,f=n(e.status),p=n(e.loadedAt),h=n(e.isLoading),g=n(e.isTransitioning),v=n(e.location),y=n(e.resolvedLocation),b=n(e.statusCode),x=n(e.redirect),w=n([]),E=n([]),T=n([]),R=r(()=>z_(l,w.get())),O=r(()=>z_(c,E.get())),A=r(()=>z_(d,T.get())),I=r(()=>w.get()[0]),P=r(()=>w.get().some(W=>l.get(W)?.get().status==="pending")),L=r(()=>({locationHref:v.get().href,resolvedLocationHref:y.get()?.href,status:f.get()})),H=r(()=>({status:f.get(),loadedAt:p.get(),isLoading:h.get(),isTransitioning:g.get(),matches:R.get(),location:v.get(),resolvedLocation:y.get(),statusCode:b.get(),redirect:x.get()})),j=qd(64);function B(W){let te=j.get(W);return te||(te=r(()=>{const le=w.get();for(const Q of le){const k=l.get(Q);if(k&&k.routeId===W)return k.get()}}),j.set(W,te)),te}const z={status:f,loadedAt:p,isLoading:h,isTransitioning:g,location:v,resolvedLocation:y,statusCode:b,redirect:x,matchesId:w,pendingIds:E,cachedIds:T,matches:R,pendingMatches:O,cachedMatches:A,firstId:I,hasPending:P,matchRouteDeps:L,matchStores:l,pendingMatchStores:c,cachedMatchStores:d,__store:H,getRouteMatchStore:B,setMatches:K,setPending:oe,setCached:q};K(e.matches),s?.(z);function K(W){F_(W,l,w,n,o)}function oe(W){F_(W,c,E,n,o)}function q(W){F_(W,d,T,n,o)}return z}function z_(e,t){const n=[];for(const r of t){const o=e.get(r);o&&n.push(o.get())}return n}function F_(e,t,n,r,o){const s=e.map(c=>c.id),l=new Set(s);o(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const d=t.get(c.id);if(!d){const f=r(c);f.routeId=c.routeId,t.set(c.id,f);continue}d.routeId=c.routeId,d.get()!==c&&d.set(c)}Q8(n.get(),s)||n.set(s)})}const $b=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},O7=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),Ig=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),il=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const l=e.matches[s];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(r,c.__routeContext,c.__beforeLoadContext)}return r},QO=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(l=>l.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let l=s;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return n?s:o},oa=(e,t,n)=>{if(!(!Wr(n)&&!Tr(n)))throw Wr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:Wr(n)?"redirected":Tr(n)?"notFound":r.status==="pending"?"success":r.status,context:il(e,t.index),isFetching:!1,error:n})),Tr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),Wr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},kP=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},XO=(e,t,n)=>{const r=il(e,n);e.updateMatch(t,o=>({...o,context:r}))},Xu=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],l=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,oa(e,e.router.getMatch(o),n);try{l.options.onError?.(n)}catch(c){n=c,oa(e,e.router.getMatch(o),n)}e.updateMatch(o,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!Wr(n)&&!Tr(n)&&(e.serialError??=n)},DP=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Ig(e,t)&&(n.options.loader||n.options.beforeLoad||$P(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){const s=setTimeout(()=>{$b(e)},o);r._nonReactive.pendingTimeout=s}},T7=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;DP(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&oa(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},C7=(e,t,n,r)=>{const o=e.router.getMatch(t);let s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Fc(()=>{s?.resolve(),s=void 0});const{paramsError:l,searchError:c}=o;l&&Xu(e,n,l,"PARSE_PARAMS"),c&&Xu(e,n,c,"VALIDATE_SEARCH"),DP(e,t,r,o);const d=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,R=>({...R,isFetching:"beforeLoad",fetchCount:R.fetchCount+1,abortController:d})))},h=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,R=>({...R,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{p(),h()});return}o._nonReactive.beforeLoadPromise=Fc();const g={...il(e,n,!1),...o.__routeContext},{search:v,params:y,cause:b}=o,x=Ig(e,t),w={search:v,abortController:d,params:y,preload:x,context:g,location:e.location,navigate:R=>e.router.navigate({...R,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:x?"preload":b,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=R=>{if(R===void 0){e.router.batch(()=>{p(),h()});return}(Wr(R)||Tr(R))&&(p(),Xu(e,n,R,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,O=>({...O,__beforeLoadContext:R})),h()})};let T;try{if(T=r.options.beforeLoad(w),Hd(T))return p(),T.catch(R=>{Xu(e,n,R,"BEFORE_LOAD")}).then(E)}catch(R){p(),Xu(e,n,R,"BEFORE_LOAD")}E(T)},A7=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>c(),l=()=>C7(e,n,t,o),c=()=>{if(kP(e,n))return;const d=T7(e,n,o);return Hd(d)?d.then(l):l()};return s()},I7=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,l,c])=>({meta:s?.meta,links:s?.links,headScripts:s?.scripts,headers:c,scripts:l,styles:s?.styles}))},LP=(e,t,n,r,o)=>{const s=t[r-1],{params:l,loaderDeps:c,abortController:d,cause:f}=e.router.getMatch(n),p=il(e,r),h=Ig(e,n);return{params:l,deps:c,preload:!!h,parentMatchPromise:s,abortController:d,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:h?"preload":f,route:o,...e.router.options.additionalContext}},JO=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(xP??e.router.isServer)||s.ssr===!0)&&Gd(o);const l=o.options.loader,c=typeof l=="function"?l:l?.handler,d=c?.(LP(e,t,n,r,o)),f=!!c&&Hd(d);if((f||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,h=>({...h,isFetching:"loader"})),c){const h=f?await d:d;oa(e,e.router.getMatch(n),h),h!==void 0&&e.updateMatch(n,g=>({...g,loaderData:h}))}o._lazyPromise&&await o._lazyPromise;const p=s._nonReactive.minPendingPromise;p&&await p,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,h=>({...h,error:void 0,context:il(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,f=>({...f,status:f.status==="pending"?"success":f.status,isFetching:!1,context:il(e,r)}));return}const d=s._nonReactive.minPendingPromise;d&&await d,Tr(l)&&await o.options.notFoundComponent?.preload?.(),oa(e,e.router.getMatch(n),l);try{o.options.onError?.(l)}catch(f){c=f,oa(e,e.router.getMatch(n),f)}!Wr(c)&&!Tr(c)&&await Gd(o,["errorComponent"]),e.updateMatch(n,f=>({...f,error:c,context:il(e,r),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(n);l&&(l._nonReactive.loaderPromise=void 0),oa(e,l,s)}},M7=async(e,t,n)=>{async function r(v,y,b,x,w){const E=Date.now()-y.updatedAt,T=v?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,R=w.options.shouldReload,O=typeof R=="function"?R(LP(e,t,o,n,w)):R,{status:A,invalid:I}=x,P=E>=T&&(!!e.forceStaleReload||x.cause==="enter"||b!==void 0&&b!==x.id);l=A==="success"&&(I||(O??P)),v&&w.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{try{await JO(e,t,o,n,w);const L=e.router.getMatch(o);L._nonReactive.loaderPromise?.resolve(),L._nonReactive.loadPromise?.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){Wr(L)&&await e.router.navigate(L.options)}})()):A!=="success"||l?await JO(e,t,o,n,w):XO(e,o,n))}const{id:o,routeId:s}=e.matches[n];let l=!1,c=!1;const d=e.router.looseRoutesById[s],f=d.options.loader,p=((typeof f=="function"?void 0:f?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(kP(e,o)){if(!e.router.getMatch(o))return e.matches[n];XO(e,o,n)}else{const v=e.router.getMatch(o),y=e.router.stores.matchesId.get()[n],b=(y&&e.router.stores.matchStores.get(y)||null)?.routeId===s?y:e.router.stores.matches.get().find(w=>w.routeId===s)?.id,x=Ig(e,o);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&p)return v;await v._nonReactive.loaderPromise;const w=e.router.getMatch(o),E=w._nonReactive.error||w.error;E&&oa(e,w,E),w.status==="pending"&&await r(x,v,b,w,d)}else{const w=x&&!e.router.stores.matchStores.has(o),E=e.router.getMatch(o);E._nonReactive.loaderPromise=Fc(),w!==E.preload&&e.updateMatch(o,T=>({...T,preload:w})),await r(x,v,b,E,d)}}const h=e.router.getMatch(o);c||(h._nonReactive.loaderPromise?.resolve(),h._nonReactive.loadPromise?.resolve(),h._nonReactive.loadPromise=void 0),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,c||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const g=c?h.isFetching:!1;return g!==h.isFetching||h.invalid!==!1?(e.updateMatch(o,v=>({...v,isFetching:g,invalid:!1})),e.router.getMatch(o)):h};async function eT(e){const t=e,n=[];O7(t.router)&&$b(t);let r;for(let g=0;g<t.matches.length;g++){try{const v=A7(t,g);Hd(v)&&await v}catch(v){if(Wr(v))throw v;if(Tr(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?QO(t,r):void 0,l=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let c,d;for(let g=0;g<l;g++)n.push(M7(t,n,g));try{await Promise.all(n)}catch{const g=await Promise.allSettled(n);for(const v of g){if(v.status!=="rejected")continue;const y=v.reason;if(Wr(y))throw y;Tr(y)?c??=y:d??=y}if(d!==void 0)throw d}const f=c??(r&&!t.preload?r:void 0);let p=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const g=QO(t,f);g===void 0&&cs();const v=t.matches[g],y=t.router.looseRoutesById[v.routeId],b=t.router.options?.defaultNotFoundComponent;!y.options.notFoundComponent&&b&&(y.options.notFoundComponent=b),f.routeId=v.routeId;const x=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,w=>({...w,...x?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=g,await Gd(y,["notFoundComponent"])}else if(!t.preload){const g=t.matches[0];g.globalNotFound||t.router.getMatch(g.id)?.globalNotFound&&t.updateMatch(g.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const g=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Gd(g,["errorComponent"])}for(let g=0;g<=p;g++){const{id:v,routeId:y}=t.matches[g],b=t.router.looseRoutesById[y];try{const x=I7(t,v,b);if(x){const w=await x;t.updateMatch(v,E=>({...E,...w}))}}catch(x){console.error(`Error executing head for route ${y}:`,x)}}const h=$b(t);if(Hd(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function tT(e,t){const n=t.map(r=>e.options[r]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Gd(e,t=um){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:o,...s}=r.options;Object.assign(e.options,s),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===um?(()=>{if(e._componentsPromise===void 0){const r=tT(e,um);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():tT(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function $P(e){for(const t of um)if(e.options[t]?.preload)return!0;return!1}const um=["component","errorComponent","pendingComponent","notFoundComponent"];var sa="__TSR_index",nT="popstate",rT="beforeunload";function P7(e){let t=e.getLocation();const n=new Set,r=l=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:l}))},o=l=>{e.notifyOnIndexChange??!0?r(l):t=e.getLocation()},s=async({task:l,navigateOpts:c,...d})=>{if(c?.ignoreBlocker??!1){l();return}const f=e.getBlockers?.()??[],p=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const h of f){const g=Am(d.path,d.state);if(await h.blockerFn({currentLocation:t,nextLocation:g,action:d.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:l=>(n.add(l),()=>{n.delete(l)}),push:(l,c,d)=>{const f=t.state[sa];c=oT(f+1,c),s({task:()=>{e.pushState(l,c),r({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:l,state:c})},replace:(l,c,d)=>{const f=t.state[sa];c=oT(f,c),s({task:()=>{e.replaceState(l,c),r({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:l,state:c})},go:(l,c)=>{s({task:()=>{e.go(l),o({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{s({task:()=>{e.back(l?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{s({task:()=>{e.forward(l?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[sa]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(f=>f!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function oT(e,t){t||(t={});const n=Aw();return{...t,key:n,__TSR_key:n,[sa]:e}}function N7(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,l=P=>o=P,c=(P=>P),d=(()=>Am(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const P=Aw();t.history.replaceState({[sa]:0,key:P,__TSR_key:P},"")}let f=d(),p,h=!1,g=!1,v=!1,y=!1;const b=()=>f;let x,w;const E=()=>{x&&(I._ignoreSubscribers=!0,(x.isPush?t.history.pushState:t.history.replaceState)(x.state,"",x.href),I._ignoreSubscribers=!1,x=void 0,w=void 0,p=void 0)},T=(P,L,H)=>{const j=c(L);w||(p=f),f=Am(L,H),x={href:j,state:H,isPush:x?.isPush||P==="push"},w||(w=Promise.resolve().then(()=>E()))},R=P=>{f=d(),I.notify({type:P})},O=async()=>{if(g){g=!1;return}const P=d(),L=P.state[sa]-f.state[sa],H=L===1,j=L===-1,B=!H&&!j||h;h=!1;const z=B?"GO":j?"BACK":"FORWARD",K=B?{type:"GO",index:L}:{type:j?"BACK":"FORWARD"};if(v)v=!1;else{const oe=s();if(typeof document<"u"&&oe.length){for(const q of oe)if(await q.blockerFn({currentLocation:f,nextLocation:P,action:z})){g=!0,t.history.go(1),I.notify(K);return}}}f=d(),I.notify(K)},A=P=>{if(y){y=!1;return}let L=!1;const H=s();if(typeof document<"u"&&H.length)for(const j of H){const B=j.enableBeforeUnload??!0;if(B===!0){L=!0;break}if(typeof B=="function"&&B()===!0){L=!0;break}}if(L)return P.preventDefault(),P.returnValue=""},I=P7({getLocation:b,getLength:()=>t.history.length,pushState:(P,L)=>T("push",P,L),replaceState:(P,L)=>T("replace",P,L),back:P=>(P&&(v=!0),y=!0,t.history.back()),forward:P=>{P&&(v=!0),y=!0,t.history.forward()},go:P=>{h=!0,t.history.go(P)},createHref:P=>c(P),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(rT,A,{capture:!0}),t.removeEventListener(nT,O)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:s,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(rT,A,{capture:!0}),t.addEventListener(nT,O),t.history.pushState=function(...P){const L=n.apply(t.history,P);return I._ignoreSubscribers||R("PUSH"),L},t.history.replaceState=function(...P){const L=r.apply(t.history,P);return I._ignoreSubscribers||R("REPLACE"),L},I}function k7(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Am(e,t){const n=k7(e),r=n.indexOf("#"),o=n.indexOf("?"),s=Aw();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[sa]:0,key:s,__TSR_key:s}}}function Aw(){return(Math.random()+1).toString(36).substring(7)}function Mc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var D7=class{constructor(e,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.routeBranchCache=new WeakMap,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,l=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=u7(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=N7()),this.origin=this.options.origin,this.origin||(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;let p;this.resolvePathCache=qd(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=R7($7(this.latestLocation),p),g7(this)}let c=!1;const d=this.options.basepath??"/",f=this.options.rewrite;if(s||o!==d||l!==f){this.basepath=d;const p=[],h=PP(d);h&&h!=="/"&&p.push(x7({basepath:d})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:E7(p),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.set(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 n=o7(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&J8(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:d,search:f,hash:p,href:h,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(d)){const w=this.options.parseSearch(f),E=this.options.stringifySearch(w);return{href:d+E+p,publicHref:d+E+p,pathname:Wu(d).path,external:!1,searchStr:E,search:Ua(r?.search,w),hash:Wu(p.slice(1)).path,state:Ja(r?.state,g)}}const v=new URL(h,this.origin),y=Lb(this.rewrite,v),b=this.options.parseSearch(y.search),x=this.options.stringifySearch(b);return y.search=x,{href:y.href.replace(y.origin,""),publicHref:h,pathname:Wu(y.pathname).path,external:!!this.rewrite&&y.origin!==this.origin,searchStr:x,search:Ua(r?.search,b),hash:Wu(y.hash.slice(1)).path,state:Ja(r?.state,g)}},s=o(n),{__tempLocation:l,__tempKey:c}=s.state;if(l&&(!c||c===this.tempLocationKey)){const d=o(l);return d.state.key=s.state.key,d.state.__TSR_key=s.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>c7({base:n,to:r.includes("//")?Cw(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>j7({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=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{if(this.stores.pendingMatchStores.has(n))return;const r=this.stores.matchStores.get(n)?.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(s={})=>{const l=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);s.from;const d=s.unsafeRelative==="path"?l.pathname:s.from??c.fullPath,f=s.to?`${s.to}`:void 0,p=c.search,h=Object.assign(Object.create(null),c.params),g=f?.charCodeAt(0)===47?"/":this.resolvePathWithBase(d,"."),v=f?this.resolvePathWithBase(g,f):g,y=s.params===!1||s.params===null?Object.create(null):(s.params??!0)===!0?h:Object.assign(h,na(s.params,h)),b=this.routesByPath[ss(v)];let x;if(b)x=this.getRouteBranch(b);else if(v.includes("$"))x=[];else{const j=this.getMatchedRoutes(v);x=j.matchedRoutes,this.options.notFoundRoute&&(!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&(x=[...x,this.options.notFoundRoute])}if(x.length&&OP(y))for(const j of x){const B=j.options.params?.stringify??j.options.stringifyParams;if(B)try{Object.assign(y,B(y))}catch{}}const w=n.leaveParams?v:Wu(KO({path:v,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let E=p;if(n._includeValidateSearch&&this.options.search?.strict){const j={};x.forEach(B=>{if(B.options.validateSearch)try{Object.assign(j,dm(B.options.validateSearch,{...j,...E}))}catch{}}),E=j}E=U7({search:E,dest:s,destRoutes:x,_includeValidateSearch:n._includeValidateSearch}),E=Ua(p,E);const T=this.options.stringifySearch(E),R=s.hash===!0?l.hash:s.hash?na(s.hash,l.hash):void 0,O=R?`#${R}`:"";let A=s.state===!0?l.state:s.state?na(s.state,l.state):{};A=Ja(l.state,A);const I=`${w}${T}${O}`;let P,L,H=!1;if(this.rewrite){const j=new URL(I,this.origin),B=NP(this.rewrite,j);P=j.href.replace(j.origin,""),B.origin!==this.origin?(L=B.href,H=!0):L=B.pathname+B.search+B.hash}else P=W8(I),L=P;return{publicHref:L,href:P,pathname:w,search:E,searchStr:T,state:A,hash:R??"",external:H,unmaskOnReload:s.unmaskOnReload}},o=(s={},l)=>{const c=r(s);let d=l?r(l):void 0;if(!d){const f=Object.create(null);if(this.options.routeMasks){const p=e7(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:h,params:g,...v}=p.route,y=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,na(g,f));l={from:n.from,...v,params:y},d=r(l)}}}return d&&(c.maskedLocation=d),c};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{o.state[p]=this.latestLocation.state[p]});const f=rl(o.state,this.latestLocation.state);return d.forEach(p=>{delete o.state[p]}),f},l=ss(this.latestLocation.href)===ss(o.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Fc(()=>{c?.resolve(),c=void 0}),l&&s())this.load();else{let{maskedLocation:d,hashScrollIntoView:f,...p}=o;d&&(p={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:l,href:c,...d}={})=>{if(c){const h=this.history.location.state.__TSR_index,g=Am(c,{__TSR_index:n?h:h+1}),v=new URL(g.pathname,this.origin);d.to=Lb(this.rewrite,v).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 p=this.commitLocation({...f,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...l})=>{let c=!1;if(o)try{new URL(`${o}`),c=!0}catch{}if(c&&!r&&(r=!0),r){if(n!==void 0||!o){const f=this.buildLocation({to:n,...l});o=o??f.publicHref,s=s??f.publicHref}const d=!c&&s?s:o;if(Tm(d,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const p of f)if(p?.blockerFn&&await p.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...l,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(o=>!n.some(s=>s.id===o.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,o,s;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(s=new Promise(d=>{this.startTransition(async()=>{try{this.beforeLoad();const f=this.latestLocation,p=Mc(f,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await eT({router:this,sync:n?.sync,forceStaleReload:l.href===f.href,matches:this.stores.pendingMatches.get(),location:f,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let h=null,g=null,v=null,y=null;this.batch(()=>{const b=this.stores.pendingMatches.get(),x=b.length,w=this.stores.matches.get();h=x?w.filter(R=>!this.stores.pendingMatchStores.has(R.id)):null;const E=new Set;for(const R of this.stores.pendingMatchStores.values())R.routeId&&E.add(R.routeId);const T=new Set;for(const R of this.stores.matchStores.values())R.routeId&&T.add(R.routeId);g=x?w.filter(R=>!E.has(R.routeId)):null,v=x?b.filter(R=>!T.has(R.routeId)):null,y=x?b.filter(R=>T.has(R.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),x&&(this.stores.setMatches(b),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...h.filter(R=>R.status!=="error"&&R.status!=="notFound"&&R.status!=="redirected")]),this.clearExpiredCache())});for(const[b,x]of[[g,"onLeave"],[v,"onEnter"],[y,"onStay"]])if(b)for(const w of b)this.looseRoutesById[w.routeId].options[x]?.(w)})})}})}catch(f){Wr(f)?(r=f,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Tr(f)&&(o=f);const p=r?r.status:o?404:this.stores.matches.get().some(h=>h.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),d()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(d=>d.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,l=this.stores.resolvedLocation.get(),c=typeof r.types=="function"?r.types(Mc(s,l)):r.types;if(c===!1){n();return}o={update:n,types:c}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.stores.pendingMatchStores.get(n);if(o){o.set(r);return}const s=this.stores.matchStores.get(n);if(s){s.set(r);return}const l=this.stores.cachedMatchStores.get(n);if(l){const c=r(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(d=>d.filter(f=>f!==n)):l.set(c)}})},this.getMatch=n=>this.stores.cachedMatchStores.get(n)?.get()??this.stores.pendingMatchStores.get(n)?.get()??this.stores.matchStores.get(n)?.get(),this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Tm(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(o=>!r(o))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=o=>{const s=this.looseRoutesById[o.routeId];if(!s.options.loader)return!0;const l=(o.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return o.status==="error"?!0:n-o.updatedAt>=l};this.clearCache({filter:r})},this.loadRouteChunk=Gd,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),l=new Set([...s,...this.stores.cachedIds.get()]),c=o.filter(d=>!l.has(d.id));if(c.length){const d=this.stores.cachedMatches.get();this.stores.setCached([...d,...c])}try{return o=await eT({router:this,matches:o,location:r,preload:!0,updateMatch:(d,f)=>{s.has(d)?o=o.map(p=>p.id===d?f(p):p):this.updateMatch(d,f)}}),o}catch(d){if(Wr(d))return d.options.reloadDocument?void 0:await this.preloadRoute({...d.options,_fromLocation:r});Tr(d)||console.error(d);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.stores.status.get()!=="pending")return!1;const l=(r?.pending===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=t7(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,l.pathname,this.processedTree);return!c||n.params&&!rl(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?rl(l.search,s.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??b7,parseSearch:e.parseSearch??y7,protocolAllowlist:e.protocolAllowlist??Y8}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=IP(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:o}=n;let{matchedRoutes:s}=n,l=!1;(r?r.path!=="/"&&o["**"]:ss(e.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:l=!0);const c=l?F7(this.options.notFoundMode,s):void 0,d=new Array(s.length),f=new Map;for(const p of this.stores.matchStores.values())p.routeId&&f.set(p.routeId,p.get());for(let p=0;p<s.length;p++){const h=s[p],g=d[p-1];let v,y,b;{const B=g?.search??e.search,z=g?._strictSearch??void 0;try{const K=dm(h.options.validateSearch,{...B})??void 0;v={...B,...K},y={...z,...K},b=void 0}catch(K){let oe=K;if(K instanceof Im||(oe=new Im(K.message,{cause:K})),t?.throwOnError)throw oe;v=B,y={},b=oe}}const x=h.options.loaderDeps?.({search:v})??"",w=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:T}=KO({path:h.fullPath,params:o,decoder:this.pathParamsDecoder,server:this.isServer}),R=h.id+E+w,O=this.getMatch(R),A=f.get(h.id),I=O?._strictParams??T;let P;if(!O)try{iT(h,I)}catch(B){if(Tr(B)||Wr(B)?P=B:P=new L7(B.message,{cause:B}),t?.throwOnError)throw P}Object.assign(o,I);const L=A?"stay":"enter";let H;if(O)H={...O,cause:L,params:A?.params??o,_strictParams:I,search:Ua(A?A.search:O.search,v),_strictSearch:y};else{const B=h.options.loader||h.options.beforeLoad||h.lazyFn||$P(h)?"pending":"success";H={id:R,ssr:h.options.ssr,index:p,routeId:h.id,params:A?.params??o,_strictParams:I,pathname:E,updatedAt:Date.now(),search:A?Ua(A.search,v):v,_strictSearch:y,searchError:void 0,status:B,isFetching:!1,error:void 0,paramsError:P,__routeContext:void 0,_nonReactive:{loadPromise:Fc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:L,loaderDeps:A?Ja(A.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}t?.preload||(H.globalNotFound=c===h.id),H.searchError=b;const j=this.getParentContext(g);H.context={...j,...H.__routeContext,...H.__beforeLoadContext},d[p]=H}for(let p=0;p<d.length;p++){const h=d[p],g=this.looseRoutesById[h.routeId],v=this.getMatch(h.id),y=f.get(h.routeId);if(h.params=y?Ua(y.params,o):o,!v){const b=d[p-1],x=this.getParentContext(b);if(g.options.context){const w={deps:h.loaderDeps,params:h.params,context:x??{},location:e,navigate:E=>this.navigate({...E,_fromLocation:e}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:d,routeId:g.id};h.__routeContext=g.options.context(w)??void 0}h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}}return d}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:n}=this.getMatchedRoutes(e.pathname),r=Vd(t),o={...e.search};for(const f of t)try{Object.assign(o,dm(f.options.validateSearch,o))}catch{}const s=Vd(this.stores.matchesId.get()),l=s&&this.stores.matchStores.get(s)?.get(),c=l&&l.routeId===r.id&&l.pathname===e.pathname;let d;if(c)d=l.params;else{const f=Object.assign(Object.create(null),n);for(const p of t)try{iT(p,f)}catch{}d=f}return{matchedRoutes:t,fullPath:r.fullPath,search:o,params:d}}},Im=class extends Error{},L7=class extends Error{};function $7(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function dm(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Im("Async validation not supported");if(n.issues)throw new Im(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 j7({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),o=ss(e);let s;const l=n7(o,n,!0);return l&&(s=l.route,Object.assign(r,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:r,foundRoute:s}}function U7({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return z7(n)(e,t,r??!1)}function z7(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:l,next:c})=>{let d=l;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(d=o.options.preSearchFilters.reduce((p,h)=>h(p),l));const f=c(d);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,h)=>h(p),f):f};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:l,next:c})=>{const d=c(l);if(!t._includeValidateSearch)return d;try{return{...d,...dm(o.options.validateSearch,d)??void 0}}catch{return d}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:na(s.search,o):{}};t.middlewares.push(n);const r=(o,s,l)=>{if(o>=l.length)return s;const c=l[o];return c({search:s,next:f=>r(o+1,f,l)})};return function(s,l,c){return t.dest=l,t._includeValidateSearch=c,r(0,s,t.middlewares)}}function F7(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return ol}function iT(e,t){const n=e.options.params?.parse??e.options.parseParams;if(n){const r=n(t);if(r===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,r)}}const B7="Error preloading route! ☝️";var jP=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{this.originalIndex=t.originalIndex;const n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=ol:this.parentRoute||cs();let o=r?ol:n?.path;o&&o!=="/"&&(o=MP(o));const s=n?.id||o;let l=r?ol:cm([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),l!=="__root__"&&(l=cm(["/",l]));const c=l==="__root__"?"/":cm([this.parentRoute.fullPath,o]);this._path=o,this._id=l,this._fullPath=c,this._to=ss(c)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Pd({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},V7=class extends jP{constructor(e){super(e)}};function H7(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function Iw(e){const t=e.errorComponent??Mw;return C.jsx(q7,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?M.createElement(t,{error:n,reset:r}):e.children})}var q7=class extends M.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Mw({error:e}){const[t,n]=M.useState(!1);return C.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[C.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[C.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),C.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"})]}),C.jsx("div",{style:{height:".25rem"}}),t?C.jsx("div",{children:C.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?C.jsx("code",{children:e.message}):null})}):null]})}function G7({children:e,fallback:t=null}){return UP()?C.jsx(ee.Fragment,{children:e}):C.jsx(ee.Fragment,{children:t})}function UP(){return ee.useSyncExternalStore(K7,()=>!0,()=>!1)}function K7(){return()=>{}}var zP=M.createContext(null);function bo(e){return M.useContext(zP)}var Mg=M.createContext(void 0),Z7=M.createContext(void 0),pn=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(pn||{});function Y7({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:l,shallowPropagate:c};function r(f,p,h){const g=p.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:p.deps;if(v!==void 0&&v.dep===f){v.version=h,p.depsTail=v;return}const y=f.subsTail;if(y!==void 0&&y.version===h&&y.sub===p)return;const b=p.depsTail=f.subsTail={version:h,dep:f,sub:p,prevDep:g,nextDep:v,prevSub:y,nextSub:void 0};v!==void 0&&(v.prevDep=b),g!==void 0?g.nextDep=b:p.deps=b,y!==void 0?y.nextSub=b:f.subs=b}function o(f,p=f.sub){const h=f.dep,g=f.prevDep,v=f.nextDep,y=f.nextSub,b=f.prevSub;return v!==void 0?v.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=v:p.deps=v,y!==void 0?y.prevSub=b:h.subsTail=b,b!==void 0?b.nextSub=y:(h.subs=y)===void 0&&n(h),v}function s(f){let p=f.nextSub,h;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&d(f,g)?(g.flags=v|40,v&=1):v=0:g.flags=v&-9|32:v=0:g.flags=v|32,v&2&&t(g),v&1){const y=g.subs;if(y!==void 0){const b=(f=y).nextSub;b!==void 0&&(h={value:p,prev:h},p=b);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;h!==void 0;)if(f=h.value,h=h.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let h,g=0,v=!1;e:do{const y=f.dep,b=y.flags;if(p.flags&16)v=!0;else if((b&17)===17){if(e(y)){const x=y.subs;x.nextSub!==void 0&&c(x),v=!0}}else if((b&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=y.deps,p=y,++g;continue}if(!v){const x=f.nextDep;if(x!==void 0){f=x;continue}}for(;g--;){const x=p.subs,w=x.nextSub!==void 0;if(w?(f=h.value,h=h.prev):f=x,v){if(e(p)){w&&c(x),p=f.sub;continue}v=!1}else p.flags&=-33;p=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return v}while(!0)}function c(f){do{const p=f.sub,h=p.flags;(h&48)===32&&(p.flags=h|16,(h&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function d(f,p){let h=p.depsTail;for(;h!==void 0;){if(h===f)return!0;h=h.prevDep}return!1}}function W7(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const jb=[];let fm=0;const{link:sT,unlink:Q7,propagate:X7,checkDirty:FP,shallowPropagate:aT}=Y7({update(e){return e._update()},notify(e){jb[Ub++]=e,e.flags&=~pn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=pn.Mutable|pn.Dirty,Mm(e))}});let qh=0,Ub=0,mi,zb=0;function BP(e){try{++zb,e()}finally{--zb||VP()}}function Mm(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Q7(n,e)}function VP(){if(!(zb>0)){for(;qh<Ub;){const e=jb[qh];jb[qh++]=void 0,e.notify()}qh=0,Ub=0}}function lT(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?pn.None:pn.Mutable,get(){return mi!==void 0&&sT(o,mi,fm),o._snapshot},subscribe(s){const l=W7(s),c={current:!1},d=J7(()=>{o.get(),c.current?l.next?.(o._snapshot):c.current=!0});return{unsubscribe:()=>{d.stop()}}},_update(s){const l=mi,c=t?.compare??Object.is;if(n)mi=o,++fm,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=pn.Mutable|pn.RecursedCheck);try{const d=o._snapshot,f=typeof s=="function"?s(d):s===void 0&&n?r(d):s;return d===void 0||!c(d,f)?(o._snapshot=f,!0):!1}finally{mi=l,n&&(o.flags&=~pn.RecursedCheck),Mm(o)}}};return n?(o.flags=pn.Mutable|pn.Dirty,o.get=function(){const s=o.flags;if(s&pn.Dirty||s&pn.Pending&&FP(o.deps,o)){if(o._update()){const l=o.subs;l!==void 0&&aT(l)}}else s&pn.Pending&&(o.flags=s&~pn.Pending);return mi!==void 0&&sT(o,mi,fm),o._snapshot}):o.set=function(s){if(o._update(s)){const l=o.subs;l!==void 0&&(X7(l),aT(l),VP())}},o}function J7(e){const t=()=>{const r=mi;mi=n,++fm,n.depsTail=void 0,n.flags=pn.Watching|pn.RecursedCheck;try{return e()}finally{mi=r,n.flags&=~pn.RecursedCheck,Mm(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:pn.Watching|pn.RecursedCheck,notify(){const r=this.flags;r&pn.Dirty||r&pn.Pending&&FP(this.deps,this)?t():this.flags=pn.Watching},stop(){this.flags=pn.None,this.depsTail=void 0,Mm(this)}};return t(),n}var B_={exports:{}},V_={},H_={exports:{}},q_={};var cT;function eU(){if(cT)return q_;cT=1;var e=ga();function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(h,g){var v=g(),y=r({inst:{value:v,getSnapshot:g}}),b=y[0].inst,x=y[1];return s(function(){b.value=v,b.getSnapshot=g,d(b)&&x({inst:b})},[h,v,g]),o(function(){return d(b)&&x({inst:b}),h(function(){d(b)&&x({inst:b})})},[h]),l(v),v}function d(h){var g=h.getSnapshot;h=h.value;try{var v=g();return!n(h,v)}catch{return!0}}function f(h,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return q_.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,q_}var uT;function HP(){return uT||(uT=1,H_.exports=eU()),H_.exports}var dT;function tU(){if(dT)return V_;dT=1;var e=ga(),t=HP();function n(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,d=e.useDebugValue;return V_.useSyncExternalStoreWithSelector=function(f,p,h,g,v){var y=s(null);if(y.current===null){var b={hasValue:!1,value:null};y.current=b}else b=y.current;y=c(function(){function w(A){if(!E){if(E=!0,T=A,A=g(A),v!==void 0&&b.hasValue){var I=b.value;if(v(I,A))return R=I}return R=A}if(I=R,r(T,A))return I;var P=g(A);return v!==void 0&&v(I,P)?(T=A,I):(T=A,R=P)}var E=!1,T,R,O=h===void 0?null:h;return[function(){return w(p())},O===null?void 0:function(){return w(O())}]},[p,h,g,v]);var x=o(f,y[0],y[1]);return l(function(){b.hasValue=!0,b.value=x},[x]),d(x),x},V_}var fT;function nU(){return fT||(fT=1,B_.exports=tU()),B_.exports}var qP=nU();const aue=ma(qP);function rU(e,t){return e===t}function yo(e,t,n=rU){const r=M.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),o=M.useCallback(()=>e?.get(),[e]);return qP.useSyncExternalStoreWithSelector(r,o,o,t,n)}var oU={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function dl(e){const t=bo(),n=M.useContext(e.from?Z7:Mg),r=e.from??n,o=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,s=M.useRef(void 0);return yo(o??oU,l=>{if((e.shouldThrow??!0)&&!l&&cs(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const d=Ja(s.current,c);return s.current=d,d}return c})}function GP(e){return dl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function KP(e){const{select:t,...n}=e;return dl({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Pw(e){return dl({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 ZP(e){return dl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Pg(e){const t=bo();return M.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function lue(e){const t=bo(),n=Pg(),r=M.useRef(null);return xc(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function YP(e){return dl({...e,select:t=>e.select?e.select(t.context):t.context})}var Ng=iP();const WP=ma(Ng);function iU(e,t){const n=bo(),r=H8(t),{activeProps:o,inactiveProps:s,activeOptions:l,to:c,preload:d,preloadDelay:f,preloadIntentProximity:p,hashScrollIntoView:h,replace:g,startTransition:v,resetScroll:y,viewTransition:b,children:x,target:w,disabled:E,style:T,className:R,onClick:O,onBlur:A,onFocus:I,onMouseEnter:P,onMouseLeave:L,onTouchStart:H,ignoreBlocker:j,params:B,search:z,hash:K,state:oe,mask:q,reloadDocument:W,unsafeRelative:te,from:le,_fromLocation:Q,...k}=e,G=UP(),V=M.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),D=yo(n.stores.location,ne=>ne,(ne,ae)=>ne.href===ae.href),F=M.useMemo(()=>{const ne={_fromLocation:D,...V};return n.buildLocation(ne)},[n,D,V]),X=F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,fe=F.maskedLocation?F.maskedLocation.external:F.external,pe=M.useMemo(()=>dU(X,fe,n.history,E),[E,fe,X,n.history]),xe=M.useMemo(()=>{if(pe?.external)return Tm(pe.href,n.protocolAllowlist)?void 0:pe.href;if(!fU(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Tm(c,n.protocolAllowlist)?void 0:c}catch{}},[c,pe,n.protocolAllowlist]),je=M.useMemo(()=>{if(xe)return!1;if(l?.exact){if(!l7(D.pathname,F.pathname,n.basepath))return!1}else{const ne=Cm(D.pathname,n.basepath),ae=Cm(F.pathname,n.basepath);if(!(ne.startsWith(ae)&&(ne.length===ae.length||ne[ae.length]==="/")))return!1}return(l?.includeSearch??!0)&&!rl(D.search,F.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?G&&D.hash===F.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,D,xe,G,F.hash,F.pathname,F.search,n.basepath]),Y=je?na(o,{})??sU:G_,re=je?G_:na(s,{})??G_,ve=[R,Y.className,re.className].filter(Boolean).join(" "),se=(T||Y.style||re.style)&&{...T,...Y.style,...re.style},[Se,Te]=M.useState(!1),tt=M.useRef(!1),rt=e.reloadDocument||xe?!1:d??n.options.defaultPreload,Be=f??n.options.defaultPreloadDelay??0,Qe=M.useCallback(()=>{n.preloadRoute({...V,_builtLocation:F}).catch(ne=>{console.warn(ne),console.warn(B7)})},[n,V,F]);V8(r,M.useCallback(ne=>{ne?.isIntersecting&&Qe()},[Qe]),uU,{disabled:!!E||rt!=="viewport"}),M.useEffect(()=>{tt.current||!E&&rt==="render"&&(Qe(),tt.current=!0)},[E,Qe,rt]);const Pe=ne=>{const ae=ne.currentTarget.getAttribute("target"),Re=w!==void 0?w:ae;if(!E&&!hU(ne)&&!ne.defaultPrevented&&(!Re||Re==="_self")&&ne.button===0){ne.preventDefault(),Ng.flushSync(()=>{Te(!0)});const Ae=n.subscribe("onResolved",()=>{Ae(),Te(!1)});n.navigate({...V,replace:g,resetScroll:y,hashScrollIntoView:h,startTransition:v,viewTransition:b,ignoreBlocker:j})}};if(xe)return{...k,ref:r,href:xe,...x&&{children:x},...w&&{target:w},...E&&{disabled:E},...T&&{style:T},...R&&{className:R},...O&&{onClick:O},...A&&{onBlur:A},...I&&{onFocus:I},...P&&{onMouseEnter:P},...L&&{onMouseLeave:L},...H&&{onTouchStart:H}};const Me=ne=>{if(E||rt!=="intent")return;if(!Be){Qe();return}const ae=ne.currentTarget;if(Ju.has(ae))return;const Re=setTimeout(()=>{Ju.delete(ae),Qe()},Be);Ju.set(ae,Re)},ze=ne=>{E||rt!=="intent"||Qe()},Z=ne=>{if(E||!rt||!Be)return;const ae=ne.currentTarget,Re=Ju.get(ae);Re&&(clearTimeout(Re),Ju.delete(ae))};return{...k,...Y,...re,href:pe?.href,ref:r,onClick:rc([O,Pe]),onBlur:rc([A,Z]),onFocus:rc([I,Me]),onMouseEnter:rc([P,Me]),onMouseLeave:rc([L,Z]),onTouchStart:rc([H,ze]),disabled:!!E,target:w,...se&&{style:se},...ve&&{className:ve},...E&&aU,...je&&lU,...G&&Se&&cU}}var G_={},sU={className:"active"},aU={role:"link","aria-disabled":!0},lU={"data-status":"active","aria-current":"page"},cU={"data-transitioning":"transitioning"},Ju=new WeakMap,uU={rootMargin:"100px"},rc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function dU(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function fU(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var kg=M.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=iU(r,t),l=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:c,...d}=s;return M.createElement("a",d,l)}return M.createElement(n,s,l)});function hU(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var pU=class extends jP{constructor(e){super(e),this.useMatch=t=>dl({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>YP({...t,from:this.id}),this.useSearch=t=>ZP({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Pw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>KP({...t,from:this.id}),this.useLoaderData=t=>GP({...t,from:this.id}),this.useNavigate=()=>Pg({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(kg,{ref:n,from:this.fullPath,...t}))}};function st(e){return new pU(e)}var mU=class extends V7{constructor(e){super(e),this.useMatch=t=>dl({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>YP({...t,from:this.id}),this.useSearch=t=>ZP({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Pw({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>KP({...t,from:this.id}),this.useLoaderData=t=>GP({...t,from:this.id}),this.useNavigate=()=>Pg({from:this.fullPath}),this.Link=ee.forwardRef((t,n)=>C.jsx(kg,{ref:n,from:this.fullPath,...t}))}};function gU(e){return new mU(e)}function dt(e,t){let n,r,o,s;const l=()=>(n||(n=e().then(d=>{n=void 0,r=d[t??"default"]}).catch(d=>{if(o=d,K8(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const f=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(f)||(sessionStorage.setItem(f,"1"),s=!0)}})),n),c=function(f){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(zO)zO(l());else throw l();return M.createElement(r,f)};return c.preload=l,c}function vU(e){const t=bo(),n=`not-found-${yo(t.stores.location,r=>r.pathname)}-${yo(t.stores.status,r=>r)}`;return C.jsx(Iw,{getResetKey:()=>n,onCatch:(r,o)=>{if(Tr(r))e.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Tr(r))return e.fallback?.(r);throw r},children:e.children})}function _U(){return C.jsx("p",{children:"Not Found"})}function yc(e){return C.jsx(C.Fragment,{children:e.children})}function QP(e,t,n){return t.options.notFoundComponent?C.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?C.jsx(e.options.defaultNotFoundComponent,{...n}):C.jsx(_U,{})}function yU(e){return null}function bU(){return yU(bo()),null}var XP=M.memo(function({matchId:t}){const n=bo(),r=n.stores.matchStores.get(t);r||cs();const o=yo(n.stores.loadedAt,l=>l),s=yo(r,l=>l);return C.jsx(wU,{router:n,matchId:t,resetKey:o,matchState:M.useMemo(()=>{const l=s.routeId,c=n.routesById[l].parentRoute?.id;return{routeId:l,ssr:s.ssr,_displayPending:s._displayPending,parentRouteId:c}},[s._displayPending,s.routeId,s.ssr,n.routesById])})});function wU({router:e,matchId:t,resetKey:n,matchState:r}){const o=e.routesById[r.routeId],s=o.options.pendingComponent??e.options.defaultPendingComponent,l=s?C.jsx(s,{}):null,c=o.options.errorComponent??e.options.defaultErrorComponent,d=o.options.onCatch??e.options.defaultOnCatch,f=o.isRoot?o.options.notFoundComponent??e.options.notFoundRoute?.options.component:o.options.notFoundComponent,p=r.ssr===!1||r.ssr==="data-only",h=(!o.isRoot||o.options.wrapInSuspense||p)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||p))?M.Suspense:yc,g=c?Iw:yc,v=f?vU:yc;return C.jsxs(o.isRoot?o.options.shellComponent??yc:yc,{children:[C.jsx(Mg.Provider,{value:t,children:C.jsx(h,{fallback:l,children:C.jsx(g,{getResetKey:()=>n,errorComponent:c||Mw,onCatch:(y,b)=>{if(Tr(y))throw y.routeId??=r.routeId,y;d?.(y,b)},children:C.jsx(v,{fallback:y=>{if(y.routeId??=r.routeId,!f||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!o.isRoot)throw y;return M.createElement(f,y)},children:p||r._displayPending?C.jsx(G7,{fallback:l,children:C.jsx(hT,{matchId:t})}):C.jsx(hT,{matchId:t})})})})}),r.parentRouteId===ol?C.jsxs(C.Fragment,{children:[C.jsx(SU,{resetKey:n}),e.options.scrollRestoration&&xP?C.jsx(bU,{}):null]}):null]})}function SU({resetKey:e}){const t=bo(),n=M.useRef(void 0);return xc(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Mc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var hT=M.memo(function({matchId:t}){const n=bo(),r=(p,h)=>n.getMatch(p.id)?._nonReactive[h]??p._nonReactive[h],o=n.stores.matchStores.get(t);o||cs();const s=yo(o,p=>p),l=s.routeId,c=n.routesById[l],d=M.useMemo(()=>{const p=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return p?JSON.stringify(p):void 0},[l,s.loaderDeps,s._strictParams,s._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=M.useMemo(()=>{const p=c.options.component??n.options.defaultComponent;return p?C.jsx(p,{},d):C.jsx(JP,{})},[d,c.options.component,n.options.defaultComponent]);if(s._displayPending)throw r(s,"displayPendingPromise");if(s._forcePending)throw r(s,"minPendingPromise");if(s.status==="pending"){const p=c.options.pendingMinMs??n.options.defaultPendingMinMs;if(p){const h=n.getMatch(s.id);if(h&&!h._nonReactive.minPendingPromise){const g=Fc();h._nonReactive.minPendingPromise=g,setTimeout(()=>{g.resolve(),h._nonReactive.minPendingPromise=void 0},p)}}throw r(s,"loadPromise")}if(s.status==="notFound")return Tr(s.error)||cs(),QP(n,c,s.error);if(s.status==="redirected")throw Wr(s.error)||cs(),r(s,"loadPromise");if(s.status==="error")throw s.error;return f}),JP=M.memo(function(){const t=bo(),n=M.useContext(Mg);let r,o=!1,s;{const f=n?t.stores.matchStores.get(n):void 0;[r,o]=yo(f,p=>[p?.routeId,p?.globalNotFound??!1]),s=yo(t.stores.matchesId,p=>p[p.findIndex(h=>h===n)+1])}const l=r?t.routesById[r]:void 0,c=t.options.defaultPendingComponent?C.jsx(t.options.defaultPendingComponent,{}):null;if(o)return l||cs(),QP(t,l,void 0);if(!s)return null;const d=C.jsx(XP,{matchId:s});return r===ol?C.jsx(M.Suspense,{fallback:c,children:d}):d});function EU(){const e=bo(),t=M.useRef({router:e,mounted:!1}),[n,r]=M.useState(!1),o=yo(e.stores.isLoading,h=>h),s=yo(e.stores.hasPending,h=>h),l=D_(o),c=o||n||s,d=D_(c),f=o||s,p=D_(f);return e.startTransition=h=>{r(!0),M.startTransition(()=>{h(),r(!1)})},M.useEffect(()=>{const h=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return ss(e.latestLocation.publicHref)!==ss(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{h()}},[e,e.history]),xc(()=>{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]),xc(()=>{l&&!o&&e.emit({type:"onLoad",...Mc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,o]),xc(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",...Mc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,p,e]),xc(()=>{if(d&&!c){const h=Mc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...h}),BP(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),h.hrefChanged&&H7(e)}},[c,d,e]),null}function xU(){const e=bo(),t=e.routesById[ol].options.pendingComponent??e.options.defaultPendingComponent,n=t?C.jsx(t,{}):null,r=C.jsxs(typeof document<"u"&&e.ssr?yc:M.Suspense,{fallback:n,children:[C.jsx(EU,{}),C.jsx(RU,{})]});return e.options.InnerWrap?C.jsx(e.options.InnerWrap,{children:r}):r}function RU(){const e=bo(),t=yo(e.stores.firstId,o=>o),n=yo(e.stores.loadedAt,o=>o),r=t?C.jsx(XP,{matchId:t}):null;return C.jsx(Mg.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:C.jsx(Iw,{getResetKey:()=>n,errorComponent:Mw,onCatch:void 0,children:r})})}var OU=e=>({createMutableStore:lT,createReadonlyStore:lT,batch:BP}),TU=e=>new CU(e),CU=class extends D7{constructor(e){super(e,OU)}};function AU({router:e,children:t,...n}){OP(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=C.jsx(zP.Provider,{value:e,children:t});return e.options.Wrap?C.jsx(e.options.Wrap,{children:r}):r}function IU({router:e,...t}){return C.jsx(AU,{router:e,...t,children:C.jsx(xU,{})})}var MU={},pT={};const hm=Object.create(null),ed=e=>MU||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?hm:globalThis),Do=new Proxy(hm,{get(e,t){return ed()[t]??hm[t]},has(e,t){return t in ed()||t in hm},set(e,t,n){const r=ed(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;const n=ed(!0);return delete n[t],!0},ownKeys(){const e=ed(!0);return Object.keys(e)}});function Fn(e,t){return typeof process<"u"&&pT?pT[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const td=1,rr=4,_i=8,po=24,mT={eterm:rr,cons25:rr,console:rr,cygwin:rr,dtterm:rr,gnome:rr,hurd:rr,jfbterm:rr,konsole:rr,kterm:rr,mlterm:rr,mosh:po,putty:rr,st:rr,"rxvt-unicode-24bit":po,terminator:po,"xterm-kitty":po},PU=new Map(Object.entries({APPVEYOR:_i,BUILDKITE:_i,CIRCLECI:po,DRONE:_i,GITEA_ACTIONS:po,GITHUB_ACTIONS:po,GITLAB_CI:_i,TRAVIS:_i})),NU=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function kU(){if(Fn("FORCE_COLOR")!==void 0)switch(Fn("FORCE_COLOR")){case"":case"1":case"true":return rr;case"2":return _i;case"3":return po;default:return td}if(Fn("NODE_DISABLE_COLORS")!==void 0&&Fn("NODE_DISABLE_COLORS")!==""||Fn("NO_COLOR")!==void 0&&Fn("NO_COLOR")!==""||Fn("TERM")==="dumb")return td;if(Fn("TMUX"))return po;if("TF_BUILD"in Do&&"AGENT_NAME"in Do)return rr;if("CI"in Do){for(const{0:e,1:t}of PU)if(e in Do)return t;return Fn("CI_NAME")==="codeship"?_i:td}if("TEAMCITY_VERSION"in Do)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Fn("TEAMCITY_VERSION"))!==null?rr:td;switch(Fn("TERM_PROGRAM")){case"iTerm.app":return!Fn("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Fn("TERM_PROGRAM_VERSION"))!==null?_i:po;case"HyperTerm":case"MacTerm":return po;case"Apple_Terminal":return _i}if(Fn("COLORTERM")==="truecolor"||Fn("COLORTERM")==="24bit")return po;if(Fn("TERM")){if(/truecolor/.exec(Fn("TERM"))!==null)return po;if(/^xterm-256/.exec(Fn("TERM"))!==null)return _i;const e=Fn("TERM").toLowerCase();if(mT[e])return mT[e];if(NU.some(t=>t.exec(e)!==null))return rr}return Fn("COLORTERM")?rr:td}const yi={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"}},Fb=["debug","info","success","warn","error"];function DU(e,t){return Fb.indexOf(t)>=Fb.indexOf(e)}const LU={info:yi.fg.blue,success:yi.fg.green,warn:yi.fg.yellow,error:yi.fg.red,debug:yi.fg.magenta},$U=(e,t,n)=>{const r=new Date().toISOString();return n?`${yi.dim}${r}${yi.reset} ${LU[e]}${e.toUpperCase()}${yi.reset} ${yi.bright}[Better Auth]:${yi.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},jU=e=>{const t="warn",n=kU()!==1,r=(o,s,l=[])=>{if(!DU(t,o))return;const c=$U(o,s,n);{o==="error"?console.error(c,...l):o==="warn"?console.warn(c,...l):console.log(c,...l);return}};return{...Object.fromEntries(Fb.map(o=>[o,(...[s,...l])=>r(o,s,l)])),get level(){return t}}};jU();const UU=Object.freeze({status:"aborted"});function _e(e,t,n){function r(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,d);const f=l.prototype,p=Object.keys(f);for(let h=0;h<p.length;h++){const g=p[h];g in c||(c[g]=f[g].bind(c))}}const o=n?.Parent??Object;class s extends o{}Object.defineProperty(s,"name",{value:e});function l(c){var d;const f=n?.Parent?new s:this;r(f,c),(d=f._zod).deferred??(d.deferred=[]);for(const p of f._zod.deferred)p();return f}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>n?.Parent&&c instanceof n.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class Pc extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e3 extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const t3={};function ua(e){return t3}function n3(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Bb(e,t){return typeof t=="bigint"?t.toString():t}function Dg(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function uf(e){return e==null}function Nw(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function zU(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const d=r.match(/\d?e-(\d?)/);d?.[1]&&(o=Number.parseInt(d[1]))}const s=n>o?n:o,l=Number.parseInt(e.toFixed(s).replace(".","")),c=Number.parseInt(t.toFixed(s).replace(".",""));return l%c/10**s}const gT=Symbol("evaluating");function It(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==gT)return r===void 0&&(r=gT,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function fl(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function va(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function vT(e){return JSON.stringify(e)}function FU(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const r3="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Kd(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const BU=Dg(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Bc(e){if(Kd(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Kd(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function o3(e){return Bc(e)?{...e}:Array.isArray(e)?[...e]:e}const VU=new Set(["string","number","symbol"]);function Vc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _a(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Fe(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 HU(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const qU={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 GU(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 s=va(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=n.shape[c])}return fl(this,"shape",l),l},checks:[]});return _a(e,s)}function KU(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 s=va(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in n.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return fl(this,"shape",l),l},checks:[]});return _a(e,s)}function ZU(e,t){if(!Bc(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const s=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(s,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=va(e._zod.def,{get shape(){const s={...e._zod.def.shape,...t};return fl(this,"shape",s),s}});return _a(e,o)}function YU(e,t){if(!Bc(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=va(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return fl(this,"shape",r),r}});return _a(e,n)}function WU(e,t){const n=va(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return fl(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return _a(e,n)}function QU(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=va(t._zod.def,{get shape(){const c=t._zod.def.shape,d={...c};if(n)for(const f in n){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);n[f]&&(d[f]=e?new e({type:"optional",innerType:c[f]}):c[f])}else for(const f in c)d[f]=e?new e({type:"optional",innerType:c[f]}):c[f];return fl(this,"shape",d),d},checks:[]});return _a(t,l)}function XU(e,t,n){const r=va(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(s[l]=new e({type:"nonoptional",innerType:o[l]}))}else for(const l in o)s[l]=new e({type:"nonoptional",innerType:o[l]});return fl(this,"shape",s),s}});return _a(t,r)}function Rc(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 tl(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Gh(e){return typeof e=="string"?e:e?.message}function da(e,t,n){const r={...e,path:e.path??[]};if(!e.message){const o=Gh(e.inst?._zod.def?.error?.(e))??Gh(t?.error?.(e))??Gh(n.customError?.(e))??Gh(n.localeError?.(e))??"Invalid input";r.message=o}return delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function i3(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function kw(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Zd(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const s3=(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,Bb,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Dw=_e("$ZodError",s3),Lg=_e("$ZodError",s3,{Parent:Error});function JU(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function ez(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const s of o.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(l=>r({issues:l}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(t(s));else{let l=n,c=0;for(;c<s.path.length;){const d=s.path[c];c===s.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(s))):l[d]=l[d]||{_errors:[]},l=l[d],c++}}};return r(e),n}const $g=e=>(t,n,r,o)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise)throw new Pc;if(l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>da(d,s,ua())));throw r3(c,o?.callee),c}return l.value},tz=$g(Lg),jg=e=>async(t,n,r,o)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},s);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(o?.Err??e)(l.issues.map(d=>da(d,s,ua())));throw r3(c,o?.callee),c}return l.value},nz=jg(Lg),Ug=e=>(t,n,r)=>{const o=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},o);if(s instanceof Promise)throw new Pc;return s.issues.length?{success:!1,error:new(e??Dw)(s.issues.map(l=>da(l,o,ua())))}:{success:!0,data:s.value}},rz=Ug(Lg),zg=e=>async(t,n,r)=>{const o=r?Object.assign(r,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},o);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new e(s.issues.map(l=>da(l,o,ua())))}:{success:!0,data:s.value}},oz=zg(Lg),iz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return $g(e)(t,n,o)},sz=e=>(t,n,r)=>$g(e)(t,n,r),az=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jg(e)(t,n,o)},lz=e=>async(t,n,r)=>jg(e)(t,n,r),cz=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ug(e)(t,n,o)},uz=e=>(t,n,r)=>Ug(e)(t,n,r),dz=e=>async(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zg(e)(t,n,o)},fz=e=>async(t,n,r)=>zg(e)(t,n,r),hz=/^[cC][^\s-]{8,}$/,pz=/^[0-9a-z]+$/,mz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,gz=/^[0-9a-vA-V]{20}$/,vz=/^[A-Za-z0-9]{27}$/,_z=/^[a-zA-Z0-9_-]{21}$/,yz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,bz=/^([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})$/,_T=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)$/,wz=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Sz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ez(){return new RegExp(Sz,"u")}const xz=/^(?:(?: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])$/,Rz=/^(([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}|:))$/,Oz=/^((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])$/,Tz=/^(([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])$/,Cz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,a3=/^[A-Za-z0-9_-]*$/,Az=/^\+[1-9]\d{6,14}$/,l3="(?:(?:\\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])))",Iz=new RegExp(`^${l3}$`);function c3(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 Mz(e){return new RegExp(`^${c3(e)}$`)}function Pz(e){const t=c3({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(`^${l3}T(?:${r})$`)}const Nz=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},kz=/^-?\d+$/,u3=/^-?\d+(?:\.\d+)?$/,Dz=/^(?:true|false)$/i,Lz=/^null$/i,$z=/^undefined$/i,jz=/^[^A-Z]*$/,Uz=/^[^a-z]*$/,_r=_e("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),d3={number:"number",bigint:"bigint",object:"date"},f3=_e("$ZodCheckLessThan",(e,t)=>{_r.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<s&&(t.inclusive?o.maximum=t.value:o.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})}}),h3=_e("$ZodCheckGreaterThan",(e,t)=>{_r.init(e,t);const n=d3[typeof t.value];e._zod.onattach.push(r=>{const o=r._zod.bag,s=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>s&&(t.inclusive?o.minimum=t.value:o.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})}}),zz=_e("$ZodCheckMultipleOf",(e,t)=>{_r.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):zU(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})}}),Fz=_e("$ZodCheckNumberFormat",(e,t)=>{_r.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),r=n?"int":"number",[o,s]=qU[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=o,c.maximum=s,n&&(c.pattern=kz)}),e._zod.check=l=>{const c=l.value;if(n){if(!Number.isInteger(c)){l.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?l.issues.push({input:c,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}):l.issues.push({input:c,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}}c<o&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),c>s&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:s,inclusive:!0,inst:e,continue:!t.abort})}}),Bz=_e("$ZodCheckMaxSize",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;o.size<=t.maximum||r.issues.push({origin:i3(o),code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Vz=_e("$ZodCheckMinSize",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.size!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;o.size>=t.minimum||r.issues.push({origin:i3(o),code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Hz=_e("$ZodCheckMaxLength",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const o=r.value;if(o.length<=t.maximum)return;const l=kw(o);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),qz=_e("$ZodCheckMinLength",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const o=r.value;if(o.length>=t.minimum)return;const l=kw(o);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),Gz=_e("$ZodCheckLengthEquals",(e,t)=>{var n;_r.init(e,t),(n=e._zod.def).when??(n.when=r=>{const o=r.value;return!uf(o)&&o.length!==void 0}),e._zod.onattach.push(r=>{const o=r._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=r=>{const o=r.value,s=o.length;if(s===t.length)return;const l=kw(o),c=s>t.length;r.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Fg=_e("$ZodCheckStringFormat",(e,t)=>{var n,r;_r.init(e,t),e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,t.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Kz=_e("$ZodCheckRegex",(e,t)=>{Fg.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})}}),Zz=_e("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=jz),Fg.init(e,t)}),Yz=_e("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Uz),Fg.init(e,t)}),Wz=_e("$ZodCheckIncludes",(e,t)=>{_r.init(e,t);const n=Vc(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{const s=o._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Qz=_e("$ZodCheckStartsWith",(e,t)=>{_r.init(e,t);const n=new RegExp(`^${Vc(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.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})}}),Xz=_e("$ZodCheckEndsWith",(e,t)=>{_r.init(e,t);const n=new RegExp(`.*${Vc(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const o=r._zod.bag;o.patterns??(o.patterns=new Set),o.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})}}),Jz=_e("$ZodCheckMimeType",(e,t)=>{_r.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})}}),e9=_e("$ZodCheckOverwrite",(e,t)=>{_r.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class t9{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
11
  `).filter(l=>l),o=Math.min(...r.map(l=>l.length-l.trimStart().length)),s=r.map(l=>l.slice(o)).map(l=>" ".repeat(this.indent*2)+l);for(const l of s)this.content.push(l)}compile(){const t=Function,n=this?.args,o=[...(this?.content??[""]).map(s=>` ${s}`)];return new t(...n,o.join(`
12
12
  `))}}const n9={major:4,minor:3,patch:6},Bt=_e("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=n9;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const o of r)for(const s of o._zod.onattach)s(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const o=(l,c,d)=>{let f=Rc(l),p;for(const h of c){if(h._zod.def.when){if(!h._zod.def.when(l))continue}else if(f)continue;const g=l.issues.length,v=h._zod.check(l);if(v instanceof Promise&&d?.async===!1)throw new Pc;if(p||v instanceof Promise)p=(p??Promise.resolve()).then(async()=>{await v,l.issues.length!==g&&(f||(f=Rc(l,g)))});else{if(l.issues.length===g)continue;f||(f=Rc(l,g))}}return p?p.then(()=>l):l},s=(l,c,d)=>{if(Rc(l))return l.aborted=!0,l;const f=o(c,r,d);if(f instanceof Promise){if(d.async===!1)throw new Pc;return f.then(p=>e._zod.parse(p,d))}return e._zod.parse(f,d)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const f=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return f instanceof Promise?f.then(p=>s(p,l,c)):s(f,l,c)}const d=e._zod.parse(l,c);if(d instanceof Promise){if(c.async===!1)throw new Pc;return d.then(f=>o(f,r,c))}return o(d,r,c)}}It(e,"~standard",()=>({validate:o=>{try{const s=rz(e,o);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return oz(e,o).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),Lw=_e("$ZodString",(e,t)=>{Bt.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Nz(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}}),gn=_e("$ZodStringFormat",(e,t)=>{Fg.init(e,t),Lw.init(e,t)}),r9=_e("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=bz),gn.init(e,t)}),o9=_e("$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=_T(r))}else t.pattern??(t.pattern=_T());gn.init(e,t)}),i9=_e("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=wz),gn.init(e,t)}),s9=_e("$ZodURL",(e,t)=>{gn.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.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(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.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=o.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),a9=_e("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ez()),gn.init(e,t)}),l9=_e("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=_z),gn.init(e,t)}),c9=_e("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=hz),gn.init(e,t)}),u9=_e("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=pz),gn.init(e,t)}),d9=_e("$ZodULID",(e,t)=>{t.pattern??(t.pattern=mz),gn.init(e,t)}),f9=_e("$ZodXID",(e,t)=>{t.pattern??(t.pattern=gz),gn.init(e,t)}),h9=_e("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=vz),gn.init(e,t)}),p9=_e("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Pz(t)),gn.init(e,t)}),m9=_e("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Iz),gn.init(e,t)}),g9=_e("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Mz(t)),gn.init(e,t)}),v9=_e("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=yz),gn.init(e,t)}),_9=_e("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=xz),gn.init(e,t),e._zod.bag.format="ipv4"}),y9=_e("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Rz),gn.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})}}}),b9=_e("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Oz),gn.init(e,t)}),w9=_e("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Tz),gn.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[o,s]=r;if(!s)throw new Error;const l=Number(s);if(`${l}`!==s)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function p3(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const S9=_e("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Cz),gn.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{p3(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function E9(e){if(!a3.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return p3(n)}const x9=_e("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=a3),gn.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{E9(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),R9=_e("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Az),gn.init(e,t)});function O9(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch{return!1}}const T9=_e("$ZodJWT",(e,t)=>{gn.init(e,t),e._zod.check=n=>{O9(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),m3=_e("$ZodNumber",(e,t)=>{Bt.init(e,t),e._zod.pattern=e._zod.bag.pattern??u3,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const o=n.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return n;const s=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...s?{received:s}:{}}),n}}),C9=_e("$ZodNumberFormat",(e,t)=>{Fz.init(e,t),m3.init(e,t)}),A9=_e("$ZodBoolean",(e,t)=>{Bt.init(e,t),e._zod.pattern=Dz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),I9=_e("$ZodUndefined",(e,t)=>{Bt.init(e,t),e._zod.pattern=$z,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(n,r)=>{const o=n.value;return typeof o>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:o,inst:e}),n}}),M9=_e("$ZodNull",(e,t)=>{Bt.init(e,t),e._zod.pattern=Lz,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const o=n.value;return o===null||n.issues.push({expected:"null",code:"invalid_type",input:o,inst:e}),n}}),P9=_e("$ZodAny",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),N9=_e("$ZodUnknown",(e,t)=>{Bt.init(e,t),e._zod.parse=n=>n}),k9=_e("$ZodNever",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function yT(e,t,n){e.issues.length&&t.issues.push(...tl(n,e.issues)),t.value[n]=e.value}const D9=_e("$ZodArray",(e,t)=>{Bt.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const s=[];for(let l=0;l<o.length;l++){const c=o[l],d=t.element._zod.run({value:c,issues:[]},r);d instanceof Promise?s.push(d.then(f=>yT(f,n,l))):yT(d,n,l)}return s.length?Promise.all(s).then(()=>n):n}});function Pm(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...tl(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function g3(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=HU(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function v3(e,t,n,r,o,s){const l=[],c=o.keySet,d=o.catchall._zod,f=d.def.type,p=d.optout==="optional";for(const h in t){if(c.has(h))continue;if(f==="never"){l.push(h);continue}const g=d.run({value:t[h],issues:[]},r);g instanceof Promise?e.push(g.then(v=>Pm(v,n,h,t,p))):Pm(g,n,h,t,p)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:s}),e.length?Promise.all(e).then(()=>n):n}const L9=_e("$ZodObject",(e,t)=>{if(Bt.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const d={...c};return Object.defineProperty(t,"shape",{value:d}),d}})}const r=Dg(()=>g3(t));It(e._zod,"propValues",()=>{const c=t.shape,d={};for(const f in c){const p=c[f]._zod;if(p.values){d[f]??(d[f]=new Set);for(const h of p.values)d[f].add(h)}}return d});const o=Kd,s=t.catchall;let l;e._zod.parse=(c,d)=>{l??(l=r.value);const f=c.value;if(!o(f))return c.issues.push({expected:"object",code:"invalid_type",input:f,inst:e}),c;c.value={};const p=[],h=l.shape;for(const g of l.keys){const v=h[g],y=v._zod.optout==="optional",b=v._zod.run({value:f[g],issues:[]},d);b instanceof Promise?p.push(b.then(x=>Pm(x,c,g,f,y))):Pm(b,c,g,f,y)}return s?v3(p,f,c,d,r.value,e):p.length?Promise.all(p).then(()=>c):c}}),$9=_e("$ZodObjectJIT",(e,t)=>{L9.init(e,t);const n=e._zod.parse,r=Dg(()=>g3(t)),o=g=>{const v=new t9(["shape","payload","ctx"]),y=r.value,b=T=>{const R=vT(T);return`shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`};v.write("const input = payload.value;");const x=Object.create(null);let w=0;for(const T of y.keys)x[T]=`key_${w++}`;v.write("const newResult = {};");for(const T of y.keys){const R=x[T],O=vT(T),I=g[T]?._zod?.optout==="optional";v.write(`const ${R} = ${b(T)};`),I?v.write(`
13
13
  if (${R}.issues.length) {
@@ -153,7 +153,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
153
153
  display: none;
154
154
  }
155
155
  `})]})]})}function Ii({redirectTo:e}){const{redirectTo:t}=M.useContext(vt),[n,r]=M.useState(!1),{navigate:o,hooks:{useSession:s},onSessionChange:l}=M.useContext(vt),{refetch:c}=s();return{onSuccess:M.useCallback(async()=>{r(!0),await c?.(),l&&await l(),r(!1);const f=e||ml("redirectTo")||t;o(f)},[c,l,o,e,t]),isPending:n}}function oD({redirectTo:e}){const{hooks:{useIsRestoring:t},persistClient:n}=M.useContext(vt),r=t?.(),o=M.useRef(!1),{onSuccess:s}=Ii({redirectTo:e});return M.useEffect(()=>{if(!o.current){if(!n){o.current=!0,s();return}r||(o.current=!0,s())}},[r,n,s]),C.jsx(Cr,{className:"animate-spin"})}function DS({className:e,containerClassName:t,...n}){return C.jsx(V5,{"data-slot":"input-otp",containerClassName:Ce("flex items-center gap-2 has-disabled:opacity-50",t),className:Ce("disabled:cursor-not-allowed",e),...n})}function dc({className:e,...t}){return C.jsx("div",{"data-slot":"input-otp-group",className:Ce("flex items-center",e),...t})}function nr({index:e,className:t,...n}){const r=M.useContext(B5),{char:o,hasFakeCaret:s,isActive:l}=r?.slots[e]??{};return C.jsxs("div",{"data-slot":"input-otp-slot","data-active":l,className:Ce("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:[o,s&&C.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:C.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function Hy({...e}){return C.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...e,children:C.jsx(pK,{})})}function LS({otpSeparators:e=0}){return e===0?C.jsxs(dc,{children:[C.jsx(nr,{index:0}),C.jsx(nr,{index:1}),C.jsx(nr,{index:2}),C.jsx(nr,{index:3}),C.jsx(nr,{index:4}),C.jsx(nr,{index:5})]}):e===1?C.jsxs(C.Fragment,{children:[C.jsxs(dc,{children:[C.jsx(nr,{index:0}),C.jsx(nr,{index:1}),C.jsx(nr,{index:2})]}),C.jsx(Hy,{}),C.jsxs(dc,{children:[C.jsx(nr,{index:3}),C.jsx(nr,{index:4}),C.jsx(nr,{index:5})]})]}):C.jsxs(C.Fragment,{children:[C.jsxs(dc,{children:[C.jsx(nr,{index:0}),C.jsx(nr,{index:1})]}),C.jsx(Hy,{}),C.jsxs(dc,{children:[C.jsx(nr,{index:2}),C.jsx(nr,{index:3})]}),C.jsx(Hy,{}),C.jsxs(dc,{children:[C.jsx(nr,{index:4}),C.jsx(nr,{index:5})]})]})}function xA(e){const[t,n]=M.useState();return t?C.jsx(Kte,{...e,email:t}):C.jsx(Gte,{...e,setEmail:n})}function Gte({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:o,setEmail:s}){const l=fs(),{captchaRef:c,getCaptchaHeaders:d}=wf({localization:r}),{authClient:f,localization:p,toast:h,localizeErrors:g}=M.useContext(vt);r={...p,...r};const v=be({email:$().email({message:`${r.EMAIL} ${r.IS_INVALID}`})}),y=Oi({resolver:Ti(v),defaultValues:{email:""}});n=n||y.formState.isSubmitting,M.useEffect(()=>{o?.(y.formState.isSubmitting)},[y.formState.isSubmitting,o]);async function b({email:x}){const w={throw:!0,headers:await d("/email-otp/send-verification-otp")};try{await f.emailOtp.sendVerificationOtp({email:x,type:"sign-in",fetchOptions:w}),h({variant:"success",message:r.EMAIL_OTP_VERIFICATION_SENT}),s(x)}catch(E){h({variant:"error",message:Dn({error:E,localization:r,localizeErrors:g})})}}return C.jsx(Ai,{...y,children:C.jsxs("form",{method:"POST",onSubmit:y.handleSubmit(b),noValidate:l,className:Ce("grid w-full gap-6",e,t?.base),children:[C.jsx(Mn,{control:y.control,name:"email",render:({field:x})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:r.EMAIL}),C.jsx(Hn,{children:C.jsx(ni,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...x})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Sf,{ref:c,localization:r,action:"/email-otp/send-verification-otp"}),C.jsx(rn,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?C.jsx(Cr,{className:"animate-spin"}):r.EMAIL_OTP_SEND_ACTION})]})})}function Kte({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:o=0,redirectTo:s,setIsSubmitting:l,email:c}){const{authClient:d,localization:f,toast:p,localizeErrors:h}=M.useContext(vt);r={...f,...r};const{onSuccess:g,isPending:v}=Ii({redirectTo:s}),y=be({code:$().min(1,{message:`${r.EMAIL_OTP} ${r.IS_REQUIRED}`}).min(6,{message:`${r.EMAIL_OTP} ${r.IS_INVALID}`})}),b=Oi({resolver:Ti(y),defaultValues:{code:""}});n=n||b.formState.isSubmitting||v,M.useEffect(()=>{l?.(b.formState.isSubmitting||v)},[b.formState.isSubmitting,v,l]);async function x({code:w}){try{await d.signIn.emailOtp({email:c,otp:w,fetchOptions:{throw:!0}}),await g()}catch(E){p({variant:"error",message:Dn({error:E,localization:r,localizeErrors:h})}),b.reset()}}return C.jsx(Ai,{...b,children:C.jsxs("form",{method:"POST",onSubmit:b.handleSubmit(x),className:Ce("grid w-full gap-6",e,t?.base),children:[C.jsx(Mn,{control:b.control,name:"code",render:({field:w})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:r.EMAIL_OTP}),C.jsx(Hn,{children:C.jsx(DS,{...w,maxLength:6,onChange:E=>{w.onChange(E),E.length===6&&b.handleSubmit(x)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:C.jsx(LS,{otpSeparators:o})})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx("div",{className:"grid gap-4",children:C.jsxs(rn,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&C.jsx(Cr,{className:"animate-spin"}),r.EMAIL_OTP_VERIFY_ACTION]})})]})})}function Zte({onCancel:e,localization:t,className:n,classNames:r,otpSeparators:o,callbackURL:s,isSubmitting:l,redirectTo:c,setIsSubmitting:d}){const[f,p]=M.useState(!0),[h,g]=M.useState(30),{authClient:v,localization:y,toast:b,localizeErrors:x,navigate:w,basePath:E,viewPaths:T}=M.useContext(vt);t={...y,...t};const R=typeof window<"u"&&new URLSearchParams(window.location.search).get("email")||"",{onSuccess:O,isPending:A}=Ii({redirectTo:c}),I=be({code:$().min(1,{message:`${t.EMAIL_OTP} ${t.IS_REQUIRED}`}).min(6,{message:`${t.EMAIL_OTP} ${t.IS_INVALID}`})}),P=Oi({resolver:Ti(I),defaultValues:{code:""}}),L=l||P.formState.isSubmitting||A;M.useEffect(()=>{d?.(P.formState.isSubmitting||A)},[P.formState.isSubmitting,A,d]),M.useEffect(()=>{if(h>0){const B=setTimeout(()=>g(h-1),1e3);return()=>clearTimeout(B)}else p(!1)},[h]);async function H({code:B}){try{const z=await v.emailOtp.verifyEmail({email:R,otp:B,fetchOptions:{throw:!0}});"token"in z&&z.token?await O():(w(`${E}/${T.SIGN_IN}${window.location.search}`),b({variant:"success",message:t.EMAIL_VERIFICATION_SUCCESS}))}catch(z){b({variant:"error",message:Dn({error:z,localization:t,localizeErrors:x})}),P.reset()}}async function j(){if(!f){p(!0),g(30);try{await v.emailOtp.sendVerificationOtp({email:R,type:"email-verification",fetchOptions:{throw:!0}}),b({variant:"success",message:t.EMAIL_OTP_VERIFICATION_SENT})}catch(B){b({variant:"error",message:Dn({error:B,localization:t,localizeErrors:x})}),p(!1),g(0)}}}return R?C.jsx(Ai,{...P,children:C.jsxs("form",{method:"POST",onSubmit:P.handleSubmit(H),className:Ce("grid w-full gap-6",n,r?.base),children:[C.jsx(Mn,{control:P.control,name:"code",render:({field:B})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:r?.label,children:t.EMAIL_OTP}),C.jsx(Hn,{children:C.jsx(DS,{...B,maxLength:6,onChange:z=>{B.onChange(z),z.length===6&&P.handleSubmit(H)()},containerClassName:r?.otpInputContainer,className:r?.otpInput,disabled:L,children:C.jsx(LS,{otpSeparators:o})})}),C.jsx(Yn,{className:r?.error})]})}),C.jsxs("div",{className:"grid gap-4",children:[C.jsxs(rn,{type:"submit",disabled:L,className:Ce(r?.button,r?.primaryButton),children:[L&&C.jsx(Cr,{className:"animate-spin"}),t.EMAIL_OTP_VERIFY_ACTION]}),C.jsx(rn,{type:"button",variant:"outline",onClick:j,disabled:f||L,className:Ce("w-full",r?.button),children:f?`${t.RESEND_VERIFICATION_EMAIL} (${h}s)`:t.RESEND_VERIFICATION_EMAIL}),e&&C.jsx(rn,{type:"button",variant:"ghost",onClick:e,disabled:L,className:"w-full",children:t.CANCEL})]})]})}):C.jsx("div",{className:Ce("grid w-full gap-6",n),children:C.jsxs("div",{className:"text-center",children:[C.jsx("h2",{className:"font-semibold text-destructive text-lg",children:"Invalid Request"}),C.jsx("p",{className:"text-muted-foreground text-sm",children:t.EMAIL_REQUIRED||"Email address is required"})]})})}function Yte({className:e,classNames:t,isSubmitting:n,localization:r,setIsSubmitting:o}){const s=fs(),{captchaRef:l,getCaptchaHeaders:c,resetCaptcha:d}=wf({localization:r}),{authClient:f,basePath:p,baseURL:h,localization:g,navigate:v,toast:y,viewPaths:b,localizeErrors:x}=M.useContext(vt);r={...g,...r};const w=be({email:$().email({message:`${r.EMAIL} ${r.IS_INVALID}`}).min(1,{message:`${r.EMAIL} ${r.IS_REQUIRED}`})}),E=Oi({resolver:Ti(w),defaultValues:{email:""}});n=n||E.formState.isSubmitting,M.useEffect(()=>{o?.(E.formState.isSubmitting)},[E.formState.isSubmitting,o]);async function T({email:R}){try{const O={throw:!0,headers:await c("/forget-password")};await f.requestPasswordReset({email:R,redirectTo:`${h}${p}/${b.RESET_PASSWORD}`,fetchOptions:O}),y({variant:"success",message:r.FORGOT_PASSWORD_EMAIL}),v(`${p}/${b.SIGN_IN}${window.location.search}`)}catch(O){y({variant:"error",message:Dn({error:O,localization:r,localizeErrors:x})}),d()}}return C.jsx(Ai,{...E,children:C.jsxs("form",{method:"POST",onSubmit:E.handleSubmit(T),noValidate:s,className:Ce("grid w-full gap-6",e,t?.base),children:[C.jsx(Mn,{control:E.control,name:"email",render:({field:R})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:r.EMAIL}),C.jsx(Hn,{children:C.jsx(ni,{className:t?.input,type:"email",placeholder:r.EMAIL_PLACEHOLDER,disabled:n,...R})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Sf,{ref:l,localization:r,action:"/forget-password"}),C.jsx(rn,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?C.jsx(Cr,{className:"animate-spin"}):r.FORGOT_PASSWORD_ACTION})]})})}function RA({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:o,redirectTo:s,setIsSubmitting:l}){const c=fs(),{captchaRef:d,getCaptchaHeaders:f,resetCaptcha:p}=wf({localization:o}),{authClient:h,basePath:g,baseURL:v,persistClient:y,localization:b,redirectTo:x,viewPaths:w,toast:E,localizeErrors:T}=M.useContext(vt);o={...b,...o};const R=M.useCallback(()=>s||ml("redirectTo")||x,[s,x]),O=M.useCallback(()=>`${v}${n||(y?`${g}/${w.CALLBACK}?redirectTo=${encodeURIComponent(R())}`:R())}`,[n,y,g,w,v,R]),A=be({email:$().email({message:`${o.EMAIL} ${o.IS_INVALID}`})}),I=Oi({resolver:Ti(A),defaultValues:{email:""}});r=r||I.formState.isSubmitting,M.useEffect(()=>{l?.(I.formState.isSubmitting)},[I.formState.isSubmitting,l]);async function P({email:L}){try{const H={throw:!0,headers:await f("/sign-in/magic-link")};await h.signIn.magicLink({email:L,callbackURL:O(),fetchOptions:H}),E({variant:"success",message:o.MAGIC_LINK_EMAIL}),I.reset()}catch(H){E({variant:"error",message:Dn({error:H,localization:o,localizeErrors:T})}),p()}}return C.jsx(Ai,{...I,children:C.jsxs("form",{method:"POST",onSubmit:I.handleSubmit(P),noValidate:c,className:Ce("grid w-full gap-6",e,t?.base),children:[C.jsx(Mn,{control:I.control,name:"email",render:({field:L})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:o.EMAIL}),C.jsx(Hn,{children:C.jsx(ni,{className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:r,...L})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Sf,{ref:d,localization:o,action:"/sign-in/magic-link"}),C.jsx(rn,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?C.jsx(Cr,{className:"animate-spin"}):o.MAGIC_LINK_ACTION})]})})}function Wte({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:o,setIsSubmitting:s}){const{authClient:l,localization:c,toast:d,localizeErrors:f}=M.useContext(vt);r={...c,...r};const{onSuccess:p,isPending:h}=Ii({redirectTo:o}),g=be({code:$().min(1,{message:r.BACKUP_CODE_REQUIRED})}),v=Oi({resolver:Ti(g),defaultValues:{code:""}});n=n||v.formState.isSubmitting||h,M.useEffect(()=>{s?.(v.formState.isSubmitting||h)},[v.formState.isSubmitting,h,s]);async function y({code:b}){try{await l.twoFactor.verifyBackupCode({code:b,fetchOptions:{throw:!0}}),await p()}catch(x){d({variant:"error",message:Dn({error:x,localization:r,localizeErrors:f})}),v.reset()}}return C.jsx(Ai,{...v,children:C.jsxs("form",{method:"POST",onSubmit:v.handleSubmit(y),className:Ce("grid gap-6",e,t?.base),children:[C.jsx(Mn,{control:v.control,name:"code",render:({field:b})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:r.BACKUP_CODE}),C.jsx(Hn,{children:C.jsx(ni,{placeholder:r.BACKUP_CODE_PLACEHOLDER,autoComplete:"off",className:t?.input,disabled:n,...b})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(rn,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:n?C.jsx(Cr,{className:"animate-spin"}):r.RECOVER_ACCOUNT_ACTION})]})})}function Qte({className:e,classNames:t,localization:n,passwordValidation:r}){const o=M.useRef(!1),{authClient:s,basePath:l,credentials:c,localization:d,viewPaths:f,navigate:p,toast:h,localizeErrors:g}=M.useContext(vt),v=c?.confirmPassword,y=c?.passwordValidation;n={...d,...n},r={...y,...r};const b=be({newPassword:Yd(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:v?Yd(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}):$().optional()}).refine(T=>!v||T.newPassword===T.confirmPassword,{message:n.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),x=Oi({resolver:Ti(b),defaultValues:{newPassword:"",confirmPassword:""}}),w=x.formState.isSubmitting;M.useEffect(()=>{if(o.current)return;o.current=!0;const R=new URLSearchParams(window.location.search).get("token");(!R||R==="INVALID_TOKEN")&&(p(`${l}/${f.SIGN_IN}${window.location.search}`),h({variant:"error",message:n.INVALID_TOKEN}))},[l,p,h,f,n]);async function E({newPassword:T}){try{const O=new URLSearchParams(window.location.search).get("token");await s.resetPassword({newPassword:T,token:O,fetchOptions:{throw:!0}}),h({variant:"success",message:n.RESET_PASSWORD_SUCCESS}),p(`${l}/${f.SIGN_IN}${window.location.search}`)}catch(R){h({variant:"error",message:Dn({error:R,localization:n,localizeErrors:g})}),x.reset()}}return C.jsx(Ai,{...x,children:C.jsxs("form",{method:"POST",onSubmit:x.handleSubmit(E),className:Ce("grid w-full gap-6",e,t?.base),children:[C.jsx(Mn,{control:x.control,name:"newPassword",render:({field:T})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:n.NEW_PASSWORD}),C.jsx(Hn,{children:C.jsx(nf,{autoComplete:"new-password",className:t?.input,placeholder:n.NEW_PASSWORD_PLACEHOLDER,disabled:w,...T})}),C.jsx(Yn,{className:t?.error})]})}),v&&C.jsx(Mn,{control:x.control,name:"confirmPassword",render:({field:T})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:n.CONFIRM_PASSWORD}),C.jsx(Hn,{children:C.jsx(nf,{autoComplete:"new-password",className:t?.input,placeholder:n.CONFIRM_PASSWORD_PLACEHOLDER,disabled:w,...T})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(rn,{type:"submit",disabled:w,className:Ce("w-full",t?.button,t?.primaryButton),children:w?C.jsx(Cr,{className:"animate-spin"}):n.RESET_PASSWORD_ACTION})]})})}function Xte({className:e,classNames:t,isSubmitting:n,localization:r,redirectTo:o,setIsSubmitting:s,passwordValidation:l,callbackURL:c}){const d=fs(),{captchaRef:f,getCaptchaHeaders:p,resetCaptcha:h}=wf({localization:r}),{authClient:g,basePath:v,credentials:y,localization:b,viewPaths:x,navigate:w,toast:E,Link:T,localizeErrors:R,emailVerification:O}=M.useContext(vt),A=y?.rememberMe,I=y?.username,P=y?.passwordValidation;r={...b,...r},l={...P,...l};const{onSuccess:L,isPending:H}=Ii({redirectTo:o}),j=be({email:I?$().min(1,{message:`${r.USERNAME} ${r.IS_REQUIRED}`}):$().email({message:`${r.EMAIL} ${r.IS_INVALID}`}),password:Yd(l,r),rememberMe:Nt().optional()}),B=Oi({resolver:Ti(j),defaultValues:{email:"",password:"",rememberMe:!A}});n=n||B.formState.isSubmitting||H,M.useEffect(()=>{s?.(B.formState.isSubmitting||H)},[B.formState.isSubmitting,H,s]);async function z({email:K,password:oe,rememberMe:q}){var W;try{let te={};if(I&&!Fq(K)){const le={throw:!0,headers:await p("/sign-in/username")};te=await g.signIn.username({username:K,password:oe,rememberMe:q,fetchOptions:le,callbackURL:c})}else{const le={throw:!0,headers:await p("/sign-in/email")};te=await g.signIn.email({email:K,password:oe,rememberMe:q,fetchOptions:le,callbackURL:c})}te.twoFactorRedirect?w(`${v}/${x.TWO_FACTOR}${window.location.search}`):await L()}catch(te){B.resetField("password"),h(),E({variant:"error",message:Dn({error:te,localization:r,localizeErrors:R})}),O?.otp&&((W=te?.error)==null?void 0:W.code)==="EMAIL_NOT_VERIFIED"&&w(`${v}/${x.EMAIL_VERIFICATION}?email=${encodeURIComponent(K)}`)}}return C.jsx(Ai,{...B,children:C.jsxs("form",{method:"POST",onSubmit:B.handleSubmit(z),noValidate:d,className:Ce("grid w-full gap-6",e,t?.base),children:[C.jsx(Mn,{control:B.control,name:"email",render:({field:K})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:I?r.USERNAME:r.EMAIL}),C.jsx(Hn,{children:C.jsx(ni,{autoComplete:I?"username":"email",className:t?.input,type:I?"text":"email",placeholder:I?r.SIGN_IN_USERNAME_PLACEHOLDER:r.EMAIL_PLACEHOLDER,disabled:n,...K})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Mn,{control:B.control,name:"password",render:({field:K})=>C.jsxs(Pn,{children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx(Nn,{className:t?.label,children:r.PASSWORD}),y?.forgotPassword&&C.jsx(T,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${v}/${x.FORGOT_PASSWORD}${d?window.location.search:""}`,children:r.FORGOT_PASSWORD_LINK})]}),C.jsx(Hn,{children:C.jsx(nf,{autoComplete:"current-password",className:t?.input,placeholder:r.PASSWORD_PLACEHOLDER,disabled:n,...K})}),C.jsx(Yn,{className:t?.error})]})}),A&&C.jsx(Mn,{control:B.control,name:"rememberMe",render:({field:K})=>C.jsxs(Pn,{className:"flex",children:[C.jsx(Hn,{children:C.jsx(kS,{checked:K.value,onCheckedChange:K.onChange,disabled:n})}),C.jsx(Nn,{children:r.REMEMBER_ME})]})}),C.jsx(Sf,{ref:f,localization:r,action:"/sign-in/email"}),C.jsx(rn,{type:"submit",disabled:n,className:Ce("w-full",t?.button,t?.primaryButton),children:n?C.jsx(Cr,{className:"animate-spin"}):r.SIGN_IN_ACTION})]})})}function Jte({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:o,redirectTo:s,setIsSubmitting:l,passwordValidation:c}){var d,f,p,h,g,v;const y=fs(),{captchaRef:b,getCaptchaHeaders:x,resetCaptcha:w}=wf({localization:o}),{additionalFields:E,authClient:T,basePath:R,baseURL:O,credentials:A,localization:I,nameRequired:P,persistClient:L,redirectTo:H,signUp:j,viewPaths:B,navigate:z,toast:K,avatar:oe,localizeErrors:q,emailVerification:W}=M.useContext(vt),te=A?.confirmPassword,le=A?.username,Q=A?.usernameRequired??!0,k=A?.passwordValidation,G=j?.fields;o={...I,...o},c={...k,...c};const V=M.useRef(null),[D,F]=M.useState(null),[X,fe]=M.useState(!1),pe=M.useCallback(()=>s||ml("redirectTo")||H,[s,H]),xe=M.useCallback(()=>`${O}${n||(L?`${R}/${B.CALLBACK}?redirectTo=${encodeURIComponent(pe())}`:pe())}`,[n,L,R,B,O,pe]),{onSuccess:je,isPending:Y}=Ii({redirectTo:s}),re={email:$().email({message:`${o.EMAIL} ${o.IS_INVALID}`}),password:Yd(c,o),name:G?.includes("name")&&P?$().min(1,{message:`${o.NAME} ${o.IS_REQUIRED}`}):$().optional(),image:$().optional(),username:le&&Q?$().min(1,{message:`${o.USERNAME} ${o.IS_REQUIRED}`}):$().optional(),confirmPassword:te?Yd(c,{PASSWORD_REQUIRED:o.CONFIRM_PASSWORD_REQUIRED,PASSWORD_TOO_SHORT:o.PASSWORD_TOO_SHORT,PASSWORD_TOO_LONG:o.PASSWORD_TOO_LONG,INVALID_PASSWORD:o.INVALID_PASSWORD}):$().optional()},ve={};if(G)for(const Pe of G){if(Pe==="name"||Pe==="image")continue;const Me=E?.[Pe];if(!Me)continue;let ze;Me.type==="number"?ze=Me.required?Vw(Z=>Z?Number(Z):void 0,ht({message:((d=Me.errorMessage)==null?void 0:d.invalid)??`${Me.label} ${o.IS_INVALID}`})):iN({message:((f=Me.errorMessage)==null?void 0:f.invalid)??`${Me.label} ${o.IS_INVALID}`}).optional():Me.type==="boolean"?ze=Me.required?LT({message:((p=Me.errorMessage)==null?void 0:p.invalid)??`${Me.label} ${o.IS_INVALID}`}).refine(Z=>Z===!0,{message:((h=Me.errorMessage)==null?void 0:h.required)??`${Me.label} ${o.IS_REQUIRED}`}):LT({message:((g=Me.errorMessage)==null?void 0:g.invalid)??`${Me.label} ${o.IS_INVALID}`}).optional():ze=Me.required?$().min(1,((v=Me.errorMessage)==null?void 0:v.required)??`${Me.label} ${o.IS_REQUIRED}`):$().optional(),ve[Pe]=ze}const se=be(re).extend(ve).refine(Pe=>te?Pe.password===Pe.confirmPassword:!0,{message:o.PASSWORDS_DO_NOT_MATCH,path:["confirmPassword"]}),Se={email:"",password:"",...te&&{confirmPassword:""},...G?.includes("name")?{name:""}:{},...le?{username:""}:{},...G?.includes("image")&&oe?{image:""}:{}};if(G)for(const Pe of G){if(Pe==="name"||Pe==="image")continue;const Me=E?.[Pe];Me&&(Se[Pe]=Me.type==="boolean"?!1:"")}const Te=Oi({resolver:Ti(se),defaultValues:Se});r=r||Te.formState.isSubmitting||Y,M.useEffect(()=>{l?.(Te.formState.isSubmitting||Y)},[Te.formState.isSubmitting,Y,l]);const tt=async Pe=>{if(oe){fe(!0);try{const Me=await ste(Pe,crypto.randomUUID(),oe.size,oe.extension);let ze;oe.upload?ze=await oe.upload(Me):ze=await lte(Me),ze?(F(ze),Te.setValue("image",ze)):(F(null),Te.setValue("image",""))}catch(Me){console.error(Me),K({variant:"error",message:Dn({error:Me,localization:o,localizeErrors:q})})}fe(!1)}},rt=()=>{F(null),Te.setValue("image","")},Be=()=>{var Pe;return(Pe=V.current)==null?void 0:Pe.click()};async function Qe({email:Pe,password:Me,name:ze,username:Z,confirmPassword:ne,image:ae,...Re}){var Ae,Ie;try{for(const[yt,Tt]of Object.entries(Re)){const bt=E?.[yt];if(bt?.validate&&typeof Tt=="string"&&!await bt.validate(Tt)){Te.setError(yt,{message:((Ae=bt.errorMessage)==null?void 0:Ae.validate)??((Ie=bt.errorMessage)==null?void 0:Ie.invalid)??`${bt.label} ${o.IS_INVALID}`});return}}const ke={throw:!0,headers:await x("/sign-up/email")},Je={};Z!==void 0&&(!Q&&(Z===null||Z===""||typeof Z=="string"&&Z.trim()==="")||(Je.username=Z)),ae!==void 0&&(Je.image=ae);const et=await T.signUp.email({email:Pe,password:Me,name:ze||"",...Je,...Re,callbackURL:xe(),fetchOptions:ke});"token"in et&&et.token?await je():W?.otp?z(`${R}/${B.EMAIL_VERIFICATION}?email=${encodeURIComponent(Pe)}`):(z(`${R}/${B.SIGN_IN}${window.location.search}`),K({variant:"success",message:o.SIGN_UP_EMAIL}))}catch(ke){K({variant:"error",message:Dn({error:ke,localization:o,localizeErrors:q})}),Te.resetField("password"),Te.resetField("confirmPassword"),w()}}return C.jsx(Ai,{...Te,children:C.jsxs("form",{method:"POST",onSubmit:Te.handleSubmit(Qe),noValidate:y,className:Ce("grid w-full gap-6",e,t?.base),children:[G?.includes("image")&&oe&&C.jsxs(C.Fragment,{children:[C.jsx("input",{ref:V,accept:"image/*",disabled:X,hidden:!0,type:"file",onChange:Pe=>{var Me;const ze=(Me=Pe.target.files)==null?void 0:Me.item(0);ze&&tt(ze),Pe.target.value=""}}),C.jsx(Mn,{control:Te.control,name:"image",render:()=>C.jsxs(Pn,{children:[C.jsx(Nn,{children:o.AVATAR}),C.jsxs("div",{className:"flex items-center gap-4",children:[C.jsxs(cte,{children:[C.jsx(ute,{asChild:!0,children:C.jsx(rn,{className:"size-fit rounded-full",size:"icon",variant:"ghost",type:"button",children:C.jsx(pte,{isPending:X,className:"size-16",user:D?{name:Te.watch("name"),email:Te.watch("email"),image:D}:null,localization:o})})}),C.jsxs(dte,{align:"start",onCloseAutoFocus:Pe=>Pe.preventDefault(),children:[C.jsxs(EA,{onClick:Be,disabled:X,children:[C.jsx(uK,{}),o.UPLOAD_AVATAR]}),D&&C.jsxs(EA,{onClick:rt,disabled:X,variant:"destructive",children:[C.jsx(gK,{}),o.DELETE_AVATAR]})]})]}),C.jsxs(rn,{type:"button",variant:"outline",onClick:Be,disabled:X,children:[X&&C.jsx(Cr,{className:"animate-spin"}),o.UPLOAD]})]}),C.jsx(Yn,{})]})})]}),G?.includes("name")&&C.jsx(Mn,{control:Te.control,name:"name",render:({field:Pe})=>C.jsxs(Pn,{children:[C.jsxs(Nn,{className:t?.label,children:[o.NAME,!P&&C.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),C.jsx(Hn,{children:C.jsx(ni,{autoComplete:"name",className:t?.input,placeholder:o.NAME_PLACEHOLDER,disabled:r,...Pe,value:Pe.value})}),C.jsx(Yn,{className:t?.error})]})}),le&&C.jsx(Mn,{control:Te.control,name:"username",render:({field:Pe})=>C.jsxs(Pn,{children:[C.jsxs(Nn,{className:t?.label,children:[o.USERNAME,!Q&&C.jsx("span",{className:"ml-1 text-muted-foreground",children:o.OPTIONAL_BRACKETS})]}),C.jsx(Hn,{children:C.jsx(ni,{autoComplete:"username",className:t?.input,placeholder:o.USERNAME_PLACEHOLDER,disabled:r,...Pe,value:Pe.value})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Mn,{control:Te.control,name:"email",render:({field:Pe})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:o.EMAIL}),C.jsx(Hn,{children:C.jsx(ni,{autoComplete:"email",className:t?.input,type:"email",placeholder:o.EMAIL_PLACEHOLDER,disabled:r,...Pe,value:Pe.value})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Mn,{control:Te.control,name:"password",render:({field:Pe})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:o.PASSWORD}),C.jsx(Hn,{children:C.jsx(nf,{autoComplete:"new-password",className:t?.input,placeholder:o.PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...Pe,value:Pe.value})}),C.jsx(Yn,{className:t?.error})]})}),te&&C.jsx(Mn,{control:Te.control,name:"confirmPassword",render:({field:Pe})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:o.CONFIRM_PASSWORD}),C.jsx(Hn,{children:C.jsx(nf,{autoComplete:"new-password",className:t?.input,placeholder:o.CONFIRM_PASSWORD_PLACEHOLDER,disabled:r,enableToggle:!0,...Pe,value:Pe.value})}),C.jsx(Yn,{className:t?.error})]})}),G?.filter(Pe=>Pe!=="name"&&Pe!=="image").map(Pe=>{const Me=E?.[Pe];return Me?Me.type==="boolean"?C.jsx(Mn,{control:Te.control,name:Pe,render:({field:ze})=>C.jsxs(Pn,{className:"flex",children:[C.jsx(Hn,{children:C.jsx(kS,{checked:ze.value,onCheckedChange:ze.onChange,disabled:r})}),C.jsx(Nn,{className:t?.label,children:Me.label}),C.jsx(Yn,{className:t?.error})]})},Pe):C.jsx(Mn,{control:Te.control,name:Pe,render:({field:ze})=>C.jsxs(Pn,{children:[C.jsx(Nn,{className:t?.label,children:Me.label}),C.jsx(Hn,{children:Me.type==="number"?C.jsx(ni,{className:t?.input,type:"number",placeholder:Me.placeholder||(typeof Me.label=="string"?Me.label:""),disabled:r,...ze,value:ze.value}):Me.multiline?C.jsx(gte,{className:t?.input,placeholder:Me.placeholder||(typeof Me.label=="string"?Me.label:""),disabled:r,...ze,value:ze.value}):C.jsx(ni,{className:t?.input,type:"text",placeholder:Me.placeholder||(typeof Me.label=="string"?Me.label:""),disabled:r,...ze,value:ze.value})}),C.jsx(Yn,{className:t?.error})]})},Pe):(console.error(`Additional field ${Pe} not found`),null)}),C.jsx(Sf,{ref:b,localization:o,action:"/sign-up/email"}),C.jsx(rn,{type:"submit",disabled:r,className:Ce("w-full",t?.button,t?.primaryButton),children:r?C.jsx(Cr,{className:"animate-spin"}):o.SIGN_UP_ACTION})]})})}function ene({className:e,classNames:t,isSubmitting:n,localization:r,otpSeparators:o=0,redirectTo:s,setIsSubmitting:l}){var c;const d=fs(),f=d?ml("totpURI"):null,p=M.useRef(!1),{authClient:h,basePath:g,hooks:{useSession:v},localization:y,twoFactor:b,viewPaths:x,toast:w,Link:E,localizeErrors:T}=M.useContext(vt);r={...y,...r};const{onSuccess:R,isPending:O}=Ii({redirectTo:s}),{data:A}=v(),I=(c=A?.user)==null?void 0:c.twoFactorEnabled,[P,L]=M.useState(b?.length===1?b[0]:null),[H,j]=M.useState(!1),[B,z]=M.useState(0),K=be({code:$().min(1,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_REQUIRED}`}).min(6,{message:`${r.ONE_TIME_PASSWORD} ${r.IS_INVALID}`}),trustDevice:Nt().optional()}),oe=Oi({resolver:Ti(K),defaultValues:{code:""}});n=n||oe.formState.isSubmitting||O,M.useEffect(()=>{l?.(oe.formState.isSubmitting||O)},[oe.formState.isSubmitting,O,l]),M.useEffect(()=>{P==="otp"&&B<=0&&!p.current&&(p.current=!0,q())},[P]),M.useEffect(()=>{if(B<=0)return;const te=setTimeout(()=>{z(le=>le-1)},1e3);return()=>clearTimeout(te)},[B]);const q=async()=>{if(!(H||B>0)){try{j(!0),await h.twoFactor.sendOtp({fetchOptions:{throw:!0}}),z(60)}catch(te){w({variant:"error",message:Dn({error:te,localization:r,localizeErrors:T})}),te.error.code==="INVALID_TWO_FACTOR_COOKIE"&&history.back()}p.current=!1,j(!1)}};async function W({code:te,trustDevice:le}){try{await(P==="totp"?h.twoFactor.verifyTotp:h.twoFactor.verifyOtp)({code:te,trustDevice:le,fetchOptions:{throw:!0}}),await R(),A&&!I&&w({variant:"success",message:r?.TWO_FACTOR_ENABLED})}catch(Q){w({variant:"error",message:Dn({error:Q,localization:r,localizeErrors:T})}),oe.reset()}}return C.jsx(Ai,{...oe,children:C.jsxs("form",{method:"POST",onSubmit:oe.handleSubmit(W),className:Ce("grid w-full gap-6",e,t?.base),children:[b?.includes("totp")&&f&&P==="totp"&&C.jsxs("div",{className:"space-y-3",children:[C.jsx(Q5,{className:t?.label,children:r.TWO_FACTOR_TOTP_LABEL}),C.jsx(Jee,{className:Ce("border shadow-xs",t?.qrCode),value:f})]}),P!==null&&C.jsxs(C.Fragment,{children:[C.jsx(Mn,{control:oe.control,name:"code",render:({field:te})=>C.jsxs(Pn,{children:[C.jsxs("div",{className:"flex items-center justify-between",children:[C.jsx(Nn,{className:t?.label,children:r.ONE_TIME_PASSWORD}),C.jsx(E,{className:Ce("text-sm hover:underline",t?.forgotPasswordLink),href:`${g}/${x.RECOVER_ACCOUNT}${d?window.location.search:""}`,children:r.FORGOT_AUTHENTICATOR})]}),C.jsx(Hn,{children:C.jsx(DS,{...te,maxLength:6,onChange:le=>{te.onChange(le),le.length===6&&oe.handleSubmit(W)()},containerClassName:t?.otpInputContainer,className:t?.otpInput,disabled:n,children:C.jsx(LS,{otpSeparators:o})})}),C.jsx(Yn,{className:t?.error})]})}),C.jsx(Mn,{control:oe.control,name:"trustDevice",render:({field:te})=>C.jsxs(Pn,{className:"flex",children:[C.jsx(Hn,{children:C.jsx(kS,{checked:te.value,onCheckedChange:te.onChange,disabled:n,className:t?.checkbox})}),C.jsx(Nn,{className:t?.label,children:r.TRUST_DEVICE})]})})]}),C.jsxs("div",{className:"grid gap-4",children:[P!==null&&C.jsxs(rn,{type:"submit",disabled:n,className:Ce(t?.button,t?.primaryButton),children:[n&&C.jsx(Cr,{className:"animate-spin"}),r.TWO_FACTOR_ACTION]}),P==="otp"&&b?.includes("otp")&&C.jsxs(rn,{type:"button",variant:"outline",onClick:q,disabled:B>0||H||n,className:Ce(t?.button,t?.outlineButton),children:[H?C.jsx(Cr,{className:"animate-spin"}):C.jsx(rC,{className:t?.icon}),r.RESEND_CODE,B>0&&` (${B})`]}),P!=="otp"&&b?.includes("otp")&&C.jsxs(rn,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>L("otp"),disabled:n,children:[C.jsx(rC,{className:t?.icon}),r.SEND_VERIFICATION_CODE]}),P!=="totp"&&b?.includes("totp")&&C.jsxs(rn,{type:"button",variant:"secondary",className:Ce(t?.button,t?.secondaryButton),onClick:()=>L("totp"),disabled:n,children:[C.jsx(mK,{className:t?.icon}),r.CONTINUE_WITH_AUTHENTICATOR]})]})]})})}function iD({redirectTo:e}){const t=M.useRef(!1),{authClient:n,basePath:r,viewPaths:o}=M.useContext(vt),{onSuccess:s}=Ii({redirectTo:e||`${r}/${o.SIGN_IN}`});return M.useEffect(()=>{t.current||(t.current=!0,n.signOut().finally(s))},[n,s]),C.jsx(Cr,{className:"animate-spin"})}function tne({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:o,pathname:s,redirectTo:l,view:c,otpSeparators:d=0,setIsSubmitting:f}){const{basePath:p,credentials:h,localization:g,magicLink:v,emailOTP:y,signUp:b,twoFactor:x,viewPaths:w,replace:E}=M.useContext(vt),T=!!b;if(o={...g,...o},M.useEffect(()=>{s&&!Wb(w,s)&&(console.error(`Invalid auth view: ${s}`),E(`${p}/${w.SIGN_IN}${window.location.search}`))},[s,w,p,E]),c=c||Wb(w,s)||"SIGN_IN",M.useEffect(()=>{let R=!1;c==="MAGIC_LINK"&&(!v||!h&&!y)&&(R=!0),c==="EMAIL_OTP"&&(!y||!h&&!v)&&(R=!0),c==="SIGN_UP"&&!T&&(R=!0),!h&&["SIGN_UP","FORGOT_PASSWORD","RESET_PASSWORD","TWO_FACTOR","RECOVER_ACCOUNT"].includes(c)&&(R=!0),["TWO_FACTOR","RECOVER_ACCOUNT"].includes(c)&&!x&&(R=!0),R&&E(`${p}/${w.SIGN_IN}${window.location.search}`)},[p,c,w,h,E,y,T,v,x]),c==="SIGN_OUT")return C.jsx(iD,{redirectTo:l});if(c==="CALLBACK")return C.jsx(oD,{redirectTo:l});if(c==="SIGN_IN")return h?C.jsx(Xte,{className:e,classNames:t,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f,callbackURL:n}):v?C.jsx(RA,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):y?C.jsx(xA,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f}):null;if(c==="TWO_FACTOR")return C.jsx(ene,{className:e,classNames:t,localization:o,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="RECOVER_ACCOUNT")return C.jsx(Wte,{className:e,classNames:t,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="MAGIC_LINK")return C.jsx(RA,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="EMAIL_OTP")return C.jsx(xA,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="EMAIL_VERIFICATION")return C.jsx(Zte,{className:e,classNames:t,callbackURL:n,localization:o,otpSeparators:d,redirectTo:l,isSubmitting:r,setIsSubmitting:f});if(c==="FORGOT_PASSWORD")return C.jsx(Yte,{className:e,classNames:t,localization:o,isSubmitting:r,setIsSubmitting:f});if(c==="RESET_PASSWORD")return C.jsx(Qte,{className:e,classNames:t,localization:o});if(c==="SIGN_UP")return T&&C.jsx(Jte,{className:e,classNames:t,callbackURL:n,localization:o,redirectTo:l,isSubmitting:r,setIsSubmitting:f})}function nne({className:e,classNames:t,localization:n}){const{localization:r,redirectTo:o,replace:s,toast:l}=M.useContext(vt),c=M.useMemo(()=>({...r,...n}),[r,n]),{data:d}=ote(),[f,p]=M.useState(null);return M.useEffect(()=>{const h=ml("invitationId");if(!h){l({variant:"error",message:c.INVITATION_NOT_FOUND}),s(o);return}p(h)},[c.INVITATION_NOT_FOUND,l,s,o]),!d||!f?C.jsx(sD,{className:e,classNames:t}):C.jsx(rne,{className:e,classNames:t,localization:c,invitationId:f})}function rne({className:e,classNames:t,localization:n,invitationId:r}){var o;const{authClient:s,hooks:{useInvitation:l},localization:c,organization:d,redirectTo:f,replace:p,toast:h,localizeErrors:g}=M.useContext(vt),v=M.useMemo(()=>({...c,...n}),[c,n]),[y,b]=M.useState(!1),[x,w]=M.useState(!1),E=y||x,{data:T,isPending:R}=l({query:{id:r}}),O=M.useCallback(()=>ml("redirectTo")||f,[f]);M.useEffect(()=>{if(!(R||!r)){if(!T){h({variant:"error",message:v.INVITATION_NOT_FOUND}),p(f);return}(T.status!=="pending"||new Date(T.expiresAt)<new Date)&&(h({variant:"error",message:new Date(T.expiresAt)<new Date?v.INVITATION_EXPIRED:v.INVITATION_NOT_FOUND}),p(f))}},[T,R,r,v,h,p,f]);const A=async()=>{w(!0);try{await s.organization.acceptInvitation({invitationId:r,fetchOptions:{throw:!0}}),h({variant:"success",message:v.INVITATION_ACCEPTED||"Invitation accepted"}),p(O())}catch(j){h({variant:"error",message:Dn({error:j,localization:v,localizeErrors:g})}),w(!1)}},I=async()=>{b(!0);try{await s.organization.rejectInvitation({invitationId:r,fetchOptions:{throw:!0}}),h({variant:"success",message:v.INVITATION_REJECTED}),p(f)}catch(j){h({variant:"error",message:Dn({error:j,localization:v,localizeErrors:g})}),b(!1)}},H=((o=[...[{role:"owner",label:v.OWNER},{role:"admin",label:v.ADMIN},{role:"member",label:v.MEMBER}],...d?.customRoles||[]].find(j=>j.role===T?.role))==null?void 0:o.label)||T?.role;return T?C.jsxs(tf,{className:Ce("w-full max-w-sm",e,t?.base),children:[C.jsxs(MS,{className:Ce("justify-items-center text-center",t?.header),children:[C.jsx(Y5,{className:Ce("text-lg md:text-xl",t?.title),children:v.ACCEPT_INVITATION}),C.jsx(W5,{className:Ce("text-xs md:text-sm",t?.description),children:v.ACCEPT_INVITATION_DESCRIPTION})]}),C.jsxs(PS,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[C.jsxs(tf,{className:Ce("flex-row items-center p-4"),children:[C.jsx(rD,{organization:{id:T.organizationId,name:T.organizationName,slug:T.organizationSlug,logo:T.organizationLogo,createdAt:new Date},localization:v}),C.jsx("p",{className:"ml-auto text-muted-foreground text-sm",children:H})]}),C.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[C.jsxs(rn,{variant:"outline",className:Ce(t?.button,t?.outlineButton),onClick:I,disabled:E,children:[y?C.jsx(Cr,{className:"animate-spin"}):C.jsx(_K,{}),v.REJECT]}),C.jsxs(rn,{className:Ce(t?.button,t?.primaryButton),onClick:A,disabled:E,children:[x?C.jsx(Cr,{className:"animate-spin"}):C.jsx(UN,{}),v.ACCEPT]})]})]})]}):C.jsx(sD,{className:e,classNames:t})}var sD=({className:e,classNames:t,localization:n})=>C.jsxs(tf,{className:Ce("w-full max-w-sm",e,t?.base),children:[C.jsxs(MS,{className:Ce("justify-items-center",t?.header),children:[C.jsx(os,{className:Ce("my-1 h-5 w-full max-w-32 md:h-5.5 md:w-40",t?.skeleton)}),C.jsx(os,{className:Ce("my-0.5 h-3 w-full max-w-56 md:h-3.5 md:w-64",t?.skeleton)})]}),C.jsxs(PS,{className:Ce("flex flex-col gap-6 truncate",t?.content),children:[C.jsxs(tf,{className:Ce("flex-row items-center p-4"),children:[C.jsx(rD,{isPending:!0,localization:n}),C.jsx(os,{className:"mt-0.5 ml-auto h-4 w-full max-w-14 shrink-2"})]}),C.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[C.jsx(os,{className:"h-9 w-full"}),C.jsx(os,{className:"h-9 w-full"})]})]})]});function OA({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return C.jsx(rte,{"data-slot":"separator",decorative:n,orientation:t,className:Ce("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 one({classNames:e,isSubmitting:t,localization:n,view:r}){var o,s,l,c;const{viewPaths:d,navigate:f,basePath:p}=M.useContext(vt);return C.jsxs(rn,{className:Ce("w-full",(o=e?.form)==null?void 0:o.button,(s=e?.form)==null?void 0:s.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${p}/${r==="EMAIL_OTP"?d.SIGN_IN:d.EMAIL_OTP}${window.location.search}`),children:[r==="EMAIL_OTP"?C.jsx(zN,{className:(l=e?.form)==null?void 0:l.icon}):C.jsx(FN,{className:(c=e?.form)==null?void 0:c.icon}),n.SIGN_IN_WITH," ",r==="EMAIL_OTP"?n.PASSWORD:n.EMAIL_OTP]})}function ine({classNames:e,isSubmitting:t,localization:n,view:r}){var o,s,l,c;const{viewPaths:d,navigate:f,basePath:p,credentials:h}=M.useContext(vt);return C.jsxs(rn,{className:Ce("w-full",(o=e?.form)==null?void 0:o.button,(s=e?.form)==null?void 0:s.secondaryButton),disabled:t,type:"button",variant:"secondary",onClick:()=>f(`${p}/${r==="MAGIC_LINK"||!h?d.SIGN_IN:d.MAGIC_LINK}${window.location.search}`),children:[r==="MAGIC_LINK"?C.jsx(zN,{className:(l=e?.form)==null?void 0:l.icon}):C.jsx(FN,{className:(c=e?.form)==null?void 0:c.icon}),n.SIGN_IN_WITH," ",r==="MAGIC_LINK"?n.PASSWORD:n.MAGIC_LINK]})}function sne({localization:e,redirectTo:t}){const{authClient:n,localization:r,toast:o,localizeErrors:s}=M.useContext(vt),l=M.useRef(!1);e=M.useMemo(()=>({...r,...e}),[r,e]);const{onSuccess:c}=Ii({redirectTo:t});return M.useEffect(()=>{if(!l.current){l.current=!0;try{n.oneTap({fetchOptions:{throw:!0,onSuccess:c}})}catch(d){o({variant:"error",message:Dn({error:d,localization:e,localizeErrors:s})})}}},[n,e,s,c,o]),null}function ane({classNames:e,isSubmitting:t,localization:n,redirectTo:r,setIsSubmitting:o}){var s,l;const{authClient:c,localization:d,toast:f,localizeErrors:p}=M.useContext(vt);n={...d,...n};const{onSuccess:h}=Ii({redirectTo:r}),g=async()=>{o?.(!0);try{const v=await c.signIn.passkey({fetchOptions:{throw:!0}});v?.error?(f({variant:"error",message:Dn({error:v.error,localization:n,localizeErrors:p})}),o?.(!1)):h()}catch(v){f({variant:"error",message:Dn({error:v,localization:n,localizeErrors:p})}),o?.(!1)}};return C.jsxs(rn,{className:Ce("w-full",(s=e?.form)==null?void 0:s.button,(l=e?.form)==null?void 0:l.secondaryButton),disabled:t,formNoValidate:!0,name:"passkey",value:"true",variant:"secondary",onClick:g,children:[C.jsx(hK,{}),n.SIGN_IN_WITH," ",n.PASSKEY]})}function TA({className:e,classNames:t,callbackURL:n,isSubmitting:r,localization:o,other:s,provider:l,redirectTo:c,socialLayout:d,setIsSubmitting:f}){var p,h,g,v;const{authClient:y,basePath:b,baseURL:x,persistClient:w,redirectTo:E,viewPaths:T,social:R,genericOAuth:O,toast:A,localizeErrors:I}=M.useContext(vt),P=M.useCallback(()=>c||ml("redirectTo")||E,[c,E]),L=M.useCallback(()=>`${x}${n||(w?`${b}/${T.CALLBACK}?redirectTo=${encodeURIComponent(P())}`:P())}`,[n,w,b,T,x,P]),H=async()=>{f(!0);try{if(s){const j={providerId:l.provider,callbackURL:L(),fetchOptions:{throw:!0}};O?.signIn?(await O.signIn(j),setTimeout(()=>{f(!1)},1e4)):await y.signIn.oauth2(j)}else{const j={provider:l.provider,callbackURL:L(),fetchOptions:{throw:!0}};R?.signIn?(await R.signIn(j),setTimeout(()=>{f(!1)},1e4)):await y.signIn.social(j)}}catch(j){A({variant:"error",message:Dn({error:j,localization:o,localizeErrors:I})}),f(!1)}};return C.jsxs(rn,{className:Ce(d==="vertical"?"w-full":"grow",e,(p=t?.form)==null?void 0:p.button,(h=t?.form)==null?void 0:h.outlineButton,(g=t?.form)==null?void 0:g.providerButton),disabled:r,variant:"outline",onClick:H,children:[l.icon&&C.jsx(l.icon,{className:(v=t?.form)==null?void 0:v.icon}),d==="grid"&&l.name,d==="vertical"&&`${o.SIGN_IN_WITH} ${l.name}`]})}function Pue({className:e,classNames:t,callbackURL:n,cardHeader:r,cardFooter:o,localization:s,path:l,pathname:c,redirectTo:d,socialLayout:f="auto",view:p,otpSeparators:h=0}){var g,v,y,b,x,w;const E=fs(),{basePath:T,credentials:R,localization:O,magicLink:A,emailOTP:I,oneTap:P,passkey:L,signUp:H,social:j,genericOAuth:B,viewPaths:z,Link:K}=M.useContext(vt);s={...O,...s};let oe=f;oe==="auto"&&(oe=R&&j?.providers&&j.providers.length>2?"horizontal":"vertical");const q=l??c?.split("/").pop(),W=p||Wb(z,q)||"SIGN_IN",[te,le]=M.useState(!1);if(M.useEffect(()=>{const k=()=>le(!1);return window.addEventListener("pagehide",k),()=>{le(!1),window.removeEventListener("pagehide",k)}},[]),W==="CALLBACK")return C.jsx(oD,{redirectTo:d});if(W==="SIGN_OUT")return C.jsx(iD,{redirectTo:d});if(W==="ACCEPT_INVITATION")return C.jsx(nne,{className:e,classNames:t});const Q=!R&&!A&&!I?s.DISABLED_CREDENTIALS_DESCRIPTION:s[`${W}_DESCRIPTION`];return C.jsxs(tf,{className:Ce("w-full max-w-sm",e,t?.base),children:[C.jsx(MS,{className:t?.header,children:r||C.jsxs(C.Fragment,{children:[C.jsx(Y5,{className:Ce("text-lg md:text-xl",t?.title),children:s[W]}),Q&&C.jsx(W5,{className:Ce("text-xs md:text-sm",t?.description),children:Q})]})}),C.jsxs(PS,{className:Ce("grid gap-6",t?.content),children:[P&&["SIGN_IN","SIGN_UP","MAGIC_LINK","EMAIL_OTP"].includes(W)&&C.jsx(sne,{localization:s,redirectTo:d}),(R||A||I)&&C.jsxs("div",{className:"grid gap-4",children:[C.jsx(tne,{classNames:t?.form,callbackURL:n,isSubmitting:te,localization:s,otpSeparators:h,view:W,redirectTo:d,setIsSubmitting:le}),A&&(R&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(W)||I&&W==="EMAIL_OTP")&&C.jsx(ine,{classNames:t,localization:s,view:W,isSubmitting:te}),I&&(R&&["FORGOT_PASSWORD","SIGN_UP","SIGN_IN","MAGIC_LINK","EMAIL_OTP"].includes(W)||A&&["SIGN_IN","MAGIC_LINK"].includes(W))&&C.jsx(one,{classNames:t,localization:s,view:W,isSubmitting:te})]}),W!=="RESET_PASSWORD"&&W!=="EMAIL_VERIFICATION"&&(((g=j?.providers)==null?void 0:g.length)||((v=B?.providers)==null?void 0:v.length)||W==="SIGN_IN"&&L)&&C.jsxs(C.Fragment,{children:[(R||A||I)&&C.jsxs("div",{className:Ce("flex items-center gap-2",t?.continueWith),children:[C.jsx(OA,{className:Ce("!w-auto grow",t?.separator)}),C.jsx("span",{className:"flex-shrink-0 text-muted-foreground text-sm",children:s.OR_CONTINUE_WITH}),C.jsx(OA,{className:Ce("!w-auto grow",t?.separator)})]}),C.jsxs("div",{className:"grid gap-4",children:[(((y=j?.providers)==null?void 0:y.length)||((b=B?.providers)==null?void 0:b.length))&&C.jsxs("div",{className:Ce("flex w-full items-center justify-between gap-4",oe==="horizontal"&&"flex-wrap",oe==="vertical"&&"flex-col",oe==="grid"&&"grid grid-cols-2"),children:[(x=j?.providers)==null?void 0:x.map(k=>{const G=zte.find(V=>V.provider===k);return G?C.jsx(TA,{classNames:t,callbackURL:n,isSubmitting:te,localization:s,provider:G,redirectTo:d,setIsSubmitting:le,socialLayout:oe},k):null}),(w=B?.providers)==null?void 0:w.map(k=>C.jsx(TA,{classNames:t,callbackURL:n,isSubmitting:te,localization:s,provider:k,redirectTo:d,setIsSubmitting:le,socialLayout:oe,other:!0},k.provider))]}),L&&["SIGN_IN","MAGIC_LINK","EMAIL_OTP","RECOVER_ACCOUNT","TWO_FACTOR","FORGOT_PASSWORD"].includes(W)&&C.jsx(ane,{classNames:t,isSubmitting:te,localization:s,redirectTo:d,setIsSubmitting:le})]})]})]}),o&&C.jsx(SA,{className:t?.footer,children:o}),R&&H&&C.jsxs(SA,{className:Ce("justify-center gap-1.5 text-muted-foreground text-sm",t?.footer),children:[W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?s.DONT_HAVE_AN_ACCOUNT:W==="SIGN_UP"?s.ALREADY_HAVE_AN_ACCOUNT:C.jsx(lK,{className:"size-3"}),W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"||W==="SIGN_UP"?C.jsx(K,{className:Ce("text-foreground underline",t?.footerLink),href:`${T}/${z[W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?"SIGN_UP":"SIGN_IN"]}${E?window.location.search:""}`,children:C.jsx(rn,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),children:W==="SIGN_IN"||W==="MAGIC_LINK"||W==="EMAIL_OTP"?s.SIGN_UP:s.SIGN_IN})}):C.jsx(rn,{variant:"link",size:"sm",className:Ce("px-0 text-foreground underline",t?.footerLink),onClick:()=>window.history.back(),children:s.GO_BACK})]})]})}function Nue({children:e}){const{hooks:{useSession:t}}=M.useContext(vt),{isPending:n}=t();return n?e:null}function kue({children:e}){const{hooks:{useSession:t}}=M.useContext(vt),{data:n}=t();return n?e:null}function Due({children:e}){const{hooks:{useSession:t}}=M.useContext(vt),{data:n,isPending:r}=t();return!n&&!r?e:null}function lne(e){const t=Jr.c(8),{children:n}=e,r=Pg();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={basePath:"/",pathMode:"slug"},t[0]=o):o=t[0];let s,l;t[1]!==r?(s=d=>r({to:d}),l=d=>r({to:d,replace:!0}),t[1]=r,t[2]=s,t[3]=l):(s=t[2],l=t[3]);let c;return t[4]!==n||t[5]!==s||t[6]!==l?(c=C.jsx(oK,{authClient:Bg,redirectTo:"/",organization:o,navigate:s,replace:l,Link:cne,children:n}),t[4]=n,t[5]=s,t[6]=l,t[7]=c):c=t[7],c}function cne(e){const{href:t,className:n,children:r,...o}=e;return C.jsx(kg,{to:t,className:n,...o,children:r})}var me=typeof window<"u"?window:void 0,Qn=typeof globalThis<"u"?globalThis:me;typeof self>"u"&&(Qn.self=Qn),typeof File>"u"&&(Qn.File=function(){});var go=Qn?.navigator,Le=Qn?.document,pr=Qn?.location,w1=Qn?.fetch,S1=Qn!=null&&Qn.XMLHttpRequest&&"withCredentials"in new Qn.XMLHttpRequest?Qn.XMLHttpRequest:void 0,CA=Qn?.AbortController,une=Qn?.CompressionStream,Zr=go?.userAgent,We=me??{},AA="1.372.3",Lr={DEBUG:!1,LIB_VERSION:AA,LIB_NAME:"web",JS_SDK_VERSION:AA};function IA(e,t,n,r,o,s,l){try{var c=e[s](l),d=c.value}catch(f){return void n(f)}c.done?t(d):Promise.resolve(d).then(r,o)}function Lo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var s=e.apply(t,n);function l(d){IA(s,r,o,l,c,"next",d)}function c(d){IA(s,r,o,l,c,"throw",d)}l(void 0)}))}}function Ne(){return Ne=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ne.apply(null,arguments)}function aD(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function E1(){return E1=Lo((function*(e,t,n){t===void 0&&(t=!0);try{var r=new CompressionStream("gzip"),o=r.writable.getWriter(),s=o.write(new TextEncoder().encode(e)).then((()=>o.close())).catch((function(){var d=Lo((function*(f){try{yield o.abort(f)}catch{}throw f}));return function(f){return d.apply(this,arguments)}})()),l=new Response(r.readable).blob(),[c]=yield Promise.all([l,s]);return c}catch(d){if(n!=null&&n.rethrow)throw d;return t&&console.error("Failed to gzip compress data",d),null}})),E1.apply(this,arguments)}var dne=["amazonbot","amazonproductbot","app.hypefactors.com","applebot","archive.org_bot","awariobot","backlinksextendedbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","dataforseobot","deepscan","duckduckbot","facebookexternal","facebookcatalog","http://yandex.com/bots","hubspot","ia_archiver","leikibot","linkedinbot","meta-externalagent","mj12bot","msnbot","nessus","petalbot","pinterest","prerender","rogerbot","screaming frog","sebot-wa","sitebulb","slackbot","slurp","trendictionbot","turnitin","twitterbot","vercel-screenshot","vercelbot","yahoo! slurp","yandexbot","zoombot","bot.htm","bot.php","(bot;","bot/","crawler","ahrefsbot","ahrefssiteaudit","semrushbot","siteauditbot","splitsignalbot","gptbot","oai-searchbot","chatgpt-user","perplexitybot","better uptime bot","sentryuptimebot","uptimerobot","headlesschrome","cypress","google-hoteladsverifier","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleother","google-cloudvertexbot","googleweblight","mediapartners-google","storebot-google","google-inspectiontool","bytespider"],MA=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var n=e.toLowerCase();return dne.concat(t).some((r=>{var o=r.toLowerCase();return n.indexOf(o)!==-1}))},fne=["$snapshot","$pageview","$pageleave","$set","survey dismissed","survey sent","survey shown","$identify","$groupidentify","$create_alias","$$client_ingestion_warning","$web_experiment_applied","$feature_enrollment_update","$feature_flag_called"];function Et(e,t){return e.indexOf(t)!==-1}var rv=function(e){return e.trim()},x1=function(e){return e.replace(/^\$/,"")},lD=Object.prototype,cD=lD.hasOwnProperty,ov=lD.toString,Pt=Array.isArray||function(e){return ov.call(e)==="[object Array]"},rs=e=>typeof e=="function",In=e=>e===Object(e)&&!Pt(e),Cc=e=>{if(In(e)){for(var t in e)if(cD.call(e,t))return!1;return!0}return!1},Ue=e=>e===void 0,bn=e=>ov.call(e)=="[object String]",bm=e=>bn(e)&&e.trim().length===0,ms=e=>e===null,xt=e=>Ue(e)||ms(e),Fo=e=>ov.call(e)=="[object Number]"&&e==e,bc=e=>Fo(e)&&e>0,Ei=e=>ov.call(e)==="[object Boolean]",hne=e=>e instanceof FormData,pne=e=>Et(fne,e);function uD(e){return e===null||typeof e!="object"}function Jm(e,t){return{}.toString.call(e)==="[object "+t+"]"}function $S(e){return typeof Event<"u"&&(function(t,n){try{return t instanceof n}catch{return!1}})(e,Event)}var mne=[!0,"true",1,"1","yes"],qy=e=>Et(mne,e),gne=[!1,"false",0,"0","no"];function xi(e,t,n,r,o){return t>n&&(r.warn("min cannot be greater than max."),t=n),Fo(e)?e>n?(r.warn(" cannot be greater than max: "+n+". Using max value instead."),n):t>e?(r.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(r.warn(" must be a number. using max or fallback. max: "+n+", fallback: "+o),xi(o||n,t,n,r))}class vne{constructor(t){this.$t={},this.zt=t.zt,this.Ut=xi(t.bucketSize,0,100,t.Gt),this.Wt=xi(t.refillRate,0,this.Ut,t.Gt),this.Xt=xi(t.refillInterval,0,864e5,t.Gt)}Jt(t,n){var r=Math.floor((n-t.lastAccess)/this.Xt);r>0&&(t.tokens=Math.min(t.tokens+r*this.Wt,this.Ut),t.lastAccess=t.lastAccess+r*this.Xt)}consumeRateLimit(t){var n,r=Date.now(),o=String(t),s=this.$t[o];return s?this.Jt(s,r):this.$t[o]=s={tokens:this.Ut,lastAccess:r},s.tokens===0||(s.tokens--,s.tokens===0&&((n=this.zt)==null||n.call(this,t)),s.tokens===0)}stop(){this.$t={}}}var mp,PA,Gy,_o="Mobile",eg="iOS",as="Android",Gc="Tablet",dD=as+" "+Gc,fD="iPad",hD="Apple",pD=hD+" Watch",Ld="Safari",Kc="BlackBerry",mD="Samsung",gD=mD+"Browser",vD=mD+" Internet",sl="Chrome",_ne=sl+" OS",_D=sl+" "+eg,jS="Internet Explorer",yD=jS+" "+_o,US="Opera",yne=US+" Mini",zS="Edge",bD="Microsoft "+zS,jc="Firefox",wD=jc+" "+eg,rf="Nintendo",of="PlayStation",Uc="Xbox",SD=as+" "+_o,ED=_o+" "+Ld,xd="Windows",R1=xd+" Phone",NA="Nokia",O1="Ouya",xD="Generic",bne=xD+" "+_o.toLowerCase(),RD=xD+" "+Gc.toLowerCase(),T1="Konqueror",Dr="(\\d+(\\.\\d+)?)",Ky=new RegExp("Version/"+Dr),wne=new RegExp(Uc,"i"),Sne=new RegExp(of+" \\w+","i"),Ene=new RegExp(rf+" \\w+","i"),FS=new RegExp(Kc+"|PlayBook|BB10","i"),xne={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},OD=function(e,t){return t=t||"",Et(e," OPR/")&&Et(e,"Mini")?yne:Et(e," OPR/")?US:FS.test(e)?Kc:Et(e,"IE"+_o)||Et(e,"WPDesktop")?yD:Et(e,gD)?vD:Et(e,zS)||Et(e,"Edg/")?bD:Et(e,"FBIOS")?"Facebook "+_o:Et(e,"UCWEB")||Et(e,"UCBrowser")?"UC Browser":Et(e,"CriOS")?_D:Et(e,"CrMo")||Et(e,sl)?sl:Et(e,as)&&Et(e,Ld)?SD:Et(e,"FxiOS")?wD:Et(e.toLowerCase(),T1.toLowerCase())?T1:((n,r)=>r&&Et(r,hD)||(function(o){return Et(o,Ld)&&!Et(o,sl)&&!Et(o,as)})(n))(e,t)?Et(e,_o)?ED:Ld:Et(e,jc)?jc:Et(e,"MSIE")||Et(e,"Trident/")?jS:Et(e,"Gecko")?jc:""},Rne={[yD]:[new RegExp("rv:"+Dr)],[bD]:[new RegExp(zS+"?\\/"+Dr)],[sl]:[new RegExp("("+sl+"|CrMo)\\/"+Dr)],[_D]:[new RegExp("CriOS\\/"+Dr)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Dr)],[Ld]:[Ky],[ED]:[Ky],[US]:[new RegExp("(Opera|OPR)\\/"+Dr)],[jc]:[new RegExp(jc+"\\/"+Dr)],[wD]:[new RegExp("FxiOS\\/"+Dr)],[T1]:[new RegExp("Konqueror[:/]?"+Dr,"i")],[Kc]:[new RegExp(Kc+" "+Dr),Ky],[SD]:[new RegExp("android\\s"+Dr,"i")],[vD]:[new RegExp(gD+"\\/"+Dr)],[jS]:[new RegExp("(rv:|MSIE )"+Dr)],Mozilla:[new RegExp("rv:"+Dr)]},One=function(e,t){var n=OD(e,t),r=Rne[n];if(Ue(r))return null;for(var o=0;r.length>o;o++){var s=e.match(r[o]);if(s)return parseFloat(s[s.length-2])}return null},kA=[[new RegExp(Uc+"; "+Uc+" (.*?)[);]","i"),e=>[Uc,e&&e[1]||""]],[new RegExp(rf,"i"),[rf,""]],[new RegExp(of,"i"),[of,""]],[FS,[Kc,""]],[new RegExp(xd,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[R1,""];if(new RegExp(_o).test(t)&&!/IEMobile\b/.test(t))return[xd+" "+_o,""];var n=/Windows NT ([0-9.]+)/i.exec(t);if(n&&n[1]){var r=xne[n[1]]||"";return/arm/i.test(t)&&(r="RT"),[xd,r]}return[xd,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[eg,[e[3],e[4],e[5]||"0"].join(".")]:[eg,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=Ue(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+as+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+as+")","i"),e=>e&&e[2]?[as,[e[2],e[3],e[4]||"0"].join(".")]:[as,""]],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];return e&&e[1]&&(t[1]=[e[1],e[2],e[3]||"0"].join(".")),t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[_ne,""]],[/Linux|debian/i,["Linux",""]]],DA=function(e){return Ene.test(e)?rf:Sne.test(e)?of:wne.test(e)?Uc:new RegExp(O1,"i").test(e)?O1:new RegExp("("+R1+"|WPDesktop)","i").test(e)?R1:/iPad/.test(e)?fD:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?pD:FS.test(e)?Kc:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(NA,"i").test(e)?NA:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?new RegExp(_o).test(e)&&!/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)||/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?as:dD:new RegExp("(pda|"+_o+")","i").test(e)?bne:new RegExp(Gc,"i").test(e)&&!new RegExp(Gc+" pc","i").test(e)?RD:""},Tne=e=>e instanceof Error,TD={trace:{text:"TRACE",number:1},debug:{text:"DEBUG",number:5},info:{text:"INFO",number:9},warn:{text:"WARN",number:13},error:{text:"ERROR",number:17},fatal:{text:"FATAL",number:21}},Cne=TD.info;function CD(e){if(Ei(e))return{boolValue:e};if(typeof e=="number")return Number.isFinite(e)?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:{stringValue:String(e)};if(typeof e=="string")return{stringValue:e};if(Pt(e))return{arrayValue:{values:e.map((t=>CD(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function LA(e){var t=[];for(var n in e){var r=e[n];ms(r)||Ue(r)||t.push({key:n,value:CD(r)})}return t}function Ane(e){var t=globalThis._posthogChunkIds;if(t){var n=Object.keys(t);return Gy&&n.length===PA||(PA=n.length,Gy=n.reduce(((r,o)=>{mp||(mp={});var s=mp[o];if(s)r[s[0]]=s[1];else for(var l=e(o),c=l.length-1;c>=0;c--){var d=l[c],f=d?.filename,p=t[o];if(f&&p){r[f]=p,mp[o]=[f,p];break}}return r}),{})),Gy}}class Ine{constructor(t,n,r){r===void 0&&(r=[]),this.coercers=t,this.stackParser=n,this.modifiers=r}buildFromUnknown(t,n){n===void 0&&(n={});var r=n&&n.mechanism||{handled:!0,type:"generic"},o=this.buildCoercingContext(r,n,0).apply(t),s=this.buildParsingContext(n),l=this.parseStacktrace(o,s);return{$exception_list:this.convertToExceptionList(l,r),$exception_level:"error"}}modifyFrames(t){var n=this;return Lo((function*(){for(var r of t)r.stacktrace&&r.stacktrace.frames&&Pt(r.stacktrace.frames)&&(r.stacktrace.frames=yield n.applyModifiers(r.stacktrace.frames));return t}))()}coerceFallback(t){var n;return{type:"Error",value:"Unknown error",stack:(n=t.syntheticException)==null?void 0:n.stack,synthetic:!0}}parseStacktrace(t,n){var r,o;return t.cause!=null&&(r=this.parseStacktrace(t.cause,n)),t.stack!=""&&t.stack!=null&&(o=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?n.skipFirstLines:0),n.chunkIdMap)),Ne({},t,{cause:r,stack:o})}applyChunkIds(t,n){return t.map((r=>(r.filename&&n&&(r.chunk_id=n[r.filename]),r)))}applyCoercers(t,n){for(var r of this.coercers)if(r.match(t))return r.coerce(t,n);return this.coerceFallback(n)}applyModifiers(t){var n=this;return Lo((function*(){var r=t;for(var o of n.modifiers)r=yield o(r);return r}))()}convertToExceptionList(t,n){var r,o,s,l={type:t.type,value:t.value,mechanism:{type:(r=n.type)!==null&&r!==void 0?r:"generic",handled:(o=n.handled)===null||o===void 0||o,synthetic:(s=t.synthetic)!==null&&s!==void 0&&s}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,Ne({},n,{handled:!0}))),c}buildParsingContext(t){var n;return{chunkIdMap:Ane(this.stackParser),skipFirstLines:(n=t.skipFirstLines)!==null&&n!==void 0?n:1}}buildCoercingContext(t,n,r){r===void 0&&(r=0);var o=(s,l)=>{if(4>=l){var c=this.buildCoercingContext(t,n,l);return this.applyCoercers(s,c)}};return Ne({},n,{syntheticException:r==0?n.syntheticException:void 0,mechanism:t,apply:s=>o(s,r),next:s=>o(s,r+1)})}}var Zc="?";function C1(e,t,n,r,o){var s={platform:e,filename:t,function:n==="<anonymous>"?Zc:n,in_app:!0};return Ue(r)||(s.lineno=r),Ue(o)||(s.colno=o),s}var AD=(e,t)=>{var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Zc,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},Mne=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Pne=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Nne=/\((\S*)(?::(\d+))(?::(\d+))\)/,kne=(e,t)=>{var n=Mne.exec(e);if(n){var[,r,o,s]=n;return C1(t,r,Zc,+o,+s)}var l=Pne.exec(e);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=Nne.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[d,f]=AD(l[1]||Zc,l[2]);return C1(t,f,d,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},Dne=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Lne=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$ne=(e,t)=>{var n=Dne.exec(e);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){var r=Lne.exec(n[3]);r&&(n[1]=n[1]||"eval",n[3]=r[1],n[4]=r[2],n[5]="")}var o=n[3],s=n[1]||Zc;return[s,o]=AD(s,o),C1(t,o,s,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},$A=/\(error: (.*)\)/;class jne{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,n){var r=bn(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:r?t.stack:void 0,cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var n=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?n+": "+t.message:n}isDOMException(t){return Jm(t,"DOMException")}isDOMError(t){return Jm(t,"DOMError")}}class Une{match(t){return(n=>n instanceof Error)(t)}coerce(t,n){return{type:this.getType(t),value:this.getMessage(t,n),stack:this.getStack(t),cause:t.cause?n.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,n){var r=t.message;return String(r.error&&typeof r.error.message=="string"?r.error.message:r)}getStack(t){return t.stacktrace||t.stack||void 0}}class zne{constructor(){}match(t){return Jm(t,"ErrorEvent")&&t.error!=null}coerce(t,n){var r;return n.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}var Fne=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class Bne{match(t){return typeof t=="string"}coerce(t,n){var r,[o,s]=this.getInfos(t);return{type:o??"Error",value:s??t,stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}getInfos(t){var n="Error",r=t,o=t.match(Fne);return o&&(n=o[1],r=o[2]),[n,r]}}var Vne=["fatal","error","warning","log","info","debug"];function ID(e,t){t===void 0&&(t=40);var n=Object.keys(e);if(n.sort(),!n.length)return"[object has no keys]";for(var r=n.length;r>0;r--){var o=n.slice(0,r).join(", ");if(t>=o.length)return r===n.length?o:o.length>t?o.slice(0,t)+"...":o}return""}class Hne{match(t){return typeof t=="object"&&t!==null}coerce(t,n){var r,o=this.getErrorPropertyFromObject(t);return o?n.apply(o):{type:this.getType(t),value:this.getValue(t),stack:(r=n.syntheticException)==null?void 0:r.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return $S(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var n="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(n+=" with message: '"+t.message+"'"),n}if("message"in t&&typeof t.message=="string")return t.message;var r=this.getObjectClassName(t);return(r&&r!=="Object"?"'"+r+"'":"Object")+" captured as exception with keys: "+ID(t)}isSeverityLevel(t){return bn(t)&&!bm(t)&&Vne.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var n in t)if({}.hasOwnProperty.call(t,n)){var r=t[n];if(Tne(r))return r}}getObjectClassName(t){try{var n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{return}}}class qne{match(t){return $S(t)}coerce(t,n){var r,o=t.constructor.name;return{type:o,value:o+" captured as exception with keys: "+ID(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Gne{match(t){return uD(t)}coerce(t,n){var r;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}}}class Kne{match(t){return Jm(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!$S(t))return!1;try{var n=t.detail;return n!=null&&typeof n=="object"&&"reason"in n}catch{return!1}}coerce(t,n){var r,o=this.getUnhandledRejectionReason(t);return uD(o)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(o),stack:(r=n.syntheticException)==null?void 0:r.stack,synthetic:!0}:n.apply(o)}getUnhandledRejectionReason(t){try{if("reason"in t)return t.reason;if("detail"in t&&t.detail!=null&&typeof t.detail=="object"&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var tg="$message",ng="$timestamp",Zne=new Set([tg,ng]),Zy={enabled:!0,max_bytes:32768};function rg(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:Zy.enabled,max_bytes:Wne(e.max_bytes,Zy.max_bytes)}:Ne({},Zy)}class Yne{constructor(t){this.Kt=[],this.Qt=0,this.Bt=rg(t)}setConfig(t){this.Bt=rg(t),this.er()}add(t){var n=(function(o){var s=(function(p){var h=new WeakSet;try{return JSON.stringify(p,((g,v)=>{if(typeof v=="bigint")return v.toString();if(typeof v!="function"&&typeof v!="symbol"){if(v instanceof Date)return v.toISOString();if(v instanceof Error)return{name:v.name,message:v.message,stack:v.stack};if(v&&typeof v=="object"){if(h.has(v))return"[Circular]";h.add(v)}return v}}))}catch{return}})(o);if(s)try{var l=JSON.parse(s);if(!In(l))return;var c=l,d=c[tg],f=c[ng];return!bn(d)||d.trim().length===0||!bn(f)&&!Fo(f)?void 0:{step:c,json:s}}catch{return}})(t);if(n){var r=(function(o){if(typeof TextEncoder<"u")return new TextEncoder().encode(o).length;for(var s=encodeURIComponent(o),l=0,c=0;s.length>c;c++)s[c]==="%"?(l+=1,c+=2):l+=1;return l})(n.json);r>this.Bt.max_bytes||(this.Kt.push({step:n.step,bytes:r}),this.Qt+=r,this.er())}}getAttachable(){return this.Kt.map((t=>t.step))}clear(){this.Kt=[],this.Qt=0}size(){return this.Kt.length}er(){for(;this.Qt>this.Bt.max_bytes&&this.Kt.length>0;){var t=this.Kt.shift();t&&(this.Qt-=t.bytes)}}}function Wne(e,t){if(!Fo(e)||e===1/0||e===-1/0)return t;var n=Math.floor(e);return 0>n?t:n}var MD=function(e,t){var{debugEnabled:n}=t===void 0?{}:t,r={C(o){if(me&&(Lr.DEBUG||We.POSTHOG_DEBUG||n)&&!Ue(me.console)&&me.console){for(var s=("__rrweb_original__"in me.console[o])?me.console[o].__rrweb_original__:me.console[o],l=arguments.length,c=new Array(l>1?l-1:0),d=1;l>d;d++)c[d-1]=arguments[d];s(e,...c)}},info(){for(var o=arguments.length,s=new Array(o),l=0;o>l;l++)s[l]=arguments[l];r.C("log",...s)},warn(){for(var o=arguments.length,s=new Array(o),l=0;o>l;l++)s[l]=arguments[l];r.C("warn",...s)},error(){for(var o=arguments.length,s=new Array(o),l=0;o>l;l++)s[l]=arguments[l];r.C("error",...s)},critical(){for(var o=arguments.length,s=new Array(o),l=0;o>l;l++)s[l]=arguments[l];console.error(e,...s)},uninitializedWarning(o){r.error("You must initialize PostHog before calling "+o)},createLogger:(o,s)=>MD(e+" "+o,s)};return r},$e=MD("[PostHog.js]"),mn=$e.createLogger,Qne=mn("[ExternalScriptsLoader]"),Yy=(e,t,n)=>{if(e.config.disable_external_dependency_loading)return Qne.warn(t+" was requested but loading of external scripts is disabled."),n("Loading of external scripts is disabled");var r=Le?.querySelectorAll("script");if(r){for(var o,s=function(){if(r[l].src===t){var d=r[l];return d.__posthog_loading_callback_fired?{v:n()}:(d.addEventListener("load",(f=>{d.__posthog_loading_callback_fired=!0,n(void 0,f)})),d.onerror=f=>n(f),{v:void 0})}},l=0;r.length>l;l++)if(o=s())return o.v}var c=()=>{if(!Le)return n("document not found");var d=Le.createElement("script");if(d.type="text/javascript",d.crossOrigin="anonymous",d.src=t,d.onload=h=>{d.__posthog_loading_callback_fired=!0,n(void 0,h)},d.onerror=h=>n(h),e.config.prepare_external_dependency_script&&(d=e.config.prepare_external_dependency_script(d)),!d)return n("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Le.head.appendChild(d);else{var f,p=Le.querySelectorAll("body > script");p.length>0?(f=p[0].parentNode)==null||f.insertBefore(d,p[0]):Le.body.appendChild(d)}};Le!=null&&Le.body?c():Le?.addEventListener("DOMContentLoaded",c)};We.__PosthogExtensions__=We.__PosthogExtensions__||{},We.__PosthogExtensions__.loadExternalDependency=(e,t,n)=>{if(t!=="remote-config"){var r;if(e.config.__preview_external_dependency_versioned_paths)r=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var o="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var s=3e5;o=o+"&t="+Math.floor(Date.now()/s)*s}r=e.requestRouter.endpointFor("assets",o)}Yy(e,r,n)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");Yy(e,l,n)}},We.__PosthogExtensions__.loadSiteApp=(e,t,n)=>{var r=e.requestRouter.endpointFor("api",t);Yy(e,r,n)};var PD="$people_distinct_id",og="$device_id",Rd="__alias",Od="__timers",A1="$autocapture_disabled_server_side",I1="$heatmaps_enabled_server_side",M1="$exception_capture_enabled_server_side",P1="$error_tracking_suppression_rules",N1="$error_tracking_capture_extension_exceptions",k1="$web_vitals_enabled_server_side",BS="$dead_clicks_enabled_server_side",D1="$product_tours_enabled_server_side",L1="$web_vitals_allowed_metrics",Td="$session_recording_remote_config",ND="$replay_override_sampling",kD="$replay_override_linked_flag",DD="$replay_override_url_trigger",LD="$replay_override_event_trigger",ig="$sesid",VS="$session_is_sampled",Ac="$enabled_feature_flags",wm="$active_feature_flags",Cd="$early_access_features",$1="$feature_flag_details",j1="$feature_flag_payloads",U1="$feature_flag_request_id",ns="$override_feature_flags",wc="$override_feature_flag_payloads",Ad="$stored_person_properties",Wa="$stored_group_properties",z1="$surveys",F1="$surveys_activated",Sm="ph_product_tours",$d="$flag_call_reported",B1="$flag_call_reported_session_id",V1="$feature_flag_errors",sg="$feature_flag_evaluated_at",ei="$user_state",H1="$client_session_props",q1="$capture_rate_limit",G1="$initial_campaign_params",K1="$initial_referrer_info",ag="$initial_person_info",lg="$epp",$D="__POSTHOG_TOOLBAR__",gp="$posthog_cookieless",jD="$sdk_debug_extensions_init_method",UD="$sdk_debug_extensions_init_time_ms",zD="$sdk_debug_recording_script_not_loaded",HS="PostHog loadExternalDependency extension not found.",Qa="on_reject",is="always",fc="anonymous",hc="identified",Z1="identified_only",cg="visibilitychange",ug="beforeunload",Sc="$pageview",Wy="$pageleave",Qy="$identify",jA="$groupidentify";function vp(e,t){Pt(e)&&e.forEach(t)}function cn(e,t){if(!xt(e))if(Pt(e))e.forEach(t);else if(hne(e))e.forEach(((r,o)=>t(r,o)));else for(var n in e)cD.call(e,n)&&t(e[n],n)}var On=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];for(var o of n)for(var s in o)o[s]!==void 0&&(e[s]=o[s]);return e};function Em(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r}var UA=function(e){try{return e()}catch{return}},Xne=function(e){return function(){try{for(var t=arguments.length,n=new Array(t),r=0;t>r;r++)n[r]=arguments[r];return e.apply(this,n)}catch(o){$e.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),$e.critical(o)}}},qS=function(e){var t={};return cn(e,(function(n,r){(bn(n)&&n.length>0||Fo(n))&&(t[r]=n)})),t},Jne=["herokuapp.com","vercel.app","netlify.app"];function ere(e){var t=e?.hostname;if(!bn(t))return!1;var n=t.split(".").slice(-2).join(".");for(var r of Jne)if(n===r)return!1;return!0}function Vn(e,t,n,r){var{capture:o=!1,passive:s=!0}=r??{};e?.addEventListener(t,n,{capture:o,passive:s})}function FD(e){return e.name==="ph_toolbar_internal"}Math.trunc||(Math.trunc=function(e){return 0>e?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Fo(e)&&isFinite(e)&&Math.floor(e)===e});class dg{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,n,r,o){if(!Number.isInteger(t)||!Number.isInteger(n)||!Number.isInteger(r)||!Number.isInteger(o)||0>t||0>n||0>r||0>o||t>0xffffffffffff||n>4095||r>1073741823||o>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|n>>>8,s[7]=n,s[8]=128|r>>>24,s[9]=r>>>16,s[10]=r>>>8,s[11]=r,s[12]=o>>>24,s[13]=o>>>16,s[14]=o>>>8,s[15]=o,new dg(s)}toString(){for(var t="",n=0;this.bytes.length>n;n++)t=t+(this.bytes[n]>>>4).toString(16)+(15&this.bytes[n]).toString(16),n!==3&&n!==5&&n!==7&&n!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new dg(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var n=0;16>n;n++){var r=this.bytes[n]-t.bytes[n];if(r!==0)return Math.sign(r)}return 0}}class tre{constructor(){this.I=0,this.S=0,this.k=new nre}generate(){var t=this.generateOrAbort();if(Ue(t)){this.I=0;var n=this.generateOrAbort();if(Ue(n))throw new Error("Could not generate UUID after timestamp reset");return n}return t}generateOrAbort(){var t=Date.now();if(t>this.I)this.I=t,this.A();else{if(this.I>=t+1e4)return;this.S++,this.S>4398046511103&&(this.I++,this.A())}return dg.fromFieldsV7(this.I,Math.trunc(this.S/Math.pow(2,30)),this.S&Math.pow(2,30)-1,this.k.nextUint32())}A(){this.S=1024*this.k.nextUint32()+(1023&this.k.nextUint32())}}var zA,BD=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;e.length>t;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};me&&!Ue(me.crypto)&&crypto.getRandomValues&&(BD=e=>crypto.getRandomValues(e));class nre{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(BD(this.T),this.N=0),this.T[this.N++]}}var ta=()=>rre().toString(),rre=()=>(zA||(zA=new tre)).generate(),ld="",ore=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,wi={R:()=>!!Le,B(e){$e.error("cookieStore error: "+e)},O(e){if(Le){try{for(var t=e+"=",n=Le.cookie.split(";").filter((s=>s.length)),r=0;n.length>r;r++){for(var o=n[r];o.charAt(0)==" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return decodeURIComponent(o.substring(t.length,o.length))}}catch{}return null}},Z(e){var t;try{t=JSON.parse(wi.O(e))||{}}catch{}return t},M(e,t,n,r,o){if(Le)try{var s="",l="",c=(function(p,h){if(h){var g=(function(y,b){if(b===void 0&&(b=Le),ld)return ld;if(!b||["localhost","127.0.0.1"].includes(y))return"";for(var x=y.split("."),w=Math.min(x.length,8),E="dmn_chk_"+ta();!ld&&w--;){var T=x.slice(w).join("."),R=E+"=1;domain=."+T+";path=/";b.cookie=R+";max-age=3",b.cookie.includes(E)&&(b.cookie=R+";max-age=0",ld=T)}return ld})(p);if(!g){var v=(y=>{var b=y.match(ore);return b?b[0]:""})(p);v!==g&&$e.info("Warning: cookie subdomain discovery mismatch",v,g),g=v}return g?"; domain=."+g:""}return""})(Le.location.hostname,r);if(n){var d=new Date;d.setTime(d.getTime()+864e5*n),s="; expires="+d.toUTCString()}o&&(l="; secure");var f=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+c+l;return f.length>3686.4&&$e.warn("cookieStore warning: large cookie, len="+f.length),Le.cookie=f,f}catch{return}},F(e,t){if(Le!=null&&Le.cookie)try{wi.M(e,"",-1,t)}catch{return}}},Xy=null,yn={R(){if(!ms(Xy))return Xy;var e=!0;if(Ue(me))e=!1;else try{var t="__mplssupport__";yn.M(t,"xyz"),yn.O(t)!=='"xyz"'&&(e=!1),yn.F(t)}catch{e=!1}return e||$e.error("localStorage unsupported; falling back to cookie store"),Xy=e,e},B(e){$e.error("localStorage error: "+e)},O(e){try{return me?.localStorage.getItem(e)}catch(t){yn.B(t)}return null},Z(e){try{return JSON.parse(yn.O(e))||{}}catch{}return null},M(e,t){try{me?.localStorage.setItem(e,JSON.stringify(t))}catch(n){yn.B(n)}},F(e){try{me?.localStorage.removeItem(e)}catch(t){yn.B(t)}}},ire=[og,"distinct_id",ig,VS,lg,ag,ei],_p={},sre={R:()=>!0,B(e){$e.error("memoryStorage error: "+e)},O:e=>_p[e]||null,Z:e=>_p[e]||null,M(e,t){_p[e]=t},F(e){delete _p[e]}},Ha=null,mr={R(){if(!ms(Ha))return Ha;if(Ha=!0,Ue(me))Ha=!1;else try{var e="__support__";mr.M(e,"xyz"),mr.O(e)!=='"xyz"'&&(Ha=!1),mr.F(e)}catch{Ha=!1}return Ha},B(e){$e.error("sessionStorage error: ",e)},O(e){try{return me?.sessionStorage.getItem(e)}catch(t){mr.B(t)}return null},Z(e){try{return JSON.parse(mr.O(e))||null}catch{}return null},M(e,t){try{me?.sessionStorage.setItem(e,JSON.stringify(t))}catch(n){mr.B(n)}},F(e){try{me?.sessionStorage.removeItem(e)}catch(t){mr.B(t)}}};class are{constructor(t){this._instance=t}get Bt(){return this._instance.config}get consent(){return this.rr()?0:this.ir}isOptedOut(){return this.Bt.cookieless_mode===is||this.isRejected()||this.consent===-1&&this.Bt.cookieless_mode===Qa}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===0}isRejected(){return this.consent===0||this.consent===-1&&this.Bt.opt_out_capturing_by_default}optInOut(t){this.nr.M(this.sr,t?1:0,this.Bt.cookie_expiration,this.Bt.cross_subdomain_cookie,this.Bt.secure_cookie)}reset(){this.nr.F(this.sr,this.Bt.cross_subdomain_cookie)}get sr(){var{token:t,opt_out_capturing_cookie_prefix:n,consent_persistence_name:r}=this._instance.config;return r||(n?n+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.O(this.sr);return qy(t)?1:Et(gne,t)?0:-1}get nr(){var t=this.Bt.opt_out_capturing_persistence_type,n=t==="localStorage"?yn:wi;if(!this.ar||this.ar!==n){this.ar=n;var r=t==="localStorage"?wi:yn;r.O(this.sr)&&(this.ar.O(this.sr)||this.optInOut(qy(r.O(this.sr))),r.F(this.sr,this.Bt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.Bt.respect_dnt&&[go?.doNotTrack,go?.msDoNotTrack,We.doNotTrack].some((t=>qy(t)))}}var yp=mn("[Dead Clicks]"),lre=()=>!0,cre=e=>{var t,n=!((t=e.instance.persistence)==null||!t.get_property(BS)),r=e.instance.config.capture_dead_clicks;return Ei(r)?r:!!In(r)||n};class FA{get lazyLoadedDeadClicksAutocapture(){return this.lr}constructor(t,n,r){this.instance=t,this.isEnabled=n,this.onCapture=r,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[BS]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ur((()=>{this.hr()})):this.stop()}ur(t){var n,r;(n=We.__PosthogExtensions__)!=null&&n.initDeadClicksAutocapture&&t(),(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this.instance,"dead-clicks-autocapture",(o=>{o?yp.error("failed to load script",o):t()}))}hr(){var t;if(Le){if(!this.lr&&(t=We.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var n=In(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};n.__onCapture=this.onCapture,this.lr=We.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,n),this.lr.start(Le),yp.info("starting...")}}else yp.error("`document` not found. Cannot start.")}stop(){this.lr&&(this.lr.stop(),this.lr=void 0,yp.info("stopping..."))}}var Jy=mn("[SegmentIntegration]"),VD="posthog-js";function HD(e,t){var{organization:n,projectId:r,prefix:o,severityAllowList:s=["error"],sendExceptionsToPostHog:l=!0}=t===void 0?{}:t;return c=>{var d,f,p,h,g;if(s!=="*"&&!s.includes(c.level)||!e.__loaded)return c;c.tags||(c.tags={});var v=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());c.tags["PostHog Person URL"]=v,e.sessionRecordingStarted()&&(c.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var y,b=((d=c.exception)==null?void 0:d.values)||[],x=b.map((E=>Ne({},E,{stacktrace:E.stacktrace?Ne({},E.stacktrace,{type:"raw",frames:(E.stacktrace.frames||[]).map((T=>Ne({},T,{platform:"web:javascript"})))}):void 0}))),w={$exception_message:((f=b[0])==null?void 0:f.value)||c.message,$exception_type:(p=b[0])==null?void 0:p.type,$exception_level:c.level,$exception_list:x,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((h=b[0])==null?void 0:h.value)||c.message,$sentry_exception_type:(g=b[0])==null?void 0:g.type,$sentry_tags:c.tags};return n&&r&&(w.$sentry_url=(o||"https://sentry.io/organizations/")+n+"/issues/?project="+r+"&query="+c.event_id),l&&((y=e.exceptions)==null||y.sendExceptionEvent(w)),c}}class ure{constructor(t,n,r,o,s,l){this.name=VD,this.setupOnce=function(c){c(HD(t,{organization:n,projectId:r,prefix:o,severityAllowList:s,sendExceptionsToPostHog:l==null||l}))}}}class BA{constructor(t){this.cr=(n,r,o)=>{o&&(o.noSessionId||o.activityTimeout||o.sessionPastMaximumLength)&&($e.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:n,changeReason:o}),this.dr=void 0,this._instance.scrollManager.resetContext())},this._instance=t,this.vr()}vr(){var t;this.pr=(t=this._instance.sessionManager)==null?void 0:t.onSessionId(this.cr)}destroy(){var t;(t=this.pr)==null||t.call(this),this.pr=void 0}doPageView(t,n){var r,o=this.gr(t,n);return this.dr={pathname:(r=me?.location.pathname)!==null&&r!==void 0?r:"",pageViewId:n,timestamp:t},this._instance.scrollManager.resetContext(),o}doPageLeave(t){var n;return this.gr(t,(n=this.dr)==null?void 0:n.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,n){var r=this.dr;if(!r)return{$pageview_id:n};var o={$pageview_id:n,$prev_pageview_id:r.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:d,maxContentHeight:f,lastContentY:p,maxContentY:h}=s;if(!(Ue(l)||Ue(c)||Ue(d)||Ue(f)||Ue(p)||Ue(h))){l=Math.ceil(l),c=Math.ceil(c),d=Math.ceil(d),f=Math.ceil(f),p=Math.ceil(p),h=Math.ceil(h);var g=l>1?xi(c/l,0,1,$e):1,v=l>1?xi(d/l,0,1,$e):1,y=f>1?xi(p/f,0,1,$e):1,b=f>1?xi(h/f,0,1,$e):1;o=On(o,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:g,$prev_pageview_max_scroll:d,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:p,$prev_pageview_last_content_percentage:y,$prev_pageview_max_content:h,$prev_pageview_max_content_percentage:b})}}return r.pathname&&(o.$prev_pageview_pathname=r.pathname),r.timestamp&&(o.$prev_pageview_duration=(t.getTime()-r.timestamp.getTime())/1e3),o}}var dre={[PD]:{exposure:"hidden"},[Rd]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[Od]:{exposure:"hidden"},[A1]:{exposure:"event"},[I1]:{exposure:"hidden"},[M1]:{exposure:"event"},[P1]:{exposure:"hidden"},[N1]:{exposure:"event"},[k1]:{exposure:"event"},[BS]:{exposure:"event"},[D1]:{exposure:"hidden"},[L1]:{exposure:"event"},[Td]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[ig]:{exposure:"hidden"},[VS]:{exposure:"event"},$session_past_minimum_duration:{exposure:"event"},$session_recording_url_trigger_activated_session:{exposure:"event"},$session_recording_event_trigger_activated_session:{exposure:"event"},$debug_first_full_snapshot_timestamp:{exposure:"event"},[Ac]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!In(e))return{};for(var t={},n=Object.keys(e),r=0;n.length>r;r++)t["$feature/"+n[r]]=e[n[r]];return t}},[wm]:{exposure:"event"},[Cd]:{exposure:"hidden"},[$1]:{exposure:"hidden"},[j1]:{exposure:"event"},[U1]:{exposure:"event"},[ns]:{exposure:"event"},[wc]:{exposure:"hidden"},[Ad]:{exposure:"hidden"},[Wa]:{exposure:"hidden"},[z1]:{exposure:"hidden"},[F1]:{exposure:"event"},[Sm]:{exposure:"hidden"},$product_tours_activated:{exposure:"hidden"},$conversations_widget_session_id:{exposure:"event"},$conversations_ticket_id:{exposure:"event"},$conversations_widget_state:{exposure:"event"},$conversations_user_traits:{exposure:"event"},[$d]:{exposure:"hidden"},[B1]:{exposure:"hidden"},[V1]:{exposure:"hidden"},[sg]:{exposure:"hidden"},[ei]:{exposure:"hidden"},[H1]:{exposure:"hidden"},[q1]:{exposure:"hidden"},[G1]:{exposure:"hidden"},[K1]:{exposure:"hidden"},[ag]:{exposure:"hidden"},[lg]:{exposure:"hidden"},[ND]:{exposure:"event"},[kD]:{exposure:"event"},[DD]:{exposure:"event"},[LD]:{exposure:"event"},[jD]:{exposure:"event"},[UD]:{exposure:"event"},[zD]:{exposure:"event"},$sdk_debug_replay_event_trigger_status:{exposure:"event"},$sdk_debug_replay_linked_flag_trigger_status:{exposure:"event"},$sdk_debug_replay_matched_recording_trigger_groups:{exposure:"event"},$sdk_debug_replay_remote_trigger_matching_config:{exposure:"event"},$sdk_debug_replay_trigger_groups_count:{exposure:"event"},$sdk_debug_replay_url_trigger_status:{exposure:"event"},$session_recording_start_reason:{exposure:"event"}},fre=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],fg=e=>{var t=Le?.createElement("a");return Ue(t)?null:(t.href=e,t)},hg=function(e,t){for(var n,r=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),o=0;r.length>o;o++){var s=r[o].split("=");if(s[0]===t){n=s;break}}if(!Pt(n)||2>n.length)return"";var l=n[1];try{l=decodeURIComponent(l)}catch{$e.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},sf=function(e,t,n){if(!e||!t||!t.length)return e;for(var r=e.split("#"),o=r[1],s=(r[0]||"").split("?"),l=s[1],c=s[0],d=(l||"").split("&"),f=[],p=0;d.length>p;p++){var h=d[p].split("=");Pt(h)&&(t.includes(h[0])?f.push(h[0]+"="+n):f.push(d[p]))}var g=c;return l!=null&&(g+="?"+f.join("&")),o!=null&&(g+="#"+o),g},pg=function(e,t){var n=e.match(new RegExp(t+"=([^&]*)"));return n?n[1]:null},bp="https?://(.*)",Yc=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],hre=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Yc],af="<masked>",pre=["li_fat_id"];function qD(e,t,n){if(!Le)return{};var r,o=t?[...Yc,...n||[]]:[],s=GD(sf(Le.URL,o,af),e),l=(r={},cn(pre,(function(c){var d=wi.O(c);r[c]=d||null})),r);return On(l,s)}function GD(e,t){var n=hre.concat(t||[]),r={};return cn(n,(function(o){var s=hg(e,o);r[o]=s||null})),r}function KD(e){var t=(function(s){return s?s.search(bp+"google.([^/?]*)")===0?"google":s.search(bp+"bing.com")===0?"bing":s.search(bp+"yahoo.com")===0?"yahoo":s.search(bp+"duckduckgo.com")===0?"duckduckgo":null:null})(e),n=t!="yahoo"?"q":"p",r={};if(!ms(t)){r.$search_engine=t;var o=Le?hg(Le.referrer,n):"";o.length&&(r.ph_keyword=o)}return r}function VA(){return navigator.language||navigator.userLanguage}var mg="$direct";function ZD(){return Le?.referrer||mg}function YD(e,t){var n=e?[...Yc,...t||[]]:[],r=pr?.href.substring(0,1e3);return{r:ZD().substring(0,1e3),u:r?sf(r,n,af):void 0}}function WD(e){var t,{r:n,u:r}=e,o={$referrer:n,$referring_domain:n==null?void 0:n==mg?mg:(t=fg(n))==null?void 0:t.host};if(r){o.$current_url=r;var s=fg(r);o.$host=s?.host,o.$pathname=s?.pathname;var l=GD(r);On(o,l)}if(n){var c=KD(n);On(o,c)}return o}function QD(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function mre(){try{return new Date().getTimezoneOffset()}catch{return}}var gre=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class eb{constructor(t,n){this.Bt=t,this.props={},this.mr=!1,this.yr=(r=>{var o="";return r.token&&(o=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),r.persistence_name?"ph_"+r.persistence_name:"ph_"+o+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&$e.info("Persistence loaded",t.persistence,Ne({},this.props)),this.update_config(t,t,n),this.save()}isDisabled(){return!!this._r}br(t){gre.indexOf(t.persistence.toLowerCase())===-1&&($e.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var n=(function(o){o===void 0&&(o=[]);var s=[...ire,...o];return Ne({},yn,{Z(l){try{var c={};try{c=wi.Z(l)||{}}catch{}var d=On(c,JSON.parse(yn.O(l)||"{}"));return yn.M(l,d),d}catch{}return null},M(l,c,d,f,p,h){try{yn.M(l,c,void 0,void 0,h);var g={};s.forEach((v=>{c[v]&&(g[v]=c[v])})),Object.keys(g).length&&wi.M(l,g,d,f,p,h)}catch(v){yn.B(v)}},F(l,c){try{me?.localStorage.removeItem(l),wi.F(l,c)}catch(d){yn.B(d)}}})})(t.cookie_persisted_properties||[]),r=t.persistence.toLowerCase();return r==="localstorage"&&yn.R()?yn:r==="localstorage+cookie"&&n.R()?n:r==="sessionstorage"&&mr.R()?mr:r==="memory"?sre:r==="cookie"?wi:n.R()?n:wi}wr(t){var n=t??this.Bt.feature_flag_cache_ttl_ms;if(!n||0>=n)return!1;var r=this.props[sg];return!r||typeof r!="number"||Date.now()-r>n}properties(){var t={};return cn(this.props,((n,r)=>{var o=(s=>{var l=dre[s];if(l)return l;for(var[c,d]of fre)if(s.indexOf(c)===0)return d})(r);if(o?.exposure==="derived"){if(o.shouldSkipFromEventProperties!=null&&o.shouldSkipFromEventProperties(n,r===Ac?()=>this.wr():()=>!1))return;o.transformToEventProperties&&On(t,o.transformToEventProperties(n))}else o&&o.exposure!=="event"||(t[r]=n)})),t}load(){if(!this._r){var t=this.nr.Z(this.yr);t&&(this.props=On({},t))}}save(){this._r||this.nr.M(this.yr,this.props,this.Ir,this.Cr,this.Sr,this.Bt.debug)}remove(){this.nr.F(this.yr,!1),this.nr.F(this.yr,!0)}clear(){this.remove(),this.props={}}register_once(t,n,r){if(In(t)){Ue(n)&&(n="None"),this.Ir=Ue(r)?this.kr:r;var o=!1;if(cn(t,((s,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==n||(this.Tr(l,s),o=!0)})),o)return this.save(),!0}return!1}register(t,n){if(In(t)){this.Ir=Ue(n)?this.kr:n;var r=!1;if(cn(t,((o,s)=>{t.hasOwnProperty(s)&&this.props[s]!==o&&(this.Tr(s,o),r=!0)})),r)return this.save(),!0}return!1}unregister(t){t in this.props&&(this.Ar(t),this.save())}update_campaign_params(){if(!this.mr){var t=qD(this.Bt.custom_campaign_params,this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties);Cc(qS(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=Le?.referrer)?KD(t):{})}update_referrer_info(){var t;this.register_once({$referrer:ZD(),$referring_domain:Le!=null&&Le.referrer&&((t=fg(Le.referrer))==null?void 0:t.host)||mg},void 0)}set_initial_person_info(){this.props[G1]||this.props[K1]||this.register_once({[ag]:YD(this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};cn([K1,G1],(l=>{var c=this.props[l];c&&cn(c,(function(d,f){t["$initial_"+x1(f)]=d}))}));var n,r,o=this.props[ag];if(o){var s=(n=WD(o),r={},cn(n,(function(l,c){r["$initial_"+x1(c)]=l})),r);On(t,s)}return t}safe_merge(t){return cn(this.props,(function(n,r){r in t||(t[r]=n)})),t}update_config(t,n,r){if(this.kr=this.Ir=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!r),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==n.persistence||!((l,c)=>{if(l.length!==c.length)return!1;var d=[...l].sort(),f=[...c].sort();return d.every(((p,h)=>p===f[h]))})(t.cookie_persisted_properties||[],n.cookie_persisted_properties||[])){var o=this.br(t),s=this.props;this.clear(),this.nr=o,this.props=s,this.save()}}set_disabled(t){this._r=t,this._r?this.remove():this.save()}set_cross_subdomain(t){t!==this.Cr&&(this.Cr=t,this.remove(),this.save())}set_secure(t){t!==this.Sr&&(this.Sr=t,this.remove(),this.save())}set_event_timer(t,n){var r=this.props[Od]||{};r[t]=n,this.Tr(Od,r),this.save()}remove_event_timer(t){var n=this.props[Od]||{},r=n[t];return Ue(r)||(delete n[t],this.Tr(Od,n),this.save()),r}get_property(t){return this.props[t]}set_property(t,n){this.Tr(t,n),this.save()}Tr(t,n){this.props[t]=n}Ar(t){delete this.props[t]}}var cd={Activation:"events",Cancellation:"cancelEvents"},tb={Popover:"popover",API:"api",Widget:"widget"},Id={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},nb={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Y1={Popover:"popover",Inline:"inline"},vre={SHOWN:"product tour shown"},HA={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},qA=mn("[RateLimiter]");class _re{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=n=>{var r=n.text;if(r&&r.length)try{(JSON.parse(r).quota_limited||[]).forEach((o=>{qA.info((o||"events")+" is quota limited."),this.serverLimits[o]=new Date().getTime()+6e4}))}catch(o){return void qA.warn('could not rate limit - continuing. Error: "'+o?.message+'"',{text:r})}},this.instance=t,this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}get captureEventsPerSecond(){var t;return((t=this.instance.config.rate_limiting)==null?void 0:t.events_per_second)||10}get captureEventsBurstLimit(){var t;return Math.max(((t=this.instance.config.rate_limiting)==null?void 0:t.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond)}clientRateLimitContext(t){var n,r,o;t===void 0&&(t=!1);var{captureEventsBurstLimit:s,captureEventsPerSecond:l}=this,c=new Date().getTime(),d=(n=(r=this.instance.persistence)==null?void 0:r.get_property(q1))!==null&&n!==void 0?n:{tokens:s,last:c};d.tokens+=(c-d.last)/1e3*l,d.last=c,d.tokens>s&&(d.tokens=s);var f=1>d.tokens;return f||t||(d.tokens=Math.max(0,d.tokens-1)),!f||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+l+" events per second and "+s+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=f,(o=this.instance.persistence)==null||o.set_property(q1,d),{isRateLimited:f,remainingTokens:d.tokens}}isServerRateLimited(t){var n=this.serverLimits[t||"events"]||!1;return n!==!1&&new Date().getTime()<n}}var ud=mn("[RemoteConfig]");class XD{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=We._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Er(t){var n,r;(n=We.__PosthogExtensions__)!=null&&n.loadExternalDependency?(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):t()}Rr(t){this._instance._send_request({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback(n){t(n.json)}})}load(){try{if(this.remoteConfig)return ud.info("Using preloaded remote config",this.remoteConfig),this.Nr(this.remoteConfig),void this.Mr();if(this._instance.Fr())return void ud.warn("Remote config is disabled. Falling back to local config.");this.Er((t=>{if(!t)return ud.info("No config found after loading remote JS config. Falling back to JSON."),void this.Rr((n=>{this.Nr(n),this.Mr()}));this.Nr(t),this.Mr()}))}catch(t){ud.error("Error loading remote config",t)}}stop(){this.Or&&(clearInterval(this.Or),this.Or=void 0)}refresh(){this._instance.Fr()||Le?.visibilityState==="hidden"||this._instance.reloadFeatureFlags()}Mr(){var t;if(!this.Or){var n=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;n!==0&&(this.Or=setInterval((()=>{this.refresh()}),n))}}Nr(t){var n;t||ud.error("Failed to fetch remote config from PostHog."),this._instance.Nr(t??{}),t?.hasFeatureFlags!==!1&&(this._instance.config.advanced_disable_feature_flags_on_first_load||(n=this._instance.featureFlags)==null||n.ensureFlagsLoaded())}}var vi={GZipJS:"gzip-js",Base64:"base64"},zo=Uint8Array,Xr=Uint16Array,Wc=Uint32Array,GS=new zo([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),KS=new zo([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),GA=new zo([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),JD=function(e,t){for(var n=new Xr(31),r=0;31>r;++r)n[r]=t+=1<<e[r-1];var o=new Wc(n[30]);for(r=1;30>r;++r)for(var s=n[r];n[r+1]>s;++s)o[s]=s-n[r]<<5|r;return[n,o]},e6=JD(GS,2),W1=e6[1];e6[0][28]=258,W1[258]=28;for(var KA=JD(KS,0)[1],t6=new Xr(32768),un=0;32768>un;++un){var pc=(43690&un)>>>1|(21845&un)<<1;t6[un]=((65280&(pc=(61680&(pc=(52428&pc)>>>2|(13107&pc)<<2))>>>4|(3855&pc)<<4))>>>8|(255&pc)<<8)>>>1}var jd=function(e,t,n){for(var r=e.length,o=0,s=new Xr(t);r>o;++o)++s[e[o]-1];var l,c=new Xr(t);for(o=0;t>o;++o)c[o]=c[o-1]+s[o-1]<<1;for(l=new Xr(r),o=0;r>o;++o)l[o]=t6[c[e[o]-1]++]>>>15-e[o];return l},ul=new zo(288);for(un=0;144>un;++un)ul[un]=8;for(un=144;256>un;++un)ul[un]=9;for(un=256;280>un;++un)ul[un]=7;for(un=280;288>un;++un)ul[un]=8;var gg=new zo(32);for(un=0;32>un;++un)gg[un]=5;var yre=jd(ul,9),bre=jd(gg,5),n6=function(e){return(e/8>>0)+(7&e&&1)},r6=function(e,t,n){(n==null||n>e.length)&&(n=e.length);var r=new(e instanceof Xr?Xr:e instanceof Wc?Wc:zo)(n-t);return r.set(e.subarray(t,n)),r},Qi=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8},dd=function(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[r+1]|=n>>>8,e[r+2]|=n>>>16},rb=function(e,t){for(var n=[],r=0;e.length>r;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,s=n.slice();if(!o)return[new zo(0),0];if(o==1){var l=new zo(n[0].s+1);return l[n[0].s]=1,[l,1]}n.sort((function(O,A){return O.f-A.f})),n.push({s:-1,f:25001});var c=n[0],d=n[1],f=0,p=1,h=2;for(n[0]={s:-1,f:c.f+d.f,l:c,r:d};p!=o-1;)c=n[n[h].f>n[f].f?f++:h++],d=n[f!=p&&n[h].f>n[f].f?f++:h++],n[p++]={s:-1,f:c.f+d.f,l:c,r:d};var g=s[0].s;for(r=1;o>r;++r)s[r].s>g&&(g=s[r].s);var v=new Xr(g+1),y=Q1(n[p-1],v,0);if(y>t){r=0;var b=0,x=y-t,w=1<<x;for(s.sort((function(O,A){return v[A.s]-v[O.s]||O.f-A.f}));o>r;++r){var E=s[r].s;if(t>=v[E])break;b+=w-(1<<y-v[E]),v[E]=t}for(b>>>=x;b>0;){var T=s[r].s;t>v[T]?b-=1<<t-v[T]++-1:++r}for(;r>=0&&b;--r){var R=s[r].s;v[R]==t&&(--v[R],++b)}y=t}return[new zo(v),y]},Q1=function(e,t,n){return e.s==-1?Math.max(Q1(e.l,t,n+1),Q1(e.r,t,n+1)):t[e.s]=n},ZA=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Xr(++t),r=0,o=e[0],s=1,l=function(d){n[r++]=d},c=1;t>=c;++c)if(e[c]==o&&c!=t)++s;else{if(!o&&s>2){for(;s>138;s-=138)l(32754);s>2&&(l(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(l(o),--s;s>6;s-=6)l(8304);s>2&&(l(s-3<<5|8208),s=0)}for(;s--;)l(o);s=1,o=e[c]}return[n.subarray(0,r),t]},fd=function(e,t){for(var n=0,r=0;t.length>r;++r)n+=e[r]*t[r];return n},X1=function(e,t,n){var r=n.length,o=n6(t+2);e[o]=255&r,e[o+1]=r>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var s=0;r>s;++s)e[o+s+4]=n[s];return 8*(o+4+r)},YA=function(e,t,n,r,o,s,l,c,d,f,p){Qi(t,p++,n),++o[256];for(var h=rb(o,15),g=h[0],v=h[1],y=rb(s,15),b=y[0],x=y[1],w=ZA(g),E=w[0],T=w[1],R=ZA(b),O=R[0],A=R[1],I=new Xr(19),P=0;E.length>P;++P)I[31&E[P]]++;for(P=0;O.length>P;++P)I[31&O[P]]++;for(var L=rb(I,7),H=L[0],j=L[1],B=19;B>4&&!H[GA[B-1]];--B);var z,K,oe,q,W=f+5<<3,te=fd(o,ul)+fd(s,gg)+l,le=fd(o,g)+fd(s,b)+l+14+3*B+fd(I,H)+(2*I[16]+3*I[17]+7*I[18]);if(te>=W&&le>=W)return X1(t,p,e.subarray(d,d+f));if(Qi(t,p,1+(te>le)),p+=2,te>le){z=jd(g,v),K=g,oe=jd(b,x),q=b;var Q=jd(H,j);for(Qi(t,p,T-257),Qi(t,p+5,A-1),Qi(t,p+10,B-4),p+=14,P=0;B>P;++P)Qi(t,p+3*P,H[GA[P]]);p+=3*B;for(var k=[E,O],G=0;2>G;++G){var V=k[G];for(P=0;V.length>P;++P)Qi(t,p,Q[D=31&V[P]]),p+=H[D],D>15&&(Qi(t,p,V[P]>>>5&127),p+=V[P]>>>12)}}else z=yre,K=ul,oe=bre,q=gg;for(P=0;c>P;++P)if(r[P]>255){var D;dd(t,p,z[257+(D=r[P]>>>18&31)]),p+=K[D+257],D>7&&(Qi(t,p,r[P]>>>23&31),p+=GS[D]);var F=31&r[P];dd(t,p,oe[F]),p+=q[F],F>3&&(dd(t,p,r[P]>>>5&8191),p+=KS[F])}else dd(t,p,z[r[P]]),p+=K[r[P]];return dd(t,p,z[256]),p+K[256]},wre=new Wc([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Sre=(function(){for(var e=new Wc(256),t=0;256>t;++t){for(var n=t,r=9;--r;)n=(1&n&&3988292384)^n>>>1;e[t]=n}return e})(),ob=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Ere(e,t){t===void 0&&(t={});var n=(function(){var h=4294967295;return{p(g){for(var v=h,y=0;g.length>y;++y)v=Sre[255&v^g[y]]^v>>>8;h=v},d(){return 4294967295^h}}})(),r=e.length;n.p(e);var o,s,l,c,d,f=(c=10+((o=t).filename&&o.filename.length+1||0),d=8,(function(h,g,v,y,b,x){var w=h.length,E=new zo(y+w+5*(1+Math.floor(w/7e3))+b),T=E.subarray(y,E.length-b),R=0;if(!g||8>w)for(var O=0;w>=O;O+=65535){var A=O+65535;w>A?R=X1(T,R,h.subarray(O,A)):(T[O]=!0,R=X1(T,R,h.subarray(O,w)))}else{for(var I=wre[g-1],P=I>>>13,L=8191&I,H=(1<<v)-1,j=new Xr(32768),B=new Xr(H+1),z=Math.ceil(v/3),K=2*z,oe=function(ze){return(h[ze]^h[ze+1]<<z^h[ze+2]<<K)&H},q=new Wc(25e3),W=new Xr(288),te=new Xr(32),le=0,Q=0,k=(O=0,0),G=0,V=0;w>O;++O){var D=oe(O),F=32767&O,X=B[D];if(j[F]=X,B[D]=F,O>=G){var fe=w-O;if((le>7e3||k>24576)&&fe>423){R=YA(h,T,0,q,W,te,Q,k,V,O-V,R),k=le=Q=0,V=O;for(var pe=0;286>pe;++pe)W[pe]=0;for(pe=0;30>pe;++pe)te[pe]=0}var xe=2,je=0,Y=L,re=F-X&32767;if(fe>2&&D==oe(O-re))for(var ve=Math.min(P,fe)-1,se=Math.min(32767,O),Se=Math.min(258,fe);se>=re&&--Y&&F!=X;){if(h[O+xe]==h[O+xe-re]){for(var Te=0;Se>Te&&h[O+Te]==h[O+Te-re];++Te);if(Te>xe){if(xe=Te,je=re,Te>ve)break;var tt=Math.min(re,Te-2),rt=0;for(pe=0;tt>pe;++pe){var Be=O-re+pe+32768&32767,Qe=Be-j[Be]+32768&32767;Qe>rt&&(rt=Qe,X=Be)}}}re+=(F=X)-(X=j[F])+32768&32767}if(je){q[k++]=268435456|W1[xe]<<18|KA[je];var Pe=31&W1[xe],Me=31&KA[je];Q+=GS[Pe]+KS[Me],++W[257+Pe],++te[Me],G=O+xe,++le}else q[k++]=h[O],++W[h[O]]}}R=YA(h,T,!0,q,W,te,Q,k,V,O-V,R)}return r6(E,0,y+n6(R)+b)})(s=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):12+l.mem,c,d)),p=f.length;return(function(h,g){var v=g.filename;if(h[0]=31,h[1]=139,h[2]=8,h[8]=2>g.level?4:g.level==9?2:0,h[9]=3,g.mtime!=0&&ob(h,4,Math.floor(new Date(g.mtime||Date.now())/1e3)),v){h[3]=8;for(var y=0;v.length>=y;++y)h[y+10]=v.charCodeAt(y)}})(f,t),ob(f,p-8,n.d()),ob(f,p-4,r),f}var xre=!!S1||!!w1,o6="text/plain",WA=!1,iv=function(e,t,n){var r;n===void 0&&(n=!0);var[o,s]=e.split("?"),l=Ne({},t),c=(r=s?.split("&").map((f=>{var p,[h,g]=f.split("="),v=n&&(p=l[h])!==null&&p!==void 0?p:g;return delete l[h],h+"="+v})))!==null&&r!==void 0?r:[],d=(function(f,p){var h,g;p===void 0&&(p="&");var v=[];return cn(f,(function(y,b){Ue(y)||Ue(b)||b==="undefined"||(h=encodeURIComponent((x=>x instanceof File)(y)?y.name:y.toString()),g=encodeURIComponent(b),v[v.length]=g+"="+h)})),v.join(p)})(l);return d&&c.push(d),o+"?"+c.join("&")},Ic=(e,t)=>JSON.stringify(e,((n,r)=>typeof r=="bigint"?r.toString():r),t),ib=e=>{if(e.tr)return e.tr;var{data:t,compression:n}=e;if(t){if(n===vi.GZipJS){var r=Ere((function(c,d){var f=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var p=new zo(c.length+(c.length>>>1)),h=0,g=function(x){p[h++]=x},v=0;f>v;++v){if(h+5>p.length){var y=new zo(h+8+(f-v<<1));y.set(p),p=y}var b=c.charCodeAt(v);128>b?g(b):2048>b?(g(192|b>>>6),g(128|63&b)):b>55295&&57344>b?(g(240|(b=65536+(1047552&b)|1023&c.charCodeAt(++v))>>>18),g(128|b>>>12&63),g(128|b>>>6&63),g(128|63&b)):(g(224|b>>>12),g(128|b>>>6&63),g(128|63&b))}return r6(p,0,h)})(Ic(t)),{mtime:0});return{contentType:o6,body:r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),estimatedSize:r.byteLength}}if(n===vi.Base64){var o=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((d,f)=>String.fromCharCode(parseInt(f,16)))))})(Ic(t)),s=(c=>"data="+encodeURIComponent(typeof c=="string"?c:Ic(c)))(o);return{contentType:"application/x-www-form-urlencoded",body:s,estimatedSize:new Blob([s]).size}}var l=Ic(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},Rre=(function(){var e=Lo((function*(t){var n=Ic(t.data),r=yield(function(s,l,c){return E1.apply(this,arguments)})(n,Lr.DEBUG,{rethrow:!0});if(!r)return t;var o=yield r.arrayBuffer();return Ne({},t,{tr:{contentType:o6,body:o,estimatedSize:o.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),QA=(e,t)=>iv(e,{_:new Date().getTime().toString(),ver:Lr.JS_SDK_VERSION,compression:t}),xm=[];w1&&xm.push({transport:"fetch",method(e){var t,n,{contentType:r,body:o,estimatedSize:s}=(t=ib(e))!==null&&t!==void 0?t:{},l=new Headers;cn(e.headers,(function(p,h){l.append(h,p)})),r&&l.append("Content-Type",r);var c=e.url,d=null;if(CA){var f=new CA;d={signal:f.signal,timeout:setTimeout((()=>f.abort()),e.timeout)}}w1(c,Ne({method:e?.method||"GET",headers:l,keepalive:e.method==="POST"&&52428.8>(s||0),body:o,signal:(n=d)==null?void 0:n.signal},e.fetchOptions)).then((p=>p.text().then((h=>{var g={statusCode:p.status,text:h};if(p.status===200)try{g.json=JSON.parse(h)}catch(v){$e.error(v)}e.callback==null||e.callback(g)})))).catch((p=>{$e.error(p),e.callback==null||e.callback({statusCode:0,error:p})})).finally((()=>d?clearTimeout(d.timeout):null))}}),S1&&xm.push({transport:"XHR",method(e){var t,n=new S1;n.open(e.method||"GET",e.url,!0);var{contentType:r,body:o}=(t=ib(e))!==null&&t!==void 0?t:{};cn(e.headers,(function(s,l){n.setRequestHeader(l,s)})),r&&n.setRequestHeader("Content-Type",r),e.timeout&&(n.timeout=e.timeout),e.disableXHRCredentials||(n.withCredentials=!0),n.onreadystatechange=()=>{if(n.readyState===4){var s={statusCode:n.status,text:n.responseText};if(n.status===200)try{s.json=JSON.parse(n.responseText)}catch{}e.callback==null||e.callback(s)}},n.send(o)}}),go!=null&&go.sendBeacon&&xm.push({transport:"sendBeacon",method(e){var t=iv(e.url,{beacon:"1"});try{var n,{contentType:r,body:o}=(n=ib(e))!==null&&n!==void 0?n:{};if(!o)return;var s=o instanceof Blob?o:new Blob([o],{type:r});go.sendBeacon(t,s)}catch{}}});var J1=3e3;class Ore{constructor(t,n){this.Pr=!0,this.Lr=[],this.Dr=xi(n?.flush_interval_ms||J1,250,5e3,$e.createLogger("flush interval"),J1),this.Br=t}enqueue(t){this.Lr.push(t),this.jr||this.$r()}unload(){this.qr();var t=this.Lr.length>0?this.Zr():{},n=Object.values(t);[...n.filter((r=>r.url.indexOf("/e")===0)),...n.filter((r=>r.url.indexOf("/e")!==0))].map((r=>{this.Br(Ne({},r,{transport:"sendBeacon"}))}))}enable(){this.Pr=!1,this.$r()}$r(){var t=this;this.Pr||(this.jr=setTimeout((()=>{if(this.qr(),this.Lr.length>0){var n=this.Zr(),r=function(){var s=n[o],l=new Date().getTime();s.data&&Pt(s.data)&&cn(s.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.Br(s)};for(var o in n)r()}}),this.Dr))}qr(){clearTimeout(this.jr),this.jr=void 0}Zr(){var t={};return cn(this.Lr,(n=>{var r,o=n,s=(o?o.batchKey:null)||o.url;Ue(t[s])&&(t[s]=Ne({},o,{data:[]})),(r=t[s].data)==null||r.push(o.data)})),this.Lr=[],t}}var Tre=["retriesPerformedSoFar"];class Cre{constructor(t){this.Vr=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.zr=!0,!Ue(me)&&"onLine"in me.navigator&&(this.zr=me.navigator.onLine,this.Ur=()=>{this.zr=!0,this.Yr()},this.Gr=()=>{this.zr=!1},Vn(me,"online",this.Ur),Vn(me,"offline",this.Gr))}get length(){return this.Lr.length}retriableRequest(t){var{retriesPerformedSoFar:n}=t,r=aD(t,Tre);bc(n)&&(r.url=iv(r.url,{retry_count:n})),this._instance._send_request(Ne({},r,{callback:o=>{o.statusCode===200||o.statusCode>=400&&500>o.statusCode||(n??0)>=10?r.callback==null||r.callback(o):this.Wr(Ne({retriesPerformedSoFar:n},r))}}))}Wr(t){var n=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=n+1;var r=(function(l){var c=3e3*Math.pow(2,l),d=c/2,f=Math.min(18e5,c),p=Math.random()-.5;return Math.ceil(f+p*(f-d))})(n),o=Date.now()+r;this.Lr.push({retryAt:o,requestOptions:t});var s="Enqueued failed request for retry in "+r;navigator.onLine||(s+=" (Browser is offline)"),$e.warn(s),this.Vr||(this.Vr=!0,this.Xr())}Xr(){if(this.Jr&&clearTimeout(this.Jr),this.Lr.length===0)return this.Vr=!1,void(this.Jr=void 0);this.Jr=setTimeout((()=>{this.zr&&this.Lr.length>0&&this.Yr(),this.Xr()}),this.Hr)}Yr(){var t=Date.now(),n=[],r=this.Lr.filter((s=>t>s.retryAt||(n.push(s),!1)));if(this.Lr=n,r.length>0)for(var{requestOptions:o}of r)this.retriableRequest(o)}unload(){for(var{requestOptions:t}of(this.Jr&&(clearTimeout(this.Jr),this.Jr=void 0),this.Vr=!1,Ue(me)||(this.Ur&&(me.removeEventListener("online",this.Ur),this.Ur=void 0),this.Gr&&(me.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Lr))try{this._instance._send_request(Ne({},t,{transport:"sendBeacon"}))}catch(n){$e.error(n)}this.Lr=[]}}class Are{constructor(t){this.Kr=()=>{var n,r,o,s;this.Qr||(this.Qr={});var l=this.scrollElement(),c=this.scrollY(),d=l?Math.max(0,l.scrollHeight-l.clientHeight):0,f=c+(l?.clientHeight||0),p=l?.scrollHeight||0;this.Qr.lastScrollY=Math.ceil(c),this.Qr.maxScrollY=Math.max(c,(n=this.Qr.maxScrollY)!==null&&n!==void 0?n:0),this.Qr.maxScrollHeight=Math.max(d,(r=this.Qr.maxScrollHeight)!==null&&r!==void 0?r:0),this.Qr.lastContentY=f,this.Qr.maxContentY=Math.max(f,(o=this.Qr.maxContentY)!==null&&o!==void 0?o:0),this.Qr.maxContentHeight=Math.max(p,(s=this.Qr.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}get ei(){return this._instance.config.scroll_root_selector}getContext(){return this.Qr}resetContext(){var t=this.Qr;return setTimeout(this.Kr,0),t}startMeasuringScrollPosition(){Vn(me,"scroll",this.Kr,{capture:!0}),Vn(me,"scrollend",this.Kr,{capture:!0}),Vn(me,"resize",this.Kr)}scrollElement(){if(!this.ei)return me?.document.documentElement;var t=Pt(this.ei)?this.ei:[this.ei];for(var n of t){var r=me?.document.querySelector(n);if(r)return r}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return me&&(me.scrollY||me.pageYOffset||me.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return me&&(me.scrollX||me.pageXOffset||me.document.documentElement.scrollLeft)||0}}var Ire=e=>YD(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class XA{constructor(t,n,r,o){this.ti=s=>{var l=this.ri();if(!l||l.sessionId!==s){var c={sessionId:s,props:this.ii(this._instance)};this.ni.register({[H1]:c})}},this._instance=t,this.si=n,this.ni=r,this.ii=o||Ire,this.si.onSessionId(this.ti)}ri(){return this.ni.props[H1]}getSetOnceProps(){var t,n=(t=this.ri())==null?void 0:t.props;return n?"r"in n?WD(n):{$referring_domain:n.referringDomain,$pathname:n.initialPathName,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:n.utm_medium,utm_content:n.utm_content,utm_term:n.utm_term}:{}}getSessionProps(){var t={};return cn(qS(this.getSetOnceProps()),((n,r)=>{r==="$current_url"&&(r="url"),t["$session_entry_"+x1(r)]=n})),t}}class ZS{constructor(){this.oi={}}on(t,n){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(n),()=>{this.oi[t]=this.oi[t].filter((r=>r!==n))}}emit(t,n){for(var r of this.oi[t]||[])r(n);for(var o of this.oi["*"]||[])o(t,n)}}var sb=mn("[SessionId]");class JA{on(t,n){return this.ai.on(t,n)}constructor(t,n,r){var o;if(this.li=[],this.ui=void 0,this.ai=new ZS,this.hi=(f,p)=>!(!bc(f)||!bc(p))&&Math.abs(f-p)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===is)throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.Bt=t.config,this.ni=t.persistence,this.ci=void 0,this.di=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.vi=n||ta,this.fi=r||ta;var s=this.Bt.persistence_name||this.Bt.token;if(this._sessionTimeoutMs=1e3*xi(this.Bt.session_idle_timeout_seconds||1800,60,36e3,sb.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+s+"_window_id",this.mi="ph_"+s+"_primary_window_exists",this.yi()){var l=mr.Z(this.gi),c=mr.Z(this.mi);l&&!c?this.ci=l:mr.F(this.gi),mr.M(this.mi,!0)}if((o=this.Bt.bootstrap)!=null&&o.sessionID)try{var d=(f=>{var p=this.Bt.bootstrap.sessionID.replace(/-/g,"");if(p.length!==32)throw new Error("Not a valid UUID");if(p[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(p.substring(0,12),16)})();this.bi(this.Bt.bootstrap.sessionID,new Date().getTime(),d)}catch(f){sb.error("Invalid sessionID in bootstrap",f)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return Ue(this.li)&&(this.li=[]),this.li.push(t),this.di&&t(this.di,this.ci),()=>{this.li=this.li.filter((n=>n!==t))}}yi(){return this.Bt.persistence!=="memory"&&!this.ni._r&&mr.R()}Ii(t){t!==this.ci&&(this.ci=t,this.yi()&&mr.M(this.gi,t))}Ci(){return this.ci?this.ci:this.yi()?mr.Z(this.gi):null}bi(t,n,r){t===this.di&&n===this._sessionActivityTimestamp&&r===this._sessionStartTimestamp||(this._sessionStartTimestamp=r,this._sessionActivityTimestamp=n,this.di=t,this.ni.register({[ig]:[n,t,r]}))}Si(){var t=this.ni.props[ig];return Pt(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.bi(null,null,null)}destroy(){clearTimeout(this.xi),this.xi=void 0,this.ui&&me&&(me.removeEventListener(ug,this.ui,{capture:!1}),this.ui=void 0),this.li=[]}wi(){this.ui=()=>{this.yi()&&mr.F(this.mi)},Vn(me,ug,this.ui,{capture:!1})}checkAndGetSessionAndWindowId(t,n){if(t===void 0&&(t=!1),n===void 0&&(n=null),this.Bt.cookieless_mode===is)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var r=n||new Date().getTime(),[o,s,l]=this.Si(),c=this.Ci(),d=bc(l)&&Math.abs(r-l)>864e5,f=!1,p=!s,h=!p&&!t&&this.hi(r,o);p||h||d?(s=this.vi(),c=this.fi(),sb.info("new session ID generated",{sessionId:s,windowId:c,changeReason:{noSessionId:p,activityTimeout:h,sessionPastMaximumLength:d}}),l=r,f=!0):c||(c=this.fi(),f=!0);var g=bc(o)&&t&&!d?o:r,v=bc(l)?l:new Date().getTime();return this.Ii(c),this.bi(s,g,v),t||this.pi(),f&&this.li.forEach((y=>y(s,c,f?{noSessionId:p,activityTimeout:h,sessionPastMaximumLength:d}:void 0))),{sessionId:s,windowId:c,sessionStartTimestamp:v,changeReason:f?{noSessionId:p,activityTimeout:h,sessionPastMaximumLength:d}:void 0,lastActivityTimestamp:o}}pi(){clearTimeout(this.xi),this.xi=setTimeout((()=>{var[t]=this.Si();if(this.hi(new Date().getTime(),t)){var n=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:n})}}),1.1*this.sessionTimeoutMs)}}var i6=function(e,t){if(!e)return!1;var n=e.userAgent;if(n&&MA(n,t))return!0;try{var r=e?.userAgentData;if(r!=null&&r.brands&&r.brands.some((o=>MA(o?.brand,t))))return!0}catch{}return!!e.webdriver},vg=function(e,t){if(!(function(n){try{new RegExp(n)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function eI(e,t,n){return Ic({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:n})}var s6={exact:(e,t)=>t.some((n=>e.some((r=>n===r)))),is_not:(e,t)=>t.every((n=>e.every((r=>n!==r)))),regex:(e,t)=>t.some((n=>e.some((r=>vg(n,r))))),not_regex:(e,t)=>t.every((n=>e.every((r=>!vg(n,r))))),icontains:(e,t)=>t.map(wp).some((n=>e.map(wp).some((r=>n.includes(r))))),not_icontains:(e,t)=>t.map(wp).every((n=>e.map(wp).every((r=>!n.includes(r))))),gt:(e,t)=>t.some((n=>{var r=parseFloat(n);return!isNaN(r)&&e.some((o=>r>parseFloat(o)))})),lt:(e,t)=>t.some((n=>{var r=parseFloat(n);return!isNaN(r)&&e.some((o=>r<parseFloat(o)))}))},wp=e=>e.toLowerCase();function a6(e,t){return!e||Object.entries(e).every((n=>{var[r,o]=n,s=t?.[r];if(Ue(s)||ms(s))return!1;var l=[String(s)],c=s6[o.operator];return!!c&&c(o.values,l)}))}var ew="custom",tI="i.posthog.com",Mre=/^\/static\//;class Pre{constructor(t){this.ki={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,n=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return n||(n=this.apiHost.replace("."+tI,".posthog.com")),n==="https://app.posthog.com"?"https://us.posthog.com":n}get region(){return this.ki[this.apiHost]||(this.ki[this.apiHost]=/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"us":/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?"eu":ew),this.ki[this.apiHost]}Ti(t){var n=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof n=="string"&&Mre.test(t))return n.trim().replace(/\/$/,"")||void 0}endpointFor(t,n){if(n===void 0&&(n=""),n&&(n=n[0]==="/"?n:"/"+n),t==="ui")return this.uiHost+n;if(t==="flags")return this.flagsApiHost+n;if(t==="assets"){var r=this.Ti(n);if(r)return""+r+n}if(this.region===ew)return this.apiHost+n;var o=tI+n;switch(t){case"assets":return"https://"+this.region+"-assets."+o;case"api":return"https://"+this.region+"."+o}}}var Qt=mn("[Surveys]"),tw="seenSurvey_",Nre=[tb.Popover,tb.Widget,tb.API],kre={ignoreConditions:!1,ignoreDelay:!1,displayType:Y1.Popover},Dre=mn("[PostHog ExternalIntegrations]"),Lre={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class $re{constructor(t){this._instance=t}ur(t,n){var r;(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,t,(o=>{if(o)return Dre.error("failed to load script",o);n()}))}startIfEnabledOrStop(){var t=this,n=function(l){var c,d,f;!o||(c=We.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||t.ur(Lre[l],(()=>{var p;(p=We.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[l])==null||p.start(t._instance)})),!o&&(d=We.__PosthogExtensions__)!=null&&(d=d.integrations)!=null&&d[l]&&((f=We.__PosthogExtensions__)==null||(f=f.integrations)==null||(f=f[l])==null||f.stop())};for(var[r,o]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;n(r)}}}var mc,Ud={},ab=0,nw=()=>{},nI='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',hd="Surveys module not available",rI="sanitize_properties is deprecated. Use before_send instead",l6="Invalid value for property_denylist config: ",Ec="posthog",c6=!xre&&Zr?.indexOf("MSIE")===-1&&Zr?.indexOf("Mozilla")===-1,oI=e=>{var t;return Ne({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:ere(Le?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:nw,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,__preview_external_dependency_versioned_paths:!1,debug:pr&&bn(pr?.search)&&pr.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_conversations:!1,disable_product_tours:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(me==null||(t=me.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_feature_flags_dedup_per_session:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error(n){$e.error("Bad HTTP status: "+n.statusCode+" "+n.text)},get_device_id:n=>n,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Z1,before_send:void 0,request_queue_config:{flush_interval_ms:J1},error_tracking:{},_onCapture:nw,__preview_eager_load_replay:!1},(n=>({rageclick:!n||"2025-11-30">n||{content_ignorelist:!0},capture_pageview:!n||"2025-05-24">n||"history_change",session_recording:n&&n>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:n&&n>="2026-01-30"?"head":"body",internal_or_test_user_hostname:n&&n>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},jre=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],iI=e=>{var t={};for(var[n,r]of jre)Ue(e[n])||(t[r]=e[n]);var o=On({},t,e);return Pt(e.property_blacklist)&&(Ue(e.property_denylist)?o.property_denylist=e.property_blacklist:Pt(e.property_denylist)?o.property_denylist=[...e.property_blacklist,...e.property_denylist]:$e.error(l6+e.property_denylist)),o};class Ure{constructor(){this.__forceAllowLocalhost=!1}get Ai(){return this.__forceAllowLocalhost}set Ai(t){$e.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class $o{Ei(t,n){if(t){var r=this.Ri.indexOf(t);r!==-1&&this.Ri.splice(r,1)}return this.Ri.push(n),n.initialize==null||n.initialize(),n}Ni(){return this.config.cookieless_mode===is||this.config.cookieless_mode===Qa&&this.consent.isRejected()}get decideEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,n;return(t=(n=this.featureFlags)==null?void 0:n.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new Ure,this.Mi=!1,this.version=Lr.LIB_VERSION,this.Fi=new ZS,this.Ri=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=oI(),this.SentryIntegration=ure,this.sentryIntegration=r=>(function(o,s){var l=HD(o,s);return{name:VD,processEvent:c=>l(c)}})(this,r),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Oi=!1,this.Pi=null,this.Li=null,this.Di=null,this.scrollManager=new Are(this),this.pageViewManager=new BA(this),this.rateLimiter=new _re(this),this.requestRouter=new Pre(this),this.consent=new are(this),this.externalIntegrations=new $re(this);var n=(t=$o.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=n.featureFlags&&new n.featureFlags(this),this.toolbar=n.toolbar&&new n.toolbar(this),this.surveys=n.surveys&&new n.surveys(this),this.conversations=n.conversations&&new n.conversations(this),this.logs=n.logs&&new n.logs(this),this.experiments=n.experiments&&new n.experiments(this),this.exceptions=n.exceptions&&new n.exceptions(this),this.people={set:(r,o,s)=>{var l=bn(r)?{[r]:o}:r;this.setPersonProperties(l),s?.({})},set_once:(r,o,s)=>{var l=bn(r)?{[r]:o}:r;this.setPersonProperties(void 0,l),s?.({})}},this.on("eventCaptured",(r=>$e.info('send "'+r?.event+'"',r)))}init(t,n,r){if(r&&r!==Ec){var o,s=(o=Ud[r])!==null&&o!==void 0?o:new $o;return s._init(t,n,r),Ud[r]=s,Ud[Ec][r]=s,s}return this._init(t,n,r)}_init(t,n,r){var o,s;if(n===void 0&&(n={}),Ue(t)||bm(t))return $e.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},n.debug=this.Bi(n.debug),this.ji=n,this.$i=[],n.person_profiles?this.Li=n.person_profiles:n.process_person&&(this.Li=n.process_person),this.set_config(On({},oI(n.defaults),iI(n),{name:r,token:t})),this.config.on_xhr_error&&$e.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=n.disable_compression?void 0:vi.GZipJS;var l=this.qi();this.persistence=new eb(this.config,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new eb(Ne({},this.config,{persistence:"sessionStorage"}),l);var c=Ne({},this.persistence.props),d=Ne({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Zi=new Ore((x=>this.Vi(x)),this.config.request_queue_config),this.Hi=new Cre(this),this.__request_queue=[];var f=this.Ni();if(f||(this.sessionManager=new JA(this),this.sessionPropsManager=new XA(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?($e.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.zi(f)}),0)):($e.info("Initializing extensions synchronously"),this.zi(f)),Lr.DEBUG=Lr.DEBUG||this.config.debug,Lr.DEBUG&&$e.info("Starting in debug mode",{this:this,config:n,thisC:Ne({},this.config),p:c,s:d}),!this.config.identity_distinct_id||(o=n.bootstrap)!=null&&o.distinctID||(n.bootstrap=Ne({},n.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((s=n.bootstrap)==null?void 0:s.distinctID)!==void 0){var p=n.bootstrap.distinctID,h=this.get_distinct_id(),g=this.persistence.get_property(ei);if(n.bootstrap.isIdentifiedID&&h!=null&&h!==p&&g===fc)this.identify(p);else if(n.bootstrap.isIdentifiedID&&h!=null&&h!==p&&g===hc)$e.warn("Bootstrap distinctID differs from an already-identified user. The existing identity is preserved. Call reset() before reinitializing if you intend to switch users.");else{var v=this.config.get_device_id(ta()),y=n.bootstrap.isIdentifiedID?v:p;this.persistence.set_property(ei,n.bootstrap.isIdentifiedID?hc:fc),this.register({distinct_id:p,$device_id:y})}}if(f)this.register_once({distinct_id:gp,$device_id:null},"");else if(!this.get_distinct_id()){var b=this.config.get_device_id(ta());this.register_once({distinct_id:b,$device_id:b},""),this.persistence.set_property(ei,fc)}return Vn(me,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),n.segment?(function(x,w){var E=x.config.segment;if(!E)return w();(function(T,R){var O=T.config.segment;if(!O)return R();var A=P=>{var L=()=>P.anonymousId()||ta();T.config.get_device_id=L,P.id()&&(T.register({distinct_id:P.id(),$device_id:L()}),T.persistence.set_property(ei,hc)),R()},I=O.user();"then"in I&&rs(I.then)?I.then(A):A(I)})(x,(()=>{E.register((T=>{Promise&&Promise.resolve||Jy.warn("This browser does not have Promise support, and can not use the segment integration");var R=(O,A)=>{if(!A)return O;O.event.userId||O.event.anonymousId===T.get_distinct_id()||(Jy.info("No userId set, resetting PostHog"),T.reset()),O.event.userId&&O.event.userId!==T.get_distinct_id()&&(Jy.info("UserId set, identifying with PostHog"),T.identify(O.event.userId));var I=T.calculateEventProperties(A,O.event.properties);return O.event.properties=Object.assign({},I,O.event.properties),O};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:O=>R(O,O.event.event),page:O=>R(O,Sc),identify:O=>R(O,Qy),screen:O=>R(O,"$screen")}})(x)).then((()=>{w()}))}))})(this,(()=>this.Ui())):this.Ui(),rs(this.config._onCapture)&&this.config._onCapture!==nw&&($e.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(x=>this.config._onCapture(x.event,x)))),this.config.ip&&$e.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}zi(t){var n,r,o,s,l,c,d,f=performance.now(),p=Ne({},$o.__defaultExtensionClasses,this.config.__extensionClasses),h=[];p.featureFlags&&this.Ri.push(this.featureFlags=(n=this.featureFlags)!==null&&n!==void 0?n:new p.featureFlags(this)),p.exceptions&&this.Ri.push(this.exceptions=(r=this.exceptions)!==null&&r!==void 0?r:new p.exceptions(this)),p.historyAutocapture&&this.Ri.push(this.historyAutocapture=new p.historyAutocapture(this)),p.tracingHeaders&&this.Ri.push(new p.tracingHeaders(this)),p.siteApps&&this.Ri.push(this.siteApps=new p.siteApps(this)),p.sessionRecording&&!t&&this.Ri.push(this.sessionRecording=new p.sessionRecording(this)),this.config.disable_scroll_properties||h.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),p.autocapture&&this.Ri.push(this.autocapture=new p.autocapture(this)),p.surveys&&this.Ri.push(this.surveys=(o=this.surveys)!==null&&o!==void 0?o:new p.surveys(this)),p.logs&&this.Ri.push(this.logs=(s=this.logs)!==null&&s!==void 0?s:new p.logs(this)),p.conversations&&this.Ri.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new p.conversations(this)),p.productTours&&this.Ri.push(this.productTours=new p.productTours(this)),p.heatmaps&&this.Ri.push(this.heatmaps=new p.heatmaps(this)),p.webVitalsAutocapture&&this.Ri.push(this.webVitalsAutocapture=new p.webVitalsAutocapture(this)),p.exceptionObserver&&this.Ri.push(this.exceptionObserver=new p.exceptionObserver(this)),p.deadClicksAutocapture&&this.Ri.push(this.deadClicksAutocapture=new p.deadClicksAutocapture(this,cre)),p.toolbar&&this.Ri.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new p.toolbar(this)),p.experiments&&this.Ri.push(this.experiments=(d=this.experiments)!==null&&d!==void 0?d:new p.experiments(this)),this.Ri.forEach((g=>{g.initialize&&h.push((()=>{g.initialize==null||g.initialize()}))})),h.push((()=>{if(this.Yi){var g=this.Yi;this.Yi=void 0,this.Nr(g)}})),this.Gi(h,f)}Gi(t,n){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-n>=30&&t.length>0)return void setTimeout((()=>{this.Gi(t,n)}),0);var r=t.shift();if(r)try{r()}catch(s){$e.error("Error initializing extension:",s)}}var o=Math.round(performance.now()-n);this.register_for_session({[jD]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[UD]:o}),this.config.__preview_deferred_init_extensions&&$e.info("PostHog extensions initialized ("+o+"ms)")}Nr(t){var n;if(!Le||!Le.body)return $e.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.Nr(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Yi=t),this.Wi=t,this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=Et(t.supportedCompression,vi.GZipJS)?vi.GZipJS:Et(t.supportedCompression,vi.Base64)?vi.Base64:void 0),(n=t.analytics)!=null&&n.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Li?this.Li:Z1}),this.Ri.forEach((r=>r.onRemoteConfig==null?void 0:r.onRemoteConfig(t)))}Ui(){try{this.config.loaded(this)}catch(r){$e.critical("`loaded` function failed",r)}if(this.Xi(),this.config.internal_or_test_user_hostname&&pr!=null&&pr.hostname){var t=pr.hostname,n=this.config.internal_or_test_user_hostname;(typeof n=="string"?t===n:n.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.Ji()}),1),this.Ki=new XD(this),this.Ki.load()}Xi(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Zi)==null||t.enable())}_dom_loaded(){this.is_capturing()&&vp(this.__request_queue,(t=>this.Vi(t))),this.__request_queue=[],this.Xi()}_handle_unload(){var t,n,r,o;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Qi()&&this.capture(Wy),(n=this.logs)==null||n.flushLogs("sendBeacon"),(r=this.Zi)==null||r.unload(),(o=this.Hi)==null||o.unload()):this.Qi()&&this.capture(Wy,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(c6?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=iv(t.url,{ip:this.config.ip?1:0}),t.headers=Ne({},this.config.request_headers,t.headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(n=>{var r,o,s,l=Ne({},n);l.timeout=l.timeout||6e4,l.url=QA(l.url,l.compression);var c=(r=l.transport)!==null&&r!==void 0?r:"fetch",d=xm.filter((p=>!l.disableTransport||!p.transport||!l.disableTransport.includes(p.transport))),f=(o=(s=(function(p,h){for(var g=0;p.length>g;g++)if(p[g].transport===c)return p[g]})(d))==null?void 0:s.method)!==null&&o!==void 0?o:d[0].method;if(!f)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===vi.GZipJS&&une&&!WA?Rre(l).then((p=>{f(p)})).catch((p=>{if((h=>!(!h||typeof h!="object")&&("name"in h?String(h.name):"")==="NotReadableError")(p))return WA=!0,void f(Ne({},l,{compression:void 0,url:QA(n.url,void 0)}));f(l)})):f(l)})(Ne({},t,{callback:n=>{var r,o;this.rateLimiter.checkForLimiting(n),400>n.statusCode||(r=(o=this.config).on_request_error)==null||r.call(o,n),t.callback==null||t.callback(n)}}))))}Vi(t){this.Hi?this.Hi.retriableRequest(t):this._send_request(t)}_execute_array(t){ab++;try{var n,r=[],o=[],s=[];vp(t,(c=>{c&&(Pt(n=c[0])?s.push(c):rs(c)?c.call(this):Pt(c)&&n==="alias"?r.push(c):Pt(c)&&n.indexOf("capture")!==-1&&rs(this[n])?s.push(c):o.push(c))}));var l=function(c,d){vp(c,(function(f){if(Pt(f[0])){var p=d;cn(f,(function(h){p=p[h[0]].apply(p,h.slice(1))}))}else d[f[0]].apply(d,f.slice(1))}))};l(r,this),l(o,this),l(s,this)}finally{ab--}}push(t){if(ab>0&&Pt(t)&&bn(t[0])){var n=$o.prototype[t[0]];rs(n)&&n.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,n,r){var o,s,l,c,d;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Zi){if(this.is_capturing())if(!Ue(t)&&bn(t)){var f=!this.config.opt_out_useragent_filter&&this._is_bot();if(!f||this.config.__preview_capture_bot_pageviews){var p=r!=null&&r.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(p==null||!p.isRateLimited){n!=null&&n.$current_url&&!bn(n?.$current_url)&&($e.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),n==null||delete n.$current_url),t!=="$exception"||r!=null&&r.en||$e.warn("Using `posthog.capture('$exception')` is unreliable because it does not attach required metadata. Use `posthog.captureException(error)` instead, which attaches required metadata automatically."),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var h=new Date,g=r?.timestamp||h,v=ta(),y={uuid:v,event:t,properties:this.calculateEventProperties(t,n||{},g,v)};t===Sc&&this.config.__preview_capture_bot_pageviews&&f&&(y.event="$bot_pageview",y.properties.$browser_type="bot"),p&&(y.properties.$lib_rate_limit_remaining_tokens=p.remainingTokens),r?.$set&&(y.$set=r?.$set);var b,x,w,E=this.tn(r?.$set_once,t!==jA,t===Qy);if(E&&(y.$set_once=E),r!=null&&r._noTruncate||(s=this.config.properties_string_max_length,l=y,c=L=>bn(L)?L.slice(0,s):L,d=new Set,y=(function L(H,j){return H!==Object(H)?c?c(H):H:d.has(H)?void 0:(d.add(H),Pt(H)?(B=[],vp(H,(z=>{B.push(L(z))}))):(B={},cn(H,((z,K)=>{d.has(z)||(B[K]=L(z))}))),B);var B})(l)),y.timestamp=g,Ue(r?.timestamp)||(y.properties.$event_time_override_provided=!0,y.properties.$event_time_override_system_time=h),t===Id.DISMISSED||t===Id.SENT){var T=n?.[nb.SURVEY_ID],R=n?.[nb.SURVEY_ITERATION];(L=>{try{var H=(j=>((B,z)=>{var K=""+tw+z.id;return z.current_iteration&&z.current_iteration>0&&(K=""+tw+z.id+"_"+z.current_iteration),K})(0,j))(L);if(localStorage.getItem(H))return;localStorage.setItem(H,"true")}catch(j){Qt.error("Failed to persist survey seen state",j)}})({id:T,current_iteration:R}),y.$set=Ne({},y.$set,{[(b={id:T,current_iteration:R},x=t===Id.SENT?"responded":"dismissed",w="$survey_"+x+"/"+b.id,b.current_iteration&&b.current_iteration>0&&(w="$survey_"+x+"/"+b.id+"/"+b.current_iteration),w)]:!0})}else t===Id.SHOWN&&(y.$set=Ne({},y.$set,{[nb.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===vre.SHOWN){var O=n?.[HA.TOUR_TYPE];O&&(y.$set=Ne({},y.$set,{[HA.TOUR_LAST_SEEN_DATE+"/"+O]:new Date().toISOString()}))}var A=Ne({},y.properties.$set,y.$set);if(Cc(A)||this.setPersonPropertiesForFlags(A),!xt(this.config.before_send)){var I=this.rn(y);if(!I)return;y=I}this.Fi.emit("eventCaptured",y);var P={method:"POST",url:(o=r?._url)!==null&&o!==void 0?o:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:y,compression:"best-available",batchKey:r?._batchKey};return!this.config.request_batching||r&&(r==null||!r._batchKey)||r!=null&&r.send_instantly?this.Vi(P):this.Zi.enqueue(P),y}$e.critical("This capture call is ignored due to client rate limiting.")}}else $e.error("No event name provided to posthog.capture")}else $e.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(n=>t(n.event,n)))}calculateEventProperties(t,n,r,o,s){if(r=r||new Date,!this.persistence||!this.sessionPersistence)return n;var l=s?void 0:this.persistence.remove_event_timer(t),c=Ne({},n);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var d=Ne({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=d.distinct_id,(!bn(c.distinct_id)&&!Fo(c.distinct_id)||bm(c.distinct_id))&&$e.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var f,p=(function(w,E){var T,R,O,A;if(!Zr)return{};var I,P,L,H,j,B,z,K,oe=w?[...Yc,...E||[]]:[],[q,W]=(function(te){for(var le=0;kA.length>le;le++){var[Q,k]=kA[le],G=Q.exec(te),V=G&&(rs(k)?k(G,te):k);if(V)return V}return["",""]})(Zr);return On(qS({$os:q,$os_version:W,$browser:OD(Zr,navigator.vendor),$device:DA(Zr),$device_type:(P=Zr,L={userAgentDataPlatform:(T=navigator)==null||(T=T.userAgentData)==null?void 0:T.platform,maxTouchPoints:(R=navigator)==null?void 0:R.maxTouchPoints,screenWidth:me==null||(O=me.screen)==null?void 0:O.width,screenHeight:me==null||(A=me.screen)==null?void 0:A.height,devicePixelRatio:me?.devicePixelRatio},K=DA(P),K===fD||K===dD||K==="Kobo"||K==="Kindle Fire"||K===RD?Gc:K===rf||K===Uc||K===of||K===O1?"Console":K===pD?"Wearable":K?_o:L?.userAgentDataPlatform==="Android"&&((H=L?.maxTouchPoints)!==null&&H!==void 0?H:0)>0?600>Math.min((j=L?.screenWidth)!==null&&j!==void 0?j:0,(B=L?.screenHeight)!==null&&B!==void 0?B:0)/((z=L?.devicePixelRatio)!==null&&z!==void 0?z:1)?_o:Gc:"Desktop"),$timezone:QD(),$timezone_offset:mre()}),{$current_url:sf(pr?.href,oe,af),$host:pr?.host,$pathname:pr?.pathname,$raw_user_agent:Zr.length>1e3?Zr.substring(0,997)+"...":Zr,$browser_version:One(Zr,navigator.vendor),$browser_language:VA(),$browser_language_prefix:(I=VA(),typeof I=="string"?I.split("-")[0]:void 0),$screen_height:me?.screen.height,$screen_width:me?.screen.width,$viewport_height:me?.innerHeight,$viewport_width:me?.innerWidth,$lib:Lr.LIB_NAME,$lib_version:Lr.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})})(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:h,windowId:g}=this.sessionManager.checkAndGetSessionAndWindowId(s,r.getTime());c.$session_id=h,c.$window_id=g}this.sessionPropsManager&&On(c,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&On(c,this.sessionRecording.sdkDebugProperties),c.$sdk_debug_retry_queue_size=(v=this.Hi)==null?void 0:v.length}catch(w){c.$sdk_debug_error_capturing_properties=String(w)}if(this.requestRouter.region===ew&&(c.$lib_custom_api_host=this.config.api_host),f=t!==Sc||s?t!==Wy||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(r):this.pageViewManager.doPageView(r,o),c=On(c,f),t===Sc&&Le&&(c.title=Le.title),!Ue(l)){var y=r.getTime()-l;c.$duration=parseFloat((y/1e3).toFixed(3))}Zr&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=On({},p,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),Pt(this.config.property_denylist)?cn(this.config.property_denylist,(function(w){delete c[w]})):$e.error(l6+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var b=this.config.sanitize_properties;b&&($e.error(rI),c=b(c,t));var x=this.nn();return c.$process_person_profile=x,x&&!s&&this.sn("_calculate_event_properties"),c}tn(t,n,r){var o;if(n===void 0&&(n=!0),r===void 0&&(r=!1),!this.persistence||!this.nn()||this.Mi&&!r)return t;var s=this.persistence.get_initial_props(),l=(o=this.sessionPropsManager)==null?void 0:o.getSetOnceProps(),c=On({},s,l||{},t||{}),d=this.config.sanitize_properties;return d&&($e.error(rI),c=d(c,"$set_once")),n&&(this.Mi=!0),Cc(c)?void 0:c}register(t,n){var r;(r=this.persistence)==null||r.register(t,n)}register_once(t,n,r){var o;(o=this.persistence)==null||o.register_once(t,n,r)}register_for_session(t){var n;(n=this.sessionPersistence)==null||n.register(t)}unregister(t){var n;(n=this.persistence)==null||n.unregister(t)}unregister_for_session(t){var n;(n=this.sessionPersistence)==null||n.unregister(t)}an(t,n){this.register({[t]:n})}getFeatureFlag(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlag(t,n)}getFeatureFlagPayload(t){var n;return(n=this.featureFlags)==null?void 0:n.getFeatureFlagPayload(t)}getFeatureFlagResult(t,n){var r;return(r=this.featureFlags)==null?void 0:r.getFeatureFlagResult(t,n)}isFeatureEnabled(t,n){var r;return(r=this.featureFlags)==null?void 0:r.isFeatureEnabled(t,n)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,n,r){var o;(o=this.featureFlags)==null||o.updateFlags(t,n,r)}updateEarlyAccessFeatureEnrollment(t,n,r){var o;(o=this.featureFlags)==null||o.updateEarlyAccessFeatureEnrollment(t,n,r)}getEarlyAccessFeatures(t,n,r){var o;return n===void 0&&(n=!1),(o=this.featureFlags)==null?void 0:o.getEarlyAccessFeatures(t,n,r)}on(t,n){return this.Fi.on(t,n)}onFeatureFlags(t){return this.featureFlags?this.featureFlags.onFeatureFlags(t):(t([],{},{errorsLoading:!0}),()=>{})}onSurveysLoaded(t){return this.surveys?this.surveys.onSurveysLoaded(t):(t([],{isLoaded:!1,error:hd}),()=>{})}onSessionId(t){var n,r;return(n=(r=this.sessionManager)==null?void 0:r.onSessionId(t))!==null&&n!==void 0?n:()=>{}}getSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getSurveys(t,n):t([],{isLoaded:!1,error:hd})}getActiveMatchingSurveys(t,n){n===void 0&&(n=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,n):t([],{isLoaded:!1,error:hd})}renderSurvey(t,n){var r;(r=this.surveys)==null||r.renderSurvey(t,n)}displaySurvey(t,n){var r;n===void 0&&(n=kre),(r=this.surveys)==null||r.displaySurvey(t,n)}cancelPendingSurvey(t){var n;(n=this.surveys)==null||n.cancelPendingSurvey(t)}canRenderSurvey(t){var n,r;return(n=(r=this.surveys)==null?void 0:r.canRenderSurvey(t))!==null&&n!==void 0?n:{visible:!1,disabledReason:hd}}canRenderSurveyAsync(t,n){var r,o;return n===void 0&&(n=!1),(r=(o=this.surveys)==null?void 0:o.canRenderSurveyAsync(t,n))!==null&&r!==void 0?r:Promise.resolve({visible:!1,disabledReason:hd})}ln(t){return!t||bm(t)?($e.critical("Unique user id has not been set in posthog.identify"),!1):t===gp?($e.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.'),!1):!["distinct_id","distinctid"].includes(t.toLowerCase())&&!["undefined","null"].includes(t.toLowerCase())||($e.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.'),!1)}identify(t,n,r){if(!this.__loaded||!this.persistence)return $e.uninitializedWarning("posthog.identify");if(Fo(t)&&(t=t.toString(),$e.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),this.ln(t)&&this.sn("posthog.identify")){var o=this.get_distinct_id();this.register({$user_id:t}),this.get_property(og)||this.register_once({$had_persisted_distinct_id:!0,$device_id:o},""),t!==o&&t!==this.get_property(Rd)&&(this.unregister(Rd),this.register({distinct_id:t}));var s,l=(this.persistence.get_property(ei)||fc)===fc;t!==o&&l?(this.persistence.set_property(ei,hc),this.setPersonPropertiesForFlags({$set:n||{},$set_once:r||{}},!1),this.capture(Qy,{distinct_id:t,$anon_distinct_id:o},{$set:n||{},$set_once:r||{}}),this.Di=eI(t,n,r),(s=this.featureFlags)==null||s.setAnonymousDistinctId(o)):(n||r)&&this.setPersonProperties(n,r),t!==o&&(this.reloadFeatureFlags(),this.unregister($d))}}setPersonProperties(t,n){if((t||n)&&this.sn("posthog.setPersonProperties")){var r=eI(this.get_distinct_id(),t,n);this.Di!==r?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:n||{}},!0),this.capture("$set",{$set:t||{},$set_once:n||{}}),this.Di=r):$e.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,n,r){if(t&&n){var o=this.getGroups(),s=o[t]!==n;if(s&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Ne({},o,{[t]:n})}),s||r){var l={$group_type:t,$group_key:n};r&&(l.$group_set=r),this.capture(jA,l)}r&&this.setGroupPropertiesForFlags({[t]:r}),s&&!r&&this.reloadFeatureFlags()}else $e.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),(r=this.featureFlags)==null||r.setPersonPropertiesForFlags(t,n)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,n){var r;n===void 0&&(n=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((r=this.featureFlags)==null||r.setGroupPropertiesForFlags(t,n))}resetGroupPropertiesForFlags(t){var n;(n=this.featureFlags)==null||n.resetGroupPropertiesForFlags(t)}reset(t){var n,r,o,s,l,c,d,f;if($e.info("reset"),!this.__loaded)return $e.uninitializedWarning("posthog.reset");var p=this.get_property(og);if(this.consent.reset(),(n=this.persistence)==null||n.clear(),(r=this.sessionPersistence)==null||r.clear(),(o=this.surveys)==null||o.reset(),(s=this.Ki)==null||s.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(d=this.persistence)==null||d.set_property(ei,fc),(f=this.sessionManager)==null||f.resetSessionId(),this.Di=null,this.config.cookieless_mode===is)this.register_once({distinct_id:gp,$device_id:null},"");else{var h=this.config.get_device_id(ta());this.register_once({distinct_id:h,$device_id:t?h:p},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,n){var r;this.config.identity_distinct_id=t,this.config.identity_hash=n,this.alias(t),(r=this.conversations)==null||r.un()}clearIdentity(){var t;delete this.config.identity_distinct_id,delete this.config.identity_hash,(t=this.conversations)==null||t.hn()}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,n;return(t=(n=this.sessionManager)==null?void 0:n.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:n,sessionStartTimestamp:r}=this.sessionManager.checkAndGetSessionAndWindowId(!0),o=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+n);if(t!=null&&t.withTimestamp&&r){var s,l=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!r)return o;o+="?t="+Math.max(Math.floor((new Date().getTime()-r)/1e3)-l,0)}return o}alias(t,n){return t===this.get_property(PD)?($e.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(Ue(n)&&(n=this.get_distinct_id()),t!==n?(this.an(Rd,t),this.capture("$create_alias",{alias:t,distinct_id:n})):($e.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var n=Ne({},this.config);if(In(t)){var r,o,s,l,c,d,f,p,h,g;On(this.config,iI(t));var v=this.qi();(r=this.persistence)==null||r.update_config(this.config,n,v),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new eb(Ne({},this.config,{persistence:"sessionStorage"}),v);var y=this.Bi(this.config.debug);Ei(y)&&(this.config.debug=y),Ei(this.config.debug)&&(this.config.debug?(Lr.DEBUG=!0,yn.R()&&yn.M("ph_debug",!0),$e.info("set_config",{config:t,oldConfig:n,newConfig:Ne({},this.config)})):(Lr.DEBUG=!1,yn.R()&&yn.F("ph_debug"))),(o=this.exceptionObserver)==null||o.onConfigChange(),(s=this.exceptions)==null||s.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(d=this.heatmaps)==null||d.startIfEnabled(),(f=this.exceptionObserver)==null||f.startIfEnabledOrStop(),(p=this.deadClicksAutocapture)==null||p.startIfEnabledOrStop(),(h=this.surveys)==null||h.loadIfEnabled(),this.cn(),(g=this.externalIntegrations)==null||g.startIfEnabledOrStop()}}_overrideSDKInfo(t,n){Lr.LIB_NAME=t,Lr.LIB_VERSION=n}startSessionRecording(t){var n,r,o,s,l,c=t===!0,d={sampling:c||!(t==null||!t.sampling),linked_flag:c||!(t==null||!t.linked_flag),url_trigger:c||!(t==null||!t.url_trigger),event_trigger:c||!(t==null||!t.event_trigger)};Object.values(d).some(Boolean)&&((n=this.sessionManager)==null||n.checkAndGetSessionAndWindowId(),d.sampling&&((r=this.sessionRecording)==null||r.overrideSampling()),d.linked_flag&&((o=this.sessionRecording)==null||o.overrideLinkedFlag()),d.url_trigger&&((s=this.sessionRecording)==null||s.overrideTrigger("url")),d.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))),this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,n){if(this.exceptions){var r=new Error("PostHog syntheticException"),o=this.exceptions.buildProperties(t,{handled:!0,syntheticException:r});return this.exceptions.sendExceptionEvent(Ne({},o,n))}}addExceptionStep(t,n){var r;(r=this.exceptions)==null||r.addExceptionStep(t,n)}captureLog(t){var n;(n=this.logs)==null||n.captureLog(t)}get logger(){var t,n;return(t=(n=this.logs)==null?void 0:n.logger)!==null&&t!==void 0?t:$o.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var n,r;return(n=(r=this.toolbar)==null?void 0:r.loadToolbar(t))!==null&&n!==void 0&&n}get_property(t){var n;return(n=this.persistence)==null?void 0:n.props[t]}getSessionProperty(t){var n;return(n=this.sessionPersistence)==null?void 0:n.props[t]}toString(){var t,n=(t=this.config.name)!==null&&t!==void 0?t:Ec;return n!==Ec&&(n=Ec+"."+n),n}_isIdentified(){var t,n;return((t=this.persistence)==null?void 0:t.get_property(ei))===hc||((n=this.sessionPersistence)==null?void 0:n.get_property(ei))===hc}nn(){var t,n;return!(this.config.person_profiles==="never"||this.config.person_profiles===Z1&&!this._isIdentified()&&Cc(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[Rd])&&((n=this.persistence)==null||(n=n.props)==null||!n[lg]))}Qi(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.nn()||this.sn("posthog.createPersonProfile")&&this.setPersonProperties({},{})}setInternalOrTestUser(){this.sn("posthog.setInternalOrTestUser")&&this.setPersonProperties({$internal_or_test_user:!0})}sn(t){return this.config.person_profiles==="never"?($e.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(lg,!0),!0)}qi(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut();return this.config.disable_persistence||t&&!(!this.config.opt_out_persistence_by_default&&this.config.cookieless_mode!==Qa)}cn(){var t,n,r,o,s=this.qi();return((t=this.persistence)==null?void 0:t._r)!==s&&((r=this.persistence)==null||r.set_disabled(s)),((n=this.sessionPersistence)==null?void 0:n._r)!==s&&((o=this.sessionPersistence)==null||o.set_disabled(s)),s}opt_in_capturing(t){var n;if(this.config.cookieless_mode!==is){if(this.Ni()){var r,o,s,l,c;this.reset(!0),(r=this.sessionManager)==null||r.destroy(),(o=this.pageViewManager)==null||o.destroy(),this.sessionManager=new JA(this),this.pageViewManager=new BA(this),this.persistence&&(this.sessionPropsManager=new XA(this,this.sessionManager,this.persistence));var d,f=(s=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&s!==void 0?s:(c=$o.__defaultExtensionClasses)==null?void 0:c.sessionRecording;f&&(this.sessionRecording=this.Ei(this.sessionRecording,new f(this)),this.Wi&&((d=this.sessionRecording)==null||d.onRemoteConfig==null||d.onRemoteConfig(this.Wi)))}var p,h;this.consent.optInOut(!0),this.cn(),this.Xi(),(n=this.sessionRecording)==null||n.startIfEnabledOrStop(),this.config.cookieless_mode==Qa&&((p=this.surveys)==null||p.loadIfEnabled()),(Ue(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((h=t?.captureEventName)!==null&&h!==void 0?h:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ji()}else $e.warn(nI)}opt_out_capturing(){var t,n,r;this.config.cookieless_mode!==is?(this.config.cookieless_mode===Qa&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===Qa&&(this.register({distinct_id:gp,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.Ji())):$e.warn(nI)}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===1?"granted":t===0?"denied":"pending"}is_capturing(){return this.config.cookieless_mode===is||(this.config.cookieless_mode===Qa?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return go?i6(go,this.config.custom_blocked_useragents):void 0}Ji(){Le&&(Le.visibilityState==="visible"?this.Oi||(this.Oi=!0,this.capture(Sc,{title:Le.title},{send_instantly:!0}),this.Pi&&(Le.removeEventListener(cg,this.Pi),this.Pi=null)):this.Pi||(this.Pi=this.Ji.bind(this),Vn(Le,cg,this.Pi)))}debug(t){t===!1?(me?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(me?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}Fr(){var t,n,r,o,s,l,c=this.ji||{};return"advanced_disable_flags"in c?!!c.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?($e.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(r="advanced_disable_decide",o=$e,s=(n="advanced_disable_flags")in(t=c)&&!xt(t[n]),l=r in t&&!xt(t[r]),s?t[n]:!!l&&(o&&o.warn("Config field '"+r+"' is deprecated. Please use '"+n+"' instead. The old field will be removed in a future major version."),t[r]))}rn(t){if(xt(this.config.before_send))return t;var n=Pt(this.config.before_send)?this.config.before_send:[this.config.before_send],r=t;for(var o of n){if(r=o(r),xt(r)){var s="Event '"+t.event+"' was rejected in beforeSend function";return pne(t.event)?$e.warn(s+". This can cause unexpected behavior."):$e.info(s),null}r.properties&&!Cc(r.properties)||$e.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return r}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,n){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:n})}captureTraceMetric(t,n,r){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:n,$ai_metric_value:String(r)})}Bi(t){var n=Ei(t)&&!t,r=yn.R()&&yn.O("ph_debug")==="true";return!n&&(!!r||t)}}function sI(e){return e instanceof Element&&(e.id===$D||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function sv(e){return!!e&&e.nodeType===1}function ca(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function u6(e){return!!e&&e.nodeType===3}function d6(e){return!!e&&e.nodeType===11}function YS(e){return e?rv(e).split(/\s+/):[]}function aI(e){var t=me?.location.href;return!!(t&&e&&e.some((n=>t.match(n))))}function _g(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return YS(t)}function f6(e){return xt(e)?null:rv(e).split(/(\s+)/).filter((t=>zd(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function lf(e){var t="";return ow(e)&&!p6(e)&&e.childNodes&&e.childNodes.length&&cn(e.childNodes,(function(n){var r;u6(n)&&n.textContent&&(t+=(r=f6(n.textContent))!==null&&r!==void 0?r:"")})),rv(t)}function lI(e){return Ue(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}$o.__defaultExtensionClasses={},$o.dn={trace:mc=()=>{},debug:mc,info:mc,warn:mc,error:mc,fatal:mc},(function(e,t){for(var n=0;t.length>n;n++)e.prototype[t[n]]=Xne(e.prototype[t[n]])})($o,["identify"]);var WS=["a","button","form","input","select","textarea","label"];function cI(e,t){if(Ue(t))return!0;var n,r=function(s){if(t.some((l=>s.matches(l))))return{v:!0}};for(var o of e)if(n=r(o))return n.v;return!1}function h6(e){var t=e.parentNode;return!(!t||!sv(t))&&t}var zre=["next","previous","prev",">","<"],uI=[".ph-no-rageclick",".ph-no-capture"],rw=e=>!e||ca(e,"html")||!sv(e),dI=(e,t)=>{if(!me||rw(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var n=!1,r=[e],o=e;o.parentNode&&!ca(o,"body");)if(d6(o.parentNode))r.push(o.parentNode.host),o=o.parentNode.host;else{var s=h6(o);if(!s)break;if(t||WS.indexOf(s.tagName.toLowerCase())>-1)n=!0;else{var l=me.getComputedStyle(s);l&&l.getPropertyValue("cursor")==="pointer"&&(n=!0)}r.push(s),o=s}return{parentIsUsefulElement:n,targetElementList:r}};function ow(e){for(var t=e;t.parentNode&&!ca(t,"body");t=t.parentNode){var n=_g(t);if(Et(n,"ph-sensitive")||Et(n,"ph-no-capture"))return!1}if(Et(_g(e),"ph-include"))return!0;var r=e.type||"";if(bn(r))switch(r.toLowerCase()){case"hidden":case"password":return!1}var o=e.name||e.id||"";return!bn(o)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(o.replace(/[^a-zA-Z0-9]/g,""))}function p6(e){return!!(ca(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||ca(e,"select")||ca(e,"textarea")||e.getAttribute("contenteditable")==="true")}var m6="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Fre=new RegExp("^(?:"+m6+")$"),Bre=new RegExp(m6),g6="\\d{3}-?\\d{2}-?\\d{4}",Vre=new RegExp("^("+g6+")$"),Hre=new RegExp("("+g6+")");function zd(e,t){return t===void 0&&(t=!0),!(xt(e)||bn(e)&&(e=rv(e),(t?Fre:Bre).test((e||"").replace(/[- ]/g,""))||(t?Vre:Hre).test(e)))}function fI(e){var t=lf(e);return zd(t=(t+" "+v6(e)).trim())?t:""}function v6(e){var t="";return e&&e.childNodes&&e.childNodes.length&&cn(e.childNodes,(function(n){var r;if(n&&((r=n.tagName)==null?void 0:r.toLowerCase())==="span")try{var o=lf(n);t=(t+" "+o).trim(),n.childNodes&&n.childNodes.length&&(t=(t+" "+v6(n)).trim())}catch(s){$e.error("[AutoCapture]",s)}})),t}function hI(e){return e.replace(/"|\\"/g,'\\"')}function qre(e){var t=e.attr__class;return t?Pt(t)?t:YS(t):void 0}class pI{constructor(t){this.disabled=t===!1;var n=In(t)?t:{};this.thresholdPx=n.threshold_px||30,this.timeoutMs=n.timeout_ms||1e3,this.clickCount=n.click_count||3,this.clicks=[]}isRageClick(t,n,r){if(this.disabled)return!1;var o=this.clicks[this.clicks.length-1];if(o&&Math.abs(t-o.x)+Math.abs(n-o.y)<this.thresholdPx&&this.timeoutMs>r-o.timestamp){if(this.clicks.push({x:t,y:n,timestamp:r}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:n,timestamp:r}];return!1}}var lb="$copy_autocapture",mI=mn("[AutoCapture]");function cb(e,t){return t.length>e?t.slice(0,e)+"...":t}function Gre(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!sv(t));return t}function Kre(e,t){for(var n,r,{e:o,maskAllElementAttributes:s,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:d}=t,f=[e],p=e;p.parentNode&&!ca(p,"body");)d6(p.parentNode)?(f.push(p.parentNode.host),p=p.parentNode.host):(f.push(p.parentNode),p=p.parentNode);var h,g,v=[],y={},b=!1,x=!1;if(cn(f,(O=>{var A=ow(O);O.tagName.toLowerCase()==="a"&&(b=O.getAttribute("href"),b=A&&b&&zd(b)&&b),Et(_g(O),"ph-no-capture")&&(x=!0),v.push((function(P,L,H,j){var B=P.tagName.toLowerCase(),z={tag_name:B};WS.indexOf(B)>-1&&!H&&(z.$el_text=B.toLowerCase()==="a"||B.toLowerCase()==="button"?cb(1024,fI(P)):cb(1024,lf(P)));var K=_g(P);K.length>0&&(z.classes=K.filter((function(te){return te!==""}))),cn(P.attributes,(function(te){var le;if((!p6(P)||["name","id","class","aria-label"].indexOf(te.name)!==-1)&&(j==null||!j.includes(te.name))&&!L&&zd(te.value)&&(!bn(le=te.name)||le.substring(0,10)!=="_ngcontent"&&le.substring(0,7)!=="_nghost")){var Q=te.value;te.name==="class"&&(Q=YS(Q).join(" ")),z["attr__"+te.name]=cb(1024,Q)}}));for(var oe=1,q=1,W=P;W=Gre(W);)oe++,W.tagName===P.tagName&&q++;return z.nth_child=oe,z.nth_of_type=q,z})(O,s,l,c));var I=(function(P){if(!ow(P))return{};var L={};return cn(P.attributes,(function(H){if(H.name&&H.name.indexOf("data-ph-capture-attribute")===0){var j=H.name.replace("data-ph-capture-attribute-",""),B=H.value;j&&B&&zd(B)&&(L[j]=B)}})),L})(O);On(y,I)})),x)return{props:{},explicitNoCapture:x};if(l||(v[0].$el_text=e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?fI(e):lf(e)),b){var w,E;v[0].attr__href=b;var T=(w=fg(b))==null?void 0:w.host,R=me==null||(E=me.location)==null?void 0:E.host;T&&R&&T!==R&&(h=b)}return{props:On({$event_type:o.type,$ce_version:1},d?{}:{$elements:v},{$elements_chain:(g=v,(function(O){return O.map((A=>{var I,P,L="";if(A.tag_name&&(L+=A.tag_name),A.attr_class)for(var H of(A.attr_class.sort(),A.attr_class))L+="."+H.replace(/"/g,"");var j=Ne({},A.text?{text:A.text}:{},{"nth-child":(I=A.nth_child)!==null&&I!==void 0?I:0,"nth-of-type":(P=A.nth_of_type)!==null&&P!==void 0?P:0},A.href?{href:A.href}:{},A.attr_id?{attr_id:A.attr_id}:{},A.attributes),B={};return Em(j).sort(((z,K)=>{var[oe]=z,[q]=K;return oe.localeCompare(q)})).forEach((z=>{var[K,oe]=z;return B[hI(K.toString())]=hI(oe.toString())})),(L+=":")+Em(B).map((z=>{var[K,oe]=z;return K+'="'+oe+'"'})).join("")})).join(";")})((function(O){return O.map((A=>{var I,P,L={text:(I=A.$el_text)==null?void 0:I.slice(0,400),tag_name:A.tag_name,href:(P=A.attr__href)==null?void 0:P.slice(0,2048),attr_class:qre(A),attr_id:A.attr__id,nth_child:A.nth_child,nth_of_type:A.nth_of_type,attributes:{}};return Em(A).filter((H=>{var[j]=H;return j.indexOf("attr__")===0})).forEach((H=>{var[j,B]=H;return L.attributes[j]=B})),L}))})(g)))},(n=v[0])!=null&&n.$el_text?{$el_text:(r=v[0])==null?void 0:r.$el_text}:{},h&&o.type==="click"?{$external_click_url:h}:{},y)}}var pd=mn("[ExceptionAutocapture]");function gI(e,t,n){try{if(!(t in e))return()=>{};var r=e[t],o=n(r);return rs(o)&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}var Zre=mn("[TracingHeaders]"),Ks=mn("[Web Vitals]"),vI=9e5,_I="disabled",yI="lazy_loading",md="awaiting_config",Sp="missing_config";mn("[SessionRecording]"),mn("[SessionRecording]");var iw="[SessionRecording]",Zs=mn(iw),Yre=mn("[Heatmaps]");function bI(e){return In(e)&&"clientX"in e&&"clientY"in e&&Fo(e.clientX)&&Fo(e.clientY)}var wI=mn("[Product Tours]"),Wre=["$set_once","$set"],Ys=mn("[SiteApps]"),SI="Error while initializing PostHog app with config id ";function gc(e,t,n){if(xt(e))return!1;switch(n){case"exact":return e===t;case"contains":var r=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(r,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class Qre{constructor(t){this.vn=new ZS,this.fn=(n,r)=>this.pn(n,r)&&this.gn(n,r)&&this.mn(n,r)&&this.yn(n,r),this.pn=(n,r)=>r==null||!r.event||n?.event===r?.event,this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,n;Ue((t=this._instance)==null?void 0:t._addCaptureHook)||(n=this._instance)==null||n._addCaptureHook(((r,o)=>{this.on(r,o)}))}register(t){var n,r;if(!Ue((n=this._instance)==null?void 0:n._addCaptureHook)&&(t.forEach((l=>{var c,d;(c=this._n)==null||c.add(l),(d=l.steps)==null||d.forEach((f=>{var p;(p=this.bn)==null||p.add(f?.event||"")}))})),(r=this._instance)!=null&&r.autocapture)){var o,s=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((d=>{d!=null&&d.selector&&s.add(d?.selector)}))})),(o=this._instance)==null||o.autocapture.setElementSelectors(s)}}on(t,n){var r;n!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(n?.event))&&this._n&&((r=this._n)==null?void 0:r.size)>0&&this._n.forEach((o=>{this.wn(n,o)&&this.vn.emit("actionCaptured",o.name)}))}In(t){this.onAction("actionCaptured",(n=>t(n)))}wn(t,n){if(n?.steps==null)return!1;for(var r of n.steps)if(this.fn(t,r))return!0;return!1}onAction(t,n){return this.vn.on(t,n)}gn(t,n){if(n!=null&&n.url){var r,o=t==null||(r=t.properties)==null?void 0:r.$current_url;if(!o||typeof o!="string"||!gc(o,n.url,n.url_matching||"contains"))return!1}return!0}mn(t,n){return!!this.Cn(t,n)&&!!this.Sn(t,n)&&!!this.xn(t,n)}Cn(t,n){var r;if(n==null||!n.href)return!0;var o=this.kn(t);if(o.length>0)return o.some((c=>gc(c.href,n.href,n.href_matching||"exact")));var s,l=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!l&&gc((s=l.match(/(?::|")href="(.*?)"/))?s[1]:"",n.href,n.href_matching||"exact")}Sn(t,n){var r;if(n==null||!n.text)return!0;var o=this.kn(t);if(o.length>0)return o.some((f=>gc(f.text,n.text,n.text_matching||"exact")||gc(f.$el_text,n.text,n.text_matching||"exact")));var s,l,c,d=(t==null||(r=t.properties)==null?void 0:r.$elements_chain)||"";return!!d&&(s=(function(f){for(var p,h=[],g=/(?::|")text="(.*?)"/g;!xt(p=g.exec(f));)h.includes(p[1])||h.push(p[1]);return h})(d),l=n.text,c=n.text_matching||"exact",s.some((f=>gc(f,l,c))))}xn(t,n){var r,o;if(n==null||!n.selector)return!0;var s=t==null||(r=t.properties)==null?void 0:r.$element_selectors;if(s!=null&&s.includes(n.selector))return!0;var l=(t==null||(o=t.properties)==null?void 0:o.$elements_chain)||"";if(n.selector_regex&&l)try{return new RegExp(n.selector_regex).test(l)}catch{return!1}return!1}kn(t){var n;return(t==null||(n=t.properties)==null?void 0:n.$elements)==null?[]:t?.properties.$elements}yn(t,n){return n==null||!n.properties||n.properties.length===0||a6(n.properties.reduce(((r,o)=>{var s=Pt(o.value)?o.value.map(String):o.value!=null?[String(o.value)]:[];return r[o.key]={values:s,operator:o.operator||"exact"},r}),{}),t?.properties)}}class Xre{constructor(t){this._instance=t,this.Tn=new Map,this.An=new Map,this.En=new Map}Rn(t,n){return!!t&&a6(t.propertyFilters,n?.properties)}Nn(t,n){var r=new Map;return t.forEach((o=>{var s;(s=o.conditions)==null||(s=s[n])==null||(s=s.values)==null||s.forEach((l=>{if(l!=null&&l.name){var c=r.get(l.name)||[];c.push(o.id),r.set(l.name,c)}}))})),r}Mn(t,n,r){var o=(r===cd.Activation?this.Tn:this.An).get(t),s=[];return this.Fn((l=>{s=l.filter((c=>o?.includes(c.id)))})),s.filter((l=>{var c,d=(c=l.conditions)==null||(c=c[r])==null||(c=c.values)==null?void 0:c.find((f=>f.name===t));return this.Rn(d,n)}))}register(t){var n;Ue((n=this._instance)==null?void 0:n._addCaptureHook)||(this.On(t),this.Pn(t))}Pn(t){var n=t.filter((r=>{var o,s;return((o=r.conditions)==null?void 0:o.actions)&&((s=r.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));n.length!==0&&(this.Ln==null&&(this.Ln=new Qre(this._instance),this.Ln.init(),this.Ln.In((r=>{this.onAction(r)}))),n.forEach((r=>{var o,s,l,c,d;r.conditions&&(o=r.conditions)!=null&&o.actions&&(s=r.conditions)!=null&&(s=s.actions)!=null&&s.values&&((l=r.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Ln)==null||c.register(r.conditions.actions.values),(d=r.conditions)==null||(d=d.actions)==null||(d=d.values)==null||d.forEach((f=>{if(f&&f.name){var p=this.En.get(f.name);p&&p.push(r.id),this.En.set(f.name,p||[r.id])}})))})))}On(t){var n,r=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.events)&&((c=s.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),o=t.filter((s=>{var l,c;return((l=s.conditions)==null?void 0:l.cancelEvents)&&((c=s.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));r.length===0&&o.length===0||((n=this._instance)==null||n._addCaptureHook(((s,l)=>{this.onEvent(s,l)})),this.Tn=this.Nn(t,cd.Activation),this.An=this.Nn(t,cd.Cancellation))}onEvent(t,n){var r,o=this.le(),s=this.Dn(),l=this.Bn(),c=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[s])||[];if(l===t&&n&&c.length>0){var d,f;o.info("event matched, removing item from activated items",{event:t,eventPayload:n,existingActivatedItems:c});var p=(n==null||(d=n.properties)==null?void 0:d.$survey_id)||(n==null||(f=n.properties)==null?void 0:f.$product_tour_id);if(p){var h=c.indexOf(p);0>h||(c.splice(h,1),this.jn(c))}}else{if(this.An.has(t)){var g=this.Mn(t,n,cd.Cancellation);g.length>0&&(o.info("cancel event matched, cancelling items",{event:t,itemsToCancel:g.map((y=>y.id))}),g.forEach((y=>{var b=c.indexOf(y.id);0>b||c.splice(b,1),this.$n(y.id)})),this.jn(c))}if(this.Tn.has(t)){o.info("event name matched",{event:t,eventPayload:n,items:this.Tn.get(t)});var v=this.Mn(t,n,cd.Activation);this.jn(c.concat(v.map((y=>y.id))||[]))}}}onAction(t){var n,r=this.Dn(),o=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[r])||[];this.En.has(t)&&this.jn(o.concat(this.En.get(t)||[]))}jn(t){var n=this.le(),r=[...new Set(t)].filter((o=>!this.qn(o)));n.info("updating activated items",{activatedItems:r}),this.Zn(r)}getActivatedIds(){var t,n=this.Dn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[n])||[]}getEventToItemsMap(){return this.Tn}Vn(){return this.Ln}}class Jre extends Xre{constructor(t){super(t)}Dn(){return F1}Bn(){return Id.SHOWN}Fn(t){var n;(n=this._instance)==null||n.getSurveys(t)}$n(t){var n;(n=this._instance)==null||n.cancelPendingSurvey(t)}le(){return Qt}Zn(t){var n;(n=this._instance)==null||(n=n.persistence)==null||n.register({[F1]:t})}qn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var ub="SDK is not enabled or survey functionality is not yet loaded",EI="Disabled. Not loading surveys.",eoe=me!=null&&me.location?pg(me.location.hash,"__posthog")||pg(location.hash,"state"):null,xI="_postHogToolbarParams",RI=mn("[Toolbar]"),Pr=mn("[FeatureFlags]"),qa=mn("[FeatureFlags]",{debugEnabled:!0}),db=`" failed. Feature flags didn't load in time.`,OI=e=>{for(var t={},n=0;e.length>n;n++)t[e[n]]=!0;return t},TI=e=>{var t={};for(var[n,r]of Em(e||{}))r&&(t[n]=r);return t},Xi=mn("[Error tracking]"),CI="Refusing to render web experiment since the viewer is a likely bot",toe={icontains:(e,t)=>!!me&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!me&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!me&&vg(t.href,e),not_regex:(e,t)=>!!me&&!vg(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class xr{get Bt(){return this._instance.config}constructor(t){var n=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(r){r===void 0&&(r=!1),n.getWebExperiments((o=>{xr.Hn("retrieved web experiments from the server"),n.zn=new Map,o.forEach((s=>{if(s.feature_flag_key){var l;n.zn&&(xr.Hn("setting flag key ",s.feature_flag_key," to web experiment ",s),(l=n.zn)==null||l.set(s.feature_flag_key,s));var c=n._instance.getFeatureFlag(s.feature_flag_key);bn(c)&&s.variants[c]&&n.Un(s.name,c,s.variants[c].transforms)}else if(s.variants)for(var d in s.variants){var f=s.variants[d];xr.Yn(f)&&n.Un(s.name,d,f.transforms)}}))}),r)},this._instance=t,this._instance.onFeatureFlags((r=>{this.onFeatureFlags(r)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())xr.Hn(CI);else if(!this.Bt.disable_web_experiments){if(xt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();xr.Hn("applying feature flags",t),t.forEach((n=>{var r;if(this.zn&&(r=this.zn)!=null&&r.has(n)){var o,s=this._instance.getFeatureFlag(n),l=(o=this.zn)==null?void 0:o.get(n);s&&l!=null&&l.variants[s]&&this.Un(l.name,s,l.variants[s].transforms)}}))}}previewWebExperiment(){var t=xr.getWindowLocation();if(t!=null&&t.search){var n=hg(t?.search,"__experiment_id"),r=hg(t?.search,"__experiment_variant");n&&r&&(xr.Hn("previewing web experiments "+n+" && "+r),this.getWebExperiments((o=>{this.Gn(parseInt(n),r,o)}),!1,!0))}}loadIfEnabled(){this.Bt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,n,r){if(this.Bt.disable_web_experiments&&!r)return t([]);var o=this._instance.get_property("$web_experiments");if(o&&!n)return t(o);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Bt.token),method:"GET",callback:s=>t(s.statusCode===200&&s.json&&s.json.experiments||[])})}Gn(t,n,r){var o=r.filter((s=>s.id===t));o&&o.length>0&&(xr.Hn("Previewing web experiment ["+o[0].name+"] with variant ["+n+"]"),this.Un(o[0].name,n,o[0].variants[n].transforms))}static Yn(t){return!xt(t.conditions)&&xr.Wn(t)&&xr.Xn(t)}static Wn(t){var n;if(xt(t.conditions)||xt((n=t.conditions)==null?void 0:n.url))return!0;var r,o,s,l=xr.getWindowLocation();return!!l&&((r=t.conditions)==null||!r.url||toe[(o=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&o!==void 0?o:"icontains"](t.conditions.url,l))}static getWindowLocation(){return me?.location}static Xn(t){var n;if(xt(t.conditions)||xt((n=t.conditions)==null?void 0:n.utm))return!0;var r=qD();if(r.utm_source){var o,s,l,c,d,f,p,h,g=(o=t.conditions)==null||(o=o.utm)==null||!o.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==r.utm_campaign,v=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_source||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_source)==r.utm_source,y=(d=t.conditions)==null||(d=d.utm)==null||!d.utm_medium||((f=t.conditions)==null||(f=f.utm)==null?void 0:f.utm_medium)==r.utm_medium,b=(p=t.conditions)==null||(p=p.utm)==null||!p.utm_term||((h=t.conditions)==null||(h=h.utm)==null?void 0:h.utm_term)==r.utm_term;return g&&y&&b&&v}return!1}static Hn(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;n>o;o++)r[o-1]=arguments[o];$e.info("[WebExperiments] "+t,r)}Un(t,n,r){this._is_bot()?xr.Hn(CI):n!=="control"?r.forEach((o=>{if(o.selector){var s;xr.Hn("applying transform of variant "+n+" for experiment "+t+" ",o);var l=(s=document)==null?void 0:s.querySelectorAll(o.selector);l?.forEach((c=>{var d=c;o.html&&(d.innerHTML=o.html),o.css&&d.setAttribute("style",o.css)}))}})):xr.Hn("Control variants leave the page unmodified.")}_is_bot(){return go&&this._instance?i6(go,this.Bt.custom_blocked_useragents):void 0}}var ko=mn("[Conversations]"),Ga="Conversations not available yet.",av={featureFlags:class{constructor(e){this.Jn=!1,this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.ns=!1,this.ss=!1,this._instance=e,this.featureFlagEventHandlers=[]}get Bt(){return this._instance.config}get ni(){return this._instance.persistence}os(e){return this._instance.get_property(e)}ls(){var e,t;return(e=(t=this.ni)==null?void 0:t.wr(this.Bt.feature_flag_cache_ttl_ms))!==null&&e!==void 0&&e}us(){return!!this.ls()&&(this.ss||this.Qn||(this.ss=!0,Pr.warn("Feature flag cache is stale, triggering refresh..."),this.reloadFeatureFlags()),!0)}hs(){var e,t=(e=this.Bt.evaluation_contexts)!==null&&e!==void 0?e:this.Bt.evaluation_environments;return!this.Bt.evaluation_environments||this.Bt.evaluation_contexts||this.ns||(Pr.warn("evaluation_environments is deprecated. Use evaluation_contexts instead. evaluation_environments will be removed in a future version."),this.ns=!0),t!=null&&t.length?t.filter((n=>{var r=n&&typeof n=="string"&&n.trim().length>0;return r||Pr.error("Invalid evaluation context found:",n,"Expected non-empty string"),r})):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:n}=this._instance,r=(e=(t=n.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(r).length){var o,s,l=(o=(s=n.bootstrap)==null?void 0:s.featureFlagPayloads)!==null&&o!==void 0?o:{},c=Object.keys(r).filter((f=>!!r[f])).reduce(((f,p)=>(f[p]=r[p]||!1,f)),{}),d=Object.keys(l).filter((f=>c[f])).reduce(((f,p)=>(l[p]&&(f[p]=l[p]),f)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:d})}}updateFlags(e,t,n){var r=n!=null&&n.merge?this.getFlagVariants():{},o=n!=null&&n.merge?this.getFlagPayloads():{},s=Ne({},r,e),l=Ne({},o,t),c={};for(var[d,f]of Object.entries(s)){var p=typeof f=="string";c[d]={key:d,enabled:!!p||!!f,variant:p?f:void 0,reason:void 0,metadata:Ue(l?.[d])?void 0:{id:0,version:void 0,description:void 0,payload:l[d]}}}this.receivedFeatureFlags({flags:c})}get hasLoadedFlags(){return this.Kn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os($1),t=this.os(ns),n=this.os(wc);if(!n&&!t)return e||{};var r=On({},e||{}),o=[...new Set([...Object.keys(n||{}),...Object.keys(t||{})])];for(var s of o){var l,c,d=r[s],f=t?.[s],p=Ue(f)?(l=d?.enabled)!==null&&l!==void 0&&l:!!f,h=Ue(f)?d.variant:typeof f=="string"?f:void 0,g=n?.[s],v=Ne({},d,{enabled:p,variant:p?h??d?.variant:void 0});p!==d?.enabled&&(v.original_enabled=d?.enabled),h!==d?.variant&&(v.original_variant=d?.variant),g&&(v.metadata=Ne({},d?.metadata,{payload:g,original_payload:d==null||(c=d.metadata)==null?void 0:c.payload})),r[s]=v}return this.Jn||(Pr.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:n,finalDetails:r}),this.Jn=!0),r}getFlagVariants(){var e=this.os(Ac),t=this.os(ns);if(!t)return e||{};for(var n=On({},e),r=Object.keys(t),o=0;r.length>o;o++)n[r[o]]=t[r[o]];return this.Jn||(Pr.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:n}),this.Jn=!0),n}getFlagPayloads(){var e=this.os(j1),t=this.os(wc);if(!t)return e||{};for(var n=On({},e||{}),r=Object.keys(t),o=0;r.length>o;o++)n[r[o]]=t[r[o]];return this.Jn||(Pr.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:n}),this.Jn=!0),n}reloadFeatureFlags(){this.es||this.Bt.advanced_disable_feature_flags||this.ds||(this._instance.Fi.emit("featureFlagsReloading",!0),this.ds=setTimeout((()=>{this.vs()}),5))}fs(){clearTimeout(this.ds),this.ds=void 0}ensureFlagsLoaded(){this.Kn||this.Qn||this.ds||this.reloadFeatureFlags()}setAnonymousDistinctId(e){this.$anon_distinct_id=e}setReloadingPaused(e){this.es=e}vs(e){var t;if(this.fs(),!this._instance.Fr())if(this.Qn)this.ts=!0;else{var n=this.Bt.token,r=this.os(og),o={token:n,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Ne({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(Ad)||{}),group_properties:this.os(Wa),timezone:QD()};ms(r)||Ue(r)||(o.$device_id=r),(e!=null&&e.disableFlags||this.Bt.advanced_disable_feature_flags)&&(o.disable_flags=!0),this.cs()&&(o.evaluation_contexts=this.hs());var s=this._instance.requestRouter.endpointFor("flags","/flags/?v=2"+(this.Bt.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":""));this.Qn=!0,this._instance._send_request({method:"POST",url:s,data:o,compression:this.Bt.disable_compression?void 0:vi.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback:l=>{var c,d,f,p=!0;if(l.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),p=!1),this.Qn=!1,!o.disable_flags||this.ts){this.rs=!p;var h=[];l.error?l.error instanceof Error?h.push(l.error.name==="AbortError"?"timeout":"connection_error"):h.push("unknown_error"):l.statusCode!==200&&h.push("api_error_"+l.statusCode),(c=l.json)!=null&&c.errorsWhileComputingFlags&&h.push("errors_while_computing_flags");var g,v=!((d=l.json)==null||(d=d.quotaLimited)==null||!d.includes("feature_flags"));v&&h.push("quota_limited"),(f=this.ni)==null||f.register({[V1]:h}),v?Pr.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more."):(o.disable_flags||this.receivedFeatureFlags((g=l.json)!==null&&g!==void 0?g:{},p,{partialResponse:!!this.Bt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var n;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var r=this.getFeatureFlagResult(e,t);return(n=r?.variant)!==null&&n!==void 0?n:r?.enabled}}else Pr.warn('getFeatureFlag for key "'+e+db)}getFeatureFlagDetails(e){return this.getFlagsWithDetails()[e]}getFeatureFlagPayload(e){var t=this.getFeatureFlagResult(e,{send_event:!1});return t?.payload}getFeatureFlagResult(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var n=this.getFlagVariants(),r=e in n,o=n[e],s=this.getFlagPayloads()[e],l=String(o),c=this.os(U1)||void 0,d=this.os(sg)||void 0,f=this.os($d)||{};if(this.Bt.advanced_feature_flags_dedup_per_session){var p,h=this._instance.get_session_id(),g=this.os(B1);h&&h!==g&&(f={},(p=this.ni)==null||p.register({[$d]:f,[B1]:h}))}if((t.send_event||!("send_event"in t))&&(!(e in f)||!f[e].includes(l))){var v,y,b,x,w,E,T,R,O,A;Pt(f[e])?f[e].push(l):f[e]=[l],(v=this.ni)==null||v.register({[$d]:f});var I=this.getFeatureFlagDetails(e),P=[...(y=this.os(V1))!==null&&y!==void 0?y:[]];Ue(o)&&P.push("flag_missing");var L={$feature_flag:e,$feature_flag_response:o,$feature_flag_payload:s||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:d,$feature_flag_bootstrapped_response:((b=this.Bt.bootstrap)==null||(b=b.featureFlags)==null?void 0:b[e])||null,$feature_flag_bootstrapped_payload:((x=this.Bt.bootstrap)==null||(x=x.featureFlagPayloads)==null?void 0:x[e])||null,$used_bootstrap_value:!this.rs};Ue(I==null||(w=I.metadata)==null?void 0:w.version)||(L.$feature_flag_version=I.metadata.version);var H,j=(E=I==null||(T=I.reason)==null?void 0:T.description)!==null&&E!==void 0?E:I==null||(R=I.reason)==null?void 0:R.code;j&&(L.$feature_flag_reason=j),I!=null&&(O=I.metadata)!=null&&O.id&&(L.$feature_flag_id=I.metadata.id),Ue(I?.original_variant)&&Ue(I?.original_enabled)||(L.$feature_flag_original_response=Ue(I.original_variant)?I.original_enabled:I.original_variant),I!=null&&(A=I.metadata)!=null&&A.original_payload&&(L.$feature_flag_original_payload=I==null||(H=I.metadata)==null?void 0:H.original_payload),P.length&&(L.$feature_flag_error=P.join(",")),this._instance.capture("$feature_flag_called",L)}if(r){var B=s;if(!Ue(s))try{B=JSON.parse(s)}catch{}return{key:e,enabled:!!o,variant:typeof o=="string"?o:void 0,payload:B}}}}else Pr.warn('getFeatureFlagResult for key "'+e+db)}getRemoteConfigPayload(e,t){var n=this.Bt.token,r={distinct_id:this._instance.get_distinct_id(),token:n};this.cs()&&(r.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:r,compression:this.Bt.disable_compression?void 0:vi.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback(o){var s,l=(s=o.json)==null?void 0:s.featureFlagPayloads;t(l?.[e]||void 0)}})}isFeatureEnabled(e,t){if(t===void 0&&(t={}),!t.fresh||this.rs){if(this.Kn||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(e,t);return Ue(n)?void 0:!!n}Pr.warn('isFeatureEnabled for key "'+e+db)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,n){if(this.ni){this.Kn=!0;var r=this.getFlagVariants(),o=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(l,c,d,f,p,h){d===void 0&&(d={}),f===void 0&&(f={}),p===void 0&&(p={});var g=(P=>{var L=P.flags;return L?(P.featureFlags=Object.fromEntries(Object.keys(L).map((H=>{var j;return[H,(j=L[H].variant)!==null&&j!==void 0?j:L[H].enabled]}))),P.featureFlagPayloads=Object.fromEntries(Object.keys(L).filter((H=>L[H].enabled)).filter((H=>{var j;return(j=L[H].metadata)==null?void 0:j.payload})).map((H=>{var j;return[H,(j=L[H].metadata)==null?void 0:j.payload]})))):Pr.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),P})(l),v=g.flags,y=g.featureFlags,b=g.featureFlagPayloads;if(y){var x=l.requestId,w=l.evaluatedAt;if(Pt(y)){Pr.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var E={};if(y)for(var T=0;y.length>T;T++)E[y[T]]=!0;c&&c.register({[wm]:y,[Ac]:E})}else{var R=y,O=b,A=v;if(h!=null&&h.partialResponse)R=Ne({},d,R),O=Ne({},f,O),A=Ne({},p,A);else if(l.errorsWhileComputingFlags)if(v){var I=new Set(Object.keys(v).filter((P=>{var L;return!((L=v[P])!=null&&L.failed)})));R=Ne({},d,Object.fromEntries(Object.entries(R).filter((P=>{var[L]=P;return I.has(L)})))),O=Ne({},f,Object.fromEntries(Object.entries(O||{}).filter((P=>{var[L]=P;return I.has(L)})))),A=Ne({},p,Object.fromEntries(Object.entries(A||{}).filter((P=>{var[L]=P;return I.has(L)}))))}else R=Ne({},d,R),O=Ne({},f,O),A=Ne({},p,A);c&&c.register(Ne({[wm]:Object.keys(TI(R)),[Ac]:R||{},[j1]:O||{},[$1]:A||{}},x?{[U1]:x}:{},w?{[sg]:w}:{}))}}})(e,this.ni,r,o,s,n),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),Pr.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return Pr.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(ns),this.ni.unregister(wc),this.ps(),qa.info("All overrides cleared");if(Pt(e)){var t=OI(e);return this.ni.register({[ns]:t}),this.ps(),qa.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var n,r=e;if(this.Jn=!!((n=r.suppressWarning)!==null&&n!==void 0&&n),"flags"in r){if(r.flags===!1)this.ni.unregister(ns),qa.info("Flag overrides cleared");else if(r.flags){if(Pt(r.flags)){var o=OI(r.flags);this.ni.register({[ns]:o})}else this.ni.register({[ns]:r.flags});qa.info("Flag overrides set",{flags:r.flags})}}return"payloads"in r&&(r.payloads===!1?(this.ni.unregister(wc),qa.info("Payload overrides cleared")):r.payloads&&(this.ni.register({[wc]:r.payloads}),qa.info("Payload overrides set",{payloads:r.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[ns]:e}),this.ps(),qa.info("Flag overrides set",{flags:e});Pr.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Kn){var{flags:t,flagVariants:n}=this.gs();e(t,n)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,n){var r,o=(this.os(Cd)||[]).find((d=>d.flagKey===e)),s={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:s};o&&(l.$early_access_feature_name=o.name),n&&(l.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(s,!1);var c=Ne({},this.getFlagVariants(),{[e]:t});(r=this.ni)==null||r.register({[wm]:Object.keys(TI(c)),[Ac]:c}),this.ps()}getEarlyAccessFeatures(e,t,n){t===void 0&&(t=!1);var r=this.os(Cd),o=n?"&"+n.map((s=>"stage="+s)).join("&"):"";if(r&&!t)return e(r);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Bt.token+o),method:"GET",callback:s=>{var l,c;if(s.json){var d=s.json.earlyAccessFeatures;return(l=this.ni)==null||l.unregister(Cd),(c=this.ni)==null||c.register({[Cd]:d}),e(d)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((n=>t[n])),flagVariants:Object.keys(t).filter((n=>t[n])).reduce(((n,r)=>(n[r]=t[r],n)),{})}}ps(e){var{flags:t,flagVariants:n}=this.gs();this.featureFlagEventHandlers.forEach((r=>r(t,n,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Ad)||{},r=e?.$set||(e!=null&&e.$set_once?{}:e),o=e?.$set_once,s={};if(o)for(var l in o)({}).hasOwnProperty.call(o,l)&&(l in n||(s[l]=o[l]));this._instance.register({[Ad]:Ne({},n,s,r)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(Ad)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var n=this.os(Wa)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((r=>{n[r]=Ne({},n[r],e[r]),delete e[r]})),this._instance.register({[Wa]:Ne({},n,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(Wa)||{};this._instance.register({[Wa]:Ne({},t,{[e]:{}})})}else this._instance.unregister(Wa)}reset(){this.Kn=!1,this.Qn=!1,this.es=!1,this.ts=!1,this.rs=!1,this.$anon_distinct_id=void 0,this.fs(),this.Jn=!1}}},noe={sessionRecording:class{get Bt(){return this._instance.config}get ni(){return this._instance.persistence}get started(){var e;return!((e=this.ys)==null||!e.isStarted)}get status(){var e,t;return this.bs===md||this.bs===Sp?this.bs:(e=(t=this.ys)==null?void 0:t.status)!==null&&e!==void 0?e:this.bs}constructor(e){if(this._forceAllowLocalhostNetworkCapture=!1,this.bs=_I,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw Zs.error("started without valid sessionManager"),new Error(iw+" started without valid sessionManager. This is a bug.");if(this.Bt.cookieless_mode===is)throw new Error(iw+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(Td))==null||!e.enabled),n=!this.Bt.disable_session_recording,r=this.Bt.disable_session_recording||this._instance.consent.isOptedOut();return me&&t&&n&&!r}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var n=!Ue(Object.assign)&&!Ue(Array.from);this.ws&&n?(this.Is(e),Zs.info("starting")):(this.bs=_I,this.stopRecording())}}Is(e){var t,n,r;this.ws&&(this.bs!==md&&this.bs!==Sp&&(this.bs=yI),We!=null&&(t=We.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(n=We.__PosthogExtensions__)!=null&&n.initSessionRecording?this.Cs(e):(r=We.__PosthogExtensions__)==null||r.loadExternalDependency==null||r.loadExternalDependency(this._instance,this.Ss,(o=>{if(o)return Zs.error("could not load recorder",o);this.Cs(e)})))}stopRecording(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.stop()}xs(){var e,t;(e=this._s)==null||e.call(this),this._s=void 0,(t=this.ys)==null||t.discard()}ks(){var e;(e=this.ni)==null||e.unregister(VS)}Ts(e,t){if(xt(e))return null;var n,r=Fo(e)?e:parseFloat(e);return typeof(n=r)!="number"||!Number.isFinite(n)||0>n||n>1?(Zs.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):r}As(e){if(this.ni){var t,n,r=this.ni,o=()=>{var s,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Ts((s=this.Bt.session_recording)==null?void 0:s.sampleRate,"session_recording.sampleRate"),d=this.Ts(l?.sampleRate,"remote config sampleRate"),f=c??d;xt(f)&&this.ks();var p=l?.minimumDurationMilliseconds;r.register({[Td]:Ne({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:Ne({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:f,minimumDurationMilliseconds:Ue(p)?null:p,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};o(),(t=this._s)==null||t.call(this),this._s=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(o)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.As(e),void this.xs()):(this.As(e),void this.startIfEnabledOrStop()):(this.bs===md&&(this.bs=Sp,Zs.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var n;t===void 0&&(t="log"),(n=this.ys)!=null&&n.log?this.ys.log(e,t):Zs.warn("log called before recorder was ready")}get Ss(){var e,t,n=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(Td);return(n==null||(t=n.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Es(){var e,t=this._instance.get_property(Td);if(!t)return!1;var n=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-n}Cs(e){var t,n;if((t=We.__PosthogExtensions__)==null||!t.initSessionRecording)return Zs.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[zD]:!0});if(this.ys||(this.ys=(n=We.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Es())return this.bs===Sp||this.bs===md?void 0:(this.bs=md,Zs.info("persisted remote config is stale, requesting fresh config before starting"),void new XD(this._instance).load());this.bs=yI,this.ys.start(e)}onRRwebEmit(e){var t;(t=this.ys)==null||t.onRRwebEmit==null||t.onRRwebEmit(e)}overrideLinkedFlag(){var e,t;this.ys||(t=this.ni)==null||t.register({[kD]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[ND]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,n;this.ys||(n=this.ni)==null||n.register({[e==="url"?DD:LD]:!0}),(t=this.ys)==null||t.overrideTrigger(e)}get sdkDebugProperties(){var e;return((e=this.ys)==null?void 0:e.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(e,t){var n;return!((n=this.ys)==null||!n.tryAddCustomEvent(e,t))}}},roe={autocapture:class{constructor(e){this.Rs=!1,this.Ns=null,this.Ms=!1,this.instance=e,this.rageclicks=new pI(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get Bt(){var e,t,n=In(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(e=n.url_allowlist)==null?void 0:e.map((r=>new RegExp(r))),n.url_ignorelist=(t=n.url_ignorelist)==null?void 0:t.map((r=>new RegExp(r))),n}Os(){if(this.isBrowserSupported()){if(me&&Le){var e=n=>{n=n||me?.event;try{this.Ps(n)}catch(r){mI.error("Failed to capture event",r)}};if(Vn(Le,"submit",e,{capture:!0}),Vn(Le,"change",e,{capture:!0}),Vn(Le,"click",e,{capture:!0}),this.Bt.capture_copied_text){var t=n=>{this.Ps(n=n||me?.event,lb)};Vn(Le,"copy",t,{capture:!0}),Vn(Le,"cut",t,{capture:!0})}}}else mI.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.Rs&&(this.Os(),this.Rs=!0)}onRemoteConfig(e){e.elementsChainAsString&&(this.Ms=e.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[A1]:!!e.autocapture_opt_out}),this.Ns=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,n=[];return(t=this.Fs)==null||t.forEach((r=>{var o=Le?.querySelectorAll(r);o?.forEach((s=>{e===s&&n.push(r)}))})),n}get isEnabled(){var e,t,n=(e=this.instance.persistence)==null?void 0:e.props[A1];if(ms(this.Ns)&&!Ei(n)&&!this.instance.Fr())return!1;var r=(t=this.Ns)!==null&&t!==void 0?t:!!n;return!!this.instance.config.autocapture&&!r}Ps(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var n,r=lI(e);u6(r)&&(r=r.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&(function(h,g){if(!me||rw(h))return!1;var v,y,b;if(Ei(g)?(v=!!g&&uI,y=void 0):(v=(b=g?.css_selector_ignorelist)!==null&&b!==void 0?b:uI,y=g?.content_ignorelist),v===!1)return!1;var{targetElementList:x}=dI(h,!1);return!(function(w,E){if(w===!1||Ue(w))return!1;var T;if(w===!0)T=zre;else{if(!Pt(w))return!1;if(w.length>10)return $e.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;T=w.map((R=>R.toLowerCase()))}return E.some((R=>{var{safeText:O,ariaLabel:A}=R;return T.some((I=>O.includes(I)||A.includes(I)))}))})(y,x.map((w=>{var E;return{safeText:lf(w).toLowerCase(),ariaLabel:((E=w.getAttribute("aria-label"))==null?void 0:E.toLowerCase().trim())||""}})))&&!cI(x,v)})(r,this.instance.config.rageclick)&&this.Ps(e,"$rageclick");var o=t===lb;if(r&&(function(h,g,v,y,b){var x,w,E,T;if(v===void 0&&(v=void 0),!me||rw(h)||(x=v)!=null&&x.url_allowlist&&!aI(v.url_allowlist)||(w=v)!=null&&w.url_ignorelist&&aI(v.url_ignorelist))return!1;if((E=v)!=null&&E.dom_event_allowlist){var R=v.dom_event_allowlist;if(R&&!R.some((L=>g.type===L)))return!1}var{parentIsUsefulElement:O,targetElementList:A}=dI(h,y);if(!(function(L,H){var j=H?.element_allowlist;if(Ue(j))return!0;var B,z=function(oe){if(j.some((q=>oe.tagName.toLowerCase()===q)))return{v:!0}};for(var K of L)if(B=z(K))return B.v;return!1})(A,v)||!cI(A,(T=v)==null?void 0:T.css_selector_allowlist))return!1;var I=me.getComputedStyle(h);if(I&&I.getPropertyValue("cursor")==="pointer"&&g.type==="click")return!0;var P=h.tagName.toLowerCase();switch(P){case"html":return!1;case"form":return(b||["submit"]).indexOf(g.type)>=0;case"input":case"select":case"textarea":return(b||["change","click"]).indexOf(g.type)>=0;default:return O?(b||["click"]).indexOf(g.type)>=0:(b||["click"]).indexOf(g.type)>=0&&(WS.indexOf(P)>-1||h.getAttribute("contenteditable")==="true")}})(r,e,this.Bt,o,o?["copy","cut"]:void 0)){var{props:s,explicitNoCapture:l}=Kre(r,{e,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.Bt.element_attribute_ignorelist,elementsChainAsString:this.Ms});if(l)return!1;var c=this.getElementSelectors(r);if(c&&c.length>0&&(s.$element_selectors=c),t===lb){var d,f=f6(me==null||(d=me.getSelection())==null?void 0:d.toString()),p=e.type||"clipboard";if(!f)return!1;s.$selected_content=f,s.$copy_type=p}return this.instance.capture(t,s),!0}}}isBrowserSupported(){return rs(Le?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ls=(me==null||(t=me.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&($e.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,$e.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(me&&me.history){var n=this;(e=me.history.pushState)!=null&&e.__posthog_wrapped__||gI(me.history,"pushState",(r=>function(o,s,l){r.call(this,o,s,l),n.Bs("pushState")})),(t=me.history.replaceState)!=null&&t.__posthog_wrapped__||gI(me.history,"replaceState",(r=>function(o,s,l){r.call(this,o,s,l),n.Bs("replaceState")})),this.js()}}Bs(e){try{var t,n=me==null||(t=me.location)==null?void 0:t.pathname;if(!n)return;n!==this.Ls&&this.isEnabled&&this._instance.capture(Sc,{navigation_type:e}),this.Ls=n}catch(r){$e.error("Error capturing "+e+" pageview",r)}}js(){if(!this.Ds){var e=()=>{this.Bs("popstate")};Vn(me,"popstate",e),this.Ds=()=>{me&&me.removeEventListener("popstate",e)}}}},heatmaps:class{get Bt(){return this.instance.config}constructor(e){var t;this.$s=!1,this.Rs=!1,this.qs=null,this.instance=e,this.$s=!((t=this.instance.persistence)==null||!t.props[I1]),this.rageclicks=new pI(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return In(this.Bt.capture_heatmaps)&&this.Bt.capture_heatmaps.flush_interval_milliseconds&&(e=this.Bt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return xt(this.Bt.capture_heatmaps)?xt(this.Bt.enable_heatmaps)?this.$s:this.Bt.enable_heatmaps:this.Bt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;Yre.info("starting..."),this.Zs(),this.Ft()}else{var e;clearInterval((e=this.qs)!==null&&e!==void 0?e:void 0),this.Vs(),this.getAndClearBuffer()}}onRemoteConfig(e){if("heatmaps"in e){var t=!!e.heatmaps;this.instance.persistence&&this.instance.persistence.register({[I1]:t}),this.$s=t,this.startIfEnabled()}}getAndClearBuffer(){var e=this.T;return this.T=void 0,e}Hs(e){this.Tt(e.originalEvent,"deadclick")}Ft(){this.qs&&clearInterval(this.qs),this.qs=Le?.visibilityState==="visible"?setInterval(this.Yr.bind(this),this.flushIntervalMilliseconds):null}Zs(){me&&Le&&(this.zs=this.Yr.bind(this),Vn(me,ug,this.zs),this.Us=e=>this.Tt(e||me?.event),Vn(Le,"click",this.Us,{capture:!0}),this.Ys=e=>this.Gs(e||me?.event),Vn(Le,"mousemove",this.Ys,{capture:!0}),this.Ws=new FA(this.instance,lre,this.Hs.bind(this)),this.Ws.startIfEnabledOrStop(),this.Xs=this.Ft.bind(this),Vn(Le,cg,this.Xs),this.Rs=!0)}Vs(){var e;me&&Le&&(this.zs&&me.removeEventListener(ug,this.zs),this.Us&&Le.removeEventListener("click",this.Us,{capture:!0}),this.Ys&&Le.removeEventListener("mousemove",this.Ys,{capture:!0}),this.Xs&&Le.removeEventListener(cg,this.Xs),clearTimeout(this.Js),(e=this.Ws)==null||e.stop(),this.Rs=!1)}Ks(e,t){var n=this.instance.scrollManager.scrollY(),r=this.instance.scrollManager.scrollX(),o=this.instance.scrollManager.scrollElement(),s=(function(l,c,d){for(var f=l;f&&sv(f)&&!ca(f,"body");){if(f===d)return!1;if(Et(c,me?.getComputedStyle(f).position))return!0;f=h6(f)}return!1})(lI(e),["fixed","sticky"],o);return{x:e.clientX+(s?0:r),y:e.clientY+(s?0:n),target_fixed:s,type:t}}Tt(e,t){var n;if(t===void 0&&(t="click"),!sI(e.target)&&bI(e)){var r=this.Ks(e,t);(n=this.rageclicks)!=null&&n.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Qs(Ne({},r,{type:"rageclick"})),this.Qs(r)}}Gs(e){!sI(e.target)&&bI(e)&&(clearTimeout(this.Js),this.Js=setTimeout((()=>{this.Qs(this.Ks(e,"mousemove"))}),500))}Qs(e){if(me){var t=me.location.href,n=this.Bt.custom_personal_data_properties,r=this.Bt.mask_personal_data_properties?[...Yc,...n||[]]:[],o=sf(t,r,af);this.T=this.T||{},this.T[o]||(this.T[o]=[]),this.T[o].push(e)}}Yr(){this.T&&!Cc(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:FA,webVitalsAutocapture:class{constructor(e){var t;this.$s=!1,this.Rs=!1,this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.eo=()=>{clearTimeout(this.ro),this.T.metrics.length!==0&&(this._instance.capture("$web_vitals",this.T.metrics.reduce(((n,r)=>Ne({},n,{["$web_vitals_"+r.name+"_event"]:Ne({},r),["$web_vitals_"+r.name+"_value"]:r.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=n=>{var r,o=(r=this._instance.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0);if(Ue(o))Ks.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var s=this.io();Ue(s)||(xt(n?.name)||xt(n?.value)?Ks.error("Invalid metric received",n):!this.no||this.no>n.value?(this.T.url!==s&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),Ue(this.T.url)&&(this.T.url=s),this.T.firstMetricTimestamp=Ue(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.T.metrics.push(Ne({},n,{$current_url:s,$session_id:o.sessionId,$window_id:o.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.eo()):Ks.error("Ignoring metric with value >= "+this.no,n))}},this.so=()=>{if(!this.Rs){var n,r,o,s,l=We.__PosthogExtensions__;Ue(l)||Ue(l.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:r,onFCP:o,onINP:s}=l.postHogWebVitalsCallbacks),n&&r&&o&&s?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&r(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&o(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&s(this.ht.bind(this)),this.Rs=!0):Ks.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.$s=!((t=this._instance.persistence)==null||!t.props[k1]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,n=In(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return xt(n)?((t=this._instance.persistence)==null?void 0:t.props[L1])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(In(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=In(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=In(this.oo)&&Fo(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:vI;return e>0&&6e4>=e?vI:e}get isEnabled(){var e=pr?.protocol;if(e!=="http:"&&e!=="https:")return Ks.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=In(this.oo)?this.oo.web_vitals:Ei(this.oo)?this.oo:void 0;return Ei(t)?t:this.$s}startIfEnabled(){this.isEnabled&&!this.Rs&&(Ks.info("enabled, starting..."),this.ur(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=In(e.capturePerformance)&&!!e.capturePerformance.web_vitals,n=In(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[k1]:t}),this._instance.persistence.register({[L1]:n})),this.$s=t,this.startIfEnabled()}}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(r=>{r?Ks.error("failed to load script",r):e()}))}io(){var e=me?me.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,n=this._instance.config.mask_personal_data_properties?[...Yc,...t||[]]:[];return sf(e,n,af)}Ks.error("Could not determine current URL")}}},ooe={exceptionObserver:class{constructor(e){var t,n,r;this.so=()=>{var o;if(me&&this.isEnabled&&(o=We.__PosthogExtensions__)!=null&&o.errorWrappingFunctions){var s=We.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=We.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=We.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.Bt.capture_unhandled_errors&&(this.ao=s(this.captureException.bind(this))),!this.lo&&this.Bt.capture_unhandled_rejections&&(this.lo=l(this.captureException.bind(this))),!this.uo&&this.Bt.capture_console_errors&&(this.uo=c(this.captureException.bind(this)))}catch(d){pd.error("failed to start",d),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[M1]),this.do=new vne({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(r=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&r!==void 0?r:10,refillInterval:1e4,Gt:pd}),this.Bt=this.vo(),this.startIfEnabledOrStop()}vo(){var e=this._instance.config.capture_exceptions,t={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return In(e)?t=Ne({},t,e):(Ue(e)?this.co:e)&&(t=Ne({},t,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),t}get isEnabled(){return this.Bt.capture_console_errors||this.Bt.capture_unhandled_errors||this.Bt.capture_unhandled_rejections}startIfEnabledOrStop(){this.isEnabled?(pd.info("enabled"),this.ho(),this.ur(this.so)):this.ho()}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(r=>{if(r)return pd.error("failed to load script",r);e()}))}ho(){var e,t,n;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.lo)==null||t.call(this),this.lo=void 0,(n=this.uo)==null||n.call(this),this.uo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[M1]:this.co}),this.Bt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.Bt=this.vo()}captureException(e){var t,n,r,o=(t=e==null||(n=e.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(o)?pd.info("Skipping exception capture because of client rate limiting.",{exception:o}):(r=this._instance.exceptions)==null||r.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,n;this.fo=[],this.po=new Ine([new jne,new Kne,new zne,new Une,new qne,new Hne,new Bne,new Gne],(function(r){for(var o=arguments.length,s=new Array(o>1?o-1:0),l=1;o>l;l++)s[l-1]=arguments[l];return function(c,d){d===void 0&&(d=0);for(var f=[],p=c.split(`
156
- `),h=d;p.length>h;h++){var g=p[h];if(1024>=g.length){var v=$A.test(g)?g.replace($A,"$1"):g;if(!v.match(/\S*Error: /)){for(var y of s){var b=y(v,r);if(b){f.push(b);break}}if(f.length>=50)break}}}return(function(x){if(!x.length)return[];var w=Array.from(x);return w.reverse(),w.slice(0,50).map((E=>{return Ne({},E,{filename:E.filename||(T=w,T[T.length-1]||{}).filename,function:E.function||Zc});var T}))})(f)}})("web:javascript",kne,$ne)),this._instance=e,this.fo=(t=(n=this._instance.persistence)==null?void 0:n.get_property(P1))!==null&&t!==void 0?t:[],this.mo=rg(this.yo()),this.bo=new Yne(this.mo)}onConfigChange(){this.mo=rg(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var o=(t=(n=e.errorTracking)==null?void 0:n.suppressionRules)!==null&&t!==void 0?t:[],s=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.fo=o,this._instance.persistence&&this._instance.persistence.register({[P1]:this.fo,[N1]:s})}}get _o(){var e,t=!!this._instance.get_property(N1),n=this._instance.config.error_tracking.captureExtensionExceptions;return(e=n??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!bn(e)||e.trim().length===0)return void Xi.warn("Ignoring exception step because message must be a non-empty string");var n=this.wo(t),{sanitizedProperties:r,droppedKeys:o}=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(s).reduce(((c,d)=>Zne.has(d)?(l.push(d),c):(c[d]=s[d],c)),{}),droppedKeys:l}})(n);o.length>0&&Xi.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this.bo.add(Ne({[tg]:e,[ng]:new Date().toISOString()},r))}catch(s){Xi.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Io(t)){if(this.Co(t))return this.So("Exception dropped: matched a suppression rule"),void Xi.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.xo(t))return this.So("Exception dropped: thrown by a browser extension"),void Xi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ko(t))return this.So("Exception dropped: thrown by the PostHog SDK"),void Xi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.mo.enabled&&xt(e.$exception_steps)?this.To(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return r&&this.bo.clear(),r}catch(o){return Xi.error("Failed to capture exception event. Dropping this exception.",o),void this.bo.clear()}}catch(o){return void Xi.error("Failed to process exception event. Ignoring this exception.",o)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Ne({},e,{$exception_steps:t})}catch(n){return Xi.error("Failed to read buffered exception steps. Capturing exception without steps.",n),e}}So(e){this.mo.enabled&&this.bo.add({[tg]:e,[ng]:new Date().toISOString()})}wo(e){return In(e)?Ne({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Co(e){if(e.length===0)return!1;var t=e.reduce(((n,r)=>{var{type:o,value:s}=r;return bn(o)&&o.length>0&&n.$exception_types.push(o),bn(s)&&s.length>0&&n.$exception_values.push(s),n}),{$exception_types:[],$exception_values:[]});return this.fo.some((n=>{var r=n.values.map((o=>{var s,l=s6[o.operator],c=Pt(o.value)?o.value:[o.value],d=(s=t[o.key])!==null&&s!==void 0?s:[];return c.length>0&&l(c,d)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}xo(e){return e.flatMap((t=>{var n,r;return(n=(r=t.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,n,r,o,s=(t=(n=e[0].stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[],l=s[s.length-1];return(r=l==null||(o=l.filename)==null?void 0:o.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}Io(e){return!xt(e)&&Pt(e)}}},ioe=Ne({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Ao=null,this.Eo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[D1]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(D1)||this.ur((()=>this.Ro()))}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?wI.error("Could not load product tours script",r):e()}))}Ro(){var e;!this.Ao&&(e=We.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=We.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Pt(this.Eo)||t){var n=this.ni;if(n){var r=n.props[Sm];if(Pt(r)&&!t)return this.Eo=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:o=>{var s=o.statusCode;if(s!==200||!o.json){var l="Product Tours API could not be loaded, status: "+s;return wI.error(l),void e([],{isLoaded:!1,error:l})}var c=Pt(o.json.product_tours)?o.json.product_tours:[];this.Eo=c,n&&n.register({[Sm]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){xt(this.Ao)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Ao.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Ao)==null||t.showTourById(e)}previewTour(e){this.Ao?this.Ao.previewTour(e):this.ur((()=>{var t;this.Ro(),(t=this.Ao)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Ao)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Ao)==null||e.nextStep()}previousStep(){var e;(e=this.Ao)==null||e.previousStep()}clearCache(){var e;this.Eo=null,(e=this.ni)==null||e.unregister(Sm)}resetTour(e){var t;(t=this.Ao)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Ao)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Ao)==null||t.cancelPendingTour(e)}}},av),soe={siteApps:class{constructor(e){this._instance=e,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Mo(e,t){if(t){var n=this.globalsForEvent(t);this.No.push(n),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=We._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Mo.bind(this));this.Fo=()=>{e(),this.No=[],this.Fo=void 0}}}globalsForEvent(e){var t,n,r,o,s,l,c;if(!e)throw new Error("Event payload is required");var d={},f=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var[h,g]of Object.entries(p))d[h]={id:f[h],type:h,properties:g};var{$set_once:v,$set:y}=e;return{event:Ne({},aD(e,Wre),{properties:Ne({},e.properties,y?{$set:Ne({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},y)}:{},v?{$set_once:Ne({},(r=(o=e.properties)==null?void 0:o.$set_once)!==null&&r!==void 0?r:{},v)}:{}),elements_chain:(s=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:d}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var l;!t.errored&&this.No.length&&(Ys.info("Processing "+this.No.length+" events for site app with id "+e.id),this.No.forEach((c=>t.processEvent==null?void 0:t.processEvent(c))),t.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Fo)==null||l.call(this))},r=!1,o=l=>{t.errored=!l,t.loaded=!0,Ys.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),r&&n()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(l){o(l)}});s&&(t.processEvent=s),r=!0}catch(l){Ys.error(SI+e.id,l),o(!1)}if(r&&t.loaded)try{n()}catch(l){Ys.error("Error while processing buffered events PostHog app with config id "+e.id,l),t.errored=!0}}Oo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(t)}catch(r){Ys.error("Error while processing event "+e.event+" for site app "+n.id,r)}}}onRemoteConfig(e){var t,n,r,o=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(d=>this.Po(d)))):void Ys.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Fo)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(d){var f;We["__$$ph_site_app_"+d]=o._instance,(f=We.__PosthogExtensions__)==null||f.loadSiteApp==null||f.loadSiteApp(o._instance,c,(p=>{if(p)return Ys.error(SI+d,p)}))};for(var{id:l,url:c}of e.siteApps)s(l)}else Ys.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},aoe={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,n,r=this.Bo()||[];Ue(this.Lo)&&((t=We.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(r,this._instance.get_distinct_id(),this._instance.sessionManager)),Ue(this.Do)&&((n=We.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(r,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return Zre.error("failed to load script",r);e()}))}Bo(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Bo()?this.ur(this.so):((e=this.Lo)==null||e.call(this),(t=this.Do)==null||t.call(this),this.Lo=void 0,this.Do=void 0)}}},loe=Ne({surveys:class{get Bt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.$o=!1,this.qo=[],this.Zo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Bt.disable_surveys){var t=e.surveys;if(xt(t))return Qt.warn("Flags not loaded yet. Not loading surveys.");var n=Pt(t);this.jo=n?t.length>0:t,Qt.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(n!=null&&n.startsWith(tw)||n!=null&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach((r=>localStorage.removeItem(r)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)Qt.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)Qt.info(EI);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())Qt.info("Not loading surveys in cookieless mode without consent.");else{var e=We?.__PosthogExtensions__;if(e){if(!Ue(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var n=e.generateSurveys;if(n)return void this.Vo(n,t);var r=e.loadExternalDependency;if(!r)return void this.Ho(HS);r(this._instance,"surveys",(o=>{o||!e.generateSurveys?this.Ho("Could not load surveys script",o):this.Vo(e.generateSurveys,t)}))}catch(o){throw this.Ho("Error initializing surveys",o),o}finally{this.$o=!1}}}else Qt.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new Jre(this._instance),Qt.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){Qt.error(e,t),this.zo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.qo.push(e),this._surveyManager&&this.zo({isLoaded:!0}),()=>{this.qo=this.qo.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Bt.disable_surveys)return Qt.info(EI),e([]);var n,r=this._instance.get_property(z1);if(r&&!t)return e(r,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((o=>{var{surveys:s,context:l}=o;return e(s,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((o=>{n=o}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Bt.token),method:"GET",timeout:this.Bt.surveys_request_timeout_ms,callback:o=>{var s;this.Zo=null;var l=o.statusCode;if(l!==200||!o.json){var c="Surveys API could not be loaded, status: "+l;Qt.error(c);var d={isLoaded:!1,error:c};return e([],d),void(n==null||n({surveys:[],context:d}))}var f,p=o.json.surveys||[],h=p.filter((v=>(function(y){return!(!y.start_date||y.end_date)})(v)&&((function(y){var b;return!((b=y.conditions)==null||(b=b.events)==null||(b=b.values)==null||!b.length)})(v)||(function(y){var b;return!((b=y.conditions)==null||(b=b.actions)==null||(b=b.values)==null||!b.length)})(v))));h.length>0&&((f=this._surveyEventReceiver)==null||f.register(h)),(s=this._instance.persistence)==null||s.register({[z1]:p});var g={isLoaded:!0};e(p,g),n?.({surveys:p,context:g})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(n){Qt.error("Error in survey callback",n)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!xt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Qt.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((n=>{var r;t=(r=n.find((o=>o.id===e)))!==null&&r!==void 0?r:null})),t}Yo(e){if(xt(this._surveyManager))return{eligible:!1,reason:ub};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(xt(this._surveyManager))return Qt.warn("init was not called"),{visible:!1,disabledReason:ub};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return xt(this._surveyManager)?(Qt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:ub})):new Promise((n=>{this.getSurveys((r=>{var o,s=(o=r.find((c=>c.id===e)))!==null&&o!==void 0?o:null;if(s){var l=this.Yo(s);n({visible:l.eligible,disabledReason:l.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,n){var r;if(xt(this._surveyManager))Qt.warn("init was not called");else{var o=typeof e=="string"?this.Uo(e):e;if(o!=null&&o.id)if(Nre.includes(o.type)){var s=Le?.querySelector(t);if(s)return(r=o.appearance)!=null&&r.surveyPopupDelaySeconds?(Qt.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Qt.info("Rendering survey "+o.id+" with delay of "+((l=o.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(o,s,n),Qt.info("Survey "+o.id+" rendered")}),1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,s,n);Qt.warn("Survey element not found")}else Qt.warn("Surveys of type "+o.type+" cannot be rendered in the app");else Qt.warn("Survey not found")}}displaySurvey(e,t){var n;if(xt(this._surveyManager))Qt.warn("init was not called");else{var r=this.Uo(e);if(r){var o=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(o=Ne({},r,{appearance:Ne({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Y1.Popover&&t.initialResponses&&Qt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(r);if(!s.visible)return void Qt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==Y1.Inline?this._surveyManager.handlePopoverSurvey(o,t):this.renderSurvey(o,t.selector,t.properties)}else Qt.warn("Survey not found")}}cancelPendingSurvey(e){xt(this._surveyManager)?Qt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},av),coe={toolbar:class{constructor(e){this.instance=e}Go(e){We.ph_toolbar_state=e}Wo(){var e;return(e=We.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),FD(this.instance.config)||!me||!Le)return!1;e=e??me.location,n=n??me.history;try{if(!t){try{me.localStorage.setItem("test","test"),me.localStorage.removeItem("test")}catch{return!1}t=me?.localStorage}var r,o=eoe||pg(e.hash,"__posthog")||pg(e.hash,"state"),s=o?UA((()=>JSON.parse(atob(decodeURIComponent(o)))))||UA((()=>JSON.parse(decodeURIComponent(o)))):null;return s&&s.action==="ph_authorize"?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(xI)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Xo(e){var t=We.ph_load_toolbar||We.ph_load_editor;!xt(t)&&rs(t)?t(e,this.instance):RI.warn("No toolbar load function found")}loadToolbar(e){var t=!(Le==null||!Le.getElementById($D));if(!me||t)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=Ne({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(me.localStorage.setItem(xI,JSON.stringify(Ne({},r,{source:void 0}))),this.Wo()===2)this.Xo(r);else if(this.Wo()===0){var o;this.Go(1),(o=We.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return RI.error("[Toolbar] Failed to load",s),void this.Go(0);this.Go(2),this.Xo(r)})),Vn(me,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(r)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},uoe=Ne({experiments:xr},av),doe={conversations:class{constructor(e){this.Ko=void 0,this._conversationsManager=null,this.Qo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;xt(t)||(Ei(t)?this.Ko=t:(this.Ko=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Ko=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Qo||this._instance.config.disable_conversations||FD(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=We?.__PosthogExtensions__;if(e&&!Ue(this.Ko)&&this.Ko)if(this.ea&&this.ea.token){this.Qo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Qo=!1);var n=e.loadExternalDependency;if(!n)return void this.ra(HS);n(this._instance,"conversations",(r=>{r||!e.initConversations?this.ra("Could not load conversations script",r):this.ta(e.initConversations),this.Qo=!1}))}catch(r){this.ra("Error initializing conversations",r),this.Qo=!1}}else ko.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),ko.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else ko.error("Cannot complete initialization: remote config is null")}ra(e,t){ko.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():ko.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!ms(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,n){var r=this;return Lo((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(ko.warn(Ga),null)}))()}getMessages(e,t){var n=this;return Lo((function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(ko.warn(Ga),null)}))()}markAsRead(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(ko.warn(Ga),null)}))()}getTickets(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(ko.warn(Ga),null)}))()}requestRestoreLink(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(ko.warn(Ga),null)}))()}restoreFromToken(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(ko.warn(Ga),null)}))()}restoreFromUrlToken(){var e=this;return Lo((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(ko.warn(Ga),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}un(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},foe={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=mn("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.la=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=(t=e.logs)==null?void 0:t.captureConsoleLogs;!xt(n)&&n&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.oa=0,this.aa=0,this.la=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=We?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(n=>{var r;n||(r=e.logs)==null||!r.initializeLogs?this.Gt.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(HS)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,r,o,s,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(n=this._instance.config.logs)==null?void 0:n.flushIntervalMs)!==null&&t!==void 0?t:3e3,d=(r=(o=this._instance.config.logs)==null?void 0:o.maxLogsPerInterval)!==null&&r!==void 0?r:1e3,f=Date.now();if(c>f-this.aa||(this.aa=f,this.oa=0,this.la=!1),d>this.oa){this.oa++;var p=(function(h,g){var v=h.level||"info",{text:y,number:b}=TD[v]||Cne,x=String(Date.now())+"000000",w={};g.distinctId&&(w.posthogDistinctId=g.distinctId),g.sessionId&&(w.sessionId=g.sessionId),g.currentUrl&&(w["url.full"]=g.currentUrl),g.screenName&&(w["screen.name"]=g.screenName),g.appState&&(w["app.state"]=g.appState),g.activeFeatureFlags&&g.activeFeatureFlags.length>0&&(w.feature_flags=g.activeFeatureFlags);var E=Ne({},w,h.attributes||{}),T={timeUnixNano:x,observedTimeUnixNano:x,severityNumber:b,severityText:y,body:{stringValue:h.body},attributes:LA(E)};return h.trace_id&&(T.traceId=h.trace_id),h.span_id&&(T.spanId=h.span_id),Ue(h.trace_flags)||(T.flags=h.trace_flags),T})(e,this.ua());this.sa.push({record:p}),((s=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&s!==void 0?s:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+d+" logs per "+c+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var n=this._instance.config.logs,r=Ne({"service.name":n?.serviceName||"unknown_service"},n?.environment&&{"deployment.environment":n.environment},n?.serviceVersion&&{"service.version":n.serviceVersion},n?.resourceAttributes),o=(function(l,c,d,f){return{resourceLogs:[{resource:{attributes:LA(c)},scopeLogs:[{scope:{name:d,version:f},logRecords:l}]}]}})(t.map((l=>l.record)),r,Lr.LIB_NAME,Lr.LIB_VERSION),s=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:s,data:o,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.jr||(this.jr=setTimeout((()=>{this.jr=void 0,this.flushLogs()}),(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}ua(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(We!=null&&(e=We.location)!=null&&e.href&&(t.currentUrl=We.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}},hoe=Ne({},av,noe,roe,ooe,ioe,soe,loe,aoe,coe,uoe,doe,foe);$o.__defaultExtensionClasses=Ne({},hoe);var AI,ru=(AI=Ud[Ec]=new $o,(function(){function e(){e.done||(e.done=!0,c6=!1,cn(Ud,(function(t){t._dom_loaded()})))}Le!=null&&Le.addEventListener?Le.readyState==="complete"?e():Vn(Le,"DOMContentLoaded",e,{capture:!1}):me&&$e.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),AI);const yg="mesh:rq-cache",_6=1440*60*1e3,poe=1e3,moe=new Set(["publicConfig"]);let y6=!1,b6=!1;function goe(e){const t=e[0];return typeof t=="string"&&moe.has(t)}function voe(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(yg);if(!t)return;const n=JSON.parse(t),r=!n.timestamp||Date.now()-n.timestamp>_6;if(n.buster!=="3.1.1"||r||!n.state){window.localStorage.removeItem(yg);return}h8(e,n.state),y6=!0}catch{yoe()}}function _oe(e){if(typeof window>"u")return()=>{};let t=null;const n=()=>{t=null;try{const r=f8(e,{shouldDehydrateQuery:o=>o.state.status==="success"&&goe(o.queryKey)});window.localStorage.setItem(yg,JSON.stringify({buster:"3.1.1",timestamp:Date.now(),state:r}))}catch{}};return e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(n,poe))})}const w6="studio:org-cache:";function S6(e){return`${w6}${e}`}function Lue(e,t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(S6(e));if(!n)return null;const r=JSON.parse(n)[t];return!r||Date.now()-r.updatedAt>_6?null:(b6=!0,r)}catch{return null}}function $ue(e,t,n){if(!(typeof window>"u"))try{const r=S6(e),o=window.localStorage.getItem(r),s=o?JSON.parse(o):{};s[t]={data:n,updatedAt:Date.now()},window.localStorage.setItem(r,JSON.stringify(s))}catch{}}function yoe(){if(!(typeof window>"u"))try{window.localStorage.removeItem(yg);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(w6)&&window.localStorage.removeItem(t)}}catch{}}function boe(){return y6}function woe(){return b6}let pa=!1,sw=null,II=!1;function Soe(e,t){pa||typeof window>"u"||(ru.init(e,{api_host:t,capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture"},person_profiles:"identified_only"}),pa=!0)}function Eoe(e,t){pa&&ru.identify(e,t)}function xoe(){pa&&(ru.reset(),sw=null)}function Roe(e,t){pa&&ru.capture(e,t)}function jue(){if(!pa||II||typeof performance>"u")return;II=!0;const e=performance.getEntriesByType("navigation")[0],t=n=>{const r=performance.getEntriesByName(n,"measure")[0];return r?Math.round(r.duration):void 0};Roe("perf_app_bootstrap",{nav_type:e?.type,ttfb_ms:e?Math.round(e.responseStart):void 0,dom_interactive_ms:e?Math.round(e.domInteractive):void 0,dom_content_loaded_ms:e?Math.round(e.domContentLoadedEventEnd):void 0,config_fetch_ms:t("mesh:config-fetch"),active_org_fetch_ms:t("mesh:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:boe(),org_cache_restored:woe()})}function Uue(e,t){pa&&e!==sw&&(ru.group("organization",e,t),sw=e)}function E6(e,t){if(pa)try{ru.captureException(e,t)}catch{}}let Ep=null;function Ooe({children:e}){const t=SP(),{data:n}=Bg.useSession();if(t.posthog){Soe(t.posthog.key,t.posthog.host);const r=n?.user?.id??null;r&&r!==Ep?(Eoe(r,{email:n?.user?.email,name:n?.user?.name}),Ep=r):!r&&Ep&&(xoe(),Ep=null)}return C.jsx(C.Fragment,{children:e})}const QS=({size:e=24,color:t="currentColor",...n})=>M.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},M.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"}));QS.displayName="AlertTriangle";const x6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M4 7.997a2.295 2.295 0 0 1-.39-.035A2 2 0 0 1 2.038 6.39C2 6.197 2 5.965 2 5.5s0-.697.038-.89A2 2 0 0 1 3.61 3.038C3.803 3 4.035 3 4.5 3h15c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89s0 .697-.038.89a2 2 0 0 1-1.572 1.572c-.107.02-.226.03-.39.035M10 13h4M4 8h16v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 21 16.88 21 15.2 21H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 18.72 4 17.88 4 16.2V8Z"}));x6.displayName="Archive";const R6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));R6.displayName="Dataflow03";const O6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M12 2.25v2.5M12 18v4M5.75 12h-3.5m19 0h-1.5m-1.293 6.457-.707-.707m.914-12.334L17.25 6.83M4.922 19.078 7.75 16.25M5.129 5.209 7.25 7.33"}));O6.displayName="Loading01";const T6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M17 10V8A5 5 0 0 0 7 8v2m5 4.5v2M8.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 18.72 20 17.88 20 16.2v-1.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 10 16.88 10 15.2 10H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 12.28 4 13.12 4 14.8v1.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 21 7.12 21 8.8 21Z"}));T6.displayName="Lock01";const C6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));C6.displayName="RefreshCw01";function XS(){const e=Jr.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=C.jsx("div",{className:"flex items-center justify-center min-h-screen",children:C.jsx(O6,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}const Toe={from({org:e,project:t}){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}}},A6=M.createContext(void 0),Coe=()=>{const e=M.useContext(A6);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},zue=()=>Coe().org,Fue=e=>{const t=Jr.c(10),{children:n,org:r,project:o}=e;let s;t[0]!==r.id||t[1]!==o.id?(s=Toe.from({org:r.id,project:o.id}),t[0]=r.id,t[1]=o.id,t[2]=s):s=t[2];const l=s;let c;t[3]!==l||t[4]!==r||t[5]!==o?(c={org:r,project:o,locator:l},t[3]=l,t[4]=r,t[5]=o,t[6]=c):c=t[6];const d=c;let f;return t[7]!==n||t[8]!==d?(f=C.jsx(A6.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},JS="2025-11-25",Bue=[JS,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Aoe="io.modelcontextprotocol/related-task",lv="2.0",Xn=PV(e=>e!==null&&(typeof e=="object"||typeof e=="function")),I6=fn([$(),ht().int()]),M6=$();vr({ttl:ht().optional(),pollInterval:ht().optional()});const Ioe=be({ttl:ht().optional()}),Moe=be({taskId:$()}),eE=vr({progressToken:I6.optional(),[Aoe]:Moe.optional()}),wo=be({_meta:eE.optional()}),Ef=wo.extend({task:Ioe.optional()}),Vue=e=>Ef.safeParse(e).success,yr=be({method:$(),params:wo.loose().optional()}),Vo=be({_meta:eE.optional()}),Ho=be({method:$(),params:Vo.loose().optional()}),br=vr({_meta:eE.optional()}),cv=fn([$(),ht().int()]),P6=be({jsonrpc:Ge(lv),id:cv,...yr.shape}).strict(),Hue=e=>P6.safeParse(e).success,N6=be({jsonrpc:Ge(lv),...Ho.shape}).strict(),que=e=>N6.safeParse(e).success,tE=be({jsonrpc:Ge(lv),id:cv,result:br}).strict(),Gue=e=>tE.safeParse(e).success;var bg;(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"})(bg||(bg={}));const nE=be({jsonrpc:Ge(lv),id:cv.optional(),error:be({code:ht().int(),message:$(),data:Xt().optional()})}).strict(),Kue=e=>nE.safeParse(e).success,Zue=fn([P6,N6,tE,nE]);fn([tE,nE]);const k6=br.strict(),Poe=Vo.extend({requestId:cv.optional(),reason:$().optional()}),D6=Ho.extend({method:Ge("notifications/cancelled"),params:Poe}),Noe=be({src:$(),mimeType:$().optional(),sizes:Oe($()).optional(),theme:dn(["light","dark"]).optional()}),xf=be({icons:Oe(Noe).optional()}),Qc=be({name:$(),title:$().optional()}),L6=Qc.extend({...Qc.shape,...xf.shape,version:$(),websiteUrl:$().optional(),description:$().optional()}),koe=Fw(be({applyDefaults:Nt().optional()}),Mt($(),Xt())),Doe=Vw(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Fw(be({form:koe.optional(),url:Xn.optional()}),Mt($(),Xt()).optional())),Loe=vr({list:Xn.optional(),cancel:Xn.optional(),requests:vr({sampling:vr({createMessage:Xn.optional()}).optional(),elicitation:vr({create:Xn.optional()}).optional()}).optional()}),$oe=vr({list:Xn.optional(),cancel:Xn.optional(),requests:vr({tools:vr({call:Xn.optional()}).optional()}).optional()}),joe=be({experimental:Mt($(),Xn).optional(),sampling:be({context:Xn.optional(),tools:Xn.optional()}).optional(),elicitation:Doe.optional(),roots:be({listChanged:Nt().optional()}).optional(),tasks:Loe.optional(),extensions:Mt($(),Xn).optional()}),Uoe=wo.extend({protocolVersion:$(),capabilities:joe,clientInfo:L6}),zoe=yr.extend({method:Ge("initialize"),params:Uoe}),Foe=be({experimental:Mt($(),Xn).optional(),logging:Xn.optional(),completions:Xn.optional(),prompts:be({listChanged:Nt().optional()}).optional(),resources:be({subscribe:Nt().optional(),listChanged:Nt().optional()}).optional(),tools:be({listChanged:Nt().optional()}).optional(),tasks:$oe.optional(),extensions:Mt($(),Xn).optional()}),Boe=br.extend({protocolVersion:$(),capabilities:Foe,serverInfo:L6,instructions:$().optional()}),$6=Ho.extend({method:Ge("notifications/initialized"),params:Vo.optional()}),Yue=e=>$6.safeParse(e).success,j6=yr.extend({method:Ge("ping"),params:wo.optional()}),Voe=be({progress:ht(),total:wn(ht()),message:wn($())}),Hoe=be({...Vo.shape,...Voe.shape,progressToken:I6}),U6=Ho.extend({method:Ge("notifications/progress"),params:Hoe}),qoe=wo.extend({cursor:M6.optional()}),Rf=yr.extend({params:qoe.optional()}),Of=br.extend({nextCursor:M6.optional()}),Goe=dn(["working","input_required","completed","failed","cancelled"]),Tf=be({taskId:$(),status:Goe,ttl:fn([ht(),iV()]),createdAt:$(),lastUpdatedAt:$(),pollInterval:wn(ht()),statusMessage:wn($())}),z6=br.extend({task:Tf}),Koe=Vo.merge(Tf),F6=Ho.extend({method:Ge("notifications/tasks/status"),params:Koe}),B6=yr.extend({method:Ge("tasks/get"),params:wo.extend({taskId:$()})}),V6=br.merge(Tf),H6=yr.extend({method:Ge("tasks/result"),params:wo.extend({taskId:$()})});br.loose();const q6=Rf.extend({method:Ge("tasks/list")}),G6=Of.extend({tasks:Oe(Tf)}),K6=yr.extend({method:Ge("tasks/cancel"),params:wo.extend({taskId:$()})}),Wue=br.merge(Tf),Z6=be({uri:$(),mimeType:wn($()),_meta:Mt($(),Xt()).optional()}),Y6=Z6.extend({text:$()}),rE=$().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),W6=Z6.extend({blob:rE}),Cf=dn(["user","assistant"]),ou=be({audience:Oe(Cf).optional(),priority:ht().min(0).max(1).optional(),lastModified:W3({offset:!0}).optional()}),Q6=be({...Qc.shape,...xf.shape,uri:$(),description:wn($()),mimeType:wn($()),size:wn(ht()),annotations:ou.optional(),_meta:wn(vr({}))}),Zoe=be({...Qc.shape,...xf.shape,uriTemplate:$(),description:wn($()),mimeType:wn($()),annotations:ou.optional(),_meta:wn(vr({}))}),Yoe=Rf.extend({method:Ge("resources/list")}),Woe=Of.extend({resources:Oe(Q6)}),Qoe=Rf.extend({method:Ge("resources/templates/list")}),Xoe=Of.extend({resourceTemplates:Oe(Zoe)}),oE=wo.extend({uri:$()}),Joe=oE,eie=yr.extend({method:Ge("resources/read"),params:Joe}),tie=br.extend({contents:Oe(fn([Y6,W6]))}),nie=Ho.extend({method:Ge("notifications/resources/list_changed"),params:Vo.optional()}),rie=oE,oie=yr.extend({method:Ge("resources/subscribe"),params:rie}),iie=oE,sie=yr.extend({method:Ge("resources/unsubscribe"),params:iie}),aie=Vo.extend({uri:$()}),lie=Ho.extend({method:Ge("notifications/resources/updated"),params:aie}),cie=be({name:$(),description:wn($()),required:wn(Nt())}),uie=be({...Qc.shape,...xf.shape,description:wn($()),arguments:wn(Oe(cie)),_meta:wn(vr({}))}),die=Rf.extend({method:Ge("prompts/list")}),fie=Of.extend({prompts:Oe(uie)}),hie=wo.extend({name:$(),arguments:Mt($(),$()).optional()}),pie=yr.extend({method:Ge("prompts/get"),params:hie}),iE=be({type:Ge("text"),text:$(),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),sE=be({type:Ge("image"),data:rE,mimeType:$(),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),aE=be({type:Ge("audio"),data:rE,mimeType:$(),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),mie=be({type:Ge("tool_use"),name:$(),id:$(),input:Mt($(),Xt()),_meta:Mt($(),Xt()).optional()}),gie=be({type:Ge("resource"),resource:fn([Y6,W6]),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),vie=Q6.extend({type:Ge("resource_link")}),lE=fn([iE,sE,aE,vie,gie]),_ie=be({role:Cf,content:lE}),yie=br.extend({description:$().optional(),messages:Oe(_ie)}),bie=Ho.extend({method:Ge("notifications/prompts/list_changed"),params:Vo.optional()}),wie=be({title:$().optional(),readOnlyHint:Nt().optional(),destructiveHint:Nt().optional(),idempotentHint:Nt().optional(),openWorldHint:Nt().optional()}),Sie=be({taskSupport:dn(["required","optional","forbidden"]).optional()}),cE=be({...Qc.shape,...xf.shape,description:$().optional(),inputSchema:be({type:Ge("object"),properties:Mt($(),Xn).optional(),required:Oe($()).optional()}).catchall(Xt()),outputSchema:be({type:Ge("object"),properties:Mt($(),Xn).optional(),required:Oe($()).optional()}).catchall(Xt()).optional(),annotations:wie.optional(),execution:Sie.optional(),_meta:Mt($(),Xt()).optional()}),Eie=Rf.extend({method:Ge("tools/list")}),xie=Of.extend({tools:Oe(cE)}),X6=br.extend({content:Oe(lE).default([]),structuredContent:Mt($(),Xt()).optional(),isError:Nt().optional()});X6.or(br.extend({toolResult:Xt()}));const Rie=Ef.extend({name:$(),arguments:Mt($(),Xt()).optional()}),Oie=yr.extend({method:Ge("tools/call"),params:Rie}),Tie=Ho.extend({method:Ge("notifications/tools/list_changed"),params:Vo.optional()}),Que=be({autoRefresh:Nt().default(!0),debounceMs:ht().int().nonnegative().default(300)}),J6=dn(["debug","info","notice","warning","error","critical","alert","emergency"]),Cie=wo.extend({level:J6}),Aie=yr.extend({method:Ge("logging/setLevel"),params:Cie}),Iie=Vo.extend({level:J6,logger:$().optional(),data:Xt()}),Mie=Ho.extend({method:Ge("notifications/message"),params:Iie}),Pie=be({name:$().optional()}),Nie=be({hints:Oe(Pie).optional(),costPriority:ht().min(0).max(1).optional(),speedPriority:ht().min(0).max(1).optional(),intelligencePriority:ht().min(0).max(1).optional()}),kie=be({mode:dn(["auto","required","none"]).optional()}),Die=be({type:Ge("tool_result"),toolUseId:$().describe("The unique identifier for the corresponding tool call."),content:Oe(lE).default([]),structuredContent:be({}).loose().optional(),isError:Nt().optional(),_meta:Mt($(),Xt()).optional()}),Lie=zw("type",[iE,sE,aE]),wg=zw("type",[iE,sE,aE,mie,Die]),$ie=be({role:Cf,content:fn([wg,Oe(wg)]),_meta:Mt($(),Xt()).optional()}),jie=Ef.extend({messages:Oe($ie),modelPreferences:Nie.optional(),systemPrompt:$().optional(),includeContext:dn(["none","thisServer","allServers"]).optional(),temperature:ht().optional(),maxTokens:ht().int(),stopSequences:Oe($()).optional(),metadata:Xn.optional(),tools:Oe(cE).optional(),toolChoice:kie.optional()}),Uie=yr.extend({method:Ge("sampling/createMessage"),params:jie}),zie=br.extend({model:$(),stopReason:wn(dn(["endTurn","stopSequence","maxTokens"]).or($())),role:Cf,content:Lie}),Fie=br.extend({model:$(),stopReason:wn(dn(["endTurn","stopSequence","maxTokens","toolUse"]).or($())),role:Cf,content:fn([wg,Oe(wg)])}),Bie=be({type:Ge("boolean"),title:$().optional(),description:$().optional(),default:Nt().optional()}),Vie=be({type:Ge("string"),title:$().optional(),description:$().optional(),minLength:ht().optional(),maxLength:ht().optional(),format:dn(["email","uri","date","date-time"]).optional(),default:$().optional()}),Hie=be({type:dn(["number","integer"]),title:$().optional(),description:$().optional(),minimum:ht().optional(),maximum:ht().optional(),default:ht().optional()}),qie=be({type:Ge("string"),title:$().optional(),description:$().optional(),enum:Oe($()),default:$().optional()}),Gie=be({type:Ge("string"),title:$().optional(),description:$().optional(),oneOf:Oe(be({const:$(),title:$()})),default:$().optional()}),Kie=be({type:Ge("string"),title:$().optional(),description:$().optional(),enum:Oe($()),enumNames:Oe($()).optional(),default:$().optional()}),Zie=fn([qie,Gie]),Yie=be({type:Ge("array"),title:$().optional(),description:$().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:be({type:Ge("string"),enum:Oe($())}),default:Oe($()).optional()}),Wie=be({type:Ge("array"),title:$().optional(),description:$().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:be({anyOf:Oe(be({const:$(),title:$()}))}),default:Oe($()).optional()}),Qie=fn([Yie,Wie]),Xie=fn([Kie,Zie,Qie]),Jie=fn([Xie,Bie,Vie,Hie]),ese=Ef.extend({mode:Ge("form").optional(),message:$(),requestedSchema:be({type:Ge("object"),properties:Mt($(),Jie),required:Oe($()).optional()})}),tse=Ef.extend({mode:Ge("url"),message:$(),elicitationId:$(),url:$().url()}),nse=fn([ese,tse]),rse=yr.extend({method:Ge("elicitation/create"),params:nse}),ose=Vo.extend({elicitationId:$()}),ise=Ho.extend({method:Ge("notifications/elicitation/complete"),params:ose}),sse=br.extend({action:dn(["accept","decline","cancel"]),content:Vw(e=>e===null?void 0:e,Mt($(),fn([$(),ht(),Nt(),Oe($())])).optional())}),ase=be({type:Ge("ref/resource"),uri:$()}),lse=be({type:Ge("ref/prompt"),name:$()}),cse=wo.extend({ref:fn([lse,ase]),argument:be({name:$(),value:$()}),context:be({arguments:Mt($(),$()).optional()}).optional()}),use=yr.extend({method:Ge("completion/complete"),params:cse}),dse=br.extend({completion:vr({values:Oe($()).max(100),total:wn(ht().int()),hasMore:wn(Nt())})}),fse=be({uri:$().startsWith("file://"),name:$().optional(),_meta:Mt($(),Xt()).optional()}),hse=yr.extend({method:Ge("roots/list"),params:wo.optional()}),pse=br.extend({roots:Oe(fse)}),mse=Ho.extend({method:Ge("notifications/roots/list_changed"),params:Vo.optional()});fn([j6,zoe,use,Aie,pie,die,Yoe,Qoe,eie,oie,sie,Oie,Eie,B6,H6,q6,K6]);fn([D6,U6,$6,mse,F6]);fn([k6,zie,Fie,sse,pse,V6,G6,z6]);fn([j6,Uie,rse,hse,B6,H6,q6,K6]);fn([D6,U6,Mie,lie,nie,Tie,bie,F6,ise]);fn([k6,Boe,dse,yie,fie,Woe,Xoe,tie,X6,xie,V6,G6,z6]);class uE 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===bg.UrlElicitationRequired&&r){const o=r;if(o.elicitations)return new gse(o.elicitations,n)}return new uE(t,n,r)}}class gse extends uE{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(bg.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var xp={exports:{}},fb={},Ji={},Ka={},hb={},pb={},mb={},MI;function Sg(){return MI||(MI=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,R)=>`${T}${R}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((T,R)=>(R instanceof n&&(T[R.str]=(T[R.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function o(w,...E){const T=[w[0]];let R=0;for(;R<E.length;)c(T,E[R]),T.push(w[++R]);return new r(T)}e._=o;const s=new r("+");function l(w,...E){const T=[v(w[0])];let R=0;for(;R<E.length;)T.push(s),c(T,E[R]),T.push(s,v(w[++R]));return d(T),new r(T)}e.str=l;function c(w,E){E instanceof r?w.push(...E._items):E instanceof n?w.push(E):w.push(h(E))}e.addCodeArg=c;function d(w){let E=1;for(;E<w.length-1;){if(w[E]===s){const T=f(w[E-1],w[E+1]);if(T!==void 0){w.splice(E-1,3,T);continue}w[E++]="+"}E++}}function f(w,E){if(E==='""')return w;if(w==='""')return E;if(typeof w=="string")return E instanceof n||w[w.length-1]!=='"'?void 0:typeof E!="string"?`${w.slice(0,-1)}${E}"`:E[0]==='"'?w.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(w instanceof n))return`"${w}${E.slice(1)}`}function p(w,E){return E.emptyStr()?w:w.emptyStr()?E:l`${w}${E}`}e.strConcat=p;function h(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:v(Array.isArray(w)?w.join(","):w)}function g(w){return new r(v(w))}e.stringify=g;function v(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function y(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new r(`.${w}`):o`[${w}]`}e.getProperty=y;function b(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new r(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=b;function x(w){return new r(w.toString())}e.regexpCode=x})(mb)),mb}var gb={},PI;function NI(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Sg();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 o{constructor({prefixes:f,parent:p}={}){this._names={},this._prefixes=f,this._parent=p}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const p=this._names[f]||this._nameGroup(f);return`${f}${p.index++}`}_nameGroup(f){var p,h;if(!((h=(p=this._parent)===null||p===void 0?void 0:p._prefixes)===null||h===void 0)&&h.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=o;class s extends t.Name{constructor(f,p){super(p),this.prefix=f}setValue(f,{property:p,itemIndex:h}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(p)}[${h}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class c extends o{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?l:t.nil}}get(){return this._scope}name(f){return new s(f,this._newName(f))}value(f,p){var h;if(p.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:v}=g,y=(h=p.key)!==null&&h!==void 0?h:p.ref;let b=this._values[v];if(b){const E=b.get(y);if(E)return E}else b=this._values[v]=new Map;b.set(y,g);const x=this._scope[v]||(this._scope[v]=[]),w=x.length;return x[w]=p.ref,g.setValue(p,{property:v,itemIndex:w}),g}getValue(f,p){const h=this._values[f];if(h)return h.get(p)}scopeRefs(f,p=this._values){return this._reduceValues(p,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${f}${h.scopePath}`})}scopeCode(f=this._values,p,h){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},p,h)}_reduceValues(f,p,h={},g){let v=t.nil;for(const y in f){const b=f[y];if(!b)continue;const x=h[y]=h[y]||new Map;b.forEach(w=>{if(x.has(w))return;x.set(w,r.Started);let E=p(w);if(E){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${T} ${w} = ${E};${this.opts._n}`}else if(E=g?.(w))v=(0,t._)`${v}${E}${this.opts._n}`;else throw new n(w);x.set(w,r.Completed)})}return v}}e.ValueScope=c})(gb)),gb}var kI;function _t(){return kI||(kI=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=Sg(),n=NI();var r=Sg();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 o=NI();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.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 s{optimizeNodes(){return this}optimizeNames(D,F){return this}}class l extends s{constructor(D,F,X){super(),this.varKind=D,this.name=F,this.rhs=X}render({es5:D,_n:F}){const X=D?n.varKinds.var:this.varKind,fe=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${fe};`+F}optimizeNames(D,F){if(D[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,D,F)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(D,F,X){super(),this.lhs=D,this.rhs=F,this.sideEffects=X}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,F){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,D,F),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(D,this.rhs)}}class d extends c{constructor(D,F,X,fe){super(D,X,fe),this.op=F}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class f extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class p extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class h extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class g extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,F){return this.code=K(this.code,D,F),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((F,X)=>F+X.render(D),"")}optimizeNodes(){const{nodes:D}=this;let F=D.length;for(;F--;){const X=D[F].optimizeNodes();Array.isArray(X)?D.splice(F,1,...X):X?D[F]=X:D.splice(F,1)}return D.length>0?this:void 0}optimizeNames(D,F){const{nodes:X}=this;let fe=X.length;for(;fe--;){const pe=X[fe];pe.optimizeNames(D,F)||(oe(D,pe.names),X.splice(fe,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((D,F)=>B(D,F.names),{})}}class y extends v{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class b extends v{}class x extends y{}x.kind="else";class w extends y{constructor(D,F){super(F),this.condition=D}render(D){let F=`if(${this.condition})`+super.render(D);return this.else&&(F+="else "+this.else.render(D)),F}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let F=this.else;if(F){const X=F.optimizeNodes();F=this.else=Array.isArray(X)?new x(X):X}if(F)return D===!1?F instanceof w?F:F.nodes:this.nodes.length?this:new w(q(D),F instanceof w?[F]:F.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,F){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(D,F),!!(super.optimizeNames(D,F)||this.else))return this.condition=K(this.condition,D,F),this}get names(){const D=super.names;return z(D,this.condition),this.else&&B(D,this.else.names),D}}w.kind="if";class E extends y{}E.kind="for";class T extends E{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,F){if(super.optimizeNames(D,F))return this.iteration=K(this.iteration,D,F),this}get names(){return B(super.names,this.iteration.names)}}class R extends E{constructor(D,F,X,fe){super(),this.varKind=D,this.name=F,this.from=X,this.to=fe}render(D){const F=D.es5?n.varKinds.var:this.varKind,{name:X,from:fe,to:pe}=this;return`for(${F} ${X}=${fe}; ${X}<${pe}; ${X}++)`+super.render(D)}get names(){const D=z(super.names,this.from);return z(D,this.to)}}class O extends E{constructor(D,F,X,fe){super(),this.loop=D,this.varKind=F,this.name=X,this.iterable=fe}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,F){if(super.optimizeNames(D,F))return this.iterable=K(this.iterable,D,F),this}get names(){return B(super.names,this.iterable.names)}}class A extends y{constructor(D,F,X){super(),this.name=D,this.args=F,this.async=X}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}A.kind="func";class I extends v{render(D){return"return "+super.render(D)}}I.kind="return";class P extends y{render(D){let F="try"+super.render(D);return this.catch&&(F+=this.catch.render(D)),this.finally&&(F+=this.finally.render(D)),F}optimizeNodes(){var D,F;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(D,F){var X,fe;return super.optimizeNames(D,F),(X=this.catch)===null||X===void 0||X.optimizeNames(D,F),(fe=this.finally)===null||fe===void 0||fe.optimizeNames(D,F),this}get names(){const D=super.names;return this.catch&&B(D,this.catch.names),this.finally&&B(D,this.finally.names),D}}class L extends y{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}L.kind="catch";class H extends y{render(D){return"finally"+super.render(D)}}H.kind="finally";class j{constructor(D,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
156
+ `),h=d;p.length>h;h++){var g=p[h];if(1024>=g.length){var v=$A.test(g)?g.replace($A,"$1"):g;if(!v.match(/\S*Error: /)){for(var y of s){var b=y(v,r);if(b){f.push(b);break}}if(f.length>=50)break}}}return(function(x){if(!x.length)return[];var w=Array.from(x);return w.reverse(),w.slice(0,50).map((E=>{return Ne({},E,{filename:E.filename||(T=w,T[T.length-1]||{}).filename,function:E.function||Zc});var T}))})(f)}})("web:javascript",kne,$ne)),this._instance=e,this.fo=(t=(n=this._instance.persistence)==null?void 0:n.get_property(P1))!==null&&t!==void 0?t:[],this.mo=rg(this.yo()),this.bo=new Yne(this.mo)}onConfigChange(){this.mo=rg(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,n,r;if("errorTracking"in e){var o=(t=(n=e.errorTracking)==null?void 0:n.suppressionRules)!==null&&t!==void 0?t:[],s=(r=e.errorTracking)==null?void 0:r.captureExtensionExceptions;this.fo=o,this._instance.persistence&&this._instance.persistence.register({[P1]:this.fo,[N1]:s})}}get _o(){var e,t=!!this._instance.get_property(N1),n=this._instance.config.error_tracking.captureExtensionExceptions;return(e=n??t)!==null&&e!==void 0&&e}buildProperties(e,t){return this.po.buildFromUnknown(e,{syntheticException:t?.syntheticException,mechanism:{handled:t?.handled}})}addExceptionStep(e,t){if(this.mo.enabled)try{if(!bn(e)||e.trim().length===0)return void Xi.warn("Ignoring exception step because message must be a non-empty string");var n=this.wo(t),{sanitizedProperties:r,droppedKeys:o}=(function(s){if(!s)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(s).reduce(((c,d)=>Zne.has(d)?(l.push(d),c):(c[d]=s[d],c)),{}),droppedKeys:l}})(n);o.length>0&&Xi.warn("Ignoring reserved exception step fields",{droppedKeys:o}),this.bo.add(Ne({[tg]:e,[ng]:new Date().toISOString()},r))}catch(s){Xi.error("Failed to add exception step. Ignoring breadcrumb.",s)}}sendExceptionEvent(e){try{var t=e.$exception_list;if(this.Io(t)){if(this.Co(t))return this.So("Exception dropped: matched a suppression rule"),void Xi.info("Skipping exception capture because a suppression rule matched");if(!this._o&&this.xo(t))return this.So("Exception dropped: thrown by a browser extension"),void Xi.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ko(t))return this.So("Exception dropped: thrown by the PostHog SDK"),void Xi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var n=this.mo.enabled&&xt(e.$exception_steps)?this.To(e):e;try{var r=this._instance.capture("$exception",n,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return r&&this.bo.clear(),r}catch(o){return Xi.error("Failed to capture exception event. Dropping this exception.",o),void this.bo.clear()}}catch(o){return void Xi.error("Failed to process exception event. Ignoring this exception.",o)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Ne({},e,{$exception_steps:t})}catch(n){return Xi.error("Failed to read buffered exception steps. Capturing exception without steps.",n),e}}So(e){this.mo.enabled&&this.bo.add({[tg]:e,[ng]:new Date().toISOString()})}wo(e){return In(e)?Ne({},e):{}}yo(){var e,t;return(e=(t=this._instance.config.error_tracking)==null?void 0:t.exception_steps)!==null&&e!==void 0?e:{}}Co(e){if(e.length===0)return!1;var t=e.reduce(((n,r)=>{var{type:o,value:s}=r;return bn(o)&&o.length>0&&n.$exception_types.push(o),bn(s)&&s.length>0&&n.$exception_values.push(s),n}),{$exception_types:[],$exception_values:[]});return this.fo.some((n=>{var r=n.values.map((o=>{var s,l=s6[o.operator],c=Pt(o.value)?o.value:[o.value],d=(s=t[o.key])!==null&&s!==void 0?s:[];return c.length>0&&l(c,d)}));return n.type==="OR"?r.some(Boolean):r.every(Boolean)}))}xo(e){return e.flatMap((t=>{var n,r;return(n=(r=t.stacktrace)==null?void 0:r.frames)!==null&&n!==void 0?n:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,n,r,o,s=(t=(n=e[0].stacktrace)==null?void 0:n.frames)!==null&&t!==void 0?t:[],l=s[s.length-1];return(r=l==null||(o=l.filename)==null?void 0:o.includes("posthog.com/static"))!==null&&r!==void 0&&r}return!1}Io(e){return!xt(e)&&Pt(e)}}},ioe=Ne({productTours:class{get ni(){return this._instance.persistence}constructor(e){this.Ao=null,this.Eo=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){"productTours"in e&&(this.ni&&this.ni.register({[D1]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(D1)||this.ur((()=>this.Ro()))}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.generateProductTours?e():(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"product-tours",(r=>{r?wI.error("Could not load product tours script",r):e()}))}Ro(){var e;!this.Ao&&(e=We.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=We.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Pt(this.Eo)||t){var n=this.ni;if(n){var r=n.props[Sm];if(Pt(r)&&!t)return this.Eo=r,void e(r,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:o=>{var s=o.statusCode;if(s!==200||!o.json){var l="Product Tours API could not be loaded, status: "+s;return wI.error(l),void e([],{isLoaded:!1,error:l})}var c=Pt(o.json.product_tours)?o.json.product_tours:[];this.Eo=c,n&&n.register({[Sm]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){xt(this.Ao)?e([],{isLoaded:!1,error:"Product tours not loaded"}):this.Ao.getActiveProductTours(e)}showProductTour(e){var t;(t=this.Ao)==null||t.showTourById(e)}previewTour(e){this.Ao?this.Ao.previewTour(e):this.ur((()=>{var t;this.Ro(),(t=this.Ao)==null||t.previewTour(e)}))}dismissProductTour(){var e;(e=this.Ao)==null||e.dismissTour("user_clicked_skip")}nextStep(){var e;(e=this.Ao)==null||e.nextStep()}previousStep(){var e;(e=this.Ao)==null||e.previousStep()}clearCache(){var e;this.Eo=null,(e=this.ni)==null||e.unregister(Sm)}resetTour(e){var t;(t=this.Ao)==null||t.resetTour(e)}resetAllTours(){var e;(e=this.Ao)==null||e.resetAllTours()}cancelPendingTour(e){var t;(t=this.Ao)==null||t.cancelPendingTour(e)}}},av),soe={siteApps:class{constructor(e){this._instance=e,this.No=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Mo(e,t){if(t){var n=this.globalsForEvent(t);this.No.push(n),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=We._POSTHOG_REMOTE_CONFIG)==null||(e=e[this._instance.config.token])==null?void 0:e.siteApps}initialize(){if(this.isEnabled){var e=this._instance._addCaptureHook(this.Mo.bind(this));this.Fo=()=>{e(),this.No=[],this.Fo=void 0}}}globalsForEvent(e){var t,n,r,o,s,l,c;if(!e)throw new Error("Event payload is required");var d={},f=this._instance.get_property("$groups")||[],p=this._instance.get_property("$stored_group_properties")||{};for(var[h,g]of Object.entries(p))d[h]={id:f[h],type:h,properties:g};var{$set_once:v,$set:y}=e;return{event:Ne({},aD(e,Wre),{properties:Ne({},e.properties,y?{$set:Ne({},(t=(n=e.properties)==null?void 0:n.$set)!==null&&t!==void 0?t:{},y)}:{},v?{$set_once:Ne({},(r=(o=e.properties)==null?void 0:o.$set_once)!==null&&r!==void 0?r:{},v)}:{}),elements_chain:(s=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&s!==void 0?s:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:d}}setupSiteApp(e){var t=this.apps[e.id],n=()=>{var l;!t.errored&&this.No.length&&(Ys.info("Processing "+this.No.length+" events for site app with id "+e.id),this.No.forEach((c=>t.processEvent==null?void 0:t.processEvent(c))),t.processedBuffer=!0),Object.values(this.apps).every((c=>c.processedBuffer||c.errored))&&((l=this.Fo)==null||l.call(this))},r=!1,o=l=>{t.errored=!l,t.loaded=!0,Ys.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),r&&n()};try{var{processEvent:s}=e.init({posthog:this._instance,callback(l){o(l)}});s&&(t.processEvent=s),r=!0}catch(l){Ys.error(SI+e.id,l),o(!1)}if(r&&t.loaded)try{n()}catch(l){Ys.error("Error while processing buffered events PostHog app with config id "+e.id,l),t.errored=!0}}Oo(){var e=this.siteAppLoaders||[];for(var t of e)this.apps[t.id]={id:t.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of e)this.setupSiteApp(n)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(t)}catch(r){Ys.error("Error while processing event "+e.event+" for site app "+n.id,r)}}}onRemoteConfig(e){var t,n,r,o=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(d=>this.Po(d)))):void Ys.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Fo)==null||n.call(this),(r=e.siteApps)!=null&&r.length)if(this.isEnabled){var s=function(d){var f;We["__$$ph_site_app_"+d]=o._instance,(f=We.__PosthogExtensions__)==null||f.loadSiteApp==null||f.loadSiteApp(o._instance,c,(p=>{if(p)return Ys.error(SI+d,p)}))};for(var{id:l,url:c}of e.siteApps)s(l)}else Ys.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},aoe={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,n,r=this.Bo()||[];Ue(this.Lo)&&((t=We.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(r,this._instance.get_distinct_id(),this._instance.sessionManager)),Ue(this.Do)&&((n=We.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(r,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,n;(t=We.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(n=We.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(r=>{if(r)return Zre.error("failed to load script",r);e()}))}Bo(){var e;return(e=this._instance.config.addTracingHeaders)!==null&&e!==void 0?e:this._instance.config.__add_tracing_headers}startIfEnabledOrStop(){var e,t;this.Bo()?this.ur(this.so):((e=this.Lo)==null||e.call(this),(t=this.Do)==null||t.call(this),this.Lo=void 0,this.Do=void 0)}}},loe=Ne({surveys:class{get Bt(){return this._instance.config}constructor(e){this.jo=void 0,this._surveyManager=null,this.$o=!1,this.qo=[],this.Zo=null,this._instance=e,this._surveyEventReceiver=null}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this.Bt.disable_surveys){var t=e.surveys;if(xt(t))return Qt.warn("Flags not loaded yet. Not loading surveys.");var n=Pt(t);this.jo=n?t.length>0:t,Qt.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var n=localStorage.key(t);(n!=null&&n.startsWith(tw)||n!=null&&n.startsWith("inProgressSurvey_"))&&e.push(n)}e.forEach((r=>localStorage.removeItem(r)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)Qt.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)Qt.info(EI);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())Qt.info("Not loading surveys in cookieless mode without consent.");else{var e=We?.__PosthogExtensions__;if(e){if(!Ue(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var n=e.generateSurveys;if(n)return void this.Vo(n,t);var r=e.loadExternalDependency;if(!r)return void this.Ho(HS);r(this._instance,"surveys",(o=>{o||!e.generateSurveys?this.Ho("Could not load surveys script",o):this.Vo(e.generateSurveys,t)}))}catch(o){throw this.Ho("Error initializing surveys",o),o}finally{this.$o=!1}}}else Qt.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new Jre(this._instance),Qt.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){Qt.error(e,t),this.zo({isLoaded:!1,error:e})}onSurveysLoaded(e){return this.qo.push(e),this._surveyManager&&this.zo({isLoaded:!0}),()=>{this.qo=this.qo.filter((t=>t!==e))}}getSurveys(e,t){if(t===void 0&&(t=!1),this.Bt.disable_surveys)return Qt.info(EI),e([]);var n,r=this._instance.get_property(z1);if(r&&!t)return e(r,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((o=>{var{surveys:s,context:l}=o;return e(s,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((o=>{n=o}))),this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this.Bt.token),method:"GET",timeout:this.Bt.surveys_request_timeout_ms,callback:o=>{var s;this.Zo=null;var l=o.statusCode;if(l!==200||!o.json){var c="Surveys API could not be loaded, status: "+l;Qt.error(c);var d={isLoaded:!1,error:c};return e([],d),void(n==null||n({surveys:[],context:d}))}var f,p=o.json.surveys||[],h=p.filter((v=>(function(y){return!(!y.start_date||y.end_date)})(v)&&((function(y){var b;return!((b=y.conditions)==null||(b=b.events)==null||(b=b.values)==null||!b.length)})(v)||(function(y){var b;return!((b=y.conditions)==null||(b=b.actions)==null||(b=b.values)==null||!b.length)})(v))));h.length>0&&((f=this._surveyEventReceiver)==null||f.register(h)),(s=this._instance.persistence)==null||s.register({[z1]:p});var g={isLoaded:!0};e(p,g),n?.({surveys:p,context:g})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(n){Qt.error("Error in survey callback",n)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!xt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);Qt.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((n=>{var r;t=(r=n.find((o=>o.id===e)))!==null&&r!==void 0?r:null})),t}Yo(e){if(xt(this._surveyManager))return{eligible:!1,reason:ub};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(xt(this._surveyManager))return Qt.warn("init was not called"),{visible:!1,disabledReason:ub};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return xt(this._surveyManager)?(Qt.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:ub})):new Promise((n=>{this.getSurveys((r=>{var o,s=(o=r.find((c=>c.id===e)))!==null&&o!==void 0?o:null;if(s){var l=this.Yo(s);n({visible:l.eligible,disabledReason:l.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,n){var r;if(xt(this._surveyManager))Qt.warn("init was not called");else{var o=typeof e=="string"?this.Uo(e):e;if(o!=null&&o.id)if(Nre.includes(o.type)){var s=Le?.querySelector(t);if(s)return(r=o.appearance)!=null&&r.surveyPopupDelaySeconds?(Qt.info("Rendering survey "+o.id+" with delay of "+o.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;Qt.info("Rendering survey "+o.id+" with delay of "+((l=o.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(o,s,n),Qt.info("Survey "+o.id+" rendered")}),1e3*o.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(o,s,n);Qt.warn("Survey element not found")}else Qt.warn("Surveys of type "+o.type+" cannot be rendered in the app");else Qt.warn("Survey not found")}}displaySurvey(e,t){var n;if(xt(this._surveyManager))Qt.warn("init was not called");else{var r=this.Uo(e);if(r){var o=r;if((n=r.appearance)!=null&&n.surveyPopupDelaySeconds&&t.ignoreDelay&&(o=Ne({},r,{appearance:Ne({},r.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Y1.Popover&&t.initialResponses&&Qt.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var s=this.canRenderSurvey(r);if(!s.visible)return void Qt.warn("Survey is not eligible to be displayed: ",s.disabledReason)}t.displayType!==Y1.Inline?this._surveyManager.handlePopoverSurvey(o,t):this.renderSurvey(o,t.selector,t.properties)}else Qt.warn("Survey not found")}}cancelPendingSurvey(e){xt(this._surveyManager)?Qt.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},av),coe={toolbar:class{constructor(e){this.instance=e}Go(e){We.ph_toolbar_state=e}Wo(){var e;return(e=We.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,n){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),FD(this.instance.config)||!me||!Le)return!1;e=e??me.location,n=n??me.history;try{if(!t){try{me.localStorage.setItem("test","test"),me.localStorage.removeItem("test")}catch{return!1}t=me?.localStorage}var r,o=eoe||pg(e.hash,"__posthog")||pg(e.hash,"state"),s=o?UA((()=>JSON.parse(atob(decodeURIComponent(o)))))||UA((()=>JSON.parse(decodeURIComponent(o)))):null;return s&&s.action==="ph_authorize"?((r=s).source="url",r&&Object.keys(r).length>0&&(s.desiredHash?e.hash=s.desiredHash:n?n.replaceState(n.state,"",e.pathname+e.search):e.hash="")):((r=JSON.parse(t.getItem(xI)||"{}")).source="localstorage",delete r.userIntent),!(!r.token||this.instance.config.token!==r.token||(this.loadToolbar(r),0))}catch{return!1}}Xo(e){var t=We.ph_load_toolbar||We.ph_load_editor;!xt(t)&&rs(t)?t(e,this.instance):RI.warn("No toolbar load function found")}loadToolbar(e){var t=!(Le==null||!Le.getElementById($D));if(!me||t)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,r=Ne({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(me.localStorage.setItem(xI,JSON.stringify(Ne({},r,{source:void 0}))),this.Wo()===2)this.Xo(r);else if(this.Wo()===0){var o;this.Go(1),(o=We.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this.instance,"toolbar",(s=>{if(s)return RI.error("[Toolbar] Failed to load",s),void this.Go(0);this.Go(2),this.Xo(r)})),Vn(me,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(r)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,n){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(e,t,n)}}},uoe=Ne({experiments:xr},av),doe={conversations:class{constructor(e){this.Ko=void 0,this._conversationsManager=null,this.Qo=!1,this.ea=null,this._instance=e}initialize(){this.loadIfEnabled()}onRemoteConfig(e){if(!this._instance.config.disable_conversations){var t=e.conversations;xt(t)||(Ei(t)?this.Ko=t:(this.Ko=t.enabled,this.ea=t),this.loadIfEnabled())}}reset(){var e;(e=this._conversationsManager)==null||e.reset(),this._conversationsManager=null,this.Ko=void 0,this.ea=null}loadIfEnabled(){if(!(this._conversationsManager||this.Qo||this._instance.config.disable_conversations||FD(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=We?.__PosthogExtensions__;if(e&&!Ue(this.Ko)&&this.Ko)if(this.ea&&this.ea.token){this.Qo=!0;try{var t=e.initConversations;if(t)return this.ta(t),void(this.Qo=!1);var n=e.loadExternalDependency;if(!n)return void this.ra(HS);n(this._instance,"conversations",(r=>{r||!e.initConversations?this.ra("Could not load conversations script",r):this.ta(e.initConversations),this.Qo=!1}))}catch(r){this.ra("Error initializing conversations",r),this.Qo=!1}}else ko.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),ko.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else ko.error("Cannot complete initialization: remote config is null")}ra(e,t){ko.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():ko.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!ms(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,n){var r=this;return Lo((function*(){return r._conversationsManager?r._conversationsManager.sendMessage(e,t,n):(ko.warn(Ga),null)}))()}getMessages(e,t){var n=this;return Lo((function*(){return n._conversationsManager?n._conversationsManager.getMessages(e,t):(ko.warn(Ga),null)}))()}markAsRead(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(ko.warn(Ga),null)}))()}getTickets(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(ko.warn(Ga),null)}))()}requestRestoreLink(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(ko.warn(Ga),null)}))()}restoreFromToken(e){var t=this;return Lo((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(ko.warn(Ga),null)}))()}restoreFromUrlToken(){var e=this;return Lo((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(ko.warn(Ga),null)}))()}getCurrentTicketId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getCurrentTicketId())!==null&&e!==void 0?e:null}getWidgetSessionId(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.getWidgetSessionId())!==null&&e!==void 0?e:null}un(){var e;(e=this._conversationsManager)==null||e.setIdentity()}hn(){var e;(e=this._conversationsManager)==null||e.clearIdentity()}}},foe={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=mn("[logs]"),this.sa=[],this.oa=0,this.aa=0,this.la=!1,this._instance=e,this._instance&&(t=this._instance.config.logs)!=null&&t.captureConsoleLogs&&(this.ia=!0)}initialize(){this.loadIfEnabled()}onRemoteConfig(e){var t,n=(t=e.logs)==null?void 0:t.captureConsoleLogs;!xt(n)&&n&&(this.ia=!0,this.loadIfEnabled())}reset(){this.sa=[],this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.oa=0,this.aa=0,this.la=!1}loadIfEnabled(){if(this.ia&&!this.na){var e=We?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(n=>{var r;n||(r=e.logs)==null||!r.initializeLogs?this.Gt.error("Could not load logs script",n):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(HS)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,n,r,o,s,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(n=this._instance.config.logs)==null?void 0:n.flushIntervalMs)!==null&&t!==void 0?t:3e3,d=(r=(o=this._instance.config.logs)==null?void 0:o.maxLogsPerInterval)!==null&&r!==void 0?r:1e3,f=Date.now();if(c>f-this.aa||(this.aa=f,this.oa=0,this.la=!1),d>this.oa){this.oa++;var p=(function(h,g){var v=h.level||"info",{text:y,number:b}=TD[v]||Cne,x=String(Date.now())+"000000",w={};g.distinctId&&(w.posthogDistinctId=g.distinctId),g.sessionId&&(w.sessionId=g.sessionId),g.currentUrl&&(w["url.full"]=g.currentUrl),g.screenName&&(w["screen.name"]=g.screenName),g.appState&&(w["app.state"]=g.appState),g.activeFeatureFlags&&g.activeFeatureFlags.length>0&&(w.feature_flags=g.activeFeatureFlags);var E=Ne({},w,h.attributes||{}),T={timeUnixNano:x,observedTimeUnixNano:x,severityNumber:b,severityText:y,body:{stringValue:h.body},attributes:LA(E)};return h.trace_id&&(T.traceId=h.trace_id),h.span_id&&(T.spanId=h.span_id),Ue(h.trace_flags)||(T.flags=h.trace_flags),T})(e,this.ua());this.sa.push({record:p}),((s=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&s!==void 0?s:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+d+" logs per "+c+"ms"),this.la=!0)}else this.Gt.warn("captureLog requires a body")}get logger(){return this.ca||(this.ca={trace:(e,t)=>this.captureLog({body:e,level:"trace",attributes:t}),debug:(e,t)=>this.captureLog({body:e,level:"debug",attributes:t}),info:(e,t)=>this.captureLog({body:e,level:"info",attributes:t}),warn:(e,t)=>this.captureLog({body:e,level:"warn",attributes:t}),error:(e,t)=>this.captureLog({body:e,level:"error",attributes:t}),fatal:(e,t)=>this.captureLog({body:e,level:"fatal",attributes:t})}),this.ca}flushLogs(e){if(this.jr&&(clearTimeout(this.jr),this.jr=void 0),this.sa.length!==0){var t=this.sa;this.sa=[];var n=this._instance.config.logs,r=Ne({"service.name":n?.serviceName||"unknown_service"},n?.environment&&{"deployment.environment":n.environment},n?.serviceVersion&&{"service.version":n.serviceVersion},n?.resourceAttributes),o=(function(l,c,d,f){return{resourceLogs:[{resource:{attributes:LA(c)},scopeLogs:[{scope:{name:d,version:f},logRecords:l}]}]}})(t.map((l=>l.record)),r,Lr.LIB_NAME,Lr.LIB_VERSION),s=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:s,data:o,compression:"best-available",batchKey:"logs",transport:e})}}ha(){var e,t;this.jr||(this.jr=setTimeout((()=>{this.jr=void 0,this.flushLogs()}),(e=(t=this._instance.config.logs)==null?void 0:t.flushIntervalMs)!==null&&e!==void 0?e:3e3))}ua(){var e,t={};if(t.distinctId=this._instance.get_distinct_id(),this._instance.sessionManager){var{sessionId:n}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=n}if(We!=null&&(e=We.location)!=null&&e.href&&(t.currentUrl=We.location.href),this._instance.featureFlags){var r=this._instance.featureFlags.getFlags();r&&r.length>0&&(t.activeFeatureFlags=r)}return t}}},hoe=Ne({},av,noe,roe,ooe,ioe,soe,loe,aoe,coe,uoe,doe,foe);$o.__defaultExtensionClasses=Ne({},hoe);var AI,ru=(AI=Ud[Ec]=new $o,(function(){function e(){e.done||(e.done=!0,c6=!1,cn(Ud,(function(t){t._dom_loaded()})))}Le!=null&&Le.addEventListener?Le.readyState==="complete"?e():Vn(Le,"DOMContentLoaded",e,{capture:!1}):me&&$e.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),AI);const yg="mesh:rq-cache",_6=1440*60*1e3,poe=1e3,moe=new Set(["publicConfig"]);let y6=!1,b6=!1;function goe(e){const t=e[0];return typeof t=="string"&&moe.has(t)}function voe(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(yg);if(!t)return;const n=JSON.parse(t),r=!n.timestamp||Date.now()-n.timestamp>_6;if(n.buster!=="3.2.1"||r||!n.state){window.localStorage.removeItem(yg);return}h8(e,n.state),y6=!0}catch{yoe()}}function _oe(e){if(typeof window>"u")return()=>{};let t=null;const n=()=>{t=null;try{const r=f8(e,{shouldDehydrateQuery:o=>o.state.status==="success"&&goe(o.queryKey)});window.localStorage.setItem(yg,JSON.stringify({buster:"3.2.1",timestamp:Date.now(),state:r}))}catch{}};return e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(n,poe))})}const w6="studio:org-cache:";function S6(e){return`${w6}${e}`}function Lue(e,t){if(typeof window>"u")return null;try{const n=window.localStorage.getItem(S6(e));if(!n)return null;const r=JSON.parse(n)[t];return!r||Date.now()-r.updatedAt>_6?null:(b6=!0,r)}catch{return null}}function $ue(e,t,n){if(!(typeof window>"u"))try{const r=S6(e),o=window.localStorage.getItem(r),s=o?JSON.parse(o):{};s[t]={data:n,updatedAt:Date.now()},window.localStorage.setItem(r,JSON.stringify(s))}catch{}}function yoe(){if(!(typeof window>"u"))try{window.localStorage.removeItem(yg);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(w6)&&window.localStorage.removeItem(t)}}catch{}}function boe(){return y6}function woe(){return b6}let pa=!1,sw=null,II=!1;function Soe(e,t){pa||typeof window>"u"||(ru.init(e,{api_host:t,capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture"},person_profiles:"identified_only"}),pa=!0)}function Eoe(e,t){pa&&ru.identify(e,t)}function xoe(){pa&&(ru.reset(),sw=null)}function Roe(e,t){pa&&ru.capture(e,t)}function jue(){if(!pa||II||typeof performance>"u")return;II=!0;const e=performance.getEntriesByType("navigation")[0],t=n=>{const r=performance.getEntriesByName(n,"measure")[0];return r?Math.round(r.duration):void 0};Roe("perf_app_bootstrap",{nav_type:e?.type,ttfb_ms:e?Math.round(e.responseStart):void 0,dom_interactive_ms:e?Math.round(e.domInteractive):void 0,dom_content_loaded_ms:e?Math.round(e.domContentLoadedEventEnd):void 0,config_fetch_ms:t("mesh:config-fetch"),active_org_fetch_ms:t("mesh:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:boe(),org_cache_restored:woe()})}function Uue(e,t){pa&&e!==sw&&(ru.group("organization",e,t),sw=e)}function E6(e,t){if(pa)try{ru.captureException(e,t)}catch{}}let Ep=null;function Ooe({children:e}){const t=SP(),{data:n}=Bg.useSession();if(t.posthog){Soe(t.posthog.key,t.posthog.host);const r=n?.user?.id??null;r&&r!==Ep?(Eoe(r,{email:n?.user?.email,name:n?.user?.name}),Ep=r):!r&&Ep&&(xoe(),Ep=null)}return C.jsx(C.Fragment,{children:e})}const QS=({size:e=24,color:t="currentColor",...n})=>M.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},M.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"}));QS.displayName="AlertTriangle";const x6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M4 7.997a2.295 2.295 0 0 1-.39-.035A2 2 0 0 1 2.038 6.39C2 6.197 2 5.965 2 5.5s0-.697.038-.89A2 2 0 0 1 3.61 3.038C3.803 3 4.035 3 4.5 3h15c.465 0 .697 0 .89.038a2 2 0 0 1 1.572 1.572c.038.193.038.425.038.89s0 .697-.038.89a2 2 0 0 1-1.572 1.572c-.107.02-.226.03-.39.035M10 13h4M4 8h16v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 21 16.88 21 15.2 21H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 18.72 4 17.88 4 16.2V8Z"}));x6.displayName="Archive";const R6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M11 4.5h7.3c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874c.218.428.218.988.218 2.108V9c0 .932 0 1.398-.152 1.765a2 2 0 0 1-1.083 1.083C19.898 12 19.432 12 18.5 12M13 19.5H5.7c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C2.5 17.98 2.5 17.42 2.5 16.3V15c0-.932 0-1.398.152-1.765a2 2 0 0 1 1.083-1.083C4.102 12 4.568 12 5.5 12m4.8 2.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218c.055-.107.055-.247.055-.527v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C14.12 9.5 13.98 9.5 13.7 9.5h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218c-.055.107-.055.247-.055.527v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055Zm7.5 7.5h3.4c.28 0 .42 0 .527-.055a.5.5 0 0 0 .218-.218C22 21.62 22 21.48 22 21.2v-3.4c0-.28 0-.42-.055-.527a.5.5 0 0 0-.218-.218C21.62 17 21.48 17 21.2 17h-3.4c-.28 0-.42 0-.527.055a.5.5 0 0 0-.218.218C17 17.38 17 17.52 17 17.8v3.4c0 .28 0 .42.055.527a.5.5 0 0 0 .218.218c.107.055.247.055.527.055ZM2.8 7h3.4c.28 0 .42 0 .527-.054a.5.5 0 0 0 .218-.219C7 6.62 7 6.48 7 6.2V2.8c0-.28 0-.42-.054-.527a.5.5 0 0 0-.219-.219C6.62 2 6.48 2 6.2 2H2.8c-.28 0-.42 0-.527.054a.5.5 0 0 0-.219.219C2 2.38 2 2.52 2 2.8v3.4c0 .28 0 .42.054.527a.5.5 0 0 0 .219.218C2.38 7 2.52 7 2.8 7Z"}));R6.displayName="Dataflow03";const O6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M12 2.25v2.5M12 18v4M5.75 12h-3.5m19 0h-1.5m-1.293 6.457-.707-.707m.914-12.334L17.25 6.83M4.922 19.078 7.75 16.25M5.129 5.209 7.25 7.33"}));O6.displayName="Loading01";const T6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M17 10V8A5 5 0 0 0 7 8v2m5 4.5v2M8.8 21h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 18.72 20 17.88 20 16.2v-1.4c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 10 16.88 10 15.2 10H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 12.28 4 13.12 4 14.8v1.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 21 7.12 21 8.8 21Z"}));T6.displayName="Lock01";const C6=({size:e=24,color:t="currentColor",...n})=>M.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},M.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));C6.displayName="RefreshCw01";function XS(){const e=Jr.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=C.jsx("div",{className:"flex items-center justify-center min-h-screen",children:C.jsx(O6,{size:20,className:"animate-spin text-muted-foreground"})}),e[0]=t):t=e[0],t}const Toe={from({org:e,project:t}){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}}},A6=M.createContext(void 0),Coe=()=>{const e=M.useContext(A6);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},zue=()=>Coe().org,Fue=e=>{const t=Jr.c(10),{children:n,org:r,project:o}=e;let s;t[0]!==r.id||t[1]!==o.id?(s=Toe.from({org:r.id,project:o.id}),t[0]=r.id,t[1]=o.id,t[2]=s):s=t[2];const l=s;let c;t[3]!==l||t[4]!==r||t[5]!==o?(c={org:r,project:o,locator:l},t[3]=l,t[4]=r,t[5]=o,t[6]=c):c=t[6];const d=c;let f;return t[7]!==n||t[8]!==d?(f=C.jsx(A6.Provider,{value:d,children:n}),t[7]=n,t[8]=d,t[9]=f):f=t[9],f},JS="2025-11-25",Bue=[JS,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Aoe="io.modelcontextprotocol/related-task",lv="2.0",Xn=PV(e=>e!==null&&(typeof e=="object"||typeof e=="function")),I6=fn([$(),ht().int()]),M6=$();vr({ttl:ht().optional(),pollInterval:ht().optional()});const Ioe=be({ttl:ht().optional()}),Moe=be({taskId:$()}),eE=vr({progressToken:I6.optional(),[Aoe]:Moe.optional()}),wo=be({_meta:eE.optional()}),Ef=wo.extend({task:Ioe.optional()}),Vue=e=>Ef.safeParse(e).success,yr=be({method:$(),params:wo.loose().optional()}),Vo=be({_meta:eE.optional()}),Ho=be({method:$(),params:Vo.loose().optional()}),br=vr({_meta:eE.optional()}),cv=fn([$(),ht().int()]),P6=be({jsonrpc:Ge(lv),id:cv,...yr.shape}).strict(),Hue=e=>P6.safeParse(e).success,N6=be({jsonrpc:Ge(lv),...Ho.shape}).strict(),que=e=>N6.safeParse(e).success,tE=be({jsonrpc:Ge(lv),id:cv,result:br}).strict(),Gue=e=>tE.safeParse(e).success;var bg;(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"})(bg||(bg={}));const nE=be({jsonrpc:Ge(lv),id:cv.optional(),error:be({code:ht().int(),message:$(),data:Xt().optional()})}).strict(),Kue=e=>nE.safeParse(e).success,Zue=fn([P6,N6,tE,nE]);fn([tE,nE]);const k6=br.strict(),Poe=Vo.extend({requestId:cv.optional(),reason:$().optional()}),D6=Ho.extend({method:Ge("notifications/cancelled"),params:Poe}),Noe=be({src:$(),mimeType:$().optional(),sizes:Oe($()).optional(),theme:dn(["light","dark"]).optional()}),xf=be({icons:Oe(Noe).optional()}),Qc=be({name:$(),title:$().optional()}),L6=Qc.extend({...Qc.shape,...xf.shape,version:$(),websiteUrl:$().optional(),description:$().optional()}),koe=Fw(be({applyDefaults:Nt().optional()}),Mt($(),Xt())),Doe=Vw(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Fw(be({form:koe.optional(),url:Xn.optional()}),Mt($(),Xt()).optional())),Loe=vr({list:Xn.optional(),cancel:Xn.optional(),requests:vr({sampling:vr({createMessage:Xn.optional()}).optional(),elicitation:vr({create:Xn.optional()}).optional()}).optional()}),$oe=vr({list:Xn.optional(),cancel:Xn.optional(),requests:vr({tools:vr({call:Xn.optional()}).optional()}).optional()}),joe=be({experimental:Mt($(),Xn).optional(),sampling:be({context:Xn.optional(),tools:Xn.optional()}).optional(),elicitation:Doe.optional(),roots:be({listChanged:Nt().optional()}).optional(),tasks:Loe.optional(),extensions:Mt($(),Xn).optional()}),Uoe=wo.extend({protocolVersion:$(),capabilities:joe,clientInfo:L6}),zoe=yr.extend({method:Ge("initialize"),params:Uoe}),Foe=be({experimental:Mt($(),Xn).optional(),logging:Xn.optional(),completions:Xn.optional(),prompts:be({listChanged:Nt().optional()}).optional(),resources:be({subscribe:Nt().optional(),listChanged:Nt().optional()}).optional(),tools:be({listChanged:Nt().optional()}).optional(),tasks:$oe.optional(),extensions:Mt($(),Xn).optional()}),Boe=br.extend({protocolVersion:$(),capabilities:Foe,serverInfo:L6,instructions:$().optional()}),$6=Ho.extend({method:Ge("notifications/initialized"),params:Vo.optional()}),Yue=e=>$6.safeParse(e).success,j6=yr.extend({method:Ge("ping"),params:wo.optional()}),Voe=be({progress:ht(),total:wn(ht()),message:wn($())}),Hoe=be({...Vo.shape,...Voe.shape,progressToken:I6}),U6=Ho.extend({method:Ge("notifications/progress"),params:Hoe}),qoe=wo.extend({cursor:M6.optional()}),Rf=yr.extend({params:qoe.optional()}),Of=br.extend({nextCursor:M6.optional()}),Goe=dn(["working","input_required","completed","failed","cancelled"]),Tf=be({taskId:$(),status:Goe,ttl:fn([ht(),iV()]),createdAt:$(),lastUpdatedAt:$(),pollInterval:wn(ht()),statusMessage:wn($())}),z6=br.extend({task:Tf}),Koe=Vo.merge(Tf),F6=Ho.extend({method:Ge("notifications/tasks/status"),params:Koe}),B6=yr.extend({method:Ge("tasks/get"),params:wo.extend({taskId:$()})}),V6=br.merge(Tf),H6=yr.extend({method:Ge("tasks/result"),params:wo.extend({taskId:$()})});br.loose();const q6=Rf.extend({method:Ge("tasks/list")}),G6=Of.extend({tasks:Oe(Tf)}),K6=yr.extend({method:Ge("tasks/cancel"),params:wo.extend({taskId:$()})}),Wue=br.merge(Tf),Z6=be({uri:$(),mimeType:wn($()),_meta:Mt($(),Xt()).optional()}),Y6=Z6.extend({text:$()}),rE=$().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),W6=Z6.extend({blob:rE}),Cf=dn(["user","assistant"]),ou=be({audience:Oe(Cf).optional(),priority:ht().min(0).max(1).optional(),lastModified:W3({offset:!0}).optional()}),Q6=be({...Qc.shape,...xf.shape,uri:$(),description:wn($()),mimeType:wn($()),size:wn(ht()),annotations:ou.optional(),_meta:wn(vr({}))}),Zoe=be({...Qc.shape,...xf.shape,uriTemplate:$(),description:wn($()),mimeType:wn($()),annotations:ou.optional(),_meta:wn(vr({}))}),Yoe=Rf.extend({method:Ge("resources/list")}),Woe=Of.extend({resources:Oe(Q6)}),Qoe=Rf.extend({method:Ge("resources/templates/list")}),Xoe=Of.extend({resourceTemplates:Oe(Zoe)}),oE=wo.extend({uri:$()}),Joe=oE,eie=yr.extend({method:Ge("resources/read"),params:Joe}),tie=br.extend({contents:Oe(fn([Y6,W6]))}),nie=Ho.extend({method:Ge("notifications/resources/list_changed"),params:Vo.optional()}),rie=oE,oie=yr.extend({method:Ge("resources/subscribe"),params:rie}),iie=oE,sie=yr.extend({method:Ge("resources/unsubscribe"),params:iie}),aie=Vo.extend({uri:$()}),lie=Ho.extend({method:Ge("notifications/resources/updated"),params:aie}),cie=be({name:$(),description:wn($()),required:wn(Nt())}),uie=be({...Qc.shape,...xf.shape,description:wn($()),arguments:wn(Oe(cie)),_meta:wn(vr({}))}),die=Rf.extend({method:Ge("prompts/list")}),fie=Of.extend({prompts:Oe(uie)}),hie=wo.extend({name:$(),arguments:Mt($(),$()).optional()}),pie=yr.extend({method:Ge("prompts/get"),params:hie}),iE=be({type:Ge("text"),text:$(),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),sE=be({type:Ge("image"),data:rE,mimeType:$(),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),aE=be({type:Ge("audio"),data:rE,mimeType:$(),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),mie=be({type:Ge("tool_use"),name:$(),id:$(),input:Mt($(),Xt()),_meta:Mt($(),Xt()).optional()}),gie=be({type:Ge("resource"),resource:fn([Y6,W6]),annotations:ou.optional(),_meta:Mt($(),Xt()).optional()}),vie=Q6.extend({type:Ge("resource_link")}),lE=fn([iE,sE,aE,vie,gie]),_ie=be({role:Cf,content:lE}),yie=br.extend({description:$().optional(),messages:Oe(_ie)}),bie=Ho.extend({method:Ge("notifications/prompts/list_changed"),params:Vo.optional()}),wie=be({title:$().optional(),readOnlyHint:Nt().optional(),destructiveHint:Nt().optional(),idempotentHint:Nt().optional(),openWorldHint:Nt().optional()}),Sie=be({taskSupport:dn(["required","optional","forbidden"]).optional()}),cE=be({...Qc.shape,...xf.shape,description:$().optional(),inputSchema:be({type:Ge("object"),properties:Mt($(),Xn).optional(),required:Oe($()).optional()}).catchall(Xt()),outputSchema:be({type:Ge("object"),properties:Mt($(),Xn).optional(),required:Oe($()).optional()}).catchall(Xt()).optional(),annotations:wie.optional(),execution:Sie.optional(),_meta:Mt($(),Xt()).optional()}),Eie=Rf.extend({method:Ge("tools/list")}),xie=Of.extend({tools:Oe(cE)}),X6=br.extend({content:Oe(lE).default([]),structuredContent:Mt($(),Xt()).optional(),isError:Nt().optional()});X6.or(br.extend({toolResult:Xt()}));const Rie=Ef.extend({name:$(),arguments:Mt($(),Xt()).optional()}),Oie=yr.extend({method:Ge("tools/call"),params:Rie}),Tie=Ho.extend({method:Ge("notifications/tools/list_changed"),params:Vo.optional()}),Que=be({autoRefresh:Nt().default(!0),debounceMs:ht().int().nonnegative().default(300)}),J6=dn(["debug","info","notice","warning","error","critical","alert","emergency"]),Cie=wo.extend({level:J6}),Aie=yr.extend({method:Ge("logging/setLevel"),params:Cie}),Iie=Vo.extend({level:J6,logger:$().optional(),data:Xt()}),Mie=Ho.extend({method:Ge("notifications/message"),params:Iie}),Pie=be({name:$().optional()}),Nie=be({hints:Oe(Pie).optional(),costPriority:ht().min(0).max(1).optional(),speedPriority:ht().min(0).max(1).optional(),intelligencePriority:ht().min(0).max(1).optional()}),kie=be({mode:dn(["auto","required","none"]).optional()}),Die=be({type:Ge("tool_result"),toolUseId:$().describe("The unique identifier for the corresponding tool call."),content:Oe(lE).default([]),structuredContent:be({}).loose().optional(),isError:Nt().optional(),_meta:Mt($(),Xt()).optional()}),Lie=zw("type",[iE,sE,aE]),wg=zw("type",[iE,sE,aE,mie,Die]),$ie=be({role:Cf,content:fn([wg,Oe(wg)]),_meta:Mt($(),Xt()).optional()}),jie=Ef.extend({messages:Oe($ie),modelPreferences:Nie.optional(),systemPrompt:$().optional(),includeContext:dn(["none","thisServer","allServers"]).optional(),temperature:ht().optional(),maxTokens:ht().int(),stopSequences:Oe($()).optional(),metadata:Xn.optional(),tools:Oe(cE).optional(),toolChoice:kie.optional()}),Uie=yr.extend({method:Ge("sampling/createMessage"),params:jie}),zie=br.extend({model:$(),stopReason:wn(dn(["endTurn","stopSequence","maxTokens"]).or($())),role:Cf,content:Lie}),Fie=br.extend({model:$(),stopReason:wn(dn(["endTurn","stopSequence","maxTokens","toolUse"]).or($())),role:Cf,content:fn([wg,Oe(wg)])}),Bie=be({type:Ge("boolean"),title:$().optional(),description:$().optional(),default:Nt().optional()}),Vie=be({type:Ge("string"),title:$().optional(),description:$().optional(),minLength:ht().optional(),maxLength:ht().optional(),format:dn(["email","uri","date","date-time"]).optional(),default:$().optional()}),Hie=be({type:dn(["number","integer"]),title:$().optional(),description:$().optional(),minimum:ht().optional(),maximum:ht().optional(),default:ht().optional()}),qie=be({type:Ge("string"),title:$().optional(),description:$().optional(),enum:Oe($()),default:$().optional()}),Gie=be({type:Ge("string"),title:$().optional(),description:$().optional(),oneOf:Oe(be({const:$(),title:$()})),default:$().optional()}),Kie=be({type:Ge("string"),title:$().optional(),description:$().optional(),enum:Oe($()),enumNames:Oe($()).optional(),default:$().optional()}),Zie=fn([qie,Gie]),Yie=be({type:Ge("array"),title:$().optional(),description:$().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:be({type:Ge("string"),enum:Oe($())}),default:Oe($()).optional()}),Wie=be({type:Ge("array"),title:$().optional(),description:$().optional(),minItems:ht().optional(),maxItems:ht().optional(),items:be({anyOf:Oe(be({const:$(),title:$()}))}),default:Oe($()).optional()}),Qie=fn([Yie,Wie]),Xie=fn([Kie,Zie,Qie]),Jie=fn([Xie,Bie,Vie,Hie]),ese=Ef.extend({mode:Ge("form").optional(),message:$(),requestedSchema:be({type:Ge("object"),properties:Mt($(),Jie),required:Oe($()).optional()})}),tse=Ef.extend({mode:Ge("url"),message:$(),elicitationId:$(),url:$().url()}),nse=fn([ese,tse]),rse=yr.extend({method:Ge("elicitation/create"),params:nse}),ose=Vo.extend({elicitationId:$()}),ise=Ho.extend({method:Ge("notifications/elicitation/complete"),params:ose}),sse=br.extend({action:dn(["accept","decline","cancel"]),content:Vw(e=>e===null?void 0:e,Mt($(),fn([$(),ht(),Nt(),Oe($())])).optional())}),ase=be({type:Ge("ref/resource"),uri:$()}),lse=be({type:Ge("ref/prompt"),name:$()}),cse=wo.extend({ref:fn([lse,ase]),argument:be({name:$(),value:$()}),context:be({arguments:Mt($(),$()).optional()}).optional()}),use=yr.extend({method:Ge("completion/complete"),params:cse}),dse=br.extend({completion:vr({values:Oe($()).max(100),total:wn(ht().int()),hasMore:wn(Nt())})}),fse=be({uri:$().startsWith("file://"),name:$().optional(),_meta:Mt($(),Xt()).optional()}),hse=yr.extend({method:Ge("roots/list"),params:wo.optional()}),pse=br.extend({roots:Oe(fse)}),mse=Ho.extend({method:Ge("notifications/roots/list_changed"),params:Vo.optional()});fn([j6,zoe,use,Aie,pie,die,Yoe,Qoe,eie,oie,sie,Oie,Eie,B6,H6,q6,K6]);fn([D6,U6,$6,mse,F6]);fn([k6,zie,Fie,sse,pse,V6,G6,z6]);fn([j6,Uie,rse,hse,B6,H6,q6,K6]);fn([D6,U6,Mie,lie,nie,Tie,bie,F6,ise]);fn([k6,Boe,dse,yie,fie,Woe,Xoe,tie,X6,xie,V6,G6,z6]);class uE 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===bg.UrlElicitationRequired&&r){const o=r;if(o.elicitations)return new gse(o.elicitations,n)}return new uE(t,n,r)}}class gse extends uE{constructor(t,n=`URL elicitation${t.length>1?"s":""} required`){super(bg.UrlElicitationRequired,n,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var xp={exports:{}},fb={},Ji={},Ka={},hb={},pb={},mb={},MI;function Sg(){return MI||(MI=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,R)=>`${T}${R}`,"")}get names(){var E;return(E=this._names)!==null&&E!==void 0?E:this._names=this._items.reduce((T,R)=>(R instanceof n&&(T[R.str]=(T[R.str]||0)+1),T),{})}}e._Code=r,e.nil=new r("");function o(w,...E){const T=[w[0]];let R=0;for(;R<E.length;)c(T,E[R]),T.push(w[++R]);return new r(T)}e._=o;const s=new r("+");function l(w,...E){const T=[v(w[0])];let R=0;for(;R<E.length;)T.push(s),c(T,E[R]),T.push(s,v(w[++R]));return d(T),new r(T)}e.str=l;function c(w,E){E instanceof r?w.push(...E._items):E instanceof n?w.push(E):w.push(h(E))}e.addCodeArg=c;function d(w){let E=1;for(;E<w.length-1;){if(w[E]===s){const T=f(w[E-1],w[E+1]);if(T!==void 0){w.splice(E-1,3,T);continue}w[E++]="+"}E++}}function f(w,E){if(E==='""')return w;if(w==='""')return E;if(typeof w=="string")return E instanceof n||w[w.length-1]!=='"'?void 0:typeof E!="string"?`${w.slice(0,-1)}${E}"`:E[0]==='"'?w.slice(0,-1)+E.slice(1):void 0;if(typeof E=="string"&&E[0]==='"'&&!(w instanceof n))return`"${w}${E.slice(1)}`}function p(w,E){return E.emptyStr()?w:w.emptyStr()?E:l`${w}${E}`}e.strConcat=p;function h(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:v(Array.isArray(w)?w.join(","):w)}function g(w){return new r(v(w))}e.stringify=g;function v(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function y(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new r(`.${w}`):o`[${w}]`}e.getProperty=y;function b(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new r(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=b;function x(w){return new r(w.toString())}e.regexpCode=x})(mb)),mb}var gb={},PI;function NI(){return PI||(PI=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Sg();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 o{constructor({prefixes:f,parent:p}={}){this._names={},this._prefixes=f,this._parent=p}toName(f){return f instanceof t.Name?f:this.name(f)}name(f){return new t.Name(this._newName(f))}_newName(f){const p=this._names[f]||this._nameGroup(f);return`${f}${p.index++}`}_nameGroup(f){var p,h;if(!((h=(p=this._parent)===null||p===void 0?void 0:p._prefixes)===null||h===void 0)&&h.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=o;class s extends t.Name{constructor(f,p){super(p),this.prefix=f}setValue(f,{property:p,itemIndex:h}){this.value=f,this.scopePath=(0,t._)`.${new t.Name(p)}[${h}]`}}e.ValueScopeName=s;const l=(0,t._)`\n`;class c extends o{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?l:t.nil}}get(){return this._scope}name(f){return new s(f,this._newName(f))}value(f,p){var h;if(p.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const g=this.toName(f),{prefix:v}=g,y=(h=p.key)!==null&&h!==void 0?h:p.ref;let b=this._values[v];if(b){const E=b.get(y);if(E)return E}else b=this._values[v]=new Map;b.set(y,g);const x=this._scope[v]||(this._scope[v]=[]),w=x.length;return x[w]=p.ref,g.setValue(p,{property:v,itemIndex:w}),g}getValue(f,p){const h=this._values[f];if(h)return h.get(p)}scopeRefs(f,p=this._values){return this._reduceValues(p,h=>{if(h.scopePath===void 0)throw new Error(`CodeGen: name "${h}" has no value`);return(0,t._)`${f}${h.scopePath}`})}scopeCode(f=this._values,p,h){return this._reduceValues(f,g=>{if(g.value===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return g.value.code},p,h)}_reduceValues(f,p,h={},g){let v=t.nil;for(const y in f){const b=f[y];if(!b)continue;const x=h[y]=h[y]||new Map;b.forEach(w=>{if(x.has(w))return;x.set(w,r.Started);let E=p(w);if(E){const T=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${T} ${w} = ${E};${this.opts._n}`}else if(E=g?.(w))v=(0,t._)`${v}${E}${this.opts._n}`;else throw new n(w);x.set(w,r.Completed)})}return v}}e.ValueScope=c})(gb)),gb}var kI;function _t(){return kI||(kI=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=Sg(),n=NI();var r=Sg();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 o=NI();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.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 s{optimizeNodes(){return this}optimizeNames(D,F){return this}}class l extends s{constructor(D,F,X){super(),this.varKind=D,this.name=F,this.rhs=X}render({es5:D,_n:F}){const X=D?n.varKinds.var:this.varKind,fe=this.rhs===void 0?"":` = ${this.rhs}`;return`${X} ${this.name}${fe};`+F}optimizeNames(D,F){if(D[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,D,F)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(D,F,X){super(),this.lhs=D,this.rhs=F,this.sideEffects=X}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,F){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,D,F),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(D,this.rhs)}}class d extends c{constructor(D,F,X,fe){super(D,X,fe),this.op=F}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class f extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class p extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class h extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class g extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,F){return this.code=K(this.code,D,F),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((F,X)=>F+X.render(D),"")}optimizeNodes(){const{nodes:D}=this;let F=D.length;for(;F--;){const X=D[F].optimizeNodes();Array.isArray(X)?D.splice(F,1,...X):X?D[F]=X:D.splice(F,1)}return D.length>0?this:void 0}optimizeNames(D,F){const{nodes:X}=this;let fe=X.length;for(;fe--;){const pe=X[fe];pe.optimizeNames(D,F)||(oe(D,pe.names),X.splice(fe,1))}return X.length>0?this:void 0}get names(){return this.nodes.reduce((D,F)=>B(D,F.names),{})}}class y extends v{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class b extends v{}class x extends y{}x.kind="else";class w extends y{constructor(D,F){super(F),this.condition=D}render(D){let F=`if(${this.condition})`+super.render(D);return this.else&&(F+="else "+this.else.render(D)),F}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let F=this.else;if(F){const X=F.optimizeNodes();F=this.else=Array.isArray(X)?new x(X):X}if(F)return D===!1?F instanceof w?F:F.nodes:this.nodes.length?this:new w(q(D),F instanceof w?[F]:F.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,F){var X;if(this.else=(X=this.else)===null||X===void 0?void 0:X.optimizeNames(D,F),!!(super.optimizeNames(D,F)||this.else))return this.condition=K(this.condition,D,F),this}get names(){const D=super.names;return z(D,this.condition),this.else&&B(D,this.else.names),D}}w.kind="if";class E extends y{}E.kind="for";class T extends E{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,F){if(super.optimizeNames(D,F))return this.iteration=K(this.iteration,D,F),this}get names(){return B(super.names,this.iteration.names)}}class R extends E{constructor(D,F,X,fe){super(),this.varKind=D,this.name=F,this.from=X,this.to=fe}render(D){const F=D.es5?n.varKinds.var:this.varKind,{name:X,from:fe,to:pe}=this;return`for(${F} ${X}=${fe}; ${X}<${pe}; ${X}++)`+super.render(D)}get names(){const D=z(super.names,this.from);return z(D,this.to)}}class O extends E{constructor(D,F,X,fe){super(),this.loop=D,this.varKind=F,this.name=X,this.iterable=fe}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,F){if(super.optimizeNames(D,F))return this.iterable=K(this.iterable,D,F),this}get names(){return B(super.names,this.iterable.names)}}class A extends y{constructor(D,F,X){super(),this.name=D,this.args=F,this.async=X}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}A.kind="func";class I extends v{render(D){return"return "+super.render(D)}}I.kind="return";class P extends y{render(D){let F="try"+super.render(D);return this.catch&&(F+=this.catch.render(D)),this.finally&&(F+=this.finally.render(D)),F}optimizeNodes(){var D,F;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(D,F){var X,fe;return super.optimizeNames(D,F),(X=this.catch)===null||X===void 0||X.optimizeNames(D,F),(fe=this.finally)===null||fe===void 0||fe.optimizeNames(D,F),this}get names(){const D=super.names;return this.catch&&B(D,this.catch.names),this.finally&&B(D,this.finally.names),D}}class L extends y{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}L.kind="catch";class H extends y{render(D){return"finally"+super.render(D)}}H.kind="finally";class j{constructor(D,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
157
157
  `:""},this._extScope=D,this._scope=new n.Scope({parent:D}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,F){const X=this._extScope.value(D,F);return(this._values[X.prefix]||(this._values[X.prefix]=new Set)).add(X),X}getScopeValue(D,F){return this._extScope.getValue(D,F)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,F,X,fe){const pe=this._scope.toName(F);return X!==void 0&&fe&&(this._constants[pe.str]=X),this._leafNode(new l(D,pe,X)),pe}const(D,F,X){return this._def(n.varKinds.const,D,F,X)}let(D,F,X){return this._def(n.varKinds.let,D,F,X)}var(D,F,X){return this._def(n.varKinds.var,D,F,X)}assign(D,F,X){return this._leafNode(new c(D,F,X))}add(D,F){return this._leafNode(new d(D,e.operators.ADD,F))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new g(D)),this}object(...D){const F=["{"];for(const[X,fe]of D)F.length>1&&F.push(","),F.push(X),(X!==fe||this.opts.es5)&&(F.push(":"),(0,t.addCodeArg)(F,fe));return F.push("}"),new t._Code(F)}if(D,F,X){if(this._blockNode(new w(D)),F&&X)this.code(F).else().code(X).endIf();else if(F)this.code(F).endIf();else if(X)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new w(D))}else(){return this._elseNode(new x)}endIf(){return this._endBlockNode(w,x)}_for(D,F){return this._blockNode(D),F&&this.code(F).endFor(),this}for(D,F){return this._for(new T(D),F)}forRange(D,F,X,fe,pe=this.opts.es5?n.varKinds.var:n.varKinds.let){const xe=this._scope.toName(D);return this._for(new R(pe,xe,F,X),()=>fe(xe))}forOf(D,F,X,fe=n.varKinds.const){const pe=this._scope.toName(D);if(this.opts.es5){const xe=F instanceof t.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,t._)`${xe}.length`,je=>{this.var(pe,(0,t._)`${xe}[${je}]`),X(pe)})}return this._for(new O("of",fe,pe,F),()=>X(pe))}forIn(D,F,X,fe=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${F})`,X);const pe=this._scope.toName(D);return this._for(new O("in",fe,pe,F),()=>X(pe))}endFor(){return this._endBlockNode(E)}label(D){return this._leafNode(new f(D))}break(D){return this._leafNode(new p(D))}return(D){const F=new I;if(this._blockNode(F),this.code(D),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(I)}try(D,F,X){if(!F&&!X)throw new Error('CodeGen: "try" without "catch" and "finally"');const fe=new P;if(this._blockNode(fe),this.code(D),F){const pe=this.name("e");this._currNode=fe.catch=new L(pe),F(pe)}return X&&(this._currNode=fe.finally=new H,this.code(X)),this._endBlockNode(L,H)}throw(D){return this._leafNode(new h(D))}block(D,F){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(F),this}endBlock(D){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const X=this._nodes.length-F;if(X<0||D!==void 0&&X!==D)throw new Error(`CodeGen: wrong number of nodes: ${X} vs ${D} expected`);return this._nodes.length=F,this}func(D,F=t.nil,X,fe){return this._blockNode(new A(D,F,X)),fe&&this.code(fe).endFunc(),this}endFunc(){return this._endBlockNode(A)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,F){const X=this._currNode;if(X instanceof D||F&&X instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${D.kind}/${F.kind}`:D.kind}"`)}_elseNode(D){const F=this._currNode;if(!(F instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const F=this._nodes;F[F.length-1]=D}}e.CodeGen=j;function B(V,D){for(const F in D)V[F]=(V[F]||0)+(D[F]||0);return V}function z(V,D){return D instanceof t._CodeOrName?B(V,D.names):V}function K(V,D,F){if(V instanceof t.Name)return X(V);if(!fe(V))return V;return new t._Code(V._items.reduce((pe,xe)=>(xe instanceof t.Name&&(xe=X(xe)),xe instanceof t._Code?pe.push(...xe._items):pe.push(xe),pe),[]));function X(pe){const xe=F[pe.str];return xe===void 0||D[pe.str]!==1?pe:(delete D[pe.str],xe)}function fe(pe){return pe instanceof t._Code&&pe._items.some(xe=>xe instanceof t.Name&&D[xe.str]===1&&F[xe.str]!==void 0)}}function oe(V,D){for(const F in D)V[F]=(V[F]||0)-(D[F]||0)}function q(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,t._)`!${G(V)}`}e.not=q;const W=k(e.operators.AND);function te(...V){return V.reduce(W)}e.and=te;const le=k(e.operators.OR);function Q(...V){return V.reduce(le)}e.or=Q;function k(V){return(D,F)=>D===t.nil?F:F===t.nil?D:(0,t._)`${G(D)} ${V} ${G(F)}`}function G(V){return V instanceof t.Name?V:(0,t._)`(${V})`}})(pb)),pb}var mt={},DI;function kt(){if(DI)return mt;DI=1,Object.defineProperty(mt,"__esModule",{value:!0}),mt.checkStrictMode=mt.getErrorPath=mt.Type=mt.useFunc=mt.setEvaluated=mt.evaluatedPropsToName=mt.mergeEvaluated=mt.eachItem=mt.unescapeJsonPointer=mt.escapeJsonPointer=mt.escapeFragment=mt.unescapeFragment=mt.schemaRefOrVal=mt.schemaHasRulesButRef=mt.schemaHasRules=mt.checkUnknownRules=mt.alwaysValidSchema=mt.toHash=void 0;const e=_t(),t=Sg();function n(O){const A={};for(const I of O)A[I]=!0;return A}mt.toHash=n;function r(O,A){return typeof A=="boolean"?A:Object.keys(A).length===0?!0:(o(O,A),!s(A,O.self.RULES.all))}mt.alwaysValidSchema=r;function o(O,A=O.schema){const{opts:I,self:P}=O;if(!I.strictSchema||typeof A=="boolean")return;const L=P.RULES.keywords;for(const H in A)L[H]||R(O,`unknown keyword: "${H}"`)}mt.checkUnknownRules=o;function s(O,A){if(typeof O=="boolean")return!O;for(const I in O)if(A[I])return!0;return!1}mt.schemaHasRules=s;function l(O,A){if(typeof O=="boolean")return!O;for(const I in O)if(I!=="$ref"&&A.all[I])return!0;return!1}mt.schemaHasRulesButRef=l;function c({topSchemaRef:O,schemaPath:A},I,P,L){if(!L){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return(0,e._)`${I}`}return(0,e._)`${O}${A}${(0,e.getProperty)(P)}`}mt.schemaRefOrVal=c;function d(O){return h(decodeURIComponent(O))}mt.unescapeFragment=d;function f(O){return encodeURIComponent(p(O))}mt.escapeFragment=f;function p(O){return typeof O=="number"?`${O}`:O.replace(/~/g,"~0").replace(/\//g,"~1")}mt.escapeJsonPointer=p;function h(O){return O.replace(/~1/g,"/").replace(/~0/g,"~")}mt.unescapeJsonPointer=h;function g(O,A){if(Array.isArray(O))for(const I of O)A(I);else A(O)}mt.eachItem=g;function v({mergeNames:O,mergeToName:A,mergeValues:I,resultToName:P}){return(L,H,j,B)=>{const z=j===void 0?H:j instanceof e.Name?(H instanceof e.Name?O(L,H,j):A(L,H,j),j):H instanceof e.Name?(A(L,j,H),H):I(H,j);return B===e.Name&&!(z instanceof e.Name)?P(L,z):z}}mt.mergeEvaluated={props:v({mergeNames:(O,A,I)=>O.if((0,e._)`${I} !== true && ${A} !== undefined`,()=>{O.if((0,e._)`${A} === true`,()=>O.assign(I,!0),()=>O.assign(I,(0,e._)`${I} || {}`).code((0,e._)`Object.assign(${I}, ${A})`))}),mergeToName:(O,A,I)=>O.if((0,e._)`${I} !== true`,()=>{A===!0?O.assign(I,!0):(O.assign(I,(0,e._)`${I} || {}`),b(O,I,A))}),mergeValues:(O,A)=>O===!0?!0:{...O,...A},resultToName:y}),items:v({mergeNames:(O,A,I)=>O.if((0,e._)`${I} !== true && ${A} !== undefined`,()=>O.assign(I,(0,e._)`${A} === true ? true : ${I} > ${A} ? ${I} : ${A}`)),mergeToName:(O,A,I)=>O.if((0,e._)`${I} !== true`,()=>O.assign(I,A===!0?!0:(0,e._)`${I} > ${A} ? ${I} : ${A}`)),mergeValues:(O,A)=>O===!0?!0:Math.max(O,A),resultToName:(O,A)=>O.var("items",A)})};function y(O,A){if(A===!0)return O.var("props",!0);const I=O.var("props",(0,e._)`{}`);return A!==void 0&&b(O,I,A),I}mt.evaluatedPropsToName=y;function b(O,A,I){Object.keys(I).forEach(P=>O.assign((0,e._)`${A}${(0,e.getProperty)(P)}`,!0))}mt.setEvaluated=b;const x={};function w(O,A){return O.scopeValue("func",{ref:A,code:x[A.code]||(x[A.code]=new t._Code(A.code))})}mt.useFunc=w;var E;(function(O){O[O.Num=0]="Num",O[O.Str=1]="Str"})(E||(mt.Type=E={}));function T(O,A,I){if(O instanceof e.Name){const P=A===E.Num;return I?P?(0,e._)`"[" + ${O} + "]"`:(0,e._)`"['" + ${O} + "']"`:P?(0,e._)`"/" + ${O}`:(0,e._)`"/" + ${O}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,e.getProperty)(O).toString():"/"+p(O)}mt.getErrorPath=T;function R(O,A,I=O.opts.strictSchema){if(I){if(A=`strict mode: ${A}`,I===!0)throw new Error(A);O.self.logger.warn(A)}}return mt.checkStrictMode=R,mt}var Rp={},LI;function wa(){if(LI)return Rp;LI=1,Object.defineProperty(Rp,"__esModule",{value:!0});const e=_t(),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 Rp.default=t,Rp}var $I;function uv(){return $I||($I=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=_t(),n=kt(),r=wa();e.keywordError={message:({keyword:x})=>(0,t.str)`must pass "${x}" keyword validation`},e.keyword$DataError={message:({keyword:x,schemaType:w})=>w?(0,t.str)`"${x}" keyword must be ${w} ($data)`:(0,t.str)`"${x}" keyword is invalid ($data)`};function o(x,w=e.keywordError,E,T){const{it:R}=x,{gen:O,compositeRule:A,allErrors:I}=R,P=h(x,w,E);T??(A||I)?d(O,P):f(R,(0,t._)`[${P}]`)}e.reportError=o;function s(x,w=e.keywordError,E){const{it:T}=x,{gen:R,compositeRule:O,allErrors:A}=T,I=h(x,w,E);d(R,I),O||A||f(T,r.default.vErrors)}e.reportExtraError=s;function l(x,w){x.assign(r.default.errors,w),x.if((0,t._)`${r.default.vErrors} !== null`,()=>x.if(w,()=>x.assign((0,t._)`${r.default.vErrors}.length`,w),()=>x.assign(r.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:x,keyword:w,schemaValue:E,data:T,errsCount:R,it:O}){if(R===void 0)throw new Error("ajv implementation error");const A=x.name("err");x.forRange("i",R,r.default.errors,I=>{x.const(A,(0,t._)`${r.default.vErrors}[${I}]`),x.if((0,t._)`${A}.instancePath === undefined`,()=>x.assign((0,t._)`${A}.instancePath`,(0,t.strConcat)(r.default.instancePath,O.errorPath))),x.assign((0,t._)`${A}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${w}`),O.opts.verbose&&(x.assign((0,t._)`${A}.schema`,E),x.assign((0,t._)`${A}.data`,T))})}e.extendErrors=c;function d(x,w){const E=x.const("err",w);x.if((0,t._)`${r.default.vErrors} === null`,()=>x.assign(r.default.vErrors,(0,t._)`[${E}]`),(0,t._)`${r.default.vErrors}.push(${E})`),x.code((0,t._)`${r.default.errors}++`)}function f(x,w){const{gen:E,validateName:T,schemaEnv:R}=x;R.$async?E.throw((0,t._)`new ${x.ValidationError}(${w})`):(E.assign((0,t._)`${T}.errors`,w),E.return(!1))}const p={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 h(x,w,E){const{createErrors:T}=x.it;return T===!1?(0,t._)`{}`:g(x,w,E)}function g(x,w,E={}){const{gen:T,it:R}=x,O=[v(R,E),y(x,E)];return b(x,w,O),T.object(...O)}function v({errorPath:x},{instancePath:w}){const E=w?(0,t.str)`${x}${(0,n.getErrorPath)(w,n.Type.Str)}`:x;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,E)]}function y({keyword:x,it:{errSchemaPath:w}},{schemaPath:E,parentSchema:T}){let R=T?w:(0,t.str)`${w}/${x}`;return E&&(R=(0,t.str)`${R}${(0,n.getErrorPath)(E,n.Type.Str)}`),[p.schemaPath,R]}function b(x,{params:w,message:E},T){const{keyword:R,data:O,schemaValue:A,it:I}=x,{opts:P,propertyName:L,topSchemaRef:H,schemaPath:j}=I;T.push([p.keyword,R],[p.params,typeof w=="function"?w(x):w||(0,t._)`{}`]),P.messages&&T.push([p.message,typeof E=="function"?E(x):E]),P.verbose&&T.push([p.schema,A],[p.parentSchema,(0,t._)`${H}${j}`],[r.default.data,O]),L&&T.push([p.propertyName,L])}})(hb)),hb}var jI;function vse(){if(jI)return Ka;jI=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.boolOrEmptySchema=Ka.topBoolOrEmptySchema=void 0;const e=uv(),t=_t(),n=wa(),r={message:"boolean schema is false"};function o(c){const{gen:d,schema:f,validateName:p}=c;f===!1?l(c,!1):typeof f=="object"&&f.$async===!0?d.return(n.default.data):(d.assign((0,t._)`${p}.errors`,null),d.return(!0))}Ka.topBoolOrEmptySchema=o;function s(c,d){const{gen:f,schema:p}=c;p===!1?(f.var(d,!1),l(c)):f.var(d,!0)}Ka.boolOrEmptySchema=s;function l(c,d){const{gen:f,data:p}=c,h={gen:f,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(h,r,void 0,d)}return Ka}var fr={},Za={},UI;function eL(){if(UI)return Za;UI=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.getRules=Za.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(o){return typeof o=="string"&&t.has(o)}Za.isJSONType=n;function r(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}return Za.getRules=r,Za}var es={},zI;function tL(){if(zI)return es;zI=1,Object.defineProperty(es,"__esModule",{value:!0}),es.shouldUseRule=es.shouldUseGroup=es.schemaHasRulesForType=void 0;function e({schema:r,self:o},s){const l=o.RULES.types[s];return l&&l!==!0&&t(r,l)}es.schemaHasRulesForType=e;function t(r,o){return o.rules.some(s=>n(r,s))}es.shouldUseGroup=t;function n(r,o){var s;return r[o.keyword]!==void 0||((s=o.definition.implements)===null||s===void 0?void 0:s.some(l=>r[l]!==void 0))}return es.shouldUseRule=n,es}var FI;function Eg(){if(FI)return fr;FI=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.reportTypeError=fr.checkDataTypes=fr.checkDataType=fr.coerceAndCheckDataType=fr.getJSONTypes=fr.getSchemaTypes=fr.DataType=void 0;const e=eL(),t=tL(),n=uv(),r=_t(),o=kt();var s;(function(E){E[E.Correct=0]="Correct",E[E.Wrong=1]="Wrong"})(s||(fr.DataType=s={}));function l(E){const T=c(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}fr.getSchemaTypes=l;function c(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(","))}fr.getJSONTypes=c;function d(E,T){const{gen:R,data:O,opts:A}=E,I=p(T,A.coerceTypes),P=T.length>0&&!(I.length===0&&T.length===1&&(0,t.schemaHasRulesForType)(E,T[0]));if(P){const L=y(T,O,A.strictNumbers,s.Wrong);R.if(L,()=>{I.length?h(E,T,I):x(E)})}return P}fr.coerceAndCheckDataType=d;const f=new Set(["string","number","integer","boolean","null"]);function p(E,T){return T?E.filter(R=>f.has(R)||T==="array"&&R==="array"):[]}function h(E,T,R){const{gen:O,data:A,opts:I}=E,P=O.let("dataType",(0,r._)`typeof ${A}`),L=O.let("coerced",(0,r._)`undefined`);I.coerceTypes==="array"&&O.if((0,r._)`${P} == 'object' && Array.isArray(${A}) && ${A}.length == 1`,()=>O.assign(A,(0,r._)`${A}[0]`).assign(P,(0,r._)`typeof ${A}`).if(y(T,A,I.strictNumbers),()=>O.assign(L,A))),O.if((0,r._)`${L} !== undefined`);for(const j of R)(f.has(j)||j==="array"&&I.coerceTypes==="array")&&H(j);O.else(),x(E),O.endIf(),O.if((0,r._)`${L} !== undefined`,()=>{O.assign(A,L),g(E,L)});function H(j){switch(j){case"string":O.elseIf((0,r._)`${P} == "number" || ${P} == "boolean"`).assign(L,(0,r._)`"" + ${A}`).elseIf((0,r._)`${A} === null`).assign(L,(0,r._)`""`);return;case"number":O.elseIf((0,r._)`${P} == "boolean" || ${A} === null
158
158
  || (${P} == "string" && ${A} && ${A} == +${A})`).assign(L,(0,r._)`+${A}`);return;case"integer":O.elseIf((0,r._)`${P} === "boolean" || ${A} === null
159
159
  || (${P} === "string" && ${A} && ${A} == +${A} && !(${A} % 1))`).assign(L,(0,r._)`+${A}`);return;case"boolean":O.elseIf((0,r._)`${A} === "false" || ${A} === 0 || ${A} === null`).assign(L,!1).elseIf((0,r._)`${A} === "true" || ${A} === 1`).assign(L,!0);return;case"null":O.elseIf((0,r._)`${A} === "" || ${A} === 0 || ${A} === false`),O.assign(L,null);return;case"array":O.elseIf((0,r._)`${P} === "string" || ${P} === "number"
@@ -168,4 +168,4 @@ ${r}
168
168
  ${r}
169
169
  }`)}if(n.length>0){const r=document.createElement("style");r.id="mesh-theme-overrides",r.textContent=n.join(`
170
170
 
171
- `),document.head.appendChild(r)}}function kle(e){const t=Jr.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:wP.publicConfig(),queryFn:Ple,staleTime:1/0},t[0]=r):r=t[0];const{data:o}=bP(r),[s]=Ile();o.internalUrl&&ble(o.internalUrl);let l,c;t[1]!==o.theme?(l=()=>{Nle(o.theme)},c=[o.theme],t[1]=o.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),M.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const h=document.documentElement,g=()=>{const x=document.querySelector('meta[name="theme-color"]');if(!x)return;const w=getComputedStyle(h).getPropertyValue("--sidebar").trim();if(!w)return;const E=document.createElement("canvas").getContext("2d");if(!E)return;E.fillStyle="#010203";const T=E.fillStyle;E.fillStyle=w;const R=E.fillStyle;R!==T&&(x.content=R)};if(s.theme==="dark"){h.classList.add("dark"),g();return}if(s.theme==="light"){h.classList.remove("dark"),g();return}const v=window.matchMedia("(prefers-color-scheme: dark)"),y=x=>{h.classList.toggle("dark",x),g()};y(v.matches);const b=x=>y(x.matches);return v.addEventListener("change",b),()=>v.removeEventListener("change",b)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),M.useLayoutEffect(d,f);let p;return t[7]!==n?(p=C.jsx(C.Fragment,{children:n}),t[7]=n,t[8]=p):p=t[8],p}const xE=new O8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});voe(xE);_oe(xE);function Dle(e){const t=Jr.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx(kG,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx(XS,{}),t[1]=o):o=t[1];let s;return t[2]!==n?(s=C.jsxs(T8,{client:xE,children:[r,C.jsx(M.Suspense,{fallback:o,children:C.jsx(kle,{children:C.jsx(B8,{children:C.jsx(lne,{children:C.jsx(Ooe,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Lle(...e){return NN(qw(e))}const $le=r4("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/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{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:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",xl:"h-12 px-4 has-[>svg]:px-3.5",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function cf(e){const t=Jr.c(14);let n,r,o,s,l;t[0]!==e?({className:n,variant:l,size:o,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=l):(n=t[1],r=t[2],o=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?nS:"button";let f;t[6]!==n||t[7]!==o||t[8]!==l?(f=Lle($le({variant:l,size:o,className:n})),t[6]=n,t[7]=o,t[8]=l,t[9]=f):f=t[9];let p;return t[10]!==d||t[11]!==r||t[12]!==f?(p=C.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=p):p=t[13],p}const jle=["radial-gradient(ellipse 85% 85% at 0% 0%, rgba(165,149,255,0.6) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 100% 100%, rgba(208,236,26,0.52) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 0% 100%, rgba(255,193,22,0.48) 0%, transparent 72%)"].join(", ");function Ule(e){const t=Jr.c(3),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:jle}}),t[0]=r):r=t[0];let o;return t[1]!==n?(o=C.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[r,C.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:n})]}),t[1]=n,t[2]=o):o=t[2],o}function yL(e){const t=Jr.c(9),{orgName:n}=e,r=zle;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx("div",{className:"bg-muted p-3 rounded-full",children:C.jsx(x6,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=o):o=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=C.jsx("h3",{className:"text-lg font-medium",children:"Organization unavailable"}),t[1]=s):s=t[1];let l;t[2]!==n?(l=n?C.jsxs(C.Fragment,{children:[C.jsx("strong",{children:n})," has been deleted or is no longer available."]}):"This organization has been deleted or is no longer available.",t[2]=n,t[3]=l):l=t[3];let c;t[4]!==l?(c=C.jsxs("div",{className:"space-y-2",children:[s,C.jsx("p",{className:"text-sm text-muted-foreground",children:l})]}),t[4]=l,t[5]=c):c=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=C.jsx(cf,{onClick:r,children:"Go to home"}),t[6]=d):d=t[6];let f;return t[7]!==c?(f=C.jsxs(Ule,{children:[o,c,d]}),t[7]=c,t[8]=f):f=t[8],f}function zle(){window.location.href="/"}function Fle(e){const t=Jr.c(14),{area:n,description:r}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:s}=Pw(o),l=n?`No access to ${n}`:"No access",c=r??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d=C.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:C.jsx(T6,{size:28})}),t[1]=d):d=t[1];let f;t[2]!==l?(f=C.jsx("h3",{className:"text-lg font-medium",children:l}),t[2]=l,t[3]=f):f=t[3];let p;t[4]!==c?(p=C.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=p):p=t[5];let h;t[6]!==f||t[7]!==p?(h=C.jsxs("div",{className:"space-y-1",children:[f,p]}),t[6]=f,t[7]=p,t[8]=h):h=t[8];let g;t[9]!==s?(g=C.jsx(cf,{variant:"outline",size:"sm",asChild:!0,children:C.jsx(kg,{to:"/$org/settings/profile",params:{org:s},children:"Go to your profile"})}),t[9]=s,t[10]=g):g=t[10];let v;return t[11]!==h||t[12]!==g?(v=C.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[d,h,g]}),t[11]=h,t[12]=g,t[13]=v):v=t[13],v}const nP="__mesh_chunk_reload_ts";function bL(e){return e?.message==="Organization is archived"}function Ble(e){return!!e?.message?.includes("Access denied")}function rP(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 dde extends M.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),E6(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}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:bL(this.state.error)?C.jsx(yL,{}):Ble(this.state.error)?C.jsx(Fle,{}):C.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(QS,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(cf,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class Vle extends M.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=rP(t);if(E6(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const o=sessionStorage.getItem(nP),s=Date.now();(!o||s-Number(o)>1e4)&&(sessionStorage.setItem(nP,String(s)),window.location.reload())}render(){return this.state.hasError&&rP(this.state.error)?C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:C.jsx(C6,{className:"h-6 w-6 text-primary"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),C.jsx(cf,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?bL(this.state.error)?C.jsx(yL,{}):C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(QS,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(cf,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}let ls=null,oP=!1;const yw=new Set;function Cg(){for(const e of yw)e()}function Hle(){oP||typeof window>"u"||(oP=!0,window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),ls=e,Cg()}),window.addEventListener("appinstalled",()=>{ls=null,Cg()}))}function fde(){ls!==null&&(ls=null,Cg())}function qle(e){return yw.add(e),()=>{yw.delete(e)}}function Gle(){return ls}function Kle(){return null}function Zle(){if(typeof window>"u")return!1;const e=typeof window.matchMedia=="function"&&window.matchMedia("(display-mode: standalone)").matches,t=navigator.standalone===!0;return e||t}function Yle(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)?!0:e.includes("Macintosh")&&typeof document<"u"&&"ontouchend"in document}function hde(){const e=Jr.c(5),t=M.useSyncExternalStore(qle,Gle,Kle);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Zle(),e[0]=n):n=e[0];const r=n,o=t!==null&&!r;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=Yle(),l=Wle,e[1]=s,e[2]=l):(s=e[1],l=e[2]);let c;return e[3]!==o?(c={canPrompt:o,installed:r,ios:s,promptInstall:l},e[3]=o,e[4]=c):c=e[4],c}async function Wle(){if(!ls)return"unavailable";await ls.prompt();const e=await ls.userChoice;return e.outcome==="accepted"&&(ls=null,Cg()),e.outcome}const Qle="MCP Workflows",Xle="Create workflows using your MCP tools",Jle=M.lazy(()=>lt(()=>import("./plugin-header-Cq5KYo9E.js"),__vite__mapDeps([0,1,2]))),ece=M.lazy(()=>lt(()=>import("./plugin-empty-state-Bf9odw8A.js"),[])),tce={id:Qle,description:Xle,bindingName:"WORKFLOW",renderHeader:e=>C.jsx(Jle,{...e}),renderEmptyState:()=>C.jsx(ece,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:C.jsx(R6,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},nce=[tce],gs=gU({component:()=>C.jsx(Vle,{children:C.jsx(Dle,{children:C.jsx(M.Suspense,{fallback:C.jsx(XS,{}),children:C.jsx(JP,{})})})})}),rce=st({getParentRoute:()=>gs,path:"/login",component:dt(()=>lt(()=>import("./login-D3EioMPr.js"),__vite__mapDeps([3,4,5]))),validateSearch:hl(()=>be({next:$().optional(),client_id:$().optional(),redirect_uri:$().optional(),response_type:$().optional(),state:$().optional(),scope:$().optional(),code_challenge:$().optional(),code_challenge_method:$().optional()}))}),oce=st({getParentRoute:()=>gs,path:"/cli/auth-success",component:dt(()=>lt(()=>import("./cli-auth-success-DgBMSypx.js"),__vite__mapDeps([6,5])))}),ice=st({getParentRoute:()=>gs,path:"/reset-password",component:dt(()=>lt(()=>import("./reset-password-BKRGZfbP.js"),__vite__mapDeps([7,4]))),validateSearch:hl(()=>be({token:$().optional(),error:$().optional()}))}),sce=st({getParentRoute:()=>gs,path:"/auth/$pathname",component:dt(()=>lt(()=>import("./auth-catchall-DbQXTRY4.js"),[]))}),ace=st({getParentRoute:()=>gs,path:"/oauth/callback",component:dt(()=>lt(()=>import("./oauth-callback-DcFJji4Y.js"),[]))}),lce=st({getParentRoute:()=>gs,path:"/oauth/callback/ai-provider",component:dt(()=>lt(()=>import("./oauth-callback-ai-provider-D9t9n8Ym.js"),[]))}),RE=st({getParentRoute:()=>gs,id:"shell",component:dt(()=>lt(()=>import("./shell-layout-D_pe8ifX.js").then(e=>e.s),__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26])))}),cce=st({getParentRoute:()=>RE,path:"/",beforeLoad:async()=>{const e=localStorage.getItem(EE.lastOrgSlug());if(e)throw Pd({to:"/$org",params:{org:e}});const{data:t}=await vN();if(!t)return;const n=t[0];throw Pd(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),uce=st({getParentRoute:()=>gs,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await vN();if(e&&e.length>0)throw Pd({to:"/"})},component:dt(()=>lt(()=>import("./onboarding-DHTDbj5z.js"),__vite__mapDeps([27,19,20,5,9,10,4,28,29,11,14,30,31])))}),mv=st({getParentRoute:()=>RE,path:"/$org",component:dt(()=>lt(()=>import("./org-layout-DRc-KmSs.js"),[]))}),gv=st({getParentRoute:()=>mv,id:"org-shell",component:dt(()=>lt(()=>import("./index-NrIASxVs.js"),__vite__mapDeps([32,33,34,18,35,36,20,37,38,39,40,41,42,43,44,45,46,22,47,48,49,50,51,52,17,53,54,55,1,56,57,58,59,60,61,11,14,2,62,63,64,65,66,15,30,67,12,68,69,70,71,72,73,74,75,76,31,10,77,13,16,78,79,80,81,21,23,24,8,9,19,25,26,82,83,28,4,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112])))}),OE=st({getParentRoute:()=>gv,id:"agent-shell",component:dt(()=>lt(()=>import("./index-DRtry2B5.js").then(e=>e.at),__vite__mapDeps([113,114,115,56,57,58,59,53,60,61,39,11,14,1,2,40,62,63,64,65,66,15,37,45,30,67,12,68,34,18,69,70,71,72,46,44,73,74,75,76,31,10,77,13,16,107,108,116,96,35,117,118,17,119,120,22,109,21,23,24,110,47,48,101,25,8,9,19,20,26,93,50,52,121,83,28,4,84,43,54,122,123,124,55,41,125,126,92,111,42,102,103,90,91,86,87,88,89,79,80,81,94,95,97,98,99,100,127,128,129,36,33,38,49,51,78,82,85,104,105,106,130,131,132,133,134,135,136,29,137,138,139,140,141,142,143,144,145,146,147,148,149,150])))}),dce=be({virtualmcpid:$().optional(),tab:$().optional(),main:$().optional(),id:$().optional(),toolName:$().optional(),tasks:ht().optional(),mainOpen:ht().optional(),chat:ht().optional(),autosend:$().optional(),runLocally:$().optional()}),wL=st({getParentRoute:()=>OE,path:"/$taskId",validateSearch:dce,component:()=>null}),fce=st({getParentRoute:()=>gv,path:"/",component:dt(()=>lt(()=>import("./index-DvwFUL0N.js"),__vite__mapDeps([151,35,22,47,48,1,56,57,58,59,53,60,61,39,11,14,2,40,62,63,64,65,66,15,37,45,30,67,12,68,34,18,69,70,71,72,46,44,73,74,75,76,31,10,77,13,16,114,115,107,108,116,96,117,118,17,119,120,109,21,23,24,110,101,25,8,9,19,20,26,93,50,52,121,83,28,4,84,43,54,122,123,124,55,41,125,126,92,111,42,102,103,90,91,86,87,88,89,79,80,81,94,95,97,98,99,100,127,128,129,38])))}),hce=be({path:$().optional(),preview:$().optional(),skill:$().optional()}),pce=st({getParentRoute:()=>gv,path:"/files",validateSearch:hce,component:dt(()=>lt(()=>import("./index-D-gelnlt.js"),__vite__mapDeps([152,40,65,66,37,46,75,31,35,82,17,18,4,41,63,76,16,128,1,118,69,149])))}),vn=st({getParentRoute:()=>mv,path:"/settings",component:dt(()=>lt(()=>import("./settings-layout-JDfHTLLv.js"),__vite__mapDeps([153,20,33,34,18,35,138,39,11,67,68,74,10,16,133,130,129,23,24,38,40,112])))}),mce=st({getParentRoute:()=>mv,path:"/install",component:dt(()=>lt(()=>import("./org-install-CIdRAEm2.js"),[]))}),gce=st({getParentRoute:()=>vn,path:"/",component:dt(()=>lt(()=>import("./index-redirect-D9hGZXDU.js"),__vite__mapDeps([154,133,155])))}),vce=st({getParentRoute:()=>vn,path:"/connections",component:dt(()=>lt(()=>import("./connections-B2094sHk.js"),__vite__mapDeps([156,80,81,157,128,1,40,63,59,35,142,95,139,44,94,88,87,89,52,48,22,25,90,91,79,92,93,64,56,57,58,53,60,61,39,11,14,2,62,65,66,15,37,45,30,67,12,68,34,18,69,70,71,72,46,73,74,75,76,31,10,77,13,16,131,138,33,158,82,133,99,159,160,55,17,43,83,28,4,96,97,47,98]))),validateSearch:hl(()=>be({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),_ce=st({getParentRoute:()=>vn,path:"/connections/$appSlug",component:dt(()=>lt(()=>import("./connection-detail-xAj5CM6r.js"),__vite__mapDeps([161,80,81,131,98,4,46,76,162,22,78,56,57,58,59,53,60,61,39,11,14,1,2,40,62,63,64,65,66,15,37,45,30,67,12,68,34,18,69,70,71,72,44,73,74,75,31,10,77,13,16,52,48,163,164,79,89,25,96,35,103,42,47,49,50,136,95,120,147,104,9,121,93,83,28,158,82,165,138,33,166,122,87,54,92,128]))),validateSearch:hl(()=>be({tab:$().optional()}))}),yce=st({getParentRoute:()=>vn,path:"/connections/$appSlug/$collectionName/$itemId",component:dt(()=>lt(()=>import("./collection-detail-pzZ_eH5F.js"),__vite__mapDeps([167,131,48,22,83,28,4,97,165,138,33,34,18,35,168,163,81,164,47,134,84,132,56,57,58,59,53,60,61,39,11,14,1,2,40,62,63,64,65,66,15,37,45,30,67,12,68,69,70,71,72,46,44,73,74,75,76,31,10,77,13,16,116,96,95,142,52,78,17,127,105,128,93,85,169,24,120,170,162,79,80,89,25,103,42,49,50,87,136,119,109,21,23,110,101,8,9,19,20,26]))),validateSearch:hl(()=>be({replayId:$().optional()}))}),bce=st({getParentRoute:()=>vn,path:"/monitor",component:dt(()=>lt(()=>import("./index-BtsB6V7_.js"),__vite__mapDeps([171,139,44,138,33,34,18,35,131,172,133,173,155,95,42,1,65,66,15,68,72,56,57,58,59,53,60,61,39,11,14,2,40,62,63,64,37,45,30,67,12,69,70,71,46,73,74,75,76,31,10,77,13,16,134,84,147,104,52,48,22,47,4,145,90,91,92,146,99,106,144,100,96,55,102,103,17,9,115,107,108,116,117,118,119,120,109,21,23,24,110,101,25,8,19,20,26,93,50,121,83,28,174,97,94,29,170,166,164,87]))),validateSearch:hl(()=>be({tab:dn(["overview","audit","threads","automations"]).default("overview"),from:$().default("now-30m"),to:$().default("now"),connectionId:Oe($()).optional().default([]),virtualMcpId:Oe($()).optional().default([]),tool:$().default(""),status:dn(["all","success","errors"]).default("all"),search:$().default(""),page:ht().optional(),streaming:Nt().default(!0),propertyFilters:$().default(""),hideSystem:Nt().default(!1)}))}),wce=st({getParentRoute:()=>vn,path:"/general",component:dt(()=>lt(()=>import("./general-DL2gq1lt.js"),__vite__mapDeps([175,138,33,34,18,35,104,137,9,10,4,126,92,61,176,110,22,29,82,172,133,173,155])))}),Sce=st({getParentRoute:()=>vn,path:"/features",component:dt(()=>lt(()=>import("./features-BAJOu4LV.js"),__vite__mapDeps([177,138,33,34,18,35,25,22,29,64,126,92,61,172,133,173,155])))}),Ece=st({getParentRoute:()=>vn,path:"/brand-context",component:dt(()=>lt(()=>import("./brand-context-CFlEXUcG.js"),__vite__mapDeps([178,22,2,40,45,69,46,76,16,82,4,97,138,33,34,18,35,110,137,172,133,173,155])))}),xce=st({getParentRoute:()=>vn,path:"/ai-providers",component:dt(()=>lt(()=>import("./ai-providers-CfrS7pK8.js"),__vite__mapDeps([179,57,138,33,34,18,35,41,126,92,61,101,22,14,109,21,23,24,110,47,48,25,143,17,43,124,55,1,4,96,2,62,53,58,68,44,73,125,70,84,40,9,10,65,111,75,137,123,82,46,76,141,108,172,133,173,155])))}),Rce=st({getParentRoute:()=>vn,path:"/secrets",component:dt(()=>lt(()=>import("./secrets-cR95slO6.js"),__vite__mapDeps([180,57,46,10,77,17,18,4,28,96,35,1,2,62,41,97,138,33,34,126,92,61,140,22,110,172,133,173,155])))}),Oce=st({getParentRoute:()=>vn,path:"/files",component:dt(()=>lt(()=>import("./files-BOX6m6w-.js"),[]))}),Tce=st({getParentRoute:()=>vn,path:"/buckets",component:dt(()=>lt(()=>import("./buckets-DOpWF-IW.js"),__vite__mapDeps([181,57,67,46,76,82,17,18,4,28,29,41,97,138,33,34,35,126,92,61,182,22,110,172,133,173,155])))}),Cce=st({getParentRoute:()=>vn,path:"/members",component:dt(()=>lt(()=>import("./members-CN5s--K8.js"),__vite__mapDeps([183,157,128,1,40,63,59,35,142,95,139,44,138,33,34,18,184,146,131,17,83,28,96,2,62,97,104,185,147,22,82,9,10,92,68,74,76,13,55,102,103,42,46,172,133,173,155])))}),Ace=st({getParentRoute:()=>vn,path:"/roles",component:dt(()=>lt(()=>import("./roles-BGyrSjtm.js"),__vite__mapDeps([186,185,104,95,82,128,1,40,63,46,76,184,146,59,138,33,34,18,35,131,139,44,125,93,64,56,57,58,53,60,61,39,11,14,2,62,65,66,15,37,45,30,67,12,68,69,70,71,72,73,74,75,31,10,77,13,16,99,55,100,91,22,54,147,52,48,101,9,29,126,92,133,173,155]))),validateSearch:hl(()=>be({role:$().optional()}))}),Ice=st({getParentRoute:()=>vn,path:"/sso",component:dt(()=>lt(()=>import("./sso-j3NAsCEv.js"),__vite__mapDeps([187,176,110,22,29,126,92,61,138,33,34,18,35,4,26,76,172,133,173,155])))}),Mce=st({getParentRoute:()=>vn,path:"/profile",component:dt(()=>lt(()=>import("./profile-BgHkQW0e.js"),__vite__mapDeps([188,138,33,34,18,35,9,10,29,96,1,2,62,123,4,70,71,72,137,129,85,126,92,61])))}),Pce=st({getParentRoute:()=>vn,path:"/store",component:dt(()=>lt(()=>import("./store-BgMFXMyn.js"),__vite__mapDeps([189,57,40,46,76,4,29,41,9,10,42,52,48,22,138,33,34,18,35,89,25,126,92,61,172,133,173,155])))}),Nce=st({getParentRoute:()=>vn,path:"/registry",component:dt(()=>lt(()=>import("./registry-gHvWojgu.js"),__vite__mapDeps([190,172,133,173,155])))}),kce=st({getParentRoute:()=>vn,path:"/store/registry",component:dt(()=>lt(()=>import("./store-registry-BMLFpwYx.js"),__vite__mapDeps([191,172,133,173,155])))}),Dce=st({getParentRoute:()=>vn,path:"/workflows",component:dt(()=>lt(()=>import("./workflow-DmweYSPb.js"),__vite__mapDeps([192,22,80,81,157,128,1,40,63,59,35,142,95,54,44,92,93,64,56,57,58,53,60,61,39,11,14,2,62,65,66,15,37,45,30,67,12,68,34,18,69,70,71,72,46,73,74,75,76,31,10,77,13,16,184,146,169,135,9,131,159,160,87,82,48,52,165,138,33])))}),Lce=st({getParentRoute:()=>vn,path:"/workflows/$itemId",component:dt(()=>lt(()=>import("./workflow-detail-Ce7Ha6ta.js"),__vite__mapDeps([193,168,163,22,81,164,47,48,134,84,132,56,57,58,59,53,60,61,39,11,14,1,2,40,62,63,64,65,66,15,37,45,30,67,12,68,34,18,69,70,71,72,46,44,73,74,75,76,31,10,77,13,16,116,96,35,95,142,165,138,33,52,78,17,127,105,128,93,85,169,24,4])))}),$ce=st({getParentRoute:()=>OE,path:"/plugins/$pluginId",component:dt(()=>lt(()=>import("./org-plugin-layout-DgmQetHp.js"),__vite__mapDeps([194,195,52,48,22,73,138,33,34,18,35])))}),jce=st({getParentRoute:()=>vn,path:"/agents",component:dt(()=>lt(()=>import("./agents-list-VFl2m_9Z.js"),__vite__mapDeps([196,128,1,40,63,45,11,51,47,48,22,50,52,17,18,53,54,44,55,56,57,58,59,60,61,39,14,2,62,64,65,66,15,37,30,67,12,68,34,69,70,71,72,46,73,74,75,76,31,10,77,13,16,78,79,80,81,138,33,35,92,141,108,133,131,49,82,139])))}),Uce=st({getParentRoute:()=>vn,path:"/automations",component:dt(()=>lt(()=>import("./automations-BEsJQmQT.js"),__vite__mapDeps([197,46,16,139,44,138,33,34,18,35,131,144,22,50,47,48,148,82,128,1,40,63,56,57,58,59,53,60,61,39,11,14,2,62,64,65,66,15,37,45,30,67,12,68,69,70,71,72,73,74,75,76,31,10,77,13,172,133,173,155])))}),SL=st({getParentRoute:()=>wL,path:"/$pluginId",component:dt(()=>lt(()=>import("./dynamic-plugin-layout-DFDLPUiJ.js"),__vite__mapDeps([198,195,52,48,22,73,138,33,34,18,35])))}),zce=[],Fce=[],Bce=[],EL=[];nce.forEach(e=>{if(!e.setup)return;const t={parentRoute:SL,routing:{createRoute:st,lazyRouteComponent:dt},registerRootSidebarItem:n=>zce.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Fce.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Bce.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{EL.push(...n)}};e.setup(t)});const Vce=SL.addChildren(EL),Hce=vn.addChildren([gce,vce,_ce,yce,jce,Uce,bce,wce,Sce,Ece,xce,Rce,Oce,Tce,Cce,Ace,Ice,Mce,Pce,kce,Nce,Dce,Lce]),qce=wL.addChildren([Vce]),Gce=OE.addChildren([qce,$ce]),Kce=gv.addChildren([fce,pce,Gce]),Zce=mv.addChildren([Kce,Hce,mce]),Yce=RE.addChildren([cce,Zce]),Wce=gs.addChildren([Yce,uce,rce,oce,ice,sce,ace,lce]),Qce=TU({routeTree:Wce,defaultPendingComponent:XS,defaultPendingMs:200,defaultNotFoundComponent:()=>C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[C.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),C.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),C.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})});Hle();const Xce=document.getElementById("root");Gj.createRoot(Xce).render(C.jsx(M.StrictMode,{children:C.jsx(IU,{router:Qce})}));export{dl as $,Nue as A,cf as B,SK as C,T6 as D,dde as E,Ow as F,Oi as G,Ti as H,sde as I,lde as J,wP as K,EE as L,kg as M,lue as N,JP as O,ode as P,oue as Q,be as R,XS as S,ht as T,$ as U,ide as V,SP as W,rte as X,iue as Y,mue as Z,lt as _,z8 as a,CW as a$,Ile as a0,yoe as a1,wte as a2,gue as a3,vt as a4,MQ as a5,En as a6,ut as a7,LQ as a8,FQ as a9,Zn as aA,j8 as aB,UO as aC,k8 as aD,D8 as aE,rde as aF,Oe as aG,dn as aH,Mt as aI,Nt as aJ,cde as aK,wK as aL,ude as aM,$C as aN,bw as aO,RW as aP,ii as aQ,Xd as aR,Ng as aS,pS as aT,Hc as aU,ha as aV,ps as aW,si as aX,U4 as aY,TW as aZ,IW as a_,PQ as aa,NQ as ab,oi as ac,IQ as ad,pk as ae,gl as af,kQ as ag,DQ as ah,$Q as ai,jQ as aj,UQ as ak,zQ as al,BQ as am,HQ as an,qQ as ao,x6 as ap,Jc as aq,Wn as ar,Rm as as,aP as at,mP as au,C8 as av,M8 as aw,L8 as ax,P8 as ay,N8 as az,Bg as b,Qoe as b$,mW as b0,ee as b1,eue as b2,Bce as b3,fde as b4,hde as b5,Xt as b6,nde as b7,tde as b8,nQ as b9,uE as bA,bg as bB,Ule as bC,Uue as bD,jue as bE,Lue as bF,gN as bG,yL as bH,$ue as bI,Fue as bJ,yo as bK,Ja as bL,fn as bM,uue as bN,eN as bO,gie as bP,vie as bQ,lE as bR,X6 as bS,cE as bT,cv as bU,L6 as bV,Mie as bW,j6 as bX,Oie as bY,Uie as bZ,Yoe as b_,lk as ba,L4 as bb,hf as bc,aa as bd,tQ as be,hs as bf,nS as bg,bo as bh,Ge as bi,zB as bj,NN as bk,qw as bl,r4 as bm,c5 as bn,d5 as bo,gX as bp,Jn as bq,BX as br,Y4 as bs,D4 as bt,zue as bu,ma as bv,Jce as bw,RY as bx,qP as by,ga as bz,Lle as c,Jue as c$,eie as c0,die as c1,xie as c2,Tie as c3,Woe as c4,Xoe as c5,tie as c6,nie as c7,fie as c8,bie as c9,H6 as cA,q6 as cB,K6 as cC,Gue as cD,Kue as cE,Hue as cF,que as cG,Aoe as cH,Vue as cI,z6 as cJ,V6 as cK,G6 as cL,Wue as cM,F6 as cN,wae as cO,Xue as cP,JS as cQ,Boe as cR,Bue as cS,k6 as cT,dse as cU,yie as cV,Que as cW,rse as cX,sse as cY,Fie as cZ,zie as c_,Zue as ca,nce as cb,Fce as cc,Mue as cd,fL as ce,AB as cf,cue as cg,pue as ch,PV as ci,hl as cj,iV as ck,zw as cl,due as cm,yf as cn,wY as co,EY as cp,xY as cq,ff as cr,xK as cs,EK as ct,KN as cu,yP as cv,rz as cw,D6 as cx,U6 as cy,B6 as cz,ZP as d,UN as d$,Zae as d0,ede as d1,Yue as d2,OY as d3,TY as d4,SY as d5,CY as d6,OX as d7,TX as d8,RX as d9,dX as dA,fX as dB,wue as dC,Sue as dD,Oue as dE,Tue as dF,Cue as dG,Aue as dH,Eue as dI,xue as dJ,Rue as dK,aV as dL,jw as dM,jB as dN,fue as dO,uV as dP,Fw as dQ,Uw as dR,pV as dS,hue as dT,Ise as dU,_t as dV,Ar as dW,aue as dX,_K as dY,gK as dZ,fK as d_,sk as da,BW as db,iS as dc,Q4 as dd,rS as de,VW as df,_ue as dg,HW as dh,_4 as di,sS as dj,Qd as dk,c4 as dl,oS as dm,R6 as dn,ri as dp,bue as dq,yue as dr,$le as ds,nue as dt,tue as du,yX as dv,WP as dw,cX as dx,uX as dy,hX as dz,Jr as e,Fle as e0,Qle as e1,Pg as f,Pw as g,kue as h,Pue as i,C as j,Due as k,O6 as l,ade as m,U8 as n,XT as o,Tle as p,Coe as q,M as r,bP as s,Roe as t,sue as u,QS as v,bK as w,vue as x,ple as y,C6 as z};
171
+ `),document.head.appendChild(r)}}function kle(e){const t=Jr.c(9),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={queryKey:wP.publicConfig(),queryFn:Ple,staleTime:1/0},t[0]=r):r=t[0];const{data:o}=bP(r),[s]=Ile();o.internalUrl&&ble(o.internalUrl);let l,c;t[1]!==o.theme?(l=()=>{Nle(o.theme)},c=[o.theme],t[1]=o.theme,t[2]=l,t[3]=c):(l=t[2],c=t[3]),M.useLayoutEffect(l,c);let d,f;t[4]!==s.theme?(d=()=>{const h=document.documentElement,g=()=>{const x=document.querySelector('meta[name="theme-color"]');if(!x)return;const w=getComputedStyle(h).getPropertyValue("--sidebar").trim();if(!w)return;const E=document.createElement("canvas").getContext("2d");if(!E)return;E.fillStyle="#010203";const T=E.fillStyle;E.fillStyle=w;const R=E.fillStyle;R!==T&&(x.content=R)};if(s.theme==="dark"){h.classList.add("dark"),g();return}if(s.theme==="light"){h.classList.remove("dark"),g();return}const v=window.matchMedia("(prefers-color-scheme: dark)"),y=x=>{h.classList.toggle("dark",x),g()};y(v.matches);const b=x=>y(x.matches);return v.addEventListener("change",b),()=>v.removeEventListener("change",b)},f=[s.theme],t[4]=s.theme,t[5]=d,t[6]=f):(d=t[5],f=t[6]),M.useLayoutEffect(d,f);let p;return t[7]!==n?(p=C.jsx(C.Fragment,{children:n}),t[7]=n,t[8]=p):p=t[8],p}const xE=new O8({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:1,gcTime:300*1e3}}});voe(xE);_oe(xE);function Dle(e){const t=Jr.c(4),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx(kG,{}),t[0]=r):r=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx(XS,{}),t[1]=o):o=t[1];let s;return t[2]!==n?(s=C.jsxs(T8,{client:xE,children:[r,C.jsx(M.Suspense,{fallback:o,children:C.jsx(kle,{children:C.jsx(B8,{children:C.jsx(lne,{children:C.jsx(Ooe,{children:n})})})})})]}),t[2]=n,t[3]=s):s=t[3],s}function Lle(...e){return NN(qw(e))}const $le=r4("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/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{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:"text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:hover:bg-input/50 card-shadow",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",success:"bg-success text-success-foreground hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",special:"bg-special text-special-foreground hover:bg-special/90 focus-visible:ring-special/20 dark:focus-visible:ring-special/40",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground"},size:{default:"h-8 px-3 has-[>svg]:px-2.5",sm:"h-7 gap-1.5 px-2.5 has-[>svg]:px-2",xs:"h-6 gap-1 px-1.5 text-xs has-[>svg]:px-1",lg:"h-10 px-3.5 has-[>svg]:px-3",xl:"h-12 px-4 has-[>svg]:px-3.5",icon:"size-8","icon-sm":"size-7"}},defaultVariants:{variant:"default",size:"default"}});function cf(e){const t=Jr.c(14);let n,r,o,s,l;t[0]!==e?({className:n,variant:l,size:o,asChild:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=l):(n=t[1],r=t[2],o=t[3],s=t[4],l=t[5]);const d=(s===void 0?!1:s)?nS:"button";let f;t[6]!==n||t[7]!==o||t[8]!==l?(f=Lle($le({variant:l,size:o,className:n})),t[6]=n,t[7]=o,t[8]=l,t[9]=f):f=t[9];let p;return t[10]!==d||t[11]!==r||t[12]!==f?(p=C.jsx(d,{"data-slot":"button",className:f,...r}),t[10]=d,t[11]=r,t[12]=f,t[13]=p):p=t[13],p}const jle=["radial-gradient(ellipse 85% 85% at 0% 0%, rgba(165,149,255,0.6) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 100% 100%, rgba(208,236,26,0.52) 0%, transparent 72%)","radial-gradient(ellipse 85% 85% at 0% 100%, rgba(255,193,22,0.48) 0%, transparent 72%)"].join(", ");function Ule(e){const t=Jr.c(3),{children:n}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=C.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:jle}}),t[0]=r):r=t[0];let o;return t[1]!==n?(o=C.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[r,C.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:n})]}),t[1]=n,t[2]=o):o=t[2],o}function yL(e){const t=Jr.c(9),{orgName:n}=e,r=zle;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=C.jsx("div",{className:"bg-muted p-3 rounded-full",children:C.jsx(x6,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=o):o=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=C.jsx("h3",{className:"text-lg font-medium",children:"Organization unavailable"}),t[1]=s):s=t[1];let l;t[2]!==n?(l=n?C.jsxs(C.Fragment,{children:[C.jsx("strong",{children:n})," has been deleted or is no longer available."]}):"This organization has been deleted or is no longer available.",t[2]=n,t[3]=l):l=t[3];let c;t[4]!==l?(c=C.jsxs("div",{className:"space-y-2",children:[s,C.jsx("p",{className:"text-sm text-muted-foreground",children:l})]}),t[4]=l,t[5]=c):c=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d=C.jsx(cf,{onClick:r,children:"Go to home"}),t[6]=d):d=t[6];let f;return t[7]!==c?(f=C.jsxs(Ule,{children:[o,c,d]}),t[7]=c,t[8]=f):f=t[8],f}function zle(){window.location.href="/"}function Fle(e){const t=Jr.c(14),{area:n,description:r}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:s}=Pw(o),l=n?`No access to ${n}`:"No access",c=r??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d=C.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:C.jsx(T6,{size:28})}),t[1]=d):d=t[1];let f;t[2]!==l?(f=C.jsx("h3",{className:"text-lg font-medium",children:l}),t[2]=l,t[3]=f):f=t[3];let p;t[4]!==c?(p=C.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:c}),t[4]=c,t[5]=p):p=t[5];let h;t[6]!==f||t[7]!==p?(h=C.jsxs("div",{className:"space-y-1",children:[f,p]}),t[6]=f,t[7]=p,t[8]=h):h=t[8];let g;t[9]!==s?(g=C.jsx(cf,{variant:"outline",size:"sm",asChild:!0,children:C.jsx(kg,{to:"/$org/settings/profile",params:{org:s},children:"Go to your profile"})}),t[9]=s,t[10]=g):g=t[10];let v;return t[11]!==h||t[12]!==g?(v=C.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[d,h,g]}),t[11]=h,t[12]=g,t[13]=v):v=t[13],v}const nP="__mesh_chunk_reload_ts";function bL(e){return e?.message==="Organization is archived"}function Ble(e){return!!e?.message?.includes("Access denied")}function rP(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 dde extends M.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n),E6(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null})}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:bL(this.state.error)?C.jsx(yL,{}):Ble(this.state.error)?C.jsx(Fle,{}):C.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(QS,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(cf,{variant:"outline",onClick:this.resetError,children:"Try again"})]})}return this.props.children}}class Vle extends M.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n);const r=rP(t);if(E6(t,{boundary:"chunk_root",is_chunk_load_error:r,error_name:t.name,error_message:t.message,component_stack:n.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!r)return;const o=sessionStorage.getItem(nP),s=Date.now();(!o||s-Number(o)>1e4)&&(sessionStorage.setItem(nP,String(s)),window.location.reload())}render(){return this.state.hasError&&rP(this.state.error)?C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:C.jsx(C6,{className:"h-6 w-6 text-primary"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"New version available"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:"A new version has been deployed. Refresh to continue."})]}),C.jsx(cf,{onClick:()=>window.location.reload(),children:"Refresh"})]}):this.state.hasError?bL(this.state.error)?C.jsx(yL,{}):C.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[C.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:C.jsx(QS,{className:"h-6 w-6 text-destructive"})}),C.jsxs("div",{className:"space-y-2",children:[C.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),C.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||"An unexpected error occurred"})]}),C.jsx(cf,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:"Try again"})]}):this.props.children}}let ls=null,oP=!1;const yw=new Set;function Cg(){for(const e of yw)e()}function Hle(){oP||typeof window>"u"||(oP=!0,window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),ls=e,Cg()}),window.addEventListener("appinstalled",()=>{ls=null,Cg()}))}function fde(){ls!==null&&(ls=null,Cg())}function qle(e){return yw.add(e),()=>{yw.delete(e)}}function Gle(){return ls}function Kle(){return null}function Zle(){if(typeof window>"u")return!1;const e=typeof window.matchMedia=="function"&&window.matchMedia("(display-mode: standalone)").matches,t=navigator.standalone===!0;return e||t}function Yle(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return/iPad|iPhone|iPod/.test(e)?!0:e.includes("Macintosh")&&typeof document<"u"&&"ontouchend"in document}function hde(){const e=Jr.c(5),t=M.useSyncExternalStore(qle,Gle,Kle);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Zle(),e[0]=n):n=e[0];const r=n,o=t!==null&&!r;let s,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=Yle(),l=Wle,e[1]=s,e[2]=l):(s=e[1],l=e[2]);let c;return e[3]!==o?(c={canPrompt:o,installed:r,ios:s,promptInstall:l},e[3]=o,e[4]=c):c=e[4],c}async function Wle(){if(!ls)return"unavailable";await ls.prompt();const e=await ls.userChoice;return e.outcome==="accepted"&&(ls=null,Cg()),e.outcome}const Qle="MCP Workflows",Xle="Create workflows using your MCP tools",Jle=M.lazy(()=>lt(()=>import("./plugin-header-BD-ptlOP.js"),__vite__mapDeps([0,1,2]))),ece=M.lazy(()=>lt(()=>import("./plugin-empty-state-CaWAfurE.js"),[])),tce={id:Qle,description:Xle,bindingName:"WORKFLOW",renderHeader:e=>C.jsx(Jle,{...e}),renderEmptyState:()=>C.jsx(ece,{}),setup:e=>{e.registerSettingsSidebarItem({key:"workflows",icon:C.jsx(R6,{size:14}),label:"MCP Workflows",to:"/$org/settings/workflows"})}},nce=[tce],gs=gU({component:()=>C.jsx(Vle,{children:C.jsx(Dle,{children:C.jsx(M.Suspense,{fallback:C.jsx(XS,{}),children:C.jsx(JP,{})})})})}),rce=st({getParentRoute:()=>gs,path:"/login",component:dt(()=>lt(()=>import("./login-CPZKVFaQ.js"),__vite__mapDeps([3,4,5]))),validateSearch:hl(()=>be({next:$().optional(),client_id:$().optional(),redirect_uri:$().optional(),response_type:$().optional(),state:$().optional(),scope:$().optional(),code_challenge:$().optional(),code_challenge_method:$().optional()}))}),oce=st({getParentRoute:()=>gs,path:"/cli/auth-success",component:dt(()=>lt(()=>import("./cli-auth-success-BrX77bKE.js"),__vite__mapDeps([6,5])))}),ice=st({getParentRoute:()=>gs,path:"/reset-password",component:dt(()=>lt(()=>import("./reset-password-BSCF-TYh.js"),__vite__mapDeps([7,4]))),validateSearch:hl(()=>be({token:$().optional(),error:$().optional()}))}),sce=st({getParentRoute:()=>gs,path:"/auth/$pathname",component:dt(()=>lt(()=>import("./auth-catchall-BlJ-5WHw.js"),[]))}),ace=st({getParentRoute:()=>gs,path:"/oauth/callback",component:dt(()=>lt(()=>import("./oauth-callback-CSUHKD_o.js"),[]))}),lce=st({getParentRoute:()=>gs,path:"/oauth/callback/ai-provider",component:dt(()=>lt(()=>import("./oauth-callback-ai-provider-BlWETFFP.js"),[]))}),RE=st({getParentRoute:()=>gs,id:"shell",component:dt(()=>lt(()=>import("./shell-layout-Dgdt_8rv.js").then(e=>e.s),__vite__mapDeps([8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26])))}),cce=st({getParentRoute:()=>RE,path:"/",beforeLoad:async()=>{const e=localStorage.getItem(EE.lastOrgSlug());if(e)throw Pd({to:"/$org",params:{org:e}});const{data:t}=await vN();if(!t)return;const n=t[0];throw Pd(n?{to:"/$org",params:{org:n.slug}}:{to:"/onboarding"})}}),uce=st({getParentRoute:()=>gs,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await vN();if(e&&e.length>0)throw Pd({to:"/"})},component:dt(()=>lt(()=>import("./onboarding-D5Ic9zJG.js"),__vite__mapDeps([27,19,20,5,9,10,4,28,29,11,14,30,31])))}),mv=st({getParentRoute:()=>RE,path:"/$org",component:dt(()=>lt(()=>import("./org-layout-BELYI7z_.js"),[]))}),gv=st({getParentRoute:()=>mv,id:"org-shell",component:dt(()=>lt(()=>import("./index-B8ILnfS6.js"),__vite__mapDeps([32,33,34,18,35,36,20,37,38,39,40,41,42,43,44,45,46,22,47,48,49,50,51,52,17,53,54,55,1,56,57,58,59,60,61,62,11,14,2,63,64,65,66,67,15,30,68,12,69,70,71,72,73,74,75,76,77,31,10,78,13,16,79,80,81,82,21,23,24,8,9,19,25,26,83,84,28,4,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113])))}),OE=st({getParentRoute:()=>gv,id:"agent-shell",component:dt(()=>lt(()=>import("./index-3PLXj9NO.js").then(e=>e.ac),__vite__mapDeps([114,115,116,56,57,58,59,53,60,61,62,11,14,1,2,39,40,63,64,65,66,37,67,15,45,30,68,12,69,34,18,70,71,72,73,46,44,74,75,76,77,31,10,78,13,16,108,109,117,97,35,118,119,17,120,121,22,110,21,23,24,111,47,48,102,25,8,9,19,20,26,94,50,52,122,84,28,4,85,43,54,123,124,125,55,41,126,127,93,112,42,103,104,91,92,87,88,89,90,80,81,82,95,96,98,99,100,101,128,129,130,36,33,38,49,51,79,83,86,105,106,107,131,132,133,134,135,136,137,138,29,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153])))}),dce=be({virtualmcpid:$().optional(),tab:$().optional(),main:$().optional(),id:$().optional(),toolName:$().optional(),tasks:ht().optional(),mainOpen:ht().optional(),chat:ht().optional(),autosend:$().optional(),runLocally:$().optional()}),wL=st({getParentRoute:()=>OE,path:"/$taskId",validateSearch:dce,component:()=>null}),fce=st({getParentRoute:()=>gv,path:"/",component:dt(()=>lt(()=>import("./index-CEk4GIBJ.js"),__vite__mapDeps([154,35,22,47,48,1,56,57,58,59,53,60,61,62,11,14,2,39,40,63,64,65,66,37,67,15,45,30,68,12,69,34,18,70,71,72,73,46,44,74,75,76,77,31,10,78,13,16,115,116,108,109,117,97,118,119,17,120,121,110,21,23,24,111,102,25,8,9,19,20,26,94,50,52,122,84,28,4,85,43,54,123,124,125,55,41,126,127,93,112,42,103,104,91,92,87,88,89,90,80,81,82,95,96,98,99,100,101,128,129,130,38])))}),hce=be({path:$().optional(),preview:$().optional(),skill:$().optional()}),pce=st({getParentRoute:()=>gv,path:"/files",validateSearch:hce,component:dt(()=>lt(()=>import("./index-Dc-40HGd.js"),__vite__mapDeps([155,40,66,67,37,46,76,31,35,83,17,18,4,41,119,1,38,39,135,136,64,77,16,129,133,70,13])))}),vn=st({getParentRoute:()=>mv,path:"/settings",component:dt(()=>lt(()=>import("./settings-layout-B0Ul5kvB.js"),__vite__mapDeps([156,20,33,34,18,35,140,62,11,68,69,75,10,16,134,131,130,23,24,38,39,40,113])))}),mce=st({getParentRoute:()=>mv,path:"/install",component:dt(()=>lt(()=>import("./org-install-Bn_KoOXH.js"),[]))}),gce=st({getParentRoute:()=>vn,path:"/",component:dt(()=>lt(()=>import("./index-redirect-DDOXoojV.js"),__vite__mapDeps([157,134,158])))}),vce=st({getParentRoute:()=>vn,path:"/connections",component:dt(()=>lt(()=>import("./connections-qXvhTW3S.js"),__vite__mapDeps([159,81,82,160,129,1,40,64,59,35,145,96,141,44,95,89,88,90,52,48,22,25,91,92,80,93,94,65,56,57,58,53,60,61,62,11,14,2,39,63,66,37,67,15,45,30,68,12,69,34,18,70,71,72,73,46,74,75,76,77,31,10,78,13,16,132,140,33,161,83,134,100,162,163,55,17,43,84,28,4,97,98,47,99]))),validateSearch:hl(()=>be({action:dn(["create"]).optional(),tab:dn(["all","connected"]).optional()}))}),_ce=st({getParentRoute:()=>vn,path:"/connections/$appSlug",component:dt(()=>lt(()=>import("./connection-detail-Bi7jbI9b.js"),__vite__mapDeps([164,81,82,132,99,4,46,77,165,22,79,56,57,58,59,53,60,61,62,11,14,1,2,39,40,63,64,65,66,37,67,15,45,30,68,12,69,34,18,70,71,72,73,44,74,75,76,31,10,78,13,16,52,48,166,167,80,90,25,97,35,104,42,47,49,50,138,96,121,151,105,9,122,94,84,28,161,83,168,140,33,169,123,88,54,93,129]))),validateSearch:hl(()=>be({tab:$().optional()}))}),yce=st({getParentRoute:()=>vn,path:"/connections/$appSlug/$collectionName/$itemId",component:dt(()=>lt(()=>import("./collection-detail-Dvs8YEXJ.js"),__vite__mapDeps([170,132,48,22,84,28,4,98,168,140,33,34,18,35,171,166,82,167,47,148,136,85,133,37,96,97,1,2,63,145,56,57,58,59,53,60,61,62,11,14,39,40,64,65,66,67,15,45,30,68,12,69,70,71,72,73,46,44,74,75,76,77,31,10,78,13,16,52,79,17,117,128,106,129,94,144,86,172,24,121,173,165,80,81,90,25,104,42,49,50,88,138,120,110,21,23,111,102,8,9,19,20,26]))),validateSearch:hl(()=>be({replayId:$().optional()}))}),bce=st({getParentRoute:()=>vn,path:"/monitor",component:dt(()=>lt(()=>import("./index-CVcc7k1H.js"),__vite__mapDeps([174,141,44,140,33,34,18,35,132,175,134,176,158,96,42,1,66,67,15,69,73,56,57,58,59,53,60,61,62,11,14,2,39,40,63,64,65,37,45,30,68,12,70,71,72,46,74,75,76,77,31,10,78,13,16,148,136,85,151,105,52,48,22,47,4,149,91,92,93,150,100,107,147,101,97,55,103,104,17,9,116,108,109,117,118,119,120,121,110,21,23,24,111,102,25,8,19,20,26,94,50,122,84,28,177,98,95,29,173,169,167,88]))),validateSearch:hl(()=>be({tab:dn(["overview","audit","threads","automations"]).default("overview"),from:$().default("now-30m"),to:$().default("now"),connectionId:Oe($()).optional().default([]),virtualMcpId:Oe($()).optional().default([]),tool:$().default(""),status:dn(["all","success","errors"]).default("all"),search:$().default(""),page:ht().optional(),streaming:Nt().default(!0),propertyFilters:$().default(""),hideSystem:Nt().default(!1)}))}),wce=st({getParentRoute:()=>vn,path:"/general",component:dt(()=>lt(()=>import("./general-FkmFS6e6.js"),__vite__mapDeps([178,140,33,34,18,35,105,139,9,10,4,127,93,61,179,111,22,29,83,175,134,176,158])))}),Sce=st({getParentRoute:()=>vn,path:"/features",component:dt(()=>lt(()=>import("./features-RZhE2UVO.js"),__vite__mapDeps([180,140,33,34,18,35,25,22,29,65,127,93,61,175,134,176,158])))}),Ece=st({getParentRoute:()=>vn,path:"/brand-context",component:dt(()=>lt(()=>import("./brand-context-Mfgei73B.js"),__vite__mapDeps([181,22,2,40,45,70,46,77,16,83,4,98,140,33,34,18,35,111,139,175,134,176,158])))}),xce=st({getParentRoute:()=>vn,path:"/ai-providers",component:dt(()=>lt(()=>import("./ai-providers-agn-dcob.js"),__vite__mapDeps([182,57,140,33,34,18,35,41,127,93,61,102,22,14,110,21,23,24,111,47,48,25,146,17,43,125,55,1,4,97,2,63,53,58,69,44,74,126,71,85,40,9,10,66,112,76,139,124,83,46,77,143,109,175,134,176,158])))}),Rce=st({getParentRoute:()=>vn,path:"/secrets",component:dt(()=>lt(()=>import("./secrets-BSGdlXxl.js"),__vite__mapDeps([183,57,46,10,78,17,18,4,28,97,35,1,2,63,41,98,140,33,34,127,93,61,142,22,111,175,134,176,158])))}),Oce=st({getParentRoute:()=>vn,path:"/files",component:dt(()=>lt(()=>import("./files-C6VU3gjR.js"),[]))}),Tce=st({getParentRoute:()=>vn,path:"/buckets",component:dt(()=>lt(()=>import("./buckets-CVy4SLLv.js"),__vite__mapDeps([184,57,68,46,77,83,17,18,4,28,29,41,98,140,33,34,35,127,93,61,185,22,111,175,134,176,158])))}),Cce=st({getParentRoute:()=>vn,path:"/members",component:dt(()=>lt(()=>import("./members-DWt34Meb.js"),__vite__mapDeps([186,160,129,1,40,64,59,35,145,96,141,44,140,33,34,18,187,150,132,17,84,28,97,2,63,98,105,188,151,22,83,9,10,93,69,75,77,13,55,103,104,42,46,175,134,176,158])))}),Ace=st({getParentRoute:()=>vn,path:"/roles",component:dt(()=>lt(()=>import("./roles-DDxTqNFx.js"),__vite__mapDeps([189,188,105,96,83,129,1,40,64,46,77,187,150,59,140,33,34,18,35,132,141,44,126,94,65,56,57,58,53,60,61,62,11,14,2,39,63,66,37,67,15,45,30,68,12,69,70,71,72,73,74,75,76,31,10,78,13,16,100,55,101,92,22,54,151,52,48,102,9,29,127,93,134,176,158]))),validateSearch:hl(()=>be({role:$().optional()}))}),Ice=st({getParentRoute:()=>vn,path:"/sso",component:dt(()=>lt(()=>import("./sso-B0wN1G0O.js"),__vite__mapDeps([190,179,111,22,29,127,93,61,140,33,34,18,35,4,26,77,175,134,176,158])))}),Mce=st({getParentRoute:()=>vn,path:"/profile",component:dt(()=>lt(()=>import("./profile-DScmkuI4.js"),__vite__mapDeps([191,140,33,34,18,35,9,10,29,97,1,2,63,124,4,71,72,73,139,130,86,127,93,61])))}),Pce=st({getParentRoute:()=>vn,path:"/store",component:dt(()=>lt(()=>import("./store-Ck7Guxqc.js"),__vite__mapDeps([192,57,40,46,77,4,29,41,9,10,42,52,48,22,140,33,34,18,35,90,25,127,93,61,175,134,176,158])))}),Nce=st({getParentRoute:()=>vn,path:"/registry",component:dt(()=>lt(()=>import("./registry-BDe37MkZ.js"),__vite__mapDeps([193,175,134,176,158])))}),kce=st({getParentRoute:()=>vn,path:"/store/registry",component:dt(()=>lt(()=>import("./store-registry-CFkyafgO.js"),__vite__mapDeps([194,175,134,176,158])))}),Dce=st({getParentRoute:()=>vn,path:"/workflows",component:dt(()=>lt(()=>import("./workflow-H0Kk_Nq-.js"),__vite__mapDeps([195,22,81,82,160,129,1,40,64,59,35,145,96,54,44,93,94,65,56,57,58,53,60,61,62,11,14,2,39,63,66,37,67,15,45,30,68,12,69,34,18,70,71,72,73,46,74,75,76,77,31,10,78,13,16,187,150,172,137,9,132,162,163,88,83,48,52,168,140,33])))}),Lce=st({getParentRoute:()=>vn,path:"/workflows/$itemId",component:dt(()=>lt(()=>import("./workflow-detail-G3IbeOSM.js"),__vite__mapDeps([196,171,166,22,82,167,47,48,148,136,85,133,37,96,97,35,1,2,63,145,56,57,58,59,53,60,61,62,11,14,39,40,64,65,66,67,15,45,30,68,12,69,34,18,70,71,72,73,46,44,74,75,76,77,31,10,78,13,16,168,140,33,52,79,17,117,128,106,129,94,144,86,172,24,4])))}),$ce=st({getParentRoute:()=>OE,path:"/plugins/$pluginId",component:dt(()=>lt(()=>import("./org-plugin-layout-WHwrW77i.js"),__vite__mapDeps([197,198,52,48,22,74,140,33,34,18,35])))}),jce=st({getParentRoute:()=>vn,path:"/agents",component:dt(()=>lt(()=>import("./agents-list-DVZwv3E6.js"),__vite__mapDeps([199,129,1,40,64,45,11,51,47,48,22,50,52,17,18,53,54,44,55,56,57,58,59,60,61,62,14,2,39,63,65,66,37,67,15,30,68,12,69,34,70,71,72,73,46,74,75,76,77,31,10,78,13,16,79,80,81,82,140,33,35,93,143,109,134,132,49,83,141])))}),Uce=st({getParentRoute:()=>vn,path:"/automations",component:dt(()=>lt(()=>import("./automations-S87NSt_f.js"),__vite__mapDeps([200,46,16,141,44,140,33,34,18,35,132,147,22,50,47,48,152,83,129,1,40,64,56,57,58,59,53,60,61,62,11,14,2,39,63,65,66,37,67,15,45,30,68,12,69,70,71,72,73,74,75,76,77,31,10,78,13,175,134,176,158])))}),SL=st({getParentRoute:()=>wL,path:"/$pluginId",component:dt(()=>lt(()=>import("./dynamic-plugin-layout-CGMYG2P8.js"),__vite__mapDeps([201,198,52,48,22,74,140,33,34,18,35])))}),zce=[],Fce=[],Bce=[],EL=[];nce.forEach(e=>{if(!e.setup)return;const t={parentRoute:SL,routing:{createRoute:st,lazyRouteComponent:dt},registerRootSidebarItem:n=>zce.push({pluginId:e.id,...n}),registerSidebarGroup:n=>Fce.push({pluginId:e.id,...n}),registerSettingsSidebarItem:n=>Bce.push({pluginId:e.id,...n}),registerPluginRoutes:n=>{EL.push(...n)}};e.setup(t)});const Vce=SL.addChildren(EL),Hce=vn.addChildren([gce,vce,_ce,yce,jce,Uce,bce,wce,Sce,Ece,xce,Rce,Oce,Tce,Cce,Ace,Ice,Mce,Pce,kce,Nce,Dce,Lce]),qce=wL.addChildren([Vce]),Gce=OE.addChildren([qce,$ce]),Kce=gv.addChildren([fce,pce,Gce]),Zce=mv.addChildren([Kce,Hce,mce]),Yce=RE.addChildren([cce,Zce]),Wce=gs.addChildren([Yce,uce,rce,oce,ice,sce,ace,lce]),Qce=TU({routeTree:Wce,defaultPendingComponent:XS,defaultPendingMs:200,defaultNotFoundComponent:()=>C.jsx("div",{className:"flex h-full items-center justify-center",children:C.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[C.jsx("h3",{className:"text-lg font-medium text-foreground",children:"Page not found"}),C.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:"The page you are looking for does not exist or has been moved."}),C.jsx("button",{type:"button",onClick:()=>window.history.back(),className:"text-sm text-primary hover:underline",children:"Go back"})]})})});Hle();const Xce=document.getElementById("root");Gj.createRoot(Xce).render(C.jsx(M.StrictMode,{children:C.jsx(IU,{router:Qce})}));export{dl as $,Nue as A,cf as B,SK as C,T6 as D,dde as E,Ow as F,Oi as G,Ti as H,sde as I,lde as J,wP as K,EE as L,kg as M,lue as N,JP as O,ode as P,oue as Q,be as R,XS as S,ht as T,$ as U,ide as V,SP as W,rte as X,iue as Y,mue as Z,lt as _,z8 as a,CW as a$,Ile as a0,yoe as a1,wte as a2,gue as a3,vt as a4,MQ as a5,En as a6,ut as a7,LQ as a8,FQ as a9,Zn as aA,j8 as aB,UO as aC,k8 as aD,D8 as aE,rde as aF,Oe as aG,dn as aH,Mt as aI,Nt as aJ,cde as aK,wK as aL,ude as aM,$C as aN,bw as aO,RW as aP,ii as aQ,Xd as aR,Ng as aS,pS as aT,Hc as aU,ha as aV,ps as aW,si as aX,U4 as aY,TW as aZ,IW as a_,PQ as aa,NQ as ab,oi as ac,IQ as ad,pk as ae,gl as af,kQ as ag,DQ as ah,$Q as ai,jQ as aj,UQ as ak,zQ as al,BQ as am,HQ as an,qQ as ao,x6 as ap,Jc as aq,Wn as ar,Rm as as,aP as at,mP as au,C8 as av,M8 as aw,L8 as ax,P8 as ay,N8 as az,Bg as b,Qoe as b$,mW as b0,ee as b1,eue as b2,Bce as b3,fde as b4,hde as b5,Xt as b6,nde as b7,tde as b8,nQ as b9,uE as bA,bg as bB,Ule as bC,Uue as bD,jue as bE,Lue as bF,gN as bG,yL as bH,$ue as bI,Fue as bJ,yo as bK,Ja as bL,fn as bM,uue as bN,eN as bO,gie as bP,vie as bQ,lE as bR,X6 as bS,cE as bT,cv as bU,L6 as bV,Mie as bW,j6 as bX,Oie as bY,Uie as bZ,Yoe as b_,lk as ba,L4 as bb,hf as bc,aa as bd,tQ as be,hs as bf,nS as bg,bo as bh,Ge as bi,zB as bj,NN as bk,qw as bl,r4 as bm,c5 as bn,d5 as bo,gX as bp,Jn as bq,BX as br,Y4 as bs,D4 as bt,zue as bu,ma as bv,Jce as bw,RY as bx,qP as by,ga as bz,Lle as c,Jue as c$,eie as c0,die as c1,xie as c2,Tie as c3,Woe as c4,Xoe as c5,tie as c6,nie as c7,fie as c8,bie as c9,H6 as cA,q6 as cB,K6 as cC,Gue as cD,Kue as cE,Hue as cF,que as cG,Aoe as cH,Vue as cI,z6 as cJ,V6 as cK,G6 as cL,Wue as cM,F6 as cN,wae as cO,Xue as cP,JS as cQ,Boe as cR,Bue as cS,k6 as cT,dse as cU,yie as cV,Que as cW,rse as cX,sse as cY,Fie as cZ,zie as c_,Zue as ca,nce as cb,Fce as cc,Mue as cd,fL as ce,AB as cf,cue as cg,pue as ch,PV as ci,hl as cj,iV as ck,zw as cl,due as cm,yf as cn,wY as co,EY as cp,xY as cq,ff as cr,xK as cs,EK as ct,KN as cu,yP as cv,rz as cw,D6 as cx,U6 as cy,B6 as cz,ZP as d,UN as d$,Zae as d0,ede as d1,Yue as d2,OY as d3,TY as d4,CY as d5,SY as d6,OX as d7,TX as d8,RX as d9,dX as dA,fX as dB,wue as dC,Sue as dD,Oue as dE,Tue as dF,Cue as dG,Aue as dH,Eue as dI,xue as dJ,Rue as dK,aV as dL,jw as dM,jB as dN,fue as dO,uV as dP,Fw as dQ,Uw as dR,pV as dS,hue as dT,Ise as dU,_t as dV,Ar as dW,aue as dX,_K as dY,gK as dZ,fK as d_,sk as da,BW as db,iS as dc,Q4 as dd,rS as de,VW as df,_ue as dg,HW as dh,_4 as di,sS as dj,Qd as dk,c4 as dl,oS as dm,R6 as dn,ri as dp,bue as dq,yue as dr,$le as ds,nue as dt,tue as du,yX as dv,WP as dw,cX as dx,uX as dy,hX as dz,Jr as e,Fle as e0,Qle as e1,Pg as f,Pw as g,kue as h,Pue as i,C as j,Due as k,O6 as l,ade as m,U8 as n,XT as o,Tle as p,Coe as q,M as r,bP as s,Roe as t,sue as u,QS as v,bK as w,vue as x,ple as y,C6 as z};