@bryanhu/codexly 0.31.0 → 0.33.2

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 (614) hide show
  1. package/CHANGELOG.md +46 -1
  2. package/README.md +11 -7
  3. package/README.zh-CN.md +11 -7
  4. package/dist/{chunk-5NDBX6YW.js → chunk-6UFHSWVR.js} +7421 -8872
  5. package/dist/{chunk-IQDWF7SH.js → chunk-FX2JDWP4.js} +15 -34
  6. package/dist/{chunk-XUFOQLNM.js → chunk-NZDI7HXO.js} +1 -1
  7. package/dist/{chunk-XAI75BER.js → chunk-PO2R4H3G.js} +2 -0
  8. package/dist/cli.js +49 -12
  9. package/dist/client/index.js +56 -47
  10. package/dist/protocol/index.js +1 -1
  11. package/dist/providers/codex/index.js +2 -2
  12. package/dist/server/index.js +4 -4
  13. package/dist/web/.vite/manifest.json +568 -551
  14. package/dist/web/.vite/manifest.json.br +0 -0
  15. package/dist/web/.vite/manifest.json.gz +0 -0
  16. package/dist/web/assets/{abnfDiagram-N423BO3Z-BjOk39fK.js → abnfDiagram-N423BO3Z-N5qHzn33.js} +1 -1
  17. package/dist/web/assets/abnfDiagram-N423BO3Z-N5qHzn33.js.br +0 -0
  18. package/dist/web/assets/abnfDiagram-N423BO3Z-N5qHzn33.js.gz +0 -0
  19. package/dist/web/assets/agent-settings-panel-BEjmbkLC.js +1 -0
  20. package/dist/web/assets/agent-settings-panel-BEjmbkLC.js.br +0 -0
  21. package/dist/web/assets/agent-settings-panel-BEjmbkLC.js.gz +0 -0
  22. package/dist/web/assets/{architectureDiagram-T3A2C74G-CszOrw8P.js → architectureDiagram-T3A2C74G-iq1e_PZv.js} +1 -1
  23. package/dist/web/assets/architectureDiagram-T3A2C74G-iq1e_PZv.js.br +0 -0
  24. package/dist/web/assets/architectureDiagram-T3A2C74G-iq1e_PZv.js.gz +0 -0
  25. package/dist/web/assets/arrow-down-BqiCeaan.js +1 -0
  26. package/dist/web/assets/arrow-down-BqiCeaan.js.br +0 -0
  27. package/dist/web/assets/arrow-down-BqiCeaan.js.gz +0 -0
  28. package/dist/web/assets/background-image-picker-DlIaB70A.js +1 -0
  29. package/dist/web/assets/background-image-picker-DlIaB70A.js.br +0 -0
  30. package/dist/web/assets/background-image-picker-DlIaB70A.js.gz +0 -0
  31. package/dist/web/assets/{blockDiagram-VBNYF7ZC-BV5k8m33.js → blockDiagram-VBNYF7ZC-CceBrXFU.js} +1 -1
  32. package/dist/web/assets/blockDiagram-VBNYF7ZC-CceBrXFU.js.br +0 -0
  33. package/dist/web/assets/blockDiagram-VBNYF7ZC-CceBrXFU.js.gz +0 -0
  34. package/dist/web/assets/{c4Diagram-5PPSVZJV-BxAKHU1O.js → c4Diagram-5PPSVZJV-w5l2XNGM.js} +1 -1
  35. package/dist/web/assets/c4Diagram-5PPSVZJV-w5l2XNGM.js.br +0 -0
  36. package/dist/web/assets/c4Diagram-5PPSVZJV-w5l2XNGM.js.gz +0 -0
  37. package/dist/web/assets/channel-DO_0Dk-j.js +1 -0
  38. package/dist/web/assets/channel-DO_0Dk-j.js.br +0 -0
  39. package/dist/web/assets/channel-DO_0Dk-j.js.gz +0 -0
  40. package/dist/web/assets/{chunk-2GRJ4B5K-BylLXQQW.js → chunk-2GRJ4B5K-CEv2MHXP.js} +1 -1
  41. package/dist/web/assets/chunk-2GRJ4B5K-CEv2MHXP.js.br +0 -0
  42. package/dist/web/assets/chunk-2GRJ4B5K-CEv2MHXP.js.gz +0 -0
  43. package/dist/web/assets/{chunk-4I5QYGJK-Sszv2sFO.js → chunk-4I5QYGJK-CFTW6BjH.js} +1 -1
  44. package/dist/web/assets/chunk-4I5QYGJK-CFTW6BjH.js.br +0 -0
  45. package/dist/web/assets/chunk-4I5QYGJK-CFTW6BjH.js.gz +0 -0
  46. package/dist/web/assets/{chunk-5RXB4S5H-CzjZ3jYa.js → chunk-5RXB4S5H-6sn5NP9q.js} +1 -1
  47. package/dist/web/assets/chunk-5RXB4S5H-6sn5NP9q.js.br +0 -0
  48. package/dist/web/assets/chunk-5RXB4S5H-6sn5NP9q.js.gz +0 -0
  49. package/dist/web/assets/{chunk-6Q2QTUOP-4wecdxpy.js → chunk-6Q2QTUOP-BtzeG1FZ.js} +1 -1
  50. package/dist/web/assets/chunk-6Q2QTUOP-BtzeG1FZ.js.br +0 -0
  51. package/dist/web/assets/chunk-6Q2QTUOP-BtzeG1FZ.js.gz +0 -0
  52. package/dist/web/assets/{chunk-7Z6QIM7H-KnmPl6Ej.js → chunk-7Z6QIM7H-EcjbjQJl.js} +1 -1
  53. package/dist/web/assets/chunk-7Z6QIM7H-EcjbjQJl.js.br +0 -0
  54. package/dist/web/assets/chunk-7Z6QIM7H-EcjbjQJl.js.gz +0 -0
  55. package/dist/web/assets/{chunk-GF5L2VYU-BME1MVPj.js → chunk-GF5L2VYU-DGhiJb6X.js} +1 -1
  56. package/dist/web/assets/chunk-GF5L2VYU-DGhiJb6X.js.br +0 -0
  57. package/dist/web/assets/chunk-GF5L2VYU-DGhiJb6X.js.gz +0 -0
  58. package/dist/web/assets/{chunk-I66GZJ75-Cv1OO8mI.js → chunk-I66GZJ75-DQ6xf6w7.js} +1 -1
  59. package/dist/web/assets/chunk-I66GZJ75-DQ6xf6w7.js.br +0 -0
  60. package/dist/web/assets/{chunk-I66GZJ75-Cv1OO8mI.js.gz → chunk-I66GZJ75-DQ6xf6w7.js.gz} +0 -0
  61. package/dist/web/assets/{chunk-JQJVKLGR-BNnsgjF4.js → chunk-JQJVKLGR-B7ezqhFY.js} +1 -1
  62. package/dist/web/assets/chunk-JQJVKLGR-B7ezqhFY.js.br +0 -0
  63. package/dist/web/assets/chunk-JQJVKLGR-B7ezqhFY.js.gz +0 -0
  64. package/dist/web/assets/{chunk-KBJHAD2P-BJ17RizB.js → chunk-KBJHAD2P-B3r655RL.js} +1 -1
  65. package/dist/web/assets/chunk-KBJHAD2P-B3r655RL.js.br +0 -0
  66. package/dist/web/assets/chunk-KBJHAD2P-B3r655RL.js.gz +0 -0
  67. package/dist/web/assets/{chunk-NSK5VX7P-YD4zvQrY.js → chunk-NSK5VX7P-CWtmfyNT.js} +1 -1
  68. package/dist/web/assets/chunk-NSK5VX7P-CWtmfyNT.js.br +0 -0
  69. package/dist/web/assets/chunk-NSK5VX7P-CWtmfyNT.js.gz +0 -0
  70. package/dist/web/assets/{chunk-QR6OTTB3-B4Vn8un2.js → chunk-QR6OTTB3-glA5PGr7.js} +1 -1
  71. package/dist/web/assets/chunk-QR6OTTB3-glA5PGr7.js.br +0 -0
  72. package/dist/web/assets/chunk-QR6OTTB3-glA5PGr7.js.gz +0 -0
  73. package/dist/web/assets/{chunk-UBXNYLIW-C_5U1nW_.js → chunk-UBXNYLIW-CMSFSmVU.js} +1 -1
  74. package/dist/web/assets/chunk-UBXNYLIW-CMSFSmVU.js.br +0 -0
  75. package/dist/web/assets/chunk-UBXNYLIW-CMSFSmVU.js.gz +0 -0
  76. package/dist/web/assets/{chunk-W5SLKNZC-Cg_GuHYA.js → chunk-W5SLKNZC-BJLdBBKL.js} +1 -1
  77. package/dist/web/assets/chunk-W5SLKNZC-BJLdBBKL.js.br +0 -0
  78. package/dist/web/assets/chunk-W5SLKNZC-BJLdBBKL.js.gz +0 -0
  79. package/dist/web/assets/{chunk-WRU74C26-zXtZrpuc.js → chunk-WRU74C26-COKHzxBn.js} +1 -1
  80. package/dist/web/assets/chunk-WRU74C26-COKHzxBn.js.br +0 -0
  81. package/dist/web/assets/chunk-WRU74C26-COKHzxBn.js.gz +0 -0
  82. package/dist/web/assets/classDiagram-JCYQIIEL-BB7G_j3w.js +1 -0
  83. package/dist/web/assets/classDiagram-JCYQIIEL-BB7G_j3w.js.br +0 -0
  84. package/dist/web/assets/classDiagram-JCYQIIEL-BB7G_j3w.js.gz +0 -0
  85. package/dist/web/assets/classDiagram-v2-OCEON4UE-BB7G_j3w.js +1 -0
  86. package/dist/web/assets/classDiagram-v2-OCEON4UE-BB7G_j3w.js.br +0 -0
  87. package/dist/web/assets/classDiagram-v2-OCEON4UE-BB7G_j3w.js.gz +0 -0
  88. package/dist/web/assets/{clipboard-Bj7t4C3K.js → clipboard-BboqFbFl.js} +1 -1
  89. package/dist/web/assets/clipboard-BboqFbFl.js.br +0 -0
  90. package/dist/web/assets/clipboard-BboqFbFl.js.gz +0 -0
  91. package/dist/web/assets/{code-highlighter-0eqb-Lkx.js → code-highlighter-DPLcL7tE.js} +1 -1
  92. package/dist/web/assets/code-highlighter-DPLcL7tE.js.br +0 -0
  93. package/dist/web/assets/code-highlighter-DPLcL7tE.js.gz +0 -0
  94. package/dist/web/assets/{commit-settings-panel-BVWa135n.js → commit-settings-panel-espYgo6c.js} +1 -1
  95. package/dist/web/assets/commit-settings-panel-espYgo6c.js.br +0 -0
  96. package/dist/web/assets/commit-settings-panel-espYgo6c.js.gz +0 -0
  97. package/dist/web/assets/{cynefinDiagram-MW4NZA55-frpmFdyz.js → cynefinDiagram-MW4NZA55-CkDwFn1d.js} +1 -1
  98. package/dist/web/assets/cynefinDiagram-MW4NZA55-CkDwFn1d.js.br +0 -0
  99. package/dist/web/assets/cynefinDiagram-MW4NZA55-CkDwFn1d.js.gz +0 -0
  100. package/dist/web/assets/{dagre-VZM6K2ZE-DPjpFaaI.js → dagre-VZM6K2ZE-BJMLqNJh.js} +1 -1
  101. package/dist/web/assets/dagre-VZM6K2ZE-BJMLqNJh.js.br +0 -0
  102. package/dist/web/assets/dagre-VZM6K2ZE-BJMLqNJh.js.gz +0 -0
  103. package/dist/web/assets/{diagram-7IWD3JNH-FttE2mF9.js → diagram-7IWD3JNH-By70CZGW.js} +1 -1
  104. package/dist/web/assets/diagram-7IWD3JNH-By70CZGW.js.br +0 -0
  105. package/dist/web/assets/diagram-7IWD3JNH-By70CZGW.js.gz +0 -0
  106. package/dist/web/assets/{diagram-B4RE2ZJO-DutGwDiG.js → diagram-B4RE2ZJO-Ct90H1dH.js} +1 -1
  107. package/dist/web/assets/diagram-B4RE2ZJO-Ct90H1dH.js.br +0 -0
  108. package/dist/web/assets/diagram-B4RE2ZJO-Ct90H1dH.js.gz +0 -0
  109. package/dist/web/assets/{diagram-LBJQPF4R-DWNj_QF3.js → diagram-LBJQPF4R-yLEEPweE.js} +1 -1
  110. package/dist/web/assets/diagram-LBJQPF4R-yLEEPweE.js.br +0 -0
  111. package/dist/web/assets/diagram-LBJQPF4R-yLEEPweE.js.gz +0 -0
  112. package/dist/web/assets/{diagram-Q27KOJAE-YijAHa46.js → diagram-Q27KOJAE-DvtR09mH.js} +1 -1
  113. package/dist/web/assets/diagram-Q27KOJAE-DvtR09mH.js.br +0 -0
  114. package/dist/web/assets/diagram-Q27KOJAE-DvtR09mH.js.gz +0 -0
  115. package/dist/web/assets/{diagram-UB23O5K3-BOM6whDm.js → diagram-UB23O5K3-CHz0410-.js} +1 -1
  116. package/dist/web/assets/diagram-UB23O5K3-CHz0410-.js.br +0 -0
  117. package/dist/web/assets/diagram-UB23O5K3-CHz0410-.js.gz +0 -0
  118. package/dist/web/assets/dist-jnof4ZZu.js +1 -0
  119. package/dist/web/assets/dist-jnof4ZZu.js.br +0 -0
  120. package/dist/web/assets/dist-jnof4ZZu.js.gz +0 -0
  121. package/dist/web/assets/{download-Dk0nDBlp.js → download-Bl7A9H6k.js} +1 -1
  122. package/dist/web/assets/download-Bl7A9H6k.js.br +0 -0
  123. package/dist/web/assets/download-Bl7A9H6k.js.gz +0 -0
  124. package/dist/web/assets/{ebnfDiagram-BXEA7PRR-DsJVty4x.js → ebnfDiagram-BXEA7PRR-CV8xXTHv.js} +1 -1
  125. package/dist/web/assets/ebnfDiagram-BXEA7PRR-CV8xXTHv.js.br +0 -0
  126. package/dist/web/assets/ebnfDiagram-BXEA7PRR-CV8xXTHv.js.gz +0 -0
  127. package/dist/web/assets/{erDiagram-JOGREHBK-CDedc87q.js → erDiagram-JOGREHBK-BijmGpoF.js} +1 -1
  128. package/dist/web/assets/erDiagram-JOGREHBK-BijmGpoF.js.br +0 -0
  129. package/dist/web/assets/erDiagram-JOGREHBK-BijmGpoF.js.gz +0 -0
  130. package/dist/web/assets/{external-link-CRvDdrtD.js → external-link-Dk0y44ny.js} +1 -1
  131. package/dist/web/assets/external-link-Dk0y44ny.js.br +0 -0
  132. package/dist/web/assets/external-link-Dk0y44ny.js.gz +0 -0
  133. package/dist/web/assets/{file-navigation-view-preference-DeSZj4DG.js → file-navigation-view-preference-t7yCo7RL.js} +1 -1
  134. package/dist/web/assets/file-navigation-view-preference-t7yCo7RL.js.br +0 -0
  135. package/dist/web/assets/file-navigation-view-preference-t7yCo7RL.js.gz +0 -0
  136. package/dist/web/assets/file-review-dialog-B7ZZsWSg.js +2 -0
  137. package/dist/web/assets/file-review-dialog-B7ZZsWSg.js.br +0 -0
  138. package/dist/web/assets/file-review-dialog-B7ZZsWSg.js.gz +0 -0
  139. package/dist/web/assets/flowDiagram-UKHOOZJN-BmGD99Sz.js +1 -0
  140. package/dist/web/assets/flowDiagram-UKHOOZJN-BmGD99Sz.js.br +0 -0
  141. package/dist/web/assets/flowDiagram-UKHOOZJN-BmGD99Sz.js.gz +0 -0
  142. package/dist/web/assets/{ganttDiagram-PKOTCBZU-BdtSBPJo.js → ganttDiagram-PKOTCBZU-DDBacU-N.js} +1 -1
  143. package/dist/web/assets/ganttDiagram-PKOTCBZU-DDBacU-N.js.br +0 -0
  144. package/dist/web/assets/ganttDiagram-PKOTCBZU-DDBacU-N.js.gz +0 -0
  145. package/dist/web/assets/git-commit-review-BkVSj-PK.js +2 -0
  146. package/dist/web/assets/git-commit-review-BkVSj-PK.js.br +0 -0
  147. package/dist/web/assets/git-commit-review-BkVSj-PK.js.gz +0 -0
  148. package/dist/web/assets/{git-fork-Xq4RKTgF.js → git-fork-5Bj0CoPx.js} +1 -1
  149. package/dist/web/assets/git-fork-5Bj0CoPx.js.br +1 -0
  150. package/dist/web/assets/git-fork-5Bj0CoPx.js.gz +0 -0
  151. package/dist/web/assets/git-history-panel-BlX3-8Lo.js +1 -0
  152. package/dist/web/assets/git-history-panel-BlX3-8Lo.js.br +0 -0
  153. package/dist/web/assets/git-history-panel-BlX3-8Lo.js.gz +0 -0
  154. package/dist/web/assets/{gitGraphDiagram-DS77QQ5N-B22e8CZo.js → gitGraphDiagram-DS77QQ5N-CuMvIZdK.js} +1 -1
  155. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-CuMvIZdK.js.br +0 -0
  156. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-CuMvIZdK.js.gz +0 -0
  157. package/dist/web/assets/global-search-dialog-Dhkbc7CQ.js +2 -0
  158. package/dist/web/assets/global-search-dialog-Dhkbc7CQ.js.br +0 -0
  159. package/dist/web/assets/global-search-dialog-Dhkbc7CQ.js.gz +0 -0
  160. package/dist/web/assets/global-settings-about-D9N_zbp_.js +1 -0
  161. package/dist/web/assets/global-settings-about-D9N_zbp_.js.br +0 -0
  162. package/dist/web/assets/global-settings-about-D9N_zbp_.js.gz +0 -0
  163. package/dist/web/assets/global-settings-page-CFWea4X9.js +2 -0
  164. package/dist/web/assets/global-settings-page-CFWea4X9.js.br +0 -0
  165. package/dist/web/assets/global-settings-page-CFWea4X9.js.gz +0 -0
  166. package/dist/web/assets/global-settings-pets-DzP64-PW.js +1 -0
  167. package/dist/web/assets/global-settings-pets-DzP64-PW.js.br +0 -0
  168. package/dist/web/assets/global-settings-pets-DzP64-PW.js.gz +0 -0
  169. package/dist/web/assets/{highlighted-body-OFNGDK62-FjBSs__o.js → highlighted-body-OFNGDK62-Bt8Ro1l8.js} +1 -1
  170. package/dist/web/assets/highlighted-body-OFNGDK62-Bt8Ro1l8.js.br +0 -0
  171. package/dist/web/assets/highlighted-body-OFNGDK62-Bt8Ro1l8.js.gz +0 -0
  172. package/dist/web/assets/{history-location-V7apsueQ.js → history-location-Cu79COFx.js} +1 -1
  173. package/dist/web/assets/history-location-Cu79COFx.js.br +0 -0
  174. package/dist/web/assets/history-location-Cu79COFx.js.gz +0 -0
  175. package/dist/web/assets/history-task-timeline-C-NMmZZ-.js +1 -0
  176. package/dist/web/assets/history-task-timeline-C-NMmZZ-.js.br +0 -0
  177. package/dist/web/assets/history-task-timeline-C-NMmZZ-.js.gz +0 -0
  178. package/dist/web/assets/image-preview-DiO8_dX0.js +2 -0
  179. package/dist/web/assets/image-preview-DiO8_dX0.js.br +0 -0
  180. package/dist/web/assets/image-preview-DiO8_dX0.js.gz +0 -0
  181. package/dist/web/assets/image-preview-content-qI8-1LIR.js +41 -0
  182. package/dist/web/assets/image-preview-content-qI8-1LIR.js.br +0 -0
  183. package/dist/web/assets/image-preview-content-qI8-1LIR.js.gz +0 -0
  184. package/dist/web/assets/index-HGztPHO8.js +4 -0
  185. package/dist/web/assets/index-HGztPHO8.js.br +0 -0
  186. package/dist/web/assets/index-HGztPHO8.js.gz +0 -0
  187. package/dist/web/assets/index-tfIo-15z.css +2 -0
  188. package/dist/web/assets/index-tfIo-15z.css.br +0 -0
  189. package/dist/web/assets/index-tfIo-15z.css.gz +0 -0
  190. package/dist/web/assets/{infoDiagram-6WML65LV-DSZvXJp0.js → infoDiagram-6WML65LV-uUbDSCmK.js} +1 -1
  191. package/dist/web/assets/infoDiagram-6WML65LV-uUbDSCmK.js.br +0 -0
  192. package/dist/web/assets/infoDiagram-6WML65LV-uUbDSCmK.js.gz +0 -0
  193. package/dist/web/assets/initial-deps-3Wb3IGZt.js +2 -0
  194. package/dist/web/assets/initial-deps-3Wb3IGZt.js.br +0 -0
  195. package/dist/web/assets/initial-deps-3Wb3IGZt.js.gz +0 -0
  196. package/dist/web/assets/initial-deps-C0_XYRrC.js +1 -0
  197. package/dist/web/assets/initial-deps-C0_XYRrC.js.br +0 -0
  198. package/dist/web/assets/initial-deps-C0_XYRrC.js.gz +0 -0
  199. package/dist/web/assets/initial-deps-CjThEvcM.js +1 -0
  200. package/dist/web/assets/initial-deps-CjThEvcM.js.br +0 -0
  201. package/dist/web/assets/initial-deps-CjThEvcM.js.gz +0 -0
  202. package/dist/web/assets/{initial-deps-CBhPCsGd.js → initial-deps-DlvNWQT2.js} +11 -11
  203. package/dist/web/assets/initial-deps-DlvNWQT2.js.br +0 -0
  204. package/dist/web/assets/initial-deps-DlvNWQT2.js.gz +0 -0
  205. package/dist/web/assets/{initial-deps-DrGiv6wG.js → initial-deps-Hmv0m4RH.js} +1 -1
  206. package/dist/web/assets/initial-deps-Hmv0m4RH.js.br +0 -0
  207. package/dist/web/assets/initial-deps-Hmv0m4RH.js.gz +0 -0
  208. package/dist/web/assets/installed-skills-pane-Duf2Drj5.js +1 -0
  209. package/dist/web/assets/installed-skills-pane-Duf2Drj5.js.br +0 -0
  210. package/dist/web/assets/installed-skills-pane-Duf2Drj5.js.gz +0 -0
  211. package/dist/web/assets/{ishikawaDiagram-WSZJBQD7-DVUvT7ny.js → ishikawaDiagram-WSZJBQD7-BiGqQPSQ.js} +1 -1
  212. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-BiGqQPSQ.js.br +0 -0
  213. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-BiGqQPSQ.js.gz +0 -0
  214. package/dist/web/assets/{journeyDiagram-NVQOT4AX-CdhNlHim.js → journeyDiagram-NVQOT4AX-DQo3-f9r.js} +1 -1
  215. package/dist/web/assets/journeyDiagram-NVQOT4AX-DQo3-f9r.js.br +0 -0
  216. package/dist/web/assets/journeyDiagram-NVQOT4AX-DQo3-f9r.js.gz +0 -0
  217. package/dist/web/assets/{kanban-definition-27J2QSJJ-C0G0BsDc.js → kanban-definition-27J2QSJJ-Cn26tmRk.js} +1 -1
  218. package/dist/web/assets/kanban-definition-27J2QSJJ-Cn26tmRk.js.br +0 -0
  219. package/dist/web/assets/kanban-definition-27J2QSJJ-Cn26tmRk.js.gz +0 -0
  220. package/dist/web/assets/katex-CqLmZ2j0.js +257 -0
  221. package/dist/web/assets/katex-CqLmZ2j0.js.br +0 -0
  222. package/dist/web/assets/katex-CqLmZ2j0.js.gz +0 -0
  223. package/dist/web/assets/lazy-message-response-BwDvftCZ.js +2 -0
  224. package/dist/web/assets/lazy-message-response-BwDvftCZ.js.br +0 -0
  225. package/dist/web/assets/lazy-message-response-BwDvftCZ.js.gz +0 -0
  226. package/dist/web/assets/{line-CkOY0j4D.js → line-CxzJiGLl.js} +1 -1
  227. package/dist/web/assets/line-CxzJiGLl.js.br +0 -0
  228. package/dist/web/assets/line-CxzJiGLl.js.gz +0 -0
  229. package/dist/web/assets/maximize-2-B5zOTtsd.js +1 -0
  230. package/dist/web/assets/maximize-2-B5zOTtsd.js.br +0 -0
  231. package/dist/web/assets/maximize-2-B5zOTtsd.js.gz +0 -0
  232. package/dist/web/assets/mcp-management-pane-CDJGAeMR.js +1 -0
  233. package/dist/web/assets/mcp-management-pane-CDJGAeMR.js.br +0 -0
  234. package/dist/web/assets/mcp-management-pane-CDJGAeMR.js.gz +0 -0
  235. package/dist/web/assets/mermaid-GHXKKRXX-DcFI66qc.js +1 -0
  236. package/dist/web/assets/mermaid-GHXKKRXX-DcFI66qc.js.br +0 -0
  237. package/dist/web/assets/mermaid-GHXKKRXX-DcFI66qc.js.gz +0 -0
  238. package/dist/web/assets/message-response-CTSaT37R.js +190 -0
  239. package/dist/web/assets/message-response-CTSaT37R.js.br +0 -0
  240. package/dist/web/assets/message-response-CTSaT37R.js.gz +0 -0
  241. package/dist/web/assets/{mindmap-definition-FAOFIHXS-e4xaDG0C.js → mindmap-definition-FAOFIHXS-B4YXdlAS.js} +1 -1
  242. package/dist/web/assets/mindmap-definition-FAOFIHXS-B4YXdlAS.js.br +0 -0
  243. package/dist/web/assets/mindmap-definition-FAOFIHXS-B4YXdlAS.js.gz +0 -0
  244. package/dist/web/assets/official-plugins-pane-DK8qT-_B.js +1 -0
  245. package/dist/web/assets/official-plugins-pane-DK8qT-_B.js.br +0 -0
  246. package/dist/web/assets/official-plugins-pane-DK8qT-_B.js.gz +0 -0
  247. package/dist/web/assets/{patch-diff-viewer-uRBXpth4.js → patch-diff-viewer-BXC_BZDr.js} +3 -3
  248. package/dist/web/assets/patch-diff-viewer-BXC_BZDr.js.br +0 -0
  249. package/dist/web/assets/patch-diff-viewer-BXC_BZDr.js.gz +0 -0
  250. package/dist/web/assets/{pegDiagram-VL7TDLO6-yAZdMeDN.js → pegDiagram-VL7TDLO6-NbYGYJTB.js} +1 -1
  251. package/dist/web/assets/pegDiagram-VL7TDLO6-NbYGYJTB.js.br +0 -0
  252. package/dist/web/assets/pegDiagram-VL7TDLO6-NbYGYJTB.js.gz +0 -0
  253. package/dist/web/assets/personalization-settings-panel-kuddr4pp.js +1 -0
  254. package/dist/web/assets/personalization-settings-panel-kuddr4pp.js.br +0 -0
  255. package/dist/web/assets/personalization-settings-panel-kuddr4pp.js.gz +0 -0
  256. package/dist/web/assets/{pieDiagram-7S7Q4E2Y-DKgKZ9K6.js → pieDiagram-7S7Q4E2Y-yHKToX8b.js} +1 -1
  257. package/dist/web/assets/pieDiagram-7S7Q4E2Y-yHKToX8b.js.br +0 -0
  258. package/dist/web/assets/pieDiagram-7S7Q4E2Y-yHKToX8b.js.gz +0 -0
  259. package/dist/web/assets/{project-file-popup-page-BK__Q18L.js → project-file-popup-page-6En9Rr6E.js} +1 -1
  260. package/dist/web/assets/project-file-popup-page-6En9Rr6E.js.br +0 -0
  261. package/dist/web/assets/project-file-popup-page-6En9Rr6E.js.gz +0 -0
  262. package/dist/web/assets/project-source-panel-CBX-E9jx.js +3 -0
  263. package/dist/web/assets/project-source-panel-CBX-E9jx.js.br +0 -0
  264. package/dist/web/assets/project-source-panel-CBX-E9jx.js.gz +0 -0
  265. package/dist/web/assets/prompt-input-C1ywdkU4.js +1 -0
  266. package/dist/web/assets/prompt-input-C1ywdkU4.js.br +0 -0
  267. package/dist/web/assets/prompt-input-C1ywdkU4.js.gz +0 -0
  268. package/dist/web/assets/prompt-reference-token-cMxHiKmI.js +1 -0
  269. package/dist/web/assets/prompt-reference-token-cMxHiKmI.js.br +0 -0
  270. package/dist/web/assets/prompt-reference-token-cMxHiKmI.js.gz +0 -0
  271. package/dist/web/assets/{quadrantDiagram-CIZ2JOQS-BYWpo7rG.js → quadrantDiagram-CIZ2JOQS-B2fgIvk_.js} +1 -1
  272. package/dist/web/assets/quadrantDiagram-CIZ2JOQS-B2fgIvk_.js.br +0 -0
  273. package/dist/web/assets/quadrantDiagram-CIZ2JOQS-B2fgIvk_.js.gz +0 -0
  274. package/dist/web/assets/{railroadDiagram-AXF67PYL-BBVyDlId.js → railroadDiagram-AXF67PYL-DWQcic4X.js} +1 -1
  275. package/dist/web/assets/railroadDiagram-AXF67PYL-DWQcic4X.js.br +0 -0
  276. package/dist/web/assets/railroadDiagram-AXF67PYL-DWQcic4X.js.gz +0 -0
  277. package/dist/web/assets/{requirementDiagram-LRYGKXZP-1CJGSuUO.js → requirementDiagram-LRYGKXZP-CPzp08lo.js} +1 -1
  278. package/dist/web/assets/requirementDiagram-LRYGKXZP-CPzp08lo.js.br +0 -0
  279. package/dist/web/assets/requirementDiagram-LRYGKXZP-CPzp08lo.js.gz +0 -0
  280. package/dist/web/assets/{sankeyDiagram-W5VNT64P-B9EFX3Mg.js → sankeyDiagram-W5VNT64P-zjYX_iXE.js} +1 -1
  281. package/dist/web/assets/sankeyDiagram-W5VNT64P-zjYX_iXE.js.br +0 -0
  282. package/dist/web/assets/sankeyDiagram-W5VNT64P-zjYX_iXE.js.gz +0 -0
  283. package/dist/web/assets/{scheduled-task-date-time-picker-BoLv1Roe.js → scheduled-task-date-time-picker-BS5y3xEd.js} +1 -1
  284. package/dist/web/assets/scheduled-task-date-time-picker-BS5y3xEd.js.br +0 -0
  285. package/dist/web/assets/scheduled-task-date-time-picker-BS5y3xEd.js.gz +0 -0
  286. package/dist/web/assets/{scheduled-task-floating-ui~scheduled-task-date-time-picker-BUw80Kqc.js → scheduled-task-floating-ui~scheduled-task-date-time-picker-C9XdROQX.js} +1 -1
  287. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-C9XdROQX.js.br +0 -0
  288. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-C9XdROQX.js.gz +0 -0
  289. package/dist/web/assets/scheduled-tasks-container-PGgSoPpl.js +2 -0
  290. package/dist/web/assets/scheduled-tasks-container-PGgSoPpl.js.br +0 -0
  291. package/dist/web/assets/scheduled-tasks-container-PGgSoPpl.js.gz +0 -0
  292. package/dist/web/assets/{sequenceDiagram-SI44F4Z6-C073VZDH.js → sequenceDiagram-SI44F4Z6-ZN8ZLfuR.js} +1 -1
  293. package/dist/web/assets/sequenceDiagram-SI44F4Z6-ZN8ZLfuR.js.br +0 -0
  294. package/dist/web/assets/sequenceDiagram-SI44F4Z6-ZN8ZLfuR.js.gz +0 -0
  295. package/dist/web/assets/sheet-DQXlYPSf.js +1 -0
  296. package/dist/web/assets/sheet-DQXlYPSf.js.br +0 -0
  297. package/dist/web/assets/sheet-DQXlYPSf.js.gz +0 -0
  298. package/dist/web/assets/{shiki-bundle-DC-eDV05.js → shiki-bundle-BHjdRMkM.js} +1 -1
  299. package/dist/web/assets/shiki-bundle-BHjdRMkM.js.br +0 -0
  300. package/dist/web/assets/shiki-bundle-BHjdRMkM.js.gz +0 -0
  301. package/dist/web/assets/skills-market-container-CBcJhTq0.js +2 -0
  302. package/dist/web/assets/skills-market-container-CBcJhTq0.js.br +0 -0
  303. package/dist/web/assets/skills-market-container-CBcJhTq0.js.gz +0 -0
  304. package/dist/web/assets/{sliders-horizontal-DCvEwl5f.js → sliders-horizontal-CPjDJLH6.js} +1 -1
  305. package/dist/web/assets/sliders-horizontal-CPjDJLH6.js.br +1 -0
  306. package/dist/web/assets/sliders-horizontal-CPjDJLH6.js.gz +0 -0
  307. package/dist/web/assets/split-workspace-menu-content-CsWwhnXx.js +1 -0
  308. package/dist/web/assets/split-workspace-menu-content-CsWwhnXx.js.br +0 -0
  309. package/dist/web/assets/split-workspace-menu-content-CsWwhnXx.js.gz +0 -0
  310. package/dist/web/assets/{stateDiagram-OKZ733FA-BUJVFo5h.js → stateDiagram-OKZ733FA-BM7CXH39.js} +1 -1
  311. package/dist/web/assets/stateDiagram-OKZ733FA-BM7CXH39.js.br +0 -0
  312. package/dist/web/assets/stateDiagram-OKZ733FA-BM7CXH39.js.gz +0 -0
  313. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CmijPEeQ.js +1 -0
  314. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CmijPEeQ.js.br +0 -0
  315. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-CmijPEeQ.js.gz +0 -0
  316. package/dist/web/assets/{swimlanes-SLNWSIFB-CrO5FxiS.js → swimlanes-SLNWSIFB-BY6G7QkV.js} +1 -1
  317. package/dist/web/assets/swimlanes-SLNWSIFB-BY6G7QkV.js.br +0 -0
  318. package/dist/web/assets/swimlanes-SLNWSIFB-BY6G7QkV.js.gz +0 -0
  319. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CKfmTZ-C.js +8 -0
  320. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CKfmTZ-C.js.br +0 -0
  321. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-CKfmTZ-C.js.gz +0 -0
  322. package/dist/web/assets/third-party-marketplace-pane-CLT2SrUQ.js +1 -0
  323. package/dist/web/assets/third-party-marketplace-pane-CLT2SrUQ.js.br +0 -0
  324. package/dist/web/assets/third-party-marketplace-pane-CLT2SrUQ.js.gz +0 -0
  325. package/dist/web/assets/{timeline-definition-Z64GVDOM-CyaFUBPU.js → timeline-definition-Z64GVDOM-2ViTcv_D.js} +1 -1
  326. package/dist/web/assets/timeline-definition-Z64GVDOM-2ViTcv_D.js.br +0 -0
  327. package/dist/web/assets/timeline-definition-Z64GVDOM-2ViTcv_D.js.gz +0 -0
  328. package/dist/web/assets/{upload-KSH2Pq_u.js → upload-BmVXQDIq.js} +1 -1
  329. package/dist/web/assets/upload-BmVXQDIq.js.br +0 -0
  330. package/dist/web/assets/upload-BmVXQDIq.js.gz +0 -0
  331. package/dist/web/assets/{vennDiagram-T6HMQDX7-D2V-UUrU.js → vennDiagram-T6HMQDX7-DtvEprHV.js} +1 -1
  332. package/dist/web/assets/vennDiagram-T6HMQDX7-DtvEprHV.js.br +0 -0
  333. package/dist/web/assets/vennDiagram-T6HMQDX7-DtvEprHV.js.gz +0 -0
  334. package/dist/web/assets/{wardleyDiagram-T6FBY63Y-BrvOdgtd.js → wardleyDiagram-T6FBY63Y-BIYFyd3H.js} +1 -1
  335. package/dist/web/assets/wardleyDiagram-T6FBY63Y-BIYFyd3H.js.br +0 -0
  336. package/dist/web/assets/wardleyDiagram-T6FBY63Y-BIYFyd3H.js.gz +0 -0
  337. package/dist/web/assets/workbench-inspector-changes-Ba7oHLMx.js +2 -0
  338. package/dist/web/assets/workbench-inspector-changes-Ba7oHLMx.js.br +0 -0
  339. package/dist/web/assets/workbench-inspector-changes-Ba7oHLMx.js.gz +0 -0
  340. package/dist/web/assets/{workbench-pet-canvas-Cn4RQA28.js → workbench-pet-canvas-CK9lEOvO.js} +1 -1
  341. package/dist/web/assets/workbench-pet-canvas-CK9lEOvO.js.br +0 -0
  342. package/dist/web/assets/workbench-pet-canvas-CK9lEOvO.js.gz +0 -0
  343. package/dist/web/assets/workbench-shell-BwqyzEc4.js +16 -0
  344. package/dist/web/assets/workbench-shell-BwqyzEc4.js.br +0 -0
  345. package/dist/web/assets/workbench-shell-BwqyzEc4.js.gz +0 -0
  346. package/dist/web/assets/{xychartDiagram-ELKLHX3M-BCQllPKr.js → xychartDiagram-ELKLHX3M-CFaKO_zz.js} +1 -1
  347. package/dist/web/assets/xychartDiagram-ELKLHX3M-CFaKO_zz.js.br +0 -0
  348. package/dist/web/assets/xychartDiagram-ELKLHX3M-CFaKO_zz.js.gz +0 -0
  349. package/dist/web/index.html +8 -8
  350. package/dist/web/index.html.br +0 -0
  351. package/dist/web/index.html.gz +0 -0
  352. package/package.json +2 -2
  353. package/dist/web/assets/abnfDiagram-N423BO3Z-BjOk39fK.js.br +0 -0
  354. package/dist/web/assets/abnfDiagram-N423BO3Z-BjOk39fK.js.gz +0 -0
  355. package/dist/web/assets/agent-settings-panel-CD856VbZ.js +0 -1
  356. package/dist/web/assets/agent-settings-panel-CD856VbZ.js.br +0 -0
  357. package/dist/web/assets/agent-settings-panel-CD856VbZ.js.gz +0 -0
  358. package/dist/web/assets/architectureDiagram-T3A2C74G-CszOrw8P.js.br +0 -0
  359. package/dist/web/assets/architectureDiagram-T3A2C74G-CszOrw8P.js.gz +0 -0
  360. package/dist/web/assets/attachments-hHYcCn48.js +0 -1
  361. package/dist/web/assets/attachments-hHYcCn48.js.br +0 -0
  362. package/dist/web/assets/attachments-hHYcCn48.js.gz +0 -0
  363. package/dist/web/assets/background-image-picker-g1MOp3xh.js +0 -1
  364. package/dist/web/assets/background-image-picker-g1MOp3xh.js.br +0 -0
  365. package/dist/web/assets/background-image-picker-g1MOp3xh.js.gz +0 -0
  366. package/dist/web/assets/blockDiagram-VBNYF7ZC-BV5k8m33.js.br +0 -0
  367. package/dist/web/assets/blockDiagram-VBNYF7ZC-BV5k8m33.js.gz +0 -0
  368. package/dist/web/assets/c4Diagram-5PPSVZJV-BxAKHU1O.js.br +0 -0
  369. package/dist/web/assets/c4Diagram-5PPSVZJV-BxAKHU1O.js.gz +0 -0
  370. package/dist/web/assets/channel-BsJlYD7r.js +0 -1
  371. package/dist/web/assets/channel-BsJlYD7r.js.br +0 -0
  372. package/dist/web/assets/channel-BsJlYD7r.js.gz +0 -0
  373. package/dist/web/assets/chunk-2GRJ4B5K-BylLXQQW.js.br +0 -0
  374. package/dist/web/assets/chunk-2GRJ4B5K-BylLXQQW.js.gz +0 -0
  375. package/dist/web/assets/chunk-4I5QYGJK-Sszv2sFO.js.br +0 -0
  376. package/dist/web/assets/chunk-4I5QYGJK-Sszv2sFO.js.gz +0 -0
  377. package/dist/web/assets/chunk-5RXB4S5H-CzjZ3jYa.js.br +0 -0
  378. package/dist/web/assets/chunk-5RXB4S5H-CzjZ3jYa.js.gz +0 -0
  379. package/dist/web/assets/chunk-6Q2QTUOP-4wecdxpy.js.br +0 -0
  380. package/dist/web/assets/chunk-6Q2QTUOP-4wecdxpy.js.gz +0 -0
  381. package/dist/web/assets/chunk-7Z6QIM7H-KnmPl6Ej.js.br +0 -0
  382. package/dist/web/assets/chunk-7Z6QIM7H-KnmPl6Ej.js.gz +0 -0
  383. package/dist/web/assets/chunk-GF5L2VYU-BME1MVPj.js.br +0 -0
  384. package/dist/web/assets/chunk-GF5L2VYU-BME1MVPj.js.gz +0 -0
  385. package/dist/web/assets/chunk-I66GZJ75-Cv1OO8mI.js.br +0 -0
  386. package/dist/web/assets/chunk-JQJVKLGR-BNnsgjF4.js.br +0 -0
  387. package/dist/web/assets/chunk-JQJVKLGR-BNnsgjF4.js.gz +0 -0
  388. package/dist/web/assets/chunk-KBJHAD2P-BJ17RizB.js.br +0 -0
  389. package/dist/web/assets/chunk-KBJHAD2P-BJ17RizB.js.gz +0 -0
  390. package/dist/web/assets/chunk-NSK5VX7P-YD4zvQrY.js.br +0 -0
  391. package/dist/web/assets/chunk-NSK5VX7P-YD4zvQrY.js.gz +0 -0
  392. package/dist/web/assets/chunk-QR6OTTB3-B4Vn8un2.js.br +0 -0
  393. package/dist/web/assets/chunk-QR6OTTB3-B4Vn8un2.js.gz +0 -0
  394. package/dist/web/assets/chunk-UBXNYLIW-C_5U1nW_.js.br +0 -0
  395. package/dist/web/assets/chunk-UBXNYLIW-C_5U1nW_.js.gz +0 -0
  396. package/dist/web/assets/chunk-W5SLKNZC-Cg_GuHYA.js.br +0 -0
  397. package/dist/web/assets/chunk-W5SLKNZC-Cg_GuHYA.js.gz +0 -0
  398. package/dist/web/assets/chunk-WRU74C26-zXtZrpuc.js.br +0 -0
  399. package/dist/web/assets/chunk-WRU74C26-zXtZrpuc.js.gz +0 -0
  400. package/dist/web/assets/classDiagram-JCYQIIEL-DfsU-iz3.js +0 -1
  401. package/dist/web/assets/classDiagram-JCYQIIEL-DfsU-iz3.js.br +0 -0
  402. package/dist/web/assets/classDiagram-JCYQIIEL-DfsU-iz3.js.gz +0 -0
  403. package/dist/web/assets/classDiagram-v2-OCEON4UE-DfsU-iz3.js +0 -1
  404. package/dist/web/assets/classDiagram-v2-OCEON4UE-DfsU-iz3.js.br +0 -0
  405. package/dist/web/assets/classDiagram-v2-OCEON4UE-DfsU-iz3.js.gz +0 -0
  406. package/dist/web/assets/clipboard-Bj7t4C3K.js.br +0 -0
  407. package/dist/web/assets/clipboard-Bj7t4C3K.js.gz +0 -0
  408. package/dist/web/assets/code-highlighter-0eqb-Lkx.js.br +0 -0
  409. package/dist/web/assets/code-highlighter-0eqb-Lkx.js.gz +0 -0
  410. package/dist/web/assets/commit-settings-panel-BVWa135n.js.br +0 -0
  411. package/dist/web/assets/commit-settings-panel-BVWa135n.js.gz +0 -0
  412. package/dist/web/assets/cynefinDiagram-MW4NZA55-frpmFdyz.js.br +0 -0
  413. package/dist/web/assets/cynefinDiagram-MW4NZA55-frpmFdyz.js.gz +0 -0
  414. package/dist/web/assets/dagre-VZM6K2ZE-DPjpFaaI.js.br +0 -0
  415. package/dist/web/assets/dagre-VZM6K2ZE-DPjpFaaI.js.gz +0 -0
  416. package/dist/web/assets/diagram-7IWD3JNH-FttE2mF9.js.br +0 -0
  417. package/dist/web/assets/diagram-7IWD3JNH-FttE2mF9.js.gz +0 -0
  418. package/dist/web/assets/diagram-B4RE2ZJO-DutGwDiG.js.br +0 -0
  419. package/dist/web/assets/diagram-B4RE2ZJO-DutGwDiG.js.gz +0 -0
  420. package/dist/web/assets/diagram-LBJQPF4R-DWNj_QF3.js.br +0 -0
  421. package/dist/web/assets/diagram-LBJQPF4R-DWNj_QF3.js.gz +0 -0
  422. package/dist/web/assets/diagram-Q27KOJAE-YijAHa46.js.br +0 -0
  423. package/dist/web/assets/diagram-Q27KOJAE-YijAHa46.js.gz +0 -0
  424. package/dist/web/assets/diagram-UB23O5K3-BOM6whDm.js.br +0 -0
  425. package/dist/web/assets/diagram-UB23O5K3-BOM6whDm.js.gz +0 -0
  426. package/dist/web/assets/dist-XXjZG1D0.js +0 -1
  427. package/dist/web/assets/dist-XXjZG1D0.js.br +0 -0
  428. package/dist/web/assets/dist-XXjZG1D0.js.gz +0 -0
  429. package/dist/web/assets/download-Dk0nDBlp.js.br +0 -0
  430. package/dist/web/assets/download-Dk0nDBlp.js.gz +0 -0
  431. package/dist/web/assets/ebnfDiagram-BXEA7PRR-DsJVty4x.js.br +0 -0
  432. package/dist/web/assets/ebnfDiagram-BXEA7PRR-DsJVty4x.js.gz +0 -0
  433. package/dist/web/assets/erDiagram-JOGREHBK-CDedc87q.js.br +0 -0
  434. package/dist/web/assets/erDiagram-JOGREHBK-CDedc87q.js.gz +0 -0
  435. package/dist/web/assets/external-link-CRvDdrtD.js.br +0 -0
  436. package/dist/web/assets/external-link-CRvDdrtD.js.gz +0 -0
  437. package/dist/web/assets/file-navigation-view-preference-DeSZj4DG.js.br +0 -0
  438. package/dist/web/assets/file-navigation-view-preference-DeSZj4DG.js.gz +0 -0
  439. package/dist/web/assets/file-review-dialog-ZlSRByDh.js +0 -2
  440. package/dist/web/assets/file-review-dialog-ZlSRByDh.js.br +0 -0
  441. package/dist/web/assets/file-review-dialog-ZlSRByDh.js.gz +0 -0
  442. package/dist/web/assets/flowDiagram-UKHOOZJN-CoVA1HXU.js +0 -1
  443. package/dist/web/assets/flowDiagram-UKHOOZJN-CoVA1HXU.js.br +0 -0
  444. package/dist/web/assets/flowDiagram-UKHOOZJN-CoVA1HXU.js.gz +0 -0
  445. package/dist/web/assets/ganttDiagram-PKOTCBZU-BdtSBPJo.js.br +0 -0
  446. package/dist/web/assets/ganttDiagram-PKOTCBZU-BdtSBPJo.js.gz +0 -0
  447. package/dist/web/assets/git-commit-review-DdmNEtaT.js +0 -2
  448. package/dist/web/assets/git-commit-review-DdmNEtaT.js.br +0 -0
  449. package/dist/web/assets/git-commit-review-DdmNEtaT.js.gz +0 -0
  450. package/dist/web/assets/git-fork-Xq4RKTgF.js.br +0 -1
  451. package/dist/web/assets/git-fork-Xq4RKTgF.js.gz +0 -0
  452. package/dist/web/assets/git-history-panel-BJmnH2Dh.js +0 -1
  453. package/dist/web/assets/git-history-panel-BJmnH2Dh.js.br +0 -0
  454. package/dist/web/assets/git-history-panel-BJmnH2Dh.js.gz +0 -0
  455. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-B22e8CZo.js.br +0 -0
  456. package/dist/web/assets/gitGraphDiagram-DS77QQ5N-B22e8CZo.js.gz +0 -0
  457. package/dist/web/assets/global-search-dialog-PYK9IIEa.js +0 -2
  458. package/dist/web/assets/global-search-dialog-PYK9IIEa.js.br +0 -0
  459. package/dist/web/assets/global-search-dialog-PYK9IIEa.js.gz +0 -0
  460. package/dist/web/assets/global-settings-about-BFGYjZyv.js +0 -1
  461. package/dist/web/assets/global-settings-about-BFGYjZyv.js.br +0 -0
  462. package/dist/web/assets/global-settings-about-BFGYjZyv.js.gz +0 -0
  463. package/dist/web/assets/global-settings-page-CrhhVjyg.js +0 -2
  464. package/dist/web/assets/global-settings-page-CrhhVjyg.js.br +0 -0
  465. package/dist/web/assets/global-settings-page-CrhhVjyg.js.gz +0 -0
  466. package/dist/web/assets/global-settings-pets-BjntH3Nh.js +0 -1
  467. package/dist/web/assets/global-settings-pets-BjntH3Nh.js.br +0 -0
  468. package/dist/web/assets/global-settings-pets-BjntH3Nh.js.gz +0 -0
  469. package/dist/web/assets/highlighted-body-OFNGDK62-FjBSs__o.js.br +0 -0
  470. package/dist/web/assets/highlighted-body-OFNGDK62-FjBSs__o.js.gz +0 -0
  471. package/dist/web/assets/history-location-V7apsueQ.js.br +0 -0
  472. package/dist/web/assets/history-location-V7apsueQ.js.gz +0 -0
  473. package/dist/web/assets/history-task-timeline-DHtwHEWB.js +0 -1
  474. package/dist/web/assets/history-task-timeline-DHtwHEWB.js.br +0 -0
  475. package/dist/web/assets/history-task-timeline-DHtwHEWB.js.gz +0 -0
  476. package/dist/web/assets/image-preview-CxAsQ_9O.js +0 -2
  477. package/dist/web/assets/image-preview-CxAsQ_9O.js.br +0 -0
  478. package/dist/web/assets/image-preview-CxAsQ_9O.js.gz +0 -0
  479. package/dist/web/assets/image-preview-content-BxJgppkC.js +0 -41
  480. package/dist/web/assets/image-preview-content-BxJgppkC.js.br +0 -0
  481. package/dist/web/assets/image-preview-content-BxJgppkC.js.gz +0 -0
  482. package/dist/web/assets/index-CV1MnZmV.css +0 -2
  483. package/dist/web/assets/index-CV1MnZmV.css.br +0 -0
  484. package/dist/web/assets/index-CV1MnZmV.css.gz +0 -0
  485. package/dist/web/assets/index-CYyqBE6B.js +0 -4
  486. package/dist/web/assets/index-CYyqBE6B.js.br +0 -0
  487. package/dist/web/assets/index-CYyqBE6B.js.gz +0 -0
  488. package/dist/web/assets/infoDiagram-6WML65LV-DSZvXJp0.js.br +0 -0
  489. package/dist/web/assets/infoDiagram-6WML65LV-DSZvXJp0.js.gz +0 -0
  490. package/dist/web/assets/initial-deps-BvCty1IU.js +0 -1
  491. package/dist/web/assets/initial-deps-BvCty1IU.js.br +0 -0
  492. package/dist/web/assets/initial-deps-BvCty1IU.js.gz +0 -0
  493. package/dist/web/assets/initial-deps-CBhPCsGd.js.br +0 -0
  494. package/dist/web/assets/initial-deps-CBhPCsGd.js.gz +0 -0
  495. package/dist/web/assets/initial-deps-CP3yrzZ7.js +0 -1
  496. package/dist/web/assets/initial-deps-CP3yrzZ7.js.br +0 -0
  497. package/dist/web/assets/initial-deps-CP3yrzZ7.js.gz +0 -0
  498. package/dist/web/assets/initial-deps-DrGiv6wG.js.br +0 -0
  499. package/dist/web/assets/initial-deps-DrGiv6wG.js.gz +0 -0
  500. package/dist/web/assets/initial-deps-wXx8Atmt.js +0 -1
  501. package/dist/web/assets/initial-deps-wXx8Atmt.js.br +0 -0
  502. package/dist/web/assets/initial-deps-wXx8Atmt.js.gz +0 -0
  503. package/dist/web/assets/installed-skills-pane-DAmIV2Rn.js +0 -1
  504. package/dist/web/assets/installed-skills-pane-DAmIV2Rn.js.br +0 -0
  505. package/dist/web/assets/installed-skills-pane-DAmIV2Rn.js.gz +0 -0
  506. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-DVUvT7ny.js.br +0 -0
  507. package/dist/web/assets/ishikawaDiagram-WSZJBQD7-DVUvT7ny.js.gz +0 -0
  508. package/dist/web/assets/journeyDiagram-NVQOT4AX-CdhNlHim.js.br +0 -0
  509. package/dist/web/assets/journeyDiagram-NVQOT4AX-CdhNlHim.js.gz +0 -0
  510. package/dist/web/assets/kanban-definition-27J2QSJJ-C0G0BsDc.js.br +0 -0
  511. package/dist/web/assets/kanban-definition-27J2QSJJ-C0G0BsDc.js.gz +0 -0
  512. package/dist/web/assets/katex-ZlcWpGUi.js +0 -257
  513. package/dist/web/assets/katex-ZlcWpGUi.js.br +0 -0
  514. package/dist/web/assets/katex-ZlcWpGUi.js.gz +0 -0
  515. package/dist/web/assets/lazy-message-response-ClOOqJ2R.js +0 -2
  516. package/dist/web/assets/lazy-message-response-ClOOqJ2R.js.br +0 -0
  517. package/dist/web/assets/lazy-message-response-ClOOqJ2R.js.gz +0 -0
  518. package/dist/web/assets/line-CkOY0j4D.js.br +0 -0
  519. package/dist/web/assets/line-CkOY0j4D.js.gz +0 -0
  520. package/dist/web/assets/mcp-management-pane-Dxb0V9mJ.js +0 -1
  521. package/dist/web/assets/mcp-management-pane-Dxb0V9mJ.js.br +0 -0
  522. package/dist/web/assets/mcp-management-pane-Dxb0V9mJ.js.gz +0 -0
  523. package/dist/web/assets/mermaid-GHXKKRXX-CTpPHU79.js +0 -1
  524. package/dist/web/assets/mermaid-GHXKKRXX-CTpPHU79.js.br +0 -0
  525. package/dist/web/assets/mermaid-GHXKKRXX-CTpPHU79.js.gz +0 -0
  526. package/dist/web/assets/message-response-BqaS9_Ak.js +0 -190
  527. package/dist/web/assets/message-response-BqaS9_Ak.js.br +0 -0
  528. package/dist/web/assets/message-response-BqaS9_Ak.js.gz +0 -0
  529. package/dist/web/assets/mindmap-definition-FAOFIHXS-e4xaDG0C.js.br +0 -0
  530. package/dist/web/assets/mindmap-definition-FAOFIHXS-e4xaDG0C.js.gz +0 -0
  531. package/dist/web/assets/official-plugins-pane-BINszJdR.js +0 -1
  532. package/dist/web/assets/official-plugins-pane-BINszJdR.js.br +0 -0
  533. package/dist/web/assets/official-plugins-pane-BINszJdR.js.gz +0 -0
  534. package/dist/web/assets/patch-diff-viewer-uRBXpth4.js.br +0 -0
  535. package/dist/web/assets/patch-diff-viewer-uRBXpth4.js.gz +0 -0
  536. package/dist/web/assets/pegDiagram-VL7TDLO6-yAZdMeDN.js.br +0 -0
  537. package/dist/web/assets/pegDiagram-VL7TDLO6-yAZdMeDN.js.gz +0 -0
  538. package/dist/web/assets/personalization-settings-panel-Sw_yJQCY.js +0 -1
  539. package/dist/web/assets/personalization-settings-panel-Sw_yJQCY.js.br +0 -0
  540. package/dist/web/assets/personalization-settings-panel-Sw_yJQCY.js.gz +0 -0
  541. package/dist/web/assets/pieDiagram-7S7Q4E2Y-DKgKZ9K6.js.br +0 -0
  542. package/dist/web/assets/pieDiagram-7S7Q4E2Y-DKgKZ9K6.js.gz +0 -0
  543. package/dist/web/assets/project-file-popup-page-BK__Q18L.js.br +0 -0
  544. package/dist/web/assets/project-file-popup-page-BK__Q18L.js.gz +0 -0
  545. package/dist/web/assets/project-source-panel-Dd__SIgT.js +0 -3
  546. package/dist/web/assets/project-source-panel-Dd__SIgT.js.br +0 -0
  547. package/dist/web/assets/project-source-panel-Dd__SIgT.js.gz +0 -0
  548. package/dist/web/assets/prompt-input-D7ZkQ_gQ.js +0 -1
  549. package/dist/web/assets/prompt-input-D7ZkQ_gQ.js.br +0 -0
  550. package/dist/web/assets/prompt-input-D7ZkQ_gQ.js.gz +0 -0
  551. package/dist/web/assets/prompt-reference-token-BBMnimT4.js +0 -1
  552. package/dist/web/assets/prompt-reference-token-BBMnimT4.js.br +0 -0
  553. package/dist/web/assets/prompt-reference-token-BBMnimT4.js.gz +0 -0
  554. package/dist/web/assets/quadrantDiagram-CIZ2JOQS-BYWpo7rG.js.br +0 -0
  555. package/dist/web/assets/quadrantDiagram-CIZ2JOQS-BYWpo7rG.js.gz +0 -0
  556. package/dist/web/assets/railroadDiagram-AXF67PYL-BBVyDlId.js.br +0 -0
  557. package/dist/web/assets/railroadDiagram-AXF67PYL-BBVyDlId.js.gz +0 -0
  558. package/dist/web/assets/requirementDiagram-LRYGKXZP-1CJGSuUO.js.br +0 -0
  559. package/dist/web/assets/requirementDiagram-LRYGKXZP-1CJGSuUO.js.gz +0 -0
  560. package/dist/web/assets/sankeyDiagram-W5VNT64P-B9EFX3Mg.js.br +0 -0
  561. package/dist/web/assets/sankeyDiagram-W5VNT64P-B9EFX3Mg.js.gz +0 -0
  562. package/dist/web/assets/scheduled-task-date-time-picker-BoLv1Roe.js.br +0 -0
  563. package/dist/web/assets/scheduled-task-date-time-picker-BoLv1Roe.js.gz +0 -0
  564. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-BUw80Kqc.js.br +0 -0
  565. package/dist/web/assets/scheduled-task-floating-ui~scheduled-task-date-time-picker-BUw80Kqc.js.gz +0 -0
  566. package/dist/web/assets/scheduled-tasks-container-CH4kKvAd.js +0 -2
  567. package/dist/web/assets/scheduled-tasks-container-CH4kKvAd.js.br +0 -0
  568. package/dist/web/assets/scheduled-tasks-container-CH4kKvAd.js.gz +0 -0
  569. package/dist/web/assets/sequenceDiagram-SI44F4Z6-C073VZDH.js.br +0 -0
  570. package/dist/web/assets/sequenceDiagram-SI44F4Z6-C073VZDH.js.gz +0 -0
  571. package/dist/web/assets/sheet-DietHvw8.js +0 -1
  572. package/dist/web/assets/sheet-DietHvw8.js.br +0 -0
  573. package/dist/web/assets/sheet-DietHvw8.js.gz +0 -0
  574. package/dist/web/assets/shiki-bundle-DC-eDV05.js.br +0 -1
  575. package/dist/web/assets/shiki-bundle-DC-eDV05.js.gz +0 -0
  576. package/dist/web/assets/skills-market-container--2yomrH9.js +0 -2
  577. package/dist/web/assets/skills-market-container--2yomrH9.js.br +0 -0
  578. package/dist/web/assets/skills-market-container--2yomrH9.js.gz +0 -0
  579. package/dist/web/assets/sliders-horizontal-DCvEwl5f.js.br +0 -0
  580. package/dist/web/assets/sliders-horizontal-DCvEwl5f.js.gz +0 -0
  581. package/dist/web/assets/stateDiagram-OKZ733FA-BUJVFo5h.js.br +0 -0
  582. package/dist/web/assets/stateDiagram-OKZ733FA-BUJVFo5h.js.gz +0 -0
  583. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DZH6sQ3n.js +0 -1
  584. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DZH6sQ3n.js.br +0 -4
  585. package/dist/web/assets/stateDiagram-v2-UEYNNEHI-DZH6sQ3n.js.gz +0 -0
  586. package/dist/web/assets/swimlanes-SLNWSIFB-CrO5FxiS.js.br +0 -0
  587. package/dist/web/assets/swimlanes-SLNWSIFB-CrO5FxiS.js.gz +0 -0
  588. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-BbRbJrCo.js +0 -8
  589. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-BbRbJrCo.js.br +0 -0
  590. package/dist/web/assets/swimlanesDiagram-ULZ7WXOC-BbRbJrCo.js.gz +0 -0
  591. package/dist/web/assets/third-party-marketplace-pane-B8mrwncM.js +0 -1
  592. package/dist/web/assets/third-party-marketplace-pane-B8mrwncM.js.br +0 -0
  593. package/dist/web/assets/third-party-marketplace-pane-B8mrwncM.js.gz +0 -0
  594. package/dist/web/assets/timeline-definition-Z64GVDOM-CyaFUBPU.js.br +0 -0
  595. package/dist/web/assets/timeline-definition-Z64GVDOM-CyaFUBPU.js.gz +0 -0
  596. package/dist/web/assets/upload-KSH2Pq_u.js.br +0 -0
  597. package/dist/web/assets/upload-KSH2Pq_u.js.gz +0 -0
  598. package/dist/web/assets/vennDiagram-T6HMQDX7-D2V-UUrU.js.br +0 -0
  599. package/dist/web/assets/vennDiagram-T6HMQDX7-D2V-UUrU.js.gz +0 -0
  600. package/dist/web/assets/wardleyDiagram-T6FBY63Y-BrvOdgtd.js.br +0 -0
  601. package/dist/web/assets/wardleyDiagram-T6FBY63Y-BrvOdgtd.js.gz +0 -0
  602. package/dist/web/assets/workbench-inspector-changes-B4aWIRfS.js +0 -2
  603. package/dist/web/assets/workbench-inspector-changes-B4aWIRfS.js.br +0 -0
  604. package/dist/web/assets/workbench-inspector-changes-B4aWIRfS.js.gz +0 -0
  605. package/dist/web/assets/workbench-pet-canvas-Cn4RQA28.js.br +0 -0
  606. package/dist/web/assets/workbench-pet-canvas-Cn4RQA28.js.gz +0 -0
  607. package/dist/web/assets/workbench-shell-CfrE67rt.js +0 -16
  608. package/dist/web/assets/workbench-shell-CfrE67rt.js.br +0 -0
  609. package/dist/web/assets/workbench-shell-CfrE67rt.js.gz +0 -0
  610. package/dist/web/assets/xychartDiagram-ELKLHX3M-BCQllPKr.js.br +0 -0
  611. package/dist/web/assets/xychartDiagram-ELKLHX3M-BCQllPKr.js.gz +0 -0
  612. /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~7hgfnn0i-ClgveiMa.js → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~5gghezpc-ClgveiMa.js} +0 -0
  613. /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~7hgfnn0i-ClgveiMa.js.br → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~5gghezpc-ClgveiMa.js.br} +0 -0
  614. /package/dist/web/assets/{scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~7hgfnn0i-ClgveiMa.js.gz → scheduled-task-floating-ui~index~workbench-shell~workbench-inspector-changes~git-history-pa~5gghezpc-ClgveiMa.js.gz} +0 -0
@@ -1 +1 @@
1
- import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t,r as n,t as r}from"./react-runtime-CMZHB3u8.js";import{a as i,o as a}from"./initial-deps-CG4ykI_P.js";import{n as o,t as s}from"./initial-deps-D0opk7c-.js";import{d as c}from"./initial-deps-wXx8Atmt.js";var l=e(t(),1),u=typeof window<`u`?l.useLayoutEffect:l.useEffect;function d(e){let t=l.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function f(e,t,n={},r={}){l.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function p(e){let t=l.useRef(null);return l.useImperativeHandle(e,()=>t.current,[]),t}function m(e){return e[e.length-1]}function h(e){return typeof e==`function`}function g(e,t){return h(e)?e(t):e}var _=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;function y(e){for(let t in e)if(_.call(e,t))return!0;return!1}var b=()=>Object.create(null),x=(e,t)=>S(e,t,b);function S(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=E(e)&&E(i);if(!a&&!(w(e)&&w(i)))return i;let o=a?e:C(e);if(!o)return i;let s=a?i:C(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:_.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=S(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function C(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!v.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!v.call(e,t))return!1;r.push(t)}return r}function w(e){if(!T(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!T(n)||!n.hasOwnProperty(`isPrototypeOf`))}function T(e){return Object.prototype.toString.call(e)===`[object Object]`}function E(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function D(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!D(e[r],t[r],n))return!1;return!0}if(w(e)&&w(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!D(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!D(e[o],t[o],n)))return!1;return i===a}return!1}function O(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function k(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var ee=/[\x00-\x1f\x7f"<>`{}]/g;function te(e){return e.replace(ee,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function ne(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return te(t)}var re=[`http:`,`https:`,`mailto:`,`tel:`];function ie(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ae(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=ne(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=ne(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function oe(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function se(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function A(){throw Error(`Invariant failed`)}function ce(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var j=4,le=5;function ue(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function de(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ue(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function M(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=de(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=F(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=F(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=fe(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=fe(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=fe(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=F(n.fullPath??n.from);e.kind=le,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=F(n.fullPath??n.from);e.kind=j,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)M(e,t,r,s,i,a,o)}function N(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;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 P(e){if(e.pathless)for(let t of e.pathless)P(t);if(e.static)for(let t of e.static.values())P(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())P(t);if(e.dynamic?.length){e.dynamic.sort(N);for(let t of e.dynamic)P(t)}if(e.optional?.length){e.optional.sort(N);for(let t of e.optional)P(t)}if(e.wildcard?.length){e.wildcard.sort(N);for(let t of e.wildcard)P(t)}}function F(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,priority:0}}function fe(e,t,n,r,i){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,priority:0,caseSensitive:n,prefix:r,suffix:i}}function pe(e,t){let n=F(`/`),r=new Uint16Array(6);for(let t of e)M(!1,r,t,1,n,0);P(n),t.masksTree=n,t.flatCache=ce(1e3)}function me(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ye(e,t.masksTree);return t.flatCache.set(e,r),r}function he(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=F(`/`),M(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ye(r,o,n)}function ge(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ye(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=xe(a.route)),t.matchCache.set(r,a),a}function _e(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ve(e,t=!1,n){let r=F(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return M(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&A(),a[e.id]=e,s!==0&&e.path){let t=_e(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),P(r),{processedTree:{segmentTree:r,singleCache:ce(1e3),matchCache:ce(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ye(e,t,n=!1){let r=e.split(`/`),i=Ce(e,r,t,n);if(!i)return null;let[a]=be(e,r,i);return{route:i.node.route,rawParams:a}}function be(e,t,n){let r=Se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===j)break;if(u.kind===le){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function xe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!m(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!Te(l,n))continue;if(i.parse){if(!L(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==j&&Te(c,n)&&(c=n);let v=u===o;if(v&&(i.route&&(!a||i.kind===j||i.kind===2)&&Te(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[u],b;if(v&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(L(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&we(p,o))return n;Te(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!v&&(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)){if(a){if(v)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+I(o,u),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+I(o,u),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+I(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+I(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function I(e,t){return 2**(e-t-1)}function we(e,t){return e===2**(t-1)-1}function L(e,t,n){let r,i;try{[r,i]=be(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Te(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===j)>(e.node.kind===j)||t.node.kind===j==(e.node.kind===j)&&t.depth>e.depth)))}function Ee(e){return De(e.filter(e=>e!==void 0).join(`/`))}function De(e){return e.replace(/\/{2,}/g,`/`)}function Oe(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function ke(e){return R(Oe(e))}function Ae(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function je(e,t,n){return Ae(e,n)===Ae(t,n)}function Me({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&m(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(m(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=De(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function Ne(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Pe(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ie(e,n)).join(`/`):Ie(r,n):r}function Fe({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=de(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Pe(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Pe(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Pe(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ie(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function z(e){return e?.isNotFound===!0}function Le(){try{return sessionStorage}catch{return}}var Re=`tsr-scroll-restoration-v1_3`,ze=Le();function Be(){try{return JSON.parse(ze?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ve(){try{ze?.setItem(Re,JSON.stringify(He))}catch{}}var He=Be(),Ue=`data-scroll-restoration-id`,We=e=>e.state.__TSR_key||e.href;function Ge(e){let t=e.getAttribute(Ue);if(t)return`[${Ue}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Ke=!1,qe=`window`;function Je(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ye(e){let t=new Set;for(let n of e){if(n===qe)continue;let e=Je(n);e&&t.add(e)}return t}function Xe(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||We,a=new Set,o=e=>{let t=He[e]||={};for(let e of a)e===document?t[qe]={scrollX,scrollY}:e.isConnected&&(t[Ge(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Ke=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Ke||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ve()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=He[d];if(e){let t=He[u];for(let n in e){if(n===qe){if(s)continue}else{let e=Je(n);if(!e||s&&o&&(l??=Ye(o),l.has(e)))continue}t||=He[u]={},t[n]??=e[n]}}}Ke=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ye(o));let t=e&&i&&c,s=r.restoring?He[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===qe){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Je(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Ke=!1}}))}function Ze(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Qe(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function $e(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Qe(r):Array.isArray(t)?t.push(Qe(r)):n[e]=[t,Qe(r)]}return n}var et=nt(JSON.parse),tt=rt(JSON.stringify,JSON.parse);function nt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=$e(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function rt(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Ze(e,r);return t?`?${t}`:``}}var it=`__root__`;function at(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{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function B(e){return e instanceof Response&&!!e.options}function ot(e){return{input:({url:t})=>{for(let n of e)t=ct(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=lt(e[n],t);return t}}}function st(e){let t=ke(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Ee([`/`,t,e.pathname]),e)}}function ct(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function lt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ut(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>dt(o,_.get())),x=r(()=>dt(s,v.get())),S=r(()=>dt(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=ce(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let k={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:O,setMatches:ee,setPending:te,setCached:ne};ee(e.matches),a?.(k);function ee(e){ft(e,o,_,n,i)}function te(e){ft(e,s,v,n,i)}function ne(e){ft(e,c,y,n,i)}return k}function dt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function ft(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}se(n.get(),a)||n.set(a)})}var pt=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},mt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),ht=(e,t)=>!(!e.preload||e.router.stores.matchStores.has(t)),V=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},gt=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},H=(e,t,n)=>{if(B(n)||z(n))throw B(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:B(n)?`redirected`:z(n)?`notFound`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),z(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),B(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},_t=(e,t)=>{let n=e.router.getMatch(t);return!(n&&!n._nonReactive.dehydrated)},vt=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},yt=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,H(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,H(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!B(n)&&!z(n)&&(e.serialError??=n)},bt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ht(e,t)&&(n.options.loader||n.options.beforeLoad||jt(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{pt(e)},i);r._nonReactive.pendingTimeout=t}},xt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;bt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},St=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=O(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&yt(e,n,o),s&&yt(e,n,s),bt(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=O();let f={...V(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=ht(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(B(r)||z(r))&&(u(),yt(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),k(y))return u(),y.catch(t=>{yt(e,n,t)}).then(v)}catch(t){u(),yt(e,n,t)}v(y)},Ct=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>St(e,n,t,i),s=()=>{if(_t(e,n))return;let t=xt(e,n,i);return k(t)?t.then(o):o()};return a()},wt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Tt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=ht(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Et=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{At(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Tt(e,t,n,r,i)),l=!!s&&k(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,z(t)&&await i.options.notFoundComponent?.preload?.(),H(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,H(e,e.router.getMatch(n),t)}!B(o)&&!z(o)&&await At(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},Dt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Tt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Et(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){B(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Et(e,t,i,n,d):vt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(_t(e,i)){if(!e.router.getMatch(i))return e.matches[n];vt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=ht(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&H(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=O(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Ot(e){let t=e,n=[];mt(t.router)&&pt(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Ct(t,e);k(n)&&await n}catch(e){if(B(e))throw e;if(z(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?gt(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Dt(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(B(e))throw e;z(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=gt(t,l);e===void 0&&A();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await At(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await At(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=wt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=pt(t);if(k(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function kt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function At(e,t=Mt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===Mt?(()=>{if(e._componentsPromise===void 0){let t=kt(e,Mt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():kt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function jt(e){for(let t of Mt)if(e.options[t]?.preload)return!0;return!1}var Mt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Nt(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Pt=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,a=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Ne(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:i()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ce(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ut(Lt(this.latestLocation),e),Xe(this)}let o=!1,s=this.options.basepath??`/`,c=this.options.rewrite;if(r||n!==s||a!==c){this.basepath=s;let e=[],t=ke(s);t&&t!==`/`&&e.push(st({basepath:s})),c&&e.push(c),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ot(e),this.history&&this.updateLatestLocation(),o=!0}o&&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=()=>{let e=ve(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&pe(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ae(e).path,external:!1,searchStr:o,search:x(t?.search,i),hash:ae(r.slice(1)).path,state:S(t?.state,a)}}let o=new URL(i,this.origin),s=ct(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ae(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:x(t?.search,c),hash:ae(s.hash.slice(1)).path,state:S(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Me({base:e,to:t.includes(`//`)?De(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>zt({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,g(t.params,s)),d=this.routesByPath[R(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&y(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:ae(Fe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Rt(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=Bt({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=x(o,m);let h=this.options.stringifySearch(m),_=t.hash===!0?n.hash:t.hash?g(t.hash,n.hash):void 0,v=_?`#${_}`:``,b=t.state===!0?n.state:t.state?g(t.state,n.state):{};b=S(n.state,b);let C=`${p}${h}${v}`,w,T,E=!1;if(this.rewrite){let e=new URL(C,this.origin),t=lt(this.rewrite,e);w=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else w=oe(C),T=w;return{publicHref:T,href:w,pathname:p,search:m,searchStr:h,state:b,hash:_??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=me(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,g(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=D(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=R(this.latestLocation.href)===R(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=O(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:o,...s}={})=>{if(o){let t=this.history.location.state.__TSR_index,n=a(o,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);s.to=ct(this.rewrite,r).pathname,s.search=this.options.parseSearch(n.search),s.hash=n.hash.slice(1)}let c=this.buildLocation({...s,_includeValidateSearch:!0});this.pendingBuiltLocation=c;let l=this.commitLocation({...c,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this.pendingBuiltLocation===c&&(this.pendingBuiltLocation=void 0)}),l},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ie(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.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(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t&&(this._scroll.hash=t===`PUSH`||t===`REPLACE`);let n=this.latestLocation,r=Nt(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Ot({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){B(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):z(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Nt(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&ie(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??3e5;return t.status===`error`||e-t.updatedAt>=r}})},this.loadRouteChunk=At,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Ot({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(B(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});z(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=he(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!D(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?D(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.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??tt,parseSearch:e.parseSearch??et,protocolAllowlist:e.protocolAllowlist??re}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=xe(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){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:R(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Ht(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=Rt(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof Ft||(r=new Ft(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:g}=Fe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),_=r.id+h+m,v=this.getMatch(_),y=l.get(r.id),b=v?._strictParams??g,C;if(!v)try{Ut(r,b)}catch(e){if(C=z(e)||B(e)?e:new It(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,b);let w=y?`stay`:`enter`,T;if(v)T={...v,cause:w,params:y?.params??i,_strictParams:b,search:x(y?y.search:v.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||jt(r)?`pending`:`success`;T={id:_,ssr:r.options.ssr,index:n,routeId:r.id,params:y?.params??i,_strictParams:b,pathname:h,updatedAt:Date.now(),search:y?x(y.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:O()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:y?S(y.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(T.globalNotFound=s===r.id),T.searchError=f;let E=this.getParentContext(o);T.context={...E,...T.__routeContext,...T.__beforeLoadContext},c[n]=T}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?x(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let t=m(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];let{matchedRoutes:r,routeParams:i}=this.getMatchedRoutes(e.pathname),a=m(r),o={...e.search};for(let e of r)try{Object.assign(o,Rt(e.options.validateSearch,o))}catch{}let s=t&&this.stores.matchStores.get(t)?.get(),c=s&&s.routeId===a.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),i);for(let t of r)try{Ut(t,e)}catch{}l=e}let u={matchedRoutes:r,fullPath:a.fullPath,search:o,params:l};return this.lightweightCache.set(e,[t,u]),u}},Ft=class extends Error{},It=class extends Error{};function Lt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Rt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Ft(`Async validation not supported`);if(n.issues)throw new Ft(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function zt({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=R(e),a,o=ge(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Bt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Vt(n)(e,t,r??!1)}function Vt(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=Rt(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=g(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Ht(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return it}function Ut(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var Wt=`Error preloading route! ☝️`,Gt=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=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=it:this.parentRoute||A();let r=n?it:t?.path;r&&r!==`/`&&(r=Oe(r));let i=t?.id||r,a=n?it:Ee([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ee([`/`,a]));let o=a===`__root__`?`/`:Ee([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>at({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Kt=class extends Gt{constructor(e){super(e)}},qt=e(n(),1),U=r();function Jt(e){let t=e.errorComponent??Xt;return(0,U.jsx)(Yt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?l.createElement(t,{error:n,reset:r}):e.children})}var Yt=class extends l.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Xt({error:e}){let[t,n]=l.useState(!1);return(0,U.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,U.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,U.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,U.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,U.jsx)(`div`,{children:(0,U.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,U.jsx)(`code`,{children:e.message}):null})}):null]})}function Zt({children:e,fallback:t=null}){return Qt()?(0,U.jsx)(l.Fragment,{children:e}):(0,U.jsx)(l.Fragment,{children:t})}function Qt(){return l.useSyncExternalStore($t,()=>!0,()=>!1)}function $t(){return()=>{}}var en=l.createContext(null);function W(e){return l.useContext(en)}var tn=l.createContext(void 0),nn=l.createContext(void 0),rn=c();function an(e,t){return e===t}function G(e,t,n=an){let r=(0,l.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,l.useCallback)(()=>e?.get(),[e]);return(0,rn.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var on={get(){},subscribe(){return{unsubscribe(){}}}};function sn(e,t){let n=l.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=S(n.current,i):i}}function K(e){let t=W(),n=l.useContext(e.from?nn:tn),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=sn(e,t),a=G(r??on,e=>e?i(e):on);if(a!==on)return a;(e.shouldThrow??!0)&&A()}function cn(e){return K({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ln(e){let{select:t,...n}=e;return K({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function un(e){return K({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function dn(e){return K({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fn(e){let t=W();return l.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function pn(e){return K({...e,select:t=>e.select?e.select(t.context):t.context})}function mn(e,t){let n=W(),r=p(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:m,replace:h,startTransition:_,resetScroll:v,viewTransition:y,children:b,target:x,disabled:S,style:C,className:w,onClick:T,onBlur:E,onFocus:O,onMouseEnter:k,onMouseLeave:ee,onTouchStart:te,ignoreBlocker:ne,params:re,search:ae,hash:oe,state:se,mask:A,reloadDocument:ce,unsafeRelative:j,from:le,_fromLocation:ue,...de}=e,M=Qt(),N=l.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),P=G(n.stores.location,e=>e,(e,t)=>e.href===t.href),F=l.useMemo(()=>{let e={_fromLocation:P,...N};return n.buildLocation(e)},[n,P,N]),fe=F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,pe=F.maskedLocation?F.maskedLocation.external:F.external,me=l.useMemo(()=>Cn(fe,pe,n.history,S),[S,pe,fe,n.history]),he=l.useMemo(()=>{if(me?.external)return ie(me.href,n.protocolAllowlist)?void 0:me.href;if(!wn(s)&&typeof s==`string`&&s.indexOf(`:`)!==-1)try{return new URL(s),ie(s,n.protocolAllowlist)?void 0:s}catch{}},[s,me,n.protocolAllowlist]),ge=l.useMemo(()=>{if(he)return!1;if(o?.exact){if(!je(P.pathname,F.pathname,n.basepath))return!1}else{let e=Ae(P.pathname,n.basepath),t=Ae(F.pathname,n.basepath);if(!e.startsWith(t)||e.length!==t.length&&e[t.length]!==`/`)return!1}return(o?.includeSearch??!0)&&!D(P.search,F.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:!o?.includeHash||M&&P.hash===F.hash},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,P,he,M,F.hash,F.pathname,F.search,n.basepath]),_e=ge?g(i,{})??gn:hn,ve=ge?hn:g(a,{})??hn,ye=[w,_e.className,ve.className].filter(Boolean).join(` `),be=(C||_e.style||ve.style)&&{...C,..._e.style,...ve.style},[xe,Se]=l.useState(!1),Ce=l.useRef(!1),I=e.reloadDocument||he?!1:c??n.options.defaultPreload,we=u??n.options.defaultPreloadDelay??0,L=l.useCallback(()=>{n.preloadRoute({...N,_builtLocation:F}).catch(e=>{console.warn(e),console.warn(Wt)})},[n,N,F]);f(r,l.useCallback(e=>{e?.isIntersecting&&L()},[L]),xn,{disabled:!!S||I!==`viewport`}),l.useEffect(()=>{Ce.current||!S&&I===`render`&&(L(),Ce.current=!0)},[S,L,I]);let Te=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;if(!S&&!En(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,qt.flushSync)(()=>{Se(!0)});let t=n.subscribe(`onResolved`,()=>{t(),Se(!1)});n.navigate({...N,replace:h,resetScroll:v,hashScrollIntoView:m,startTransition:_,viewTransition:y,ignoreBlocker:ne})}};if(he)return{...de,ref:r,href:he,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...C&&{style:C},...w&&{className:w},...T&&{onClick:T},...E&&{onBlur:E},...O&&{onFocus:O},...k&&{onMouseEnter:k},...ee&&{onMouseLeave:ee},...te&&{onTouchStart:te}};let Ee=e=>{if(S||I!==`intent`)return;if(!we){L();return}let t=e.currentTarget;if(bn.has(t))return;let n=setTimeout(()=>{bn.delete(t),L()},we);bn.set(t,n)},De=e=>{S||I!==`intent`||L()},Oe=e=>{if(S||!I||!we)return;let t=e.currentTarget,n=bn.get(t);n&&(clearTimeout(n),bn.delete(t))};return{...de,..._e,...ve,href:me?.href,ref:r,onClick:Sn([T,Te]),onBlur:Sn([E,Oe]),onFocus:Sn([O,Ee]),onMouseEnter:Sn([k,Ee]),onMouseLeave:Sn([ee,Oe]),onTouchStart:Sn([te,De]),disabled:!!S,target:x,...be&&{style:be},...ye&&{className:ye},...S&&_n,...ge&&vn,...M&&xe&&yn}}var hn={},gn={className:`active`},_n={role:`link`,"aria-disabled":!0},vn={"data-status":`active`,"aria-current":`page`},yn={"data-transitioning":`transitioning`},bn=new WeakMap,xn={rootMargin:`100px`},Sn=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Cn(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function wn(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Tn=l.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=mn(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return l.createElement(`a`,t,o)}return l.createElement(n,a,o)});function En(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Dn=class extends Gt{constructor(e){super(e),this.useMatch=e=>K({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>pn({...e,from:this.id}),this.useSearch=e=>dn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>un({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ln({...e,from:this.id}),this.useLoaderData=e=>cn({...e,from:this.id}),this.useNavigate=()=>fn({from:this.fullPath}),this.Link=l.forwardRef((e,t)=>(0,U.jsx)(Tn,{ref:t,from:this.fullPath,...e}))}};function On(e){return new Dn(e)}var kn=class extends Kt{constructor(e){super(e),this.useMatch=e=>K({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>pn({...e,from:this.id}),this.useSearch=e=>dn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>un({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ln({...e,from:this.id}),this.useLoaderData=e=>cn({...e,from:this.id}),this.useNavigate=()=>fn({from:this.fullPath}),this.Link=l.forwardRef((e,t)=>(0,U.jsx)(Tn,{ref:t,from:this.fullPath,...e}))}};function An(e){return new kn(e)}function jn(e){let t=W(),n=`not-found-${G(t.stores.location,e=>e.pathname)}-${G(t.stores.status,e=>e)}`;return(0,U.jsx)(Jt,{getResetKey:()=>n,onCatch:(t,n)=>{if(z(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(z(t))return e.fallback?.(t);throw t},children:e.children})}function Mn(){return(0,U.jsx)(`p`,{children:`Not Found`})}function Nn(e){return(0,U.jsx)(U.Fragment,{children:e.children})}function Pn(e,t,n){return t.options.notFoundComponent?(0,U.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,U.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,U.jsx)(Mn,{})}var Fn=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,In=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ln=l.memo(function({matchId:e}){let t=W(),n=t.stores.matchStores.get(e);n||A();let r=G(t.stores.loadedAt,e=>e),i=G(n,e=>e,Fn);return(0,U.jsx)(Rn,{router:t,matchId:e,resetKey:r,matchState:l.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Rn({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,U.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||d))?l.Suspense:Nn,p=s?Jt:Nn,m=u?jn:Nn;return(0,U.jsxs)(i.isRoot?i.options.shellComponent??Nn:Nn,{children:[(0,U.jsx)(tn.Provider,{value:t,children:(0,U.jsx)(f,{fallback:o,children:(0,U.jsx)(p,{getResetKey:()=>n,errorComponent:s||Xt,onCatch:(e,t)=>{if(z(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,U.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return l.createElement(u,e)},children:d||r._displayPending?(0,U.jsx)(Zt,{fallback:o,children:(0,U.jsx)(Bn,{matchId:t})}):(0,U.jsx)(Bn,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(zn,{}),(e.options.scrollRestoration,null)]}):null]})}function zn(){let e=W(),t=l.useRef();return u(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Nt(e.stores.location.get(),r??n)}),t.current=n},[G(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Bn=l.memo(function({matchId:e}){let t=W(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||A();let i=G(r,e=>e),a=i.routeId,o=t.routesById[a],s=l.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=l.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,U.jsx)(e,{},s):(0,U.jsx)(Vn,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=O();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return z(i.error)||A(),Pn(t,o,i.error);if(i.status===`redirected`)throw B(i.error)||A(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Vn=l.memo(function(){let e=W(),t=l.useContext(tn),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=G(a,e=>[e?.routeId,e?.globalNotFound??!1],In),i=G(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,U.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||A(),Pn(e,a,void 0);if(!i)return null;let s=(0,U.jsx)(Ln,{matchId:i});return n===`__root__`?(0,U.jsx)(l.Suspense,{fallback:o,children:s}):s});function Hn(){let e=W(),t=l.useRef({router:e,mounted:!1}),[n,r]=l.useState(!1),i=G(e.stores.isLoading,e=>e),a=G(e.stores.hasPending,e=>e),o=d(i),c=i||n||a,f=d(c),p=i||a,m=d(p);return e.startTransition=e=>{r(!0),l.startTransition(()=>{e(),r(!1)})},l.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return R(e.latestLocation.publicHref)!==R(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),u(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),u(()=>{o&&!i&&e.emit({type:`onLoad`,...Nt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),u(()=>{m&&!p&&e.emit({type:`onBeforeRouteMount`,...Nt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[p,m,e]),u(()=>{if(f&&!c){let t=Nt(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),s(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[c,f,e]),null}function Un(){let e=W(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,U.jsx)(t,{}):null,r=(0,U.jsxs)(typeof document<`u`&&e.ssr?Nn:l.Suspense,{fallback:n,children:[(0,U.jsx)(Hn,{}),(0,U.jsx)(Wn,{})]});return e.options.InnerWrap?(0,U.jsx)(e.options.InnerWrap,{children:r}):r}function Wn(){let e=W(),t=G(e.stores.firstId,e=>e),n=G(e.stores.loadedAt,e=>e),r=t?(0,U.jsx)(Ln,{matchId:t}):null;return(0,U.jsx)(tn.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,U.jsx)(Jt,{getResetKey:()=>n,errorComponent:Xt,onCatch:void 0,children:r})})}var Gn=e=>({createMutableStore:o,createReadonlyStore:o,batch:s}),Kn=e=>new qn(e),qn=class extends Pt{constructor(e){super(e,Gn)}};function Jn({router:e,children:t,...n}){y(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,U.jsx)(en.Provider,{value:e,children:t});return e.options.Wrap?(0,U.jsx)(e.options.Wrap,{children:r}):r}function Yn({router:e,...t}){return(0,U.jsx)(Jn,{router:e,...t,children:(0,U.jsx)(Un,{})})}function Xn(e){let t=W({warn:e?.router===void 0}),n=e?.router||t;return G(n.stores.__store,sn(e,n))}function Zn(e){let t=W();return G(t.stores.location,sn(e,t))}var q=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(){}},Qn=new class extends q{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$n={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},J=new class{#e=$n;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)}};function er(e){setTimeout(e,0)}var tr=typeof window>`u`||`Deno`in globalThis;function Y(){}function nr(e,t){return typeof e==`function`?e(t):e}function rr(e){return typeof e==`number`&&e>=0&&e!==1/0}function ir(e,t){return Math.max(e+(t||0)-Date.now(),0)}function X(e,t){return typeof e==`function`?e(t):e}function Z(e,t){return typeof e==`function`?e(t):e}function ar(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==sr(o,t.options))return!1}else if(!cr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function or(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Q(t.options.mutationKey)!==Q(a))return!1}else if(!cr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function sr(e,t){return(t?.queryKeyHashFn||Q)(e)}function Q(e){return JSON.stringify(e,(e,t)=>pr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function cr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!cr(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!cr(e[r],t[r]))return!1;return!0}return!1}var lr=Object.prototype.hasOwnProperty;function ur(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=fr(e)&&fr(t);if(!r&&!(pr(e)&&pr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:lr.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ur(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function dr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function fr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function pr(e){if(!mr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!mr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function mr(e){return Object.prototype.toString.call(e)===`[object Object]`}function hr(e){return new Promise(t=>{J.setTimeout(t,e)})}function gr(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ur(e,t)}function _r(e){return e}function vr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function yr(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var br=Symbol();function xr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===br?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Sr(e,t){return typeof e==`function`?e(...t):!!e}function Cr(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var wr=(()=>{let e=()=>tr;return{isServer(){return e()},setIsServer(t){e=t}}})();function Tr(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Er=er;function Dr(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Er,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var $=Dr(),Or=new class extends q{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function kr(e){return Math.min(1e3*2**e,3e4)}function Ar(e){return(e??`online`)!==`online`||Or.isOnline()}var jr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Mr(e){let t=!1,n=0,r,i=Tr(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new jr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Qn.isFocused()&&(e.networkMode===`always`||Or.isOnline())&&e.canRun(),u=()=>Ar(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(wr.isServer()?0:3),o=e.retryDelay??kr,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),hr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Nr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rr(this.gcTime)&&(this.#e=J.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wr.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(J.clearTimeout(this.#e),this.#e=void 0)}};function Pr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Cr(e,()=>t.signal,()=>n=!0)},u=xr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?yr:vr;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ir:Fr,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Fr(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Fr(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Ir(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Lr(e,t){return t?Fr(e,t)!=null:!1}function Rr(e,t){return!t||!e.getPreviousPageParam?!1:Ir(e,t)!=null}var zr=class extends Nr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Hr(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.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Hr(this.options);e.data!==void 0&&(this.setState(Vr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=gr(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Y).catch(Y):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=>Z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===br||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>X(e.options.staleTime,this)===`static`)}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:!ir(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){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.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=xr(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Pr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Mr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof jr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof jr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Br(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Vr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),$.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Br(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ar(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Vr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Hr(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ur=class extends q{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Tr(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Gr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Kr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Kr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Z(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!dr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&qr(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||X(this.options.staleTime,this.#t)!==X(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Yr(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Y)),t}#g(){this.#b();let e=X(this.options.staleTime,this.#t);if(wr.isServer()||this.#r.isStale||!rr(e))return;let t=ir(this.#r.dataUpdatedAt,e)+1;this.#d=J.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!wr.isServer()&&Z(this.options.enabled,this.#t)!==!1&&rr(this.#p)&&this.#p!==0&&(this.#f=J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qn.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(J.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(J.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Gr(e,t),o=i&&qr(e,n,t,r);(a||o)&&(l={...l,...Br(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=gr(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=gr(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Jr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Z(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Tr();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!dr(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){$.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Wr(e,t){return Z(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Z(t.retryOnMount,e)!==!1)}function Gr(e,t){return Wr(e,t)||e.state.data!==void 0&&Kr(e,t,t.refetchOnMount)}function Kr(e,t,n){if(Z(t.enabled,e)!==!1&&X(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Jr(e,t)}return!1}function qr(e,t,n,r){return(e!==t||Z(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Jr(e,n)}function Jr(e,t){return Z(t.enabled,e)!==!1&&e.isStaleByTime(X(t.staleTime,e))}function Yr(e,t){return!dr(e.getCurrentResult(),t)}var Xr=class extends Ur{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Lr(t,n.data),hasPreviousPage:Rr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Zr=class extends Nr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Qr(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Mr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),$.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Qr(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var $r=class extends q{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Zr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ei(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=ei(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){$.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){let t={exact:!0,...e};return this.getAll().find(e=>or(t,e))}findAll(e={}){return this.getAll().filter(t=>or(e,t))}notify(e){$.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return $.batch(()=>Promise.all(e.map(e=>e.continue().catch(Y))))}};function ei(e){return e.options.scope?.id}var ti=class extends q{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),dr(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Q(t.mutationKey)!==Q(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Qr();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){$.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function ni(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ri(e,t,n){let r=e.slice(0);return r[t]=n,r}var ii=class extends q{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,$.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!dr(e,n)});(o||s)&&(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ni(e,n).forEach(e=>{e.destroy()}),ni(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=ur(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new Ur(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ri(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&$.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},ai=class extends q{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??sr(r,t),a=this.get(i);return a||(a=new zr({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){$.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ar(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ar(e,t)):t}notify(e){$.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){$.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){$.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},oi=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new ai,this.#t=e.mutationCache||new $r,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Qn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Or.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(X(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=nr(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return $.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;$.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return $.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=$.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Y).catch(Y)}invalidateQueries(e,t={}){return $.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=$.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Y)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Y)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(X(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Y).catch(Y)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Y).catch(Y)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Or.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{cr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{cr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=sr(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===br&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},si=l.createContext(void 0),ci=e=>{let t=l.useContext(si);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},li=({client:e,children:t})=>(l.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,U.jsx)(si.Provider,{value:e,children:t})),ui=l.createContext(!1),di=()=>l.useContext(ui);ui.Provider;function fi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pi=l.createContext(fi()),mi=()=>l.useContext(pi),hi=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Sr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},gi=e=>{l.useEffect(()=>{e.clearReset()},[e])},_i=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Sr(n,[e.error,r])),vi=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},yi=(e,t)=>e.isLoading&&e.isFetching&&!t,bi=(e,t)=>e?.suspense&&t.isPending,xi=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Si({queries:e,...t},n){let r=ci(n),i=di(),a=mi(),o=l.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{vi(e);let t=r.getQueryCache().get(e.queryHash);hi(e,a,t)}),gi(a);let[s]=l.useState(()=>new ii(r,o,t)),[c,u,d]=s.getOptimisticResult(o,t.combine),f=!i&&t.subscribed!==!1;l.useSyncExternalStore(l.useCallback(e=>f?s.subscribe($.batchCalls(e)):Y,[s,f]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let p=c.some((e,t)=>bi(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&bi(n,e)?xi(n,new Ur(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let m=c.find((e,t)=>{let n=o[t];return n&&_i({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(m?.error)throw m.error;return u(d())}function Ci(e,t,n){let r=di(),i=mi(),a=ci(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,vi(o),hi(o,i,s),gi(i);let u=!a.getQueryCache().get(o.queryHash),[d]=l.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&c;if(l.useSyncExternalStore(l.useCallback(e=>{let t=p?d.subscribe($.batchCalls(e)):Y;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),l.useEffect(()=>{d.setOptions(o)},[o,d]),bi(o,f))throw xi(o,d,i);if(_i({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!wr.isServer()&&yi(f,r)&&(u?xi(o,d,i):s?.promise)?.catch(Y).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function wi(e,t){return Ci(e,Ur,t)}function Ti(e){return e}function Ei(e){return e}function Di(e,t){let n=ci(t),[r]=l.useState(()=>new ti(n,e));l.useEffect(()=>{r.setOptions(e)},[r,e]);let i=l.useSyncExternalStore(l.useCallback(e=>r.subscribe($.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=l.useCallback((e,t)=>{r.mutate(e,t).catch(Y)},[r]);if(i.error&&Sr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function Oi(e){return e}function ki(e,t){return Ci(e,Xr,t)}export{Vn as _,Ti as a,Tn as b,li as c,$r as d,_r as f,Kn as g,Yn as h,Ei as i,ci as l,Xn as m,Oi as n,wi as o,Zn as p,Di as r,Si as s,ki as t,oi as u,An as v,fn as x,On as y};
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t,r as n,t as r}from"./react-runtime-CMZHB3u8.js";import{a as i,o as a}from"./initial-deps-CG4ykI_P.js";import{n as o,t as s}from"./initial-deps-D0opk7c-.js";import{d as c}from"./initial-deps-C0_XYRrC.js";var l=e(t(),1),u=typeof window<`u`?l.useLayoutEffect:l.useEffect;function d(e){let t=l.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function f(e,t,n={},r={}){l.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function p(e){let t=l.useRef(null);return l.useImperativeHandle(e,()=>t.current,[]),t}function m(e){return e[e.length-1]}function h(e){return typeof e==`function`}function g(e,t){return h(e)?e(t):e}var _=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;function y(e){for(let t in e)if(_.call(e,t))return!0;return!1}var b=()=>Object.create(null),x=(e,t)=>S(e,t,b);function S(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=E(e)&&E(i);if(!a&&!(w(e)&&w(i)))return i;let o=a?e:C(e);if(!o)return i;let s=a?i:C(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:_.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=S(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function C(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!v.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!v.call(e,t))return!1;r.push(t)}return r}function w(e){if(!T(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!T(n)||!n.hasOwnProperty(`isPrototypeOf`))}function T(e){return Object.prototype.toString.call(e)===`[object Object]`}function E(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function D(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!D(e[r],t[r],n))return!1;return!0}if(w(e)&&w(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!D(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!D(e[o],t[o],n)))return!1;return i===a}return!1}function O(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function k(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var ee=/[\x00-\x1f\x7f"<>`{}]/g;function te(e){return e.replace(ee,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function ne(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return te(t)}var re=[`http:`,`https:`,`mailto:`,`tel:`];function ie(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ae(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=ne(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=ne(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function oe(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function se(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function A(){throw Error(`Invariant failed`)}function ce(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var j=4,le=5;function ue(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function de(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ue(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function M(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=de(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=F(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=F(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=fe(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=fe(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=fe(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=F(n.fullPath??n.from);e.kind=le,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=F(n.fullPath??n.from);e.kind=j,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)M(e,t,r,s,i,a,o)}function N(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;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 P(e){if(e.pathless)for(let t of e.pathless)P(t);if(e.static)for(let t of e.static.values())P(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())P(t);if(e.dynamic?.length){e.dynamic.sort(N);for(let t of e.dynamic)P(t)}if(e.optional?.length){e.optional.sort(N);for(let t of e.optional)P(t)}if(e.wildcard?.length){e.wildcard.sort(N);for(let t of e.wildcard)P(t)}}function F(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,priority:0}}function fe(e,t,n,r,i){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,priority:0,caseSensitive:n,prefix:r,suffix:i}}function pe(e,t){let n=F(`/`),r=new Uint16Array(6);for(let t of e)M(!1,r,t,1,n,0);P(n),t.masksTree=n,t.flatCache=ce(1e3)}function me(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=ye(e,t.masksTree);return t.flatCache.set(e,r),r}function he(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=F(`/`),M(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ye(r,o,n)}function ge(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=ye(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=xe(a.route)),t.matchCache.set(r,a),a}function _e(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ve(e,t=!1,n){let r=F(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return M(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&A(),a[e.id]=e,s!==0&&e.path){let t=_e(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),P(r),{processedTree:{segmentTree:r,singleCache:ce(1e3),matchCache:ce(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function ye(e,t,n=!1){let r=e.split(`/`),i=Ce(e,r,t,n);if(!i)return null;let[a]=be(e,r,i);return{route:i.node.route,rawParams:a}}function be(e,t,n){let r=Se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===j)break;if(u.kind===le){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function xe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!m(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!Te(l,n))continue;if(i.parse){if(!L(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==j&&Te(c,n)&&(c=n);let v=u===o;if(v&&(i.route&&(!a||i.kind===j||i.kind===2)&&Te(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[u],b;if(v&&i.index){let n={node:i.index,index:u,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;if(i.index.parse&&(L(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&we(p,o))return n;Te(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!v&&(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)){if(a){if(v)continue;let e=t.slice(u).join(`/`).slice(-a.length);if((n.caseSensitive?e:e.toLowerCase())!==a)continue}s.push({node:n,index:o,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];s.push({node:r,index:u,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:a}=n;if(r||a){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||a&&!e.endsWith(a))continue}s.push({node:n,index:u+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+I(o,u),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}s.push({node:t,index:u+1,skipped:d,depth:f+1,statics:p,dynamics:m+I(o,u),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+I(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&s.push({node:e,index:u+1,skipped:d,depth:f+1,statics:p+I(o,u),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];s.push({node:n,index:u,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function I(e,t){return 2**(e-t-1)}function we(e,t){return e===2**(t-1)-1}function L(e,t,n){let r,i;try{[r,i]=be(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Te(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===j)>(e.node.kind===j)||t.node.kind===j==(e.node.kind===j)&&t.depth>e.depth)))}function Ee(e){return De(e.filter(e=>e!==void 0).join(`/`))}function De(e){return e.replace(/\/{2,}/g,`/`)}function Oe(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function R(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function ke(e){return R(Oe(e))}function Ae(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function je(e,t,n){return Ae(e,n)===Ae(t,n)}function Me({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),a=!i&&t===`.`,o;if(r){o=i?t:a?e:e+`\0`+t;let n=r.get(o);if(n)return n}let s;if(a)s=e.split(`/`);else if(i)s=t.split(`/`);else{for(s=e.split(`/`);s.length>1&&m(s)===``;)s.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&s.push(r):s=[r]:r===`..`?s.pop():r===`.`||s.push(r)}}s.length>1&&(m(s)===``?n===`never`&&s.pop():n===`always`&&s.push(``));let c=De(s.join(`/`))||`/`;return o&&r&&r.set(o,c),c}function Ne(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Pe(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ie(e,n)).join(`/`):Ie(r,n):r}function Fe({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=de(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Pe(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Pe(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Pe(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Ie(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function z(e){return e?.isNotFound===!0}function Le(){try{return sessionStorage}catch{return}}var Re=`tsr-scroll-restoration-v1_3`,ze=Le();function Be(){try{return JSON.parse(ze?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ve(){try{ze?.setItem(Re,JSON.stringify(He))}catch{}}var He=Be(),Ue=`data-scroll-restoration-id`,We=e=>e.state.__TSR_key||e.href;function Ge(e){let t=e.getAttribute(Ue);if(t)return`[${Ue}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Ke=!1,qe=`window`;function Je(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Ye(e){let t=new Set;for(let n of e){if(n===qe)continue;let e=Je(n);e&&t.add(e)}return t}function Xe(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||We,a=new Set,o=e=>{let t=He[e]||={};for(let e of a)e===document?t[qe]={scrollX,scrollY}:e.isConnected&&(t[Ge(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Ke=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Ke||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ve()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=He[d];if(e){let t=He[u];for(let n in e){if(n===qe){if(s)continue}else{let e=Je(n);if(!e||s&&o&&(l??=Ye(o),l.has(e)))continue}t||=He[u]={},t[n]??=e[n]}}}Ke=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Ye(o));let t=e&&i&&c,s=r.restoring?He[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===qe){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Je(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Ke=!1}}))}function Ze(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function Qe(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function $e(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Qe(r):Array.isArray(t)?t.push(Qe(r)):n[e]=[t,Qe(r)]}return n}var et=nt(JSON.parse),tt=rt(JSON.stringify,JSON.parse);function nt(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=$e(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function rt(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Ze(e,r);return t?`?${t}`:``}}var it=`__root__`;function at(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{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function B(e){return e instanceof Response&&!!e.options}function ot(e){return{input:({url:t})=>{for(let n of e)t=ct(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=lt(e[n],t);return t}}}function st(e){let t=ke(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Ee([`/`,t,e.pathname]),e)}}function ct(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function lt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ut(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),h=n(e.statusCode),g=n(e.redirect),_=n([]),v=n([]),y=n([]),b=r(()=>dt(o,_.get())),x=r(()=>dt(s,v.get())),S=r(()=>dt(c,y.get())),C=r(()=>_.get()[0]),w=r(()=>_.get().some(e=>o.get(e)?.get().status===`pending`)),T=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),E=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:b.get(),location:p.get(),resolvedLocation:m.get(),statusCode:h.get(),redirect:g.get()})),D=ce(64);function O(e){let t=D.get(e);return t||(t=r(()=>{let t=_.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),D.set(e,t)),t}let k={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:h,redirect:g,matchesId:_,pendingIds:v,cachedIds:y,matches:b,pendingMatches:x,cachedMatches:S,firstId:C,hasPending:w,matchRouteDeps:T,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:E,getRouteMatchStore:O,setMatches:ee,setPending:te,setCached:ne};ee(e.matches),a?.(k);function ee(e){ft(e,o,_,n,i)}function te(e){ft(e,s,v,n,i)}function ne(e){ft(e,c,y,n,i)}return k}function dt(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function ft(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}se(n.get(),a)||n.set(a)})}var pt=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},mt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),ht=(e,t)=>!(!e.preload||e.router.stores.matchStores.has(t)),V=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},gt=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},H=(e,t,n)=>{if(B(n)||z(n))throw B(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:B(n)?`redirected`:z(n)?`notFound`:r.status===`pending`?`success`:r.status,context:V(e,t.index),isFetching:!1,error:n})),z(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),B(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},_t=(e,t)=>{let n=e.router.getMatch(t);return!(n&&!n._nonReactive.dehydrated)},vt=(e,t,n)=>{let r=V(e,n);e.updateMatch(t,e=>({...e,context:r}))},yt=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,H(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,H(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!B(n)&&!z(n)&&(e.serialError??=n)},bt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ht(e,t)&&(n.options.loader||n.options.beforeLoad||jt(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{pt(e)},i);r._nonReactive.pendingTimeout=t}},xt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;bt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&H(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},St=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=O(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&yt(e,n,o),s&&yt(e,n,s),bt(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=O();let f={...V(e,n,!1),...i.__routeContext},{search:p,params:m,cause:h}=i,g=ht(e,t),_={search:p,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?`preload`:h,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},v=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(B(r)||z(r))&&(u(),yt(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},y;try{if(y=r.options.beforeLoad(_),k(y))return u(),y.catch(t=>{yt(e,n,t)}).then(v)}catch(t){u(),yt(e,n,t)}v(y)},Ct=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>St(e,n,t,i),s=()=>{if(_t(e,n))return;let t=xt(e,n,i);return k(t)?t.then(o):o()};return a()},wt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},Tt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=V(e,r),d=ht(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Et=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{At(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(Tt(e,t,n,r,i)),l=!!s&&k(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;H(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:V(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:V(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,z(t)&&await i.options.notFoundComponent?.preload?.(),H(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,H(e,e.router.getMatch(n),t)}!B(o)&&!z(o)&&await At(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:V(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),H(e,r,t)}},Dt=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(Tt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Et(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){B(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Et(e,t,i,n,d):vt(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(_t(e,i)){if(!e.router.getMatch(i))return e.matches[n];vt(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=ht(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&H(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=O(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Ot(e){let t=e,n=[];mt(t.router)&&pt(t);let r;for(let e=0;e<t.matches.length;e++){try{let n=Ct(t,e);k(n)&&await n}catch(e){if(B(e))throw e;if(z(e))r=e;else if(!t.preload)throw e;break}if(t.serialError||t.firstBadMatchIndex!=null)break}let i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?gt(t,r):void 0,o=r&&t.preload?0:a===void 0?i:Math.min(a+1,i),s,c;for(let e=0;e<o;e++)n.push(Dt(t,n,e));try{await Promise.all(n)}catch{let e=await Promise.allSettled(n);for(let t of e){if(t.status!==`rejected`)continue;let e=t.reason;if(B(e))throw e;z(e)?s??=e:c??=e}if(c!==void 0)throw c}let l=s??(r&&!t.preload?r:void 0),u=t.firstBadMatchIndex===void 0?t.matches.length-1:t.firstBadMatchIndex;if(!l&&r&&t.preload)return t.matches;if(l){let e=gt(t,l);e===void 0&&A();let n=t.matches[e],r=t.router.looseRoutesById[n.routeId],i=t.router.options?.defaultNotFoundComponent;!r.options.notFoundComponent&&i&&(r.options.notFoundComponent=i),l.routeId=n.routeId;let a=n.routeId===t.router.routeTree.id;t.updateMatch(n.id,e=>({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await At(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await At(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=wt(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=pt(t);if(k(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function kt(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function At(e,t=Mt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===Mt?(()=>{if(e._componentsPromise===void 0){let t=kt(e,Mt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():kt(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function jt(e){for(let t of Mt)if(e.options[t]?.preload)return!0;return!1}var Mt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`];function Nt(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Pt=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,a=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Ne(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:i()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ce(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ut(Lt(this.latestLocation),e),Xe(this)}let o=!1,s=this.options.basepath??`/`,c=this.options.rewrite;if(r||n!==s||a!==c){this.basepath=s;let e=[],t=ke(s);t&&t!==`/`&&e.push(st({basepath:s})),c&&e.push(c),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ot(e),this.history&&this.updateLatestLocation(),o=!0}o&&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=()=>{let e=ve(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&pe(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ae(e).path,external:!1,searchStr:o,search:x(t?.search,i),hash:ae(r.slice(1)).path,state:S(t?.state,a)}}let o=new URL(i,this.origin),s=ct(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ae(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:x(t?.search,c),hash:ae(s.hash.slice(1)).path,state:S(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Me({base:e,to:t.includes(`//`)?De(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>zt({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),c=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),l=a?this.resolvePathWithBase(c,a):c,u=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,g(t.params,s)),d=this.routesByPath[R(l)],f;if(d)f=this.getRouteBranch(d);else if(l.includes(`$`))f=[];else{let e=this.getMatchedRoutes(l);f=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(f=[...f,this.options.notFoundRoute])}if(f.length&&y(u))for(let e of f){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(u,t(u))}catch{}}let p=e.leaveParams?l:ae(Fe({path:l,params:u,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};f.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Rt(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=Bt({search:m,dest:t,destRoutes:f,_includeValidateSearch:e._includeValidateSearch}),m=x(o,m);let h=this.options.stringifySearch(m),_=t.hash===!0?n.hash:t.hash?g(t.hash,n.hash):void 0,v=_?`#${_}`:``,b=t.state===!0?n.state:t.state?g(t.state,n.state):{};b=S(n.state,b);let C=`${p}${h}${v}`,w,T,E=!1;if(this.rewrite){let e=new URL(C,this.origin),t=lt(this.rewrite,e);w=e.href.replace(e.origin,``),t.origin===this.origin?T=t.pathname+t.search+t.hash:(T=t.href,E=!0)}else w=oe(C),T=w;return{publicHref:T,href:w,pathname:p,search:m,searchStr:h,state:b,hash:_??``,external:E,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),a=r?t(r):void 0;if(!a){let n=Object.create(null);if(this.options.routeMasks){let o=me(i.pathname,this.processedTree);if(o){Object.assign(n,o.rawParams);let{from:i,params:s,...c}=o.route,l=s===!1||s===null?Object.create(null):(s??!0)===!0?n:Object.assign(n,g(s,n));r={from:e.from,...c,params:l},a=t(r)}}}return a&&(i.maskedLocation=a),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=D(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=R(this.latestLocation.href)===R(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=O(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:o,...s}={})=>{if(o){let t=this.history.location.state.__TSR_index,n=a(o,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);s.to=ct(this.rewrite,r).pathname,s.search=this.options.parseSearch(n.search),s.hash=n.hash.slice(1)}let c=this.buildLocation({...s,_includeValidateSearch:!0});this.pendingBuiltLocation=c;let l=this.commitLocation({...c,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this.pendingBuiltLocation===c&&(this.pendingBuiltLocation=void 0)}),l},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(ie(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.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(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t&&(this._scroll.hash=t===`PUSH`||t===`REPLACE`);let n=this.latestLocation,r=Nt(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Ot({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){B(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):z(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Nt(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&ie(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??3e5;return t.status===`error`||e-t.updatedAt>=r}})},this.loadRouteChunk=At,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Ot({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(B(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});z(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=he(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!D(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?D(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.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??tt,parseSearch:e.parseSearch??et,protocolAllowlist:e.protocolAllowlist??re}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=xe(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){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:R(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Ht(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;n<a.length;n++){let r=a[n],o=c[n-1],u,d,f;{let n=o?.search??e.search,i=o?._strictSearch??void 0;try{let e=Rt(r.options.validateSearch,{...n})??void 0;u={...n,...e},d={...i,...e},f=void 0}catch(e){let r=e;if(e instanceof Ft||(r=new Ft(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},f=r}}let p=r.options.loaderDeps?.({search:u})??``,m=p?JSON.stringify(p):``,{interpolatedPath:h,usedParams:g}=Fe({path:r.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),_=r.id+h+m,v=this.getMatch(_),y=l.get(r.id),b=v?._strictParams??g,C;if(!v)try{Ut(r,b)}catch(e){if(C=z(e)||B(e)?e:new It(e.message,{cause:e}),t?.throwOnError)throw C}Object.assign(i,b);let w=y?`stay`:`enter`,T;if(v)T={...v,cause:w,params:y?.params??i,_strictParams:b,search:x(y?y.search:v.search,u),_strictSearch:d};else{let e=r.options.loader||r.options.beforeLoad||r.lazyFn||jt(r)?`pending`:`success`;T={id:_,ssr:r.options.ssr,index:n,routeId:r.id,params:y?.params??i,_strictParams:b,pathname:h,updatedAt:Date.now(),search:y?x(y.search,u):u,_strictSearch:d,searchError:void 0,status:e,isFetching:!1,error:void 0,paramsError:C,__routeContext:void 0,_nonReactive:{loadPromise:O()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:w,loaderDeps:y?S(y.loaderDeps,p):p,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:r.options.staticData||{},fullPath:r.fullPath}}t?.preload||(T.globalNotFound=s===r.id),T.searchError=f;let E=this.getParentContext(o);T.context={...E,...T.__routeContext,...T.__beforeLoadContext},c[n]=T}for(let t=0;t<c.length;t++){let n=c[t],r=this.looseRoutesById[n.routeId],a=this.getMatch(n.id),o=l.get(n.routeId);if(n.params=o?x(o.params,i):i,!a){let i=c[t-1],a=this.getParentContext(i);if(r.options.context){let t={deps:n.loaderDeps,params:n.params,context:a??{},location:e,navigate:t=>this.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let t=m(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];let{matchedRoutes:r,routeParams:i}=this.getMatchedRoutes(e.pathname),a=m(r),o={...e.search};for(let e of r)try{Object.assign(o,Rt(e.options.validateSearch,o))}catch{}let s=t&&this.stores.matchStores.get(t)?.get(),c=s&&s.routeId===a.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),i);for(let t of r)try{Ut(t,e)}catch{}l=e}let u={matchedRoutes:r,fullPath:a.fullPath,search:o,params:l};return this.lightweightCache.set(e,[t,u]),u}},Ft=class extends Error{},It=class extends Error{};function Lt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Rt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Ft(`Async validation not supported`);if(n.issues)throw new Ft(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function zt({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=R(e),a,o=ge(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Bt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Vt(n)(e,t,r??!1)}function Vt(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=Rt(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=g(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Ht(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return it}function Ut(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var Wt=`Error preloading route! ☝️`,Gt=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=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=it:this.parentRoute||A();let r=n?it:t?.path;r&&r!==`/`&&(r=Oe(r));let i=t?.id||r,a=n?it:Ee([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Ee([`/`,a]));let o=a===`__root__`?`/`:Ee([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=R(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>at({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Kt=class extends Gt{constructor(e){super(e)}},qt=e(n(),1),U=r();function Jt(e){let t=e.errorComponent??Xt;return(0,U.jsx)(Yt,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?l.createElement(t,{error:n,reset:r}):e.children})}var Yt=class extends l.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Xt({error:e}){let[t,n]=l.useState(!1);return(0,U.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,U.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,U.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,U.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,U.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,U.jsx)(`div`,{children:(0,U.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,U.jsx)(`code`,{children:e.message}):null})}):null]})}function Zt({children:e,fallback:t=null}){return Qt()?(0,U.jsx)(l.Fragment,{children:e}):(0,U.jsx)(l.Fragment,{children:t})}function Qt(){return l.useSyncExternalStore($t,()=>!0,()=>!1)}function $t(){return()=>{}}var en=l.createContext(null);function W(e){return l.useContext(en)}var tn=l.createContext(void 0),nn=l.createContext(void 0),rn=c();function an(e,t){return e===t}function G(e,t,n=an){let r=(0,l.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,l.useCallback)(()=>e?.get(),[e]);return(0,rn.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var on={get(){},subscribe(){return{unsubscribe(){}}}};function sn(e,t){let n=l.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=S(n.current,i):i}}function K(e){let t=W(),n=l.useContext(e.from?nn:tn),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=sn(e,t),a=G(r??on,e=>e?i(e):on);if(a!==on)return a;(e.shouldThrow??!0)&&A()}function cn(e){return K({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ln(e){let{select:t,...n}=e;return K({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function un(e){return K({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function dn(e){return K({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fn(e){let t=W();return l.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function pn(e){return K({...e,select:t=>e.select?e.select(t.context):t.context})}function mn(e,t){let n=W(),r=p(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:m,replace:h,startTransition:_,resetScroll:v,viewTransition:y,children:b,target:x,disabled:S,style:C,className:w,onClick:T,onBlur:E,onFocus:O,onMouseEnter:k,onMouseLeave:ee,onTouchStart:te,ignoreBlocker:ne,params:re,search:ae,hash:oe,state:se,mask:A,reloadDocument:ce,unsafeRelative:j,from:le,_fromLocation:ue,...de}=e,M=Qt(),N=l.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),P=G(n.stores.location,e=>e,(e,t)=>e.href===t.href),F=l.useMemo(()=>{let e={_fromLocation:P,...N};return n.buildLocation(e)},[n,P,N]),fe=F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,pe=F.maskedLocation?F.maskedLocation.external:F.external,me=l.useMemo(()=>Cn(fe,pe,n.history,S),[S,pe,fe,n.history]),he=l.useMemo(()=>{if(me?.external)return ie(me.href,n.protocolAllowlist)?void 0:me.href;if(!wn(s)&&typeof s==`string`&&s.indexOf(`:`)!==-1)try{return new URL(s),ie(s,n.protocolAllowlist)?void 0:s}catch{}},[s,me,n.protocolAllowlist]),ge=l.useMemo(()=>{if(he)return!1;if(o?.exact){if(!je(P.pathname,F.pathname,n.basepath))return!1}else{let e=Ae(P.pathname,n.basepath),t=Ae(F.pathname,n.basepath);if(!e.startsWith(t)||e.length!==t.length&&e[t.length]!==`/`)return!1}return(o?.includeSearch??!0)&&!D(P.search,F.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:!o?.includeHash||M&&P.hash===F.hash},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,P,he,M,F.hash,F.pathname,F.search,n.basepath]),_e=ge?g(i,{})??gn:hn,ve=ge?hn:g(a,{})??hn,ye=[w,_e.className,ve.className].filter(Boolean).join(` `),be=(C||_e.style||ve.style)&&{...C,..._e.style,...ve.style},[xe,Se]=l.useState(!1),Ce=l.useRef(!1),I=e.reloadDocument||he?!1:c??n.options.defaultPreload,we=u??n.options.defaultPreloadDelay??0,L=l.useCallback(()=>{n.preloadRoute({...N,_builtLocation:F}).catch(e=>{console.warn(e),console.warn(Wt)})},[n,N,F]);f(r,l.useCallback(e=>{e?.isIntersecting&&L()},[L]),xn,{disabled:!!S||I!==`viewport`}),l.useEffect(()=>{Ce.current||!S&&I===`render`&&(L(),Ce.current=!0)},[S,L,I]);let Te=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;if(!S&&!Dn(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,qt.flushSync)(()=>{Se(!0)});let t=n.subscribe(`onResolved`,()=>{t(),Se(!1)});n.navigate({...N,replace:h,resetScroll:v,hashScrollIntoView:m,startTransition:_,viewTransition:y,ignoreBlocker:ne})}};if(he)return{...de,ref:r,href:he,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...C&&{style:C},...w&&{className:w},...T&&{onClick:T},...E&&{onBlur:E},...O&&{onFocus:O},...k&&{onMouseEnter:k},...ee&&{onMouseLeave:ee},...te&&{onTouchStart:te}};let Ee=e=>{if(S||I!==`intent`)return;if(!we){L();return}let t=e.currentTarget;if(bn.has(t))return;let n=setTimeout(()=>{bn.delete(t),L()},we);bn.set(t,n)},De=e=>{S||I!==`intent`||L()},Oe=e=>{if(S||!I||!we)return;let t=e.currentTarget,n=bn.get(t);n&&(clearTimeout(n),bn.delete(t))};return{...de,..._e,...ve,href:me?.href,ref:r,onClick:Sn([T,Te]),onBlur:Sn([E,Oe]),onFocus:Sn([O,Ee]),onMouseEnter:Sn([k,Ee]),onMouseLeave:Sn([ee,Oe]),onTouchStart:Sn([te,De]),disabled:!!S,target:x,...be&&{style:be},...ye&&{className:ye},...S&&_n,...ge&&vn,...M&&xe&&yn}}var hn={},gn={className:`active`},_n={role:`link`,"aria-disabled":!0},vn={"data-status":`active`,"aria-current":`page`},yn={"data-transitioning":`transitioning`},bn=new WeakMap,xn={rootMargin:`100px`},Sn=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Cn(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function wn(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}function Tn(e){return l.forwardRef(function(t,n){return(0,U.jsx)(En,{...t,_asChild:e,ref:n})})}var En=l.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=mn(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return l.createElement(`a`,t,o)}return l.createElement(n,a,o)});function Dn(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var On=class extends Gt{constructor(e){super(e),this.useMatch=e=>K({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>pn({...e,from:this.id}),this.useSearch=e=>dn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>un({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ln({...e,from:this.id}),this.useLoaderData=e=>cn({...e,from:this.id}),this.useNavigate=()=>fn({from:this.fullPath}),this.Link=l.forwardRef((e,t)=>(0,U.jsx)(En,{ref:t,from:this.fullPath,...e}))}};function kn(e){return new On(e)}var An=class extends Kt{constructor(e){super(e),this.useMatch=e=>K({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>pn({...e,from:this.id}),this.useSearch=e=>dn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>un({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ln({...e,from:this.id}),this.useLoaderData=e=>cn({...e,from:this.id}),this.useNavigate=()=>fn({from:this.fullPath}),this.Link=l.forwardRef((e,t)=>(0,U.jsx)(En,{ref:t,from:this.fullPath,...e}))}};function jn(e){return new An(e)}function Mn(e){let t=W(),n=`not-found-${G(t.stores.location,e=>e.pathname)}-${G(t.stores.status,e=>e)}`;return(0,U.jsx)(Jt,{getResetKey:()=>n,onCatch:(t,n)=>{if(z(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(z(t))return e.fallback?.(t);throw t},children:e.children})}function Nn(){return(0,U.jsx)(`p`,{children:`Not Found`})}function Pn(e){return(0,U.jsx)(U.Fragment,{children:e.children})}function Fn(e,t,n){return t.options.notFoundComponent?(0,U.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,U.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,U.jsx)(Nn,{})}var In=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Ln=(e,t)=>e[0]===t[0]&&e[1]===t[1],Rn=l.memo(function({matchId:e}){let t=W(),n=t.stores.matchStores.get(e);n||A();let r=G(t.stores.loadedAt,e=>e),i=G(n,e=>e,In);return(0,U.jsx)(zn,{router:t,matchId:e,resetKey:r,matchState:l.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function zn({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,U.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,u=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,d=r.ssr===!1||r.ssr===`data-only`,f=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||d))?l.Suspense:Pn,p=s?Jt:Pn,m=u?Mn:Pn;return(0,U.jsxs)(i.isRoot?i.options.shellComponent??Pn:Pn,{children:[(0,U.jsx)(tn.Provider,{value:t,children:(0,U.jsx)(f,{fallback:o,children:(0,U.jsx)(p,{getResetKey:()=>n,errorComponent:s||Xt,onCatch:(e,t)=>{if(z(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,U.jsx)(m,{fallback:e=>{if(e.routeId??=r.routeId,!u||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return l.createElement(u,e)},children:d||r._displayPending?(0,U.jsx)(Zt,{fallback:o,children:(0,U.jsx)(Vn,{matchId:t})}):(0,U.jsx)(Vn,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(Bn,{}),(e.options.scrollRestoration,null)]}):null]})}function Bn(){let e=W(),t=l.useRef();return u(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Nt(e.stores.location.get(),r??n)}),t.current=n},[G(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var Vn=l.memo(function({matchId:e}){let t=W(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||A();let i=G(r,e=>e),a=i.routeId,o=t.routesById[a],s=l.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=l.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,U.jsx)(e,{},s):(0,U.jsx)(Hn,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=O();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return z(i.error)||A(),Fn(t,o,i.error);if(i.status===`redirected`)throw B(i.error)||A(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),Hn=l.memo(function(){let e=W(),t=l.useContext(tn),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=G(a,e=>[e?.routeId,e?.globalNotFound??!1],Ln),i=G(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,U.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||A(),Fn(e,a,void 0);if(!i)return null;let s=(0,U.jsx)(Rn,{matchId:i});return n===`__root__`?(0,U.jsx)(l.Suspense,{fallback:o,children:s}):s});function Un(){let e=W(),t=l.useRef({router:e,mounted:!1}),[n,r]=l.useState(!1),i=G(e.stores.isLoading,e=>e),a=G(e.stores.hasPending,e=>e),o=d(i),c=i||n||a,f=d(c),p=i||a,m=d(p);return e.startTransition=e=>{r(!0),l.startTransition(()=>{e(),r(!1)})},l.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return R(e.latestLocation.publicHref)!==R(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),u(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),u(()=>{o&&!i&&e.emit({type:`onLoad`,...Nt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),u(()=>{m&&!p&&e.emit({type:`onBeforeRouteMount`,...Nt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[p,m,e]),u(()=>{if(f&&!c){let t=Nt(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),s(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[c,f,e]),null}function Wn(){let e=W(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,U.jsx)(t,{}):null,r=(0,U.jsxs)(typeof document<`u`&&e.ssr?Pn:l.Suspense,{fallback:n,children:[(0,U.jsx)(Un,{}),(0,U.jsx)(Gn,{})]});return e.options.InnerWrap?(0,U.jsx)(e.options.InnerWrap,{children:r}):r}function Gn(){let e=W(),t=G(e.stores.firstId,e=>e),n=G(e.stores.loadedAt,e=>e),r=t?(0,U.jsx)(Rn,{matchId:t}):null;return(0,U.jsx)(tn.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,U.jsx)(Jt,{getResetKey:()=>n,errorComponent:Xt,onCatch:void 0,children:r})})}var Kn=e=>({createMutableStore:o,createReadonlyStore:o,batch:s}),qn=e=>new Jn(e),Jn=class extends Pt{constructor(e){super(e,Kn)}};function Yn({router:e,children:t,...n}){y(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,U.jsx)(en.Provider,{value:e,children:t});return e.options.Wrap?(0,U.jsx)(e.options.Wrap,{children:r}):r}function Xn({router:e,...t}){return(0,U.jsx)(Yn,{router:e,...t,children:(0,U.jsx)(Wn,{})})}function Zn(e){let t=W({warn:e?.router===void 0}),n=e?.router||t;return G(n.stores.__store,sn(e,n))}function Qn(e){let t=W();return G(t.stores.location,sn(e,t))}var q=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(){}},$n=new class extends q{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},er={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},J=new class{#e=er;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)}};function tr(e){setTimeout(e,0)}var nr=typeof window>`u`||`Deno`in globalThis;function Y(){}function rr(e,t){return typeof e==`function`?e(t):e}function ir(e){return typeof e==`number`&&e>=0&&e!==1/0}function ar(e,t){return Math.max(e+(t||0)-Date.now(),0)}function X(e,t){return typeof e==`function`?e(t):e}function Z(e,t){return typeof e==`function`?e(t):e}function or(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==cr(o,t.options))return!1}else if(!lr(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function sr(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Q(t.options.mutationKey)!==Q(a))return!1}else if(!lr(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function cr(e,t){return(t?.queryKeyHashFn||Q)(e)}function Q(e){return JSON.stringify(e,(e,t)=>mr(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function lr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!lr(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!lr(e[r],t[r]))return!1;return!0}return!1}var ur=Object.prototype.hasOwnProperty;function dr(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=pr(e)&&pr(t);if(!r&&!(mr(e)&&mr(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ur.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=dr(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function fr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function pr(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function mr(e){if(!hr(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!hr(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function hr(e){return Object.prototype.toString.call(e)===`[object Object]`}function gr(e){return new Promise(t=>{J.setTimeout(t,e)})}function _r(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:dr(e,t)}function vr(e){return e}function yr(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function br(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var xr=Symbol();function Sr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===xr?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cr(e,t){return typeof e==`function`?e(...t):!!e}function wr(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Tr=(()=>{let e=()=>nr;return{isServer(){return e()},setIsServer(t){e=t}}})();function Er(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Dr=tr;function Or(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Dr,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var $=Or(),kr=new class extends q{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Ar(e){return Math.min(1e3*2**e,3e4)}function jr(e){return(e??`online`)!==`online`||kr.isOnline()}var Mr=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Nr(e){let t=!1,n=0,r,i=Er(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Mr(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>$n.isFocused()&&(e.networkMode===`always`||kr.isOnline())&&e.canRun(),u=()=>jr(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(Tr.isServer()?0:3),o=e.retryDelay??Ar,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),gr(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Pr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ir(this.gcTime)&&(this.#e=J.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Tr.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(J.clearTimeout(this.#e),this.#e=void 0)}};function Fr(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{wr(e,()=>t.signal,()=>n=!0)},u=Sr(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?br:yr;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Lr:Ir,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Ir(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Ir(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Lr(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function Rr(e,t){return t?Ir(e,t)!=null:!1}function zr(e,t){return!t||!e.getPreviousPageParam?!1:Lr(e,t)!=null}var Br=class extends Pr{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ur(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.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ur(this.options);e.data!==void 0&&(this.setState(Hr(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=_r(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(Y).catch(Y):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=>Z(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===xr||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>X(e.options.staleTime,this)===`static`)}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:!ar(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){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.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Sr(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Fr(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=Nr({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Mr&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Mr){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Vr(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Hr(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),$.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Vr(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jr(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Hr(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ur(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Wr=class extends q{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Er(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Kr(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qr(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qr(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Z(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!fr(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Jr(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||X(this.options.staleTime,this.#t)!==X(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Z(this.options.enabled,this.#t)!==Z(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Xr(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Y)),t}#g(){this.#b();let e=X(this.options.staleTime,this.#t);if(Tr.isServer()||this.#r.isStale||!ir(e))return;let t=ar(this.#r.dataUpdatedAt,e)+1;this.#d=J.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!Tr.isServer()&&Z(this.options.enabled,this.#t)!==!1&&ir(this.#p)&&this.#p!==0&&(this.#f=J.setInterval(()=>{(this.options.refetchIntervalInBackground||$n.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(J.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(J.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Kr(e,t),o=i&&Jr(e,n,t,r);(a||o)&&(l={...l,...Vr(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=_r(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=_r(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Yr(e,t),refetch:this.refetch,promise:this.#o,isEnabled:Z(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Er();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!fr(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){$.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Gr(e,t){return Z(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Z(t.retryOnMount,e)!==!1)}function Kr(e,t){return Gr(e,t)||e.state.data!==void 0&&qr(e,t,t.refetchOnMount)}function qr(e,t,n){if(Z(t.enabled,e)!==!1&&X(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Yr(e,t)}return!1}function Jr(e,t,n,r){return(e!==t||Z(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Yr(e,n)}function Yr(e,t){return Z(t.enabled,e)!==!1&&e.isStaleByTime(X(t.staleTime,e))}function Xr(e,t){return!fr(e.getCurrentResult(),t)}var Zr=class extends Wr{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Rr(t,n.data),hasPreviousPage:zr(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Qr=class extends Pr{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||$r(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Nr({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,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{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),$.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function $r(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var ei=class extends q{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Qr({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=ti(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=ti(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=ti(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=ti(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){$.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){let t={exact:!0,...e};return this.getAll().find(e=>sr(t,e))}findAll(e={}){return this.getAll().filter(t=>sr(e,t))}notify(e){$.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return $.batch(()=>Promise.all(e.map(e=>e.continue().catch(Y))))}};function ti(e){return e.options.scope?.id}var ni=class extends q{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),fr(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Q(t.mutationKey)!==Q(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??$r();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){$.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function ri(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function ii(e,t,n){let r=e.slice(0);return r[t]=n,r}var ai=class extends q{#e;#t;#n;#r;#i;#a;#o;#s;#c;#l=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,$.batch(()=>{let e=this.#i,t=this.#p(this.#n);t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!fr(e,n)});(o||s)&&(o&&(this.#l=t,this.#i=n),this.#t=r,this.hasListeners()&&(o&&(ri(e,n).forEach(e=>{e.destroy()}),ri(n,e).forEach(e=>{e.subscribe(t=>{this.#m(e,t)})})),this.#h()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#p(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions)),i=n.map(e=>e.defaultedQueryOptions.queryHash);return[r,e=>this.#d(e??r,t,i),()=>this.#u(r,n)]}#u(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#d(e,t,n){if(t){let r=this.#c,i=n!==void 0&&r!==void 0&&(r.length!==n.length||n.some((e,t)=>e!==r[t]));return(!this.#a||this.#t!==this.#s||i||t!==this.#o)&&(this.#o=t,this.#s=this.#t,n!==void 0&&(this.#c=n),this.#a=dr(this.#a,t(e))),this.#a}return e}#f(){return this.#r?.combine!==void 0&&this.#i.some((e,t)=>e.options.suspense&&this.#t[t]?.data===void 0)}#p(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new Wr(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#m(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=ii(this.#t,n,t),this.#h())}#h(){if(this.hasListeners()){let e=this.#u(this.#t,this.#l),t=this.#f(),n=this.#a,r=t?n:this.#d(e,this.#r?.combine);(t||n!==r)&&$.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}},oi=class extends q{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??cr(r,t),a=this.get(i);return a||(a=new Br({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){$.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>or(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>or(e,t)):t}notify(e){$.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){$.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){$.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},si=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new oi,this.#t=e.mutationCache||new ei,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=$n.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=kr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(X(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=rr(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return $.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;$.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return $.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=$.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Y).catch(Y)}invalidateQueries(e,t={}){return $.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=$.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Y)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Y)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(X(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Y).catch(Y)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Y).catch(Y)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return kr.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Q(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{lr(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Q(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{lr(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=cr(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===xr&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},ci=l.createContext(void 0),li=e=>{let t=l.useContext(ci);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ui=({client:e,children:t})=>(l.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,U.jsx)(ci.Provider,{value:e,children:t})),di=l.createContext(!1),fi=()=>l.useContext(di);di.Provider;function pi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var mi=l.createContext(pi()),hi=()=>l.useContext(mi),gi=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Cr(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},_i=e=>{l.useEffect(()=>{e.clearReset()},[e])},vi=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Cr(n,[e.error,r])),yi=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},bi=(e,t)=>e.isLoading&&e.isFetching&&!t,xi=(e,t)=>e?.suspense&&t.isPending,Si=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ci({queries:e,...t},n){let r=li(n),i=fi(),a=hi(),o=l.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{yi(e);let t=r.getQueryCache().get(e.queryHash);gi(e,a,t)}),_i(a);let[s]=l.useState(()=>new ai(r,o,t)),[c,u,d]=s.getOptimisticResult(o,t.combine),f=!i&&t.subscribed!==!1;l.useSyncExternalStore(l.useCallback(e=>f?s.subscribe($.batchCalls(e)):Y,[s,f]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let p=c.some((e,t)=>xi(o[t],e))?c.flatMap((e,t)=>{let n=o[t];return n&&xi(n,e)?Si(n,new Wr(r,n),a):[]}):[];if(p.length>0)throw Promise.all(p);let m=c.find((e,t)=>{let n=o[t];return n&&vi({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(m?.error)throw m.error;return u(d())}function wi(e,t,n){let r=fi(),i=hi(),a=li(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,yi(o),gi(o,i,s),_i(i);let u=!a.getQueryCache().get(o.queryHash),[d]=l.useState(()=>new t(a,o)),f=d.getOptimisticResult(o),p=!r&&c;if(l.useSyncExternalStore(l.useCallback(e=>{let t=p?d.subscribe($.batchCalls(e)):Y;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),l.useEffect(()=>{d.setOptions(o)},[o,d]),xi(o,f))throw Si(o,d,i);if(vi({result:f,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw f.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,f),o.experimental_prefetchInRender&&!Tr.isServer()&&bi(f,r)&&(u?Si(o,d,i):s?.promise)?.catch(Y).finally(()=>{d.updateResult()}),o.notifyOnChangeProps?f:d.trackResult(f)}function Ti(e,t){return wi(e,Wr,t)}function Ei(e){return e}function Di(e){return e}function Oi(e,t){let n=li(t),[r]=l.useState(()=>new ni(n,e));l.useEffect(()=>{r.setOptions(e)},[r,e]);let i=l.useSyncExternalStore(l.useCallback(e=>r.subscribe($.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=l.useCallback((e,t)=>{r.mutate(e,t).catch(Y)},[r]);if(i.error&&Cr(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function ki(e){return e}function Ai(e,t){return wi(e,Zr,t)}export{fn as S,Hn as _,Ei as a,En as b,ui as c,ei as d,vr as f,qn as g,Xn as h,Di as i,li as l,Zn as m,ki as n,Ti as o,Qn as p,Oi as r,Ci as s,Ai as t,si as u,jn as v,Tn as x,kn as y};
@@ -0,0 +1 @@
1
+ import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{i as t,t as n}from"./react-runtime-CMZHB3u8.js";import{l as r,o as i,r as a}from"./initial-deps-Hmv0m4RH.js";import{lt as o}from"./initial-deps-3Wb3IGZt.js";import{M as s,X as c,_ as l,ot as u}from"./initial-deps-DlvNWQT2.js";import{n as d,t as f}from"./dist-jnof4ZZu.js";import{at as p}from"./index-HGztPHO8.js";var m=e(t(),1),h=n();function g({onOpen:e,onToggle:t,pending:n,skill:r}){let{t:i}=u(`workbench`);return(0,h.jsxs)(`li`,{className:`skills-installed-row`,children:[(0,h.jsxs)(`button`,{"aria-label":i(`skillsMarket.openSkill`,{name:r.displayName}),className:`skills-installed-row__open`,onClick:()=>{e(r)},type:`button`,children:[(0,h.jsx)(`span`,{"aria-hidden":`true`,className:`skills-market-glyph`,"data-tone":`skills`,children:(0,h.jsx)(c,{})}),(0,h.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,h.jsx)(`strong`,{className:`block truncate text-body-small`,children:r.displayName}),(0,h.jsx)(`span`,{className:`block truncate text-label text-muted-foreground`,title:r.path,children:r.description||r.path})]}),(0,h.jsx)(s,{"aria-hidden":`true`,className:`skills-installed-row__folder`})]}),(0,h.jsx)(f,{"aria-label":i(`skillsMarket.toggle`,{name:r.displayName}),checked:r.enabled,className:`skills-switch`,disabled:n,onCheckedChange:()=>{t(r)},children:(0,h.jsx)(d,{className:`skills-switch__thumb`})})]})}function _(){let{t:e}=u(`workbench`),{client:t,projects:n}=p(),s=r(),c=i({queryFn:()=>t.listInstalledSkills(),queryKey:[`extensions`,`skills`]}),d=a({mutationFn:e=>t.setSkillEnabled(e.path,!e.enabled),onSuccess:e=>s.setQueryData([`extensions`,`skills`],e.installedSkills)}),f=a({meta:{actionNotification:{successMessage:!1}},mutationFn:e=>t.openSkillDirectory(e)}),_=(0,m.useMemo)(()=>{let t=new Map;t.set(`system`,{id:`system`,skills:[],title:e(`skillsMarket.scope.system`)}),t.set(`user`,{id:`user`,skills:[],title:e(`skillsMarket.scope.user`)});for(let e of n)t.set(e.id,{id:e.id,skills:[],title:e.name});t.set(`repo`,{id:`repo`,skills:[],title:e(`skillsMarket.scope.repo`)});for(let e of c.data?.data??[])e.scope===`system`||e.scope===`admin`?t.get(`system`)?.skills.push(e):e.scope===`user`?t.get(`user`)?.skills.push(e):t.get(e.projectId??`repo`)?.skills.push(e);return[...t.values()].filter(e=>e.skills.length>0)},[c.data,n,e]);return(0,h.jsxs)(`div`,{className:`skills-market-pane`,role:`tabpanel`,children:[(0,h.jsxs)(`div`,{className:`skills-market-toolbar`,children:[(0,h.jsx)(`span`,{className:`text-body-small text-muted-foreground`,children:e(`skillsMarket.installedCount`,{count:c.data?.data.length??0})}),(0,h.jsx)(o,{"aria-label":e(`skillsMarket.refresh`),disabled:c.isFetching,onClick:()=>void c.refetch(),size:`icon-sm`,title:e(`skillsMarket.refresh`),type:`button`,variant:`ghost`,children:(0,h.jsx)(l,{"aria-hidden":`true`,className:c.isFetching?`animate-spin`:``})})]}),c.isPending?(0,h.jsx)(`div`,{className:`skills-market-state`,role:`status`,children:e(`skillsMarket.loading`)}):c.error===null?_.length===0?(0,h.jsx)(`div`,{className:`skills-market-state`,children:e(`skillsMarket.emptyInstalled`)}):(0,h.jsx)(`div`,{className:`skills-installed-groups`,children:_.map(e=>(0,h.jsxs)(`section`,{className:`skills-installed-group`,children:[(0,h.jsxs)(`header`,{children:[(0,h.jsx)(`h3`,{children:e.title}),(0,h.jsx)(`span`,{children:e.skills.length})]}),(0,h.jsx)(`ul`,{children:e.skills.map(e=>(0,h.jsx)(g,{onOpen:e=>{f.mutate(e.path)},onToggle:e=>{d.mutate(e)},pending:d.isPending&&d.variables.id===e.id,skill:e},e.id))})]},e.id))}):(0,h.jsx)(`div`,{className:`skills-market-state`,role:`alert`,children:e(`skillsMarket.loadError`)})]})}export{_ as InstalledSkillsPane};