@lunora/studio 1.0.0-alpha.113 → 1.0.0-alpha.115

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 (153) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/mount.js +1 -1
  3. package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
  4. package/dist/packem_chunks/ApiTab.js +1 -1
  5. package/dist/packem_chunks/AuditPanel.js +1 -1
  6. package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
  7. package/dist/packem_chunks/ExportImportPanel.js +1 -1
  8. package/dist/packem_chunks/FileBrowser.js +1 -1
  9. package/dist/packem_chunks/FunctionRunner.js +1 -1
  10. package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
  11. package/dist/packem_chunks/HealthPanel.js +1 -1
  12. package/dist/packem_chunks/InsightsPanel.js +1 -1
  13. package/dist/packem_chunks/LogsPanel.js +1 -1
  14. package/dist/packem_chunks/MailPanel.js +1 -1
  15. package/dist/packem_chunks/MetricsPanel.js +1 -1
  16. package/dist/packem_chunks/NotificationsPanel.js +1 -1
  17. package/dist/packem_chunks/PitrPanel.js +1 -1
  18. package/dist/packem_chunks/SchemaViewer.js +1 -1
  19. package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
  20. package/dist/packem_chunks/SettingsPanel.js +1 -1
  21. package/dist/packem_chunks/SqlEditorPanel.js +1 -1
  22. package/dist/packem_chunks/TableEditor.js +1 -1
  23. package/dist/packem_chunks/agents-panel.js +1 -1
  24. package/dist/packem_chunks/analytics-panel.js +1 -1
  25. package/dist/packem_chunks/auth-audit-panel.js +1 -1
  26. package/dist/packem_chunks/auth-config-panel.js +1 -1
  27. package/dist/packem_chunks/auth-sessions-panel.js +1 -1
  28. package/dist/packem_chunks/containers-panel.js +1 -1
  29. package/dist/packem_chunks/dashboards-panel.js +1 -1
  30. package/dist/packem_chunks/evals-panel.js +1 -1
  31. package/dist/packem_chunks/fanout-panel.js +1 -1
  32. package/dist/packem_chunks/flags-panel.js +1 -1
  33. package/dist/packem_chunks/issues-panel.js +1 -1
  34. package/dist/packem_chunks/kv-browser.js +1 -1
  35. package/dist/packem_chunks/log-drains-panel.js +1 -1
  36. package/dist/packem_chunks/migrations-route.js +1 -1
  37. package/dist/packem_chunks/organizations-panel.js +1 -1
  38. package/dist/packem_chunks/payments-panel.js +1 -1
  39. package/dist/packem_chunks/permissions-panel.js +1 -1
  40. package/dist/packem_chunks/queues-panel.js +1 -1
  41. package/dist/packem_chunks/rls-panel.js +1 -1
  42. package/dist/packem_chunks/schedule-panel.js +1 -1
  43. package/dist/packem_chunks/storage-rules-panel.js +1 -1
  44. package/dist/packem_chunks/subscriptions-panel.js +1 -1
  45. package/dist/packem_chunks/sync-client-panel.js +1 -1
  46. package/dist/packem_chunks/traces-panel.js +1 -1
  47. package/dist/packem_chunks/users-panel.js +1 -1
  48. package/dist/packem_chunks/vector-browser.js +1 -1
  49. package/dist/packem_chunks/workflows-panel.js +1 -1
  50. package/dist/packem_shared/{ApiDocsPanel-BL5lMig5.js → ApiDocsPanel-C_dZt4ve.js} +1 -1
  51. package/dist/packem_shared/{ApiReferencePanel-CkCFMCBb.js → ApiReferencePanel-6W_QfOlv.js} +1 -1
  52. package/dist/packem_shared/{CommandPalette-B5yLEABs.js → CommandPalette-BAiOc1hT.js} +1 -1
  53. package/dist/packem_shared/{DataBrowser-BnDIFN-S.js → DataBrowser-CrkvQAMf.js} +1 -1
  54. package/dist/packem_shared/{GlobalDataBrowser-DusjXzRF.js → GlobalDataBrowser-BHFgEqMl.js} +1 -1
  55. package/dist/packem_shared/{HomePanel-BcaHVBJh.js → HomePanel-B8U_LJkK.js} +1 -1
  56. package/dist/packem_shared/{MigrationsPanel-CCOENX4X.js → MigrationsPanel-CW4MNUa4.js} +1 -1
  57. package/dist/packem_shared/{OpenRpcReferencePanel-21OWMH45.js → OpenRpcReferencePanel-Cx-qwpZW.js} +1 -1
  58. package/dist/packem_shared/{ScheduledJobs-CiO3eXgI.js → ScheduledJobs-DRmOKtDa.js} +1 -1
  59. package/dist/packem_shared/Studio-k_HuJZYW.js +1 -0
  60. package/dist/packem_shared/{StudioApp-DCdbsciH.js → StudioApp-CWpwayvp.js} +1 -1
  61. package/dist/packem_shared/{advisor-view-C1KFTXSH.js → advisor-view-CqCG22DB.js} +1 -1
  62. package/dist/packem_shared/{data-grid-BFTQnkXq.js → data-grid-pjv4t5Yi.js} +1 -1
  63. package/dist/packem_shared/{error-alert-TYdKetJd.js → error-alert-CKqB2CiN.js} +1 -1
  64. package/dist/packem_shared/{grid-features-C_yXlMc_.js → grid-features-3wfN2PeE.js} +4 -4
  65. package/dist/packem_shared/{home-panel-BiJHXeDC.js → home-panel-DywiFhDs.js} +1 -1
  66. package/dist/packem_shared/{internal-CwaF9YNk.js → internal-7bgd8inO.js} +1 -1
  67. package/dist/packem_shared/{log-line-UnE93Ovi.js → log-line-D0XBZaDn.js} +1 -1
  68. package/dist/packem_shared/{recording-client-CKn4-vUx.js → recording-client-BPY8sYUl.js} +1 -1
  69. package/dist/packem_shared/{reference-view-CUIDzLf0.js → reference-view-DhxnzBtf.js} +1 -1
  70. package/dist/packem_shared/{result-chart-Ca3YLzt8.js → result-chart-Q-gVLi4_.js} +1 -1
  71. package/dist/packem_shared/{schema-diagram-DHD13TjS.js → schema-diagram-CPcjPZj3.js} +1 -1
  72. package/dist/packem_shared/{studio-B3eEcBK0.js → studio-BFvT56qK.js} +1 -1
  73. package/dist/packem_shared/{table-list-sidebar-Bluzd1_2.js → table-list-sidebar-BCxqrZ0s.js} +1 -1
  74. package/dist/packem_shared/{use-admin-query-P0RJrjsD.js → use-admin-query-DV9xmFl8.js} +1 -1
  75. package/dist/packem_shared/{use-async-submit-DdLd0MdK.js → use-async-submit-C9xXjXWX.js} +1 -1
  76. package/dist/packem_shared/{use-auth-config-z3KRWAqD.js → use-auth-config-DIAyVsa3.js} +1 -1
  77. package/dist/packem_shared/{use-open-trace-4tIa0SXZ.js → use-open-trace-IfIlKEWd.js} +1 -1
  78. package/dist/packem_shared/{use-sql-assistant-CP90nLLh.js → use-sql-assistant-DFO2i-n-.js} +1 -1
  79. package/dist/standalone/chunk-22WJHOC4.js +11 -0
  80. package/dist/standalone/{chunk-ZN6KUP3O.js → chunk-2CHFHPR3.js} +1 -1
  81. package/dist/standalone/{chunk-OG57FC7W.js → chunk-2EJQ7SPV.js} +1 -1
  82. package/dist/standalone/{chunk-FSWPREH3.js → chunk-2Q7HAFRK.js} +1 -1
  83. package/dist/standalone/{chunk-44WNSIGQ.js → chunk-2UIT2HC2.js} +1 -1
  84. package/dist/standalone/{chunk-YUWMB6EV.js → chunk-2UWKGSEA.js} +1 -1
  85. package/dist/standalone/{chunk-ZQLIKKIY.js → chunk-3IXTF53Q.js} +1 -1
  86. package/dist/standalone/{chunk-J6MNOKO5.js → chunk-44FJEOAY.js} +1 -1
  87. package/dist/standalone/{chunk-26VREVWU.js → chunk-5XMZP64Z.js} +1 -1
  88. package/dist/standalone/{chunk-45YWYMD5.js → chunk-6MRGARL5.js} +1 -1
  89. package/dist/standalone/{chunk-3F5I435D.js → chunk-6UOC4ZJL.js} +1 -1
  90. package/dist/standalone/{chunk-FBAZHG35.js → chunk-6ZSAMAYN.js} +1 -1
  91. package/dist/standalone/{chunk-BORG7WUC.js → chunk-7IQT5M4O.js} +1 -1
  92. package/dist/standalone/{chunk-KQIHXYE6.js → chunk-7TFEJVX4.js} +1 -1
  93. package/dist/standalone/{chunk-3QB5JI32.js → chunk-7W6TQTW7.js} +1 -1
  94. package/dist/standalone/{chunk-4MAJFNON.js → chunk-A7WKYEQ4.js} +1 -1
  95. package/dist/standalone/chunk-AG265V66.js +1 -0
  96. package/dist/standalone/{chunk-6SAAMM4S.js → chunk-BE76GAFE.js} +1 -1
  97. package/dist/standalone/{chunk-6ZPTNC34.js → chunk-BKM6PMSO.js} +1 -1
  98. package/dist/standalone/{chunk-D7DUQS2Y.js → chunk-CE7WVPLK.js} +1 -1
  99. package/dist/standalone/{chunk-MSFUDXBA.js → chunk-D4HJ2VM2.js} +1 -1
  100. package/dist/standalone/{chunk-FLCK2WWQ.js → chunk-DC5AAWSA.js} +1 -1
  101. package/dist/standalone/{chunk-6NJAHOGO.js → chunk-DEGERMXH.js} +1 -1
  102. package/dist/standalone/{chunk-JURAVSE7.js → chunk-E6P2ERQV.js} +1 -1
  103. package/dist/standalone/{chunk-TLPWZ5NI.js → chunk-EQSVW6LZ.js} +1 -1
  104. package/dist/standalone/{chunk-T2LDA6WP.js → chunk-FCEPVFIJ.js} +1 -1
  105. package/dist/standalone/chunk-FEEZPSMA.js +1 -0
  106. package/dist/standalone/{chunk-25OIGX2A.js → chunk-FEW2WNS7.js} +1 -1
  107. package/dist/standalone/{chunk-KFZ37KQP.js → chunk-FRSTZO5P.js} +1 -1
  108. package/dist/standalone/{chunk-X6Q5DWLZ.js → chunk-GKHUQDVI.js} +1 -1
  109. package/dist/standalone/{chunk-SL5R7WBN.js → chunk-H2WBIULE.js} +1 -1
  110. package/dist/standalone/{chunk-WIG3HCUJ.js → chunk-H3M57MCN.js} +1 -1
  111. package/dist/standalone/{chunk-UIF57LBO.js → chunk-H4SLAZAN.js} +1 -1
  112. package/dist/standalone/{chunk-6FWN26RH.js → chunk-HLEXBOCL.js} +1 -1
  113. package/dist/standalone/{chunk-QZ55OWAB.js → chunk-HLHO5AHK.js} +1 -1
  114. package/dist/standalone/{chunk-MOUI44OT.js → chunk-INLHZKCS.js} +1 -1
  115. package/dist/standalone/{chunk-L7CJ5PGH.js → chunk-JACBQWRB.js} +1 -1
  116. package/dist/standalone/{chunk-YS7HEZC2.js → chunk-KEMHRM53.js} +1 -1
  117. package/dist/standalone/{chunk-GIRZD3UB.js → chunk-KOH52XKG.js} +1 -1
  118. package/dist/standalone/{chunk-C5E5PLJT.js → chunk-LDVDE3LE.js} +1 -1
  119. package/dist/standalone/{chunk-3RYEUXY2.js → chunk-LFEDP3Y6.js} +1 -1
  120. package/dist/standalone/{chunk-V6QPVFDL.js → chunk-MG7VPUFA.js} +1 -1
  121. package/dist/standalone/{chunk-OE4KGVJW.js → chunk-MLYZZD5C.js} +1 -1
  122. package/dist/standalone/{chunk-WHRG6S5P.js → chunk-NSR345ID.js} +1 -1
  123. package/dist/standalone/{chunk-IWNVQHF7.js → chunk-OAXOITHK.js} +1 -1
  124. package/dist/standalone/chunk-OQS4HFKC.js +1 -0
  125. package/dist/standalone/{chunk-XGIG4EDG.js → chunk-OTZRXUHF.js} +1 -1
  126. package/dist/standalone/{chunk-PJDKRUWT.js → chunk-PNLUMMXO.js} +1 -1
  127. package/dist/standalone/{chunk-AOE75NAT.js → chunk-Q2G22JHG.js} +1 -1
  128. package/dist/standalone/{chunk-BELLXCN7.js → chunk-RUIWLLAI.js} +1 -1
  129. package/dist/standalone/{chunk-S77D4SHR.js → chunk-RVQRXKRJ.js} +1 -1
  130. package/dist/standalone/{chunk-JVAYDDMK.js → chunk-SCXAZ74Y.js} +1 -1
  131. package/dist/standalone/{chunk-2DC6F7NH.js → chunk-SLOB2B2T.js} +1 -1
  132. package/dist/standalone/{chunk-LT4XQDD2.js → chunk-SM764GPA.js} +1 -1
  133. package/dist/standalone/{chunk-5T7KRUPX.js → chunk-U2KBAKZ6.js} +1 -1
  134. package/dist/standalone/chunk-U7J3LXJ4.js +6 -0
  135. package/dist/standalone/{chunk-KEKIGANB.js → chunk-UCA5MYCL.js} +1 -1
  136. package/dist/standalone/{chunk-GPP4VSUO.js → chunk-UJXKS27L.js} +1 -1
  137. package/dist/standalone/{chunk-C7E4I7JZ.js → chunk-UKIDHICQ.js} +1 -1
  138. package/dist/standalone/{chunk-5NRQIDQA.js → chunk-V2KCESII.js} +1 -1
  139. package/dist/standalone/{chunk-OOBJFXYB.js → chunk-W5CYX66B.js} +1 -1
  140. package/dist/standalone/{chunk-2BDM6HNL.js → chunk-WSNFV7ZW.js} +1 -1
  141. package/dist/standalone/{chunk-OLQWBGKT.js → chunk-YYFHDYYT.js} +1 -1
  142. package/dist/standalone/{chunk-PHHMPYEP.js → chunk-ZHDCWHRT.js} +1 -1
  143. package/dist/standalone/{chunk-CEPMQS24.js → chunk-ZIHYXKQJ.js} +1 -1
  144. package/dist/standalone/{chunk-DL3UOEWN.js → chunk-ZIYO55T2.js} +1 -1
  145. package/dist/standalone/{chunk-6JGXSMKV.js → chunk-ZNNKKJRT.js} +1 -1
  146. package/dist/standalone/studio.js +1 -1
  147. package/package.json +5 -5
  148. package/dist/packem_shared/Studio-CHmLCjBR.js +0 -1
  149. package/dist/standalone/chunk-GZMBMNL3.js +0 -6
  150. package/dist/standalone/chunk-RBUVNO22.js +0 -1
  151. package/dist/standalone/chunk-SMKRXJUC.js +0 -1
  152. package/dist/standalone/chunk-T6HLABZW.js +0 -1
  153. package/dist/standalone/chunk-TBXK3FKP.js +0 -11
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{c as k}from"react/compiler-runtime";import{createRootRoute as Xt,createRoute as St,createBrowserHistory as es,createMemoryHistory as ts,createRouter as ss,useNavigate as At,useSearch as as,RouterProvider as os,useRouterState as ns,Outlet as rs}from"@tanstack/react-router";import*as ot from"react";import{use as Nt,createContext as Et,useState as lt,useEffect as nt,useSyncExternalStore as ls,lazy as A,Suspense as is}from"react";import{c as L}from"./utils-bhneXptQ.js";import{jsx as o,jsxs as w,Fragment as Rt}from"react/jsx-runtime";import{ErrorBoundary as ds}from"./ErrorBoundary-BWNF98VF.js";import{O as cs,u as us}from"./operation-console-provider-DoloEvon.js";import{useT as ee}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{LunoraError as It}from"@lunora/errors";import{B as it}from"./badge-cAk9Di1Q.js";import{I as $t}from"./input-CY5W3wzv.js";import{Popover as rt}from"@base-ui/react/popover";import{Cancel01Icon as ms,SidebarLeftIcon as fs}from"@hugeicons/core-free-icons";import{HugeiconsIcon as Ht}from"@hugeicons/react";import{mergeProps as Bt}from"@base-ui/react/merge-props";import{useRender as zt}from"@base-ui/react/use-render";import{cva as hs}from"class-variance-authority";import{B as Vt}from"./button-BOPLD1un.js";import{Dialog as se}from"@base-ui/react/dialog";import{Tooltip as te}from"@base-ui/react/tooltip";import{S as vt}from"./skeleton-DFBBaJU6.js";import{H as ps,u as gs}from"./home-panel-BiJHXeDC.js";import{g as bs,f as wt}from"./internal-CwaF9YNk.js";import{o as ft}from"./use-admin-query-P0RJrjsD.js";import{StudioI18nProvider as vs}from"./StudioI18nProvider-Bl547evf.js";import{v as xs,a as ys}from"./data-view-params-qoSTqjAj.js";import{CommandPalette as ws,openCommandPalette as ks}from"./CommandPalette-B5yLEABs.js";import{motion as Ns}from"motion/react";const Dt="(prefers-color-scheme: dark)",Ot=()=>{try{return globalThis.localStorage}catch{return}},Ms=t=>t==="system"||t==="light"||t==="dark",Zt=()=>globalThis.matchMedia,Ft="lunora-studio-theme",xt=["system","light","dark"],Ss=(t="system")=>{try{const e=Ot()?.getItem(Ft);return Ms(e)?e:t}catch{return t}},Ct=t=>{const e=Ot();if(e!==void 0)try{e.setItem(Ft,t)}catch{}},Cs=()=>{try{return Zt()?.(Dt).matches?"dark":"light"}catch{return"light"}},Ps=(t,e)=>t==="system"?e:t,_s=t=>{let e;try{e=Zt()?.(Dt)}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)}},Mt=Et(null),Ts=({children:t,defaultTheme:e="system"})=>{const[s,a]=lt(()=>Ss(e)),[n,r]=lt(()=>Cs());nt(()=>_s(r),[]);const l=u=>{Ct(u),a(u)},d={cycleTheme:()=>{a(u=>{const c=xt[(xt.indexOf(u)+1)%xt.length]??u;return Ct(c),c})},resolvedTheme:Ps(s,n),setTheme:l,systemTheme:n,theme:s};return o(Mt,{value:d,children:t})},Ls=t=>{const e=k(3),{children:s}=t,a=Nt(Mt);let n;return e[0]!==s||e[1]!==a?(n=a===null?o(Ts,{children:s}):s,e[0]=s,e[1]=a,e[2]=n):n=e[2],n},As=()=>{const t=Nt(Mt);if(t===null)throw new It("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function fn({delay:t=0,...e}){return o(te.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function Es(t){const e=k(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(te.Root,{"data-slot":"tooltip",...s}),e[2]=s,e[3]=a):a=e[3],a}function Rs(t){const e=k(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(te.Trigger,{"data-slot":"tooltip-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Is({className:t,side:e="top",sideOffset:s=4,align:a="center",alignOffset:n=0,children:r,...l}){return o(te.Portal,{children:o(te.Positioner,{align:a,alignOffset:n,side:e,sideOffset:s,className:"isolate z-50",children:w(te.Popup,{"data-slot":"tooltip-content",className:L("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),...l,children:[r,o(te.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 $s=t=>{const e=k(5),{className:s}=t;let a;e[0]!==s?(a=L("h-full w-full text-foreground",s),e[0]=s,e[1]=a):a=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=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]=n):n=e[2];let r;return e[3]!==a?(r=o("svg",{"aria-hidden":"true",className:a,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=a,e[4]=r):r=e[4],r},qt="lunora.studio.rulesBannerDismissed",Hs=()=>{try{return globalThis.localStorage.getItem(qt)==="1"}catch{return!1}},Bs=()=>{try{globalThis.localStorage.setItem(qt,"1")}catch{}},zs=()=>{const t=k(18),e=ee(),[s,a]=lt(Vs);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{a(!0),Bs()},t[0]=n):n=t[0];const r=n;if(s)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=l):l=t[1];let i;t[2]!==e?(i=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=i):i=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]!==i||t[8]!==u?(c=w("span",{children:[i," ",d," ",u]}),t[7]=i,t[8]=u,t[9]=c):c=t[9];let f;t[10]!==e?(f=e("Dismiss"),t[10]=e,t[11]=f):f=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 m;t[13]!==f?(m=o("button",{"aria-label":f,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:r,type:"button",children:p}),t[13]=f,t[14]=m):m=t[14];let h;return t[15]!==c||t[16]!==m?(h=w("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:[l,c,m]}),t[15]=c,t[16]=m,t[17]=h):h=t[17],h};function Vs(){return Hs()}function Wt(t){const e=k(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(rt.Root,{"data-slot":"popover",...s}),e[2]=s,e[3]=a):a=e[3],a}function jt(t){const e=k(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(rt.Trigger,{"data-slot":"popover-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ut({align:t="end",alignOffset:e=0,className:s,keepMounted:a=!1,side:n="bottom",sideOffset:r=6,...l}){return o(rt.Portal,{keepMounted:a,children:o(rt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:r,children:o(rt.Popup,{className:L("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",...l})})})}const yt=768;function Ds(){const t=k(2),[e,s]=lt(void 0);let a,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const r=globalThis.matchMedia(`(max-width: ${yt-1}px)`),l=()=>{s(globalThis.innerWidth<yt)};return r.addEventListener("change",l),s(globalThis.innerWidth<yt),()=>{r.removeEventListener("change",l)}},n=[],t[0]=a,t[1]=n):(a=t[0],n=t[1]),nt(a,n),!!e}function Os(t){const e=k(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(se.Root,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=k(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(se.Portal,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Fs(t){const e=k(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 n;e[3]!==s?(n=L("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]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Backdrop,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function qs({className:t,children:e,side:s="right",showCloseButton:a=!0,...n}){return w(Zs,{children:[o(Fs,{}),w(se.Popup,{"data-slot":"sheet-content","data-side":s,className:L("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),...n,children:[e,a&&w(se.Close,{"data-slot":"sheet-close",render:o(Vt,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[o(Ht,{icon:ms,strokeWidth:2}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function Ws(t){const e=k(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 n;e[3]!==s?(n=L("flex flex-col gap-0.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sheet-header",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function js(t){const e=k(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 n;e[3]!==s?(n=L("text-sm font-medium text-foreground",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Title,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function Us(t){const e=k(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 n;e[3]!==s?(n=L("text-xs/relaxed text-muted-foreground",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Description,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}const Gs="sidebar_state",Ks=3600*24*7,Qs="16rem",Ys="18rem",Js="3rem",Xs="b",Gt=ot.createContext(null);function ht(){const t=ot.useContext(Gt);if(!t)throw new It("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function ea({defaultOpen:t=!0,open:e,onOpenChange:s,className:a,style:n,children:r,...l}){const i=Ds(),[d,u]=ot.useState(!1),[c,f]=ot.useState(t),p=e??c,m=x=>{const y=typeof x=="function"?x(p):x;s?s(y):f(y),document.cookie=`${Gs}=${y}; path=/; max-age=${Ks}`},h=()=>i?u(x=>!x):m(x=>!x),b=ot.useEffectEvent(()=>{h()});ot.useEffect(()=>{const x=y=>{y.key===Xs&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b())};return globalThis.addEventListener("keydown",x),()=>globalThis.removeEventListener("keydown",x)},[]);const g={state:p?"expanded":"collapsed",open:p,setOpen:m,isMobile:i,openMobile:d,setOpenMobile:u,toggleSidebar:h};return o(Gt.Provider,{value:g,children:o("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Qs,"--sidebar-width-icon":Js,...n},className:L("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...l,children:r})})}function ta({side:t="left",variant:e="sidebar",collapsible:s="offcanvas",className:a,children:n,dir:r,...l}){const{isMobile:i,state:d,openMobile:u,setOpenMobile:c}=ht();return s==="none"?o("div",{"data-slot":"sidebar",className:L("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...l,children:n}):i?o(Os,{open:u,onOpenChange:c,...l,children:w(qs,{dir:r,"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":Ys},side:t,children:[w(Ws,{className:"sr-only",children:[o(js,{children:"Sidebar"}),o(Us,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:n})]})}):w("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:L("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:L("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),...l,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:n})})]})}function sa(t){const e=k(15);let s,a,n;e[0]!==t?({className:s,onClick:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);const{toggleSidebar:r}=ht();let l;e[4]!==s?(l=L(s),e[4]=s,e[5]=l):l=e[5];let i;e[6]!==a||e[7]!==r?(i=f=>{a?.(f),r()},e[6]=a,e[7]=r,e[8]=i):i=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=o(Ht,{icon:fs,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]!==n||e[12]!==l||e[13]!==i?(c=w(Vt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:i,...n,children:[d,u]}),e[11]=n,e[12]=l,e[13]=i,e[14]=c):c=e[14],c}function aa(t){const e=k(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 n;e[3]!==s?(n=L("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]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("main",{"data-slot":"sidebar-inset",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function oa(t){const e=k(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 n;e[3]!==s?(n=L("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function na(t){const e=k(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 n;e[3]!==s?(n=L("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function ra(t){const e=k(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 n;e[3]!==s?(n=L("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]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function la(t){const e=k(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 n;e[3]!==s?(n=L("relative flex w-full min-w-0 flex-col p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function ia(t){const e=k(10);let s,a,n,r;if(e[0]!==t){const{className:d,render:u,...c}=t;s=u,r=zt,a="div",n=Bt({className:L("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]=n,e[4]=r}else s=e[1],a=e[2],n=e[3],r=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==a||e[8]!==n?(i={defaultTagName:a,props:n,render:s,state:l},e[6]=s,e[7]=a,e[8]=n,e[9]=i):i=e[9],r(i)}function da(t){const e=k(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 n;e[3]!==s?(n=L("w-full text-xs",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function Pt(t){const e=k(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 n;e[3]!==s?(n=L("flex w-full min-w-0 flex-col gap-0",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function _t(t){const e=k(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 n;e[3]!==s?(n=L("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}const ca=hs("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 Kt({render:t,isActive:e=!1,variant:s="default",size:a="default",tooltip:n,className:r,...l}){const{isMobile:i,state:d}=ht(),u=zt({defaultTagName:"button",props:Bt({className:L(ca({variant:s,size:a}),r)},l),render:n?o(Rs,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:e}});return n?(typeof n=="string"&&(n={children:n}),w(Es,{children:[u,o(Is,{side:"right",align:"center",hidden:d!=="collapsed"||i,...n})]})):u}const ua=t=>t.replace("__lunora_admin__:",""),ma=()=>ls(ft.subscribe,ft.getSnapshot,ft.getSnapshot),fa=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",ha=t=>{const e=k(56),{entry:s,focused:a}=t,n=ee();let r;e[0]!==a?(r=$=>{$!==null&&a&&$.scrollIntoView({block:"nearest"})},e[0]=a,e[1]=r):r=e[1];const l=r;let i;e[2]!==s.functionPath||e[3]!==s.shardKey||e[4]!==s.summary?(i=()=>{bs(`${s.functionPath} ${s.summary}${s.shardKey===""?"":` (shard ${s.shardKey})`}`)},e[2]=s.functionPath,e[3]=s.shardKey,e[4]=s.summary,e[5]=i):i=e[5];const d=i,u=a&&"bg-accent ring-1 ring-inset ring-primary/40";let c;e[6]!==u?(c=L("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=c):c=e[7];let f;e[8]!==s.status?(f=fa(s.status),e[8]=s.status,e[9]=f):f=e[9];const p=s.status==="pending"?"…":s.status;let m;e[10]!==f||e[11]!==p?(m=o(it,{className:"mt-px shrink-0",variant:f,children:p}),e[10]=f,e[11]=p,e[12]=m):m=e[12];let h;e[13]!==s.functionPath?(h=ua(s.functionPath),e[13]=s.functionPath,e[14]=h):h=e[14];let b;e[15]!==h?(b=o("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:h}),e[15]=h,e[16]=b):b=e[16];let v;e[17]!==s.kind||e[18]!==n?(v=s.kind==="subscription"&&o(it,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=s.kind,e[18]=n,e[19]=v):v=e[19];let g;e[20]!==s.summary?(g=s.summary!==""&&o("span",{className:"min-w-0 truncate text-muted-foreground",children:s.summary}),e[20]=s.summary,e[21]=g):g=e[21];let x;e[22]!==s.shardKey?(x=s.shardKey!==""&&o("span",{className:"font-mono",children:s.shardKey}),e[22]=s.shardKey,e[23]=x):x=e[23];let y;e[24]!==s.resultCount||e[25]!==n?(y=s.resultCount!==void 0&&o("span",{children:n("{count} rows",{count:s.resultCount})}),e[24]=s.resultCount,e[25]=n,e[26]=y):y=e[26];let M;e[27]!==s.pushes||e[28]!==n?(M=s.pushes!==void 0&&s.pushes>0&&o("span",{children:n("{count} pushes",{count:s.pushes})}),e[27]=s.pushes,e[28]=n,e[29]=M):M=e[29];let C;e[30]!==s.durationMs?(C=s.durationMs!==void 0&&w("span",{children:[s.durationMs,"ms"]}),e[30]=s.durationMs,e[31]=C):C=e[31];let P;e[32]!==n?(P=n("Copy"),e[32]=n,e[33]=P):P=e[33];let N;e[34]!==d||e[35]!==P?(N=o("button",{"aria-label":P,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]=P,e[36]=N):N=e[36];let _;e[37]!==x||e[38]!==y||e[39]!==M||e[40]!==C||e[41]!==N?(_=w("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[x,y,M,C,N]}),e[37]=x,e[38]=y,e[39]=M,e[40]=C,e[41]=N,e[42]=_):_=e[42];let S;e[43]!==v||e[44]!==g||e[45]!==_||e[46]!==m||e[47]!==b?(S=w("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[m,b,v,g,_]}),e[43]=v,e[44]=g,e[45]=_,e[46]=m,e[47]=b,e[48]=S):S=e[48];let T;e[49]!==s.error?(T=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]=T):T=e[50];let E;return e[51]!==l||e[52]!==S||e[53]!==T||e[54]!==c?(E=w("li",{className:c,"data-testid":"oc-row",ref:l,children:[S,T]}),e[51]=l,e[52]=S,e[53]=T,e[54]=c,e[55]=E):E=e[55],E},pa=t=>{const e=k(62),{focusSeq:s,onClose:a,onShownChange:n,shown:r}=t,l=ee(),i=ma(),[d,u]=lt("");let c;if(e[0]!==i||e[1]!==s||e[2]!==d||e[3]!==a||e[4]!==n||e[5]!==r||e[6]!==l){const f=d.trim().toLowerCase(),p=i.filter(R=>(r==="errors"?R.status==="error":!0)&&(f===""||`${R.functionPath} ${R.summary} ${R.shardKey}`.toLowerCase().includes(f))).toReversed();let m;e[8]!==i?(m=i.filter(ga),e[8]=i,e[9]=m):m=e[9];const h=m.length;let b;e[10]!==l?(b=l("Operation console"),e[10]=l,e[11]=b):b=e[11];let v;e[12]!==l?(v=l("Operation console"),e[12]=l,e[13]=v):v=e[13];let g;e[14]!==v?(g=o("span",{className:"text-xs font-medium",children:v}),e[14]=v,e[15]=g):g=e[15];let x;e[16]!==i.length||e[17]!==l?(x=l("{count} calls",{count:i.length}),e[16]=i.length,e[17]=l,e[18]=x):x=e[18];let y;e[19]!==x?(y=o(it,{variant:"secondary",children:x}),e[19]=x,e[20]=y):y=e[20];let M;e[21]!==h||e[22]!==l?(M=h>0&&o(it,{variant:"destructive",children:l("{count} failed",{count:h})}),e[21]=h,e[22]=l,e[23]=M):M=e[23];const C=r==="errors",P=r==="errors"&&"bg-accent";let N;e[24]!==P?(N=L("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",P),e[24]=P,e[25]=N):N=e[25];let _;e[26]!==n||e[27]!==r?(_=()=>{n(r==="errors"?"all":"errors")},e[26]=n,e[27]=r,e[28]=_):_=e[28];let S;e[29]!==l?(S=l("Errors"),e[29]=l,e[30]=S):S=e[30];let T;e[31]!==N||e[32]!==_||e[33]!==S||e[34]!==C?(T=o("button",{"aria-pressed":C,className:N,"data-testid":"oc-filter-errors",onClick:_,type:"button",children:S}),e[31]=N,e[32]=_,e[33]=S,e[34]=C,e[35]=T):T=e[35];let E;e[36]!==l?(E=l("Filter"),e[36]=l,e[37]=E):E=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=R=>{u(R.target.value)},e[38]=$):$=e[38];let z;e[39]!==l?(z=l("Filter"),e[39]=l,e[40]=z):z=e[40];let V;e[41]!==d||e[42]!==E||e[43]!==z?(V=o($t,{"aria-label":E,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:$,placeholder:z,value:d}),e[41]=d,e[42]=E,e[43]=z,e[44]=V):V=e[44];let H;e[45]!==l?(H=l("Clear"),e[45]=l,e[46]=H):H=e[46];let B;e[47]!==H?(B=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:ba,type:"button",children:H}),e[47]=H,e[48]=B):B=e[48];let D;e[49]!==l?(D=l("Hide"),e[49]=l,e[50]=D):D=e[50];let O;e[51]!==a||e[52]!==D?(O=o("button",{"aria-label":D,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]=D,e[53]=O):O=e[53];let F;e[54]!==T||e[55]!==V||e[56]!==B||e[57]!==O||e[58]!==g||e[59]!==y||e[60]!==M?(F=w("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[g,y,M,T,V,B,O]}),e[54]=T,e[55]=V,e[56]=B,e[57]=O,e[58]=g,e[59]=y,e[60]=M,e[61]=F):F=e[61],c=w("section",{"aria-label":b,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[F,p.length===0?o("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("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(R=>o(ha,{entry:R,focused:R.seq===s},R.seq))})]}),e[0]=i,e[1]=s,e[2]=d,e[3]=a,e[4]=n,e[5]=r,e[6]=l,e[7]=c}else c=e[7];return c};function ga(t){return t.status==="error"}function ba(){ft.clear()}const va=()=>{const t=k(310),e=ee();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 n;t[4]!==e?(n=e("Evals"),t[4]=e,t[5]=n):n=t[5];let r;t[6]!==e?(r=e("Analytics"),t[6]=e,t[7]=r):r=t[7];let l;t[8]!==e?(l=e("API"),t[8]=e,t[9]=l):l=t[9];let i;t[10]!==e?(i=e("Audit"),t[10]=e,t[11]=i):i=t[11];let d;t[12]!==e?(d=e("Auth audit"),t[12]=e,t[13]=d):d=t[13];let u;t[14]!==e?(u=e("Configuration"),t[14]=e,t[15]=u):u=t[15];let c;t[16]!==e?(c=e("Sessions"),t[16]=e,t[17]=c):c=t[17];let f;t[18]!==e?(f=e("Containers"),t[18]=e,t[19]=f):f=t[19];let p;t[20]!==e?(p=e("Dashboards"),t[20]=e,t[21]=p):p=t[21];let m;t[22]!==e?(m=e("Data"),t[22]=e,t[23]=m):m=t[23];let h;t[24]!==e?(h=e("Deployment health"),t[24]=e,t[25]=h):h=t[25];let b;t[26]!==e?(b=e("Log drains"),t[26]=e,t[27]=b):b=t[27];let v;t[28]!==e?(v=e("Export / Import"),t[28]=e,t[29]=v):v=t[29];let g;t[30]!==e?(g=e("Fan-out"),t[30]=e,t[31]=g):g=t[31];let x;t[32]!==e?(x=e("Files"),t[32]=e,t[33]=x):x=t[33];let y;t[34]!==e?(y=e("Flags"),t[34]=e,t[35]=y):y=t[35];let M;t[36]!==e?(M=e("Functions"),t[36]=e,t[37]=M):M=t[37];let C;t[38]!==e?(C=e("Health"),t[38]=e,t[39]=C):C=t[39];let P;t[40]!==e?(P=e("Home"),t[40]=e,t[41]=P):P=t[41];let N;t[42]!==e?(N=e("Performance"),t[42]=e,t[43]=N):N=t[43];let _;t[44]!==e?(_=e("Issues"),t[44]=e,t[45]=_):_=t[45];let S;t[46]!==e?(S=e("KV"),t[46]=e,t[47]=S):S=t[47];let T;t[48]!==e?(T=e("Logs"),t[48]=e,t[49]=T):T=t[49];let E;t[50]!==e?(E=e("Metrics"),t[50]=e,t[51]=E):E=t[51];let $;t[52]!==e?($=e("Migrations"),t[52]=e,t[53]=$):$=t[53];let z;t[54]!==e?(z=e("Notifications"),t[54]=e,t[55]=z):z=t[55];let V;t[56]!==e?(V=e("Organizations"),t[56]=e,t[57]=V):V=t[57];let H;t[58]!==e?(H=e("Time Travel"),t[58]=e,t[59]=H):H=t[59];let B;t[60]!==e?(B=e("Mail"),t[60]=e,t[61]=B):B=t[61];let D;t[62]!==e?(D=e("Payments"),t[62]=e,t[63]=D):D=t[63];let O;t[64]!==e?(O=e("Permissions"),t[64]=e,t[65]=O):O=t[65];let F;t[66]!==e?(F=e("Queues"),t[66]=e,t[67]=F):F=t[67];let R;t[68]!==e?(R=e("Realtime"),t[68]=e,t[69]=R):R=t[69];let X;t[70]!==e?(X=e("RLS Policies"),t[70]=e,t[71]=X):X=t[71];let q;t[72]!==e?(q=e("Scheduled"),t[72]=e,t[73]=q):q=t[73];let Q;t[74]!==e?(Q=e("Schema"),t[74]=e,t[75]=Q):Q=t[75];let W;t[76]!==e?(W=e("Security"),t[76]=e,t[77]=W):W=t[77];let j;t[78]!==e?(j=e("Settings"),t[78]=e,t[79]=j):j=t[79];let U;t[80]!==e?(U=e("SQL editor"),t[80]=e,t[81]=U):U=t[81];let G;t[82]!==e?(G=e("Traces"),t[82]=e,t[83]=G):G=t[83];let K;t[84]!==e?(K=e("Access Rules"),t[84]=e,t[85]=K):K=t[85];let Y;t[86]!==e?(Y=e("Users"),t[86]=e,t[87]=Y):Y=t[87];let Z;t[88]!==e?(Z=e("Vectors"),t[88]=e,t[89]=Z):Z=t[89];let J;t[90]!==e?(J=e("Workflows"),t[90]=e,t[91]=J):J=t[91];let dt;t[92]!==s||t[93]!==a||t[94]!==p||t[95]!==m||t[96]!==h||t[97]!==b||t[98]!==v||t[99]!==g||t[100]!==x||t[101]!==y||t[102]!==M||t[103]!==C||t[104]!==n||t[105]!==P||t[106]!==N||t[107]!==_||t[108]!==S||t[109]!==T||t[110]!==E||t[111]!==$||t[112]!==z||t[113]!==V||t[114]!==H||t[115]!==r||t[116]!==B||t[117]!==D||t[118]!==O||t[119]!==F||t[120]!==R||t[121]!==X||t[122]!==q||t[123]!==Q||t[124]!==W||t[125]!==j||t[126]!==l||t[127]!==U||t[128]!==G||t[129]!==K||t[130]!==Y||t[131]!==Z||t[132]!==J||t[133]!==i||t[134]!==d||t[135]!==u||t[136]!==c||t[137]!==f?(dt={advisorHealth:s,agents:a,evals:n,analytics:r,api:l,audit:i,authAudit:d,authConfig:u,authSessions:c,containers:f,dashboards:p,data:m,deploymentHealth:h,drains:b,export:v,fanout:g,files:x,flags:y,functions:M,health:C,home:P,insights:N,issues:_,kv:S,logs:T,metrics:E,migrations:$,notifications:z,organizations:V,pitr:H,mail:B,payments:D,permissions:O,queues:F,realtime:R,rls:X,schedule:q,schema:Q,security:W,settings:j,sql:U,traces:G,storageRules:K,users:Y,vectors:Z,workflows:J},t[92]=s,t[93]=a,t[94]=p,t[95]=m,t[96]=h,t[97]=b,t[98]=v,t[99]=g,t[100]=x,t[101]=y,t[102]=M,t[103]=C,t[104]=n,t[105]=P,t[106]=N,t[107]=_,t[108]=S,t[109]=T,t[110]=E,t[111]=$,t[112]=z,t[113]=V,t[114]=H,t[115]=r,t[116]=B,t[117]=D,t[118]=O,t[119]=F,t[120]=R,t[121]=X,t[122]=q,t[123]=Q,t[124]=W,t[125]=j,t[126]=l,t[127]=U,t[128]=G,t[129]=K,t[130]=Y,t[131]=Z,t[132]=J,t[133]=i,t[134]=d,t[135]=u,t[136]=c,t[137]=f,t[138]=dt):dt=t[138];const pt=dt;let ae;t[139]!==e?(ae=e("Advisors"),t[139]=e,t[140]=ae):ae=t[140];let oe;t[141]!==e?(oe=e("Auth"),t[141]=e,t[142]=oe):oe=t[142];let ne;t[143]!==e?(ne=e("Database"),t[143]=e,t[144]=ne):ne=t[144];let re;t[145]!==e?(re=e("Functions"),t[145]=e,t[146]=re):re=t[146];let le;t[147]!==e?(le=e("Observability"),t[147]=e,t[148]=le):le=t[148];let ie;t[149]!==e?(ie=e("Operations"),t[149]=e,t[150]=ie):ie=t[150];let de;t[151]!==e?(de=e("Overview"),t[151]=e,t[152]=de):de=t[152];let ce;t[153]!==e?(ce=e("Settings"),t[153]=e,t[154]=ce):ce=t[154];let ue;t[155]!==e?(ue=e("Storage"),t[155]=e,t[156]=ue):ue=t[156];let ct;t[157]!==ae||t[158]!==oe||t[159]!==ne||t[160]!==re||t[161]!==le||t[162]!==ie||t[163]!==de||t[164]!==ce||t[165]!==ue?(ct={advisors:ae,auth:oe,database:ne,functions:re,observability:le,operations:ie,overview:de,settings:ce,storage:ue},t[157]=ae,t[158]=oe,t[159]=ne,t[160]=re,t[161]=le,t[162]=ie,t[163]=de,t[164]=ce,t[165]=ue,t[166]=ct):ct=t[166];const gt=ct;let me;t[167]!==e?(me=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[167]=e,t[168]=me):me=t[168];let fe;t[169]!==e?(fe=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[169]=e,t[170]=fe):fe=t[170];let he;t[171]!==e?(he=e("Scores recorded by recordEvaluation — the latest verdict per eval, its trend, and the graded runs behind it."),t[171]=e,t[172]=he):he=t[172];let pe;t[173]!==e?(pe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[173]=e,t[174]=pe):pe=t[174];let ge;t[175]!==e?(ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[175]=e,t[176]=ge):ge=t[176];let be;t[177]!==e?(be=e("A durable log of admin state-changing operations."),t[177]=e,t[178]=be):be=t[178];let ve;t[179]!==e?(ve=e("Authentication and security events — sign-ins, MFA, and session changes."),t[179]=e,t[180]=ve):ve=t[180];let xe;t[181]!==e?(xe=e("Enabled plugins and session config (read-only)."),t[181]=e,t[182]=xe):xe=t[182];let ye;t[183]!==e?(ye=e("Browse and revoke active sessions across all users."),t[183]=e,t[184]=ye):ye=t[184];let we;t[185]!==e?(we=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[185]=e,t[186]=we):we=t[186];let ke;t[187]!==e?(ke=e("Chart widgets backed by saved read-only SQL queries."),t[187]=e,t[188]=ke):ke=t[188];let Ne;t[189]!==e?(Ne=e("Browse and edit rows across your shard and global tables."),t[189]=e,t[190]=Ne):Ne=t[190];let Me;t[191]!==e?(Me=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[191]=e,t[192]=Me):Me=t[192];let Se;t[193]!==e?(Se=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[193]=e,t[194]=Se):Se=t[194];let Ce;t[195]!==e?(Ce=e("Export a shard to NDJSON, or import rows from it."),t[195]=e,t[196]=Ce):Ce=t[196];let Pe;t[197]!==e?(Pe=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[197]=e,t[198]=Pe):Pe=t[198];let _e;t[199]!==e?(_e=e("Browse objects in your R2 storage buckets."),t[199]=e,t[200]=_e):_e=t[200];let Te;t[201]!==e?(Te=e("Inspect feature flags and their live evaluation under a targeting context."),t[201]=e,t[202]=Te):Te=t[202];let Le;t[203]!==e?(Le=e("Run registered queries, mutations, and actions."),t[203]=e,t[204]=Le):Le=t[204];let Ae;t[205]!==e?(Ae=e("At-a-glance connection, error, and shard signals."),t[205]=e,t[206]=Ae):Ae=t[206];let Ee;t[207]!==e?(Ee=e("Connection, health, and advisor summary for your deployment."),t[207]=e,t[208]=Ee):Ee=t[208];let Re;t[209]!==e?(Re=e("Surface slow functions, error spikes, and cache problems."),t[209]=e,t[210]=Re):Re=t[210];let Ie;t[211]!==e?(Ie=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[211]=e,t[212]=Ie):Ie=t[212];let $e;t[213]!==e?($e=e("A live stream of recent function logs."),t[213]=e,t[214]=$e):$e=t[214];let He;t[215]!==e?(He=e("Per-shard health and aggregate metrics."),t[215]=e,t[216]=He):He=t[216];let Be;t[217]!==e?(Be=e("Review migration status and run them."),t[217]=e,t[218]=Be):Be=t[218];let ze;t[219]!==e?(ze=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[219]=e,t[220]=ze):ze=t[220];let Ve;t[221]!==e?(Ve=e("Browse and manage organizations, members, and invitations."),t[221]=e,t[222]=Ve):Ve=t[222];let De;t[223]!==e?(De=e("Restore a shard to a point in the last 30 days."),t[223]=e,t[224]=De):De=t[224];let Oe;t[225]!==e?(Oe=e("Email your app sent, captured in dev."),t[225]=e,t[226]=Oe):Oe=t[226];let Ze;t[227]!==e?(Ze=e("Synced customers, subscriptions, and webhook events."),t[227]=e,t[228]=Ze):Ze=t[228];let Fe;t[229]!==e?(Fe=e("Inspect access policies per table, and probe a function as any identity."),t[229]=e,t[230]=Fe):Fe=t[230];let qe;t[231]!==e?(qe=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[231]=e,t[232]=qe):qe=t[232];let We;t[233]!==e?(We=e("Active WebSocket subscriptions on this shard."),t[233]=e,t[234]=We):We=t[234];let je;t[235]!==e?(je=e("Inspect row-level-security policies and roles, per table."),t[235]=e,t[236]=je):je=t[236];let Ue;t[237]!==e?(Ue=e("Inspect and cancel scheduled jobs."),t[237]=e,t[238]=Ue):Ue=t[238];let Ge;t[239]!==e?(Ge=e("Inspect each table and its columns."),t[239]=e,t[240]=Ge):Ge=t[240];let Ke;t[241]!==e?(Ke=e("Review admin gates, credentials, and log redaction."),t[241]=e,t[242]=Ke):Ke=t[242];let Qe;t[243]!==e?(Qe=e("Read-only deployment config — vars, secrets, and bindings."),t[243]=e,t[244]=Qe):Qe=t[244];let Ye;t[245]!==e?(Ye=e("Run read-only SQL against a shard."),t[245]=e,t[246]=Ye):Ye=t[246];let Je;t[247]!==e?(Je=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[247]=e,t[248]=Je):Je=t[248];let Xe;t[249]!==e?(Xe=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[249]=e,t[250]=Xe):Xe=t[250];let et;t[251]!==e?(et=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[251]=e,t[252]=et):et=t[252];let tt;t[253]!==e?(tt=e("Manage auth users — roles, bans, sessions, and identity."),t[253]=e,t[254]=tt):tt=t[254];let st;t[255]!==e?(st=e("Browse Vectorize indexes and run similarity searches."),t[255]=e,t[256]=st):st=t[256];let at;t[257]!==e?(at=e("Inspect declared Cloudflare Workflows and their bindings."),t[257]=e,t[258]=at):at=t[258];let ut;t[259]!==tt||t[260]!==st||t[261]!==at||t[262]!==me||t[263]!==fe||t[264]!==he||t[265]!==pe||t[266]!==ge||t[267]!==be||t[268]!==ve||t[269]!==xe||t[270]!==ye||t[271]!==we||t[272]!==ke||t[273]!==Ne||t[274]!==Me||t[275]!==Se||t[276]!==Ce||t[277]!==Pe||t[278]!==_e||t[279]!==Te||t[280]!==Le||t[281]!==Ae||t[282]!==Ee||t[283]!==Re||t[284]!==Ie||t[285]!==$e||t[286]!==He||t[287]!==Be||t[288]!==ze||t[289]!==Ve||t[290]!==De||t[291]!==Oe||t[292]!==Ze||t[293]!==Fe||t[294]!==qe||t[295]!==We||t[296]!==je||t[297]!==Ue||t[298]!==Ge||t[299]!==Ke||t[300]!==Qe||t[301]!==Ye||t[302]!==Je||t[303]!==Xe||t[304]!==et?(ut={advisorHealth:me,agents:fe,evals:he,analytics:pe,api:ge,audit:be,authAudit:ve,authConfig:xe,authSessions:ye,containers:we,dashboards:ke,data:Ne,deploymentHealth:Me,drains:Se,export:Ce,fanout:Pe,files:_e,flags:Te,functions:Le,health:Ae,home:Ee,insights:Re,issues:Ie,logs:$e,metrics:He,migrations:Be,notifications:ze,organizations:Ve,pitr:De,mail:Oe,payments:Ze,permissions:Fe,queues:qe,realtime:We,rls:je,schedule:Ue,schema:Ge,security:Ke,settings:Qe,sql:Ye,kv:Je,storageRules:Xe,traces:et,users:tt,vectors:st,workflows:at},t[259]=tt,t[260]=st,t[261]=at,t[262]=me,t[263]=fe,t[264]=he,t[265]=pe,t[266]=ge,t[267]=be,t[268]=ve,t[269]=xe,t[270]=ye,t[271]=we,t[272]=ke,t[273]=Ne,t[274]=Me,t[275]=Se,t[276]=Ce,t[277]=Pe,t[278]=_e,t[279]=Te,t[280]=Le,t[281]=Ae,t[282]=Ee,t[283]=Re,t[284]=Ie,t[285]=$e,t[286]=He,t[287]=Be,t[288]=ze,t[289]=Ve,t[290]=De,t[291]=Oe,t[292]=Ze,t[293]=Fe,t[294]=qe,t[295]=We,t[296]=je,t[297]=Ue,t[298]=Ge,t[299]=Ke,t[300]=Qe,t[301]=Ye,t[302]=Je,t[303]=Xe,t[304]=et,t[305]=ut):ut=t[305];const bt=ut;let mt;return t[306]!==gt||t[307]!==bt||t[308]!==pt?(mt={groupLabel:gt,tabDescription:bt,tabLabel:pt},t[306]=gt,t[307]=bt,t[308]=pt,t[309]=mt):mt=t[309],mt},xa=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("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},ya=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("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},wa=()=>{const t=k(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},ka=[{Icon:xa,value:"system"},{Icon:ya,value:"light"},{Icon:wa,value:"dark"}],Na=()=>{const t=k(19),{theme:e,setTheme:s}=As(),a=ee();let n;t[0]!==a?(n=a("Dark theme"),t[0]=a,t[1]=n):n=t[1];let r;t[2]!==a?(r=a("Light theme"),t[2]=a,t[3]=r):r=t[3];let l;t[4]!==a?(l=a("System theme"),t[4]=a,t[5]=l):l=t[5];let i;t[6]!==n||t[7]!==r||t[8]!==l?(i={dark:n,light:r,system:l},t[6]=n,t[7]=r,t[8]=l,t[9]=i):i=t[9];const d=i;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=ka.map(p=>{const{Icon:m,value:h}=p,b=e===h;return w("button",{"aria-checked":b,"aria-label":d[h],className:L("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",b?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${h}`,onClick:()=>{s(h)},role:"radio",title:d[h],type:"button",children:[b&&o(Ns.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(m,{})})]},h)}),t[12]=d,t[13]=s,t[14]=e,t[15]=c):c=t[15];let f;return t[16]!==u||t[17]!==c?(f=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]=f):f=t[18],f},Ma=t=>{const e=k(23),{domain:s,onOpenCommandPalette:a,page:n}=t,r=ee();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o(sa,{className:"-ms-1"}),e[0]=l):l=e[0];let i;e[1]!==r?(i=r("Breadcrumb"),e[1]=r,e[2]=i):i=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]!==n?(c=o("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==i||e[9]!==d||e[10]!==c?(f=w("nav",{"aria-label":i,className:"flex items-center gap-1.5 text-[13px]",children:[d,u,c]}),e[8]=i,e[9]=d,e[10]=c,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=w("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 m;e[13]!==r?(m=r("Search…"),e[13]=r,e[14]=m):m=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=h):h=e[15];let b;e[16]!==a||e[17]!==m?(b=w("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,m,h]}),e[16]=a,e[17]=m,e[18]=b):b=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=o("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:o(Na,{})}),e[19]=v):v=e[19];let g;return e[20]!==b||e[21]!==f?(g=w("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,f,b,v]}),e[20]=b,e[21]=f,e[22]=g):g=e[22],g},Sa=t=>{const e=k(3);let s,a;e[0]!==t?(s=()=>{if(t===void 0)return;const n=r=>{if(!r.ctrlKey||r.metaKey||r.altKey||r.shiftKey||r.repeat||r.key!=="`")return;const{target:l}=r;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(r.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},a=[t],e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]),nt(s,a)},I=(t,e)=>A(()=>t().then(s=>({default:s[e]}))),Ca=I(()=>import("../packem_chunks/InsightsPanel.js"),"InsightsPanel"),Pa=A(()=>import("../packem_chunks/rls-panel.js")),_a=A(()=>import("../packem_chunks/AdvisorHealthPanel.js")),Ta=A(()=>import("../packem_chunks/SecurityAdvisorPanel.js")),La=A(()=>import("../packem_chunks/agents-panel.js")),Aa=I(()=>import("../packem_chunks/analytics-panel.js"),"AnalyticsPanel"),Ea=A(()=>import("../packem_chunks/ApiTab.js")),Ra=A(()=>import("../packem_chunks/auth-audit-panel.js")),Ia=A(()=>import("../packem_chunks/auth-config-panel.js")),$a=A(()=>import("../packem_chunks/auth-sessions-panel.js")),Ha=A(()=>import("../packem_chunks/organizations-panel.js")),Ba=I(()=>import("../packem_chunks/users-panel.js"),"UsersPanel"),za=A(()=>import("../packem_chunks/containers-panel.js")),Va=I(()=>import("../packem_chunks/DeploymentHealthPanel.js"),"DeploymentHealthPanel"),Da=I(()=>import("../packem_chunks/TableEditor.js"),"TableEditor"),Oa=I(()=>import("../packem_chunks/ExportImportPanel.js"),"ExportImportPanel"),Za=A(()=>import("../packem_chunks/migrations-route.js")),Fa={data:ys,migrations:xs},qa=I(()=>import("../packem_chunks/PitrPanel.js"),"PitrPanel"),Wa=A(()=>import("../packem_chunks/flags-panel.js")),ja=I(()=>import("../packem_chunks/FunctionRunner.js"),"FunctionRunner"),Ua=I(()=>import("../packem_chunks/FunctionStatsPanel.js"),"FunctionStatsPanel"),Ga=A(()=>import("../packem_chunks/issues-panel.js")),Ka=I(()=>import("../packem_chunks/AuditPanel.js"),"AuditPanel"),Qa=A(()=>import("../packem_chunks/log-drains-panel.js")),Ya=A(()=>import("../packem_chunks/LogsPanel.js").then(t=>({default:t.LogsPanel}))),Ja=I(()=>import("../packem_chunks/MailPanel.js"),"MailPanel"),Xa=I(()=>import("../packem_chunks/schedule-panel.js"),"SchedulePanel"),eo=A(()=>import("../packem_chunks/subscriptions-panel.js")),to=A(()=>import("../packem_chunks/sync-client-panel.js")),so=I(()=>import("../packem_chunks/kv-browser.js"),"KvBrowser"),ao=A(()=>import("../packem_chunks/NotificationsPanel.js")),oo=I(()=>import("../packem_chunks/payments-panel.js"),"PaymentsPanel"),no=I(()=>import("../packem_chunks/permissions-panel.js"),"PermissionsPanel"),ro=A(()=>import("../packem_chunks/queues-panel.js")),lo=A(()=>import("../packem_chunks/dashboards-panel.js")),io=A(()=>import("../packem_chunks/fanout-panel.js")),co=I(()=>import("../packem_chunks/HealthPanel.js"),"HealthPanel"),uo=I(()=>import("../packem_chunks/MetricsPanel.js"),"MetricsPanel"),mo=I(()=>import("../packem_chunks/SchemaViewer.js"),"SchemaViewer"),fo=I(()=>import("../packem_chunks/SettingsPanel.js"),"SettingsPanel"),ho=I(()=>import("../packem_chunks/SqlEditorPanel.js"),"SqlEditorPanel"),po=I(()=>import("../packem_chunks/FileBrowser.js"),"FileBrowser"),go=A(()=>import("../packem_chunks/storage-rules-panel.js")),bo=A(()=>import("../packem_chunks/traces-panel.js")),vo=A(()=>import("../packem_chunks/evals-panel.js")),xo=I(()=>import("../packem_chunks/vector-browser.js"),"VectorBrowser"),yo=A(()=>import("../packem_chunks/workflows-panel.js")),Qt=Et(null),wo={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"}),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"}),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"}),queues:o("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),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"})},Tt=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","evals","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],ko={analytics:"analytics",authAudit:"auth",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",notifications:"notifications",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},Lt=(t,e)=>{const s=ko[t];return s===void 0||e[s]},kt=t=>{const e=k(2),{tab:s}=t,a=wo[s];let n;return e[0]!==a?(n=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]=n):n=e[1],n},No=t=>t,Yt=No(["home","data","sql","functions","api","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","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Mo=new Set(["api","data","migrations","sql"]),So=t=>{const e=t.split("/").findLast(Boolean)??"";return Yt.includes(e)?e:"home"},Co=t=>{const e=k(19),{chrome:s,connected:a}=t,n=ee();let r;e[0]!==n?(r=n("admin token"),e[0]=n,e[1]=r):r=e[1];let l;e[2]!==r?(l=o("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:r}),e[2]=r,e[3]=l):l=e[3];let i;e[4]!==s.onTokenChange||e[5]!==s.token?(i=o($t,{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]=i):i=e[6];let d;e[7]!==a||e[8]!==n?(d=a&&w("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:"⚠"}),n("Token rides the WebSocket URL — it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=a,e[8]=n,e[9]=d):d=e[9];let u;e[10]!==s.clearToken||e[11]!==a||e[12]!==n?(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:n("Clear")}),e[10]=s.clearToken,e[11]=a,e[12]=n,e[13]=u):u=e[13];let c;return e[14]!==l||e[15]!==i||e[16]!==d||e[17]!==u?(c=w("div",{className:"flex flex-col gap-2",children:[l,i,d,u]}),e[14]=l,e[15]=i,e[16]=d,e[17]=u,e[18]=c):c=e[18],c},Po=t=>{const e=k(25),{current:s,group:a,groupLabel:n,selectTab:r,tabDescription:l,tabLabel:i}=t,d=a.tabs.includes(s)?"page":void 0,u=n[a.key],c=a.tabs[0];let f;e[0]!==c?(f=o(kt,{tab:c}),e[0]=c,e[1]=f):f=e[1];let p;e[2]!==d||e[3]!==u||e[4]!==f?(p=o(jt,{"aria-current":d,"aria-label":u,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:f}),e[2]=d,e[3]=u,e[4]=f,e[5]=p):p=e[5];const m=n[a.key];let h;e[6]!==m?(h=o("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:m}),e[6]=m,e[7]=h):h=e[7];let b;if(e[8]!==s||e[9]!==a.tabs||e[10]!==r||e[11]!==l||e[12]!==i){let x;e[14]!==s||e[15]!==r||e[16]!==l||e[17]!==i?(x=y=>w("button",{"aria-current":s===y?"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","data-tab":y,"data-testid":`dash-tab-${y}`,onClick:r,title:l[y],type:"button",children:[o(kt,{tab:y}),o("span",{children:i[y]})]},y),e[14]=s,e[15]=r,e[16]=l,e[17]=i,e[18]=x):x=e[18],b=a.tabs.map(x),e[8]=s,e[9]=a.tabs,e[10]=r,e[11]=l,e[12]=i,e[13]=b}else b=e[13];let v;e[19]!==h||e[20]!==b?(v=w(Ut,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[h,b]}),e[19]=h,e[20]=b,e[21]=v):v=e[21];let g;return e[22]!==p||e[23]!==v?(g=w(Wt,{children:[p,v]}),e[22]=p,e[23]=v,e[24]=g):g=e[24],g},_o=t=>{const e=k(45),{chrome:s,collapsed:a,connected:n}=t,r=ee();if(s===null){let y;e[0]!==r?(y=r("Admin"),e[0]=r,e[1]=y):y=e[1];let M;e[2]===Symbol.for("react.memo_cache_sentinel")?(M=o("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=M):M=e[2];let C;e[3]!==r?(C=r("Admin"),e[3]=r,e[4]=C):C=e[4];let P;e[5]!==C?(P=o("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=P):P=e[6];let N;e[7]!==r?(N=r("Studio"),e[7]=r,e[8]=N):N=e[8];let _;e[9]!==N?(_=o("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=_):_=e[10];let S;e[11]!==P||e[12]!==_?(S=w("span",{className:"grid flex-1 text-start leading-tight",children:[P,_]}),e[11]=P,e[12]=_,e[13]=S):S=e[13];let T;return e[14]!==y||e[15]!==S?(T=w(Kt,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[M,S]}),e[14]=y,e[15]=S,e[16]=T):T=e[16],T}const l=a?"mx-auto size-8 justify-center":"w-full p-2";let i;e[17]!==l?(i=L("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=i):i=e[18];let d;e[19]!==n||e[20]!==r?(d=r(n?"Connected":"Not connected"),e[19]=n,e[20]=r,e[21]=d):d=e[21];const u=n?"bg-success":"bg-muted-foreground/50";let c;e[22]!==u?(c=L("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 f;e[24]!==c?(f=w("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]=f):f=e[25];let p;e[26]!==a||e[27]!==n||e[28]!==r?(p=!a&&w(Rt,{children:[w("span",{className:"grid flex-1 text-start leading-tight",children:[o("span",{className:"truncate text-[13px] font-medium",children:r("Admin")}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:r(n?"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]=n,e[28]=r,e[29]=p):p=e[29];let m;e[30]!==i||e[31]!==d||e[32]!==f||e[33]!==p?(m=w(jt,{className:i,"data-testid":"dash-app-connect",title:d,children:[f,p]}),e[30]=i,e[31]=d,e[32]=f,e[33]=p,e[34]=m):m=e[34];const h=a?"end":"start",b=a?"right":"top";let v;e[35]!==s||e[36]!==n?(v=o(Co,{chrome:s,connected:n}),e[35]=s,e[36]=n,e[37]=v):v=e[37];let g;e[38]!==b||e[39]!==v||e[40]!==h?(g=o(Ut,{align:h,keepMounted:!0,side:b,children:v}),e[38]=b,e[39]=v,e[40]=h,e[41]=g):g=e[41];let x;return e[42]!==g||e[43]!==m?(x=w(Wt,{children:[m,g]}),e[42]=g,e[43]=m,e[44]=x):x=e[44],x},To=t=>{const e=k(28),{chrome:s,connected:a,current:n,groupLabel:r,groups:l,selectTab:i,tabDescription:d,tabLabel:u}=t,c=ee(),{state:f}=ht(),p=f==="collapsed",m=p&&"justify-center px-0";let h;e[0]!==m?(h=L("flex items-center gap-2.5 px-1.5 py-1",m),e[0]=m,e[1]=h):h=e[1];let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=o($s,{className:"size-9 shrink-0 text-foreground"}),e[2]=b):b=e[2];let v;e[3]!==p||e[4]!==a||e[5]!==c?(v=!p&&w(Rt,{children:[w("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:c("Studio")})]}),o(it,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:c(a?"Live":"Local")})]}),e[3]=p,e[4]=a,e[5]=c,e[6]=v):v=e[6];let g;e[7]!==h||e[8]!==v?(g=o(oa,{children:w("div",{className:h,children:[b,v]})}),e[7]=h,e[8]=v,e[9]=g):g=e[9];let x;e[10]!==p||e[11]!==n||e[12]!==r||e[13]!==l||e[14]!==i||e[15]!==d||e[16]!==u?(x=p?l.map(P=>o(Po,{current:n,group:P,groupLabel:r,selectTab:i,tabDescription:d,tabLabel:u},P.key)):l.map(P=>w(la,{children:[o(ia,{className:"text-[11px] font-medium tracking-wider uppercase",children:r[P.key]}),o(da,{children:o(Pt,{children:P.tabs.map(N=>o(_t,{children:w(Kt,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":N,"data-testid":`dash-tab-${N}`,isActive:n===N,onClick:i,title:d[N],tooltip:d[N],children:[o(kt,{tab:N}),o("span",{children:u[N]})]})},N))})})]},P.key)),e[10]=p,e[11]=n,e[12]=r,e[13]=l,e[14]=i,e[15]=d,e[16]=u,e[17]=x):x=e[17];let y;e[18]!==x?(y=o(ra,{children:x}),e[18]=x,e[19]=y):y=e[19];let M;e[20]!==s||e[21]!==p||e[22]!==a?(M=o(na,{children:o(Pt,{children:o(_t,{children:o(_o,{chrome:s,collapsed:p,connected:a})})})}),e[20]=s,e[21]=p,e[22]=a,e[23]=M):M=e[23];let C;return e[24]!==g||e[25]!==y||e[26]!==M?(C=w(ta,{collapsible:"icon",variant:"inset",children:[g,y,M]}),e[24]=g,e[25]=y,e[26]=M,e[27]=C):C=e[27],C},Jt=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[w("div",{className:"flex items-center gap-2",children:[o(vt,{className:"h-8 w-40"}),o(vt,{className:"h-8 w-24"})]}),o(vt,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Lo=()=>{const t=k(64),e=ee(),s=At();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ho},t[0]=a):a=t[0];const n=ns(a);let r,l;t[1]!==n?(r=So(n),l=Mo.has(r),t[1]=n,t[2]=r,t[3]=l):(r=t[2],l=t[3]);const i=l,d=us(),u=d?.toggle;Sa(u);const c=gs(),{groupLabel:f,tabDescription:p,tabLabel:m}=va();let h;t[4]!==c?(h=Z=>({...Z,tabs:Z.tabs.filter(J=>Lt(J,c))}),t[4]=c,t[5]=h):h=t[5];const b=Tt.map(h).filter(Bo);let v,g;t[6]!==r||t[7]!==c||t[8]!==s?(v=()=>{Lt(r,c)||wt(s({replace:!0,to:"/home"}))},g=[r,c,s],t[6]=r,t[7]=c,t[8]=s,t[9]=v,t[10]=g):(v=t[9],g=t[10]),nt(v,g);let x;t[11]!==s?(x=Z=>{wt(s({to:`/${Z.currentTarget.dataset.tab??""}`}))},t[11]=s,t[12]=x):x=t[12];const y=x;let M,C;t[13]!==r||t[14]!==m?(M=()=>{typeof document<"u"&&(document.title=`${m[r]} · lunora`)},C=[r,m],t[13]=r,t[14]=m,t[15]=M,t[16]=C):(M=t[15],C=t[16]),nt(M,C);const P=b.find(Z=>Z.tabs.includes(r))??Tt[0];let N;t[17]!==f||t[18]!==m?(N=Z=>Z.tabs.map(J=>({group:f[Z.key],label:m[J],to:`/${J}`})),t[17]=f,t[18]=m,t[19]=N):N=t[19];const _=b.flatMap(N),S=Nt(Qt),T=S!==null&&S.token!=="";let E;t[20]!==_?(E=o(ws,{items:_}),t[20]=_,t[21]=E):E=t[21];let $;t[22]!==S||t[23]!==T||t[24]!==r||t[25]!==f||t[26]!==y||t[27]!==p||t[28]!==m||t[29]!==b?($=o(To,{chrome:S,connected:T,current:r,groupLabel:f,groups:b,selectTab:y,tabDescription:p,tabLabel:m}),t[22]=S,t[23]=T,t[24]=r,t[25]=f,t[26]=y,t[27]=p,t[28]=m,t[29]=b,t[30]=$):$=t[30];const z=f[P.key],V=m[r];let H;t[31]!==z||t[32]!==V?(H=o(Ma,{domain:z,onOpenCommandPalette:ks,page:V}),t[31]=z,t[32]=V,t[33]=H):H=t[33];let B;t[34]!==S?.rulesInstalled?(B=S?.rulesInstalled===!1&&o(zs,{}),t[34]=S?.rulesInstalled,t[35]=B):B=t[35];const D=`dash-tab-${r}`,O=i?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",F=m[r];let R;t[36]!==e||t[37]!==F?(R=e("{title} failed",{title:F}),t[36]=e,t[37]=F,t[38]=R):R=t[38];const X=m[r];let q;t[39]!==e?(q=e("Try again"),t[39]=e,t[40]=q):q=t[40];let Q;t[41]===Symbol.for("react.memo_cache_sentinel")?(Q=o(is,{fallback:o(Jt,{}),children:o(rs,{})}),t[41]=Q):Q=t[41];let W;t[42]!==r||t[43]!==R||t[44]!==X||t[45]!==q?(W=o(ds,{fallbackTitle:R,label:X,retryLabel:q,children:Q},r),t[42]=r,t[43]=R,t[44]=X,t[45]=q,t[46]=W):W=t[46];let j;t[47]!==O||t[48]!==W?(j=o("div",{className:O,children:W}),t[47]=O,t[48]=W,t[49]=j):j=t[49];let U;t[50]!==d?(U=d?.open===!0&&o(pa,{focusSeq:d.focusSeq,onClose:d.close,onShownChange:d.setShown,shown:d.shown}),t[50]=d,t[51]=U):U=t[51];let G;t[52]!==D||t[53]!==j||t[54]!==U?(G=w("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,U]}),t[52]=D,t[53]=j,t[54]=U,t[55]=G):G=t[55];let K;t[56]!==H||t[57]!==B||t[58]!==G?(K=w(aa,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[H,B,G]}),t[56]=H,t[57]=B,t[58]=G,t[59]=K):K=t[59];let Y;return t[60]!==$||t[61]!==K||t[62]!==E?(Y=w(ea,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[E,$,K]}),t[60]=$,t[61]=K,t[62]=E,t[63]=Y):Y=t[63],Y},Ao=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o(cs,{children:o(Lo,{})}),t[0]=e):e=t[0],e},Eo=t=>{const e=k(5),{initialShardKey:s,schemaEditable:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const r=as(n),{table:l}=r,i=typeof l=="string"?l:void 0;let d;return e[1]!==s||e[2]!==i||e[3]!==a?(d=o(mo,{initialShardKey:s,initialTable:i,schemaEditable:a}),e[1]=s,e[2]=i,e[3]=a,e[4]=d):d=e[4],d},Ro=()=>{const t=k(3),e=At();let s,a;return t[0]!==e?(s=()=>{wt(e({replace:!0,to:"/home"}))},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),nt(s,a),null},Io=({basePath:t,dataEditable:e=!1,functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:r,runAsIdentity:l=!1,schemaEditable:i=!1,scheduledCancel:d,scheduledCron:u,scheduledLoad:c})=>{const f=Xt({component:Ao}),p={agents:o(La,{initialShardKey:a}),analytics:o(Aa,{}),api:o(Ea,{functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:r}),audit:o(Ka,{initialShardKey:a}),authAudit:o(Ra,{}),authConfig:o(Ia,{}),authSessions:o($a,{}),containers:o(za,{}),dashboards:o(lo,{initialShardKey:a}),data:o(Da,{editable:e,initialShardKey:a}),deploymentHealth:o(Va,{}),drains:o(Qa,{}),export:o(Oa,{initialShardKey:a}),fanout:o(io,{initialShardKey:a}),files:o(po,{}),kv:o(so,{}),flags:o(Wa,{initialShardKey:a}),functions:w("div",{className:"flex flex-col gap-8",children:[o(Ua,{functions:s,initialShardKey:a}),o(ja,{functions:s,runAsIdentity:l})]}),health:o(co,{initialShardKey:a}),home:o(ps,{initialShardKey:a}),insights:o(Ca,{initialShardKey:a}),issues:o(Ga,{initialShardKey:a}),logs:o(Ya,{initialShardKey:a}),traces:o(bo,{initialShardKey:a}),evals:o(vo,{initialShardKey:a}),metrics:o(uo,{initialShardKey:a}),migrations:o(Za,{initialShardKey:a}),notifications:o(ao,{}),organizations:o(Ha,{}),permissions:o(no,{functions:s,runAsIdentity:l,schemaEditable:i}),pitr:o(qa,{initialShardKey:a}),mail:o(Ja,{}),payments:o(oo,{}),queues:o(ro,{}),realtime:w("div",{className:"flex flex-col gap-8",children:[o(eo,{initialShardKey:a}),o(to,{})]}),rls:o(Pa,{}),schedule:o(Xa,{loadCronJobs:u,scheduledCancel:d,scheduledLoad:c}),schema:o(Eo,{initialShardKey:a,schemaEditable:i}),advisorHealth:o(_a,{}),security:o(Ta,{}),settings:o(fo,{initialShardKey:a}),sql:o(ho,{initialShardKey:a}),storageRules:o(go,{}),users:o(Ba,{}),vectors:o(xo,{}),workflows:o(yo,{})},m=St({component:()=>p.home,getParentRoute:()=>f,path:"/"}),h=Yt.map(g=>St({component:()=>p[g],getParentRoute:()=>f,path:`/${g}`,validateSearch:Fa[g]})),b=f.addChildren([m,...h]),v="window"in globalThis?es():ts({initialEntries:["/home"]});return ss({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Ro,defaultPendingComponent:Jt,defaultPendingMinMs:0,defaultPendingMs:0,history:v,routeTree:b})},$o=t=>{const e=k(17),{basePath:s,chrome:a,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:i,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:f,scheduledCron:p,scheduledLoad:m}=t;let h;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==d||e[6]!==u||e[7]!==f||e[8]!==p||e[9]!==m||e[10]!==c?(h=Io({basePath:s,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:i,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:f,scheduledCron:p,scheduledLoad:m}),e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=i,e[5]=d,e[6]=u,e[7]=f,e[8]=p,e[9]=m,e[10]=c,e[11]=h):h=e[11];const b=h,v=a??null;let g;e[12]!==b?(g=o(os,{router:b}),e[12]=b,e[13]=g):g=e[13];let x;return e[14]!==v||e[15]!==g?(x=o(Qt,{value:v,children:g}),e[14]=v,e[15]=g,e[16]=x):x=e[16],x},hn=t=>{const e=k(17),{basePath:s,chrome:a,dataEditable:n,functions:r,i18n:l,initialShardKey:i,locale:d,openApiSpec:u,openRpcSpec:c,runAsIdentity:f,schemaEditable:p,scheduledCancel:m,scheduledCron:h,scheduledLoad:b}=t;let v;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==r||e[4]!==i||e[5]!==u||e[6]!==c||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==b||e[11]!==p?(v=o(Ls,{children:o($o,{basePath:s,chrome:a,dataEditable:n,functions:r,initialShardKey:i,openApiSpec:u,openRpcSpec:c,runAsIdentity:f,scheduledCancel:m,scheduledCron:h,scheduledLoad:b,schemaEditable:p})}),e[0]=s,e[1]=a,e[2]=n,e[3]=r,e[4]=i,e[5]=u,e[6]=c,e[7]=f,e[8]=m,e[9]=h,e[10]=b,e[11]=p,e[12]=v):v=e[12];const g=v;if(l===void 0&&d===void 0)return g;let x;return e[13]!==l||e[14]!==d||e[15]!==g?(x=o(vs,{i18n:l,locale:d,children:g}),e[13]=l,e[14]=d,e[15]=g,e[16]=x):x=e[16],x};function Ho(t){return t.location.pathname}function Bo(t){return t.tabs.length>0}export{$s as B,hn as S,Ts as T,fn as a,Os as b,qs as c,Ws as d,js as e,As as u};
2
+ import{c as k}from"react/compiler-runtime";import{createRootRoute as Xt,createRoute as St,createBrowserHistory as es,createMemoryHistory as ts,createRouter as ss,useNavigate as At,useSearch as as,RouterProvider as os,useRouterState as ns,Outlet as rs}from"@tanstack/react-router";import*as ot from"react";import{use as Nt,createContext as Et,useState as lt,useEffect as nt,useSyncExternalStore as ls,lazy as A,Suspense as is}from"react";import{c as L}from"./utils-bhneXptQ.js";import{jsx as o,jsxs as w,Fragment as Rt}from"react/jsx-runtime";import{ErrorBoundary as ds}from"./ErrorBoundary-BWNF98VF.js";import{O as cs,u as us}from"./operation-console-provider-DoloEvon.js";import{useT as ee}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{LunoraError as It}from"@lunora/errors";import{B as it}from"./badge-cAk9Di1Q.js";import{I as $t}from"./input-CY5W3wzv.js";import{Popover as rt}from"@base-ui/react/popover";import{Cancel01Icon as ms,SidebarLeftIcon as fs}from"@hugeicons/core-free-icons";import{HugeiconsIcon as Ht}from"@hugeicons/react";import{mergeProps as Bt}from"@base-ui/react/merge-props";import{useRender as zt}from"@base-ui/react/use-render";import{cva as hs}from"class-variance-authority";import{B as Vt}from"./button-BOPLD1un.js";import{Dialog as se}from"@base-ui/react/dialog";import{Tooltip as te}from"@base-ui/react/tooltip";import{S as vt}from"./skeleton-DFBBaJU6.js";import{H as ps,u as gs}from"./home-panel-DywiFhDs.js";import{g as bs,f as wt}from"./internal-7bgd8inO.js";import{o as ft}from"./use-admin-query-DV9xmFl8.js";import{StudioI18nProvider as vs}from"./StudioI18nProvider-Bl547evf.js";import{v as xs,a as ys}from"./data-view-params-qoSTqjAj.js";import{CommandPalette as ws,openCommandPalette as ks}from"./CommandPalette-BAiOc1hT.js";import{motion as Ns}from"motion/react";const Dt="(prefers-color-scheme: dark)",Ot=()=>{try{return globalThis.localStorage}catch{return}},Ms=t=>t==="system"||t==="light"||t==="dark",Zt=()=>globalThis.matchMedia,Ft="lunora-studio-theme",xt=["system","light","dark"],Ss=(t="system")=>{try{const e=Ot()?.getItem(Ft);return Ms(e)?e:t}catch{return t}},Ct=t=>{const e=Ot();if(e!==void 0)try{e.setItem(Ft,t)}catch{}},Cs=()=>{try{return Zt()?.(Dt).matches?"dark":"light"}catch{return"light"}},Ps=(t,e)=>t==="system"?e:t,_s=t=>{let e;try{e=Zt()?.(Dt)}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)}},Mt=Et(null),Ts=({children:t,defaultTheme:e="system"})=>{const[s,a]=lt(()=>Ss(e)),[n,r]=lt(()=>Cs());nt(()=>_s(r),[]);const l=u=>{Ct(u),a(u)},d={cycleTheme:()=>{a(u=>{const c=xt[(xt.indexOf(u)+1)%xt.length]??u;return Ct(c),c})},resolvedTheme:Ps(s,n),setTheme:l,systemTheme:n,theme:s};return o(Mt,{value:d,children:t})},Ls=t=>{const e=k(3),{children:s}=t,a=Nt(Mt);let n;return e[0]!==s||e[1]!==a?(n=a===null?o(Ts,{children:s}):s,e[0]=s,e[1]=a,e[2]=n):n=e[2],n},As=()=>{const t=Nt(Mt);if(t===null)throw new It("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function fn({delay:t=0,...e}){return o(te.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function Es(t){const e=k(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(te.Root,{"data-slot":"tooltip",...s}),e[2]=s,e[3]=a):a=e[3],a}function Rs(t){const e=k(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(te.Trigger,{"data-slot":"tooltip-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Is({className:t,side:e="top",sideOffset:s=4,align:a="center",alignOffset:n=0,children:r,...l}){return o(te.Portal,{children:o(te.Positioner,{align:a,alignOffset:n,side:e,sideOffset:s,className:"isolate z-50",children:w(te.Popup,{"data-slot":"tooltip-content",className:L("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),...l,children:[r,o(te.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 $s=t=>{const e=k(5),{className:s}=t;let a;e[0]!==s?(a=L("h-full w-full text-foreground",s),e[0]=s,e[1]=a):a=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=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]=n):n=e[2];let r;return e[3]!==a?(r=o("svg",{"aria-hidden":"true",className:a,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=a,e[4]=r):r=e[4],r},qt="lunora.studio.rulesBannerDismissed",Hs=()=>{try{return globalThis.localStorage.getItem(qt)==="1"}catch{return!1}},Bs=()=>{try{globalThis.localStorage.setItem(qt,"1")}catch{}},zs=()=>{const t=k(18),e=ee(),[s,a]=lt(Vs);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{a(!0),Bs()},t[0]=n):n=t[0];const r=n;if(s)return null;let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=l):l=t[1];let i;t[2]!==e?(i=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=i):i=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]!==i||t[8]!==u?(c=w("span",{children:[i," ",d," ",u]}),t[7]=i,t[8]=u,t[9]=c):c=t[9];let f;t[10]!==e?(f=e("Dismiss"),t[10]=e,t[11]=f):f=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 m;t[13]!==f?(m=o("button",{"aria-label":f,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:r,type:"button",children:p}),t[13]=f,t[14]=m):m=t[14];let h;return t[15]!==c||t[16]!==m?(h=w("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:[l,c,m]}),t[15]=c,t[16]=m,t[17]=h):h=t[17],h};function Vs(){return Hs()}function Wt(t){const e=k(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(rt.Root,{"data-slot":"popover",...s}),e[2]=s,e[3]=a):a=e[3],a}function jt(t){const e=k(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(rt.Trigger,{"data-slot":"popover-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ut({align:t="end",alignOffset:e=0,className:s,keepMounted:a=!1,side:n="bottom",sideOffset:r=6,...l}){return o(rt.Portal,{keepMounted:a,children:o(rt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:r,children:o(rt.Popup,{className:L("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",...l})})})}const yt=768;function Ds(){const t=k(2),[e,s]=lt(void 0);let a,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>{const r=globalThis.matchMedia(`(max-width: ${yt-1}px)`),l=()=>{s(globalThis.innerWidth<yt)};return r.addEventListener("change",l),s(globalThis.innerWidth<yt),()=>{r.removeEventListener("change",l)}},n=[],t[0]=a,t[1]=n):(a=t[0],n=t[1]),nt(a,n),!!e}function Os(t){const e=k(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(se.Root,{"data-slot":"sheet",...s}),e[2]=s,e[3]=a):a=e[3],a}function Zs(t){const e=k(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(se.Portal,{"data-slot":"sheet-portal",...s}),e[2]=s,e[3]=a):a=e[3],a}function Fs(t){const e=k(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 n;e[3]!==s?(n=L("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]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Backdrop,{"data-slot":"sheet-overlay",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function qs({className:t,children:e,side:s="right",showCloseButton:a=!0,...n}){return w(Zs,{children:[o(Fs,{}),w(se.Popup,{"data-slot":"sheet-content","data-side":s,className:L("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),...n,children:[e,a&&w(se.Close,{"data-slot":"sheet-close",render:o(Vt,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[o(Ht,{icon:ms,strokeWidth:2}),o("span",{className:"sr-only",children:"Close"})]})]})]})}function Ws(t){const e=k(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 n;e[3]!==s?(n=L("flex flex-col gap-0.5 p-4",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sheet-header",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function js(t){const e=k(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 n;e[3]!==s?(n=L("text-sm font-medium text-foreground",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Title,{"data-slot":"sheet-title",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function Us(t){const e=k(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 n;e[3]!==s?(n=L("text-xs/relaxed text-muted-foreground",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o(se.Description,{"data-slot":"sheet-description",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}const Gs="sidebar_state",Ks=3600*24*7,Qs="16rem",Ys="18rem",Js="3rem",Xs="b",Gt=ot.createContext(null);function ht(){const t=ot.useContext(Gt);if(!t)throw new It("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function ea({defaultOpen:t=!0,open:e,onOpenChange:s,className:a,style:n,children:r,...l}){const i=Ds(),[d,u]=ot.useState(!1),[c,f]=ot.useState(t),p=e??c,m=x=>{const y=typeof x=="function"?x(p):x;s?s(y):f(y),document.cookie=`${Gs}=${y}; path=/; max-age=${Ks}`},h=()=>i?u(x=>!x):m(x=>!x),b=ot.useEffectEvent(()=>{h()});ot.useEffect(()=>{const x=y=>{y.key===Xs&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),b())};return globalThis.addEventListener("keydown",x),()=>globalThis.removeEventListener("keydown",x)},[]);const g={state:p?"expanded":"collapsed",open:p,setOpen:m,isMobile:i,openMobile:d,setOpenMobile:u,toggleSidebar:h};return o(Gt.Provider,{value:g,children:o("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Qs,"--sidebar-width-icon":Js,...n},className:L("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",a),...l,children:r})})}function ta({side:t="left",variant:e="sidebar",collapsible:s="offcanvas",className:a,children:n,dir:r,...l}){const{isMobile:i,state:d,openMobile:u,setOpenMobile:c}=ht();return s==="none"?o("div",{"data-slot":"sidebar",className:L("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",a),...l,children:n}):i?o(Os,{open:u,onOpenChange:c,...l,children:w(qs,{dir:r,"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":Ys},side:t,children:[w(Ws,{className:"sr-only",children:[o(js,{children:"Sidebar"}),o(Us,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:n})]})}):w("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:L("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:L("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),...l,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:n})})]})}function sa(t){const e=k(15);let s,a,n;e[0]!==t?({className:s,onClick:a,...n}=t,e[0]=t,e[1]=s,e[2]=a,e[3]=n):(s=e[1],a=e[2],n=e[3]);const{toggleSidebar:r}=ht();let l;e[4]!==s?(l=L(s),e[4]=s,e[5]=l):l=e[5];let i;e[6]!==a||e[7]!==r?(i=f=>{a?.(f),r()},e[6]=a,e[7]=r,e[8]=i):i=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=o(Ht,{icon:fs,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]!==n||e[12]!==l||e[13]!==i?(c=w(Vt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:l,onClick:i,...n,children:[d,u]}),e[11]=n,e[12]=l,e[13]=i,e[14]=c):c=e[14],c}function aa(t){const e=k(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 n;e[3]!==s?(n=L("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]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("main",{"data-slot":"sidebar-inset",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function oa(t){const e=k(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 n;e[3]!==s?(n=L("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function na(t){const e=k(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 n;e[3]!==s?(n=L("flex flex-col gap-2 p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function ra(t){const e=k(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 n;e[3]!==s?(n=L("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]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function la(t){const e=k(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 n;e[3]!==s?(n=L("relative flex w-full min-w-0 flex-col p-2",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function ia(t){const e=k(10);let s,a,n,r;if(e[0]!==t){const{className:d,render:u,...c}=t;s=u,r=zt,a="div",n=Bt({className:L("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]=n,e[4]=r}else s=e[1],a=e[2],n=e[3],r=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=l):l=e[5];let i;return e[6]!==s||e[7]!==a||e[8]!==n?(i={defaultTagName:a,props:n,render:s,state:l},e[6]=s,e[7]=a,e[8]=n,e[9]=i):i=e[9],r(i)}function da(t){const e=k(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 n;e[3]!==s?(n=L("w-full text-xs",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function Pt(t){const e=k(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 n;e[3]!==s?(n=L("flex w-full min-w-0 flex-col gap-0",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}function _t(t){const e=k(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 n;e[3]!==s?(n=L("group/menu-item relative",s),e[3]=s,e[4]=n):n=e[4];let r;return e[5]!==a||e[6]!==n?(r=o("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...a}),e[5]=a,e[6]=n,e[7]=r):r=e[7],r}const ca=hs("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 Kt({render:t,isActive:e=!1,variant:s="default",size:a="default",tooltip:n,className:r,...l}){const{isMobile:i,state:d}=ht(),u=zt({defaultTagName:"button",props:Bt({className:L(ca({variant:s,size:a}),r)},l),render:n?o(Rs,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:a,active:e}});return n?(typeof n=="string"&&(n={children:n}),w(Es,{children:[u,o(Is,{side:"right",align:"center",hidden:d!=="collapsed"||i,...n})]})):u}const ua=t=>t.replace("__lunora_admin__:",""),ma=()=>ls(ft.subscribe,ft.getSnapshot,ft.getSnapshot),fa=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",ha=t=>{const e=k(56),{entry:s,focused:a}=t,n=ee();let r;e[0]!==a?(r=$=>{$!==null&&a&&$.scrollIntoView({block:"nearest"})},e[0]=a,e[1]=r):r=e[1];const l=r;let i;e[2]!==s.functionPath||e[3]!==s.shardKey||e[4]!==s.summary?(i=()=>{bs(`${s.functionPath} ${s.summary}${s.shardKey===""?"":` (shard ${s.shardKey})`}`)},e[2]=s.functionPath,e[3]=s.shardKey,e[4]=s.summary,e[5]=i):i=e[5];const d=i,u=a&&"bg-accent ring-1 ring-inset ring-primary/40";let c;e[6]!==u?(c=L("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=c):c=e[7];let f;e[8]!==s.status?(f=fa(s.status),e[8]=s.status,e[9]=f):f=e[9];const p=s.status==="pending"?"…":s.status;let m;e[10]!==f||e[11]!==p?(m=o(it,{className:"mt-px shrink-0",variant:f,children:p}),e[10]=f,e[11]=p,e[12]=m):m=e[12];let h;e[13]!==s.functionPath?(h=ua(s.functionPath),e[13]=s.functionPath,e[14]=h):h=e[14];let b;e[15]!==h?(b=o("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:h}),e[15]=h,e[16]=b):b=e[16];let v;e[17]!==s.kind||e[18]!==n?(v=s.kind==="subscription"&&o(it,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=s.kind,e[18]=n,e[19]=v):v=e[19];let g;e[20]!==s.summary?(g=s.summary!==""&&o("span",{className:"min-w-0 truncate text-muted-foreground",children:s.summary}),e[20]=s.summary,e[21]=g):g=e[21];let x;e[22]!==s.shardKey?(x=s.shardKey!==""&&o("span",{className:"font-mono",children:s.shardKey}),e[22]=s.shardKey,e[23]=x):x=e[23];let y;e[24]!==s.resultCount||e[25]!==n?(y=s.resultCount!==void 0&&o("span",{children:n("{count} rows",{count:s.resultCount})}),e[24]=s.resultCount,e[25]=n,e[26]=y):y=e[26];let M;e[27]!==s.pushes||e[28]!==n?(M=s.pushes!==void 0&&s.pushes>0&&o("span",{children:n("{count} pushes",{count:s.pushes})}),e[27]=s.pushes,e[28]=n,e[29]=M):M=e[29];let C;e[30]!==s.durationMs?(C=s.durationMs!==void 0&&w("span",{children:[s.durationMs,"ms"]}),e[30]=s.durationMs,e[31]=C):C=e[31];let P;e[32]!==n?(P=n("Copy"),e[32]=n,e[33]=P):P=e[33];let N;e[34]!==d||e[35]!==P?(N=o("button",{"aria-label":P,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]=P,e[36]=N):N=e[36];let _;e[37]!==x||e[38]!==y||e[39]!==M||e[40]!==C||e[41]!==N?(_=w("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[x,y,M,C,N]}),e[37]=x,e[38]=y,e[39]=M,e[40]=C,e[41]=N,e[42]=_):_=e[42];let S;e[43]!==v||e[44]!==g||e[45]!==_||e[46]!==m||e[47]!==b?(S=w("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[m,b,v,g,_]}),e[43]=v,e[44]=g,e[45]=_,e[46]=m,e[47]=b,e[48]=S):S=e[48];let T;e[49]!==s.error?(T=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]=T):T=e[50];let E;return e[51]!==l||e[52]!==S||e[53]!==T||e[54]!==c?(E=w("li",{className:c,"data-testid":"oc-row",ref:l,children:[S,T]}),e[51]=l,e[52]=S,e[53]=T,e[54]=c,e[55]=E):E=e[55],E},pa=t=>{const e=k(62),{focusSeq:s,onClose:a,onShownChange:n,shown:r}=t,l=ee(),i=ma(),[d,u]=lt("");let c;if(e[0]!==i||e[1]!==s||e[2]!==d||e[3]!==a||e[4]!==n||e[5]!==r||e[6]!==l){const f=d.trim().toLowerCase(),p=i.filter(R=>(r==="errors"?R.status==="error":!0)&&(f===""||`${R.functionPath} ${R.summary} ${R.shardKey}`.toLowerCase().includes(f))).toReversed();let m;e[8]!==i?(m=i.filter(ga),e[8]=i,e[9]=m):m=e[9];const h=m.length;let b;e[10]!==l?(b=l("Operation console"),e[10]=l,e[11]=b):b=e[11];let v;e[12]!==l?(v=l("Operation console"),e[12]=l,e[13]=v):v=e[13];let g;e[14]!==v?(g=o("span",{className:"text-xs font-medium",children:v}),e[14]=v,e[15]=g):g=e[15];let x;e[16]!==i.length||e[17]!==l?(x=l("{count} calls",{count:i.length}),e[16]=i.length,e[17]=l,e[18]=x):x=e[18];let y;e[19]!==x?(y=o(it,{variant:"secondary",children:x}),e[19]=x,e[20]=y):y=e[20];let M;e[21]!==h||e[22]!==l?(M=h>0&&o(it,{variant:"destructive",children:l("{count} failed",{count:h})}),e[21]=h,e[22]=l,e[23]=M):M=e[23];const C=r==="errors",P=r==="errors"&&"bg-accent";let N;e[24]!==P?(N=L("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",P),e[24]=P,e[25]=N):N=e[25];let _;e[26]!==n||e[27]!==r?(_=()=>{n(r==="errors"?"all":"errors")},e[26]=n,e[27]=r,e[28]=_):_=e[28];let S;e[29]!==l?(S=l("Errors"),e[29]=l,e[30]=S):S=e[30];let T;e[31]!==N||e[32]!==_||e[33]!==S||e[34]!==C?(T=o("button",{"aria-pressed":C,className:N,"data-testid":"oc-filter-errors",onClick:_,type:"button",children:S}),e[31]=N,e[32]=_,e[33]=S,e[34]=C,e[35]=T):T=e[35];let E;e[36]!==l?(E=l("Filter"),e[36]=l,e[37]=E):E=e[37];let $;e[38]===Symbol.for("react.memo_cache_sentinel")?($=R=>{u(R.target.value)},e[38]=$):$=e[38];let z;e[39]!==l?(z=l("Filter"),e[39]=l,e[40]=z):z=e[40];let V;e[41]!==d||e[42]!==E||e[43]!==z?(V=o($t,{"aria-label":E,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:$,placeholder:z,value:d}),e[41]=d,e[42]=E,e[43]=z,e[44]=V):V=e[44];let H;e[45]!==l?(H=l("Clear"),e[45]=l,e[46]=H):H=e[46];let B;e[47]!==H?(B=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:ba,type:"button",children:H}),e[47]=H,e[48]=B):B=e[48];let D;e[49]!==l?(D=l("Hide"),e[49]=l,e[50]=D):D=e[50];let O;e[51]!==a||e[52]!==D?(O=o("button",{"aria-label":D,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]=D,e[53]=O):O=e[53];let F;e[54]!==T||e[55]!==V||e[56]!==B||e[57]!==O||e[58]!==g||e[59]!==y||e[60]!==M?(F=w("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[g,y,M,T,V,B,O]}),e[54]=T,e[55]=V,e[56]=B,e[57]=O,e[58]=g,e[59]=y,e[60]=M,e[61]=F):F=e[61],c=w("section",{"aria-label":b,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[F,p.length===0?o("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:l("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(R=>o(ha,{entry:R,focused:R.seq===s},R.seq))})]}),e[0]=i,e[1]=s,e[2]=d,e[3]=a,e[4]=n,e[5]=r,e[6]=l,e[7]=c}else c=e[7];return c};function ga(t){return t.status==="error"}function ba(){ft.clear()}const va=()=>{const t=k(310),e=ee();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 n;t[4]!==e?(n=e("Evals"),t[4]=e,t[5]=n):n=t[5];let r;t[6]!==e?(r=e("Analytics"),t[6]=e,t[7]=r):r=t[7];let l;t[8]!==e?(l=e("API"),t[8]=e,t[9]=l):l=t[9];let i;t[10]!==e?(i=e("Audit"),t[10]=e,t[11]=i):i=t[11];let d;t[12]!==e?(d=e("Auth audit"),t[12]=e,t[13]=d):d=t[13];let u;t[14]!==e?(u=e("Configuration"),t[14]=e,t[15]=u):u=t[15];let c;t[16]!==e?(c=e("Sessions"),t[16]=e,t[17]=c):c=t[17];let f;t[18]!==e?(f=e("Containers"),t[18]=e,t[19]=f):f=t[19];let p;t[20]!==e?(p=e("Dashboards"),t[20]=e,t[21]=p):p=t[21];let m;t[22]!==e?(m=e("Data"),t[22]=e,t[23]=m):m=t[23];let h;t[24]!==e?(h=e("Deployment health"),t[24]=e,t[25]=h):h=t[25];let b;t[26]!==e?(b=e("Log drains"),t[26]=e,t[27]=b):b=t[27];let v;t[28]!==e?(v=e("Export / Import"),t[28]=e,t[29]=v):v=t[29];let g;t[30]!==e?(g=e("Fan-out"),t[30]=e,t[31]=g):g=t[31];let x;t[32]!==e?(x=e("Files"),t[32]=e,t[33]=x):x=t[33];let y;t[34]!==e?(y=e("Flags"),t[34]=e,t[35]=y):y=t[35];let M;t[36]!==e?(M=e("Functions"),t[36]=e,t[37]=M):M=t[37];let C;t[38]!==e?(C=e("Health"),t[38]=e,t[39]=C):C=t[39];let P;t[40]!==e?(P=e("Home"),t[40]=e,t[41]=P):P=t[41];let N;t[42]!==e?(N=e("Performance"),t[42]=e,t[43]=N):N=t[43];let _;t[44]!==e?(_=e("Issues"),t[44]=e,t[45]=_):_=t[45];let S;t[46]!==e?(S=e("KV"),t[46]=e,t[47]=S):S=t[47];let T;t[48]!==e?(T=e("Logs"),t[48]=e,t[49]=T):T=t[49];let E;t[50]!==e?(E=e("Metrics"),t[50]=e,t[51]=E):E=t[51];let $;t[52]!==e?($=e("Migrations"),t[52]=e,t[53]=$):$=t[53];let z;t[54]!==e?(z=e("Notifications"),t[54]=e,t[55]=z):z=t[55];let V;t[56]!==e?(V=e("Organizations"),t[56]=e,t[57]=V):V=t[57];let H;t[58]!==e?(H=e("Time Travel"),t[58]=e,t[59]=H):H=t[59];let B;t[60]!==e?(B=e("Mail"),t[60]=e,t[61]=B):B=t[61];let D;t[62]!==e?(D=e("Payments"),t[62]=e,t[63]=D):D=t[63];let O;t[64]!==e?(O=e("Permissions"),t[64]=e,t[65]=O):O=t[65];let F;t[66]!==e?(F=e("Queues"),t[66]=e,t[67]=F):F=t[67];let R;t[68]!==e?(R=e("Realtime"),t[68]=e,t[69]=R):R=t[69];let X;t[70]!==e?(X=e("RLS Policies"),t[70]=e,t[71]=X):X=t[71];let q;t[72]!==e?(q=e("Scheduled"),t[72]=e,t[73]=q):q=t[73];let Q;t[74]!==e?(Q=e("Schema"),t[74]=e,t[75]=Q):Q=t[75];let W;t[76]!==e?(W=e("Security"),t[76]=e,t[77]=W):W=t[77];let j;t[78]!==e?(j=e("Settings"),t[78]=e,t[79]=j):j=t[79];let U;t[80]!==e?(U=e("SQL editor"),t[80]=e,t[81]=U):U=t[81];let G;t[82]!==e?(G=e("Traces"),t[82]=e,t[83]=G):G=t[83];let K;t[84]!==e?(K=e("Access Rules"),t[84]=e,t[85]=K):K=t[85];let Y;t[86]!==e?(Y=e("Users"),t[86]=e,t[87]=Y):Y=t[87];let Z;t[88]!==e?(Z=e("Vectors"),t[88]=e,t[89]=Z):Z=t[89];let J;t[90]!==e?(J=e("Workflows"),t[90]=e,t[91]=J):J=t[91];let dt;t[92]!==s||t[93]!==a||t[94]!==p||t[95]!==m||t[96]!==h||t[97]!==b||t[98]!==v||t[99]!==g||t[100]!==x||t[101]!==y||t[102]!==M||t[103]!==C||t[104]!==n||t[105]!==P||t[106]!==N||t[107]!==_||t[108]!==S||t[109]!==T||t[110]!==E||t[111]!==$||t[112]!==z||t[113]!==V||t[114]!==H||t[115]!==r||t[116]!==B||t[117]!==D||t[118]!==O||t[119]!==F||t[120]!==R||t[121]!==X||t[122]!==q||t[123]!==Q||t[124]!==W||t[125]!==j||t[126]!==l||t[127]!==U||t[128]!==G||t[129]!==K||t[130]!==Y||t[131]!==Z||t[132]!==J||t[133]!==i||t[134]!==d||t[135]!==u||t[136]!==c||t[137]!==f?(dt={advisorHealth:s,agents:a,evals:n,analytics:r,api:l,audit:i,authAudit:d,authConfig:u,authSessions:c,containers:f,dashboards:p,data:m,deploymentHealth:h,drains:b,export:v,fanout:g,files:x,flags:y,functions:M,health:C,home:P,insights:N,issues:_,kv:S,logs:T,metrics:E,migrations:$,notifications:z,organizations:V,pitr:H,mail:B,payments:D,permissions:O,queues:F,realtime:R,rls:X,schedule:q,schema:Q,security:W,settings:j,sql:U,traces:G,storageRules:K,users:Y,vectors:Z,workflows:J},t[92]=s,t[93]=a,t[94]=p,t[95]=m,t[96]=h,t[97]=b,t[98]=v,t[99]=g,t[100]=x,t[101]=y,t[102]=M,t[103]=C,t[104]=n,t[105]=P,t[106]=N,t[107]=_,t[108]=S,t[109]=T,t[110]=E,t[111]=$,t[112]=z,t[113]=V,t[114]=H,t[115]=r,t[116]=B,t[117]=D,t[118]=O,t[119]=F,t[120]=R,t[121]=X,t[122]=q,t[123]=Q,t[124]=W,t[125]=j,t[126]=l,t[127]=U,t[128]=G,t[129]=K,t[130]=Y,t[131]=Z,t[132]=J,t[133]=i,t[134]=d,t[135]=u,t[136]=c,t[137]=f,t[138]=dt):dt=t[138];const pt=dt;let ae;t[139]!==e?(ae=e("Advisors"),t[139]=e,t[140]=ae):ae=t[140];let oe;t[141]!==e?(oe=e("Auth"),t[141]=e,t[142]=oe):oe=t[142];let ne;t[143]!==e?(ne=e("Database"),t[143]=e,t[144]=ne):ne=t[144];let re;t[145]!==e?(re=e("Functions"),t[145]=e,t[146]=re):re=t[146];let le;t[147]!==e?(le=e("Observability"),t[147]=e,t[148]=le):le=t[148];let ie;t[149]!==e?(ie=e("Operations"),t[149]=e,t[150]=ie):ie=t[150];let de;t[151]!==e?(de=e("Overview"),t[151]=e,t[152]=de):de=t[152];let ce;t[153]!==e?(ce=e("Settings"),t[153]=e,t[154]=ce):ce=t[154];let ue;t[155]!==e?(ue=e("Storage"),t[155]=e,t[156]=ue):ue=t[156];let ct;t[157]!==ae||t[158]!==oe||t[159]!==ne||t[160]!==re||t[161]!==le||t[162]!==ie||t[163]!==de||t[164]!==ce||t[165]!==ue?(ct={advisors:ae,auth:oe,database:ne,functions:re,observability:le,operations:ie,overview:de,settings:ce,storage:ue},t[157]=ae,t[158]=oe,t[159]=ne,t[160]=re,t[161]=le,t[162]=ie,t[163]=de,t[164]=ce,t[165]=ue,t[166]=ct):ct=t[166];const gt=ct;let me;t[167]!==e?(me=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[167]=e,t[168]=me):me=t[168];let fe;t[169]!==e?(fe=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[169]=e,t[170]=fe):fe=t[170];let he;t[171]!==e?(he=e("Scores recorded by recordEvaluation — the latest verdict per eval, its trend, and the graded runs behind it."),t[171]=e,t[172]=he):he=t[172];let pe;t[173]!==e?(pe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[173]=e,t[174]=pe):pe=t[174];let ge;t[175]!==e?(ge=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[175]=e,t[176]=ge):ge=t[176];let be;t[177]!==e?(be=e("A durable log of admin state-changing operations."),t[177]=e,t[178]=be):be=t[178];let ve;t[179]!==e?(ve=e("Authentication and security events — sign-ins, MFA, and session changes."),t[179]=e,t[180]=ve):ve=t[180];let xe;t[181]!==e?(xe=e("Enabled plugins and session config (read-only)."),t[181]=e,t[182]=xe):xe=t[182];let ye;t[183]!==e?(ye=e("Browse and revoke active sessions across all users."),t[183]=e,t[184]=ye):ye=t[184];let we;t[185]!==e?(we=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[185]=e,t[186]=we):we=t[186];let ke;t[187]!==e?(ke=e("Chart widgets backed by saved read-only SQL queries."),t[187]=e,t[188]=ke):ke=t[188];let Ne;t[189]!==e?(Ne=e("Browse and edit rows across your shard and global tables."),t[189]=e,t[190]=Ne):Ne=t[190];let Me;t[191]!==e?(Me=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[191]=e,t[192]=Me):Me=t[192];let Se;t[193]!==e?(Se=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[193]=e,t[194]=Se):Se=t[194];let Ce;t[195]!==e?(Ce=e("Export a shard to NDJSON, or import rows from it."),t[195]=e,t[196]=Ce):Ce=t[196];let Pe;t[197]!==e?(Pe=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[197]=e,t[198]=Pe):Pe=t[198];let _e;t[199]!==e?(_e=e("Browse objects in your R2 storage buckets."),t[199]=e,t[200]=_e):_e=t[200];let Te;t[201]!==e?(Te=e("Inspect feature flags and their live evaluation under a targeting context."),t[201]=e,t[202]=Te):Te=t[202];let Le;t[203]!==e?(Le=e("Run registered queries, mutations, and actions."),t[203]=e,t[204]=Le):Le=t[204];let Ae;t[205]!==e?(Ae=e("At-a-glance connection, error, and shard signals."),t[205]=e,t[206]=Ae):Ae=t[206];let Ee;t[207]!==e?(Ee=e("Connection, health, and advisor summary for your deployment."),t[207]=e,t[208]=Ee):Ee=t[208];let Re;t[209]!==e?(Re=e("Surface slow functions, error spikes, and cache problems."),t[209]=e,t[210]=Re):Re=t[210];let Ie;t[211]!==e?(Ie=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[211]=e,t[212]=Ie):Ie=t[212];let $e;t[213]!==e?($e=e("A live stream of recent function logs."),t[213]=e,t[214]=$e):$e=t[214];let He;t[215]!==e?(He=e("Per-shard health and aggregate metrics."),t[215]=e,t[216]=He):He=t[216];let Be;t[217]!==e?(Be=e("Review migration status and run them."),t[217]=e,t[218]=Be):Be=t[218];let ze;t[219]!==e?(ze=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[219]=e,t[220]=ze):ze=t[220];let Ve;t[221]!==e?(Ve=e("Browse and manage organizations, members, and invitations."),t[221]=e,t[222]=Ve):Ve=t[222];let De;t[223]!==e?(De=e("Restore a shard to a point in the last 30 days."),t[223]=e,t[224]=De):De=t[224];let Oe;t[225]!==e?(Oe=e("Email your app sent, captured in dev."),t[225]=e,t[226]=Oe):Oe=t[226];let Ze;t[227]!==e?(Ze=e("Synced customers, subscriptions, and webhook events."),t[227]=e,t[228]=Ze):Ze=t[228];let Fe;t[229]!==e?(Fe=e("Inspect access policies per table, and probe a function as any identity."),t[229]=e,t[230]=Fe):Fe=t[230];let qe;t[231]!==e?(qe=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[231]=e,t[232]=qe):qe=t[232];let We;t[233]!==e?(We=e("Active WebSocket subscriptions on this shard."),t[233]=e,t[234]=We):We=t[234];let je;t[235]!==e?(je=e("Inspect row-level-security policies and roles, per table."),t[235]=e,t[236]=je):je=t[236];let Ue;t[237]!==e?(Ue=e("Inspect and cancel scheduled jobs."),t[237]=e,t[238]=Ue):Ue=t[238];let Ge;t[239]!==e?(Ge=e("Inspect each table and its columns."),t[239]=e,t[240]=Ge):Ge=t[240];let Ke;t[241]!==e?(Ke=e("Review admin gates, credentials, and log redaction."),t[241]=e,t[242]=Ke):Ke=t[242];let Qe;t[243]!==e?(Qe=e("Read-only deployment config — vars, secrets, and bindings."),t[243]=e,t[244]=Qe):Qe=t[244];let Ye;t[245]!==e?(Ye=e("Run read-only SQL against a shard."),t[245]=e,t[246]=Ye):Ye=t[246];let Je;t[247]!==e?(Je=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[247]=e,t[248]=Je):Je=t[248];let Xe;t[249]!==e?(Xe=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[249]=e,t[250]=Xe):Xe=t[250];let et;t[251]!==e?(et=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[251]=e,t[252]=et):et=t[252];let tt;t[253]!==e?(tt=e("Manage auth users — roles, bans, sessions, and identity."),t[253]=e,t[254]=tt):tt=t[254];let st;t[255]!==e?(st=e("Browse Vectorize indexes and run similarity searches."),t[255]=e,t[256]=st):st=t[256];let at;t[257]!==e?(at=e("Inspect declared Cloudflare Workflows and their bindings."),t[257]=e,t[258]=at):at=t[258];let ut;t[259]!==tt||t[260]!==st||t[261]!==at||t[262]!==me||t[263]!==fe||t[264]!==he||t[265]!==pe||t[266]!==ge||t[267]!==be||t[268]!==ve||t[269]!==xe||t[270]!==ye||t[271]!==we||t[272]!==ke||t[273]!==Ne||t[274]!==Me||t[275]!==Se||t[276]!==Ce||t[277]!==Pe||t[278]!==_e||t[279]!==Te||t[280]!==Le||t[281]!==Ae||t[282]!==Ee||t[283]!==Re||t[284]!==Ie||t[285]!==$e||t[286]!==He||t[287]!==Be||t[288]!==ze||t[289]!==Ve||t[290]!==De||t[291]!==Oe||t[292]!==Ze||t[293]!==Fe||t[294]!==qe||t[295]!==We||t[296]!==je||t[297]!==Ue||t[298]!==Ge||t[299]!==Ke||t[300]!==Qe||t[301]!==Ye||t[302]!==Je||t[303]!==Xe||t[304]!==et?(ut={advisorHealth:me,agents:fe,evals:he,analytics:pe,api:ge,audit:be,authAudit:ve,authConfig:xe,authSessions:ye,containers:we,dashboards:ke,data:Ne,deploymentHealth:Me,drains:Se,export:Ce,fanout:Pe,files:_e,flags:Te,functions:Le,health:Ae,home:Ee,insights:Re,issues:Ie,logs:$e,metrics:He,migrations:Be,notifications:ze,organizations:Ve,pitr:De,mail:Oe,payments:Ze,permissions:Fe,queues:qe,realtime:We,rls:je,schedule:Ue,schema:Ge,security:Ke,settings:Qe,sql:Ye,kv:Je,storageRules:Xe,traces:et,users:tt,vectors:st,workflows:at},t[259]=tt,t[260]=st,t[261]=at,t[262]=me,t[263]=fe,t[264]=he,t[265]=pe,t[266]=ge,t[267]=be,t[268]=ve,t[269]=xe,t[270]=ye,t[271]=we,t[272]=ke,t[273]=Ne,t[274]=Me,t[275]=Se,t[276]=Ce,t[277]=Pe,t[278]=_e,t[279]=Te,t[280]=Le,t[281]=Ae,t[282]=Ee,t[283]=Re,t[284]=Ie,t[285]=$e,t[286]=He,t[287]=Be,t[288]=ze,t[289]=Ve,t[290]=De,t[291]=Oe,t[292]=Ze,t[293]=Fe,t[294]=qe,t[295]=We,t[296]=je,t[297]=Ue,t[298]=Ge,t[299]=Ke,t[300]=Qe,t[301]=Ye,t[302]=Je,t[303]=Xe,t[304]=et,t[305]=ut):ut=t[305];const bt=ut;let mt;return t[306]!==gt||t[307]!==bt||t[308]!==pt?(mt={groupLabel:gt,tabDescription:bt,tabLabel:pt},t[306]=gt,t[307]=bt,t[308]=pt,t[309]=mt):mt=t[309],mt},xa=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("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},ya=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("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},wa=()=>{const t=k(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},ka=[{Icon:xa,value:"system"},{Icon:ya,value:"light"},{Icon:wa,value:"dark"}],Na=()=>{const t=k(19),{theme:e,setTheme:s}=As(),a=ee();let n;t[0]!==a?(n=a("Dark theme"),t[0]=a,t[1]=n):n=t[1];let r;t[2]!==a?(r=a("Light theme"),t[2]=a,t[3]=r):r=t[3];let l;t[4]!==a?(l=a("System theme"),t[4]=a,t[5]=l):l=t[5];let i;t[6]!==n||t[7]!==r||t[8]!==l?(i={dark:n,light:r,system:l},t[6]=n,t[7]=r,t[8]=l,t[9]=i):i=t[9];const d=i;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=ka.map(p=>{const{Icon:m,value:h}=p,b=e===h;return w("button",{"aria-checked":b,"aria-label":d[h],className:L("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",b?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${h}`,onClick:()=>{s(h)},role:"radio",title:d[h],type:"button",children:[b&&o(Ns.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(m,{})})]},h)}),t[12]=d,t[13]=s,t[14]=e,t[15]=c):c=t[15];let f;return t[16]!==u||t[17]!==c?(f=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]=f):f=t[18],f},Ma=t=>{const e=k(23),{domain:s,onOpenCommandPalette:a,page:n}=t,r=ee();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o(sa,{className:"-ms-1"}),e[0]=l):l=e[0];let i;e[1]!==r?(i=r("Breadcrumb"),e[1]=r,e[2]=i):i=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]!==n?(c=o("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=c):c=e[7];let f;e[8]!==i||e[9]!==d||e[10]!==c?(f=w("nav",{"aria-label":i,className:"flex items-center gap-1.5 text-[13px]",children:[d,u,c]}),e[8]=i,e[9]=d,e[10]=c,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=w("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 m;e[13]!==r?(m=r("Search…"),e[13]=r,e[14]=m):m=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=h):h=e[15];let b;e[16]!==a||e[17]!==m?(b=w("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,m,h]}),e[16]=a,e[17]=m,e[18]=b):b=e[18];let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=o("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:o(Na,{})}),e[19]=v):v=e[19];let g;return e[20]!==b||e[21]!==f?(g=w("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[l,f,b,v]}),e[20]=b,e[21]=f,e[22]=g):g=e[22],g},Sa=t=>{const e=k(3);let s,a;e[0]!==t?(s=()=>{if(t===void 0)return;const n=r=>{if(!r.ctrlKey||r.metaKey||r.altKey||r.shiftKey||r.repeat||r.key!=="`")return;const{target:l}=r;l instanceof HTMLElement&&(l.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(l.tagName))||(r.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},a=[t],e[0]=t,e[1]=s,e[2]=a):(s=e[1],a=e[2]),nt(s,a)},I=(t,e)=>A(()=>t().then(s=>({default:s[e]}))),Ca=I(()=>import("../packem_chunks/InsightsPanel.js"),"InsightsPanel"),Pa=A(()=>import("../packem_chunks/rls-panel.js")),_a=A(()=>import("../packem_chunks/AdvisorHealthPanel.js")),Ta=A(()=>import("../packem_chunks/SecurityAdvisorPanel.js")),La=A(()=>import("../packem_chunks/agents-panel.js")),Aa=I(()=>import("../packem_chunks/analytics-panel.js"),"AnalyticsPanel"),Ea=A(()=>import("../packem_chunks/ApiTab.js")),Ra=A(()=>import("../packem_chunks/auth-audit-panel.js")),Ia=A(()=>import("../packem_chunks/auth-config-panel.js")),$a=A(()=>import("../packem_chunks/auth-sessions-panel.js")),Ha=A(()=>import("../packem_chunks/organizations-panel.js")),Ba=I(()=>import("../packem_chunks/users-panel.js"),"UsersPanel"),za=A(()=>import("../packem_chunks/containers-panel.js")),Va=I(()=>import("../packem_chunks/DeploymentHealthPanel.js"),"DeploymentHealthPanel"),Da=I(()=>import("../packem_chunks/TableEditor.js"),"TableEditor"),Oa=I(()=>import("../packem_chunks/ExportImportPanel.js"),"ExportImportPanel"),Za=A(()=>import("../packem_chunks/migrations-route.js")),Fa={data:ys,migrations:xs},qa=I(()=>import("../packem_chunks/PitrPanel.js"),"PitrPanel"),Wa=A(()=>import("../packem_chunks/flags-panel.js")),ja=I(()=>import("../packem_chunks/FunctionRunner.js"),"FunctionRunner"),Ua=I(()=>import("../packem_chunks/FunctionStatsPanel.js"),"FunctionStatsPanel"),Ga=A(()=>import("../packem_chunks/issues-panel.js")),Ka=I(()=>import("../packem_chunks/AuditPanel.js"),"AuditPanel"),Qa=A(()=>import("../packem_chunks/log-drains-panel.js")),Ya=A(()=>import("../packem_chunks/LogsPanel.js").then(t=>({default:t.LogsPanel}))),Ja=I(()=>import("../packem_chunks/MailPanel.js"),"MailPanel"),Xa=I(()=>import("../packem_chunks/schedule-panel.js"),"SchedulePanel"),eo=A(()=>import("../packem_chunks/subscriptions-panel.js")),to=A(()=>import("../packem_chunks/sync-client-panel.js")),so=I(()=>import("../packem_chunks/kv-browser.js"),"KvBrowser"),ao=A(()=>import("../packem_chunks/NotificationsPanel.js")),oo=I(()=>import("../packem_chunks/payments-panel.js"),"PaymentsPanel"),no=I(()=>import("../packem_chunks/permissions-panel.js"),"PermissionsPanel"),ro=A(()=>import("../packem_chunks/queues-panel.js")),lo=A(()=>import("../packem_chunks/dashboards-panel.js")),io=A(()=>import("../packem_chunks/fanout-panel.js")),co=I(()=>import("../packem_chunks/HealthPanel.js"),"HealthPanel"),uo=I(()=>import("../packem_chunks/MetricsPanel.js"),"MetricsPanel"),mo=I(()=>import("../packem_chunks/SchemaViewer.js"),"SchemaViewer"),fo=I(()=>import("../packem_chunks/SettingsPanel.js"),"SettingsPanel"),ho=I(()=>import("../packem_chunks/SqlEditorPanel.js"),"SqlEditorPanel"),po=I(()=>import("../packem_chunks/FileBrowser.js"),"FileBrowser"),go=A(()=>import("../packem_chunks/storage-rules-panel.js")),bo=A(()=>import("../packem_chunks/traces-panel.js")),vo=A(()=>import("../packem_chunks/evals-panel.js")),xo=I(()=>import("../packem_chunks/vector-browser.js"),"VectorBrowser"),yo=A(()=>import("../packem_chunks/workflows-panel.js")),Qt=Et(null),wo={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"}),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"}),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"}),queues:o("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),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"})},Tt=[{key:"overview",tabs:["home","dashboards"]},{key:"database",tabs:["data","sql","schema","migrations","vectors","pitr","export"]},{key:"functions",tabs:["functions","api","workflows","agents","queues"]},{key:"auth",tabs:["users","organizations","authSessions","authAudit","authConfig"]},{key:"storage",tabs:["files","storageRules","kv"]},{key:"observability",tabs:["issues","logs","traces","evals","audit","realtime","fanout","containers","metrics","analytics","health","deploymentHealth"]},{key:"advisors",tabs:["advisorHealth","security","rls","permissions","insights"]},{key:"operations",tabs:["schedule","mail","drains","notifications","payments","flags"]},{key:"settings",tabs:["settings"]}],ko={analytics:"analytics",authAudit:"auth",authConfig:"auth",authSessions:"auth",containers:"containers",files:"storage",flags:"flags",kv:"kv",mail:"mail",notifications:"notifications",organizations:"auth",payments:"payments",queues:"queues",schedule:"scheduler",storageRules:"storage",users:"auth",vectors:"vectors",workflows:"workflows"},Lt=(t,e)=>{const s=ko[t];return s===void 0||e[s]},kt=t=>{const e=k(2),{tab:s}=t,a=wo[s];let n;return e[0]!==a?(n=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]=n):n=e[1],n},No=t=>t,Yt=No(["home","data","sql","functions","api","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","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),Mo=new Set(["api","data","migrations","sql"]),So=t=>{const e=t.split("/").findLast(Boolean)??"";return Yt.includes(e)?e:"home"},Co=t=>{const e=k(19),{chrome:s,connected:a}=t,n=ee();let r;e[0]!==n?(r=n("admin token"),e[0]=n,e[1]=r):r=e[1];let l;e[2]!==r?(l=o("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:r}),e[2]=r,e[3]=l):l=e[3];let i;e[4]!==s.onTokenChange||e[5]!==s.token?(i=o($t,{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]=i):i=e[6];let d;e[7]!==a||e[8]!==n?(d=a&&w("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:"⚠"}),n("Token rides the WebSocket URL — it can surface in browser DevTools and server logs. Use a dev-only token.")]}),e[7]=a,e[8]=n,e[9]=d):d=e[9];let u;e[10]!==s.clearToken||e[11]!==a||e[12]!==n?(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:n("Clear")}),e[10]=s.clearToken,e[11]=a,e[12]=n,e[13]=u):u=e[13];let c;return e[14]!==l||e[15]!==i||e[16]!==d||e[17]!==u?(c=w("div",{className:"flex flex-col gap-2",children:[l,i,d,u]}),e[14]=l,e[15]=i,e[16]=d,e[17]=u,e[18]=c):c=e[18],c},Po=t=>{const e=k(25),{current:s,group:a,groupLabel:n,selectTab:r,tabDescription:l,tabLabel:i}=t,d=a.tabs.includes(s)?"page":void 0,u=n[a.key],c=a.tabs[0];let f;e[0]!==c?(f=o(kt,{tab:c}),e[0]=c,e[1]=f):f=e[1];let p;e[2]!==d||e[3]!==u||e[4]!==f?(p=o(jt,{"aria-current":d,"aria-label":u,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:f}),e[2]=d,e[3]=u,e[4]=f,e[5]=p):p=e[5];const m=n[a.key];let h;e[6]!==m?(h=o("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:m}),e[6]=m,e[7]=h):h=e[7];let b;if(e[8]!==s||e[9]!==a.tabs||e[10]!==r||e[11]!==l||e[12]!==i){let x;e[14]!==s||e[15]!==r||e[16]!==l||e[17]!==i?(x=y=>w("button",{"aria-current":s===y?"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","data-tab":y,"data-testid":`dash-tab-${y}`,onClick:r,title:l[y],type:"button",children:[o(kt,{tab:y}),o("span",{children:i[y]})]},y),e[14]=s,e[15]=r,e[16]=l,e[17]=i,e[18]=x):x=e[18],b=a.tabs.map(x),e[8]=s,e[9]=a.tabs,e[10]=r,e[11]=l,e[12]=i,e[13]=b}else b=e[13];let v;e[19]!==h||e[20]!==b?(v=w(Ut,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[h,b]}),e[19]=h,e[20]=b,e[21]=v):v=e[21];let g;return e[22]!==p||e[23]!==v?(g=w(Wt,{children:[p,v]}),e[22]=p,e[23]=v,e[24]=g):g=e[24],g},_o=t=>{const e=k(45),{chrome:s,collapsed:a,connected:n}=t,r=ee();if(s===null){let y;e[0]!==r?(y=r("Admin"),e[0]=r,e[1]=y):y=e[1];let M;e[2]===Symbol.for("react.memo_cache_sentinel")?(M=o("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=M):M=e[2];let C;e[3]!==r?(C=r("Admin"),e[3]=r,e[4]=C):C=e[4];let P;e[5]!==C?(P=o("span",{className:"truncate text-[13px] font-medium",children:C}),e[5]=C,e[6]=P):P=e[6];let N;e[7]!==r?(N=r("Studio"),e[7]=r,e[8]=N):N=e[8];let _;e[9]!==N?(_=o("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=_):_=e[10];let S;e[11]!==P||e[12]!==_?(S=w("span",{className:"grid flex-1 text-start leading-tight",children:[P,_]}),e[11]=P,e[12]=_,e[13]=S):S=e[13];let T;return e[14]!==y||e[15]!==S?(T=w(Kt,{className:"data-active:bg-transparent",size:"lg",tooltip:y,children:[M,S]}),e[14]=y,e[15]=S,e[16]=T):T=e[16],T}const l=a?"mx-auto size-8 justify-center":"w-full p-2";let i;e[17]!==l?(i=L("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",l),e[17]=l,e[18]=i):i=e[18];let d;e[19]!==n||e[20]!==r?(d=r(n?"Connected":"Not connected"),e[19]=n,e[20]=r,e[21]=d):d=e[21];const u=n?"bg-success":"bg-muted-foreground/50";let c;e[22]!==u?(c=L("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 f;e[24]!==c?(f=w("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]=f):f=e[25];let p;e[26]!==a||e[27]!==n||e[28]!==r?(p=!a&&w(Rt,{children:[w("span",{className:"grid flex-1 text-start leading-tight",children:[o("span",{className:"truncate text-[13px] font-medium",children:r("Admin")}),o("span",{className:"truncate text-[11px] text-muted-foreground",children:r(n?"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]=n,e[28]=r,e[29]=p):p=e[29];let m;e[30]!==i||e[31]!==d||e[32]!==f||e[33]!==p?(m=w(jt,{className:i,"data-testid":"dash-app-connect",title:d,children:[f,p]}),e[30]=i,e[31]=d,e[32]=f,e[33]=p,e[34]=m):m=e[34];const h=a?"end":"start",b=a?"right":"top";let v;e[35]!==s||e[36]!==n?(v=o(Co,{chrome:s,connected:n}),e[35]=s,e[36]=n,e[37]=v):v=e[37];let g;e[38]!==b||e[39]!==v||e[40]!==h?(g=o(Ut,{align:h,keepMounted:!0,side:b,children:v}),e[38]=b,e[39]=v,e[40]=h,e[41]=g):g=e[41];let x;return e[42]!==g||e[43]!==m?(x=w(Wt,{children:[m,g]}),e[42]=g,e[43]=m,e[44]=x):x=e[44],x},To=t=>{const e=k(28),{chrome:s,connected:a,current:n,groupLabel:r,groups:l,selectTab:i,tabDescription:d,tabLabel:u}=t,c=ee(),{state:f}=ht(),p=f==="collapsed",m=p&&"justify-center px-0";let h;e[0]!==m?(h=L("flex items-center gap-2.5 px-1.5 py-1",m),e[0]=m,e[1]=h):h=e[1];let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=o($s,{className:"size-9 shrink-0 text-foreground"}),e[2]=b):b=e[2];let v;e[3]!==p||e[4]!==a||e[5]!==c?(v=!p&&w(Rt,{children:[w("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:c("Studio")})]}),o(it,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:c(a?"Live":"Local")})]}),e[3]=p,e[4]=a,e[5]=c,e[6]=v):v=e[6];let g;e[7]!==h||e[8]!==v?(g=o(oa,{children:w("div",{className:h,children:[b,v]})}),e[7]=h,e[8]=v,e[9]=g):g=e[9];let x;e[10]!==p||e[11]!==n||e[12]!==r||e[13]!==l||e[14]!==i||e[15]!==d||e[16]!==u?(x=p?l.map(P=>o(Po,{current:n,group:P,groupLabel:r,selectTab:i,tabDescription:d,tabLabel:u},P.key)):l.map(P=>w(la,{children:[o(ia,{className:"text-[11px] font-medium tracking-wider uppercase",children:r[P.key]}),o(da,{children:o(Pt,{children:P.tabs.map(N=>o(_t,{children:w(Kt,{className:"data-active:text-foreground dark:data-active:text-royal-amethyst data-active:shadow-[inset_2px_0_0_0_var(--royal-amethyst)]","data-tab":N,"data-testid":`dash-tab-${N}`,isActive:n===N,onClick:i,title:d[N],tooltip:d[N],children:[o(kt,{tab:N}),o("span",{children:u[N]})]})},N))})})]},P.key)),e[10]=p,e[11]=n,e[12]=r,e[13]=l,e[14]=i,e[15]=d,e[16]=u,e[17]=x):x=e[17];let y;e[18]!==x?(y=o(ra,{children:x}),e[18]=x,e[19]=y):y=e[19];let M;e[20]!==s||e[21]!==p||e[22]!==a?(M=o(na,{children:o(Pt,{children:o(_t,{children:o(_o,{chrome:s,collapsed:p,connected:a})})})}),e[20]=s,e[21]=p,e[22]=a,e[23]=M):M=e[23];let C;return e[24]!==g||e[25]!==y||e[26]!==M?(C=w(ta,{collapsible:"icon",variant:"inset",children:[g,y,M]}),e[24]=g,e[25]=y,e[26]=M,e[27]=C):C=e[27],C},Jt=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=w("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[w("div",{className:"flex items-center gap-2",children:[o(vt,{className:"h-8 w-40"}),o(vt,{className:"h-8 w-24"})]}),o(vt,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Lo=()=>{const t=k(64),e=ee(),s=At();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ho},t[0]=a):a=t[0];const n=ns(a);let r,l;t[1]!==n?(r=So(n),l=Mo.has(r),t[1]=n,t[2]=r,t[3]=l):(r=t[2],l=t[3]);const i=l,d=us(),u=d?.toggle;Sa(u);const c=gs(),{groupLabel:f,tabDescription:p,tabLabel:m}=va();let h;t[4]!==c?(h=Z=>({...Z,tabs:Z.tabs.filter(J=>Lt(J,c))}),t[4]=c,t[5]=h):h=t[5];const b=Tt.map(h).filter(Bo);let v,g;t[6]!==r||t[7]!==c||t[8]!==s?(v=()=>{Lt(r,c)||wt(s({replace:!0,to:"/home"}))},g=[r,c,s],t[6]=r,t[7]=c,t[8]=s,t[9]=v,t[10]=g):(v=t[9],g=t[10]),nt(v,g);let x;t[11]!==s?(x=Z=>{wt(s({to:`/${Z.currentTarget.dataset.tab??""}`}))},t[11]=s,t[12]=x):x=t[12];const y=x;let M,C;t[13]!==r||t[14]!==m?(M=()=>{typeof document<"u"&&(document.title=`${m[r]} · lunora`)},C=[r,m],t[13]=r,t[14]=m,t[15]=M,t[16]=C):(M=t[15],C=t[16]),nt(M,C);const P=b.find(Z=>Z.tabs.includes(r))??Tt[0];let N;t[17]!==f||t[18]!==m?(N=Z=>Z.tabs.map(J=>({group:f[Z.key],label:m[J],to:`/${J}`})),t[17]=f,t[18]=m,t[19]=N):N=t[19];const _=b.flatMap(N),S=Nt(Qt),T=S!==null&&S.token!=="";let E;t[20]!==_?(E=o(ws,{items:_}),t[20]=_,t[21]=E):E=t[21];let $;t[22]!==S||t[23]!==T||t[24]!==r||t[25]!==f||t[26]!==y||t[27]!==p||t[28]!==m||t[29]!==b?($=o(To,{chrome:S,connected:T,current:r,groupLabel:f,groups:b,selectTab:y,tabDescription:p,tabLabel:m}),t[22]=S,t[23]=T,t[24]=r,t[25]=f,t[26]=y,t[27]=p,t[28]=m,t[29]=b,t[30]=$):$=t[30];const z=f[P.key],V=m[r];let H;t[31]!==z||t[32]!==V?(H=o(Ma,{domain:z,onOpenCommandPalette:ks,page:V}),t[31]=z,t[32]=V,t[33]=H):H=t[33];let B;t[34]!==S?.rulesInstalled?(B=S?.rulesInstalled===!1&&o(zs,{}),t[34]=S?.rulesInstalled,t[35]=B):B=t[35];const D=`dash-tab-${r}`,O=i?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",F=m[r];let R;t[36]!==e||t[37]!==F?(R=e("{title} failed",{title:F}),t[36]=e,t[37]=F,t[38]=R):R=t[38];const X=m[r];let q;t[39]!==e?(q=e("Try again"),t[39]=e,t[40]=q):q=t[40];let Q;t[41]===Symbol.for("react.memo_cache_sentinel")?(Q=o(is,{fallback:o(Jt,{}),children:o(rs,{})}),t[41]=Q):Q=t[41];let W;t[42]!==r||t[43]!==R||t[44]!==X||t[45]!==q?(W=o(ds,{fallbackTitle:R,label:X,retryLabel:q,children:Q},r),t[42]=r,t[43]=R,t[44]=X,t[45]=q,t[46]=W):W=t[46];let j;t[47]!==O||t[48]!==W?(j=o("div",{className:O,children:W}),t[47]=O,t[48]=W,t[49]=j):j=t[49];let U;t[50]!==d?(U=d?.open===!0&&o(pa,{focusSeq:d.focusSeq,onClose:d.close,onShownChange:d.setShown,shown:d.shown}),t[50]=d,t[51]=U):U=t[51];let G;t[52]!==D||t[53]!==j||t[54]!==U?(G=w("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,U]}),t[52]=D,t[53]=j,t[54]=U,t[55]=G):G=t[55];let K;t[56]!==H||t[57]!==B||t[58]!==G?(K=w(aa,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[H,B,G]}),t[56]=H,t[57]=B,t[58]=G,t[59]=K):K=t[59];let Y;return t[60]!==$||t[61]!==K||t[62]!==E?(Y=w(ea,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[E,$,K]}),t[60]=$,t[61]=K,t[62]=E,t[63]=Y):Y=t[63],Y},Ao=()=>{const t=k(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o(cs,{children:o(Lo,{})}),t[0]=e):e=t[0],e},Eo=t=>{const e=k(5),{initialShardKey:s,schemaEditable:a}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const r=as(n),{table:l}=r,i=typeof l=="string"?l:void 0;let d;return e[1]!==s||e[2]!==i||e[3]!==a?(d=o(mo,{initialShardKey:s,initialTable:i,schemaEditable:a}),e[1]=s,e[2]=i,e[3]=a,e[4]=d):d=e[4],d},Ro=()=>{const t=k(3),e=At();let s,a;return t[0]!==e?(s=()=>{wt(e({replace:!0,to:"/home"}))},a=[e],t[0]=e,t[1]=s,t[2]=a):(s=t[1],a=t[2]),nt(s,a),null},Io=({basePath:t,dataEditable:e=!1,functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:r,runAsIdentity:l=!1,schemaEditable:i=!1,scheduledCancel:d,scheduledCron:u,scheduledLoad:c})=>{const f=Xt({component:Ao}),p={agents:o(La,{initialShardKey:a}),analytics:o(Aa,{}),api:o(Ea,{functions:s,initialShardKey:a,openApiSpec:n,openRpcSpec:r}),audit:o(Ka,{initialShardKey:a}),authAudit:o(Ra,{}),authConfig:o(Ia,{}),authSessions:o($a,{}),containers:o(za,{}),dashboards:o(lo,{initialShardKey:a}),data:o(Da,{editable:e,initialShardKey:a}),deploymentHealth:o(Va,{}),drains:o(Qa,{}),export:o(Oa,{initialShardKey:a}),fanout:o(io,{initialShardKey:a}),files:o(po,{}),kv:o(so,{}),flags:o(Wa,{initialShardKey:a}),functions:w("div",{className:"flex flex-col gap-8",children:[o(Ua,{functions:s,initialShardKey:a}),o(ja,{functions:s,runAsIdentity:l})]}),health:o(co,{initialShardKey:a}),home:o(ps,{initialShardKey:a}),insights:o(Ca,{initialShardKey:a}),issues:o(Ga,{initialShardKey:a}),logs:o(Ya,{initialShardKey:a}),traces:o(bo,{initialShardKey:a}),evals:o(vo,{initialShardKey:a}),metrics:o(uo,{initialShardKey:a}),migrations:o(Za,{initialShardKey:a}),notifications:o(ao,{}),organizations:o(Ha,{}),permissions:o(no,{functions:s,runAsIdentity:l,schemaEditable:i}),pitr:o(qa,{initialShardKey:a}),mail:o(Ja,{}),payments:o(oo,{}),queues:o(ro,{}),realtime:w("div",{className:"flex flex-col gap-8",children:[o(eo,{initialShardKey:a}),o(to,{})]}),rls:o(Pa,{}),schedule:o(Xa,{loadCronJobs:u,scheduledCancel:d,scheduledLoad:c}),schema:o(Eo,{initialShardKey:a,schemaEditable:i}),advisorHealth:o(_a,{}),security:o(Ta,{}),settings:o(fo,{initialShardKey:a}),sql:o(ho,{initialShardKey:a}),storageRules:o(go,{}),users:o(Ba,{}),vectors:o(xo,{}),workflows:o(yo,{})},m=St({component:()=>p.home,getParentRoute:()=>f,path:"/"}),h=Yt.map(g=>St({component:()=>p[g],getParentRoute:()=>f,path:`/${g}`,validateSearch:Fa[g]})),b=f.addChildren([m,...h]),v="window"in globalThis?es():ts({initialEntries:["/home"]});return ss({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Ro,defaultPendingComponent:Jt,defaultPendingMinMs:0,defaultPendingMs:0,history:v,routeTree:b})},$o=t=>{const e=k(17),{basePath:s,chrome:a,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:i,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:f,scheduledCron:p,scheduledLoad:m}=t;let h;e[0]!==s||e[1]!==n||e[2]!==r||e[3]!==l||e[4]!==i||e[5]!==d||e[6]!==u||e[7]!==f||e[8]!==p||e[9]!==m||e[10]!==c?(h=Io({basePath:s,dataEditable:n,functions:r,initialShardKey:l,openApiSpec:i,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:f,scheduledCron:p,scheduledLoad:m}),e[0]=s,e[1]=n,e[2]=r,e[3]=l,e[4]=i,e[5]=d,e[6]=u,e[7]=f,e[8]=p,e[9]=m,e[10]=c,e[11]=h):h=e[11];const b=h,v=a??null;let g;e[12]!==b?(g=o(os,{router:b}),e[12]=b,e[13]=g):g=e[13];let x;return e[14]!==v||e[15]!==g?(x=o(Qt,{value:v,children:g}),e[14]=v,e[15]=g,e[16]=x):x=e[16],x},hn=t=>{const e=k(17),{basePath:s,chrome:a,dataEditable:n,functions:r,i18n:l,initialShardKey:i,locale:d,openApiSpec:u,openRpcSpec:c,runAsIdentity:f,schemaEditable:p,scheduledCancel:m,scheduledCron:h,scheduledLoad:b}=t;let v;e[0]!==s||e[1]!==a||e[2]!==n||e[3]!==r||e[4]!==i||e[5]!==u||e[6]!==c||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==b||e[11]!==p?(v=o(Ls,{children:o($o,{basePath:s,chrome:a,dataEditable:n,functions:r,initialShardKey:i,openApiSpec:u,openRpcSpec:c,runAsIdentity:f,scheduledCancel:m,scheduledCron:h,scheduledLoad:b,schemaEditable:p})}),e[0]=s,e[1]=a,e[2]=n,e[3]=r,e[4]=i,e[5]=u,e[6]=c,e[7]=f,e[8]=m,e[9]=h,e[10]=b,e[11]=p,e[12]=v):v=e[12];const g=v;if(l===void 0&&d===void 0)return g;let x;return e[13]!==l||e[14]!==d||e[15]!==g?(x=o(vs,{i18n:l,locale:d,children:g}),e[13]=l,e[14]=d,e[15]=g,e[16]=x):x=e[16],x};function Ho(t){return t.location.pathname}function Bo(t){return t.tabs.length>0}export{$s as B,hn as S,Ts as T,fn as a,Os as b,qs as c,Ws as d,js as e,As as u};
@@ -1 +1 @@
1
- import{c as k}from"react/compiler-runtime";import{useT as $}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{jsxs as N,jsx as p}from"react/jsx-runtime";import{useRef as F,useEffect as L,useState as R,useMemo as O}from"react";import{f as T,b as I}from"./internal-CwaF9YNk.js";import{useVirtualizer as S}from"@tanstack/react-virtual";import{c as P}from"./utils-bhneXptQ.js";import{f as V}from"./virtual-rect-D_j7aLxX.js";const B=[25,50,100,250],A=h=>{const e=k(18),{onChange:r,options:a,prefix:s,value:v}=h,i=$();let b;e[0]!==r?(b=c=>{r(Number.parseInt(c.target.value,10))},e[0]=r,e[1]=b):b=e[1];const t=b,d=`${s}-page-size`;let o;e[2]!==i?(o=i("Rows per page"),e[2]=i,e[3]=o):o=e[3];let n;e[4]!==o?(n=p("span",{children:o}),e[4]=o,e[5]=n):n=e[5];const l=`${s}-page-size`,f=`${s}-page-size`;let m;e[6]!==a?(m=a.map(q),e[6]=a,e[7]=m):m=e[7];let g;e[8]!==t||e[9]!==l||e[10]!==f||e[11]!==m||e[12]!==v?(g=p("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":l,id:f,onChange:t,value:v,children:m}),e[8]=t,e[9]=l,e[10]=f,e[11]=m,e[12]=v,e[13]=g):g=e[13];let u;return e[14]!==d||e[15]!==n||e[16]!==g?(u=N("label",{className:"flex items-center gap-1.5",htmlFor:d,children:[n,g]}),e[14]=d,e[15]=n,e[16]=g,e[17]=u):u=e[17],u},G=h=>{const e=k(25),{onJump:r,page:a,pages:s,prefix:v}=h,i=$();let b;e[0]!==r||e[1]!==s?(b=w=>{const C=Number.parseInt(w,10);Number.isNaN(C)||r(Math.min(Math.max(1,C),Math.max(1,s)))},e[0]=r,e[1]=s,e[2]=b):b=e[2];const t=b;let d;e[3]!==t?(d=w=>{w.key==="Enter"&&t(w.currentTarget.value)},e[3]=t,e[4]=d):d=e[4];const o=d;let n;e[5]!==t?(n=w=>{t(w.currentTarget.value)},e[5]=t,e[6]=n):n=e[6];const l=n;let f;e[7]!==i?(f=i("Page"),e[7]=i,e[8]=f):f=e[8];let m;e[9]!==i?(m=i("Page"),e[9]=i,e[10]=m):m=e[10];const g=`${v}-page-jump`,u=Math.max(1,s);let c;e[11]!==l||e[12]!==o||e[13]!==a||e[14]!==m||e[15]!==g||e[16]!==u?(c=p("input",{"aria-label":m,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":g,defaultValue:a,max:u,min:1,onBlur:l,onKeyDown:o,type:"number"},a),e[11]=l,e[12]=o,e[13]=a,e[14]=m,e[15]=g,e[16]=u,e[17]=c):c=e[17];let x;e[18]!==s||e[19]!==i?(x=i("of {pages}",{pages:s}),e[18]=s,e[19]=i,e[20]=x):x=e[20];let y;return e[21]!==f||e[22]!==c||e[23]!==x?(y=N("span",{className:"flex items-center gap-1.5 tabular-nums",children:[f,c,x]}),e[21]=f,e[22]=c,e[23]=x,e[24]=y):y=e[24],y},_=({hasNext:h,hasPrevious:e,onJumpToPage:r,onNext:a,onPageSizeChange:s,onPrevious:v,pageSize:i,pageSizeOptions:b=B,prefix:t,rangeEnd:d,rangeStart:o,total:n})=>{const l=$(),f="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",m=i!==void 0&&i>0?Math.max(1,Math.ceil(n/i)):1,g=i!==void 0&&i>0?Math.floor(Math.max(0,o-1)/i)+1:1;return N("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[N("div",{className:"flex items-center gap-3",children:[i!==void 0&&s!==void 0&&p(A,{onChange:s,options:b,prefix:t,value:i}),p("span",{className:"tabular-nums","data-testid":`${t}-page-info`,children:l("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:d,rangeStart:o,total:n})})]}),N("div",{className:"flex items-center gap-3",children:[p("button",{className:f,"data-testid":`${t}-prev`,disabled:!e,onClick:v,type:"button",children:l("Previous")}),i!==void 0&&r!==void 0&&p(G,{onJump:r,page:g,pages:m,prefix:t}),p("button",{className:f,"data-testid":`${t}-next`,disabled:!h,onClick:a,type:"button",children:l("Next")})]})]})};function q(h){return p("option",{value:h,children:h},h)}const j=h=>h==null?"∅":h===""?"(empty)":typeof h=="object"?JSON.stringify(h):String(h),D=h=>{const e=k(32),{column:r,onFacetFilter:a,state:s}=h,v=$();let i;e[0]!==r||e[1]!==a||e[2]!==s.result?.values?(i=u=>{const c=Number(u.currentTarget.dataset.index),x=s.result?.values[c];x!==void 0&&a(r,x.value)},e[0]=r,e[1]=a,e[2]=s.result?.values,e[3]=i):i=e[3];const b=i,t=`db-facet-${r}`;let d;e[4]!==r?(d=p("span",{className:"font-medium text-foreground",children:r}),e[4]=r,e[5]=d):d=e[5];let o;e[6]!==s.loading||e[7]!==s.result||e[8]!==v?(o=s.loading&&s.result===null&&p("span",{className:"text-muted-foreground",children:v("Loading…")}),e[6]=s.loading,e[7]=s.result,e[8]=v,e[9]=o):o=e[9];let n;e[10]!==s.error?(n=s.error!==null&&p("span",{className:"text-destructive",role:"alert",children:s.error}),e[10]=s.error,e[11]=n):n=e[11];let l;e[12]!==s.result?.values?(l=s.result?.values??[],e[12]=s.result?.values,e[13]=l):l=e[13];let f;if(e[14]!==r||e[15]!==b||e[16]!==l){let u;e[18]!==r||e[19]!==b?(u=(c,x)=>N("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":x,"data-testid":`db-facet-value-${r}`,onClick:b,type:"button",children:[p("span",{className:"truncate",children:j(c.value)}),p("span",{className:"shrink-0 tabular-nums text-foreground/70",children:c.count})]},j(c.value)),e[18]=r,e[19]=b,e[20]=u):u=e[20],f=l.map(u),e[14]=r,e[15]=b,e[16]=l,e[17]=f}else f=e[17];let m;e[21]!==r||e[22]!==s.result||e[23]!==v?(m=s.result?.truncated===!0&&p("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${r}`,children:v("Showing the {n} most common values.",{n:s.result.values.length})}),e[21]=r,e[22]=s.result,e[23]=v,e[24]=m):m=e[24];let g;return e[25]!==t||e[26]!==d||e[27]!==o||e[28]!==n||e[29]!==f||e[30]!==m?(g=N("section",{className:"flex flex-col gap-1","data-testid":t,children:[d,o,n,f,m]}),e[25]=t,e[26]=d,e[27]=o,e[28]=n,e[29]=f,e[30]=m,e[31]=g):g=e[31],g},ee=h=>{const e=k(26),{columns:r,facets:a,onFacetFilter:s,onToggleFacet:v}=h,i=$();let b;e[0]!==v?(b=c=>{const{column:x}=c.currentTarget.dataset;x!==void 0&&v(x)},e[0]=v,e[1]=b):b=e[1];const t=b;if(r.length===0)return null;let d;e[2]!==i?(d=i("Facets"),e[2]=i,e[3]=d):d=e[3];let o;e[4]!==d?(o=p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:d}),e[4]=d,e[5]=o):o=e[5];let n;if(e[6]!==r||e[7]!==a||e[8]!==t){let c;e[10]!==a||e[11]!==t?(c=x=>p("button",{"aria-pressed":x in a,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":x,"data-testid":`db-facet-toggle-${x}`,onClick:t,type:"button",children:x},x),e[10]=a,e[11]=t,e[12]=c):c=e[12],n=r.map(c),e[6]=r,e[7]=a,e[8]=t,e[9]=n}else n=e[9];let l;e[13]!==n?(l=p("div",{className:"flex flex-wrap gap-1",children:n}),e[13]=n,e[14]=l):l=e[14];let f;e[15]!==o||e[16]!==l?(f=N("div",{className:"flex flex-col gap-1.5",children:[o,l]}),e[15]=o,e[16]=l,e[17]=f):f=e[17];let m;e[18]!==a?(m=Object.entries(a),e[18]=a,e[19]=m):m=e[19];let g;e[20]!==s||e[21]!==m?(g=m.map(c=>{const[x,y]=c;return p(D,{column:x,onFacetFilter:s,state:y},x)}),e[20]=s,e[21]=m,e[22]=g):g=e[22];let u;return e[23]!==f||e[24]!==g?(u=N("aside",{className:"flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs","data-testid":"db-facets",children:[f,g]}),e[23]=f,e[24]=g,e[25]=u):u=e[25],u};function J(h){const e=k(2),r=F(h);let a;return e[0]!==h?(a=()=>{r.current=h},e[0]=h,e[1]=a):a=e[1],L(a),r}const te=()=>{const[h,e]=R({}),r=J(h),a=F({}),s=async(t,d)=>{const o=(a.current[t]??0)+1;a.current[t]=o,e(n=>t in n?{...n,[t]:{error:null,loading:!0,result:n[t]?.result??null}}:n);try{const n=await d(t);if(a.current[t]!==o)return;e(l=>t in l?{...l,[t]:{error:null,loading:!1,result:n}}:l)}catch(n){if(a.current[t]!==o)return;e(l=>t in l?{...l,[t]:{error:I(n),loading:!1,result:null}}:l)}};return{clearFacets:()=>{e({})},facets:h,facetsRef:r,refetchFacets:t=>{for(const d of Object.keys(r.current))T(s(d,t))},toggleFacet:(t,d)=>{if(t in r.current){e(o=>Object.fromEntries(Object.entries(o).filter(([n])=>n!==t)));return}e(o=>({...o,[t]:{error:null,loading:!0,result:null}})),d!==null&&T(s(t,d))}}},M=34,E=600,W=h=>{const e=k(21),{item:r,onSelect:a,prefix:s,selected:v,start:i}=h;let b;e[0]!==r.name||e[1]!==a?(b=()=>{a(r.name)},e[0]=r.name,e[1]=a,e[2]=b):b=e[2];const t=b,d=`translateY(${String(i)}px)`;let o;e[3]!==d?(o={insetInline:0,position:"absolute",top:0,transform:d},e[3]=d,e[4]=o):o=e[4];const n=o,l=v?"bg-accent font-medium text-accent-foreground":"text-foreground";let f;e[5]!==l?(f=P("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",l),e[5]=l,e[6]=f):f=e[6];const m=`${s}-table-${r.name}`;let g;e[7]!==r.name?(g=p("span",{className:"truncate",children:r.name}),e[7]=r.name,e[8]=g):g=e[8];let u;e[9]!==r.rowCount?(u=p("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:r.rowCount}),e[9]=r.rowCount,e[10]=u):u=e[10];let c;e[11]!==t||e[12]!==v||e[13]!==f||e[14]!==m||e[15]!==g||e[16]!==u?(c=N("button",{"aria-pressed":v,className:f,"data-testid":m,onClick:t,type:"button",children:[g,u]}),e[11]=t,e[12]=v,e[13]=f,e[14]=m,e[15]=g,e[16]=u,e[17]=c):c=e[17];let x;return e[18]!==n||e[19]!==c?(x=p("li",{style:n,children:c}),e[18]=n,e[19]=c,e[20]=x):x=e[20],x},re=({header:h,onReload:e,onSelect:r,prefix:a,reloadLabel:s,selected:v,tables:i})=>{const b=$(),[t,d]=R(""),o=F(null),n=u=>{d(u.target.value)},l=O(()=>{const u=t.trim().toLowerCase();return u===""?i:i.filter(c=>c.name.toLowerCase().includes(u))},[t,i]),m=S({count:l.length,estimateSize:()=>M,getScrollElement:()=>o.current,initialRect:{height:E,width:240},observeElementRect:(u,c)=>V(u,c,E),overscan:12}).getVirtualItems(),g={height:l.length*M};return N("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${a}-table-list`,children:[h,N("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:b("Tables")}),e!==void 0&&p("button",{"aria-label":s??b("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":`${a}-load-tables`,onClick:e,title:s??b("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":`${a}-table-search`,onChange:n,placeholder:b("search table…"),type:"search",value:t})}),N("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${a}-table-list-rows`,ref:o,children:[p("li",{"aria-hidden":"true",style:g}),m.map(u=>{const c=l[u.index];return c===void 0?null:p(W,{item:c,onSelect:r,prefix:a,selected:v===c.name,start:u.start},c.name)})]})]})};export{ee as D,_ as G,re as T,te as a,J as u};
1
+ import{c as k}from"react/compiler-runtime";import{useT as $}from"./DEFAULT_LOCALE-A1Yg5ORA.js";import{jsxs as N,jsx as p}from"react/jsx-runtime";import{useRef as F,useEffect as L,useState as R,useMemo as O}from"react";import{f as T,b as I}from"./internal-7bgd8inO.js";import{useVirtualizer as S}from"@tanstack/react-virtual";import{c as P}from"./utils-bhneXptQ.js";import{f as V}from"./virtual-rect-D_j7aLxX.js";const B=[25,50,100,250],A=h=>{const e=k(18),{onChange:r,options:a,prefix:s,value:v}=h,i=$();let b;e[0]!==r?(b=c=>{r(Number.parseInt(c.target.value,10))},e[0]=r,e[1]=b):b=e[1];const t=b,d=`${s}-page-size`;let o;e[2]!==i?(o=i("Rows per page"),e[2]=i,e[3]=o):o=e[3];let n;e[4]!==o?(n=p("span",{children:o}),e[4]=o,e[5]=n):n=e[5];const l=`${s}-page-size`,f=`${s}-page-size`;let m;e[6]!==a?(m=a.map(q),e[6]=a,e[7]=m):m=e[7];let g;e[8]!==t||e[9]!==l||e[10]!==f||e[11]!==m||e[12]!==v?(g=p("select",{className:"h-6 rounded-md border border-border bg-background px-1 tabular-nums outline-none focus-visible:border-ring","data-testid":l,id:f,onChange:t,value:v,children:m}),e[8]=t,e[9]=l,e[10]=f,e[11]=m,e[12]=v,e[13]=g):g=e[13];let u;return e[14]!==d||e[15]!==n||e[16]!==g?(u=N("label",{className:"flex items-center gap-1.5",htmlFor:d,children:[n,g]}),e[14]=d,e[15]=n,e[16]=g,e[17]=u):u=e[17],u},G=h=>{const e=k(25),{onJump:r,page:a,pages:s,prefix:v}=h,i=$();let b;e[0]!==r||e[1]!==s?(b=w=>{const C=Number.parseInt(w,10);Number.isNaN(C)||r(Math.min(Math.max(1,C),Math.max(1,s)))},e[0]=r,e[1]=s,e[2]=b):b=e[2];const t=b;let d;e[3]!==t?(d=w=>{w.key==="Enter"&&t(w.currentTarget.value)},e[3]=t,e[4]=d):d=e[4];const o=d;let n;e[5]!==t?(n=w=>{t(w.currentTarget.value)},e[5]=t,e[6]=n):n=e[6];const l=n;let f;e[7]!==i?(f=i("Page"),e[7]=i,e[8]=f):f=e[8];let m;e[9]!==i?(m=i("Page"),e[9]=i,e[10]=m):m=e[10];const g=`${v}-page-jump`,u=Math.max(1,s);let c;e[11]!==l||e[12]!==o||e[13]!==a||e[14]!==m||e[15]!==g||e[16]!==u?(c=p("input",{"aria-label":m,className:"h-6 w-12 rounded-md border border-border bg-background px-1 text-center tabular-nums outline-none focus-visible:border-ring","data-testid":g,defaultValue:a,max:u,min:1,onBlur:l,onKeyDown:o,type:"number"},a),e[11]=l,e[12]=o,e[13]=a,e[14]=m,e[15]=g,e[16]=u,e[17]=c):c=e[17];let x;e[18]!==s||e[19]!==i?(x=i("of {pages}",{pages:s}),e[18]=s,e[19]=i,e[20]=x):x=e[20];let y;return e[21]!==f||e[22]!==c||e[23]!==x?(y=N("span",{className:"flex items-center gap-1.5 tabular-nums",children:[f,c,x]}),e[21]=f,e[22]=c,e[23]=x,e[24]=y):y=e[24],y},_=({hasNext:h,hasPrevious:e,onJumpToPage:r,onNext:a,onPageSizeChange:s,onPrevious:v,pageSize:i,pageSizeOptions:b=B,prefix:t,rangeEnd:d,rangeStart:o,total:n})=>{const l=$(),f="rounded-md border border-border px-2.5 py-1 text-xs font-medium text-foreground outline-none transition-colors hover:bg-accent focus-visible:bg-accent disabled:pointer-events-none disabled:opacity-50",m=i!==void 0&&i>0?Math.max(1,Math.ceil(n/i)):1,g=i!==void 0&&i>0?Math.floor(Math.max(0,o-1)/i)+1:1;return N("div",{className:"flex w-full items-center justify-between gap-3 text-xs text-muted-foreground",children:[N("div",{className:"flex items-center gap-3",children:[i!==void 0&&s!==void 0&&p(A,{onChange:s,options:b,prefix:t,value:i}),p("span",{className:"tabular-nums","data-testid":`${t}-page-info`,children:l("{rangeStart}-{rangeEnd} of {total}",{rangeEnd:d,rangeStart:o,total:n})})]}),N("div",{className:"flex items-center gap-3",children:[p("button",{className:f,"data-testid":`${t}-prev`,disabled:!e,onClick:v,type:"button",children:l("Previous")}),i!==void 0&&r!==void 0&&p(G,{onJump:r,page:g,pages:m,prefix:t}),p("button",{className:f,"data-testid":`${t}-next`,disabled:!h,onClick:a,type:"button",children:l("Next")})]})]})};function q(h){return p("option",{value:h,children:h},h)}const j=h=>h==null?"∅":h===""?"(empty)":typeof h=="object"?JSON.stringify(h):String(h),D=h=>{const e=k(32),{column:r,onFacetFilter:a,state:s}=h,v=$();let i;e[0]!==r||e[1]!==a||e[2]!==s.result?.values?(i=u=>{const c=Number(u.currentTarget.dataset.index),x=s.result?.values[c];x!==void 0&&a(r,x.value)},e[0]=r,e[1]=a,e[2]=s.result?.values,e[3]=i):i=e[3];const b=i,t=`db-facet-${r}`;let d;e[4]!==r?(d=p("span",{className:"font-medium text-foreground",children:r}),e[4]=r,e[5]=d):d=e[5];let o;e[6]!==s.loading||e[7]!==s.result||e[8]!==v?(o=s.loading&&s.result===null&&p("span",{className:"text-muted-foreground",children:v("Loading…")}),e[6]=s.loading,e[7]=s.result,e[8]=v,e[9]=o):o=e[9];let n;e[10]!==s.error?(n=s.error!==null&&p("span",{className:"text-destructive",role:"alert",children:s.error}),e[10]=s.error,e[11]=n):n=e[11];let l;e[12]!==s.result?.values?(l=s.result?.values??[],e[12]=s.result?.values,e[13]=l):l=e[13];let f;if(e[14]!==r||e[15]!==b||e[16]!==l){let u;e[18]!==r||e[19]!==b?(u=(c,x)=>N("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":x,"data-testid":`db-facet-value-${r}`,onClick:b,type:"button",children:[p("span",{className:"truncate",children:j(c.value)}),p("span",{className:"shrink-0 tabular-nums text-foreground/70",children:c.count})]},j(c.value)),e[18]=r,e[19]=b,e[20]=u):u=e[20],f=l.map(u),e[14]=r,e[15]=b,e[16]=l,e[17]=f}else f=e[17];let m;e[21]!==r||e[22]!==s.result||e[23]!==v?(m=s.result?.truncated===!0&&p("span",{className:"text-muted-foreground","data-testid":`db-facet-truncated-${r}`,children:v("Showing the {n} most common values.",{n:s.result.values.length})}),e[21]=r,e[22]=s.result,e[23]=v,e[24]=m):m=e[24];let g;return e[25]!==t||e[26]!==d||e[27]!==o||e[28]!==n||e[29]!==f||e[30]!==m?(g=N("section",{className:"flex flex-col gap-1","data-testid":t,children:[d,o,n,f,m]}),e[25]=t,e[26]=d,e[27]=o,e[28]=n,e[29]=f,e[30]=m,e[31]=g):g=e[31],g},ee=h=>{const e=k(26),{columns:r,facets:a,onFacetFilter:s,onToggleFacet:v}=h,i=$();let b;e[0]!==v?(b=c=>{const{column:x}=c.currentTarget.dataset;x!==void 0&&v(x)},e[0]=v,e[1]=b):b=e[1];const t=b;if(r.length===0)return null;let d;e[2]!==i?(d=i("Facets"),e[2]=i,e[3]=d):d=e[3];let o;e[4]!==d?(o=p("span",{className:"font-mono text-[11px] tracking-wide uppercase text-muted-foreground",children:d}),e[4]=d,e[5]=o):o=e[5];let n;if(e[6]!==r||e[7]!==a||e[8]!==t){let c;e[10]!==a||e[11]!==t?(c=x=>p("button",{"aria-pressed":x in a,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":x,"data-testid":`db-facet-toggle-${x}`,onClick:t,type:"button",children:x},x),e[10]=a,e[11]=t,e[12]=c):c=e[12],n=r.map(c),e[6]=r,e[7]=a,e[8]=t,e[9]=n}else n=e[9];let l;e[13]!==n?(l=p("div",{className:"flex flex-wrap gap-1",children:n}),e[13]=n,e[14]=l):l=e[14];let f;e[15]!==o||e[16]!==l?(f=N("div",{className:"flex flex-col gap-1.5",children:[o,l]}),e[15]=o,e[16]=l,e[17]=f):f=e[17];let m;e[18]!==a?(m=Object.entries(a),e[18]=a,e[19]=m):m=e[19];let g;e[20]!==s||e[21]!==m?(g=m.map(c=>{const[x,y]=c;return p(D,{column:x,onFacetFilter:s,state:y},x)}),e[20]=s,e[21]=m,e[22]=g):g=e[22];let u;return e[23]!==f||e[24]!==g?(u=N("aside",{className:"flex w-56 shrink-0 flex-col gap-3 overflow-auto border-l border-border p-3 text-xs","data-testid":"db-facets",children:[f,g]}),e[23]=f,e[24]=g,e[25]=u):u=e[25],u};function J(h){const e=k(2),r=F(h);let a;return e[0]!==h?(a=()=>{r.current=h},e[0]=h,e[1]=a):a=e[1],L(a),r}const te=()=>{const[h,e]=R({}),r=J(h),a=F({}),s=async(t,d)=>{const o=(a.current[t]??0)+1;a.current[t]=o,e(n=>t in n?{...n,[t]:{error:null,loading:!0,result:n[t]?.result??null}}:n);try{const n=await d(t);if(a.current[t]!==o)return;e(l=>t in l?{...l,[t]:{error:null,loading:!1,result:n}}:l)}catch(n){if(a.current[t]!==o)return;e(l=>t in l?{...l,[t]:{error:I(n),loading:!1,result:null}}:l)}};return{clearFacets:()=>{e({})},facets:h,facetsRef:r,refetchFacets:t=>{for(const d of Object.keys(r.current))T(s(d,t))},toggleFacet:(t,d)=>{if(t in r.current){e(o=>Object.fromEntries(Object.entries(o).filter(([n])=>n!==t)));return}e(o=>({...o,[t]:{error:null,loading:!0,result:null}})),d!==null&&T(s(t,d))}}},M=34,E=600,W=h=>{const e=k(21),{item:r,onSelect:a,prefix:s,selected:v,start:i}=h;let b;e[0]!==r.name||e[1]!==a?(b=()=>{a(r.name)},e[0]=r.name,e[1]=a,e[2]=b):b=e[2];const t=b,d=`translateY(${String(i)}px)`;let o;e[3]!==d?(o={insetInline:0,position:"absolute",top:0,transform:d},e[3]=d,e[4]=o):o=e[4];const n=o,l=v?"bg-accent font-medium text-accent-foreground":"text-foreground";let f;e[5]!==l?(f=P("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",l),e[5]=l,e[6]=f):f=e[6];const m=`${s}-table-${r.name}`;let g;e[7]!==r.name?(g=p("span",{className:"truncate",children:r.name}),e[7]=r.name,e[8]=g):g=e[8];let u;e[9]!==r.rowCount?(u=p("span",{className:"shrink-0 rounded bg-muted px-1.5 text-xs tabular-nums text-muted-foreground",children:r.rowCount}),e[9]=r.rowCount,e[10]=u):u=e[10];let c;e[11]!==t||e[12]!==v||e[13]!==f||e[14]!==m||e[15]!==g||e[16]!==u?(c=N("button",{"aria-pressed":v,className:f,"data-testid":m,onClick:t,type:"button",children:[g,u]}),e[11]=t,e[12]=v,e[13]=f,e[14]=m,e[15]=g,e[16]=u,e[17]=c):c=e[17];let x;return e[18]!==n||e[19]!==c?(x=p("li",{style:n,children:c}),e[18]=n,e[19]=c,e[20]=x):x=e[20],x},re=({header:h,onReload:e,onSelect:r,prefix:a,reloadLabel:s,selected:v,tables:i})=>{const b=$(),[t,d]=R(""),o=F(null),n=u=>{d(u.target.value)},l=O(()=>{const u=t.trim().toLowerCase();return u===""?i:i.filter(c=>c.name.toLowerCase().includes(u))},[t,i]),m=S({count:l.length,estimateSize:()=>M,getScrollElement:()=>o.current,initialRect:{height:E,width:240},observeElementRect:(u,c)=>V(u,c,E),overscan:12}).getVirtualItems(),g={height:l.length*M};return N("aside",{className:"flex h-full w-60 shrink-0 flex-col border-e border-border bg-sidebar","data-testid":`${a}-table-list`,children:[h,N("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:b("Tables")}),e!==void 0&&p("button",{"aria-label":s??b("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":`${a}-load-tables`,onClick:e,title:s??b("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":`${a}-table-search`,onChange:n,placeholder:b("search table…"),type:"search",value:t})}),N("ul",{className:"relative flex-1 overflow-y-auto p-1.5","data-testid":`${a}-table-list-rows`,ref:o,children:[p("li",{"aria-hidden":"true",style:g}),m.map(u=>{const c=l[u.index];return c===void 0?null:p(W,{item:c,onSelect:r,prefix:a,selected:v===c.name,start:u.start},c.name)})]})]})};export{ee as D,_ as G,re as T,te as a,J as u};
@@ -1 +1 @@
1
- import{c as Q}from"react/compiler-runtime";import{useLunora as A}from"@lunora/react";import{useQueryClient as g,useQuery as R,keepPreviousData as _}from"@tanstack/react-query";import{useState as M,useEffect as P}from"react";import{c as b,d as v,f as I,b as T}from"./internal-CwaF9YNk.js";const S=300,l=e=>typeof e=="string"?e===""?void 0:e:typeof e=="number"||typeof e=="boolean"?String(e):void 0,d=e=>e.filter(t=>t!==void 0).join(" "),K={deleteRows:e=>d([l(e.table),Array.isArray(e.ids)?`${String(e.ids.length)} rows`:void 0]),facetColumn:e=>d([l(e.table),l(e.column)]),lintSql:()=>"sql",readTablePage:e=>d([l(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=>d([l(e.id),l(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=>d([l(e.table),"1 row"])},q="__lunora_admin__:",j=(e,t)=>{const r=e.startsWith(q)?e.slice(q.length):e,s=K[r];if(s!==void 0)return s(t);const i=Object.keys(t);return i.length===0?"":i.join(", ")},x=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 C{entries=[];listeners=new Set;nextSeq=1;getSnapshot=()=>this.entries;subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});start(t,r,s){return this.append(t,r,s,"call","pending")}startSubscription(t,r,s){return this.append(t,r,s,"subscription","live")}recordPush(t){if(this.listeners.size===0){const r=this.entries.find(s=>s.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,s=>({...s,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,s=>({...s,durationMs:Date.now()-s.startedAt,...r.error===void 0?{resultCount:x(r.result),status:"ok"}:{error:r.error,status:"error"}}))}clear(){this.entries=[],this.emit()}append(t,r,s,i,n){const u=this.nextSeq;this.nextSeq+=1;const c={functionPath:t,kind:i,seq:u,shardKey:s,startedAt:Date.now(),status:n,summary:j(t,r),...i==="subscription"?{pushes:0}:{}},o=[...this.entries,c];return this.entries=o.length>S?o.slice(o.length-S):o,this.emit(),u}patch(t,r){const s=this.entries.findIndex(i=>i.seq===t);s!==-1&&(this.entries=this.entries.with(s,r(this.entries[s])),this.emit())}emit(){for(const t of this.listeners)t()}}const f=new C,w=(e,t,r)=>["lunora-admin",e,t,r.trim()],E=(e,t)=>[...e,t];function F(e,t,r={}){const s=A(),{enabled:i=!0,keepPreviousData:n=!1,staleTime:u=0}=r,c=E(e,s.clientIdentifier()),a=R({enabled:i,queryFn:t,placeholderData:n?_:void 0,queryKey:c,staleTime:u});return{data:a.data,error:a.error?T(a.error):a.error,errorSource:a.error??void 0,isLoading:a.isLoading,liveError:void 0,refetch:()=>{I(a.refetch())}}}function J(e,t,r={}){const s=A(),i=g(),{enabled:n=!0,keepPreviousData:u=!1,live:c=!1,shardKey:o="",staleTime:a}=r,p=w(e,t,o),D=F(p,()=>s.query(b(e),t,v(o)),{enabled:n,keepPreviousData:u,staleTime:a??(c?Number.POSITIVE_INFINITY:0)}),[k,y]=M(void 0),L=JSON.stringify(p);return P(()=>{if(!n||!c)return;y(void 0);const m=f.startSubscription(e,t,o),O=s.subscribe(b(e),t,h=>{f.recordPush(m),y(void 0),i.setQueryData(E(p,s.clientIdentifier()),h)},{...v(o),onError:h=>{f.failSubscription(m,h.message),y(h.message)}});return()=>{f.endSubscription(m),O()}},[L,n,c]),{...D,liveError:n&&c?k:void 0}}const U=()=>{const e=Q(2),t=g();let r;return e[0]!==t?(r=(s,i,n)=>{const u=i===void 0?["lunora-admin",s]:w(s,i,n??"");I(t.invalidateQueries({queryKey:u}))},e[0]=t,e[1]=r):r=e[1],r};export{U as a,F as b,f as o,J as u};
1
+ import{c as Q}from"react/compiler-runtime";import{useLunora as A}from"@lunora/react";import{useQueryClient as g,useQuery as R,keepPreviousData as _}from"@tanstack/react-query";import{useState as M,useEffect as P}from"react";import{c as b,d as v,f as I,b as T}from"./internal-7bgd8inO.js";const S=300,l=e=>typeof e=="string"?e===""?void 0:e:typeof e=="number"||typeof e=="boolean"?String(e):void 0,d=e=>e.filter(t=>t!==void 0).join(" "),K={deleteRows:e=>d([l(e.table),Array.isArray(e.ids)?`${String(e.ids.length)} rows`:void 0]),facetColumn:e=>d([l(e.table),l(e.column)]),lintSql:()=>"sql",readTablePage:e=>d([l(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=>d([l(e.id),l(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=>d([l(e.table),"1 row"])},q="__lunora_admin__:",j=(e,t)=>{const r=e.startsWith(q)?e.slice(q.length):e,s=K[r];if(s!==void 0)return s(t);const i=Object.keys(t);return i.length===0?"":i.join(", ")},x=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 C{entries=[];listeners=new Set;nextSeq=1;getSnapshot=()=>this.entries;subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});start(t,r,s){return this.append(t,r,s,"call","pending")}startSubscription(t,r,s){return this.append(t,r,s,"subscription","live")}recordPush(t){if(this.listeners.size===0){const r=this.entries.find(s=>s.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,s=>({...s,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,s=>({...s,durationMs:Date.now()-s.startedAt,...r.error===void 0?{resultCount:x(r.result),status:"ok"}:{error:r.error,status:"error"}}))}clear(){this.entries=[],this.emit()}append(t,r,s,i,n){const u=this.nextSeq;this.nextSeq+=1;const c={functionPath:t,kind:i,seq:u,shardKey:s,startedAt:Date.now(),status:n,summary:j(t,r),...i==="subscription"?{pushes:0}:{}},o=[...this.entries,c];return this.entries=o.length>S?o.slice(o.length-S):o,this.emit(),u}patch(t,r){const s=this.entries.findIndex(i=>i.seq===t);s!==-1&&(this.entries=this.entries.with(s,r(this.entries[s])),this.emit())}emit(){for(const t of this.listeners)t()}}const f=new C,w=(e,t,r)=>["lunora-admin",e,t,r.trim()],E=(e,t)=>[...e,t];function F(e,t,r={}){const s=A(),{enabled:i=!0,keepPreviousData:n=!1,staleTime:u=0}=r,c=E(e,s.clientIdentifier()),a=R({enabled:i,queryFn:t,placeholderData:n?_:void 0,queryKey:c,staleTime:u});return{data:a.data,error:a.error?T(a.error):a.error,errorSource:a.error??void 0,isLoading:a.isLoading,liveError:void 0,refetch:()=>{I(a.refetch())}}}function J(e,t,r={}){const s=A(),i=g(),{enabled:n=!0,keepPreviousData:u=!1,live:c=!1,shardKey:o="",staleTime:a}=r,p=w(e,t,o),D=F(p,()=>s.query(b(e),t,v(o)),{enabled:n,keepPreviousData:u,staleTime:a??(c?Number.POSITIVE_INFINITY:0)}),[k,y]=M(void 0),L=JSON.stringify(p);return P(()=>{if(!n||!c)return;y(void 0);const m=f.startSubscription(e,t,o),O=s.subscribe(b(e),t,h=>{f.recordPush(m),y(void 0),i.setQueryData(E(p,s.clientIdentifier()),h)},{...v(o),onError:h=>{f.failSubscription(m,h.message),y(h.message)}});return()=>{f.endSubscription(m),O()}},[L,n,c]),{...D,liveError:n&&c?k:void 0}}const U=()=>{const e=Q(2),t=g();let r;return e[0]!==t?(r=(s,i,n)=>{const u=i===void 0?["lunora-admin",s]:w(s,i,n??"");I(t.invalidateQueries({queryKey:u}))},e[0]=t,e[1]=r):r=e[1],r};export{U as a,F as b,f as o,J as u};
@@ -1 +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-CwaF9YNk.js";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};
1
+ import{c as m}from"react/compiler-runtime";import{useState as a}from"react";import{f as i,b as y}from"./internal-7bgd8inO.js";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};
@@ -1 +1 @@
1
- import{c}from"react/compiler-runtime";import{useLunora as f}from"@lunora/react";import{b as u}from"./use-admin-query-P0RJrjsD.js";const m={capabilities:{accounts:!0,admin:!0,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=c(6),o=f();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{m as D,b as u};
1
+ import{c}from"react/compiler-runtime";import{useLunora as f}from"@lunora/react";import{b as u}from"./use-admin-query-DV9xmFl8.js";const m={capabilities:{accounts:!0,admin:!0,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=c(6),o=f();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{m as D,b as u};
@@ -1 +1 @@
1
- import{c as n}from"react/compiler-runtime";import{useNavigate as a}from"@tanstack/react-router";import{f as m}from"./internal-CwaF9YNk.js";import{w as s}from"./trace-handoff-C0CFV2ix.js";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};
1
+ import{c as n}from"react/compiler-runtime";import{useNavigate as a}from"@tanstack/react-router";import{f as m}from"./internal-7bgd8inO.js";import{w as s}from"./trace-handoff-C0CFV2ix.js";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};
@@ -1 +1 @@
1
- import{useLunora as A}from"@lunora/react";import{useState as c}from"react";import{u as h}from"./use-admin-query-P0RJrjsD.js";import{ADMIN_FUNCTIONS as s}from"./ADMIN_FUNCTIONS-4aE59aDq.js";import{d,c as l}from"./internal-CwaF9YNk.js";const T={},_=l(s.aiGenerateSql),b=l(s.aiTableFilter),C=l(s.aiChartConfig),w=n=>{const o=A(),[f,u]=c({}),[v,g]=c({}),m=h(s.aiAvailable,T,{shardKey:n}),[p,y]=c(!1),q=p||m.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"&&y(!0)};return{generate:async(e,r)=>{i("sql");try{const{result:t}=await o.query(_,{failedError:r?.error,failedSql:r?.sql,prompt:e},d(n));return a("sql",t.degraded?t.reason:void 0),t.degraded?void 0:t.sql}catch{a("sql","ai-error");return}},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=>f[e]===!0,reason:e=>v[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:q}};export{w as u};
1
+ import{useLunora as A}from"@lunora/react";import{useState as c}from"react";import{u as h}from"./use-admin-query-DV9xmFl8.js";import{ADMIN_FUNCTIONS as s}from"./ADMIN_FUNCTIONS-4aE59aDq.js";import{d,c as l}from"./internal-7bgd8inO.js";const T={},_=l(s.aiGenerateSql),b=l(s.aiTableFilter),C=l(s.aiChartConfig),w=n=>{const o=A(),[f,u]=c({}),[v,g]=c({}),m=h(s.aiAvailable,T,{shardKey:n}),[p,y]=c(!1),q=p||m.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"&&y(!0)};return{generate:async(e,r)=>{i("sql");try{const{result:t}=await o.query(_,{failedError:r?.error,failedSql:r?.sql,prompt:e},d(n));return a("sql",t.degraded?t.reason:void 0),t.degraded?void 0:t.sql}catch{a("sql","ai-error");return}},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=>f[e]===!0,reason:e=>v[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:q}};export{w as u};