@lunora/studio 1.0.0-alpha.22 → 1.0.0-alpha.221

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 (337) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/index.d.mts +1566 -0
  4. package/dist/index.d.ts +961 -803
  5. package/dist/index.mjs +1 -0
  6. package/dist/mount.d.mts +22 -0
  7. package/dist/mount.d.ts +11 -10
  8. package/dist/mount.mjs +1 -0
  9. package/dist/packem_chunks/AdvisorHealthPanel.mjs +1 -0
  10. package/dist/packem_chunks/ApiTab.mjs +1 -0
  11. package/dist/packem_chunks/AuditPanel.mjs +1 -0
  12. package/dist/packem_chunks/DeploymentHealthPanel.mjs +1 -0
  13. package/dist/packem_chunks/ExportImportPanel.mjs +3 -0
  14. package/dist/packem_chunks/FileBrowser.mjs +4 -0
  15. package/dist/packem_chunks/FunctionRunner.mjs +1 -0
  16. package/dist/packem_chunks/FunctionStatsPanel.mjs +1 -0
  17. package/dist/packem_chunks/HealthPanel.mjs +1 -0
  18. package/dist/packem_chunks/InsightsPanel.mjs +1 -0
  19. package/dist/packem_chunks/LogsPanel.mjs +1 -0
  20. package/dist/packem_chunks/MailPanel.mjs +2 -0
  21. package/dist/packem_chunks/MetricsPanel.mjs +1 -0
  22. package/dist/packem_chunks/NotificationsPanel.mjs +1 -0
  23. package/dist/packem_chunks/PitrPanel.mjs +1 -0
  24. package/dist/packem_chunks/SchemaViewer.mjs +1 -0
  25. package/dist/packem_chunks/SecurityAdvisorPanel.mjs +1 -0
  26. package/dist/packem_chunks/SettingsPanel.mjs +1 -0
  27. package/dist/packem_chunks/SqlEditorPanel.mjs +8 -0
  28. package/dist/packem_chunks/TableEditor.mjs +1 -0
  29. package/dist/packem_chunks/agents-panel.mjs +1 -0
  30. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  31. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  32. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  33. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  34. package/dist/packem_chunks/containers-panel.mjs +1 -0
  35. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  36. package/dist/packem_chunks/evals-panel.mjs +1 -0
  37. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  38. package/dist/packem_chunks/flags-panel.mjs +1 -0
  39. package/dist/packem_chunks/issues-panel.mjs +1 -0
  40. package/dist/packem_chunks/kv-browser.mjs +1 -0
  41. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  42. package/dist/packem_chunks/migrations-route.mjs +1 -0
  43. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  44. package/dist/packem_chunks/payments-panel.mjs +1 -0
  45. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  46. package/dist/packem_chunks/queues-panel.mjs +1 -0
  47. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  48. package/dist/packem_chunks/rls-panel.mjs +1 -0
  49. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  50. package/dist/packem_chunks/sparkline.mjs +1 -0
  51. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  52. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  53. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  54. package/dist/packem_chunks/traces-panel.mjs +1 -0
  55. package/dist/packem_chunks/users-panel.mjs +1 -0
  56. package/dist/packem_chunks/vector-browser.mjs +1 -0
  57. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  58. package/dist/packem_shared/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
  59. package/dist/packem_shared/ApiDocsPanel-DzvVLAev.mjs +2 -0
  60. package/dist/packem_shared/ApiReferencePanel--1Y4o_-l.mjs +1 -0
  61. package/dist/packem_shared/CommandPalette-D7GxhPrH.mjs +1 -0
  62. package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
  63. package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
  64. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DuULO4XM.mjs +1 -0
  65. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  66. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
  67. package/dist/packem_shared/DataBrowser-CKbaOtDh.mjs +4 -0
  68. package/dist/packem_shared/DataFilters-Cocu-WWE.mjs +1 -0
  69. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  70. package/dist/packem_shared/GlobalDataBrowser-DSexMt80.mjs +1 -0
  71. package/dist/packem_shared/HomePanel-BkCmY0Hl.mjs +1 -0
  72. package/dist/packem_shared/MigrationsPanel-DLQRarWw.mjs +1 -0
  73. package/dist/packem_shared/OpenRpcReferencePanel-a_mbqw67.mjs +1 -0
  74. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  75. package/dist/packem_shared/ScheduledJobs-DSqsMB51.mjs +1 -0
  76. package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
  77. package/dist/packem_shared/Studio-BE_SzY44.mjs +1 -0
  78. package/dist/packem_shared/StudioApp-kVjMop0V.mjs +1 -0
  79. package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
  80. package/dist/packem_shared/advisor-view-DtkbHW2O.mjs +1 -0
  81. package/dist/packem_shared/aggregateMetrics-5zEJC6Ju.mjs +1 -0
  82. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  83. package/dist/packem_shared/app.d-BbmO2HA2.d.mts +301 -0
  84. package/dist/packem_shared/app.d-BbmO2HA2.d.ts +301 -0
  85. package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
  86. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  87. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  88. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  89. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  90. package/dist/packem_shared/card--2hKx4L2.mjs +1 -0
  91. package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
  92. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  93. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  94. package/dist/packem_shared/data-grid-BPu1a997.mjs +1 -0
  95. package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
  96. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  97. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  98. package/dist/packem_shared/error-alert-dQk3g8WI.mjs +1 -0
  99. package/dist/packem_shared/grid-features-ByxOklon.mjs +6 -0
  100. package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
  101. package/dist/packem_shared/home-panel-B_HN6YMA.mjs +3 -0
  102. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  103. package/dist/packem_shared/internal-CyDwqA67.mjs +2 -0
  104. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  105. package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
  106. package/dist/packem_shared/log-fields-SBxKyBug.mjs +1 -0
  107. package/dist/packem_shared/log-line-BHZD2Aj4.mjs +1 -0
  108. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  109. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  110. package/dist/packem_shared/recording-client-CjRFjhya.mjs +1 -0
  111. package/dist/packem_shared/reference-view-vNXUVPlA.mjs +13 -0
  112. package/dist/packem_shared/schema-diagram-DADlbs2X.mjs +2 -0
  113. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  114. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  115. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  116. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  117. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  118. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  119. package/dist/packem_shared/sql-result-table-DS4o0GoC.mjs +1 -0
  120. package/dist/packem_shared/stat-card-D0Fe04cX.mjs +1 -0
  121. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  122. package/dist/packem_shared/studio-BVQq3QLR.mjs +2 -0
  123. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  124. package/dist/packem_shared/table-list-sidebar-D30qERKx.mjs +1 -0
  125. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  126. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  127. package/dist/packem_shared/use-admin-query-CR9mHt0P.mjs +1 -0
  128. package/dist/packem_shared/use-async-submit-LWIKsZ8r.mjs +1 -0
  129. package/dist/packem_shared/use-auth-config-HmTOvrWd.mjs +1 -0
  130. package/dist/packem_shared/use-open-trace-DdGxsEB9.mjs +1 -0
  131. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  132. package/dist/packem_shared/use-sql-assistant-D4XQ0v0R.mjs +1 -0
  133. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  134. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  135. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  136. package/dist/packem_shared/wire-codec-Bk4XZGE4.mjs +1 -0
  137. package/dist/standalone/chunk-225VJ77I.js +1 -0
  138. package/dist/standalone/chunk-2ABVDLD3.js +1 -0
  139. package/dist/standalone/chunk-2HAWCLCS.js +1 -0
  140. package/dist/standalone/chunk-2HF37UQN.js +1 -0
  141. package/dist/standalone/chunk-2JLOP2EL.js +1 -0
  142. package/dist/standalone/chunk-2R6ZRXPJ.js +1 -0
  143. package/dist/standalone/chunk-2RMFAASK.js +3 -0
  144. package/dist/standalone/chunk-2URQKGWU.js +1 -0
  145. package/dist/standalone/chunk-35DM4JJG.js +1 -0
  146. package/dist/standalone/chunk-3C25RFTP.js +1 -0
  147. package/dist/standalone/chunk-3FBLWUXD.js +1 -0
  148. package/dist/standalone/chunk-3GFF4BA4.js +3 -0
  149. package/dist/standalone/chunk-3Q2P62UR.js +1 -0
  150. package/dist/standalone/chunk-3TE3V2QL.js +1 -0
  151. package/dist/standalone/chunk-3ZMF2GJ5.js +1 -0
  152. package/dist/standalone/chunk-4AZDQAT2.js +1 -0
  153. package/dist/standalone/chunk-4GTO7FL5.js +1 -0
  154. package/dist/standalone/chunk-4JLGLPWV.js +1 -0
  155. package/dist/standalone/chunk-4L4WTGN5.js +1 -0
  156. package/dist/standalone/chunk-4P2KFEUN.js +1 -0
  157. package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
  158. package/dist/standalone/chunk-55754F6H.js +1 -0
  159. package/dist/standalone/chunk-5ICUJ4IA.js +15 -0
  160. package/dist/standalone/chunk-5JDWLCSH.js +1 -0
  161. package/dist/standalone/chunk-5WJXVZMZ.js +1 -0
  162. package/dist/standalone/chunk-66UGPQVC.js +1 -0
  163. package/dist/standalone/chunk-6B7FVPW3.js +19 -0
  164. package/dist/standalone/chunk-6CGJCPHC.js +1 -0
  165. package/dist/standalone/chunk-6D6Z2KXU.js +1 -0
  166. package/dist/standalone/chunk-6DAD3RFX.js +1 -0
  167. package/dist/standalone/chunk-6HDT763N.js +1 -0
  168. package/dist/standalone/chunk-6P7CYZPR.js +1 -0
  169. package/dist/standalone/chunk-6RNWWWLS.js +1 -0
  170. package/dist/standalone/chunk-6WPU62WQ.js +2 -0
  171. package/dist/standalone/chunk-A2XTI2C3.js +1 -0
  172. package/dist/standalone/chunk-AAVLPU5Q.js +1 -0
  173. package/dist/standalone/chunk-AM7VTTNL.js +1 -0
  174. package/dist/standalone/chunk-AWHXPIXU.js +1 -0
  175. package/dist/standalone/chunk-BJEJVHCO.js +9 -0
  176. package/dist/standalone/chunk-CMA4PTV7.js +1 -0
  177. package/dist/standalone/chunk-CSUROWL2.js +1 -0
  178. package/dist/standalone/chunk-DKLSANZA.js +1 -0
  179. package/dist/standalone/chunk-DX6246CW.js +8 -0
  180. package/dist/standalone/chunk-DXT2DY4I.js +1 -0
  181. package/dist/standalone/chunk-EA2JKR5D.js +1 -0
  182. package/dist/standalone/chunk-EDEQELIO.js +1 -0
  183. package/dist/standalone/chunk-EQVY6WGK.js +1 -0
  184. package/dist/standalone/chunk-EVTM6Q43.js +1 -0
  185. package/dist/standalone/chunk-F7UC63UN.js +1 -0
  186. package/dist/standalone/chunk-FCEQTBLC.js +1 -0
  187. package/dist/standalone/chunk-FCPY75TQ.js +1 -0
  188. package/dist/standalone/chunk-FEWMAPNI.js +1 -0
  189. package/dist/standalone/chunk-FKVZRPV5.js +1 -0
  190. package/dist/standalone/chunk-FS4GMDIW.js +4 -0
  191. package/dist/standalone/chunk-FSRSK4LY.js +1 -0
  192. package/dist/standalone/chunk-GGAUC5ZI.js +1 -0
  193. package/dist/standalone/chunk-GL7PC32W.js +1 -0
  194. package/dist/standalone/chunk-GMS77BZD.js +1 -0
  195. package/dist/standalone/chunk-GYKK64E7.js +1 -0
  196. package/dist/standalone/chunk-H4OORJHB.js +1 -0
  197. package/dist/standalone/chunk-HEAQVSNS.js +1 -0
  198. package/dist/standalone/chunk-HR7W3Z5I.js +1 -0
  199. package/dist/standalone/chunk-I3TUOZM3.js +1 -0
  200. package/dist/standalone/chunk-I4VOJYXE.js +1 -0
  201. package/dist/standalone/chunk-IHMGCHAA.js +1 -0
  202. package/dist/standalone/chunk-IJPXZZZ5.js +1 -0
  203. package/dist/standalone/chunk-IMOHEGMV.js +1 -0
  204. package/dist/standalone/chunk-IS6LVJ6L.js +1 -0
  205. package/dist/standalone/chunk-J345HOFQ.js +1 -0
  206. package/dist/standalone/chunk-JNDBJAO6.js +1 -0
  207. package/dist/standalone/chunk-JQ63BDVF.js +1 -0
  208. package/dist/standalone/chunk-K4HVLN3Z.js +1 -0
  209. package/dist/standalone/chunk-K7AJEMKE.js +1 -0
  210. package/dist/standalone/chunk-KFEWMJQS.js +1 -0
  211. package/dist/standalone/chunk-KGCUFNFC.js +5 -0
  212. package/dist/standalone/chunk-LJVH6HRQ.js +1 -0
  213. package/dist/standalone/chunk-MDUTVBJZ.js +1 -0
  214. package/dist/standalone/chunk-MMMRSTCL.js +1 -0
  215. package/dist/standalone/chunk-MU3P2FI7.js +1 -0
  216. package/dist/standalone/chunk-MXLAOCAN.js +1 -0
  217. package/dist/standalone/chunk-OGUKYRFM.js +1 -0
  218. package/dist/standalone/chunk-OKG3HWSJ.js +1 -0
  219. package/dist/standalone/chunk-ONIGWNXT.js +1 -0
  220. package/dist/standalone/chunk-PAE3ULFR.js +1 -0
  221. package/dist/standalone/chunk-PIKO7SSB.js +1 -0
  222. package/dist/standalone/chunk-PLHA3OWK.js +3 -0
  223. package/dist/standalone/chunk-PSBP27ZK.js +1 -0
  224. package/dist/standalone/chunk-PSPSEIFN.js +1 -0
  225. package/dist/standalone/chunk-PUBYZCHW.js +4 -0
  226. package/dist/standalone/chunk-PVNT7VXC.js +1 -0
  227. package/dist/standalone/chunk-PY5P53RV.js +6 -0
  228. package/dist/standalone/chunk-Q2F2DRGB.js +1 -0
  229. package/dist/standalone/chunk-Q4CAKBWN.js +1 -0
  230. package/dist/standalone/chunk-QKEJLVC5.js +1 -0
  231. package/dist/standalone/chunk-QKZ2JCH3.js +1 -0
  232. package/dist/standalone/chunk-RBJMRBC3.js +1 -0
  233. package/dist/standalone/chunk-RE4RWXYW.js +1 -0
  234. package/dist/standalone/chunk-RFNGDE33.js +1 -0
  235. package/dist/standalone/chunk-RPQL45FL.js +1 -0
  236. package/dist/standalone/chunk-RVBRSHYE.js +1 -0
  237. package/dist/standalone/chunk-S3CRZLGS.js +1 -0
  238. package/dist/standalone/chunk-SEBIGECV.js +1 -0
  239. package/dist/standalone/chunk-TZHEXHD4.js +8 -0
  240. package/dist/standalone/chunk-ULIQFBZU.js +1 -0
  241. package/dist/standalone/chunk-UTPXXTQ6.js +1 -0
  242. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  243. package/dist/standalone/chunk-UYKO4I36.js +1 -0
  244. package/dist/standalone/chunk-V2JKX5UU.js +14 -0
  245. package/dist/standalone/chunk-V2LIXSFE.js +1 -0
  246. package/dist/standalone/chunk-V3CZW3JB.js +1 -0
  247. package/dist/standalone/chunk-V3VJAA4D.js +1 -0
  248. package/dist/standalone/chunk-VQM2MKYO.js +1 -0
  249. package/dist/standalone/chunk-VQTSESFP.js +1 -0
  250. package/dist/standalone/chunk-WINPNKYC.js +1 -0
  251. package/dist/standalone/chunk-WUWBZPUK.js +1 -0
  252. package/dist/standalone/chunk-XZMOZFE6.js +1 -0
  253. package/dist/standalone/chunk-Y5PCZUGU.js +59 -0
  254. package/dist/standalone/chunk-Y6CXU7T4.js +1 -0
  255. package/dist/standalone/chunk-YBCFAAQJ.js +1 -0
  256. package/dist/standalone/chunk-YKXDMIHQ.js +1 -0
  257. package/dist/standalone/chunk-YOB2X3FZ.js +1 -0
  258. package/dist/standalone/chunk-YPRQLCKF.js +1 -0
  259. package/dist/standalone/chunk-YV6JXZJO.js +1 -0
  260. package/dist/standalone/chunk-ZHM5ZHPC.js +1 -0
  261. package/dist/standalone/chunk-ZJZNCJHY.js +1 -0
  262. package/dist/standalone/chunk-ZUGCPRKB.js +1 -0
  263. package/dist/standalone/studio.js +9 -378
  264. package/dist/styles.css +2 -2
  265. package/package.json +23 -20
  266. package/dist/index.js +0 -41
  267. package/dist/mount.js +0 -26
  268. package/dist/packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js +0 -48
  269. package/dist/packem_shared/ApiDocsPanel-BgrN4kml.js +0 -842
  270. package/dist/packem_shared/ApiReferencePanel-1vubqG5s.js +0 -229
  271. package/dist/packem_shared/ApiTab-CHkX49o_.js +0 -251
  272. package/dist/packem_shared/AuditPanel-CP9HM9nq.js +0 -200
  273. package/dist/packem_shared/CommandPalette-BtgkBzZI.js +0 -373
  274. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  275. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  276. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  277. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  278. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  279. package/dist/packem_shared/DataBrowser-Bb1gTQ6c.js +0 -4475
  280. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  281. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  282. package/dist/packem_shared/ExportImportPanel-Dj87tRa5.js +0 -197
  283. package/dist/packem_shared/FileBrowser-CWvxp_is.js +0 -2932
  284. package/dist/packem_shared/FunctionRunner-DlWApMCH.js +0 -343
  285. package/dist/packem_shared/FunctionStatsPanel-CuO2Tmw-.js +0 -375
  286. package/dist/packem_shared/GlobalDataBrowser-3X9uRfdO.js +0 -289
  287. package/dist/packem_shared/HealthPanel-Dj0GRo5P.js +0 -648
  288. package/dist/packem_shared/HomePanel-BewOCuag.js +0 -1334
  289. package/dist/packem_shared/InsightsPanel-y_Q-xdPY.js +0 -461
  290. package/dist/packem_shared/LogsPanel-C7crgYoS.js +0 -827
  291. package/dist/packem_shared/MailPanel-PILidruz.js +0 -440
  292. package/dist/packem_shared/MetricsPanel-DioILzgf.js +0 -1611
  293. package/dist/packem_shared/MigrationsPanel-DkIcRoE5.js +0 -239
  294. package/dist/packem_shared/OpenRpcReferencePanel-vbcYbv3V.js +0 -191
  295. package/dist/packem_shared/PitrPanel-yKJ1JPPk.js +0 -252
  296. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  297. package/dist/packem_shared/ScheduledJobs-BWNwIN3I.js +0 -262
  298. package/dist/packem_shared/SchemaViewer-CNr8Wame.js +0 -2512
  299. package/dist/packem_shared/SecurityAdvisorPanel-BBzv7L3c.js +0 -92
  300. package/dist/packem_shared/SettingsPanel-BKSKl8tl.js +0 -390
  301. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  302. package/dist/packem_shared/SqlEditorPanel-CkemCQvy.js +0 -13
  303. package/dist/packem_shared/Studio-QkOjc2NS.js +0 -33
  304. package/dist/packem_shared/StudioApp-TEElspKL.js +0 -657
  305. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  306. package/dist/packem_shared/TableEditor-JS3sXYgS.js +0 -11
  307. package/dist/packem_shared/advisor-view-CGcfMiPq.js +0 -159
  308. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  309. package/dist/packem_shared/app.d-Cnij4Zp5.d.ts +0 -300
  310. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  311. package/dist/packem_shared/bar-chart-CzJAgqkp.js +0 -3245
  312. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  313. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  314. package/dist/packem_shared/cf-links-2cktDedA.js +0 -8
  315. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  316. package/dist/packem_shared/data-grid-B5CaV3wS.js +0 -183
  317. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  318. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  319. package/dist/packem_shared/grid-features-CzUfqgsM.js +0 -840
  320. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  321. package/dist/packem_shared/internal-rXJEAhXS.js +0 -68
  322. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  323. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  324. package/dist/packem_shared/reference-view-B4E49Lip.js +0 -2180
  325. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  326. package/dist/packem_shared/sparkline-10dG-_f0.js +0 -93
  327. package/dist/packem_shared/sql-editor-panel-CUJoYF1Z.js +0 -2562
  328. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  329. package/dist/packem_shared/studio-c5Vf7kSh.js +0 -11532
  330. package/dist/packem_shared/table-_RzNvy3R.js +0 -246
  331. package/dist/packem_shared/table-editor-9fhJ4hMJ.js +0 -407
  332. package/dist/packem_shared/table-list-sidebar-Bg7uzbvC.js +0 -832
  333. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  334. package/dist/packem_shared/use-admin-query-BkbdNFNz.js +0 -105
  335. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  336. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  337. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
@@ -0,0 +1,19 @@
1
+ import{a,b as ee,d as fe,e as Ne}from"./chunk-YKXDMIHQ.js";var he=ee((de,H)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof H=="object"&&H.exports?H.exports=t():e.moo=t()})(de,function(){"use strict";var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=typeof new RegExp().sticky=="boolean";function s(n){return n&&t.call(n)==="[object RegExp]"}a(s,"isRegExp");function i(n){return n&&typeof n=="object"&&!s(n)&&!Array.isArray(n)}a(i,"isObject");function l(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,function(o){return o==="-"?"\\x2d":"\\"+o})}a(l,"reEscape");function c(n){var o=new RegExp("|"+n);return o.exec("").length-1}a(c,"reGroups");function h(n){return"("+n+")"}a(h,"reCapture");function v(n){if(!n.length)return"(?!)";var o=n.map(function(u){return"(?:"+u+")"}).join("|");return"(?:"+o+")"}a(v,"reUnion");function S(n){if(typeof n=="string")return"(?:"+l(n)+")";if(s(n)){if(n.ignoreCase)throw new Error("RegExp /i flag not allowed");if(n.global)throw new Error("RegExp /g flag is implied");if(n.sticky)throw new Error("RegExp /y flag is implied");if(n.multiline)throw new Error("RegExp /m flag is implied");return n.source}else throw new Error("Not a pattern: "+n)}a(S,"regexpOrLiteral");function k(n,o){return n.length>o?n:Array(o-n.length+1).join(" ")+n}a(k,"pad");function $(n,o){for(var u=n.length,f=0;;){var g=n.lastIndexOf(`
2
+ `,u-1);if(g===-1||(f++,u=g,f===o)||u===0)break}var d=f<o?0:u+1;return n.substring(d).split(`
3
+ `)}a($,"lastNLines");function K(n){for(var o=Object.getOwnPropertyNames(n),u=[],f=0;f<o.length;f++){var g=o[f],d=n[g],y=[].concat(d);if(g==="include"){for(var w=0;w<y.length;w++)u.push({include:y[w]});continue}var m=[];y.forEach(function(p){i(p)?(m.length&&u.push(M(g,m)),u.push(M(g,p)),m=[]):m.push(p)}),m.length&&u.push(M(g,m))}return u}a(K,"objectToRules");function O(n){for(var o=[],u=0;u<n.length;u++){var f=n[u];if(f.include){for(var g=[].concat(f.include),d=0;d<g.length;d++)o.push({include:g[d]});continue}if(!f.type)throw new Error("Rule has no type: "+JSON.stringify(f));o.push(M(f.type,f))}return o}a(O,"arrayToRules");function M(n,o){if(i(o)||(o={match:o}),o.include)throw new Error("Matching rules cannot also include states");var u={defaultType:n,lineBreaks:!!o.error||!!o.fallback,pop:!1,next:null,push:null,error:!1,fallback:!1,value:null,type:null,shouldThrow:!1};for(var f in o)e.call(o,f)&&(u[f]=o[f]);if(typeof u.type=="string"&&n!==u.type)throw new Error("Type transform cannot be a string (type '"+u.type+"' for token '"+n+"')");var g=u.match;return u.match=Array.isArray(g)?g:g?[g]:[],u.match.sort(function(d,y){return s(d)&&s(y)?0:s(y)?-1:s(d)?1:y.length-d.length}),u}a(M,"ruleOptions");function D(n){return Array.isArray(n)?O(n):K(n)}a(D,"toRules");var N=M("error",{lineBreaks:!0,shouldThrow:!0});function F(n,o){for(var u=null,f=Object.create(null),g=!0,d=null,y=[],w=[],m=0;m<n.length;m++)n[m].fallback&&(g=!1);for(var m=0;m<n.length;m++){var p=n[m];if(p.include)throw new Error("Inheritance is not allowed in stateless lexers");if(p.error||p.fallback){if(u)throw!p.fallback==!u.fallback?new Error("Multiple "+(p.fallback?"fallback":"error")+" rules not allowed (for token '"+p.defaultType+"')"):new Error("fallback and error are mutually exclusive (for token '"+p.defaultType+"')");u=p}var b=p.match.slice();if(g)for(;b.length&&typeof b[0]=="string"&&b[0].length===1;){var q=b.shift();f[q.charCodeAt(0)]=p}if(p.pop||p.push||p.next){if(!o)throw new Error("State-switching options are not allowed in stateless lexers (for token '"+p.defaultType+"')");if(p.fallback)throw new Error("State-switching options are not allowed on fallback tokens (for token '"+p.defaultType+"')")}if(b.length!==0){g=!1,y.push(p);for(var C=0;C<b.length;C++){var P=b[C];if(s(P)){if(d===null)d=P.unicode;else if(d!==P.unicode&&p.fallback===!1)throw new Error("If one rule is /u then all must be")}}var I=v(b.map(S)),T=new RegExp(I);if(T.test(""))throw new Error("RegExp matches empty string: "+T);var L=c(I);if(L>0)throw new Error("RegExp has capture groups: "+T+`
4
+ Use (?: \u2026 ) instead`);if(!p.lineBreaks&&T.test(`
5
+ `))throw new Error("Rule should declare lineBreaks: "+T);w.push(h(I))}}var R=u&&u.fallback,U=r&&!R?"ym":"gm",W=r||R?"":"|";d===!0&&(U+="u");var Pe=new RegExp(v(w)+W,U);return{regexp:Pe,groups:y,fast:f,error:u||N}}a(F,"compileRules");function Q(n){var o=F(D(n));return new _({start:o},"start")}a(Q,"compile");function ue(n,o,u){var f=n&&(n.push||n.next);if(f&&!u[f])throw new Error("Missing state '"+f+"' (in token '"+n.defaultType+"' of state '"+o+"')");if(n&&n.pop&&+n.pop!=1)throw new Error("pop must be 1 (in token '"+n.defaultType+"' of state '"+o+"')")}a(ue,"checkStateGroup");function Be(n,o){var u=n.$all?D(n.$all):[];delete n.$all;var f=Object.getOwnPropertyNames(n);o||(o=f[0]);for(var g=Object.create(null),d=0;d<f.length;d++){var y=f[d];g[y]=D(n[y]).concat(u)}for(var d=0;d<f.length;d++)for(var y=f[d],w=g[y],m=Object.create(null),p=0;p<w.length;p++){var b=w[p];if(b.include){var q=[p,1];if(b.include!==y&&!m[b.include]){m[b.include]=!0;var C=g[b.include];if(!C)throw new Error("Cannot include nonexistent state '"+b.include+"' (in state '"+y+"')");for(var P=0;P<C.length;P++){var I=C[P];w.indexOf(I)===-1&&q.push(I)}}w.splice.apply(w,q),p--}}for(var T=Object.create(null),d=0;d<f.length;d++){var y=f[d];T[y]=F(g[y],!0)}for(var d=0;d<f.length;d++){for(var L=f[d],R=T[L],U=R.groups,p=0;p<U.length;p++)ue(U[p],L,T);for(var W=Object.getOwnPropertyNames(R.fast),p=0;p<W.length;p++)ue(R.fast[W[p]],L,T)}return new _(T,o)}a(Be,"compileStates");function De(n){for(var o=typeof Map<"u",u=o?new Map:Object.create(null),f=Object.getOwnPropertyNames(n),g=0;g<f.length;g++){var d=f[g],y=n[d],w=Array.isArray(y)?y:[y];w.forEach(function(m){if(typeof m!="string")throw new Error("keyword must be string (in keyword '"+d+"')");o?u.set(m,d):u[m]=d})}return function(m){return o?u.get(m):u[m]}}a(De,"keywordTransform");var _=a(function(n,o){this.startState=o,this.states=n,this.buffer="",this.stack=[],this.reset()},"Lexer");_.prototype.reset=function(n,o){return this.buffer=n||"",this.index=0,this.line=o?o.line:1,this.col=o?o.col:1,this.queuedToken=o?o.queuedToken:null,this.queuedText=o?o.queuedText:"",this.queuedThrow=o?o.queuedThrow:null,this.setState(o?o.state:this.startState),this.stack=o&&o.stack?o.stack.slice():[],this},_.prototype.save=function(){return{line:this.line,col:this.col,state:this.state,stack:this.stack.slice(),queuedToken:this.queuedToken,queuedText:this.queuedText,queuedThrow:this.queuedThrow}},_.prototype.setState=function(n){if(!(!n||this.state===n)){this.state=n;var o=this.states[n];this.groups=o.groups,this.error=o.error,this.re=o.regexp,this.fast=o.fast}},_.prototype.popState=function(){this.setState(this.stack.pop())},_.prototype.pushState=function(n){this.stack.push(this.state),this.setState(n)};var qe=r?function(n,o){return n.exec(o)}:function(n,o){var u=n.exec(o);return u[0].length===0?null:u};_.prototype._getGroup=function(n){for(var o=this.groups.length,u=0;u<o;u++)if(n[u+1]!==void 0)return this.groups[u];throw new Error("Cannot find token type for matched text")};function Ce(){return this.value}if(a(Ce,"tokenToString"),_.prototype.next=function(){var n=this.index;if(this.queuedGroup){var o=this._token(this.queuedGroup,this.queuedText,n);return this.queuedGroup=null,this.queuedText="",o}var u=this.buffer;if(n!==u.length){var y=this.fast[u.charCodeAt(n)];if(y)return this._token(y,u.charAt(n),n);var f=this.re;f.lastIndex=n;var g=qe(f,u),d=this.error;if(g==null)return this._token(d,u.slice(n,u.length),n);var y=this._getGroup(g),w=g[0];return d.fallback&&g.index!==n?(this.queuedGroup=y,this.queuedText=w,this._token(d,u.slice(n,g.index),n)):this._token(y,w,n)}},_.prototype._token=function(n,o,u){var f=0;if(n.lineBreaks){var g=/\n/g,d=1;if(o===`
6
+ `)f=1;else for(;g.exec(o);)f++,d=g.lastIndex}var y={type:typeof n.type=="function"&&n.type(o)||n.defaultType,value:typeof n.value=="function"?n.value(o):o,text:o,toString:Ce,offset:u,lineBreaks:f,line:this.line,col:this.col},w=o.length;if(this.index+=w,this.line+=f,f!==0?this.col=w-d+1:this.col+=w,n.shouldThrow){var m=new Error(this.formatError(y,"invalid syntax"));throw m}return n.pop?this.popState():n.push?this.pushState(n.push):n.next&&this.setState(n.next),y},typeof Symbol<"u"&&Symbol.iterator){var X=a(function(n){this.lexer=n},"LexerIterator");X.prototype.next=function(){var n=this.lexer.next();return{value:n,done:!n}},X.prototype[Symbol.iterator]=function(){return this},_.prototype[Symbol.iterator]=function(){return new X(this)}}return _.prototype.formatError=function(n,o){if(n==null)var u=this.buffer.slice(this.index),n={text:u,offset:this.index,lineBreaks:u.indexOf(`
7
+ `)===-1?0:1,line:this.line,col:this.col};var f=2,g=Math.max(n.line-f,1),d=n.line+f,y=String(d).length,w=$(this.buffer,this.line-n.line+f+1).slice(0,5),m=[];m.push(o+" at line "+n.line+" col "+n.col+":"),m.push("");for(var p=0;p<w.length;p++){var b=w[p],q=g+p;m.push(k(String(q),y)+" "+b),q===n.line&&m.push(k("",y+n.col+1)+"^")}return m.join(`
8
+ `)},_.prototype.clone=function(){return new _(this.states,this.state)},_.prototype.has=function(n){return!0},{compile:Q,states:Be,error:Object.freeze({error:!0}),fallback:Object.freeze({fallback:!0}),keywords:De}})});var pe=ee(A=>{"use strict";var Fe=A&&A.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(A,"__esModule",{value:!0});A.lexer=A.states=void 0;var Ie=Fe(he());A.states={body:{doubleapos:{match:"''",value:a(()=>"'","value")},quoted:{lineBreaks:!0,match:/'[{}#](?:[^']|'')*'(?!')/u,value:a(e=>e.slice(1,-1).replace(/''/g,"'"),"value")},argument:{lineBreaks:!0,match:/\{\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,push:"arg",value:a(e=>e.substring(1).trim(),"value")},octothorpe:"#",end:{match:"}",pop:1},content:{lineBreaks:!0,match:/[^][^{}#']*/u}},arg:{select:{lineBreaks:!0,match:/,\s*(?:plural|select|selectordinal)\s*,\s*/u,next:"select",value:a(e=>e.split(",")[1].trim(),"value")},"func-args":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*,/u,next:"body",value:a(e=>e.split(",")[1].trim(),"value")},"func-simple":{lineBreaks:!0,match:/,\s*[^\p{Pat_Syn}\p{Pat_WS}]+\s*/u,value:a(e=>e.substring(1).trim(),"value")},end:{match:"}",pop:1}},select:{offset:{lineBreaks:!0,match:/\s*offset\s*:\s*\d+\s*/u,value:a(e=>e.split(":")[1].trim(),"value")},case:{lineBreaks:!0,match:/\s*(?:=\d+|[^\p{Pat_Syn}\p{Pat_WS}]+)\s*\{/u,push:"body",value:a(e=>e.substring(0,e.indexOf("{")).trim(),"value")},end:{match:/\s*\}/u,pop:1}}};A.lexer=Ie.default.states(A.states)});var me=ee(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.ParseError=void 0;z.parse=Ue;var ye=pe(),j=a(e=>({offset:e.offset,line:e.line,col:e.col,text:e.text,lineBreaks:e.lineBreaks}),"getContext"),te=a(e=>e==="plural"||e==="select"||e==="selectordinal","isSelectType");function Re(e,t){let r="",s="";for(let l of t){let c=l.ctx.text;switch(s+=c,l.type){case"content":r+=l.value;break;case"argument":case"function":case"octothorpe":r+=c;break;default:throw new x(e,`Unsupported part in strict mode function arg style: ${c}`)}}return[{type:"content",value:r.trim(),ctx:Object.assign({},t[0].ctx,{text:s})}]}a(Re,"strictArgStyleParam");var Le=["number","date","time","spellout","ordinal","duration"],ge=["zero","one","two","few","many","other"],x=class extends Error{static{a(this,"ParseError")}constructor(t,r){super(ye.lexer.formatError(t,r))}};z.ParseError=x;var re=class{static{a(this,"Parser")}constructor(t,r){var s,i,l,c;this.lexer=ye.lexer.reset(t),this.cardinalKeys=(s=r?.cardinal)!==null&&s!==void 0?s:ge,this.ordinalKeys=(i=r?.ordinal)!==null&&i!==void 0?i:ge,this.strict=(l=r?.strict)!==null&&l!==void 0?l:!1,this.strictPluralKeys=(c=r?.strictPluralKeys)!==null&&c!==void 0?c:!0}parse(){return this.parseBody(!1,!0)}checkSelectKey(t,r,s){if(s[0]==="="){if(r==="select")throw new x(t,`The case ${s} is not valid with select`)}else if(r!=="select"){let i=r==="plural"?this.cardinalKeys:this.ordinalKeys;if(this.strictPluralKeys&&i.length>0&&!i.includes(s)){let l=`The ${r} case ${s} is not valid in this locale`;throw new x(t,l)}}}parseSelect({value:t},r,s,i){let l={type:i,arg:t,cases:[],ctx:s};i==="plural"||i==="selectordinal"?r=!0:this.strict&&(r=!1);for(let c of this.lexer)switch(c.type){case"offset":if(i==="select")throw new x(c,"Unexpected plural offset for select");if(l.cases.length>0)throw new x(c,"Plural offset must be set before cases");l.pluralOffset=Number(c.value),s.text+=c.text,s.lineBreaks+=c.lineBreaks;break;case"case":{this.checkSelectKey(c,i,c.value),l.cases.push({key:c.value,tokens:this.parseBody(r),ctx:j(c)});break}case"end":return l;default:throw new x(c,`Unexpected lexer token: ${c.type}`)}throw new x(null,"Unexpected message end")}parseArgToken(t,r){let s=j(t),i=this.lexer.next();if(!i)throw new x(null,"Unexpected message end");if(s.text+=i.text,s.lineBreaks+=i.lineBreaks,this.strict&&(i.type==="func-simple"||i.type==="func-args")&&!Le.includes(i.value)){let l=`Invalid strict mode function arg type: ${i.value}`;throw new x(t,l)}switch(i.type){case"end":return{type:"argument",arg:t.value,ctx:s};case"func-simple":{let l=this.lexer.next();if(!l)throw new x(null,"Unexpected message end");if(l.type!=="end")throw new x(l,`Unexpected lexer token: ${l.type}`);if(s.text+=l.text,te(i.value.toLowerCase()))throw new x(i,`Invalid type identifier: ${i.value}`);return{type:"function",arg:t.value,key:i.value,ctx:s}}case"func-args":{if(te(i.value.toLowerCase())){let c=`Invalid type identifier: ${i.value}`;throw new x(i,c)}let l=this.parseBody(this.strict?!1:r);return this.strict&&l.length>0&&(l=Re(t,l)),{type:"function",arg:t.value,key:i.value,param:l,ctx:s}}case"select":if(te(i.value))return this.parseSelect(t,r,s,i.value);throw new x(i,`Unexpected select type ${i.value}`);default:throw new x(i,`Unexpected lexer token: ${i.type}`)}}parseBody(t,r){let s=[],i=null;for(let l of this.lexer)if(l.type==="argument")i&&(i=null),s.push(this.parseArgToken(l,t));else if(l.type==="octothorpe"&&t)i&&(i=null),s.push({type:"octothorpe",ctx:j(l)});else{if(l.type==="end"&&!r)return s;{let c=l.value;if(!t&&l.type==="quoted"&&c[0]==="#"){if(c.includes("{")){let h=`Unsupported escape pattern: ${c}`;throw new x(l,h)}c=l.text}i?(i.value+=c,i.ctx.text+=l.text,i.ctx.lineBreaks+=l.lineBreaks):(i={type:"content",value:c,ctx:j(l)},s.push(i))}}if(r)return s;throw new x(null,"Unexpected message end")}};function Ue(e,t={}){return new re(e,t).parse()}a(Ue,"parse")});var xe=fe(me(),1);var E=class extends Error{static{a(this,"DateFormatError")}constructor(t,r,s){super(t),this.token=r,this.type=s||"error"}},ve=a(e=>e<4?"short":e===4?"long":"narrow","alpha"),G=a(e=>e%2===0?"2-digit":"numeric","numeric");function ze(e,t){switch(e.char){case"y":return{year:G(e.width)};case"r":return{calendar:"gregory",year:"numeric"};default:return t(`${e.desc} is not supported; falling back to year:numeric`,E.WARNING),{year:"numeric"}}}a(ze,"yearOptions");function Ge(e,t){switch(e.width){case 1:return"numeric";case 2:return"2-digit";case 3:return"short";case 4:return"long";case 5:return"narrow";default:t(`${e.desc} is not supported with width ${e.width}`);return}}a(Ge,"monthStyle");function Ke(e,t){let{char:r,desc:s,width:i}=e;if(r==="d")return G(i);t(`${s} is not supported`)}a(Ke,"dayStyle");function We(e,t){let{char:r,desc:s,width:i}=e;if((r==="c"||r==="e")&&i<3){let l=`Numeric value is not supported for ${s}; falling back to weekday:short`;t(l,E.WARNING)}return ve(i)}a(We,"weekdayStyle");function He(e){let t=G(e.width),r;switch(e.char){case"h":r="h12";break;case"H":r="h23";break;case"k":r="h24";break;case"K":r="h11";break}return r?{hour:t,hourCycle:r}:{hour:t}}a(He,"hourOptions");function je(e,t){let{char:r,desc:s,width:i}=e;switch(r){case"v":case"z":return i===4?"long":"short";case"V":if(i===4)return"long";t(`${s} is not supported with width ${i}`);return;case"X":t(`${s} is not supported`);return}return"short"}a(je,"timeZoneNameStyle");function Ze(e,t){switch(e.field){case"era":return{era:ve(e.width)};case"year":return ze(e,t);case"month":return{month:Ge(e,t)};case"day":return{day:Ke(e,t)};case"weekday":return{weekday:We(e,t)};case"period":return;case"hour":return He(e);case"min":return{minute:G(e.width)};case"sec":return{second:G(e.width)};case"tz":return{timeZoneName:je(e,t)};case"quarter":case"week":case"sec-frac":case"ms":t(`${e.desc} is not supported`)}}a(Ze,"compileOptions");function ne(e,t,r=s=>{throw s}){let s={timeZone:t},i=[];for(let l of e){let{error:c,field:h,str:v}=l;if(c){let k=new E(c.message,l);k.stack=c.stack,r(k)}if(v){let k=`Ignoring string part: ${v}`;r(new E(k,l,E.WARNING))}h&&(i.indexOf(h)===-1?i.push(h):r(new E(`Duplicate ${h} token`,l)));let S=Ze(l,(k,$)=>r(new E(k,l,$)));S&&Object.assign(s,S)}return s}a(ne,"getDateFormatOptions");var Je={G:{field:"era",desc:"Era"},y:{field:"year",desc:"Year"},Y:{field:"year",desc:'Year of "Week of Year"'},u:{field:"year",desc:"Extended year"},U:{field:"year",desc:"Cyclic year name"},r:{field:"year",desc:"Related Gregorian year"},Q:{field:"quarter",desc:"Quarter"},q:{field:"quarter",desc:"Stand-alone quarter"},M:{field:"month",desc:"Month in year"},L:{field:"month",desc:"Stand-alone month in year"},w:{field:"week",desc:"Week of year"},W:{field:"week",desc:"Week of month"},d:{field:"day",desc:"Day in month"},D:{field:"day",desc:"Day of year"},F:{field:"day",desc:"Day of week in month"},g:{field:"day",desc:"Modified julian day"},E:{field:"weekday",desc:"Day of week"},e:{field:"weekday",desc:"Local day of week"},c:{field:"weekday",desc:"Stand-alone local day of week"},a:{field:"period",desc:"AM/PM marker"},b:{field:"period",desc:"AM/PM/noon/midnight marker"},B:{field:"period",desc:"Flexible day period"},h:{field:"hour",desc:"Hour in AM/PM (1~12)"},H:{field:"hour",desc:"Hour in day (0~23)"},k:{field:"hour",desc:"Hour in day (1~24)"},K:{field:"hour",desc:"Hour in AM/PM (0~11)"},j:{field:"hour",desc:"Hour in preferred cycle"},J:{field:"hour",desc:"Hour in preferred cycle without marker"},C:{field:"hour",desc:"Hour in preferred cycle with flexible marker"},m:{field:"min",desc:"Minute in hour"},s:{field:"sec",desc:"Second in minute"},S:{field:"sec-frac",desc:"Fractional second"},A:{field:"ms",desc:"Milliseconds in day"},z:{field:"tz",desc:"Time Zone: specific non-location"},Z:{field:"tz",desc:"Time Zone"},O:{field:"tz",desc:"Time Zone: localized"},v:{field:"tz",desc:"Time Zone: generic non-location"},V:{field:"tz",desc:"Time Zone: ID"},X:{field:"tz",desc:"Time Zone: ISO8601 with Z"},x:{field:"tz",desc:"Time Zone: ISO8601"}},we=a(e=>e>="A"&&e<="Z"||e>="a"&&e<="z","isLetter");function Ve(e,t){let r=e[t],s=1;for(;e[++t]===r;)++s;let i=Je[r];if(!i){let l=`The letter ${r} is not a valid field identifier`;return{char:r,error:new Error(l),width:s}}return{char:r,field:i.field,desc:i.desc,width:s}}a(Ve,"readFieldToken");function Ye(e,t){let r=e[++t],s=2;if(r==="'")return{char:"'",str:r,width:s};for(;;){let i=e[++t];if(++s,i===void 0){let l=`Unterminated quoted literal in pattern: ${r||e}`;return{char:"'",error:new Error(l),str:r,width:s}}else if(i==="'"){if(e[++t]!=="'")return{char:"'",str:r,width:s};++s}r+=i}}a(Ye,"readQuotedToken");function Qe(e,t){let r=e[t];if(!r)return null;if(we(r))return Ve(e,t);if(r==="'")return Ye(e,t);let s=r,i=1;for(;;){let l=e[++t];if(!l||we(l)||l==="'")return{char:r,str:s,width:i};s+=l,i+=1}}a(Qe,"readToken");function Z(e){let t=[],r=0;for(;;){let s=Qe(e,r);if(!s)return t;t.push(s),r+=s.width}}a(Z,"parseDateTokens");function be(e,t){return e.filter(r=>r.type!=="content").length?e.map(r=>{if(r.type==="content")return t(r.value);if(r.type==="octothorpe")return"#";if(r.type==="argument")return[r.arg];if(r.type==="function"){let l=r?.param?.[0];if(r.key==="date"&&l){let c=Xe(l.value.trim(),h=>{throw new Error(`Unable to compile date expression: ${h.message}`)});return[r.arg,r.key,c]}return l?[r.arg,r.key,l.value.trim()]:[r.arg,r.key]}let s=r.pluralOffset,i={};return r.cases.forEach(({key:l,tokens:c})=>{let h=l[0]==="="?l.slice(1):l;i[h]=be(c,t)}),[r.arg,r.type,{offset:s,...i}]}):e.map(r=>t(r.value))}a(be,"processTokens");function Xe(e,t){if(/^::/.test(e)){let r=Z(e.substring(2));return ne(r,void 0,t)}return e}a(Xe,"compileDateExpression");function et(e,t=r=>r){return be((0,xe.parse)(e),t)}a(et,"compileMessageOrThrow");function _e(e,t=r=>r){try{return et(e,t)}catch(r){return console.error(`${r.message}
9
+
10
+ Message: ${e}`),[e]}}a(_e,"compileMessage");var B=a(e=>typeof e=="string","isString"),tt=a(e=>typeof e=="function","isFunction"),ke=new Map,Te="en";function oe(e){return[...Array.isArray(e)?e:[e],Te]}a(oe,"normalizeLocales");function le(e,t,r){let s=oe(e);r||(r="default");let i;if(typeof r=="string")switch(i={day:"numeric",month:"short",year:"numeric"},r){case"full":i.weekday="long";case"long":i.month="long";break;case"short":i.month="numeric";break}else i=r;return J(()=>V("date",s,r),()=>new Intl.DateTimeFormat(s,i)).format(B(t)?new Date(t):t)}a(le,"date");function rt(e,t,r){let s;if(r||(r="default"),typeof r=="string")switch(s={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":s.timeZoneName="short";break;case"short":delete s.second}else s=r;return le(e,t,s)}a(rt,"time");function se(e,t,r){let s=oe(e);return J(()=>V("number",s,r),()=>new Intl.NumberFormat(s,r)).format(t)}a(se,"number");function Se(e,t,r,{offset:s=0,...i}){let l=oe(e),c=t?J(()=>V("plural-ordinal",l),()=>new Intl.PluralRules(l,{type:"ordinal"})):J(()=>V("plural-cardinal",l),()=>new Intl.PluralRules(l,{type:"cardinal"}));return i[r]??i[c.select(r-s)]??i.other}a(Se,"plural");function J(e,t){let r=e(),s=ke.get(r);return s||(s=t(),ke.set(r,s)),s}a(J,"getMemoized");function V(e,t,r){let s=t.join("-");return`${e}-${s}-${JSON.stringify(r)}`}a(V,"cacheKey");var Ee=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,Oe=a(e=>e.replace(/\\u([a-fA-F0-9]{4})|\\x([a-fA-F0-9]{2})/g,(t,r,s)=>{if(r){let i=parseInt(r,16);return String.fromCharCode(i)}else{let i=parseInt(s,16);return String.fromCharCode(i)}}),"decodeEscapeSequences"),Ae="%__lingui_octothorpe__%",nt=a((e,t,r={})=>{let s=t||e,i=a(c=>typeof c=="object"?c:r[c],"style"),l=a((c,h)=>{let v=Object.keys(r).length?i("number"):void 0,S=se(s,c,v);return h.replace(new RegExp(Ae,"g"),S)},"replaceOctothorpe");return{plural:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!1,c,h);return l(c-v,S)},"plural"),selectordinal:a((c,h)=>{let{offset:v=0}=h,S=Se(s,!0,c,h);return l(c-v,S)},"selectordinal"),select:st,number:a((c,h)=>se(s,c,i(h)||{style:h}),"number"),date:a((c,h)=>le(s,c,i(h)||h),"date"),time:a((c,h)=>rt(s,c,i(h)||h),"time")}},"getDefaultFormats"),st=a((e,t)=>t[e]??t.other,"selectFormatter");function it(e,t,r){return(s={},i)=>{let l=nt(t,r,i),c=a((v,S=!1)=>Array.isArray(v)?v.reduce((k,$)=>{if($==="#"&&S)return k+Ae;if(B($))return k+$;let[K,O,M]=$,D={};O==="plural"||O==="selectordinal"||O==="select"?Object.entries(M).forEach(([F,Q])=>{D[F]=c(Q,O==="plural"||O==="selectordinal")}):D=M;let N;if(O){let F=l[O];N=F(s[K],D)}else N=s[K];return N==null?k:k+N},""):v,"formatMessage"),h=c(e);return B(h)&&Ee.test(h)?Oe(h):B(h)?h:h?String(h):""}}a(it,"interpolate");var ie=class{static{a(this,"EventEmitter")}_events={};on(t,r){return this._events[t]??=new Set,this._events[t].add(r),()=>this.removeListener(t,r)}removeListener(t,r){let s=this._events[t];s?.delete(r),s?.size===0&&delete this._events[t]}emit(t,...r){let s=this._events[t];if(s)for(let i of[...s])i.apply(this,r)}},ae=class extends ie{static{a(this,"I18n")}_locale="";_locales;_messages={};_missing;_messageCompiler;constructor(t){super(),t.missing!=null&&(this._missing=t.missing),t.messages!=null&&this.load(t.messages),(typeof t.locale=="string"||t.locales)&&this.activate(t.locale??Te,t.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}setMessagesCompiler(t){return this._messageCompiler=t,this}_load(t,r){let s=this._messages[t];s?Object.assign(s,r):this._messages[t]=r}load(t,r){typeof t=="string"&&typeof r=="object"?this._load(t,r):Object.entries(t).forEach(([s,i])=>this._load(s,i)),this.emit("change")}loadAndActivate({locale:t,locales:r,messages:s}){this._locale=t,this._locales=r||void 0,this._messages[this._locale]=s,this.emit("change")}activate(t,r){this._locale=t,this._locales=r,this.emit("change")}_(t,r,s){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let i=s?.message;t||(t=""),B(t)||(r=t.values||r,i=t.message,t=t.id);let l=this.messages[t],c=l===void 0,h=this._missing;if(h&&c)return tt(h)?h(this._locale,t):h;c&&this.emit("missing",{id:t,locale:this._locale});let v=l||i||t;return B(v)&&(this._messageCompiler?v=this._messageCompiler(v):console.warn(`Uncompiled message detected! Message:
11
+
12
+ > ${v}
13
+
14
+ That means you use raw catalog or your catalog doesn't have a translation for the message and fallback was used.
15
+ ICU features such as interpolation and plurals will not work properly for that message.
16
+
17
+ Please compile your catalog first.
18
+ `)),B(v)&&Ee.test(v)?Oe(v):B(v)?v:it(v,this._locale,this._locales)(r,s?.formats)}t=this._.bind(this);date(t,r){return le(this._locales||this._locale,t,r)}number(t,r){return se(this._locales||this._locale,t,r)}};function ce(e={}){return new ae(e)}a(ce,"setupI18n");var Ft=ce();var Y=fe(Ne(),1);var at={},$e="en",ot={en:at},lt=a((e=$e,t=ot)=>{let r=ce();r.setMessagesCompiler(_e);for(let[s,i]of Object.entries(t))r.load(s,i);return r.activate(t[e]===void 0?$e:e),r},"d"),ct=lt(),ut=(0,Y.createContext)(ct),zt=a(()=>{let e=(0,Y.use)(ut);return(t,r)=>e._(t,r)},"T");var Wt=a((e,t,r,s,i)=>{switch(t){case"action":return e.action(r,s,i);case"mutation":return e.mutation(r,s,i);default:return e.query(r,s,i)}},"f"),Ht=a(e=>({__lunoraRef:e}),"u"),jt=a(e=>{let t=e.trim();return t===""?{}:{shardKey:t}},"d"),Zt=a(e=>e instanceof Error?e.message:String(e),"g"),Jt=a(e=>{if(e===null||typeof e!="object"||!("code"in e))return;let{code:t}=e;return typeof t=="string"?t:void 0},"l"),Vt=a(e=>{if(e===null||typeof e!="object"||!("hint"in e))return;let{hint:t}=e;return typeof t=="string"?t:Array.isArray(t)?t.filter(r=>typeof r=="string").join(`
19
+ `):void 0},"y"),Yt=a(e=>{if(e===null||typeof e!="object"||!("docsUrl"in e))return;let t=e.docsUrl;if(typeof t=="string")try{let{protocol:r}=new URL(t);return r==="http:"||r==="https:"?t:void 0}catch{return}},"h"),Me=a(e=>{if(e==null)return"\u2014";if(e<1024)return`${e.toString()} B`;let t=["KB","MB","GB","TB"],r=e/1024,s=0;for(;r>=1024&&s<t.length-1;)r/=1024,s+=1;return`${r.toFixed(1)} ${t[s]??"TB"}`},"e"),ft=a((e,t)=>typeof t=="bigint"?t.toString():t instanceof ArrayBuffer||ArrayBuffer.isView(t)?`<bytes: ${Me(t.byteLength)}>`:t,"s"),Qt=a(e=>typeof e=="bigint"?e.toString():e,"p"),Xt=a(e=>{if(e==null)return"";switch(typeof e){case"bigint":case"boolean":case"number":return e.toString();case"string":return e;case"symbol":return e.toString();default:return e instanceof ArrayBuffer||ArrayBuffer.isView(e)?`<bytes: ${Me(e.byteLength)}>`:JSON.stringify(e,ft)}},"b"),dt=a((e,t)=>{e.catch(r=>{t?.(r)})},"c"),ht=a(e=>{if(e!==void 0&&e!=="")return e;let t=globalThis.location;return t?.origin!==void 0&&t.origin!==""?t.origin:"http://localhost:5173"},"a"),er=a(e=>{let t=ht(e);for(;t.endsWith("/");)t=t.slice(0,-1);return t},"m"),tr=a(e=>{let t="navigator"in globalThis?globalThis.navigator.clipboard:void 0;return t===void 0?!1:(dt(t.writeText(e)),!0)},"B"),rr=a((e,t="")=>{if(e==null||e==="")return t;let r=new Date(e);return Number.isNaN(r.getTime())?String(e):r.toLocaleString()},"w");export{lt as a,ct as b,ut as c,zt as d,Wt as e,Ht as f,jt as g,Zt as h,Jt as i,Vt as j,Yt as k,Me as l,ft as m,Qt as n,Xt as o,dt as p,ht as q,er as r,tr as s,rr as t};
@@ -0,0 +1 @@
1
+ import{b as u}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as y}from"./chunk-GYKK64E7.js";import"./chunk-ULIQFBZU.js";import"./chunk-I4VOJYXE.js";import"./chunk-35DM4JJG.js";import{a as N}from"./chunk-4ZEL6BYL.js";import{c as v}from"./chunk-3TE3V2QL.js";import"./chunk-BJEJVHCO.js";import"./chunk-FSRSK4LY.js";import"./chunk-5ICUJ4IA.js";import{a as g}from"./chunk-FKVZRPV5.js";import{a as w,b,c as S,d as c,e as s,f as o}from"./chunk-HEAQVSNS.js";import{a as f,e as x}from"./chunk-WUWBZPUK.js";import{d as p}from"./chunk-6B7FVPW3.js";import{a as n,d as R,g as T}from"./chunk-YKXDMIHQ.js";var e=R(T(),1);var $={active:"default",failing:"destructive",idle:"secondary"},j=n(a=>a===void 0?"\u2014":`${new Date(a).toISOString().slice(0,19).replace("T"," ")} UTC`,"I"),U=n(a=>{let t=a.runs+a.suppressed;return t===0?void 0:Math.round(a.suppressed/t*100)},"$"),F=n(({initialShardKey:a=""})=>{let t=p(),{data:l,error:E,errorSource:A,liveError:I}=v(N.listReactors,{},{live:!0,shardKey:a}),C=l!==void 0,i=Array.isArray(l?.reactors)?l.reactors:[],d;C&&i.length===0?d=(0,e.jsx)(g,{description:t("No reactor is declared in this deployment. Export an onQueryChange(select, handler) from lunora/ to run server-side logic when a query's result changes."),testId:"reactors-empty",title:t("No reactors declared")}):d=(0,e.jsx)(f,{className:"overflow-hidden py-0",children:(0,e.jsx)(x,{className:"px-0",children:(0,e.jsxs)(w,{"data-testid":"reactors-table",children:[(0,e.jsx)(b,{children:(0,e.jsxs)(c,{children:[(0,e.jsx)(s,{children:t("Reactor")}),(0,e.jsx)(s,{children:t("State")}),(0,e.jsx)(s,{children:t("Ran")}),(0,e.jsx)(s,{children:t("Suppressed")}),(0,e.jsx)(s,{children:t("Errors")}),(0,e.jsx)(s,{children:t("Watches")}),(0,e.jsx)(s,{children:t("Last dispatch")})]})}),(0,e.jsx)(S,{children:i.map(r=>{let m=U(r);return(0,e.jsxs)(c,{"data-testid":`reactors-row-${r.path}`,children:[(0,e.jsx)(o,{className:"font-mono text-xs",children:r.path}),(0,e.jsx)(o,{children:(0,e.jsx)(u,{"data-testid":`reactors-state-${r.path}`,variant:$[r.state],children:r.state})}),(0,e.jsx)(o,{className:"font-mono text-xs",children:r.runs}),(0,e.jsxs)(o,{className:"font-mono text-xs text-muted-foreground",children:[r.suppressed,m===void 0?"":` (${String(m)}%)`]}),(0,e.jsx)(o,{className:"font-mono text-xs",children:r.errors===0?(0,e.jsx)("span",{className:"text-muted-foreground",children:"0"}):(0,e.jsx)("span",{className:"text-destructive",children:r.errors})}),(0,e.jsx)(o,{className:"font-mono text-xs text-muted-foreground",children:r.tables===void 0||r.tables.length===0?"\u2014":r.tables.join(", ")}),(0,e.jsx)(o,{className:"font-mono text-xs text-muted-foreground",children:j(r.lastRanAt)})]},r.path)})})]})})});let h=i.filter(r=>r.state==="failing");return(0,e.jsxs)("div",{className:"flex flex-col gap-6","data-testid":"lunora-reactors-panel",children:[E!==null&&(0,e.jsx)(y,{error:A,testId:"reactors-error"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:t("A reactor runs after a write flush, but only when the result of the query it watches actually changed \u2014 a trigger fires on a row write, a reactor fires on a result changing. Suppressed dispatches are the ones where the read re-ran and nothing had moved.")}),h.length>0&&(0,e.jsx)("div",{className:"flex flex-col gap-2","data-testid":"reactors-failing",children:h.map(r=>(0,e.jsxs)("p",{className:"text-xs text-destructive",role:"alert",children:[(0,e.jsx)("span",{className:"font-mono",children:r.path}),": ",r.lastError??t("last dispatch failed")]},r.path))}),I!==void 0&&(0,e.jsx)("p",{className:"text-xs text-amber-600 dark:text-amber-500","data-testid":"reactors-live-error",role:"alert",children:t("Live updates unavailable; showing the last reading.")}),d]})},"U");export{F as default};
@@ -0,0 +1 @@
1
+ import{b as Nr}from"./chunk-Y6CXU7T4.js";import{a as i,d as k,e as B,g as Z}from"./chunk-YKXDMIHQ.js";var jn=k(B(),1),ie=jn.createContext(null);var Kn=k(B(),1);function D(t){return Kn.useContext(ie)}i(D,"useRouter");var Ue=k(B(),1),xt=Ue.createContext(void 0),qn=Ue.createContext(void 0);function dt(t){return t[t.length-1]}i(dt,"last");function q(t,e){return typeof t=="function"?t(e):t}i(q,"functionalUpdate");var Xn=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable;function ht(t){for(let e in t)if(Xn.call(t,e))return!0;return!1}i(ht,"hasKeys");var Tr=i(()=>Object.create(null),"createNull"),pt=i((t,e)=>rt(t,e,Tr),"nullReplaceEqualDeep");function rt(t,e,n=()=>({}),r=0){if(!1)return e;if(t===e)return t;if(r>500)return e;let o=e,s=Ve(t)&&Ve(o);if(!s&&!(Ht(t)&&Ht(o)))return o;let c=s?t:Gn(t);if(!c)return o;let a=s?o:Gn(o);if(!a)return o;let u=c.length,l=a.length,f=s?new Array(l):n(),d=0;for(let h=0;h<l;h++){let p=s?h:a[h],g=t[p],m=o[p];if(g===m){f[p]=g,(s?h<u:Xn.call(t,p))&&d++;continue}if(g===null||m===null||typeof g!="object"||typeof m!="object"){f[p]=m;continue}let y=rt(g,m,n,r+1);f[p]=y,y===g&&d++}return u===l&&d===u?t:f}i(rt,"replaceEqualDeep");function Gn(t){let e=Object.keys(t);if(e.length!==Object.getOwnPropertyNames(t).length)return!1;let n=Object.getOwnPropertySymbols(t);if(n.length===0)return e;for(let r of n){if(!Or.call(t,r))return!1;e.push(r)}return e}i(Gn,"getEnumerableOwnKeys");function Ht(t){if(!Jn(t))return!1;let e=t.constructor;if(typeof e>"u")return!0;let n=e.prototype;return!(!Jn(n)||!n.hasOwnProperty("isPrototypeOf"))}i(Ht,"isPlainObject");function Jn(t){return Object.prototype.toString.call(t)==="[object Object]"}i(Jn,"hasObjectPrototype");function Ve(t){return Array.isArray(t)&&t.length===Object.keys(t).length}i(Ve,"isPlainArray");function Q(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let r=0,o=t.length;r<o;r++)if(!Q(t[r],e[r],n))return!1;return!0}if(Ht(t)&&Ht(e)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let c in e)if((!r||e[c]!==void 0)&&!Q(t[c],e[c],n))return!1;return!0}let o=0;if(!r)o=Object.keys(t).length;else for(let c in t)t[c]!==void 0&&o++;let s=0;for(let c in e)if((!r||e[c]!==void 0)&&(s++,s>o||!Q(t[c],e[c],n)))return!1;return o===s}return!1}i(Q,"deepEqual");var Dr=/[\x00-\x1f\x7f"<>`{}]/g;function Fr(t){return t.replace(Dr,e=>"%"+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}i(Fr,"sanitizePathSegment");function Yn(t){let e;try{e=decodeURI(t)}catch{e=t.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Fr(e)}i(Yn,"decodeSegment");var We=["http:","https:","mailto:","tel:"];function st(t,e){if(!t)return!1;try{let n=new URL(t);return!e.has(n.protocol)}catch{return!1}}i(st,"isDangerousProtocol");function Dt(t){if(!t)return{path:t,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(t)&&!t.startsWith("//"))return{path:t,handledProtocolRelativeURL:!1};let e=/%25|%5C/gi,n=0,r="",o;for(;(o=e.exec(t))!==null;)r+=Yn(t.slice(n,o.index))+o[0],n=e.lastIndex;r=r+Yn(n?t.slice(n):t);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}i(Dt,"decodePath");function Zn(t){return/\s|[^\u0000-\u007F]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}i(Zn,"encodePathLikeUrl");function Qn(t,e){if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}i(Qn,"arraysEqual");function mt(){throw new Error("Invariant failed")}i(mt,"invariant");function Ft(t){let e=new Map,n,r,o=i(s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)},"touch");return{get(s){let c=e.get(s);if(c)return o(c),c.value},set(s,c){if(e.size>=t&&n){let u=n;e.delete(u.key),u.next&&(n=u.next,u.next.prev=void 0),u===r&&(r=void 0)}let a=e.get(s);if(a)a.value=c,o(a);else{let u={key:s,value:c,prev:r};r&&(r.next=u),r=u,n||(n=u),e.set(s,u)}},clear(){e.clear(),n=void 0,r=void 0}}}i(Ft,"createLRUCache");var gt=4,eo=5;function ze(t,e,n=new Uint16Array(6)){let r=t.indexOf("/",e),o=r===-1?t.length:r,s=t.substring(e,o);if(!s||!s.includes("$"))return n[0]=0,n[1]=e,n[2]=e,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){let u=t.length;return n[0]=2,n[1]=e,n[2]=e,n[3]=u,n[4]=u,n[5]=u,n}if(s.charCodeAt(0)===36)return n[0]=1,n[1]=e,n[2]=e+1,n[3]=o,n[4]=o,n[5]=o,n;let c=s.indexOf("{"),a;if(c!==-1&&c+1<s.length&&(a=s.indexOf("}",c))!==-1){let u=s.charCodeAt(c+1);if(u===45){if(c+2<s.length&&s.charCodeAt(c+2)===36){let l=c+3,f=a;if(l<f)return n[0]=3,n[1]=e+c,n[2]=e+l,n[3]=e+f,n[4]=e+a+1,n[5]=o,n}}else if(u===36){let l=c+1,f=c+2;return f===a?(n[0]=2,n[1]=e+c,n[2]=e+l,n[3]=e+f,n[4]=e+a+1,n[5]=t.length,n):(n[0]=1,n[1]=e+c,n[2]=e+f,n[3]=e+a,n[4]=e+a+1,n[5]=o,n)}}return n[0]=0,n[1]=e,n[2]=e,n[3]=o,n[4]=o,n[5]=o,n}i(ze,"parseSegment");function le(t,e,n,r,o,s,c,a){a?.(n);let u=r;{let l=n.fullPath??n.from,f=n.options,d=l.length,h=f?.caseSensitive??t,p=f?.params?.parse??f?.parseParams;for(;u<d;){let m=ze(l,u,e),y,R=u,v=m[5];u=v+1,s++;let _=m[0];switch(_){case 0:{let x=l.substring(m[2],m[3]),L=x,b;h?b=o.static??=new Map:(L=x.toLowerCase(),b=o.staticInsensitive??=new Map);let S=b.get(L);if(S)y=S;else{let C=Mt(l);C.parent=o,C.depth=s,y=C,b.set(L,C)}break}case 1:case 3:case 2:{let x=l.substring(R,m[1]),L=l.substring(m[4],v),b=h&&!!(x||L);h||(x=x.toLowerCase(),L=L.toLowerCase());let S=_===1?o.dynamic:_===3?o.optional:o.wildcard,C=_!==2&&!p&&S?.find(w=>!w.parse&&w.caseSensitive===b&&w.prefix===x&&w.suffix===L);if(C)y=C;else{let w=Mr(_,l,b,x,L);y=w,w.parent=o,w.depth=s;let P;_===1?P=o.dynamic??=[]:_===3?P=o.optional??=[]:P=o.wildcard??=[],P.push(w),P.length===2&&c?.push(P)}break}}o=y}if(p&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){let m=Mt(l);m.kind=eo,m.parent=o,s++,m.depth=s,o.pathless??=[],o.pathless.push(m),o=m}let g=(n.path||!n.children)&&!n.isRoot;if(g&&l.endsWith("/")){let m=Mt(l);m.kind=gt,m.parent=o,s++,m.depth=s,o.index=m,o=m}o.parse=p??null,o.priority=f?.params?.priority??0,g&&!o.route&&(o.route=n,o.fullPath=l)}if(n.children)for(let l of n.children)le(t,e,l,u,o,s,c,a)}i(le,"parseSegments");function no(t,e){if(t.parse&&!e.parse)return-1;if(!t.parse&&e.parse)return 1;if(t.parse&&e.parse&&(t.priority||e.priority))return e.priority-t.priority;if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}i(no,"sortDynamic");function Mt(t){return{kind:0,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}}i(Mt,"createStaticNode");function Mr(t,e,n,r,o){return{kind:t,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,caseSensitive:n,prefix:r,suffix:o}}i(Mr,"createDynamicNode");function oo(t,e){let n=Mt("/"),r=new Uint16Array(6),o=[];for(let s of t)le(!1,r,s,1,n,0,o);for(let s of o)s.sort(no);e.masksTree=n,e.flatCache=Ft(1e3)}i(oo,"processRouteMasks");function ro(t,e){t||="/";let n=e.flatCache.get(t);if(n!==void 0)return n;let r=He(t,e.masksTree);return e.flatCache.set(t,r),r}i(ro,"findFlatMatch");function so(t,e,n,r,o){t||="/",r||="/";let s=e?`case\0${t}`:t,c=o.singleCache.get(s);return c||(c=Mt("/"),le(e,new Uint16Array(6),{from:t},1,c,0),o.singleCache.set(s,c)),He(r,c,n)}i(so,"findSingleMatch");function io(t,e,n=!1){let r=n?t:`nofuzz\0${t}`,o=e.matchCache.get(r);if(o!==void 0)return o;t||="/";let s;try{s=He(t,e.segmentTree,n)}catch(c){if(c instanceof URIError)s=null;else throw c}return s&&(s.branch=je(s.route)),e.matchCache.set(r,s),s}i(io,"findRouteMatch");function Ar(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}i(Ar,"trimPathRight");function ao(t,e=!1,n){let r=Mt(t.fullPath),o=new Uint16Array(6),s=[],c={},a={},u=0;le(e,o,t,1,r,0,s,l=>{if(n?.(l,u),l.id in c&&mt(),c[l.id]=l,u!==0&&l.path){let f=Ar(l.fullPath);(!a[f]||l.fullPath.endsWith("/"))&&(a[f]=l)}u++});for(let l of s)l.sort(no);return{processedTree:{segmentTree:r,singleCache:Ft(1e3),matchCache:Ft(1e3),flatCache:null,masksTree:null},routesById:c,routesByPath:a}}i(ao,"processRouteTree");function He(t,e,n=!1){let r=t.split("/"),o=Br(t,r,e,n);if(!o)return null;let[s]=co(t,r,o);return{route:o.node.route,rawParams:s}}i(He,"findMatch");function co(t,e,n){let r=$r(n.node),o=null,s=Object.create(null),c=n.extract?.part??0,a=n.extract?.node??0,u=n.extract?.path??0,l=n.extract?.segment??0;for(;a<r.length;c++,a++,u++,l++){let f=r[a];if(f.kind===gt)break;if(f.kind===eo){l--,c--,u--;continue}let d=e[c],h=u;if(d&&(u+=d.length),f.kind===1){o??=n.node.fullPath.split("/");let p=o[l],g=f.prefix.length;if(p.charCodeAt(g)===123){let m=f.suffix.length,y=p.substring(g+2,p.length-m-1),R=d.substring(g,d.length-m);s[y]=decodeURIComponent(R)}else{let m=p.substring(1);s[m]=decodeURIComponent(d)}}else if(f.kind===3){if(n.skipped&1<<a){c--,u=h-1;continue}o??=n.node.fullPath.split("/");let p=o[l],g=f.prefix.length,m=f.suffix.length,y=p.substring(g+3,p.length-m-1),R=f.suffix||f.prefix?d.substring(g,d.length-m):d;R&&(s[y]=decodeURIComponent(R))}else if(f.kind===2){let p=f,g=t.substring(h+p.prefix.length,t.length-p.suffix.length),m=decodeURIComponent(g);s["*"]=m,s._splat=m;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:c,node:a,path:u,segment:l}]}i(co,"extractParams");function je(t){let e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}i(je,"buildRouteBranch");function $r(t){let e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}i($r,"buildBranch");function Br(t,e,n,r){if(t==="/"&&n.index)return{node:n.index,skipped:0};let o=!dt(e),s=o&&t!=="/",c=e.length-(o?1:0),a=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],u=null,l=null;for(;a.length;){let f=a.pop(),{node:d,index:h,skipped:p,statics:g,dynamics:m,optionals:y}=f,{extract:R,rawParams:v}=f;if(d.kind===2&&d.route&&!ce(l,f))continue;if(d.parse){if(!to(t,e,f))continue;v=f.rawParams,R=f.extract}r&&d.route&&d.kind!==gt&&ce(u,f)&&(u=f);let _=h===c;if(_&&(d.route&&(!s||d.kind===gt||d.kind===2)&&ce(l,f)&&(l=f),!d.optional&&!d.wildcard&&!d.index&&!d.pathless))continue;let x=_?void 0:e[h],L;if(_&&d.index){let b={node:d.index,index:h,skipped:p,statics:g,dynamics:m,optionals:y,extract:R,rawParams:v},S=!0;if(d.index.parse&&(to(t,e,b)||(S=!1)),S){if(!m&&!y&&!p&&Ur(g,c))return b;ce(l,b)&&(l=b)}}if(d.wildcard)for(let b=d.wildcard.length-1;b>=0;b--){let S=d.wildcard[b],{prefix:C,suffix:w}=S;if(!(C&&(_||!(S.caseSensitive?x:L??=x.toLowerCase()).startsWith(C)))){if(w){if(_)continue;let P=e.slice(h).join("/"),E=P.slice(-w.length);if((S.caseSensitive?E:E.toLowerCase())!==w||P.length-w.length<C.length)continue}a.push({node:S,index:c,skipped:p,statics:g,dynamics:m,optionals:y,extract:R,rawParams:v})}}if(d.optional){let b=p|1<<d.depth+1;for(let S=d.optional.length-1;S>=0;S--){let C=d.optional[S];a.push({node:C,index:h,skipped:b,statics:g,dynamics:m,optionals:y,extract:R,rawParams:v})}if(!_)for(let S=d.optional.length-1;S>=0;S--){let C=d.optional[S],{prefix:w,suffix:P}=C;if(w||P){let E=C.caseSensitive?x:L??=x.toLowerCase();if(w&&!E.startsWith(w)||P&&E.indexOf(P,E.length-P.length)<w.length)continue}a.push({node:C,index:h+1,skipped:p,statics:g,dynamics:m,optionals:y+ae(c,h),extract:R,rawParams:v})}}if(!_&&d.dynamic&&x)for(let b=d.dynamic.length-1;b>=0;b--){let S=d.dynamic[b],{prefix:C,suffix:w}=S;if(C||w){let P=S.caseSensitive?x:L??=x.toLowerCase();if(C&&!P.startsWith(C)||w&&P.indexOf(w,P.length-w.length)<C.length)continue}a.push({node:S,index:h+1,skipped:p,statics:g,dynamics:m+ae(c,h),optionals:y,extract:R,rawParams:v})}if(!_&&d.staticInsensitive){let b=d.staticInsensitive.get(L??=x.toLowerCase());b&&a.push({node:b,index:h+1,skipped:p,statics:g+ae(c,h),dynamics:m,optionals:y,extract:R,rawParams:v})}if(!_&&d.static){let b=d.static.get(x);b&&a.push({node:b,index:h+1,skipped:p,statics:g+ae(c,h),dynamics:m,optionals:y,extract:R,rawParams:v})}if(d.pathless)for(let b=d.pathless.length-1;b>=0;b--){let S=d.pathless[b];a.push({node:S,index:h,skipped:p,statics:g,dynamics:m,optionals:y,extract:R,rawParams:v})}}if(l)return l;if(r&&u){let f=u.index;for(let h=0;h<u.index;h++)f+=e[h].length;let d=f===t.length?"/":t.slice(f);return u.rawParams??=Object.create(null),u.rawParams["**"]=decodeURIComponent(d),u}return null}i(Br,"getNodeMatch");function ae(t,e){return 2**(t-e-1)}i(ae,"segmentScore");function Ur(t,e){return t===2**(e-1)-1}i(Ur,"isPerfectStaticMatch");function to(t,e,n){let r,o;try{[r,o]=co(t,e,n)}catch{return null}if(n.rawParams=r,n.extract=o,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}i(to,"validateParseParams");function ce(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&((e.node.kind===gt)>(t.node.kind===gt)||e.node.kind===gt==(t.node.kind===gt)&&e.node.depth>t.node.depth))):!0}i(ce,"isFrameMoreSpecific");function bt(t){return Kt(t.filter(e=>e!==void 0).join("/"))}i(bt,"joinPaths");function Kt(t){return t.replace(/\/{2,}/g,"/")}i(Kt,"cleanPath");function ue(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}i(ue,"trimPathLeft");function G(t){let e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}i(G,"trimPathRight");function qt(t){return G(ue(t))}i(qt,"trimPath");function yt(t,e){return t?.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}i(yt,"removeTrailingSlash");function fe(t,e,n){return yt(t,n)===yt(e,n)}i(fe,"exactPathTest");function Ke({base:t,to:e,trailingSlash:n="never",cache:r}){if(e.includes("//")&&(e=Kt(e)),e.startsWith("/"))return e.length===1||n==="preserve"?e:n==="always"?e.endsWith("/")?e:`${e}/`:e.endsWith("/")?e.slice(0,-1):e;let o=e===".",s;if(r){s=o?t:t+"\0"+e;let l=r.get(s);if(l)return l}let c;if(o)c=t.split("/");else{for(t.includes("//")&&(t=Kt(t)),c=t.split("/");c.length>1&&dt(c)==="";)c.pop();let l=e.split("/");for(let f=0,d=l.length;f<d;f++){let h=l[f];h===""?f?f===d-1&&c.push(h):c=[h]:h===".."?c.length>1?c.pop():c=[""]:h==="."||c.push(h)}}c.length>1&&(dt(c)===""?n==="never"&&c.pop():n==="always"&&c.push(""));let a=c.join("/"),u=(o?Kt(a):a)||"/";return s&&r&&r.set(s,u),u}i(Ke,"resolvePath");function uo(t){let e=new Map(t.map(o=>[encodeURIComponent(o),o])),n=Array.from(e.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>e.get(s)??s)}i(uo,"compileDecodeCharMap");function jt(t,e,n){let r=e[t];return typeof r!="string"?r:t==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>lo(o,n)).join("/"):lo(r,n)}i(jt,"encodeParam");function de({path:t,params:e,decoder:n,...r}){let o=!1,s=Object.create(null);if(!t||t==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!t.includes("$"))return{interpolatedPath:t,usedParams:s,isMissingParams:o};if(!1){let f=t.length,d=0,h="";for(;d<f;){for(;d<f&&t.charCodeAt(d)===47;)d++;if(d>=f)break;let p=d,g=t.indexOf("/",d);g===-1&&(g=f),d=g;let m=t.substring(p,g);if(m)if(m.charCodeAt(0)===36)if(m.length===1){let y=e._splat;if(s._splat=y,s["*"]=y,!y){o=!0;continue}let R=jt("_splat",e,n);h+="/"+R}else{let y=m.substring(1);!o&&!(y in e)&&(o=!0),s[y]=e[y];let R=jt(y,e,n)??"undefined";h+="/"+R}else h+="/"+m}return t.endsWith("/")&&(h+="/"),{usedParams:s,interpolatedPath:h||"/",isMissingParams:o}}let c=t.length,a=0,u,l="";for(;a<c;){let f=a;u=ze(t,f,u);let d=u[5];if(a=d+1,f===d)continue;let h=u[0];if(h===0){l+="/"+t.substring(f,d);continue}if(h===2){let p=e._splat;s._splat=p,s["*"]=p;let g=t.substring(f,u[1]),m=t.substring(u[4],d);if(!p){o=!0,(g||m)&&(l+="/"+g+m);continue}let y=jt("_splat",e,n);l+="/"+g+y+m;continue}if(h===1){let p=t.substring(u[2],u[3]);!o&&!(p in e)&&(o=!0),s[p]=e[p];let g=t.substring(f,u[1]),m=t.substring(u[4],d),y=jt(p,e,n)??"undefined";l+="/"+g+y+m;continue}if(h===3){let p=t.substring(u[2],u[3]),g=e[p];if(g==null)continue;s[p]=g;let m=t.substring(f,u[1]),y=t.substring(u[4],d),R=jt(p,e,n)??"";l+="/"+m+R+y;continue}}return t.endsWith("/")&&(l+="/"),{usedParams:s,interpolatedPath:l||"/",isMissingParams:o}}i(de,"interpolatePath");function lo(t,e){let n=encodeURIComponent(t);return e?.(n)??n}i(lo,"encodePathParam");function J(t){return t?.isNotFound===!0}i(J,"isNotFound");function Vr(){try{return sessionStorage}catch{return}}i(Vr,"getSafeSessionStorage");var Wr="tsr-scroll-restoration-v1_3",po=Vr();function zr(){try{return JSON.parse(po?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}i(zr,"createScrollRestorationCache");function Hr(){try{po?.setItem(Wr,JSON.stringify(At))}catch{}}i(Hr,"persistScrollRestorationCache");var At=zr(),fo="data-scroll-restoration-id",jr=i(t=>t.state.__TSR_key||t.href,"defaultGetScrollRestorationKey");function Kr(t){let e=t.getAttribute(fo);if(e)return`[${fo}="${e}"]`;let n="",r=t,o;for(;o=r.parentNode;){let s=1,c=r;for(;c=c.previousElementSibling;)s++;let a=`${r.localName}:nth-child(${s})`;n=n?`${a} > ${n}`:a,r=o}return n}i(Kr,"getScrollRestorationSelector");var he=!1,pe="window";function qe(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}i(qe,"getElement");function ho(t){let e=new Set;for(let n of t){if(n===pe)continue;let r=qe(n);r&&e.add(r)}return e}i(ho,"getScrollToTopElements");function mo(t,e){let n=e??t.options.scrollRestoration,r=t._scroll;if(n&&(r.restoring=!0),!1)return;let o=t.options.getScrollRestorationKey||jr,s=new Set,c=i(a=>{let u=At[a]||={};for(let l of s)l===document?u[pe]={scrollX,scrollY}:l.isConnected&&(u[Kr(l)]={scrollX:l.scrollLeft,scrollY:l.scrollTop})},"snapshotCurrentScrollTargets");n&&!r.restoration&&(r.restoration=!0,he=!1,history.scrollRestoration="manual",document.addEventListener("scroll",a=>{he||s.add(a.target)},!0),t.subscribe("onBeforeLoad",a=>{a.fromLocation&&c(o(a.fromLocation)),s.clear()}),addEventListener("pagehide",()=>{c(o(t.stores.resolvedLocation.get()??t.stores.location.get())),Hr()})),!r.reset&&(r.reset=!0,t.subscribe("onRendered",a=>{let u=t.options.scrollRestorationBehavior,l=t.options.scrollToTopSelectors,f=r.next,d=r.hash,h;if(s.clear(),r.next=!0,r.hash=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;let p=o(a.toLocation),g=a.fromLocation&&o(a.fromLocation);if(r.restoring&&g&&g!==p){let m=At[g];if(m){let y=At[p];for(let R in m){if(R===pe){if(f)continue}else{let v=qe(R);if(!v||f&&l&&(h??=ho(l),h.has(v)))continue}y||(y=At[p]={}),y[R]??=m[R]}}}he=!0;try{let m=a.toLocation.hash,y=a.toLocation.state.__hashScrollIntoViewOptions??!0,R=!1;if(f){!m&&l&&(h??=ho(l));let v=m&&y&&d,_=r.restoring?At[p]:void 0;if(_)for(let x in _){let{scrollX:L,scrollY:b}=_[x];if(x===pe){if(v)continue;scrollTo({top:b,left:L,behavior:u}),R=!0}else{let S=qe(x);S&&(S.scrollLeft=L,S.scrollTop=b,h?.delete(S))}}if(!m){let x={top:0,left:0,behavior:u};if(R||scrollTo(x),h)for(let L of h)L.scrollTo(x)}}!R&&m&&y&&document.getElementById(m)?.scrollIntoView(y)}finally{he=!1}}))}i(mo,"setupScrollRestoration");function go(t,e=String){let n=new URLSearchParams;for(let r in t){let o=t[r];o!==void 0&&n.set(r,e(o))}return n.toString()}i(go,"encode");function Ge(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}i(Ge,"toValue");function yo(t){let e=new URLSearchParams(t),n=Object.create(null);for(let[r,o]of e.entries()){let s=n[r];s==null?n[r]=Ge(o):Array.isArray(s)?s.push(Ge(o)):n[r]=[s,Ge(o)]}return n}i(yo,"decode");var qr=/^(?:\s|["[{\d-]|fa|nu|tr)/,vo=Gr(JSON.parse),Ro=Jr(JSON.stringify,JSON.parse);function Gr(t){return e=>{e[0]==="?"&&(e=e.substring(1));let n=yo(e);for(let r in n){let o=n[r];if(typeof o=="string")try{n[r]=t(o)}catch{}}return n}}i(Gr,"parseSearchWith");function Jr(t,e){let n=e===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(e&&typeof o=="string"){if(n&&!qr.test(o))return o;try{return e(o),t(o)}catch{}}return o}return i(r,"stringifyValue"),o=>{let s=go(o,r);return s?`?${s}`:""}}i(Jr,"stringifySearchWith");var tt="__root__";function So(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}let e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);let n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}i(So,"redirect");function me(t){return t instanceof Response&&!!t.options}i(me,"isRedirect");function _o(t){return{input:i(({url:e})=>{for(let n of t)e=ge(n,e);return e},"input"),output:i(({url:e})=>{for(let n=t.length-1;n>=0;n--)e=Je(t[n],e);return e},"output")}}i(_o,"composeRewrites");function wo(t){let e=qt(t.basepath),n=`/${e}`,r=t.caseSensitive?n:n.toLowerCase(),o=`${r}/`;return{input:i(({url:s})=>{let c=t.caseSensitive?s.pathname:s.pathname.toLowerCase();return c===r?s.pathname="/":c.startsWith(o)&&(s.pathname=s.pathname.slice(n.length)),s},"input"),output:i(({url:s})=>(s.pathname=bt(["/",e,s.pathname]),s),"output")}}i(wo,"rewriteBasepath");function ge(t,e){let n=t?.input?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}i(ge,"executeRewriteInput");function Je(t,e){let n=t?.output?.({url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}i(Je,"executeRewriteOutput");function Ye(t){let e=t;return{get(){return e},set(n){e=q(n,e)}}}i(Ye,"createNonReactiveMutableStore");function Xe(t){return{get(){return t()}}}i(Xe,"createNonReactiveReadonlyStore");function xo(t,e){let{createMutableStore:n,createReadonlyStore:r,batch:o}=e,s=new Map,c=n("idle"),a=n(t),u=n(void 0),l=n([]),f=r(()=>l.get().map(m=>s.get(m).get())),d=r(()=>({status:c.get(),isLoading:c.get()==="pending",matches:f.get(),location:a.get(),resolvedLocation:u.get()}));function h(m){let y=s.get(m);return y||(y=n(void 0),s.set(m,y)),y}i(h,"getMatchStore");let p={status:c,location:a,resolvedLocation:u,ids:l,matches:f,byRoute:s,__store:d,getMatchStore:h,setMatches:g};function g(m){let y=l.get(),R=m.map(v=>v.routeId);o(()=>{Qn(y,R)||l.set(R);for(let v of y)R.includes(v)||s.get(v).set(()=>{});for(let v of m){let _=h(v.routeId);_.get()!==v&&_.set(v)}})}return i(g,"setMatches"),p}i(xo,"createRouterStores");var vt="__TSR_index",bo="popstate",Co="beforeunload";function Qe(t){let e=t.getLocation(),n=new Set,r=i(c=>{e=t.getLocation(),n.forEach(a=>a({location:e,action:c}))},"notify"),o=i(c=>{t.notifyOnIndexChange??!0?r(c):e=t.getLocation()},"handleIndexChange"),s=i(async({task:c,navigateOpts:a,...u})=>{if(a?.ignoreBlocker??!1){c();return}let l=t.getBlockers?.()??[],f=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&l.length&&f)for(let d of l){let h=$t(u.path,u.state);if(await d.blockerFn({currentLocation:e,nextLocation:h,action:u.type})){t.onBlocked?.();return}}c()},"tryNavigation");return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:i(c=>(n.add(c),()=>{n.delete(c)}),"subscribe"),push:i((c,a,u)=>{let l=e.state[vt];a=Ze(l+1,a),s({task:i(()=>{t.pushState(c,a),r({type:"PUSH"})},"task"),navigateOpts:u,type:"PUSH",path:c,state:a})},"push"),replace:i((c,a,u)=>{let l=e.state[vt];a=Ze(l,a),s({task:i(()=>{t.replaceState(c,a),r({type:"REPLACE"})},"task"),navigateOpts:u,type:"REPLACE",path:c,state:a})},"replace"),go:i((c,a)=>{s({task:i(()=>{t.go(c),o({type:"GO",index:c})},"task"),navigateOpts:a,type:"GO"})},"go"),back:i(c=>{s({task:i(()=>{t.back(c?.ignoreBlocker??!1),o({type:"BACK"})},"task"),navigateOpts:c,type:"BACK"})},"back"),forward:i(c=>{s({task:i(()=>{t.forward(c?.ignoreBlocker??!1),o({type:"FORWARD"})},"task"),navigateOpts:c,type:"FORWARD"})},"forward"),canGoBack:i(()=>e.state[vt]!==0,"canGoBack"),createHref:i(c=>t.createHref(c),"createHref"),block:i(c=>{if(!t.setBlockers)return()=>{};let a=t.getBlockers?.()??[];return t.setBlockers([...a,c]),()=>{let u=t.getBlockers?.()??[];t.setBlockers?.(u.filter(l=>l!==c))}},"block"),flush:i(()=>t.flush?.(),"flush"),destroy:i(()=>t.destroy?.(),"destroy"),notify:r}}i(Qe,"createHistory");function Ze(t,e){e||(e={});let n=en();return{...e,key:n,__TSR_key:n,[vt]:t}}i(Ze,"assignKeyAndIndex");function tn(t){let e=t?.window??(typeof document<"u"?window:void 0),n=e.history.pushState,r=e.history.replaceState,o=[],s=i(()=>o,"_getBlockers"),c=i(S=>o=S,"_setBlockers"),a=t?.createHref??(S=>S),u=t?.parseLocation??(()=>$t(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!e.history.state?.__TSR_key&&!e.history.state?.key){let S=en();e.history.replaceState({[vt]:0,key:S,__TSR_key:S},"")}let l=u(),f,d=!1,h=!1,p=!1,g=!1,m=i(()=>l,"getLocation"),y,R=i(()=>{y&&(b._ignoreSubscribers=!0,(y[2]?e.history.pushState:e.history.replaceState)(y[1],"",y[0]),b._ignoreSubscribers=!1,y=void 0,f=void 0)},"flush"),v=i((S,C,w)=>{let P=a(C),E=!!y;E||(f=l),l=$t(C,w),y=[P,w,y?.[2]||S],E||queueMicrotask(()=>R())},"queueHistoryAction"),_=i(S=>{l=u(),b.notify({type:S})},"onPushPop"),x=i(async()=>{if(h){h=!1;return}let S=u(),C=S.state[vt]-l.state[vt],w=C===1,P=C===-1,E=!w&&!P||d;d=!1;let I=E?"GO":P?"BACK":"FORWARD",N=E?{type:"GO",index:C}:{type:P?"BACK":"FORWARD"};if(p)p=!1;else{let _t=s();if(typeof document<"u"&&_t.length){for(let nt of _t)if(await nt.blockerFn({currentLocation:l,nextLocation:S,action:I})){h=!0,e.history.go(1),b.notify(N);return}}}l=u(),b.notify(N)},"onPushPopEvent"),L=i(S=>{if(g){g=!1;return}let C=!1,w=s();if(typeof document<"u"&&w.length)for(let P of w){let E=P.enableBeforeUnload??!0;if(E===!0){C=!0;break}if(typeof E=="function"&&E()===!0){C=!0;break}}if(C)return S.preventDefault(),S.returnValue=""},"onBeforeUnload"),b=Qe({getLocation:m,getLength:i(()=>e.history.length,"getLength"),pushState:i((S,C)=>v(!0,S,C),"pushState"),replaceState:i((S,C)=>v(!1,S,C),"replaceState"),back:i(S=>(S&&(p=!0),g=!0,e.history.back()),"back"),forward:i(S=>{S&&(p=!0),g=!0,e.history.forward()},"forward"),go:i(S=>{d=!0,e.history.go(S)},"go"),createHref:i(S=>a(S),"createHref"),flush:R,destroy:i(()=>{e.history.pushState=n,e.history.replaceState=r,e.removeEventListener(Co,L,{capture:!0}),e.removeEventListener(bo,x)},"destroy"),onBlocked:i(()=>{f&&l!==f&&(l=f)},"onBlocked"),getBlockers:s,setBlockers:c,notifyOnIndexChange:!1});return e.addEventListener(Co,L,{capture:!0}),e.addEventListener(bo,x),e.history.pushState=function(...S){let C=n.apply(e.history,S);return b._ignoreSubscribers||_("PUSH"),C},e.history.replaceState=function(...S){let C=r.apply(e.history,S);return b._ignoreSubscribers||_("REPLACE"),C},b}i(tn,"createBrowserHistory");function Yr(t={initialEntries:["/"]}){let e=t.initialEntries,n=t.initialIndex?Math.min(Math.max(t.initialIndex,0),e.length-1):e.length-1,r=e.map((u,l)=>Ze(l,void 0)),o=i(()=>$t(e[n],r[n]),"getLocation"),s=[];return Qe({getLocation:o,getLength:i(()=>e.length,"getLength"),pushState:i((u,l)=>{n<e.length-1&&(e.splice(n+1),r.splice(n+1)),r.push(l),e.push(u),n=Math.max(e.length-1,0)},"pushState"),replaceState:i((u,l)=>{r[n]=l,e[n]=u},"replaceState"),back:i(()=>{n=Math.max(n-1,0)},"back"),forward:i(()=>{n=Math.min(n+1,e.length-1)},"forward"),go:i(u=>{n=Math.min(Math.max(n+u,0),e.length-1)},"go"),createHref:i(u=>u,"createHref"),getBlockers:i(()=>s,"_getBlockers"),setBlockers:i(u=>s=u,"_setBlockers")})}i(Yr,"createMemoryHistory");function Xr(t){let e=t.replace(/[\x00-\x1f\x7f]/g,"");return e.startsWith("//")&&(e="/"+e.replace(/^\/+/,"")),e}i(Xr,"sanitizePath");function $t(t,e){let n=Xr(t),r=n.indexOf("#"),o=n.indexOf("?"),s=en();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:e||{[vt]:0,key:s,__TSR_key:s}}}i($t,"parseHref");function en(){return(Math.random()+1).toString(36).substring(7)}i(en,"createRandomKey");function Po(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}i(Po,"routeNeedsLoad");function Ct(t,e){return{fromLocation:e,toLocation:t,pathChanged:e?.pathname!==t.pathname,hrefChanged:e?.href!==t.href,hashChanged:e?.hash!==t.hash}}i(Ct,"getLocationChangeInfo");function Lo({key:t,__TSR_key:e,__TSR_index:n,__hashScrollIntoViewOptions:r,...o}){return o}i(Lo,"_getUserHistoryState");function Io(t,e,n,r){for(let o of e){if(r&&t._tx!==r)return;n.some(s=>s.routeId===o.routeId)||t.routesById[o.routeId].options.onLeave?.(o)}for(let o of n){if(r&&t._tx!==r)return;t.routesById[o.routeId].options[e.some(s=>s.routeId===o.routeId)?"onStay":"onEnter"]?.(o)}}i(Io,"runRouteLifecycle");var nn=class{static{i(this,"RouterCore")}constructor(t,e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async n=>(n(),!1),this.update=n=>{let r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,c=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??!1??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=uo(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=tn()),this.origin=this.options.origin,this.origin||(!!1&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let l;if(!1){let f=globalThis.__TSR_CACHE__;this.resolvePathCache=f.resolvePathCache,l=f.processRouteTreeResult}else this.resolvePathCache=Ft(1e3),l=this.buildRouteTree(),!1;this.setRoutes(l)}if(!this.stores&&this.latestLocation){let l=this.getStoreConfig(this);this.batch=l.batch,this.stores=xo(this.latestLocation,l),mo(this)}let a=this.options.basepath??"/",u=this.options.rewrite;if(s||o!==a||c!==u){this.basepath=a;let l=[],f=qt(a);f&&f!=="/"&&l.push(wo({basepath:a})),u&&l.push(u),this.rewrite=l.length===0?void 0:l.length===1?l[0]:_o(l),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let n=ao(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&oo(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{let o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{for(let r of this.subscribers)if(r.eventType===n.type)try{r.fn(n)}catch(o){console.error(o)}},this.parseLocation=(n,r)=>{let o=i(({pathname:u,search:l,hash:f,href:d,state:h})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){let R=this.options.parseSearch(l),v=this.options.stringifySearch(R);return{href:u+v+f,publicHref:u+v+f,pathname:Dt(u).path,external:!1,searchStr:v,search:pt(r?.search,R),hash:Dt(f.slice(1)).path,state:rt(r?.state,h)}}let p=new URL(d,this.origin),g=ge(this.rewrite,p),m=this.options.parseSearch(g.search),y=this.options.stringifySearch(m);return g.search=y,{href:g.href.replace(g.origin,""),publicHref:d,pathname:Dt(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:y,search:pt(r?.search,m),hash:Dt(g.hash.slice(1)).path,state:rt(r?.state,h)}},"parse"),s=o(n),{__tempLocation:c,__tempKey:a}=s.state;if(c&&(!a||a===this.tempLocationKey)){let u=o(c);return u.state.key=s.state.key,u.state.__TSR_key=s.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>Ke({base:n,to:r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>{let r=Object.create(null),o=io(G(n),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=n=>{let r=i((s={})=>{if(s.href){let w=$t(s.href,{});s={...s,to:ge(this.rewrite,new URL(w.pathname,this.origin)).pathname,search:this.options.parseSearch(w.search),hash:w.hash.slice(1)}}let c=s._fromLocation||this._pendingLocation||this.latestLocation,a=this.matchRoutesLightweight(c);s.from;let u=s.unsafeRelative==="path"?c.pathname:s.from??a[1],l=a[2],f=a[3],d=this.resolvePathWithBase(u,s.to?`${s.to}`:"."),h=Eo(s.params,f),p=this.routesByPath[G(d)],g;if(p)g=this.getRouteBranch(p);else if(d.includes("$"))g=[];else{let[w,P,E]=this.getMatchedRoutes(d);g=w,this.options.notFoundRoute&&(!E||E.path!=="/"&&P["**"])&&(g=[...g,this.options.notFoundRoute])}if(g.length&&ht(h))for(let w of g){let P=w.options.params?.stringify??w.options.stringifyParams;if(P){h===f&&(h=Object.assign(Object.create(null),h));try{Object.assign(h,P(h))}catch{}}}let m=n.leaveParams?d:Dt(de({path:d,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=l;if(n._includeValidateSearch&&this.options.search?.strict){let w={};g.forEach(P=>{if(P.options.validateSearch)try{Object.assign(w,ye(P.options.validateSearch,{...w,...y}))}catch{}}),y=w}y=Zr(y,s,g,n._includeValidateSearch),y=pt(l,y);let R=this.options.stringifySearch(y),v=s.hash===!0?c.hash:s.hash?q(s.hash,c.hash):void 0,_=v?`#${v}`:"",x=s.state===!0?c.state:s.state?q(s.state,c.state):{};s.state&&(x=rt(c.state,x));let L=`${m}${R}${_}`,b,S,C=!1;if(this.rewrite){let w=new URL(L,this.origin),P=Je(this.rewrite,w);b=w.href.replace(w.origin,""),P.origin!==this.origin?(S=P.href,C=!0):S=P.pathname+P.search+P.hash}else b=Zn(L),S=b;return{publicHref:S,href:b,pathname:m,search:y,searchStr:R,state:x,hash:v??"",external:C,unmaskOnReload:s.unmaskOnReload}},"build"),o=r(n);if(n.mask)o.maskedLocation=r({from:n.from,...n.mask});else if(this.options.routeMasks){let s=ro(o.pathname,this.processedTree);if(s){let c=Object.assign(Object.create(null),s.rawParams),{from:a,params:u,...l}=s.route,f=Eo(u,c);o.maskedLocation=r({from:n.from,...l,params:f})}}return o},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{let s,c=G(this.latestLocation.href)===G(o.href)&&Q(Lo(o.state),Lo(this.latestLocation.state)),a=this._commitPromise,u,l=new Promise(f=>{u=f});if(l.resolve=()=>{u(),a?.resolve()},this._commitPromise=l,c)this.load();else{let{maskedLocation:f,hashScrollIntoView:d,...h}=o;f&&(h={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,s=o.replace?"REPLACE":"PUSH",this.history[s==="REPLACE"?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:s}})}return this._scroll.next=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:c,...a}={})=>{let u=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=u;let l=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:c});return queueMicrotask(()=>{this._pendingLocation===u&&(this._pendingLocation=void 0)}),l},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...c})=>{let a=!1;if(o)try{new URL(`${o}`),a=!0}catch{}if(a&&!r&&(r=!0),r){if(n!==void 0||!o){let l=this.buildLocation({to:n,...c});o=o??l.publicHref,s=s??l.publicHref}let u=!a&&s?s:o;if(st(u,this.protocolAllowlist))return;if(!c.ignoreBlocker){let l=this.history.getBlockers?.()??[];for(let f of l)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return}c.replace?window.location.replace(u):window.location.href=u;return}return this.buildAndCommitLocation({...c,href:o,to:n,_isNavigate:!0})},this.load=async n=>{if(!1)return(void 0)(this,n);this.updateLatestLocation(),n?.action&&(this._scroll.hash=n.action.type==="PUSH"||n.action.type==="REPLACE"),await Oo(this,n)},this.startViewTransition=n=>{let r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&!!1&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){let s=this.latestLocation,c=this.stores.resolvedLocation.get(),a=typeof r.types=="function"?r.types(Ct(s,c)):r.types;if(a===!1)return n();o={update:n,types:a}}else o=n;return document.startViewTransition(o).updateCallbackDone}return n()},this.invalidate=n=>{let r=this._committed,o=n?.filter,s=this._preloads,c=new Set([...r,...this._cache.values(),...[...s?.values()??[]].flat(),...this._tx?.[3]??[]].filter(l=>!o||o(l)).map(l=>l.id)),a=[];for(let[l,f]of s??[])f.some(d=>c.has(d.id))&&(s.delete(l),a.push(l));let u=i(l=>{if(c.has(l.id)){let f=this.routesById[l.routeId],d={...l,invalid:!0,...(n?.forcePending||l.status==="error"||l.status==="notFound")&&Po(f)?{status:"pending",error:void 0}:void 0};return l._flight=void 0,d}return l},"invalidate");this._committed=r.map(u);for(let[l,f]of this._cache)c.has(l)&&(f.invalid=!0,n?.forcePending&&(f.status="pending"));for(let l of c)this._flights?.delete(l);for(let l of a)l.abort();return this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{let r=n.headers.get("Location");if(n.options.href){if(r)try{let o=new URL(r);if(this.origin&&o.origin===this.origin){let s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}}else{let o=this.buildLocation(n.options).publicHref||"/";n.options.href=o,n.headers.set("Location",o)}if(n.options.href&&st(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{let r=this._cache,o=this._preloads,s=n?.filter,c=[],a=[];for(let[l,f]of r)(!s||s(f))&&(a.push(l),c.push(f));let u=[];for(let[l,f]of o??[])(!s||f.some(s))&&(u.push(l),c.push(...f));for(let l of a)r.delete(l);for(let l of u)o.delete(l);for(let l of c){let f=l._flight;l._flight=void 0,f&&!--f[2]&&(this._flights?.get(l.id)===f&&this._flights.delete(l.id),u.push(f[1]))}for(let l of u)l.abort()},this.loadRouteChunk=Pt,this.preloadRoute=n=>To(this,n),this.matchRoute=(n,r)=>{let o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o),c=this.stores.status.get()==="pending";if(r?.pending&&!c)return!1;let a=r?.pending??!c?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=so(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,a.pathname,this.processedTree);return!u||n.params&&!Q(u.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Q(a.search,s.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.getStoreConfig=e,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ro,parseSearch:t.parseSearch??vo,protocolAllowlist:t.protocolAllowlist??We}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:t,routesByPath:e,processedTree:n}){this.routesById=t,this.routesByPath=e,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(t){let e=this.routeBranchCache.get(t);return e||(e=je(t),this.routeBranchCache.set(t,e)),e}matchRoutesInternal(t,e){let[n,r,o]=this.getMatchedRoutes(t.pathname),s=n,c=!1;(o?o.path!=="/"&&r["**"]:G(t.pathname))&&(this.options.notFoundRoute?s=[...s,this.options.notFoundRoute]:c=!0);let a=c?Qr(this.options.notFoundMode,s):void 0,u=new Array(s.length),l=this._committed,f=i((h,p)=>{let g=l[p];return g?.routeId===h.id?g:h===this.options.notFoundRoute?l.find(m=>m.routeId===h.id):void 0},"previousAt"),d;for(let h=0;h<s.length;h++){let p=s[h],g=u[h-1],m,y,R;{let N=g?.search??t.search,_t=g?._strictSearch??void 0;try{let nt=ye(p.options.validateSearch,{...N})??void 0;m={...N,...nt},y={..._t,...nt}}catch(nt){let oe=nt;if(nt instanceof Gt||(oe=new Gt(nt.message,{cause:nt})),e?.throwOnError)throw oe;m=N,y={},R=oe}}let v="",_="";try{v=p.options.loaderDeps?.({search:m})??"",_=v&&JSON.stringify(v)||""}catch(N){if(e?.throwOnError)throw N;R??=N}let{interpolatedPath:x,usedParams:L}=de({path:p.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),b=p.id+x+_,S=f(p,h),C=this._cache.get(b)??(S?.id===b?S:void 0);d=C?._strictParams??Object.assign(L,d);let w;if(!C)try{ko(p,d)}catch(N){if(J(N)||me(N)?w=N:w=new No(N.message,{cause:N}),e?.throwOnError)throw w}let P=S?"stay":"enter",E;if(C)E={...C,cause:P,search:S?pt(S.search,m):pt(C.search,m),_strictSearch:y,searchError:R};else{let N=Po(p)?"pending":"success";E={id:b,ssr:p.options.ssr,index:h,routeId:p.id,params:S?.params??d,_strictParams:d,pathname:x,updatedAt:Date.now(),search:S?pt(S.search,m):m,_strictSearch:y,searchError:R,status:N,isFetching:!1,error:void 0,paramsError:w,context:{},abortController:e?._controller??new AbortController,cause:P,loaderDeps:S?rt(S.loaderDeps,v):v,invalid:!1,preload:!1,staticData:p.options.staticData||{},fullPath:p.fullPath}}let I=a===p.id;E._notFound&&!I&&(E.error=void 0),E._notFound=I,u[h]=E}for(let h=0;h<u.length;h++){let p=u[h];p.params=p.cause==="stay"?pt(p.params,d):d,e?._controller&&(p.context={})}return u}matchRoutesLightweight(t){let e=dt(this.stores.ids.get()),n=e?this.stores.byRoute.get(e).get():void 0,r=n?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];let[s,c]=this.getMatchedRoutes(t.pathname),a=dt(s),u={...t.search};for(let h of s)try{Object.assign(u,ye(h.options.validateSearch,u))}catch{}let l=n&&n.routeId===a.id&&n.pathname===t.pathname,f;if(l)f=n.params;else{let h=Object.assign(Object.create(null),c);for(let p of s)try{ko(p,h)}catch{}f=h}let d=[s,a.fullPath,u,f];return this.lightweightCache.set(t,[r,d]),d}},Gt=class extends Error{static{i(this,"SearchParamError")}},No=class extends Error{static{i(this,"PathParamError")}};function ye(t,e){if(t==null)return{};if("~standard"in t){let n=t["~standard"].validate(e);if(n instanceof Promise)throw new Gt("Async validation not supported");if(n.issues)throw new Gt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}i(ye,"validateSearch");function Zr(t,e,n,r){let o=[];for(let c of n){let a=c.options;if("search"in a)a.search?.middlewares&&o.push(...a.search.middlewares);else if(a.preSearchFilters||a.postSearchFilters){let l=i(({search:f,next:d})=>{let h=d(a.preSearchFilters?a.preSearchFilters.reduce((p,g)=>g(p),f):f);return a.postSearchFilters?a.postSearchFilters.reduce((p,g)=>g(p),h):h},"legacyMiddleware");o.push(l)}let u=a.validateSearch;if(r&&u){let l=i(({search:f,next:d,meta:h})=>{let p=d(f);try{let g=ye(u,p);if(h&&g)for(let m in g)m in p||(h.defaulted||=new Map).set(m,g[m]);return{...p,...g}}catch{}return p},"validate");o.push(l)}}let s=i((c,a,u)=>{if(c>=o.length){if(!e.search)return{};if(e.search===!0)return a;let f=q(e.search,a);return u&&(u.explicit=f),f}let l=i((f,d)=>{if(d){let h=u||{};return{search:s(c+1,f,h),meta:h}}return s(c+1,f,u)},"next");return o[c]({search:a,next:l,meta:u})},"applyNext");return s(0,t)}i(Zr,"applySearchMiddleware");function Qr(t,e){if(t!=="root"){let n;for(let r=e.length-1;r>=0;r--){let o=e[r];if(o.options.notFoundComponent)return o.id;n||=o.children&&o.id}if(n)return n}return tt}i(Qr,"findGlobalNotFoundRouteId");function Eo(t,e){if(t===!1||t===null)return Object.create(null);if((t??!0)===!0)return e;let n=Object.assign(Object.create(null),e);return Object.assign(n,q(t,n))}i(Eo,"resolveNextParams");function ko(t,e){let n=t.options.params?.parse??t.options.parseParams;n&&Object.assign(e,n(e))}i(ko,"extractStrictParams");function on(t,e){return t.options[e]?.preload?.()}i(on,"preloadComponent");function ts(t,e){let n=on(t,"component"),r=on(t,"pendingComponent");return e&&(r?r=r.then(e):e()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}i(ts,"loadComponents");function Pt(t,e,n){let r=i(()=>e===!1?void 0:e?on(t,e):ts(t,n),"afterLazy"),o=t._lazy;if(o)return o===!0?r():o.then(r);if(!t.lazyFn)return r();let s=t.lazyFn().then(c=>{{let{id:a,...u}=c.options;Object.assign(t.options,u),t._lazy=!0}},c=>{throw t._lazy=void 0,c});return t._lazy=s,s.then(r)}i(Pt,"loadRouteChunk");function an(t){let e=t.findIndex(n=>n.status!=="success"||n._notFound)+1;return e&&e<t.length?t.slice(0,e):t}i(an,"_getRenderedMatches");var it=0,ft=1,Re=2,Y=3,Rt=[4];function Xt(t){return typeof t[0]=="number"}i(Xt,"isControl");function Et(t,e){return e.aborted?Promise.race([Promise.reject(e),t]):new Promise((n,r)=>{let o=i(()=>r(e),"abort");e.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(n,r).finally(()=>e.removeEventListener("abort",o))})}i(Et,"waitFor");function kt(t,e){return t.routesById[e.routeId]}i(kt,"getRoute");function Zt(t,e,n){return me(t)?[Y,t]:J(t)?(t.routeId||=n,[Re,t]):e?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[ft,t]):[it,t]}i(Zt,"normalize");function cn(t,e){let n=Zt(e,!0,t.id);if(n[0]!==ft)return n;try{t.options.onError?.(n[1])}catch(r){n=Zt(r,!0,t.id)}return n}i(cn,"normalizeError");function Yt(t,e,n,r,o){return o[0].signal.aborted?Rt:fn(t,e,n,cn(n,r),o)}i(Yt,"normalizeLaneError");async function es(t,e,n,r,o,s){let[c,a]=e,u=n[0].signal,l=!!n[3];for(let f=n[6]??0;f<r;f++){let d=a[f],h=kt(t,d);d.abortController=n[0];let p=a[f-1]?.context??t.options.context??{},g={params:d.params,location:c,navigate:i(v=>t.navigate({...v,_fromLocation:c}),"navigate"),buildLocation:t.buildLocation,cause:l?"preload":d.cause,abortController:n[0],preload:l,matches:a,routeId:h.id};try{let v=d._ctx||=h.options.context?h.options.context({...g,deps:d.loaderDeps,context:p})||{}:void 0;d.context={...p,...v}}catch(v){return ut(t,d),[f,Yt(t,e,h,v,n)]}if(u.aborted)return[f,Rt];let m=d.paramsError??d.searchError;if(m!==void 0)return ut(t,d),[f,Yt(t,e,h,m,n)];let y=h.options.beforeLoad;if(!y)continue;let R=d.status;f>=s&&(d.status="pending",n[7]?.());try{Qt(t,d,"beforeLoad",n[0]);let v=await Et(y({...g,search:d.search,context:d.context,...t.options.additionalContext}),u);if(u.aborted)return[f,Rt];let _=fn(t,e,h,Zt(v,!1,h.id),n);if(_[0]!==it)return ut(t,d),[f,_];d.context={...d.context,...v}}catch(v){return ut(t,d),[f,Yt(t,e,h,v,n)]}finally{d.status=R,Qt(t,d,!1,n[0])}}o()}i(es,"contextualize");function ln(t,e,n){if(!(!n||--n[2])){if(t._flights?.get(e.id)===n){let r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(e)&&r[3].some(o=>o.id===e.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(e.id)}return n[1]}}i(ln,"releaseOwnedFlight");function ut(t,e){let n=e._flight;e._flight=void 0,ln(t,e,n)?.abort()}i(ut,"releaseFlight");function j(t,e,n,r){let o=[];for(let s of e)if(!n?.includes(s)){let c=s._flight;if(s._flight=void 0,r&&c?.[2]===1&&t._flights?.get(s.id)===c&&n?.some(a=>a.id===s.id))c[2]=0;else{let a=ln(t,s,c);a&&o.push(a)}}for(let s of o)s.abort()}i(j,"transferMatchResources");function un(t){for(let e of t){let n=e._flight;n&&n[2]++}}i(un,"acquireMatchResources");function Qt(t,e,n,r){if(e.isFetching=n,r&&t._tx?.[0]!==r)return;let o=t.stores.byRoute.get(e.routeId),s=o?.get();s?.id===e.id&&o.set({...s,isFetching:n})}i(Qt,"setFetching");function Bo(t,e,n,r,o,s,c){let a=e[0];return{params:n.params,location:a,navigate:i(u=>t.navigate({...u,_fromLocation:a}),"navigate"),cause:c?"preload":n.cause,abortController:o,preload:c,deps:n.loaderDeps,parentMatchPromise:s,context:n.context,route:r,...t.options.additionalContext}}i(Bo,"getLoaderContext");async function Do(t,e,n,r,o,s,c){let a=c[0],u=a.signal;if(u.aborted)return Rt;if(!o)return[it,void 0];let l=n._flight;Qt(t,n,"loader",a);try{if(!l){let f=new AbortController;l=[Promise.resolve().then(()=>o(Bo(t,e,n,r,f,s,!!c[3]))).then(d=>Zt(d,!1,r.id),d=>Zt(d,!0,r.id)).then(d=>(d[0]!==it&&t._flights?.get(n.id)===l&&(t._flights.delete(n.id),l[2]||f.abort()),d[0]===ft&&l[2]?cn(r,d[1]):d)),f,1],(t._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],fn(t,e,r,await Et(l[0],u),c)}catch(f){if(f!==u||!u.aborted)throw f;return ut(t,n),Rt}finally{Qt(t,n,!1,a)}}i(Do,"loadResource");function Fo(t,e,n){e[0]!==Y&&(t.status="success",t.error=void 0,e[0]===it?(t.loaderData=e[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=n):t.invalid=!0)}i(Fo,"settleInto");function ns(t,e,n){let r=t._cache.get(e.id);if(r!==n||t._committed.some(s=>s.id===e.id&&s._flight===e._flight))return;let o={...e,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(e.id,o),r&&ut(t,r)}i(ns,"cacheLoaderMatch");function Mo(t,e){return e[0]===ft||e[0]===Re?{...t,status:e[0]===ft?"error":"notFound",error:e[1],_flight:void 0}:t}i(Mo,"getParentSnapshot");function os(t,e,n,r,o,s,c){let a=e[1][n],u=kt(t,a),l=!!s[3],f=t._cache.get(a.id),d,h=!1,p;try{if(a.status==="success"&&(d=u.options.shouldReload,typeof d=="function"&&(d=d(Bo(t,e,a,u,s[0],o,l))),s[0].signal.aborted&&(p=Rt)),!p)if(a.status!=="success")h=!0;else{let I=l||a.preload?u.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:u.options.staleTime??t.options.defaultStaleTime??0;h=!!(a.invalid||d||d===void 0&&Date.now()-a.updatedAt>=I&&(s[5]||a.cause==="enter"||s[2].some(N=>N.routeId===a.routeId&&N.id!==a.id)))}}catch(I){a.invalid=!0,ut(t,a),p=Yt(t,e,u,I,s)}let g=u.options.loader,m=typeof g=="function",y=m?g:g?.handler,R=!l||u.options.preload!==!1,v=R&&g?t._flights?.get(a.id):void 0;v===a._flight||p?v=void 0:v&&!h&&!l&&d===void 0?h=!0:h||(v=void 0);let _=!!(g&&h&&a.status==="success"&&!l&&!s[4]&&((m?void 0:g.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),x=h&&R,L=x&&!_&&(a.status!=="success"||!!g),b=n>=c?s[7]:void 0,S=u.lazyFn&&u._lazy!==!0?b:void 0;if(x&&!g&&(a.invalid=!1,a.updatedAt=Date.now()),v&&v[2]++,L){let I=a._flight;a._flight=v,ln(t,a,I)?.abort(),n>=c&&(a.status="pending"),b?.()}x||(a.isFetching=!1);let C=(p?Promise.resolve(p):L?Do(t,e,a,u,y,o,s):Promise.resolve([it,a.loaderData])).then(I=>(L&&(Fo(a,I,l),I[0]===it&&(g&&!s[0].signal.aborted&&ns(t,a,f),n>=c&&(a.status="pending"))),I)),w=Et(Promise.resolve().then(()=>Pt(u,void 0,S)),s[0].signal).then(()=>{},I=>e[1].some((N,_t)=>_t<=n&&(N.status==="error"||N.status==="notFound"||N._notFound))?void 0:[n,Yt(t,e,u,I,s)]).then(I=>C.then(N=>(L&&!I&&N[0]===it&&a.status==="pending"&&!s[0].signal.aborted&&(a.status="success",b?.()),I)));if(r.push([n,C,w]),!_)return C.then(I=>Mo(a,I));let P={...a,status:"pending",preload:!1,_flight:v};a.invalid=!1,a.isFetching="loader";let E=Do(t,e,P,u,y,o,s).then(I=>(a.isFetching=!1,Fo(P,I,!1),I));return(e[2]??=[]).push([n,E,w,P]),E.then(I=>Mo(P,I))}i(os,"createLoaderTask");async function rn(t,e,n,r,o=0){let s=n?.[1][1],c=s?.routeId?e.findIndex(a=>a.routeId===s.routeId):n?.[0]??e.length-1;c<0&&(c=0);for(let a=c;a>=0;a--){let u=kt(t,e[a]);try{let l=Pt(u,!1);l&&await Et(l,r)}catch(l){if(l===r&&r.aborted)throw l}if(u.options.notFoundComponent)return a}return s?.routeId?c:o}i(rn,"getNotFoundBoundary");function Lt(t,e){e[2]&&(j(t,e[2].map(n=>n[3])),e[2]=void 0)}i(Lt,"discardBackground");async function Ao(t,e,n,r){let o;try{await Promise.all(t.map(s=>s[1].then(async c=>{let a=s[0];if(!(r&&a>=await r)){if(c[0]>=Y)throw[a,c];!o&&c[0]!==it&&(o=[a,c],await Promise.all((n??[]).map(u=>{if(!(u[0]<=a))return u[1].then(l=>{if(l[0]===Y)throw[u[0],l]})})))}})))}catch(s){return s}return e??o}i(Ao,"settleTasks");function fn(t,e,n,r,o,s){for(;r[0]===Y;){let c=r[1],a=c.options;if(a.reloadDocument?o[3]:o[1]>=20)return r;try{return a.href&&a.reloadDocument?(t.resolveRedirect(c),r):[Y,c,t.buildLocation({...a,_fromLocation:e[0],_includeValidateSearch:!0})]}catch(u){r=s?[ft,u]:cn(n,u),s=!0}}return r}i(fn,"materializeRedirect");async function Uo(t,e,n,r,o,s){let c=e[1],a=await o,u=!1,l=c.findIndex(p=>p._notFound),f=i(p=>p[1][0]===Re?rn(t,c,p,r.signal):p[0],"boundaryOf"),d=l<0?c.length:l;if((a?.[1][0]??0)>=Y)d=0;else if(a){d=a[2]??=await f(a);for(let p of n){if(p[0]>=d)break;let g=await p[1];if(g[0]!==it&&g[0]<Y&&!("loaderData"in c[p[0]])){a=[p[0],g],d=a[2]=await f(a);break}}}for(let p of n){if(p[0]>=d)break;let g=await p[2];if(g){a=g;break}}if((a?.[1][0]??0)>=Y){let p=a[1];if(p[0]!==Y||p[1].options.reloadDocument||p[2])return Lt(t,e),p;u=!0,a=[0,[ft,new Error("Too many redirects")]]}let h=a?a[2]??await f(a):l;if(h>=0){let p=a?.[1],g=p?.[0],m=c[h],y=p?.[1],R=i(()=>{p&&(m._notFound=void 0,g===ft?m.status="error":(y.routeId=m.routeId,m.routeId===t.routeTree.id?(m.status="success",m._notFound=!0):m.status="notFound"),m.error=y,m.isFetching=!1)},"install");R(),p||s?.();let v=kt(t,m);try{await Et(p?Promise.resolve().then(()=>Pt(v,g===ft?"errorComponent":"notFoundComponent")):Promise.all([Pt(v),Pt(v,"notFoundComponent")]),r.signal)}catch(_){if(_===r.signal&&r.signal.aborted)return Lt(t,e),Rt}p?u&&(r.abort(),await Promise.all([...n.map(_=>_[1]),...n.map(_=>_[2]),...(e[2]??[]).map(_=>_[1])]),Lt(t,e),j(t,c),R()):m.status="success"}return e}i(Uo,"reduceLane");async function Vo(t,e,n,r=0,o=e[1].length){let s=e[1];for(let c=r;c<o;c++){let a=s[c],u=kt(t,a).options;if(u.head||u.scripts)try{let l={ssr:t.options.ssr,matches:s,match:a,params:a.params,loaderData:a.loaderData},[f,d]=await Et(Promise.all([u.head?.(l),u.scripts?.(l)]),n);a.meta=f?.meta,a.links=f?.links,a.headScripts=f?.scripts,a.styles=f?.styles,a.scripts=d}catch(l){if(l===n&&n.aborted)break;console.error(l)}if(a.status!=="success"||a._notFound)break}return e}i(Vo,"projectLane");async function Wo(t,e,n,r){let o=[e,n],s=r[0].signal,c;try{let a=t.stores.matches.get(),u=n.findIndex(R=>R._notFound);if(t.options.notFoundMode!=="root"&&u>=0){let R=await rn(t,n,void 0,s,u);n[u]._notFound=void 0,n[R]._notFound=!0,u=R}let l=u<0?n.length:u+1,f=0;for(;f<l&&f!==u;){let R=n[f],v=r[2][f],_=a[f];if(v?.id!==R.id||v.status!=="success"||v._notFound||R.preload||_?.id!==R.id||_.status!=="success"||_._notFound)break;f++}let d=[],h=r[6]??0,p=h?Promise.resolve(n[h-1]):void 0,g=i(()=>{for(let R=h;R<l&&!s.aborted;R++)p=os(t,o,R,d,p,r,f)},"planSuccessfulLane"),m=await es(t,o,r,l,g,f);if(m){if(r[4]=!0,l=m[0],m[1][0]===Re){let R=await rn(t,n,m,s);m[2]=R,l=Math.min(l,R+1)}else m[1][0]>=Y&&(l=0);g()}if(!s.aborted&&!r[3]){let R=[];for(let[v,_]of t._flights??[])_[2]||(t._flights.delete(v),R.push(_[1]));for(let v of R)v.abort()}let y=Uo(t,o,d,r[0],Ao(d,m,o[2]),r[7]);o[2]?.length&&(o[3]=Ao(o[2],void 0,void 0,y.then(R=>Xt(R)?0:an(n).length,()=>0))),c=await y}catch(a){if(Lt(t,o),a===s&&s.aborted)return Rt;throw a}return Xt(c)?c:Vo(t,c,s,r[6]===n.length?r[6]:0)}i(Wo,"executeClientLane");function sn(t,e){if(t._tx!==e)return;let n=e[3],r=t.stores.matches.get(),o=t._pending;for(let s=0;s<n.length;s++){let c=n[s],a=c.status==="success"&&!c._notFound,u=r[s]?.id===c.id&&r[s]?.status==="pending";if(a&&!u)continue;let l=kt(t,c),f=a||c.invalid?0:l.options.pendingMs??t.options.defaultPendingMs,d=l.options.pendingComponent??t.options.defaultPendingComponent;if(!d||typeof f!="number"||f===1/0){o&&(o[0]=e,o[2]=0,o[4]=!0);return}let h=l.options.pendingMinMs??t.options.defaultPendingMinMs??0,p=!1;if(o?.[1]===c.id?(p=o[0]!==e,o[0]=e):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[e,c.id,u?Date.now()+h:e[4]+f,void 0,u||void 0,d]),o[4]&&!p&&o[5]===d)return;if(o[5]=d,!o[4]){clearTimeout(o[3]);let y=o[2]-Date.now();if(y>0){o[3]=setTimeout(()=>sn(t,e),y);return}o[2]=0}let g=n.map(y=>({...y,_flight:void 0}));g[s].status="pending";let m=o[4]=t.startTransition(()=>t.stores.setMatches(g),g).then(y=>(y&&t._pending===o&&o[4]===m&&!o[2]&&(o[2]=Date.now()+h),y));return}}i(sn,"offerPending");function Jt(t,e){let n=t._pending;(t._tx===e||!t._tx?.[3].some(r=>r.id===n?.[1]))&&(clearTimeout(n?.[3]),t._pending=void 0)}i(Jt,"finishPending");async function $o(t,e){let n=t._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!an(e[3]).some(s=>s.id===n[1]))return;let o;try{await Et(new Promise(s=>{o=setTimeout(s,r)}),e[0].signal)}catch{}clearTimeout(o)}i($o,"awaitPendingMinimum");function zo(t,e){t._committed=e,t.stores.setMatches(e)}i(zo,"publishMatches");function rs(t,e,n,r){let o=t._committed,s=t._cache;for(let u of n)u.preload=!1,r&&(u._assetEnd=void 0);let c=an(n).length,a=new Map;{let u=Date.now();for(let l of[...o,...s.values()]){if(l.status!=="success"||n.some((d,h)=>d.id===l.id&&(h<c||d.status==="success")))continue;let f=kt(t,l);!f.options.loader||u-l.updatedAt>=(l.preload?f.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:f.options.gcTime??t.options.defaultGcTime??3e5)||a.set(l.id,s.get(l.id)===l?l:{...l,_flight:void 0,isFetching:!1,context:{}})}}e[3]=[],t._cache=a,zo(t,n),j(t,[...s.values(),...o],[...n,...a.values()]),Io(t,o,n,e)}i(rs,"commitMatches");async function ve(t,e){let n=t._tx;for(;n&&n!==e;){if(await n[5],t._tx===n)return;n=t._tx}}i(ve,"awaitCurrent");function Ho(t,e,n){let r=n[1].options,o=n[2];if(!o)return t.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return t.navigate({href:o.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=e[1]+1,t._pendingLocation=o;let s=t.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===o&&(t._pendingLocation=void 0)}),s}i(Ho,"followRedirect");async function ss(t,e,n,r,o){let s=n.map(u=>({...u}));un(s);for(let u of r)ut(t,s[u[0]]),s[u[0]]=u[3];let c=[e[2],s],a;try{a=await Uo(t,c,r,e[0],o)}catch(u){throw j(t,s),u}if(Xt(a)){j(t,s),a[0]===Y&&t._tx===e&&t._committed===n&&await Ho(t,e,a);return}if(await Vo(t,a,e[0].signal),t._tx!==e||t._committed!==n){j(t,s);return}for(let u of s){let l=t._cache.get(u.id);l?._flight&&l._flight===u._flight&&(t._cache.delete(u.id),ut(t,l))}zo(t,s),j(t,n,s)}i(ss,"runBackground");async function is(t,e,n,r,o,s){let c=await Wo(t,e[2],e[3],[e[0],e[1],t._committed,void 0,o,n,s,r]);if(Xt(c)){let d=c[0]===Y&&t._tx===e;if((!d||c[1].options.reloadDocument)&&Jt(t,e),j(t,e[3]),e[3]=[],!d)return;if(t._tx!==e){Jt(t,e);return}await Ho(t,e,c);return}let a=c[1];if(t._tx===e&&await $o(t,e),t._tx!==e){Jt(t,e),j(t,a),Lt(t,c);return}let u=e[2],l=Ct(u,t.stores.resolvedLocation.get()),f=c[2];await t.startViewTransition(async()=>{if(t._tx===e&&await $o(t,e),t._tx!==e){Jt(t,e),j(t,a),Lt(t,c);return}let d=i(()=>{Jt(t,e),rs(t,e,a,s),t._tx===e&&(t.emit({type:"onLoad",...l}),t._tx===e&&t.emit({type:"onBeforeRouteMount",...l}))},"commit"),h=await t.startTransition(d,a);if(t._tx!==e){Lt(t,c);return}f?.length&&ss(t,e,a,f,c[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(u),t.stores.status.set("idle"),t._tx===e&&t.emit({type:"onResolved",...l}),h&&t._tx===e&&t.emit({type:"onRendered",...l})}),t._tx===e&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}i(is,"runClientTransaction");async function Oo(t,e){let n=!1,r=t._tx,o=t.stores.resolvedLocation.get(),s=o??t.stores.location.get(),c=t.latestLocation,a=t._pendingLocation,u=a?.href===c.href?a._redirects??0:0,l=t._handoff,f=n?void 0:l?.[0](),d=new AbortController,h=t._preflight;if(t._preflight=d,!n&&!f&&l?.[1](),h?.abort(),!d.signal.aborted){let L=Ct(c,o);t.emit({type:"onBeforeNavigate",...L}),d.signal.aborted||t.emit({type:"onBeforeLoad",...L})}if(d.signal.aborted){await ve(t,r);return}let p=s.href===c.href,g=d,m=t.matchRoutes(c,{_controller:d});un(m);let y=f?l[1](m):void 0;if(y?g=f:f?.abort(),d.signal.aborted){j(t,m),await ve(t,r);return}t._preflight=void 0;let R,v=i(()=>is(t,x,p,()=>sn(t,x),e?.sync,y),"run"),_=e?.sync?new Promise(L=>R=L):Promise.resolve().then(v).then(),x=[g,u,c,m,Date.now(),_];if(t._tx=x,r){for(let L of t.stores.matches.get()){if(t._tx!==x)break;L.isFetching&&Qt(t,L,!1)}r[0].abort(),j(t,r[3],x[3],!0)}if(t._tx!==x){j(t,x[3]),x[3]=[],R?.(),await ve(t,x);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(y||!t._committed.length&&m[0]?.status!=="success"&&!m.some(L=>L._notFound))&&sn(t,x),R?.(v()),await _,await ve(t,x)}i(Oo,"loadClientRoute");async function To(t,e){let n=t.buildLocation(e);for(let r=0;;r++){let o=t._committed,s=new AbortController,c,a,u;try{try{c=t.matchRoutes(n,{_controller:s}),un(c),a=(t._preloads??=new Map).set(s,c),u=await Wo(t,n,c,[s,r,o,!0])}finally{a&&(a=a.delete(s),j(t,c)),s.abort()}if(!Xt(u))return u[1];if(!a||u.length<3)return;n=u[2]}catch(l){J(l)||console.error(l);return}}}i(To,"preloadClientRoute");var dn="Error preloading route! \u261D\uFE0F";var Se=class{static{i(this,"BaseRoute")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=e=>{this.originalIndex=e.originalIndex;let n=this.options,r=!n?.path&&!n?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=tt:this.parentRoute||mt();let o=r?tt:n?.path;o&&o!=="/"&&(o=ue(o));let s=n?.id||o,c=r?tt:bt([this.parentRoute.id==="__root__"?"":this.parentRoute.id,s]);o==="__root__"&&(o="/"),c!=="__root__"&&(c=bt(["/",c]));let a=c==="__root__"?"/":bt([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=a,this._to=G(a)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e=="object"&&e!==null&&(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=>So({from:this.fullPath,...e}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}};var hn=class extends Se{static{i(this,"BaseRootRoute")}constructor(t){super(t)}};var Ce=k(B(),1);var T=(t=>(t[t.None=0]="None",t[t.Mutable=1]="Mutable",t[t.Watching=2]="Watching",t[t.RecursedCheck=4]="RecursedCheck",t[t.Recursed=8]="Recursed",t[t.Dirty=16]="Dirty",t[t.Pending=32]="Pending",t))(T||{});function jo({update:t,notify:e,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:c,shallowPropagate:a};function r(l,f,d){let h=f.depsTail;if(h!==void 0&&h.dep===l)return;let p=h!==void 0?h.nextDep:f.deps;if(p!==void 0&&p.dep===l){p.version=d,f.depsTail=p;return}let g=l.subsTail;if(g!==void 0&&g.version===d&&g.sub===f)return;let m=f.depsTail=l.subsTail={version:d,dep:l,sub:f,prevDep:h,nextDep:p,prevSub:g,nextSub:void 0};p!==void 0&&(p.prevDep=m),h!==void 0?h.nextDep=m:f.deps=m,g!==void 0?g.nextSub=m:l.subs=m}function o(l,f=l.sub){let d=l.dep,h=l.prevDep,p=l.nextDep,g=l.nextSub,m=l.prevSub;return p!==void 0?p.prevDep=h:f.depsTail=h,h!==void 0?h.nextDep=p:f.deps=p,g!==void 0?g.prevSub=m:d.subsTail=m,m!==void 0?m.nextSub=g:(d.subs=g)===void 0&&n(d),p}function s(l){let f=l.nextSub,d;t:do{let h=l.sub,p=h.flags;if(p&60?p&12?p&4?!(p&48)&&u(l,h)?(h.flags=p|40,p&=1):p=0:h.flags=p&-9|32:p=0:h.flags=p|32,p&2&&e(h),p&1){let g=h.subs;if(g!==void 0){let m=(l=g).nextSub;m!==void 0&&(d={value:f,prev:d},f=m);continue}}if((l=f)!==void 0){f=l.nextSub;continue}for(;d!==void 0;)if(l=d.value,d=d.prev,l!==void 0){f=l.nextSub;continue t}break}while(!0)}function c(l,f){let d,h=0,p=!1;t:do{let g=l.dep,m=g.flags;if(f.flags&16)p=!0;else if((m&17)===17){if(t(g)){let y=g.subs;y.nextSub!==void 0&&a(y),p=!0}}else if((m&33)===33){(l.nextSub!==void 0||l.prevSub!==void 0)&&(d={value:l,prev:d}),l=g.deps,f=g,++h;continue}if(!p){let y=l.nextDep;if(y!==void 0){l=y;continue}}for(;h--;){let y=f.subs,R=y.nextSub!==void 0;if(R?(l=d.value,d=d.prev):l=y,p){if(t(f)){R&&a(y),f=l.sub;continue}p=!1}else f.flags&=-33;f=l.sub;let v=l.nextDep;if(v!==void 0){l=v;continue t}}return p}while(!0)}function a(l){do{let f=l.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&e(f))}while((l=l.nextSub)!==void 0)}function u(l,f){let d=f.depsTail;for(;d!==void 0;){if(d===l)return!0;d=d.prevDep}return!1}}i(jo,"createReactiveSystem");function Go(t,e,n){let r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:e)?.bind(o),complete:(r?t.complete:n)?.bind(o)}}i(Go,"toObserver");var pn=[],we=0,{link:Ko,unlink:ls,propagate:us,checkDirty:Jo,shallowPropagate:qo}=jo({update(t){return t._update()},notify(t){pn[mn++]=t,t.flags&=~T.Watching},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=T.Mutable|T.Dirty,xe(t))}}),_e=0,mn=0,at,gn=0;function yn(t){try{++gn,t()}finally{--gn||vn()}}i(yn,"batch");function xe(t){let e=t.depsTail,n=e!==void 0?e.nextDep:t.deps;for(;n!==void 0;)n=ls(n,t)}i(xe,"purgeDeps");function vn(){if(!(gn>0)){for(;_e<mn;){let t=pn[_e];pn[_e++]=void 0,t.notify()}_e=0,mn=0}}i(vn,"flush");function be(t,e){let n=typeof t=="function",r=t,o={_snapshot:n?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?T.None:T.Mutable,get(){return at!==void 0&&Ko(o,at,we),o._snapshot},subscribe(s){let c=Go(s),a={current:!1},u=fs(()=>{o.get(),a.current?c.next?.(o._snapshot):a.current=!0});return{unsubscribe:i(()=>{u.stop()},"unsubscribe")}},_update(s){let c=at,a=e?.compare??Object.is;if(n)at=o,++we,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=T.Mutable|T.RecursedCheck);try{let u=o._snapshot,l=typeof s=="function"?s(u):s===void 0&&n?r(u):s;return u===void 0||!a(u,l)?(o._snapshot=l,!0):!1}finally{at=c,n&&(o.flags&=~T.RecursedCheck),xe(o)}}};return n?(o.flags=T.Mutable|T.Dirty,o.get=function(){let s=o.flags;if(s&T.Dirty||s&T.Pending&&Jo(o.deps,o)){if(o._update()){let c=o.subs;c!==void 0&&qo(c)}}else s&T.Pending&&(o.flags=s&~T.Pending);return at!==void 0&&Ko(o,at,we),o._snapshot}):o.set=function(s){if(o._update(s)){let c=o.subs;c!==void 0&&(us(c),qo(c),vn())}},o}i(be,"createAtom");function fs(t){let e=i(()=>{let r=at;at=n,++we,n.depsTail=void 0,n.flags=T.Watching|T.RecursedCheck;try{return t()}finally{at=r,n.flags&=~T.RecursedCheck,xe(n)}},"run"),n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:T.Watching|T.RecursedCheck,notify(){let r=this.flags;r&T.Dirty||r&T.Pending&&Jo(this.deps,this)?e():this.flags=T.Watching},stop(){this.flags=T.None,this.depsTail=void 0,xe(this)}};return e(),n}i(fs,"effect");var Rn=k(B(),1),Yo=k(Nr(),1);function ds(t,e){return t===e}i(ds,"defaultCompare");function V(t,e,n=ds){let r=(0,Rn.useCallback)(c=>{if(!t)return()=>{};let{unsubscribe:a}=t.subscribe(c);return a},[t]),o=(0,Rn.useCallback)(()=>t?.get(),[t]);return(0,Yo.useSyncExternalStoreWithSelector)(r,o,o,e,n)}i(V,"useStore");var Xo={};function Sn(t,e){let n=Ce.useRef();return r=>{let o=t?.select?t.select(r):r;return t?.structuralSharing??e.options.defaultStructuralSharing?n.current=rt(n.current,o):o}}i(Sn,"useStructuralSharing");function X(t){let e=D(),n=Ce.useContext(t.from?qn:xt),r=t.from??n,o=e.stores.getMatchStore(r);if(!1){let a=o.get();if(!a){(t.shouldThrow??!0)&&mt();return}return t.select?t.select(a):a}let s=Sn(t,e),c=V(o,a=>a?s(a):Xo);if(c!==Xo)return c;(t.shouldThrow??!0)&&mt()}i(X,"useMatch");function Pe(t){return X({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i(e=>t.select?t.select(e.search):e.search,"select")})}i(Pe,"useSearch");var ct=k(B(),1);var Le=ct.useLayoutEffect;function Zo(t,e,n){ct.useEffect(()=>{if(!t.current||n||typeof IntersectionObserver!="function")return()=>e();let r=new IntersectionObserver(o=>{e(o.pop())},{rootMargin:"100px"});return r.observe(t.current),()=>{r.disconnect(),e()}},[e,n,t])}i(Zo,"useIntersectionObserver");function Qo(t){let e=ct.useRef(null);return ct.useImperativeHandle(t,()=>e.current,[]),e}i(Qo,"useForwardedRef");var _n=k(B(),1);function Ee(t){let e=D();return _n.useCallback(n=>e.navigate({...n,from:n.from??t?.from}),[t?.from,e])}i(Ee,"useNavigate");var Bt=k(B(),1),lt=k(Z(),1);var It=class extends Bt.Component{static{i(this,"CatchBoundary")}constructor(...t){super(...t),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(t,e){let n=t.getResetKey();return e.error&&e.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,e){this.props.onCatch?.(t,e)}render(){let t=this.state.error;return t?Bt.createElement(this.props.errorComponent??wn,{error:t,reset:this.reset}):this.props.children}};function wn({error:t}){let[e,n]=Bt.useState(!1);return(0,lt.jsxs)("div",{style:{padding:".5rem",maxWidth:"100%"},children:[(0,lt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[(0,lt.jsx)("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),(0,lt.jsx)("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:i(()=>n(r=>!r),"onClick"),children:e?"Hide Error":"Show Error"})]}),(0,lt.jsx)("div",{style:{height:".25rem"}}),e?(0,lt.jsx)("div",{children:(0,lt.jsx)("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?(0,lt.jsx)("code",{children:t.message}):null})}):null]})}i(wn,"ErrorComponent");var xn=k(B(),1),tr=k(Z(),1);function er({children:t,fallback:e=null}){return(0,tr.jsx)(xn.default.Fragment,{children:bn()?t:e})}i(er,"ClientOnly");function bn(){return xn.default.useSyncExternalStore(hs,()=>!0,()=>!1)}i(bn,"useHydrated");function hs(){return()=>{}}i(hs,"subscribe");function Cn(t){return X({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i(e=>t.select?t.select(e.loaderData):e.loaderData,"select")})}i(Cn,"useLoaderData");function Pn(t){let{select:e,...n}=t;return X({...n,select:i(r=>e?e(r.loaderDeps):r.loaderDeps,"select")})}i(Pn,"useLoaderDeps");function Ln(t){return X({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i(e=>{let n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n},"select")})}i(Ln,"useParams");function En(t){return X({...t,select:i(e=>t.select?t.select(e.context):e.context,"select")})}i(En,"useRouteContext");var W=k(B(),1);var ps=k(Z(),1);function kn(t){let e=W.useRef(t);return Q(e.current,t,{ignoreUndefined:!1})||(e.current=t),e.current}i(kn,"useValueStable");function ms(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}i(ms,"compareLinkState");function gs(t,e,n){if(t?.external)return st(t.href,n)?void 0:t.href;if(!ir(e)&&!(typeof e!="string"||e.indexOf(":")===-1))try{return new URL(e),st(e,n)?void 0:e}catch{}}i(gs,"resolveExternalLink");function ys(t,e,n,r,o,s){if(s)return!1;if(n?.exact){if(!fe(t.pathname,e.pathname,r))return!1}else{let c=yt(t.pathname,r),a=yt(e.pathname,r);if(!(c.startsWith(a)&&(c.length===a.length||c[a.length]==="/")))return!1}return(n?.includeSearch??!0)&&!Q(t.search,e.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:n?.includeHash?o&&t.hash===e.hash:!0}i(ys,"resolveIsActive");function vs(t,e){let n=D(),r=Qo(e),{activeProps:o,inactiveProps:s,activeOptions:c,to:a,preload:u,preloadDelay:l,preloadIntentProximity:f,hashScrollIntoView:d,replace:h,startTransition:p,resetScroll:g,viewTransition:m,children:y,target:R,disabled:v,style:_,className:x,onClick:L,onBlur:b,onFocus:S,onMouseEnter:C,onMouseLeave:w,onTouchStart:P,ignoreBlocker:E,params:I,search:N,hash:_t,state:nt,mask:oe,reloadDocument:Ps,unsafeRelative:Ls,from:Es,_fromLocation:ks,...Nt}=t;if(!1){let M=ir(a);if(typeof a=="string"&&!M&&a.indexOf(":")>-1)try{return new URL(a),st(a,n.protocolAllowlist)?{...Nt,ref:r,href:void 0,...y&&{children:y},...R&&{target:R},...v&&{disabled:v},..._&&{style:_},...x&&{className:x}}:{...Nt,ref:r,href:a,...y&&{children:y},...R&&{target:R},...v&&{disabled:v},..._&&{style:_},...x&&{className:x}}}catch{}let F=n.buildLocation({...t,from:t.from}),ot=sr(F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,F.maskedLocation?F.maskedLocation.external:F.external,n.history,v),Tt=(()=>{if(ot?.external)return st(ot.href,n.protocolAllowlist)?void 0:ot.href;if(!M&&typeof a=="string"&&a.indexOf(":")>-1)try{return new URL(a),st(a,n.protocolAllowlist)?void 0:a}catch{}})(),Ae=(()=>{if(Tt)return!1;let $=n.stores.location.get(),z=c?.exact??!1;if(z){if(!fe($.pathname,F.pathname,n.basepath))return!1}else{let U=yt($.pathname,n.basepath),H=yt(F.pathname,n.basepath);if(!(U.startsWith(H)&&(U.length===H.length||U[H.length]==="/")))return!1}if((c?.includeSearch??!0)&&$.search!==F.search){let U=!$.search||typeof $.search=="object"&&!ht($.search),H=!F.search||typeof F.search=="object"&&!ht(F.search);if(!(U&&H)&&!Q($.search,F.search,{partial:!z,ignoreUndefined:!c?.explicitUndefined}))return!1}return!c?.includeHash})();if(Tt)return{...Nt,ref:r,href:Tt,...y&&{children:y},...R&&{target:R},...v&&{disabled:v},..._&&{style:_},...x&&{className:x}};let $e=Ae?q(o,{})??nr:Ut,Be=Ae?Ut:q(s,{})??Ut,zn=(()=>{let $=_,z=$e.style,U=Be.style;if(!(!$&&!z&&!U))return $&&!z&&!U?$:!$&&z&&!U?z:!$&&!z&&U?U:{...$,...z,...U}})(),Hn=(()=>{let $=x,z=$e.className,U=Be.className;if(!$&&!z&&!U)return"";let H="";return $&&(H=$),z&&(H=H?`${H} ${z}`:z),U&&(H=H?`${H} ${U}`:U),H})();return{...Nt,...$e,...Be,href:ot?.href,ref:r,disabled:!!v,target:R,...zn&&{style:zn},...Hn&&{className:Hn},...v&&or,...Ae&&rr}}let An=bn(),Cr=kn(t.search),Pr=kn(t.params),$n=kn(c),zt=W.useMemo(()=>t,[n,t.from,t._fromLocation,t.hash,t.to,Cr,Pr,t.state,t.mask,t.unsafeRelative]),Lr=W.useCallback(M=>{let F=n.buildLocation({_fromLocation:M,...zt}),ot=sr(F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,F.maskedLocation?F.maskedLocation.external:F.external,n.history,v),Tt=gs(ot,a,n.protocolAllowlist);return[ot?.href,Tt,ys(M,F,$n,n.basepath,An,Tt!==void 0)]},[$n,v,An,zt,n,a]),[Er,Te,De]=V(n.stores.location,Lr,ms),re=De?q(o,{})??nr:Ut,se=De?Ut:q(s,{})??Ut,Bn=[x,re.className,se.className].filter(Boolean).join(" "),Un=(_||re.style||se.style)&&{..._,...re.style,...se.style},Vn=W.useRef(!1),wt=t.reloadDocument||Te||v?!1:u??n.options.defaultPreload,Fe=l??n.options.defaultPreloadDelay??0,Ot=W.useCallback(()=>{n.preloadRoute(zt).catch(M=>{console.warn(M),console.warn(dn)})},[n,zt]),Me=W.useCallback(M=>{if(!M){In(r);return}if(!(M.isIntersecting??wt==="intent")){M.isIntersecting===!1&&In(r);return}if(!Fe){Ot();return}te.has(r)||te.set(r,setTimeout(()=>{te.delete(r),Ot()},Fe))},[Ot,r,wt,Fe]);Zo(r,Me,wt!=="viewport"),W.useEffect(()=>{Vn.current||wt==="render"&&(Ot(),Vn.current=!0)},[Ot,wt]);let kr=i(M=>{let F=M.currentTarget.getAttribute("target"),ot=R!==void 0?R:F;!v&&!(M.metaKey||M.altKey||M.ctrlKey||M.shiftKey)&&!M.defaultPrevented&&(!ot||ot==="_self")&&M.button===0&&(M.preventDefault(),n.navigate({...zt,replace:h,resetScroll:g,hashScrollIntoView:d,startTransition:p,viewTransition:m,ignoreBlocker:E}))},"handleClick");if(Te)return{...Nt,ref:r,href:Te,...y&&{children:y},...R&&{target:R},...v&&{disabled:v},..._&&{style:_},...x&&{className:x},...L&&{onClick:L},...b&&{onBlur:b},...S&&{onFocus:S},...C&&{onMouseEnter:C},...w&&{onMouseLeave:w},...P&&{onTouchStart:P}};let Ir=i(()=>{wt==="intent"&&Ot()},"handleTouchStart"),Wn=i(()=>{wt==="intent"&&In(r)},"handleLeave");return{...Nt,...re,...se,href:Er,ref:r,onClick:Vt([L,kr]),onBlur:Vt([b,Wn]),onFocus:Vt([S,Me]),onMouseEnter:Vt([C,Me]),onMouseLeave:Vt([w,Wn]),onTouchStart:Vt([P,Ir]),disabled:!!v,target:R,...Un&&{style:Un},...Bn&&{className:Bn},...v&&or,...De&&rr}}i(vs,"useLinkProps");var Ut={},nr={className:"active"},or={role:"link","aria-disabled":!0},rr={"data-status":"active","aria-current":"page"},te=new WeakMap,In=i(t=>{clearTimeout(te.get(t)),te.delete(t)},"cancelPreload"),Vt=i(t=>e=>{for(let n of t)if(n){if(e.defaultPrevented)return;n(e)}},"composeHandlers");function sr(t,e,n,r){if(!r)return e?{href:t,external:!0}:{href:n.createHref(t)||"/",external:!1}}i(sr,"getHrefOption");function ir(t){if(typeof t!="string")return!1;let e=t.charCodeAt(0);return e===47?t.charCodeAt(1)!==47:e===46}i(ir,"isSafeInternal");var Nn=W.forwardRef((t,e)=>{let{_asChild:n,...r}=t,{type:o,...s}=vs(r,e),c=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){let{disabled:a,...u}=s;return W.createElement("a",u,c)}return W.createElement(n,s,c)});var On=k(B(),1),Tn=k(Z(),1);var ar=class extends Se{static{i(this,"Route")}constructor(t){super(t),this.useMatch=e=>X({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>En({...e,from:this.id}),this.useSearch=e=>Pe({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ln({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Pn({...e,from:this.id}),this.useLoaderData=e=>Cn({...e,from:this.id}),this.useNavigate=()=>Ee({from:this.fullPath}),this.Link=On.default.forwardRef((e,n)=>(0,Tn.jsx)(Nn,{ref:n,from:this.fullPath,...e}))}};function Rs(t){return new ar(t)}i(Rs,"createRoute");var cr=class extends hn{static{i(this,"RootRoute")}constructor(t){super(t),this.useMatch=e=>X({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>En({...e,from:this.id}),this.useSearch=e=>Pe({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Ln({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Pn({...e,from:this.id}),this.useLoaderData=e=>Cn({...e,from:this.id}),this.useNavigate=()=>Ee({from:this.fullPath}),this.Link=On.default.forwardRef((e,n)=>(0,Tn.jsx)(Nn,{ref:n,from:this.fullPath,...e}))}};function Ss(t){return new cr(t)}i(Ss,"createRootRoute");var Ic=k(B(),1);var ke=k(Z(),1);function lr(t){let e=D();if(!1){let r=`not-found-${e.stores.location.get().pathname}-${e.stores.status.get()}`;return(0,ke.jsx)(It,{getResetKey:i(()=>r,"getResetKey"),onCatch:i((o,s)=>{if(J(o))t.onCatch?.(o,s);else throw o},"onCatch"),errorComponent:i(({error:o})=>{if(J(o))return t.fallback?.(o);throw o},"errorComponent"),children:t.children})}let n=`not-found-${V(e.stores.location,r=>r.pathname)}-${V(e.stores.status,r=>r)}`;return(0,ke.jsx)(It,{getResetKey:i(()=>n,"getResetKey"),onCatch:i((r,o)=>{if(J(r))t.onCatch?.(r,o);else throw r},"onCatch"),errorComponent:i(({error:r})=>{if(J(r))return t.fallback?.(r);throw r},"errorComponent"),children:t.children})}i(lr,"CatchNotFound");function ur(){return(0,ke.jsx)("p",{children:"Not Found"})}i(ur,"DefaultGlobalNotFound");var fr=k(Z(),1);function dr({children:t}){let e=D();return null}i(dr,"ScriptOnce");var Ac=k(B(),1),Ie=k(Z(),1);function St(t){return(0,Ie.jsx)(Ie.Fragment,{children:t.children})}i(St,"SafeFragment");var Vc=k(B(),1),Ne=k(Z(),1);function Dn(t,e,n){return e.options.notFoundComponent?(0,Ne.jsx)(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?(0,Ne.jsx)(t.options.defaultNotFoundComponent,{...n}):(0,Ne.jsx)(ur,{})}i(Dn,"renderRouteNotFound");var pr=k(Z(),1);function hr(t){return null}i(hr,"getScrollRestorationScriptForRouter");function mr(){let t=hr(D());return t?(0,pr.jsx)(dr,{children:t}):null}i(mr,"ScrollRestoration");var K=k(B(),1);var A=k(Z(),1);function ee(t,e){let n=e?.options.pendingComponent??t.options.defaultPendingComponent;return n?(0,A.jsx)(n,{}):null}i(ee,"renderPending");var _s=i((t,e)=>t[0]===e[0]&&t[1]===e[1],"outletMatchSelectionEqual"),vr=i((t,e,n)=>!e.isRoot||e.options.shellComponent||e.options.wrapInSuspense||n===!1||n==="data-only"||!t.ssr,"canWrapInSuspense"),Oe=K.memo(i(function({routeId:e}){let n=D();return(0,A.jsx)(gr,{router:n,match:V(n.stores.getMatchStore(e),r=>r)})},"MatchImpl"));function gr({router:t,match:e}){let n=t.routesById[e.routeId],r=ee(t,n),o=n.options.errorComponent??t.options.defaultErrorComponent,s=n.options.onCatch??t.options.defaultOnCatch,c=n.isRoot?n.options.notFoundComponent??t.options.notFoundRoute?.options.component:n.options.notFoundComponent,a=e.ssr===!1||e.ssr==="data-only",u=vr(t,n,e.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||a))?K.Suspense:St,l=o?It:St,f=c?lr:St;return(0,A.jsxs)(n.isRoot?n.options.shellComponent??St:St,{children:[(0,A.jsx)(xt.Provider,{value:e.routeId,children:(0,A.jsx)(u,{fallback:r,children:(0,A.jsx)(l,{getResetKey:i(()=>e,"getResetKey"),errorComponent:o,onCatch:i((d,h)=>{if(J(d))throw d.routeId??=e.routeId,d;s?.(d,h)},"onCatch"),children:(0,A.jsx)(f,{fallback:i(d=>{if(d.routeId??=e.routeId,d.routeId!==e.routeId)throw d;return K.createElement(c,d)},"fallback"),children:a?(0,A.jsx)(er,{fallback:r,children:(0,A.jsx)(yr,{match:e})}):(0,A.jsx)(yr,{match:e})})})})}),null]})}i(gr,"MatchView");var yr=K.memo(i(function({match:e}){let n=D(),r=e.routeId,o=n.routesById[r],s=K.useMemo(()=>{let a=(o.options.remountDeps??n.options.defaultRemountDeps)?.({routeId:r,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return a?JSON.stringify(a):void 0},[r,e.loaderDeps,e._strictParams,e._strictSearch,o.options.remountDeps,n.options.defaultRemountDeps]),c=K.useMemo(()=>{let a=o.options.component??n.options.defaultComponent;return a?(0,A.jsx)(a,{},s):(0,A.jsx)(Rr,{})},[s,o.options.component,n.options.defaultComponent]);if(e.status==="pending"){if(n.ssr&&!vr(n,o,e.ssr))return c;if(n._tx)throw n._tx[5];return ee(n,o)}if(e.status==="notFound")return Dn(n,o,e.error);if(e.status==="error"){if(!1)return(0,A.jsx)((o.options.errorComponent??n.options.defaultErrorComponent)||wn,{error:e.error,reset:void 0,info:{componentStack:""}});throw e.error}return c},"MatchInnerImpl")),Rr=K.memo(i(function(){let e=D(),n=K.useContext(xt),r,o,s;if(!1){let a=e.stores.matches.get(),u=a.findIndex(f=>f.routeId===n),l=a[u];r=!!l._notFound,o=l.error,s=a[u+1]?.routeId}else{let a=e.stores.getMatchStore(n);[r,o]=V(a,u=>[!!u._notFound,u.error],_s),s=V(e.stores.ids,u=>u[u.indexOf(n)+1])}if(r)return Dn(e,e.routesById[n],o);if(!s)return null;let c=(0,A.jsx)(Oe,{routeId:s});return n===tt?(0,A.jsx)(K.Suspense,{fallback:ee(e),children:c}):c},"OutletImpl"));var Fn=k(B(),1);function Mn(t,e){let n=t[1];t.length=0,n?.(e)}i(Mn,"settleOwner");function Sr({t}){let e=D(),n=e._rendered??=[],r=void 0;return e.startTransition=(o,s)=>new Promise(c=>{Mn(n,!1),n.push(s,c),t(e),Fn.startTransition(o)}),Le(()=>{let o=e.history.subscribe(e.load);if(r?.current)return o;r&&(r.current=!0),e.updateLatestLocation();let s=e.latestLocation,c=e.buildLocation({to:s.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(G(s.publicHref)!==G(c.publicHref))return e.commitLocation({...c,replace:!0,ignoreBlocker:!0}),o;let a=e.stores.resolvedLocation.get();return a?.href===s.href&&a.state.__TSR_key===s.state.__TSR_key?n.push(e.stores.matches.get(),u=>{u&&e.emit({type:"onRendered",...Ct(a,a)})}):e._tx||e.load({sync:!0}).catch(console.error),o},[e,e.history]),null}i(Sr,"Transitioner");var Wt=k(B(),1);var et=k(Z(),1);function _r(){let t=D(),e=t.routesById[tt],n=ee(t,e),r=t.ssr?St:Wt.Suspense,o=(0,et.jsxs)(et.Fragment,{children:[!!1&&(0,et.jsx)(Sr,{t:Wt.useState()[1]}),(0,et.jsx)(r,{fallback:n,children:(0,et.jsx)(ws,{})})]});return t.options.InnerWrap?(0,et.jsx)(t.options.InnerWrap,{children:o}):o}i(_r,"Matches");function ws(){let t=D(),e=t._rendered,n=V(t.stores.matches,c=>e[0]??c),r=n[0],o=r?.routeId;Le(()=>{e[0]===n&&Mn(e,!0)},[e,n]);let s=o?(0,et.jsx)(Oe,{routeId:o}):null;return(0,et.jsx)(xt.Provider,{value:o,children:t.options.disableGlobalCatchBoundary?s:(0,et.jsx)(It,{getResetKey:i(()=>r,"getResetKey"),onCatch:void 0,children:s})})}i(ws,"MatchesInner");var wr=i(t=>({createMutableStore:be,createReadonlyStore:be,batch:yn}),"getStoreFactory");var xs=i(t=>new xr(t),"createRouter"),xr=class extends nn{static{i(this,"Router")}constructor(t){super(t,wr)}};var Al=k(B(),1),ne=k(Z(),1);function br({router:t,children:e,...n}){ht(n)&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});let r=(0,ne.jsx)(ie.Provider,{value:t,children:e});return t.options.Wrap?(0,ne.jsx)(t.options.Wrap,{children:r}):r}i(br,"RouterContextProvider");function bs({router:t,...e}){return(0,ne.jsx)(br,{router:t,...e,children:(0,ne.jsx)(_r,{})})}i(bs,"RouterProvider");function Cs(t){let e=D({warn:t?.router===void 0}),n=t?.router||e;if(!1){let r=n.stores.__store.get();return t?.select?t.select(r):r}return V(n.stores.__store,Sn(t,n))}i(Cs,"useRouterState");export{tn as a,Yr as b,D as c,Pe as d,Ee as e,Rs as f,Ss as g,Rr as h,xs as i,bs as j,Cs as k};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-YKXDMIHQ.js";var u=new Set(["contains","eq","gt","gte","lt","lte","ne"]),a=s(r=>typeof r=="number"&&Number.isSafeInteger(r)?String(r):r,"i"),o=s(r=>{if(typeof r!="string")return;let e=r.trim();return e===""?void 0:e},"e"),v=s(r=>{if(r===null||typeof r!="object")return!1;let e=r;return typeof e.column=="string"&&typeof e.operator=="string"&&u.has(e.operator)},"p"),h=s(r=>{if(typeof r!="string"||r==="")return[];try{let e=JSON.parse(r);return Array.isArray(e)?e.filter(v):[]}catch{return[]}},"f"),g=s(r=>{if(typeof r!="string"||r==="")return;let e=r.lastIndexOf(":");if(e<=0)return;let i=r.slice(0,e),n=r.slice(e+1);if(!(n!=="asc"&&n!=="desc"))return{column:i,direction:n}},"u"),p=/^[\da-f]{16}$/u,b=s(r=>{let e={};if(typeof r.pins=="string"&&r.pins!==""){let c=r.pins.split(",").filter(f=>f!==""&&f.length<=64).slice(0,12);c.length>0&&(e.pins=c.join(","))}r.schema==="global"&&(e.schema="global");let i=o(r.table);i!==void 0&&(e.table=i);let n=o(a(r.shard));n!==void 0&&(e.shard=n);let d=o(a(r.search));d!==void 0&&(e.search=d);let t=o(r.order);t!==void 0&&g(t)!==void 0&&(e.order=t);let l=o(r.filters);return l!==void 0&&h(l).length>0&&(e.filters=l),e},"b"),y=s(r=>{let e=h(r.filters),i=g(r.order);return{filters:e.length>0?e:void 0,orderBy:i,search:o(a(r.search)),shard:o(a(r.shard)),table:o(r.table),tier:r.schema==="global"?"global":"shard"}},"v"),m=s(r=>{let e=r.filters??[];return{filters:e.length>0?JSON.stringify(e):void 0,order:r.orderBy===void 0?void 0:`${r.orderBy.column}:${r.orderBy.direction}`,schema:r.tier==="global"?"global":void 0,search:r.search!==void 0&&r.search!==""?r.search:void 0,shard:r.shard!==void 0&&r.shard!==""?r.shard:void 0,table:r.table!==void 0&&r.table!==""?r.table:void 0}},"y"),S=s(r=>{let{version:e}=r;return typeof e=="string"&&p.test(e)?{version:e}:{}},"S");export{b as a,y as b,m as c,S as d};
@@ -0,0 +1 @@
1
+ import{d as C}from"./chunk-YOB2X3FZ.js";import{a as B}from"./chunk-66UGPQVC.js";import{a as R}from"./chunk-3GFF4BA4.js";import"./chunk-K7AJEMKE.js";import"./chunk-6D6Z2KXU.js";import"./chunk-Y6CXU7T4.js";import"./chunk-55754F6H.js";import"./chunk-IS6LVJ6L.js";import"./chunk-AAVLPU5Q.js";import{b as N}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as j}from"./chunk-GYKK64E7.js";import"./chunk-ULIQFBZU.js";import"./chunk-I4VOJYXE.js";import"./chunk-35DM4JJG.js";import{a as u}from"./chunk-4ZEL6BYL.js";import{c as p}from"./chunk-3TE3V2QL.js";import"./chunk-BJEJVHCO.js";import"./chunk-FSRSK4LY.js";import"./chunk-5ICUJ4IA.js";import{a as S}from"./chunk-FKVZRPV5.js";import{a as A,b as k,c as P,d as y,e as l,f as i}from"./chunk-HEAQVSNS.js";import{a as v,e as w}from"./chunk-WUWBZPUK.js";import{d as E,t as I}from"./chunk-6B7FVPW3.js";import{a as m,d as G,g as H}from"./chunk-YKXDMIHQ.js";var e=G(H(),1);var Q=["subscriptions","events"],V={},T=new Set(["active","trialing"]),q=new Set(["past_due","unpaid"]),n=m((a,t)=>{if(a[t]!==void 0)return a[t];let h=a.__doc__;return typeof h=="string"?C(h)?.[t]:void 0},"a"),s=m(a=>typeof a=="string"?a:typeof a=="number"||typeof a=="bigint"||typeof a=="boolean"?String(a):"","n"),z=m(a=>T.has(a)?"default":q.has(a)?"destructive":"outline","U"),se=m(({limit:a=100})=>{let t=E(),h=R(),{data:x}=p(u.listTables,V,{live:!0}),D=x!==void 0,O=Array.isArray(x)&&Q.every(r=>x.some(d=>d.name===r)),c=h.payments&&O,o=p(u.readTablePage,{filters:[],limit:a,offset:0,orderBy:{column:"updatedAt",direction:"desc"},search:"",table:"subscriptions"},{enabled:c}),f=p(u.readTablePage,{filters:[],limit:25,offset:0,orderBy:{column:"processedAt",direction:"desc"},search:"",table:"events"},{enabled:c}),g=p(u.facetColumn,{column:"state",table:"subscriptions"},{enabled:c});B(()=>{c&&(o.refetch(),f.refetch(),g.refetch())},!0);let b=o.data?.rows??[],F=f.data?.rows??[],L=o.error??f.error,M=o.error===null?f.errorSource:o.errorSource,U=o.data?.total??b.length,_=g.data?.values===void 0?b.filter(r=>T.has(s(n(r,"state")))).length:g.data.values.reduce((r,d)=>r+(T.has(s(d.value))?d.count:0),0);return D&&!c?(0,e.jsx)("div",{className:"flex flex-col gap-4","data-testid":"payments-panel",children:(0,e.jsx)(S,{description:t("No @lunora/payment tables found in this deployment. Declare the store tables (subscriptions, events, \u2026) in lunora/schema.ts and wire `payment` on createShardDO() to sync customers and subscriptions."),testId:"payments-unconfigured",title:t("No payments configured")})}):(0,e.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"payments-panel",children:[(0,e.jsx)("div",{className:"flex items-center gap-2","data-testid":"payments-summary",children:(0,e.jsxs)(v,{className:"justify-between gap-0 py-0",children:[(0,e.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Subscriptions")}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:_}),(0,e.jsx)(N,{variant:"default",children:t("{count} active",{count:_})})]})]}),(0,e.jsx)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:t("{total} total",{total:U})})]})}),L===null?void 0:(0,e.jsx)(j,{error:M}),b.length===0&&!o.isLoading?(0,e.jsx)(S,{testId:"payments-empty",title:t("No subscriptions yet")}):(0,e.jsx)(v,{className:"overflow-hidden py-0",children:(0,e.jsx)(w,{className:"px-0",children:(0,e.jsxs)(A,{children:[(0,e.jsx)(k,{children:(0,e.jsxs)(y,{children:[(0,e.jsx)(l,{children:t("Provider")}),(0,e.jsx)(l,{children:t("Reference")}),(0,e.jsx)(l,{children:t("Plan")}),(0,e.jsx)(l,{children:t("State")}),(0,e.jsx)(l,{children:t("Renews")})]})}),(0,e.jsx)(P,{children:b.map(r=>{let d=s(n(r,"state"));return(0,e.jsxs)(y,{"data-testid":"payment-subscription-row",children:[(0,e.jsx)(i,{children:s(n(r,"provider"))}),(0,e.jsx)(i,{children:s(n(r,"referenceId"))}),(0,e.jsx)(i,{children:s(n(r,"priceId"))}),(0,e.jsx)(i,{children:(0,e.jsx)(N,{variant:z(d),children:d})}),(0,e.jsx)(i,{children:I(n(r,"currentPeriodEnd"))})]},s(n(r,"providerSubscriptionId")))})})]})})}),(0,e.jsxs)(v,{className:"overflow-hidden py-0",children:[(0,e.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,e.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:t("Recent webhook events")})}),(0,e.jsx)(w,{className:"px-0",children:(0,e.jsx)(A,{children:(0,e.jsx)(P,{children:F.map(r=>(0,e.jsxs)(y,{"data-testid":"payment-event-row",children:[(0,e.jsx)(i,{children:s(n(r,"provider"))}),(0,e.jsx)(i,{className:"font-medium",children:s(n(r,"type"))}),(0,e.jsx)(i,{className:"text-muted-foreground",children:s(n(r,"providerEventId"))}),(0,e.jsx)(i,{children:I(n(r,"processedAt"))})]},s(n(r,"providerEventId"))))})})})]})]})},"ae");export{se as PaymentsPanel};
@@ -0,0 +1 @@
1
+ import{a as v}from"./chunk-F7UC63UN.js";import{a as Q}from"./chunk-66UGPQVC.js";import{a as L}from"./chunk-S3CRZLGS.js";import{a as G}from"./chunk-ZHM5ZHPC.js";import"./chunk-OGUKYRFM.js";import"./chunk-OKG3HWSJ.js";import"./chunk-PLHA3OWK.js";import"./chunk-4L4WTGN5.js";import"./chunk-AAVLPU5Q.js";import{b as $}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as W}from"./chunk-GYKK64E7.js";import"./chunk-ULIQFBZU.js";import"./chunk-I4VOJYXE.js";import"./chunk-35DM4JJG.js";import{a as E}from"./chunk-4ZEL6BYL.js";import{c as B}from"./chunk-3TE3V2QL.js";import"./chunk-BJEJVHCO.js";import"./chunk-FSRSK4LY.js";import"./chunk-5ICUJ4IA.js";import{a as A}from"./chunk-FKVZRPV5.js";import{a as q,b as H,c as O,d as K,e as T,f as D}from"./chunk-HEAQVSNS.js";import{a as _}from"./chunk-WUWBZPUK.js";import{d as j}from"./chunk-6B7FVPW3.js";import{a as S,d as F,f as J,g as V}from"./chunk-YKXDMIHQ.js";var R=F(J(),1);var t=F(V(),1);var U=S(c=>`${c.toString()} ms`,"D"),X=S(c=>c.totalConnections===0&&c.shapePoke.passes===0&&c.whisper.passes===0&&c.shapeProbe.run===0&&c.shapeProbe.served===0&&c.globalPoll.drains===0&&c.globalPoll.pairsSkipped===0,"J"),z=S(c=>{let e=(0,R.c)(48),{counters:o,includeTiming:a,prefix:r,t:l,title:u}=c,d=`${r}-section`,n;e[0]!==u?(n=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:u}),e[0]=u,e[1]=n):n=e[1];let s=`${r}-stats`,i;e[2]!==l?(i=l("Passes"),e[2]=l,e[3]=i):i=e[3];let m=`${r}-passes`,I;e[4]!==o.passes||e[5]!==i||e[6]!==m?(I=(0,t.jsx)(v,{label:i,testId:m,value:o.passes}),e[4]=o.passes,e[5]=i,e[6]=m,e[7]=I):I=e[7];let g;e[8]!==l?(g=l("Sockets iterated"),e[8]=l,e[9]=g):g=e[9];let k=`${r}-iterated`,p;e[10]!==o.socketsIterated||e[11]!==g||e[12]!==k?(p=(0,t.jsx)(v,{label:g,testId:k,value:o.socketsIterated}),e[10]=o.socketsIterated,e[11]=g,e[12]=k,e[13]=p):p=e[13];let f;e[14]!==l?(f=l("Delivered"),e[14]=l,e[15]=f):f=e[15];let y=`${r}-delivered`,h;e[16]!==o.socketsDelivered||e[17]!==f||e[18]!==y?(h=(0,t.jsx)(v,{label:f,testId:y,value:o.socketsDelivered}),e[16]=o.socketsDelivered,e[17]=f,e[18]=y,e[19]=h):h=e[19];let x;e[20]!==l?(x=l("Peak width"),e[20]=l,e[21]=x):x=e[21];let N=`${r}-peak`,b;e[22]!==o.peakSocketsIterated||e[23]!==x||e[24]!==N?(b=(0,t.jsx)(v,{label:x,testId:N,value:o.peakSocketsIterated}),e[22]=o.peakSocketsIterated,e[23]=x,e[24]=N,e[25]=b):b=e[25];let C;e[26]!==o.totalMs||e[27]!==a||e[28]!==r||e[29]!==l?(C=a&&(0,t.jsx)(v,{label:l("Total time"),testId:`${r}-total-ms`,value:U(o.totalMs)}),e[26]=o.totalMs,e[27]=a,e[28]=r,e[29]=l,e[30]=C):C=e[30];let P;e[31]!==o.maxMs||e[32]!==a||e[33]!==r||e[34]!==l?(P=a&&(0,t.jsx)(v,{label:l("Max time"),testId:`${r}-max-ms`,value:U(o.maxMs)}),e[31]=o.maxMs,e[32]=a,e[33]=r,e[34]=l,e[35]=P):P=e[35];let M;e[36]!==h||e[37]!==b||e[38]!==C||e[39]!==P||e[40]!==s||e[41]!==I||e[42]!==p?(M=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":s,children:[I,p,h,b,C,P]}),e[36]=h,e[37]=b,e[38]=C,e[39]=P,e[40]=s,e[41]=I,e[42]=p,e[43]=M):M=e[43];let w;return e[44]!==d||e[45]!==M||e[46]!==n?(w=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":d,children:[n,M]}),e[44]=d,e[45]=M,e[46]=n,e[47]=w):w=e[47],w},"F"),Y=S(c=>{let e=(0,R.c)(20),{counters:o,t:a}=c,r;e[0]!==a?(r=a("Membership probes"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let u;e[4]!==a?(u=a("Queries run"),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==o.run||e[7]!==u?(d=(0,t.jsx)(v,{label:u,testId:"fanout-probe-run",value:o.run}),e[6]=o.run,e[7]=u,e[8]=d):d=e[8];let n;e[9]!==a?(n=a("Shared from cache"),e[9]=a,e[10]=n):n=e[10];let s;e[11]!==o.served||e[12]!==n?(s=(0,t.jsx)(v,{label:n,testId:"fanout-probe-served",value:o.served}),e[11]=o.served,e[12]=n,e[13]=s):s=e[13];let i;e[14]!==d||e[15]!==s?(i=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":"fanout-probe-stats",children:[d,s]}),e[14]=d,e[15]=s,e[16]=i):i=e[16];let m;return e[17]!==l||e[18]!==i?(m=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-probe-section",children:[l,i]}),e[17]=l,e[18]=i,e[19]=m):m=e[19],m},"V"),Z=S(c=>{let e=(0,R.c)(20),{counters:o,t:a}=c,r;e[0]!==a?(r=a("Global shape polls"),e[0]=a,e[1]=r):r=e[1];let l;e[2]!==r?(l=(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:r}),e[2]=r,e[3]=l):l=e[3];let u;e[4]!==a?(u=a("Global reads"),e[4]=a,e[5]=u):u=e[5];let d;e[6]!==o.drains||e[7]!==u?(d=(0,t.jsx)(v,{label:u,testId:"fanout-global-poll-drains",value:o.drains}),e[6]=o.drains,e[7]=u,e[8]=d):d=e[8];let n;e[9]!==a?(n=a("Pairs skipped"),e[9]=a,e[10]=n):n=e[10];let s;e[11]!==o.pairsSkipped||e[12]!==n?(s=(0,t.jsx)(v,{label:n,testId:"fanout-global-poll-pairs-skipped",value:o.pairsSkipped}),e[11]=o.pairsSkipped,e[12]=n,e[13]=s):s=e[13];let i;e[14]!==d||e[15]!==s?(i=(0,t.jsxs)("dl",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3","data-testid":"fanout-global-poll-stats",children:[d,s]}),e[14]=d,e[15]=s,e[16]=i):i=e[16];let m;return e[17]!==l||e[18]!==i?(m=(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-global-poll-section",children:[l,i]}),e[17]=l,e[18]=i,e[19]=m):m=e[19],m},"X"),pe=S(c=>{let e=(0,R.c)(31),{initialShardKey:o}=c,a=j(),{queryShardKey:r,setShardKey:l,shardKey:u}=L(o),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={},e[0]=d):d=e[0];let n;e[1]!==r?(n={keepPreviousData:!0,shardKey:r},e[1]=r,e[2]=n):n=e[2];let{data:s,error:i,errorSource:m,refetch:I}=B(E.getFanoutMetrics,d,n);Q(I,!0);let g;e[3]!==s?(g=s!==void 0&&X(s),e[3]=s,e[4]=g):g=e[4];let k=g,p;e[5]!==l||e[6]!==u?(p=(0,t.jsx)(G,{onChange:l,testId:"fanout-shard-input",value:u}),e[5]=l,e[6]=u,e[7]=p):p=e[7];let f;e[8]!==s||e[9]!==a?(f=s!==void 0&&(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2 text-sm text-muted-foreground","data-testid":"fanout-count",children:[s.promoted&&(0,t.jsx)($,{"data-testid":"fanout-promoted",variant:s.relayCount>=s.maxRelays?"destructive":"default",children:s.relayCount>=s.maxRelays?a("auto-scaled: {relayCount}/{maxRelays} relays (at ceiling)",{maxRelays:s.maxRelays,relayCount:s.relayCount}):a("auto-scaled: {relayCount}/{maxRelays} relays",{maxRelays:s.maxRelays,relayCount:s.relayCount})}),(0,t.jsx)($,{variant:"secondary",children:a("{count} connections",{count:s.totalConnections})}),(0,t.jsx)($,{variant:"secondary",children:a("peak {count} subscribers",{count:s.peakSubscribers})})]}),e[8]=s,e[9]=a,e[10]=f):f=e[10];let y;e[11]!==p||e[12]!==f?(y=(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[p,f]}),e[11]=p,e[12]=f,e[13]=y):y=e[13];let h;e[14]!==i||e[15]!==m?(h=i!==null&&(0,t.jsx)(W,{error:m,testId:"fanout-error"}),e[14]=i,e[15]=m,e[16]=h):h=e[16];let x;e[17]!==i||e[18]!==k||e[19]!==a?(x=i===null&&k&&(0,t.jsx)(A,{description:a("Realtime fan-out cost and per-topic subscriber counts for this shard."),icon:(0,t.jsx)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:(0,t.jsx)("path",{d:"M4 12h4l3 7 4-14 3 7h2"})}),testId:"fanout-empty",title:a("No fan-out activity yet.")}),e[17]=i,e[18]=k,e[19]=a,e[20]=x):x=e[20];let N;e[21]!==i||e[22]!==k||e[23]!==s||e[24]!==a?(N=i===null&&s!==void 0&&!k&&(0,t.jsxs)(t.Fragment,{children:[s.topics.length>0&&(0,t.jsxs)("section",{className:"flex flex-col gap-2","data-testid":"fanout-topics-section",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:a("Hot topics")}),(0,t.jsx)(_,{className:"overflow-hidden py-0",children:(0,t.jsxs)(q,{"data-testid":"fanout-topics-table",children:[(0,t.jsx)(H,{children:(0,t.jsxs)(K,{children:[(0,t.jsx)(T,{children:a("Topic")}),(0,t.jsx)(T,{children:a("Kind")}),(0,t.jsx)(T,{className:"text-right",children:a("Subscribers")})]})}),(0,t.jsx)(O,{children:s.topics.map(ee)})]})})]}),(0,t.jsxs)("section",{className:"flex flex-col gap-3","data-testid":"fanout-cost",children:[(0,t.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:a("Fan-out cost since this instance woke")}),(0,t.jsx)(z,{counters:s.shapePoke,includeTiming:!0,prefix:"fanout-poke",t:a,title:a("Shape pokes")}),(0,t.jsx)(z,{counters:s.whisper,includeTiming:!1,prefix:"fanout-whisper",t:a,title:a("Whisper broadcasts")}),(0,t.jsx)(Y,{counters:s.shapeProbe,t:a}),(0,t.jsx)(Z,{counters:s.globalPoll,t:a})]})]}),e[21]=i,e[22]=k,e[23]=s,e[24]=a,e[25]=N):N=e[25];let b;return e[26]!==y||e[27]!==h||e[28]!==x||e[29]!==N?(b=(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"fanout-panel",children:[y,h,x,N]}),e[26]=y,e[27]=h,e[28]=x,e[29]=N,e[30]=b):b=e[30],b},"me");function ee(c){return(0,t.jsxs)(K,{"data-testid":"fanout-topic-row",children:[(0,t.jsx)(D,{className:"font-mono text-xs",children:c.topic}),(0,t.jsx)(D,{children:(0,t.jsx)($,{variant:"outline",children:c.kind})}),(0,t.jsx)(D,{className:"text-right font-medium tabular-nums",children:c.subscribers})]},`${c.kind}:${c.topic}`)}S(ee,"Y");export{pe as default};
@@ -0,0 +1 @@
1
+ import{b as h}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{b as A}from"./chunk-3TE3V2QL.js";import{f as k}from"./chunk-BJEJVHCO.js";import"./chunk-FSRSK4LY.js";import"./chunk-5ICUJ4IA.js";import{a as y,e as S}from"./chunk-WUWBZPUK.js";import{d as I}from"./chunk-6B7FVPW3.js";import{a as u,d as w,f as z,g as P}from"./chunk-YKXDMIHQ.js";var N=w(z(),1);var a=w(P(),1);var j=[{key:"accounts",label:"Accounts"},{key:"admin",label:"Admin"},{key:"organization",label:"Organizations"},{key:"passkey",label:"Passkeys"},{key:"twoFactor",label:"Two-factor"}],v=u(e=>{if(e===void 0)return"\u2014";let i=[[86400,"d"],[3600,"h"],[60,"m"]];for(let[t,d]of i)if(e>=t&&e%t===0)return`${String(e/t)}${d}`;return`${String(e)}s`},"v"),p=u(e=>{let i=(0,N.c)(8),{children:t,heading:d,testId:n}=e,l;i[0]!==d?(l=(0,a.jsx)("header",{className:"border-b border-border px-4 py-3",children:(0,a.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:d})}),i[0]=d,i[1]=l):l=i[1];let s;i[2]!==t?(s=(0,a.jsx)(S,{className:"p-3",children:t}),i[2]=t,i[3]=s):s=i[3];let c;return i[4]!==l||i[5]!==s||i[6]!==n?(c=(0,a.jsxs)(y,{className:"gap-0 py-0","data-testid":n,children:[l,s]}),i[4]=l,i[5]=s,i[6]=n,i[7]=c):c=i[7],c},"h"),o=u(e=>{let i=(0,N.c)(7),{label:t,value:d}=e,n;i[0]!==t?(n=(0,a.jsx)("span",{className:"text-sm",children:t}),i[0]=t,i[1]=n):n=i[1];let l;i[2]!==d?(l=(0,a.jsx)("span",{className:"text-sm text-muted-foreground tabular-nums",children:d}),i[2]=d,i[3]=l):l=i[3];let s;return i[4]!==n||i[5]!==l?(s=(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs",children:[n,l]}),i[4]=n,i[5]=l,i[6]=s):s=i[6],s},"c"),M=u(()=>{let e=(0,N.c)(20),i=k(),t=I(),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=["lunora-auth-config"],e[0]=d):d=e[0];let n;e[1]!==i?(n=u(()=>i.getAuthConfig(),"r"),e[1]=i,e[2]=n):n=e[2];let{data:l,error:s}=A(d,n),c;e[3]!==t?(c=u(r=>(0,a.jsx)(h,{variant:r?"success":"outline",children:t(r?"Enabled":"Disabled")}),"u"),e[3]=t,e[4]=c):c=e[4];let m=c,g;e[5]!==s?(g=s!==null&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-destructive","data-testid":"auth-config-error",role:"alert",children:s}),e[5]=s,e[6]=g):g=e[6];let f;e[7]!==l||e[8]!==s||e[9]!==t?(f=s===null&&l===void 0&&(0,a.jsx)("p",{className:"px-4 py-8 text-center text-sm text-muted-foreground","data-testid":"auth-config-loading",children:t("Loading auth configuration\u2026")}),e[7]=l,e[8]=s,e[9]=t,e[10]=f):f=e[10];let x;e[11]!==l||e[12]!==s||e[13]!==m||e[14]!==t?(x=s===null&&l!==void 0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(p,{heading:t("Enabled capabilities"),testId:"auth-config-capabilities",children:(0,a.jsx)("ul",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:j.map(r=>{let $=l.capabilities[r.key];return(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs","data-testid":`auth-config-cap-${r.key}`,children:[(0,a.jsx)("span",{className:"text-sm",children:t(r.label)}),m($)]},r.key)})})}),(0,a.jsx)(p,{heading:t("Plugins"),testId:"auth-config-plugins",children:l.plugins.length===0?(0,a.jsx)("p",{className:"text-sm text-muted-foreground",children:t("No plugins enabled.")}):(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.plugins.map(C)})}),(0,a.jsx)(p,{heading:t("Sign-in methods"),testId:"auth-config-signin",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Email & password"),value:m(l.emailAndPassword)}),(0,a.jsx)(o,{label:t("Social providers"),value:l.socialProviders.length===0?t("None"):(0,a.jsx)("span",{className:"flex flex-wrap justify-end gap-1",children:l.socialProviders.map(L)})})]})}),l.organization.enabled&&(0,a.jsx)(p,{heading:t("Organizations"),testId:"auth-config-org",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Teams"),value:m(l.organization.teams)}),(0,a.jsx)(o,{label:t("Custom roles"),value:m(l.organization.roles)})]})}),(0,a.jsx)(p,{heading:t("Session policy"),testId:"auth-config-session",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Expires in"),value:v(l.session.expiresIn)}),(0,a.jsx)(o,{label:t("Refresh after"),value:v(l.session.updateAge)}),(0,a.jsx)(o,{label:t("Fresh window"),value:v(l.session.freshAge)}),(0,a.jsx)(o,{label:t("Cookie cache"),value:m(l.session.cookieCache===!0)})]})}),(0,a.jsx)(p,{heading:t("Rate limit"),testId:"auth-config-ratelimit",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(o,{label:t("Status"),value:m(l.rateLimit.enabled)}),l.rateLimit.enabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{label:t("Max requests"),value:l.rateLimit.max??"\u2014"}),(0,a.jsx)(o,{label:t("Window"),value:v(l.rateLimit.window)})]})]})}),l.userFields.length>0&&(0,a.jsx)(p,{heading:t("Plugin user fields"),testId:"auth-config-user-fields",children:(0,a.jsx)("ul",{className:"flex flex-col gap-2",children:l.userFields.map(r=>(0,a.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded-xl border border-border bg-card p-2 shadow-xs","data-testid":`auth-config-user-field-${r.name}`,children:[(0,a.jsxs)("span",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-mono text-xs",children:r.name}),r.plugin!==void 0&&(0,a.jsx)("span",{className:"text-[11px] text-muted-foreground",children:r.plugin})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(h,{variant:"outline",children:r.type}),r.required&&(0,a.jsx)(h,{variant:"secondary",children:t("required")}),r.unique&&(0,a.jsx)(h,{variant:"secondary",children:t("unique")})]})]},r.name))})}),(0,a.jsx)(y,{className:"gap-0 py-0",children:(0,a.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground","data-testid":"auth-config-note",children:t("OAuth providers, email templates, and rate limits are configured at deploy time in the better-auth setup and aren't editable here. See the Mail tab for email output.")})})]}),e[11]=l,e[12]=s,e[13]=m,e[14]=t,e[15]=x):x=e[15];let b;return e[16]!==g||e[17]!==f||e[18]!==x?(b=(0,a.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"auth-config",children:[g,f,x]}),e[16]=g,e[17]=f,e[18]=x,e[19]=b):b=e[19],b},"O");function C(e){return(0,a.jsx)(h,{"data-testid":`auth-config-plugin-${e}`,variant:"outline",children:e},e)}u(C,"P");function L(e){return(0,a.jsx)(h,{"data-testid":`auth-config-provider-${e}`,variant:"outline",children:e},e)}u(L,"z");export{M as default};
@@ -0,0 +1,2 @@
1
+ import{a as fe}from"./chunk-2URQKGWU.js";import"./chunk-4JLGLPWV.js";import{a as ie}from"./chunk-MU3P2FI7.js";import{a as pe}from"./chunk-66UGPQVC.js";import"./chunk-3Q2P62UR.js";import{W as de}from"./chunk-PLHA3OWK.js";import"./chunk-4L4WTGN5.js";import{a as b}from"./chunk-55754F6H.js";import"./chunk-IS6LVJ6L.js";import"./chunk-AAVLPU5Q.js";import{b as ne}from"./chunk-FEWMAPNI.js";import"./chunk-225VJ77I.js";import{a as he}from"./chunk-GYKK64E7.js";import"./chunk-ULIQFBZU.js";import"./chunk-I4VOJYXE.js";import"./chunk-35DM4JJG.js";import{a as B}from"./chunk-4ZEL6BYL.js";import{c as ue}from"./chunk-3TE3V2QL.js";import{f as le}from"./chunk-BJEJVHCO.js";import"./chunk-FSRSK4LY.js";import"./chunk-5ICUJ4IA.js";import{a as ce}from"./chunk-FKVZRPV5.js";import{d as oe,f as Z,g as ee,h as te,p as ae,s as me,t as re}from"./chunk-6B7FVPW3.js";import{a as i,d as Y,e as ge,f as ve,g as Ne,i as se}from"./chunk-YKXDMIHQ.js";var t=Y(Ne(),1);var be=Y(ve(),1);var N=Y(ge(),1);function ye({className:a,orientation:e="horizontal",...s}){return(0,t.jsx)(ie,{"data-slot":"separator",orientation:e,className:se("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...s})}i(ye,"ge");var we=/https?:\/\/[^\s"'<>)]+/i,xe=i(a=>a===void 0?void 0:we.exec(a)?.[0],"re"),y=i(a=>a===void 0?"":Array.isArray(a)?a.join(", "):a,"N"),Ce=/<a\s(?:[^>]*?\s)?href\s*=\s*["'](https?:\/\/[^"'\s]+)["']/iu,ke=/&(?:amp|#0*38|#x0*26);/giu,Se=i(a=>a===void 0?void 0:((a.html===void 0?void 0:Ce.exec(a.html)?.[1])??xe(a.text)??xe(a.html))?.replaceAll(ke,"&"),"ye"),Te=i((a,e)=>{let s=e.trim().toLowerCase();return s===""?a:a.filter(o=>`${o.subject} ${y(o.to)} ${y(o.cc)}`.toLowerCase().includes(s))},"Ce"),Le=i((a,e)=>{if(a.length!==0)return a.find(s=>s.id===e)??a[0]},"Se"),je=Z(B.clearCapturedMail),Me=Z(B.sendTestMail),_e=i(a=>{let e=(0,be.c)(38),{limit:s}=a,o=le(),p;e[0]!==s?(p={limit:s},e[0]=s,e[1]=p):p=e[1];let{data:q,error:w,errorSource:C,isLoading:g,refetch:n}=ue(B.getCapturedMail,p),[k,f]=(0,N.useState)(null),[P,S]=(0,N.useState)(null),[v,l]=(0,N.useState)("html"),[c,D]=(0,N.useState)(""),x=q?.entries??[],r=w??k,u=w===null?k:C,T;e[2]!==o||e[3]!==n?(T=i(async()=>{f(null);try{await o.query(je,{},ee("")),S(null),n()}catch(m){f(te(m))}},"T"),e[2]=o,e[3]=n,e[4]=T):T=e[4];let Q=T,L;e[5]!==o||e[6]!==n?(L=i(async()=>{f(null);try{await o.query(Me,{},ee("")),n()}catch(m){f(te(m))}},"k"),e[5]=o,e[6]=n,e[7]=L):L=e[7];let R=L,j;e[8]!==n?(j=i(()=>{n()},"A"),e[8]=n,e[9]=j):j=e[9],pe(j,!0);let M;e[10]!==Q?(M=i(()=>{ae(Q())},"E"),e[10]=Q,e[11]=M):M=e[11];let U=M,_;e[12]!==R?(_=i(()=>{ae(R())},"L"),e[12]=R,e[13]=_):_=e[13];let W=_,z;e[14]===Symbol.for("react.memo_cache_sentinel")?(z=i(m=>{D(m.currentTarget.value)},"_"),e[14]=z):z=e[14];let G=z,$;e[15]===Symbol.for("react.memo_cache_sentinel")?($=i(m=>{let{id:h}=m.currentTarget.dataset;h!==void 0&&S(h)},"M"),e[15]=$):$=e[15];let J=$,A;e[16]===Symbol.for("react.memo_cache_sentinel")?(A=i(m=>{let h=m.currentTarget.dataset.tab;(h==="headers"||h==="html"||h==="text")&&l(h)},"I"),e[16]=A):A=e[16];let K=A,O=Te(x,c),F=Le(O,P),d=Se(F),E;e[17]!==d?(E=i(()=>{d!==void 0&&me(d)},"z"),e[17]=d,e[18]=E):E=e[18];let V=E,H;e[19]!==d?(H=i(()=>{d!==void 0&&"window"in globalThis&&globalThis.window.open(d,"_blank","noopener")},"F"),e[19]=d,e[20]=H):H=e[20];let X=H,I;return e[21]!==x||e[22]!==r||e[23]!==u||e[24]!==c||e[25]!==g||e[26]!==d||e[27]!==U||e[28]!==V||e[29]!==G||e[30]!==X||e[31]!==J||e[32]!==K||e[33]!==W||e[34]!==F||e[35]!==v||e[36]!==O?(I={entries:x,error:r,errorSource:u,filter:c,isLoading:g,link:d,onClear:U,onCopyLink:V,onFilterChange:G,onOpenLink:X,onSelectMessage:J,onSelectTab:K,onSendTest:W,selected:F,tab:v,visible:O},e[21]=x,e[22]=r,e[23]=u,e[24]=c,e[25]=g,e[26]=d,e[27]=U,e[28]=V,e[29]=G,e[30]=X,e[31]=J,e[32]=K,e[33]=W,e[34]=F,e[35]=v,e[36]=O,e[37]=I):I=e[37],I},"Ae"),ze=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src data:; style-src 'unsafe-inline'; font-src data:">`,$e=i(a=>`${ze}${a}`,"Le"),Ke=i(({limit:a=100})=>{let e=oe(),{entries:s,error:o,errorSource:p,filter:q,isLoading:w,link:C,onClear:g,onCopyLink:n,onFilterChange:k,onOpenLink:f,onSelectMessage:P,onSelectTab:S,onSendTest:v,selected:l,tab:c,visible:D}=_e({limit:a}),x=i(r=>e(r==="html"?"HTML":r==="text"?"Plain text":"Headers"),"x");return(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"mail-panel",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(b,{"data-testid":"mail-send-test",onClick:v,size:"sm",type:"button",variant:"outline",children:e("Send test")}),(0,t.jsx)(b,{"data-testid":"mail-clear",disabled:s.length===0,onClick:g,size:"sm",type:"button",variant:"outline",children:e("Clear inbox")}),s.length>0&&(0,t.jsx)(ne,{className:"ml-auto","data-testid":"mail-count",variant:"secondary",children:e("{count} messages",{count:s.length})})]}),o!==null&&(0,t.jsx)(he,{error:p,testId:"mail-error"}),o===null&&!w&&s.length===0&&(0,t.jsx)(ce,{description:e("Email your app sends in dev is captured here \u2014 nothing is delivered."),icon:(0,t.jsxs)("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[(0,t.jsx)("path",{d:"M4 5h16v14H4z"}),(0,t.jsx)("path",{d:"m4 6 8 6 8-6"})]}),testId:"mail-empty",title:e("No captured email.")}),s.length>0&&(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-[minmax(0,22rem)_1fr]","data-testid":"mail-reader",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(de,{"aria-label":e("Search messages"),"data-testid":"mail-search",onChange:k,placeholder:e("Filter messages"),type:"search",value:q}),(0,t.jsx)(fe,{className:"max-h-[32rem] rounded-xl border border-border bg-card shadow-xs","data-testid":"mail-list",children:(0,t.jsx)("ul",{className:"divide-y",children:D.map(r=>{let u=r.id===l?.id;return(0,t.jsx)("li",{children:(0,t.jsxs)("button",{className:`flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left text-sm hover:bg-muted/60 ${u?"bg-muted":""}`,"data-active":u,"data-id":r.id,"data-testid":"mail-list-item",onClick:P,type:"button",children:[(0,t.jsx)("span",{className:"w-full truncate font-medium",children:r.subject||e("(no subject)")}),(0,t.jsx)("span",{className:"w-full truncate text-xs text-muted-foreground",children:y(r.to)}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground tabular-nums",children:re(r.capturedAt,"\u2014")})]})},r.id)})})})]}),l!==void 0&&(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card p-4 shadow-xs","data-testid":"mail-detail",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"truncate text-base font-semibold","data-testid":"mail-subject",children:l.subject||e("(no subject)")}),(0,t.jsxs)("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 text-xs text-muted-foreground",children:[(0,t.jsx)("dt",{children:e("From")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:l.from??"\u2014"}),(0,t.jsx)("dt",{children:e("To")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:y(l.to)}),l.cc!==void 0&&l.cc.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("dt",{children:e("Cc")}),(0,t.jsx)("dd",{className:"truncate font-mono",children:y(l.cc)})]}),(0,t.jsx)("dt",{children:e("Sent")}),(0,t.jsx)("dd",{className:"tabular-nums",children:re(l.capturedAt,"\u2014")})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2","data-testid":"mail-actions",children:[(0,t.jsx)(b,{"data-testid":"mail-copy-link",disabled:C===void 0,onClick:n,size:"sm",type:"button",variant:"outline",children:e("Copy link")}),(0,t.jsx)(b,{"data-testid":"mail-open-link",disabled:C===void 0,onClick:f,size:"sm",type:"button",variant:"outline",children:e("Open in new tab")})]}),(0,t.jsx)(ye,{}),(0,t.jsx)("div",{className:"flex items-center gap-1","data-testid":"mail-tabs",role:"tablist",children:["html","text","headers"].map(r=>(0,t.jsx)(b,{"aria-selected":c===r,"data-tab":r,"data-testid":`mail-tab-${r}`,onClick:S,role:"tab",size:"sm",type:"button",variant:c===r?"secondary":"ghost",children:x(r)},r))}),(0,t.jsxs)("div",{className:"min-h-[12rem]",children:[c==="html"&&(l.html===void 0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No HTML body.")}):(0,t.jsx)("iframe",{className:"h-[24rem] w-full rounded-md border bg-white","data-testid":"mail-preview-html",sandbox:"",srcDoc:$e(l.html),title:e("Email preview")})),c==="text"&&(l.text===void 0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No text body.")}):(0,t.jsx)("pre",{className:"overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-xs","data-testid":"mail-preview-text",children:l.text})),c==="headers"&&(l.headers===void 0||Object.keys(l.headers).length===0?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e("No headers.")}):(0,t.jsx)("pre",{className:"overflow-auto whitespace-pre-wrap rounded-md border bg-muted/30 p-3 text-xs","data-testid":"mail-preview-headers",children:Object.entries(l.headers).map(([r,u])=>`${r}: ${u}`).join(`
2
+ `)}))]})]})]})]})},"Qe");export{Ke as MailPanel};
@@ -0,0 +1 @@
1
+ import{m as h,n as v}from"./chunk-Y5PCZUGU.js";import{a as u,d as p,f as x,g as y,i as g}from"./chunk-YKXDMIHQ.js";var b=p(x(),1);var n=p(y(),1);var w={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},j=u(i=>{let a=(0,b.c)(12),{ariaLabel:c,className:m,series:l,testId:d}=i;if(l.length<2)return null;let t;a[0]!==l?(t=l.slice(-40).map(N),a[0]=l,a[1]=t):t=a[1];let f=t,e;a[2]!==m?(e=g("h-6 w-[120px]",m),a[2]=m,a[3]=e):e=a[3];let o;a[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,n.jsx)(v,{dataKey:"value"}),a[4]=o):o=a[4];let r;a[5]!==f?(r=(0,n.jsx)(h,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:w,data:f,children:o}),a[5]=f,a[6]=r):r=a[6];let s;return a[7]!==c||a[8]!==e||a[9]!==r||a[10]!==d?(s=(0,n.jsx)("div",{"aria-label":c,className:e,"data-testid":d,role:"img",children:r}),a[7]=c,a[8]=e,a[9]=r,a[10]=d,a[11]=s):s=a[11],s},"w");function N(i,a){return{index:a,value:i}}u(N,"b");export{j as a};
@@ -0,0 +1 @@
1
+ import{d as E}from"./chunk-225VJ77I.js";import{a as n,d as b,e as h}from"./chunk-YKXDMIHQ.js";var y=b(h(),1);var T=n(()=>{},"noop"),K=typeof document<"u"?y.useLayoutEffect:T;var W=b(h(),1),l={...W};var a=l.useInsertionEffect,_=a&&a!==l.useLayoutEffect?a:t=>t();function q(t){let e=E(B).current;return e.next=t,_(e.effect),e.trampoline}n(q,"useStableCallback");function B(){let t={next:void 0,callback:O,trampoline:n((...e)=>t.callback?.(...e),"trampoline"),effect:n(()=>{t.callback=t.next},"effect")};return t}n(B,"createStableCallback");function O(){}n(O,"assertNotCalled");function s(){return typeof window<"u"}n(s,"hasWindow");function m(t){return N(t)?(t.nodeName||"").toLowerCase():"#document"}n(m,"getNodeName");function c(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}n(c,"getWindow");function V(t){var e;return(e=(N(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}n(V,"getDocumentElement");function N(t){return s()?t instanceof Node||t instanceof c(t).Node:!1}n(N,"isNode");function C(t){return s()?t instanceof Element||t instanceof c(t).Element:!1}n(C,"isElement");function L(t){return s()?t instanceof HTMLElement||t instanceof c(t).HTMLElement:!1}n(L,"isHTMLElement");function g(t){return!s()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof c(t).ShadowRoot}n(g,"isShadowRoot");function R(t){let{overflow:e,overflowX:i,overflowY:u,display:o}=v(t);return/auto|scroll|overlay|hidden|clip/.test(e+u+i)&&o!=="inline"&&o!=="contents"}n(R,"isOverflowElement");function J(t){return/^(table|td|th)$/.test(m(t))}n(J,"isTableElement");function $(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}n($,"isTopLayer");var A=/transform|translate|scale|rotate|perspective|filter/,H=/paint|layout|strict|content/,r=n(t=>!!t&&t!=="none","isNotNone"),d;function I(t){let e=C(t)?v(t):t;return r(e.transform)||r(e.translate)||r(e.scale)||r(e.rotate)||r(e.perspective)||!M()&&(r(e.backdropFilter)||r(e.filter))||A.test(e.willChange||"")||H.test(e.contain||"")}n(I,"isContainingBlock");function Q(t){let e=p(t);for(;L(e)&&!k(e);){if(I(e))return e;if($(e))return null;e=p(e)}return null}n(Q,"getContainingBlock");function M(){return d==null&&(d=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),d}n(M,"isWebKit");function k(t){return/^(html|body|#document)$/.test(m(t))}n(k,"isLastTraversableNode");function v(t){return c(t).getComputedStyle(t)}n(v,"getComputedStyle");function Z(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}n(Z,"getNodeScroll");function p(t){if(m(t)==="html")return t;let e=t.assignedSlot||t.parentNode||g(t)&&t.host||V(t);return g(e)?e.host:e}n(p,"getParentNode");function D(t){let e=p(t);return k(e)?(t.ownerDocument||t).body:L(e)&&R(e)?e:D(e)}n(D,"getNearestOverflowAncestor");function S(t,e,i){var u;e===void 0&&(e=[]),i===void 0&&(i=!0);let o=D(t),x=o===((u=t.ownerDocument)==null?void 0:u.body),f=c(o);if(x){let w=F(f);return e.concat(f,f.visualViewport||[],R(o)?o:[],w&&i?S(w):[])}else return e.concat(o,S(o,[],i))}n(S,"getOverflowAncestors");function F(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}n(F,"getFrameElement");function nt(t){return t?.ownerDocument||document}n(nt,"ownerDocument");export{K as a,l as b,q as c,m as d,c as e,V as f,N as g,C as h,L as i,g as j,R as k,J as l,$ as m,I as n,Q as o,M as p,k as q,v as r,Z as s,p as t,S as u,F as v,nt as w};
@@ -0,0 +1 @@
1
+ import{a as te}from"./chunk-ZJZNCJHY.js";import{a as Z}from"./chunk-S3CRZLGS.js";import{a as Y}from"./chunk-ZHM5ZHPC.js";import{b as X}from"./chunk-OGUKYRFM.js";import{a as W}from"./chunk-K7AJEMKE.js";import{e as G}from"./chunk-6D6Z2KXU.js";import"./chunk-OKG3HWSJ.js";import"./chunk-PLHA3OWK.js";import"./chunk-Y6CXU7T4.js";import"./chunk-4L4WTGN5.js";import{b as ae,c as ne}from"./chunk-ONIGWNXT.js";import{a as q,b as ee}from"./chunk-LJVH6HRQ.js";import{a as Q}from"./chunk-55754F6H.js";import"./chunk-IS6LVJ6L.js";import"./chunk-AAVLPU5Q.js";import"./chunk-225VJ77I.js";import"./chunk-GYKK64E7.js";import"./chunk-ULIQFBZU.js";import"./chunk-I4VOJYXE.js";import"./chunk-35DM4JJG.js";import{a as I}from"./chunk-4ZEL6BYL.js";import{c as _}from"./chunk-3TE3V2QL.js";import{f as D}from"./chunk-BJEJVHCO.js";import"./chunk-FSRSK4LY.js";import"./chunk-5ICUJ4IA.js";import"./chunk-HEAQVSNS.js";import"./chunk-WUWBZPUK.js";import{d as M,f as C,g as A,l as V,p as N}from"./chunk-6B7FVPW3.js";import{a as l,d as j,e as he,f as me,g as pe}from"./chunk-YKXDMIHQ.js";var E=j(me(),1);var c=j(he(),1);var S=j(pe(),1);var ge=l(t=>{let{suggestedIndex:e,table:i}=t;if(typeof i!="string"||i.length===0||typeof e!="object"||e===null)return!1;let{fields:a,name:n}=e;return!Array.isArray(a)||a.length===0||a.some(s=>typeof s!="string"||s.length===0)?!1:typeof n=="string"&&n.length>0},"ye"),be=l((t,e)=>`.index(${JSON.stringify(t)}, [${e.map(i=>JSON.stringify(i)).join(", ")}])`,"ge"),ye=l(t=>{let e=(0,E.c)(19),{fields:i,indexName:a,table:n,testId:s}=t,u=M(),[h,f]=(0,c.useState)(null),m;e[0]!==i||e[1]!==a?(m=l(()=>{let b=be(a,i),$="navigator"in globalThis?globalThis.navigator.clipboard:void 0;if($===void 0){f({copied:!1,declaration:b});return}N($.writeText(b).then(()=>(f({copied:!0,declaration:b}),!0)),()=>{f({copied:!1,declaration:b})})},"m"),e[0]=i,e[1]=a,e[2]=m):m=e[2];let x=m;if(h!==null){let b;return e[3]!==h.copied||e[4]!==h.declaration||e[5]!==u||e[6]!==n||e[7]!==s?(b=h.copied?(0,S.jsx)("span",{className:"text-xs text-muted-foreground","data-testid":`${s}-applied`,children:u("Index declaration copied \u2014 add it to {table} in lunora/schema.ts.",{table:n})}):(0,S.jsxs)("span",{className:"flex flex-col gap-1 text-xs text-muted-foreground","data-testid":`${s}-manual`,children:[u("Could not reach the clipboard \u2014 add this to {table} in lunora/schema.ts:",{table:n}),(0,S.jsx)("code",{className:"font-mono break-all select-all",children:h.declaration})]}),e[3]=h.copied,e[4]=h.declaration,e[5]=u,e[6]=n,e[7]=s,e[8]=b):b=e[8],b}let T;e[9]!==u?(T=u("Copy?"),e[9]=u,e[10]=T):T=e[10];let p;e[11]!==u||e[12]!==n?(p=u("Copy index declaration for {table}",{table:n}),e[11]=u,e[12]=n,e[13]=p):p=e[13];let w;return e[14]!==x||e[15]!==T||e[16]!==p||e[17]!==s?(w=(0,S.jsx)(te,{confirmLabel:T,onConfirm:x,testId:s,children:p}),e[14]=x,e[15]=T,e[16]=p,e[17]=s,e[18]=w):w=e[18],w},"ve"),xe=l((t,e)=>{let i=new Map;for(let a of e){let n=`${a.table} ${a.index}`;i.set(n,(i.get(n)??0)+a.reads)}return t.map(a=>({index:a.index,reads:i.get(`${a.table} ${a.index}`)??0,table:a.table}))},"Se"),ve=l(t=>{let e=new Map;for(let i of t)for(let a of i.scannedTables??[])e.set(a.table,(e.get(a.table)??0)+a.scans);return[...e].map(([i,a])=>({scans:a,table:i}))},"Te"),ie=l((t,e)=>e.map(i=>({index:i.name,table:t})),"P"),we=l(t=>{let e=xe(t.declaredIndexes??[],t.indexHits??[]),i=ve(t.functions??[]),a=t.shardTraffic??[],n=t.analyticsMetrics,s=n&&n.indexHits.length>0?n.indexHits:e,u=n&&n.tableScans.length>0?n.tableScans:i,h=n&&n.shardTraffic.length>0?n.shardTraffic:a,f=ne({indexHits:s,schema:{tables:[]},shardTraffic:h,tableScans:u},{lints:ae,source:"runtime"}),m=t.suppressHotScanTables;return(m===void 0?f:f.filter(x=>!(x.metadata.kind==="hot_scan"&&typeof x.metadata.table=="string"&&m.has(x.metadata.table)))).map(x=>q(x))},"we"),Se=C(I.listTables),Te=C(I.listTableIndexes),Ie=C(I.listTablesIndexes),B=l(t=>`${(t*100).toFixed(1)}%`,"L"),re=l(t=>`${(t/1e3).toFixed(2)}s`,"V"),$e=l(t=>{if(t.length<=1)return t[0]??"";let e=t[t.length-1]??"";return`${t.slice(0,-1).join(", ")} and ${e}`},"Ne"),ke=l((t,e)=>({"high-error-rate":t("High error rate"),"high-evictions":t("High cache eviction rate"),"high-write-contention":t("High write contention"),"low-cache-hit-rate":t("Low cache hit rate"),"missing-index":t("Missing index"),"slow-function":t("Slow function"),"storage-headroom":t("Storage headroom")})[e.kind],"ke"),se=l((t,e)=>({"high-error-rate":t("{rate} of calls failed.",{rate:B(e.value)}),"high-evictions":t("{count} entries evicted recently.",{count:e.value}),"high-write-contention":t("{rate} of calls hit a write conflict \u2014 consider sharding to cut contention.",{rate:B(e.value)}),"low-cache-hit-rate":t("{rate} hit rate over recent traffic.",{rate:B(e.value)}),"missing-index":t("Slowest call took {duration} \u2014 it full-scanned {tables} with no index.",{duration:re(e.value),tables:$e(e.tables??[])}),"slow-function":t("Slowest call took {duration}.",{duration:re(e.value)}),"storage-headroom":t("{size} of the 10 GiB per-shard ceiling \u2014 plan a .shardBy() migration while it still has runway.",{size:V(e.value)})})[e.kind],"U"),Ne=l(t=>{let e=(0,E.c)(10),{onJump:i,table:a}=t,n=M(),s;e[0]!==i||e[1]!==a?(s=l(()=>{i(a)},"i"),e[0]=i,e[1]=a,e[2]=s):s=e[2];let u=s,h=`in-add-index-${a}`,f;e[3]!==n||e[4]!==a?(f=n("Add index on {table}",{table:a}),e[3]=n,e[4]=a,e[5]=f):f=e[5];let m;return e[6]!==u||e[7]!==h||e[8]!==f?(m=(0,S.jsx)(Q,{"data-testid":h,onClick:u,size:"sm",type:"button",variant:"outline",children:f}),e[6]=u,e[7]=h,e[8]=f,e[9]=m):m=e[9],m},"Be"),ze=l(({initialShardKey:t,loadShardTraffic:e})=>{let i=D(),a=G(),n=M(),{queryShardKey:s,setShardKey:u,shardKey:h}=Z(t),[f,m]=(0,c.useState)(null),[x,T]=(0,c.useState)(null),p=(0,c.useRef)(""),w=_(I.getMetrics,{},{live:!0,shardKey:s}),b=_(I.getFunctionStats,{},{live:!0,shardKey:s}),$=_(I.getAdvisories,{},{live:!0,shardKey:s}),L=w.data??null,H=b.data?.functions??null,F=$.data?.advisories??null,J=w.data?.indexHits??null,O=w.error!==null&&b.error!==null?w.error:null,oe=e??(r=>i.shardTraffic(r)),le=l(async(r,y)=>{let o=r[0];if(o===void 0||o===""){p.current===y&&T(null);return}try{let g=await oe(o);if(p.current!==y)return;let d=new Map;for(let v of g.shards)d.has(v.shardKey)||d.set(v.shardKey,{requests:v.requests,shardKey:v.shardKey});T([...d.values()])}catch{p.current===y&&T(null)}},"Y"),de=l(async(r,y)=>{let o=await Promise.allSettled(r.map(async d=>[d,await i.query(Te,{table:d},A(y))])),g=[];for(let d of o)if(d.status==="fulfilled"){let[v,k]=d.value;g.push(...ie(v,k.indexes))}return g},"Z"),z=(0,c.useEffectEvent)(async r=>{p.current=r;let y=[];try{let o=await i.query(Se,{},A(r));if(p.current!==r)return;X(r),y=o.map(d=>d.name);let g=[];if(y.length>0)try{let d=await i.query(Ie,{tables:y},A(r));if(p.current!==r)return;for(let[v,k]of Object.entries(d.indexesByTable))g.push(...ie(v,k))}catch{if(g=await de(y,r),p.current!==r)return}m(g)}catch{p.current===r&&m(null)}await le(y,r)});(0,c.useEffect)(()=>{N(z(s))},[s]);let ce=(0,c.useEffectEvent)(()=>{w.refetch(),b.refetch(),$.refetch(),N(z(s))});(0,c.useEffect)(()=>{let r=l(()=>{document.visibilityState==="visible"&&ce()},"r");return document.addEventListener("visibilitychange",r),()=>{document.removeEventListener("visibilitychange",r)}},[]);let U=(0,c.useCallback)(r=>{N(a({search:{table:r},to:"/schema"}))},[a]),K=(0,c.useMemo)(()=>W(L,H),[H,L]),P=(0,c.useMemo)(()=>new Set(K.filter(r=>r.kind==="missing-index").flatMap(r=>r.tables??[])),[K]),R=(0,c.useMemo)(()=>we({declaredIndexes:f??[],functions:H,indexHits:J,shardTraffic:x,suppressHotScanTables:P}),[f,H,J,P,x]),ue=(0,c.useMemo)(()=>{let r=K.map(o=>{let g=o.kind==="missing-index"?o.tables??[]:[];return{action:g.length>0?g.map(d=>(0,S.jsx)(Ne,{onJump:U,table:d},d)):void 0,description:o.message===void 0?se(n,o):`${se(n,o)} \u2014 ${o.message}`,entity:o.fn,issueType:ke(n,o),key:`${o.kind}:${o.fn??""}`,level:o.severity}}),y=new Set(["unindexed_foreign_key","unindexed_relation_target"]);return[...(F??[]).map(o=>{let g=q(o);if(y.has(o.name)&&ge(o.metadata)){let{table:d,suggestedIndex:v}=o.metadata,k=`in-apply-index-${d}-${v.name}`;return{...g,action:(0,S.jsx)(ye,{fields:v.fields,indexName:v.name,table:d,testId:k})}}return g}),...R,...r]},[F,K,U,R,n]),fe=(0,S.jsx)(Y,{onChange:u,testId:"in-shard-input",value:h});return(0,S.jsx)(ee,{error:O,errorSource:O===null?void 0:w.errorSource,rows:ue,testId:"lunora-insights",toolbar:fe})},"Ue");export{ze as InsightsPanel};
@@ -0,0 +1 @@
1
+ var i={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},e={...i,position:"fixed",top:0,left:0},t={...i,position:"absolute"};export{e as a,t as b};