decocms 4.377.0 → 4.378.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/client/assets/{AlertCircle-BpGw--vV.js → AlertCircle-BL9C11v5.js} +1 -1
  2. package/dist/client/assets/{AreaChart-DVh_2CwD.js → AreaChart-BCsb1eiZ.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-BBVlcmSt.js → ArrowLeft-TUZw6Woj.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-uJGmmnv8.js → ArrowRight-BV-Z5nWg.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CoAUqmuY.js → ArrowUp-DcL5fPvo.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-BgA0Qtuf.js → CartesianChart-C8E3Kw-7.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-ETp2UGkq.js → CheckCircle-Dl7A-bG0.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-iqE9pTFp.js → ChevronUp-bb9oyJa0.js} +1 -1
  9. package/dist/client/assets/{Copy01--en4dKgi.js → Copy01-Dn4l-4a-.js} +1 -1
  10. package/dist/client/assets/{CreditCard01-CF04wUbq.js → CreditCard01-XNOZWeGM.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-Dl7YYUvF.js → DotsVertical-Dt4wv0EU.js} +1 -1
  12. package/dist/client/assets/{Download01-CZ-cWwqe.js → Download01-iMp1Qx1F.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-C_51j9Ff.js → ErrorBarContext-l-kn9PLx.js} +1 -1
  14. package/dist/client/assets/{Eye-BL52dF4t.js → Eye-3KuA1Y7O.js} +1 -1
  15. package/dist/client/assets/{Globe01-D-xqqC1P.js → Globe01-BNKnmHqV.js} +1 -1
  16. package/dist/client/assets/{Globe04-CnGbH-w4.js → Globe04-0q2xP2kX.js} +1 -1
  17. package/dist/client/assets/{Image01-D3fbwb1A.js → Image01-CEn4L9qZ.js} +1 -1
  18. package/dist/client/assets/{Key01-BRHz0J7i.js → Key01-Crg-gzCo.js} +1 -1
  19. package/dist/client/assets/{LayoutLeft-BR9B9Uz4.js → LayoutLeft-C-m_bDFS.js} +1 -1
  20. package/dist/client/assets/{Line-BXRvqz0O.js → Line-DJxwfsSL.js} +1 -1
  21. package/dist/client/assets/{Link01-CIdGrv0f.js → Link01-Bh8XxL8g.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-fMLHNRBT.js → LinkExternal01-C6vmvib1.js} +1 -1
  23. package/dist/client/assets/{Monitor01-CUm8GJYb.js → Monitor01-Dzd2i2TD.js} +1 -1
  24. package/dist/client/assets/{Package-BeI4XESV.js → Package-zRgcryK5.js} +1 -1
  25. package/dist/client/assets/{Palette-BOYmXu66.js → Palette-BPlCKhxV.js} +1 -1
  26. package/dist/client/assets/{Play-BoxOAYQY.js → Play-HTakcWif.js} +1 -1
  27. package/dist/client/assets/{Plus-B0XT7kf8.js → Plus-BjUVJgIK.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BlJaD9eR.js → SearchLg-b9Yg6t2Y.js} +1 -1
  29. package/dist/client/assets/{SearchMd-B8DQYRPW.js → SearchMd-DbrPLKwX.js} +1 -1
  30. package/dist/client/assets/{Sector-p8z_kA8J.js → Sector-BxuPFiQ1.js} +1 -1
  31. package/dist/client/assets/{Settings02-CnHgg4-R.js → Settings02-Cfj0U0no.js} +1 -1
  32. package/dist/client/assets/{Share07-BLTCTwud.js → Share07-q4yqk4wN.js} +1 -1
  33. package/dist/client/assets/{Stars01-LCEyBl5Z.js → Stars01-zx4PrHn4.js} +1 -1
  34. package/dist/client/assets/{Sun-Dcl1Qw_c.js → Sun-DxH7Ufsz.js} +1 -1
  35. package/dist/client/assets/{Tool01-aYyiPW8-.js → Tool01-CxNPwJlb.js} +1 -1
  36. package/dist/client/assets/{Tool02-CPIWbRhH.js → Tool02-DQfCYGH0.js} +1 -1
  37. package/dist/client/assets/{Trash01-O1aZhBi7.js → Trash01-CRMYtUIf.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-Bag9pnaT.js → TrendUp01-CSfieBqS.js} +1 -1
  39. package/dist/client/assets/{Upload01-CUPYDw9I.js → Upload01-B7KGq2Xu.js} +1 -1
  40. package/dist/client/assets/{User01-CZOhVcFU.js → User01-BaBASwac.js} +1 -1
  41. package/dist/client/assets/{UserSquare-xY7aCsvJ.js → UserSquare-jWZ4K295.js} +1 -1
  42. package/dist/client/assets/{Users01-BPs9TI2M.js → Users01-DZM8fE-C.js} +1 -1
  43. package/dist/client/assets/{X-x1f6IJn8.js → X-DrgZ2IHU.js} +1 -1
  44. package/dist/client/assets/{XCircle-bhS1DjQq.js → XCircle-D-Ljd-mw.js} +1 -1
  45. package/dist/client/assets/{XClose-DJX__swp.js → XClose-CwSiPt5t.js} +1 -1
  46. package/dist/client/assets/{Zap-CfJC6pES.js → Zap-CJL5AQoB.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-BXSD96xb.js → ZoomOut-CkEHdkkv.js} +1 -1
  48. package/dist/client/assets/{access-gate-CIxYybF1.js → access-gate-ApTW_ZBN.js} +1 -1
  49. package/dist/client/assets/{add-connection-dialog-BP7iM-9U.js → add-connection-dialog-DAMZAdjf.js} +1 -1
  50. package/dist/client/assets/{agent-analytics-gmwKv0wU.js → agent-analytics-CyPBDf01.js} +1 -1
  51. package/dist/client/assets/agent-app-mOzGwpWw.js +1 -0
  52. package/dist/client/assets/{agent-assets-CJkjsRGZ.js → agent-assets-CLHeNP70.js} +1 -1
  53. package/dist/client/assets/{agent-automation-CKv85wVR.js → agent-automation-BRedTzhp.js} +1 -1
  54. package/dist/client/assets/{agent-automations-dWdakcNy.js → agent-automations-D65B39vC.js} +1 -1
  55. package/dist/client/assets/{agent-connect-sources-DuEfOhDE.js → agent-connect-sources-DwOg9602.js} +1 -1
  56. package/dist/client/assets/agent-deck-DiylZjYN.js +1 -0
  57. package/dist/client/assets/{agent-e2e-DngESQK5.js → agent-e2e-CTi5nqOc.js} +1 -1
  58. package/dist/client/assets/{agent-experiments-DndV4qWf.js → agent-experiments-lSFgWzEh.js} +1 -1
  59. package/dist/client/assets/agent-file-CEXQLvN-.js +1 -0
  60. package/dist/client/assets/{agent-git-Bun_byZu.js → agent-git-BlXHgqe0.js} +1 -1
  61. package/dist/client/assets/{agent-hosting-_yuR1DpC.js → agent-hosting-CjVegYqO.js} +1 -1
  62. package/dist/client/assets/{agent-icon-DfdSMHk3.js → agent-icon-BpV8H0Kb.js} +1 -1
  63. package/dist/client/assets/agent-library-file-Cnj_s_ZV.js +1 -0
  64. package/dist/client/assets/{agent-monitor-BePlvtxo.js → agent-monitor-C39p1dMa.js} +1 -1
  65. package/dist/client/assets/{agent-overview-D-xUFh5m.js → agent-overview-Dw5ZPOKa.js} +1 -1
  66. package/dist/client/assets/agent-settings-CoVnhy6_.js +1 -0
  67. package/dist/client/assets/agent-site-editor-Bly4gEXY.js +24 -0
  68. package/dist/client/assets/agent-site-editor-code-Dsipxnbb.js +2 -0
  69. package/dist/client/assets/{agent-site-editor-content-Dtl21q2k.js → agent-site-editor-content-oAD5ERex.js} +2 -2
  70. package/dist/client/assets/{agent-site-editor-preview-D4tdhz1h.js → agent-site-editor-preview-DMY-bRXd.js} +3 -3
  71. package/dist/client/assets/agent-view-fqs1B853.js +1 -0
  72. package/dist/client/assets/{agent-view-guard-BtbjAA1B.js → agent-view-guard-NlE6Cpah.js} +1 -1
  73. package/dist/client/assets/{agents-list-Dt2PPUuO.js → agents-list-iVlh68DJ.js} +1 -1
  74. package/dist/client/assets/{ai-providers-C-TXNfNO.js → ai-providers-BA415uVk.js} +1 -1
  75. package/dist/client/assets/{alert-dialog-CqnandRo.js → alert-dialog-CEnBoihu.js} +1 -1
  76. package/dist/client/assets/{alert-B2kqVKWb.js → alert-nZf0wg2B.js} +1 -1
  77. package/dist/client/assets/{api-keys-DSPf-tM3.js → api-keys-CNPQdajZ.js} +1 -1
  78. package/dist/client/assets/api-keys-YFO0QnLb.js +1 -0
  79. package/dist/client/assets/app-editor-zj6N2Lm8.js +1 -0
  80. package/dist/client/assets/{asset-utils-BT4Ne0sM.js → asset-utils-HbMTuFLs.js} +1 -1
  81. package/dist/client/assets/{auth-B51j9jUd.js → auth-CKq_yfpj.js} +1 -1
  82. package/dist/client/assets/{auth-catchall-sRD64Ua_.js → auth-catchall-CmYjgstL.js} +1 -1
  83. package/dist/client/assets/{auth-entry-DM-t9BR_.js → auth-entry-Dll4-psh.js} +1 -1
  84. package/dist/client/assets/{auth-split-layout-DhgxwIyv.js → auth-split-layout-ozxyHiR-.js} +1 -1
  85. package/dist/client/assets/{authenticate-and-persist-oauth-Du-8ZY-3.js → authenticate-and-persist-oauth-DStZKch8.js} +1 -1
  86. package/dist/client/assets/{automation-list-row-DUyTkYnj.js → automation-list-row-SV4qEKuR.js} +1 -1
  87. package/dist/client/assets/{automation-runs-iliFo_Lf.js → automation-runs-BC4AfZCr.js} +1 -1
  88. package/dist/client/assets/{automations-Bw4S0ob0.js → automations-BFk3tCRs.js} +1 -1
  89. package/dist/client/assets/{autosend-CVFKErlq.js → autosend-TBNFb-yT.js} +1 -1
  90. package/dist/client/assets/{avatar-CTtVGSeH.js → avatar-BDUloavG.js} +1 -1
  91. package/dist/client/assets/{badge-Bn4xdWKf.js → badge-DuL4ETl9.js} +1 -1
  92. package/dist/client/assets/{block-document-DcjBpFtX.js → block-document-BYxITRZz.js} +1 -1
  93. package/dist/client/assets/{blocks-preview-workspace-context-CE4TkRwM.js → blocks-preview-workspace-context-CcEzS5re.js} +1 -1
  94. package/dist/client/assets/{breadcrumb-DZSBetBn.js → breadcrumb-CeAmNahf.js} +1 -1
  95. package/dist/client/assets/{buckets-CfuKv1Yu.js → buckets-Cbnkelsv.js} +1 -1
  96. package/dist/client/assets/{build-improve-prompt-doc-CnzelPJa.js → build-improve-prompt-doc-CbVfRpur.js} +1 -1
  97. package/dist/client/assets/{bulk-category-panel-DriiAxWT.js → bulk-category-panel-BbsQR7pn.js} +1 -1
  98. package/dist/client/assets/{calendar-TTCnbmpS.js → calendar-DX5Za7yg.js} +1 -1
  99. package/dist/client/assets/{capability-load-error-BqupCjyY.js → capability-load-error-ClI5KIrr.js} +1 -1
  100. package/dist/client/assets/category-editor-BPPX0THU.js +1 -0
  101. package/dist/client/assets/{chart-0rI7XswZ.js → chart-BeW96Xyg.js} +1 -1
  102. package/dist/client/assets/{chat-context-bDkom7PB.js → chat-context-DULfSCD5.js} +1 -1
  103. package/dist/client/assets/{chat-draft-DmLylIfC.js → chat-draft-CEYNAfUq.js} +1 -1
  104. package/dist/client/assets/{checkbox-DguCm5iq.js → checkbox-_DYgtxp0.js} +1 -1
  105. package/dist/client/assets/{choose-editor-BkDCbLK_.js → choose-editor-CauIefX-.js} +1 -1
  106. package/dist/client/assets/{cli-auth-success-DH7kWVXp.js → cli-auth-success-BtgfCOuS.js} +1 -1
  107. package/dist/client/assets/{client-icons-DvtvjJpb.js → client-icons-zdNSJEEn.js} +1 -1
  108. package/dist/client/assets/{collapsible-CU2r5Cts.js → collapsible---A-jh-n.js} +1 -1
  109. package/dist/client/assets/{collection-detail-BeZE_OzU.js → collection-detail-BqKQO8JF.js} +1 -1
  110. package/dist/client/assets/{collection-display-button-facophLz.js → collection-display-button-C8OBiIuA.js} +1 -1
  111. package/dist/client/assets/{collection-search-D4IWKZBl.js → collection-search-BPekTu5Q.js} +1 -1
  112. package/dist/client/assets/{collection-table-wrapper-CKRTLUNR.js → collection-table-wrapper-LBsnn_CU.js} +1 -1
  113. package/dist/client/assets/{collection-tabs-DuZ3-S7z.js → collection-tabs-Djj9-mzS.js} +1 -1
  114. package/dist/client/assets/{combobox-5xSVBVf2.js → combobox-_VPjsPr7.js} +1 -1
  115. package/dist/client/assets/{command-Bgz8JJH0.js → command-B5HRG-qx.js} +1 -1
  116. package/dist/client/assets/{companion-mcps-section-D8OUnB38.js → companion-mcps-section-BuA06R5b.js} +1 -1
  117. package/dist/client/assets/{connect-2dCioIhn.js → connect-DtRIpCDv.js} +1 -1
  118. package/dist/client/assets/{connect-layout-nlesAGLA.js → connect-layout-FslM2t-i.js} +1 -1
  119. package/dist/client/assets/{connection-DH9btBfI.js → connection-DlXZEqsN.js} +1 -1
  120. package/dist/client/assets/{connection-card-DdYTI-Nb.js → connection-card-D-l0MD9k.js} +1 -1
  121. package/dist/client/assets/{connection-detail-DTaKY7hs.js → connection-detail-r5iK6FaZ.js} +1 -1
  122. package/dist/client/assets/{connection-form-helpers-I8o9oFyO.js → connection-form-helpers-Bmo7KEqX.js} +1 -1
  123. package/dist/client/assets/{connections-Cma51BMt.js → connections-dt9Je8G_.js} +1 -1
  124. package/dist/client/assets/{create-organization-dialog-BRJel0ET.js → create-organization-dialog-BLROZtzP.js} +1 -1
  125. package/dist/client/assets/{decofile-api-kxpv61v3.js → decofile-api-kAUyINZr.js} +1 -1
  126. package/dist/client/assets/{decopilot-DItMbQCu.js → decopilot-uHjtkyFB.js} +1 -1
  127. package/dist/client/assets/{dialog-DqR4X4jD.js → dialog-BJW64_pz.js} +1 -1
  128. package/dist/client/assets/{discover-C5CHE7rM.js → discover-CzGsx9DW.js} +1 -1
  129. package/dist/client/assets/{domain-settings-DUVdv8iq.js → domain-settings-Bdrgl21H.js} +1 -1
  130. package/dist/client/assets/{download-app-dialog-DBq9OIW-.js → download-app-dialog-BXRsjbOU.js} +1 -1
  131. package/dist/client/assets/{drawer-DcltEitH.js → drawer-CA10Cx7y.js} +1 -1
  132. package/dist/client/assets/{editor-D7IDrZ5A.js → editor-C1ywYtVp.js} +1 -1
  133. package/dist/client/assets/{empty-state-Co5qq3oI.js → empty-state-ClQL-f6j.js} +1 -1
  134. package/dist/client/assets/{empty-state-DIzR_wr9.js → empty-state-Dlx610Ei.js} +1 -1
  135. package/dist/client/assets/{extract-connection-data-DZuvEegC.js → extract-connection-data-Gt9dSRWj.js} +1 -1
  136. package/dist/client/assets/{feature-gate-Cx8YkCCu.js → feature-gate-CmEcE6-E.js} +1 -1
  137. package/dist/client/assets/{feature-paywall-DZigtnb6.js → feature-paywall-CrsknzkG.js} +1 -1
  138. package/dist/client/assets/{file-explorer-qGPjaegg.js → file-explorer-CNYg6RIh.js} +1 -1
  139. package/dist/client/assets/{file-preview-B2nEfu5l.js → file-preview-Ds5U_YIc.js} +1 -1
  140. package/dist/client/assets/{file-share-button-DZqsZ8jc.js → file-share-button-Bka3waFe.js} +1 -1
  141. package/dist/client/assets/{file-type-icon-DoCd9H0G.js → file-type-icon-CFqni3Pt.js} +1 -1
  142. package/dist/client/assets/{folder-icon-CXxjmxd3.js → folder-icon-ClSesIJT.js} +1 -1
  143. package/dist/client/assets/{form-Co95Q_Yg.js → form-PqqHm2ke.js} +1 -1
  144. package/dist/client/assets/{gateway-client-BpNIm5Jn.js → gateway-client-1Q0B7yUT.js} +1 -1
  145. package/dist/client/assets/{general-DmEpfTOj.js → general-Ds1cv5sP.js} +1 -1
  146. package/dist/client/assets/{github-icon-DRbuJmJM.js → github-icon-DWCqyx5T.js} +1 -1
  147. package/dist/client/assets/{home-Ui_P1zNp.js → home-BR3CYkzh.js} +1 -1
  148. package/dist/client/assets/{hooks-CEOxduy2.js → hooks-7pWlJVDL.js} +1 -1
  149. package/dist/client/assets/{hooks-Bm0239iZ.js → hooks-Cd7x818_.js} +1 -1
  150. package/dist/client/assets/{icon-button-CUavSbqA.js → icon-button-Bk7-zdBH.js} +1 -1
  151. package/dist/client/assets/{index-DEuBeZyZ.js → index-62BdN9Ut.js} +1 -1
  152. package/dist/client/assets/{index-HN5gToi8.js → index-B4qGPwHI.js} +1 -1
  153. package/dist/client/assets/{index-Ccb8J2-u.js → index-BFMwAh_0.js} +1 -1
  154. package/dist/client/assets/{index-CmhYNoiR.js → index-Bc_L0MMf.js} +1 -1
  155. package/dist/client/assets/{index-DezIICsH.js → index-BloKHCFa.js} +1 -1
  156. package/dist/client/assets/{index-Dg9ofyOC.js → index-CE75dRQm.js} +1 -1
  157. package/dist/client/assets/{index-CYOjzKwG.js → index-CjQWIUB0.js} +9 -9
  158. package/dist/client/assets/{index-eG2IWUX5.js → index-D-TKqkm8.js} +1 -1
  159. package/dist/client/assets/{index-CP_l4FUF.js → index-D5GksOol.js} +1 -1
  160. package/dist/client/assets/{index-2LLbB-lb.js → index-DB5ywwwN.js} +1 -1
  161. package/dist/client/assets/{index-B6dWWluW.js → index-DMLW-bKi.js} +1 -1
  162. package/dist/client/assets/{index-DoQDGqwe.js → index-DOIParHz.js} +1 -1
  163. package/dist/client/assets/{index-CWHIV6oZ.js → index-DQYXHmk_.js} +1 -1
  164. package/dist/client/assets/{index-redirect-BrDjHxW8.js → index-redirect-ad5yNpaJ.js} +1 -1
  165. package/dist/client/assets/{index-YFgkZJZa.js → index-xG65Tv25.js} +1 -1
  166. package/dist/client/assets/{infiniteQueryObserver-Bh30DgM5.js → infiniteQueryObserver-Af1XrGxW.js} +1 -1
  167. package/dist/client/assets/{infra-billing-B9q0Y09E.js → infra-billing-B49h8jGh.js} +1 -1
  168. package/dist/client/assets/{input-Dh-XqN1D.js → input-D89CfzOY.js} +1 -1
  169. package/dist/client/assets/{input-DsiBTQvq.js → input-Djk7_c4C.js} +1 -1
  170. package/dist/client/assets/{input-D0QZTiCP.js → input-x7HdNC4u.js} +1 -1
  171. package/dist/client/assets/{integration-icon-51fv1ZD9.js → integration-icon-B1mADLb6.js} +1 -1
  172. package/dist/client/assets/{label-D5WrAAlW.js → label-C3pyZMIz.js} +1 -1
  173. package/dist/client/assets/{last-preview-page-BXmf8KT4.js → last-preview-page-BNpv-zpc.js} +1 -1
  174. package/dist/client/assets/{layout-Bt9GDku1.js → layout-DeMvB5F_.js} +1 -1
  175. package/dist/client/assets/{legacy-agents-deep-DXqm-_4D.js → legacy-agents-deep-qXc7zhtl.js} +1 -1
  176. package/dist/client/assets/{legacy-main-redirect-DUnphxj9.js → legacy-main-redirect-Bdm09hjr.js} +1 -1
  177. package/dist/client/assets/{library-G0Z3LZYZ.js → library-BokZ1AIy.js} +1 -1
  178. package/dist/client/assets/{login-BOvlg5d3.js → login-C9rpjQul.js} +1 -1
  179. package/dist/client/assets/{markdown-B8bZJCAc.js → markdown-CmV6VyeN.js} +1 -1
  180. package/dist/client/assets/{mcp-app-renderer-DrhwVs_O.js → mcp-app-renderer-CZXE8Q2L.js} +1 -1
  181. package/dist/client/assets/{mcp-oauth-DYbEQhpI.js → mcp-oauth-vwa44Lu2.js} +1 -1
  182. package/dist/client/assets/{members-Dr93JJNd.js → members-tiUutfvd.js} +1 -1
  183. package/dist/client/assets/{message-templates-bV4CIdDO.js → message-templates-ztimz7-8.js} +1 -1
  184. package/dist/client/assets/{mini-report-page-BPw9qVKi.js → mini-report-page-BU5QVlVY.js} +1 -1
  185. package/dist/client/assets/{mock-board-CWk29Gb2.js → mock-board-CYGeAeWm.js} +3 -3
  186. package/dist/client/assets/{monaco-editor-BdguqmZl.js → monaco-editor-BnSB3UlK.js} +1 -1
  187. package/dist/client/assets/{monitoring-stats-row-CkbBz1UJ.js → monitoring-stats-row-C_3OByxZ.js} +1 -1
  188. package/dist/client/assets/{multi-select-DzRx1K38.js → multi-select-D2lhtEI_.js} +1 -1
  189. package/dist/client/assets/{mustache-CMyVHRRJ.js → mustache-B8ouMKD_.js} +1 -1
  190. package/dist/client/assets/{oauth-callback-ClmQEIKF.js → oauth-callback-5b15t98P.js} +1 -1
  191. package/dist/client/assets/{oauth-callback-ai-provider-BEcODIVJ.js → oauth-callback-ai-provider-B5ZOTUG2.js} +1 -1
  192. package/dist/client/assets/{onboarding-CGzZ0sv3.js → onboarding-BiG1CXWT.js} +1 -1
  193. package/dist/client/assets/{optimistic-project-sidebar-views-Cgmf7zN9.js → optimistic-project-sidebar-views-BP6ahYVp.js} +1 -1
  194. package/dist/client/assets/{org-file-open-context-DTalcU5B.js → org-file-open-context-Crt2BXIO.js} +1 -1
  195. package/dist/client/assets/{organization-choice-D-JcqdGW.js → organization-choice-uSI3Hvk_.js} +1 -1
  196. package/dist/client/assets/{orgs-BtMMolaf.js → orgs-DVuGQ4r0.js} +1 -1
  197. package/dist/client/assets/{page-seo-form-DgcBoMvO.js → page-seo-form-DAS2k5dJ.js} +1 -1
  198. package/dist/client/assets/{pair-DemjNpBj.js → pair-rZlEea28.js} +1 -1
  199. package/dist/client/assets/{plan-ladder-BAj8pVXN.js → plan-ladder-Z3EBG2QJ.js} +1 -1
  200. package/dist/client/assets/{popover-BDsdyOa0.js → popover-qR-A91mO.js} +1 -1
  201. package/dist/client/assets/{post-calendar-DcQoeE7n.js → post-calendar-CPQnSzEI.js} +1 -1
  202. package/dist/client/assets/{post-editor-B4rRC8Z0.js → post-editor-CvxwbvhC.js} +1 -1
  203. package/dist/client/assets/{preview-content-lWpEisgY.js → preview-content-BoKQ4lvh.js} +1 -1
  204. package/dist/client/assets/{preview-dialog-CGjkTXFC.js → preview-dialog-BLXSWbJM.js} +1 -1
  205. package/dist/client/assets/{primitives-mwl1HK2Q.js → primitives-CXvEunpg.js} +1 -1
  206. package/dist/client/assets/{profile-C6XwXDvx.js → profile-DioTORUW.js} +1 -1
  207. package/dist/client/assets/{project-app-view-CeQOBEDv.js → project-app-view-CH0NcGlm.js} +1 -1
  208. package/dist/client/assets/{project-feed-DZGrJGjO.js → project-feed-DWV2Ijqa.js} +1 -1
  209. package/dist/client/assets/{project-icon-CYFTX0ei.js → project-icon-Bhvhs0Sb.js} +1 -1
  210. package/dist/client/assets/project-reports-GFbxxtyO.js +1 -0
  211. package/dist/client/assets/project-tasks-Co3kTouv.js +1 -0
  212. package/dist/client/assets/{prompts-Dv-GcOvr.js → prompts-63xdIpGm.js} +1 -1
  213. package/dist/client/assets/record-editor-CNHZphC1.js +1 -0
  214. package/dist/client/assets/{redirect-editor-BdjRJxFl.js → redirect-editor-DcEiXWVP.js} +1 -1
  215. package/dist/client/assets/registry-B-BoWinl.js +2 -0
  216. package/dist/client/assets/{registry-layout-BMafZ5yV.js → registry-layout-B_NSu6Ni.js} +1 -1
  217. package/dist/client/assets/{reports-FHtNLX4Y.js → reports-4M5W5fE_.js} +1 -1
  218. package/dist/client/assets/reports-Bu9LJ9Ir.js +1 -0
  219. package/dist/client/assets/{reports-onboarding-cDW-coF4.js → reports-onboarding-Q9OPS-W6.js} +1 -1
  220. package/dist/client/assets/{reports-tab-DRrkUjk6.js → reports-tab-BaZkX-oW.js} +2 -2
  221. package/dist/client/assets/{repositories-BhilcMMp.js → repositories-0g4CNguU.js} +1 -1
  222. package/dist/client/assets/{repository-import-picker-Bax0Ys6D.js → repository-import-picker-BaIAm8RZ.js} +1 -1
  223. package/dist/client/assets/{repository-picker-Bn8vQeF9.js → repository-picker-H-yjRtBz.js} +1 -1
  224. package/dist/client/assets/{require-capability-DJvejuvq.js → require-capability-BtBUl5HB.js} +1 -1
  225. package/dist/client/assets/{required-auth-layout-DijuWP2w.js → required-auth-layout-CveQBep9.js} +1 -1
  226. package/dist/client/assets/{reset-password-DglLwMaI.js → reset-password-CG3hWwFA.js} +1 -1
  227. package/dist/client/assets/{resizable-B7owW6MA.js → resizable-CV3Zt6hw.js} +1 -1
  228. package/dist/client/assets/{review-settings-CXfVBzZC.js → review-settings-BZvEKnql.js} +1 -1
  229. package/dist/client/assets/{rich-text-link-control-CyCGWHOW.js → rich-text-link-control-DSAdUuWs.js} +1 -1
  230. package/dist/client/assets/{roles-ejZYkZ6t.js → roles-D2QfWwJI.js} +1 -1
  231. package/dist/client/assets/{route-BJXtplSb.js → route--MqbvbyV.js} +1 -1
  232. package/dist/client/assets/{route-DtQGV8Z2.js → route-Du7d3cDr.js} +1 -1
  233. package/dist/client/assets/{route-ChK4fAMe.js → route-mAV3gllf.js} +1 -1
  234. package/dist/client/assets/{route-page-header-B-rxUb24.js → route-page-header-B6RMBdio.js} +1 -1
  235. package/dist/client/assets/{runnable-block-editor-BQFY4Ksm.js → runnable-block-editor-Da1CFdE3.js} +1 -1
  236. package/dist/client/assets/{sandbox-lifecycle-context-AQUs6AFU.js → sandbox-lifecycle-context-7XEpsGyB.js} +1 -1
  237. package/dist/client/assets/{schema-C4X_eAAo.js → schema-CDnRKndH.js} +1 -1
  238. package/dist/client/assets/{scroll-area-Du8UsKeI.js → scroll-area-Bd3Jch8g.js} +1 -1
  239. package/dist/client/assets/{search-input-CM184Dyg.js → search-input-87g5mPOs.js} +1 -1
  240. package/dist/client/assets/{search-toggle-h5tgNilJ.js → search-toggle-BDiBVbuX.js} +1 -1
  241. package/dist/client/assets/{secrets-C-lTnGEG.js → secrets-Bvj_mEwv.js} +1 -1
  242. package/dist/client/assets/{sections-editor-D0m9PhGS.js → sections-editor-DmpkPzb4.js} +1 -1
  243. package/dist/client/assets/{select-g-w30c24.js → select-CoXQnVLL.js} +1 -1
  244. package/dist/client/assets/{select-model-gEzliQOG.js → select-model-Wm7faOLQ.js} +1 -1
  245. package/dist/client/assets/{seo-editor-BPo4kRlr.js → seo-editor-CPsuMHdn.js} +1 -1
  246. package/dist/client/assets/{separator-7sui0Fav.js → separator-DQ0-uLKs.js} +1 -1
  247. package/dist/client/assets/{settings-tab-CfC2MRU1.js → settings-tab-ChP_AH3u.js} +1 -1
  248. package/dist/client/assets/{sheet-BUl-sicB.js → sheet-tn1TcRey.js} +1 -1
  249. package/dist/client/assets/{shell-layout-BZqlKsir.js → shell-layout-DWdV0NI3.js} +1 -1
  250. package/dist/client/assets/{sidebar-CPKilcwl.js → sidebar-BUb7URWX.js} +1 -1
  251. package/dist/client/assets/{skill-preview-Bz3po8au.js → skill-preview-CVlIy2W9.js} +1 -1
  252. package/dist/client/assets/{skills-DJUf3GIG.js → skills-Krb4erdR.js} +1 -1
  253. package/dist/client/assets/{sso-CuVFM4fO.js → sso-Df42gDam.js} +1 -1
  254. package/dist/client/assets/{store-BObHOaSl.js → store-Dlzza2q4.js} +1 -1
  255. package/dist/client/assets/store-registry-DjpsAIwJ.js +2 -0
  256. package/dist/client/assets/{switch-BkWjUh3b.js → switch-qxBseLl7.js} +1 -1
  257. package/dist/client/assets/{synced-repos-DMBpwLPD.js → synced-repos-DqXTKrkq.js} +1 -1
  258. package/dist/client/assets/{table-Cgik5tMu.js → table--SjnJFTw.js} +1 -1
  259. package/dist/client/assets/{tabs-D6DrxGeZ.js → tabs-C6yBBVdT.js} +1 -1
  260. package/dist/client/assets/{task-board-2k-uoSLs.js → task-board-DQrnQAri.js} +1 -1
  261. package/dist/client/assets/{task-route-DrRxY0nT.js → task-route-DRhJcx7H.js} +1 -1
  262. package/dist/client/assets/{task-status-BhuVWcoS.js → task-status-CkoiMk-J.js} +1 -1
  263. package/dist/client/assets/{taskboard-analytics-BFNAPJBW.js → taskboard-analytics-BtEL_4wP.js} +1 -1
  264. package/dist/client/assets/{tasks-DG1OcC7g.js → tasks-CZ8ZJqTl.js} +1 -1
  265. package/dist/client/assets/tasks-DXoS1Ulq.js +1 -0
  266. package/dist/client/assets/{textarea-CovrZz8K.js → textarea-DHB5xdEY.js} +1 -1
  267. package/dist/client/assets/{thread-button-BB6LlWOo.js → thread-button-BBLFOVZM.js} +1 -1
  268. package/dist/client/assets/{thread-intent-8XYbh09e.js → thread-intent-OHNeU6ZY.js} +1 -1
  269. package/dist/client/assets/{thread-route-WZYEwowr.js → thread-route-BMvI62tD.js} +1 -1
  270. package/dist/client/assets/{thread-route-BsC8SJWi.js → thread-route-Bcs3wyQ-.js} +1 -1
  271. package/dist/client/assets/{thread-sheet-body-5hLxkhK5.js → thread-sheet-body-B8Zy8rxz.js} +1 -1
  272. package/dist/client/assets/{toggle-group-CWZE6JlL.js → toggle-group-DVkdzTSY.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-9rzGLI8m.js → toolbar-icon-button-CfzWkGOL.js} +1 -1
  274. package/dist/client/assets/{tooltip-BnHO0L1T.js → tooltip-BZmzyIaP.js} +1 -1
  275. package/dist/client/assets/{track-BbStZhrC.js → track-BBfq2yMi.js} +1 -1
  276. package/dist/client/assets/{types-DvShnTes.js → types-Do0xd9Aa.js} +1 -1
  277. package/dist/client/assets/{usage-stats-CcuLTdk3.js → usage-stats-Dlprp1eo.js} +1 -1
  278. package/dist/client/assets/{use-ai-providers-C3B5OJd2.js → use-ai-providers-DUUKwFbJ.js} +1 -1
  279. package/dist/client/assets/{use-automations-CFkOYf-5.js → use-automations-C-YX5CdN.js} +1 -1
  280. package/dist/client/assets/{use-autosave-CKZwfgya.js → use-autosave-BI7Ot8e2.js} +1 -1
  281. package/dist/client/assets/{use-connect-companion-B3ckafDg.js → use-connect-companion-GUv6wWp6.js} +1 -1
  282. package/dist/client/assets/{use-connection-DUVU7eGV.js → use-connection-G7yROV9s.js} +1 -1
  283. package/dist/client/assets/{use-copy-DY9I7P-7.js → use-copy-DN3LiCNc.js} +1 -1
  284. package/dist/client/assets/{use-create-virtual-mcp-Dh_o3Zx4.js → use-create-virtual-mcp-DQpZHSmH.js} +1 -1
  285. package/dist/client/assets/{use-date-fns-locale-BLS86No4.js → use-date-fns-locale-BflqCMZC.js} +1 -1
  286. package/dist/client/assets/{use-debounced-autosave-BNvvO95z.js → use-debounced-autosave-CxbqpnDi.js} +1 -1
  287. package/dist/client/assets/{use-debounced-value-r1XKphMG.js → use-debounced-value-BjBrwBSU.js} +1 -1
  288. package/dist/client/assets/{use-deco-credits-lU6JrDzK.js → use-deco-credits-CgT1oUO0.js} +1 -1
  289. package/dist/client/assets/{use-decopilot-events-Dp_lKIIA.js → use-decopilot-events-C5eL2vN5.js} +1 -1
  290. package/dist/client/assets/{use-delete-connection-HZmId2iz.js → use-delete-connection-CC_UvUh1.js} +1 -1
  291. package/dist/client/assets/{use-deployment-admin-Cm1UuVTX.js → use-deployment-admin-Ca4Ongb4.js} +1 -1
  292. package/dist/client/assets/{use-entitlements-DWxVAJxA.js → use-entitlements-D8hKWVln.js} +1 -1
  293. package/dist/client/assets/{use-fast-preview-draft-url-Bf_X-e_8.js → use-fast-preview-draft-url-DDaZseE8.js} +1 -1
  294. package/dist/client/assets/{use-file-configs-CJfLUHHE.js → use-file-configs-D9nUTPCq.js} +1 -1
  295. package/dist/client/assets/{use-in-settings-CAfJdjYT.js → use-in-settings-BGukubgK.js} +1 -1
  296. package/dist/client/assets/{use-infinite-scroll-qMPerkhe.js → use-infinite-scroll-DJtUp1if.js} +1 -1
  297. package/dist/client/assets/{use-join-requests-SxxM57AZ.js → use-join-requests-CRjHe8jx.js} +1 -1
  298. package/dist/client/assets/{use-main-panel-tabs-COVQ4Wex.js → use-main-panel-tabs-D1-yZtcm.js} +1 -1
  299. package/dist/client/assets/{use-mcp-auth-status-DVrXcLKB.js → use-mcp-auth-status-BoUE6vw4.js} +1 -1
  300. package/dist/client/assets/{use-mcp-client-CKA2sIwU.js → use-mcp-client-CC0fhC91.js} +1 -1
  301. package/dist/client/assets/{use-mcp-prompts-DE4REbAO.js → use-mcp-prompts-D7atKrBK.js} +1 -1
  302. package/dist/client/assets/{use-mcp-tools-cf_3McKe.js → use-mcp-tools-C869cdoP.js} +1 -1
  303. package/dist/client/assets/{use-members-BRE2LhmF.js → use-members-fcC39t_f.js} +1 -1
  304. package/dist/client/assets/{use-mobile-CHhQgtca.js → use-mobile-Bb870tYP.js} +1 -1
  305. package/dist/client/assets/{use-navigate-to-agent-Djfw27LM.js → use-navigate-to-agent-C6D_a-kW.js} +1 -1
  306. package/dist/client/assets/{use-open-billing-url-DKkR7vzl.js → use-open-billing-url-1sGhOQSq.js} +1 -1
  307. package/dist/client/assets/{use-org-auth-client-CAcsWldM.js → use-org-auth-client-vE4Pc_0R.js} +1 -1
  308. package/dist/client/assets/{use-org-fs-BDRs1nGW.js → use-org-fs-BFN_tOhY.js} +1 -1
  309. package/dist/client/assets/{use-org-repo-syncs-B7VtOI9r.js → use-org-repo-syncs-DSpHYbEt.js} +1 -1
  310. package/dist/client/assets/{use-org-sso-BSfoUe9v.js → use-org-sso-CCL9H8Md.js} +1 -1
  311. package/dist/client/assets/{use-organization-roles-DGXGarko.js → use-organization-roles-jcuV0X0M.js} +1 -1
  312. package/dist/client/assets/{use-organization-settings-DMTnOC9F.js → use-organization-settings-SLacPxBA.js} +1 -1
  313. package/dist/client/assets/{use-panel-navigate-DsfJ5CnG.js → use-panel-navigate-4bAe01fl.js} +1 -1
  314. package/dist/client/assets/{use-project-native-view-presence-DO75rspu.js → use-project-native-view-presence-BtG_CQpG.js} +1 -1
  315. package/dist/client/assets/{use-project-scope-D7zltUB-.js → use-project-scope-zhTjgc0e.js} +1 -1
  316. package/dist/client/assets/{use-registry-connections-Cud6Tp7Y.js → use-registry-connections-avIOsHOS.js} +1 -1
  317. package/dist/client/assets/{use-releases-DhVORkc4.js → use-releases-ztjuJmZh.js} +1 -1
  318. package/dist/client/assets/{use-reports-diagnostic-CHmCI7DH.js → use-reports-diagnostic-DhePw_-e.js} +1 -1
  319. package/dist/client/assets/{use-route-default-main-BF--CCuF.js → use-route-default-main-D86uMXL0.js} +1 -1
  320. package/dist/client/assets/{use-secrets-DswdlPTV.js → use-secrets-Hlp3YK_C.js} +1 -1
  321. package/dist/client/assets/{use-section-preview-base-Bgp0TLUR.js → use-section-preview-base-BuZhIre7.js} +1 -1
  322. package/dist/client/assets/{use-session-runtime-CYJDaHgf.js → use-session-runtime-cf6Pq7fw.js} +1 -1
  323. package/dist/client/assets/{use-tags-0RxYQeHO.js → use-tags-CZ82MMEx.js} +1 -1
  324. package/dist/client/assets/{use-task-board-analytics-Ktp8e2wv.js → use-task-board-analytics-CcRT6UyN.js} +1 -1
  325. package/dist/client/assets/{use-task-metadata-DDXxqvLf.js → use-task-metadata-Caq2SDvW.js} +1 -1
  326. package/dist/client/assets/{use-thread-outputs-wulxiuJj.js → use-thread-outputs-CM7z862Q.js} +1 -1
  327. package/dist/client/assets/{use-view-mode-DsHVKKIn.js → use-view-mode-DTzfn05x.js} +1 -1
  328. package/dist/client/assets/{use-virtual-mcp-CvJ-G4DR.js → use-virtual-mcp-BbYqC9l9.js} +1 -1
  329. package/dist/client/assets/useInfiniteQuery-DyEIABsM.js +1 -0
  330. package/dist/client/assets/{useQueries-CUCIFE87.js → useQueries-BDS4YELf.js} +1 -1
  331. package/dist/client/assets/useSuspenseInfiniteQuery-B1T_Arg7.js +1 -0
  332. package/dist/client/assets/{users-CPf4QiX8.js → users-DwddhXbX.js} +1 -1
  333. package/dist/client/assets/{utils-BRPWk8ib.js → utils--dqqWKKP.js} +1 -1
  334. package/dist/client/assets/{variant-calendar-CfKNwrvV.js → variant-calendar-QZ7p-U4L.js} +1 -1
  335. package/dist/client/assets/{variant-matcher-override-CSFFk5sG.js → variant-matcher-override-s7PStIHS.js} +1 -1
  336. package/dist/client/assets/{view-mode-toggle-BduMFYYO.js → view-mode-toggle-I_Ej_Wa1.js} +1 -1
  337. package/dist/client/assets/{virtual-mcp-CDHqDYVI.js → virtual-mcp-BvWwFBmC.js} +1 -1
  338. package/dist/client/index.html +1 -1
  339. package/dist/server/cli.js +1 -1
  340. package/dist/server/server.js +1 -1
  341. package/package.json +1 -1
  342. package/dist/client/assets/agent-app-h4eJVd5U.js +0 -1
  343. package/dist/client/assets/agent-deck-Cg8Utg8g.js +0 -1
  344. package/dist/client/assets/agent-file-B1Q9d3_o.js +0 -1
  345. package/dist/client/assets/agent-library-file-DIb4hWWG.js +0 -1
  346. package/dist/client/assets/agent-settings-wgb9T58o.js +0 -1
  347. package/dist/client/assets/agent-site-editor-DnmHDk2B.js +0 -24
  348. package/dist/client/assets/agent-site-editor-code-J9_fgDSP.js +0 -2
  349. package/dist/client/assets/agent-view-DEXyutQz.js +0 -1
  350. package/dist/client/assets/api-keys-fPrGPt8I.js +0 -1
  351. package/dist/client/assets/app-editor-IiEXQSTb.js +0 -1
  352. package/dist/client/assets/category-editor-BNPTO4Gn.js +0 -1
  353. package/dist/client/assets/project-reports-bU4am2h1.js +0 -1
  354. package/dist/client/assets/project-tasks-A0hhN8Nq.js +0 -1
  355. package/dist/client/assets/record-editor-oUEdcyF3.js +0 -1
  356. package/dist/client/assets/registry-CPfrLNMd.js +0 -2
  357. package/dist/client/assets/reports-CyWZrUZL.js +0 -1
  358. package/dist/client/assets/store-registry-CvihOVf3.js +0 -2
  359. package/dist/client/assets/tasks-CL9cD9cE.js +0 -1
  360. package/dist/client/assets/useInfiniteQuery-PxeoVj0b.js +0 -1
  361. package/dist/client/assets/useSuspenseInfiniteQuery-BzRPI9az.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-BOvlg5d3.js","assets/auth-entry-DM-t9BR_.js","assets/input-Dh-XqN1D.js","assets/use-is-desktop-app-BNujXJc_.js","assets/retry-i8LvYSZg.js","assets/backoff-8mStPHYB.js","assets/auth-split-layout-DhgxwIyv.js","assets/cli-auth-success-DH7kWVXp.js","assets/reset-password-DglLwMaI.js","assets/oauth-callback-ClmQEIKF.js","assets/mcp-oauth-DYbEQhpI.js","assets/auth-B51j9jUd.js","assets/layout-Bt9GDku1.js","assets/required-auth-layout-DijuWP2w.js","assets/use-deployment-admin-Cm1UuVTX.js","assets/users-CPf4QiX8.js","assets/collection-table-wrapper-CKRTLUNR.js","assets/table-Cgik5tMu.js","assets/ArrowUp-CoAUqmuY.js","assets/empty-state-DIzR_wr9.js","assets/search-input-CM184Dyg.js","assets/SearchMd-B8DQYRPW.js","assets/avatar-CTtVGSeH.js","assets/User01-CZOhVcFU.js","assets/badge-Bn4xdWKf.js","assets/use-debounced-value-r1XKphMG.js","assets/admin-fetch-CCSvjTk1.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/get-initials-D-f_fDFw.js","assets/orgs-BtMMolaf.js","assets/label-D5WrAAlW.js","assets/dialog-DqR4X4jD.js","assets/X-x1f6IJn8.js","assets/select-g-w30c24.js","assets/index-2LLbB-lb.js","assets/ChevronUp-iqE9pTFp.js","assets/switch-BkWjUh3b.js","assets/textarea-CovrZz8K.js","assets/schema-C4X_eAAo.js","assets/site-slug-uya6Wp4-.js","assets/prompts-Dv-GcOvr.js","assets/shell-layout-BZqlKsir.js","assets/Globe04-CnGbH-w4.js","assets/SearchLg-BlJaD9eR.js","assets/agent-icon-DfdSMHk3.js","assets/AlertCircle-BpGw--vV.js","assets/Tool01-aYyiPW8-.js","assets/ArrowLeft-BBVlcmSt.js","assets/Tool02-CPIWbRhH.js","assets/ArrowRight-uJGmmnv8.js","assets/TrendUp01-Bag9pnaT.js","assets/ZoomOut-BXSD96xb.js","assets/CheckCircle-ETp2UGkq.js","assets/UserSquare-xY7aCsvJ.js","assets/Copy01--en4dKgi.js","assets/CreditCard01-CF04wUbq.js","assets/DotsVertical-Dl7YYUvF.js","assets/Download01-CZ-cWwqe.js","assets/Settings02-CnHgg4-R.js","assets/Eye-BL52dF4t.js","assets/Share07-BLTCTwud.js","assets/Globe01-D-xqqC1P.js","assets/XClose-DJX__swp.js","assets/Image01-D3fbwb1A.js","assets/Key01-BRHz0J7i.js","assets/LayoutLeft-BR9B9Uz4.js","assets/Link01-CIdGrv0f.js","assets/LinkExternal01-fMLHNRBT.js","assets/Monitor01-CUm8GJYb.js","assets/Sun-Dcl1Qw_c.js","assets/Package-BeI4XESV.js","assets/Palette-BOYmXu66.js","assets/Play-BoxOAYQY.js","assets/Plus-B0XT7kf8.js","assets/Stars01-LCEyBl5Z.js","assets/Trash01-O1aZhBi7.js","assets/Upload01-CUPYDw9I.js","assets/Users01-BPs9TI2M.js","assets/XCircle-bhS1DjQq.js","assets/Zap-CfJC6pES.js","assets/download-app-dialog-DBq9OIW-.js","assets/use-project-scope-D7zltUB-.js","assets/use-virtual-mcp-CvJ-G4DR.js","assets/use-mcp-client-CKA2sIwU.js","assets/github-repo-BknN0SVI.js","assets/use-panel-navigate-DsfJ5CnG.js","assets/thread-route-BsC8SJWi.js","assets/command-Bgz8JJH0.js","assets/index-B6dWWluW.js","assets/integration-icon-51fv1ZD9.js","assets/project-icon-CYFTX0ei.js","assets/hooks-CEOxduy2.js","assets/task-board-2k-uoSLs.js","assets/autosend-CVFKErlq.js","assets/use-organization-settings-DMTnOC9F.js","assets/use-org-sso-BSfoUe9v.js","assets/shell-layout-CE2Eihra.css","assets/onboarding-CGzZ0sv3.js","assets/organization-choice-D-JcqdGW.js","assets/reports-onboarding-cDW-coF4.js","assets/site-url-en5df9c-.js","assets/create-organization-dialog-BRJel0ET.js","assets/alert-dialog-CqnandRo.js","assets/form-Co95Q_Yg.js","assets/companion-mcps-section-D8OUnB38.js","assets/use-connect-companion-B3ckafDg.js","assets/tooltip-BnHO0L1T.js","assets/companions-core-WMNDPuPs.js","assets/github-D4UJ99TO.js","assets/github-repo-scope-C8GSbvaz.js","assets/metadata-dUsYcpuu.js","assets/provision-repo-scoped-github-connection-B6zdkC6p.js","assets/extract-connection-data-DZuvEegC.js","assets/connection-DH9btBfI.js","assets/useQueries-CUCIFE87.js","assets/authenticate-and-persist-oauth-Du-8ZY-3.js","assets/track-BbStZhrC.js","assets/self-tool-result-8OxPN9Nm.js","assets/site-error-Da6iapvu.js","assets/choose-editor-BkDCbLK_.js","assets/reports-FHtNLX4Y.js","assets/reports-DH10I8_D.css","assets/route-BJXtplSb.js","assets/sidebar-CPKilcwl.js","assets/use-mobile-CHhQgtca.js","assets/sheet-BUl-sicB.js","assets/toolbar-icon-button-9rzGLI8m.js","assets/use-in-settings-CAfJdjYT.js","assets/thread-button-BB6LlWOo.js","assets/use-route-default-main-BF--CCuF.js","assets/popover-BDsdyOa0.js","assets/drawer-DcltEitH.js","assets/use-join-requests-SxxM57AZ.js","assets/use-org-auth-client-CAcsWldM.js","assets/use-organization-roles-DGXGarko.js","assets/use-deco-credits-lU6JrDzK.js","assets/use-ai-providers-C3B5OJd2.js","assets/use-entitlements-DWxVAJxA.js","assets/plan-ladder-BAj8pVXN.js","assets/scroll-area-Du8UsKeI.js","assets/useInfiniteQuery-PxeoVj0b.js","assets/infiniteQueryObserver-Bh30DgM5.js","assets/task-route-DrRxY0nT.js","assets/use-decopilot-events-Dp_lKIIA.js","assets/use-project-native-view-presence-DO75rspu.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-CJfLUHHE.js","assets/optimistic-project-sidebar-views-Cgmf7zN9.js","assets/use-navigate-to-agent-Djfw27LM.js","assets/thread-intent-8XYbh09e.js","assets/slugify-CEUa2lfQ.js","assets/repository-import-picker-Bax0Ys6D.js","assets/repository-picker-Bn8vQeF9.js","assets/github-icon-DRbuJmJM.js","assets/collection-search-D4IWKZBl.js","assets/question-004-sINsf4GQ.js","assets/thread-route-WZYEwowr.js","assets/chat-context-bDkom7PB.js","assets/location-oTTXFrSF.js","assets/use-reports-diagnostic-CHmCI7DH.js","assets/connect-layout-nlesAGLA.js","assets/route-ChK4fAMe.js","assets/index-eG2IWUX5.js","assets/gateway-client-BpNIm5Jn.js","assets/use-mcp-prompts-DE4REbAO.js","assets/index-HN5gToi8.js","assets/utils-CVEq3hMx.js","assets/org-file-open-context-DTalcU5B.js","assets/input-DsiBTQvq.js","assets/chat-draft-DmLylIfC.js","assets/use-session-runtime-CYJDaHgf.js","assets/usage-stats-CcuLTdk3.js","assets/use-copy-DY9I7P-7.js","assets/markdown-B8bZJCAc.js","assets/tabs-D6DrxGeZ.js","assets/toggle-group-CWZE6JlL.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-DKkR7vzl.js","assets/decopilot-DItMbQCu.js","assets/checkbox-DguCm5iq.js","assets/ai-providers-logos-DD3qZ33J.js","assets/index-Ccb8J2-u.js","assets/input-D0QZTiCP.js","assets/hooks-Bm0239iZ.js","assets/use-org-fs-BDRs1nGW.js","assets/use-members-BRE2LhmF.js","assets/feature-paywall-DZigtnb6.js","assets/add-connection-dialog-BP7iM-9U.js","assets/connection-card-DdYTI-Nb.js","assets/use-registry-connections-Cud6Tp7Y.js","assets/use-connection-DUVU7eGV.js","assets/connection-slug-CITJ0kGN.js","assets/connection-form-helpers-I8o9oFyO.js","assets/collection-tabs-DuZ3-S7z.js","assets/use-infinite-scroll-qMPerkhe.js","assets/useSuspenseInfiniteQuery-BzRPI9az.js","assets/pair-DemjNpBj.js","assets/collapsible-CU2r5Cts.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DrhwVs_O.js","assets/types-DvShnTes.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/use-thread-outputs-wulxiuJj.js","assets/file-type-icon-DoCd9H0G.js","assets/decofile-api-kxpv61v3.js","assets/use-releases-DhVORkc4.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-AQUs6AFU.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/index-DoQDGqwe.js","assets/resizable-B7owW6MA.js","assets/route-page-header-B-rxUb24.js","assets/task-status-BhuVWcoS.js","assets/use-main-panel-tabs-COVQ4Wex.js","assets/use-mcp-tools-cf_3McKe.js","assets/use-task-metadata-DDXxqvLf.js","assets/virtual-mcp-CDHqDYVI.js","assets/legacy-main-redirect-DUnphxj9.js","assets/preview-dialog-CGjkTXFC.js","assets/preview-content-lWpEisgY.js","assets/file-preview-B2nEfu5l.js","assets/utils-BRPWk8ib.js","assets/editor-D7IDrZ5A.js","assets/file-share-button-DZqsZ8jc.js","assets/blocks-preview-workspace-context-CE4TkRwM.js","assets/home-Ui_P1zNp.js","assets/client-icons-DvtvjJpb.js","assets/project-feed-DZGrJGjO.js","assets/agent-overview-D-xUFh5m.js","assets/mini-report-page-BPw9qVKi.js","assets/project-tasks-A0hhN8Nq.js","assets/mock-board-CWk29Gb2.js","assets/rich-text-link-control-CyCGWHOW.js","assets/use-task-board-analytics-Ktp8e2wv.js","assets/combobox-5xSVBVf2.js","assets/search-toggle-h5tgNilJ.js","assets/icon-button-CUavSbqA.js","assets/use-tags-0RxYQeHO.js","assets/breadcrumb-DZSBetBn.js","assets/calendar-TTCnbmpS.js","assets/alert-B2kqVKWb.js","assets/index-CWHIV6oZ.js","assets/thread-sheet-body-5hLxkhK5.js","assets/separator-7sui0Fav.js","assets/feature-gate-Cx8YkCCu.js","assets/project-reports-bU4am2h1.js","assets/reports-tab-DRrkUjk6.js","assets/agent-site-editor-DnmHDk2B.js","assets/message-templates-bV4CIdDO.js","assets/last-preview-page-BXmf8KT4.js","assets/use-fast-preview-draft-url-Bf_X-e_8.js","assets/section-preview-url-Csj0_ZDg.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-git-api-CMdpE2TE.js","assets/save-changes-debug-nBi-n9eV.js","assets/agent-site-editor-DDGTF8rc.css","assets/agent-site-editor-preview-D4tdhz1h.js","assets/agent-view-guard-BtbjAA1B.js","assets/runnable-block-editor-BQFY4Ksm.js","assets/safe-image-url-D5z803Ot.js","assets/monaco-editor-BdguqmZl.js","assets/asset-utils-BT4Ne0sM.js","assets/variant-matcher-override-CSFFk5sG.js","assets/agent-site-editor-content-Dtl21q2k.js","assets/mustache-CMyVHRRJ.js","assets/agent-site-editor-code-J9_fgDSP.js","assets/agent-automations-dWdakcNy.js","assets/use-automations-CFkOYf-5.js","assets/automation-list-row-DUyTkYnj.js","assets/agent-automation-CKv85wVR.js","assets/select-model-gEzliQOG.js","assets/build-improve-prompt-doc-CnzelPJa.js","assets/use-debounced-autosave-BNvvO95z.js","assets/automation-runs-iliFo_Lf.js","assets/agent-settings-wgb9T58o.js","assets/settings-tab-CfC2MRU1.js","assets/use-date-fns-locale-BLS86No4.js","assets/use-mcp-auth-status-DVrXcLKB.js","assets/use-secrets-DswdlPTV.js","assets/agent-assets-CJkjsRGZ.js","assets/agent-git-Bun_byZu.js","assets/agent-hosting-_yuR1DpC.js","assets/empty-state-Co5qq3oI.js","assets/agent-e2e-DngESQK5.js","assets/agent-analytics-gmwKv0wU.js","assets/chart-0rI7XswZ.js","assets/index-DEuBeZyZ.js","assets/CartesianChart-BgA0Qtuf.js","assets/AreaChart-DVh_2CwD.js","assets/agent-experiments-DndV4qWf.js","assets/agent-monitor-BePlvtxo.js","assets/Line-BXRvqz0O.js","assets/ErrorBarContext-C_51j9Ff.js","assets/Sector-p8z_kA8J.js","assets/agent-app-h4eJVd5U.js","assets/project-app-view-CeQOBEDv.js","assets/agent-view-DEXyutQz.js","assets/agent-file-B1Q9d3_o.js","assets/agent-deck-Cg8Utg8g.js","assets/agent-library-file-DIb4hWWG.js","assets/agent-connect-sources-DuEfOhDE.js","assets/legacy-agents-deep-DXqm-_4D.js","assets/tasks-CL9cD9cE.js","assets/taskboard-analytics-BFNAPJBW.js","assets/reports-CyWZrUZL.js","assets/library-G0Z3LZYZ.js","assets/use-org-repo-syncs-B7VtOI9r.js","assets/folder-icon-CXxjmxd3.js","assets/skill-md-ChfVs4uF.js","assets/skill-preview-Bz3po8au.js","assets/discover-C5CHE7rM.js","assets/index-DezIICsH.js","assets/route-DtQGV8Z2.js","assets/index-redirect-BrDjHxW8.js","assets/capability-load-error-BqupCjyY.js","assets/connections-Cma51BMt.js","assets/collection-display-button-facophLz.js","assets/view-mode-toggle-BduMFYYO.js","assets/use-delete-connection-HZmId2iz.js","assets/use-view-mode-DsHVKKIn.js","assets/connection-detail-DTaKY7hs.js","assets/index-Dg9ofyOC.js","assets/index-YFgkZJZa.js","assets/index-CmhYNoiR.js","assets/use-create-virtual-mcp-Dh_o3Zx4.js","assets/monitoring-stats-row-CkbBz1UJ.js","assets/collection-detail-BeZE_OzU.js","assets/index-CP_l4FUF.js","assets/require-capability-DJvejuvq.js","assets/access-gate-CIxYybF1.js","assets/multi-select-DzRx1K38.js","assets/general-DmEpfTOj.js","assets/review-settings-CXfVBzZC.js","assets/domain-settings-DUVdv8iq.js","assets/connect-2dCioIhn.js","assets/api-keys-DSPf-tM3.js","assets/ai-providers-C-TXNfNO.js","assets/infra-billing-B9q0Y09E.js","assets/secrets-C-lTnGEG.js","assets/api-keys-fPrGPt8I.js","assets/buckets-CfuKv1Yu.js","assets/repositories-BhilcMMp.js","assets/synced-repos-DMBpwLPD.js","assets/tasks-DG1OcC7g.js","assets/members-Dr93JJNd.js","assets/role-color-Dn2tXDDF.js","assets/roles-ejZYkZ6t.js","assets/sso-CuVFM4fO.js","assets/profile-C6XwXDvx.js","assets/store-BObHOaSl.js","assets/registry-CPfrLNMd.js","assets/store-registry-CvihOVf3.js","assets/agents-list-Dt2PPUuO.js","assets/automations-Bw4S0ob0.js","assets/skills-DJUf3GIG.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/login-C9rpjQul.js","assets/auth-entry-Dll4-psh.js","assets/input-D89CfzOY.js","assets/use-is-desktop-app-BNujXJc_.js","assets/retry-i8LvYSZg.js","assets/backoff-8mStPHYB.js","assets/auth-split-layout-ozxyHiR-.js","assets/cli-auth-success-BtgfCOuS.js","assets/reset-password-CG3hWwFA.js","assets/oauth-callback-5b15t98P.js","assets/mcp-oauth-vwa44Lu2.js","assets/auth-CKq_yfpj.js","assets/layout-DeMvB5F_.js","assets/required-auth-layout-CveQBep9.js","assets/use-deployment-admin-Ca4Ongb4.js","assets/users-DwddhXbX.js","assets/collection-table-wrapper-LBsnn_CU.js","assets/table--SjnJFTw.js","assets/ArrowUp-DcL5fPvo.js","assets/empty-state-Dlx610Ei.js","assets/search-input-87g5mPOs.js","assets/SearchMd-DbrPLKwX.js","assets/avatar-BDUloavG.js","assets/User01-BaBASwac.js","assets/badge-DuL4ETl9.js","assets/use-debounced-value-BjBrwBSU.js","assets/admin-fetch-CCSvjTk1.js","assets/format-time-BtXRrtv4.js","assets/differenceInSeconds-C3x8sHUj.js","assets/get-initials-D-f_fDFw.js","assets/orgs-DVuGQ4r0.js","assets/label-C3pyZMIz.js","assets/dialog-BJW64_pz.js","assets/X-DrgZ2IHU.js","assets/select-CoXQnVLL.js","assets/index-DB5ywwwN.js","assets/ChevronUp-bb9oyJa0.js","assets/switch-qxBseLl7.js","assets/textarea-DHB5xdEY.js","assets/schema-CDnRKndH.js","assets/site-slug-uya6Wp4-.js","assets/prompts-63xdIpGm.js","assets/shell-layout-DWdV0NI3.js","assets/Globe04-0q2xP2kX.js","assets/SearchLg-b9Yg6t2Y.js","assets/agent-icon-BpV8H0Kb.js","assets/AlertCircle-BL9C11v5.js","assets/Tool01-CxNPwJlb.js","assets/ArrowLeft-TUZw6Woj.js","assets/Tool02-DQfCYGH0.js","assets/ArrowRight-BV-Z5nWg.js","assets/TrendUp01-CSfieBqS.js","assets/ZoomOut-CkEHdkkv.js","assets/CheckCircle-Dl7A-bG0.js","assets/UserSquare-jWZ4K295.js","assets/Copy01-Dn4l-4a-.js","assets/CreditCard01-XNOZWeGM.js","assets/DotsVertical-Dt4wv0EU.js","assets/Download01-iMp1Qx1F.js","assets/Settings02-Cfj0U0no.js","assets/Eye-3KuA1Y7O.js","assets/Share07-q4yqk4wN.js","assets/Globe01-BNKnmHqV.js","assets/XClose-CwSiPt5t.js","assets/Image01-CEn4L9qZ.js","assets/Key01-Crg-gzCo.js","assets/LayoutLeft-C-m_bDFS.js","assets/Link01-Bh8XxL8g.js","assets/LinkExternal01-C6vmvib1.js","assets/Monitor01-Dzd2i2TD.js","assets/Sun-DxH7Ufsz.js","assets/Package-zRgcryK5.js","assets/Palette-BPlCKhxV.js","assets/Play-HTakcWif.js","assets/Plus-BjUVJgIK.js","assets/Stars01-zx4PrHn4.js","assets/Trash01-CRMYtUIf.js","assets/Upload01-B7KGq2Xu.js","assets/Users01-DZM8fE-C.js","assets/XCircle-D-Ljd-mw.js","assets/Zap-CJL5AQoB.js","assets/download-app-dialog-BXRsjbOU.js","assets/use-project-scope-zhTjgc0e.js","assets/use-virtual-mcp-BbYqC9l9.js","assets/use-mcp-client-CC0fhC91.js","assets/github-repo-BknN0SVI.js","assets/use-panel-navigate-4bAe01fl.js","assets/thread-route-Bcs3wyQ-.js","assets/command-B5HRG-qx.js","assets/index-DMLW-bKi.js","assets/integration-icon-B1mADLb6.js","assets/project-icon-Bhvhs0Sb.js","assets/hooks-7pWlJVDL.js","assets/task-board-DQrnQAri.js","assets/autosend-TBNFb-yT.js","assets/use-organization-settings-SLacPxBA.js","assets/use-org-sso-CCL9H8Md.js","assets/shell-layout-CE2Eihra.css","assets/onboarding-BiG1CXWT.js","assets/organization-choice-uSI3Hvk_.js","assets/reports-onboarding-Q9OPS-W6.js","assets/site-url-en5df9c-.js","assets/create-organization-dialog-BLROZtzP.js","assets/alert-dialog-CEnBoihu.js","assets/form-PqqHm2ke.js","assets/companion-mcps-section-BuA06R5b.js","assets/use-connect-companion-GUv6wWp6.js","assets/tooltip-BZmzyIaP.js","assets/companions-core-WMNDPuPs.js","assets/github-D4UJ99TO.js","assets/github-repo-scope-C8GSbvaz.js","assets/metadata-dUsYcpuu.js","assets/provision-repo-scoped-github-connection-B6zdkC6p.js","assets/extract-connection-data-Gt9dSRWj.js","assets/connection-DlXZEqsN.js","assets/useQueries-BDS4YELf.js","assets/authenticate-and-persist-oauth-DStZKch8.js","assets/track-BBfq2yMi.js","assets/self-tool-result-8OxPN9Nm.js","assets/site-error-Da6iapvu.js","assets/choose-editor-CauIefX-.js","assets/reports-4M5W5fE_.js","assets/reports-DH10I8_D.css","assets/route--MqbvbyV.js","assets/sidebar-BUb7URWX.js","assets/use-mobile-Bb870tYP.js","assets/sheet-tn1TcRey.js","assets/toolbar-icon-button-CfzWkGOL.js","assets/use-in-settings-BGukubgK.js","assets/thread-button-BBLFOVZM.js","assets/use-route-default-main-D86uMXL0.js","assets/popover-qR-A91mO.js","assets/drawer-CA10Cx7y.js","assets/use-join-requests-CRjHe8jx.js","assets/use-org-auth-client-vE4Pc_0R.js","assets/use-organization-roles-jcuV0X0M.js","assets/use-deco-credits-CgT1oUO0.js","assets/use-ai-providers-DUUKwFbJ.js","assets/use-entitlements-D8hKWVln.js","assets/plan-ladder-Z3EBG2QJ.js","assets/scroll-area-Bd3Jch8g.js","assets/useInfiniteQuery-DyEIABsM.js","assets/infiniteQueryObserver-Af1XrGxW.js","assets/task-route-DRhJcx7H.js","assets/use-decopilot-events-C5eL2vN5.js","assets/use-project-native-view-presence-BtG_CQpG.js","assets/match-site-slug-config-D3fUJ6vX.js","assets/use-file-configs-D9nUTPCq.js","assets/optimistic-project-sidebar-views-BP6ahYVp.js","assets/use-navigate-to-agent-C6D_a-kW.js","assets/thread-intent-OHNeU6ZY.js","assets/slugify-CEUa2lfQ.js","assets/repository-import-picker-BaIAm8RZ.js","assets/repository-picker-H-yjRtBz.js","assets/github-icon-DWCqyx5T.js","assets/collection-search-BPekTu5Q.js","assets/question-004-sINsf4GQ.js","assets/thread-route-BMvI62tD.js","assets/chat-context-DULfSCD5.js","assets/location-oTTXFrSF.js","assets/use-reports-diagnostic-DhePw_-e.js","assets/connect-layout-FslM2t-i.js","assets/route-mAV3gllf.js","assets/index-D-TKqkm8.js","assets/gateway-client-1Q0B7yUT.js","assets/use-mcp-prompts-D7atKrBK.js","assets/index-B4qGPwHI.js","assets/utils-CVEq3hMx.js","assets/org-file-open-context-Crt2BXIO.js","assets/input-Djk7_c4C.js","assets/chat-draft-CEYNAfUq.js","assets/use-session-runtime-cf6Pq7fw.js","assets/usage-stats-Dlprp1eo.js","assets/use-copy-DN3LiCNc.js","assets/markdown-CmV6VyeN.js","assets/tabs-C6yBBVdT.js","assets/toggle-group-DVkdzTSY.js","assets/tool-namespace-DmnQIdtF.js","assets/use-open-billing-url-1sGhOQSq.js","assets/decopilot-uHjtkyFB.js","assets/checkbox-_DYgtxp0.js","assets/ai-providers-logos-DD3qZ33J.js","assets/index-BFMwAh_0.js","assets/input-x7HdNC4u.js","assets/hooks-Cd7x818_.js","assets/use-org-fs-BFN_tOhY.js","assets/use-members-fcC39t_f.js","assets/feature-paywall-CrsknzkG.js","assets/add-connection-dialog-DAMZAdjf.js","assets/connection-card-D-l0MD9k.js","assets/use-registry-connections-avIOsHOS.js","assets/use-connection-G7yROV9s.js","assets/connection-slug-CITJ0kGN.js","assets/connection-form-helpers-Bmo7KEqX.js","assets/collection-tabs-Djj9-mzS.js","assets/use-infinite-scroll-DJtUp1if.js","assets/useSuspenseInfiniteQuery-B1T_Arg7.js","assets/pair-rZlEea28.js","assets/collapsible---A-jh-n.js","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-CZXE8Q2L.js","assets/types-Do0xd9Aa.js","assets/omit-sandbox-map-jj4lCB2U.js","assets/use-thread-outputs-CM7z862Q.js","assets/file-type-icon-CFqni3Pt.js","assets/decofile-api-kAUyINZr.js","assets/use-releases-ztjuJmZh.js","assets/serial-task-queue-CGOeQgpr.js","assets/sandbox-lifecycle-context-7XEpsGyB.js","assets/sandbox-url-D3mC8qhT.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/index-DOIParHz.js","assets/resizable-CV3Zt6hw.js","assets/route-page-header-B6RMBdio.js","assets/task-status-CkoiMk-J.js","assets/use-main-panel-tabs-D1-yZtcm.js","assets/use-mcp-tools-C869cdoP.js","assets/use-task-metadata-Caq2SDvW.js","assets/virtual-mcp-BvWwFBmC.js","assets/legacy-main-redirect-Bdm09hjr.js","assets/preview-dialog-BLXSWbJM.js","assets/preview-content-BoKQ4lvh.js","assets/file-preview-Ds5U_YIc.js","assets/utils--dqqWKKP.js","assets/editor-C1ywYtVp.js","assets/file-share-button-Bka3waFe.js","assets/blocks-preview-workspace-context-CcEzS5re.js","assets/home-BR3CYkzh.js","assets/client-icons-zdNSJEEn.js","assets/project-feed-DWV2Ijqa.js","assets/agent-overview-Dw5ZPOKa.js","assets/mini-report-page-BU5QVlVY.js","assets/project-tasks-Co3kTouv.js","assets/mock-board-CYGeAeWm.js","assets/rich-text-link-control-DSAdUuWs.js","assets/use-task-board-analytics-CcRT6UyN.js","assets/combobox-_VPjsPr7.js","assets/search-toggle-BDiBVbuX.js","assets/icon-button-Bk7-zdBH.js","assets/use-tags-CZ82MMEx.js","assets/breadcrumb-CeAmNahf.js","assets/calendar-DX5Za7yg.js","assets/alert-nZf0wg2B.js","assets/index-DQYXHmk_.js","assets/thread-sheet-body-B8Zy8rxz.js","assets/separator-DQ0-uLKs.js","assets/feature-gate-CmEcE6-E.js","assets/project-reports-GFbxxtyO.js","assets/reports-tab-BaZkX-oW.js","assets/agent-site-editor-Bly4gEXY.js","assets/message-templates-ztimz7-8.js","assets/last-preview-page-BNpv-zpc.js","assets/use-fast-preview-draft-url-DDaZseE8.js","assets/section-preview-url-Csj0_ZDg.js","assets/claim-phase-copy-0btUuJoC.js","assets/sandbox-git-api-CMdpE2TE.js","assets/save-changes-debug-nBi-n9eV.js","assets/agent-site-editor-DDGTF8rc.css","assets/agent-site-editor-preview-DMY-bRXd.js","assets/agent-view-guard-NlE6Cpah.js","assets/runnable-block-editor-Da1CFdE3.js","assets/safe-image-url-D5z803Ot.js","assets/monaco-editor-BnSB3UlK.js","assets/asset-utils-HbMTuFLs.js","assets/variant-matcher-override-s7PStIHS.js","assets/agent-site-editor-content-oAD5ERex.js","assets/mustache-B8ouMKD_.js","assets/agent-site-editor-code-Dsipxnbb.js","assets/agent-automations-D65B39vC.js","assets/use-automations-C-YX5CdN.js","assets/automation-list-row-SV4qEKuR.js","assets/agent-automation-BRedTzhp.js","assets/select-model-Wm7faOLQ.js","assets/build-improve-prompt-doc-CbVfRpur.js","assets/use-debounced-autosave-CxbqpnDi.js","assets/automation-runs-BC4AfZCr.js","assets/agent-settings-CoVnhy6_.js","assets/settings-tab-ChP_AH3u.js","assets/use-date-fns-locale-BflqCMZC.js","assets/use-mcp-auth-status-BoUE6vw4.js","assets/use-secrets-Hlp3YK_C.js","assets/agent-assets-CLHeNP70.js","assets/agent-git-BlXHgqe0.js","assets/agent-hosting-CjVegYqO.js","assets/empty-state-ClQL-f6j.js","assets/agent-e2e-CTi5nqOc.js","assets/agent-analytics-CyPBDf01.js","assets/chart-BeW96Xyg.js","assets/index-62BdN9Ut.js","assets/CartesianChart-C8E3Kw-7.js","assets/AreaChart-BCsb1eiZ.js","assets/agent-experiments-lSFgWzEh.js","assets/agent-monitor-C39p1dMa.js","assets/Line-DJxwfsSL.js","assets/ErrorBarContext-l-kn9PLx.js","assets/Sector-BxuPFiQ1.js","assets/agent-app-mOzGwpWw.js","assets/project-app-view-CH0NcGlm.js","assets/agent-view-fqs1B853.js","assets/agent-file-CEXQLvN-.js","assets/agent-deck-DiylZjYN.js","assets/agent-library-file-Cnj_s_ZV.js","assets/agent-connect-sources-DwOg9602.js","assets/legacy-agents-deep-qXc7zhtl.js","assets/tasks-DXoS1Ulq.js","assets/taskboard-analytics-BtEL_4wP.js","assets/reports-Bu9LJ9Ir.js","assets/library-BokZ1AIy.js","assets/use-org-repo-syncs-DSpHYbEt.js","assets/folder-icon-ClSesIJT.js","assets/skill-md-ChfVs4uF.js","assets/skill-preview-CVlIy2W9.js","assets/discover-CzGsx9DW.js","assets/index-BloKHCFa.js","assets/route-Du7d3cDr.js","assets/index-redirect-ad5yNpaJ.js","assets/capability-load-error-ClI5KIrr.js","assets/connections-dt9Je8G_.js","assets/collection-display-button-C8OBiIuA.js","assets/view-mode-toggle-I_Ej_Wa1.js","assets/use-delete-connection-CC_UvUh1.js","assets/use-view-mode-DTzfn05x.js","assets/connection-detail-r5iK6FaZ.js","assets/index-CE75dRQm.js","assets/index-xG65Tv25.js","assets/index-Bc_L0MMf.js","assets/use-create-virtual-mcp-DQpZHSmH.js","assets/monitoring-stats-row-C_3OByxZ.js","assets/collection-detail-BqKQO8JF.js","assets/index-D5GksOol.js","assets/require-capability-BtBUl5HB.js","assets/access-gate-ApTW_ZBN.js","assets/multi-select-D2lhtEI_.js","assets/general-Ds1cv5sP.js","assets/review-settings-BZvEKnql.js","assets/domain-settings-Bdrgl21H.js","assets/connect-DtRIpCDv.js","assets/api-keys-CNPQdajZ.js","assets/ai-providers-BA415uVk.js","assets/infra-billing-B49h8jGh.js","assets/secrets-Bvj_mEwv.js","assets/api-keys-YFO0QnLb.js","assets/buckets-Cbnkelsv.js","assets/repositories-0g4CNguU.js","assets/synced-repos-DqXTKrkq.js","assets/tasks-CZ8ZJqTl.js","assets/members-tiUutfvd.js","assets/role-color-Dn2tXDDF.js","assets/roles-D2QfWwJI.js","assets/sso-Df42gDam.js","assets/profile-DioTORUW.js","assets/store-Dlzza2q4.js","assets/registry-B-BoWinl.js","assets/store-registry-DjpsAIwJ.js","assets/agents-list-iVlh68DJ.js","assets/automations-BFk3tCRs.js","assets/skills-Krb4erdR.js"])))=>i.map(i=>d[i]);
2
2
  function _U(e,t){for(var o=0;o<t.length;o++){const a=t[o];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in e)){const i=Object.getOwnPropertyDescriptor(a,n);i&&Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>a[n]})}}}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 n of document.querySelectorAll('link[rel="modulepreload"]'))a(n);new MutationObserver(n=>{for(const i of n)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&a(l)}).observe(document,{childList:!0,subtree:!0});function o(n){const i={};return n.integrity&&(i.integrity=n.integrity),n.referrerPolicy&&(i.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?i.credentials="include":n.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(n){if(n.ep)return;n.ep=!0;const i=o(n);fetch(n.href,i)}})();const CU="modulepreload",PU=function(e){return"/"+e},v1={},je=function(t,o,a){let n=Promise.resolve();if(o&&o.length>0){let l=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=c?.nonce||c?.getAttribute("nonce");n=l(o.map(p=>{if(p=PU(p),p in v1)return;v1[p]=!0;const g=p.endsWith(".css"),m=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${p}"]${m}`))return;const f=document.createElement("link");if(f.rel=g?"stylesheet":CU,g||(f.as="script"),f.crossOrigin="",f.href=p,u&&f.setAttribute("nonce",u),document.head.appendChild(f),g)return new Promise((v,b)=>{f.addEventListener("load",v),f.addEventListener("error",()=>b(Error(`Unable to preload CSS for ${p}`)))})}))}function i(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return n.then(l=>{for(const c of l||[])c.status==="rejected"&&i(c.reason);return t().catch(i)})};var Khe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ll(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hS={exports:{}},Pu={};var b1;function kU(){if(b1)return Pu;b1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function o(a,n,i){var l=null;if(i!==void 0&&(l=""+i),n.key!==void 0&&(l=""+n.key),"key"in n){i={};for(var c in n)c!=="key"&&(i[c]=n[c])}else i=n;return n=i.ref,{$$typeof:e,type:a,key:l,ref:n!==void 0?n:null,props:i}}return Pu.Fragment=t,Pu.jsx=o,Pu.jsxs=o,Pu}var y1;function xU(){return y1||(y1=1,hS.exports=kU()),hS.exports}var T=xU(),fS={exports:{}},ct={};var S1;function EU(){if(S1)return ct;S1=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),f=Symbol.iterator;function v(M){return M===null||typeof M!="object"?null:(M=f&&M[f]||M["@@iterator"],typeof M=="function"?M:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function w(M,G,q){this.props=M,this.context=G,this.refs=C,this.updater=q||b}w.prototype.isReactComponent={},w.prototype.setState=function(M,G){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,G,"setState")},w.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=w.prototype;function E(M,G,q){this.props=M,this.context=G,this.refs=C,this.updater=q||b}var k=E.prototype=new _;k.constructor=E,S(k,w.prototype),k.isPureReactComponent=!0;var x=Array.isArray;function A(){}var D={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function N(M,G,q){var L=q.ref;return{$$typeof:e,type:M,key:G,ref:L!==void 0?L:null,props:q}}function $(M,G){return N(M.type,G,M.props)}function F(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function z(M){var G={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(q){return G[q]})}var j=/\/+/g;function K(M,G){return typeof M=="object"&&M!==null&&M.key!=null?z(""+M.key):G.toString(36)}function ne(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(A,A):(M.status="pending",M.then(function(G){M.status==="pending"&&(M.status="fulfilled",M.value=G)},function(G){M.status==="pending"&&(M.status="rejected",M.reason=G)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function H(M,G,q,L,U){var J=typeof M;(J==="undefined"||J==="boolean")&&(M=null);var pe=!1;if(M===null)pe=!0;else switch(J){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(M.$$typeof){case e:case t:pe=!0;break;case g:return pe=M._init,H(pe(M._payload),G,q,L,U)}}if(pe)return U=U(M),pe=L===""?"."+K(M,0):L,x(U)?(q="",pe!=null&&(q=pe.replace(j,"$&/")+"/"),H(U,G,q,"",function($e){return $e})):U!=null&&(F(U)&&(U=$(U,q+(U.key==null||M&&M.key===U.key?"":(""+U.key).replace(j,"$&/")+"/")+pe)),G.push(U)),1;pe=0;var ge=L===""?".":L+":";if(x(M))for(var Ce=0;Ce<M.length;Ce++)L=M[Ce],J=ge+K(L,Ce),pe+=H(L,G,q,J,U);else if(Ce=v(M),typeof Ce=="function")for(M=Ce.call(M),Ce=0;!(L=M.next()).done;)L=L.value,J=ge+K(L,Ce++),pe+=H(L,G,q,J,U);else if(J==="object"){if(typeof M.then=="function")return H(ne(M),G,q,L,U);throw G=String(M),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return pe}function Z(M,G,q){if(M==null)return M;var L=[],U=0;return H(M,L,"","",function(J){return G.call(q,J,U++)}),L}function te(M){if(M._status===-1){var G=M._result;G=G(),G.then(function(q){(M._status===0||M._status===-1)&&(M._status=1,M._result=q)},function(q){(M._status===0||M._status===-1)&&(M._status=2,M._result=q)}),M._status===-1&&(M._status=0,M._result=G)}if(M._status===1)return M._result.default;throw M._result}var le=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Q={map:Z,forEach:function(M,G,q){Z(M,function(){G.apply(this,arguments)},q)},count:function(M){var G=0;return Z(M,function(){G++}),G},toArray:function(M){return Z(M,function(G){return G})||[]},only:function(M){if(!F(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return ct.Activity=m,ct.Children=Q,ct.Component=w,ct.Fragment=o,ct.Profiler=n,ct.PureComponent=E,ct.StrictMode=a,ct.Suspense=u,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ct.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},ct.cache=function(M){return function(){return M.apply(null,arguments)}},ct.cacheSignal=function(){return null},ct.cloneElement=function(M,G,q){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var L=S({},M.props),U=M.key;if(G!=null)for(J in G.key!==void 0&&(U=""+G.key),G)!O.call(G,J)||J==="key"||J==="__self"||J==="__source"||J==="ref"&&G.ref===void 0||(L[J]=G[J]);var J=arguments.length-2;if(J===1)L.children=q;else if(1<J){for(var pe=Array(J),ge=0;ge<J;ge++)pe[ge]=arguments[ge+2];L.children=pe}return N(M.type,U,L)},ct.createContext=function(M){return M={$$typeof:l,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:i,_context:M},M},ct.createElement=function(M,G,q){var L,U={},J=null;if(G!=null)for(L in G.key!==void 0&&(J=""+G.key),G)O.call(G,L)&&L!=="key"&&L!=="__self"&&L!=="__source"&&(U[L]=G[L]);var pe=arguments.length-2;if(pe===1)U.children=q;else if(1<pe){for(var ge=Array(pe),Ce=0;Ce<pe;Ce++)ge[Ce]=arguments[Ce+2];U.children=ge}if(M&&M.defaultProps)for(L in pe=M.defaultProps,pe)U[L]===void 0&&(U[L]=pe[L]);return N(M,J,U)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(M){return{$$typeof:c,render:M}},ct.isValidElement=F,ct.lazy=function(M){return{$$typeof:g,_payload:{_status:-1,_result:M},_init:te}},ct.memo=function(M,G){return{$$typeof:p,type:M,compare:G===void 0?null:G}},ct.startTransition=function(M){var G=D.T,q={};D.T=q;try{var L=M(),U=D.S;U!==null&&U(q,L),typeof L=="object"&&L!==null&&typeof L.then=="function"&&L.then(A,le)}catch(J){le(J)}finally{G!==null&&q.types!==null&&(G.types=q.types),D.T=G}},ct.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ct.use=function(M){return D.H.use(M)},ct.useActionState=function(M,G,q){return D.H.useActionState(M,G,q)},ct.useCallback=function(M,G){return D.H.useCallback(M,G)},ct.useContext=function(M){return D.H.useContext(M)},ct.useDebugValue=function(){},ct.useDeferredValue=function(M,G){return D.H.useDeferredValue(M,G)},ct.useEffect=function(M,G){return D.H.useEffect(M,G)},ct.useEffectEvent=function(M){return D.H.useEffectEvent(M)},ct.useId=function(){return D.H.useId()},ct.useImperativeHandle=function(M,G,q){return D.H.useImperativeHandle(M,G,q)},ct.useInsertionEffect=function(M,G){return D.H.useInsertionEffect(M,G)},ct.useLayoutEffect=function(M,G){return D.H.useLayoutEffect(M,G)},ct.useMemo=function(M,G){return D.H.useMemo(M,G)},ct.useOptimistic=function(M,G){return D.H.useOptimistic(M,G)},ct.useReducer=function(M,G,q){return D.H.useReducer(M,G,q)},ct.useRef=function(M){return D.H.useRef(M)},ct.useState=function(M){return D.H.useState(M)},ct.useSyncExternalStore=function(M,G,q){return D.H.useSyncExternalStore(M,G,q)},ct.useTransition=function(){return D.H.useTransition()},ct.version="19.2.6",ct}var T1;function Ls(){return T1||(T1=1,fS.exports=EU()),fS.exports}var R=Ls();const X=Ll(R),v_=_U({__proto__:null,default:X},[R]);var vS={exports:{}},ku={},bS={exports:{}},yS={};var w1;function RU(){return w1||(w1=1,(function(e){function t(H,Z){var te=H.length;H.push(Z);e:for(;0<te;){var le=te-1>>>1,Q=H[le];if(0<n(Q,Z))H[le]=Z,H[te]=Q,te=le;else break e}}function o(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var Z=H[0],te=H.pop();if(te!==Z){H[0]=te;e:for(var le=0,Q=H.length,M=Q>>>1;le<M;){var G=2*(le+1)-1,q=H[G],L=G+1,U=H[L];if(0>n(q,te))L<Q&&0>n(U,q)?(H[le]=U,H[L]=te,le=L):(H[le]=q,H[G]=te,le=G);else if(L<Q&&0>n(U,te))H[le]=U,H[L]=te,le=L;else break e}}return Z}function n(H,Z){var te=H.sortIndex-Z.sortIndex;return te!==0?te:H.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var u=[],p=[],g=1,m=null,f=3,v=!1,b=!1,S=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function k(H){for(var Z=o(p);Z!==null;){if(Z.callback===null)a(p);else if(Z.startTime<=H)a(p),Z.sortIndex=Z.expirationTime,t(u,Z);else break;Z=o(p)}}function x(H){if(S=!1,k(H),!b)if(o(u)!==null)b=!0,A||(A=!0,z());else{var Z=o(p);Z!==null&&ne(x,Z.startTime-H)}}var A=!1,D=-1,O=5,N=-1;function $(){return C?!0:!(e.unstable_now()-N<O)}function F(){if(C=!1,A){var H=e.unstable_now();N=H;var Z=!0;try{e:{b=!1,S&&(S=!1,_(D),D=-1),v=!0;var te=f;try{t:{for(k(H),m=o(u);m!==null&&!(m.expirationTime>H&&$());){var le=m.callback;if(typeof le=="function"){m.callback=null,f=m.priorityLevel;var Q=le(m.expirationTime<=H);if(H=e.unstable_now(),typeof Q=="function"){m.callback=Q,k(H),Z=!0;break t}m===o(u)&&a(u),k(H)}else a(u);m=o(u)}if(m!==null)Z=!0;else{var M=o(p);M!==null&&ne(x,M.startTime-H),Z=!1}}break e}finally{m=null,f=te,v=!1}Z=void 0}}finally{Z?z():A=!1}}}var z;if(typeof E=="function")z=function(){E(F)};else if(typeof MessageChannel<"u"){var j=new MessageChannel,K=j.port2;j.port1.onmessage=F,z=function(){K.postMessage(null)}}else z=function(){w(F,0)};function ne(H,Z){D=w(function(){H(e.unstable_now())},Z)}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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(H){switch(f){case 1:case 2:case 3:var Z=3;break;default:Z=f}var te=f;f=Z;try{return H()}finally{f=te}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(H,Z){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var te=f;f=H;try{return Z()}finally{f=te}},e.unstable_scheduleCallback=function(H,Z,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,H){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,H={id:g++,callback:Z,priorityLevel:H,startTime:te,expirationTime:Q,sortIndex:-1},te>le?(H.sortIndex=te,t(p,H),o(u)===null&&H===o(p)&&(S?(_(D),D=-1):S=!0,ne(x,te-le))):(H.sortIndex=Q,t(u,H),b||v||(b=!0,A||(A=!0,z()))),H},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(H){var Z=f;return function(){var te=f;f=Z;try{return H.apply(this,arguments)}finally{f=te}}}})(yS)),yS}var _1;function AU(){return _1||(_1=1,bS.exports=RU()),bS.exports}var SS={exports:{}},Aa={};var C1;function DU(){if(C1)return Aa;C1=1;var e=Ls();function t(u){var p="https://react.dev/errors/"+u;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)p+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+u+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var a={d:{f:o,r:function(){throw Error(t(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},n=Symbol.for("react.portal");function i(u,p,g){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:n,key:m==null?null:""+m,children:u,containerInfo:p,implementation:g}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(u,p){if(u==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Aa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Aa.createPortal=function(u,p){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return i(u,p,null,g)},Aa.flushSync=function(u){var p=l.T,g=a.p;try{if(l.T=null,a.p=2,u)return u()}finally{l.T=p,a.p=g,a.d.f()}},Aa.preconnect=function(u,p){typeof u=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(u,p))},Aa.prefetchDNS=function(u){typeof u=="string"&&a.d.D(u)},Aa.preinit=function(u,p){if(typeof u=="string"&&p&&typeof p.as=="string"){var g=p.as,m=c(g,p.crossOrigin),f=typeof p.integrity=="string"?p.integrity:void 0,v=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;g==="style"?a.d.S(u,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:m,integrity:f,fetchPriority:v}):g==="script"&&a.d.X(u,{crossOrigin:m,integrity:f,fetchPriority:v,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Aa.preinitModule=function(u,p){if(typeof u=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var g=c(p.as,p.crossOrigin);a.d.M(u,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(u)},Aa.preload=function(u,p){if(typeof u=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var g=p.as,m=c(g,p.crossOrigin);a.d.L(u,g,{crossOrigin:m,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Aa.preloadModule=function(u,p){if(typeof u=="string")if(p){var g=c(p.as,p.crossOrigin);a.d.m(u,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(u)},Aa.requestFormReset=function(u){a.d.r(u)},Aa.unstable_batchedUpdates=function(u,p){return u(p)},Aa.useFormState=function(u,p,g){return l.H.useFormState(u,p,g)},Aa.useFormStatus=function(){return l.H.useHostTransitionStatus()},Aa.version="19.2.6",Aa}var P1;function eI(){if(P1)return SS.exports;P1=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(),SS.exports=DU(),SS.exports}var k1;function OU(){if(k1)return ku;k1=1;var e=AU(),t=Ls(),o=eI();function a(r){var s="https://react.dev/errors/"+r;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)s+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+r+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function i(r){var s=r,d=r;if(r.alternate)for(;s.return;)s=s.return;else{r=s;do s=r,(s.flags&4098)!==0&&(d=s.return),r=s.return;while(r)}return s.tag===3?d:null}function l(r){if(r.tag===13){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function c(r){if(r.tag===31){var s=r.memoizedState;if(s===null&&(r=r.alternate,r!==null&&(s=r.memoizedState)),s!==null)return s.dehydrated}return null}function u(r){if(i(r)!==r)throw Error(a(188))}function p(r){var s=r.alternate;if(!s){if(s=i(r),s===null)throw Error(a(188));return s!==r?null:r}for(var d=r,h=s;;){var y=d.return;if(y===null)break;var P=y.alternate;if(P===null){if(h=y.return,h!==null){d=h;continue}break}if(y.child===P.child){for(P=y.child;P;){if(P===d)return u(y),r;if(P===h)return u(y),s;P=P.sibling}throw Error(a(188))}if(d.return!==h.return)d=y,h=P;else{for(var I=!1,B=y.child;B;){if(B===d){I=!0,d=y,h=P;break}if(B===h){I=!0,h=y,d=P;break}B=B.sibling}if(!I){for(B=P.child;B;){if(B===d){I=!0,d=P,h=y;break}if(B===h){I=!0,h=P,d=y;break}B=B.sibling}if(!I)throw Error(a(189))}}if(d.alternate!==h)throw Error(a(190))}if(d.tag!==3)throw Error(a(188));return d.stateNode.current===d?r:s}function g(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r;for(r=r.child;r!==null;){if(s=g(r),s!==null)return s;r=r.sibling}return null}var m=Object.assign,f=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),E=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function z(r){return r===null||typeof r!="object"?null:(r=F&&r[F]||r["@@iterator"],typeof r=="function"?r:null)}var j=Symbol.for("react.client.reference");function K(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===j?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case S:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case x:return"Suspense";case A:return"SuspenseList";case N:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case b:return"Portal";case E:return r.displayName||"Context";case _:return(r._context.displayName||"Context")+".Consumer";case k:var s=r.render;return r=r.displayName,r||(r=s.displayName||s.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case D:return s=r.displayName||null,s!==null?s:K(r.type)||"Memo";case O:s=r._payload,r=r._init;try{return K(r(s))}catch{}}return null}var ne=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},le=[],Q=-1;function M(r){return{current:r}}function G(r){0>Q||(r.current=le[Q],le[Q]=null,Q--)}function q(r,s){Q++,le[Q]=r.current,r.current=s}var L=M(null),U=M(null),J=M(null),pe=M(null);function ge(r,s){switch(q(J,s),q(U,r),q(L,null),s.nodeType){case 9:case 11:r=(r=s.documentElement)&&(r=r.namespaceURI)?UE(r):0;break;default:if(r=s.tagName,s=s.namespaceURI)s=UE(s),r=zE(s,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}G(L),q(L,r)}function Ce(){G(L),G(U),G(J)}function $e(r){r.memoizedState!==null&&q(pe,r);var s=L.current,d=zE(s,r.type);s!==d&&(q(U,r),q(L,d))}function Y(r){U.current===r&&(G(L),G(U)),pe.current===r&&(G(pe),Tu._currentValue=te)}var ae,ve;function ie(r){if(ae===void 0)try{throw Error()}catch(d){var s=d.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||"",ve=-1<d.stack.indexOf(`
3
3
  at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
4
4
  `+ae+r+ve}var Te=!1;function ke(r,s){if(!r||Te)return"";Te=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var we=function(){throw Error()};if(Object.defineProperty(we.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(we,[])}catch(fe){var me=fe}Reflect.construct(r,[],we)}else{try{we.call()}catch(fe){me=fe}r.call(we.prototype)}}else{try{throw Error()}catch(fe){me=fe}(we=r())&&typeof we.catch=="function"&&we.catch(function(){})}}catch(fe){if(fe&&me&&typeof fe.stack=="string")return[fe.stack,me.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=h.DetermineComponentFrameRoot(),I=P[0],B=P[1];if(I&&B){var ee=I.split(`
@@ -7,9 +7,9 @@ function _U(e,t){for(var o=0;o<t.length;o++){const a=t[o];if(typeof a!="string"&
7
7
  `+ee[h].replace(" at new "," at ");return r.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",r.displayName)),ye}while(1<=h&&0<=y);break}}}finally{Te=!1,Error.prepareStackTrace=d}return(d=r?r.displayName||r.name:"")?ie(d):""}function it(r,s){switch(r.tag){case 26:case 27:case 5:return ie(r.type);case 16:return ie("Lazy");case 13:return r.child!==s&&s!==null?ie("Suspense Fallback"):ie("Suspense");case 19:return ie("SuspenseList");case 0:case 15:return ke(r.type,!1);case 11:return ke(r.type.render,!1);case 1:return ke(r.type,!0);case 31:return ie("Activity");default:return""}}function lt(r){try{var s="",d=null;do s+=it(r,d),d=r,r=r.return;while(r);return s}catch(h){return`
8
8
  Error generating stack: `+h.message+`
9
9
  `+h.stack}}var Ge=Object.prototype.hasOwnProperty,tt=e.unstable_scheduleCallback,De=e.unstable_cancelCallback,Ae=e.unstable_shouldYield,He=e.unstable_requestPaint,W=e.unstable_now,oe=e.unstable_getCurrentPriorityLevel,se=e.unstable_ImmediatePriority,Pe=e.unstable_UserBlockingPriority,Ee=e.unstable_NormalPriority,Re=e.unstable_LowPriority,Le=e.unstable_IdlePriority,at=e.log,rt=e.unstable_setDisableYieldValue,St=null,Et=null;function Tt(r){if(typeof at=="function"&&rt(r),Et&&typeof Et.setStrictMode=="function")try{Et.setStrictMode(St,r)}catch{}}var $o=Math.clz32?Math.clz32:Xe,Jr=Math.log,rr=Math.LN2;function Xe(r){return r>>>=0,r===0?32:31-(Jr(r)/rr|0)|0}var ht=256,Rt=262144,dt=4194304;function Ft(r){var s=r&42;if(s!==0)return s;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Qe(r,s,d){var h=r.pendingLanes;if(h===0)return 0;var y=0,P=r.suspendedLanes,I=r.pingedLanes;r=r.warmLanes;var B=h&134217727;return B!==0?(h=B&~P,h!==0?y=Ft(h):(I&=B,I!==0?y=Ft(I):d||(d=B&~r,d!==0&&(y=Ft(d))))):(B=h&~P,B!==0?y=Ft(B):I!==0?y=Ft(I):d||(d=h&~r,d!==0&&(y=Ft(d)))),y===0?0:s!==0&&s!==y&&(s&P)===0&&(P=y&-y,d=s&-s,P>=d||P===32&&(d&4194048)!==0)?s:y}function gt(r,s){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&s)===0}function oo(r,s){switch(r){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zt(){var r=dt;return dt<<=1,(dt&62914560)===0&&(dt=4194304),r}function Ra(r){for(var s=[],d=0;31>d;d++)s.push(r);return s}function Bt(r,s){r.pendingLanes|=s,s!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function po(r,s,d,h,y,P){var I=r.pendingLanes;r.pendingLanes=d,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=d,r.entangledLanes&=d,r.errorRecoveryDisabledLanes&=d,r.shellSuspendCounter=0;var B=r.entanglements,ee=r.expirationTimes,ue=r.hiddenUpdates;for(d=I&~d;0<d;){var ye=31-$o(d),we=1<<ye;B[ye]=0,ee[ye]=-1;var me=ue[ye];if(me!==null)for(ue[ye]=null,ye=0;ye<me.length;ye++){var fe=me[ye];fe!==null&&(fe.lane&=-536870913)}d&=~we}h!==0&&In(r,h,0),P!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=P&~(I&~s))}function In(r,s,d){r.pendingLanes|=s,r.suspendedLanes&=~s;var h=31-$o(s);r.entangledLanes|=s,r.entanglements[h]=r.entanglements[h]|1073741824|d&261930}function ma(r,s){var d=r.entangledLanes|=s;for(r=r.entanglements;d;){var h=31-$o(d),y=1<<h;y&s|r[h]&s&&(r[h]|=s),d&=~y}}function Wa(r,s){var d=s&-s;return d=(d&42)!==0?1:ql(d),(d&(r.suspendedLanes|s))!==0?0:d}function ql(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function ir(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function rb(){var r=Z.p;return r!==0?r:(r=window.event,r===void 0?32:d1(r.type))}function kP(r,s){var d=Z.p;try{return Z.p=r,s()}finally{Z.p=d}}var Bi=Math.random().toString(36).slice(2),ga="__reactFiber$"+Bi,Ya="__reactProps$"+Bi,Vl="__reactContainer$"+Bi,ib="__reactEvents$"+Bi,p5="__reactListeners$"+Bi,m5="__reactHandles$"+Bi,xP="__reactResources$"+Bi,Nd="__reactMarker$"+Bi;function sb(r){delete r[ga],delete r[Ya],delete r[ib],delete r[p5],delete r[m5]}function Hl(r){var s=r[ga];if(s)return s;for(var d=r.parentNode;d;){if(s=d[Vl]||d[ga]){if(d=s.alternate,s.child!==null||d!==null&&d.child!==null)for(r=WE(r);r!==null;){if(d=r[ga])return d;r=WE(r)}return s}r=d,d=r.parentNode}return null}function Gl(r){if(r=r[ga]||r[Vl]){var s=r.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return r}return null}function Fd(r){var s=r.tag;if(s===5||s===26||s===27||s===6)return r.stateNode;throw Error(a(33))}function Kl(r){var s=r[xP];return s||(s=r[xP]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function la(r){r[Nd]=!0}var EP=new Set,RP={};function $s(r,s){Wl(r,s),Wl(r+"Capture",s)}function Wl(r,s){for(RP[r]=s,r=0;r<s.length;r++)EP.add(s[r])}var g5=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]*$"),AP={},DP={};function h5(r){return Ge.call(DP,r)?!0:Ge.call(AP,r)?!1:g5.test(r)?DP[r]=!0:(AP[r]=!0,!1)}function pm(r,s,d){if(h5(s))if(d===null)r.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":r.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){r.removeAttribute(s);return}}r.setAttribute(s,""+d)}}function mm(r,s,d){if(d===null)r.removeAttribute(s);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(s);return}r.setAttribute(s,""+d)}}function Xr(r,s,d,h){if(h===null)r.removeAttribute(d);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(d);return}r.setAttributeNS(s,d,""+h)}}function Mn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function OP(r){var s=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function f5(r,s,d){var h=Object.getOwnPropertyDescriptor(r.constructor.prototype,s);if(!r.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var y=h.get,P=h.set;return Object.defineProperty(r,s,{configurable:!0,get:function(){return y.call(this)},set:function(I){d=""+I,P.call(this,I)}}),Object.defineProperty(r,s,{enumerable:h.enumerable}),{getValue:function(){return d},setValue:function(I){d=""+I},stopTracking:function(){r._valueTracker=null,delete r[s]}}}}function lb(r){if(!r._valueTracker){var s=OP(r)?"checked":"value";r._valueTracker=f5(r,s,""+r[s])}}function IP(r){if(!r)return!1;var s=r._valueTracker;if(!s)return!0;var d=s.getValue(),h="";return r&&(h=OP(r)?r.checked?"true":"false":r.value),r=h,r!==d?(s.setValue(r),!0):!1}function gm(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var v5=/[\n"\\]/g;function Ln(r){return r.replace(v5,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function cb(r,s,d,h,y,P,I,B){r.name="",I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"?r.type=I:r.removeAttribute("type"),s!=null?I==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+Mn(s)):r.value!==""+Mn(s)&&(r.value=""+Mn(s)):I!=="submit"&&I!=="reset"||r.removeAttribute("value"),s!=null?db(r,I,Mn(s)):d!=null?db(r,I,Mn(d)):h!=null&&r.removeAttribute("value"),y==null&&P!=null&&(r.defaultChecked=!!P),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?r.name=""+Mn(B):r.removeAttribute("name")}function MP(r,s,d,h,y,P,I,B){if(P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(r.type=P),s!=null||d!=null){if(!(P!=="submit"&&P!=="reset"||s!=null)){lb(r);return}d=d!=null?""+Mn(d):"",s=s!=null?""+Mn(s):d,B||s===r.value||(r.value=s),r.defaultValue=s}h=h??y,h=typeof h!="function"&&typeof h!="symbol"&&!!h,r.checked=B?r.checked:!!h,r.defaultChecked=!!h,I!=null&&typeof I!="function"&&typeof I!="symbol"&&typeof I!="boolean"&&(r.name=I),lb(r)}function db(r,s,d){s==="number"&&gm(r.ownerDocument)===r||r.defaultValue===""+d||(r.defaultValue=""+d)}function Yl(r,s,d,h){if(r=r.options,s){s={};for(var y=0;y<d.length;y++)s["$"+d[y]]=!0;for(d=0;d<r.length;d++)y=s.hasOwnProperty("$"+r[d].value),r[d].selected!==y&&(r[d].selected=y),y&&h&&(r[d].defaultSelected=!0)}else{for(d=""+Mn(d),s=null,y=0;y<r.length;y++){if(r[y].value===d){r[y].selected=!0,h&&(r[y].defaultSelected=!0);return}s!==null||r[y].disabled||(s=r[y])}s!==null&&(s.selected=!0)}}function LP(r,s,d){if(s!=null&&(s=""+Mn(s),s!==r.value&&(r.value=s),d==null)){r.defaultValue!==s&&(r.defaultValue=s);return}r.defaultValue=d!=null?""+Mn(d):""}function NP(r,s,d,h){if(s==null){if(h!=null){if(d!=null)throw Error(a(92));if(ne(h)){if(1<h.length)throw Error(a(93));h=h[0]}d=h}d==null&&(d=""),s=d}d=Mn(s),r.defaultValue=d,h=r.textContent,h===d&&h!==""&&h!==null&&(r.value=h),lb(r)}function Zl(r,s){if(s){var d=r.firstChild;if(d&&d===r.lastChild&&d.nodeType===3){d.nodeValue=s;return}}r.textContent=s}var b5=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 FP(r,s,d){var h=s.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?h?r.setProperty(s,""):s==="float"?r.cssFloat="":r[s]="":h?r.setProperty(s,d):typeof d!="number"||d===0||b5.has(s)?s==="float"?r.cssFloat=d:r[s]=(""+d).trim():r[s]=d+"px"}function BP(r,s,d){if(s!=null&&typeof s!="object")throw Error(a(62));if(r=r.style,d!=null){for(var h in d)!d.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?r.setProperty(h,""):h==="float"?r.cssFloat="":r[h]="");for(var y in s)h=s[y],s.hasOwnProperty(y)&&d[y]!==h&&FP(r,y,h)}else for(var P in s)s.hasOwnProperty(P)&&FP(r,P,s[P])}function ub(r){if(r.indexOf("-")===-1)return!1;switch(r){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 y5=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"]]),S5=/^[\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 hm(r){return S5.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function ei(){}var pb=null;function mb(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ql=null,Jl=null;function jP(r){var s=Gl(r);if(s&&(r=s.stateNode)){var d=r[Ya]||null;e:switch(r=s.stateNode,s.type){case"input":if(cb(r,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),s=d.name,d.type==="radio"&&s!=null){for(d=r;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+Ln(""+s)+'"][type="radio"]'),s=0;s<d.length;s++){var h=d[s];if(h!==r&&h.form===r.form){var y=h[Ya]||null;if(!y)throw Error(a(90));cb(h,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(s=0;s<d.length;s++)h=d[s],h.form===r.form&&IP(h)}break e;case"textarea":LP(r,d.value,d.defaultValue);break e;case"select":s=d.value,s!=null&&Yl(r,!!d.multiple,s,!1)}}}var gb=!1;function UP(r,s,d){if(gb)return r(s,d);gb=!0;try{var h=r(s);return h}finally{if(gb=!1,(Ql!==null||Jl!==null)&&(og(),Ql&&(s=Ql,r=Jl,Jl=Ql=null,jP(s),r)))for(s=0;s<r.length;s++)jP(r[s])}}function Bd(r,s){var d=r.stateNode;if(d===null)return null;var h=d[Ya]||null;if(h===null)return null;d=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(r=r.type,h=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!h;break e;default:r=!1}if(r)return null;if(d&&typeof d!="function")throw Error(a(231,s,typeof d));return d}var ti=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hb=!1;if(ti)try{var jd={};Object.defineProperty(jd,"passive",{get:function(){hb=!0}}),window.addEventListener("test",jd,jd),window.removeEventListener("test",jd,jd)}catch{hb=!1}var ji=null,fb=null,fm=null;function zP(){if(fm)return fm;var r,s=fb,d=s.length,h,y="value"in ji?ji.value:ji.textContent,P=y.length;for(r=0;r<d&&s[r]===y[r];r++);var I=d-r;for(h=1;h<=I&&s[d-h]===y[P-h];h++);return fm=y.slice(r,1<h?1-h:void 0)}function vm(r){var s=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&s===13&&(r=13)):r=s,r===10&&(r=13),32<=r||r===13?r:0}function bm(){return!0}function $P(){return!1}function Za(r){function s(d,h,y,P,I){this._reactName=d,this._targetInst=y,this.type=h,this.nativeEvent=P,this.target=I,this.currentTarget=null;for(var B in r)r.hasOwnProperty(B)&&(d=r[B],this[B]=d?d(P):P[B]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?bm:$P,this.isPropagationStopped=$P,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=bm)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=bm)},persist:function(){},isPersistent:bm}),s}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ym=Za(qs),Ud=m({},qs,{view:0,detail:0}),T5=Za(Ud),vb,bb,zd,Sm=m({},Ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sb,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==zd&&(zd&&r.type==="mousemove"?(vb=r.screenX-zd.screenX,bb=r.screenY-zd.screenY):bb=vb=0,zd=r),vb)},movementY:function(r){return"movementY"in r?r.movementY:bb}}),qP=Za(Sm),w5=m({},Sm,{dataTransfer:0}),_5=Za(w5),C5=m({},Ud,{relatedTarget:0}),yb=Za(C5),P5=m({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),k5=Za(P5),x5=m({},qs,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),E5=Za(x5),R5=m({},qs,{data:0}),VP=Za(R5),A5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},D5={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"},O5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function I5(r){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(r):(r=O5[r])?!!s[r]:!1}function Sb(){return I5}var M5=m({},Ud,{key:function(r){if(r.key){var s=A5[r.key]||r.key;if(s!=="Unidentified")return s}return r.type==="keypress"?(r=vm(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?D5[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sb,charCode:function(r){return r.type==="keypress"?vm(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?vm(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),L5=Za(M5),N5=m({},Sm,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),HP=Za(N5),F5=m({},Ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sb}),B5=Za(F5),j5=m({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),U5=Za(j5),z5=m({},Sm,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),$5=Za(z5),q5=m({},qs,{newState:0,oldState:0}),V5=Za(q5),H5=[9,13,27,32],Tb=ti&&"CompositionEvent"in window,$d=null;ti&&"documentMode"in document&&($d=document.documentMode);var G5=ti&&"TextEvent"in window&&!$d,GP=ti&&(!Tb||$d&&8<$d&&11>=$d),KP=" ",WP=!1;function YP(r,s){switch(r){case"keyup":return H5.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZP(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Xl=!1;function K5(r,s){switch(r){case"compositionend":return ZP(s);case"keypress":return s.which!==32?null:(WP=!0,KP);case"textInput":return r=s.data,r===KP&&WP?null:r;default:return null}}function W5(r,s){if(Xl)return r==="compositionend"||!Tb&&YP(r,s)?(r=zP(),fm=fb=ji=null,Xl=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return GP&&s.locale!=="ko"?null:s.data;default:return null}}var Y5={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 QP(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s==="input"?!!Y5[r.type]:s==="textarea"}function JP(r,s,d,h){Ql?Jl?Jl.push(h):Jl=[h]:Ql=h,s=cg(s,"onChange"),0<s.length&&(d=new ym("onChange","change",null,d,h),r.push({event:d,listeners:s}))}var qd=null,Vd=null;function Z5(r){ME(r,0)}function Tm(r){var s=Fd(r);if(IP(s))return r}function XP(r,s){if(r==="change")return s}var ek=!1;if(ti){var wb;if(ti){var _b="oninput"in document;if(!_b){var tk=document.createElement("div");tk.setAttribute("oninput","return;"),_b=typeof tk.oninput=="function"}wb=_b}else wb=!1;ek=wb&&(!document.documentMode||9<document.documentMode)}function ok(){qd&&(qd.detachEvent("onpropertychange",ak),Vd=qd=null)}function ak(r){if(r.propertyName==="value"&&Tm(Vd)){var s=[];JP(s,Vd,r,mb(r)),UP(Z5,s)}}function Q5(r,s,d){r==="focusin"?(ok(),qd=s,Vd=d,qd.attachEvent("onpropertychange",ak)):r==="focusout"&&ok()}function J5(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Tm(Vd)}function X5(r,s){if(r==="click")return Tm(s)}function e6(r,s){if(r==="input"||r==="change")return Tm(s)}function t6(r,s){return r===s&&(r!==0||1/r===1/s)||r!==r&&s!==s}var mn=typeof Object.is=="function"?Object.is:t6;function Hd(r,s){if(mn(r,s))return!0;if(typeof r!="object"||r===null||typeof s!="object"||s===null)return!1;var d=Object.keys(r),h=Object.keys(s);if(d.length!==h.length)return!1;for(h=0;h<d.length;h++){var y=d[h];if(!Ge.call(s,y)||!mn(r[y],s[y]))return!1}return!0}function nk(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function rk(r,s){var d=nk(r);r=0;for(var h;d;){if(d.nodeType===3){if(h=r+d.textContent.length,r<=s&&h>=s)return{node:d,offset:s-r};r=h}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=nk(d)}}function ik(r,s){return r&&s?r===s?!0:r&&r.nodeType===3?!1:s&&s.nodeType===3?ik(r,s.parentNode):"contains"in r?r.contains(s):r.compareDocumentPosition?!!(r.compareDocumentPosition(s)&16):!1:!1}function sk(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var s=gm(r.document);s instanceof r.HTMLIFrameElement;){try{var d=typeof s.contentWindow.location.href=="string"}catch{d=!1}if(d)r=s.contentWindow;else break;s=gm(r.document)}return s}function Cb(r){var s=r&&r.nodeName&&r.nodeName.toLowerCase();return s&&(s==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||s==="textarea"||r.contentEditable==="true")}var o6=ti&&"documentMode"in document&&11>=document.documentMode,ec=null,Pb=null,Gd=null,kb=!1;function lk(r,s,d){var h=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;kb||ec==null||ec!==gm(h)||(h=ec,"selectionStart"in h&&Cb(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Gd&&Hd(Gd,h)||(Gd=h,h=cg(Pb,"onSelect"),0<h.length&&(s=new ym("onSelect","select",null,s,d),r.push({event:s,listeners:h}),s.target=ec)))}function Vs(r,s){var d={};return d[r.toLowerCase()]=s.toLowerCase(),d["Webkit"+r]="webkit"+s,d["Moz"+r]="moz"+s,d}var tc={animationend:Vs("Animation","AnimationEnd"),animationiteration:Vs("Animation","AnimationIteration"),animationstart:Vs("Animation","AnimationStart"),transitionrun:Vs("Transition","TransitionRun"),transitionstart:Vs("Transition","TransitionStart"),transitioncancel:Vs("Transition","TransitionCancel"),transitionend:Vs("Transition","TransitionEnd")},xb={},ck={};ti&&(ck=document.createElement("div").style,"AnimationEvent"in window||(delete tc.animationend.animation,delete tc.animationiteration.animation,delete tc.animationstart.animation),"TransitionEvent"in window||delete tc.transitionend.transition);function Hs(r){if(xb[r])return xb[r];if(!tc[r])return r;var s=tc[r],d;for(d in s)if(s.hasOwnProperty(d)&&d in ck)return xb[r]=s[d];return r}var dk=Hs("animationend"),uk=Hs("animationiteration"),pk=Hs("animationstart"),a6=Hs("transitionrun"),n6=Hs("transitionstart"),r6=Hs("transitioncancel"),mk=Hs("transitionend"),gk=new Map,Eb="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(" ");Eb.push("scrollEnd");function sr(r,s){gk.set(r,s),$s(s,[r])}var wm=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Nn=[],oc=0,Rb=0;function _m(){for(var r=oc,s=Rb=oc=0;s<r;){var d=Nn[s];Nn[s++]=null;var h=Nn[s];Nn[s++]=null;var y=Nn[s];Nn[s++]=null;var P=Nn[s];if(Nn[s++]=null,h!==null&&y!==null){var I=h.pending;I===null?y.next=y:(y.next=I.next,I.next=y),h.pending=y}P!==0&&hk(d,y,P)}}function Cm(r,s,d,h){Nn[oc++]=r,Nn[oc++]=s,Nn[oc++]=d,Nn[oc++]=h,Rb|=h,r.lanes|=h,r=r.alternate,r!==null&&(r.lanes|=h)}function Ab(r,s,d,h){return Cm(r,s,d,h),Pm(r)}function Gs(r,s){return Cm(r,null,null,s),Pm(r)}function hk(r,s,d){r.lanes|=d;var h=r.alternate;h!==null&&(h.lanes|=d);for(var y=!1,P=r.return;P!==null;)P.childLanes|=d,h=P.alternate,h!==null&&(h.childLanes|=d),P.tag===22&&(r=P.stateNode,r===null||r._visibility&1||(y=!0)),r=P,P=P.return;return r.tag===3?(P=r.stateNode,y&&s!==null&&(y=31-$o(d),r=P.hiddenUpdates,h=r[y],h===null?r[y]=[s]:h.push(s),s.lane=d|536870912),P):null}function Pm(r){if(50<gu)throw gu=0,jy=null,Error(a(185));for(var s=r.return;s!==null;)r=s,s=r.return;return r.tag===3?r.stateNode:null}var ac={};function i6(r,s,d,h){this.tag=r,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(r,s,d,h){return new i6(r,s,d,h)}function Db(r){return r=r.prototype,!(!r||!r.isReactComponent)}function oi(r,s){var d=r.alternate;return d===null?(d=gn(r.tag,s,r.key,r.mode),d.elementType=r.elementType,d.type=r.type,d.stateNode=r.stateNode,d.alternate=r,r.alternate=d):(d.pendingProps=s,d.type=r.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=r.flags&65011712,d.childLanes=r.childLanes,d.lanes=r.lanes,d.child=r.child,d.memoizedProps=r.memoizedProps,d.memoizedState=r.memoizedState,d.updateQueue=r.updateQueue,s=r.dependencies,d.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},d.sibling=r.sibling,d.index=r.index,d.ref=r.ref,d.refCleanup=r.refCleanup,d}function fk(r,s){r.flags&=65011714;var d=r.alternate;return d===null?(r.childLanes=0,r.lanes=s,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=d.childLanes,r.lanes=d.lanes,r.child=d.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=d.memoizedProps,r.memoizedState=d.memoizedState,r.updateQueue=d.updateQueue,r.type=d.type,s=d.dependencies,r.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r}function km(r,s,d,h,y,P){var I=0;if(h=r,typeof r=="function")Db(r)&&(I=1);else if(typeof r=="string")I=uU(r,d,L.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case N:return r=gn(31,d,s,y),r.elementType=N,r.lanes=P,r;case S:return Ks(d.children,y,P,s);case C:I=8,y|=24;break;case w:return r=gn(12,d,s,y|2),r.elementType=w,r.lanes=P,r;case x:return r=gn(13,d,s,y),r.elementType=x,r.lanes=P,r;case A:return r=gn(19,d,s,y),r.elementType=A,r.lanes=P,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case E:I=10;break e;case _:I=9;break e;case k:I=11;break e;case D:I=14;break e;case O:I=16,h=null;break e}I=29,d=Error(a(130,r===null?"null":typeof r,"")),h=null}return s=gn(I,d,s,y),s.elementType=r,s.type=h,s.lanes=P,s}function Ks(r,s,d,h){return r=gn(7,r,h,s),r.lanes=d,r}function Ob(r,s,d){return r=gn(6,r,null,s),r.lanes=d,r}function vk(r){var s=gn(18,null,null,0);return s.stateNode=r,s}function Ib(r,s,d){return s=gn(4,r.children!==null?r.children:[],r.key,s),s.lanes=d,s.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},s}var bk=new WeakMap;function Fn(r,s){if(typeof r=="object"&&r!==null){var d=bk.get(r);return d!==void 0?d:(s={value:r,source:s,stack:lt(s)},bk.set(r,s),s)}return{value:r,source:s,stack:lt(s)}}var nc=[],rc=0,xm=null,Kd=0,Bn=[],jn=0,Ui=null,Er=1,Rr="";function ai(r,s){nc[rc++]=Kd,nc[rc++]=xm,xm=r,Kd=s}function yk(r,s,d){Bn[jn++]=Er,Bn[jn++]=Rr,Bn[jn++]=Ui,Ui=r;var h=Er;r=Rr;var y=32-$o(h)-1;h&=~(1<<y),d+=1;var P=32-$o(s)+y;if(30<P){var I=y-y%5;P=(h&(1<<I)-1).toString(32),h>>=I,y-=I,Er=1<<32-$o(s)+y|d<<y|h,Rr=P+r}else Er=1<<P|d<<y|h,Rr=r}function Mb(r){r.return!==null&&(ai(r,1),yk(r,1,0))}function Lb(r){for(;r===xm;)xm=nc[--rc],nc[rc]=null,Kd=nc[--rc],nc[rc]=null;for(;r===Ui;)Ui=Bn[--jn],Bn[jn]=null,Rr=Bn[--jn],Bn[jn]=null,Er=Bn[--jn],Bn[jn]=null}function Sk(r,s){Bn[jn++]=Er,Bn[jn++]=Rr,Bn[jn++]=Ui,Er=s.id,Rr=s.overflow,Ui=r}var ha=null,mo=null,At=!1,zi=null,Un=!1,Nb=Error(a(519));function $i(r){var s=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wd(Fn(s,r)),Nb}function Tk(r){var s=r.stateNode,d=r.type,h=r.memoizedProps;switch(s[ga]=r,s[Ya]=h,d){case"dialog":_t("cancel",s),_t("close",s);break;case"iframe":case"object":case"embed":_t("load",s);break;case"video":case"audio":for(d=0;d<fu.length;d++)_t(fu[d],s);break;case"source":_t("error",s);break;case"img":case"image":case"link":_t("error",s),_t("load",s);break;case"details":_t("toggle",s);break;case"input":_t("invalid",s),MP(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":_t("invalid",s);break;case"textarea":_t("invalid",s),NP(s,h.value,h.defaultValue,h.children)}d=h.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||s.textContent===""+d||h.suppressHydrationWarning===!0||BE(s.textContent,d)?(h.popover!=null&&(_t("beforetoggle",s),_t("toggle",s)),h.onScroll!=null&&_t("scroll",s),h.onScrollEnd!=null&&_t("scrollend",s),h.onClick!=null&&(s.onclick=ei),s=!0):s=!1,s||$i(r,!0)}function wk(r){for(ha=r.return;ha;)switch(ha.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:ha=ha.return}}function ic(r){if(r!==ha)return!1;if(!At)return wk(r),At=!0,!1;var s=r.tag,d;if((d=s!==3&&s!==27)&&((d=s===5)&&(d=r.type,d=!(d!=="form"&&d!=="button")||eS(r.type,r.memoizedProps)),d=!d),d&&mo&&$i(r),wk(r),s===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));mo=KE(r)}else if(s===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));mo=KE(r)}else s===27?(s=mo,os(r.type)?(r=rS,rS=null,mo=r):mo=s):mo=ha?$n(r.stateNode.nextSibling):null;return!0}function Ws(){mo=ha=null,At=!1}function Fb(){var r=zi;return r!==null&&(en===null?en=r:en.push.apply(en,r),zi=null),r}function Wd(r){zi===null?zi=[r]:zi.push(r)}var Bb=M(null),Ys=null,ni=null;function qi(r,s,d){q(Bb,s._currentValue),s._currentValue=d}function ri(r){r._currentValue=Bb.current,G(Bb)}function jb(r,s,d){for(;r!==null;){var h=r.alternate;if((r.childLanes&s)!==s?(r.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),r===d)break;r=r.return}}function Ub(r,s,d,h){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var P=y.dependencies;if(P!==null){var I=y.child;P=P.firstContext;e:for(;P!==null;){var B=P;P=y;for(var ee=0;ee<s.length;ee++)if(B.context===s[ee]){P.lanes|=d,B=P.alternate,B!==null&&(B.lanes|=d),jb(P.return,d,r),h||(I=null);break e}P=B.next}}else if(y.tag===18){if(I=y.return,I===null)throw Error(a(341));I.lanes|=d,P=I.alternate,P!==null&&(P.lanes|=d),jb(I,d,r),I=null}else I=y.child;if(I!==null)I.return=y;else for(I=y;I!==null;){if(I===r){I=null;break}if(y=I.sibling,y!==null){y.return=I.return,I=y;break}I=I.return}y=I}}function sc(r,s,d,h){r=null;for(var y=s,P=!1;y!==null;){if(!P){if((y.flags&524288)!==0)P=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var I=y.alternate;if(I===null)throw Error(a(387));if(I=I.memoizedProps,I!==null){var B=y.type;mn(y.pendingProps.value,I.value)||(r!==null?r.push(B):r=[B])}}else if(y===pe.current){if(I=y.alternate,I===null)throw Error(a(387));I.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push(Tu):r=[Tu])}y=y.return}r!==null&&Ub(s,r,d,h),s.flags|=262144}function Em(r){for(r=r.firstContext;r!==null;){if(!mn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Zs(r){Ys=r,ni=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function fa(r){return _k(Ys,r)}function Rm(r,s){return Ys===null&&Zs(r),_k(r,s)}function _k(r,s){var d=s._currentValue;if(s={context:s,memoizedValue:d,next:null},ni===null){if(r===null)throw Error(a(308));ni=s,r.dependencies={lanes:0,firstContext:s},r.flags|=524288}else ni=ni.next=s;return d}var s6=typeof AbortController<"u"?AbortController:function(){var r=[],s=this.signal={aborted:!1,addEventListener:function(d,h){r.push(h)}};this.abort=function(){s.aborted=!0,r.forEach(function(d){return d()})}},l6=e.unstable_scheduleCallback,c6=e.unstable_NormalPriority,qo={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zb(){return{controller:new s6,data:new Map,refCount:0}}function Yd(r){r.refCount--,r.refCount===0&&l6(c6,function(){r.controller.abort()})}var Zd=null,$b=0,lc=0,cc=null;function d6(r,s){if(Zd===null){var d=Zd=[];$b=0,lc=Hy(),cc={status:"pending",value:void 0,then:function(h){d.push(h)}}}return $b++,s.then(Ck,Ck),s}function Ck(){if(--$b===0&&Zd!==null){cc!==null&&(cc.status="fulfilled");var r=Zd;Zd=null,lc=0,cc=null;for(var s=0;s<r.length;s++)(0,r[s])()}}function u6(r,s){var d=[],h={status:"pending",value:null,reason:null,then:function(y){d.push(y)}};return r.then(function(){h.status="fulfilled",h.value=s;for(var y=0;y<d.length;y++)(0,d[y])(s)},function(y){for(h.status="rejected",h.reason=y,y=0;y<d.length;y++)(0,d[y])(void 0)}),h}var Pk=H.S;H.S=function(r,s){lE=W(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&d6(r,s),Pk!==null&&Pk(r,s)};var Qs=M(null);function qb(){var r=Qs.current;return r!==null?r:ao.pooledCache}function Am(r,s){s===null?q(Qs,Qs.current):q(Qs,s.pool)}function kk(){var r=qb();return r===null?null:{parent:qo._currentValue,pool:r}}var dc=Error(a(460)),Vb=Error(a(474)),Dm=Error(a(542)),Om={then:function(){}};function xk(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Ek(r,s,d){switch(d=r[d],d===void 0?r.push(s):d!==s&&(s.then(ei,ei),s=d),s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Ak(r),r;default:if(typeof s.status=="string")s.then(ei,ei);else{if(r=ao,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=s,r.status="pending",r.then(function(h){if(s.status==="pending"){var y=s;y.status="fulfilled",y.value=h}},function(h){if(s.status==="pending"){var y=s;y.status="rejected",y.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw r=s.reason,Ak(r),r}throw Xs=s,dc}}function Js(r){try{var s=r._init;return s(r._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(Xs=d,dc):d}}var Xs=null;function Rk(){if(Xs===null)throw Error(a(459));var r=Xs;return Xs=null,r}function Ak(r){if(r===dc||r===Dm)throw Error(a(483))}var uc=null,Qd=0;function Im(r){var s=Qd;return Qd+=1,uc===null&&(uc=[]),Ek(uc,r,s)}function Jd(r,s){s=s.props.ref,r.ref=s!==void 0?s:null}function Mm(r,s){throw s.$$typeof===f?Error(a(525)):(r=Object.prototype.toString.call(s),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":r)))}function Dk(r){function s(ce,re){if(r){var de=ce.deletions;de===null?(ce.deletions=[re],ce.flags|=16):de.push(re)}}function d(ce,re){if(!r)return null;for(;re!==null;)s(ce,re),re=re.sibling;return null}function h(ce){for(var re=new Map;ce!==null;)ce.key!==null?re.set(ce.key,ce):re.set(ce.index,ce),ce=ce.sibling;return re}function y(ce,re){return ce=oi(ce,re),ce.index=0,ce.sibling=null,ce}function P(ce,re,de){return ce.index=de,r?(de=ce.alternate,de!==null?(de=de.index,de<re?(ce.flags|=67108866,re):de):(ce.flags|=67108866,re)):(ce.flags|=1048576,re)}function I(ce){return r&&ce.alternate===null&&(ce.flags|=67108866),ce}function B(ce,re,de,Se){return re===null||re.tag!==6?(re=Ob(de,ce.mode,Se),re.return=ce,re):(re=y(re,de),re.return=ce,re)}function ee(ce,re,de,Se){var ot=de.type;return ot===S?ye(ce,re,de.props.children,Se,de.key):re!==null&&(re.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===O&&Js(ot)===re.type)?(re=y(re,de.props),Jd(re,de),re.return=ce,re):(re=km(de.type,de.key,de.props,null,ce.mode,Se),Jd(re,de),re.return=ce,re)}function ue(ce,re,de,Se){return re===null||re.tag!==4||re.stateNode.containerInfo!==de.containerInfo||re.stateNode.implementation!==de.implementation?(re=Ib(de,ce.mode,Se),re.return=ce,re):(re=y(re,de.children||[]),re.return=ce,re)}function ye(ce,re,de,Se,ot){return re===null||re.tag!==7?(re=Ks(de,ce.mode,Se,ot),re.return=ce,re):(re=y(re,de),re.return=ce,re)}function we(ce,re,de){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=Ob(""+re,ce.mode,de),re.return=ce,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return de=km(re.type,re.key,re.props,null,ce.mode,de),Jd(de,re),de.return=ce,de;case b:return re=Ib(re,ce.mode,de),re.return=ce,re;case O:return re=Js(re),we(ce,re,de)}if(ne(re)||z(re))return re=Ks(re,ce.mode,de,null),re.return=ce,re;if(typeof re.then=="function")return we(ce,Im(re),de);if(re.$$typeof===E)return we(ce,Rm(ce,re),de);Mm(ce,re)}return null}function me(ce,re,de,Se){var ot=re!==null?re.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ot!==null?null:B(ce,re,""+de,Se);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case v:return de.key===ot?ee(ce,re,de,Se):null;case b:return de.key===ot?ue(ce,re,de,Se):null;case O:return de=Js(de),me(ce,re,de,Se)}if(ne(de)||z(de))return ot!==null?null:ye(ce,re,de,Se,null);if(typeof de.then=="function")return me(ce,re,Im(de),Se);if(de.$$typeof===E)return me(ce,re,Rm(ce,de),Se);Mm(ce,de)}return null}function fe(ce,re,de,Se,ot){if(typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint")return ce=ce.get(de)||null,B(re,ce,""+Se,ot);if(typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case v:return ce=ce.get(Se.key===null?de:Se.key)||null,ee(re,ce,Se,ot);case b:return ce=ce.get(Se.key===null?de:Se.key)||null,ue(re,ce,Se,ot);case O:return Se=Js(Se),fe(ce,re,de,Se,ot)}if(ne(Se)||z(Se))return ce=ce.get(de)||null,ye(re,ce,Se,ot,null);if(typeof Se.then=="function")return fe(ce,re,de,Im(Se),ot);if(Se.$$typeof===E)return fe(ce,re,de,Rm(re,Se),ot);Mm(re,Se)}return null}function Ye(ce,re,de,Se){for(var ot=null,jt=null,Je=re,pt=re=0,xt=null;Je!==null&&pt<de.length;pt++){Je.index>pt?(xt=Je,Je=null):xt=Je.sibling;var Ut=me(ce,Je,de[pt],Se);if(Ut===null){Je===null&&(Je=xt);break}r&&Je&&Ut.alternate===null&&s(ce,Je),re=P(Ut,re,pt),jt===null?ot=Ut:jt.sibling=Ut,jt=Ut,Je=xt}if(pt===de.length)return d(ce,Je),At&&ai(ce,pt),ot;if(Je===null){for(;pt<de.length;pt++)Je=we(ce,de[pt],Se),Je!==null&&(re=P(Je,re,pt),jt===null?ot=Je:jt.sibling=Je,jt=Je);return At&&ai(ce,pt),ot}for(Je=h(Je);pt<de.length;pt++)xt=fe(Je,ce,pt,de[pt],Se),xt!==null&&(r&&xt.alternate!==null&&Je.delete(xt.key===null?pt:xt.key),re=P(xt,re,pt),jt===null?ot=xt:jt.sibling=xt,jt=xt);return r&&Je.forEach(function(ss){return s(ce,ss)}),At&&ai(ce,pt),ot}function st(ce,re,de,Se){if(de==null)throw Error(a(151));for(var ot=null,jt=null,Je=re,pt=re=0,xt=null,Ut=de.next();Je!==null&&!Ut.done;pt++,Ut=de.next()){Je.index>pt?(xt=Je,Je=null):xt=Je.sibling;var ss=me(ce,Je,Ut.value,Se);if(ss===null){Je===null&&(Je=xt);break}r&&Je&&ss.alternate===null&&s(ce,Je),re=P(ss,re,pt),jt===null?ot=ss:jt.sibling=ss,jt=ss,Je=xt}if(Ut.done)return d(ce,Je),At&&ai(ce,pt),ot;if(Je===null){for(;!Ut.done;pt++,Ut=de.next())Ut=we(ce,Ut.value,Se),Ut!==null&&(re=P(Ut,re,pt),jt===null?ot=Ut:jt.sibling=Ut,jt=Ut);return At&&ai(ce,pt),ot}for(Je=h(Je);!Ut.done;pt++,Ut=de.next())Ut=fe(Je,ce,pt,Ut.value,Se),Ut!==null&&(r&&Ut.alternate!==null&&Je.delete(Ut.key===null?pt:Ut.key),re=P(Ut,re,pt),jt===null?ot=Ut:jt.sibling=Ut,jt=Ut);return r&&Je.forEach(function(wU){return s(ce,wU)}),At&&ai(ce,pt),ot}function Xt(ce,re,de,Se){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case v:e:{for(var ot=de.key;re!==null;){if(re.key===ot){if(ot=de.type,ot===S){if(re.tag===7){d(ce,re.sibling),Se=y(re,de.props.children),Se.return=ce,ce=Se;break e}}else if(re.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===O&&Js(ot)===re.type){d(ce,re.sibling),Se=y(re,de.props),Jd(Se,de),Se.return=ce,ce=Se;break e}d(ce,re);break}else s(ce,re);re=re.sibling}de.type===S?(Se=Ks(de.props.children,ce.mode,Se,de.key),Se.return=ce,ce=Se):(Se=km(de.type,de.key,de.props,null,ce.mode,Se),Jd(Se,de),Se.return=ce,ce=Se)}return I(ce);case b:e:{for(ot=de.key;re!==null;){if(re.key===ot)if(re.tag===4&&re.stateNode.containerInfo===de.containerInfo&&re.stateNode.implementation===de.implementation){d(ce,re.sibling),Se=y(re,de.children||[]),Se.return=ce,ce=Se;break e}else{d(ce,re);break}else s(ce,re);re=re.sibling}Se=Ib(de,ce.mode,Se),Se.return=ce,ce=Se}return I(ce);case O:return de=Js(de),Xt(ce,re,de,Se)}if(ne(de))return Ye(ce,re,de,Se);if(z(de)){if(ot=z(de),typeof ot!="function")throw Error(a(150));return de=ot.call(de),st(ce,re,de,Se)}if(typeof de.then=="function")return Xt(ce,re,Im(de),Se);if(de.$$typeof===E)return Xt(ce,re,Rm(ce,de),Se);Mm(ce,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,re!==null&&re.tag===6?(d(ce,re.sibling),Se=y(re,de),Se.return=ce,ce=Se):(d(ce,re),Se=Ob(de,ce.mode,Se),Se.return=ce,ce=Se),I(ce)):d(ce,re)}return function(ce,re,de,Se){try{Qd=0;var ot=Xt(ce,re,de,Se);return uc=null,ot}catch(Je){if(Je===dc||Je===Dm)throw Je;var jt=gn(29,Je,null,ce.mode);return jt.lanes=Se,jt.return=ce,jt}}}var el=Dk(!0),Ok=Dk(!1),Vi=!1;function Hb(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gb(r,s){r=r.updateQueue,s.updateQueue===r&&(s.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Hi(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Gi(r,s,d){var h=r.updateQueue;if(h===null)return null;if(h=h.shared,(qt&2)!==0){var y=h.pending;return y===null?s.next=s:(s.next=y.next,y.next=s),h.pending=s,s=Pm(r),hk(r,null,d),s}return Cm(r,h,s,d),Pm(r)}function Xd(r,s,d){if(s=s.updateQueue,s!==null&&(s=s.shared,(d&4194048)!==0)){var h=s.lanes;h&=r.pendingLanes,d|=h,s.lanes=d,ma(r,d)}}function Kb(r,s){var d=r.updateQueue,h=r.alternate;if(h!==null&&(h=h.updateQueue,d===h)){var y=null,P=null;if(d=d.firstBaseUpdate,d!==null){do{var I={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};P===null?y=P=I:P=P.next=I,d=d.next}while(d!==null);P===null?y=P=s:P=P.next=s}else y=P=s;d={baseState:h.baseState,firstBaseUpdate:y,lastBaseUpdate:P,shared:h.shared,callbacks:h.callbacks},r.updateQueue=d;return}r=d.lastBaseUpdate,r===null?d.firstBaseUpdate=s:r.next=s,d.lastBaseUpdate=s}var Wb=!1;function eu(){if(Wb){var r=cc;if(r!==null)throw r}}function tu(r,s,d,h){Wb=!1;var y=r.updateQueue;Vi=!1;var P=y.firstBaseUpdate,I=y.lastBaseUpdate,B=y.shared.pending;if(B!==null){y.shared.pending=null;var ee=B,ue=ee.next;ee.next=null,I===null?P=ue:I.next=ue,I=ee;var ye=r.alternate;ye!==null&&(ye=ye.updateQueue,B=ye.lastBaseUpdate,B!==I&&(B===null?ye.firstBaseUpdate=ue:B.next=ue,ye.lastBaseUpdate=ee))}if(P!==null){var we=y.baseState;I=0,ye=ue=ee=null,B=P;do{var me=B.lane&-536870913,fe=me!==B.lane;if(fe?(kt&me)===me:(h&me)===me){me!==0&&me===lc&&(Wb=!0),ye!==null&&(ye=ye.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var Ye=r,st=B;me=s;var Xt=d;switch(st.tag){case 1:if(Ye=st.payload,typeof Ye=="function"){we=Ye.call(Xt,we,me);break e}we=Ye;break e;case 3:Ye.flags=Ye.flags&-65537|128;case 0:if(Ye=st.payload,me=typeof Ye=="function"?Ye.call(Xt,we,me):Ye,me==null)break e;we=m({},we,me);break e;case 2:Vi=!0}}me=B.callback,me!==null&&(r.flags|=64,fe&&(r.flags|=8192),fe=y.callbacks,fe===null?y.callbacks=[me]:fe.push(me))}else fe={lane:me,tag:B.tag,payload:B.payload,callback:B.callback,next:null},ye===null?(ue=ye=fe,ee=we):ye=ye.next=fe,I|=me;if(B=B.next,B===null){if(B=y.shared.pending,B===null)break;fe=B,B=fe.next,fe.next=null,y.lastBaseUpdate=fe,y.shared.pending=null}}while(!0);ye===null&&(ee=we),y.baseState=ee,y.firstBaseUpdate=ue,y.lastBaseUpdate=ye,P===null&&(y.shared.lanes=0),Qi|=I,r.lanes=I,r.memoizedState=we}}function Ik(r,s){if(typeof r!="function")throw Error(a(191,r));r.call(s)}function Mk(r,s){var d=r.callbacks;if(d!==null)for(r.callbacks=null,r=0;r<d.length;r++)Ik(d[r],s)}var pc=M(null),Lm=M(0);function Lk(r,s){r=gi,q(Lm,r),q(pc,s),gi=r|s.baseLanes}function Yb(){q(Lm,gi),q(pc,pc.current)}function Zb(){gi=Lm.current,G(pc),G(Lm)}var hn=M(null),zn=null;function Ki(r){var s=r.alternate;q(Io,Io.current&1),q(hn,r),zn===null&&(s===null||pc.current!==null||s.memoizedState!==null)&&(zn=r)}function Qb(r){q(Io,Io.current),q(hn,r),zn===null&&(zn=r)}function Nk(r){r.tag===22?(q(Io,Io.current),q(hn,r),zn===null&&(zn=r)):Wi()}function Wi(){q(Io,Io.current),q(hn,hn.current)}function fn(r){G(hn),zn===r&&(zn=null),G(Io)}var Io=M(0);function Nm(r){for(var s=r;s!==null;){if(s.tag===13){var d=s.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||aS(d)||nS(d)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ii=0,ut=null,Qt=null,Vo=null,Fm=!1,mc=!1,tl=!1,Bm=0,ou=0,gc=null,p6=0;function Ro(){throw Error(a(321))}function Jb(r,s){if(s===null)return!1;for(var d=0;d<s.length&&d<r.length;d++)if(!mn(r[d],s[d]))return!1;return!0}function Xb(r,s,d,h,y,P){return ii=P,ut=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,H.H=r===null||r.memoizedState===null?yx:gy,tl=!1,P=d(h,y),tl=!1,mc&&(P=Bk(s,d,h,y)),Fk(r),P}function Fk(r){H.H=ru;var s=Qt!==null&&Qt.next!==null;if(ii=0,Vo=Qt=ut=null,Fm=!1,ou=0,gc=null,s)throw Error(a(300));r===null||Ho||(r=r.dependencies,r!==null&&Em(r)&&(Ho=!0))}function Bk(r,s,d,h){ut=r;var y=0;do{if(mc&&(gc=null),ou=0,mc=!1,25<=y)throw Error(a(301));if(y+=1,Vo=Qt=null,r.updateQueue!=null){var P=r.updateQueue;P.lastEffect=null,P.events=null,P.stores=null,P.memoCache!=null&&(P.memoCache.index=0)}H.H=Sx,P=s(d,h)}while(mc);return P}function m6(){var r=H.H,s=r.useState()[0];return s=typeof s.then=="function"?au(s):s,r=r.useState()[0],(Qt!==null?Qt.memoizedState:null)!==r&&(ut.flags|=1024),s}function ey(){var r=Bm!==0;return Bm=0,r}function ty(r,s,d){s.updateQueue=r.updateQueue,s.flags&=-2053,r.lanes&=~d}function oy(r){if(Fm){for(r=r.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Fm=!1}ii=0,Vo=Qt=ut=null,mc=!1,ou=Bm=0,gc=null}function za(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vo===null?ut.memoizedState=Vo=r:Vo=Vo.next=r,Vo}function Mo(){if(Qt===null){var r=ut.alternate;r=r!==null?r.memoizedState:null}else r=Qt.next;var s=Vo===null?ut.memoizedState:Vo.next;if(s!==null)Vo=s,Qt=r;else{if(r===null)throw ut.alternate===null?Error(a(467)):Error(a(310));Qt=r,r={memoizedState:Qt.memoizedState,baseState:Qt.baseState,baseQueue:Qt.baseQueue,queue:Qt.queue,next:null},Vo===null?ut.memoizedState=Vo=r:Vo=Vo.next=r}return Vo}function jm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function au(r){var s=ou;return ou+=1,gc===null&&(gc=[]),r=Ek(gc,r,s),s=ut,(Vo===null?s.memoizedState:Vo.next)===null&&(s=s.alternate,H.H=s===null||s.memoizedState===null?yx:gy),r}function Um(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return au(r);if(r.$$typeof===E)return fa(r)}throw Error(a(438,String(r)))}function ay(r){var s=null,d=ut.updateQueue;if(d!==null&&(s=d.memoCache),s==null){var h=ut.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(y){return y.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),d===null&&(d=jm(),ut.updateQueue=d),d.memoCache=s,d=s.data[s.index],d===void 0)for(d=s.data[s.index]=Array(r),h=0;h<r;h++)d[h]=$;return s.index++,d}function si(r,s){return typeof s=="function"?s(r):s}function zm(r){var s=Mo();return ny(s,Qt,r)}function ny(r,s,d){var h=r.queue;if(h===null)throw Error(a(311));h.lastRenderedReducer=d;var y=r.baseQueue,P=h.pending;if(P!==null){if(y!==null){var I=y.next;y.next=P.next,P.next=I}s.baseQueue=y=P,h.pending=null}if(P=r.baseState,y===null)r.memoizedState=P;else{s=y.next;var B=I=null,ee=null,ue=s,ye=!1;do{var we=ue.lane&-536870913;if(we!==ue.lane?(kt&we)===we:(ii&we)===we){var me=ue.revertLane;if(me===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),we===lc&&(ye=!0);else if((ii&me)===me){ue=ue.next,me===lc&&(ye=!0);continue}else we={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(B=ee=we,I=P):ee=ee.next=we,ut.lanes|=me,Qi|=me;we=ue.action,tl&&d(P,we),P=ue.hasEagerState?ue.eagerState:d(P,we)}else me={lane:we,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(B=ee=me,I=P):ee=ee.next=me,ut.lanes|=we,Qi|=we;ue=ue.next}while(ue!==null&&ue!==s);if(ee===null?I=P:ee.next=B,!mn(P,r.memoizedState)&&(Ho=!0,ye&&(d=cc,d!==null)))throw d;r.memoizedState=P,r.baseState=I,r.baseQueue=ee,h.lastRenderedState=P}return y===null&&(h.lanes=0),[r.memoizedState,h.dispatch]}function ry(r){var s=Mo(),d=s.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=r;var h=d.dispatch,y=d.pending,P=s.memoizedState;if(y!==null){d.pending=null;var I=y=y.next;do P=r(P,I.action),I=I.next;while(I!==y);mn(P,s.memoizedState)||(Ho=!0),s.memoizedState=P,s.baseQueue===null&&(s.baseState=P),d.lastRenderedState=P}return[P,h]}function jk(r,s,d){var h=ut,y=Mo(),P=At;if(P){if(d===void 0)throw Error(a(407));d=d()}else d=s();var I=!mn((Qt||y).memoizedState,d);if(I&&(y.memoizedState=d,Ho=!0),y=y.queue,ly($k.bind(null,h,y,r),[r]),y.getSnapshot!==s||I||Vo!==null&&Vo.memoizedState.tag&1){if(h.flags|=2048,hc(9,{destroy:void 0},zk.bind(null,h,y,d,s),null),ao===null)throw Error(a(349));P||(ii&127)!==0||Uk(h,s,d)}return d}function Uk(r,s,d){r.flags|=16384,r={getSnapshot:s,value:d},s=ut.updateQueue,s===null?(s=jm(),ut.updateQueue=s,s.stores=[r]):(d=s.stores,d===null?s.stores=[r]:d.push(r))}function zk(r,s,d,h){s.value=d,s.getSnapshot=h,qk(s)&&Vk(r)}function $k(r,s,d){return d(function(){qk(s)&&Vk(r)})}function qk(r){var s=r.getSnapshot;r=r.value;try{var d=s();return!mn(r,d)}catch{return!0}}function Vk(r){var s=Gs(r,2);s!==null&&tn(s,r,2)}function iy(r){var s=za();if(typeof r=="function"){var d=r;if(r=d(),tl){Tt(!0);try{d()}finally{Tt(!1)}}}return s.memoizedState=s.baseState=r,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:r},s}function Hk(r,s,d,h){return r.baseState=d,ny(r,Qt,typeof h=="function"?h:si)}function g6(r,s,d,h,y){if(Vm(r))throw Error(a(485));if(r=s.action,r!==null){var P={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(I){P.listeners.push(I)}};H.T!==null?d(!0):P.isTransition=!1,h(P),d=s.pending,d===null?(P.next=s.pending=P,Gk(s,P)):(P.next=d.next,s.pending=d.next=P)}}function Gk(r,s){var d=s.action,h=s.payload,y=r.state;if(s.isTransition){var P=H.T,I={};H.T=I;try{var B=d(y,h),ee=H.S;ee!==null&&ee(I,B),Kk(r,s,B)}catch(ue){sy(r,s,ue)}finally{P!==null&&I.types!==null&&(P.types=I.types),H.T=P}}else try{P=d(y,h),Kk(r,s,P)}catch(ue){sy(r,s,ue)}}function Kk(r,s,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(h){Wk(r,s,h)},function(h){return sy(r,s,h)}):Wk(r,s,d)}function Wk(r,s,d){s.status="fulfilled",s.value=d,Yk(s),r.state=d,s=r.pending,s!==null&&(d=s.next,d===s?r.pending=null:(d=d.next,s.next=d,Gk(r,d)))}function sy(r,s,d){var h=r.pending;if(r.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=d,Yk(s),s=s.next;while(s!==h)}r.action=null}function Yk(r){r=r.listeners;for(var s=0;s<r.length;s++)(0,r[s])()}function Zk(r,s){return s}function Qk(r,s){if(At){var d=ao.formState;if(d!==null){e:{var h=ut;if(At){if(mo){t:{for(var y=mo,P=Un;y.nodeType!==8;){if(!P){y=null;break t}if(y=$n(y.nextSibling),y===null){y=null;break t}}P=y.data,y=P==="F!"||P==="F"?y:null}if(y){mo=$n(y.nextSibling),h=y.data==="F!";break e}}$i(h)}h=!1}h&&(s=d[0])}}return d=za(),d.memoizedState=d.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zk,lastRenderedState:s},d.queue=h,d=fx.bind(null,ut,h),h.dispatch=d,h=iy(!1),P=my.bind(null,ut,!1,h.queue),h=za(),y={state:s,dispatch:null,action:r,pending:null},h.queue=y,d=g6.bind(null,ut,y,P,d),y.dispatch=d,h.memoizedState=r,[s,d,!1]}function Jk(r){var s=Mo();return Xk(s,Qt,r)}function Xk(r,s,d){if(s=ny(r,s,Zk)[0],r=zm(si)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=au(s)}catch(I){throw I===dc?Dm:I}else h=s;s=Mo();var y=s.queue,P=y.dispatch;return d!==s.memoizedState&&(ut.flags|=2048,hc(9,{destroy:void 0},h6.bind(null,y,d),null)),[h,P,r]}function h6(r,s){r.action=s}function ex(r){var s=Mo(),d=Qt;if(d!==null)return Xk(s,d,r);Mo(),s=s.memoizedState,d=Mo();var h=d.queue.dispatch;return d.memoizedState=r,[s,h,!1]}function hc(r,s,d,h){return r={tag:r,create:d,deps:h,inst:s,next:null},s=ut.updateQueue,s===null&&(s=jm(),ut.updateQueue=s),d=s.lastEffect,d===null?s.lastEffect=r.next=r:(h=d.next,d.next=r,r.next=h,s.lastEffect=r),r}function tx(){return Mo().memoizedState}function $m(r,s,d,h){var y=za();ut.flags|=r,y.memoizedState=hc(1|s,{destroy:void 0},d,h===void 0?null:h)}function qm(r,s,d,h){var y=Mo();h=h===void 0?null:h;var P=y.memoizedState.inst;Qt!==null&&h!==null&&Jb(h,Qt.memoizedState.deps)?y.memoizedState=hc(s,P,d,h):(ut.flags|=r,y.memoizedState=hc(1|s,P,d,h))}function ox(r,s){$m(8390656,8,r,s)}function ly(r,s){qm(2048,8,r,s)}function f6(r){ut.flags|=4;var s=ut.updateQueue;if(s===null)s=jm(),ut.updateQueue=s,s.events=[r];else{var d=s.events;d===null?s.events=[r]:d.push(r)}}function ax(r){var s=Mo().memoizedState;return f6({ref:s,nextImpl:r}),function(){if((qt&2)!==0)throw Error(a(440));return s.impl.apply(void 0,arguments)}}function nx(r,s){return qm(4,2,r,s)}function rx(r,s){return qm(4,4,r,s)}function ix(r,s){if(typeof s=="function"){r=r();var d=s(r);return function(){typeof d=="function"?d():s(null)}}if(s!=null)return r=r(),s.current=r,function(){s.current=null}}function sx(r,s,d){d=d!=null?d.concat([r]):null,qm(4,4,ix.bind(null,s,r),d)}function cy(){}function lx(r,s){var d=Mo();s=s===void 0?null:s;var h=d.memoizedState;return s!==null&&Jb(s,h[1])?h[0]:(d.memoizedState=[r,s],r)}function cx(r,s){var d=Mo();s=s===void 0?null:s;var h=d.memoizedState;if(s!==null&&Jb(s,h[1]))return h[0];if(h=r(),tl){Tt(!0);try{r()}finally{Tt(!1)}}return d.memoizedState=[h,s],h}function dy(r,s,d){return d===void 0||(ii&1073741824)!==0&&(kt&261930)===0?r.memoizedState=s:(r.memoizedState=d,r=dE(),ut.lanes|=r,Qi|=r,d)}function dx(r,s,d,h){return mn(d,s)?d:pc.current!==null?(r=dy(r,d,h),mn(r,s)||(Ho=!0),r):(ii&42)===0||(ii&1073741824)!==0&&(kt&261930)===0?(Ho=!0,r.memoizedState=d):(r=dE(),ut.lanes|=r,Qi|=r,s)}function ux(r,s,d,h,y){var P=Z.p;Z.p=P!==0&&8>P?P:8;var I=H.T,B={};H.T=B,my(r,!1,s,d);try{var ee=y(),ue=H.S;if(ue!==null&&ue(B,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var ye=u6(ee,h);nu(r,s,ye,yn(r))}else nu(r,s,h,yn(r))}catch(we){nu(r,s,{then:function(){},status:"rejected",reason:we},yn())}finally{Z.p=P,I!==null&&B.types!==null&&(I.types=B.types),H.T=I}}function v6(){}function uy(r,s,d,h){if(r.tag!==5)throw Error(a(476));var y=px(r).queue;ux(r,y,s,te,d===null?v6:function(){return mx(r),d(h)})}function px(r){var s=r.memoizedState;if(s!==null)return s;s={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:te},next:null};var d={};return s.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:d},next:null},r.memoizedState=s,r=r.alternate,r!==null&&(r.memoizedState=s),s}function mx(r){var s=px(r);s.next===null&&(s=r.alternate.memoizedState),nu(r,s.next.queue,{},yn())}function py(){return fa(Tu)}function gx(){return Mo().memoizedState}function hx(){return Mo().memoizedState}function b6(r){for(var s=r.return;s!==null;){switch(s.tag){case 24:case 3:var d=yn();r=Hi(d);var h=Gi(s,r,d);h!==null&&(tn(h,s,d),Xd(h,s,d)),s={cache:zb()},r.payload=s;return}s=s.return}}function y6(r,s,d){var h=yn();d={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Vm(r)?vx(s,d):(d=Ab(r,s,d,h),d!==null&&(tn(d,r,h),bx(d,s,h)))}function fx(r,s,d){var h=yn();nu(r,s,d,h)}function nu(r,s,d,h){var y={lane:h,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if(Vm(r))vx(s,y);else{var P=r.alternate;if(r.lanes===0&&(P===null||P.lanes===0)&&(P=s.lastRenderedReducer,P!==null))try{var I=s.lastRenderedState,B=P(I,d);if(y.hasEagerState=!0,y.eagerState=B,mn(B,I))return Cm(r,s,y,0),ao===null&&_m(),!1}catch{}if(d=Ab(r,s,y,h),d!==null)return tn(d,r,h),bx(d,s,h),!0}return!1}function my(r,s,d,h){if(h={lane:2,revertLane:Hy(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Vm(r)){if(s)throw Error(a(479))}else s=Ab(r,d,h,2),s!==null&&tn(s,r,2)}function Vm(r){var s=r.alternate;return r===ut||s!==null&&s===ut}function vx(r,s){mc=Fm=!0;var d=r.pending;d===null?s.next=s:(s.next=d.next,d.next=s),r.pending=s}function bx(r,s,d){if((d&4194048)!==0){var h=s.lanes;h&=r.pendingLanes,d|=h,s.lanes=d,ma(r,d)}}var ru={readContext:fa,use:Um,useCallback:Ro,useContext:Ro,useEffect:Ro,useImperativeHandle:Ro,useLayoutEffect:Ro,useInsertionEffect:Ro,useMemo:Ro,useReducer:Ro,useRef:Ro,useState:Ro,useDebugValue:Ro,useDeferredValue:Ro,useTransition:Ro,useSyncExternalStore:Ro,useId:Ro,useHostTransitionStatus:Ro,useFormState:Ro,useActionState:Ro,useOptimistic:Ro,useMemoCache:Ro,useCacheRefresh:Ro};ru.useEffectEvent=Ro;var yx={readContext:fa,use:Um,useCallback:function(r,s){return za().memoizedState=[r,s===void 0?null:s],r},useContext:fa,useEffect:ox,useImperativeHandle:function(r,s,d){d=d!=null?d.concat([r]):null,$m(4194308,4,ix.bind(null,s,r),d)},useLayoutEffect:function(r,s){return $m(4194308,4,r,s)},useInsertionEffect:function(r,s){$m(4,2,r,s)},useMemo:function(r,s){var d=za();s=s===void 0?null:s;var h=r();if(tl){Tt(!0);try{r()}finally{Tt(!1)}}return d.memoizedState=[h,s],h},useReducer:function(r,s,d){var h=za();if(d!==void 0){var y=d(s);if(tl){Tt(!0);try{d(s)}finally{Tt(!1)}}}else y=s;return h.memoizedState=h.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},h.queue=r,r=r.dispatch=y6.bind(null,ut,r),[h.memoizedState,r]},useRef:function(r){var s=za();return r={current:r},s.memoizedState=r},useState:function(r){r=iy(r);var s=r.queue,d=fx.bind(null,ut,s);return s.dispatch=d,[r.memoizedState,d]},useDebugValue:cy,useDeferredValue:function(r,s){var d=za();return dy(d,r,s)},useTransition:function(){var r=iy(!1);return r=ux.bind(null,ut,r.queue,!0,!1),za().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,s,d){var h=ut,y=za();if(At){if(d===void 0)throw Error(a(407));d=d()}else{if(d=s(),ao===null)throw Error(a(349));(kt&127)!==0||Uk(h,s,d)}y.memoizedState=d;var P={value:d,getSnapshot:s};return y.queue=P,ox($k.bind(null,h,P,r),[r]),h.flags|=2048,hc(9,{destroy:void 0},zk.bind(null,h,P,d,s),null),d},useId:function(){var r=za(),s=ao.identifierPrefix;if(At){var d=Rr,h=Er;d=(h&~(1<<32-$o(h)-1)).toString(32)+d,s="_"+s+"R_"+d,d=Bm++,0<d&&(s+="H"+d.toString(32)),s+="_"}else d=p6++,s="_"+s+"r_"+d.toString(32)+"_";return r.memoizedState=s},useHostTransitionStatus:py,useFormState:Qk,useActionState:Qk,useOptimistic:function(r){var s=za();s.memoizedState=s.baseState=r;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=d,s=my.bind(null,ut,!0,d),d.dispatch=s,[r,s]},useMemoCache:ay,useCacheRefresh:function(){return za().memoizedState=b6.bind(null,ut)},useEffectEvent:function(r){var s=za(),d={impl:r};return s.memoizedState=d,function(){if((qt&2)!==0)throw Error(a(440));return d.impl.apply(void 0,arguments)}}},gy={readContext:fa,use:Um,useCallback:lx,useContext:fa,useEffect:ly,useImperativeHandle:sx,useInsertionEffect:nx,useLayoutEffect:rx,useMemo:cx,useReducer:zm,useRef:tx,useState:function(){return zm(si)},useDebugValue:cy,useDeferredValue:function(r,s){var d=Mo();return dx(d,Qt.memoizedState,r,s)},useTransition:function(){var r=zm(si)[0],s=Mo().memoizedState;return[typeof r=="boolean"?r:au(r),s]},useSyncExternalStore:jk,useId:gx,useHostTransitionStatus:py,useFormState:Jk,useActionState:Jk,useOptimistic:function(r,s){var d=Mo();return Hk(d,Qt,r,s)},useMemoCache:ay,useCacheRefresh:hx};gy.useEffectEvent=ax;var Sx={readContext:fa,use:Um,useCallback:lx,useContext:fa,useEffect:ly,useImperativeHandle:sx,useInsertionEffect:nx,useLayoutEffect:rx,useMemo:cx,useReducer:ry,useRef:tx,useState:function(){return ry(si)},useDebugValue:cy,useDeferredValue:function(r,s){var d=Mo();return Qt===null?dy(d,r,s):dx(d,Qt.memoizedState,r,s)},useTransition:function(){var r=ry(si)[0],s=Mo().memoizedState;return[typeof r=="boolean"?r:au(r),s]},useSyncExternalStore:jk,useId:gx,useHostTransitionStatus:py,useFormState:ex,useActionState:ex,useOptimistic:function(r,s){var d=Mo();return Qt!==null?Hk(d,Qt,r,s):(d.baseState=r,[r,d.queue.dispatch])},useMemoCache:ay,useCacheRefresh:hx};Sx.useEffectEvent=ax;function hy(r,s,d,h){s=r.memoizedState,d=d(h,s),d=d==null?s:m({},s,d),r.memoizedState=d,r.lanes===0&&(r.updateQueue.baseState=d)}var fy={enqueueSetState:function(r,s,d){r=r._reactInternals;var h=yn(),y=Hi(h);y.payload=s,d!=null&&(y.callback=d),s=Gi(r,y,h),s!==null&&(tn(s,r,h),Xd(s,r,h))},enqueueReplaceState:function(r,s,d){r=r._reactInternals;var h=yn(),y=Hi(h);y.tag=1,y.payload=s,d!=null&&(y.callback=d),s=Gi(r,y,h),s!==null&&(tn(s,r,h),Xd(s,r,h))},enqueueForceUpdate:function(r,s){r=r._reactInternals;var d=yn(),h=Hi(d);h.tag=2,s!=null&&(h.callback=s),s=Gi(r,h,d),s!==null&&(tn(s,r,d),Xd(s,r,d))}};function Tx(r,s,d,h,y,P,I){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(h,P,I):s.prototype&&s.prototype.isPureReactComponent?!Hd(d,h)||!Hd(y,P):!0}function wx(r,s,d,h){r=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(d,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(d,h),s.state!==r&&fy.enqueueReplaceState(s,s.state,null)}function ol(r,s){var d=s;if("ref"in s){d={};for(var h in s)h!=="ref"&&(d[h]=s[h])}if(r=r.defaultProps){d===s&&(d=m({},d));for(var y in r)d[y]===void 0&&(d[y]=r[y])}return d}function _x(r){wm(r)}function Cx(r){console.error(r)}function Px(r){wm(r)}function Hm(r,s){try{var d=r.onUncaughtError;d(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function kx(r,s,d){try{var h=r.onCaughtError;h(d.value,{componentStack:d.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function vy(r,s,d){return d=Hi(d),d.tag=3,d.payload={element:null},d.callback=function(){Hm(r,s)},d}function xx(r){return r=Hi(r),r.tag=3,r}function Ex(r,s,d,h){var y=d.type.getDerivedStateFromError;if(typeof y=="function"){var P=h.value;r.payload=function(){return y(P)},r.callback=function(){kx(s,d,h)}}var I=d.stateNode;I!==null&&typeof I.componentDidCatch=="function"&&(r.callback=function(){kx(s,d,h),typeof y!="function"&&(Ji===null?Ji=new Set([this]):Ji.add(this));var B=h.stack;this.componentDidCatch(h.value,{componentStack:B!==null?B:""})})}function S6(r,s,d,h,y){if(d.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=d.alternate,s!==null&&sc(s,d,y,!0),d=hn.current,d!==null){switch(d.tag){case 31:case 13:return zn===null?ag():d.alternate===null&&Ao===0&&(Ao=3),d.flags&=-257,d.flags|=65536,d.lanes=y,h===Om?d.flags|=16384:(s=d.updateQueue,s===null?d.updateQueue=new Set([h]):s.add(h),$y(r,h,y)),!1;case 22:return d.flags|=65536,h===Om?d.flags|=16384:(s=d.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},d.updateQueue=s):(d=s.retryQueue,d===null?s.retryQueue=new Set([h]):d.add(h)),$y(r,h,y)),!1}throw Error(a(435,d.tag))}return $y(r,h,y),ag(),!1}if(At)return s=hn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=y,h!==Nb&&(r=Error(a(422),{cause:h}),Wd(Fn(r,d)))):(h!==Nb&&(s=Error(a(423),{cause:h}),Wd(Fn(s,d))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,h=Fn(h,d),y=vy(r.stateNode,h,y),Kb(r,y),Ao!==4&&(Ao=2)),!1;var P=Error(a(520),{cause:h});if(P=Fn(P,d),mu===null?mu=[P]:mu.push(P),Ao!==4&&(Ao=2),s===null)return!0;h=Fn(h,d),d=s;do{switch(d.tag){case 3:return d.flags|=65536,r=y&-y,d.lanes|=r,r=vy(d.stateNode,h,r),Kb(d,r),!1;case 1:if(s=d.type,P=d.stateNode,(d.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Ji===null||!Ji.has(P))))return d.flags|=65536,y&=-y,d.lanes|=y,y=xx(y),Ex(y,r,d,h),Kb(d,y),!1}d=d.return}while(d!==null);return!1}var by=Error(a(461)),Ho=!1;function va(r,s,d,h){s.child=r===null?Ok(s,null,d,h):el(s,r.child,d,h)}function Rx(r,s,d,h,y){d=d.render;var P=s.ref;if("ref"in h){var I={};for(var B in h)B!=="ref"&&(I[B]=h[B])}else I=h;return Zs(s),h=Xb(r,s,d,I,P,y),B=ey(),r!==null&&!Ho?(ty(r,s,y),li(r,s,y)):(At&&B&&Mb(s),s.flags|=1,va(r,s,h,y),s.child)}function Ax(r,s,d,h,y){if(r===null){var P=d.type;return typeof P=="function"&&!Db(P)&&P.defaultProps===void 0&&d.compare===null?(s.tag=15,s.type=P,Dx(r,s,P,h,y)):(r=km(d.type,null,h,s,s.mode,y),r.ref=s.ref,r.return=s,s.child=r)}if(P=r.child,!ky(r,y)){var I=P.memoizedProps;if(d=d.compare,d=d!==null?d:Hd,d(I,h)&&r.ref===s.ref)return li(r,s,y)}return s.flags|=1,r=oi(P,h),r.ref=s.ref,r.return=s,s.child=r}function Dx(r,s,d,h,y){if(r!==null){var P=r.memoizedProps;if(Hd(P,h)&&r.ref===s.ref)if(Ho=!1,s.pendingProps=h=P,ky(r,y))(r.flags&131072)!==0&&(Ho=!0);else return s.lanes=r.lanes,li(r,s,y)}return yy(r,s,d,h,y)}function Ox(r,s,d,h){var y=h.children,P=r!==null?r.memoizedState:null;if(r===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(P=P!==null?P.baseLanes|d:d,r!==null){for(h=s.child=r.child,y=0;h!==null;)y=y|h.lanes|h.childLanes,h=h.sibling;h=y&~P}else h=0,s.child=null;return Ix(r,s,P,d,h)}if((d&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},r!==null&&Am(s,P!==null?P.cachePool:null),P!==null?Lk(s,P):Yb(),Nk(s);else return h=s.lanes=536870912,Ix(r,s,P!==null?P.baseLanes|d:d,d,h)}else P!==null?(Am(s,P.cachePool),Lk(s,P),Wi(),s.memoizedState=null):(r!==null&&Am(s,null),Yb(),Wi());return va(r,s,y,d),s.child}function iu(r,s){return r!==null&&r.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function Ix(r,s,d,h,y){var P=qb();return P=P===null?null:{parent:qo._currentValue,pool:P},s.memoizedState={baseLanes:d,cachePool:P},r!==null&&Am(s,null),Yb(),Nk(s),r!==null&&sc(r,s,h,!0),s.childLanes=y,null}function Gm(r,s){return s=Wm({mode:s.mode,children:s.children},r.mode),s.ref=r.ref,r.child=s,s.return=r,s}function Mx(r,s,d){return el(s,r.child,null,d),r=Gm(s,s.pendingProps),r.flags|=2,fn(s),s.memoizedState=null,r}function T6(r,s,d){var h=s.pendingProps,y=(s.flags&128)!==0;if(s.flags&=-129,r===null){if(At){if(h.mode==="hidden")return r=Gm(s,h),s.lanes=536870912,iu(null,r);if(Qb(s),(r=mo)?(r=GE(r,Un),r=r!==null&&r.data==="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Ui!==null?{id:Er,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},d=vk(r),d.return=s,s.child=d,ha=s,mo=null)):r=null,r===null)throw $i(s);return s.lanes=536870912,null}return Gm(s,h)}var P=r.memoizedState;if(P!==null){var I=P.dehydrated;if(Qb(s),y)if(s.flags&256)s.flags&=-257,s=Mx(r,s,d);else if(s.memoizedState!==null)s.child=r.child,s.flags|=128,s=null;else throw Error(a(558));else if(Ho||sc(r,s,d,!1),y=(d&r.childLanes)!==0,Ho||y){if(h=ao,h!==null&&(I=Wa(h,d),I!==0&&I!==P.retryLane))throw P.retryLane=I,Gs(r,I),tn(h,r,I),by;ag(),s=Mx(r,s,d)}else r=P.treeContext,mo=$n(I.nextSibling),ha=s,At=!0,zi=null,Un=!1,r!==null&&Sk(s,r),s=Gm(s,h),s.flags|=4096;return s}return r=oi(r.child,{mode:h.mode,children:h.children}),r.ref=s.ref,s.child=r,r.return=s,r}function Km(r,s){var d=s.ref;if(d===null)r!==null&&r.ref!==null&&(s.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(a(284));(r===null||r.ref!==d)&&(s.flags|=4194816)}}function yy(r,s,d,h,y){return Zs(s),d=Xb(r,s,d,h,void 0,y),h=ey(),r!==null&&!Ho?(ty(r,s,y),li(r,s,y)):(At&&h&&Mb(s),s.flags|=1,va(r,s,d,y),s.child)}function Lx(r,s,d,h,y,P){return Zs(s),s.updateQueue=null,d=Bk(s,h,d,y),Fk(r),h=ey(),r!==null&&!Ho?(ty(r,s,P),li(r,s,P)):(At&&h&&Mb(s),s.flags|=1,va(r,s,d,P),s.child)}function Nx(r,s,d,h,y){if(Zs(s),s.stateNode===null){var P=ac,I=d.contextType;typeof I=="object"&&I!==null&&(P=fa(I)),P=new d(h,P),s.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=fy,s.stateNode=P,P._reactInternals=s,P=s.stateNode,P.props=h,P.state=s.memoizedState,P.refs={},Hb(s),I=d.contextType,P.context=typeof I=="object"&&I!==null?fa(I):ac,P.state=s.memoizedState,I=d.getDerivedStateFromProps,typeof I=="function"&&(hy(s,d,I,h),P.state=s.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(I=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),I!==P.state&&fy.enqueueReplaceState(P,P.state,null),tu(s,h,P,y),eu(),P.state=s.memoizedState),typeof P.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(r===null){P=s.stateNode;var B=s.memoizedProps,ee=ol(d,B);P.props=ee;var ue=P.context,ye=d.contextType;I=ac,typeof ye=="object"&&ye!==null&&(I=fa(ye));var we=d.getDerivedStateFromProps;ye=typeof we=="function"||typeof P.getSnapshotBeforeUpdate=="function",B=s.pendingProps!==B,ye||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(B||ue!==I)&&wx(s,P,h,I),Vi=!1;var me=s.memoizedState;P.state=me,tu(s,h,P,y),eu(),ue=s.memoizedState,B||me!==ue||Vi?(typeof we=="function"&&(hy(s,d,we,h),ue=s.memoizedState),(ee=Vi||Tx(s,d,ee,h,me,ue,I))?(ye||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(s.flags|=4194308)):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=ue),P.props=h,P.state=ue,P.context=I,h=ee):(typeof P.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{P=s.stateNode,Gb(r,s),I=s.memoizedProps,ye=ol(d,I),P.props=ye,we=s.pendingProps,me=P.context,ue=d.contextType,ee=ac,typeof ue=="object"&&ue!==null&&(ee=fa(ue)),B=d.getDerivedStateFromProps,(ue=typeof B=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(I!==we||me!==ee)&&wx(s,P,h,ee),Vi=!1,me=s.memoizedState,P.state=me,tu(s,h,P,y),eu();var fe=s.memoizedState;I!==we||me!==fe||Vi||r!==null&&r.dependencies!==null&&Em(r.dependencies)?(typeof B=="function"&&(hy(s,d,B,h),fe=s.memoizedState),(ye=Vi||Tx(s,d,ye,h,me,fe,ee)||r!==null&&r.dependencies!==null&&Em(r.dependencies))?(ue||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(h,fe,ee),typeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(h,fe,ee)),typeof P.componentDidUpdate=="function"&&(s.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof P.componentDidUpdate!="function"||I===r.memoizedProps&&me===r.memoizedState||(s.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&me===r.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=fe),P.props=h,P.state=fe,P.context=ee,h=ye):(typeof P.componentDidUpdate!="function"||I===r.memoizedProps&&me===r.memoizedState||(s.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||I===r.memoizedProps&&me===r.memoizedState||(s.flags|=1024),h=!1)}return P=h,Km(r,s),h=(s.flags&128)!==0,P||h?(P=s.stateNode,d=h&&typeof d.getDerivedStateFromError!="function"?null:P.render(),s.flags|=1,r!==null&&h?(s.child=el(s,r.child,null,y),s.child=el(s,null,d,y)):va(r,s,d,y),s.memoizedState=P.state,r=s.child):r=li(r,s,y),r}function Fx(r,s,d,h){return Ws(),s.flags|=256,va(r,s,d,h),s.child}var Sy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ty(r){return{baseLanes:r,cachePool:kk()}}function wy(r,s,d){return r=r!==null?r.childLanes&~d:0,s&&(r|=bn),r}function Bx(r,s,d){var h=s.pendingProps,y=!1,P=(s.flags&128)!==0,I;if((I=P)||(I=r!==null&&r.memoizedState===null?!1:(Io.current&2)!==0),I&&(y=!0,s.flags&=-129),I=(s.flags&32)!==0,s.flags&=-33,r===null){if(At){if(y?Ki(s):Wi(),(r=mo)?(r=GE(r,Un),r=r!==null&&r.data!=="&"?r:null,r!==null&&(s.memoizedState={dehydrated:r,treeContext:Ui!==null?{id:Er,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},d=vk(r),d.return=s,s.child=d,ha=s,mo=null)):r=null,r===null)throw $i(s);return nS(r)?s.lanes=32:s.lanes=536870912,null}var B=h.children;return h=h.fallback,y?(Wi(),y=s.mode,B=Wm({mode:"hidden",children:B},y),h=Ks(h,y,d,null),B.return=s,h.return=s,B.sibling=h,s.child=B,h=s.child,h.memoizedState=Ty(d),h.childLanes=wy(r,I,d),s.memoizedState=Sy,iu(null,h)):(Ki(s),_y(s,B))}var ee=r.memoizedState;if(ee!==null&&(B=ee.dehydrated,B!==null)){if(P)s.flags&256?(Ki(s),s.flags&=-257,s=Cy(r,s,d)):s.memoizedState!==null?(Wi(),s.child=r.child,s.flags|=128,s=null):(Wi(),B=h.fallback,y=s.mode,h=Wm({mode:"visible",children:h.children},y),B=Ks(B,y,d,null),B.flags|=2,h.return=s,B.return=s,h.sibling=B,s.child=h,el(s,r.child,null,d),h=s.child,h.memoizedState=Ty(d),h.childLanes=wy(r,I,d),s.memoizedState=Sy,s=iu(null,h));else if(Ki(s),nS(B)){if(I=B.nextSibling&&B.nextSibling.dataset,I)var ue=I.dgst;I=ue,h=Error(a(419)),h.stack="",h.digest=I,Wd({value:h,source:null,stack:null}),s=Cy(r,s,d)}else if(Ho||sc(r,s,d,!1),I=(d&r.childLanes)!==0,Ho||I){if(I=ao,I!==null&&(h=Wa(I,d),h!==0&&h!==ee.retryLane))throw ee.retryLane=h,Gs(r,h),tn(I,r,h),by;aS(B)||ag(),s=Cy(r,s,d)}else aS(B)?(s.flags|=192,s.child=r.child,s=null):(r=ee.treeContext,mo=$n(B.nextSibling),ha=s,At=!0,zi=null,Un=!1,r!==null&&Sk(s,r),s=_y(s,h.children),s.flags|=4096);return s}return y?(Wi(),B=h.fallback,y=s.mode,ee=r.child,ue=ee.sibling,h=oi(ee,{mode:"hidden",children:h.children}),h.subtreeFlags=ee.subtreeFlags&65011712,ue!==null?B=oi(ue,B):(B=Ks(B,y,d,null),B.flags|=2),B.return=s,h.return=s,h.sibling=B,s.child=h,iu(null,h),h=s.child,B=r.child.memoizedState,B===null?B=Ty(d):(y=B.cachePool,y!==null?(ee=qo._currentValue,y=y.parent!==ee?{parent:ee,pool:ee}:y):y=kk(),B={baseLanes:B.baseLanes|d,cachePool:y}),h.memoizedState=B,h.childLanes=wy(r,I,d),s.memoizedState=Sy,iu(r.child,h)):(Ki(s),d=r.child,r=d.sibling,d=oi(d,{mode:"visible",children:h.children}),d.return=s,d.sibling=null,r!==null&&(I=s.deletions,I===null?(s.deletions=[r],s.flags|=16):I.push(r)),s.child=d,s.memoizedState=null,d)}function _y(r,s){return s=Wm({mode:"visible",children:s},r.mode),s.return=r,r.child=s}function Wm(r,s){return r=gn(22,r,null,s),r.lanes=0,r}function Cy(r,s,d){return el(s,r.child,null,d),r=_y(s,s.pendingProps.children),r.flags|=2,s.memoizedState=null,r}function jx(r,s,d){r.lanes|=s;var h=r.alternate;h!==null&&(h.lanes|=s),jb(r.return,s,d)}function Py(r,s,d,h,y,P){var I=r.memoizedState;I===null?r.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:d,tailMode:y,treeForkCount:P}:(I.isBackwards=s,I.rendering=null,I.renderingStartTime=0,I.last=h,I.tail=d,I.tailMode=y,I.treeForkCount=P)}function Ux(r,s,d){var h=s.pendingProps,y=h.revealOrder,P=h.tail;h=h.children;var I=Io.current,B=(I&2)!==0;if(B?(I=I&1|2,s.flags|=128):I&=1,q(Io,I),va(r,s,h,d),h=At?Kd:0,!B&&r!==null&&(r.flags&128)!==0)e:for(r=s.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&jx(r,d,s);else if(r.tag===19)jx(r,d,s);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===s)break e;for(;r.sibling===null;){if(r.return===null||r.return===s)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(d=s.child,y=null;d!==null;)r=d.alternate,r!==null&&Nm(r)===null&&(y=d),d=d.sibling;d=y,d===null?(y=s.child,s.child=null):(y=d.sibling,d.sibling=null),Py(s,!1,y,d,P,h);break;case"backwards":case"unstable_legacy-backwards":for(d=null,y=s.child,s.child=null;y!==null;){if(r=y.alternate,r!==null&&Nm(r)===null){s.child=y;break}r=y.sibling,y.sibling=d,d=y,y=r}Py(s,!0,d,null,P,h);break;case"together":Py(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function li(r,s,d){if(r!==null&&(s.dependencies=r.dependencies),Qi|=s.lanes,(d&s.childLanes)===0)if(r!==null){if(sc(r,s,d,!1),(d&s.childLanes)===0)return null}else return null;if(r!==null&&s.child!==r.child)throw Error(a(153));if(s.child!==null){for(r=s.child,d=oi(r,r.pendingProps),s.child=d,d.return=s;r.sibling!==null;)r=r.sibling,d=d.sibling=oi(r,r.pendingProps),d.return=s;d.sibling=null}return s.child}function ky(r,s){return(r.lanes&s)!==0?!0:(r=r.dependencies,!!(r!==null&&Em(r)))}function w6(r,s,d){switch(s.tag){case 3:ge(s,s.stateNode.containerInfo),qi(s,qo,r.memoizedState.cache),Ws();break;case 27:case 5:$e(s);break;case 4:ge(s,s.stateNode.containerInfo);break;case 10:qi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Qb(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(Ki(s),s.flags|=128,null):(d&s.child.childLanes)!==0?Bx(r,s,d):(Ki(s),r=li(r,s,d),r!==null?r.sibling:null);Ki(s);break;case 19:var y=(r.flags&128)!==0;if(h=(d&s.childLanes)!==0,h||(sc(r,s,d,!1),h=(d&s.childLanes)!==0),y){if(h)return Ux(r,s,d);s.flags|=128}if(y=s.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),q(Io,Io.current),h)break;return null;case 22:return s.lanes=0,Ox(r,s,d,s.pendingProps);case 24:qi(s,qo,r.memoizedState.cache)}return li(r,s,d)}function zx(r,s,d){if(r!==null)if(r.memoizedProps!==s.pendingProps)Ho=!0;else{if(!ky(r,d)&&(s.flags&128)===0)return Ho=!1,w6(r,s,d);Ho=(r.flags&131072)!==0}else Ho=!1,At&&(s.flags&1048576)!==0&&yk(s,Kd,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(r=Js(s.elementType),s.type=r,typeof r=="function")Db(r)?(h=ol(r,h),s.tag=1,s=Nx(null,s,r,h,d)):(s.tag=0,s=yy(null,s,r,h,d));else{if(r!=null){var y=r.$$typeof;if(y===k){s.tag=11,s=Rx(null,s,r,h,d);break e}else if(y===D){s.tag=14,s=Ax(null,s,r,h,d);break e}}throw s=K(r)||r,Error(a(306,s,""))}}return s;case 0:return yy(r,s,s.type,s.pendingProps,d);case 1:return h=s.type,y=ol(h,s.pendingProps),Nx(r,s,h,y,d);case 3:e:{if(ge(s,s.stateNode.containerInfo),r===null)throw Error(a(387));h=s.pendingProps;var P=s.memoizedState;y=P.element,Gb(r,s),tu(s,h,null,d);var I=s.memoizedState;if(h=I.cache,qi(s,qo,h),h!==P.cache&&Ub(s,[qo],d,!0),eu(),h=I.element,P.isDehydrated)if(P={element:h,isDehydrated:!1,cache:I.cache},s.updateQueue.baseState=P,s.memoizedState=P,s.flags&256){s=Fx(r,s,h,d);break e}else if(h!==y){y=Fn(Error(a(424)),s),Wd(y),s=Fx(r,s,h,d);break e}else for(r=s.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,mo=$n(r.firstChild),ha=s,At=!0,zi=null,Un=!0,d=Ok(s,null,h,d),s.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Ws(),h===y){s=li(r,s,d);break e}va(r,s,h,d)}s=s.child}return s;case 26:return Km(r,s),r===null?(d=JE(s.type,null,s.pendingProps,null))?s.memoizedState=d:At||(d=s.type,r=s.pendingProps,h=dg(J.current).createElement(d),h[ga]=s,h[Ya]=r,ba(h,d,r),la(h),s.stateNode=h):s.memoizedState=JE(s.type,r.memoizedProps,s.pendingProps,r.memoizedState),null;case 27:return $e(s),r===null&&At&&(h=s.stateNode=YE(s.type,s.pendingProps,J.current),ha=s,Un=!0,y=mo,os(s.type)?(rS=y,mo=$n(h.firstChild)):mo=y),va(r,s,s.pendingProps.children,d),Km(r,s),r===null&&(s.flags|=4194304),s.child;case 5:return r===null&&At&&((y=h=mo)&&(h=J6(h,s.type,s.pendingProps,Un),h!==null?(s.stateNode=h,ha=s,mo=$n(h.firstChild),Un=!1,y=!0):y=!1),y||$i(s)),$e(s),y=s.type,P=s.pendingProps,I=r!==null?r.memoizedProps:null,h=P.children,eS(y,P)?h=null:I!==null&&eS(y,I)&&(s.flags|=32),s.memoizedState!==null&&(y=Xb(r,s,m6,null,null,d),Tu._currentValue=y),Km(r,s),va(r,s,h,d),s.child;case 6:return r===null&&At&&((r=d=mo)&&(d=X6(d,s.pendingProps,Un),d!==null?(s.stateNode=d,ha=s,mo=null,r=!0):r=!1),r||$i(s)),null;case 13:return Bx(r,s,d);case 4:return ge(s,s.stateNode.containerInfo),h=s.pendingProps,r===null?s.child=el(s,null,h,d):va(r,s,h,d),s.child;case 11:return Rx(r,s,s.type,s.pendingProps,d);case 7:return va(r,s,s.pendingProps,d),s.child;case 8:return va(r,s,s.pendingProps.children,d),s.child;case 12:return va(r,s,s.pendingProps.children,d),s.child;case 10:return h=s.pendingProps,qi(s,s.type,h.value),va(r,s,h.children,d),s.child;case 9:return y=s.type._context,h=s.pendingProps.children,Zs(s),y=fa(y),h=h(y),s.flags|=1,va(r,s,h,d),s.child;case 14:return Ax(r,s,s.type,s.pendingProps,d);case 15:return Dx(r,s,s.type,s.pendingProps,d);case 19:return Ux(r,s,d);case 31:return T6(r,s,d);case 22:return Ox(r,s,d,s.pendingProps);case 24:return Zs(s),h=fa(qo),r===null?(y=qb(),y===null&&(y=ao,P=zb(),y.pooledCache=P,P.refCount++,P!==null&&(y.pooledCacheLanes|=d),y=P),s.memoizedState={parent:h,cache:y},Hb(s),qi(s,qo,y)):((r.lanes&d)!==0&&(Gb(r,s),tu(s,null,null,d),eu()),y=r.memoizedState,P=s.memoizedState,y.parent!==h?(y={parent:h,cache:h},s.memoizedState=y,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=y),qi(s,qo,h)):(h=P.cache,qi(s,qo,h),h!==y.cache&&Ub(s,[qo],d,!0))),va(r,s,s.pendingProps.children,d),s.child;case 29:throw s.pendingProps}throw Error(a(156,s.tag))}function ci(r){r.flags|=4}function xy(r,s,d,h,y){if((s=(r.mode&32)!==0)&&(s=!1),s){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(gE())r.flags|=8192;else throw Xs=Om,Vb}else r.flags&=-16777217}function $x(r,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!a1(s))if(gE())r.flags|=8192;else throw Xs=Om,Vb}function Ym(r,s){s!==null&&(r.flags|=4),r.flags&16384&&(s=r.tag!==22?Zt():536870912,r.lanes|=s,yc|=s)}function su(r,s){if(!At)switch(r.tailMode){case"hidden":s=r.tail;for(var d=null;s!==null;)s.alternate!==null&&(d=s),s=s.sibling;d===null?r.tail=null:d.sibling=null;break;case"collapsed":d=r.tail;for(var h=null;d!==null;)d.alternate!==null&&(h=d),d=d.sibling;h===null?s||r.tail===null?r.tail=null:r.tail.sibling=null:h.sibling=null}}function go(r){var s=r.alternate!==null&&r.alternate.child===r.child,d=0,h=0;if(s)for(var y=r.child;y!==null;)d|=y.lanes|y.childLanes,h|=y.subtreeFlags&65011712,h|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)d|=y.lanes|y.childLanes,h|=y.subtreeFlags,h|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=h,r.childLanes=d,s}function _6(r,s,d){var h=s.pendingProps;switch(Lb(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return go(s),null;case 1:return go(s),null;case 3:return d=s.stateNode,h=null,r!==null&&(h=r.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),ri(qo),Ce(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(r===null||r.child===null)&&(ic(s)?ci(s):r===null||r.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Fb())),go(s),null;case 26:var y=s.type,P=s.memoizedState;return r===null?(ci(s),P!==null?(go(s),$x(s,P)):(go(s),xy(s,y,null,h,d))):P?P!==r.memoizedState?(ci(s),go(s),$x(s,P)):(go(s),s.flags&=-16777217):(r=r.memoizedProps,r!==h&&ci(s),go(s),xy(s,y,r,h,d)),null;case 27:if(Y(s),d=J.current,y=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==h&&ci(s);else{if(!h){if(s.stateNode===null)throw Error(a(166));return go(s),null}r=L.current,ic(s)?Tk(s):(r=YE(y,h,d),s.stateNode=r,ci(s))}return go(s),null;case 5:if(Y(s),y=s.type,r!==null&&s.stateNode!=null)r.memoizedProps!==h&&ci(s);else{if(!h){if(s.stateNode===null)throw Error(a(166));return go(s),null}if(P=L.current,ic(s))Tk(s);else{var I=dg(J.current);switch(P){case 1:P=I.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:P=I.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":P=I.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":P=I.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":P=I.createElement("div"),P.innerHTML="<script><\/script>",P=P.removeChild(P.firstChild);break;case"select":P=typeof h.is=="string"?I.createElement("select",{is:h.is}):I.createElement("select"),h.multiple?P.multiple=!0:h.size&&(P.size=h.size);break;default:P=typeof h.is=="string"?I.createElement(y,{is:h.is}):I.createElement(y)}}P[ga]=s,P[Ya]=h;e:for(I=s.child;I!==null;){if(I.tag===5||I.tag===6)P.appendChild(I.stateNode);else if(I.tag!==4&&I.tag!==27&&I.child!==null){I.child.return=I,I=I.child;continue}if(I===s)break e;for(;I.sibling===null;){if(I.return===null||I.return===s)break e;I=I.return}I.sibling.return=I.return,I=I.sibling}s.stateNode=P;e:switch(ba(P,y,h),y){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&ci(s)}}return go(s),xy(s,s.type,r===null?null:r.memoizedProps,s.pendingProps,d),null;case 6:if(r&&s.stateNode!=null)r.memoizedProps!==h&&ci(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(a(166));if(r=J.current,ic(s)){if(r=s.stateNode,d=s.memoizedProps,h=null,y=ha,y!==null)switch(y.tag){case 27:case 5:h=y.memoizedProps}r[ga]=s,r=!!(r.nodeValue===d||h!==null&&h.suppressHydrationWarning===!0||BE(r.nodeValue,d)),r||$i(s,!0)}else r=dg(r).createTextNode(h),r[ga]=s,s.stateNode=r}return go(s),null;case 31:if(d=s.memoizedState,r===null||r.memoizedState!==null){if(h=ic(s),d!==null){if(r===null){if(!h)throw Error(a(318));if(r=s.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[ga]=s}else Ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;go(s),r=!1}else d=Fb(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=d),r=!0;if(!r)return s.flags&256?(fn(s),s):(fn(s),null);if((s.flags&128)!==0)throw Error(a(558))}return go(s),null;case 13:if(h=s.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=ic(s),h!==null&&h.dehydrated!==null){if(r===null){if(!y)throw Error(a(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(a(317));y[ga]=s}else Ws(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;go(s),y=!1}else y=Fb(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return s.flags&256?(fn(s),s):(fn(s),null)}return fn(s),(s.flags&128)!==0?(s.lanes=d,s):(d=h!==null,r=r!==null&&r.memoizedState!==null,d&&(h=s.child,y=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(y=h.alternate.memoizedState.cachePool.pool),P=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(P=h.memoizedState.cachePool.pool),P!==y&&(h.flags|=2048)),d!==r&&d&&(s.child.flags|=8192),Ym(s,s.updateQueue),go(s),null);case 4:return Ce(),r===null&&Yy(s.stateNode.containerInfo),go(s),null;case 10:return ri(s.type),go(s),null;case 19:if(G(Io),h=s.memoizedState,h===null)return go(s),null;if(y=(s.flags&128)!==0,P=h.rendering,P===null)if(y)su(h,!1);else{if(Ao!==0||r!==null&&(r.flags&128)!==0)for(r=s.child;r!==null;){if(P=Nm(r),P!==null){for(s.flags|=128,su(h,!1),r=P.updateQueue,s.updateQueue=r,Ym(s,r),s.subtreeFlags=0,r=d,d=s.child;d!==null;)fk(d,r),d=d.sibling;return q(Io,Io.current&1|2),At&&ai(s,h.treeForkCount),s.child}r=r.sibling}h.tail!==null&&W()>eg&&(s.flags|=128,y=!0,su(h,!1),s.lanes=4194304)}else{if(!y)if(r=Nm(P),r!==null){if(s.flags|=128,y=!0,r=r.updateQueue,s.updateQueue=r,Ym(s,r),su(h,!0),h.tail===null&&h.tailMode==="hidden"&&!P.alternate&&!At)return go(s),null}else 2*W()-h.renderingStartTime>eg&&d!==536870912&&(s.flags|=128,y=!0,su(h,!1),s.lanes=4194304);h.isBackwards?(P.sibling=s.child,s.child=P):(r=h.last,r!==null?r.sibling=P:s.child=P,h.last=P)}return h.tail!==null?(r=h.tail,h.rendering=r,h.tail=r.sibling,h.renderingStartTime=W(),r.sibling=null,d=Io.current,q(Io,y?d&1|2:d&1),At&&ai(s,h.treeForkCount),r):(go(s),null);case 22:case 23:return fn(s),Zb(),h=s.memoizedState!==null,r!==null?r.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(d&536870912)!==0&&(s.flags&128)===0&&(go(s),s.subtreeFlags&6&&(s.flags|=8192)):go(s),d=s.updateQueue,d!==null&&Ym(s,d.retryQueue),d=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==d&&(s.flags|=2048),r!==null&&G(Qs),null;case 24:return d=null,r!==null&&(d=r.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),ri(qo),go(s),null;case 25:return null;case 30:return null}throw Error(a(156,s.tag))}function C6(r,s){switch(Lb(s),s.tag){case 1:return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 3:return ri(qo),Ce(),r=s.flags,(r&65536)!==0&&(r&128)===0?(s.flags=r&-65537|128,s):null;case 26:case 27:case 5:return Y(s),null;case 31:if(s.memoizedState!==null){if(fn(s),s.alternate===null)throw Error(a(340));Ws()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 13:if(fn(s),r=s.memoizedState,r!==null&&r.dehydrated!==null){if(s.alternate===null)throw Error(a(340));Ws()}return r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 19:return G(Io),null;case 4:return Ce(),null;case 10:return ri(s.type),null;case 22:case 23:return fn(s),Zb(),r!==null&&G(Qs),r=s.flags,r&65536?(s.flags=r&-65537|128,s):null;case 24:return ri(qo),null;case 25:return null;default:return null}}function qx(r,s){switch(Lb(s),s.tag){case 3:ri(qo),Ce();break;case 26:case 27:case 5:Y(s);break;case 4:Ce();break;case 31:s.memoizedState!==null&&fn(s);break;case 13:fn(s);break;case 19:G(Io);break;case 10:ri(s.type);break;case 22:case 23:fn(s),Zb(),r!==null&&G(Qs);break;case 24:ri(qo)}}function lu(r,s){try{var d=s.updateQueue,h=d!==null?d.lastEffect:null;if(h!==null){var y=h.next;d=y;do{if((d.tag&r)===r){h=void 0;var P=d.create,I=d.inst;h=P(),I.destroy=h}d=d.next}while(d!==y)}}catch(B){Kt(s,s.return,B)}}function Yi(r,s,d){try{var h=s.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var P=y.next;h=P;do{if((h.tag&r)===r){var I=h.inst,B=I.destroy;if(B!==void 0){I.destroy=void 0,y=s;var ee=d,ue=B;try{ue()}catch(ye){Kt(y,ee,ye)}}}h=h.next}while(h!==P)}}catch(ye){Kt(s,s.return,ye)}}function Vx(r){var s=r.updateQueue;if(s!==null){var d=r.stateNode;try{Mk(s,d)}catch(h){Kt(r,r.return,h)}}}function Hx(r,s,d){d.props=ol(r.type,r.memoizedProps),d.state=r.memoizedState;try{d.componentWillUnmount()}catch(h){Kt(r,s,h)}}function cu(r,s){try{var d=r.ref;if(d!==null){switch(r.tag){case 26:case 27:case 5:var h=r.stateNode;break;case 30:h=r.stateNode;break;default:h=r.stateNode}typeof d=="function"?r.refCleanup=d(h):d.current=h}}catch(y){Kt(r,s,y)}}function Ar(r,s){var d=r.ref,h=r.refCleanup;if(d!==null)if(typeof h=="function")try{h()}catch(y){Kt(r,s,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(y){Kt(r,s,y)}else d.current=null}function Gx(r){var s=r.type,d=r.memoizedProps,h=r.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":d.autoFocus&&h.focus();break e;case"img":d.src?h.src=d.src:d.srcSet&&(h.srcset=d.srcSet)}}catch(y){Kt(r,r.return,y)}}function Ey(r,s,d){try{var h=r.stateNode;G6(h,r.type,d,s),h[Ya]=s}catch(y){Kt(r,r.return,y)}}function Kx(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&os(r.type)||r.tag===4}function Ry(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Kx(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&os(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Ay(r,s,d){var h=r.tag;if(h===5||h===6)r=r.stateNode,s?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(r,s):(s=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,s.appendChild(r),d=d._reactRootContainer,d!=null||s.onclick!==null||(s.onclick=ei));else if(h!==4&&(h===27&&os(r.type)&&(d=r.stateNode,s=null),r=r.child,r!==null))for(Ay(r,s,d),r=r.sibling;r!==null;)Ay(r,s,d),r=r.sibling}function Zm(r,s,d){var h=r.tag;if(h===5||h===6)r=r.stateNode,s?d.insertBefore(r,s):d.appendChild(r);else if(h!==4&&(h===27&&os(r.type)&&(d=r.stateNode),r=r.child,r!==null))for(Zm(r,s,d),r=r.sibling;r!==null;)Zm(r,s,d),r=r.sibling}function Wx(r){var s=r.stateNode,d=r.memoizedProps;try{for(var h=r.type,y=s.attributes;y.length;)s.removeAttributeNode(y[0]);ba(s,h,d),s[ga]=r,s[Ya]=d}catch(P){Kt(r,r.return,P)}}var di=!1,Go=!1,Dy=!1,Yx=typeof WeakSet=="function"?WeakSet:Set,ca=null;function P6(r,s){if(r=r.containerInfo,Jy=vg,r=sk(r),Cb(r)){if("selectionStart"in r)var d={start:r.selectionStart,end:r.selectionEnd};else e:{d=(d=r.ownerDocument)&&d.defaultView||window;var h=d.getSelection&&d.getSelection();if(h&&h.rangeCount!==0){d=h.anchorNode;var y=h.anchorOffset,P=h.focusNode;h=h.focusOffset;try{d.nodeType,P.nodeType}catch{d=null;break e}var I=0,B=-1,ee=-1,ue=0,ye=0,we=r,me=null;t:for(;;){for(var fe;we!==d||y!==0&&we.nodeType!==3||(B=I+y),we!==P||h!==0&&we.nodeType!==3||(ee=I+h),we.nodeType===3&&(I+=we.nodeValue.length),(fe=we.firstChild)!==null;)me=we,we=fe;for(;;){if(we===r)break t;if(me===d&&++ue===y&&(B=I),me===P&&++ye===h&&(ee=I),(fe=we.nextSibling)!==null)break;we=me,me=we.parentNode}we=fe}d=B===-1||ee===-1?null:{start:B,end:ee}}else d=null}d=d||{start:0,end:0}}else d=null;for(Xy={focusedElem:r,selectionRange:d},vg=!1,ca=s;ca!==null;)if(s=ca,r=s.child,(s.subtreeFlags&1028)!==0&&r!==null)r.return=s,ca=r;else for(;ca!==null;){switch(s=ca,P=s.alternate,r=s.flags,s.tag){case 0:if((r&4)!==0&&(r=s.updateQueue,r=r!==null?r.events:null,r!==null))for(d=0;d<r.length;d++)y=r[d],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&P!==null){r=void 0,d=s,y=P.memoizedProps,P=P.memoizedState,h=d.stateNode;try{var Ye=ol(d.type,y);r=h.getSnapshotBeforeUpdate(Ye,P),h.__reactInternalSnapshotBeforeUpdate=r}catch(st){Kt(d,d.return,st)}}break;case 3:if((r&1024)!==0){if(r=s.stateNode.containerInfo,d=r.nodeType,d===9)oS(r);else if(d===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":oS(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=s.sibling,r!==null){r.return=s.return,ca=r;break}ca=s.return}}function Zx(r,s,d){var h=d.flags;switch(d.tag){case 0:case 11:case 15:pi(r,d),h&4&&lu(5,d);break;case 1:if(pi(r,d),h&4)if(r=d.stateNode,s===null)try{r.componentDidMount()}catch(I){Kt(d,d.return,I)}else{var y=ol(d.type,s.memoizedProps);s=s.memoizedState;try{r.componentDidUpdate(y,s,r.__reactInternalSnapshotBeforeUpdate)}catch(I){Kt(d,d.return,I)}}h&64&&Vx(d),h&512&&cu(d,d.return);break;case 3:if(pi(r,d),h&64&&(r=d.updateQueue,r!==null)){if(s=null,d.child!==null)switch(d.child.tag){case 27:case 5:s=d.child.stateNode;break;case 1:s=d.child.stateNode}try{Mk(r,s)}catch(I){Kt(d,d.return,I)}}break;case 27:s===null&&h&4&&Wx(d);case 26:case 5:pi(r,d),s===null&&h&4&&Gx(d),h&512&&cu(d,d.return);break;case 12:pi(r,d);break;case 31:pi(r,d),h&4&&Xx(r,d);break;case 13:pi(r,d),h&4&&eE(r,d),h&64&&(r=d.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(d=M6.bind(null,d),eU(r,d))));break;case 22:if(h=d.memoizedState!==null||di,!h){s=s!==null&&s.memoizedState!==null||Go,y=di;var P=Go;di=h,(Go=s)&&!P?mi(r,d,(d.subtreeFlags&8772)!==0):pi(r,d),di=y,Go=P}break;case 30:break;default:pi(r,d)}}function Qx(r){var s=r.alternate;s!==null&&(r.alternate=null,Qx(s)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(s=r.stateNode,s!==null&&sb(s)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var bo=null,Qa=!1;function ui(r,s,d){for(d=d.child;d!==null;)Jx(r,s,d),d=d.sibling}function Jx(r,s,d){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(St,d)}catch{}switch(d.tag){case 26:Go||Ar(d,s),ui(r,s,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Go||Ar(d,s);var h=bo,y=Qa;os(d.type)&&(bo=d.stateNode,Qa=!1),ui(r,s,d),bu(d.stateNode),bo=h,Qa=y;break;case 5:Go||Ar(d,s);case 6:if(h=bo,y=Qa,bo=null,ui(r,s,d),bo=h,Qa=y,bo!==null)if(Qa)try{(bo.nodeType===9?bo.body:bo.nodeName==="HTML"?bo.ownerDocument.body:bo).removeChild(d.stateNode)}catch(P){Kt(d,s,P)}else try{bo.removeChild(d.stateNode)}catch(P){Kt(d,s,P)}break;case 18:bo!==null&&(Qa?(r=bo,VE(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,d.stateNode),xc(r)):VE(bo,d.stateNode));break;case 4:h=bo,y=Qa,bo=d.stateNode.containerInfo,Qa=!0,ui(r,s,d),bo=h,Qa=y;break;case 0:case 11:case 14:case 15:Yi(2,d,s),Go||Yi(4,d,s),ui(r,s,d);break;case 1:Go||(Ar(d,s),h=d.stateNode,typeof h.componentWillUnmount=="function"&&Hx(d,s,h)),ui(r,s,d);break;case 21:ui(r,s,d);break;case 22:Go=(h=Go)||d.memoizedState!==null,ui(r,s,d),Go=h;break;default:ui(r,s,d)}}function Xx(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{xc(r)}catch(d){Kt(s,s.return,d)}}}function eE(r,s){if(s.memoizedState===null&&(r=s.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{xc(r)}catch(d){Kt(s,s.return,d)}}function k6(r){switch(r.tag){case 31:case 13:case 19:var s=r.stateNode;return s===null&&(s=r.stateNode=new Yx),s;case 22:return r=r.stateNode,s=r._retryCache,s===null&&(s=r._retryCache=new Yx),s;default:throw Error(a(435,r.tag))}}function Qm(r,s){var d=k6(r);s.forEach(function(h){if(!d.has(h)){d.add(h);var y=L6.bind(null,r,h);h.then(y,y)}})}function Ja(r,s){var d=s.deletions;if(d!==null)for(var h=0;h<d.length;h++){var y=d[h],P=r,I=s,B=I;e:for(;B!==null;){switch(B.tag){case 27:if(os(B.type)){bo=B.stateNode,Qa=!1;break e}break;case 5:bo=B.stateNode,Qa=!1;break e;case 3:case 4:bo=B.stateNode.containerInfo,Qa=!0;break e}B=B.return}if(bo===null)throw Error(a(160));Jx(P,I,y),bo=null,Qa=!1,P=y.alternate,P!==null&&(P.return=null),y.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)tE(s,r),s=s.sibling}var lr=null;function tE(r,s){var d=r.alternate,h=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Ja(s,r),Xa(r),h&4&&(Yi(3,r,r.return),lu(3,r),Yi(5,r,r.return));break;case 1:Ja(s,r),Xa(r),h&512&&(Go||d===null||Ar(d,d.return)),h&64&&di&&(r=r.updateQueue,r!==null&&(h=r.callbacks,h!==null&&(d=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=d===null?h:d.concat(h))));break;case 26:var y=lr;if(Ja(s,r),Xa(r),h&512&&(Go||d===null||Ar(d,d.return)),h&4){var P=d!==null?d.memoizedState:null;if(h=r.memoizedState,d===null)if(h===null)if(r.stateNode===null){e:{h=r.type,d=r.memoizedProps,y=y.ownerDocument||y;t:switch(h){case"title":P=y.getElementsByTagName("title")[0],(!P||P[Nd]||P[ga]||P.namespaceURI==="http://www.w3.org/2000/svg"||P.hasAttribute("itemprop"))&&(P=y.createElement(h),y.head.insertBefore(P,y.querySelector("head > title"))),ba(P,h,d),P[ga]=r,la(P),h=P;break e;case"link":var I=t1("link","href",y).get(h+(d.href||""));if(I){for(var B=0;B<I.length;B++)if(P=I[B],P.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&P.getAttribute("rel")===(d.rel==null?null:d.rel)&&P.getAttribute("title")===(d.title==null?null:d.title)&&P.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){I.splice(B,1);break t}}P=y.createElement(h),ba(P,h,d),y.head.appendChild(P);break;case"meta":if(I=t1("meta","content",y).get(h+(d.content||""))){for(B=0;B<I.length;B++)if(P=I[B],P.getAttribute("content")===(d.content==null?null:""+d.content)&&P.getAttribute("name")===(d.name==null?null:d.name)&&P.getAttribute("property")===(d.property==null?null:d.property)&&P.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&P.getAttribute("charset")===(d.charSet==null?null:d.charSet)){I.splice(B,1);break t}}P=y.createElement(h),ba(P,h,d),y.head.appendChild(P);break;default:throw Error(a(468,h))}P[ga]=r,la(P),h=P}r.stateNode=h}else o1(y,r.type,r.stateNode);else r.stateNode=e1(y,h,r.memoizedProps);else P!==h?(P===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):P.count--,h===null?o1(y,r.type,r.stateNode):e1(y,h,r.memoizedProps)):h===null&&r.stateNode!==null&&Ey(r,r.memoizedProps,d.memoizedProps)}break;case 27:Ja(s,r),Xa(r),h&512&&(Go||d===null||Ar(d,d.return)),d!==null&&h&4&&Ey(r,r.memoizedProps,d.memoizedProps);break;case 5:if(Ja(s,r),Xa(r),h&512&&(Go||d===null||Ar(d,d.return)),r.flags&32){y=r.stateNode;try{Zl(y,"")}catch(Ye){Kt(r,r.return,Ye)}}h&4&&r.stateNode!=null&&(y=r.memoizedProps,Ey(r,y,d!==null?d.memoizedProps:y)),h&1024&&(Dy=!0);break;case 6:if(Ja(s,r),Xa(r),h&4){if(r.stateNode===null)throw Error(a(162));h=r.memoizedProps,d=r.stateNode;try{d.nodeValue=h}catch(Ye){Kt(r,r.return,Ye)}}break;case 3:if(mg=null,y=lr,lr=ug(s.containerInfo),Ja(s,r),lr=y,Xa(r),h&4&&d!==null&&d.memoizedState.isDehydrated)try{xc(s.containerInfo)}catch(Ye){Kt(r,r.return,Ye)}Dy&&(Dy=!1,oE(r));break;case 4:h=lr,lr=ug(r.stateNode.containerInfo),Ja(s,r),Xa(r),lr=h;break;case 12:Ja(s,r),Xa(r);break;case 31:Ja(s,r),Xa(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Qm(r,h)));break;case 13:Ja(s,r),Xa(r),r.child.flags&8192&&r.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Xm=W()),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Qm(r,h)));break;case 22:y=r.memoizedState!==null;var ee=d!==null&&d.memoizedState!==null,ue=di,ye=Go;if(di=ue||y,Go=ye||ee,Ja(s,r),Go=ye,di=ue,Xa(r),h&8192)e:for(s=r.stateNode,s._visibility=y?s._visibility&-2:s._visibility|1,y&&(d===null||ee||di||Go||al(r)),d=null,s=r;;){if(s.tag===5||s.tag===26){if(d===null){ee=d=s;try{if(P=ee.stateNode,y)I=P.style,typeof I.setProperty=="function"?I.setProperty("display","none","important"):I.display="none";else{B=ee.stateNode;var we=ee.memoizedProps.style,me=we!=null&&we.hasOwnProperty("display")?we.display:null;B.style.display=me==null||typeof me=="boolean"?"":(""+me).trim()}}catch(Ye){Kt(ee,ee.return,Ye)}}}else if(s.tag===6){if(d===null){ee=s;try{ee.stateNode.nodeValue=y?"":ee.memoizedProps}catch(Ye){Kt(ee,ee.return,Ye)}}}else if(s.tag===18){if(d===null){ee=s;try{var fe=ee.stateNode;y?HE(fe,!0):HE(ee.stateNode,!1)}catch(Ye){Kt(ee,ee.return,Ye)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===r)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===r)break e;for(;s.sibling===null;){if(s.return===null||s.return===r)break e;d===s&&(d=null),s=s.return}d===s&&(d=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=r.updateQueue,h!==null&&(d=h.retryQueue,d!==null&&(h.retryQueue=null,Qm(r,d))));break;case 19:Ja(s,r),Xa(r),h&4&&(h=r.updateQueue,h!==null&&(r.updateQueue=null,Qm(r,h)));break;case 30:break;case 21:break;default:Ja(s,r),Xa(r)}}function Xa(r){var s=r.flags;if(s&2){try{for(var d,h=r.return;h!==null;){if(Kx(h)){d=h;break}h=h.return}if(d==null)throw Error(a(160));switch(d.tag){case 27:var y=d.stateNode,P=Ry(r);Zm(r,P,y);break;case 5:var I=d.stateNode;d.flags&32&&(Zl(I,""),d.flags&=-33);var B=Ry(r);Zm(r,B,I);break;case 3:case 4:var ee=d.stateNode.containerInfo,ue=Ry(r);Ay(r,ue,ee);break;default:throw Error(a(161))}}catch(ye){Kt(r,r.return,ye)}r.flags&=-3}s&4096&&(r.flags&=-4097)}function oE(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var s=r;oE(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),r=r.sibling}}function pi(r,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Zx(r,s.alternate,s),s=s.sibling}function al(r){for(r=r.child;r!==null;){var s=r;switch(s.tag){case 0:case 11:case 14:case 15:Yi(4,s,s.return),al(s);break;case 1:Ar(s,s.return);var d=s.stateNode;typeof d.componentWillUnmount=="function"&&Hx(s,s.return,d),al(s);break;case 27:bu(s.stateNode);case 26:case 5:Ar(s,s.return),al(s);break;case 22:s.memoizedState===null&&al(s);break;case 30:al(s);break;default:al(s)}r=r.sibling}}function mi(r,s,d){for(d=d&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,y=r,P=s,I=P.flags;switch(P.tag){case 0:case 11:case 15:mi(y,P,d),lu(4,P);break;case 1:if(mi(y,P,d),h=P,y=h.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ue){Kt(h,h.return,ue)}if(h=P,y=h.updateQueue,y!==null){var B=h.stateNode;try{var ee=y.shared.hiddenCallbacks;if(ee!==null)for(y.shared.hiddenCallbacks=null,y=0;y<ee.length;y++)Ik(ee[y],B)}catch(ue){Kt(h,h.return,ue)}}d&&I&64&&Vx(P),cu(P,P.return);break;case 27:Wx(P);case 26:case 5:mi(y,P,d),d&&h===null&&I&4&&Gx(P),cu(P,P.return);break;case 12:mi(y,P,d);break;case 31:mi(y,P,d),d&&I&4&&Xx(y,P);break;case 13:mi(y,P,d),d&&I&4&&eE(y,P);break;case 22:P.memoizedState===null&&mi(y,P,d),cu(P,P.return);break;case 30:break;default:mi(y,P,d)}s=s.sibling}}function Oy(r,s){var d=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),r=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool),r!==d&&(r!=null&&r.refCount++,d!=null&&Yd(d))}function Iy(r,s){r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Yd(r))}function cr(r,s,d,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)aE(r,s,d,h),s=s.sibling}function aE(r,s,d,h){var y=s.flags;switch(s.tag){case 0:case 11:case 15:cr(r,s,d,h),y&2048&&lu(9,s);break;case 1:cr(r,s,d,h);break;case 3:cr(r,s,d,h),y&2048&&(r=null,s.alternate!==null&&(r=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==r&&(s.refCount++,r!=null&&Yd(r)));break;case 12:if(y&2048){cr(r,s,d,h),r=s.stateNode;try{var P=s.memoizedProps,I=P.id,B=P.onPostCommit;typeof B=="function"&&B(I,s.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(ee){Kt(s,s.return,ee)}}else cr(r,s,d,h);break;case 31:cr(r,s,d,h);break;case 13:cr(r,s,d,h);break;case 23:break;case 22:P=s.stateNode,I=s.alternate,s.memoizedState!==null?P._visibility&2?cr(r,s,d,h):du(r,s):P._visibility&2?cr(r,s,d,h):(P._visibility|=2,fc(r,s,d,h,(s.subtreeFlags&10256)!==0||!1)),y&2048&&Oy(I,s);break;case 24:cr(r,s,d,h),y&2048&&Iy(s.alternate,s);break;default:cr(r,s,d,h)}}function fc(r,s,d,h,y){for(y=y&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var P=r,I=s,B=d,ee=h,ue=I.flags;switch(I.tag){case 0:case 11:case 15:fc(P,I,B,ee,y),lu(8,I);break;case 23:break;case 22:var ye=I.stateNode;I.memoizedState!==null?ye._visibility&2?fc(P,I,B,ee,y):du(P,I):(ye._visibility|=2,fc(P,I,B,ee,y)),y&&ue&2048&&Oy(I.alternate,I);break;case 24:fc(P,I,B,ee,y),y&&ue&2048&&Iy(I.alternate,I);break;default:fc(P,I,B,ee,y)}s=s.sibling}}function du(r,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var d=r,h=s,y=h.flags;switch(h.tag){case 22:du(d,h),y&2048&&Oy(h.alternate,h);break;case 24:du(d,h),y&2048&&Iy(h.alternate,h);break;default:du(d,h)}s=s.sibling}}var uu=8192;function vc(r,s,d){if(r.subtreeFlags&uu)for(r=r.child;r!==null;)nE(r,s,d),r=r.sibling}function nE(r,s,d){switch(r.tag){case 26:vc(r,s,d),r.flags&uu&&r.memoizedState!==null&&pU(d,lr,r.memoizedState,r.memoizedProps);break;case 5:vc(r,s,d);break;case 3:case 4:var h=lr;lr=ug(r.stateNode.containerInfo),vc(r,s,d),lr=h;break;case 22:r.memoizedState===null&&(h=r.alternate,h!==null&&h.memoizedState!==null?(h=uu,uu=16777216,vc(r,s,d),uu=h):vc(r,s,d));break;default:vc(r,s,d)}}function rE(r){var s=r.alternate;if(s!==null&&(r=s.child,r!==null)){s.child=null;do s=r.sibling,r.sibling=null,r=s;while(r!==null)}}function pu(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var d=0;d<s.length;d++){var h=s[d];ca=h,sE(h,r)}rE(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)iE(r),r=r.sibling}function iE(r){switch(r.tag){case 0:case 11:case 15:pu(r),r.flags&2048&&Yi(9,r,r.return);break;case 3:pu(r);break;case 12:pu(r);break;case 22:var s=r.stateNode;r.memoizedState!==null&&s._visibility&2&&(r.return===null||r.return.tag!==13)?(s._visibility&=-3,Jm(r)):pu(r);break;default:pu(r)}}function Jm(r){var s=r.deletions;if((r.flags&16)!==0){if(s!==null)for(var d=0;d<s.length;d++){var h=s[d];ca=h,sE(h,r)}rE(r)}for(r=r.child;r!==null;){switch(s=r,s.tag){case 0:case 11:case 15:Yi(8,s,s.return),Jm(s);break;case 22:d=s.stateNode,d._visibility&2&&(d._visibility&=-3,Jm(s));break;default:Jm(s)}r=r.sibling}}function sE(r,s){for(;ca!==null;){var d=ca;switch(d.tag){case 0:case 11:case 15:Yi(8,d,s);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var h=d.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Yd(d.memoizedState.cache)}if(h=d.child,h!==null)h.return=d,ca=h;else e:for(d=r;ca!==null;){h=ca;var y=h.sibling,P=h.return;if(Qx(h),h===d){ca=null;break e}if(y!==null){y.return=P,ca=y;break e}ca=P}}}var x6={getCacheForType:function(r){var s=fa(qo),d=s.data.get(r);return d===void 0&&(d=r(),s.data.set(r,d)),d},cacheSignal:function(){return fa(qo).controller.signal}},E6=typeof WeakMap=="function"?WeakMap:Map,qt=0,ao=null,wt=null,kt=0,Gt=0,vn=null,Zi=!1,bc=!1,My=!1,gi=0,Ao=0,Qi=0,nl=0,Ly=0,bn=0,yc=0,mu=null,en=null,Ny=!1,Xm=0,lE=0,eg=1/0,tg=null,Ji=null,Jo=0,Xi=null,Sc=null,hi=0,Fy=0,By=null,cE=null,gu=0,jy=null;function yn(){return(qt&2)!==0&&kt!==0?kt&-kt:H.T!==null?Hy():rb()}function dE(){if(bn===0)if((kt&536870912)===0||At){var r=Rt;Rt<<=1,(Rt&3932160)===0&&(Rt=262144),bn=r}else bn=536870912;return r=hn.current,r!==null&&(r.flags|=32),bn}function tn(r,s,d){(r===ao&&(Gt===2||Gt===9)||r.cancelPendingCommit!==null)&&(Tc(r,0),es(r,kt,bn,!1)),Bt(r,d),((qt&2)===0||r!==ao)&&(r===ao&&((qt&2)===0&&(nl|=d),Ao===4&&es(r,kt,bn,!1)),Dr(r))}function uE(r,s,d){if((qt&6)!==0)throw Error(a(327));var h=!d&&(s&127)===0&&(s&r.expiredLanes)===0||gt(r,s),y=h?D6(r,s):zy(r,s,!0),P=h;do{if(y===0){bc&&!h&&es(r,s,0,!1);break}else{if(d=r.current.alternate,P&&!R6(d)){y=zy(r,s,!1),P=!1;continue}if(y===2){if(P=s,r.errorRecoveryDisabledLanes&P)var I=0;else I=r.pendingLanes&-536870913,I=I!==0?I:I&536870912?536870912:0;if(I!==0){s=I;e:{var B=r;y=mu;var ee=B.current.memoizedState.isDehydrated;if(ee&&(Tc(B,I).flags|=256),I=zy(B,I,!1),I!==2){if(My&&!ee){B.errorRecoveryDisabledLanes|=P,nl|=P,y=4;break e}P=en,en=y,P!==null&&(en===null?en=P:en.push.apply(en,P))}y=I}if(P=!1,y!==2)continue}}if(y===1){Tc(r,0),es(r,s,0,!0);break}e:{switch(h=r,P=y,P){case 0:case 1:throw Error(a(345));case 4:if((s&4194048)!==s)break;case 6:es(h,s,bn,!Zi);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(a(329))}if((s&62914560)===s&&(y=Xm+300-W(),10<y)){if(es(h,s,bn,!Zi),Qe(h,0,!0)!==0)break e;hi=s,h.timeoutHandle=$E(pE.bind(null,h,d,en,tg,Ny,s,bn,nl,yc,Zi,P,"Throttled",-0,0),y);break e}pE(h,d,en,tg,Ny,s,bn,nl,yc,Zi,P,null,-0,0)}}break}while(!0);Dr(r)}function pE(r,s,d,h,y,P,I,B,ee,ue,ye,we,me,fe){if(r.timeoutHandle=-1,we=s.subtreeFlags,we&8192||(we&16785408)===16785408){we={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ei},nE(s,P,we);var Ye=(P&62914560)===P?Xm-W():(P&4194048)===P?lE-W():0;if(Ye=mU(we,Ye),Ye!==null){hi=P,r.cancelPendingCommit=Ye(SE.bind(null,r,s,P,d,h,y,I,B,ee,ye,we,null,me,fe)),es(r,P,I,!ue);return}}SE(r,s,P,d,h,y,I,B,ee)}function R6(r){for(var s=r;;){var d=s.tag;if((d===0||d===11||d===15)&&s.flags&16384&&(d=s.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var h=0;h<d.length;h++){var y=d[h],P=y.getSnapshot;y=y.value;try{if(!mn(P(),y))return!1}catch{return!1}}if(d=s.child,s.subtreeFlags&16384&&d!==null)d.return=s,s=d;else{if(s===r)break;for(;s.sibling===null;){if(s.return===null||s.return===r)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function es(r,s,d,h){s&=~Ly,s&=~nl,r.suspendedLanes|=s,r.pingedLanes&=~s,h&&(r.warmLanes|=s),h=r.expirationTimes;for(var y=s;0<y;){var P=31-$o(y),I=1<<P;h[P]=-1,y&=~I}d!==0&&In(r,d,s)}function og(){return(qt&6)===0?(hu(0),!1):!0}function Uy(){if(wt!==null){if(Gt===0)var r=wt.return;else r=wt,ni=Ys=null,oy(r),uc=null,Qd=0,r=wt;for(;r!==null;)qx(r.alternate,r),r=r.return;wt=null}}function Tc(r,s){var d=r.timeoutHandle;d!==-1&&(r.timeoutHandle=-1,Y6(d)),d=r.cancelPendingCommit,d!==null&&(r.cancelPendingCommit=null,d()),hi=0,Uy(),ao=r,wt=d=oi(r.current,null),kt=s,Gt=0,vn=null,Zi=!1,bc=gt(r,s),My=!1,yc=bn=Ly=nl=Qi=Ao=0,en=mu=null,Ny=!1,(s&8)!==0&&(s|=s&32);var h=r.entangledLanes;if(h!==0)for(r=r.entanglements,h&=s;0<h;){var y=31-$o(h),P=1<<y;s|=r[y],h&=~P}return gi=s,_m(),d}function mE(r,s){ut=null,H.H=ru,s===dc||s===Dm?(s=Rk(),Gt=3):s===Vb?(s=Rk(),Gt=4):Gt=s===by?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,vn=s,wt===null&&(Ao=1,Hm(r,Fn(s,r.current)))}function gE(){var r=hn.current;return r===null?!0:(kt&4194048)===kt?zn===null:(kt&62914560)===kt||(kt&536870912)!==0?r===zn:!1}function hE(){var r=H.H;return H.H=ru,r===null?ru:r}function fE(){var r=H.A;return H.A=x6,r}function ag(){Ao=4,Zi||(kt&4194048)!==kt&&hn.current!==null||(bc=!0),(Qi&134217727)===0&&(nl&134217727)===0||ao===null||es(ao,kt,bn,!1)}function zy(r,s,d){var h=qt;qt|=2;var y=hE(),P=fE();(ao!==r||kt!==s)&&(tg=null,Tc(r,s)),s=!1;var I=Ao;e:do try{if(Gt!==0&&wt!==null){var B=wt,ee=vn;switch(Gt){case 8:Uy(),I=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(s=!0);var ue=Gt;if(Gt=0,vn=null,wc(r,B,ee,ue),d&&bc){I=0;break e}break;default:ue=Gt,Gt=0,vn=null,wc(r,B,ee,ue)}}A6(),I=Ao;break}catch(ye){mE(r,ye)}while(!0);return s&&r.shellSuspendCounter++,ni=Ys=null,qt=h,H.H=y,H.A=P,wt===null&&(ao=null,kt=0,_m()),I}function A6(){for(;wt!==null;)vE(wt)}function D6(r,s){var d=qt;qt|=2;var h=hE(),y=fE();ao!==r||kt!==s?(tg=null,eg=W()+500,Tc(r,s)):bc=gt(r,s);e:do try{if(Gt!==0&&wt!==null){s=wt;var P=vn;t:switch(Gt){case 1:Gt=0,vn=null,wc(r,s,P,1);break;case 2:case 9:if(xk(P)){Gt=0,vn=null,bE(s);break}s=function(){Gt!==2&&Gt!==9||ao!==r||(Gt=7),Dr(r)},P.then(s,s);break e;case 3:Gt=7;break e;case 4:Gt=5;break e;case 7:xk(P)?(Gt=0,vn=null,bE(s)):(Gt=0,vn=null,wc(r,s,P,7));break;case 5:var I=null;switch(wt.tag){case 26:I=wt.memoizedState;case 5:case 27:var B=wt;if(I?a1(I):B.stateNode.complete){Gt=0,vn=null;var ee=B.sibling;if(ee!==null)wt=ee;else{var ue=B.return;ue!==null?(wt=ue,ng(ue)):wt=null}break t}}Gt=0,vn=null,wc(r,s,P,5);break;case 6:Gt=0,vn=null,wc(r,s,P,6);break;case 8:Uy(),Ao=6;break e;default:throw Error(a(462))}}O6();break}catch(ye){mE(r,ye)}while(!0);return ni=Ys=null,H.H=h,H.A=y,qt=d,wt!==null?0:(ao=null,kt=0,_m(),Ao)}function O6(){for(;wt!==null&&!Ae();)vE(wt)}function vE(r){var s=zx(r.alternate,r,gi);r.memoizedProps=r.pendingProps,s===null?ng(r):wt=s}function bE(r){var s=r,d=s.alternate;switch(s.tag){case 15:case 0:s=Lx(d,s,s.pendingProps,s.type,void 0,kt);break;case 11:s=Lx(d,s,s.pendingProps,s.type.render,s.ref,kt);break;case 5:oy(s);default:qx(d,s),s=wt=fk(s,gi),s=zx(d,s,gi)}r.memoizedProps=r.pendingProps,s===null?ng(r):wt=s}function wc(r,s,d,h){ni=Ys=null,oy(s),uc=null,Qd=0;var y=s.return;try{if(S6(r,y,s,d,kt)){Ao=1,Hm(r,Fn(d,r.current)),wt=null;return}}catch(P){if(y!==null)throw wt=y,P;Ao=1,Hm(r,Fn(d,r.current)),wt=null;return}s.flags&32768?(At||h===1?r=!0:bc||(kt&536870912)!==0?r=!1:(Zi=r=!0,(h===2||h===9||h===3||h===6)&&(h=hn.current,h!==null&&h.tag===13&&(h.flags|=16384))),yE(s,r)):ng(s)}function ng(r){var s=r;do{if((s.flags&32768)!==0){yE(s,Zi);return}r=s.return;var d=_6(s.alternate,s,gi);if(d!==null){wt=d;return}if(s=s.sibling,s!==null){wt=s;return}wt=s=r}while(s!==null);Ao===0&&(Ao=5)}function yE(r,s){do{var d=C6(r.alternate,r);if(d!==null){d.flags&=32767,wt=d;return}if(d=r.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!s&&(r=r.sibling,r!==null)){wt=r;return}wt=r=d}while(r!==null);Ao=6,wt=null}function SE(r,s,d,h,y,P,I,B,ee){r.cancelPendingCommit=null;do rg();while(Jo!==0);if((qt&6)!==0)throw Error(a(327));if(s!==null){if(s===r.current)throw Error(a(177));if(P=s.lanes|s.childLanes,P|=Rb,po(r,d,P,I,B,ee),r===ao&&(wt=ao=null,kt=0),Sc=s,Xi=r,hi=d,Fy=P,By=y,cE=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,N6(Ee,function(){return PE(),null})):(r.callbackNode=null,r.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=H.T,H.T=null,y=Z.p,Z.p=2,I=qt,qt|=4;try{P6(r,s,d)}finally{qt=I,Z.p=y,H.T=h}}Jo=1,TE(),wE(),_E()}}function TE(){if(Jo===1){Jo=0;var r=Xi,s=Sc,d=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||d){d=H.T,H.T=null;var h=Z.p;Z.p=2;var y=qt;qt|=4;try{tE(s,r);var P=Xy,I=sk(r.containerInfo),B=P.focusedElem,ee=P.selectionRange;if(I!==B&&B&&B.ownerDocument&&ik(B.ownerDocument.documentElement,B)){if(ee!==null&&Cb(B)){var ue=ee.start,ye=ee.end;if(ye===void 0&&(ye=ue),"selectionStart"in B)B.selectionStart=ue,B.selectionEnd=Math.min(ye,B.value.length);else{var we=B.ownerDocument||document,me=we&&we.defaultView||window;if(me.getSelection){var fe=me.getSelection(),Ye=B.textContent.length,st=Math.min(ee.start,Ye),Xt=ee.end===void 0?st:Math.min(ee.end,Ye);!fe.extend&&st>Xt&&(I=Xt,Xt=st,st=I);var ce=rk(B,st),re=rk(B,Xt);if(ce&&re&&(fe.rangeCount!==1||fe.anchorNode!==ce.node||fe.anchorOffset!==ce.offset||fe.focusNode!==re.node||fe.focusOffset!==re.offset)){var de=we.createRange();de.setStart(ce.node,ce.offset),fe.removeAllRanges(),st>Xt?(fe.addRange(de),fe.extend(re.node,re.offset)):(de.setEnd(re.node,re.offset),fe.addRange(de))}}}}for(we=[],fe=B;fe=fe.parentNode;)fe.nodeType===1&&we.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<we.length;B++){var Se=we[B];Se.element.scrollLeft=Se.left,Se.element.scrollTop=Se.top}}vg=!!Jy,Xy=Jy=null}finally{qt=y,Z.p=h,H.T=d}}r.current=s,Jo=2}}function wE(){if(Jo===2){Jo=0;var r=Xi,s=Sc,d=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||d){d=H.T,H.T=null;var h=Z.p;Z.p=2;var y=qt;qt|=4;try{Zx(r,s.alternate,s)}finally{qt=y,Z.p=h,H.T=d}}Jo=3}}function _E(){if(Jo===4||Jo===3){Jo=0,He();var r=Xi,s=Sc,d=hi,h=cE;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Jo=5:(Jo=0,Sc=Xi=null,CE(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(Ji=null),ir(d),s=s.stateNode,Et&&typeof Et.onCommitFiberRoot=="function")try{Et.onCommitFiberRoot(St,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=H.T,y=Z.p,Z.p=2,H.T=null;try{for(var P=r.onRecoverableError,I=0;I<h.length;I++){var B=h[I];P(B.value,{componentStack:B.stack})}}finally{H.T=s,Z.p=y}}(hi&3)!==0&&rg(),Dr(r),y=r.pendingLanes,(d&261930)!==0&&(y&42)!==0?r===jy?gu++:(gu=0,jy=r):gu=0,hu(0)}}function CE(r,s){(r.pooledCacheLanes&=s)===0&&(s=r.pooledCache,s!=null&&(r.pooledCache=null,Yd(s)))}function rg(){return TE(),wE(),_E(),PE()}function PE(){if(Jo!==5)return!1;var r=Xi,s=Fy;Fy=0;var d=ir(hi),h=H.T,y=Z.p;try{Z.p=32>d?32:d,H.T=null,d=By,By=null;var P=Xi,I=hi;if(Jo=0,Sc=Xi=null,hi=0,(qt&6)!==0)throw Error(a(331));var B=qt;if(qt|=4,iE(P.current),aE(P,P.current,I,d),qt=B,hu(0,!1),Et&&typeof Et.onPostCommitFiberRoot=="function")try{Et.onPostCommitFiberRoot(St,P)}catch{}return!0}finally{Z.p=y,H.T=h,CE(r,s)}}function kE(r,s,d){s=Fn(d,s),s=vy(r.stateNode,s,2),r=Gi(r,s,2),r!==null&&(Bt(r,2),Dr(r))}function Kt(r,s,d){if(r.tag===3)kE(r,r,d);else for(;s!==null;){if(s.tag===3){kE(s,r,d);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Ji===null||!Ji.has(h))){r=Fn(d,r),d=xx(2),h=Gi(s,d,2),h!==null&&(Ex(d,h,s,r),Bt(h,2),Dr(h));break}}s=s.return}}function $y(r,s,d){var h=r.pingCache;if(h===null){h=r.pingCache=new E6;var y=new Set;h.set(s,y)}else y=h.get(s),y===void 0&&(y=new Set,h.set(s,y));y.has(d)||(My=!0,y.add(d),r=I6.bind(null,r,s,d),s.then(r,r))}function I6(r,s,d){var h=r.pingCache;h!==null&&h.delete(s),r.pingedLanes|=r.suspendedLanes&d,r.warmLanes&=~d,ao===r&&(kt&d)===d&&(Ao===4||Ao===3&&(kt&62914560)===kt&&300>W()-Xm?(qt&2)===0&&Tc(r,0):Ly|=d,yc===kt&&(yc=0)),Dr(r)}function xE(r,s){s===0&&(s=Zt()),r=Gs(r,s),r!==null&&(Bt(r,s),Dr(r))}function M6(r){var s=r.memoizedState,d=0;s!==null&&(d=s.retryLane),xE(r,d)}function L6(r,s){var d=0;switch(r.tag){case 31:case 13:var h=r.stateNode,y=r.memoizedState;y!==null&&(d=y.retryLane);break;case 19:h=r.stateNode;break;case 22:h=r.stateNode._retryCache;break;default:throw Error(a(314))}h!==null&&h.delete(s),xE(r,d)}function N6(r,s){return tt(r,s)}var ig=null,_c=null,qy=!1,sg=!1,Vy=!1,ts=0;function Dr(r){r!==_c&&r.next===null&&(_c===null?ig=_c=r:_c=_c.next=r),sg=!0,qy||(qy=!0,B6())}function hu(r,s){if(!Vy&&sg){Vy=!0;do for(var d=!1,h=ig;h!==null;){if(r!==0){var y=h.pendingLanes;if(y===0)var P=0;else{var I=h.suspendedLanes,B=h.pingedLanes;P=(1<<31-$o(42|r)+1)-1,P&=y&~(I&~B),P=P&201326741?P&201326741|1:P?P|2:0}P!==0&&(d=!0,DE(h,P))}else P=kt,P=Qe(h,h===ao?P:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(P&3)===0||gt(h,P)||(d=!0,DE(h,P));h=h.next}while(d);Vy=!1}}function F6(){EE()}function EE(){sg=qy=!1;var r=0;ts!==0&&W6()&&(r=ts);for(var s=W(),d=null,h=ig;h!==null;){var y=h.next,P=RE(h,s);P===0?(h.next=null,d===null?ig=y:d.next=y,y===null&&(_c=d)):(d=h,(r!==0||(P&3)!==0)&&(sg=!0)),h=y}Jo!==0&&Jo!==5||hu(r),ts!==0&&(ts=0)}function RE(r,s){for(var d=r.suspendedLanes,h=r.pingedLanes,y=r.expirationTimes,P=r.pendingLanes&-62914561;0<P;){var I=31-$o(P),B=1<<I,ee=y[I];ee===-1?((B&d)===0||(B&h)!==0)&&(y[I]=oo(B,s)):ee<=s&&(r.expiredLanes|=B),P&=~B}if(s=ao,d=kt,d=Qe(r,r===s?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h=r.callbackNode,d===0||r===s&&(Gt===2||Gt===9)||r.cancelPendingCommit!==null)return h!==null&&h!==null&&De(h),r.callbackNode=null,r.callbackPriority=0;if((d&3)===0||gt(r,d)){if(s=d&-d,s===r.callbackPriority)return s;switch(h!==null&&De(h),ir(d)){case 2:case 8:d=Pe;break;case 32:d=Ee;break;case 268435456:d=Le;break;default:d=Ee}return h=AE.bind(null,r),d=tt(d,h),r.callbackPriority=s,r.callbackNode=d,s}return h!==null&&h!==null&&De(h),r.callbackPriority=2,r.callbackNode=null,2}function AE(r,s){if(Jo!==0&&Jo!==5)return r.callbackNode=null,r.callbackPriority=0,null;var d=r.callbackNode;if(rg()&&r.callbackNode!==d)return null;var h=kt;return h=Qe(r,r===ao?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),h===0?null:(uE(r,h,s),RE(r,W()),r.callbackNode!=null&&r.callbackNode===d?AE.bind(null,r):null)}function DE(r,s){if(rg())return null;uE(r,s,!0)}function B6(){Z6(function(){(qt&6)!==0?tt(se,F6):EE()})}function Hy(){if(ts===0){var r=lc;r===0&&(r=ht,ht<<=1,(ht&261888)===0&&(ht=256)),ts=r}return ts}function OE(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:hm(""+r)}function IE(r,s){var d=s.ownerDocument.createElement("input");return d.name=s.name,d.value=s.value,r.id&&d.setAttribute("form",r.id),s.parentNode.insertBefore(d,s),r=new FormData(r),d.parentNode.removeChild(d),r}function j6(r,s,d,h,y){if(s==="submit"&&d&&d.stateNode===y){var P=OE((y[Ya]||null).action),I=h.submitter;I&&(s=(s=I[Ya]||null)?OE(s.formAction):I.getAttribute("formAction"),s!==null&&(P=s,I=null));var B=new ym("action","action",null,h,y);r.push({event:B,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ts!==0){var ee=I?IE(y,I):new FormData(y);uy(d,{pending:!0,data:ee,method:y.method,action:P},null,ee)}}else typeof P=="function"&&(B.preventDefault(),ee=I?IE(y,I):new FormData(y),uy(d,{pending:!0,data:ee,method:y.method,action:P},P,ee))},currentTarget:y}]})}}for(var Gy=0;Gy<Eb.length;Gy++){var Ky=Eb[Gy],U6=Ky.toLowerCase(),z6=Ky[0].toUpperCase()+Ky.slice(1);sr(U6,"on"+z6)}sr(dk,"onAnimationEnd"),sr(uk,"onAnimationIteration"),sr(pk,"onAnimationStart"),sr("dblclick","onDoubleClick"),sr("focusin","onFocus"),sr("focusout","onBlur"),sr(a6,"onTransitionRun"),sr(n6,"onTransitionStart"),sr(r6,"onTransitionCancel"),sr(mk,"onTransitionEnd"),Wl("onMouseEnter",["mouseout","mouseover"]),Wl("onMouseLeave",["mouseout","mouseover"]),Wl("onPointerEnter",["pointerout","pointerover"]),Wl("onPointerLeave",["pointerout","pointerover"]),$s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$s("onBeforeInput",["compositionend","keypress","textInput","paste"]),$s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fu="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(" "),$6=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fu));function ME(r,s){s=(s&4)!==0;for(var d=0;d<r.length;d++){var h=r[d],y=h.event;h=h.listeners;e:{var P=void 0;if(s)for(var I=h.length-1;0<=I;I--){var B=h[I],ee=B.instance,ue=B.currentTarget;if(B=B.listener,ee!==P&&y.isPropagationStopped())break e;P=B,y.currentTarget=ue;try{P(y)}catch(ye){wm(ye)}y.currentTarget=null,P=ee}else for(I=0;I<h.length;I++){if(B=h[I],ee=B.instance,ue=B.currentTarget,B=B.listener,ee!==P&&y.isPropagationStopped())break e;P=B,y.currentTarget=ue;try{P(y)}catch(ye){wm(ye)}y.currentTarget=null,P=ee}}}}function _t(r,s){var d=s[ib];d===void 0&&(d=s[ib]=new Set);var h=r+"__bubble";d.has(h)||(LE(s,r,2,!1),d.add(h))}function Wy(r,s,d){var h=0;s&&(h|=4),LE(d,r,h,s)}var lg="_reactListening"+Math.random().toString(36).slice(2);function Yy(r){if(!r[lg]){r[lg]=!0,EP.forEach(function(d){d!=="selectionchange"&&($6.has(d)||Wy(d,!1,r),Wy(d,!0,r))});var s=r.nodeType===9?r:r.ownerDocument;s===null||s[lg]||(s[lg]=!0,Wy("selectionchange",!1,s))}}function LE(r,s,d,h){switch(d1(s)){case 2:var y=fU;break;case 8:y=vU;break;default:y=dS}d=y.bind(null,s,d,r),y=void 0,!hb||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(y=!0),h?y!==void 0?r.addEventListener(s,d,{capture:!0,passive:y}):r.addEventListener(s,d,!0):y!==void 0?r.addEventListener(s,d,{passive:y}):r.addEventListener(s,d,!1)}function Zy(r,s,d,h,y){var P=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var I=h.tag;if(I===3||I===4){var B=h.stateNode.containerInfo;if(B===y)break;if(I===4)for(I=h.return;I!==null;){var ee=I.tag;if((ee===3||ee===4)&&I.stateNode.containerInfo===y)return;I=I.return}for(;B!==null;){if(I=Hl(B),I===null)return;if(ee=I.tag,ee===5||ee===6||ee===26||ee===27){h=P=I;continue e}B=B.parentNode}}h=h.return}UP(function(){var ue=P,ye=mb(d),we=[];e:{var me=gk.get(r);if(me!==void 0){var fe=ym,Ye=r;switch(r){case"keypress":if(vm(d)===0)break e;case"keydown":case"keyup":fe=L5;break;case"focusin":Ye="focus",fe=yb;break;case"focusout":Ye="blur",fe=yb;break;case"beforeblur":case"afterblur":fe=yb;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=qP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=_5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=B5;break;case dk:case uk:case pk:fe=k5;break;case mk:fe=U5;break;case"scroll":case"scrollend":fe=T5;break;case"wheel":fe=$5;break;case"copy":case"cut":case"paste":fe=E5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=HP;break;case"toggle":case"beforetoggle":fe=V5}var st=(s&4)!==0,Xt=!st&&(r==="scroll"||r==="scrollend"),ce=st?me!==null?me+"Capture":null:me;st=[];for(var re=ue,de;re!==null;){var Se=re;if(de=Se.stateNode,Se=Se.tag,Se!==5&&Se!==26&&Se!==27||de===null||ce===null||(Se=Bd(re,ce),Se!=null&&st.push(vu(re,Se,de))),Xt)break;re=re.return}0<st.length&&(me=new fe(me,Ye,null,d,ye),we.push({event:me,listeners:st}))}}if((s&7)===0){e:{if(me=r==="mouseover"||r==="pointerover",fe=r==="mouseout"||r==="pointerout",me&&d!==pb&&(Ye=d.relatedTarget||d.fromElement)&&(Hl(Ye)||Ye[Vl]))break e;if((fe||me)&&(me=ye.window===ye?ye:(me=ye.ownerDocument)?me.defaultView||me.parentWindow:window,fe?(Ye=d.relatedTarget||d.toElement,fe=ue,Ye=Ye?Hl(Ye):null,Ye!==null&&(Xt=i(Ye),st=Ye.tag,Ye!==Xt||st!==5&&st!==27&&st!==6)&&(Ye=null)):(fe=null,Ye=ue),fe!==Ye)){if(st=qP,Se="onMouseLeave",ce="onMouseEnter",re="mouse",(r==="pointerout"||r==="pointerover")&&(st=HP,Se="onPointerLeave",ce="onPointerEnter",re="pointer"),Xt=fe==null?me:Fd(fe),de=Ye==null?me:Fd(Ye),me=new st(Se,re+"leave",fe,d,ye),me.target=Xt,me.relatedTarget=de,Se=null,Hl(ye)===ue&&(st=new st(ce,re+"enter",Ye,d,ye),st.target=de,st.relatedTarget=Xt,Se=st),Xt=Se,fe&&Ye)t:{for(st=q6,ce=fe,re=Ye,de=0,Se=ce;Se;Se=st(Se))de++;Se=0;for(var ot=re;ot;ot=st(ot))Se++;for(;0<de-Se;)ce=st(ce),de--;for(;0<Se-de;)re=st(re),Se--;for(;de--;){if(ce===re||re!==null&&ce===re.alternate){st=ce;break t}ce=st(ce),re=st(re)}st=null}else st=null;fe!==null&&NE(we,me,fe,st,!1),Ye!==null&&Xt!==null&&NE(we,Xt,Ye,st,!0)}}e:{if(me=ue?Fd(ue):window,fe=me.nodeName&&me.nodeName.toLowerCase(),fe==="select"||fe==="input"&&me.type==="file")var jt=XP;else if(QP(me))if(ek)jt=e6;else{jt=J5;var Je=Q5}else fe=me.nodeName,!fe||fe.toLowerCase()!=="input"||me.type!=="checkbox"&&me.type!=="radio"?ue&&ub(ue.elementType)&&(jt=XP):jt=X5;if(jt&&(jt=jt(r,ue))){JP(we,jt,d,ye);break e}Je&&Je(r,me,ue),r==="focusout"&&ue&&me.type==="number"&&ue.memoizedProps.value!=null&&db(me,"number",me.value)}switch(Je=ue?Fd(ue):window,r){case"focusin":(QP(Je)||Je.contentEditable==="true")&&(ec=Je,Pb=ue,Gd=null);break;case"focusout":Gd=Pb=ec=null;break;case"mousedown":kb=!0;break;case"contextmenu":case"mouseup":case"dragend":kb=!1,lk(we,d,ye);break;case"selectionchange":if(o6)break;case"keydown":case"keyup":lk(we,d,ye)}var pt;if(Tb)e:{switch(r){case"compositionstart":var xt="onCompositionStart";break e;case"compositionend":xt="onCompositionEnd";break e;case"compositionupdate":xt="onCompositionUpdate";break e}xt=void 0}else Xl?YP(r,d)&&(xt="onCompositionEnd"):r==="keydown"&&d.keyCode===229&&(xt="onCompositionStart");xt&&(GP&&d.locale!=="ko"&&(Xl||xt!=="onCompositionStart"?xt==="onCompositionEnd"&&Xl&&(pt=zP()):(ji=ye,fb="value"in ji?ji.value:ji.textContent,Xl=!0)),Je=cg(ue,xt),0<Je.length&&(xt=new VP(xt,r,null,d,ye),we.push({event:xt,listeners:Je}),pt?xt.data=pt:(pt=ZP(d),pt!==null&&(xt.data=pt)))),(pt=G5?K5(r,d):W5(r,d))&&(xt=cg(ue,"onBeforeInput"),0<xt.length&&(Je=new VP("onBeforeInput","beforeinput",null,d,ye),we.push({event:Je,listeners:xt}),Je.data=pt)),j6(we,r,ue,d,ye)}ME(we,s)})}function vu(r,s,d){return{instance:r,listener:s,currentTarget:d}}function cg(r,s){for(var d=s+"Capture",h=[];r!==null;){var y=r,P=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||P===null||(y=Bd(r,d),y!=null&&h.unshift(vu(r,y,P)),y=Bd(r,s),y!=null&&h.push(vu(r,y,P))),r.tag===3)return h;r=r.return}return[]}function q6(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function NE(r,s,d,h,y){for(var P=s._reactName,I=[];d!==null&&d!==h;){var B=d,ee=B.alternate,ue=B.stateNode;if(B=B.tag,ee!==null&&ee===h)break;B!==5&&B!==26&&B!==27||ue===null||(ee=ue,y?(ue=Bd(d,P),ue!=null&&I.unshift(vu(d,ue,ee))):y||(ue=Bd(d,P),ue!=null&&I.push(vu(d,ue,ee)))),d=d.return}I.length!==0&&r.push({event:s,listeners:I})}var V6=/\r\n?/g,H6=/\u0000|\uFFFD/g;function FE(r){return(typeof r=="string"?r:""+r).replace(V6,`
10
- `).replace(H6,"")}function BE(r,s){return s=FE(s),FE(r)===s}function Jt(r,s,d,h,y,P){switch(d){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Zl(r,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Zl(r,""+h);break;case"className":mm(r,"class",h);break;case"tabIndex":mm(r,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":mm(r,d,h);break;case"style":BP(r,h,P);break;case"data":if(s!=="object"){mm(r,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||d!=="href")){r.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(d);break}h=hm(""+h),r.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="function"){r.setAttribute(d,"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 P=="function"&&(d==="formAction"?(s!=="input"&&Jt(r,s,"name",y.name,y,null),Jt(r,s,"formEncType",y.formEncType,y,null),Jt(r,s,"formMethod",y.formMethod,y,null),Jt(r,s,"formTarget",y.formTarget,y,null)):(Jt(r,s,"encType",y.encType,y,null),Jt(r,s,"method",y.method,y,null),Jt(r,s,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(d);break}h=hm(""+h),r.setAttribute(d,h);break;case"onClick":h!=null&&(r.onclick=ei);break;case"onScroll":h!=null&&_t("scroll",r);break;case"onScrollEnd":h!=null&&_t("scrollend",r);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(a(61));if(d=h.__html,d!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=d}}break;case"multiple":r.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":r.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){r.removeAttribute("xlink:href");break}d=hm(""+h),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(d,""+h):r.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(d,""):r.removeAttribute(d);break;case"capture":case"download":h===!0?r.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(d,h):r.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?r.setAttribute(d,h):r.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?r.removeAttribute(d):r.setAttribute(d,h);break;case"popover":_t("beforetoggle",r),_t("toggle",r),pm(r,"popover",h);break;case"xlinkActuate":Xr(r,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Xr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Xr(r,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Xr(r,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Xr(r,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Xr(r,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Xr(r,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Xr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Xr(r,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":pm(r,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=y5.get(d)||d,pm(r,d,h))}}function Qy(r,s,d,h,y,P){switch(d){case"style":BP(r,h,P);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(a(61));if(d=h.__html,d!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=d}}break;case"children":typeof h=="string"?Zl(r,h):(typeof h=="number"||typeof h=="bigint")&&Zl(r,""+h);break;case"onScroll":h!=null&&_t("scroll",r);break;case"onScrollEnd":h!=null&&_t("scrollend",r);break;case"onClick":h!=null&&(r.onclick=ei);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!RP.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),s=d.slice(2,y?d.length-7:void 0),P=r[Ya]||null,P=P!=null?P[d]:null,typeof P=="function"&&r.removeEventListener(s,P,y),typeof h=="function")){typeof P!="function"&&P!==null&&(d in r?r[d]=null:r.hasAttribute(d)&&r.removeAttribute(d)),r.addEventListener(s,h,y);break e}d in r?r[d]=h:h===!0?r.setAttribute(d,""):pm(r,d,h)}}}function ba(r,s,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",r),_t("load",r);var h=!1,y=!1,P;for(P in d)if(d.hasOwnProperty(P)){var I=d[P];if(I!=null)switch(P){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Jt(r,s,P,I,d,null)}}y&&Jt(r,s,"srcSet",d.srcSet,d,null),h&&Jt(r,s,"src",d.src,d,null);return;case"input":_t("invalid",r);var B=P=I=y=null,ee=null,ue=null;for(h in d)if(d.hasOwnProperty(h)){var ye=d[h];if(ye!=null)switch(h){case"name":y=ye;break;case"type":I=ye;break;case"checked":ee=ye;break;case"defaultChecked":ue=ye;break;case"value":P=ye;break;case"defaultValue":B=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(a(137,s));break;default:Jt(r,s,h,ye,d,null)}}MP(r,P,B,ee,ue,I,y,!1);return;case"select":_t("invalid",r),h=I=P=null;for(y in d)if(d.hasOwnProperty(y)&&(B=d[y],B!=null))switch(y){case"value":P=B;break;case"defaultValue":I=B;break;case"multiple":h=B;default:Jt(r,s,y,B,d,null)}s=P,d=I,r.multiple=!!h,s!=null?Yl(r,!!h,s,!1):d!=null&&Yl(r,!!h,d,!0);return;case"textarea":_t("invalid",r),P=y=h=null;for(I in d)if(d.hasOwnProperty(I)&&(B=d[I],B!=null))switch(I){case"value":h=B;break;case"defaultValue":y=B;break;case"children":P=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(91));break;default:Jt(r,s,I,B,d,null)}NP(r,h,y,P);return;case"option":for(ee in d)d.hasOwnProperty(ee)&&(h=d[ee],h!=null)&&(ee==="selected"?r.selected=h&&typeof h!="function"&&typeof h!="symbol":Jt(r,s,ee,h,d,null));return;case"dialog":_t("beforetoggle",r),_t("toggle",r),_t("cancel",r),_t("close",r);break;case"iframe":case"object":_t("load",r);break;case"video":case"audio":for(h=0;h<fu.length;h++)_t(fu[h],r);break;case"image":_t("error",r),_t("load",r);break;case"details":_t("toggle",r);break;case"embed":case"source":case"link":_t("error",r),_t("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in d)if(d.hasOwnProperty(ue)&&(h=d[ue],h!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Jt(r,s,ue,h,d,null)}return;default:if(ub(s)){for(ye in d)d.hasOwnProperty(ye)&&(h=d[ye],h!==void 0&&Qy(r,s,ye,h,d,void 0));return}}for(B in d)d.hasOwnProperty(B)&&(h=d[B],h!=null&&Jt(r,s,B,h,d,null))}function G6(r,s,d,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,P=null,I=null,B=null,ee=null,ue=null,ye=null;for(fe in d){var we=d[fe];if(d.hasOwnProperty(fe)&&we!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":ee=we;default:h.hasOwnProperty(fe)||Jt(r,s,fe,null,h,we)}}for(var me in h){var fe=h[me];if(we=d[me],h.hasOwnProperty(me)&&(fe!=null||we!=null))switch(me){case"type":P=fe;break;case"name":y=fe;break;case"checked":ue=fe;break;case"defaultChecked":ye=fe;break;case"value":I=fe;break;case"defaultValue":B=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,s));break;default:fe!==we&&Jt(r,s,me,fe,h,we)}}cb(r,I,B,ee,ue,ye,P,y);return;case"select":fe=I=B=me=null;for(P in d)if(ee=d[P],d.hasOwnProperty(P)&&ee!=null)switch(P){case"value":break;case"multiple":fe=ee;default:h.hasOwnProperty(P)||Jt(r,s,P,null,h,ee)}for(y in h)if(P=h[y],ee=d[y],h.hasOwnProperty(y)&&(P!=null||ee!=null))switch(y){case"value":me=P;break;case"defaultValue":B=P;break;case"multiple":I=P;default:P!==ee&&Jt(r,s,y,P,h,ee)}s=B,d=I,h=fe,me!=null?Yl(r,!!d,me,!1):!!h!=!!d&&(s!=null?Yl(r,!!d,s,!0):Yl(r,!!d,d?[]:"",!1));return;case"textarea":fe=me=null;for(B in d)if(y=d[B],d.hasOwnProperty(B)&&y!=null&&!h.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Jt(r,s,B,null,h,y)}for(I in h)if(y=h[I],P=d[I],h.hasOwnProperty(I)&&(y!=null||P!=null))switch(I){case"value":me=y;break;case"defaultValue":fe=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==P&&Jt(r,s,I,y,h,P)}LP(r,me,fe);return;case"option":for(var Ye in d)me=d[Ye],d.hasOwnProperty(Ye)&&me!=null&&!h.hasOwnProperty(Ye)&&(Ye==="selected"?r.selected=!1:Jt(r,s,Ye,null,h,me));for(ee in h)me=h[ee],fe=d[ee],h.hasOwnProperty(ee)&&me!==fe&&(me!=null||fe!=null)&&(ee==="selected"?r.selected=me&&typeof me!="function"&&typeof me!="symbol":Jt(r,s,ee,me,h,fe));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 st in d)me=d[st],d.hasOwnProperty(st)&&me!=null&&!h.hasOwnProperty(st)&&Jt(r,s,st,null,h,me);for(ue in h)if(me=h[ue],fe=d[ue],h.hasOwnProperty(ue)&&me!==fe&&(me!=null||fe!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,s));break;default:Jt(r,s,ue,me,h,fe)}return;default:if(ub(s)){for(var Xt in d)me=d[Xt],d.hasOwnProperty(Xt)&&me!==void 0&&!h.hasOwnProperty(Xt)&&Qy(r,s,Xt,void 0,h,me);for(ye in h)me=h[ye],fe=d[ye],!h.hasOwnProperty(ye)||me===fe||me===void 0&&fe===void 0||Qy(r,s,ye,me,h,fe);return}}for(var ce in d)me=d[ce],d.hasOwnProperty(ce)&&me!=null&&!h.hasOwnProperty(ce)&&Jt(r,s,ce,null,h,me);for(we in h)me=h[we],fe=d[we],!h.hasOwnProperty(we)||me===fe||me==null&&fe==null||Jt(r,s,we,me,h,fe)}function jE(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function K6(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var y=d[h],P=y.transferSize,I=y.initiatorType,B=y.duration;if(P&&B&&jE(I)){for(I=0,B=y.responseEnd,h+=1;h<d.length;h++){var ee=d[h],ue=ee.startTime;if(ue>B)break;var ye=ee.transferSize,we=ee.initiatorType;ye&&jE(we)&&(ee=ee.responseEnd,I+=ye*(ee<B?1:(B-ue)/(ee-ue)))}if(--h,s+=8*(P+I)/(y.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Jy=null,Xy=null;function dg(r){return r.nodeType===9?r:r.ownerDocument}function UE(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zE(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function eS(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var tS=null;function W6(){var r=window.event;return r&&r.type==="popstate"?r===tS?!1:(tS=r,!0):(tS=null,!1)}var $E=typeof setTimeout=="function"?setTimeout:void 0,Y6=typeof clearTimeout=="function"?clearTimeout:void 0,qE=typeof Promise=="function"?Promise:void 0,Z6=typeof queueMicrotask=="function"?queueMicrotask:typeof qE<"u"?function(r){return qE.resolve(null).then(r).catch(Q6)}:$E;function Q6(r){setTimeout(function(){throw r})}function os(r){return r==="head"}function VE(r,s){var d=s,h=0;do{var y=d.nextSibling;if(r.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(h===0){r.removeChild(y),xc(s);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")bu(r.ownerDocument.documentElement);else if(d==="head"){d=r.ownerDocument.head,bu(d);for(var P=d.firstChild;P;){var I=P.nextSibling,B=P.nodeName;P[Nd]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&P.rel.toLowerCase()==="stylesheet"||d.removeChild(P),P=I}}else d==="body"&&bu(r.ownerDocument.body);d=y}while(d);xc(s)}function HE(r,s){var d=r;r=0;do{var h=d.nextSibling;if(d.nodeType===1?s?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(s?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(r===0)break;r--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||r++;d=h}while(d)}function oS(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var d=s;switch(s=s.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":oS(d),sb(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}r.removeChild(d)}}function J6(r,s,d,h){for(;r.nodeType===1;){var y=d;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(h){if(!r[Nd])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(P=r.getAttribute("rel"),P==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(P!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(P=r.getAttribute("src"),(P!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&P&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var P=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===P)return r}else return r;if(r=$n(r.nextSibling),r===null)break}return null}function X6(r,s,d){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!d||(r=$n(r.nextSibling),r===null))return null;return r}function GE(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=$n(r.nextSibling),r===null))return null;return r}function aS(r){return r.data==="$?"||r.data==="$~"}function nS(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function eU(r,s){var d=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||d.readyState!=="loading")s();else{var h=function(){s(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),r._reactRetry=h}}function $n(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var rS=null;function KE(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var d=r.data;if(d==="/$"||d==="/&"){if(s===0)return $n(r.nextSibling);s--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||s++}r=r.nextSibling}return null}function WE(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var d=r.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(s===0)return r;s--}else d!=="/$"&&d!=="/&"||s++}r=r.previousSibling}return null}function YE(r,s,d){switch(s=dg(d),r){case"html":if(r=s.documentElement,!r)throw Error(a(452));return r;case"head":if(r=s.head,!r)throw Error(a(453));return r;case"body":if(r=s.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function bu(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);sb(r)}var qn=new Map,ZE=new Set;function ug(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var fi=Z.d;Z.d={f:tU,r:oU,D:aU,C:nU,L:rU,m:iU,X:lU,S:sU,M:cU};function tU(){var r=fi.f(),s=og();return r||s}function oU(r){var s=Gl(r);s!==null&&s.tag===5&&s.type==="form"?mx(s):fi.r(r)}var Cc=typeof document>"u"?null:document;function QE(r,s,d){var h=Cc;if(h&&typeof s=="string"&&s){var y=Ln(s);y='link[rel="'+r+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),ZE.has(y)||(ZE.add(y),r={rel:r,crossOrigin:d,href:s},h.querySelector(y)===null&&(s=h.createElement("link"),ba(s,"link",r),la(s),h.head.appendChild(s)))}}function aU(r){fi.D(r),QE("dns-prefetch",r,null)}function nU(r,s){fi.C(r,s),QE("preconnect",r,s)}function rU(r,s,d){fi.L(r,s,d);var h=Cc;if(h&&r&&s){var y='link[rel="preload"][as="'+Ln(s)+'"]';s==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Ln(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Ln(d.imageSizes)+'"]')):y+='[href="'+Ln(r)+'"]';var P=y;switch(s){case"style":P=Pc(r);break;case"script":P=kc(r)}qn.has(P)||(r=m({rel:"preload",href:s==="image"&&d&&d.imageSrcSet?void 0:r,as:s},d),qn.set(P,r),h.querySelector(y)!==null||s==="style"&&h.querySelector(yu(P))||s==="script"&&h.querySelector(Su(P))||(s=h.createElement("link"),ba(s,"link",r),la(s),h.head.appendChild(s)))}}function iU(r,s){fi.m(r,s);var d=Cc;if(d&&r){var h=s&&typeof s.as=="string"?s.as:"script",y='link[rel="modulepreload"][as="'+Ln(h)+'"][href="'+Ln(r)+'"]',P=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":P=kc(r)}if(!qn.has(P)&&(r=m({rel:"modulepreload",href:r},s),qn.set(P,r),d.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Su(P)))return}h=d.createElement("link"),ba(h,"link",r),la(h),d.head.appendChild(h)}}}function sU(r,s,d){fi.S(r,s,d);var h=Cc;if(h&&r){var y=Kl(h).hoistableStyles,P=Pc(r);s=s||"default";var I=y.get(P);if(!I){var B={loading:0,preload:null};if(I=h.querySelector(yu(P)))B.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":s},d),(d=qn.get(P))&&iS(r,d);var ee=I=h.createElement("link");la(ee),ba(ee,"link",r),ee._p=new Promise(function(ue,ye){ee.onload=ue,ee.onerror=ye}),ee.addEventListener("load",function(){B.loading|=1}),ee.addEventListener("error",function(){B.loading|=2}),B.loading|=4,pg(I,s,h)}I={type:"stylesheet",instance:I,count:1,state:B},y.set(P,I)}}}function lU(r,s){fi.X(r,s);var d=Cc;if(d&&r){var h=Kl(d).hoistableScripts,y=kc(r),P=h.get(y);P||(P=d.querySelector(Su(y)),P||(r=m({src:r,async:!0},s),(s=qn.get(y))&&sS(r,s),P=d.createElement("script"),la(P),ba(P,"link",r),d.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},h.set(y,P))}}function cU(r,s){fi.M(r,s);var d=Cc;if(d&&r){var h=Kl(d).hoistableScripts,y=kc(r),P=h.get(y);P||(P=d.querySelector(Su(y)),P||(r=m({src:r,async:!0,type:"module"},s),(s=qn.get(y))&&sS(r,s),P=d.createElement("script"),la(P),ba(P,"link",r),d.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},h.set(y,P))}}function JE(r,s,d,h){var y=(y=J.current)?ug(y):null;if(!y)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(s=Pc(d.href),d=Kl(y).hoistableStyles,h=d.get(s),h||(h={type:"style",instance:null,count:0,state:null},d.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){r=Pc(d.href);var P=Kl(y).hoistableStyles,I=P.get(r);if(I||(y=y.ownerDocument||y,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},P.set(r,I),(P=y.querySelector(yu(r)))&&!P._p&&(I.instance=P,I.state.loading=5),qn.has(r)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},qn.set(r,d),P||dU(y,r,d,I.state))),s&&h===null)throw Error(a(528,""));return I}if(s&&h!==null)throw Error(a(529,""));return null;case"script":return s=d.async,d=d.src,typeof d=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=kc(d),d=Kl(y).hoistableScripts,h=d.get(s),h||(h={type:"script",instance:null,count:0,state:null},d.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Pc(r){return'href="'+Ln(r)+'"'}function yu(r){return'link[rel="stylesheet"]['+r+"]"}function XE(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function dU(r,s,d,h){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=r.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),ba(s,"link",d),la(s),r.head.appendChild(s))}function kc(r){return'[src="'+Ln(r)+'"]'}function Su(r){return"script[async]"+r}function e1(r,s,d){if(s.count++,s.instance===null)switch(s.type){case"style":var h=r.querySelector('style[data-href~="'+Ln(d.href)+'"]');if(h)return s.instance=h,la(h),h;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(r.ownerDocument||r).createElement("style"),la(h),ba(h,"style",y),pg(h,d.precedence,r),s.instance=h;case"stylesheet":y=Pc(d.href);var P=r.querySelector(yu(y));if(P)return s.state.loading|=4,s.instance=P,la(P),P;h=XE(d),(y=qn.get(y))&&iS(h,y),P=(r.ownerDocument||r).createElement("link"),la(P);var I=P;return I._p=new Promise(function(B,ee){I.onload=B,I.onerror=ee}),ba(P,"link",h),s.state.loading|=4,pg(P,d.precedence,r),s.instance=P;case"script":return P=kc(d.src),(y=r.querySelector(Su(P)))?(s.instance=y,la(y),y):(h=d,(y=qn.get(P))&&(h=m({},d),sS(h,y)),r=r.ownerDocument||r,y=r.createElement("script"),la(y),ba(y,"link",h),r.head.appendChild(y),s.instance=y);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,pg(h,d.precedence,r));return s.instance}function pg(r,s,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,P=y,I=0;I<h.length;I++){var B=h[I];if(B.dataset.precedence===s)P=B;else if(P!==y)break}P?P.parentNode.insertBefore(r,P.nextSibling):(s=d.nodeType===9?d.head:d,s.insertBefore(r,s.firstChild))}function iS(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function sS(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var mg=null;function t1(r,s,d){if(mg===null){var h=new Map,y=mg=new Map;y.set(d,h)}else y=mg,h=y.get(d),h||(h=new Map,y.set(d,h));if(h.has(r))return h;for(h.set(r,null),d=d.getElementsByTagName(r),y=0;y<d.length;y++){var P=d[y];if(!(P[Nd]||P[ga]||r==="link"&&P.getAttribute("rel")==="stylesheet")&&P.namespaceURI!=="http://www.w3.org/2000/svg"){var I=P.getAttribute(s)||"";I=r+I;var B=h.get(I);B?B.push(P):h.set(I,[P])}}return h}function o1(r,s,d){r=r.ownerDocument||r,r.head.insertBefore(d,s==="title"?r.querySelector("head > title"):null)}function uU(r,s,d){if(d===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function a1(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function pU(r,s,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=Pc(h.href),P=s.querySelector(yu(y));if(P){s=P._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=gg.bind(r),s.then(r,r)),d.state.loading|=4,d.instance=P,la(P);return}P=s.ownerDocument||s,h=XE(h),(y=qn.get(y))&&iS(h,y),P=P.createElement("link"),la(P);var I=P;I._p=new Promise(function(B,ee){I.onload=B,I.onerror=ee}),ba(P,"link",h),d.instance=P}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(d,s),(s=d.state.preload)&&(d.state.loading&3)===0&&(r.count++,d=gg.bind(r),s.addEventListener("load",d),s.addEventListener("error",d))}}var lS=0;function mU(r,s){return r.stylesheets&&r.count===0&&fg(r,r.stylesheets),0<r.count||0<r.imgCount?function(d){var h=setTimeout(function(){if(r.stylesheets&&fg(r,r.stylesheets),r.unsuspend){var P=r.unsuspend;r.unsuspend=null,P()}},6e4+s);0<r.imgBytes&&lS===0&&(lS=62500*K6());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&fg(r,r.stylesheets),r.unsuspend)){var P=r.unsuspend;r.unsuspend=null,P()}},(r.imgBytes>lS?50:800)+s);return r.unsuspend=d,function(){r.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function gg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fg(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var hg=null;function fg(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,hg=new Map,s.forEach(gU,r),hg=null,gg.call(r))}function gU(r,s){if(!(s.state.loading&4)){var d=hg.get(r);if(d)var h=d.get(null);else{d=new Map,hg.set(r,d);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),P=0;P<y.length;P++){var I=y[P];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(d.set(I.dataset.precedence,I),h=I)}h&&d.set(null,h)}y=s.instance,I=y.getAttribute("data-precedence"),P=d.get(I)||h,P===h&&d.set(null,y),d.set(I,y),this.count++,h=gg.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),P?P.parentNode.insertBefore(y,P.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),s.state.loading|=4}}var Tu={$$typeof:E,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function hU(r,s,d,h,y,P,I,B,ee){this.tag=1,this.containerInfo=r,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=Ra(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ra(0),this.hiddenUpdates=Ra(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=P,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function n1(r,s,d,h,y,P,I,B,ee,ue,ye,we){return r=new hU(r,s,d,I,ee,ue,ye,we,B),s=1,P===!0&&(s|=24),P=gn(3,null,null,s),r.current=P,P.stateNode=r,s=zb(),s.refCount++,r.pooledCache=s,s.refCount++,P.memoizedState={element:h,isDehydrated:d,cache:s},Hb(P),r}function r1(r){return r?(r=ac,r):ac}function i1(r,s,d,h,y,P){y=r1(y),h.context===null?h.context=y:h.pendingContext=y,h=Hi(s),h.payload={element:d},P=P===void 0?null:P,P!==null&&(h.callback=P),d=Gi(r,h,s),d!==null&&(tn(d,r,s),Xd(d,r,s))}function s1(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var d=r.retryLane;r.retryLane=d!==0&&d<s?d:s}}function cS(r,s){s1(r,s),(r=r.alternate)&&s1(r,s)}function l1(r){if(r.tag===13||r.tag===31){var s=Gs(r,67108864);s!==null&&tn(s,r,67108864),cS(r,67108864)}}function c1(r){if(r.tag===13||r.tag===31){var s=yn();s=ql(s);var d=Gs(r,s);d!==null&&tn(d,r,s),cS(r,s)}}var vg=!0;function fU(r,s,d,h){var y=H.T;H.T=null;var P=Z.p;try{Z.p=2,dS(r,s,d,h)}finally{Z.p=P,H.T=y}}function vU(r,s,d,h){var y=H.T;H.T=null;var P=Z.p;try{Z.p=8,dS(r,s,d,h)}finally{Z.p=P,H.T=y}}function dS(r,s,d,h){if(vg){var y=uS(h);if(y===null)Zy(r,s,h,bg,d),u1(r,h);else if(yU(y,r,s,d,h))h.stopPropagation();else if(u1(r,h),s&4&&-1<bU.indexOf(r)){for(;y!==null;){var P=Gl(y);if(P!==null)switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var I=Ft(P.pendingLanes);if(I!==0){var B=P;for(B.pendingLanes|=2,B.entangledLanes|=2;I;){var ee=1<<31-$o(I);B.entanglements[1]|=ee,I&=~ee}Dr(P),(qt&6)===0&&(eg=W()+500,hu(0))}}break;case 31:case 13:B=Gs(P,2),B!==null&&tn(B,P,2),og(),cS(P,2)}if(P=uS(h),P===null&&Zy(r,s,h,bg,d),P===y)break;y=P}y!==null&&h.stopPropagation()}else Zy(r,s,h,null,d)}}function uS(r){return r=mb(r),pS(r)}var bg=null;function pS(r){if(bg=null,r=Hl(r),r!==null){var s=i(r);if(s===null)r=null;else{var d=s.tag;if(d===13){if(r=l(s),r!==null)return r;r=null}else if(d===31){if(r=c(s),r!==null)return r;r=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return bg=r,null}function d1(r){switch(r){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(oe()){case se:return 2;case Pe:return 8;case Ee:case Re:return 32;case Le:return 268435456;default:return 32}default:return 32}}var mS=!1,as=null,ns=null,rs=null,wu=new Map,_u=new Map,is=[],bU="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 u1(r,s){switch(r){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ns=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":wu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":_u.delete(s.pointerId)}}function Cu(r,s,d,h,y,P){return r===null||r.nativeEvent!==P?(r={blockedOn:s,domEventName:d,eventSystemFlags:h,nativeEvent:P,targetContainers:[y]},s!==null&&(s=Gl(s),s!==null&&l1(s)),r):(r.eventSystemFlags|=h,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function yU(r,s,d,h,y){switch(s){case"focusin":return as=Cu(as,r,s,d,h,y),!0;case"dragenter":return ns=Cu(ns,r,s,d,h,y),!0;case"mouseover":return rs=Cu(rs,r,s,d,h,y),!0;case"pointerover":var P=y.pointerId;return wu.set(P,Cu(wu.get(P)||null,r,s,d,h,y)),!0;case"gotpointercapture":return P=y.pointerId,_u.set(P,Cu(_u.get(P)||null,r,s,d,h,y)),!0}return!1}function p1(r){var s=Hl(r.target);if(s!==null){var d=i(s);if(d!==null){if(s=d.tag,s===13){if(s=l(d),s!==null){r.blockedOn=s,kP(r.priority,function(){c1(d)});return}}else if(s===31){if(s=c(d),s!==null){r.blockedOn=s,kP(r.priority,function(){c1(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){r.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}r.blockedOn=null}function yg(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var d=uS(r.nativeEvent);if(d===null){d=r.nativeEvent;var h=new d.constructor(d.type,d);pb=h,d.target.dispatchEvent(h),pb=null}else return s=Gl(d),s!==null&&l1(s),r.blockedOn=d,!1;s.shift()}return!0}function m1(r,s,d){yg(r)&&d.delete(s)}function SU(){mS=!1,as!==null&&yg(as)&&(as=null),ns!==null&&yg(ns)&&(ns=null),rs!==null&&yg(rs)&&(rs=null),wu.forEach(m1),_u.forEach(m1)}function Sg(r,s){r.blockedOn===s&&(r.blockedOn=null,mS||(mS=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SU)))}var Tg=null;function g1(r){Tg!==r&&(Tg=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Tg===r&&(Tg=null);for(var s=0;s<r.length;s+=3){var d=r[s],h=r[s+1],y=r[s+2];if(typeof h!="function"){if(pS(h||d)===null)continue;break}var P=Gl(d);P!==null&&(r.splice(s,3),s-=3,uy(P,{pending:!0,data:y,method:d.method,action:h},h,y))}}))}function xc(r){function s(ee){return Sg(ee,r)}as!==null&&Sg(as,r),ns!==null&&Sg(ns,r),rs!==null&&Sg(rs,r),wu.forEach(s),_u.forEach(s);for(var d=0;d<is.length;d++){var h=is[d];h.blockedOn===r&&(h.blockedOn=null)}for(;0<is.length&&(d=is[0],d.blockedOn===null);)p1(d),d.blockedOn===null&&is.shift();if(d=(r.ownerDocument||r).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var y=d[h],P=d[h+1],I=y[Ya]||null;if(typeof P=="function")I||g1(d);else if(I){var B=null;if(P&&P.hasAttribute("formAction")){if(y=P,I=P[Ya]||null)B=I.formAction;else if(pS(y)!==null)continue}else B=I.action;typeof B=="function"?d[h+1]=B:(d.splice(h,3),h-=3),g1(d)}}}function h1(){function r(P){P.canIntercept&&P.info==="react-transition"&&P.intercept({handler:function(){return new Promise(function(I){return y=I})},focusReset:"manual",scroll:"manual"})}function s(){y!==null&&(y(),y=null),h||setTimeout(d,20)}function d(){if(!h&&!navigation.transition){var P=navigation.currentEntry;P&&P.url!=null&&navigation.navigate(P.url,{state:P.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),y!==null&&(y(),y=null)}}}function gS(r){this._internalRoot=r}wg.prototype.render=gS.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(a(409));var d=s.current,h=yn();i1(d,h,r,s,null,null)},wg.prototype.unmount=gS.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;i1(r.current,2,null,r,null,null),og(),s[Vl]=null}};function wg(r){this._internalRoot=r}wg.prototype.unstable_scheduleHydration=function(r){if(r){var s=rb();r={blockedOn:null,target:r,priority:s};for(var d=0;d<is.length&&s!==0&&s<is[d].priority;d++);is.splice(d,0,r),d===0&&p1(r)}};var f1=t.version;if(f1!=="19.2.6")throw Error(a(527,f1,"19.2.6"));Z.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=p(s),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var TU={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _g=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_g.isDisabled&&_g.supportsFiber)try{St=_g.inject(TU),Et=_g}catch{}}return ku.createRoot=function(r,s){if(!n(r))throw Error(a(299));var d=!1,h="",y=_x,P=Cx,I=Px;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(P=s.onCaughtError),s.onRecoverableError!==void 0&&(I=s.onRecoverableError)),s=n1(r,1,!1,null,null,d,h,null,y,P,I,h1),r[Vl]=s.current,Yy(r),new gS(s)},ku.hydrateRoot=function(r,s,d){if(!n(r))throw Error(a(299));var h=!1,y="",P=_x,I=Cx,B=Px,ee=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(P=d.onUncaughtError),d.onCaughtError!==void 0&&(I=d.onCaughtError),d.onRecoverableError!==void 0&&(B=d.onRecoverableError),d.formState!==void 0&&(ee=d.formState)),s=n1(r,1,!0,s,d??null,h,y,ee,P,I,B,h1),s.context=r1(null),d=s.current,h=yn(),h=ql(h),y=Hi(h),y.callback=null,Gi(d,y,h),d=h,s.current.lanes=d,Bt(s,d),Dr(s),r[Vl]=s.current,Yy(r),new wg(s)},ku.version="19.2.6",ku}var x1;function IU(){if(x1)return vS.exports;x1=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(),vS.exports=OU(),vS.exports}var MU=IU(),E1=R.use,Zc=typeof window<"u"?R.useLayoutEffect:R.useEffect;function TS(e){const t=R.useRef({value:e,prev:null}),o=t.current.value;return e!==o&&(t.current={value:e,prev:o}),t.current.prev}function LU(e,t,o={},a={}){R.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const n=new IntersectionObserver(([i])=>{t(i)},o);return n.observe(e.current),()=>{n.disconnect()}},[t,o,a.disabled,e])}function NU(e){const t=R.useRef(null);return R.useImperativeHandle(e,()=>t.current,[]),t}const tI=!1;function vp(e){return e[e.length-1]}function FU(e){return typeof e=="function"}function _s(e,t){return FU(e)?e(t):e}const oI=Object.prototype.hasOwnProperty,R1=Object.prototype.propertyIsEnumerable;function aI(e){for(const t in e)if(oI.call(e,t))return!0;return!1}const BU=()=>Object.create(null),rl=(e,t)=>Cs(e,t,BU);function Cs(e,t,o=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const n=t,i=O1(e)&&O1(n);if(!i&&!(gd(e)&&gd(n)))return n;const l=i?e:A1(e);if(!l)return n;const c=i?n:A1(n);if(!c)return n;const u=l.length,p=c.length,g=i?new Array(p):o();let m=0;for(let f=0;f<p;f++){const v=i?f:c[f],b=e[v],S=n[v];if(b===S){g[v]=b,(i?f<u:oI.call(e,v))&&m++;continue}if(b===null||S===null||typeof b!="object"||typeof S!="object"){g[v]=S;continue}const C=Cs(b,S,o,a+1);g[v]=C,C===b&&m++}return u===p&&m===u?e:g}function A1(e){const t=Object.getOwnPropertyNames(e);for(const n of t)if(!R1.call(e,n))return!1;const o=Object.getOwnPropertySymbols(e);if(o.length===0)return t;const a=t;for(const n of o){if(!R1.call(e,n))return!1;a.push(n)}return a}function gd(e){if(!D1(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const o=t.prototype;return!(!D1(o)||!o.hasOwnProperty("isPrototypeOf"))}function D1(e){return Object.prototype.toString.call(e)==="[object Object]"}function O1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _l(e,t,o){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 a=0,n=e.length;a<n;a++)if(!_l(e[a],t[a],o))return!1;return!0}if(gd(e)&&gd(t)){const a=o?.ignoreUndefined??!0;if(o?.partial){for(const l in t)if((!a||t[l]!==void 0)&&!_l(e[l],t[l],o))return!1;return!0}let n=0;if(!a)n=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&n++;let i=0;for(const l in t)if((!a||t[l]!==void 0)&&(i++,i>n||!_l(e[l],t[l],o)))return!1;return n===i}return!1}function hd(e){let t,o;const a=new Promise((n,i)=>{t=n,o=i});return a.status="pending",a.resolve=n=>{a.status="resolved",a.value=n,t(n),e?.(n)},a.reject=n=>{a.status="rejected",o(n)},a}function jU(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 bp(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function UU(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function I1(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return UU(t)}const zU=["http:","https:","mailto:","tel:"];function df(e,t){if(!e)return!1;try{const o=new URL(e);return!t.has(o.protocol)}catch{return!1}}function xu(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 o=0,a="",n;for(;(n=t.exec(e))!==null;)a+=I1(e.slice(o,n.index))+n[0],o=t.lastIndex;a=a+I1(o?e.slice(o):e);let i=!1;return a.startsWith("//")&&(i=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:i}}function $U(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function qU(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function Ri(){throw new Error("Invariant failed")}function yp(e){const t=new Map;let o,a;const n=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,a&&(a.next=i,i.prev=a)):(i.next.prev=void 0,o=i.next,i.next=void 0,a&&(i.prev=a,a.next=i)),a=i)};return{get(i){const l=t.get(i);if(l)return n(l),l.value},set(i,l){if(t.size>=e&&o){const u=o;t.delete(u.key),u.next&&(o=u.next,u.next.prev=void 0),u===a&&(a=void 0)}const c=t.get(i);if(c)c.value=l,n(c);else{const u={key:i,value:l,prev:a};a&&(a.next=u),a=u,o||(o=u),t.set(i,u)}},clear(){t.clear(),o=void 0,a=void 0}}}const Ps=4,nI=5;function VU(e){const t=e.indexOf("{");if(t===-1)return null;const o=e.indexOf("}",t);return o===-1||t+1>=e.length?null:[t,o]}function rI(e,t,o=new Uint16Array(6)){const a=e.indexOf("/",t),n=a===-1?e.length:a,i=e.substring(t,n);if(!i||!i.includes("$"))return o[0]=0,o[1]=t,o[2]=t,o[3]=n,o[4]=n,o[5]=n,o;if(i==="$"){const c=e.length;return o[0]=2,o[1]=t,o[2]=t,o[3]=c,o[4]=c,o[5]=c,o}if(i.charCodeAt(0)===36)return o[0]=1,o[1]=t,o[2]=t+1,o[3]=n,o[4]=n,o[5]=n,o;const l=VU(i);if(l){const[c,u]=l,p=i.charCodeAt(c+1);if(p===45){if(c+2<i.length&&i.charCodeAt(c+2)===36){const g=c+3,m=u;if(g<m)return o[0]=3,o[1]=t+c,o[2]=t+g,o[3]=t+m,o[4]=t+u+1,o[5]=n,o}}else if(p===36){const g=c+1,m=c+2;return m===u?(o[0]=2,o[1]=t+c,o[2]=t+g,o[3]=t+m,o[4]=t+u+1,o[5]=e.length,o):(o[0]=1,o[1]=t+c,o[2]=t+m,o[3]=t+u,o[4]=t+u+1,o[5]=n,o)}}return o[0]=0,o[1]=t,o[2]=t,o[3]=n,o[4]=n,o[5]=n,o}function dv(e,t,o,a,n,i,l){l?.(o);let c=a;{const u=o.fullPath??o.from,p=u.length,g=o.options?.caseSensitive??e,m=o.options?.params?.parse??o.options?.parseParams;for(;c<p;){const v=rI(u,c,t);let b;const S=c,C=v[5];switch(c=C+1,i++,v[0]){case 0:{const w=u.substring(v[2],v[3]);if(g){const _=n.static?.get(w);if(_)b=_;else{n.static??=new Map;const E=yl(o.fullPath??o.from);E.parent=n,E.depth=i,b=E,n.static.set(w,E)}}else{const _=w.toLowerCase(),E=n.staticInsensitive?.get(_);if(E)b=E;else{n.staticInsensitive??=new Map;const k=yl(o.fullPath??o.from);k.parent=n,k.depth=i,b=k,n.staticInsensitive.set(_,k)}}break}case 1:{const w=u.substring(S,v[1]),_=u.substring(v[4],C),E=g&&!!(w||_),k=w?E?w:w.toLowerCase():void 0,x=_?E?_:_.toLowerCase():void 0,A=!m&&n.dynamic?.find(D=>!D.parse&&D.caseSensitive===E&&D.prefix===k&&D.suffix===x);if(A)b=A;else{const D=_S(1,o.fullPath??o.from,E,k,x);b=D,D.depth=i,D.parent=n,n.dynamic??=[],n.dynamic.push(D)}break}case 3:{const w=u.substring(S,v[1]),_=u.substring(v[4],C),E=g&&!!(w||_),k=w?E?w:w.toLowerCase():void 0,x=_?E?_:_.toLowerCase():void 0,A=!m&&n.optional?.find(D=>!D.parse&&D.caseSensitive===E&&D.prefix===k&&D.suffix===x);if(A)b=A;else{const D=_S(3,o.fullPath??o.from,E,k,x);b=D,D.parent=n,D.depth=i,n.optional??=[],n.optional.push(D)}break}case 2:{const w=u.substring(S,v[1]),_=u.substring(v[4],C),E=g&&!!(w||_),k=w?E?w:w.toLowerCase():void 0,x=_?E?_:_.toLowerCase():void 0,A=_S(2,o.fullPath??o.from,E,k,x);b=A,A.parent=n,A.depth=i,n.wildcard??=[],n.wildcard.push(A)}}n=b}if(m&&o.children&&!o.isRoot&&o.id&&o.id.charCodeAt(o.id.lastIndexOf("/")+1)===95){const v=yl(o.fullPath??o.from);v.kind=nI,v.parent=n,i++,v.depth=i,n.pathless??=[],n.pathless.push(v),n=v}const f=(o.path||!o.children)&&!o.isRoot;if(f&&u.endsWith("/")){const v=yl(o.fullPath??o.from);v.kind=Ps,v.parent=n,i++,v.depth=i,n.index=v,n=v}n.parse=m??null,f&&!n.route&&(n.route=o,n.fullPath=o.fullPath??o.from)}if(o.children)for(const u of o.children)dv(e,t,u,c,n,i,l)}function wS(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 ys(e){if(e.pathless)for(const t of e.pathless)ys(t);if(e.static)for(const t of e.static.values())ys(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ys(t);if(e.dynamic?.length){e.dynamic.sort(wS);for(const t of e.dynamic)ys(t)}if(e.optional?.length){e.optional.sort(wS);for(const t of e.optional)ys(t)}if(e.wildcard?.length){e.wildcard.sort(wS);for(const t of e.wildcard)ys(t)}}function yl(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 _S(e,t,o,a,n){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:o,prefix:a,suffix:n}}function HU(e,t){const o=yl("/"),a=new Uint16Array(6);for(const n of e)dv(!1,a,n,1,o,0);ys(o),t.masksTree=o,t.flatCache=yp(1e3)}function GU(e,t){e||="/";const o=t.flatCache.get(e);if(o)return o;const a=b_(e,t.masksTree);return t.flatCache.set(e,a),a}function KU(e,t,o,a,n){e||="/",a||="/";const i=t?`case\0${e}`:e;let l=n.singleCache.get(i);return l||(l=yl("/"),dv(t,new Uint16Array(6),{from:e},1,l,0),n.singleCache.set(i,l)),b_(a,l,o)}function WU(e,t,o=!1){const a=o?e:`nofuzz\0${e}`,n=t.matchCache.get(a);if(n!==void 0)return n;e||="/";let i;try{i=b_(e,t.segmentTree,o)}catch(l){if(l instanceof URIError)i=null;else throw l}return i&&(i.branch=sI(i.route)),t.matchCache.set(a,i),i}function YU(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function ZU(e,t=!1,o){const a=yl(e.fullPath),n=new Uint16Array(6),i={},l={};let c=0;return dv(t,n,e,1,a,0,u=>{if(o?.(u,c),u.id in i&&Ri(),i[u.id]=u,c!==0&&u.path){const p=YU(u.fullPath);(!l[p]||u.fullPath.endsWith("/"))&&(l[p]=u)}c++}),ys(a),{processedTree:{segmentTree:a,singleCache:yp(1e3),matchCache:yp(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function b_(e,t,o=!1){const a=e.split("/"),n=JU(e,a,t,o);if(!n)return null;const[i]=iI(e,a,n);return{route:n.node.route,rawParams:i}}function iI(e,t,o){const a=QU(o.node);let n=null;const i=Object.create(null);let l=o.extract?.part??0,c=o.extract?.node??0,u=o.extract?.path??0,p=o.extract?.segment??0;for(;c<a.length;l++,c++,u++,p++){const g=a[c];if(g.kind===Ps)break;if(g.kind===nI){p--,l--,u--;continue}const m=t[l],f=u;if(m&&(u+=m.length),g.kind===1){n??=o.node.fullPath.split("/");const v=n[p],b=g.prefix?.length??0;if(v.charCodeAt(b)===123){const S=g.suffix?.length??0,C=v.substring(b+2,v.length-S-1),w=m.substring(b,m.length-S);i[C]=decodeURIComponent(w)}else{const S=v.substring(1);i[S]=decodeURIComponent(m)}}else if(g.kind===3){if(o.skipped&1<<c){l--,u=f-1;continue}n??=o.node.fullPath.split("/");const v=n[p],b=g.prefix?.length??0,S=g.suffix?.length??0,C=v.substring(b+3,v.length-S-1),w=g.suffix||g.prefix?m.substring(b,m.length-S):m;w&&(i[C]=decodeURIComponent(w))}else if(g.kind===2){const v=g,b=e.substring(f+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),S=decodeURIComponent(b);i["*"]=S,i._splat=S;break}}return o.rawParams&&Object.assign(i,o.rawParams),[i,{part:l,node:c,path:u,segment:p}]}function sI(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function QU(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function JU(e,t,o,a){if(e==="/"&&o.index)return{node:o.index,skipped:0};const n=!vp(t),i=n&&e!=="/",l=t.length-(n?1:0),c=[{node:o,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let u=null,p=null;for(;c.length;){const g=c.pop(),{node:m,index:f,skipped:v,depth:b,statics:S,dynamics:C,optionals:w}=g;let{extract:_,rawParams:E}=g;if(m.kind===2&&m.route&&!Pg(p,g))continue;if(m.parse){if(!M1(e,t,g))continue;E=g.rawParams,_=g.extract}a&&m.route&&m.kind!==Ps&&Pg(u,g)&&(u=g);const k=f===l;if(k&&(m.route&&(!i||m.kind===Ps||m.kind===2)&&Pg(p,g)&&(p=g),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const x=k?void 0:t[f];let A;if(k&&m.index){const D={node:m.index,index:f,skipped:v,depth:b+1,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E};let O=!0;if(m.index.parse&&(M1(e,t,D)||(O=!1)),O){if(!C&&!w&&!v&&XU(S,l))return D;Pg(p,D)&&(p=D)}}if(m.wildcard)for(let D=m.wildcard.length-1;D>=0;D--){const O=m.wildcard[D],{prefix:N,suffix:$}=O;if(!(N&&(k||!(O.caseSensitive?x:A??=x.toLowerCase()).startsWith(N)))){if($){if(k)continue;const F=t.slice(f).join("/").slice(-$.length);if((O.caseSensitive?F:F.toLowerCase())!==$)continue}c.push({node:O,index:l,skipped:v,depth:b+1,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E})}}if(m.optional){const D=v|1<<b,O=b+1;for(let N=m.optional.length-1;N>=0;N--){const $=m.optional[N];c.push({node:$,index:f,skipped:D,depth:O,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E})}if(!k)for(let N=m.optional.length-1;N>=0;N--){const $=m.optional[N],{prefix:F,suffix:z}=$;if(F||z){const j=$.caseSensitive?x:A??=x.toLowerCase();if(F&&!j.startsWith(F)||z&&!j.endsWith(z))continue}c.push({node:$,index:f+1,skipped:v,depth:O,statics:S,dynamics:C,optionals:w+Cg(l,f),extract:_,rawParams:E})}}if(!k&&m.dynamic&&x)for(let D=m.dynamic.length-1;D>=0;D--){const O=m.dynamic[D],{prefix:N,suffix:$}=O;if(N||$){const F=O.caseSensitive?x:A??=x.toLowerCase();if(N&&!F.startsWith(N)||$&&!F.endsWith($))continue}c.push({node:O,index:f+1,skipped:v,depth:b+1,statics:S,dynamics:C+Cg(l,f),optionals:w,extract:_,rawParams:E})}if(!k&&m.staticInsensitive){const D=m.staticInsensitive.get(A??=x.toLowerCase());D&&c.push({node:D,index:f+1,skipped:v,depth:b+1,statics:S+Cg(l,f),dynamics:C,optionals:w,extract:_,rawParams:E})}if(!k&&m.static){const D=m.static.get(x);D&&c.push({node:D,index:f+1,skipped:v,depth:b+1,statics:S+Cg(l,f),dynamics:C,optionals:w,extract:_,rawParams:E})}if(m.pathless){const D=b+1;for(let O=m.pathless.length-1;O>=0;O--){const N=m.pathless[O];c.push({node:N,index:f,skipped:v,depth:D,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E})}}}if(p)return p;if(a&&u){let g=u.index;for(let f=0;f<u.index;f++)g+=t[f].length;const m=g===e.length?"/":e.slice(g);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(m),u}return null}function Cg(e,t){return 2**(e-t-1)}function XU(e,t){return e===2**(t-1)-1}function M1(e,t,o){let a,n;try{[a,n]=iI(e,t,o)}catch{return null}if(o.rawParams=a,o.extract=n,!o.node.parse)return!0;try{if(o.node.parse(a)===!1)return null}catch{}return!0}function Pg(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===Ps)>(e.node.kind===Ps)||t.node.kind===Ps==(e.node.kind===Ps)&&t.depth>e.depth))):!0}function Gh(e){return y_(e.filter(t=>t!==void 0).join("/"))}function y_(e){return e.replace(/\/{2,}/g,"/")}function lI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function xi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function cI(e){return xi(lI(e))}function uf(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ez(e,t,o){return uf(e,o)===uf(t,o)}function tz({base:e,to:t,trailingSlash:o="never",cache:a}){const n=t.startsWith("/"),i=!n&&t===".";let l;if(a){l=n?t:i?e:e+"\0"+t;const p=a.get(l);if(p)return p}let c;if(i)c=e.split("/");else if(n)c=t.split("/");else{for(c=e.split("/");c.length>1&&vp(c)==="";)c.pop();const p=t.split("/");for(let g=0,m=p.length;g<m;g++){const f=p[g];f===""?g?g===m-1&&c.push(f):c=[f]:f===".."?c.pop():f==="."||c.push(f)}}c.length>1&&(vp(c)===""?o==="never"&&c.pop():o==="always"&&c.push(""));const u=y_(c.join("/"))||"/";return l&&a&&a.set(l,u),u}function oz(e){const t=new Map(e.map(n=>[encodeURIComponent(n),n])),o=Array.from(t.keys()).map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(o,"g");return n=>n.replace(a,i=>t.get(i)??i)}function CS(e,t,o){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(n=>N1(n,o)).join("/"):N1(a,o)}function L1({path:e,params:t,decoder:o,...a}){let n=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:n};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:n};const l=e.length;let c=0,u,p="";for(;c<l;){const g=c;u=rI(e,g,u);const m=u[5];if(c=m+1,g===m)continue;const f=u[0];if(f===0){p+="/"+e.substring(g,m);continue}if(f===2){const v=t._splat;i._splat=v,i["*"]=v;const b=e.substring(g,u[1]),S=e.substring(u[4],m);if(!v){n=!0,(b||S)&&(p+="/"+b+S);continue}const C=CS("_splat",t,o);p+="/"+b+C+S;continue}if(f===1){const v=e.substring(u[2],u[3]);!n&&!(v in t)&&(n=!0),i[v]=t[v];const b=e.substring(g,u[1]),S=e.substring(u[4],m),C=CS(v,t,o)??"undefined";p+="/"+b+C+S;continue}if(f===3){const v=e.substring(u[2],u[3]),b=t[v];if(b==null)continue;i[v]=b;const S=e.substring(g,u[1]),C=e.substring(u[4],m),w=CS(v,t,o)??"";p+="/"+S+w+C;continue}}return e.endsWith("/")&&(p+="/"),{usedParams:i,interpolatedPath:p||"/",isMissingParams:n}}function N1(e,t){const o=encodeURIComponent(e);return t?.(o)??o}function dI(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Na(e){return e?.isNotFound===!0}function az(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const nz="tsr-scroll-restoration-v1_3";function rz(){const e=az();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");gd(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=_s(a,t)||t},persist:()=>{try{e.setItem(nz,JSON.stringify(t))}catch{}}}}const F1=rz(),iz=e=>e.state.__TSR_key||e.href;function sz(e){const t=[];let o;for(;o=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(o.children,e)+1})`),e=o;return`${t.reverse().join(" > ")}`.toLowerCase()}let kg=!1;const Eu="window",B1="data-scroll-restoration-id";function lz(e,t){if(!F1)return;const o=F1;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!o)return;e.isScrollRestorationSetup=!0,kg=!1;const a=e.options.getScrollRestorationKey||iz,n=new Map;window.history.scrollRestoration="manual";const i=c=>{if(!(kg||!e.isScrollRestoring))if(c.target===document||c.target===window)n.set(Eu,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const u=c.target;n.set(u,{scrollX:u.scrollLeft||0,scrollY:u.scrollTop||0})}},l=c=>{if(!e.isScrollRestoring||!c||n.size===0||!o)return;const u=o.state[c]||={};for(const[p,g]of n){let m;if(p===Eu)m=Eu;else if(p.isConnected){const f=p.getAttribute(B1);m=f?`[${B1}="${f}"]`:sz(p)}m&&(u[m]=g)}};document.addEventListener("scroll",i,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?a(c.fromLocation):void 0),n.clear()}),window.addEventListener("pagehide",()=>{l(a(e.stores.resolvedLocation.get()??e.stores.location.get())),o.persist()}),e.subscribe("onRendered",c=>{const u=a(c.toLocation),p=e.options.scrollRestorationBehavior,g=e.options.scrollToTopSelectors;if(n.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){kg=!0;try{const m=e.isScrollRestoring?o.state[u]:void 0;let f=!1;if(m)for(const v in m){const b=m[v];if(!gd(b))continue;const{scrollX:S,scrollY:C}=b;if(!(!Number.isFinite(S)||!Number.isFinite(C))){if(v===Eu)window.scrollTo({top:C,left:S,behavior:p}),f=!0;else if(v){let w;try{w=document.querySelector(v)}catch{continue}w&&(w.scrollLeft=S,w.scrollTop=C,f=!0)}}}if(!f){const v=e.history.location.hash.slice(1);if(v){const b=window.history.state?.__hashScrollIntoViewOptions??!0;if(b){const S=document.getElementById(v);S&&S.scrollIntoView(b)}}else{const b={top:0,left:0,behavior:p};if(window.scrollTo(b),g)for(const S of g){if(S===Eu)continue;const C=typeof S=="function"?S():document.querySelector(S);C&&C.scrollTo(b)}}}}finally{kg=!1}e.isScrollRestoring&&o.set(m=>(m[u]||={},m))}})}function cz(e,t=String){const o=new URLSearchParams;for(const a in e){const n=e[a];n!==void 0&&o.set(a,t(n))}return o.toString()}function PS(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function dz(e){const t=new URLSearchParams(e),o=Object.create(null);for(const[a,n]of t.entries()){const i=o[a];i==null?o[a]=PS(n):Array.isArray(i)?i.push(PS(n)):o[a]=[i,PS(n)]}return o}const uz=mz(JSON.parse),pz=gz(JSON.stringify,JSON.parse);function mz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const o=dz(t);for(const a in o){const n=o[a];if(typeof n=="string")try{o[a]=e(n)}catch{}}return o}}function gz(e,t){const o=typeof t=="function";function a(n){if(typeof n=="object"&&n!==null)try{return e(n)}catch{}else if(o&&typeof n=="string")try{return t(n),e(n)}catch{}return n}return n=>{const i=cz(n,a);return i?`?${i}`:""}}const Cl="__root__";function Qo(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 o=new Response(null,{status:e.statusCode,headers:t});if(o.options=e,e.throw)throw o;return o}function ln(e){return e instanceof Response&&!!e.options}function hz(e){return{input:({url:t})=>{for(const o of e)t=fT(o,t);return t},output:({url:t})=>{for(let o=e.length-1;o>=0;o--)t=uI(e[o],t);return t}}}function fz(e){const t=cI(e.basepath),o=`/${t}`,a=`${o}/`,n=e.caseSensitive?o:o.toLowerCase(),i=e.caseSensitive?a:a.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===n?l.pathname="/":c.startsWith(i)&&(l.pathname=l.pathname.slice(o.length)),l},output:({url:l})=>(l.pathname=Gh(["/",t,l.pathname]),l)}}function fT(e,t){const o=e?.input?.({url:t});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return t}function uI(e,t){const o=e?.output?.({url:t});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return t}function vz(e,t){const{createMutableStore:o,createReadonlyStore:a,batch:n,init:i}=t,l=new Map,c=new Map,u=new Map,p=o(e.status),g=o(e.loadedAt),m=o(e.isLoading),f=o(e.isTransitioning),v=o(e.location),b=o(e.resolvedLocation),S=o(e.statusCode),C=o(e.redirect),w=o([]),_=o([]),E=o([]),k=a(()=>kS(l,w.get())),x=a(()=>kS(c,_.get())),A=a(()=>kS(u,E.get())),D=a(()=>w.get()[0]),O=a(()=>w.get().some(Z=>l.get(Z)?.get().status==="pending")),N=a(()=>({locationHref:v.get().href,resolvedLocationHref:b.get()?.href,status:p.get()})),$=a(()=>({status:p.get(),loadedAt:g.get(),isLoading:m.get(),isTransitioning:f.get(),matches:k.get(),location:v.get(),resolvedLocation:b.get(),statusCode:S.get(),redirect:C.get()})),F=yp(64);function z(Z){let te=F.get(Z);return te||(te=a(()=>{const le=w.get();for(const Q of le){const M=l.get(Q);if(M&&M.routeId===Z)return M.get()}}),F.set(Z,te)),te}const j={status:p,loadedAt:g,isLoading:m,isTransitioning:f,location:v,resolvedLocation:b,statusCode:S,redirect:C,matchesId:w,pendingIds:_,cachedIds:E,matches:k,pendingMatches:x,cachedMatches:A,firstId:D,hasPending:O,matchRouteDeps:N,matchStores:l,pendingMatchStores:c,cachedMatchStores:u,__store:$,getRouteMatchStore:z,setMatches:K,setPending:ne,setCached:H};K(e.matches),i?.(j);function K(Z){xS(Z,l,w,o,n)}function ne(Z){xS(Z,c,_,o,n)}function H(Z){xS(Z,u,E,o,n)}return j}function kS(e,t){const o=[];for(const a of t){const n=e.get(a);n&&o.push(n.get())}return o}function xS(e,t,o,a,n){const i=e.map(c=>c.id),l=new Set(i);n(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const u=t.get(c.id);if(!u){const p=a(c);p.routeId=c.routeId,t.set(c.id,p);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}qU(o.get(),i)||o.set(i)})}const vT=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},bz=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),uv=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Pl=(e,t,o=!0)=>{const a={...e.router.options.context??{}},n=o?t:t-1;for(let i=0;i<=n;i++){const l=e.matches[i];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(a,c.__routeContext,c.__beforeLoadContext)}return a},j1=(e,t)=>{if(!e.matches.length)return;const o=t.routeId,a=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),n=a>=0?a:0;let i=o?e.matches.findIndex(l=>l.routeId===o):e.firstBadMatchIndex??e.matches.length-1;i<0&&(i=n);for(let l=i;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return o?i:n},ks=(e,t,o)=>{if(!(!ln(o)&&!Na(o)))throw ln(o)&&o.redirectHandled&&!o.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=o,e.updateMatch(t.id,a=>({...a,status:ln(o)?"redirected":Na(o)?"notFound":a.status==="pending"?"success":a.status,context:Pl(e,t.index),isFetching:!1,error:o})),Na(o)&&!o.routeId&&(o.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),ln(o)&&(e.rendered=!0,o.options._fromLocation=e.location,o.redirectHandled=!0,o=e.router.resolveRedirect(o))),o},pI=(e,t)=>{const o=e.router.getMatch(t);return!!(!o||o._nonReactive.dehydrated)},U1=(e,t,o)=>{const a=Pl(e,o);e.updateMatch(t,n=>({...n,context:a}))},Ru=(e,t,o,a)=>{const{id:n,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(o instanceof Promise)throw o;o.routerCode=a,e.firstBadMatchIndex??=t,ks(e,e.router.getMatch(n),o);try{l.options.onError?.(o)}catch(c){o=c,ks(e,e.router.getMatch(n),o)}e.updateMatch(n,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:o,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!ln(o)&&!Na(o)&&(e.serialError??=o)},mI=(e,t,o,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const n=o.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!uv(e,t)&&(o.options.loader||o.options.beforeLoad||hI(o))&&typeof n=="number"&&n!==1/0&&(o.options.pendingComponent??e.router.options?.defaultPendingComponent)){const i=setTimeout(()=>{vT(e)},n);a._nonReactive.pendingTimeout=i}},yz=(e,t,o)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;mI(e,t,o,a);const n=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&ks(e,i,i.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(n):n()},Sz=(e,t,o,a)=>{const n=e.router.getMatch(t);let i=n._nonReactive.loadPromise;n._nonReactive.loadPromise=hd(()=>{i?.resolve(),i=void 0});const{paramsError:l,searchError:c}=n;l&&Ru(e,o,l,"PARSE_PARAMS"),c&&Ru(e,o,c,"VALIDATE_SEARCH"),mI(e,t,a,n);const u=new AbortController;let p=!1;const g=()=>{p||(p=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:u})))},m=()=>{n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{g(),m()});return}n._nonReactive.beforeLoadPromise=hd();const f={...Pl(e,o,!1),...n.__routeContext},{search:v,params:b,cause:S}=n,C=uv(e,t),w={search:v,abortController:u,params:b,preload:C,context:f,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":S,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},_=k=>{if(k===void 0){e.router.batch(()=>{g(),m()});return}(ln(k)||Na(k))&&(g(),Ru(e,o,k,"BEFORE_LOAD")),e.router.batch(()=>{g(),e.updateMatch(t,x=>({...x,__beforeLoadContext:k})),m()})};let E;try{if(E=a.options.beforeLoad(w),bp(E))return g(),E.catch(k=>{Ru(e,o,k,"BEFORE_LOAD")}).then(_)}catch(k){g(),Ru(e,o,k,"BEFORE_LOAD")}_(E)},Tz=(e,t)=>{const{id:o,routeId:a}=e.matches[t],n=e.router.looseRoutesById[a],i=()=>c(),l=()=>Sz(e,o,t,n),c=()=>{if(pI(e,o))return;const u=yz(e,o,n);return bp(u)?u.then(l):l()};return i()},wz=(e,t,o)=>{const a=e.router.getMatch(t);if(!a||!o.options.head&&!o.options.scripts&&!o.options.headers)return;const n={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([o.options.head?.(n),o.options.scripts?.(n),o.options.headers?.(n)]).then(([i,l,c])=>({meta:i?.meta,links:i?.links,headScripts:i?.scripts,headers:c,scripts:l,styles:i?.styles}))},gI=(e,t,o,a,n)=>{const i=t[a-1],{params:l,loaderDeps:c,abortController:u,cause:p}=e.router.getMatch(o),g=Pl(e,a),m=uv(e,o);return{params:l,deps:c,preload:!!m,parentMatchPromise:i,abortController:u,context:g,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:m?"preload":p,route:n,...e.router.options.additionalContext}},z1=async(e,t,o,a,n)=>{try{const i=e.router.getMatch(o);try{(!(tI??e.router.isServer)||i.ssr===!0)&&Sp(n);const l=n.options.loader,c=typeof l=="function"?l:l?.handler,u=c?.(gI(e,t,o,a,n)),p=!!c&&bp(u);if((p||n._lazyPromise||n._componentsPromise||n.options.head||n.options.scripts||n.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(o,m=>({...m,isFetching:"loader"})),c){const m=p?await u:u;ks(e,e.router.getMatch(o),m),m!==void 0&&e.updateMatch(o,f=>({...f,loaderData:m}))}n._lazyPromise&&await n._lazyPromise;const g=i._nonReactive.minPendingPromise;g&&await g,n._componentsPromise&&await n._componentsPromise,e.updateMatch(o,m=>({...m,error:void 0,context:Pl(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){if(i.abortController.signal.aborted){i._nonReactive.loaderPromise?.resolve(),i._nonReactive.loaderPromise=void 0;return}e.updateMatch(o,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:Pl(e,a)}));return}const u=i._nonReactive.minPendingPromise;u&&await u,Na(l)&&await n.options.notFoundComponent?.preload?.(),ks(e,e.router.getMatch(o),l);try{n.options.onError?.(l)}catch(p){c=p,ks(e,e.router.getMatch(o),p)}!ln(c)&&!Na(c)&&await Sp(n,["errorComponent"]),e.updateMatch(o,p=>({...p,error:c,context:Pl(e,a),status:"error",isFetching:!1}))}}catch(i){const l=e.router.getMatch(o);l&&(l._nonReactive.loaderPromise=void 0),ks(e,l,i)}},_z=async(e,t,o)=>{async function a(v,b,S,C,w){const _=Date.now()-b.updatedAt,E=v?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,k=w.options.shouldReload,x=typeof k=="function"?k(gI(e,t,n,o,w)):k,{status:A,invalid:D}=C,O=_>=E&&(!!e.forceStaleReload||C.cause==="enter"||S!==void 0&&S!==C.id);l=A==="success"&&(D||(x??O)),v&&w.options.preload===!1||(l&&!e.sync&&g?(c=!0,(async()=>{try{await z1(e,t,n,o,w);const N=e.router.getMatch(n);N._nonReactive.loaderPromise?.resolve(),N._nonReactive.loadPromise?.resolve(),N._nonReactive.loaderPromise=void 0,N._nonReactive.loadPromise=void 0}catch(N){ln(N)&&await e.router.navigate(N.options)}})()):A!=="success"||l?await z1(e,t,n,o,w):U1(e,n,o))}const{id:n,routeId:i}=e.matches[o];let l=!1,c=!1;const u=e.router.looseRoutesById[i],p=u.options.loader,g=((typeof p=="function"?void 0:p?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(pI(e,n)){if(!e.router.getMatch(n))return e.matches[o];U1(e,n,o)}else{const v=e.router.getMatch(n),b=e.router.stores.matchesId.get()[o],S=(b&&e.router.stores.matchStores.get(b)||null)?.routeId===i?b:e.router.stores.matches.get().find(w=>w.routeId===i)?.id,C=uv(e,n);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&g)return v;await v._nonReactive.loaderPromise;const w=e.router.getMatch(n),_=w._nonReactive.error||w.error;_&&ks(e,w,_),w.status==="pending"&&await a(C,v,S,w,u)}else{const w=C&&!e.router.stores.matchStores.has(n),_=e.router.getMatch(n);_._nonReactive.loaderPromise=hd(),w!==_.preload&&e.updateMatch(n,E=>({...E,preload:w})),await a(C,v,S,_,u)}}const m=e.router.getMatch(n);c||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,c||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const f=c?m.isFetching:!1;return f!==m.isFetching||m.invalid!==!1?(e.updateMatch(n,v=>({...v,isFetching:f,invalid:!1})),e.router.getMatch(n)):m};async function $1(e){const t=e,o=[];bz(t.router)&&vT(t);let a;for(let f=0;f<t.matches.length;f++){try{const v=Tz(t,f);bp(v)&&await v}catch(v){if(ln(v))throw v;if(Na(v))a=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const n=t.firstBadMatchIndex??t.matches.length,i=a&&!t.preload?j1(t,a):void 0,l=a&&t.preload?0:i!==void 0?Math.min(i+1,n):n;let c,u;for(let f=0;f<l;f++)o.push(_z(t,o,f));try{await Promise.all(o)}catch{const f=await Promise.allSettled(o);for(const v of f){if(v.status!=="rejected")continue;const b=v.reason;if(ln(b))throw b;Na(b)?c??=b:u??=b}if(u!==void 0)throw u}const p=c??(a&&!t.preload?a:void 0);let g=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!p&&a&&t.preload)return t.matches;if(p){const f=j1(t,p);f===void 0&&Ri();const v=t.matches[f],b=t.router.looseRoutesById[v.routeId],S=t.router.options?.defaultNotFoundComponent;!b.options.notFoundComponent&&S&&(b.options.notFoundComponent=S),p.routeId=v.routeId;const C=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,w=>({...w,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:p},isFetching:!1})),g=f,await Sp(b,["notFoundComponent"])}else if(!t.preload){const f=t.matches[0];f.globalNotFound||t.router.getMatch(f.id)?.globalNotFound&&t.updateMatch(f.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const f=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Sp(f,["errorComponent"])}for(let f=0;f<=g;f++){const{id:v,routeId:b}=t.matches[f],S=t.router.looseRoutesById[b];try{const C=wz(t,v,S);if(C){const w=await C;t.updateMatch(v,_=>({..._,...w}))}}catch(C){console.error(`Error executing head for route ${b}:`,C)}}const m=vT(t);if(bp(m)&&await m,p)throw p;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function q1(e,t){const o=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(o.length!==0)return Promise.all(o)}function Sp(e,t=Kh){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:n,...i}=a.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const o=()=>e._componentsLoaded?void 0:t===Kh?(()=>{if(e._componentsPromise===void 0){const a=q1(e,Kh);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():q1(e,t);return e._lazyPromise?e._lazyPromise.then(o):o()}function hI(e){for(const t of Kh)if(e.options[t]?.preload)return!0;return!1}const Kh=["component","errorComponent","pendingComponent","notFoundComponent"];var xs="__TSR_index",V1="popstate",H1="beforeunload";function Cz(e){let t=e.getLocation();const o=new Set,a=l=>{t=e.getLocation(),o.forEach(c=>c({location:t,action:l}))},n=l=>{e.notifyOnIndexChange??!0?a(l):t=e.getLocation()},i=async({task:l,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){l();return}const p=e.getBlockers?.()??[],g=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&p.length&&g)for(const m of p){const f=pf(u.path,u.state);if(await m.blockerFn({currentLocation:t,nextLocation:f,action:u.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:o,subscribe:l=>(o.add(l),()=>{o.delete(l)}),push:(l,c,u)=>{const p=t.state[xs];c=G1(p+1,c),i({task:()=>{e.pushState(l,c),a({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:l,state:c})},replace:(l,c,u)=>{const p=t.state[xs];c=G1(p,c),i({task:()=>{e.replaceState(l,c),a({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:l,state:c})},go:(l,c)=>{i({task:()=>{e.go(l),n({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),n({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),n({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[xs]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const u=e.getBlockers?.()??[];e.setBlockers?.(u.filter(p=>p!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function G1(e,t){t||(t={});const o=S_();return{...t,key:o,__TSR_key:o,[xs]:e}}function Pz(e){const t=typeof document<"u"?window:void 0,o=t.history.pushState,a=t.history.replaceState;let n=[];const i=()=>n,l=O=>n=O,c=(O=>O),u=(()=>pf(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const O=S_();t.history.replaceState({[xs]:0,key:O,__TSR_key:O},"")}let p=u(),g,m=!1,f=!1,v=!1,b=!1;const S=()=>p;let C,w;const _=()=>{C&&(D._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),D._ignoreSubscribers=!1,C=void 0,w=void 0,g=void 0)},E=(O,N,$)=>{const F=c(N);w||(g=p),p=pf(N,$),C={href:F,state:$,isPush:C?.isPush||O==="push"},w||(w=Promise.resolve().then(()=>_()))},k=O=>{p=u(),D.notify({type:O})},x=async()=>{if(f){f=!1;return}const O=u(),N=O.state[xs]-p.state[xs],$=N===1,F=N===-1,z=!$&&!F||m;m=!1;const j=z?"GO":F?"BACK":"FORWARD",K=z?{type:"GO",index:N}:{type:F?"BACK":"FORWARD"};if(v)v=!1;else{const ne=i();if(typeof document<"u"&&ne.length){for(const H of ne)if(await H.blockerFn({currentLocation:p,nextLocation:O,action:j})){f=!0,t.history.go(1),D.notify(K);return}}}p=u(),D.notify(K)},A=O=>{if(b){b=!1;return}let N=!1;const $=i();if(typeof document<"u"&&$.length)for(const F of $){const z=F.enableBeforeUnload??!0;if(z===!0){N=!0;break}if(typeof z=="function"&&z()===!0){N=!0;break}}if(N)return O.preventDefault(),O.returnValue=""},D=Cz({getLocation:S,getLength:()=>t.history.length,pushState:(O,N)=>E("push",O,N),replaceState:(O,N)=>E("replace",O,N),back:O=>(O&&(v=!0),b=!0,t.history.back()),forward:O=>{O&&(v=!0),b=!0,t.history.forward()},go:O=>{m=!0,t.history.go(O)},createHref:O=>c(O),flush:_,destroy:()=>{t.history.pushState=o,t.history.replaceState=a,t.removeEventListener(H1,A,{capture:!0}),t.removeEventListener(V1,x)},onBlocked:()=>{g&&p!==g&&(p=g)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(H1,A,{capture:!0}),t.addEventListener(V1,x),t.history.pushState=function(...O){const N=o.apply(t.history,O);return D._ignoreSubscribers||k("PUSH"),N},t.history.replaceState=function(...O){const N=a.apply(t.history,O);return D._ignoreSubscribers||k("REPLACE"),N},D}function kz(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function pf(e,t){const o=kz(e),a=o.indexOf("#"),n=o.indexOf("?"),i=S_();return{href:o,pathname:o.substring(0,a>0?n>0?Math.min(a,n):a:n>0?n:o.length),hash:a>-1?o.substring(a):"",search:n>-1?o.slice(n,a===-1?void 0:a):"",state:t||{[xs]:0,key:i,__TSR_key:i}}}function S_(){return(Math.random()+1).toString(36).substring(7)}function ad(e,t){const o=t,a=e;return{fromLocation:o,toLocation:a,pathChanged:o?.pathname!==a.pathname,hrefChanged:o?.href!==a.href,hashChanged:o?.hash!==a.hash}}var xz=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=o=>o(),this.update=o=>{const a=this.options,n=this.basepath??a?.basepath??"/",i=this.basepath===void 0,l=a?.rewrite;if(this.options={...a,...o},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=oz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pz()),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 g;this.resolvePathCache=yp(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=vz(Rz(this.latestLocation),g),lz(this)}let c=!1;const u=this.options.basepath??"/",p=this.options.rewrite;if(i||n!==u||l!==p){this.basepath=u;const g=[],m=cI(u);m&&m!=="/"&&g.push(fz({basepath:u})),p&&g.push(p),this.rewrite=g.length===0?void 0:g.length===1?g[0]:hz(g),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 o=ZU(this.routeTree,this.options.caseSensitive,(a,n)=>{a.init({originalIndex:n})});return this.options.routeMasks&&HU(this.options.routeMasks,o.processedTree),o},this.subscribe=(o,a)=>{const n={eventType:o,fn:a};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=o=>{this.subscribers.forEach(a=>{a.eventType===o.type&&a.fn(o)})},this.parseLocation=(o,a)=>{const n=({pathname:u,search:p,hash:g,href:m,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const w=this.options.parseSearch(p),_=this.options.stringifySearch(w);return{href:u+_+g,publicHref:u+_+g,pathname:xu(u).path,external:!1,searchStr:_,search:rl(a?.search,w),hash:xu(g.slice(1)).path,state:Cs(a?.state,f)}}const v=new URL(m,this.origin),b=fT(this.rewrite,v),S=this.options.parseSearch(b.search),C=this.options.stringifySearch(S);return b.search=C,{href:b.href.replace(b.origin,""),publicHref:m,pathname:xu(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:C,search:rl(a?.search,S),hash:xu(b.hash.slice(1)).path,state:Cs(a?.state,f)}},i=n(o),{__tempLocation:l,__tempKey:c}=i.state;if(l&&(!c||c===this.tempLocationKey)){const u=n(l);return u.state.key=i.state.key,u.state.__TSR_key=i.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:i}}return i},this.resolvePathWithBase=(o,a)=>tz({base:o,to:a.includes("//")?y_(a):a,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(o,a,n)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:a},n):this.matchRoutesInternal(o,a),this.getMatchedRoutes=o=>Az({pathname:o,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=o=>{const a=this.getMatch(o);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(o=>{this.cancelMatch(o)}),this.stores.matchesId.get().forEach(o=>{if(this.stores.pendingMatchStores.has(o))return;const a=this.stores.matchStores.get(o)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(o)})},this.buildLocation=o=>{const a=(i={})=>{const l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);i.from;const u=i.unsafeRelative==="path"?l.pathname:i.from??c.fullPath,p=i.to?`${i.to}`:void 0,g=c.search,m=Object.assign(Object.create(null),c.params),f=p?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),v=p?this.resolvePathWithBase(f,p):f,b=i.params===!1||i.params===null?Object.create(null):(i.params??!0)===!0?m:Object.assign(m,_s(i.params,m)),S=this.routesByPath[xi(v)];let C;if(S)C=this.getRouteBranch(S);else if(v.includes("$"))C=[];else{const F=this.getMatchedRoutes(v);C=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&aI(b))for(const F of C){const z=F.options.params?.stringify??F.options.stringifyParams;if(z)try{Object.assign(b,z(b))}catch{}}const w=o.leaveParams?v:xu(L1({path:v,params:b,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=g;if(o._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(z=>{if(z.options.validateSearch)try{Object.assign(F,Wh(z.options.validateSearch,{...F,..._}))}catch{}}),_=F}_=Dz({search:_,dest:i,destRoutes:C,_includeValidateSearch:o._includeValidateSearch}),_=rl(g,_);const E=this.options.stringifySearch(_),k=i.hash===!0?l.hash:i.hash?_s(i.hash,l.hash):void 0,x=k?`#${k}`:"";let A=i.state===!0?l.state:i.state?_s(i.state,l.state):{};A=Cs(l.state,A);const D=`${w}${E}${x}`;let O,N,$=!1;if(this.rewrite){const F=new URL(D,this.origin),z=uI(this.rewrite,F);O=F.href.replace(F.origin,""),z.origin!==this.origin?(N=z.href,$=!0):N=z.pathname+z.search+z.hash}else O=$U(D),N=O;return{publicHref:N,href:O,pathname:w,search:_,searchStr:E,state:A,hash:k??"",external:$,unmaskOnReload:i.unmaskOnReload}},n=(i={},l)=>{const c=a(i);let u=l?a(l):void 0;if(!u){const p=Object.create(null);if(this.options.routeMasks){const g=GU(c.pathname,this.processedTree);if(g){Object.assign(p,g.rawParams);const{from:m,params:f,...v}=g.route,b=f===!1||f===null?Object.create(null):(f??!0)===!0?p:Object.assign(p,_s(f,p));l={from:o.from,...v,params:b},u=a(l)}}}return u&&(c.maskedLocation=u),c};return o.mask?n(o,{from:o.from,...o.mask}):n(o)},this.commitLocation=async({viewTransition:o,ignoreBlocker:a,...n})=>{const i=()=>{const u=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(g=>{n.state[g]=this.latestLocation.state[g]});const p=_l(n.state,this.latestLocation.state);return u.forEach(g=>{delete n.state[g]}),p},l=xi(this.latestLocation.href)===xi(n.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=hd(()=>{c?.resolve(),c=void 0}),l&&i())this.load();else{let{maskedLocation:u,hashScrollIntoView:p,...g}=n;u&&(g={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=o,this.history[n.replace?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:a})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:o,resetScroll:a,hashScrollIntoView:n,viewTransition:i,ignoreBlocker:l,href:c,...u}={})=>{if(c){const m=this.history.location.state.__TSR_index,f=pf(c,{__TSR_index:o?m:m+1}),v=new URL(f.pathname,this.origin);u.to=fT(this.rewrite,v).pathname,u.search=this.options.parseSearch(f.search),u.hash=f.hash.slice(1)}const p=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=p;const g=this.commitLocation({...p,viewTransition:i,replace:o,resetScroll:a,hashScrollIntoView:n,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===p&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:o,reloadDocument:a,href:n,publicHref:i,...l})=>{let c=!1;if(n)try{new URL(`${n}`),c=!0}catch{}if(c&&!a&&(a=!0),a){if(o!==void 0||!n){const p=this.buildLocation({to:o,...l});n=n??p.publicHref,i=i??p.publicHref}const u=!c&&i?i:n;if(df(u,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const g of p)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...l,href:n,to:o,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const o=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(n=>!o.some(i=>i.id===n.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(o),this.stores.setCached(a)})},this.load=async o=>{let a,n,i;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const p=this.latestLocation,g=ad(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await $1({router:this,sync:o?.sync,forceStaleReload:l.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,f=null,v=null,b=null;this.batch(()=>{const S=this.stores.pendingMatches.get(),C=S.length,w=this.stores.matches.get();m=C?w.filter(k=>!this.stores.pendingMatchStores.has(k.id)):null;const _=new Set;for(const k of this.stores.pendingMatchStores.values())k.routeId&&_.add(k.routeId);const E=new Set;for(const k of this.stores.matchStores.values())k.routeId&&E.add(k.routeId);f=C?w.filter(k=>!_.has(k.routeId)):null,v=C?S.filter(k=>!E.has(k.routeId)):null,b=C?S.filter(k=>E.has(k.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),C&&(this.stores.setMatches(S),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(k=>k.status!=="error"&&k.status!=="notFound"&&k.status!=="redirected")]),this.clearExpiredCache())});for(const[S,C]of[[f,"onLeave"],[v,"onEnter"],[b,"onStay"]])if(S)for(const w of S)this.looseRoutesById[w.routeId].options[C]?.(w)})})}})}catch(p){ln(p)?(a=p,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Na(p)&&(n=p);const g=a?a.status:n?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(a)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(u=>u.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=o=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let n;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,l=this.stores.resolvedLocation.get(),c=typeof a.types=="function"?a.types(ad(i,l)):a.types;if(c===!1){o();return}n={update:o,types:c}}else n=o;document.startViewTransition(n)}else o()},this.updateMatch=(o,a)=>{this.startTransition(()=>{const n=this.stores.pendingMatchStores.get(o);if(n){n.set(a);return}const i=this.stores.matchStores.get(o);if(i){i.set(a);return}const l=this.stores.cachedMatchStores.get(o);if(l){const c=a(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(o)&&this.stores.cachedIds.set(u=>u.filter(p=>p!==o)):l.set(c)}})},this.getMatch=o=>this.stores.cachedMatchStores.get(o)?.get()??this.stores.pendingMatchStores.get(o)?.get()??this.stores.matchStores.get(o)?.get(),this.invalidate=o=>{const a=n=>o?.filter?.(n)??!0?{...n,invalid:!0,...o?.forcePending||n.status==="error"||n.status==="notFound"?{status:"pending",error:void 0}:void 0}:n;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.getParsedLocationHref=o=>o.publicHref||"/",this.resolveRedirect=o=>{const a=o.headers.get("Location");if(!o.options.href||o.options._builtLocation){const n=o.options._builtLocation??this.buildLocation(o.options),i=this.getParsedLocationHref(n);o.options.href=i,o.headers.set("Location",i)}else if(a)try{const n=new URL(a);if(this.origin&&n.origin===this.origin){const i=n.pathname+n.search+n.hash;o.options.href=i,o.headers.set("Location",i)}}catch{}if(o.options.href&&!o.options._builtLocation&&df(o.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return o.headers.get("Location")||o.headers.set("Location",o.options.href),o},this.clearCache=o=>{const a=o?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(n=>!a(n))):this.stores.setCached([])},this.clearExpiredCache=()=>{const o=Date.now(),a=n=>{const i=this.looseRoutesById[n.routeId];if(!i.options.loader)return!0;const l=(n.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:o-n.updatedAt>=l};this.clearCache({filter:a})},this.loadRouteChunk=Sp,this.preloadRoute=async o=>{const a=o._builtLocation??this.buildLocation(o);let n=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:o});const i=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),l=new Set([...i,...this.stores.cachedIds.get()]),c=n.filter(u=>!l.has(u.id));if(c.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return n=await $1({router:this,matches:n,location:a,preload:!0,updateMatch:(u,p)=>{i.has(u)?n=n.map(g=>g.id===u?p(g):g):this.updateMatch(u,p)}}),n}catch(u){if(ln(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:a});Na(u)||console.error(u);return}},this.matchRoute=(o,a)=>{const n={...o,to:o.to?this.resolvePathWithBase(o.from||"",o.to):void 0,params:o.params||{},leaveParams:!0},i=this.buildLocation(n);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const l=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=KU(i.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,l.pathname,this.processedTree);return!c||o.params&&!_l(c.rawParams,o.params,{partial:!0})?!1:a?.includeSearch??!0?_l(l.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(o=>o.status==="notFound"||o.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??pz,parseSearch:e.parseSearch??uz,protocolAllowlist:e.protocolAllowlist??zU}),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:o}){this.routesById=e,this.routesByPath=t,this.processedTree=o;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=sI(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 o=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:n}=o;let{matchedRoutes:i}=o,l=!1;(a?a.path!=="/"&&n["**"]:xi(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:l=!0);const c=l?Iz(this.options.notFoundMode,i):void 0,u=new Array(i.length),p=new Map;for(const g of this.stores.matchStores.values())g.routeId&&p.set(g.routeId,g.get());for(let g=0;g<i.length;g++){const m=i[g],f=u[g-1];let v,b,S;{const z=f?.search??e.search,j=f?._strictSearch??void 0;try{const K=Wh(m.options.validateSearch,{...z})??void 0;v={...z,...K},b={...j,...K},S=void 0}catch(K){let ne=K;if(K instanceof mf||(ne=new mf(K.message,{cause:K})),t?.throwOnError)throw ne;v=z,b={},S=ne}}const C=m.options.loaderDeps?.({search:v})??"",w=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:E}=L1({path:m.fullPath,params:n,decoder:this.pathParamsDecoder,server:this.isServer}),k=m.id+_+w,x=this.getMatch(k),A=p.get(m.id),D=x?._strictParams??E;let O;if(!x)try{K1(m,D)}catch(z){if(Na(z)||ln(z)?O=z:O=new Ez(z.message,{cause:z}),t?.throwOnError)throw O}Object.assign(n,D);const N=A?"stay":"enter";let $;if(x)$={...x,cause:N,params:A?.params??n,_strictParams:D,search:rl(A?A.search:x.search,v),_strictSearch:b};else{const z=m.options.loader||m.options.beforeLoad||m.lazyFn||hI(m)?"pending":"success";$={id:k,ssr:m.options.ssr,index:g,routeId:m.id,params:A?.params??n,_strictParams:D,pathname:_,updatedAt:Date.now(),search:A?rl(A.search,v):v,_strictSearch:b,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:O,__routeContext:void 0,_nonReactive:{loadPromise:hd()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:N,loaderDeps:A?Cs(A.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||($.globalNotFound=c===m.id),$.searchError=S;const F=this.getParentContext(f);$.context={...F,...$.__routeContext,...$.__beforeLoadContext},u[g]=$}for(let g=0;g<u.length;g++){const m=u[g],f=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),b=p.get(m.routeId);if(m.params=b?rl(b.params,n):n,!v){const S=u[g-1],C=this.getParentContext(S);if(f.options.context){const w={deps:m.loaderDeps,params:m.params,context:C??{},location:e,navigate:_=>this.navigate({..._,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:f.id};m.__routeContext=f.options.context(w)??void 0}m.context={...C,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:o}=this.getMatchedRoutes(e.pathname),a=vp(t),n={...e.search};for(const p of t)try{Object.assign(n,Wh(p.options.validateSearch,n))}catch{}const i=vp(this.stores.matchesId.get()),l=i&&this.stores.matchStores.get(i)?.get(),c=l&&l.routeId===a.id&&l.pathname===e.pathname;let u;if(c)u=l.params;else{const p=Object.assign(Object.create(null),o);for(const g of t)try{K1(g,p)}catch{}u=p}return{matchedRoutes:t,fullPath:a.fullPath,search:n,params:u}}},mf=class extends Error{},Ez=class extends Error{};function Rz(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Wh(e,t){if(e==null)return{};if("~standard"in e){const o=e["~standard"].validate(t);if(o instanceof Promise)throw new mf("Async validation not supported");if(o.issues)throw new mf(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Az({pathname:e,routesById:t,processedTree:o}){const a=Object.create(null),n=xi(e);let i;const l=WU(n,o,!0);return l&&(i=l.route,Object.assign(a,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:a,foundRoute:i}}function Dz({search:e,dest:t,destRoutes:o,_includeValidateSearch:a}){return Oz(o)(e,t,a??!1)}function Oz(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const n of e){if("search"in n.options)n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares);else if(n.options.preSearchFilters||n.options.postSearchFilters){const i=({search:l,next:c})=>{let u=l;"preSearchFilters"in n.options&&n.options.preSearchFilters&&(u=n.options.preSearchFilters.reduce((g,m)=>m(g),l));const p=c(u);return"postSearchFilters"in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((g,m)=>m(g),p):p};t.middlewares.push(i)}if(n.options.validateSearch){const i=({search:l,next:c})=>{const u=c(l);if(!t._includeValidateSearch)return u;try{return{...u,...Wh(n.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(i)}}const o=({search:n})=>{const i=t.dest;return i.search?i.search===!0?n:_s(i.search,n):{}};t.middlewares.push(o);const a=(n,i,l)=>{if(n>=l.length)return i;const c=l[n];return c({search:i,next:p=>a(n+1,p,l)})};return function(i,l,c){return t.dest=l,t._includeValidateSearch=c,a(0,i,t.middlewares)}}function Iz(e,t){if(e!=="root")for(let o=t.length-1;o>=0;o--){const a=t[o];if(a.children)return a.id}return Cl}function K1(e,t){const o=e.options.params?.parse??e.options.parseParams;if(o){const a=o(t);if(a===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,a)}}const Mz="Error preloading route! ☝️";var fI=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 o=this.options,a=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Cl:this.parentRoute||Ri();let n=a?Cl:o?.path;n&&n!=="/"&&(n=lI(n));const i=o?.id||n;let l=a?Cl:Gh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);n==="__root__"&&(n="/"),l!=="__root__"&&(l=Gh(["/",l]));const c=l==="__root__"?"/":Gh([this.parentRoute.fullPath,n]);this._path=n,this._id=l,this._fullPath=c,this._to=xi(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=>Qo({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.")}},Lz=class{constructor({id:e}){this.notFound=t=>dI({routeId:this.id,...t}),this.redirect=t=>Qo({from:this.id,...t}),this.id=e}},Nz=class extends fI{constructor(e){super(e)}};function Fz(e){return({search:t,next:o})=>{const a=o(t);if(e===!0)return{...t,...a};const n={...a};return e.forEach(i=>{i in n||(n[i]=t[i])}),n}}function Bz(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),o=t.state.__hashScrollIntoViewOptions??!0;if(o&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(o)}}}function T_(e){const t=e.errorComponent??w_;return T.jsx(jz,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:o,reset:a})=>o?R.createElement(t,{error:o,reset:a}):e.children})}var jz=class extends R.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const o=e.getResetKey();return t.error&&t.resetKey!==o?{resetKey:o,error:null}:{resetKey:o}}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 w_({error:e}){const[t,o]=R.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>o(a=>!a),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function Uz({children:e,fallback:t=null}){return vI()?T.jsx(X.Fragment,{children:e}):T.jsx(X.Fragment,{children:t})}function vI(){return X.useSyncExternalStore(zz,()=>!0,()=>!1)}function zz(){return()=>{}}var bI=R.createContext(null);function Fa(e){return R.useContext(bI)}var pv=R.createContext(void 0),$z=R.createContext(void 0),yo=(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))(yo||{});function qz({update:e,notify:t,unwatched:o}){return{link:a,unlink:n,propagate:i,checkDirty:l,shallowPropagate:c};function a(p,g,m){const f=g.depsTail;if(f!==void 0&&f.dep===p)return;const v=f!==void 0?f.nextDep:g.deps;if(v!==void 0&&v.dep===p){v.version=m,g.depsTail=v;return}const b=p.subsTail;if(b!==void 0&&b.version===m&&b.sub===g)return;const S=g.depsTail=p.subsTail={version:m,dep:p,sub:g,prevDep:f,nextDep:v,prevSub:b,nextSub:void 0};v!==void 0&&(v.prevDep=S),f!==void 0?f.nextDep=S:g.deps=S,b!==void 0?b.nextSub=S:p.subs=S}function n(p,g=p.sub){const m=p.dep,f=p.prevDep,v=p.nextDep,b=p.nextSub,S=p.prevSub;return v!==void 0?v.prevDep=f:g.depsTail=f,f!==void 0?f.nextDep=v:g.deps=v,b!==void 0?b.prevSub=S:m.subsTail=S,S!==void 0?S.nextSub=b:(m.subs=b)===void 0&&o(m),v}function i(p){let g=p.nextSub,m;e:do{const f=p.sub;let v=f.flags;if(v&60?v&12?v&4?!(v&48)&&u(p,f)?(f.flags=v|40,v&=1):v=0:f.flags=v&-9|32:v=0:f.flags=v|32,v&2&&t(f),v&1){const b=f.subs;if(b!==void 0){const S=(p=b).nextSub;S!==void 0&&(m={value:g,prev:m},g=S);continue}}if((p=g)!==void 0){g=p.nextSub;continue}for(;m!==void 0;)if(p=m.value,m=m.prev,p!==void 0){g=p.nextSub;continue e}break}while(!0)}function l(p,g){let m,f=0,v=!1;e:do{const b=p.dep,S=b.flags;if(g.flags&16)v=!0;else if((S&17)===17){if(e(b)){const C=b.subs;C.nextSub!==void 0&&c(C),v=!0}}else if((S&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(m={value:p,prev:m}),p=b.deps,g=b,++f;continue}if(!v){const C=p.nextDep;if(C!==void 0){p=C;continue}}for(;f--;){const C=g.subs,w=C.nextSub!==void 0;if(w?(p=m.value,m=m.prev):p=C,v){if(e(g)){w&&c(C),g=p.sub;continue}v=!1}else g.flags&=-33;g=p.sub;const _=p.nextDep;if(_!==void 0){p=_;continue e}}return v}while(!0)}function c(p){do{const g=p.sub,m=g.flags;(m&48)===32&&(g.flags=m|16,(m&6)===2&&t(g))}while((p=p.nextSub)!==void 0)}function u(p,g){let m=g.depsTail;for(;m!==void 0;){if(m===p)return!0;m=m.prevDep}return!1}}function Vz(e,t,o){const a=typeof e=="object",n=a?e:void 0;return{next:(a?e.next:e)?.bind(n),error:(a?e.error:t)?.bind(n),complete:(a?e.complete:o)?.bind(n)}}const bT=[];let Yh=0;const{link:W1,unlink:Hz,propagate:Gz,checkDirty:yI,shallowPropagate:Y1}=qz({update(e){return e._update()},notify(e){bT[yT++]=e,e.flags&=~yo.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=yo.Mutable|yo.Dirty,gf(e))}});let xg=0,yT=0,Lr,ST=0;function SI(e){try{++ST,e()}finally{--ST||TI()}}function gf(e){const t=e.depsTail;let o=t!==void 0?t.nextDep:e.deps;for(;o!==void 0;)o=Hz(o,e)}function TI(){if(!(ST>0)){for(;xg<yT;){const e=bT[xg];bT[xg++]=void 0,e.notify()}xg=0,yT=0}}function Z1(e,t){const o=typeof e=="function",a=e,n={_snapshot:o?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?yo.None:yo.Mutable,get(){return Lr!==void 0&&W1(n,Lr,Yh),n._snapshot},subscribe(i){const l=Vz(i),c={current:!1},u=Kz(()=>{n.get(),c.current?l.next?.(n._snapshot):c.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(i){const l=Lr,c=t?.compare??Object.is;if(o)Lr=n,++Yh,n.depsTail=void 0;else if(i===void 0)return!1;o&&(n.flags=yo.Mutable|yo.RecursedCheck);try{const u=n._snapshot,p=typeof i=="function"?i(u):i===void 0&&o?a(u):i;return u===void 0||!c(u,p)?(n._snapshot=p,!0):!1}finally{Lr=l,o&&(n.flags&=~yo.RecursedCheck),gf(n)}}};return o?(n.flags=yo.Mutable|yo.Dirty,n.get=function(){const i=n.flags;if(i&yo.Dirty||i&yo.Pending&&yI(n.deps,n)){if(n._update()){const l=n.subs;l!==void 0&&Y1(l)}}else i&yo.Pending&&(n.flags=i&~yo.Pending);return Lr!==void 0&&W1(n,Lr,Yh),n._snapshot}):n.set=function(i){if(n._update(i)){const l=n.subs;l!==void 0&&(Gz(l),Y1(l),TI())}},n}function Kz(e){const t=()=>{const a=Lr;Lr=o,++Yh,o.depsTail=void 0,o.flags=yo.Watching|yo.RecursedCheck;try{return e()}finally{Lr=a,o.flags&=~yo.RecursedCheck,gf(o)}},o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:yo.Watching|yo.RecursedCheck,notify(){const a=this.flags;a&yo.Dirty||a&yo.Pending&&yI(this.deps,this)?t():this.flags=yo.Watching},stop(){this.flags=yo.None,this.depsTail=void 0,gf(this)}};return t(),o}var ES={exports:{}},RS={},AS={exports:{}},DS={};var Q1;function Wz(){if(Q1)return DS;Q1=1;var e=Ls();function t(m,f){return m===f&&(m!==0||1/m===1/f)||m!==m&&f!==f}var o=typeof Object.is=="function"?Object.is:t,a=e.useState,n=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function c(m,f){var v=f(),b=a({inst:{value:v,getSnapshot:f}}),S=b[0].inst,C=b[1];return i(function(){S.value=v,S.getSnapshot=f,u(S)&&C({inst:S})},[m,v,f]),n(function(){return u(S)&&C({inst:S}),m(function(){u(S)&&C({inst:S})})},[m]),l(v),v}function u(m){var f=m.getSnapshot;m=m.value;try{var v=f();return!o(m,v)}catch{return!0}}function p(m,f){return f()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return DS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,DS}var J1;function wI(){return J1||(J1=1,AS.exports=Wz()),AS.exports}var X1;function Yz(){if(X1)return RS;X1=1;var e=Ls(),t=wI();function o(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var a=typeof Object.is=="function"?Object.is:o,n=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return RS.useSyncExternalStoreWithSelector=function(p,g,m,f,v){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=c(function(){function w(A){if(!_){if(_=!0,E=A,A=f(A),v!==void 0&&S.hasValue){var D=S.value;if(v(D,A))return k=D}return k=A}if(D=k,a(E,A))return D;var O=f(A);return v!==void 0&&v(D,O)?(E=A,D):(E=A,k=O)}var _=!1,E,k,x=m===void 0?null:m;return[function(){return w(g())},x===null?void 0:function(){return w(x())}]},[g,m,f,v]);var C=n(p,b[0],b[1]);return l(function(){S.hasValue=!0,S.value=C},[C]),u(C),C},RS}var eR;function Zz(){return eR||(eR=1,ES.exports=Yz()),ES.exports}var Qz=Zz();function Jz(e,t){return e===t}function un(e,t,o=Jz){const a=R.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),n=R.useCallback(()=>e?.get(),[e]);return Qz.useSyncExternalStoreWithSelector(a,n,n,t,o)}var Xz={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ns(e){const t=Fa(),o=R.useContext(e.from?$z:pv),a=e.from??o,n=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,i=R.useRef(void 0);return un(n??Xz,l=>{if((e.shouldThrow??!0)&&!l&&Ri(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const u=Cs(i.current,c);return i.current=u,u}return c})}function __(e){return Ns({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function C_(e){const{select:t,...o}=e;return Ns({...o,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function Rd(e){return Ns({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const o=e.strict===!1?t.params:t._strictParams;return e.select?e.select(o):o}})}function P_(e){return Ns({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function mv(e){const t=Fa();return R.useCallback(o=>t.navigate({...o,from:o.from??e?.from}),[e?.from,t])}function Whe(e){const t=Fa(),o=mv(),a=R.useRef(null);return Zc(()=>{a.current!==e&&(o(e),a.current=e)},[t,e,o]),null}function k_(e){return Ns({...e,select:t=>e.select?e.select(t.context):t.context})}var Up=eI();const _I=Ll(Up);function e$(e,t){const o=Fa(),a=NU(t),{activeProps:n,inactiveProps:i,activeOptions:l,to:c,preload:u,preloadDelay:p,preloadIntentProximity:g,hashScrollIntoView:m,replace:f,startTransition:v,resetScroll:b,viewTransition:S,children:C,target:w,disabled:_,style:E,className:k,onClick:x,onBlur:A,onFocus:D,onMouseEnter:O,onMouseLeave:N,onTouchStart:$,ignoreBlocker:F,params:z,search:j,hash:K,state:ne,mask:H,reloadDocument:Z,unsafeRelative:te,from:le,_fromLocation:Q,...M}=e,G=vI(),q=R.useMemo(()=>e,[o,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),L=un(o.stores.location,oe=>oe,(oe,se)=>oe.href===se.href),U=R.useMemo(()=>{const oe={_fromLocation:L,...q};return o.buildLocation(oe)},[o,L,q]),J=U.maskedLocation?U.maskedLocation.publicHref:U.publicHref,pe=U.maskedLocation?U.maskedLocation.external:U.external,ge=R.useMemo(()=>i$(J,pe,o.history,_),[_,pe,J,o.history]),Ce=R.useMemo(()=>{if(ge?.external)return df(ge.href,o.protocolAllowlist)?void 0:ge.href;if(!s$(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),df(c,o.protocolAllowlist)?void 0:c}catch{}},[c,ge,o.protocolAllowlist]),$e=R.useMemo(()=>{if(Ce)return!1;if(l?.exact){if(!ez(L.pathname,U.pathname,o.basepath))return!1}else{const oe=uf(L.pathname,o.basepath),se=uf(U.pathname,o.basepath);if(!(oe.startsWith(se)&&(oe.length===se.length||oe[se.length]==="/")))return!1}return(l?.includeSearch??!0)&&!_l(L.search,U.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?G&&L.hash===U.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,L,Ce,G,U.hash,U.pathname,U.search,o.basepath]),Y=$e?_s(n,{})??t$:OS,ae=$e?OS:_s(i,{})??OS,ve=[k,Y.className,ae.className].filter(Boolean).join(" "),ie=(E||Y.style||ae.style)&&{...E,...Y.style,...ae.style},[Te,ke]=R.useState(!1),it=R.useRef(!1),lt=e.reloadDocument||Ce?!1:u??o.options.defaultPreload,Ge=p??o.options.defaultPreloadDelay??0,tt=R.useCallback(()=>{o.preloadRoute({...q,_builtLocation:U}).catch(oe=>{console.warn(oe),console.warn(Mz)})},[o,q,U]);LU(a,R.useCallback(oe=>{oe?.isIntersecting&&tt()},[tt]),r$,{disabled:!!_||lt!=="viewport"}),R.useEffect(()=>{it.current||!_&&lt==="render"&&(tt(),it.current=!0)},[_,tt,lt]);const De=oe=>{const se=oe.currentTarget.getAttribute("target"),Pe=w!==void 0?w:se;if(!_&&!c$(oe)&&!oe.defaultPrevented&&(!Pe||Pe==="_self")&&oe.button===0){oe.preventDefault(),Up.flushSync(()=>{ke(!0)});const Ee=o.subscribe("onResolved",()=>{Ee(),ke(!1)});o.navigate({...q,replace:f,resetScroll:b,hashScrollIntoView:m,startTransition:v,viewTransition:S,ignoreBlocker:F})}};if(Ce)return{...M,ref:a,href:Ce,...C&&{children:C},...w&&{target:w},..._&&{disabled:_},...E&&{style:E},...k&&{className:k},...x&&{onClick:x},...A&&{onBlur:A},...D&&{onFocus:D},...O&&{onMouseEnter:O},...N&&{onMouseLeave:N},...$&&{onTouchStart:$}};const Ae=oe=>{if(_||lt!=="intent")return;if(!Ge){tt();return}const se=oe.currentTarget;if(Au.has(se))return;const Pe=setTimeout(()=>{Au.delete(se),tt()},Ge);Au.set(se,Pe)},He=oe=>{_||lt!=="intent"||tt()},W=oe=>{if(_||!lt||!Ge)return;const se=oe.currentTarget,Pe=Au.get(se);Pe&&(clearTimeout(Pe),Au.delete(se))};return{...M,...Y,...ae,href:ge?.href,ref:a,onClick:Ec([x,De]),onBlur:Ec([A,W]),onFocus:Ec([D,Ae]),onMouseEnter:Ec([O,Ae]),onMouseLeave:Ec([N,W]),onTouchStart:Ec([$,He]),disabled:!!_,target:w,...ie&&{style:ie},...ve&&{className:ve},..._&&o$,...$e&&a$,...G&&Te&&n$}}var OS={},t$={className:"active"},o$={role:"link","aria-disabled":!0},a$={"data-status":"active","aria-current":"page"},n$={"data-transitioning":"transitioning"},Au=new WeakMap,r$={rootMargin:"100px"},Ec=e=>t=>{for(const o of e)if(o){if(t.defaultPrevented)return;o(t)}};function i$(e,t,o,a){if(!a)return t?{href:e,external:!0}:{href:o.createHref(e)||"/",external:!1}}function s$(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function l$(e){return R.forwardRef(function(o,a){return T.jsx(Fs,{...o,_asChild:e,ref:a})})}var Fs=R.forwardRef((e,t)=>{const{_asChild:o,...a}=e,{type:n,...i}=e$(a,t),l=typeof a.children=="function"?a.children({isActive:i["data-status"]==="active"}):a.children;if(!o){const{disabled:c,...u}=i;return R.createElement("a",u,l)}return R.createElement(o,i,l)});function c$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yhe(e){return new d$({id:e})}var d$=class extends Lz{constructor({id:e}){super({id:e}),this.useMatch=t=>Ns({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k_({...t,from:this.id}),this.useSearch=t=>P_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Rd({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>C_({...t,from:this.id,strict:!1}),this.useLoaderData=t=>__({...t,from:this.id,strict:!1}),this.useNavigate=()=>mv({from:Fa().routesById[this.id].fullPath}),this.notFound=t=>dI({routeId:this.id,...t}),this.Link=X.forwardRef((t,o)=>{const a=Fa().routesById[this.id].fullPath;return T.jsx(Fs,{ref:o,from:a,...t})})}},u$=class extends fI{constructor(e){super(e),this.useMatch=t=>Ns({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k_({...t,from:this.id}),this.useSearch=t=>P_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Rd({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>C_({...t,from:this.id}),this.useLoaderData=t=>__({...t,from:this.id}),this.useNavigate=()=>mv({from:this.fullPath}),this.Link=X.forwardRef((t,o)=>T.jsx(Fs,{ref:o,from:this.fullPath,...t}))}};function Me(e){return new u$(e)}var p$=class extends Nz{constructor(e){super(e),this.useMatch=t=>Ns({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k_({...t,from:this.id}),this.useSearch=t=>P_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Rd({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>C_({...t,from:this.id}),this.useLoaderData=t=>__({...t,from:this.id}),this.useNavigate=()=>mv({from:this.fullPath}),this.Link=X.forwardRef((t,o)=>T.jsx(Fs,{ref:o,from:this.fullPath,...t}))}};function m$(e){return new p$(e)}function Ue(e,t){let o,a,n,i;const l=()=>(o||(o=e().then(u=>{o=void 0,a=u[t??"default"]}).catch(u=>{if(n=u,jU(n)&&n instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const p=`tanstack_router_reload:${n.message}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),i=!0)}})),o),c=function(p){if(i)throw window.location.reload(),new Promise(()=>{});if(n)throw n;if(!a)if(E1)E1(l());else throw l();return R.createElement(a,p)};return c.preload=l,c}function g$(e){const t=Fa(),o=`not-found-${un(t.stores.location,a=>a.pathname)}-${un(t.stores.status,a=>a)}`;return T.jsx(T_,{getResetKey:()=>o,onCatch:(a,n)=>{if(Na(a))e.onCatch?.(a,n);else throw a},errorComponent:({error:a})=>{if(Na(a))return e.fallback?.(a);throw a},children:e.children})}function h$(){return T.jsx("p",{children:"Not Found"})}function Hc(e){return T.jsx(T.Fragment,{children:e.children})}function CI(e,t,o){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{...o}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{...o}):T.jsx(h$,{})}function f$(e){return null}function v$(){return f$(Fa()),null}var PI=R.memo(function({matchId:t}){const o=Fa(),a=o.stores.matchStores.get(t);a||Ri();const n=un(o.stores.loadedAt,l=>l),i=un(a,l=>l);return T.jsx(b$,{router:o,matchId:t,resetKey:n,matchState:R.useMemo(()=>{const l=i.routeId,c=o.routesById[l].parentRoute?.id;return{routeId:l,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:c}},[i._displayPending,i.routeId,i.ssr,o.routesById])})});function b$({router:e,matchId:t,resetKey:o,matchState:a}){const n=e.routesById[a.routeId],i=n.options.pendingComponent??e.options.defaultPendingComponent,l=i?T.jsx(i,{}):null,c=n.options.errorComponent??e.options.defaultErrorComponent,u=n.options.onCatch??e.options.defaultOnCatch,p=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",m=(!n.isRoot||n.options.wrapInSuspense||g)&&(n.options.wrapInSuspense??i??(n.options.errorComponent?.preload||g))?R.Suspense:Hc,f=c?T_:Hc,v=p?g$:Hc;return T.jsxs(n.isRoot?n.options.shellComponent??Hc:Hc,{children:[T.jsx(pv.Provider,{value:t,children:T.jsx(m,{fallback:l,children:T.jsx(f,{getResetKey:()=>o,errorComponent:c||w_,onCatch:(b,S)=>{if(Na(b))throw b.routeId??=a.routeId,b;u?.(b,S)},children:T.jsx(v,{fallback:b=>{if(b.routeId??=a.routeId,!p||b.routeId&&b.routeId!==a.routeId||!b.routeId&&!n.isRoot)throw b;return R.createElement(p,b)},children:g||a._displayPending?T.jsx(Uz,{fallback:l,children:T.jsx(tR,{matchId:t})}):T.jsx(tR,{matchId:t})})})})}),a.parentRouteId===Cl?T.jsxs(T.Fragment,{children:[T.jsx(y$,{resetKey:o}),e.options.scrollRestoration&&tI?T.jsx(v$,{}):null]}):null]})}function y$({resetKey:e}){const t=Fa(),o=R.useRef(void 0);return Zc(()=>{const a=t.latestLocation.href;(o.current===void 0||o.current!==a)&&(t.emit({type:"onRendered",...ad(t.stores.location.get(),t.stores.resolvedLocation.get())}),o.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var tR=R.memo(function({matchId:t}){const o=Fa(),a=(g,m)=>o.getMatch(g.id)?._nonReactive[m]??g._nonReactive[m],n=o.stores.matchStores.get(t);n||Ri();const i=un(n,g=>g),l=i.routeId,c=o.routesById[l],u=R.useMemo(()=>{const g=(o.routesById[l].options.remountDeps??o.options.defaultRemountDeps)?.({routeId:l,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return g?JSON.stringify(g):void 0},[l,i.loaderDeps,i._strictParams,i._strictSearch,o.options.defaultRemountDeps,o.routesById]),p=R.useMemo(()=>{const g=c.options.component??o.options.defaultComponent;return g?T.jsx(g,{},u):T.jsx(x_,{})},[u,c.options.component,o.options.defaultComponent]);if(i._displayPending)throw a(i,"displayPendingPromise");if(i._forcePending)throw a(i,"minPendingPromise");if(i.status==="pending"){const g=c.options.pendingMinMs??o.options.defaultPendingMinMs;if(g){const m=o.getMatch(i.id);if(m&&!m._nonReactive.minPendingPromise){const f=hd();m._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),m._nonReactive.minPendingPromise=void 0},g)}}throw a(i,"loadPromise")}if(i.status==="notFound")return Na(i.error)||Ri(),CI(o,c,i.error);if(i.status==="redirected")throw ln(i.error)||Ri(),a(i,"loadPromise");if(i.status==="error")throw i.error;return p}),x_=R.memo(function(){const t=Fa(),o=R.useContext(pv);let a,n=!1,i;{const p=o?t.stores.matchStores.get(o):void 0;[a,n]=un(p,g=>[g?.routeId,g?.globalNotFound??!1]),i=un(t.stores.matchesId,g=>g[g.findIndex(m=>m===o)+1])}const l=a?t.routesById[a]:void 0,c=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(n)return l||Ri(),CI(t,l,void 0);if(!i)return null;const u=T.jsx(PI,{matchId:i});return a===Cl?T.jsx(R.Suspense,{fallback:c,children:u}):u});function S$(){const e=Fa(),t=R.useRef({router:e,mounted:!1}),[o,a]=R.useState(!1),n=un(e.stores.isLoading,m=>m),i=un(e.stores.hasPending,m=>m),l=TS(n),c=n||o||i,u=TS(c),p=n||i,g=TS(p);return e.startTransition=m=>{a(!0),R.startTransition(()=>{m(),a(!1)})},R.useEffect(()=>{const m=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return xi(e.latestLocation.publicHref)!==xi(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{m()}},[e,e.history]),Zc(()=>{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(f){console.error(f)}})()},[e]),Zc(()=>{l&&!n&&e.emit({type:"onLoad",...ad(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,n]),Zc(()=>{g&&!p&&e.emit({type:"onBeforeRouteMount",...ad(e.stores.location.get(),e.stores.resolvedLocation.get())})},[p,g,e]),Zc(()=>{if(u&&!c){const m=ad(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),SI(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),m.hrefChanged&&Bz(e)}},[c,u,e]),null}function T$(){const e=Fa(),t=e.routesById[Cl].options.pendingComponent??e.options.defaultPendingComponent,o=t?T.jsx(t,{}):null,a=T.jsxs(typeof document<"u"&&e.ssr?Hc:R.Suspense,{fallback:o,children:[T.jsx(S$,{}),T.jsx(w$,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:a}):a}function w$(){const e=Fa(),t=un(e.stores.firstId,n=>n),o=un(e.stores.loadedAt,n=>n),a=t?T.jsx(PI,{matchId:t}):null;return T.jsx(pv.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:T.jsx(T_,{getResetKey:()=>o,errorComponent:w_,onCatch:void 0,children:a})})}var _$=e=>({createMutableStore:Z1,createReadonlyStore:Z1,batch:SI}),C$=e=>new P$(e),P$=class extends xz{constructor(e){super(e,_$)}};function k$({router:e,children:t,...o}){aI(o)&&e.update({...e.options,...o,context:{...e.options.context,...o.context}});const a=T.jsx(bI.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:a}):a}function x$({router:e,...t}){return T.jsx(k$,{router:e,...t,children:T.jsx(T$,{})})}function gv(e){const t=Fa({warn:e?.router===void 0}),o=e?.router||t,a=R.useRef(void 0);return un(o.stores.__store,n=>{if(e?.select){if(e.structuralSharing??o.options.defaultStructuralSharing){const i=Cs(a.current,e.select(n));return a.current=i,i}return e.select(n)}return n})}var IS={exports:{}},MS={};var oR;function E$(){if(oR)return MS;oR=1;var e=Ls().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return MS.c=function(t){return e.H.useMemoCache(t)},MS}var aR;function R$(){return aR||(aR=1,IS.exports=E$()),IS.exports}var Ie=R$(),Ad=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(){}},A$=class extends Ad{#e;#t;#o;constructor(){super(),this.#o=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.#o)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#o=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"}},E_=new A$,D$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},O$=class{#e=D$;#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)}},Sl=new O$;function I$(e){setTimeout(e,0)}var M$=typeof window>"u"||"Deno"in globalThis;function ta(){}function L$(e,t){return typeof e=="function"?e(t):e}function TT(e){return typeof e=="number"&&e>=0&&e!==1/0}function kI(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Es(e,t){return typeof e=="function"?e(t):e}function _n(e,t){return typeof e=="function"?e(t):e}function nR(e,t){const{type:o="all",exact:a,fetchStatus:n,predicate:i,queryKey:l,stale:c}=e;if(l){if(a){if(t.queryHash!==R_(l,t.options))return!1}else if(!Tp(t.queryKey,l))return!1}if(o!=="all"){const u=t.isActive();if(o==="active"&&!u||o==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||n&&n!==t.state.fetchStatus||i&&!i(t))}function rR(e,t){const{exact:o,status:a,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(o){if(Rl(t.options.mutationKey)!==Rl(i))return!1}else if(!Tp(t.options.mutationKey,i))return!1}return!(a&&t.state.status!==a||n&&!n(t))}function R_(e,t){return(t?.queryKeyHashFn||Rl)(e)}function Rl(e){return JSON.stringify(e,(t,o)=>wT(o)?Object.keys(o).sort().reduce((a,n)=>(a[n]=o[n],a),{}):o)}function Tp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(o=>Tp(e[o],t[o])):!1}var N$=Object.prototype.hasOwnProperty;function xI(e,t,o=0){if(e===t)return e;if(o>500)return t;const a=iR(e)&&iR(t);if(!a&&!(wT(e)&&wT(t)))return t;const i=(a?e:Object.keys(e)).length,l=a?t:Object.keys(t),c=l.length,u=a?new Array(c):{};let p=0;for(let g=0;g<c;g++){const m=a?g:l[g],f=e[m],v=t[m];if(f===v){u[m]=f,(a?g<i:N$.call(e,m))&&p++;continue}if(f===null||v===null||typeof f!="object"||typeof v!="object"){u[m]=v;continue}const b=xI(f,v,o+1);u[m]=b,b===f&&p++}return i===c&&p===i?e:u}function hf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e)if(e[o]!==t[o])return!1;return!0}function iR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wT(e){if(!sR(e))return!1;const t=e.constructor;if(t===void 0)return!0;const o=t.prototype;return!(!sR(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sR(e){return Object.prototype.toString.call(e)==="[object Object]"}function F$(e){return new Promise(t=>{Sl.setTimeout(t,e)})}function _T(e,t,o){return typeof o.structuralSharing=="function"?o.structuralSharing(e,t):o.structuralSharing!==!1?xI(e,t):t}function Zhe(e){return e}function B$(e,t,o=0){const a=[...e,t];return o&&a.length>o?a.slice(1):a}function j$(e,t,o=0){const a=[t,...e];return o&&a.length>o?a.slice(0,-1):a}var A_=Symbol();function EI(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===A_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function D_(e,t){return typeof e=="function"?e(...t):!!e}function U$(e,t,o){let a=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),a||(a=!0,n.aborted?o():n.addEventListener("abort",o,{once:!0})),n)}),e}var wp=(()=>{let e=()=>M$;return{isServer(){return e()},setIsServer(t){e=t}}})();function CT(){let e,t;const o=new Promise((n,i)=>{e=n,t=i});o.status="pending",o.catch(()=>{});function a(n){Object.assign(o,n),delete o.resolve,delete o.reject}return o.resolve=n=>{a({status:"fulfilled",value:n}),e(n)},o.reject=n=>{a({status:"rejected",reason:n}),t(n)},o}function z$(e){let t;if(e.then(o=>(t=o,o),ta)?.catch(ta),t!==void 0)return{data:t}}function RI(e){return e}function $$(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function q$(e,t,o){const a=()=>{const n=e.promise?.then(t).catch(i=>o(i)?Promise.reject(new Error("redacted")):Promise.reject(i));return n?.catch(ta),n};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:a()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function V$(e){return e.state.isPaused}function H$(e){return e.state.status==="success"}function G$(e){return!0}function K$(e,t={}){const o=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??V$,a=e.getMutationCache().getAll().flatMap(u=>o(u)?[$$(u)]:[]),n=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??H$,i=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??G$,l=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??RI,c=e.getQueryCache().getAll().flatMap(u=>n(u)?[q$(u,l,i)]:[]);return{mutations:a,queries:c}}function W$(e,t,o){if(typeof t!="object"||t===null)return;const a=e.getMutationCache(),n=e.getQueryCache(),i=e.getDefaultOptions().hydrate?.deserializeData??RI,l=t.mutations||[],c=t.queries||[];l.forEach(({state:u,...p})=>{a.build(e,{...e.getDefaultOptions().hydrate?.mutations,...o?.defaultOptions?.mutations,...p},u)}),c.forEach(({queryKey:u,state:p,queryHash:g,meta:m,promise:f,dehydratedAt:v,queryType:b})=>{const S=f?z$(f):void 0,C=p.data===void 0?S?.data:p.data,w=C===void 0?C:i(C);let _=n.get(g);const E=_?.state.status==="pending",k=_?.state.fetchStatus==="fetching";if(_){const x=S&&v!==void 0&&v>_.state.dataUpdatedAt;if(p.dataUpdatedAt>_.state.dataUpdatedAt||x){const{fetchStatus:A,...D}=p;_.setState({...D,data:w,...p.status==="pending"&&w!==void 0&&{status:"success",...!k&&{fetchStatus:"idle"}}})}}else _=n.build(e,{...e.getDefaultOptions().hydrate?.queries,...o?.defaultOptions?.queries,queryKey:u,queryHash:g,meta:m,_type:b},{...p,data:w,fetchStatus:"idle",status:p.status==="pending"&&w!==void 0?"success":p.status});f&&!S&&!E&&!k&&(v===void 0||v>_.state.dataUpdatedAt)&&_.fetch(void 0,{initialPromise:Promise.resolve(f).then(i)}).catch(ta)})}var Y$=I$;function Z$(){let e=[],t=0,o=c=>{c()},a=c=>{c()},n=Y$;const i=c=>{t?e.push(c):n(()=>{o(c)})},l=()=>{const c=e;e=[],c.length&&n(()=>{a(()=>{c.forEach(u=>{o(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{i(()=>{c(...u)})},schedule:i,setNotifyFunction:c=>{o=c},setBatchNotifyFunction:c=>{a=c},setScheduler:c=>{n=c}}}var aa=Z$(),Q$=class extends Ad{#e=!0;#t;#o;constructor(){super(),this.#o=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),o=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#o)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#o=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(o=>{o(e)}))}isOnline(){return this.#e}},ff=new Q$;function J$(e){return Math.min(1e3*2**e,3e4)}function AI(e){return(e??"online")==="online"?ff.isOnline():!0}var PT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function DI(e){let t=!1,o=0,a;const n=CT(),i=()=>n.status!=="pending",l=S=>{if(!i()){const C=new PT(S);f(C),e.onCancel?.(C)}},c=()=>{t=!0},u=()=>{t=!1},p=()=>E_.isFocused()&&(e.networkMode==="always"||ff.isOnline())&&e.canRun(),g=()=>AI(e.networkMode)&&e.canRun(),m=S=>{i()||(a?.(),n.resolve(S))},f=S=>{i()||(a?.(),n.reject(S))},v=()=>new Promise(S=>{a=C=>{(i()||p())&&S(C)},e.onPause?.()}).then(()=>{a=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let S;const C=o===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(w){S=Promise.reject(w)}Promise.resolve(S).then(m).catch(w=>{if(i())return;const _=e.retry??(wp.isServer()?0:3),E=e.retryDelay??J$,k=typeof E=="function"?E(o,w):E,x=_===!0||typeof _=="number"&&o<_||typeof _=="function"&&_(o,w);if(t||!x){f(w);return}o++,e.onFail?.(o,w),F$(k).then(()=>p()?void 0:v()).then(()=>{t?f(w):b()})})};return{promise:n,status:()=>n.status,cancel:l,continue:()=>(a?.(),n),cancelRetry:c,continueRetry:u,canStart:g,start:()=>(g()?b():v().then(b),n)}}var OI=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),TT(this.gcTime)&&(this.#e=Sl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wp.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Sl.clearTimeout(this.#e),this.#e=void 0)}};function X$(e){return{onFetch:(t,o)=>{const a=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const p=async()=>{let g=!1;const m=b=>{U$(b,()=>t.signal,()=>g=!0)},f=EI(t.options,t.fetchOptions),v=async(b,S,C)=>{if(g)return Promise.reject(t.signal.reason);if(S==null&&b.pages.length)return Promise.resolve(b);const _=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return m(A),A})(),E=await f(_),{maxPages:k}=t.options,x=C?j$:B$;return{pages:x(b.pages,E,k),pageParams:x(b.pageParams,S,k)}};if(n&&i.length){const b=n==="backward",S=b?II:kT,C={pages:i,pageParams:l},w=S(a,C);c=await v(C,w,b)}else{const b=e??i.length;do{const S=u===0?l[0]??a.initialPageParam:kT(a,c);if(u>0&&S==null)break;c=await v(c,S),u++}while(u<b)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},o):t.fetchFn=p}}}function kT(e,{pages:t,pageParams:o}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,o[a],o):void 0}function II(e,{pages:t,pageParams:o}){return t.length>0?e.getPreviousPageParam?.(t[0],t,o[0],o):void 0}function Qhe(e,t){return t?kT(e,t)!=null:!1}function Jhe(e,t){return!t||!e.getPreviousPageParam?!1:II(e,t)!=null}var eq=class extends OI{#e;#t;#o;#a;#r;#n;#s;#i;constructor(e){super(),this.#i=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#a=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=cR(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.#n?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=cR(this.options);t.data!==void 0&&(this.setState(lR(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(e,t){const o=_T(this.state.data,e,this.options);return this.#l({data:o,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),o}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(ta).catch(ta):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=>_n(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===A_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Es(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:!kI(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.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.#n&&(this.#i||this.#d()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#d(){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.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(p=>p.options.queryFn);u&&this.setOptions(u.options)}const o=new AbortController,a=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#i=!0,o.signal)})},n=()=>{const u=EI(this.options,t),g=(()=>{const m={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(m),m})();return this.#i=!1,this.options.persister?this.options.persister(u,g,this):u(g)},l=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:n};return a(u),u})();(this.#e==="infinite"?X$(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#o=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#n=DI({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof PT&&u.revert&&this.setState({...this.#o,fetchStatus:"idle"}),o.abort()},onFail:(u,p)=>{this.#l({type:"failed",failureCount:u,error:p})},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 u=await this.#n.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#a.config.onSuccess?.(u,this),this.#a.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof PT){if(u.silent)return this.#n.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#l({type:"error",error:u}),this.#a.config.onError?.(u,this),this.#a.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#l(e){const t=o=>{switch(e.type){case"failed":return{...o,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...MI(o.data,this.options),fetchMeta:e.meta??null};case"success":const a={...o,...lR(e.data,e.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#o=e.manual?a:void 0,a;case"error":const n=e.error;return{...o,error:n,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...e.state}}};this.state=t(this.state),aa.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function MI(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AI(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,o=t!==void 0,a=o?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:o?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var LI=class extends Ad{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#s=CT(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#o=void 0;#a=void 0;#r;#n;#s;#i;#d;#l;#g;#u;#p;#c;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),dR(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#T(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,o=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 _n(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!hf(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&uR(this.#t,o,this.options,t)&&this.#m(),this.updateResult(),a&&(this.#t!==o||_n(this.options.enabled,this.#t)!==_n(t.enabled,this.#t)||Es(this.options.staleTime,this.#t)!==Es(t.staleTime,this.#t))&&this.#f();const n=this.#v();a&&(this.#t!==o||_n(this.options.enabled,this.#t)!==_n(t.enabled,this.#t)||n!==this.#c)&&this.#b(n)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),o=this.createResult(t,e);return oq(this,o)&&(this.#a=o,this.#n=this.options,this.#r=this.#t.state),o}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(o,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),o=this.#e.getQueryCache().build(this.#e,t);return o.fetch().then(()=>this.createResult(o,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#m(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ta)),t}#f(){this.#S();const e=Es(this.options.staleTime,this.#t);if(wp.isServer()||this.#a.isStale||!TT(e))return;const o=kI(this.#a.dataUpdatedAt,e)+1;this.#u=Sl.setTimeout(()=>{this.#a.isStale||this.updateResult()},o)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#T(),this.#c=e,!(wp.isServer()||_n(this.options.enabled,this.#t)===!1||!TT(this.#c)||this.#c===0)&&(this.#p=Sl.setInterval(()=>{(this.options.refetchIntervalInBackground||E_.isFocused())&&this.#m()},this.#c))}#y(){this.#f(),this.#b(this.#v())}#S(){this.#u!==void 0&&(Sl.clearTimeout(this.#u),this.#u=void 0)}#T(){this.#p!==void 0&&(Sl.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){const o=this.#t,a=this.options,n=this.#a,i=this.#r,l=this.#n,u=e!==o?e.state:this.#o,{state:p}=e;let g={...p},m=!1,f;if(t._optimisticResults){const O=this.hasListeners(),N=!O&&dR(e,t),$=O&&uR(e,o,t,a);(N||$)&&(g={...g,...MI(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:S}=g;f=g.data;let C=!1;if(t.placeholderData!==void 0&&f===void 0&&S==="pending"){let O;n?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(O=n.data,C=!0):O=typeof t.placeholderData=="function"?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,O!==void 0&&(S="success",f=_T(n?.data,O,t),m=!0)}if(t.select&&f!==void 0&&!C)if(n&&f===i?.data&&t.select===this.#d)f=this.#l;else try{this.#d=t.select,f=t.select(f),f=_T(n?.data,f,t),this.#l=f,this.#i=null}catch(O){this.#i=O}this.#i&&(v=this.#i,f=this.#l,b=Date.now(),S="error");const w=g.fetchStatus==="fetching",_=S==="pending",E=S==="error",k=_&&w,x=f!==void 0,D={status:S,fetchStatus:g.fetchStatus,isPending:_,isSuccess:S==="success",isError:E,isInitialLoading:k,isLoading:k,data:f,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>u.dataUpdateCount||g.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:E&&!x,isPaused:g.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&x,isStale:O_(e,t),refetch:this.refetch,promise:this.#s,isEnabled:_n(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const O=D.data!==void 0,N=D.status==="error"&&!O,$=j=>{N?j.reject(D.error):O&&j.resolve(D.data)},F=()=>{const j=this.#s=D.promise=CT();$(j)},z=this.#s;switch(z.status){case"pending":e.queryHash===o.queryHash&&$(z);break;case"fulfilled":(N||D.data!==z.value)&&F();break;case"rejected":(!N||D.error!==z.reason)&&F();break}}return D}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#n=this.options,this.#r.data!==void 0&&(this.#g=this.#t),hf(t,e))return;this.#a=t;const o=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,n=typeof a=="function"?a():a;if(n==="all"||!n&&!this.#h.size)return!0;const i=new Set(n??this.#h);return this.options.throwOnError&&i.add("error"),Object.keys(this.#a).some(l=>{const c=l;return this.#a[c]!==e[c]&&i.has(c)})};this.#_({listeners:o()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#_(e){aa.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function tq(e,t){return _n(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&_n(t.retryOnMount,e)===!1)}function dR(e,t){return tq(e,t)||e.state.data!==void 0&&xT(e,t,t.refetchOnMount)}function xT(e,t,o){if(_n(t.enabled,e)!==!1&&Es(t.staleTime,e)!=="static"){const a=typeof o=="function"?o(e):o;return a==="always"||a!==!1&&O_(e,t)}return!1}function uR(e,t,o,a){return(e!==t||_n(a.enabled,e)===!1)&&(!o.suspense||e.state.status!=="error")&&O_(e,o)}function O_(e,t){return _n(t.enabled,e)!==!1&&e.isStaleByTime(Es(t.staleTime,e))}function oq(e,t){return!hf(e.getCurrentResult(),t)}var aq=class extends OI{#e;#t;#o;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#o=e.mutationCache,this.#t=[],this.state=e.state||NI(),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.#o.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#o.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#o.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=DI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,o):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#o.canRun(this)});const a=this.state.status==="pending",n=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:n}),this.#o.config.onMutate&&await this.#o.config.onMutate(e,this,o);const l=await this.options.onMutate?.(e,o);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:n})}const i=await this.#a.start();return await this.#o.config.onSuccess?.(i,e,this.state.context,this,o),await this.options.onSuccess?.(i,e,this.state.context,o),await this.#o.config.onSettled?.(i,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(i,null,e,this.state.context,o),this.#r({type:"success",data:i}),i}catch(i){try{await this.#o.config.onError?.(i,e,this.state.context,this,o)}catch(l){Promise.reject(l)}try{await this.options.onError?.(i,e,this.state.context,o)}catch(l){Promise.reject(l)}try{await this.#o.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,o)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,o)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:i}),i}finally{this.#o.runNext(this)}}#r(e){const t=o=>{switch(e.type){case"failed":return{...o,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,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{...o,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:e.error,failureCount:o.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),aa.batch(()=>{this.#t.forEach(o=>{o.onMutationUpdate(e)}),this.#o.notify({mutation:this,type:"updated",action:e})})}};function NI(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var FI=class extends Ad{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#o=0}#e;#t;#o;build(e,t,o){const a=new aq({client:e,mutationCache:this,mutationId:++this.#o,options:e.defaultMutationOptions(t),state:o});return this.add(a),a}add(e){this.#e.add(e);const t=Eg(e);if(typeof t=="string"){const o=this.#t.get(t);o?o.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Eg(e);if(typeof t=="string"){const o=this.#t.get(t);if(o)if(o.length>1){const a=o.indexOf(e);a!==-1&&o.splice(a,1)}else o[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Eg(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(n=>n.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Eg(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){aa.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(o=>rR(t,o))}findAll(e={}){return this.getAll().filter(t=>rR(e,t))}notify(e){aa.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return aa.batch(()=>Promise.all(e.map(t=>t.continue().catch(ta))))}};function Eg(e){return e.options.scope?.id}var nq=class extends Ad{#e;#t=void 0;#o;#a;constructor(t,o){super(),this.#e=t,this.setOptions(o),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const o=this.options;this.options=this.#e.defaultMutationOptions(t),hf(this.options,o)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#o,observer:this}),o?.mutationKey&&this.options.mutationKey&&Rl(o.mutationKey)!==Rl(this.options.mutationKey)?this.reset():this.#o?.state.status==="pending"&&this.#o.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#o?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#o?.removeObserver(this),this.#o=void 0,this.#r(),this.#n()}mutate(t,o){return this.#a=o,this.#o?.removeObserver(this),this.#o=this.#e.getMutationCache().build(this.#e,this.options),this.#o.addObserver(this),this.#o.execute(t)}#r(){const t=this.#o?.state??NI();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}}#n(t){aa.batch(()=>{if(this.#a&&this.hasListeners()){const o=this.#t.variables,a=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,o,a,n)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(t.data,null,o,a,n)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,o,a,n)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(void 0,t.error,o,a,n)}catch(i){Promise.reject(i)}}}this.listeners.forEach(o=>{o(this.#t)})})}},BI=class extends Ad{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,o){const a=t.queryKey,n=t.queryHash??R_(a,t);let i=this.get(n);return i||(i=new eq({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(t),state:o,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){aa.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(o=>nR(t,o))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(o=>nR(e,o)):t}notify(e){aa.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){aa.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){aa.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},rq=class{#e;#t;#o;#a;#r;#n;#s;#i;constructor(e={}){this.#e=e.queryCache||new BI,this.#t=e.mutationCache||new FI,this.#o=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#s=E_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=ff.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=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),o=this.#e.build(this,t),a=o.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&o.isStaleByTime(Es(t.staleTime,o))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:o})=>{const a=o.data;return[t,a]})}setQueryData(e,t,o){const a=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(a.queryHash)?.state.data,l=L$(t,i);if(l!==void 0)return this.#e.build(this,a).setData(l,{...o,manual:!0})}setQueriesData(e,t,o){return aa.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,o)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;aa.batch(()=>{t.findAll(e).forEach(o=>{t.remove(o)})})}resetQueries(e,t){const o=this.#e;return aa.batch(()=>(o.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const o={revert:!0,...t},a=aa.batch(()=>this.#e.findAll(e).map(n=>n.cancel(o)));return Promise.all(a).then(ta).catch(ta)}invalidateQueries(e,t={}){return aa.batch(()=>(this.#e.findAll(e).forEach(o=>{o.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const o={...t,cancelRefetch:t.cancelRefetch??!0},a=aa.batch(()=>this.#e.findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,o);return o.throwOnError||(i=i.catch(ta)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(ta)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const o=this.#e.build(this,t);return o.isStaleByTime(Es(t.staleTime,o))?o.fetch(t):Promise.resolve(o.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ta).catch(ta)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ta).catch(ta)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ff.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#a.set(Rl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],o={};return t.forEach(a=>{Tp(e,a.queryKey)&&Object.assign(o,a.defaultOptions)}),o}setMutationDefaults(e,t){this.#r.set(Rl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],o={};return t.forEach(a=>{Tp(e,a.mutationKey)&&Object.assign(o,a.defaultOptions)}),o}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=R_(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===A_&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},jI=R.createContext(void 0),hv=e=>{const t=R.useContext(jI);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},iq=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(jI.Provider,{value:e,children:t})),UI=R.createContext(!1),sq=()=>R.useContext(UI);UI.Provider;function zI(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $I=R.createContext(zI()),lq=()=>R.useContext($I),efe=({children:e})=>{const[t]=R.useState(()=>zI());return T.jsx($I.Provider,{value:t,children:typeof e=="function"?e(t):e})},cq=(e,t,o)=>{const a=o?.state.error&&typeof e.throwOnError=="function"?D_(e.throwOnError,[o.state.error,o]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},dq=e=>{R.useEffect(()=>{e.clearReset()},[e])},uq=({result:e,errorResetBoundary:t,throwOnError:o,query:a,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(n&&e.data===void 0||D_(o,[e.error,a])),pq=(e,t)=>t.state.data===void 0,mq=e=>{if(e.suspense){const o=n=>n==="static"?n:Math.max(n??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...n)=>o(a(...n)):o(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},gq=(e,t)=>e.isLoading&&e.isFetching&&!t,hq=(e,t)=>e?.suspense&&t.isPending,pR=(e,t,o)=>t.fetchOptimistic(e).catch(()=>{o.clearReset()});function qI(e,t,o){const a=sq(),n=lq(),i=hv(o),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=i.getQueryCache().get(l.queryHash);l._optimisticResults=a?"isRestoring":"optimistic",mq(l),cq(l,n,c),dq(n);const u=!i.getQueryCache().get(l.queryHash),[p]=R.useState(()=>new t(i,l)),g=p.getOptimisticResult(l),m=!a&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(f=>{const v=m?p.subscribe(aa.batchCalls(f)):ta;return p.updateResult(),v},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),R.useEffect(()=>{p.setOptions(l)},[l,p]),hq(l,g))throw pR(l,p,n);if(uq({result:g,errorResetBoundary:n,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw g.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,g),l.experimental_prefetchInRender&&!wp.isServer()&&gq(g,a)&&(u?pR(l,p,n):c?.promise)?.catch(ta).finally(()=>{p.updateResult()}),l.notifyOnChangeProps?g:p.trackResult(g)}function Dd(e,t){return qI(e,LI,t)}function Nl(e,t){return qI({...e,enabled:!0,suspense:!0,throwOnError:pq,placeholderData:void 0},LI,t)}function lp(e,t){const o=hv(t),[a]=R.useState(()=>new nq(o,e));R.useEffect(()=>{a.setOptions(e)},[a,e]);const n=R.useSyncExternalStore(R.useCallback(l=>a.subscribe(aa.batchCalls(l)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=R.useCallback((l,c)=>{a.mutate(l,c).catch(ta)},[a]);if(n.error&&D_(a.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}const fq=Object.freeze({status:"aborted"});function be(e,t,o){function a(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const p=l.prototype,g=Object.keys(p);for(let m=0;m<g.length;m++){const f=g[m];f in c||(c[f]=p[f].bind(c))}}const n=o?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function l(c){var u;const p=o?.Parent?new i:this;a(p,c),(u=p._zod).deferred??(u.deferred=[]);for(const g of p._zod.deferred)g();return p}return Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>o?.Parent&&c instanceof o.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class nd extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class VI extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const HI={};function Os(e){return HI}function GI(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,n])=>t.indexOf(+a)===-1).map(([a,n])=>n)}function ET(e,t){return typeof t=="bigint"?t.toString():t}function fv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function zp(e){return e==null}function I_(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}function vq(e,t){const o=(e.toString().split(".")[1]||"").length,a=t.toString();let n=(a.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(a)){const u=a.match(/\d?e-(\d?)/);u?.[1]&&(n=Number.parseInt(u[1]))}const i=o>n?o:n,l=Number.parseInt(e.toFixed(i).replace(".","")),c=Number.parseInt(t.toFixed(i).replace(".",""));return l%c/10**i}const mR=Symbol("evaluating");function Dt(e,t,o){let a;Object.defineProperty(e,t,{get(){if(a!==mR)return a===void 0&&(a=mR,a=o()),a},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Fl(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function Bs(...e){const t={};for(const o of e){const a=Object.getOwnPropertyDescriptors(o);Object.assign(t,a)}return Object.defineProperties({},t)}function gR(e){return JSON.stringify(e)}function bq(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const KI="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _p(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const yq=fv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function fd(e){if(_p(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const o=t.prototype;return!(_p(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function WI(e){return fd(e)?{...e}:Array.isArray(e)?[...e]:e}const Sq=new Set(["string","number","symbol"]);function vd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Di(e,t,o){const a=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(a._zod.parent=e),a}function qe(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 Tq(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const wq={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 _q(e,t){const o=e._zod.def,a=o.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Bs(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in o.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=o.shape[c])}return Fl(this,"shape",l),l},checks:[]});return Di(e,i)}function Cq(e,t){const o=e._zod.def,a=o.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Bs(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in o.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return Fl(this,"shape",l),l},checks:[]});return Di(e,i)}function Pq(e,t){if(!fd(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=Bs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Fl(this,"shape",i),i}});return Di(e,n)}function kq(e,t){if(!fd(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o=Bs(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Fl(this,"shape",a),a}});return Di(e,o)}function xq(e,t){const o=Bs(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Fl(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return Di(e,o)}function Eq(e,t,o){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Bs(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(o)for(const p in o){if(!(p in c))throw new Error(`Unrecognized key: "${p}"`);o[p]&&(u[p]=e?new e({type:"optional",innerType:c[p]}):c[p])}else for(const p in c)u[p]=e?new e({type:"optional",innerType:c[p]}):c[p];return Fl(this,"shape",u),u},checks:[]});return Di(t,l)}function Rq(e,t,o){const a=Bs(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(o)for(const l in o){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);o[l]&&(i[l]=new e({type:"nonoptional",innerType:n[l]}))}else for(const l in n)i[l]=new e({type:"nonoptional",innerType:n[l]});return Fl(this,"shape",i),i}});return Di(t,a)}function Qc(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Tl(e,t){return t.map(o=>{var a;return(a=o).path??(a.path=[]),o.path.unshift(e),o})}function Rg(e){return typeof e=="string"?e:e?.message}function Is(e,t,o){const a={...e,path:e.path??[]};if(!e.message){const n=Rg(e.inst?._zod.def?.error?.(e))??Rg(t?.error?.(e))??Rg(o.customError?.(e))??Rg(o.localeError?.(e))??"Invalid input";a.message=n}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function YI(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function M_(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Cp(...e){const[t,o,a]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:a}:{...t}}const ZI=(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,ET,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},L_=be("$ZodError",ZI),vv=be("$ZodError",ZI,{Parent:Error});function Aq(e,t=o=>o.message){const o={},a=[];for(const n of e.issues)n.path.length>0?(o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(t(n))):a.push(t(n));return{formErrors:a,fieldErrors:o}}function Dq(e,t=o=>o.message){const o={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>a({issues:l}));else if(i.code==="invalid_key")a({issues:i.issues});else if(i.code==="invalid_element")a({issues:i.issues});else if(i.path.length===0)o._errors.push(t(i));else{let l=o,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return a(e),o}const bv=e=>(t,o,a,n)=>{const i=a?Object.assign(a,{async:!1}):{async:!1},l=t._zod.run({value:o,issues:[]},i);if(l instanceof Promise)throw new nd;if(l.issues.length){const c=new(n?.Err??e)(l.issues.map(u=>Is(u,i,Os())));throw KI(c,n?.callee),c}return l.value},Oq=bv(vv),yv=e=>async(t,o,a,n)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:o,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(n?.Err??e)(l.issues.map(u=>Is(u,i,Os())));throw KI(c,n?.callee),c}return l.value},Iq=yv(vv),Sv=e=>(t,o,a)=>{const n=a?{...a,async:!1}:{async:!1},i=t._zod.run({value:o,issues:[]},n);if(i instanceof Promise)throw new nd;return i.issues.length?{success:!1,error:new(e??L_)(i.issues.map(l=>Is(l,n,Os())))}:{success:!0,data:i.value}},Mq=Sv(vv),Tv=e=>async(t,o,a)=>{const n=a?Object.assign(a,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Is(l,n,Os())))}:{success:!0,data:i.value}},Lq=Tv(vv),Nq=e=>(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return bv(e)(t,o,n)},Fq=e=>(t,o,a)=>bv(e)(t,o,a),Bq=e=>async(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return yv(e)(t,o,n)},jq=e=>async(t,o,a)=>yv(e)(t,o,a),Uq=e=>(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Sv(e)(t,o,n)},zq=e=>(t,o,a)=>Sv(e)(t,o,a),$q=e=>async(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Tv(e)(t,o,n)},qq=e=>async(t,o,a)=>Tv(e)(t,o,a),Vq=/^[cC][^\s-]{8,}$/,Hq=/^[0-9a-z]+$/,Gq=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Kq=/^[0-9a-vA-V]{20}$/,Wq=/^[A-Za-z0-9]{27}$/,Yq=/^[a-zA-Z0-9_-]{21}$/,Zq=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Qq=/^([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})$/,hR=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)$/,Jq=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xq="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function e8(){return new RegExp(Xq,"u")}const t8=/^(?:(?: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])$/,o8=/^(([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}|:))$/,a8=/^((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])$/,n8=/^(([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])$/,r8=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QI=/^[A-Za-z0-9_-]*$/,i8=/^\+[1-9]\d{6,14}$/,JI="(?:(?:\\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])))",s8=new RegExp(`^${JI}$`);function XI(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 l8(e){return new RegExp(`^${XI(e)}$`)}function c8(e){const t=XI({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${o.join("|")})`;return new RegExp(`^${JI}T(?:${a})$`)}const d8=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},u8=/^-?\d+$/,eM=/^-?\d+(?:\.\d+)?$/,p8=/^(?:true|false)$/i,m8=/^null$/i,g8=/^undefined$/i,h8=/^[^A-Z]*$/,f8=/^[^a-z]*$/,Pa=be("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),tM={number:"number",bigint:"bigint",object:"date"},oM=be("$ZodCheckLessThan",(e,t)=>{Pa.init(e,t);const o=tM[typeof t.value];e._zod.onattach.push(a=>{const n=a._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:o,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),aM=be("$ZodCheckGreaterThan",(e,t)=>{Pa.init(e,t);const o=tM[typeof t.value];e._zod.onattach.push(a=>{const n=a._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:o,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),v8=be("$ZodCheckMultipleOf",(e,t)=>{Pa.init(e,t),e._zod.onattach.push(o=>{var a;(a=o._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=o=>{if(typeof o.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?o.value%t.value===BigInt(0):vq(o.value,t.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:t.value,input:o.value,inst:e,continue:!t.abort})}}),b8=be("$ZodCheckNumberFormat",(e,t)=>{Pa.init(e,t),t.format=t.format||"float64";const o=t.format?.includes("int"),a=o?"int":"number",[n,i]=wq[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,o&&(c.pattern=u8)}),e._zod.check=l=>{const c=l.value;if(o){if(!Number.isInteger(c)){l.issues.push({expected:a,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:a,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:a,inclusive:!0,continue:!t.abort});return}}c<n&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),y8=be("$ZodCheckMaxSize",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.size!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const n=a.value;n.size<=t.maximum||a.issues.push({origin:YI(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),S8=be("$ZodCheckMinSize",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.size!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const n=a.value;n.size>=t.minimum||a.issues.push({origin:YI(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),T8=be("$ZodCheckMaxLength",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.length!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const n=a.value;if(n.length<=t.maximum)return;const l=M_(n);a.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),w8=be("$ZodCheckMinLength",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.length!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const n=a.value;if(n.length>=t.minimum)return;const l=M_(n);a.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),_8=be("$ZodCheckLengthEquals",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.length!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=a=>{const n=a.value,i=n.length;if(i===t.length)return;const l=M_(n),c=i>t.length;a.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),wv=be("$ZodCheckStringFormat",(e,t)=>{var o,a;Pa.init(e,t),e._zod.onattach.push(n=>{const i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),C8=be("$ZodCheckRegex",(e,t)=>{wv.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),P8=be("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=h8),wv.init(e,t)}),k8=be("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=f8),wv.init(e,t)}),x8=be("$ZodCheckIncludes",(e,t)=>{Pa.init(e,t);const o=vd(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=a,e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(a)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),E8=be("$ZodCheckStartsWith",(e,t)=>{Pa.init(e,t);const o=new RegExp(`^${vd(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(a=>{const n=a._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),R8=be("$ZodCheckEndsWith",(e,t)=>{Pa.init(e,t);const o=new RegExp(`.*${vd(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(a=>{const n=a._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),A8=be("$ZodCheckMimeType",(e,t)=>{Pa.init(e,t);const o=new Set(t.mime);e._zod.onattach.push(a=>{a._zod.bag.mime=t.mime}),e._zod.check=a=>{o.has(a.value.type)||a.issues.push({code:"invalid_value",values:t.mime,input:a.value.type,inst:e,continue:!t.abort})}}),D8=be("$ZodCheckOverwrite",(e,t)=>{Pa.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class O8{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 a=t.split(`
10
+ `).replace(H6,"")}function BE(r,s){return s=FE(s),FE(r)===s}function Jt(r,s,d,h,y,P){switch(d){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Zl(r,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Zl(r,""+h);break;case"className":mm(r,"class",h);break;case"tabIndex":mm(r,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":mm(r,d,h);break;case"style":BP(r,h,P);break;case"data":if(s!=="object"){mm(r,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||d!=="href")){r.removeAttribute(d);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(d);break}h=hm(""+h),r.setAttribute(d,h);break;case"action":case"formAction":if(typeof h=="function"){r.setAttribute(d,"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 P=="function"&&(d==="formAction"?(s!=="input"&&Jt(r,s,"name",y.name,y,null),Jt(r,s,"formEncType",y.formEncType,y,null),Jt(r,s,"formMethod",y.formMethod,y,null),Jt(r,s,"formTarget",y.formTarget,y,null)):(Jt(r,s,"encType",y.encType,y,null),Jt(r,s,"method",y.method,y,null),Jt(r,s,"target",y.target,y,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){r.removeAttribute(d);break}h=hm(""+h),r.setAttribute(d,h);break;case"onClick":h!=null&&(r.onclick=ei);break;case"onScroll":h!=null&&_t("scroll",r);break;case"onScrollEnd":h!=null&&_t("scrollend",r);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(a(61));if(d=h.__html,d!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=d}}break;case"multiple":r.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":r.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){r.removeAttribute("xlink:href");break}d=hm(""+h),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(d,""+h):r.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(d,""):r.removeAttribute(d);break;case"capture":case"download":h===!0?r.setAttribute(d,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?r.setAttribute(d,h):r.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?r.setAttribute(d,h):r.removeAttribute(d);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?r.removeAttribute(d):r.setAttribute(d,h);break;case"popover":_t("beforetoggle",r),_t("toggle",r),pm(r,"popover",h);break;case"xlinkActuate":Xr(r,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Xr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Xr(r,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Xr(r,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Xr(r,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Xr(r,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Xr(r,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Xr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Xr(r,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":pm(r,"is",h);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=y5.get(d)||d,pm(r,d,h))}}function Qy(r,s,d,h,y,P){switch(d){case"style":BP(r,h,P);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(a(61));if(d=h.__html,d!=null){if(y.children!=null)throw Error(a(60));r.innerHTML=d}}break;case"children":typeof h=="string"?Zl(r,h):(typeof h=="number"||typeof h=="bigint")&&Zl(r,""+h);break;case"onScroll":h!=null&&_t("scroll",r);break;case"onScrollEnd":h!=null&&_t("scrollend",r);break;case"onClick":h!=null&&(r.onclick=ei);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!RP.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(y=d.endsWith("Capture"),s=d.slice(2,y?d.length-7:void 0),P=r[Ya]||null,P=P!=null?P[d]:null,typeof P=="function"&&r.removeEventListener(s,P,y),typeof h=="function")){typeof P!="function"&&P!==null&&(d in r?r[d]=null:r.hasAttribute(d)&&r.removeAttribute(d)),r.addEventListener(s,h,y);break e}d in r?r[d]=h:h===!0?r.setAttribute(d,""):pm(r,d,h)}}}function ba(r,s,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_t("error",r),_t("load",r);var h=!1,y=!1,P;for(P in d)if(d.hasOwnProperty(P)){var I=d[P];if(I!=null)switch(P){case"src":h=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Jt(r,s,P,I,d,null)}}y&&Jt(r,s,"srcSet",d.srcSet,d,null),h&&Jt(r,s,"src",d.src,d,null);return;case"input":_t("invalid",r);var B=P=I=y=null,ee=null,ue=null;for(h in d)if(d.hasOwnProperty(h)){var ye=d[h];if(ye!=null)switch(h){case"name":y=ye;break;case"type":I=ye;break;case"checked":ee=ye;break;case"defaultChecked":ue=ye;break;case"value":P=ye;break;case"defaultValue":B=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(a(137,s));break;default:Jt(r,s,h,ye,d,null)}}MP(r,P,B,ee,ue,I,y,!1);return;case"select":_t("invalid",r),h=I=P=null;for(y in d)if(d.hasOwnProperty(y)&&(B=d[y],B!=null))switch(y){case"value":P=B;break;case"defaultValue":I=B;break;case"multiple":h=B;default:Jt(r,s,y,B,d,null)}s=P,d=I,r.multiple=!!h,s!=null?Yl(r,!!h,s,!1):d!=null&&Yl(r,!!h,d,!0);return;case"textarea":_t("invalid",r),P=y=h=null;for(I in d)if(d.hasOwnProperty(I)&&(B=d[I],B!=null))switch(I){case"value":h=B;break;case"defaultValue":y=B;break;case"children":P=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(a(91));break;default:Jt(r,s,I,B,d,null)}NP(r,h,y,P);return;case"option":for(ee in d)d.hasOwnProperty(ee)&&(h=d[ee],h!=null)&&(ee==="selected"?r.selected=h&&typeof h!="function"&&typeof h!="symbol":Jt(r,s,ee,h,d,null));return;case"dialog":_t("beforetoggle",r),_t("toggle",r),_t("cancel",r),_t("close",r);break;case"iframe":case"object":_t("load",r);break;case"video":case"audio":for(h=0;h<fu.length;h++)_t(fu[h],r);break;case"image":_t("error",r),_t("load",r);break;case"details":_t("toggle",r);break;case"embed":case"source":case"link":_t("error",r),_t("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in d)if(d.hasOwnProperty(ue)&&(h=d[ue],h!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,s));default:Jt(r,s,ue,h,d,null)}return;default:if(ub(s)){for(ye in d)d.hasOwnProperty(ye)&&(h=d[ye],h!==void 0&&Qy(r,s,ye,h,d,void 0));return}}for(B in d)d.hasOwnProperty(B)&&(h=d[B],h!=null&&Jt(r,s,B,h,d,null))}function G6(r,s,d,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,P=null,I=null,B=null,ee=null,ue=null,ye=null;for(fe in d){var we=d[fe];if(d.hasOwnProperty(fe)&&we!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":ee=we;default:h.hasOwnProperty(fe)||Jt(r,s,fe,null,h,we)}}for(var me in h){var fe=h[me];if(we=d[me],h.hasOwnProperty(me)&&(fe!=null||we!=null))switch(me){case"type":P=fe;break;case"name":y=fe;break;case"checked":ue=fe;break;case"defaultChecked":ye=fe;break;case"value":I=fe;break;case"defaultValue":B=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(a(137,s));break;default:fe!==we&&Jt(r,s,me,fe,h,we)}}cb(r,I,B,ee,ue,ye,P,y);return;case"select":fe=I=B=me=null;for(P in d)if(ee=d[P],d.hasOwnProperty(P)&&ee!=null)switch(P){case"value":break;case"multiple":fe=ee;default:h.hasOwnProperty(P)||Jt(r,s,P,null,h,ee)}for(y in h)if(P=h[y],ee=d[y],h.hasOwnProperty(y)&&(P!=null||ee!=null))switch(y){case"value":me=P;break;case"defaultValue":B=P;break;case"multiple":I=P;default:P!==ee&&Jt(r,s,y,P,h,ee)}s=B,d=I,h=fe,me!=null?Yl(r,!!d,me,!1):!!h!=!!d&&(s!=null?Yl(r,!!d,s,!0):Yl(r,!!d,d?[]:"",!1));return;case"textarea":fe=me=null;for(B in d)if(y=d[B],d.hasOwnProperty(B)&&y!=null&&!h.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:Jt(r,s,B,null,h,y)}for(I in h)if(y=h[I],P=d[I],h.hasOwnProperty(I)&&(y!=null||P!=null))switch(I){case"value":me=y;break;case"defaultValue":fe=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(a(91));break;default:y!==P&&Jt(r,s,I,y,h,P)}LP(r,me,fe);return;case"option":for(var Ye in d)me=d[Ye],d.hasOwnProperty(Ye)&&me!=null&&!h.hasOwnProperty(Ye)&&(Ye==="selected"?r.selected=!1:Jt(r,s,Ye,null,h,me));for(ee in h)me=h[ee],fe=d[ee],h.hasOwnProperty(ee)&&me!==fe&&(me!=null||fe!=null)&&(ee==="selected"?r.selected=me&&typeof me!="function"&&typeof me!="symbol":Jt(r,s,ee,me,h,fe));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 st in d)me=d[st],d.hasOwnProperty(st)&&me!=null&&!h.hasOwnProperty(st)&&Jt(r,s,st,null,h,me);for(ue in h)if(me=h[ue],fe=d[ue],h.hasOwnProperty(ue)&&me!==fe&&(me!=null||fe!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(a(137,s));break;default:Jt(r,s,ue,me,h,fe)}return;default:if(ub(s)){for(var Xt in d)me=d[Xt],d.hasOwnProperty(Xt)&&me!==void 0&&!h.hasOwnProperty(Xt)&&Qy(r,s,Xt,void 0,h,me);for(ye in h)me=h[ye],fe=d[ye],!h.hasOwnProperty(ye)||me===fe||me===void 0&&fe===void 0||Qy(r,s,ye,me,h,fe);return}}for(var ce in d)me=d[ce],d.hasOwnProperty(ce)&&me!=null&&!h.hasOwnProperty(ce)&&Jt(r,s,ce,null,h,me);for(we in h)me=h[we],fe=d[we],!h.hasOwnProperty(we)||me===fe||me==null&&fe==null||Jt(r,s,we,me,h,fe)}function jE(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function K6(){if(typeof performance.getEntriesByType=="function"){for(var r=0,s=0,d=performance.getEntriesByType("resource"),h=0;h<d.length;h++){var y=d[h],P=y.transferSize,I=y.initiatorType,B=y.duration;if(P&&B&&jE(I)){for(I=0,B=y.responseEnd,h+=1;h<d.length;h++){var ee=d[h],ue=ee.startTime;if(ue>B)break;var ye=ee.transferSize,we=ee.initiatorType;ye&&jE(we)&&(ee=ee.responseEnd,I+=ye*(ee<B?1:(B-ue)/(ee-ue)))}if(--h,s+=8*(P+I)/(y.duration/1e3),r++,10<r)break}}if(0<r)return s/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Jy=null,Xy=null;function dg(r){return r.nodeType===9?r:r.ownerDocument}function UE(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zE(r,s){if(r===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&s==="foreignObject"?0:r}function eS(r,s){return r==="textarea"||r==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var tS=null;function W6(){var r=window.event;return r&&r.type==="popstate"?r===tS?!1:(tS=r,!0):(tS=null,!1)}var $E=typeof setTimeout=="function"?setTimeout:void 0,Y6=typeof clearTimeout=="function"?clearTimeout:void 0,qE=typeof Promise=="function"?Promise:void 0,Z6=typeof queueMicrotask=="function"?queueMicrotask:typeof qE<"u"?function(r){return qE.resolve(null).then(r).catch(Q6)}:$E;function Q6(r){setTimeout(function(){throw r})}function os(r){return r==="head"}function VE(r,s){var d=s,h=0;do{var y=d.nextSibling;if(r.removeChild(d),y&&y.nodeType===8)if(d=y.data,d==="/$"||d==="/&"){if(h===0){r.removeChild(y),xc(s);return}h--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")h++;else if(d==="html")bu(r.ownerDocument.documentElement);else if(d==="head"){d=r.ownerDocument.head,bu(d);for(var P=d.firstChild;P;){var I=P.nextSibling,B=P.nodeName;P[Nd]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&P.rel.toLowerCase()==="stylesheet"||d.removeChild(P),P=I}}else d==="body"&&bu(r.ownerDocument.body);d=y}while(d);xc(s)}function HE(r,s){var d=r;r=0;do{var h=d.nextSibling;if(d.nodeType===1?s?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(s?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),h&&h.nodeType===8)if(d=h.data,d==="/$"){if(r===0)break;r--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||r++;d=h}while(d)}function oS(r){var s=r.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var d=s;switch(s=s.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":oS(d),sb(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}r.removeChild(d)}}function J6(r,s,d,h){for(;r.nodeType===1;){var y=d;if(r.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(h){if(!r[Nd])switch(s){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(P=r.getAttribute("rel"),P==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(P!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(P=r.getAttribute("src"),(P!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&P&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(s==="input"&&r.type==="hidden"){var P=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===P)return r}else return r;if(r=$n(r.nextSibling),r===null)break}return null}function X6(r,s,d){if(s==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!d||(r=$n(r.nextSibling),r===null))return null;return r}function GE(r,s){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!s||(r=$n(r.nextSibling),r===null))return null;return r}function aS(r){return r.data==="$?"||r.data==="$~"}function nS(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function eU(r,s){var d=r.ownerDocument;if(r.data==="$~")r._reactRetry=s;else if(r.data!=="$?"||d.readyState!=="loading")s();else{var h=function(){s(),d.removeEventListener("DOMContentLoaded",h)};d.addEventListener("DOMContentLoaded",h),r._reactRetry=h}}function $n(r){for(;r!=null;r=r.nextSibling){var s=r.nodeType;if(s===1||s===3)break;if(s===8){if(s=r.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return r}var rS=null;function KE(r){r=r.nextSibling;for(var s=0;r;){if(r.nodeType===8){var d=r.data;if(d==="/$"||d==="/&"){if(s===0)return $n(r.nextSibling);s--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||s++}r=r.nextSibling}return null}function WE(r){r=r.previousSibling;for(var s=0;r;){if(r.nodeType===8){var d=r.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(s===0)return r;s--}else d!=="/$"&&d!=="/&"||s++}r=r.previousSibling}return null}function YE(r,s,d){switch(s=dg(d),r){case"html":if(r=s.documentElement,!r)throw Error(a(452));return r;case"head":if(r=s.head,!r)throw Error(a(453));return r;case"body":if(r=s.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function bu(r){for(var s=r.attributes;s.length;)r.removeAttributeNode(s[0]);sb(r)}var qn=new Map,ZE=new Set;function ug(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var fi=Z.d;Z.d={f:tU,r:oU,D:aU,C:nU,L:rU,m:iU,X:lU,S:sU,M:cU};function tU(){var r=fi.f(),s=og();return r||s}function oU(r){var s=Gl(r);s!==null&&s.tag===5&&s.type==="form"?mx(s):fi.r(r)}var Cc=typeof document>"u"?null:document;function QE(r,s,d){var h=Cc;if(h&&typeof s=="string"&&s){var y=Ln(s);y='link[rel="'+r+'"][href="'+y+'"]',typeof d=="string"&&(y+='[crossorigin="'+d+'"]'),ZE.has(y)||(ZE.add(y),r={rel:r,crossOrigin:d,href:s},h.querySelector(y)===null&&(s=h.createElement("link"),ba(s,"link",r),la(s),h.head.appendChild(s)))}}function aU(r){fi.D(r),QE("dns-prefetch",r,null)}function nU(r,s){fi.C(r,s),QE("preconnect",r,s)}function rU(r,s,d){fi.L(r,s,d);var h=Cc;if(h&&r&&s){var y='link[rel="preload"][as="'+Ln(s)+'"]';s==="image"&&d&&d.imageSrcSet?(y+='[imagesrcset="'+Ln(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(y+='[imagesizes="'+Ln(d.imageSizes)+'"]')):y+='[href="'+Ln(r)+'"]';var P=y;switch(s){case"style":P=Pc(r);break;case"script":P=kc(r)}qn.has(P)||(r=m({rel:"preload",href:s==="image"&&d&&d.imageSrcSet?void 0:r,as:s},d),qn.set(P,r),h.querySelector(y)!==null||s==="style"&&h.querySelector(yu(P))||s==="script"&&h.querySelector(Su(P))||(s=h.createElement("link"),ba(s,"link",r),la(s),h.head.appendChild(s)))}}function iU(r,s){fi.m(r,s);var d=Cc;if(d&&r){var h=s&&typeof s.as=="string"?s.as:"script",y='link[rel="modulepreload"][as="'+Ln(h)+'"][href="'+Ln(r)+'"]',P=y;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":P=kc(r)}if(!qn.has(P)&&(r=m({rel:"modulepreload",href:r},s),qn.set(P,r),d.querySelector(y)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(Su(P)))return}h=d.createElement("link"),ba(h,"link",r),la(h),d.head.appendChild(h)}}}function sU(r,s,d){fi.S(r,s,d);var h=Cc;if(h&&r){var y=Kl(h).hoistableStyles,P=Pc(r);s=s||"default";var I=y.get(P);if(!I){var B={loading:0,preload:null};if(I=h.querySelector(yu(P)))B.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":s},d),(d=qn.get(P))&&iS(r,d);var ee=I=h.createElement("link");la(ee),ba(ee,"link",r),ee._p=new Promise(function(ue,ye){ee.onload=ue,ee.onerror=ye}),ee.addEventListener("load",function(){B.loading|=1}),ee.addEventListener("error",function(){B.loading|=2}),B.loading|=4,pg(I,s,h)}I={type:"stylesheet",instance:I,count:1,state:B},y.set(P,I)}}}function lU(r,s){fi.X(r,s);var d=Cc;if(d&&r){var h=Kl(d).hoistableScripts,y=kc(r),P=h.get(y);P||(P=d.querySelector(Su(y)),P||(r=m({src:r,async:!0},s),(s=qn.get(y))&&sS(r,s),P=d.createElement("script"),la(P),ba(P,"link",r),d.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},h.set(y,P))}}function cU(r,s){fi.M(r,s);var d=Cc;if(d&&r){var h=Kl(d).hoistableScripts,y=kc(r),P=h.get(y);P||(P=d.querySelector(Su(y)),P||(r=m({src:r,async:!0,type:"module"},s),(s=qn.get(y))&&sS(r,s),P=d.createElement("script"),la(P),ba(P,"link",r),d.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},h.set(y,P))}}function JE(r,s,d,h){var y=(y=J.current)?ug(y):null;if(!y)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(s=Pc(d.href),d=Kl(y).hoistableStyles,h=d.get(s),h||(h={type:"style",instance:null,count:0,state:null},d.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){r=Pc(d.href);var P=Kl(y).hoistableStyles,I=P.get(r);if(I||(y=y.ownerDocument||y,I={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},P.set(r,I),(P=y.querySelector(yu(r)))&&!P._p&&(I.instance=P,I.state.loading=5),qn.has(r)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},qn.set(r,d),P||dU(y,r,d,I.state))),s&&h===null)throw Error(a(528,""));return I}if(s&&h!==null)throw Error(a(529,""));return null;case"script":return s=d.async,d=d.src,typeof d=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=kc(d),d=Kl(y).hoistableScripts,h=d.get(s),h||(h={type:"script",instance:null,count:0,state:null},d.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Pc(r){return'href="'+Ln(r)+'"'}function yu(r){return'link[rel="stylesheet"]['+r+"]"}function XE(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function dU(r,s,d,h){r.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=r.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),ba(s,"link",d),la(s),r.head.appendChild(s))}function kc(r){return'[src="'+Ln(r)+'"]'}function Su(r){return"script[async]"+r}function e1(r,s,d){if(s.count++,s.instance===null)switch(s.type){case"style":var h=r.querySelector('style[data-href~="'+Ln(d.href)+'"]');if(h)return s.instance=h,la(h),h;var y=m({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return h=(r.ownerDocument||r).createElement("style"),la(h),ba(h,"style",y),pg(h,d.precedence,r),s.instance=h;case"stylesheet":y=Pc(d.href);var P=r.querySelector(yu(y));if(P)return s.state.loading|=4,s.instance=P,la(P),P;h=XE(d),(y=qn.get(y))&&iS(h,y),P=(r.ownerDocument||r).createElement("link"),la(P);var I=P;return I._p=new Promise(function(B,ee){I.onload=B,I.onerror=ee}),ba(P,"link",h),s.state.loading|=4,pg(P,d.precedence,r),s.instance=P;case"script":return P=kc(d.src),(y=r.querySelector(Su(P)))?(s.instance=y,la(y),y):(h=d,(y=qn.get(P))&&(h=m({},d),sS(h,y)),r=r.ownerDocument||r,y=r.createElement("script"),la(y),ba(y,"link",h),r.head.appendChild(y),s.instance=y);case"void":return null;default:throw Error(a(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,pg(h,d.precedence,r));return s.instance}function pg(r,s,d){for(var h=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=h.length?h[h.length-1]:null,P=y,I=0;I<h.length;I++){var B=h[I];if(B.dataset.precedence===s)P=B;else if(P!==y)break}P?P.parentNode.insertBefore(r,P.nextSibling):(s=d.nodeType===9?d.head:d,s.insertBefore(r,s.firstChild))}function iS(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.title==null&&(r.title=s.title)}function sS(r,s){r.crossOrigin==null&&(r.crossOrigin=s.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=s.referrerPolicy),r.integrity==null&&(r.integrity=s.integrity)}var mg=null;function t1(r,s,d){if(mg===null){var h=new Map,y=mg=new Map;y.set(d,h)}else y=mg,h=y.get(d),h||(h=new Map,y.set(d,h));if(h.has(r))return h;for(h.set(r,null),d=d.getElementsByTagName(r),y=0;y<d.length;y++){var P=d[y];if(!(P[Nd]||P[ga]||r==="link"&&P.getAttribute("rel")==="stylesheet")&&P.namespaceURI!=="http://www.w3.org/2000/svg"){var I=P.getAttribute(s)||"";I=r+I;var B=h.get(I);B?B.push(P):h.set(I,[P])}}return h}function o1(r,s,d){r=r.ownerDocument||r,r.head.insertBefore(d,s==="title"?r.querySelector("head > title"):null)}function uU(r,s,d){if(d===1||s.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(r=s.disabled,typeof s.precedence=="string"&&r==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function a1(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function pU(r,s,d,h){if(d.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var y=Pc(h.href),P=s.querySelector(yu(y));if(P){s=P._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(r.count++,r=gg.bind(r),s.then(r,r)),d.state.loading|=4,d.instance=P,la(P);return}P=s.ownerDocument||s,h=XE(h),(y=qn.get(y))&&iS(h,y),P=P.createElement("link"),la(P);var I=P;I._p=new Promise(function(B,ee){I.onload=B,I.onerror=ee}),ba(P,"link",h),d.instance=P}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(d,s),(s=d.state.preload)&&(d.state.loading&3)===0&&(r.count++,d=gg.bind(r),s.addEventListener("load",d),s.addEventListener("error",d))}}var lS=0;function mU(r,s){return r.stylesheets&&r.count===0&&fg(r,r.stylesheets),0<r.count||0<r.imgCount?function(d){var h=setTimeout(function(){if(r.stylesheets&&fg(r,r.stylesheets),r.unsuspend){var P=r.unsuspend;r.unsuspend=null,P()}},6e4+s);0<r.imgBytes&&lS===0&&(lS=62500*K6());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&fg(r,r.stylesheets),r.unsuspend)){var P=r.unsuspend;r.unsuspend=null,P()}},(r.imgBytes>lS?50:800)+s);return r.unsuspend=d,function(){r.unsuspend=null,clearTimeout(h),clearTimeout(y)}}:null}function gg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fg(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var hg=null;function fg(r,s){r.stylesheets=null,r.unsuspend!==null&&(r.count++,hg=new Map,s.forEach(gU,r),hg=null,gg.call(r))}function gU(r,s){if(!(s.state.loading&4)){var d=hg.get(r);if(d)var h=d.get(null);else{d=new Map,hg.set(r,d);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),P=0;P<y.length;P++){var I=y[P];(I.nodeName==="LINK"||I.getAttribute("media")!=="not all")&&(d.set(I.dataset.precedence,I),h=I)}h&&d.set(null,h)}y=s.instance,I=y.getAttribute("data-precedence"),P=d.get(I)||h,P===h&&d.set(null,y),d.set(I,y),this.count++,h=gg.bind(this),y.addEventListener("load",h),y.addEventListener("error",h),P?P.parentNode.insertBefore(y,P.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),s.state.loading|=4}}var Tu={$$typeof:E,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function hU(r,s,d,h,y,P,I,B,ee){this.tag=1,this.containerInfo=r,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=Ra(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ra(0),this.hiddenUpdates=Ra(null),this.identifierPrefix=h,this.onUncaughtError=y,this.onCaughtError=P,this.onRecoverableError=I,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function n1(r,s,d,h,y,P,I,B,ee,ue,ye,we){return r=new hU(r,s,d,I,ee,ue,ye,we,B),s=1,P===!0&&(s|=24),P=gn(3,null,null,s),r.current=P,P.stateNode=r,s=zb(),s.refCount++,r.pooledCache=s,s.refCount++,P.memoizedState={element:h,isDehydrated:d,cache:s},Hb(P),r}function r1(r){return r?(r=ac,r):ac}function i1(r,s,d,h,y,P){y=r1(y),h.context===null?h.context=y:h.pendingContext=y,h=Hi(s),h.payload={element:d},P=P===void 0?null:P,P!==null&&(h.callback=P),d=Gi(r,h,s),d!==null&&(tn(d,r,s),Xd(d,r,s))}function s1(r,s){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var d=r.retryLane;r.retryLane=d!==0&&d<s?d:s}}function cS(r,s){s1(r,s),(r=r.alternate)&&s1(r,s)}function l1(r){if(r.tag===13||r.tag===31){var s=Gs(r,67108864);s!==null&&tn(s,r,67108864),cS(r,67108864)}}function c1(r){if(r.tag===13||r.tag===31){var s=yn();s=ql(s);var d=Gs(r,s);d!==null&&tn(d,r,s),cS(r,s)}}var vg=!0;function fU(r,s,d,h){var y=H.T;H.T=null;var P=Z.p;try{Z.p=2,dS(r,s,d,h)}finally{Z.p=P,H.T=y}}function vU(r,s,d,h){var y=H.T;H.T=null;var P=Z.p;try{Z.p=8,dS(r,s,d,h)}finally{Z.p=P,H.T=y}}function dS(r,s,d,h){if(vg){var y=uS(h);if(y===null)Zy(r,s,h,bg,d),u1(r,h);else if(yU(y,r,s,d,h))h.stopPropagation();else if(u1(r,h),s&4&&-1<bU.indexOf(r)){for(;y!==null;){var P=Gl(y);if(P!==null)switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var I=Ft(P.pendingLanes);if(I!==0){var B=P;for(B.pendingLanes|=2,B.entangledLanes|=2;I;){var ee=1<<31-$o(I);B.entanglements[1]|=ee,I&=~ee}Dr(P),(qt&6)===0&&(eg=W()+500,hu(0))}}break;case 31:case 13:B=Gs(P,2),B!==null&&tn(B,P,2),og(),cS(P,2)}if(P=uS(h),P===null&&Zy(r,s,h,bg,d),P===y)break;y=P}y!==null&&h.stopPropagation()}else Zy(r,s,h,null,d)}}function uS(r){return r=mb(r),pS(r)}var bg=null;function pS(r){if(bg=null,r=Hl(r),r!==null){var s=i(r);if(s===null)r=null;else{var d=s.tag;if(d===13){if(r=l(s),r!==null)return r;r=null}else if(d===31){if(r=c(s),r!==null)return r;r=null}else if(d===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;r=null}else s!==r&&(r=null)}}return bg=r,null}function d1(r){switch(r){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(oe()){case se:return 2;case Pe:return 8;case Ee:case Re:return 32;case Le:return 268435456;default:return 32}default:return 32}}var mS=!1,as=null,ns=null,rs=null,wu=new Map,_u=new Map,is=[],bU="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 u1(r,s){switch(r){case"focusin":case"focusout":as=null;break;case"dragenter":case"dragleave":ns=null;break;case"mouseover":case"mouseout":rs=null;break;case"pointerover":case"pointerout":wu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":_u.delete(s.pointerId)}}function Cu(r,s,d,h,y,P){return r===null||r.nativeEvent!==P?(r={blockedOn:s,domEventName:d,eventSystemFlags:h,nativeEvent:P,targetContainers:[y]},s!==null&&(s=Gl(s),s!==null&&l1(s)),r):(r.eventSystemFlags|=h,s=r.targetContainers,y!==null&&s.indexOf(y)===-1&&s.push(y),r)}function yU(r,s,d,h,y){switch(s){case"focusin":return as=Cu(as,r,s,d,h,y),!0;case"dragenter":return ns=Cu(ns,r,s,d,h,y),!0;case"mouseover":return rs=Cu(rs,r,s,d,h,y),!0;case"pointerover":var P=y.pointerId;return wu.set(P,Cu(wu.get(P)||null,r,s,d,h,y)),!0;case"gotpointercapture":return P=y.pointerId,_u.set(P,Cu(_u.get(P)||null,r,s,d,h,y)),!0}return!1}function p1(r){var s=Hl(r.target);if(s!==null){var d=i(s);if(d!==null){if(s=d.tag,s===13){if(s=l(d),s!==null){r.blockedOn=s,kP(r.priority,function(){c1(d)});return}}else if(s===31){if(s=c(d),s!==null){r.blockedOn=s,kP(r.priority,function(){c1(d)});return}}else if(s===3&&d.stateNode.current.memoizedState.isDehydrated){r.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}r.blockedOn=null}function yg(r){if(r.blockedOn!==null)return!1;for(var s=r.targetContainers;0<s.length;){var d=uS(r.nativeEvent);if(d===null){d=r.nativeEvent;var h=new d.constructor(d.type,d);pb=h,d.target.dispatchEvent(h),pb=null}else return s=Gl(d),s!==null&&l1(s),r.blockedOn=d,!1;s.shift()}return!0}function m1(r,s,d){yg(r)&&d.delete(s)}function SU(){mS=!1,as!==null&&yg(as)&&(as=null),ns!==null&&yg(ns)&&(ns=null),rs!==null&&yg(rs)&&(rs=null),wu.forEach(m1),_u.forEach(m1)}function Sg(r,s){r.blockedOn===s&&(r.blockedOn=null,mS||(mS=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,SU)))}var Tg=null;function g1(r){Tg!==r&&(Tg=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Tg===r&&(Tg=null);for(var s=0;s<r.length;s+=3){var d=r[s],h=r[s+1],y=r[s+2];if(typeof h!="function"){if(pS(h||d)===null)continue;break}var P=Gl(d);P!==null&&(r.splice(s,3),s-=3,uy(P,{pending:!0,data:y,method:d.method,action:h},h,y))}}))}function xc(r){function s(ee){return Sg(ee,r)}as!==null&&Sg(as,r),ns!==null&&Sg(ns,r),rs!==null&&Sg(rs,r),wu.forEach(s),_u.forEach(s);for(var d=0;d<is.length;d++){var h=is[d];h.blockedOn===r&&(h.blockedOn=null)}for(;0<is.length&&(d=is[0],d.blockedOn===null);)p1(d),d.blockedOn===null&&is.shift();if(d=(r.ownerDocument||r).$$reactFormReplay,d!=null)for(h=0;h<d.length;h+=3){var y=d[h],P=d[h+1],I=y[Ya]||null;if(typeof P=="function")I||g1(d);else if(I){var B=null;if(P&&P.hasAttribute("formAction")){if(y=P,I=P[Ya]||null)B=I.formAction;else if(pS(y)!==null)continue}else B=I.action;typeof B=="function"?d[h+1]=B:(d.splice(h,3),h-=3),g1(d)}}}function h1(){function r(P){P.canIntercept&&P.info==="react-transition"&&P.intercept({handler:function(){return new Promise(function(I){return y=I})},focusReset:"manual",scroll:"manual"})}function s(){y!==null&&(y(),y=null),h||setTimeout(d,20)}function d(){if(!h&&!navigation.transition){var P=navigation.currentEntry;P&&P.url!=null&&navigation.navigate(P.url,{state:P.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(d,100),function(){h=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),y!==null&&(y(),y=null)}}}function gS(r){this._internalRoot=r}wg.prototype.render=gS.prototype.render=function(r){var s=this._internalRoot;if(s===null)throw Error(a(409));var d=s.current,h=yn();i1(d,h,r,s,null,null)},wg.prototype.unmount=gS.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var s=r.containerInfo;i1(r.current,2,null,r,null,null),og(),s[Vl]=null}};function wg(r){this._internalRoot=r}wg.prototype.unstable_scheduleHydration=function(r){if(r){var s=rb();r={blockedOn:null,target:r,priority:s};for(var d=0;d<is.length&&s!==0&&s<is[d].priority;d++);is.splice(d,0,r),d===0&&p1(r)}};var f1=t.version;if(f1!=="19.2.6")throw Error(a(527,f1,"19.2.6"));Z.findDOMNode=function(r){var s=r._reactInternals;if(s===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=p(s),r=r!==null?g(r):null,r=r===null?null:r.stateNode,r};var TU={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _g=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_g.isDisabled&&_g.supportsFiber)try{St=_g.inject(TU),Et=_g}catch{}}return ku.createRoot=function(r,s){if(!n(r))throw Error(a(299));var d=!1,h="",y=_x,P=Cx,I=Px;return s!=null&&(s.unstable_strictMode===!0&&(d=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(y=s.onUncaughtError),s.onCaughtError!==void 0&&(P=s.onCaughtError),s.onRecoverableError!==void 0&&(I=s.onRecoverableError)),s=n1(r,1,!1,null,null,d,h,null,y,P,I,h1),r[Vl]=s.current,Yy(r),new gS(s)},ku.hydrateRoot=function(r,s,d){if(!n(r))throw Error(a(299));var h=!1,y="",P=_x,I=Cx,B=Px,ee=null;return d!=null&&(d.unstable_strictMode===!0&&(h=!0),d.identifierPrefix!==void 0&&(y=d.identifierPrefix),d.onUncaughtError!==void 0&&(P=d.onUncaughtError),d.onCaughtError!==void 0&&(I=d.onCaughtError),d.onRecoverableError!==void 0&&(B=d.onRecoverableError),d.formState!==void 0&&(ee=d.formState)),s=n1(r,1,!0,s,d??null,h,y,ee,P,I,B,h1),s.context=r1(null),d=s.current,h=yn(),h=ql(h),y=Hi(h),y.callback=null,Gi(d,y,h),d=h,s.current.lanes=d,Bt(s,d),Dr(s),r[Vl]=s.current,Yy(r),new wg(s)},ku.version="19.2.6",ku}var x1;function IU(){if(x1)return vS.exports;x1=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(),vS.exports=OU(),vS.exports}var MU=IU(),E1=R.use,Zc=typeof window<"u"?R.useLayoutEffect:R.useEffect;function TS(e){const t=R.useRef({value:e,prev:null}),o=t.current.value;return e!==o&&(t.current={value:e,prev:o}),t.current.prev}function LU(e,t,o={},a={}){R.useEffect(()=>{if(!e.current||a.disabled||typeof IntersectionObserver!="function")return;const n=new IntersectionObserver(([i])=>{t(i)},o);return n.observe(e.current),()=>{n.disconnect()}},[t,o,a.disabled,e])}function NU(e){const t=R.useRef(null);return R.useImperativeHandle(e,()=>t.current,[]),t}const tI=!1;function vp(e){return e[e.length-1]}function FU(e){return typeof e=="function"}function _s(e,t){return FU(e)?e(t):e}const oI=Object.prototype.hasOwnProperty,R1=Object.prototype.propertyIsEnumerable;function aI(e){for(const t in e)if(oI.call(e,t))return!0;return!1}const BU=()=>Object.create(null),rl=(e,t)=>Cs(e,t,BU);function Cs(e,t,o=()=>({}),a=0){if(e===t)return e;if(a>500)return t;const n=t,i=O1(e)&&O1(n);if(!i&&!(gd(e)&&gd(n)))return n;const l=i?e:A1(e);if(!l)return n;const c=i?n:A1(n);if(!c)return n;const u=l.length,p=c.length,g=i?new Array(p):o();let m=0;for(let f=0;f<p;f++){const v=i?f:c[f],b=e[v],S=n[v];if(b===S){g[v]=b,(i?f<u:oI.call(e,v))&&m++;continue}if(b===null||S===null||typeof b!="object"||typeof S!="object"){g[v]=S;continue}const C=Cs(b,S,o,a+1);g[v]=C,C===b&&m++}return u===p&&m===u?e:g}function A1(e){const t=Object.getOwnPropertyNames(e);for(const n of t)if(!R1.call(e,n))return!1;const o=Object.getOwnPropertySymbols(e);if(o.length===0)return t;const a=t;for(const n of o){if(!R1.call(e,n))return!1;a.push(n)}return a}function gd(e){if(!D1(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const o=t.prototype;return!(!D1(o)||!o.hasOwnProperty("isPrototypeOf"))}function D1(e){return Object.prototype.toString.call(e)==="[object Object]"}function O1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function _l(e,t,o){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 a=0,n=e.length;a<n;a++)if(!_l(e[a],t[a],o))return!1;return!0}if(gd(e)&&gd(t)){const a=o?.ignoreUndefined??!0;if(o?.partial){for(const l in t)if((!a||t[l]!==void 0)&&!_l(e[l],t[l],o))return!1;return!0}let n=0;if(!a)n=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&n++;let i=0;for(const l in t)if((!a||t[l]!==void 0)&&(i++,i>n||!_l(e[l],t[l],o)))return!1;return n===i}return!1}function hd(e){let t,o;const a=new Promise((n,i)=>{t=n,o=i});return a.status="pending",a.resolve=n=>{a.status="resolved",a.value=n,t(n),e?.(n)},a.reject=n=>{a.status="rejected",o(n)},a}function jU(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 bp(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function UU(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function I1(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,o=>{try{return decodeURI(o)}catch{return o}})}return UU(t)}const zU=["http:","https:","mailto:","tel:"];function df(e,t){if(!e)return!1;try{const o=new URL(e);return!t.has(o.protocol)}catch{return!1}}function xu(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 o=0,a="",n;for(;(n=t.exec(e))!==null;)a+=I1(e.slice(o,n.index))+n[0],o=t.lastIndex;a=a+I1(o?e.slice(o):e);let i=!1;return a.startsWith("//")&&(i=!0,a="/"+a.replace(/^\/+/,"")),{path:a,handledProtocolRelativeURL:i}}function $U(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function qU(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(e[o]!==t[o])return!1;return!0}function Ri(){throw new Error("Invariant failed")}function yp(e){const t=new Map;let o,a;const n=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,a&&(a.next=i,i.prev=a)):(i.next.prev=void 0,o=i.next,i.next=void 0,a&&(i.prev=a,a.next=i)),a=i)};return{get(i){const l=t.get(i);if(l)return n(l),l.value},set(i,l){if(t.size>=e&&o){const u=o;t.delete(u.key),u.next&&(o=u.next,u.next.prev=void 0),u===a&&(a=void 0)}const c=t.get(i);if(c)c.value=l,n(c);else{const u={key:i,value:l,prev:a};a&&(a.next=u),a=u,o||(o=u),t.set(i,u)}},clear(){t.clear(),o=void 0,a=void 0}}}const Ps=4,nI=5;function VU(e){const t=e.indexOf("{");if(t===-1)return null;const o=e.indexOf("}",t);return o===-1||t+1>=e.length?null:[t,o]}function rI(e,t,o=new Uint16Array(6)){const a=e.indexOf("/",t),n=a===-1?e.length:a,i=e.substring(t,n);if(!i||!i.includes("$"))return o[0]=0,o[1]=t,o[2]=t,o[3]=n,o[4]=n,o[5]=n,o;if(i==="$"){const c=e.length;return o[0]=2,o[1]=t,o[2]=t,o[3]=c,o[4]=c,o[5]=c,o}if(i.charCodeAt(0)===36)return o[0]=1,o[1]=t,o[2]=t+1,o[3]=n,o[4]=n,o[5]=n,o;const l=VU(i);if(l){const[c,u]=l,p=i.charCodeAt(c+1);if(p===45){if(c+2<i.length&&i.charCodeAt(c+2)===36){const g=c+3,m=u;if(g<m)return o[0]=3,o[1]=t+c,o[2]=t+g,o[3]=t+m,o[4]=t+u+1,o[5]=n,o}}else if(p===36){const g=c+1,m=c+2;return m===u?(o[0]=2,o[1]=t+c,o[2]=t+g,o[3]=t+m,o[4]=t+u+1,o[5]=e.length,o):(o[0]=1,o[1]=t+c,o[2]=t+m,o[3]=t+u,o[4]=t+u+1,o[5]=n,o)}}return o[0]=0,o[1]=t,o[2]=t,o[3]=n,o[4]=n,o[5]=n,o}function dv(e,t,o,a,n,i,l){l?.(o);let c=a;{const u=o.fullPath??o.from,p=u.length,g=o.options?.caseSensitive??e,m=o.options?.params?.parse??o.options?.parseParams;for(;c<p;){const v=rI(u,c,t);let b;const S=c,C=v[5];switch(c=C+1,i++,v[0]){case 0:{const w=u.substring(v[2],v[3]);if(g){const _=n.static?.get(w);if(_)b=_;else{n.static??=new Map;const E=yl(o.fullPath??o.from);E.parent=n,E.depth=i,b=E,n.static.set(w,E)}}else{const _=w.toLowerCase(),E=n.staticInsensitive?.get(_);if(E)b=E;else{n.staticInsensitive??=new Map;const k=yl(o.fullPath??o.from);k.parent=n,k.depth=i,b=k,n.staticInsensitive.set(_,k)}}break}case 1:{const w=u.substring(S,v[1]),_=u.substring(v[4],C),E=g&&!!(w||_),k=w?E?w:w.toLowerCase():void 0,x=_?E?_:_.toLowerCase():void 0,A=!m&&n.dynamic?.find(D=>!D.parse&&D.caseSensitive===E&&D.prefix===k&&D.suffix===x);if(A)b=A;else{const D=_S(1,o.fullPath??o.from,E,k,x);b=D,D.depth=i,D.parent=n,n.dynamic??=[],n.dynamic.push(D)}break}case 3:{const w=u.substring(S,v[1]),_=u.substring(v[4],C),E=g&&!!(w||_),k=w?E?w:w.toLowerCase():void 0,x=_?E?_:_.toLowerCase():void 0,A=!m&&n.optional?.find(D=>!D.parse&&D.caseSensitive===E&&D.prefix===k&&D.suffix===x);if(A)b=A;else{const D=_S(3,o.fullPath??o.from,E,k,x);b=D,D.parent=n,D.depth=i,n.optional??=[],n.optional.push(D)}break}case 2:{const w=u.substring(S,v[1]),_=u.substring(v[4],C),E=g&&!!(w||_),k=w?E?w:w.toLowerCase():void 0,x=_?E?_:_.toLowerCase():void 0,A=_S(2,o.fullPath??o.from,E,k,x);b=A,A.parent=n,A.depth=i,n.wildcard??=[],n.wildcard.push(A)}}n=b}if(m&&o.children&&!o.isRoot&&o.id&&o.id.charCodeAt(o.id.lastIndexOf("/")+1)===95){const v=yl(o.fullPath??o.from);v.kind=nI,v.parent=n,i++,v.depth=i,n.pathless??=[],n.pathless.push(v),n=v}const f=(o.path||!o.children)&&!o.isRoot;if(f&&u.endsWith("/")){const v=yl(o.fullPath??o.from);v.kind=Ps,v.parent=n,i++,v.depth=i,n.index=v,n=v}n.parse=m??null,f&&!n.route&&(n.route=o,n.fullPath=o.fullPath??o.from)}if(o.children)for(const u of o.children)dv(e,t,u,c,n,i,l)}function wS(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 ys(e){if(e.pathless)for(const t of e.pathless)ys(t);if(e.static)for(const t of e.static.values())ys(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ys(t);if(e.dynamic?.length){e.dynamic.sort(wS);for(const t of e.dynamic)ys(t)}if(e.optional?.length){e.optional.sort(wS);for(const t of e.optional)ys(t)}if(e.wildcard?.length){e.wildcard.sort(wS);for(const t of e.wildcard)ys(t)}}function yl(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 _S(e,t,o,a,n){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:o,prefix:a,suffix:n}}function HU(e,t){const o=yl("/"),a=new Uint16Array(6);for(const n of e)dv(!1,a,n,1,o,0);ys(o),t.masksTree=o,t.flatCache=yp(1e3)}function GU(e,t){e||="/";const o=t.flatCache.get(e);if(o)return o;const a=b_(e,t.masksTree);return t.flatCache.set(e,a),a}function KU(e,t,o,a,n){e||="/",a||="/";const i=t?`case\0${e}`:e;let l=n.singleCache.get(i);return l||(l=yl("/"),dv(t,new Uint16Array(6),{from:e},1,l,0),n.singleCache.set(i,l)),b_(a,l,o)}function WU(e,t,o=!1){const a=o?e:`nofuzz\0${e}`,n=t.matchCache.get(a);if(n!==void 0)return n;e||="/";let i;try{i=b_(e,t.segmentTree,o)}catch(l){if(l instanceof URIError)i=null;else throw l}return i&&(i.branch=sI(i.route)),t.matchCache.set(a,i),i}function YU(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function ZU(e,t=!1,o){const a=yl(e.fullPath),n=new Uint16Array(6),i={},l={};let c=0;return dv(t,n,e,1,a,0,u=>{if(o?.(u,c),u.id in i&&Ri(),i[u.id]=u,c!==0&&u.path){const p=YU(u.fullPath);(!l[p]||u.fullPath.endsWith("/"))&&(l[p]=u)}c++}),ys(a),{processedTree:{segmentTree:a,singleCache:yp(1e3),matchCache:yp(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:l}}function b_(e,t,o=!1){const a=e.split("/"),n=JU(e,a,t,o);if(!n)return null;const[i]=iI(e,a,n);return{route:n.node.route,rawParams:i}}function iI(e,t,o){const a=QU(o.node);let n=null;const i=Object.create(null);let l=o.extract?.part??0,c=o.extract?.node??0,u=o.extract?.path??0,p=o.extract?.segment??0;for(;c<a.length;l++,c++,u++,p++){const g=a[c];if(g.kind===Ps)break;if(g.kind===nI){p--,l--,u--;continue}const m=t[l],f=u;if(m&&(u+=m.length),g.kind===1){n??=o.node.fullPath.split("/");const v=n[p],b=g.prefix?.length??0;if(v.charCodeAt(b)===123){const S=g.suffix?.length??0,C=v.substring(b+2,v.length-S-1),w=m.substring(b,m.length-S);i[C]=decodeURIComponent(w)}else{const S=v.substring(1);i[S]=decodeURIComponent(m)}}else if(g.kind===3){if(o.skipped&1<<c){l--,u=f-1;continue}n??=o.node.fullPath.split("/");const v=n[p],b=g.prefix?.length??0,S=g.suffix?.length??0,C=v.substring(b+3,v.length-S-1),w=g.suffix||g.prefix?m.substring(b,m.length-S):m;w&&(i[C]=decodeURIComponent(w))}else if(g.kind===2){const v=g,b=e.substring(f+(v.prefix?.length??0),e.length-(v.suffix?.length??0)),S=decodeURIComponent(b);i["*"]=S,i._splat=S;break}}return o.rawParams&&Object.assign(i,o.rawParams),[i,{part:l,node:c,path:u,segment:p}]}function sI(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function QU(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function JU(e,t,o,a){if(e==="/"&&o.index)return{node:o.index,skipped:0};const n=!vp(t),i=n&&e!=="/",l=t.length-(n?1:0),c=[{node:o,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let u=null,p=null;for(;c.length;){const g=c.pop(),{node:m,index:f,skipped:v,depth:b,statics:S,dynamics:C,optionals:w}=g;let{extract:_,rawParams:E}=g;if(m.kind===2&&m.route&&!Pg(p,g))continue;if(m.parse){if(!M1(e,t,g))continue;E=g.rawParams,_=g.extract}a&&m.route&&m.kind!==Ps&&Pg(u,g)&&(u=g);const k=f===l;if(k&&(m.route&&(!i||m.kind===Ps||m.kind===2)&&Pg(p,g)&&(p=g),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const x=k?void 0:t[f];let A;if(k&&m.index){const D={node:m.index,index:f,skipped:v,depth:b+1,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E};let O=!0;if(m.index.parse&&(M1(e,t,D)||(O=!1)),O){if(!C&&!w&&!v&&XU(S,l))return D;Pg(p,D)&&(p=D)}}if(m.wildcard)for(let D=m.wildcard.length-1;D>=0;D--){const O=m.wildcard[D],{prefix:N,suffix:$}=O;if(!(N&&(k||!(O.caseSensitive?x:A??=x.toLowerCase()).startsWith(N)))){if($){if(k)continue;const F=t.slice(f).join("/").slice(-$.length);if((O.caseSensitive?F:F.toLowerCase())!==$)continue}c.push({node:O,index:l,skipped:v,depth:b+1,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E})}}if(m.optional){const D=v|1<<b,O=b+1;for(let N=m.optional.length-1;N>=0;N--){const $=m.optional[N];c.push({node:$,index:f,skipped:D,depth:O,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E})}if(!k)for(let N=m.optional.length-1;N>=0;N--){const $=m.optional[N],{prefix:F,suffix:z}=$;if(F||z){const j=$.caseSensitive?x:A??=x.toLowerCase();if(F&&!j.startsWith(F)||z&&!j.endsWith(z))continue}c.push({node:$,index:f+1,skipped:v,depth:O,statics:S,dynamics:C,optionals:w+Cg(l,f),extract:_,rawParams:E})}}if(!k&&m.dynamic&&x)for(let D=m.dynamic.length-1;D>=0;D--){const O=m.dynamic[D],{prefix:N,suffix:$}=O;if(N||$){const F=O.caseSensitive?x:A??=x.toLowerCase();if(N&&!F.startsWith(N)||$&&!F.endsWith($))continue}c.push({node:O,index:f+1,skipped:v,depth:b+1,statics:S,dynamics:C+Cg(l,f),optionals:w,extract:_,rawParams:E})}if(!k&&m.staticInsensitive){const D=m.staticInsensitive.get(A??=x.toLowerCase());D&&c.push({node:D,index:f+1,skipped:v,depth:b+1,statics:S+Cg(l,f),dynamics:C,optionals:w,extract:_,rawParams:E})}if(!k&&m.static){const D=m.static.get(x);D&&c.push({node:D,index:f+1,skipped:v,depth:b+1,statics:S+Cg(l,f),dynamics:C,optionals:w,extract:_,rawParams:E})}if(m.pathless){const D=b+1;for(let O=m.pathless.length-1;O>=0;O--){const N=m.pathless[O];c.push({node:N,index:f,skipped:v,depth:D,statics:S,dynamics:C,optionals:w,extract:_,rawParams:E})}}}if(p)return p;if(a&&u){let g=u.index;for(let f=0;f<u.index;f++)g+=t[f].length;const m=g===e.length?"/":e.slice(g);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(m),u}return null}function Cg(e,t){return 2**(e-t-1)}function XU(e,t){return e===2**(t-1)-1}function M1(e,t,o){let a,n;try{[a,n]=iI(e,t,o)}catch{return null}if(o.rawParams=a,o.extract=n,!o.node.parse)return!0;try{if(o.node.parse(a)===!1)return null}catch{}return!0}function Pg(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===Ps)>(e.node.kind===Ps)||t.node.kind===Ps==(e.node.kind===Ps)&&t.depth>e.depth))):!0}function Gh(e){return y_(e.filter(t=>t!==void 0).join("/"))}function y_(e){return e.replace(/\/{2,}/g,"/")}function lI(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function xi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function cI(e){return xi(lI(e))}function uf(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function ez(e,t,o){return uf(e,o)===uf(t,o)}function tz({base:e,to:t,trailingSlash:o="never",cache:a}){const n=t.startsWith("/"),i=!n&&t===".";let l;if(a){l=n?t:i?e:e+"\0"+t;const p=a.get(l);if(p)return p}let c;if(i)c=e.split("/");else if(n)c=t.split("/");else{for(c=e.split("/");c.length>1&&vp(c)==="";)c.pop();const p=t.split("/");for(let g=0,m=p.length;g<m;g++){const f=p[g];f===""?g?g===m-1&&c.push(f):c=[f]:f===".."?c.pop():f==="."||c.push(f)}}c.length>1&&(vp(c)===""?o==="never"&&c.pop():o==="always"&&c.push(""));const u=y_(c.join("/"))||"/";return l&&a&&a.set(l,u),u}function oz(e){const t=new Map(e.map(n=>[encodeURIComponent(n),n])),o=Array.from(t.keys()).map(n=>n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),a=new RegExp(o,"g");return n=>n.replace(a,i=>t.get(i)??i)}function CS(e,t,o){const a=t[e];return typeof a!="string"?a:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(a)?a:a.split("/").map(n=>N1(n,o)).join("/"):N1(a,o)}function L1({path:e,params:t,decoder:o,...a}){let n=!1;const i=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:n};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:n};const l=e.length;let c=0,u,p="";for(;c<l;){const g=c;u=rI(e,g,u);const m=u[5];if(c=m+1,g===m)continue;const f=u[0];if(f===0){p+="/"+e.substring(g,m);continue}if(f===2){const v=t._splat;i._splat=v,i["*"]=v;const b=e.substring(g,u[1]),S=e.substring(u[4],m);if(!v){n=!0,(b||S)&&(p+="/"+b+S);continue}const C=CS("_splat",t,o);p+="/"+b+C+S;continue}if(f===1){const v=e.substring(u[2],u[3]);!n&&!(v in t)&&(n=!0),i[v]=t[v];const b=e.substring(g,u[1]),S=e.substring(u[4],m),C=CS(v,t,o)??"undefined";p+="/"+b+C+S;continue}if(f===3){const v=e.substring(u[2],u[3]),b=t[v];if(b==null)continue;i[v]=b;const S=e.substring(g,u[1]),C=e.substring(u[4],m),w=CS(v,t,o)??"";p+="/"+S+w+C;continue}}return e.endsWith("/")&&(p+="/"),{usedParams:i,interpolatedPath:p||"/",isMissingParams:n}}function N1(e,t){const o=encodeURIComponent(e);return t?.(o)??o}function dI(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Na(e){return e?.isNotFound===!0}function az(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}const nz="tsr-scroll-restoration-v1_3";function rz(){const e=az();if(!e)return null;let t={};try{const a=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");gd(a)&&(t=a)}catch{}return{get state(){return t},set:a=>{t=_s(a,t)||t},persist:()=>{try{e.setItem(nz,JSON.stringify(t))}catch{}}}}const F1=rz(),iz=e=>e.state.__TSR_key||e.href;function sz(e){const t=[];let o;for(;o=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(o.children,e)+1})`),e=o;return`${t.reverse().join(" > ")}`.toLowerCase()}let kg=!1;const Eu="window",B1="data-scroll-restoration-id";function lz(e,t){if(!F1)return;const o=F1;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!o)return;e.isScrollRestorationSetup=!0,kg=!1;const a=e.options.getScrollRestorationKey||iz,n=new Map;window.history.scrollRestoration="manual";const i=c=>{if(!(kg||!e.isScrollRestoring))if(c.target===document||c.target===window)n.set(Eu,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const u=c.target;n.set(u,{scrollX:u.scrollLeft||0,scrollY:u.scrollTop||0})}},l=c=>{if(!e.isScrollRestoring||!c||n.size===0||!o)return;const u=o.state[c]||={};for(const[p,g]of n){let m;if(p===Eu)m=Eu;else if(p.isConnected){const f=p.getAttribute(B1);m=f?`[${B1}="${f}"]`:sz(p)}m&&(u[m]=g)}};document.addEventListener("scroll",i,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?a(c.fromLocation):void 0),n.clear()}),window.addEventListener("pagehide",()=>{l(a(e.stores.resolvedLocation.get()??e.stores.location.get())),o.persist()}),e.subscribe("onRendered",c=>{const u=a(c.toLocation),p=e.options.scrollRestorationBehavior,g=e.options.scrollToTopSelectors;if(n.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){kg=!0;try{const m=e.isScrollRestoring?o.state[u]:void 0;let f=!1;if(m)for(const v in m){const b=m[v];if(!gd(b))continue;const{scrollX:S,scrollY:C}=b;if(!(!Number.isFinite(S)||!Number.isFinite(C))){if(v===Eu)window.scrollTo({top:C,left:S,behavior:p}),f=!0;else if(v){let w;try{w=document.querySelector(v)}catch{continue}w&&(w.scrollLeft=S,w.scrollTop=C,f=!0)}}}if(!f){const v=e.history.location.hash.slice(1);if(v){const b=window.history.state?.__hashScrollIntoViewOptions??!0;if(b){const S=document.getElementById(v);S&&S.scrollIntoView(b)}}else{const b={top:0,left:0,behavior:p};if(window.scrollTo(b),g)for(const S of g){if(S===Eu)continue;const C=typeof S=="function"?S():document.querySelector(S);C&&C.scrollTo(b)}}}}finally{kg=!1}e.isScrollRestoring&&o.set(m=>(m[u]||={},m))}})}function cz(e,t=String){const o=new URLSearchParams;for(const a in e){const n=e[a];n!==void 0&&o.set(a,t(n))}return o.toString()}function PS(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function dz(e){const t=new URLSearchParams(e),o=Object.create(null);for(const[a,n]of t.entries()){const i=o[a];i==null?o[a]=PS(n):Array.isArray(i)?i.push(PS(n)):o[a]=[i,PS(n)]}return o}const uz=mz(JSON.parse),pz=gz(JSON.stringify,JSON.parse);function mz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const o=dz(t);for(const a in o){const n=o[a];if(typeof n=="string")try{o[a]=e(n)}catch{}}return o}}function gz(e,t){const o=typeof t=="function";function a(n){if(typeof n=="object"&&n!==null)try{return e(n)}catch{}else if(o&&typeof n=="string")try{return t(n),e(n)}catch{}return n}return n=>{const i=cz(n,a);return i?`?${i}`:""}}const Cl="__root__";function Qo(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 o=new Response(null,{status:e.statusCode,headers:t});if(o.options=e,e.throw)throw o;return o}function ln(e){return e instanceof Response&&!!e.options}function hz(e){return{input:({url:t})=>{for(const o of e)t=fT(o,t);return t},output:({url:t})=>{for(let o=e.length-1;o>=0;o--)t=uI(e[o],t);return t}}}function fz(e){const t=cI(e.basepath),o=`/${t}`,a=`${o}/`,n=e.caseSensitive?o:o.toLowerCase(),i=e.caseSensitive?a:a.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===n?l.pathname="/":c.startsWith(i)&&(l.pathname=l.pathname.slice(o.length)),l},output:({url:l})=>(l.pathname=Gh(["/",t,l.pathname]),l)}}function fT(e,t){const o=e?.input?.({url:t});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return t}function uI(e,t){const o=e?.output?.({url:t});if(o){if(typeof o=="string")return new URL(o);if(o instanceof URL)return o}return t}function vz(e,t){const{createMutableStore:o,createReadonlyStore:a,batch:n,init:i}=t,l=new Map,c=new Map,u=new Map,p=o(e.status),g=o(e.loadedAt),m=o(e.isLoading),f=o(e.isTransitioning),v=o(e.location),b=o(e.resolvedLocation),S=o(e.statusCode),C=o(e.redirect),w=o([]),_=o([]),E=o([]),k=a(()=>kS(l,w.get())),x=a(()=>kS(c,_.get())),A=a(()=>kS(u,E.get())),D=a(()=>w.get()[0]),O=a(()=>w.get().some(Z=>l.get(Z)?.get().status==="pending")),N=a(()=>({locationHref:v.get().href,resolvedLocationHref:b.get()?.href,status:p.get()})),$=a(()=>({status:p.get(),loadedAt:g.get(),isLoading:m.get(),isTransitioning:f.get(),matches:k.get(),location:v.get(),resolvedLocation:b.get(),statusCode:S.get(),redirect:C.get()})),F=yp(64);function z(Z){let te=F.get(Z);return te||(te=a(()=>{const le=w.get();for(const Q of le){const M=l.get(Q);if(M&&M.routeId===Z)return M.get()}}),F.set(Z,te)),te}const j={status:p,loadedAt:g,isLoading:m,isTransitioning:f,location:v,resolvedLocation:b,statusCode:S,redirect:C,matchesId:w,pendingIds:_,cachedIds:E,matches:k,pendingMatches:x,cachedMatches:A,firstId:D,hasPending:O,matchRouteDeps:N,matchStores:l,pendingMatchStores:c,cachedMatchStores:u,__store:$,getRouteMatchStore:z,setMatches:K,setPending:ne,setCached:H};K(e.matches),i?.(j);function K(Z){xS(Z,l,w,o,n)}function ne(Z){xS(Z,c,_,o,n)}function H(Z){xS(Z,u,E,o,n)}return j}function kS(e,t){const o=[];for(const a of t){const n=e.get(a);n&&o.push(n.get())}return o}function xS(e,t,o,a,n){const i=e.map(c=>c.id),l=new Set(i);n(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const u=t.get(c.id);if(!u){const p=a(c);p.routeId=c.routeId,t.set(c.id,p);continue}u.routeId=c.routeId,u.get()!==c&&u.set(c)}qU(o.get(),i)||o.set(i)})}const vT=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},bz=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),uv=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Pl=(e,t,o=!0)=>{const a={...e.router.options.context??{}},n=o?t:t-1;for(let i=0;i<=n;i++){const l=e.matches[i];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(a,c.__routeContext,c.__beforeLoadContext)}return a},j1=(e,t)=>{if(!e.matches.length)return;const o=t.routeId,a=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),n=a>=0?a:0;let i=o?e.matches.findIndex(l=>l.routeId===o):e.firstBadMatchIndex??e.matches.length-1;i<0&&(i=n);for(let l=i;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return o?i:n},ks=(e,t,o)=>{if(!(!ln(o)&&!Na(o)))throw ln(o)&&o.redirectHandled&&!o.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=o,e.updateMatch(t.id,a=>({...a,status:ln(o)?"redirected":Na(o)?"notFound":a.status==="pending"?"success":a.status,context:Pl(e,t.index),isFetching:!1,error:o})),Na(o)&&!o.routeId&&(o.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),ln(o)&&(e.rendered=!0,o.options._fromLocation=e.location,o.redirectHandled=!0,o=e.router.resolveRedirect(o))),o},pI=(e,t)=>{const o=e.router.getMatch(t);return!!(!o||o._nonReactive.dehydrated)},U1=(e,t,o)=>{const a=Pl(e,o);e.updateMatch(t,n=>({...n,context:a}))},Ru=(e,t,o,a)=>{const{id:n,routeId:i}=e.matches[t],l=e.router.looseRoutesById[i];if(o instanceof Promise)throw o;o.routerCode=a,e.firstBadMatchIndex??=t,ks(e,e.router.getMatch(n),o);try{l.options.onError?.(o)}catch(c){o=c,ks(e,e.router.getMatch(n),o)}e.updateMatch(n,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:o,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!ln(o)&&!Na(o)&&(e.serialError??=o)},mI=(e,t,o,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const n=o.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!uv(e,t)&&(o.options.loader||o.options.beforeLoad||hI(o))&&typeof n=="number"&&n!==1/0&&(o.options.pendingComponent??e.router.options?.defaultPendingComponent)){const i=setTimeout(()=>{vT(e)},n);a._nonReactive.pendingTimeout=i}},yz=(e,t,o)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;mI(e,t,o,a);const n=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&ks(e,i,i.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(n):n()},Sz=(e,t,o,a)=>{const n=e.router.getMatch(t);let i=n._nonReactive.loadPromise;n._nonReactive.loadPromise=hd(()=>{i?.resolve(),i=void 0});const{paramsError:l,searchError:c}=n;l&&Ru(e,o,l,"PARSE_PARAMS"),c&&Ru(e,o,c,"VALIDATE_SEARCH"),mI(e,t,a,n);const u=new AbortController;let p=!1;const g=()=>{p||(p=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:u})))},m=()=>{n._nonReactive.beforeLoadPromise?.resolve(),n._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!a.options.beforeLoad){e.router.batch(()=>{g(),m()});return}n._nonReactive.beforeLoadPromise=hd();const f={...Pl(e,o,!1),...n.__routeContext},{search:v,params:b,cause:S}=n,C=uv(e,t),w={search:v,abortController:u,params:b,preload:C,context:f,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:C?"preload":S,matches:e.matches,routeId:a.id,...e.router.options.additionalContext},_=k=>{if(k===void 0){e.router.batch(()=>{g(),m()});return}(ln(k)||Na(k))&&(g(),Ru(e,o,k,"BEFORE_LOAD")),e.router.batch(()=>{g(),e.updateMatch(t,x=>({...x,__beforeLoadContext:k})),m()})};let E;try{if(E=a.options.beforeLoad(w),bp(E))return g(),E.catch(k=>{Ru(e,o,k,"BEFORE_LOAD")}).then(_)}catch(k){g(),Ru(e,o,k,"BEFORE_LOAD")}_(E)},Tz=(e,t)=>{const{id:o,routeId:a}=e.matches[t],n=e.router.looseRoutesById[a],i=()=>c(),l=()=>Sz(e,o,t,n),c=()=>{if(pI(e,o))return;const u=yz(e,o,n);return bp(u)?u.then(l):l()};return i()},wz=(e,t,o)=>{const a=e.router.getMatch(t);if(!a||!o.options.head&&!o.options.scripts&&!o.options.headers)return;const n={ssr:e.router.options.ssr,matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([o.options.head?.(n),o.options.scripts?.(n),o.options.headers?.(n)]).then(([i,l,c])=>({meta:i?.meta,links:i?.links,headScripts:i?.scripts,headers:c,scripts:l,styles:i?.styles}))},gI=(e,t,o,a,n)=>{const i=t[a-1],{params:l,loaderDeps:c,abortController:u,cause:p}=e.router.getMatch(o),g=Pl(e,a),m=uv(e,o);return{params:l,deps:c,preload:!!m,parentMatchPromise:i,abortController:u,context:g,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:m?"preload":p,route:n,...e.router.options.additionalContext}},z1=async(e,t,o,a,n)=>{try{const i=e.router.getMatch(o);try{(!(tI??e.router.isServer)||i.ssr===!0)&&Sp(n);const l=n.options.loader,c=typeof l=="function"?l:l?.handler,u=c?.(gI(e,t,o,a,n)),p=!!c&&bp(u);if((p||n._lazyPromise||n._componentsPromise||n.options.head||n.options.scripts||n.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(o,m=>({...m,isFetching:"loader"})),c){const m=p?await u:u;ks(e,e.router.getMatch(o),m),m!==void 0&&e.updateMatch(o,f=>({...f,loaderData:m}))}n._lazyPromise&&await n._lazyPromise;const g=i._nonReactive.minPendingPromise;g&&await g,n._componentsPromise&&await n._componentsPromise,e.updateMatch(o,m=>({...m,error:void 0,context:Pl(e,a),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let c=l;if(c?.name==="AbortError"){if(i.abortController.signal.aborted){i._nonReactive.loaderPromise?.resolve(),i._nonReactive.loaderPromise=void 0;return}e.updateMatch(o,p=>({...p,status:p.status==="pending"?"success":p.status,isFetching:!1,context:Pl(e,a)}));return}const u=i._nonReactive.minPendingPromise;u&&await u,Na(l)&&await n.options.notFoundComponent?.preload?.(),ks(e,e.router.getMatch(o),l);try{n.options.onError?.(l)}catch(p){c=p,ks(e,e.router.getMatch(o),p)}!ln(c)&&!Na(c)&&await Sp(n,["errorComponent"]),e.updateMatch(o,p=>({...p,error:c,context:Pl(e,a),status:"error",isFetching:!1}))}}catch(i){const l=e.router.getMatch(o);l&&(l._nonReactive.loaderPromise=void 0),ks(e,l,i)}},_z=async(e,t,o)=>{async function a(v,b,S,C,w){const _=Date.now()-b.updatedAt,E=v?w.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:w.options.staleTime??e.router.options.defaultStaleTime??0,k=w.options.shouldReload,x=typeof k=="function"?k(gI(e,t,n,o,w)):k,{status:A,invalid:D}=C,O=_>=E&&(!!e.forceStaleReload||C.cause==="enter"||S!==void 0&&S!==C.id);l=A==="success"&&(D||(x??O)),v&&w.options.preload===!1||(l&&!e.sync&&g?(c=!0,(async()=>{try{await z1(e,t,n,o,w);const N=e.router.getMatch(n);N._nonReactive.loaderPromise?.resolve(),N._nonReactive.loadPromise?.resolve(),N._nonReactive.loaderPromise=void 0,N._nonReactive.loadPromise=void 0}catch(N){ln(N)&&await e.router.navigate(N.options)}})()):A!=="success"||l?await z1(e,t,n,o,w):U1(e,n,o))}const{id:n,routeId:i}=e.matches[o];let l=!1,c=!1;const u=e.router.looseRoutesById[i],p=u.options.loader,g=((typeof p=="function"?void 0:p?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(pI(e,n)){if(!e.router.getMatch(n))return e.matches[o];U1(e,n,o)}else{const v=e.router.getMatch(n),b=e.router.stores.matchesId.get()[o],S=(b&&e.router.stores.matchStores.get(b)||null)?.routeId===i?b:e.router.stores.matches.get().find(w=>w.routeId===i)?.id,C=uv(e,n);if(v._nonReactive.loaderPromise){if(v.status==="success"&&!e.sync&&!v.preload&&g)return v;await v._nonReactive.loaderPromise;const w=e.router.getMatch(n),_=w._nonReactive.error||w.error;_&&ks(e,w,_),w.status==="pending"&&await a(C,v,S,w,u)}else{const w=C&&!e.router.stores.matchStores.has(n),_=e.router.getMatch(n);_._nonReactive.loaderPromise=hd(),w!==_.preload&&e.updateMatch(n,E=>({...E,preload:w})),await a(C,v,S,_,u)}}const m=e.router.getMatch(n);c||(m._nonReactive.loaderPromise?.resolve(),m._nonReactive.loadPromise?.resolve(),m._nonReactive.loadPromise=void 0),clearTimeout(m._nonReactive.pendingTimeout),m._nonReactive.pendingTimeout=void 0,c||(m._nonReactive.loaderPromise=void 0),m._nonReactive.dehydrated=void 0;const f=c?m.isFetching:!1;return f!==m.isFetching||m.invalid!==!1?(e.updateMatch(n,v=>({...v,isFetching:f,invalid:!1})),e.router.getMatch(n)):m};async function $1(e){const t=e,o=[];bz(t.router)&&vT(t);let a;for(let f=0;f<t.matches.length;f++){try{const v=Tz(t,f);bp(v)&&await v}catch(v){if(ln(v))throw v;if(Na(v))a=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const n=t.firstBadMatchIndex??t.matches.length,i=a&&!t.preload?j1(t,a):void 0,l=a&&t.preload?0:i!==void 0?Math.min(i+1,n):n;let c,u;for(let f=0;f<l;f++)o.push(_z(t,o,f));try{await Promise.all(o)}catch{const f=await Promise.allSettled(o);for(const v of f){if(v.status!=="rejected")continue;const b=v.reason;if(ln(b))throw b;Na(b)?c??=b:u??=b}if(u!==void 0)throw u}const p=c??(a&&!t.preload?a:void 0);let g=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!p&&a&&t.preload)return t.matches;if(p){const f=j1(t,p);f===void 0&&Ri();const v=t.matches[f],b=t.router.looseRoutesById[v.routeId],S=t.router.options?.defaultNotFoundComponent;!b.options.notFoundComponent&&S&&(b.options.notFoundComponent=S),p.routeId=v.routeId;const C=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,w=>({...w,...C?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:p},isFetching:!1})),g=f,await Sp(b,["notFoundComponent"])}else if(!t.preload){const f=t.matches[0];f.globalNotFound||t.router.getMatch(f.id)?.globalNotFound&&t.updateMatch(f.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const f=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Sp(f,["errorComponent"])}for(let f=0;f<=g;f++){const{id:v,routeId:b}=t.matches[f],S=t.router.looseRoutesById[b];try{const C=wz(t,v,S);if(C){const w=await C;t.updateMatch(v,_=>({..._,...w}))}}catch(C){console.error(`Error executing head for route ${b}:`,C)}}const m=vT(t);if(bp(m)&&await m,p)throw p;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function q1(e,t){const o=t.map(a=>e.options[a]?.preload?.()).filter(Boolean);if(o.length!==0)return Promise.all(o)}function Sp(e,t=Kh){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(a=>{const{id:n,...i}=a.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const o=()=>e._componentsLoaded?void 0:t===Kh?(()=>{if(e._componentsPromise===void 0){const a=q1(e,Kh);a?e._componentsPromise=a.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():q1(e,t);return e._lazyPromise?e._lazyPromise.then(o):o()}function hI(e){for(const t of Kh)if(e.options[t]?.preload)return!0;return!1}const Kh=["component","errorComponent","pendingComponent","notFoundComponent"];var xs="__TSR_index",V1="popstate",H1="beforeunload";function Cz(e){let t=e.getLocation();const o=new Set,a=l=>{t=e.getLocation(),o.forEach(c=>c({location:t,action:l}))},n=l=>{e.notifyOnIndexChange??!0?a(l):t=e.getLocation()},i=async({task:l,navigateOpts:c,...u})=>{if(c?.ignoreBlocker??!1){l();return}const p=e.getBlockers?.()??[],g=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&p.length&&g)for(const m of p){const f=pf(u.path,u.state);if(await m.blockerFn({currentLocation:t,nextLocation:f,action:u.type})){e.onBlocked?.();return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:o,subscribe:l=>(o.add(l),()=>{o.delete(l)}),push:(l,c,u)=>{const p=t.state[xs];c=G1(p+1,c),i({task:()=>{e.pushState(l,c),a({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:l,state:c})},replace:(l,c,u)=>{const p=t.state[xs];c=G1(p,c),i({task:()=>{e.replaceState(l,c),a({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:l,state:c})},go:(l,c)=>{i({task:()=>{e.go(l),n({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{i({task:()=>{e.back(l?.ignoreBlocker??!1),n({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{i({task:()=>{e.forward(l?.ignoreBlocker??!1),n({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[xs]!==0,createHref:l=>e.createHref(l),block:l=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,l]),()=>{const u=e.getBlockers?.()??[];e.setBlockers?.(u.filter(p=>p!==l))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function G1(e,t){t||(t={});const o=S_();return{...t,key:o,__TSR_key:o,[xs]:e}}function Pz(e){const t=typeof document<"u"?window:void 0,o=t.history.pushState,a=t.history.replaceState;let n=[];const i=()=>n,l=O=>n=O,c=(O=>O),u=(()=>pf(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const O=S_();t.history.replaceState({[xs]:0,key:O,__TSR_key:O},"")}let p=u(),g,m=!1,f=!1,v=!1,b=!1;const S=()=>p;let C,w;const _=()=>{C&&(D._ignoreSubscribers=!0,(C.isPush?t.history.pushState:t.history.replaceState)(C.state,"",C.href),D._ignoreSubscribers=!1,C=void 0,w=void 0,g=void 0)},E=(O,N,$)=>{const F=c(N);w||(g=p),p=pf(N,$),C={href:F,state:$,isPush:C?.isPush||O==="push"},w||(w=Promise.resolve().then(()=>_()))},k=O=>{p=u(),D.notify({type:O})},x=async()=>{if(f){f=!1;return}const O=u(),N=O.state[xs]-p.state[xs],$=N===1,F=N===-1,z=!$&&!F||m;m=!1;const j=z?"GO":F?"BACK":"FORWARD",K=z?{type:"GO",index:N}:{type:F?"BACK":"FORWARD"};if(v)v=!1;else{const ne=i();if(typeof document<"u"&&ne.length){for(const H of ne)if(await H.blockerFn({currentLocation:p,nextLocation:O,action:j})){f=!0,t.history.go(1),D.notify(K);return}}}p=u(),D.notify(K)},A=O=>{if(b){b=!1;return}let N=!1;const $=i();if(typeof document<"u"&&$.length)for(const F of $){const z=F.enableBeforeUnload??!0;if(z===!0){N=!0;break}if(typeof z=="function"&&z()===!0){N=!0;break}}if(N)return O.preventDefault(),O.returnValue=""},D=Cz({getLocation:S,getLength:()=>t.history.length,pushState:(O,N)=>E("push",O,N),replaceState:(O,N)=>E("replace",O,N),back:O=>(O&&(v=!0),b=!0,t.history.back()),forward:O=>{O&&(v=!0),b=!0,t.history.forward()},go:O=>{m=!0,t.history.go(O)},createHref:O=>c(O),flush:_,destroy:()=>{t.history.pushState=o,t.history.replaceState=a,t.removeEventListener(H1,A,{capture:!0}),t.removeEventListener(V1,x)},onBlocked:()=>{g&&p!==g&&(p=g)},getBlockers:i,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(H1,A,{capture:!0}),t.addEventListener(V1,x),t.history.pushState=function(...O){const N=o.apply(t.history,O);return D._ignoreSubscribers||k("PUSH"),N},t.history.replaceState=function(...O){const N=a.apply(t.history,O);return D._ignoreSubscribers||k("REPLACE"),N},D}function kz(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function pf(e,t){const o=kz(e),a=o.indexOf("#"),n=o.indexOf("?"),i=S_();return{href:o,pathname:o.substring(0,a>0?n>0?Math.min(a,n):a:n>0?n:o.length),hash:a>-1?o.substring(a):"",search:n>-1?o.slice(n,a===-1?void 0:a):"",state:t||{[xs]:0,key:i,__TSR_key:i}}}function S_(){return(Math.random()+1).toString(36).substring(7)}function ad(e,t){const o=t,a=e;return{fromLocation:o,toLocation:a,pathChanged:o?.pathname!==a.pathname,hrefChanged:o?.href!==a.href,hashChanged:o?.hash!==a.hash}}var xz=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=o=>o(),this.update=o=>{const a=this.options,n=this.basepath??a?.basepath??"/",i=this.basepath===void 0,l=a?.rewrite;if(this.options={...a,...o},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=oz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Pz()),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 g;this.resolvePathCache=yp(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=vz(Rz(this.latestLocation),g),lz(this)}let c=!1;const u=this.options.basepath??"/",p=this.options.rewrite;if(i||n!==u||l!==p){this.basepath=u;const g=[],m=cI(u);m&&m!=="/"&&g.push(fz({basepath:u})),p&&g.push(p),this.rewrite=g.length===0?void 0:g.length===1?g[0]:hz(g),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 o=ZU(this.routeTree,this.options.caseSensitive,(a,n)=>{a.init({originalIndex:n})});return this.options.routeMasks&&HU(this.options.routeMasks,o.processedTree),o},this.subscribe=(o,a)=>{const n={eventType:o,fn:a};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=o=>{this.subscribers.forEach(a=>{a.eventType===o.type&&a.fn(o)})},this.parseLocation=(o,a)=>{const n=({pathname:u,search:p,hash:g,href:m,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const w=this.options.parseSearch(p),_=this.options.stringifySearch(w);return{href:u+_+g,publicHref:u+_+g,pathname:xu(u).path,external:!1,searchStr:_,search:rl(a?.search,w),hash:xu(g.slice(1)).path,state:Cs(a?.state,f)}}const v=new URL(m,this.origin),b=fT(this.rewrite,v),S=this.options.parseSearch(b.search),C=this.options.stringifySearch(S);return b.search=C,{href:b.href.replace(b.origin,""),publicHref:m,pathname:xu(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:C,search:rl(a?.search,S),hash:xu(b.hash.slice(1)).path,state:Cs(a?.state,f)}},i=n(o),{__tempLocation:l,__tempKey:c}=i.state;if(l&&(!c||c===this.tempLocationKey)){const u=n(l);return u.state.key=i.state.key,u.state.__TSR_key=i.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:i}}return i},this.resolvePathWithBase=(o,a)=>tz({base:o,to:a.includes("//")?y_(a):a,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(o,a,n)=>typeof o=="string"?this.matchRoutesInternal({pathname:o,search:a},n):this.matchRoutesInternal(o,a),this.getMatchedRoutes=o=>Az({pathname:o,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=o=>{const a=this.getMatch(o);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(o=>{this.cancelMatch(o)}),this.stores.matchesId.get().forEach(o=>{if(this.stores.pendingMatchStores.has(o))return;const a=this.stores.matchStores.get(o)?.get();a&&(a.status==="pending"||a.isFetching==="loader")&&this.cancelMatch(o)})},this.buildLocation=o=>{const a=(i={})=>{const l=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);i.from;const u=i.unsafeRelative==="path"?l.pathname:i.from??c.fullPath,p=i.to?`${i.to}`:void 0,g=c.search,m=Object.assign(Object.create(null),c.params),f=p?.charCodeAt(0)===47?"/":this.resolvePathWithBase(u,"."),v=p?this.resolvePathWithBase(f,p):f,b=i.params===!1||i.params===null?Object.create(null):(i.params??!0)===!0?m:Object.assign(m,_s(i.params,m)),S=this.routesByPath[xi(v)];let C;if(S)C=this.getRouteBranch(S);else if(v.includes("$"))C=[];else{const F=this.getMatchedRoutes(v);C=F.matchedRoutes,this.options.notFoundRoute&&(!F.foundRoute||F.foundRoute.path!=="/"&&F.routeParams["**"])&&(C=[...C,this.options.notFoundRoute])}if(C.length&&aI(b))for(const F of C){const z=F.options.params?.stringify??F.options.stringifyParams;if(z)try{Object.assign(b,z(b))}catch{}}const w=o.leaveParams?v:xu(L1({path:v,params:b,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=g;if(o._includeValidateSearch&&this.options.search?.strict){const F={};C.forEach(z=>{if(z.options.validateSearch)try{Object.assign(F,Wh(z.options.validateSearch,{...F,..._}))}catch{}}),_=F}_=Dz({search:_,dest:i,destRoutes:C,_includeValidateSearch:o._includeValidateSearch}),_=rl(g,_);const E=this.options.stringifySearch(_),k=i.hash===!0?l.hash:i.hash?_s(i.hash,l.hash):void 0,x=k?`#${k}`:"";let A=i.state===!0?l.state:i.state?_s(i.state,l.state):{};A=Cs(l.state,A);const D=`${w}${E}${x}`;let O,N,$=!1;if(this.rewrite){const F=new URL(D,this.origin),z=uI(this.rewrite,F);O=F.href.replace(F.origin,""),z.origin!==this.origin?(N=z.href,$=!0):N=z.pathname+z.search+z.hash}else O=$U(D),N=O;return{publicHref:N,href:O,pathname:w,search:_,searchStr:E,state:A,hash:k??"",external:$,unmaskOnReload:i.unmaskOnReload}},n=(i={},l)=>{const c=a(i);let u=l?a(l):void 0;if(!u){const p=Object.create(null);if(this.options.routeMasks){const g=GU(c.pathname,this.processedTree);if(g){Object.assign(p,g.rawParams);const{from:m,params:f,...v}=g.route,b=f===!1||f===null?Object.create(null):(f??!0)===!0?p:Object.assign(p,_s(f,p));l={from:o.from,...v,params:b},u=a(l)}}}return u&&(c.maskedLocation=u),c};return o.mask?n(o,{from:o.from,...o.mask}):n(o)},this.commitLocation=async({viewTransition:o,ignoreBlocker:a,...n})=>{const i=()=>{const u=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(g=>{n.state[g]=this.latestLocation.state[g]});const p=_l(n.state,this.latestLocation.state);return u.forEach(g=>{delete n.state[g]}),p},l=xi(this.latestLocation.href)===xi(n.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=hd(()=>{c?.resolve(),c=void 0}),l&&i())this.load();else{let{maskedLocation:u,hashScrollIntoView:p,...g}=n;u&&(g={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...g,search:g.searchStr,state:{...g.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(g.unmaskOnReload??this.options.unmaskOnReload??!1)&&(g.state.__tempKey=this.tempLocationKey)),g.state.__hashScrollIntoViewOptions=p??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=o,this.history[n.replace?"replace":"push"](g.publicHref,g.state,{ignoreBlocker:a})}return this.resetNextScroll=n.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:o,resetScroll:a,hashScrollIntoView:n,viewTransition:i,ignoreBlocker:l,href:c,...u}={})=>{if(c){const m=this.history.location.state.__TSR_index,f=pf(c,{__TSR_index:o?m:m+1}),v=new URL(f.pathname,this.origin);u.to=fT(this.rewrite,v).pathname,u.search=this.options.parseSearch(f.search),u.hash=f.hash.slice(1)}const p=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=p;const g=this.commitLocation({...p,viewTransition:i,replace:o,resetScroll:a,hashScrollIntoView:n,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===p&&(this.pendingBuiltLocation=void 0)}),g},this.navigate=async({to:o,reloadDocument:a,href:n,publicHref:i,...l})=>{let c=!1;if(n)try{new URL(`${n}`),c=!0}catch{}if(c&&!a&&(a=!0),a){if(o!==void 0||!n){const p=this.buildLocation({to:o,...l});n=n??p.publicHref,i=i??p.publicHref}const u=!c&&i?i:n;if(df(u,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const g of p)if(g?.blockerFn&&await g.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(u):window.location.href=u,Promise.resolve()}return this.buildAndCommitLocation({...l,href:n,to:o,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const o=this.matchRoutes(this.latestLocation),a=this.stores.cachedMatches.get().filter(n=>!o.some(i=>i.id===n.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(o),this.stores.setCached(a)})},this.load=async o=>{let a,n,i;const l=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const p=this.latestLocation,g=ad(p,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await $1({router:this,sync:o?.sync,forceStaleReload:l.href===p.href,matches:this.stores.pendingMatches.get(),location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let m=null,f=null,v=null,b=null;this.batch(()=>{const S=this.stores.pendingMatches.get(),C=S.length,w=this.stores.matches.get();m=C?w.filter(k=>!this.stores.pendingMatchStores.has(k.id)):null;const _=new Set;for(const k of this.stores.pendingMatchStores.values())k.routeId&&_.add(k.routeId);const E=new Set;for(const k of this.stores.matchStores.values())k.routeId&&E.add(k.routeId);f=C?w.filter(k=>!_.has(k.routeId)):null,v=C?S.filter(k=>!E.has(k.routeId)):null,b=C?S.filter(k=>E.has(k.routeId)):w,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),C&&(this.stores.setMatches(S),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(k=>k.status!=="error"&&k.status!=="notFound"&&k.status!=="redirected")]),this.clearExpiredCache())});for(const[S,C]of[[f,"onLeave"],[v,"onEnter"],[b,"onStay"]])if(S)for(const w of S)this.looseRoutesById[w.routeId].options[C]?.(w)})})}})}catch(p){ln(p)?(a=p,this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):Na(p)&&(n=p);const g=a?a.status:n?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(g),this.stores.redirect.set(a)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.matches.get().some(u=>u.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.set(c)},this.startViewTransition=o=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let n;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,l=this.stores.resolvedLocation.get(),c=typeof a.types=="function"?a.types(ad(i,l)):a.types;if(c===!1){o();return}n={update:o,types:c}}else n=o;document.startViewTransition(n)}else o()},this.updateMatch=(o,a)=>{this.startTransition(()=>{const n=this.stores.pendingMatchStores.get(o);if(n){n.set(a);return}const i=this.stores.matchStores.get(o);if(i){i.set(a);return}const l=this.stores.cachedMatchStores.get(o);if(l){const c=a(l.get());c.status==="redirected"?this.stores.cachedMatchStores.delete(o)&&this.stores.cachedIds.set(u=>u.filter(p=>p!==o)):l.set(c)}})},this.getMatch=o=>this.stores.cachedMatchStores.get(o)?.get()??this.stores.pendingMatchStores.get(o)?.get()??this.stores.matchStores.get(o)?.get(),this.invalidate=o=>{const a=n=>o?.filter?.(n)??!0?{...n,invalid:!0,...o?.forcePending||n.status==="error"||n.status==="notFound"?{status:"pending",error:void 0}:void 0}:n;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(a)),this.stores.setCached(this.stores.cachedMatches.get().map(a)),this.stores.setPending(this.stores.pendingMatches.get().map(a))}),this.shouldViewTransition=!1,this.load({sync:o?.sync})},this.getParsedLocationHref=o=>o.publicHref||"/",this.resolveRedirect=o=>{const a=o.headers.get("Location");if(!o.options.href||o.options._builtLocation){const n=o.options._builtLocation??this.buildLocation(o.options),i=this.getParsedLocationHref(n);o.options.href=i,o.headers.set("Location",i)}else if(a)try{const n=new URL(a);if(this.origin&&n.origin===this.origin){const i=n.pathname+n.search+n.hash;o.options.href=i,o.headers.set("Location",i)}}catch{}if(o.options.href&&!o.options._builtLocation&&df(o.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return o.headers.get("Location")||o.headers.set("Location",o.options.href),o},this.clearCache=o=>{const a=o?.filter;a!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(n=>!a(n))):this.stores.setCached([])},this.clearExpiredCache=()=>{const o=Date.now(),a=n=>{const i=this.looseRoutesById[n.routeId];if(!i.options.loader)return!0;const l=(n.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??300*1e3;return n.status==="error"?!0:o-n.updatedAt>=l};this.clearCache({filter:a})},this.loadRouteChunk=Sp,this.preloadRoute=async o=>{const a=o._builtLocation??this.buildLocation(o);let n=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:o});const i=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),l=new Set([...i,...this.stores.cachedIds.get()]),c=n.filter(u=>!l.has(u.id));if(c.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...c])}try{return n=await $1({router:this,matches:n,location:a,preload:!0,updateMatch:(u,p)=>{i.has(u)?n=n.map(g=>g.id===u?p(g):g):this.updateMatch(u,p)}}),n}catch(u){if(ln(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:a});Na(u)||console.error(u);return}},this.matchRoute=(o,a)=>{const n={...o,to:o.to?this.resolvePathWithBase(o.from||"",o.to):void 0,params:o.params||{},leaveParams:!0},i=this.buildLocation(n);if(a?.pending&&this.stores.status.get()!=="pending")return!1;const l=(a?.pending===void 0?!this.stores.isLoading.get():a.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),c=KU(i.pathname,a?.caseSensitive??!1,a?.fuzzy??!1,l.pathname,this.processedTree);return!c||o.params&&!_l(c.rawParams,o.params,{partial:!0})?!1:a?.includeSearch??!0?_l(l.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(o=>o.status==="notFound"||o.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??pz,parseSearch:e.parseSearch??uz,protocolAllowlist:e.protocolAllowlist??zU}),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:o}){this.routesById=e,this.routesByPath=t,this.processedTree=o;const a=this.options.notFoundRoute;a&&(a.init({originalIndex:99999999999}),this.routesById[a.id]=a)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=sI(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 o=this.getMatchedRoutes(e.pathname),{foundRoute:a,routeParams:n}=o;let{matchedRoutes:i}=o,l=!1;(a?a.path!=="/"&&n["**"]:xi(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:l=!0);const c=l?Iz(this.options.notFoundMode,i):void 0,u=new Array(i.length),p=new Map;for(const g of this.stores.matchStores.values())g.routeId&&p.set(g.routeId,g.get());for(let g=0;g<i.length;g++){const m=i[g],f=u[g-1];let v,b,S;{const z=f?.search??e.search,j=f?._strictSearch??void 0;try{const K=Wh(m.options.validateSearch,{...z})??void 0;v={...z,...K},b={...j,...K},S=void 0}catch(K){let ne=K;if(K instanceof mf||(ne=new mf(K.message,{cause:K})),t?.throwOnError)throw ne;v=z,b={},S=ne}}const C=m.options.loaderDeps?.({search:v})??"",w=C?JSON.stringify(C):"",{interpolatedPath:_,usedParams:E}=L1({path:m.fullPath,params:n,decoder:this.pathParamsDecoder,server:this.isServer}),k=m.id+_+w,x=this.getMatch(k),A=p.get(m.id),D=x?._strictParams??E;let O;if(!x)try{K1(m,D)}catch(z){if(Na(z)||ln(z)?O=z:O=new Ez(z.message,{cause:z}),t?.throwOnError)throw O}Object.assign(n,D);const N=A?"stay":"enter";let $;if(x)$={...x,cause:N,params:A?.params??n,_strictParams:D,search:rl(A?A.search:x.search,v),_strictSearch:b};else{const z=m.options.loader||m.options.beforeLoad||m.lazyFn||hI(m)?"pending":"success";$={id:k,ssr:m.options.ssr,index:g,routeId:m.id,params:A?.params??n,_strictParams:D,pathname:_,updatedAt:Date.now(),search:A?rl(A.search,v):v,_strictSearch:b,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:O,__routeContext:void 0,_nonReactive:{loadPromise:hd()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:N,loaderDeps:A?Cs(A.loaderDeps,C):C,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}t?.preload||($.globalNotFound=c===m.id),$.searchError=S;const F=this.getParentContext(f);$.context={...F,...$.__routeContext,...$.__beforeLoadContext},u[g]=$}for(let g=0;g<u.length;g++){const m=u[g],f=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),b=p.get(m.routeId);if(m.params=b?rl(b.params,n):n,!v){const S=u[g-1],C=this.getParentContext(S);if(f.options.context){const w={deps:m.loaderDeps,params:m.params,context:C??{},location:e,navigate:_=>this.navigate({..._,_fromLocation:e}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:u,routeId:f.id};m.__routeContext=f.options.context(w)??void 0}m.context={...C,...m.__routeContext,...m.__beforeLoadContext}}}return u}matchRoutesLightweight(e){const{matchedRoutes:t,routeParams:o}=this.getMatchedRoutes(e.pathname),a=vp(t),n={...e.search};for(const p of t)try{Object.assign(n,Wh(p.options.validateSearch,n))}catch{}const i=vp(this.stores.matchesId.get()),l=i&&this.stores.matchStores.get(i)?.get(),c=l&&l.routeId===a.id&&l.pathname===e.pathname;let u;if(c)u=l.params;else{const p=Object.assign(Object.create(null),o);for(const g of t)try{K1(g,p)}catch{}u=p}return{matchedRoutes:t,fullPath:a.fullPath,search:n,params:u}}},mf=class extends Error{},Ez=class extends Error{};function Rz(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Wh(e,t){if(e==null)return{};if("~standard"in e){const o=e["~standard"].validate(t);if(o instanceof Promise)throw new mf("Async validation not supported");if(o.issues)throw new mf(JSON.stringify(o.issues,void 0,2),{cause:o});return o.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function Az({pathname:e,routesById:t,processedTree:o}){const a=Object.create(null),n=xi(e);let i;const l=WU(n,o,!0);return l&&(i=l.route,Object.assign(a,l.rawParams)),{matchedRoutes:l?.branch||[t.__root__],routeParams:a,foundRoute:i}}function Dz({search:e,dest:t,destRoutes:o,_includeValidateSearch:a}){return Oz(o)(e,t,a??!1)}function Oz(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const n of e){if("search"in n.options)n.options.search?.middlewares&&t.middlewares.push(...n.options.search.middlewares);else if(n.options.preSearchFilters||n.options.postSearchFilters){const i=({search:l,next:c})=>{let u=l;"preSearchFilters"in n.options&&n.options.preSearchFilters&&(u=n.options.preSearchFilters.reduce((g,m)=>m(g),l));const p=c(u);return"postSearchFilters"in n.options&&n.options.postSearchFilters?n.options.postSearchFilters.reduce((g,m)=>m(g),p):p};t.middlewares.push(i)}if(n.options.validateSearch){const i=({search:l,next:c})=>{const u=c(l);if(!t._includeValidateSearch)return u;try{return{...u,...Wh(n.options.validateSearch,u)??void 0}}catch{return u}};t.middlewares.push(i)}}const o=({search:n})=>{const i=t.dest;return i.search?i.search===!0?n:_s(i.search,n):{}};t.middlewares.push(o);const a=(n,i,l)=>{if(n>=l.length)return i;const c=l[n];return c({search:i,next:p=>a(n+1,p,l)})};return function(i,l,c){return t.dest=l,t._includeValidateSearch=c,a(0,i,t.middlewares)}}function Iz(e,t){if(e!=="root")for(let o=t.length-1;o>=0;o--){const a=t[o];if(a.children)return a.id}return Cl}function K1(e,t){const o=e.options.params?.parse??e.options.parseParams;if(o){const a=o(t);if(a===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(t,a)}}const Mz="Error preloading route! ☝️";var fI=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 o=this.options,a=!o?.path&&!o?.id;this.parentRoute=this.options.getParentRoute?.(),a?this._path=Cl:this.parentRoute||Ri();let n=a?Cl:o?.path;n&&n!=="/"&&(n=lI(n));const i=o?.id||n;let l=a?Cl:Gh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);n==="__root__"&&(n="/"),l!=="__root__"&&(l=Gh(["/",l]));const c=l==="__root__"?"/":Gh([this.parentRoute.fullPath,n]);this._path=n,this._id=l,this._fullPath=c,this._to=xi(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=>Qo({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.")}},Lz=class{constructor({id:e}){this.notFound=t=>dI({routeId:this.id,...t}),this.redirect=t=>Qo({from:this.id,...t}),this.id=e}},Nz=class extends fI{constructor(e){super(e)}};function Fz(e){return({search:t,next:o})=>{const a=o(t);if(e===!0)return{...t,...a};const n={...a};return e.forEach(i=>{i in n||(n[i]=t[i])}),n}}function Bz(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),o=t.state.__hashScrollIntoViewOptions??!0;if(o&&t.hash!==""){const a=document.getElementById(t.hash);a&&a.scrollIntoView(o)}}}function T_(e){const t=e.errorComponent??w_;return T.jsx(jz,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:o,reset:a})=>o?R.createElement(t,{error:o,reset:a}):e.children})}var jz=class extends R.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const o=e.getResetKey();return t.error&&t.resetKey!==o?{resetKey:o,error:null}:{resetKey:o}}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 w_({error:e}){const[t,o]=R.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>o(a=>!a),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function Uz({children:e,fallback:t=null}){return vI()?T.jsx(X.Fragment,{children:e}):T.jsx(X.Fragment,{children:t})}function vI(){return X.useSyncExternalStore(zz,()=>!0,()=>!1)}function zz(){return()=>{}}var bI=R.createContext(null);function Fa(e){return R.useContext(bI)}var pv=R.createContext(void 0),$z=R.createContext(void 0),yo=(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))(yo||{});function qz({update:e,notify:t,unwatched:o}){return{link:a,unlink:n,propagate:i,checkDirty:l,shallowPropagate:c};function a(p,g,m){const f=g.depsTail;if(f!==void 0&&f.dep===p)return;const v=f!==void 0?f.nextDep:g.deps;if(v!==void 0&&v.dep===p){v.version=m,g.depsTail=v;return}const b=p.subsTail;if(b!==void 0&&b.version===m&&b.sub===g)return;const S=g.depsTail=p.subsTail={version:m,dep:p,sub:g,prevDep:f,nextDep:v,prevSub:b,nextSub:void 0};v!==void 0&&(v.prevDep=S),f!==void 0?f.nextDep=S:g.deps=S,b!==void 0?b.nextSub=S:p.subs=S}function n(p,g=p.sub){const m=p.dep,f=p.prevDep,v=p.nextDep,b=p.nextSub,S=p.prevSub;return v!==void 0?v.prevDep=f:g.depsTail=f,f!==void 0?f.nextDep=v:g.deps=v,b!==void 0?b.prevSub=S:m.subsTail=S,S!==void 0?S.nextSub=b:(m.subs=b)===void 0&&o(m),v}function i(p){let g=p.nextSub,m;e:do{const f=p.sub;let v=f.flags;if(v&60?v&12?v&4?!(v&48)&&u(p,f)?(f.flags=v|40,v&=1):v=0:f.flags=v&-9|32:v=0:f.flags=v|32,v&2&&t(f),v&1){const b=f.subs;if(b!==void 0){const S=(p=b).nextSub;S!==void 0&&(m={value:g,prev:m},g=S);continue}}if((p=g)!==void 0){g=p.nextSub;continue}for(;m!==void 0;)if(p=m.value,m=m.prev,p!==void 0){g=p.nextSub;continue e}break}while(!0)}function l(p,g){let m,f=0,v=!1;e:do{const b=p.dep,S=b.flags;if(g.flags&16)v=!0;else if((S&17)===17){if(e(b)){const C=b.subs;C.nextSub!==void 0&&c(C),v=!0}}else if((S&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(m={value:p,prev:m}),p=b.deps,g=b,++f;continue}if(!v){const C=p.nextDep;if(C!==void 0){p=C;continue}}for(;f--;){const C=g.subs,w=C.nextSub!==void 0;if(w?(p=m.value,m=m.prev):p=C,v){if(e(g)){w&&c(C),g=p.sub;continue}v=!1}else g.flags&=-33;g=p.sub;const _=p.nextDep;if(_!==void 0){p=_;continue e}}return v}while(!0)}function c(p){do{const g=p.sub,m=g.flags;(m&48)===32&&(g.flags=m|16,(m&6)===2&&t(g))}while((p=p.nextSub)!==void 0)}function u(p,g){let m=g.depsTail;for(;m!==void 0;){if(m===p)return!0;m=m.prevDep}return!1}}function Vz(e,t,o){const a=typeof e=="object",n=a?e:void 0;return{next:(a?e.next:e)?.bind(n),error:(a?e.error:t)?.bind(n),complete:(a?e.complete:o)?.bind(n)}}const bT=[];let Yh=0;const{link:W1,unlink:Hz,propagate:Gz,checkDirty:yI,shallowPropagate:Y1}=qz({update(e){return e._update()},notify(e){bT[yT++]=e,e.flags&=~yo.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=yo.Mutable|yo.Dirty,gf(e))}});let xg=0,yT=0,Lr,ST=0;function SI(e){try{++ST,e()}finally{--ST||TI()}}function gf(e){const t=e.depsTail;let o=t!==void 0?t.nextDep:e.deps;for(;o!==void 0;)o=Hz(o,e)}function TI(){if(!(ST>0)){for(;xg<yT;){const e=bT[xg];bT[xg++]=void 0,e.notify()}xg=0,yT=0}}function Z1(e,t){const o=typeof e=="function",a=e,n={_snapshot:o?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:o?yo.None:yo.Mutable,get(){return Lr!==void 0&&W1(n,Lr,Yh),n._snapshot},subscribe(i){const l=Vz(i),c={current:!1},u=Kz(()=>{n.get(),c.current?l.next?.(n._snapshot):c.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(i){const l=Lr,c=t?.compare??Object.is;if(o)Lr=n,++Yh,n.depsTail=void 0;else if(i===void 0)return!1;o&&(n.flags=yo.Mutable|yo.RecursedCheck);try{const u=n._snapshot,p=typeof i=="function"?i(u):i===void 0&&o?a(u):i;return u===void 0||!c(u,p)?(n._snapshot=p,!0):!1}finally{Lr=l,o&&(n.flags&=~yo.RecursedCheck),gf(n)}}};return o?(n.flags=yo.Mutable|yo.Dirty,n.get=function(){const i=n.flags;if(i&yo.Dirty||i&yo.Pending&&yI(n.deps,n)){if(n._update()){const l=n.subs;l!==void 0&&Y1(l)}}else i&yo.Pending&&(n.flags=i&~yo.Pending);return Lr!==void 0&&W1(n,Lr,Yh),n._snapshot}):n.set=function(i){if(n._update(i)){const l=n.subs;l!==void 0&&(Gz(l),Y1(l),TI())}},n}function Kz(e){const t=()=>{const a=Lr;Lr=o,++Yh,o.depsTail=void 0,o.flags=yo.Watching|yo.RecursedCheck;try{return e()}finally{Lr=a,o.flags&=~yo.RecursedCheck,gf(o)}},o={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:yo.Watching|yo.RecursedCheck,notify(){const a=this.flags;a&yo.Dirty||a&yo.Pending&&yI(this.deps,this)?t():this.flags=yo.Watching},stop(){this.flags=yo.None,this.depsTail=void 0,gf(this)}};return t(),o}var ES={exports:{}},RS={},AS={exports:{}},DS={};var Q1;function Wz(){if(Q1)return DS;Q1=1;var e=Ls();function t(m,f){return m===f&&(m!==0||1/m===1/f)||m!==m&&f!==f}var o=typeof Object.is=="function"?Object.is:t,a=e.useState,n=e.useEffect,i=e.useLayoutEffect,l=e.useDebugValue;function c(m,f){var v=f(),b=a({inst:{value:v,getSnapshot:f}}),S=b[0].inst,C=b[1];return i(function(){S.value=v,S.getSnapshot=f,u(S)&&C({inst:S})},[m,v,f]),n(function(){return u(S)&&C({inst:S}),m(function(){u(S)&&C({inst:S})})},[m]),l(v),v}function u(m){var f=m.getSnapshot;m=m.value;try{var v=f();return!o(m,v)}catch{return!0}}function p(m,f){return f()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:c;return DS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:g,DS}var J1;function wI(){return J1||(J1=1,AS.exports=Wz()),AS.exports}var X1;function Yz(){if(X1)return RS;X1=1;var e=Ls(),t=wI();function o(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var a=typeof Object.is=="function"?Object.is:o,n=t.useSyncExternalStore,i=e.useRef,l=e.useEffect,c=e.useMemo,u=e.useDebugValue;return RS.useSyncExternalStoreWithSelector=function(p,g,m,f,v){var b=i(null);if(b.current===null){var S={hasValue:!1,value:null};b.current=S}else S=b.current;b=c(function(){function w(A){if(!_){if(_=!0,E=A,A=f(A),v!==void 0&&S.hasValue){var D=S.value;if(v(D,A))return k=D}return k=A}if(D=k,a(E,A))return D;var O=f(A);return v!==void 0&&v(D,O)?(E=A,D):(E=A,k=O)}var _=!1,E,k,x=m===void 0?null:m;return[function(){return w(g())},x===null?void 0:function(){return w(x())}]},[g,m,f,v]);var C=n(p,b[0],b[1]);return l(function(){S.hasValue=!0,S.value=C},[C]),u(C),C},RS}var eR;function Zz(){return eR||(eR=1,ES.exports=Yz()),ES.exports}var Qz=Zz();function Jz(e,t){return e===t}function un(e,t,o=Jz){const a=R.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),n=R.useCallback(()=>e?.get(),[e]);return Qz.useSyncExternalStoreWithSelector(a,n,n,t,o)}var Xz={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ns(e){const t=Fa(),o=R.useContext(e.from?$z:pv),a=e.from??o,n=a?e.from?t.stores.getRouteMatchStore(a):t.stores.matchStores.get(a):void 0,i=R.useRef(void 0);return un(n??Xz,l=>{if((e.shouldThrow??!0)&&!l&&Ri(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const u=Cs(i.current,c);return i.current=u,u}return c})}function __(e){return Ns({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function C_(e){const{select:t,...o}=e;return Ns({...o,select:a=>t?t(a.loaderDeps):a.loaderDeps})}function Rd(e){return Ns({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const o=e.strict===!1?t.params:t._strictParams;return e.select?e.select(o):o}})}function P_(e){return Ns({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function mv(e){const t=Fa();return R.useCallback(o=>t.navigate({...o,from:o.from??e?.from}),[e?.from,t])}function Whe(e){const t=Fa(),o=mv(),a=R.useRef(null);return Zc(()=>{a.current!==e&&(o(e),a.current=e)},[t,e,o]),null}function k_(e){return Ns({...e,select:t=>e.select?e.select(t.context):t.context})}var Up=eI();const _I=Ll(Up);function e$(e,t){const o=Fa(),a=NU(t),{activeProps:n,inactiveProps:i,activeOptions:l,to:c,preload:u,preloadDelay:p,preloadIntentProximity:g,hashScrollIntoView:m,replace:f,startTransition:v,resetScroll:b,viewTransition:S,children:C,target:w,disabled:_,style:E,className:k,onClick:x,onBlur:A,onFocus:D,onMouseEnter:O,onMouseLeave:N,onTouchStart:$,ignoreBlocker:F,params:z,search:j,hash:K,state:ne,mask:H,reloadDocument:Z,unsafeRelative:te,from:le,_fromLocation:Q,...M}=e,G=vI(),q=R.useMemo(()=>e,[o,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),L=un(o.stores.location,oe=>oe,(oe,se)=>oe.href===se.href),U=R.useMemo(()=>{const oe={_fromLocation:L,...q};return o.buildLocation(oe)},[o,L,q]),J=U.maskedLocation?U.maskedLocation.publicHref:U.publicHref,pe=U.maskedLocation?U.maskedLocation.external:U.external,ge=R.useMemo(()=>i$(J,pe,o.history,_),[_,pe,J,o.history]),Ce=R.useMemo(()=>{if(ge?.external)return df(ge.href,o.protocolAllowlist)?void 0:ge.href;if(!s$(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),df(c,o.protocolAllowlist)?void 0:c}catch{}},[c,ge,o.protocolAllowlist]),$e=R.useMemo(()=>{if(Ce)return!1;if(l?.exact){if(!ez(L.pathname,U.pathname,o.basepath))return!1}else{const oe=uf(L.pathname,o.basepath),se=uf(U.pathname,o.basepath);if(!(oe.startsWith(se)&&(oe.length===se.length||oe[se.length]==="/")))return!1}return(l?.includeSearch??!0)&&!_l(L.search,U.search,{partial:!l?.exact,ignoreUndefined:!l?.explicitUndefined})?!1:l?.includeHash?G&&L.hash===U.hash:!0},[l?.exact,l?.explicitUndefined,l?.includeHash,l?.includeSearch,L,Ce,G,U.hash,U.pathname,U.search,o.basepath]),Y=$e?_s(n,{})??t$:OS,ae=$e?OS:_s(i,{})??OS,ve=[k,Y.className,ae.className].filter(Boolean).join(" "),ie=(E||Y.style||ae.style)&&{...E,...Y.style,...ae.style},[Te,ke]=R.useState(!1),it=R.useRef(!1),lt=e.reloadDocument||Ce?!1:u??o.options.defaultPreload,Ge=p??o.options.defaultPreloadDelay??0,tt=R.useCallback(()=>{o.preloadRoute({...q,_builtLocation:U}).catch(oe=>{console.warn(oe),console.warn(Mz)})},[o,q,U]);LU(a,R.useCallback(oe=>{oe?.isIntersecting&&tt()},[tt]),r$,{disabled:!!_||lt!=="viewport"}),R.useEffect(()=>{it.current||!_&&lt==="render"&&(tt(),it.current=!0)},[_,tt,lt]);const De=oe=>{const se=oe.currentTarget.getAttribute("target"),Pe=w!==void 0?w:se;if(!_&&!c$(oe)&&!oe.defaultPrevented&&(!Pe||Pe==="_self")&&oe.button===0){oe.preventDefault(),Up.flushSync(()=>{ke(!0)});const Ee=o.subscribe("onResolved",()=>{Ee(),ke(!1)});o.navigate({...q,replace:f,resetScroll:b,hashScrollIntoView:m,startTransition:v,viewTransition:S,ignoreBlocker:F})}};if(Ce)return{...M,ref:a,href:Ce,...C&&{children:C},...w&&{target:w},..._&&{disabled:_},...E&&{style:E},...k&&{className:k},...x&&{onClick:x},...A&&{onBlur:A},...D&&{onFocus:D},...O&&{onMouseEnter:O},...N&&{onMouseLeave:N},...$&&{onTouchStart:$}};const Ae=oe=>{if(_||lt!=="intent")return;if(!Ge){tt();return}const se=oe.currentTarget;if(Au.has(se))return;const Pe=setTimeout(()=>{Au.delete(se),tt()},Ge);Au.set(se,Pe)},He=oe=>{_||lt!=="intent"||tt()},W=oe=>{if(_||!lt||!Ge)return;const se=oe.currentTarget,Pe=Au.get(se);Pe&&(clearTimeout(Pe),Au.delete(se))};return{...M,...Y,...ae,href:ge?.href,ref:a,onClick:Ec([x,De]),onBlur:Ec([A,W]),onFocus:Ec([D,Ae]),onMouseEnter:Ec([O,Ae]),onMouseLeave:Ec([N,W]),onTouchStart:Ec([$,He]),disabled:!!_,target:w,...ie&&{style:ie},...ve&&{className:ve},..._&&o$,...$e&&a$,...G&&Te&&n$}}var OS={},t$={className:"active"},o$={role:"link","aria-disabled":!0},a$={"data-status":"active","aria-current":"page"},n$={"data-transitioning":"transitioning"},Au=new WeakMap,r$={rootMargin:"100px"},Ec=e=>t=>{for(const o of e)if(o){if(t.defaultPrevented)return;o(t)}};function i$(e,t,o,a){if(!a)return t?{href:e,external:!0}:{href:o.createHref(e)||"/",external:!1}}function s$(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function l$(e){return R.forwardRef(function(o,a){return T.jsx(Fs,{...o,_asChild:e,ref:a})})}var Fs=R.forwardRef((e,t)=>{const{_asChild:o,...a}=e,{type:n,...i}=e$(a,t),l=typeof a.children=="function"?a.children({isActive:i["data-status"]==="active"}):a.children;if(!o){const{disabled:c,...u}=i;return R.createElement("a",u,l)}return R.createElement(o,i,l)});function c$(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yhe(e){return new d$({id:e})}var d$=class extends Lz{constructor({id:e}){super({id:e}),this.useMatch=t=>Ns({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k_({...t,from:this.id}),this.useSearch=t=>P_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Rd({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>C_({...t,from:this.id,strict:!1}),this.useLoaderData=t=>__({...t,from:this.id,strict:!1}),this.useNavigate=()=>mv({from:Fa().routesById[this.id].fullPath}),this.notFound=t=>dI({routeId:this.id,...t}),this.Link=X.forwardRef((t,o)=>{const a=Fa().routesById[this.id].fullPath;return T.jsx(Fs,{ref:o,from:a,...t})})}},u$=class extends fI{constructor(e){super(e),this.useMatch=t=>Ns({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k_({...t,from:this.id}),this.useSearch=t=>P_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Rd({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>C_({...t,from:this.id}),this.useLoaderData=t=>__({...t,from:this.id}),this.useNavigate=()=>mv({from:this.fullPath}),this.Link=X.forwardRef((t,o)=>T.jsx(Fs,{ref:o,from:this.fullPath,...t}))}};function Me(e){return new u$(e)}var p$=class extends Nz{constructor(e){super(e),this.useMatch=t=>Ns({select:t?.select,from:this.id,structuralSharing:t?.structuralSharing}),this.useRouteContext=t=>k_({...t,from:this.id}),this.useSearch=t=>P_({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useParams=t=>Rd({select:t?.select,structuralSharing:t?.structuralSharing,from:this.id}),this.useLoaderDeps=t=>C_({...t,from:this.id}),this.useLoaderData=t=>__({...t,from:this.id}),this.useNavigate=()=>mv({from:this.fullPath}),this.Link=X.forwardRef((t,o)=>T.jsx(Fs,{ref:o,from:this.fullPath,...t}))}};function m$(e){return new p$(e)}function Ue(e,t){let o,a,n,i;const l=()=>(o||(o=e().then(u=>{o=void 0,a=u[t??"default"]}).catch(u=>{if(n=u,jU(n)&&n instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const p=`tanstack_router_reload:${n.message}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),i=!0)}})),o),c=function(p){if(i)throw window.location.reload(),new Promise(()=>{});if(n)throw n;if(!a)if(E1)E1(l());else throw l();return R.createElement(a,p)};return c.preload=l,c}function g$(e){const t=Fa(),o=`not-found-${un(t.stores.location,a=>a.pathname)}-${un(t.stores.status,a=>a)}`;return T.jsx(T_,{getResetKey:()=>o,onCatch:(a,n)=>{if(Na(a))e.onCatch?.(a,n);else throw a},errorComponent:({error:a})=>{if(Na(a))return e.fallback?.(a);throw a},children:e.children})}function h$(){return T.jsx("p",{children:"Not Found"})}function Hc(e){return T.jsx(T.Fragment,{children:e.children})}function CI(e,t,o){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{...o}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{...o}):T.jsx(h$,{})}function f$(e){return null}function v$(){return f$(Fa()),null}var PI=R.memo(function({matchId:t}){const o=Fa(),a=o.stores.matchStores.get(t);a||Ri();const n=un(o.stores.loadedAt,l=>l),i=un(a,l=>l);return T.jsx(b$,{router:o,matchId:t,resetKey:n,matchState:R.useMemo(()=>{const l=i.routeId,c=o.routesById[l].parentRoute?.id;return{routeId:l,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:c}},[i._displayPending,i.routeId,i.ssr,o.routesById])})});function b$({router:e,matchId:t,resetKey:o,matchState:a}){const n=e.routesById[a.routeId],i=n.options.pendingComponent??e.options.defaultPendingComponent,l=i?T.jsx(i,{}):null,c=n.options.errorComponent??e.options.defaultErrorComponent,u=n.options.onCatch??e.options.defaultOnCatch,p=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,g=a.ssr===!1||a.ssr==="data-only",m=(!n.isRoot||n.options.wrapInSuspense||g)&&(n.options.wrapInSuspense??i??(n.options.errorComponent?.preload||g))?R.Suspense:Hc,f=c?T_:Hc,v=p?g$:Hc;return T.jsxs(n.isRoot?n.options.shellComponent??Hc:Hc,{children:[T.jsx(pv.Provider,{value:t,children:T.jsx(m,{fallback:l,children:T.jsx(f,{getResetKey:()=>o,errorComponent:c||w_,onCatch:(b,S)=>{if(Na(b))throw b.routeId??=a.routeId,b;u?.(b,S)},children:T.jsx(v,{fallback:b=>{if(b.routeId??=a.routeId,!p||b.routeId&&b.routeId!==a.routeId||!b.routeId&&!n.isRoot)throw b;return R.createElement(p,b)},children:g||a._displayPending?T.jsx(Uz,{fallback:l,children:T.jsx(tR,{matchId:t})}):T.jsx(tR,{matchId:t})})})})}),a.parentRouteId===Cl?T.jsxs(T.Fragment,{children:[T.jsx(y$,{resetKey:o}),e.options.scrollRestoration&&tI?T.jsx(v$,{}):null]}):null]})}function y$({resetKey:e}){const t=Fa(),o=R.useRef(void 0);return Zc(()=>{const a=t.latestLocation.href;(o.current===void 0||o.current!==a)&&(t.emit({type:"onRendered",...ad(t.stores.location.get(),t.stores.resolvedLocation.get())}),o.current=a)},[t.latestLocation.state.__TSR_key,e,t]),null}var tR=R.memo(function({matchId:t}){const o=Fa(),a=(g,m)=>o.getMatch(g.id)?._nonReactive[m]??g._nonReactive[m],n=o.stores.matchStores.get(t);n||Ri();const i=un(n,g=>g),l=i.routeId,c=o.routesById[l],u=R.useMemo(()=>{const g=(o.routesById[l].options.remountDeps??o.options.defaultRemountDeps)?.({routeId:l,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return g?JSON.stringify(g):void 0},[l,i.loaderDeps,i._strictParams,i._strictSearch,o.options.defaultRemountDeps,o.routesById]),p=R.useMemo(()=>{const g=c.options.component??o.options.defaultComponent;return g?T.jsx(g,{},u):T.jsx(x_,{})},[u,c.options.component,o.options.defaultComponent]);if(i._displayPending)throw a(i,"displayPendingPromise");if(i._forcePending)throw a(i,"minPendingPromise");if(i.status==="pending"){const g=c.options.pendingMinMs??o.options.defaultPendingMinMs;if(g){const m=o.getMatch(i.id);if(m&&!m._nonReactive.minPendingPromise){const f=hd();m._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),m._nonReactive.minPendingPromise=void 0},g)}}throw a(i,"loadPromise")}if(i.status==="notFound")return Na(i.error)||Ri(),CI(o,c,i.error);if(i.status==="redirected")throw ln(i.error)||Ri(),a(i,"loadPromise");if(i.status==="error")throw i.error;return p}),x_=R.memo(function(){const t=Fa(),o=R.useContext(pv);let a,n=!1,i;{const p=o?t.stores.matchStores.get(o):void 0;[a,n]=un(p,g=>[g?.routeId,g?.globalNotFound??!1]),i=un(t.stores.matchesId,g=>g[g.findIndex(m=>m===o)+1])}const l=a?t.routesById[a]:void 0,c=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(n)return l||Ri(),CI(t,l,void 0);if(!i)return null;const u=T.jsx(PI,{matchId:i});return a===Cl?T.jsx(R.Suspense,{fallback:c,children:u}):u});function S$(){const e=Fa(),t=R.useRef({router:e,mounted:!1}),[o,a]=R.useState(!1),n=un(e.stores.isLoading,m=>m),i=un(e.stores.hasPending,m=>m),l=TS(n),c=n||o||i,u=TS(c),p=n||i,g=TS(p);return e.startTransition=m=>{a(!0),R.startTransition(()=>{m(),a(!1)})},R.useEffect(()=>{const m=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return xi(e.latestLocation.publicHref)!==xi(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{m()}},[e,e.history]),Zc(()=>{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(f){console.error(f)}})()},[e]),Zc(()=>{l&&!n&&e.emit({type:"onLoad",...ad(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,e,n]),Zc(()=>{g&&!p&&e.emit({type:"onBeforeRouteMount",...ad(e.stores.location.get(),e.stores.resolvedLocation.get())})},[p,g,e]),Zc(()=>{if(u&&!c){const m=ad(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...m}),SI(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),m.hrefChanged&&Bz(e)}},[c,u,e]),null}function T$(){const e=Fa(),t=e.routesById[Cl].options.pendingComponent??e.options.defaultPendingComponent,o=t?T.jsx(t,{}):null,a=T.jsxs(typeof document<"u"&&e.ssr?Hc:R.Suspense,{fallback:o,children:[T.jsx(S$,{}),T.jsx(w$,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:a}):a}function w$(){const e=Fa(),t=un(e.stores.firstId,n=>n),o=un(e.stores.loadedAt,n=>n),a=t?T.jsx(PI,{matchId:t}):null;return T.jsx(pv.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?a:T.jsx(T_,{getResetKey:()=>o,errorComponent:w_,onCatch:void 0,children:a})})}var _$=e=>({createMutableStore:Z1,createReadonlyStore:Z1,batch:SI}),C$=e=>new P$(e),P$=class extends xz{constructor(e){super(e,_$)}};function k$({router:e,children:t,...o}){aI(o)&&e.update({...e.options,...o,context:{...e.options.context,...o.context}});const a=T.jsx(bI.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:a}):a}function x$({router:e,...t}){return T.jsx(k$,{router:e,...t,children:T.jsx(T$,{})})}function gv(e){const t=Fa({warn:e?.router===void 0}),o=e?.router||t,a=R.useRef(void 0);return un(o.stores.__store,n=>{if(e?.select){if(e.structuralSharing??o.options.defaultStructuralSharing){const i=Cs(a.current,e.select(n));return a.current=i,i}return e.select(n)}return n})}var IS={exports:{}},MS={};var oR;function E$(){if(oR)return MS;oR=1;var e=Ls().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;return MS.c=function(t){return e.H.useMemoCache(t)},MS}var aR;function R$(){return aR||(aR=1,IS.exports=E$()),IS.exports}var Ie=R$(),Ad=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(){}},A$=class extends Ad{#e;#t;#o;constructor(){super(),this.#o=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.#o)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#o=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"}},E_=new A$,D$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},O$=class{#e=D$;#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)}},Sl=new O$;function I$(e){setTimeout(e,0)}var M$=typeof window>"u"||"Deno"in globalThis;function ta(){}function L$(e,t){return typeof e=="function"?e(t):e}function TT(e){return typeof e=="number"&&e>=0&&e!==1/0}function kI(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Es(e,t){return typeof e=="function"?e(t):e}function _n(e,t){return typeof e=="function"?e(t):e}function nR(e,t){const{type:o="all",exact:a,fetchStatus:n,predicate:i,queryKey:l,stale:c}=e;if(l){if(a){if(t.queryHash!==R_(l,t.options))return!1}else if(!Tp(t.queryKey,l))return!1}if(o!=="all"){const u=t.isActive();if(o==="active"&&!u||o==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||n&&n!==t.state.fetchStatus||i&&!i(t))}function rR(e,t){const{exact:o,status:a,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(o){if(Rl(t.options.mutationKey)!==Rl(i))return!1}else if(!Tp(t.options.mutationKey,i))return!1}return!(a&&t.state.status!==a||n&&!n(t))}function R_(e,t){return(t?.queryKeyHashFn||Rl)(e)}function Rl(e){return JSON.stringify(e,(t,o)=>wT(o)?Object.keys(o).sort().reduce((a,n)=>(a[n]=o[n],a),{}):o)}function Tp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(o=>Tp(e[o],t[o])):!1}var N$=Object.prototype.hasOwnProperty;function xI(e,t,o=0){if(e===t)return e;if(o>500)return t;const a=iR(e)&&iR(t);if(!a&&!(wT(e)&&wT(t)))return t;const i=(a?e:Object.keys(e)).length,l=a?t:Object.keys(t),c=l.length,u=a?new Array(c):{};let p=0;for(let g=0;g<c;g++){const m=a?g:l[g],f=e[m],v=t[m];if(f===v){u[m]=f,(a?g<i:N$.call(e,m))&&p++;continue}if(f===null||v===null||typeof f!="object"||typeof v!="object"){u[m]=v;continue}const b=xI(f,v,o+1);u[m]=b,b===f&&p++}return i===c&&p===i?e:u}function hf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e)if(e[o]!==t[o])return!1;return!0}function iR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wT(e){if(!sR(e))return!1;const t=e.constructor;if(t===void 0)return!0;const o=t.prototype;return!(!sR(o)||!o.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sR(e){return Object.prototype.toString.call(e)==="[object Object]"}function F$(e){return new Promise(t=>{Sl.setTimeout(t,e)})}function _T(e,t,o){return typeof o.structuralSharing=="function"?o.structuralSharing(e,t):o.structuralSharing!==!1?xI(e,t):t}function Zhe(e){return e}function B$(e,t,o=0){const a=[...e,t];return o&&a.length>o?a.slice(1):a}function j$(e,t,o=0){const a=[t,...e];return o&&a.length>o?a.slice(0,-1):a}var A_=Symbol();function EI(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===A_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function D_(e,t){return typeof e=="function"?e(...t):!!e}function U$(e,t,o){let a=!1,n;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(n??=t(),a||(a=!0,n.aborted?o():n.addEventListener("abort",o,{once:!0})),n)}),e}var wp=(()=>{let e=()=>M$;return{isServer(){return e()},setIsServer(t){e=t}}})();function CT(){let e,t;const o=new Promise((n,i)=>{e=n,t=i});o.status="pending",o.catch(()=>{});function a(n){Object.assign(o,n),delete o.resolve,delete o.reject}return o.resolve=n=>{a({status:"fulfilled",value:n}),e(n)},o.reject=n=>{a({status:"rejected",reason:n}),t(n)},o}function z$(e){let t;if(e.then(o=>(t=o,o),ta)?.catch(ta),t!==void 0)return{data:t}}function RI(e){return e}function $$(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function q$(e,t,o){const a=()=>{const n=e.promise?.then(t).catch(i=>o(i)?Promise.reject(new Error("redacted")):Promise.reject(i));return n?.catch(ta),n};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:a()},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function V$(e){return e.state.isPaused}function H$(e){return e.state.status==="success"}function G$(e){return!0}function K$(e,t={}){const o=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??V$,a=e.getMutationCache().getAll().flatMap(u=>o(u)?[$$(u)]:[]),n=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??H$,i=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??G$,l=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??RI,c=e.getQueryCache().getAll().flatMap(u=>n(u)?[q$(u,l,i)]:[]);return{mutations:a,queries:c}}function W$(e,t,o){if(typeof t!="object"||t===null)return;const a=e.getMutationCache(),n=e.getQueryCache(),i=e.getDefaultOptions().hydrate?.deserializeData??RI,l=t.mutations||[],c=t.queries||[];l.forEach(({state:u,...p})=>{a.build(e,{...e.getDefaultOptions().hydrate?.mutations,...o?.defaultOptions?.mutations,...p},u)}),c.forEach(({queryKey:u,state:p,queryHash:g,meta:m,promise:f,dehydratedAt:v,queryType:b})=>{const S=f?z$(f):void 0,C=p.data===void 0?S?.data:p.data,w=C===void 0?C:i(C);let _=n.get(g);const E=_?.state.status==="pending",k=_?.state.fetchStatus==="fetching";if(_){const x=S&&v!==void 0&&v>_.state.dataUpdatedAt;if(p.dataUpdatedAt>_.state.dataUpdatedAt||x){const{fetchStatus:A,...D}=p;_.setState({...D,data:w,...p.status==="pending"&&w!==void 0&&{status:"success",...!k&&{fetchStatus:"idle"}}})}}else _=n.build(e,{...e.getDefaultOptions().hydrate?.queries,...o?.defaultOptions?.queries,queryKey:u,queryHash:g,meta:m,_type:b},{...p,data:w,fetchStatus:"idle",status:p.status==="pending"&&w!==void 0?"success":p.status});f&&!S&&!E&&!k&&(v===void 0||v>_.state.dataUpdatedAt)&&_.fetch(void 0,{initialPromise:Promise.resolve(f).then(i)}).catch(ta)})}var Y$=I$;function Z$(){let e=[],t=0,o=c=>{c()},a=c=>{c()},n=Y$;const i=c=>{t?e.push(c):n(()=>{o(c)})},l=()=>{const c=e;e=[],c.length&&n(()=>{a(()=>{c.forEach(u=>{o(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||l()}return u},batchCalls:c=>(...u)=>{i(()=>{c(...u)})},schedule:i,setNotifyFunction:c=>{o=c},setBatchNotifyFunction:c=>{a=c},setScheduler:c=>{n=c}}}var aa=Z$(),Q$=class extends Ad{#e=!0;#t;#o;constructor(){super(),this.#o=e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),o=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",o)}}}}onSubscribe(){this.#t||this.setEventListener(this.#o)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#o=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(o=>{o(e)}))}isOnline(){return this.#e}},ff=new Q$;function J$(e){return Math.min(1e3*2**e,3e4)}function AI(e){return(e??"online")==="online"?ff.isOnline():!0}var PT=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function DI(e){let t=!1,o=0,a;const n=CT(),i=()=>n.status!=="pending",l=S=>{if(!i()){const C=new PT(S);f(C),e.onCancel?.(C)}},c=()=>{t=!0},u=()=>{t=!1},p=()=>E_.isFocused()&&(e.networkMode==="always"||ff.isOnline())&&e.canRun(),g=()=>AI(e.networkMode)&&e.canRun(),m=S=>{i()||(a?.(),n.resolve(S))},f=S=>{i()||(a?.(),n.reject(S))},v=()=>new Promise(S=>{a=C=>{(i()||p())&&S(C)},e.onPause?.()}).then(()=>{a=void 0,i()||e.onContinue?.()}),b=()=>{if(i())return;let S;const C=o===0?e.initialPromise:void 0;try{S=C??e.fn()}catch(w){S=Promise.reject(w)}Promise.resolve(S).then(m).catch(w=>{if(i())return;const _=e.retry??(wp.isServer()?0:3),E=e.retryDelay??J$,k=typeof E=="function"?E(o,w):E,x=_===!0||typeof _=="number"&&o<_||typeof _=="function"&&_(o,w);if(t||!x){f(w);return}o++,e.onFail?.(o,w),F$(k).then(()=>p()?void 0:v()).then(()=>{t?f(w):b()})})};return{promise:n,status:()=>n.status,cancel:l,continue:()=>(a?.(),n),cancelRetry:c,continueRetry:u,canStart:g,start:()=>(g()?b():v().then(b),n)}}var OI=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),TT(this.gcTime)&&(this.#e=Sl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wp.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Sl.clearTimeout(this.#e),this.#e=void 0)}};function X$(e){return{onFetch:(t,o)=>{const a=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],l=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},u=0;const p=async()=>{let g=!1;const m=b=>{U$(b,()=>t.signal,()=>g=!0)},f=EI(t.options,t.fetchOptions),v=async(b,S,C)=>{if(g)return Promise.reject(t.signal.reason);if(S==null&&b.pages.length)return Promise.resolve(b);const _=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};return m(A),A})(),E=await f(_),{maxPages:k}=t.options,x=C?j$:B$;return{pages:x(b.pages,E,k),pageParams:x(b.pageParams,S,k)}};if(n&&i.length){const b=n==="backward",S=b?II:kT,C={pages:i,pageParams:l},w=S(a,C);c=await v(C,w,b)}else{const b=e??i.length;do{const S=u===0?l[0]??a.initialPageParam:kT(a,c);if(u>0&&S==null)break;c=await v(c,S),u++}while(u<b)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},o):t.fetchFn=p}}}function kT(e,{pages:t,pageParams:o}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,o[a],o):void 0}function II(e,{pages:t,pageParams:o}){return t.length>0?e.getPreviousPageParam?.(t[0],t,o[0],o):void 0}function Qhe(e,t){return t?kT(e,t)!=null:!1}function Jhe(e,t){return!t||!e.getPreviousPageParam?!1:II(e,t)!=null}var e8=class extends OI{#e;#t;#o;#a;#r;#n;#s;#i;constructor(e){super(),this.#i=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#a=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=cR(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.#n?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=cR(this.options);t.data!==void 0&&(this.setState(lR(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#a.remove(this)}setData(e,t){const o=_T(this.state.data,e,this.options);return this.#l({data:o,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),o}setState(e){this.#l({type:"setState",state:e})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(ta).catch(ta):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=>_n(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===A_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Es(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:!kI(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.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.#n&&(this.#i||this.#d()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#d(){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.#n?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(p=>p.options.queryFn);u&&this.setOptions(u.options)}const o=new AbortController,a=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(this.#i=!0,o.signal)})},n=()=>{const u=EI(this.options,t),g=(()=>{const m={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(m),m})();return this.#i=!1,this.options.persister?this.options.persister(u,g,this):u(g)},l=(()=>{const u={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:n};return a(u),u})();(this.#e==="infinite"?X$(this.options.pages):this.options.behavior)?.onFetch(l,this),this.#o=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#l({type:"fetch",meta:l.fetchOptions?.meta}),this.#n=DI({initialPromise:t?.initialPromise,fn:l.fetchFn,onCancel:u=>{u instanceof PT&&u.revert&&this.setState({...this.#o,fetchStatus:"idle"}),o.abort()},onFail:(u,p)=>{this.#l({type:"failed",failureCount:u,error:p})},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 u=await this.#n.start();if(u===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(u),this.#a.config.onSuccess?.(u,this),this.#a.config.onSettled?.(u,this.state.error,this),u}catch(u){if(u instanceof PT){if(u.silent)return this.#n.promise;if(u.revert){if(this.state.data===void 0)throw u;return this.state.data}}throw this.#l({type:"error",error:u}),this.#a.config.onError?.(u,this),this.#a.config.onSettled?.(this.state.data,u,this),u}finally{this.scheduleGc()}}#l(e){const t=o=>{switch(e.type){case"failed":return{...o,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...MI(o.data,this.options),fetchMeta:e.meta??null};case"success":const a={...o,...lR(e.data,e.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#o=e.manual?a:void 0,a;case"error":const n=e.error;return{...o,error:n,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...e.state}}};this.state=t(this.state),aa.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function MI(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:AI(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lR(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function cR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,o=t!==void 0,a=o?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:o?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:o?"success":"pending",fetchStatus:"idle"}}var LI=class extends Ad{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#s=CT(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#o=void 0;#a=void 0;#r;#n;#s;#i;#d;#l;#g;#u;#p;#c;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),dR(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xT(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xT(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#S(),this.#T(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,o=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 _n(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),t._defaulted&&!hf(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&uR(this.#t,o,this.options,t)&&this.#m(),this.updateResult(),a&&(this.#t!==o||_n(this.options.enabled,this.#t)!==_n(t.enabled,this.#t)||Es(this.options.staleTime,this.#t)!==Es(t.staleTime,this.#t))&&this.#f();const n=this.#v();a&&(this.#t!==o||_n(this.options.enabled,this.#t)!==_n(t.enabled,this.#t)||n!==this.#c)&&this.#b(n)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),o=this.createResult(t,e);return o8(this,o)&&(this.#a=o,this.#n=this.options,this.#r=this.#t.state),o}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(o,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,a))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),o=this.#e.getQueryCache().build(this.#e,t);return o.fetch().then(()=>this.createResult(o,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#m(e){this.#w();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ta)),t}#f(){this.#S();const e=Es(this.options.staleTime,this.#t);if(wp.isServer()||this.#a.isStale||!TT(e))return;const o=kI(this.#a.dataUpdatedAt,e)+1;this.#u=Sl.setTimeout(()=>{this.#a.isStale||this.updateResult()},o)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#b(e){this.#T(),this.#c=e,!(wp.isServer()||_n(this.options.enabled,this.#t)===!1||!TT(this.#c)||this.#c===0)&&(this.#p=Sl.setInterval(()=>{(this.options.refetchIntervalInBackground||E_.isFocused())&&this.#m()},this.#c))}#y(){this.#f(),this.#b(this.#v())}#S(){this.#u!==void 0&&(Sl.clearTimeout(this.#u),this.#u=void 0)}#T(){this.#p!==void 0&&(Sl.clearInterval(this.#p),this.#p=void 0)}createResult(e,t){const o=this.#t,a=this.options,n=this.#a,i=this.#r,l=this.#n,u=e!==o?e.state:this.#o,{state:p}=e;let g={...p},m=!1,f;if(t._optimisticResults){const O=this.hasListeners(),N=!O&&dR(e,t),$=O&&uR(e,o,t,a);(N||$)&&(g={...g,...MI(p.data,e.options)}),t._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:S}=g;f=g.data;let C=!1;if(t.placeholderData!==void 0&&f===void 0&&S==="pending"){let O;n?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(O=n.data,C=!0):O=typeof t.placeholderData=="function"?t.placeholderData(this.#g?.state.data,this.#g):t.placeholderData,O!==void 0&&(S="success",f=_T(n?.data,O,t),m=!0)}if(t.select&&f!==void 0&&!C)if(n&&f===i?.data&&t.select===this.#d)f=this.#l;else try{this.#d=t.select,f=t.select(f),f=_T(n?.data,f,t),this.#l=f,this.#i=null}catch(O){this.#i=O}this.#i&&(v=this.#i,f=this.#l,b=Date.now(),S="error");const w=g.fetchStatus==="fetching",_=S==="pending",E=S==="error",k=_&&w,x=f!==void 0,D={status:S,fetchStatus:g.fetchStatus,isPending:_,isSuccess:S==="success",isError:E,isInitialLoading:k,isLoading:k,data:f,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:g.dataUpdateCount>u.dataUpdateCount||g.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!_,isLoadingError:E&&!x,isPaused:g.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:E&&x,isStale:O_(e,t),refetch:this.refetch,promise:this.#s,isEnabled:_n(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const O=D.data!==void 0,N=D.status==="error"&&!O,$=j=>{N?j.reject(D.error):O&&j.resolve(D.data)},F=()=>{const j=this.#s=D.promise=CT();$(j)},z=this.#s;switch(z.status){case"pending":e.queryHash===o.queryHash&&$(z);break;case"fulfilled":(N||D.data!==z.value)&&F();break;case"rejected":(!N||D.error!==z.reason)&&F();break}}return D}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#n=this.options,this.#r.data!==void 0&&(this.#g=this.#t),hf(t,e))return;this.#a=t;const o=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,n=typeof a=="function"?a():a;if(n==="all"||!n&&!this.#h.size)return!0;const i=new Set(n??this.#h);return this.options.throwOnError&&i.add("error"),Object.keys(this.#a).some(l=>{const c=l;return this.#a[c]!==e[c]&&i.has(c)})};this.#_({listeners:o()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#_(e){aa.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function t8(e,t){return _n(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&_n(t.retryOnMount,e)===!1)}function dR(e,t){return t8(e,t)||e.state.data!==void 0&&xT(e,t,t.refetchOnMount)}function xT(e,t,o){if(_n(t.enabled,e)!==!1&&Es(t.staleTime,e)!=="static"){const a=typeof o=="function"?o(e):o;return a==="always"||a!==!1&&O_(e,t)}return!1}function uR(e,t,o,a){return(e!==t||_n(a.enabled,e)===!1)&&(!o.suspense||e.state.status!=="error")&&O_(e,o)}function O_(e,t){return _n(t.enabled,e)!==!1&&e.isStaleByTime(Es(t.staleTime,e))}function o8(e,t){return!hf(e.getCurrentResult(),t)}var a8=class extends OI{#e;#t;#o;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#o=e.mutationCache,this.#t=[],this.state=e.state||NI(),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.#o.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#o.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#o.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=DI({fn:()=>this.options.mutationFn?this.options.mutationFn(e,o):Promise.reject(new Error("No mutationFn found")),onFail:(i,l)=>{this.#r({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#o.canRun(this)});const a=this.state.status==="pending",n=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:n}),this.#o.config.onMutate&&await this.#o.config.onMutate(e,this,o);const l=await this.options.onMutate?.(e,o);l!==this.state.context&&this.#r({type:"pending",context:l,variables:e,isPaused:n})}const i=await this.#a.start();return await this.#o.config.onSuccess?.(i,e,this.state.context,this,o),await this.options.onSuccess?.(i,e,this.state.context,o),await this.#o.config.onSettled?.(i,null,this.state.variables,this.state.context,this,o),await this.options.onSettled?.(i,null,e,this.state.context,o),this.#r({type:"success",data:i}),i}catch(i){try{await this.#o.config.onError?.(i,e,this.state.context,this,o)}catch(l){Promise.reject(l)}try{await this.options.onError?.(i,e,this.state.context,o)}catch(l){Promise.reject(l)}try{await this.#o.config.onSettled?.(void 0,i,this.state.variables,this.state.context,this,o)}catch(l){Promise.reject(l)}try{await this.options.onSettled?.(void 0,i,e,this.state.context,o)}catch(l){Promise.reject(l)}throw this.#r({type:"error",error:i}),i}finally{this.#o.runNext(this)}}#r(e){const t=o=>{switch(e.type){case"failed":return{...o,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,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{...o,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:e.error,failureCount:o.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),aa.batch(()=>{this.#t.forEach(o=>{o.onMutationUpdate(e)}),this.#o.notify({mutation:this,type:"updated",action:e})})}};function NI(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var FI=class extends Ad{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#o=0}#e;#t;#o;build(e,t,o){const a=new a8({client:e,mutationCache:this,mutationId:++this.#o,options:e.defaultMutationOptions(t),state:o});return this.add(a),a}add(e){this.#e.add(e);const t=Eg(e);if(typeof t=="string"){const o=this.#t.get(t);o?o.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Eg(e);if(typeof t=="string"){const o=this.#t.get(t);if(o)if(o.length>1){const a=o.indexOf(e);a!==-1&&o.splice(a,1)}else o[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Eg(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(n=>n.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=Eg(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){aa.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(o=>rR(t,o))}findAll(e={}){return this.getAll().filter(t=>rR(e,t))}notify(e){aa.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return aa.batch(()=>Promise.all(e.map(t=>t.continue().catch(ta))))}};function Eg(e){return e.options.scope?.id}var n8=class extends Ad{#e;#t=void 0;#o;#a;constructor(t,o){super(),this.#e=t,this.setOptions(o),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const o=this.options;this.options=this.#e.defaultMutationOptions(t),hf(this.options,o)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#o,observer:this}),o?.mutationKey&&this.options.mutationKey&&Rl(o.mutationKey)!==Rl(this.options.mutationKey)?this.reset():this.#o?.state.status==="pending"&&this.#o.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#o?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#o?.removeObserver(this),this.#o=void 0,this.#r(),this.#n()}mutate(t,o){return this.#a=o,this.#o?.removeObserver(this),this.#o=this.#e.getMutationCache().build(this.#e,this.options),this.#o.addObserver(this),this.#o.execute(t)}#r(){const t=this.#o?.state??NI();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}}#n(t){aa.batch(()=>{if(this.#a&&this.hasListeners()){const o=this.#t.variables,a=this.#t.context,n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#a.onSuccess?.(t.data,o,a,n)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(t.data,null,o,a,n)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#a.onError?.(t.error,o,a,n)}catch(i){Promise.reject(i)}try{this.#a.onSettled?.(void 0,t.error,o,a,n)}catch(i){Promise.reject(i)}}}this.listeners.forEach(o=>{o(this.#t)})})}},BI=class extends Ad{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,o){const a=t.queryKey,n=t.queryHash??R_(a,t);let i=this.get(n);return i||(i=new e8({client:e,queryKey:a,queryHash:n,options:e.defaultQueryOptions(t),state:o,defaultOptions:e.getQueryDefaults(a)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){aa.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(o=>nR(t,o))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(o=>nR(e,o)):t}notify(e){aa.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){aa.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){aa.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},r8=class{#e;#t;#o;#a;#r;#n;#s;#i;constructor(e={}){this.#e=e.queryCache||new BI,this.#t=e.mutationCache||new FI,this.#o=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#s=E_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=ff.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=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),o=this.#e.build(this,t),a=o.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&o.isStaleByTime(Es(t.staleTime,o))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:o})=>{const a=o.data;return[t,a]})}setQueryData(e,t,o){const a=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(a.queryHash)?.state.data,l=L$(t,i);if(l!==void 0)return this.#e.build(this,a).setData(l,{...o,manual:!0})}setQueriesData(e,t,o){return aa.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,o)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;aa.batch(()=>{t.findAll(e).forEach(o=>{t.remove(o)})})}resetQueries(e,t){const o=this.#e;return aa.batch(()=>(o.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const o={revert:!0,...t},a=aa.batch(()=>this.#e.findAll(e).map(n=>n.cancel(o)));return Promise.all(a).then(ta).catch(ta)}invalidateQueries(e,t={}){return aa.batch(()=>(this.#e.findAll(e).forEach(o=>{o.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const o={...t,cancelRefetch:t.cancelRefetch??!0},a=aa.batch(()=>this.#e.findAll(e).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,o);return o.throwOnError||(i=i.catch(ta)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(a).then(ta)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const o=this.#e.build(this,t);return o.isStaleByTime(Es(t.staleTime,o))?o.fetch(t):Promise.resolve(o.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ta).catch(ta)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ta).catch(ta)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return ff.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#a.set(Rl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],o={};return t.forEach(a=>{Tp(e,a.queryKey)&&Object.assign(o,a.defaultOptions)}),o}setMutationDefaults(e,t){this.#r.set(Rl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],o={};return t.forEach(a=>{Tp(e,a.mutationKey)&&Object.assign(o,a.defaultOptions)}),o}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=R_(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===A_&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},jI=R.createContext(void 0),hv=e=>{const t=R.useContext(jI);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},i8=({client:e,children:t})=>(R.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(jI.Provider,{value:e,children:t})),UI=R.createContext(!1),s8=()=>R.useContext(UI);UI.Provider;function zI(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $I=R.createContext(zI()),l8=()=>R.useContext($I),efe=({children:e})=>{const[t]=R.useState(()=>zI());return T.jsx($I.Provider,{value:t,children:typeof e=="function"?e(t):e})},c8=(e,t,o)=>{const a=o?.state.error&&typeof e.throwOnError=="function"?D_(e.throwOnError,[o.state.error,o]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},d8=e=>{R.useEffect(()=>{e.clearReset()},[e])},u8=({result:e,errorResetBoundary:t,throwOnError:o,query:a,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(n&&e.data===void 0||D_(o,[e.error,a])),p8=(e,t)=>t.state.data===void 0,m8=e=>{if(e.suspense){const o=n=>n==="static"?n:Math.max(n??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...n)=>o(a(...n)):o(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},g8=(e,t)=>e.isLoading&&e.isFetching&&!t,h8=(e,t)=>e?.suspense&&t.isPending,pR=(e,t,o)=>t.fetchOptimistic(e).catch(()=>{o.clearReset()});function qI(e,t,o){const a=s8(),n=l8(),i=hv(o),l=i.defaultQueryOptions(e);i.getDefaultOptions().queries?._experimental_beforeQuery?.(l);const c=i.getQueryCache().get(l.queryHash);l._optimisticResults=a?"isRestoring":"optimistic",m8(l),c8(l,n,c),d8(n);const u=!i.getQueryCache().get(l.queryHash),[p]=R.useState(()=>new t(i,l)),g=p.getOptimisticResult(l),m=!a&&e.subscribed!==!1;if(R.useSyncExternalStore(R.useCallback(f=>{const v=m?p.subscribe(aa.batchCalls(f)):ta;return p.updateResult(),v},[p,m]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),R.useEffect(()=>{p.setOptions(l)},[l,p]),h8(l,g))throw pR(l,p,n);if(u8({result:g,errorResetBoundary:n,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw g.error;return i.getDefaultOptions().queries?._experimental_afterQuery?.(l,g),l.experimental_prefetchInRender&&!wp.isServer()&&g8(g,a)&&(u?pR(l,p,n):c?.promise)?.catch(ta).finally(()=>{p.updateResult()}),l.notifyOnChangeProps?g:p.trackResult(g)}function Dd(e,t){return qI(e,LI,t)}function Nl(e,t){return qI({...e,enabled:!0,suspense:!0,throwOnError:p8,placeholderData:void 0},LI,t)}function lp(e,t){const o=hv(t),[a]=R.useState(()=>new n8(o,e));R.useEffect(()=>{a.setOptions(e)},[a,e]);const n=R.useSyncExternalStore(R.useCallback(l=>a.subscribe(aa.batchCalls(l)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),i=R.useCallback((l,c)=>{a.mutate(l,c).catch(ta)},[a]);if(n.error&&D_(a.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}const f8=Object.freeze({status:"aborted"});function be(e,t,o){function a(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:l,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),t(c,u);const p=l.prototype,g=Object.keys(p);for(let m=0;m<g.length;m++){const f=g[m];f in c||(c[f]=p[f].bind(c))}}const n=o?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function l(c){var u;const p=o?.Parent?new i:this;a(p,c),(u=p._zod).deferred??(u.deferred=[]);for(const g of p._zod.deferred)g();return p}return Object.defineProperty(l,"init",{value:a}),Object.defineProperty(l,Symbol.hasInstance,{value:c=>o?.Parent&&c instanceof o.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(l,"name",{value:e}),l}class nd extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class VI extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const HI={};function Os(e){return HI}function GI(e){const t=Object.values(e).filter(a=>typeof a=="number");return Object.entries(e).filter(([a,n])=>t.indexOf(+a)===-1).map(([a,n])=>n)}function ET(e,t){return typeof t=="bigint"?t.toString():t}function fv(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function zp(e){return e==null}function I_(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}function v8(e,t){const o=(e.toString().split(".")[1]||"").length,a=t.toString();let n=(a.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(a)){const u=a.match(/\d?e-(\d?)/);u?.[1]&&(n=Number.parseInt(u[1]))}const i=o>n?o:n,l=Number.parseInt(e.toFixed(i).replace(".","")),c=Number.parseInt(t.toFixed(i).replace(".",""));return l%c/10**i}const mR=Symbol("evaluating");function Dt(e,t,o){let a;Object.defineProperty(e,t,{get(){if(a!==mR)return a===void 0&&(a=mR,a=o()),a},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Fl(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function Bs(...e){const t={};for(const o of e){const a=Object.getOwnPropertyDescriptors(o);Object.assign(t,a)}return Object.defineProperties({},t)}function gR(e){return JSON.stringify(e)}function b8(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const KI="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function _p(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const y8=fv(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function fd(e){if(_p(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const o=t.prototype;return!(_p(o)===!1||Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)}function WI(e){return fd(e)?{...e}:Array.isArray(e)?[...e]:e}const S8=new Set(["string","number","symbol"]);function vd(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Di(e,t,o){const a=new e._zod.constr(t??e._zod.def);return(!t||o?.parent)&&(a._zod.parent=e),a}function qe(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 T8(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const w8={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 _8(e,t){const o=e._zod.def,a=o.checks;if(a&&a.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Bs(e._zod.def,{get shape(){const l={};for(const c in t){if(!(c in o.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&(l[c]=o.shape[c])}return Fl(this,"shape",l),l},checks:[]});return Di(e,i)}function C8(e,t){const o=e._zod.def,a=o.checks;if(a&&a.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Bs(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const c in t){if(!(c in o.shape))throw new Error(`Unrecognized key: "${c}"`);t[c]&&delete l[c]}return Fl(this,"shape",l),l},checks:[]});return Di(e,i)}function P8(e,t){if(!fd(t))throw new Error("Invalid input to extend: expected a plain object");const o=e._zod.def.checks;if(o&&o.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=Bs(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return Fl(this,"shape",i),i}});return Di(e,n)}function k8(e,t){if(!fd(t))throw new Error("Invalid input to safeExtend: expected a plain object");const o=Bs(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t};return Fl(this,"shape",a),a}});return Di(e,o)}function x8(e,t){const o=Bs(e._zod.def,{get shape(){const a={...e._zod.def.shape,...t._zod.def.shape};return Fl(this,"shape",a),a},get catchall(){return t._zod.def.catchall},checks:[]});return Di(e,o)}function E8(e,t,o){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Bs(t._zod.def,{get shape(){const c=t._zod.def.shape,u={...c};if(o)for(const p in o){if(!(p in c))throw new Error(`Unrecognized key: "${p}"`);o[p]&&(u[p]=e?new e({type:"optional",innerType:c[p]}):c[p])}else for(const p in c)u[p]=e?new e({type:"optional",innerType:c[p]}):c[p];return Fl(this,"shape",u),u},checks:[]});return Di(t,l)}function R8(e,t,o){const a=Bs(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(o)for(const l in o){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);o[l]&&(i[l]=new e({type:"nonoptional",innerType:n[l]}))}else for(const l in n)i[l]=new e({type:"nonoptional",innerType:n[l]});return Fl(this,"shape",i),i}});return Di(t,a)}function Qc(e,t=0){if(e.aborted===!0)return!0;for(let o=t;o<e.issues.length;o++)if(e.issues[o]?.continue!==!0)return!0;return!1}function Tl(e,t){return t.map(o=>{var a;return(a=o).path??(a.path=[]),o.path.unshift(e),o})}function Rg(e){return typeof e=="string"?e:e?.message}function Is(e,t,o){const a={...e,path:e.path??[]};if(!e.message){const n=Rg(e.inst?._zod.def?.error?.(e))??Rg(t?.error?.(e))??Rg(o.customError?.(e))??Rg(o.localeError?.(e))??"Invalid input";a.message=n}return delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}function YI(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function M_(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Cp(...e){const[t,o,a]=e;return typeof t=="string"?{message:t,code:"custom",input:o,inst:a}:{...t}}const ZI=(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,ET,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},L_=be("$ZodError",ZI),vv=be("$ZodError",ZI,{Parent:Error});function A8(e,t=o=>o.message){const o={},a=[];for(const n of e.issues)n.path.length>0?(o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(t(n))):a.push(t(n));return{formErrors:a,fieldErrors:o}}function D8(e,t=o=>o.message){const o={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>a({issues:l}));else if(i.code==="invalid_key")a({issues:i.issues});else if(i.code==="invalid_element")a({issues:i.issues});else if(i.path.length===0)o._errors.push(t(i));else{let l=o,c=0;for(;c<i.path.length;){const u=i.path[c];c===i.path.length-1?(l[u]=l[u]||{_errors:[]},l[u]._errors.push(t(i))):l[u]=l[u]||{_errors:[]},l=l[u],c++}}};return a(e),o}const bv=e=>(t,o,a,n)=>{const i=a?Object.assign(a,{async:!1}):{async:!1},l=t._zod.run({value:o,issues:[]},i);if(l instanceof Promise)throw new nd;if(l.issues.length){const c=new(n?.Err??e)(l.issues.map(u=>Is(u,i,Os())));throw KI(c,n?.callee),c}return l.value},O8=bv(vv),yv=e=>async(t,o,a,n)=>{const i=a?Object.assign(a,{async:!0}):{async:!0};let l=t._zod.run({value:o,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const c=new(n?.Err??e)(l.issues.map(u=>Is(u,i,Os())));throw KI(c,n?.callee),c}return l.value},I8=yv(vv),Sv=e=>(t,o,a)=>{const n=a?{...a,async:!1}:{async:!1},i=t._zod.run({value:o,issues:[]},n);if(i instanceof Promise)throw new nd;return i.issues.length?{success:!1,error:new(e??L_)(i.issues.map(l=>Is(l,n,Os())))}:{success:!0,data:i.value}},M8=Sv(vv),Tv=e=>async(t,o,a)=>{const n=a?Object.assign(a,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Is(l,n,Os())))}:{success:!0,data:i.value}},L8=Tv(vv),N8=e=>(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return bv(e)(t,o,n)},F8=e=>(t,o,a)=>bv(e)(t,o,a),B8=e=>async(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return yv(e)(t,o,n)},j8=e=>async(t,o,a)=>yv(e)(t,o,a),U8=e=>(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Sv(e)(t,o,n)},z8=e=>(t,o,a)=>Sv(e)(t,o,a),$8=e=>async(t,o,a)=>{const n=a?Object.assign(a,{direction:"backward"}):{direction:"backward"};return Tv(e)(t,o,n)},q8=e=>async(t,o,a)=>Tv(e)(t,o,a),V8=/^[cC][^\s-]{8,}$/,H8=/^[0-9a-z]+$/,G8=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,K8=/^[0-9a-vA-V]{20}$/,W8=/^[A-Za-z0-9]{27}$/,Y8=/^[a-zA-Z0-9_-]{21}$/,Z8=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Q8=/^([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})$/,hR=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)$/,J8=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,X8="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function eq(){return new RegExp(X8,"u")}const tq=/^(?:(?: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])$/,oq=/^(([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}|:))$/,aq=/^((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])$/,nq=/^(([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])$/,rq=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,QI=/^[A-Za-z0-9_-]*$/,iq=/^\+[1-9]\d{6,14}$/,JI="(?:(?:\\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])))",sq=new RegExp(`^${JI}$`);function XI(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 lq(e){return new RegExp(`^${XI(e)}$`)}function cq(e){const t=XI({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const a=`${t}(?:${o.join("|")})`;return new RegExp(`^${JI}T(?:${a})$`)}const dq=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},uq=/^-?\d+$/,eM=/^-?\d+(?:\.\d+)?$/,pq=/^(?:true|false)$/i,mq=/^null$/i,gq=/^undefined$/i,hq=/^[^A-Z]*$/,fq=/^[^a-z]*$/,Pa=be("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),tM={number:"number",bigint:"bigint",object:"date"},oM=be("$ZodCheckLessThan",(e,t)=>{Pa.init(e,t);const o=tM[typeof t.value];e._zod.onattach.push(a=>{const n=a._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value<=t.value:a.value<t.value)||a.issues.push({origin:o,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),aM=be("$ZodCheckGreaterThan",(e,t)=>{Pa.init(e,t);const o=tM[typeof t.value];e._zod.onattach.push(a=>{const n=a._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=a=>{(t.inclusive?a.value>=t.value:a.value>t.value)||a.issues.push({origin:o,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:a.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vq=be("$ZodCheckMultipleOf",(e,t)=>{Pa.init(e,t),e._zod.onattach.push(o=>{var a;(a=o._zod.bag).multipleOf??(a.multipleOf=t.value)}),e._zod.check=o=>{if(typeof o.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof o.value=="bigint"?o.value%t.value===BigInt(0):v8(o.value,t.value)===0)||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:t.value,input:o.value,inst:e,continue:!t.abort})}}),bq=be("$ZodCheckNumberFormat",(e,t)=>{Pa.init(e,t),t.format=t.format||"float64";const o=t.format?.includes("int"),a=o?"int":"number",[n,i]=w8[t.format];e._zod.onattach.push(l=>{const c=l._zod.bag;c.format=t.format,c.minimum=n,c.maximum=i,o&&(c.pattern=uq)}),e._zod.check=l=>{const c=l.value;if(o){if(!Number.isInteger(c)){l.issues.push({expected:a,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:a,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:a,inclusive:!0,continue:!t.abort});return}}c<n&&l.issues.push({origin:"number",input:c,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),c>i&&l.issues.push({origin:"number",input:c,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),yq=be("$ZodCheckMaxSize",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.size!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const n=a.value;n.size<=t.maximum||a.issues.push({origin:YI(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Sq=be("$ZodCheckMinSize",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.size!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const n=a.value;n.size>=t.minimum||a.issues.push({origin:YI(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Tq=be("$ZodCheckMaxLength",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.length!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(a._zod.bag.maximum=t.maximum)}),e._zod.check=a=>{const n=a.value;if(n.length<=t.maximum)return;const l=M_(n);a.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),wq=be("$ZodCheckMinLength",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.length!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(a._zod.bag.minimum=t.minimum)}),e._zod.check=a=>{const n=a.value;if(n.length>=t.minimum)return;const l=M_(n);a.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),_q=be("$ZodCheckLengthEquals",(e,t)=>{var o;Pa.init(e,t),(o=e._zod.def).when??(o.when=a=>{const n=a.value;return!zp(n)&&n.length!==void 0}),e._zod.onattach.push(a=>{const n=a._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=a=>{const n=a.value,i=n.length;if(i===t.length)return;const l=M_(n),c=i>t.length;a.issues.push({origin:l,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:a.value,inst:e,continue:!t.abort})}}),wv=be("$ZodCheckStringFormat",(e,t)=>{var o,a;Pa.init(e,t),e._zod.onattach.push(n=>{const i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(a=e._zod).check??(a.check=()=>{})}),Cq=be("$ZodCheckRegex",(e,t)=>{wv.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Pq=be("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=hq),wv.init(e,t)}),kq=be("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=fq),wv.init(e,t)}),xq=be("$ZodCheckIncludes",(e,t)=>{Pa.init(e,t);const o=vd(t.includes),a=new RegExp(typeof t.position=="number"?`^.{${t.position}}${o}`:o);t.pattern=a,e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(a)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Eq=be("$ZodCheckStartsWith",(e,t)=>{Pa.init(e,t);const o=new RegExp(`^${vd(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(a=>{const n=a._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=a=>{a.value.startsWith(t.prefix)||a.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:a.value,inst:e,continue:!t.abort})}}),Rq=be("$ZodCheckEndsWith",(e,t)=>{Pa.init(e,t);const o=new RegExp(`.*${vd(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(a=>{const n=a._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=a=>{a.value.endsWith(t.suffix)||a.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:a.value,inst:e,continue:!t.abort})}}),Aq=be("$ZodCheckMimeType",(e,t)=>{Pa.init(e,t);const o=new Set(t.mime);e._zod.onattach.push(a=>{a._zod.bag.mime=t.mime}),e._zod.check=a=>{o.has(a.value.type)||a.issues.push({code:"invalid_value",values:t.mime,input:a.value.type,inst:e,continue:!t.abort})}}),Dq=be("$ZodCheckOverwrite",(e,t)=>{Pa.init(e,t),e._zod.check=o=>{o.value=t.tx(o.value)}});class Oq{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 a=t.split(`
11
11
  `).filter(l=>l),n=Math.min(...a.map(l=>l.length-l.trimStart().length)),i=a.map(l=>l.slice(n)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,o=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...o,n.join(`
12
- `))}}const I8={major:4,minor:3,patch:6},Ht=be("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=I8;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const n of a)for(const i of n._zod.onattach)i(e);if(a.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(l,c,u)=>{let p=Qc(l),g;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(p)continue;const f=l.issues.length,v=m._zod.check(l);if(v instanceof Promise&&u?.async===!1)throw new nd;if(g||v instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await v,l.issues.length!==f&&(p||(p=Qc(l,f)))});else{if(l.issues.length===f)continue;p||(p=Qc(l,f))}}return g?g.then(()=>l):l},i=(l,c,u)=>{if(Qc(l))return l.aborted=!0,l;const p=n(c,a,u);if(p instanceof Promise){if(u.async===!1)throw new nd;return p.then(g=>e._zod.parse(g,u))}return e._zod.parse(p,u)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const p=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return p instanceof Promise?p.then(g=>i(g,l,c)):i(p,l,c)}const u=e._zod.parse(l,c);if(u instanceof Promise){if(c.async===!1)throw new nd;return u.then(p=>n(p,a,c))}return n(u,a,c)}}Dt(e,"~standard",()=>({validate:n=>{try{const i=Mq(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Lq(e,n).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),N_=be("$ZodString",(e,t)=>{Ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??d8(e._zod.bag),e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),To=be("$ZodStringFormat",(e,t)=>{wv.init(e,t),N_.init(e,t)}),M8=be("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Qq),To.init(e,t)}),L8=be("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=hR(a))}else t.pattern??(t.pattern=hR());To.init(e,t)}),N8=be("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Jq),To.init(e,t)}),F8=be("$ZodURL",(e,t)=>{To.init(e,t),e._zod.check=o=>{try{const a=o.value.trim(),n=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:o.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})),t.normalize?o.value=n.href:o.value=a;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),B8=be("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=e8()),To.init(e,t)}),j8=be("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Yq),To.init(e,t)}),U8=be("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Vq),To.init(e,t)}),z8=be("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Hq),To.init(e,t)}),$8=be("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gq),To.init(e,t)}),q8=be("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Kq),To.init(e,t)}),V8=be("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Wq),To.init(e,t)}),H8=be("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=c8(t)),To.init(e,t)}),G8=be("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=s8),To.init(e,t)}),K8=be("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=l8(t)),To.init(e,t)}),W8=be("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Zq),To.init(e,t)}),Y8=be("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=t8),To.init(e,t),e._zod.bag.format="ipv4"}),Z8=be("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=o8),To.init(e,t),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),Q8=be("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=a8),To.init(e,t)}),J8=be("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=n8),To.init(e,t),e._zod.check=o=>{const a=o.value.split("/");try{if(a.length!==2)throw new Error;const[n,i]=a;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${n}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function nM(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const X8=be("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=r8),To.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{nM(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function eV(e){if(!QI.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),o=t.padEnd(Math.ceil(t.length/4)*4,"=");return nM(o)}const tV=be("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=QI),To.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{eV(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),oV=be("$ZodE164",(e,t)=>{t.pattern??(t.pattern=i8),To.init(e,t)});function aV(e,t=null){try{const o=e.split(".");if(o.length!==3)return!1;const[a]=o;if(!a)return!1;const n=JSON.parse(atob(a));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const nV=be("$ZodJWT",(e,t)=>{To.init(e,t),e._zod.check=o=>{aV(o.value,t.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}}),rM=be("$ZodNumber",(e,t)=>{Ht.init(e,t),e._zod.pattern=e._zod.bag.pattern??eM,e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=Number(o.value)}catch{}const n=o.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return o;const i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),o}}),rV=be("$ZodNumberFormat",(e,t)=>{b8.init(e,t),rM.init(e,t)}),iV=be("$ZodBoolean",(e,t)=>{Ht.init(e,t),e._zod.pattern=p8,e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=!!o.value}catch{}const n=o.value;return typeof n=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),o}}),sV=be("$ZodUndefined",(e,t)=>{Ht.init(e,t),e._zod.pattern=g8,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(o,a)=>{const n=o.value;return typeof n>"u"||o.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),o}}),lV=be("$ZodNull",(e,t)=>{Ht.init(e,t),e._zod.pattern=m8,e._zod.values=new Set([null]),e._zod.parse=(o,a)=>{const n=o.value;return n===null||o.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),o}}),cV=be("$ZodAny",(e,t)=>{Ht.init(e,t),e._zod.parse=o=>o}),dV=be("$ZodUnknown",(e,t)=>{Ht.init(e,t),e._zod.parse=o=>o}),uV=be("$ZodNever",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function fR(e,t,o){e.issues.length&&t.issues.push(...Tl(o,e.issues)),t.value[o]=e.value}const pV=be("$ZodArray",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value;if(!Array.isArray(n))return o.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),o;o.value=Array(n.length);const i=[];for(let l=0;l<n.length;l++){const c=n[l],u=t.element._zod.run({value:c,issues:[]},a);u instanceof Promise?i.push(u.then(p=>fR(p,o,l))):fR(u,o,l)}return i.length?Promise.all(i).then(()=>o):o}});function vf(e,t,o,a,n){if(e.issues.length){if(n&&!(o in a))return;t.issues.push(...Tl(o,e.issues))}e.value===void 0?o in a&&(t.value[o]=void 0):t.value[o]=e.value}function iM(e){const t=Object.keys(e.shape);for(const a of t)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const o=Tq(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function sM(e,t,o,a,n,i){const l=[],c=n.keySet,u=n.catchall._zod,p=u.def.type,g=u.optout==="optional";for(const m in t){if(c.has(m))continue;if(p==="never"){l.push(m);continue}const f=u.run({value:t[m],issues:[]},a);f instanceof Promise?e.push(f.then(v=>vf(v,o,m,t,g))):vf(f,o,m,t,g)}return l.length&&o.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>o):o}const mV=be("$ZodObject",(e,t)=>{if(Ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const a=fv(()=>iM(t));Dt(e._zod,"propValues",()=>{const c=t.shape,u={};for(const p in c){const g=c[p]._zod;if(g.values){u[p]??(u[p]=new Set);for(const m of g.values)u[p].add(m)}}return u});const n=_p,i=t.catchall;let l;e._zod.parse=(c,u)=>{l??(l=a.value);const p=c.value;if(!n(p))return c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c;c.value={};const g=[],m=l.shape;for(const f of l.keys){const v=m[f],b=v._zod.optout==="optional",S=v._zod.run({value:p[f],issues:[]},u);S instanceof Promise?g.push(S.then(C=>vf(C,c,f,p,b))):vf(S,c,f,p,b)}return i?sM(g,p,c,u,a.value,e):g.length?Promise.all(g).then(()=>c):c}}),gV=be("$ZodObjectJIT",(e,t)=>{mV.init(e,t);const o=e._zod.parse,a=fv(()=>iM(t)),n=f=>{const v=new O8(["shape","payload","ctx"]),b=a.value,S=E=>{const k=gR(E);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};v.write("const input = payload.value;");const C=Object.create(null);let w=0;for(const E of b.keys)C[E]=`key_${w++}`;v.write("const newResult = {};");for(const E of b.keys){const k=C[E],x=gR(E),D=f[E]?._zod?.optout==="optional";v.write(`const ${k} = ${S(E)};`),D?v.write(`
12
+ `))}}const Iq={major:4,minor:3,patch:6},Ht=be("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Iq;const a=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&a.unshift(e);for(const n of a)for(const i of n._zod.onattach)i(e);if(a.length===0)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(l,c,u)=>{let p=Qc(l),g;for(const m of c){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(p)continue;const f=l.issues.length,v=m._zod.check(l);if(v instanceof Promise&&u?.async===!1)throw new nd;if(g||v instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await v,l.issues.length!==f&&(p||(p=Qc(l,f)))});else{if(l.issues.length===f)continue;p||(p=Qc(l,f))}}return g?g.then(()=>l):l},i=(l,c,u)=>{if(Qc(l))return l.aborted=!0,l;const p=n(c,a,u);if(p instanceof Promise){if(u.async===!1)throw new nd;return p.then(g=>e._zod.parse(g,u))}return e._zod.parse(p,u)};e._zod.run=(l,c)=>{if(c.skipChecks)return e._zod.parse(l,c);if(c.direction==="backward"){const p=e._zod.parse({value:l.value,issues:[]},{...c,skipChecks:!0});return p instanceof Promise?p.then(g=>i(g,l,c)):i(p,l,c)}const u=e._zod.parse(l,c);if(u instanceof Promise){if(c.async===!1)throw new nd;return u.then(p=>n(p,a,c))}return n(u,a,c)}}Dt(e,"~standard",()=>({validate:n=>{try{const i=M8(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return L8(e,n).then(l=>l.success?{value:l.data}:{issues:l.error?.issues})}},vendor:"zod",version:1}))}),N_=be("$ZodString",(e,t)=>{Ht.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??dq(e._zod.bag),e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=String(o.value)}catch{}return typeof o.value=="string"||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),To=be("$ZodStringFormat",(e,t)=>{wv.init(e,t),N_.init(e,t)}),Mq=be("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Q8),To.init(e,t)}),Lq=be("$ZodUUID",(e,t)=>{if(t.version){const a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(a===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=hR(a))}else t.pattern??(t.pattern=hR());To.init(e,t)}),Nq=be("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=J8),To.init(e,t)}),Fq=be("$ZodURL",(e,t)=>{To.init(e,t),e._zod.check=o=>{try{const a=o.value.trim(),n=new URL(a);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:o.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})),t.normalize?o.value=n.href:o.value=a;return}catch{o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),Bq=be("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=eq()),To.init(e,t)}),jq=be("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Y8),To.init(e,t)}),Uq=be("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=V8),To.init(e,t)}),zq=be("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=H8),To.init(e,t)}),$q=be("$ZodULID",(e,t)=>{t.pattern??(t.pattern=G8),To.init(e,t)}),qq=be("$ZodXID",(e,t)=>{t.pattern??(t.pattern=K8),To.init(e,t)}),Vq=be("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=W8),To.init(e,t)}),Hq=be("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=cq(t)),To.init(e,t)}),Gq=be("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=sq),To.init(e,t)}),Kq=be("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=lq(t)),To.init(e,t)}),Wq=be("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Z8),To.init(e,t)}),Yq=be("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tq),To.init(e,t),e._zod.bag.format="ipv4"}),Zq=be("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=oq),To.init(e,t),e._zod.bag.format="ipv6",e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),Qq=be("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=aq),To.init(e,t)}),Jq=be("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=nq),To.init(e,t),e._zod.check=o=>{const a=o.value.split("/");try{if(a.length!==2)throw new Error;const[n,i]=a;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${n}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function nM(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const Xq=be("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=rq),To.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=o=>{nM(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function eV(e){if(!QI.test(e))return!1;const t=e.replace(/[-_]/g,a=>a==="-"?"+":"/"),o=t.padEnd(Math.ceil(t.length/4)*4,"=");return nM(o)}const tV=be("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=QI),To.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=o=>{eV(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),oV=be("$ZodE164",(e,t)=>{t.pattern??(t.pattern=iq),To.init(e,t)});function aV(e,t=null){try{const o=e.split(".");if(o.length!==3)return!1;const[a]=o;if(!a)return!1;const n=JSON.parse(atob(a));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const nV=be("$ZodJWT",(e,t)=>{To.init(e,t),e._zod.check=o=>{aV(o.value,t.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}}),rM=be("$ZodNumber",(e,t)=>{Ht.init(e,t),e._zod.pattern=e._zod.bag.pattern??eM,e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=Number(o.value)}catch{}const n=o.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return o;const i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),o}}),rV=be("$ZodNumberFormat",(e,t)=>{bq.init(e,t),rM.init(e,t)}),iV=be("$ZodBoolean",(e,t)=>{Ht.init(e,t),e._zod.pattern=pq,e._zod.parse=(o,a)=>{if(t.coerce)try{o.value=!!o.value}catch{}const n=o.value;return typeof n=="boolean"||o.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),o}}),sV=be("$ZodUndefined",(e,t)=>{Ht.init(e,t),e._zod.pattern=gq,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(o,a)=>{const n=o.value;return typeof n>"u"||o.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),o}}),lV=be("$ZodNull",(e,t)=>{Ht.init(e,t),e._zod.pattern=mq,e._zod.values=new Set([null]),e._zod.parse=(o,a)=>{const n=o.value;return n===null||o.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),o}}),cV=be("$ZodAny",(e,t)=>{Ht.init(e,t),e._zod.parse=o=>o}),dV=be("$ZodUnknown",(e,t)=>{Ht.init(e,t),e._zod.parse=o=>o}),uV=be("$ZodNever",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>(o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:e}),o)});function fR(e,t,o){e.issues.length&&t.issues.push(...Tl(o,e.issues)),t.value[o]=e.value}const pV=be("$ZodArray",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value;if(!Array.isArray(n))return o.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),o;o.value=Array(n.length);const i=[];for(let l=0;l<n.length;l++){const c=n[l],u=t.element._zod.run({value:c,issues:[]},a);u instanceof Promise?i.push(u.then(p=>fR(p,o,l))):fR(u,o,l)}return i.length?Promise.all(i).then(()=>o):o}});function vf(e,t,o,a,n){if(e.issues.length){if(n&&!(o in a))return;t.issues.push(...Tl(o,e.issues))}e.value===void 0?o in a&&(t.value[o]=void 0):t.value[o]=e.value}function iM(e){const t=Object.keys(e.shape);for(const a of t)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const o=T8(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function sM(e,t,o,a,n,i){const l=[],c=n.keySet,u=n.catchall._zod,p=u.def.type,g=u.optout==="optional";for(const m in t){if(c.has(m))continue;if(p==="never"){l.push(m);continue}const f=u.run({value:t[m],issues:[]},a);f instanceof Promise?e.push(f.then(v=>vf(v,o,m,t,g))):vf(f,o,m,t,g)}return l.length&&o.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>o):o}const mV=be("$ZodObject",(e,t)=>{if(Ht.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const c=t.shape;Object.defineProperty(t,"shape",{get:()=>{const u={...c};return Object.defineProperty(t,"shape",{value:u}),u}})}const a=fv(()=>iM(t));Dt(e._zod,"propValues",()=>{const c=t.shape,u={};for(const p in c){const g=c[p]._zod;if(g.values){u[p]??(u[p]=new Set);for(const m of g.values)u[p].add(m)}}return u});const n=_p,i=t.catchall;let l;e._zod.parse=(c,u)=>{l??(l=a.value);const p=c.value;if(!n(p))return c.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),c;c.value={};const g=[],m=l.shape;for(const f of l.keys){const v=m[f],b=v._zod.optout==="optional",S=v._zod.run({value:p[f],issues:[]},u);S instanceof Promise?g.push(S.then(C=>vf(C,c,f,p,b))):vf(S,c,f,p,b)}return i?sM(g,p,c,u,a.value,e):g.length?Promise.all(g).then(()=>c):c}}),gV=be("$ZodObjectJIT",(e,t)=>{mV.init(e,t);const o=e._zod.parse,a=fv(()=>iM(t)),n=f=>{const v=new Oq(["shape","payload","ctx"]),b=a.value,S=E=>{const k=gR(E);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};v.write("const input = payload.value;");const C=Object.create(null);let w=0;for(const E of b.keys)C[E]=`key_${w++}`;v.write("const newResult = {};");for(const E of b.keys){const k=C[E],x=gR(E),D=f[E]?._zod?.optout==="optional";v.write(`const ${k} = ${S(E)};`),D?v.write(`
13
13
  if (${k}.issues.length) {
14
14
  if (${x} in input) {
15
15
  payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
@@ -43,16 +43,16 @@ Error generating stack: `+h.message+`
43
43
  newResult[${x}] = ${k}.value;
44
44
  }
45
45
 
46
- `)}v.write("payload.value = newResult;"),v.write("return payload;");const _=v.compile();return(E,k)=>_(f,E,k)};let i;const l=_p,c=!HI.jitless,p=c&&yq.value,g=t.catchall;let m;e._zod.parse=(f,v)=>{m??(m=a.value);const b=f.value;return l(b)?c&&p&&v?.async===!1&&v.jitless!==!0?(i||(i=n(t.shape)),f=i(f,v),g?sM([],b,f,v,m,e):f):o(f,v):(f.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),f)}});function vR(e,t,o,a){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const n=e.filter(i=>!Qc(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(i=>i.issues.map(l=>Is(l,a,Os())))}),t)}const lM=be("$ZodUnion",(e,t)=>{Ht.init(e,t),Dt(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Dt(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Dt(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Dt(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>I_(i.source)).join("|")})$`)}});const o=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(o)return a(n,i);let l=!1;const c=[];for(const u of t.options){const p=u._zod.run({value:n.value,issues:[]},i);if(p instanceof Promise)c.push(p),l=!0;else{if(p.issues.length===0)return p;c.push(p)}}return l?Promise.all(c).then(u=>vR(u,n,e,i)):vR(c,n,e,i)}}),hV=be("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lM.init(e,t);const o=e._zod.parse;Dt(e._zod,"propValues",()=>{const n={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[c,u]of Object.entries(l)){n[c]||(n[c]=new Set);for(const p of u)n[c].add(p)}}return n});const a=fv(()=>{const n=t.options,i=new Map;for(const l of n){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,l)}}return i});e._zod.parse=(n,i)=>{const l=n.value;if(!_p(l))return n.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),n;const c=a.value.get(l?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback?o(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),n)}}),fV=be("$ZodIntersection",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value,i=t.left._zod.run({value:n,issues:[]},a),l=t.right._zod.run({value:n,issues:[]},a);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([u,p])=>bR(o,u,p)):bR(o,i,l)}});function RT(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(fd(e)&&fd(t)){const o=Object.keys(t),a=Object.keys(e).filter(i=>o.indexOf(i)!==-1),n={...e,...t};for(const i of a){const l=RT(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n[i]=l.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let a=0;a<e.length;a++){const n=e[a],i=t[a],l=RT(n,i);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};o.push(l.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function bR(e,t,o){const a=new Map;let n;for(const c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(const u of c.keys)a.has(u)||a.set(u,{}),a.get(u).l=!0}else e.issues.push(c);for(const c of o.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)a.has(u)||a.set(u,{}),a.get(u).r=!0;else e.issues.push(c);const i=[...a].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),Qc(e))return e;const l=RT(t.value,o.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const vV=be("$ZodTuple",(e,t)=>{Ht.init(e,t);const o=t.items;e._zod.parse=(a,n)=>{const i=a.value;if(!Array.isArray(i))return a.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),a;a.value=[];const l=[],c=[...o].reverse().findIndex(g=>g._zod.optin!=="optional"),u=c===-1?0:o.length-c;if(!t.rest){const g=i.length>o.length,m=i.length<u-1;if(g||m)return a.issues.push({...g?{code:"too_big",maximum:o.length,inclusive:!0}:{code:"too_small",minimum:o.length},input:i,inst:e,origin:"array"}),a}let p=-1;for(const g of o){if(p++,p>=i.length&&p>=u)continue;const m=g._zod.run({value:i[p],issues:[]},n);m instanceof Promise?l.push(m.then(f=>Ag(f,a,p))):Ag(m,a,p)}if(t.rest){const g=i.slice(o.length);for(const m of g){p++;const f=t.rest._zod.run({value:m,issues:[]},n);f instanceof Promise?l.push(f.then(v=>Ag(v,a,p))):Ag(f,a,p)}}return l.length?Promise.all(l).then(()=>a):a}});function Ag(e,t,o){e.issues.length&&t.issues.push(...Tl(o,e.issues)),t.value[o]=e.value}const bV=be("$ZodRecord",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value;if(!fd(n))return o.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),o;const i=[],l=t.keyType._zod.values;if(l){o.value={};const c=new Set;for(const p of l)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){c.add(typeof p=="number"?p.toString():p);const g=t.valueType._zod.run({value:n[p],issues:[]},a);g instanceof Promise?i.push(g.then(m=>{m.issues.length&&o.issues.push(...Tl(p,m.issues)),o.value[p]=m.value})):(g.issues.length&&o.issues.push(...Tl(p,g.issues)),o.value[p]=g.value)}let u;for(const p in n)c.has(p)||(u=u??[],u.push(p));u&&u.length>0&&o.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{o.value={};for(const c of Reflect.ownKeys(n)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},a);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&eM.test(c)&&u.issues.length){const m=t.keyType._zod.run({value:Number(c),issues:[]},a);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?o.value[c]=n[c]:o.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>Is(m,a,Os())),input:c,path:[c],inst:e});continue}const g=t.valueType._zod.run({value:n[c],issues:[]},a);g instanceof Promise?i.push(g.then(m=>{m.issues.length&&o.issues.push(...Tl(c,m.issues)),o.value[u.value]=m.value})):(g.issues.length&&o.issues.push(...Tl(c,g.issues)),o.value[u.value]=g.value)}}return i.length?Promise.all(i).then(()=>o):o}}),yV=be("$ZodEnum",(e,t)=>{Ht.init(e,t);const o=GI(t.entries),a=new Set(o);e._zod.values=a,e._zod.pattern=new RegExp(`^(${o.filter(n=>Sq.has(typeof n)).map(n=>typeof n=="string"?vd(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{const l=n.value;return a.has(l)||n.issues.push({code:"invalid_value",values:o,input:l,inst:e}),n}}),SV=be("$ZodLiteral",(e,t)=>{if(Ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const o=new Set(t.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${t.values.map(a=>typeof a=="string"?vd(a):a?vd(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,n)=>{const i=a.value;return o.has(i)||a.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),a}}),TV=be("$ZodFile",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value;return n instanceof File||o.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),o}}),wV=be("$ZodTransform",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{if(a.direction==="backward")throw new VI(e.constructor.name);const n=t.transform(o.value,o);if(a.async)return(n instanceof Promise?n:Promise.resolve(n)).then(l=>(o.value=l,o));if(n instanceof Promise)throw new nd;return o.value=n,o}});function yR(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const cM=be("$ZodOptional",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Dt(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${I_(o.source)})?$`):void 0}),e._zod.parse=(o,a)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>yR(i,o.value)):yR(n,o.value)}return o.value===void 0?o:t.innerType._zod.run(o,a)}}),_V=be("$ZodExactOptional",(e,t)=>{cM.init(e,t),Dt(e._zod,"values",()=>t.innerType._zod.values),Dt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(o,a)=>t.innerType._zod.run(o,a)}),CV=be("$ZodNullable",(e,t)=>{Ht.init(e,t),Dt(e._zod,"optin",()=>t.innerType._zod.optin),Dt(e._zod,"optout",()=>t.innerType._zod.optout),Dt(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${I_(o.source)}|null)$`):void 0}),Dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(o,a)=>o.value===null?o:t.innerType._zod.run(o,a)}),PV=be("$ZodDefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,a)=>{if(a.direction==="backward")return t.innerType._zod.run(o,a);if(o.value===void 0)return o.value=t.defaultValue,o;const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>SR(i,t)):SR(n,t)}});function SR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const kV=be("$ZodPrefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,a)=>(a.direction==="backward"||o.value===void 0&&(o.value=t.defaultValue),t.innerType._zod.run(o,a))}),xV=be("$ZodNonOptional",(e,t)=>{Ht.init(e,t),Dt(e._zod,"values",()=>{const o=t.innerType._zod.values;return o?new Set([...o].filter(a=>a!==void 0)):void 0}),e._zod.parse=(o,a)=>{const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>TR(i,e)):TR(n,e)}});function TR(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const EV=be("$ZodCatch",(e,t)=>{Ht.init(e,t),Dt(e._zod,"optin",()=>t.innerType._zod.optin),Dt(e._zod,"optout",()=>t.innerType._zod.optout),Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,a)=>{if(a.direction==="backward")return t.innerType._zod.run(o,a);const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>(o.value=i.value,i.issues.length&&(o.value=t.catchValue({...o,error:{issues:i.issues.map(l=>Is(l,a,Os()))},input:o.value}),o.issues=[]),o)):(o.value=n.value,n.issues.length&&(o.value=t.catchValue({...o,error:{issues:n.issues.map(i=>Is(i,a,Os()))},input:o.value}),o.issues=[]),o)}}),RV=be("$ZodPipe",(e,t)=>{Ht.init(e,t),Dt(e._zod,"values",()=>t.in._zod.values),Dt(e._zod,"optin",()=>t.in._zod.optin),Dt(e._zod,"optout",()=>t.out._zod.optout),Dt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,a)=>{if(a.direction==="backward"){const i=t.out._zod.run(o,a);return i instanceof Promise?i.then(l=>Dg(l,t.in,a)):Dg(i,t.in,a)}const n=t.in._zod.run(o,a);return n instanceof Promise?n.then(i=>Dg(i,t.out,a)):Dg(n,t.out,a)}});function Dg(e,t,o){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},o)}const AV=be("$ZodReadonly",(e,t)=>{Ht.init(e,t),Dt(e._zod,"propValues",()=>t.innerType._zod.propValues),Dt(e._zod,"values",()=>t.innerType._zod.values),Dt(e._zod,"optin",()=>t.innerType?._zod?.optin),Dt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(o,a)=>{if(a.direction==="backward")return t.innerType._zod.run(o,a);const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(wR):wR(n)}});function wR(e){return e.value=Object.freeze(e.value),e}const DV=be("$ZodLazy",(e,t)=>{Ht.init(e,t),Dt(e._zod,"innerType",()=>t.getter()),Dt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Dt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Dt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Dt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(o,a)=>e._zod.innerType._zod.run(o,a)}),OV=be("$ZodCustom",(e,t)=>{Pa.init(e,t),Ht.init(e,t),e._zod.parse=(o,a)=>o,e._zod.check=o=>{const a=o.value,n=t.fn(a);if(n instanceof Promise)return n.then(i=>_R(i,o,a,e));_R(n,o,a,e)}});function _R(e,t,o,a){if(!e){const n={code:"custom",input:o,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(n.params=a._zod.def.params),t.issues.push(Cp(n))}}var CR;class IV{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){const a=o[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const o=this._map.get(t);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(t),this}get(t){const o=t._zod.parent;if(o){const a={...this.get(o)??{}};delete a.id;const n={...a,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function MV(){return new IV}(CR=globalThis).__zod_globalRegistry??(CR.__zod_globalRegistry=MV());const Zu=globalThis.__zod_globalRegistry;function LV(e,t){return new e({type:"string",...qe(t)})}function NV(e,t){return new e({type:"string",coerce:!0,...qe(t)})}function FV(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...qe(t)})}function PR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...qe(t)})}function BV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...qe(t)})}function jV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...qe(t)})}function UV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...qe(t)})}function zV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...qe(t)})}function dM(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...qe(t)})}function $V(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...qe(t)})}function qV(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...qe(t)})}function VV(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...qe(t)})}function HV(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...qe(t)})}function GV(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...qe(t)})}function KV(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...qe(t)})}function WV(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...qe(t)})}function YV(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...qe(t)})}function ZV(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...qe(t)})}function QV(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...qe(t)})}function JV(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...qe(t)})}function XV(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...qe(t)})}function e7(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...qe(t)})}function t7(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...qe(t)})}function o7(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...qe(t)})}function a7(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...qe(t)})}function n7(e,t){return new e({type:"string",format:"date",check:"string_format",...qe(t)})}function r7(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...qe(t)})}function i7(e,t){return new e({type:"string",format:"duration",check:"string_format",...qe(t)})}function s7(e,t){return new e({type:"number",checks:[],...qe(t)})}function l7(e,t){return new e({type:"number",coerce:!0,checks:[],...qe(t)})}function c7(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...qe(t)})}function d7(e,t){return new e({type:"boolean",...qe(t)})}function u7(e,t){return new e({type:"boolean",coerce:!0,...qe(t)})}function p7(e,t){return new e({type:"undefined",...qe(t)})}function m7(e,t){return new e({type:"null",...qe(t)})}function g7(e){return new e({type:"any"})}function h7(e){return new e({type:"unknown"})}function f7(e,t){return new e({type:"never",...qe(t)})}function kR(e,t){return new oM({check:"less_than",...qe(t),value:e,inclusive:!1})}function LS(e,t){return new oM({check:"less_than",...qe(t),value:e,inclusive:!0})}function xR(e,t){return new aM({check:"greater_than",...qe(t),value:e,inclusive:!1})}function NS(e,t){return new aM({check:"greater_than",...qe(t),value:e,inclusive:!0})}function ER(e,t){return new v8({check:"multiple_of",...qe(t),value:e})}function v7(e,t){return new y8({check:"max_size",...qe(t),maximum:e})}function b7(e,t){return new S8({check:"min_size",...qe(t),minimum:e})}function uM(e,t){return new T8({check:"max_length",...qe(t),maximum:e})}function bf(e,t){return new w8({check:"min_length",...qe(t),minimum:e})}function pM(e,t){return new _8({check:"length_equals",...qe(t),length:e})}function y7(e,t){return new C8({check:"string_format",format:"regex",...qe(t),pattern:e})}function S7(e){return new P8({check:"string_format",format:"lowercase",...qe(e)})}function T7(e){return new k8({check:"string_format",format:"uppercase",...qe(e)})}function w7(e,t){return new x8({check:"string_format",format:"includes",...qe(t),includes:e})}function _7(e,t){return new E8({check:"string_format",format:"starts_with",...qe(t),prefix:e})}function C7(e,t){return new R8({check:"string_format",format:"ends_with",...qe(t),suffix:e})}function P7(e,t){return new A8({check:"mime_type",mime:e,...qe(t)})}function Od(e){return new D8({check:"overwrite",tx:e})}function k7(e){return Od(t=>t.normalize(e))}function x7(){return Od(e=>e.trim())}function E7(){return Od(e=>e.toLowerCase())}function R7(){return Od(e=>e.toUpperCase())}function A7(){return Od(e=>bq(e))}function D7(e,t,o){return new e({type:"array",element:t,...qe(o)})}function O7(e,t){return new e({type:"file",...qe(t)})}function I7(e,t,o){const a=qe(o);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:t,...a})}function M7(e,t,o){return new e({type:"custom",check:"custom",fn:t,...qe(o)})}function L7(e){const t=N7(o=>(o.addIssue=a=>{if(typeof a=="string")o.issues.push(Cp(a,o.value,t._zod.def));else{const n=a;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=o.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),o.issues.push(Cp(n))}},e(o.value,o)));return t}function N7(e,t){const o=new Pa({check:"custom",...qe(t)});return o._zod.check=e,o}function yf(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Zu,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function co(e,t,o={path:[],schemaPath:[]}){var a;const n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,o.schemaPath.includes(e)&&(i.cycle=o.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:o.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const g={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const f=l.schema,v=t.processors[n.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);v(e,t,f,g)}const m=e._zod.parent;m&&(l.ref||(l.ref=m),co(m,t,g),t.seen.get(m).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(l.schema,u),t.io==="input"&&Va(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((a=l.schema).default??(a.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Sf(e,t){const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const u=a.get(c);if(u&&u!==l[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(c,l[0])}}const n=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(l[0])?.id,f=e.external.uri??(b=>b);if(m)return{ref:f(m)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${f("__shared")}#/${c}/${v}`}}if(l[1]===o)return{ref:"#"};const p=`#/${c}/`,g=l[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:p+g}},i=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:u,defId:p}=n(l);c.def={...c.schema},p&&(c.defId=p);const g=c.schema;for(const m in g)delete g[m];g.$ref=u};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
46
+ `)}v.write("payload.value = newResult;"),v.write("return payload;");const _=v.compile();return(E,k)=>_(f,E,k)};let i;const l=_p,c=!HI.jitless,p=c&&y8.value,g=t.catchall;let m;e._zod.parse=(f,v)=>{m??(m=a.value);const b=f.value;return l(b)?c&&p&&v?.async===!1&&v.jitless!==!0?(i||(i=n(t.shape)),f=i(f,v),g?sM([],b,f,v,m,e):f):o(f,v):(f.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),f)}});function vR(e,t,o,a){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const n=e.filter(i=>!Qc(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(i=>i.issues.map(l=>Is(l,a,Os())))}),t)}const lM=be("$ZodUnion",(e,t)=>{Ht.init(e,t),Dt(e._zod,"optin",()=>t.options.some(n=>n._zod.optin==="optional")?"optional":void 0),Dt(e._zod,"optout",()=>t.options.some(n=>n._zod.optout==="optional")?"optional":void 0),Dt(e._zod,"values",()=>{if(t.options.every(n=>n._zod.values))return new Set(t.options.flatMap(n=>Array.from(n._zod.values)))}),Dt(e._zod,"pattern",()=>{if(t.options.every(n=>n._zod.pattern)){const n=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${n.map(i=>I_(i.source)).join("|")})$`)}});const o=t.options.length===1,a=t.options[0]._zod.run;e._zod.parse=(n,i)=>{if(o)return a(n,i);let l=!1;const c=[];for(const u of t.options){const p=u._zod.run({value:n.value,issues:[]},i);if(p instanceof Promise)c.push(p),l=!0;else{if(p.issues.length===0)return p;c.push(p)}}return l?Promise.all(c).then(u=>vR(u,n,e,i)):vR(c,n,e,i)}}),hV=be("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lM.init(e,t);const o=e._zod.parse;Dt(e._zod,"propValues",()=>{const n={};for(const i of t.options){const l=i._zod.propValues;if(!l||Object.keys(l).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[c,u]of Object.entries(l)){n[c]||(n[c]=new Set);for(const p of u)n[c].add(p)}}return n});const a=fv(()=>{const n=t.options,i=new Map;for(const l of n){const c=l._zod.propValues?.[t.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(l)}"`);for(const u of c){if(i.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);i.set(u,l)}}return i});e._zod.parse=(n,i)=>{const l=n.value;if(!_p(l))return n.issues.push({code:"invalid_type",expected:"object",input:l,inst:e}),n;const c=a.value.get(l?.[t.discriminator]);return c?c._zod.run(n,i):t.unionFallback?o(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:l,path:[t.discriminator],inst:e}),n)}}),fV=be("$ZodIntersection",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value,i=t.left._zod.run({value:n,issues:[]},a),l=t.right._zod.run({value:n,issues:[]},a);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([u,p])=>bR(o,u,p)):bR(o,i,l)}});function RT(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(fd(e)&&fd(t)){const o=Object.keys(t),a=Object.keys(e).filter(i=>o.indexOf(i)!==-1),n={...e,...t};for(const i of a){const l=RT(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};n[i]=l.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let a=0;a<e.length;a++){const n=e[a],i=t[a],l=RT(n,i);if(!l.valid)return{valid:!1,mergeErrorPath:[a,...l.mergeErrorPath]};o.push(l.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function bR(e,t,o){const a=new Map;let n;for(const c of t.issues)if(c.code==="unrecognized_keys"){n??(n=c);for(const u of c.keys)a.has(u)||a.set(u,{}),a.get(u).l=!0}else e.issues.push(c);for(const c of o.issues)if(c.code==="unrecognized_keys")for(const u of c.keys)a.has(u)||a.set(u,{}),a.get(u).r=!0;else e.issues.push(c);const i=[...a].filter(([,c])=>c.l&&c.r).map(([c])=>c);if(i.length&&n&&e.issues.push({...n,keys:i}),Qc(e))return e;const l=RT(t.value,o.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const vV=be("$ZodTuple",(e,t)=>{Ht.init(e,t);const o=t.items;e._zod.parse=(a,n)=>{const i=a.value;if(!Array.isArray(i))return a.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),a;a.value=[];const l=[],c=[...o].reverse().findIndex(g=>g._zod.optin!=="optional"),u=c===-1?0:o.length-c;if(!t.rest){const g=i.length>o.length,m=i.length<u-1;if(g||m)return a.issues.push({...g?{code:"too_big",maximum:o.length,inclusive:!0}:{code:"too_small",minimum:o.length},input:i,inst:e,origin:"array"}),a}let p=-1;for(const g of o){if(p++,p>=i.length&&p>=u)continue;const m=g._zod.run({value:i[p],issues:[]},n);m instanceof Promise?l.push(m.then(f=>Ag(f,a,p))):Ag(m,a,p)}if(t.rest){const g=i.slice(o.length);for(const m of g){p++;const f=t.rest._zod.run({value:m,issues:[]},n);f instanceof Promise?l.push(f.then(v=>Ag(v,a,p))):Ag(f,a,p)}}return l.length?Promise.all(l).then(()=>a):a}});function Ag(e,t,o){e.issues.length&&t.issues.push(...Tl(o,e.issues)),t.value[o]=e.value}const bV=be("$ZodRecord",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value;if(!fd(n))return o.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),o;const i=[],l=t.keyType._zod.values;if(l){o.value={};const c=new Set;for(const p of l)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){c.add(typeof p=="number"?p.toString():p);const g=t.valueType._zod.run({value:n[p],issues:[]},a);g instanceof Promise?i.push(g.then(m=>{m.issues.length&&o.issues.push(...Tl(p,m.issues)),o.value[p]=m.value})):(g.issues.length&&o.issues.push(...Tl(p,g.issues)),o.value[p]=g.value)}let u;for(const p in n)c.has(p)||(u=u??[],u.push(p));u&&u.length>0&&o.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:u})}else{o.value={};for(const c of Reflect.ownKeys(n)){if(c==="__proto__")continue;let u=t.keyType._zod.run({value:c,issues:[]},a);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&eM.test(c)&&u.issues.length){const m=t.keyType._zod.run({value:Number(c),issues:[]},a);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){t.mode==="loose"?o.value[c]=n[c]:o.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>Is(m,a,Os())),input:c,path:[c],inst:e});continue}const g=t.valueType._zod.run({value:n[c],issues:[]},a);g instanceof Promise?i.push(g.then(m=>{m.issues.length&&o.issues.push(...Tl(c,m.issues)),o.value[u.value]=m.value})):(g.issues.length&&o.issues.push(...Tl(c,g.issues)),o.value[u.value]=g.value)}}return i.length?Promise.all(i).then(()=>o):o}}),yV=be("$ZodEnum",(e,t)=>{Ht.init(e,t);const o=GI(t.entries),a=new Set(o);e._zod.values=a,e._zod.pattern=new RegExp(`^(${o.filter(n=>S8.has(typeof n)).map(n=>typeof n=="string"?vd(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{const l=n.value;return a.has(l)||n.issues.push({code:"invalid_value",values:o,input:l,inst:e}),n}}),SV=be("$ZodLiteral",(e,t)=>{if(Ht.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const o=new Set(t.values);e._zod.values=o,e._zod.pattern=new RegExp(`^(${t.values.map(a=>typeof a=="string"?vd(a):a?vd(a.toString()):String(a)).join("|")})$`),e._zod.parse=(a,n)=>{const i=a.value;return o.has(i)||a.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),a}}),TV=be("$ZodFile",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{const n=o.value;return n instanceof File||o.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),o}}),wV=be("$ZodTransform",(e,t)=>{Ht.init(e,t),e._zod.parse=(o,a)=>{if(a.direction==="backward")throw new VI(e.constructor.name);const n=t.transform(o.value,o);if(a.async)return(n instanceof Promise?n:Promise.resolve(n)).then(l=>(o.value=l,o));if(n instanceof Promise)throw new nd;return o.value=n,o}});function yR(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const cM=be("$ZodOptional",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Dt(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${I_(o.source)})?$`):void 0}),e._zod.parse=(o,a)=>{if(t.innerType._zod.optin==="optional"){const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>yR(i,o.value)):yR(n,o.value)}return o.value===void 0?o:t.innerType._zod.run(o,a)}}),_V=be("$ZodExactOptional",(e,t)=>{cM.init(e,t),Dt(e._zod,"values",()=>t.innerType._zod.values),Dt(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(o,a)=>t.innerType._zod.run(o,a)}),CV=be("$ZodNullable",(e,t)=>{Ht.init(e,t),Dt(e._zod,"optin",()=>t.innerType._zod.optin),Dt(e._zod,"optout",()=>t.innerType._zod.optout),Dt(e._zod,"pattern",()=>{const o=t.innerType._zod.pattern;return o?new RegExp(`^(${I_(o.source)}|null)$`):void 0}),Dt(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(o,a)=>o.value===null?o:t.innerType._zod.run(o,a)}),PV=be("$ZodDefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,a)=>{if(a.direction==="backward")return t.innerType._zod.run(o,a);if(o.value===void 0)return o.value=t.defaultValue,o;const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>SR(i,t)):SR(n,t)}});function SR(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const kV=be("$ZodPrefault",(e,t)=>{Ht.init(e,t),e._zod.optin="optional",Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,a)=>(a.direction==="backward"||o.value===void 0&&(o.value=t.defaultValue),t.innerType._zod.run(o,a))}),xV=be("$ZodNonOptional",(e,t)=>{Ht.init(e,t),Dt(e._zod,"values",()=>{const o=t.innerType._zod.values;return o?new Set([...o].filter(a=>a!==void 0)):void 0}),e._zod.parse=(o,a)=>{const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>TR(i,e)):TR(n,e)}});function TR(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const EV=be("$ZodCatch",(e,t)=>{Ht.init(e,t),Dt(e._zod,"optin",()=>t.innerType._zod.optin),Dt(e._zod,"optout",()=>t.innerType._zod.optout),Dt(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(o,a)=>{if(a.direction==="backward")return t.innerType._zod.run(o,a);const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(i=>(o.value=i.value,i.issues.length&&(o.value=t.catchValue({...o,error:{issues:i.issues.map(l=>Is(l,a,Os()))},input:o.value}),o.issues=[]),o)):(o.value=n.value,n.issues.length&&(o.value=t.catchValue({...o,error:{issues:n.issues.map(i=>Is(i,a,Os()))},input:o.value}),o.issues=[]),o)}}),RV=be("$ZodPipe",(e,t)=>{Ht.init(e,t),Dt(e._zod,"values",()=>t.in._zod.values),Dt(e._zod,"optin",()=>t.in._zod.optin),Dt(e._zod,"optout",()=>t.out._zod.optout),Dt(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(o,a)=>{if(a.direction==="backward"){const i=t.out._zod.run(o,a);return i instanceof Promise?i.then(l=>Dg(l,t.in,a)):Dg(i,t.in,a)}const n=t.in._zod.run(o,a);return n instanceof Promise?n.then(i=>Dg(i,t.out,a)):Dg(n,t.out,a)}});function Dg(e,t,o){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},o)}const AV=be("$ZodReadonly",(e,t)=>{Ht.init(e,t),Dt(e._zod,"propValues",()=>t.innerType._zod.propValues),Dt(e._zod,"values",()=>t.innerType._zod.values),Dt(e._zod,"optin",()=>t.innerType?._zod?.optin),Dt(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(o,a)=>{if(a.direction==="backward")return t.innerType._zod.run(o,a);const n=t.innerType._zod.run(o,a);return n instanceof Promise?n.then(wR):wR(n)}});function wR(e){return e.value=Object.freeze(e.value),e}const DV=be("$ZodLazy",(e,t)=>{Ht.init(e,t),Dt(e._zod,"innerType",()=>t.getter()),Dt(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Dt(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Dt(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Dt(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(o,a)=>e._zod.innerType._zod.run(o,a)}),OV=be("$ZodCustom",(e,t)=>{Pa.init(e,t),Ht.init(e,t),e._zod.parse=(o,a)=>o,e._zod.check=o=>{const a=o.value,n=t.fn(a);if(n instanceof Promise)return n.then(i=>_R(i,o,a,e));_R(n,o,a,e)}});function _R(e,t,o,a){if(!e){const n={code:"custom",input:o,inst:a,path:[...a._zod.def.path??[]],continue:!a._zod.def.abort};a._zod.def.params&&(n.params=a._zod.def.params),t.issues.push(Cp(n))}}var CR;class IV{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...o){const a=o[0];return this._map.set(t,a),a&&typeof a=="object"&&"id"in a&&this._idmap.set(a.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const o=this._map.get(t);return o&&typeof o=="object"&&"id"in o&&this._idmap.delete(o.id),this._map.delete(t),this}get(t){const o=t._zod.parent;if(o){const a={...this.get(o)??{}};delete a.id;const n={...a,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function MV(){return new IV}(CR=globalThis).__zod_globalRegistry??(CR.__zod_globalRegistry=MV());const Zu=globalThis.__zod_globalRegistry;function LV(e,t){return new e({type:"string",...qe(t)})}function NV(e,t){return new e({type:"string",coerce:!0,...qe(t)})}function FV(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...qe(t)})}function PR(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...qe(t)})}function BV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...qe(t)})}function jV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...qe(t)})}function UV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...qe(t)})}function zV(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...qe(t)})}function dM(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...qe(t)})}function $V(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...qe(t)})}function qV(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...qe(t)})}function VV(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...qe(t)})}function HV(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...qe(t)})}function GV(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...qe(t)})}function KV(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...qe(t)})}function WV(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...qe(t)})}function YV(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...qe(t)})}function ZV(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...qe(t)})}function QV(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...qe(t)})}function JV(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...qe(t)})}function XV(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...qe(t)})}function e7(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...qe(t)})}function t7(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...qe(t)})}function o7(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...qe(t)})}function a7(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...qe(t)})}function n7(e,t){return new e({type:"string",format:"date",check:"string_format",...qe(t)})}function r7(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...qe(t)})}function i7(e,t){return new e({type:"string",format:"duration",check:"string_format",...qe(t)})}function s7(e,t){return new e({type:"number",checks:[],...qe(t)})}function l7(e,t){return new e({type:"number",coerce:!0,checks:[],...qe(t)})}function c7(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...qe(t)})}function d7(e,t){return new e({type:"boolean",...qe(t)})}function u7(e,t){return new e({type:"boolean",coerce:!0,...qe(t)})}function p7(e,t){return new e({type:"undefined",...qe(t)})}function m7(e,t){return new e({type:"null",...qe(t)})}function g7(e){return new e({type:"any"})}function h7(e){return new e({type:"unknown"})}function f7(e,t){return new e({type:"never",...qe(t)})}function kR(e,t){return new oM({check:"less_than",...qe(t),value:e,inclusive:!1})}function LS(e,t){return new oM({check:"less_than",...qe(t),value:e,inclusive:!0})}function xR(e,t){return new aM({check:"greater_than",...qe(t),value:e,inclusive:!1})}function NS(e,t){return new aM({check:"greater_than",...qe(t),value:e,inclusive:!0})}function ER(e,t){return new vq({check:"multiple_of",...qe(t),value:e})}function v7(e,t){return new yq({check:"max_size",...qe(t),maximum:e})}function b7(e,t){return new Sq({check:"min_size",...qe(t),minimum:e})}function uM(e,t){return new Tq({check:"max_length",...qe(t),maximum:e})}function bf(e,t){return new wq({check:"min_length",...qe(t),minimum:e})}function pM(e,t){return new _q({check:"length_equals",...qe(t),length:e})}function y7(e,t){return new Cq({check:"string_format",format:"regex",...qe(t),pattern:e})}function S7(e){return new Pq({check:"string_format",format:"lowercase",...qe(e)})}function T7(e){return new kq({check:"string_format",format:"uppercase",...qe(e)})}function w7(e,t){return new xq({check:"string_format",format:"includes",...qe(t),includes:e})}function _7(e,t){return new Eq({check:"string_format",format:"starts_with",...qe(t),prefix:e})}function C7(e,t){return new Rq({check:"string_format",format:"ends_with",...qe(t),suffix:e})}function P7(e,t){return new Aq({check:"mime_type",mime:e,...qe(t)})}function Od(e){return new Dq({check:"overwrite",tx:e})}function k7(e){return Od(t=>t.normalize(e))}function x7(){return Od(e=>e.trim())}function E7(){return Od(e=>e.toLowerCase())}function R7(){return Od(e=>e.toUpperCase())}function A7(){return Od(e=>b8(e))}function D7(e,t,o){return new e({type:"array",element:t,...qe(o)})}function O7(e,t){return new e({type:"file",...qe(t)})}function I7(e,t,o){const a=qe(o);return a.abort??(a.abort=!0),new e({type:"custom",check:"custom",fn:t,...a})}function M7(e,t,o){return new e({type:"custom",check:"custom",fn:t,...qe(o)})}function L7(e){const t=N7(o=>(o.addIssue=a=>{if(typeof a=="string")o.issues.push(Cp(a,o.value,t._zod.def));else{const n=a;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=o.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),o.issues.push(Cp(n))}},e(o.value,o)));return t}function N7(e,t){const o=new Pa({check:"custom",...qe(t)});return o._zod.check=e,o}function yf(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Zu,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function co(e,t,o={path:[],schemaPath:[]}){var a;const n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,o.schemaPath.includes(e)&&(i.cycle=o.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:o.path};t.seen.set(e,l);const c=e._zod.toJSONSchema?.();if(c)l.schema=c;else{const g={...o,schemaPath:[...o.schemaPath,e],path:o.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,g);else{const f=l.schema,v=t.processors[n.type];if(!v)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);v(e,t,f,g)}const m=e._zod.parent;m&&(l.ref||(l.ref=m),co(m,t,g),t.seen.get(m).isParent=!0)}const u=t.metadataRegistry.get(e);return u&&Object.assign(l.schema,u),t.io==="input"&&Va(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((a=l.schema).default??(a.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function Sf(e,t){const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=new Map;for(const l of e.seen.entries()){const c=e.metadataRegistry.get(l[0])?.id;if(c){const u=a.get(c);if(u&&u!==l[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);a.set(c,l[0])}}const n=l=>{const c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const m=e.external.registry.get(l[0])?.id,f=e.external.uri??(b=>b);if(m)return{ref:f(m)};const v=l[1].defId??l[1].schema.id??`schema${e.counter++}`;return l[1].defId=v,{defId:v,ref:`${f("__shared")}#/${c}/${v}`}}if(l[1]===o)return{ref:"#"};const p=`#/${c}/`,g=l[1].schema.id??`__schema${e.counter++}`;return{defId:g,ref:p+g}},i=l=>{if(l[1].schema.$ref)return;const c=l[1],{ref:u,defId:p}=n(l);c.def={...c.schema},p&&(c.defId=p);const g=c.schema;for(const m in g)delete g[m];g.$ref=u};if(e.cycles==="throw")for(const l of e.seen.entries()){const c=l[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/<root>
47
47
 
48
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){i(l);continue}if(e.external){const p=e.external.registry.get(l[0])?.id;if(t!==l[0]&&p){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(c.cycle){i(l);continue}if(c.count>1&&e.reused==="ref"){i(l);continue}}}function Tf(e,t){const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=l=>{const c=e.seen.get(l);if(c.ref===null)return;const u=c.def??c.schema,p={...u},g=c.ref;if(c.ref=null,g){a(g);const f=e.seen.get(g),v=f.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,p),l._zod.parent===g)for(const S in u)S==="$ref"||S==="allOf"||S in p||delete u[S];if(v.$ref&&f.def)for(const S in u)S==="$ref"||S==="allOf"||S in f.def&&JSON.stringify(u[S])===JSON.stringify(f.def[S])&&delete u[S]}const m=l._zod.parent;if(m&&m!==g){a(m);const f=e.seen.get(m);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(const v in u)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(u[v])===JSON.stringify(f.def[v])&&delete u[v]}e.override({zodSchema:l,jsonSchema:u,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())a(l[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(l)}Object.assign(n,o.def??o.schema);const i=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{const l=JSON.parse(JSON.stringify(n));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:wf(t,"input",e.processors),output:wf(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Va(e,t){const o=t??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Va(a.element,o);if(a.type==="set")return Va(a.valueType,o);if(a.type==="lazy")return Va(a.getter(),o);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return Va(a.innerType,o);if(a.type==="intersection")return Va(a.left,o)||Va(a.right,o);if(a.type==="record"||a.type==="map")return Va(a.keyType,o)||Va(a.valueType,o);if(a.type==="pipe")return Va(a.in,o)||Va(a.out,o);if(a.type==="object"){for(const n in a.shape)if(Va(a.shape[n],o))return!0;return!1}if(a.type==="union"){for(const n of a.options)if(Va(n,o))return!0;return!1}if(a.type==="tuple"){for(const n of a.items)if(Va(n,o))return!0;return!!(a.rest&&Va(a.rest,o))}return!1}const F7=(e,t={})=>o=>{const a=yf({...o,processors:t});return co(e,a),Sf(a,e),Tf(a,e)},wf=(e,t,o={})=>a=>{const{libraryOptions:n,target:i}=a??{},l=yf({...n??{},target:i,io:t,processors:o});return co(e,l),Sf(l,e),Tf(l,e)},B7={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mM=(e,t,o,a)=>{const n=o;n.type="string";const{minimum:i,maximum:l,format:c,patterns:u,contentEncoding:p}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof l=="number"&&(n.maxLength=l),c&&(n.format=B7[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),p&&(n.contentEncoding=p),u&&u.size>0){const g=[...u];g.length===1?n.pattern=g[0].source:g.length>1&&(n.allOf=[...g.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},gM=(e,t,o,a)=>{const n=o,{minimum:i,maximum:l,format:c,multipleOf:u,exclusiveMaximum:p,exclusiveMinimum:g}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number",typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=g,n.exclusiveMinimum=!0):n.exclusiveMinimum=g),typeof i=="number"&&(n.minimum=i,typeof g=="number"&&t.target!=="draft-04"&&(g>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=p,n.exclusiveMaximum=!0):n.exclusiveMaximum=p),typeof l=="number"&&(n.maximum=l,typeof p=="number"&&t.target!=="draft-04"&&(p<=l?delete n.maximum:delete n.exclusiveMaximum)),typeof u=="number"&&(n.multipleOf=u)},hM=(e,t,o,a)=>{o.type="boolean"},j7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},U7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},fM=(e,t,o,a)=>{t.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},vM=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},z7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bM=(e,t,o,a)=>{o.not={}},yM=(e,t,o,a)=>{},SM=(e,t,o,a)=>{},$7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},TM=(e,t,o,a)=>{const n=e._zod.def,i=GI(n.entries);i.every(l=>typeof l=="number")&&(o.type="number"),i.every(l=>typeof l=="string")&&(o.type="string"),o.enum=i},wM=(e,t,o,a)=>{const n=e._zod.def,i=[];for(const l of n.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];o.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?o.enum=[l]:o.const=l}else i.every(l=>typeof l=="number")&&(o.type="number"),i.every(l=>typeof l=="string")&&(o.type="string"),i.every(l=>typeof l=="boolean")&&(o.type="boolean"),i.every(l=>l===null)&&(o.type="null"),o.enum=i},q7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},V7=(e,t,o,a)=>{const n=o,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},_M=(e,t,o,a)=>{const n=o,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:c,mime:u}=e._zod.bag;l!==void 0&&(i.minLength=l),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(p=>({contentMediaType:p}))):Object.assign(n,i)},H7=(e,t,o,a)=>{o.type="boolean"},CM=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},G7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},PM=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},K7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},W7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},kM=(e,t,o,a)=>{const n=o,i=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=co(i.element,t,{...a,path:[...a.path,"items"]})},xM=(e,t,o,a)=>{const n=o,i=e._zod.def;n.type="object",n.properties={};const l=i.shape;for(const p in l)n.properties[p]=co(l[p],t,{...a,path:[...a.path,"properties",p]});const c=new Set(Object.keys(l)),u=new Set([...c].filter(p=>{const g=i.shape[p]._zod;return t.io==="input"?g.optin===void 0:g.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=co(i.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},EM=(e,t,o,a)=>{const n=e._zod.def,i=n.inclusive===!1,l=n.options.map((c,u)=>co(c,t,{...a,path:[...a.path,i?"oneOf":"anyOf",u]}));i?o.oneOf=l:o.anyOf=l},RM=(e,t,o,a)=>{const n=e._zod.def,i=co(n.left,t,{...a,path:[...a.path,"allOf",0]}),l=co(n.right,t,{...a,path:[...a.path,"allOf",1]}),c=p=>"allOf"in p&&Object.keys(p).length===1,u=[...c(i)?i.allOf:[i],...c(l)?l.allOf:[l]];o.allOf=u},AM=(e,t,o,a)=>{const n=o,i=e._zod.def;n.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((f,v)=>co(f,t,{...a,path:[...a.path,l,v]})),p=i.rest?co(i.rest,t,{...a,path:[...a.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,p&&(n.items=p)):t.target==="openapi-3.0"?(n.items={anyOf:u},p&&n.items.anyOf.push(p),n.minItems=u.length,p||(n.maxItems=u.length)):(n.items=u,p&&(n.additionalItems=p));const{minimum:g,maximum:m}=e._zod.bag;typeof g=="number"&&(n.minItems=g),typeof m=="number"&&(n.maxItems=m)},DM=(e,t,o,a)=>{const n=o,i=e._zod.def;n.type="object";const l=i.keyType,u=l._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){const g=co(i.valueType,t,{...a,path:[...a.path,"patternProperties","*"]});n.patternProperties={};for(const m of u)n.patternProperties[m.source]=g}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=co(i.keyType,t,{...a,path:[...a.path,"propertyNames"]})),n.additionalProperties=co(i.valueType,t,{...a,path:[...a.path,"additionalProperties"]});const p=l._zod.values;if(p){const g=[...p].filter(m=>typeof m=="string"||typeof m=="number");g.length>0&&(n.required=g)}},OM=(e,t,o,a)=>{const n=e._zod.def,i=co(n.innerType,t,a),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=n.innerType,o.nullable=!0):o.anyOf=[i,{type:"null"}]},IM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType},MM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType,o.default=JSON.parse(JSON.stringify(n.defaultValue))},LM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},NM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType;let l;try{l=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=l},FM=(e,t,o,a)=>{const n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;co(i,t,a);const l=t.seen.get(e);l.ref=i},BM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType,o.readOnly=!0},Y7=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType},F_=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType},jM=(e,t,o,a)=>{const n=e._zod.innerType;co(n,t,a);const i=t.seen.get(e);i.ref=n},RR={string:mM,number:gM,boolean:hM,bigint:j7,symbol:U7,null:fM,undefined:vM,void:z7,never:bM,any:yM,unknown:SM,date:$7,enum:TM,literal:wM,nan:q7,template_literal:V7,file:_M,success:H7,custom:CM,function:G7,transform:PM,map:K7,set:W7,array:kM,object:xM,union:EM,intersection:RM,tuple:AM,record:DM,nullable:OM,nonoptional:IM,default:MM,prefault:LM,catch:NM,pipe:FM,readonly:BM,promise:Y7,optional:F_,lazy:jM};function tfe(e,t){if("_idmap"in e){const a=e,n=yf({...t,processors:RR}),i={};for(const u of a._idmap.entries()){const[p,g]=u;co(g,n)}const l={},c={registry:a,uri:t?.uri,defs:i};n.external=c;for(const u of a._idmap.entries()){const[p,g]=u;Sf(n,g),l[p]=Tf(n,g)}if(Object.keys(i).length>0){const u=n.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[u]:i}}return{schemas:l}}const o=yf({...t,processors:RR});return co(e,o),Sf(o,e),Tf(o,e)}const Z7=be("ZodISODateTime",(e,t)=>{H8.init(e,t),xo.init(e,t)});function UM(e){return a7(Z7,e)}const Q7=be("ZodISODate",(e,t)=>{G8.init(e,t),xo.init(e,t)});function J7(e){return n7(Q7,e)}const X7=be("ZodISOTime",(e,t)=>{K8.init(e,t),xo.init(e,t)});function e9(e){return r7(X7,e)}const t9=be("ZodISODuration",(e,t)=>{W8.init(e,t),xo.init(e,t)});function o9(e){return i7(t9,e)}const a9=(e,t)=>{L_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>Dq(e,o)},flatten:{value:o=>Aq(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,ET,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,ET,2)}},isEmpty:{get(){return e.issues.length===0}}})},er=be("ZodError",a9,{Parent:Error}),n9=bv(er),r9=yv(er),i9=Sv(er),s9=Tv(er),l9=Nq(er),c9=Fq(er),d9=Bq(er),u9=jq(er),p9=Uq(er),m9=zq(er),g9=$q(er),h9=qq(er),Yt=be("ZodType",(e,t)=>(Ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:wf(e,"input"),output:wf(e,"output")}}),e.toJSONSchema=F7(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...o)=>e.clone(Bs(t,{checks:[...t.checks??[],...o.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(o,a)=>Di(e,o,a),e.brand=()=>e,e.register=((o,a)=>(o.add(e,a),e)),e.parse=(o,a)=>n9(e,o,a,{callee:e.parse}),e.safeParse=(o,a)=>i9(e,o,a),e.parseAsync=async(o,a)=>r9(e,o,a,{callee:e.parseAsync}),e.safeParseAsync=async(o,a)=>s9(e,o,a),e.spa=e.safeParseAsync,e.encode=(o,a)=>l9(e,o,a),e.decode=(o,a)=>c9(e,o,a),e.encodeAsync=async(o,a)=>d9(e,o,a),e.decodeAsync=async(o,a)=>u9(e,o,a),e.safeEncode=(o,a)=>p9(e,o,a),e.safeDecode=(o,a)=>m9(e,o,a),e.safeEncodeAsync=async(o,a)=>g9(e,o,a),e.safeDecodeAsync=async(o,a)=>h9(e,o,a),e.refine=(o,a)=>e.check(cH(o,a)),e.superRefine=o=>e.check(dH(o)),e.overwrite=o=>e.check(Od(o)),e.optional=()=>Po(e),e.exactOptional=()=>Y9(e),e.nullable=()=>OR(e),e.nullish=()=>Po(OR(e)),e.nonoptional=o=>tH(e,o),e.array=()=>Fe(e),e.or=o=>ro([e,o]),e.and=o=>U_(e,o),e.transform=o=>DT(e,YM(o)),e.default=o=>J9(e,o),e.prefault=o=>eH(e,o),e.catch=o=>aH(e,o),e.pipe=o=>DT(e,o),e.readonly=()=>iH(e),e.describe=o=>{const a=e.clone();return Zu.add(a,{description:o}),a},Object.defineProperty(e,"description",{get(){return Zu.get(e)?.description},configurable:!0}),e.meta=(...o)=>{if(o.length===0)return Zu.get(e);const a=e.clone();return Zu.add(a,o[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=o=>o(e),e)),zM=be("_ZodString",(e,t)=>{N_.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(a,n,i)=>mM(e,a,n);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...a)=>e.check(y7(...a)),e.includes=(...a)=>e.check(w7(...a)),e.startsWith=(...a)=>e.check(_7(...a)),e.endsWith=(...a)=>e.check(C7(...a)),e.min=(...a)=>e.check(bf(...a)),e.max=(...a)=>e.check(uM(...a)),e.length=(...a)=>e.check(pM(...a)),e.nonempty=(...a)=>e.check(bf(1,...a)),e.lowercase=a=>e.check(S7(a)),e.uppercase=a=>e.check(T7(a)),e.trim=()=>e.check(x7()),e.normalize=(...a)=>e.check(k7(...a)),e.toLowerCase=()=>e.check(E7()),e.toUpperCase=()=>e.check(R7()),e.slugify=()=>e.check(A7())}),$M=be("ZodString",(e,t)=>{N_.init(e,t),zM.init(e,t),e.email=o=>e.check(FV(f9,o)),e.url=o=>e.check(dM(qM,o)),e.jwt=o=>e.check(o7(O9,o)),e.emoji=o=>e.check($V(b9,o)),e.guid=o=>e.check(PR(AR,o)),e.uuid=o=>e.check(BV(Og,o)),e.uuidv4=o=>e.check(jV(Og,o)),e.uuidv6=o=>e.check(UV(Og,o)),e.uuidv7=o=>e.check(zV(Og,o)),e.nanoid=o=>e.check(qV(y9,o)),e.guid=o=>e.check(PR(AR,o)),e.cuid=o=>e.check(VV(S9,o)),e.cuid2=o=>e.check(HV(T9,o)),e.ulid=o=>e.check(GV(w9,o)),e.base64=o=>e.check(XV(R9,o)),e.base64url=o=>e.check(e7(A9,o)),e.xid=o=>e.check(KV(_9,o)),e.ksuid=o=>e.check(WV(C9,o)),e.ipv4=o=>e.check(YV(P9,o)),e.ipv6=o=>e.check(ZV(k9,o)),e.cidrv4=o=>e.check(QV(x9,o)),e.cidrv6=o=>e.check(JV(E9,o)),e.e164=o=>e.check(t7(D9,o)),e.datetime=o=>e.check(UM(o)),e.date=o=>e.check(J7(o)),e.time=o=>e.check(e9(o)),e.duration=o=>e.check(o9(o))});function V(e){return LV($M,e)}const xo=be("ZodStringFormat",(e,t)=>{To.init(e,t),zM.init(e,t)}),f9=be("ZodEmail",(e,t)=>{N8.init(e,t),xo.init(e,t)}),AR=be("ZodGUID",(e,t)=>{M8.init(e,t),xo.init(e,t)}),Og=be("ZodUUID",(e,t)=>{L8.init(e,t),xo.init(e,t)}),qM=be("ZodURL",(e,t)=>{F8.init(e,t),xo.init(e,t)});function v9(e){return dM(qM,e)}const b9=be("ZodEmoji",(e,t)=>{B8.init(e,t),xo.init(e,t)}),y9=be("ZodNanoID",(e,t)=>{j8.init(e,t),xo.init(e,t)}),S9=be("ZodCUID",(e,t)=>{U8.init(e,t),xo.init(e,t)}),T9=be("ZodCUID2",(e,t)=>{z8.init(e,t),xo.init(e,t)}),w9=be("ZodULID",(e,t)=>{$8.init(e,t),xo.init(e,t)}),_9=be("ZodXID",(e,t)=>{q8.init(e,t),xo.init(e,t)}),C9=be("ZodKSUID",(e,t)=>{V8.init(e,t),xo.init(e,t)}),P9=be("ZodIPv4",(e,t)=>{Y8.init(e,t),xo.init(e,t)}),k9=be("ZodIPv6",(e,t)=>{Z8.init(e,t),xo.init(e,t)}),x9=be("ZodCIDRv4",(e,t)=>{Q8.init(e,t),xo.init(e,t)}),E9=be("ZodCIDRv6",(e,t)=>{J8.init(e,t),xo.init(e,t)}),R9=be("ZodBase64",(e,t)=>{X8.init(e,t),xo.init(e,t)}),A9=be("ZodBase64URL",(e,t)=>{tV.init(e,t),xo.init(e,t)}),D9=be("ZodE164",(e,t)=>{oV.init(e,t),xo.init(e,t)}),O9=be("ZodJWT",(e,t)=>{nV.init(e,t),xo.init(e,t)}),B_=be("ZodNumber",(e,t)=>{rM.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(a,n,i)=>gM(e,a,n),e.gt=(a,n)=>e.check(xR(a,n)),e.gte=(a,n)=>e.check(NS(a,n)),e.min=(a,n)=>e.check(NS(a,n)),e.lt=(a,n)=>e.check(kR(a,n)),e.lte=(a,n)=>e.check(LS(a,n)),e.max=(a,n)=>e.check(LS(a,n)),e.int=a=>e.check(DR(a)),e.safe=a=>e.check(DR(a)),e.positive=a=>e.check(xR(0,a)),e.nonnegative=a=>e.check(NS(0,a)),e.negative=a=>e.check(kR(0,a)),e.nonpositive=a=>e.check(LS(0,a)),e.multipleOf=(a,n)=>e.check(ER(a,n)),e.step=(a,n)=>e.check(ER(a,n)),e.finite=()=>e;const o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function Lt(e){return s7(B_,e)}const I9=be("ZodNumberFormat",(e,t)=>{rV.init(e,t),B_.init(e,t)});function DR(e){return c7(I9,e)}const VM=be("ZodBoolean",(e,t)=>{iV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>hM(e,o,a)});function $t(e){return d7(VM,e)}const M9=be("ZodUndefined",(e,t)=>{sV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>vM(e,o)});function ofe(e){return p7(M9,e)}const L9=be("ZodNull",(e,t)=>{lV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>fM(e,o,a)});function N9(e){return m7(L9,e)}const F9=be("ZodAny",(e,t)=>{cV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>yM()});function B9(){return g7(F9)}const j9=be("ZodUnknown",(e,t)=>{dV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>SM()});function ko(){return h7(j9)}const U9=be("ZodNever",(e,t)=>{uV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>bM(e,o,a)});function HM(e){return f7(U9,e)}const z9=be("ZodArray",(e,t)=>{pV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>kM(e,o,a,n),e.element=t.element,e.min=(o,a)=>e.check(bf(o,a)),e.nonempty=o=>e.check(bf(1,o)),e.max=(o,a)=>e.check(uM(o,a)),e.length=(o,a)=>e.check(pM(o,a)),e.unwrap=()=>e.element});function Fe(e,t){return D7(z9,e,t)}const j_=be("ZodObject",(e,t)=>{gV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>xM(e,o,a,n),Dt(e,"shape",()=>t.shape),e.keyof=()=>ia(Object.keys(e._zod.def.shape)),e.catchall=o=>e.clone({...e._zod.def,catchall:o}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ko()}),e.loose=()=>e.clone({...e._zod.def,catchall:ko()}),e.strict=()=>e.clone({...e._zod.def,catchall:HM()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=o=>Pq(e,o),e.safeExtend=o=>kq(e,o),e.merge=o=>xq(e,o),e.pick=o=>_q(e,o),e.omit=o=>Cq(e,o),e.partial=(...o)=>Eq(ZM,e,o[0]),e.required=(...o)=>Rq(QM,e,o[0])});function _e(e,t){const o={type:"object",shape:e??{},...qe(t)};return new j_(o)}function afe(e,t){return new j_({type:"object",shape:e,catchall:HM(),...qe(t)})}function Ca(e,t){return new j_({type:"object",shape:e,catchall:ko(),...qe(t)})}const GM=be("ZodUnion",(e,t)=>{lM.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>EM(e,o,a,n),e.options=t.options});function ro(e,t){return new GM({type:"union",options:e,...qe(t)})}const $9=be("ZodDiscriminatedUnion",(e,t)=>{GM.init(e,t),hV.init(e,t)});function KM(e,t,o){return new $9({type:"union",options:t,discriminator:e,...qe(o)})}const q9=be("ZodIntersection",(e,t)=>{fV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>RM(e,o,a,n)});function U_(e,t){return new q9({type:"intersection",left:e,right:t})}const V9=be("ZodTuple",(e,t)=>{vV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>AM(e,o,a,n),e.rest=o=>e.clone({...e._zod.def,rest:o})});function nfe(e,t,o){const a=t instanceof Ht,n=a?o:t,i=a?t:null;return new V9({type:"tuple",items:e,rest:i,...qe(n)})}const WM=be("ZodRecord",(e,t)=>{bV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>DM(e,o,a,n),e.keyType=t.keyType,e.valueType=t.valueType});function vo(e,t,o){return new WM({type:"record",keyType:e,valueType:t,...qe(o)})}function rfe(e,t,o){const a=Di(e);return a._zod.values=void 0,new WM({type:"record",keyType:a,valueType:t,...qe(o)})}const AT=be("ZodEnum",(e,t)=>{yV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(a,n,i)=>TM(e,a,n),e.enum=t.entries,e.options=Object.values(t.entries);const o=new Set(Object.keys(t.entries));e.extract=(a,n)=>{const i={};for(const l of a)if(o.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new AT({...t,checks:[],...qe(n),entries:i})},e.exclude=(a,n)=>{const i={...t.entries};for(const l of a)if(o.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new AT({...t,checks:[],...qe(n),entries:i})}});function ia(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new AT({type:"enum",entries:o,...qe(t)})}const H9=be("ZodLiteral",(e,t)=>{SV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>wM(e,o,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ze(e,t){return new H9({type:"literal",values:Array.isArray(e)?e:[e],...qe(t)})}const G9=be("ZodFile",(e,t)=>{TV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>_M(e,o,a),e.min=(o,a)=>e.check(b7(o,a)),e.max=(o,a)=>e.check(v7(o,a)),e.mime=(o,a)=>e.check(P7(Array.isArray(o)?o:[o],a))});function ife(e){return O7(G9,e)}const K9=be("ZodTransform",(e,t)=>{wV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>PM(e,o),e._zod.parse=(o,a)=>{if(a.direction==="backward")throw new VI(e.constructor.name);o.addIssue=i=>{if(typeof i=="string")o.issues.push(Cp(i,o.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=o.value),l.inst??(l.inst=e),o.issues.push(Cp(l))}};const n=t.transform(o.value,o);return n instanceof Promise?n.then(i=>(o.value=i,o)):(o.value=n,o)}});function YM(e){return new K9({type:"transform",transform:e})}const ZM=be("ZodOptional",(e,t)=>{cM.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>F_(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function Po(e){return new ZM({type:"optional",innerType:e})}const W9=be("ZodExactOptional",(e,t)=>{_V.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>F_(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function Y9(e){return new W9({type:"optional",innerType:e})}const Z9=be("ZodNullable",(e,t)=>{CV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>OM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function OR(e){return new Z9({type:"nullable",innerType:e})}const Q9=be("ZodDefault",(e,t)=>{PV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>MM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function J9(e,t){return new Q9({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():WI(t)}})}const X9=be("ZodPrefault",(e,t)=>{kV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>LM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function eH(e,t){return new X9({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():WI(t)}})}const QM=be("ZodNonOptional",(e,t)=>{xV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>IM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function tH(e,t){return new QM({type:"nonoptional",innerType:e,...qe(t)})}const oH=be("ZodCatch",(e,t)=>{EV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>NM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function aH(e,t){return new oH({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const nH=be("ZodPipe",(e,t)=>{RV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>FM(e,o,a,n),e.in=t.in,e.out=t.out});function DT(e,t){return new nH({type:"pipe",in:e,out:t})}const rH=be("ZodReadonly",(e,t)=>{AV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>BM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function iH(e){return new rH({type:"readonly",innerType:e})}const sH=be("ZodLazy",(e,t)=>{DV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>jM(e,o,a,n),e.unwrap=()=>e._zod.def.getter()});function Gr(e){return new sH({type:"lazy",getter:e})}const z_=be("ZodCustom",(e,t)=>{OV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>CM(e,o)});function lH(e,t){return I7(z_,e??(()=>!0),t)}function cH(e,t={}){return M7(z_,e,t)}function dH(e){return L7(e)}function sfe(e,t={}){const o=new z_({type:"custom",check:"custom",fn:a=>a instanceof e,abort:!0,...qe(t)});return o._zod.bag.Class=e,o._zod.check=a=>{a.value instanceof e||a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:o,path:[...o._zod.def.path??[]]})},o}function $_(e,t){return DT(YM(e),t)}const uH={custom:"custom"};function _v(e){return NV($M,e)}function JM(e){return l7(B_,e)}function IR(e){return u7(VM,e)}const pH="2025-11-25",lfe=[pH,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],mH="io.modelcontextprotocol/related-task",Cv="2.0",na=lH(e=>e!==null&&(typeof e=="object"||typeof e=="function")),XM=ro([V(),Lt().int()]),eL=V();Ca({ttl:Lt().optional(),pollInterval:Lt().optional()});const gH=_e({ttl:Lt().optional()}),hH=_e({taskId:V()}),q_=Ca({progressToken:XM.optional(),[mH]:hH.optional()}),Dn=_e({_meta:q_.optional()}),$p=Dn.extend({task:gH.optional()}),cfe=e=>$p.safeParse(e).success,ka=_e({method:V(),params:Dn.loose().optional()}),tr=_e({_meta:q_.optional()}),or=_e({method:V(),params:tr.loose().optional()}),xa=Ca({_meta:q_.optional()}),Pv=ro([V(),Lt().int()]),tL=_e({jsonrpc:Ze(Cv),id:Pv,...ka.shape}).strict(),dfe=e=>tL.safeParse(e).success,oL=_e({jsonrpc:Ze(Cv),...or.shape}).strict(),ufe=e=>oL.safeParse(e).success,V_=_e({jsonrpc:Ze(Cv),id:Pv,result:xa}).strict(),pfe=e=>V_.safeParse(e).success;var Pp;(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"})(Pp||(Pp={}));const H_=_e({jsonrpc:Ze(Cv),id:Pv.optional(),error:_e({code:Lt().int(),message:V(),data:ko().optional()})}).strict(),mfe=e=>H_.safeParse(e).success,gfe=ro([tL,oL,V_,H_]);ro([V_,H_]);const aL=xa.strict(),fH=tr.extend({requestId:Pv.optional(),reason:V().optional()}),nL=or.extend({method:Ze("notifications/cancelled"),params:fH}),vH=_e({src:V(),mimeType:V().optional(),sizes:Fe(V()).optional(),theme:ia(["light","dark"]).optional()}),qp=_e({icons:Fe(vH).optional()}),bd=_e({name:V(),title:V().optional()}),rL=bd.extend({...bd.shape,...qp.shape,version:V(),websiteUrl:V().optional(),description:V().optional()}),bH=U_(_e({applyDefaults:$t().optional()}),vo(V(),ko())),yH=$_(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,U_(_e({form:bH.optional(),url:na.optional()}),vo(V(),ko()).optional())),SH=Ca({list:na.optional(),cancel:na.optional(),requests:Ca({sampling:Ca({createMessage:na.optional()}).optional(),elicitation:Ca({create:na.optional()}).optional()}).optional()}),TH=Ca({list:na.optional(),cancel:na.optional(),requests:Ca({tools:Ca({call:na.optional()}).optional()}).optional()}),wH=_e({experimental:vo(V(),na).optional(),sampling:_e({context:na.optional(),tools:na.optional()}).optional(),elicitation:yH.optional(),roots:_e({listChanged:$t().optional()}).optional(),tasks:SH.optional(),extensions:vo(V(),na).optional()}),_H=Dn.extend({protocolVersion:V(),capabilities:wH,clientInfo:rL}),CH=ka.extend({method:Ze("initialize"),params:_H}),PH=_e({experimental:vo(V(),na).optional(),logging:na.optional(),completions:na.optional(),prompts:_e({listChanged:$t().optional()}).optional(),resources:_e({subscribe:$t().optional(),listChanged:$t().optional()}).optional(),tools:_e({listChanged:$t().optional()}).optional(),tasks:TH.optional(),extensions:vo(V(),na).optional()}),kH=xa.extend({protocolVersion:V(),capabilities:PH,serverInfo:rL,instructions:V().optional()}),iL=or.extend({method:Ze("notifications/initialized"),params:tr.optional()}),hfe=e=>iL.safeParse(e).success,sL=ka.extend({method:Ze("ping"),params:Dn.optional()}),xH=_e({progress:Lt(),total:Po(Lt()),message:Po(V())}),EH=_e({...tr.shape,...xH.shape,progressToken:XM}),lL=or.extend({method:Ze("notifications/progress"),params:EH}),RH=Dn.extend({cursor:eL.optional()}),Vp=ka.extend({params:RH.optional()}),Hp=xa.extend({nextCursor:eL.optional()}),AH=ia(["working","input_required","completed","failed","cancelled"]),Gp=_e({taskId:V(),status:AH,ttl:ro([Lt(),N9()]),createdAt:V(),lastUpdatedAt:V(),pollInterval:Po(Lt()),statusMessage:Po(V())}),cL=xa.extend({task:Gp}),DH=tr.merge(Gp),dL=or.extend({method:Ze("notifications/tasks/status"),params:DH}),uL=ka.extend({method:Ze("tasks/get"),params:Dn.extend({taskId:V()})}),pL=xa.merge(Gp),mL=ka.extend({method:Ze("tasks/result"),params:Dn.extend({taskId:V()})});xa.loose();const gL=Vp.extend({method:Ze("tasks/list")}),hL=Hp.extend({tasks:Fe(Gp)}),fL=ka.extend({method:Ze("tasks/cancel"),params:Dn.extend({taskId:V()})}),ffe=xa.merge(Gp),vL=_e({uri:V(),mimeType:Po(V()),_meta:vo(V(),ko()).optional()}),bL=vL.extend({text:V()}),G_=V().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),yL=vL.extend({blob:G_}),Kp=ia(["user","assistant"]),Id=_e({audience:Fe(Kp).optional(),priority:Lt().min(0).max(1).optional(),lastModified:UM({offset:!0}).optional()}),SL=_e({...bd.shape,...qp.shape,uri:V(),description:Po(V()),mimeType:Po(V()),size:Po(Lt()),annotations:Id.optional(),_meta:Po(Ca({}))}),OH=_e({...bd.shape,...qp.shape,uriTemplate:V(),description:Po(V()),mimeType:Po(V()),annotations:Id.optional(),_meta:Po(Ca({}))}),IH=Vp.extend({method:Ze("resources/list")}),MH=Hp.extend({resources:Fe(SL)}),LH=Vp.extend({method:Ze("resources/templates/list")}),NH=Hp.extend({resourceTemplates:Fe(OH)}),K_=Dn.extend({uri:V()}),FH=K_,BH=ka.extend({method:Ze("resources/read"),params:FH}),jH=xa.extend({contents:Fe(ro([bL,yL]))}),UH=or.extend({method:Ze("notifications/resources/list_changed"),params:tr.optional()}),zH=K_,$H=ka.extend({method:Ze("resources/subscribe"),params:zH}),qH=K_,VH=ka.extend({method:Ze("resources/unsubscribe"),params:qH}),HH=tr.extend({uri:V()}),GH=or.extend({method:Ze("notifications/resources/updated"),params:HH}),KH=_e({name:V(),description:Po(V()),required:Po($t())}),WH=_e({...bd.shape,...qp.shape,description:Po(V()),arguments:Po(Fe(KH)),_meta:Po(Ca({}))}),YH=Vp.extend({method:Ze("prompts/list")}),ZH=Hp.extend({prompts:Fe(WH)}),QH=Dn.extend({name:V(),arguments:vo(V(),V()).optional()}),JH=ka.extend({method:Ze("prompts/get"),params:QH}),W_=_e({type:Ze("text"),text:V(),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),Y_=_e({type:Ze("image"),data:G_,mimeType:V(),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),Z_=_e({type:Ze("audio"),data:G_,mimeType:V(),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),XH=_e({type:Ze("tool_use"),name:V(),id:V(),input:vo(V(),ko()),_meta:vo(V(),ko()).optional()}),eG=_e({type:Ze("resource"),resource:ro([bL,yL]),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),tG=SL.extend({type:Ze("resource_link")}),Q_=ro([W_,Y_,Z_,tG,eG]),oG=_e({role:Kp,content:Q_}),aG=xa.extend({description:V().optional(),messages:Fe(oG)}),nG=or.extend({method:Ze("notifications/prompts/list_changed"),params:tr.optional()}),rG=_e({title:V().optional(),readOnlyHint:$t().optional(),destructiveHint:$t().optional(),idempotentHint:$t().optional(),openWorldHint:$t().optional()}),iG=_e({taskSupport:ia(["required","optional","forbidden"]).optional()}),TL=_e({...bd.shape,...qp.shape,description:V().optional(),inputSchema:_e({type:Ze("object"),properties:vo(V(),na).optional(),required:Fe(V()).optional()}).catchall(ko()),outputSchema:_e({type:Ze("object"),properties:vo(V(),na).optional(),required:Fe(V()).optional()}).catchall(ko()).optional(),annotations:rG.optional(),execution:iG.optional(),_meta:vo(V(),ko()).optional()}),sG=Vp.extend({method:Ze("tools/list")}),lG=Hp.extend({tools:Fe(TL)}),wL=xa.extend({content:Fe(Q_).default([]),structuredContent:vo(V(),ko()).optional(),isError:$t().optional()});wL.or(xa.extend({toolResult:ko()}));const cG=$p.extend({name:V(),arguments:vo(V(),ko()).optional()}),dG=ka.extend({method:Ze("tools/call"),params:cG}),uG=or.extend({method:Ze("notifications/tools/list_changed"),params:tr.optional()}),vfe=_e({autoRefresh:$t().default(!0),debounceMs:Lt().int().nonnegative().default(300)}),_L=ia(["debug","info","notice","warning","error","critical","alert","emergency"]),pG=Dn.extend({level:_L}),mG=ka.extend({method:Ze("logging/setLevel"),params:pG}),gG=tr.extend({level:_L,logger:V().optional(),data:ko()}),hG=or.extend({method:Ze("notifications/message"),params:gG}),fG=_e({name:V().optional()}),vG=_e({hints:Fe(fG).optional(),costPriority:Lt().min(0).max(1).optional(),speedPriority:Lt().min(0).max(1).optional(),intelligencePriority:Lt().min(0).max(1).optional()}),bG=_e({mode:ia(["auto","required","none"]).optional()}),yG=_e({type:Ze("tool_result"),toolUseId:V().describe("The unique identifier for the corresponding tool call."),content:Fe(Q_).default([]),structuredContent:_e({}).loose().optional(),isError:$t().optional(),_meta:vo(V(),ko()).optional()}),SG=KM("type",[W_,Y_,Z_]),_f=KM("type",[W_,Y_,Z_,XH,yG]),TG=_e({role:Kp,content:ro([_f,Fe(_f)]),_meta:vo(V(),ko()).optional()}),wG=$p.extend({messages:Fe(TG),modelPreferences:vG.optional(),systemPrompt:V().optional(),includeContext:ia(["none","thisServer","allServers"]).optional(),temperature:Lt().optional(),maxTokens:Lt().int(),stopSequences:Fe(V()).optional(),metadata:na.optional(),tools:Fe(TL).optional(),toolChoice:bG.optional()}),_G=ka.extend({method:Ze("sampling/createMessage"),params:wG}),CG=xa.extend({model:V(),stopReason:Po(ia(["endTurn","stopSequence","maxTokens"]).or(V())),role:Kp,content:SG}),PG=xa.extend({model:V(),stopReason:Po(ia(["endTurn","stopSequence","maxTokens","toolUse"]).or(V())),role:Kp,content:ro([_f,Fe(_f)])}),kG=_e({type:Ze("boolean"),title:V().optional(),description:V().optional(),default:$t().optional()}),xG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),minLength:Lt().optional(),maxLength:Lt().optional(),format:ia(["email","uri","date","date-time"]).optional(),default:V().optional()}),EG=_e({type:ia(["number","integer"]),title:V().optional(),description:V().optional(),minimum:Lt().optional(),maximum:Lt().optional(),default:Lt().optional()}),RG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),enum:Fe(V()),default:V().optional()}),AG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),oneOf:Fe(_e({const:V(),title:V()})),default:V().optional()}),DG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),enum:Fe(V()),enumNames:Fe(V()).optional(),default:V().optional()}),OG=ro([RG,AG]),IG=_e({type:Ze("array"),title:V().optional(),description:V().optional(),minItems:Lt().optional(),maxItems:Lt().optional(),items:_e({type:Ze("string"),enum:Fe(V())}),default:Fe(V()).optional()}),MG=_e({type:Ze("array"),title:V().optional(),description:V().optional(),minItems:Lt().optional(),maxItems:Lt().optional(),items:_e({anyOf:Fe(_e({const:V(),title:V()}))}),default:Fe(V()).optional()}),LG=ro([IG,MG]),NG=ro([DG,OG,LG]),FG=ro([NG,kG,xG,EG]),BG=$p.extend({mode:Ze("form").optional(),message:V(),requestedSchema:_e({type:Ze("object"),properties:vo(V(),FG),required:Fe(V()).optional()})}),jG=$p.extend({mode:Ze("url"),message:V(),elicitationId:V(),url:V().url()}),UG=ro([BG,jG]),zG=ka.extend({method:Ze("elicitation/create"),params:UG}),$G=tr.extend({elicitationId:V()}),qG=or.extend({method:Ze("notifications/elicitation/complete"),params:$G}),VG=xa.extend({action:ia(["accept","decline","cancel"]),content:$_(e=>e===null?void 0:e,vo(V(),ro([V(),Lt(),$t(),Fe(V())])).optional())}),HG=_e({type:Ze("ref/resource"),uri:V()}),GG=_e({type:Ze("ref/prompt"),name:V()}),KG=Dn.extend({ref:ro([GG,HG]),argument:_e({name:V(),value:V()}),context:_e({arguments:vo(V(),V()).optional()}).optional()}),WG=ka.extend({method:Ze("completion/complete"),params:KG}),YG=xa.extend({completion:Ca({values:Fe(V()).max(100),total:Po(Lt().int()),hasMore:Po($t())})}),ZG=_e({uri:V().startsWith("file://"),name:V().optional(),_meta:vo(V(),ko()).optional()}),QG=ka.extend({method:Ze("roots/list"),params:Dn.optional()}),JG=xa.extend({roots:Fe(ZG)}),XG=or.extend({method:Ze("notifications/roots/list_changed"),params:tr.optional()});ro([sL,CH,WG,mG,JH,YH,IH,LH,BH,$H,VH,dG,sG,uL,mL,gL,fL]);ro([nL,lL,iL,XG,dL]);ro([aL,CG,PG,VG,JG,pL,hL,cL]);ro([sL,_G,zG,QG,uL,mL,gL,fL]);ro([nL,lL,hG,GH,UH,uG,nG,dL,qG]);ro([aL,kH,YG,aG,ZH,MH,NH,jH,wL,lG,pL,hL,cL]);class kv extends Error{constructor(t,o,a){super(`MCP error ${t}: ${o}`),this.code=t,this.data=a,this.name="McpError"}static fromError(t,o,a){if(t===Pp.UrlElicitationRequired&&a){const n=a;if(n.elicitations)return new eK(n.elicitations,o)}return new kv(t,o,a)}}class eK extends kv{constructor(t,o=`URL elicitation${t.length>1?"s":""} required`){super(Pp.UrlElicitationRequired,o,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}const bfe={SELF:e=>`${e}_self`,REGISTRY:e=>`${e}_registry`,COMMUNITY_REGISTRY:e=>`${e}_community-registry`,DEV_ASSETS:e=>`${e}_dev-assets`,SITE_DIAGNOSTICS:e=>`site-diagnostics_${e}`,REPORTS:e=>`${e}_commerce-discovery`},yfe="get_my_diagnostic",Sfe="self";function Wn(e){return{is(t){return!t||!t.startsWith(e)?null:t.slice(e.length)||null},get(t){return`${e}${t}`}}}function tK(e){return{id:e.id,organization_id:e.organizationId,title:e.title,description:e.description,icon:e.icon,status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:e.instructions??null,...e.ui?{ui:e.ui}:{}},pinned:!1,connections:[]}}const CL=Wn("decopilot_"),oK=CL.is,aK=CL.get,PL=Wn("dev_"),Tfe=PL.get,wfe=PL.is,nK="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",rK="#6366f1",_fe=`https://api.iconify.design/lucide:file-search.svg?color=${encodeURIComponent(rK)}`;function Cfe(e){return tK({id:aK(e),organizationId:e,title:"Super Agent",description:"Default agent that aggregates all organization connections",icon:nK,ui:{layout:{defaultMainView:{type:"overview"},chatDefaultOpen:!0}}})}const iK=Wn("brand-context-setup_"),sK=iK.is,lK=Wn("site-diagnostics_"),cK=lK.is,kL=Wn("commerce-discovery_"),dK=kL.is,Pfe=kL.get,fl={AUTOMATION_MANAGER:Wn("studio-automation-manager_"),CONNECTION_MANAGER:Wn("studio-connection-manager_"),API_KEY_MANAGER:Wn("studio-api-key-manager_"),STORE_MANAGER:Wn("studio-store-manager_"),BRAND_MANAGER:Wn("studio-brand-manager_"),USAGE_MANAGER:Wn("studio-usage-manager_")},kfe={AUTOMATION_MANAGER:fl.AUTOMATION_MANAGER.get,CONNECTION_MANAGER:fl.CONNECTION_MANAGER.get,API_KEY_MANAGER:fl.API_KEY_MANAGER.get,STORE_MANAGER:fl.STORE_MANAGER.get,BRAND_MANAGER:fl.BRAND_MANAGER.get,USAGE_MANAGER:fl.USAGE_MANAGER.get};function uK(e){return e?Object.values(fl).some(t=>t.is(e)!==null):!1}const pK=["studio-agent-manager_","studio-task-manager_"],mK=pK.map(Wn);function gK(e){return e?mK.some(t=>t.is(e)!==null):!1}const hK={from({org:e,project:t}){return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,o]=e.split("/");if(!t||!o)throw new Error("Invalid locator");return{org:t,project:o}}},J_=R.createContext(void 0),xfe=()=>R.useContext(J_),Wp=()=>{const e=R.useContext(J_);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},Efe=()=>Wp().org,Rfe=e=>{const t=Ie.c(10),{children:o,org:a,project:n}=e;let i;t[0]!==a.id||t[1]!==n.id?(i=hK.from({org:a.id,project:n.id}),t[0]=a.id,t[1]=n.id,t[2]=i):i=t[2];const l=i;let c;t[3]!==l||t[4]!==a||t[5]!==n?(c={org:a,project:n,locator:l},t[3]=l,t[4]=a,t[5]=n,t[6]=c):c=t[6];const u=c;let p;return t[7]!==o||t[8]!==u?(p=T.jsx(J_.Provider,{value:u,children:o}),t[7]=o,t[8]=u,t[9]=p):p=t[9],p};function fK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const vK=e=>{switch(e){case"success":return SK;case"info":return wK;case"warning":return TK;case"error":return _K;default:return null}},bK=Array(12).fill(0),yK=({visible:e,className:t})=>X.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},X.createElement("div",{className:"sonner-spinner"},bK.map((o,a)=>X.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),SK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),TK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),wK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),_K=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},X.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),PK=()=>{const[e,t]=X.useState(document.hidden);return X.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let OT=1;class kK{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:a,...n}=t,i=typeof t?.id=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:OT++,l=this.toasts.find(u=>u.id===i),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...t,id:i,title:a}),{...u,...t,id:i,dismissible:c,title:a}):u):this.addToast({title:a,...n,dismissible:c,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(a=>a({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let a;o.loading!==void 0&&(a=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,l;const c=n.then(async p=>{if(l=["resolve",p],X.isValidElement(p))i=!1,this.create({id:a,type:"default",message:p});else if(EK(p)&&!p.ok){i=!1;const m=typeof o.error=="function"?await o.error(`HTTP error! status: ${p.status}`):o.error,f=typeof o.description=="function"?await o.description(`HTTP error! status: ${p.status}`):o.description,b=typeof m=="object"&&!X.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:f,...b})}else if(p instanceof Error){i=!1;const m=typeof o.error=="function"?await o.error(p):o.error,f=typeof o.description=="function"?await o.description(p):o.description,b=typeof m=="object"&&!X.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:f,...b})}else if(o.success!==void 0){i=!1;const m=typeof o.success=="function"?await o.success(p):o.success,f=typeof o.description=="function"?await o.description(p):o.description,b=typeof m=="object"&&!X.isValidElement(m)?m:{message:m};this.create({id:a,type:"success",description:f,...b})}}).catch(async p=>{if(l=["reject",p],o.error!==void 0){i=!1;const g=typeof o.error=="function"?await o.error(p):o.error,m=typeof o.description=="function"?await o.description(p):o.description,v=typeof g=="object"&&!X.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:m,...v})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),o.finally==null||o.finally.call(o)}),u=()=>new Promise((p,g)=>c.then(()=>l[0]==="reject"?g(l[1]):p(l[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:u}:Object.assign(a,{unwrap:u})},this.custom=(t,o)=>{const a=o?.id||OT++;return this.create({jsx:t(a),id:a,...o}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const sn=new kK,xK=(e,t)=>{const o=t?.id||OT++;return sn.addToast({title:e,...t,id:o}),o},EK=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RK=xK,AK=()=>sn.toasts,DK=()=>sn.getActiveToasts(),Vr=Object.assign(RK,{success:sn.success,info:sn.info,warning:sn.warning,error:sn.error,custom:sn.custom,message:sn.message,promise:sn.promise,dismiss:sn.dismiss,loading:sn.loading},{getHistory:AK,getToasts:DK});fK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ig(e){return e.label!==void 0}const OK=3,IK="24px",MK="16px",MR=4e3,LK=356,NK=14,FK=45,BK=200;function Or(...e){return e.filter(Boolean).join(" ")}function jK(e){const[t,o]=e.split("-"),a=[];return t&&a.push(t),o&&a.push(o),a}const UK=e=>{var t,o,a,n,i,l,c,u,p;const{invert:g,toast:m,unstyled:f,interacting:v,setHeights:b,visibleToasts:S,heights:C,index:w,toasts:_,expanded:E,removeToast:k,defaultRichColors:x,closeButton:A,style:D,cancelButtonStyle:O,actionButtonStyle:N,className:$="",descriptionClassName:F="",duration:z,position:j,gap:K,expandByDefault:ne,classNames:H,icons:Z,closeButtonAriaLabel:te="Close toast"}=e,[le,Q]=X.useState(null),[M,G]=X.useState(null),[q,L]=X.useState(!1),[U,J]=X.useState(!1),[pe,ge]=X.useState(!1),[Ce,$e]=X.useState(!1),[Y,ae]=X.useState(!1),[ve,ie]=X.useState(0),[Te,ke]=X.useState(0),it=X.useRef(m.duration||z||MR),lt=X.useRef(null),Ge=X.useRef(null),tt=w===0,De=w+1<=S,Ae=m.type,He=m.dismissible!==!1,W=m.className||"",oe=m.descriptionClassName||"",se=X.useMemo(()=>C.findIndex(Qe=>Qe.toastId===m.id)||0,[C,m.id]),Pe=X.useMemo(()=>{var Qe;return(Qe=m.closeButton)!=null?Qe:A},[m.closeButton,A]),Ee=X.useMemo(()=>m.duration||z||MR,[m.duration,z]),Re=X.useRef(0),Le=X.useRef(0),at=X.useRef(0),rt=X.useRef(null),[St,Et]=j.split("-"),Tt=X.useMemo(()=>C.reduce((Qe,gt,oo)=>oo>=se?Qe:Qe+gt.height,0),[C,se]),$o=PK(),Jr=m.invert||g,rr=Ae==="loading";Le.current=X.useMemo(()=>se*K+Tt,[se,Tt]),X.useEffect(()=>{it.current=Ee},[Ee]),X.useEffect(()=>{L(!0)},[]),X.useEffect(()=>{const Qe=Ge.current;if(Qe){const gt=Qe.getBoundingClientRect().height;return ke(gt),b(oo=>[{toastId:m.id,height:gt,position:m.position},...oo]),()=>b(oo=>oo.filter(Zt=>Zt.toastId!==m.id))}},[b,m.id]),X.useLayoutEffect(()=>{if(!q)return;const Qe=Ge.current,gt=Qe.style.height;Qe.style.height="auto";const oo=Qe.getBoundingClientRect().height;Qe.style.height=gt,ke(oo),b(Zt=>Zt.find(Bt=>Bt.toastId===m.id)?Zt.map(Bt=>Bt.toastId===m.id?{...Bt,height:oo}:Bt):[{toastId:m.id,height:oo,position:m.position},...Zt])},[q,m.title,m.description,b,m.id,m.jsx,m.action,m.cancel]);const Xe=X.useCallback(()=>{J(!0),ie(Le.current),b(Qe=>Qe.filter(gt=>gt.toastId!==m.id)),setTimeout(()=>{k(m)},BK)},[m,k,b,Le]);X.useEffect(()=>{if(m.promise&&Ae==="loading"||m.duration===1/0||m.type==="loading")return;let Qe;return E||v||$o?(()=>{if(at.current<Re.current){const Zt=new Date().getTime()-Re.current;it.current=it.current-Zt}at.current=new Date().getTime()})():it.current!==1/0&&(Re.current=new Date().getTime(),Qe=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Xe()},it.current)),()=>clearTimeout(Qe)},[E,v,m,Ae,$o,Xe]),X.useEffect(()=>{m.delete&&(Xe(),m.onDismiss==null||m.onDismiss.call(m,m))},[Xe,m.delete]);function ht(){var Qe;if(Z?.loading){var gt;return X.createElement("div",{className:Or(H?.loader,m==null||(gt=m.classNames)==null?void 0:gt.loader,"sonner-loader"),"data-visible":Ae==="loading"},Z.loading)}return X.createElement(yK,{className:Or(H?.loader,m==null||(Qe=m.classNames)==null?void 0:Qe.loader),visible:Ae==="loading"})}const Rt=m.icon||Z?.[Ae]||vK(Ae);var dt,Ft;return X.createElement("li",{tabIndex:0,ref:Ge,className:Or($,W,H?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,H?.default,H?.[Ae],m==null||(o=m.classNames)==null?void 0:o[Ae]),"data-sonner-toast":"","data-rich-colors":(dt=m.richColors)!=null?dt:x,"data-styled":!(m.jsx||m.unstyled||f),"data-mounted":q,"data-promise":!!m.promise,"data-swiped":Y,"data-removed":U,"data-visible":De,"data-y-position":St,"data-x-position":Et,"data-index":w,"data-front":tt,"data-swiping":pe,"data-dismissible":He,"data-type":Ae,"data-invert":Jr,"data-swipe-out":Ce,"data-swipe-direction":M,"data-expanded":!!(E||ne&&q),"data-testid":m.testId,style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${U?ve:Le.current}px`,"--initial-height":ne?"auto":`${Te}px`,...D,...m.style},onDragEnd:()=>{ge(!1),Q(null),rt.current=null},onPointerDown:Qe=>{Qe.button!==2&&(rr||!He||(lt.current=new Date,ie(Le.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(ge(!0),rt.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,gt,oo;if(Ce||!He)return;rt.current=null;const Zt=Number(((Qe=Ge.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ra=Number(((gt=Ge.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Bt=new Date().getTime()-((oo=lt.current)==null?void 0:oo.getTime()),po=le==="x"?Zt:Ra,In=Math.abs(po)/Bt;if(Math.abs(po)>=FK||In>.11){ie(Le.current),m.onDismiss==null||m.onDismiss.call(m,m),G(le==="x"?Zt>0?"right":"left":Ra>0?"down":"up"),Xe(),$e(!0);return}else{var ma,Wa;(ma=Ge.current)==null||ma.style.setProperty("--swipe-amount-x","0px"),(Wa=Ge.current)==null||Wa.style.setProperty("--swipe-amount-y","0px")}ae(!1),ge(!1),Q(null)},onPointerMove:Qe=>{var gt,oo,Zt;if(!rt.current||!He||((gt=window.getSelection())==null?void 0:gt.toString().length)>0)return;const Bt=Qe.clientY-rt.current.y,po=Qe.clientX-rt.current.x;var In;const ma=(In=e.swipeDirections)!=null?In:jK(j);!le&&(Math.abs(po)>1||Math.abs(Bt)>1)&&Q(Math.abs(po)>Math.abs(Bt)?"x":"y");let Wa={x:0,y:0};const ql=ir=>1/(1.5+Math.abs(ir)/20);if(le==="y"){if(ma.includes("top")||ma.includes("bottom"))if(ma.includes("top")&&Bt<0||ma.includes("bottom")&&Bt>0)Wa.y=Bt;else{const ir=Bt*ql(Bt);Wa.y=Math.abs(ir)<Math.abs(Bt)?ir:Bt}}else if(le==="x"&&(ma.includes("left")||ma.includes("right")))if(ma.includes("left")&&po<0||ma.includes("right")&&po>0)Wa.x=po;else{const ir=po*ql(po);Wa.x=Math.abs(ir)<Math.abs(po)?ir:po}(Math.abs(Wa.x)>0||Math.abs(Wa.y)>0)&&ae(!0),(oo=Ge.current)==null||oo.style.setProperty("--swipe-amount-x",`${Wa.x}px`),(Zt=Ge.current)==null||Zt.style.setProperty("--swipe-amount-y",`${Wa.y}px`)}},Pe&&!m.jsx&&Ae!=="loading"?X.createElement("button",{"aria-label":te,"data-disabled":rr,"data-close-button":!0,onClick:rr||!He?()=>{}:()=>{Xe(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Or(H?.closeButton,m==null||(a=m.classNames)==null?void 0:a.closeButton)},(Ft=Z?.close)!=null?Ft:CK):null,(Ae||m.icon||m.promise)&&m.icon!==null&&(Z?.[Ae]!==null||m.icon)?X.createElement("div",{"data-icon":"",className:Or(H?.icon,m==null||(n=m.classNames)==null?void 0:n.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ht():null,m.type!=="loading"?Rt:null):null,X.createElement("div",{"data-content":"",className:Or(H?.content,m==null||(i=m.classNames)==null?void 0:i.content)},X.createElement("div",{"data-title":"",className:Or(H?.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?X.createElement("div",{"data-description":"",className:Or(F,oe,H?.description,m==null||(c=m.classNames)==null?void 0:c.description)},typeof m.description=="function"?m.description():m.description):null),X.isValidElement(m.cancel)?m.cancel:m.cancel&&Ig(m.cancel)?X.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||O,onClick:Qe=>{Ig(m.cancel)&&He&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Qe),Xe())},className:Or(H?.cancelButton,m==null||(u=m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,X.isValidElement(m.action)?m.action:m.action&&Ig(m.action)?X.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||N,onClick:Qe=>{Ig(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Qe),!Qe.defaultPrevented&&Xe())},className:Or(H?.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function LR(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function zK(e,t){const o={};return[e,t].forEach((a,n)=>{const i=n===1,l=i?"--mobile-offset":"--offset",c=i?MK:IK;function u(p){["top","right","bottom","left"].forEach(g=>{o[`${l}-${g}`]=typeof p=="number"?`${p}px`:p})}typeof a=="number"||typeof a=="string"?u(a):typeof a=="object"?["top","right","bottom","left"].forEach(p=>{a[p]===void 0?o[`${l}-${p}`]=c:o[`${l}-${p}`]=typeof a[p]=="number"?`${a[p]}px`:a[p]}):u(c)}),o}const $K=X.forwardRef(function(t,o){const{id:a,invert:n,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:u,className:p,offset:g,mobileOffset:m,theme:f="light",richColors:v,duration:b,style:S,visibleToasts:C=OK,toastOptions:w,dir:_=LR(),gap:E=NK,icons:k,containerAriaLabel:x="Notifications"}=t,[A,D]=X.useState([]),O=X.useMemo(()=>a?A.filter(q=>q.toasterId===a):A.filter(q=>!q.toasterId),[A,a]),N=X.useMemo(()=>Array.from(new Set([i].concat(O.filter(q=>q.position).map(q=>q.position)))),[O,i]),[$,F]=X.useState([]),[z,j]=X.useState(!1),[K,ne]=X.useState(!1),[H,Z]=X.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=X.useRef(null),le=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=X.useRef(null),M=X.useRef(!1),G=X.useCallback(q=>{D(L=>{var U;return(U=L.find(J=>J.id===q.id))!=null&&U.delete||sn.dismiss(q.id),L.filter(({id:J})=>J!==q.id)})},[]);return X.useEffect(()=>sn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{D(L=>L.map(U=>U.id===q.id?{...U,delete:!0}:U))});return}setTimeout(()=>{_I.flushSync(()=>{D(L=>{const U=L.findIndex(J=>J.id===q.id);return U!==-1?[...L.slice(0,U),{...L[U],...q},...L.slice(U+1)]:[q,...L]})})})}),[A]),X.useEffect(()=>{if(f!=="system"){Z(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:L})=>{Z(L?"dark":"light")})}catch{q.addListener(({matches:U})=>{try{Z(U?"dark":"light")}catch(J){console.error(J)}})}},[f]),X.useEffect(()=>{A.length<=1&&j(!1)},[A]),X.useEffect(()=>{const q=L=>{var U;if(l.every(ge=>L[ge]||L.code===ge)){var pe;j(!0),(pe=te.current)==null||pe.focus()}L.code==="Escape"&&(document.activeElement===te.current||(U=te.current)!=null&&U.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[l]),X.useEffect(()=>{if(te.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,M.current=!1)}},[te.current]),X.createElement("section",{ref:o,"aria-label":`${x} ${le}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((q,L)=>{var U;const[J,pe]=q.split("-");return O.length?X.createElement("ol",{key:q,dir:_==="auto"?LR():_,tabIndex:-1,ref:te,className:p,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":J,"data-x-position":pe,style:{"--front-toast-height":`${((U=$[0])==null?void 0:U.height)||0}px`,"--width":`${LK}px`,"--gap":`${E}px`,...S,...zK(g,m)},onBlur:ge=>{M.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(M.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||M.current||(M.current=!0,Q.current=ge.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{K||j(!1)},onDragEnd:()=>j(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},O.filter(ge=>!ge.position&&L===0||ge.position===q).map((ge,Ce)=>{var $e,Y;return X.createElement(UK,{key:ge.id,icons:k,index:Ce,toast:ge,defaultRichColors:v,duration:($e=w?.duration)!=null?$e:b,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:n,visibleToasts:C,closeButton:(Y=w?.closeButton)!=null?Y:u,interacting:K,position:q,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:G,toasts:O.filter(ae=>ae.position==ge.position),heights:$.filter(ae=>ae.position==ge.position),setHeights:F,expandByDefault:c,gap:E,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),On={publicConfig:()=>["publicConfig"],appVersionCheck:()=>["appVersionCheck"],organizations:()=>["organizations"],members:e=>[e,"members"],mentionMembers:e=>[e,"mention-members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],myCapabilities:e=>[e,"my-capabilities"],taskBoardItems:e=>[e,"task-board-items"],taskBoardItemPrs:(e,t)=>[e,"task-board-item-prs",t],previewProbe:(e,t)=>[e,"preview-probe",t],taskBoardActivity:(e,t)=>[e,"task-board-activity",t],taskBoardAdminOrgs:e=>[e,"task-board-admin-orgs"],taskBoardAnalytics:(e,t,o,a,n)=>[e,"task-board-analytics",t,o,a,n],notifications:e=>[e,"notifications"],notificationSubscribers:(e,t)=>[e,"notification-subscribers",t],taskBoardComments:(e,t)=>[e,"task-board-comments",t],homeGithubRecentPrs:(e,t)=>["home-github-recent-prs",e,t],homeGithubContributions:(e,t)=>["home-github-contributions",e,t],report:(e,t,o)=>["report",e,t??"",o??""],reportAll:e=>["report",e],reportsConnection:(e,t)=>["reports","connection",e,t],reportsDiagnostic:(e,t)=>["reports","diagnostic",e,t],reportsVirtualMcp:(e,t)=>["reports","virtual-mcp",e,t],reportsCompanionSchema:(e,t)=>["reports","companion-schema",e,t],reportsCompanionConnections:(e,t)=>["reports","companion-connections",e,t],reportsCompanionConnectionsPrefix:e=>["reports","companion-connections",e],reportsCompanionRegistry:(e,t)=>["reports","companion-registry",e,t],reportsCompanionOAuthStatus:(e,t)=>["reports","companion-oauth-status",e,t],reportsCompanionGaProperties:(e,t)=>["reports","companion-ga-properties",e,t],reportsCompanionGscSites:(e,t)=>["reports","companion-gsc-sites",e,t],reportsCompanionGithubRepos:(e,t,o)=>["reports","companion-github-repos",e,t,o],reportsCompanionGithubSelected:(e,t)=>["reports","companion-github-selected",e,t],reportsConnectionStatus:(e,t)=>["reports","connection-status",e,t],connectionActivity:(e,t,o)=>["monitoring","activity",e,t,o],connectionActivityErrors:(e,t,o)=>["monitoring","activity","errors",e,t,o],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpClient:(e,t,o,a)=>["mcp","client",e,t,o,a],mcpToolsList:e=>["mcp","client",e,"tools"],mcpResourcesList:e=>["mcp","client",e,"resources"],mcpPromptsList:e=>["mcp","client",e,"prompts"],mcpReadResource:(e,t)=>["mcp","client",e,"resource",t],mcpUiResourceHtml:(e,t,o)=>["mcp","ui-resource-html",e,t,o],mcpToolCall:(e,t,o)=>["mcp","client",e,"tool-call",t,o],mcpClientPrefix:()=>["mcp","client"],virtualMcpLastUsed:(e,t)=>["virtual-mcp","last-used",e,t],optimisticProjectSidebarViews:(e,t)=>["virtual-mcp","optimistic-sidebar-views",e,t],githubBranches:(e,t,o,a,n)=>["github-branches",e,t,o,a,n],githubPrState:(e,t,o,a,n)=>["github-pr-state",e,t,o,a,n],githubLastPublishedPr:(e,t,o,a,n)=>["github-last-published-pr",e,t,o,a,n],githubOpenPrs:(e,t,o,a)=>["github-open-prs",e,t,o,a],githubCheckRun:(e,t,o,a,n)=>["github-check-run",e,t,o,a,n],githubBranchSearch:(e,t,o,a,n,i)=>["github-branch-search",e,t,o,a,n,i],organizationSettings:e=>["organization-settings",e],infraBillingSites:e=>["infra-billing-sites",e],orgHasSite:e=>["org-has-site",e],infraBilling:(e,t,o)=>["infra-billing",e,t,o],userModelPreferences:e=>["user-model-preferences",e],apiKeysList:e=>["api-keys",e],activeOrganization:e=>["activeOrganization",e],orgAccessStatus:e=>["org-access-status",e],homeNextActions:e=>["home-next-actions",e],projectSearch:(e,t)=>["project-search",e,t],boardLayout:e=>["board-layout",e],agentPrompts:(e,t)=>["agent-prompts",e,t],toolCall:(e,t,o)=>["tool-call",e,t,o],collection:(e,t,o)=>[e,t,"collection",o],collectionItem:(e,t,o,a,n)=>[e,t,o,"collection",a,n],collectionList:(e,t,o,a,n)=>[e,t,o,"collection",a,"list",n],collectionListInfinite:(e,t,o,a,n)=>[e,t,o,"collection",a,"list-infinite",n],monitoringStatsToolCalls:(e,t)=>["MONITORING_STATS",e,"tool-calls",t],monitoringStatsLlm:(e,t)=>["MONITORING_STATS",e,"llm",t],monitoringHeatmap:(e,t)=>["MONITORING_HEATMAP",e,t],monitoringThreadUsage:(e,t)=>["MONITORING_THREAD_USAGE",e,t],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringLogDetail:e=>["monitoring","log-detail",e],ensureTask:(e,t)=>["ensure-task",e,t],viewedThreadMetadataRefresh:(e,t)=>["viewed-thread-metadata-refresh",e,t],globalSearch:(e,t,o,a)=>["global-search",e,t,o,a?[...a].sort():null],threadsInfinite:(e,t)=>["threads","list-infinite",e,t],overviewThreads:e=>["threads","overview",e],threadMessages:(e,t)=>["threads","messages",e,t],threadOutputs:e=>["thread-outputs",e],fileText:e=>["file-text",e],csvThumb:e=>["csv-thumb",e],toolDefinitionLookup:(e,t,o)=>["virtual-mcp",t,e??"default","tools","lookup",o],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,o)=>[...e,t,o],user:e=>["user",e],tags:e=>[e,"tags"],experiments:(e,t)=>[e,"experiments",t],experimentResults:(e,t,o)=>[e,"experiments",t,o,"results"],memberTags:(e,t)=>[e,"member-tags",t],taskBoardPrompts:e=>["task-board-prompts",e],automationsAll:e=>["automations",e],automations:(e,t)=>["automations",e,t??null],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,o)=>["automation-runs",e,t,...[...o??[]].sort()],automationRunStats:(e,t,o)=>["automation-run-stats",e,t,o],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],claudeSubscription:e=>["claude-subscription",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,o)=>["org-fs",e,t,"list",o],orgFsUsage:(e,t)=>["org-fs",e,t,"usage"],orgFsStat:(e,t,o)=>["org-fs",e,t,"stat",o],orgFsPublicSets:e=>["org-fs-public-sets",e],userAvatars:()=>["user-avatars"],orgRepoSyncs:e=>["org-repo-syncs",e],gitProviderCapabilities:e=>["git-provider-capabilities",e],githubConnectFlow:(e,t)=>["github-connect-flow",e,t],githubConnectRepositories:(e,t,o,a)=>["github-connect-repositories",e,t,o,a],gitAccounts:e=>["git-accounts",e],repositories:(e,t)=>t?["repositories",e,t]:["repositories",e],providerRepoSearch:(e,t,o)=>["provider-repo-search-pages",e,t,o],jiraIntegration:e=>["jira-integration",e],jiraBoards:e=>["jira-boards",e],jiraBoardColumns:(e,t)=>["jira-board-columns",e,t],jiraAutomations:e=>["jira-automations",e],orgFsRecent:e=>["org-fs-recent",e],orgFsSearchRoot:e=>["org-fs-search",e],orgFsSearch:(e,t,o,a)=>["org-fs-search",e,t,o,a],orgFsSkills:e=>["org-fs-skills",e],slashSkills:e=>["slash-skills",e],filePickerObjects:(e,t,o,a)=>["file-picker-objects",e,t,o??"",a??!1],filePickerObjectsByConfig:(e,t)=>["file-picker-objects",e,t],aiPlanEntitlements:e=>["ai-plan-entitlements",e],aiPlanCatalog:e=>["ai-plan-catalog",e],checkoutReturnPoll:e=>["checkout-return-poll",e],aiPlanPrices:()=>["ai-plan-prices"],orgBillingAccount:e=>["org-billing-account",e],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t],orgSsoConfig:e=>["org-sso-config",e],orgSsoStatus:e=>["org-sso-status",e],orgNotice:e=>["org-notice",e],storeDiscovery:(e,t)=>["store-discovery",e,t],organizationDomains:e=>["organization-domains",e],organizationJoinRequests:e=>["organization-join-requests",e],domainLookup:e=>["domain-lookup",e],deploymentAdminMe:()=>["deployment-admin","me"],deploymentAdminUsers:e=>["deployment-admin","users",e],deploymentAdminOrgs:e=>["deployment-admin","orgs",e],deploymentAdminOrgsList:()=>["deployment-admin","orgs"],deploymentAdminPrompts:()=>["deployment-admin","prompts"],deploymentAdminOrgFlags:e=>["deployment-admin","orgs",e,"flags"],deploymentAdminOrgNotice:e=>["deployment-admin","orgs",e,"notice"],deploymentAdminOrgSites:e=>["deployment-admin","orgs",e,"sites"],defaultBrand:e=>["brand-context",e,"default"],decoSites:e=>["deco-sites",e],decoApps:()=>["deco-apps"],hostingAccess:(e,t)=>["hosting",e,t,"access"],hostingDeployments:(e,t)=>["hosting",e,t,"deployments"],hostingDeploymentHistory:(e,t)=>["hosting",e,t,"deployment-history"],hostingBuildLogs:(e,t,o,a)=>["hosting",e,t,"build-logs",o,a],hostingEnv:(e,t)=>["hosting",e,t,"env"],hostingRedirects:(e,t)=>["hosting",e,t,"redirects"],hostingDomains:(e,t)=>["hosting",e,t,"domains"],hostingSecrets:(e,t)=>["hosting",e,t,"secrets"],e2eRuns:(e,t)=>["hosting",e,t,"e2e-runs"],e2eChecks:(e,t)=>["hosting",e,t,"e2e-checks"],e2eTypes:(e,t)=>["hosting",e,t,"e2e-types"],e2eRun:(e,t,o)=>["hosting",e,t,"e2e-run",o],analyticsStatus:(e,t)=>["hosting",e,t,"analytics-status"],analyticsData:(e,t,o,a)=>["hosting",e,t,"analytics-data",o,a],cdnData:(e,t,o)=>["monitor",e,"cdn-data",t,o],editorResolve:e=>["editor-resolve",e],webSearchBlob:e=>["web-search-blob",e],decofile:e=>["decofile",e],decofileDraft:e=>["decofile-draft",e],decofileStatus:e=>["decofile-status",e],liveMeta:(...e)=>["live-meta",...e],denoJson:(e,t,o)=>["deno-json",e,t,o],sandboxInvoke:(e,t)=>["sandbox-invoke",e,t],sandboxRepoDir:(e,t,o,a)=>["sandbox-repo-dir",e,t,o,a],sandboxSprite:e=>["sandbox-sprite",e],localAgentCapabilities:()=>["local-agent-capabilities"],githubUserOrgs:(e,t)=>["github-user-orgs",e,t],githubOrgRepos:(e,t,o,a)=>["github-org-repos",e,t,o,a],desktopAuthStatus:()=>["desktop","auth-status"]};function Afe(e,t){e.invalidateQueries({predicate:o=>{const a=o.queryKey;return(!t||a[1]===t)&&a[3]==="collection"&&a[4]==="VIRTUAL_MCP"}})}const xL={itemCreatedSuccessfully:"Item created successfully",itemUpdatedSuccessfully:"Item updated successfully",itemDeletedSuccessfully:"Item deleted successfully",createItemFailed:"Failed to create item: {error}",updateItemFailed:"Failed to update item: {error}",deleteItemFailed:"Failed to delete item: {error}"};function qK(e){Object.assign(xL,e)}function rd(e,t){const o=xL[e];return typeof o=="function"?o(t??{}):typeof o=="string"&&t?o.replace(/\{(\w+)\}/g,(a,n)=>String(t[n]??"")):o??e}function VK(e,t,o){const a=[];if(e?.trim()){const n=e.trim(),i=o.map(l=>({field:[String(l)],operator:"contains",value:n}));i.length===1&&i[0]?a.push(i[0]):i.length>1&&a.push({operator:"or",conditions:i})}if(t&&t.length>0)for(const n of t)a.push({field:[n.column],operator:"eq",value:n.value});if(a.length!==0)return a.length===1?a[0]:{operator:"and",conditions:a}}function HK(e,t,o){const a=e??o,n=t??"desc";return[{field:[String(a)],direction:n}]}function id(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function GK(e,t,o,a){const n=t.toUpperCase(),i=`COLLECTION_${n}_GET`;return{queryKey:On.collectionItem(a,e,"",n,o??""),queryFn:async()=>{if(!o||!a)return{item:null};const l=await a.callTool({name:i,arguments:{id:o}});return id(l)},staleTime:6e4}}function Dfe(e,t,o,a){const n=Ie.c(5);let i;n[0]!==a||n[1]!==t||n[2]!==o||n[3]!==e?(i=GK(e,t,o,a),n[0]=a,n[1]=t,n[2]=o,n[3]=e,n[4]=i):i=n[4];const{data:l}=Nl(i);return l?.item??null}const KK={structuredContent:{items:[]},isError:!1};function EL(e,t,o,a={}){const{searchTerm:n,filters:i,sortKey:l,sortDirection:c,searchFields:u=["title","description"],defaultSortKey:p="updated_at",pageSize:g=100,additionalToolArgs:m}=a,f=t.toUpperCase(),v=`COLLECTION_${f}_LIST`,b=VK(n,i,u),S=HK(l,c,p),C={...b&&{where:b},...S&&{orderBy:S},limit:g,offset:0,...m},w=JSON.stringify(C);return{queryKey:On.collectionList(o,e,"",f,w),queryFn:async()=>o?await o.callTool({name:v,arguments:C}):KK,staleTime:3e4,retry:!1,select:E=>id(E??{})?.items??[]}}function Ofe(e,t,o,a={}){return{...EL(e,t,o,a),select:i=>{const l=id(i??{});return{items:l?.items??[],totalCount:l?.totalCount,hasMore:l?.hasMore}}}}function Ife(e,t,o,a){const n=Ie.c(7);let i;n[0]!==a?(i=a===void 0?{}:a,n[0]=a,n[1]=i):i=n[1];const l=i;let c;n[2]!==o||n[3]!==t||n[4]!==l||n[5]!==e?(c=EL(e,t,o,l),n[2]=o,n[3]=t,n[4]=l,n[5]=e,n[6]=c):c=n[6];const{data:u}=Nl(c);return u}function Mfe(e,t,o){const a=Ie.c(34),n=hv();let i;a[0]!==t?(i=t.toUpperCase(),a[0]=t,a[1]=i):i=a[1];const l=i,c=`COLLECTION_${l}_CREATE`,u=`COLLECTION_${l}_UPDATE`,p=`COLLECTION_${l}_DELETE`;let g;a[2]!==n||a[3]!==e||a[4]!==l?(g=()=>{n.invalidateQueries({predicate:N=>{const $=N.queryKey;return $[1]===e&&$[3]==="collection"&&$[4]===l}})},a[2]=n,a[3]=e,a[4]=l,a[5]=g):g=a[5];const m=g;let f;a[6]!==o||a[7]!==c?(f=async N=>{const $=await o.callTool({name:c,arguments:{data:N}});if($.isError)throw new Error(Array.isArray($.content)?$.content[0]?.text:String($.content));return id($).item},a[6]=o,a[7]=c,a[8]=f):f=a[8];let v;a[9]!==m?(v=()=>{m(),Vr.success(rd("itemCreatedSuccessfully"))},a[9]=m,a[10]=v):v=a[10];let b;a[11]!==f||a[12]!==v?(b={mutationFn:f,onSuccess:v,onError:ZK},a[11]=f,a[12]=v,a[13]=b):b=a[13];const S=lp(b);let C;a[14]!==o||a[15]!==u?(C=async N=>{const{id:$,data:F}=N,z=await o.callTool({name:u,arguments:{id:$,data:F}});return id(z).item},a[14]=o,a[15]=u,a[16]=C):C=a[16];let w;a[17]!==m?(w=()=>{m(),Vr.success(rd("itemUpdatedSuccessfully"))},a[17]=m,a[18]=w):w=a[18];let _;a[19]!==C||a[20]!==w?(_={mutationFn:C,onSuccess:w,onError:YK},a[19]=C,a[20]=w,a[21]=_):_=a[21];const E=lp(_);let k;a[22]!==o||a[23]!==p?(k=async N=>{const $=await o.callTool({name:p,arguments:{id:N}});return id($).item.id},a[22]=o,a[23]=p,a[24]=k):k=a[24];let x;a[25]!==m?(x=()=>{m(),Vr.success(rd("itemDeletedSuccessfully"))},a[25]=m,a[26]=x):x=a[26];let A;a[27]!==k||a[28]!==x?(A={mutationFn:k,onSuccess:x,onError:WK},a[27]=k,a[28]=x,a[29]=A):A=a[29];const D=lp(A);let O;return a[30]!==S||a[31]!==D||a[32]!==E?(O={create:S,update:E,delete:D},a[30]=S,a[31]=D,a[32]=E,a[33]=O):O=a[33],O}function WK(e){const t=e instanceof Error?e.message:String(e);Vr.error(rd("deleteItemFailed",{error:t}))}function YK(e){const t=e instanceof Error?e.message:String(e);Vr.error(rd("updateItemFailed",{error:t}))}function ZK(e){const t=e instanceof Error?e.message:String(e);Vr.error(rd("createItemFailed",{error:t}))}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var Mg={exports:{}},FS={},vi={},il={},BS={},jS={},US={},NR;function Cf(){return NR||(NR=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 o extends t{constructor(_){if(super(),!e.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=o;class a extends t{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((E,k)=>`${E}${k}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((E,k)=>(k instanceof o&&(E[k.str]=(E[k.str]||0)+1),E),{})}}e._Code=a,e.nil=new a("");function n(w,..._){const E=[w[0]];let k=0;for(;k<_.length;)c(E,_[k]),E.push(w[++k]);return new a(E)}e._=n;const i=new a("+");function l(w,..._){const E=[v(w[0])];let k=0;for(;k<_.length;)E.push(i),c(E,_[k]),E.push(i,v(w[++k]));return u(E),new a(E)}e.str=l;function c(w,_){_ instanceof a?w.push(..._._items):_ instanceof o?w.push(_):w.push(m(_))}e.addCodeArg=c;function u(w){let _=1;for(;_<w.length-1;){if(w[_]===i){const E=p(w[_-1],w[_+1]);if(E!==void 0){w.splice(_-1,3,E);continue}w[_++]="+"}_++}}function p(w,_){if(_==='""')return w;if(w==='""')return _;if(typeof w=="string")return _ instanceof o||w[w.length-1]!=='"'?void 0:typeof _!="string"?`${w.slice(0,-1)}${_}"`:_[0]==='"'?w.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(w instanceof o))return`"${w}${_.slice(1)}`}function g(w,_){return _.emptyStr()?w:w.emptyStr()?_:l`${w}${_}`}e.strConcat=g;function m(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:v(Array.isArray(w)?w.join(","):w)}function f(w){return new a(v(w))}e.stringify=f;function v(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function b(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new a(`.${w}`):n`[${w}]`}e.getProperty=b;function S(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new a(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=S;function C(w){return new a(w.toString())}e.regexpCode=C})(US)),US}var zS={},FR;function BR(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Cf();class o extends Error{constructor(p){super(`CodeGen: "code" for ${p} not defined`),this.value=p.value}}var a;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(a||(e.UsedValueState=a={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:p,parent:g}={}){this._names={},this._prefixes=p,this._parent=g}toName(p){return p instanceof t.Name?p:this.name(p)}name(p){return new t.Name(this._newName(p))}_newName(p){const g=this._names[p]||this._nameGroup(p);return`${p}${g.index++}`}_nameGroup(p){var g,m;if(!((m=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||m===void 0)&&m.has(p)||this._prefixes&&!this._prefixes.has(p))throw new Error(`CodeGen: prefix "${p}" is not allowed in this scope`);return this._names[p]={prefix:p,index:0}}}e.Scope=n;class i extends t.Name{constructor(p,g){super(g),this.prefix=p}setValue(p,{property:g,itemIndex:m}){this.value=p,this.scopePath=(0,t._)`.${new t.Name(g)}[${m}]`}}e.ValueScopeName=i;const l=(0,t._)`\n`;class c extends n{constructor(p){super(p),this._values={},this._scope=p.scope,this.opts={...p,_n:p.lines?l:t.nil}}get(){return this._scope}name(p){return new i(p,this._newName(p))}value(p,g){var m;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(p),{prefix:v}=f,b=(m=g.key)!==null&&m!==void 0?m:g.ref;let S=this._values[v];if(S){const _=S.get(b);if(_)return _}else S=this._values[v]=new Map;S.set(b,f);const C=this._scope[v]||(this._scope[v]=[]),w=C.length;return C[w]=g.ref,f.setValue(g,{property:v,itemIndex:w}),f}getValue(p,g){const m=this._values[p];if(m)return m.get(g)}scopeRefs(p,g=this._values){return this._reduceValues(g,m=>{if(m.scopePath===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${p}${m.scopePath}`})}scopeCode(p=this._values,g,m){return this._reduceValues(p,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},g,m)}_reduceValues(p,g,m={},f){let v=t.nil;for(const b in p){const S=p[b];if(!S)continue;const C=m[b]=m[b]||new Map;S.forEach(w=>{if(C.has(w))return;C.set(w,a.Started);let _=g(w);if(_){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${E} ${w} = ${_};${this.opts._n}`}else if(_=f?.(w))v=(0,t._)`${v}${_}${this.opts._n}`;else throw new o(w);C.set(w,a.Completed)})}return v}}e.ValueScope=c})(zS)),zS}var jR;function bt(){return jR||(jR=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=Cf(),o=BR();var a=Cf();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return a.Name}});var n=BR();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(L,U){return this}}class l extends i{constructor(L,U,J){super(),this.varKind=L,this.name=U,this.rhs=J}render({es5:L,_n:U}){const J=L?o.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${pe};`+U}optimizeNames(L,U){if(L[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,L,U)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends i{constructor(L,U,J){super(),this.lhs=L,this.rhs=U,this.sideEffects=J}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,U){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,L,U),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return j(L,this.rhs)}}class u extends c{constructor(L,U,J,pe){super(L,J,pe),this.op=U}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class p extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class g extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class m extends i{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class f extends i{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,U){return this.code=K(this.code,L,U),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends i{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce((U,J)=>U+J.render(L),"")}optimizeNodes(){const{nodes:L}=this;let U=L.length;for(;U--;){const J=L[U].optimizeNodes();Array.isArray(J)?L.splice(U,1,...J):J?L[U]=J:L.splice(U,1)}return L.length>0?this:void 0}optimizeNames(L,U){const{nodes:J}=this;let pe=J.length;for(;pe--;){const ge=J[pe];ge.optimizeNames(L,U)||(ne(L,ge.names),J.splice(pe,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((L,U)=>z(L,U.names),{})}}class b extends v{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class S extends v{}class C extends b{}C.kind="else";class w extends b{constructor(L,U){super(U),this.condition=L}render(L){let U=`if(${this.condition})`+super.render(L);return this.else&&(U+="else "+this.else.render(L)),U}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let U=this.else;if(U){const J=U.optimizeNodes();U=this.else=Array.isArray(J)?new C(J):J}if(U)return L===!1?U instanceof w?U:U.nodes:this.nodes.length?this:new w(H(L),U instanceof w?[U]:U.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,U){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(L,U),!!(super.optimizeNames(L,U)||this.else))return this.condition=K(this.condition,L,U),this}get names(){const L=super.names;return j(L,this.condition),this.else&&z(L,this.else.names),L}}w.kind="if";class _ extends b{}_.kind="for";class E extends _{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,U){if(super.optimizeNames(L,U))return this.iteration=K(this.iteration,L,U),this}get names(){return z(super.names,this.iteration.names)}}class k extends _{constructor(L,U,J,pe){super(),this.varKind=L,this.name=U,this.from=J,this.to=pe}render(L){const U=L.es5?o.varKinds.var:this.varKind,{name:J,from:pe,to:ge}=this;return`for(${U} ${J}=${pe}; ${J}<${ge}; ${J}++)`+super.render(L)}get names(){const L=j(super.names,this.from);return j(L,this.to)}}class x extends _{constructor(L,U,J,pe){super(),this.loop=L,this.varKind=U,this.name=J,this.iterable=pe}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,U){if(super.optimizeNames(L,U))return this.iterable=K(this.iterable,L,U),this}get names(){return z(super.names,this.iterable.names)}}class A extends b{constructor(L,U,J){super(),this.name=L,this.args=U,this.async=J}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}A.kind="func";class D extends v{render(L){return"return "+super.render(L)}}D.kind="return";class O extends b{render(L){let U="try"+super.render(L);return this.catch&&(U+=this.catch.render(L)),this.finally&&(U+=this.finally.render(L)),U}optimizeNodes(){var L,U;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}optimizeNames(L,U){var J,pe;return super.optimizeNames(L,U),(J=this.catch)===null||J===void 0||J.optimizeNames(L,U),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(L,U),this}get names(){const L=super.names;return this.catch&&z(L,this.catch.names),this.finally&&z(L,this.finally.names),L}}class N extends b{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}N.kind="catch";class $ extends b{render(L){return"finally"+super.render(L)}}$.kind="finally";class F{constructor(L,U={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...U,_n:U.lines?`
48
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const l of e.seen.entries()){const c=l[1];if(t===l[0]){i(l);continue}if(e.external){const p=e.external.registry.get(l[0])?.id;if(t!==l[0]&&p){i(l);continue}}if(e.metadataRegistry.get(l[0])?.id){i(l);continue}if(c.cycle){i(l);continue}if(c.count>1&&e.reused==="ref"){i(l);continue}}}function Tf(e,t){const o=e.seen.get(t);if(!o)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=l=>{const c=e.seen.get(l);if(c.ref===null)return;const u=c.def??c.schema,p={...u},g=c.ref;if(c.ref=null,g){a(g);const f=e.seen.get(g),v=f.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,p),l._zod.parent===g)for(const S in u)S==="$ref"||S==="allOf"||S in p||delete u[S];if(v.$ref&&f.def)for(const S in u)S==="$ref"||S==="allOf"||S in f.def&&JSON.stringify(u[S])===JSON.stringify(f.def[S])&&delete u[S]}const m=l._zod.parent;if(m&&m!==g){a(m);const f=e.seen.get(m);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(const v in u)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(u[v])===JSON.stringify(f.def[v])&&delete u[v]}e.override({zodSchema:l,jsonSchema:u,path:c.path??[]})};for(const l of[...e.seen.entries()].reverse())a(l[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(l)}Object.assign(n,o.def??o.schema);const i=e.external?.defs??{};for(const l of e.seen.entries()){const c=l[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?n.$defs=i:n.definitions=i);try{const l=JSON.parse(JSON.stringify(n));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:wf(t,"input",e.processors),output:wf(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function Va(e,t){const o=t??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const a=e._zod.def;if(a.type==="transform")return!0;if(a.type==="array")return Va(a.element,o);if(a.type==="set")return Va(a.valueType,o);if(a.type==="lazy")return Va(a.getter(),o);if(a.type==="promise"||a.type==="optional"||a.type==="nonoptional"||a.type==="nullable"||a.type==="readonly"||a.type==="default"||a.type==="prefault")return Va(a.innerType,o);if(a.type==="intersection")return Va(a.left,o)||Va(a.right,o);if(a.type==="record"||a.type==="map")return Va(a.keyType,o)||Va(a.valueType,o);if(a.type==="pipe")return Va(a.in,o)||Va(a.out,o);if(a.type==="object"){for(const n in a.shape)if(Va(a.shape[n],o))return!0;return!1}if(a.type==="union"){for(const n of a.options)if(Va(n,o))return!0;return!1}if(a.type==="tuple"){for(const n of a.items)if(Va(n,o))return!0;return!!(a.rest&&Va(a.rest,o))}return!1}const F7=(e,t={})=>o=>{const a=yf({...o,processors:t});return co(e,a),Sf(a,e),Tf(a,e)},wf=(e,t,o={})=>a=>{const{libraryOptions:n,target:i}=a??{},l=yf({...n??{},target:i,io:t,processors:o});return co(e,l),Sf(l,e),Tf(l,e)},B7={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},mM=(e,t,o,a)=>{const n=o;n.type="string";const{minimum:i,maximum:l,format:c,patterns:u,contentEncoding:p}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof l=="number"&&(n.maxLength=l),c&&(n.format=B7[c]??c,n.format===""&&delete n.format,c==="time"&&delete n.format),p&&(n.contentEncoding=p),u&&u.size>0){const g=[...u];g.length===1?n.pattern=g[0].source:g.length>1&&(n.allOf=[...g.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},gM=(e,t,o,a)=>{const n=o,{minimum:i,maximum:l,format:c,multipleOf:u,exclusiveMaximum:p,exclusiveMinimum:g}=e._zod.bag;typeof c=="string"&&c.includes("int")?n.type="integer":n.type="number",typeof g=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.minimum=g,n.exclusiveMinimum=!0):n.exclusiveMinimum=g),typeof i=="number"&&(n.minimum=i,typeof g=="number"&&t.target!=="draft-04"&&(g>=i?delete n.minimum:delete n.exclusiveMinimum)),typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(n.maximum=p,n.exclusiveMaximum=!0):n.exclusiveMaximum=p),typeof l=="number"&&(n.maximum=l,typeof p=="number"&&t.target!=="draft-04"&&(p<=l?delete n.maximum:delete n.exclusiveMaximum)),typeof u=="number"&&(n.multipleOf=u)},hM=(e,t,o,a)=>{o.type="boolean"},j7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},U7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},fM=(e,t,o,a)=>{t.target==="openapi-3.0"?(o.type="string",o.nullable=!0,o.enum=[null]):o.type="null"},vM=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},z7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},bM=(e,t,o,a)=>{o.not={}},yM=(e,t,o,a)=>{},SM=(e,t,o,a)=>{},$7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},TM=(e,t,o,a)=>{const n=e._zod.def,i=GI(n.entries);i.every(l=>typeof l=="number")&&(o.type="number"),i.every(l=>typeof l=="string")&&(o.type="string"),o.enum=i},wM=(e,t,o,a)=>{const n=e._zod.def,i=[];for(const l of n.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];o.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?o.enum=[l]:o.const=l}else i.every(l=>typeof l=="number")&&(o.type="number"),i.every(l=>typeof l=="string")&&(o.type="string"),i.every(l=>typeof l=="boolean")&&(o.type="boolean"),i.every(l=>l===null)&&(o.type="null"),o.enum=i},q7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},V7=(e,t,o,a)=>{const n=o,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},_M=(e,t,o,a)=>{const n=o,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:l,maximum:c,mime:u}=e._zod.bag;l!==void 0&&(i.minLength=l),c!==void 0&&(i.maxLength=c),u?u.length===1?(i.contentMediaType=u[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=u.map(p=>({contentMediaType:p}))):Object.assign(n,i)},H7=(e,t,o,a)=>{o.type="boolean"},CM=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},G7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},PM=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},K7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},W7=(e,t,o,a)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},kM=(e,t,o,a)=>{const n=o,i=e._zod.def,{minimum:l,maximum:c}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof c=="number"&&(n.maxItems=c),n.type="array",n.items=co(i.element,t,{...a,path:[...a.path,"items"]})},xM=(e,t,o,a)=>{const n=o,i=e._zod.def;n.type="object",n.properties={};const l=i.shape;for(const p in l)n.properties[p]=co(l[p],t,{...a,path:[...a.path,"properties",p]});const c=new Set(Object.keys(l)),u=new Set([...c].filter(p=>{const g=i.shape[p]._zod;return t.io==="input"?g.optin===void 0:g.optout===void 0}));u.size>0&&(n.required=Array.from(u)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=co(i.catchall,t,{...a,path:[...a.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},EM=(e,t,o,a)=>{const n=e._zod.def,i=n.inclusive===!1,l=n.options.map((c,u)=>co(c,t,{...a,path:[...a.path,i?"oneOf":"anyOf",u]}));i?o.oneOf=l:o.anyOf=l},RM=(e,t,o,a)=>{const n=e._zod.def,i=co(n.left,t,{...a,path:[...a.path,"allOf",0]}),l=co(n.right,t,{...a,path:[...a.path,"allOf",1]}),c=p=>"allOf"in p&&Object.keys(p).length===1,u=[...c(i)?i.allOf:[i],...c(l)?l.allOf:[l]];o.allOf=u},AM=(e,t,o,a)=>{const n=o,i=e._zod.def;n.type="array";const l=t.target==="draft-2020-12"?"prefixItems":"items",c=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",u=i.items.map((f,v)=>co(f,t,{...a,path:[...a.path,l,v]})),p=i.rest?co(i.rest,t,{...a,path:[...a.path,c,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=u,p&&(n.items=p)):t.target==="openapi-3.0"?(n.items={anyOf:u},p&&n.items.anyOf.push(p),n.minItems=u.length,p||(n.maxItems=u.length)):(n.items=u,p&&(n.additionalItems=p));const{minimum:g,maximum:m}=e._zod.bag;typeof g=="number"&&(n.minItems=g),typeof m=="number"&&(n.maxItems=m)},DM=(e,t,o,a)=>{const n=o,i=e._zod.def;n.type="object";const l=i.keyType,u=l._zod.bag?.patterns;if(i.mode==="loose"&&u&&u.size>0){const g=co(i.valueType,t,{...a,path:[...a.path,"patternProperties","*"]});n.patternProperties={};for(const m of u)n.patternProperties[m.source]=g}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=co(i.keyType,t,{...a,path:[...a.path,"propertyNames"]})),n.additionalProperties=co(i.valueType,t,{...a,path:[...a.path,"additionalProperties"]});const p=l._zod.values;if(p){const g=[...p].filter(m=>typeof m=="string"||typeof m=="number");g.length>0&&(n.required=g)}},OM=(e,t,o,a)=>{const n=e._zod.def,i=co(n.innerType,t,a),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=n.innerType,o.nullable=!0):o.anyOf=[i,{type:"null"}]},IM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType},MM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType,o.default=JSON.parse(JSON.stringify(n.defaultValue))},LM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(o._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},NM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType;let l;try{l=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}o.default=l},FM=(e,t,o,a)=>{const n=e._zod.def,i=t.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;co(i,t,a);const l=t.seen.get(e);l.ref=i},BM=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType,o.readOnly=!0},Y7=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType},F_=(e,t,o,a)=>{const n=e._zod.def;co(n.innerType,t,a);const i=t.seen.get(e);i.ref=n.innerType},jM=(e,t,o,a)=>{const n=e._zod.innerType;co(n,t,a);const i=t.seen.get(e);i.ref=n},RR={string:mM,number:gM,boolean:hM,bigint:j7,symbol:U7,null:fM,undefined:vM,void:z7,never:bM,any:yM,unknown:SM,date:$7,enum:TM,literal:wM,nan:q7,template_literal:V7,file:_M,success:H7,custom:CM,function:G7,transform:PM,map:K7,set:W7,array:kM,object:xM,union:EM,intersection:RM,tuple:AM,record:DM,nullable:OM,nonoptional:IM,default:MM,prefault:LM,catch:NM,pipe:FM,readonly:BM,promise:Y7,optional:F_,lazy:jM};function tfe(e,t){if("_idmap"in e){const a=e,n=yf({...t,processors:RR}),i={};for(const u of a._idmap.entries()){const[p,g]=u;co(g,n)}const l={},c={registry:a,uri:t?.uri,defs:i};n.external=c;for(const u of a._idmap.entries()){const[p,g]=u;Sf(n,g),l[p]=Tf(n,g)}if(Object.keys(i).length>0){const u=n.target==="draft-2020-12"?"$defs":"definitions";l.__shared={[u]:i}}return{schemas:l}}const o=yf({...t,processors:RR});return co(e,o),Sf(o,e),Tf(o,e)}const Z7=be("ZodISODateTime",(e,t)=>{Hq.init(e,t),xo.init(e,t)});function UM(e){return a7(Z7,e)}const Q7=be("ZodISODate",(e,t)=>{Gq.init(e,t),xo.init(e,t)});function J7(e){return n7(Q7,e)}const X7=be("ZodISOTime",(e,t)=>{Kq.init(e,t),xo.init(e,t)});function e9(e){return r7(X7,e)}const t9=be("ZodISODuration",(e,t)=>{Wq.init(e,t),xo.init(e,t)});function o9(e){return i7(t9,e)}const a9=(e,t)=>{L_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:o=>D8(e,o)},flatten:{value:o=>A8(e,o)},addIssue:{value:o=>{e.issues.push(o),e.message=JSON.stringify(e.issues,ET,2)}},addIssues:{value:o=>{e.issues.push(...o),e.message=JSON.stringify(e.issues,ET,2)}},isEmpty:{get(){return e.issues.length===0}}})},er=be("ZodError",a9,{Parent:Error}),n9=bv(er),r9=yv(er),i9=Sv(er),s9=Tv(er),l9=N8(er),c9=F8(er),d9=B8(er),u9=j8(er),p9=U8(er),m9=z8(er),g9=$8(er),h9=q8(er),Yt=be("ZodType",(e,t)=>(Ht.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:wf(e,"input"),output:wf(e,"output")}}),e.toJSONSchema=F7(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...o)=>e.clone(Bs(t,{checks:[...t.checks??[],...o.map(a=>typeof a=="function"?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0}),e.with=e.check,e.clone=(o,a)=>Di(e,o,a),e.brand=()=>e,e.register=((o,a)=>(o.add(e,a),e)),e.parse=(o,a)=>n9(e,o,a,{callee:e.parse}),e.safeParse=(o,a)=>i9(e,o,a),e.parseAsync=async(o,a)=>r9(e,o,a,{callee:e.parseAsync}),e.safeParseAsync=async(o,a)=>s9(e,o,a),e.spa=e.safeParseAsync,e.encode=(o,a)=>l9(e,o,a),e.decode=(o,a)=>c9(e,o,a),e.encodeAsync=async(o,a)=>d9(e,o,a),e.decodeAsync=async(o,a)=>u9(e,o,a),e.safeEncode=(o,a)=>p9(e,o,a),e.safeDecode=(o,a)=>m9(e,o,a),e.safeEncodeAsync=async(o,a)=>g9(e,o,a),e.safeDecodeAsync=async(o,a)=>h9(e,o,a),e.refine=(o,a)=>e.check(cH(o,a)),e.superRefine=o=>e.check(dH(o)),e.overwrite=o=>e.check(Od(o)),e.optional=()=>Po(e),e.exactOptional=()=>Y9(e),e.nullable=()=>OR(e),e.nullish=()=>Po(OR(e)),e.nonoptional=o=>tH(e,o),e.array=()=>Fe(e),e.or=o=>ro([e,o]),e.and=o=>U_(e,o),e.transform=o=>DT(e,YM(o)),e.default=o=>J9(e,o),e.prefault=o=>eH(e,o),e.catch=o=>aH(e,o),e.pipe=o=>DT(e,o),e.readonly=()=>iH(e),e.describe=o=>{const a=e.clone();return Zu.add(a,{description:o}),a},Object.defineProperty(e,"description",{get(){return Zu.get(e)?.description},configurable:!0}),e.meta=(...o)=>{if(o.length===0)return Zu.get(e);const a=e.clone();return Zu.add(a,o[0]),a},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=o=>o(e),e)),zM=be("_ZodString",(e,t)=>{N_.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(a,n,i)=>mM(e,a,n);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...a)=>e.check(y7(...a)),e.includes=(...a)=>e.check(w7(...a)),e.startsWith=(...a)=>e.check(_7(...a)),e.endsWith=(...a)=>e.check(C7(...a)),e.min=(...a)=>e.check(bf(...a)),e.max=(...a)=>e.check(uM(...a)),e.length=(...a)=>e.check(pM(...a)),e.nonempty=(...a)=>e.check(bf(1,...a)),e.lowercase=a=>e.check(S7(a)),e.uppercase=a=>e.check(T7(a)),e.trim=()=>e.check(x7()),e.normalize=(...a)=>e.check(k7(...a)),e.toLowerCase=()=>e.check(E7()),e.toUpperCase=()=>e.check(R7()),e.slugify=()=>e.check(A7())}),$M=be("ZodString",(e,t)=>{N_.init(e,t),zM.init(e,t),e.email=o=>e.check(FV(f9,o)),e.url=o=>e.check(dM(qM,o)),e.jwt=o=>e.check(o7(O9,o)),e.emoji=o=>e.check($V(b9,o)),e.guid=o=>e.check(PR(AR,o)),e.uuid=o=>e.check(BV(Og,o)),e.uuidv4=o=>e.check(jV(Og,o)),e.uuidv6=o=>e.check(UV(Og,o)),e.uuidv7=o=>e.check(zV(Og,o)),e.nanoid=o=>e.check(qV(y9,o)),e.guid=o=>e.check(PR(AR,o)),e.cuid=o=>e.check(VV(S9,o)),e.cuid2=o=>e.check(HV(T9,o)),e.ulid=o=>e.check(GV(w9,o)),e.base64=o=>e.check(XV(R9,o)),e.base64url=o=>e.check(e7(A9,o)),e.xid=o=>e.check(KV(_9,o)),e.ksuid=o=>e.check(WV(C9,o)),e.ipv4=o=>e.check(YV(P9,o)),e.ipv6=o=>e.check(ZV(k9,o)),e.cidrv4=o=>e.check(QV(x9,o)),e.cidrv6=o=>e.check(JV(E9,o)),e.e164=o=>e.check(t7(D9,o)),e.datetime=o=>e.check(UM(o)),e.date=o=>e.check(J7(o)),e.time=o=>e.check(e9(o)),e.duration=o=>e.check(o9(o))});function V(e){return LV($M,e)}const xo=be("ZodStringFormat",(e,t)=>{To.init(e,t),zM.init(e,t)}),f9=be("ZodEmail",(e,t)=>{Nq.init(e,t),xo.init(e,t)}),AR=be("ZodGUID",(e,t)=>{Mq.init(e,t),xo.init(e,t)}),Og=be("ZodUUID",(e,t)=>{Lq.init(e,t),xo.init(e,t)}),qM=be("ZodURL",(e,t)=>{Fq.init(e,t),xo.init(e,t)});function v9(e){return dM(qM,e)}const b9=be("ZodEmoji",(e,t)=>{Bq.init(e,t),xo.init(e,t)}),y9=be("ZodNanoID",(e,t)=>{jq.init(e,t),xo.init(e,t)}),S9=be("ZodCUID",(e,t)=>{Uq.init(e,t),xo.init(e,t)}),T9=be("ZodCUID2",(e,t)=>{zq.init(e,t),xo.init(e,t)}),w9=be("ZodULID",(e,t)=>{$q.init(e,t),xo.init(e,t)}),_9=be("ZodXID",(e,t)=>{qq.init(e,t),xo.init(e,t)}),C9=be("ZodKSUID",(e,t)=>{Vq.init(e,t),xo.init(e,t)}),P9=be("ZodIPv4",(e,t)=>{Yq.init(e,t),xo.init(e,t)}),k9=be("ZodIPv6",(e,t)=>{Zq.init(e,t),xo.init(e,t)}),x9=be("ZodCIDRv4",(e,t)=>{Qq.init(e,t),xo.init(e,t)}),E9=be("ZodCIDRv6",(e,t)=>{Jq.init(e,t),xo.init(e,t)}),R9=be("ZodBase64",(e,t)=>{Xq.init(e,t),xo.init(e,t)}),A9=be("ZodBase64URL",(e,t)=>{tV.init(e,t),xo.init(e,t)}),D9=be("ZodE164",(e,t)=>{oV.init(e,t),xo.init(e,t)}),O9=be("ZodJWT",(e,t)=>{nV.init(e,t),xo.init(e,t)}),B_=be("ZodNumber",(e,t)=>{rM.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(a,n,i)=>gM(e,a,n),e.gt=(a,n)=>e.check(xR(a,n)),e.gte=(a,n)=>e.check(NS(a,n)),e.min=(a,n)=>e.check(NS(a,n)),e.lt=(a,n)=>e.check(kR(a,n)),e.lte=(a,n)=>e.check(LS(a,n)),e.max=(a,n)=>e.check(LS(a,n)),e.int=a=>e.check(DR(a)),e.safe=a=>e.check(DR(a)),e.positive=a=>e.check(xR(0,a)),e.nonnegative=a=>e.check(NS(0,a)),e.negative=a=>e.check(kR(0,a)),e.nonpositive=a=>e.check(LS(0,a)),e.multipleOf=(a,n)=>e.check(ER(a,n)),e.step=(a,n)=>e.check(ER(a,n)),e.finite=()=>e;const o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function Lt(e){return s7(B_,e)}const I9=be("ZodNumberFormat",(e,t)=>{rV.init(e,t),B_.init(e,t)});function DR(e){return c7(I9,e)}const VM=be("ZodBoolean",(e,t)=>{iV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>hM(e,o,a)});function $t(e){return d7(VM,e)}const M9=be("ZodUndefined",(e,t)=>{sV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>vM(e,o)});function ofe(e){return p7(M9,e)}const L9=be("ZodNull",(e,t)=>{lV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>fM(e,o,a)});function N9(e){return m7(L9,e)}const F9=be("ZodAny",(e,t)=>{cV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>yM()});function B9(){return g7(F9)}const j9=be("ZodUnknown",(e,t)=>{dV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>SM()});function ko(){return h7(j9)}const U9=be("ZodNever",(e,t)=>{uV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>bM(e,o,a)});function HM(e){return f7(U9,e)}const z9=be("ZodArray",(e,t)=>{pV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>kM(e,o,a,n),e.element=t.element,e.min=(o,a)=>e.check(bf(o,a)),e.nonempty=o=>e.check(bf(1,o)),e.max=(o,a)=>e.check(uM(o,a)),e.length=(o,a)=>e.check(pM(o,a)),e.unwrap=()=>e.element});function Fe(e,t){return D7(z9,e,t)}const j_=be("ZodObject",(e,t)=>{gV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>xM(e,o,a,n),Dt(e,"shape",()=>t.shape),e.keyof=()=>ia(Object.keys(e._zod.def.shape)),e.catchall=o=>e.clone({...e._zod.def,catchall:o}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ko()}),e.loose=()=>e.clone({...e._zod.def,catchall:ko()}),e.strict=()=>e.clone({...e._zod.def,catchall:HM()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=o=>P8(e,o),e.safeExtend=o=>k8(e,o),e.merge=o=>x8(e,o),e.pick=o=>_8(e,o),e.omit=o=>C8(e,o),e.partial=(...o)=>E8(ZM,e,o[0]),e.required=(...o)=>R8(QM,e,o[0])});function _e(e,t){const o={type:"object",shape:e??{},...qe(t)};return new j_(o)}function afe(e,t){return new j_({type:"object",shape:e,catchall:HM(),...qe(t)})}function Ca(e,t){return new j_({type:"object",shape:e,catchall:ko(),...qe(t)})}const GM=be("ZodUnion",(e,t)=>{lM.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>EM(e,o,a,n),e.options=t.options});function ro(e,t){return new GM({type:"union",options:e,...qe(t)})}const $9=be("ZodDiscriminatedUnion",(e,t)=>{GM.init(e,t),hV.init(e,t)});function KM(e,t,o){return new $9({type:"union",options:t,discriminator:e,...qe(o)})}const q9=be("ZodIntersection",(e,t)=>{fV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>RM(e,o,a,n)});function U_(e,t){return new q9({type:"intersection",left:e,right:t})}const V9=be("ZodTuple",(e,t)=>{vV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>AM(e,o,a,n),e.rest=o=>e.clone({...e._zod.def,rest:o})});function nfe(e,t,o){const a=t instanceof Ht,n=a?o:t,i=a?t:null;return new V9({type:"tuple",items:e,rest:i,...qe(n)})}const WM=be("ZodRecord",(e,t)=>{bV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>DM(e,o,a,n),e.keyType=t.keyType,e.valueType=t.valueType});function vo(e,t,o){return new WM({type:"record",keyType:e,valueType:t,...qe(o)})}function rfe(e,t,o){const a=Di(e);return a._zod.values=void 0,new WM({type:"record",keyType:a,valueType:t,...qe(o)})}const AT=be("ZodEnum",(e,t)=>{yV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(a,n,i)=>TM(e,a,n),e.enum=t.entries,e.options=Object.values(t.entries);const o=new Set(Object.keys(t.entries));e.extract=(a,n)=>{const i={};for(const l of a)if(o.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new AT({...t,checks:[],...qe(n),entries:i})},e.exclude=(a,n)=>{const i={...t.entries};for(const l of a)if(o.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new AT({...t,checks:[],...qe(n),entries:i})}});function ia(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(a=>[a,a])):e;return new AT({type:"enum",entries:o,...qe(t)})}const H9=be("ZodLiteral",(e,t)=>{SV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>wM(e,o,a),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Ze(e,t){return new H9({type:"literal",values:Array.isArray(e)?e:[e],...qe(t)})}const G9=be("ZodFile",(e,t)=>{TV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>_M(e,o,a),e.min=(o,a)=>e.check(b7(o,a)),e.max=(o,a)=>e.check(v7(o,a)),e.mime=(o,a)=>e.check(P7(Array.isArray(o)?o:[o],a))});function ife(e){return O7(G9,e)}const K9=be("ZodTransform",(e,t)=>{wV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>PM(e,o),e._zod.parse=(o,a)=>{if(a.direction==="backward")throw new VI(e.constructor.name);o.addIssue=i=>{if(typeof i=="string")o.issues.push(Cp(i,o.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=o.value),l.inst??(l.inst=e),o.issues.push(Cp(l))}};const n=t.transform(o.value,o);return n instanceof Promise?n.then(i=>(o.value=i,o)):(o.value=n,o)}});function YM(e){return new K9({type:"transform",transform:e})}const ZM=be("ZodOptional",(e,t)=>{cM.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>F_(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function Po(e){return new ZM({type:"optional",innerType:e})}const W9=be("ZodExactOptional",(e,t)=>{_V.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>F_(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function Y9(e){return new W9({type:"optional",innerType:e})}const Z9=be("ZodNullable",(e,t)=>{CV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>OM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function OR(e){return new Z9({type:"nullable",innerType:e})}const Q9=be("ZodDefault",(e,t)=>{PV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>MM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function J9(e,t){return new Q9({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():WI(t)}})}const X9=be("ZodPrefault",(e,t)=>{kV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>LM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function eH(e,t){return new X9({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():WI(t)}})}const QM=be("ZodNonOptional",(e,t)=>{xV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>IM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function tH(e,t){return new QM({type:"nonoptional",innerType:e,...qe(t)})}const oH=be("ZodCatch",(e,t)=>{EV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>NM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function aH(e,t){return new oH({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const nH=be("ZodPipe",(e,t)=>{RV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>FM(e,o,a,n),e.in=t.in,e.out=t.out});function DT(e,t){return new nH({type:"pipe",in:e,out:t})}const rH=be("ZodReadonly",(e,t)=>{AV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>BM(e,o,a,n),e.unwrap=()=>e._zod.def.innerType});function iH(e){return new rH({type:"readonly",innerType:e})}const sH=be("ZodLazy",(e,t)=>{DV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>jM(e,o,a,n),e.unwrap=()=>e._zod.def.getter()});function Gr(e){return new sH({type:"lazy",getter:e})}const z_=be("ZodCustom",(e,t)=>{OV.init(e,t),Yt.init(e,t),e._zod.processJSONSchema=(o,a,n)=>CM(e,o)});function lH(e,t){return I7(z_,e??(()=>!0),t)}function cH(e,t={}){return M7(z_,e,t)}function dH(e){return L7(e)}function sfe(e,t={}){const o=new z_({type:"custom",check:"custom",fn:a=>a instanceof e,abort:!0,...qe(t)});return o._zod.bag.Class=e,o._zod.check=a=>{a.value instanceof e||a.issues.push({code:"invalid_type",expected:e.name,input:a.value,inst:o,path:[...o._zod.def.path??[]]})},o}function $_(e,t){return DT(YM(e),t)}const uH={custom:"custom"};function _v(e){return NV($M,e)}function JM(e){return l7(B_,e)}function IR(e){return u7(VM,e)}const pH="2025-11-25",lfe=[pH,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],mH="io.modelcontextprotocol/related-task",Cv="2.0",na=lH(e=>e!==null&&(typeof e=="object"||typeof e=="function")),XM=ro([V(),Lt().int()]),eL=V();Ca({ttl:Lt().optional(),pollInterval:Lt().optional()});const gH=_e({ttl:Lt().optional()}),hH=_e({taskId:V()}),q_=Ca({progressToken:XM.optional(),[mH]:hH.optional()}),Dn=_e({_meta:q_.optional()}),$p=Dn.extend({task:gH.optional()}),cfe=e=>$p.safeParse(e).success,ka=_e({method:V(),params:Dn.loose().optional()}),tr=_e({_meta:q_.optional()}),or=_e({method:V(),params:tr.loose().optional()}),xa=Ca({_meta:q_.optional()}),Pv=ro([V(),Lt().int()]),tL=_e({jsonrpc:Ze(Cv),id:Pv,...ka.shape}).strict(),dfe=e=>tL.safeParse(e).success,oL=_e({jsonrpc:Ze(Cv),...or.shape}).strict(),ufe=e=>oL.safeParse(e).success,V_=_e({jsonrpc:Ze(Cv),id:Pv,result:xa}).strict(),pfe=e=>V_.safeParse(e).success;var Pp;(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"})(Pp||(Pp={}));const H_=_e({jsonrpc:Ze(Cv),id:Pv.optional(),error:_e({code:Lt().int(),message:V(),data:ko().optional()})}).strict(),mfe=e=>H_.safeParse(e).success,gfe=ro([tL,oL,V_,H_]);ro([V_,H_]);const aL=xa.strict(),fH=tr.extend({requestId:Pv.optional(),reason:V().optional()}),nL=or.extend({method:Ze("notifications/cancelled"),params:fH}),vH=_e({src:V(),mimeType:V().optional(),sizes:Fe(V()).optional(),theme:ia(["light","dark"]).optional()}),qp=_e({icons:Fe(vH).optional()}),bd=_e({name:V(),title:V().optional()}),rL=bd.extend({...bd.shape,...qp.shape,version:V(),websiteUrl:V().optional(),description:V().optional()}),bH=U_(_e({applyDefaults:$t().optional()}),vo(V(),ko())),yH=$_(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,U_(_e({form:bH.optional(),url:na.optional()}),vo(V(),ko()).optional())),SH=Ca({list:na.optional(),cancel:na.optional(),requests:Ca({sampling:Ca({createMessage:na.optional()}).optional(),elicitation:Ca({create:na.optional()}).optional()}).optional()}),TH=Ca({list:na.optional(),cancel:na.optional(),requests:Ca({tools:Ca({call:na.optional()}).optional()}).optional()}),wH=_e({experimental:vo(V(),na).optional(),sampling:_e({context:na.optional(),tools:na.optional()}).optional(),elicitation:yH.optional(),roots:_e({listChanged:$t().optional()}).optional(),tasks:SH.optional(),extensions:vo(V(),na).optional()}),_H=Dn.extend({protocolVersion:V(),capabilities:wH,clientInfo:rL}),CH=ka.extend({method:Ze("initialize"),params:_H}),PH=_e({experimental:vo(V(),na).optional(),logging:na.optional(),completions:na.optional(),prompts:_e({listChanged:$t().optional()}).optional(),resources:_e({subscribe:$t().optional(),listChanged:$t().optional()}).optional(),tools:_e({listChanged:$t().optional()}).optional(),tasks:TH.optional(),extensions:vo(V(),na).optional()}),kH=xa.extend({protocolVersion:V(),capabilities:PH,serverInfo:rL,instructions:V().optional()}),iL=or.extend({method:Ze("notifications/initialized"),params:tr.optional()}),hfe=e=>iL.safeParse(e).success,sL=ka.extend({method:Ze("ping"),params:Dn.optional()}),xH=_e({progress:Lt(),total:Po(Lt()),message:Po(V())}),EH=_e({...tr.shape,...xH.shape,progressToken:XM}),lL=or.extend({method:Ze("notifications/progress"),params:EH}),RH=Dn.extend({cursor:eL.optional()}),Vp=ka.extend({params:RH.optional()}),Hp=xa.extend({nextCursor:eL.optional()}),AH=ia(["working","input_required","completed","failed","cancelled"]),Gp=_e({taskId:V(),status:AH,ttl:ro([Lt(),N9()]),createdAt:V(),lastUpdatedAt:V(),pollInterval:Po(Lt()),statusMessage:Po(V())}),cL=xa.extend({task:Gp}),DH=tr.merge(Gp),dL=or.extend({method:Ze("notifications/tasks/status"),params:DH}),uL=ka.extend({method:Ze("tasks/get"),params:Dn.extend({taskId:V()})}),pL=xa.merge(Gp),mL=ka.extend({method:Ze("tasks/result"),params:Dn.extend({taskId:V()})});xa.loose();const gL=Vp.extend({method:Ze("tasks/list")}),hL=Hp.extend({tasks:Fe(Gp)}),fL=ka.extend({method:Ze("tasks/cancel"),params:Dn.extend({taskId:V()})}),ffe=xa.merge(Gp),vL=_e({uri:V(),mimeType:Po(V()),_meta:vo(V(),ko()).optional()}),bL=vL.extend({text:V()}),G_=V().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),yL=vL.extend({blob:G_}),Kp=ia(["user","assistant"]),Id=_e({audience:Fe(Kp).optional(),priority:Lt().min(0).max(1).optional(),lastModified:UM({offset:!0}).optional()}),SL=_e({...bd.shape,...qp.shape,uri:V(),description:Po(V()),mimeType:Po(V()),size:Po(Lt()),annotations:Id.optional(),_meta:Po(Ca({}))}),OH=_e({...bd.shape,...qp.shape,uriTemplate:V(),description:Po(V()),mimeType:Po(V()),annotations:Id.optional(),_meta:Po(Ca({}))}),IH=Vp.extend({method:Ze("resources/list")}),MH=Hp.extend({resources:Fe(SL)}),LH=Vp.extend({method:Ze("resources/templates/list")}),NH=Hp.extend({resourceTemplates:Fe(OH)}),K_=Dn.extend({uri:V()}),FH=K_,BH=ka.extend({method:Ze("resources/read"),params:FH}),jH=xa.extend({contents:Fe(ro([bL,yL]))}),UH=or.extend({method:Ze("notifications/resources/list_changed"),params:tr.optional()}),zH=K_,$H=ka.extend({method:Ze("resources/subscribe"),params:zH}),qH=K_,VH=ka.extend({method:Ze("resources/unsubscribe"),params:qH}),HH=tr.extend({uri:V()}),GH=or.extend({method:Ze("notifications/resources/updated"),params:HH}),KH=_e({name:V(),description:Po(V()),required:Po($t())}),WH=_e({...bd.shape,...qp.shape,description:Po(V()),arguments:Po(Fe(KH)),_meta:Po(Ca({}))}),YH=Vp.extend({method:Ze("prompts/list")}),ZH=Hp.extend({prompts:Fe(WH)}),QH=Dn.extend({name:V(),arguments:vo(V(),V()).optional()}),JH=ka.extend({method:Ze("prompts/get"),params:QH}),W_=_e({type:Ze("text"),text:V(),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),Y_=_e({type:Ze("image"),data:G_,mimeType:V(),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),Z_=_e({type:Ze("audio"),data:G_,mimeType:V(),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),XH=_e({type:Ze("tool_use"),name:V(),id:V(),input:vo(V(),ko()),_meta:vo(V(),ko()).optional()}),eG=_e({type:Ze("resource"),resource:ro([bL,yL]),annotations:Id.optional(),_meta:vo(V(),ko()).optional()}),tG=SL.extend({type:Ze("resource_link")}),Q_=ro([W_,Y_,Z_,tG,eG]),oG=_e({role:Kp,content:Q_}),aG=xa.extend({description:V().optional(),messages:Fe(oG)}),nG=or.extend({method:Ze("notifications/prompts/list_changed"),params:tr.optional()}),rG=_e({title:V().optional(),readOnlyHint:$t().optional(),destructiveHint:$t().optional(),idempotentHint:$t().optional(),openWorldHint:$t().optional()}),iG=_e({taskSupport:ia(["required","optional","forbidden"]).optional()}),TL=_e({...bd.shape,...qp.shape,description:V().optional(),inputSchema:_e({type:Ze("object"),properties:vo(V(),na).optional(),required:Fe(V()).optional()}).catchall(ko()),outputSchema:_e({type:Ze("object"),properties:vo(V(),na).optional(),required:Fe(V()).optional()}).catchall(ko()).optional(),annotations:rG.optional(),execution:iG.optional(),_meta:vo(V(),ko()).optional()}),sG=Vp.extend({method:Ze("tools/list")}),lG=Hp.extend({tools:Fe(TL)}),wL=xa.extend({content:Fe(Q_).default([]),structuredContent:vo(V(),ko()).optional(),isError:$t().optional()});wL.or(xa.extend({toolResult:ko()}));const cG=$p.extend({name:V(),arguments:vo(V(),ko()).optional()}),dG=ka.extend({method:Ze("tools/call"),params:cG}),uG=or.extend({method:Ze("notifications/tools/list_changed"),params:tr.optional()}),vfe=_e({autoRefresh:$t().default(!0),debounceMs:Lt().int().nonnegative().default(300)}),_L=ia(["debug","info","notice","warning","error","critical","alert","emergency"]),pG=Dn.extend({level:_L}),mG=ka.extend({method:Ze("logging/setLevel"),params:pG}),gG=tr.extend({level:_L,logger:V().optional(),data:ko()}),hG=or.extend({method:Ze("notifications/message"),params:gG}),fG=_e({name:V().optional()}),vG=_e({hints:Fe(fG).optional(),costPriority:Lt().min(0).max(1).optional(),speedPriority:Lt().min(0).max(1).optional(),intelligencePriority:Lt().min(0).max(1).optional()}),bG=_e({mode:ia(["auto","required","none"]).optional()}),yG=_e({type:Ze("tool_result"),toolUseId:V().describe("The unique identifier for the corresponding tool call."),content:Fe(Q_).default([]),structuredContent:_e({}).loose().optional(),isError:$t().optional(),_meta:vo(V(),ko()).optional()}),SG=KM("type",[W_,Y_,Z_]),_f=KM("type",[W_,Y_,Z_,XH,yG]),TG=_e({role:Kp,content:ro([_f,Fe(_f)]),_meta:vo(V(),ko()).optional()}),wG=$p.extend({messages:Fe(TG),modelPreferences:vG.optional(),systemPrompt:V().optional(),includeContext:ia(["none","thisServer","allServers"]).optional(),temperature:Lt().optional(),maxTokens:Lt().int(),stopSequences:Fe(V()).optional(),metadata:na.optional(),tools:Fe(TL).optional(),toolChoice:bG.optional()}),_G=ka.extend({method:Ze("sampling/createMessage"),params:wG}),CG=xa.extend({model:V(),stopReason:Po(ia(["endTurn","stopSequence","maxTokens"]).or(V())),role:Kp,content:SG}),PG=xa.extend({model:V(),stopReason:Po(ia(["endTurn","stopSequence","maxTokens","toolUse"]).or(V())),role:Kp,content:ro([_f,Fe(_f)])}),kG=_e({type:Ze("boolean"),title:V().optional(),description:V().optional(),default:$t().optional()}),xG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),minLength:Lt().optional(),maxLength:Lt().optional(),format:ia(["email","uri","date","date-time"]).optional(),default:V().optional()}),EG=_e({type:ia(["number","integer"]),title:V().optional(),description:V().optional(),minimum:Lt().optional(),maximum:Lt().optional(),default:Lt().optional()}),RG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),enum:Fe(V()),default:V().optional()}),AG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),oneOf:Fe(_e({const:V(),title:V()})),default:V().optional()}),DG=_e({type:Ze("string"),title:V().optional(),description:V().optional(),enum:Fe(V()),enumNames:Fe(V()).optional(),default:V().optional()}),OG=ro([RG,AG]),IG=_e({type:Ze("array"),title:V().optional(),description:V().optional(),minItems:Lt().optional(),maxItems:Lt().optional(),items:_e({type:Ze("string"),enum:Fe(V())}),default:Fe(V()).optional()}),MG=_e({type:Ze("array"),title:V().optional(),description:V().optional(),minItems:Lt().optional(),maxItems:Lt().optional(),items:_e({anyOf:Fe(_e({const:V(),title:V()}))}),default:Fe(V()).optional()}),LG=ro([IG,MG]),NG=ro([DG,OG,LG]),FG=ro([NG,kG,xG,EG]),BG=$p.extend({mode:Ze("form").optional(),message:V(),requestedSchema:_e({type:Ze("object"),properties:vo(V(),FG),required:Fe(V()).optional()})}),jG=$p.extend({mode:Ze("url"),message:V(),elicitationId:V(),url:V().url()}),UG=ro([BG,jG]),zG=ka.extend({method:Ze("elicitation/create"),params:UG}),$G=tr.extend({elicitationId:V()}),qG=or.extend({method:Ze("notifications/elicitation/complete"),params:$G}),VG=xa.extend({action:ia(["accept","decline","cancel"]),content:$_(e=>e===null?void 0:e,vo(V(),ro([V(),Lt(),$t(),Fe(V())])).optional())}),HG=_e({type:Ze("ref/resource"),uri:V()}),GG=_e({type:Ze("ref/prompt"),name:V()}),KG=Dn.extend({ref:ro([GG,HG]),argument:_e({name:V(),value:V()}),context:_e({arguments:vo(V(),V()).optional()}).optional()}),WG=ka.extend({method:Ze("completion/complete"),params:KG}),YG=xa.extend({completion:Ca({values:Fe(V()).max(100),total:Po(Lt().int()),hasMore:Po($t())})}),ZG=_e({uri:V().startsWith("file://"),name:V().optional(),_meta:vo(V(),ko()).optional()}),QG=ka.extend({method:Ze("roots/list"),params:Dn.optional()}),JG=xa.extend({roots:Fe(ZG)}),XG=or.extend({method:Ze("notifications/roots/list_changed"),params:tr.optional()});ro([sL,CH,WG,mG,JH,YH,IH,LH,BH,$H,VH,dG,sG,uL,mL,gL,fL]);ro([nL,lL,iL,XG,dL]);ro([aL,CG,PG,VG,JG,pL,hL,cL]);ro([sL,_G,zG,QG,uL,mL,gL,fL]);ro([nL,lL,hG,GH,UH,uG,nG,dL,qG]);ro([aL,kH,YG,aG,ZH,MH,NH,jH,wL,lG,pL,hL,cL]);class kv extends Error{constructor(t,o,a){super(`MCP error ${t}: ${o}`),this.code=t,this.data=a,this.name="McpError"}static fromError(t,o,a){if(t===Pp.UrlElicitationRequired&&a){const n=a;if(n.elicitations)return new eK(n.elicitations,o)}return new kv(t,o,a)}}class eK extends kv{constructor(t,o=`URL elicitation${t.length>1?"s":""} required`){super(Pp.UrlElicitationRequired,o,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}const bfe={SELF:e=>`${e}_self`,REGISTRY:e=>`${e}_registry`,COMMUNITY_REGISTRY:e=>`${e}_community-registry`,DEV_ASSETS:e=>`${e}_dev-assets`,SITE_DIAGNOSTICS:e=>`site-diagnostics_${e}`,REPORTS:e=>`${e}_commerce-discovery`},yfe="get_my_diagnostic",Sfe="self";function Wn(e){return{is(t){return!t||!t.startsWith(e)?null:t.slice(e.length)||null},get(t){return`${e}${t}`}}}function tK(e){return{id:e.id,organization_id:e.organizationId,title:e.title,description:e.description,icon:e.icon,status:"active",created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:"system",updated_by:void 0,metadata:{instructions:e.instructions??null,...e.ui?{ui:e.ui}:{}},pinned:!1,connections:[]}}const CL=Wn("decopilot_"),oK=CL.is,aK=CL.get,PL=Wn("dev_"),Tfe=PL.get,wfe=PL.is,nK="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",rK="#6366f1",_fe=`https://api.iconify.design/lucide:file-search.svg?color=${encodeURIComponent(rK)}`;function Cfe(e){return tK({id:aK(e),organizationId:e,title:"Super Agent",description:"Default agent that aggregates all organization connections",icon:nK,ui:{layout:{defaultMainView:{type:"overview"},chatDefaultOpen:!0}}})}const iK=Wn("brand-context-setup_"),sK=iK.is,lK=Wn("site-diagnostics_"),cK=lK.is,kL=Wn("commerce-discovery_"),dK=kL.is,Pfe=kL.get,fl={AUTOMATION_MANAGER:Wn("studio-automation-manager_"),CONNECTION_MANAGER:Wn("studio-connection-manager_"),API_KEY_MANAGER:Wn("studio-api-key-manager_"),STORE_MANAGER:Wn("studio-store-manager_"),BRAND_MANAGER:Wn("studio-brand-manager_"),USAGE_MANAGER:Wn("studio-usage-manager_")},kfe={AUTOMATION_MANAGER:fl.AUTOMATION_MANAGER.get,CONNECTION_MANAGER:fl.CONNECTION_MANAGER.get,API_KEY_MANAGER:fl.API_KEY_MANAGER.get,STORE_MANAGER:fl.STORE_MANAGER.get,BRAND_MANAGER:fl.BRAND_MANAGER.get,USAGE_MANAGER:fl.USAGE_MANAGER.get};function uK(e){return e?Object.values(fl).some(t=>t.is(e)!==null):!1}const pK=["studio-agent-manager_","studio-task-manager_"],mK=pK.map(Wn);function gK(e){return e?mK.some(t=>t.is(e)!==null):!1}const hK={from({org:e,project:t}){return`${e}/${t}`},parse(e){e.startsWith("/")&&(e=e.slice(1));const[t,o]=e.split("/");if(!t||!o)throw new Error("Invalid locator");return{org:t,project:o}}},J_=R.createContext(void 0),xfe=()=>R.useContext(J_),Wp=()=>{const e=R.useContext(J_);if(!e)throw new Error("useProjectContext must be used within a ProjectContextProvider");return e},Efe=()=>Wp().org,Rfe=e=>{const t=Ie.c(10),{children:o,org:a,project:n}=e;let i;t[0]!==a.id||t[1]!==n.id?(i=hK.from({org:a.id,project:n.id}),t[0]=a.id,t[1]=n.id,t[2]=i):i=t[2];const l=i;let c;t[3]!==l||t[4]!==a||t[5]!==n?(c={org:a,project:n,locator:l},t[3]=l,t[4]=a,t[5]=n,t[6]=c):c=t[6];const u=c;let p;return t[7]!==o||t[8]!==u?(p=T.jsx(J_.Provider,{value:u,children:o}),t[7]=o,t[8]=u,t[9]=p):p=t[9],p};function fK(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css",t.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}const vK=e=>{switch(e){case"success":return SK;case"info":return wK;case"warning":return TK;case"error":return _K;default:return null}},bK=Array(12).fill(0),yK=({visible:e,className:t})=>X.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},X.createElement("div",{className:"sonner-spinner"},bK.map((o,a)=>X.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),SK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),TK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),wK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),_K=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},X.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),CK=X.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},X.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),X.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),PK=()=>{const[e,t]=X.useState(document.hidden);return X.useEffect(()=>{const o=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",o),()=>window.removeEventListener("visibilitychange",o)},[]),e};let OT=1;class kK{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const o=this.subscribers.indexOf(t);this.subscribers.splice(o,1)}),this.publish=t=>{this.subscribers.forEach(o=>o(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var o;const{message:a,...n}=t,i=typeof t?.id=="number"||((o=t.id)==null?void 0:o.length)>0?t.id:OT++,l=this.toasts.find(u=>u.id===i),c=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(u=>u.id===i?(this.publish({...u,...t,id:i,title:a}),{...u,...t,id:i,dismissible:c,title:a}):u):this.addToast({title:a,...n,dismissible:c,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(o=>o({id:t,dismiss:!0})))):this.toasts.forEach(o=>{this.subscribers.forEach(a=>a({id:o.id,dismiss:!0}))}),t),this.message=(t,o)=>this.create({...o,message:t}),this.error=(t,o)=>this.create({...o,message:t,type:"error"}),this.success=(t,o)=>this.create({...o,type:"success",message:t}),this.info=(t,o)=>this.create({...o,type:"info",message:t}),this.warning=(t,o)=>this.create({...o,type:"warning",message:t}),this.loading=(t,o)=>this.create({...o,type:"loading",message:t}),this.promise=(t,o)=>{if(!o)return;let a;o.loading!==void 0&&(a=this.create({...o,promise:t,type:"loading",message:o.loading,description:typeof o.description!="function"?o.description:void 0}));const n=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,l;const c=n.then(async p=>{if(l=["resolve",p],X.isValidElement(p))i=!1,this.create({id:a,type:"default",message:p});else if(EK(p)&&!p.ok){i=!1;const m=typeof o.error=="function"?await o.error(`HTTP error! status: ${p.status}`):o.error,f=typeof o.description=="function"?await o.description(`HTTP error! status: ${p.status}`):o.description,b=typeof m=="object"&&!X.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:f,...b})}else if(p instanceof Error){i=!1;const m=typeof o.error=="function"?await o.error(p):o.error,f=typeof o.description=="function"?await o.description(p):o.description,b=typeof m=="object"&&!X.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:f,...b})}else if(o.success!==void 0){i=!1;const m=typeof o.success=="function"?await o.success(p):o.success,f=typeof o.description=="function"?await o.description(p):o.description,b=typeof m=="object"&&!X.isValidElement(m)?m:{message:m};this.create({id:a,type:"success",description:f,...b})}}).catch(async p=>{if(l=["reject",p],o.error!==void 0){i=!1;const g=typeof o.error=="function"?await o.error(p):o.error,m=typeof o.description=="function"?await o.description(p):o.description,v=typeof g=="object"&&!X.isValidElement(g)?g:{message:g};this.create({id:a,type:"error",description:m,...v})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),o.finally==null||o.finally.call(o)}),u=()=>new Promise((p,g)=>c.then(()=>l[0]==="reject"?g(l[1]):p(l[1])).catch(g));return typeof a!="string"&&typeof a!="number"?{unwrap:u}:Object.assign(a,{unwrap:u})},this.custom=(t,o)=>{const a=o?.id||OT++;return this.create({jsx:t(a),id:a,...o}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const sn=new kK,xK=(e,t)=>{const o=t?.id||OT++;return sn.addToast({title:e,...t,id:o}),o},EK=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RK=xK,AK=()=>sn.toasts,DK=()=>sn.getActiveToasts(),Vr=Object.assign(RK,{success:sn.success,info:sn.info,warning:sn.warning,error:sn.error,custom:sn.custom,message:sn.message,promise:sn.promise,dismiss:sn.dismiss,loading:sn.loading},{getHistory:AK,getToasts:DK});fK("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Ig(e){return e.label!==void 0}const OK=3,IK="24px",MK="16px",MR=4e3,LK=356,NK=14,FK=45,BK=200;function Or(...e){return e.filter(Boolean).join(" ")}function jK(e){const[t,o]=e.split("-"),a=[];return t&&a.push(t),o&&a.push(o),a}const UK=e=>{var t,o,a,n,i,l,c,u,p;const{invert:g,toast:m,unstyled:f,interacting:v,setHeights:b,visibleToasts:S,heights:C,index:w,toasts:_,expanded:E,removeToast:k,defaultRichColors:x,closeButton:A,style:D,cancelButtonStyle:O,actionButtonStyle:N,className:$="",descriptionClassName:F="",duration:z,position:j,gap:K,expandByDefault:ne,classNames:H,icons:Z,closeButtonAriaLabel:te="Close toast"}=e,[le,Q]=X.useState(null),[M,G]=X.useState(null),[q,L]=X.useState(!1),[U,J]=X.useState(!1),[pe,ge]=X.useState(!1),[Ce,$e]=X.useState(!1),[Y,ae]=X.useState(!1),[ve,ie]=X.useState(0),[Te,ke]=X.useState(0),it=X.useRef(m.duration||z||MR),lt=X.useRef(null),Ge=X.useRef(null),tt=w===0,De=w+1<=S,Ae=m.type,He=m.dismissible!==!1,W=m.className||"",oe=m.descriptionClassName||"",se=X.useMemo(()=>C.findIndex(Qe=>Qe.toastId===m.id)||0,[C,m.id]),Pe=X.useMemo(()=>{var Qe;return(Qe=m.closeButton)!=null?Qe:A},[m.closeButton,A]),Ee=X.useMemo(()=>m.duration||z||MR,[m.duration,z]),Re=X.useRef(0),Le=X.useRef(0),at=X.useRef(0),rt=X.useRef(null),[St,Et]=j.split("-"),Tt=X.useMemo(()=>C.reduce((Qe,gt,oo)=>oo>=se?Qe:Qe+gt.height,0),[C,se]),$o=PK(),Jr=m.invert||g,rr=Ae==="loading";Le.current=X.useMemo(()=>se*K+Tt,[se,Tt]),X.useEffect(()=>{it.current=Ee},[Ee]),X.useEffect(()=>{L(!0)},[]),X.useEffect(()=>{const Qe=Ge.current;if(Qe){const gt=Qe.getBoundingClientRect().height;return ke(gt),b(oo=>[{toastId:m.id,height:gt,position:m.position},...oo]),()=>b(oo=>oo.filter(Zt=>Zt.toastId!==m.id))}},[b,m.id]),X.useLayoutEffect(()=>{if(!q)return;const Qe=Ge.current,gt=Qe.style.height;Qe.style.height="auto";const oo=Qe.getBoundingClientRect().height;Qe.style.height=gt,ke(oo),b(Zt=>Zt.find(Bt=>Bt.toastId===m.id)?Zt.map(Bt=>Bt.toastId===m.id?{...Bt,height:oo}:Bt):[{toastId:m.id,height:oo,position:m.position},...Zt])},[q,m.title,m.description,b,m.id,m.jsx,m.action,m.cancel]);const Xe=X.useCallback(()=>{J(!0),ie(Le.current),b(Qe=>Qe.filter(gt=>gt.toastId!==m.id)),setTimeout(()=>{k(m)},BK)},[m,k,b,Le]);X.useEffect(()=>{if(m.promise&&Ae==="loading"||m.duration===1/0||m.type==="loading")return;let Qe;return E||v||$o?(()=>{if(at.current<Re.current){const Zt=new Date().getTime()-Re.current;it.current=it.current-Zt}at.current=new Date().getTime()})():it.current!==1/0&&(Re.current=new Date().getTime(),Qe=setTimeout(()=>{m.onAutoClose==null||m.onAutoClose.call(m,m),Xe()},it.current)),()=>clearTimeout(Qe)},[E,v,m,Ae,$o,Xe]),X.useEffect(()=>{m.delete&&(Xe(),m.onDismiss==null||m.onDismiss.call(m,m))},[Xe,m.delete]);function ht(){var Qe;if(Z?.loading){var gt;return X.createElement("div",{className:Or(H?.loader,m==null||(gt=m.classNames)==null?void 0:gt.loader,"sonner-loader"),"data-visible":Ae==="loading"},Z.loading)}return X.createElement(yK,{className:Or(H?.loader,m==null||(Qe=m.classNames)==null?void 0:Qe.loader),visible:Ae==="loading"})}const Rt=m.icon||Z?.[Ae]||vK(Ae);var dt,Ft;return X.createElement("li",{tabIndex:0,ref:Ge,className:Or($,W,H?.toast,m==null||(t=m.classNames)==null?void 0:t.toast,H?.default,H?.[Ae],m==null||(o=m.classNames)==null?void 0:o[Ae]),"data-sonner-toast":"","data-rich-colors":(dt=m.richColors)!=null?dt:x,"data-styled":!(m.jsx||m.unstyled||f),"data-mounted":q,"data-promise":!!m.promise,"data-swiped":Y,"data-removed":U,"data-visible":De,"data-y-position":St,"data-x-position":Et,"data-index":w,"data-front":tt,"data-swiping":pe,"data-dismissible":He,"data-type":Ae,"data-invert":Jr,"data-swipe-out":Ce,"data-swipe-direction":M,"data-expanded":!!(E||ne&&q),"data-testid":m.testId,style:{"--index":w,"--toasts-before":w,"--z-index":_.length-w,"--offset":`${U?ve:Le.current}px`,"--initial-height":ne?"auto":`${Te}px`,...D,...m.style},onDragEnd:()=>{ge(!1),Q(null),rt.current=null},onPointerDown:Qe=>{Qe.button!==2&&(rr||!He||(lt.current=new Date,ie(Le.current),Qe.target.setPointerCapture(Qe.pointerId),Qe.target.tagName!=="BUTTON"&&(ge(!0),rt.current={x:Qe.clientX,y:Qe.clientY})))},onPointerUp:()=>{var Qe,gt,oo;if(Ce||!He)return;rt.current=null;const Zt=Number(((Qe=Ge.current)==null?void 0:Qe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ra=Number(((gt=Ge.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Bt=new Date().getTime()-((oo=lt.current)==null?void 0:oo.getTime()),po=le==="x"?Zt:Ra,In=Math.abs(po)/Bt;if(Math.abs(po)>=FK||In>.11){ie(Le.current),m.onDismiss==null||m.onDismiss.call(m,m),G(le==="x"?Zt>0?"right":"left":Ra>0?"down":"up"),Xe(),$e(!0);return}else{var ma,Wa;(ma=Ge.current)==null||ma.style.setProperty("--swipe-amount-x","0px"),(Wa=Ge.current)==null||Wa.style.setProperty("--swipe-amount-y","0px")}ae(!1),ge(!1),Q(null)},onPointerMove:Qe=>{var gt,oo,Zt;if(!rt.current||!He||((gt=window.getSelection())==null?void 0:gt.toString().length)>0)return;const Bt=Qe.clientY-rt.current.y,po=Qe.clientX-rt.current.x;var In;const ma=(In=e.swipeDirections)!=null?In:jK(j);!le&&(Math.abs(po)>1||Math.abs(Bt)>1)&&Q(Math.abs(po)>Math.abs(Bt)?"x":"y");let Wa={x:0,y:0};const ql=ir=>1/(1.5+Math.abs(ir)/20);if(le==="y"){if(ma.includes("top")||ma.includes("bottom"))if(ma.includes("top")&&Bt<0||ma.includes("bottom")&&Bt>0)Wa.y=Bt;else{const ir=Bt*ql(Bt);Wa.y=Math.abs(ir)<Math.abs(Bt)?ir:Bt}}else if(le==="x"&&(ma.includes("left")||ma.includes("right")))if(ma.includes("left")&&po<0||ma.includes("right")&&po>0)Wa.x=po;else{const ir=po*ql(po);Wa.x=Math.abs(ir)<Math.abs(po)?ir:po}(Math.abs(Wa.x)>0||Math.abs(Wa.y)>0)&&ae(!0),(oo=Ge.current)==null||oo.style.setProperty("--swipe-amount-x",`${Wa.x}px`),(Zt=Ge.current)==null||Zt.style.setProperty("--swipe-amount-y",`${Wa.y}px`)}},Pe&&!m.jsx&&Ae!=="loading"?X.createElement("button",{"aria-label":te,"data-disabled":rr,"data-close-button":!0,onClick:rr||!He?()=>{}:()=>{Xe(),m.onDismiss==null||m.onDismiss.call(m,m)},className:Or(H?.closeButton,m==null||(a=m.classNames)==null?void 0:a.closeButton)},(Ft=Z?.close)!=null?Ft:CK):null,(Ae||m.icon||m.promise)&&m.icon!==null&&(Z?.[Ae]!==null||m.icon)?X.createElement("div",{"data-icon":"",className:Or(H?.icon,m==null||(n=m.classNames)==null?void 0:n.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||ht():null,m.type!=="loading"?Rt:null):null,X.createElement("div",{"data-content":"",className:Or(H?.content,m==null||(i=m.classNames)==null?void 0:i.content)},X.createElement("div",{"data-title":"",className:Or(H?.title,m==null||(l=m.classNames)==null?void 0:l.title)},m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title),m.description?X.createElement("div",{"data-description":"",className:Or(F,oe,H?.description,m==null||(c=m.classNames)==null?void 0:c.description)},typeof m.description=="function"?m.description():m.description):null),X.isValidElement(m.cancel)?m.cancel:m.cancel&&Ig(m.cancel)?X.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||O,onClick:Qe=>{Ig(m.cancel)&&He&&(m.cancel.onClick==null||m.cancel.onClick.call(m.cancel,Qe),Xe())},className:Or(H?.cancelButton,m==null||(u=m.classNames)==null?void 0:u.cancelButton)},m.cancel.label):null,X.isValidElement(m.action)?m.action:m.action&&Ig(m.action)?X.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||N,onClick:Qe=>{Ig(m.action)&&(m.action.onClick==null||m.action.onClick.call(m.action,Qe),!Qe.defaultPrevented&&Xe())},className:Or(H?.actionButton,m==null||(p=m.classNames)==null?void 0:p.actionButton)},m.action.label):null)};function LR(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function zK(e,t){const o={};return[e,t].forEach((a,n)=>{const i=n===1,l=i?"--mobile-offset":"--offset",c=i?MK:IK;function u(p){["top","right","bottom","left"].forEach(g=>{o[`${l}-${g}`]=typeof p=="number"?`${p}px`:p})}typeof a=="number"||typeof a=="string"?u(a):typeof a=="object"?["top","right","bottom","left"].forEach(p=>{a[p]===void 0?o[`${l}-${p}`]=c:o[`${l}-${p}`]=typeof a[p]=="number"?`${a[p]}px`:a[p]}):u(c)}),o}const $K=X.forwardRef(function(t,o){const{id:a,invert:n,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:u,className:p,offset:g,mobileOffset:m,theme:f="light",richColors:v,duration:b,style:S,visibleToasts:C=OK,toastOptions:w,dir:_=LR(),gap:E=NK,icons:k,containerAriaLabel:x="Notifications"}=t,[A,D]=X.useState([]),O=X.useMemo(()=>a?A.filter(q=>q.toasterId===a):A.filter(q=>!q.toasterId),[A,a]),N=X.useMemo(()=>Array.from(new Set([i].concat(O.filter(q=>q.position).map(q=>q.position)))),[O,i]),[$,F]=X.useState([]),[z,j]=X.useState(!1),[K,ne]=X.useState(!1),[H,Z]=X.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),te=X.useRef(null),le=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),Q=X.useRef(null),M=X.useRef(!1),G=X.useCallback(q=>{D(L=>{var U;return(U=L.find(J=>J.id===q.id))!=null&&U.delete||sn.dismiss(q.id),L.filter(({id:J})=>J!==q.id)})},[]);return X.useEffect(()=>sn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{D(L=>L.map(U=>U.id===q.id?{...U,delete:!0}:U))});return}setTimeout(()=>{_I.flushSync(()=>{D(L=>{const U=L.findIndex(J=>J.id===q.id);return U!==-1?[...L.slice(0,U),{...L[U],...q},...L.slice(U+1)]:[q,...L]})})})}),[A]),X.useEffect(()=>{if(f!=="system"){Z(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:L})=>{Z(L?"dark":"light")})}catch{q.addListener(({matches:U})=>{try{Z(U?"dark":"light")}catch(J){console.error(J)}})}},[f]),X.useEffect(()=>{A.length<=1&&j(!1)},[A]),X.useEffect(()=>{const q=L=>{var U;if(l.every(ge=>L[ge]||L.code===ge)){var pe;j(!0),(pe=te.current)==null||pe.focus()}L.code==="Escape"&&(document.activeElement===te.current||(U=te.current)!=null&&U.contains(document.activeElement))&&j(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[l]),X.useEffect(()=>{if(te.current)return()=>{Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null,M.current=!1)}},[te.current]),X.createElement("section",{ref:o,"aria-label":`${x} ${le}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((q,L)=>{var U;const[J,pe]=q.split("-");return O.length?X.createElement("ol",{key:q,dir:_==="auto"?LR():_,tabIndex:-1,ref:te,className:p,"data-sonner-toaster":!0,"data-sonner-theme":H,"data-y-position":J,"data-x-position":pe,style:{"--front-toast-height":`${((U=$[0])==null?void 0:U.height)||0}px`,"--width":`${LK}px`,"--gap":`${E}px`,...S,...zK(g,m)},onBlur:ge=>{M.current&&!ge.currentTarget.contains(ge.relatedTarget)&&(M.current=!1,Q.current&&(Q.current.focus({preventScroll:!0}),Q.current=null))},onFocus:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||M.current||(M.current=!0,Q.current=ge.relatedTarget)},onMouseEnter:()=>j(!0),onMouseMove:()=>j(!0),onMouseLeave:()=>{K||j(!1)},onDragEnd:()=>j(!1),onPointerDown:ge=>{ge.target instanceof HTMLElement&&ge.target.dataset.dismissible==="false"||ne(!0)},onPointerUp:()=>ne(!1)},O.filter(ge=>!ge.position&&L===0||ge.position===q).map((ge,Ce)=>{var $e,Y;return X.createElement(UK,{key:ge.id,icons:k,index:Ce,toast:ge,defaultRichColors:v,duration:($e=w?.duration)!=null?$e:b,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:n,visibleToasts:C,closeButton:(Y=w?.closeButton)!=null?Y:u,interacting:K,position:q,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:G,toasts:O.filter(ae=>ae.position==ge.position),heights:$.filter(ae=>ae.position==ge.position),setHeights:F,expandByDefault:c,gap:E,expanded:z,swipeDirections:t.swipeDirections})})):null}))}),On={publicConfig:()=>["publicConfig"],appVersionCheck:()=>["appVersionCheck"],organizations:()=>["organizations"],members:e=>[e,"members"],mentionMembers:e=>[e,"mention-members"],invitations:e=>[e,"invitations"],organizationRoles:e=>[e,"organization-roles"],myCapabilities:e=>[e,"my-capabilities"],taskBoardItems:e=>[e,"task-board-items"],taskBoardItemPrs:(e,t)=>[e,"task-board-item-prs",t],previewProbe:(e,t)=>[e,"preview-probe",t],taskBoardActivity:(e,t)=>[e,"task-board-activity",t],taskBoardAdminOrgs:e=>[e,"task-board-admin-orgs"],taskBoardAnalytics:(e,t,o,a,n)=>[e,"task-board-analytics",t,o,a,n],notifications:e=>[e,"notifications"],notificationSubscribers:(e,t)=>[e,"notification-subscribers",t],taskBoardComments:(e,t)=>[e,"task-board-comments",t],homeGithubRecentPrs:(e,t)=>["home-github-recent-prs",e,t],homeGithubContributions:(e,t)=>["home-github-contributions",e,t],report:(e,t,o)=>["report",e,t??"",o??""],reportAll:e=>["report",e],reportsConnection:(e,t)=>["reports","connection",e,t],reportsDiagnostic:(e,t)=>["reports","diagnostic",e,t],reportsVirtualMcp:(e,t)=>["reports","virtual-mcp",e,t],reportsCompanionSchema:(e,t)=>["reports","companion-schema",e,t],reportsCompanionConnections:(e,t)=>["reports","companion-connections",e,t],reportsCompanionConnectionsPrefix:e=>["reports","companion-connections",e],reportsCompanionRegistry:(e,t)=>["reports","companion-registry",e,t],reportsCompanionOAuthStatus:(e,t)=>["reports","companion-oauth-status",e,t],reportsCompanionGaProperties:(e,t)=>["reports","companion-ga-properties",e,t],reportsCompanionGscSites:(e,t)=>["reports","companion-gsc-sites",e,t],reportsCompanionGithubRepos:(e,t,o)=>["reports","companion-github-repos",e,t,o],reportsCompanionGithubSelected:(e,t)=>["reports","companion-github-selected",e,t],reportsConnectionStatus:(e,t)=>["reports","connection-status",e,t],connectionActivity:(e,t,o)=>["monitoring","activity",e,t,o],connectionActivityErrors:(e,t,o)=>["monitoring","activity","errors",e,t,o],isMCPAuthenticated:(e,t)=>["is-mcp-authenticated",e,t],mcpClient:(e,t,o,a)=>["mcp","client",e,t,o,a],mcpToolsList:e=>["mcp","client",e,"tools"],mcpResourcesList:e=>["mcp","client",e,"resources"],mcpPromptsList:e=>["mcp","client",e,"prompts"],mcpReadResource:(e,t)=>["mcp","client",e,"resource",t],mcpUiResourceHtml:(e,t,o)=>["mcp","ui-resource-html",e,t,o],mcpToolCall:(e,t,o)=>["mcp","client",e,"tool-call",t,o],mcpClientPrefix:()=>["mcp","client"],virtualMcpLastUsed:(e,t)=>["virtual-mcp","last-used",e,t],optimisticProjectSidebarViews:(e,t)=>["virtual-mcp","optimistic-sidebar-views",e,t],githubBranches:(e,t,o,a,n)=>["github-branches",e,t,o,a,n],githubPrState:(e,t,o,a,n)=>["github-pr-state",e,t,o,a,n],githubLastPublishedPr:(e,t,o,a,n)=>["github-last-published-pr",e,t,o,a,n],githubOpenPrs:(e,t,o,a)=>["github-open-prs",e,t,o,a],githubCheckRun:(e,t,o,a,n)=>["github-check-run",e,t,o,a,n],githubBranchSearch:(e,t,o,a,n,i)=>["github-branch-search",e,t,o,a,n,i],organizationSettings:e=>["organization-settings",e],infraBillingSites:e=>["infra-billing-sites",e],orgHasSite:e=>["org-has-site",e],infraBilling:(e,t,o)=>["infra-billing",e,t,o],userModelPreferences:e=>["user-model-preferences",e],apiKeysList:e=>["api-keys",e],activeOrganization:e=>["activeOrganization",e],orgAccessStatus:e=>["org-access-status",e],homeNextActions:e=>["home-next-actions",e],projectSearch:(e,t)=>["project-search",e,t],boardLayout:e=>["board-layout",e],agentPrompts:(e,t)=>["agent-prompts",e,t],toolCall:(e,t,o)=>["tool-call",e,t,o],collection:(e,t,o)=>[e,t,"collection",o],collectionItem:(e,t,o,a,n)=>[e,t,o,"collection",a,n],collectionList:(e,t,o,a,n)=>[e,t,o,"collection",a,"list",n],collectionListInfinite:(e,t,o,a,n)=>[e,t,o,"collection",a,"list-infinite",n],monitoringStatsToolCalls:(e,t)=>["MONITORING_STATS",e,"tool-calls",t],monitoringStatsLlm:(e,t)=>["MONITORING_STATS",e,"llm",t],monitoringHeatmap:(e,t)=>["MONITORING_HEATMAP",e,t],monitoringThreadUsage:(e,t)=>["MONITORING_THREAD_USAGE",e,t],monitoringLogsInfinite:(e,t)=>["monitoring","logs-infinite",e,t],monitoringLogDetail:e=>["monitoring","log-detail",e],ensureTask:(e,t)=>["ensure-task",e,t],viewedThreadMetadataRefresh:(e,t)=>["viewed-thread-metadata-refresh",e,t],globalSearch:(e,t,o,a)=>["global-search",e,t,o,a?[...a].sort():null],threadsInfinite:(e,t)=>["threads","list-infinite",e,t],overviewThreads:e=>["threads","overview",e],threadMessages:(e,t)=>["threads","messages",e,t],threadOutputs:e=>["thread-outputs",e],fileText:e=>["file-text",e],csvThumb:e=>["csv-thumb",e],toolDefinitionLookup:(e,t,o)=>["virtual-mcp",t,e??"default","tools","lookup",o],virtualMcpPrompts:(e,t)=>["virtual-mcp",t,e??"default","prompts"],virtualMcpResources:(e,t)=>["virtual-mcp",t,e??"default","resources"],suggestionItems:(e,t,o)=>[...e,t,o],user:e=>["user",e],tags:e=>[e,"tags"],experiments:(e,t)=>[e,"experiments",t],experimentResults:(e,t,o)=>[e,"experiments",t,o,"results"],memberTags:(e,t)=>[e,"member-tags",t],taskBoardPrompts:e=>["task-board-prompts",e],automationsAll:e=>["automations",e],automations:(e,t)=>["automations",e,t??null],automation:(e,t)=>["automation",e,t],automationRuns:(e,t,o)=>["automation-runs",e,t,...[...o??[]].sort()],automationRunStats:(e,t,o)=>["automation-run-stats",e,t,o],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],claudeSubscription:e=>["claude-subscription",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,o)=>["org-fs",e,t,"list",o],orgFsUsage:(e,t)=>["org-fs",e,t,"usage"],orgFsStat:(e,t,o)=>["org-fs",e,t,"stat",o],orgFsPublicSets:e=>["org-fs-public-sets",e],userAvatars:()=>["user-avatars"],orgRepoSyncs:e=>["org-repo-syncs",e],gitProviderCapabilities:e=>["git-provider-capabilities",e],githubConnectFlow:(e,t)=>["github-connect-flow",e,t],githubConnectRepositories:(e,t,o,a)=>["github-connect-repositories",e,t,o,a],gitAccounts:e=>["git-accounts",e],repositories:(e,t)=>t?["repositories",e,t]:["repositories",e],providerRepoSearch:(e,t,o)=>["provider-repo-search-pages",e,t,o],jiraIntegration:e=>["jira-integration",e],jiraBoards:e=>["jira-boards",e],jiraBoardColumns:(e,t)=>["jira-board-columns",e,t],jiraAutomations:e=>["jira-automations",e],orgFsRecent:e=>["org-fs-recent",e],orgFsSearchRoot:e=>["org-fs-search",e],orgFsSearch:(e,t,o,a)=>["org-fs-search",e,t,o,a],orgFsSkills:e=>["org-fs-skills",e],slashSkills:e=>["slash-skills",e],filePickerObjects:(e,t,o,a)=>["file-picker-objects",e,t,o??"",a??!1],filePickerObjectsByConfig:(e,t)=>["file-picker-objects",e,t],aiPlanEntitlements:e=>["ai-plan-entitlements",e],aiPlanCatalog:e=>["ai-plan-catalog",e],checkoutReturnPoll:e=>["checkout-return-poll",e],aiPlanPrices:()=>["ai-plan-prices"],orgBillingAccount:e=>["org-billing-account",e],aiProviderCredits:(e,t)=>["ai-provider-credits",e,t],orgSsoConfig:e=>["org-sso-config",e],orgSsoStatus:e=>["org-sso-status",e],orgNotice:e=>["org-notice",e],storeDiscovery:(e,t)=>["store-discovery",e,t],organizationDomains:e=>["organization-domains",e],organizationJoinRequests:e=>["organization-join-requests",e],domainLookup:e=>["domain-lookup",e],deploymentAdminMe:()=>["deployment-admin","me"],deploymentAdminUsers:e=>["deployment-admin","users",e],deploymentAdminOrgs:e=>["deployment-admin","orgs",e],deploymentAdminOrgsList:()=>["deployment-admin","orgs"],deploymentAdminPrompts:()=>["deployment-admin","prompts"],deploymentAdminOrgFlags:e=>["deployment-admin","orgs",e,"flags"],deploymentAdminOrgNotice:e=>["deployment-admin","orgs",e,"notice"],deploymentAdminOrgSites:e=>["deployment-admin","orgs",e,"sites"],defaultBrand:e=>["brand-context",e,"default"],decoSites:e=>["deco-sites",e],decoApps:()=>["deco-apps"],hostingAccess:(e,t)=>["hosting",e,t,"access"],hostingDeployments:(e,t)=>["hosting",e,t,"deployments"],hostingDeploymentHistory:(e,t)=>["hosting",e,t,"deployment-history"],hostingBuildLogs:(e,t,o,a)=>["hosting",e,t,"build-logs",o,a],hostingEnv:(e,t)=>["hosting",e,t,"env"],hostingRedirects:(e,t)=>["hosting",e,t,"redirects"],hostingDomains:(e,t)=>["hosting",e,t,"domains"],hostingSecrets:(e,t)=>["hosting",e,t,"secrets"],e2eRuns:(e,t)=>["hosting",e,t,"e2e-runs"],e2eChecks:(e,t)=>["hosting",e,t,"e2e-checks"],e2eTypes:(e,t)=>["hosting",e,t,"e2e-types"],e2eRun:(e,t,o)=>["hosting",e,t,"e2e-run",o],analyticsStatus:(e,t)=>["hosting",e,t,"analytics-status"],analyticsData:(e,t,o,a)=>["hosting",e,t,"analytics-data",o,a],cdnData:(e,t,o)=>["monitor",e,"cdn-data",t,o],editorResolve:e=>["editor-resolve",e],webSearchBlob:e=>["web-search-blob",e],decofile:e=>["decofile",e],decofileDraft:e=>["decofile-draft",e],decofileStatus:e=>["decofile-status",e],liveMeta:(...e)=>["live-meta",...e],denoJson:(e,t,o)=>["deno-json",e,t,o],sandboxInvoke:(e,t)=>["sandbox-invoke",e,t],sandboxRepoDir:(e,t,o,a)=>["sandbox-repo-dir",e,t,o,a],sandboxSprite:e=>["sandbox-sprite",e],localAgentCapabilities:()=>["local-agent-capabilities"],githubUserOrgs:(e,t)=>["github-user-orgs",e,t],githubOrgRepos:(e,t,o,a)=>["github-org-repos",e,t,o,a],desktopAuthStatus:()=>["desktop","auth-status"]};function Afe(e,t){e.invalidateQueries({predicate:o=>{const a=o.queryKey;return(!t||a[1]===t)&&a[3]==="collection"&&a[4]==="VIRTUAL_MCP"}})}const xL={itemCreatedSuccessfully:"Item created successfully",itemUpdatedSuccessfully:"Item updated successfully",itemDeletedSuccessfully:"Item deleted successfully",createItemFailed:"Failed to create item: {error}",updateItemFailed:"Failed to update item: {error}",deleteItemFailed:"Failed to delete item: {error}"};function qK(e){Object.assign(xL,e)}function rd(e,t){const o=xL[e];return typeof o=="function"?o(t??{}):typeof o=="string"&&t?o.replace(/\{(\w+)\}/g,(a,n)=>String(t[n]??"")):o??e}function VK(e,t,o){const a=[];if(e?.trim()){const n=e.trim(),i=o.map(l=>({field:[String(l)],operator:"contains",value:n}));i.length===1&&i[0]?a.push(i[0]):i.length>1&&a.push({operator:"or",conditions:i})}if(t&&t.length>0)for(const n of t)a.push({field:[n.column],operator:"eq",value:n.value});if(a.length!==0)return a.length===1?a[0]:{operator:"and",conditions:a}}function HK(e,t,o){const a=e??o,n=t??"desc";return[{field:[String(a)],direction:n}]}function id(e){if(!e||typeof e!="object")throw new Error("Invalid result");if("isError"in e&&e.isError)throw new Error("content"in e&&Array.isArray(e.content)&&e.content[0]?.type==="text"?e.content[0].text:"Unknown error");if("structuredContent"in e)return e.structuredContent;throw new Error("No structured content found")}function GK(e,t,o,a){const n=t.toUpperCase(),i=`COLLECTION_${n}_GET`;return{queryKey:On.collectionItem(a,e,"",n,o??""),queryFn:async()=>{if(!o||!a)return{item:null};const l=await a.callTool({name:i,arguments:{id:o}});return id(l)},staleTime:6e4}}function Dfe(e,t,o,a){const n=Ie.c(5);let i;n[0]!==a||n[1]!==t||n[2]!==o||n[3]!==e?(i=GK(e,t,o,a),n[0]=a,n[1]=t,n[2]=o,n[3]=e,n[4]=i):i=n[4];const{data:l}=Nl(i);return l?.item??null}const KK={structuredContent:{items:[]},isError:!1};function EL(e,t,o,a={}){const{searchTerm:n,filters:i,sortKey:l,sortDirection:c,searchFields:u=["title","description"],defaultSortKey:p="updated_at",pageSize:g=100,additionalToolArgs:m}=a,f=t.toUpperCase(),v=`COLLECTION_${f}_LIST`,b=VK(n,i,u),S=HK(l,c,p),C={...b&&{where:b},...S&&{orderBy:S},limit:g,offset:0,...m},w=JSON.stringify(C);return{queryKey:On.collectionList(o,e,"",f,w),queryFn:async()=>o?await o.callTool({name:v,arguments:C}):KK,staleTime:3e4,retry:!1,select:E=>id(E??{})?.items??[]}}function Ofe(e,t,o,a={}){return{...EL(e,t,o,a),select:i=>{const l=id(i??{});return{items:l?.items??[],totalCount:l?.totalCount,hasMore:l?.hasMore}}}}function Ife(e,t,o,a){const n=Ie.c(7);let i;n[0]!==a?(i=a===void 0?{}:a,n[0]=a,n[1]=i):i=n[1];const l=i;let c;n[2]!==o||n[3]!==t||n[4]!==l||n[5]!==e?(c=EL(e,t,o,l),n[2]=o,n[3]=t,n[4]=l,n[5]=e,n[6]=c):c=n[6];const{data:u}=Nl(c);return u}function Mfe(e,t,o){const a=Ie.c(34),n=hv();let i;a[0]!==t?(i=t.toUpperCase(),a[0]=t,a[1]=i):i=a[1];const l=i,c=`COLLECTION_${l}_CREATE`,u=`COLLECTION_${l}_UPDATE`,p=`COLLECTION_${l}_DELETE`;let g;a[2]!==n||a[3]!==e||a[4]!==l?(g=()=>{n.invalidateQueries({predicate:N=>{const $=N.queryKey;return $[1]===e&&$[3]==="collection"&&$[4]===l}})},a[2]=n,a[3]=e,a[4]=l,a[5]=g):g=a[5];const m=g;let f;a[6]!==o||a[7]!==c?(f=async N=>{const $=await o.callTool({name:c,arguments:{data:N}});if($.isError)throw new Error(Array.isArray($.content)?$.content[0]?.text:String($.content));return id($).item},a[6]=o,a[7]=c,a[8]=f):f=a[8];let v;a[9]!==m?(v=()=>{m(),Vr.success(rd("itemCreatedSuccessfully"))},a[9]=m,a[10]=v):v=a[10];let b;a[11]!==f||a[12]!==v?(b={mutationFn:f,onSuccess:v,onError:ZK},a[11]=f,a[12]=v,a[13]=b):b=a[13];const S=lp(b);let C;a[14]!==o||a[15]!==u?(C=async N=>{const{id:$,data:F}=N,z=await o.callTool({name:u,arguments:{id:$,data:F}});return id(z).item},a[14]=o,a[15]=u,a[16]=C):C=a[16];let w;a[17]!==m?(w=()=>{m(),Vr.success(rd("itemUpdatedSuccessfully"))},a[17]=m,a[18]=w):w=a[18];let _;a[19]!==C||a[20]!==w?(_={mutationFn:C,onSuccess:w,onError:YK},a[19]=C,a[20]=w,a[21]=_):_=a[21];const E=lp(_);let k;a[22]!==o||a[23]!==p?(k=async N=>{const $=await o.callTool({name:p,arguments:{id:N}});return id($).item.id},a[22]=o,a[23]=p,a[24]=k):k=a[24];let x;a[25]!==m?(x=()=>{m(),Vr.success(rd("itemDeletedSuccessfully"))},a[25]=m,a[26]=x):x=a[26];let A;a[27]!==k||a[28]!==x?(A={mutationFn:k,onSuccess:x,onError:WK},a[27]=k,a[28]=x,a[29]=A):A=a[29];const D=lp(A);let O;return a[30]!==S||a[31]!==D||a[32]!==E?(O={create:S,update:E,delete:D},a[30]=S,a[31]=D,a[32]=E,a[33]=O):O=a[33],O}function WK(e){const t=e instanceof Error?e.message:String(e);Vr.error(rd("deleteItemFailed",{error:t}))}function YK(e){const t=e instanceof Error?e.message:String(e);Vr.error(rd("updateItemFailed",{error:t}))}function ZK(e){const t=e instanceof Error?e.message:String(e);Vr.error(rd("createItemFailed",{error:t}))}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");var Mg={exports:{}},FS={},vi={},il={},BS={},jS={},US={},NR;function Cf(){return NR||(NR=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 o extends t{constructor(_){if(super(),!e.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=o;class a extends t{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((E,k)=>`${E}${k}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((E,k)=>(k instanceof o&&(E[k.str]=(E[k.str]||0)+1),E),{})}}e._Code=a,e.nil=new a("");function n(w,..._){const E=[w[0]];let k=0;for(;k<_.length;)c(E,_[k]),E.push(w[++k]);return new a(E)}e._=n;const i=new a("+");function l(w,..._){const E=[v(w[0])];let k=0;for(;k<_.length;)E.push(i),c(E,_[k]),E.push(i,v(w[++k]));return u(E),new a(E)}e.str=l;function c(w,_){_ instanceof a?w.push(..._._items):_ instanceof o?w.push(_):w.push(m(_))}e.addCodeArg=c;function u(w){let _=1;for(;_<w.length-1;){if(w[_]===i){const E=p(w[_-1],w[_+1]);if(E!==void 0){w.splice(_-1,3,E);continue}w[_++]="+"}_++}}function p(w,_){if(_==='""')return w;if(w==='""')return _;if(typeof w=="string")return _ instanceof o||w[w.length-1]!=='"'?void 0:typeof _!="string"?`${w.slice(0,-1)}${_}"`:_[0]==='"'?w.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(w instanceof o))return`"${w}${_.slice(1)}`}function g(w,_){return _.emptyStr()?w:w.emptyStr()?_:l`${w}${_}`}e.strConcat=g;function m(w){return typeof w=="number"||typeof w=="boolean"||w===null?w:v(Array.isArray(w)?w.join(","):w)}function f(w){return new a(v(w))}e.stringify=f;function v(w){return JSON.stringify(w).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=v;function b(w){return typeof w=="string"&&e.IDENTIFIER.test(w)?new a(`.${w}`):n`[${w}]`}e.getProperty=b;function S(w){if(typeof w=="string"&&e.IDENTIFIER.test(w))return new a(`${w}`);throw new Error(`CodeGen: invalid export name: ${w}, use explicit $id name mapping`)}e.getEsmExportName=S;function C(w){return new a(w.toString())}e.regexpCode=C})(US)),US}var zS={},FR;function BR(){return FR||(FR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=Cf();class o extends Error{constructor(p){super(`CodeGen: "code" for ${p} not defined`),this.value=p.value}}var a;(function(u){u[u.Started=0]="Started",u[u.Completed=1]="Completed"})(a||(e.UsedValueState=a={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:p,parent:g}={}){this._names={},this._prefixes=p,this._parent=g}toName(p){return p instanceof t.Name?p:this.name(p)}name(p){return new t.Name(this._newName(p))}_newName(p){const g=this._names[p]||this._nameGroup(p);return`${p}${g.index++}`}_nameGroup(p){var g,m;if(!((m=(g=this._parent)===null||g===void 0?void 0:g._prefixes)===null||m===void 0)&&m.has(p)||this._prefixes&&!this._prefixes.has(p))throw new Error(`CodeGen: prefix "${p}" is not allowed in this scope`);return this._names[p]={prefix:p,index:0}}}e.Scope=n;class i extends t.Name{constructor(p,g){super(g),this.prefix=p}setValue(p,{property:g,itemIndex:m}){this.value=p,this.scopePath=(0,t._)`.${new t.Name(g)}[${m}]`}}e.ValueScopeName=i;const l=(0,t._)`\n`;class c extends n{constructor(p){super(p),this._values={},this._scope=p.scope,this.opts={...p,_n:p.lines?l:t.nil}}get(){return this._scope}name(p){return new i(p,this._newName(p))}value(p,g){var m;if(g.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(p),{prefix:v}=f,b=(m=g.key)!==null&&m!==void 0?m:g.ref;let S=this._values[v];if(S){const _=S.get(b);if(_)return _}else S=this._values[v]=new Map;S.set(b,f);const C=this._scope[v]||(this._scope[v]=[]),w=C.length;return C[w]=g.ref,f.setValue(g,{property:v,itemIndex:w}),f}getValue(p,g){const m=this._values[p];if(m)return m.get(g)}scopeRefs(p,g=this._values){return this._reduceValues(g,m=>{if(m.scopePath===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return(0,t._)`${p}${m.scopePath}`})}scopeCode(p=this._values,g,m){return this._reduceValues(p,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},g,m)}_reduceValues(p,g,m={},f){let v=t.nil;for(const b in p){const S=p[b];if(!S)continue;const C=m[b]=m[b]||new Map;S.forEach(w=>{if(C.has(w))return;C.set(w,a.Started);let _=g(w);if(_){const E=this.opts.es5?e.varKinds.var:e.varKinds.const;v=(0,t._)`${v}${E} ${w} = ${_};${this.opts._n}`}else if(_=f?.(w))v=(0,t._)`${v}${_}${this.opts._n}`;else throw new o(w);C.set(w,a.Completed)})}return v}}e.ValueScope=c})(zS)),zS}var jR;function bt(){return jR||(jR=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=Cf(),o=BR();var a=Cf();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return a.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return a.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return a.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return a.Name}});var n=BR();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(L,U){return this}}class l extends i{constructor(L,U,J){super(),this.varKind=L,this.name=U,this.rhs=J}render({es5:L,_n:U}){const J=L?o.varKinds.var:this.varKind,pe=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${pe};`+U}optimizeNames(L,U){if(L[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,L,U)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class c extends i{constructor(L,U,J){super(),this.lhs=L,this.rhs=U,this.sideEffects=J}render({_n:L}){return`${this.lhs} = ${this.rhs};`+L}optimizeNames(L,U){if(!(this.lhs instanceof t.Name&&!L[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,L,U),this}get names(){const L=this.lhs instanceof t.Name?{}:{...this.lhs.names};return j(L,this.rhs)}}class u extends c{constructor(L,U,J,pe){super(L,J,pe),this.op=U}render({_n:L}){return`${this.lhs} ${this.op}= ${this.rhs};`+L}}class p extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`${this.label}:`+L}}class g extends i{constructor(L){super(),this.label=L,this.names={}}render({_n:L}){return`break${this.label?` ${this.label}`:""};`+L}}class m extends i{constructor(L){super(),this.error=L}render({_n:L}){return`throw ${this.error};`+L}get names(){return this.error.names}}class f extends i{constructor(L){super(),this.code=L}render({_n:L}){return`${this.code};`+L}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(L,U){return this.code=K(this.code,L,U),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class v extends i{constructor(L=[]){super(),this.nodes=L}render(L){return this.nodes.reduce((U,J)=>U+J.render(L),"")}optimizeNodes(){const{nodes:L}=this;let U=L.length;for(;U--;){const J=L[U].optimizeNodes();Array.isArray(J)?L.splice(U,1,...J):J?L[U]=J:L.splice(U,1)}return L.length>0?this:void 0}optimizeNames(L,U){const{nodes:J}=this;let pe=J.length;for(;pe--;){const ge=J[pe];ge.optimizeNames(L,U)||(ne(L,ge.names),J.splice(pe,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((L,U)=>z(L,U.names),{})}}class b extends v{render(L){return"{"+L._n+super.render(L)+"}"+L._n}}class S extends v{}class C extends b{}C.kind="else";class w extends b{constructor(L,U){super(U),this.condition=L}render(L){let U=`if(${this.condition})`+super.render(L);return this.else&&(U+="else "+this.else.render(L)),U}optimizeNodes(){super.optimizeNodes();const L=this.condition;if(L===!0)return this.nodes;let U=this.else;if(U){const J=U.optimizeNodes();U=this.else=Array.isArray(J)?new C(J):J}if(U)return L===!1?U instanceof w?U:U.nodes:this.nodes.length?this:new w(H(L),U instanceof w?[U]:U.nodes);if(!(L===!1||!this.nodes.length))return this}optimizeNames(L,U){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(L,U),!!(super.optimizeNames(L,U)||this.else))return this.condition=K(this.condition,L,U),this}get names(){const L=super.names;return j(L,this.condition),this.else&&z(L,this.else.names),L}}w.kind="if";class _ extends b{}_.kind="for";class E extends _{constructor(L){super(),this.iteration=L}render(L){return`for(${this.iteration})`+super.render(L)}optimizeNames(L,U){if(super.optimizeNames(L,U))return this.iteration=K(this.iteration,L,U),this}get names(){return z(super.names,this.iteration.names)}}class k extends _{constructor(L,U,J,pe){super(),this.varKind=L,this.name=U,this.from=J,this.to=pe}render(L){const U=L.es5?o.varKinds.var:this.varKind,{name:J,from:pe,to:ge}=this;return`for(${U} ${J}=${pe}; ${J}<${ge}; ${J}++)`+super.render(L)}get names(){const L=j(super.names,this.from);return j(L,this.to)}}class x extends _{constructor(L,U,J,pe){super(),this.loop=L,this.varKind=U,this.name=J,this.iterable=pe}render(L){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(L)}optimizeNames(L,U){if(super.optimizeNames(L,U))return this.iterable=K(this.iterable,L,U),this}get names(){return z(super.names,this.iterable.names)}}class A extends b{constructor(L,U,J){super(),this.name=L,this.args=U,this.async=J}render(L){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(L)}}A.kind="func";class D extends v{render(L){return"return "+super.render(L)}}D.kind="return";class O extends b{render(L){let U="try"+super.render(L);return this.catch&&(U+=this.catch.render(L)),this.finally&&(U+=this.finally.render(L)),U}optimizeNodes(){var L,U;return super.optimizeNodes(),(L=this.catch)===null||L===void 0||L.optimizeNodes(),(U=this.finally)===null||U===void 0||U.optimizeNodes(),this}optimizeNames(L,U){var J,pe;return super.optimizeNames(L,U),(J=this.catch)===null||J===void 0||J.optimizeNames(L,U),(pe=this.finally)===null||pe===void 0||pe.optimizeNames(L,U),this}get names(){const L=super.names;return this.catch&&z(L,this.catch.names),this.finally&&z(L,this.finally.names),L}}class N extends b{constructor(L){super(),this.error=L}render(L){return`catch(${this.error})`+super.render(L)}}N.kind="catch";class $ extends b{render(L){return"finally"+super.render(L)}}$.kind="finally";class F{constructor(L,U={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...U,_n:U.lines?`
49
49
  `:""},this._extScope=L,this._scope=new o.Scope({parent:L}),this._nodes=[new S]}toString(){return this._root.render(this.opts)}name(L){return this._scope.name(L)}scopeName(L){return this._extScope.name(L)}scopeValue(L,U){const J=this._extScope.value(L,U);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(L,U){return this._extScope.getValue(L,U)}scopeRefs(L){return this._extScope.scopeRefs(L,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(L,U,J,pe){const ge=this._scope.toName(U);return J!==void 0&&pe&&(this._constants[ge.str]=J),this._leafNode(new l(L,ge,J)),ge}const(L,U,J){return this._def(o.varKinds.const,L,U,J)}let(L,U,J){return this._def(o.varKinds.let,L,U,J)}var(L,U,J){return this._def(o.varKinds.var,L,U,J)}assign(L,U,J){return this._leafNode(new c(L,U,J))}add(L,U){return this._leafNode(new u(L,e.operators.ADD,U))}code(L){return typeof L=="function"?L():L!==t.nil&&this._leafNode(new f(L)),this}object(...L){const U=["{"];for(const[J,pe]of L)U.length>1&&U.push(","),U.push(J),(J!==pe||this.opts.es5)&&(U.push(":"),(0,t.addCodeArg)(U,pe));return U.push("}"),new t._Code(U)}if(L,U,J){if(this._blockNode(new w(L)),U&&J)this.code(U).else().code(J).endIf();else if(U)this.code(U).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(L){return this._elseNode(new w(L))}else(){return this._elseNode(new C)}endIf(){return this._endBlockNode(w,C)}_for(L,U){return this._blockNode(L),U&&this.code(U).endFor(),this}for(L,U){return this._for(new E(L),U)}forRange(L,U,J,pe,ge=this.opts.es5?o.varKinds.var:o.varKinds.let){const Ce=this._scope.toName(L);return this._for(new k(ge,Ce,U,J),()=>pe(Ce))}forOf(L,U,J,pe=o.varKinds.const){const ge=this._scope.toName(L);if(this.opts.es5){const Ce=U instanceof t.Name?U:this.var("_arr",U);return this.forRange("_i",0,(0,t._)`${Ce}.length`,$e=>{this.var(ge,(0,t._)`${Ce}[${$e}]`),J(ge)})}return this._for(new x("of",pe,ge,U),()=>J(ge))}forIn(L,U,J,pe=this.opts.es5?o.varKinds.var:o.varKinds.const){if(this.opts.ownProperties)return this.forOf(L,(0,t._)`Object.keys(${U})`,J);const ge=this._scope.toName(L);return this._for(new x("in",pe,ge,U),()=>J(ge))}endFor(){return this._endBlockNode(_)}label(L){return this._leafNode(new p(L))}break(L){return this._leafNode(new g(L))}return(L){const U=new D;if(this._blockNode(U),this.code(L),U.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(D)}try(L,U,J){if(!U&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const pe=new O;if(this._blockNode(pe),this.code(L),U){const ge=this.name("e");this._currNode=pe.catch=new N(ge),U(ge)}return J&&(this._currNode=pe.finally=new $,this.code(J)),this._endBlockNode(N,$)}throw(L){return this._leafNode(new m(L))}block(L,U){return this._blockStarts.push(this._nodes.length),L&&this.code(L).endBlock(U),this}endBlock(L){const U=this._blockStarts.pop();if(U===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-U;if(J<0||L!==void 0&&J!==L)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${L} expected`);return this._nodes.length=U,this}func(L,U=t.nil,J,pe){return this._blockNode(new A(L,U,J)),pe&&this.code(pe).endFunc(),this}endFunc(){return this._endBlockNode(A)}optimize(L=1){for(;L-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(L){return this._currNode.nodes.push(L),this}_blockNode(L){this._currNode.nodes.push(L),this._nodes.push(L)}_endBlockNode(L,U){const J=this._currNode;if(J instanceof L||U&&J instanceof U)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${U?`${L.kind}/${U.kind}`:L.kind}"`)}_elseNode(L){const U=this._currNode;if(!(U instanceof w))throw new Error('CodeGen: "else" without "if"');return this._currNode=U.else=L,this}get _root(){return this._nodes[0]}get _currNode(){const L=this._nodes;return L[L.length-1]}set _currNode(L){const U=this._nodes;U[U.length-1]=L}}e.CodeGen=F;function z(q,L){for(const U in L)q[U]=(q[U]||0)+(L[U]||0);return q}function j(q,L){return L instanceof t._CodeOrName?z(q,L.names):q}function K(q,L,U){if(q instanceof t.Name)return J(q);if(!pe(q))return q;return new t._Code(q._items.reduce((ge,Ce)=>(Ce instanceof t.Name&&(Ce=J(Ce)),Ce instanceof t._Code?ge.push(...Ce._items):ge.push(Ce),ge),[]));function J(ge){const Ce=U[ge.str];return Ce===void 0||L[ge.str]!==1?ge:(delete L[ge.str],Ce)}function pe(ge){return ge instanceof t._Code&&ge._items.some(Ce=>Ce instanceof t.Name&&L[Ce.str]===1&&U[Ce.str]!==void 0)}}function ne(q,L){for(const U in L)q[U]=(q[U]||0)-(L[U]||0)}function H(q){return typeof q=="boolean"||typeof q=="number"||q===null?!q:(0,t._)`!${G(q)}`}e.not=H;const Z=M(e.operators.AND);function te(...q){return q.reduce(Z)}e.and=te;const le=M(e.operators.OR);function Q(...q){return q.reduce(le)}e.or=Q;function M(q){return(L,U)=>L===t.nil?U:U===t.nil?L:(0,t._)`${G(L)} ${q} ${G(U)}`}function G(q){return q instanceof t.Name?q:(0,t._)`(${q})`}})(jS)),jS}var ft={},UR;function Nt(){if(UR)return ft;UR=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.checkStrictMode=ft.getErrorPath=ft.Type=ft.useFunc=ft.setEvaluated=ft.evaluatedPropsToName=ft.mergeEvaluated=ft.eachItem=ft.unescapeJsonPointer=ft.escapeJsonPointer=ft.escapeFragment=ft.unescapeFragment=ft.schemaRefOrVal=ft.schemaHasRulesButRef=ft.schemaHasRules=ft.checkUnknownRules=ft.alwaysValidSchema=ft.toHash=void 0;const e=bt(),t=Cf();function o(x){const A={};for(const D of x)A[D]=!0;return A}ft.toHash=o;function a(x,A){return typeof A=="boolean"?A:Object.keys(A).length===0?!0:(n(x,A),!i(A,x.self.RULES.all))}ft.alwaysValidSchema=a;function n(x,A=x.schema){const{opts:D,self:O}=x;if(!D.strictSchema||typeof A=="boolean")return;const N=O.RULES.keywords;for(const $ in A)N[$]||k(x,`unknown keyword: "${$}"`)}ft.checkUnknownRules=n;function i(x,A){if(typeof x=="boolean")return!x;for(const D in x)if(A[D])return!0;return!1}ft.schemaHasRules=i;function l(x,A){if(typeof x=="boolean")return!x;for(const D in x)if(D!=="$ref"&&A.all[D])return!0;return!1}ft.schemaHasRulesButRef=l;function c({topSchemaRef:x,schemaPath:A},D,O,N){if(!N){if(typeof D=="number"||typeof D=="boolean")return D;if(typeof D=="string")return(0,e._)`${D}`}return(0,e._)`${x}${A}${(0,e.getProperty)(O)}`}ft.schemaRefOrVal=c;function u(x){return m(decodeURIComponent(x))}ft.unescapeFragment=u;function p(x){return encodeURIComponent(g(x))}ft.escapeFragment=p;function g(x){return typeof x=="number"?`${x}`:x.replace(/~/g,"~0").replace(/\//g,"~1")}ft.escapeJsonPointer=g;function m(x){return x.replace(/~1/g,"/").replace(/~0/g,"~")}ft.unescapeJsonPointer=m;function f(x,A){if(Array.isArray(x))for(const D of x)A(D);else A(x)}ft.eachItem=f;function v({mergeNames:x,mergeToName:A,mergeValues:D,resultToName:O}){return(N,$,F,z)=>{const j=F===void 0?$:F instanceof e.Name?($ instanceof e.Name?x(N,$,F):A(N,$,F),F):$ instanceof e.Name?(A(N,F,$),$):D($,F);return z===e.Name&&!(j instanceof e.Name)?O(N,j):j}}ft.mergeEvaluated={props:v({mergeNames:(x,A,D)=>x.if((0,e._)`${D} !== true && ${A} !== undefined`,()=>{x.if((0,e._)`${A} === true`,()=>x.assign(D,!0),()=>x.assign(D,(0,e._)`${D} || {}`).code((0,e._)`Object.assign(${D}, ${A})`))}),mergeToName:(x,A,D)=>x.if((0,e._)`${D} !== true`,()=>{A===!0?x.assign(D,!0):(x.assign(D,(0,e._)`${D} || {}`),S(x,D,A))}),mergeValues:(x,A)=>x===!0?!0:{...x,...A},resultToName:b}),items:v({mergeNames:(x,A,D)=>x.if((0,e._)`${D} !== true && ${A} !== undefined`,()=>x.assign(D,(0,e._)`${A} === true ? true : ${D} > ${A} ? ${D} : ${A}`)),mergeToName:(x,A,D)=>x.if((0,e._)`${D} !== true`,()=>x.assign(D,A===!0?!0:(0,e._)`${D} > ${A} ? ${D} : ${A}`)),mergeValues:(x,A)=>x===!0?!0:Math.max(x,A),resultToName:(x,A)=>x.var("items",A)})};function b(x,A){if(A===!0)return x.var("props",!0);const D=x.var("props",(0,e._)`{}`);return A!==void 0&&S(x,D,A),D}ft.evaluatedPropsToName=b;function S(x,A,D){Object.keys(D).forEach(O=>x.assign((0,e._)`${A}${(0,e.getProperty)(O)}`,!0))}ft.setEvaluated=S;const C={};function w(x,A){return x.scopeValue("func",{ref:A,code:C[A.code]||(C[A.code]=new t._Code(A.code))})}ft.useFunc=w;var _;(function(x){x[x.Num=0]="Num",x[x.Str=1]="Str"})(_||(ft.Type=_={}));function E(x,A,D){if(x instanceof e.Name){const O=A===_.Num;return D?O?(0,e._)`"[" + ${x} + "]"`:(0,e._)`"['" + ${x} + "']"`:O?(0,e._)`"/" + ${x}`:(0,e._)`"/" + ${x}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return D?(0,e.getProperty)(x).toString():"/"+g(x)}ft.getErrorPath=E;function k(x,A,D=x.opts.strictSchema){if(D){if(A=`strict mode: ${A}`,D===!0)throw new Error(A);x.self.logger.warn(A)}}return ft.checkStrictMode=k,ft}var Lg={},zR;function js(){if(zR)return Lg;zR=1,Object.defineProperty(Lg,"__esModule",{value:!0});const e=bt(),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 Lg.default=t,Lg}var $R;function xv(){return $R||($R=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=bt(),o=Nt(),a=js();e.keywordError={message:({keyword:C})=>(0,t.str)`must pass "${C}" keyword validation`},e.keyword$DataError={message:({keyword:C,schemaType:w})=>w?(0,t.str)`"${C}" keyword must be ${w} ($data)`:(0,t.str)`"${C}" keyword is invalid ($data)`};function n(C,w=e.keywordError,_,E){const{it:k}=C,{gen:x,compositeRule:A,allErrors:D}=k,O=m(C,w,_);E??(A||D)?u(x,O):p(k,(0,t._)`[${O}]`)}e.reportError=n;function i(C,w=e.keywordError,_){const{it:E}=C,{gen:k,compositeRule:x,allErrors:A}=E,D=m(C,w,_);u(k,D),x||A||p(E,a.default.vErrors)}e.reportExtraError=i;function l(C,w){C.assign(a.default.errors,w),C.if((0,t._)`${a.default.vErrors} !== null`,()=>C.if(w,()=>C.assign((0,t._)`${a.default.vErrors}.length`,w),()=>C.assign(a.default.vErrors,null)))}e.resetErrorsCount=l;function c({gen:C,keyword:w,schemaValue:_,data:E,errsCount:k,it:x}){if(k===void 0)throw new Error("ajv implementation error");const A=C.name("err");C.forRange("i",k,a.default.errors,D=>{C.const(A,(0,t._)`${a.default.vErrors}[${D}]`),C.if((0,t._)`${A}.instancePath === undefined`,()=>C.assign((0,t._)`${A}.instancePath`,(0,t.strConcat)(a.default.instancePath,x.errorPath))),C.assign((0,t._)`${A}.schemaPath`,(0,t.str)`${x.errSchemaPath}/${w}`),x.opts.verbose&&(C.assign((0,t._)`${A}.schema`,_),C.assign((0,t._)`${A}.data`,E))})}e.extendErrors=c;function u(C,w){const _=C.const("err",w);C.if((0,t._)`${a.default.vErrors} === null`,()=>C.assign(a.default.vErrors,(0,t._)`[${_}]`),(0,t._)`${a.default.vErrors}.push(${_})`),C.code((0,t._)`${a.default.errors}++`)}function p(C,w){const{gen:_,validateName:E,schemaEnv:k}=C;k.$async?_.throw((0,t._)`new ${C.ValidationError}(${w})`):(_.assign((0,t._)`${E}.errors`,w),_.return(!1))}const g={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 m(C,w,_){const{createErrors:E}=C.it;return E===!1?(0,t._)`{}`:f(C,w,_)}function f(C,w,_={}){const{gen:E,it:k}=C,x=[v(k,_),b(C,_)];return S(C,w,x),E.object(...x)}function v({errorPath:C},{instancePath:w}){const _=w?(0,t.str)`${C}${(0,o.getErrorPath)(w,o.Type.Str)}`:C;return[a.default.instancePath,(0,t.strConcat)(a.default.instancePath,_)]}function b({keyword:C,it:{errSchemaPath:w}},{schemaPath:_,parentSchema:E}){let k=E?w:(0,t.str)`${w}/${C}`;return _&&(k=(0,t.str)`${k}${(0,o.getErrorPath)(_,o.Type.Str)}`),[g.schemaPath,k]}function S(C,{params:w,message:_},E){const{keyword:k,data:x,schemaValue:A,it:D}=C,{opts:O,propertyName:N,topSchemaRef:$,schemaPath:F}=D;E.push([g.keyword,k],[g.params,typeof w=="function"?w(C):w||(0,t._)`{}`]),O.messages&&E.push([g.message,typeof _=="function"?_(C):_]),O.verbose&&E.push([g.schema,A],[g.parentSchema,(0,t._)`${$}${F}`],[a.default.data,x]),N&&E.push([g.propertyName,N])}})(BS)),BS}var qR;function QK(){if(qR)return il;qR=1,Object.defineProperty(il,"__esModule",{value:!0}),il.boolOrEmptySchema=il.topBoolOrEmptySchema=void 0;const e=xv(),t=bt(),o=js(),a={message:"boolean schema is false"};function n(c){const{gen:u,schema:p,validateName:g}=c;p===!1?l(c,!1):typeof p=="object"&&p.$async===!0?u.return(o.default.data):(u.assign((0,t._)`${g}.errors`,null),u.return(!0))}il.topBoolOrEmptySchema=n;function i(c,u){const{gen:p,schema:g}=c;g===!1?(p.var(u,!1),l(c)):p.var(u,!0)}il.boolOrEmptySchema=i;function l(c,u){const{gen:p,data:g}=c,m={gen:p,keyword:"false schema",data:g,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,e.reportError)(m,a,void 0,u)}return il}var ya={},sl={},VR;function RL(){if(VR)return sl;VR=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.getRules=sl.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function o(n){return typeof n=="string"&&t.has(n)}sl.isJSONType=o;function a(){const n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}return sl.getRules=a,sl}var bi={},HR;function AL(){if(HR)return bi;HR=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.shouldUseRule=bi.shouldUseGroup=bi.schemaHasRulesForType=void 0;function e({schema:a,self:n},i){const l=n.RULES.types[i];return l&&l!==!0&&t(a,l)}bi.schemaHasRulesForType=e;function t(a,n){return n.rules.some(i=>o(a,i))}bi.shouldUseGroup=t;function o(a,n){var i;return a[n.keyword]!==void 0||((i=n.definition.implements)===null||i===void 0?void 0:i.some(l=>a[l]!==void 0))}return bi.shouldUseRule=o,bi}var GR;function Pf(){if(GR)return ya;GR=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.reportTypeError=ya.checkDataTypes=ya.checkDataType=ya.coerceAndCheckDataType=ya.getJSONTypes=ya.getSchemaTypes=ya.DataType=void 0;const e=RL(),t=AL(),o=xv(),a=bt(),n=Nt();var i;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(i||(ya.DataType=i={}));function l(_){const E=c(_.type);if(E.includes("null")){if(_.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!E.length&&_.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');_.nullable===!0&&E.push("null")}return E}ya.getSchemaTypes=l;function c(_){const E=Array.isArray(_)?_:_?[_]:[];if(E.every(e.isJSONType))return E;throw new Error("type must be JSONType or JSONType[]: "+E.join(","))}ya.getJSONTypes=c;function u(_,E){const{gen:k,data:x,opts:A}=_,D=g(E,A.coerceTypes),O=E.length>0&&!(D.length===0&&E.length===1&&(0,t.schemaHasRulesForType)(_,E[0]));if(O){const N=b(E,x,A.strictNumbers,i.Wrong);k.if(N,()=>{D.length?m(_,E,D):C(_)})}return O}ya.coerceAndCheckDataType=u;const p=new Set(["string","number","integer","boolean","null"]);function g(_,E){return E?_.filter(k=>p.has(k)||E==="array"&&k==="array"):[]}function m(_,E,k){const{gen:x,data:A,opts:D}=_,O=x.let("dataType",(0,a._)`typeof ${A}`),N=x.let("coerced",(0,a._)`undefined`);D.coerceTypes==="array"&&x.if((0,a._)`${O} == 'object' && Array.isArray(${A}) && ${A}.length == 1`,()=>x.assign(A,(0,a._)`${A}[0]`).assign(O,(0,a._)`typeof ${A}`).if(b(E,A,D.strictNumbers),()=>x.assign(N,A))),x.if((0,a._)`${N} !== undefined`);for(const F of k)(p.has(F)||F==="array"&&D.coerceTypes==="array")&&$(F);x.else(),C(_),x.endIf(),x.if((0,a._)`${N} !== undefined`,()=>{x.assign(A,N),f(_,N)});function $(F){switch(F){case"string":x.elseIf((0,a._)`${O} == "number" || ${O} == "boolean"`).assign(N,(0,a._)`"" + ${A}`).elseIf((0,a._)`${A} === null`).assign(N,(0,a._)`""`);return;case"number":x.elseIf((0,a._)`${O} == "boolean" || ${A} === null
50
50
  || (${O} == "string" && ${A} && ${A} == +${A})`).assign(N,(0,a._)`+${A}`);return;case"integer":x.elseIf((0,a._)`${O} === "boolean" || ${A} === null
51
51
  || (${O} === "string" && ${A} && ${A} == +${A} && !(${A} % 1))`).assign(N,(0,a._)`+${A}`);return;case"boolean":x.elseIf((0,a._)`${A} === "false" || ${A} === 0 || ${A} === null`).assign(N,!1).elseIf((0,a._)`${A} === "true" || ${A} === 1`).assign(N,!0);return;case"null":x.elseIf((0,a._)`${A} === "" || ${A} === 0 || ${A} === false`),x.assign(N,null);return;case"array":x.elseIf((0,a._)`${O} === "string" || ${O} === "number"
52
52
  || ${O} === "boolean" || ${A} === null`).assign(N,(0,a._)`[${A}]`)}}}function f({gen:_,parentData:E,parentDataProperty:k},x){_.if((0,a._)`${E} !== undefined`,()=>_.assign((0,a._)`${E}[${k}]`,x))}function v(_,E,k,x=i.Correct){const A=x===i.Correct?a.operators.EQ:a.operators.NEQ;let D;switch(_){case"null":return(0,a._)`${E} ${A} null`;case"array":D=(0,a._)`Array.isArray(${E})`;break;case"object":D=(0,a._)`${E} && typeof ${E} == "object" && !Array.isArray(${E})`;break;case"integer":D=O((0,a._)`!(${E} % 1) && !isNaN(${E})`);break;case"number":D=O();break;default:return(0,a._)`typeof ${E} ${A} ${_}`}return x===i.Correct?D:(0,a.not)(D);function O(N=a.nil){return(0,a.and)((0,a._)`typeof ${E} == "number"`,N,k?(0,a._)`isFinite(${E})`:a.nil)}}ya.checkDataType=v;function b(_,E,k,x){if(_.length===1)return v(_[0],E,k,x);let A;const D=(0,n.toHash)(_);if(D.array&&D.object){const O=(0,a._)`typeof ${E} != "object"`;A=D.null?O:(0,a._)`!${E} || ${O}`,delete D.null,delete D.array,delete D.object}else A=a.nil;D.number&&delete D.integer;for(const O in D)A=(0,a.and)(A,v(O,E,k,x));return A}ya.checkDataTypes=b;const S={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:E})=>typeof _=="string"?(0,a._)`{type: ${_}}`:(0,a._)`{type: ${E}}`};function C(_){const E=w(_);(0,o.reportError)(E,S)}ya.reportTypeError=C;function w(_){const{gen:E,data:k,schema:x}=_,A=(0,n.schemaRefOrVal)(_,x,"type");return{gen:E,keyword:"type",data:k,schema:x.type,schemaCode:A,schemaValue:A,parentSchema:x,params:{},it:_}}return ya}var Du={},KR;function JK(){if(KR)return Du;KR=1,Object.defineProperty(Du,"__esModule",{value:!0}),Du.assignDefaults=void 0;const e=bt(),t=Nt();function o(n,i){const{properties:l,items:c}=n.schema;if(i==="object"&&l)for(const u in l)a(n,u,l[u].default);else i==="array"&&Array.isArray(c)&&c.forEach((u,p)=>a(n,p,u.default))}Du.assignDefaults=o;function a(n,i,l){const{gen:c,compositeRule:u,data:p,opts:g}=n;if(l===void 0)return;const m=(0,e._)`${p}${(0,e.getProperty)(i)}`;if(u){(0,t.checkStrictMode)(n,`default is ignored for: ${m}`);return}let f=(0,e._)`${m} === undefined`;g.useDefaults==="empty"&&(f=(0,e._)`${f} || ${m} === null || ${m} === ""`),c.if(f,(0,e._)`${m} = ${(0,e.stringify)(l)}`)}return Du}var dr={},Wt={},WR;function kr(){if(WR)return Wt;WR=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.validateUnion=Wt.validateArray=Wt.usePattern=Wt.callValidateCode=Wt.schemaProperties=Wt.allSchemaProperties=Wt.noPropertyInData=Wt.propertyInData=Wt.isOwnProperty=Wt.hasPropFunc=Wt.reportMissingProp=Wt.checkMissingProp=Wt.checkReportMissingProp=void 0;const e=bt(),t=Nt(),o=js(),a=Nt();function n(_,E){const{gen:k,data:x,it:A}=_;k.if(g(k,x,E,A.opts.ownProperties),()=>{_.setParams({missingProperty:(0,e._)`${E}`},!0),_.error()})}Wt.checkReportMissingProp=n;function i({gen:_,data:E,it:{opts:k}},x,A){return(0,e.or)(...x.map(D=>(0,e.and)(g(_,E,D,k.ownProperties),(0,e._)`${A} = ${D}`)))}Wt.checkMissingProp=i;function l(_,E){_.setParams({missingProperty:E},!0),_.error()}Wt.reportMissingProp=l;function c(_){return _.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Wt.hasPropFunc=c;function u(_,E,k){return(0,e._)`${c(_)}.call(${E}, ${k})`}Wt.isOwnProperty=u;function p(_,E,k,x){const A=(0,e._)`${E}${(0,e.getProperty)(k)} !== undefined`;return x?(0,e._)`${A} && ${u(_,E,k)}`:A}Wt.propertyInData=p;function g(_,E,k,x){const A=(0,e._)`${E}${(0,e.getProperty)(k)} === undefined`;return x?(0,e.or)(A,(0,e.not)(u(_,E,k))):A}Wt.noPropertyInData=g;function m(_){return _?Object.keys(_).filter(E=>E!=="__proto__"):[]}Wt.allSchemaProperties=m;function f(_,E){return m(E).filter(k=>!(0,t.alwaysValidSchema)(_,E[k]))}Wt.schemaProperties=f;function v({schemaCode:_,data:E,it:{gen:k,topSchemaRef:x,schemaPath:A,errorPath:D},it:O},N,$,F){const z=F?(0,e._)`${_}, ${E}, ${x}${A}`:E,j=[[o.default.instancePath,(0,e.strConcat)(o.default.instancePath,D)],[o.default.parentData,O.parentData],[o.default.parentDataProperty,O.parentDataProperty],[o.default.rootData,o.default.rootData]];O.opts.dynamicRef&&j.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const K=(0,e._)`${z}, ${k.object(...j)}`;return $!==e.nil?(0,e._)`${N}.call(${$}, ${K})`:(0,e._)`${N}(${K})`}Wt.callValidateCode=v;const b=(0,e._)`new RegExp`;function S({gen:_,it:{opts:E}},k){const x=E.unicodeRegExp?"u":"",{regExp:A}=E.code,D=A(k,x);return _.scopeValue("pattern",{key:D.toString(),ref:D,code:(0,e._)`${A.code==="new RegExp"?b:(0,a.useFunc)(_,A)}(${k}, ${x})`})}Wt.usePattern=S;function C(_){const{gen:E,data:k,keyword:x,it:A}=_,D=E.name("valid");if(A.allErrors){const N=E.let("valid",!0);return O(()=>E.assign(N,!1)),N}return E.var(D,!0),O(()=>E.break()),D;function O(N){const $=E.const("len",(0,e._)`${k}.length`);E.forRange("i",0,$,F=>{_.subschema({keyword:x,dataProp:F,dataPropType:t.Type.Num},D),E.if((0,e.not)(D),N)})}}Wt.validateArray=C;function w(_){const{gen:E,schema:k,keyword:x,it:A}=_;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some($=>(0,t.alwaysValidSchema)(A,$))&&!A.opts.unevaluated)return;const O=E.let("valid",!1),N=E.name("_valid");E.block(()=>k.forEach(($,F)=>{const z=_.subschema({keyword:x,schemaProp:F,compositeRule:!0},N);E.assign(O,(0,e._)`${O} || ${N}`),_.mergeValidEvaluated(z,N)||E.if((0,e.not)(O))})),_.result(O,()=>_.reset(),()=>_.error(!0))}return Wt.validateUnion=w,Wt}var YR;function XK(){if(YR)return dr;YR=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.validateKeywordUsage=dr.validSchemaType=dr.funcKeywordCode=dr.macroKeywordCode=void 0;const e=bt(),t=js(),o=kr(),a=xv();function n(f,v){const{gen:b,keyword:S,schema:C,parentSchema:w,it:_}=f,E=v.macro.call(_.self,C,w,_),k=p(b,S,E);_.opts.validateSchema!==!1&&_.self.validateSchema(E,!0);const x=b.name("valid");f.subschema({schema:E,schemaPath:e.nil,errSchemaPath:`${_.errSchemaPath}/${S}`,topSchemaRef:k,compositeRule:!0},x),f.pass(x,()=>f.error(!0))}dr.macroKeywordCode=n;function i(f,v){var b;const{gen:S,keyword:C,schema:w,parentSchema:_,$data:E,it:k}=f;u(k,v);const x=!E&&v.compile?v.compile.call(k.self,w,_,k):v.validate,A=p(S,C,x),D=S.let("valid");f.block$data(D,O),f.ok((b=v.valid)!==null&&b!==void 0?b:D);function O(){if(v.errors===!1)F(),v.modifying&&l(f),z(()=>f.error());else{const j=v.async?N():$();v.modifying&&l(f),z(()=>c(f,j))}}function N(){const j=S.let("ruleErrs",null);return S.try(()=>F((0,e._)`await `),K=>S.assign(D,!1).if((0,e._)`${K} instanceof ${k.ValidationError}`,()=>S.assign(j,(0,e._)`${K}.errors`),()=>S.throw(K))),j}function $(){const j=(0,e._)`${A}.errors`;return S.assign(j,null),F(e.nil),j}function F(j=v.async?(0,e._)`await `:e.nil){const K=k.opts.passContext?t.default.this:t.default.self,ne=!("compile"in v&&!E||v.schema===!1);S.assign(D,(0,e._)`${j}${(0,o.callValidateCode)(f,A,K,ne)}`,v.modifying)}function z(j){var K;S.if((0,e.not)((K=v.valid)!==null&&K!==void 0?K:D),j)}}dr.funcKeywordCode=i;function l(f){const{gen:v,data:b,it:S}=f;v.if(S.parentData,()=>v.assign(b,(0,e._)`${S.parentData}[${S.parentDataProperty}]`))}function c(f,v){const{gen:b}=f;b.if((0,e._)`Array.isArray(${v})`,()=>{b.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${v} : ${t.default.vErrors}.concat(${v})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,a.extendErrors)(f)},()=>f.error())}function u({schemaEnv:f},v){if(v.async&&!f.$async)throw new Error("async keyword in sync schema")}function p(f,v,b){if(b===void 0)throw new Error(`keyword "${v}" failed to compile`);return f.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function g(f,v,b=!1){return!v.length||v.some(S=>S==="array"?Array.isArray(f):S==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==S||b&&typeof f>"u")}dr.validSchemaType=g;function m({schema:f,opts:v,self:b,errSchemaPath:S},C,w){if(Array.isArray(C.keyword)?!C.keyword.includes(w):C.keyword!==w)throw new Error("ajv implementation error");const _=C.dependencies;if(_?.some(E=>!Object.prototype.hasOwnProperty.call(f,E)))throw new Error(`parent schema must have dependencies of ${w}: ${_.join(",")}`);if(C.validateSchema&&!C.validateSchema(f[w])){const k=`keyword "${w}" value is invalid at path "${S}": `+b.errorsText(C.validateSchema.errors);if(v.validateSchema==="log")b.logger.error(k);else throw new Error(k)}}return dr.validateKeywordUsage=m,dr}var yi={},ZR;function eW(){if(ZR)return yi;ZR=1,Object.defineProperty(yi,"__esModule",{value:!0}),yi.extendSubschemaMode=yi.extendSubschemaData=yi.getSubschema=void 0;const e=bt(),t=Nt();function o(i,{keyword:l,schemaProp:c,schema:u,schemaPath:p,errSchemaPath:g,topSchemaRef:m}){if(l!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const f=i.schema[l];return c===void 0?{schema:f,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${i.errSchemaPath}/${l}`}:{schema:f[c],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(c)}`,errSchemaPath:`${i.errSchemaPath}/${l}/${(0,t.escapeFragment)(c)}`}}if(u!==void 0){if(p===void 0||g===void 0||m===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:p,topSchemaRef:m,errSchemaPath:g}}throw new Error('either "keyword" or "schema" must be passed')}yi.getSubschema=o;function a(i,l,{dataProp:c,dataPropType:u,data:p,dataTypes:g,propertyName:m}){if(p!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:f}=l;if(c!==void 0){const{errorPath:b,dataPathArr:S,opts:C}=l,w=f.let("data",(0,e._)`${l.data}${(0,e.getProperty)(c)}`,!0);v(w),i.errorPath=(0,e.str)`${b}${(0,t.getErrorPath)(c,u,C.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${c}`,i.dataPathArr=[...S,i.parentDataProperty]}if(p!==void 0){const b=p instanceof e.Name?p:f.let("data",p,!0);v(b),m!==void 0&&(i.propertyName=m)}g&&(i.dataTypes=g);function v(b){i.data=b,i.dataLevel=l.dataLevel+1,i.dataTypes=[],l.definedProperties=new Set,i.parentData=l.data,i.dataNames=[...l.dataNames,b]}}yi.extendSubschemaData=a;function n(i,{jtdDiscriminator:l,jtdMetadata:c,compositeRule:u,createErrors:p,allErrors:g}){u!==void 0&&(i.compositeRule=u),p!==void 0&&(i.createErrors=p),g!==void 0&&(i.allErrors=g),i.jtdDiscriminator=l,i.jtdMetadata=c}return yi.extendSubschemaMode=n,yi}var $a={},$S,QR;function DL(){return QR||(QR=1,$S=function e(t,o){if(t===o)return!0;if(t&&o&&typeof t=="object"&&typeof o=="object"){if(t.constructor!==o.constructor)return!1;var a,n,i;if(Array.isArray(t)){if(a=t.length,a!=o.length)return!1;for(n=a;n--!==0;)if(!e(t[n],o[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===o.source&&t.flags===o.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===o.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===o.toString();if(i=Object.keys(t),a=i.length,a!==Object.keys(o).length)return!1;for(n=a;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,i[n]))return!1;for(n=a;n--!==0;){var l=i[n];if(!e(t[l],o[l]))return!1}return!0}return t!==t&&o!==o}),$S}var qS={exports:{}},JR;function tW(){if(JR)return qS.exports;JR=1;var e=qS.exports=function(a,n,i){typeof n=="function"&&(i=n,n={}),i=n.cb||i;var l=typeof i=="function"?i:i.pre||function(){},c=i.post||function(){};t(n,l,c,a,"",a)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(a,n,i,l,c,u,p,g,m,f){if(l&&typeof l=="object"&&!Array.isArray(l)){n(l,c,u,p,g,m,f);for(var v in l){var b=l[v];if(Array.isArray(b)){if(v in e.arrayKeywords)for(var S=0;S<b.length;S++)t(a,n,i,b[S],c+"/"+v+"/"+S,u,c,v,l,S)}else if(v in e.propsKeywords){if(b&&typeof b=="object")for(var C in b)t(a,n,i,b[C],c+"/"+v+"/"+o(C),u,c,v,l,C)}else(v in e.keywords||a.allKeys&&!(v in e.skipKeywords))&&t(a,n,i,b,c+"/"+v,u,c,v,l)}i(l,c,u,p,g,m,f)}}function o(a){return a.replace(/~/g,"~0").replace(/\//g,"~1")}return qS.exports}var XR;function Ev(){if(XR)return $a;XR=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.getSchemaRefs=$a.resolveUrl=$a.normalizeId=$a._getFullPath=$a.getFullPath=$a.inlineRef=void 0;const e=Nt(),t=DL(),o=tW(),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function n(S,C=!0){return typeof S=="boolean"?!0:C===!0?!l(S):C?c(S)<=C:!1}$a.inlineRef=n;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(S){for(const C in S){if(i.has(C))return!0;const w=S[C];if(Array.isArray(w)&&w.some(l)||typeof w=="object"&&l(w))return!0}return!1}function c(S){let C=0;for(const w in S){if(w==="$ref")return 1/0;if(C++,!a.has(w)&&(typeof S[w]=="object"&&(0,e.eachItem)(S[w],_=>C+=c(_)),C===1/0))return 1/0}return C}function u(S,C="",w){w!==!1&&(C=m(C));const _=S.parse(C);return p(S,_)}$a.getFullPath=u;function p(S,C){return S.serialize(C).split("#")[0]+"#"}$a._getFullPath=p;const g=/#\/?$/;function m(S){return S?S.replace(g,""):""}$a.normalizeId=m;function f(S,C,w){return w=m(w),S.resolve(C,w)}$a.resolveUrl=f;const v=/^[a-z_][-a-z0-9._]*$/i;function b(S,C){if(typeof S=="boolean")return{};const{schemaId:w,uriResolver:_}=this.opts,E=m(S[w]||C),k={"":E},x=u(_,E,!1),A={},D=new Set;return o(S,{allKeys:!0},($,F,z,j)=>{if(j===void 0)return;const K=x+F;let ne=k[j];typeof $[w]=="string"&&(ne=H.call(this,$[w])),Z.call(this,$.$anchor),Z.call(this,$.$dynamicAnchor),k[F]=ne;function H(te){const le=this.opts.uriResolver.resolve;if(te=m(ne?le(ne,te):te),D.has(te))throw N(te);D.add(te);let Q=this.refs[te];return typeof Q=="string"&&(Q=this.refs[Q]),typeof Q=="object"?O($,Q.schema,te):te!==m(K)&&(te[0]==="#"?(O($,A[te],te),A[te]=$):this.refs[te]=K),te}function Z(te){if(typeof te=="string"){if(!v.test(te))throw new Error(`invalid anchor "${te}"`);H.call(this,`#${te}`)}}}),A;function O($,F,z){if(F!==void 0&&!t($,F))throw N(z)}function N($){return new Error(`reference "${$}" resolves to more than one schema`)}}return $a.getSchemaRefs=b,$a}var eA;function Rv(){if(eA)return vi;eA=1,Object.defineProperty(vi,"__esModule",{value:!0}),vi.getData=vi.KeywordCxt=vi.validateFunctionCode=void 0;const e=QK(),t=Pf(),o=AL(),a=Pf(),n=JK(),i=XK(),l=eW(),c=bt(),u=js(),p=Ev(),g=Nt(),m=xv();function f(Y){if(x(Y)&&(D(Y),k(Y))){C(Y);return}v(Y,()=>(0,e.topBoolOrEmptySchema)(Y))}vi.validateFunctionCode=f;function v({gen:Y,validateName:ae,schema:ve,schemaEnv:ie,opts:Te},ke){Te.code.es5?Y.func(ae,(0,c._)`${u.default.data}, ${u.default.valCxt}`,ie.$async,()=>{Y.code((0,c._)`"use strict"; ${_(ve,Te)}`),S(Y,Te),Y.code(ke)}):Y.func(ae,(0,c._)`${u.default.data}, ${b(Te)}`,ie.$async,()=>Y.code(_(ve,Te)).code(ke))}function b(Y){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${Y.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function S(Y,ae){Y.if(u.default.valCxt,()=>{Y.var(u.default.instancePath,(0,c._)`${u.default.valCxt}.${u.default.instancePath}`),Y.var(u.default.parentData,(0,c._)`${u.default.valCxt}.${u.default.parentData}`),Y.var(u.default.parentDataProperty,(0,c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),Y.var(u.default.rootData,(0,c._)`${u.default.valCxt}.${u.default.rootData}`),ae.dynamicRef&&Y.var(u.default.dynamicAnchors,(0,c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{Y.var(u.default.instancePath,(0,c._)`""`),Y.var(u.default.parentData,(0,c._)`undefined`),Y.var(u.default.parentDataProperty,(0,c._)`undefined`),Y.var(u.default.rootData,u.default.data),ae.dynamicRef&&Y.var(u.default.dynamicAnchors,(0,c._)`{}`)})}function C(Y){const{schema:ae,opts:ve,gen:ie}=Y;v(Y,()=>{ve.$comment&&ae.$comment&&j(Y),$(Y),ie.let(u.default.vErrors,null),ie.let(u.default.errors,0),ve.unevaluated&&w(Y),O(Y),K(Y)})}function w(Y){const{gen:ae,validateName:ve}=Y;Y.evaluated=ae.const("evaluated",(0,c._)`${ve}.evaluated`),ae.if((0,c._)`${Y.evaluated}.dynamicProps`,()=>ae.assign((0,c._)`${Y.evaluated}.props`,(0,c._)`undefined`)),ae.if((0,c._)`${Y.evaluated}.dynamicItems`,()=>ae.assign((0,c._)`${Y.evaluated}.items`,(0,c._)`undefined`))}function _(Y,ae){const ve=typeof Y=="object"&&Y[ae.schemaId];return ve&&(ae.code.source||ae.code.process)?(0,c._)`/*# sourceURL=${ve} */`:c.nil}function E(Y,ae){if(x(Y)&&(D(Y),k(Y))){A(Y,ae);return}(0,e.boolOrEmptySchema)(Y,ae)}function k({schema:Y,self:ae}){if(typeof Y=="boolean")return!Y;for(const ve in Y)if(ae.RULES.all[ve])return!0;return!1}function x(Y){return typeof Y.schema!="boolean"}function A(Y,ae){const{schema:ve,gen:ie,opts:Te}=Y;Te.$comment&&ve.$comment&&j(Y),F(Y),z(Y);const ke=ie.const("_errs",u.default.errors);O(Y,ke),ie.var(ae,(0,c._)`${ke} === ${u.default.errors}`)}function D(Y){(0,g.checkUnknownRules)(Y),N(Y)}function O(Y,ae){if(Y.opts.jtd)return H(Y,[],!1,ae);const ve=(0,t.getSchemaTypes)(Y.schema),ie=(0,t.coerceAndCheckDataType)(Y,ve);H(Y,ve,!ie,ae)}function N(Y){const{schema:ae,errSchemaPath:ve,opts:ie,self:Te}=Y;ae.$ref&&ie.ignoreKeywordsWithRef&&(0,g.schemaHasRulesButRef)(ae,Te.RULES)&&Te.logger.warn(`$ref: keywords ignored in schema at path "${ve}"`)}function $(Y){const{schema:ae,opts:ve}=Y;ae.default!==void 0&&ve.useDefaults&&ve.strictSchema&&(0,g.checkStrictMode)(Y,"default is ignored in the schema root")}function F(Y){const ae=Y.schema[Y.opts.schemaId];ae&&(Y.baseId=(0,p.resolveUrl)(Y.opts.uriResolver,Y.baseId,ae))}function z(Y){if(Y.schema.$async&&!Y.schemaEnv.$async)throw new Error("async schema in sync schema")}function j({gen:Y,schemaEnv:ae,schema:ve,errSchemaPath:ie,opts:Te}){const ke=ve.$comment;if(Te.$comment===!0)Y.code((0,c._)`${u.default.self}.logger.log(${ke})`);else if(typeof Te.$comment=="function"){const it=(0,c.str)`${ie}/$comment`,lt=Y.scopeValue("root",{ref:ae.root});Y.code((0,c._)`${u.default.self}.opts.$comment(${ke}, ${it}, ${lt}.schema)`)}}function K(Y){const{gen:ae,schemaEnv:ve,validateName:ie,ValidationError:Te,opts:ke}=Y;ve.$async?ae.if((0,c._)`${u.default.errors} === 0`,()=>ae.return(u.default.data),()=>ae.throw((0,c._)`new ${Te}(${u.default.vErrors})`)):(ae.assign((0,c._)`${ie}.errors`,u.default.vErrors),ke.unevaluated&&ne(Y),ae.return((0,c._)`${u.default.errors} === 0`))}function ne({gen:Y,evaluated:ae,props:ve,items:ie}){ve instanceof c.Name&&Y.assign((0,c._)`${ae}.props`,ve),ie instanceof c.Name&&Y.assign((0,c._)`${ae}.items`,ie)}function H(Y,ae,ve,ie){const{gen:Te,schema:ke,data:it,allErrors:lt,opts:Ge,self:tt}=Y,{RULES:De}=tt;if(ke.$ref&&(Ge.ignoreKeywordsWithRef||!(0,g.schemaHasRulesButRef)(ke,De))){Te.block(()=>pe(Y,"$ref",De.all.$ref.definition));return}Ge.jtd||te(Y,ae),Te.block(()=>{for(const He of De.rules)Ae(He);Ae(De.post)});function Ae(He){(0,o.shouldUseGroup)(ke,He)&&(He.type?(Te.if((0,a.checkDataType)(He.type,it,Ge.strictNumbers)),Z(Y,He),ae.length===1&&ae[0]===He.type&&ve&&(Te.else(),(0,a.reportTypeError)(Y)),Te.endIf()):Z(Y,He),lt||Te.if((0,c._)`${u.default.errors} === ${ie||0}`))}}function Z(Y,ae){const{gen:ve,schema:ie,opts:{useDefaults:Te}}=Y;Te&&(0,n.assignDefaults)(Y,ae.type),ve.block(()=>{for(const ke of ae.rules)(0,o.shouldUseRule)(ie,ke)&&pe(Y,ke.keyword,ke.definition,ae.type)})}function te(Y,ae){Y.schemaEnv.meta||!Y.opts.strictTypes||(le(Y,ae),Y.opts.allowUnionTypes||Q(Y,ae),M(Y,Y.dataTypes))}function le(Y,ae){if(ae.length){if(!Y.dataTypes.length){Y.dataTypes=ae;return}ae.forEach(ve=>{q(Y.dataTypes,ve)||U(Y,`type "${ve}" not allowed by context "${Y.dataTypes.join(",")}"`)}),L(Y,ae)}}function Q(Y,ae){ae.length>1&&!(ae.length===2&&ae.includes("null"))&&U(Y,"use allowUnionTypes to allow union type keyword")}function M(Y,ae){const ve=Y.self.RULES.all;for(const ie in ve){const Te=ve[ie];if(typeof Te=="object"&&(0,o.shouldUseRule)(Y.schema,Te)){const{type:ke}=Te.definition;ke.length&&!ke.some(it=>G(ae,it))&&U(Y,`missing type "${ke.join(",")}" for keyword "${ie}"`)}}}function G(Y,ae){return Y.includes(ae)||ae==="number"&&Y.includes("integer")}function q(Y,ae){return Y.includes(ae)||ae==="integer"&&Y.includes("number")}function L(Y,ae){const ve=[];for(const ie of Y.dataTypes)q(ae,ie)?ve.push(ie):ae.includes("integer")&&ie==="number"&&ve.push("integer");Y.dataTypes=ve}function U(Y,ae){const ve=Y.schemaEnv.baseId+Y.errSchemaPath;ae+=` at "${ve}" (strictTypes)`,(0,g.checkStrictMode)(Y,ae,Y.opts.strictTypes)}class J{constructor(ae,ve,ie){if((0,i.validateKeywordUsage)(ae,ve,ie),this.gen=ae.gen,this.allErrors=ae.allErrors,this.keyword=ie,this.data=ae.data,this.schema=ae.schema[ie],this.$data=ve.$data&&ae.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,g.schemaRefOrVal)(ae,this.schema,ie,this.$data),this.schemaType=ve.schemaType,this.parentSchema=ae.schema,this.params={},this.it=ae,this.def=ve,this.$data)this.schemaCode=ae.gen.const("vSchema",$e(this.$data,ae));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,ve.schemaType,ve.allowUndefined))throw new Error(`${ie} value must be ${JSON.stringify(ve.schemaType)}`);("code"in ve?ve.trackErrors:ve.errors!==!1)&&(this.errsCount=ae.gen.const("_errs",u.default.errors))}result(ae,ve,ie){this.failResult((0,c.not)(ae),ve,ie)}failResult(ae,ve,ie){this.gen.if(ae),ie?ie():this.error(),ve?(this.gen.else(),ve(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(ae,ve){this.failResult((0,c.not)(ae),void 0,ve)}fail(ae){if(ae===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(ae),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(ae){if(!this.$data)return this.fail(ae);const{schemaCode:ve}=this;this.fail((0,c._)`${ve} !== undefined && (${(0,c.or)(this.invalid$data(),ae)})`)}error(ae,ve,ie){if(ve){this.setParams(ve),this._error(ae,ie),this.setParams({});return}this._error(ae,ie)}_error(ae,ve){(ae?m.reportExtraError:m.reportError)(this,this.def.error,ve)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(ae){this.allErrors||this.gen.if(ae)}setParams(ae,ve){ve?Object.assign(this.params,ae):this.params=ae}block$data(ae,ve,ie=c.nil){this.gen.block(()=>{this.check$data(ae,ie),ve()})}check$data(ae=c.nil,ve=c.nil){if(!this.$data)return;const{gen:ie,schemaCode:Te,schemaType:ke,def:it}=this;ie.if((0,c.or)((0,c._)`${Te} === undefined`,ve)),ae!==c.nil&&ie.assign(ae,!0),(ke.length||it.validateSchema)&&(ie.elseIf(this.invalid$data()),this.$dataError(),ae!==c.nil&&ie.assign(ae,!1)),ie.else()}invalid$data(){const{gen:ae,schemaCode:ve,schemaType:ie,def:Te,it:ke}=this;return(0,c.or)(it(),lt());function it(){if(ie.length){if(!(ve instanceof c.Name))throw new Error("ajv implementation error");const Ge=Array.isArray(ie)?ie:[ie];return(0,c._)`${(0,a.checkDataTypes)(Ge,ve,ke.opts.strictNumbers,a.DataType.Wrong)}`}return c.nil}function lt(){if(Te.validateSchema){const Ge=ae.scopeValue("validate$data",{ref:Te.validateSchema});return(0,c._)`!${Ge}(${ve})`}return c.nil}}subschema(ae,ve){const ie=(0,l.getSubschema)(this.it,ae);(0,l.extendSubschemaData)(ie,this.it,ae),(0,l.extendSubschemaMode)(ie,ae);const Te={...this.it,...ie,items:void 0,props:void 0};return E(Te,ve),Te}mergeEvaluated(ae,ve){const{it:ie,gen:Te}=this;ie.opts.unevaluated&&(ie.props!==!0&&ae.props!==void 0&&(ie.props=g.mergeEvaluated.props(Te,ae.props,ie.props,ve)),ie.items!==!0&&ae.items!==void 0&&(ie.items=g.mergeEvaluated.items(Te,ae.items,ie.items,ve)))}mergeValidEvaluated(ae,ve){const{it:ie,gen:Te}=this;if(ie.opts.unevaluated&&(ie.props!==!0||ie.items!==!0))return Te.if(ve,()=>this.mergeEvaluated(ae,c.Name)),!0}}vi.KeywordCxt=J;function pe(Y,ae,ve,ie){const Te=new J(Y,ve,ae);"code"in ve?ve.code(Te,ie):Te.$data&&ve.validate?(0,i.funcKeywordCode)(Te,ve):"macro"in ve?(0,i.macroKeywordCode)(Te,ve):(ve.compile||ve.validate)&&(0,i.funcKeywordCode)(Te,ve)}const ge=/^\/(?:[^~]|~0|~1)*$/,Ce=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function $e(Y,{dataLevel:ae,dataNames:ve,dataPathArr:ie}){let Te,ke;if(Y==="")return u.default.rootData;if(Y[0]==="/"){if(!ge.test(Y))throw new Error(`Invalid JSON-pointer: ${Y}`);Te=Y,ke=u.default.rootData}else{const tt=Ce.exec(Y);if(!tt)throw new Error(`Invalid JSON-pointer: ${Y}`);const De=+tt[1];if(Te=tt[2],Te==="#"){if(De>=ae)throw new Error(Ge("property/index",De));return ie[ae-De]}if(De>ae)throw new Error(Ge("data",De));if(ke=ve[ae-De],!Te)return ke}let it=ke;const lt=Te.split("/");for(const tt of lt)tt&&(ke=(0,c._)`${ke}${(0,c.getProperty)((0,g.unescapeJsonPointer)(tt))}`,it=(0,c._)`${it} && ${ke}`);return it;function Ge(tt,De){return`Cannot access ${tt} ${De} levels up, current level is ${ae}`}}return vi.getData=$e,vi}var Ng={},tA;function X_(){if(tA)return Ng;tA=1,Object.defineProperty(Ng,"__esModule",{value:!0});class e extends Error{constructor(o){super("validation failed"),this.errors=o,this.ajv=this.validation=!0}}return Ng.default=e,Ng}var Fg={},oA;function Av(){if(oA)return Fg;oA=1,Object.defineProperty(Fg,"__esModule",{value:!0});const e=Ev();class t extends Error{constructor(a,n,i,l){super(l||`can't resolve reference ${i} from id ${n}`),this.missingRef=(0,e.resolveUrl)(a,n,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(a,this.missingRef))}}return Fg.default=t,Fg}var Sn={},aA;function eC(){if(aA)return Sn;aA=1,Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.resolveSchema=Sn.getCompilingSchema=Sn.resolveRef=Sn.compileSchema=Sn.SchemaEnv=void 0;const e=bt(),t=X_(),o=js(),a=Ev(),n=Nt(),i=Rv();class l{constructor(w){var _;this.refs={},this.dynamicAnchors={};let E;typeof w.schema=="object"&&(E=w.schema),this.schema=w.schema,this.schemaId=w.schemaId,this.root=w.root||this,this.baseId=(_=w.baseId)!==null&&_!==void 0?_:(0,a.normalizeId)(E?.[w.schemaId||"$id"]),this.schemaPath=w.schemaPath,this.localRefs=w.localRefs,this.meta=w.meta,this.$async=E?.$async,this.refs={}}}Sn.SchemaEnv=l;function c(C){const w=g.call(this,C);if(w)return w;const _=(0,a.getFullPath)(this.opts.uriResolver,C.root.baseId),{es5:E,lines:k}=this.opts.code,{ownProperties:x}=this.opts,A=new e.CodeGen(this.scope,{es5:E,lines:k,ownProperties:x});let D;C.$async&&(D=A.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=A.scopeName("validate");C.validateName=O;const N={gen:A,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:A.scopeValue("schema",this.opts.code.source===!0?{ref:C.schema,code:(0,e.stringify)(C.schema)}:{ref:C.schema}),validateName:O,ValidationError:D,schema:C.schema,schemaEnv:C,rootId:_,baseId:C.baseId||_,schemaPath:e.nil,errSchemaPath:C.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let $;try{this._compilations.add(C),(0,i.validateFunctionCode)(N),A.optimize(this.opts.code.optimize);const F=A.toString();$=`${A.scopeRefs(o.default.scope)}return ${F}`,this.opts.code.process&&($=this.opts.code.process($,C));const j=new Function(`${o.default.self}`,`${o.default.scope}`,$)(this,this.scope.get());if(this.scope.value(O,{ref:j}),j.errors=null,j.schema=C.schema,j.schemaEnv=C,C.$async&&(j.$async=!0),this.opts.code.source===!0&&(j.source={validateName:O,validateCode:F,scopeValues:A._values}),this.opts.unevaluated){const{props:K,items:ne}=N;j.evaluated={props:K instanceof e.Name?void 0:K,items:ne instanceof e.Name?void 0:ne,dynamicProps:K instanceof e.Name,dynamicItems:ne instanceof e.Name},j.source&&(j.source.evaluated=(0,e.stringify)(j.evaluated))}return C.validate=j,C}catch(F){throw delete C.validate,delete C.validateName,$&&this.logger.error("Error compiling schema, function code:",$),F}finally{this._compilations.delete(C)}}Sn.compileSchema=c;function u(C,w,_){var E;_=(0,a.resolveUrl)(this.opts.uriResolver,w,_);const k=C.refs[_];if(k)return k;let x=f.call(this,C,_);if(x===void 0){const A=(E=C.localRefs)===null||E===void 0?void 0:E[_],{schemaId:D}=this.opts;A&&(x=new l({schema:A,schemaId:D,root:C,baseId:w}))}if(x!==void 0)return C.refs[_]=p.call(this,x)}Sn.resolveRef=u;function p(C){return(0,a.inlineRef)(C.schema,this.opts.inlineRefs)?C.schema:C.validate?C:c.call(this,C)}function g(C){for(const w of this._compilations)if(m(w,C))return w}Sn.getCompilingSchema=g;function m(C,w){return C.schema===w.schema&&C.root===w.root&&C.baseId===w.baseId}function f(C,w){let _;for(;typeof(_=this.refs[w])=="string";)w=_;return _||this.schemas[w]||v.call(this,C,w)}function v(C,w){const _=this.opts.uriResolver.parse(w),E=(0,a._getFullPath)(this.opts.uriResolver,_);let k=(0,a.getFullPath)(this.opts.uriResolver,C.baseId,void 0);if(Object.keys(C.schema).length>0&&E===k)return S.call(this,_,C);const x=(0,a.normalizeId)(E),A=this.refs[x]||this.schemas[x];if(typeof A=="string"){const D=v.call(this,C,A);return typeof D?.schema!="object"?void 0:S.call(this,_,D)}if(typeof A?.schema=="object"){if(A.validate||c.call(this,A),x===(0,a.normalizeId)(w)){const{schema:D}=A,{schemaId:O}=this.opts,N=D[O];return N&&(k=(0,a.resolveUrl)(this.opts.uriResolver,k,N)),new l({schema:D,schemaId:O,root:C,baseId:k})}return S.call(this,_,A)}}Sn.resolveSchema=v;const b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(C,{baseId:w,schema:_,root:E}){var k;if(((k=C.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(const D of C.fragment.slice(1).split("/")){if(typeof _=="boolean")return;const O=_[(0,n.unescapeFragment)(D)];if(O===void 0)return;_=O;const N=typeof _=="object"&&_[this.opts.schemaId];!b.has(D)&&N&&(w=(0,a.resolveUrl)(this.opts.uriResolver,w,N))}let x;if(typeof _!="boolean"&&_.$ref&&!(0,n.schemaHasRulesButRef)(_,this.RULES)){const D=(0,a.resolveUrl)(this.opts.uriResolver,w,_.$ref);x=v.call(this,E,D)}const{schemaId:A}=this.opts;if(x=x||new l({schema:_,schemaId:A,root:E,baseId:w}),x.schema!==x.root.schema)return x}return Sn}const oW="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",aW="Meta-schema for $data reference (JSON AnySchema extension proposal)",nW="object",rW=["$data"],iW={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},sW=!1,lW={$id:oW,description:aW,type:nW,required:rW,properties:iW,additionalProperties:sW};var Bg={},Ou={exports:{}},VS,nA;function OL(){if(nA)return VS;nA=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function o(f){let v="",b=0,S=0;for(S=0;S<f.length;S++)if(b=f[S].charCodeAt(0),b!==48){if(!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=f[S];break}for(S+=1;S<f.length;S++){if(b=f[S].charCodeAt(0),!(b>=48&&b<=57||b>=65&&b<=70||b>=97&&b<=102))return"";v+=f[S]}return v}const a=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function n(f){return f.length=0,!0}function i(f,v,b){if(f.length){const S=o(f);if(S!=="")v.push(S);else return b.error=!0,!1;f.length=0}return!0}function l(f){let v=0;const b={error:!1,address:"",zone:""},S=[],C=[];let w=!1,_=!1,E=i;for(let k=0;k<f.length;k++){const x=f[k];if(!(x==="["||x==="]"))if(x===":"){if(w===!0&&(_=!0),!E(C,S,b))break;if(++v>7){b.error=!0;break}k>0&&f[k-1]===":"&&(w=!0),S.push(":");continue}else if(x==="%"){if(!E(C,S,b))break;E=n}else{C.push(x);continue}}return C.length&&(E===n?b.zone=C.join(""):_?S.push(C.join("")):S.push(o(C))),b.address=S.join(""),b}function c(f){if(u(f,":")<2)return{host:f,isIPV6:!1};const v=l(f);if(v.error)return{host:f,isIPV6:!1};{let b=v.address,S=v.address;return v.zone&&(b+="%"+v.zone,S+="%25"+v.zone),{host:b,isIPV6:!0,escapedHost:S}}}function u(f,v){let b=0;for(let S=0;S<f.length;S++)f[S]===v&&b++;return b}function p(f){let v=f;const b=[];let S=-1,C=0;for(;C=v.length;){if(C===1){if(v===".")break;if(v==="/"){b.push("/");break}else{b.push(v);break}}else if(C===2){if(v[0]==="."){if(v[1]===".")break;if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&(v[1]==="."||v[1]==="/")){b.push("/");break}}else if(C===3&&v==="/.."){b.length!==0&&b.pop(),b.push("/");break}if(v[0]==="."){if(v[1]==="."){if(v[2]==="/"){v=v.slice(3);continue}}else if(v[1]==="/"){v=v.slice(2);continue}}else if(v[0]==="/"&&v[1]==="."){if(v[2]==="/"){v=v.slice(2);continue}else if(v[2]==="."&&v[3]==="/"){v=v.slice(3),b.length!==0&&b.pop();continue}}if((S=v.indexOf("/",1))===-1){b.push(v);break}else b.push(v.slice(0,S)),v=v.slice(S)}return b.join("")}function g(f,v){const b=v!==!0?escape:unescape;return f.scheme!==void 0&&(f.scheme=b(f.scheme)),f.userinfo!==void 0&&(f.userinfo=b(f.userinfo)),f.host!==void 0&&(f.host=b(f.host)),f.path!==void 0&&(f.path=b(f.path)),f.query!==void 0&&(f.query=b(f.query)),f.fragment!==void 0&&(f.fragment=b(f.fragment)),f}function m(f){const v=[];if(f.userinfo!==void 0&&(v.push(f.userinfo),v.push("@")),f.host!==void 0){let b=unescape(f.host);if(!t(b)){const S=c(b);S.isIPV6===!0?b=`[${S.escapedHost}]`:b=f.host}v.push(b)}return(typeof f.port=="number"||typeof f.port=="string")&&(v.push(":"),v.push(String(f.port))),v.length?v.join(""):void 0}return VS={nonSimpleDomain:a,recomposeAuthority:m,normalizeComponentEncoding:g,removeDotSegments:p,isIPv4:t,isUUID:e,normalizeIPv6:c,stringArrayToHexStripped:o},VS}var HS,rA;function cW(){if(rA)return HS;rA=1;const{isUUID:e}=OL(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,o=["http","https","ws","wss","urn","urn:uuid"];function a(x){return o.indexOf(x)!==-1}function n(x){return x.secure===!0?!0:x.secure===!1?!1:x.scheme?x.scheme.length===3&&(x.scheme[0]==="w"||x.scheme[0]==="W")&&(x.scheme[1]==="s"||x.scheme[1]==="S")&&(x.scheme[2]==="s"||x.scheme[2]==="S"):!1}function i(x){return x.host||(x.error=x.error||"HTTP URIs must have a host."),x}function l(x){const A=String(x.scheme).toLowerCase()==="https";return(x.port===(A?443:80)||x.port==="")&&(x.port=void 0),x.path||(x.path="/"),x}function c(x){return x.secure=n(x),x.resourceName=(x.path||"/")+(x.query?"?"+x.query:""),x.path=void 0,x.query=void 0,x}function u(x){if((x.port===(n(x)?443:80)||x.port==="")&&(x.port=void 0),typeof x.secure=="boolean"&&(x.scheme=x.secure?"wss":"ws",x.secure=void 0),x.resourceName){const[A,D]=x.resourceName.split("?");x.path=A&&A!=="/"?A:void 0,x.query=D,x.resourceName=void 0}return x.fragment=void 0,x}function p(x,A){if(!x.path)return x.error="URN can not be parsed",x;const D=x.path.match(t);if(D){const O=A.scheme||x.scheme||"urn";x.nid=D[1].toLowerCase(),x.nss=D[2];const N=`${O}:${A.nid||x.nid}`,$=k(N);x.path=void 0,$&&(x=$.parse(x,A))}else x.error=x.error||"URN can not be parsed.";return x}function g(x,A){if(x.nid===void 0)throw new Error("URN without nid cannot be serialized");const D=A.scheme||x.scheme||"urn",O=x.nid.toLowerCase(),N=`${D}:${A.nid||O}`,$=k(N);$&&(x=$.serialize(x,A));const F=x,z=x.nss;return F.path=`${O||A.nid}:${z}`,A.skipEscape=!0,F}function m(x,A){const D=x;return D.uuid=D.nss,D.nss=void 0,!A.tolerant&&(!D.uuid||!e(D.uuid))&&(D.error=D.error||"UUID is not valid."),D}function f(x){const A=x;return A.nss=(x.uuid||"").toLowerCase(),A}const v={scheme:"http",domainHost:!0,parse:i,serialize:l},b={scheme:"https",domainHost:v.domainHost,parse:i,serialize:l},S={scheme:"ws",domainHost:!0,parse:c,serialize:u},C={scheme:"wss",domainHost:S.domainHost,parse:S.parse,serialize:S.serialize},E={http:v,https:b,ws:S,wss:C,urn:{scheme:"urn",parse:p,serialize:g,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:m,serialize:f,skipNormalize:!0}};Object.setPrototypeOf(E,null);function k(x){return x&&(E[x]||E[x.toLowerCase()])||void 0}return HS={wsIsSecure:n,SCHEMES:E,isValidSchemeName:a,getSchemeHandler:k},HS}var iA;function dW(){if(iA)return Ou.exports;iA=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:o,normalizeComponentEncoding:a,isIPv4:n,nonSimpleDomain:i}=OL(),{SCHEMES:l,getSchemeHandler:c}=cW();function u(C,w){return typeof C=="string"?C=f(b(C,w),w):typeof C=="object"&&(C=b(f(C,w),w)),C}function p(C,w,_){const E=_?Object.assign({scheme:"null"},_):{scheme:"null"},k=g(b(C,E),b(w,E),E,!0);return E.skipEscape=!0,f(k,E)}function g(C,w,_,E){const k={};return E||(C=b(f(C,_),_),w=b(f(w,_),_)),_=_||{},!_.tolerant&&w.scheme?(k.scheme=w.scheme,k.userinfo=w.userinfo,k.host=w.host,k.port=w.port,k.path=t(w.path||""),k.query=w.query):(w.userinfo!==void 0||w.host!==void 0||w.port!==void 0?(k.userinfo=w.userinfo,k.host=w.host,k.port=w.port,k.path=t(w.path||""),k.query=w.query):(w.path?(w.path[0]==="/"?k.path=t(w.path):((C.userinfo!==void 0||C.host!==void 0||C.port!==void 0)&&!C.path?k.path="/"+w.path:C.path?k.path=C.path.slice(0,C.path.lastIndexOf("/")+1)+w.path:k.path=w.path,k.path=t(k.path)),k.query=w.query):(k.path=C.path,w.query!==void 0?k.query=w.query:k.query=C.query),k.userinfo=C.userinfo,k.host=C.host,k.port=C.port),k.scheme=C.scheme),k.fragment=w.fragment,k}function m(C,w,_){return typeof C=="string"?(C=unescape(C),C=f(a(b(C,_),!0),{..._,skipEscape:!0})):typeof C=="object"&&(C=f(a(C,!0),{..._,skipEscape:!0})),typeof w=="string"?(w=unescape(w),w=f(a(b(w,_),!0),{..._,skipEscape:!0})):typeof w=="object"&&(w=f(a(w,!0),{..._,skipEscape:!0})),C.toLowerCase()===w.toLowerCase()}function f(C,w){const _={host:C.host,scheme:C.scheme,userinfo:C.userinfo,port:C.port,path:C.path,query:C.query,nid:C.nid,nss:C.nss,uuid:C.uuid,fragment:C.fragment,reference:C.reference,resourceName:C.resourceName,secure:C.secure,error:""},E=Object.assign({},w),k=[],x=c(E.scheme||_.scheme);x&&x.serialize&&x.serialize(_,E),_.path!==void 0&&(E.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),E.reference!=="suffix"&&_.scheme&&k.push(_.scheme,":");const A=o(_);if(A!==void 0&&(E.reference!=="suffix"&&k.push("//"),k.push(A),_.path&&_.path[0]!=="/"&&k.push("/")),_.path!==void 0){let D=_.path;!E.absolutePath&&(!x||!x.absolutePath)&&(D=t(D)),A===void 0&&D[0]==="/"&&D[1]==="/"&&(D="/%2F"+D.slice(2)),k.push(D)}return _.query!==void 0&&k.push("?",_.query),_.fragment!==void 0&&k.push("#",_.fragment),k.join("")}const v=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function b(C,w){const _=Object.assign({},w),E={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let k=!1;_.reference==="suffix"&&(_.scheme?C=_.scheme+":"+C:C="//"+C);const x=C.match(v);if(x){if(E.scheme=x[1],E.userinfo=x[3],E.host=x[4],E.port=parseInt(x[5],10),E.path=x[6]||"",E.query=x[7],E.fragment=x[8],isNaN(E.port)&&(E.port=x[5]),E.host)if(n(E.host)===!1){const O=e(E.host);E.host=O.host.toLowerCase(),k=O.isIPV6}else k=!0;E.scheme===void 0&&E.userinfo===void 0&&E.host===void 0&&E.port===void 0&&E.query===void 0&&!E.path?E.reference="same-document":E.scheme===void 0?E.reference="relative":E.fragment===void 0?E.reference="absolute":E.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==E.reference&&(E.error=E.error||"URI is not a "+_.reference+" reference.");const A=c(_.scheme||E.scheme);if(!_.unicodeSupport&&(!A||!A.unicodeSupport)&&E.host&&(_.domainHost||A&&A.domainHost)&&k===!1&&i(E.host))try{E.host=URL.domainToASCII(E.host.toLowerCase())}catch(D){E.error=E.error||"Host's domain name can not be converted to ASCII: "+D}(!A||A&&!A.skipNormalize)&&(C.indexOf("%")!==-1&&(E.scheme!==void 0&&(E.scheme=unescape(E.scheme)),E.host!==void 0&&(E.host=unescape(E.host))),E.path&&(E.path=escape(unescape(E.path))),E.fragment&&(E.fragment=encodeURI(decodeURIComponent(E.fragment)))),A&&A.parse&&A.parse(E,_)}else E.error=E.error||"URI can not be parsed.";return E}const S={SCHEMES:l,normalize:u,resolve:p,resolveComponent:g,equal:m,serialize:f,parse:b};return Ou.exports=S,Ou.exports.default=S,Ou.exports.fastUri=S,Ou.exports}var sA;function uW(){if(sA)return Bg;sA=1,Object.defineProperty(Bg,"__esModule",{value:!0});const e=dW();return e.code='require("ajv/dist/runtime/uri").default',Bg.default=e,Bg}var lA;function pW(){return lA||(lA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Rv();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var o=bt();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const a=X_(),n=Av(),i=RL(),l=eC(),c=bt(),u=Ev(),p=Pf(),g=Nt(),m=lW,f=uW(),v=(Q,M)=>new RegExp(Q,M);v.code="new RegExp";const b=["removeAdditional","useDefaults","coerceTypes"],S=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),C={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},w={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function E(Q){var M,G,q,L,U,J,pe,ge,Ce,$e,Y,ae,ve,ie,Te,ke,it,lt,Ge,tt,De,Ae,He,W,oe;const se=Q.strict,Pe=(M=Q.code)===null||M===void 0?void 0:M.optimize,Ee=Pe===!0||Pe===void 0?1:Pe||0,Re=(q=(G=Q.code)===null||G===void 0?void 0:G.regExp)!==null&&q!==void 0?q:v,Le=(L=Q.uriResolver)!==null&&L!==void 0?L:f.default;return{strictSchema:(J=(U=Q.strictSchema)!==null&&U!==void 0?U:se)!==null&&J!==void 0?J:!0,strictNumbers:(ge=(pe=Q.strictNumbers)!==null&&pe!==void 0?pe:se)!==null&&ge!==void 0?ge:!0,strictTypes:($e=(Ce=Q.strictTypes)!==null&&Ce!==void 0?Ce:se)!==null&&$e!==void 0?$e:"log",strictTuples:(ae=(Y=Q.strictTuples)!==null&&Y!==void 0?Y:se)!==null&&ae!==void 0?ae:"log",strictRequired:(ie=(ve=Q.strictRequired)!==null&&ve!==void 0?ve:se)!==null&&ie!==void 0?ie:!1,code:Q.code?{...Q.code,optimize:Ee,regExp:Re}:{optimize:Ee,regExp:Re},loopRequired:(Te=Q.loopRequired)!==null&&Te!==void 0?Te:_,loopEnum:(ke=Q.loopEnum)!==null&&ke!==void 0?ke:_,meta:(it=Q.meta)!==null&&it!==void 0?it:!0,messages:(lt=Q.messages)!==null&&lt!==void 0?lt:!0,inlineRefs:(Ge=Q.inlineRefs)!==null&&Ge!==void 0?Ge:!0,schemaId:(tt=Q.schemaId)!==null&&tt!==void 0?tt:"$id",addUsedSchema:(De=Q.addUsedSchema)!==null&&De!==void 0?De:!0,validateSchema:(Ae=Q.validateSchema)!==null&&Ae!==void 0?Ae:!0,validateFormats:(He=Q.validateFormats)!==null&&He!==void 0?He:!0,unicodeRegExp:(W=Q.unicodeRegExp)!==null&&W!==void 0?W:!0,int32range:(oe=Q.int32range)!==null&&oe!==void 0?oe:!0,uriResolver:Le}}class k{constructor(M={}){this.schemas={},this.refs={},this.formats=Object.create(null),this._compilations=new Set,this._loading={},this._cache=new Map,M=this.opts={...M,...E(M)};const{es5:G,lines:q}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:S,es5:G,lines:q}),this.logger=z(M.logger);const L=M.validateFormats;M.validateFormats=!1,this.RULES=(0,i.getRules)(),x.call(this,C,M,"NOT SUPPORTED"),x.call(this,w,M,"DEPRECATED","warn"),this._metaOpts=$.call(this),M.formats&&O.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),M.keywords&&N.call(this,M.keywords),typeof M.meta=="object"&&this.addMetaSchema(M.meta),D.call(this),M.validateFormats=L}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:M,meta:G,schemaId:q}=this.opts;let L=m;q==="id"&&(L={...m},L.id=L.$id,delete L.$id),G&&M&&this.addMetaSchema(L,L[q],!1)}defaultMeta(){const{meta:M,schemaId:G}=this.opts;return this.opts.defaultMeta=typeof M=="object"?M[G]||M:void 0}validate(M,G){let q;if(typeof M=="string"){if(q=this.getSchema(M),!q)throw new Error(`no schema with key or ref "${M}"`)}else q=this.compile(M);const L=q(G);return"$async"in q||(this.errors=q.errors),L}compile(M,G){const q=this._addSchema(M,G);return q.validate||this._compileSchemaEnv(q)}compileAsync(M,G){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:q}=this.opts;return L.call(this,M,G);async function L($e,Y){await U.call(this,$e.$schema);const ae=this._addSchema($e,Y);return ae.validate||J.call(this,ae)}async function U($e){$e&&!this.getSchema($e)&&await L.call(this,{$ref:$e},!0)}async function J($e){try{return this._compileSchemaEnv($e)}catch(Y){if(!(Y instanceof n.default))throw Y;return pe.call(this,Y),await ge.call(this,Y.missingSchema),J.call(this,$e)}}function pe({missingSchema:$e,missingRef:Y}){if(this.refs[$e])throw new Error(`AnySchema ${$e} is loaded but ${Y} cannot be resolved`)}async function ge($e){const Y=await Ce.call(this,$e);this.refs[$e]||await U.call(this,Y.$schema),this.refs[$e]||this.addSchema(Y,$e,G)}async function Ce($e){const Y=this._loading[$e];if(Y)return Y;try{return await(this._loading[$e]=q($e))}finally{delete this._loading[$e]}}}addSchema(M,G,q,L=this.opts.validateSchema){if(Array.isArray(M)){for(const J of M)this.addSchema(J,void 0,q,L);return this}let U;if(typeof M=="object"){const{schemaId:J}=this.opts;if(U=M[J],U!==void 0&&typeof U!="string")throw new Error(`schema ${J} must be string`)}return G=(0,u.normalizeId)(G||U),this._checkUnique(G),this.schemas[G]=this._addSchema(M,q,G,L,!0),this}addMetaSchema(M,G,q=this.opts.validateSchema){return this.addSchema(M,G,!0,q),this}validateSchema(M,G){if(typeof M=="boolean")return!0;let q;if(q=M.$schema,q!==void 0&&typeof q!="string")throw new Error("$schema must be a string");if(q=q||this.opts.defaultMeta||this.defaultMeta(),!q)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const L=this.validate(q,M);if(!L&&G){const U="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(U);else throw new Error(U)}return L}getSchema(M){let G;for(;typeof(G=A.call(this,M))=="string";)M=G;if(G===void 0){const{schemaId:q}=this.opts,L=new l.SchemaEnv({schema:{},schemaId:q});if(G=l.resolveSchema.call(this,L,M),!G)return;this.refs[M]=G}return G.validate||this._compileSchemaEnv(G)}removeSchema(M){if(M instanceof RegExp)return this._removeAllSchemas(this.schemas,M),this._removeAllSchemas(this.refs,M),this;switch(typeof M){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const G=A.call(this,M);return typeof G=="object"&&this._cache.delete(G.schema),delete this.schemas[M],delete this.refs[M],this}case"object":{const G=M;this._cache.delete(G);let q=M[this.opts.schemaId];return q&&(q=(0,u.normalizeId)(q),delete this.schemas[q],delete this.refs[q]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(M){for(const G of M)this.addKeyword(G);return this}addKeyword(M,G){let q;if(typeof M=="string")q=M,typeof G=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),G.keyword=q);else if(typeof M=="object"&&G===void 0){if(G=M,q=G.keyword,Array.isArray(q)&&!q.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,q,G),!G)return(0,g.eachItem)(q,U=>ne.call(this,U)),this;Z.call(this,G);const L={...G,type:(0,p.getJSONTypes)(G.type),schemaType:(0,p.getJSONTypes)(G.schemaType)};return(0,g.eachItem)(q,L.type.length===0?U=>ne.call(this,U,L):U=>L.type.forEach(J=>ne.call(this,U,L,J))),this}getKeyword(M){const G=this.RULES.all[M];return typeof G=="object"?G.definition:!!G}removeKeyword(M){const{RULES:G}=this;delete G.keywords[M],delete G.all[M];for(const q of G.rules){const L=q.rules.findIndex(U=>U.keyword===M);L>=0&&q.rules.splice(L,1)}return this}addFormat(M,G){return typeof G=="string"&&(G=new RegExp(G)),this.formats[M]=G,this}errorsText(M=this.errors,{separator:G=", ",dataVar:q="data"}={}){return!M||M.length===0?"No errors":M.map(L=>`${q}${L.instancePath} ${L.message}`).reduce((L,U)=>L+G+U)}$dataMetaSchema(M,G){const q=this.RULES.all;M=JSON.parse(JSON.stringify(M));for(const L of G){const U=L.split("/").slice(1);let J=M;for(const pe of U)J=J[pe];for(const pe in q){const ge=q[pe];if(typeof ge!="object")continue;const{$data:Ce}=ge.definition,$e=J[pe];Ce&&$e&&(J[pe]=le($e))}}return M}_removeAllSchemas(M,G){for(const q in M){const L=M[q];(!G||G.test(q))&&(typeof L=="string"?delete M[q]:L&&!L.meta&&(this._cache.delete(L.schema),delete M[q]))}}_addSchema(M,G,q,L=this.opts.validateSchema,U=this.opts.addUsedSchema){let J;const{schemaId:pe}=this.opts;if(typeof M=="object")J=M[pe];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof M!="boolean")throw new Error("schema must be object or boolean")}let ge=this._cache.get(M);if(ge!==void 0)return ge;q=(0,u.normalizeId)(J||q);const Ce=u.getSchemaRefs.call(this,M,q);return ge=new l.SchemaEnv({schema:M,schemaId:pe,meta:G,baseId:q,localRefs:Ce}),this._cache.set(ge.schema,ge),U&&!q.startsWith("#")&&(q&&this._checkUnique(q),this.refs[q]=ge),L&&this.validateSchema(M,!0),ge}_checkUnique(M){if(this.schemas[M]||this.refs[M])throw new Error(`schema with key or id "${M}" already exists`)}_compileSchemaEnv(M){if(M.meta?this._compileMetaSchema(M):l.compileSchema.call(this,M),!M.validate)throw new Error("ajv implementation error");return M.validate}_compileMetaSchema(M){const G=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,M)}finally{this.opts=G}}}k.ValidationError=a.default,k.MissingRefError=n.default,e.default=k;function x(Q,M,G,q="error"){for(const L in Q){const U=L;U in M&&this.logger[q](`${G}: option ${L}. ${Q[U]}`)}}function A(Q){return Q=(0,u.normalizeId)(Q),this.schemas[Q]||this.refs[Q]}function D(){const Q=this.opts.schemas;if(Q)if(Array.isArray(Q))this.addSchema(Q);else for(const M in Q)this.addSchema(Q[M],M)}function O(){for(const Q in this.opts.formats){const M=this.opts.formats[Q];M&&this.addFormat(Q,M)}}function N(Q){if(Array.isArray(Q)){this.addVocabulary(Q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const M in Q){const G=Q[M];G.keyword||(G.keyword=M),this.addKeyword(G)}}function $(){const Q={...this.opts};for(const M of b)delete Q[M];return Q}const F={log(){},warn(){},error(){}};function z(Q){if(Q===!1)return F;if(Q===void 0)return console;if(Q.log&&Q.warn&&Q.error)return Q;throw new Error("logger must implement log, warn and error methods")}const j=/^[a-z_$][a-z0-9_$:-]*$/i;function K(Q,M){const{RULES:G}=this;if((0,g.eachItem)(Q,q=>{if(G.keywords[q])throw new Error(`Keyword ${q} is already defined`);if(!j.test(q))throw new Error(`Keyword ${q} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function ne(Q,M,G){var q;const L=M?.post;if(G&&L)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:U}=this;let J=L?U.post:U.rules.find(({type:ge})=>ge===G);if(J||(J={type:G,rules:[]},U.rules.push(J)),U.keywords[Q]=!0,!M)return;const pe={keyword:Q,definition:{...M,type:(0,p.getJSONTypes)(M.type),schemaType:(0,p.getJSONTypes)(M.schemaType)}};M.before?H.call(this,J,pe,M.before):J.rules.push(pe),U.all[Q]=pe,(q=M.implements)===null||q===void 0||q.forEach(ge=>this.addKeyword(ge))}function H(Q,M,G){const q=Q.rules.findIndex(L=>L.keyword===G);q>=0?Q.rules.splice(q,0,M):(Q.rules.push(M),this.logger.warn(`rule ${G} is not defined`))}function Z(Q){let{metaSchema:M}=Q;M!==void 0&&(Q.$data&&this.opts.$data&&(M=le(M)),Q.validateSchema=this.compile(M,!0))}const te={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function le(Q){return{anyOf:[Q,te]}}})(FS)),FS}var jg={},Ug={},zg={},cA;function mW(){if(cA)return zg;cA=1,Object.defineProperty(zg,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return zg.default=e,zg}var ls={},dA;function gW(){if(dA)return ls;dA=1,Object.defineProperty(ls,"__esModule",{value:!0}),ls.callRef=ls.getValidate=void 0;const e=Av(),t=kr(),o=bt(),a=js(),n=eC(),i=Nt(),l={keyword:"$ref",schemaType:"string",code(p){const{gen:g,schema:m,it:f}=p,{baseId:v,schemaEnv:b,validateName:S,opts:C,self:w}=f,{root:_}=b;if((m==="#"||m==="#/")&&v===_.baseId)return k();const E=n.resolveRef.call(w,_,v,m);if(E===void 0)throw new e.default(f.opts.uriResolver,v,m);if(E instanceof n.SchemaEnv)return x(E);return A(E);function k(){if(b===_)return u(p,S,b,b.$async);const D=g.scopeValue("root",{ref:_});return u(p,(0,o._)`${D}.validate`,_,_.$async)}function x(D){const O=c(p,D);u(p,O,D,D.$async)}function A(D){const O=g.scopeValue("schema",C.code.source===!0?{ref:D,code:(0,o.stringify)(D)}:{ref:D}),N=g.name("valid"),$=p.subschema({schema:D,dataTypes:[],schemaPath:o.nil,topSchemaRef:O,errSchemaPath:m},N);p.mergeEvaluated($),p.ok(N)}}};function c(p,g){const{gen:m}=p;return g.validate?m.scopeValue("validate",{ref:g.validate}):(0,o._)`${m.scopeValue("wrapper",{ref:g})}.validate`}ls.getValidate=c;function u(p,g,m,f){const{gen:v,it:b}=p,{allErrors:S,schemaEnv:C,opts:w}=b,_=w.passContext?a.default.this:o.nil;f?E():k();function E(){if(!C.$async)throw new Error("async schema referenced by sync schema");const D=v.let("valid");v.try(()=>{v.code((0,o._)`await ${(0,t.callValidateCode)(p,g,_)}`),A(g),S||v.assign(D,!0)},O=>{v.if((0,o._)`!(${O} instanceof ${b.ValidationError})`,()=>v.throw(O)),x(O),S||v.assign(D,!1)}),p.ok(D)}function k(){p.result((0,t.callValidateCode)(p,g,_),()=>A(g),()=>x(g))}function x(D){const O=(0,o._)`${D}.errors`;v.assign(a.default.vErrors,(0,o._)`${a.default.vErrors} === null ? ${O} : ${a.default.vErrors}.concat(${O})`),v.assign(a.default.errors,(0,o._)`${a.default.vErrors}.length`)}function A(D){var O;if(!b.opts.unevaluated)return;const N=(O=m?.validate)===null||O===void 0?void 0:O.evaluated;if(b.props!==!0)if(N&&!N.dynamicProps)N.props!==void 0&&(b.props=i.mergeEvaluated.props(v,N.props,b.props));else{const $=v.var("props",(0,o._)`${D}.evaluated.props`);b.props=i.mergeEvaluated.props(v,$,b.props,o.Name)}if(b.items!==!0)if(N&&!N.dynamicItems)N.items!==void 0&&(b.items=i.mergeEvaluated.items(v,N.items,b.items));else{const $=v.var("items",(0,o._)`${D}.evaluated.items`);b.items=i.mergeEvaluated.items(v,$,b.items,o.Name)}}}return ls.callRef=u,ls.default=l,ls}var uA;function hW(){if(uA)return Ug;uA=1,Object.defineProperty(Ug,"__esModule",{value:!0});const e=mW(),t=gW(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return Ug.default=o,Ug}var $g={},qg={},pA;function fW(){if(pA)return qg;pA=1,Object.defineProperty(qg,"__esModule",{value:!0});const e=bt(),t=e.operators,o={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},a={message:({keyword:i,schemaCode:l})=>(0,e.str)`must be ${o[i].okStr} ${l}`,params:({keyword:i,schemaCode:l})=>(0,e._)`{comparison: ${o[i].okStr}, limit: ${l}}`},n={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:a,code(i){const{keyword:l,data:c,schemaCode:u}=i;i.fail$data((0,e._)`${c} ${o[l].fail} ${u} || isNaN(${c})`)}};return qg.default=n,qg}var Vg={},mA;function vW(){if(mA)return Vg;mA=1,Object.defineProperty(Vg,"__esModule",{value:!0});const e=bt(),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:a})=>(0,e.str)`must be multiple of ${a}`,params:({schemaCode:a})=>(0,e._)`{multipleOf: ${a}}`},code(a){const{gen:n,data:i,schemaCode:l,it:c}=a,u=c.opts.multipleOfPrecision,p=n.let("res"),g=u?(0,e._)`Math.abs(Math.round(${p}) - ${p}) > 1e-${u}`:(0,e._)`${p} !== parseInt(${p})`;a.fail$data((0,e._)`(${l} === 0 || (${p} = ${i}/${l}, ${g}))`)}};return Vg.default=o,Vg}var Hg={},Gg={},gA;function bW(){if(gA)return Gg;gA=1,Object.defineProperty(Gg,"__esModule",{value:!0});function e(t){const o=t.length;let a=0,n=0,i;for(;n<o;)a++,i=t.charCodeAt(n++),i>=55296&&i<=56319&&n<o&&(i=t.charCodeAt(n),(i&64512)===56320&&n++);return a}return Gg.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Gg}var hA;function yW(){if(hA)return Hg;hA=1,Object.defineProperty(Hg,"__esModule",{value:!0});const e=bt(),t=Nt(),o=bW(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:l}){const c=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${c} than ${l} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:l,data:c,schemaCode:u,it:p}=i,g=l==="maxLength"?e.operators.GT:e.operators.LT,m=p.opts.unicode===!1?(0,e._)`${c}.length`:(0,e._)`${(0,t.useFunc)(i.gen,o.default)}(${c})`;i.fail$data((0,e._)`${m} ${g} ${u}`)}};return Hg.default=n,Hg}var Kg={},fA;function SW(){if(fA)return Kg;fA=1,Object.defineProperty(Kg,"__esModule",{value:!0});const e=kr(),t=Nt(),o=bt(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,o.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,o._)`{pattern: ${i}}`},code(i){const{gen:l,data:c,$data:u,schema:p,schemaCode:g,it:m}=i,f=m.opts.unicodeRegExp?"u":"";if(u){const{regExp:v}=m.opts.code,b=v.code==="new RegExp"?(0,o._)`new RegExp`:(0,t.useFunc)(l,v),S=l.let("valid");l.try(()=>l.assign(S,(0,o._)`${b}(${g}, ${f}).test(${c})`),()=>l.assign(S,!1)),i.fail$data((0,o._)`!${S}`)}else{const v=(0,e.usePattern)(i,p);i.fail$data((0,o._)`!${v}.test(${c})`)}}};return Kg.default=n,Kg}var Wg={},vA;function TW(){if(vA)return Wg;vA=1,Object.defineProperty(Wg,"__esModule",{value:!0});const e=bt(),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:n}){const i=a==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${n} properties`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:n,data:i,schemaCode:l}=a,c=n==="maxProperties"?e.operators.GT:e.operators.LT;a.fail$data((0,e._)`Object.keys(${i}).length ${c} ${l}`)}};return Wg.default=o,Wg}var Yg={},bA;function wW(){if(bA)return Yg;bA=1,Object.defineProperty(Yg,"__esModule",{value:!0});const e=kr(),t=bt(),o=Nt(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:l,schema:c,schemaCode:u,data:p,$data:g,it:m}=i,{opts:f}=m;if(!g&&c.length===0)return;const v=c.length>=f.loopRequired;if(m.allErrors?b():S(),f.strictRequired){const _=i.parentSchema.properties,{definedProperties:E}=i.it;for(const k of c)if(_?.[k]===void 0&&!E.has(k)){const x=m.schemaEnv.baseId+m.errSchemaPath,A=`required property "${k}" is not defined at "${x}" (strictRequired)`;(0,o.checkStrictMode)(m,A,m.opts.strictRequired)}}function b(){if(v||g)i.block$data(t.nil,C);else for(const _ of c)(0,e.checkReportMissingProp)(i,_)}function S(){const _=l.let("missing");if(v||g){const E=l.let("valid",!0);i.block$data(E,()=>w(_,E)),i.ok(E)}else l.if((0,e.checkMissingProp)(i,c,_)),(0,e.reportMissingProp)(i,_),l.else()}function C(){l.forOf("prop",u,_=>{i.setParams({missingProperty:_}),l.if((0,e.noPropertyInData)(l,p,_,f.ownProperties),()=>i.error())})}function w(_,E){i.setParams({missingProperty:_}),l.forOf(_,u,()=>{l.assign(E,(0,e.propertyInData)(l,p,_,f.ownProperties)),l.if((0,t.not)(E),()=>{i.error(),l.break()})},t.nil)}}};return Yg.default=n,Yg}var Zg={},yA;function _W(){if(yA)return Zg;yA=1,Object.defineProperty(Zg,"__esModule",{value:!0});const e=bt(),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:a,schemaCode:n}){const i=a==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${n} items`},params:({schemaCode:a})=>(0,e._)`{limit: ${a}}`},code(a){const{keyword:n,data:i,schemaCode:l}=a,c=n==="maxItems"?e.operators.GT:e.operators.LT;a.fail$data((0,e._)`${i}.length ${c} ${l}`)}};return Zg.default=o,Zg}var Qg={},Jg={},SA;function tC(){if(SA)return Jg;SA=1,Object.defineProperty(Jg,"__esModule",{value:!0});const e=DL();return e.code='require("ajv/dist/runtime/equal").default',Jg.default=e,Jg}var TA;function CW(){if(TA)return Qg;TA=1,Object.defineProperty(Qg,"__esModule",{value:!0});const e=Pf(),t=bt(),o=Nt(),a=tC(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:l,j:c}})=>(0,t.str)`must NOT have duplicate items (items ## ${c} and ${l} are identical)`,params:({params:{i:l,j:c}})=>(0,t._)`{i: ${l}, j: ${c}}`},code(l){const{gen:c,data:u,$data:p,schema:g,parentSchema:m,schemaCode:f,it:v}=l;if(!p&&!g)return;const b=c.let("valid"),S=m.items?(0,e.getSchemaTypes)(m.items):[];l.block$data(b,C,(0,t._)`${f} === false`),l.ok(b);function C(){const k=c.let("i",(0,t._)`${u}.length`),x=c.let("j");l.setParams({i:k,j:x}),c.assign(b,!0),c.if((0,t._)`${k} > 1`,()=>(w()?_:E)(k,x))}function w(){return S.length>0&&!S.some(k=>k==="object"||k==="array")}function _(k,x){const A=c.name("item"),D=(0,e.checkDataTypes)(S,A,v.opts.strictNumbers,e.DataType.Wrong),O=c.const("indices",(0,t._)`{}`);c.for((0,t._)`;${k}--;`,()=>{c.let(A,(0,t._)`${u}[${k}]`),c.if(D,(0,t._)`continue`),S.length>1&&c.if((0,t._)`typeof ${A} == "string"`,(0,t._)`${A} += "_"`),c.if((0,t._)`typeof ${O}[${A}] == "number"`,()=>{c.assign(x,(0,t._)`${O}[${A}]`),l.error(),c.assign(b,!1).break()}).code((0,t._)`${O}[${A}] = ${k}`)})}function E(k,x){const A=(0,o.useFunc)(c,a.default),D=c.name("outer");c.label(D).for((0,t._)`;${k}--;`,()=>c.for((0,t._)`${x} = ${k}; ${x}--;`,()=>c.if((0,t._)`${A}(${u}[${k}], ${u}[${x}])`,()=>{l.error(),c.assign(b,!1).break(D)})))}}};return Qg.default=i,Qg}var Xg={},wA;function PW(){if(wA)return Xg;wA=1,Object.defineProperty(Xg,"__esModule",{value:!0});const e=bt(),t=Nt(),o=tC(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:l,data:c,$data:u,schemaCode:p,schema:g}=i;u||g&&typeof g=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(l,o.default)}(${c}, ${p})`):i.fail((0,e._)`${g} !== ${c}`)}};return Xg.default=n,Xg}var eh={},_A;function kW(){if(_A)return eh;_A=1,Object.defineProperty(eh,"__esModule",{value:!0});const e=bt(),t=Nt(),o=tC(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:l,data:c,$data:u,schema:p,schemaCode:g,it:m}=i;if(!u&&p.length===0)throw new Error("enum must have non-empty array");const f=p.length>=m.opts.loopEnum;let v;const b=()=>v??(v=(0,t.useFunc)(l,o.default));let S;if(f||u)S=l.let("valid"),i.block$data(S,C);else{if(!Array.isArray(p))throw new Error("ajv implementation error");const _=l.const("vSchema",g);S=(0,e.or)(...p.map((E,k)=>w(_,k)))}i.pass(S);function C(){l.assign(S,!1),l.forOf("v",g,_=>l.if((0,e._)`${b()}(${c}, ${_})`,()=>l.assign(S,!0).break()))}function w(_,E){const k=p[E];return typeof k=="object"&&k!==null?(0,e._)`${b()}(${c}, ${_}[${E}])`:(0,e._)`${c} === ${k}`}}};return eh.default=n,eh}var CA;function xW(){if(CA)return $g;CA=1,Object.defineProperty($g,"__esModule",{value:!0});const e=fW(),t=vW(),o=yW(),a=SW(),n=TW(),i=wW(),l=_W(),c=CW(),u=PW(),p=kW(),g=[e.default,t.default,o.default,a.default,n.default,i.default,l.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,p.default];return $g.default=g,$g}var th={},Rc={},PA;function IL(){if(PA)return Rc;PA=1,Object.defineProperty(Rc,"__esModule",{value:!0}),Rc.validateAdditionalItems=void 0;const e=bt(),t=Nt(),a={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:l,it:c}=i,{items:u}=l;if(!Array.isArray(u)){(0,t.checkStrictMode)(c,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(i,u)}};function n(i,l){const{gen:c,schema:u,data:p,keyword:g,it:m}=i;m.items=!0;const f=c.const("len",(0,e._)`${p}.length`);if(u===!1)i.setParams({len:l.length}),i.pass((0,e._)`${f} <= ${l.length}`);else if(typeof u=="object"&&!(0,t.alwaysValidSchema)(m,u)){const b=c.var("valid",(0,e._)`${f} <= ${l.length}`);c.if((0,e.not)(b),()=>v(b)),i.ok(b)}function v(b){c.forRange("i",l.length,f,S=>{i.subschema({keyword:g,dataProp:S,dataPropType:t.Type.Num},b),m.allErrors||c.if((0,e.not)(b),()=>c.break())})}}return Rc.validateAdditionalItems=n,Rc.default=a,Rc}var oh={},Ac={},kA;function ML(){if(kA)return Ac;kA=1,Object.defineProperty(Ac,"__esModule",{value:!0}),Ac.validateTuple=void 0;const e=bt(),t=Nt(),o=kr(),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:l,it:c}=i;if(Array.isArray(l))return n(i,"additionalItems",l);c.items=!0,!(0,t.alwaysValidSchema)(c,l)&&i.ok((0,o.validateArray)(i))}};function n(i,l,c=i.schema){const{gen:u,parentSchema:p,data:g,keyword:m,it:f}=i;S(p),f.opts.unevaluated&&c.length&&f.items!==!0&&(f.items=t.mergeEvaluated.items(u,c.length,f.items));const v=u.name("valid"),b=u.const("len",(0,e._)`${g}.length`);c.forEach((C,w)=>{(0,t.alwaysValidSchema)(f,C)||(u.if((0,e._)`${b} > ${w}`,()=>i.subschema({keyword:m,schemaProp:w,dataProp:w},v)),i.ok(v))});function S(C){const{opts:w,errSchemaPath:_}=f,E=c.length,k=E===C.minItems&&(E===C.maxItems||C[l]===!1);if(w.strictTuples&&!k){const x=`"${m}" is ${E}-tuple, but minItems or maxItems/${l} are not specified or different at path "${_}"`;(0,t.checkStrictMode)(f,x,w.strictTuples)}}}return Ac.validateTuple=n,Ac.default=a,Ac}var xA;function EW(){if(xA)return oh;xA=1,Object.defineProperty(oh,"__esModule",{value:!0});const e=ML(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0,e.validateTuple)(o,"items")};return oh.default=t,oh}var ah={},EA;function RW(){if(EA)return ah;EA=1,Object.defineProperty(ah,"__esModule",{value:!0});const e=bt(),t=Nt(),o=kr(),a=IL(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},code(l){const{schema:c,parentSchema:u,it:p}=l,{prefixItems:g}=u;p.items=!0,!(0,t.alwaysValidSchema)(p,c)&&(g?(0,a.validateAdditionalItems)(l,g):l.ok((0,o.validateArray)(l)))}};return ah.default=i,ah}var nh={},RA;function AW(){if(RA)return nh;RA=1,Object.defineProperty(nh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:i}})=>i===void 0?(0,e.str)`must contain at least ${n} valid item(s)`:(0,e.str)`must contain at least ${n} and no more than ${i} valid item(s)`,params:({params:{min:n,max:i}})=>i===void 0?(0,e._)`{minContains: ${n}}`:(0,e._)`{minContains: ${n}, maxContains: ${i}}`},code(n){const{gen:i,schema:l,parentSchema:c,data:u,it:p}=n;let g,m;const{minContains:f,maxContains:v}=c;p.opts.next?(g=f===void 0?1:f,m=v):g=1;const b=i.const("len",(0,e._)`${u}.length`);if(n.setParams({min:g,max:m}),m===void 0&&g===0){(0,t.checkStrictMode)(p,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&g>m){(0,t.checkStrictMode)(p,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,t.alwaysValidSchema)(p,l)){let E=(0,e._)`${b} >= ${g}`;m!==void 0&&(E=(0,e._)`${E} && ${b} <= ${m}`),n.pass(E);return}p.items=!0;const S=i.name("valid");m===void 0&&g===1?w(S,()=>i.if(S,()=>i.break())):g===0?(i.let(S,!0),m!==void 0&&i.if((0,e._)`${u}.length > 0`,C)):(i.let(S,!1),C()),n.result(S,()=>n.reset());function C(){const E=i.name("_valid"),k=i.let("count",0);w(E,()=>i.if(E,()=>_(k)))}function w(E,k){i.forRange("i",0,b,x=>{n.subschema({keyword:"contains",dataProp:x,dataPropType:t.Type.Num,compositeRule:!0},E),k()})}function _(E){i.code((0,e._)`${E}++`),m===void 0?i.if((0,e._)`${E} >= ${g}`,()=>i.assign(S,!0).break()):(i.if((0,e._)`${E} > ${m}`,()=>i.assign(S,!1).break()),g===1?i.assign(S,!0):i.if((0,e._)`${E} >= ${g}`,()=>i.assign(S,!0)))}}};return nh.default=a,nh}var GS={},AA;function DW(){return AA||(AA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=bt(),o=Nt(),a=kr();e.error={message:({params:{property:u,depsCount:p,deps:g}})=>{const m=p===1?"property":"properties";return(0,t.str)`must have ${m} ${g} when property ${u} is present`},params:({params:{property:u,depsCount:p,deps:g,missingProperty:m}})=>(0,t._)`{property: ${u},
53
53
  missingProperty: ${m},
54
54
  depsCount: ${p},
55
- deps: ${g}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[p,g]=i(u);l(u,p),c(u,g)}};function i({schema:u}){const p={},g={};for(const m in u){if(m==="__proto__")continue;const f=Array.isArray(u[m])?p:g;f[m]=u[m]}return[p,g]}function l(u,p=u.schema){const{gen:g,data:m,it:f}=u;if(Object.keys(p).length===0)return;const v=g.let("missing");for(const b in p){const S=p[b];if(S.length===0)continue;const C=(0,a.propertyInData)(g,m,b,f.opts.ownProperties);u.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),f.allErrors?g.if(C,()=>{for(const w of S)(0,a.checkReportMissingProp)(u,w)}):(g.if((0,t._)`${C} && (${(0,a.checkMissingProp)(u,S,v)})`),(0,a.reportMissingProp)(u,v),g.else())}}e.validatePropertyDeps=l;function c(u,p=u.schema){const{gen:g,data:m,keyword:f,it:v}=u,b=g.name("valid");for(const S in p)(0,o.alwaysValidSchema)(v,p[S])||(g.if((0,a.propertyInData)(g,m,S,v.opts.ownProperties),()=>{const C=u.subschema({keyword:f,schemaProp:S},b);u.mergeValidEvaluated(C,b)},()=>g.var(b,!0)),u.ok(b))}e.validateSchemaDeps=c,e.default=n})(GS)),GS}var rh={},DA;function OW(){if(DA)return rh;DA=1,Object.defineProperty(rh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:i,schema:l,data:c,it:u}=n;if((0,t.alwaysValidSchema)(u,l))return;const p=i.name("valid");i.forIn("key",c,g=>{n.setParams({propertyName:g}),n.subschema({keyword:"propertyNames",data:g,dataTypes:["string"],propertyName:g,compositeRule:!0},p),i.if((0,e.not)(p),()=>{n.error(!0),u.allErrors||i.break()})}),n.ok(p)}};return rh.default=a,rh}var ih={},OA;function LL(){if(OA)return ih;OA=1,Object.defineProperty(ih,"__esModule",{value:!0});const e=kr(),t=bt(),o=js(),a=Nt(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:u,parentSchema:p,data:g,errsCount:m,it:f}=l;if(!m)throw new Error("ajv implementation error");const{allErrors:v,opts:b}=f;if(f.props=!0,b.removeAdditional!=="all"&&(0,a.alwaysValidSchema)(f,u))return;const S=(0,e.allSchemaProperties)(p.properties),C=(0,e.allSchemaProperties)(p.patternProperties);w(),l.ok((0,t._)`${m} === ${o.default.errors}`);function w(){c.forIn("key",g,A=>{!S.length&&!C.length?k(A):c.if(_(A),()=>k(A))})}function _(A){let D;if(S.length>8){const O=(0,a.schemaRefOrVal)(f,p.properties,"properties");D=(0,e.isOwnProperty)(c,O,A)}else S.length?D=(0,t.or)(...S.map(O=>(0,t._)`${A} === ${O}`)):D=t.nil;return C.length&&(D=(0,t.or)(D,...C.map(O=>(0,t._)`${(0,e.usePattern)(l,O)}.test(${A})`))),(0,t.not)(D)}function E(A){c.code((0,t._)`delete ${g}[${A}]`)}function k(A){if(b.removeAdditional==="all"||b.removeAdditional&&u===!1){E(A);return}if(u===!1){l.setParams({additionalProperty:A}),l.error(),v||c.break();return}if(typeof u=="object"&&!(0,a.alwaysValidSchema)(f,u)){const D=c.name("valid");b.removeAdditional==="failing"?(x(A,D,!1),c.if((0,t.not)(D),()=>{l.reset(),E(A)})):(x(A,D),v||c.if((0,t.not)(D),()=>c.break()))}}function x(A,D,O){const N={keyword:"additionalProperties",dataProp:A,dataPropType:a.Type.Str};O===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(N,D)}}};return ih.default=i,ih}var sh={},IA;function IW(){if(IA)return sh;IA=1,Object.defineProperty(sh,"__esModule",{value:!0});const e=Rv(),t=kr(),o=Nt(),a=LL(),n={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:l,schema:c,parentSchema:u,data:p,it:g}=i;g.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&a.default.code(new e.KeywordCxt(g,a.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(c);for(const C of m)g.definedProperties.add(C);g.opts.unevaluated&&m.length&&g.props!==!0&&(g.props=o.mergeEvaluated.props(l,(0,o.toHash)(m),g.props));const f=m.filter(C=>!(0,o.alwaysValidSchema)(g,c[C]));if(f.length===0)return;const v=l.name("valid");for(const C of f)b(C)?S(C):(l.if((0,t.propertyInData)(l,p,C,g.opts.ownProperties)),S(C),g.allErrors||l.else().var(v,!0),l.endIf()),i.it.definedProperties.add(C),i.ok(v);function b(C){return g.opts.useDefaults&&!g.compositeRule&&c[C].default!==void 0}function S(C){i.subschema({keyword:"properties",schemaProp:C,dataProp:C},v)}}};return sh.default=n,sh}var lh={},MA;function MW(){if(MA)return lh;MA=1,Object.defineProperty(lh,"__esModule",{value:!0});const e=kr(),t=bt(),o=Nt(),a=Nt(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:l,schema:c,data:u,parentSchema:p,it:g}=i,{opts:m}=g,f=(0,e.allSchemaProperties)(c),v=f.filter(k=>(0,o.alwaysValidSchema)(g,c[k]));if(f.length===0||v.length===f.length&&(!g.opts.unevaluated||g.props===!0))return;const b=m.strictSchema&&!m.allowMatchingProperties&&p.properties,S=l.name("valid");g.props!==!0&&!(g.props instanceof t.Name)&&(g.props=(0,a.evaluatedPropsToName)(l,g.props));const{props:C}=g;w();function w(){for(const k of f)b&&_(k),g.allErrors?E(k):(l.var(S,!0),E(k),l.if(S))}function _(k){for(const x in b)new RegExp(k).test(x)&&(0,o.checkStrictMode)(g,`property ${x} matches pattern ${k} (use allowMatchingProperties)`)}function E(k){l.forIn("key",u,x=>{l.if((0,t._)`${(0,e.usePattern)(i,k)}.test(${x})`,()=>{const A=v.includes(k);A||i.subschema({keyword:"patternProperties",schemaProp:k,dataProp:x,dataPropType:a.Type.Str},S),g.opts.unevaluated&&C!==!0?l.assign((0,t._)`${C}[${x}]`,!0):!A&&!g.allErrors&&l.if((0,t.not)(S),()=>l.break())})})}}};return lh.default=n,lh}var ch={},LA;function LW(){if(LA)return ch;LA=1,Object.defineProperty(ch,"__esModule",{value:!0});const e=Nt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){const{gen:a,schema:n,it:i}=o;if((0,e.alwaysValidSchema)(i,n)){o.fail();return}const l=a.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),o.failResult(l,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};return ch.default=t,ch}var dh={},NA;function NW(){if(NA)return dh;NA=1,Object.defineProperty(dh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kr().validateUnion,error:{message:"must match a schema in anyOf"}};return dh.default=t,dh}var uh={},FA;function FW(){if(FA)return uh;FA=1,Object.defineProperty(uh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:i,schema:l,parentSchema:c,it:u}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;const p=l,g=i.let("valid",!1),m=i.let("passing",null),f=i.name("_valid");n.setParams({passing:m}),i.block(v),n.result(g,()=>n.reset(),()=>n.error(!0));function v(){p.forEach((b,S)=>{let C;(0,t.alwaysValidSchema)(u,b)?i.var(f,!0):C=n.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},f),S>0&&i.if((0,e._)`${f} && ${g}`).assign(g,!1).assign(m,(0,e._)`[${m}, ${S}]`).else(),i.if(f,()=>{i.assign(g,!0),i.assign(m,S),C&&n.mergeEvaluated(C,e.Name)})})}}};return uh.default=a,uh}var ph={},BA;function BW(){if(BA)return ph;BA=1,Object.defineProperty(ph,"__esModule",{value:!0});const e=Nt(),t={keyword:"allOf",schemaType:"array",code(o){const{gen:a,schema:n,it:i}=o;if(!Array.isArray(n))throw new Error("ajv implementation error");const l=a.name("valid");n.forEach((c,u)=>{if((0,e.alwaysValidSchema)(i,c))return;const p=o.subschema({keyword:"allOf",schemaProp:u},l);o.ok(l),o.mergeEvaluated(p)})}};return ph.default=t,ph}var mh={},jA;function jW(){if(jA)return mh;jA=1,Object.defineProperty(mh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:l,parentSchema:c,it:u}=i;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const p=n(u,"then"),g=n(u,"else");if(!p&&!g)return;const m=l.let("valid",!0),f=l.name("_valid");if(v(),i.reset(),p&&g){const S=l.let("ifClause");i.setParams({ifClause:S}),l.if(f,b("then",S),b("else",S))}else p?l.if(f,b("then")):l.if((0,e.not)(f),b("else"));i.pass(m,()=>i.error(!0));function v(){const S=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);i.mergeEvaluated(S)}function b(S,C){return()=>{const w=i.subschema({keyword:S},f);l.assign(m,f),i.mergeValidEvaluated(w,m),C?l.assign(C,(0,e._)`${S}`):i.setParams({ifClause:S})}}}};function n(i,l){const c=i.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(i,c)}return mh.default=a,mh}var gh={},UA;function UW(){if(UA)return gh;UA=1,Object.defineProperty(gh,"__esModule",{value:!0});const e=Nt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:a,it:n}){a.if===void 0&&(0,e.checkStrictMode)(n,`"${o}" without "if" is ignored`)}};return gh.default=t,gh}var zA;function zW(){if(zA)return th;zA=1,Object.defineProperty(th,"__esModule",{value:!0});const e=IL(),t=EW(),o=ML(),a=RW(),n=AW(),i=DW(),l=OW(),c=LL(),u=IW(),p=MW(),g=LW(),m=NW(),f=FW(),v=BW(),b=jW(),S=UW();function C(w=!1){const _=[g.default,m.default,f.default,v.default,b.default,S.default,l.default,c.default,i.default,u.default,p.default];return w?_.push(t.default,a.default):_.push(e.default,o.default),_.push(n.default),_}return th.default=C,th}var hh={},fh={},$A;function $W(){if($A)return fh;$A=1,Object.defineProperty(fh,"__esModule",{value:!0});const e=bt(),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,e.str)`must match format "${a}"`,params:({schemaCode:a})=>(0,e._)`{format: ${a}}`},code(a,n){const{gen:i,data:l,$data:c,schema:u,schemaCode:p,it:g}=a,{opts:m,errSchemaPath:f,schemaEnv:v,self:b}=g;if(!m.validateFormats)return;c?S():C();function S(){const w=i.scopeValue("formats",{ref:b.formats,code:m.code.formats}),_=i.const("fDef",(0,e._)`${w}[${p}]`),E=i.let("fType"),k=i.let("format");i.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>i.assign(E,(0,e._)`${_}.type || "string"`).assign(k,(0,e._)`${_}.validate`),()=>i.assign(E,(0,e._)`"string"`).assign(k,_)),a.fail$data((0,e.or)(x(),A()));function x(){return m.strictSchema===!1?e.nil:(0,e._)`${p} && !${k}`}function A(){const D=v.$async?(0,e._)`(${_}.async ? await ${k}(${l}) : ${k}(${l}))`:(0,e._)`${k}(${l})`,O=(0,e._)`(typeof ${k} == "function" ? ${D} : ${k}.test(${l}))`;return(0,e._)`${k} && ${k} !== true && ${E} === ${n} && !${O}`}}function C(){const w=b.formats[u];if(!w){x();return}if(w===!0)return;const[_,E,k]=A(w);_===n&&a.pass(D());function x(){if(m.strictSchema===!1){b.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${u}" ignored in schema at path "${f}"`}}function A(O){const N=O instanceof RegExp?(0,e.regexpCode)(O):m.code.formats?(0,e._)`${m.code.formats}${(0,e.getProperty)(u)}`:void 0,$=i.scopeValue("formats",{key:u,ref:O,code:N});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${$}.validate`]:["string",O,$]}function D(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${k}(${l})`}return typeof E=="function"?(0,e._)`${k}(${l})`:(0,e._)`${k}.test(${l})`}}}};return fh.default=o,fh}var qA;function qW(){if(qA)return hh;qA=1,Object.defineProperty(hh,"__esModule",{value:!0});const t=[$W().default];return hh.default=t,hh}var ll={},VA;function VW(){return VA||(VA=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.contentVocabulary=ll.metadataVocabulary=void 0,ll.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ll.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ll}var HA;function HW(){if(HA)return jg;HA=1,Object.defineProperty(jg,"__esModule",{value:!0});const e=hW(),t=xW(),o=zW(),a=qW(),n=VW(),i=[e.default,t.default,(0,o.default)(),a.default,n.metadataVocabulary,n.contentVocabulary];return jg.default=i,jg}var vh={},Iu={},GA;function GW(){if(GA)return Iu;GA=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Iu.DiscrError=e={})),Iu}var KA;function KW(){if(KA)return vh;KA=1,Object.defineProperty(vh,"__esModule",{value:!0});const e=bt(),t=GW(),o=eC(),a=Av(),n=Nt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:u}})=>c===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:p}})=>(0,e._)`{error: ${c}, tag: ${p}, tagValue: ${u}}`},code(c){const{gen:u,data:p,schema:g,parentSchema:m,it:f}=c,{oneOf:v}=m;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=g.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(g.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const S=u.let("valid",!1),C=u.const("tag",(0,e._)`${p}${(0,e.getProperty)(b)}`);u.if((0,e._)`typeof ${C} == "string"`,()=>w(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:C,tagName:b})),c.ok(S);function w(){const k=E();u.if(!1);for(const x in k)u.elseIf((0,e._)`${C} === ${x}`),u.assign(S,_(k[x]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:C,tagName:b}),u.endIf()}function _(k){const x=u.name("valid"),A=c.subschema({keyword:"oneOf",schemaProp:k},x);return c.mergeEvaluated(A,e.Name),x}function E(){var k;const x={},A=O(m);let D=!0;for(let F=0;F<v.length;F++){let z=v[F];if(z?.$ref&&!(0,n.schemaHasRulesButRef)(z,f.self.RULES)){const K=z.$ref;if(z=o.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,K),z instanceof o.SchemaEnv&&(z=z.schema),z===void 0)throw new a.default(f.opts.uriResolver,f.baseId,K)}const j=(k=z?.properties)===null||k===void 0?void 0:k[b];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);D=D&&(A||O(z)),N(j,F)}if(!D)throw new Error(`discriminator: "${b}" must be required`);return x;function O({required:F}){return Array.isArray(F)&&F.includes(b)}function N(F,z){if(F.const)$(F.const,z);else if(F.enum)for(const j of F.enum)$(j,z);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function $(F,z){if(typeof F!="string"||F in x)throw new Error(`discriminator: "${b}" values must be unique strings`);x[F]=z}}}};return vh.default=l,vh}const WW="http://json-schema.org/draft-07/schema#",YW="http://json-schema.org/draft-07/schema#",ZW="Core schema meta-schema",QW={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},JW=["object","boolean"],XW={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},eY={$schema:WW,$id:YW,title:ZW,definitions:QW,type:JW,properties:XW,default:!0};var WA;function tY(){return WA||(WA=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const o=pW(),a=HW(),n=KW(),i=eY,l=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends o.default{_addVocabularies(){super._addVocabularies(),a.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(i,l):i;this.addMetaSchema(b,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var p=Rv();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var g=bt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}});var m=X_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=Av();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(Mg,Mg.exports)),Mg.exports}var bh={exports:{}},KS={},YA;function oY(){return YA||(YA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(F,z){return{validate:F,compare:z}}e.fullFormats={date:t(i,l),time:t(u(!0),p),"date-time":t(f(!0),v),"iso-time":t(u(),g),"iso-date-time":t(f(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:w,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:$,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:E,int32:{type:"number",validate:A},int64:{type:"number",validate:D},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,g),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function o(F){return F%4===0&&(F%100!==0||F%400===0)}const a=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(F){const z=a.exec(F);if(!z)return!1;const j=+z[1],K=+z[2],ne=+z[3];return K>=1&&K<=12&&ne>=1&&ne<=(K===2&&o(j)?29:n[K])}function l(F,z){if(F&&z)return F>z?1:F<z?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(F){return function(j){const K=c.exec(j);if(!K)return!1;const ne=+K[1],H=+K[2],Z=+K[3],te=K[4],le=K[5]==="-"?-1:1,Q=+(K[6]||0),M=+(K[7]||0);if(Q>23||M>59||F&&!te)return!1;if(ne<=23&&H<=59&&Z<60)return!0;const G=H-M*le,q=ne-Q*le-(G<0?1:0);return(q===23||q===-1)&&(G===59||G===-1)&&Z<61}}function p(F,z){if(!(F&&z))return;const j=new Date("2020-01-01T"+F).valueOf(),K=new Date("2020-01-01T"+z).valueOf();if(j&&K)return j-K}function g(F,z){if(!(F&&z))return;const j=c.exec(F),K=c.exec(z);if(j&&K)return F=j[1]+j[2]+j[3],z=K[1]+K[2]+K[3],F>z?1:F<z?-1:0}const m=/t|\s/i;function f(F){const z=u(F);return function(K){const ne=K.split(m);return ne.length===2&&i(ne[0])&&z(ne[1])}}function v(F,z){if(!(F&&z))return;const j=new Date(F).valueOf(),K=new Date(z).valueOf();if(j&&K)return j-K}function b(F,z){if(!(F&&z))return;const[j,K]=F.split(m),[ne,H]=z.split(m),Z=l(j,ne);if(Z!==void 0)return Z||p(K,H)}const S=/\/|:/,C=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function w(F){return S.test(F)&&C.test(F)}const _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function E(F){return _.lastIndex=0,_.test(F)}const k=-2147483648,x=2**31-1;function A(F){return Number.isInteger(F)&&F<=x&&F>=k}function D(F){return Number.isInteger(F)}function O(){return!0}const N=/[^\\]\\Z/;function $(F){if(N.test(F))return!1;try{return new RegExp(F),!0}catch{return!1}}})(KS)),KS}var WS={},ZA;function aY(){return ZA||(ZA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=tY(),o=bt(),a=o.operators,n={formatMaximum:{okStr:"<=",ok:a.LTE,fail:a.GT},formatMinimum:{okStr:">=",ok:a.GTE,fail:a.LT},formatExclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},formatExclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}},i={message:({keyword:c,schemaCode:u})=>(0,o.str)`should be ${n[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>(0,o._)`{comparison: ${n[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:i,code(c){const{gen:u,data:p,schemaCode:g,keyword:m,it:f}=c,{opts:v,self:b}=f;if(!v.validateFormats)return;const S=new t.KeywordCxt(f,b.RULES.all.format.definition,"format");S.$data?C():w();function C(){const E=u.scopeValue("formats",{ref:b.formats,code:v.code.formats}),k=u.const("fmt",(0,o._)`${E}[${S.schemaCode}]`);c.fail$data((0,o.or)((0,o._)`typeof ${k} != "object"`,(0,o._)`${k} instanceof RegExp`,(0,o._)`typeof ${k}.compare != "function"`,_(k)))}function w(){const E=S.schema,k=b.formats[E];if(!k||k===!0)return;if(typeof k!="object"||k instanceof RegExp||typeof k.compare!="function")throw new Error(`"${m}": format "${E}" does not define "compare" function`);const x=u.scopeValue("formats",{key:E,ref:k,code:v.code.formats?(0,o._)`${v.code.formats}${(0,o.getProperty)(E)}`:void 0});c.fail$data(_(x))}function _(E){return(0,o._)`${E}.compare(${p}, ${g}) ${n[m].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(WS)),WS}var QA;function nY(){return QA||(QA=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const o=oY(),a=aY(),n=bt(),i=new n.Name("fullFormats"),l=new n.Name("fastFormats"),c=(p,g={keywords:!0})=>{if(Array.isArray(g))return u(p,g,o.fullFormats,i),p;const[m,f]=g.mode==="fast"?[o.fastFormats,l]:[o.fullFormats,i],v=g.formats||o.formatNames;return u(p,v,m,f),g.keywords&&(0,a.default)(p),p};c.get=(p,g="full")=>{const f=(g==="fast"?o.fastFormats:o.fullFormats)[p];if(!f)throw new Error(`Unknown format "${p}"`);return f};function u(p,g,m,f){var v,b;(v=(b=p.opts.code).formats)!==null&&v!==void 0||(b.formats=(0,n._)`require("ajv-formats/dist/formats").${f}`);for(const S of g)p.addFormat(S,m[S])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(bh,bh.exports)),bh.exports}var rY=nY();const Lfe=Ll(rY);function iY({studioUrl:e,meshUrl:t},o){return e??t??o}let oC;oC=globalThis.crypto;async function sY(e){return(await oC).getRandomValues(new Uint8Array(e))}async function lY(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",o=Math.pow(2,8)-Math.pow(2,8)%t.length;let a="";for(;a.length<e;){const n=await sY(e-a.length);for(const i of n)i<o&&(a+=t[i%t.length])}return a}async function cY(e){return await lY(e)}async function dY(e){const t=await(await oC).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Nfe(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await cY(e),o=await dY(t);return{code_verifier:t,code_challenge:o}}const _a=v9().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:uH.custom,message:"URL must be parseable",fatal:!0}),fq}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Ffe=Ca({resource:V().url(),authorization_servers:Fe(_a).optional(),jwks_uri:V().url().optional(),scopes_supported:Fe(V()).optional(),bearer_methods_supported:Fe(V()).optional(),resource_signing_alg_values_supported:Fe(V()).optional(),resource_name:V().optional(),resource_documentation:V().optional(),resource_policy_uri:V().url().optional(),resource_tos_uri:V().url().optional(),tls_client_certificate_bound_access_tokens:$t().optional(),authorization_details_types_supported:Fe(V()).optional(),dpop_signing_alg_values_supported:Fe(V()).optional(),dpop_bound_access_tokens_required:$t().optional()}),uY=Ca({issuer:V(),authorization_endpoint:_a,token_endpoint:_a,registration_endpoint:_a.optional(),scopes_supported:Fe(V()).optional(),response_types_supported:Fe(V()),response_modes_supported:Fe(V()).optional(),grant_types_supported:Fe(V()).optional(),token_endpoint_auth_methods_supported:Fe(V()).optional(),token_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),service_documentation:_a.optional(),revocation_endpoint:_a.optional(),revocation_endpoint_auth_methods_supported:Fe(V()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),introspection_endpoint:V().optional(),introspection_endpoint_auth_methods_supported:Fe(V()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),code_challenge_methods_supported:Fe(V()).optional(),client_id_metadata_document_supported:$t().optional()}),pY=Ca({issuer:V(),authorization_endpoint:_a,token_endpoint:_a,userinfo_endpoint:_a.optional(),jwks_uri:_a,registration_endpoint:_a.optional(),scopes_supported:Fe(V()).optional(),response_types_supported:Fe(V()),response_modes_supported:Fe(V()).optional(),grant_types_supported:Fe(V()).optional(),acr_values_supported:Fe(V()).optional(),subject_types_supported:Fe(V()),id_token_signing_alg_values_supported:Fe(V()),id_token_encryption_alg_values_supported:Fe(V()).optional(),id_token_encryption_enc_values_supported:Fe(V()).optional(),userinfo_signing_alg_values_supported:Fe(V()).optional(),userinfo_encryption_alg_values_supported:Fe(V()).optional(),userinfo_encryption_enc_values_supported:Fe(V()).optional(),request_object_signing_alg_values_supported:Fe(V()).optional(),request_object_encryption_alg_values_supported:Fe(V()).optional(),request_object_encryption_enc_values_supported:Fe(V()).optional(),token_endpoint_auth_methods_supported:Fe(V()).optional(),token_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),display_values_supported:Fe(V()).optional(),claim_types_supported:Fe(V()).optional(),claims_supported:Fe(V()).optional(),service_documentation:V().optional(),claims_locales_supported:Fe(V()).optional(),ui_locales_supported:Fe(V()).optional(),claims_parameter_supported:$t().optional(),request_parameter_supported:$t().optional(),request_uri_parameter_supported:$t().optional(),require_request_uri_registration:$t().optional(),op_policy_uri:_a.optional(),op_tos_uri:_a.optional(),client_id_metadata_document_supported:$t().optional()}),Bfe=_e({...pY.shape,...uY.pick({code_challenge_methods_supported:!0}).shape}),jfe=_e({access_token:V(),id_token:V().optional(),token_type:V(),expires_in:JM().optional(),scope:V().optional(),refresh_token:V().optional()}).strip(),Ufe=_e({error:V(),error_description:V().optional(),error_uri:V().optional()}),JA=_a.optional().or(Ze("").transform(()=>{})),mY=_e({redirect_uris:Fe(_a),token_endpoint_auth_method:V().optional(),grant_types:Fe(V()).optional(),response_types:Fe(V()).optional(),client_name:V().optional(),client_uri:_a.optional(),logo_uri:JA,scope:V().optional(),contacts:Fe(V()).optional(),tos_uri:JA,policy_uri:V().optional(),jwks_uri:_a.optional(),jwks:B9().optional(),software_id:V().optional(),software_version:V().optional(),software_statement:V().optional()}).strip(),gY=_e({client_id:V(),client_secret:V().optional(),client_id_issued_at:Lt().optional(),client_secret_expires_at:Lt().optional()}).strip(),zfe=mY.merge(gY);_e({error:V(),error_description:V().optional()}).strip();_e({token:V(),token_type_hint:V().optional()}).strip();class Ea extends Error{constructor(t,o){super(t),this.errorUri=o,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class IT extends Ea{}IT.errorCode="invalid_request";class MT extends Ea{}MT.errorCode="invalid_client";class LT extends Ea{}LT.errorCode="invalid_grant";class NT extends Ea{}NT.errorCode="unauthorized_client";class FT extends Ea{}FT.errorCode="unsupported_grant_type";class BT extends Ea{}BT.errorCode="invalid_scope";class jT extends Ea{}jT.errorCode="access_denied";class UT extends Ea{}UT.errorCode="server_error";class zT extends Ea{}zT.errorCode="temporarily_unavailable";class $T extends Ea{}$T.errorCode="unsupported_response_type";class qT extends Ea{}qT.errorCode="unsupported_token_type";class VT extends Ea{}VT.errorCode="invalid_token";class HT extends Ea{}HT.errorCode="method_not_allowed";class GT extends Ea{}GT.errorCode="too_many_requests";class KT extends Ea{}KT.errorCode="invalid_client_metadata";class WT extends Ea{}WT.errorCode="insufficient_scope";class YT extends Ea{}YT.errorCode="invalid_target";const $fe={[IT.errorCode]:IT,[MT.errorCode]:MT,[LT.errorCode]:LT,[NT.errorCode]:NT,[FT.errorCode]:FT,[BT.errorCode]:BT,[jT.errorCode]:jT,[UT.errorCode]:UT,[zT.errorCode]:zT,[$T.errorCode]:$T,[qT.errorCode]:qT,[VT.errorCode]:VT,[HT.errorCode]:HT,[GT.errorCode]:GT,[KT.errorCode]:KT,[WT.errorCode]:WT,[YT.errorCode]:YT};async function NL(e){if(!e.getServerCapabilities()?.resources)return{resources:[]};try{return await e.listResources()}catch(o){if(o instanceof kv&&o.code===Pp.MethodNotFound)return{resources:[]};throw o}}async function hY(e,t){return await e.readResource({uri:t})}function qfe(e){const t=Ie.c(12);let o,a;t[0]!==e?({client:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=On.mcpResourcesList(o),t[3]=o,t[4]=n):n=t[4];let i;t[5]!==o?(i=()=>NL(o),t[5]=o,t[6]=i):i=t[6];const l=a.staleTime??3e4;let c;return t[7]!==a||t[8]!==n||t[9]!==i||t[10]!==l?(c={...a,queryKey:n,queryFn:i,staleTime:l,retry:!1},t[7]=a,t[8]=n,t[9]=i,t[10]=l,t[11]=c):c=t[11],Nl(c)}function Vfe(e){const t=Ie.c(12);let o,a;t[0]!==e?({client:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=On.mcpResourcesList(o),t[3]=o,t[4]=n):n=t[4];let i;t[5]!==o?(i=()=>NL(o),t[5]=o,t[6]=i):i=t[6];const l=a.staleTime??3e4;let c;return t[7]!==a||t[8]!==n||t[9]!==i||t[10]!==l?(c={...a,queryKey:n,queryFn:i,staleTime:l,retry:!1},t[7]=a,t[8]=n,t[9]=i,t[10]=l,t[11]=c):c=t[11],Dd(c)}function Hfe(e){const t=Ie.c(15);let o,a,n;t[0]!==e?({client:o,uri:n,...a}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);let i;t[4]!==o||t[5]!==n?(i=On.mcpReadResource(o,n),t[4]=o,t[5]=n,t[6]=i):i=t[6];let l;t[7]!==o||t[8]!==n?(l=()=>hY(o,n),t[7]=o,t[8]=n,t[9]=l):l=t[9];const c=a.staleTime??3e4;let u;return t[10]!==a||t[11]!==i||t[12]!==l||t[13]!==c?(u={...a,queryKey:i,queryFn:l,staleTime:c,retry:!1},t[10]=a,t[11]=i,t[12]=l,t[13]=c,t[14]=u):u=t[14],Nl(u)}const FL="ui-resource-html";function Gfe(e){const t=Ie.c(22);let o,a,n,i,l,c;t[0]!==e?({orgSlug:n,connectionId:o,uri:c,studioUrl:l,meshUrl:a,...i}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i,t[5]=l,t[6]=c):(o=t[1],a=t[2],n=t[3],i=t[4],l=t[5],c=t[6]);let u;t[7]!==o||t[8]!==n||t[9]!==c?(u=On.mcpUiResourceHtml(n,o,c),t[7]=o,t[8]=n,t[9]=c,t[10]=u):u=t[10];let p;t[11]!==o||t[12]!==a||t[13]!==n||t[14]!==l||t[15]!==c?(p=async()=>{const v=`${iY({studioUrl:l,meshUrl:a},typeof window<"u"?window.location.origin:"")}/api/${encodeURIComponent(n)}/mcp/${encodeURIComponent(o)}/ui-resource?uri=${encodeURIComponent(c)}`,b=await fetch(v,{credentials:"include"});if(!b.ok)throw new Error(`Failed to read UI resource (${b.status})`);return b.text()},t[11]=o,t[12]=a,t[13]=n,t[14]=l,t[15]=c,t[16]=p):p=t[16];const g=i.staleTime??3e4;let m;return t[17]!==i||t[18]!==u||t[19]!==p||t[20]!==g?(m={...i,queryKey:u,queryFn:p,staleTime:g,retry:!1},t[17]=i,t[18]=u,t[19]=p,t[20]=g,t[21]=m):m=t[21],Nl(m)}const BL={featureNotInPlan:"feature_not_in_plan",aiBudgetExhausted:"ai_budget_exhausted"};class ZT extends Error{constructor(t,o,a){super(t),this.status=o,this.code=a,this.name="StudioToolError"}status;code}function jL(e){return e instanceof ZT&&Object.values(BL).includes(e.code??"")?e.code:null}async function fY(e,t,o){const a=await fetch(`/api/${encodeURIComponent(e)}/tools/${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o??{})});if(!a.ok){let n=`${t} failed (${a.status})`,i;try{const l=await a.json();l?.error&&(n=l.error),typeof l?.code=="string"&&(i=l.code)}catch{}throw new ZT(n,a.status,i)}try{return await a.json()}catch{throw new ZT(`${t} returned a non-JSON response`,a.status)}}function aC(){const e=Ie.c(5),{org:t}=Wp(),o=t.slug;let a;e[0]!==o?(a=(i,l)=>fY(o,i,l),e[0]=o,e[1]=a):a=e[1];let n;return e[2]!==o||e[3]!==a?(n={orgSlug:o,call:a},e[2]=o,e[3]=a,e[4]=n):n=e[4],n}const nC=5*6e4;async function UL(){return(await(await fetch("/api/config")).json()).config}function zL(){const e=Ie.c(1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:On.publicConfig(),queryFn:UL,staleTime:nC},e[0]=t):t=e[0];const{data:o}=Nl(t);return o}function Kfe(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:On.publicConfig(),queryFn:UL,staleTime:nC},e[0]=t):t=e[0],Dd(t).data}const $L=R.createContext(void 0);function vY(e){const t=Ie.c(3),{children:o}=e,a=zL();let n;return t[0]!==o||t[1]!==a.auth?(n=T.jsx($L.Provider,{value:a.auth,children:o}),t[0]=o,t[1]=a.auth,t[2]=n):n=t[2],n}function Wfe(){const e=R.useContext($L);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}var bY={},XA={};const Zh=Object.create(null),Mu=e=>bY||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Zh:globalThis),Gn=new Proxy(Zh,{get(e,t){return Mu()[t]??Zh[t]},has(e,t){return t in Mu()||t in Zh},set(e,t,o){const a=Mu(!0);return a[t]=o,!0},deleteProperty(e,t){if(!t)return!1;const o=Mu(!0);return delete o[t],!0},ownKeys(){const e=Mu(!0);return Object.keys(e)}});function Ko(e,t){return typeof process<"u"&&XA?XA[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Lu=1,ua=4,Br=8,kn=24,eD={eterm:ua,cons25:ua,console:ua,cygwin:ua,dtterm:ua,gnome:ua,hurd:ua,jfbterm:ua,konsole:ua,kterm:ua,mlterm:ua,mosh:kn,putty:ua,st:ua,"rxvt-unicode-24bit":kn,terminator:kn,"xterm-kitty":kn},yY=new Map(Object.entries({APPVEYOR:Br,BUILDKITE:Br,CIRCLECI:kn,DRONE:Br,GITEA_ACTIONS:kn,GITHUB_ACTIONS:kn,GITLAB_CI:Br,TRAVIS:Br})),SY=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function TY(){if(Ko("FORCE_COLOR")!==void 0)switch(Ko("FORCE_COLOR")){case"":case"1":case"true":return ua;case"2":return Br;case"3":return kn;default:return Lu}if(Ko("NODE_DISABLE_COLORS")!==void 0&&Ko("NODE_DISABLE_COLORS")!==""||Ko("NO_COLOR")!==void 0&&Ko("NO_COLOR")!==""||Ko("TERM")==="dumb")return Lu;if(Ko("TMUX"))return kn;if("TF_BUILD"in Gn&&"AGENT_NAME"in Gn)return ua;if("CI"in Gn){for(const{0:e,1:t}of yY)if(e in Gn)return t;return Ko("CI_NAME")==="codeship"?Br:Lu}if("TEAMCITY_VERSION"in Gn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Ko("TEAMCITY_VERSION"))!==null?ua:Lu;switch(Ko("TERM_PROGRAM")){case"iTerm.app":return!Ko("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Ko("TERM_PROGRAM_VERSION"))!==null?Br:kn;case"HyperTerm":case"MacTerm":return kn;case"Apple_Terminal":return Br}if(Ko("COLORTERM")==="truecolor"||Ko("COLORTERM")==="24bit")return kn;if(Ko("TERM")){if(/truecolor/.exec(Ko("TERM"))!==null)return kn;if(/^xterm-256/.exec(Ko("TERM"))!==null)return Br;const e=Ko("TERM").toLowerCase();if(eD[e])return eD[e];if(SY.some(t=>t.exec(e)!==null))return ua}return Ko("COLORTERM")?ua:Lu}const jr={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"}},QT=["debug","info","success","warn","error"];function wY(e,t){return QT.indexOf(t)>=QT.indexOf(e)}const _Y={info:jr.fg.blue,success:jr.fg.green,warn:jr.fg.yellow,error:jr.fg.red,debug:jr.fg.magenta},CY=(e,t,o)=>{const a=new Date().toISOString();return o?`${jr.dim}${a}${jr.reset} ${_Y[e]}${e.toUpperCase()}${jr.reset} ${jr.bright}[Better Auth]:${jr.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},PY=e=>{const t="warn",o=TY()!==1,a=(n,i,l=[])=>{if(!wY(t,n))return;const c=CY(n,i,o);{n==="error"?console.error(c,...l):n==="warn"?console.warn(c,...l):console.log(c,...l);return}};return{...Object.fromEntries(QT.map(n=>[n,(...[i,...l])=>a(n,i,l)])),get level(){return t}}};PY();function kY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var cp=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};function xY(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new cp(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function EY(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new cp(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof cp?t:new cp(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function YS(e,t="/api/auth"){if(EY(e),xY(e))return e;const o=e.replace(/\/+$/,"");return!t||t==="/"?o:(t=t.startsWith("/")?t:`/${t}`,`${o}${t}`)}function RY(e,t,o,a,n){if(e)return YS(e,t);{const i=Gn.BETTER_AUTH_URL||Gn.NEXT_PUBLIC_BETTER_AUTH_URL||Gn.PUBLIC_BETTER_AUTH_URL||Gn.NUXT_PUBLIC_BETTER_AUTH_URL||Gn.NUXT_PUBLIC_AUTH_URL||(Gn.BASE_URL!=="/"?Gn.BASE_URL:void 0);if(i)return YS(i,t)}if(typeof window<"u"&&window.location)return YS(window.location.origin,t)}const AY={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},DY={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},OY=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,tD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},IY=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function MY(e){return e instanceof Date&&!isNaN(e.getTime())}function LY(e){const t=IY.exec(e);if(!t)return null;const[,o,a,n,i,l,c,u,p,g,m]=t,f=new Date(Date.UTC(parseInt(o,10),parseInt(a,10)-1,parseInt(n,10),parseInt(i,10),parseInt(l,10),parseInt(c,10),u?parseInt(u.padEnd(3,"0"),10):0));if(p){const v=(parseInt(g,10)*60+parseInt(m,10))*(p==="+"?-1:1);f.setUTCMinutes(f.getUTCMinutes()+v)}return MY(f)?f:null}function NY(e,t={}){const{strict:o=!1,warnings:a=!1,reviver:n,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const c=l.toLowerCase();if(c.length<=9&&c in tD)return tD[c];if(!OY.test(l)){if(o)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(DY).some(([u,p])=>{const g=p.test(l);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${u} pattern`),g})&&o)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(p,g)=>{if(p==="__proto__"||p==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${p}" key to prevent prototype pollution`);return}if(i&&typeof g=="string"){const m=LY(g);if(m)return m}return n?n(p,g):g})}catch(u){if(o)throw u;return e}}function FY(e,t={strict:!0}){return NY(e,t)}let ur=[],cs=0;const yh=4,BY=globalThis.nanostoresGlobal||={epoch:0},Jc=e=>{let t=[],o={get(){return o.lc||o.listen(()=>{})(),o.value},init:e,lc:0,listen(a){return o.lc=t.push(a),()=>{for(let i=cs+yh;i<ur.length;)ur[i]===a?ur.splice(i,yh):i+=yh;let n=t.indexOf(a);~n&&(t.splice(n,1),--o.lc||o.off())}},notify(a,n){BY.epoch++;let i=!ur.length;for(let l of t)ur.push(l,o.value,a,n);if(i){for(cs=0;cs<ur.length;cs+=yh)ur[cs](ur[cs+1],ur[cs+2],ur[cs+3]);ur.length=0}},off(){},set(a){let n=o.value;n!==a&&(o.value=a,o.notify(n))},subscribe(a){let n=o.listen(a);return a(o.value),n},value:e};return o},jY=5,Sh=6,Th=10;let UY=(e,t,o,a)=>(e.events=e.events||{},e.events[o+Th]||(e.events[o+Th]=a(n=>{e.events[o].reduceRight((i,l)=>(l(i),i),{shared:{},...n})})),e.events[o]=e.events[o]||[],e.events[o].push(t),()=>{let n=e.events[o],i=n.indexOf(t);n.splice(i,1),n.length||(delete e.events[o],e.events[o+Th](),delete e.events[o+Th])});const zY=1e3;let qL=(e,t)=>UY(e,a=>{let n=t(a);n&&e.events[Sh].push(n)},jY,a=>{let n=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,a()),n(...l));let i=e.off;return e.events[Sh]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[Sh])l();e.events[Sh]=[]}},zY)},()=>{e.listen=n,e.off=i}});function $Y(e,t,o){let a=new Set(t).add(void 0);return e.listen((n,i,l)=>{a.has(l)&&o(n,i,l)})}const qY=()=>typeof window>"u",Qu=(e,t,o,a)=>{const n=Jc({data:null,error:null,isPending:!0,isRefetching:!1,refetch:c=>i(c)}),i=async c=>new Promise(u=>{const p=typeof a=="function"?a({data:n.get().data,error:n.get().error,isPending:n.get().isPending}):a;o(t,{...p,query:{...p?.query,...c?.query},async onSuccess(g){n.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:n.value.refetch}),await p?.onSuccess?.(g)},async onError(g){const{request:m}=g,f=typeof m.retry=="number"?m.retry:m.retry?.attempts,v=m.retryAttempt||0;f&&v<f||(n.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:n.value.refetch}),await p?.onError?.(g))},async onRequest(g){const m=n.get();n.set({isPending:m.data===null,data:m.data,error:null,isRefetching:!0,refetch:n.value.refetch}),await p?.onRequest?.(g)}}).catch(g=>{n.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:n.value.refetch})}).finally(()=>{u(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const c of e)c.subscribe(async()=>{qY()||(l?await i():qL(n,()=>{const u=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{n.off(),c.off(),clearTimeout(u)}}))});return n},ZS=Symbol.for("better-auth:broadcast-channel"),VY=()=>Math.floor(Date.now()/1e3);var HY=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:VY()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const o=JSON.parse(t.newValue??"{}");o?.event!=="session"||!o?.data||this.listeners.forEach(a=>a(o))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function QS(e="better-auth.message"){return globalThis[ZS]||(globalThis[ZS]=new HY(e)),globalThis[ZS]}const JS=Symbol.for("better-auth:focus-manager");var GY=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function oD(){return globalThis[JS]||(globalThis[JS]=new GY),globalThis[JS]}const XS=Symbol.for("better-auth:online-manager");var KY=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function e0(){return globalThis[XS]||(globalThis[XS]=new KY),globalThis[XS]}const Dc=()=>Math.floor(Date.now()/1e3),WY=5;function YY(e){const{sessionAtom:t,sessionSignal:o,$fetch:a,options:n={}}=e,i=n.sessionOptions?.refetchInterval??0,l=n.sessionOptions?.refetchOnWindowFocus??!0,c=n.sessionOptions?.refetchWhenOffline??!1,u={lastSync:0,lastSessionRequest:0,cachedSession:void 0},p=()=>c||e0().isOnline,g=_=>{if(!p())return;if(_?.event==="storage"){u.lastSync=Dc(),o.set(!o.get());return}const E=t.get();if(_?.event==="poll"){u.lastSessionRequest=Dc(),a("/get-session").then(k=>{k.error?t.set({...E,data:null,error:k.error}):t.set({...E,data:k.data,error:null}),u.lastSync=Dc(),o.set(!o.get())}).catch(()=>{});return}if(_?.event==="visibilitychange"){if(Dc()-u.lastSessionRequest<WY)return;u.lastSessionRequest=Dc()}(E?.data===null||E?.data===void 0||_?.event==="visibilitychange")&&(u.lastSync=Dc(),o.set(!o.get()))},m=_=>{QS().post({event:"session",data:{trigger:_},clientId:Math.random().toString(36).substring(7)})},f=()=>{i&&i>0&&(u.pollInterval=setInterval(()=>{t.get()?.data&&g({event:"poll"})},i*1e3))},v=()=>{u.unsubscribeBroadcast=QS().subscribe(()=>{g({event:"storage"})})},b=()=>{l&&(u.unsubscribeFocus=oD().subscribe(()=>{g({event:"visibilitychange"})}))},S=()=>{u.unsubscribeOnline=e0().subscribe(_=>{_&&g({event:"visibilitychange"})})};return{init:()=>{f(),v(),b(),S(),QS().setup(),oD().setup(),e0().setup()},cleanup:()=>{u.pollInterval&&(clearInterval(u.pollInterval),u.pollInterval=void 0),u.unsubscribeBroadcast&&(u.unsubscribeBroadcast(),u.unsubscribeBroadcast=void 0),u.unsubscribeFocus&&(u.unsubscribeFocus(),u.unsubscribeFocus=void 0),u.unsubscribeOnline&&(u.unsubscribeOnline(),u.unsubscribeOnline=void 0),u.lastSync=0,u.lastSessionRequest=0,u.cachedSession=void 0},triggerRefetch:g,broadcastSessionUpdate:m}}function ZY(e,t){const o=Jc(!1),a=Qu(o,"/get-session",e,{method:"GET"});return qL(a,()=>{const n=YY({sessionAtom:a,sessionSignal:o,$fetch:e,options:t});return n.init(),()=>{n.cleanup()}}),{session:a,$sessionSignal:o}}function t0(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function JT(e,t,o=".",a){if(!t0(t))return JT(e,{},o,a);const n={...t};for(const i of Object.keys(e)){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(a&&a(n,i,l,o)||(Array.isArray(l)&&Array.isArray(n[i])?n[i]=[...l,...n[i]]:t0(l)&&t0(n[i])?n[i]=JT(l,n[i],(o?`${o}.`:"")+i.toString(),a):n[i]=l))}return n}function QY(e){return(...t)=>t.reduce((o,a)=>JT(o,a,"",e),{})}const JY=QY();var XY=Object.defineProperty,eZ=Object.defineProperties,tZ=Object.getOwnPropertyDescriptors,aD=Object.getOwnPropertySymbols,oZ=Object.prototype.hasOwnProperty,aZ=Object.prototype.propertyIsEnumerable,nD=(e,t,o)=>t in e?XY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,hr=(e,t)=>{for(var o in t||(t={}))oZ.call(t,o)&&nD(e,o,t[o]);if(aD)for(var o of aD(t))aZ.call(t,o)&&nD(e,o,t[o]);return e},Nr=(e,t)=>eZ(e,tZ(t)),nZ=class extends Error{constructor(e,t,o){super(t||e.toString(),{cause:o}),this.status=e,this.statusText=t,this.error=o,Error.captureStackTrace(this,this.constructor)}},rZ=async(e,t)=>{var o,a,n,i,l,c;let u=t||{};const p={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:u,hooks:p};for(const g of t?.plugins||[]){if(g.init){const m=await((o=g.init)==null?void 0:o.call(g,e.toString(),t));u=m.options||u,e=m.url}p.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),p.onResponse.push((n=g.hooks)==null?void 0:n.onResponse),p.onSuccess.push((i=g.hooks)==null?void 0:i.onSuccess),p.onError.push((l=g.hooks)==null?void 0:l.onError),p.onRetry.push((c=g.hooks)==null?void 0:c.onRetry)}return{url:e,options:u,hooks:p}},rD=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},iZ=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function sZ(e){if(typeof e=="number")return new rD({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new rD(e);case"exponential":return new iZ(e);default:throw new Error("Invalid retry strategy")}}var lZ=async e=>{const t={},o=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await o(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const[a,n]=await Promise.all([o(e.auth.username),o(e.auth.password)]);if(!a||!n)return t;t.authorization=`Basic ${btoa(`${a}:${n}`)}`}else if(e.auth.type==="Custom"){const[a,n]=await Promise.all([o(e.auth.prefix),o(e.auth.value)]);if(!n)return t;t.authorization=`${a??""} ${n}`}}return t},cZ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function dZ(e){const t=e.headers.get("content-type"),o=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return cZ.test(a)?"json":o.has(a)||a.startsWith("text/")?"text":"blob"}function uZ(e){try{return JSON.parse(e),!0}catch{return!1}}function XT(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function iD(e){try{return JSON.parse(e)}catch{return e}}function sD(e){return typeof e=="function"}function pZ(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&sD(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&sD(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function mZ(e){const t=new Headers(e?.headers),o=await lZ(e);for(const[a,n]of Object.entries(o||{}))t.set(a,n);if(!t.has("content-type")){const a=gZ(e?.body);a&&t.set("content-type",a)}return t}function gZ(e){return XT(e)?"application/json":null}function hZ(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(XT(e.body)&&!t.has("content-type")){for(const[o,a]of Object.entries(e?.body))a instanceof Date&&(e.body[o]=a.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&t.get("content-type")==="application/x-www-form-urlencoded"&&XT(e.body)?new URLSearchParams(e.body).toString():e.body}function fZ(e,t){var o;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(o=e.split("@")[1])==null?void 0:o.split("/")[0];return HL.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function vZ(e,t){let o;return!e?.signal&&e?.timeout&&(o=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:o,clearTimeout:()=>{o&&clearTimeout(o)}}}var bZ=class VL extends Error{constructor(t,o){super(o||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,VL.prototype)}};async function Qh(e,t){const o=await e["~standard"].validate(t);if(o.issues)throw new bZ(o.issues);return o.value}var HL=["get","post","put","patch","delete"],yZ=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,o){var a,n,i,l;const c=((n=(a=e.plugins)==null?void 0:a.find(u=>{var p;return(p=u.schema)!=null&&p.config?t.startsWith(u.schema.config.baseURL||"")||t.startsWith(u.schema.config.prefix||""):!1}))==null?void 0:n.schema)||e.schema;if(c){let u=t;(i=c.config)!=null&&i.prefix&&u.startsWith(c.config.prefix)&&(u=u.replace(c.config.prefix,""),c.config.baseURL&&(t=t.replace(c.config.prefix,c.config.baseURL))),(l=c.config)!=null&&l.baseURL&&u.startsWith(c.config.baseURL)&&(u=u.replace(c.config.baseURL,""));const p=c.schema[u];if(p){let g=Nr(hr({},o),{method:p.method,output:p.output});return o?.disableValidation||(g=Nr(hr({},g),{body:p.input?await Qh(p.input,o?.body):o?.body,params:p.params?await Qh(p.params,o?.params):o?.params,query:p.query?await Qh(p.query,o?.query):o?.query})),{url:t,options:g}}}return{url:t,options:o}}}),SZ=e=>{async function t(o,a){const n=Nr(hr(hr({},e),a),{plugins:[...e?.plugins||[],yZ(e||{}),...a?.plugins||[]]});if(e?.catchAllError)try{return await ew(o,n)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await ew(o,n)}return t};function TZ(e,t){const{baseURL:o,params:a,query:n}=t||{query:{},params:{},baseURL:""};let i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):o||"";if(e.startsWith("@")){const m=e.toString().split("@")[1].split("/")[0];HL.includes(m)&&(e=e.replace(`@${m}/`,"/"))}i.endsWith("/")||(i+="/");let[l,c]=e.replace(i,"").split("?");const u=new URLSearchParams(c);for(const[m,f]of Object.entries(n||{})){if(f==null)continue;let v;if(typeof f=="string")v=f;else if(Array.isArray(f)){for(const b of f)u.append(m,b);continue}else v=JSON.stringify(f);u.set(m,v)}if(a)if(Array.isArray(a)){const m=l.split("/").filter(f=>f.startsWith(":"));for(const[f,v]of m.entries()){const b=a[f];l=l.replace(v,b)}}else for(const[m,f]of Object.entries(a))l=l.replace(`:${m}`,String(f));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let p=u.toString();return p=p.length>0?`?${p}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${p}`,i):`${i}${l}${p}`}var ew=async(e,t)=>{var o,a,n,i,l,c,u,p;const{hooks:g,url:m,options:f}=await rZ(e,t),v=pZ(f),b=new AbortController,S=(o=f.signal)!=null?o:b.signal,C=TZ(m,f),w=hZ(f),_=await mZ(f),E=fZ(m,f);let k=Nr(hr({},f),{url:C,headers:_,body:w,method:E,signal:S});for(const j of g.onRequest)if(j){const K=await j(k);typeof K=="object"&&K!==null&&(k=K)}("pipeTo"in k&&typeof k.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in k||(k.duplex="half"));const{clearTimeout:x}=vZ(f,b);let A=await v(k.url,k);x();const D={response:A,request:k};for(const j of g.onResponse)if(j){const K=await j(Nr(hr({},D),{response:(n=t?.hookOptions)!=null&&n.cloneResponse?A.clone():A}));K instanceof Response?A=K:typeof K=="object"&&K!==null&&(A=K.response)}if(A.ok){if(!(k.method!=="HEAD"))return{data:"",error:null};const K=dZ(A),ne={data:null,response:A,request:k};if(K==="json"||K==="text"){const H=await A.text(),Z=(i=k.jsonParser)!=null?i:iD;ne.data=await Z(H)}else ne.data=await A[K]();k?.output&&k.output&&!k.disableValidation&&(ne.data=await Qh(k.output,ne.data));for(const H of g.onSuccess)H&&await H(Nr(hr({},ne),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?A.clone():A}));return t?.throw?ne.data:{data:ne.data,error:null}}const O=(c=t?.jsonParser)!=null?c:iD,N=await A.text(),$=uZ(N),F=$?await O(N):null,z={response:A,responseText:N,request:k,error:Nr(hr({},F),{status:A.status,statusText:A.statusText})};for(const j of g.onError)j&&await j(Nr(hr({},z),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?A.clone():A}));if(t?.retry){const j=sZ(t.retry),K=(p=t.retryAttempt)!=null?p:0;if(await j.shouldAttemptRetry(K,A)){for(const H of g.onRetry)H&&await H(D);const ne=j.getDelay(K);return await new Promise(H=>setTimeout(H,ne)),await ew(e,Nr(hr({},t),{retryAttempt:K+1}))}}if(t?.throw)throw new nZ(A.status,A.statusText,$?F:N);return{data:null,error:Nr(hr({},F),{status:A.status,statusText:A.statusText})}};const wZ=(e,t)=>{const o="credentials"in Request.prototype,a=RY(e?.baseURL,e?.basePath)??"/api/auth",n=e?.plugins?.flatMap(k=>k.fetchPlugins).filter(k=>k!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:l,onError:c,onRequest:u,onResponse:p,...g}=e?.fetchOptions||{},m=SZ({baseURL:a,...o?{credentials:"include"}:{},method:"GET",jsonParser(k){return k?FY(k,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[i,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[AY],...n]}),{$sessionSignal:f,session:v}=ZY(m,e),b=e?.plugins||[];let S={};const C={$sessionSignal:f,session:v},w={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},_=[{signal:"$sessionSignal",matcher(k){return k==="/sign-out"||k==="/update-user"||k==="/sign-up/email"||k==="/sign-in/email"||k==="/delete-user"||k==="/verify-email"||k==="/revoke-sessions"||k==="/revoke-session"||k==="/change-email"}}];for(const k of b)k.getAtoms&&Object.assign(C,k.getAtoms?.(m)),k.pathMethods&&Object.assign(w,k.pathMethods),k.atomListeners&&_.push(...k.atomListeners);const E={notify:k=>{C[k].set(!C[k].get())},listen:(k,x)=>{C[k].subscribe(x)},atoms:C};for(const k of b)k.getActions&&(S=JY(k.getActions?.(m,E,e)??{},S));return{get baseURL(){return a},pluginsActions:S,pluginsAtoms:C,pluginPathMethods:w,atomListeners:_,$fetch:m,$store:E}};function _Z(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function CZ(e,t,o){const a=t[e],{fetchOptions:n,query:i,...l}=o||{};return a||(n?.method?n.method:l&&Object.keys(l).length>0?"POST":"GET")}function PZ(e,t,o,a,n){function i(l=[]){return new Proxy(function(){},{get(c,u){if(typeof u!="string"||u==="then"||u==="catch"||u==="finally")return;const p=[...l,u];let g=e;for(const m of p)if(g&&typeof g=="object"&&m in g)g=g[m];else{g=void 0;break}return typeof g=="function"||_Z(g)?g:i(p)},apply:async(c,u,p)=>{const g="/"+l.map(_=>_.replace(/[A-Z]/g,E=>`-${E.toLowerCase()}`)).join("/"),m=p[0]||{},f=p[1]||{},{query:v,fetchOptions:b,...S}=m,C={...f,...b},w=CZ(g,o,m);return await t(g,{...C,body:w==="GET"?void 0:{...S,...C?.body||{}},query:v||C?.query,method:w,async onSuccess(_){if(await C?.onSuccess?.(_),!n||C.disableSignal)return;const E=n.filter(x=>x.matcher(g));if(!E.length)return;const k=new Set;for(const x of E){const A=a[x.signal];if(!A)return;if(k.has(x.signal))continue;k.add(x.signal);const D=A.get();setTimeout(()=>{A.set(!D)},10)}}})}})}return i()}function kZ(e,t={}){const o=R.useRef(e.get()),{keys:a,deps:n=[e,a]}=t,i=R.useCallback(c=>{const u=p=>{o.current!==p&&(o.current=p,c())};return u(e.value),a?.length?$Y(e,a,u):e.listen(u)},n),l=()=>o.current;return R.useSyncExternalStore(i,l,l)}function xZ(e){return`use${kY(e)}`}function EZ(e){const{pluginPathMethods:t,pluginsActions:o,pluginsAtoms:a,$fetch:n,$store:i,atomListeners:l}=wZ(e),c={};for(const[u,p]of Object.entries(a))c[xZ(u)]=()=>kZ(p);return PZ({...o,...c,$fetch:n,$store:i},n,t,a,l)}function RZ(e){return{authorize(t,o="AND"){let a=!1;for(const[n,i]of Object.entries(t)){const l=e[n];if(!l)return{success:!1,error:`You are not allowed to access resource: ${n}`};if(Array.isArray(i))a=i.every(c=>l.includes(c));else if(typeof i=="object"){const c=i;c.connector==="OR"?a=c.actions.some(u=>l.includes(u)):a=c.actions.every(u=>l.includes(u))}else throw new cp("Invalid access control request");if(a&&o==="OR")return{success:a};if(!a&&o==="AND")return{success:!1,error:`unauthorized to access resource "${n}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function GL(e){return{newRole(t){return RZ(t)},statements:e}}const AZ={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},KL=GL(AZ),WL=KL.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),YL=KL.newRole({user:[],session:[]}),DZ={admin:WL,user:YL},OZ=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),o=e.options?.roles||DZ;for(const a of t)if(o[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},IZ=e=>{const t={admin:WL,user:YL,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:o=>OZ({role:o.role,options:{ac:e?.ac,roles:t},permissions:o.permissions??o.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},MZ=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),LZ=()=>({id:"magic-link",$InferServerPlugin:{}}),NZ={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},rC=GL(NZ),ZL=rC.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),QL=rC.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),JL=rC.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),FZ={admin:ZL,owner:QL,member:JL},BZ=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const o=e.role.split(","),a=e.options.creatorRole||"owner",n=o.includes(a),i=e.allowCreatorAllPermissions||!1;if(n&&i)return!0;for(const l of o)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},jZ=e=>BZ(e,e.options.roles||FZ),UZ=e=>{const t=Jc(!1),o=Jc(!1),a=Jc(!1),n=Jc(!1),i={admin:ZL,member:JL,owner:QL,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,c,u)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:p=>jZ({role:p.role,options:{ac:e?.ac,roles:i},permissions:p.permissions??p.permission})}}),getAtoms:l=>{const c=Qu(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:o,$activeMemberSignal:a,$activeMemberRoleSignal:n,activeOrganization:Qu([o],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:c,activeMember:Qu([a],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Qu([n],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},zZ="1.6.11",$Z=e=>({id:"sso-client",version:zZ,$InferServerPlugin:{},pathMethods:{"/sso/providers":"GET","/sso/get-provider":"GET"}});function XL(e){const t=e?.metadata;if(!t)return!1;try{return(typeof t=="string"?JSON.parse(t):t).archived===!0}catch{return!1}}const Yp=EZ({plugins:[UZ({}),IZ(),$Z(),LZ(),MZ()]}),qZ=3e4;let Ju=null,wh=null;function eN(){if(Ju&&Ju.expiresAt>Date.now())return Promise.resolve(Ju.result);if(wh)return wh;const e=Yp.organization.list().then(t=>{const o=t.data?{...t,data:t.data.filter(a=>!XL(a))}:t;return o.data&&(Ju={result:o,expiresAt:Date.now()+qZ}),o}).finally(()=>{wh=null});return wh=e,e}function Yfe(){const e=Yp.useListOrganizations(),t=e.data?.filter(o=>!XL(o));return{...e,data:t}}function Zfe(){Ju=null}function VZ(e){try{return JSON.parse(e)}catch{return}}function lD(e,t){if(typeof localStorage>"u")return typeof t=="function"?t(void 0):t;const o=localStorage.getItem(e),a=o?VZ(o):void 0,n=typeof t=="function"?t(a):a??t;if(a===void 0||n!==a)try{const i=JSON.stringify(n);localStorage.setItem(e,i)}catch{}return n}function HZ(e,t){const o=Ie.c(25),a=hv();let n;o[0]!==e?(n=["localStorage",e],o[0]=e,o[1]=n):n=o[1];const i=n;let l,c;o[2]!==t||o[3]!==e?(l=()=>lD(e,t),c=()=>lD(e,t),o[2]=t,o[3]=e,o[4]=l,o[5]=c):(l=o[4],c=o[5]);let u;o[6]!==i||o[7]!==l||o[8]!==c?(u={queryKey:i,queryFn:l,initialData:c,staleTime:1/0,gcTime:1/0},o[6]=i,o[7]=l,o[8]=c,o[9]=u):u=o[9];const{data:p}=Dd(u);let g;o[10]!==e?(g=async _=>(typeof localStorage<"u"&&localStorage.setItem(e,JSON.stringify(_)),_),o[10]=e,o[11]=g):g=o[11];let m;o[12]!==a||o[13]!==i?(m=_=>{a.setQueryData(i,_)},o[12]=a,o[13]=i,o[14]=m):m=o[14];let f;o[15]!==g||o[16]!==m?(f={mutationFn:g,onSuccess:m},o[15]=g,o[16]=m,o[17]=f):f=o[17];const v=lp(f);let b;o[18]!==v||o[19]!==a||o[20]!==i?(b=_=>{const E=a.getQueryData(i),k=typeof _=="function"?_(E):_;v.mutate(k)},o[18]=v,o[19]=a,o[20]=i,o[21]=b):b=o[21];const S=b,C=p;let w;return o[22]!==S||o[23]!==C?(w=[C,S],o[22]=S,o[23]=C,o[24]=w):w=o[24],w}const Bl={chatSelectedImageModel:e=>`studio:chat:selectedImageModel:${e}`,chatSelectedWebSearchModel:e=>`studio:chat:selectedWebSearchModel:${e}`,chatSelectedDeepResearchModel:e=>`studio:chat:selectedDeepResearchModel:${e}`,chatSimpleModeTier:e=>`studio:chat:simpleModeTier:${e}`,chatLastAgentOption:e=>`studio:chat:lastAgentOption:${e}`,chatAutosend:(e,t)=>`studio:chat:autosend:${e}:${t}`,chatThreadIntent:(e,t)=>`studio:chat:threadIntent:${e}:${t}`,homeTaskMode:e=>`home-task-mode:${e}`,chatDraft:(e,t)=>`studio:chat:draft:${e}:${t}`,taskBoardPrs:e=>`studio:task-board-prs:${e}`,sidePanelWidth:()=>"studio:side-panel:width",sidebarOpen:()=>"studio:sidebar-open",preferences:()=>"studio:user:preferences",lastOrgSlug:()=>"studio:last-org-slug",lastLocation:()=>"studio:last-location",connectionsTab:e=>`studio:connections:tab:${e}`,taskLastViewed:e=>`studio:chat:task-last-viewed:${e}`,sidebarGroupOrder:(e,t)=>`sidebar.group-order.${e}.${t}`,ptBrAnnouncementSeen:e=>`studio:announcement:pt-br:${e}`},tN=["en","pt-BR"];function iC(){return typeof navigator<"u"&&navigator.language?.toLowerCase().startsWith("pt")?"pt-BR":"en"}const GZ={toolApprovalLevel:"auto",enableNotifications:typeof Notification<"u",enableSounds:!1,theme:"system",language:iC(),compactPageLayout:!1,shownTaskBoardLanes:[]},oN=["auto","readonly"],Qfe=[{value:"readonly",labelKey:"settings.preferences.toolApprovalAsk",shortKey:"settings.preferences.toolApprovalAskShort"},{value:"auto",labelKey:"settings.preferences.toolApprovalAuto",shortKey:"settings.preferences.toolApprovalAutoShort"}],KZ=["light","dark","system"];function Jfe(){try{const e=JSON.parse(localStorage.getItem(Bl.preferences())??"{}");if(oN.includes(e.toolApprovalLevel))return e.toolApprovalLevel}catch{}return"auto"}function WZ(){try{const e=JSON.parse(localStorage.getItem(Bl.preferences())??"{}");if(tN.includes(e.language))return e.language}catch{}return iC()}function sC(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=Bl.preferences(),e[0]=t):t=e[0],HZ(t,YZ)}function YZ(e){const t={...GZ,...e};return"showProjectSettingsGear"in t&&delete t.showProjectSettingsGear,t.compactPageLayout=t.compactPageLayout===!0,oN.includes(t.toolApprovalLevel)||(t.toolApprovalLevel="auto"),KZ.includes(t.theme)||(t.theme="system"),tN.includes(t.language)||(t.language=iC()),Array.isArray(t.shownTaskBoardLanes)||(t.shownTaskBoardLanes=[]),t}function Dv(){const[e]=sC();return e.compactPageLayout}const ZZ={"page.overview":"Overview","page.app":"App","page.view":"View","page.file":"File","page.document":"Document","page.item":"Item","page.breadcrumbs":"Breadcrumbs","page.breadcrumbMenu":"Show navigation path","page.views":"Page views","page.openThread":"Open chat","page.closeThread":"Close chat","page.collapseSidebar":"Collapse sidebar","page.expandSidebar":"Expand sidebar"},QZ={"virtualMcp.addConnectionDialog.addConnectionTitle":"Add Connection","virtualMcp.addConnectionDialog.authenticationFailedError":"Authentication failed: {error}","virtualMcp.addConnectionDialog.connected":"Connected","virtualMcp.addConnectionDialog.connectedAuthenticated":"Connected and authenticated","virtualMcp.addConnectionDialog.connectionsTitle":"Connections","virtualMcp.addConnectionDialog.failedToAddConnection":"Failed to add connection","virtualMcp.addConnectionDialog.failedToConnect":"Failed to connect","virtualMcp.addConnectionDialog.mcpServerConnectionError":"This MCP Server cannot be connected: no connection method available","virtualMcp.addConnectionDialog.searchConnectionsPlaceholder":"Search connections...","virtualMcp.addConnectionDialog.signInFailedDescription":"It was added to your project, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. ({error})","virtualMcp.addConnectionDialog.signInFailedTitle":"Couldn't sign in to this connection","virtualMcp.connectionDialogContent.add":"Add","virtualMcp.connectionDialogContent.added":"Added","virtualMcp.connectionDialogContent.builtByDeco":"Built and maintained by Deco","virtualMcp.connectionDialogContent.builtByOfficial":"Built and maintained by the official vendor","virtualMcp.connectionDialogContent.connect":"Connect","virtualMcp.connectionDialogContent.connected":"Connected","virtualMcp.connectionDialogContent.customConnection":"Custom Connection","virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable":"No connections available","virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"No connections yet","virtualMcp.connectionDialogContent.emptyStateSearchNoMatch":'No connections match "{search}"',"virtualMcp.connectionDialogContent.madeByDeco":"Made by Deco","virtualMcp.connectionDialogContent.sectionAllConnections":"All connections","virtualMcp.connectionDialogContent.sectionVerified":"Verified","virtualMcp.connectionDialogContent.tabAll":"All","virtualMcp.connectionDialogContent.tabConnected":"Connected","virtualMcp.connectionDialogContent.verifiedByDeco":"Verified by the Deco team","virtualMcp.connectionItem.authorize":"Authorize","virtualMcp.connectionItem.configureResources":"Configure resources","virtualMcp.connectionItem.connectionDisabled":"Connection disabled","virtualMcp.connectionItem.connectionEnabled":"Connection enabled","virtualMcp.connectionItem.connectionNotFound":"Connection not found","virtualMcp.connectionItem.connectionSettings":"Connection settings","virtualMcp.connectionItem.disable":"Disable","virtualMcp.connectionItem.disableConnection":"Disable connection","virtualMcp.connectionItem.disabled":"Disabled","virtualMcp.connectionItem.disabledError":"Disabled (error)","virtualMcp.connectionItem.enable":"Enable","virtualMcp.connectionItem.failedToUpdateConnection":"Failed to update connection","virtualMcp.connectionItem.needsAuthorization":"Needs authorization","virtualMcp.connectionItem.newInstance":"New instance","virtualMcp.connectionItem.remove":"Remove","virtualMcp.connectionItem.removeConnection":"Remove connection","virtualMcp.dependencySelectionDialog.authorizationDescription":"This connection needs to be authorized before you can configure its tools and resources.","virtualMcp.dependencySelectionDialog.authorizationRequired":"Authorization required","virtualMcp.dependencySelectionDialog.authorize":"Authorize","virtualMcp.dependencySelectionDialog.deselectAll":"Deselect all","virtualMcp.dependencySelectionDialog.done":"Done","virtualMcp.dependencySelectionDialog.noActiveToolsSelected":"No active tools selected","virtualMcp.dependencySelectionDialog.noPromptsAvailable":"No prompts available","virtualMcp.dependencySelectionDialog.noResourcesAvailable":"No resources available","virtualMcp.dependencySelectionDialog.noToolsAvailable":"No tools available","virtualMcp.dependencySelectionDialog.promptsNotSupported":"Prompts not supported by this server","virtualMcp.dependencySelectionDialog.resourcesNotSupported":"Resources not supported by this server","virtualMcp.dependencySelectionDialog.selectAll":"Select all","virtualMcp.dependencySelectionDialog.somethingWentWrong":"Something went wrong","virtualMcp.dependencySelectionDialog.tabActive":"Active","virtualMcp.dependencySelectionDialog.tabPrompts":"Prompts","virtualMcp.dependencySelectionDialog.tabResources":"Resources","virtualMcp.dependencySelectionDialog.tabTools":"Tools","virtualMcp.dependencySelectionDialog.toolsNotSupported":"Tools not supported by this server","virtualMcp.dependencySelectionDialog.unexpectedError":"An unexpected error occurred","virtualMcp.filesSection.add":"Add","virtualMcp.filesSection.description":"Attach files and skills the project can always reference.","virtualMcp.filesSection.failedUploadFile":"Failed to upload file.","virtualMcp.filesSection.fileTooLargeDescription":"Exceeds the 25MB limit, not uploaded: {names}","virtualMcp.filesSection.fileTooLargeTitle":"File too large","virtualMcp.filesSection.filesAndSkills":"Files and skills","virtualMcp.filesSection.kindFile":"File","virtualMcp.filesSection.kindSkill":"Skill","virtualMcp.filesSection.noFilesFound":"No files found.","virtualMcp.filesSection.noFilesOrSkillsYet":"No files or skills yet. Add one or drag and drop here.","virtualMcp.filesSection.noSkillsFound":"No skills found.","virtualMcp.filesSection.removeAriaLabel":"Remove {name}","virtualMcp.filesSection.searchFilesPlaceholder":"Search files...","virtualMcp.filesSection.searchSkillsPlaceholder":"Search skills...","virtualMcp.filesSection.selectFileOrFolder":"Select file or folder","virtualMcp.filesSection.selectSkill":"Select skill","virtualMcp.filesSection.uploadFile":"Upload file","virtualMcp.layoutTabContent.noMainView":"No main view","virtualMcp.layoutTabContent.automations":"Automations","virtualMcp.layoutTabContent.chatAlwaysShown":"Chat is always shown when it is the default view","virtualMcp.layoutTabContent.layout":"Layout","virtualMcp.layoutTabContent.mainView":"Main view","virtualMcp.layoutTabContent.mainViewDescription":"What users see when they first open this project.","virtualMcp.layoutTabContent.settings":"Settings","virtualMcp.layoutTabContent.showChat":"Show chat","virtualMcp.layoutTabContent.showChatDescription":"Display Chat in the side panel alongside the main view.","virtualMcp.layoutTabContent.siteEditor":"Site Editor","virtualMcp.settings.title":"Project settings","virtualMcp.settings.navigation":"Project settings sections","virtualMcp.settings.identity.icon":"Project icon","virtualMcp.settings.identity.iconDescription":"How your project appears in the sidebar and across Studio.","virtualMcp.settings.identity.name":"Project name","virtualMcp.settings.identity.description":"Description","virtualMcp.settings.general.title":"General","virtualMcp.settings.site.title":"CMS","virtualMcp.settings.site.classicTitle":"Site and sandbox","virtualMcp.settings.groups.advanced":"Advanced","virtualMcp.settings.connections.title":"Connections","virtualMcp.settings.views.defaults":"Default layout","virtualMcp.settings.views.sidebar":"Views","virtualMcp.settings.views.open":"Open","virtualMcp.settings.views.pin":"Pin to sidebar","virtualMcp.settings.views.unpin":"Remove from sidebar","virtualMcp.settings.views.setMainView":"Set as main view","virtualMcp.settings.views.rowActions":"View options","virtualMcp.subAgentsSection.addSubAgent":"Add sub-project","virtualMcp.subAgentsSection.anyAgent":"Any project","virtualMcp.subAgentsSection.canDelegateToAnyAgent":"Can delegate to any project in the organization.","virtualMcp.subAgentsSection.canOnlyDelegateToItself":"Can only delegate to a fresh copy of itself, no other projects.","virtualMcp.subAgentsSection.emptyStateMessage":"No sub-projects selected yet. Add one — until then this project can only delegate to itself.","virtualMcp.subAgentsSection.noAgentsFound":"No projects found.","virtualMcp.subAgentsSection.onlyItself":"Only itself","virtualMcp.subAgentsSection.searchPlaceholder":"Search projects...","virtualMcp.subAgentsSection.specificAgents":"Specific projects","virtualMcp.subAgentsSection.title":"Sub-projects","virtualMcp.virtualMcp.addConnection":"Add connection","virtualMcp.virtualMcp.agentDeleted":'Deleted "{title}"',"virtualMcp.virtualMcp.agentNameFallback":"Agent","virtualMcp.virtualMcp.agentNamePlaceholder":"Project name","virtualMcp.virtualMcp.authenticationFailed":"Authentication failed: {error}","virtualMcp.virtualMcp.authenticationSuccessful":"Authentication successful","virtualMcp.virtualMcp.backToSpaces":"Back to spaces","virtualMcp.virtualMcp.cancel":"Cancel","virtualMcp.virtualMcp.connect":"Connect","virtualMcp.virtualMcp.connections":"Connections","virtualMcp.virtualMcp.created":"Created","virtualMcp.virtualMcp.delete":"Delete","virtualMcp.virtualMcp.deleteAgent":"Delete project","virtualMcp.virtualMcp.deleteAgentConfirm":"Delete Project?","virtualMcp.virtualMcp.deleteAgentConfirmDescription":"This action cannot be undone. This will permanently delete {title}.","virtualMcp.virtualMcp.deleteAgentDescription":"Permanently delete this project and all its data.","virtualMcp.virtualMcp.descriptionPlaceholder":"Add a description...","virtualMcp.virtualMcp.failedToCreateInstance":"Failed to create instance","virtualMcp.virtualMcp.fullscreen":"Fullscreen","virtualMcp.virtualMcp.improve":"Improve","virtualMcp.virtualMcp.instanceAlreadyAdded":"This instance is already added to the project","virtualMcp.virtualMcp.instructions":"Instructions","virtualMcp.virtualMcp.instructionsPlaceholder":"Define how this agent should behave, what tone to use, any constraints or guidelines...","virtualMcp.virtualMcp.lastUsed":"Last used {time}","virtualMcp.virtualMcp.neverUsed":"Never used","virtualMcp.virtualMcp.newInstanceCreated":"New instance created","virtualMcp.virtualMcp.noConnectionsYet":"No connections yet. Add one to get started.","virtualMcp.virtualMcp.openFullscreenEditor":"Open fullscreen editor","virtualMcp.virtualMcp.promptTemplate":"+ Prompt template","virtualMcp.virtualMcp.promptTemplateContent":`<role>
55
+ deps: ${g}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(u){const[p,g]=i(u);l(u,p),c(u,g)}};function i({schema:u}){const p={},g={};for(const m in u){if(m==="__proto__")continue;const f=Array.isArray(u[m])?p:g;f[m]=u[m]}return[p,g]}function l(u,p=u.schema){const{gen:g,data:m,it:f}=u;if(Object.keys(p).length===0)return;const v=g.let("missing");for(const b in p){const S=p[b];if(S.length===0)continue;const C=(0,a.propertyInData)(g,m,b,f.opts.ownProperties);u.setParams({property:b,depsCount:S.length,deps:S.join(", ")}),f.allErrors?g.if(C,()=>{for(const w of S)(0,a.checkReportMissingProp)(u,w)}):(g.if((0,t._)`${C} && (${(0,a.checkMissingProp)(u,S,v)})`),(0,a.reportMissingProp)(u,v),g.else())}}e.validatePropertyDeps=l;function c(u,p=u.schema){const{gen:g,data:m,keyword:f,it:v}=u,b=g.name("valid");for(const S in p)(0,o.alwaysValidSchema)(v,p[S])||(g.if((0,a.propertyInData)(g,m,S,v.opts.ownProperties),()=>{const C=u.subschema({keyword:f,schemaProp:S},b);u.mergeValidEvaluated(C,b)},()=>g.var(b,!0)),u.ok(b))}e.validateSchemaDeps=c,e.default=n})(GS)),GS}var rh={},DA;function OW(){if(DA)return rh;DA=1,Object.defineProperty(rh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,e._)`{propertyName: ${n.propertyName}}`},code(n){const{gen:i,schema:l,data:c,it:u}=n;if((0,t.alwaysValidSchema)(u,l))return;const p=i.name("valid");i.forIn("key",c,g=>{n.setParams({propertyName:g}),n.subschema({keyword:"propertyNames",data:g,dataTypes:["string"],propertyName:g,compositeRule:!0},p),i.if((0,e.not)(p),()=>{n.error(!0),u.allErrors||i.break()})}),n.ok(p)}};return rh.default=a,rh}var ih={},OA;function LL(){if(OA)return ih;OA=1,Object.defineProperty(ih,"__esModule",{value:!0});const e=kr(),t=bt(),o=js(),a=Nt(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:l})=>(0,t._)`{additionalProperty: ${l.additionalProperty}}`},code(l){const{gen:c,schema:u,parentSchema:p,data:g,errsCount:m,it:f}=l;if(!m)throw new Error("ajv implementation error");const{allErrors:v,opts:b}=f;if(f.props=!0,b.removeAdditional!=="all"&&(0,a.alwaysValidSchema)(f,u))return;const S=(0,e.allSchemaProperties)(p.properties),C=(0,e.allSchemaProperties)(p.patternProperties);w(),l.ok((0,t._)`${m} === ${o.default.errors}`);function w(){c.forIn("key",g,A=>{!S.length&&!C.length?k(A):c.if(_(A),()=>k(A))})}function _(A){let D;if(S.length>8){const O=(0,a.schemaRefOrVal)(f,p.properties,"properties");D=(0,e.isOwnProperty)(c,O,A)}else S.length?D=(0,t.or)(...S.map(O=>(0,t._)`${A} === ${O}`)):D=t.nil;return C.length&&(D=(0,t.or)(D,...C.map(O=>(0,t._)`${(0,e.usePattern)(l,O)}.test(${A})`))),(0,t.not)(D)}function E(A){c.code((0,t._)`delete ${g}[${A}]`)}function k(A){if(b.removeAdditional==="all"||b.removeAdditional&&u===!1){E(A);return}if(u===!1){l.setParams({additionalProperty:A}),l.error(),v||c.break();return}if(typeof u=="object"&&!(0,a.alwaysValidSchema)(f,u)){const D=c.name("valid");b.removeAdditional==="failing"?(x(A,D,!1),c.if((0,t.not)(D),()=>{l.reset(),E(A)})):(x(A,D),v||c.if((0,t.not)(D),()=>c.break()))}}function x(A,D,O){const N={keyword:"additionalProperties",dataProp:A,dataPropType:a.Type.Str};O===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(N,D)}}};return ih.default=i,ih}var sh={},IA;function IW(){if(IA)return sh;IA=1,Object.defineProperty(sh,"__esModule",{value:!0});const e=Rv(),t=kr(),o=Nt(),a=LL(),n={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:l,schema:c,parentSchema:u,data:p,it:g}=i;g.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&a.default.code(new e.KeywordCxt(g,a.default,"additionalProperties"));const m=(0,t.allSchemaProperties)(c);for(const C of m)g.definedProperties.add(C);g.opts.unevaluated&&m.length&&g.props!==!0&&(g.props=o.mergeEvaluated.props(l,(0,o.toHash)(m),g.props));const f=m.filter(C=>!(0,o.alwaysValidSchema)(g,c[C]));if(f.length===0)return;const v=l.name("valid");for(const C of f)b(C)?S(C):(l.if((0,t.propertyInData)(l,p,C,g.opts.ownProperties)),S(C),g.allErrors||l.else().var(v,!0),l.endIf()),i.it.definedProperties.add(C),i.ok(v);function b(C){return g.opts.useDefaults&&!g.compositeRule&&c[C].default!==void 0}function S(C){i.subschema({keyword:"properties",schemaProp:C,dataProp:C},v)}}};return sh.default=n,sh}var lh={},MA;function MW(){if(MA)return lh;MA=1,Object.defineProperty(lh,"__esModule",{value:!0});const e=kr(),t=bt(),o=Nt(),a=Nt(),n={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:l,schema:c,data:u,parentSchema:p,it:g}=i,{opts:m}=g,f=(0,e.allSchemaProperties)(c),v=f.filter(k=>(0,o.alwaysValidSchema)(g,c[k]));if(f.length===0||v.length===f.length&&(!g.opts.unevaluated||g.props===!0))return;const b=m.strictSchema&&!m.allowMatchingProperties&&p.properties,S=l.name("valid");g.props!==!0&&!(g.props instanceof t.Name)&&(g.props=(0,a.evaluatedPropsToName)(l,g.props));const{props:C}=g;w();function w(){for(const k of f)b&&_(k),g.allErrors?E(k):(l.var(S,!0),E(k),l.if(S))}function _(k){for(const x in b)new RegExp(k).test(x)&&(0,o.checkStrictMode)(g,`property ${x} matches pattern ${k} (use allowMatchingProperties)`)}function E(k){l.forIn("key",u,x=>{l.if((0,t._)`${(0,e.usePattern)(i,k)}.test(${x})`,()=>{const A=v.includes(k);A||i.subschema({keyword:"patternProperties",schemaProp:k,dataProp:x,dataPropType:a.Type.Str},S),g.opts.unevaluated&&C!==!0?l.assign((0,t._)`${C}[${x}]`,!0):!A&&!g.allErrors&&l.if((0,t.not)(S),()=>l.break())})})}}};return lh.default=n,lh}var ch={},LA;function LW(){if(LA)return ch;LA=1,Object.defineProperty(ch,"__esModule",{value:!0});const e=Nt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(o){const{gen:a,schema:n,it:i}=o;if((0,e.alwaysValidSchema)(i,n)){o.fail();return}const l=a.name("valid");o.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),o.failResult(l,()=>o.reset(),()=>o.error())},error:{message:"must NOT be valid"}};return ch.default=t,ch}var dh={},NA;function NW(){if(NA)return dh;NA=1,Object.defineProperty(dh,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:kr().validateUnion,error:{message:"must match a schema in anyOf"}};return dh.default=t,dh}var uh={},FA;function FW(){if(FA)return uh;FA=1,Object.defineProperty(uh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,e._)`{passingSchemas: ${n.passing}}`},code(n){const{gen:i,schema:l,parentSchema:c,it:u}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");if(u.opts.discriminator&&c.discriminator)return;const p=l,g=i.let("valid",!1),m=i.let("passing",null),f=i.name("_valid");n.setParams({passing:m}),i.block(v),n.result(g,()=>n.reset(),()=>n.error(!0));function v(){p.forEach((b,S)=>{let C;(0,t.alwaysValidSchema)(u,b)?i.var(f,!0):C=n.subschema({keyword:"oneOf",schemaProp:S,compositeRule:!0},f),S>0&&i.if((0,e._)`${f} && ${g}`).assign(g,!1).assign(m,(0,e._)`[${m}, ${S}]`).else(),i.if(f,()=>{i.assign(g,!0),i.assign(m,S),C&&n.mergeEvaluated(C,e.Name)})})}}};return uh.default=a,uh}var ph={},BA;function BW(){if(BA)return ph;BA=1,Object.defineProperty(ph,"__esModule",{value:!0});const e=Nt(),t={keyword:"allOf",schemaType:"array",code(o){const{gen:a,schema:n,it:i}=o;if(!Array.isArray(n))throw new Error("ajv implementation error");const l=a.name("valid");n.forEach((c,u)=>{if((0,e.alwaysValidSchema)(i,c))return;const p=o.subschema({keyword:"allOf",schemaProp:u},l);o.ok(l),o.mergeEvaluated(p)})}};return ph.default=t,ph}var mh={},jA;function jW(){if(jA)return mh;jA=1,Object.defineProperty(mh,"__esModule",{value:!0});const e=bt(),t=Nt(),a={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:l,parentSchema:c,it:u}=i;c.then===void 0&&c.else===void 0&&(0,t.checkStrictMode)(u,'"if" without "then" and "else" is ignored');const p=n(u,"then"),g=n(u,"else");if(!p&&!g)return;const m=l.let("valid",!0),f=l.name("_valid");if(v(),i.reset(),p&&g){const S=l.let("ifClause");i.setParams({ifClause:S}),l.if(f,b("then",S),b("else",S))}else p?l.if(f,b("then")):l.if((0,e.not)(f),b("else"));i.pass(m,()=>i.error(!0));function v(){const S=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);i.mergeEvaluated(S)}function b(S,C){return()=>{const w=i.subschema({keyword:S},f);l.assign(m,f),i.mergeValidEvaluated(w,m),C?l.assign(C,(0,e._)`${S}`):i.setParams({ifClause:S})}}}};function n(i,l){const c=i.schema[l];return c!==void 0&&!(0,t.alwaysValidSchema)(i,c)}return mh.default=a,mh}var gh={},UA;function UW(){if(UA)return gh;UA=1,Object.defineProperty(gh,"__esModule",{value:!0});const e=Nt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:a,it:n}){a.if===void 0&&(0,e.checkStrictMode)(n,`"${o}" without "if" is ignored`)}};return gh.default=t,gh}var zA;function zW(){if(zA)return th;zA=1,Object.defineProperty(th,"__esModule",{value:!0});const e=IL(),t=EW(),o=ML(),a=RW(),n=AW(),i=DW(),l=OW(),c=LL(),u=IW(),p=MW(),g=LW(),m=NW(),f=FW(),v=BW(),b=jW(),S=UW();function C(w=!1){const _=[g.default,m.default,f.default,v.default,b.default,S.default,l.default,c.default,i.default,u.default,p.default];return w?_.push(t.default,a.default):_.push(e.default,o.default),_.push(n.default),_}return th.default=C,th}var hh={},fh={},$A;function $W(){if($A)return fh;$A=1,Object.defineProperty(fh,"__esModule",{value:!0});const e=bt(),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:a})=>(0,e.str)`must match format "${a}"`,params:({schemaCode:a})=>(0,e._)`{format: ${a}}`},code(a,n){const{gen:i,data:l,$data:c,schema:u,schemaCode:p,it:g}=a,{opts:m,errSchemaPath:f,schemaEnv:v,self:b}=g;if(!m.validateFormats)return;c?S():C();function S(){const w=i.scopeValue("formats",{ref:b.formats,code:m.code.formats}),_=i.const("fDef",(0,e._)`${w}[${p}]`),E=i.let("fType"),k=i.let("format");i.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>i.assign(E,(0,e._)`${_}.type || "string"`).assign(k,(0,e._)`${_}.validate`),()=>i.assign(E,(0,e._)`"string"`).assign(k,_)),a.fail$data((0,e.or)(x(),A()));function x(){return m.strictSchema===!1?e.nil:(0,e._)`${p} && !${k}`}function A(){const D=v.$async?(0,e._)`(${_}.async ? await ${k}(${l}) : ${k}(${l}))`:(0,e._)`${k}(${l})`,O=(0,e._)`(typeof ${k} == "function" ? ${D} : ${k}.test(${l}))`;return(0,e._)`${k} && ${k} !== true && ${E} === ${n} && !${O}`}}function C(){const w=b.formats[u];if(!w){x();return}if(w===!0)return;const[_,E,k]=A(w);_===n&&a.pass(D());function x(){if(m.strictSchema===!1){b.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${u}" ignored in schema at path "${f}"`}}function A(O){const N=O instanceof RegExp?(0,e.regexpCode)(O):m.code.formats?(0,e._)`${m.code.formats}${(0,e.getProperty)(u)}`:void 0,$=i.scopeValue("formats",{key:u,ref:O,code:N});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${$}.validate`]:["string",O,$]}function D(){if(typeof w=="object"&&!(w instanceof RegExp)&&w.async){if(!v.$async)throw new Error("async format in sync schema");return(0,e._)`await ${k}(${l})`}return typeof E=="function"?(0,e._)`${k}(${l})`:(0,e._)`${k}.test(${l})`}}}};return fh.default=o,fh}var qA;function qW(){if(qA)return hh;qA=1,Object.defineProperty(hh,"__esModule",{value:!0});const t=[$W().default];return hh.default=t,hh}var ll={},VA;function VW(){return VA||(VA=1,Object.defineProperty(ll,"__esModule",{value:!0}),ll.contentVocabulary=ll.metadataVocabulary=void 0,ll.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],ll.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),ll}var HA;function HW(){if(HA)return jg;HA=1,Object.defineProperty(jg,"__esModule",{value:!0});const e=hW(),t=xW(),o=zW(),a=qW(),n=VW(),i=[e.default,t.default,(0,o.default)(),a.default,n.metadataVocabulary,n.contentVocabulary];return jg.default=i,jg}var vh={},Iu={},GA;function GW(){if(GA)return Iu;GA=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Iu.DiscrError=e={})),Iu}var KA;function KW(){if(KA)return vh;KA=1,Object.defineProperty(vh,"__esModule",{value:!0});const e=bt(),t=GW(),o=eC(),a=Av(),n=Nt(),l={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:c,tagName:u}})=>c===t.DiscrError.Tag?`tag "${u}" must be string`:`value of tag "${u}" must be in oneOf`,params:({params:{discrError:c,tag:u,tagName:p}})=>(0,e._)`{error: ${c}, tag: ${p}, tagValue: ${u}}`},code(c){const{gen:u,data:p,schema:g,parentSchema:m,it:f}=c,{oneOf:v}=m;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=g.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(g.mapping)throw new Error("discriminator: mapping is not supported");if(!v)throw new Error("discriminator: requires oneOf keyword");const S=u.let("valid",!1),C=u.const("tag",(0,e._)`${p}${(0,e.getProperty)(b)}`);u.if((0,e._)`typeof ${C} == "string"`,()=>w(),()=>c.error(!1,{discrError:t.DiscrError.Tag,tag:C,tagName:b})),c.ok(S);function w(){const k=E();u.if(!1);for(const x in k)u.elseIf((0,e._)`${C} === ${x}`),u.assign(S,_(k[x]));u.else(),c.error(!1,{discrError:t.DiscrError.Mapping,tag:C,tagName:b}),u.endIf()}function _(k){const x=u.name("valid"),A=c.subschema({keyword:"oneOf",schemaProp:k},x);return c.mergeEvaluated(A,e.Name),x}function E(){var k;const x={},A=O(m);let D=!0;for(let F=0;F<v.length;F++){let z=v[F];if(z?.$ref&&!(0,n.schemaHasRulesButRef)(z,f.self.RULES)){const K=z.$ref;if(z=o.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,K),z instanceof o.SchemaEnv&&(z=z.schema),z===void 0)throw new a.default(f.opts.uriResolver,f.baseId,K)}const j=(k=z?.properties)===null||k===void 0?void 0:k[b];if(typeof j!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);D=D&&(A||O(z)),N(j,F)}if(!D)throw new Error(`discriminator: "${b}" must be required`);return x;function O({required:F}){return Array.isArray(F)&&F.includes(b)}function N(F,z){if(F.const)$(F.const,z);else if(F.enum)for(const j of F.enum)$(j,z);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function $(F,z){if(typeof F!="string"||F in x)throw new Error(`discriminator: "${b}" values must be unique strings`);x[F]=z}}}};return vh.default=l,vh}const WW="http://json-schema.org/draft-07/schema#",YW="http://json-schema.org/draft-07/schema#",ZW="Core schema meta-schema",QW={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},JW=["object","boolean"],XW={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},eY={$schema:WW,$id:YW,title:ZW,definitions:QW,type:JW,properties:XW,default:!0};var WA;function tY(){return WA||(WA=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const o=pW(),a=HW(),n=KW(),i=eY,l=["/properties"],c="http://json-schema.org/draft-07/schema";class u extends o.default{_addVocabularies(){super._addVocabularies(),a.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const b=this.opts.$data?this.$dataMetaSchema(i,l):i;this.addMetaSchema(b,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=u,e.exports=t=u,e.exports.Ajv=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var p=Rv();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var g=bt();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return g._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return g.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return g.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return g.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return g.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return g.CodeGen}});var m=X_();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return m.default}});var f=Av();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(Mg,Mg.exports)),Mg.exports}var bh={exports:{}},KS={},YA;function oY(){return YA||(YA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(F,z){return{validate:F,compare:z}}e.fullFormats={date:t(i,l),time:t(u(!0),p),"date-time":t(f(!0),v),"iso-time":t(u(),g),"iso-date-time":t(f(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:w,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:$,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:E,int32:{type:"number",validate:A},int64:{type:"number",validate:D},float:{type:"number",validate:O},double:{type:"number",validate:O},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,l),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,p),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,v),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,g),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function o(F){return F%4===0&&(F%100!==0||F%400===0)}const a=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(F){const z=a.exec(F);if(!z)return!1;const j=+z[1],K=+z[2],ne=+z[3];return K>=1&&K<=12&&ne>=1&&ne<=(K===2&&o(j)?29:n[K])}function l(F,z){if(F&&z)return F>z?1:F<z?-1:0}const c=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function u(F){return function(j){const K=c.exec(j);if(!K)return!1;const ne=+K[1],H=+K[2],Z=+K[3],te=K[4],le=K[5]==="-"?-1:1,Q=+(K[6]||0),M=+(K[7]||0);if(Q>23||M>59||F&&!te)return!1;if(ne<=23&&H<=59&&Z<60)return!0;const G=H-M*le,q=ne-Q*le-(G<0?1:0);return(q===23||q===-1)&&(G===59||G===-1)&&Z<61}}function p(F,z){if(!(F&&z))return;const j=new Date("2020-01-01T"+F).valueOf(),K=new Date("2020-01-01T"+z).valueOf();if(j&&K)return j-K}function g(F,z){if(!(F&&z))return;const j=c.exec(F),K=c.exec(z);if(j&&K)return F=j[1]+j[2]+j[3],z=K[1]+K[2]+K[3],F>z?1:F<z?-1:0}const m=/t|\s/i;function f(F){const z=u(F);return function(K){const ne=K.split(m);return ne.length===2&&i(ne[0])&&z(ne[1])}}function v(F,z){if(!(F&&z))return;const j=new Date(F).valueOf(),K=new Date(z).valueOf();if(j&&K)return j-K}function b(F,z){if(!(F&&z))return;const[j,K]=F.split(m),[ne,H]=z.split(m),Z=l(j,ne);if(Z!==void 0)return Z||p(K,H)}const S=/\/|:/,C=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function w(F){return S.test(F)&&C.test(F)}const _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function E(F){return _.lastIndex=0,_.test(F)}const k=-2147483648,x=2**31-1;function A(F){return Number.isInteger(F)&&F<=x&&F>=k}function D(F){return Number.isInteger(F)}function O(){return!0}const N=/[^\\]\\Z/;function $(F){if(N.test(F))return!1;try{return new RegExp(F),!0}catch{return!1}}})(KS)),KS}var WS={},ZA;function aY(){return ZA||(ZA=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=tY(),o=bt(),a=o.operators,n={formatMaximum:{okStr:"<=",ok:a.LTE,fail:a.GT},formatMinimum:{okStr:">=",ok:a.GTE,fail:a.LT},formatExclusiveMaximum:{okStr:"<",ok:a.LT,fail:a.GTE},formatExclusiveMinimum:{okStr:">",ok:a.GT,fail:a.LTE}},i={message:({keyword:c,schemaCode:u})=>(0,o.str)`should be ${n[c].okStr} ${u}`,params:({keyword:c,schemaCode:u})=>(0,o._)`{comparison: ${n[c].okStr}, limit: ${u}}`};e.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:i,code(c){const{gen:u,data:p,schemaCode:g,keyword:m,it:f}=c,{opts:v,self:b}=f;if(!v.validateFormats)return;const S=new t.KeywordCxt(f,b.RULES.all.format.definition,"format");S.$data?C():w();function C(){const E=u.scopeValue("formats",{ref:b.formats,code:v.code.formats}),k=u.const("fmt",(0,o._)`${E}[${S.schemaCode}]`);c.fail$data((0,o.or)((0,o._)`typeof ${k} != "object"`,(0,o._)`${k} instanceof RegExp`,(0,o._)`typeof ${k}.compare != "function"`,_(k)))}function w(){const E=S.schema,k=b.formats[E];if(!k||k===!0)return;if(typeof k!="object"||k instanceof RegExp||typeof k.compare!="function")throw new Error(`"${m}": format "${E}" does not define "compare" function`);const x=u.scopeValue("formats",{key:E,ref:k,code:v.code.formats?(0,o._)`${v.code.formats}${(0,o.getProperty)(E)}`:void 0});c.fail$data(_(x))}function _(E){return(0,o._)`${E}.compare(${p}, ${g}) ${n[m].fail} 0`}},dependencies:["format"]};const l=c=>(c.addKeyword(e.formatLimitDefinition),c);e.default=l})(WS)),WS}var QA;function nY(){return QA||(QA=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const o=oY(),a=aY(),n=bt(),i=new n.Name("fullFormats"),l=new n.Name("fastFormats"),c=(p,g={keywords:!0})=>{if(Array.isArray(g))return u(p,g,o.fullFormats,i),p;const[m,f]=g.mode==="fast"?[o.fastFormats,l]:[o.fullFormats,i],v=g.formats||o.formatNames;return u(p,v,m,f),g.keywords&&(0,a.default)(p),p};c.get=(p,g="full")=>{const f=(g==="fast"?o.fastFormats:o.fullFormats)[p];if(!f)throw new Error(`Unknown format "${p}"`);return f};function u(p,g,m,f){var v,b;(v=(b=p.opts.code).formats)!==null&&v!==void 0||(b.formats=(0,n._)`require("ajv-formats/dist/formats").${f}`);for(const S of g)p.addFormat(S,m[S])}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c})(bh,bh.exports)),bh.exports}var rY=nY();const Lfe=Ll(rY);function iY({studioUrl:e,meshUrl:t},o){return e??t??o}let oC;oC=globalThis.crypto;async function sY(e){return(await oC).getRandomValues(new Uint8Array(e))}async function lY(e){const t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",o=Math.pow(2,8)-Math.pow(2,8)%t.length;let a="";for(;a.length<e;){const n=await sY(e-a.length);for(const i of n)i<o&&(a+=t[i%t.length])}return a}async function cY(e){return await lY(e)}async function dY(e){const t=await(await oC).subtle.digest("SHA-256",new TextEncoder().encode(e));return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function Nfe(e){if(e||(e=43),e<43||e>128)throw`Expected a length between 43 and 128. Received ${e}.`;const t=await cY(e),o=await dY(t);return{code_verifier:t,code_challenge:o}}const _a=v9().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:uH.custom,message:"URL must be parseable",fatal:!0}),f8}).refine(e=>{const t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Ffe=Ca({resource:V().url(),authorization_servers:Fe(_a).optional(),jwks_uri:V().url().optional(),scopes_supported:Fe(V()).optional(),bearer_methods_supported:Fe(V()).optional(),resource_signing_alg_values_supported:Fe(V()).optional(),resource_name:V().optional(),resource_documentation:V().optional(),resource_policy_uri:V().url().optional(),resource_tos_uri:V().url().optional(),tls_client_certificate_bound_access_tokens:$t().optional(),authorization_details_types_supported:Fe(V()).optional(),dpop_signing_alg_values_supported:Fe(V()).optional(),dpop_bound_access_tokens_required:$t().optional()}),uY=Ca({issuer:V(),authorization_endpoint:_a,token_endpoint:_a,registration_endpoint:_a.optional(),scopes_supported:Fe(V()).optional(),response_types_supported:Fe(V()),response_modes_supported:Fe(V()).optional(),grant_types_supported:Fe(V()).optional(),token_endpoint_auth_methods_supported:Fe(V()).optional(),token_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),service_documentation:_a.optional(),revocation_endpoint:_a.optional(),revocation_endpoint_auth_methods_supported:Fe(V()).optional(),revocation_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),introspection_endpoint:V().optional(),introspection_endpoint_auth_methods_supported:Fe(V()).optional(),introspection_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),code_challenge_methods_supported:Fe(V()).optional(),client_id_metadata_document_supported:$t().optional()}),pY=Ca({issuer:V(),authorization_endpoint:_a,token_endpoint:_a,userinfo_endpoint:_a.optional(),jwks_uri:_a,registration_endpoint:_a.optional(),scopes_supported:Fe(V()).optional(),response_types_supported:Fe(V()),response_modes_supported:Fe(V()).optional(),grant_types_supported:Fe(V()).optional(),acr_values_supported:Fe(V()).optional(),subject_types_supported:Fe(V()),id_token_signing_alg_values_supported:Fe(V()),id_token_encryption_alg_values_supported:Fe(V()).optional(),id_token_encryption_enc_values_supported:Fe(V()).optional(),userinfo_signing_alg_values_supported:Fe(V()).optional(),userinfo_encryption_alg_values_supported:Fe(V()).optional(),userinfo_encryption_enc_values_supported:Fe(V()).optional(),request_object_signing_alg_values_supported:Fe(V()).optional(),request_object_encryption_alg_values_supported:Fe(V()).optional(),request_object_encryption_enc_values_supported:Fe(V()).optional(),token_endpoint_auth_methods_supported:Fe(V()).optional(),token_endpoint_auth_signing_alg_values_supported:Fe(V()).optional(),display_values_supported:Fe(V()).optional(),claim_types_supported:Fe(V()).optional(),claims_supported:Fe(V()).optional(),service_documentation:V().optional(),claims_locales_supported:Fe(V()).optional(),ui_locales_supported:Fe(V()).optional(),claims_parameter_supported:$t().optional(),request_parameter_supported:$t().optional(),request_uri_parameter_supported:$t().optional(),require_request_uri_registration:$t().optional(),op_policy_uri:_a.optional(),op_tos_uri:_a.optional(),client_id_metadata_document_supported:$t().optional()}),Bfe=_e({...pY.shape,...uY.pick({code_challenge_methods_supported:!0}).shape}),jfe=_e({access_token:V(),id_token:V().optional(),token_type:V(),expires_in:JM().optional(),scope:V().optional(),refresh_token:V().optional()}).strip(),Ufe=_e({error:V(),error_description:V().optional(),error_uri:V().optional()}),JA=_a.optional().or(Ze("").transform(()=>{})),mY=_e({redirect_uris:Fe(_a),token_endpoint_auth_method:V().optional(),grant_types:Fe(V()).optional(),response_types:Fe(V()).optional(),client_name:V().optional(),client_uri:_a.optional(),logo_uri:JA,scope:V().optional(),contacts:Fe(V()).optional(),tos_uri:JA,policy_uri:V().optional(),jwks_uri:_a.optional(),jwks:B9().optional(),software_id:V().optional(),software_version:V().optional(),software_statement:V().optional()}).strip(),gY=_e({client_id:V(),client_secret:V().optional(),client_id_issued_at:Lt().optional(),client_secret_expires_at:Lt().optional()}).strip(),zfe=mY.merge(gY);_e({error:V(),error_description:V().optional()}).strip();_e({token:V(),token_type_hint:V().optional()}).strip();class Ea extends Error{constructor(t,o){super(t),this.errorUri=o,this.name=this.constructor.name}toResponseObject(){const t={error:this.errorCode,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}get errorCode(){return this.constructor.errorCode}}class IT extends Ea{}IT.errorCode="invalid_request";class MT extends Ea{}MT.errorCode="invalid_client";class LT extends Ea{}LT.errorCode="invalid_grant";class NT extends Ea{}NT.errorCode="unauthorized_client";class FT extends Ea{}FT.errorCode="unsupported_grant_type";class BT extends Ea{}BT.errorCode="invalid_scope";class jT extends Ea{}jT.errorCode="access_denied";class UT extends Ea{}UT.errorCode="server_error";class zT extends Ea{}zT.errorCode="temporarily_unavailable";class $T extends Ea{}$T.errorCode="unsupported_response_type";class qT extends Ea{}qT.errorCode="unsupported_token_type";class VT extends Ea{}VT.errorCode="invalid_token";class HT extends Ea{}HT.errorCode="method_not_allowed";class GT extends Ea{}GT.errorCode="too_many_requests";class KT extends Ea{}KT.errorCode="invalid_client_metadata";class WT extends Ea{}WT.errorCode="insufficient_scope";class YT extends Ea{}YT.errorCode="invalid_target";const $fe={[IT.errorCode]:IT,[MT.errorCode]:MT,[LT.errorCode]:LT,[NT.errorCode]:NT,[FT.errorCode]:FT,[BT.errorCode]:BT,[jT.errorCode]:jT,[UT.errorCode]:UT,[zT.errorCode]:zT,[$T.errorCode]:$T,[qT.errorCode]:qT,[VT.errorCode]:VT,[HT.errorCode]:HT,[GT.errorCode]:GT,[KT.errorCode]:KT,[WT.errorCode]:WT,[YT.errorCode]:YT};async function NL(e){if(!e.getServerCapabilities()?.resources)return{resources:[]};try{return await e.listResources()}catch(o){if(o instanceof kv&&o.code===Pp.MethodNotFound)return{resources:[]};throw o}}async function hY(e,t){return await e.readResource({uri:t})}function qfe(e){const t=Ie.c(12);let o,a;t[0]!==e?({client:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=On.mcpResourcesList(o),t[3]=o,t[4]=n):n=t[4];let i;t[5]!==o?(i=()=>NL(o),t[5]=o,t[6]=i):i=t[6];const l=a.staleTime??3e4;let c;return t[7]!==a||t[8]!==n||t[9]!==i||t[10]!==l?(c={...a,queryKey:n,queryFn:i,staleTime:l,retry:!1},t[7]=a,t[8]=n,t[9]=i,t[10]=l,t[11]=c):c=t[11],Nl(c)}function Vfe(e){const t=Ie.c(12);let o,a;t[0]!==e?({client:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=On.mcpResourcesList(o),t[3]=o,t[4]=n):n=t[4];let i;t[5]!==o?(i=()=>NL(o),t[5]=o,t[6]=i):i=t[6];const l=a.staleTime??3e4;let c;return t[7]!==a||t[8]!==n||t[9]!==i||t[10]!==l?(c={...a,queryKey:n,queryFn:i,staleTime:l,retry:!1},t[7]=a,t[8]=n,t[9]=i,t[10]=l,t[11]=c):c=t[11],Dd(c)}function Hfe(e){const t=Ie.c(15);let o,a,n;t[0]!==e?({client:o,uri:n,...a}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);let i;t[4]!==o||t[5]!==n?(i=On.mcpReadResource(o,n),t[4]=o,t[5]=n,t[6]=i):i=t[6];let l;t[7]!==o||t[8]!==n?(l=()=>hY(o,n),t[7]=o,t[8]=n,t[9]=l):l=t[9];const c=a.staleTime??3e4;let u;return t[10]!==a||t[11]!==i||t[12]!==l||t[13]!==c?(u={...a,queryKey:i,queryFn:l,staleTime:c,retry:!1},t[10]=a,t[11]=i,t[12]=l,t[13]=c,t[14]=u):u=t[14],Nl(u)}const FL="ui-resource-html";function Gfe(e){const t=Ie.c(22);let o,a,n,i,l,c;t[0]!==e?({orgSlug:n,connectionId:o,uri:c,studioUrl:l,meshUrl:a,...i}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i,t[5]=l,t[6]=c):(o=t[1],a=t[2],n=t[3],i=t[4],l=t[5],c=t[6]);let u;t[7]!==o||t[8]!==n||t[9]!==c?(u=On.mcpUiResourceHtml(n,o,c),t[7]=o,t[8]=n,t[9]=c,t[10]=u):u=t[10];let p;t[11]!==o||t[12]!==a||t[13]!==n||t[14]!==l||t[15]!==c?(p=async()=>{const v=`${iY({studioUrl:l,meshUrl:a},typeof window<"u"?window.location.origin:"")}/api/${encodeURIComponent(n)}/mcp/${encodeURIComponent(o)}/ui-resource?uri=${encodeURIComponent(c)}`,b=await fetch(v,{credentials:"include"});if(!b.ok)throw new Error(`Failed to read UI resource (${b.status})`);return b.text()},t[11]=o,t[12]=a,t[13]=n,t[14]=l,t[15]=c,t[16]=p):p=t[16];const g=i.staleTime??3e4;let m;return t[17]!==i||t[18]!==u||t[19]!==p||t[20]!==g?(m={...i,queryKey:u,queryFn:p,staleTime:g,retry:!1},t[17]=i,t[18]=u,t[19]=p,t[20]=g,t[21]=m):m=t[21],Nl(m)}const BL={featureNotInPlan:"feature_not_in_plan",aiBudgetExhausted:"ai_budget_exhausted"};class ZT extends Error{constructor(t,o,a){super(t),this.status=o,this.code=a,this.name="StudioToolError"}status;code}function jL(e){return e instanceof ZT&&Object.values(BL).includes(e.code??"")?e.code:null}async function fY(e,t,o){const a=await fetch(`/api/${encodeURIComponent(e)}/tools/${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o??{})});if(!a.ok){let n=`${t} failed (${a.status})`,i;try{const l=await a.json();l?.error&&(n=l.error),typeof l?.code=="string"&&(i=l.code)}catch{}throw new ZT(n,a.status,i)}try{return await a.json()}catch{throw new ZT(`${t} returned a non-JSON response`,a.status)}}function aC(){const e=Ie.c(5),{org:t}=Wp(),o=t.slug;let a;e[0]!==o?(a=(i,l)=>fY(o,i,l),e[0]=o,e[1]=a):a=e[1];let n;return e[2]!==o||e[3]!==a?(n={orgSlug:o,call:a},e[2]=o,e[3]=a,e[4]=n):n=e[4],n}const nC=5*6e4;async function UL(){return(await(await fetch("/api/config")).json()).config}function zL(){const e=Ie.c(1);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:On.publicConfig(),queryFn:UL,staleTime:nC},e[0]=t):t=e[0];const{data:o}=Nl(t);return o}function Kfe(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={queryKey:On.publicConfig(),queryFn:UL,staleTime:nC},e[0]=t):t=e[0],Dd(t).data}const $L=R.createContext(void 0);function vY(e){const t=Ie.c(3),{children:o}=e,a=zL();let n;return t[0]!==o||t[1]!==a.auth?(n=T.jsx($L.Provider,{value:a.auth,children:o}),t[0]=o,t[1]=a.auth,t[2]=n):n=t[2],n}function Wfe(){const e=R.useContext($L);if(e===void 0)throw new Error("useAuthConfig must be used within AuthConfigProvider");return e}var bY={},XA={};const Zh=Object.create(null),Mu=e=>bY||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?Zh:globalThis),Gn=new Proxy(Zh,{get(e,t){return Mu()[t]??Zh[t]},has(e,t){return t in Mu()||t in Zh},set(e,t,o){const a=Mu(!0);return a[t]=o,!0},deleteProperty(e,t){if(!t)return!1;const o=Mu(!0);return delete o[t],!0},ownKeys(){const e=Mu(!0);return Object.keys(e)}});function Ko(e,t){return typeof process<"u"&&XA?XA[e]??t:typeof Deno<"u"?Deno.env.get(e)??t:typeof Bun<"u"?Bun.env[e]??t:t}const Lu=1,ua=4,Br=8,kn=24,eD={eterm:ua,cons25:ua,console:ua,cygwin:ua,dtterm:ua,gnome:ua,hurd:ua,jfbterm:ua,konsole:ua,kterm:ua,mlterm:ua,mosh:kn,putty:ua,st:ua,"rxvt-unicode-24bit":kn,terminator:kn,"xterm-kitty":kn},yY=new Map(Object.entries({APPVEYOR:Br,BUILDKITE:Br,CIRCLECI:kn,DRONE:Br,GITEA_ACTIONS:kn,GITHUB_ACTIONS:kn,GITLAB_CI:Br,TRAVIS:Br})),SY=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function TY(){if(Ko("FORCE_COLOR")!==void 0)switch(Ko("FORCE_COLOR")){case"":case"1":case"true":return ua;case"2":return Br;case"3":return kn;default:return Lu}if(Ko("NODE_DISABLE_COLORS")!==void 0&&Ko("NODE_DISABLE_COLORS")!==""||Ko("NO_COLOR")!==void 0&&Ko("NO_COLOR")!==""||Ko("TERM")==="dumb")return Lu;if(Ko("TMUX"))return kn;if("TF_BUILD"in Gn&&"AGENT_NAME"in Gn)return ua;if("CI"in Gn){for(const{0:e,1:t}of yY)if(e in Gn)return t;return Ko("CI_NAME")==="codeship"?Br:Lu}if("TEAMCITY_VERSION"in Gn)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(Ko("TEAMCITY_VERSION"))!==null?ua:Lu;switch(Ko("TERM_PROGRAM")){case"iTerm.app":return!Ko("TERM_PROGRAM_VERSION")||/^[0-2]\./.exec(Ko("TERM_PROGRAM_VERSION"))!==null?Br:kn;case"HyperTerm":case"MacTerm":return kn;case"Apple_Terminal":return Br}if(Ko("COLORTERM")==="truecolor"||Ko("COLORTERM")==="24bit")return kn;if(Ko("TERM")){if(/truecolor/.exec(Ko("TERM"))!==null)return kn;if(/^xterm-256/.exec(Ko("TERM"))!==null)return Br;const e=Ko("TERM").toLowerCase();if(eD[e])return eD[e];if(SY.some(t=>t.exec(e)!==null))return ua}return Ko("COLORTERM")?ua:Lu}const jr={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"}},QT=["debug","info","success","warn","error"];function wY(e,t){return QT.indexOf(t)>=QT.indexOf(e)}const _Y={info:jr.fg.blue,success:jr.fg.green,warn:jr.fg.yellow,error:jr.fg.red,debug:jr.fg.magenta},CY=(e,t,o)=>{const a=new Date().toISOString();return o?`${jr.dim}${a}${jr.reset} ${_Y[e]}${e.toUpperCase()}${jr.reset} ${jr.bright}[Better Auth]:${jr.reset} ${t}`:`${a} ${e.toUpperCase()} [Better Auth]: ${t}`},PY=e=>{const t="warn",o=TY()!==1,a=(n,i,l=[])=>{if(!wY(t,n))return;const c=CY(n,i,o);{n==="error"?console.error(c,...l):n==="warn"?console.warn(c,...l):console.log(c,...l);return}};return{...Object.fromEntries(QT.map(n=>[n,(...[i,...l])=>a(n,i,l)])),get level(){return t}}};PY();function kY(e){return e.charAt(0).toUpperCase()+e.slice(1)}var cp=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};function xY(e){try{return(new URL(e).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new cp(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function EY(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")throw new cp(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof cp?t:new cp(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function YS(e,t="/api/auth"){if(EY(e),xY(e))return e;const o=e.replace(/\/+$/,"");return!t||t==="/"?o:(t=t.startsWith("/")?t:`/${t}`,`${o}${t}`)}function RY(e,t,o,a,n){if(e)return YS(e,t);{const i=Gn.BETTER_AUTH_URL||Gn.NEXT_PUBLIC_BETTER_AUTH_URL||Gn.PUBLIC_BETTER_AUTH_URL||Gn.NUXT_PUBLIC_BETTER_AUTH_URL||Gn.NUXT_PUBLIC_AUTH_URL||(Gn.BASE_URL!=="/"?Gn.BASE_URL:void 0);if(i)return YS(i,t)}if(typeof window<"u"&&window.location)return YS(window.location.origin,t)}const AY={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<"u"&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},DY={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},OY=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,tD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},IY=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function MY(e){return e instanceof Date&&!isNaN(e.getTime())}function LY(e){const t=IY.exec(e);if(!t)return null;const[,o,a,n,i,l,c,u,p,g,m]=t,f=new Date(Date.UTC(parseInt(o,10),parseInt(a,10)-1,parseInt(n,10),parseInt(i,10),parseInt(l,10),parseInt(c,10),u?parseInt(u.padEnd(3,"0"),10):0));if(p){const v=(parseInt(g,10)*60+parseInt(m,10))*(p==="+"?-1:1);f.setUTCMinutes(f.getUTCMinutes()+v)}return MY(f)?f:null}function NY(e,t={}){const{strict:o=!1,warnings:a=!1,reviver:n,parseDates:i=!0}=t;if(typeof e!="string")return e;const l=e.trim();if(l.length>0&&l[0]==='"'&&l.endsWith('"')&&!l.slice(1,-1).includes('"'))return l.slice(1,-1);const c=l.toLowerCase();if(c.length<=9&&c in tD)return tD[c];if(!OY.test(l)){if(o)throw new SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(DY).some(([u,p])=>{const g=p.test(l);return g&&a&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${u} pattern`),g})&&o)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(l,(p,g)=>{if(p==="__proto__"||p==="constructor"&&g&&typeof g=="object"&&"prototype"in g){a&&console.warn(`[better-json] Dropping "${p}" key to prevent prototype pollution`);return}if(i&&typeof g=="string"){const m=LY(g);if(m)return m}return n?n(p,g):g})}catch(u){if(o)throw u;return e}}function FY(e,t={strict:!0}){return NY(e,t)}let ur=[],cs=0;const yh=4,BY=globalThis.nanostoresGlobal||={epoch:0},Jc=e=>{let t=[],o={get(){return o.lc||o.listen(()=>{})(),o.value},init:e,lc:0,listen(a){return o.lc=t.push(a),()=>{for(let i=cs+yh;i<ur.length;)ur[i]===a?ur.splice(i,yh):i+=yh;let n=t.indexOf(a);~n&&(t.splice(n,1),--o.lc||o.off())}},notify(a,n){BY.epoch++;let i=!ur.length;for(let l of t)ur.push(l,o.value,a,n);if(i){for(cs=0;cs<ur.length;cs+=yh)ur[cs](ur[cs+1],ur[cs+2],ur[cs+3]);ur.length=0}},off(){},set(a){let n=o.value;n!==a&&(o.value=a,o.notify(n))},subscribe(a){let n=o.listen(a);return a(o.value),n},value:e};return o},jY=5,Sh=6,Th=10;let UY=(e,t,o,a)=>(e.events=e.events||{},e.events[o+Th]||(e.events[o+Th]=a(n=>{e.events[o].reduceRight((i,l)=>(l(i),i),{shared:{},...n})})),e.events[o]=e.events[o]||[],e.events[o].push(t),()=>{let n=e.events[o],i=n.indexOf(t);n.splice(i,1),n.length||(delete e.events[o],e.events[o+Th](),delete e.events[o+Th])});const zY=1e3;let qL=(e,t)=>UY(e,a=>{let n=t(a);n&&e.events[Sh].push(n)},jY,a=>{let n=e.listen;e.listen=(...l)=>(!e.lc&&!e.active&&(e.active=!0,a()),n(...l));let i=e.off;return e.events[Sh]=[],e.off=()=>{i(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let l of e.events[Sh])l();e.events[Sh]=[]}},zY)},()=>{e.listen=n,e.off=i}});function $Y(e,t,o){let a=new Set(t).add(void 0);return e.listen((n,i,l)=>{a.has(l)&&o(n,i,l)})}const qY=()=>typeof window>"u",Qu=(e,t,o,a)=>{const n=Jc({data:null,error:null,isPending:!0,isRefetching:!1,refetch:c=>i(c)}),i=async c=>new Promise(u=>{const p=typeof a=="function"?a({data:n.get().data,error:n.get().error,isPending:n.get().isPending}):a;o(t,{...p,query:{...p?.query,...c?.query},async onSuccess(g){n.set({data:g.data,error:null,isPending:!1,isRefetching:!1,refetch:n.value.refetch}),await p?.onSuccess?.(g)},async onError(g){const{request:m}=g,f=typeof m.retry=="number"?m.retry:m.retry?.attempts,v=m.retryAttempt||0;f&&v<f||(n.set({error:g.error,data:null,isPending:!1,isRefetching:!1,refetch:n.value.refetch}),await p?.onError?.(g))},async onRequest(g){const m=n.get();n.set({isPending:m.data===null,data:m.data,error:null,isRefetching:!0,refetch:n.value.refetch}),await p?.onRequest?.(g)}}).catch(g=>{n.set({error:g,data:null,isPending:!1,isRefetching:!1,refetch:n.value.refetch})}).finally(()=>{u(void 0)})});e=Array.isArray(e)?e:[e];let l=!1;for(const c of e)c.subscribe(async()=>{qY()||(l?await i():qL(n,()=>{const u=setTimeout(async()=>{l||(await i(),l=!0)},0);return()=>{n.off(),c.off(),clearTimeout(u)}}))});return n},ZS=Symbol.for("better-auth:broadcast-channel"),VY=()=>Math.floor(Date.now()/1e3);var HY=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:VY()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=t=>{if(t.key!==this.name)return;const o=JSON.parse(t.newValue??"{}");o?.event!=="session"||!o?.data||this.listeners.forEach(a=>a(o))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function QS(e="better-auth.message"){return globalThis[ZS]||(globalThis[ZS]=new HY(e)),globalThis[ZS]}const JS=Symbol.for("better-auth:focus-manager");var GY=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function oD(){return globalThis[JS]||(globalThis[JS]=new GY),globalThis[JS]}const XS=Symbol.for("better-auth:online-manager");var KY=class{listeners=new Set;isOnline=typeof navigator<"u"?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function e0(){return globalThis[XS]||(globalThis[XS]=new KY),globalThis[XS]}const Dc=()=>Math.floor(Date.now()/1e3),WY=5;function YY(e){const{sessionAtom:t,sessionSignal:o,$fetch:a,options:n={}}=e,i=n.sessionOptions?.refetchInterval??0,l=n.sessionOptions?.refetchOnWindowFocus??!0,c=n.sessionOptions?.refetchWhenOffline??!1,u={lastSync:0,lastSessionRequest:0,cachedSession:void 0},p=()=>c||e0().isOnline,g=_=>{if(!p())return;if(_?.event==="storage"){u.lastSync=Dc(),o.set(!o.get());return}const E=t.get();if(_?.event==="poll"){u.lastSessionRequest=Dc(),a("/get-session").then(k=>{k.error?t.set({...E,data:null,error:k.error}):t.set({...E,data:k.data,error:null}),u.lastSync=Dc(),o.set(!o.get())}).catch(()=>{});return}if(_?.event==="visibilitychange"){if(Dc()-u.lastSessionRequest<WY)return;u.lastSessionRequest=Dc()}(E?.data===null||E?.data===void 0||_?.event==="visibilitychange")&&(u.lastSync=Dc(),o.set(!o.get()))},m=_=>{QS().post({event:"session",data:{trigger:_},clientId:Math.random().toString(36).substring(7)})},f=()=>{i&&i>0&&(u.pollInterval=setInterval(()=>{t.get()?.data&&g({event:"poll"})},i*1e3))},v=()=>{u.unsubscribeBroadcast=QS().subscribe(()=>{g({event:"storage"})})},b=()=>{l&&(u.unsubscribeFocus=oD().subscribe(()=>{g({event:"visibilitychange"})}))},S=()=>{u.unsubscribeOnline=e0().subscribe(_=>{_&&g({event:"visibilitychange"})})};return{init:()=>{f(),v(),b(),S(),QS().setup(),oD().setup(),e0().setup()},cleanup:()=>{u.pollInterval&&(clearInterval(u.pollInterval),u.pollInterval=void 0),u.unsubscribeBroadcast&&(u.unsubscribeBroadcast(),u.unsubscribeBroadcast=void 0),u.unsubscribeFocus&&(u.unsubscribeFocus(),u.unsubscribeFocus=void 0),u.unsubscribeOnline&&(u.unsubscribeOnline(),u.unsubscribeOnline=void 0),u.lastSync=0,u.lastSessionRequest=0,u.cachedSession=void 0},triggerRefetch:g,broadcastSessionUpdate:m}}function ZY(e,t){const o=Jc(!1),a=Qu(o,"/get-session",e,{method:"GET"});return qL(a,()=>{const n=YY({sessionAtom:a,sessionSignal:o,$fetch:e,options:t});return n.init(),()=>{n.cleanup()}}),{session:a,$sessionSignal:o}}function t0(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)==="[object Module]":!0}function JT(e,t,o=".",a){if(!t0(t))return JT(e,{},o,a);const n={...t};for(const i of Object.keys(e)){if(i==="__proto__"||i==="constructor")continue;const l=e[i];l!=null&&(a&&a(n,i,l,o)||(Array.isArray(l)&&Array.isArray(n[i])?n[i]=[...l,...n[i]]:t0(l)&&t0(n[i])?n[i]=JT(l,n[i],(o?`${o}.`:"")+i.toString(),a):n[i]=l))}return n}function QY(e){return(...t)=>t.reduce((o,a)=>JT(o,a,"",e),{})}const JY=QY();var XY=Object.defineProperty,eZ=Object.defineProperties,tZ=Object.getOwnPropertyDescriptors,aD=Object.getOwnPropertySymbols,oZ=Object.prototype.hasOwnProperty,aZ=Object.prototype.propertyIsEnumerable,nD=(e,t,o)=>t in e?XY(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,hr=(e,t)=>{for(var o in t||(t={}))oZ.call(t,o)&&nD(e,o,t[o]);if(aD)for(var o of aD(t))aZ.call(t,o)&&nD(e,o,t[o]);return e},Nr=(e,t)=>eZ(e,tZ(t)),nZ=class extends Error{constructor(e,t,o){super(t||e.toString(),{cause:o}),this.status=e,this.statusText=t,this.error=o,Error.captureStackTrace(this,this.constructor)}},rZ=async(e,t)=>{var o,a,n,i,l,c;let u=t||{};const p={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:u,hooks:p};for(const g of t?.plugins||[]){if(g.init){const m=await((o=g.init)==null?void 0:o.call(g,e.toString(),t));u=m.options||u,e=m.url}p.onRequest.push((a=g.hooks)==null?void 0:a.onRequest),p.onResponse.push((n=g.hooks)==null?void 0:n.onResponse),p.onSuccess.push((i=g.hooks)==null?void 0:i.onSuccess),p.onError.push((l=g.hooks)==null?void 0:l.onError),p.onRetry.push((c=g.hooks)==null?void 0:c.onRetry)}return{url:e,options:u,hooks:p}},rD=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},iZ=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function sZ(e){if(typeof e=="number")return new rD({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new rD(e);case"exponential":return new iZ(e);default:throw new Error("Invalid retry strategy")}}var lZ=async e=>{const t={},o=async a=>typeof a=="function"?await a():a;if(e?.auth){if(e.auth.type==="Bearer"){const a=await o(e.auth.token);if(!a)return t;t.authorization=`Bearer ${a}`}else if(e.auth.type==="Basic"){const[a,n]=await Promise.all([o(e.auth.username),o(e.auth.password)]);if(!a||!n)return t;t.authorization=`Basic ${btoa(`${a}:${n}`)}`}else if(e.auth.type==="Custom"){const[a,n]=await Promise.all([o(e.auth.prefix),o(e.auth.value)]);if(!n)return t;t.authorization=`${a??""} ${n}`}}return t},cZ=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function dZ(e){const t=e.headers.get("content-type"),o=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";const a=t.split(";").shift()||"";return cZ.test(a)?"json":o.has(a)||a.startsWith("text/")?"text":"blob"}function uZ(e){try{return JSON.parse(e),!0}catch{return!1}}function XT(e){if(e===void 0)return!1;const t=typeof e;return t==="string"||t==="number"||t==="boolean"||t===null?!0:t!=="object"?!1:Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name==="Object"||typeof e.toJSON=="function"}function iD(e){try{return JSON.parse(e)}catch{return e}}function sD(e){return typeof e=="function"}function pZ(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<"u"&&sD(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&sD(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function mZ(e){const t=new Headers(e?.headers),o=await lZ(e);for(const[a,n]of Object.entries(o||{}))t.set(a,n);if(!t.has("content-type")){const a=gZ(e?.body);a&&t.set("content-type",a)}return t}function gZ(e){return XT(e)?"application/json":null}function hZ(e){if(!e?.body)return null;const t=new Headers(e?.headers);if(XT(e.body)&&!t.has("content-type")){for(const[o,a]of Object.entries(e?.body))a instanceof Date&&(e.body[o]=a.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&t.get("content-type")==="application/x-www-form-urlencoded"&&XT(e.body)?new URLSearchParams(e.body).toString():e.body}function fZ(e,t){var o;if(t?.method)return t.method.toUpperCase();if(e.startsWith("@")){const a=(o=e.split("@")[1])==null?void 0:o.split("/")[0];return HL.includes(a)?a.toUpperCase():t?.body?"POST":"GET"}return t?.body?"POST":"GET"}function vZ(e,t){let o;return!e?.signal&&e?.timeout&&(o=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:o,clearTimeout:()=>{o&&clearTimeout(o)}}}var bZ=class VL extends Error{constructor(t,o){super(o||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,VL.prototype)}};async function Qh(e,t){const o=await e["~standard"].validate(t);if(o.issues)throw new bZ(o.issues);return o.value}var HL=["get","post","put","patch","delete"],yZ=e=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(t,o){var a,n,i,l;const c=((n=(a=e.plugins)==null?void 0:a.find(u=>{var p;return(p=u.schema)!=null&&p.config?t.startsWith(u.schema.config.baseURL||"")||t.startsWith(u.schema.config.prefix||""):!1}))==null?void 0:n.schema)||e.schema;if(c){let u=t;(i=c.config)!=null&&i.prefix&&u.startsWith(c.config.prefix)&&(u=u.replace(c.config.prefix,""),c.config.baseURL&&(t=t.replace(c.config.prefix,c.config.baseURL))),(l=c.config)!=null&&l.baseURL&&u.startsWith(c.config.baseURL)&&(u=u.replace(c.config.baseURL,""));const p=c.schema[u];if(p){let g=Nr(hr({},o),{method:p.method,output:p.output});return o?.disableValidation||(g=Nr(hr({},g),{body:p.input?await Qh(p.input,o?.body):o?.body,params:p.params?await Qh(p.params,o?.params):o?.params,query:p.query?await Qh(p.query,o?.query):o?.query})),{url:t,options:g}}}return{url:t,options:o}}}),SZ=e=>{async function t(o,a){const n=Nr(hr(hr({},e),a),{plugins:[...e?.plugins||[],yZ(e||{}),...a?.plugins||[]]});if(e?.catchAllError)try{return await ew(o,n)}catch(i){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:i}}}return await ew(o,n)}return t};function TZ(e,t){const{baseURL:o,params:a,query:n}=t||{query:{},params:{},baseURL:""};let i=e.startsWith("http")?e.split("/").slice(0,3).join("/"):o||"";if(e.startsWith("@")){const m=e.toString().split("@")[1].split("/")[0];HL.includes(m)&&(e=e.replace(`@${m}/`,"/"))}i.endsWith("/")||(i+="/");let[l,c]=e.replace(i,"").split("?");const u=new URLSearchParams(c);for(const[m,f]of Object.entries(n||{})){if(f==null)continue;let v;if(typeof f=="string")v=f;else if(Array.isArray(f)){for(const b of f)u.append(m,b);continue}else v=JSON.stringify(f);u.set(m,v)}if(a)if(Array.isArray(a)){const m=l.split("/").filter(f=>f.startsWith(":"));for(const[f,v]of m.entries()){const b=a[f];l=l.replace(v,b)}}else for(const[m,f]of Object.entries(a))l=l.replace(`:${m}`,String(f));l=l.split("/").map(encodeURIComponent).join("/"),l.startsWith("/")&&(l=l.slice(1));let p=u.toString();return p=p.length>0?`?${p}`.replace(/\+/g,"%20"):"",i.startsWith("http")?new URL(`${l}${p}`,i):`${i}${l}${p}`}var ew=async(e,t)=>{var o,a,n,i,l,c,u,p;const{hooks:g,url:m,options:f}=await rZ(e,t),v=pZ(f),b=new AbortController,S=(o=f.signal)!=null?o:b.signal,C=TZ(m,f),w=hZ(f),_=await mZ(f),E=fZ(m,f);let k=Nr(hr({},f),{url:C,headers:_,body:w,method:E,signal:S});for(const j of g.onRequest)if(j){const K=await j(k);typeof K=="object"&&K!==null&&(k=K)}("pipeTo"in k&&typeof k.pipeTo=="function"||typeof((a=t?.body)==null?void 0:a.pipe)=="function")&&("duplex"in k||(k.duplex="half"));const{clearTimeout:x}=vZ(f,b);let A=await v(k.url,k);x();const D={response:A,request:k};for(const j of g.onResponse)if(j){const K=await j(Nr(hr({},D),{response:(n=t?.hookOptions)!=null&&n.cloneResponse?A.clone():A}));K instanceof Response?A=K:typeof K=="object"&&K!==null&&(A=K.response)}if(A.ok){if(!(k.method!=="HEAD"))return{data:"",error:null};const K=dZ(A),ne={data:null,response:A,request:k};if(K==="json"||K==="text"){const H=await A.text(),Z=(i=k.jsonParser)!=null?i:iD;ne.data=await Z(H)}else ne.data=await A[K]();k?.output&&k.output&&!k.disableValidation&&(ne.data=await Qh(k.output,ne.data));for(const H of g.onSuccess)H&&await H(Nr(hr({},ne),{response:(l=t?.hookOptions)!=null&&l.cloneResponse?A.clone():A}));return t?.throw?ne.data:{data:ne.data,error:null}}const O=(c=t?.jsonParser)!=null?c:iD,N=await A.text(),$=uZ(N),F=$?await O(N):null,z={response:A,responseText:N,request:k,error:Nr(hr({},F),{status:A.status,statusText:A.statusText})};for(const j of g.onError)j&&await j(Nr(hr({},z),{response:(u=t?.hookOptions)!=null&&u.cloneResponse?A.clone():A}));if(t?.retry){const j=sZ(t.retry),K=(p=t.retryAttempt)!=null?p:0;if(await j.shouldAttemptRetry(K,A)){for(const H of g.onRetry)H&&await H(D);const ne=j.getDelay(K);return await new Promise(H=>setTimeout(H,ne)),await ew(e,Nr(hr({},t),{retryAttempt:K+1}))}}if(t?.throw)throw new nZ(A.status,A.statusText,$?F:N);return{data:null,error:Nr(hr({},F),{status:A.status,statusText:A.statusText})}};const wZ=(e,t)=>{const o="credentials"in Request.prototype,a=RY(e?.baseURL,e?.basePath)??"/api/auth",n=e?.plugins?.flatMap(k=>k.fetchPlugins).filter(k=>k!==void 0)||[],i={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:l,onError:c,onRequest:u,onResponse:p,...g}=e?.fetchOptions||{},m=SZ({baseURL:a,...o?{credentials:"include"}:{},method:"GET",jsonParser(k){return k?FY(k,{strict:!1}):null},customFetchImpl:fetch,...g,plugins:[i,...g.plugins||[],...e?.disableDefaultFetchPlugins?[]:[AY],...n]}),{$sessionSignal:f,session:v}=ZY(m,e),b=e?.plugins||[];let S={};const C={$sessionSignal:f,session:v},w={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},_=[{signal:"$sessionSignal",matcher(k){return k==="/sign-out"||k==="/update-user"||k==="/sign-up/email"||k==="/sign-in/email"||k==="/delete-user"||k==="/verify-email"||k==="/revoke-sessions"||k==="/revoke-session"||k==="/change-email"}}];for(const k of b)k.getAtoms&&Object.assign(C,k.getAtoms?.(m)),k.pathMethods&&Object.assign(w,k.pathMethods),k.atomListeners&&_.push(...k.atomListeners);const E={notify:k=>{C[k].set(!C[k].get())},listen:(k,x)=>{C[k].subscribe(x)},atoms:C};for(const k of b)k.getActions&&(S=JY(k.getActions?.(m,E,e)??{},S));return{get baseURL(){return a},pluginsActions:S,pluginsAtoms:C,pluginPathMethods:w,atomListeners:_,$fetch:m,$store:E}};function _Z(e){return typeof e=="object"&&e!==null&&"get"in e&&typeof e.get=="function"&&"lc"in e&&typeof e.lc=="number"}function CZ(e,t,o){const a=t[e],{fetchOptions:n,query:i,...l}=o||{};return a||(n?.method?n.method:l&&Object.keys(l).length>0?"POST":"GET")}function PZ(e,t,o,a,n){function i(l=[]){return new Proxy(function(){},{get(c,u){if(typeof u!="string"||u==="then"||u==="catch"||u==="finally")return;const p=[...l,u];let g=e;for(const m of p)if(g&&typeof g=="object"&&m in g)g=g[m];else{g=void 0;break}return typeof g=="function"||_Z(g)?g:i(p)},apply:async(c,u,p)=>{const g="/"+l.map(_=>_.replace(/[A-Z]/g,E=>`-${E.toLowerCase()}`)).join("/"),m=p[0]||{},f=p[1]||{},{query:v,fetchOptions:b,...S}=m,C={...f,...b},w=CZ(g,o,m);return await t(g,{...C,body:w==="GET"?void 0:{...S,...C?.body||{}},query:v||C?.query,method:w,async onSuccess(_){if(await C?.onSuccess?.(_),!n||C.disableSignal)return;const E=n.filter(x=>x.matcher(g));if(!E.length)return;const k=new Set;for(const x of E){const A=a[x.signal];if(!A)return;if(k.has(x.signal))continue;k.add(x.signal);const D=A.get();setTimeout(()=>{A.set(!D)},10)}}})}})}return i()}function kZ(e,t={}){const o=R.useRef(e.get()),{keys:a,deps:n=[e,a]}=t,i=R.useCallback(c=>{const u=p=>{o.current!==p&&(o.current=p,c())};return u(e.value),a?.length?$Y(e,a,u):e.listen(u)},n),l=()=>o.current;return R.useSyncExternalStore(i,l,l)}function xZ(e){return`use${kY(e)}`}function EZ(e){const{pluginPathMethods:t,pluginsActions:o,pluginsAtoms:a,$fetch:n,$store:i,atomListeners:l}=wZ(e),c={};for(const[u,p]of Object.entries(a))c[xZ(u)]=()=>kZ(p);return PZ({...o,...c,$fetch:n,$store:i},n,t,a,l)}function RZ(e){return{authorize(t,o="AND"){let a=!1;for(const[n,i]of Object.entries(t)){const l=e[n];if(!l)return{success:!1,error:`You are not allowed to access resource: ${n}`};if(Array.isArray(i))a=i.every(c=>l.includes(c));else if(typeof i=="object"){const c=i;c.connector==="OR"?a=c.actions.some(u=>l.includes(u)):a=c.actions.every(u=>l.includes(u))}else throw new cp("Invalid access control request");if(a&&o==="OR")return{success:a};if(!a&&o==="AND")return{success:!1,error:`unauthorized to access resource "${n}"`}}return a?{success:a}:{success:!1,error:"Not authorized"}},statements:e}}function GL(e){return{newRole(t){return RZ(t)},statements:e}}const AZ={user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]},KL=GL(AZ),WL=KL.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),YL=KL.newRole({user:[],session:[]}),DZ={admin:WL,user:YL},OZ=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions&&!e.permission)return!1;const t=(e.role||e.options?.defaultRole||"user").split(","),o=e.options?.roles||DZ;for(const a of t)if(o[a]?.authorize(e.permission??e.permissions)?.success)return!0;return!1},IZ=e=>{const t={admin:WL,user:YL,...e?.roles};return{id:"admin-client",$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:o=>OZ({role:o.role,options:{ac:e?.ac,roles:t},permissions:o.permissions??o.permission})}}),pathMethods:{"/admin/list-users":"GET","/admin/stop-impersonating":"POST"}}},MZ=()=>({id:"email-otp",$InferServerPlugin:{},atomListeners:[{matcher:e=>e==="/email-otp/verify-email"||e==="/sign-in/email-otp",signal:"$sessionSignal"}]}),LZ=()=>({id:"magic-link",$InferServerPlugin:{}}),NZ={organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]},rC=GL(NZ),ZL=rC.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),QL=rC.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),JL=rC.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),FZ={admin:ZL,owner:QL,member:JL},BZ=(e,t)=>{if(!e.permissions&&!e.permission)return!1;const o=e.role.split(","),a=e.options.creatorRole||"owner",n=o.includes(a),i=e.allowCreatorAllPermissions||!1;if(n&&i)return!0;for(const l of o)if(t[l]?.authorize(e.permissions??e.permission)?.success)return!0;return!1},jZ=e=>BZ(e,e.options.roles||FZ),UZ=e=>{const t=Jc(!1),o=Jc(!1),a=Jc(!1),n=Jc(!1),i={admin:ZL,member:JL,owner:QL,...e?.roles};return{id:"organization",$InferServerPlugin:{},getActions:(l,c,u)=>({$Infer:{ActiveOrganization:{},Organization:{},Invitation:{},Member:{},Team:{}},organization:{checkRolePermission:p=>jZ({role:p.role,options:{ac:e?.ac,roles:i},permissions:p.permissions??p.permission})}}),getAtoms:l=>{const c=Qu(t,"/organization/list",l,{method:"GET"});return{$listOrg:t,$activeOrgSignal:o,$activeMemberSignal:a,$activeMemberRoleSignal:n,activeOrganization:Qu([o],"/organization/get-full-organization",l,()=>({method:"GET"})),listOrganizations:c,activeMember:Qu([a],"/organization/get-active-member",l,{method:"GET"}),activeMemberRole:Qu([n],"/organization/get-active-member-role",l,{method:"GET"})}},pathMethods:{"/organization/get-full-organization":"GET","/organization/list-user-teams":"GET"},atomListeners:[{matcher(l){return l==="/organization/create"||l==="/organization/delete"||l==="/organization/update"},signal:"$listOrg"},{matcher(l){return l.startsWith("/organization")},signal:"$activeOrgSignal"},{matcher(l){return l.startsWith("/organization/set-active")},signal:"$sessionSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberSignal"},{matcher(l){return l.includes("/organization/update-member-role")},signal:"$activeMemberRoleSignal"}]}},zZ="1.6.11",$Z=e=>({id:"sso-client",version:zZ,$InferServerPlugin:{},pathMethods:{"/sso/providers":"GET","/sso/get-provider":"GET"}});function XL(e){const t=e?.metadata;if(!t)return!1;try{return(typeof t=="string"?JSON.parse(t):t).archived===!0}catch{return!1}}const Yp=EZ({plugins:[UZ({}),IZ(),$Z(),LZ(),MZ()]}),qZ=3e4;let Ju=null,wh=null;function eN(){if(Ju&&Ju.expiresAt>Date.now())return Promise.resolve(Ju.result);if(wh)return wh;const e=Yp.organization.list().then(t=>{const o=t.data?{...t,data:t.data.filter(a=>!XL(a))}:t;return o.data&&(Ju={result:o,expiresAt:Date.now()+qZ}),o}).finally(()=>{wh=null});return wh=e,e}function Yfe(){const e=Yp.useListOrganizations(),t=e.data?.filter(o=>!XL(o));return{...e,data:t}}function Zfe(){Ju=null}function VZ(e){try{return JSON.parse(e)}catch{return}}function lD(e,t){if(typeof localStorage>"u")return typeof t=="function"?t(void 0):t;const o=localStorage.getItem(e),a=o?VZ(o):void 0,n=typeof t=="function"?t(a):a??t;if(a===void 0||n!==a)try{const i=JSON.stringify(n);localStorage.setItem(e,i)}catch{}return n}function HZ(e,t){const o=Ie.c(25),a=hv();let n;o[0]!==e?(n=["localStorage",e],o[0]=e,o[1]=n):n=o[1];const i=n;let l,c;o[2]!==t||o[3]!==e?(l=()=>lD(e,t),c=()=>lD(e,t),o[2]=t,o[3]=e,o[4]=l,o[5]=c):(l=o[4],c=o[5]);let u;o[6]!==i||o[7]!==l||o[8]!==c?(u={queryKey:i,queryFn:l,initialData:c,staleTime:1/0,gcTime:1/0},o[6]=i,o[7]=l,o[8]=c,o[9]=u):u=o[9];const{data:p}=Dd(u);let g;o[10]!==e?(g=async _=>(typeof localStorage<"u"&&localStorage.setItem(e,JSON.stringify(_)),_),o[10]=e,o[11]=g):g=o[11];let m;o[12]!==a||o[13]!==i?(m=_=>{a.setQueryData(i,_)},o[12]=a,o[13]=i,o[14]=m):m=o[14];let f;o[15]!==g||o[16]!==m?(f={mutationFn:g,onSuccess:m},o[15]=g,o[16]=m,o[17]=f):f=o[17];const v=lp(f);let b;o[18]!==v||o[19]!==a||o[20]!==i?(b=_=>{const E=a.getQueryData(i),k=typeof _=="function"?_(E):_;v.mutate(k)},o[18]=v,o[19]=a,o[20]=i,o[21]=b):b=o[21];const S=b,C=p;let w;return o[22]!==S||o[23]!==C?(w=[C,S],o[22]=S,o[23]=C,o[24]=w):w=o[24],w}const Bl={chatSelectedImageModel:e=>`studio:chat:selectedImageModel:${e}`,chatSelectedWebSearchModel:e=>`studio:chat:selectedWebSearchModel:${e}`,chatSelectedDeepResearchModel:e=>`studio:chat:selectedDeepResearchModel:${e}`,chatSimpleModeTier:e=>`studio:chat:simpleModeTier:${e}`,chatLastAgentOption:e=>`studio:chat:lastAgentOption:${e}`,chatAutosend:(e,t)=>`studio:chat:autosend:${e}:${t}`,chatThreadIntent:(e,t)=>`studio:chat:threadIntent:${e}:${t}`,homeTaskMode:e=>`home-task-mode:${e}`,chatDraft:(e,t)=>`studio:chat:draft:${e}:${t}`,taskBoardPrs:e=>`studio:task-board-prs:${e}`,sidePanelWidth:()=>"studio:side-panel:width",sidebarOpen:()=>"studio:sidebar-open",preferences:()=>"studio:user:preferences",lastOrgSlug:()=>"studio:last-org-slug",lastLocation:()=>"studio:last-location",connectionsTab:e=>`studio:connections:tab:${e}`,taskLastViewed:e=>`studio:chat:task-last-viewed:${e}`,sidebarGroupOrder:(e,t)=>`sidebar.group-order.${e}.${t}`,ptBrAnnouncementSeen:e=>`studio:announcement:pt-br:${e}`},tN=["en","pt-BR"];function iC(){return typeof navigator<"u"&&navigator.language?.toLowerCase().startsWith("pt")?"pt-BR":"en"}const GZ={toolApprovalLevel:"auto",enableNotifications:typeof Notification<"u",enableSounds:!1,theme:"system",language:iC(),compactPageLayout:!1,shownTaskBoardLanes:[]},oN=["auto","readonly"],Qfe=[{value:"readonly",labelKey:"settings.preferences.toolApprovalAsk",shortKey:"settings.preferences.toolApprovalAskShort"},{value:"auto",labelKey:"settings.preferences.toolApprovalAuto",shortKey:"settings.preferences.toolApprovalAutoShort"}],KZ=["light","dark","system"];function Jfe(){try{const e=JSON.parse(localStorage.getItem(Bl.preferences())??"{}");if(oN.includes(e.toolApprovalLevel))return e.toolApprovalLevel}catch{}return"auto"}function WZ(){try{const e=JSON.parse(localStorage.getItem(Bl.preferences())??"{}");if(tN.includes(e.language))return e.language}catch{}return iC()}function sC(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=Bl.preferences(),e[0]=t):t=e[0],HZ(t,YZ)}function YZ(e){const t={...GZ,...e};return"showProjectSettingsGear"in t&&delete t.showProjectSettingsGear,t.compactPageLayout=t.compactPageLayout===!0,oN.includes(t.toolApprovalLevel)||(t.toolApprovalLevel="auto"),KZ.includes(t.theme)||(t.theme="system"),tN.includes(t.language)||(t.language=iC()),Array.isArray(t.shownTaskBoardLanes)||(t.shownTaskBoardLanes=[]),t}function Dv(){const[e]=sC();return e.compactPageLayout}const ZZ={"page.overview":"Overview","page.app":"App","page.view":"View","page.file":"File","page.document":"Document","page.item":"Item","page.breadcrumbs":"Breadcrumbs","page.breadcrumbMenu":"Show navigation path","page.views":"Page views","page.openThread":"Open chat","page.closeThread":"Close chat","page.collapseSidebar":"Collapse sidebar","page.expandSidebar":"Expand sidebar"},QZ={"virtualMcp.addConnectionDialog.addConnectionTitle":"Add Connection","virtualMcp.addConnectionDialog.authenticationFailedError":"Authentication failed: {error}","virtualMcp.addConnectionDialog.connected":"Connected","virtualMcp.addConnectionDialog.connectedAuthenticated":"Connected and authenticated","virtualMcp.addConnectionDialog.connectionsTitle":"Connections","virtualMcp.addConnectionDialog.failedToAddConnection":"Failed to add connection","virtualMcp.addConnectionDialog.failedToConnect":"Failed to connect","virtualMcp.addConnectionDialog.mcpServerConnectionError":"This MCP Server cannot be connected: no connection method available","virtualMcp.addConnectionDialog.searchConnectionsPlaceholder":"Search connections...","virtualMcp.addConnectionDialog.signInFailedDescription":"It was added to your project, but its sign-in setup looks off. You can try authenticating again later from the connection's settings. ({error})","virtualMcp.addConnectionDialog.signInFailedTitle":"Couldn't sign in to this connection","virtualMcp.connectionDialogContent.add":"Add","virtualMcp.connectionDialogContent.added":"Added","virtualMcp.connectionDialogContent.builtByDeco":"Built and maintained by Deco","virtualMcp.connectionDialogContent.builtByOfficial":"Built and maintained by the official vendor","virtualMcp.connectionDialogContent.connect":"Connect","virtualMcp.connectionDialogContent.connected":"Connected","virtualMcp.connectionDialogContent.customConnection":"Custom Connection","virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable":"No connections available","virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"No connections yet","virtualMcp.connectionDialogContent.emptyStateSearchNoMatch":'No connections match "{search}"',"virtualMcp.connectionDialogContent.madeByDeco":"Made by Deco","virtualMcp.connectionDialogContent.sectionAllConnections":"All connections","virtualMcp.connectionDialogContent.sectionVerified":"Verified","virtualMcp.connectionDialogContent.tabAll":"All","virtualMcp.connectionDialogContent.tabConnected":"Connected","virtualMcp.connectionDialogContent.verifiedByDeco":"Verified by the Deco team","virtualMcp.connectionItem.authorize":"Authorize","virtualMcp.connectionItem.configureResources":"Configure resources","virtualMcp.connectionItem.connectionDisabled":"Connection disabled","virtualMcp.connectionItem.connectionEnabled":"Connection enabled","virtualMcp.connectionItem.connectionNotFound":"Connection not found","virtualMcp.connectionItem.connectionSettings":"Connection settings","virtualMcp.connectionItem.disable":"Disable","virtualMcp.connectionItem.disableConnection":"Disable connection","virtualMcp.connectionItem.disabled":"Disabled","virtualMcp.connectionItem.disabledError":"Disabled (error)","virtualMcp.connectionItem.enable":"Enable","virtualMcp.connectionItem.failedToUpdateConnection":"Failed to update connection","virtualMcp.connectionItem.needsAuthorization":"Needs authorization","virtualMcp.connectionItem.newInstance":"New instance","virtualMcp.connectionItem.remove":"Remove","virtualMcp.connectionItem.removeConnection":"Remove connection","virtualMcp.dependencySelectionDialog.authorizationDescription":"This connection needs to be authorized before you can configure its tools and resources.","virtualMcp.dependencySelectionDialog.authorizationRequired":"Authorization required","virtualMcp.dependencySelectionDialog.authorize":"Authorize","virtualMcp.dependencySelectionDialog.deselectAll":"Deselect all","virtualMcp.dependencySelectionDialog.done":"Done","virtualMcp.dependencySelectionDialog.noActiveToolsSelected":"No active tools selected","virtualMcp.dependencySelectionDialog.noPromptsAvailable":"No prompts available","virtualMcp.dependencySelectionDialog.noResourcesAvailable":"No resources available","virtualMcp.dependencySelectionDialog.noToolsAvailable":"No tools available","virtualMcp.dependencySelectionDialog.promptsNotSupported":"Prompts not supported by this server","virtualMcp.dependencySelectionDialog.resourcesNotSupported":"Resources not supported by this server","virtualMcp.dependencySelectionDialog.selectAll":"Select all","virtualMcp.dependencySelectionDialog.somethingWentWrong":"Something went wrong","virtualMcp.dependencySelectionDialog.tabActive":"Active","virtualMcp.dependencySelectionDialog.tabPrompts":"Prompts","virtualMcp.dependencySelectionDialog.tabResources":"Resources","virtualMcp.dependencySelectionDialog.tabTools":"Tools","virtualMcp.dependencySelectionDialog.toolsNotSupported":"Tools not supported by this server","virtualMcp.dependencySelectionDialog.unexpectedError":"An unexpected error occurred","virtualMcp.filesSection.add":"Add","virtualMcp.filesSection.description":"Attach files and skills the project can always reference.","virtualMcp.filesSection.failedUploadFile":"Failed to upload file.","virtualMcp.filesSection.fileTooLargeDescription":"Exceeds the 25MB limit, not uploaded: {names}","virtualMcp.filesSection.fileTooLargeTitle":"File too large","virtualMcp.filesSection.filesAndSkills":"Files and skills","virtualMcp.filesSection.kindFile":"File","virtualMcp.filesSection.kindSkill":"Skill","virtualMcp.filesSection.noFilesFound":"No files found.","virtualMcp.filesSection.noFilesOrSkillsYet":"No files or skills yet. Add one or drag and drop here.","virtualMcp.filesSection.noSkillsFound":"No skills found.","virtualMcp.filesSection.removeAriaLabel":"Remove {name}","virtualMcp.filesSection.searchFilesPlaceholder":"Search files...","virtualMcp.filesSection.searchSkillsPlaceholder":"Search skills...","virtualMcp.filesSection.selectFileOrFolder":"Select file or folder","virtualMcp.filesSection.selectSkill":"Select skill","virtualMcp.filesSection.uploadFile":"Upload file","virtualMcp.layoutTabContent.noMainView":"No main view","virtualMcp.layoutTabContent.automations":"Automations","virtualMcp.layoutTabContent.chatAlwaysShown":"Chat is always shown when it is the default view","virtualMcp.layoutTabContent.layout":"Layout","virtualMcp.layoutTabContent.mainView":"Main view","virtualMcp.layoutTabContent.mainViewDescription":"What users see when they first open this project.","virtualMcp.layoutTabContent.settings":"Settings","virtualMcp.layoutTabContent.showChat":"Show chat","virtualMcp.layoutTabContent.showChatDescription":"Display Chat in the side panel alongside the main view.","virtualMcp.layoutTabContent.siteEditor":"Site Editor","virtualMcp.settings.title":"Project settings","virtualMcp.settings.navigation":"Project settings sections","virtualMcp.settings.identity.icon":"Project icon","virtualMcp.settings.identity.iconDescription":"How your project appears in the sidebar and across Studio.","virtualMcp.settings.identity.name":"Project name","virtualMcp.settings.identity.description":"Description","virtualMcp.settings.general.title":"General","virtualMcp.settings.site.title":"CMS","virtualMcp.settings.site.classicTitle":"Site and sandbox","virtualMcp.settings.groups.advanced":"Advanced","virtualMcp.settings.connections.title":"Connections","virtualMcp.settings.views.defaults":"Default layout","virtualMcp.settings.views.sidebar":"Views","virtualMcp.settings.views.open":"Open","virtualMcp.settings.views.pin":"Pin to sidebar","virtualMcp.settings.views.unpin":"Remove from sidebar","virtualMcp.settings.views.setMainView":"Set as main view","virtualMcp.settings.views.rowActions":"View options","virtualMcp.subAgentsSection.addSubAgent":"Add sub-project","virtualMcp.subAgentsSection.anyAgent":"Any project","virtualMcp.subAgentsSection.canDelegateToAnyAgent":"Can delegate to any project in the organization.","virtualMcp.subAgentsSection.canOnlyDelegateToItself":"Can only delegate to a fresh copy of itself, no other projects.","virtualMcp.subAgentsSection.emptyStateMessage":"No sub-projects selected yet. Add one — until then this project can only delegate to itself.","virtualMcp.subAgentsSection.noAgentsFound":"No projects found.","virtualMcp.subAgentsSection.onlyItself":"Only itself","virtualMcp.subAgentsSection.searchPlaceholder":"Search projects...","virtualMcp.subAgentsSection.specificAgents":"Specific projects","virtualMcp.subAgentsSection.title":"Sub-projects","virtualMcp.virtualMcp.addConnection":"Add connection","virtualMcp.virtualMcp.agentDeleted":'Deleted "{title}"',"virtualMcp.virtualMcp.agentNameFallback":"Agent","virtualMcp.virtualMcp.agentNamePlaceholder":"Project name","virtualMcp.virtualMcp.authenticationFailed":"Authentication failed: {error}","virtualMcp.virtualMcp.authenticationSuccessful":"Authentication successful","virtualMcp.virtualMcp.backToSpaces":"Back to spaces","virtualMcp.virtualMcp.cancel":"Cancel","virtualMcp.virtualMcp.connect":"Connect","virtualMcp.virtualMcp.connections":"Connections","virtualMcp.virtualMcp.created":"Created","virtualMcp.virtualMcp.delete":"Delete","virtualMcp.virtualMcp.deleteAgent":"Delete project","virtualMcp.virtualMcp.deleteAgentConfirm":"Delete Project?","virtualMcp.virtualMcp.deleteAgentConfirmDescription":"This action cannot be undone. This will permanently delete {title}.","virtualMcp.virtualMcp.deleteAgentDescription":"Permanently delete this project and all its data.","virtualMcp.virtualMcp.descriptionPlaceholder":"Add a description...","virtualMcp.virtualMcp.failedToCreateInstance":"Failed to create instance","virtualMcp.virtualMcp.fullscreen":"Fullscreen","virtualMcp.virtualMcp.improve":"Improve","virtualMcp.virtualMcp.instanceAlreadyAdded":"This instance is already added to the project","virtualMcp.virtualMcp.instructions":"Instructions","virtualMcp.virtualMcp.instructionsPlaceholder":"Define how this agent should behave, what tone to use, any constraints or guidelines...","virtualMcp.virtualMcp.lastUsed":"Last used {time}","virtualMcp.virtualMcp.neverUsed":"Never used","virtualMcp.virtualMcp.newInstanceCreated":"New instance created","virtualMcp.virtualMcp.noConnectionsYet":"No connections yet. Add one to get started.","virtualMcp.virtualMcp.openFullscreenEditor":"Open fullscreen editor","virtualMcp.virtualMcp.promptTemplate":"+ Prompt template","virtualMcp.virtualMcp.promptTemplateContent":`<role>
56
56
  Define who this agent is and what it specializes in.
57
57
  Example: You are a support triage agent for B2B merchants.
58
58
  </role>
@@ -157,7 +157,7 @@ ou um por linha`,"common.inviteMemberDialog.errorFailedInvite":"Falha ao convida
157
157
  .block-interactivity-`.concat(e,` {pointer-events: none;}
158
158
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
159
159
  `)},xoe=0,Lc=[];function Eoe(e){var t=R.useRef([]),o=R.useRef([0,0]),a=R.useRef(),n=R.useState(xoe++)[0],i=R.useState(fF)[0],l=R.useRef(e);R.useEffect(function(){l.current=e},[e]),R.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var S=Yte([e.lockRef.current],(e.shards||[]).map(qD),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var c=R.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=Ah(S),_=o.current,E="deltaX"in S?S.deltaX:_[0]-w[0],k="deltaY"in S?S.deltaY:_[1]-w[1],x,A=S.target,D=Math.abs(E)>Math.abs(k)?"h":"v";if("touches"in S&&D==="h"&&A.type==="range")return!1;var O=window.getSelection(),N=O&&O.anchorNode,$=N?N===A||N.contains(A):!1;if($)return!1;var F=zD(D,A);if(!F)return!0;if(F?x=D:(x=D==="v"?"h":"v",F=zD(D,A)),!F)return!1;if(!a.current&&"changedTouches"in S&&(E||k)&&(a.current=x),!x)return!0;var z=a.current||x;return Coe(z,C,S,z==="h"?E:k)},[]),u=R.useCallback(function(S){var C=S;if(!(!Lc.length||Lc[Lc.length-1]!==i)){var w="deltaY"in C?$D(C):Ah(C),_=t.current.filter(function(x){return x.name===C.type&&(x.target===C.target||C.target===x.shadowParent)&&Poe(x.delta,w)})[0];if(_&&_.should){C.cancelable&&C.preventDefault();return}if(!_){var E=(l.current.shards||[]).map(qD).filter(Boolean).filter(function(x){return x.contains(C.target)}),k=E.length>0?c(C,E[0]):!l.current.noIsolation;k&&C.cancelable&&C.preventDefault()}}},[]),p=R.useCallback(function(S,C,w,_){var E={name:S,delta:C,target:w,should:_,shadowParent:Roe(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(k){return k!==E})},1)},[]),g=R.useCallback(function(S){o.current=Ah(S),a.current=void 0},[]),m=R.useCallback(function(S){p(S.type,$D(S),S.target,c(S,e.lockRef.current))},[]),f=R.useCallback(function(S){p(S.type,Ah(S),S.target,c(S,e.lockRef.current))},[]);R.useEffect(function(){return Lc.push(i),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Mc),document.addEventListener("touchmove",u,Mc),document.addEventListener("touchstart",g,Mc),function(){Lc=Lc.filter(function(S){return S!==i}),document.removeEventListener("wheel",u,Mc),document.removeEventListener("touchmove",u,Mc),document.removeEventListener("touchstart",g,Mc)}},[]);var v=e.removeScrollBar,b=e.inert;return R.createElement(R.Fragment,null,b?R.createElement(i,{styles:koe(n)}):null,v?R.createElement(voe,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Roe(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Aoe=noe(hF,Eoe);var PC=R.forwardRef(function(e,t){return R.createElement(Nv,Ur({},e,{ref:t,sideCar:Aoe}))});PC.classNames=Nv.classNames;var lw=["Enter"," "],Doe=["ArrowDown","PageUp","Home"],SF=["ArrowUp","PageDown","End"],Ooe=[...Doe,...SF],Ioe={ltr:[...lw,"ArrowRight"],rtl:[...lw,"ArrowLeft"]},Moe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},em="Menu",[Ep,Loe,Noe]=xN(em),[zl,TF]=Ul(em,[Noe,YN,iF]),tm=YN(),wF=iF(),[_F,zs]=zl(em),[Foe,om]=zl(em),CF=e=>{const{__scopeMenu:t,open:o=!1,children:a,dir:n,onOpenChange:i,modal:l=!0}=e,c=tm(t),[u,p]=R.useState(null),g=R.useRef(!1),m=Tr(i),f=EN(n);return R.useEffect(()=>{const v=()=>{g.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>g.current=!1;return document.addEventListener("keydown",v,{capture:!0}),()=>{document.removeEventListener("keydown",v,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),T.jsx(nF,{...c,children:T.jsx(_F,{scope:t,open:o,onOpenChange:m,content:u,onContentChange:p,children:T.jsx(Foe,{scope:t,onClose:R.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:g,dir:f,modal:l,children:a})})})};CF.displayName=em;var Boe="MenuAnchor",kC=R.forwardRef((e,t)=>{const{__scopeMenu:o,...a}=e,n=tm(o);return T.jsx(xte,{...n,...a,ref:t})});kC.displayName=Boe;var xC="MenuPortal",[joe,PF]=zl(xC,{forceMount:void 0}),kF=e=>{const{__scopeMenu:t,forceMount:o,children:a,container:n}=e,i=zs(xC,t);return T.jsx(joe,{scope:t,forceMount:o,children:T.jsx(Ii,{present:o||i.open,children:T.jsx(CC,{asChild:!0,container:n,children:a})})})};kF.displayName=xC;var Qn="MenuContent",[Uoe,EC]=zl(Qn),xF=R.forwardRef((e,t)=>{const o=PF(Qn,e.__scopeMenu),{forceMount:a=o.forceMount,...n}=e,i=zs(Qn,e.__scopeMenu),l=om(Qn,e.__scopeMenu);return T.jsx(Ep.Provider,{scope:e.__scopeMenu,children:T.jsx(Ii,{present:a||i.open,children:T.jsx(Ep.Slot,{scope:e.__scopeMenu,children:l.modal?T.jsx(zoe,{...n,ref:t}):T.jsx($oe,{...n,ref:t})})})})}),zoe=R.forwardRef((e,t)=>{const o=zs(Qn,e.__scopeMenu),a=R.useRef(null),n=sa(t,a);return R.useEffect(()=>{const i=a.current;if(i)return pF(i)},[]),T.jsx(RC,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:mt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),$oe=R.forwardRef((e,t)=>{const o=zs(Qn,e.__scopeMenu);return T.jsx(RC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),qoe=kp("MenuContent.ScrollLock"),RC=R.forwardRef((e,t)=>{const{__scopeMenu:o,loop:a=!1,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:f,onDismiss:v,disableOutsideScroll:b,...S}=e,C=zs(Qn,o),w=om(Qn,o),_=tm(o),E=wF(o),k=Loe(o),[x,A]=R.useState(null),D=R.useRef(null),O=sa(t,D,C.onContentChange),N=R.useRef(0),$=R.useRef(""),F=R.useRef(0),z=R.useRef(null),j=R.useRef("right"),K=R.useRef(0),ne=b?PC:R.Fragment,H=b?{as:qoe,allowPinchZoom:!0}:void 0,Z=le=>{const Q=$.current+le,M=k().filter(pe=>!pe.disabled),G=document.activeElement,q=M.find(pe=>pe.ref.current===G)?.textValue,L=M.map(pe=>pe.textValue),U=tae(L,Q,q),J=M.find(pe=>pe.textValue===U)?.ref.current;(function pe(ge){$.current=ge,window.clearTimeout(N.current),ge!==""&&(N.current=window.setTimeout(()=>pe(""),1e3))})(Q),J&&setTimeout(()=>J.focus())};R.useEffect(()=>()=>window.clearTimeout(N.current),[]),DN();const te=R.useCallback(le=>j.current===z.current?.side&&aae(le,z.current?.area),[]);return T.jsx(Uoe,{scope:o,searchRef:$,onItemEnter:R.useCallback(le=>{te(le)&&le.preventDefault()},[te]),onItemLeave:R.useCallback(le=>{te(le)||(D.current?.focus(),A(null))},[te]),onTriggerLeave:R.useCallback(le=>{te(le)&&le.preventDefault()},[te]),pointerGraceTimerRef:F,onPointerGraceIntentChange:R.useCallback(le=>{z.current=le},[]),children:T.jsx(ne,{...H,children:T.jsx(gC,{asChild:!0,trapped:n,onMountAutoFocus:mt(i,le=>{le.preventDefault(),D.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:T.jsx(mC,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:p,onPointerDownOutside:g,onFocusOutside:m,onInteractOutside:f,onDismiss:v,children:T.jsx(Vte,{asChild:!0,...E,dir:w.dir,orientation:"vertical",loop:a,currentTabStopId:x,onCurrentTabStopIdChange:A,onEntryFocus:mt(u,le=>{w.isUsingKeyboardRef.current||le.preventDefault()}),preventScrollOnEntryFocus:!0,children:T.jsx(Ete,{role:"menu","aria-orientation":"vertical","data-state":VF(C.open),"data-radix-menu-content":"",dir:w.dir,..._,...S,ref:O,style:{outline:"none",...S.style},onKeyDown:mt(S.onKeyDown,le=>{const M=le.target.closest("[data-radix-menu-content]")===le.currentTarget,G=le.ctrlKey||le.altKey||le.metaKey,q=le.key.length===1;M&&(le.key==="Tab"&&le.preventDefault(),!G&&q&&Z(le.key));const L=D.current;if(le.target!==L||!Ooe.includes(le.key))return;le.preventDefault();const J=k().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);SF.includes(le.key)&&J.reverse(),Xoe(J)}),onBlur:mt(e.onBlur,le=>{le.currentTarget.contains(le.target)||(window.clearTimeout(N.current),$.current="")}),onPointerMove:mt(e.onPointerMove,Rp(le=>{const Q=le.target,M=K.current!==le.clientX;if(le.currentTarget.contains(Q)&&M){const G=le.clientX>K.current?"right":"left";j.current=G,K.current=le.clientX}}))})})})})})})});xF.displayName=Qn;var Voe="MenuGroup",AC=R.forwardRef((e,t)=>{const{__scopeMenu:o,...a}=e;return T.jsx(Eo.div,{role:"group",...a,ref:t})});AC.displayName=Voe;var Hoe="MenuLabel",EF=R.forwardRef((e,t)=>{const{__scopeMenu:o,...a}=e;return T.jsx(Eo.div,{...a,ref:t})});EF.displayName=Hoe;var Of="MenuItem",VD="menu.itemSelect",Fv=R.forwardRef((e,t)=>{const{disabled:o=!1,onSelect:a,...n}=e,i=R.useRef(null),l=om(Of,e.__scopeMenu),c=EC(Of,e.__scopeMenu),u=sa(t,i),p=R.useRef(!1),g=()=>{const m=i.current;if(!o&&m){const f=new CustomEvent(VD,{bubbles:!0,cancelable:!0});m.addEventListener(VD,v=>a?.(v),{once:!0}),kN(m,f),f.defaultPrevented?p.current=!1:l.onClose()}};return T.jsx(RF,{...n,ref:u,disabled:o,onClick:mt(e.onClick,g),onPointerDown:m=>{e.onPointerDown?.(m),p.current=!0},onPointerUp:mt(e.onPointerUp,m=>{p.current||m.currentTarget?.click()}),onKeyDown:mt(e.onKeyDown,m=>{const f=c.searchRef.current!=="";o||f&&m.key===" "||lw.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Fv.displayName=Of;var RF=R.forwardRef((e,t)=>{const{__scopeMenu:o,disabled:a=!1,textValue:n,...i}=e,l=EC(Of,o),c=wF(o),u=R.useRef(null),p=sa(t,u),[g,m]=R.useState(!1),[f,v]=R.useState("");return R.useEffect(()=>{const b=u.current;b&&v((b.textContent??"").trim())},[i.children]),T.jsx(Ep.ItemSlot,{scope:o,disabled:a,textValue:n??f,children:T.jsx(Hte,{asChild:!0,...c,focusable:!a,children:T.jsx(Eo.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...i,ref:p,onPointerMove:mt(e.onPointerMove,Rp(b=>{a?l.onItemLeave(b):(l.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:mt(e.onPointerLeave,Rp(b=>l.onItemLeave(b))),onFocus:mt(e.onFocus,()=>m(!0)),onBlur:mt(e.onBlur,()=>m(!1))})})})}),Goe="MenuCheckboxItem",AF=R.forwardRef((e,t)=>{const{checked:o=!1,onCheckedChange:a,...n}=e;return T.jsx(LF,{scope:e.__scopeMenu,checked:o,children:T.jsx(Fv,{role:"menuitemcheckbox","aria-checked":If(o)?"mixed":o,...n,ref:t,"data-state":IC(o),onSelect:mt(n.onSelect,()=>a?.(If(o)?!0:!o),{checkForDefaultPrevented:!1})})})});AF.displayName=Goe;var DF="MenuRadioGroup",[Koe,Woe]=zl(DF,{value:void 0,onValueChange:()=>{}}),OF=R.forwardRef((e,t)=>{const{value:o,onValueChange:a,...n}=e,i=Tr(a);return T.jsx(Koe,{scope:e.__scopeMenu,value:o,onValueChange:i,children:T.jsx(AC,{...n,ref:t})})});OF.displayName=DF;var IF="MenuRadioItem",MF=R.forwardRef((e,t)=>{const{value:o,...a}=e,n=Woe(IF,e.__scopeMenu),i=o===n.value;return T.jsx(LF,{scope:e.__scopeMenu,checked:i,children:T.jsx(Fv,{role:"menuitemradio","aria-checked":i,...a,ref:t,"data-state":IC(i),onSelect:mt(a.onSelect,()=>n.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});MF.displayName=IF;var DC="MenuItemIndicator",[LF,Yoe]=zl(DC,{checked:!1}),NF=R.forwardRef((e,t)=>{const{__scopeMenu:o,forceMount:a,...n}=e,i=Yoe(DC,o);return T.jsx(Ii,{present:a||If(i.checked)||i.checked===!0,children:T.jsx(Eo.span,{...n,ref:t,"data-state":IC(i.checked)})})});NF.displayName=DC;var Zoe="MenuSeparator",FF=R.forwardRef((e,t)=>{const{__scopeMenu:o,...a}=e;return T.jsx(Eo.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});FF.displayName=Zoe;var Qoe="MenuArrow",BF=R.forwardRef((e,t)=>{const{__scopeMenu:o,...a}=e,n=tm(o);return T.jsx(Rte,{...n,...a,ref:t})});BF.displayName=Qoe;var OC="MenuSub",[Joe,jF]=zl(OC),UF=e=>{const{__scopeMenu:t,children:o,open:a=!1,onOpenChange:n}=e,i=zs(OC,t),l=tm(t),[c,u]=R.useState(null),[p,g]=R.useState(null),m=Tr(n);return R.useEffect(()=>(i.open===!1&&m(!1),()=>m(!1)),[i.open,m]),T.jsx(nF,{...l,children:T.jsx(_F,{scope:t,open:a,onOpenChange:m,content:p,onContentChange:g,children:T.jsx(Joe,{scope:t,contentId:Rs(),triggerId:Rs(),trigger:c,onTriggerChange:u,children:o})})})};UF.displayName=OC;var Xu="MenuSubTrigger",zF=R.forwardRef((e,t)=>{const o=zs(Xu,e.__scopeMenu),a=om(Xu,e.__scopeMenu),n=jF(Xu,e.__scopeMenu),i=EC(Xu,e.__scopeMenu),l=R.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:u}=i,p={__scopeMenu:e.__scopeMenu},g=R.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return R.useEffect(()=>g,[g]),R.useEffect(()=>{const m=c.current;return()=>{window.clearTimeout(m),u(null)}},[c,u]),T.jsx(kC,{asChild:!0,...p,children:T.jsx(RF,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":n.contentId,"data-state":VF(o.open),...e,ref:Zp(t,n.onTriggerChange),onClick:m=>{e.onClick?.(m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:mt(e.onPointerMove,Rp(m=>{i.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!o.open&&!l.current&&(i.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{o.onOpenChange(!0),g()},100))})),onPointerLeave:mt(e.onPointerLeave,Rp(m=>{g();const f=o.content?.getBoundingClientRect();if(f){const v=o.content?.dataset.side,b=v==="right",S=b?-5:5,C=f[b?"left":"right"],w=f[b?"right":"left"];i.onPointerGraceIntentChange({area:[{x:m.clientX+S,y:m.clientY},{x:C,y:f.top},{x:w,y:f.top},{x:w,y:f.bottom},{x:C,y:f.bottom}],side:v}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(m),m.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:mt(e.onKeyDown,m=>{const f=i.searchRef.current!=="";e.disabled||f&&m.key===" "||Ioe[a.dir].includes(m.key)&&(o.onOpenChange(!0),o.content?.focus(),m.preventDefault())})})})});zF.displayName=Xu;var $F="MenuSubContent",qF=R.forwardRef((e,t)=>{const o=PF(Qn,e.__scopeMenu),{forceMount:a=o.forceMount,...n}=e,i=zs(Qn,e.__scopeMenu),l=om(Qn,e.__scopeMenu),c=jF($F,e.__scopeMenu),u=R.useRef(null),p=sa(t,u);return T.jsx(Ep.Provider,{scope:e.__scopeMenu,children:T.jsx(Ii,{present:a||i.open,children:T.jsx(Ep.Slot,{scope:e.__scopeMenu,children:T.jsx(RC,{id:c.contentId,"aria-labelledby":c.triggerId,...n,ref:p,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{l.isUsingKeyboardRef.current&&u.current?.focus(),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:mt(e.onFocusOutside,g=>{g.target!==c.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:mt(e.onEscapeKeyDown,g=>{l.onClose(),g.preventDefault()}),onKeyDown:mt(e.onKeyDown,g=>{const m=g.currentTarget.contains(g.target),f=Moe[l.dir].includes(g.key);m&&f&&(i.onOpenChange(!1),c.trigger?.focus(),g.preventDefault())})})})})})});qF.displayName=$F;function VF(e){return e?"open":"closed"}function If(e){return e==="indeterminate"}function IC(e){return If(e)?"indeterminate":e?"checked":"unchecked"}function Xoe(e){const t=document.activeElement;for(const o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function eae(e,t){return e.map((o,a)=>e[(t+a)%e.length])}function tae(e,t,o){const n=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,i=o?e.indexOf(o):-1;let l=eae(e,Math.max(i,0));n.length===1&&(l=l.filter(p=>p!==o));const u=l.find(p=>p.toLowerCase().startsWith(n.toLowerCase()));return u!==o?u:void 0}function oae(e,t){const{x:o,y:a}=e;let n=!1;for(let i=0,l=t.length-1;i<t.length;l=i++){const c=t[i],u=t[l],p=c.x,g=c.y,m=u.x,f=u.y;g>a!=f>a&&o<(m-p)*(a-g)/(f-g)+p&&(n=!n)}return n}function aae(e,t){if(!t)return!1;const o={x:e.clientX,y:e.clientY};return oae(o,t)}function Rp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nae=CF,rae=kC,iae=kF,sae=xF,lae=AC,cae=EF,dae=Fv,uae=AF,pae=OF,mae=MF,gae=NF,hae=FF,fae=BF,vae=UF,bae=zF,yae=qF,Bv="DropdownMenu",[Sae]=Ul(Bv,[TF]),ja=TF(),[Tae,HF]=Sae(Bv),GF=e=>{const{__scopeDropdownMenu:t,children:o,dir:a,open:n,defaultOpen:i,onOpenChange:l,modal:c=!0}=e,u=ja(t),p=R.useRef(null),[g,m]=Qp({prop:n,defaultProp:i??!1,onChange:l,caller:Bv});return T.jsx(Tae,{scope:t,triggerId:Rs(),triggerRef:p,contentId:Rs(),open:g,onOpenChange:m,onOpenToggle:R.useCallback(()=>m(f=>!f),[m]),modal:c,children:T.jsx(nae,{...u,open:g,onOpenChange:m,dir:a,modal:c,children:o})})};GF.displayName=Bv;var KF="DropdownMenuTrigger",WF=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,disabled:a=!1,...n}=e,i=HF(KF,o),l=ja(o);return T.jsx(rae,{asChild:!0,...l,children:T.jsx(Eo.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...n,ref:Zp(t,i.triggerRef),onPointerDown:mt(e.onPointerDown,c=>{!a&&c.button===0&&c.ctrlKey===!1&&(i.onOpenToggle(),i.open||c.preventDefault())}),onKeyDown:mt(e.onKeyDown,c=>{a||(["Enter"," "].includes(c.key)&&i.onOpenToggle(),c.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});WF.displayName=KF;var wae="DropdownMenuPortal",YF=e=>{const{__scopeDropdownMenu:t,...o}=e,a=ja(t);return T.jsx(iae,{...a,...o})};YF.displayName=wae;var ZF="DropdownMenuContent",QF=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=HF(ZF,o),i=ja(o),l=R.useRef(!1);return T.jsx(sae,{id:n.contentId,"aria-labelledby":n.triggerId,...i,...a,ref:t,onCloseAutoFocus:mt(e.onCloseAutoFocus,c=>{l.current||n.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:mt(e.onInteractOutside,c=>{const u=c.detail.originalEvent,p=u.button===0&&u.ctrlKey===!0,g=u.button===2||p;(!n.modal||g)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});QF.displayName=ZF;var _ae="DropdownMenuGroup",Cae=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(lae,{...n,...a,ref:t})});Cae.displayName=_ae;var Pae="DropdownMenuLabel",JF=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(cae,{...n,...a,ref:t})});JF.displayName=Pae;var kae="DropdownMenuItem",XF=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(dae,{...n,...a,ref:t})});XF.displayName=kae;var xae="DropdownMenuCheckboxItem",eB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(uae,{...n,...a,ref:t})});eB.displayName=xae;var Eae="DropdownMenuRadioGroup",tB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(pae,{...n,...a,ref:t})});tB.displayName=Eae;var Rae="DropdownMenuRadioItem",oB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(mae,{...n,...a,ref:t})});oB.displayName=Rae;var Aae="DropdownMenuItemIndicator",aB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(gae,{...n,...a,ref:t})});aB.displayName=Aae;var Dae="DropdownMenuSeparator",nB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(hae,{...n,...a,ref:t})});nB.displayName=Dae;var Oae="DropdownMenuArrow",Iae=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(fae,{...n,...a,ref:t})});Iae.displayName=Oae;var Mae=e=>{const{__scopeDropdownMenu:t,children:o,open:a,onOpenChange:n,defaultOpen:i}=e,l=ja(t),[c,u]=Qp({prop:a,defaultProp:i??!1,onChange:n,caller:"DropdownMenuSub"});return T.jsx(vae,{...l,open:c,onOpenChange:u,children:o})},Lae="DropdownMenuSubTrigger",rB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(bae,{...n,...a,ref:t})});rB.displayName=Lae;var Nae="DropdownMenuSubContent",iB=R.forwardRef((e,t)=>{const{__scopeDropdownMenu:o,...a}=e,n=ja(o);return T.jsx(yae,{...n,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});iB.displayName=Nae;var sB=GF,lB=WF,cB=YF,dB=QF,Fae=JF,uB=XF,Bae=eB,jae=tB,Uae=oB,pB=aB,zae=nB,$ae=Mae,qae=rB,Vae=iB;const MC=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.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"}));MC.displayName="AlertTriangle";const mB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.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"}));mB.displayName="Archive";const gB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M7 17 17 7m0 0H7m10 0v10"}));gB.displayName="ArrowUpRight";const hB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M20 6 9 17l-5-5"}));hB.displayName="Check";const LC=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"m9 18 6-6-6-6"}));LC.displayName="ChevronRight";const fB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));fB.displayName="Circle";const vB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M9 2v2m6-2v2M9 20v2m6-2v2m5-13h2m-2 5h2M2 9h2m-2 5h2m4.8 6h6.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C20 17.72 20 16.88 20 15.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C17.72 4 16.88 4 15.2 4H8.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C4 6.28 4 7.12 4 8.8v6.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C6.28 20 7.12 20 8.8 20Zm1.8-5h2.8c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437C15 14.24 15 13.96 15 13.4v-2.8c0-.56 0-.84-.109-1.054a1 1 0 0 0-.437-.437C14.24 9 13.96 9 13.4 9h-2.8c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C9 9.76 9 10.04 9 10.6v2.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C9.76 15 10.04 15 10.6 15Z"}));vB.displayName="CpuChip01";const bB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M12 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm7 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM5 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}));bB.displayName="DotsHorizontal";const yB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));yB.displayName="GitBranch01";const SB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M2.5 12h19M6 16h4M8.967 4h6.066c1.077 0 1.616 0 2.091.164a3 3 0 0 1 1.121.693c.36.352.6.833 1.082 1.796l2.166 4.333c.19.378.284.567.35.765.06.177.102.357.128.541.029.207.029.418.029.841V15.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C19.72 20 18.88 20 17.2 20H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 17.72 2 16.88 2 15.2v-2.067c0-.422 0-.634.029-.84.026-.184.068-.365.128-.541.066-.199.16-.388.35-.766l2.166-4.333c.482-.963.723-1.444 1.082-1.796a3 3 0 0 1 1.12-.693C7.352 4 7.89 4 8.968 4Z"}));SB.displayName="HardDrive";const TB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.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"}));TB.displayName="Lock01";const wB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M21 10s-2.005-2.732-3.634-4.362a9 9 0 1 0 2.282 8.862M21 10V4m0 6h-6"}));wB.displayName="RefreshCw01";const _B=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M6 6h.01M6 18h.01m-.81-8h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 8.48 22 7.92 22 6.8V5.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 2 19.92 2 18.8 2H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 3.52 2 4.08 2 5.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 10 4.08 10 5.2 10Zm0 12h13.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C22 20.48 22 19.92 22 18.8v-1.6c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 14 19.92 14 18.8 14H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 15.52 2 16.08 2 17.2v1.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 22 4.08 22 5.2 22Z"}));_B.displayName="Server01";const CB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M11.302 21.615c.221.129.332.194.488.227.122.026.298.026.42 0 .156-.034.267-.098.488-.227C14.646 20.478 20 16.908 20 12V7.217c0-.799 0-1.199-.13-1.542a2 2 0 0 0-.548-.79c-.275-.243-.65-.383-1.398-.664l-5.362-2.01c-.208-.078-.312-.117-.419-.133a1 1 0 0 0-.286 0c-.107.016-.21.055-.419.133L6.076 4.22c-.748.28-1.122.421-1.398.664a2 2 0 0 0-.547.79C4 6.018 4 6.418 4 7.217V12c0 4.908 5.354 8.478 7.302 9.615Z"}));CB.displayName="Shield01";const PB=({size:e=24,color:t="currentColor",...o})=>R.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...o},R.createElement("path",{d:"M18 15.837c1.456.731 2.704 1.905 3.615 3.373.18.29.27.436.302.637.063.409-.216.912-.597 1.073-.188.08-.398.08-.82.08M16 11.532a4.5 4.5 0 0 0 0-8.064M14 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0ZM2.56 18.938C4.153 16.545 6.67 15 9.5 15s5.346 1.545 6.94 3.938c.35.525.525.787.505 1.122-.016.26-.187.58-.396.738-.267.202-.635.202-1.371.202H3.822c-.736 0-1.104 0-1.372-.202a1.109 1.109 0 0 1-.395-.738c-.02-.335.155-.597.504-1.122Z"}));PB.displayName="Users03";function Hae(e){const t=Ie.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(sB,{"data-slot":"dropdown-menu",...o}),t[2]=o,t[3]=a):a=t[3],a}function Gae(e){const t=Ie.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(lB,{"data-slot":"dropdown-menu-trigger",...o}),t[2]=o,t[3]=a):a=t[3],a}function Kae(e){const t=Ie.c(10);let o,a,n;t[0]!==e?({className:o,sideOffset:n,...a}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);const i=n===void 0?4:n;let l;t[4]!==o?(l=Ot("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",o),t[4]=o,t[5]=l):l=t[5];let c;return t[6]!==a||t[7]!==i||t[8]!==l?(c=T.jsx(cB,{children:T.jsx(dB,{"data-slot":"dropdown-menu-content",sideOffset:i,translate:"no",className:l,...a})}),t[6]=a,t[7]=i,t[8]=l,t[9]=c):c=t[9],c}function Wae(e){const t=Ie.c(12);let o,a,n,i;t[0]!==e?({className:o,inset:a,variant:i,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i):(o=t[1],a=t[2],n=t[3],i=t[4]);const l=i===void 0?"default":i;let c;t[5]!==o?(c=Ot("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),t[5]=o,t[6]=c):c=t[6];let u;return t[7]!==a||t[8]!==n||t[9]!==c||t[10]!==l?(u=T.jsx(uB,{"data-slot":"dropdown-menu-item","data-inset":a,"data-variant":l,className:c,...n}),t[7]=a,t[8]=n,t[9]=c,t[10]=l,t[11]=u):u=t[11],u}function nve(e){const t=Ie.c(13);let o,a,n,i;t[0]!==e?({className:n,children:a,checked:o,...i}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i):(o=t[1],a=t[2],n=t[3],i=t[4]);let l;t[5]!==n?(l=Ot("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),t[5]=n,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:T.jsx(pB,{children:T.jsx(hB,{className:"size-4"})})}),t[7]=c):c=t[7];let u;return t[8]!==o||t[9]!==a||t[10]!==i||t[11]!==l?(u=T.jsxs(Bae,{"data-slot":"dropdown-menu-checkbox-item",className:l,checked:o,...i,children:[c,a]}),t[8]=o,t[9]=a,t[10]=i,t[11]=l,t[12]=u):u=t[12],u}function rve(e){const t=Ie.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx(jae,{"data-slot":"dropdown-menu-radio-group",...o}),t[2]=o,t[3]=a):a=t[3],a}function ive(e){const t=Ie.c(11);let o,a,n;t[0]!==e?({className:a,children:o,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);let i;t[4]!==a?(i=Ot("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),t[4]=a,t[5]=i):i=t[5];let l;t[6]===Symbol.for("react.memo_cache_sentinel")?(l=T.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:T.jsx(pB,{children:T.jsx(fB,{className:"size-2 fill-current"})})}),t[6]=l):l=t[6];let c;return t[7]!==o||t[8]!==n||t[9]!==i?(c=T.jsxs(Uae,{"data-slot":"dropdown-menu-radio-item",className:i,...n,children:[l,o]}),t[7]=o,t[8]=n,t[9]=i,t[10]=c):c=t[10],c}function sve(e){const t=Ie.c(10);let o,a,n;t[0]!==e?({className:o,inset:a,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);let i;t[4]!==o?(i=Ot("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",o),t[4]=o,t[5]=i):i=t[5];let l;return t[6]!==a||t[7]!==n||t[8]!==i?(l=T.jsx(Fae,{"data-slot":"dropdown-menu-label","data-inset":a,className:i,...n}),t[6]=a,t[7]=n,t[8]=i,t[9]=l):l=t[9],l}function lve(e){const t=Ie.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Ot("bg-border -mx-1 my-1 h-px",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx(zae,{"data-slot":"dropdown-menu-separator",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function cve(e){const t=Ie.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx($ae,{"data-slot":"dropdown-menu-sub",...o}),t[2]=o,t[3]=a):a=t[3],a}function dve(e){const t=Ie.c(13);let o,a,n,i;t[0]!==e?({className:a,inset:n,children:o,...i}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i):(o=t[1],a=t[2],n=t[3],i=t[4]);let l;t[5]!==a?(l=Ot("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",a),t[5]=a,t[6]=l):l=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx(LC,{className:"ml-auto size-4"}),t[7]=c):c=t[7];let u;return t[8]!==o||t[9]!==n||t[10]!==i||t[11]!==l?(u=T.jsxs(qae,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:l,...i,children:[o,c]}),t[8]=o,t[9]=n,t[10]=i,t[11]=l,t[12]=u):u=t[12],u}function uve(e){const t=Ie.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Ot("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx(Vae,{"data-slot":"dropdown-menu-sub-content",translate:"no",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function Yae(){const e=Ie.c(3),[t,o]=R.useState(-1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=l=>{if(!l)return;const c=()=>o(l.clientWidth);c();const u=new ResizeObserver(c);return u.observe(l),()=>u.disconnect()},e[0]=a):a=e[0];const n=a;let i;return e[1]!==t?(i=[t,n],e[1]=t,e[2]=i):i=e[2],i}function Zae(){let e=new Map;const t=new Set,o=()=>t.forEach(a=>a());return{getSnapshot:()=>e,subscribe(a){return t.add(a),()=>{t.delete(a)}},register(a){if(e.has(a.after))throw new Error(`Two components extend breadcrumb: ${a.after}`);return e=new Map(e).set(a.after,a),o(),()=>{if(e.get(a.after)!==a)return;const n=new Map(e);n.delete(a.after),e=n,o()}}}}const kB=R.createContext(null);function Qae(e){const t=Ie.c(3),{children:o}=e,[a]=R.useState(Zae);let n;return t[0]!==o||t[1]!==a?(n=T.jsx(kB,{value:a,children:o}),t[0]=o,t[1]=a,t[2]=n):n=t[2],n}function jv(){return R.use(kB)}function xB(e){const t=Ie.c(3),o=jv();if(!o)throw new Error("Breadcrumb contributions require Page.Breadcrumbs.Provider");let a;return t[0]!==e||t[1]!==o?(a=T.jsx("span",{hidden:!0,ref:n=>n?o.register(e):void 0}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}function Jae(e,t){const o=new Set,a=n=>{if(o.has(n.key))throw new Error(`Duplicate breadcrumb key: ${n.key}`);o.add(n.key);const i=t.get(n.key);return[{...n,...i?.parent},...i?.items?.flatMap(a)??[]]};return e.flatMap(a)}const EB=4,Xae=5;function ene(e,t=!1,o=EB){const a=e.map(l=>({type:"item",item:l}));if(e.length<=(t?1:o))return a;const n=t?0:1,i=e.length-(t?1:2);return a.splice(n,i-n,{type:"menu",items:e.slice(n,i)}),a}const RB=l$(function(t){return T.jsx("a",{...t,"aria-current":void 0})});function tne(e){const t=Ie.c(12),{items:o}=e,a=ar();let n;t[0]!==a?(n=a("page.breadcrumbMenu"),t[0]=a,t[1]=n):n=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx(bB,{"aria-hidden":"true",className:"size-4"}),t[2]=i):i=t[2];let l;t[3]!==n?(l=T.jsx(Gae,{asChild:!0,children:T.jsx(Al,{variant:"ghost",size:"icon-sm",className:"size-6 shrink-0","aria-label":n,children:i})}),t[3]=n,t[4]=l):l=t[4];let c;t[5]!==o?(c=o.map(one),t[5]=o,t[6]=c):c=t[6];let u;t[7]!==c?(u=T.jsx(Kae,{align:"start",children:c}),t[7]=c,t[8]=u):u=t[8];let p;return t[9]!==l||t[10]!==u?(p=T.jsxs(Hae,{children:[l,u]}),t[9]=l,t[10]=u,t[11]=p):p=t[11],p}function one(e){const t=T.jsx("span",{className:"max-w-64 truncate",title:typeof e.label=="string"?e.label:void 0,children:e.label});return T.jsx(Wae,{asChild:!!e.link&&!e.onSelect,onSelect:e.onSelect,disabled:!e.onSelect&&!e.link,children:e.link&&!e.onSelect?T.jsx(RB,{...e.link,children:t}):t},e.key)}function ane(e){const t=Ie.c(14),{item:o,current:a}=e,n=typeof o.label=="string"?o.label:void 0;if(a){let l;return t[0]!==o.label||t[1]!==n?(l=T.jsx("h1",{"data-slot":"page-title","aria-current":"page",title:n,className:"truncate text-sm font-medium text-foreground",children:o.label}),t[0]=o.label,t[1]=n,t[2]=l):l=t[2],l}if(o.onSelect){let l;return t[3]!==o.label||t[4]!==o.onSelect||t[5]!==n?(l=T.jsx("button",{type:"button",onClick:o.onSelect,title:n,className:"block max-w-40 truncate rounded-lg hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:o.label}),t[3]=o.label,t[4]=o.onSelect,t[5]=n,t[6]=l):l=t[6],l}if(o.link){let l;return t[7]!==o.label||t[8]!==o.link||t[9]!==n?(l=T.jsx(RB,{...o.link,title:n,className:"block max-w-40 truncate rounded-lg hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:o.label}),t[7]=o.label,t[8]=o.link,t[9]=n,t[10]=l):l=t[10],l}let i;return t[11]!==o.label||t[12]!==n?(i=T.jsx("span",{title:n,className:"block max-w-40 truncate",children:o.label}),t[11]=o.label,t[12]=n,t[13]=i):i=t[13],i}function AB(e){const t=Ie.c(22),{items:o}=e,a=ar(),n=Dv(),[i,l]=Yae();let c,u,p,g,m,f;if(t[0]!==n||t[1]!==o||t[2]!==l||t[3]!==a||t[4]!==i){const S=ene(o,i>=0&&i<320,n?Xae:EB);g=l,t[11]!==a?(m=a("page.breadcrumbs"),t[11]=a,t[12]=m):m=t[12],f="min-w-0 flex-1",c="page-breadcrumbs",u="flex min-w-0 items-center gap-2 text-sm text-muted-foreground",p=S.map((C,w)=>T.jsxs("li",{className:Ot("flex min-w-0 items-center gap-2",w>0&&"min-w-5",C.type==="item"?"last:min-w-16 last:flex-[1_1_auto]":"shrink-0"),children:[w>0&&T.jsx(LC,{"aria-hidden":"true",className:"size-3 shrink-0 text-muted-foreground/60"}),C.type==="item"?T.jsx(ane,{item:C.item,current:w===S.length-1}):T.jsx(tne,{items:C.items})]},C.type==="item"?`item:${C.item.key}`:"menu")),t[0]=n,t[1]=o,t[2]=l,t[3]=a,t[4]=i,t[5]=c,t[6]=u,t[7]=p,t[8]=g,t[9]=m,t[10]=f}else c=t[5],u=t[6],p=t[7],g=t[8],m=t[9],f=t[10];let v;t[13]!==c||t[14]!==u||t[15]!==p?(v=T.jsx("ol",{"data-slot":c,className:u,children:p}),t[13]=c,t[14]=u,t[15]=p,t[16]=v):v=t[16];let b;return t[17]!==g||t[18]!==m||t[19]!==f||t[20]!==v?(b=T.jsx("nav",{ref:g,"aria-label":m,className:f,children:v}),t[17]=g,t[18]=m,t[19]=f,t[20]=v,t[21]=b):b=t[21],b}function nne(e){const t=Ie.c(5),{items:o}=e,a=jv();if(!a)throw new Error("Page.Header requires Page.Breadcrumbs.Provider");const n=R.useSyncExternalStore(a.subscribe,a.getSnapshot,a.getSnapshot);let i;t[0]!==n||t[1]!==o?(i=Jae(o,n),t[0]=n,t[1]=o,t[2]=i):i=t[2];let l;return t[3]!==i?(l=T.jsx(AB,{items:i}),t[3]=i,t[4]=l):l=t[4],l}function rne(e){const t=Ie.c(3),o=jv();let a;return t[0]!==e||t[1]!==o?(a=o?T.jsx(xB,{...e}):T.jsx("div",{className:"min-w-0 shrink-0 border-b px-3 py-2",children:T.jsx(AB,{items:e.items??[]})}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}const ine=Object.assign(rne,{Provider:Qae});function sne(e){const t=Ie.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Ot("flex h-full min-h-0 min-w-0 w-full flex-col overflow-hidden",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{...a,"data-slot":"page",className:n}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function lne(e){const t=Ie.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Ot("min-h-0 min-w-0 flex-1 overflow-auto",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{...a,"data-slot":"page-content",className:n}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}const cne={reading:"max-w-[720px]",standard:"max-w-5xl",wide:"max-w-[1200px]",fluid:"max-w-none"};function dne(e){const t=Ie.c(11);let o,a,n;t[0]!==e?({className:o,width:n,...a}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n):(o=t[1],a=t[2],n=t[3]);const i=n===void 0?"wide":n,l=cne[i];let c;t[4]!==o||t[5]!==l?(c=Ot("mx-auto w-full px-4 classic:pt-8 classic:pb-6 classic:md:px-10 classic:md:pt-12 classic:md:pb-10 compact:py-6 compact:md:px-8 compact:md:py-8",l,o),t[4]=o,t[5]=l,t[6]=c):c=t[6];let u;return t[7]!==a||t[8]!==c||t[9]!==i?(u=T.jsx("div",{...a,"data-slot":"page-container","data-width":i,className:c}),t[7]=a,t[8]=c,t[9]=i,t[10]=u):u=t[10],u}function une(e){const t=Ie.c(19),{children:o,actions:a,className:n}=e,i=jv();if(!Dv()){let g;t[0]!==n?(g=Ot("flex flex-wrap items-center justify-between gap-3",n),t[0]=n,t[1]=g):g=t[1];let m;t[2]!==o?(m=T.jsx("h1",{className:"min-w-0 text-xl font-medium",children:o}),t[2]=o,t[3]=m):m=t[3];let f;t[4]!==a?(f=a&&T.jsx("div",{className:"flex items-center gap-2",children:a}),t[4]=a,t[5]=f):f=t[5];let v;return t[6]!==g||t[7]!==m||t[8]!==f?(v=T.jsxs("div",{"data-slot":"page-title",className:g,children:[m,f]}),t[6]=g,t[7]=m,t[8]=f,t[9]=v):v=t[9],v}let c;t[10]!==o||t[11]!==n||t[12]!==i?(c=i?T.jsx(xB,{after:"page",parent:{label:o}}):T.jsx("div",{"data-slot":"page-title",className:Ot("flex flex-wrap items-center justify-between gap-3",n),children:T.jsx("h1",{className:"min-w-0 text-xl font-medium",children:o})}),t[10]=o,t[11]=n,t[12]=i,t[13]=c):c=t[13];let u;t[14]!==a?(u=a&&T.jsx(DB,{children:a}),t[14]=a,t[15]=u):u=t[15];let p;return t[16]!==c||t[17]!==u?(p=T.jsxs(T.Fragment,{children:[c,u]}),t[16]=c,t[17]=u,t[18]=p):p=t[18],p}function DB(e){const t=Ie.c(5),{children:o,secondary:a}=e,n=Dv();let i;t[0]!==o||t[1]!==a?(i=T.jsxs("div",{"data-slot":"page-actions",className:"flex shrink-0 items-center gap-2",children:[a,o]}),t[0]=o,t[1]=a,t[2]=i):i=t[2];const l=i;if(!n)return l;let c;return t[3]!==l?(c=T.jsx(nn.Topbar.Right.Portal,{fallback:l,children:l}),t[3]=l,t[4]=c):c=t[4],c}function pne(e){const t=Ie.c(26),{breadcrumbs:o,leading:a,actions:n,navigation:i}=e;let l;t[0]!==o?(l=T.jsx(nne,{items:o}),t[0]=o,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx(nn.Topbar.Left.Target,{}),t[2]=c):c=t[2];let u;t[3]!==a||t[4]!==l?(u=T.jsxs(nn.Topbar.Left,{className:"flex-1 gap-2",children:[a,l,c]}),t[3]=a,t[4]=l,t[5]=u):u=t[5];let p;t[6]!==n?(p=T.jsx("div",{className:"peer flex min-w-0 items-center gap-2 empty:hidden",children:n}),t[6]=n,t[7]=p):p=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=T.jsx(nn.Topbar.Right.Target,{className:"flex items-center gap-2 before:hidden before:h-4 before:w-px before:shrink-0 before:bg-border peer-[:not(:empty)]:before:block"}),t[8]=g):g=t[8];let m;t[9]!==p?(m=T.jsxs(nn.Topbar.Right,{className:"shrink-0 gap-2",children:[p,g]}),t[9]=p,t[10]=m):m=t[10];let f;t[11]!==u||t[12]!==m?(f=T.jsxs(nn.Topbar,{className:"gap-3 border-b border-border/60 px-3","data-testid":"page-header",children:[u,m]}),t[11]=u,t[12]=m,t[13]=f):f=t[13];let v;t[14]!==i?(v=T.jsx("div",{"data-toolbar-content":"",className:"min-w-0 empty:hidden",children:i}),t[14]=i,t[15]=v):v=t[15];let b;t[16]===Symbol.for("react.memo_cache_sentinel")?(b=T.jsx(nn.Toolbar.Left.Target,{}),t[16]=b):b=t[16];let S;t[17]!==v?(S=T.jsxs(nn.Toolbar.Left,{children:[v,b]}),t[17]=v,t[18]=S):S=t[18];let C;t[19]===Symbol.for("react.memo_cache_sentinel")?(C=T.jsx(nn.Toolbar.Center,{className:"@max-xl/panel-toolbar:order-last @max-xl/panel-toolbar:basis-full [&:not(:has([data-toolbar-content]:not(:empty)))]:hidden",children:T.jsx(nn.Toolbar.Center.Target,{})}),t[19]=C):C=t[19];let w;t[20]===Symbol.for("react.memo_cache_sentinel")?(w=T.jsx(nn.Toolbar.Right,{children:T.jsx(nn.Toolbar.Right.Target,{})}),t[20]=w):w=t[20];let _;t[21]!==S?(_=T.jsxs(nn.Toolbar,{children:[S,C,w]}),t[21]=S,t[22]=_):_=t[22];let E;return t[23]!==_||t[24]!==f?(E=T.jsxs(T.Fragment,{children:[f,_]}),t[23]=_,t[24]=f,t[25]=E):E=t[25],E}function mne(e){const t=Ie.c(11);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);const n=ar();let i;t[3]!==n?(i=n("page.views"),t[3]=n,t[4]=i):i=t[4];let l;t[5]!==o?(l=Ot("-m-2 flex min-w-0 items-center gap-1 overflow-x-auto p-2 no-scrollbar",o),t[5]=o,t[6]=l):l=t[6];let c;return t[7]!==a||t[8]!==i||t[9]!==l?(c=T.jsx("nav",{"aria-label":i,...a,"data-slot":"page-tabs",className:l}),t[7]=a,t[8]=i,t[9]=l,t[10]=c):c=t[10],c}function gne(e){const t=Ie.c(14);let o,a,n,i;t[0]!==e?({active:o,asChild:i,className:a,...n}=e,t[0]=e,t[1]=o,t[2]=a,t[3]=n,t[4]=i):(o=t[1],a=t[2],n=t[3],i=t[4]);const l=i===void 0?!1:i,c=l?void 0:"button",u=l&&o?"page":void 0,p=l?void 0:o;let g;t[5]!==a?(g=Ot("shrink-0",a),t[5]=a,t[6]=g):g=t[6];let m;return t[7]!==l||t[8]!==n||t[9]!==c||t[10]!==u||t[11]!==p||t[12]!==g?(m=T.jsx(Al,{asChild:l,variant:"tab",size:"sm",...n,type:c,"aria-current":u,"aria-pressed":p,"data-slot":"page-tab",className:g}),t[7]=l,t[8]=n,t[9]=c,t[10]=u,t[11]=p,t[12]=g,t[13]=m):m=t[13],m}const kl=Object.assign(sne,{Header:pne,Tabs:mne,Tab:gne,Actions:DB,Content:lne,Container:dne,Title:une,Breadcrumbs:ine});var he=typeof window<"u"?window:void 0,ra=typeof globalThis<"u"?globalThis:he;typeof self>"u"&&(ra.self=ra),typeof File>"u"&&(ra.File=function(){});var xn=ra?.navigator,Be=ra?.document,Ta=ra?.location,cw=ra?.fetch,dw=ra!=null&&ra.XMLHttpRequest&&"withCredentials"in new ra.XMLHttpRequest?ra.XMLHttpRequest:void 0,HD=ra?.AbortController,hne=ra?.CompressionStream,rn=xn?.userAgent,et=he??{},GD="1.372.3",Ga={DEBUG:!1,LIB_VERSION:GD,LIB_NAME:"web",JS_SDK_VERSION:GD};function KD(e,t,o,a,n,i,l){try{var c=e[i](l),u=c.value}catch(p){return void o(p)}c.done?t(u):Promise.resolve(u).then(a,n)}function Kn(e){return function(){var t=this,o=arguments;return new Promise((function(a,n){var i=e.apply(t,o);function l(u){KD(i,a,n,l,c,"next",u)}function c(u){KD(i,a,n,l,c,"throw",u)}l(void 0)}))}}function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;arguments.length>t;t++){var o=arguments[t];for(var a in o)({}).hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},Oe.apply(null,arguments)}function OB(e,t){if(e==null)return{};var o={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)!==-1)continue;o[a]=e[a]}return o}function uw(){return uw=Kn((function*(e,t,o){t===void 0&&(t=!0);try{var a=new CompressionStream("gzip"),n=a.writable.getWriter(),i=n.write(new TextEncoder().encode(e)).then((()=>n.close())).catch((function(){var u=Kn((function*(p){try{yield n.abort(p)}catch{}throw p}));return function(p){return u.apply(this,arguments)}})()),l=new Response(a.readable).blob(),[c]=yield Promise.all([l,i]);return c}catch(u){if(o!=null&&o.rethrow)throw u;return t&&console.error("Failed to gzip compress data",u),null}})),uw.apply(this,arguments)}var fne=["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"],WD=function(e,t){if(t===void 0&&(t=[]),!e)return!1;var o=e.toLowerCase();return fne.concat(t).some((a=>{var n=a.toLowerCase();return o.indexOf(n)!==-1}))},vne=["$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 Ct(e,t){return e.indexOf(t)!==-1}var Uv=function(e){return e.trim()},pw=function(e){return e.replace(/^\$/,"")},IB=Object.prototype,MB=IB.hasOwnProperty,zv=IB.toString,Mt=Array.isArray||function(e){return zv.call(e)==="[object Array]"},Ci=e=>typeof e=="function",No=e=>e===Object(e)&&!Mt(e),Xc=e=>{if(No(e)){for(var t in e)if(MB.call(e,t))return!1;return!0}return!1},Ve=e=>e===void 0,Co=e=>zv.call(e)=="[object String]",tf=e=>Co(e)&&e.trim().length===0,Mi=e=>e===null,Pt=e=>Ve(e)||Mi(e),Xn=e=>zv.call(e)=="[object Number]"&&e==e,Gc=e=>Xn(e)&&e>0,$r=e=>zv.call(e)==="[object Boolean]",bne=e=>e instanceof FormData,yne=e=>Ct(vne,e);function LB(e){return e===null||typeof e!="object"}function Mf(e,t){return{}.toString.call(e)==="[object "+t+"]"}function NC(e){return typeof Event<"u"&&(function(t,o){try{return t instanceof o}catch{return!1}})(e,Event)}var Sne=[!0,"true",1,"1","yes"],g0=e=>Ct(Sne,e),Tne=[!1,"false",0,"0","no"];function qr(e,t,o,a,n){return t>o&&(a.warn("min cannot be greater than max."),t=o),Xn(e)?e>o?(a.warn(" cannot be greater than max: "+o+". Using max value instead."),o):t>e?(a.warn(" cannot be less than min: "+t+". Using min value instead."),t):e:(a.warn(" must be a number. using max or fallback. max: "+o+", fallback: "+n),qr(n||o,t,o,a))}let wne=class{constructor(t){this.$t={},this.zt=t.zt,this.Ut=qr(t.bucketSize,0,100,t.Gt),this.Wt=qr(t.refillRate,0,this.Ut,t.Gt),this.Xt=qr(t.refillInterval,0,864e5,t.Gt)}Jt(t,o){var a=Math.floor((o-t.lastAccess)/this.Xt);a>0&&(t.tokens=Math.min(t.tokens+a*this.Wt,this.Ut),t.lastAccess=t.lastAccess+a*this.Xt)}consumeRateLimit(t){var o,a=Date.now(),n=String(t),i=this.$t[n];return i?this.Jt(i,a):this.$t[n]=i={tokens:this.Ut,lastAccess:a},i.tokens===0||(i.tokens--,i.tokens===0&&((o=this.zt)==null||o.call(this,t)),i.tokens===0)}stop(){this.$t={}}};var Dh,YD,h0,Rn="Mobile",Lf="iOS",Ei="Android",Td="Tablet",NB=Ei+" "+Td,FB="iPad",BB="Apple",jB=BB+" Watch",dp="Safari",wd="BlackBerry",UB="Samsung",zB=UB+"Browser",$B=UB+" Internet",xl="Chrome",_ne=xl+" OS",qB=xl+" "+Lf,FC="Internet Explorer",VB=FC+" "+Rn,BC="Opera",Cne=BC+" Mini",jC="Edge",HB="Microsoft "+jC,cd="Firefox",GB=cd+" "+Lf,Ap="Nintendo",Dp="PlayStation",dd="Xbox",KB=Ei+" "+Rn,WB=Rn+" "+dp,ep="Windows",mw=ep+" Phone",ZD="Nokia",gw="Ouya",YB="Generic",Pne=YB+" "+Rn.toLowerCase(),ZB=YB+" "+Td.toLowerCase(),hw="Konqueror",Ha="(\\d+(\\.\\d+)?)",f0=new RegExp("Version/"+Ha),kne=new RegExp(dd,"i"),xne=new RegExp(Dp+" \\w+","i"),Ene=new RegExp(Ap+" \\w+","i"),UC=new RegExp(wd+"|PlayBook|BB10","i"),Rne={"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"},QB=function(e,t){return t=t||"",Ct(e," OPR/")&&Ct(e,"Mini")?Cne:Ct(e," OPR/")?BC:UC.test(e)?wd:Ct(e,"IE"+Rn)||Ct(e,"WPDesktop")?VB:Ct(e,zB)?$B:Ct(e,jC)||Ct(e,"Edg/")?HB:Ct(e,"FBIOS")?"Facebook "+Rn:Ct(e,"UCWEB")||Ct(e,"UCBrowser")?"UC Browser":Ct(e,"CriOS")?qB:Ct(e,"CrMo")||Ct(e,xl)?xl:Ct(e,Ei)&&Ct(e,dp)?KB:Ct(e,"FxiOS")?GB:Ct(e.toLowerCase(),hw.toLowerCase())?hw:((o,a)=>a&&Ct(a,BB)||(function(n){return Ct(n,dp)&&!Ct(n,xl)&&!Ct(n,Ei)})(o))(e,t)?Ct(e,Rn)?WB:dp:Ct(e,cd)?cd:Ct(e,"MSIE")||Ct(e,"Trident/")?FC:Ct(e,"Gecko")?cd:""},Ane={[VB]:[new RegExp("rv:"+Ha)],[HB]:[new RegExp(jC+"?\\/"+Ha)],[xl]:[new RegExp("("+xl+"|CrMo)\\/"+Ha)],[qB]:[new RegExp("CriOS\\/"+Ha)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Ha)],[dp]:[f0],[WB]:[f0],[BC]:[new RegExp("(Opera|OPR)\\/"+Ha)],[cd]:[new RegExp(cd+"\\/"+Ha)],[GB]:[new RegExp("FxiOS\\/"+Ha)],[hw]:[new RegExp("Konqueror[:/]?"+Ha,"i")],[wd]:[new RegExp(wd+" "+Ha),f0],[KB]:[new RegExp("android\\s"+Ha,"i")],[$B]:[new RegExp(zB+"\\/"+Ha)],[FC]:[new RegExp("(rv:|MSIE )"+Ha)],Mozilla:[new RegExp("rv:"+Ha)]},Dne=function(e,t){var o=QB(e,t),a=Ane[o];if(Ve(a))return null;for(var n=0;a.length>n;n++){var i=e.match(a[n]);if(i)return parseFloat(i[i.length-2])}return null},QD=[[new RegExp(dd+"; "+dd+" (.*?)[);]","i"),e=>[dd,e&&e[1]||""]],[new RegExp(Ap,"i"),[Ap,""]],[new RegExp(Dp,"i"),[Dp,""]],[UC,[wd,""]],[new RegExp(ep,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[mw,""];if(new RegExp(Rn).test(t)&&!/IEMobile\b/.test(t))return[ep+" "+Rn,""];var o=/Windows NT ([0-9.]+)/i.exec(t);if(o&&o[1]){var a=Rne[o[1]]||"";return/arm/i.test(t)&&(a="RT"),[ep,a]}return[ep,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>e&&e[3]?[Lf,[e[3],e[4],e[5]||"0"].join(".")]:[Lf,""]],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=Ve(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+Ei+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+Ei+")","i"),e=>e&&e[2]?[Ei,[e[2],e[3],e[4]||"0"].join(".")]:[Ei,""]],[/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",""]]],JD=function(e){return Ene.test(e)?Ap:xne.test(e)?Dp:kne.test(e)?dd:new RegExp(gw,"i").test(e)?gw:new RegExp("("+mw+"|WPDesktop)","i").test(e)?mw:/iPad/.test(e)?FB:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?jB:UC.test(e)?wd:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ZD,"i").test(e)?ZD:/(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(Rn).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)?Ei:NB:new RegExp("(pda|"+Rn+")","i").test(e)?Pne:new RegExp(Td,"i").test(e)&&!new RegExp(Td+" pc","i").test(e)?ZB:""},One=e=>e instanceof Error,JB={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}},Ine=JB.info;function XB(e){if($r(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(Mt(e))return{arrayValue:{values:e.map((t=>XB(t)))}};try{return{stringValue:JSON.stringify(e)}}catch{return{stringValue:String(e)}}}function XD(e){var t=[];for(var o in e){var a=e[o];Mi(a)||Ve(a)||t.push({key:o,value:XB(a)})}return t}function Mne(e){var t=globalThis._posthogChunkIds;if(t){var o=Object.keys(t);return h0&&o.length===YD||(YD=o.length,h0=o.reduce(((a,n)=>{Dh||(Dh={});var i=Dh[n];if(i)a[i[0]]=i[1];else for(var l=e(n),c=l.length-1;c>=0;c--){var u=l[c],p=u?.filename,g=t[n];if(p&&g){a[p]=g,Dh[n]=[p,g];break}}return a}),{})),h0}}class Lne{constructor(t,o,a){a===void 0&&(a=[]),this.coercers=t,this.stackParser=o,this.modifiers=a}buildFromUnknown(t,o){o===void 0&&(o={});var a=o&&o.mechanism||{handled:!0,type:"generic"},n=this.buildCoercingContext(a,o,0).apply(t),i=this.buildParsingContext(o),l=this.parseStacktrace(n,i);return{$exception_list:this.convertToExceptionList(l,a),$exception_level:"error"}}modifyFrames(t){var o=this;return Kn((function*(){for(var a of t)a.stacktrace&&a.stacktrace.frames&&Mt(a.stacktrace.frames)&&(a.stacktrace.frames=yield o.applyModifiers(a.stacktrace.frames));return t}))()}coerceFallback(t){var o;return{type:"Error",value:"Unknown error",stack:(o=t.syntheticException)==null?void 0:o.stack,synthetic:!0}}parseStacktrace(t,o){var a,n;return t.cause!=null&&(a=this.parseStacktrace(t.cause,o)),t.stack!=""&&t.stack!=null&&(n=this.applyChunkIds(this.stackParser(t.stack,t.synthetic?o.skipFirstLines:0),o.chunkIdMap)),Oe({},t,{cause:a,stack:n})}applyChunkIds(t,o){return t.map((a=>(a.filename&&o&&(a.chunk_id=o[a.filename]),a)))}applyCoercers(t,o){for(var a of this.coercers)if(a.match(t))return a.coerce(t,o);return this.coerceFallback(o)}applyModifiers(t){var o=this;return Kn((function*(){var a=t;for(var n of o.modifiers)a=yield n(a);return a}))()}convertToExceptionList(t,o){var a,n,i,l={type:t.type,value:t.value,mechanism:{type:(a=o.type)!==null&&a!==void 0?a:"generic",handled:(n=o.handled)===null||n===void 0||n,synthetic:(i=t.synthetic)!==null&&i!==void 0&&i}};t.stack&&(l.stacktrace={type:"raw",frames:t.stack});var c=[l];return t.cause!=null&&c.push(...this.convertToExceptionList(t.cause,Oe({},o,{handled:!0}))),c}buildParsingContext(t){var o;return{chunkIdMap:Mne(this.stackParser),skipFirstLines:(o=t.skipFirstLines)!==null&&o!==void 0?o:1}}buildCoercingContext(t,o,a){a===void 0&&(a=0);var n=(i,l)=>{if(4>=l){var c=this.buildCoercingContext(t,o,l);return this.applyCoercers(i,c)}};return Oe({},o,{syntheticException:a==0?o.syntheticException:void 0,mechanism:t,apply:i=>n(i,a),next:i=>n(i,a+1)})}}var _d="?";function fw(e,t,o,a,n){var i={platform:e,filename:t,function:o==="<anonymous>"?_d:o,in_app:!0};return Ve(a)||(i.lineno=a),Ve(n)||(i.colno=n),i}var e3=(e,t)=>{var o=e.indexOf("safari-extension")!==-1,a=e.indexOf("safari-web-extension")!==-1;return o||a?[e.indexOf("@")!==-1?e.split("@")[0]:_d,o?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},Nne=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Fne=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Bne=/\((\S*)(?::(\d+))(?::(\d+))\)/,jne=(e,t)=>{var o=Nne.exec(e);if(o){var[,a,n,i]=o;return fw(t,a,_d,+n,+i)}var l=Fne.exec(e);if(l){if(l[2]&&l[2].indexOf("eval")===0){var c=Bne.exec(l[2]);c&&(l[2]=c[1],l[3]=c[2],l[4]=c[3])}var[u,p]=e3(l[1]||_d,l[2]);return fw(t,p,u,l[3]?+l[3]:void 0,l[4]?+l[4]:void 0)}},Une=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,zne=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$ne=(e,t)=>{var o=Une.exec(e);if(o){if(o[3]&&o[3].indexOf(" > eval")>-1){var a=zne.exec(o[3]);a&&(o[1]=o[1]||"eval",o[3]=a[1],o[4]=a[2],o[5]="")}var n=o[3],i=o[1]||_d;return[i,n]=e3(i,n),fw(t,n,i,o[4]?+o[4]:void 0,o[5]?+o[5]:void 0)}},eO=/\(error: (.*)\)/;let qne=class{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,o){var a=Co(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:a?t.stack:void 0,cause:t.cause?o.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var o=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?o+": "+t.message:o}isDOMException(t){return Mf(t,"DOMException")}isDOMError(t){return Mf(t,"DOMError")}};class Vne{match(t){return(o=>o instanceof Error)(t)}coerce(t,o){return{type:this.getType(t),value:this.getMessage(t,o),stack:this.getStack(t),cause:t.cause?o.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,o){var a=t.message;return String(a.error&&typeof a.error.message=="string"?a.error.message:a)}getStack(t){return t.stacktrace||t.stack||void 0}}let Hne=class{constructor(){}match(t){return Mf(t,"ErrorEvent")&&t.error!=null}coerce(t,o){var a;return o.apply(t.error)||{type:"ErrorEvent",value:t.message,stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}};var Gne=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let Kne=class{match(t){return typeof t=="string"}coerce(t,o){var a,[n,i]=this.getInfos(t);return{type:n??"Error",value:i??t,stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}getInfos(t){var o="Error",a=t,n=t.match(Gne);return n&&(o=n[1],a=n[2]),[o,a]}};var Wne=["fatal","error","warning","log","info","debug"];function t3(e,t){t===void 0&&(t=40);var o=Object.keys(e);if(o.sort(),!o.length)return"[object has no keys]";for(var a=o.length;a>0;a--){var n=o.slice(0,a).join(", ");if(t>=n.length)return a===o.length?n:n.length>t?n.slice(0,t)+"...":n}return""}let Yne=class{match(t){return typeof t=="object"&&t!==null}coerce(t,o){var a,n=this.getErrorPropertyFromObject(t);return n?o.apply(n):{type:this.getType(t),value:this.getValue(t),stack:(a=o.syntheticException)==null?void 0:a.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return NC(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var o="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(o+=" with message: '"+t.message+"'"),o}if("message"in t&&typeof t.message=="string")return t.message;var a=this.getObjectClassName(t);return(a&&a!=="Object"?"'"+a+"'":"Object")+" captured as exception with keys: "+t3(t)}isSeverityLevel(t){return Co(t)&&!tf(t)&&Wne.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var o in t)if({}.hasOwnProperty.call(t,o)){var a=t[o];if(One(a))return a}}getObjectClassName(t){try{var o=Object.getPrototypeOf(t);return o?o.constructor.name:void 0}catch{return}}},Zne=class{match(t){return NC(t)}coerce(t,o){var a,n=t.constructor.name;return{type:n,value:n+" captured as exception with keys: "+t3(t),stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}},Qne=class{match(t){return LB(t)}coerce(t,o){var a;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}}},Jne=class{match(t){return Mf(t,"PromiseRejectionEvent")||this.isCustomEventWrappingRejection(t)}isCustomEventWrappingRejection(t){if(!NC(t))return!1;try{var o=t.detail;return o!=null&&typeof o=="object"&&"reason"in o}catch{return!1}}coerce(t,o){var a,n=this.getUnhandledRejectionReason(t);return LB(n)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(n),stack:(a=o.syntheticException)==null?void 0:a.stack,synthetic:!0}:o.apply(n)}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 Nf="$message",Ff="$timestamp",Xne=new Set([Nf,Ff]),v0={enabled:!0,max_bytes:32768};function Bf(e){var t;return e?{enabled:(t=e.enabled)!==null&&t!==void 0?t:v0.enabled,max_bytes:tre(e.max_bytes,v0.max_bytes)}:Oe({},v0)}let ere=class{constructor(t){this.Kt=[],this.Qt=0,this.Bt=Bf(t)}setConfig(t){this.Bt=Bf(t),this.er()}add(t){var o=(function(n){var i=(function(g){var m=new WeakSet;try{return JSON.stringify(g,((f,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(m.has(v))return"[Circular]";m.add(v)}return v}}))}catch{return}})(n);if(i)try{var l=JSON.parse(i);if(!No(l))return;var c=l,u=c[Nf],p=c[Ff];return!Co(u)||u.trim().length===0||!Co(p)&&!Xn(p)?void 0:{step:c,json:i}}catch{return}})(t);if(o){var a=(function(n){if(typeof TextEncoder<"u")return new TextEncoder().encode(n).length;for(var i=encodeURIComponent(n),l=0,c=0;i.length>c;c++)i[c]==="%"?(l+=1,c+=2):l+=1;return l})(o.json);a>this.Bt.max_bytes||(this.Kt.push({step:o.step,bytes:a}),this.Qt+=a,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 tre(e,t){if(!Xn(e)||e===1/0||e===-1/0)return t;var o=Math.floor(e);return 0>o?t:o}var o3=function(e,t){var{debugEnabled:o}=t===void 0?{}:t,a={C(n){if(he&&(Ga.DEBUG||et.POSTHOG_DEBUG||o)&&!Ve(he.console)&&he.console){for(var i=("__rrweb_original__"in he.console[n])?he.console[n].__rrweb_original__:he.console[n],l=arguments.length,c=new Array(l>1?l-1:0),u=1;l>u;u++)c[u-1]=arguments[u];i(e,...c)}},info(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];a.C("log",...i)},warn(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];a.C("warn",...i)},error(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];a.C("error",...i)},critical(){for(var n=arguments.length,i=new Array(n),l=0;n>l;l++)i[l]=arguments[l];console.error(e,...i)},uninitializedWarning(n){a.error("You must initialize PostHog before calling "+n)},createLogger:(n,i)=>o3(e+" "+n,i)};return a},ze=o3("[PostHog.js]"),So=ze.createLogger,ore=So("[ExternalScriptsLoader]"),b0=(e,t,o)=>{if(e.config.disable_external_dependency_loading)return ore.warn(t+" was requested but loading of external scripts is disabled."),o("Loading of external scripts is disabled");var a=Be?.querySelectorAll("script");if(a){for(var n,i=function(){if(a[l].src===t){var u=a[l];return u.__posthog_loading_callback_fired?{v:o()}:(u.addEventListener("load",(p=>{u.__posthog_loading_callback_fired=!0,o(void 0,p)})),u.onerror=p=>o(p),{v:void 0})}},l=0;a.length>l;l++)if(n=i())return n.v}var c=()=>{if(!Be)return o("document not found");var u=Be.createElement("script");if(u.type="text/javascript",u.crossOrigin="anonymous",u.src=t,u.onload=m=>{u.__posthog_loading_callback_fired=!0,o(void 0,m)},u.onerror=m=>o(m),e.config.prepare_external_dependency_script&&(u=e.config.prepare_external_dependency_script(u)),!u)return o("prepare_external_dependency_script returned null");if(e.config.external_scripts_inject_target==="head")Be.head.appendChild(u);else{var p,g=Be.querySelectorAll("body > script");g.length>0?(p=g[0].parentNode)==null||p.insertBefore(u,g[0]):Be.body.appendChild(u)}};Be!=null&&Be.body?c():Be?.addEventListener("DOMContentLoaded",c)};et.__PosthogExtensions__=et.__PosthogExtensions__||{},et.__PosthogExtensions__.loadExternalDependency=(e,t,o)=>{if(t!=="remote-config"){var a;if(e.config.__preview_external_dependency_versioned_paths)a=e.requestRouter.endpointFor("assets","/static/"+e.version+"/"+t+".js");else{var n="/static/"+t+".js?v="+e.version;if(t==="toolbar"){var i=3e5;n=n+"&t="+Math.floor(Date.now()/i)*i}a=e.requestRouter.endpointFor("assets",n)}b0(e,a,o)}else{var l=e.requestRouter.endpointFor("assets","/array/"+e.config.token+"/config.js");b0(e,l,o)}},et.__PosthogExtensions__.loadSiteApp=(e,t,o)=>{var a=e.requestRouter.endpointFor("api",t);b0(e,a,o)};var a3="$people_distinct_id",jf="$device_id",tp="__alias",op="__timers",vw="$autocapture_disabled_server_side",bw="$heatmaps_enabled_server_side",yw="$exception_capture_enabled_server_side",Sw="$error_tracking_suppression_rules",Tw="$error_tracking_capture_extension_exceptions",ww="$web_vitals_enabled_server_side",zC="$dead_clicks_enabled_server_side",_w="$product_tours_enabled_server_side",Cw="$web_vitals_allowed_metrics",ap="$session_recording_remote_config",n3="$replay_override_sampling",r3="$replay_override_linked_flag",i3="$replay_override_url_trigger",s3="$replay_override_event_trigger",Uf="$sesid",$C="$session_is_sampled",ed="$enabled_feature_flags",of="$active_feature_flags",np="$early_access_features",Pw="$feature_flag_details",kw="$feature_flag_payloads",xw="$feature_flag_request_id",_i="$override_feature_flags",Kc="$override_feature_flag_payloads",rp="$stored_person_properties",vl="$stored_group_properties",Ew="$surveys",Rw="$surveys_activated",af="ph_product_tours",up="$flag_call_reported",Aw="$flag_call_reported_session_id",Dw="$feature_flag_errors",zf="$feature_flag_evaluated_at",mr="$user_state",Ow="$client_session_props",Iw="$capture_rate_limit",Mw="$initial_campaign_params",Lw="$initial_referrer_info",$f="$initial_person_info",qf="$epp",l3="__POSTHOG_TOOLBAR__",Oh="$posthog_cookieless",c3="$sdk_debug_extensions_init_method",d3="$sdk_debug_extensions_init_time_ms",u3="$sdk_debug_recording_script_not_loaded",qC="PostHog loadExternalDependency extension not found.",bl="on_reject",Pi="always",Nc="anonymous",Fc="identified",Nw="identified_only",Vf="visibilitychange",Hf="beforeunload",Wc="$pageview",y0="$pageleave",S0="$identify",tO="$groupidentify";function Ih(e,t){Mt(e)&&e.forEach(t)}function ho(e,t){if(!Pt(e))if(Mt(e))e.forEach(t);else if(bne(e))e.forEach(((a,n)=>t(a,n)));else for(var o in e)MB.call(e,o)&&t(e[o],o)}var Do=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),a=1;t>a;a++)o[a-1]=arguments[a];for(var n of o)for(var i in n)n[i]!==void 0&&(e[i]=n[i]);return e};function nf(e){for(var t=Object.keys(e),o=t.length,a=new Array(o);o--;)a[o]=[t[o],e[t[o]]];return a}var oO=function(e){try{return e()}catch{return}},are=function(e){return function(){try{for(var t=arguments.length,o=new Array(t),a=0;t>a;a++)o[a]=arguments[a];return e.apply(this,o)}catch(n){ze.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),ze.critical(n)}}},VC=function(e){var t={};return ho(e,(function(o,a){(Co(o)&&o.length>0||Xn(o))&&(t[a]=o)})),t},nre=["herokuapp.com","vercel.app","netlify.app"];function rre(e){var t=e?.hostname;if(!Co(t))return!1;var o=t.split(".").slice(-2).join(".");for(var a of nre)if(o===a)return!1;return!0}function Yo(e,t,o,a){var{capture:n=!1,passive:i=!0}=a??{};e?.addEventListener(t,o,{capture:n,passive:i})}function p3(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 Xn(e)&&isFinite(e)&&Math.floor(e)===e});class Gf{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,o,a,n){if(!Number.isInteger(t)||!Number.isInteger(o)||!Number.isInteger(a)||!Number.isInteger(n)||0>t||0>o||0>a||0>n||t>0xffffffffffff||o>4095||a>1073741823||n>4294967295)throw new RangeError("invalid field value");var i=new Uint8Array(16);return i[0]=t/Math.pow(2,40),i[1]=t/Math.pow(2,32),i[2]=t/Math.pow(2,24),i[3]=t/Math.pow(2,16),i[4]=t/Math.pow(2,8),i[5]=t,i[6]=112|o>>>8,i[7]=o,i[8]=128|a>>>24,i[9]=a>>>16,i[10]=a>>>8,i[11]=a,i[12]=n>>>24,i[13]=n>>>16,i[14]=n>>>8,i[15]=n,new Gf(i)}toString(){for(var t="",o=0;this.bytes.length>o;o++)t=t+(this.bytes[o]>>>4).toString(16)+(15&this.bytes[o]).toString(16),o!==3&&o!==5&&o!==7&&o!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Gf(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var o=0;16>o;o++){var a=this.bytes[o]-t.bytes[o];if(a!==0)return Math.sign(a)}return 0}}class ire{constructor(){this.I=0,this.S=0,this.k=new sre}generate(){var t=this.generateOrAbort();if(Ve(t)){this.I=0;var o=this.generateOrAbort();if(Ve(o))throw new Error("Could not generate UUID after timestamp reset");return o}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 Gf.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 aO,m3=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};he&&!Ve(he.crypto)&&crypto.getRandomValues&&(m3=e=>crypto.getRandomValues(e));class sre{constructor(){this.T=new Uint32Array(8),this.N=1/0}nextUint32(){return this.T.length>this.N||(m3(this.T),this.N=0),this.T[this.N++]}}var Ts=()=>lre().toString(),lre=()=>(aO||(aO=new ire)).generate(),Fu="",cre=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i,zr={R:()=>!!Be,B(e){ze.error("cookieStore error: "+e)},O(e){if(Be){try{for(var t=e+"=",o=Be.cookie.split(";").filter((i=>i.length)),a=0;o.length>a;a++){for(var n=o[a];n.charAt(0)==" ";)n=n.substring(1,n.length);if(n.indexOf(t)===0)return decodeURIComponent(n.substring(t.length,n.length))}}catch{}return null}},Z(e){var t;try{t=JSON.parse(zr.O(e))||{}}catch{}return t},M(e,t,o,a,n){if(Be)try{var i="",l="",c=(function(g,m){if(m){var f=(function(b,S){if(S===void 0&&(S=Be),Fu)return Fu;if(!S||["localhost","127.0.0.1"].includes(b))return"";for(var C=b.split("."),w=Math.min(C.length,8),_="dmn_chk_"+Ts();!Fu&&w--;){var E=C.slice(w).join("."),k=_+"=1;domain=."+E+";path=/";S.cookie=k+";max-age=3",S.cookie.includes(_)&&(S.cookie=k+";max-age=0",Fu=E)}return Fu})(g);if(!f){var v=(b=>{var S=b.match(cre);return S?S[0]:""})(g);v!==f&&ze.info("Warning: cookie subdomain discovery mismatch",v,f),f=v}return f?"; domain=."+f:""}return""})(Be.location.hostname,a);if(o){var u=new Date;u.setTime(u.getTime()+864e5*o),i="; expires="+u.toUTCString()}n&&(l="; secure");var p=e+"="+encodeURIComponent(JSON.stringify(t))+i+"; SameSite=Lax; path=/"+c+l;return p.length>3686.4&&ze.warn("cookieStore warning: large cookie, len="+p.length),Be.cookie=p,p}catch{return}},F(e,t){if(Be!=null&&Be.cookie)try{zr.M(e,"",-1,t)}catch{return}}},T0=null,_o={R(){if(!Mi(T0))return T0;var e=!0;if(Ve(he))e=!1;else try{var t="__mplssupport__";_o.M(t,"xyz"),_o.O(t)!=='"xyz"'&&(e=!1),_o.F(t)}catch{e=!1}return e||ze.error("localStorage unsupported; falling back to cookie store"),T0=e,e},B(e){ze.error("localStorage error: "+e)},O(e){try{return he?.localStorage.getItem(e)}catch(t){_o.B(t)}return null},Z(e){try{return JSON.parse(_o.O(e))||{}}catch{}return null},M(e,t){try{he?.localStorage.setItem(e,JSON.stringify(t))}catch(o){_o.B(o)}},F(e){try{he?.localStorage.removeItem(e)}catch(t){_o.B(t)}}},dre=[jf,"distinct_id",Uf,$C,qf,$f,mr],Mh={},ure={R:()=>!0,B(e){ze.error("memoryStorage error: "+e)},O:e=>Mh[e]||null,Z:e=>Mh[e]||null,M(e,t){Mh[e]=t},F(e){delete Mh[e]}},ul=null,wa={R(){if(!Mi(ul))return ul;if(ul=!0,Ve(he))ul=!1;else try{var e="__support__";wa.M(e,"xyz"),wa.O(e)!=='"xyz"'&&(ul=!1),wa.F(e)}catch{ul=!1}return ul},B(e){ze.error("sessionStorage error: ",e)},O(e){try{return he?.sessionStorage.getItem(e)}catch(t){wa.B(t)}return null},Z(e){try{return JSON.parse(wa.O(e))||null}catch{}return null},M(e,t){try{he?.sessionStorage.setItem(e,JSON.stringify(t))}catch(o){wa.B(o)}},F(e){try{he?.sessionStorage.removeItem(e)}catch(t){wa.B(t)}}};class pre{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===Pi||this.isRejected()||this.consent===-1&&this.Bt.cookieless_mode===bl}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:o,consent_persistence_name:a}=this._instance.config;return a||(o?o+t:"__ph_opt_in_out_"+t)}get ir(){var t=this.nr.O(this.sr);return g0(t)?1:Ct(Tne,t)?0:-1}get nr(){var t=this.Bt.opt_out_capturing_persistence_type,o=t==="localStorage"?_o:zr;if(!this.ar||this.ar!==o){this.ar=o;var a=t==="localStorage"?zr:_o;a.O(this.sr)&&(this.ar.O(this.sr)||this.optInOut(g0(a.O(this.sr))),a.F(this.sr,this.Bt.cross_subdomain_cookie))}return this.ar}rr(){return!!this.Bt.respect_dnt&&[xn?.doNotTrack,xn?.msDoNotTrack,et.doNotTrack].some((t=>g0(t)))}}var Lh=So("[Dead Clicks]"),mre=()=>!0,gre=e=>{var t,o=!((t=e.instance.persistence)==null||!t.get_property(zC)),a=e.instance.config.capture_dead_clicks;return $r(a)?a:!!No(a)||o};class nO{get lazyLoadedDeadClicksAutocapture(){return this.lr}constructor(t,o,a){this.instance=t,this.isEnabled=o,this.onCapture=a,this.startIfEnabledOrStop()}onRemoteConfig(t){"captureDeadClicks"in t&&(this.instance.persistence&&this.instance.persistence.register({[zC]:t.captureDeadClicks}),this.startIfEnabledOrStop())}startIfEnabledOrStop(){this.isEnabled(this)?this.ur((()=>{this.hr()})):this.stop()}ur(t){var o,a;(o=et.__PosthogExtensions__)!=null&&o.initDeadClicksAutocapture&&t(),(a=et.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this.instance,"dead-clicks-autocapture",(n=>{n?Lh.error("failed to load script",n):t()}))}hr(){var t;if(Be){if(!this.lr&&(t=et.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var o=No(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};o.__onCapture=this.onCapture,this.lr=et.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,o),this.lr.start(Be),Lh.info("starting...")}}else Lh.error("`document` not found. Cannot start.")}stop(){this.lr&&(this.lr.stop(),this.lr=void 0,Lh.info("stopping..."))}}var w0=So("[SegmentIntegration]"),g3="posthog-js";function h3(e,t){var{organization:o,projectId:a,prefix:n,severityAllowList:i=["error"],sendExceptionsToPostHog:l=!0}=t===void 0?{}:t;return c=>{var u,p,g,m,f;if(i!=="*"&&!i.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 b,S=((u=c.exception)==null?void 0:u.values)||[],C=S.map((_=>Oe({},_,{stacktrace:_.stacktrace?Oe({},_.stacktrace,{type:"raw",frames:(_.stacktrace.frames||[]).map((E=>Oe({},E,{platform:"web:javascript"})))}):void 0}))),w={$exception_message:((p=S[0])==null?void 0:p.value)||c.message,$exception_type:(g=S[0])==null?void 0:g.type,$exception_level:c.level,$exception_list:C,$sentry_event_id:c.event_id,$sentry_exception:c.exception,$sentry_exception_message:((m=S[0])==null?void 0:m.value)||c.message,$sentry_exception_type:(f=S[0])==null?void 0:f.type,$sentry_tags:c.tags};return o&&a&&(w.$sentry_url=(n||"https://sentry.io/organizations/")+o+"/issues/?project="+a+"&query="+c.event_id),l&&((b=e.exceptions)==null||b.sendExceptionEvent(w)),c}}class hre{constructor(t,o,a,n,i,l){this.name=g3,this.setupOnce=function(c){c(h3(t,{organization:o,projectId:a,prefix:n,severityAllowList:i,sendExceptionsToPostHog:l==null||l}))}}}class rO{constructor(t){this.cr=(o,a,n)=>{n&&(n.noSessionId||n.activityTimeout||n.sessionPastMaximumLength)&&(ze.info("[PageViewManager] Session rotated, clearing pageview state",{sessionId:o,changeReason:n}),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,o){var a,n=this.gr(t,o);return this.dr={pathname:(a=he?.location.pathname)!==null&&a!==void 0?a:"",pageViewId:o,timestamp:t},this._instance.scrollManager.resetContext(),n}doPageLeave(t){var o;return this.gr(t,(o=this.dr)==null?void 0:o.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.dr)==null?void 0:t.pageViewId}}gr(t,o){var a=this.dr;if(!a)return{$pageview_id:o};var n={$pageview_id:o,$prev_pageview_id:a.pageViewId},i=this._instance.scrollManager.getContext();if(i&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:l,lastScrollY:c,maxScrollY:u,maxContentHeight:p,lastContentY:g,maxContentY:m}=i;if(!(Ve(l)||Ve(c)||Ve(u)||Ve(p)||Ve(g)||Ve(m))){l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),p=Math.ceil(p),g=Math.ceil(g),m=Math.ceil(m);var f=l>1?qr(c/l,0,1,ze):1,v=l>1?qr(u/l,0,1,ze):1,b=p>1?qr(g/p,0,1,ze):1,S=p>1?qr(m/p,0,1,ze):1;n=Do(n,{$prev_pageview_last_scroll:c,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:u,$prev_pageview_max_scroll_percentage:v,$prev_pageview_last_content:g,$prev_pageview_last_content_percentage:b,$prev_pageview_max_content:m,$prev_pageview_max_content_percentage:S})}}return a.pathname&&(n.$prev_pageview_pathname=a.pathname),a.timestamp&&(n.$prev_pageview_duration=(t.getTime()-a.timestamp.getTime())/1e3),n}}var fre={[a3]:{exposure:"hidden"},[tp]:{exposure:"hidden"},__cmpns:{exposure:"hidden"},[op]:{exposure:"hidden"},[vw]:{exposure:"event"},[bw]:{exposure:"hidden"},[yw]:{exposure:"event"},[Sw]:{exposure:"hidden"},[Tw]:{exposure:"event"},[ww]:{exposure:"event"},[zC]:{exposure:"event"},[_w]:{exposure:"hidden"},[Cw]:{exposure:"event"},[ap]:{exposure:"hidden"},$session_recording_enabled_server_side:{exposure:"hidden"},[Uf]:{exposure:"hidden"},[$C]:{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"},[ed]:{exposure:"derived",shouldSkipFromEventProperties:(e,t)=>t(),transformToEventProperties(e){if(!No(e))return{};for(var t={},o=Object.keys(e),a=0;o.length>a;a++)t["$feature/"+o[a]]=e[o[a]];return t}},[of]:{exposure:"event"},[np]:{exposure:"hidden"},[Pw]:{exposure:"hidden"},[kw]:{exposure:"event"},[xw]:{exposure:"event"},[_i]:{exposure:"event"},[Kc]:{exposure:"hidden"},[rp]:{exposure:"hidden"},[vl]:{exposure:"hidden"},[Ew]:{exposure:"hidden"},[Rw]:{exposure:"event"},[af]:{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"},[up]:{exposure:"hidden"},[Aw]:{exposure:"hidden"},[Dw]:{exposure:"hidden"},[zf]:{exposure:"hidden"},[mr]:{exposure:"hidden"},[Ow]:{exposure:"hidden"},[Iw]:{exposure:"hidden"},[Mw]:{exposure:"hidden"},[Lw]:{exposure:"hidden"},[$f]:{exposure:"hidden"},[qf]:{exposure:"hidden"},[n3]:{exposure:"event"},[r3]:{exposure:"event"},[i3]:{exposure:"event"},[s3]:{exposure:"event"},[c3]:{exposure:"event"},[d3]:{exposure:"event"},[u3]:{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"}},vre=[["$posthog_sr_group_event_trigger_",{exposure:"hidden"}],["$posthog_sr_group_url_trigger_",{exposure:"hidden"}],["$posthog_sr_group_sampling_",{exposure:"hidden"}]],Kf=e=>{var t=Be?.createElement("a");return Ve(t)?null:(t.href=e,t)},Wf=function(e,t){for(var o,a=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),n=0;a.length>n;n++){var i=a[n].split("=");if(i[0]===t){o=i;break}}if(!Mt(o)||2>o.length)return"";var l=o[1];try{l=decodeURIComponent(l)}catch{ze.error("Skipping decoding for malformed query param: "+l)}return l.replace(/\+/g," ")},Op=function(e,t,o){if(!e||!t||!t.length)return e;for(var a=e.split("#"),n=a[1],i=(a[0]||"").split("?"),l=i[1],c=i[0],u=(l||"").split("&"),p=[],g=0;u.length>g;g++){var m=u[g].split("=");Mt(m)&&(t.includes(m[0])?p.push(m[0]+"="+o):p.push(u[g]))}var f=c;return l!=null&&(f+="?"+p.join("&")),n!=null&&(f+="#"+n),f},Yf=function(e,t){var o=e.match(new RegExp(t+"=([^&]*)"));return o?o[1]:null},Nh="https?://(.*)",Cd=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],bre=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid",...Cd],Ip="<masked>",yre=["li_fat_id"];function f3(e,t,o){if(!Be)return{};var a,n=t?[...Cd,...o||[]]:[],i=v3(Op(Be.URL,n,Ip),e),l=(a={},ho(yre,(function(c){var u=zr.O(c);a[c]=u||null})),a);return Do(l,i)}function v3(e,t){var o=bre.concat(t||[]),a={};return ho(o,(function(n){var i=Wf(e,n);a[n]=i||null})),a}function b3(e){var t=(function(i){return i?i.search(Nh+"google.([^/?]*)")===0?"google":i.search(Nh+"bing.com")===0?"bing":i.search(Nh+"yahoo.com")===0?"yahoo":i.search(Nh+"duckduckgo.com")===0?"duckduckgo":null:null})(e),o=t!="yahoo"?"q":"p",a={};if(!Mi(t)){a.$search_engine=t;var n=Be?Wf(Be.referrer,o):"";n.length&&(a.ph_keyword=n)}return a}function iO(){return navigator.language||navigator.userLanguage}var Zf="$direct";function y3(){return Be?.referrer||Zf}function S3(e,t){var o=e?[...Cd,...t||[]]:[],a=Ta?.href.substring(0,1e3);return{r:y3().substring(0,1e3),u:a?Op(a,o,Ip):void 0}}function T3(e){var t,{r:o,u:a}=e,n={$referrer:o,$referring_domain:o==null?void 0:o==Zf?Zf:(t=Kf(o))==null?void 0:t.host};if(a){n.$current_url=a;var i=Kf(a);n.$host=i?.host,n.$pathname=i?.pathname;var l=v3(a);Do(n,l)}if(o){var c=b3(o);Do(n,c)}return n}function w3(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function Sre(){try{return new Date().getTimezoneOffset()}catch{return}}var Tre=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class _0{constructor(t,o){this.Bt=t,this.props={},this.mr=!1,this.yr=(a=>{var n="";return a.token&&(n=a.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),a.persistence_name?"ph_"+a.persistence_name:"ph_"+n+"_posthog"})(t),this.nr=this.br(t),this.load(),t.debug&&ze.info("Persistence loaded",t.persistence,Oe({},this.props)),this.update_config(t,t,o),this.save()}isDisabled(){return!!this._r}br(t){Tre.indexOf(t.persistence.toLowerCase())===-1&&(ze.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var o=(function(n){n===void 0&&(n=[]);var i=[...dre,...n];return Oe({},_o,{Z(l){try{var c={};try{c=zr.Z(l)||{}}catch{}var u=Do(c,JSON.parse(_o.O(l)||"{}"));return _o.M(l,u),u}catch{}return null},M(l,c,u,p,g,m){try{_o.M(l,c,void 0,void 0,m);var f={};i.forEach((v=>{c[v]&&(f[v]=c[v])})),Object.keys(f).length&&zr.M(l,f,u,p,g,m)}catch(v){_o.B(v)}},F(l,c){try{he?.localStorage.removeItem(l),zr.F(l,c)}catch(u){_o.B(u)}}})})(t.cookie_persisted_properties||[]),a=t.persistence.toLowerCase();return a==="localstorage"&&_o.R()?_o:a==="localstorage+cookie"&&o.R()?o:a==="sessionstorage"&&wa.R()?wa:a==="memory"?ure:a==="cookie"?zr:o.R()?o:zr}wr(t){var o=t??this.Bt.feature_flag_cache_ttl_ms;if(!o||0>=o)return!1;var a=this.props[zf];return!a||typeof a!="number"||Date.now()-a>o}properties(){var t={};return ho(this.props,((o,a)=>{var n=(i=>{var l=fre[i];if(l)return l;for(var[c,u]of vre)if(i.indexOf(c)===0)return u})(a);if(n?.exposure==="derived"){if(n.shouldSkipFromEventProperties!=null&&n.shouldSkipFromEventProperties(o,a===ed?()=>this.wr():()=>!1))return;n.transformToEventProperties&&Do(t,n.transformToEventProperties(o))}else n&&n.exposure!=="event"||(t[a]=o)})),t}load(){if(!this._r){var t=this.nr.Z(this.yr);t&&(this.props=Do({},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,o,a){if(No(t)){Ve(o)&&(o="None"),this.Ir=Ve(a)?this.kr:a;var n=!1;if(ho(t,((i,l)=>{this.props.hasOwnProperty(l)&&this.props[l]!==o||(this.Tr(l,i),n=!0)})),n)return this.save(),!0}return!1}register(t,o){if(No(t)){this.Ir=Ve(o)?this.kr:o;var a=!1;if(ho(t,((n,i)=>{t.hasOwnProperty(i)&&this.props[i]!==n&&(this.Tr(i,n),a=!0)})),a)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=f3(this.Bt.custom_campaign_params,this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties);Xc(VC(t))||this.register(t),this.mr=!0}}update_search_keyword(){var t;this.register((t=Be?.referrer)?b3(t):{})}update_referrer_info(){var t;this.register_once({$referrer:y3(),$referring_domain:Be!=null&&Be.referrer&&((t=Kf(Be.referrer))==null?void 0:t.host)||Zf},void 0)}set_initial_person_info(){this.props[Mw]||this.props[Lw]||this.register_once({[$f]:S3(this.Bt.mask_personal_data_properties,this.Bt.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};ho([Lw,Mw],(l=>{var c=this.props[l];c&&ho(c,(function(u,p){t["$initial_"+pw(p)]=u}))}));var o,a,n=this.props[$f];if(n){var i=(o=T3(n),a={},ho(o,(function(l,c){a["$initial_"+pw(c)]=l})),a);Do(t,i)}return t}safe_merge(t){return ho(this.props,(function(o,a){a in t||(t[a]=o)})),t}update_config(t,o,a){if(this.kr=this.Ir=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!a),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==o.persistence||!((l,c)=>{if(l.length!==c.length)return!1;var u=[...l].sort(),p=[...c].sort();return u.every(((g,m)=>g===p[m]))})(t.cookie_persisted_properties||[],o.cookie_persisted_properties||[])){var n=this.br(t),i=this.props;this.clear(),this.nr=n,this.props=i,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,o){var a=this.props[op]||{};a[t]=o,this.Tr(op,a),this.save()}remove_event_timer(t){var o=this.props[op]||{},a=o[t];return Ve(a)||(delete o[t],this.Tr(op,o),this.save()),a}get_property(t){return this.props[t]}set_property(t,o){this.Tr(t,o),this.save()}Tr(t,o){this.props[t]=o}Ar(t){delete this.props[t]}}var Bu={Activation:"events",Cancellation:"cancelEvents"},C0={Popover:"popover",API:"api",Widget:"widget"},ip={SHOWN:"survey shown",DISMISSED:"survey dismissed",SENT:"survey sent"},P0={SURVEY_ID:"$survey_id",SURVEY_ITERATION:"$survey_iteration",SURVEY_LAST_SEEN_DATE:"$survey_last_seen_date"},Fw={Popover:"popover",Inline:"inline"},wre={SHOWN:"product tour shown"},sO={TOUR_LAST_SEEN_DATE:"$product_tour_last_seen_date",TOUR_TYPE:"$product_tour_type"},lO=So("[RateLimiter]");class _re{constructor(t){this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=o=>{var a=o.text;if(a&&a.length)try{(JSON.parse(a).quota_limited||[]).forEach((n=>{lO.info((n||"events")+" is quota limited."),this.serverLimits[n]=new Date().getTime()+6e4}))}catch(n){return void lO.warn('could not rate limit - continuing. Error: "'+n?.message+'"',{text:a})}},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 o,a,n;t===void 0&&(t=!1);var{captureEventsBurstLimit:i,captureEventsPerSecond:l}=this,c=new Date().getTime(),u=(o=(a=this.instance.persistence)==null?void 0:a.get_property(Iw))!==null&&o!==void 0?o:{tokens:i,last:c};u.tokens+=(c-u.last)/1e3*l,u.last=c,u.tokens>i&&(u.tokens=i);var p=1>u.tokens;return p||t||(u.tokens=Math.max(0,u.tokens-1)),!p||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 "+i+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=p,(n=this.instance.persistence)==null||n.set_property(Iw,u),{isRateLimited:p,remainingTokens:u.tokens}}isServerRateLimited(t){var o=this.serverLimits[t||"events"]||!1;return o!==!1&&new Date().getTime()<o}}var ju=So("[RemoteConfig]");class _3{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=et._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}Er(t){var o,a;(o=et.__PosthogExtensions__)!=null&&o.loadExternalDependency?(a=et.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.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(o){t(o.json)}})}load(){try{if(this.remoteConfig)return ju.info("Using preloaded remote config",this.remoteConfig),this.Nr(this.remoteConfig),void this.Mr();if(this._instance.Fr())return void ju.warn("Remote config is disabled. Falling back to local config.");this.Er((t=>{if(!t)return ju.info("No config found after loading remote JS config. Falling back to JSON."),void this.Rr((o=>{this.Nr(o),this.Mr()}));this.Nr(t),this.Mr()}))}catch(t){ju.error("Error loading remote config",t)}}stop(){this.Or&&(clearInterval(this.Or),this.Or=void 0)}refresh(){this._instance.Fr()||Be?.visibilityState==="hidden"||this._instance.reloadFeatureFlags()}Mr(){var t;if(!this.Or){var o=(t=this._instance.config.remote_config_refresh_interval_ms)!==null&&t!==void 0?t:3e5;o!==0&&(this.Or=setInterval((()=>{this.refresh()}),o))}}Nr(t){var o;t||ju.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||(o=this._instance.featureFlags)==null||o.ensureFlagsLoaded())}}var Fr={GZipJS:"gzip-js",Base64:"base64"},Jn=Uint8Array,cn=Uint16Array,Pd=Uint32Array,HC=new Jn([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]),GC=new Jn([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]),cO=new Jn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C3=function(e,t){for(var o=new cn(31),a=0;31>a;++a)o[a]=t+=1<<e[a-1];var n=new Pd(o[30]);for(a=1;30>a;++a)for(var i=o[a];o[a+1]>i;++i)n[i]=i-o[a]<<5|a;return[o,n]},P3=C3(HC,2),Bw=P3[1];P3[0][28]=258,Bw[258]=28;for(var dO=C3(GC,0)[1],k3=new cn(32768),fo=0;32768>fo;++fo){var Bc=(43690&fo)>>>1|(21845&fo)<<1;k3[fo]=((65280&(Bc=(61680&(Bc=(52428&Bc)>>>2|(13107&Bc)<<2))>>>4|(3855&Bc)<<4))>>>8|(255&Bc)<<8)>>>1}var pp=function(e,t,o){for(var a=e.length,n=0,i=new cn(t);a>n;++n)++i[e[n]-1];var l,c=new cn(t);for(n=0;t>n;++n)c[n]=c[n-1]+i[n-1]<<1;for(l=new cn(a),n=0;a>n;++n)l[n]=k3[c[e[n]-1]++]>>>15-e[n];return l},Ol=new Jn(288);for(fo=0;144>fo;++fo)Ol[fo]=8;for(fo=144;256>fo;++fo)Ol[fo]=9;for(fo=256;280>fo;++fo)Ol[fo]=7;for(fo=280;288>fo;++fo)Ol[fo]=8;var Qf=new Jn(32);for(fo=0;32>fo;++fo)Qf[fo]=5;var Cre=pp(Ol,9),Pre=pp(Qf,5),x3=function(e){return(e/8>>0)+(7&e&&1)},E3=function(e,t,o){(o==null||o>e.length)&&(o=e.length);var a=new(e instanceof cn?cn:e instanceof Pd?Pd:Jn)(o-t);return a.set(e.subarray(t,o)),a},Ti=function(e,t,o){var a=t/8>>0;e[a]|=o<<=7&t,e[a+1]|=o>>>8},Uu=function(e,t,o){var a=t/8>>0;e[a]|=o<<=7&t,e[a+1]|=o>>>8,e[a+2]|=o>>>16},k0=function(e,t){for(var o=[],a=0;e.length>a;++a)e[a]&&o.push({s:a,f:e[a]});var n=o.length,i=o.slice();if(!n)return[new Jn(0),0];if(n==1){var l=new Jn(o[0].s+1);return l[o[0].s]=1,[l,1]}o.sort((function(x,A){return x.f-A.f})),o.push({s:-1,f:25001});var c=o[0],u=o[1],p=0,g=1,m=2;for(o[0]={s:-1,f:c.f+u.f,l:c,r:u};g!=n-1;)c=o[o[m].f>o[p].f?p++:m++],u=o[p!=g&&o[m].f>o[p].f?p++:m++],o[g++]={s:-1,f:c.f+u.f,l:c,r:u};var f=i[0].s;for(a=1;n>a;++a)i[a].s>f&&(f=i[a].s);var v=new cn(f+1),b=jw(o[g-1],v,0);if(b>t){a=0;var S=0,C=b-t,w=1<<C;for(i.sort((function(x,A){return v[A.s]-v[x.s]||x.f-A.f}));n>a;++a){var _=i[a].s;if(t>=v[_])break;S+=w-(1<<b-v[_]),v[_]=t}for(S>>>=C;S>0;){var E=i[a].s;t>v[E]?S-=1<<t-v[E]++-1:++a}for(;a>=0&&S;--a){var k=i[a].s;v[k]==t&&(--v[k],++S)}b=t}return[new Jn(v),b]},jw=function(e,t,o){return e.s==-1?Math.max(jw(e.l,t,o+1),jw(e.r,t,o+1)):t[e.s]=o},uO=function(e){for(var t=e.length;t&&!e[--t];);for(var o=new cn(++t),a=0,n=e[0],i=1,l=function(u){o[a++]=u},c=1;t>=c;++c)if(e[c]==n&&c!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)l(32754);i>2&&(l(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(l(n),--i;i>6;i-=6)l(8304);i>2&&(l(i-3<<5|8208),i=0)}for(;i--;)l(n);i=1,n=e[c]}return[o.subarray(0,a),t]},zu=function(e,t){for(var o=0,a=0;t.length>a;++a)o+=e[a]*t[a];return o},Uw=function(e,t,o){var a=o.length,n=x3(t+2);e[n]=255&a,e[n+1]=a>>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var i=0;a>i;++i)e[n+i+4]=o[i];return 8*(n+4+a)},pO=function(e,t,o,a,n,i,l,c,u,p,g){Ti(t,g++,o),++n[256];for(var m=k0(n,15),f=m[0],v=m[1],b=k0(i,15),S=b[0],C=b[1],w=uO(f),_=w[0],E=w[1],k=uO(S),x=k[0],A=k[1],D=new cn(19),O=0;_.length>O;++O)D[31&_[O]]++;for(O=0;x.length>O;++O)D[31&x[O]]++;for(var N=k0(D,7),$=N[0],F=N[1],z=19;z>4&&!$[cO[z-1]];--z);var j,K,ne,H,Z=p+5<<3,te=zu(n,Ol)+zu(i,Qf)+l,le=zu(n,f)+zu(i,S)+l+14+3*z+zu(D,$)+(2*D[16]+3*D[17]+7*D[18]);if(te>=Z&&le>=Z)return Uw(t,g,e.subarray(u,u+p));if(Ti(t,g,1+(te>le)),g+=2,te>le){j=pp(f,v),K=f,ne=pp(S,C),H=S;var Q=pp($,F);for(Ti(t,g,E-257),Ti(t,g+5,A-1),Ti(t,g+10,z-4),g+=14,O=0;z>O;++O)Ti(t,g+3*O,$[cO[O]]);g+=3*z;for(var M=[_,x],G=0;2>G;++G){var q=M[G];for(O=0;q.length>O;++O)Ti(t,g,Q[L=31&q[O]]),g+=$[L],L>15&&(Ti(t,g,q[O]>>>5&127),g+=q[O]>>>12)}}else j=Cre,K=Ol,ne=Pre,H=Qf;for(O=0;c>O;++O)if(a[O]>255){var L;Uu(t,g,j[257+(L=a[O]>>>18&31)]),g+=K[L+257],L>7&&(Ti(t,g,a[O]>>>23&31),g+=HC[L]);var U=31&a[O];Uu(t,g,ne[U]),g+=H[U],U>3&&(Uu(t,g,a[O]>>>5&8191),g+=GC[U])}else Uu(t,g,j[a[O]]),g+=K[a[O]];return Uu(t,g,j[256]),g+K[256]},kre=new Pd([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),xre=(function(){for(var e=new Pd(256),t=0;256>t;++t){for(var o=t,a=9;--a;)o=(1&o&&3988292384)^o>>>1;e[t]=o}return e})(),x0=function(e,t,o){for(;o;++t)e[t]=o,o>>>=8};function Ere(e,t){t===void 0&&(t={});var o=(function(){var m=4294967295;return{p(f){for(var v=m,b=0;f.length>b;++b)v=xre[255&v^f[b]]^v>>>8;m=v},d(){return 4294967295^m}}})(),a=e.length;o.p(e);var n,i,l,c,u,p=(c=10+((n=t).filename&&n.filename.length+1||0),u=8,(function(m,f,v,b,S,C){var w=m.length,_=new Jn(b+w+5*(1+Math.floor(w/7e3))+S),E=_.subarray(b,_.length-S),k=0;if(!f||8>w)for(var x=0;w>=x;x+=65535){var A=x+65535;w>A?k=Uw(E,k,m.subarray(x,A)):(E[x]=!0,k=Uw(E,k,m.subarray(x,w)))}else{for(var D=kre[f-1],O=D>>>13,N=8191&D,$=(1<<v)-1,F=new cn(32768),z=new cn($+1),j=Math.ceil(v/3),K=2*j,ne=function(He){return(m[He]^m[He+1]<<j^m[He+2]<<K)&$},H=new Pd(25e3),Z=new cn(288),te=new cn(32),le=0,Q=0,M=(x=0,0),G=0,q=0;w>x;++x){var L=ne(x),U=32767&x,J=z[L];if(F[U]=J,z[L]=U,x>=G){var pe=w-x;if((le>7e3||M>24576)&&pe>423){k=pO(m,E,0,H,Z,te,Q,M,q,x-q,k),M=le=Q=0,q=x;for(var ge=0;286>ge;++ge)Z[ge]=0;for(ge=0;30>ge;++ge)te[ge]=0}var Ce=2,$e=0,Y=N,ae=U-J&32767;if(pe>2&&L==ne(x-ae))for(var ve=Math.min(O,pe)-1,ie=Math.min(32767,x),Te=Math.min(258,pe);ie>=ae&&--Y&&U!=J;){if(m[x+Ce]==m[x+Ce-ae]){for(var ke=0;Te>ke&&m[x+ke]==m[x+ke-ae];++ke);if(ke>Ce){if(Ce=ke,$e=ae,ke>ve)break;var it=Math.min(ae,ke-2),lt=0;for(ge=0;it>ge;++ge){var Ge=x-ae+ge+32768&32767,tt=Ge-F[Ge]+32768&32767;tt>lt&&(lt=tt,J=Ge)}}}ae+=(U=J)-(J=F[U])+32768&32767}if($e){H[M++]=268435456|Bw[Ce]<<18|dO[$e];var De=31&Bw[Ce],Ae=31&dO[$e];Q+=HC[De]+GC[Ae],++Z[257+De],++te[Ae],G=x+Ce,++le}else H[M++]=m[x],++Z[m[x]]}}k=pO(m,E,!0,H,Z,te,Q,M,q,x-q,k)}return E3(_,0,b+x3(k)+S)})(i=e,(l=t).level==null?6:l.level,l.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+l.mem,c,u)),g=p.length;return(function(m,f){var v=f.filename;if(m[0]=31,m[1]=139,m[2]=8,m[8]=2>f.level?4:f.level==9?2:0,m[9]=3,f.mtime!=0&&x0(m,4,Math.floor(new Date(f.mtime||Date.now())/1e3)),v){m[3]=8;for(var b=0;v.length>=b;++b)m[b+10]=v.charCodeAt(b)}})(p,t),x0(p,g-8,o.d()),x0(p,g-4,a),p}var Rre=!!dw||!!cw,R3="text/plain",mO=!1,$v=function(e,t,o){var a;o===void 0&&(o=!0);var[n,i]=e.split("?"),l=Oe({},t),c=(a=i?.split("&").map((p=>{var g,[m,f]=p.split("="),v=o&&(g=l[m])!==null&&g!==void 0?g:f;return delete l[m],m+"="+v})))!==null&&a!==void 0?a:[],u=(function(p,g){var m,f;g===void 0&&(g="&");var v=[];return ho(p,(function(b,S){Ve(b)||Ve(S)||S==="undefined"||(m=encodeURIComponent((C=>C instanceof File)(b)?b.name:b.toString()),f=encodeURIComponent(S),v[v.length]=f+"="+m)})),v.join(g)})(l);return u&&c.push(u),n+"?"+c.join("&")},td=(e,t)=>JSON.stringify(e,((o,a)=>typeof a=="bigint"?a.toString():a),t),E0=e=>{if(e.tr)return e.tr;var{data:t,compression:o}=e;if(t){if(o===Fr.GZipJS){var a=Ere((function(c,u){var p=c.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(c);for(var g=new Jn(c.length+(c.length>>>1)),m=0,f=function(C){g[m++]=C},v=0;p>v;++v){if(m+5>g.length){var b=new Jn(m+8+(p-v<<1));b.set(g),g=b}var S=c.charCodeAt(v);128>S?f(S):2048>S?(f(192|S>>>6),f(128|63&S)):S>55295&&57344>S?(f(240|(S=65536+(1047552&S)|1023&c.charCodeAt(++v))>>>18),f(128|S>>>12&63),f(128|S>>>6&63),f(128|63&S)):(f(224|S>>>12),f(128|S>>>6&63),f(128|63&S))}return E3(g,0,m)})(td(t)),{mtime:0});return{contentType:R3,body:a.buffer.slice(a.byteOffset,a.byteOffset+a.byteLength),estimatedSize:a.byteLength}}if(o===Fr.Base64){var n=(function(c){return c&&btoa(encodeURIComponent(c).replace(/%([0-9A-F]{2})/g,((u,p)=>String.fromCharCode(parseInt(p,16)))))})(td(t)),i=(c=>"data="+encodeURIComponent(typeof c=="string"?c:td(c)))(n);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var l=td(t);return{contentType:"application/json",body:l,estimatedSize:new Blob([l]).size}}},Are=(function(){var e=Kn((function*(t){var o=td(t.data),a=yield(function(i,l,c){return uw.apply(this,arguments)})(o,Ga.DEBUG,{rethrow:!0});if(!a)return t;var n=yield a.arrayBuffer();return Oe({},t,{tr:{contentType:R3,body:n,estimatedSize:n.byteLength}})}));return function(t){return e.apply(this,arguments)}})(),gO=(e,t)=>$v(e,{_:new Date().getTime().toString(),ver:Ga.JS_SDK_VERSION,compression:t}),rf=[];cw&&rf.push({transport:"fetch",method(e){var t,o,{contentType:a,body:n,estimatedSize:i}=(t=E0(e))!==null&&t!==void 0?t:{},l=new Headers;ho(e.headers,(function(g,m){l.append(m,g)})),a&&l.append("Content-Type",a);var c=e.url,u=null;if(HD){var p=new HD;u={signal:p.signal,timeout:setTimeout((()=>p.abort()),e.timeout)}}cw(c,Oe({method:e?.method||"GET",headers:l,keepalive:e.method==="POST"&&52428.8>(i||0),body:n,signal:(o=u)==null?void 0:o.signal},e.fetchOptions)).then((g=>g.text().then((m=>{var f={statusCode:g.status,text:m};if(g.status===200)try{f.json=JSON.parse(m)}catch(v){ze.error(v)}e.callback==null||e.callback(f)})))).catch((g=>{ze.error(g),e.callback==null||e.callback({statusCode:0,error:g})})).finally((()=>u?clearTimeout(u.timeout):null))}}),dw&&rf.push({transport:"XHR",method(e){var t,o=new dw;o.open(e.method||"GET",e.url,!0);var{contentType:a,body:n}=(t=E0(e))!==null&&t!==void 0?t:{};ho(e.headers,(function(i,l){o.setRequestHeader(l,i)})),a&&o.setRequestHeader("Content-Type",a),e.timeout&&(o.timeout=e.timeout),e.disableXHRCredentials||(o.withCredentials=!0),o.onreadystatechange=()=>{if(o.readyState===4){var i={statusCode:o.status,text:o.responseText};if(o.status===200)try{i.json=JSON.parse(o.responseText)}catch{}e.callback==null||e.callback(i)}},o.send(n)}}),xn!=null&&xn.sendBeacon&&rf.push({transport:"sendBeacon",method(e){var t=$v(e.url,{beacon:"1"});try{var o,{contentType:a,body:n}=(o=E0(e))!==null&&o!==void 0?o:{};if(!n)return;var i=n instanceof Blob?n:new Blob([n],{type:a});xn.sendBeacon(t,i)}catch{}}});var zw=3e3;class Dre{constructor(t,o){this.Pr=!0,this.Lr=[],this.Dr=qr(o?.flush_interval_ms||zw,250,5e3,ze.createLogger("flush interval"),zw),this.Br=t}enqueue(t){this.Lr.push(t),this.jr||this.$r()}unload(){this.qr();var t=this.Lr.length>0?this.Zr():{},o=Object.values(t);[...o.filter((a=>a.url.indexOf("/e")===0)),...o.filter((a=>a.url.indexOf("/e")!==0))].map((a=>{this.Br(Oe({},a,{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 o=this.Zr(),a=function(){var i=o[n],l=new Date().getTime();i.data&&Mt(i.data)&&ho(i.data,(c=>{c.offset=Math.abs(c.timestamp-l),delete c.timestamp})),t.Br(i)};for(var n in o)a()}}),this.Dr))}qr(){clearTimeout(this.jr),this.jr=void 0}Zr(){var t={};return ho(this.Lr,(o=>{var a,n=o,i=(n?n.batchKey:null)||n.url;Ve(t[i])&&(t[i]=Oe({},n,{data:[]})),(a=t[i].data)==null||a.push(n.data)})),this.Lr=[],t}}var Ore=["retriesPerformedSoFar"];class Ire{constructor(t){this.Vr=!1,this.Hr=3e3,this.Lr=[],this._instance=t,this.Lr=[],this.zr=!0,!Ve(he)&&"onLine"in he.navigator&&(this.zr=he.navigator.onLine,this.Ur=()=>{this.zr=!0,this.Yr()},this.Gr=()=>{this.zr=!1},Yo(he,"online",this.Ur),Yo(he,"offline",this.Gr))}get length(){return this.Lr.length}retriableRequest(t){var{retriesPerformedSoFar:o}=t,a=OB(t,Ore);Gc(o)&&(a.url=$v(a.url,{retry_count:o})),this._instance._send_request(Oe({},a,{callback:n=>{n.statusCode===200||n.statusCode>=400&&500>n.statusCode||(o??0)>=10?a.callback==null||a.callback(n):this.Wr(Oe({retriesPerformedSoFar:o},a))}}))}Wr(t){var o=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=o+1;var a=(function(l){var c=3e3*Math.pow(2,l),u=c/2,p=Math.min(18e5,c),g=Math.random()-.5;return Math.ceil(p+g*(p-u))})(o),n=Date.now()+a;this.Lr.push({retryAt:n,requestOptions:t});var i="Enqueued failed request for retry in "+a;navigator.onLine||(i+=" (Browser is offline)"),ze.warn(i),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(),o=[],a=this.Lr.filter((i=>t>i.retryAt||(o.push(i),!1)));if(this.Lr=o,a.length>0)for(var{requestOptions:n}of a)this.retriableRequest(n)}unload(){for(var{requestOptions:t}of(this.Jr&&(clearTimeout(this.Jr),this.Jr=void 0),this.Vr=!1,Ve(he)||(this.Ur&&(he.removeEventListener("online",this.Ur),this.Ur=void 0),this.Gr&&(he.removeEventListener("offline",this.Gr),this.Gr=void 0)),this.Lr))try{this._instance._send_request(Oe({},t,{transport:"sendBeacon"}))}catch(o){ze.error(o)}this.Lr=[]}}class Mre{constructor(t){this.Kr=()=>{var o,a,n,i;this.Qr||(this.Qr={});var l=this.scrollElement(),c=this.scrollY(),u=l?Math.max(0,l.scrollHeight-l.clientHeight):0,p=c+(l?.clientHeight||0),g=l?.scrollHeight||0;this.Qr.lastScrollY=Math.ceil(c),this.Qr.maxScrollY=Math.max(c,(o=this.Qr.maxScrollY)!==null&&o!==void 0?o:0),this.Qr.maxScrollHeight=Math.max(u,(a=this.Qr.maxScrollHeight)!==null&&a!==void 0?a:0),this.Qr.lastContentY=p,this.Qr.maxContentY=Math.max(p,(n=this.Qr.maxContentY)!==null&&n!==void 0?n:0),this.Qr.maxContentHeight=Math.max(g,(i=this.Qr.maxContentHeight)!==null&&i!==void 0?i: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(){Yo(he,"scroll",this.Kr,{capture:!0}),Yo(he,"scrollend",this.Kr,{capture:!0}),Yo(he,"resize",this.Kr)}scrollElement(){if(!this.ei)return he?.document.documentElement;var t=Mt(this.ei)?this.ei:[this.ei];for(var o of t){var a=he?.document.querySelector(o);if(a)return a}}scrollY(){if(this.ei){var t=this.scrollElement();return t&&t.scrollTop||0}return he&&(he.scrollY||he.pageYOffset||he.document.documentElement.scrollTop)||0}scrollX(){if(this.ei){var t=this.scrollElement();return t&&t.scrollLeft||0}return he&&(he.scrollX||he.pageXOffset||he.document.documentElement.scrollLeft)||0}}var Lre=e=>S3(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class hO{constructor(t,o,a,n){this.ti=i=>{var l=this.ri();if(!l||l.sessionId!==i){var c={sessionId:i,props:this.ii(this._instance)};this.ni.register({[Ow]:c})}},this._instance=t,this.si=o,this.ni=a,this.ii=n||Lre,this.si.onSessionId(this.ti)}ri(){return this.ni.props[Ow]}getSetOnceProps(){var t,o=(t=this.ri())==null?void 0:t.props;return o?"r"in o?T3(o):{$referring_domain:o.referringDomain,$pathname:o.initialPathName,utm_source:o.utm_source,utm_campaign:o.utm_campaign,utm_medium:o.utm_medium,utm_content:o.utm_content,utm_term:o.utm_term}:{}}getSessionProps(){var t={};return ho(VC(this.getSetOnceProps()),((o,a)=>{a==="$current_url"&&(a="url"),t["$session_entry_"+pw(a)]=o})),t}}class KC{constructor(){this.oi={}}on(t,o){return this.oi[t]||(this.oi[t]=[]),this.oi[t].push(o),()=>{this.oi[t]=this.oi[t].filter((a=>a!==o))}}emit(t,o){for(var a of this.oi[t]||[])a(o);for(var n of this.oi["*"]||[])n(t,o)}}var R0=So("[SessionId]");class fO{on(t,o){return this.ai.on(t,o)}constructor(t,o,a){var n;if(this.li=[],this.ui=void 0,this.ai=new KC,this.hi=(p,g)=>!(!Gc(p)||!Gc(g))&&Math.abs(p-g)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode===Pi)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=o||Ts,this.fi=a||Ts;var i=this.Bt.persistence_name||this.Bt.token;if(this._sessionTimeoutMs=1e3*qr(this.Bt.session_idle_timeout_seconds||1800,60,36e3,R0.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.pi(),this.gi="ph_"+i+"_window_id",this.mi="ph_"+i+"_primary_window_exists",this.yi()){var l=wa.Z(this.gi),c=wa.Z(this.mi);l&&!c?this.ci=l:wa.F(this.gi),wa.M(this.mi,!0)}if((n=this.Bt.bootstrap)!=null&&n.sessionID)try{var u=(p=>{var g=this.Bt.bootstrap.sessionID.replace(/-/g,"");if(g.length!==32)throw new Error("Not a valid UUID");if(g[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(g.substring(0,12),16)})();this.bi(this.Bt.bootstrap.sessionID,new Date().getTime(),u)}catch(p){R0.error("Invalid sessionID in bootstrap",p)}this.wi()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return Ve(this.li)&&(this.li=[]),this.li.push(t),this.di&&t(this.di,this.ci),()=>{this.li=this.li.filter((o=>o!==t))}}yi(){return this.Bt.persistence!=="memory"&&!this.ni._r&&wa.R()}Ii(t){t!==this.ci&&(this.ci=t,this.yi()&&wa.M(this.gi,t))}Ci(){return this.ci?this.ci:this.yi()?wa.Z(this.gi):null}bi(t,o,a){t===this.di&&o===this._sessionActivityTimestamp&&a===this._sessionStartTimestamp||(this._sessionStartTimestamp=a,this._sessionActivityTimestamp=o,this.di=t,this.ni.register({[Uf]:[o,t,a]}))}Si(){var t=this.ni.props[Uf];return Mt(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&&he&&(he.removeEventListener(Hf,this.ui,{capture:!1}),this.ui=void 0),this.li=[]}wi(){this.ui=()=>{this.yi()&&wa.F(this.mi)},Yo(he,Hf,this.ui,{capture:!1})}checkAndGetSessionAndWindowId(t,o){if(t===void 0&&(t=!1),o===void 0&&(o=null),this.Bt.cookieless_mode===Pi)throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var a=o||new Date().getTime(),[n,i,l]=this.Si(),c=this.Ci(),u=Gc(l)&&Math.abs(a-l)>864e5,p=!1,g=!i,m=!g&&!t&&this.hi(a,n);g||m||u?(i=this.vi(),c=this.fi(),R0.info("new session ID generated",{sessionId:i,windowId:c,changeReason:{noSessionId:g,activityTimeout:m,sessionPastMaximumLength:u}}),l=a,p=!0):c||(c=this.fi(),p=!0);var f=Gc(n)&&t&&!u?n:a,v=Gc(l)?l:new Date().getTime();return this.Ii(c),this.bi(i,f,v),t||this.pi(),p&&this.li.forEach((b=>b(i,c,p?{noSessionId:g,activityTimeout:m,sessionPastMaximumLength:u}:void 0))),{sessionId:i,windowId:c,sessionStartTimestamp:v,changeReason:p?{noSessionId:g,activityTimeout:m,sessionPastMaximumLength:u}:void 0,lastActivityTimestamp:n}}pi(){clearTimeout(this.xi),this.xi=setTimeout((()=>{var[t]=this.Si();if(this.hi(new Date().getTime(),t)){var o=this.di;this.resetSessionId(),this.ai.emit("forcedIdleReset",{idleSessionId:o})}}),1.1*this.sessionTimeoutMs)}}var A3=function(e,t){if(!e)return!1;var o=e.userAgent;if(o&&WD(o,t))return!0;try{var a=e?.userAgentData;if(a!=null&&a.brands&&a.brands.some((n=>WD(n?.brand,t))))return!0}catch{}return!!e.webdriver},Jf=function(e,t){if(!(function(o){try{new RegExp(o)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function vO(e,t,o){return td({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:o})}var D3={exact:(e,t)=>t.some((o=>e.some((a=>o===a)))),is_not:(e,t)=>t.every((o=>e.every((a=>o!==a)))),regex:(e,t)=>t.some((o=>e.some((a=>Jf(o,a))))),not_regex:(e,t)=>t.every((o=>e.every((a=>!Jf(o,a))))),icontains:(e,t)=>t.map(Fh).some((o=>e.map(Fh).some((a=>o.includes(a))))),not_icontains:(e,t)=>t.map(Fh).every((o=>e.map(Fh).every((a=>!o.includes(a))))),gt:(e,t)=>t.some((o=>{var a=parseFloat(o);return!isNaN(a)&&e.some((n=>a>parseFloat(n)))})),lt:(e,t)=>t.some((o=>{var a=parseFloat(o);return!isNaN(a)&&e.some((n=>a<parseFloat(n)))}))},Fh=e=>e.toLowerCase();function O3(e,t){return!e||Object.entries(e).every((o=>{var[a,n]=o,i=t?.[a];if(Ve(i)||Mi(i))return!1;var l=[String(i)],c=D3[n.operator];return!!c&&c(n.values,l)}))}var $w="custom",bO="i.posthog.com",Nre=/^\/static\//;class Fre{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,o=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return o||(o=this.apiHost.replace("."+bO,".posthog.com")),o==="https://app.posthog.com"?"https://us.posthog.com":o}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":$w),this.ki[this.apiHost]}Ti(t){var o=this.instance.config.__preview_external_dependency_versioned_paths;if(typeof o=="string"&&Nre.test(t))return o.trim().replace(/\/$/,"")||void 0}endpointFor(t,o){if(o===void 0&&(o=""),o&&(o=o[0]==="/"?o:"/"+o),t==="ui")return this.uiHost+o;if(t==="flags")return this.flagsApiHost+o;if(t==="assets"){var a=this.Ti(o);if(a)return""+a+o}if(this.region===$w)return this.apiHost+o;var n=bO+o;switch(t){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}}}var eo=So("[Surveys]"),qw="seenSurvey_",Bre=[C0.Popover,C0.Widget,C0.API],jre={ignoreConditions:!1,ignoreDelay:!1,displayType:Fw.Popover},Ure=So("[PostHog ExternalIntegrations]"),zre={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class $re{constructor(t){this._instance=t}ur(t,o){var a;(a=et.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,t,(n=>{if(n)return Ure.error("failed to load script",n);o()}))}startIfEnabledOrStop(){var t=this,o=function(l){var c,u,p;!n||(c=et.__PosthogExtensions__)!=null&&(c=c.integrations)!=null&&c[l]||t.ur(zre[l],(()=>{var g;(g=et.__PosthogExtensions__)==null||(g=g.integrations)==null||(g=g[l])==null||g.start(t._instance)})),!n&&(u=et.__PosthogExtensions__)!=null&&(u=u.integrations)!=null&&u[l]&&((p=et.__PosthogExtensions__)==null||(p=p.integrations)==null||(p=p[l])==null||p.stop())};for(var[a,n]of Object.entries((i=this._instance.config.integrations)!==null&&i!==void 0?i:{})){var i;o(a)}}}var jc,mp={},A0=0,Vw=()=>{},yO='Consent opt in/out is not valid with cookieless_mode="always" and will be ignored',$u="Surveys module not available",SO="sanitize_properties is deprecated. Use before_send instead",I3="Invalid value for property_denylist config: ",Yc="posthog",M3=!Rre&&rn?.indexOf("MSIE")===-1&&rn?.indexOf("Mozilla")===-1,TO=e=>{var t;return Oe({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:rre(Be?.location),persistence:"localStorage+cookie",persistence_name:"",cookie_persisted_properties:[],loaded:Vw,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:Ta&&Co(Ta?.search)&&Ta.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:(he==null||(t=he.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(o){ze.error("Bad HTTP status: "+o.statusCode+" "+o.text)},get_device_id:o=>o,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:Nw,before_send:void 0,request_queue_config:{flush_interval_ms:zw},error_tracking:{},_onCapture:Vw,__preview_eager_load_replay:!1},(o=>({rageclick:!o||"2025-11-30">o||{content_ignorelist:!0},capture_pageview:!o||"2025-05-24">o||"history_change",session_recording:o&&o>="2025-11-30"?{strictMinimumDuration:!0}:{},external_scripts_inject_target:o&&o>="2026-01-30"?"head":"body",internal_or_test_user_hostname:o&&o>="2026-01-30"?/^(localhost|127\.0\.0\.1)$/:void 0}))(e))},qre=[["process_person","person_profiles"],["xhr_headers","request_headers"],["cookie_name","persistence_name"],["disable_cookie","disable_persistence"],["store_google","save_campaign_params"],["verbose","debug"]],wO=e=>{var t={};for(var[o,a]of qre)Ve(e[o])||(t[a]=e[o]);var n=Do({},t,e);return Mt(e.property_blacklist)&&(Ve(e.property_denylist)?n.property_denylist=e.property_blacklist:Mt(e.property_denylist)?n.property_denylist=[...e.property_blacklist,...e.property_denylist]:ze.error(I3+e.property_denylist)),n};class Vre{constructor(){this.__forceAllowLocalhost=!1}get Ai(){return this.__forceAllowLocalhost}set Ai(t){ze.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class Yn{Ei(t,o){if(t){var a=this.Ri.indexOf(t);a!==-1&&this.Ri.splice(a,1)}return this.Ri.push(o),o.initialize==null||o.initialize(),o}Ni(){return this.config.cookieless_mode===Pi||this.config.cookieless_mode===bl&&this.consent.isRejected()}get decideEndpointWasHit(){var t,o;return(t=(o=this.featureFlags)==null?void 0:o.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,o;return(t=(o=this.featureFlags)==null?void 0:o.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){var t;this.webPerformance=new Vre,this.Mi=!1,this.version=Ga.LIB_VERSION,this.Fi=new KC,this.Ri=[],this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=TO(),this.SentryIntegration=hre,this.sentryIntegration=a=>(function(n,i){var l=h3(n,i);return{name:g3,processEvent:c=>l(c)}})(this,a),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.Oi=!1,this.Pi=null,this.Li=null,this.Di=null,this.scrollManager=new Mre(this),this.pageViewManager=new rO(this),this.rateLimiter=new _re(this),this.requestRouter=new Fre(this),this.consent=new pre(this),this.externalIntegrations=new $re(this);var o=(t=Yn.__defaultExtensionClasses)!==null&&t!==void 0?t:{};this.featureFlags=o.featureFlags&&new o.featureFlags(this),this.toolbar=o.toolbar&&new o.toolbar(this),this.surveys=o.surveys&&new o.surveys(this),this.conversations=o.conversations&&new o.conversations(this),this.logs=o.logs&&new o.logs(this),this.experiments=o.experiments&&new o.experiments(this),this.exceptions=o.exceptions&&new o.exceptions(this),this.people={set:(a,n,i)=>{var l=Co(a)?{[a]:n}:a;this.setPersonProperties(l),i?.({})},set_once:(a,n,i)=>{var l=Co(a)?{[a]:n}:a;this.setPersonProperties(void 0,l),i?.({})}},this.on("eventCaptured",(a=>ze.info('send "'+a?.event+'"',a)))}init(t,o,a){if(a&&a!==Yc){var n,i=(n=mp[a])!==null&&n!==void 0?n:new Yn;return i._init(t,o,a),mp[a]=i,mp[Yc][a]=i,i}return this._init(t,o,a)}_init(t,o,a){var n,i;if(o===void 0&&(o={}),Ve(t)||tf(t))return ze.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={},o.debug=this.Bi(o.debug),this.ji=o,this.$i=[],o.person_profiles?this.Li=o.person_profiles:o.process_person&&(this.Li=o.process_person),this.set_config(Do({},TO(o.defaults),wO(o),{name:a,token:t})),this.config.on_xhr_error&&ze.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=o.disable_compression?void 0:Fr.GZipJS;var l=this.qi();this.persistence=new _0(this.config,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new _0(Oe({},this.config,{persistence:"sessionStorage"}),l);var c=Oe({},this.persistence.props),u=Oe({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Zi=new Dre((C=>this.Vi(C)),this.config.request_queue_config),this.Hi=new Ire(this),this.__request_queue=[];var p=this.Ni();if(p||(this.sessionManager=new fO(this),this.sessionPropsManager=new hO(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(ze.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.zi(p)}),0)):(ze.info("Initializing extensions synchronously"),this.zi(p)),Ga.DEBUG=Ga.DEBUG||this.config.debug,Ga.DEBUG&&ze.info("Starting in debug mode",{this:this,config:o,thisC:Oe({},this.config),p:c,s:u}),!this.config.identity_distinct_id||(n=o.bootstrap)!=null&&n.distinctID||(o.bootstrap=Oe({},o.bootstrap,{distinctID:this.config.identity_distinct_id,isIdentifiedID:!0})),((i=o.bootstrap)==null?void 0:i.distinctID)!==void 0){var g=o.bootstrap.distinctID,m=this.get_distinct_id(),f=this.persistence.get_property(mr);if(o.bootstrap.isIdentifiedID&&m!=null&&m!==g&&f===Nc)this.identify(g);else if(o.bootstrap.isIdentifiedID&&m!=null&&m!==g&&f===Fc)ze.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(Ts()),b=o.bootstrap.isIdentifiedID?v:g;this.persistence.set_property(mr,o.bootstrap.isIdentifiedID?Fc:Nc),this.register({distinct_id:g,$device_id:b})}}if(p)this.register_once({distinct_id:Oh,$device_id:null},"");else if(!this.get_distinct_id()){var S=this.config.get_device_id(Ts());this.register_once({distinct_id:S,$device_id:S},""),this.persistence.set_property(mr,Nc)}return Yo(he,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),o.segment?(function(C,w){var _=C.config.segment;if(!_)return w();(function(E,k){var x=E.config.segment;if(!x)return k();var A=O=>{var N=()=>O.anonymousId()||Ts();E.config.get_device_id=N,O.id()&&(E.register({distinct_id:O.id(),$device_id:N()}),E.persistence.set_property(mr,Fc)),k()},D=x.user();"then"in D&&Ci(D.then)?D.then(A):A(D)})(C,(()=>{_.register((E=>{Promise&&Promise.resolve||w0.warn("This browser does not have Promise support, and can not use the segment integration");var k=(x,A)=>{if(!A)return x;x.event.userId||x.event.anonymousId===E.get_distinct_id()||(w0.info("No userId set, resetting PostHog"),E.reset()),x.event.userId&&x.event.userId!==E.get_distinct_id()&&(w0.info("UserId set, identifying with PostHog"),E.identify(x.event.userId));var D=E.calculateEventProperties(A,x.event.properties);return x.event.properties=Object.assign({},D,x.event.properties),x};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:x=>k(x,x.event.event),page:x=>k(x,Wc),identify:x=>k(x,S0),screen:x=>k(x,"$screen")}})(C)).then((()=>{w()}))}))})(this,(()=>this.Ui())):this.Ui(),Ci(this.config._onCapture)&&this.config._onCapture!==Vw&&(ze.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(C=>this.config._onCapture(C.event,C)))),this.config.ip&&ze.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 o,a,n,i,l,c,u,p=performance.now(),g=Oe({},Yn.__defaultExtensionClasses,this.config.__extensionClasses),m=[];g.featureFlags&&this.Ri.push(this.featureFlags=(o=this.featureFlags)!==null&&o!==void 0?o:new g.featureFlags(this)),g.exceptions&&this.Ri.push(this.exceptions=(a=this.exceptions)!==null&&a!==void 0?a:new g.exceptions(this)),g.historyAutocapture&&this.Ri.push(this.historyAutocapture=new g.historyAutocapture(this)),g.tracingHeaders&&this.Ri.push(new g.tracingHeaders(this)),g.siteApps&&this.Ri.push(this.siteApps=new g.siteApps(this)),g.sessionRecording&&!t&&this.Ri.push(this.sessionRecording=new g.sessionRecording(this)),this.config.disable_scroll_properties||m.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),g.autocapture&&this.Ri.push(this.autocapture=new g.autocapture(this)),g.surveys&&this.Ri.push(this.surveys=(n=this.surveys)!==null&&n!==void 0?n:new g.surveys(this)),g.logs&&this.Ri.push(this.logs=(i=this.logs)!==null&&i!==void 0?i:new g.logs(this)),g.conversations&&this.Ri.push(this.conversations=(l=this.conversations)!==null&&l!==void 0?l:new g.conversations(this)),g.productTours&&this.Ri.push(this.productTours=new g.productTours(this)),g.heatmaps&&this.Ri.push(this.heatmaps=new g.heatmaps(this)),g.webVitalsAutocapture&&this.Ri.push(this.webVitalsAutocapture=new g.webVitalsAutocapture(this)),g.exceptionObserver&&this.Ri.push(this.exceptionObserver=new g.exceptionObserver(this)),g.deadClicksAutocapture&&this.Ri.push(this.deadClicksAutocapture=new g.deadClicksAutocapture(this,gre)),g.toolbar&&this.Ri.push(this.toolbar=(c=this.toolbar)!==null&&c!==void 0?c:new g.toolbar(this)),g.experiments&&this.Ri.push(this.experiments=(u=this.experiments)!==null&&u!==void 0?u:new g.experiments(this)),this.Ri.forEach((f=>{f.initialize&&m.push((()=>{f.initialize==null||f.initialize()}))})),m.push((()=>{if(this.Yi){var f=this.Yi;this.Yi=void 0,this.Nr(f)}})),this.Gi(m,p)}Gi(t,o){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-o>=30&&t.length>0)return void setTimeout((()=>{this.Gi(t,o)}),0);var a=t.shift();if(a)try{a()}catch(i){ze.error("Error initializing extension:",i)}}var n=Math.round(performance.now()-o);this.register_for_session({[c3]:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",[d3]:n}),this.config.__preview_deferred_init_extensions&&ze.info("PostHog extensions initialized ("+n+"ms)")}Nr(t){var o;if(!Be||!Be.body)return ze.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=Ct(t.supportedCompression,Fr.GZipJS)?Fr.GZipJS:Ct(t.supportedCompression,Fr.Base64)?Fr.Base64:void 0),(o=t.analytics)!=null&&o.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Li?this.Li:Nw}),this.Ri.forEach((a=>a.onRemoteConfig==null?void 0:a.onRemoteConfig(t)))}Ui(){try{this.config.loaded(this)}catch(a){ze.critical("`loaded` function failed",a)}if(this.Xi(),this.config.internal_or_test_user_hostname&&Ta!=null&&Ta.hostname){var t=Ta.hostname,o=this.config.internal_or_test_user_hostname;(typeof o=="string"?t===o:o.test(t))&&this.setInternalOrTestUser()}this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.Ni())&&this.Ji()}),1),this.Ki=new _3(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()&&Ih(this.__request_queue,(t=>this.Vi(t))),this.__request_queue=[],this.Xi()}_handle_unload(){var t,o,a,n;(t=this.surveys)==null||t.handlePageUnload(),this.config.request_batching?(this.Qi()&&this.capture(y0),(o=this.logs)==null||o.flushLogs("sendBeacon"),(a=this.Zi)==null||a.unload(),(n=this.Hi)==null||n.unload()):this.Qi()&&this.capture(y0,null,{transport:"sendBeacon"})}_send_request(t){this.__loaded&&(M3?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=$v(t.url,{ip:this.config.ip?1:0}),t.headers=Oe({},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,(o=>{var a,n,i,l=Oe({},o);l.timeout=l.timeout||6e4,l.url=gO(l.url,l.compression);var c=(a=l.transport)!==null&&a!==void 0?a:"fetch",u=rf.filter((g=>!l.disableTransport||!g.transport||!l.disableTransport.includes(g.transport))),p=(n=(i=(function(g,m){for(var f=0;g.length>f;f++)if(g[f].transport===c)return g[f]})(u))==null?void 0:i.method)!==null&&n!==void 0?n:u[0].method;if(!p)throw new Error("No available transport method");c!=="sendBeacon"&&l.data&&l.compression===Fr.GZipJS&&hne&&!mO?Are(l).then((g=>{p(g)})).catch((g=>{if((m=>!(!m||typeof m!="object")&&("name"in m?String(m.name):"")==="NotReadableError")(g))return mO=!0,void p(Oe({},l,{compression:void 0,url:gO(o.url,void 0)}));p(l)})):p(l)})(Oe({},t,{callback:o=>{var a,n;this.rateLimiter.checkForLimiting(o),400>o.statusCode||(a=(n=this.config).on_request_error)==null||a.call(n,o),t.callback==null||t.callback(o)}}))))}Vi(t){this.Hi?this.Hi.retriableRequest(t):this._send_request(t)}_execute_array(t){A0++;try{var o,a=[],n=[],i=[];Ih(t,(c=>{c&&(Mt(o=c[0])?i.push(c):Ci(c)?c.call(this):Mt(c)&&o==="alias"?a.push(c):Mt(c)&&o.indexOf("capture")!==-1&&Ci(this[o])?i.push(c):n.push(c))}));var l=function(c,u){Ih(c,(function(p){if(Mt(p[0])){var g=u;ho(p,(function(m){g=g[m[0]].apply(g,m.slice(1))}))}else u[p[0]].apply(u,p.slice(1))}))};l(a,this),l(n,this),l(i,this)}finally{A0--}}push(t){if(A0>0&&Mt(t)&&Co(t[0])){var o=Yn.prototype[t[0]];Ci(o)&&o.apply(this,t.slice(1))}else this._execute_array([t])}capture(t,o,a){var n,i,l,c,u;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Zi){if(this.is_capturing())if(!Ve(t)&&Co(t)){var p=!this.config.opt_out_useragent_filter&&this._is_bot();if(!p||this.config.__preview_capture_bot_pageviews){var g=a!=null&&a.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(g==null||!g.isRateLimited){o!=null&&o.$current_url&&!Co(o?.$current_url)&&(ze.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),o==null||delete o.$current_url),t!=="$exception"||a!=null&&a.en||ze.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 m=new Date,f=a?.timestamp||m,v=Ts(),b={uuid:v,event:t,properties:this.calculateEventProperties(t,o||{},f,v)};t===Wc&&this.config.__preview_capture_bot_pageviews&&p&&(b.event="$bot_pageview",b.properties.$browser_type="bot"),g&&(b.properties.$lib_rate_limit_remaining_tokens=g.remainingTokens),a?.$set&&(b.$set=a?.$set);var S,C,w,_=this.tn(a?.$set_once,t!==tO,t===S0);if(_&&(b.$set_once=_),a!=null&&a._noTruncate||(i=this.config.properties_string_max_length,l=b,c=N=>Co(N)?N.slice(0,i):N,u=new Set,b=(function N($,F){return $!==Object($)?c?c($):$:u.has($)?void 0:(u.add($),Mt($)?(z=[],Ih($,(j=>{z.push(N(j))}))):(z={},ho($,((j,K)=>{u.has(j)||(z[K]=N(j))}))),z);var z})(l)),b.timestamp=f,Ve(a?.timestamp)||(b.properties.$event_time_override_provided=!0,b.properties.$event_time_override_system_time=m),t===ip.DISMISSED||t===ip.SENT){var E=o?.[P0.SURVEY_ID],k=o?.[P0.SURVEY_ITERATION];(N=>{try{var $=(F=>((z,j)=>{var K=""+qw+j.id;return j.current_iteration&&j.current_iteration>0&&(K=""+qw+j.id+"_"+j.current_iteration),K})(0,F))(N);if(localStorage.getItem($))return;localStorage.setItem($,"true")}catch(F){eo.error("Failed to persist survey seen state",F)}})({id:E,current_iteration:k}),b.$set=Oe({},b.$set,{[(S={id:E,current_iteration:k},C=t===ip.SENT?"responded":"dismissed",w="$survey_"+C+"/"+S.id,S.current_iteration&&S.current_iteration>0&&(w="$survey_"+C+"/"+S.id+"/"+S.current_iteration),w)]:!0})}else t===ip.SHOWN&&(b.$set=Oe({},b.$set,{[P0.SURVEY_LAST_SEEN_DATE]:new Date().toISOString()}));if(t===wre.SHOWN){var x=o?.[sO.TOUR_TYPE];x&&(b.$set=Oe({},b.$set,{[sO.TOUR_LAST_SEEN_DATE+"/"+x]:new Date().toISOString()}))}var A=Oe({},b.properties.$set,b.$set);if(Xc(A)||this.setPersonPropertiesForFlags(A),!Pt(this.config.before_send)){var D=this.rn(b);if(!D)return;b=D}this.Fi.emit("eventCaptured",b);var O={method:"POST",url:(n=a?._url)!==null&&n!==void 0?n:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:b,compression:"best-available",batchKey:a?._batchKey};return!this.config.request_batching||a&&(a==null||!a._batchKey)||a!=null&&a.send_instantly?this.Vi(O):this.Zi.enqueue(O),b}ze.critical("This capture call is ignored due to client rate limiting.")}}else ze.error("No event name provided to posthog.capture")}else ze.uninitializedWarning("posthog.capture")}_addCaptureHook(t){return this.on("eventCaptured",(o=>t(o.event,o)))}calculateEventProperties(t,o,a,n,i){if(a=a||new Date,!this.persistence||!this.sessionPersistence)return o;var l=i?void 0:this.persistence.remove_event_timer(t),c=Oe({},o);if(c.token=this.config.token,c.$config_defaults=this.config.defaults,this.Ni()&&(c.$cookieless_mode=!0),t==="$snapshot"){var u=Oe({},this.persistence.properties(),this.sessionPersistence.properties());return c.distinct_id=u.distinct_id,(!Co(c.distinct_id)&&!Xn(c.distinct_id)||tf(c.distinct_id))&&ze.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),c}var p,g=(function(w,_){var E,k,x,A;if(!rn)return{};var D,O,N,$,F,z,j,K,ne=w?[...Cd,..._||[]]:[],[H,Z]=(function(te){for(var le=0;QD.length>le;le++){var[Q,M]=QD[le],G=Q.exec(te),q=G&&(Ci(M)?M(G,te):M);if(q)return q}return["",""]})(rn);return Do(VC({$os:H,$os_version:Z,$browser:QB(rn,navigator.vendor),$device:JD(rn),$device_type:(O=rn,N={userAgentDataPlatform:(E=navigator)==null||(E=E.userAgentData)==null?void 0:E.platform,maxTouchPoints:(k=navigator)==null?void 0:k.maxTouchPoints,screenWidth:he==null||(x=he.screen)==null?void 0:x.width,screenHeight:he==null||(A=he.screen)==null?void 0:A.height,devicePixelRatio:he?.devicePixelRatio},K=JD(O),K===FB||K===NB||K==="Kobo"||K==="Kindle Fire"||K===ZB?Td:K===Ap||K===dd||K===Dp||K===gw?"Console":K===jB?"Wearable":K?Rn:N?.userAgentDataPlatform==="Android"&&(($=N?.maxTouchPoints)!==null&&$!==void 0?$:0)>0?600>Math.min((F=N?.screenWidth)!==null&&F!==void 0?F:0,(z=N?.screenHeight)!==null&&z!==void 0?z:0)/((j=N?.devicePixelRatio)!==null&&j!==void 0?j:1)?Rn:Td:"Desktop"),$timezone:w3(),$timezone_offset:Sre()}),{$current_url:Op(Ta?.href,ne,Ip),$host:Ta?.host,$pathname:Ta?.pathname,$raw_user_agent:rn.length>1e3?rn.substring(0,997)+"...":rn,$browser_version:Dne(rn,navigator.vendor),$browser_language:iO(),$browser_language_prefix:(D=iO(),typeof D=="string"?D.split("-")[0]:void 0),$screen_height:he?.screen.height,$screen_width:he?.screen.width,$viewport_height:he?.innerHeight,$viewport_width:he?.innerWidth,$lib:Ga.LIB_NAME,$lib_version:Ga.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:m,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(i,a.getTime());c.$session_id=m,c.$window_id=f}this.sessionPropsManager&&Do(c,this.sessionPropsManager.getSessionProps());try{var v;this.sessionRecording&&Do(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===$w&&(c.$lib_custom_api_host=this.config.api_host),p=t!==Wc||i?t!==y0||i?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(a):this.pageViewManager.doPageView(a,n),c=Do(c,p),t===Wc&&Be&&(c.title=Be.title),!Ve(l)){var b=a.getTime()-l;c.$duration=parseFloat((b/1e3).toFixed(3))}rn&&this.config.opt_out_useragent_filter&&(c.$browser_type=this._is_bot()?"bot":"browser"),(c=Do({},g,this.persistence.properties(),this.sessionPersistence.properties(),c)).$is_identified=this._isIdentified(),Mt(this.config.property_denylist)?ho(this.config.property_denylist,(function(w){delete c[w]})):ze.error(I3+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var S=this.config.sanitize_properties;S&&(ze.error(SO),c=S(c,t));var C=this.nn();return c.$process_person_profile=C,C&&!i&&this.sn("_calculate_event_properties"),c}tn(t,o,a){var n;if(o===void 0&&(o=!0),a===void 0&&(a=!1),!this.persistence||!this.nn()||this.Mi&&!a)return t;var i=this.persistence.get_initial_props(),l=(n=this.sessionPropsManager)==null?void 0:n.getSetOnceProps(),c=Do({},i,l||{},t||{}),u=this.config.sanitize_properties;return u&&(ze.error(SO),c=u(c,"$set_once")),o&&(this.Mi=!0),Xc(c)?void 0:c}register(t,o){var a;(a=this.persistence)==null||a.register(t,o)}register_once(t,o,a){var n;(n=this.persistence)==null||n.register_once(t,o,a)}register_for_session(t){var o;(o=this.sessionPersistence)==null||o.register(t)}unregister(t){var o;(o=this.persistence)==null||o.unregister(t)}unregister_for_session(t){var o;(o=this.sessionPersistence)==null||o.unregister(t)}an(t,o){this.register({[t]:o})}getFeatureFlag(t,o){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlag(t,o)}getFeatureFlagPayload(t){var o;return(o=this.featureFlags)==null?void 0:o.getFeatureFlagPayload(t)}getFeatureFlagResult(t,o){var a;return(a=this.featureFlags)==null?void 0:a.getFeatureFlagResult(t,o)}isFeatureEnabled(t,o){var a;return(a=this.featureFlags)==null?void 0:a.isFeatureEnabled(t,o)}reloadFeatureFlags(){var t;(t=this.featureFlags)==null||t.reloadFeatureFlags()}updateFlags(t,o,a){var n;(n=this.featureFlags)==null||n.updateFlags(t,o,a)}updateEarlyAccessFeatureEnrollment(t,o,a){var n;(n=this.featureFlags)==null||n.updateEarlyAccessFeatureEnrollment(t,o,a)}getEarlyAccessFeatures(t,o,a){var n;return o===void 0&&(o=!1),(n=this.featureFlags)==null?void 0:n.getEarlyAccessFeatures(t,o,a)}on(t,o){return this.Fi.on(t,o)}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:$u}),()=>{})}onSessionId(t){var o,a;return(o=(a=this.sessionManager)==null?void 0:a.onSessionId(t))!==null&&o!==void 0?o:()=>{}}getSurveys(t,o){o===void 0&&(o=!1),this.surveys?this.surveys.getSurveys(t,o):t([],{isLoaded:!1,error:$u})}getActiveMatchingSurveys(t,o){o===void 0&&(o=!1),this.surveys?this.surveys.getActiveMatchingSurveys(t,o):t([],{isLoaded:!1,error:$u})}renderSurvey(t,o){var a;(a=this.surveys)==null||a.renderSurvey(t,o)}displaySurvey(t,o){var a;o===void 0&&(o=jre),(a=this.surveys)==null||a.displaySurvey(t,o)}cancelPendingSurvey(t){var o;(o=this.surveys)==null||o.cancelPendingSurvey(t)}canRenderSurvey(t){var o,a;return(o=(a=this.surveys)==null?void 0:a.canRenderSurvey(t))!==null&&o!==void 0?o:{visible:!1,disabledReason:$u}}canRenderSurveyAsync(t,o){var a,n;return o===void 0&&(o=!1),(a=(n=this.surveys)==null?void 0:n.canRenderSurveyAsync(t,o))!==null&&a!==void 0?a:Promise.resolve({visible:!1,disabledReason:$u})}ln(t){return!t||tf(t)?(ze.critical("Unique user id has not been set in posthog.identify"),!1):t===Oh?(ze.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())||(ze.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,o,a){if(!this.__loaded||!this.persistence)return ze.uninitializedWarning("posthog.identify");if(Xn(t)&&(t=t.toString(),ze.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 n=this.get_distinct_id();this.register({$user_id:t}),this.get_property(jf)||this.register_once({$had_persisted_distinct_id:!0,$device_id:n},""),t!==n&&t!==this.get_property(tp)&&(this.unregister(tp),this.register({distinct_id:t}));var i,l=(this.persistence.get_property(mr)||Nc)===Nc;t!==n&&l?(this.persistence.set_property(mr,Fc),this.setPersonPropertiesForFlags({$set:o||{},$set_once:a||{}},!1),this.capture(S0,{distinct_id:t,$anon_distinct_id:n},{$set:o||{},$set_once:a||{}}),this.Di=vO(t,o,a),(i=this.featureFlags)==null||i.setAnonymousDistinctId(n)):(o||a)&&this.setPersonProperties(o,a),t!==n&&(this.reloadFeatureFlags(),this.unregister(up))}}setPersonProperties(t,o){if((t||o)&&this.sn("posthog.setPersonProperties")){var a=vO(this.get_distinct_id(),t,o);this.Di!==a?(this.setPersonPropertiesForFlags({$set:t||{},$set_once:o||{}},!0),this.capture("$set",{$set:t||{},$set_once:o||{}}),this.Di=a):ze.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,o,a){if(t&&o){var n=this.getGroups(),i=n[t]!==o;if(i&&this.resetGroupPropertiesForFlags(t),this.register({$groups:Oe({},n,{[t]:o})}),i||a){var l={$group_type:t,$group_key:o};a&&(l.$group_set=a),this.capture(tO,l)}a&&this.setGroupPropertiesForFlags({[t]:a}),i&&!a&&this.reloadFeatureFlags()}else ze.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,o){var a;o===void 0&&(o=!0),(a=this.featureFlags)==null||a.setPersonPropertiesForFlags(t,o)}resetPersonPropertiesForFlags(){var t;(t=this.featureFlags)==null||t.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,o){var a;o===void 0&&(o=!0),this.sn("posthog.setGroupPropertiesForFlags")&&((a=this.featureFlags)==null||a.setGroupPropertiesForFlags(t,o))}resetGroupPropertiesForFlags(t){var o;(o=this.featureFlags)==null||o.resetGroupPropertiesForFlags(t)}reset(t){var o,a,n,i,l,c,u,p;if(ze.info("reset"),!this.__loaded)return ze.uninitializedWarning("posthog.reset");var g=this.get_property(jf);if(this.consent.reset(),(o=this.persistence)==null||o.clear(),(a=this.sessionPersistence)==null||a.clear(),(n=this.surveys)==null||n.reset(),(i=this.Ki)==null||i.stop(),(l=this.featureFlags)==null||l.reset(),(c=this.conversations)==null||c.reset(),(u=this.persistence)==null||u.set_property(mr,Nc),(p=this.sessionManager)==null||p.resetSessionId(),this.Di=null,this.config.cookieless_mode===Pi)this.register_once({distinct_id:Oh,$device_id:null},"");else{var m=this.config.get_device_id(Ts());this.register_once({distinct_id:m,$device_id:t?m:g},"")}this.register({$last_posthog_reset:new Date().toISOString()},1),delete this.config.identity_distinct_id,delete this.config.identity_hash,this.reloadFeatureFlags()}setIdentity(t,o){var a;this.config.identity_distinct_id=t,this.config.identity_hash=o,this.alias(t),(a=this.conversations)==null||a.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,o;return(t=(o=this.sessionManager)==null?void 0:o.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:o,sessionStartTimestamp:a}=this.sessionManager.checkAndGetSessionAndWindowId(!0),n=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+o);if(t!=null&&t.withTimestamp&&a){var i,l=(i=t.timestampLookBack)!==null&&i!==void 0?i:10;if(!a)return n;n+="?t="+Math.max(Math.floor((new Date().getTime()-a)/1e3)-l,0)}return n}alias(t,o){return t===this.get_property(a3)?(ze.critical("Attempting to create alias for existing People user - aborting."),-2):this.sn("posthog.alias")?(Ve(o)&&(o=this.get_distinct_id()),t!==o?(this.an(tp,t),this.capture("$create_alias",{alias:t,distinct_id:o})):(ze.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var o=Oe({},this.config);if(No(t)){var a,n,i,l,c,u,p,g,m,f;Do(this.config,wO(t));var v=this.qi();(a=this.persistence)==null||a.update_config(this.config,o,v),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new _0(Oe({},this.config,{persistence:"sessionStorage"}),v);var b=this.Bi(this.config.debug);$r(b)&&(this.config.debug=b),$r(this.config.debug)&&(this.config.debug?(Ga.DEBUG=!0,_o.R()&&_o.M("ph_debug",!0),ze.info("set_config",{config:t,oldConfig:o,newConfig:Oe({},this.config)})):(Ga.DEBUG=!1,_o.R()&&_o.F("ph_debug"))),(n=this.exceptionObserver)==null||n.onConfigChange(),(i=this.exceptions)==null||i.onConfigChange(),(l=this.sessionRecording)==null||l.startIfEnabledOrStop(),(c=this.autocapture)==null||c.startIfEnabled(),(u=this.heatmaps)==null||u.startIfEnabled(),(p=this.exceptionObserver)==null||p.startIfEnabledOrStop(),(g=this.deadClicksAutocapture)==null||g.startIfEnabledOrStop(),(m=this.surveys)==null||m.loadIfEnabled(),this.cn(),(f=this.externalIntegrations)==null||f.startIfEnabledOrStop()}}_overrideSDKInfo(t,o){Ga.LIB_NAME=t,Ga.LIB_VERSION=o}startSessionRecording(t){var o,a,n,i,l,c=t===!0,u={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(u).some(Boolean)&&((o=this.sessionManager)==null||o.checkAndGetSessionAndWindowId(),u.sampling&&((a=this.sessionRecording)==null||a.overrideSampling()),u.linked_flag&&((n=this.sessionRecording)==null||n.overrideLinkedFlag()),u.url_trigger&&((i=this.sessionRecording)==null||i.overrideTrigger("url")),u.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,o){if(this.exceptions){var a=new Error("PostHog syntheticException"),n=this.exceptions.buildProperties(t,{handled:!0,syntheticException:a});return this.exceptions.sendExceptionEvent(Oe({},n,o))}}addExceptionStep(t,o){var a;(a=this.exceptions)==null||a.addExceptionStep(t,o)}captureLog(t){var o;(o=this.logs)==null||o.captureLog(t)}get logger(){var t,o;return(t=(o=this.logs)==null?void 0:o.logger)!==null&&t!==void 0?t:Yn.dn}startExceptionAutocapture(t){this.set_config({capture_exceptions:t==null||t})}stopExceptionAutocapture(){this.set_config({capture_exceptions:!1})}loadToolbar(t){var o,a;return(o=(a=this.toolbar)==null?void 0:a.loadToolbar(t))!==null&&o!==void 0&&o}get_property(t){var o;return(o=this.persistence)==null?void 0:o.props[t]}getSessionProperty(t){var o;return(o=this.sessionPersistence)==null?void 0:o.props[t]}toString(){var t,o=(t=this.config.name)!==null&&t!==void 0?t:Yc;return o!==Yc&&(o=Yc+"."+o),o}_isIdentified(){var t,o;return((t=this.persistence)==null?void 0:t.get_property(mr))===Fc||((o=this.sessionPersistence)==null?void 0:o.get_property(mr))===Fc}nn(){var t,o;return!(this.config.person_profiles==="never"||this.config.person_profiles===Nw&&!this._isIdentified()&&Xc(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[tp])&&((o=this.persistence)==null||(o=o.props)==null||!o[qf]))}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"?(ze.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.an(qf,!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!==bl)}cn(){var t,o,a,n,i=this.qi();return((t=this.persistence)==null?void 0:t._r)!==i&&((a=this.persistence)==null||a.set_disabled(i)),((o=this.sessionPersistence)==null?void 0:o._r)!==i&&((n=this.sessionPersistence)==null||n.set_disabled(i)),i}opt_in_capturing(t){var o;if(this.config.cookieless_mode!==Pi){if(this.Ni()){var a,n,i,l,c;this.reset(!0),(a=this.sessionManager)==null||a.destroy(),(n=this.pageViewManager)==null||n.destroy(),this.sessionManager=new fO(this),this.pageViewManager=new rO(this),this.persistence&&(this.sessionPropsManager=new hO(this,this.sessionManager,this.persistence));var u,p=(i=(l=this.config.__extensionClasses)==null?void 0:l.sessionRecording)!==null&&i!==void 0?i:(c=Yn.__defaultExtensionClasses)==null?void 0:c.sessionRecording;p&&(this.sessionRecording=this.Ei(this.sessionRecording,new p(this)),this.Wi&&((u=this.sessionRecording)==null||u.onRemoteConfig==null||u.onRemoteConfig(this.Wi)))}var g,m;this.consent.optInOut(!0),this.cn(),this.Xi(),(o=this.sessionRecording)==null||o.startIfEnabledOrStop(),this.config.cookieless_mode==bl&&((g=this.surveys)==null||g.loadIfEnabled()),(Ve(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((m=t?.captureEventName)!==null&&m!==void 0?m:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Ji()}else ze.warn(yO)}opt_out_capturing(){var t,o,a;this.config.cookieless_mode!==Pi?(this.config.cookieless_mode===bl&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.cn(),this.config.cookieless_mode===bl&&(this.register({distinct_id:Oh,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),(o=this.pageViewManager)==null||o.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(a=this.sessionRecording)==null||a.stopRecording(),this.sessionRecording=void 0,this.Ji())):ze.warn(yO)}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===Pi||(this.config.cookieless_mode===bl?this.consent.isRejected()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.cn()}_is_bot(){return xn?A3(xn,this.config.custom_blocked_useragents):void 0}Ji(){Be&&(Be.visibilityState==="visible"?this.Oi||(this.Oi=!0,this.capture(Wc,{title:Be.title},{send_instantly:!0}),this.Pi&&(Be.removeEventListener(Vf,this.Pi),this.Pi=null)):this.Pi||(this.Pi=this.Ji.bind(this),Yo(Be,Vf,this.Pi)))}debug(t){t===!1?(he?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(he?.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,o,a,n,i,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?(ze.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):(a="advanced_disable_decide",n=ze,i=(o="advanced_disable_flags")in(t=c)&&!Pt(t[o]),l=a in t&&!Pt(t[a]),i?t[o]:!!l&&(n&&n.warn("Config field '"+a+"' is deprecated. Please use '"+o+"' instead. The old field will be removed in a future major version."),t[a]))}rn(t){if(Pt(this.config.before_send))return t;var o=Mt(this.config.before_send)?this.config.before_send:[this.config.before_send],a=t;for(var n of o){if(a=n(a),Pt(a)){var i="Event '"+t.event+"' was rejected in beforeSend function";return yne(t.event)?ze.warn(i+". This can cause unexpected behavior."):ze.info(i),null}a.properties&&!Xc(a.properties)||ze.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return a}getPageViewId(){var t;return(t=this.pageViewManager.dr)==null?void 0:t.pageViewId}captureTraceFeedback(t,o){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:o})}captureTraceMetric(t,o,a){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:o,$ai_metric_value:String(a)})}Bi(t){var o=$r(t)&&!t,a=_o.R()&&_o.O("ph_debug")==="true";return!o&&(!!a||t)}}function _O(e){return e instanceof Element&&(e.id===l3||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function qv(e){return!!e&&e.nodeType===1}function As(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function L3(e){return!!e&&e.nodeType===3}function N3(e){return!!e&&e.nodeType===11}function WC(e){return e?Uv(e).split(/\s+/):[]}function CO(e){var t=he?.location.href;return!!(t&&e&&e.some((o=>t.match(o))))}function Xf(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 WC(t)}function F3(e){return Pt(e)?null:Uv(e).split(/(\s+)/).filter((t=>gp(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function Mp(e){var t="";return Gw(e)&&!j3(e)&&e.childNodes&&e.childNodes.length&&ho(e.childNodes,(function(o){var a;L3(o)&&o.textContent&&(t+=(a=F3(o.textContent))!==null&&a!==void 0?a:"")})),Uv(t)}function PO(e){return Ve(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}Yn.__defaultExtensionClasses={},Yn.dn={trace:jc=()=>{},debug:jc,info:jc,warn:jc,error:jc,fatal:jc},(function(e,t){for(var o=0;t.length>o;o++)e.prototype[t[o]]=are(e.prototype[t[o]])})(Yn,["identify"]);var YC=["a","button","form","input","select","textarea","label"];function kO(e,t){if(Ve(t))return!0;var o,a=function(i){if(t.some((l=>i.matches(l))))return{v:!0}};for(var n of e)if(o=a(n))return o.v;return!1}function B3(e){var t=e.parentNode;return!(!t||!qv(t))&&t}var Hre=["next","previous","prev",">","<"],xO=[".ph-no-rageclick",".ph-no-capture"],Hw=e=>!e||As(e,"html")||!qv(e),EO=(e,t)=>{if(!he||Hw(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var o=!1,a=[e],n=e;n.parentNode&&!As(n,"body");)if(N3(n.parentNode))a.push(n.parentNode.host),n=n.parentNode.host;else{var i=B3(n);if(!i)break;if(t||YC.indexOf(i.tagName.toLowerCase())>-1)o=!0;else{var l=he.getComputedStyle(i);l&&l.getPropertyValue("cursor")==="pointer"&&(o=!0)}a.push(i),n=i}return{parentIsUsefulElement:o,targetElementList:a}};function Gw(e){for(var t=e;t.parentNode&&!As(t,"body");t=t.parentNode){var o=Xf(t);if(Ct(o,"ph-sensitive")||Ct(o,"ph-no-capture"))return!1}if(Ct(Xf(e),"ph-include"))return!0;var a=e.type||"";if(Co(a))switch(a.toLowerCase()){case"hidden":case"password":return!1}var n=e.name||e.id||"";return!Co(n)||!/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(n.replace(/[^a-zA-Z0-9]/g,""))}function j3(e){return!!(As(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||As(e,"select")||As(e,"textarea")||e.getAttribute("contenteditable")==="true")}var U3="(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})",Gre=new RegExp("^(?:"+U3+")$"),Kre=new RegExp(U3),z3="\\d{3}-?\\d{2}-?\\d{4}",Wre=new RegExp("^("+z3+")$"),Yre=new RegExp("("+z3+")");function gp(e,t){return t===void 0&&(t=!0),!(Pt(e)||Co(e)&&(e=Uv(e),(t?Gre:Kre).test((e||"").replace(/[- ]/g,""))||(t?Wre:Yre).test(e)))}function RO(e){var t=Mp(e);return gp(t=(t+" "+$3(e)).trim())?t:""}function $3(e){var t="";return e&&e.childNodes&&e.childNodes.length&&ho(e.childNodes,(function(o){var a;if(o&&((a=o.tagName)==null?void 0:a.toLowerCase())==="span")try{var n=Mp(o);t=(t+" "+n).trim(),o.childNodes&&o.childNodes.length&&(t=(t+" "+$3(o)).trim())}catch(i){ze.error("[AutoCapture]",i)}})),t}function AO(e){return e.replace(/"|\\"/g,'\\"')}function Zre(e){var t=e.attr__class;return t?Mt(t)?t:WC(t):void 0}class DO{constructor(t){this.disabled=t===!1;var o=No(t)?t:{};this.thresholdPx=o.threshold_px||30,this.timeoutMs=o.timeout_ms||1e3,this.clickCount=o.click_count||3,this.clicks=[]}isRageClick(t,o,a){if(this.disabled)return!1;var n=this.clicks[this.clicks.length-1];if(n&&Math.abs(t-n.x)+Math.abs(o-n.y)<this.thresholdPx&&this.timeoutMs>a-n.timestamp){if(this.clicks.push({x:t,y:o,timestamp:a}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:o,timestamp:a}];return!1}}var D0="$copy_autocapture",OO=So("[AutoCapture]");function O0(e,t){return t.length>e?t.slice(0,e)+"...":t}function Qre(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!qv(t));return t}function Jre(e,t){for(var o,a,{e:n,maskAllElementAttributes:i,maskAllText:l,elementAttributeIgnoreList:c,elementsChainAsString:u}=t,p=[e],g=e;g.parentNode&&!As(g,"body");)N3(g.parentNode)?(p.push(g.parentNode.host),g=g.parentNode.host):(p.push(g.parentNode),g=g.parentNode);var m,f,v=[],b={},S=!1,C=!1;if(ho(p,(x=>{var A=Gw(x);x.tagName.toLowerCase()==="a"&&(S=x.getAttribute("href"),S=A&&S&&gp(S)&&S),Ct(Xf(x),"ph-no-capture")&&(C=!0),v.push((function(O,N,$,F){var z=O.tagName.toLowerCase(),j={tag_name:z};YC.indexOf(z)>-1&&!$&&(j.$el_text=z.toLowerCase()==="a"||z.toLowerCase()==="button"?O0(1024,RO(O)):O0(1024,Mp(O)));var K=Xf(O);K.length>0&&(j.classes=K.filter((function(te){return te!==""}))),ho(O.attributes,(function(te){var le;if((!j3(O)||["name","id","class","aria-label"].indexOf(te.name)!==-1)&&(F==null||!F.includes(te.name))&&!N&&gp(te.value)&&(!Co(le=te.name)||le.substring(0,10)!=="_ngcontent"&&le.substring(0,7)!=="_nghost")){var Q=te.value;te.name==="class"&&(Q=WC(Q).join(" ")),j["attr__"+te.name]=O0(1024,Q)}}));for(var ne=1,H=1,Z=O;Z=Qre(Z);)ne++,Z.tagName===O.tagName&&H++;return j.nth_child=ne,j.nth_of_type=H,j})(x,i,l,c));var D=(function(O){if(!Gw(O))return{};var N={};return ho(O.attributes,(function($){if($.name&&$.name.indexOf("data-ph-capture-attribute")===0){var F=$.name.replace("data-ph-capture-attribute-",""),z=$.value;F&&z&&gp(z)&&(N[F]=z)}})),N})(x);Do(b,D)})),C)return{props:{},explicitNoCapture:C};if(l||(v[0].$el_text=e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?RO(e):Mp(e)),S){var w,_;v[0].attr__href=S;var E=(w=Kf(S))==null?void 0:w.host,k=he==null||(_=he.location)==null?void 0:_.host;E&&k&&E!==k&&(m=S)}return{props:Do({$event_type:n.type,$ce_version:1},u?{}:{$elements:v},{$elements_chain:(f=v,(function(x){return x.map((A=>{var D,O,N="";if(A.tag_name&&(N+=A.tag_name),A.attr_class)for(var $ of(A.attr_class.sort(),A.attr_class))N+="."+$.replace(/"/g,"");var F=Oe({},A.text?{text:A.text}:{},{"nth-child":(D=A.nth_child)!==null&&D!==void 0?D:0,"nth-of-type":(O=A.nth_of_type)!==null&&O!==void 0?O:0},A.href?{href:A.href}:{},A.attr_id?{attr_id:A.attr_id}:{},A.attributes),z={};return nf(F).sort(((j,K)=>{var[ne]=j,[H]=K;return ne.localeCompare(H)})).forEach((j=>{var[K,ne]=j;return z[AO(K.toString())]=AO(ne.toString())})),(N+=":")+nf(z).map((j=>{var[K,ne]=j;return K+'="'+ne+'"'})).join("")})).join(";")})((function(x){return x.map((A=>{var D,O,N={text:(D=A.$el_text)==null?void 0:D.slice(0,400),tag_name:A.tag_name,href:(O=A.attr__href)==null?void 0:O.slice(0,2048),attr_class:Zre(A),attr_id:A.attr__id,nth_child:A.nth_child,nth_of_type:A.nth_of_type,attributes:{}};return nf(A).filter(($=>{var[F]=$;return F.indexOf("attr__")===0})).forEach(($=>{var[F,z]=$;return N.attributes[F]=z})),N}))})(f)))},(o=v[0])!=null&&o.$el_text?{$el_text:(a=v[0])==null?void 0:a.$el_text}:{},m&&n.type==="click"?{$external_click_url:m}:{},b)}}var qu=So("[ExceptionAutocapture]");function IO(e,t,o){try{if(!(t in e))return()=>{};var a=e[t],n=o(a);return Ci(n)&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=n,()=>{e[t]=a}}catch{return()=>{}}}var Xre=So("[TracingHeaders]"),us=So("[Web Vitals]"),MO=9e5,LO="disabled",NO="lazy_loading",Vu="awaiting_config",Bh="missing_config";So("[SessionRecording]"),So("[SessionRecording]");var Kw="[SessionRecording]",ps=So(Kw),eie=So("[Heatmaps]");function FO(e){return No(e)&&"clientX"in e&&"clientY"in e&&Xn(e.clientX)&&Xn(e.clientY)}var BO=So("[Product Tours]"),tie=["$set_once","$set"],ms=So("[SiteApps]"),jO="Error while initializing PostHog app with config id ";function Uc(e,t,o){if(Pt(e))return!1;switch(o){case"exact":return e===t;case"contains":var a=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(a,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class oie{constructor(t){this.vn=new KC,this.fn=(o,a)=>this.pn(o,a)&&this.gn(o,a)&&this.mn(o,a)&&this.yn(o,a),this.pn=(o,a)=>a==null||!a.event||o?.event===a?.event,this._instance=t,this.bn=new Set,this._n=new Set}init(){var t,o;Ve((t=this._instance)==null?void 0:t._addCaptureHook)||(o=this._instance)==null||o._addCaptureHook(((a,n)=>{this.on(a,n)}))}register(t){var o,a;if(!Ve((o=this._instance)==null?void 0:o._addCaptureHook)&&(t.forEach((l=>{var c,u;(c=this._n)==null||c.add(l),(u=l.steps)==null||u.forEach((p=>{var g;(g=this.bn)==null||g.add(p?.event||"")}))})),(a=this._instance)!=null&&a.autocapture)){var n,i=new Set;t.forEach((l=>{var c;(c=l.steps)==null||c.forEach((u=>{u!=null&&u.selector&&i.add(u?.selector)}))})),(n=this._instance)==null||n.autocapture.setElementSelectors(i)}}on(t,o){var a;o!=null&&t.length!=0&&(this.bn.has(t)||this.bn.has(o?.event))&&this._n&&((a=this._n)==null?void 0:a.size)>0&&this._n.forEach((n=>{this.wn(o,n)&&this.vn.emit("actionCaptured",n.name)}))}In(t){this.onAction("actionCaptured",(o=>t(o)))}wn(t,o){if(o?.steps==null)return!1;for(var a of o.steps)if(this.fn(t,a))return!0;return!1}onAction(t,o){return this.vn.on(t,o)}gn(t,o){if(o!=null&&o.url){var a,n=t==null||(a=t.properties)==null?void 0:a.$current_url;if(!n||typeof n!="string"||!Uc(n,o.url,o.url_matching||"contains"))return!1}return!0}mn(t,o){return!!this.Cn(t,o)&&!!this.Sn(t,o)&&!!this.xn(t,o)}Cn(t,o){var a;if(o==null||!o.href)return!0;var n=this.kn(t);if(n.length>0)return n.some((c=>Uc(c.href,o.href,o.href_matching||"exact")));var i,l=(t==null||(a=t.properties)==null?void 0:a.$elements_chain)||"";return!!l&&Uc((i=l.match(/(?::|")href="(.*?)"/))?i[1]:"",o.href,o.href_matching||"exact")}Sn(t,o){var a;if(o==null||!o.text)return!0;var n=this.kn(t);if(n.length>0)return n.some((p=>Uc(p.text,o.text,o.text_matching||"exact")||Uc(p.$el_text,o.text,o.text_matching||"exact")));var i,l,c,u=(t==null||(a=t.properties)==null?void 0:a.$elements_chain)||"";return!!u&&(i=(function(p){for(var g,m=[],f=/(?::|")text="(.*?)"/g;!Pt(g=f.exec(p));)m.includes(g[1])||m.push(g[1]);return m})(u),l=o.text,c=o.text_matching||"exact",i.some((p=>Uc(p,l,c))))}xn(t,o){var a,n;if(o==null||!o.selector)return!0;var i=t==null||(a=t.properties)==null?void 0:a.$element_selectors;if(i!=null&&i.includes(o.selector))return!0;var l=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";if(o.selector_regex&&l)try{return new RegExp(o.selector_regex).test(l)}catch{return!1}return!1}kn(t){var o;return(t==null||(o=t.properties)==null?void 0:o.$elements)==null?[]:t?.properties.$elements}yn(t,o){return o==null||!o.properties||o.properties.length===0||O3(o.properties.reduce(((a,n)=>{var i=Mt(n.value)?n.value.map(String):n.value!=null?[String(n.value)]:[];return a[n.key]={values:i,operator:n.operator||"exact"},a}),{}),t?.properties)}}class aie{constructor(t){this._instance=t,this.Tn=new Map,this.An=new Map,this.En=new Map}Rn(t,o){return!!t&&O3(t.propertyFilters,o?.properties)}Nn(t,o){var a=new Map;return t.forEach((n=>{var i;(i=n.conditions)==null||(i=i[o])==null||(i=i.values)==null||i.forEach((l=>{if(l!=null&&l.name){var c=a.get(l.name)||[];c.push(n.id),a.set(l.name,c)}}))})),a}Mn(t,o,a){var n=(a===Bu.Activation?this.Tn:this.An).get(t),i=[];return this.Fn((l=>{i=l.filter((c=>n?.includes(c.id)))})),i.filter((l=>{var c,u=(c=l.conditions)==null||(c=c[a])==null||(c=c.values)==null?void 0:c.find((p=>p.name===t));return this.Rn(u,o)}))}register(t){var o;Ve((o=this._instance)==null?void 0:o._addCaptureHook)||(this.On(t),this.Pn(t))}Pn(t){var o=t.filter((a=>{var n,i;return((n=a.conditions)==null?void 0:n.actions)&&((i=a.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0}));o.length!==0&&(this.Ln==null&&(this.Ln=new oie(this._instance),this.Ln.init(),this.Ln.In((a=>{this.onAction(a)}))),o.forEach((a=>{var n,i,l,c,u;a.conditions&&(n=a.conditions)!=null&&n.actions&&(i=a.conditions)!=null&&(i=i.actions)!=null&&i.values&&((l=a.conditions)==null||(l=l.actions)==null||(l=l.values)==null?void 0:l.length)>0&&((c=this.Ln)==null||c.register(a.conditions.actions.values),(u=a.conditions)==null||(u=u.actions)==null||(u=u.values)==null||u.forEach((p=>{if(p&&p.name){var g=this.En.get(p.name);g&&g.push(a.id),this.En.set(p.name,g||[a.id])}})))})))}On(t){var o,a=t.filter((i=>{var l,c;return((l=i.conditions)==null?void 0:l.events)&&((c=i.conditions)==null||(c=c.events)==null||(c=c.values)==null?void 0:c.length)>0})),n=t.filter((i=>{var l,c;return((l=i.conditions)==null?void 0:l.cancelEvents)&&((c=i.conditions)==null||(c=c.cancelEvents)==null||(c=c.values)==null?void 0:c.length)>0}));a.length===0&&n.length===0||((o=this._instance)==null||o._addCaptureHook(((i,l)=>{this.onEvent(i,l)})),this.Tn=this.Nn(t,Bu.Activation),this.An=this.Nn(t,Bu.Cancellation))}onEvent(t,o){var a,n=this.le(),i=this.Dn(),l=this.Bn(),c=((a=this._instance)==null||(a=a.persistence)==null?void 0:a.props[i])||[];if(l===t&&o&&c.length>0){var u,p;n.info("event matched, removing item from activated items",{event:t,eventPayload:o,existingActivatedItems:c});var g=(o==null||(u=o.properties)==null?void 0:u.$survey_id)||(o==null||(p=o.properties)==null?void 0:p.$product_tour_id);if(g){var m=c.indexOf(g);0>m||(c.splice(m,1),this.jn(c))}}else{if(this.An.has(t)){var f=this.Mn(t,o,Bu.Cancellation);f.length>0&&(n.info("cancel event matched, cancelling items",{event:t,itemsToCancel:f.map((b=>b.id))}),f.forEach((b=>{var S=c.indexOf(b.id);0>S||c.splice(S,1),this.$n(b.id)})),this.jn(c))}if(this.Tn.has(t)){n.info("event name matched",{event:t,eventPayload:o,items:this.Tn.get(t)});var v=this.Mn(t,o,Bu.Activation);this.jn(c.concat(v.map((b=>b.id))||[]))}}}onAction(t){var o,a=this.Dn(),n=((o=this._instance)==null||(o=o.persistence)==null?void 0:o.props[a])||[];this.En.has(t)&&this.jn(n.concat(this.En.get(t)||[]))}jn(t){var o=this.le(),a=[...new Set(t)].filter((n=>!this.qn(n)));o.info("updating activated items",{activatedItems:a}),this.Zn(a)}getActivatedIds(){var t,o=this.Dn();return((t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[o])||[]}getEventToItemsMap(){return this.Tn}Vn(){return this.Ln}}class nie extends aie{constructor(t){super(t)}Dn(){return Rw}Bn(){return ip.SHOWN}Fn(t){var o;(o=this._instance)==null||o.getSurveys(t)}$n(t){var o;(o=this._instance)==null||o.cancelPendingSurvey(t)}le(){return eo}Zn(t){var o;(o=this._instance)==null||(o=o.persistence)==null||o.register({[Rw]:t})}qn(){return!1}getSurveys(){return this.getActivatedIds()}getEventToSurveys(){return this.getEventToItemsMap()}}var I0="SDK is not enabled or survey functionality is not yet loaded",UO="Disabled. Not loading surveys.",rie=he!=null&&he.location?Yf(he.location.hash,"__posthog")||Yf(location.hash,"state"):null,zO="_postHogToolbarParams",$O=So("[Toolbar]"),qa=So("[FeatureFlags]"),pl=So("[FeatureFlags]",{debugEnabled:!0}),M0=`" failed. Feature flags didn't load in time.`,qO=e=>{for(var t={},o=0;e.length>o;o++)t[e[o]]=!0;return t},VO=e=>{var t={};for(var[o,a]of nf(e||{}))a&&(t[o]=a);return t},wi=So("[Error tracking]"),HO="Refusing to render web experiment since the viewer is a likely bot",iie={icontains:(e,t)=>!!he&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!he&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!he&&Jf(t.href,e),not_regex:(e,t)=>!!he&&!Jf(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class Oa{get Bt(){return this._instance.config}constructor(t){var o=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(a){a===void 0&&(a=!1),o.getWebExperiments((n=>{Oa.Hn("retrieved web experiments from the server"),o.zn=new Map,n.forEach((i=>{if(i.feature_flag_key){var l;o.zn&&(Oa.Hn("setting flag key ",i.feature_flag_key," to web experiment ",i),(l=o.zn)==null||l.set(i.feature_flag_key,i));var c=o._instance.getFeatureFlag(i.feature_flag_key);Co(c)&&i.variants[c]&&o.Un(i.name,c,i.variants[c].transforms)}else if(i.variants)for(var u in i.variants){var p=i.variants[u];Oa.Yn(p)&&o.Un(i.name,u,p.transforms)}}))}),a)},this._instance=t,this._instance.onFeatureFlags((a=>{this.onFeatureFlags(a)}))}initialize(){}onFeatureFlags(t){if(this._is_bot())Oa.Hn(HO);else if(!this.Bt.disable_web_experiments){if(Pt(this.zn))return this.zn=new Map,this.loadIfEnabled(),void this.previewWebExperiment();Oa.Hn("applying feature flags",t),t.forEach((o=>{var a;if(this.zn&&(a=this.zn)!=null&&a.has(o)){var n,i=this._instance.getFeatureFlag(o),l=(n=this.zn)==null?void 0:n.get(o);i&&l!=null&&l.variants[i]&&this.Un(l.name,i,l.variants[i].transforms)}}))}}previewWebExperiment(){var t=Oa.getWindowLocation();if(t!=null&&t.search){var o=Wf(t?.search,"__experiment_id"),a=Wf(t?.search,"__experiment_variant");o&&a&&(Oa.Hn("previewing web experiments "+o+" && "+a),this.getWebExperiments((n=>{this.Gn(parseInt(o),a,n)}),!1,!0))}}loadIfEnabled(){this.Bt.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,o,a){if(this.Bt.disable_web_experiments&&!a)return t([]);var n=this._instance.get_property("$web_experiments");if(n&&!o)return t(n);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this.Bt.token),method:"GET",callback:i=>t(i.statusCode===200&&i.json&&i.json.experiments||[])})}Gn(t,o,a){var n=a.filter((i=>i.id===t));n&&n.length>0&&(Oa.Hn("Previewing web experiment ["+n[0].name+"] with variant ["+o+"]"),this.Un(n[0].name,o,n[0].variants[o].transforms))}static Yn(t){return!Pt(t.conditions)&&Oa.Wn(t)&&Oa.Xn(t)}static Wn(t){var o;if(Pt(t.conditions)||Pt((o=t.conditions)==null?void 0:o.url))return!0;var a,n,i,l=Oa.getWindowLocation();return!!l&&((a=t.conditions)==null||!a.url||iie[(n=(i=t.conditions)==null?void 0:i.urlMatchType)!==null&&n!==void 0?n:"icontains"](t.conditions.url,l))}static getWindowLocation(){return he?.location}static Xn(t){var o;if(Pt(t.conditions)||Pt((o=t.conditions)==null?void 0:o.utm))return!0;var a=f3();if(a.utm_source){var n,i,l,c,u,p,g,m,f=(n=t.conditions)==null||(n=n.utm)==null||!n.utm_campaign||((i=t.conditions)==null||(i=i.utm)==null?void 0:i.utm_campaign)==a.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)==a.utm_source,b=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_medium||((p=t.conditions)==null||(p=p.utm)==null?void 0:p.utm_medium)==a.utm_medium,S=(g=t.conditions)==null||(g=g.utm)==null||!g.utm_term||((m=t.conditions)==null||(m=m.utm)==null?void 0:m.utm_term)==a.utm_term;return f&&b&&S&&v}return!1}static Hn(t){for(var o=arguments.length,a=new Array(o>1?o-1:0),n=1;o>n;n++)a[n-1]=arguments[n];ze.info("[WebExperiments] "+t,a)}Un(t,o,a){this._is_bot()?Oa.Hn(HO):o!=="control"?a.forEach((n=>{if(n.selector){var i;Oa.Hn("applying transform of variant "+o+" for experiment "+t+" ",n);var l=(i=document)==null?void 0:i.querySelectorAll(n.selector);l?.forEach((c=>{var u=c;n.html&&(u.innerHTML=n.html),n.css&&u.setAttribute("style",n.css)}))}})):Oa.Hn("Control variants leave the page unmodified.")}_is_bot(){return xn&&this._instance?A3(xn,this.Bt.custom_blocked_useragents):void 0}}var Vn=So("[Conversations]"),ml="Conversations not available yet.",Vv={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,qa.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||(qa.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((o=>{var a=o&&typeof o=="string"&&o.trim().length>0;return a||qa.error("Invalid evaluation context found:",o,"Expected non-empty string"),a})):[]}cs(){return this.hs().length>0}initialize(){var e,t,{config:o}=this._instance,a=(e=(t=o.bootstrap)==null?void 0:t.featureFlags)!==null&&e!==void 0?e:{};if(Object.keys(a).length){var n,i,l=(n=(i=o.bootstrap)==null?void 0:i.featureFlagPayloads)!==null&&n!==void 0?n:{},c=Object.keys(a).filter((p=>!!a[p])).reduce(((p,g)=>(p[g]=a[g]||!1,p)),{}),u=Object.keys(l).filter((p=>c[p])).reduce(((p,g)=>(l[g]&&(p[g]=l[g]),p)),{});this.receivedFeatureFlags({featureFlags:c,featureFlagPayloads:u})}}updateFlags(e,t,o){var a=o!=null&&o.merge?this.getFlagVariants():{},n=o!=null&&o.merge?this.getFlagPayloads():{},i=Oe({},a,e),l=Oe({},n,t),c={};for(var[u,p]of Object.entries(i)){var g=typeof p=="string";c[u]={key:u,enabled:!!g||!!p,variant:g?p:void 0,reason:void 0,metadata:Ve(l?.[u])?void 0:{id:0,version:void 0,description:void 0,payload:l[u]}}}this.receivedFeatureFlags({flags:c})}get hasLoadedFlags(){return this.Kn}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var e=this.os(Pw),t=this.os(_i),o=this.os(Kc);if(!o&&!t)return e||{};var a=Do({},e||{}),n=[...new Set([...Object.keys(o||{}),...Object.keys(t||{})])];for(var i of n){var l,c,u=a[i],p=t?.[i],g=Ve(p)?(l=u?.enabled)!==null&&l!==void 0&&l:!!p,m=Ve(p)?u.variant:typeof p=="string"?p:void 0,f=o?.[i],v=Oe({},u,{enabled:g,variant:g?m??u?.variant:void 0});g!==u?.enabled&&(v.original_enabled=u?.enabled),m!==u?.variant&&(v.original_variant=u?.variant),f&&(v.metadata=Oe({},u?.metadata,{payload:f,original_payload:u==null||(c=u.metadata)==null?void 0:c.payload})),a[i]=v}return this.Jn||(qa.warn(" Overriding feature flag details!",{flagDetails:e,overriddenPayloads:o,finalDetails:a}),this.Jn=!0),a}getFlagVariants(){var e=this.os(ed),t=this.os(_i);if(!t)return e||{};for(var o=Do({},e),a=Object.keys(t),n=0;a.length>n;n++)o[a[n]]=t[a[n]];return this.Jn||(qa.warn(" Overriding feature flags!",{enabledFlags:e,overriddenFlags:t,finalFlags:o}),this.Jn=!0),o}getFlagPayloads(){var e=this.os(kw),t=this.os(Kc);if(!t)return e||{};for(var o=Do({},e||{}),a=Object.keys(t),n=0;a.length>n;n++)o[a[n]]=t[a[n]];return this.Jn||(qa.warn(" Overriding feature flag payloads!",{flagPayloads:e,overriddenPayloads:t,finalPayloads:o}),this.Jn=!0),o}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 o=this.Bt.token,a=this.os(jf),n={token:o,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:Oe({},((t=this.ni)==null?void 0:t.get_initial_props())||{},this.os(rp)||{}),group_properties:this.os(vl),timezone:w3()};Mi(a)||Ve(a)||(n.$device_id=a),(e!=null&&e.disableFlags||this.Bt.advanced_disable_feature_flags)&&(n.disable_flags=!0),this.cs()&&(n.evaluation_contexts=this.hs());var i=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:i,data:n,compression:this.Bt.disable_compression?void 0:Fr.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback:l=>{var c,u,p,g=!0;if(l.statusCode===200&&(this.ts||(this.$anon_distinct_id=void 0),g=!1),this.Qn=!1,!n.disable_flags||this.ts){this.rs=!g;var m=[];l.error?l.error instanceof Error?m.push(l.error.name==="AbortError"?"timeout":"connection_error"):m.push("unknown_error"):l.statusCode!==200&&m.push("api_error_"+l.statusCode),(c=l.json)!=null&&c.errorsWhileComputingFlags&&m.push("errors_while_computing_flags");var f,v=!((u=l.json)==null||(u=u.quotaLimited)==null||!u.includes("feature_flags"));v&&m.push("quota_limited"),(p=this.ni)==null||p.register({[Dw]:m}),v?qa.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."):(n.disable_flags||this.receivedFeatureFlags((f=l.json)!==null&&f!==void 0?f:{},g,{partialResponse:!!this.Bt.advanced_only_evaluate_survey_feature_flags}),this.ts&&(this.ts=!1,this.vs()))}}})}}getFeatureFlag(e,t){var o;if(t===void 0&&(t={}),!t.fresh||this.rs)if(this.Kn||this.getFlags()&&this.getFlags().length>0){if(!this.us()){var a=this.getFeatureFlagResult(e,t);return(o=a?.variant)!==null&&o!==void 0?o:a?.enabled}}else qa.warn('getFeatureFlag for key "'+e+M0)}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 o=this.getFlagVariants(),a=e in o,n=o[e],i=this.getFlagPayloads()[e],l=String(n),c=this.os(xw)||void 0,u=this.os(zf)||void 0,p=this.os(up)||{};if(this.Bt.advanced_feature_flags_dedup_per_session){var g,m=this._instance.get_session_id(),f=this.os(Aw);m&&m!==f&&(p={},(g=this.ni)==null||g.register({[up]:p,[Aw]:m}))}if((t.send_event||!("send_event"in t))&&(!(e in p)||!p[e].includes(l))){var v,b,S,C,w,_,E,k,x,A;Mt(p[e])?p[e].push(l):p[e]=[l],(v=this.ni)==null||v.register({[up]:p});var D=this.getFeatureFlagDetails(e),O=[...(b=this.os(Dw))!==null&&b!==void 0?b:[]];Ve(n)&&O.push("flag_missing");var N={$feature_flag:e,$feature_flag_response:n,$feature_flag_payload:i||null,$feature_flag_request_id:c,$feature_flag_evaluated_at:u,$feature_flag_bootstrapped_response:((S=this.Bt.bootstrap)==null||(S=S.featureFlags)==null?void 0:S[e])||null,$feature_flag_bootstrapped_payload:((C=this.Bt.bootstrap)==null||(C=C.featureFlagPayloads)==null?void 0:C[e])||null,$used_bootstrap_value:!this.rs};Ve(D==null||(w=D.metadata)==null?void 0:w.version)||(N.$feature_flag_version=D.metadata.version);var $,F=(_=D==null||(E=D.reason)==null?void 0:E.description)!==null&&_!==void 0?_:D==null||(k=D.reason)==null?void 0:k.code;F&&(N.$feature_flag_reason=F),D!=null&&(x=D.metadata)!=null&&x.id&&(N.$feature_flag_id=D.metadata.id),Ve(D?.original_variant)&&Ve(D?.original_enabled)||(N.$feature_flag_original_response=Ve(D.original_variant)?D.original_enabled:D.original_variant),D!=null&&(A=D.metadata)!=null&&A.original_payload&&(N.$feature_flag_original_payload=D==null||($=D.metadata)==null?void 0:$.original_payload),O.length&&(N.$feature_flag_error=O.join(",")),this._instance.capture("$feature_flag_called",N)}if(a){var z=i;if(!Ve(i))try{z=JSON.parse(i)}catch{}return{key:e,enabled:!!n,variant:typeof n=="string"?n:void 0,payload:z}}}}else qa.warn('getFeatureFlagResult for key "'+e+M0)}getRemoteConfigPayload(e,t){var o=this.Bt.token,a={distinct_id:this._instance.get_distinct_id(),token:o};this.cs()&&(a.evaluation_contexts=this.hs()),this._instance._send_request({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2"),data:a,compression:this.Bt.disable_compression?void 0:Fr.Base64,timeout:this.Bt.feature_flag_request_timeout_ms,callback(n){var i,l=(i=n.json)==null?void 0:i.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 o=this.getFeatureFlag(e,t);return Ve(o)?void 0:!!o}qa.warn('isFeatureEnabled for key "'+e+M0)}}addFeatureFlagsHandler(e){this.featureFlagEventHandlers.push(e)}removeFeatureFlagsHandler(e){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((t=>t!==e))}receivedFeatureFlags(e,t,o){if(this.ni){this.Kn=!0;var a=this.getFlagVariants(),n=this.getFlagPayloads(),i=this.getFlagsWithDetails();(function(l,c,u,p,g,m){u===void 0&&(u={}),p===void 0&&(p={}),g===void 0&&(g={});var f=(O=>{var N=O.flags;return N?(O.featureFlags=Object.fromEntries(Object.keys(N).map(($=>{var F;return[$,(F=N[$].variant)!==null&&F!==void 0?F:N[$].enabled]}))),O.featureFlagPayloads=Object.fromEntries(Object.keys(N).filter(($=>N[$].enabled)).filter(($=>{var F;return(F=N[$].metadata)==null?void 0:F.payload})).map(($=>{var F;return[$,(F=N[$].metadata)==null?void 0:F.payload]})))):qa.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),O})(l),v=f.flags,b=f.featureFlags,S=f.featureFlagPayloads;if(b){var C=l.requestId,w=l.evaluatedAt;if(Mt(b)){qa.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var _={};if(b)for(var E=0;b.length>E;E++)_[b[E]]=!0;c&&c.register({[of]:b,[ed]:_})}else{var k=b,x=S,A=v;if(m!=null&&m.partialResponse)k=Oe({},u,k),x=Oe({},p,x),A=Oe({},g,A);else if(l.errorsWhileComputingFlags)if(v){var D=new Set(Object.keys(v).filter((O=>{var N;return!((N=v[O])!=null&&N.failed)})));k=Oe({},u,Object.fromEntries(Object.entries(k).filter((O=>{var[N]=O;return D.has(N)})))),x=Oe({},p,Object.fromEntries(Object.entries(x||{}).filter((O=>{var[N]=O;return D.has(N)})))),A=Oe({},g,Object.fromEntries(Object.entries(A||{}).filter((O=>{var[N]=O;return D.has(N)}))))}else k=Oe({},u,k),x=Oe({},p,x),A=Oe({},g,A);c&&c.register(Oe({[of]:Object.keys(VO(k)),[ed]:k||{},[kw]:x||{},[Pw]:A||{}},C?{[xw]:C}:{},w?{[zf]:w}:{}))}}})(e,this.ni,a,n,i,o),t||(this.ss=!1),this.ps(t)}}override(e,t){t===void 0&&(t=!1),qa.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:e,suppressWarning:t})}overrideFeatureFlags(e){if(!this._instance.__loaded||!this.ni)return qa.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(e===!1)return this.ni.unregister(_i),this.ni.unregister(Kc),this.ps(),pl.info("All overrides cleared");if(Mt(e)){var t=qO(e);return this.ni.register({[_i]:t}),this.ps(),pl.info("Flag overrides set",{flags:e})}if(e&&typeof e=="object"&&("flags"in e||"payloads"in e)){var o,a=e;if(this.Jn=!!((o=a.suppressWarning)!==null&&o!==void 0&&o),"flags"in a){if(a.flags===!1)this.ni.unregister(_i),pl.info("Flag overrides cleared");else if(a.flags){if(Mt(a.flags)){var n=qO(a.flags);this.ni.register({[_i]:n})}else this.ni.register({[_i]:a.flags});pl.info("Flag overrides set",{flags:a.flags})}}return"payloads"in a&&(a.payloads===!1?(this.ni.unregister(Kc),pl.info("Payload overrides cleared")):a.payloads&&(this.ni.register({[Kc]:a.payloads}),pl.info("Payload overrides set",{payloads:a.payloads}))),void this.ps()}if(e&&typeof e=="object")return this.ni.register({[_i]:e}),this.ps(),pl.info("Flag overrides set",{flags:e});qa.warn("Invalid overrideOptions provided to overrideFeatureFlags",{overrideOptions:e})}onFeatureFlags(e){if(this.addFeatureFlagsHandler(e),this.Kn){var{flags:t,flagVariants:o}=this.gs();e(t,o)}return()=>this.removeFeatureFlagsHandler(e)}updateEarlyAccessFeatureEnrollment(e,t,o){var a,n=(this.os(np)||[]).find((u=>u.flagKey===e)),i={["$feature_enrollment/"+e]:t},l={$feature_flag:e,$feature_enrollment:t,$set:i};n&&(l.$early_access_feature_name=n.name),o&&(l.$feature_enrollment_stage=o),this._instance.capture("$feature_enrollment_update",l),this.setPersonPropertiesForFlags(i,!1);var c=Oe({},this.getFlagVariants(),{[e]:t});(a=this.ni)==null||a.register({[of]:Object.keys(VO(c)),[ed]:c}),this.ps()}getEarlyAccessFeatures(e,t,o){t===void 0&&(t=!1);var a=this.os(np),n=o?"&"+o.map((i=>"stage="+i)).join("&"):"";if(a&&!t)return e(a);this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this.Bt.token+n),method:"GET",callback:i=>{var l,c;if(i.json){var u=i.json.earlyAccessFeatures;return(l=this.ni)==null||l.unregister(np),(c=this.ni)==null||c.register({[np]:u}),e(u)}}})}gs(){var e=this.getFlags(),t=this.getFlagVariants();return{flags:e.filter((o=>t[o])),flagVariants:Object.keys(t).filter((o=>t[o])).reduce(((o,a)=>(o[a]=t[a],o)),{})}}ps(e){var{flags:t,flagVariants:o}=this.gs();this.featureFlagEventHandlers.forEach((a=>a(t,o,{errorsLoading:e})))}setPersonPropertiesForFlags(e,t){t===void 0&&(t=!0);var o=this.os(rp)||{},a=e?.$set||(e!=null&&e.$set_once?{}:e),n=e?.$set_once,i={};if(n)for(var l in n)({}).hasOwnProperty.call(n,l)&&(l in o||(i[l]=n[l]));this._instance.register({[rp]:Oe({},o,i,a)}),t&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(rp)}setGroupPropertiesForFlags(e,t){t===void 0&&(t=!0);var o=this.os(vl)||{};Object.keys(o).length!==0&&Object.keys(o).forEach((a=>{o[a]=Oe({},o[a],e[a]),delete e[a]})),this._instance.register({[vl]:Oe({},o,e)}),t&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(e){if(e){var t=this.os(vl)||{};this._instance.register({[vl]:Oe({},t,{[e]:{}})})}else this._instance.unregister(vl)}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}}},sie={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===Vu||this.bs===Bh?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=LO,this._s=void 0,this._instance=e,!this._instance.sessionManager)throw ps.error("started without valid sessionManager"),new Error(Kw+" started without valid sessionManager. This is a bug.");if(this.Bt.cookieless_mode===Pi)throw new Error(Kw+' cannot be used with cookieless_mode="always"')}initialize(){this.startIfEnabledOrStop()}get ws(){var e,t=!((e=this._instance.get_property(ap))==null||!e.enabled),o=!this.Bt.disable_session_recording,a=this.Bt.disable_session_recording||this._instance.consent.isOptedOut();return he&&t&&o&&!a}startIfEnabledOrStop(e){var t;if(!this.ws||(t=this.ys)==null||!t.isStarted){var o=!Ve(Object.assign)&&!Ve(Array.from);this.ws&&o?(this.Is(e),ps.info("starting")):(this.bs=LO,this.stopRecording())}}Is(e){var t,o,a;this.ws&&(this.bs!==Vu&&this.bs!==Bh&&(this.bs=NO),et!=null&&(t=et.__PosthogExtensions__)!=null&&(t=t.rrweb)!=null&&t.record&&(o=et.__PosthogExtensions__)!=null&&o.initSessionRecording?this.Cs(e):(a=et.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.Ss,(n=>{if(n)return ps.error("could not load recorder",n);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($C)}Ts(e,t){if(Pt(e))return null;var o,a=Xn(e)?e:parseFloat(e);return typeof(o=a)!="number"||!Number.isFinite(o)||0>o||o>1?(ps.warn(t+" must be between 0 and 1. Ignoring invalid value:",e),null):a}As(e){if(this.ni){var t,o,a=this.ni,n=()=>{var i,l=e.sessionRecording===!1?void 0:e.sessionRecording,c=this.Ts((i=this.Bt.session_recording)==null?void 0:i.sampleRate,"session_recording.sampleRate"),u=this.Ts(l?.sampleRate,"remote config sampleRate"),p=c??u;Pt(p)&&this.ks();var g=l?.minimumDurationMilliseconds;a.register({[ap]:Oe({cache_timestamp:Date.now(),enabled:!!l},l,{networkPayloadCapture:Oe({capturePerformance:e.capturePerformance},l?.networkPayloadCapture),canvasRecording:{enabled:l?.recordCanvas,fps:l?.canvasFps,quality:l?.canvasQuality},sampleRate:p,minimumDurationMilliseconds:Ve(g)?null:g,endpoint:l?.endpoint,triggerMatchType:l?.triggerMatchType,masking:l?.masking,urlTriggers:l?.urlTriggers,version:l?.version,triggerGroups:l?.triggerGroups})})};n(),(t=this._s)==null||t.call(this),this._s=(o=this._instance.sessionManager)==null?void 0:o.onSessionId(n)}}onRemoteConfig(e){return"sessionRecording"in e?e.sessionRecording===!1?(this.As(e),void this.xs()):(this.As(e),void this.startIfEnabledOrStop()):(this.bs===Vu&&(this.bs=Bh,ps.warn("config refresh failed, recording will not start until page reload")),void this.startIfEnabledOrStop())}log(e,t){var o;t===void 0&&(t="log"),(o=this.ys)!=null&&o.log?this.ys.log(e,t):ps.warn("log called before recorder was ready")}get Ss(){var e,t,o=(e=this._instance)==null||(e=e.persistence)==null?void 0:e.get_property(ap);return(o==null||(t=o.scriptConfig)==null?void 0:t.script)||"lazy-recorder"}Es(){var e,t=this._instance.get_property(ap);if(!t)return!1;var o=(e=(typeof t=="object"?t:JSON.parse(t)).cache_timestamp)!==null&&e!==void 0?e:Date.now();return 36e5>=Date.now()-o}Cs(e){var t,o;if((t=et.__PosthogExtensions__)==null||!t.initSessionRecording)return ps.warn("Called on script loaded before session recording is available. This can be caused by adblockers."),void this._instance.register_for_session({[u3]:!0});if(this.ys||(this.ys=(o=et.__PosthogExtensions__)==null?void 0:o.initSessionRecording(this._instance),this.ys._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),!this.Es())return this.bs===Bh||this.bs===Vu?void 0:(this.bs=Vu,ps.info("persisted remote config is stale, requesting fresh config before starting"),void new _3(this._instance).load());this.bs=NO,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({[r3]:!0}),(e=this.ys)==null||e.overrideLinkedFlag()}overrideSampling(){var e,t;this.ys||(t=this.ni)==null||t.register({[n3]:!0}),(e=this.ys)==null||e.overrideSampling()}overrideTrigger(e){var t,o;this.ys||(o=this.ni)==null||o.register({[e==="url"?i3:s3]:!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 o;return!((o=this.ys)==null||!o.tryAddCustomEvent(e,t))}}},lie={autocapture:class{constructor(e){this.Rs=!1,this.Ns=null,this.Ms=!1,this.instance=e,this.rageclicks=new DO(e.config.rageclick),this.Fs=null}initialize(){this.startIfEnabled()}get Bt(){var e,t,o=No(this.instance.config.autocapture)?this.instance.config.autocapture:{};return o.url_allowlist=(e=o.url_allowlist)==null?void 0:e.map((a=>new RegExp(a))),o.url_ignorelist=(t=o.url_ignorelist)==null?void 0:t.map((a=>new RegExp(a))),o}Os(){if(this.isBrowserSupported()){if(he&&Be){var e=o=>{o=o||he?.event;try{this.Ps(o)}catch(a){OO.error("Failed to capture event",a)}};if(Yo(Be,"submit",e,{capture:!0}),Yo(Be,"change",e,{capture:!0}),Yo(Be,"click",e,{capture:!0}),this.Bt.capture_copied_text){var t=o=>{this.Ps(o=o||he?.event,D0)};Yo(Be,"copy",t,{capture:!0}),Yo(Be,"cut",t,{capture:!0})}}}else OO.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({[vw]:!!e.autocapture_opt_out}),this.Ns=!!e.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(e){this.Fs=e}getElementSelectors(e){var t,o=[];return(t=this.Fs)==null||t.forEach((a=>{var n=Be?.querySelectorAll(a);n?.forEach((i=>{e===i&&o.push(a)}))})),o}get isEnabled(){var e,t,o=(e=this.instance.persistence)==null?void 0:e.props[vw];if(Mi(this.Ns)&&!$r(o)&&!this.instance.Fr())return!1;var a=(t=this.Ns)!==null&&t!==void 0?t:!!o;return!!this.instance.config.autocapture&&!a}Ps(e,t){if(t===void 0&&(t="$autocapture"),this.isEnabled){var o,a=PO(e);L3(a)&&(a=a.parentNode||null),t==="$autocapture"&&e.type==="click"&&e instanceof MouseEvent&&this.instance.config.rageclick&&(o=this.rageclicks)!=null&&o.isRageClick(e.clientX,e.clientY,e.timeStamp||new Date().getTime())&&(function(m,f){if(!he||Hw(m))return!1;var v,b,S;if($r(f)?(v=!!f&&xO,b=void 0):(v=(S=f?.css_selector_ignorelist)!==null&&S!==void 0?S:xO,b=f?.content_ignorelist),v===!1)return!1;var{targetElementList:C}=EO(m,!1);return!(function(w,_){if(w===!1||Ve(w))return!1;var E;if(w===!0)E=Hre;else{if(!Mt(w))return!1;if(w.length>10)return ze.error("[PostHog] content_ignorelist array cannot exceed 10 items. Use css_selector_ignorelist for more complex matching."),!1;E=w.map((k=>k.toLowerCase()))}return _.some((k=>{var{safeText:x,ariaLabel:A}=k;return E.some((D=>x.includes(D)||A.includes(D)))}))})(b,C.map((w=>{var _;return{safeText:Mp(w).toLowerCase(),ariaLabel:((_=w.getAttribute("aria-label"))==null?void 0:_.toLowerCase().trim())||""}})))&&!kO(C,v)})(a,this.instance.config.rageclick)&&this.Ps(e,"$rageclick");var n=t===D0;if(a&&(function(m,f,v,b,S){var C,w,_,E;if(v===void 0&&(v=void 0),!he||Hw(m)||(C=v)!=null&&C.url_allowlist&&!CO(v.url_allowlist)||(w=v)!=null&&w.url_ignorelist&&CO(v.url_ignorelist))return!1;if((_=v)!=null&&_.dom_event_allowlist){var k=v.dom_event_allowlist;if(k&&!k.some((N=>f.type===N)))return!1}var{parentIsUsefulElement:x,targetElementList:A}=EO(m,b);if(!(function(N,$){var F=$?.element_allowlist;if(Ve(F))return!0;var z,j=function(ne){if(F.some((H=>ne.tagName.toLowerCase()===H)))return{v:!0}};for(var K of N)if(z=j(K))return z.v;return!1})(A,v)||!kO(A,(E=v)==null?void 0:E.css_selector_allowlist))return!1;var D=he.getComputedStyle(m);if(D&&D.getPropertyValue("cursor")==="pointer"&&f.type==="click")return!0;var O=m.tagName.toLowerCase();switch(O){case"html":return!1;case"form":return(S||["submit"]).indexOf(f.type)>=0;case"input":case"select":case"textarea":return(S||["change","click"]).indexOf(f.type)>=0;default:return x?(S||["click"]).indexOf(f.type)>=0:(S||["click"]).indexOf(f.type)>=0&&(YC.indexOf(O)>-1||m.getAttribute("contenteditable")==="true")}})(a,e,this.Bt,n,n?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:l}=Jre(a,{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(a);if(c&&c.length>0&&(i.$element_selectors=c),t===D0){var u,p=F3(he==null||(u=he.getSelection())==null?void 0:u.toString()),g=e.type||"clipboard";if(!p)return!1;i.$selected_content=p,i.$copy_type=g}return this.instance.capture(t,i),!0}}}isBrowserSupported(){return Ci(Be?.querySelectorAll)}},historyAutocapture:class{constructor(e){var t;this._instance=e,this.Ls=(he==null||(t=he.location)==null?void 0:t.pathname)||""}initialize(){this.startIfEnabled()}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(ze.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.Ds&&this.Ds(),this.Ds=void 0,ze.info("History API monitoring stopped")}monitorHistoryChanges(){var e,t;if(he&&he.history){var o=this;(e=he.history.pushState)!=null&&e.__posthog_wrapped__||IO(he.history,"pushState",(a=>function(n,i,l){a.call(this,n,i,l),o.Bs("pushState")})),(t=he.history.replaceState)!=null&&t.__posthog_wrapped__||IO(he.history,"replaceState",(a=>function(n,i,l){a.call(this,n,i,l),o.Bs("replaceState")})),this.js()}}Bs(e){try{var t,o=he==null||(t=he.location)==null?void 0:t.pathname;if(!o)return;o!==this.Ls&&this.isEnabled&&this._instance.capture(Wc,{navigation_type:e}),this.Ls=o}catch(a){ze.error("Error capturing "+e+" pageview",a)}}js(){if(!this.Ds){var e=()=>{this.Bs("popstate")};Yo(he,"popstate",e),this.Ds=()=>{he&&he.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[bw]),this.rageclicks=new DO(e.config.rageclick)}initialize(){this.startIfEnabled()}get flushIntervalMilliseconds(){var e=5e3;return No(this.Bt.capture_heatmaps)&&this.Bt.capture_heatmaps.flush_interval_milliseconds&&(e=this.Bt.capture_heatmaps.flush_interval_milliseconds),e}get isEnabled(){return Pt(this.Bt.capture_heatmaps)?Pt(this.Bt.enable_heatmaps)?this.$s:this.Bt.enable_heatmaps:this.Bt.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.Rs)return;eie.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({[bw]: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=Be?.visibilityState==="visible"?setInterval(this.Yr.bind(this),this.flushIntervalMilliseconds):null}Zs(){he&&Be&&(this.zs=this.Yr.bind(this),Yo(he,Hf,this.zs),this.Us=e=>this.Tt(e||he?.event),Yo(Be,"click",this.Us,{capture:!0}),this.Ys=e=>this.Gs(e||he?.event),Yo(Be,"mousemove",this.Ys,{capture:!0}),this.Ws=new nO(this.instance,mre,this.Hs.bind(this)),this.Ws.startIfEnabledOrStop(),this.Xs=this.Ft.bind(this),Yo(Be,Vf,this.Xs),this.Rs=!0)}Vs(){var e;he&&Be&&(this.zs&&he.removeEventListener(Hf,this.zs),this.Us&&Be.removeEventListener("click",this.Us,{capture:!0}),this.Ys&&Be.removeEventListener("mousemove",this.Ys,{capture:!0}),this.Xs&&Be.removeEventListener(Vf,this.Xs),clearTimeout(this.Js),(e=this.Ws)==null||e.stop(),this.Rs=!1)}Ks(e,t){var o=this.instance.scrollManager.scrollY(),a=this.instance.scrollManager.scrollX(),n=this.instance.scrollManager.scrollElement(),i=(function(l,c,u){for(var p=l;p&&qv(p)&&!As(p,"body");){if(p===u)return!1;if(Ct(c,he?.getComputedStyle(p).position))return!0;p=B3(p)}return!1})(PO(e),["fixed","sticky"],n);return{x:e.clientX+(i?0:a),y:e.clientY+(i?0:o),target_fixed:i,type:t}}Tt(e,t){var o;if(t===void 0&&(t="click"),!_O(e.target)&&FO(e)){var a=this.Ks(e,t);(o=this.rageclicks)!=null&&o.isRageClick(e.clientX,e.clientY,new Date().getTime())&&this.Qs(Oe({},a,{type:"rageclick"})),this.Qs(a)}}Gs(e){!_O(e.target)&&FO(e)&&(clearTimeout(this.Js),this.Js=setTimeout((()=>{this.Qs(this.Ks(e,"mousemove"))}),500))}Qs(e){if(he){var t=he.location.href,o=this.Bt.custom_personal_data_properties,a=this.Bt.mask_personal_data_properties?[...Cd,...o||[]]:[],n=Op(t,a,Ip);this.T=this.T||{},this.T[n]||(this.T[n]=[]),this.T[n].push(e)}}Yr(){this.T&&!Xc(this.T)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}},deadClicksAutocapture:nO,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(((o,a)=>Oe({},o,{["$web_vitals_"+a.name+"_event"]:Oe({},a),["$web_vitals_"+a.name+"_value"]:a.value})),{})),this.T={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.ht=o=>{var a,n=(a=this._instance.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0);if(Ve(n))us.error("Could not read session ID. Dropping metrics!");else{this.T=this.T||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.io();Ve(i)||(Pt(o?.name)||Pt(o?.value)?us.error("Invalid metric received",o):!this.no||this.no>o.value?(this.T.url!==i&&(this.eo(),this.ro=setTimeout(this.eo,this.flushToCaptureTimeoutMs)),Ve(this.T.url)&&(this.T.url=i),this.T.firstMetricTimestamp=Ve(this.T.firstMetricTimestamp)?Date.now():this.T.firstMetricTimestamp,o.attribution&&o.attribution.interactionTargetElement&&(o.attribution.interactionTargetElement=void 0),this.T.metrics.push(Oe({},o,{$current_url:i,$session_id:n.sessionId,$window_id:n.windowId,timestamp:Date.now()})),this.T.metrics.length===this.allowedMetrics.length&&this.eo()):us.error("Ignoring metric with value >= "+this.no,o))}},this.so=()=>{if(!this.Rs){var o,a,n,i,l=et.__PosthogExtensions__;Ve(l)||Ve(l.postHogWebVitalsCallbacks)||({onLCP:o,onCLS:a,onFCP:n,onINP:i}=l.postHogWebVitalsCallbacks),o&&a&&n&&i?(this.allowedMetrics.indexOf("LCP")>-1&&o(this.ht.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&a(this.ht.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&n(this.ht.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.ht.bind(this)),this.Rs=!0):us.error("web vitals callbacks not loaded - not starting")}},this._instance=e,this.$s=!((t=this._instance.persistence)==null||!t.props[ww]),this.startIfEnabled()}get oo(){return this._instance.config.capture_performance}get allowedMetrics(){var e,t,o=No(this.oo)?(e=this.oo)==null?void 0:e.web_vitals_allowed_metrics:void 0;return Pt(o)?((t=this._instance.persistence)==null?void 0:t.props[Cw])||["CLS","FCP","INP","LCP"]:o}get flushToCaptureTimeoutMs(){return(No(this.oo)?this.oo.web_vitals_delayed_flush_ms:void 0)||5e3}get useAttribution(){var e=No(this.oo)?this.oo.web_vitals_attribution:void 0;return e!=null&&e}get no(){var e=No(this.oo)&&Xn(this.oo.__web_vitals_max_value)?this.oo.__web_vitals_max_value:MO;return e>0&&6e4>=e?MO:e}get isEnabled(){var e=Ta?.protocol;if(e!=="http:"&&e!=="https:")return us.info("Web Vitals are disabled on non-http/https protocols"),!1;var t=No(this.oo)?this.oo.web_vitals:$r(this.oo)?this.oo:void 0;return $r(t)?t:this.$s}startIfEnabled(){this.isEnabled&&!this.Rs&&(us.info("enabled, starting..."),this.ur(this.so))}onRemoteConfig(e){if("capturePerformance"in e){var t=No(e.capturePerformance)&&!!e.capturePerformance.web_vitals,o=No(e.capturePerformance)?e.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[ww]:t}),this._instance.persistence.register({[Cw]:o})),this.$s=t,this.startIfEnabled()}}ur(e){var t,o;(t=et.__PosthogExtensions__)!=null&&t.postHogWebVitalsCallbacks?e():(o=et.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,this.useAttribution?"web-vitals-with-attribution":"web-vitals",(a=>{a?us.error("failed to load script",a):e()}))}io(){var e=he?he.location.href:void 0;if(e){var t=this._instance.config.custom_personal_data_properties,o=this._instance.config.mask_personal_data_properties?[...Cd,...t||[]]:[];return Op(e,o,Ip)}us.error("Could not determine current URL")}}},cie={exceptionObserver:class{constructor(e){var t,o,a;this.so=()=>{var n;if(he&&this.isEnabled&&(n=et.__PosthogExtensions__)!=null&&n.errorWrappingFunctions){var i=et.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,l=et.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,c=et.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.ao&&this.Bt.capture_unhandled_errors&&(this.ao=i(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(u){qu.error("failed to start",u),this.ho()}}},this._instance=e,this.co=!((t=this._instance.persistence)==null||!t.props[yw]),this.do=new wne({refillRate:(o=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&o!==void 0?o:1,bucketSize:(a=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:10,refillInterval:1e4,Gt:qu}),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 No(e)?t=Oe({},t,e):(Ve(e)?this.co:e)&&(t=Oe({},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?(qu.info("enabled"),this.ho(),this.ur(this.so)):this.ho()}ur(e){var t,o;(t=et.__PosthogExtensions__)!=null&&t.errorWrappingFunctions&&e(),(o=et.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"exception-autocapture",(a=>{if(a)return qu.error("failed to load script",a);e()}))}ho(){var e,t,o;(e=this.ao)==null||e.call(this),this.ao=void 0,(t=this.lo)==null||t.call(this),this.lo=void 0,(o=this.uo)==null||o.call(this),this.uo=void 0}onRemoteConfig(e){"autocaptureExceptions"in e&&(this.co=!!e.autocaptureExceptions||!1,this._instance.persistence&&this._instance.persistence.register({[yw]:this.co}),this.Bt=this.vo(),this.startIfEnabledOrStop())}onConfigChange(){this.Bt=this.vo()}captureException(e){var t,o,a,n=(t=e==null||(o=e.$exception_list)==null||(o=o[0])==null?void 0:o.type)!==null&&t!==void 0?t:"Exception";this.do.consumeRateLimit(n)?qu.info("Skipping exception capture because of client rate limiting.",{exception:n}):(a=this._instance.exceptions)==null||a.sendExceptionEvent(e)}},exceptions:class{constructor(e){var t,o;this.fo=[],this.po=new Lne([new qne,new Jne,new Hne,new Vne,new Zne,new Yne,new Kne,new Qne],(function(a){for(var n=arguments.length,i=new Array(n>1?n-1:0),l=1;n>l;l++)i[l-1]=arguments[l];return function(c,u){u===void 0&&(u=0);for(var p=[],g=c.split(`
160
- `),m=u;g.length>m;m++){var f=g[m];if(1024>=f.length){var v=eO.test(f)?f.replace(eO,"$1"):f;if(!v.match(/\S*Error: /)){for(var b of i){var S=b(v,a);if(S){p.push(S);break}}if(p.length>=50)break}}}return(function(C){if(!C.length)return[];var w=Array.from(C);return w.reverse(),w.slice(0,50).map((_=>{return Oe({},_,{filename:_.filename||(E=w,E[E.length-1]||{}).filename,function:_.function||_d});var E}))})(p)}})("web:javascript",jne,$ne)),this._instance=e,this.fo=(t=(o=this._instance.persistence)==null?void 0:o.get_property(Sw))!==null&&t!==void 0?t:[],this.mo=Bf(this.yo()),this.bo=new ere(this.mo)}onConfigChange(){this.mo=Bf(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,o,a;if("errorTracking"in e){var n=(t=(o=e.errorTracking)==null?void 0:o.suppressionRules)!==null&&t!==void 0?t:[],i=(a=e.errorTracking)==null?void 0:a.captureExtensionExceptions;this.fo=n,this._instance.persistence&&this._instance.persistence.register({[Sw]:this.fo,[Tw]:i})}}get _o(){var e,t=!!this._instance.get_property(Tw),o=this._instance.config.error_tracking.captureExtensionExceptions;return(e=o??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(!Co(e)||e.trim().length===0)return void wi.warn("Ignoring exception step because message must be a non-empty string");var o=this.wo(t),{sanitizedProperties:a,droppedKeys:n}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(i).reduce(((c,u)=>Xne.has(u)?(l.push(u),c):(c[u]=i[u],c)),{}),droppedKeys:l}})(o);n.length>0&&wi.warn("Ignoring reserved exception step fields",{droppedKeys:n}),this.bo.add(Oe({[Nf]:e,[Ff]:new Date().toISOString()},a))}catch(i){wi.error("Failed to add exception step. Ignoring breadcrumb.",i)}}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 wi.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 wi.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 wi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var o=this.mo.enabled&&Pt(e.$exception_steps)?this.To(e):e;try{var a=this._instance.capture("$exception",o,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return a&&this.bo.clear(),a}catch(n){return wi.error("Failed to capture exception event. Dropping this exception.",n),void this.bo.clear()}}catch(n){return void wi.error("Failed to process exception event. Ignoring this exception.",n)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Oe({},e,{$exception_steps:t})}catch(o){return wi.error("Failed to read buffered exception steps. Capturing exception without steps.",o),e}}So(e){this.mo.enabled&&this.bo.add({[Nf]:e,[Ff]:new Date().toISOString()})}wo(e){return No(e)?Oe({},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(((o,a)=>{var{type:n,value:i}=a;return Co(n)&&n.length>0&&o.$exception_types.push(n),Co(i)&&i.length>0&&o.$exception_values.push(i),o}),{$exception_types:[],$exception_values:[]});return this.fo.some((o=>{var a=o.values.map((n=>{var i,l=D3[n.operator],c=Mt(n.value)?n.value:[n.value],u=(i=t[n.key])!==null&&i!==void 0?i:[];return c.length>0&&l(c,u)}));return o.type==="OR"?a.some(Boolean):a.every(Boolean)}))}xo(e){return e.flatMap((t=>{var o,a;return(o=(a=t.stacktrace)==null?void 0:a.frames)!==null&&o!==void 0?o:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,o,a,n,i=(t=(o=e[0].stacktrace)==null?void 0:o.frames)!==null&&t!==void 0?t:[],l=i[i.length-1];return(a=l==null||(n=l.filename)==null?void 0:n.includes("posthog.com/static"))!==null&&a!==void 0&&a}return!1}Io(e){return!Pt(e)&&Mt(e)}}},die=Oe({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({[_w]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(_w)||this.ur((()=>this.Ro()))}ur(e){var t,o;(t=et.__PosthogExtensions__)!=null&&t.generateProductTours?e():(o=et.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"product-tours",(a=>{a?BO.error("Could not load product tours script",a):e()}))}Ro(){var e;!this.Ao&&(e=et.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=et.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Mt(this.Eo)||t){var o=this.ni;if(o){var a=o.props[af];if(Mt(a)&&!t)return this.Eo=a,void e(a,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:n=>{var i=n.statusCode;if(i!==200||!n.json){var l="Product Tours API could not be loaded, status: "+i;return BO.error(l),void e([],{isLoaded:!1,error:l})}var c=Mt(n.json.product_tours)?n.json.product_tours:[];this.Eo=c,o&&o.register({[af]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){Pt(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(af)}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)}}},Vv),uie={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 o=this.globalsForEvent(t);this.No.push(o),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=et._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,o,a,n,i,l,c;if(!e)throw new Error("Event payload is required");var u={},p=this._instance.get_property("$groups")||[],g=this._instance.get_property("$stored_group_properties")||{};for(var[m,f]of Object.entries(g))u[m]={id:p[m],type:m,properties:f};var{$set_once:v,$set:b}=e;return{event:Oe({},OB(e,tie),{properties:Oe({},e.properties,b?{$set:Oe({},(t=(o=e.properties)==null?void 0:o.$set)!==null&&t!==void 0?t:{},b)}:{},v?{$set_once:Oe({},(a=(n=e.properties)==null?void 0:n.$set_once)!==null&&a!==void 0?a:{},v)}:{}),elements_chain:(i=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],o=()=>{var l;!t.errored&&this.No.length&&(ms.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))},a=!1,n=l=>{t.errored=!l,t.loaded=!0,ms.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),a&&o()};try{var{processEvent:i}=e.init({posthog:this._instance,callback(l){n(l)}});i&&(t.processEvent=i),a=!0}catch(l){ms.error(jO+e.id,l),n(!1)}if(a&&t.loaded)try{o()}catch(l){ms.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 o of e)this.setupSiteApp(o)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var o of Object.values(this.apps))try{o.processEvent==null||o.processEvent(t)}catch(a){ms.error("Error while processing event "+e.event+" for site app "+o.id,a)}}}onRemoteConfig(e){var t,o,a,n=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(u=>this.Po(u)))):void ms.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((o=this.Fo)==null||o.call(this),(a=e.siteApps)!=null&&a.length)if(this.isEnabled){var i=function(u){var p;et["__$$ph_site_app_"+u]=n._instance,(p=et.__PosthogExtensions__)==null||p.loadSiteApp==null||p.loadSiteApp(n._instance,c,(g=>{if(g)return ms.error(jO+u,g)}))};for(var{id:l,url:c}of e.siteApps)i(l)}else ms.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},pie={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,o,a=this.Bo()||[];Ve(this.Lo)&&((t=et.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(a,this._instance.get_distinct_id(),this._instance.sessionManager)),Ve(this.Do)&&((o=et.__PosthogExtensions__)==null||(o=o.tracingHeadersPatchFns)==null||o._patchFetch(a,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,o;(t=et.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(o=et.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"tracing-headers",(a=>{if(a)return Xre.error("failed to load script",a);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)}}},mie=Oe({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(Pt(t))return eo.warn("Flags not loaded yet. Not loading surveys.");var o=Mt(t);this.jo=o?t.length>0:t,eo.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var o=localStorage.key(t);(o!=null&&o.startsWith(qw)||o!=null&&o.startsWith("inProgressSurvey_"))&&e.push(o)}e.forEach((a=>localStorage.removeItem(a)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)eo.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)eo.info(UO);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())eo.info("Not loading surveys in cookieless mode without consent.");else{var e=et?.__PosthogExtensions__;if(e){if(!Ve(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var o=e.generateSurveys;if(o)return void this.Vo(o,t);var a=e.loadExternalDependency;if(!a)return void this.Ho(qC);a(this._instance,"surveys",(n=>{n||!e.generateSurveys?this.Ho("Could not load surveys script",n):this.Vo(e.generateSurveys,t)}))}catch(n){throw this.Ho("Error initializing surveys",n),n}finally{this.$o=!1}}}else eo.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nie(this._instance),eo.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){eo.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 eo.info(UO),e([]);var o,a=this._instance.get_property(Ew);if(a&&!t)return e(a,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((n=>{var{surveys:i,context:l}=n;return e(i,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((n=>{o=n}))),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:n=>{var i;this.Zo=null;var l=n.statusCode;if(l!==200||!n.json){var c="Surveys API could not be loaded, status: "+l;eo.error(c);var u={isLoaded:!1,error:c};return e([],u),void(o==null||o({surveys:[],context:u}))}var p,g=n.json.surveys||[],m=g.filter((v=>(function(b){return!(!b.start_date||b.end_date)})(v)&&((function(b){var S;return!((S=b.conditions)==null||(S=S.events)==null||(S=S.values)==null||!S.length)})(v)||(function(b){var S;return!((S=b.conditions)==null||(S=S.actions)==null||(S=S.values)==null||!S.length)})(v))));m.length>0&&((p=this._surveyEventReceiver)==null||p.register(m)),(i=this._instance.persistence)==null||i.register({[Ew]:g});var f={isLoaded:!0};e(g,f),o?.({surveys:g,context:f})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(o){eo.error("Error in survey callback",o)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Pt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);eo.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((o=>{var a;t=(a=o.find((n=>n.id===e)))!==null&&a!==void 0?a:null})),t}Yo(e){if(Pt(this._surveyManager))return{eligible:!1,reason:I0};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Pt(this._surveyManager))return eo.warn("init was not called"),{visible:!1,disabledReason:I0};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Pt(this._surveyManager)?(eo.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:I0})):new Promise((o=>{this.getSurveys((a=>{var n,i=(n=a.find((c=>c.id===e)))!==null&&n!==void 0?n:null;if(i){var l=this.Yo(i);o({visible:l.eligible,disabledReason:l.reason})}else o({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,o){var a;if(Pt(this._surveyManager))eo.warn("init was not called");else{var n=typeof e=="string"?this.Uo(e):e;if(n!=null&&n.id)if(Bre.includes(n.type)){var i=Be?.querySelector(t);if(i)return(a=n.appearance)!=null&&a.surveyPopupDelaySeconds?(eo.info("Rendering survey "+n.id+" with delay of "+n.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;eo.info("Rendering survey "+n.id+" with delay of "+((l=n.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(n,i,o),eo.info("Survey "+n.id+" rendered")}),1e3*n.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(n,i,o);eo.warn("Survey element not found")}else eo.warn("Surveys of type "+n.type+" cannot be rendered in the app");else eo.warn("Survey not found")}}displaySurvey(e,t){var o;if(Pt(this._surveyManager))eo.warn("init was not called");else{var a=this.Uo(e);if(a){var n=a;if((o=a.appearance)!=null&&o.surveyPopupDelaySeconds&&t.ignoreDelay&&(n=Oe({},a,{appearance:Oe({},a.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Fw.Popover&&t.initialResponses&&eo.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var i=this.canRenderSurvey(a);if(!i.visible)return void eo.warn("Survey is not eligible to be displayed: ",i.disabledReason)}t.displayType!==Fw.Inline?this._surveyManager.handlePopoverSurvey(n,t):this.renderSurvey(n,t.selector,t.properties)}else eo.warn("Survey not found")}}cancelPendingSurvey(e){Pt(this._surveyManager)?eo.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},Vv),gie={toolbar:class{constructor(e){this.instance=e}Go(e){et.ph_toolbar_state=e}Wo(){var e;return(e=et.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,o){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),p3(this.instance.config)||!he||!Be)return!1;e=e??he.location,o=o??he.history;try{if(!t){try{he.localStorage.setItem("test","test"),he.localStorage.removeItem("test")}catch{return!1}t=he?.localStorage}var a,n=rie||Yf(e.hash,"__posthog")||Yf(e.hash,"state"),i=n?oO((()=>JSON.parse(atob(decodeURIComponent(n)))))||oO((()=>JSON.parse(decodeURIComponent(n)))):null;return i&&i.action==="ph_authorize"?((a=i).source="url",a&&Object.keys(a).length>0&&(i.desiredHash?e.hash=i.desiredHash:o?o.replaceState(o.state,"",e.pathname+e.search):e.hash="")):((a=JSON.parse(t.getItem(zO)||"{}")).source="localstorage",delete a.userIntent),!(!a.token||this.instance.config.token!==a.token||(this.loadToolbar(a),0))}catch{return!1}}Xo(e){var t=et.ph_load_toolbar||et.ph_load_editor;!Pt(t)&&Ci(t)?t(e,this.instance):$O.warn("No toolbar load function found")}loadToolbar(e){var t=!(Be==null||!Be.getElementById(l3));if(!he||t)return!1;var o=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=Oe({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},o?{instrument:!1}:{});if(he.localStorage.setItem(zO,JSON.stringify(Oe({},a,{source:void 0}))),this.Wo()===2)this.Xo(a);else if(this.Wo()===0){var n;this.Go(1),(n=et.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return $O.error("[Toolbar] Failed to load",i),void this.Go(0);this.Go(2),this.Xo(a)})),Yo(he,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(a)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,o){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),this.maybeLoadToolbar(e,t,o)}}},hie=Oe({experiments:Oa},Vv),fie={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;Pt(t)||($r(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||p3(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=et?.__PosthogExtensions__;if(e&&!Ve(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 o=e.loadExternalDependency;if(!o)return void this.ra(qC);o(this._instance,"conversations",(a=>{a||!e.initConversations?this.ra("Could not load conversations script",a):this.ta(e.initConversations),this.Qo=!1}))}catch(a){this.ra("Error initializing conversations",a),this.Qo=!1}}else Vn.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Vn.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Vn.error("Cannot complete initialization: remote config is null")}ra(e,t){Vn.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():Vn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!Mi(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,o){var a=this;return Kn((function*(){return a._conversationsManager?a._conversationsManager.sendMessage(e,t,o):(Vn.warn(ml),null)}))()}getMessages(e,t){var o=this;return Kn((function*(){return o._conversationsManager?o._conversationsManager.getMessages(e,t):(Vn.warn(ml),null)}))()}markAsRead(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Vn.warn(ml),null)}))()}getTickets(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Vn.warn(ml),null)}))()}requestRestoreLink(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Vn.warn(ml),null)}))()}restoreFromToken(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Vn.warn(ml),null)}))()}restoreFromUrlToken(){var e=this;return Kn((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Vn.warn(ml),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()}}},vie={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=So("[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,o=(t=e.logs)==null?void 0:t.captureConsoleLogs;!Pt(o)&&o&&(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=et?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(o=>{var a;o||(a=e.logs)==null||!a.initializeLogs?this.Gt.error("Could not load logs script",o):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(qC)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,o,a,n,i,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(o=this._instance.config.logs)==null?void 0:o.flushIntervalMs)!==null&&t!==void 0?t:3e3,u=(a=(n=this._instance.config.logs)==null?void 0:n.maxLogsPerInterval)!==null&&a!==void 0?a:1e3,p=Date.now();if(c>p-this.aa||(this.aa=p,this.oa=0,this.la=!1),u>this.oa){this.oa++;var g=(function(m,f){var v=m.level||"info",{text:b,number:S}=JB[v]||Ine,C=String(Date.now())+"000000",w={};f.distinctId&&(w.posthogDistinctId=f.distinctId),f.sessionId&&(w.sessionId=f.sessionId),f.currentUrl&&(w["url.full"]=f.currentUrl),f.screenName&&(w["screen.name"]=f.screenName),f.appState&&(w["app.state"]=f.appState),f.activeFeatureFlags&&f.activeFeatureFlags.length>0&&(w.feature_flags=f.activeFeatureFlags);var _=Oe({},w,m.attributes||{}),E={timeUnixNano:C,observedTimeUnixNano:C,severityNumber:S,severityText:b,body:{stringValue:m.body},attributes:XD(_)};return m.trace_id&&(E.traceId=m.trace_id),m.span_id&&(E.spanId=m.span_id),Ve(m.trace_flags)||(E.flags=m.trace_flags),E})(e,this.ua());this.sa.push({record:g}),((i=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&i!==void 0?i:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" 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 o=this._instance.config.logs,a=Oe({"service.name":o?.serviceName||"unknown_service"},o?.environment&&{"deployment.environment":o.environment},o?.serviceVersion&&{"service.version":o.serviceVersion},o?.resourceAttributes),n=(function(l,c,u,p){return{resourceLogs:[{resource:{attributes:XD(c)},scopeLogs:[{scope:{name:u,version:p},logRecords:l}]}]}})(t.map((l=>l.record)),a,Ga.LIB_NAME,Ga.LIB_VERSION),i=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:i,data:n,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:o}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=o}if(et!=null&&(e=et.location)!=null&&e.href&&(t.currentUrl=et.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(t.activeFeatureFlags=a)}return t}}},bie=Oe({},Vv,sie,lie,cie,die,uie,mie,pie,gie,hie,fie,vie);Yn.__defaultExtensionClasses=Oe({},bie);var GO,Li=(GO=mp[Yc]=new Yn,(function(){function e(){e.done||(e.done=!0,M3=!1,ho(mp,(function(t){t._dom_loaded()})))}Be!=null&&Be.addEventListener?Be.readyState==="complete"?e():Yo(Be,"DOMContentLoaded",e,{capture:!1}):he&&ze.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),GO);const yie="studio-ui-resources",ev="html",Sie=10080*60*1e3,Tie=50,wie=16*1024*1024;function _ie(e){return e[0]==="mcp"&&e[1]===FL}function Hv(){return new Promise((e,t)=>{const o=indexedDB.open(yie,1);o.onupgradeneeded=()=>{o.result.objectStoreNames.contains(ev)||o.result.createObjectStore(ev)},o.onsuccess=()=>e(o.result),o.onerror=()=>t(o.error)})}function kd(e,t){return e.transaction(ev,t).objectStore(ev)}function Ww(e){return new Promise((t,o)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>o(e.error)})}async function Cie(e){if(!(typeof indexedDB>"u"))try{const t=await Hv(),o=kd(t,"readonly"),a=await Ww(o.getAllKeys()),n=await Ww(o.getAll()),i=Date.now(),l=a.map((p,g)=>({key:p,value:n[g]})).sort((p,g)=>(g.value?.updatedAt??0)-(p.value?.updatedAt??0)),c=[];let u=0;for(const{key:p,value:g}of l){if(!g||i-g.updatedAt>Sie||u>=Tie){c.push(p);continue}u++;try{const f=JSON.parse(String(p));e.getQueryData(f)===void 0&&e.setQueryData(f,g.html,{updatedAt:0})}catch{c.push(p)}}if(c.length>0){const p=kd(t,"readwrite");for(const g of c)p.delete(g)}}catch{}}function Pie(e){if(typeof indexedDB>"u")return()=>{};const t=Hv().catch(()=>null);return e.getQueryCache().subscribe(o=>{const a=o.query;if(!Array.isArray(a.queryKey)||!_ie(a.queryKey)||a.state.status!=="success")return;const n=a.state.data;typeof n!="string"||n.length>wie||t.then(i=>{if(i)try{kd(i,"readwrite").put({html:n,updatedAt:Date.now()},JSON.stringify(a.queryKey))}catch{}})})}function kie(){typeof indexedDB>"u"||Hv().then(e=>kd(e,"readwrite").clear()).catch(()=>{})}async function Tve(e){if(!(typeof indexedDB>"u"))try{const t=await Hv(),o=await Ww(kd(t,"readonly").getAllKeys()),a=kd(t,"readwrite");for(const n of o)try{const i=JSON.parse(String(n));i[1]===FL&&i[3]===e&&a.delete(n)}catch{}}catch{}}const tv="studio:rq-cache",ZC=1440*60*1e3,xie=1e3,Eie=new Set(["publicConfig","ai-provider-keys","organization-settings","home-next-actions"]),Rie=new Set(["VIRTUAL_MCP","CONNECTIONS"]);let q3=!1,V3=!1;function Aie(e){const t=e[0];return typeof t=="string"&&Eie.has(t)?!0:e[3]==="collection"&&typeof e[4]=="string"&&Rie.has(e[4])}function Die(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(tv);if(!t)return;const o=JSON.parse(t),a=!o.timestamp||Date.now()-o.timestamp>ZC;if(o.buster!=="4.377.0"||a||!o.state){window.localStorage.removeItem(tv);return}W$(e,o.state),e.invalidateQueries({queryKey:On.publicConfig(),refetchType:"none"}),q3=!0}catch{Lie()}}function Oie(e){if(typeof window>"u")return()=>{};let t=null;const o=()=>{t=null;try{const i=K$(e,{shouldDehydrateQuery:l=>l.state.status==="success"&&Aie(l.queryKey)});window.localStorage.setItem(tv,JSON.stringify({buster:"4.377.0",timestamp:Date.now(),state:i}))}catch{}},a=e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(o,xie))}),n=()=>{t!=null&&(clearTimeout(t),o())};return window.addEventListener("pagehide",n),()=>{t!=null&&clearTimeout(t),window.removeEventListener("pagehide",n),a()}}const H3="studio:org-cache:",Iie=20;function Mie(e){const t=Date.now(),o=Object.entries(e).filter(([,a])=>t-a.updatedAt<=ZC);for(o.sort(([,a],[,n])=>a.updatedAt-n.updatedAt);o.length>Iie;)o.shift();return Object.fromEntries(o)}function G3(e){return`${H3}${e}`}function wve(e,t){if(typeof window>"u")return null;try{const o=window.localStorage.getItem(G3(e));if(!o)return null;const a=JSON.parse(o)[t];return!a||Date.now()-a.updatedAt>ZC?null:(V3=!0,a)}catch{return null}}function _ve(e,t,o){if(!(typeof window>"u"))try{const a=G3(e),n=window.localStorage.getItem(a),i=n?JSON.parse(n):{};i[t]={data:o,updatedAt:Date.now()},window.localStorage.setItem(a,JSON.stringify(Mie(i)))}catch{}}function Lie(){if(kie(),!(typeof window>"u"))try{window.localStorage.removeItem(tv);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(H3)&&window.localStorage.removeItem(t)}}catch{}}function Nie(){return q3}function Fie(){return V3}let Ai=!1,Yw=null,KO=!1;const QC="studio:lp-distinct-id",K3="mesh:lp-distinct-id",L0="/api/_reports/link-token/",Bie=1440*60*1e3;function W3(e){const t="https://analytics.invalid",o=/^[a-z][a-z\d+.-]*:\/\//i.test(e),a=e.startsWith("//");try{const n=new URL(e,t);let i=!1;for(const l of["key","d"])n.searchParams.has(l)&&(n.searchParams.delete(l),i=!0);return n.pathname.startsWith(L0)&&n.pathname!==L0&&(n.pathname=`${L0}redacted`,i=!0),i?o?n.toString():a?`//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`:e}catch{return e}}function N0(e){return Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="string"?W3(o):o]))}const jie=e=>e?(e.properties=N0(e.properties),e.$set&&(e.$set=N0(e.$set)),e.$set_once&&(e.$set_once=N0(e.$set_once)),e):null;function Y3(){try{const e=window.localStorage.getItem(QC)??window.localStorage.getItem(K3);if(!e)return;const{id:t,ts:o}=JSON.parse(e);return typeof t!="string"||!t||typeof o!="number"?void 0:Date.now()-o<=Bie?t:void 0}catch{return}}function Uie(){try{window.localStorage.removeItem(QC),window.localStorage.removeItem(K3)}catch{}}function zie(){try{const e=new URL(window.location.href),t=e.searchParams.get("ph_did");t&&(window.localStorage.setItem(QC,JSON.stringify({id:t,ts:Date.now()})),e.searchParams.delete("ph_did"),window.history.replaceState(window.history.state,"",e.toString()));const o=t??Y3();return o?Object.keys(window.localStorage).some(n=>n.startsWith("ph_")&&n.endsWith("_posthog"))?void 0:o:void 0}catch{return}}function $ie(e){const t=Y3();if(t&&(Uie(),t!==e))try{Li.alias(t)}catch{}}function qie(e,t){if(Ai||typeof window>"u")return;const o=zie();Li.init(e,{api_host:t,ui_host:"https://us.posthog.com",cross_subdomain_cookie:!0,...o?{bootstrap:{distinctID:o}}:{},capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,before_send:jie,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture",maskCapturedNetworkRequestFn:a=>({...a,...typeof a.name=="string"?{name:W3(a.name)}:{}})},person_profiles:"identified_only"}),Ai=!0}function Vie(e,t){Ai&&(Li.identify(e,t),$ie(e))}function Hie(){Ai&&(Li.reset(),Yw=null)}function JC(e,t){Ai&&Li.capture(e,t)}function Cve(){return Ai}function Pve(){if(!Ai||KO||typeof performance>"u")return;KO=!0;const e=performance.getEntriesByType("navigation")[0],t=o=>{const a=performance.getEntriesByName(o,"measure")[0];return a?Math.round(a.duration):void 0};JC("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("studio:config-fetch"),active_org_fetch_ms:t("studio:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:Nie(),org_cache_restored:Fie()})}function kve(e,t){Ai&&e!==Yw&&(Li.group("organization",e,t),Yw=e)}function Z3(e,t){if(Ai)try{Li.captureException(e,t)}catch{}}const Gie=["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 Kie(e){const t=Ie.c(3),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=T.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:Gie}}),t[0]=a):a=t[0];let n;return t[1]!==o?(n=T.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[a,T.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:o})]}),t[1]=o,t[2]=n):n=t[2],n}function Q3(e){const t=Ie.c(20),{orgName:o}=e,a=ar(),n=Wie;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx("div",{className:"bg-muted p-3 rounded-full",children:T.jsx(mB,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=i):i=t[0];let l;t[1]!==a?(l=a("common.archivedOrgScreen.orgUnavailable"),t[1]=a,t[2]=l):l=t[2];let c;t[3]!==l?(c=T.jsx("h3",{className:"text-lg font-medium",children:l}),t[3]=l,t[4]=c):c=t[4];let u;t[5]!==o||t[6]!==a?(u=o?a("common.archivedOrgScreen.deletedWithName",{orgName:o}):a("common.archivedOrgScreen.deletedGeneric"),t[5]=o,t[6]=a,t[7]=u):u=t[7];let p;t[8]!==u?(p=T.jsx("p",{className:"text-sm text-muted-foreground",children:u}),t[8]=u,t[9]=p):p=t[9];let g;t[10]!==c||t[11]!==p?(g=T.jsxs("div",{className:"space-y-2",children:[c,p]}),t[10]=c,t[11]=p,t[12]=g):g=t[12];let m;t[13]!==a?(m=a("common.archivedOrgScreen.goHome"),t[13]=a,t[14]=m):m=t[14];let f;t[15]!==m?(f=T.jsx(Al,{onClick:n,children:m}),t[15]=m,t[16]=f):f=t[16];let v;return t[17]!==g||t[18]!==f?(v=T.jsxs(Kie,{children:[i,g,f]}),t[17]=g,t[18]=f,t[19]=v):v=t[19],v}function Wie(){window.location.href="/"}function Yie(){const e=Ie.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:o}=Rd(t);let a;return e[1]!==o?(a=T.jsx(Al,{variant:"outline",size:"sm",asChild:!0,children:T.jsx(Fs,{to:"/$org/settings/profile",params:{org:o},children:"Go to your profile"})}),e[1]=o,e[2]=a):a=e[2],a}function Zie(e){const t=Ie.c(13),{area:o,description:a,action:n}=e,i=o?`No access to ${o}`:"No access",l=a??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:T.jsx(TB,{size:28})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=T.jsx("h3",{className:"text-lg font-medium",children:i}),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==l?(p=T.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l}),t[3]=l,t[4]=p):p=t[4];let g;t[5]!==u||t[6]!==p?(g=T.jsxs("div",{className:"space-y-1",children:[u,p]}),t[5]=u,t[6]=p,t[7]=g):g=t[7];let m;t[8]!==n?(m=n??T.jsx(Yie,{}),t[8]=n,t[9]=m):m=t[9];let f;return t[10]!==g||t[11]!==m?(f=T.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[c,g,m]}),t[10]=g,t[11]=m,t[12]=f):f=t[12],f}const WO="__studio_chunk_reload_ts";function J3(e){return e?.message==="Organization is archived"}function Qie(e){return!!e?.message?.includes("Access denied")}function YO(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 Jie extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o),Z3(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:o.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,t:o}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:J3(this.state.error)?T.jsx(Q3,{}):Qie(this.state.error)?T.jsx(Zie,{}):T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(MC,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:o("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||o("common.errorBoundary.unexpectedError")})]}),T.jsx(Al,{variant:"outline",onClick:this.resetError,children:o("common.errorBoundary.tryAgain")})]})}return this.props.children}}function Xie(e){const t=Ie.c(3),o=ar();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(Jie,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}class ese extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o);const a=YO(t);if(Z3(t,{boundary:"chunk_root",is_chunk_load_error:a,error_name:t.name,error_message:t.message,component_stack:o.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!a)return;const n=sessionStorage.getItem(WO),i=Date.now();(!n||i-Number(n)>1e4)&&(sessionStorage.setItem(WO,String(i)),window.location.reload())}render(){const{t}=this.props;return this.state.hasError&&YO(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(wB,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.newVersionAvailable")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:t("common.errorBoundary.newVersionDeployed")})]}),T.jsx(Al,{onClick:()=>window.location.reload(),children:t("common.errorBoundary.refresh")})]}):this.state.hasError?J3(this.state.error)?T.jsx(Q3,{}):T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(MC,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||t("common.errorBoundary.unexpectedError")})]}),T.jsx(Al,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:t("common.errorBoundary.tryAgain")})]}):this.props.children}}function tse(e){const t=Ie.c(3),o=ar();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(ese,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}function ose(e){const t=Ie.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Ot("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"card",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function xve(e){const t=Ie.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx("div",{"data-slot":"card-content",...o}),t[2]=o,t[3]=a):a=t[3],a}function Eve(e){const t=Ie.c(12),{title:o,description:a,docsHref:n,actions:i,className:l,headerClassName:c,children:u}=e;let p;t[0]!==l?(p=Ot("flex flex-col gap-3",l),t[0]=l,t[1]=p):p=t[1];let g;t[2]!==i||t[3]!==a||t[4]!==n||t[5]!==c||t[6]!==o?(g=(o||a||n||i)&&T.jsxs("div",{className:Ot("flex items-center justify-between gap-3 px-4",c),children:[T.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[o&&T.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:o}),(a||n)&&T.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[a,n&&T.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",T.jsx(gB,{size:12})]})]})]}),i&&T.jsx("div",{className:"shrink-0",children:i})]}),t[2]=i,t[3]=a,t[4]=n,t[5]=c,t[6]=o,t[7]=g):g=t[7];let m;return t[8]!==u||t[9]!==p||t[10]!==g?(m=T.jsxs("section",{className:p,children:[g,u]}),t[8]=u,t[9]=p,t[10]=g,t[11]=m):m=t[11],m}function Rve(e){const t=Ie.c(11),{className:o,children:a}=e;let n,i,l;if(t[0]!==a||t[1]!==o){const u=R.Children.toArray(a).filter(R.isValidElement);n=ose,t[5]!==o?(i=Ot("p-0 gap-0 overflow-hidden",o),t[5]=o,t[6]=i):i=t[6],l=u.map(ase),t[0]=a,t[1]=o,t[2]=n,t[3]=i,t[4]=l}else n=t[2],i=t[3],l=t[4];let c;return t[7]!==n||t[8]!==i||t[9]!==l?(c=T.jsx(n,{className:i,children:l}),t[7]=n,t[8]=i,t[9]=l,t[10]=c):c=t[10],c}function ase(e,t){return T.jsxs("div",{children:[t>0&&T.jsx("div",{className:"h-px bg-border mx-5"}),e]},t)}function Ave(e){const t=Ie.c(27),{icon:o,title:a,description:n,action:i,onClick:l,className:c,children:u}=e,p=u?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",g=l&&"hover:bg-muted/50 cursor-pointer";let m;t[0]!==c||t[1]!==p||t[2]!==g?(m=Ot(p,g,c),t[0]=c,t[1]=p,t[2]=g,t[3]=m):m=t[3];const f=l?"button":void 0,v=l?0:void 0;let b;t[4]!==l?(b=l?x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())}:void 0,t[4]=l,t[5]=b):b=t[5];let S;t[6]!==o?(S=o&&T.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:o}),t[6]=o,t[7]=S):S=t[7];let C;t[8]!==a?(C=T.jsx("div",{className:"text-sm font-medium",children:a}),t[8]=a,t[9]=C):C=t[9];let w;t[10]!==n?(w=n&&T.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:n}),t[10]=n,t[11]=w):w=t[11];let _;t[12]!==u||t[13]!==C||t[14]!==w?(_=T.jsxs("div",{className:"flex-1 min-w-0",children:[C,w,u]}),t[12]=u,t[13]=C,t[14]=w,t[15]=_):_=t[15];let E;t[16]!==i?(E=i&&T.jsx("div",{className:"shrink-0",onClick:nse,children:i}),t[16]=i,t[17]=E):E=t[17];let k;return t[18]!==l||t[19]!==_||t[20]!==E||t[21]!==m||t[22]!==f||t[23]!==v||t[24]!==b||t[25]!==S?(k=T.jsxs("div",{className:m,onClick:l,role:f,tabIndex:v,onKeyDown:b,children:[S,_,E]}),t[18]=l,t[19]=_,t[20]=E,t[21]=m,t[22]=f,t[23]=v,t[24]=b,t[25]=S,t[26]=k):k=t[26],k}function nse(e){return e.stopPropagation()}function Dve(e){const t=Ie.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Ot("px-4 py-4",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}function Ove(e){const t=Ie.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Ot("flex items-center justify-end gap-2 px-4 py-4",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function rse(e){const t=Ie.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Ot("flex flex-col gap-10",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}const am={connect:{key:"connect",titleKey:"settings.connectClients.pageTitle",tabs:[],ownedRoutes:["/$org/settings/api-keys"]},members:{key:"members",titleKey:"orgs.members.title",tabs:[{key:"members",icon:PB,labelKey:"orgs.members.title",to:"/$org/settings/members",requires:"members:manage"},{key:"roles",icon:CB,labelKey:"settings.roles.pageTitle",to:"/$org/settings/roles",privilegedOnly:!0}]},billing:{key:"billing",titleKey:"settings.nav.billing",tabs:[{key:"ai-providers",icon:vB,labelKey:"settings.nav.aiProviders",to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"infra",icon:_B,labelKey:"settings.subnav.infrastructure",to:"/$org/settings/infra-billing",requires:"members:manage",requiresOwnedSites:!0}]},repositories:{key:"repositories",titleKey:"settings.nav.repositories",tabs:[],ownedRoutes:["/$org/settings/repositories"]},storage:{key:"storage",titleKey:"settings.nav.storage",tabs:[{key:"buckets",icon:SB,labelKey:"settings.nav.buckets",to:"/$org/settings/buckets",requires:"file-configs:manage"},{key:"synced-repos",icon:yB,labelKey:"settings.nav.syncedRepos",to:"/$org/settings/synced-repos",requires:"file-configs:manage"}]}};function Ive(e){const t=am[e];return[...t.tabs.map(o=>o.to),...t.ownedRoutes??[]]}function Mve(e){return am[e].tabs.length>0}const ise=new Set(["owner","admin"]);function X3(){const e=Ie.c(11),{org:t,locator:o}=Wp();let a;e[0]!==o?(a=On.myCapabilities(o),e[0]=o,e[1]=a):a=e[1];let n;e[2]!==t?(n=async()=>{const g=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(t.slug)}`,{credentials:"include"});if(!g.ok)throw new Error(`my-capabilities request failed: ${g.status}`);return await g.json()},e[2]=t,e[3]=n):n=e[3];let i;e[4]!==a||e[5]!==n?(i={queryKey:a,queryFn:n,staleTime:3e4,retry:2},e[4]=a,e[5]=n,e[6]=i):i=e[6];const{data:l,isLoading:c,isError:u}=Dd(i);let p;return e[7]!==l||e[8]!==u||e[9]!==c?(p={data:l,loading:c,error:u},e[7]=l,e[8]=u,e[9]=c,e[10]=p):p=e[10],p}function Lve(e){const t=Ie.c(8),{data:o,loading:a,error:n}=X3();if(a){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!1,loading:!0,error:!1,reason:"loading"},t[0]=p):p=t[0],p}if(n){let p;return t[1]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!1,loading:!1,error:!0,reason:"error"},t[1]=p):p=t[1],p}const i=o?.role??null;if(!i){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!1,loading:!1,error:!1,reason:"denied"},t[2]=p):p=t[2],p}if(i==="owner"){let p;return t[3]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!0,loading:!1,error:!1,reason:"owner"},t[3]=p):p=t[3],p}if(i==="admin"){let p;return t[4]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!0,loading:!1,error:!1,reason:"admin"},t[4]=p):p=t[4],p}const l=o?.capabilities?.[e]===!0,c=l?"role":"denied";let u;return t[5]!==l||t[6]!==c?(u={granted:l,loading:!1,error:!1,reason:c},t[5]=l,t[6]=c,t[7]=u):u=t[7],u}function e4(){const e=Ie.c(10),{data:t,loading:o,error:a}=X3(),n=t?.role??void 0;let i;e[0]!==n?(i=n?ise.has(n):!1,e[0]=n,e[1]=i):i=e[1];const l=i;let c;e[2]!==t?.capabilities?(c=t?.capabilities??{},e[2]=t?.capabilities,e[3]=c):c=e[3];const u=c;let p;return e[4]!==a||e[5]!==l||e[6]!==o||e[7]!==n||e[8]!==u?(p={capabilities:u,loading:o,error:a,isPrivileged:l,roleSlug:n},e[4]=a,e[5]=l,e[6]=o,e[7]=n,e[8]=u,e[9]=p):p=e[9],p}function sse(){const e=Ie.c(13),{org:t}=Wp(),o=aC(),{capabilities:a,isPrivileged:n}=e4(),i=n||!!a["members:manage"];let l;e[0]!==t.id?(l=On.infraBillingSites(t.id),e[0]=t.id,e[1]=l):l=e[1];const c=!!t.id&&i;let u;e[2]!==o?(u=()=>o.call("INFRA_BILLING_SITES_LIST",{}),e[2]=o,e[3]=u):u=e[3];let p;e[4]!==l||e[5]!==c||e[6]!==u?(p={queryKey:l,staleTime:3e5,enabled:c,queryFn:u},e[4]=l,e[5]=c,e[6]=u,e[7]=p):p=e[7];const{data:g,isLoading:m}=Dd(p);let f;e[8]!==g?.sites?(f=g?.sites.map(lse)??[],e[8]=g?.sites,e[9]=f):f=e[9];let v;return e[10]!==m||e[11]!==f?(v={sites:f,isLoading:m},e[10]=m,e[11]=f,e[12]=v):v=e[12],v}function lse(e){return e.slug}function Nve(){const e=Ie.c(7),t=aC(),o=ar();let a;e[0]!==t?(a=l=>t.call("INFRA_BILLING_PORTAL",{siteSlugs:l}),e[0]=t,e[1]=a):a=e[1];let n;e[2]!==o?(n=l=>Vr.error(o("settings.infraBilling.portalError",{message:l.message})),e[2]=o,e[3]=n):n=e[3];let i;return e[4]!==a||e[5]!==n?(i={mutationFn:a,onSuccess:cse,onError:n},e[4]=a,e[5]=n,e[6]=i):i=e[6],lp(i)}function cse(e){const{url:t}=e;return window.open(t,"_blank","noopener,noreferrer")}function Fve(e,t){const o=Ie.c(14),{org:a}=Wp(),n=aC();let i,l,c;o[0]!==a.id||o[1]!==t||o[2]!==e?(i=[...e].sort(),c=Dd,l=On.infraBilling(a.id,i.join(","),t),o[0]=a.id,o[1]=t,o[2]=e,o[3]=i,o[4]=l,o[5]=c):(i=o[3],l=o[4],c=o[5]);const u=i.length>0;let p;o[6]!==t||o[7]!==i||o[8]!==n?(p=()=>n.call("INFRA_BILLING_GET",{siteSlugs:i,period:t}),o[6]=t,o[7]=i,o[8]=n,o[9]=p):p=o[9];let g;return o[10]!==l||o[11]!==u||o[12]!==p?(g={queryKey:l,enabled:u,staleTime:6e4,queryFn:p},o[10]=l,o[11]=u,o[12]=p,o[13]=g):g=o[13],c(g)}function t4(){const e=Ie.c(7),{capabilities:t,isPrivileged:o,loading:a,error:n}=e4(),{sites:i,isLoading:l}=sse(),c=i.length>0;let u;if(e[0]!==t||e[1]!==n||e[2]!==o||e[3]!==a||e[4]!==c||e[5]!==l){const p=g=>g.requiresOwnedSites&&!c&&!l?!1:a||n?!0:g.privilegedOnly?o:g.requires?o||t[g.requires]:!0;u=Object.fromEntries(Object.values(am).map(g=>[g.key,g.tabs.filter(p)])),e[0]=t,e[1]=n,e[2]=o,e[3]=a,e[4]=c,e[5]=l,e[6]=u}else u=e[6];return u}function dse(e){const t=Ie.c(16),{group:o}=e,a=ar();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},t[0]=n):n=t[0];const{org:i}=Rd(n);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:use},t[1]=l):l=t[1];const c=gv(l),u=t4()[o],{titleKey:p}=am[o];let g;t[2]!==a||t[3]!==p?(g=a(p),t[2]=a,t[3]=p,t[4]=g):g=t[4];let m;t[5]!==g?(m=T.jsx(kl.Title,{children:g}),t[5]=g,t[6]=m):m=t[6];let f;t[7]!==o||t[8]!==i||t[9]!==c||t[10]!==a||t[11]!==u?(f=u.length>1&&T.jsx(nn.Toolbar.Left.Portal,{children:T.jsx(kl.Tabs,{"data-testid":"settings-subnav","aria-label":a("settings.subnav.ariaLabel"),children:u.map(b=>{const S=b.to.replace("$org",i),C=c===S||c.startsWith(`${S}/`);return T.jsx(kl.Tab,{active:C,asChild:!0,children:T.jsx(Fs,{to:b.to,params:{org:i},onClick:()=>JC("settings_subnav_clicked",{group_key:o,tab_key:b.key}),children:a(b.labelKey)})},b.key)})})}),t[7]=o,t[8]=i,t[9]=c,t[10]=a,t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==m||t[14]!==f?(v=T.jsxs(T.Fragment,{children:[m,f]}),t[13]=m,t[14]=f,t[15]=v):v=t[15],v}function use(e){return e.location.pathname}function pse(e){const t=Ie.c(16),{group:o}=e,a=ar();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},t[0]=n):n=t[0];const{org:i}=Rd(n);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:mse},t[1]=l):l=t[1];const c=gv(l),u=t4()[o],{titleKey:p}=am[o];let g;t[2]!==a||t[3]!==p?(g=a(p),t[2]=a,t[3]=p,t[4]=g):g=t[4];let m;t[5]!==g?(m=T.jsx(kl.Title,{children:g}),t[5]=g,t[6]=m):m=t[6];let f;t[7]!==o||t[8]!==i||t[9]!==c||t[10]!==a||t[11]!==u?(f=u.length>1&&T.jsx("nav",{"data-slot":"settings-subnav","aria-label":a("settings.subnav.ariaLabel"),className:"bg-muted inline-flex h-10 w-fit items-center rounded-xl p-[3px] gap-0.5",children:u.map(b=>{const S=b.to.replace("$org",i),C=c===S||c.startsWith(`${S}/`);return T.jsx(Fs,{to:b.to,params:{org:i},onClick:()=>JC("settings_subnav_clicked",{group_key:o,tab_key:b.key}),className:Ot("inline-flex h-full items-center justify-center rounded-lg border border-transparent px-3 text-sm font-medium whitespace-nowrap transition-[color,box-shadow]",C?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a(b.labelKey)},b.key)})}),t[7]=o,t[8]=i,t[9]=c,t[10]=a,t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==m||t[14]!==f?(v=T.jsxs("div",{"data-slot":"settings-heading",className:"flex flex-col gap-4",children:[m,f]}),t[13]=m,t[14]=f,t[15]=v):v=t[15],v}function mse(e){return e.location.pathname}function gse(e){const t=Ie.c(3),o=Dv();let a;return t[0]!==o||t[1]!==e?(a=o?T.jsx(dse,{...e}):T.jsx(pse,{...e}),t[0]=o,t[1]=e,t[2]=a):a=t[2],a}function o4(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=T.jsxs("div",{"data-testid":"settings-content-loading",className:"flex flex-col gap-4",children:[T.jsx(vD,{className:"h-32 w-full"}),T.jsx(vD,{className:"h-32 w-full"})]}),e[0]=t):t=e[0],t}function hse(e){const t=Ie.c(14),{group:o,fallback:a,errorFallback:n,className:i,children:l}=e;let c;t[0]!==o?(c=T.jsx(gse,{group:o}),t[0]=o,t[1]=c):c=t[1];let u;t[2]!==a?(u=a??T.jsx(o4,{}),t[2]=a,t[3]=u):u=t[3];let p;t[4]!==l||t[5]!==u?(p=T.jsx(R.Suspense,{fallback:u,children:l}),t[4]=l,t[5]=u,t[6]=p):p=t[6];let g;t[7]!==n||t[8]!==p?(g=T.jsx(Xie,{fallback:n,children:p}),t[7]=n,t[8]=p,t[9]=g):g=t[9];let m;return t[10]!==i||t[11]!==c||t[12]!==g?(m=T.jsx(kl,{children:T.jsx(kl.Content,{children:T.jsx(kl.Container,{children:T.jsxs(rse,{className:i,children:[c,g]})})})}),t[10]=i,t[11]=c,t[12]=g,t[13]=m):m=t[13],m}function Ni(e){return function(){return T.jsx(hse,{group:e,children:T.jsx(o4,{})})}}function fse(e){try{localStorage.setItem(Bl.lastLocation(),JSON.stringify(e))}catch{}}function vse(){try{const e=localStorage.getItem(Bl.lastLocation());if(!e)return null;const t=JSON.parse(e);if(typeof t?.org=="string")return{org:t.org,taskId:typeof t.taskId=="string"?t.taskId:void 0,virtualmcpid:typeof t.virtualmcpid=="string"?t.virtualmcpid:void 0}}catch{}return null}function Bve(){try{localStorage.removeItem(Bl.lastLocation())}catch{}}const It={home:"/$org/home",projects:"/$org/projects/$agentId",tasks:"/$org/tasks/{-$taskKey}",reports:"/$org/reports",library:"/$org/library",discover:"/$org/discover",orgIndex:"/$org/"},nt={root:It.projects,tasks:"/$org/projects/$agentId/tasks/{-$taskKey}",reports:"/$org/projects/$agentId/reports",siteEditor:"/$org/projects/$agentId/site-editor",siteEditorContent:"/$org/projects/$agentId/site-editor/content",siteEditorCode:"/$org/projects/$agentId/site-editor/code",automations:"/$org/projects/$agentId/automations",automation:"/$org/projects/$agentId/automations/$automationId",app:"/$org/projects/$agentId/apps/$connectionId/$toolName",view:"/$org/projects/$agentId/views/$viewId",outputFile:"/$org/projects/$agentId/outputs/file",outputDeck:"/$org/projects/$agentId/outputs/deck",libraryFile:"/$org/projects/$agentId/library/file",connectSources:"/$org/projects/$agentId/connect-sources",settings:"/$org/projects/$agentId/settings",assets:"/$org/projects/$agentId/assets",git:"/$org/projects/$agentId/git",hosting:"/$org/projects/$agentId/hosting",e2e:"/$org/projects/$agentId/e2e",analytics:"/$org/projects/$agentId/analytics",experiments:"/$org/projects/$agentId/experiments",monitor:"/$org/projects/$agentId/cdn"};function jve(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:bse},e[0]=t):t=e[0],gv(t)}function bse(e){return e.matches.at(-1)?.fullPath??""}const yse=new Map([[It.reports,"project-only"],[It.library,"org-only"]]);function Uve(e,t){const o=yse.get(e);return o===void 0?!0:o==="project-only"?t!==null:t===null}function zve(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:Sse},e[0]=t):t=e[0],gv(t)}function Sse(e){return e.matches.findLast(Tse)?.staticData.mainView}function Tse(e){return e.staticData.mainView}function sf(e){return`agent-view:${encodeURIComponent(e)}`}function wse(e){if(!e?.startsWith("agent-view:"))return null;const t=e.slice(11);if(!t)return null;try{const o=decodeURIComponent(t);return o?{id:o}:null}catch{return null}}function a4(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function XC(e,t){return`app:${e}:${t}`}function _se(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),o=t.indexOf(":");if(o<=0)return null;const a=t.slice(0,o),n=t.slice(o+1);return!a||!n?null:{connectionId:a,toolName:n}}function n4(e){return`deck:${encodeURIComponent(e)}`}function Cse(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function r4(e){return`file:${encodeURIComponent(e)}`}function Pse(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function i4(e){return`library-file:${encodeURIComponent(e)}`}function kse(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function s4(e){return`code:${encodeURIComponent(e)}`}function xse(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const l4=["overview","settings","automations","site-editor","code","content","assets","hosting","e2e","analytics","cdn","git"],Ese=new Set(l4),c4=new Set(["hosting","e2e","analytics","cdn"]),Rse=new Set(["board","files","connect-sources","reports"]);function $ve(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const Ase=new Map([["preview","site-editor"]]);function Gv(e){return Ase.get(e)??e}const eP=new Set(["instructions","connections","layout","settings"]);function Dse(e){return!!e&&eP.has(e)}const Ose=new Set(["overview","board","reports"]);function qve(e){const t=e?.defaultMainView??null;if(!(!t||t.type==="chat"))return d4(e??null)}function d4(e){const t=e?.defaultMainView??null;if(!t)return"settings";const o=Gv(t.type);if(eP.has(o))return"settings";if(Ese.has(o)||Ose.has(o))return o;if(o==="ext-app"||o==="ext-apps"){if(t.id&&t.toolName)return XC(t.id,t.toolName);const n=e?.tabs?.map(i=>i.id)??[];return t.id&&n.includes(t.id)?sf(t.id):n[0]?sf(n[0]):"settings"}const a=e?.tabs?.[0]?.id;return a?sf(a):"settings"}function Vve(e){const t=e.routeDefaultMain||d4(e.metadata),o=e.panelTabId&&eP.has(e.panelTabId)?"settings":e.panelTabId?Gv(e.panelTabId):e.panelTabId,a=e.metadata?.defaultMainView??null,n=a==null||a.type==="chat";return{mainOpen:e.mainPanelParam??(!!o||!!e.routeDefaultMain||!n),activeTab:o??t}}function Hve(e){return e.mainOpen&&e.clickedId===e.activeTab?{close:!0}:{tabId:e.clickedId}}function Gve(e){return e.mainOpen?e.activeTab==="automations"?!0:a4(e.activeTab)!==null:!1}function Kve(e){return e.mainOpen&&e.activeTab==="automations"?{close:!0}:{tabId:"automations"}}const Ise=new Set([...l4.filter(e=>!c4.has(e)),...Rse,"app","file","deck","library-file","connect-sources","instructions","connections","layout","preview","discover"]);function Mse(e){return!!e&&Ise.has(e)}function Lse(e,t){if(e)switch(e){case"app":return t.connection&&t.tool?XC(t.connection,t.tool):void 0;case"automations":return t.automation?`automation:${t.automation}`:"automations";case"file":return t.key?r4(t.key):void 0;case"deck":return t.deck?n4(t.deck):void 0;case"library-file":return t.path?i4(t.path):void 0;case"code":return t.file?s4(t.file):"code";default:{const o=Gv(e);return o==="site-editor"&&t.main==="content"?"content":o}}}function Wve(e){const t=e.params??{},o=e.search??{};if(e.siteEditorView==="content")return"content";if(e.siteEditorView==="code")return o.file?s4(o.file):"code";if(e.siteEditorView==="preview")return"site-editor";switch(e.mainView){case"automation":return t.automationId?`automation:${t.automationId}`:"automations";case"app":return t.connectionId&&t.toolName?XC(t.connectionId,t.toolName):void 0;case"view":return t.viewId?sf(t.viewId):void 0;case"file":return o.key?r4(o.key):void 0;case"deck":return o.path?n4(o.path):void 0;case"library-file":return o.path?i4(o.path):void 0;default:return e.mainView}}const Nse={files:"library",discover:"discover"},Fse={board:"tasks",reports:"reports"},Bse={settings:"settings",assets:"assets",git:"git",hosting:"hosting",e2e:"e2e",analytics:"analytics",experiments:"experiments",cdn:"monitor"};function u4(e){const t=wse(e);if(t)return{kind:"agent-view",viewId:t.id};const o=_se(e);if(o)return{kind:"app",connectionId:o.connectionId,toolName:o.toolName};const a=a4(e);if(a)return{kind:"automations",automationId:a.id};const n=Pse(e);if(n)return{kind:"output-file",key:n.key};const i=Cse(e);if(i)return{kind:"output-deck",path:i.path};const l=kse(e);if(l)return{kind:"library-file",path:l.path};const c=xse(e);if(c)return{kind:"site-editor",view:"code",...c.path?{file:c.path}:{}};if(Dse(e))return{kind:"agent-section",section:"settings"};const u=Gv(e);if(u==="overview")return{kind:"agent-overview"};if(u==="site-editor")return{kind:"site-editor",view:"preview"};if(u==="content")return{kind:"site-editor",view:"content"};if(u==="automations")return{kind:"automations"};if(u==="connect-sources")return{kind:"connect-sources"};const p=Fse[u];if(p)return{kind:"project-destination",destination:p};const g=Nse[u];if(g)return{kind:"org-destination",destination:g};const m=Bse[u];return m?{kind:"agent-section",section:m}:{kind:"agent-view",viewId:u}}function Il(e){const{org:t,agentId:o}=e,a={org:t,agentId:o},n=u4(e.tabId);switch(n.kind){case"project-destination":return e.destinationScope==="organization"?n.destination==="tasks"?{to:It.tasks,params:{org:t,taskKey:void 0},search:{}}:{to:It.reports,params:{org:t},search:{}}:n.destination==="tasks"?{to:nt.tasks,params:{...a,taskKey:void 0},search:{}}:{to:nt.reports,params:a,search:{}};case"org-destination":switch(n.destination){case"home":return{to:It.home,params:{org:t},search:{}};case"discover":return{to:It.discover,params:{org:t},search:{}};case"library":return{to:It.library,params:{org:t},search:{}}}case"agent-overview":return{to:nt.root,params:a,search:{}};case"site-editor":return n.view==="content"?{to:nt.siteEditorContent,params:a,search:{}}:n.view==="code"?{to:nt.siteEditorCode,params:a,search:{file:n.file}}:{to:nt.siteEditor,params:a,search:{}};case"agent-section":return{to:nt[n.section],params:a,search:{}};case"automations":return n.automationId?{to:nt.automation,params:{...a,automationId:n.automationId},search:{}}:{to:nt.automations,params:a,search:{}};case"app":return{to:nt.app,params:{...a,connectionId:n.connectionId,toolName:n.toolName},search:{}};case"agent-view":return{to:nt.view,params:{...a,viewId:n.viewId},search:{}};case"output-file":return{to:nt.outputFile,params:a,search:{key:n.key}};case"output-deck":return{to:nt.outputDeck,params:a,search:{path:n.path}};case"library-file":return{to:nt.libraryFile,params:a,search:{path:n.path}};case"connect-sources":return{to:nt.connectSources,params:a,search:{}}}}function Yve(e){if(!e.agentId||e.agentId===e.superAgentId&&(e.tabId===void 0||e.tabId==="overview"))return{to:It.home,params:{org:e.org},search:{}};const t=e.tabId??"overview",o=e.agentId!==e.superAgentId&&u4(t).kind==="org-destination"?"overview":t;return Il({org:e.org,agentId:e.agentId,tabId:o,destinationScope:e.agentId===e.superAgentId?"organization":"project"})}function jse(e,t,o={}){const a=i=>({...o.search?.(i)??{},...t.search}),n=o.replace??!0;switch(t.to){case It.tasks:e({to:It.tasks,params:t.params,search:a,replace:n});return;case It.home:e({to:It.home,params:t.params,search:a,replace:n});return;case It.reports:e({to:It.reports,params:t.params,search:a,replace:n});return;case It.discover:e({to:It.discover,params:t.params,search:a,replace:n});return;case It.library:e({to:It.library,params:t.params,search:a,replace:n});return;case nt.root:e({to:nt.root,params:t.params,search:a,replace:n});return;case nt.tasks:e({to:nt.tasks,params:t.params,search:a,replace:n});return;case nt.reports:e({to:nt.reports,params:t.params,search:a,replace:n});return;case nt.siteEditor:e({to:nt.siteEditor,params:t.params,search:a,replace:n});return;case nt.siteEditorContent:e({to:nt.siteEditorContent,params:t.params,search:a,replace:n});return;case nt.siteEditorCode:e({to:nt.siteEditorCode,params:t.params,search:a,replace:n});return;case nt.automations:e({to:nt.automations,params:t.params,search:a,replace:n});return;case nt.automation:e({to:nt.automation,params:t.params,search:a,replace:n});return;case nt.app:e({to:nt.app,params:t.params,search:a,replace:n});return;case nt.view:e({to:nt.view,params:t.params,search:a,replace:n});return;case nt.outputFile:e({to:nt.outputFile,params:t.params,search:a,replace:n});return;case nt.outputDeck:e({to:nt.outputDeck,params:t.params,search:a,replace:n});return;case nt.libraryFile:e({to:nt.libraryFile,params:t.params,search:a,replace:n});return;case nt.connectSources:e({to:nt.connectSources,params:t.params,search:a,replace:n});return;case nt.settings:case nt.assets:case nt.git:case nt.hosting:case nt.e2e:case nt.analytics:case nt.experiments:case nt.monitor:e({to:t.to,params:t.params,search:a,replace:n})}}function Zve(e,t){jse(e,Il(t),t)}function Use(e){const t=/^(\/[^/]+)\/agents(?=\/|$)/.exec(e);return t?.[1]?`${t[1]}/projects${e.slice(t[0].length)}`:null}function zse(e){const t=e.split("/").filter(Boolean);return(t[1]==="projects"||t[1]==="agents")&&t.length>3}const $se=new Set(["main","virtualmcpid","file","key","deck","path","connection","tool","automation"]),p4=new Set(["main"]),qse=new Set(["virtualmcpid"]);function Kv(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.has(o)))}function El(e,t){return{...Kv(e,$se),...t.search}}function Vse(e){return Kv(e,qse)}function Qve(e){if(e.search.virtualmcpid===void 0)return null;const t=yr(e.search.virtualmcpid);if(t){const o=e.routePath===It.tasks?"board":e.routePath===It.reports?"reports":null;if(e.routePath===It.home||o){const a=o?Il({org:e.org,agentId:t,tabId:o}):xd(e.org,t);return{kind:"canonical",route:a,search:El(e.search,a)}}}return e.routePath===It.home||e.routePath===It.tasks||e.routePath===It.reports||e.routePath===It.library?{kind:"same-route",search:Vse(e.search)}:null}function yr(e){return e?.trim()||void 0}function m4(e){return Mse(e)||e!==void 0&&c4.has(e)}function g4(e){const t=yr(e);return t?t.startsWith("vir_")&&t.length>4||oK(t)!==null||sK(t)!==null||cK(t)!==null||dK(t)!==null||uK(t)||gK(t):!1}function Hse(e){const t=yr(e.agentIdParam),o=m4(t);return t&&!o?t:yr(e.virtualMcpIdSearch)??yr(e.fallbackAgentId)}function Jve(e){const t=e.pathAgentId;if(t&&e.pathLegacyView){const l=Zw({org:e.org,agentId:t,panel:e.pathLegacyView,source:"project-first",search:e.search});return l?.kind==="canonical"?{route:l.route,search:l.search}:null}if(!t||zse(e.pathname))return null;const o=e.search.virtualmcpid!==void 0&&!g4(t);if(!(m4(t)||o))return null;const n=Hse({agentIdParam:o?void 0:t,virtualMcpIdSearch:e.search.virtualmcpid,fallbackAgentId:e.fallbackAgentId}),i=Zw({org:e.org,agentId:n,panel:t,source:"view-first",search:e.search});return i?.kind==="canonical"?{route:i.route,search:i.search}:null}function Gse(e,t,o,a){const n=yr(a);switch(e){case"board":return n?Il({org:t,agentId:n,tabId:"board"}):{to:It.tasks,params:{org:t,taskKey:void 0},search:{}};case"files":{const i=bs(o.path);return{to:It.library,params:{org:t},search:i?{path:i}:{}}}case"reports":return n?Il({org:t,agentId:n,tabId:"reports"}):{to:It.reports,params:{org:t},search:{}};case"overview":return{to:It.home,params:{org:t},search:{}};case"discover":return{to:It.discover,params:{org:t},search:{}};default:return null}}function Lp(e){const t=Gse(e.tabId,e.org,e.search,e.agentId);if(t)return t;if(e.tabId==="chat")return xd(e.org,e.agentId);const o=yr(e.agentId);return o?e.tabId==="app"||e.tabId==="file"||e.tabId==="deck"||e.tabId==="library-file"||e.tabId.trim()===""?{to:nt.root,params:{org:e.org,agentId:o},search:{}}:Il({org:e.org,agentId:o,tabId:e.tabId}):null}function xd(e,t){const o=yr(t);return o?{to:nt.root,params:{org:e,agentId:o},search:{}}:{to:It.home,params:{org:e},search:{}}}function Kse(e){const{main:t}=e;if(t===void 0)return null;const o=e.search??{};if(t===0||t==="0")return{kind:"same-route",search:{...Kv(o,p4),mainpanel:!1}};if(t==="chat"){const n=xd(e.org,e.agentId);return{kind:"canonical",route:n,search:{...El(o,n),sidepanel:!0,mainpanel:!1}}}const a=Lp({org:e.org,agentId:e.agentId,tabId:t,search:o});return a?{kind:"canonical",route:a,search:El(o,a)}:null}function bs(e){return typeof e=="string"&&e.length>0?e:void 0}function Zw(e){const t=e.search??{};if((t.main===0||t.main==="0")&&e.panel){const l=Zw({...e,search:Kv(t,p4)});return l?.kind!=="canonical"?l:{...l,search:{...l.search,mainpanel:!1}}}if(t.main!==void 0)return Kse({org:e.org,agentId:e.agentId,main:t.main,search:t});const o=yr(e.agentId),a=e.panel;if(!a){const l=xd(e.org,o);return{kind:"canonical",route:l,search:El(t,l)}}const n=Lse(a,{file:bs(t.file),key:bs(t.key),deck:bs(t.deck),path:bs(t.path),connection:bs(t.connection),tool:bs(t.tool),automation:bs(t.automation)}),i=n?e.source==="project-first"&&n==="overview"&&o?Il({org:e.org,agentId:o,tabId:n}):Lp({org:e.org,agentId:o,tabId:n,search:t}):Lp({org:e.org,agentId:o,tabId:"",search:t});return i?{kind:"canonical",route:i,search:n==="chat"?{...El(t,i),sidepanel:!0,mainpanel:!1}:El(t,i)}:null}function Xve(e){const t=e.search??{},o=yr(t.virtualmcpid),a=yr(e.fallbackAgentId),n=t.main;let i;if(n==="chat")i=xd(e.org,o);else if(n!==void 0&&n!==0&&n!=="0"){const l=Lp({org:e.org,agentId:o,tabId:n,search:t}),c=!l&&n.trim().length>0&&a?Lp({org:e.org,agentId:a,tabId:n,search:t}):null;i=l??c??{to:It.home,params:{org:e.org},search:{}}}else i=xd(e.org,o);return{route:i,search:{...El(t,i),...n===void 0&&t.sidepanel===void 0?{sidepanel:!0}:{},...n===0||n==="0"?{mainpanel:!1}:{},...n==="chat"?{sidepanel:!0,mainpanel:!1}:{},thread:e.taskId}}}function h4(e,t){if(t.task===void 0)return null;const{task:o,...a}=t;return{taskKey:e??(o.trim()||void 0),search:a}}const Wse={contentPageId:V().optional(),contentPath:V().optional(),contentPathTemplate:V().optional(),contentCollection:V().optional(),contentItem:V().optional()},f4=Wse,tP={view:V().optional(),q:V().optional(),assignee:V().optional(),priority:V().optional(),due:V().optional(),tags:V().optional(),repo:V().optional(),boardOrg:V().optional()},Qw={fileView:ia(["all","documents","media"]).catch("all").optional(),path:V().optional(),preview:V().optional(),skill:V().optional(),brand:V().optional()},Yse={file:V().optional(),key:V().optional(),deck:V().optional(),path:V().optional(),connection:V().optional(),tool:V().optional(),automation:V().optional(),section:V().optional(),preview:V().optional(),autosend:V().optional(),connect:_v().optional(),siteUrl:V().optional(),...f4},v4={...Yse,task:V().optional(),...tP,skill:Qw.skill,brand:Qw.brand},nm=_e(v4),pn=m$({component:()=>T.jsx(tse,{children:T.jsx(x_,{})})}),Zse=Me({getParentRoute:()=>pn,path:"/login",component:Ue(()=>je(()=>import("./login-BOvlg5d3.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),validateSearch:Gr(()=>_e({next:V().optional(),client_id:V().optional(),redirect_uri:V().optional(),response_type:V().optional(),state:V().optional(),scope:V().optional(),code_challenge:V().optional(),code_challenge_method:V().optional(),src:V().optional(),ref:V().optional()}))}),Qse=Me({getParentRoute:()=>pn,path:"/cli/auth-success",component:Ue(()=>je(()=>import("./cli-auth-success-DH7kWVXp.js"),__vite__mapDeps([7,6])))}),Jse=Me({getParentRoute:()=>pn,path:"/reset-password",component:Ue(()=>je(()=>import("./reset-password-DglLwMaI.js"),__vite__mapDeps([8,2]))),validateSearch:Gr(()=>_e({token:V().optional(),error:V().optional()}))}),Xse=Me({getParentRoute:()=>pn,path:"/auth/$pathname",component:Ue(()=>je(()=>import("./auth-catchall-sRD64Ua_.js"),[]))}),ele=Me({getParentRoute:()=>pn,path:"/oauth/callback",component:Ue(()=>je(()=>import("./oauth-callback-ClmQEIKF.js"),__vite__mapDeps([9,10,11])))}),tle=Me({getParentRoute:()=>pn,path:"/oauth/callback/ai-provider",component:Ue(()=>je(()=>import("./oauth-callback-ai-provider-BEcODIVJ.js"),[]))}),rm=Me({getParentRoute:()=>pn,path:"/_admin",component:Ue(()=>je(()=>import("./layout-Bt9GDku1.js"),__vite__mapDeps([12,13,14])))}),ole=Me({getParentRoute:()=>rm,path:"/",beforeLoad:()=>{throw Qo({to:"/_admin/users"})}}),ale=Me({getParentRoute:()=>rm,path:"/users",component:Ue(()=>je(()=>import("./users-CPf4QiX8.js"),__vite__mapDeps([15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])))}),nle=Me({getParentRoute:()=>rm,path:"/orgs",component:Ue(()=>je(()=>import("./orgs-BtMMolaf.js"),__vite__mapDeps([30,16,17,18,19,20,21,2,31,25,32,33,34,35,36,37,38,24,39,40,26,27,28])))}),rle=Me({getParentRoute:()=>rm,path:"/prompts",component:Ue(()=>je(()=>import("./prompts-Dv-GcOvr.js"),__vite__mapDeps([41,19,2,31,38,26])))}),ile=rm.addChildren([ole,ale,nle,rle]),oP=Me({getParentRoute:()=>pn,id:"shell",component:Ue(()=>je(()=>import("./shell-layout-BZqlKsir.js").then(e=>e.e),__vite__mapDeps([42,22,23,43,44,45,46,47,18,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,21,75,76,77,78,79,33,80,81,32,82,83,84,11,85,86,87,88,89,90,91,92,5,93,39,3,13,94,95,96,97])))}),sle=Me({getParentRoute:()=>oP,path:"/",beforeLoad:async()=>{const e=vse();if(e)throw Qo({to:"/$org",params:{org:e.org}});const t=localStorage.getItem(Bl.lastOrgSlug());if(t)throw Qo({to:"/$org",params:{org:t}});const{data:o}=await eN();if(!o)return;const a=o[0];throw Qo(a?{to:"/$org",params:{org:a.slug}}:{to:"/onboarding"})}}),lle=Me({getParentRoute:()=>pn,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await eN();if(e&&e.length>0)throw Qo({to:"/"})},component:Ue(()=>je(()=>import("./onboarding-CGzZ0sv3.js"),__vite__mapDeps([98,13,6,99,22,23,74,2,31,37,43,53,72,77])))}),b4=Gr(()=>_e({org:V().optional(),siteUrl:V().optional()})),cle=Me({getParentRoute:()=>pn,path:"/reports-onboarding",component:Ue(()=>je(()=>import("./reports-onboarding-cDW-coF4.js"),__vite__mapDeps([100,101,1,2,3,4,5,6,99,22,23,74,102,103,104,31,105,84,11,106,90,49,45,46,47,18,48,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,44,21,75,76,77,78,79,33,80,32,107,35,108,109,110,111,25,112,113,114,115,116,10,117,118,119]))),validateSearch:b4}),dle=Me({getParentRoute:()=>pn,path:"/commerce-onboarding",validateSearch:b4,beforeLoad:({search:e})=>{throw Qo({to:"/reports-onboarding",search:e})}}),ule=Me({getParentRoute:()=>pn,path:"/choose-editor",component:Ue(()=>je(()=>import("./choose-editor-BkDCbLK_.js"),__vite__mapDeps([120,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,33,80,13]))),validateSearch:Gr(()=>_e({site:V().optional(),domain:V().optional(),pageId:V().optional(),path:V().optional(),pathTemplate:V().optional()}))}),ple=Me({getParentRoute:()=>pn,path:"/report/$domain",component:Ue(()=>je(()=>import("./reports-FHtNLX4Y.js"),__vite__mapDeps([121,1,2,3,4,5,117,46,18,50,51,53,60,67,71,44,75,79,80,122]))),validateSearch:Gr(()=>_e({key:V().optional()}))}),Wv=Me({getParentRoute:()=>oP,path:"/$org",beforeLoad:({params:e})=>{fse({org:e.org})},component:Ue(()=>je(()=>import("./route-BJXtplSb.js"),__vite__mapDeps([123,124,66,125,126,33,107,35,127,128,129,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,42,22,81,32,88,89,90,91,3,13,94,95,96,97,131,132,14,133,104,31,34,38,134,135,136,137,138,139,140,141,142,143,144,29,27,28,102,103,2,145,146,147,40,148,149,150,151,152,153,154,155,25,156])))}),Yv=Me({getParentRoute:()=>Wv,id:"org-shell",pendingComponent:Md,component:Ue(()=>je(()=>import("./thread-route-WZYEwowr.js"),__vite__mapDeps([157,158,86,87,82,83,84,11,85,94,150,151,92,5,93,39,3,138,137,159,144,95,101,32,33,160,108,109,110,111,50,105,106,90,49,45,46,47,18,48,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,107,35,104,31,2,25,112,113,114,115,116,10,117,161,118])))}),mle=_e({sidepanel:TN,mainpanel:wN,main:ro([V(),Ze(0)]).optional(),thread:V().optional(),autosend:V().optional(),preview:V().optional(),virtualmcpid:V().optional()}),nr=Me({getParentRoute:()=>Yv,id:"agent-shell",validateSearch:mle,search:{middlewares:[Fz(["sidepanel"])]},pendingComponent:Md,component:Ue(()=>je(()=>import("./route-ChK4fAMe.js"),__vite__mapDeps([162,46,66,124,125,126,33,107,35,127,163,18,158,86,87,82,83,84,11,85,94,150,151,92,5,93,39,3,138,137,159,144,95,164,32,132,155,21,165,166,104,31,2,167,168,169,42,22,23,43,44,45,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,191,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,201,202,149,203,204,205,206,207,208,209,210,19,129,130,128,211,212,213,103,214,215,216,217,145,146,147,40,218,219,220,221,222,223,224,225,226])))}),gle=nm.extend({virtualmcpid:V().optional()}),hle=Me({getParentRoute:()=>nr,path:"/$taskId",validateSearch:gle,component:()=>null}),uo=Ue(()=>je(()=>import("./index-DoQDGqwe.js").then(e=>e.i),__vite__mapDeps([211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213])),"ChatLayoutPending"),io=Ue(()=>je(()=>import("./index-DoQDGqwe.js").then(e=>e.i),__vite__mapDeps([211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213])),"ChatLayoutError"),fle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/home",staticData:{pageTitle:"sidebar.navDestinations.home",defaultMain:"overview",mainView:"overview"},validateSearch:_e({connect:_v().optional(),siteUrl:V().optional()}),component:Ue(()=>je(()=>import("./home-Ui_P1zNp.js"),__vite__mapDeps([227,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,169,166,164,104,31,2,167,168,170,171,150,151,158,138,137,159,144,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,132,182,183,184,165,185,156,186,134,187,139,188,155,113,111,109,114,189,190,191,141,142,4,192,38,193,116,10,194,24,195,196,19,152,149,153,154,25,228,229,143,29])))}),vle=Me({getParentRoute:()=>nr,path:"/projects",validateSearch:nm,beforeLoad:({params:e,search:t})=>{const o=t.virtualmcpid?.trim();throw Qo(o?{to:"/$org/projects/$agentId",params:{org:e.org,agentId:o},search:a=>({...a,virtualmcpid:void 0}),hash:!0,replace:!0}:{to:"/$org/home",params:{org:e.org},search:a=>({...a,virtualmcpid:void 0}),hash:!0,replace:!0})}}),Oo=Me({errorComponent:io,getParentRoute:()=>nr,path:"/projects/$agentId",validateSearch:nm,component:x_}),ble=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/",staticData:{pageTitle:"page.overview",defaultMain:"overview",mainView:"overview"},component:Ue(()=>je(()=>import("./agent-overview-D-xUFh5m.js"),__vite__mapDeps([230,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,160,108,109,110,111,231,143,144,229,154,149,150,151,29,186,134,27,28])))}),yle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/tasks/{-$taskKey}",staticData:{pageTitle:"sidebar.navDestinations.tasks",defaultMain:"board",mainView:"board"},validateSearch:_e({task:V().optional(),...tP}),beforeLoad:({params:e,search:t})=>{const o=h4(e.taskKey,t);if(o)throw Qo({to:"/$org/projects/$agentId/tasks/{-$taskKey}",params:{org:e.org,agentId:e.agentId,taskKey:o?.taskKey??e.taskKey},search:o.search,hash:!0,replace:!0})},component:Ue(()=>je(()=>import("./project-tasks-A0hhN8Nq.js"),__vite__mapDeps([232,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,233,132,131,143,144,154,29,234,235,236,237,238,152,149,150,151,153,2,31,141,142,155,25,186,134,27,28,239,240,241,242,198,173,174,168,166,164,104,167,243,184,185,210,191,110,244,196,197,172,138,158,137,159,199,200,201,202,177,165,203,204,195,214,178,170,24,245,246,187,139])))}),Sle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/reports",staticData:{pageTitle:"sidebar.navDestinations.reports",defaultMain:"reports",mainView:"reports"},validateSearch:_e({connect:_v().optional(),siteUrl:V().optional()}),component:Ue(()=>je(()=>import("./project-reports-bU4am2h1.js"),__vite__mapDeps([247,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,248,101,2,160,108,109,110,111,231,118,119])))}),Zv=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/site-editor",staticData:{pageTitle:"sidebar.projectNav.siteEditor",defaultMain:"site-editor",mainView:"site-editor"},validateSearch:_e({autosend:V().optional(),...f4}),component:Ue(()=>je(()=>import("./agent-site-editor-DnmHDk2B.js"),__vite__mapDeps([249,245,158,86,87,82,83,84,11,85,94,150,151,92,5,93,39,3,138,137,159,144,95,42,22,23,43,44,45,46,47,18,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,21,75,76,77,78,79,33,80,81,32,88,89,90,91,13,96,97,127,131,107,35,103,175,206,207,250,224,223,25,141,142,149,154,171,251,208,209,210,205,252,253,254,163,164,132,155,125,165,166,104,31,2,167,168,169,170,34,172,173,174,27,28,136,176,177,178,179,180,181,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,191,4,192,38,193,116,10,194,24,195,196,197,198,199,200,201,202,126,203,204,255,256,211,129,124,130,128,212,213,257])))}),Tle=Me({getParentRoute:()=>Zv,path:"/",staticData:{defaultMain:"site-editor",mainView:"site-editor",siteEditorView:"preview"},component:Ue(()=>je(()=>import("./agent-site-editor-preview-D4tdhz1h.js"),__vite__mapDeps([258,259,215,130,62,69,191,84,11,216,83,201,167,82,85,163,18,158,86,87,94,150,151,92,5,93,39,3,138,137,159,144,95,164,107,35,32,33,132,155,21,125,165,166,104,31,2,168,169,42,22,23,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,126,149,203,204,208,209,210,217,145,146,147,40,218,246,127,260,205,223,254,261,140,262,224,241,234,37,20,25,263,103,255,264,253,252,251,115,226,19,212,154,152,153])))}),wle=Me({getParentRoute:()=>Zv,path:"/content",staticData:{defaultMain:"content",mainView:"content",siteEditorView:"content"},component:Ue(()=>je(()=>import("./agent-site-editor-content-Dtl21q2k.js").then(e=>e.C),__vite__mapDeps([265,259,215,130,62,69,191,84,11,216,83,201,167,82,85,163,18,158,86,87,94,150,151,92,5,93,39,3,138,137,159,144,95,164,107,35,32,33,132,155,21,125,165,166,104,31,2,168,169,42,22,23,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,126,149,203,204,208,209,210,217,145,146,147,40,218,246,103,140,260,205,223,254,261,262,224,241,234,37,20,25,263,255,266,19,154,152,153])))}),_le=Me({getParentRoute:()=>Zv,path:"/code",staticData:{defaultMain:"code",mainView:"code",siteEditorView:"code"},validateSearch:_e({file:V().optional()}),component:Ue(()=>je(()=>import("./agent-site-editor-code-J9_fgDSP.js"),__vite__mapDeps([267,259,215,130,62,69,191,84,11,216,83,201,167,82,85,163,18,158,86,87,94,150,151,92,5,93,39,3,138,137,159,144,95,164,107,35,32,33,132,155,21,125,165,166,104,31,2,168,169,42,22,23,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,126,149,203,204,208,209,210,217,145,146,147,40,218,246,19])))}),Cle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/automations",staticData:{pageTitle:"settings.nav.automations",defaultMain:"automations",mainView:"automations"},beforeLoad:({params:e,search:t})=>{const o=t.automation;if(o)throw Qo({to:"/$org/projects/$agentId/automations/$automationId",params:{org:e.org,agentId:e.agentId,automationId:o},search:a=>({...a,automation:void 0}),hash:!0,replace:!0})},component:Ue(()=>je(()=>import("./agent-automations-dWdakcNy.js"),__vite__mapDeps([268,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,20,19,269,270,103])))}),Ple=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/automations/$automationId",staticData:{pageTitle:"settings.nav.automations",defaultMain:"automations",mainView:"automation"},validateSearch:_e({automationView:ia(["settings","runs"]).optional()}),component:Ue(()=>je(()=>import("./agent-automation-CKv85wVR.js"),__vite__mapDeps([271,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,180,37,131,164,191,216,272,132,158,150,151,138,137,159,144,179,2,34,181,182,273,269,198,274,183,184,166,104,31,167,168,165,185,175,262,224,103,275,141,142,17,19,195,186,134,214,244,196,197,27,28,173,172,174,199,200,201,202,177,149,203,204,194])))}),kle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/settings",staticData:{pageTitle:"sidebar.navDestinations.settings",defaultMain:"settings",mainView:"settings"},component:Ue(()=>je(()=>import("./agent-settings-wgb9T58o.js"),__vite__mapDeps([276,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,277,2,131,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),xle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/assets",staticData:{pageTitle:"common.mainPanelTabs.assets",defaultMain:"assets",mainView:"assets"},component:Ue(()=>je(()=>import("./agent-assets-CJkjsRGZ.js"),__vite__mapDeps([281,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,259,215,191,216,201,167,163,158,150,151,138,137,159,144,164,132,155,165,166,104,31,2,168,169,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,149,203,204,208,209,210,217,145,146,147,40,218,103,20,25,263])))}),Ele=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/git",staticData:{pageTitle:"common.mainPanelTabs.reviewChanges",defaultMain:"git",mainView:"git"},component:Ue(()=>je(()=>import("./agent-git-Bun_byZu.js"),__vite__mapDeps([282,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,259,215,191,216,201,167,163,158,150,151,138,137,159,144,164,132,155,165,166,104,31,2,168,169,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,149,203,204,208,209,210,217,145,146,147,40,218,250,224,223,255])))}),Rle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/hosting",staticData:{pageTitle:"common.mainPanelTabs.hosting",defaultMain:"hosting",mainView:"hosting"},component:Ue(()=>je(()=>import("./agent-hosting-_yuR1DpC.js"),__vite__mapDeps([283,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,284,40,103,238,17,198,2,31,34,277,131,140,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Ale=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/e2e",staticData:{pageTitle:"common.mainPanelTabs.e2e",defaultMain:"e2e",mainView:"e2e"},component:Ue(()=>je(()=>import("./agent-e2e-DngESQK5.js"),__vite__mapDeps([285,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,2,31,103,34,17,284,40,198,175,277,131,140,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Dle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/analytics",staticData:{pageTitle:"common.mainPanelTabs.analytics",defaultMain:"analytics",mainView:"analytics"},component:Ue(()=>je(()=>import("./agent-analytics-gmwKv0wU.js"),__vite__mapDeps([286,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,180,2,31,17,287,288,289,103,284,40,290,277,131,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Ole=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/experiments",staticData:{defaultMain:"experiments",mainView:"experiments"},component:Ue(()=>je(()=>import("./agent-experiments-DndV4qWf.js"),__vite__mapDeps([291,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,2,31,17,34,284,40,277,131,140,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Ile=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/cdn",staticData:{pageTitle:"common.mainPanelTabs.cdn",defaultMain:"cdn",mainView:"cdn"},component:Ue(()=>je(()=>import("./agent-monitor-BePlvtxo.js"),__vite__mapDeps([292,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,287,288,289,284,131,40,290,293,294,295,277,2,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207,246,187,139])))}),Mle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/apps/$connectionId/$toolName",staticData:{pageTitle:"page.app",defaultMain:"app",mainView:"app"},component:Ue(()=>je(()=>import("./agent-app-h4eJVd5U.js"),__vite__mapDeps([296,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,217,297,164,177,216,208,171,150,151,158,138,137,159,144,209,210,199,200,201,101,106,108,109,110,111,104,31,2,25,112,113,114,115,116,10,117])))}),Lle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/views/$viewId",staticData:{pageTitle:"page.view",defaultMain:"view",mainView:"view"},component:Ue(()=>je(()=>import("./agent-view-DEXyutQz.js"),__vite__mapDeps([298,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,297,164,177,216,208,171,150,151,158,138,137,159,144,209,210,199,200,201,101,106,108,109,110,111,104,31,2,25,112,113,114,115,116,10,117,277,131,140,34,240,273,19,278,28,191,103,38,274,188,155,189,190,141,142,4,192,132,193,194,24,195,196,204,185,180,20,279,165,167,37,145,146,147,40,148,218,152,149,153,154,280,202,207])))}),Nle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/outputs/file",staticData:{pageTitle:"page.file",defaultMain:"file",mainView:"file"},validateSearch:_e({key:V().optional()}),component:Ue(()=>je(()=>import("./agent-file-B1Q9d3_o.js"),__vite__mapDeps([299,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,204,222,185,223,224,174,168,203,158,150,151,138,137,159,144,277,2,131,140,34,240,113,111,109,114,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),Fle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/outputs/deck",staticData:{pageTitle:"page.document",defaultMain:"deck",mainView:"deck"},validateSearch:_e({path:V().optional()}),component:Ue(()=>je(()=>import("./agent-deck-Cg8Utg8g.js"),__vite__mapDeps([300,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,225,185,2,131,277,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,204,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),Ble=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/library/file",staticData:{pageTitle:"page.file",defaultMain:"library-file",mainView:"library-file"},validateSearch:_e({path:V().optional()}),component:Ue(()=>je(()=>import("./agent-library-file-DIb4hWWG.js"),__vite__mapDeps([301,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,221,222,185,223,224,204,174,168,225,2,131,159,277,140,34,240,113,111,109,114,158,150,151,138,137,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),jle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/connect-sources",staticData:{pageTitle:"settings.nav.connect",defaultMain:"connect-sources",mainView:"connect-sources"},component:Ue(()=>je(()=>import("./agent-connect-sources-DuEfOhDE.js"),__vite__mapDeps([302,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,105,101,106,108,109,110,111,104,31,2,25,112,113,114,115,116,10,117,161,118])))}),Ule=Me({getParentRoute:()=>Oo,path:"/$legacyView",component:()=>null}),zle=Me({getParentRoute:()=>nr,path:"/agents",validateSearch:nm,beforeLoad:({params:e,search:t})=>{const o=t.virtualmcpid?.trim();throw Qo(o?{to:"/$org/projects/$agentId",params:{org:e.org,agentId:o},search:a=>a,hash:!0,replace:!0}:{to:"/$org/projects",params:{org:e.org},search:a=>a,hash:!0,replace:!0})}}),$le=Me({getParentRoute:()=>nr,path:"/agents/$",validateSearch:nm,beforeLoad:({params:e,location:t})=>{const o=e._splat?.split("/").find(Boolean);if(!g4(o))return;const a=Use(t.pathname);if(!a)return;const n=t.hash?`#${t.hash}`:"";throw Qo({href:`${a}${t.searchStr}${n}`,replace:!0})},component:Ue(()=>je(()=>import("./legacy-agents-deep-DXqm-_4D.js"),__vite__mapDeps([303,219,87])))}),qle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/tasks/{-$taskKey}",staticData:{pageTitle:"sidebar.navDestinations.tasks",defaultMain:"board",mainView:"board"},validateSearch:_e({task:V().optional(),...tP}),beforeLoad:({params:e,search:t})=>{const o=h4(e.taskKey,t);if(o)throw Qo({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:o.taskKey},search:o.search,hash:!0,replace:!0})},component:Ue(()=>je(()=>import("./tasks-CL9cD9cE.js"),__vite__mapDeps([304,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,233,132,131,143,144,154,29,234,235,236,237,238,152,149,150,151,153,2,31,141,142,155,25,186,134,27,28,239,240,241,242,198,173,174,168,166,164,104,167,243,184,185,210,191,110,244,196,197,172,138,158,137,159,199,200,201,202,177,165,203,204,195,214,178,170,24,245,246,187,139])))}),Vle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/taskboard-analytics",staticData:{defaultMain:"board",mainView:"board"},component:Ue(()=>je(()=>import("./taskboard-analytics-BFNAPJBW.js"),__vite__mapDeps([305,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,287,288,289,17,293,294,295,235,236,131,34,175])))}),Hle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/reports",staticData:{pageTitle:"sidebar.navDestinations.reports",defaultMain:"reports",mainView:"reports"},validateSearch:_e({connect:_v().optional(),siteUrl:V().optional()}),component:Ue(()=>je(()=>import("./reports-CyWZrUZL.js"),__vite__mapDeps([306,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,248,101,2,160,108,109,110,111,231,118,119])))}),Gle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/library",staticData:{pageTitle:"sidebar.navDestinations.library",defaultMain:"files",mainView:"files"},validateSearch:_e(Qw),component:Ue(()=>je(()=>import("./library-G0Z3LZYZ.js"),__vite__mapDeps([307,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,159,185,308,204,309,310,238,237,103,2,25,38,174,168,225,131,220,221,222,223,224,311])))}),Kle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/discover",staticData:{pageTitle:"sidebar.navDestinations.discover",defaultMain:"discover",mainView:"discover"},component:Ue(()=>je(()=>import("./discover-C5CHE7rM.js"),__vite__mapDeps([312,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,154,191,186,134,147,146,40,218])))}),Wle=Me({getParentRoute:()=>Wv,path:"/members",beforeLoad:({params:e})=>{throw Qo({to:"/$org/settings/members",params:{org:e.org}})}}),Yle=_e({main:ro([V(),Ze(0)]).optional(),virtualmcpid:V().optional(),...v4,sidepanel:TN,mainpanel:wN,thread:V().optional()}),Zle=Me({getParentRoute:()=>Yv,path:"/",validateSearch:Yle,pendingComponent:Md,component:Ue(()=>je(()=>import("./index-DezIICsH.js"),__vite__mapDeps([313,219,87])))}),Qle=Me({getParentRoute:()=>Yv,path:"/t/$taskKey",beforeLoad:({params:e})=>{throw Qo({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:e.taskKey},search:t=>t,hash:!0,replace:!0})}}),to=Me({staticData:{pageTitle:"sidebar.navDestinations.settings"},getParentRoute:()=>Wv,path:"/settings",pendingComponent:Md,component:Ue(()=>je(()=>import("./route-DtQGV8Z2.js"),__vite__mapDeps([314,125,213,66,124,126,33,107,35,127,128,82,83,84,11,85])))}),Jle=Me({getParentRoute:()=>to,path:"/",component:Ue(()=>je(()=>import("./index-redirect-BrDjHxW8.js"),__vite__mapDeps([315,316])))}),Xle=Me({staticData:{pageTitle:"settings.nav.connections"},getParentRoute:()=>to,path:"/connections",component:Ue(()=>je(()=>import("./connections-Cma51BMt.js"),__vite__mapDeps([317,113,111,109,84,11,114,318,18,63,107,35,319,24,20,21,194,189,190,191,95,39,93,141,142,4,5,192,151,90,49,45,46,47,48,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,44,75,76,77,23,78,79,33,80,19,320,103,195,321,125,32,132,104,31,2,34,38,83,201,193,116,10,180]))),validateSearch:Gr(()=>_e({action:ia(["create"]).optional(),tab:ia(["all","connected"]).optional()}))}),ece=Me({staticData:{pageTitle:"settings.nav.connections"},getParentRoute:()=>to,path:"/connections/$appSlug",component:Ue(()=>je(()=>import("./connection-detail-DTaKY7hs.js"),__vite__mapDeps([322,113,111,109,84,11,114,19,193,2,74,76,323,124,66,125,126,33,107,35,216,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,44,21,75,77,23,78,79,80,191,190,95,39,93,34,288,324,325,89,131,83,326,149,92,5,150,151,85,279,24,201,10,186,134,22,165,90,104,31,320,103,327,287,289,290,294,295,175,192,200,155]))),validateSearch:Gr(()=>_e({tab:V().optional()}))}),tce=Me({staticData:{pageTitle:"page.item"},getParentRoute:()=>to,path:"/connections/$appSlug/$collectionName/$itemId",component:Ue(()=>je(()=>import("./collection-detail-BeZE_OzU.js"),__vite__mapDeps([328,19,84,11,104,31,2,38,323,124,66,125,126,33,107,35,216,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,191,113,111,109,114,190,95,39,93,34,288,324,325,89,131,83,326,149,92,5,150,151,85,200,201,242,240,192,279,24,10,199,90,158,86,87,82,94,3,138,137,159,144,42,22,81,32,88,91,13,96,97,262,224,284]))),validateSearch:Gr(()=>_e({replayId:V().optional()}))}),oce=Me({staticData:{pageTitle:"orgs.monitoring.title"},getParentRoute:()=>to,path:"/monitor",component:Ue(()=>je(()=>import("./index-CP_l4FUF.js"),__vite__mapDeps([329,20,21,19,330,331,316,197,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,75,76,77,23,78,79,33,80,27,28,198,173,172,174,32,168,125,86,87,82,83,84,11,85,107,35,138,158,94,150,151,92,5,93,39,3,137,159,144,95,199,200,201,202,164,177,167,42,22,81,88,89,90,91,13,96,97,126,191,149,165,166,104,31,2,203,204,192,24,131,262,224,186,134,332,180,34,140,241,38,194,37,242,327,287,288,289,290,294,295,244,196,142,195,214,17,275,141,269]))),validateSearch:Gr(()=>_e({tab:ia(["overview","audit","dashboards","threads","automations"]).default("overview"),from:V().default("now-30m"),to:V().default("now"),connectionId:Fe(V()).optional().default([]),virtualMcpId:Fe(V()).optional().default([]),tool:V().default(""),status:ia(["all","success","errors"]).default("all"),search:V().default(""),page:Lt().optional(),streaming:$t().default(!0),propertyFilters:V().default(""),hideSystem:$t().default(!1)}))}),ace=Me({staticData:{pageTitle:"settings.nav.general"},getParentRoute:()=>to,path:"/general",component:Ue(()=>je(()=>import("./general-DmEpfTOj.js"),__vite__mapDeps([333,134,274,22,23,2,334,37,54,44,95,39,93,191,84,11,335,24,34,35,36,103,330,331,316])))}),nce=Me({staticData:{pageTitle:"settings.nav.connect"},getParentRoute:()=>to,path:"/connect",pendingComponent:Ni("connect"),component:Ue(()=>je(()=>import("./connect-2dCioIhn.js"),__vite__mapDeps([336,242,34,35,36,175,173,55,65,67,228,337,46,74,76,103,32,33,2,31,84,11,330,331,316])))}),rce=Me({staticData:{pageTitle:"settings.nav.billing"},getParentRoute:()=>to,path:"/ai-providers",pendingComponent:Ni("billing"),component:Ue(()=>je(()=>import("./ai-providers-C-TXNfNO.js"),__vite__mapDeps([338,46,137,53,95,39,93,272,32,33,132,125,158,86,87,82,83,84,11,85,94,150,151,92,5,3,138,159,144,179,180,2,34,35,36,48,47,65,59,21,181,69,22,23,60,81,55,58,64,75,182,274,176,103,178,139,74,76,278,28,330,331,316])))}),ice=Me({staticData:{pageTitle:"settings.nav.billing"},getParentRoute:()=>to,path:"/billing",beforeLoad:({params:e})=>{throw Qo({to:"/$org/settings/ai-providers",params:{org:e.org}})}}),sce=Me({staticData:{pageTitle:"settings.nav.billing"},getParentRoute:()=>to,path:"/infra-billing",pendingComponent:Ni("billing"),component:Ue(()=>je(()=>import("./infra-billing-B9q0Y09E.js"),__vite__mapDeps([339,56,68,24,332,180,36,88,89,32,33,21,131,34,35,17,289,288,295,290,330,331,316])))}),lce=Me({staticData:{pageTitle:"settings.nav.secrets"},getParentRoute:()=>to,path:"/secrets",component:Ue(()=>je(()=>import("./secrets-C-lTnGEG.js"),__vite__mapDeps([340,46,74,23,78,32,33,2,31,34,35,36,38,280,330,331,316])))}),cce=Me({staticData:{pageTitle:"settings.nav.connect"},getParentRoute:()=>to,path:"/api-keys",pendingComponent:Ni("connect"),component:Ue(()=>je(()=>import("./api-keys-fPrGPt8I.js"),__vite__mapDeps([341,337,46,55,65,74,76,103,32,33,2,31,84,11,330,331,316])))}),dce=Me({staticData:{pageTitle:"settings.nav.storage"},getParentRoute:()=>to,path:"/buckets",pendingComponent:Ni("storage"),component:Ue(()=>je(()=>import("./buckets-CfuKv1Yu.js"),__vite__mapDeps([342,46,74,76,103,32,33,2,31,34,35,36,37,38,147,330,331,316])))}),uce=Me({staticData:{pageTitle:"settings.nav.repositories"},getParentRoute:()=>to,path:"/repositories",validateSearch:_e({git_error:V().optional().catch(void 0),git_flow:V().uuid().optional().catch(void 0),git_return:$t().optional().catch(void 0)}),pendingComponent:Ni("repositories"),component:Ue(()=>je(()=>import("./repositories-BhilcMMp.js"),__vite__mapDeps([343,153,48,68,74,107,35,32,33,2,31,154,141,142,22,23,155,21,25,50,180,103,24,242,330,331,316])))}),pce=Me({staticData:{pageTitle:"settings.nav.storage"},getParentRoute:()=>to,path:"/synced-repos",pendingComponent:Ni("storage"),component:Ue(()=>je(()=>import("./synced-repos-DMBpwLPD.js"),__vite__mapDeps([344,74,103,32,33,2,153,48,68,107,35,31,154,141,142,22,23,155,21,25,308,185,57,58,61,62,65,72,76,80,204,309,60,310,330,331,316])))}),mce=Me({staticData:{pageTitle:"settings.nav.tasks"},getParentRoute:()=>to,path:"/task-board",component:Ue(()=>je(()=>import("./tasks-DG1OcC7g.js"),__vite__mapDeps([345,180,2,38,47,54,73,74,76,236,88,89,32,33,21,131,37,183,184,166,164,104,31,167,168,125,86,87,82,83,84,11,85,107,35,45,46,18,48,49,50,51,52,43,53,36,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,44,75,77,23,78,79,80,158,94,150,151,92,5,93,39,3,138,137,159,144,95,179,34,181,22,81,165,185,310,103,334,191,330,331,316])))}),gce=Me({getParentRoute:()=>to,path:"/tasks",beforeLoad:({params:e})=>{throw Qo({to:"/$org/settings/task-board",params:{org:e.org}})}}),hce=Me({staticData:{pageTitle:"settings.nav.members"},getParentRoute:()=>to,path:"/members",pendingComponent:Ni("members"),component:Ue(()=>je(()=>import("./members-Dr93JJNd.js"),__vite__mapDeps([346,318,18,63,107,35,319,24,20,21,16,17,19,133,32,33,104,31,34,36,38,134,135,22,23,27,28,29,186,347,103,57,65,76,180,88,89,131,74,239,330,331,316])))}),fce=Me({staticData:{pageTitle:"settings.nav.members"},getParentRoute:()=>to,path:"/roles",pendingComponent:Ni("members"),component:Ue(()=>je(()=>import("./roles-ejZYkZ6t.js"),__vite__mapDeps([348,135,134,347,24,103,57,74,76,16,17,18,19,20,21,181,90,49,45,46,47,48,50,51,52,43,53,36,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,44,75,77,23,78,79,33,80,195,180,196,142,84,11,155,114,186,29,191,83,137,22,37,107,35,91,82,85,331,316]))),validateSearch:Gr(()=>_e({role:V().optional()}))}),vce=Me({staticData:{pageTitle:"settings.nav.security"},getParentRoute:()=>to,path:"/sso",component:Ue(()=>je(()=>import("./sso-CuVFM4fO.js"),__vite__mapDeps([349,335,24,2,34,35,36,103,37,96,76,330,331,316])))}),bce=Me({staticData:{pageTitle:"settings.nav.profile"},getParentRoute:()=>to,path:"/profile",component:Ue(()=>je(()=>import("./profile-C6XwXDvx.js"),__vite__mapDeps([350,22,23,32,33,325,34,35,36,76,77,37,176,2,69,70,73,274,156])))}),yce=Me({staticData:{pageTitle:"settings.nav.store"},getParentRoute:()=>to,path:"/store",component:Ue(()=>je(()=>import("./store-BObHOaSl.js"),__vite__mapDeps([351,46,74,76,2,37,22,23,131,191,84,11,190,95,39,93,330,331,316])))}),Sce=Me({staticData:{pageTitle:"settings.nav.store"},getParentRoute:()=>to,path:"/registry",component:Ue(()=>je(()=>import("./registry-CPfrLNMd.js"),__vite__mapDeps([352,330,331,316])))}),Tce=Me({staticData:{pageTitle:"settings.nav.store"},getParentRoute:()=>to,path:"/store/registry",component:Ue(()=>je(()=>import("./store-registry-CvihOVf3.js"),__vite__mapDeps([353,330,331,316])))}),wce=Me({staticData:{pageTitle:"settings.nav.agents"},getParentRoute:()=>to,path:"/agents",component:Ue(()=>je(()=>import("./agents-list-Dt2PPUuO.js"),__vite__mapDeps([354,83,84,11,57,59,76,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,21,75,77,23,78,79,33,80,278,28,149,92,5,93,39,150,151,85,95,19,326,191,116,10,216,113,111,109,114,110,112,32,155,154,103,20,152,153,107,35,2,31,141,142,22,25])))}),_ce=Me({staticData:{pageTitle:"settings.nav.automations"},getParentRoute:()=>to,path:"/automations",component:Ue(()=>je(()=>import("./automations-Bw4S0ob0.js"),__vite__mapDeps([355,74,80,20,21,19,269,84,11,149,83,92,5,93,39,150,151,85,270,103,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,44,75,76,77,23,78,79,33,330,331,316])))}),Cce=Me({staticData:{pageTitle:"settings.nav.skills"},getParentRoute:()=>to,path:"/skills",component:Ue(()=>je(()=>import("./skills-DJUf3GIG.js"),__vite__mapDeps([356,57,71,76,77,80,20,21,103,19,194,24,309,60,185,159,311,32,33,174,55,58,52,168,125,86,87,82,83,84,11,85,222,223,64,224,204,310])))}),Pce=to.addChildren([Jle,Xle,ece,tce,wce,_ce,Cce,oce,ace,nce,rce,ice,sce,lce,cce,dce,uce,pce,mce,gce,hce,fce,vce,bce,yce,Tce,Sce]),kce=Zv.addChildren([Tle,wle,_le]),xce=Oo.addChildren([ble,yle,Sle,kce,Cle,Ple,kle,xle,Ele,Rle,Ale,Dle,Ole,Ile,Mle,Lle,Nle,Fle,Ble,jle,Ule]),Ece=nr.addChildren([hle,fle,vle,xce,zle,$le,qle,Vle,Hle,Gle,Kle]),Rce=Yv.addChildren([Zle,Qle,Ece]),Ace=Wv.addChildren([Rce,Wle,Pce]),Dce=oP.addChildren([sle,Ace]),Oce=pn.addChildren([Dce,ile,lle,cle,dle,ule,ple,Zse,Qse,Jse,Xse,ele,tle]);function Ice(){const e=Ie.c(16),t=ar();let o;e[0]!==t?(o=t("common.index.pageNotFound"),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==o?(a=T.jsx("h3",{className:"text-lg font-medium text-foreground",children:o}),e[2]=o,e[3]=a):a=e[3];let n;e[4]!==t?(n=t("common.index.pageNotFoundDescription"),e[4]=t,e[5]=n):n=e[5];let i;e[6]!==n?(i=T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:n}),e[6]=n,e[7]=i):i=e[7];let l;e[8]!==t?(l=t("common.index.goBack"),e[8]=t,e[9]=l):l=e[9];let c;e[10]!==l?(c=T.jsx("button",{type:"button",onClick:Mce,className:"text-sm text-primary hover:underline",children:l}),e[10]=l,e[11]=c):c=e[11];let u;return e[12]!==a||e[13]!==i||e[14]!==c?(u=T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[a,i,c]})}),e[12]=a,e[13]=i,e[14]=c,e[15]=u):u=e[15],u}function Mce(){return window.history.back()}const Qv=C$({routeTree:Oce,defaultPendingComponent:Md,defaultPendingMs:200,defaultPendingMinMs:500,defaultNotFoundComponent:Ice});function xe(...e){return SN(lC(e))}function Lce(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function zo({error:e,localization:t,localizeErrors:o=!0}){var a;const n="Request failed";if(!o)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:n;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||n}function $l(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Jw(e,t){for(const o in e)if(e[o]===t)return o}function Np(e,t){let o=V().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(o=o.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(o=o.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(o=o.regex(e.regex,{message:t?.INVALID_PASSWORD})),o}var Nce={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},Fce={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},Bce={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},jce={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},Uce={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},zce={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},$ce={...Uce,...zce},qce={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Vce={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Hce={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Gce={INVALID_SESSION_TOKEN:"Invalid session token"},Kce={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},Wce={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},Yce={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},Zce={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},Qce={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},Jce={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},Xce={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},ede={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...jce,...Nce,...Fce,...Bce,...$ce,...qce,...Vce,...Hce,...Gce,...Kce,...Wce,...Yce,...Zce,...Qce,...Jce,...Xce},tde={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},ZO={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},QO={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};const y4=R.createContext({});function S4(){return R.useContext(y4)}var F0,JO;function ode(){if(JO)return F0;JO=1;var e=function(){};return F0=e,F0}var ade=ode();const nde=Ll(ade);function rde({async:e,appendTo:t,defer:o,id:a,nonce:n,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),o!==void 0&&(l.defer=o),a&&(l.id=a),n&&l.setAttribute("nonce",n),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var ide=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]]);return o};let hp=null,Fp=!1;const ov=new Set,av=new Set,sde=typeof window<"u",ud="___grecaptcha_cfg",T4=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function lde(){if(!sde)return;function e(o){if(Fp)o();else{window[ud]||(window[ud]={});const a=window[ud];a.fns||(a.fns=[]),a.fns.push(o)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){Fp=!0;for(const o of av)o();av.clear()}window[T4]=t}function cde({language:e,onLoadCallbackName:t,render:o,useEnterprise:a=!1,useRecaptchaNet:n=!1}){const i=n?"recaptcha.net":"google.com",l=a?"enterprise.js":"api.js",c=new URLSearchParams({render:o});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${i}/recaptcha/${l}?${c.toString()}`}function dde({language:e,render:t,scriptProps:o,useEnterprise:a,useRecaptchaNet:n}){const i={id:"google-recaptcha-v3"},l=cde({language:e,onLoadCallbackName:T4,render:t,useEnterprise:a,useRecaptchaNet:n});if(hp){if(hp!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}hp=l,rde(Object.assign(Object.assign(Object.assign({},i),o),{src:l}))}function ude(e){if(!window[ud])return;const t=window[ud];t.clients&&delete t.clients[e]}function pde(e,t){var{onLoadCallback:o,onLoadCallbackName:a}=t,n=ide(t,["onLoadCallback","onLoadCallbackName"]);if(ov.size===0&&lde(),dde(n),ov.add(e),o&&(Fp?o():av.add(o)),a){let i=function(){if(!a)return;const l=window[a];typeof l=="function"&&l()};Fp?i():av.add(i)}}function mde(e){var t,o,a;ov.delete(e),ov.size===0&&(window.grecaptcha=void 0,window[ud]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(o=document.querySelector(`script[src="${hp}"]`))===null||o===void 0||o.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),hp=null,Fp=!1)}let XO=!1;function gde({container:e,children:t,language:o,reCaptchaKey:a,scriptProps:n,useEnterprise:i,useRecaptchaNet:l}){var c,u,p,g,m,f,v;const b=R.useId(),[S,C]=R.useState(null),[w,_]=R.useState(null),E=R.useRef(!1);R.useEffect(()=>{function D(){var O;const N=i?(O=window.grecaptcha)===null||O===void 0?void 0:O.enterprise:window.grecaptcha;if(!N)throw new Error("reCAPTCHA not found");if(!N.ready)throw new Error("reCAPTCHA ready callback not found");N.ready(()=>{C(N)})}return pde(b,{language:o,onLoadCallback:D,onLoadCallbackName:n?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:n?.appendTo,async:n?.async,defer:n?.defer,id:n?.id,nonce:n?.nonce},useEnterprise:i,useRecaptchaNet:l}),()=>{mde(b),C(null)}},[e?.element,b,o,a,n?.appendTo,n?.async,n?.defer,n?.id,n?.nonce,n?.onLoadCallbackName,i,l]),R.useEffect(()=>{var D,O,N;if(!e?.element||!S?.render)return;const $={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((D=e.parameters)===null||D===void 0?void 0:D.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},F=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!F)throw new Error("reCAPTCHA container element not found");const z=S.render(F,$);return!((O=e?.parameters)===null||O===void 0)&&O.hidden&&(XO||(nde(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),XO=!0),(N=F.querySelector(".grecaptcha-badge"))===null||N===void 0||N.style.setProperty("display","none")),_(z),E.current=!0,()=>{_(null),E.current=!1,ude(z),F.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.badge,(u=e?.parameters)===null||u===void 0?void 0:u.hidden,(p=e?.parameters)===null||p===void 0?void 0:p.callback,(g=e?.parameters)===null||g===void 0?void 0:g.errorCallback,(m=e?.parameters)===null||m===void 0?void 0:m.expiredCallback,(f=e?.parameters)===null||f===void 0?void 0:f.tabindex,(v=e?.parameters)===null||v===void 0?void 0:v.theme,S,a]);const k=!!e?.element,x=k?w:a,A=R.useMemo(()=>x!==null&&S?.execute?D=>{if(x===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return k&&!E.current?(console.warn("Client ID not mounted"),null):S.execute(x,{action:D})}:void 0,[x,S,k]);return T.jsx(y4.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:S},children:t})}var hde=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const o={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,o),this.notify(e)}setRefetching(e,t){const o=this.cache.get(e);o&&(o.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const o of t)this.notify(o)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const o=this.listeners.get(e);o&&(o.delete(t),o.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const o=Array.from(t);for(const a of o)a()}}},Hn=new hde;function fde(){return()=>{}}function Fi(){return R.useSyncExternalStore(fde,()=>!0,()=>!1)}function w4(){const[e,t]=R.useState();return R.useEffect(()=>{const o=()=>{const n=document.documentElement.getAttribute("lang");t(n??void 0)};o();const a=new MutationObserver(n=>{for(const i of n)i.attributeName==="lang"&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function aP(){const[e,t]=R.useState("light");return R.useEffect(()=>{const o=()=>{var n;const i=document.documentElement.classList.contains("dark")||((n=document.documentElement.getAttribute("style"))==null?void 0:n.includes("color-scheme: dark"));t(i?"dark":"light")};o();const a=new MutationObserver(n=>{for(const i of n)(i.attributeName==="style"||i.attributeName==="class")&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function vde({children:e}){const t=Fi(),{captcha:o}=R.useContext(yt);return o?.provider!=="google-recaptcha-v3"?e:T.jsxs(gde,{reCaptchaKey:o.siteKey,useEnterprise:o.enterprise,useRecaptchaNet:o.recaptchaNet,children:[t&&T.jsx("style",{children:`
160
+ `),m=u;g.length>m;m++){var f=g[m];if(1024>=f.length){var v=eO.test(f)?f.replace(eO,"$1"):f;if(!v.match(/\S*Error: /)){for(var b of i){var S=b(v,a);if(S){p.push(S);break}}if(p.length>=50)break}}}return(function(C){if(!C.length)return[];var w=Array.from(C);return w.reverse(),w.slice(0,50).map((_=>{return Oe({},_,{filename:_.filename||(E=w,E[E.length-1]||{}).filename,function:_.function||_d});var E}))})(p)}})("web:javascript",jne,$ne)),this._instance=e,this.fo=(t=(o=this._instance.persistence)==null?void 0:o.get_property(Sw))!==null&&t!==void 0?t:[],this.mo=Bf(this.yo()),this.bo=new ere(this.mo)}onConfigChange(){this.mo=Bf(this.yo()),this.bo.setConfig(this.mo)}onRemoteConfig(e){var t,o,a;if("errorTracking"in e){var n=(t=(o=e.errorTracking)==null?void 0:o.suppressionRules)!==null&&t!==void 0?t:[],i=(a=e.errorTracking)==null?void 0:a.captureExtensionExceptions;this.fo=n,this._instance.persistence&&this._instance.persistence.register({[Sw]:this.fo,[Tw]:i})}}get _o(){var e,t=!!this._instance.get_property(Tw),o=this._instance.config.error_tracking.captureExtensionExceptions;return(e=o??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(!Co(e)||e.trim().length===0)return void wi.warn("Ignoring exception step because message must be a non-empty string");var o=this.wo(t),{sanitizedProperties:a,droppedKeys:n}=(function(i){if(!i)return{sanitizedProperties:{},droppedKeys:[]};var l=[];return{sanitizedProperties:Object.keys(i).reduce(((c,u)=>Xne.has(u)?(l.push(u),c):(c[u]=i[u],c)),{}),droppedKeys:l}})(o);n.length>0&&wi.warn("Ignoring reserved exception step fields",{droppedKeys:n}),this.bo.add(Oe({[Nf]:e,[Ff]:new Date().toISOString()},a))}catch(i){wi.error("Failed to add exception step. Ignoring breadcrumb.",i)}}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 wi.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 wi.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 wi.info("Skipping exception capture because it was thrown by the PostHog SDK")}var o=this.mo.enabled&&Pt(e.$exception_steps)?this.To(e):e;try{var a=this._instance.capture("$exception",o,{_noTruncate:!0,_batchKey:"exceptionEvent",en:!0});return a&&this.bo.clear(),a}catch(n){return wi.error("Failed to capture exception event. Dropping this exception.",n),void this.bo.clear()}}catch(n){return void wi.error("Failed to process exception event. Ignoring this exception.",n)}}To(e){try{var t=this.bo.getAttachable();return t.length===0?e:Oe({},e,{$exception_steps:t})}catch(o){return wi.error("Failed to read buffered exception steps. Capturing exception without steps.",o),e}}So(e){this.mo.enabled&&this.bo.add({[Nf]:e,[Ff]:new Date().toISOString()})}wo(e){return No(e)?Oe({},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(((o,a)=>{var{type:n,value:i}=a;return Co(n)&&n.length>0&&o.$exception_types.push(n),Co(i)&&i.length>0&&o.$exception_values.push(i),o}),{$exception_types:[],$exception_values:[]});return this.fo.some((o=>{var a=o.values.map((n=>{var i,l=D3[n.operator],c=Mt(n.value)?n.value:[n.value],u=(i=t[n.key])!==null&&i!==void 0?i:[];return c.length>0&&l(c,u)}));return o.type==="OR"?a.some(Boolean):a.every(Boolean)}))}xo(e){return e.flatMap((t=>{var o,a;return(o=(a=t.stacktrace)==null?void 0:a.frames)!==null&&o!==void 0?o:[]})).some((t=>t.filename&&t.filename.startsWith("chrome-extension://")))}ko(e){if(e.length>0){var t,o,a,n,i=(t=(o=e[0].stacktrace)==null?void 0:o.frames)!==null&&t!==void 0?t:[],l=i[i.length-1];return(a=l==null||(n=l.filename)==null?void 0:n.includes("posthog.com/static"))!==null&&a!==void 0&&a}return!1}Io(e){return!Pt(e)&&Mt(e)}}},die=Oe({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({[_w]:!!e.productTours}),this.loadIfEnabled())}loadIfEnabled(){var e,t;this.Ao||(e=this._instance).config.disable_product_tours||(t=e.persistence)==null||!t.get_property(_w)||this.ur((()=>this.Ro()))}ur(e){var t,o;(t=et.__PosthogExtensions__)!=null&&t.generateProductTours?e():(o=et.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"product-tours",(a=>{a?BO.error("Could not load product tours script",a):e()}))}Ro(){var e;!this.Ao&&(e=et.__PosthogExtensions__)!=null&&e.generateProductTours&&(this.Ao=et.__PosthogExtensions__.generateProductTours(this._instance,!0))}getProductTours(e,t){if(t===void 0&&(t=!1),!Mt(this.Eo)||t){var o=this.ni;if(o){var a=o.props[af];if(Mt(a)&&!t)return this.Eo=a,void e(a,{isLoaded:!0})}this._instance._send_request({url:this._instance.requestRouter.endpointFor("api","/api/product_tours/?token="+this._instance.config.token),method:"GET",callback:n=>{var i=n.statusCode;if(i!==200||!n.json){var l="Product Tours API could not be loaded, status: "+i;return BO.error(l),void e([],{isLoaded:!1,error:l})}var c=Mt(n.json.product_tours)?n.json.product_tours:[];this.Eo=c,o&&o.register({[af]:c}),e(c,{isLoaded:!0})}})}else e(this.Eo,{isLoaded:!0})}getActiveProductTours(e){Pt(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(af)}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)}}},Vv),uie={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 o=this.globalsForEvent(t);this.No.push(o),this.No.length>1e3&&(this.No=this.No.slice(10))}}get siteAppLoaders(){var e;return(e=et._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,o,a,n,i,l,c;if(!e)throw new Error("Event payload is required");var u={},p=this._instance.get_property("$groups")||[],g=this._instance.get_property("$stored_group_properties")||{};for(var[m,f]of Object.entries(g))u[m]={id:p[m],type:m,properties:f};var{$set_once:v,$set:b}=e;return{event:Oe({},OB(e,tie),{properties:Oe({},e.properties,b?{$set:Oe({},(t=(o=e.properties)==null?void 0:o.$set)!==null&&t!==void 0?t:{},b)}:{},v?{$set_once:Oe({},(a=(n=e.properties)==null?void 0:n.$set_once)!==null&&a!==void 0?a:{},v)}:{}),elements_chain:(i=(l=e.properties)==null?void 0:l.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(c=e.properties)==null?void 0:c.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:u}}setupSiteApp(e){var t=this.apps[e.id],o=()=>{var l;!t.errored&&this.No.length&&(ms.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))},a=!1,n=l=>{t.errored=!l,t.loaded=!0,ms.info("Site app with id "+e.id+" "+(l?"loaded":"errored")),a&&o()};try{var{processEvent:i}=e.init({posthog:this._instance,callback(l){n(l)}});i&&(t.processEvent=i),a=!0}catch(l){ms.error(jO+e.id,l),n(!1)}if(a&&t.loaded)try{o()}catch(l){ms.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 o of e)this.setupSiteApp(o)}Po(e){if(Object.keys(this.apps).length!==0){var t=this.globalsForEvent(e);for(var o of Object.values(this.apps))try{o.processEvent==null||o.processEvent(t)}catch(a){ms.error("Error while processing event "+e.event+" for site app "+o.id,a)}}}onRemoteConfig(e){var t,o,a,n=this;if((t=this.siteAppLoaders)!=null&&t.length)return this.isEnabled?(this.Oo(),void this._instance.on("eventCaptured",(u=>this.Po(u)))):void ms.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((o=this.Fo)==null||o.call(this),(a=e.siteApps)!=null&&a.length)if(this.isEnabled){var i=function(u){var p;et["__$$ph_site_app_"+u]=n._instance,(p=et.__PosthogExtensions__)==null||p.loadSiteApp==null||p.loadSiteApp(n._instance,c,(g=>{if(g)return ms.error(jO+u,g)}))};for(var{id:l,url:c}of e.siteApps)i(l)}else ms.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}},pie={tracingHeaders:class{constructor(e){this.Lo=void 0,this.Do=void 0,this.so=()=>{var t,o,a=this.Bo()||[];Ve(this.Lo)&&((t=et.__PosthogExtensions__)==null||(t=t.tracingHeadersPatchFns)==null||t._patchXHR(a,this._instance.get_distinct_id(),this._instance.sessionManager)),Ve(this.Do)&&((o=et.__PosthogExtensions__)==null||(o=o.tracingHeadersPatchFns)==null||o._patchFetch(a,this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=e}initialize(){this.startIfEnabledOrStop()}ur(e){var t,o;(t=et.__PosthogExtensions__)!=null&&t.tracingHeadersPatchFns&&e(),(o=et.__PosthogExtensions__)==null||o.loadExternalDependency==null||o.loadExternalDependency(this._instance,"tracing-headers",(a=>{if(a)return Xre.error("failed to load script",a);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)}}},mie=Oe({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(Pt(t))return eo.warn("Flags not loaded yet. Not loading surveys.");var o=Mt(t);this.jo=o?t.length>0:t,eo.info("flags response received, isSurveysEnabled: "+this.jo),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var e=[],t=0;t<localStorage.length;t++){var o=localStorage.key(t);(o!=null&&o.startsWith(qw)||o!=null&&o.startsWith("inProgressSurvey_"))&&e.push(o)}e.forEach((a=>localStorage.removeItem(a)))}loadIfEnabled(){if(!this._surveyManager)if(this.$o)eo.info("Already initializing surveys, skipping...");else if(this.Bt.disable_surveys)eo.info(UO);else if(this.Bt.cookieless_mode&&this._instance.consent.isOptedOut())eo.info("Not loading surveys in cookieless mode without consent.");else{var e=et?.__PosthogExtensions__;if(e){if(!Ve(this.jo)||this.Bt.advanced_enable_surveys){var t=this.jo||this.Bt.advanced_enable_surveys;this.$o=!0;try{var o=e.generateSurveys;if(o)return void this.Vo(o,t);var a=e.loadExternalDependency;if(!a)return void this.Ho(qC);a(this._instance,"surveys",(n=>{n||!e.generateSurveys?this.Ho("Could not load surveys script",n):this.Vo(e.generateSurveys,t)}))}catch(n){throw this.Ho("Error initializing surveys",n),n}finally{this.$o=!1}}}else eo.error("PostHog Extensions not found.")}}Vo(e,t){this._surveyManager=e(this._instance,t),this._surveyEventReceiver=new nie(this._instance),eo.info("Surveys loaded successfully"),this.zo({isLoaded:!0})}Ho(e,t){eo.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 eo.info(UO),e([]);var o,a=this._instance.get_property(Ew);if(a&&!t)return e(a,{isLoaded:!0});typeof Promise<"u"&&this.Zo?this.Zo.then((n=>{var{surveys:i,context:l}=n;return e(i,l)})):(typeof Promise<"u"&&(this.Zo=new Promise((n=>{o=n}))),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:n=>{var i;this.Zo=null;var l=n.statusCode;if(l!==200||!n.json){var c="Surveys API could not be loaded, status: "+l;eo.error(c);var u={isLoaded:!1,error:c};return e([],u),void(o==null||o({surveys:[],context:u}))}var p,g=n.json.surveys||[],m=g.filter((v=>(function(b){return!(!b.start_date||b.end_date)})(v)&&((function(b){var S;return!((S=b.conditions)==null||(S=S.events)==null||(S=S.values)==null||!S.length)})(v)||(function(b){var S;return!((S=b.conditions)==null||(S=S.actions)==null||(S=S.values)==null||!S.length)})(v))));m.length>0&&((p=this._surveyEventReceiver)==null||p.register(m)),(i=this._instance.persistence)==null||i.register({[Ew]:g});var f={isLoaded:!0};e(g,f),o?.({surveys:g,context:f})}}))}zo(e){for(var t of this.qo)try{if(!e.isLoaded)return t([],e);this.getSurveys(t)}catch(o){eo.error("Error in survey callback",o)}}getActiveMatchingSurveys(e,t){if(t===void 0&&(t=!1),!Pt(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(e,t);eo.warn("init was not called")}Uo(e){var t=null;return this.getSurveys((o=>{var a;t=(a=o.find((n=>n.id===e)))!==null&&a!==void 0?a:null})),t}Yo(e){if(Pt(this._surveyManager))return{eligible:!1,reason:I0};var t=typeof e=="string"?this.Uo(e):e;return t?this._surveyManager.checkSurveyEligibility(t):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(e){if(Pt(this._surveyManager))return eo.warn("init was not called"),{visible:!1,disabledReason:I0};var t=this.Yo(e);return{visible:t.eligible,disabledReason:t.reason}}canRenderSurveyAsync(e,t){return Pt(this._surveyManager)?(eo.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:I0})):new Promise((o=>{this.getSurveys((a=>{var n,i=(n=a.find((c=>c.id===e)))!==null&&n!==void 0?n:null;if(i){var l=this.Yo(i);o({visible:l.eligible,disabledReason:l.reason})}else o({visible:!1,disabledReason:"Survey not found"})}),t)}))}renderSurvey(e,t,o){var a;if(Pt(this._surveyManager))eo.warn("init was not called");else{var n=typeof e=="string"?this.Uo(e):e;if(n!=null&&n.id)if(Bre.includes(n.type)){var i=Be?.querySelector(t);if(i)return(a=n.appearance)!=null&&a.surveyPopupDelaySeconds?(eo.info("Rendering survey "+n.id+" with delay of "+n.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var l,c;eo.info("Rendering survey "+n.id+" with delay of "+((l=n.appearance)==null?void 0:l.surveyPopupDelaySeconds)+" seconds"),(c=this._surveyManager)==null||c.renderSurvey(n,i,o),eo.info("Survey "+n.id+" rendered")}),1e3*n.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(n,i,o);eo.warn("Survey element not found")}else eo.warn("Surveys of type "+n.type+" cannot be rendered in the app");else eo.warn("Survey not found")}}displaySurvey(e,t){var o;if(Pt(this._surveyManager))eo.warn("init was not called");else{var a=this.Uo(e);if(a){var n=a;if((o=a.appearance)!=null&&o.surveyPopupDelaySeconds&&t.ignoreDelay&&(n=Oe({},a,{appearance:Oe({},a.appearance,{surveyPopupDelaySeconds:0})})),t.displayType!==Fw.Popover&&t.initialResponses&&eo.warn("initialResponses is only supported for popover surveys. prefill will not be applied."),t.ignoreConditions===!1){var i=this.canRenderSurvey(a);if(!i.visible)return void eo.warn("Survey is not eligible to be displayed: ",i.disabledReason)}t.displayType!==Fw.Inline?this._surveyManager.handlePopoverSurvey(n,t):this.renderSurvey(n,t.selector,t.properties)}else eo.warn("Survey not found")}}cancelPendingSurvey(e){Pt(this._surveyManager)?eo.warn("init was not called"):this._surveyManager.cancelSurvey(e)}handlePageUnload(){var e;(e=this._surveyManager)==null||e.handlePageUnload()}}},Vv),gie={toolbar:class{constructor(e){this.instance=e}Go(e){et.ph_toolbar_state=e}Wo(){var e;return(e=et.ph_toolbar_state)!==null&&e!==void 0?e:0}initialize(){return this.maybeLoadToolbar()}maybeLoadToolbar(e,t,o){if(e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),p3(this.instance.config)||!he||!Be)return!1;e=e??he.location,o=o??he.history;try{if(!t){try{he.localStorage.setItem("test","test"),he.localStorage.removeItem("test")}catch{return!1}t=he?.localStorage}var a,n=rie||Yf(e.hash,"__posthog")||Yf(e.hash,"state"),i=n?oO((()=>JSON.parse(atob(decodeURIComponent(n)))))||oO((()=>JSON.parse(decodeURIComponent(n)))):null;return i&&i.action==="ph_authorize"?((a=i).source="url",a&&Object.keys(a).length>0&&(i.desiredHash?e.hash=i.desiredHash:o?o.replaceState(o.state,"",e.pathname+e.search):e.hash="")):((a=JSON.parse(t.getItem(zO)||"{}")).source="localstorage",delete a.userIntent),!(!a.token||this.instance.config.token!==a.token||(this.loadToolbar(a),0))}catch{return!1}}Xo(e){var t=et.ph_load_toolbar||et.ph_load_editor;!Pt(t)&&Ci(t)?t(e,this.instance):$O.warn("No toolbar load function found")}loadToolbar(e){var t=!(Be==null||!Be.getElementById(l3));if(!he||t)return!1;var o=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=Oe({token:this.instance.config.token},e,{apiURL:this.instance.requestRouter.endpointFor("ui")},o?{instrument:!1}:{});if(he.localStorage.setItem(zO,JSON.stringify(Oe({},a,{source:void 0}))),this.Wo()===2)this.Xo(a);else if(this.Wo()===0){var n;this.Go(1),(n=et.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return $O.error("[Toolbar] Failed to load",i),void this.Go(0);this.Go(2),this.Xo(a)})),Yo(he,"turbolinks:load",(()=>{this.Go(0),this.loadToolbar(a)}))}return!0}Jo(e){return this.loadToolbar(e)}maybeLoadEditor(e,t,o){return e===void 0&&(e=void 0),t===void 0&&(t=void 0),o===void 0&&(o=void 0),this.maybeLoadToolbar(e,t,o)}}},hie=Oe({experiments:Oa},Vv),fie={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;Pt(t)||($r(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||p3(this._instance.config)||this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())){var e=et?.__PosthogExtensions__;if(e&&!Ve(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 o=e.loadExternalDependency;if(!o)return void this.ra(qC);o(this._instance,"conversations",(a=>{a||!e.initConversations?this.ra("Could not load conversations script",a):this.ta(e.initConversations),this.Qo=!1}))}catch(a){this.ra("Error initializing conversations",a),this.Qo=!1}}else Vn.error("Conversations enabled but missing token in remote config.")}}ta(e){if(this.ea)try{this._conversationsManager=e(this.ea,this._instance),Vn.info("Conversations loaded successfully")}catch(t){this.ra("Error completing conversations initialization",t)}else Vn.error("Cannot complete initialization: remote config is null")}ra(e,t){Vn.error(e,t),this._conversationsManager=null,this.Qo=!1}show(){this._conversationsManager?this._conversationsManager.show():Vn.warn("Conversations not loaded yet.")}hide(){this._conversationsManager&&this._conversationsManager.hide()}isAvailable(){return this.Ko===!0&&!Mi(this._conversationsManager)}isVisible(){var e,t;return(e=(t=this._conversationsManager)==null?void 0:t.isVisible())!==null&&e!==void 0&&e}sendMessage(e,t,o){var a=this;return Kn((function*(){return a._conversationsManager?a._conversationsManager.sendMessage(e,t,o):(Vn.warn(ml),null)}))()}getMessages(e,t){var o=this;return Kn((function*(){return o._conversationsManager?o._conversationsManager.getMessages(e,t):(Vn.warn(ml),null)}))()}markAsRead(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.markAsRead(e):(Vn.warn(ml),null)}))()}getTickets(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.getTickets(e):(Vn.warn(ml),null)}))()}requestRestoreLink(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.requestRestoreLink(e):(Vn.warn(ml),null)}))()}restoreFromToken(e){var t=this;return Kn((function*(){return t._conversationsManager?t._conversationsManager.restoreFromToken(e):(Vn.warn(ml),null)}))()}restoreFromUrlToken(){var e=this;return Kn((function*(){return e._conversationsManager?e._conversationsManager.restoreFromUrlToken():(Vn.warn(ml),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()}}},vie={logs:class{constructor(e){var t;this.ia=!1,this.na=!1,this.Gt=So("[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,o=(t=e.logs)==null?void 0:t.captureConsoleLogs;!Pt(o)&&o&&(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=et?.__PosthogExtensions__;if(e){var t=e.loadExternalDependency;t?t(this._instance,"logs",(o=>{var a;o||(a=e.logs)==null||!a.initializeLogs?this.Gt.error("Could not load logs script",o):(e.logs.initializeLogs(this._instance),this.na=!0)})):this.Gt.error(qC)}else this.Gt.error("PostHog Extensions not found.")}}captureLog(e){var t,o,a,n,i,l;if(this._instance.is_capturing())if(e&&e.body){var c=(t=(o=this._instance.config.logs)==null?void 0:o.flushIntervalMs)!==null&&t!==void 0?t:3e3,u=(a=(n=this._instance.config.logs)==null?void 0:n.maxLogsPerInterval)!==null&&a!==void 0?a:1e3,p=Date.now();if(c>p-this.aa||(this.aa=p,this.oa=0,this.la=!1),u>this.oa){this.oa++;var g=(function(m,f){var v=m.level||"info",{text:b,number:S}=JB[v]||Ine,C=String(Date.now())+"000000",w={};f.distinctId&&(w.posthogDistinctId=f.distinctId),f.sessionId&&(w.sessionId=f.sessionId),f.currentUrl&&(w["url.full"]=f.currentUrl),f.screenName&&(w["screen.name"]=f.screenName),f.appState&&(w["app.state"]=f.appState),f.activeFeatureFlags&&f.activeFeatureFlags.length>0&&(w.feature_flags=f.activeFeatureFlags);var _=Oe({},w,m.attributes||{}),E={timeUnixNano:C,observedTimeUnixNano:C,severityNumber:S,severityText:b,body:{stringValue:m.body},attributes:XD(_)};return m.trace_id&&(E.traceId=m.trace_id),m.span_id&&(E.spanId=m.span_id),Ve(m.trace_flags)||(E.flags=m.trace_flags),E})(e,this.ua());this.sa.push({record:g}),((i=(l=this._instance.config.logs)==null?void 0:l.maxBufferSize)!==null&&i!==void 0?i:100)>this.sa.length?this.ha():this.flushLogs()}else this.la||(this.Gt.warn("captureLog dropping logs: exceeded "+u+" 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 o=this._instance.config.logs,a=Oe({"service.name":o?.serviceName||"unknown_service"},o?.environment&&{"deployment.environment":o.environment},o?.serviceVersion&&{"service.version":o.serviceVersion},o?.resourceAttributes),n=(function(l,c,u,p){return{resourceLogs:[{resource:{attributes:XD(c)},scopeLogs:[{scope:{name:u,version:p},logRecords:l}]}]}})(t.map((l=>l.record)),a,Ga.LIB_NAME,Ga.LIB_VERSION),i=this._instance.requestRouter.endpointFor("api","/i/v1/logs")+"?token="+encodeURIComponent(this._instance.config.token);this._instance.Vi({method:"POST",url:i,data:n,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:o}=this._instance.sessionManager.checkAndGetSessionAndWindowId(!0);t.sessionId=o}if(et!=null&&(e=et.location)!=null&&e.href&&(t.currentUrl=et.location.href),this._instance.featureFlags){var a=this._instance.featureFlags.getFlags();a&&a.length>0&&(t.activeFeatureFlags=a)}return t}}},bie=Oe({},Vv,sie,lie,cie,die,uie,mie,pie,gie,hie,fie,vie);Yn.__defaultExtensionClasses=Oe({},bie);var GO,Li=(GO=mp[Yc]=new Yn,(function(){function e(){e.done||(e.done=!0,M3=!1,ho(mp,(function(t){t._dom_loaded()})))}Be!=null&&Be.addEventListener?Be.readyState==="complete"?e():Yo(Be,"DOMContentLoaded",e,{capture:!1}):he&&ze.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),GO);const yie="studio-ui-resources",ev="html",Sie=10080*60*1e3,Tie=50,wie=16*1024*1024;function _ie(e){return e[0]==="mcp"&&e[1]===FL}function Hv(){return new Promise((e,t)=>{const o=indexedDB.open(yie,1);o.onupgradeneeded=()=>{o.result.objectStoreNames.contains(ev)||o.result.createObjectStore(ev)},o.onsuccess=()=>e(o.result),o.onerror=()=>t(o.error)})}function kd(e,t){return e.transaction(ev,t).objectStore(ev)}function Ww(e){return new Promise((t,o)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>o(e.error)})}async function Cie(e){if(!(typeof indexedDB>"u"))try{const t=await Hv(),o=kd(t,"readonly"),a=await Ww(o.getAllKeys()),n=await Ww(o.getAll()),i=Date.now(),l=a.map((p,g)=>({key:p,value:n[g]})).sort((p,g)=>(g.value?.updatedAt??0)-(p.value?.updatedAt??0)),c=[];let u=0;for(const{key:p,value:g}of l){if(!g||i-g.updatedAt>Sie||u>=Tie){c.push(p);continue}u++;try{const f=JSON.parse(String(p));e.getQueryData(f)===void 0&&e.setQueryData(f,g.html,{updatedAt:0})}catch{c.push(p)}}if(c.length>0){const p=kd(t,"readwrite");for(const g of c)p.delete(g)}}catch{}}function Pie(e){if(typeof indexedDB>"u")return()=>{};const t=Hv().catch(()=>null);return e.getQueryCache().subscribe(o=>{const a=o.query;if(!Array.isArray(a.queryKey)||!_ie(a.queryKey)||a.state.status!=="success")return;const n=a.state.data;typeof n!="string"||n.length>wie||t.then(i=>{if(i)try{kd(i,"readwrite").put({html:n,updatedAt:Date.now()},JSON.stringify(a.queryKey))}catch{}})})}function kie(){typeof indexedDB>"u"||Hv().then(e=>kd(e,"readwrite").clear()).catch(()=>{})}async function Tve(e){if(!(typeof indexedDB>"u"))try{const t=await Hv(),o=await Ww(kd(t,"readonly").getAllKeys()),a=kd(t,"readwrite");for(const n of o)try{const i=JSON.parse(String(n));i[1]===FL&&i[3]===e&&a.delete(n)}catch{}}catch{}}const tv="studio:rq-cache",ZC=1440*60*1e3,xie=1e3,Eie=new Set(["publicConfig","ai-provider-keys","organization-settings","home-next-actions"]),Rie=new Set(["VIRTUAL_MCP","CONNECTIONS"]);let q3=!1,V3=!1;function Aie(e){const t=e[0];return typeof t=="string"&&Eie.has(t)?!0:e[3]==="collection"&&typeof e[4]=="string"&&Rie.has(e[4])}function Die(e){if(!(typeof window>"u"))try{const t=window.localStorage.getItem(tv);if(!t)return;const o=JSON.parse(t),a=!o.timestamp||Date.now()-o.timestamp>ZC;if(o.buster!=="4.378.0"||a||!o.state){window.localStorage.removeItem(tv);return}W$(e,o.state),e.invalidateQueries({queryKey:On.publicConfig(),refetchType:"none"}),q3=!0}catch{Lie()}}function Oie(e){if(typeof window>"u")return()=>{};let t=null;const o=()=>{t=null;try{const i=K$(e,{shouldDehydrateQuery:l=>l.state.status==="success"&&Aie(l.queryKey)});window.localStorage.setItem(tv,JSON.stringify({buster:"4.378.0",timestamp:Date.now(),state:i}))}catch{}},a=e.getQueryCache().subscribe(()=>{t==null&&(t=setTimeout(o,xie))}),n=()=>{t!=null&&(clearTimeout(t),o())};return window.addEventListener("pagehide",n),()=>{t!=null&&clearTimeout(t),window.removeEventListener("pagehide",n),a()}}const H3="studio:org-cache:",Iie=20;function Mie(e){const t=Date.now(),o=Object.entries(e).filter(([,a])=>t-a.updatedAt<=ZC);for(o.sort(([,a],[,n])=>a.updatedAt-n.updatedAt);o.length>Iie;)o.shift();return Object.fromEntries(o)}function G3(e){return`${H3}${e}`}function wve(e,t){if(typeof window>"u")return null;try{const o=window.localStorage.getItem(G3(e));if(!o)return null;const a=JSON.parse(o)[t];return!a||Date.now()-a.updatedAt>ZC?null:(V3=!0,a)}catch{return null}}function _ve(e,t,o){if(!(typeof window>"u"))try{const a=G3(e),n=window.localStorage.getItem(a),i=n?JSON.parse(n):{};i[t]={data:o,updatedAt:Date.now()},window.localStorage.setItem(a,JSON.stringify(Mie(i)))}catch{}}function Lie(){if(kie(),!(typeof window>"u"))try{window.localStorage.removeItem(tv);for(let e=window.localStorage.length-1;e>=0;e--){const t=window.localStorage.key(e);t?.startsWith(H3)&&window.localStorage.removeItem(t)}}catch{}}function Nie(){return q3}function Fie(){return V3}let Ai=!1,Yw=null,KO=!1;const QC="studio:lp-distinct-id",K3="mesh:lp-distinct-id",L0="/api/_reports/link-token/",Bie=1440*60*1e3;function W3(e){const t="https://analytics.invalid",o=/^[a-z][a-z\d+.-]*:\/\//i.test(e),a=e.startsWith("//");try{const n=new URL(e,t);let i=!1;for(const l of["key","d"])n.searchParams.has(l)&&(n.searchParams.delete(l),i=!0);return n.pathname.startsWith(L0)&&n.pathname!==L0&&(n.pathname=`${L0}redacted`,i=!0),i?o?n.toString():a?`//${n.host}${n.pathname}${n.search}${n.hash}`:`${n.pathname}${n.search}${n.hash}`:e}catch{return e}}function N0(e){return Object.fromEntries(Object.entries(e).map(([t,o])=>[t,typeof o=="string"?W3(o):o]))}const jie=e=>e?(e.properties=N0(e.properties),e.$set&&(e.$set=N0(e.$set)),e.$set_once&&(e.$set_once=N0(e.$set_once)),e):null;function Y3(){try{const e=window.localStorage.getItem(QC)??window.localStorage.getItem(K3);if(!e)return;const{id:t,ts:o}=JSON.parse(e);return typeof t!="string"||!t||typeof o!="number"?void 0:Date.now()-o<=Bie?t:void 0}catch{return}}function Uie(){try{window.localStorage.removeItem(QC),window.localStorage.removeItem(K3)}catch{}}function zie(){try{const e=new URL(window.location.href),t=e.searchParams.get("ph_did");t&&(window.localStorage.setItem(QC,JSON.stringify({id:t,ts:Date.now()})),e.searchParams.delete("ph_did"),window.history.replaceState(window.history.state,"",e.toString()));const o=t??Y3();return o?Object.keys(window.localStorage).some(n=>n.startsWith("ph_")&&n.endsWith("_posthog"))?void 0:o:void 0}catch{return}}function $ie(e){const t=Y3();if(t&&(Uie(),t!==e))try{Li.alias(t)}catch{}}function qie(e,t){if(Ai||typeof window>"u")return;const o=zie();Li.init(e,{api_host:t,ui_host:"https://us.posthog.com",cross_subdomain_cookie:!0,...o?{bootstrap:{distinctID:o}}:{},capture_pageview:"history_change",capture_pageleave:!0,autocapture:!0,before_send:jie,capture_performance:{web_vitals:!0,network_timing:!0},capture_exceptions:!0,session_recording:{maskAllInputs:!0,blockClass:"ph-no-capture",maskCapturedNetworkRequestFn:a=>({...a,...typeof a.name=="string"?{name:W3(a.name)}:{}})},person_profiles:"identified_only"}),Ai=!0}function Vie(e,t){Ai&&(Li.identify(e,t),$ie(e))}function Hie(){Ai&&(Li.reset(),Yw=null)}function JC(e,t){Ai&&Li.capture(e,t)}function Cve(){return Ai}function Pve(){if(!Ai||KO||typeof performance>"u")return;KO=!0;const e=performance.getEntriesByType("navigation")[0],t=o=>{const a=performance.getEntriesByName(o,"measure")[0];return a?Math.round(a.duration):void 0};JC("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("studio:config-fetch"),active_org_fetch_ms:t("studio:active-org-fetch"),time_to_shell_ms:Math.round(performance.now()),cache_restored:Nie(),org_cache_restored:Fie()})}function kve(e,t){Ai&&e!==Yw&&(Li.group("organization",e,t),Yw=e)}function Z3(e,t){if(Ai)try{Li.captureException(e,t)}catch{}}const Gie=["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 Kie(e){const t=Ie.c(3),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=T.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:Gie}}),t[0]=a):a=t[0];let n;return t[1]!==o?(n=T.jsxs("div",{className:"relative flex items-center justify-center min-h-screen bg-background overflow-hidden",children:[a,T.jsx("div",{className:"relative flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:o})]}),t[1]=o,t[2]=n):n=t[2],n}function Q3(e){const t=Ie.c(20),{orgName:o}=e,a=ar(),n=Wie;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=T.jsx("div",{className:"bg-muted p-3 rounded-full",children:T.jsx(mB,{className:"h-6 w-6 text-muted-foreground"})}),t[0]=i):i=t[0];let l;t[1]!==a?(l=a("common.archivedOrgScreen.orgUnavailable"),t[1]=a,t[2]=l):l=t[2];let c;t[3]!==l?(c=T.jsx("h3",{className:"text-lg font-medium",children:l}),t[3]=l,t[4]=c):c=t[4];let u;t[5]!==o||t[6]!==a?(u=o?a("common.archivedOrgScreen.deletedWithName",{orgName:o}):a("common.archivedOrgScreen.deletedGeneric"),t[5]=o,t[6]=a,t[7]=u):u=t[7];let p;t[8]!==u?(p=T.jsx("p",{className:"text-sm text-muted-foreground",children:u}),t[8]=u,t[9]=p):p=t[9];let g;t[10]!==c||t[11]!==p?(g=T.jsxs("div",{className:"space-y-2",children:[c,p]}),t[10]=c,t[11]=p,t[12]=g):g=t[12];let m;t[13]!==a?(m=a("common.archivedOrgScreen.goHome"),t[13]=a,t[14]=m):m=t[14];let f;t[15]!==m?(f=T.jsx(Al,{onClick:n,children:m}),t[15]=m,t[16]=f):f=t[16];let v;return t[17]!==g||t[18]!==f?(v=T.jsxs(Kie,{children:[i,g,f]}),t[17]=g,t[18]=f,t[19]=v):v=t[19],v}function Wie(){window.location.href="/"}function Yie(){const e=Ie.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:o}=Rd(t);let a;return e[1]!==o?(a=T.jsx(Al,{variant:"outline",size:"sm",asChild:!0,children:T.jsx(Fs,{to:"/$org/settings/profile",params:{org:o},children:"Go to your profile"})}),e[1]=o,e[2]=a):a=e[2],a}function Zie(e){const t=Ie.c(13),{area:o,description:a,action:n}=e,i=o?`No access to ${o}`:"No access",l=a??"Your role doesn't include permission for this section. Ask an organization admin to update your role if you need it.";let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=T.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted text-muted-foreground",children:T.jsx(TB,{size:28})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=T.jsx("h3",{className:"text-lg font-medium",children:i}),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==l?(p=T.jsx("p",{className:"mx-auto max-w-sm text-sm text-muted-foreground",children:l}),t[3]=l,t[4]=p):p=t[4];let g;t[5]!==u||t[6]!==p?(g=T.jsxs("div",{className:"space-y-1",children:[u,p]}),t[5]=u,t[6]=p,t[7]=g):g=t[7];let m;t[8]!==n?(m=n??T.jsx(Yie,{}),t[8]=n,t[9]=m):m=t[9];let f;return t[10]!==g||t[11]!==m?(f=T.jsxs("div",{className:"flex h-full min-h-[60vh] flex-1 flex-col items-center justify-center gap-4 p-6 text-center",children:[c,g,m]}),t[10]=g,t[11]=m,t[12]=f):f=t[12],f}const WO="__studio_chunk_reload_ts";function J3(e){return e?.message==="Organization is archived"}function Qie(e){return!!e?.message?.includes("Access denied")}function YO(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 Jie extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o),Z3(t,{boundary:"default",error_name:t.name,error_message:t.message,component_stack:o.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,t:o}=this.props;return typeof t=="function"?t({error:this.state.error,resetError:this.resetError}):t!==void 0?t:J3(this.state.error)?T.jsx(Q3,{}):Qie(this.state.error)?T.jsx(Zie,{}):T.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(MC,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:o("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||o("common.errorBoundary.unexpectedError")})]}),T.jsx(Al,{variant:"outline",onClick:this.resetError,children:o("common.errorBoundary.tryAgain")})]})}return this.props.children}}function Xie(e){const t=Ie.c(3),o=ar();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(Jie,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}class ese extends R.Component{state={hasError:!1,error:null};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error:",t,o);const a=YO(t);if(Z3(t,{boundary:"chunk_root",is_chunk_load_error:a,error_name:t.name,error_message:t.message,component_stack:o.componentStack??null,route:typeof window<"u"?window.location.pathname:null}),!a)return;const n=sessionStorage.getItem(WO),i=Date.now();(!n||i-Number(n)>1e4)&&(sessionStorage.setItem(WO,String(i)),window.location.reload())}render(){const{t}=this.props;return this.state.hasError&&YO(this.state.error)?T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:T.jsx(wB,{className:"h-6 w-6 text-primary"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.newVersionAvailable")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:t("common.errorBoundary.newVersionDeployed")})]}),T.jsx(Al,{onClick:()=>window.location.reload(),children:t("common.errorBoundary.refresh")})]}):this.state.hasError?J3(this.state.error)?T.jsx(Q3,{}):T.jsxs("div",{className:"flex min-h-dvh flex-col items-center justify-center p-6 text-center space-y-4",children:[T.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:T.jsx(MC,{className:"h-6 w-6 text-destructive"})}),T.jsxs("div",{className:"space-y-2",children:[T.jsx("h3",{className:"text-lg font-medium",children:t("common.errorBoundary.somethingWentWrong")}),T.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:this.state.error?.message||t("common.errorBoundary.unexpectedError")})]}),T.jsx(Al,{variant:"outline",onClick:()=>this.setState({hasError:!1,error:null}),children:t("common.errorBoundary.tryAgain")})]}):this.props.children}}function tse(e){const t=Ie.c(3),o=ar();let a;return t[0]!==e||t[1]!==o?(a=T.jsx(ese,{...e,t:o}),t[0]=e,t[1]=o,t[2]=a):a=t[2],a}function ose(e){const t=Ie.c(8);let o,a;t[0]!==e?({className:o,...a}=e,t[0]=e,t[1]=o,t[2]=a):(o=t[1],a=t[2]);let n;t[3]!==o?(n=Ot("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",o),t[3]=o,t[4]=n):n=t[4];let i;return t[5]!==a||t[6]!==n?(i=T.jsx("div",{"data-slot":"card",className:n,...a}),t[5]=a,t[6]=n,t[7]=i):i=t[7],i}function xve(e){const t=Ie.c(4);let o;t[0]!==e?({...o}=e,t[0]=e,t[1]=o):o=t[1];let a;return t[2]!==o?(a=T.jsx("div",{"data-slot":"card-content",...o}),t[2]=o,t[3]=a):a=t[3],a}function Eve(e){const t=Ie.c(12),{title:o,description:a,docsHref:n,actions:i,className:l,headerClassName:c,children:u}=e;let p;t[0]!==l?(p=Ot("flex flex-col gap-3",l),t[0]=l,t[1]=p):p=t[1];let g;t[2]!==i||t[3]!==a||t[4]!==n||t[5]!==c||t[6]!==o?(g=(o||a||n||i)&&T.jsxs("div",{className:Ot("flex items-center justify-between gap-3 px-4",c),children:[T.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[o&&T.jsx("h2",{className:"text-[15px] font-medium leading-tight",children:o}),(a||n)&&T.jsxs("p",{className:"text-sm text-muted-foreground leading-snug",children:[a,n&&T.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 ml-1 text-foreground hover:underline",children:["Docs ",T.jsx(gB,{size:12})]})]})]}),i&&T.jsx("div",{className:"shrink-0",children:i})]}),t[2]=i,t[3]=a,t[4]=n,t[5]=c,t[6]=o,t[7]=g):g=t[7];let m;return t[8]!==u||t[9]!==p||t[10]!==g?(m=T.jsxs("section",{className:p,children:[g,u]}),t[8]=u,t[9]=p,t[10]=g,t[11]=m):m=t[11],m}function Rve(e){const t=Ie.c(11),{className:o,children:a}=e;let n,i,l;if(t[0]!==a||t[1]!==o){const u=R.Children.toArray(a).filter(R.isValidElement);n=ose,t[5]!==o?(i=Ot("p-0 gap-0 overflow-hidden",o),t[5]=o,t[6]=i):i=t[6],l=u.map(ase),t[0]=a,t[1]=o,t[2]=n,t[3]=i,t[4]=l}else n=t[2],i=t[3],l=t[4];let c;return t[7]!==n||t[8]!==i||t[9]!==l?(c=T.jsx(n,{className:i,children:l}),t[7]=n,t[8]=i,t[9]=l,t[10]=c):c=t[10],c}function ase(e,t){return T.jsxs("div",{children:[t>0&&T.jsx("div",{className:"h-px bg-border mx-5"}),e]},t)}function Ave(e){const t=Ie.c(27),{icon:o,title:a,description:n,action:i,onClick:l,className:c,children:u}=e,p=u?"flex items-start gap-3 px-4 py-4":"flex items-center gap-3 px-4 py-4",g=l&&"hover:bg-muted/50 cursor-pointer";let m;t[0]!==c||t[1]!==p||t[2]!==g?(m=Ot(p,g,c),t[0]=c,t[1]=p,t[2]=g,t[3]=m):m=t[3];const f=l?"button":void 0,v=l?0:void 0;let b;t[4]!==l?(b=l?x=>{x.target===x.currentTarget&&(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),l())}:void 0,t[4]=l,t[5]=b):b=t[5];let S;t[6]!==o?(S=o&&T.jsx("div",{className:"size-8 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:o}),t[6]=o,t[7]=S):S=t[7];let C;t[8]!==a?(C=T.jsx("div",{className:"text-sm font-medium",children:a}),t[8]=a,t[9]=C):C=t[9];let w;t[10]!==n?(w=n&&T.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:n}),t[10]=n,t[11]=w):w=t[11];let _;t[12]!==u||t[13]!==C||t[14]!==w?(_=T.jsxs("div",{className:"flex-1 min-w-0",children:[C,w,u]}),t[12]=u,t[13]=C,t[14]=w,t[15]=_):_=t[15];let E;t[16]!==i?(E=i&&T.jsx("div",{className:"shrink-0",onClick:nse,children:i}),t[16]=i,t[17]=E):E=t[17];let k;return t[18]!==l||t[19]!==_||t[20]!==E||t[21]!==m||t[22]!==f||t[23]!==v||t[24]!==b||t[25]!==S?(k=T.jsxs("div",{className:m,onClick:l,role:f,tabIndex:v,onKeyDown:b,children:[S,_,E]}),t[18]=l,t[19]=_,t[20]=E,t[21]=m,t[22]=f,t[23]=v,t[24]=b,t[25]=S,t[26]=k):k=t[26],k}function nse(e){return e.stopPropagation()}function Dve(e){const t=Ie.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Ot("px-4 py-4",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}function Ove(e){const t=Ie.c(5),{children:o,className:a}=e;let n;t[0]!==a?(n=Ot("flex items-center justify-end gap-2 px-4 py-4",a),t[0]=a,t[1]=n):n=t[1];let i;return t[2]!==o||t[3]!==n?(i=T.jsx("div",{className:n,children:o}),t[2]=o,t[3]=n,t[4]=i):i=t[4],i}function rse(e){const t=Ie.c(5),{className:o,children:a}=e;let n;t[0]!==o?(n=Ot("flex flex-col gap-10",o),t[0]=o,t[1]=n):n=t[1];let i;return t[2]!==a||t[3]!==n?(i=T.jsx("div",{className:n,children:a}),t[2]=a,t[3]=n,t[4]=i):i=t[4],i}const am={connect:{key:"connect",titleKey:"settings.connectClients.pageTitle",tabs:[],ownedRoutes:["/$org/settings/api-keys"]},members:{key:"members",titleKey:"orgs.members.title",tabs:[{key:"members",icon:PB,labelKey:"orgs.members.title",to:"/$org/settings/members",requires:"members:manage"},{key:"roles",icon:CB,labelKey:"settings.roles.pageTitle",to:"/$org/settings/roles",privilegedOnly:!0}]},billing:{key:"billing",titleKey:"settings.nav.billing",tabs:[{key:"ai-providers",icon:vB,labelKey:"settings.nav.aiProviders",to:"/$org/settings/ai-providers",requires:"ai-providers:manage"},{key:"infra",icon:_B,labelKey:"settings.subnav.infrastructure",to:"/$org/settings/infra-billing",requires:"members:manage",requiresOwnedSites:!0}]},repositories:{key:"repositories",titleKey:"settings.nav.repositories",tabs:[],ownedRoutes:["/$org/settings/repositories"]},storage:{key:"storage",titleKey:"settings.nav.storage",tabs:[{key:"buckets",icon:SB,labelKey:"settings.nav.buckets",to:"/$org/settings/buckets",requires:"file-configs:manage"},{key:"synced-repos",icon:yB,labelKey:"settings.nav.syncedRepos",to:"/$org/settings/synced-repos",requires:"file-configs:manage"}]}};function Ive(e){const t=am[e];return[...t.tabs.map(o=>o.to),...t.ownedRoutes??[]]}function Mve(e){return am[e].tabs.length>0}const ise=new Set(["owner","admin"]);function X3(){const e=Ie.c(11),{org:t,locator:o}=Wp();let a;e[0]!==o?(a=On.myCapabilities(o),e[0]=o,e[1]=a):a=e[1];let n;e[2]!==t?(n=async()=>{const g=await fetch(`/api/auth/custom/my-capabilities/${encodeURIComponent(t.slug)}`,{credentials:"include"});if(!g.ok)throw new Error(`my-capabilities request failed: ${g.status}`);return await g.json()},e[2]=t,e[3]=n):n=e[3];let i;e[4]!==a||e[5]!==n?(i={queryKey:a,queryFn:n,staleTime:3e4,retry:2},e[4]=a,e[5]=n,e[6]=i):i=e[6];const{data:l,isLoading:c,isError:u}=Dd(i);let p;return e[7]!==l||e[8]!==u||e[9]!==c?(p={data:l,loading:c,error:u},e[7]=l,e[8]=u,e[9]=c,e[10]=p):p=e[10],p}function Lve(e){const t=Ie.c(8),{data:o,loading:a,error:n}=X3();if(a){let p;return t[0]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!1,loading:!0,error:!1,reason:"loading"},t[0]=p):p=t[0],p}if(n){let p;return t[1]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!1,loading:!1,error:!0,reason:"error"},t[1]=p):p=t[1],p}const i=o?.role??null;if(!i){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!1,loading:!1,error:!1,reason:"denied"},t[2]=p):p=t[2],p}if(i==="owner"){let p;return t[3]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!0,loading:!1,error:!1,reason:"owner"},t[3]=p):p=t[3],p}if(i==="admin"){let p;return t[4]===Symbol.for("react.memo_cache_sentinel")?(p={granted:!0,loading:!1,error:!1,reason:"admin"},t[4]=p):p=t[4],p}const l=o?.capabilities?.[e]===!0,c=l?"role":"denied";let u;return t[5]!==l||t[6]!==c?(u={granted:l,loading:!1,error:!1,reason:c},t[5]=l,t[6]=c,t[7]=u):u=t[7],u}function e4(){const e=Ie.c(10),{data:t,loading:o,error:a}=X3(),n=t?.role??void 0;let i;e[0]!==n?(i=n?ise.has(n):!1,e[0]=n,e[1]=i):i=e[1];const l=i;let c;e[2]!==t?.capabilities?(c=t?.capabilities??{},e[2]=t?.capabilities,e[3]=c):c=e[3];const u=c;let p;return e[4]!==a||e[5]!==l||e[6]!==o||e[7]!==n||e[8]!==u?(p={capabilities:u,loading:o,error:a,isPrivileged:l,roleSlug:n},e[4]=a,e[5]=l,e[6]=o,e[7]=n,e[8]=u,e[9]=p):p=e[9],p}function sse(){const e=Ie.c(13),{org:t}=Wp(),o=aC(),{capabilities:a,isPrivileged:n}=e4(),i=n||!!a["members:manage"];let l;e[0]!==t.id?(l=On.infraBillingSites(t.id),e[0]=t.id,e[1]=l):l=e[1];const c=!!t.id&&i;let u;e[2]!==o?(u=()=>o.call("INFRA_BILLING_SITES_LIST",{}),e[2]=o,e[3]=u):u=e[3];let p;e[4]!==l||e[5]!==c||e[6]!==u?(p={queryKey:l,staleTime:3e5,enabled:c,queryFn:u},e[4]=l,e[5]=c,e[6]=u,e[7]=p):p=e[7];const{data:g,isLoading:m}=Dd(p);let f;e[8]!==g?.sites?(f=g?.sites.map(lse)??[],e[8]=g?.sites,e[9]=f):f=e[9];let v;return e[10]!==m||e[11]!==f?(v={sites:f,isLoading:m},e[10]=m,e[11]=f,e[12]=v):v=e[12],v}function lse(e){return e.slug}function Nve(){const e=Ie.c(7),t=aC(),o=ar();let a;e[0]!==t?(a=l=>t.call("INFRA_BILLING_PORTAL",{siteSlugs:l}),e[0]=t,e[1]=a):a=e[1];let n;e[2]!==o?(n=l=>Vr.error(o("settings.infraBilling.portalError",{message:l.message})),e[2]=o,e[3]=n):n=e[3];let i;return e[4]!==a||e[5]!==n?(i={mutationFn:a,onSuccess:cse,onError:n},e[4]=a,e[5]=n,e[6]=i):i=e[6],lp(i)}function cse(e){const{url:t}=e;return window.open(t,"_blank","noopener,noreferrer")}function Fve(e,t){const o=Ie.c(14),{org:a}=Wp(),n=aC();let i,l,c;o[0]!==a.id||o[1]!==t||o[2]!==e?(i=[...e].sort(),c=Dd,l=On.infraBilling(a.id,i.join(","),t),o[0]=a.id,o[1]=t,o[2]=e,o[3]=i,o[4]=l,o[5]=c):(i=o[3],l=o[4],c=o[5]);const u=i.length>0;let p;o[6]!==t||o[7]!==i||o[8]!==n?(p=()=>n.call("INFRA_BILLING_GET",{siteSlugs:i,period:t}),o[6]=t,o[7]=i,o[8]=n,o[9]=p):p=o[9];let g;return o[10]!==l||o[11]!==u||o[12]!==p?(g={queryKey:l,enabled:u,staleTime:6e4,queryFn:p},o[10]=l,o[11]=u,o[12]=p,o[13]=g):g=o[13],c(g)}function t4(){const e=Ie.c(7),{capabilities:t,isPrivileged:o,loading:a,error:n}=e4(),{sites:i,isLoading:l}=sse(),c=i.length>0;let u;if(e[0]!==t||e[1]!==n||e[2]!==o||e[3]!==a||e[4]!==c||e[5]!==l){const p=g=>g.requiresOwnedSites&&!c&&!l?!1:a||n?!0:g.privilegedOnly?o:g.requires?o||t[g.requires]:!0;u=Object.fromEntries(Object.values(am).map(g=>[g.key,g.tabs.filter(p)])),e[0]=t,e[1]=n,e[2]=o,e[3]=a,e[4]=c,e[5]=l,e[6]=u}else u=e[6];return u}function dse(e){const t=Ie.c(16),{group:o}=e,a=ar();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},t[0]=n):n=t[0];const{org:i}=Rd(n);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:use},t[1]=l):l=t[1];const c=gv(l),u=t4()[o],{titleKey:p}=am[o];let g;t[2]!==a||t[3]!==p?(g=a(p),t[2]=a,t[3]=p,t[4]=g):g=t[4];let m;t[5]!==g?(m=T.jsx(kl.Title,{children:g}),t[5]=g,t[6]=m):m=t[6];let f;t[7]!==o||t[8]!==i||t[9]!==c||t[10]!==a||t[11]!==u?(f=u.length>1&&T.jsx(nn.Toolbar.Left.Portal,{children:T.jsx(kl.Tabs,{"data-testid":"settings-subnav","aria-label":a("settings.subnav.ariaLabel"),children:u.map(b=>{const S=b.to.replace("$org",i),C=c===S||c.startsWith(`${S}/`);return T.jsx(kl.Tab,{active:C,asChild:!0,children:T.jsx(Fs,{to:b.to,params:{org:i},onClick:()=>JC("settings_subnav_clicked",{group_key:o,tab_key:b.key}),children:a(b.labelKey)})},b.key)})})}),t[7]=o,t[8]=i,t[9]=c,t[10]=a,t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==m||t[14]!==f?(v=T.jsxs(T.Fragment,{children:[m,f]}),t[13]=m,t[14]=f,t[15]=v):v=t[15],v}function use(e){return e.location.pathname}function pse(e){const t=Ie.c(16),{group:o}=e,a=ar();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},t[0]=n):n=t[0];const{org:i}=Rd(n);let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l={select:mse},t[1]=l):l=t[1];const c=gv(l),u=t4()[o],{titleKey:p}=am[o];let g;t[2]!==a||t[3]!==p?(g=a(p),t[2]=a,t[3]=p,t[4]=g):g=t[4];let m;t[5]!==g?(m=T.jsx(kl.Title,{children:g}),t[5]=g,t[6]=m):m=t[6];let f;t[7]!==o||t[8]!==i||t[9]!==c||t[10]!==a||t[11]!==u?(f=u.length>1&&T.jsx("nav",{"data-slot":"settings-subnav","aria-label":a("settings.subnav.ariaLabel"),className:"bg-muted inline-flex h-10 w-fit items-center rounded-xl p-[3px] gap-0.5",children:u.map(b=>{const S=b.to.replace("$org",i),C=c===S||c.startsWith(`${S}/`);return T.jsx(Fs,{to:b.to,params:{org:i},onClick:()=>JC("settings_subnav_clicked",{group_key:o,tab_key:b.key}),className:Ot("inline-flex h-full items-center justify-center rounded-lg border border-transparent px-3 text-sm font-medium whitespace-nowrap transition-[color,box-shadow]",C?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:a(b.labelKey)},b.key)})}),t[7]=o,t[8]=i,t[9]=c,t[10]=a,t[11]=u,t[12]=f):f=t[12];let v;return t[13]!==m||t[14]!==f?(v=T.jsxs("div",{"data-slot":"settings-heading",className:"flex flex-col gap-4",children:[m,f]}),t[13]=m,t[14]=f,t[15]=v):v=t[15],v}function mse(e){return e.location.pathname}function gse(e){const t=Ie.c(3),o=Dv();let a;return t[0]!==o||t[1]!==e?(a=o?T.jsx(dse,{...e}):T.jsx(pse,{...e}),t[0]=o,t[1]=e,t[2]=a):a=t[2],a}function o4(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=T.jsxs("div",{"data-testid":"settings-content-loading",className:"flex flex-col gap-4",children:[T.jsx(vD,{className:"h-32 w-full"}),T.jsx(vD,{className:"h-32 w-full"})]}),e[0]=t):t=e[0],t}function hse(e){const t=Ie.c(14),{group:o,fallback:a,errorFallback:n,className:i,children:l}=e;let c;t[0]!==o?(c=T.jsx(gse,{group:o}),t[0]=o,t[1]=c):c=t[1];let u;t[2]!==a?(u=a??T.jsx(o4,{}),t[2]=a,t[3]=u):u=t[3];let p;t[4]!==l||t[5]!==u?(p=T.jsx(R.Suspense,{fallback:u,children:l}),t[4]=l,t[5]=u,t[6]=p):p=t[6];let g;t[7]!==n||t[8]!==p?(g=T.jsx(Xie,{fallback:n,children:p}),t[7]=n,t[8]=p,t[9]=g):g=t[9];let m;return t[10]!==i||t[11]!==c||t[12]!==g?(m=T.jsx(kl,{children:T.jsx(kl.Content,{children:T.jsx(kl.Container,{children:T.jsxs(rse,{className:i,children:[c,g]})})})}),t[10]=i,t[11]=c,t[12]=g,t[13]=m):m=t[13],m}function Ni(e){return function(){return T.jsx(hse,{group:e,children:T.jsx(o4,{})})}}function fse(e){try{localStorage.setItem(Bl.lastLocation(),JSON.stringify(e))}catch{}}function vse(){try{const e=localStorage.getItem(Bl.lastLocation());if(!e)return null;const t=JSON.parse(e);if(typeof t?.org=="string")return{org:t.org,taskId:typeof t.taskId=="string"?t.taskId:void 0,virtualmcpid:typeof t.virtualmcpid=="string"?t.virtualmcpid:void 0}}catch{}return null}function Bve(){try{localStorage.removeItem(Bl.lastLocation())}catch{}}const It={home:"/$org/home",projects:"/$org/projects/$agentId",tasks:"/$org/tasks/{-$taskKey}",reports:"/$org/reports",library:"/$org/library",discover:"/$org/discover",orgIndex:"/$org/"},nt={root:It.projects,tasks:"/$org/projects/$agentId/tasks/{-$taskKey}",reports:"/$org/projects/$agentId/reports",siteEditor:"/$org/projects/$agentId/site-editor",siteEditorContent:"/$org/projects/$agentId/site-editor/content",siteEditorCode:"/$org/projects/$agentId/site-editor/code",automations:"/$org/projects/$agentId/automations",automation:"/$org/projects/$agentId/automations/$automationId",app:"/$org/projects/$agentId/apps/$connectionId/$toolName",view:"/$org/projects/$agentId/views/$viewId",outputFile:"/$org/projects/$agentId/outputs/file",outputDeck:"/$org/projects/$agentId/outputs/deck",libraryFile:"/$org/projects/$agentId/library/file",connectSources:"/$org/projects/$agentId/connect-sources",settings:"/$org/projects/$agentId/settings",assets:"/$org/projects/$agentId/assets",git:"/$org/projects/$agentId/git",hosting:"/$org/projects/$agentId/hosting",e2e:"/$org/projects/$agentId/e2e",analytics:"/$org/projects/$agentId/analytics",experiments:"/$org/projects/$agentId/experiments",monitor:"/$org/projects/$agentId/cdn"};function jve(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:bse},e[0]=t):t=e[0],gv(t)}function bse(e){return e.matches.at(-1)?.fullPath??""}const yse=new Map([[It.reports,"project-only"],[It.library,"org-only"]]);function Uve(e,t){const o=yse.get(e);return o===void 0?!0:o==="project-only"?t!==null:t===null}function zve(){const e=Ie.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={select:Sse},e[0]=t):t=e[0],gv(t)}function Sse(e){return e.matches.findLast(Tse)?.staticData.mainView}function Tse(e){return e.staticData.mainView}function sf(e){return`agent-view:${encodeURIComponent(e)}`}function wse(e){if(!e?.startsWith("agent-view:"))return null;const t=e.slice(11);if(!t)return null;try{const o=decodeURIComponent(t);return o?{id:o}:null}catch{return null}}function a4(e){if(!e||!e.startsWith("automation:"))return null;const t=e.slice(11);return t?{id:t}:null}function XC(e,t){return`app:${e}:${t}`}function _se(e){if(!e||!e.startsWith("app:"))return null;const t=e.slice(4),o=t.indexOf(":");if(o<=0)return null;const a=t.slice(0,o),n=t.slice(o+1);return!a||!n?null:{connectionId:a,toolName:n}}function n4(e){return`deck:${encodeURIComponent(e)}`}function Cse(e){if(!e||!e.startsWith("deck:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function r4(e){return`file:${encodeURIComponent(e)}`}function Pse(e){if(!e||!e.startsWith("file:"))return null;const t=e.slice(5);if(!t)return null;try{return{key:decodeURIComponent(t)}}catch{return null}}function i4(e){return`library-file:${encodeURIComponent(e)}`}function kse(e){if(!e||!e.startsWith("library-file:"))return null;const t=e.slice(13);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}function s4(e){return`code:${encodeURIComponent(e)}`}function xse(e){if(!e)return null;if(e==="code")return{path:null};if(!e.startsWith("code:"))return null;const t=e.slice(5);if(!t)return null;try{return{path:decodeURIComponent(t)}}catch{return null}}const l4=["overview","settings","automations","site-editor","code","content","assets","hosting","e2e","analytics","cdn","git"],Ese=new Set(l4),c4=new Set(["hosting","e2e","analytics","cdn"]),Rse=new Set(["board","files","connect-sources","reports"]);function $ve(e){return e.startsWith("app:")||e.startsWith("automation:")||e.startsWith("file:")||e.startsWith("deck:")||e.startsWith("library-file:")||e.startsWith("code:")}const Ase=new Map([["preview","site-editor"]]);function Gv(e){return Ase.get(e)??e}const eP=new Set(["instructions","connections","layout","settings"]);function Dse(e){return!!e&&eP.has(e)}const Ose=new Set(["overview","board","reports"]);function qve(e){const t=e?.defaultMainView??null;if(!(!t||t.type==="chat"))return d4(e??null)}function d4(e){const t=e?.defaultMainView??null;if(!t)return"settings";const o=Gv(t.type);if(eP.has(o))return"settings";if(Ese.has(o)||Ose.has(o))return o;if(o==="ext-app"||o==="ext-apps"){if(t.id&&t.toolName)return XC(t.id,t.toolName);const n=e?.tabs?.map(i=>i.id)??[];return t.id&&n.includes(t.id)?sf(t.id):n[0]?sf(n[0]):"settings"}const a=e?.tabs?.[0]?.id;return a?sf(a):"settings"}function Vve(e){const t=e.routeDefaultMain||d4(e.metadata),o=e.panelTabId&&eP.has(e.panelTabId)?"settings":e.panelTabId?Gv(e.panelTabId):e.panelTabId,a=e.metadata?.defaultMainView??null,n=a==null||a.type==="chat";return{mainOpen:e.mainPanelParam??(!!o||!!e.routeDefaultMain||!n),activeTab:o??t}}function Hve(e){return e.mainOpen&&e.clickedId===e.activeTab?{close:!0}:{tabId:e.clickedId}}function Gve(e){return e.mainOpen?e.activeTab==="automations"?!0:a4(e.activeTab)!==null:!1}function Kve(e){return e.mainOpen&&e.activeTab==="automations"?{close:!0}:{tabId:"automations"}}const Ise=new Set([...l4.filter(e=>!c4.has(e)),...Rse,"app","file","deck","library-file","connect-sources","instructions","connections","layout","preview","discover"]);function Mse(e){return!!e&&Ise.has(e)}function Lse(e,t){if(e)switch(e){case"app":return t.connection&&t.tool?XC(t.connection,t.tool):void 0;case"automations":return t.automation?`automation:${t.automation}`:"automations";case"file":return t.key?r4(t.key):void 0;case"deck":return t.deck?n4(t.deck):void 0;case"library-file":return t.path?i4(t.path):void 0;case"code":return t.file?s4(t.file):"code";default:{const o=Gv(e);return o==="site-editor"&&t.main==="content"?"content":o}}}function Wve(e){const t=e.params??{},o=e.search??{};if(e.siteEditorView==="content")return"content";if(e.siteEditorView==="code")return o.file?s4(o.file):"code";if(e.siteEditorView==="preview")return"site-editor";switch(e.mainView){case"automation":return t.automationId?`automation:${t.automationId}`:"automations";case"app":return t.connectionId&&t.toolName?XC(t.connectionId,t.toolName):void 0;case"view":return t.viewId?sf(t.viewId):void 0;case"file":return o.key?r4(o.key):void 0;case"deck":return o.path?n4(o.path):void 0;case"library-file":return o.path?i4(o.path):void 0;default:return e.mainView}}const Nse={files:"library",discover:"discover"},Fse={board:"tasks",reports:"reports"},Bse={settings:"settings",assets:"assets",git:"git",hosting:"hosting",e2e:"e2e",analytics:"analytics",experiments:"experiments",cdn:"monitor"};function u4(e){const t=wse(e);if(t)return{kind:"agent-view",viewId:t.id};const o=_se(e);if(o)return{kind:"app",connectionId:o.connectionId,toolName:o.toolName};const a=a4(e);if(a)return{kind:"automations",automationId:a.id};const n=Pse(e);if(n)return{kind:"output-file",key:n.key};const i=Cse(e);if(i)return{kind:"output-deck",path:i.path};const l=kse(e);if(l)return{kind:"library-file",path:l.path};const c=xse(e);if(c)return{kind:"site-editor",view:"code",...c.path?{file:c.path}:{}};if(Dse(e))return{kind:"agent-section",section:"settings"};const u=Gv(e);if(u==="overview")return{kind:"agent-overview"};if(u==="site-editor")return{kind:"site-editor",view:"preview"};if(u==="content")return{kind:"site-editor",view:"content"};if(u==="automations")return{kind:"automations"};if(u==="connect-sources")return{kind:"connect-sources"};const p=Fse[u];if(p)return{kind:"project-destination",destination:p};const g=Nse[u];if(g)return{kind:"org-destination",destination:g};const m=Bse[u];return m?{kind:"agent-section",section:m}:{kind:"agent-view",viewId:u}}function Il(e){const{org:t,agentId:o}=e,a={org:t,agentId:o},n=u4(e.tabId);switch(n.kind){case"project-destination":return e.destinationScope==="organization"?n.destination==="tasks"?{to:It.tasks,params:{org:t,taskKey:void 0},search:{}}:{to:It.reports,params:{org:t},search:{}}:n.destination==="tasks"?{to:nt.tasks,params:{...a,taskKey:void 0},search:{}}:{to:nt.reports,params:a,search:{}};case"org-destination":switch(n.destination){case"home":return{to:It.home,params:{org:t},search:{}};case"discover":return{to:It.discover,params:{org:t},search:{}};case"library":return{to:It.library,params:{org:t},search:{}}}case"agent-overview":return{to:nt.root,params:a,search:{}};case"site-editor":return n.view==="content"?{to:nt.siteEditorContent,params:a,search:{}}:n.view==="code"?{to:nt.siteEditorCode,params:a,search:{file:n.file}}:{to:nt.siteEditor,params:a,search:{}};case"agent-section":return{to:nt[n.section],params:a,search:{}};case"automations":return n.automationId?{to:nt.automation,params:{...a,automationId:n.automationId},search:{}}:{to:nt.automations,params:a,search:{}};case"app":return{to:nt.app,params:{...a,connectionId:n.connectionId,toolName:n.toolName},search:{}};case"agent-view":return{to:nt.view,params:{...a,viewId:n.viewId},search:{}};case"output-file":return{to:nt.outputFile,params:a,search:{key:n.key}};case"output-deck":return{to:nt.outputDeck,params:a,search:{path:n.path}};case"library-file":return{to:nt.libraryFile,params:a,search:{path:n.path}};case"connect-sources":return{to:nt.connectSources,params:a,search:{}}}}function Yve(e){if(!e.agentId||e.agentId===e.superAgentId&&(e.tabId===void 0||e.tabId==="overview"))return{to:It.home,params:{org:e.org},search:{}};const t=e.tabId??"overview",o=e.agentId!==e.superAgentId&&u4(t).kind==="org-destination"?"overview":t;return Il({org:e.org,agentId:e.agentId,tabId:o,destinationScope:e.agentId===e.superAgentId?"organization":"project"})}function jse(e,t,o={}){const a=i=>({...o.search?.(i)??{},...t.search}),n=o.replace??!0;switch(t.to){case It.tasks:e({to:It.tasks,params:t.params,search:a,replace:n});return;case It.home:e({to:It.home,params:t.params,search:a,replace:n});return;case It.reports:e({to:It.reports,params:t.params,search:a,replace:n});return;case It.discover:e({to:It.discover,params:t.params,search:a,replace:n});return;case It.library:e({to:It.library,params:t.params,search:a,replace:n});return;case nt.root:e({to:nt.root,params:t.params,search:a,replace:n});return;case nt.tasks:e({to:nt.tasks,params:t.params,search:a,replace:n});return;case nt.reports:e({to:nt.reports,params:t.params,search:a,replace:n});return;case nt.siteEditor:e({to:nt.siteEditor,params:t.params,search:a,replace:n});return;case nt.siteEditorContent:e({to:nt.siteEditorContent,params:t.params,search:a,replace:n});return;case nt.siteEditorCode:e({to:nt.siteEditorCode,params:t.params,search:a,replace:n});return;case nt.automations:e({to:nt.automations,params:t.params,search:a,replace:n});return;case nt.automation:e({to:nt.automation,params:t.params,search:a,replace:n});return;case nt.app:e({to:nt.app,params:t.params,search:a,replace:n});return;case nt.view:e({to:nt.view,params:t.params,search:a,replace:n});return;case nt.outputFile:e({to:nt.outputFile,params:t.params,search:a,replace:n});return;case nt.outputDeck:e({to:nt.outputDeck,params:t.params,search:a,replace:n});return;case nt.libraryFile:e({to:nt.libraryFile,params:t.params,search:a,replace:n});return;case nt.connectSources:e({to:nt.connectSources,params:t.params,search:a,replace:n});return;case nt.settings:case nt.assets:case nt.git:case nt.hosting:case nt.e2e:case nt.analytics:case nt.experiments:case nt.monitor:e({to:t.to,params:t.params,search:a,replace:n})}}function Zve(e,t){jse(e,Il(t),t)}function Use(e){const t=/^(\/[^/]+)\/agents(?=\/|$)/.exec(e);return t?.[1]?`${t[1]}/projects${e.slice(t[0].length)}`:null}function zse(e){const t=e.split("/").filter(Boolean);return(t[1]==="projects"||t[1]==="agents")&&t.length>3}const $se=new Set(["main","virtualmcpid","file","key","deck","path","connection","tool","automation"]),p4=new Set(["main"]),qse=new Set(["virtualmcpid"]);function Kv(e,t){return Object.fromEntries(Object.entries(e).filter(([o])=>!t.has(o)))}function El(e,t){return{...Kv(e,$se),...t.search}}function Vse(e){return Kv(e,qse)}function Qve(e){if(e.search.virtualmcpid===void 0)return null;const t=yr(e.search.virtualmcpid);if(t){const o=e.routePath===It.tasks?"board":e.routePath===It.reports?"reports":null;if(e.routePath===It.home||o){const a=o?Il({org:e.org,agentId:t,tabId:o}):xd(e.org,t);return{kind:"canonical",route:a,search:El(e.search,a)}}}return e.routePath===It.home||e.routePath===It.tasks||e.routePath===It.reports||e.routePath===It.library?{kind:"same-route",search:Vse(e.search)}:null}function yr(e){return e?.trim()||void 0}function m4(e){return Mse(e)||e!==void 0&&c4.has(e)}function g4(e){const t=yr(e);return t?t.startsWith("vir_")&&t.length>4||oK(t)!==null||sK(t)!==null||cK(t)!==null||dK(t)!==null||uK(t)||gK(t):!1}function Hse(e){const t=yr(e.agentIdParam),o=m4(t);return t&&!o?t:yr(e.virtualMcpIdSearch)??yr(e.fallbackAgentId)}function Jve(e){const t=e.pathAgentId;if(t&&e.pathLegacyView){const l=Zw({org:e.org,agentId:t,panel:e.pathLegacyView,source:"project-first",search:e.search});return l?.kind==="canonical"?{route:l.route,search:l.search}:null}if(!t||zse(e.pathname))return null;const o=e.search.virtualmcpid!==void 0&&!g4(t);if(!(m4(t)||o))return null;const n=Hse({agentIdParam:o?void 0:t,virtualMcpIdSearch:e.search.virtualmcpid,fallbackAgentId:e.fallbackAgentId}),i=Zw({org:e.org,agentId:n,panel:t,source:"view-first",search:e.search});return i?.kind==="canonical"?{route:i.route,search:i.search}:null}function Gse(e,t,o,a){const n=yr(a);switch(e){case"board":return n?Il({org:t,agentId:n,tabId:"board"}):{to:It.tasks,params:{org:t,taskKey:void 0},search:{}};case"files":{const i=bs(o.path);return{to:It.library,params:{org:t},search:i?{path:i}:{}}}case"reports":return n?Il({org:t,agentId:n,tabId:"reports"}):{to:It.reports,params:{org:t},search:{}};case"overview":return{to:It.home,params:{org:t},search:{}};case"discover":return{to:It.discover,params:{org:t},search:{}};default:return null}}function Lp(e){const t=Gse(e.tabId,e.org,e.search,e.agentId);if(t)return t;if(e.tabId==="chat")return xd(e.org,e.agentId);const o=yr(e.agentId);return o?e.tabId==="app"||e.tabId==="file"||e.tabId==="deck"||e.tabId==="library-file"||e.tabId.trim()===""?{to:nt.root,params:{org:e.org,agentId:o},search:{}}:Il({org:e.org,agentId:o,tabId:e.tabId}):null}function xd(e,t){const o=yr(t);return o?{to:nt.root,params:{org:e,agentId:o},search:{}}:{to:It.home,params:{org:e},search:{}}}function Kse(e){const{main:t}=e;if(t===void 0)return null;const o=e.search??{};if(t===0||t==="0")return{kind:"same-route",search:{...Kv(o,p4),mainpanel:!1}};if(t==="chat"){const n=xd(e.org,e.agentId);return{kind:"canonical",route:n,search:{...El(o,n),sidepanel:!0,mainpanel:!1}}}const a=Lp({org:e.org,agentId:e.agentId,tabId:t,search:o});return a?{kind:"canonical",route:a,search:El(o,a)}:null}function bs(e){return typeof e=="string"&&e.length>0?e:void 0}function Zw(e){const t=e.search??{};if((t.main===0||t.main==="0")&&e.panel){const l=Zw({...e,search:Kv(t,p4)});return l?.kind!=="canonical"?l:{...l,search:{...l.search,mainpanel:!1}}}if(t.main!==void 0)return Kse({org:e.org,agentId:e.agentId,main:t.main,search:t});const o=yr(e.agentId),a=e.panel;if(!a){const l=xd(e.org,o);return{kind:"canonical",route:l,search:El(t,l)}}const n=Lse(a,{file:bs(t.file),key:bs(t.key),deck:bs(t.deck),path:bs(t.path),connection:bs(t.connection),tool:bs(t.tool),automation:bs(t.automation)}),i=n?e.source==="project-first"&&n==="overview"&&o?Il({org:e.org,agentId:o,tabId:n}):Lp({org:e.org,agentId:o,tabId:n,search:t}):Lp({org:e.org,agentId:o,tabId:"",search:t});return i?{kind:"canonical",route:i,search:n==="chat"?{...El(t,i),sidepanel:!0,mainpanel:!1}:El(t,i)}:null}function Xve(e){const t=e.search??{},o=yr(t.virtualmcpid),a=yr(e.fallbackAgentId),n=t.main;let i;if(n==="chat")i=xd(e.org,o);else if(n!==void 0&&n!==0&&n!=="0"){const l=Lp({org:e.org,agentId:o,tabId:n,search:t}),c=!l&&n.trim().length>0&&a?Lp({org:e.org,agentId:a,tabId:n,search:t}):null;i=l??c??{to:It.home,params:{org:e.org},search:{}}}else i=xd(e.org,o);return{route:i,search:{...El(t,i),...n===void 0&&t.sidepanel===void 0?{sidepanel:!0}:{},...n===0||n==="0"?{mainpanel:!1}:{},...n==="chat"?{sidepanel:!0,mainpanel:!1}:{},thread:e.taskId}}}function h4(e,t){if(t.task===void 0)return null;const{task:o,...a}=t;return{taskKey:e??(o.trim()||void 0),search:a}}const Wse={contentPageId:V().optional(),contentPath:V().optional(),contentPathTemplate:V().optional(),contentCollection:V().optional(),contentItem:V().optional()},f4=Wse,tP={view:V().optional(),q:V().optional(),assignee:V().optional(),priority:V().optional(),due:V().optional(),tags:V().optional(),repo:V().optional(),boardOrg:V().optional()},Qw={fileView:ia(["all","documents","media"]).catch("all").optional(),path:V().optional(),preview:V().optional(),skill:V().optional(),brand:V().optional()},Yse={file:V().optional(),key:V().optional(),deck:V().optional(),path:V().optional(),connection:V().optional(),tool:V().optional(),automation:V().optional(),section:V().optional(),preview:V().optional(),autosend:V().optional(),connect:_v().optional(),siteUrl:V().optional(),...f4},v4={...Yse,task:V().optional(),...tP,skill:Qw.skill,brand:Qw.brand},nm=_e(v4),pn=m$({component:()=>T.jsx(tse,{children:T.jsx(x_,{})})}),Zse=Me({getParentRoute:()=>pn,path:"/login",component:Ue(()=>je(()=>import("./login-C9rpjQul.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),validateSearch:Gr(()=>_e({next:V().optional(),client_id:V().optional(),redirect_uri:V().optional(),response_type:V().optional(),state:V().optional(),scope:V().optional(),code_challenge:V().optional(),code_challenge_method:V().optional(),src:V().optional(),ref:V().optional()}))}),Qse=Me({getParentRoute:()=>pn,path:"/cli/auth-success",component:Ue(()=>je(()=>import("./cli-auth-success-BtgfCOuS.js"),__vite__mapDeps([7,6])))}),Jse=Me({getParentRoute:()=>pn,path:"/reset-password",component:Ue(()=>je(()=>import("./reset-password-CG3hWwFA.js"),__vite__mapDeps([8,2]))),validateSearch:Gr(()=>_e({token:V().optional(),error:V().optional()}))}),Xse=Me({getParentRoute:()=>pn,path:"/auth/$pathname",component:Ue(()=>je(()=>import("./auth-catchall-CmYjgstL.js"),[]))}),ele=Me({getParentRoute:()=>pn,path:"/oauth/callback",component:Ue(()=>je(()=>import("./oauth-callback-5b15t98P.js"),__vite__mapDeps([9,10,11])))}),tle=Me({getParentRoute:()=>pn,path:"/oauth/callback/ai-provider",component:Ue(()=>je(()=>import("./oauth-callback-ai-provider-B5ZOTUG2.js"),[]))}),rm=Me({getParentRoute:()=>pn,path:"/_admin",component:Ue(()=>je(()=>import("./layout-DeMvB5F_.js"),__vite__mapDeps([12,13,14])))}),ole=Me({getParentRoute:()=>rm,path:"/",beforeLoad:()=>{throw Qo({to:"/_admin/users"})}}),ale=Me({getParentRoute:()=>rm,path:"/users",component:Ue(()=>je(()=>import("./users-DwddhXbX.js"),__vite__mapDeps([15,16,17,18,19,20,21,22,23,24,25,26,27,28,29])))}),nle=Me({getParentRoute:()=>rm,path:"/orgs",component:Ue(()=>je(()=>import("./orgs-DVuGQ4r0.js"),__vite__mapDeps([30,16,17,18,19,20,21,2,31,25,32,33,34,35,36,37,38,24,39,40,26,27,28])))}),rle=Me({getParentRoute:()=>rm,path:"/prompts",component:Ue(()=>je(()=>import("./prompts-63xdIpGm.js"),__vite__mapDeps([41,19,2,31,38,26])))}),ile=rm.addChildren([ole,ale,nle,rle]),oP=Me({getParentRoute:()=>pn,id:"shell",component:Ue(()=>je(()=>import("./shell-layout-DWdV0NI3.js").then(e=>e.e),__vite__mapDeps([42,22,23,43,44,45,46,47,18,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,21,75,76,77,78,79,33,80,81,32,82,83,84,11,85,86,87,88,89,90,91,92,5,93,39,3,13,94,95,96,97])))}),sle=Me({getParentRoute:()=>oP,path:"/",beforeLoad:async()=>{const e=vse();if(e)throw Qo({to:"/$org",params:{org:e.org}});const t=localStorage.getItem(Bl.lastOrgSlug());if(t)throw Qo({to:"/$org",params:{org:t}});const{data:o}=await eN();if(!o)return;const a=o[0];throw Qo(a?{to:"/$org",params:{org:a.slug}}:{to:"/onboarding"})}}),lle=Me({getParentRoute:()=>pn,path:"/onboarding",beforeLoad:async()=>{const{data:e}=await eN();if(e&&e.length>0)throw Qo({to:"/"})},component:Ue(()=>je(()=>import("./onboarding-BiG1CXWT.js"),__vite__mapDeps([98,13,6,99,22,23,74,2,31,37,43,53,72,77])))}),b4=Gr(()=>_e({org:V().optional(),siteUrl:V().optional()})),cle=Me({getParentRoute:()=>pn,path:"/reports-onboarding",component:Ue(()=>je(()=>import("./reports-onboarding-Q9OPS-W6.js"),__vite__mapDeps([100,101,1,2,3,4,5,6,99,22,23,74,102,103,104,31,105,84,11,106,90,49,45,46,47,18,48,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,44,21,75,76,77,78,79,33,80,32,107,35,108,109,110,111,25,112,113,114,115,116,10,117,118,119]))),validateSearch:b4}),dle=Me({getParentRoute:()=>pn,path:"/commerce-onboarding",validateSearch:b4,beforeLoad:({search:e})=>{throw Qo({to:"/reports-onboarding",search:e})}}),ule=Me({getParentRoute:()=>pn,path:"/choose-editor",component:Ue(()=>je(()=>import("./choose-editor-CauIefX-.js"),__vite__mapDeps([120,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,33,80,13]))),validateSearch:Gr(()=>_e({site:V().optional(),domain:V().optional(),pageId:V().optional(),path:V().optional(),pathTemplate:V().optional()}))}),ple=Me({getParentRoute:()=>pn,path:"/report/$domain",component:Ue(()=>je(()=>import("./reports-4M5W5fE_.js"),__vite__mapDeps([121,1,2,3,4,5,117,46,18,50,51,53,60,67,71,44,75,79,80,122]))),validateSearch:Gr(()=>_e({key:V().optional()}))}),Wv=Me({getParentRoute:()=>oP,path:"/$org",beforeLoad:({params:e})=>{fse({org:e.org})},component:Ue(()=>je(()=>import("./route--MqbvbyV.js"),__vite__mapDeps([123,124,66,125,126,33,107,35,127,128,129,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,42,22,81,32,88,89,90,91,3,13,94,95,96,97,131,132,14,133,104,31,34,38,134,135,136,137,138,139,140,141,142,143,144,29,27,28,102,103,2,145,146,147,40,148,149,150,151,152,153,154,155,25,156])))}),Yv=Me({getParentRoute:()=>Wv,id:"org-shell",pendingComponent:Md,component:Ue(()=>je(()=>import("./thread-route-BMvI62tD.js"),__vite__mapDeps([157,158,86,87,82,83,84,11,85,94,150,151,92,5,93,39,3,138,137,159,144,95,101,32,33,160,108,109,110,111,50,105,106,90,49,45,46,47,18,48,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,107,35,104,31,2,25,112,113,114,115,116,10,117,161,118])))}),mle=_e({sidepanel:TN,mainpanel:wN,main:ro([V(),Ze(0)]).optional(),thread:V().optional(),autosend:V().optional(),preview:V().optional(),virtualmcpid:V().optional()}),nr=Me({getParentRoute:()=>Yv,id:"agent-shell",validateSearch:mle,search:{middlewares:[Fz(["sidepanel"])]},pendingComponent:Md,component:Ue(()=>je(()=>import("./route-mAV3gllf.js"),__vite__mapDeps([162,46,66,124,125,126,33,107,35,127,163,18,158,86,87,82,83,84,11,85,94,150,151,92,5,93,39,3,138,137,159,144,95,164,32,132,155,21,165,166,104,31,2,167,168,169,42,22,23,43,44,45,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,191,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,201,202,149,203,204,205,206,207,208,209,210,19,129,130,128,211,212,213,103,214,215,216,217,145,146,147,40,218,219,220,221,222,223,224,225,226])))}),gle=nm.extend({virtualmcpid:V().optional()}),hle=Me({getParentRoute:()=>nr,path:"/$taskId",validateSearch:gle,component:()=>null}),uo=Ue(()=>je(()=>import("./index-DOIParHz.js").then(e=>e.i),__vite__mapDeps([211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213])),"ChatLayoutPending"),io=Ue(()=>je(()=>import("./index-DOIParHz.js").then(e=>e.i),__vite__mapDeps([211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213])),"ChatLayoutError"),fle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/home",staticData:{pageTitle:"sidebar.navDestinations.home",defaultMain:"overview",mainView:"overview"},validateSearch:_e({connect:_v().optional(),siteUrl:V().optional()}),component:Ue(()=>je(()=>import("./home-BR3CYkzh.js"),__vite__mapDeps([227,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,169,166,164,104,31,2,167,168,170,171,150,151,158,138,137,159,144,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,132,182,183,184,165,185,156,186,134,187,139,188,155,113,111,109,114,189,190,191,141,142,4,192,38,193,116,10,194,24,195,196,19,152,149,153,154,25,228,229,143,29])))}),vle=Me({getParentRoute:()=>nr,path:"/projects",validateSearch:nm,beforeLoad:({params:e,search:t})=>{const o=t.virtualmcpid?.trim();throw Qo(o?{to:"/$org/projects/$agentId",params:{org:e.org,agentId:o},search:a=>({...a,virtualmcpid:void 0}),hash:!0,replace:!0}:{to:"/$org/home",params:{org:e.org},search:a=>({...a,virtualmcpid:void 0}),hash:!0,replace:!0})}}),Oo=Me({errorComponent:io,getParentRoute:()=>nr,path:"/projects/$agentId",validateSearch:nm,component:x_}),ble=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/",staticData:{pageTitle:"page.overview",defaultMain:"overview",mainView:"overview"},component:Ue(()=>je(()=>import("./agent-overview-Dw5ZPOKa.js"),__vite__mapDeps([230,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,160,108,109,110,111,231,143,144,229,154,149,150,151,29,186,134,27,28])))}),yle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/tasks/{-$taskKey}",staticData:{pageTitle:"sidebar.navDestinations.tasks",defaultMain:"board",mainView:"board"},validateSearch:_e({task:V().optional(),...tP}),beforeLoad:({params:e,search:t})=>{const o=h4(e.taskKey,t);if(o)throw Qo({to:"/$org/projects/$agentId/tasks/{-$taskKey}",params:{org:e.org,agentId:e.agentId,taskKey:o?.taskKey??e.taskKey},search:o.search,hash:!0,replace:!0})},component:Ue(()=>je(()=>import("./project-tasks-Co3kTouv.js"),__vite__mapDeps([232,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,233,132,131,143,144,154,29,234,235,236,237,238,152,149,150,151,153,2,31,141,142,155,25,186,134,27,28,239,240,241,242,198,173,174,168,166,164,104,167,243,184,185,210,191,110,244,196,197,172,138,158,137,159,199,200,201,202,177,165,203,204,195,214,178,170,24,245,246,187,139])))}),Sle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/reports",staticData:{pageTitle:"sidebar.navDestinations.reports",defaultMain:"reports",mainView:"reports"},validateSearch:_e({connect:_v().optional(),siteUrl:V().optional()}),component:Ue(()=>je(()=>import("./project-reports-GFbxxtyO.js"),__vite__mapDeps([247,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,248,101,2,160,108,109,110,111,231,118,119])))}),Zv=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/site-editor",staticData:{pageTitle:"sidebar.projectNav.siteEditor",defaultMain:"site-editor",mainView:"site-editor"},validateSearch:_e({autosend:V().optional(),...f4}),component:Ue(()=>je(()=>import("./agent-site-editor-Bly4gEXY.js"),__vite__mapDeps([249,245,158,86,87,82,83,84,11,85,94,150,151,92,5,93,39,3,138,137,159,144,95,42,22,23,43,44,45,46,47,18,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,21,75,76,77,78,79,33,80,81,32,88,89,90,91,13,96,97,127,131,107,35,103,175,206,207,186,134,250,224,223,25,141,142,149,154,171,251,208,209,210,205,252,253,254,163,164,132,155,125,165,166,104,31,2,167,168,169,170,34,172,173,174,27,28,136,176,177,178,179,180,181,182,183,184,185,156,187,139,188,113,111,109,114,189,190,191,4,192,38,193,116,10,194,24,195,196,197,198,199,200,201,202,126,203,204,255,256,211,129,124,130,128,212,213,257])))}),Tle=Me({getParentRoute:()=>Zv,path:"/",staticData:{defaultMain:"site-editor",mainView:"site-editor",siteEditorView:"preview"},component:Ue(()=>je(()=>import("./agent-site-editor-preview-DMY-bRXd.js"),__vite__mapDeps([258,259,215,130,62,69,191,84,11,216,83,201,167,82,85,163,18,158,86,87,94,150,151,92,5,93,39,3,138,137,159,144,95,164,107,35,32,33,132,155,21,125,165,166,104,31,2,168,169,42,22,23,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,126,149,203,204,208,209,210,217,145,146,147,40,218,246,127,260,205,223,254,261,140,262,224,241,234,37,20,25,263,103,255,264,253,252,251,115,226,19,212,154,152,153])))}),wle=Me({getParentRoute:()=>Zv,path:"/content",staticData:{defaultMain:"content",mainView:"content",siteEditorView:"content"},component:Ue(()=>je(()=>import("./agent-site-editor-content-oAD5ERex.js").then(e=>e.C),__vite__mapDeps([265,259,215,130,62,69,191,84,11,216,83,201,167,82,85,163,18,158,86,87,94,150,151,92,5,93,39,3,138,137,159,144,95,164,107,35,32,33,132,155,21,125,165,166,104,31,2,168,169,42,22,23,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,126,149,203,204,208,209,210,217,145,146,147,40,218,246,103,140,260,205,223,254,261,262,224,241,234,37,20,25,263,255,266,19,154,152,153])))}),_le=Me({getParentRoute:()=>Zv,path:"/code",staticData:{defaultMain:"code",mainView:"code",siteEditorView:"code"},validateSearch:_e({file:V().optional()}),component:Ue(()=>je(()=>import("./agent-site-editor-code-Dsipxnbb.js"),__vite__mapDeps([267,259,215,130,62,69,191,84,11,216,83,201,167,82,85,163,18,158,86,87,94,150,151,92,5,93,39,3,138,137,159,144,95,164,107,35,32,33,132,155,21,125,165,166,104,31,2,168,169,42,22,23,43,44,45,46,47,48,49,50,51,52,53,36,54,55,56,57,58,59,60,61,63,64,65,66,67,68,70,71,72,73,74,75,76,77,78,79,80,81,88,89,90,91,13,96,97,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,126,149,203,204,208,209,210,217,145,146,147,40,218,246,19])))}),Cle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/automations",staticData:{pageTitle:"settings.nav.automations",defaultMain:"automations",mainView:"automations"},beforeLoad:({params:e,search:t})=>{const o=t.automation;if(o)throw Qo({to:"/$org/projects/$agentId/automations/$automationId",params:{org:e.org,agentId:e.agentId,automationId:o},search:a=>({...a,automation:void 0}),hash:!0,replace:!0})},component:Ue(()=>je(()=>import("./agent-automations-D65B39vC.js"),__vite__mapDeps([268,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,20,19,269,270,103])))}),Ple=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/automations/$automationId",staticData:{pageTitle:"settings.nav.automations",defaultMain:"automations",mainView:"automation"},validateSearch:_e({automationView:ia(["settings","runs"]).optional()}),component:Ue(()=>je(()=>import("./agent-automation-BRedTzhp.js"),__vite__mapDeps([271,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,180,37,131,164,191,216,272,132,158,150,151,138,137,159,144,179,2,34,181,182,273,269,198,274,183,184,166,104,31,167,168,165,185,175,262,224,103,275,141,142,17,19,195,186,134,214,244,196,197,27,28,173,172,174,199,200,201,202,177,149,203,204,194])))}),kle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/settings",staticData:{pageTitle:"sidebar.navDestinations.settings",defaultMain:"settings",mainView:"settings"},component:Ue(()=>je(()=>import("./agent-settings-CoVnhy6_.js"),__vite__mapDeps([276,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,277,2,131,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),xle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/assets",staticData:{pageTitle:"common.mainPanelTabs.assets",defaultMain:"assets",mainView:"assets"},component:Ue(()=>je(()=>import("./agent-assets-CLHeNP70.js"),__vite__mapDeps([281,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,259,215,191,216,201,167,163,158,150,151,138,137,159,144,164,132,155,165,166,104,31,2,168,169,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,149,203,204,208,209,210,217,145,146,147,40,218,103,20,25,263])))}),Ele=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/git",staticData:{pageTitle:"common.mainPanelTabs.reviewChanges",defaultMain:"git",mainView:"git"},component:Ue(()=>je(()=>import("./agent-git-BlXHgqe0.js"),__vite__mapDeps([282,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,259,215,191,216,201,167,163,158,150,151,138,137,159,144,164,132,155,165,166,104,31,2,168,169,170,171,34,172,173,174,27,28,175,136,176,177,178,179,180,181,131,182,183,184,185,156,186,134,187,139,188,113,111,109,114,189,190,141,142,4,192,38,193,116,10,194,24,195,196,197,198,199,200,202,149,203,204,208,209,210,217,145,146,147,40,218,250,224,223,255])))}),Rle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/hosting",staticData:{pageTitle:"common.mainPanelTabs.hosting",defaultMain:"hosting",mainView:"hosting"},component:Ue(()=>je(()=>import("./agent-hosting-CjVegYqO.js"),__vite__mapDeps([283,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,284,40,103,238,17,198,2,31,34,277,131,140,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Ale=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/e2e",staticData:{pageTitle:"common.mainPanelTabs.e2e",defaultMain:"e2e",mainView:"e2e"},component:Ue(()=>je(()=>import("./agent-e2e-CTi5nqOc.js"),__vite__mapDeps([285,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,2,31,103,34,17,284,40,198,175,277,131,140,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Dle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/analytics",staticData:{pageTitle:"common.mainPanelTabs.analytics",defaultMain:"analytics",mainView:"analytics"},component:Ue(()=>je(()=>import("./agent-analytics-CyPBDf01.js"),__vite__mapDeps([286,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,180,2,31,17,287,288,289,103,284,40,290,277,131,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Ole=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/experiments",staticData:{defaultMain:"experiments",mainView:"experiments"},component:Ue(()=>je(()=>import("./agent-experiments-lSFgWzEh.js"),__vite__mapDeps([291,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,24,2,31,17,34,284,40,277,131,140,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,193,116,194,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207])))}),Ile=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/cdn",staticData:{pageTitle:"common.mainPanelTabs.cdn",defaultMain:"cdn",mainView:"cdn"},component:Ue(()=>je(()=>import("./agent-monitor-C39p1dMa.js"),__vite__mapDeps([292,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,287,288,289,284,131,40,290,293,294,295,277,2,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,204,185,180,20,279,201,216,165,167,37,145,146,147,148,218,152,149,153,154,25,209,280,202,207,246,187,139])))}),Mle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/apps/$connectionId/$toolName",staticData:{pageTitle:"page.app",defaultMain:"app",mainView:"app"},component:Ue(()=>je(()=>import("./agent-app-mOzGwpWw.js"),__vite__mapDeps([296,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,217,297,164,177,216,208,171,150,151,158,138,137,159,144,209,210,199,200,201,101,106,108,109,110,111,104,31,2,25,112,113,114,115,116,10,117])))}),Lle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/views/$viewId",staticData:{pageTitle:"page.view",defaultMain:"view",mainView:"view"},component:Ue(()=>je(()=>import("./agent-view-fqs1B853.js"),__vite__mapDeps([298,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,297,164,177,216,208,171,150,151,158,138,137,159,144,209,210,199,200,201,101,106,108,109,110,111,104,31,2,25,112,113,114,115,116,10,117,277,131,140,34,240,273,19,278,28,191,103,38,274,188,155,189,190,141,142,4,192,132,193,194,24,195,196,204,185,180,20,279,165,167,37,145,146,147,40,148,218,152,149,153,154,280,202,207])))}),Nle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/outputs/file",staticData:{pageTitle:"page.file",defaultMain:"file",mainView:"file"},validateSearch:_e({key:V().optional()}),component:Ue(()=>je(()=>import("./agent-file-CEXQLvN-.js"),__vite__mapDeps([299,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,204,222,185,223,224,174,168,203,158,150,151,138,137,159,144,277,2,131,140,34,240,113,111,109,114,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),Fle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/outputs/deck",staticData:{pageTitle:"page.document",defaultMain:"deck",mainView:"deck"},validateSearch:_e({path:V().optional()}),component:Ue(()=>je(()=>import("./agent-deck-DiylZjYN.js"),__vite__mapDeps([300,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,225,185,2,131,277,140,34,240,113,111,109,114,158,150,151,138,137,159,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,204,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),Ble=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/library/file",staticData:{pageTitle:"page.file",defaultMain:"library-file",mainView:"library-file"},validateSearch:_e({path:V().optional()}),component:Ue(()=>je(()=>import("./agent-library-file-Cnj_s_ZV.js"),__vite__mapDeps([301,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,221,222,185,223,224,204,174,168,225,2,131,159,277,140,34,240,113,111,109,114,158,150,151,138,137,144,273,19,278,28,191,10,103,38,274,188,155,189,190,141,142,4,192,132,104,31,193,116,194,24,195,196,180,20,279,201,216,165,167,37,145,146,147,40,148,218,152,149,153,154,25,209,280,202,207])))}),jle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>Oo,path:"/connect-sources",staticData:{pageTitle:"settings.nav.connect",defaultMain:"connect-sources",mainView:"connect-sources"},component:Ue(()=>je(()=>import("./agent-connect-sources-DwOg9602.js"),__vite__mapDeps([302,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,105,101,106,108,109,110,111,104,31,2,25,112,113,114,115,116,10,117,161,118])))}),Ule=Me({getParentRoute:()=>Oo,path:"/$legacyView",component:()=>null}),zle=Me({getParentRoute:()=>nr,path:"/agents",validateSearch:nm,beforeLoad:({params:e,search:t})=>{const o=t.virtualmcpid?.trim();throw Qo(o?{to:"/$org/projects/$agentId",params:{org:e.org,agentId:o},search:a=>a,hash:!0,replace:!0}:{to:"/$org/projects",params:{org:e.org},search:a=>a,hash:!0,replace:!0})}}),$le=Me({getParentRoute:()=>nr,path:"/agents/$",validateSearch:nm,beforeLoad:({params:e,location:t})=>{const o=e._splat?.split("/").find(Boolean);if(!g4(o))return;const a=Use(t.pathname);if(!a)return;const n=t.hash?`#${t.hash}`:"";throw Qo({href:`${a}${t.searchStr}${n}`,replace:!0})},component:Ue(()=>je(()=>import("./legacy-agents-deep-qXc7zhtl.js"),__vite__mapDeps([303,219,87])))}),qle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/tasks/{-$taskKey}",staticData:{pageTitle:"sidebar.navDestinations.tasks",defaultMain:"board",mainView:"board"},validateSearch:_e({task:V().optional(),...tP}),beforeLoad:({params:e,search:t})=>{const o=h4(e.taskKey,t);if(o)throw Qo({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:o.taskKey},search:o.search,hash:!0,replace:!0})},component:Ue(()=>je(()=>import("./tasks-DXoS1Ulq.js"),__vite__mapDeps([304,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,233,132,131,143,144,154,29,234,235,236,237,238,152,149,150,151,153,2,31,141,142,155,25,186,134,27,28,239,240,241,242,198,173,174,168,166,164,104,167,243,184,185,210,191,110,244,196,197,172,138,158,137,159,199,200,201,202,177,165,203,204,195,214,178,170,24,245,246,187,139])))}),Vle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/taskboard-analytics",staticData:{defaultMain:"board",mainView:"board"},component:Ue(()=>je(()=>import("./taskboard-analytics-BtEL_4wP.js"),__vite__mapDeps([305,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,287,288,289,17,293,294,295,235,236,131,34,175])))}),Hle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/reports",staticData:{pageTitle:"sidebar.navDestinations.reports",defaultMain:"reports",mainView:"reports"},validateSearch:_e({connect:_v().optional(),siteUrl:V().optional()}),component:Ue(()=>je(()=>import("./reports-Bu9LJ9Ir.js"),__vite__mapDeps([306,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,248,101,2,160,108,109,110,111,231,118,119])))}),Gle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/library",staticData:{pageTitle:"sidebar.navDestinations.library",defaultMain:"files",mainView:"files"},validateSearch:_e(Qw),component:Ue(()=>je(()=>import("./library-BokZ1AIy.js"),__vite__mapDeps([307,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,159,185,308,204,309,310,238,237,103,2,25,38,174,168,225,131,220,221,222,223,224,311])))}),Kle=Me({pendingComponent:uo,errorComponent:io,getParentRoute:()=>nr,path:"/discover",staticData:{pageTitle:"sidebar.navDestinations.discover",defaultMain:"discover",mainView:"discover"},component:Ue(()=>je(()=>import("./discover-CzGsx9DW.js"),__vite__mapDeps([312,211,125,129,124,66,126,33,107,35,87,86,82,83,84,11,85,130,92,5,93,39,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,127,128,42,22,81,32,88,89,90,91,3,13,94,95,96,97,212,213,154,191,186,134,147,146,40,218])))}),Wle=Me({getParentRoute:()=>Wv,path:"/members",beforeLoad:({params:e})=>{throw Qo({to:"/$org/settings/members",params:{org:e.org}})}}),Yle=_e({main:ro([V(),Ze(0)]).optional(),virtualmcpid:V().optional(),...v4,sidepanel:TN,mainpanel:wN,thread:V().optional()}),Zle=Me({getParentRoute:()=>Yv,path:"/",validateSearch:Yle,pendingComponent:Md,component:Ue(()=>je(()=>import("./index-BloKHCFa.js"),__vite__mapDeps([313,219,87])))}),Qle=Me({getParentRoute:()=>Yv,path:"/t/$taskKey",beforeLoad:({params:e})=>{throw Qo({to:"/$org/tasks/{-$taskKey}",params:{org:e.org,taskKey:e.taskKey},search:t=>t,hash:!0,replace:!0})}}),to=Me({staticData:{pageTitle:"sidebar.navDestinations.settings"},getParentRoute:()=>Wv,path:"/settings",pendingComponent:Md,component:Ue(()=>je(()=>import("./route-Du7d3cDr.js"),__vite__mapDeps([314,125,213,66,124,126,33,107,35,127,128,82,83,84,11,85])))}),Jle=Me({getParentRoute:()=>to,path:"/",component:Ue(()=>je(()=>import("./index-redirect-ad5yNpaJ.js"),__vite__mapDeps([315,316])))}),Xle=Me({staticData:{pageTitle:"settings.nav.connections"},getParentRoute:()=>to,path:"/connections",component:Ue(()=>je(()=>import("./connections-dt9Je8G_.js"),__vite__mapDeps([317,113,111,109,84,11,114,318,18,63,107,35,319,24,20,21,194,189,190,191,95,39,93,141,142,4,5,192,151,90,49,45,46,47,48,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,64,65,66,67,68,69,70,71,72,73,74,44,75,76,77,23,78,79,33,80,19,320,103,195,321,125,32,132,104,31,2,34,38,83,201,193,116,10,180]))),validateSearch:Gr(()=>_e({action:ia(["create"]).optional(),tab:ia(["all","connected"]).optional()}))}),ece=Me({staticData:{pageTitle:"settings.nav.connections"},getParentRoute:()=>to,path:"/connections/$appSlug",component:Ue(()=>je(()=>import("./connection-detail-r5iK6FaZ.js"),__vite__mapDeps([322,113,111,109,84,11,114,19,193,2,74,76,323,124,66,125,126,33,107,35,216,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,44,21,75,77,23,78,79,80,191,190,95,39,93,34,288,324,325,89,131,83,326,149,92,5,150,151,85,279,24,201,10,186,134,22,165,90,104,31,320,103,327,287,289,290,294,295,175,192,200,155]))),validateSearch:Gr(()=>_e({tab:V().optional()}))}),tce=Me({staticData:{pageTitle:"page.item"},getParentRoute:()=>to,path:"/connections/$appSlug/$collectionName/$itemId",component:Ue(()=>je(()=>import("./collection-detail-BqKQO8JF.js"),__vite__mapDeps([328,19,84,11,104,31,2,38,323,124,66,125,126,33,107,35,216,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,44,21,75,76,77,23,78,79,80,191,113,111,109,114,190,95,39,93,34,288,324,325,89,131,83,326,149,92,5,150,151,85,200,201,242,240,192,279,24,10,199,90,158,86,87,82,94,3,138,137,159,144,42,22,81,32,88,91,13,96,97,262,224,284]))),validateSearch:Gr(()=>_e({replayId:V().optional()}))}),oce=Me({staticData:{pageTitle:"orgs.monitoring.title"},getParentRoute:()=>to,path:"/monitor",component:Ue(()=>je(()=>import("./index-D5GksOol.js"),__vite__mapDeps([329,20,21,19,330,331,316,197,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,75,76,77,23,78,79,33,80,27,28,198,173,172,174,32,168,125,86,87,82,83,84,11,85,107,35,138,158,94,150,151,92,5,93,39,3,137,159,144,95,199,200,201,202,164,177,167,42,22,81,88,89,90,91,13,96,97,126,191,149,165,166,104,31,2,203,204,192,24,131,262,224,186,134,332,180,34,140,241,38,194,37,242,327,287,288,289,290,294,295,244,196,142,195,214,17,275,141,269]))),validateSearch:Gr(()=>_e({tab:ia(["overview","audit","dashboards","threads","automations"]).default("overview"),from:V().default("now-30m"),to:V().default("now"),connectionId:Fe(V()).optional().default([]),virtualMcpId:Fe(V()).optional().default([]),tool:V().default(""),status:ia(["all","success","errors"]).default("all"),search:V().default(""),page:Lt().optional(),streaming:$t().default(!0),propertyFilters:V().default(""),hideSystem:$t().default(!1)}))}),ace=Me({staticData:{pageTitle:"settings.nav.general"},getParentRoute:()=>to,path:"/general",component:Ue(()=>je(()=>import("./general-Ds1cv5sP.js"),__vite__mapDeps([333,134,274,22,23,2,334,37,54,44,95,39,93,191,84,11,335,24,34,35,36,103,330,331,316])))}),nce=Me({staticData:{pageTitle:"settings.nav.connect"},getParentRoute:()=>to,path:"/connect",pendingComponent:Ni("connect"),component:Ue(()=>je(()=>import("./connect-DtRIpCDv.js"),__vite__mapDeps([336,242,34,35,36,175,173,55,65,67,228,337,46,74,76,103,32,33,2,31,84,11,330,331,316])))}),rce=Me({staticData:{pageTitle:"settings.nav.billing"},getParentRoute:()=>to,path:"/ai-providers",pendingComponent:Ni("billing"),component:Ue(()=>je(()=>import("./ai-providers-BA415uVk.js"),__vite__mapDeps([338,46,137,53,95,39,93,272,32,33,132,125,158,86,87,82,83,84,11,85,94,150,151,92,5,3,138,159,144,179,180,2,34,35,36,48,47,65,59,21,181,69,22,23,60,81,55,58,64,75,182,274,176,103,178,139,74,76,278,28,330,331,316])))}),ice=Me({staticData:{pageTitle:"settings.nav.billing"},getParentRoute:()=>to,path:"/billing",beforeLoad:({params:e})=>{throw Qo({to:"/$org/settings/ai-providers",params:{org:e.org}})}}),sce=Me({staticData:{pageTitle:"settings.nav.billing"},getParentRoute:()=>to,path:"/infra-billing",pendingComponent:Ni("billing"),component:Ue(()=>je(()=>import("./infra-billing-B49h8jGh.js"),__vite__mapDeps([339,56,68,24,332,180,36,88,89,32,33,21,131,34,35,17,289,288,295,290,330,331,316])))}),lce=Me({staticData:{pageTitle:"settings.nav.secrets"},getParentRoute:()=>to,path:"/secrets",component:Ue(()=>je(()=>import("./secrets-Bvj_mEwv.js"),__vite__mapDeps([340,46,74,23,78,32,33,2,31,34,35,36,38,280,330,331,316])))}),cce=Me({staticData:{pageTitle:"settings.nav.connect"},getParentRoute:()=>to,path:"/api-keys",pendingComponent:Ni("connect"),component:Ue(()=>je(()=>import("./api-keys-YFO0QnLb.js"),__vite__mapDeps([341,337,46,55,65,74,76,103,32,33,2,31,84,11,330,331,316])))}),dce=Me({staticData:{pageTitle:"settings.nav.storage"},getParentRoute:()=>to,path:"/buckets",pendingComponent:Ni("storage"),component:Ue(()=>je(()=>import("./buckets-Cbnkelsv.js"),__vite__mapDeps([342,46,74,76,103,32,33,2,31,34,35,36,37,38,147,330,331,316])))}),uce=Me({staticData:{pageTitle:"settings.nav.repositories"},getParentRoute:()=>to,path:"/repositories",validateSearch:_e({git_error:V().optional().catch(void 0),git_flow:V().uuid().optional().catch(void 0),git_return:$t().optional().catch(void 0)}),pendingComponent:Ni("repositories"),component:Ue(()=>je(()=>import("./repositories-0g4CNguU.js"),__vite__mapDeps([343,153,48,68,74,107,35,32,33,2,31,154,141,142,22,23,155,21,25,50,180,103,24,242,330,331,316])))}),pce=Me({staticData:{pageTitle:"settings.nav.storage"},getParentRoute:()=>to,path:"/synced-repos",pendingComponent:Ni("storage"),component:Ue(()=>je(()=>import("./synced-repos-DqXTKrkq.js"),__vite__mapDeps([344,74,103,32,33,2,153,48,68,107,35,31,154,141,142,22,23,155,21,25,308,185,57,58,61,62,65,72,76,80,204,309,60,310,330,331,316])))}),mce=Me({staticData:{pageTitle:"settings.nav.tasks"},getParentRoute:()=>to,path:"/task-board",component:Ue(()=>je(()=>import("./tasks-CZ8ZJqTl.js"),__vite__mapDeps([345,180,2,38,47,54,73,74,76,236,88,89,32,33,21,131,37,183,184,166,164,104,31,167,168,125,86,87,82,83,84,11,85,107,35,45,46,18,48,49,50,51,52,43,53,36,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,44,75,77,23,78,79,80,158,94,150,151,92,5,93,39,3,138,137,159,144,95,179,34,181,22,81,165,185,310,103,334,191,330,331,316])))}),gce=Me({getParentRoute:()=>to,path:"/tasks",beforeLoad:({params:e})=>{throw Qo({to:"/$org/settings/task-board",params:{org:e.org}})}}),hce=Me({staticData:{pageTitle:"settings.nav.members"},getParentRoute:()=>to,path:"/members",pendingComponent:Ni("members"),component:Ue(()=>je(()=>import("./members-tiUutfvd.js"),__vite__mapDeps([346,318,18,63,107,35,319,24,20,21,16,17,19,133,32,33,104,31,34,36,38,134,135,22,23,27,28,29,186,347,103,57,65,76,180,88,89,131,74,239,330,331,316])))}),fce=Me({staticData:{pageTitle:"settings.nav.members"},getParentRoute:()=>to,path:"/roles",pendingComponent:Ni("members"),component:Ue(()=>je(()=>import("./roles-D2QfWwJI.js"),__vite__mapDeps([348,135,134,347,24,103,57,74,76,16,17,18,19,20,21,181,90,49,45,46,47,48,50,51,52,43,53,36,54,55,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,44,75,77,23,78,79,33,80,195,180,196,142,84,11,155,114,186,29,191,83,137,22,37,107,35,91,82,85,331,316]))),validateSearch:Gr(()=>_e({role:V().optional()}))}),vce=Me({staticData:{pageTitle:"settings.nav.security"},getParentRoute:()=>to,path:"/sso",component:Ue(()=>je(()=>import("./sso-Df42gDam.js"),__vite__mapDeps([349,335,24,2,34,35,36,103,37,96,76,330,331,316])))}),bce=Me({staticData:{pageTitle:"settings.nav.profile"},getParentRoute:()=>to,path:"/profile",component:Ue(()=>je(()=>import("./profile-DioTORUW.js"),__vite__mapDeps([350,22,23,32,33,325,34,35,36,76,77,37,176,2,69,70,73,274,156])))}),yce=Me({staticData:{pageTitle:"settings.nav.store"},getParentRoute:()=>to,path:"/store",component:Ue(()=>je(()=>import("./store-Dlzza2q4.js"),__vite__mapDeps([351,46,74,76,2,37,22,23,131,191,84,11,190,95,39,93,330,331,316])))}),Sce=Me({staticData:{pageTitle:"settings.nav.store"},getParentRoute:()=>to,path:"/registry",component:Ue(()=>je(()=>import("./registry-B-BoWinl.js"),__vite__mapDeps([352,330,331,316])))}),Tce=Me({staticData:{pageTitle:"settings.nav.store"},getParentRoute:()=>to,path:"/store/registry",component:Ue(()=>je(()=>import("./store-registry-DjpsAIwJ.js"),__vite__mapDeps([353,330,331,316])))}),wce=Me({staticData:{pageTitle:"settings.nav.agents"},getParentRoute:()=>to,path:"/agents",component:Ue(()=>je(()=>import("./agents-list-iVlh68DJ.js"),__vite__mapDeps([354,83,84,11,57,59,76,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,44,21,75,77,23,78,79,33,80,278,28,149,92,5,93,39,150,151,85,95,19,326,191,116,10,216,113,111,109,114,110,112,32,155,154,103,20,152,153,107,35,2,31,141,142,22,25])))}),_ce=Me({staticData:{pageTitle:"settings.nav.automations"},getParentRoute:()=>to,path:"/automations",component:Ue(()=>je(()=>import("./automations-BFk3tCRs.js"),__vite__mapDeps([355,74,80,20,21,19,269,84,11,149,83,92,5,93,39,150,151,85,270,103,45,46,47,18,48,49,50,51,52,43,53,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,44,75,76,77,23,78,79,33,330,331,316])))}),Cce=Me({staticData:{pageTitle:"settings.nav.skills"},getParentRoute:()=>to,path:"/skills",component:Ue(()=>je(()=>import("./skills-Krb4erdR.js"),__vite__mapDeps([356,57,71,76,77,80,20,21,103,19,194,24,309,60,185,159,311,32,33,174,55,58,52,168,125,86,87,82,83,84,11,85,222,223,64,224,204,310])))}),Pce=to.addChildren([Jle,Xle,ece,tce,wce,_ce,Cce,oce,ace,nce,rce,ice,sce,lce,cce,dce,uce,pce,mce,gce,hce,fce,vce,bce,yce,Tce,Sce]),kce=Zv.addChildren([Tle,wle,_le]),xce=Oo.addChildren([ble,yle,Sle,kce,Cle,Ple,kle,xle,Ele,Rle,Ale,Dle,Ole,Ile,Mle,Lle,Nle,Fle,Ble,jle,Ule]),Ece=nr.addChildren([hle,fle,vle,xce,zle,$le,qle,Vle,Hle,Gle,Kle]),Rce=Yv.addChildren([Zle,Qle,Ece]),Ace=Wv.addChildren([Rce,Wle,Pce]),Dce=oP.addChildren([sle,Ace]),Oce=pn.addChildren([Dce,ile,lle,cle,dle,ule,ple,Zse,Qse,Jse,Xse,ele,tle]);function Ice(){const e=Ie.c(16),t=ar();let o;e[0]!==t?(o=t("common.index.pageNotFound"),e[0]=t,e[1]=o):o=e[1];let a;e[2]!==o?(a=T.jsx("h3",{className:"text-lg font-medium text-foreground",children:o}),e[2]=o,e[3]=a):a=e[3];let n;e[4]!==t?(n=t("common.index.pageNotFoundDescription"),e[4]=t,e[5]=n):n=e[5];let i;e[6]!==n?(i=T.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-[300px]",children:n}),e[6]=n,e[7]=i):i=e[7];let l;e[8]!==t?(l=t("common.index.goBack"),e[8]=t,e[9]=l):l=e[9];let c;e[10]!==l?(c=T.jsx("button",{type:"button",onClick:Mce,className:"text-sm text-primary hover:underline",children:l}),e[10]=l,e[11]=c):c=e[11];let u;return e[12]!==a||e[13]!==i||e[14]!==c?(u=T.jsx("div",{className:"flex h-full items-center justify-center",children:T.jsxs("div",{className:"flex flex-col items-center gap-4 p-8",children:[a,i,c]})}),e[12]=a,e[13]=i,e[14]=c,e[15]=u):u=e[15],u}function Mce(){return window.history.back()}const Qv=C$({routeTree:Oce,defaultPendingComponent:Md,defaultPendingMs:200,defaultPendingMinMs:500,defaultNotFoundComponent:Ice});function xe(...e){return SN(lC(e))}function Lce(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function zo({error:e,localization:t,localizeErrors:o=!0}){var a;const n="Request failed";if(!o)return e?.message?e.message:(a=e?.error)!=null&&a.message?e.error.message:n;if(typeof e=="string"&&t?.[e])return t[e];if(e?.error){if(e.error.code){const i=e.error.code;if(t?.[i])return t[i]}return e.error.message||e.error.code||e.error.statusText||t?.REQUEST_FAILED}return e?.message||t?.REQUEST_FAILED||n}function $l(e){return typeof window<"u"?new URLSearchParams(window.location.search).get(e):null}function Jw(e,t){for(const o in e)if(e[o]===t)return o}function Np(e,t){let o=V().min(1,{message:t?.PASSWORD_REQUIRED});return e?.minLength&&(o=o.min(e.minLength,{message:t?.PASSWORD_TOO_SHORT})),e?.maxLength&&(o=o.max(e.maxLength,{message:t?.PASSWORD_TOO_LONG})),e?.regex&&(o=o.regex(e.regex,{message:t?.INVALID_PASSWORD})),o}var Nce={FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application"},Fce={FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously"},Bce={INVALID_METADATA_TYPE:"metadata must be an object or undefined",REFILL_AMOUNT_AND_INTERVAL_REQUIRED:"refillAmount is required when refillInterval is provided",REFILL_INTERVAL_AND_AMOUNT_REQUIRED:"refillInterval is required when refillAmount is provided",USER_BANNED:"User is banned",UNAUTHORIZED_SESSION:"Unauthorized or invalid session",KEY_NOT_FOUND:"API Key not found",KEY_DISABLED:"API Key is disabled",KEY_EXPIRED:"API Key has expired",USAGE_EXCEEDED:"API Key has reached its usage limit",KEY_NOT_RECOVERABLE:"API Key is not recoverable",EXPIRES_IN_IS_TOO_SMALL:"The expiresIn is smaller than the predefined minimum value.",EXPIRES_IN_IS_TOO_LARGE:"The expiresIn is larger than the predefined maximum value.",INVALID_REMAINING:"The remaining count is either too large or too small.",INVALID_PREFIX_LENGTH:"The prefix length is either too large or too small.",INVALID_NAME_LENGTH:"The name length is either too large or too small.",METADATA_DISABLED:"Metadata is disabled.",RATE_LIMIT_EXCEEDED:"Rate limit exceeded.",NO_VALUES_TO_UPDATE:"No values to update.",KEY_DISABLED_EXPIRATION:"Custom key expiration values are disabled.",INVALID_API_KEY:"Invalid API key.",INVALID_USER_ID_FROM_API_KEY:"The user id from the API key is invalid.",INVALID_API_KEY_GETTER_RETURN_TYPE:"API Key getter returned an invalid key type. Expected string.",SERVER_ONLY_PROPERTY:"The property you're trying to set can only be set from the server auth instance only."},jce={USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account."},Uce={VERIFICATION_FAILED:"Captcha verification failed",MISSING_RESPONSE:"Missing CAPTCHA response",UNKNOWN_ERROR:"Something went wrong"},zce={MISSING_SECRET_KEY:"Missing secret key",SERVICE_UNAVAILABLE:"CAPTCHA service unavailable"},$ce={...Uce,...zce},qce={OTP_EXPIRED:"otp expired",INVALID_OTP:"Invalid OTP",INVALID_EMAIL:"Invalid email",USER_NOT_FOUND:"User not found",TOO_MANY_ATTEMPTS:"Too many attempts"},Vce={INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration"},Hce={PASSWORD_COMPROMISED:"The password you entered has been compromised. Please choose a different password."},Gce={INVALID_SESSION_TOKEN:"Invalid session token"},Kce={YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"you are not allowed to invite user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached"},Wce={CHALLENGE_NOT_FOUND:"Challenge not found",YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:"You are not allowed to register this passkey",FAILED_TO_VERIFY_REGISTRATION:"Failed to verify registration",PASSKEY_NOT_FOUND:"Passkey not found",AUTHENTICATION_FAILED:"Authentication failed",UNABLE_TO_CREATE_SESSION:"Unable to create session",FAILED_TO_UPDATE_PASSKEY:"Failed to update passkey"},Yce={INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified"},Zce={SUBSCRIPTION_NOT_FOUND:"Subscription not found",SUBSCRIPTION_PLAN_NOT_FOUND:"Subscription plan not found",ALREADY_SUBSCRIBED_PLAN:"You're already subscribed to this plan",UNABLE_TO_CREATE_CUSTOMER:"Unable to create customer",FAILED_TO_FETCH_PLANS:"Failed to fetch plans",EMAIL_VERIFICATION_REQUIRED:"Email verification is required before you can subscribe to a plan",SUBSCRIPTION_NOT_ACTIVE:"Subscription is not active",SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION:"Subscription is not scheduled for cancellation"},Qce={TEAM_LIMIT_REACHED:"Team limit reached for this organization",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached for this team",TEAM_NOT_FOUND:"Team not found",TEAM_MEMBER_NOT_FOUND:"Team member not found",TEAM_NAME_TOO_LONG:"Team name is too long",CANNOT_REMOVE_LAST_TEAM:"Cannot remove the last team",NOT_ORGANIZATION_MEMBER:"User is not a member of the organization",ALREADY_TEAM_MEMBER:"User is already a member of this team",INSUFFICIENT_TEAM_PERMISSIONS:"Insufficient permissions to perform this action on team"},Jce={OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"},Xce={INVALID_USERNAME_OR_PASSWORD:"invalid username or password",EMAIL_NOT_VERIFIED:"email not verified",UNEXPECTED_ERROR:"unexpected error",USERNAME_IS_ALREADY_TAKEN:"username is already taken. please try another.",USERNAME_TOO_SHORT:"username is too short",USERNAME_TOO_LONG:"username is too long",INVALID_USERNAME:"username is invalid"},ede={APP:"App",ACCOUNT:"Account",ACCOUNTS:"Accounts",ACCOUNTS_DESCRIPTION:"Switch between your currently signed in accounts.",ACCOUNTS_INSTRUCTIONS:"Sign in to an additional account.",ADD_ACCOUNT:"Add Account",ADD_PASSKEY:"Add Passkey",ALREADY_HAVE_AN_ACCOUNT:"Already have an account?",AVATAR:"Avatar",AVATAR_DESCRIPTION:"Click on the avatar to upload a custom one from your files.",AVATAR_INSTRUCTIONS:"An avatar is optional but strongly recommended.",BACKUP_CODE_REQUIRED:"Backup code is required",BACKUP_CODES:"Backup Codes",BACKUP_CODES_DESCRIPTION:"Save these backup codes in a secure place. You can use them to access your account if you lose your two-factor authentication method.",BACKUP_CODE_PLACEHOLDER:"Backup Code",BACKUP_CODE:"Backup Code",CANCEL:"Cancel",CHANGE_PASSWORD:"Change Password",CHANGE_PASSWORD_DESCRIPTION:"Enter your current password and a new password.",CHANGE_PASSWORD_INSTRUCTIONS:"Please use 8 characters at minimum.",CHANGE_PASSWORD_SUCCESS:"Your password has been changed.",CONFIRM_PASSWORD:"Confirm Password",CONFIRM_PASSWORD_PLACEHOLDER:"Confirm Password",CONFIRM_PASSWORD_REQUIRED:"Confirm password is required",CONTINUE_WITH_AUTHENTICATOR:"Continue with Authenticator",COPIED_TO_CLIPBOARD:"Copied to clipboard",COPY_TO_CLIPBOARD:"Copy to clipboard",COPY_ALL_CODES:"Copy all codes",CONTINUE:"Continue",CURRENT_PASSWORD:"Current Password",CURRENT_PASSWORD_PLACEHOLDER:"Current Password",CURRENT_SESSION:"Current Session",UPDATE:"Update",DELETE:"Delete",DELETE_AVATAR:"Delete Avatar",DELETE_ACCOUNT:"Delete Account",DELETE_ACCOUNT_DESCRIPTION:"Permanently remove your account and all of its contents. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_INSTRUCTIONS:"Please confirm the deletion of your account. This action is not reversible, so please continue with caution.",DELETE_ACCOUNT_VERIFY:"Please check your email to verify the deletion of your account.",DELETE_ACCOUNT_SUCCESS:"Your account has been deleted.",DISABLE_TWO_FACTOR:"Disable Two-Factor",DISABLED_CREDENTIALS_DESCRIPTION:"Choose a provider to login to your account",DONT_HAVE_AN_ACCOUNT:"Don't have an account?",DONE:"Done",EMAIL:"Email",EMAIL_DESCRIPTION:"Enter the email address you want to use to log in.",EMAIL_INSTRUCTIONS:"Please enter a valid email address.",EMAIL_IS_THE_SAME:"Email is the same",EMAIL_PLACEHOLDER:"m@example.com",EMAIL_REQUIRED:"Email address is required",EMAIL_VERIFY_CHANGE:"Please check your email to verify the change.",EMAIL_VERIFICATION:"Email Verification",EMAIL_VERIFICATION_DESCRIPTION:"Please check your email for the verification code to complete your registration.",EMAIL_VERIFICATION_SUCCESS:"Email verification successful.",ENABLE_TWO_FACTOR:"Enable Two-Factor",IS_INVALID:"is invalid",IS_REQUIRED:"is required",IS_THE_SAME:"is the same",FORGOT_AUTHENTICATOR:"Forgot authenticator?",FORGOT_PASSWORD:"Forgot Password",FORGOT_PASSWORD_ACTION:"Send reset link",FORGOT_PASSWORD_DESCRIPTION:"Enter your email to reset your password",FORGOT_PASSWORD_EMAIL:"Check your email for the password reset link.",FORGOT_PASSWORD_LINK:"Forgot your password?",LINK:"Link",MAGIC_LINK:"Magic Link",MAGIC_LINK_ACTION:"Send magic link",MAGIC_LINK_DESCRIPTION:"Enter your email to receive a magic link",MAGIC_LINK_EMAIL:"Check your email for the magic link",EMAIL_OTP:"Email Code",EMAIL_OTP_SEND_ACTION:"Send code",EMAIL_OTP_VERIFY_ACTION:"Verify code",EMAIL_OTP_DESCRIPTION:"Enter your email to receive a code",EMAIL_OTP_VERIFICATION_SENT:"Please check your email for the verification code.",NAME:"Name",NAME_DESCRIPTION:"Please enter your full name, or a display name.",NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",NAME_PLACEHOLDER:"Name",NEW_PASSWORD:"New Password",NEW_PASSWORD_PLACEHOLDER:"New Password",NEW_PASSWORD_REQUIRED:"New password is required",ONE_TIME_PASSWORD:"One-Time Password",OR_CONTINUE_WITH:"Or continue with",PASSKEY:"Passkey",PASSKEYS:"Passkeys",PASSKEYS_DESCRIPTION:"Manage your passkeys for secure access.",PASSKEYS_INSTRUCTIONS:"Securely access your account without a password.",PERSONAL_ACCOUNT:"Personal Account",API_KEYS:"API Keys",API_KEYS_DESCRIPTION:"Manage your API keys for secure access.",API_KEYS_INSTRUCTIONS:"Generate API keys to access your account programmatically.",CREATE_API_KEY:"Create API Key",CREATE_API_KEY_DESCRIPTION:"Enter a unique name for your API key to differentiate it from other keys.",API_KEY_NAME_PLACEHOLDER:"New API Key",API_KEY_CREATED:"API Key Created",CREATE_API_KEY_SUCCESS:"Please copy your API key and store it in a safe place. For security reasons we cannot show it again.",NEVER_EXPIRES:"Never Expires",EXPIRES:"Expires",NO_EXPIRATION:"No Expiration",CREATE_ORGANIZATION:"Create Organization",ORGANIZATION:"Organization",ORGANIZATION_NAME:"Name",ORGANIZATION_NAME_PLACEHOLDER:"Acme Inc.",ORGANIZATION_NAME_DESCRIPTION:"This is your organization's visible name.",ORGANIZATION_NAME_INSTRUCTIONS:"Please use 32 characters at maximum.",ORGANIZATION_SLUG:"Slug URL",ORGANIZATION_SLUG_DESCRIPTION:"This is your organization's URL namespace.",ORGANIZATION_SLUG_INSTRUCTIONS:"Please use 48 characters at maximum.",ORGANIZATION_SLUG_PLACEHOLDER:"acme-inc",CREATE_ORGANIZATION_SUCCESS:"Organization created successfully",PASSWORD:"Password",PASSWORD_PLACEHOLDER:"Password",PASSWORD_REQUIRED:"Password is required",PASSWORDS_DO_NOT_MATCH:"Passwords do not match",PROVIDERS:"Providers",PROVIDERS_DESCRIPTION:"Connect your account with a third-party service.",RECOVER_ACCOUNT:"Recover Account",RECOVER_ACCOUNT_ACTION:"Recover account",RECOVER_ACCOUNT_DESCRIPTION:"Please enter a backup code to access your account",REMEMBER_ME:"Remember me",RESEND_CODE:"Resend code",RESEND_VERIFICATION_EMAIL:"Resend Verification Email",RESET_PASSWORD:"Reset Password",RESET_PASSWORD_ACTION:"Save new password",RESET_PASSWORD_DESCRIPTION:"Enter your new password below",RESET_PASSWORD_SUCCESS:"Password reset successfully",REQUEST_FAILED:"Request failed",REVOKE:"Revoke",DELETE_API_KEY:"Delete API Key",DELETE_API_KEY_CONFIRM:"Are you sure you want to delete this API key?",API_KEY:"API Key",SIGN_IN:"Sign In",SIGN_IN_ACTION:"Login",SIGN_IN_DESCRIPTION:"Enter your email below to login to your account",SIGN_IN_USERNAME_DESCRIPTION:"Enter your username or email to login to your account",SIGN_IN_WITH:"Sign in with",SIGN_OUT:"Sign Out",SIGN_UP:"Sign Up",SIGN_UP_ACTION:"Create an account",SIGN_UP_DESCRIPTION:"Enter your information to create an account",SIGN_UP_EMAIL:"Check your email for the verification link.",SESSIONS:"Sessions",SESSIONS_DESCRIPTION:"Manage your active sessions and revoke access.",SET_PASSWORD:"Set Password",SET_PASSWORD_DESCRIPTION:"Click the button below to receive an email to set up a password for your account.",SETTINGS:"Settings",SAVE:"Save",SECURITY:"Security",SWITCH_ACCOUNT:"Switch Account",TRUST_DEVICE:"Trust this device",TWO_FACTOR:"Two-Factor",TWO_FACTOR_ACTION:"Verify code",TWO_FACTOR_DESCRIPTION:"Please enter your one-time password to continue",TWO_FACTOR_CARD_DESCRIPTION:"Add an extra layer of security to your account.",TWO_FACTOR_DISABLE_INSTRUCTIONS:"Please enter your password to disable 2FA.",TWO_FACTOR_ENABLE_INSTRUCTIONS:"Please enter your password to enable 2FA.",TWO_FACTOR_ENABLED:"Two-factor authentication has been enabled",TWO_FACTOR_DISABLED:"Two-Factor Authentication has been disabled",TWO_FACTOR_PROMPT:"Two-Factor Authentication",TWO_FACTOR_TOTP_LABEL:"Scan the QR Code with your Authenticator",SEND_VERIFICATION_CODE:"Send verification code",UNLINK:"Unlink",UPDATED_SUCCESSFULLY:"updated successfully",USERNAME:"Username",USERNAME_DESCRIPTION:"Enter the username you want to use to log in.",USERNAME_INSTRUCTIONS:"Please use 32 characters at maximum.",USERNAME_PLACEHOLDER:"Username",OPTIONAL_BRACKETS:"(Optional)",SIGN_IN_USERNAME_PLACEHOLDER:"Username or email",VERIFY_YOUR_EMAIL:"Verify Your Email",VERIFY_YOUR_EMAIL_DESCRIPTION:"Please verify your email address. Check your inbox for the verification email. If you haven't received the email, click the button below to resend.",GO_BACK:"Go back",SESSION_NOT_FRESH:"Your session is not fresh. Please sign in again.",UPLOAD_AVATAR:"Upload Avatar",LOGO:"Logo",LOGO_DESCRIPTION:"Click on the logo to upload a custom one from your files.",LOGO_INSTRUCTIONS:"A logo is optional but strongly recommended.",UPLOAD:"Upload",UPLOAD_LOGO:"Upload Logo",DELETE_LOGO:"Delete Logo",PRIVACY_POLICY:"Privacy Policy",TERMS_OF_SERVICE:"Terms of Service",PROTECTED_BY_RECAPTCHA:"This site is protected by reCAPTCHA.",BY_CONTINUING_YOU_AGREE:"By continuing, you agree to the",USER:"User",ORGANIZATIONS:"Organizations",ORGANIZATIONS_DESCRIPTION:"Manage your organizations and memberships.",ORGANIZATIONS_INSTRUCTIONS:"Create an organization to collaborate with other users.",LEAVE_ORGANIZATION:"Leave Organization",LEAVE_ORGANIZATION_CONFIRM:"Are you sure you want to leave this organization?",LEAVE_ORGANIZATION_SUCCESS:"You have successfully left the organization.",MANAGE_ORGANIZATION:"Manage Organization",REMOVE_MEMBER:"Remove Member",REMOVE_MEMBER_CONFIRM:"Are you sure you want to remove this member from the organization?",REMOVE_MEMBER_SUCCESS:"Member removed successfully",INVITE_MEMBER:"Invite Member",MEMBERS:"Members",MEMBERS_DESCRIPTION:"Add or remove members and manage their roles.",MEMBERS_INSTRUCTIONS:"Invite new members to your organization.",INVITE_MEMBER_DESCRIPTION:"Send an invitation to add a new member to your organization.",ROLE:"Role",SELECT_ROLE:"Select a role",ADMIN:"Admin",MEMBER:"Member",GUEST:"Guest",OWNER:"Owner",UPDATE_ROLE_DESCRIPTION:"Update the role for this member",UPDATE_ROLE:"Update Role",MEMBER_ROLE_UPDATED:"Member role updated successfully",SEND_INVITATION:"Send Invitation",SEND_INVITATION_SUCCESS:"Invitation sent successfully",PENDING_INVITATIONS:"Pending Invitations",PENDING_INVITATIONS_DESCRIPTION:"Manage pending invitations to your organization.",PENDING_USER_INVITATIONS_DESCRIPTION:"Invitations you've received from organizations.",CANCEL_INVITATION:"Cancel Invitation",INVITATION_CANCELLED:"Invitation cancelled successfully",ACCEPT_INVITATION:"Accept Invitation",ACCEPT_INVITATION_DESCRIPTION:"You have been invited to join an organization.",INVITATION_ACCEPTED:"Invitation accepted successfully",INVITATION_REJECTED:"Invitation rejected successfully",ACCEPT:"Accept",REJECT:"Reject",INVITATION_EXPIRED:"This invitation has expired",DELETE_ORGANIZATION:"Delete Organization",DELETE_ORGANIZATION_DESCRIPTION:"Permanently remove your organization and all of its contents. This action is not reversible — please continue with caution.",DELETE_ORGANIZATION_SUCCESS:"Organization deleted successfully",DELETE_ORGANIZATION_INSTRUCTIONS:"Enter the organization slug to continue:",SLUG_REQUIRED:"Organization slug is required",SLUG_DOES_NOT_MATCH:"The slug does not match",TEAM:"Team",TEAMS:"Teams",TEAM_ACTIVE:"Active",TEAM_SET_ACTIVE:"Set Active",CREATE_TEAM:"Create Team",CREATE_TEAM_SUCCESS:"Team created successfully",UPDATE_TEAM:"Update Team",UPDATE_TEAMS:"Update Teams",SELECT_TEAMS:"Select teams",ADD:"Add",REMOVE:"Remove",UPDATE_TEAM_DESCRIPTION:"Update the name for this team",UPDATE_TEAMS_DESCRIPTION:"Add or remove teams for this member",REMOVE_TEAM_CONFIRM:"Are you sure you want to remove this team from the organization?",CREATE_TEAM_INSTRUCTIONS:"Add new team to your organization.",TEAM_NAME:"Team Name",TEAM_NAME_PLACEHOLDER:"Engineering Team",TEAM_NAME_DESCRIPTION:"This is your team's visible name.",TEAM_NAME_INSTRUCTIONS:"Please use 64 characters at maximum.",TEAMS_DESCRIPTION:"Manage your teams within your organization.",USER_TEAMS_DESCRIPTION:"You are a member of the following teams.",DELETE_TEAM:"Delete Team",DELETE_TEAM_DESCRIPTION:"Permanently remove this team and all of its contents.",DELETE_TEAM_SUCCESS:"Team deleted successfully",DELETE_TEAM_INSTRUCTIONS:"Enter the team name to continue:",TEAM_NAME_REQUIRED:"Team name is required",TEAM_NAME_DOES_NOT_MATCH:"The team name does not match",TEAM_MEMBERS:"Team Members",TEAM_MEMBERS_DESCRIPTION:"Manage your team members and their roles.",ADD_TEAM_MEMBER:"Add Team Member",REMOVE_TEAM_MEMBER:"Remove Team Member",REMOVE_TEAM_MEMBER_CONFIRM:"Are you sure you want to remove this member from the team?",REMOVE_TEAM_MEMBER_SUCCESS:"Team member removed successfully",ADD_TEAM_MEMBER_SUCCESS:"Team member added successfully",UPDATE_TEAM_SUCCESS:"Team updated successfully",MANAGE_TEAM_MEMBERS:"Manage Team Members",MANAGE_TEAM_MEMBERS_DESCRIPTION:"Search and add organization members to this team.",NO_TEAMS_FOUND:"No teams found",MEMBER_SINGULAR:"member",MEMBER_PLURAL:"members",UNKNOWN:"Unknown",...jce,...Nce,...Fce,...Bce,...$ce,...qce,...Vce,...Hce,...Gce,...Kce,...Wce,...Yce,...Zce,...Qce,...Jce,...Xce},tde={CALLBACK:"callback",EMAIL_OTP:"email-otp",EMAIL_VERIFICATION:"email-verification",FORGOT_PASSWORD:"forgot-password",MAGIC_LINK:"magic-link",RECOVER_ACCOUNT:"recover-account",RESET_PASSWORD:"reset-password",SIGN_IN:"sign-in",SIGN_OUT:"sign-out",SIGN_UP:"sign-up",TWO_FACTOR:"two-factor",ACCEPT_INVITATION:"accept-invitation"},ZO={SETTINGS:"settings",SECURITY:"security",TEAMS:"teams",API_KEYS:"api-keys",ORGANIZATIONS:"organizations"},QO={SETTINGS:"settings",MEMBERS:"members",TEAMS:"teams",API_KEYS:"api-keys"};const y4=R.createContext({});function S4(){return R.useContext(y4)}var F0,JO;function ode(){if(JO)return F0;JO=1;var e=function(){};return F0=e,F0}var ade=ode();const nde=Ll(ade);function rde({async:e,appendTo:t,defer:o,id:a,nonce:n,src:i}){const l=document.createElement("script");e!==void 0&&(l.async=e),o!==void 0&&(l.defer=o),a&&(l.id=a),n&&l.setAttribute("nonce",n),l.src=i,(t==="head"?document.head:document.body).appendChild(l)}var ide=function(e,t){var o={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(o[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(o[a[n]]=e[a[n]]);return o};let hp=null,Fp=!1;const ov=new Set,av=new Set,sde=typeof window<"u",ud="___grecaptcha_cfg",T4=`onLoadCallback_${Math.random().toString(36).slice(2)}`;function lde(){if(!sde)return;function e(o){if(Fp)o();else{window[ud]||(window[ud]={});const a=window[ud];a.fns||(a.fns=[]),a.fns.push(o)}}window.grecaptcha||(window.grecaptcha={}),window.grecaptcha.enterprise||(window.grecaptcha.enterprise={}),window.grecaptcha.ready=e,window.grecaptcha.enterprise.ready=e;function t(){Fp=!0;for(const o of av)o();av.clear()}window[T4]=t}function cde({language:e,onLoadCallbackName:t,render:o,useEnterprise:a=!1,useRecaptchaNet:n=!1}){const i=n?"recaptcha.net":"google.com",l=a?"enterprise.js":"api.js",c=new URLSearchParams({render:o});return t&&c.set("onload",t),e&&c.set("hl",e),`https://www.${i}/recaptcha/${l}?${c.toString()}`}function dde({language:e,render:t,scriptProps:o,useEnterprise:a,useRecaptchaNet:n}){const i={id:"google-recaptcha-v3"},l=cde({language:e,onLoadCallbackName:T4,render:t,useEnterprise:a,useRecaptchaNet:n});if(hp){if(hp!==l)throw new Error("reCAPTCHA has already been loaded with different parameters. Remove the existing script and load it again.");return}hp=l,rde(Object.assign(Object.assign(Object.assign({},i),o),{src:l}))}function ude(e){if(!window[ud])return;const t=window[ud];t.clients&&delete t.clients[e]}function pde(e,t){var{onLoadCallback:o,onLoadCallbackName:a}=t,n=ide(t,["onLoadCallback","onLoadCallbackName"]);if(ov.size===0&&lde(),dde(n),ov.add(e),o&&(Fp?o():av.add(o)),a){let i=function(){if(!a)return;const l=window[a];typeof l=="function"&&l()};Fp?i():av.add(i)}}function mde(e){var t,o,a;ov.delete(e),ov.size===0&&(window.grecaptcha=void 0,window[ud]=void 0,(t=document.querySelector(".grecaptcha-badge"))===null||t===void 0||t.remove(),(o=document.querySelector(`script[src="${hp}"]`))===null||o===void 0||o.remove(),(a=document.querySelector('script[src^="https://www.gstatic.com/recaptcha/releases"]'))===null||a===void 0||a.remove(),hp=null,Fp=!1)}let XO=!1;function gde({container:e,children:t,language:o,reCaptchaKey:a,scriptProps:n,useEnterprise:i,useRecaptchaNet:l}){var c,u,p,g,m,f,v;const b=R.useId(),[S,C]=R.useState(null),[w,_]=R.useState(null),E=R.useRef(!1);R.useEffect(()=>{function D(){var O;const N=i?(O=window.grecaptcha)===null||O===void 0?void 0:O.enterprise:window.grecaptcha;if(!N)throw new Error("reCAPTCHA not found");if(!N.ready)throw new Error("reCAPTCHA ready callback not found");N.ready(()=>{C(N)})}return pde(b,{language:o,onLoadCallback:D,onLoadCallbackName:n?.onLoadCallbackName,render:e?.element?"explicit":a,scriptProps:{appendTo:n?.appendTo,async:n?.async,defer:n?.defer,id:n?.id,nonce:n?.nonce},useEnterprise:i,useRecaptchaNet:l}),()=>{mde(b),C(null)}},[e?.element,b,o,a,n?.appendTo,n?.async,n?.defer,n?.id,n?.nonce,n?.onLoadCallbackName,i,l]),R.useEffect(()=>{var D,O,N;if(!e?.element||!S?.render)return;const $={"error-callback":e.parameters.errorCallback,"expired-callback":e.parameters.expiredCallback,badge:((D=e.parameters)===null||D===void 0?void 0:D.badge)||"inline",callback:e.parameters.callback,sitekey:a,size:"invisible",tabindex:e.parameters.tabindex,theme:e.parameters.theme},F=typeof e?.element=="string"?document.getElementById(e.element):e?.element;if(!F)throw new Error("reCAPTCHA container element not found");const z=S.render(F,$);return!((O=e?.parameters)===null||O===void 0)&&O.hidden&&(XO||(nde(!1,"reCAPTCHA badge hidden. See https://cloud.google.com/recaptcha/docs/faq#id_like_to_hide_the_badge_what_is_allowed for more information."),XO=!0),(N=F.querySelector(".grecaptcha-badge"))===null||N===void 0||N.style.setProperty("display","none")),_(z),E.current=!0,()=>{_(null),E.current=!1,ude(z),F.innerHTML=""}},[e?.element,(c=e?.parameters)===null||c===void 0?void 0:c.badge,(u=e?.parameters)===null||u===void 0?void 0:u.hidden,(p=e?.parameters)===null||p===void 0?void 0:p.callback,(g=e?.parameters)===null||g===void 0?void 0:g.errorCallback,(m=e?.parameters)===null||m===void 0?void 0:m.expiredCallback,(f=e?.parameters)===null||f===void 0?void 0:f.tabindex,(v=e?.parameters)===null||v===void 0?void 0:v.theme,S,a]);const k=!!e?.element,x=k?w:a,A=R.useMemo(()=>x!==null&&S?.execute?D=>{if(x===null||!S?.execute)throw new Error("reCAPTCHA has not been loaded");return k&&!E.current?(console.warn("Client ID not mounted"),null):S.execute(x,{action:D})}:void 0,[x,S,k]);return T.jsx(y4.Provider,{value:{container:e?.element,executeRecaptcha:A,reCaptchaInstance:S},children:t})}var hde=class{cache=new Map;listeners=new Map;inFlightRequests=new Map;get(e){return this.cache.get(e)}set(e,t){const o={data:t,timestamp:Date.now(),isRefetching:!1};this.cache.set(e,o),this.notify(e)}setRefetching(e,t){const o=this.cache.get(e);o&&(o.isRefetching=t,this.notify(e))}clear(e){if(e)this.cache.delete(e),this.inFlightRequests.delete(e),this.notify(e);else{this.cache.clear(),this.inFlightRequests.clear();const t=Array.from(this.listeners.keys());for(const o of t)this.notify(o)}}getInFlightRequest(e){return this.inFlightRequests.get(e)}setInFlightRequest(e,t){this.inFlightRequests.set(e,t)}removeInFlightRequest(e){this.inFlightRequests.delete(e)}subscribe(e,t){return this.listeners.has(e)||this.listeners.set(e,new Set),this.listeners.get(e).add(t),()=>{const o=this.listeners.get(e);o&&(o.delete(t),o.size===0&&this.listeners.delete(e))}}notify(e){const t=this.listeners.get(e);if(t){const o=Array.from(t);for(const a of o)a()}}},Hn=new hde;function fde(){return()=>{}}function Fi(){return R.useSyncExternalStore(fde,()=>!0,()=>!1)}function w4(){const[e,t]=R.useState();return R.useEffect(()=>{const o=()=>{const n=document.documentElement.getAttribute("lang");t(n??void 0)};o();const a=new MutationObserver(n=>{for(const i of n)i.attributeName==="lang"&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{lang:e}}function aP(){const[e,t]=R.useState("light");return R.useEffect(()=>{const o=()=>{var n;const i=document.documentElement.classList.contains("dark")||((n=document.documentElement.getAttribute("style"))==null?void 0:n.includes("color-scheme: dark"));t(i?"dark":"light")};o();const a=new MutationObserver(n=>{for(const i of n)(i.attributeName==="style"||i.attributeName==="class")&&o()});return a.observe(document.documentElement,{attributes:!0}),()=>{a.disconnect()}},[]),{theme:e}}function vde({children:e}){const t=Fi(),{captcha:o}=R.useContext(yt);return o?.provider!=="google-recaptcha-v3"?e:T.jsxs(gde,{reCaptchaKey:o.siteKey,useEnterprise:o.enterprise,useRecaptchaNet:o.recaptchaNet,children:[t&&T.jsx("style",{children:`
161
161
  .grecaptcha-badge {
162
162
  visibility: hidden;
163
163
  border-radius: var(--radius) !important;
@@ -170,7 +170,7 @@ ou um por linha`,"common.inviteMemberDialog.errorFailedInvite":"Falha ao convida
170
170
  .dark .grecaptcha-badge {
171
171
  border-color: var(--input) !important;
172
172
  }
173
- `}),T.jsx(bde,{}),e]})}function bde(){const{executeRecaptcha:e}=S4(),{theme:t}=aP(),{lang:o}=w4();return R.useEffect(()=>{if(!e)return;(async()=>{const n=document.querySelector("iframe[title='reCAPTCHA']");if(n){const i=new URL(n.src);i.searchParams.set("theme",t),o&&i.searchParams.set("hl",o),n.src=i.toString()}})()},[e,t,o]),null}function yde({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:o,useListOrganizations:a}}=R.useContext(yt),{pathMode:n,slug:i}=t||{};let l,c,u,p;const{data:g,isPending:m,isRefetching:f}=a();if(n==="slug"){const v=e||i;l=g?.find(b=>b.slug===v),c=m,u=f}else{const{data:v,isPending:b,isRefetching:S,refetch:C}=o();p=C,l=v,c=b,u=S}return R.useMemo(()=>({data:l,isPending:c,isRefetching:u,refetch:p}),[l,c,u,p])}var Sde=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:o,navigate:a,redirectTo:n}=R.useContext(yt),{slug:i,pathMode:l,personalPath:c}=o||{},{data:u}=t(),{data:p,isPending:g,isRefetching:m,refetch:f}=yde(),{refetch:v}=e(),{data:b}=e();return R.useEffect(()=>{u?.user.id&&(p||b)&&(f?.(),v?.())},[u?.user.id]),R.useEffect(()=>{m||g||i&&l==="slug"&&!p&&a(c||n)},[p,m,g,i,l,c,a,n]),null},Tde=({href:e,className:t,children:o})=>T.jsx("a",{className:t,href:e,children:o}),wde=e=>{window.location.href=e},_de=e=>{window.location.replace(e)},Cde=({variant:e="default",message:t})=>{e==="default"?Vr(t):Vr[e](t)},yt=R.createContext({}),Pde=({children:e,authClient:t,account:o,avatar:a,deleteUser:n,social:i,genericOAuth:l,basePath:c="/auth",baseURL:u="",captcha:p,redirectTo:g="/",credentials:m,changeEmail:f=!0,freshAge:v=3600*24,hooks:b,mutators:S,localization:C,localizeErrors:w=!0,nameRequired:_=!0,organization:E,teams:k,signUp:x=!0,toast:A=Cde,viewPaths:D,navigate:O,replace:N,Link:$=Tde,emailVerification:F,...z})=>{const j=t,K=R.useMemo(()=>{if(a)return a===!0?{extension:"png",size:128}:{upload:a.upload,delete:a.delete,extension:a.extension||"png",size:a.size||(a.upload?256:128),Image:a.Image}},[a]),ne=R.useMemo(()=>{if(F)return F===!0?{otp:!1}:{otp:F.otp??!1}},[F]),H=R.useMemo(()=>{var Y;return o===!1?void 0:o===!0||o===void 0?{basePath:"/account",fields:["image","name"],viewPaths:ZO}:{basePath:((Y=o.basePath)!=null&&Y.endsWith("/")?o.basePath.slice(0,-1):o.basePath)??"/account",fields:o.fields||["image","name"],viewPaths:{...ZO,...o.viewPaths}}},[o]),Z=R.useMemo(()=>{if(n)return n===!0?{}:n},[n]),te=R.useMemo(()=>{if(i)return i},[i]),le=R.useMemo(()=>{if(l)return l},[l]),Q=R.useMemo(()=>{if(m!==!1)return m===!0?{forgotPassword:!0,usernameRequired:!0}:{...m,forgotPassword:m?.forgotPassword??!0,usernameRequired:m?.usernameRequired??!0}},[m]),M=R.useMemo(()=>{if(x!==!1)return x===!0||x===void 0?{fields:["name"]}:{fields:x.fields||["name"]}},[x]),G=R.useMemo(()=>{var Y;if(!E)return;if(E===!0)return{basePath:"/organization",viewPaths:QO,customRoles:[]};let ae;E.logo===!0?ae={extension:"png",size:128}:E.logo&&(ae={upload:E.logo.upload,delete:E.logo.delete,extension:E.logo.extension||"png",size:E.logo.size||(E.logo.upload?256:128)});const ve=(Y=E.basePath)!=null&&Y.endsWith("/")?E.basePath.slice(0,-1):E.basePath;return{...E,logo:ae,basePath:ve??"/organization",customRoles:E.customRoles||[],viewPaths:{...QO,...E.viewPaths}}},[E]),q=R.useMemo(()=>{var Y,ae;if(!(!k||!G))return k===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:k.enabled??!0,customRoles:k.customRoles||[],colors:{count:((Y=k.colors)==null?void 0:Y.count)??5,prefix:((ae=k.colors)==null?void 0:ae.prefix)??"team"}}},[k,G]),L=R.useMemo(()=>({deleteApiKey:Y=>j.apiKey.delete({...Y,fetchOptions:{throw:!0}}),deletePasskey:Y=>j.passkey.deletePasskey({...Y,fetchOptions:{throw:!0}}),revokeDeviceSession:Y=>j.multiSession.revoke({...Y,fetchOptions:{throw:!0}}),revokeSession:Y=>j.revokeSession({...Y,fetchOptions:{throw:!0}}),setActiveSession:Y=>j.multiSession.setActive({...Y,fetchOptions:{throw:!0}}),updateOrganization:Y=>j.organization.update({...Y,fetchOptions:{throw:!0}}),updateTeam:Y=>j.$fetch("/organization/update-team",{method:"POST",body:Y,throw:!0}),updateUser:Y=>j.updateUser({...Y,fetchOptions:{throw:!0}}),unlinkAccount:Y=>j.unlinkAccount({...Y,fetchOptions:{throw:!0}})}),[j]),U=R.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>Tn({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Y=>Tn({queryFn:()=>j.accountInfo(Y),cacheKey:`accountInfo:${JSON.stringify(Y)}`}),useListDeviceSessions:()=>Tn({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Tn({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>Tn({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Y=>Tn({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Y}),cacheKey:`hasPermission:${JSON.stringify(Y)}`}),useInvitation:Y=>Tn({queryFn:()=>j.organization.getInvitation(Y),cacheKey:`invitation:${JSON.stringify(Y)}`}),useListInvitations:Y=>Tn({queryFn:()=>{var ae;return j.$fetch(`/organization/list-invitations?organizationId=${((ae=Y?.query)==null?void 0:ae.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Y)}`}),useListUserInvitations:()=>Tn({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Y=>Tn({queryFn:()=>{var ae;return j.$fetch(`/organization/list-members?organizationId=${((ae=Y?.query)==null?void 0:ae.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Y)}`}),useListTeams:Y=>Tn({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Y?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Y)}`}),useListTeamMembers:Y=>Tn({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Y?.teamId?{query:{teamId:Y.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Y)}`}),useListUserTeams:()=>Tn({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),J=R.useMemo(()=>({...tde,...D}),[D]),pe=R.useMemo(()=>({...ede,...C}),[C]),ge=R.useMemo(()=>({...U,...b}),[U,b]),Ce=R.useMemo(()=>({...L,...S}),[L,S]);u=u.endsWith("/")?u.slice(0,-1):u,c=c.endsWith("/")?c.slice(0,-1):c;const{data:$e}=ge.useSession();return T.jsxs(yt.Provider,{value:{authClient:j,avatar:K,basePath:c==="/"?"":c,baseURL:u,captcha:p,redirectTo:g,changeEmail:f,credentials:Q,deleteUser:Z,emailVerification:ne,freshAge:v,genericOAuth:le,hooks:ge,mutators:Ce,localization:pe,localizeErrors:w,nameRequired:_,organization:G,teams:q,account:H,signUp:M,social:te,toast:A,navigate:O||wde,replace:N||O||_de,viewPaths:J,Link:$,...z},children:[$e&&G&&T.jsx(Sde,{}),p?.provider==="google-recaptcha-v3"?T.jsx(vde,{children:e}):e]})};function Tn({queryFn:e,cacheKey:t,staleTime:o=1e4}){var a;const{hooks:{useSession:n},toast:i,localization:l,localizeErrors:c}=R.useContext(yt),{data:u,isPending:p}=n(),g=R.useRef(e);g.current=e;const m=t||e.toString(),f=R.useSyncExternalStore(R.useCallback(E=>Hn.subscribe(m,E),[m]),R.useCallback(()=>Hn.get(m),[m]),R.useCallback(()=>Hn.get(m),[m])),v=R.useRef(!1),b=R.useRef(void 0),[S,C]=R.useState(null),w=R.useCallback(async()=>{const E=Hn.getInFlightRequest(m);if(E){try{const x=await E;x.error?C(x.error):C(null)}catch(x){C(x)}return}f?.data!==void 0&&Hn.setRefetching(m,!0);const k=g.current();Hn.setInFlightRequest(m,k);try{const{data:x,error:A}=await k;A?(C(A),i({variant:"error",message:zo({error:A,localization:l,localizeErrors:c})})):C(null),Hn.set(m,x)}catch(x){const A=x;C(A),i({variant:"error",message:zo({error:A,localization:l,localizeErrors:c})})}finally{Hn.setRefetching(m,!1),Hn.removeInFlightRequest(m)}},[m,i,l,c,f]);R.useEffect(()=>{var E;const k=(E=u?.user)==null?void 0:E.id;if(!u){Hn.setRefetching(m,!1),Hn.clear(m),v.current=!1,b.current=void 0;return}const x=b.current!==void 0&&b.current!==k;x&&Hn.clear(m);const A=f?.data!==void 0,D=!f||Date.now()-f.timestamp>o;(!v.current||!A||x||A&&D)&&(!A||D)&&(v.current=!0,w()),b.current=k},[u,(a=u?.user)==null?void 0:a.id,m,w,f,o]);const _=p||f?.data===void 0&&!S;return{data:f?.data??null,isPending:_,isRefetching:f?.isRefetching??!1,error:S,refetch:w}}const kde=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_4=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var xde={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ede=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:l,...c},u)=>R.createElement("svg",{ref:u,...xde,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:_4("lucide",n),...c},[...l.map(([p,g])=>R.createElement(p,g)),...Array.isArray(i)?i:[i]]));const Ua=(e,t)=>{const o=R.forwardRef(({className:a,...n},i)=>R.createElement(Ede,{ref:i,iconNode:t,className:_4(`lucide-${kde(e)}`,a),...n}));return o.displayName=`${e}`,o};const Rde=Ua("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Ade=Ua("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const C4=Ua("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Dde=Ua("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const Ode=Ua("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Ide=Ua("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Mde=Ua("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const Ba=Ua("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const P4=Ua("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const k4=Ua("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const Lde=Ua("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const Nde=Ua("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const e2=Ua("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Fde=Ua("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const Bde=Ua("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const jde=Ua("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var im=e=>e.type==="checkbox",wl=e=>e instanceof Date,Ka=e=>e==null;const x4=e=>typeof e=="object";var Uo=e=>!Ka(e)&&!Array.isArray(e)&&x4(e)&&!wl(e),E4=e=>Uo(e)&&e.target?im(e.target)?e.target.checked:e.target.value:e,R4=(e,t)=>t.split(".").some((o,a,n)=>!isNaN(Number(o))&&e.has(n.slice(0,a).join("."))),Ude=e=>{const t=e.constructor&&e.constructor.prototype;return Uo(t)&&t.hasOwnProperty("isPrototypeOf")},nP=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function so(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(nP&&(e instanceof Blob||t))return e;const o=Array.isArray(e);if(!o&&!(Uo(e)&&Ude(e)))return e;const a=o?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=so(e[n]));return a}var Jv=e=>/^\w*$/.test(e),no=e=>e===void 0,Xv=e=>Array.isArray(e)?e.filter(Boolean):[],rP=e=>Xv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,o)=>{if(!t||!Uo(e))return o;const n=(Jv(t)?[t]:rP(t)).reduce((i,l)=>Ka(i)?void 0:i[l],e);return no(n)||n===e?no(e[t])?o:e[t]:n},Cn=e=>typeof e=="boolean",Ma=e=>typeof e=="function",zt=(e,t,o)=>{let a=-1;const n=Jv(t)?[t]:rP(t),i=n.length,l=i-1;for(;++a<i;){const c=n[a];let u=o;if(a!==l){const p=e[c];u=Uo(p)||Array.isArray(p)?p:isNaN(+n[a+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const Ss={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Zn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},B0="form",A4="root",iP=X.createContext(null);iP.displayName="HookFormControlContext";const eb=()=>X.useContext(iP);var D4=(e,t,o,a=!0)=>{const n={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const l=i;return t._proxyFormState[l]!==Zn.all&&(t._proxyFormState[l]=!a||Zn.all),o&&(o[l]=!0),e[l]}});return n};const tb=typeof window<"u"?X.useLayoutEffect:X.useEffect;function O4(e){const t=eb(),{control:o=t,disabled:a,name:n,exact:i}=e||{},[l,c]=X.useState(o._formState),u=X.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return tb(()=>o._subscribe({name:n,formState:u.current,exact:i,callback:p=>{!a&&c({...o._formState,...p})}}),[n,a,i]),X.useEffect(()=>{u.current.isValid&&o._setValid(!0)},[o]),X.useMemo(()=>D4(l,o,u.current,!1),[l,o])}var La=e=>typeof e=="string",Xw=(e,t,o,a,n)=>La(e)?(a&&t.watch.add(e),Ne(o,e,n)):Array.isArray(e)?e.map(i=>(a&&t.watch.add(i),Ne(o,i))):(a&&(t.watchAll=!0),o),e_=e=>Ka(e)||!x4(e);function Pn(e,t,o=new WeakSet){if(e===t)return!0;if(e_(e)||e_(t))return Object.is(e,t);if(wl(e)&&wl(t))return Object.is(e.getTime(),t.getTime());const a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;if(o.has(e)||o.has(t))return!0;o.add(e),o.add(t);for(const i of a){const l=e[i];if(!(i in t))return!1;if(i!=="ref"){const c=t[i];if(wl(l)&&wl(c)||(Uo(l)||Array.isArray(l))&&(Uo(c)||Array.isArray(c))?!Pn(l,c,o):!Object.is(l,c))return!1}}return!0}function zde(e){const t=eb(),{control:o=t,name:a,defaultValue:n,disabled:i,exact:l,compute:c}=e||{},u=X.useRef(n),p=X.useRef(c),g=X.useRef(void 0),m=X.useRef(o),f=X.useRef(a);p.current=c;const[v,b]=X.useState(()=>{const k=o._getWatch(a,u.current);return p.current?p.current(k):k}),S=X.useCallback(k=>{const x=Xw(a,o._names,k||o._formValues,!1,u.current);return p.current?p.current(x):x},[o._formValues,o._names,a]),C=X.useCallback(k=>{if(!i){const x=Xw(a,o._names,k||o._formValues,!1,u.current);if(p.current){const A=p.current(x);Pn(A,g.current)||(b(A),g.current=A)}else b(x)}},[o._formValues,o._names,i,a]);tb(()=>((m.current!==o||!Pn(f.current,a))&&(m.current=o,f.current=a,C()),o._subscribe({name:a,formState:{values:!0},exact:l,callback:k=>{C(k.values)}})),[o,l,a,C]),X.useEffect(()=>o._removeUnmounted());const w=m.current!==o,_=f.current,E=X.useMemo(()=>{if(i)return null;const k=!w&&!Pn(_,a);return w||k?S():null},[i,w,a,_,S]);return E!==null?E:v}function $de(e){const t=eb(),{name:o,disabled:a,control:n=t,shouldUnregister:i,defaultValue:l,exact:c=!0}=e,u=R4(n._names.array,o),p=X.useMemo(()=>Ne(n._formValues,o,Ne(n._defaultValues,o,l)),[n,o,l]),g=zde({control:n,name:o,defaultValue:p,exact:c}),m=O4({control:n,name:o,exact:c}),f=X.useRef(e),v=X.useRef(n.register(o,{...e.rules,value:g,...Cn(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const b=X.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(m.errors,o)},isDirty:{enumerable:!0,get:()=>!!Ne(m.dirtyFields,o)},isTouched:{enumerable:!0,get:()=>!!Ne(m.touchedFields,o)},isValidating:{enumerable:!0,get:()=>!!Ne(m.validatingFields,o)},error:{enumerable:!0,get:()=>Ne(m.errors,o)}}),[m,o]),S=X.useCallback(E=>v.current.onChange({target:{value:E4(E),name:o},type:Ss.CHANGE}),[o]),C=X.useCallback(()=>v.current.onBlur({target:{value:Ne(n._formValues,o),name:o},type:Ss.BLUR}),[o,n._formValues]),w=X.useCallback(E=>{const k=Ne(n._fields,o);k&&k._f&&E&&(k._f.ref={focus:()=>Ma(E.focus)&&E.focus(),select:()=>Ma(E.select)&&E.select(),setCustomValidity:x=>Ma(E.setCustomValidity)&&E.setCustomValidity(x),reportValidity:()=>Ma(E.reportValidity)&&E.reportValidity()})},[n._fields,o]),_=X.useMemo(()=>({name:o,value:g,...Cn(a)||m.disabled?{disabled:m.disabled||a}:{},onChange:S,onBlur:C,ref:w}),[o,a,m.disabled,S,C,w,g]);return X.useEffect(()=>{const E=n._options.shouldUnregister||i;n.register(o,{...f.current.rules,...Cn(f.current.disabled)?{disabled:f.current.disabled}:{}});const k=(x,A)=>{const D=Ne(n._fields,x);D&&D._f&&(D._f.mount=A)};if(k(o,!0),E){const x=so(Ne(n._options.defaultValues,o,f.current.defaultValue));zt(n._defaultValues,o,x),no(Ne(n._formValues,o))&&zt(n._formValues,o,x)}return!u&&n.register(o),()=>{(u?E&&!n._state.action:E)?n.unregister(o):k(o,!1)}},[o,n,u,i]),X.useEffect(()=>{n._setDisabledField({disabled:a,name:o})},[a,o,n]),X.useMemo(()=>({field:_,formState:m,fieldState:b}),[_,m,b])}const qde=e=>e.render($de(e)),sP=X.createContext(null);sP.displayName="HookFormContext";const Vde=()=>X.useContext(sP),Hde=e=>{const{children:t,watch:o,getValues:a,getFieldState:n,setError:i,clearErrors:l,setValue:c,trigger:u,formState:p,resetField:g,reset:m,handleSubmit:f,unregister:v,control:b,register:S,setFocus:C,subscribe:w}=e,_=X.useMemo(()=>({watch:o,getValues:a,getFieldState:n,setError:i,clearErrors:l,setValue:c,trigger:u,formState:p,resetField:g,reset:m,handleSubmit:f,unregister:v,control:b,register:S,setFocus:C,subscribe:w}),[l,b,p,n,a,f,S,m,g,i,C,c,w,u,v,o]);return X.createElement(sP.Provider,{value:_},X.createElement(iP.Provider,{value:_.control},t))};var lP=(e,t,o,a,n)=>t?{...o[e],types:{...o[e]&&o[e].types?o[e].types:{},[a]:n||!0}}:{},dn=e=>Array.isArray(e)?e:[e],t2=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}};function I4(e,t){const o={};for(const a in e)if(e.hasOwnProperty(a)){const n=e[a],i=t[a];if(n&&Uo(n)&&i){const l=I4(n,i);Uo(l)&&(o[a]=l)}else e[a]&&(o[a]=i)}return o}var Sa=e=>Uo(e)&&!Object.keys(e).length,cP=e=>e.type==="file",nv=e=>{if(!nP)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},M4=e=>e.type==="select-multiple",dP=e=>e.type==="radio",Gde=e=>dP(e)||im(e),j0=e=>nv(e)&&e.isConnected;function Kde(e,t){const o=t.slice(0,-1).length;let a=0;for(;a<o;){if(Ka(e)){e=void 0;break}e=e[t[a]],a++}return e}function Wde(e){for(const t in e)if(e.hasOwnProperty(t)&&!no(e[t]))return!1;return!0}function Lo(e,t){if(La(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const o=Array.isArray(t)?t:Jv(t)?[t]:rP(t),a=o.length===1?e:Kde(e,o),n=o.length-1,i=o[n];return a&&delete a[i],n!==0&&(Uo(a)&&Sa(a)||Array.isArray(a)&&Wde(a))&&Lo(e,o.slice(0,-1)),e}var Yde=e=>{for(const t in e)if(Ma(e[t]))return!0;return!1};function L4(e){return Array.isArray(e)||Uo(e)&&!Yde(e)}function t_(e,t={}){for(const o in e){const a=e[o];L4(a)?(t[o]=Array.isArray(a)?[]:{},t_(a,t[o])):no(a)||(t[o]=!0)}return t}function sp(e,t,o){o||(o=t_(t));for(const a in e){const n=e[a];if(L4(n))no(t)||e_(o[a])?o[a]=t_(n,Array.isArray(n)?[]:{}):sp(n,Ka(t)?{}:t[a],o[a]);else{const i=t[a];o[a]=!Pn(n,i)}}return o}const o2={value:!1,isValid:!1},a2={value:!0,isValid:!0};var N4=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(o=>o&&o.checked&&!o.disabled).map(o=>o.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!no(e[0].attributes.value)?no(e[0].value)||e[0].value===""?a2:{value:e[0].value,isValid:!0}:a2:o2}return o2},F4=(e,{valueAsNumber:t,valueAsDate:o,setValueAs:a})=>no(e)?e:t?e===""?NaN:e&&+e:o&&La(e)?new Date(e):a?a(e):e;const n2={isValid:!1,value:null};var B4=e=>Array.isArray(e)?e.reduce((t,o)=>o&&o.checked&&!o.disabled?{isValid:!0,value:o.value}:t,n2):n2;function r2(e){const t=e.ref;return cP(t)?t.files:dP(t)?B4(e.refs).value:M4(t)?[...t.selectedOptions].map(({value:o})=>o):im(t)?N4(e.refs).value:F4(no(t.value)?e.ref.value:t.value,e)}var Zde=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Qde=(e,t,o,a)=>{const n={};for(const i of e){const l=Ne(t,i);l&&zt(n,i,l._f)}return{criteriaMode:o,names:[...e],fields:n,shouldUseNativeValidation:a}},rv=e=>e instanceof RegExp,Hu=e=>no(e)?e:rv(e)?e.source:Uo(e)?rv(e.value)?e.value.source:e.value:e,od=e=>({isOnSubmit:!e||e===Zn.onSubmit,isOnBlur:e===Zn.onBlur,isOnChange:e===Zn.onChange,isOnAll:e===Zn.all,isOnTouch:e===Zn.onTouched});const i2="AsyncFunction";var Jde=e=>!!e&&!!e.validate&&!!(Ma(e.validate)&&e.validate.constructor.name===i2||Uo(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===i2)),Xde=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),o_=(e,t,o)=>!o&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const pd=(e,t,o,a)=>{for(const n of o||Object.keys(e)){const i=Ne(e,n);if(i){const{_f:l,...c}=i;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],n)&&!a)return!0;if(l.ref&&t(l.ref,l.name)&&!a)return!0;if(pd(c,t))break}else if(Uo(c)&&pd(c,t))break}}};function s2(e,t,o){const a=Ne(e,o);if(a||Jv(o))return{error:a,name:o};const n=o.split(".");for(;n.length;){const i=n.join("."),l=Ne(t,i),c=Ne(e,i);if(l&&!Array.isArray(l)&&o!==i)return{name:o};if(c&&c.type)return{name:i,error:c};if(c&&c.root&&c.root.type)return{name:`${i}.root`,error:c.root};n.pop()}return{name:o}}var eue=(e,t,o,a)=>{o(e);const{name:n,...i}=e;return Sa(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(l=>t[l]===(!a||Zn.all))},tue=(e,t,o)=>!e||!t||e===t||dn(e).some(a=>a&&(o?a===t:a.startsWith(t)||t.startsWith(a))),oue=(e,t,o,a,n)=>n.isOnAll?!1:!o&&n.isOnTouch?!(t||e):(o?a.isOnBlur:n.isOnBlur)?!e:(o?a.isOnChange:n.isOnChange)?e:!0,aue=(e,t)=>!Xv(Ne(e,t)).length&&Lo(e,t),j4=(e,t,o)=>{const a=dn(Ne(e,o));return zt(a,A4,t[o]),zt(e,o,a),e};function l2(e,t,o="validate"){if(La(e)||Array.isArray(e)&&e.every(La)||Cn(e)&&!e)return{type:o,message:La(e)?e:"",ref:t}}var zc=e=>Uo(e)&&!rv(e)?e:{value:e,message:""},a_=async(e,t,o,a,n,i)=>{const{ref:l,refs:c,required:u,maxLength:p,minLength:g,min:m,max:f,pattern:v,validate:b,name:S,valueAsNumber:C,mount:w}=e._f,_=Ne(o,S);if(!w||t.has(S))return{};const E=c?c[0]:l,k=z=>{n&&E.reportValidity&&(E.setCustomValidity(Cn(z)?"":z||""),E.reportValidity())},x={},A=dP(l),D=im(l),O=A||D,N=(C||cP(l))&&no(l.value)&&no(_)||nv(l)&&l.value===""||_===""||Array.isArray(_)&&!_.length||C&&typeof _=="number"&&isNaN(_),$=lP.bind(null,S,a,x),F=(z,j,K,ne=gr.maxLength,H=gr.minLength)=>{const Z=z?j:K;x[S]={type:z?ne:H,message:Z,ref:l,...$(z?ne:H,Z)}};if(i?!Array.isArray(_)||!_.length:u&&(!O&&(N||Ka(_))||Cn(_)&&!_||D&&!N4(c).isValid||A&&!B4(c).isValid)){const{value:z,message:j}=La(u)?{value:!!u,message:u}:zc(u);if(z&&(x[S]={type:gr.required,message:j,ref:E,...$(gr.required,j)},!a))return k(j),x}if(!N&&(!Ka(m)||!Ka(f))){let z,j;const K=zc(f),ne=zc(m);if(!Ka(_)&&!isNaN(_)){const H=l.valueAsNumber||_&&+_;Ka(K.value)||(z=H>K.value),Ka(ne.value)||(j=H<ne.value)}else{const H=l.valueAsDate||new Date(_),Z=Q=>new Date(new Date().toDateString()+" "+Q),te=l.type=="time",le=l.type=="week";La(K.value)&&_&&(z=te?Z(_)>Z(K.value):le?_>K.value:H>new Date(K.value)),La(ne.value)&&_&&(j=te?Z(_)<Z(ne.value):le?_<ne.value:H<new Date(ne.value))}if((z||j)&&(F(!!z,K.message,ne.message,gr.max,gr.min),!a))return k(x[S].message),x}if((p||g)&&!N&&(La(_)||i&&Array.isArray(_))){const z=zc(p),j=zc(g),K=!Ka(z.value)&&_.length>+z.value,ne=!Ka(j.value)&&_.length<+j.value;if((K||ne)&&(F(K,z.message,j.message),!a))return k(x[S].message),x}if(v&&!N&&La(_)){const{value:z,message:j}=zc(v);if(rv(z)&&!_.match(z)&&(x[S]={type:gr.pattern,message:j,ref:l,...$(gr.pattern,j)},!a))return k(j),x}if(b){if(Ma(b)){const z=await b(_,o),j=l2(z,E);if(j&&(x[S]={...j,...$(gr.validate,j.message)},!a))return k(j.message),x}else if(Uo(b)){let z={};for(const j in b){if(!Sa(z)&&!a)break;const K=l2(await b[j](_,o),E,j);K&&(z={...K,...$(j,K.message)},k(K.message),a&&(x[S]=z))}if(!Sa(z)&&(x[S]={ref:E,...z},!a))return x}}return k(!0),x};const nue={mode:Zn.onSubmit,reValidateMode:Zn.onChange,shouldFocusError:!0};function rue(e={}){let t={...nue,...e},o={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ma(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},a={},n=Uo(t.defaultValues)||Uo(t.values)?so(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:so(n),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},u,p=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...g};let f={...m};const v={array:t2(),state:t2()},b=t.criteriaMode===Zn.all,S=W=>oe=>{clearTimeout(p),p=setTimeout(W,oe)},C=async W=>{if(!l.keepIsValid&&!t.disabled&&(m.isValid||f.isValid||W)){let oe;t.resolver?(oe=Sa((await N()).errors),w()):oe=await z({fields:a,onlyCheckValid:!0,eventType:Ss.VALID}),oe!==o.isValid&&v.state.next({isValid:oe})}},w=(W,oe)=>{!t.disabled&&(m.isValidating||m.validatingFields||f.isValidating||f.validatingFields)&&((W||Array.from(c.mount)).forEach(se=>{se&&(oe?zt(o.validatingFields,se,oe):Lo(o.validatingFields,se))}),v.state.next({validatingFields:o.validatingFields,isValidating:!Sa(o.validatingFields)}))},_=W=>{const oe=sp(n,i),se=Zde(W);zt(o.dirtyFields,se,Ne(oe,se))},E=(W,oe=[],se,Pe,Ee=!0,Re=!0)=>{if(Pe&&se&&!t.disabled){if(l.action=!0,Re&&Array.isArray(Ne(a,W))){const Le=se(Ne(a,W),Pe.argA,Pe.argB);Ee&&zt(a,W,Le)}if(Re&&Array.isArray(Ne(o.errors,W))){const Le=se(Ne(o.errors,W),Pe.argA,Pe.argB);Ee&&zt(o.errors,W,Le),aue(o.errors,W)}if((m.touchedFields||f.touchedFields)&&Re&&Array.isArray(Ne(o.touchedFields,W))){const Le=se(Ne(o.touchedFields,W),Pe.argA,Pe.argB);Ee&&zt(o.touchedFields,W,Le)}(m.dirtyFields||f.dirtyFields)&&_(W),v.state.next({name:W,isDirty:K(W,oe),dirtyFields:o.dirtyFields,errors:o.errors,isValid:o.isValid})}else zt(i,W,oe)},k=(W,oe)=>{zt(o.errors,W,oe),v.state.next({errors:o.errors})},x=W=>{o.errors=W,v.state.next({errors:o.errors,isValid:!1})},A=(W,oe,se,Pe)=>{const Ee=Ne(a,W);if(Ee){const Re=Ne(i,W,no(se)?Ne(n,W):se);no(Re)||Pe&&Pe.defaultChecked||oe?zt(i,W,oe?Re:r2(Ee._f)):Z(W,Re),l.mount&&!l.action&&C()}},D=(W,oe,se,Pe,Ee)=>{let Re=!1,Le=!1;const at={name:W};if(!t.disabled){if(!se||Pe){(m.isDirty||f.isDirty)&&(Le=o.isDirty,o.isDirty=at.isDirty=K(),Re=Le!==at.isDirty);const rt=Pn(Ne(n,W),oe);Le=!!Ne(o.dirtyFields,W),rt?Lo(o.dirtyFields,W):zt(o.dirtyFields,W,!0),at.dirtyFields=o.dirtyFields,Re=Re||(m.dirtyFields||f.dirtyFields)&&Le!==!rt}if(se){const rt=Ne(o.touchedFields,W);rt||(zt(o.touchedFields,W,se),at.touchedFields=o.touchedFields,Re=Re||(m.touchedFields||f.touchedFields)&&rt!==se)}Re&&Ee&&v.state.next(at)}return Re?at:{}},O=(W,oe,se,Pe)=>{const Ee=Ne(o.errors,W),Re=(m.isValid||f.isValid)&&Cn(oe)&&o.isValid!==oe;if(t.delayError&&se?(u=S(()=>k(W,se)),u(t.delayError)):(clearTimeout(p),u=null,se?zt(o.errors,W,se):Lo(o.errors,W)),(se?!Pn(Ee,se):Ee)||!Sa(Pe)||Re){const Le={...Pe,...Re&&Cn(oe)?{isValid:oe}:{},errors:o.errors,name:W};o={...o,...Le},v.state.next(Le)}},N=async W=>(w(W,!0),await t.resolver(i,t.context,Qde(W||c.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),$=async W=>{const{errors:oe}=await N(W);if(w(W),W)for(const se of W){const Pe=Ne(oe,se);Pe?zt(o.errors,se,Pe):Lo(o.errors,se)}else o.errors=oe;return oe},F=async({name:W,eventType:oe})=>{if(e.validate){const se=await e.validate({formValues:i,formState:o,name:W,eventType:oe});if(Uo(se))for(const Pe in se)se[Pe]&&pe(`${B0}.${Pe}`,{message:La(se.message)?se.message:"",type:gr.validate});else La(se)||!se?pe(B0,{message:se||"",type:gr.validate}):J(B0);return se}return!0},z=async({fields:W,onlyCheckValid:oe,name:se,eventType:Pe,context:Ee={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ee.runRootValidation=!0,!await F({name:se,eventType:Pe})&&(Ee.valid=!1,oe)))return Ee.valid;for(const Re in W){const Le=W[Re];if(Le){const{_f:at,...rt}=Le;if(at){const St=c.array.has(at.name),Et=Le._f&&Jde(Le._f);Et&&m.validatingFields&&w([at.name],!0);const Tt=await a_(Le,c.disabled,i,b,t.shouldUseNativeValidation&&!oe,St);if(Et&&m.validatingFields&&w([at.name]),Tt[at.name]&&(Ee.valid=!1,oe)||(!oe&&(Ne(Tt,at.name)?St?j4(o.errors,Tt,at.name):zt(o.errors,at.name,Tt[at.name]):Lo(o.errors,at.name)),e.shouldUseNativeValidation&&Tt[at.name]))break}!Sa(rt)&&await z({context:Ee,onlyCheckValid:oe,fields:rt,name:Re,eventType:Pe})}}return Ee.valid},j=()=>{for(const W of c.unMount){const oe=Ne(a,W);oe&&(oe._f.refs?oe._f.refs.every(se=>!j0(se)):!j0(oe._f.ref))&&Y(W)}c.unMount=new Set},K=(W,oe)=>!t.disabled&&(W&&oe&&zt(i,W,oe),!Pn(L(),n)),ne=(W,oe,se)=>Xw(W,c,{...l.mount?i:no(oe)?n:La(W)?{[W]:oe}:oe},se,oe),H=W=>Xv(Ne(l.mount?i:n,W,t.shouldUnregister?Ne(n,W,[]):[])),Z=(W,oe,se={})=>{const Pe=Ne(a,W);let Ee=oe;if(Pe){const Re=Pe._f;Re&&(!Re.disabled&&zt(i,W,F4(oe,Re)),Ee=nv(Re.ref)&&Ka(oe)?"":oe,M4(Re.ref)?[...Re.ref.options].forEach(Le=>Le.selected=Ee.includes(Le.value)):Re.refs?im(Re.ref)?Re.refs.forEach(Le=>{(!Le.defaultChecked||!Le.disabled)&&(Array.isArray(Ee)?Le.checked=!!Ee.find(at=>at===Le.value):Le.checked=Ee===Le.value||!!Ee)}):Re.refs.forEach(Le=>Le.checked=Le.value===Ee):cP(Re.ref)?Re.ref.value="":(Re.ref.value=Ee,Re.ref.type||v.state.next({name:W,values:so(i)})))}(se.shouldDirty||se.shouldTouch)&&D(W,Ee,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&q(W)},te=(W,oe,se)=>{for(const Pe in oe){if(!oe.hasOwnProperty(Pe))return;const Ee=oe[Pe],Re=W+"."+Pe,Le=Ne(a,Re);(c.array.has(W)||Uo(Ee)||Le&&!Le._f)&&!wl(Ee)?te(Re,Ee,se):Z(Re,Ee,se)}},le=(W,oe,se={})=>{const Pe=Ne(a,W),Ee=c.array.has(W),Re=so(oe),Le=Ne(i,W),at=Pn(Le,Re);if(zt(i,W,Re),Ee)v.array.next({name:W,values:so(i)}),se.shouldDirty&&(_(W),v.state.next({name:W,dirtyFields:o.dirtyFields,isDirty:K(W,Re)}));else{const rt=Array.isArray(Re)&&!Re.length||Sa(Re);!Pe||Pe._f||Ka(Re)||rt?Z(W,Re,se):te(W,Re,se)}at||(o_(W,c)?v.state.next({...o,name:W,values:so(i)}):v.state.next({name:l.mount?W:void 0,values:so(i)}))},Q=W=>{const oe=Ma(W)?W(i):W;Pn(i,oe)||(i={...i,...oe},v.state.next({...o,values:i}))},M=async W=>{l.mount=!0;const oe=W.target;let se=oe.name,Pe=!0;const Ee=Ne(a,se),Re=rt=>{Pe=Number.isNaN(rt)||wl(rt)&&isNaN(rt.getTime())||Pn(rt,Ne(i,se,rt))},Le=od(t.mode),at=od(t.reValidateMode);if(Ee){let rt,St;const Et=oe.type?r2(Ee._f):E4(W),Tt=W.type===Ss.BLUR||W.type===Ss.FOCUS_OUT,$o=!Xde(Ee._f)&&!e.validate&&!t.resolver&&!Ne(o.errors,se)&&!Ee._f.deps||oue(Tt,Ne(o.touchedFields,se),o.isSubmitted,at,Le),Jr=o_(se,c,Tt);zt(i,se,Et),Tt?(!oe||!oe.readOnly)&&(Ee._f.onBlur&&Ee._f.onBlur(W),u&&u(0)):Ee._f.onChange&&Ee._f.onChange(W);const rr=D(se,Et,Tt),Xe=!Sa(rr)||Jr;if(!Tt&&v.state.next({name:se,type:W.type,values:so(i)}),$o)return(m.isValid||f.isValid)&&(t.mode==="onBlur"?Tt&&C():Tt||C()),Xe&&v.state.next({name:se,...Jr?{}:rr});if(!t.resolver&&e.validate&&await F({name:se,eventType:W.type}),!Tt&&Jr&&v.state.next({...o}),t.resolver){const{errors:ht}=await N([se]);if(w([se]),Re(Et),Pe){const Rt=s2(o.errors,a,se),dt=s2(ht,a,Rt.name||se);rt=dt.error,se=dt.name,St=Sa(ht)}}else w([se],!0),rt=(await a_(Ee,c.disabled,i,b,t.shouldUseNativeValidation))[se],w([se]),Re(Et),Pe&&(rt?St=!1:(m.isValid||f.isValid)&&(St=await z({fields:a,onlyCheckValid:!0,name:se,eventType:W.type})));Pe&&(Ee._f.deps&&(!Array.isArray(Ee._f.deps)||Ee._f.deps.length>0)&&q(Ee._f.deps),O(se,St,rt,rr))}},G=(W,oe)=>{if(Ne(o.errors,oe)&&W.focus)return W.focus(),1},q=async(W,oe={})=>{let se,Pe;const Ee=dn(W);if(t.resolver){const Re=await $(no(W)?W:Ee);se=Sa(Re),Pe=W?!Ee.some(Le=>Ne(Re,Le)):se}else W?(Pe=(await Promise.all(Ee.map(async Re=>{const Le=Ne(a,Re);return await z({fields:Le&&Le._f?{[Re]:Le}:Le,eventType:Ss.TRIGGER})}))).every(Boolean),!(!Pe&&!o.isValid)&&C()):Pe=se=await z({fields:a,name:W,eventType:Ss.TRIGGER});return v.state.next({...!La(W)||(m.isValid||f.isValid)&&se!==o.isValid?{}:{name:W},...t.resolver||!W?{isValid:se}:{},errors:o.errors}),oe.shouldFocus&&!Pe&&pd(a,G,W?Ee:c.mount),Pe},L=(W,oe)=>{let se={...l.mount?i:n};return oe&&(se=I4(oe.dirtyFields?o.dirtyFields:o.touchedFields,se)),no(W)?se:La(W)?Ne(se,W):W.map(Pe=>Ne(se,Pe))},U=(W,oe)=>({invalid:!!Ne((oe||o).errors,W),isDirty:!!Ne((oe||o).dirtyFields,W),error:Ne((oe||o).errors,W),isValidating:!!Ne(o.validatingFields,W),isTouched:!!Ne((oe||o).touchedFields,W)}),J=W=>{const oe=W?dn(W):void 0;oe?.forEach(se=>Lo(o.errors,se)),oe?oe.forEach(se=>{v.state.next({name:se,errors:o.errors})}):v.state.next({errors:{}})},pe=(W,oe,se)=>{const Pe=(Ne(a,W,{_f:{}})._f||{}).ref,Ee=Ne(o.errors,W)||{},{ref:Re,message:Le,type:at,...rt}=Ee;zt(o.errors,W,{...rt,...oe,ref:Pe}),v.state.next({name:W,errors:o.errors,isValid:!1}),se&&se.shouldFocus&&Pe&&Pe.focus&&Pe.focus()},ge=(W,oe)=>Ma(W)?v.state.subscribe({next:se=>"values"in se&&W(se.values||ne(void 0,oe),se)}):ne(W,oe,!0),Ce=W=>v.state.subscribe({next:oe=>{if(tue(W.name,oe.name,W.exact)&&eue(oe,W.formState||m,De,W.reRenderRoot)){const se={...i};W.callback({values:se,...o,...oe,defaultValues:n})}}}).unsubscribe,$e=W=>(l.mount=!0,f={...f,...W.formState},Ce({...W,formState:{...g,...W.formState}})),Y=(W,oe={})=>{for(const se of W?dn(W):c.mount)c.mount.delete(se),c.array.delete(se),oe.keepValue||(Lo(a,se),Lo(i,se)),!oe.keepError&&Lo(o.errors,se),!oe.keepDirty&&Lo(o.dirtyFields,se),!oe.keepTouched&&Lo(o.touchedFields,se),!oe.keepIsValidating&&Lo(o.validatingFields,se),!t.shouldUnregister&&!oe.keepDefaultValue&&Lo(n,se);v.state.next({values:so(i)}),v.state.next({...o,...oe.keepDirty?{isDirty:K()}:{}}),!oe.keepIsValid&&C()},ae=({disabled:W,name:oe})=>{if(Cn(W)&&l.mount||W||c.disabled.has(oe)){const Ee=c.disabled.has(oe)!==!!W;W?c.disabled.add(oe):c.disabled.delete(oe),Ee&&l.mount&&!l.action&&C()}},ve=(W,oe={})=>{let se=Ne(a,W);const Pe=Cn(oe.disabled)||Cn(t.disabled),Ee=!c.registerName.has(W)&&se&&se._f&&!se._f.mount;return zt(a,W,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:W}},name:W,mount:!0,...oe}}),c.mount.add(W),se&&!Ee?ae({disabled:Cn(oe.disabled)?oe.disabled:t.disabled,name:W}):A(W,!0,oe.value),{...Pe?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:Hu(oe.min),max:Hu(oe.max),minLength:Hu(oe.minLength),maxLength:Hu(oe.maxLength),pattern:Hu(oe.pattern)}:{},name:W,onChange:M,onBlur:M,ref:Re=>{if(Re){c.registerName.add(W),ve(W,oe),c.registerName.delete(W),se=Ne(a,W);const Le=no(Re.value)&&Re.querySelectorAll&&Re.querySelectorAll("input,select,textarea")[0]||Re,at=Gde(Le),rt=se._f.refs||[];if(at?rt.find(St=>St===Le):Le===se._f.ref)return;zt(a,W,{_f:{...se._f,...at?{refs:[...rt.filter(j0),Le,...Array.isArray(Ne(n,W))?[{}]:[]],ref:{type:Le.type,name:W}}:{ref:Le}}}),A(W,!1,void 0,Le)}else se=Ne(a,W,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(R4(c.array,W)&&l.action)&&c.unMount.add(W)}}},ie=()=>t.shouldFocusError&&pd(a,G,c.mount),Te=W=>{Cn(W)&&(v.state.next({disabled:W}),pd(a,(oe,se)=>{const Pe=Ne(a,se);Pe&&(oe.disabled=Pe._f.disabled||W,Array.isArray(Pe._f.refs)&&Pe._f.refs.forEach(Ee=>{Ee.disabled=Pe._f.disabled||W}))},0,!1))},ke=(W,oe)=>async se=>{let Pe;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let Ee=so(i);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Re,values:Le}=await N();w(),o.errors=Re,Ee=so(Le)}else await z({fields:a,eventType:Ss.SUBMIT});if(c.disabled.size)for(const Re of c.disabled)Lo(Ee,Re);if(Lo(o.errors,A4),Sa(o.errors)){v.state.next({errors:{}});try{await W(Ee,se)}catch(Re){Pe=Re}}else oe&&await oe({...o.errors},se),ie(),setTimeout(ie);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sa(o.errors)&&!Pe,submitCount:o.submitCount+1,errors:o.errors}),Pe)throw Pe},it=(W,oe={})=>{Ne(a,W)&&(no(oe.defaultValue)?le(W,so(Ne(n,W))):(le(W,oe.defaultValue),zt(n,W,so(oe.defaultValue))),oe.keepTouched||Lo(o.touchedFields,W),oe.keepDirty||(Lo(o.dirtyFields,W),o.isDirty=oe.defaultValue?K(W,so(Ne(n,W))):K()),oe.keepError||(Lo(o.errors,W),m.isValid&&C()),v.state.next({...o}))},lt=(W,oe={})=>{const se=W?so(W):n,Pe=so(se),Ee=Sa(W),Re=Ee?n:Pe;if(oe.keepDefaultValues||(n=se),!oe.keepValues){if(oe.keepDirtyValues){const Le=new Set([...c.mount,...Object.keys(sp(n,i))]);for(const at of Array.from(Le)){const rt=Ne(o.dirtyFields,at),St=Ne(i,at),Et=Ne(Re,at);rt&&!no(St)?zt(Re,at,St):!rt&&!no(Et)&&le(at,Et)}}else{if(nP&&no(W))for(const Le of c.mount){const at=Ne(a,Le);if(at&&at._f){const rt=Array.isArray(at._f.refs)?at._f.refs[0]:at._f.ref;if(nv(rt)){const St=rt.closest("form");if(St){St.reset();break}}}}if(oe.keepFieldsRef)for(const Le of c.mount)le(Le,Ne(Re,Le));else a={}}i=t.shouldUnregister?oe.keepDefaultValues?so(n):{}:so(Re),v.array.next({values:{...Re}}),v.state.next({values:{...Re}})}c={mount:oe.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues||!t.shouldUnregister&&!Sa(Re),l.watch=!!t.shouldUnregister,l.keepIsValid=!!oe.keepIsValid,l.action=!1,oe.keepErrors||(o.errors={}),v.state.next({submitCount:oe.keepSubmitCount?o.submitCount:0,isDirty:Ee?!1:oe.keepDirty?o.isDirty:!!(oe.keepDefaultValues&&!Pn(W,n)),isSubmitted:oe.keepIsSubmitted?o.isSubmitted:!1,dirtyFields:Ee?{}:oe.keepDirtyValues?oe.keepDefaultValues&&i?sp(n,i):o.dirtyFields:oe.keepDefaultValues&&W?sp(n,W):oe.keepDirty?o.dirtyFields:{},touchedFields:oe.keepTouched?o.touchedFields:{},errors:oe.keepErrors?o.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?o.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Ge=(W,oe)=>lt(Ma(W)?W(i):W,{...t.resetOptions,...oe}),tt=(W,oe={})=>{const se=Ne(a,W),Pe=se&&se._f;if(Pe){const Ee=Pe.refs?Pe.refs[0]:Pe.ref;Ee.focus&&setTimeout(()=>{Ee.focus(),oe.shouldSelect&&Ma(Ee.select)&&Ee.select()})}},De=W=>{o={...o,...W}},He={control:{register:ve,unregister:Y,getFieldState:U,handleSubmit:ke,setError:pe,_subscribe:Ce,_runSchema:N,_updateIsValidating:w,_focusError:ie,_getWatch:ne,_getDirty:K,_setValid:C,_setFieldArray:E,_setDisabledField:ae,_setErrors:x,_getFieldArray:H,_reset:lt,_resetDefaultValues:()=>Ma(t.defaultValues)&&t.defaultValues().then(W=>{Ge(W,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:j,_disableForm:Te,_subjects:v,_proxyFormState:m,get _fields(){return a},get _formValues(){return i},get _state(){return l},set _state(W){l=W},get _defaultValues(){return n},get _names(){return c},set _names(W){c=W},get _formState(){return o},get _options(){return t},set _options(W){t={...t,...W}}},subscribe:$e,trigger:q,register:ve,handleSubmit:ke,watch:ge,setValue:le,setValues:Q,getValues:L,reset:Ge,resetField:it,clearErrors:J,unregister:Y,setError:pe,setFocus:tt,getFieldState:U};return{...He,formControl:He}}var gs=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const o=(Math.random()*16+e)%16|0;return(t=="x"?o:o&3|8).toString(16)})},U0=(e,t,o={})=>o.shouldFocus||no(o.shouldFocus)?o.focusName||`${e}.${no(o.focusIndex)?t:o.focusIndex}.`:"",z0=(e,t)=>[...e,...dn(t)],$0=e=>Array.isArray(e)?e.map(()=>{}):void 0;function q0(e,t,o){return[...e.slice(0,t),...dn(o),...e.slice(t)]}var V0=(e,t,o)=>Array.isArray(e)?(no(e[o])&&(e[o]=void 0),e.splice(o,0,e.splice(t,1)[0]),e):[],H0=(e,t)=>[...dn(t),...dn(e)];function iue(e,t){let o=0;const a=[...e];for(const n of t)a.splice(n-o,1),o++;return Xv(a).length?a:[]}var G0=(e,t)=>no(t)?[]:iue(e,dn(t).sort((o,a)=>o-a)),K0=(e,t,o)=>{[e[t],e[o]]=[e[o],e[t]]},c2=(e,t,o)=>(e[t]=o,e);function ebe(e){const t=eb(),{control:o=t,name:a,keyName:n="id",shouldUnregister:i,rules:l}=e,[c,u]=X.useState(o._getFieldArray(a)),p=X.useRef(o._getFieldArray(a).map(gs)),g=X.useRef(!1);o._names.array.add(a),X.useMemo(()=>l&&c.length>=0&&o.register(a,l),[o,a,c.length,l]),tb(()=>o._subjects.array.subscribe({next:({values:k,name:x})=>{if(x===a||!x){const A=Ne(k,a);Array.isArray(A)&&(u(A),p.current=A.map(gs))}}}).unsubscribe,[o,a]);const m=X.useCallback(k=>{g.current=!0,o._setFieldArray(a,k)},[o,a]),f=(k,x)=>{const A=dn(so(k)),D=z0(o._getFieldArray(a),A);o._names.focus=U0(a,D.length-1,x),p.current=z0(p.current,A.map(gs)),m(D),u(D),o._setFieldArray(a,D,z0,{argA:$0(k)})},v=(k,x)=>{const A=dn(so(k)),D=H0(o._getFieldArray(a),A);o._names.focus=U0(a,0,x),p.current=H0(p.current,A.map(gs)),m(D),u(D),o._setFieldArray(a,D,H0,{argA:$0(k)})},b=k=>{const x=G0(o._getFieldArray(a),k);p.current=G0(p.current,k),m(x),u(x),!Array.isArray(Ne(o._fields,a))&&zt(o._fields,a,void 0),o._setFieldArray(a,x,G0,{argA:k})},S=(k,x,A)=>{const D=dn(so(x)),O=q0(o._getFieldArray(a),k,D);o._names.focus=U0(a,k,A),p.current=q0(p.current,k,D.map(gs)),m(O),u(O),o._setFieldArray(a,O,q0,{argA:k,argB:$0(x)})},C=(k,x)=>{const A=o._getFieldArray(a);K0(A,k,x),K0(p.current,k,x),m(A),u(A),o._setFieldArray(a,A,K0,{argA:k,argB:x},!1)},w=(k,x)=>{const A=o._getFieldArray(a);V0(A,k,x),V0(p.current,k,x),m(A),u(A),o._setFieldArray(a,A,V0,{argA:k,argB:x},!1)},_=(k,x)=>{const A=so(x),D=c2(o._getFieldArray(a),k,A);p.current=[...D].map((O,N)=>!O||N===k?gs():p.current[N]),m(D),u([...D]),o._setFieldArray(a,D,c2,{argA:k,argB:A},!0,!1)},E=k=>{const x=dn(so(k));p.current=x.map(gs),m([...x]),u([...x]),o._setFieldArray(a,[...x],A=>A,{},!0,!1)};return X.useEffect(()=>{o._state.action=!1,o_(a,o._names)&&o._subjects.state.next({...o._formState});const k=od(o._options.mode);if(g.current&&(!k.isOnSubmit||o._formState.isSubmitted)&&!od(o._options.reValidateMode).isOnSubmit&&!k.isOnBlur)if(o._options.resolver)o._runSchema([a]).then(x=>{o._updateIsValidating([a]);const A=Ne(x.errors,a),D=Ne(o._formState.errors,a);(D?!A&&D.type||A&&(D.type!==A.type||D.message!==A.message):A&&A.type)&&(A?zt(o._formState.errors,a,A):Lo(o._formState.errors,a),o._subjects.state.next({errors:o._formState.errors}))});else{const x=Ne(o._fields,a);x&&x._f&&!(od(o._options.reValidateMode).isOnSubmit&&od(o._options.mode).isOnSubmit)&&a_(x,o._names.disabled,o._formValues,o._options.criteriaMode===Zn.all,o._options.shouldUseNativeValidation,!0).then(A=>!Sa(A)&&o._subjects.state.next({errors:j4(o._formState.errors,A,a)}))}o._subjects.state.next({name:a,values:so(o._formValues)}),o._names.focus&&pd(o._fields,(x,A)=>{if(o._names.focus&&A.startsWith(o._names.focus)&&x.focus)return x.focus(),1}),o._names.focus="",o._setValid(),g.current=!1},[c,a,o]),X.useEffect(()=>(!Ne(o._formValues,a)&&o._setFieldArray(a),()=>{const k=(x,A)=>{const D=Ne(o._fields,x);D&&D._f&&(D._f.mount=A)};o._options.shouldUnregister||i?o.unregister(a):k(a,!1)}),[a,o,n,i]),{swap:X.useCallback(C,[m,a,o]),move:X.useCallback(w,[m,a,o]),prepend:X.useCallback(v,[m,a,o]),append:X.useCallback(f,[m,a,o]),remove:X.useCallback(b,[m,a,o]),insert:X.useCallback(S,[m,a,o]),update:X.useCallback(_,[m,a,o]),replace:X.useCallback(E,[m,a,o]),fields:X.useMemo(()=>c.map((k,x)=>({...k,[n]:p.current[x]||gs()})),[c,n])}}function Wr(e={}){const t=X.useRef(void 0),o=X.useRef(void 0),[a,n]=X.useState({isDirty:!1,isValidating:!1,isLoading:Ma(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ma(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!Ma(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=rue(e);t.current={...c,formState:a}}const i=t.current.control;return i._options=e,tb(()=>{const l=i._subscribe({formState:i._proxyFormState,callback:()=>n({...i._formState}),reRenderRoot:!0});return n(c=>({...c,isReady:!0})),i._formState.isReady=!0,l},[i]),X.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),X.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),X.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),X.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),X.useEffect(()=>{if(i._proxyFormState.isDirty){const l=i._getDirty();l!==a.isDirty&&i._subjects.state.next({isDirty:l})}},[i,a.isDirty]),X.useEffect(()=>{var l;e.values&&!Pn(e.values,o.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((l=i._options.resetOptions)===null||l===void 0)&&l.keepIsValid||i._setValid(),o.current=e.values,n(c=>({...c}))):i._resetDefaultValues()},[i,e.values]),X.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=X.useMemo(()=>D4(a,i),[i,a]),t.current}const d2=(e,t,o)=>{if(e&&"reportValidity"in e){const a=Ne(o,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},n_=(e,t)=>{for(const o in t.fields){const a=t.fields[o];a&&a.ref&&"reportValidity"in a.ref?d2(a.ref,o,e):a&&a.refs&&a.refs.forEach(n=>d2(n,o,e))}},u2=(e,t)=>{t.shouldUseNativeValidation&&n_(e,t);const o={};for(const a in e){const n=Ne(t.fields,a),i=Object.assign(e[a]||{},{ref:n&&n.ref});if(sue(t.names||Object.keys(e),a)){const l=Object.assign({},Ne(o,a));zt(l,"root",i),zt(o,a,l)}else zt(o,a,i)}return o},sue=(e,t)=>{const o=p2(t);return e.some(a=>p2(a).match(`^${o}\\.\\d+`))};function p2(e){return e.replace(/\]|\[/g,"")}function m2(e,t){try{var o=e()}catch(a){return t(a)}return o&&o.then?o.then(void 0,t):o}function lue(e,t){for(var o={};e.length;){var a=e[0],n=a.code,i=a.message,l=a.path.join(".");if(!o[l])if("unionErrors"in a){var c=a.unionErrors[0].errors[0];o[l]={message:c.message,type:c.code}}else o[l]={message:i,type:n};if("unionErrors"in a&&a.unionErrors.forEach(function(g){return g.errors.forEach(function(m){return e.push(m)})}),t){var u=o[l].types,p=u&&u[a.code];o[l]=lP(l,t,o,n,p?[].concat(p,a.message):a.message)}e.shift()}return o}function cue(e,t){for(var o={};e.length;){var a=e[0],n=a.code,i=a.message,l=a.path.join(".");if(!o[l])if(a.code==="invalid_union"&&a.errors.length>0){var c=a.errors[0][0];o[l]={message:c.message,type:c.code}}else o[l]={message:i,type:n};if(a.code==="invalid_union"&&a.errors.forEach(function(g){return g.forEach(function(m){return e.push(m)})}),t){var u=o[l].types,p=u&&u[a.code];o[l]=lP(l,t,o,n,p?[].concat(p,a.message):a.message)}e.shift()}return o}function Yr(e,t,o){if(o===void 0&&(o={}),(function(a){return"_def"in a&&typeof a._def=="object"&&"typeName"in a._def})(e))return function(a,n,i){try{return Promise.resolve(m2(function(){return Promise.resolve(e[o.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(l){return i.shouldUseNativeValidation&&n_({},i),{errors:{},values:o.raw?Object.assign({},a):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:u2(lue(l.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};if((function(a){return"_zod"in a&&typeof a._zod=="object"})(e))return function(a,n,i){try{return Promise.resolve(m2(function(){return Promise.resolve((o.mode==="sync"?Oq:Iq)(e,a,t)).then(function(l){return i.shouldUseNativeValidation&&n_({},i),{errors:{},values:o.raw?Object.assign({},a):l}})},function(l){if((function(c){return c instanceof L_})(l))return{values:{},errors:u2(cue(l.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}var ob="Dialog",[U4,tbe]=Ul(ob),[due,xr]=U4(ob),z4=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:i,modal:l=!0}=e,c=R.useRef(null),u=R.useRef(null),[p,g]=Qp({prop:a,defaultProp:n??!1,onChange:i,caller:ob});return T.jsx(due,{scope:t,triggerRef:c,contentRef:u,contentId:Rs(),titleId:Rs(),descriptionId:Rs(),open:p,onOpenChange:g,onOpenToggle:R.useCallback(()=>g(m=>!m),[g]),modal:l,children:o})};z4.displayName=ob;var $4="DialogTrigger",q4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr($4,o),i=sa(t,n.triggerRef);return T.jsx(Eo.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":mP(n.open),...a,ref:i,onClick:mt(e.onClick,n.onOpenToggle)})});q4.displayName=$4;var uP="DialogPortal",[uue,V4]=U4(uP,{forceMount:void 0}),H4=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,i=xr(uP,t);return T.jsx(uue,{scope:t,forceMount:o,children:R.Children.map(a,l=>T.jsx(Ii,{present:o||i.open,children:T.jsx(CC,{asChild:!0,container:n,children:l})}))})};H4.displayName=uP;var iv="DialogOverlay",G4=R.forwardRef((e,t)=>{const o=V4(iv,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,i=xr(iv,e.__scopeDialog);return i.modal?T.jsx(Ii,{present:a||i.open,children:T.jsx(mue,{...n,ref:t})}):null});G4.displayName=iv;var pue=kp("DialogOverlay.RemoveScroll"),mue=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(iv,o);return T.jsx(PC,{as:pue,allowPinchZoom:!0,shards:[n.contentRef],children:T.jsx(Eo.div,{"data-state":mP(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Ml="DialogContent",K4=R.forwardRef((e,t)=>{const o=V4(Ml,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,i=xr(Ml,e.__scopeDialog);return T.jsx(Ii,{present:a||i.open,children:i.modal?T.jsx(gue,{...n,ref:t}):T.jsx(hue,{...n,ref:t})})});K4.displayName=Ml;var gue=R.forwardRef((e,t)=>{const o=xr(Ml,e.__scopeDialog),a=R.useRef(null),n=sa(t,o.contentRef,a);return R.useEffect(()=>{const i=a.current;if(i)return pF(i)},[]),T.jsx(W4,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(e.onCloseAutoFocus,i=>{i.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:mt(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&i.preventDefault()}),onFocusOutside:mt(e.onFocusOutside,i=>i.preventDefault())})}),hue=R.forwardRef((e,t)=>{const o=xr(Ml,e.__scopeDialog),a=R.useRef(!1),n=R.useRef(!1);return T.jsx(W4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(a.current||o.triggerRef.current?.focus(),i.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(a.current=!0,i.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=i.target;o.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&n.current&&i.preventDefault()}})}),W4=R.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:i,...l}=e,c=xr(Ml,o),u=R.useRef(null),p=sa(t,u);return DN(),T.jsxs(T.Fragment,{children:[T.jsx(gC,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:i,children:T.jsx(mC,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":mP(c.open),...l,ref:p,onDismiss:()=>c.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(fue,{titleId:c.titleId}),T.jsx(bue,{contentRef:u,descriptionId:c.descriptionId})]})]})}),pP="DialogTitle",Y4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(pP,o);return T.jsx(Eo.h2,{id:n.titleId,...a,ref:t})});Y4.displayName=pP;var Z4="DialogDescription",Q4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(Z4,o);return T.jsx(Eo.p,{id:n.descriptionId,...a,ref:t})});Q4.displayName=Z4;var J4="DialogClose",X4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(J4,o);return T.jsx(Eo.button,{type:"button",...a,ref:t,onClick:mt(e.onClick,()=>n.onOpenChange(!1))})});X4.displayName=J4;function mP(e){return e?"open":"closed"}var ej="DialogTitleWarning",[obe,tj]=jX(ej,{contentName:Ml,titleName:pP,docsSlug:"dialog"}),fue=({titleId:e})=>{const t=tj(ej),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
173
+ `}),T.jsx(bde,{}),e]})}function bde(){const{executeRecaptcha:e}=S4(),{theme:t}=aP(),{lang:o}=w4();return R.useEffect(()=>{if(!e)return;(async()=>{const n=document.querySelector("iframe[title='reCAPTCHA']");if(n){const i=new URL(n.src);i.searchParams.set("theme",t),o&&i.searchParams.set("hl",o),n.src=i.toString()}})()},[e,t,o]),null}function yde({slug:e}={}){const{organization:t,hooks:{useActiveOrganization:o,useListOrganizations:a}}=R.useContext(yt),{pathMode:n,slug:i}=t||{};let l,c,u,p;const{data:g,isPending:m,isRefetching:f}=a();if(n==="slug"){const v=e||i;l=g?.find(b=>b.slug===v),c=m,u=f}else{const{data:v,isPending:b,isRefetching:S,refetch:C}=o();p=C,l=v,c=b,u=S}return R.useMemo(()=>({data:l,isPending:c,isRefetching:u,refetch:p}),[l,c,u,p])}var Sde=()=>{const{hooks:{useListOrganizations:e,useSession:t},organization:o,navigate:a,redirectTo:n}=R.useContext(yt),{slug:i,pathMode:l,personalPath:c}=o||{},{data:u}=t(),{data:p,isPending:g,isRefetching:m,refetch:f}=yde(),{refetch:v}=e(),{data:b}=e();return R.useEffect(()=>{u?.user.id&&(p||b)&&(f?.(),v?.())},[u?.user.id]),R.useEffect(()=>{m||g||i&&l==="slug"&&!p&&a(c||n)},[p,m,g,i,l,c,a,n]),null},Tde=({href:e,className:t,children:o})=>T.jsx("a",{className:t,href:e,children:o}),wde=e=>{window.location.href=e},_de=e=>{window.location.replace(e)},Cde=({variant:e="default",message:t})=>{e==="default"?Vr(t):Vr[e](t)},yt=R.createContext({}),Pde=({children:e,authClient:t,account:o,avatar:a,deleteUser:n,social:i,genericOAuth:l,basePath:c="/auth",baseURL:u="",captcha:p,redirectTo:g="/",credentials:m,changeEmail:f=!0,freshAge:v=3600*24,hooks:b,mutators:S,localization:C,localizeErrors:w=!0,nameRequired:_=!0,organization:E,teams:k,signUp:x=!0,toast:A=Cde,viewPaths:D,navigate:O,replace:N,Link:$=Tde,emailVerification:F,...z})=>{const j=t,K=R.useMemo(()=>{if(a)return a===!0?{extension:"png",size:128}:{upload:a.upload,delete:a.delete,extension:a.extension||"png",size:a.size||(a.upload?256:128),Image:a.Image}},[a]),ne=R.useMemo(()=>{if(F)return F===!0?{otp:!1}:{otp:F.otp??!1}},[F]),H=R.useMemo(()=>{var Y;return o===!1?void 0:o===!0||o===void 0?{basePath:"/account",fields:["image","name"],viewPaths:ZO}:{basePath:((Y=o.basePath)!=null&&Y.endsWith("/")?o.basePath.slice(0,-1):o.basePath)??"/account",fields:o.fields||["image","name"],viewPaths:{...ZO,...o.viewPaths}}},[o]),Z=R.useMemo(()=>{if(n)return n===!0?{}:n},[n]),te=R.useMemo(()=>{if(i)return i},[i]),le=R.useMemo(()=>{if(l)return l},[l]),Q=R.useMemo(()=>{if(m!==!1)return m===!0?{forgotPassword:!0,usernameRequired:!0}:{...m,forgotPassword:m?.forgotPassword??!0,usernameRequired:m?.usernameRequired??!0}},[m]),M=R.useMemo(()=>{if(x!==!1)return x===!0||x===void 0?{fields:["name"]}:{fields:x.fields||["name"]}},[x]),G=R.useMemo(()=>{var Y;if(!E)return;if(E===!0)return{basePath:"/organization",viewPaths:QO,customRoles:[]};let ae;E.logo===!0?ae={extension:"png",size:128}:E.logo&&(ae={upload:E.logo.upload,delete:E.logo.delete,extension:E.logo.extension||"png",size:E.logo.size||(E.logo.upload?256:128)});const ve=(Y=E.basePath)!=null&&Y.endsWith("/")?E.basePath.slice(0,-1):E.basePath;return{...E,logo:ae,basePath:ve??"/organization",customRoles:E.customRoles||[],viewPaths:{...QO,...E.viewPaths}}},[E]),q=R.useMemo(()=>{var Y,ae;if(!(!k||!G))return k===!0?{enabled:!0,customRoles:[],colors:{count:5,prefix:"team"}}:{enabled:k.enabled??!0,customRoles:k.customRoles||[],colors:{count:((Y=k.colors)==null?void 0:Y.count)??5,prefix:((ae=k.colors)==null?void 0:ae.prefix)??"team"}}},[k,G]),L=R.useMemo(()=>({deleteApiKey:Y=>j.apiKey.delete({...Y,fetchOptions:{throw:!0}}),deletePasskey:Y=>j.passkey.deletePasskey({...Y,fetchOptions:{throw:!0}}),revokeDeviceSession:Y=>j.multiSession.revoke({...Y,fetchOptions:{throw:!0}}),revokeSession:Y=>j.revokeSession({...Y,fetchOptions:{throw:!0}}),setActiveSession:Y=>j.multiSession.setActive({...Y,fetchOptions:{throw:!0}}),updateOrganization:Y=>j.organization.update({...Y,fetchOptions:{throw:!0}}),updateTeam:Y=>j.$fetch("/organization/update-team",{method:"POST",body:Y,throw:!0}),updateUser:Y=>j.updateUser({...Y,fetchOptions:{throw:!0}}),unlinkAccount:Y=>j.unlinkAccount({...Y,fetchOptions:{throw:!0}})}),[j]),U=R.useMemo(()=>({useSession:j.useSession,useListAccounts:()=>Tn({queryFn:j.listAccounts,cacheKey:"listAccounts"}),useAccountInfo:Y=>Tn({queryFn:()=>j.accountInfo(Y),cacheKey:`accountInfo:${JSON.stringify(Y)}`}),useListDeviceSessions:()=>Tn({queryFn:j.multiSession.listDeviceSessions,cacheKey:"listDeviceSessions"}),useListSessions:()=>Tn({queryFn:j.listSessions,cacheKey:"listSessions"}),useListPasskeys:j.useListPasskeys,useListApiKeys:()=>Tn({queryFn:j.apiKey.list,cacheKey:"listApiKeys"}),useActiveOrganization:j.useActiveOrganization,useListOrganizations:j.useListOrganizations,useHasPermission:Y=>Tn({queryFn:()=>j.$fetch("/organization/has-permission",{method:"POST",body:Y}),cacheKey:`hasPermission:${JSON.stringify(Y)}`}),useInvitation:Y=>Tn({queryFn:()=>j.organization.getInvitation(Y),cacheKey:`invitation:${JSON.stringify(Y)}`}),useListInvitations:Y=>Tn({queryFn:()=>{var ae;return j.$fetch(`/organization/list-invitations?organizationId=${((ae=Y?.query)==null?void 0:ae.organizationId)||""}`)},cacheKey:`listInvitations:${JSON.stringify(Y)}`}),useListUserInvitations:()=>Tn({queryFn:()=>j.$fetch("/organization/list-user-invitations"),cacheKey:"listUserInvitations"}),useListMembers:Y=>Tn({queryFn:()=>{var ae;return j.$fetch(`/organization/list-members?organizationId=${((ae=Y?.query)==null?void 0:ae.organizationId)||""}`)},cacheKey:`listMembers:${JSON.stringify(Y)}`}),useListTeams:Y=>Tn({queryFn:()=>j.$fetch(`/organization/list-teams?organizationId=${Y?.organizationId||""}`),cacheKey:`listTeams:${JSON.stringify(Y)}`}),useListTeamMembers:Y=>Tn({queryFn:()=>j.$fetch("/organization/list-team-members",{method:"POST",body:Y?.teamId?{query:{teamId:Y.teamId}}:void 0}),cacheKey:`listTeamMembers:${JSON.stringify(Y)}`}),useListUserTeams:()=>Tn({queryFn:()=>j.$fetch("/organization/list-user-teams"),cacheKey:"listUserTeams"})}),[j]),J=R.useMemo(()=>({...tde,...D}),[D]),pe=R.useMemo(()=>({...ede,...C}),[C]),ge=R.useMemo(()=>({...U,...b}),[U,b]),Ce=R.useMemo(()=>({...L,...S}),[L,S]);u=u.endsWith("/")?u.slice(0,-1):u,c=c.endsWith("/")?c.slice(0,-1):c;const{data:$e}=ge.useSession();return T.jsxs(yt.Provider,{value:{authClient:j,avatar:K,basePath:c==="/"?"":c,baseURL:u,captcha:p,redirectTo:g,changeEmail:f,credentials:Q,deleteUser:Z,emailVerification:ne,freshAge:v,genericOAuth:le,hooks:ge,mutators:Ce,localization:pe,localizeErrors:w,nameRequired:_,organization:G,teams:q,account:H,signUp:M,social:te,toast:A,navigate:O||wde,replace:N||O||_de,viewPaths:J,Link:$,...z},children:[$e&&G&&T.jsx(Sde,{}),p?.provider==="google-recaptcha-v3"?T.jsx(vde,{children:e}):e]})};function Tn({queryFn:e,cacheKey:t,staleTime:o=1e4}){var a;const{hooks:{useSession:n},toast:i,localization:l,localizeErrors:c}=R.useContext(yt),{data:u,isPending:p}=n(),g=R.useRef(e);g.current=e;const m=t||e.toString(),f=R.useSyncExternalStore(R.useCallback(E=>Hn.subscribe(m,E),[m]),R.useCallback(()=>Hn.get(m),[m]),R.useCallback(()=>Hn.get(m),[m])),v=R.useRef(!1),b=R.useRef(void 0),[S,C]=R.useState(null),w=R.useCallback(async()=>{const E=Hn.getInFlightRequest(m);if(E){try{const x=await E;x.error?C(x.error):C(null)}catch(x){C(x)}return}f?.data!==void 0&&Hn.setRefetching(m,!0);const k=g.current();Hn.setInFlightRequest(m,k);try{const{data:x,error:A}=await k;A?(C(A),i({variant:"error",message:zo({error:A,localization:l,localizeErrors:c})})):C(null),Hn.set(m,x)}catch(x){const A=x;C(A),i({variant:"error",message:zo({error:A,localization:l,localizeErrors:c})})}finally{Hn.setRefetching(m,!1),Hn.removeInFlightRequest(m)}},[m,i,l,c,f]);R.useEffect(()=>{var E;const k=(E=u?.user)==null?void 0:E.id;if(!u){Hn.setRefetching(m,!1),Hn.clear(m),v.current=!1,b.current=void 0;return}const x=b.current!==void 0&&b.current!==k;x&&Hn.clear(m);const A=f?.data!==void 0,D=!f||Date.now()-f.timestamp>o;(!v.current||!A||x||A&&D)&&(!A||D)&&(v.current=!0,w()),b.current=k},[u,(a=u?.user)==null?void 0:a.id,m,w,f,o]);const _=p||f?.data===void 0&&!S;return{data:f?.data??null,isPending:_,isRefetching:f?.isRefetching??!1,error:S,refetch:w}}const kde=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_4=(...e)=>e.filter((t,o,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===o).join(" ").trim();var xde={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Ede=R.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:a,className:n="",children:i,iconNode:l,...c},u)=>R.createElement("svg",{ref:u,...xde,width:t,height:t,stroke:e,strokeWidth:a?Number(o)*24/Number(t):o,className:_4("lucide",n),...c},[...l.map(([p,g])=>R.createElement(p,g)),...Array.isArray(i)?i:[i]]));const Ua=(e,t)=>{const o=R.forwardRef(({className:a,...n},i)=>R.createElement(Ede,{ref:i,iconNode:t,className:_4(`lucide-${kde(e)}`,a),...n}));return o.displayName=`${e}`,o};const Rde=Ua("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const Ade=Ua("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);const C4=Ua("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const Dde=Ua("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);const Ode=Ua("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);const Ide=Ua("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const Mde=Ua("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);const Ba=Ua("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const P4=Ua("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);const k4=Ua("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);const Lde=Ua("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);const Nde=Ua("QrCode",[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]]);const e2=Ua("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const Fde=Ua("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);const Bde=Ua("UserRound",[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]]);const jde=Ua("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var im=e=>e.type==="checkbox",wl=e=>e instanceof Date,Ka=e=>e==null;const x4=e=>typeof e=="object";var Uo=e=>!Ka(e)&&!Array.isArray(e)&&x4(e)&&!wl(e),E4=e=>Uo(e)&&e.target?im(e.target)?e.target.checked:e.target.value:e,R4=(e,t)=>t.split(".").some((o,a,n)=>!isNaN(Number(o))&&e.has(n.slice(0,a).join("."))),Ude=e=>{const t=e.constructor&&e.constructor.prototype;return Uo(t)&&t.hasOwnProperty("isPrototypeOf")},nP=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function so(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(nP&&(e instanceof Blob||t))return e;const o=Array.isArray(e);if(!o&&!(Uo(e)&&Ude(e)))return e;const a=o?[]:Object.create(Object.getPrototypeOf(e));for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(a[n]=so(e[n]));return a}var Jv=e=>/^\w*$/.test(e),no=e=>e===void 0,Xv=e=>Array.isArray(e)?e.filter(Boolean):[],rP=e=>Xv(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Ne=(e,t,o)=>{if(!t||!Uo(e))return o;const n=(Jv(t)?[t]:rP(t)).reduce((i,l)=>Ka(i)?void 0:i[l],e);return no(n)||n===e?no(e[t])?o:e[t]:n},Cn=e=>typeof e=="boolean",Ma=e=>typeof e=="function",zt=(e,t,o)=>{let a=-1;const n=Jv(t)?[t]:rP(t),i=n.length,l=i-1;for(;++a<i;){const c=n[a];let u=o;if(a!==l){const p=e[c];u=Uo(p)||Array.isArray(p)?p:isNaN(+n[a+1])?{}:[]}if(c==="__proto__"||c==="constructor"||c==="prototype")return;e[c]=u,e=e[c]}};const Ss={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change",SUBMIT:"submit",TRIGGER:"trigger",VALID:"valid"},Zn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},gr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},B0="form",A4="root",iP=X.createContext(null);iP.displayName="HookFormControlContext";const eb=()=>X.useContext(iP);var D4=(e,t,o,a=!0)=>{const n={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(n,i,{get:()=>{const l=i;return t._proxyFormState[l]!==Zn.all&&(t._proxyFormState[l]=!a||Zn.all),o&&(o[l]=!0),e[l]}});return n};const tb=typeof window<"u"?X.useLayoutEffect:X.useEffect;function O4(e){const t=eb(),{control:o=t,disabled:a,name:n,exact:i}=e||{},[l,c]=X.useState(o._formState),u=X.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return tb(()=>o._subscribe({name:n,formState:u.current,exact:i,callback:p=>{!a&&c({...o._formState,...p})}}),[n,a,i]),X.useEffect(()=>{u.current.isValid&&o._setValid(!0)},[o]),X.useMemo(()=>D4(l,o,u.current,!1),[l,o])}var La=e=>typeof e=="string",Xw=(e,t,o,a,n)=>La(e)?(a&&t.watch.add(e),Ne(o,e,n)):Array.isArray(e)?e.map(i=>(a&&t.watch.add(i),Ne(o,i))):(a&&(t.watchAll=!0),o),e_=e=>Ka(e)||!x4(e);function Pn(e,t,o=new WeakSet){if(e===t)return!0;if(e_(e)||e_(t))return Object.is(e,t);if(wl(e)&&wl(t))return Object.is(e.getTime(),t.getTime());const a=Object.keys(e),n=Object.keys(t);if(a.length!==n.length)return!1;if(o.has(e)||o.has(t))return!0;o.add(e),o.add(t);for(const i of a){const l=e[i];if(!(i in t))return!1;if(i!=="ref"){const c=t[i];if(wl(l)&&wl(c)||(Uo(l)||Array.isArray(l))&&(Uo(c)||Array.isArray(c))?!Pn(l,c,o):!Object.is(l,c))return!1}}return!0}function zde(e){const t=eb(),{control:o=t,name:a,defaultValue:n,disabled:i,exact:l,compute:c}=e||{},u=X.useRef(n),p=X.useRef(c),g=X.useRef(void 0),m=X.useRef(o),f=X.useRef(a);p.current=c;const[v,b]=X.useState(()=>{const k=o._getWatch(a,u.current);return p.current?p.current(k):k}),S=X.useCallback(k=>{const x=Xw(a,o._names,k||o._formValues,!1,u.current);return p.current?p.current(x):x},[o._formValues,o._names,a]),C=X.useCallback(k=>{if(!i){const x=Xw(a,o._names,k||o._formValues,!1,u.current);if(p.current){const A=p.current(x);Pn(A,g.current)||(b(A),g.current=A)}else b(x)}},[o._formValues,o._names,i,a]);tb(()=>((m.current!==o||!Pn(f.current,a))&&(m.current=o,f.current=a,C()),o._subscribe({name:a,formState:{values:!0},exact:l,callback:k=>{C(k.values)}})),[o,l,a,C]),X.useEffect(()=>o._removeUnmounted());const w=m.current!==o,_=f.current,E=X.useMemo(()=>{if(i)return null;const k=!w&&!Pn(_,a);return w||k?S():null},[i,w,a,_,S]);return E!==null?E:v}function $de(e){const t=eb(),{name:o,disabled:a,control:n=t,shouldUnregister:i,defaultValue:l,exact:c=!0}=e,u=R4(n._names.array,o),p=X.useMemo(()=>Ne(n._formValues,o,Ne(n._defaultValues,o,l)),[n,o,l]),g=zde({control:n,name:o,defaultValue:p,exact:c}),m=O4({control:n,name:o,exact:c}),f=X.useRef(e),v=X.useRef(n.register(o,{...e.rules,value:g,...Cn(e.disabled)?{disabled:e.disabled}:{}}));f.current=e;const b=X.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ne(m.errors,o)},isDirty:{enumerable:!0,get:()=>!!Ne(m.dirtyFields,o)},isTouched:{enumerable:!0,get:()=>!!Ne(m.touchedFields,o)},isValidating:{enumerable:!0,get:()=>!!Ne(m.validatingFields,o)},error:{enumerable:!0,get:()=>Ne(m.errors,o)}}),[m,o]),S=X.useCallback(E=>v.current.onChange({target:{value:E4(E),name:o},type:Ss.CHANGE}),[o]),C=X.useCallback(()=>v.current.onBlur({target:{value:Ne(n._formValues,o),name:o},type:Ss.BLUR}),[o,n._formValues]),w=X.useCallback(E=>{const k=Ne(n._fields,o);k&&k._f&&E&&(k._f.ref={focus:()=>Ma(E.focus)&&E.focus(),select:()=>Ma(E.select)&&E.select(),setCustomValidity:x=>Ma(E.setCustomValidity)&&E.setCustomValidity(x),reportValidity:()=>Ma(E.reportValidity)&&E.reportValidity()})},[n._fields,o]),_=X.useMemo(()=>({name:o,value:g,...Cn(a)||m.disabled?{disabled:m.disabled||a}:{},onChange:S,onBlur:C,ref:w}),[o,a,m.disabled,S,C,w,g]);return X.useEffect(()=>{const E=n._options.shouldUnregister||i;n.register(o,{...f.current.rules,...Cn(f.current.disabled)?{disabled:f.current.disabled}:{}});const k=(x,A)=>{const D=Ne(n._fields,x);D&&D._f&&(D._f.mount=A)};if(k(o,!0),E){const x=so(Ne(n._options.defaultValues,o,f.current.defaultValue));zt(n._defaultValues,o,x),no(Ne(n._formValues,o))&&zt(n._formValues,o,x)}return!u&&n.register(o),()=>{(u?E&&!n._state.action:E)?n.unregister(o):k(o,!1)}},[o,n,u,i]),X.useEffect(()=>{n._setDisabledField({disabled:a,name:o})},[a,o,n]),X.useMemo(()=>({field:_,formState:m,fieldState:b}),[_,m,b])}const qde=e=>e.render($de(e)),sP=X.createContext(null);sP.displayName="HookFormContext";const Vde=()=>X.useContext(sP),Hde=e=>{const{children:t,watch:o,getValues:a,getFieldState:n,setError:i,clearErrors:l,setValue:c,trigger:u,formState:p,resetField:g,reset:m,handleSubmit:f,unregister:v,control:b,register:S,setFocus:C,subscribe:w}=e,_=X.useMemo(()=>({watch:o,getValues:a,getFieldState:n,setError:i,clearErrors:l,setValue:c,trigger:u,formState:p,resetField:g,reset:m,handleSubmit:f,unregister:v,control:b,register:S,setFocus:C,subscribe:w}),[l,b,p,n,a,f,S,m,g,i,C,c,w,u,v,o]);return X.createElement(sP.Provider,{value:_},X.createElement(iP.Provider,{value:_.control},t))};var lP=(e,t,o,a,n)=>t?{...o[e],types:{...o[e]&&o[e].types?o[e].types:{},[a]:n||!0}}:{},dn=e=>Array.isArray(e)?e:[e],t2=()=>{let e=[];return{get observers(){return e},next:n=>{for(const i of e)i.next&&i.next(n)},subscribe:n=>(e.push(n),{unsubscribe:()=>{e=e.filter(i=>i!==n)}}),unsubscribe:()=>{e=[]}}};function I4(e,t){const o={};for(const a in e)if(e.hasOwnProperty(a)){const n=e[a],i=t[a];if(n&&Uo(n)&&i){const l=I4(n,i);Uo(l)&&(o[a]=l)}else e[a]&&(o[a]=i)}return o}var Sa=e=>Uo(e)&&!Object.keys(e).length,cP=e=>e.type==="file",nv=e=>{if(!nP)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},M4=e=>e.type==="select-multiple",dP=e=>e.type==="radio",Gde=e=>dP(e)||im(e),j0=e=>nv(e)&&e.isConnected;function Kde(e,t){const o=t.slice(0,-1).length;let a=0;for(;a<o;){if(Ka(e)){e=void 0;break}e=e[t[a]],a++}return e}function Wde(e){for(const t in e)if(e.hasOwnProperty(t)&&!no(e[t]))return!1;return!0}function Lo(e,t){if(La(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;const o=Array.isArray(t)?t:Jv(t)?[t]:rP(t),a=o.length===1?e:Kde(e,o),n=o.length-1,i=o[n];return a&&delete a[i],n!==0&&(Uo(a)&&Sa(a)||Array.isArray(a)&&Wde(a))&&Lo(e,o.slice(0,-1)),e}var Yde=e=>{for(const t in e)if(Ma(e[t]))return!0;return!1};function L4(e){return Array.isArray(e)||Uo(e)&&!Yde(e)}function t_(e,t={}){for(const o in e){const a=e[o];L4(a)?(t[o]=Array.isArray(a)?[]:{},t_(a,t[o])):no(a)||(t[o]=!0)}return t}function sp(e,t,o){o||(o=t_(t));for(const a in e){const n=e[a];if(L4(n))no(t)||e_(o[a])?o[a]=t_(n,Array.isArray(n)?[]:{}):sp(n,Ka(t)?{}:t[a],o[a]);else{const i=t[a];o[a]=!Pn(n,i)}}return o}const o2={value:!1,isValid:!1},a2={value:!0,isValid:!0};var N4=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(o=>o&&o.checked&&!o.disabled).map(o=>o.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!no(e[0].attributes.value)?no(e[0].value)||e[0].value===""?a2:{value:e[0].value,isValid:!0}:a2:o2}return o2},F4=(e,{valueAsNumber:t,valueAsDate:o,setValueAs:a})=>no(e)?e:t?e===""?NaN:e&&+e:o&&La(e)?new Date(e):a?a(e):e;const n2={isValid:!1,value:null};var B4=e=>Array.isArray(e)?e.reduce((t,o)=>o&&o.checked&&!o.disabled?{isValid:!0,value:o.value}:t,n2):n2;function r2(e){const t=e.ref;return cP(t)?t.files:dP(t)?B4(e.refs).value:M4(t)?[...t.selectedOptions].map(({value:o})=>o):im(t)?N4(e.refs).value:F4(no(t.value)?e.ref.value:t.value,e)}var Zde=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Qde=(e,t,o,a)=>{const n={};for(const i of e){const l=Ne(t,i);l&&zt(n,i,l._f)}return{criteriaMode:o,names:[...e],fields:n,shouldUseNativeValidation:a}},rv=e=>e instanceof RegExp,Hu=e=>no(e)?e:rv(e)?e.source:Uo(e)?rv(e.value)?e.value.source:e.value:e,od=e=>({isOnSubmit:!e||e===Zn.onSubmit,isOnBlur:e===Zn.onBlur,isOnChange:e===Zn.onChange,isOnAll:e===Zn.all,isOnTouch:e===Zn.onTouched});const i2="AsyncFunction";var Jde=e=>!!e&&!!e.validate&&!!(Ma(e.validate)&&e.validate.constructor.name===i2||Uo(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===i2)),Xde=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),o_=(e,t,o)=>!o&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const pd=(e,t,o,a)=>{for(const n of o||Object.keys(e)){const i=Ne(e,n);if(i){const{_f:l,...c}=i;if(l){if(l.refs&&l.refs[0]&&t(l.refs[0],n)&&!a)return!0;if(l.ref&&t(l.ref,l.name)&&!a)return!0;if(pd(c,t))break}else if(Uo(c)&&pd(c,t))break}}};function s2(e,t,o){const a=Ne(e,o);if(a||Jv(o))return{error:a,name:o};const n=o.split(".");for(;n.length;){const i=n.join("."),l=Ne(t,i),c=Ne(e,i);if(l&&!Array.isArray(l)&&o!==i)return{name:o};if(c&&c.type)return{name:i,error:c};if(c&&c.root&&c.root.type)return{name:`${i}.root`,error:c.root};n.pop()}return{name:o}}var eue=(e,t,o,a)=>{o(e);const{name:n,...i}=e;return Sa(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(l=>t[l]===(!a||Zn.all))},tue=(e,t,o)=>!e||!t||e===t||dn(e).some(a=>a&&(o?a===t:a.startsWith(t)||t.startsWith(a))),oue=(e,t,o,a,n)=>n.isOnAll?!1:!o&&n.isOnTouch?!(t||e):(o?a.isOnBlur:n.isOnBlur)?!e:(o?a.isOnChange:n.isOnChange)?e:!0,aue=(e,t)=>!Xv(Ne(e,t)).length&&Lo(e,t),j4=(e,t,o)=>{const a=dn(Ne(e,o));return zt(a,A4,t[o]),zt(e,o,a),e};function l2(e,t,o="validate"){if(La(e)||Array.isArray(e)&&e.every(La)||Cn(e)&&!e)return{type:o,message:La(e)?e:"",ref:t}}var zc=e=>Uo(e)&&!rv(e)?e:{value:e,message:""},a_=async(e,t,o,a,n,i)=>{const{ref:l,refs:c,required:u,maxLength:p,minLength:g,min:m,max:f,pattern:v,validate:b,name:S,valueAsNumber:C,mount:w}=e._f,_=Ne(o,S);if(!w||t.has(S))return{};const E=c?c[0]:l,k=z=>{n&&E.reportValidity&&(E.setCustomValidity(Cn(z)?"":z||""),E.reportValidity())},x={},A=dP(l),D=im(l),O=A||D,N=(C||cP(l))&&no(l.value)&&no(_)||nv(l)&&l.value===""||_===""||Array.isArray(_)&&!_.length||C&&typeof _=="number"&&isNaN(_),$=lP.bind(null,S,a,x),F=(z,j,K,ne=gr.maxLength,H=gr.minLength)=>{const Z=z?j:K;x[S]={type:z?ne:H,message:Z,ref:l,...$(z?ne:H,Z)}};if(i?!Array.isArray(_)||!_.length:u&&(!O&&(N||Ka(_))||Cn(_)&&!_||D&&!N4(c).isValid||A&&!B4(c).isValid)){const{value:z,message:j}=La(u)?{value:!!u,message:u}:zc(u);if(z&&(x[S]={type:gr.required,message:j,ref:E,...$(gr.required,j)},!a))return k(j),x}if(!N&&(!Ka(m)||!Ka(f))){let z,j;const K=zc(f),ne=zc(m);if(!Ka(_)&&!isNaN(_)){const H=l.valueAsNumber||_&&+_;Ka(K.value)||(z=H>K.value),Ka(ne.value)||(j=H<ne.value)}else{const H=l.valueAsDate||new Date(_),Z=Q=>new Date(new Date().toDateString()+" "+Q),te=l.type=="time",le=l.type=="week";La(K.value)&&_&&(z=te?Z(_)>Z(K.value):le?_>K.value:H>new Date(K.value)),La(ne.value)&&_&&(j=te?Z(_)<Z(ne.value):le?_<ne.value:H<new Date(ne.value))}if((z||j)&&(F(!!z,K.message,ne.message,gr.max,gr.min),!a))return k(x[S].message),x}if((p||g)&&!N&&(La(_)||i&&Array.isArray(_))){const z=zc(p),j=zc(g),K=!Ka(z.value)&&_.length>+z.value,ne=!Ka(j.value)&&_.length<+j.value;if((K||ne)&&(F(K,z.message,j.message),!a))return k(x[S].message),x}if(v&&!N&&La(_)){const{value:z,message:j}=zc(v);if(rv(z)&&!_.match(z)&&(x[S]={type:gr.pattern,message:j,ref:l,...$(gr.pattern,j)},!a))return k(j),x}if(b){if(Ma(b)){const z=await b(_,o),j=l2(z,E);if(j&&(x[S]={...j,...$(gr.validate,j.message)},!a))return k(j.message),x}else if(Uo(b)){let z={};for(const j in b){if(!Sa(z)&&!a)break;const K=l2(await b[j](_,o),E,j);K&&(z={...K,...$(j,K.message)},k(K.message),a&&(x[S]=z))}if(!Sa(z)&&(x[S]={ref:E,...z},!a))return x}}return k(!0),x};const nue={mode:Zn.onSubmit,reValidateMode:Zn.onChange,shouldFocusError:!0};function rue(e={}){let t={...nue,...e},o={submitCount:0,isDirty:!1,isReady:!1,isLoading:Ma(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},a={},n=Uo(t.defaultValues)||Uo(t.values)?so(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:so(n),l={action:!1,mount:!1,watch:!1,keepIsValid:!1},c={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},u,p=0;const g={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...g};let f={...m};const v={array:t2(),state:t2()},b=t.criteriaMode===Zn.all,S=W=>oe=>{clearTimeout(p),p=setTimeout(W,oe)},C=async W=>{if(!l.keepIsValid&&!t.disabled&&(m.isValid||f.isValid||W)){let oe;t.resolver?(oe=Sa((await N()).errors),w()):oe=await z({fields:a,onlyCheckValid:!0,eventType:Ss.VALID}),oe!==o.isValid&&v.state.next({isValid:oe})}},w=(W,oe)=>{!t.disabled&&(m.isValidating||m.validatingFields||f.isValidating||f.validatingFields)&&((W||Array.from(c.mount)).forEach(se=>{se&&(oe?zt(o.validatingFields,se,oe):Lo(o.validatingFields,se))}),v.state.next({validatingFields:o.validatingFields,isValidating:!Sa(o.validatingFields)}))},_=W=>{const oe=sp(n,i),se=Zde(W);zt(o.dirtyFields,se,Ne(oe,se))},E=(W,oe=[],se,Pe,Ee=!0,Re=!0)=>{if(Pe&&se&&!t.disabled){if(l.action=!0,Re&&Array.isArray(Ne(a,W))){const Le=se(Ne(a,W),Pe.argA,Pe.argB);Ee&&zt(a,W,Le)}if(Re&&Array.isArray(Ne(o.errors,W))){const Le=se(Ne(o.errors,W),Pe.argA,Pe.argB);Ee&&zt(o.errors,W,Le),aue(o.errors,W)}if((m.touchedFields||f.touchedFields)&&Re&&Array.isArray(Ne(o.touchedFields,W))){const Le=se(Ne(o.touchedFields,W),Pe.argA,Pe.argB);Ee&&zt(o.touchedFields,W,Le)}(m.dirtyFields||f.dirtyFields)&&_(W),v.state.next({name:W,isDirty:K(W,oe),dirtyFields:o.dirtyFields,errors:o.errors,isValid:o.isValid})}else zt(i,W,oe)},k=(W,oe)=>{zt(o.errors,W,oe),v.state.next({errors:o.errors})},x=W=>{o.errors=W,v.state.next({errors:o.errors,isValid:!1})},A=(W,oe,se,Pe)=>{const Ee=Ne(a,W);if(Ee){const Re=Ne(i,W,no(se)?Ne(n,W):se);no(Re)||Pe&&Pe.defaultChecked||oe?zt(i,W,oe?Re:r2(Ee._f)):Z(W,Re),l.mount&&!l.action&&C()}},D=(W,oe,se,Pe,Ee)=>{let Re=!1,Le=!1;const at={name:W};if(!t.disabled){if(!se||Pe){(m.isDirty||f.isDirty)&&(Le=o.isDirty,o.isDirty=at.isDirty=K(),Re=Le!==at.isDirty);const rt=Pn(Ne(n,W),oe);Le=!!Ne(o.dirtyFields,W),rt?Lo(o.dirtyFields,W):zt(o.dirtyFields,W,!0),at.dirtyFields=o.dirtyFields,Re=Re||(m.dirtyFields||f.dirtyFields)&&Le!==!rt}if(se){const rt=Ne(o.touchedFields,W);rt||(zt(o.touchedFields,W,se),at.touchedFields=o.touchedFields,Re=Re||(m.touchedFields||f.touchedFields)&&rt!==se)}Re&&Ee&&v.state.next(at)}return Re?at:{}},O=(W,oe,se,Pe)=>{const Ee=Ne(o.errors,W),Re=(m.isValid||f.isValid)&&Cn(oe)&&o.isValid!==oe;if(t.delayError&&se?(u=S(()=>k(W,se)),u(t.delayError)):(clearTimeout(p),u=null,se?zt(o.errors,W,se):Lo(o.errors,W)),(se?!Pn(Ee,se):Ee)||!Sa(Pe)||Re){const Le={...Pe,...Re&&Cn(oe)?{isValid:oe}:{},errors:o.errors,name:W};o={...o,...Le},v.state.next(Le)}},N=async W=>(w(W,!0),await t.resolver(i,t.context,Qde(W||c.mount,a,t.criteriaMode,t.shouldUseNativeValidation))),$=async W=>{const{errors:oe}=await N(W);if(w(W),W)for(const se of W){const Pe=Ne(oe,se);Pe?zt(o.errors,se,Pe):Lo(o.errors,se)}else o.errors=oe;return oe},F=async({name:W,eventType:oe})=>{if(e.validate){const se=await e.validate({formValues:i,formState:o,name:W,eventType:oe});if(Uo(se))for(const Pe in se)se[Pe]&&pe(`${B0}.${Pe}`,{message:La(se.message)?se.message:"",type:gr.validate});else La(se)||!se?pe(B0,{message:se||"",type:gr.validate}):J(B0);return se}return!0},z=async({fields:W,onlyCheckValid:oe,name:se,eventType:Pe,context:Ee={valid:!0,runRootValidation:!1}})=>{if(e.validate&&(Ee.runRootValidation=!0,!await F({name:se,eventType:Pe})&&(Ee.valid=!1,oe)))return Ee.valid;for(const Re in W){const Le=W[Re];if(Le){const{_f:at,...rt}=Le;if(at){const St=c.array.has(at.name),Et=Le._f&&Jde(Le._f);Et&&m.validatingFields&&w([at.name],!0);const Tt=await a_(Le,c.disabled,i,b,t.shouldUseNativeValidation&&!oe,St);if(Et&&m.validatingFields&&w([at.name]),Tt[at.name]&&(Ee.valid=!1,oe)||(!oe&&(Ne(Tt,at.name)?St?j4(o.errors,Tt,at.name):zt(o.errors,at.name,Tt[at.name]):Lo(o.errors,at.name)),e.shouldUseNativeValidation&&Tt[at.name]))break}!Sa(rt)&&await z({context:Ee,onlyCheckValid:oe,fields:rt,name:Re,eventType:Pe})}}return Ee.valid},j=()=>{for(const W of c.unMount){const oe=Ne(a,W);oe&&(oe._f.refs?oe._f.refs.every(se=>!j0(se)):!j0(oe._f.ref))&&Y(W)}c.unMount=new Set},K=(W,oe)=>!t.disabled&&(W&&oe&&zt(i,W,oe),!Pn(L(),n)),ne=(W,oe,se)=>Xw(W,c,{...l.mount?i:no(oe)?n:La(W)?{[W]:oe}:oe},se,oe),H=W=>Xv(Ne(l.mount?i:n,W,t.shouldUnregister?Ne(n,W,[]):[])),Z=(W,oe,se={})=>{const Pe=Ne(a,W);let Ee=oe;if(Pe){const Re=Pe._f;Re&&(!Re.disabled&&zt(i,W,F4(oe,Re)),Ee=nv(Re.ref)&&Ka(oe)?"":oe,M4(Re.ref)?[...Re.ref.options].forEach(Le=>Le.selected=Ee.includes(Le.value)):Re.refs?im(Re.ref)?Re.refs.forEach(Le=>{(!Le.defaultChecked||!Le.disabled)&&(Array.isArray(Ee)?Le.checked=!!Ee.find(at=>at===Le.value):Le.checked=Ee===Le.value||!!Ee)}):Re.refs.forEach(Le=>Le.checked=Le.value===Ee):cP(Re.ref)?Re.ref.value="":(Re.ref.value=Ee,Re.ref.type||v.state.next({name:W,values:so(i)})))}(se.shouldDirty||se.shouldTouch)&&D(W,Ee,se.shouldTouch,se.shouldDirty,!0),se.shouldValidate&&q(W)},te=(W,oe,se)=>{for(const Pe in oe){if(!oe.hasOwnProperty(Pe))return;const Ee=oe[Pe],Re=W+"."+Pe,Le=Ne(a,Re);(c.array.has(W)||Uo(Ee)||Le&&!Le._f)&&!wl(Ee)?te(Re,Ee,se):Z(Re,Ee,se)}},le=(W,oe,se={})=>{const Pe=Ne(a,W),Ee=c.array.has(W),Re=so(oe),Le=Ne(i,W),at=Pn(Le,Re);if(zt(i,W,Re),Ee)v.array.next({name:W,values:so(i)}),se.shouldDirty&&(_(W),v.state.next({name:W,dirtyFields:o.dirtyFields,isDirty:K(W,Re)}));else{const rt=Array.isArray(Re)&&!Re.length||Sa(Re);!Pe||Pe._f||Ka(Re)||rt?Z(W,Re,se):te(W,Re,se)}at||(o_(W,c)?v.state.next({...o,name:W,values:so(i)}):v.state.next({name:l.mount?W:void 0,values:so(i)}))},Q=W=>{const oe=Ma(W)?W(i):W;Pn(i,oe)||(i={...i,...oe},v.state.next({...o,values:i}))},M=async W=>{l.mount=!0;const oe=W.target;let se=oe.name,Pe=!0;const Ee=Ne(a,se),Re=rt=>{Pe=Number.isNaN(rt)||wl(rt)&&isNaN(rt.getTime())||Pn(rt,Ne(i,se,rt))},Le=od(t.mode),at=od(t.reValidateMode);if(Ee){let rt,St;const Et=oe.type?r2(Ee._f):E4(W),Tt=W.type===Ss.BLUR||W.type===Ss.FOCUS_OUT,$o=!Xde(Ee._f)&&!e.validate&&!t.resolver&&!Ne(o.errors,se)&&!Ee._f.deps||oue(Tt,Ne(o.touchedFields,se),o.isSubmitted,at,Le),Jr=o_(se,c,Tt);zt(i,se,Et),Tt?(!oe||!oe.readOnly)&&(Ee._f.onBlur&&Ee._f.onBlur(W),u&&u(0)):Ee._f.onChange&&Ee._f.onChange(W);const rr=D(se,Et,Tt),Xe=!Sa(rr)||Jr;if(!Tt&&v.state.next({name:se,type:W.type,values:so(i)}),$o)return(m.isValid||f.isValid)&&(t.mode==="onBlur"?Tt&&C():Tt||C()),Xe&&v.state.next({name:se,...Jr?{}:rr});if(!t.resolver&&e.validate&&await F({name:se,eventType:W.type}),!Tt&&Jr&&v.state.next({...o}),t.resolver){const{errors:ht}=await N([se]);if(w([se]),Re(Et),Pe){const Rt=s2(o.errors,a,se),dt=s2(ht,a,Rt.name||se);rt=dt.error,se=dt.name,St=Sa(ht)}}else w([se],!0),rt=(await a_(Ee,c.disabled,i,b,t.shouldUseNativeValidation))[se],w([se]),Re(Et),Pe&&(rt?St=!1:(m.isValid||f.isValid)&&(St=await z({fields:a,onlyCheckValid:!0,name:se,eventType:W.type})));Pe&&(Ee._f.deps&&(!Array.isArray(Ee._f.deps)||Ee._f.deps.length>0)&&q(Ee._f.deps),O(se,St,rt,rr))}},G=(W,oe)=>{if(Ne(o.errors,oe)&&W.focus)return W.focus(),1},q=async(W,oe={})=>{let se,Pe;const Ee=dn(W);if(t.resolver){const Re=await $(no(W)?W:Ee);se=Sa(Re),Pe=W?!Ee.some(Le=>Ne(Re,Le)):se}else W?(Pe=(await Promise.all(Ee.map(async Re=>{const Le=Ne(a,Re);return await z({fields:Le&&Le._f?{[Re]:Le}:Le,eventType:Ss.TRIGGER})}))).every(Boolean),!(!Pe&&!o.isValid)&&C()):Pe=se=await z({fields:a,name:W,eventType:Ss.TRIGGER});return v.state.next({...!La(W)||(m.isValid||f.isValid)&&se!==o.isValid?{}:{name:W},...t.resolver||!W?{isValid:se}:{},errors:o.errors}),oe.shouldFocus&&!Pe&&pd(a,G,W?Ee:c.mount),Pe},L=(W,oe)=>{let se={...l.mount?i:n};return oe&&(se=I4(oe.dirtyFields?o.dirtyFields:o.touchedFields,se)),no(W)?se:La(W)?Ne(se,W):W.map(Pe=>Ne(se,Pe))},U=(W,oe)=>({invalid:!!Ne((oe||o).errors,W),isDirty:!!Ne((oe||o).dirtyFields,W),error:Ne((oe||o).errors,W),isValidating:!!Ne(o.validatingFields,W),isTouched:!!Ne((oe||o).touchedFields,W)}),J=W=>{const oe=W?dn(W):void 0;oe?.forEach(se=>Lo(o.errors,se)),oe?oe.forEach(se=>{v.state.next({name:se,errors:o.errors})}):v.state.next({errors:{}})},pe=(W,oe,se)=>{const Pe=(Ne(a,W,{_f:{}})._f||{}).ref,Ee=Ne(o.errors,W)||{},{ref:Re,message:Le,type:at,...rt}=Ee;zt(o.errors,W,{...rt,...oe,ref:Pe}),v.state.next({name:W,errors:o.errors,isValid:!1}),se&&se.shouldFocus&&Pe&&Pe.focus&&Pe.focus()},ge=(W,oe)=>Ma(W)?v.state.subscribe({next:se=>"values"in se&&W(se.values||ne(void 0,oe),se)}):ne(W,oe,!0),Ce=W=>v.state.subscribe({next:oe=>{if(tue(W.name,oe.name,W.exact)&&eue(oe,W.formState||m,De,W.reRenderRoot)){const se={...i};W.callback({values:se,...o,...oe,defaultValues:n})}}}).unsubscribe,$e=W=>(l.mount=!0,f={...f,...W.formState},Ce({...W,formState:{...g,...W.formState}})),Y=(W,oe={})=>{for(const se of W?dn(W):c.mount)c.mount.delete(se),c.array.delete(se),oe.keepValue||(Lo(a,se),Lo(i,se)),!oe.keepError&&Lo(o.errors,se),!oe.keepDirty&&Lo(o.dirtyFields,se),!oe.keepTouched&&Lo(o.touchedFields,se),!oe.keepIsValidating&&Lo(o.validatingFields,se),!t.shouldUnregister&&!oe.keepDefaultValue&&Lo(n,se);v.state.next({values:so(i)}),v.state.next({...o,...oe.keepDirty?{isDirty:K()}:{}}),!oe.keepIsValid&&C()},ae=({disabled:W,name:oe})=>{if(Cn(W)&&l.mount||W||c.disabled.has(oe)){const Ee=c.disabled.has(oe)!==!!W;W?c.disabled.add(oe):c.disabled.delete(oe),Ee&&l.mount&&!l.action&&C()}},ve=(W,oe={})=>{let se=Ne(a,W);const Pe=Cn(oe.disabled)||Cn(t.disabled),Ee=!c.registerName.has(W)&&se&&se._f&&!se._f.mount;return zt(a,W,{...se||{},_f:{...se&&se._f?se._f:{ref:{name:W}},name:W,mount:!0,...oe}}),c.mount.add(W),se&&!Ee?ae({disabled:Cn(oe.disabled)?oe.disabled:t.disabled,name:W}):A(W,!0,oe.value),{...Pe?{disabled:oe.disabled||t.disabled}:{},...t.progressive?{required:!!oe.required,min:Hu(oe.min),max:Hu(oe.max),minLength:Hu(oe.minLength),maxLength:Hu(oe.maxLength),pattern:Hu(oe.pattern)}:{},name:W,onChange:M,onBlur:M,ref:Re=>{if(Re){c.registerName.add(W),ve(W,oe),c.registerName.delete(W),se=Ne(a,W);const Le=no(Re.value)&&Re.querySelectorAll&&Re.querySelectorAll("input,select,textarea")[0]||Re,at=Gde(Le),rt=se._f.refs||[];if(at?rt.find(St=>St===Le):Le===se._f.ref)return;zt(a,W,{_f:{...se._f,...at?{refs:[...rt.filter(j0),Le,...Array.isArray(Ne(n,W))?[{}]:[]],ref:{type:Le.type,name:W}}:{ref:Le}}}),A(W,!1,void 0,Le)}else se=Ne(a,W,{}),se._f&&(se._f.mount=!1),(t.shouldUnregister||oe.shouldUnregister)&&!(R4(c.array,W)&&l.action)&&c.unMount.add(W)}}},ie=()=>t.shouldFocusError&&pd(a,G,c.mount),Te=W=>{Cn(W)&&(v.state.next({disabled:W}),pd(a,(oe,se)=>{const Pe=Ne(a,se);Pe&&(oe.disabled=Pe._f.disabled||W,Array.isArray(Pe._f.refs)&&Pe._f.refs.forEach(Ee=>{Ee.disabled=Pe._f.disabled||W}))},0,!1))},ke=(W,oe)=>async se=>{let Pe;se&&(se.preventDefault&&se.preventDefault(),se.persist&&se.persist());let Ee=so(i);if(v.state.next({isSubmitting:!0}),t.resolver){const{errors:Re,values:Le}=await N();w(),o.errors=Re,Ee=so(Le)}else await z({fields:a,eventType:Ss.SUBMIT});if(c.disabled.size)for(const Re of c.disabled)Lo(Ee,Re);if(Lo(o.errors,A4),Sa(o.errors)){v.state.next({errors:{}});try{await W(Ee,se)}catch(Re){Pe=Re}}else oe&&await oe({...o.errors},se),ie(),setTimeout(ie);if(v.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Sa(o.errors)&&!Pe,submitCount:o.submitCount+1,errors:o.errors}),Pe)throw Pe},it=(W,oe={})=>{Ne(a,W)&&(no(oe.defaultValue)?le(W,so(Ne(n,W))):(le(W,oe.defaultValue),zt(n,W,so(oe.defaultValue))),oe.keepTouched||Lo(o.touchedFields,W),oe.keepDirty||(Lo(o.dirtyFields,W),o.isDirty=oe.defaultValue?K(W,so(Ne(n,W))):K()),oe.keepError||(Lo(o.errors,W),m.isValid&&C()),v.state.next({...o}))},lt=(W,oe={})=>{const se=W?so(W):n,Pe=so(se),Ee=Sa(W),Re=Ee?n:Pe;if(oe.keepDefaultValues||(n=se),!oe.keepValues){if(oe.keepDirtyValues){const Le=new Set([...c.mount,...Object.keys(sp(n,i))]);for(const at of Array.from(Le)){const rt=Ne(o.dirtyFields,at),St=Ne(i,at),Et=Ne(Re,at);rt&&!no(St)?zt(Re,at,St):!rt&&!no(Et)&&le(at,Et)}}else{if(nP&&no(W))for(const Le of c.mount){const at=Ne(a,Le);if(at&&at._f){const rt=Array.isArray(at._f.refs)?at._f.refs[0]:at._f.ref;if(nv(rt)){const St=rt.closest("form");if(St){St.reset();break}}}}if(oe.keepFieldsRef)for(const Le of c.mount)le(Le,Ne(Re,Le));else a={}}i=t.shouldUnregister?oe.keepDefaultValues?so(n):{}:so(Re),v.array.next({values:{...Re}}),v.state.next({values:{...Re}})}c={mount:oe.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},l.mount=!m.isValid||!!oe.keepIsValid||!!oe.keepDirtyValues||!t.shouldUnregister&&!Sa(Re),l.watch=!!t.shouldUnregister,l.keepIsValid=!!oe.keepIsValid,l.action=!1,oe.keepErrors||(o.errors={}),v.state.next({submitCount:oe.keepSubmitCount?o.submitCount:0,isDirty:Ee?!1:oe.keepDirty?o.isDirty:!!(oe.keepDefaultValues&&!Pn(W,n)),isSubmitted:oe.keepIsSubmitted?o.isSubmitted:!1,dirtyFields:Ee?{}:oe.keepDirtyValues?oe.keepDefaultValues&&i?sp(n,i):o.dirtyFields:oe.keepDefaultValues&&W?sp(n,W):oe.keepDirty?o.dirtyFields:{},touchedFields:oe.keepTouched?o.touchedFields:{},errors:oe.keepErrors?o.errors:{},isSubmitSuccessful:oe.keepIsSubmitSuccessful?o.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:n})},Ge=(W,oe)=>lt(Ma(W)?W(i):W,{...t.resetOptions,...oe}),tt=(W,oe={})=>{const se=Ne(a,W),Pe=se&&se._f;if(Pe){const Ee=Pe.refs?Pe.refs[0]:Pe.ref;Ee.focus&&setTimeout(()=>{Ee.focus(),oe.shouldSelect&&Ma(Ee.select)&&Ee.select()})}},De=W=>{o={...o,...W}},He={control:{register:ve,unregister:Y,getFieldState:U,handleSubmit:ke,setError:pe,_subscribe:Ce,_runSchema:N,_updateIsValidating:w,_focusError:ie,_getWatch:ne,_getDirty:K,_setValid:C,_setFieldArray:E,_setDisabledField:ae,_setErrors:x,_getFieldArray:H,_reset:lt,_resetDefaultValues:()=>Ma(t.defaultValues)&&t.defaultValues().then(W=>{Ge(W,t.resetOptions),v.state.next({isLoading:!1})}),_removeUnmounted:j,_disableForm:Te,_subjects:v,_proxyFormState:m,get _fields(){return a},get _formValues(){return i},get _state(){return l},set _state(W){l=W},get _defaultValues(){return n},get _names(){return c},set _names(W){c=W},get _formState(){return o},get _options(){return t},set _options(W){t={...t,...W}}},subscribe:$e,trigger:q,register:ve,handleSubmit:ke,watch:ge,setValue:le,setValues:Q,getValues:L,reset:Ge,resetField:it,clearErrors:J,unregister:Y,setError:pe,setFocus:tt,getFieldState:U};return{...He,formControl:He}}var gs=()=>{if(typeof crypto<"u"&&crypto.randomUUID)return crypto.randomUUID();const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const o=(Math.random()*16+e)%16|0;return(t=="x"?o:o&3|8).toString(16)})},U0=(e,t,o={})=>o.shouldFocus||no(o.shouldFocus)?o.focusName||`${e}.${no(o.focusIndex)?t:o.focusIndex}.`:"",z0=(e,t)=>[...e,...dn(t)],$0=e=>Array.isArray(e)?e.map(()=>{}):void 0;function q0(e,t,o){return[...e.slice(0,t),...dn(o),...e.slice(t)]}var V0=(e,t,o)=>Array.isArray(e)?(no(e[o])&&(e[o]=void 0),e.splice(o,0,e.splice(t,1)[0]),e):[],H0=(e,t)=>[...dn(t),...dn(e)];function iue(e,t){let o=0;const a=[...e];for(const n of t)a.splice(n-o,1),o++;return Xv(a).length?a:[]}var G0=(e,t)=>no(t)?[]:iue(e,dn(t).sort((o,a)=>o-a)),K0=(e,t,o)=>{[e[t],e[o]]=[e[o],e[t]]},c2=(e,t,o)=>(e[t]=o,e);function ebe(e){const t=eb(),{control:o=t,name:a,keyName:n="id",shouldUnregister:i,rules:l}=e,[c,u]=X.useState(o._getFieldArray(a)),p=X.useRef(o._getFieldArray(a).map(gs)),g=X.useRef(!1);o._names.array.add(a),X.useMemo(()=>l&&c.length>=0&&o.register(a,l),[o,a,c.length,l]),tb(()=>o._subjects.array.subscribe({next:({values:k,name:x})=>{if(x===a||!x){const A=Ne(k,a);Array.isArray(A)&&(u(A),p.current=A.map(gs))}}}).unsubscribe,[o,a]);const m=X.useCallback(k=>{g.current=!0,o._setFieldArray(a,k)},[o,a]),f=(k,x)=>{const A=dn(so(k)),D=z0(o._getFieldArray(a),A);o._names.focus=U0(a,D.length-1,x),p.current=z0(p.current,A.map(gs)),m(D),u(D),o._setFieldArray(a,D,z0,{argA:$0(k)})},v=(k,x)=>{const A=dn(so(k)),D=H0(o._getFieldArray(a),A);o._names.focus=U0(a,0,x),p.current=H0(p.current,A.map(gs)),m(D),u(D),o._setFieldArray(a,D,H0,{argA:$0(k)})},b=k=>{const x=G0(o._getFieldArray(a),k);p.current=G0(p.current,k),m(x),u(x),!Array.isArray(Ne(o._fields,a))&&zt(o._fields,a,void 0),o._setFieldArray(a,x,G0,{argA:k})},S=(k,x,A)=>{const D=dn(so(x)),O=q0(o._getFieldArray(a),k,D);o._names.focus=U0(a,k,A),p.current=q0(p.current,k,D.map(gs)),m(O),u(O),o._setFieldArray(a,O,q0,{argA:k,argB:$0(x)})},C=(k,x)=>{const A=o._getFieldArray(a);K0(A,k,x),K0(p.current,k,x),m(A),u(A),o._setFieldArray(a,A,K0,{argA:k,argB:x},!1)},w=(k,x)=>{const A=o._getFieldArray(a);V0(A,k,x),V0(p.current,k,x),m(A),u(A),o._setFieldArray(a,A,V0,{argA:k,argB:x},!1)},_=(k,x)=>{const A=so(x),D=c2(o._getFieldArray(a),k,A);p.current=[...D].map((O,N)=>!O||N===k?gs():p.current[N]),m(D),u([...D]),o._setFieldArray(a,D,c2,{argA:k,argB:A},!0,!1)},E=k=>{const x=dn(so(k));p.current=x.map(gs),m([...x]),u([...x]),o._setFieldArray(a,[...x],A=>A,{},!0,!1)};return X.useEffect(()=>{o._state.action=!1,o_(a,o._names)&&o._subjects.state.next({...o._formState});const k=od(o._options.mode);if(g.current&&(!k.isOnSubmit||o._formState.isSubmitted)&&!od(o._options.reValidateMode).isOnSubmit&&!k.isOnBlur)if(o._options.resolver)o._runSchema([a]).then(x=>{o._updateIsValidating([a]);const A=Ne(x.errors,a),D=Ne(o._formState.errors,a);(D?!A&&D.type||A&&(D.type!==A.type||D.message!==A.message):A&&A.type)&&(A?zt(o._formState.errors,a,A):Lo(o._formState.errors,a),o._subjects.state.next({errors:o._formState.errors}))});else{const x=Ne(o._fields,a);x&&x._f&&!(od(o._options.reValidateMode).isOnSubmit&&od(o._options.mode).isOnSubmit)&&a_(x,o._names.disabled,o._formValues,o._options.criteriaMode===Zn.all,o._options.shouldUseNativeValidation,!0).then(A=>!Sa(A)&&o._subjects.state.next({errors:j4(o._formState.errors,A,a)}))}o._subjects.state.next({name:a,values:so(o._formValues)}),o._names.focus&&pd(o._fields,(x,A)=>{if(o._names.focus&&A.startsWith(o._names.focus)&&x.focus)return x.focus(),1}),o._names.focus="",o._setValid(),g.current=!1},[c,a,o]),X.useEffect(()=>(!Ne(o._formValues,a)&&o._setFieldArray(a),()=>{const k=(x,A)=>{const D=Ne(o._fields,x);D&&D._f&&(D._f.mount=A)};o._options.shouldUnregister||i?o.unregister(a):k(a,!1)}),[a,o,n,i]),{swap:X.useCallback(C,[m,a,o]),move:X.useCallback(w,[m,a,o]),prepend:X.useCallback(v,[m,a,o]),append:X.useCallback(f,[m,a,o]),remove:X.useCallback(b,[m,a,o]),insert:X.useCallback(S,[m,a,o]),update:X.useCallback(_,[m,a,o]),replace:X.useCallback(E,[m,a,o]),fields:X.useMemo(()=>c.map((k,x)=>({...k,[n]:p.current[x]||gs()})),[c,n])}}function Wr(e={}){const t=X.useRef(void 0),o=X.useRef(void 0),[a,n]=X.useState({isDirty:!1,isValidating:!1,isLoading:Ma(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Ma(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!Ma(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:l,...c}=rue(e);t.current={...c,formState:a}}const i=t.current.control;return i._options=e,tb(()=>{const l=i._subscribe({formState:i._proxyFormState,callback:()=>n({...i._formState}),reRenderRoot:!0});return n(c=>({...c,isReady:!0})),i._formState.isReady=!0,l},[i]),X.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),X.useEffect(()=>{e.mode&&(i._options.mode=e.mode),e.reValidateMode&&(i._options.reValidateMode=e.reValidateMode)},[i,e.mode,e.reValidateMode]),X.useEffect(()=>{e.errors&&(i._setErrors(e.errors),i._focusError())},[i,e.errors]),X.useEffect(()=>{e.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[i,e.shouldUnregister]),X.useEffect(()=>{if(i._proxyFormState.isDirty){const l=i._getDirty();l!==a.isDirty&&i._subjects.state.next({isDirty:l})}},[i,a.isDirty]),X.useEffect(()=>{var l;e.values&&!Pn(e.values,o.current)?(i._reset(e.values,{keepFieldsRef:!0,...i._options.resetOptions}),!((l=i._options.resetOptions)===null||l===void 0)&&l.keepIsValid||i._setValid(),o.current=e.values,n(c=>({...c}))):i._resetDefaultValues()},[i,e.values]),X.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=X.useMemo(()=>D4(a,i),[i,a]),t.current}const d2=(e,t,o)=>{if(e&&"reportValidity"in e){const a=Ne(o,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},n_=(e,t)=>{for(const o in t.fields){const a=t.fields[o];a&&a.ref&&"reportValidity"in a.ref?d2(a.ref,o,e):a&&a.refs&&a.refs.forEach(n=>d2(n,o,e))}},u2=(e,t)=>{t.shouldUseNativeValidation&&n_(e,t);const o={};for(const a in e){const n=Ne(t.fields,a),i=Object.assign(e[a]||{},{ref:n&&n.ref});if(sue(t.names||Object.keys(e),a)){const l=Object.assign({},Ne(o,a));zt(l,"root",i),zt(o,a,l)}else zt(o,a,i)}return o},sue=(e,t)=>{const o=p2(t);return e.some(a=>p2(a).match(`^${o}\\.\\d+`))};function p2(e){return e.replace(/\]|\[/g,"")}function m2(e,t){try{var o=e()}catch(a){return t(a)}return o&&o.then?o.then(void 0,t):o}function lue(e,t){for(var o={};e.length;){var a=e[0],n=a.code,i=a.message,l=a.path.join(".");if(!o[l])if("unionErrors"in a){var c=a.unionErrors[0].errors[0];o[l]={message:c.message,type:c.code}}else o[l]={message:i,type:n};if("unionErrors"in a&&a.unionErrors.forEach(function(g){return g.errors.forEach(function(m){return e.push(m)})}),t){var u=o[l].types,p=u&&u[a.code];o[l]=lP(l,t,o,n,p?[].concat(p,a.message):a.message)}e.shift()}return o}function cue(e,t){for(var o={};e.length;){var a=e[0],n=a.code,i=a.message,l=a.path.join(".");if(!o[l])if(a.code==="invalid_union"&&a.errors.length>0){var c=a.errors[0][0];o[l]={message:c.message,type:c.code}}else o[l]={message:i,type:n};if(a.code==="invalid_union"&&a.errors.forEach(function(g){return g.forEach(function(m){return e.push(m)})}),t){var u=o[l].types,p=u&&u[a.code];o[l]=lP(l,t,o,n,p?[].concat(p,a.message):a.message)}e.shift()}return o}function Yr(e,t,o){if(o===void 0&&(o={}),(function(a){return"_def"in a&&typeof a._def=="object"&&"typeName"in a._def})(e))return function(a,n,i){try{return Promise.resolve(m2(function(){return Promise.resolve(e[o.mode==="sync"?"parse":"parseAsync"](a,t)).then(function(l){return i.shouldUseNativeValidation&&n_({},i),{errors:{},values:o.raw?Object.assign({},a):l}})},function(l){if((function(c){return Array.isArray(c?.issues)})(l))return{values:{},errors:u2(lue(l.errors,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};if((function(a){return"_zod"in a&&typeof a._zod=="object"})(e))return function(a,n,i){try{return Promise.resolve(m2(function(){return Promise.resolve((o.mode==="sync"?O8:I8)(e,a,t)).then(function(l){return i.shouldUseNativeValidation&&n_({},i),{errors:{},values:o.raw?Object.assign({},a):l}})},function(l){if((function(c){return c instanceof L_})(l))return{values:{},errors:u2(cue(l.issues,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw l}))}catch(l){return Promise.reject(l)}};throw new Error("Invalid input: not a Zod schema")}var ob="Dialog",[U4,tbe]=Ul(ob),[due,xr]=U4(ob),z4=e=>{const{__scopeDialog:t,children:o,open:a,defaultOpen:n,onOpenChange:i,modal:l=!0}=e,c=R.useRef(null),u=R.useRef(null),[p,g]=Qp({prop:a,defaultProp:n??!1,onChange:i,caller:ob});return T.jsx(due,{scope:t,triggerRef:c,contentRef:u,contentId:Rs(),titleId:Rs(),descriptionId:Rs(),open:p,onOpenChange:g,onOpenToggle:R.useCallback(()=>g(m=>!m),[g]),modal:l,children:o})};z4.displayName=ob;var $4="DialogTrigger",q4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr($4,o),i=sa(t,n.triggerRef);return T.jsx(Eo.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":mP(n.open),...a,ref:i,onClick:mt(e.onClick,n.onOpenToggle)})});q4.displayName=$4;var uP="DialogPortal",[uue,V4]=U4(uP,{forceMount:void 0}),H4=e=>{const{__scopeDialog:t,forceMount:o,children:a,container:n}=e,i=xr(uP,t);return T.jsx(uue,{scope:t,forceMount:o,children:R.Children.map(a,l=>T.jsx(Ii,{present:o||i.open,children:T.jsx(CC,{asChild:!0,container:n,children:l})}))})};H4.displayName=uP;var iv="DialogOverlay",G4=R.forwardRef((e,t)=>{const o=V4(iv,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,i=xr(iv,e.__scopeDialog);return i.modal?T.jsx(Ii,{present:a||i.open,children:T.jsx(mue,{...n,ref:t})}):null});G4.displayName=iv;var pue=kp("DialogOverlay.RemoveScroll"),mue=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(iv,o);return T.jsx(PC,{as:pue,allowPinchZoom:!0,shards:[n.contentRef],children:T.jsx(Eo.div,{"data-state":mP(n.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),Ml="DialogContent",K4=R.forwardRef((e,t)=>{const o=V4(Ml,e.__scopeDialog),{forceMount:a=o.forceMount,...n}=e,i=xr(Ml,e.__scopeDialog);return T.jsx(Ii,{present:a||i.open,children:i.modal?T.jsx(gue,{...n,ref:t}):T.jsx(hue,{...n,ref:t})})});K4.displayName=Ml;var gue=R.forwardRef((e,t)=>{const o=xr(Ml,e.__scopeDialog),a=R.useRef(null),n=sa(t,o.contentRef,a);return R.useEffect(()=>{const i=a.current;if(i)return pF(i)},[]),T.jsx(W4,{...e,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(e.onCloseAutoFocus,i=>{i.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:mt(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&i.preventDefault()}),onFocusOutside:mt(e.onFocusOutside,i=>i.preventDefault())})}),hue=R.forwardRef((e,t)=>{const o=xr(Ml,e.__scopeDialog),a=R.useRef(!1),n=R.useRef(!1);return T.jsx(W4,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(a.current||o.triggerRef.current?.focus(),i.preventDefault()),a.current=!1,n.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(a.current=!0,i.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const l=i.target;o.triggerRef.current?.contains(l)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&n.current&&i.preventDefault()}})}),W4=R.forwardRef((e,t)=>{const{__scopeDialog:o,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:i,...l}=e,c=xr(Ml,o),u=R.useRef(null),p=sa(t,u);return DN(),T.jsxs(T.Fragment,{children:[T.jsx(gC,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:n,onUnmountAutoFocus:i,children:T.jsx(mC,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":mP(c.open),...l,ref:p,onDismiss:()=>c.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(fue,{titleId:c.titleId}),T.jsx(bue,{contentRef:u,descriptionId:c.descriptionId})]})]})}),pP="DialogTitle",Y4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(pP,o);return T.jsx(Eo.h2,{id:n.titleId,...a,ref:t})});Y4.displayName=pP;var Z4="DialogDescription",Q4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(Z4,o);return T.jsx(Eo.p,{id:n.descriptionId,...a,ref:t})});Q4.displayName=Z4;var J4="DialogClose",X4=R.forwardRef((e,t)=>{const{__scopeDialog:o,...a}=e,n=xr(J4,o);return T.jsx(Eo.button,{type:"button",...a,ref:t,onClick:mt(e.onClick,()=>n.onOpenChange(!1))})});X4.displayName=J4;function mP(e){return e?"open":"closed"}var ej="DialogTitleWarning",[obe,tj]=jX(ej,{contentName:Ml,titleName:pP,docsSlug:"dialog"}),fue=({titleId:e})=>{const t=tj(ej),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
174
174
 
175
175
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
176
176
 
@@ -232,4 +232,4 @@ ${a}
232
232
  ${a}
233
233
  }`)}if(o.length>0){const a=document.createElement("style");a.id="studio-theme-overrides",a.textContent=o.join(`
234
234
 
235
- `),document.head.appendChild(a)}}function Uhe(e){const t=Ie.c(12),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:On.publicConfig(),queryFn:Bhe,staleTime:nC},t[0]=a):a=t[0];const{data:n}=Nl(a),[i]=sC();let l,c;t[1]!==i.compactPageLayout?(l=()=>(document.documentElement.dataset.compactLayout=String(i.compactPageLayout),zhe),c=[i.compactPageLayout],t[1]=i.compactPageLayout,t[2]=l,t[3]=c):(l=t[2],c=t[3]),R.useLayoutEffect(l,c);let u,p;t[4]!==n.theme?(u=()=>{jhe(n.theme)},p=[n.theme],t[4]=n.theme,t[5]=u,t[6]=p):(u=t[5],p=t[6]),R.useLayoutEffect(u,p);let g,m;t[7]!==i.theme?(g=()=>{const v=document.documentElement,b=()=>{const _=document.querySelector('meta[name="theme-color"]');if(!_)return;const E=getComputedStyle(v).getPropertyValue("--sidebar").trim();if(!E)return;const k=document.createElement("canvas").getContext("2d");if(!k)return;k.fillStyle="#010203";const x=k.fillStyle;k.fillStyle=E;const A=k.fillStyle;A!==x&&(_.content=A)};if(i.theme==="dark"){v.classList.add("dark"),b();return}if(i.theme==="light"){v.classList.remove("dark"),b();return}const S=window.matchMedia("(prefers-color-scheme: dark)"),C=_=>{v.classList.toggle("dark",_),b()};C(S.matches);const w=_=>C(_.matches);return S.addEventListener("change",w),()=>S.removeEventListener("change",w)},m=[i.theme],t[7]=i.theme,t[8]=g,t[9]=m):(g=t[8],m=t[9]),R.useLayoutEffect(g,m);let f;return t[10]!==o?(f=T.jsx(T.Fragment,{children:o}),t[10]=o,t[11]=f):f=t[11],f}function zhe(){delete document.documentElement.dataset.compactLayout}function X2(e){const t=jL(e);if(!t)return;const o=t===BL.aiBudgetExhausted?cv.budget||"This organization's AI allowance is used up.":cv.feature||"This organization's plan does not include that.";Vr.error(o,{id:`plan-refusal:${t}`})}const cv={feature:"",budget:""},um=new rq({queryCache:new BI({onError:X2}),mutationCache:new FI({onError:X2}),defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:(e,t)=>jL(t)===null&&e<1,gcTime:300*1e3}}});Die(um);Oie(um);Cie(um);Pie(um);function $he({children:e}){const t=ar();return cv.feature=t("settings.paywall.serverRefusedFeature"),cv.budget=t("settings.paywall.serverRefusedBudget"),qK({itemCreatedSuccessfully:t("collections.mutations.itemCreatedSuccessfully"),itemUpdatedSuccessfully:t("collections.mutations.itemUpdatedSuccessfully"),itemDeletedSuccessfully:t("collections.mutations.itemDeletedSuccessfully"),createItemFailed:t("collections.mutations.createItemFailed"),updateItemFailed:t("collections.mutations.updateItemFailed"),deleteItemFailed:t("collections.mutations.deleteItemFailed")}),T.jsx(T.Fragment,{children:e})}function qhe(e){const t=Ie.c(4),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=T.jsx($K,{}),t[0]=a):a=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=T.jsx(Fhe,{}),t[1]=n):n=t[1];let i;return t[2]!==o?(i=T.jsxs(iq,{client:um,children:[a,T.jsx(R.Suspense,{fallback:n,children:T.jsx(Uhe,{children:T.jsx(vY,{children:T.jsx(The,{children:T.jsx(Ahe,{children:T.jsx($he,{children:T.jsx(Lhe,{children:o})})})})})})})]}),t[2]=o,t[3]=i):i=t[3],i}const Vhe=[["mesh:","studio:"],["mesh-","studio-"]];function Hhe(e){const t=Array.from({length:e.length},(o,a)=>e.key(a)).filter(o=>o!==null);for(const o of t){const a=Vhe.find(([u])=>o.startsWith(u));if(!a)continue;const[n,i]=a,l=`${i}${o.slice(n.length)}`;if(e.getItem(l)!==null)continue;const c=e.getItem(o);c!==null&&e.setItem(l,c)}}Hhe(window.localStorage);const Ghe=document.getElementById("root");MU.createRoot(Ghe).render(T.jsx(R.StrictMode,{children:T.jsx(qhe,{children:T.jsx(x$,{router:Qv})})}));export{Bl as $,nbe as A,Al as B,Pfe as C,Nl as D,Xie as E,Gae as F,Wae as G,Kae as H,Hae as I,nt as J,On as K,Fs as L,CB as M,Whe as N,x_ as O,nn as P,efe as Q,TB as R,rbe as S,MC as T,Li as U,tN as V,bfe as W,Yhe as X,Wfe as Y,Dv as Z,HZ as _,Yp as a,KT as a$,Wp as a0,jve as a1,Uve as a2,Ns as a3,Mge as a4,Lie as a5,aC as a6,yt as a7,Zhe as a8,hB as a9,Xve as aA,Yve as aB,ive as aC,rve as aD,fY as aE,cC as aF,A_ as aG,wB as aH,Lt as aI,je as aJ,Md as aK,sve as aL,lve as aM,bB as aN,Up as aO,vD as aP,zL as aQ,cve as aR,dve as aS,uve as aT,qde as aU,kfe as aV,Yae as aW,iY as aX,MT as aY,NT as aZ,LT as a_,It as aa,zve as ab,XC as ac,_B as ad,a4 as ae,Lve as af,qve as ag,e4 as ah,t4 as ai,yB as aj,SB as ak,Mve as al,Ive as am,LC as an,_e as ao,V as ap,Yr as aq,Wr as ar,_ue as as,eve as at,Cfe as au,MX as av,mB as aw,Gve as ax,Kve as ay,Jve as az,ar as b,wve as b$,Ea as b0,UT as b1,uY as b2,Bfe as b3,pH as b4,Ffe as b5,zfe as b6,Nfe as b7,Ufe as b8,$fe as b9,pF as bA,DN as bB,PC as bC,gC as bD,mC as bE,tpe as bF,Ul as bG,kp as bH,Ete as bI,Rte as bJ,KN as bK,$t as bL,Fe as bM,vo as bN,ia as bO,ko as bP,Kie as bQ,vse as bR,Bve as bS,vB as bT,jse as bU,iC as bV,sbe as bW,kve as bX,Pve as bY,$ve as bZ,Fa as b_,jfe as ba,jue as bb,Uue as bc,Bue as bd,pC as be,Rue as bf,yue as bg,Cue as bh,Pue as bi,Tue as bj,Sue as bk,wue as bl,kue as bm,sa as bn,Rs as bo,Eo as bp,mt as bq,xte as br,Sr as bs,CC as bt,EN as bu,Qp as bv,nF as bw,xN as bx,YN as by,Tr as bz,Ie as c,oK as c$,XL as c0,Q3 as c1,_ve as c2,Rfe as c3,Mq as c4,nL as c5,lL as c6,sL as c7,uL as c8,kv as c9,aG as cA,ZH as cB,MH as cC,NH as cD,jH as cE,lG as cF,vfe as cG,zG as cH,VG as cI,_G as cJ,PG as cK,CG as cL,hfe as cM,gfe as cN,s9 as cO,tfe as cP,ro as cQ,sfe as cR,lH as cS,Gr as cT,N9 as cU,Ze as cV,KM as cW,afe as cX,Wve as cY,u4 as cZ,Zve as c_,Pp as ca,mL as cb,gL as cc,fL as cd,pfe as ce,mfe as cf,dfe as cg,ufe as ch,mH as ci,cfe as cj,cL as ck,pL as cl,hL as cm,ffe as cn,dL as co,Ll as cp,tY as cq,Lfe as cr,wL as cs,uG as ct,nG as cu,UH as cv,kH as cw,lfe as cx,aL as cy,YG as cz,mv as d,Vve as d$,uK as d0,gK as d1,fB as d2,GK as d3,Ife as d4,Mfe as d5,Dfe as d6,EL as d7,Ofe as d8,sm as d9,TL as dA,Ua as dB,nK as dC,abe as dD,xfe as dE,Kfe as dF,qI as dG,Jhe as dH,Qhe as dI,kse as dJ,n4 as dK,Jfe as dL,yfe as dM,Hse as dN,Kse as dO,Qve as dP,Vse as dQ,i4 as dR,rfe as dS,Qfe as dT,$de as dU,Efe as dV,r4 as dW,Eve as dX,Rve as dY,Ave as dZ,Tfe as d_,Zp as da,obe as db,tbe as dc,tve as dd,Hde as de,Vde as df,O4 as dg,pq as dh,Afe as di,Xfe as dj,Ii as dk,Ad as dl,aa as dm,hf as dn,xI as dp,LI as dq,sq as dr,lq as ds,mq as dt,cq as du,dq as dv,ta as dw,hq as dx,pR as dy,uq as dz,lp as e,rse as e$,d4 as e0,xse as e1,Pse as e2,Cse as e3,sf as e4,Hve as e5,Oue as e6,Qz as e7,X as e8,_I as e9,rL as eA,hG as eB,dG as eC,IH as eD,LH as eE,BH as eF,YH as eG,uj as eH,mj as eI,tte as eJ,ate as eK,ste as eL,ose as eM,Khe as eN,Gfe as eO,Hfe as eP,rK as eQ,_fe as eR,rq as eS,iq as eT,fge as eU,ote as eV,FD as eW,nte as eX,ove as eY,rte as eZ,ave as e_,ID as ea,v_ as eb,dte as ec,Cr as ed,xp as ee,SC as ef,Sd as eg,Ms as eh,Oi as ei,Pr as ej,FN as ek,pte as el,hte as em,mte as en,ete as eo,hY as ep,NL as eq,Hte as er,iF as es,Vte as et,ofe as eu,HM as ev,eG as ew,tG as ex,Q_ as ey,Pv as ez,Rd as f,qfe as f0,l4 as f1,Ose as f2,Gv as f3,Dve as f4,xve as f5,zde as f6,ebe as f7,lC as f8,Ls as f9,rae as fA,dae as fB,hae as fC,iae as fD,sae as fE,nae as fF,TF as fG,lae as fH,cae as fI,uae as fJ,pae as fK,mae as fL,gae as fM,fae as fN,bae as fO,yae as fP,nve as fQ,Rse as fa,wfe as fb,Zw as fc,Tve as fd,FL as fe,Vfe as ff,B9 as fg,B_ as fh,$M as fi,nfe as fj,z9 as fk,U_ as fl,j_ as fm,WM as fn,ife as fo,v9 as fp,bt as fq,SN as fr,hse as fs,Aue as ft,sse as fu,Fve as fv,Nve as fw,o4 as fx,Ove as fy,aK as fz,ibe as g,PX as h,Zie as i,T as j,gv as k,Ot as l,Dd as m,kl as n,hv as o,PB as p,JC as q,R as r,gB as s,Vr as t,P_ as u,Cve as v,Yfe as w,sC as x,Zfe as y,Sfe as z};
235
+ `),document.head.appendChild(a)}}function Uhe(e){const t=Ie.c(12),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={queryKey:On.publicConfig(),queryFn:Bhe,staleTime:nC},t[0]=a):a=t[0];const{data:n}=Nl(a),[i]=sC();let l,c;t[1]!==i.compactPageLayout?(l=()=>(document.documentElement.dataset.compactLayout=String(i.compactPageLayout),zhe),c=[i.compactPageLayout],t[1]=i.compactPageLayout,t[2]=l,t[3]=c):(l=t[2],c=t[3]),R.useLayoutEffect(l,c);let u,p;t[4]!==n.theme?(u=()=>{jhe(n.theme)},p=[n.theme],t[4]=n.theme,t[5]=u,t[6]=p):(u=t[5],p=t[6]),R.useLayoutEffect(u,p);let g,m;t[7]!==i.theme?(g=()=>{const v=document.documentElement,b=()=>{const _=document.querySelector('meta[name="theme-color"]');if(!_)return;const E=getComputedStyle(v).getPropertyValue("--sidebar").trim();if(!E)return;const k=document.createElement("canvas").getContext("2d");if(!k)return;k.fillStyle="#010203";const x=k.fillStyle;k.fillStyle=E;const A=k.fillStyle;A!==x&&(_.content=A)};if(i.theme==="dark"){v.classList.add("dark"),b();return}if(i.theme==="light"){v.classList.remove("dark"),b();return}const S=window.matchMedia("(prefers-color-scheme: dark)"),C=_=>{v.classList.toggle("dark",_),b()};C(S.matches);const w=_=>C(_.matches);return S.addEventListener("change",w),()=>S.removeEventListener("change",w)},m=[i.theme],t[7]=i.theme,t[8]=g,t[9]=m):(g=t[8],m=t[9]),R.useLayoutEffect(g,m);let f;return t[10]!==o?(f=T.jsx(T.Fragment,{children:o}),t[10]=o,t[11]=f):f=t[11],f}function zhe(){delete document.documentElement.dataset.compactLayout}function X2(e){const t=jL(e);if(!t)return;const o=t===BL.aiBudgetExhausted?cv.budget||"This organization's AI allowance is used up.":cv.feature||"This organization's plan does not include that.";Vr.error(o,{id:`plan-refusal:${t}`})}const cv={feature:"",budget:""},um=new r8({queryCache:new BI({onError:X2}),mutationCache:new FI({onError:X2}),defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!0,refetchOnMount:!0,retry:(e,t)=>jL(t)===null&&e<1,gcTime:300*1e3}}});Die(um);Oie(um);Cie(um);Pie(um);function $he({children:e}){const t=ar();return cv.feature=t("settings.paywall.serverRefusedFeature"),cv.budget=t("settings.paywall.serverRefusedBudget"),qK({itemCreatedSuccessfully:t("collections.mutations.itemCreatedSuccessfully"),itemUpdatedSuccessfully:t("collections.mutations.itemUpdatedSuccessfully"),itemDeletedSuccessfully:t("collections.mutations.itemDeletedSuccessfully"),createItemFailed:t("collections.mutations.createItemFailed"),updateItemFailed:t("collections.mutations.updateItemFailed"),deleteItemFailed:t("collections.mutations.deleteItemFailed")}),T.jsx(T.Fragment,{children:e})}function qhe(e){const t=Ie.c(4),{children:o}=e;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=T.jsx($K,{}),t[0]=a):a=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=T.jsx(Fhe,{}),t[1]=n):n=t[1];let i;return t[2]!==o?(i=T.jsxs(i8,{client:um,children:[a,T.jsx(R.Suspense,{fallback:n,children:T.jsx(Uhe,{children:T.jsx(vY,{children:T.jsx(The,{children:T.jsx(Ahe,{children:T.jsx($he,{children:T.jsx(Lhe,{children:o})})})})})})})]}),t[2]=o,t[3]=i):i=t[3],i}const Vhe=[["mesh:","studio:"],["mesh-","studio-"]];function Hhe(e){const t=Array.from({length:e.length},(o,a)=>e.key(a)).filter(o=>o!==null);for(const o of t){const a=Vhe.find(([u])=>o.startsWith(u));if(!a)continue;const[n,i]=a,l=`${i}${o.slice(n.length)}`;if(e.getItem(l)!==null)continue;const c=e.getItem(o);c!==null&&e.setItem(l,c)}}Hhe(window.localStorage);const Ghe=document.getElementById("root");MU.createRoot(Ghe).render(T.jsx(R.StrictMode,{children:T.jsx(qhe,{children:T.jsx(x$,{router:Qv})})}));export{Bl as $,nbe as A,Al as B,Pfe as C,Nl as D,Xie as E,Gae as F,Wae as G,Kae as H,Hae as I,nt as J,On as K,Fs as L,CB as M,Whe as N,x_ as O,nn as P,efe as Q,TB as R,rbe as S,MC as T,Li as U,tN as V,bfe as W,Yhe as X,Wfe as Y,Dv as Z,HZ as _,Yp as a,KT as a$,Wp as a0,jve as a1,Uve as a2,Ns as a3,Mge as a4,Lie as a5,aC as a6,yt as a7,Zhe as a8,hB as a9,Xve as aA,Yve as aB,ive as aC,rve as aD,fY as aE,cC as aF,A_ as aG,wB as aH,Lt as aI,je as aJ,Md as aK,sve as aL,lve as aM,bB as aN,Up as aO,vD as aP,zL as aQ,cve as aR,dve as aS,uve as aT,qde as aU,kfe as aV,Yae as aW,iY as aX,MT as aY,NT as aZ,LT as a_,It as aa,zve as ab,XC as ac,_B as ad,a4 as ae,Lve as af,qve as ag,e4 as ah,t4 as ai,yB as aj,SB as ak,Mve as al,Ive as am,LC as an,_e as ao,V as ap,Yr as aq,Wr as ar,_ue as as,eve as at,Cfe as au,MX as av,mB as aw,Gve as ax,Kve as ay,Jve as az,ar as b,wve as b$,Ea as b0,UT as b1,uY as b2,Bfe as b3,pH as b4,Ffe as b5,zfe as b6,Nfe as b7,Ufe as b8,$fe as b9,pF as bA,DN as bB,PC as bC,gC as bD,mC as bE,tpe as bF,Ul as bG,kp as bH,Ete as bI,Rte as bJ,KN as bK,$t as bL,Fe as bM,vo as bN,ia as bO,ko as bP,Kie as bQ,vse as bR,Bve as bS,vB as bT,jse as bU,iC as bV,sbe as bW,kve as bX,Pve as bY,$ve as bZ,Fa as b_,jfe as ba,jue as bb,Uue as bc,Bue as bd,pC as be,Rue as bf,yue as bg,Cue as bh,Pue as bi,Tue as bj,Sue as bk,wue as bl,kue as bm,sa as bn,Rs as bo,Eo as bp,mt as bq,xte as br,Sr as bs,CC as bt,EN as bu,Qp as bv,nF as bw,xN as bx,YN as by,Tr as bz,Ie as c,oK as c$,XL as c0,Q3 as c1,_ve as c2,Rfe as c3,M8 as c4,nL as c5,lL as c6,sL as c7,uL as c8,kv as c9,aG as cA,ZH as cB,MH as cC,NH as cD,jH as cE,lG as cF,vfe as cG,zG as cH,VG as cI,_G as cJ,PG as cK,CG as cL,hfe as cM,gfe as cN,s9 as cO,tfe as cP,ro as cQ,sfe as cR,lH as cS,Gr as cT,N9 as cU,Ze as cV,KM as cW,afe as cX,Wve as cY,u4 as cZ,Zve as c_,Pp as ca,mL as cb,gL as cc,fL as cd,pfe as ce,mfe as cf,dfe as cg,ufe as ch,mH as ci,cfe as cj,cL as ck,pL as cl,hL as cm,ffe as cn,dL as co,Ll as cp,tY as cq,Lfe as cr,wL as cs,uG as ct,nG as cu,UH as cv,kH as cw,lfe as cx,aL as cy,YG as cz,mv as d,Vve as d$,uK as d0,gK as d1,fB as d2,GK as d3,Ife as d4,Mfe as d5,Dfe as d6,EL as d7,Ofe as d8,sm as d9,TL as dA,Ua as dB,nK as dC,abe as dD,xfe as dE,Kfe as dF,qI as dG,Jhe as dH,Qhe as dI,kse as dJ,n4 as dK,Jfe as dL,yfe as dM,Hse as dN,Kse as dO,Qve as dP,Vse as dQ,i4 as dR,rfe as dS,Qfe as dT,$de as dU,Efe as dV,r4 as dW,Eve as dX,Rve as dY,Ave as dZ,Tfe as d_,Zp as da,obe as db,tbe as dc,tve as dd,Hde as de,Vde as df,O4 as dg,p8 as dh,Afe as di,Xfe as dj,Ii as dk,Ad as dl,aa as dm,hf as dn,xI as dp,LI as dq,s8 as dr,l8 as ds,m8 as dt,c8 as du,d8 as dv,ta as dw,h8 as dx,pR as dy,u8 as dz,lp as e,rse as e$,d4 as e0,xse as e1,Pse as e2,Cse as e3,sf as e4,Hve as e5,Oue as e6,Qz as e7,X as e8,_I as e9,rL as eA,hG as eB,dG as eC,IH as eD,LH as eE,BH as eF,YH as eG,uj as eH,mj as eI,tte as eJ,ate as eK,ste as eL,ose as eM,Khe as eN,Gfe as eO,Hfe as eP,rK as eQ,_fe as eR,r8 as eS,i8 as eT,fge as eU,ote as eV,FD as eW,nte as eX,ove as eY,rte as eZ,ave as e_,ID as ea,v_ as eb,dte as ec,Cr as ed,xp as ee,SC as ef,Sd as eg,Ms as eh,Oi as ei,Pr as ej,FN as ek,pte as el,hte as em,mte as en,ete as eo,hY as ep,NL as eq,Hte as er,iF as es,Vte as et,ofe as eu,HM as ev,eG as ew,tG as ex,Q_ as ey,Pv as ez,Rd as f,qfe as f0,l4 as f1,Ose as f2,Gv as f3,Dve as f4,xve as f5,zde as f6,ebe as f7,lC as f8,Ls as f9,rae as fA,dae as fB,hae as fC,iae as fD,sae as fE,nae as fF,TF as fG,lae as fH,cae as fI,uae as fJ,pae as fK,mae as fL,gae as fM,fae as fN,bae as fO,yae as fP,nve as fQ,Rse as fa,wfe as fb,Zw as fc,Tve as fd,FL as fe,Vfe as ff,B9 as fg,B_ as fh,$M as fi,nfe as fj,z9 as fk,U_ as fl,j_ as fm,WM as fn,ife as fo,v9 as fp,bt as fq,SN as fr,hse as fs,Aue as ft,sse as fu,Fve as fv,Nve as fw,o4 as fx,Ove as fy,aK as fz,ibe as g,PX as h,Zie as i,T as j,gv as k,Ot as l,Dd as m,kl as n,hv as o,PB as p,JC as q,R as r,gB as s,Vr as t,P_ as u,Cve as v,Yfe as w,sC as x,Zfe as y,Sfe as z};