@lunora/studio 1.0.0-alpha.34 → 1.0.0-alpha.340

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 (472) hide show
  1. package/LICENSE.md +6 -0
  2. package/README.md +1 -1
  3. package/dist/index.d.mts +1597 -0
  4. package/dist/index.d.ts +991 -807
  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 +6 -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 +10 -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/ai-usage-panel.mjs +1 -0
  31. package/dist/packem_chunks/analytics-panel.mjs +1 -0
  32. package/dist/packem_chunks/architecture-panel.mjs +1 -0
  33. package/dist/packem_chunks/auth-audit-panel.mjs +1 -0
  34. package/dist/packem_chunks/auth-config-panel.mjs +1 -0
  35. package/dist/packem_chunks/auth-sessions-panel.mjs +1 -0
  36. package/dist/packem_chunks/containers-panel.mjs +1 -0
  37. package/dist/packem_chunks/dashboards-panel.mjs +1 -0
  38. package/dist/packem_chunks/evals-panel.mjs +1 -0
  39. package/dist/packem_chunks/fanout-panel.mjs +1 -0
  40. package/dist/packem_chunks/flags-panel.mjs +1 -0
  41. package/dist/packem_chunks/issues-panel.mjs +1 -0
  42. package/dist/packem_chunks/kv-browser.mjs +1 -0
  43. package/dist/packem_chunks/log-drains-panel.mjs +4 -0
  44. package/dist/packem_chunks/migrations-route.mjs +1 -0
  45. package/dist/packem_chunks/organizations-panel.mjs +1 -0
  46. package/dist/packem_chunks/payments-panel.mjs +1 -0
  47. package/dist/packem_chunks/permissions-panel.mjs +1 -0
  48. package/dist/packem_chunks/privacy-requests-panel.mjs +1 -0
  49. package/dist/packem_chunks/queues-panel.mjs +1 -0
  50. package/dist/packem_chunks/reactors-panel.mjs +1 -0
  51. package/dist/packem_chunks/rls-panel.mjs +1 -0
  52. package/dist/packem_chunks/schedule-panel.mjs +1 -0
  53. package/dist/packem_chunks/sparkline.mjs +1 -0
  54. package/dist/packem_chunks/storage-rules-panel.mjs +1 -0
  55. package/dist/packem_chunks/subscriptions-panel.mjs +1 -0
  56. package/dist/packem_chunks/sync-client-panel.mjs +1 -0
  57. package/dist/packem_chunks/traces-panel.mjs +1 -0
  58. package/dist/packem_chunks/users-panel.mjs +1 -0
  59. package/dist/packem_chunks/vector-browser.mjs +1 -0
  60. package/dist/packem_chunks/workflows-panel.mjs +1 -0
  61. package/dist/packem_shared/ADMIN_FUNCTIONS-B8yyk5BX.mjs +1 -0
  62. package/dist/packem_shared/ApiDocsPanel-Py7C4ibM.mjs +2 -0
  63. package/dist/packem_shared/ApiReferencePanel-DlYVADAy.mjs +1 -0
  64. package/dist/packem_shared/CommandPalette-CM1hqAOD.mjs +1 -0
  65. package/dist/packem_shared/ConfirmButton-DU4p72Er.mjs +1 -0
  66. package/dist/packem_shared/ConnectionBadge-B8Hj5DaE.mjs +1 -0
  67. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs +1 -0
  68. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-D5YMT0gM.mjs +1 -0
  69. package/dist/packem_shared/DEFAULT_LOCALE-A1Yg5ORA.mjs +1 -0
  70. package/dist/packem_shared/DataBrowser-DxlLv5x1.mjs +4 -0
  71. package/dist/packem_shared/DataFilters-CYZFt2EK.mjs +1 -0
  72. package/dist/packem_shared/ErrorBoundary-BWNF98VF.mjs +1 -0
  73. package/dist/packem_shared/GlobalDataBrowser-TFTQpSVj.mjs +1 -0
  74. package/dist/packem_shared/HomePanel-BVz2sDQ4.mjs +1 -0
  75. package/dist/packem_shared/MigrationsPanel-fUyhbt0w.mjs +1 -0
  76. package/dist/packem_shared/OpenRpcReferencePanel-nYyfjjse.mjs +1 -0
  77. package/dist/packem_shared/STUDIO_ROOT_CLASS-C6MccdVk.mjs +1 -0
  78. package/dist/packem_shared/ScheduledJobs-zSeU_6cN.mjs +1 -0
  79. package/dist/packem_shared/ShardInput-C6mjgAh4.mjs +1 -0
  80. package/dist/packem_shared/Studio-CNqMkRmB.mjs +1 -0
  81. package/dist/packem_shared/StudioApp-CUxEVr__.mjs +1 -0
  82. package/dist/packem_shared/StudioI18nProvider-fVsCSs5L.mjs +1 -0
  83. package/dist/packem_shared/advisor-view-CXiPdw4B.mjs +1 -0
  84. package/dist/packem_shared/aggregateMetrics-DKFJc-o5.mjs +1 -0
  85. package/dist/packem_shared/alert-PB5W11MM.mjs +1 -0
  86. package/dist/packem_shared/app.d-D45VvUTx.d.mts +351 -0
  87. package/dist/packem_shared/app.d-D45VvUTx.d.ts +351 -0
  88. package/dist/packem_shared/auth-pager-DiDnXsfe.mjs +1 -0
  89. package/dist/packem_shared/badge-r_5B4LHP.mjs +1 -0
  90. package/dist/packem_shared/bar-chart-BCsEIQoQ.mjs +6 -0
  91. package/dist/packem_shared/browser-storage-BH1MxLZs.mjs +1 -0
  92. package/dist/packem_shared/button-q0UYSmrn.mjs +1 -0
  93. package/dist/packem_shared/card-By2O8ULa.mjs +1 -0
  94. package/dist/packem_shared/cf-links-CBJ5SywP.mjs +1 -0
  95. package/dist/packem_shared/checkbox-CnS9cyCz.mjs +1 -0
  96. package/dist/packem_shared/control-button-BOZ5K-FC.mjs +1 -0
  97. package/dist/packem_shared/data-grid-BHTuvSI7.mjs +1 -0
  98. package/dist/packem_shared/data-view-params-DhYmAkcj.mjs +1 -0
  99. package/dist/packem_shared/diagram-export-panel-BMLzao0Y.mjs +2 -0
  100. package/dist/packem_shared/dropdown-menu-jLZenfWH.mjs +2 -0
  101. package/dist/packem_shared/empty-state-D7jEML_T.mjs +1 -0
  102. package/dist/packem_shared/error-alert-D-ftqyo-.mjs +1 -0
  103. package/dist/packem_shared/grid-features-CIdZ8Dqo.mjs +6 -0
  104. package/dist/packem_shared/grid-pagination-DgzyzfBh.mjs +1 -0
  105. package/dist/packem_shared/home-panel-CF-MfsnH.mjs +3 -0
  106. package/dist/packem_shared/input-CXhxesPC.mjs +1 -0
  107. package/dist/packem_shared/internal-BXEjuLPN.mjs +2 -0
  108. package/dist/packem_shared/label-DKFzyHq6.mjs +1 -0
  109. package/dist/packem_shared/live-status-BuJdUZFU.mjs +1 -0
  110. package/dist/packem_shared/log-fields-BolUoZ9g.mjs +1 -0
  111. package/dist/packem_shared/log-line-BWDt_F56.mjs +1 -0
  112. package/dist/packem_shared/metrics-format-1sNGG47R.mjs +1 -0
  113. package/dist/packem_shared/modal-shell-CDztwLnv.mjs +1 -0
  114. package/dist/packem_shared/operation-console-provider-DoloEvon.mjs +1 -0
  115. package/dist/packem_shared/recording-client-CFBkH4uZ.mjs +1 -0
  116. package/dist/packem_shared/reference-view-BrsL8UGn.mjs +13 -0
  117. package/dist/packem_shared/schema-diagram-ghsOCED7.mjs +2 -0
  118. package/dist/packem_shared/scroll-area-CXCQH7VT.mjs +2 -0
  119. package/dist/packem_shared/select-DPyS18Vy.mjs +2 -0
  120. package/dist/packem_shared/shard-history-CaO3C4KQ.mjs +1 -0
  121. package/dist/packem_shared/shortcuts-B9gDaXmw.mjs +1 -0
  122. package/dist/packem_shared/skeleton-DX1gfixl.mjs +1 -0
  123. package/dist/packem_shared/sparkline-B_sPPO_8.mjs +1 -0
  124. package/dist/packem_shared/sql-result-table-COsfUSGc.mjs +1 -0
  125. package/dist/packem_shared/stat-card-BAv73QtB.mjs +1 -0
  126. package/dist/packem_shared/storage-tier-C2mKwYRj.mjs +1 -0
  127. package/dist/packem_shared/studio-BcHsk7mT.mjs +2 -0
  128. package/dist/packem_shared/table-D0SBiDu-.mjs +2 -0
  129. package/dist/packem_shared/table-list-sidebar-DwqtHSHU.mjs +1 -0
  130. package/dist/packem_shared/textarea--40GKAyz.mjs +1 -0
  131. package/dist/packem_shared/trace-handoff-BV3EWqy_.mjs +1 -0
  132. package/dist/packem_shared/use-admin-query-I1uILsUP.mjs +1 -0
  133. package/dist/packem_shared/use-admin-spec-BdNLZbTO.mjs +1 -0
  134. package/dist/packem_shared/use-async-submit-2eBBD0-m.mjs +1 -0
  135. package/dist/packem_shared/use-auth-config-DQ8tNyBh.mjs +1 -0
  136. package/dist/packem_shared/use-mirrored-ref-CVDf2z1M.mjs +1 -0
  137. package/dist/packem_shared/use-open-trace-B_0LbTD7.mjs +1 -0
  138. package/dist/packem_shared/use-shard-key-BsP3o5wT.mjs +1 -0
  139. package/dist/packem_shared/use-sql-assistant-DetnUyFf.mjs +1 -0
  140. package/dist/packem_shared/useDebounced-DVeQ5-oW.mjs +1 -0
  141. package/dist/packem_shared/utils-bhneXptQ.mjs +1 -0
  142. package/dist/packem_shared/virtual-rect-D_j7aLxX.mjs +1 -0
  143. package/dist/standalone/chunk-253UHWDX.js +1 -0
  144. package/dist/standalone/chunk-2I4NHEKA.js +1 -0
  145. package/dist/standalone/chunk-2IKDEUCX.js +1 -0
  146. package/dist/standalone/chunk-2SNK7KHX.js +1 -0
  147. package/dist/standalone/chunk-37WYCOQ2.js +1 -0
  148. package/dist/standalone/chunk-3FYMEXVB.js +1 -0
  149. package/dist/standalone/chunk-3N5PRV3V.js +1 -0
  150. package/dist/standalone/chunk-3YXASVTP.js +1 -0
  151. package/dist/standalone/chunk-43GV7LQK.js +1 -0
  152. package/dist/standalone/chunk-4CGBMYO3.js +6 -0
  153. package/dist/standalone/chunk-4NOMAGEO.js +1 -0
  154. package/dist/standalone/chunk-4ZEL6BYL.js +1 -0
  155. package/dist/standalone/chunk-55UGUCQ6.js +1 -0
  156. package/dist/standalone/chunk-5B2RTXBS.js +1 -0
  157. package/dist/standalone/chunk-5QR2SQIS.js +1 -0
  158. package/dist/standalone/chunk-5SLTDY4C.js +1 -0
  159. package/dist/standalone/chunk-5Y5UTG4N.js +1 -0
  160. package/dist/standalone/chunk-6XKL22OG.js +3 -0
  161. package/dist/standalone/chunk-6ZSIPBTC.js +6 -0
  162. package/dist/standalone/chunk-74IYYDDI.js +19 -0
  163. package/dist/standalone/chunk-7G4Z6Q7X.js +1 -0
  164. package/dist/standalone/chunk-7GVT36VI.js +1 -0
  165. package/dist/standalone/chunk-7Q256NLI.js +1 -0
  166. package/dist/standalone/chunk-7RKB5KS7.js +1 -0
  167. package/dist/standalone/chunk-7Y3SY37W.js +1 -0
  168. package/dist/standalone/chunk-APEQELK3.js +1 -0
  169. package/dist/standalone/chunk-AUAECCXB.js +1 -0
  170. package/dist/standalone/{chunk-BJGBHGK3.js → chunk-AUGKHAMQ.js} +1 -1
  171. package/dist/standalone/chunk-BFQMOALO.js +1 -0
  172. package/dist/standalone/chunk-BOMPSVRC.js +1 -0
  173. package/dist/standalone/chunk-BTG6YDYM.js +1 -0
  174. package/dist/standalone/chunk-BTQ72TPT.js +1 -0
  175. package/dist/standalone/chunk-CCDX5RYT.js +1 -0
  176. package/dist/standalone/chunk-CGQMJYCW.js +1 -0
  177. package/dist/standalone/chunk-CVXNHIQW.js +1 -0
  178. package/dist/standalone/chunk-DBHZXRL6.js +1 -0
  179. package/dist/standalone/chunk-DBZ4TBP5.js +1 -0
  180. package/dist/standalone/chunk-DEFCA7GG.js +5 -0
  181. package/dist/standalone/chunk-DHGPCQ2F.js +1 -0
  182. package/dist/standalone/chunk-E4PXACVL.js +3 -0
  183. package/dist/standalone/chunk-E5DXYVPB.js +1 -0
  184. package/dist/standalone/chunk-ECY2JC5F.js +1 -0
  185. package/dist/standalone/chunk-EE227HDE.js +1 -0
  186. package/dist/standalone/chunk-ENIA26XP.js +1 -0
  187. package/dist/standalone/chunk-EWMBX5N2.js +1 -0
  188. package/dist/standalone/chunk-FCXFQF2W.js +1 -0
  189. package/dist/standalone/chunk-FPI7AMQJ.js +1 -0
  190. package/dist/standalone/chunk-FUL4ROKH.js +1 -0
  191. package/dist/standalone/chunk-FUYEZFBP.js +1 -0
  192. package/dist/standalone/chunk-G2F22AMT.js +1 -0
  193. package/dist/standalone/chunk-GC4XRCRZ.js +1 -0
  194. package/dist/standalone/chunk-GHQ2VDI2.js +1 -0
  195. package/dist/standalone/chunk-GOFZ4Y74.js +1 -0
  196. package/dist/standalone/chunk-GUDC24NJ.js +1 -0
  197. package/dist/standalone/chunk-GWVYDOBH.js +1 -0
  198. package/dist/standalone/chunk-GYBCO7NN.js +1 -0
  199. package/dist/standalone/chunk-HCFJBY65.js +1 -0
  200. package/dist/standalone/chunk-HCTJKP5J.js +1 -0
  201. package/dist/standalone/chunk-HGHIVU76.js +1 -0
  202. package/dist/standalone/chunk-HH52IEFY.js +4 -0
  203. package/dist/standalone/chunk-HIJGQX6F.js +4 -0
  204. package/dist/standalone/chunk-HPYJUVCC.js +1 -0
  205. package/dist/standalone/chunk-I26MS5PJ.js +1 -0
  206. package/dist/standalone/chunk-ICRKYAYO.js +1 -0
  207. package/dist/standalone/chunk-IRSSZXC3.js +1 -0
  208. package/dist/standalone/chunk-ITT6MM23.js +1 -0
  209. package/dist/standalone/chunk-IWZ7GVQO.js +1 -0
  210. package/dist/standalone/chunk-JR4ROUBB.js +1 -0
  211. package/dist/standalone/chunk-K2EHRNYW.js +1 -0
  212. package/dist/standalone/chunk-K3UAOIR7.js +1 -0
  213. package/dist/standalone/chunk-KCFO2BVI.js +15 -0
  214. package/dist/standalone/chunk-KF7Y5S5O.js +1 -0
  215. package/dist/standalone/chunk-LHG2JVIM.js +2 -0
  216. package/dist/standalone/chunk-LXCVA5SP.js +1 -0
  217. package/dist/standalone/chunk-M3QKMHAP.js +15 -0
  218. package/dist/standalone/chunk-MVWZMWPD.js +1 -0
  219. package/dist/standalone/chunk-NCBLHBRW.js +1 -0
  220. package/dist/standalone/chunk-NCCORPSU.js +7 -0
  221. package/dist/standalone/chunk-NCPW7WHO.js +1 -0
  222. package/dist/standalone/chunk-NGVP66OH.js +1 -0
  223. package/dist/standalone/chunk-NQZALRU3.js +1 -0
  224. package/dist/standalone/chunk-NRP22GKC.js +1 -0
  225. package/dist/standalone/chunk-NXQW5E6W.js +1 -0
  226. package/dist/standalone/chunk-O2FW4VRL.js +1 -0
  227. package/dist/standalone/chunk-OI5HX3ZO.js +1 -0
  228. package/dist/standalone/chunk-OLIKYC3C.js +59 -0
  229. package/dist/standalone/chunk-OPM7ESDV.js +1 -0
  230. package/dist/standalone/chunk-OQ6I6OXT.js +2 -0
  231. package/dist/standalone/chunk-OYCUPD3Q.js +1 -0
  232. package/dist/standalone/chunk-PSMQQV6S.js +1 -0
  233. package/dist/standalone/chunk-Q6ED4KUL.js +1 -0
  234. package/dist/standalone/chunk-Q6IT6ZD7.js +1 -0
  235. package/dist/standalone/{chunk-ZHVTQ37P.js → chunk-QAQDMS6R.js} +1 -1
  236. package/dist/standalone/chunk-QJLHH3ET.js +1 -0
  237. package/dist/standalone/chunk-R3ADWOYR.js +1 -0
  238. package/dist/standalone/chunk-R6U22RSY.js +1 -0
  239. package/dist/standalone/chunk-RB3WPSY5.js +14 -0
  240. package/dist/standalone/chunk-RGMVGZV4.js +1 -0
  241. package/dist/standalone/chunk-RWVIV3U7.js +1 -0
  242. package/dist/standalone/chunk-S4Z7K55A.js +1 -0
  243. package/dist/standalone/chunk-SA2OGF3F.js +1 -0
  244. package/dist/standalone/chunk-SC6P4M3S.js +1 -0
  245. package/dist/standalone/chunk-SJQERRSZ.js +1 -0
  246. package/dist/standalone/chunk-SU6QNITV.js +1 -0
  247. package/dist/standalone/chunk-T6IV7OKH.js +1 -0
  248. package/dist/standalone/chunk-UC7MNI2F.js +1 -0
  249. package/dist/standalone/chunk-UIIKW4II.js +1 -0
  250. package/dist/standalone/chunk-UJQNKTYE.js +1 -0
  251. package/dist/standalone/chunk-UVL7N5IL.js +1 -0
  252. package/dist/standalone/chunk-UYEZR3BI.js +1 -0
  253. package/dist/standalone/chunk-VCFEO3RI.js +1 -0
  254. package/dist/standalone/chunk-VDC6JP4A.js +1 -0
  255. package/dist/standalone/chunk-VENSZ6LF.js +1 -0
  256. package/dist/standalone/chunk-VESGIGMQ.js +1 -0
  257. package/dist/standalone/chunk-VJ7RCBJ7.js +1 -0
  258. package/dist/standalone/chunk-VNMKNORK.js +1 -0
  259. package/dist/standalone/chunk-VQRCJJXS.js +1 -0
  260. package/dist/standalone/chunk-VVCXVAA7.js +8 -0
  261. package/dist/standalone/chunk-VXJJSPX3.js +1 -0
  262. package/dist/standalone/chunk-WJRYEML4.js +1 -0
  263. package/dist/standalone/chunk-WUI2PUY6.js +1 -0
  264. package/dist/standalone/chunk-WVWCUB4S.js +1 -0
  265. package/dist/standalone/chunk-WVYIBXUH.js +1 -0
  266. package/dist/standalone/chunk-X4MAMXRE.js +1 -0
  267. package/dist/standalone/chunk-XBQ66PGW.js +1 -0
  268. package/dist/standalone/chunk-XGCIDUJF.js +1 -0
  269. package/dist/standalone/chunk-XKISL2CG.js +1 -0
  270. package/dist/standalone/chunk-Y3AYVFTK.js +1 -0
  271. package/dist/standalone/chunk-YZ72ZAGX.js +1 -0
  272. package/dist/standalone/chunk-ZJQIGWLG.js +1 -0
  273. package/dist/standalone/chunk-ZKJS6EBE.js +1 -0
  274. package/dist/standalone/chunk-ZKV2XC5B.js +1 -0
  275. package/dist/standalone/chunk-ZPNTFCVI.js +1 -0
  276. package/dist/standalone/studio.js +9 -214
  277. package/dist/styles.css +2 -2
  278. package/package.json +26 -22
  279. package/dist/index.js +0 -41
  280. package/dist/mount.js +0 -27
  281. package/dist/packem_chunks/ApiTab.js +0 -251
  282. package/dist/packem_chunks/AuditPanel.js +0 -200
  283. package/dist/packem_chunks/ExportImportPanel.js +0 -198
  284. package/dist/packem_chunks/FileBrowser.js +0 -2932
  285. package/dist/packem_chunks/FunctionRunner.js +0 -343
  286. package/dist/packem_chunks/FunctionStatsPanel.js +0 -377
  287. package/dist/packem_chunks/HealthPanel.js +0 -648
  288. package/dist/packem_chunks/InsightsPanel.js +0 -462
  289. package/dist/packem_chunks/LogsPanel.js +0 -827
  290. package/dist/packem_chunks/MailPanel.js +0 -441
  291. package/dist/packem_chunks/MetricsPanel.js +0 -1344
  292. package/dist/packem_chunks/MigrationsPanel.js +0 -239
  293. package/dist/packem_chunks/PitrPanel.js +0 -252
  294. package/dist/packem_chunks/SchemaViewer.js +0 -2513
  295. package/dist/packem_chunks/SecurityAdvisorPanel.js +0 -95
  296. package/dist/packem_chunks/SettingsPanel.js +0 -391
  297. package/dist/packem_chunks/SqlEditorPanel.js +0 -2323
  298. package/dist/packem_chunks/TableEditor.js +0 -313
  299. package/dist/packem_chunks/analytics-panel.js +0 -261
  300. package/dist/packem_chunks/auth-config-panel.js +0 -179
  301. package/dist/packem_chunks/auth-sessions-panel.js +0 -175
  302. package/dist/packem_chunks/containers-panel.js +0 -247
  303. package/dist/packem_chunks/dashboards-panel.js +0 -780
  304. package/dist/packem_chunks/fanout-panel.js +0 -482
  305. package/dist/packem_chunks/flags-panel.js +0 -176
  306. package/dist/packem_chunks/kv-browser.js +0 -1896
  307. package/dist/packem_chunks/log-drains-panel.js +0 -273
  308. package/dist/packem_chunks/organizations-panel.js +0 -670
  309. package/dist/packem_chunks/payments-panel.js +0 -186
  310. package/dist/packem_chunks/permissions-panel.js +0 -805
  311. package/dist/packem_chunks/queues-panel.js +0 -148
  312. package/dist/packem_chunks/rls-panel.js +0 -315
  313. package/dist/packem_chunks/schedule-panel.js +0 -831
  314. package/dist/packem_chunks/sparkline.js +0 -79
  315. package/dist/packem_chunks/storage-rules-panel.js +0 -140
  316. package/dist/packem_chunks/subscriptions-panel.js +0 -238
  317. package/dist/packem_chunks/users-panel.js +0 -1265
  318. package/dist/packem_chunks/vector-browser.js +0 -281
  319. package/dist/packem_chunks/workflows-panel.js +0 -562
  320. package/dist/packem_shared/ADMIN_FUNCTIONS-CdaxLGkE.js +0 -48
  321. package/dist/packem_shared/ApiDocsPanel-Cu6mD4u7.js +0 -842
  322. package/dist/packem_shared/ApiReferencePanel-Co_wpRF2.js +0 -230
  323. package/dist/packem_shared/CommandPalette-BUPpbpMc.js +0 -373
  324. package/dist/packem_shared/ConfirmButton-C2eVi2Qv.js +0 -59
  325. package/dist/packem_shared/ConnectionBadge-B2DDM2Tn.js +0 -111
  326. package/dist/packem_shared/DEFAULT_AUTO_REFRESH_MS-Vxwaxx51.js +0 -50
  327. package/dist/packem_shared/DEFAULT_INSIGHT_THRESHOLDS-DjF0h-gA.js +0 -89
  328. package/dist/packem_shared/DEFAULT_LOCALE-CiX4W7Kr.js +0 -27
  329. package/dist/packem_shared/DataBrowser-DSNK1tPg.js +0 -4493
  330. package/dist/packem_shared/DataFilters-FNquMaiu.js +0 -249
  331. package/dist/packem_shared/ErrorBoundary-BzAApI7J.js +0 -66
  332. package/dist/packem_shared/GlobalDataBrowser-ErfvIs1S.js +0 -289
  333. package/dist/packem_shared/HomePanel-DQk3P8xX.js +0 -14
  334. package/dist/packem_shared/OpenRpcReferencePanel-DLWzrIx9.js +0 -192
  335. package/dist/packem_shared/STUDIO_ROOT_CLASS-D12gX2dV.js +0 -3
  336. package/dist/packem_shared/ScheduledJobs-ClaNpZsg.js +0 -262
  337. package/dist/packem_shared/ShardInput-gx_DZXXn.js +0 -107
  338. package/dist/packem_shared/Studio-Biu37c3O.js +0 -16
  339. package/dist/packem_shared/StudioApp-D6a2ZmXS.js +0 -657
  340. package/dist/packem_shared/StudioI18nProvider-B-tDCZIi.js +0 -48
  341. package/dist/packem_shared/advisor-view-D3-U4kRR.js +0 -159
  342. package/dist/packem_shared/aggregateMetrics-D4nUHEKU.js +0 -108
  343. package/dist/packem_shared/alert-CdAET2K_.js +0 -68
  344. package/dist/packem_shared/app.d-CNLRTrWw.d.ts +0 -300
  345. package/dist/packem_shared/badge-B2PKA1-5.js +0 -49
  346. package/dist/packem_shared/bar-chart-DSwcWIRy.js +0 -3246
  347. package/dist/packem_shared/browser-storage-tLOxkIHd.js +0 -185
  348. package/dist/packem_shared/button-BhsN2uZH.js +0 -49
  349. package/dist/packem_shared/card-DURq3ElK.js +0 -175
  350. package/dist/packem_shared/cf-links-BZfRdxSE.js +0 -8
  351. package/dist/packem_shared/checkbox-UNkzAxl-.js +0 -63
  352. package/dist/packem_shared/data-grid-Jz8FqQ2C.js +0 -183
  353. package/dist/packem_shared/data-view-params-Cd6yRVbv.js +0 -96
  354. package/dist/packem_shared/dropdown-menu-WY4B_eJO.js +0 -280
  355. package/dist/packem_shared/empty-state-DY_oe0k6.js +0 -98
  356. package/dist/packem_shared/error-alert-BBT6D22d.js +0 -114
  357. package/dist/packem_shared/grid-features-CUr8Z1_O.js +0 -745
  358. package/dist/packem_shared/home-panel-Bo-Mgrkn.js +0 -1639
  359. package/dist/packem_shared/input-XH4r1Pt1.js +0 -53
  360. package/dist/packem_shared/internal-DTsYVn-g.js +0 -97
  361. package/dist/packem_shared/label-D8ykjn5J.js +0 -46
  362. package/dist/packem_shared/live-status-FZ0psC1z.js +0 -44
  363. package/dist/packem_shared/modal-shell-hyaJvIJ6.js +0 -100
  364. package/dist/packem_shared/reference-view-CSKyUyPl.js +0 -2141
  365. package/dist/packem_shared/select-UkNYCT3s.js +0 -273
  366. package/dist/packem_shared/shard-history-DyebH1R5.js +0 -38
  367. package/dist/packem_shared/skeleton-CGhL0p20.js +0 -45
  368. package/dist/packem_shared/sparkline-BnA1kC9X.js +0 -93
  369. package/dist/packem_shared/storage-tier-CL98eOvn.js +0 -85
  370. package/dist/packem_shared/studio-C4sgu0F7.js +0 -4015
  371. package/dist/packem_shared/table-DsCa9Qp9.js +0 -246
  372. package/dist/packem_shared/table-list-sidebar-B5psdSV1.js +0 -832
  373. package/dist/packem_shared/textarea-D3gaCU_-.js +0 -46
  374. package/dist/packem_shared/use-admin-query-BHPKmPuj.js +0 -106
  375. package/dist/packem_shared/use-auth-capabilities-C-VH0oJJ.js +0 -32
  376. package/dist/packem_shared/useDebounced-Dxncpg6z.js +0 -32
  377. package/dist/packem_shared/utils-B05Dmz_H.js +0 -8
  378. package/dist/packem_shared/virtual-rect-CVMUskSm.js +0 -10
  379. package/dist/standalone/chunk-25VHPD2I.js +0 -1
  380. package/dist/standalone/chunk-2GGMGPEP.js +0 -1
  381. package/dist/standalone/chunk-2K47A3P6.js +0 -1
  382. package/dist/standalone/chunk-2NGUNNGW.js +0 -1
  383. package/dist/standalone/chunk-3CJW6NWG.js +0 -4
  384. package/dist/standalone/chunk-3OA7PECS.js +0 -6
  385. package/dist/standalone/chunk-4H2OJBXO.js +0 -1
  386. package/dist/standalone/chunk-4MLAVZP4.js +0 -1
  387. package/dist/standalone/chunk-4QHKBC77.js +0 -1
  388. package/dist/standalone/chunk-55YA7ZZI.js +0 -76
  389. package/dist/standalone/chunk-5OH3VPZF.js +0 -1
  390. package/dist/standalone/chunk-5OIBXYZM.js +0 -1
  391. package/dist/standalone/chunk-5PQMXK24.js +0 -1
  392. package/dist/standalone/chunk-6GFEVKJP.js +0 -1
  393. package/dist/standalone/chunk-764T6X6X.js +0 -1
  394. package/dist/standalone/chunk-7M3F6U4L.js +0 -1
  395. package/dist/standalone/chunk-7TJJXVSE.js +0 -1
  396. package/dist/standalone/chunk-7VF3IAAW.js +0 -2
  397. package/dist/standalone/chunk-AHILM3ZP.js +0 -1
  398. package/dist/standalone/chunk-AJIUI7DD.js +0 -1
  399. package/dist/standalone/chunk-AQGOX5DK.js +0 -1
  400. package/dist/standalone/chunk-BACPICH6.js +0 -1
  401. package/dist/standalone/chunk-BET2625I.js +0 -1
  402. package/dist/standalone/chunk-BQUQS7QN.js +0 -1
  403. package/dist/standalone/chunk-CKSHCYGC.js +0 -2
  404. package/dist/standalone/chunk-DCECRP45.js +0 -1
  405. package/dist/standalone/chunk-DFP2DADO.js +0 -1
  406. package/dist/standalone/chunk-DORBUITF.js +0 -1
  407. package/dist/standalone/chunk-DVKPRFIJ.js +0 -1
  408. package/dist/standalone/chunk-DWDILV2E.js +0 -1
  409. package/dist/standalone/chunk-E6WUCLSI.js +0 -1
  410. package/dist/standalone/chunk-E7WLF6IU.js +0 -1
  411. package/dist/standalone/chunk-EVPLBWUT.js +0 -8
  412. package/dist/standalone/chunk-FCSPAJW4.js +0 -1
  413. package/dist/standalone/chunk-FKO3HO6I.js +0 -4
  414. package/dist/standalone/chunk-G2ICR3DL.js +0 -1
  415. package/dist/standalone/chunk-GJ6PGSES.js +0 -13
  416. package/dist/standalone/chunk-GMSGZDDH.js +0 -13
  417. package/dist/standalone/chunk-GTM65MVX.js +0 -1
  418. package/dist/standalone/chunk-GVRM4U6W.js +0 -2
  419. package/dist/standalone/chunk-GZDWDDXN.js +0 -1
  420. package/dist/standalone/chunk-HV7G6DFP.js +0 -5
  421. package/dist/standalone/chunk-ISJAJWYI.js +0 -1
  422. package/dist/standalone/chunk-J6J54MBP.js +0 -1
  423. package/dist/standalone/chunk-JIDZFLTB.js +0 -4
  424. package/dist/standalone/chunk-JSEXCW5Q.js +0 -1
  425. package/dist/standalone/chunk-K3GNLVYK.js +0 -1
  426. package/dist/standalone/chunk-K4ZDRTQM.js +0 -1
  427. package/dist/standalone/chunk-KEGAWN6Y.js +0 -1
  428. package/dist/standalone/chunk-KTK3V4DC.js +0 -1
  429. package/dist/standalone/chunk-KZ6INM5M.js +0 -1
  430. package/dist/standalone/chunk-LI43EKM6.js +0 -1
  431. package/dist/standalone/chunk-MFPTVCJ6.js +0 -1
  432. package/dist/standalone/chunk-MPYFGAOW.js +0 -1
  433. package/dist/standalone/chunk-O3NAGRTR.js +0 -1
  434. package/dist/standalone/chunk-O77VNUFD.js +0 -1
  435. package/dist/standalone/chunk-PA3LN4XJ.js +0 -1
  436. package/dist/standalone/chunk-PN5NCZDX.js +0 -1
  437. package/dist/standalone/chunk-PVZI3CXP.js +0 -19
  438. package/dist/standalone/chunk-PZ7HD5T2.js +0 -1
  439. package/dist/standalone/chunk-QAFAJBAW.js +0 -1
  440. package/dist/standalone/chunk-QBAT52GB.js +0 -1
  441. package/dist/standalone/chunk-QHIIRFG7.js +0 -1
  442. package/dist/standalone/chunk-RRCPZMC2.js +0 -22
  443. package/dist/standalone/chunk-RSEEHNFI.js +0 -1
  444. package/dist/standalone/chunk-SEU5V7I6.js +0 -1
  445. package/dist/standalone/chunk-SGDQIWAR.js +0 -4
  446. package/dist/standalone/chunk-SVR644RF.js +0 -1
  447. package/dist/standalone/chunk-SYEIXTEU.js +0 -1
  448. package/dist/standalone/chunk-T5HRXUSY.js +0 -1
  449. package/dist/standalone/chunk-TAD43CG5.js +0 -1
  450. package/dist/standalone/chunk-TBMYIZIO.js +0 -1
  451. package/dist/standalone/chunk-TDL7NEWA.js +0 -1
  452. package/dist/standalone/chunk-TM7CMA7X.js +0 -1
  453. package/dist/standalone/chunk-TQ36RWOP.js +0 -1
  454. package/dist/standalone/chunk-TY7L2V4E.js +0 -1
  455. package/dist/standalone/chunk-U4OAQPBT.js +0 -1
  456. package/dist/standalone/chunk-UDSVXA42.js +0 -1
  457. package/dist/standalone/chunk-UII66UVF.js +0 -1
  458. package/dist/standalone/chunk-UK64ZSUW.js +0 -1
  459. package/dist/standalone/chunk-VEZO7G5Q.js +0 -3
  460. package/dist/standalone/chunk-VLXV72QE.js +0 -1
  461. package/dist/standalone/chunk-VSHUSN6T.js +0 -1
  462. package/dist/standalone/chunk-VYMCCC6O.js +0 -1
  463. package/dist/standalone/chunk-WXPWVBIY.js +0 -1
  464. package/dist/standalone/chunk-X72PYOEW.js +0 -1
  465. package/dist/standalone/chunk-X7MMBSNW.js +0 -1
  466. package/dist/standalone/chunk-XIGIWZLO.js +0 -4
  467. package/dist/standalone/chunk-XNJNSCLM.js +0 -1
  468. package/dist/standalone/chunk-XUGSA2NG.js +0 -1
  469. package/dist/standalone/chunk-Y2ZPNDL7.js +0 -4
  470. package/dist/standalone/chunk-YM6BBZDN.js +0 -1
  471. package/dist/standalone/chunk-ZPP2KOR4.js +0 -1
  472. package/dist/standalone/chunk-ZPUO7FNI.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as r}from"react/compiler-runtime";import{c as i}from"./utils-bhneXptQ.mjs";import{jsx as n}from"react/jsx-runtime";function m(s){const e=r(8);let t,a;e[0]!==s?({className:t,...a}=s,e[0]=s,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let l;e[3]!==t?(l=i("flex items-center gap-2 text-xs leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=l):l=e[4];let o;return e[5]!==a||e[6]!==l?(o=n("label",{"data-slot":"label",className:l,...a}),e[5]=a,e[6]=l,e[7]=o):o=e[7],o}export{m as L};
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useT as p}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{u as v}from"./operation-console-provider-DoloEvon.mjs";import{jsx as d,jsxs as x}from"react/jsx-runtime";const E=f=>{const e=m(14),{message:n,prefix:i}=f,o=p(),t=v();let l;e[0]!==t?(l=()=>{t?.openConsole({errorsOnly:!0})},e[0]=t,e[1]=l):l=e[1];const c=l;if(n===void 0)return null;const u=`${i}-live-error`;let r;e[2]!==n||e[3]!==o?(r=o("Live unavailable: {liveError}",{liveError:n}),e[2]=n,e[3]=o,e[4]=r):r=e[4];let s;e[5]!==t||e[6]!==i||e[7]!==c||e[8]!==o?(s=t===void 0?null:d("button",{className:"underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":`${i}-live-error-console`,onClick:c,type:"button",children:o("Show in console")}),e[5]=t,e[6]=i,e[7]=c,e[8]=o,e[9]=s):s=e[9];let a;return e[10]!==u||e[11]!==r||e[12]!==s?(a=x("span",{className:"flex items-center gap-1.5 text-xs text-destructive","data-testid":u,role:"status",children:[r,s]}),e[10]=u,e[11]=r,e[12]=s,e[13]=a):a=e[13],a};export{E as L};
@@ -0,0 +1 @@
1
+ const i=r=>{if(typeof r=="string")return r;if(r instanceof Error)return String(r);try{return JSON.stringify(r)??String(r)}catch{return String(r)}},o=r=>typeof r!="object"||r===null||Array.isArray(r)?"":Object.entries(r).map(([t,n])=>`${t}=${i(n)}`).join(" ");export{o as f};
@@ -0,0 +1 @@
1
+ import{c as h}from"react/compiler-runtime";import{f as v}from"./log-fields-BolUoZ9g.mjs";import{B as x}from"./badge-r_5B4LHP.mjs";import{h as L}from"./internal-BXEjuLPN.mjs";import{jsx as o,jsxs as g,Fragment as N}from"react/jsx-runtime";const w={debug:"secondary",error:"destructive",fatal:"destructive",info:"outline",log:"outline",trace:"outline",warn:"secondary"},B=p=>{const e=h(21),{entry:t}=p;let m;e[0]!==t.fields?(m=v(t.fields),e[0]=t.fields,e[1]=m):m=e[1];const c=m;let l;e[2]!==t.timestamp?(l=L(t.timestamp),e[2]=t.timestamp,e[3]=l):l=e[3];let s;e[4]!==l?(s=o("span",{className:"w-44 shrink-0 tabular-nums text-muted-foreground",role:"gridcell",children:l}),e[4]=l,e[5]=s):s=e[5];const f=w[t.level];let r;e[6]!==t.level||e[7]!==f?(r=o("span",{className:"w-20 shrink-0",role:"gridcell",children:o(x,{variant:f,children:t.level})}),e[6]=t.level,e[7]=f,e[8]=r):r=e[8];const u=t.functionPath??"—";let a;e[9]!==u?(a=o("span",{className:"w-48 shrink-0 truncate text-muted-foreground",role:"gridcell",children:u}),e[9]=u,e[10]=a):a=e[10];let i;e[11]!==c?(i=c===""?null:o("span",{className:"ml-2 text-muted-foreground","data-testid":"lg-fields",children:c}),e[11]=c,e[12]=i):i=e[12];let n;e[13]!==t.message||e[14]!==i?(n=g("span",{className:"flex-1 truncate",role:"gridcell",children:[t.message,i]}),e[13]=t.message,e[14]=i,e[15]=n):n=e[15];let d;return e[16]!==s||e[17]!==r||e[18]!==a||e[19]!==n?(d=g(N,{children:[s,r,a,n]}),e[16]=s,e[17]=r,e[18]=a,e[19]=n,e[20]=d):d=e[20],d};export{B as L,w as a};
@@ -0,0 +1 @@
1
+ const e=t=>{const r=Math.floor(t/1e3),o=Math.floor(r/3600),n=Math.floor(r%3600/60),i=r%60;return o>0?`${o.toString()}h ${n.toString()}m`:n>0?`${n.toString()}m ${i.toString()}s`:`${i.toString()}s`},a=(t,r)=>{const o=t+r;return o===0?"—":`${(t/o*100).toFixed(1)}%`},s=t=>t<=0?"—":t<1?`${(t*1e3).toFixed(0)}μs`:t<1e3?`${t.toFixed(1)}ms`:`${(t/1e3).toFixed(2)}s`,c=(t,r)=>new Intl.NumberFormat(r,t===0||Math.abs(t)>=1?{currency:"USD",maximumFractionDigits:2,minimumFractionDigits:2,style:"currency"}:{currency:"USD",maximumSignificantDigits:3,style:"currency"}).format(t),m=(t,r)=>new Intl.NumberFormat(r,{maximumFractionDigits:0}).format(t);export{m as a,s as b,e as c,c as f,a as h};
@@ -0,0 +1 @@
1
+ import{c as v}from"react/compiler-runtime";import{c as k}from"./utils-bhneXptQ.mjs";import{jsx as u}from"react/jsx-runtime";const y={dialog:"fixed inset-0 z-[1000] flex justify-center bg-black/20 pt-[10vh]",drawer:"fixed inset-0 z-[1000] flex justify-end bg-black/20"},A={dialog:"flex h-fit w-[min(28rem,92vw)] flex-col gap-3 rounded-lg border border-border bg-background p-4 shadow-xl",drawer:"flex h-full w-[min(34rem,100vw)] flex-col gap-4 overflow-auto border-l border-border bg-background p-4 shadow-xl"},_=h=>{const e=v(18),{className:n,children:d,label:c,onClose:l,panelTestId:f,testId:b,variant:w}=h;let r;e[0]!==l?(r=i=>{i.target===i.currentTarget&&l()},e[0]=l,e[1]=r):r=e[1];const g=r;let a;e[2]!==l?(a=i=>{i.key==="Escape"&&l()},e[2]=l,e[3]=a):a=e[3];const m=a,p=y[w],x=A[w];let t;e[4]!==n||e[5]!==x?(t=k(x,n),e[4]=n,e[5]=x,e[6]=t):t=e[6];let o;e[7]!==d||e[8]!==c||e[9]!==f||e[10]!==t?(o=u("div",{"aria-label":c,className:t,"data-testid":f,role:"dialog",children:d}),e[7]=d,e[8]=c,e[9]=f,e[10]=t,e[11]=o):o=e[11];let s;return e[12]!==g||e[13]!==m||e[14]!==p||e[15]!==o||e[16]!==b?(s=u("div",{className:p,"data-testid":b,onClick:g,onKeyDown:m,role:"presentation",children:o}),e[12]=g,e[13]=m,e[14]=p,e[15]=o,e[16]=b,e[17]=s):s=e[17],s};export{_ as M};
@@ -0,0 +1 @@
1
+ import{c as h}from"react/compiler-runtime";import{use as q,createContext as w,useState as p}from"react";import{jsx as C}from"react/jsx-runtime";const m=w(void 0),y=t=>{const e=h(10),{children:f}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={focusSeq:void 0,open:!1,shown:"all"},e[0]=n):n=e[0];const[o,s]=p(n);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>({close:()=>{s(_)},openConsole:a=>{s({focusSeq:a?.seq,open:!0,shown:a?.errorsOnly===!0?"errors":"all"})},setShown:a=>{s(S=>({...S,shown:a}))},toggle:()=>{s(d)}}),e[1]=r):r=e[1];const[i]=p(r);let l;e[2]!==i||e[3]!==o.focusSeq||e[4]!==o.open||e[5]!==o.shown?(l={...i,focusSeq:o.focusSeq,open:o.open,shown:o.shown},e[2]=i,e[3]=o.focusSeq,e[4]=o.open,e[5]=o.shown,e[6]=l):l=e[6];const u=l;let c;return e[7]!==f||e[8]!==u?(c=C(m,{value:u,children:f}),e[7]=f,e[8]=u,e[9]=c):c=e[9],c},b=()=>q(m);function _(t){return{...t,open:!1}}function d(t){return{focusSeq:void 0,open:!t.open,shown:"all"}}export{y as O,b as u};
@@ -0,0 +1 @@
1
+ import{o as u}from"./use-admin-query-I1uILsUP.mjs";const b="__lunora_admin__:",d=new Set(["action","mutation","query"]),r=Symbol("lunora.operationSeq"),g=t=>{if(typeof t!="object"||t===null)return;const n=t[r];return typeof n=="number"?n:void 0},h=(t,n)=>{if(!(typeof t!="object"||t===null||!Object.isExtensible(t)))try{Object.defineProperty(t,r,{configurable:!0,enumerable:!1,value:n,writable:!0})}catch{}},p=t=>{if(typeof t!="object"||t===null)return;const n=t.__lunoraRef;return typeof n=="string"&&n.startsWith(b)?n:void 0},O=t=>{if(typeof t!="object"||t===null)return"";const{shardKey:n}=t;return typeof n=="string"?n:""},E=t=>new Proxy(t,{get(n,c,a){const i=Reflect.get(n,c,a);if(typeof i!="function"||typeof c!="string"||!d.has(c))return typeof i=="function"?i.bind(n):i;const f=i;return async(...e)=>{const l=p(e[0]);if(l===void 0)return f.apply(n,e);const y=typeof e[1]=="object"&&e[1]!==null?e[1]:{},s=u.start(l,y,O(e[2]));try{const o=await f.apply(n,e);return u.settle(s,{result:o}),o}catch(o){throw u.settle(s,{error:o instanceof Error?o.message:String(o)}),h(o,s),o}}}});export{g as o,E as w};
@@ -0,0 +1,13 @@
1
+ import{c as P}from"react/compiler-runtime";import{SentIcon as ie,Copy01Icon as ae,Search01Icon as le}from"@hugeicons/core-free-icons";import{HugeiconsIcon as F}from"@hugeicons/react";import{useState as B,createContext as de,use as ce}from"react";import{I as ue}from"./input-CXhxesPC.mjs";import{useT as J}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{B as W}from"./button-q0UYSmrn.mjs";import{g as X,f as fe,b as H,m as me,c as pe,d as he,k as ge}from"./internal-BXEjuLPN.mjs";import{jsx as i,jsxs as N,Fragment as xe}from"react/jsx-runtime";import{B as ye}from"./badge-r_5B4LHP.mjs";import{ShardInput as be}from"./ShardInput-C6mjgAh4.mjs";import{L as U}from"./label-DKFzyHq6.mjs";import{T as ve}from"./textarea--40GKAyz.mjs";import{LunoraError as Ne}from"@lunora/errors";import{useLunora as Se}from"@lunora/react";import{c as Y}from"./utils-bhneXptQ.mjs";const we=t=>typeof t=="number"?"number":typeof t=="boolean"?"boolean":"string",Q=t=>{if(t.enum!==void 0&&t.enum.length>0)return t.enum;if(t.anyOf!==void 0&&t.anyOf.length>0&&t.anyOf.every(e=>e.const!==void 0))return t.anyOf.map(e=>e.const)},z=t=>t===void 0?"any":t.const!==void 0?JSON.stringify(t.const):t.enum!==void 0&&t.enum.length>0?t.enum.map(e=>JSON.stringify(e)).join(" | "):t.anyOf!==void 0&&t.anyOf.length>0?t.anyOf.map(e=>z(e)).join(" | "):t.type==="array"?`array<${z(t.items)}>`:t.type??"any",ke=t=>{const e=Q(t);return e!==void 0?t.type??we(e[0]):z(t)},Oe=t=>{const e=Q(t);return e===void 0?void 0:e.map(r=>JSON.stringify(r)).join(" | ")},$e=t=>{const e=[];t.minimum!==void 0?e.push(`${String(t.minimum)} ≤`):t.exclusiveMinimum!==void 0&&e.push(`${String(t.exclusiveMinimum)} <`);const r=e.length>0;e.push("value"),t.maximum!==void 0?e.push(`≤ ${String(t.maximum)}`):t.exclusiveMaximum!==void 0&&e.push(`< ${String(t.exclusiveMaximum)}`);const s=e.length>(r?2:1);return r||s?e.join(" "):void 0},Te=t=>{if(t.type==="object"&&t.properties!==void 0)return t;if(t.type==="array"&&t.items?.type==="object"&&t.items.properties!==void 0)return t.items},D=t=>{if(t===void 0)return null;if(t.const!==void 0)return t.const;if(t.enum!==void 0&&t.enum.length>0)return t.enum[0];if(t.anyOf!==void 0&&t.anyOf.length>0)return D(t.anyOf[0]);switch(t.type){case"array":return[];case"boolean":return!1;case"number":return 0;case"object":{const e={};for(const[r,s]of Object.entries(t.properties??{}))e[r]=D(s);return e}case"string":return"";default:return null}},K=t=>{const e=P(7),{label:r,value:s}=t;let n;e[0]!==r?(n=i("span",{className:"text-muted-foreground",children:r}),e[0]=r,e[1]=n):n=e[1];let o;e[2]!==s?(o=i("span",{className:"text-foreground",children:s}),e[2]=s,e[3]=o):o=e[3];let l;return e[4]!==n||e[5]!==o?(l=N("span",{className:"inline-flex items-center gap-1 rounded border border-border px-1.5 py-0.5 font-mono text-[10px]",children:[n,o]}),e[4]=n,e[5]=o,e[6]=l):l=e[6],l},Ee=t=>{const e=P(40),{name:r,required:s,schema:n}=t,o=J();let l;e[0]!==n?(l=$e(n),e[0]=n,e[1]=l):l=e[1];const a=l;let y;e[2]!==n?(y=Oe(n),e[2]=n,e[3]=y):y=e[3];const d=y,c=n["x-lunora-table"],u=n.format!==void 0||a!==void 0||d!==void 0||c!==void 0;let b;e[4]!==n?(b=Te(n),e[4]=n,e[5]=b):b=e[5];const x=b,f=s?"*":"?";let m;e[6]!==f?(m=i("span",{className:"text-muted-foreground",children:f}),e[6]=f,e[7]=m):m=e[7];let v;e[8]!==r||e[9]!==m?(v=N("span",{className:"font-mono text-foreground",children:[r,m]}),e[8]=r,e[9]=m,e[10]=v):v=e[10];let w;e[11]!==n?(w=ke(n),e[11]=n,e[12]=w):w=e[12];let p;e[13]!==w?(p=i("span",{className:"font-mono text-muted-foreground",children:w}),e[13]=w,e[14]=p):p=e[14];let h;e[15]!==v||e[16]!==p?(h=N("div",{className:"flex items-baseline gap-2",children:[v,p]}),e[15]=v,e[16]=p,e[17]=h):h=e[17];let g;e[18]!==n.description?(g=n.description!==void 0&&i("p",{className:"max-w-prose text-muted-foreground",children:n.description}),e[18]=n.description,e[19]=g):g=e[19];let S;e[20]!==u||e[21]!==a||e[22]!==c||e[23]!==n.format||e[24]!==o||e[25]!==d?(S=u&&N("div",{className:"flex flex-wrap gap-1",children:[n.format!==void 0&&i(K,{label:o("Format"),value:n.format}),a!==void 0&&i(K,{label:o("Range"),value:a}),d!==void 0&&i(K,{label:o("Value in"),value:d}),c!==void 0&&i(K,{label:o("relation"),value:c})]}),e[20]=u,e[21]=a,e[22]=c,e[23]=n.format,e[24]=o,e[25]=d,e[26]=S):S=e[26];let O;e[27]!==g||e[28]!==S||e[29]!==h?(O=N("div",{className:"flex flex-col gap-1 py-2",children:[h,g,S]}),e[27]=g,e[28]=S,e[29]=h,e[30]=O):O=e[30];const k=O;if(x===void 0){let $;return e[31]!==k?($=i("div",{className:"border-b border-border/50 last:border-b-0",children:k}),e[31]=k,e[32]=$):$=e[32],$}let T;e[33]!==k?(T=i("summary",{className:"cursor-pointer marker:text-muted-foreground",children:k}),e[33]=k,e[34]=T):T=e[34];let R;e[35]!==x?(R=i("div",{className:"mb-2 ml-2 border-l border-border pl-3",children:i(Z,{schema:x})}),e[35]=x,e[36]=R):R=e[36];let E;return e[37]!==T||e[38]!==R?(E=N("details",{className:"border-b border-border/50 last:border-b-0",children:[T,R]}),e[37]=T,e[38]=R,e[39]=E):E=e[39],E},Z=t=>{const e=P(7),{schema:r}=t;let s;e[0]!==r.required?(s=new Set(r.required),e[0]=r.required,e[1]=s):s=e[1];const n=s;let o;e[2]!==r.properties?(o=Object.entries(r.properties??{}),e[2]=r.properties,e[3]=o):o=e[3];const l=o;let a;return e[4]!==n||e[5]!==l?(a=i("div",{className:"flex flex-col",children:l.map(y=>{const[d,c]=y;return i(Ee,{name:d,required:n.has(d),schema:c},d)})}),e[4]=n,e[5]=l,e[6]=a):a=e[6],a},V=t=>{const e=P(10),{schema:r,testId:s}=t;if(r?.type!=="object"||Object.keys(r.properties??{}).length===0){let l;e[0]!==r?(l=z(r),e[0]=r,e[1]=l):l=e[1];let a;return e[2]!==l||e[3]!==s?(a=i("p",{className:"font-mono text-xs text-muted-foreground","data-testid":s,children:l}),e[2]=l,e[3]=s,e[4]=a):a=e[4],a}let n;e[5]!==r?(n=i(Z,{schema:r}),e[5]=r,e[6]=n):n=e[6];let o;return e[7]!==n||e[8]!==s?(o=i("div",{className:"text-xs","data-testid":s,children:n}),e[7]=n,e[8]=s,e[9]=o):o=e[9],o},Ce=["curl","javascript","lunora"],Re={lunora:"Lunora",curl:"cURL",javascript:"JavaScript"},Ae=t=>`api.${t.replaceAll(/[/:]/g,".")}`,je=t=>{const e=D(t.argsSchema)??{};return t.functionPath===void 0?e:{args:e,functionPath:t.functionPath}},Ie=(t,e,r)=>{const s=`${r}${e.httpPath}`,n=JSON.stringify(je(e),void 0,2),o=JSON.stringify(D(e.argsSchema)??{},void 0,2);switch(t){case"curl":{const l=e.method!=="GET"&&e.method!=="HEAD",a=[`curl -X ${e.method} ${JSON.stringify(s)}`];return l&&a.push(' -H "Content-Type: application/json"',` -d '${n}'`),a.join(` \\
2
+ `)}case"lunora":return e.functionPath===void 0?`await fetch(${JSON.stringify(e.httpPath)}, { method: ${JSON.stringify(e.method)} });`:`import { useLunora } from "@lunora/react";
3
+ import { api } from "./_generated/api";
4
+
5
+ const client = useLunora();
6
+ await client.${e.kind??"query"}(${Ae(e.functionPath)}, ${o});`;default:{const a=e.method!=="GET"&&e.method!=="HEAD"?`{
7
+ method: ${JSON.stringify(e.method)},
8
+ headers: { "Content-Type": "application/json" },
9
+ body: JSON.stringify(${n}),
10
+ }`:`{ method: ${JSON.stringify(e.method)} }`;return`const response = await fetch(${JSON.stringify(s)}, ${a});
11
+ const data = await response.json();`}}},Pe=t=>{const e=P(24),{operation:r,server:s}=t,n=J(),[o,l]=B("curl");let a;e[0]!==r||e[1]!==o||e[2]!==s?(a=Ie(o,r,s),e[0]=r,e[1]=o,e[2]=s,e[3]=a):a=e[3];const y=a;let d;e[4]!==y?(d=()=>{X(y)},e[4]=y,e[5]=d):d=e[5];const c=d;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=g=>{l(g.currentTarget.dataset.sample)},e[6]=u):u=e[6];const b=u;let x;e[7]!==o?(x=Ce.map(g=>i("button",{"aria-selected":o===g,className:"rounded px-2 py-0.5 text-xs text-muted-foreground transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium aria-selected:text-foreground","data-sample":g,"data-testid":`api-sample-${g}`,onClick:b,role:"tab",type:"button",children:Re[g]},g)),e[7]=o,e[8]=x):x=e[8];let f;e[9]!==x?(f=i("div",{className:"flex gap-1",role:"tablist",children:x}),e[9]=x,e[10]=f):f=e[10];let m;e[11]!==n?(m=n("Copy"),e[11]=n,e[12]=m):m=e[12];let v;e[13]!==c||e[14]!==m?(v=i(W,{"data-testid":"api-sample-copy",onClick:c,size:"xs",type:"button",variant:"ghost",children:m}),e[13]=c,e[14]=m,e[15]=v):v=e[15];let w;e[16]!==f||e[17]!==v?(w=N("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[f,v]}),e[16]=f,e[17]=v,e[18]=w):w=e[18];let p;e[19]!==y?(p=i("pre",{className:"overflow-auto px-3 pb-3 font-mono text-xs","data-testid":"api-sample-source",children:y}),e[19]=y,e[20]=p):p=e[20];let h;return e[21]!==w||e[22]!==p?(h=N("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card","data-testid":"api-code-samples",children:[w,p]}),e[21]=w,e[22]=p,e[23]=h):h=e[23],h},Le={blue:"text-info",emerald:"text-success",neutral:"text-muted-foreground",orange:"text-warning",red:"text-destructive",violet:"text-royal-amethyst"},_e=t=>{switch(t.toUpperCase()){case"DELETE":return"red";case"GET":return"emerald";case"PATCH":return"orange";case"POST":return"blue";case"PUT":return"orange";default:return"neutral"}},Be=t=>{switch(t){case"action":return"violet";case"mutation":return"orange";case"query":return"emerald";default:return"neutral"}},q=t=>{const e=P(7),{kind:r,method:s,testId:n}=t;let o;e[0]!==r||e[1]!==s?(o=r??s.toUpperCase(),e[0]=r,e[1]=s,e[2]=o):o=e[2];const l=o,a=r===void 0?_e(s):Be(r),y=`${Le[a]} font-mono text-[10px] tracking-wide uppercase`;let d;return e[3]!==l||e[4]!==y||e[5]!==n?(d=i(ye,{className:y,"data-testid":n,variant:"ghost",children:l}),e[3]=l,e[4]=y,e[5]=n,e[6]=d):d=e[6],d},ee=t=>t.startsWith("2")?"text-emerald-600 dark:text-emerald-400":t==="default"||t.startsWith("4")||t.startsWith("5")?"text-red-600 dark:text-red-400":"text-muted-foreground",te=t=>t.startsWith("2")?"bg-emerald-500":t==="default"||t.startsWith("4")||t.startsWith("5")?"bg-red-500":"bg-muted-foreground",Me=new Set([" ",`
12
+ `,"\r"]),G=" ",Je=t=>{let e="";for(const n of t)Me.has(n)||(e+=n);let r=0,s=e.length;for(;r<s&&(e[r]??"")<=G;)r+=1;for(;s>r&&(e[s-1]??"")<=G;)s-=1;return e.slice(r,s)},De=/^(?:[a-z][\d+.a-z-]*:)?\/\//i,Ke=(t,e)=>{const r=globalThis.location?.origin??"",s=e===""?r:e,n=Je(t);if(s===""){if(De.test(n))throw new Error(`restDispatch: refusing to send the admin token off-origin (${n} names its own host and there is no origin to check it against)`);return n}const o=new URL(n,s);if(o.origin!==new URL(s).origin)throw new Error(`restDispatch: refusing to send the admin token off-origin (${o.origin} is not ${s})`);return o.toString()},ze=async(t,e,r,s)=>{const n=t.method!=="GET"&&t.method!=="HEAD",o=Ke(t.httpPath,r),a=await(await fetch(o,{body:n?JSON.stringify(e):void 0,headers:{...n?{"content-type":"application/json"}:{},...s===null||s===""?{}:{authorization:`Bearer ${s}`}},method:t.method})).text();try{return JSON.parse(a)}catch{return a}},Fe=t=>JSON.stringify(D(t.argsSchema)??{},void 0,2),re=de(null),se=()=>{const t=ce(re);if(t===null)throw new Ne("INTERNAL","useOperationRun must be used within an OperationRunProvider");return t},We=({children:t,operation:e})=>{const r=J(),s=Se(),[n,o]=B(()=>Fe(e)),[l,a]=B(""),[y,d]=B("idle"),[c,u]=B(void 0),[b,x]=B(null),[f,m]=B(null),v=async()=>{let h;try{h=n.trim()===""?{}:JSON.parse(n)}catch(S){d("error"),u(void 0),m(null),x(r("Invalid JSON args: {message}",{message:H(S)}));return}d("running"),x(null);const g=performance.now();try{const S=await(e.functionPath===void 0?ze(e,h,s.url,s.getAuthToken()):me(s,e.kind,pe(e.functionPath),h,he(l)));u(S),m(Math.round(performance.now()-g)),d("success")}catch(S){u(void 0),m(Math.round(performance.now()-g)),x(H(S)),d("error")}};return i(re,{value:{argsText:n,durationMs:f,error:b,operation:e,response:c,send:()=>{fe(v())},setArgsText:o,setShardKey:a,shardKey:l,status:y},children:t})},qe=()=>{const t=P(48),e=J(),{argsText:r,operation:s,send:n,setArgsText:o,setShardKey:l,shardKey:a,status:y}=se();let d;t[0]!==o?(d=C=>{o(C.target.value)},t[0]=o,t[1]=d):d=t[1];const c=d;let u;t[2]!==n?(u=C=>{C.key==="Enter"&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),n())},t[2]=n,t[3]=u):u=t[3];const b=u,x=y==="running";let f;t[4]!==s.kind||t[5]!==s.method?(f=i(q,{kind:s.kind,method:s.method,testId:"api-try-method"}),t[4]=s.kind,t[5]=s.method,t[6]=f):f=t[6];const m=s.functionPath??s.httpPath;let v;t[7]!==m?(v=i("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground",children:m}),t[7]=m,t[8]=v):v=t[8];const w=x?"animate-pulse":void 0;let p;t[9]!==w?(p=i(F,{className:w,icon:ie,strokeWidth:2}),t[9]=w,t[10]=p):p=t[10];let h;t[11]!==x||t[12]!==e?(h=e(x?"Sending…":"Send"),t[11]=x,t[12]=e,t[13]=h):h=t[13];let g;t[14]!==x||t[15]!==n||t[16]!==p||t[17]!==h?(g=N(W,{"data-testid":"api-try-send",disabled:x,onClick:n,size:"sm",type:"button",children:[p,h]}),t[14]=x,t[15]=n,t[16]=p,t[17]=h,t[18]=g):g=t[18];let S;t[19]!==f||t[20]!==v||t[21]!==g?(S=N("div",{className:"flex items-center gap-2 border-b border-border bg-muted px-3 py-2",children:[f,v,g]}),t[19]=f,t[20]=v,t[21]=g,t[22]=S):S=t[22];let O;t[23]!==e?(O=e("Arguments (JSON)"),t[23]=e,t[24]=O):O=t[24];let k;t[25]!==O?(k=i(U,{htmlFor:"api-try-args",children:O}),t[25]=O,t[26]=k):k=t[26];let T;t[27]!==r?(T=r.split(`
13
+ `),t[27]=r,t[28]=T):T=t[28];const R=Math.min(12,Math.max(3,T.length));let E;t[29]!==r||t[30]!==c||t[31]!==b||t[32]!==R?(E=i(ve,{className:"font-mono text-xs","data-testid":"api-try-args",id:"api-try-args",onChange:c,onKeyDown:b,rows:R,spellCheck:!1,value:r}),t[29]=r,t[30]=c,t[31]=b,t[32]=R,t[33]=E):E=t[33];let $;t[34]!==k||t[35]!==E?($=N("div",{className:"flex flex-col gap-1.5",children:[k,E]}),t[34]=k,t[35]=E,t[36]=$):$=t[36];let A;t[37]!==s.functionPath||t[38]!==l||t[39]!==a||t[40]!==e?(A=s.functionPath!==void 0&&N("div",{className:"flex flex-col gap-1.5",children:[i(U,{htmlFor:"shard-input",children:e("Shard key (optional)")}),i(be,{id:"shard-input",onChange:l,testId:"shard-input",value:a})]}),t[37]=s.functionPath,t[38]=l,t[39]=a,t[40]=e,t[41]=A):A=t[41];let j;t[42]!==$||t[43]!==A?(j=N("div",{className:"flex flex-col gap-3 p-3",children:[$,A]}),t[42]=$,t[43]=A,t[44]=j):j=t[44];let I;return t[45]!==j||t[46]!==S?(I=N("div",{className:"overflow-hidden rounded-xl border border-border bg-card","data-testid":"api-try-it",children:[S,j]}),t[45]=j,t[46]=S,t[47]=I):I=t[47],I},He=t=>{const e=P(51),{operation:r}=t,s=J(),n=`api-operation-${r.operationId}`,o=r.key;let l;e[0]!==r.kind||e[1]!==r.method?(l=i(q,{kind:r.kind,method:r.method,testId:"api-operation-method"}),e[0]=r.kind,e[1]=r.method,e[2]=l):l=e[2];const a=r.functionPath??r.httpPath;let y;e[3]!==a?(y=i("code",{className:"truncate font-mono text-xs text-muted-foreground",children:a}),e[3]=a,e[4]=y):y=e[4];let d;e[5]!==l||e[6]!==y?(d=N("div",{className:"flex items-center gap-2",children:[l,y]}),e[5]=l,e[6]=y,e[7]=d):d=e[7];let c;e[8]!==r.title?(c=i("h1",{className:"text-lg font-semibold text-foreground","data-testid":"api-operation-title",children:r.title}),e[8]=r.title,e[9]=c):c=e[9];let u;e[10]!==r.description?(u=r.description!==void 0&&i("p",{className:"text-sm text-muted-foreground",children:r.description}),e[10]=r.description,e[11]=u):u=e[11];let b;e[12]!==d||e[13]!==c||e[14]!==u?(b=N("header",{className:"sticky top-0 z-10 -mx-6 -mt-6 flex flex-col gap-2 border-b border-border bg-background px-6 pt-6 pb-3",children:[d,c,u]}),e[12]=d,e[13]=c,e[14]=u,e[15]=b):b=e[15];let x;e[16]!==s?(x=s("Try it"),e[16]=s,e[17]=x):x=e[17];let f;e[18]!==x?(f=i("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:x}),e[18]=x,e[19]=f):f=e[19];let m;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=i(qe,{}),e[20]=m):m=e[20];let v;e[21]!==f?(v=N("section",{className:"flex flex-col gap-2",children:[f,m]}),e[21]=f,e[22]=v):v=e[22];let w;e[23]!==s?(w=s("Request arguments"),e[23]=s,e[24]=w):w=e[24];let p;e[25]!==w?(p=i("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:w}),e[25]=w,e[26]=p):p=e[26];let h;e[27]!==r.argsSchema?(h=i(V,{schema:r.argsSchema,testId:"api-operation-args"}),e[27]=r.argsSchema,e[28]=h):h=e[28];let g;e[29]!==p||e[30]!==h?(g=N("section",{className:"flex flex-col gap-2",children:[p,h]}),e[29]=p,e[30]=h,e[31]=g):g=e[31];let S;e[32]!==s?(S=s("Response body"),e[32]=s,e[33]=S):S=e[33];let O;e[34]!==S?(O=i("h2",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:S}),e[34]=S,e[35]=O):O=e[35];let k;if(e[36]!==r.responses||e[37]!==s){let E;e[39]!==s?(E=$=>N("div",{className:"flex flex-col gap-1.5 rounded-xl border border-border bg-card p-3",children:[N("div",{className:"flex items-center justify-between gap-2",children:[N("span",{className:`inline-flex items-center gap-1.5 font-mono text-xs font-semibold ${ee($.status)}`,children:[i("span",{className:`size-1.5 rounded-full ${te($.status)}`}),$.status]}),$.schema!==void 0&&i("span",{className:"rounded border border-border px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:s("application/json")})]}),$.description!==void 0&&i("p",{className:"text-xs text-muted-foreground",children:$.description}),$.schema!==void 0&&i(V,{schema:$.schema,testId:`api-response-${$.status}`})]},$.status),e[39]=s,e[40]=E):E=e[40],k=r.responses.map(E),e[36]=r.responses,e[37]=s,e[38]=k}else k=e[38];let T;e[41]!==O||e[42]!==k?(T=N("section",{className:"flex flex-col gap-3",children:[O,k]}),e[41]=O,e[42]=k,e[43]=T):T=e[43];let R;return e[44]!==r.key||e[45]!==n||e[46]!==v||e[47]!==g||e[48]!==T||e[49]!==b?(R=N("div",{className:"flex flex-col gap-6 duration-200 animate-in fade-in-0 slide-in-from-bottom-1","data-testid":n,children:[b,v,g,T]},o),e[44]=r.key,e[45]=n,e[46]=v,e[47]=g,e[48]=T,e[49]=b,e[50]=R):R=e[50],R},Ue={boolean:"text-royal-amethyst",key:"text-sky-sapphire",number:"text-warning",plain:"",string:"text-success"},Ve=/"(?:[^"\\]|\\.)*"|\b(?:true|false|null)\b|-?\d+(?:\.\d+)?/g,Ge=/^\s*:/,Xe=(t,e,r)=>r.startsWith('"')?Ge.test(t.slice(e))?"key":"string":r==="true"||r==="false"||r==="null"?"boolean":"number",Ye=t=>{const e=[];let r=0;for(const s of t.matchAll(Ve)){const{index:n}=s,o=s[0],l=n+o.length;n>r&&e.push({kind:"plain",start:r,text:t.slice(r,n)}),e.push({kind:Xe(t,l,o),start:n,text:o}),r=l}return r<t.length&&e.push({kind:"plain",start:r,text:t.slice(r)}),e},Qe=t=>{const e=P(4),{code:r}=t;let s;e[0]!==r?(s=Ye(r).map(Ze),e[0]=r,e[1]=s):s=e[1];let n;return e[2]!==s?(n=i(xe,{children:s}),e[2]=s,e[3]=n):n=e[3],n};function Ze(t){return i("span",{className:Ue[t.kind],children:t.text},t.start)}const ne="__live__",et=t=>t.schema===void 0?"":JSON.stringify(D(t.schema),void 0,2),tt=(t,e,r)=>r?t??"":e===void 0?"":JSON.stringify(e,ge,2),rt=t=>{const e=P(18),{active:r,running:s,showError:n}=t,o=J();if(s){let u;e[0]!==o?(u=o("Sending…"),e[0]=o,e[1]=u):u=e[1];let b;return e[2]!==u?(b=i("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-running",children:u}),e[2]=u,e[3]=b):b=e[3],b}if(r===void 0||r.body===""){let u;e[4]!==r?.live||e[5]!==o?(u=r?.live===!0?o("Send a request to see the response."):o("No example for this response."),e[4]=r?.live,e[5]=o,e[6]=u):u=e[6];let b;return e[7]!==u?(b=i("p",{className:"px-3 py-3 text-xs text-muted-foreground","data-testid":"api-response-idle",children:u}),e[7]=u,e[8]=b):b=e[8],b}const l=n&&"text-destructive";let a;e[9]!==l?(a=Y("max-h-[28rem] overflow-auto px-3 py-3 font-mono text-xs",l),e[9]=l,e[10]=a):a=e[10];const y=n?"api-response-error":"api-response-body";let d;e[11]!==r.body||e[12]!==n?(d=n?r.body:i(Qe,{code:r.body}),e[11]=r.body,e[12]=n,e[13]=d):d=e[13];let c;return e[14]!==a||e[15]!==y||e[16]!==d?(c=i("pre",{className:a,"data-testid":y,children:d}),e[14]=a,e[15]=y,e[16]=d,e[17]=c):c=e[17],c},st=({durationMs:t,error:e,failed:r,operation:s,ran:n,response:o,t:l})=>{const a=s.responses.map(d=>({body:et(d),durationMs:null,id:d.status,label:d.status,live:!1,status:d.status}));return n?[{body:tt(e,o,r),durationMs:t,id:ne,label:l("Live"),live:!0,status:r?"error":"200"},...a]:a},nt=()=>{const t=P(19),e=J(),{durationMs:r,error:s,operation:n,response:o,status:l}=se(),a=l==="running",y=l==="error",d=l==="success"||y,c=st({durationMs:r,error:s,failed:y,operation:n,ran:d,response:o,t:e}),u=d?ne:c.find(ot)?.id??c[0]?.id??"",[b,x]=B(null),f=c.find(C=>C.id===(b??u))??c[0];let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=C=>{const{id:L}=C.currentTarget.dataset;L!==void 0&&x(L)},t[0]=m):m=t[0];const v=m,w=()=>{f!==void 0&&X(f.body)},p=f?.live===!0?f.durationMs:null,h=f?.live===!0&&f.status==="error",g="flex min-h-0 flex-col rounded-xl border border-border bg-card",S="api-response-panel";let O;t[1]!==e?(O=e("Response"),t[1]=e,t[2]=O):O=t[2];let k;t[3]!==O?(k=i("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:O}),t[3]=O,t[4]=k):k=t[4];const T=p!==null&&i("span",{className:"font-mono text-[10px] text-muted-foreground",children:e("{ms} ms",{ms:p})}),R=f!==void 0&&f.body!==""&&i(W,{"aria-label":e("Copy"),"data-testid":"api-response-copy",onClick:w,size:"icon-xs",type:"button",variant:"ghost",children:i(F,{icon:ae,strokeWidth:2})});let E;t[5]!==T||t[6]!==R?(E=N("div",{className:"flex items-center gap-2",children:[T,R]}),t[5]=T,t[6]=R,t[7]=E):E=t[7];let $;t[8]!==k||t[9]!==E?($=N("div",{className:"flex items-center justify-between gap-2 border-b border-border px-3 py-2",children:[k,E]}),t[8]=k,t[9]=E,t[10]=$):$=t[10];const A=c.length>0&&i("div",{className:"flex gap-1 overflow-x-auto border-b border-border px-2 py-1.5",role:"tablist",children:c.map(C=>{const L=C.id===f?.id;return N("button",{"aria-selected":L,className:Y("inline-flex items-center gap-1.5 rounded px-2 py-0.5 font-mono text-xs transition-colors hover:text-foreground aria-selected:bg-muted aria-selected:font-medium",L?ee(C.status):"text-muted-foreground"),"data-id":C.id,"data-testid":C.live?"api-response-tab-live":`api-response-tab-${C.status}`,onClick:v,role:"tab",type:"button",children:[i("span",{className:`size-1.5 rounded-full ${te(C.status)}`}),C.label]},C.id)})});let j;t[11]!==f||t[12]!==a||t[13]!==h?(j=i(rt,{active:f,running:a,showError:h}),t[11]=f,t[12]=a,t[13]=h,t[14]=j):j=t[14];let I;return t[15]!==j||t[16]!==$||t[17]!==A?(I=N("div",{className:g,"data-testid":S,children:[$,A,j]}),t[15]=j,t[16]=$,t[17]=A,t[18]=I):I=t[18],I};function ot(t){return t.status.startsWith("2")}const it=(t,e)=>{const r=e.trim().toLowerCase();return r===""?t:t.map(s=>({...s,operations:s.operations.filter(n=>`${n.summary} ${n.operationId}`.toLowerCase().includes(r))})).filter(s=>s.operations.length>0)},wt=t=>{const e=P(53),{model:r}=t,s=J(),n=r.groups[0]?.operations[0]?.key??"",[o,l]=B(n),[a,y]=B("");let d;e[0]!==n||e[1]!==r.operationByKey||e[2]!==o?(d=r.operationByKey.get(o)??r.operationByKey.get(n),e[0]=n,e[1]=r.operationByKey,e[2]=o,e[3]=d):d=e[3];const c=d;let u,b,x,f,m,v,w,p,h,g;if(e[4]!==a||e[5]!==r.groups||e[6]!==r.server||e[7]!==c?.key||e[8]!==s){u=it(r.groups,a);let E;e[19]===Symbol.for("react.memo_cache_sentinel")?(E=M=>{const{key:_}=M.currentTarget.dataset;_!==void 0&&l(_)},e[19]=E):E=e[19];const $=E;let A;e[20]===Symbol.for("react.memo_cache_sentinel")?(A=M=>{y(M.target.value)},e[20]=A):A=e[20];const j=A;b=r.server??"",h="grid min-h-0 flex-1 grid-cols-1 overflow-hidden lg:grid-cols-[16rem_minmax(0,1fr)_22rem]",g="api-reference",e[21]!==s?(m=s("API operations"),e[21]=s,e[22]=m):m=e[22],v="flex min-h-0 flex-col overflow-y-auto border-r border-border",w="api-reference-nav";let I;e[23]===Symbol.for("react.memo_cache_sentinel")?(I=i(F,{className:"pointer-events-none absolute top-1/2 left-2 size-3.5 -translate-y-1/2 text-muted-foreground",icon:le,strokeWidth:2}),e[23]=I):I=e[23];let C;e[24]!==s?(C=s("Filter operations"),e[24]=s,e[25]=C):C=e[25],e[26]!==a||e[27]!==C?(p=i("div",{className:"sticky top-0 z-10 border-b border-border bg-sidebar p-2",children:N("div",{className:"relative",children:[I,i(ue,{className:"h-7 pl-7","data-testid":"api-filter",onChange:j,placeholder:C,value:a})]})}),e[26]=a,e[27]=C,e[28]=p):p=e[28],x="flex flex-col gap-4 p-2";let L;e[29]!==c?.key||e[30]!==s?(L=M=>N("div",{className:"flex flex-col gap-1",children:[N("div",{className:"flex items-center justify-between px-2",children:[i("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:M.name||s("(root)")}),i("span",{className:"font-mono text-[10px] text-muted-foreground/70",children:M.operations.length})]}),M.operations.map(_=>{const oe=_.key===c?.key;return N("button",{"aria-current":oe?"page":void 0,className:"flex items-center justify-between gap-2 rounded-md border-l-2 border-transparent px-2 py-1 text-start text-xs text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground aria-[current=page]:border-primary aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-foreground","data-key":_.key,"data-testid":`api-nav-${_.operationId}`,onClick:$,type:"button",children:[i("span",{className:"truncate",children:_.summary}),i(q,{kind:_.kind,method:_.method})]},_.key)})]},M.name),e[29]=c?.key,e[30]=s,e[31]=L):L=e[31],f=u.map(L),e[4]=a,e[5]=r.groups,e[6]=r.server,e[7]=c?.key,e[8]=s,e[9]=u,e[10]=b,e[11]=x,e[12]=f,e[13]=m,e[14]=v,e[15]=w,e[16]=p,e[17]=h,e[18]=g}else u=e[9],b=e[10],x=e[11],f=e[12],m=e[13],v=e[14],w=e[15],p=e[16],h=e[17],g=e[18];let S;e[32]!==u.length||e[33]!==s?(S=u.length===0&&i("p",{className:"px-2 py-1 text-xs text-muted-foreground","data-testid":"api-nav-empty",children:s("No operations match your filter.")}),e[32]=u.length,e[33]=s,e[34]=S):S=e[34];let O;e[35]!==S||e[36]!==x||e[37]!==f?(O=N("div",{className:x,children:[f,S]}),e[35]=S,e[36]=x,e[37]=f,e[38]=O):O=e[38];let k;e[39]!==O||e[40]!==m||e[41]!==v||e[42]!==w||e[43]!==p?(k=N("nav",{"aria-label":m,className:v,"data-testid":w,children:[p,O]}),e[39]=O,e[40]=m,e[41]=v,e[42]=w,e[43]=p,e[44]=k):k=e[44];let T;e[45]!==c||e[46]!==b?(T=c===void 0?i("div",{className:"lg:col-span-2"}):N(We,{operation:c,children:[i("div",{className:"min-w-0 overflow-y-auto p-6","data-testid":"api-reference-main",children:i(He,{operation:c})}),N("aside",{className:"flex min-w-0 flex-col gap-4 overflow-y-auto border-border p-4 lg:border-l","data-testid":"api-reference-aside",children:[i(Pe,{operation:c,server:b}),i(nt,{})]})]},c.key),e[45]=c,e[46]=b,e[47]=T):T=e[47];let R;return e[48]!==k||e[49]!==T||e[50]!==h||e[51]!==g?(R=N("div",{className:h,"data-testid":g,children:[k,T]}),e[48]=k,e[49]=T,e[50]=h,e[51]=g,e[52]=R):R=e[52],R};export{wt as R};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as y}from"react/compiler-runtime";import{Handle as L,Position as R,useNodesState as q,useEdgesState as Q,ReactFlow as Z,Background as J,Panel as k,Controls as X,MiniMap as ee,useNodesInitialized as te,useReactFlow as se}from"@xyflow/react";import{useState as D,useMemo as _,useRef as oe,useEffect as w}from"react";import{D as ae}from"./diagram-export-panel-BMLzao0Y.mjs";import{S as ne,T as x}from"./storage-tier-C2mKwYRj.mjs";import{B as E}from"./badge-r_5B4LHP.mjs";import{B as A}from"./button-q0UYSmrn.mjs";import{I as re}from"./input-CXhxesPC.mjs";import{useT as M}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{f as le}from"./internal-BXEjuLPN.mjs";import{c as N}from"./utils-bhneXptQ.mjs";import{jsx as c,jsxs as h}from"react/jsx-runtime";function ie(s){const e=y(10);let t,n,o;e[0]!==s?({className:t,selected:o,...n}=s,e[0]=s,e[1]=t,e[2]=n,e[3]=o):(t=e[1],n=e[2],o=e[3]);const r=o===!0?"":void 0;let a;e[4]!==t?(a=N("rounded-md border border-border bg-card text-card-foreground shadow-sm transition-colors","data-[selected]:border-ring data-[selected]:ring-[3px] data-[selected]:ring-ring/30",t),e[4]=t,e[5]=a):a=e[5];let l;return e[6]!==n||e[7]!==r||e[8]!==a?(l=c("div",{"data-slot":"base-node","data-selected":r,className:a,...n}),e[6]=n,e[7]=r,e[8]=a,e[9]=l):l=e[9],l}function ce(s){const e=y(8);let t,n;e[0]!==s?({className:t,...n}=s,e[0]=s,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let o;e[3]!==t?(o=N("flex items-center gap-2 rounded-t-md bg-muted/50 px-3 py-1.5",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==n||e[6]!==o?(r=c("div",{"data-slot":"base-node-header",className:o,...n}),e[5]=n,e[6]=o,e[7]=r):r=e[7],r}function de(s){const e=y(8);let t,n;e[0]!==s?({className:t,...n}=s,e[0]=s,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let o;e[3]!==t?(o=N("flex flex-col",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==n||e[6]!==o?(r=c("div",{"data-slot":"base-node-content",className:o,...n}),e[5]=n,e[6]=o,e[7]=r):r=e[7],r}const me=3,fe=(s,e,t)=>{const n=e?s:s.slice(0,me),o=n.map(a=>JSON.stringify(a)).join(" | "),r=s.length-n.length;return r>0?`${o} ${t("+{count} more",{count:r})}`:o},H=(s,e,t)=>{const n=s.enumValues??[],o=n.length===0?s.type:fe(n,e,t),r=s.ref===void 0?o:`${o} → ${s.ref}`;return s.optional===!0?`${r}?`:r},ue=s=>{const e=y(23),{data:t,selected:n}=s,o=M();let r;e[0]!==t.label||e[1]!==t.loadError||e[2]!==o?(r=t.loadError===!0?c("span",{className:"px-3 py-1.5 text-xs text-destructive","data-testid":`sd-node-${t.label}-error`,children:o("Columns unavailable")}):c("span",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:"—"}),e[0]=t.label,e[1]=t.loadError,e[2]=o,e[3]=r):r=e[3];const a=r,l=`sd-node-${t.label}`;let d;e[4]!==t.label?(d=c("span",{className:"truncate font-mono text-xs font-semibold",title:t.label,children:t.label}),e[4]=t.label,e[5]=d):d=e[5];let m;e[6]!==t.tier?(m=c("span",{className:"ms-auto",children:c(ne,{tier:t.tier})}),e[6]=t.tier,e[7]=m):m=e[7];let i;e[8]!==d||e[9]!==m?(i=h(ce,{children:[d,m]}),e[8]=d,e[9]=m,e[10]=i):i=e[10];let f;e[11]!==t.columns||e[12]!==t.label||e[13]!==a||e[14]!==o?(f=t.columns.length===0?a:t.columns.map(p=>h("div",{className:N("relative flex items-center gap-2 border-t border-border px-3 py-1.5 text-xs first:border-t-0",p.pk===!0&&"bg-muted/30"),"data-testid":`sd-col-${t.label}-${p.name}`,children:[c(L,{className:"!h-2 !w-2 !-left-1 !border-border !bg-muted-foreground/70",id:p.name,isConnectable:!1,position:R.Left,type:"target"}),c("span",{className:"truncate font-mono",title:p.name,children:p.name}),p.pk===!0&&c(E,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),p.ref!==void 0&&c(E,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),c("span",{className:"ms-auto truncate text-muted-foreground",title:H(p,!0,o),children:H(p,!1,o)}),c(L,{className:"!h-2 !w-2 !-right-1 !border-border !bg-muted-foreground/70",id:p.name,isConnectable:!1,position:R.Right,type:"source"})]},p.name)),e[11]=t.columns,e[12]=t.label,e[13]=a,e[14]=o,e[15]=f):f=e[15];let u;e[16]!==f?(u=c(de,{children:f}),e[16]=f,e[17]=u):u=e[17];let b;return e[18]!==n||e[19]!==l||e[20]!==i||e[21]!==u?(b=h(ie,{className:"w-64 overflow-hidden","data-testid":l,selected:n,children:[i,u]}),e[18]=n,e[19]=l,e[20]=i,e[21]=u,e[22]=b):b=e[22],b},F=256,z=112,O=36,v=24,pe=480,he=1.4,ge=s=>{const e=Math.max(1,Math.round(Math.sqrt(he*s/(F+z))));return Math.max(pe,s/e)},be=38,xe=28,B=s=>be+Math.max(1,s)*xe,Ne=(s,e)=>{const t=new Map;for(const a of s)t.set(a,[]);for(const a of e)a.to!==a.from&&t.has(a.from)&&t.has(a.to)&&t.get(a.from)?.push(a.to);const n=new Map,o=new Set,r=a=>{const l=n.get(a);if(l!==void 0)return l;if(o.has(a))return 0;o.add(a);let d=0;for(const m of t.get(a)??[])d=Math.max(d,r(m)+1);return o.delete(a),n.set(a,d),d};for(const a of s)r(a);return n},ye=(s,e,t)=>{const n=Ne(s,e),o=new Map;for(const m of s){const i=n.get(m)??0,f=o.get(i);f===void 0?o.set(i,[m]):f.push(m)}const r=s.reduce((m,i)=>m+B(t.get(i)??0)+O,0),a=ge(r),l=[];let d=0;for(const m of[...o.keys()].toSorted((i,f)=>i-f)){let i=0,f=v;for(const u of o.get(m)??[]){const b=B(t.get(u)??0);f>v&&f+b>a&&(i+=1,f=v),l.push({name:u,x:v+(d+i)*(F+z),y:f}),f+=b+O}d+=i+1}return l},ve={databaseSchema:ue},G={backgroundColor:x.shard.color},I={backgroundColor:x.global.color},Ee={global:!0,shard:!0},Se={},_e=s=>{const e=s.find(t=>t.pk===!0)?.name;return e!==void 0?e:s.some(t=>t.name==="_id")?"_id":s.some(t=>t.name==="id")?"id":s[0]?.name??"_id"},K=s=>s.flatMap(e=>e.columns.filter(t=>t.ref!==void 0).map(t=>({column:t.name,from:e.name,to:t.ref}))),we=(s,e,t)=>{const n=s.map(l=>l.name),o=new Map(s.map(l=>[l.name,l.columns.length])),r=ye(n,K(s),o),a=new Map(s.map(l=>[l.name,l]));return r.flatMap(({name:l,x:d,y:m})=>{const i=a.get(l);return i===void 0?[]:[{className:t[l],data:{columns:i.columns,label:l,loadError:e,tier:i.tier},id:l,position:{x:d,y:m},type:"databaseSchema"}]})},Me=s=>{const e=new Map(s.map(t=>[t.name,t.columns]));return K(s).flatMap(t=>{const n=e.get(t.to)??[],o=e.get(t.from)??[],r=_e(n);return!n.some(a=>a.name===r)||!o.some(a=>a.name===t.column)?[]:[{id:`${t.from}.${t.column}->${t.to}`,source:t.to,sourceHandle:r,target:t.from,targetHandle:t.column}]})},Ce=()=>{const s=y(15),e=M();let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=h("span",{className:"flex items-center gap-1",children:[c("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:G}),x.shard.label]}),s[0]=t):t=s[0];let n;s[1]===Symbol.for("react.memo_cache_sentinel")?(n=h("span",{className:"flex items-center gap-1",children:[c("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:I}),x.global.label]}),s[1]=n):n=s[1];let o;s[2]===Symbol.for("react.memo_cache_sentinel")?(o=c(E,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),s[2]=o):o=s[2];let r;s[3]!==e?(r=e("Primary key"),s[3]=e,s[4]=r):r=s[4];let a;s[5]!==r?(a=h("span",{className:"flex items-center gap-1",children:[o,r]}),s[5]=r,s[6]=a):a=s[6];let l;s[7]===Symbol.for("react.memo_cache_sentinel")?(l=c(E,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),s[7]=l):l=s[7];let d;s[8]!==e?(d=e("Foreign key"),s[8]=e,s[9]=d):d=s[9];let m;s[10]!==d?(m=h("span",{className:"flex items-center gap-1",children:[l,d]}),s[10]=d,s[11]=m):m=s[11];let i;return s[12]!==a||s[13]!==m?(i=h("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 rounded-xl border border-border bg-card/95 px-2.5 py-1.5 text-[11px] text-muted-foreground shadow-xs",children:[t,n,a,m]}),s[12]=a,s[13]=m,s[14]=i):i=s[14],i},$e=12,Te=s=>{const e=y(9),{containerRef:t,seedKey:n}=s,o=te(),{fitView:r}=se();let a;e[0]!==t||e[1]!==r||e[2]!==o?(a=()=>{if(!o)return;const d=()=>{le(r({duration:0,maxZoom:1.6,padding:.14}))};d();const m=t.current;if(m===null)return;const i=new ResizeObserver(()=>{d()});return i.observe(m),()=>{i.disconnect()}},e[0]=t,e[1]=r,e[2]=o,e[3]=a):a=e[3];let l;return e[4]!==t||e[5]!==r||e[6]!==o||e[7]!==n?(l=[t,r,o,n],e[4]=t,e[5]=r,e[6]=o,e[7]=n,e[8]=l):l=e[8],w(a,l),null},Ke=({columnsError:s,fill:e=!1,nodeClasses:t,tables:n,testIdPrefix:o})=>{const r=M(),[a,l]=D(Ee),[d,m]=D(""),i=_(()=>{const g=d.trim().toLowerCase();return n.filter(T=>a[T.tier]&&T.name.toLowerCase().includes(g))},[n,a,d]),f=_(()=>we(i,s??!1,t??Se),[i,s,t]),u=_(()=>Me(i),[i]),b=i.map(g=>g.name).join(","),[p,C,P]=q(f),[U,$,j]=Q(u),S=oe(null);w(()=>{C(f)},[f,C]),w(()=>{$(u)},[u,$]);const V=g=>{m(g.target.value)},W=()=>{l(g=>({...g,shard:!g.shard}))},Y=()=>{l(g=>({...g,global:!g.global}))};return n.length===0?c("section",{className:"flex flex-col gap-2","data-testid":`${o}-section`,children:c("p",{className:"text-sm text-muted-foreground","data-testid":`${o}-empty`,children:r("No tables to graph.")})}):c("section",{className:N("flex flex-col",e&&"min-h-0 flex-1"),"data-testid":`${o}-section`,children:c("div",{className:N("w-full overflow-hidden border border-border bg-muted/20",e?"min-h-0 flex-1":"h-[560px]"),"data-testid":`${o}-canvas`,ref:S,children:h(Z,{edges:U,elementsSelectable:!0,fitView:!0,minZoom:.2,nodes:p,nodesConnectable:!1,nodeTypes:ve,onEdgesChange:j,onNodesChange:P,children:[c(J,{}),c(k,{position:"top-left",children:h("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card/95 p-2 shadow-xs",children:[c(re,{"aria-label":r("Find table…"),className:"h-7 w-44 text-xs","data-testid":`${o}-find`,onChange:V,placeholder:r("Find table…"),value:d}),h("div",{"aria-label":r("Storage tiers"),className:"flex items-center gap-1.5",role:"group",children:[h(A,{"aria-pressed":a.shard,className:"gap-1.5","data-testid":`${o}-tier-shard`,onClick:W,size:"xs",type:"button",variant:a.shard?"default":"outline",children:[c("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:G}),x.shard.label]}),h(A,{"aria-pressed":a.global,className:"gap-1.5","data-testid":`${o}-tier-global`,onClick:Y,size:"xs",type:"button",variant:a.global?"default":"outline",children:[c("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:I}),x.global.label]})]})]})}),c(k,{position:"bottom-center",children:c(Ce,{})}),c(X,{showInteractive:!1}),i.length>$e&&c(ee,{className:"!border !border-border !bg-card",maskColor:"var(--color-muted)",nodeColor:"var(--color-muted-foreground)",nodeStrokeWidth:0,pannable:!0,zoomable:!0}),c(ae,{containerRef:S,filenameBase:`${o}-schema-diagram`,testIdPrefix:o}),c(Te,{containerRef:S,seedKey:b})]})})})};export{Ke as S};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as u}from"react/compiler-runtime";import{ScrollArea as i}from"@base-ui/react/scroll-area";import{c as m}from"./utils-bhneXptQ.mjs";import{jsx as c,jsxs as b}from"react/jsx-runtime";function z(s){const r=u(14);let e,l,a;r[0]!==s?({className:l,children:e,...a}=s,r[0]=s,r[1]=e,r[2]=l,r[3]=a):(e=r[1],l=r[2],a=r[3]);let t;r[4]!==l?(t=m("relative",l),r[4]=l,r[5]=t):t=r[5];let o;r[6]!==e?(o=c(i.Viewport,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:e}),r[6]=e,r[7]=o):o=r[7];let n,d;r[8]===Symbol.for("react.memo_cache_sentinel")?(n=c(h,{}),d=c(i.Corner,{}),r[8]=n,r[9]=d):(n=r[8],d=r[9]);let f;return r[10]!==a||r[11]!==t||r[12]!==o?(f=b(i.Root,{"data-slot":"scroll-area",className:t,...a,children:[o,n,d]}),r[10]=a,r[11]=t,r[12]=o,r[13]=f):f=r[13],f}function h({className:s,orientation:r="vertical",...e}){return c(i.Scrollbar,{"data-slot":"scroll-area-scrollbar","data-orientation":r,orientation:r,className:m("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-s data-vertical:border-s-transparent",s),...e,children:c(i.Thumb,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-md bg-border"})})}export{z as S};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as u}from"react/compiler-runtime";import{Select as l}from"@base-ui/react/select";import{c}from"./utils-bhneXptQ.mjs";import{HugeiconsIcon as m}from"@hugeicons/react";import{Tick02Icon as g,UnfoldMoreIcon as v,ArrowUp01Icon as b,ArrowDown01Icon as h}from"@hugeicons/core-free-icons";import{jsx as i,jsxs as p}from"react/jsx-runtime";const I=l.Root;function $(s){const e=u(8);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("flex flex-1 text-start",t),e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==o||e[6]!==a?(r=i(l.Value,{"data-slot":"select-value",className:a,...o}),e[5]=o,e[6]=a,e[7]=r):r=e[7],r}function j({className:s,size:e="default",children:t,...o}){return p(l.Trigger,{"data-slot":"select-trigger","data-size":e,className:c("flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pe-2 ps-2.5 text-xs whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-md *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),...o,children:[t,i(l.Icon,{render:i(m,{icon:v,strokeWidth:2,className:"pointer-events-none size-4 text-muted-foreground"})})]})}function A({className:s,children:e,side:t="bottom",sideOffset:o=4,align:a="center",alignOffset:r=0,alignItemWithTrigger:n=!0,...d}){return i(l.Portal,{children:i(l.Positioner,{side:t,sideOffset:o,align:a,alignOffset:r,alignItemWithTrigger:n,className:"isolate z-50",children:p(l.Popup,{"data-slot":"select-content","data-align-trigger":n,className:c("isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! relative bg-popover before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!",s),...d,children:[i(x,{}),i(l.List,{children:e}),i(w,{})]})})})}function U(s){const e=u(13);let t,o,a;e[0]!==s?({className:o,children:t,...a}=s,e[0]=s,e[1]=t,e[2]=o,e[3]=a):(t=e[1],o=e[2],a=e[3]);let r;e[4]!==o?(r=c("relative flex w-full cursor-default items-center gap-2 rounded-md py-2 pe-8 ps-2 text-xs outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[4]=o,e[5]=r):r=e[5];let n;e[6]!==t?(n=i(l.ItemText,{className:"flex flex-1 shrink-0 gap-2 whitespace-nowrap",children:t}),e[6]=t,e[7]=n):n=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i(l.ItemIndicator,{render:i("span",{className:"pointer-events-none absolute end-2 flex size-4 items-center justify-center"}),children:i(m,{icon:g,strokeWidth:2,className:"pointer-events-none"})}),e[8]=d):d=e[8];let f;return e[9]!==a||e[10]!==r||e[11]!==n?(f=p(l.Item,{"data-slot":"select-item",className:r,...a,children:[n,d]}),e[9]=a,e[10]=r,e[11]=n,e[12]=f):f=e[12],f}function x(s){const e=u(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i(m,{icon:b,strokeWidth:2}),e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==a?(n=i(l.ScrollUpArrow,{"data-slot":"select-scroll-up-button",className:a,...o,children:r}),e[6]=o,e[7]=a,e[8]=n):n=e[8],n}function w(s){const e=u(9);let t,o;e[0]!==s?({className:t,...o}=s,e[0]=s,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let a;e[3]!==t?(a=c("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=a):a=e[4];let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i(m,{icon:h,strokeWidth:2}),e[5]=r):r=e[5];let n;return e[6]!==o||e[7]!==a?(n=i(l.ScrollDownArrow,{"data-slot":"select-scroll-down-button",className:a,...o,children:r}),e[6]=o,e[7]=a,e[8]=n):n=e[8],n}export{$ as S,j as a,A as b,U as c,I as d};
@@ -0,0 +1 @@
1
+ import{s as a,l as i}from"./browser-storage-BH1MxLZs.mjs";const e="lunora-studio-recent-shards",c=10,o=()=>i(e,"session").filter(s=>typeof s=="string"),l=s=>{const r=s.trim();if(r==="")return o();const t=[r,...o().filter(n=>n!==r)].slice(0,c);return a(e,t,"session"),t};export{o as l,l as r};
@@ -0,0 +1 @@
1
+ import{useSyncExternalStore as f}from"react";import{l as h,s as u}from"./browser-storage-BH1MxLZs.mjs";const r={console:"`",palette:"k"},c="lunora-studio-shortcuts",n=new Set,p=t=>{const e=typeof t?.console=="string"?t.console.toLowerCase():void 0,s=typeof t?.palette=="string"?t.palette.toLowerCase():void 0;return e?.length===1&&s?.length===1&&e!==s?{console:e,palette:s}:r};let o=r;const S=()=>{o=p(h(c)[0]);for(const t of n)t()};S();const g=t=>(n.add(t),()=>{n.delete(t)}),a=()=>o,w=()=>f(g,a,a),y=(t,e)=>{if(e.length!==1)return;const s=e.toLowerCase(),l=t==="console"?"palette":"console";o=o[l]===s?{...o,[t]:s,[l]:o[t]}:{...o,[t]:s},u(c,[o]);for(const i of n)i()},C=()=>{o=r,u(c,[o]);for(const t of n)t()};export{C as r,y as s,w as u};
@@ -0,0 +1 @@
1
+ import{c as r}from"react/compiler-runtime";import{c as a}from"./utils-bhneXptQ.mjs";import{jsx as i}from"react/jsx-runtime";function p(m){const e=r(8);let t,s;e[0]!==m?({className:t,...s}=m,e[0]=m,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=a("animate-pulse rounded-md bg-muted",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=i("div",{"data-slot":"skeleton",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{p as S};
@@ -0,0 +1 @@
1
+ import{c as p}from"react/compiler-runtime";import{B as u,E as h}from"./bar-chart-BCsEIQoQ.mjs";import{c as g}from"./utils-bhneXptQ.mjs";import{jsx as d}from"react/jsx-runtime";const v={value:{colors:{dark:["var(--foreground)"],light:["var(--foreground)"]},label:""}},w=i=>{const e=p(12),{ariaLabel:n,className:c,series:r,testId:m}=i;if(r.length<2)return null;let l;e[0]!==r?(l=r.slice(-40).map(b),e[0]=r,e[1]=l):l=e[1];const f=l;let a;e[2]!==c?(a=g("h-6 w-[120px]",c),e[2]=c,e[3]=a):a=e[3];let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=d(u,{dataKey:"value"}),e[4]=o):o=e[4];let t;e[5]!==f?(t=d(h,{animationType:"none",barCategoryGap:1,className:"h-full w-full",config:v,data:f,children:o}),e[5]=f,e[6]=t):t=e[6];let s;return e[7]!==n||e[8]!==a||e[9]!==t||e[10]!==m?(s=d("div",{"aria-label":n,className:a,"data-testid":m,role:"img",children:t}),e[7]=n,e[8]=a,e[9]=t,e[10]=m,e[11]=s):s=e[11],s};function b(i,e){return{index:e,value:i}}export{w as S};
@@ -0,0 +1 @@
1
+ import{c as k}from"react/compiler-runtime";import{AreaChart as R,CartesianGrid as g,XAxis as N,Area as B,LineChart as X,Line as $}from"recharts";import{useT as S}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{l as E}from"./internal-BXEjuLPN.mjs";import{E as H,X as _,B as j,T as G,C as O,a as A,b as K}from"./bar-chart-BCsEIQoQ.mjs";import{jsx as l,jsxs as T}from"react/jsx-runtime";import{c as V,a as z,b as L,e as F,d as I,T as M}from"./table-D0SBiDu-.mjs";import{C as U}from"./data-grid-BHTuvSI7.mjs";const W=50,q={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},D=o=>{const e=o.columns.find(n=>o.rows.length>0&&o.rows.every(a=>typeof a[n]=="number"))??null;return{label:o.columns.find(n=>n!==e)??null,value:e}},J=o=>{const e=k(3),{data:t,kind:n}=o;let a;return e[0]!==t||e[1]!==n?(a=l(O,{className:"h-full w-full",config:q,children:n==="area"?T(R,{data:t,children:[l(g,{vertical:!1}),l(N,{axisLine:!1,dataKey:"label",tickLine:!1}),l(A,{content:l(K,{})}),l(B,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):T(X,{data:t,children:[l(g,{vertical:!1}),l(N,{axisLine:!1,dataKey:"label",tickLine:!1}),l(A,{content:l(K,{})}),l($,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),e[0]=t,e[1]=n,e[2]=a):a=e[2],a},oe=o=>{const e=k(21),{axes:t,kind:n,result:a}=o,u=S();let r;e[0]!==a?(r=D(a),e[0]=a,e[1]=r):r=e[1];const d=r;let m;e[2]!==a.columns?(m=new Set(a.columns),e[2]=a.columns,e[3]=m):m=e[3];const s=m,i=t!==void 0&&s.has(t.x)?t.x:d.label;let h;e[4]!==t?.y||e[5]!==s?(h=t?.y.find(c=>s.has(c)),e[4]=t?.y,e[5]=s,e[6]=h):h=e[6];const b=h,C=b??d.value;let w;e[7]!==i||e[8]!==a.rows||e[9]!==C?(w=C===null?[]:a.rows.slice(0,W).map((c,v)=>({label:i===null?`#${(v+1).toString()}`:E(c[i]),value:Number(c[C])||0})),e[7]=i,e[8]=a.rows,e[9]=C,e[10]=w):w=e[10];const x=w;if(C===null){let c;e[11]!==u?(c=u("No numeric column to chart."),e[11]=u,e[12]=c):c=e[12];let v;return e[13]!==c?(v=l("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:c}),e[13]=c,e[14]=v):v=e[14],v}const f=n??(t!==void 0&&b!==void 0?t.kind:"bar");let p;e[15]!==x||e[16]!==f?(p=f==="bar"?T(H,{className:"h-full w-full",config:q,data:x,children:[l(_,{dataKey:"label"}),l(j,{dataKey:"value"}),l(G,{})]}):l(J,{data:x,kind:f}),e[15]=x,e[16]=f,e[17]=p):p=e[17];let y;return e[18]!==f||e[19]!==p?(y=l("div",{className:"h-80 w-full p-3","data-chart-kind":f,"data-testid":"sql-chart",children:p}),e[18]=f,e[19]=p,e[20]=y):y=e[20],y},ne=o=>{const e=k(19),{result:t}=o,n=S();if(t.columns.length===0){let s;e[0]!==t.rowCount||e[1]!==n?(s=n("{count} rows",{count:t.rowCount}),e[0]=t.rowCount,e[1]=n,e[2]=s):s=e[2];let i;return e[3]!==s?(i=l("p",{className:"p-4 text-sm text-muted-foreground",children:s}),e[3]=s,e[4]=i):i=e[4],i}let a;e[5]!==t.columns?(a=t.columns.map(P),e[5]=t.columns,e[6]=a):a=e[6];let u;e[7]!==a?(u=l(z,{className:"sticky top-0 z-10 bg-muted",children:l(L,{children:a})}),e[7]=a,e[8]=u):u=e[8];let r;if(e[9]!==t.columns||e[10]!==t.rows){let s;e[12]!==t.columns?(s=(i,h)=>l(L,{"data-testid":"sql-row",children:t.columns.map(b=>l(F,{className:"max-w-md truncate font-mono text-xs",children:l(U,{value:i[b]})},b))},h),e[12]=t.columns,e[13]=s):s=e[13],r=t.rows.map(s),e[9]=t.columns,e[10]=t.rows,e[11]=r}else r=e[11];let d;e[14]!==r?(d=l(I,{children:r}),e[14]=r,e[15]=d):d=e[15];let m;return e[16]!==u||e[17]!==d?(m=T(M,{"data-testid":"sql-rows",children:[u,d]}),e[16]=u,e[17]=d,e[18]=m):m=e[18],m};function P(o){return l(V,{children:o},o)}export{oe as S,ne as a};
@@ -0,0 +1 @@
1
+ import{c as u}from"react/compiler-runtime";import{C as b}from"./card-By2O8ULa.mjs";import{jsx as m,jsxs as p}from"react/jsx-runtime";const j=x=>{const e=u(16),{chart:i,footer:o,label:n,testId:c,value:f}=x;let t;e[0]!==n?(t=m("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:n}),e[0]=n,e[1]=t):t=e[1];let l;e[2]!==c||e[3]!==f?(l=m("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":c,children:f}),e[2]=c,e[3]=f,e[4]=l):l=e[4];let r;e[5]!==i||e[6]!==l?(r=p("div",{className:"flex items-center justify-between gap-3",children:[l,i]}),e[5]=i,e[6]=l,e[7]=r):r=e[7];let s;e[8]!==t||e[9]!==r?(s=p("div",{className:"flex flex-col gap-2.5 p-4",children:[t,r]}),e[8]=t,e[9]=r,e[10]=s):s=e[10];let a;e[11]!==o?(a=o!=null&&m("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:o}),e[11]=o,e[12]=a):a=e[12];let d;return e[13]!==s||e[14]!==a?(d=p(b,{className:"justify-between gap-0 py-0",children:[s,a]}),e[13]=s,e[14]=a,e[15]=d):d=e[15],d};export{j as S};
@@ -0,0 +1 @@
1
+ import{c as n}from"react/compiler-runtime";import{jsx as d,jsxs as h}from"react/jsx-runtime";const b={alignItems:"center",border:"1px solid",borderRadius:4,display:"inline-flex",fontFamily:"var(--font-mono, ui-monospace, monospace)",fontSize:11,fontWeight:400,gap:6,letterSpacing:"0.06em",lineHeight:1.4,padding:"1px 8px",textTransform:"uppercase"},c={borderRadius:"50%",display:"inline-block",height:7,width:7},i=(r,e,a,t)=>({badgeStyle:{...b,borderColor:r,color:r},color:r,dotStyle:{...c,backgroundColor:r},hint:t,label:e,title:a}),p={global:i("var(--royal-amethyst)","Global · D1","Global table — a single D1 table shared across all shards","Declared .global() and stored once in Cloudflare D1, shared across every shard and tenant. Auth tables (user, session, …) live here too."),shard:i("var(--sky-sapphire)","Shard-local","Shard-local table — per-shard SQLite inside a Durable Object","Stored per shard key in a Durable Object's SQLite (.shardBy(...)). You are viewing one shard at a time — change the shard key to inspect another.")},y=r=>{const e=n(9),{tier:a}=r,t=p[a],o=`storage-tier-${a}`;let l;e[0]!==t.dotStyle?(l=d("span",{"aria-hidden":"true",style:t.dotStyle}),e[0]=t.dotStyle,e[1]=l):l=e[1];let s;return e[2]!==t.badgeStyle||e[3]!==t.label||e[4]!==t.title||e[5]!==o||e[6]!==l||e[7]!==a?(s=h("span",{"data-testid":o,"data-tier":a,style:t.badgeStyle,title:t.title,children:[l,t.label]}),e[2]=t.badgeStyle,e[3]=t.label,e[4]=t.title,e[5]=o,e[6]=l,e[7]=a,e[8]=s):s=e[8],s};export{y as S,p as T};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as M}from"react/compiler-runtime";import{createRootRoute as ds,createRoute as Et,createBrowserHistory as cs,createMemoryHistory as us,createRouter as fs,useNavigate as Dt,useSearch as ms,RouterProvider as hs,useRouterState as ps,Outlet as gs}from"@tanstack/react-router";import*as ft from"react";import{use as At,createContext as Ot,useState as pt,useEffect as mt,useSyncExternalStore as bs,lazy as A,Suspense as vs}from"react";import{c as _}from"./utils-bhneXptQ.mjs";import{jsx as o,jsxs as k,Fragment as Zt}from"react/jsx-runtime";import{ErrorBoundary as ys}from"./ErrorBoundary-BWNF98VF.mjs";import{O as xs,u as ws}from"./operation-console-provider-DoloEvon.mjs";import{useT as se}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{LunoraError as qt}from"@lunora/errors";import{B as gt}from"./badge-r_5B4LHP.mjs";import{I as Ft}from"./input-CXhxesPC.mjs";import{Popover as ht}from"@base-ui/react/popover";import{Cancel01Icon as ks,SidebarLeftIcon as Ms}from"@hugeicons/core-free-icons";import{HugeiconsIcon as Wt}from"@hugeicons/react";import{mergeProps as Ut}from"@base-ui/react/merge-props";import{useRender as jt}from"@base-ui/react/use-render";import{cva as Ns}from"class-variance-authority";import{B as Gt}from"./button-q0UYSmrn.mjs";import{Dialog as oe}from"@base-ui/react/dialog";import{Tooltip as ae}from"@base-ui/react/tooltip";import{S as Ct}from"./skeleton-DX1gfixl.mjs";import{H as Ss,u as Cs}from"./home-panel-CF-MfsnH.mjs";import{g as Ps,f as Tt}from"./internal-BXEjuLPN.mjs";import{o as wt}from"./use-admin-query-I1uILsUP.mjs";import{StudioI18nProvider as _s}from"./StudioI18nProvider-fVsCSs5L.mjs";import{v as Ts,a as Rs}from"./data-view-params-DhYmAkcj.mjs";import{CommandPalette as As,openCommandPalette as Ls}from"./CommandPalette-CM1hqAOD.mjs";import{motion as Is}from"motion/react";import{E as Es}from"./empty-state-D7jEML_T.mjs";import{u as $s}from"./shortcuts-B9gDaXmw.mjs";const Kt="(prefers-color-scheme: dark)",Qt=()=>{try{return globalThis.localStorage}catch{return}},Hs=t=>t==="system"||t==="light"||t==="dark",Yt=()=>globalThis.matchMedia,Jt="lunora-studio-theme",Pt=["system","light","dark"],Vs=(t="system")=>{try{const e=Qt()?.getItem(Jt);return Hs(e)?e:t}catch{return t}},$t=t=>{const e=Qt();if(e!==void 0)try{e.setItem(Jt,t)}catch{}},Bs=()=>{try{return Yt()?.(Kt).matches?"dark":"light"}catch{return"light"}},zs=(t,e)=>t==="system"?e:t,Ds=t=>{let e;try{e=Yt()?.(Kt)}catch{e=void 0}if(e===void 0)return()=>{};const s=a=>{t(a.matches?"dark":"light")};return e.addEventListener("change",s),()=>{e.removeEventListener("change",s)}},Lt=Ot(null),Os=({children:t,defaultTheme:e="system"})=>{const[s,a]=pt(()=>Vs(e)),[r,n]=pt(()=>Bs());mt(()=>Ds(n),[]);const i=u=>{$t(u),a(u)},d={cycleTheme:()=>{a(u=>{const c=Pt[(Pt.indexOf(u)+1)%Pt.length]??u;return $t(c),c})},resolvedTheme:zs(s,r),setTheme:i,systemTheme:r,theme:s};return o(Lt,{value:d,children:t})},Zs=t=>{const e=M(3),{children:s}=t,a=At(Lt);let r;return e[0]!==s||e[1]!==a?(r=a===null?o(Os,{children:s}):s,e[0]=s,e[1]=a,e[2]=r):r=e[2],r},qs=()=>{const t=At(Lt);if(t===null)throw new qt("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function $r({delay:t=0,...e}){return o(ae.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function Fs(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(ae.Root,{"data-slot":"tooltip",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ws(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(ae.Trigger,{"data-slot":"tooltip-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Us({className:t,side:e="top",sideOffset:s=4,align:a="center",alignOffset:r=0,children:n,...i}){return o(ae.Portal,{children:o(ae.Positioner,{align:a,alignOffset:r,side:e,sideOffset:s,className:"isolate z-50",children:k(ae.Popup,{"data-slot":"tooltip-content",className:_("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...i,children:[n,o(ae.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-md bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-start-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-end-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}const js=t=>{const e=M(5),{className:s}=t;let a;e[0]!==s?(a=_("h-full w-full text-foreground",s),e[0]=s,e[1]=a):a=e[1];let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o("path",{d:"M 259.500 10.552 C 220.080 15.859, 182.424 32.566, 152.500 58.025 C 110.179 94.031, 85.380 137.183, 77.518 188.500 C 75.410 202.255, 74.569 225.677, 75.796 236.466 C 76.757 244.917, 76.683 245.692, 74.518 249.966 C 63.118 272.466, 53.141 303.876, 51.382 322.799 L 50.718 329.943 71.960 320.471 C 83.643 315.262, 93.326 311, 93.478 311 C 93.630 311, 96.547 316.063, 99.959 322.250 C 103.371 328.438, 107.249 334.850, 108.577 336.500 L 110.990 339.500 110.981 336 C 110.977 334.075, 111.499 324.991, 112.143 315.813 L 113.312 299.127 121.406 293.336 C 132.495 285.403, 149.593 271.554, 161 261.268 C 171.556 251.748, 189.116 235, 188.540 235 C 188.337 235, 183.069 238.648, 176.835 243.106 C 142.318 267.789, 68.537 314, 63.646 314 C 61.843 314, 72.791 281.179, 80.905 262.259 C 92.233 235.845, 107.473 212.389, 132.106 183.453 L 138.451 176 148.268 176 C 176.192 176, 197.512 187.154, 212.868 209.797 C 216.470 215.108, 217.035 216.595, 216.477 219.297 C 211.386 243.968, 202.359 274.496, 193.797 296 C 183.898 320.861, 167.147 352.101, 152.395 373.215 L 147.004 380.930 152.891 385.830 C 161.400 392.911, 165.563 396, 166.594 395.998 C 167.092 395.998, 168.772 391.641, 170.327 386.317 C 176.279 365.934, 188.422 338.749, 200.942 317.778 C 223.060 280.731, 256.432 244.369, 294.500 215.836 C 309.956 204.252, 313.937 201.603, 314.719 202.385 C 315.116 202.783, 315.449 213.096, 315.460 225.304 C 315.474 241.855, 315.021 250.405, 313.680 258.924 C 307.009 301.272, 291.175 336.677, 263.112 372 C 255.259 381.883, 227.182 410.673, 218.516 417.727 L 213.532 421.783 223.439 424.880 C 281.705 443.093, 349.165 436.018, 398.616 406.508 C 446.728 377.797, 483.322 331.466, 497.366 281.481 C 503.381 260.075, 504.480 250.741, 504.491 221 C 504.501 191.997, 503.598 184.047, 497.987 163.732 C 484.768 115.871, 452.505 72.708, 407.718 42.964 C 381.051 25.254, 352.818 14.828, 319.695 10.460 C 305.932 8.645, 273.298 8.695, 259.500 10.552",fillRule:"evenodd"}),e[2]=r):r=e[2];let n;return e[3]!==a?(n=o("svg",{"aria-hidden":"true",className:a,fill:"currentColor",viewBox:"0 0 543 446",children:r}),e[3]=a,e[4]=n):n=e[4],n},Xt="lunora.studio.rulesBannerDismissed",Gs=()=>{try{return globalThis.localStorage.getItem(Xt)==="1"}catch{return!1}},Ks=()=>{try{globalThis.localStorage.setItem(Xt,"1")}catch{}},Qs=()=>{const t=M(18),e=se(),[s,a]=pt(Ys);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{a(!0),Ks()},t[0]=r):r=t[0];const n=r;if(s)return null;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=i):i=t[1];let l;t[2]!==e?(l=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=l):l=t[3];let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=o("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=d):d=t[4];let u;t[5]!==e?(u=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=u):u=t[6];let c;t[7]!==l||t[8]!==u?(c=k("span",{children:[l," ",d," ",u]}),t[7]=l,t[8]=u,t[9]=c):c=t[9];let m;t[10]!==e?(m=e("Dismiss"),t[10]=e,t[11]=m):m=t[11];let p;t[12]===Symbol.for("react.memo_cache_sentinel")?(p=o("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:o("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=p):p=t[12];let f;t[13]!==m?(f=o("button",{"aria-label":m,className:"ms-auto flex size-5 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":"dash-app-rules-banner-dismiss",onClick:n,type:"button",children:p}),t[13]=m,t[14]=f):f=t[14];let g;return t[15]!==c||t[16]!==f?(g=k("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[i,c,f]}),t[15]=c,t[16]=f,t[17]=g):g=t[17],g};function Ys(){return Gs()}function es(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(ht.Root,{"data-slot":"popover",...s}),e[2]=s,e[3]=a):a=e[3],a}function ts(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(ht.Trigger,{"data-slot":"popover-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function ss({align:t="end",alignOffset:e=0,className:s,keepMounted:a=!1,side:r="bottom",sideOffset:n=6,...i}){return o(ht.Portal,{keepMounted:a,children:o(ht.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:r,sideOffset:n,children:o(ht.Popup,{className:_("z-50 w-72 origin-(--transform-origin) rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md outline-none data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",s),"data-slot":"popover-content",...i})})})}const _t=768;function Js(){const t=M(2),[e,s]=pt(void 0);let a,r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const n=globalThis.matchMedia(`(max-width: ${_t-1}px)`),i=()=>{s(globalThis.innerWidth<_t)};return n.addEventListener("change",i),s(globalThis.innerWidth<_t),()=>{n.removeEventListener("change",i)}},r=[],t[0]=a,t[1]=r):(a=t[0],r=t[1]),mt(a,r),!!e}function Xs(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(oe.Root,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function ea(t){const e=M(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let a;return e[2]!==s?(a=o(oe.Portal,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function ta(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("fixed inset-0 z-50 bg-black/10 text-xs/relaxed transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o(oe.Backdrop,{"data-slot":"sheet-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function sa({className:t,children:e,side:s="right",showCloseButton:a=!0,...r}){return k(ea,{children:[o(ta,{}),k(oe.Popup,{"data-slot":"sheet-content","data-side":s,className:_("fixed z-50 flex flex-col bg-popover bg-clip-padding text-xs/relaxed text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-e data-[side=left]:data-ending-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-ending-style:-translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] rtl:data-[side=left]:data-starting-style:-translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-s data-[side=right]:data-ending-style:translate-x-[2.5rem] rtl:data-[side=right]:data-ending-style:-translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] rtl:data-[side=right]:data-starting-style:-translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",t),...r,children:[e,a&&k(oe.Close,{"data-slot":"sheet-close",render:o(Gt,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[o(Wt,{icon:ks,strokeWidth:2}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function aa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex flex-col gap-0.5 p-4",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sheet-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function oa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("text-sm font-medium text-foreground",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o(oe.Title,{"data-slot":"sheet-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ra(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("text-xs/relaxed text-muted-foreground",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o(oe.Description,{"data-slot":"sheet-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}const na="sidebar_state",ia=3600*24*7,la="16rem",da="18rem",ca="3rem",ua="b",as=ft.createContext(null);function kt(){const t=ft.useContext(as);if(!t)throw new qt("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function fa({defaultOpen:t=!0,open:e,onOpenChange:s,className:a,style:r,children:n,...i}){const l=Js(),[d,u]=ft.useState(!1),[c,m]=ft.useState(t),p=e??c,f=v=>{const h=typeof v=="function"?v(p):v;s?s(h):m(h),document.cookie=`${na}=${h}; path=/; max-age=${ia}`},g=()=>l?u(v=>!v):f(v=>!v),y=ft.useEffectEvent(()=>{g()});ft.useEffect(()=>{const v=h=>{h.key===ua&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),y())};return globalThis.addEventListener("keydown",v),()=>globalThis.removeEventListener("keydown",v)},[]);const b={state:p?"expanded":"collapsed",open:p,setOpen:f,isMobile:l,openMobile:d,setOpenMobile:u,toggleSidebar:g};return o(as.Provider,{value:b,children:o("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":la,"--sidebar-width-icon":ca,...r},className:_("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...i,children:n})})}function ma({side:t="left",variant:e="sidebar",collapsible:s="offcanvas",className:a,children:r,dir:n,...i}){const{isMobile:l,state:d,openMobile:u,setOpenMobile:c}=kt();return s==="none"?o("div",{"data-slot":"sidebar",className:_("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...i,children:r}):l?o(Xs,{open:u,onOpenChange:c,...i,children:k(sa,{dir:n,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":da},side:t,children:[k(aa,{className:"sr-only",children:[o(oa,{children:"Sidebar"}),o(ra,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:r})]})}):k("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?s:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[o("div",{"data-slot":"sidebar-gap",className:_("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o("div",{"data-slot":"sidebar-container","data-side":t,className:_("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-e group-data-[side=right]:border-s",a),...i,children:o("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-none group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border",children:r})})]})}function ha(t){const e=M(15);let s,a,r;e[0]!==t?({className:s,onClick:a,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r):(s=e[1],a=e[2],r=e[3]);const{toggleSidebar:n}=kt();let i;e[4]!==s?(i=_(s),e[4]=s,e[5]=i):i=e[5];let l;e[6]!==a||e[7]!==n?(l=m=>{a?.(m),n()},e[6]=a,e[7]=n,e[8]=l):l=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=o(Wt,{icon:Ms,strokeWidth:2,className:"rtl:rotate-180"}),u=o("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;return e[11]!==r||e[12]!==i||e[13]!==l?(c=k(Gt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:i,onClick:l,...r,children:[d,u]}),e[11]=r,e[12]=i,e[13]=l,e[14]=c):c=e[14],c}function pa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ms-0 md:peer-data-[variant=inset]:rounded-none md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ms-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("main",{"data-slot":"sidebar-inset",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ga(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ba(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function va(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex min-h-0 flex-1 flex-col gap-0 overflow-x-hidden overflow-y-auto [scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_25%,transparent)_transparent] [scrollbar-width:thin] [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/25 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar]:w-1.5 hover:[scrollbar-color:color-mix(in_oklch,var(--muted-foreground)_50%,transparent)_transparent] hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function ya(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("relative flex w-full min-w-0 flex-col p-2",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function xa(t){const e=M(10);let s,a,r,n;if(e[0]!==t){const{className:d,render:u,...c}=t;s=u,n=jt,a="div",r=Ut({className:_("flex h-8 shrink-0 items-center rounded-none px-2 text-xs text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",d)},c),e[0]=t,e[1]=s,e[2]=a,e[3]=r,e[4]=n}else s=e[1],a=e[2],r=e[3],n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==a||e[8]!==r?(l={defaultTagName:a,props:r,render:s,state:i},e[6]=s,e[7]=a,e[8]=r,e[9]=l):l=e[9],n(l)}function wa(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("w-full text-xs",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function Ht(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("flex w-full min-w-0 flex-col gap-0",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}function Vt(t){const e=M(8);let s,a;e[0]!==t?({className:s,...a}=t,e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let r;e[3]!==s?(r=_("group/menu-item relative",s),e[3]=s,e[4]=r):r=e[4];let n;return e[5]!==a||e[6]!==r?(n=o("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r,...a}),e[5]=a,e[6]=r,e[7]=n):n=e[7],n}const ka=Ns("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-none p-2 text-start text-xs ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pe-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-xs",sm:"h-7 text-xs",lg:"h-12 text-xs group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function os({render:t,isActive:e=!1,variant:s="default",size:a="default",tooltip:r,className:n,...i}){const{isMobile:l,state:d}=kt(),u=jt({defaultTagName:"button",props:Ut({className:_(ka({variant:s,size:a}),n)},i),render:r?o(Ws,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:e}});return r?(typeof r=="string"&&(r={children:r}),k(Fs,{children:[u,o(Us,{side:"right",align:"center",hidden:d!=="collapsed"||l,...r})]})):u}const Ma=t=>t.replace("__lunora_admin__:",""),Na=()=>bs(wt.subscribe,wt.getSnapshot,wt.getSnapshot),Sa=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",Ca=t=>{const e=M(56),{entry:s,focused:a}=t,r=se();let n;e[0]!==a?(n=O=>{O!==null&&a&&O.scrollIntoView({block:"nearest"})},e[0]=a,e[1]=n):n=e[1];const i=n;let l;e[2]!==s.functionPath||e[3]!==s.shardKey||e[4]!==s.summary?(l=()=>{Ps(`${s.functionPath} ${s.summary}${s.shardKey===""?"":` (shard ${s.shardKey})`}`)},e[2]=s.functionPath,e[3]=s.shardKey,e[4]=s.summary,e[5]=l):l=e[5];const d=l,u=a&&"bg-accent ring-1 ring-inset ring-primary/40";let c;e[6]!==u?(c=_("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=c):c=e[7];let m;e[8]!==s.status?(m=Sa(s.status),e[8]=s.status,e[9]=m):m=e[9];const p=s.status==="pending"?"…":s.status;let f;e[10]!==m||e[11]!==p?(f=o(gt,{className:"mt-px shrink-0",variant:m,children:p}),e[10]=m,e[11]=p,e[12]=f):f=e[12];let g;e[13]!==s.functionPath?(g=Ma(s.functionPath),e[13]=s.functionPath,e[14]=g):g=e[14];let y;e[15]!==g?(y=o("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:g}),e[15]=g,e[16]=y):y=e[16];let x;e[17]!==s.kind||e[18]!==r?(x=s.kind==="subscription"&&o(gt,{className:"shrink-0",variant:"outline",children:r("live")}),e[17]=s.kind,e[18]=r,e[19]=x):x=e[19];let b;e[20]!==s.summary?(b=s.summary!==""&&o("span",{className:"min-w-0 truncate text-muted-foreground",children:s.summary}),e[20]=s.summary,e[21]=b):b=e[21];let v;e[22]!==s.shardKey?(v=s.shardKey!==""&&o("span",{className:"font-mono",children:s.shardKey}),e[22]=s.shardKey,e[23]=v):v=e[23];let h;e[24]!==s.resultCount||e[25]!==r?(h=s.resultCount!==void 0&&o("span",{children:r("{count} rows",{count:s.resultCount})}),e[24]=s.resultCount,e[25]=r,e[26]=h):h=e[26];let w;e[27]!==s.pushes||e[28]!==r?(w=s.pushes!==void 0&&s.pushes>0&&o("span",{children:r("{count} pushes",{count:s.pushes})}),e[27]=s.pushes,e[28]=r,e[29]=w):w=e[29];let P;e[30]!==s.durationMs?(P=s.durationMs!==void 0&&k("span",{children:[s.durationMs,"ms"]}),e[30]=s.durationMs,e[31]=P):P=e[31];let C;e[32]!==r?(C=r("Copy"),e[32]=r,e[33]=C):C=e[33];let S;e[34]!==d||e[35]!==C?(S=o("button",{"aria-label":C,className:"rounded px-1 outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-copy",onClick:d,type:"button",children:"⧉"}),e[34]=d,e[35]=C,e[36]=S):S=e[36];let N;e[37]!==v||e[38]!==h||e[39]!==w||e[40]!==P||e[41]!==S?(N=k("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[v,h,w,P,S]}),e[37]=v,e[38]=h,e[39]=w,e[40]=P,e[41]=S,e[42]=N):N=e[42];let T;e[43]!==x||e[44]!==b||e[45]!==N||e[46]!==f||e[47]!==y?(T=k("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[f,y,x,b,N]}),e[43]=x,e[44]=b,e[45]=N,e[46]=f,e[47]=y,e[48]=T):T=e[48];let R;e[49]!==s.error?(R=s.error!==void 0&&o("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:s.error}),e[49]=s.error,e[50]=R):R=e[50];let L;return e[51]!==i||e[52]!==T||e[53]!==R||e[54]!==c?(L=k("li",{className:c,"data-testid":"oc-row",ref:i,children:[T,R]}),e[51]=i,e[52]=T,e[53]=R,e[54]=c,e[55]=L):L=e[55],L},Pa=t=>{const e=M(62),{focusSeq:s,onClose:a,onShownChange:r,shown:n}=t,i=se(),l=Na(),[d,u]=pt("");let c;if(e[0]!==l||e[1]!==s||e[2]!==d||e[3]!==a||e[4]!==r||e[5]!==n||e[6]!==i){const m=d.trim().toLowerCase(),p=l.filter(E=>(n==="errors"?E.status==="error":!0)&&(m===""||`${E.functionPath} ${E.summary} ${E.shardKey}`.toLowerCase().includes(m))).toReversed();let f;e[8]!==l?(f=l.filter(_a),e[8]=l,e[9]=f):f=e[9];const g=f.length;let y;e[10]!==i?(y=i("Operation console"),e[10]=i,e[11]=y):y=e[11];let x;e[12]!==i?(x=i("Operation console"),e[12]=i,e[13]=x):x=e[13];let b;e[14]!==x?(b=o("span",{className:"text-xs font-medium",children:x}),e[14]=x,e[15]=b):b=e[15];let v;e[16]!==l.length||e[17]!==i?(v=i("{count} calls",{count:l.length}),e[16]=l.length,e[17]=i,e[18]=v):v=e[18];let h;e[19]!==v?(h=o(gt,{variant:"secondary",children:v}),e[19]=v,e[20]=h):h=e[20];let w;e[21]!==g||e[22]!==i?(w=g>0&&o(gt,{variant:"destructive",children:i("{count} failed",{count:g})}),e[21]=g,e[22]=i,e[23]=w):w=e[23];const P=n==="errors",C=n==="errors"&&"bg-accent";let S;e[24]!==C?(S=_("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",C),e[24]=C,e[25]=S):S=e[25];let N;e[26]!==r||e[27]!==n?(N=()=>{r(n==="errors"?"all":"errors")},e[26]=r,e[27]=n,e[28]=N):N=e[28];let T;e[29]!==i?(T=i("Errors"),e[29]=i,e[30]=T):T=e[30];let R;e[31]!==S||e[32]!==N||e[33]!==T||e[34]!==P?(R=o("button",{"aria-pressed":P,className:S,"data-testid":"oc-filter-errors",onClick:N,type:"button",children:T}),e[31]=S,e[32]=N,e[33]=T,e[34]=P,e[35]=R):R=e[35];let L;e[36]!==i?(L=i("Filter"),e[36]=i,e[37]=L):L=e[37];let O;e[38]===Symbol.for("react.memo_cache_sentinel")?(O=E=>{u(E.target.value)},e[38]=O):O=e[38];let V;e[39]!==i?(V=i("Filter"),e[39]=i,e[40]=V):V=e[40];let B;e[41]!==d||e[42]!==L||e[43]!==V?(B=o(Ft,{"aria-label":L,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:O,placeholder:V,value:d}),e[41]=d,e[42]=L,e[43]=V,e[44]=B):B=e[44];let z;e[45]!==i?(z=i("Clear"),e[45]=i,e[46]=z):z=e[46];let $;e[47]!==z?($=o("button",{className:"ms-auto rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-clear",onClick:Ta,type:"button",children:z}),e[47]=z,e[48]=$):$=e[48];let H;e[49]!==i?(H=i("Hide"),e[49]=i,e[50]=H):H=e[50];let D;e[51]!==a||e[52]!==H?(D=o("button",{"aria-label":H,className:"rounded px-2 py-0.5 text-xs text-muted-foreground outline-none hover:bg-accent focus-visible:bg-accent","data-testid":"oc-close",onClick:a,type:"button",children:"✕"}),e[51]=a,e[52]=H,e[53]=D):D=e[53];let Z;e[54]!==R||e[55]!==B||e[56]!==$||e[57]!==D||e[58]!==b||e[59]!==h||e[60]!==w?(Z=k("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[b,h,w,R,B,$,D]}),e[54]=R,e[55]=B,e[56]=$,e[57]=D,e[58]=b,e[59]=h,e[60]=w,e[61]=Z):Z=e[61],c=k("section",{"aria-label":y,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[Z,p.length===0?o("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:i("Every admin call this studio makes is recorded here.")}):o("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:p.map(E=>o(Ca,{entry:E,focused:E.seq===s},E.seq))})]}),e[0]=l,e[1]=s,e[2]=d,e[3]=a,e[4]=r,e[5]=n,e[6]=i,e[7]=c}else c=e[7];return c};function _a(t){return t.status==="error"}function Ta(){wt.clear()}const Ra=()=>{const t=M(334),e=se();let s;t[0]!==e?(s=e("Health score"),t[0]=e,t[1]=s):s=t[1];let a;t[2]!==e?(a=e("Agents"),t[2]=e,t[3]=a):a=t[3];let r;t[4]!==e?(r=e("Evals"),t[4]=e,t[5]=r):r=t[5];let n;t[6]!==e?(n=e("AI usage"),t[6]=e,t[7]=n):n=t[7];let i;t[8]!==e?(i=e("Analytics"),t[8]=e,t[9]=i):i=t[9];let l;t[10]!==e?(l=e("API"),t[10]=e,t[11]=l):l=t[11];let d;t[12]!==e?(d=e("Architecture"),t[12]=e,t[13]=d):d=t[13];let u;t[14]!==e?(u=e("Audit"),t[14]=e,t[15]=u):u=t[15];let c;t[16]!==e?(c=e("Auth audit"),t[16]=e,t[17]=c):c=t[17];let m;t[18]!==e?(m=e("Configuration"),t[18]=e,t[19]=m):m=t[19];let p;t[20]!==e?(p=e("Sessions"),t[20]=e,t[21]=p):p=t[21];let f;t[22]!==e?(f=e("Containers"),t[22]=e,t[23]=f):f=t[23];let g;t[24]!==e?(g=e("Dashboards"),t[24]=e,t[25]=g):g=t[25];let y;t[26]!==e?(y=e("Data"),t[26]=e,t[27]=y):y=t[27];let x;t[28]!==e?(x=e("Deployment health"),t[28]=e,t[29]=x):x=t[29];let b;t[30]!==e?(b=e("Log drains"),t[30]=e,t[31]=b):b=t[31];let v;t[32]!==e?(v=e("Export / Import"),t[32]=e,t[33]=v):v=t[33];let h;t[34]!==e?(h=e("Fan-out"),t[34]=e,t[35]=h):h=t[35];let w;t[36]!==e?(w=e("Files"),t[36]=e,t[37]=w):w=t[37];let P;t[38]!==e?(P=e("Flags"),t[38]=e,t[39]=P):P=t[39];let C;t[40]!==e?(C=e("Functions"),t[40]=e,t[41]=C):C=t[41];let S;t[42]!==e?(S=e("Health"),t[42]=e,t[43]=S):S=t[43];let N;t[44]!==e?(N=e("Home"),t[44]=e,t[45]=N):N=t[45];let T;t[46]!==e?(T=e("Performance"),t[46]=e,t[47]=T):T=t[47];let R;t[48]!==e?(R=e("Issues"),t[48]=e,t[49]=R):R=t[49];let L;t[50]!==e?(L=e("KV"),t[50]=e,t[51]=L):L=t[51];let O;t[52]!==e?(O=e("Logs"),t[52]=e,t[53]=O):O=t[53];let V;t[54]!==e?(V=e("Metrics"),t[54]=e,t[55]=V):V=t[55];let B;t[56]!==e?(B=e("Migrations"),t[56]=e,t[57]=B):B=t[57];let z;t[58]!==e?(z=e("Notifications"),t[58]=e,t[59]=z):z=t[59];let $;t[60]!==e?($=e("Organizations"),t[60]=e,t[61]=$):$=t[61];let H;t[62]!==e?(H=e("Time Travel"),t[62]=e,t[63]=H):H=t[63];let D;t[64]!==e?(D=e("Privacy requests"),t[64]=e,t[65]=D):D=t[65];let Z;t[66]!==e?(Z=e("Mail"),t[66]=e,t[67]=Z):Z=t[67];let E;t[68]!==e?(E=e("Payments"),t[68]=e,t[69]=E):E=t[69];let q;t[70]!==e?(q=e("Permissions"),t[70]=e,t[71]=q):q=t[71];let ee;t[72]!==e?(ee=e("Queues"),t[72]=e,t[73]=ee):ee=t[73];let F;t[74]!==e?(F=e("Reactors"),t[74]=e,t[75]=F):F=t[75];let Y;t[76]!==e?(Y=e("Realtime"),t[76]=e,t[77]=Y):Y=t[77];let te;t[78]!==e?(te=e("RLS Policies"),t[78]=e,t[79]=te):te=t[79];let W;t[80]!==e?(W=e("Scheduled"),t[80]=e,t[81]=W):W=t[81];let U;t[82]!==e?(U=e("Schema"),t[82]=e,t[83]=U):U=t[83];let j;t[84]!==e?(j=e("Security"),t[84]=e,t[85]=j):j=t[85];let G;t[86]!==e?(G=e("Settings"),t[86]=e,t[87]=G):G=t[87];let K;t[88]!==e?(K=e("SQL editor"),t[88]=e,t[89]=K):K=t[89];let J;t[90]!==e?(J=e("Traces"),t[90]=e,t[91]=J):J=t[91];let Q;t[92]!==e?(Q=e("Access Rules"),t[92]=e,t[93]=Q):Q=t[93];let X;t[94]!==e?(X=e("Users"),t[94]=e,t[95]=X):X=t[95];let re;t[96]!==e?(re=e("Vectors"),t[96]=e,t[97]=re):re=t[97];let ne;t[98]!==e?(ne=e("Workflows"),t[98]=e,t[99]=ne):ne=t[99];let bt;t[100]!==s||t[101]!==a||t[102]!==p||t[103]!==f||t[104]!==g||t[105]!==y||t[106]!==x||t[107]!==b||t[108]!==v||t[109]!==h||t[110]!==w||t[111]!==P||t[112]!==r||t[113]!==C||t[114]!==S||t[115]!==N||t[116]!==T||t[117]!==R||t[118]!==L||t[119]!==O||t[120]!==V||t[121]!==B||t[122]!==z||t[123]!==n||t[124]!==$||t[125]!==H||t[126]!==D||t[127]!==Z||t[128]!==E||t[129]!==q||t[130]!==ee||t[131]!==F||t[132]!==Y||t[133]!==te||t[134]!==i||t[135]!==W||t[136]!==U||t[137]!==j||t[138]!==G||t[139]!==K||t[140]!==J||t[141]!==Q||t[142]!==X||t[143]!==re||t[144]!==ne||t[145]!==l||t[146]!==d||t[147]!==u||t[148]!==c||t[149]!==m?(bt={advisorHealth:s,agents:a,evals:r,aiUsage:n,analytics:i,api:l,architecture:d,audit:u,authAudit:c,authConfig:m,authSessions:p,containers:f,dashboards:g,data:y,deploymentHealth:x,drains:b,export:v,fanout:h,files:w,flags:P,functions:C,health:S,home:N,insights:T,issues:R,kv:L,logs:O,metrics:V,migrations:B,notifications:z,organizations:$,pitr:H,privacyRequests:D,mail:Z,payments:E,permissions:q,queues:ee,reactors:F,realtime:Y,rls:te,schedule:W,schema:U,security:j,settings:G,sql:K,traces:J,storageRules:Q,users:X,vectors:re,workflows:ne},t[100]=s,t[101]=a,t[102]=p,t[103]=f,t[104]=g,t[105]=y,t[106]=x,t[107]=b,t[108]=v,t[109]=h,t[110]=w,t[111]=P,t[112]=r,t[113]=C,t[114]=S,t[115]=N,t[116]=T,t[117]=R,t[118]=L,t[119]=O,t[120]=V,t[121]=B,t[122]=z,t[123]=n,t[124]=$,t[125]=H,t[126]=D,t[127]=Z,t[128]=E,t[129]=q,t[130]=ee,t[131]=F,t[132]=Y,t[133]=te,t[134]=i,t[135]=W,t[136]=U,t[137]=j,t[138]=G,t[139]=K,t[140]=J,t[141]=Q,t[142]=X,t[143]=re,t[144]=ne,t[145]=l,t[146]=d,t[147]=u,t[148]=c,t[149]=m,t[150]=bt):bt=t[150];const Mt=bt;let ie;t[151]!==e?(ie=e("Advisors"),t[151]=e,t[152]=ie):ie=t[152];let le;t[153]!==e?(le=e("Auth"),t[153]=e,t[154]=le):le=t[154];let de;t[155]!==e?(de=e("Database"),t[155]=e,t[156]=de):de=t[156];let ce;t[157]!==e?(ce=e("Functions"),t[157]=e,t[158]=ce):ce=t[158];let ue;t[159]!==e?(ue=e("Observability"),t[159]=e,t[160]=ue):ue=t[160];let fe;t[161]!==e?(fe=e("Operations"),t[161]=e,t[162]=fe):fe=t[162];let me;t[163]!==e?(me=e("Overview"),t[163]=e,t[164]=me):me=t[164];let he;t[165]!==e?(he=e("Settings"),t[165]=e,t[166]=he):he=t[166];let pe;t[167]!==e?(pe=e("Storage"),t[167]=e,t[168]=pe):pe=t[168];let vt;t[169]!==ie||t[170]!==le||t[171]!==de||t[172]!==ce||t[173]!==ue||t[174]!==fe||t[175]!==me||t[176]!==he||t[177]!==pe?(vt={advisors:ie,auth:le,database:de,functions:ce,observability:ue,operations:fe,overview:me,settings:he,storage:pe},t[169]=ie,t[170]=le,t[171]=de,t[172]=ce,t[173]=ue,t[174]=fe,t[175]=me,t[176]=he,t[177]=pe,t[178]=vt):vt=t[178];const Nt=vt;let ge;t[179]!==e?(ge=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[179]=e,t[180]=ge):ge=t[180];let be;t[181]!==e?(be=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[181]=e,t[182]=be):be=t[182];let ve;t[183]!==e?(ve=e("Scores recorded by recordEvaluation — the latest verdict per eval, its trend, and the graded runs behind it."),t[183]=e,t[184]=ve):ve=t[184];let ye;t[185]!==e?(ye=e("Tokens and spend from ctx.ai.model calls — totals, per function and per model, and the recent calls behind them."),t[185]=e,t[186]=ye):ye=t[186];let xe;t[187]!==e?(xe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[187]=e,t[188]=xe):xe=t[188];let we;t[189]!==e?(we=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[189]=e,t[190]=we):we=t[190];let ke;t[191]!==e?(ke=e("A durable log of admin state-changing operations."),t[191]=e,t[192]=ke):ke=t[192];let Me;t[193]!==e?(Me=e("Authentication and security events — sign-ins, MFA, and session changes."),t[193]=e,t[194]=Me):Me=t[194];let Ne;t[195]!==e?(Ne=e("Enabled plugins and session config (read-only)."),t[195]=e,t[196]=Ne):Ne=t[196];let Se;t[197]!==e?(Se=e("Your modules, and the calls, reads, writes and hand-offs between them, from codegen."),t[197]=e,t[198]=Se):Se=t[198];let Ce;t[199]!==e?(Ce=e("Browse and revoke active sessions across all users."),t[199]=e,t[200]=Ce):Ce=t[200];let Pe;t[201]!==e?(Pe=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[201]=e,t[202]=Pe):Pe=t[202];let _e;t[203]!==e?(_e=e("Chart widgets backed by saved read-only SQL queries."),t[203]=e,t[204]=_e):_e=t[204];let Te;t[205]!==e?(Te=e("Browse and edit rows across your shard and global tables."),t[205]=e,t[206]=Te):Te=t[206];let Re;t[207]!==e?(Re=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[207]=e,t[208]=Re):Re=t[208];let Ae;t[209]!==e?(Ae=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[209]=e,t[210]=Ae):Ae=t[210];let Le;t[211]!==e?(Le=e("Export a shard to NDJSON, or import rows from it."),t[211]=e,t[212]=Le):Le=t[212];let Ie;t[213]!==e?(Ie=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[213]=e,t[214]=Ie):Ie=t[214];let Ee;t[215]!==e?(Ee=e("Browse objects in your R2 storage buckets."),t[215]=e,t[216]=Ee):Ee=t[216];let $e;t[217]!==e?($e=e("Inspect feature flags and their live evaluation under a targeting context."),t[217]=e,t[218]=$e):$e=t[218];let He;t[219]!==e?(He=e("Run registered queries, mutations, and actions."),t[219]=e,t[220]=He):He=t[220];let Ve;t[221]!==e?(Ve=e("At-a-glance connection, error, and shard signals."),t[221]=e,t[222]=Ve):Ve=t[222];let Be;t[223]!==e?(Be=e("Connection, health, and advisor summary for your deployment."),t[223]=e,t[224]=Be):Be=t[224];let ze;t[225]!==e?(ze=e("Surface slow functions, error spikes, and cache problems."),t[225]=e,t[226]=ze):ze=t[226];let De;t[227]!==e?(De=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[227]=e,t[228]=De):De=t[228];let Oe;t[229]!==e?(Oe=e("A live stream of recent function logs."),t[229]=e,t[230]=Oe):Oe=t[230];let Ze;t[231]!==e?(Ze=e("Per-shard health and aggregate metrics."),t[231]=e,t[232]=Ze):Ze=t[232];let qe;t[233]!==e?(qe=e("Review migration status and run them."),t[233]=e,t[234]=qe):qe=t[234];let Fe;t[235]!==e?(Fe=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[235]=e,t[236]=Fe):Fe=t[236];let We;t[237]!==e?(We=e("Browse and manage organizations, members, and invitations."),t[237]=e,t[238]=We):We=t[238];let Ue;t[239]!==e?(Ue=e("Restore a shard to a point in the last 30 days."),t[239]=e,t[240]=Ue):Ue=t[240];let je;t[241]!==e?(je=e("Open data-subject export and erasure requests, with due dates and failed-run retries."),t[241]=e,t[242]=je):je=t[242];let Ge;t[243]!==e?(Ge=e("Email your app sent, captured in dev."),t[243]=e,t[244]=Ge):Ge=t[244];let Ke;t[245]!==e?(Ke=e("Synced customers, subscriptions, and webhook events."),t[245]=e,t[246]=Ke):Ke=t[246];let Qe;t[247]!==e?(Qe=e("Inspect access policies per table, and probe a function as any identity."),t[247]=e,t[248]=Qe):Qe=t[248];let Ye;t[249]!==e?(Ye=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[249]=e,t[250]=Ye):Ye=t[250];let Je;t[251]!==e?(Je=e("Server-side onQueryChange reactors: what has run, what was suppressed, and what is failing."),t[251]=e,t[252]=Je):Je=t[252];let Xe;t[253]!==e?(Xe=e("Active WebSocket subscriptions on this shard."),t[253]=e,t[254]=Xe):Xe=t[254];let et;t[255]!==e?(et=e("Inspect row-level-security policies and roles, per table."),t[255]=e,t[256]=et):et=t[256];let tt;t[257]!==e?(tt=e("Inspect and cancel scheduled jobs."),t[257]=e,t[258]=tt):tt=t[258];let st;t[259]!==e?(st=e("Inspect each table and its columns."),t[259]=e,t[260]=st):st=t[260];let at;t[261]!==e?(at=e("Review admin gates, credentials, and log redaction."),t[261]=e,t[262]=at):at=t[262];let ot;t[263]!==e?(ot=e("Read-only deployment config — vars, secrets, and bindings."),t[263]=e,t[264]=ot):ot=t[264];let rt;t[265]!==e?(rt=e("Run read-only SQL against a shard."),t[265]=e,t[266]=rt):rt=t[266];let nt;t[267]!==e?(nt=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[267]=e,t[268]=nt):nt=t[268];let it;t[269]!==e?(it=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[269]=e,t[270]=it):it=t[270];let lt;t[271]!==e?(lt=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[271]=e,t[272]=lt):lt=t[272];let dt;t[273]!==e?(dt=e("Manage auth users — roles, bans, sessions, and identity."),t[273]=e,t[274]=dt):dt=t[274];let ct;t[275]!==e?(ct=e("Browse Vectorize indexes and run similarity searches."),t[275]=e,t[276]=ct):ct=t[276];let ut;t[277]!==e?(ut=e("Inspect declared Cloudflare Workflows and their bindings."),t[277]=e,t[278]=ut):ut=t[278];let yt;t[279]!==tt||t[280]!==st||t[281]!==at||t[282]!==ot||t[283]!==rt||t[284]!==nt||t[285]!==it||t[286]!==lt||t[287]!==dt||t[288]!==ct||t[289]!==ut||t[290]!==ge||t[291]!==be||t[292]!==ve||t[293]!==ye||t[294]!==xe||t[295]!==we||t[296]!==ke||t[297]!==Me||t[298]!==Ne||t[299]!==Se||t[300]!==Ce||t[301]!==Pe||t[302]!==_e||t[303]!==Te||t[304]!==Re||t[305]!==Ae||t[306]!==Le||t[307]!==Ie||t[308]!==Ee||t[309]!==$e||t[310]!==He||t[311]!==Ve||t[312]!==Be||t[313]!==ze||t[314]!==De||t[315]!==Oe||t[316]!==Ze||t[317]!==qe||t[318]!==Fe||t[319]!==We||t[320]!==Ue||t[321]!==je||t[322]!==Ge||t[323]!==Ke||t[324]!==Qe||t[325]!==Ye||t[326]!==Je||t[327]!==Xe||t[328]!==et?(yt={advisorHealth:ge,agents:be,evals:ve,aiUsage:ye,analytics:xe,api:we,audit:ke,authAudit:Me,authConfig:Ne,architecture:Se,authSessions:Ce,containers:Pe,dashboards:_e,data:Te,deploymentHealth:Re,drains:Ae,export:Le,fanout:Ie,files:Ee,flags:$e,functions:He,health:Ve,home:Be,insights:ze,issues:De,logs:Oe,metrics:Ze,migrations:qe,notifications:Fe,organizations:We,pitr:Ue,privacyRequests:je,mail:Ge,payments:Ke,permissions:Qe,queues:Ye,reactors:Je,realtime:Xe,rls:et,schedule:tt,schema:st,security:at,settings:ot,sql:rt,kv:nt,storageRules:it,traces:lt,users:dt,vectors:ct,workflows:ut},t[279]=tt,t[280]=st,t[281]=at,t[282]=ot,t[283]=rt,t[284]=nt,t[285]=it,t[286]=lt,t[287]=dt,t[288]=ct,t[289]=ut,t[290]=ge,t[291]=be,t[292]=ve,t[293]=ye,t[294]=xe,t[295]=we,t[296]=ke,t[297]=Me,t[298]=Ne,t[299]=Se,t[300]=Ce,t[301]=Pe,t[302]=_e,t[303]=Te,t[304]=Re,t[305]=Ae,t[306]=Le,t[307]=Ie,t[308]=Ee,t[309]=$e,t[310]=He,t[311]=Ve,t[312]=Be,t[313]=ze,t[314]=De,t[315]=Oe,t[316]=Ze,t[317]=qe,t[318]=Fe,t[319]=We,t[320]=Ue,t[321]=je,t[322]=Ge,t[323]=Ke,t[324]=Qe,t[325]=Ye,t[326]=Je,t[327]=Xe,t[328]=et,t[329]=yt):yt=t[329];const St=yt;let xt;return t[330]!==Nt||t[331]!==St||t[332]!==Mt?(xt={groupLabel:Nt,tabDescription:St,tabLabel:Mt},t[330]=Nt,t[331]=St,t[332]=Mt,t[333]=xt):xt=t[333],xt},Aa=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),o("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},La=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("circle",{cx:"12",cy:"12",r:"4"}),o("path",{d:"M12 2v2m0 16v2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M2 12h2m16 0h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),t[0]=e):e=t[0],e},Ia=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:o("path",{d:"M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z"})}),t[0]=e):e=t[0],e},Ea=[{Icon:Aa,value:"system"},{Icon:La,value:"light"},{Icon:Ia,value:"dark"}],$a=()=>{const t=M(19),{theme:e,setTheme:s}=qs(),a=se();let r;t[0]!==a?(r=a("Dark theme"),t[0]=a,t[1]=r):r=t[1];let n;t[2]!==a?(n=a("Light theme"),t[2]=a,t[3]=n):n=t[3];let i;t[4]!==a?(i=a("System theme"),t[4]=a,t[5]=i):i=t[5];let l;t[6]!==r||t[7]!==n||t[8]!==i?(l={dark:r,light:n,system:i},t[6]=r,t[7]=n,t[8]=i,t[9]=l):l=t[9];const d=l;let u;t[10]!==a?(u=a("Theme"),t[10]=a,t[11]=u):u=t[11];let c;t[12]!==d||t[13]!==s||t[14]!==e?(c=Ea.map(p=>{const{Icon:f,value:g}=p,y=e===g;return k("button",{"aria-checked":y,"aria-label":d[g],className:_("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",y?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${g}`,onClick:()=>{s(g)},role:"radio",title:d[g],type:"button",children:[y&&o(Is.span,{className:"absolute inset-0 rounded-md border border-muted-foreground/40 bg-background/40",layoutId:"studio-theme-active",transition:{bounce:.1,duration:.45,type:"spring"}}),o("span",{className:"relative",children:o(f,{})})]},g)}),t[12]=d,t[13]=s,t[14]=e,t[15]=c):c=t[15];let m;return t[16]!==u||t[17]!==c?(m=o("div",{"aria-label":u,className:"inline-flex items-center gap-0.5 overflow-hidden rounded-md border border-border bg-muted/60 p-0.5","data-testid":"dash-app-theme",role:"radiogroup",children:c}),t[16]=u,t[17]=c,t[18]=m):m=t[18],m},Ha=t=>{const e=M(23),{domain:s,onOpenCommandPalette:a,page:r}=t,n=se();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o(ha,{className:"-ms-1"}),e[0]=i):i=e[0];let l;e[1]!==n?(l=n("Breadcrumb"),e[1]=n,e[2]=l):l=e[2];let d;e[3]!==s?(d=o("span",{className:"text-muted-foreground",children:s}),e[3]=s,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=o("svg",{"aria-hidden":"true",className:"size-3.5 text-muted-foreground/60",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:o("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=u):u=e[5];let c;e[6]!==r?(c=o("span",{className:"font-medium text-foreground",children:r}),e[6]=r,e[7]=c):c=e[7];let m;e[8]!==l||e[9]!==d||e[10]!==c?(m=k("nav",{"aria-label":l,className:"flex items-center gap-1.5 text-[13px]",children:[d,u,c]}),e[8]=l,e[9]=d,e[10]=c,e[11]=m):m=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=k("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[o("circle",{cx:"11",cy:"11",r:"7"}),o("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=p):p=e[12];let f;e[13]!==n?(f=n("Search…"),e[13]=n,e[14]=f):f=e[14];let g;e[15]===Symbol.for("react.memo_cache_sentinel")?(g=o("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=g):g=e[15];let y;e[16]!==a||e[17]!==f?(y=k("button",{className:"mx-auto hidden h-8 w-72 items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 text-xs text-muted-foreground transition-colors hover:bg-muted md:flex","data-testid":"dash-app-search",onClick:a,type:"button",children:[p,f,g]}),e[16]=a,e[17]=f,e[18]=y):y=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=o("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:o($a,{})}),e[19]=x):x=e[19];let b;return e[20]!==y||e[21]!==m?(b=k("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[i,m,y,x]}),e[20]=y,e[21]=m,e[22]=b):b=e[22],b},Va={agents:{capability:"agents"},analytics:{capability:"analytics",feature:"analytics"},authAudit:{feature:"auth"},authConfig:{feature:"auth"},authSessions:{feature:"auth"},containers:{capability:"containers",feature:"containers"},fanout:{capability:"crossShardFanout"},files:{capability:"objectStorage",feature:"storage"},flags:{feature:"flags"},kv:{capability:"keyValueStore",feature:"kv"},mail:{capability:"mail",feature:"mail"},notifications:{feature:"notifications"},organizations:{feature:"auth"},payments:{feature:"payments"},pitr:{capability:"pointInTimeRecovery"},privacyRequests:{feature:"privacy"},queues:{capability:"queues",feature:"queues"},reactors:{capability:"serverReactors"},schedule:{capability:"scheduler",feature:"scheduler"},storageRules:{feature:"storage"},users:{feature:"auth"},vectors:{capability:"vectorStore",feature:"vectors"},workflows:{capability:"workflows",feature:"workflows"}},Ba={agents:"Durable agents",analytics:"Analytics",containers:"Containers",crossShardFanout:"Cross-shard fan-out",keyValueStore:"Key-value storage",mail:"Mail delivery",objectStorage:"Object storage",pointInTimeRecovery:"Point-in-time recovery",queues:"Queues",scheduler:"Scheduling",serverReactors:"Server reactors",vectorStore:"Vector search",workflows:"Workflows"},za={kind:"hidden"},Bt={kind:"ok"},Da={kind:"pending"},rs=(t,e,s)=>{const a=Va[t];return a?.feature!==void 0&&!e[a.feature]?za:a?.capability===void 0?Bt:e.settled?e.platform?.unsupported.includes(a.capability)===!0?{kind:"unavailable",reason:s("{capability} is not supported on {platform}.",{capability:s(Ba[a.capability]),platform:e.platform.name})}:Bt:Da},Oa=(t,e,s)=>{const a={},r=[];for(const n of t){const i=[];for(const l of n.tabs){const d=rs(l,e,s);d.kind!=="hidden"&&i.push(l),d.kind==="unavailable"&&(a[l]=d.reason)}i.length>0&&r.push({...n,tabs:i})}return{unavailable:a,visibleGroups:r}},Za=t=>{const e=M(3),{reason:s,title:a}=t;let r;return e[0]!==s||e[1]!==a?(r=o(Es,{description:s,testId:"dash-unsupported",title:a}),e[0]=s,e[1]=a,e[2]=r):r=e[2],r},qa=t=>{const e=M(4),{console:s}=$s();let a,r;e[0]!==s||e[1]!==t?(a=()=>{if(t===void 0)return;const n=i=>{if(!i.ctrlKey||i.metaKey||i.altKey||i.shiftKey||i.repeat||i.key.toLowerCase()!==s)return;const{target:l}=i;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(i.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},r=[s,t],e[0]=s,e[1]=t,e[2]=a,e[3]=r):(a=e[2],r=e[3]),mt(a,r)},I=(t,e)=>A(()=>t().then(s=>({default:s[e]}))),Fa=I(()=>import("../packem_chunks/InsightsPanel.mjs"),"InsightsPanel"),Wa=A(()=>import("../packem_chunks/rls-panel.mjs")),Ua=A(()=>import("../packem_chunks/AdvisorHealthPanel.mjs")),ja=A(()=>import("../packem_chunks/SecurityAdvisorPanel.mjs")),Ga=A(()=>import("../packem_chunks/agents-panel.mjs")),Ka=I(()=>import("../packem_chunks/analytics-panel.mjs"),"AnalyticsPanel"),Qa=A(()=>import("../packem_chunks/ApiTab.mjs")),Ya=A(()=>import("../packem_chunks/architecture-panel.mjs")),Ja=A(()=>import("../packem_chunks/auth-audit-panel.mjs")),Xa=A(()=>import("../packem_chunks/auth-config-panel.mjs")),eo=A(()=>import("../packem_chunks/auth-sessions-panel.mjs")),to=A(()=>import("../packem_chunks/organizations-panel.mjs")),so=I(()=>import("../packem_chunks/users-panel.mjs"),"UsersPanel"),ao=A(()=>import("../packem_chunks/containers-panel.mjs")),oo=I(()=>import("../packem_chunks/DeploymentHealthPanel.mjs"),"DeploymentHealthPanel"),ro=I(()=>import("../packem_chunks/TableEditor.mjs"),"TableEditor"),no=I(()=>import("../packem_chunks/ExportImportPanel.mjs"),"ExportImportPanel"),io=A(()=>import("../packem_chunks/migrations-route.mjs")),lo={data:Rs,migrations:Ts},co=I(()=>import("../packem_chunks/PitrPanel.mjs"),"PitrPanel"),uo=I(()=>import("../packem_chunks/privacy-requests-panel.mjs"),"PrivacyRequestsPanel"),fo=A(()=>import("../packem_chunks/flags-panel.mjs")),mo=A(()=>import("../packem_chunks/reactors-panel.mjs")),ho=I(()=>import("../packem_chunks/FunctionRunner.mjs"),"FunctionRunner"),po=I(()=>import("../packem_chunks/FunctionStatsPanel.mjs"),"FunctionStatsPanel"),go=A(()=>import("../packem_chunks/issues-panel.mjs")),bo=I(()=>import("../packem_chunks/AuditPanel.mjs"),"AuditPanel"),vo=A(()=>import("../packem_chunks/log-drains-panel.mjs")),yo=A(()=>import("../packem_chunks/LogsPanel.mjs").then(t=>({default:t.LogsPanel}))),xo=I(()=>import("../packem_chunks/MailPanel.mjs"),"MailPanel"),wo=I(()=>import("../packem_chunks/schedule-panel.mjs"),"SchedulePanel"),ko=A(()=>import("../packem_chunks/subscriptions-panel.mjs")),Mo=A(()=>import("../packem_chunks/sync-client-panel.mjs")),No=I(()=>import("../packem_chunks/kv-browser.mjs"),"KvBrowser"),So=A(()=>import("../packem_chunks/NotificationsPanel.mjs")),Co=I(()=>import("../packem_chunks/payments-panel.mjs"),"PaymentsPanel"),Po=I(()=>import("../packem_chunks/permissions-panel.mjs"),"PermissionsPanel"),_o=A(()=>import("../packem_chunks/queues-panel.mjs")),To=A(()=>import("../packem_chunks/dashboards-panel.mjs")),Ro=A(()=>import("../packem_chunks/fanout-panel.mjs")),Ao=I(()=>import("../packem_chunks/HealthPanel.mjs"),"HealthPanel"),Lo=I(()=>import("../packem_chunks/MetricsPanel.mjs"),"MetricsPanel"),Io=I(()=>import("../packem_chunks/SchemaViewer.mjs"),"SchemaViewer"),Eo=I(()=>import("../packem_chunks/SettingsPanel.mjs"),"SettingsPanel"),$o=I(()=>import("../packem_chunks/SqlEditorPanel.mjs"),"SqlEditorPanel"),Ho=I(()=>import("../packem_chunks/FileBrowser.mjs"),"FileBrowser"),Vo=A(()=>import("../packem_chunks/storage-rules-panel.mjs")),Bo=A(()=>import("../packem_chunks/traces-panel.mjs")),zo=A(()=>import("../packem_chunks/evals-panel.mjs")),Do=A(()=>import("../packem_chunks/ai-usage-panel.mjs")),Oo=I(()=>import("../packem_chunks/vector-browser.mjs"),"VectorBrowser"),Zo=A(()=>import("../packem_chunks/workflows-panel.mjs")),ns=Ot(null),qo={analytics:o("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:o("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),architecture:o("path",{d:"M4 4h6v5H4V4Zm10 0h6v5h-6V4ZM9 15h6v5H9v-5ZM7 9v3h10V9M12 12v3"}),audit:o("path",{d:"M7 4h7l4 4v11a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1Zm6 0v5h5M9 13h6M9 16h6M9 10h2"}),authAudit:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h6"}),authConfig:o("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6h-3.6l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),agents:o("path",{d:"M12 8V5m0 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM6 8h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2Zm3 5h.01M15 13h.01M9 21h6"}),authSessions:o("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:o("path",{d:"M3 7.5 12 3l9 4.5v9L12 21l-9-4.5v-9Zm0 0 9 4.5m0 0 9-4.5m-9 4.5V21"}),dashboards:o("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2 3 4-5"}),drains:o("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:o("path",{d:"M5 6c0-1.4 3.1-2.5 7-2.5s7 1.1 7 2.5-3.1 2.5-7 2.5S5 7.4 5 6Zm0 0v12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5V6M5 12c0 1.4 3.1 2.5 7 2.5s7-1.1 7-2.5"}),export:o("path",{d:"M12 3v11m0 0 4-4m-4 4-4-4M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2"}),fanout:o("path",{d:"M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm-7 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm14 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4ZM12 7v3.5M12 10.5 6 17m6-6.5 6 6.5"}),files:o("path",{d:"M4 7a2 2 0 0 1 2-2h3l2 2.5h7a2 2 0 0 1 2 2V18a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7Z"}),flags:o("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:o("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),evals:o("path",{d:"M4 19V5m0 14h16M8 15l3-4 3 3 4-6M8 15v.01"}),aiUsage:o("path",{d:"M12 3v3m0 12v3M5.6 5.6l2.1 2.1m8.6 8.6 2.1 2.1M3 12h3m12 0h3M5.6 18.4l2.1-2.1m8.6-8.6 2.1-2.1M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6Z"}),health:o("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:o("path",{d:"M3 11.5 12 4l9 7.5M5 10v9a1 1 0 0 0 1 1h4v-6h4v6h4a1 1 0 0 0 1-1v-9"}),insights:o("path",{d:"M12 3a6 6 0 0 0-3.6 10.8c.5.4.8.9.9 1.5l.2 1.2h5l.2-1.2c.1-.6.4-1.1.9-1.5A6 6 0 0 0 12 3ZM9.5 20.5h5M10 18h4"}),issues:o("path",{d:"M10.3 4.3 2.5 18a2 2 0 0 0 1.7 3h15.6a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0ZM12 9v4m0 3v.01"}),kv:o("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:o("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:o("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:o("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:o("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:o("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"}),notifications:o("path",{d:"M15 17h5l-1.4-1.4A2 2 0 0 1 18 14.2V11a6 6 0 0 0-4-5.7V5a2 2 0 1 0-4 0v.3A6 6 0 0 0 6 11v3.2a2 2 0 0 1-.6 1.4L4 17h5m6 0v1a3 3 0 1 1-6 0v-1m6 0H9"}),organizations:o("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8 2.2 2.2L15 9.5M8.5 16h7"}),pitr:o("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),privacyRequests:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-3 8h6m-6 3h4"}),queues:o("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),reactors:o("path",{d:"M4 4v6h6M20 20v-6h-6M20 9a8 8 0 0 0-14.7-3M4 15a8 8 0 0 0 14.7 3"}),realtime:o("path",{d:"M5 12a7 7 0 0 1 14 0M8 12a4 4 0 0 1 8 0M12 12v8m0-8a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"}),rls:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3ZM8.5 10h7M8.5 13h7"}),schedule:o("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:o("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:o("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:o("path",{d:"M7 10V7a5 5 0 0 1 10 0v3m-11 0h12a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1Zm6 4v2"}),advisorHealth:o("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:o("path",{d:"M12 3 5 6v5c0 4.5 3 7.8 7 9 4-1.2 7-4.5 7-9V6l-7-3Zm-2.5 8.5 2 2 4-4"}),traces:o("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:o("path",{d:"M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm7.4-3a7.4 7.4 0 0 0-.1-1.2l2-1.6-2-3.4-2.4 1a7.3 7.3 0 0 0-2-1.2l-.4-2.6H10.5l-.4 2.6a7.3 7.3 0 0 0-2 1.2l-2.4-1-2 3.4 2 1.6a7.4 7.4 0 0 0 0 2.4l-2 1.6 2 3.4 2.4-1a7.3 7.3 0 0 0 2 1.2l.4 2.6h3.6l.4-2.6a7.3 7.3 0 0 0 2-1.2l2.4 1 2-3.4-2-1.6a7.4 7.4 0 0 0 .1-1.2Z"}),users:o("path",{d:"M16 20v-2a4 4 0 0 0-4-4H7a4 4 0 0 0-4 4v2M9.5 10a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm11.5 10v-2a4 4 0 0 0-3-3.85M16 3.13A4 4 0 0 1 16 11"}),vectors:o("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:o("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},zt=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","architecture","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","evals","aiUsage","audit","realtime","reactors","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags","privacyRequests"]},{key:"settings",tabs:["settings"]}],Rt=t=>{const e=M(2),{tab:s}=t,a=qo[s];let r;return e[0]!==a?(r=o("svg",{"aria-hidden":"true",className:"size-4 shrink-0",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:a}),e[0]=a,e[1]=r):r=e[1],r},Fo=t=>t,is=Fo(["home","data","sql","functions","api","architecture","workflows","agents","queues","containers","schema","migrations","vectors","export","pitr","users","organizations","authSessions","authAudit","authConfig","files","storageRules","kv","dashboards","metrics","analytics","health","deploymentHealth","advisorHealth","security","rls","permissions","insights","issues","logs","traces","evals","aiUsage","reactors","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","privacyRequests","settings"]),Wo=new Set(["api","data","migrations","sql"]),Uo=t=>{const e=t.split("/").findLast(Boolean)??"";return is.includes(e)?e:"home"},jo=t=>{const e=M(19),{chrome:s,connected:a}=t,r=se();let n;e[0]!==r?(n=r("admin token"),e[0]=r,e[1]=n):n=e[1];let i;e[2]!==n?(i=o("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:n}),e[2]=n,e[3]=i):i=e[3];let l;e[4]!==s.onTokenChange||e[5]!==s.token?(l=o(Ft,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:s.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:s.token}),e[4]=s.onTokenChange,e[5]=s.token,e[6]=l):l=e[6];let d;e[7]!==a||e[8]!==r?(d=a&&k("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),r("Token rides the WebSocket URL — it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=a,e[8]=r,e[9]=d):d=e[9];let u;e[10]!==s.clearToken||e[11]!==a||e[12]!==r?(u=a&&o("button",{className:"self-start rounded-md border border-border px-2.5 py-1 text-xs font-medium outline-none transition-colors hover:bg-accent focus-visible:bg-accent","data-testid":"dash-app-clear-token",onClick:s.clearToken,type:"button",children:r("Clear")}),e[10]=s.clearToken,e[11]=a,e[12]=r,e[13]=u):u=e[13];let c;return e[14]!==i||e[15]!==l||e[16]!==d||e[17]!==u?(c=k("div",{className:"flex flex-col gap-2",children:[i,l,d,u]}),e[14]=i,e[15]=l,e[16]=d,e[17]=u,e[18]=c):c=e[18],c},ls="opacity-50",Go=t=>{const e=M(27),{current:s,group:a,groupLabel:r,selectTab:n,tabDescription:i,tabLabel:l,unavailable:d}=t,u=a.tabs.includes(s)?"page":void 0,c=r[a.key],m=a.tabs[0];let p;e[0]!==m?(p=o(Rt,{tab:m}),e[0]=m,e[1]=p):p=e[1];let f;e[2]!==u||e[3]!==c||e[4]!==p?(f=o(ts,{"aria-current":u,"aria-label":c,className:"mx-auto flex size-8 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent data-[popup-open]:bg-sidebar-accent data-[popup-open]:text-sidebar-accent-foreground data-[popup-open]:shadow-xs aria-[current=page]:bg-sidebar-accent aria-[current=page]:text-sidebar-accent-foreground aria-[current=page]:shadow-xs",delay:120,openOnHover:!0,children:p}),e[2]=u,e[3]=c,e[4]=p,e[5]=f):f=e[5];const g=r[a.key];let y;e[6]!==g?(y=o("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:g}),e[6]=g,e[7]=y):y=e[7];let x;if(e[8]!==s||e[9]!==a.tabs||e[10]!==n||e[11]!==i||e[12]!==l||e[13]!==d){let h;e[15]!==s||e[16]!==n||e[17]!==i||e[18]!==l||e[19]!==d?(h=w=>k("button",{"aria-current":s===w?"page":void 0,className:_("flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-start text-[13px] text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent aria-[current=page]:bg-accent aria-[current=page]:font-medium [&_svg]:opacity-70 aria-[current=page]:[&_svg]:opacity-100",d[w]!==void 0&&ls),"data-tab":w,"data-testid":`dash-tab-${w}`,"data-unsupported":d[w]===void 0?void 0:"true",onClick:n,title:i[w],type:"button",children:[o(Rt,{tab:w}),o("span",{children:l[w]})]},w),e[15]=s,e[16]=n,e[17]=i,e[18]=l,e[19]=d,e[20]=h):h=e[20],x=a.tabs.map(h),e[8]=s,e[9]=a.tabs,e[10]=n,e[11]=i,e[12]=l,e[13]=d,e[14]=x}else x=e[14];let b;e[21]!==y||e[22]!==x?(b=k(ss,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[y,x]}),e[21]=y,e[22]=x,e[23]=b):b=e[23];let v;return e[24]!==f||e[25]!==b?(v=k(es,{children:[f,b]}),e[24]=f,e[25]=b,e[26]=v):v=e[26],v},Ko=t=>{const e=M(45),{chrome:s,collapsed:a,connected:r}=t,n=se();if(s===null){let h;e[0]!==n?(h=n("Admin"),e[0]=n,e[1]=h):h=e[1];let w;e[2]===Symbol.for("react.memo_cache_sentinel")?(w=o("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=w):w=e[2];let P;e[3]!==n?(P=n("Admin"),e[3]=n,e[4]=P):P=e[4];let C;e[5]!==P?(C=o("span",{className:"truncate text-[13px] font-medium",children:P}),e[5]=P,e[6]=C):C=e[6];let S;e[7]!==n?(S=n("Studio"),e[7]=n,e[8]=S):S=e[8];let N;e[9]!==S?(N=o("span",{className:"truncate text-[11px] text-muted-foreground",children:S}),e[9]=S,e[10]=N):N=e[10];let T;e[11]!==C||e[12]!==N?(T=k("span",{className:"grid flex-1 text-start leading-tight",children:[C,N]}),e[11]=C,e[12]=N,e[13]=T):T=e[13];let R;return e[14]!==h||e[15]!==T?(R=k(os,{className:"data-active:bg-transparent",size:"lg",tooltip:h,children:[w,T]}),e[14]=h,e[15]=T,e[16]=R):R=e[16],R}const i=a?"mx-auto size-8 justify-center":"w-full p-2";let l;e[17]!==i?(l=_("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",i),e[17]=i,e[18]=l):l=e[18];let d;e[19]!==r||e[20]!==n?(d=n(r?"Connected":"Not connected"),e[19]=r,e[20]=n,e[21]=d):d=e[21];const u=r?"bg-success":"bg-muted-foreground/50";let c;e[22]!==u?(c=_("absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full border-2 border-sidebar",u),e[22]=u,e[23]=c):c=e[23];let m;e[24]!==c?(m=k("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",o("span",{"aria-hidden":"true",className:c})]}),e[24]=c,e[25]=m):m=e[25];let p;e[26]!==a||e[27]!==r||e[28]!==n?(p=!a&&k(Zt,{children:[k("span",{className:"grid flex-1 text-start leading-tight",children:[o("span",{className:"truncate text-[13px] font-medium",children:n("Admin")}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:n(r?"Connected":"Not connected")})]}),o("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:o("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=a,e[27]=r,e[28]=n,e[29]=p):p=e[29];let f;e[30]!==l||e[31]!==d||e[32]!==m||e[33]!==p?(f=k(ts,{className:l,"data-testid":"dash-app-connect",title:d,children:[m,p]}),e[30]=l,e[31]=d,e[32]=m,e[33]=p,e[34]=f):f=e[34];const g=a?"end":"start",y=a?"right":"top";let x;e[35]!==s||e[36]!==r?(x=o(jo,{chrome:s,connected:r}),e[35]=s,e[36]=r,e[37]=x):x=e[37];let b;e[38]!==y||e[39]!==x||e[40]!==g?(b=o(ss,{align:g,keepMounted:!0,side:y,children:x}),e[38]=y,e[39]=x,e[40]=g,e[41]=b):b=e[41];let v;return e[42]!==b||e[43]!==f?(v=k(es,{children:[f,b]}),e[42]=b,e[43]=f,e[44]=v):v=e[44],v},Qo=t=>{const e=M(29),{chrome:s,connected:a,current:r,groupLabel:n,groups:i,selectTab:l,tabDescription:d,tabLabel:u,unavailable:c}=t,m=se(),{state:p}=kt(),f=p==="collapsed",g=f&&"justify-center px-0";let y;e[0]!==g?(y=_("flex items-center gap-2.5 px-1.5 py-1",g),e[0]=g,e[1]=y):y=e[1];let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=o(js,{className:"size-9 shrink-0 text-foreground"}),e[2]=x):x=e[2];let b;e[3]!==f||e[4]!==a||e[5]!==m?(b=!f&&k(Zt,{children:[k("span",{className:"grid flex-1 leading-tight",children:[o("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:m("Studio")})]}),o(gt,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:m(a?"Live":"Local")})]}),e[3]=f,e[4]=a,e[5]=m,e[6]=b):b=e[6];let v;e[7]!==y||e[8]!==b?(v=o(ga,{children:k("div",{className:y,children:[x,b]})}),e[7]=y,e[8]=b,e[9]=v):v=e[9];let h;e[10]!==f||e[11]!==r||e[12]!==n||e[13]!==i||e[14]!==l||e[15]!==d||e[16]!==u||e[17]!==c?(h=f?i.map(S=>o(Go,{current:r,group:S,groupLabel:n,selectTab:l,tabDescription:d,tabLabel:u,unavailable:c},S.key)):i.map(S=>k(ya,{children:[o(xa,{className:"text-[11px] font-medium tracking-wider uppercase",children:n[S.key]}),o(wa,{children:o(Ht,{children:S.tabs.map(N=>o(Vt,{children:k(os,{className:_("data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]",c[N]!==void 0&&ls),"data-tab":N,"data-testid":`dash-tab-${N}`,"data-unsupported":c[N]===void 0?void 0:"true",isActive:r===N,onClick:l,title:d[N],tooltip:d[N],children:[o(Rt,{tab:N}),o("span",{children:u[N]})]})},N))})})]},S.key)),e[10]=f,e[11]=r,e[12]=n,e[13]=i,e[14]=l,e[15]=d,e[16]=u,e[17]=c,e[18]=h):h=e[18];let w;e[19]!==h?(w=o(va,{children:h}),e[19]=h,e[20]=w):w=e[20];let P;e[21]!==s||e[22]!==f||e[23]!==a?(P=o(ba,{children:o(Ht,{children:o(Vt,{children:o(Ko,{chrome:s,collapsed:f,connected:a})})})}),e[21]=s,e[22]=f,e[23]=a,e[24]=P):P=e[24];let C;return e[25]!==v||e[26]!==w||e[27]!==P?(C=k(ma,{collapsible:"icon",variant:"inset",children:[v,w,P]}),e[25]=v,e[26]=w,e[27]=P,e[28]=C):C=e[28],C},It=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=k("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[k("div",{className:"flex items-center gap-2",children:[o(Ct,{className:"h-8 w-40"}),o(Ct,{className:"h-8 w-24"})]}),o(Ct,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Yo=t=>{const e=M(5),{title:s,verdict:a}=t;if(a.kind==="pending"){let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=o(It,{}),e[0]=n):n=e[0],n}if(a.kind==="unavailable"){let n;return e[1]!==s||e[2]!==a.reason?(n=o(Za,{reason:a.reason,title:s}),e[1]=s,e[2]=a.reason,e[3]=n):n=e[3],n}let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=o(gs,{}),e[4]=r):r=e[4],r},Jo=()=>{const t=M(46),e=se(),s=Dt();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:or},t[0]=a):a=t[0];const r=ps(a),n=Uo(r),i=Wo.has(n),l=ws(),d=l?.toggle;qa(d);const u=Cs(),{groupLabel:c,tabDescription:m,tabLabel:p}=Ra(),{unavailable:f,visibleGroups:g}=Oa(zt,u,e),y={...m,...f},x=rs(n,u,e),b=x.kind==="hidden";let v,h;t[1]!==b||t[2]!==s?(v=()=>{b&&Tt(s({replace:!0,to:"/home"}))},h=[b,s],t[1]=b,t[2]=s,t[3]=v,t[4]=h):(v=t[3],h=t[4]),mt(v,h);let w;t[5]!==s?(w=Q=>{Tt(s({to:`/${Q.currentTarget.dataset.tab??""}`}))},t[5]=s,t[6]=w):w=t[6];const P=w;let C,S;t[7]!==n||t[8]!==p?(C=()=>{typeof document<"u"&&(document.title=`${p[n]} · lunora`)},S=[n,p],t[7]=n,t[8]=p,t[9]=C,t[10]=S):(C=t[9],S=t[10]),mt(C,S);const N=g.find(Q=>Q.tabs.includes(n))??zt[0],T=g.flatMap(Q=>Q.tabs.filter(X=>f[X]===void 0).map(X=>({group:c[Q.key],label:p[X],to:`/${X}`}))),R=d===void 0?T:[...T,{group:e("Operations"),label:e("Toggle operation console"),run:d}],L=At(ns),O=L!==null&&L.token!=="";let V;t[11]!==R?(V=o(As,{items:R}),t[11]=R,t[12]=V):V=t[12];const B=c[N.key],z=p[n];let $;t[13]!==B||t[14]!==z?($=o(Ha,{domain:B,onOpenCommandPalette:Ls,page:z}),t[13]=B,t[14]=z,t[15]=$):$=t[15];let H;t[16]!==L?.rulesInstalled?(H=L?.rulesInstalled===!1&&o(Qs,{}),t[16]=L?.rulesInstalled,t[17]=H):H=t[17];const D=`dash-tab-${n}`,Z=i?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",E=p[n];let q;t[18]!==e||t[19]!==E?(q=e("{title} failed",{title:E}),t[18]=e,t[19]=E,t[20]=q):q=t[20];const ee=p[n];let F;t[21]!==e?(F=e("Try again"),t[21]=e,t[22]=F):F=t[22];let Y;t[23]===Symbol.for("react.memo_cache_sentinel")?(Y=o(It,{}),t[23]=Y):Y=t[23];const te=p[n];let W;t[24]!==te||t[25]!==x?(W=o(vs,{fallback:Y,children:o(Yo,{title:te,verdict:x})}),t[24]=te,t[25]=x,t[26]=W):W=t[26];let U;t[27]!==n||t[28]!==q||t[29]!==ee||t[30]!==F||t[31]!==W?(U=o(ys,{fallbackTitle:q,label:ee,retryLabel:F,children:W},n),t[27]=n,t[28]=q,t[29]=ee,t[30]=F,t[31]=W,t[32]=U):U=t[32];let j;t[33]!==Z||t[34]!==U?(j=o("div",{className:Z,children:U}),t[33]=Z,t[34]=U,t[35]=j):j=t[35];let G;t[36]!==l?(G=l?.open===!0&&o(Pa,{focusSeq:l.focusSeq,onClose:l.close,onShownChange:l.setShown,shown:l.shown}),t[36]=l,t[37]=G):G=t[37];let K;t[38]!==D||t[39]!==j||t[40]!==G?(K=k("div",{"aria-labelledby":D,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[j,G]}),t[38]=D,t[39]=j,t[40]=G,t[41]=K):K=t[41];let J;return t[42]!==H||t[43]!==K||t[44]!==$?(J=k(pa,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[$,H,K]}),t[42]=H,t[43]=K,t[44]=$,t[45]=J):J=t[45],k(fa,{className:"min-h-0 flex-1","data-platform":u.platform?.id,"data-testid":"lunora-studio",children:[V,o(Qo,{chrome:L,connected:O,current:n,groupLabel:c,groups:g,selectTab:P,tabDescription:y,tabLabel:p,unavailable:f}),J]})},Xo=()=>{const t=M(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o(xs,{children:o(Jo,{})}),t[0]=e):e=t[0],e},er=t=>{const e=M(5),{initialShardKey:s,schemaEditable:a}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const n=ms(r),{table:i}=n,l=typeof i=="string"?i:void 0;let d;return e[1]!==s||e[2]!==l||e[3]!==a?(d=o(Io,{initialShardKey:s,initialTable:l,schemaEditable:a}),e[1]=s,e[2]=l,e[3]=a,e[4]=d):d=e[4],d},tr=()=>{const t=M(3),e=Dt();let s,a;return t[0]!==e?(s=()=>{Tt(e({replace:!0,to:"/home"}))},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),mt(s,a),null},sr=({analyticsSqlQuery:t,basePath:e,privacyRequests:s,dataEditable:a=!1,functions:r,initialShardKey:n,openApiSpec:i,openRpcSpec:l,runAsIdentity:d=!1,schemaEditable:u=!1,scheduledCancel:c,scheduledCron:m,scheduledLoad:p})=>{const f=ds({component:Xo}),g={agents:o(Ga,{initialShardKey:n}),analytics:o(Ka,{runQuery:t}),api:o(Qa,{functions:r,initialShardKey:n,openApiSpec:i,openRpcSpec:l}),architecture:o(Ya,{}),audit:o(bo,{initialShardKey:n}),authAudit:o(Ja,{}),authConfig:o(Xa,{}),authSessions:o(eo,{}),containers:o(ao,{}),dashboards:o(To,{initialShardKey:n}),data:o(ro,{canGenerateRows:a&&u,editable:a,initialShardKey:n}),deploymentHealth:o(oo,{}),drains:o(vo,{}),export:o(no,{initialShardKey:n}),fanout:o(Ro,{initialShardKey:n}),files:o(Ho,{}),kv:o(No,{}),flags:o(fo,{initialShardKey:n}),reactors:o(mo,{initialShardKey:n}),functions:k("div",{className:"flex flex-col gap-8",children:[o(po,{functions:r,initialShardKey:n}),o(ho,{functions:r,runAsIdentity:d})]}),health:o(Ao,{initialShardKey:n}),home:o(Ss,{initialShardKey:n}),insights:o(Fa,{initialShardKey:n}),issues:o(go,{initialShardKey:n}),logs:o(yo,{initialShardKey:n}),traces:o(Bo,{initialShardKey:n}),evals:o(zo,{initialShardKey:n}),aiUsage:o(Do,{initialShardKey:n}),metrics:o(Lo,{initialShardKey:n}),migrations:o(io,{initialShardKey:n}),notifications:o(So,{}),organizations:o(to,{}),permissions:o(Po,{functions:r,runAsIdentity:d,schemaEditable:u}),pitr:o(co,{initialShardKey:n}),privacyRequests:o(uo,{source:s}),mail:o(xo,{}),payments:o(Co,{}),queues:o(_o,{}),realtime:k("div",{className:"flex flex-col gap-8",children:[o(ko,{initialShardKey:n}),o(Mo,{})]}),rls:o(Wa,{}),schedule:o(wo,{loadCronJobs:m,scheduledCancel:c,scheduledLoad:p}),schema:o(er,{initialShardKey:n,schemaEditable:u}),advisorHealth:o(Ua,{}),security:o(ja,{}),settings:o(Eo,{initialShardKey:n}),sql:o($o,{initialShardKey:n}),storageRules:o(Vo,{}),users:o(so,{}),vectors:o(Oo,{}),workflows:o(Zo,{})},y=Et({component:()=>g.home,getParentRoute:()=>f,path:"/"}),x=is.map(h=>Et({component:()=>g[h],getParentRoute:()=>f,path:`/${h}`,validateSearch:lo[h]})),b=f.addChildren([y,...x]),v="window"in globalThis?cs():us({initialEntries:["/home"]});return fs({...e===void 0||e==="/"?{}:{basepath:e},defaultNotFoundComponent:tr,defaultPendingComponent:It,defaultPendingMinMs:0,defaultPendingMs:0,history:v,routeTree:b})},ar=t=>{const e=M(19),{analyticsSqlQuery:s,basePath:a,chrome:r,dataEditable:n,functions:i,initialShardKey:l,openApiSpec:d,openRpcSpec:u,privacyRequests:c,runAsIdentity:m,schemaEditable:p,scheduledCancel:f,scheduledCron:g,scheduledLoad:y}=t;let x;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==i||e[4]!==l||e[5]!==d||e[6]!==u||e[7]!==c||e[8]!==m||e[9]!==f||e[10]!==g||e[11]!==y||e[12]!==p?(x=sr({analyticsSqlQuery:s,basePath:a,privacyRequests:c,dataEditable:n,functions:i,initialShardKey:l,openApiSpec:d,openRpcSpec:u,runAsIdentity:m,schemaEditable:p,scheduledCancel:f,scheduledCron:g,scheduledLoad:y}),e[0]=s,e[1]=a,e[2]=n,e[3]=i,e[4]=l,e[5]=d,e[6]=u,e[7]=c,e[8]=m,e[9]=f,e[10]=g,e[11]=y,e[12]=p,e[13]=x):x=e[13];const b=x,v=r??null;let h;e[14]!==b?(h=o(hs,{router:b}),e[14]=b,e[15]=h):h=e[15];let w;return e[16]!==v||e[17]!==h?(w=o(ns,{value:v,children:h}),e[16]=v,e[17]=h,e[18]=w):w=e[18],w},Hr=t=>{const e=M(10);let s,a,r;e[0]!==t?({i18n:s,locale:a,...r}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=r):(s=e[1],a=e[2],r=e[3]);let n;e[4]!==r?(n=o(Zs,{children:o(ar,{...r})}),e[4]=r,e[5]=n):n=e[5];const i=n;if(s===void 0&&a===void 0)return i;let l;return e[6]!==s||e[7]!==a||e[8]!==i?(l=o(_s,{i18n:s,locale:a,children:i}),e[6]=s,e[7]=a,e[8]=i,e[9]=l):l=e[9],l};function or(t){return t.location.pathname}export{js as B,Hr as S,Os as T,$r as a,Xs as b,sa as c,aa as d,oa as e,qs as u};
@@ -0,0 +1,2 @@
1
+ 'use client';
2
+ import{c as d}from"react/compiler-runtime";import{c as i}from"./utils-bhneXptQ.mjs";import{jsx as r}from"react/jsx-runtime";function f(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("w-full caption-bottom text-xs",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto overflow-y-clip",children:r("table",{"data-slot":"table",className:a,...l})}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function p(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("bg-muted/50 [&_tr]:border-b",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("thead",{"data-slot":"table-header",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function m(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("tbody",{"data-slot":"table-body",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function u(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("border-b transition-colors hover:bg-muted/50 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("tr",{"data-slot":"table-row",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function h(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("h-9 border-e border-border px-3 text-start align-middle font-mono text-[11px] font-medium tracking-wide whitespace-nowrap text-muted-foreground uppercase last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("th",{"data-slot":"table-head",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}function x(o){const e=d(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let a;e[3]!==t?(a=i("border-e border-border px-3 py-1.5 align-middle whitespace-nowrap last:border-e-0 [&:has([role=checkbox])]:pe-0",t),e[3]=t,e[4]=a):a=e[4];let s;return e[5]!==l||e[6]!==a?(s=r("td",{"data-slot":"table-cell",className:a,...l}),e[5]=l,e[6]=a,e[7]=s):s=e[7],s}export{f as T,p as a,u as b,h as c,m as d,x as e};
@@ -0,0 +1 @@
1
+ import{c as $}from"react/compiler-runtime";import{useT as O}from"./DEFAULT_LOCALE-A1Yg5ORA.mjs";import{l as q,f as H,b as Q}from"./internal-BXEjuLPN.mjs";import{jsx as p,jsxs as S}from"react/jsx-runtime";import{useState as E,useRef as D,useMemo as Y}from"react";import{settlePolls as G}from"./DEFAULT_AUTO_REFRESH_MS-DvhNw0BI.mjs";import{u as J}from"./use-mirrored-ref-CVDf2z1M.mjs";import{u as K}from"./use-admin-query-I1uILsUP.mjs";import{ADMIN_FUNCTIONS as Z}from"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import{useVirtualizer as X}from"@tanstack/react-virtual";import{c as ee}from"./utils-bhneXptQ.mjs";import{f as te}from"./virtual-rect-D_j7aLxX.mjs";const re=2166136261,se=16777619,L=(s,e=re)=>{let t=e;for(let r=0;r<s.length;r+=1)t^=s.charCodeAt(r),t=Math.imul(t,se);return(t>>>0).toString(16).padStart(8,"0")},ne=/([a-z\d])([A-Z])/gu,oe=/[\s_-]+/u,le=new Set(["access_token","api_key","apikey","card_number","client_secret","credit_card","cvv","passwd","password","private_key","pwd","refresh_token","secret","ssn","token"]),ae=s=>{const e=s.replaceAll(ne,"$1 $2").split(oe).map(r=>r.toLowerCase()).filter(r=>r.length>0),t=new Set(e);for(let r=0;r<e.length-1;r+=1){const n=e[r],u=e[r+1];n===void 0||u===void 0||(t.add(`${n}${u}`),t.add(`${n}_${u}`))}return[...t]},I="•••",U=(s,e)=>{try{return e==="redact"?null:e==="hash"?s==null?s:L(typeof s=="bigint"?s.toString():typeof s=="string"?s:JSON.stringify(s)):I}catch{return I}},V=(s,e)=>{const t=new Map;for(const r of s)r.table===e&&t.set(r.column,r.strategy);return t},ce=s=>{for(const e of ae(s))if(le.has(e))return!0;return!1},j=(s,e)=>{const t=e.filter(n=>!s.has(n)&&ce(n));if(t.length===0)return s;const r=new Map(s);for(const n of t)r.set(n,"redact");return r},_e=(s,e,t)=>{if(!t.enabled)return s;const r=t.columns.get(e);return r===void 0?s:U(s,r)},ie=(s,e)=>{if(!e.enabled||e.columns.size===0)return s;const t={...s};for(const[r,n]of e.columns)r in t&&(t[r]=U(t[r],n));return t},Me=(s,e)=>!e.enabled||e.columns.size===0?s:s.map(t=>ie(t,e)),z=s=>s==null?"∅":s===""?"(empty)":q(s),ue=s=>{const e=$(32),{column:t,onFacetFilter:r,state:n}=s,u=O();let x;e[0]!==t||e[1]!==r||e[2]!==n.result?.values?(x=c=>{const m=Number(c.currentTarget.dataset.index),k=n.result?.values[m];k!==void 0&&r(t,k.value)},e[0]=t,e[1]=r,e[2]=n.result?.values,e[3]=x):x=e[3];const g=x,o=`db-facet-${t}`;let d;e[4]!==t?(d=p("span",{className:"font-medium text-foreground",children:t}),e[4]=t,e[5]=d):d=e[5];let a;e[6]!==n.loading||e[7]!==n.result||e[8]!==u?(a=n.loading&&n.result===null&&p("span",{className:"text-muted-foreground",children:u("Loading…")}),e[6]=n.loading,e[7]=n.result,e[8]=u,e[9]=a):a=e[9];let l;e[10]!==n.error?(l=n.error!==null&&p("span",{className:"text-destructive",role:"alert",children:n.error}),e[10]=n.error,e[11]=l):l=e[11];let i;e[12]!==n.result?.values?(i=n.result?.values??[],e[12]=n.result?.values,e[13]=i):i=e[13];let f;if(e[14]!==t||e[15]!==g||e[16]!==i){let c;e[18]!==t||e[19]!==g?(c=(m,k)=>S("button",{className:"flex items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground","data-index":k,"data-testid":`db-facet-value-${t}`,onClick:g,type:"button",children:[p("span",{className:"truncate",children:z(m.value)}),p("span",{className:"shrink-0 tabular-nums text-foreground/70",children:m.count})]},z(m.value)),e[18]=t,e[19]=g,e[20]=c):c=e[20],f=i.map(c),e[14]=t,e[15]=g,e[16]=i,e[17]=f}else f=e[17];let b;e[21]!==t||e[22]!==n.result||e[23]!==u?(b=n.result?.truncated===!0&&p("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${t}`,children:u("Showing the {n} most common values.",{n:n.result.values.length})}),e[21]=t,e[22]=n.result,e[23]=u,e[24]=b):b=e[24];let h;return e[25]!==o||e[26]!==d||e[27]!==a||e[28]!==l||e[29]!==f||e[30]!==b?(h=S("section",{className:"flex flex-col gap-1","data-testid":o,children:[d,a,l,f,b]}),e[25]=o,e[26]=d,e[27]=a,e[28]=l,e[29]=f,e[30]=b,e[31]=h):h=e[31],h},Te=s=>{const e=$(44),{columns:t,facets:r,mask:n,onFacetFilter:u,onToggleFacet:x}=s,g=O();let o;e[0]!==x?(o=y=>{const{column:v}=y.currentTarget.dataset;v!==void 0&&x(v)},e[0]=x,e[1]=o):o=e[1];const d=o;let a;e[2]!==n?(a=y=>n.enabled&&n.columns.has(y),e[2]=n,e[3]=a):a=e[3];const l=a;let i,f,b,h,c,m,k,w;if(e[4]!==t||e[5]!==r||e[6]!==l||e[7]!==g||e[8]!==d){w=Symbol.for("react.early_return_sentinel");e:{let y;e[17]!==l?(y=N=>!l(N),e[17]=l,e[18]=y):y=e[18];const v=t.filter(y);let M;if(e[19]!==r||e[20]!==l?(M=Object.entries(r).filter(N=>{const[W]=N;return!l(W)}),e[19]=r,e[20]=l,e[21]=M):M=e[21],i=M,v.length===0){w=null;break e}m="flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs",k="db-facets",h="flex flex-col gap-1.5";let T;e[22]!==g?(T=g("Facets"),e[22]=g,e[23]=T):T=e[23],e[24]!==T?(c=p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:T}),e[24]=T,e[25]=c):c=e[25],f="flex flex-wrap gap-1";let A;e[26]!==r||e[27]!==d?(A=N=>p("button",{"aria-pressed":N in r,className:"rounded border border-border px-1.5 py-0.5 text-muted-foreground transition-colors hover:bg-accent aria-pressed:bg-accent aria-pressed:text-accent-foreground","data-column":N,"data-testid":`db-facet-toggle-${N}`,onClick:d,type:"button",children:N},N),e[26]=r,e[27]=d,e[28]=A):A=e[28],b=v.map(A)}e[4]=t,e[5]=r,e[6]=l,e[7]=g,e[8]=d,e[9]=i,e[10]=f,e[11]=b,e[12]=h,e[13]=c,e[14]=m,e[15]=k,e[16]=w}else i=e[9],f=e[10],b=e[11],h=e[12],c=e[13],m=e[14],k=e[15],w=e[16];if(w!==Symbol.for("react.early_return_sentinel"))return w;let C;e[29]!==f||e[30]!==b?(C=p("div",{className:f,children:b}),e[29]=f,e[30]=b,e[31]=C):C=e[31];let F;e[32]!==C||e[33]!==h||e[34]!==c?(F=S("div",{className:h,children:[c,C]}),e[32]=C,e[33]=h,e[34]=c,e[35]=F):F=e[35];let _;e[36]!==u||e[37]!==i?(_=i.map(y=>{const[v,M]=y;return p(ue,{column:v,onFacetFilter:u,state:M},v)}),e[36]=u,e[37]=i,e[38]=_):_=e[38];let R;return e[39]!==F||e[40]!==_||e[41]!==m||e[42]!==k?(R=S("aside",{className:m,"data-testid":k,children:[F,_]}),e[39]=F,e[40]=_,e[41]=m,e[42]=k,e[43]=R):R=e[43],R},$e=()=>{const[s,e]=E({}),t=J(s),r=D({}),n=async(o,d)=>{const a=(r.current[o]??0)+1;r.current[o]=a,e(l=>o in l?{...l,[o]:{error:null,loading:!0,result:l[o]?.result??null}}:l);try{const l=await d(o);if(r.current[o]!==a)return;e(i=>o in i?{...i,[o]:{error:null,loading:!1,result:l}}:i)}catch(l){if(r.current[o]!==a)return;throw e(i=>o in i?{...i,[o]:{error:Q(l),loading:!1,result:null}}:i),l}};return{clearFacets:()=>{e({})},facets:s,facetsRef:t,refetchFacets:o=>G(Object.keys(t.current).map(d=>n(d,o))),toggleFacet:(o,d)=>{if(o in t.current){e(a=>Object.fromEntries(Object.entries(a).filter(([l])=>l!==o)));return}e(a=>({...a,[o]:{error:null,loading:!0,result:null}})),d!==null&&H(n(o,d))}}},de=[],fe=()=>{const s=$(1);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={},s[0]=e):e=s[0];const{data:t}=K(Z.maskPolicies,e);return Array.isArray(t?.columns)?t.columns:de},Re=s=>{const e=$(16),{columns:t,selectedTable:r}=s,n=fe(),[u,x]=E(!0);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{x(me)},e[0]=g):g=e[0];const o=g;let d;if(e[1]!==t||e[2]!==n||e[3]!==r){const h=V(n,r??"");d=j(h,t),e[1]=t,e[2]=n,e[3]=r,e[4]=d}else d=e[4];const a=d;let l;e[5]!==u||e[6]!==n?(l=(h,c)=>({columns:j(V(n,h),c),enabled:u}),e[5]=u,e[6]=n,e[7]=l):l=e[7];const i=l;let f;e[8]!==a||e[9]!==u?(f={columns:a,enabled:u},e[8]=a,e[9]=u,e[10]=f):f=e[10];let b;return e[11]!==a||e[12]!==u||e[13]!==i||e[14]!==f?(b={maskColumns:a,maskOn:u,maskView:f,maskViewFor:i,onToggleMask:o},e[11]=a,e[12]=u,e[13]=i,e[14]=f,e[15]=b):b=e[15],b};function me(s){return!s}const P=34,B=600,ge=s=>{const e=$(21),{item:t,onSelect:r,prefix:n,selected:u,start:x}=s;let g;e[0]!==t.name||e[1]!==r?(g=()=>{r(t.name)},e[0]=t.name,e[1]=r,e[2]=g):g=e[2];const o=g,d=`translateY(${String(x)}px)`;let a;e[3]!==d?(a={insetInline:0,position:"absolute",top:0,transform:d},e[3]=d,e[4]=a):a=e[4];const l=a,i=u?"bg-accent font-medium text-accent-foreground":"text-foreground";let f;e[5]!==i?(f=ee("flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-start text-sm outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:bg-accent",i),e[5]=i,e[6]=f):f=e[6];const b=`${n}-table-${t.name}`;let h;e[7]!==t.name?(h=p("span",{className:"truncate",children:t.name}),e[7]=t.name,e[8]=h):h=e[8];let c;e[9]!==t.rowCount?(c=p("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:t.rowCount}),e[9]=t.rowCount,e[10]=c):c=e[10];let m;e[11]!==o||e[12]!==u||e[13]!==f||e[14]!==b||e[15]!==h||e[16]!==c?(m=S("button",{"aria-pressed":u,className:f,"data-testid":b,onClick:o,type:"button",children:[h,c]}),e[11]=o,e[12]=u,e[13]=f,e[14]=b,e[15]=h,e[16]=c,e[17]=m):m=e[17];let k;return e[18]!==l||e[19]!==m?(k=p("li",{style:l,children:m}),e[18]=l,e[19]=m,e[20]=k):k=e[20],k},Ae=({header:s,onReload:e,onSelect:t,prefix:r,reloadLabel:n,selected:u,tables:x})=>{const g=O(),[o,d]=E(""),a=D(null),l=c=>{d(c.target.value)},i=Y(()=>{const c=o.trim().toLowerCase();return c===""?x:x.filter(m=>m.name.toLowerCase().includes(c))},[o,x]),b=X({count:i.length,estimateSize:()=>P,getScrollElement:()=>a.current,initialRect:{height:B,width:240},observeElementRect:(c,m)=>te(c,m,B),overscan:12}).getVirtualItems(),h={height:i.length*P};return S("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${r}-table-list`,children:[s,S("div",{className:"flex h-9 shrink-0 items-center justify-between gap-2 border-b border-border px-3",children:[p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:g("Tables")}),e!==void 0&&p("button",{"aria-label":n??g("Refresh"),className:"flex size-6 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:bg-accent","data-testid":`${r}-load-tables`,onClick:e,title:n??g("Refresh"),type:"button",children:p("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:p("path",{d:"M4 12a8 8 0 0 1 13.7-5.6L20 8M20 4v4h-4M20 12a8 8 0 0 1-13.7 5.6L4 16m0 4v-4h4"})})})]}),p("div",{className:"shrink-0 border-b border-border p-2",children:p("input",{className:"h-7 w-full rounded-md border border-border bg-background px-2 text-xs outline-none placeholder:text-muted-foreground focus-visible:border-ring","data-testid":`${r}-table-search`,onChange:l,placeholder:g("search table…"),type:"search",value:o})}),S("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${r}-table-list-rows`,ref:a,children:[p("li",{"aria-hidden":"true",style:h}),b.map(c=>{const m=i[c.index];return m===void 0?null:p(ge,{item:m,onSelect:t,prefix:r,selected:u===m.name,start:c.start},m.name)})]})]})};export{Te as D,Ae as T,Re as a,ie as b,Me as c,_e as m,$e as u};
@@ -0,0 +1 @@
1
+ import{c as n}from"react/compiler-runtime";import{c as s}from"./utils-bhneXptQ.mjs";import{jsx as o}from"react/jsx-runtime";function b(d){const e=n(8);let i,r;e[0]!==d?({className:i,...r}=d,e[0]=d,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=s("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-2.5 py-2 text-xs transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-1 aria-invalid:ring-destructive/20 md:text-xs dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=o("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{b as T};
@@ -0,0 +1 @@
1
+ import{a as n,s as a}from"./browser-storage-BH1MxLZs.mjs";const t="lunora:traces:pending-filter",i=e=>{a(t,e,"session")},c=()=>{const e=n("session");if(e!==void 0)try{const s=e.getItem(t);if(s===null)return;const r=JSON.parse(s);return typeof r.traceId!="string"?void 0:{traceId:r.traceId,...typeof r.shardKey=="string"?{shardKey:r.shardKey}:{}}}catch{return}},d=()=>{try{n("session")?.removeItem(t)}catch{}};export{d as c,c as p,i as w};
@@ -0,0 +1 @@
1
+ import{c as $}from"react/compiler-runtime";import{useLunora as w}from"@lunora/react";import{useQueryClient as k,useQuery as L,keepPreviousData as P}from"@tanstack/react-query";import{useState as Q,useEffect as T}from"react";import{c as b,d as v,f as I,b as _}from"./internal-BXEjuLPN.mjs";const S=300,c=e=>typeof e=="string"?e===""?void 0:e:typeof e=="number"||typeof e=="boolean"?String(e):void 0,u=e=>e.filter(t=>t!==void 0).join(" "),q=e=>{const t=Array.isArray(e.filters)?e.filters.length:0,r=typeof e.search=="string"&&e.search!=="";return t===0&&!r?"no predicate":u([t===0?void 0:`${String(t)} filters`,r?"search":void 0])},C={clearTable:e=>u([c(e.table),"whole table"]),deleteRows:e=>u([c(e.table),q(e)]),facetColumn:e=>u([c(e.table),c(e.column)]),importShard:e=>{if(!Array.isArray(e.rows))return"";const t=[...new Set(e.rows.filter(r=>typeof r=="object"&&r!==null).map(r=>r.table).filter(r=>typeof r=="string"))].toSorted((r,i)=>r.localeCompare(i));return u([`${String(e.rows.length)} rows`,t.length===0?void 0:`into ${t.join(", ")}`])},lintSql:()=>"sql",patchRows:e=>u([c(e.table),typeof e.doc=="object"&&e.doc!==null?`set ${Object.keys(e.doc).join(", ")}`:void 0,q(e)]),pitrRestore:e=>u([c(e.time)===void 0?void 0:`to ${String(e.time)}`,typeof e.bookmark=="string"&&e.bookmark!==""?"from bookmark":void 0,e.restart===!0?"restart now":void 0]),readTablePage:e=>u([c(e.table),Array.isArray(e.filters)&&e.filters.length>0?`${String(e.filters.length)} filters`:void 0,typeof e.search=="string"&&e.search!==""?"search":void 0,typeof e.limit=="number"?`limit ${String(e.limit)}`:void 0]),runMigration:e=>u([c(e.id),c(e.direction),e.dryRun===!0?"dry-run":void 0]),runSql:e=>typeof e.sql=="string"?`${String(e.sql.length)} chars`:"",schemaVersion:e=>typeof e.hash=="string"?e.hash.slice(0,8):"",writeRow:e=>u([c(e.table),"1 row"])},A="__lunora_admin__:",M=(e,t)=>{const r=e.startsWith(A)?e.slice(A.length):e,i=C[r];if(i!==void 0)return i(t);const s=Object.keys(t);return s.length===0?"":s.join(", ")},K=e=>{if(Array.isArray(e))return e.length;if(!(typeof e!="object"||e===null)){for(const t of Object.values(e))if(Array.isArray(t))return t.length}};class x{entries=[];listeners=new Set;nextSeq=1;getSnapshot=()=>this.entries;subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});start(t,r,i){return this.append(t,r,i,"call","pending")}startSubscription(t,r,i){return this.append(t,r,i,"subscription","live")}recordPush(t){if(this.listeners.size===0){const r=this.entries.find(i=>i.seq===t);r!==void 0&&(r.pushes=(r.pushes??0)+1);return}this.patch(t,r=>({...r,pushes:(r.pushes??0)+1}))}failSubscription(t,r){this.patch(t,i=>({...i,error:r,status:"error"}))}endSubscription(t){this.patch(t,r=>r.status==="error"?r:{...r,durationMs:Date.now()-r.startedAt,status:"closed"})}lastErrorSeq(){return this.entries.findLast(t=>t.status==="error")?.seq}settle(t,r){this.patch(t,i=>({...i,durationMs:Date.now()-i.startedAt,...r.error===void 0?{resultCount:K(r.result),status:"ok"}:{error:r.error,status:"error"}}))}clear(){this.entries=[],this.emit()}append(t,r,i,s,n){const l=this.nextSeq;this.nextSeq+=1;const d={functionPath:t,kind:s,seq:l,shardKey:i,startedAt:Date.now(),status:n,summary:M(t,r),...s==="subscription"?{pushes:0}:{}},o=[...this.entries,d];return this.entries=o.length>S?o.slice(o.length-S):o,this.emit(),l}patch(t,r){const i=this.entries.findIndex(s=>s.seq===t);i!==-1&&(this.entries=this.entries.with(i,r(this.entries[i])),this.emit())}emit(){for(const t of this.listeners)t()}}const f=new x,E=(e,t,r)=>["lunora-admin",e,t,r.trim()],j=(e,t)=>[...e,t];function F(e,t,r={}){const i=w(),{enabled:s=!0,keepPreviousData:n=!1,staleTime:l=0}=r,d=j(e,i.clientIdentifier()),a=L({enabled:s,queryFn:t,placeholderData:n?P:void 0,queryKey:d,staleTime:l});return{data:a.data,error:a.error?_(a.error):a.error,errorSource:a.error??void 0,isLoading:a.isLoading,liveError:void 0,refetch:()=>{I(a.refetch())},poll:async()=>{await a.refetch({throwOnError:!0})}}}function U(e,t,r={}){const i=w(),s=k(),{enabled:n=!0,keepPreviousData:l=!1,live:d=!1,shardKey:o="",staleTime:a}=r,p=E(e,t,o),O=F(p,()=>i.query(b(e),t,v(o)),{enabled:n,keepPreviousData:l,staleTime:a??(d?Number.POSITIVE_INFINITY:0)}),[R,y]=Q(void 0),g=JSON.stringify(p);return T(()=>{if(!n||!d)return;y(void 0);const m=f.startSubscription(e,t,o),D=i.subscribe(b(e),t,h=>{f.recordPush(m),y(void 0),s.setQueryData(j(p,i.clientIdentifier()),h)},{...v(o),onError:h=>{f.failSubscription(m,h.message),y(h.message)}});return()=>{f.endSubscription(m),D()}},[i,g,n,d]),{...O,liveError:n&&d?R:void 0}}const W=()=>{const e=$(2),t=k();let r;return e[0]!==t?(r=(i,s,n)=>{const l=s===void 0?["lunora-admin",i]:E(i,s,n??"");I(t.invalidateQueries({queryKey:l}))},e[0]=t,e[1]=r):r=e[1],r};export{W as a,F as b,f as o,U as u};
@@ -0,0 +1 @@
1
+ import{c as b}from"react/compiler-runtime";import{useState as k,useEffectEvent as E,useEffect as F}from"react";import{b as x}from"./internal-BXEjuLPN.mjs";const $=function(e,l,r){const t=b(15);let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={kind:"loading"},t[0]=s):s=t[0];const[h,v]=k(s);let f;t[1]!==l?(f=async()=>l(),t[1]=l,t[2]=f):f=t[2];const g=E(f);let m;t[3]!==r?(m=o=>r(o),t[3]=r,t[4]=m):m=t[4];const n=E(m);let u;t[5]!==n||t[6]!==g||t[7]!==e?(u=()=>{if(e!==void 0)return;let o=!1;return g().then(c=>(o||v(n(c)),c)).catch(c=>{o||v({kind:"error",message:x(c)})}),()=>{o=!0}},t[5]=n,t[6]=g,t[7]=e,t[8]=u):u=t[8];let d;t[9]!==e?(d=[e],t[9]=e,t[10]=d):d=t[10],F(u,d);let a;return t[11]!==r||t[12]!==h||t[13]!==e?(a=e===void 0?h:r(e),t[11]=r,t[12]=h,t[13]=e,t[14]=a):a=t[14],a};export{$ as u};
@@ -0,0 +1 @@
1
+ import{c as m}from"react/compiler-runtime";import{useState as a}from"react";import{f as i,b as y}from"./internal-BXEjuLPN.mjs";const g=()=>{const r=m(4),[s,n]=a(!1),[o,c]=a(null);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e=u=>{i((async()=>{n(!0),c(null);try{await u()}catch(f){c(y(f))}n(!1)})())},r[0]=e):e=r[0];const l=e;let t;return r[1]!==s||r[2]!==o?(t={busy:s,error:o,run:l},r[1]=s,r[2]=o,r[3]=t):t=r[3],t};export{g as u};
@@ -0,0 +1 @@
1
+ import{c as f}from"react/compiler-runtime";import{useLunora as c}from"@lunora/react";import{b as u}from"./use-admin-query-I1uILsUP.mjs";const m={capabilities:{accounts:!0,admin:!0,inviteOnly:!1,organization:!1,passkey:!1,twoFactor:!1},emailAndPassword:!1,organization:{enabled:!1,roles:!1,teams:!1},plugins:[],rateLimit:{enabled:!1},session:{},socialProviders:[],userFields:[]},b=()=>{const e=f(6),o=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=["lunora-auth-config"],e[0]=s):s=e[0];let t;e[1]!==o?(t=()=>o.getAuthConfig(),e[1]=o,e[2]=t):t=e[2];const{data:l,isLoading:r}=u(s,t),i=l??m,n=!r;let a;return e[3]!==i||e[4]!==n?(a={config:i,ready:n},e[3]=i,e[4]=n,e[5]=a):a=e[5],a};export{b as u};
@@ -0,0 +1 @@
1
+ import{c as o}from"react/compiler-runtime";import{useRef as s,useEffect as c}from"react";function m(r){const e=o(2),f=s(r);let t;return e[0]!==r?(t=()=>{f.current=r},e[0]=r,e[1]=t):t=e[1],c(t),f}export{m as u};
@@ -0,0 +1 @@
1
+ import{c as n}from"react/compiler-runtime";import{useNavigate as a}from"@tanstack/react-router";import{f as m}from"./internal-BXEjuLPN.mjs";import{w as s}from"./trace-handoff-BV3EWqy_.mjs";const u=r=>{const t=n(3),o=a();let e;return t[0]!==o||t[1]!==r?(e=i=>{s({shardKey:r,traceId:i}),m(o({to:"/traces"}))},t[0]=o,t[1]=r,t[2]=e):e=t[2],e};export{u};
@@ -0,0 +1 @@
1
+ import{useState as n,useRef as S,useEffect as a}from"react";const f=(e,s=400)=>{const t=(e??"").trim(),[o,u]=n(t),[y,c]=n(t),d=S(e);d.current!==e&&(d.current=e,u(t),c(t));const m=o.trim();return a(()=>{const r=setTimeout(()=>{c(m)},s);return()=>{clearTimeout(r)}},[m,s]),{queryShardKey:y,setShardKey:r=>{u(r)},shardKey:o}};export{f as u};
@@ -0,0 +1 @@
1
+ import{useLunora as h}from"@lunora/react";import{useState as c}from"react";import{u as T}from"./use-admin-query-I1uILsUP.mjs";import{ADMIN_FUNCTIONS as s}from"./ADMIN_FUNCTIONS-B8yyk5BX.mjs";import{d,c as l}from"./internal-BXEjuLPN.mjs";const S={},_=l(s.aiGenerateSql),b=l(s.aiTableFilter),C=l(s.aiChartConfig),Q=n=>{const o=h(),[v,u]=c({}),[m,g]=c({}),p=T(s.aiAvailable,S,{shardKey:n}),[y,q]=c(!1),A=y||p.data?.available===!1,i=e=>{u(r=>({...r,[e]:!0})),g(r=>({...r,[e]:void 0}))},a=(e,r)=>{u(t=>({...t,[e]:!1})),r!==void 0&&g(t=>({...t,[e]:r})),r==="no-ai-binding"&&q(!0)},f=async e=>{i("sql");try{const{result:r}=await o.query(_,e,d(n));return a("sql",r.degraded?r.reason:void 0),r.degraded?void 0:r.sql}catch{a("sql","ai-error");return}};return{generate:async(e,r)=>f({failedError:r?.error,failedSql:r?.sql,prompt:e}),inferChart:async e=>{i("chart");try{const{result:r}=await o.query(C,e,d(n));return a("chart",r.degraded?r.reason:void 0),r.degraded?void 0:r.chart}catch{a("chart","ai-error");return}},pending:e=>v[e]===!0,reason:e=>m[e],rewrite:async(e,r)=>f({editSql:r,prompt:e}),suggestFilter:async(e,r)=>{i("filter");try{const{result:t}=await o.query(b,{prompt:e,table:r},d(n));return a("filter",t.degraded?t.reason:void 0),t.degraded?void 0:t.clauses}catch{a("filter","ai-error");return}},unavailable:A}};export{Q as u};
@@ -0,0 +1 @@
1
+ import{c as p}from"react/compiler-runtime";import{useState as f,useEffect as D}from"react";const T=function(t,n,o){const e=p(4),s=n===void 0?300:n,[r,i]=f(t),[u,m]=f(o);o!==void 0&&o!==u&&(m(o),i(t));let c,d;return e[0]!==s||e[1]!==t?(c=()=>{const b=setTimeout(()=>{i(t)},s);return()=>{clearTimeout(b)}},d=[t,s],e[0]=s,e[1]=t,e[2]=c,e[3]=d):(c=e[2],d=e[3]),D(c,d),r};export{T as default};
@@ -0,0 +1 @@
1
+ import{clsx as o}from"clsx";import{twMerge as t}from"tailwind-merge";function m(...r){return t(o(r))}export{m as c};
@@ -0,0 +1 @@
1
+ import{observeElementRect as i}from"@tanstack/react-virtual";const s=(t,o,h)=>i(t,e=>{o(e.height>0?e:{height:h,width:e.width})});export{s as f};
@@ -0,0 +1 @@
1
+ import{a as f}from"./chunk-2IKDEUCX.js";import{a as u,d as x,f as h,g as N}from"./chunk-I26MS5PJ.js";var b=x(h(),1);var t=x(N(),1);var v=u(g=>{let e=(0,b.c)(16),{chart:c,footer:n,label:i,testId:m,value:p}=g,r;e[0]!==i?(r=(0,t.jsx)("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:i}),e[0]=i,e[1]=r):r=e[1];let a;e[2]!==m||e[3]!==p?(a=(0,t.jsx)("span",{className:"truncate text-2xl font-semibold tabular-nums text-foreground","data-testid":m,children:p}),e[2]=m,e[3]=p,e[4]=a):a=e[4];let s;e[5]!==c||e[6]!==a?(s=(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[a,c]}),e[5]=c,e[6]=a,e[7]=s):s=e[7];let l;e[8]!==r||e[9]!==s?(l=(0,t.jsxs)("div",{className:"flex flex-col gap-2.5 p-4",children:[r,s]}),e[8]=r,e[9]=s,e[10]=l):l=e[10];let o;e[11]!==n?(o=n!=null&&(0,t.jsx)("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==l||e[14]!==o?(d=(0,t.jsxs)(f,{className:"justify-between gap-0 py-0",children:[l,o]}),e[13]=l,e[14]=o,e[15]=d):d=e[15],d},"j");export{v as a};
@@ -0,0 +1 @@
1
+ import{a as i}from"./chunk-I26MS5PJ.js";var u=i(r=>{let a=0,e=0,o=0,c=0,t=0,n=0,l=0;for(let{metrics:s}of r){if(s===null){t+=1;continue}c+=1,a+=s.requests,e+=s.errors,o+=s.databaseSize??0,s.cache&&(n+=s.cache.hits,l+=s.cache.hits+s.cache.misses)}return{failed:t,hitRate:l===0?null:n/l,reachable:c,totalDatabaseSize:o,totalErrors:e,totalRequests:a}},"i"),h=i((r,a)=>{let e=new Set,o=[];for(let c of["",r.trim(),...a])e.has(c)||(e.add(c),o.push(c));return o},"u"),f=i(r=>{let a=r,e=[],o=0;for(let t of a.functions??[])t.calls>0&&(e.push({avg:t.totalDurationMs/t.calls,calls:t.calls}),o+=t.calls);e.sort((t,n)=>t.avg-n.avg);let c=i(t=>{let n=Math.ceil(t/100*o),l=0;for(let s of e)if(l+=s.calls,l>=n)return s.avg;return e.at(-1)?.avg??0},"c");return{p90:c(90),p95:c(95)}},"h"),g=i(r=>r.map(a=>({...a,avgDurationMs:a.execCount>0?a.totalDurationMs/a.execCount:0})),"f");export{u as a,h as b,f as c,g as d};
@@ -0,0 +1 @@
1
+ import{a as o,d as n,f as m,g as u,i as c}from"./chunk-I26MS5PJ.js";var l=n(m(),1);var i=n(u(),1);function f({className:d,size:a="default",...t}){return(0,i.jsx)("div",{"data-slot":"card","data-size":a,className:c("group/card flex flex-col gap-4 overflow-hidden rounded-xl border border-border bg-card py-4 text-xs/relaxed text-card-foreground shadow-xs has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-2 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-md *:[img:last-child]:rounded-md",d),...t})}o(f,"p");function x(d){let a=(0,l.c)(8),t,e;a[0]!==d?({className:t,...e}=d,a[0]=d,a[1]=t,a[2]=e):(t=a[1],e=a[2]);let r;a[3]!==t?(r=c("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-md px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",t),a[3]=t,a[4]=r):r=a[4];let s;return a[5]!==e||a[6]!==r?(s=(0,i.jsx)("div",{"data-slot":"card-header",className:r,...e}),a[5]=e,a[6]=r,a[7]=s):s=a[7],s}o(x,"f");function g(d){let a=(0,l.c)(8),t,e;a[0]!==d?({className:t,...e}=d,a[0]=d,a[1]=t,a[2]=e):(t=a[1],e=a[2]);let r;a[3]!==t?(r=c("font-heading text-sm font-medium group-data-[size=sm]/card:text-sm",t),a[3]=t,a[4]=r):r=a[4];let s;return a[5]!==e||a[6]!==r?(s=(0,i.jsx)("div",{"data-slot":"card-title",className:r,...e}),a[5]=e,a[6]=r,a[7]=s):s=a[7],s}o(g,"u");function h(d){let a=(0,l.c)(8),t,e;a[0]!==d?({className:t,...e}=d,a[0]=d,a[1]=t,a[2]=e):(t=a[1],e=a[2]);let r;a[3]!==t?(r=c("text-xs/relaxed text-muted-foreground",t),a[3]=t,a[4]=r):r=a[4];let s;return a[5]!==e||a[6]!==r?(s=(0,i.jsx)("div",{"data-slot":"card-description",className:r,...e}),a[5]=e,a[6]=r,a[7]=s):s=a[7],s}o(h,"x");function b(d){let a=(0,l.c)(8),t,e;a[0]!==d?({className:t,...e}=d,a[0]=d,a[1]=t,a[2]=e):(t=a[1],e=a[2]);let r;a[3]!==t?(r=c("px-4 group-data-[size=sm]/card:px-3",t),a[3]=t,a[4]=r):r=a[4];let s;return a[5]!==e||a[6]!==r?(s=(0,i.jsx)("div",{"data-slot":"card-content",className:r,...e}),a[5]=e,a[6]=r,a[7]=s):s=a[7],s}o(b,"g");export{f as a,x as b,g as c,h as d,b as e};