@lunora/studio 1.0.0-alpha.85 → 1.0.0-alpha.87
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.
- package/dist/index.d.ts +18 -3
- package/dist/index.js +1 -1
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
- package/dist/packem_chunks/ApiTab.js +1 -1
- package/dist/packem_chunks/AuditPanel.js +1 -1
- package/dist/packem_chunks/ExportImportPanel.js +1 -1
- package/dist/packem_chunks/FileBrowser.js +1 -1
- package/dist/packem_chunks/FunctionRunner.js +1 -1
- package/dist/packem_chunks/FunctionStatsPanel.js +1 -1
- package/dist/packem_chunks/HealthPanel.js +1 -1
- package/dist/packem_chunks/InsightsPanel.js +1 -1
- package/dist/packem_chunks/LogsPanel.js +1 -1
- package/dist/packem_chunks/MailPanel.js +1 -1
- package/dist/packem_chunks/MetricsPanel.js +1 -1
- package/dist/packem_chunks/NotificationsPanel.js +1 -1
- package/dist/packem_chunks/PitrPanel.js +1 -1
- package/dist/packem_chunks/SchemaViewer.js +1 -1
- package/dist/packem_chunks/SecurityAdvisorPanel.js +1 -1
- package/dist/packem_chunks/SettingsPanel.js +1 -1
- package/dist/packem_chunks/SqlEditorPanel.js +6 -6
- package/dist/packem_chunks/TableEditor.js +1 -1
- package/dist/packem_chunks/agents-panel.js +1 -1
- package/dist/packem_chunks/auth-audit-panel.js +1 -1
- package/dist/packem_chunks/containers-panel.js +1 -1
- package/dist/packem_chunks/dashboards-panel.js +1 -1
- package/dist/packem_chunks/fanout-panel.js +1 -1
- package/dist/packem_chunks/flags-panel.js +1 -1
- package/dist/packem_chunks/issues-panel.js +1 -1
- package/dist/packem_chunks/kv-browser.js +1 -1
- package/dist/packem_chunks/migrations-route.js +1 -1
- package/dist/packem_chunks/payments-panel.js +1 -1
- package/dist/packem_chunks/permissions-panel.js +1 -1
- package/dist/packem_chunks/queues-panel.js +1 -1
- package/dist/packem_chunks/rls-panel.js +1 -1
- package/dist/packem_chunks/storage-rules-panel.js +1 -1
- package/dist/packem_chunks/subscriptions-panel.js +1 -1
- package/dist/packem_chunks/traces-panel.js +1 -1
- package/dist/packem_chunks/users-panel.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +1 -1
- package/dist/packem_shared/ADMIN_FUNCTIONS-4aE59aDq.js +1 -0
- package/dist/packem_shared/{ApiDocsPanel-fYS9NiLg.js → ApiDocsPanel-DLMeLZ5-.js} +1 -1
- package/dist/packem_shared/DataBrowser-CZZ_WkJ-.js +1 -0
- package/dist/packem_shared/{GlobalDataBrowser-CSttudUx.js → GlobalDataBrowser-DpkjHfDg.js} +1 -1
- package/dist/packem_shared/{HomePanel-BYsfMhKh.js → HomePanel-3baDsDBU.js} +1 -1
- package/dist/packem_shared/MigrationsPanel-dygzHUvg.js +1 -0
- package/dist/packem_shared/{Studio-Ba9x0dG_.js → Studio-forQt-PC.js} +1 -1
- package/dist/packem_shared/{StudioApp-B_PRdg4h.js → StudioApp-B1AWsBzi.js} +1 -1
- package/dist/packem_shared/{home-panel-B60-5YfI.js → home-panel-CeeqqV0z.js} +1 -1
- package/dist/packem_shared/{studio-CPuoAmjh.js → studio-BtC7WPbz.js} +1 -1
- package/dist/packem_shared/table-list-sidebar-D9Bd4qgi.js +1 -0
- package/dist/packem_shared/use-shard-key-B2JtNa5m.js +1 -0
- package/dist/packem_shared/{use-sql-assistant-BLG9unQN.js → use-sql-assistant-C6dl2_Ty.js} +1 -1
- package/dist/packem_shared/useDebounced-CU-uftxO.js +1 -0
- package/dist/standalone/chunk-2VWWXVWK.js +1 -0
- package/dist/standalone/chunk-3CWGJYBB.js +1 -0
- package/dist/standalone/{chunk-52OYJHM7.js → chunk-4JIOFDMR.js} +1 -1
- package/dist/standalone/{chunk-MN64D74P.js → chunk-4LCY5XUR.js} +1 -1
- package/dist/standalone/{chunk-JE3WK77V.js → chunk-5KRD6F67.js} +1 -1
- package/dist/standalone/{chunk-RC3H4OP3.js → chunk-5X4OZ7OD.js} +1 -1
- package/dist/standalone/{chunk-TO45V3L6.js → chunk-6MGI5IN6.js} +1 -1
- package/dist/standalone/{chunk-HJR42BJY.js → chunk-7DNDRUMZ.js} +1 -1
- package/dist/standalone/chunk-7FO57AZY.js +1 -0
- package/dist/standalone/{chunk-YNBIW2GN.js → chunk-B5S6GSUC.js} +1 -1
- package/dist/standalone/{chunk-QZ6TCNWR.js → chunk-B5UFGO4E.js} +1 -1
- package/dist/standalone/{chunk-RFBU5RZI.js → chunk-BDNDSBYM.js} +1 -1
- package/dist/standalone/{chunk-QS4IFAFJ.js → chunk-CLNB7I3O.js} +1 -1
- package/dist/standalone/{chunk-QSFKPGK4.js → chunk-D3JTCLSF.js} +1 -1
- package/dist/standalone/chunk-DABW4OOI.js +1 -0
- package/dist/standalone/{chunk-SPT3KPV7.js → chunk-EAIUBZA5.js} +1 -1
- package/dist/standalone/{chunk-FUBR2PAD.js → chunk-EJ2CHD4G.js} +1 -1
- package/dist/standalone/chunk-EVTCXQ5D.js +1 -0
- package/dist/standalone/{chunk-OLM62NLS.js → chunk-EWDLYYJM.js} +1 -1
- package/dist/standalone/{chunk-ZOX6X2DL.js → chunk-F7NVC7YK.js} +1 -1
- package/dist/standalone/chunk-FURI47Z2.js +1 -0
- package/dist/standalone/chunk-FW75RYZU.js +1 -0
- package/dist/standalone/chunk-GE5WTIWX.js +1 -0
- package/dist/standalone/{chunk-BAAU4OTI.js → chunk-GZS3ORGS.js} +1 -1
- package/dist/standalone/chunk-HYCMT2V5.js +1 -0
- package/dist/standalone/{chunk-5YADKLAQ.js → chunk-IAKPXGTQ.js} +1 -1
- package/dist/standalone/chunk-IVCIG5J7.js +4 -0
- package/dist/standalone/chunk-KJIBL5D4.js +1 -0
- package/dist/standalone/chunk-L4RW5BFD.js +1 -0
- package/dist/standalone/{chunk-PWTURL56.js → chunk-LYRAWNV7.js} +1 -1
- package/dist/standalone/chunk-MIFLRBVS.js +11 -0
- package/dist/standalone/{chunk-OOL3FV6A.js → chunk-MV4A2PAK.js} +1 -1
- package/dist/standalone/{chunk-347H2BQO.js → chunk-NBUBAW3V.js} +1 -1
- package/dist/standalone/{chunk-232MBXB2.js → chunk-NCWUTRZB.js} +1 -1
- package/dist/standalone/{chunk-D67BVBQW.js → chunk-NMLCYY4H.js} +1 -1
- package/dist/standalone/{chunk-MDHUWMFD.js → chunk-OOWHAURL.js} +1 -1
- package/dist/standalone/{chunk-UOQ24BAY.js → chunk-ORVR33FM.js} +1 -1
- package/dist/standalone/{chunk-7AG3T4DK.js → chunk-OUCGTB3Y.js} +2 -2
- package/dist/standalone/chunk-PDMZITZZ.js +1 -0
- package/dist/standalone/{chunk-VORDESEQ.js → chunk-PNAVAJAF.js} +1 -1
- package/dist/standalone/{chunk-LVJ5IHEU.js → chunk-QJTGO4JG.js} +1 -1
- package/dist/standalone/{chunk-EDOMDMVI.js → chunk-QP7IQOKF.js} +1 -1
- package/dist/standalone/chunk-QXDMHM2V.js +1 -0
- package/dist/standalone/{chunk-VKEJTZY7.js → chunk-S2CXYDNT.js} +1 -1
- package/dist/standalone/{chunk-AQKXMWNF.js → chunk-S3DWUXGY.js} +1 -1
- package/dist/standalone/{chunk-YSMJN36P.js → chunk-SJZQPIZB.js} +1 -1
- package/dist/standalone/{chunk-ETZYJL7Z.js → chunk-SMEW3ZTU.js} +1 -1
- package/dist/standalone/chunk-SNK7TOOO.js +6 -0
- package/dist/standalone/{chunk-QI25LTPH.js → chunk-T2Q7I3V2.js} +1 -1
- package/dist/standalone/{chunk-ESKVOZLC.js → chunk-T3CGXSXO.js} +1 -1
- package/dist/standalone/{chunk-YGKR536O.js → chunk-TS6346VY.js} +1 -1
- package/dist/standalone/{chunk-ENBTOX7N.js → chunk-TVGKSIIW.js} +1 -1
- package/dist/standalone/{chunk-U5IIRHZ6.js → chunk-UNVK2VZP.js} +1 -1
- package/dist/standalone/{chunk-U44CWN7H.js → chunk-UR3X4K4T.js} +1 -1
- package/dist/standalone/chunk-VDW32UET.js +1 -0
- package/dist/standalone/chunk-VQK34A2H.js +1 -0
- package/dist/standalone/{chunk-MBVSXVTV.js → chunk-WPUINKEO.js} +1 -1
- package/dist/standalone/chunk-XNGYYOLS.js +14 -0
- package/dist/standalone/{chunk-2SC3EG5Y.js → chunk-XR7RBXKA.js} +1 -1
- package/dist/standalone/{chunk-KNHWIHC7.js → chunk-XZN645UJ.js} +1 -1
- package/dist/standalone/chunk-YFJXQUPW.js +1 -0
- package/dist/standalone/chunk-YKAO3JNJ.js +1 -0
- package/dist/standalone/{chunk-AHVDZWB3.js → chunk-YRYEZHOJ.js} +1 -1
- package/dist/standalone/{chunk-TIR6CWHO.js → chunk-ZCFDQW4U.js} +1 -1
- package/dist/standalone/studio.js +1 -1
- package/package.json +6 -6
- package/dist/packem_shared/ADMIN_FUNCTIONS-CZESgd10.js +0 -1
- package/dist/packem_shared/DataBrowser-C4J4gVUu.js +0 -1
- package/dist/packem_shared/MigrationsPanel-2JbQ2HwG.js +0 -1
- package/dist/packem_shared/table-list-sidebar-BRv3hTLX.js +0 -1
- package/dist/packem_shared/useDebounced-Ihdiid_k.js +0 -1
- package/dist/standalone/chunk-22LOWEEC.js +0 -1
- package/dist/standalone/chunk-2EJADIPC.js +0 -1
- package/dist/standalone/chunk-4I2TBTZS.js +0 -1
- package/dist/standalone/chunk-6IEBRNDW.js +0 -1
- package/dist/standalone/chunk-D3FRQZ4X.js +0 -1
- package/dist/standalone/chunk-ERMTJYQF.js +0 -1
- package/dist/standalone/chunk-JAT5ZBQK.js +0 -1
- package/dist/standalone/chunk-JOFD43OI.js +0 -1
- package/dist/standalone/chunk-LFKCLLPT.js +0 -1
- package/dist/standalone/chunk-MLULN4R2.js +0 -1
- package/dist/standalone/chunk-MUGKOGZG.js +0 -1
- package/dist/standalone/chunk-NPKNFZUW.js +0 -6
- package/dist/standalone/chunk-OV63HVE4.js +0 -4
- package/dist/standalone/chunk-QFJRZR4U.js +0 -1
- package/dist/standalone/chunk-QNRAMF4X.js +0 -1
- package/dist/standalone/chunk-QNUWWC3N.js +0 -14
- package/dist/standalone/chunk-S67SBGB3.js +0 -1
- package/dist/standalone/chunk-SHD2IWQI.js +0 -1
- package/dist/standalone/chunk-SKFZXESP.js +0 -1
- package/dist/standalone/chunk-UBR4KB6K.js +0 -11
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as we}from"react/compiler-runtime";import{useLunora as $e}from"@lunora/react";import{useState as W,useEffect as ke}from"react";import{ConfirmButton as Re}from"./ConfirmButton-CTL3f3kr.js";import{E as Ce}from"./error-alert-t6cpEi0z.js";import{L as _e}from"./live-status-CmuRLFKf.js";import{ShardInput as Ee}from"./ShardInput-BVn2iCU0.js";import{g as Le}from"./badge-BbuuAio7.js";import{u as Me}from"./button-BkCrNcAs.js";import{c as Ie,u as De}from"./card-CIDGUN6K.js";import{E as Ke}from"./empty-state-Cg7t_8qu.js";import{u as Ae}from"./input-JHu63lTv.js";import{p as ue}from"./label-6uP1obNF.js";import{n as je,d as Fe,m as he,p as u,f as Te,u as h}from"./table-DdJBrClo.js";import{N as qe}from"./use-admin-query-QJ-ibl5u.js";import{S as Be}from"./use-shard-key-B2JtNa5m.js";import{useT as Oe}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as pe}from"./ADMIN_FUNCTIONS-4aE59aDq.js";import{i as We,f as ze,d as Je,b as Pe,g as Ue}from"./internal-BSIsQVC6.js";import{r as Ge}from"./shard-history-DMEW5VBE.js";import{jsx as t,jsxs as i}from"react/jsx-runtime";const Qe=Ue(pe.runMigration),yr=n=>{const e=we(98),{initialShardKey:ge}=n,te=$e(),r=Oe(),{queryShardKey:s,setShardKey:ne,shardKey:o}=Be(ge),[p,fe]=W(""),[g,ye]=W("up"),[l,be]=W(!0),[f,ce]=W(!1),[c,ae]=W(null),[z,ie]=W(null);let J;e[0]!==o?(J=o.trim(),e[0]=o,e[1]=J):J=e[1];const P=J===s;let U;e[2]===Symbol.for("react.memo_cache_sentinel")?(U={},e[2]=U):U=e[2];let G;e[3]!==s?(G={live:!0,shardKey:s},e[3]=s,e[4]=G):G=e[4];const a=qe(pe.migrationStatus,U,G),d=a.data?.migrations??null,oe=a.error,{errorSource:le,liveError:de}=a;let Q,V;e[5]!==s||e[6]!==a.data?(Q=()=>{a.data!==void 0&&Ge(s)},V=[a.data,s],e[5]=s,e[6]=a.data,e[7]=Q,e[8]=V):(Q=e[7],V=e[8]),ke(Q,V);let X;if(e[9]!==te||e[10]!==g||e[11]!==l||e[12]!==p||e[13]!==o||e[14]!==a||e[15]!==r){const m=async()=>{const me=p.trim();if(me===""){ie(r("Enter a migration id")),ae(null);return}ce(!0),ie(null);try{const se=await te.query(Qe,{direction:g,dryRun:l,id:me},Je(o));ae(se),a.refetch()}catch(se){const Se=se;ae(null),ie(Pe(Se))}ce(!1)};X=()=>{ze(m())},e[9]=te,e[10]=g,e[11]=l,e[12]=p,e[13]=o,e[14]=a,e[15]=r,e[16]=X}else X=e[16];const Y=X;let Z;e[17]===Symbol.for("react.memo_cache_sentinel")?(Z=m=>{fe(m.target.value)},e[17]=Z):Z=e[17];const ve=Z;let H;e[18]===Symbol.for("react.memo_cache_sentinel")?(H=m=>{ye(m.target.value==="down"?"down":"up")},e[18]=H):H=e[18];const xe=H;let ee;e[19]===Symbol.for("react.memo_cache_sentinel")?(ee=m=>{be(m.target.checked)},e[19]=ee):ee=e[19];const Ne=ee;let y;e[20]!==ne||e[21]!==o?(y=t(Ee,{onChange:ne,testId:"mg-shard-input",value:o}),e[20]=ne,e[21]=o,e[22]=y):y=e[22];let b;e[23]!==de?(b=t(_e,{message:de,prefix:"mg"}),e[23]=de,e[24]=b):b=e[24];let v;e[25]!==y||e[26]!==b?(v=i("div",{className:"flex flex-wrap items-center gap-2",children:[y,b]}),e[25]=y,e[26]=b,e[27]=v):v=e[27];let x;e[28]!==oe||e[29]!==le?(x=oe!==null&&t(Ce,{error:le,testId:"mg-status-error"}),e[28]=oe,e[29]=le,e[30]=x):x=e[30];let N;e[31]!==d||e[32]!==r?(N=d!==null&&d.length===0&&t(Ke,{description:r("Data migrations you run against this shard will be tracked here."),icon:t("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:t("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"})}),testId:"mg-empty",title:r("No migrations have run on this shard.")}),e[31]=d,e[32]=r,e[33]=N):N=e[33];let S;e[34]!==d||e[35]!==r?(S=d!==null&&d.length>0&&t(Ie,{className:"overflow-hidden py-0",children:t(De,{className:"px-0",children:i(je,{"data-testid":"mg-table",children:[t(Fe,{children:i(he,{children:[t(u,{children:r("id")}),t(u,{children:r("direction")}),t(u,{children:r("status")}),t(u,{children:r("processed")}),t(u,{children:r("changed")}),t(u,{children:r("updated")}),t(u,{children:r("error")})]})}),t(Te,{children:d.map(Ve)})]})})}),e[34]=d,e[35]=r,e[36]=S):S=e[36];let w;e[37]!==r?(w=r("Run migration"),e[37]=r,e[38]=w):w=e[38];let $;e[39]!==w?($=t(ue,{children:w}),e[39]=w,e[40]=$):$=e[40];let k;e[41]!==r?(k=r("Migration id"),e[41]=r,e[42]=k):k=e[42];let R;e[43]!==r?(R=r("migration id"),e[43]=r,e[44]=R):R=e[44];let C;e[45]!==p||e[46]!==k||e[47]!==R?(C=t(Ae,{"aria-label":k,className:"w-auto","data-testid":"mg-id-input",onChange:ve,placeholder:R,value:p}),e[45]=p,e[46]=k,e[47]=R,e[48]=C):C=e[48];let _;e[49]!==r?(_=r("Direction"),e[49]=r,e[50]=_):_=e[50];let E;e[51]!==r?(E=r("up"),e[51]=r,e[52]=E):E=e[52];let L;e[53]!==E?(L=t("option",{value:"up",children:E}),e[53]=E,e[54]=L):L=e[54];let M;e[55]!==r?(M=r("down"),e[55]=r,e[56]=M):M=e[56];let I;e[57]!==M?(I=t("option",{value:"down",children:M}),e[57]=M,e[58]=I):I=e[58];let D;e[59]!==g||e[60]!==_||e[61]!==L||e[62]!==I?(D=i("select",{"aria-label":_,className:"flex h-8 rounded-md border border-input bg-transparent px-2.5 py-1 text-xs transition-colors outline-none focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring/50 dark:bg-input/30","data-testid":"mg-direction",onChange:xe,value:g,children:[L,I]}),e[59]=g,e[60]=_,e[61]=L,e[62]=I,e[63]=D):D=e[63];let K;e[64]!==l?(K=t("input",{checked:l,className:"size-4 accent-primary","data-testid":"mg-dry-run",id:"mg-dry-run",onChange:Ne,type:"checkbox"}),e[64]=l,e[65]=K):K=e[65];let A;e[66]!==r?(A=r("Dry run"),e[66]=r,e[67]=A):A=e[67];let j;e[68]!==K||e[69]!==A?(j=i(ue,{className:"flex items-center gap-1.5",htmlFor:"mg-dry-run",children:[K,A]}),e[68]=K,e[69]=A,e[70]=j):j=e[70];let F;e[71]!==l||e[72]!==Y||e[73]!==f||e[74]!==P||e[75]!==r?(F=l?t(Me,{"data-testid":"mg-run",disabled:f||!P,onClick:Y,type:"button",children:r(f?"Running…":"Run")}):t(Re,{confirmLabel:r(f?"Running…":"Run migration?"),disabled:f||!P,onConfirm:Y,testId:"mg-run",children:r("Run")}),e[71]=l,e[72]=Y,e[73]=f,e[74]=P,e[75]=r,e[76]=F):F=e[76];let T;e[77]!==C||e[78]!==D||e[79]!==j||e[80]!==F?(T=i("div",{className:"flex flex-wrap items-center gap-2",children:[C,D,j,F]}),e[77]=C,e[78]=D,e[79]=j,e[80]=F,e[81]=T):T=e[81];let q;e[82]!==$||e[83]!==T?(q=i("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-3 shadow-xs",children:[$,T]}),e[82]=$,e[83]=T,e[84]=q):q=e[84];let B;e[85]!==z?(B=z!==null&&t("pre",{className:"text-sm text-destructive whitespace-pre-wrap","data-testid":"mg-run-error",role:"alert",children:z}),e[85]=z,e[86]=B):B=e[86];let O;e[87]!==c||e[88]!==r?(O=c!==null&&i("p",{className:"text-sm text-muted-foreground","data-testid":"mg-run-result",children:[c.dryRun?r("Dry run: "):"",r("{status} — processed",{status:c.status}),c.processed,r(", changed"),c.changed]}),e[87]=c,e[88]=r,e[89]=O):O=e[89];let re;return e[90]!==v||e[91]!==x||e[92]!==N||e[93]!==S||e[94]!==q||e[95]!==B||e[96]!==O?(re=i("div",{className:"flex flex-col gap-3 pt-4","data-testid":"lunora-migrations",children:[v,x,N,S,q,B,O]}),e[90]=v,e[91]=x,e[92]=N,e[93]=S,e[94]=q,e[95]=B,e[96]=O,e[97]=re):re=e[97],re};function Ve(n){return i(he,{"data-testid":`mg-row-${n.id}`,children:[t(h,{children:n.id}),t(h,{children:n.direction}),t(h,{children:t(Le,{variant:"secondary",children:n.status})}),t(h,{children:n.processed}),t(h,{children:n.changed}),t(h,{children:We(n.updatedAt)}),t(h,{children:n.error??""})]},n.id)}export{yr as MigrationsPanel};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/compiler-runtime";import"@tanstack/react-router";import"react";import{S as j}from"./studio-
|
|
1
|
+
import"react/compiler-runtime";import"@tanstack/react-router";import"react";import{S as j}from"./studio-BtC7WPbz.js";import"./ErrorBoundary-DvzYskH7.js";import"./operation-console-provider-BMJNtiyB.js";import"./badge-BbuuAio7.js";import"./input-JHu63lTv.js";import"./skeleton-C1wQ9M5t.js";import"./home-panel-CeeqqV0z.js";import"./DEFAULT_LOCALE-BZ4NojpD.js";import"./StudioI18nProvider-CZ5h4nrV.js";import"./data-view-params-ClrV7XgF.js";import"./internal-BSIsQVC6.js";import"./utils-bhneXptQ.js";import"./CommandPalette--SQwfTW1.js";import"react/jsx-runtime";export{j as Studio};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as E}from"react/compiler-runtime";import{LunoraClient as z}from"@lunora/client";import{LunoraProvider as q}from"@lunora/react";import{useState as K,useEffect as U}from"react";import{ErrorBoundary as G}from"./ErrorBoundary-DvzYskH7.js";import{b as
|
|
1
|
+
import{c as E}from"react/compiler-runtime";import{LunoraClient as z}from"@lunora/client";import{LunoraProvider as q}from"@lunora/react";import{useState as K,useEffect as U}from"react";import{ErrorBoundary as G}from"./ErrorBoundary-DvzYskH7.js";import{b as R,f as H,a as J,m as Q,S as V}from"./studio-BtC7WPbz.js";import X from"./useDebounced-CU-uftxO.js";import{useT as D,createStudioI18n as Y}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{StudioI18nProvider as M}from"./StudioI18nProvider-CZ5h4nrV.js";import{r as Z}from"./internal-BSIsQVC6.js";import{h as j}from"./recording-client-DRAZEmzE.js";import F from"./STUDIO_ROOT_CLASS-C6MccdVk.js";import{a as B}from"./browser-storage-xjTyMKY0.js";import{c as W}from"./utils-bhneXptQ.js";import{u as ee}from"./button-BkCrNcAs.js";import{u as te}from"./input-JHu63lTv.js";import{jsx as b,jsxs as C}from"react/jsx-runtime";const O="lunora-studio-admin-token",oe=()=>{try{return B("session")?.getItem(O)??""}catch{return""}},ne=k=>{const e=B("session");if(e!==void 0)try{k===""?e.removeItem(O):e.setItem(O,k)}catch{}},re="/_lunora/admin/ws-token",le=k=>{const e=k;return typeof e?.token=="string"&&e.token.length>0&&typeof e.expiresAtMs=="number"},ae=k=>{const{adminToken:e,baseUrl:c}=k,o=k.fetchImpl??fetch;let n=c;for(;n.endsWith("/");)n=n.slice(0,-1);const s=`${n}${re}`;let t,r=!1,l;const m=async()=>{const f=await o(s,{headers:{authorization:`Bearer ${e}`},method:"POST"});if(f.status===404||f.status===405)return r=!0,e;if(!f.ok)throw new Error(`ws-token mint failed: ${String(f.status)}`);const a=await f.json().catch(()=>{});if(!le(a))throw new Error("ws-token mint failed: malformed response body");return t=a,a.token};return{getToken:async()=>r?e:t!==void 0&&t.expiresAtMs-1e4>Date.now()?t.token:(l??=m().finally(()=>{l=void 0}),l),invalidate:()=>{t=void 0}}},se=k=>{const e=E(42),{onSubmit:c}=k,o=D(),[n,s]=K("");let t;e[0]!==n?(t=n.trim(),e[0]=n,e[1]=t):t=e[1];const r=t;let l;e[2]!==c||e[3]!==r?(l=N=>{N.preventDefault(),r!==""&&c(r)},e[2]=c,e[3]=r,e[4]=l):l=e[4];const m=l;let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=b("div",{className:"h-10 w-10 text-foreground",children:b(H,{})}),e[5]=f):f=e[5];let a;e[6]!==o?(a=o("Connect to Lunora Studio"),e[6]=o,e[7]=a):a=e[7];let v;e[8]!==a?(v=b("h1",{className:"text-base font-semibold text-foreground",children:a}),e[8]=a,e[9]=v):v=e[9];let g;e[10]!==o?(g=o("Enter your admin token to access the studio."),e[10]=o,e[11]=g):g=e[11];let u;e[12]!==g?(u=b("p",{className:"text-[13px] text-muted-foreground",children:g}),e[12]=g,e[13]=u):u=e[13];let d;e[14]!==v||e[15]!==u?(d=C("div",{className:"flex flex-col items-center gap-3 text-center",children:[f,C("div",{className:"flex flex-col gap-1",children:[v,u]})]}),e[14]=v,e[15]=u,e[16]=d):d=e[16];let h;e[17]!==o?(h=o("admin token"),e[17]=o,e[18]=h):h=e[18];let i;e[19]!==h?(i=b("label",{className:"text-xs font-medium text-foreground",htmlFor:"lunora-studio-login-token",children:h}),e[19]=h,e[20]=i):i=e[20];let p;e[21]===Symbol.for("react.memo_cache_sentinel")?(p=N=>{s(N.target.value)},e[21]=p):p=e[21];let x;e[22]!==n?(x=b(te,{autoComplete:"off",autoFocus:!0,"data-testid":"lunora-studio-login-token",id:"lunora-studio-login-token",onChange:p,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:n}),e[22]=n,e[23]=x):x=e[23];let y;e[24]!==o?(y=o("From your worker's LUNORA_ADMIN_TOKEN — your project's .dev.vars in dev, or a deployment secret in production."),e[24]=o,e[25]=y):y=e[25];let I;e[26]!==y?(I=b("p",{className:"text-[11px] text-muted-foreground",children:y}),e[26]=y,e[27]=I):I=e[27];let S;e[28]!==i||e[29]!==x||e[30]!==I?(S=C("div",{className:"flex flex-col gap-1.5",children:[i,x,I]}),e[28]=i,e[29]=x,e[30]=I,e[31]=S):S=e[31];const _=r==="";let T;e[32]!==o?(T=o("Connect"),e[32]=o,e[33]=T):T=e[33];let w;e[34]!==_||e[35]!==T?(w=b(ee,{"data-testid":"lunora-studio-login-submit",disabled:_,type:"submit",children:T}),e[34]=_,e[35]=T,e[36]=w):w=e[36];let $;return e[37]!==m||e[38]!==S||e[39]!==w||e[40]!==d?($=C("form",{className:"flex w-full max-w-sm flex-col gap-5 rounded-xl border border-border bg-card p-7 shadow-lg","data-testid":"lunora-studio-login",onSubmit:m,children:[d,S,w]}),e[37]=m,e[38]=S,e[39]=w,e[40]=d,e[41]=$):$=e[41],$},ie=k=>{const e=E(10),{i18n:c,onSubmit:o}=k,{resolvedTheme:n}=R(),s=n==="dark"&&"dark";let t;e[0]!==s?(t=W(F,s,"flex h-dvh items-center justify-center bg-sidebar p-6 text-sm text-foreground"),e[0]=s,e[1]=t):t=e[1];let r;e[2]!==o?(r=b(se,{onSubmit:o}),e[2]=o,e[3]=r):r=e[3];let l;e[4]!==c||e[5]!==r?(l=b(M,{i18n:c,children:r}),e[4]=c,e[5]=r,e[6]=l):l=e[6];let m;return e[7]!==t||e[8]!==l?(m=b("div",{className:t,"data-testid":"lunora-studio-login-root",children:l}),e[7]=t,e[8]=l,e[9]=m):m=e[9],m},de=k=>{const e=E(23),{basePath:c,chrome:o,studio:n}=k,s=D();let t;e[0]!==s?(t=s("Studio failed"),e[0]=s,e[1]=t):t=e[1];let r;e[2]!==s?(r=s("Studio"),e[2]=s,e[3]=r):r=e[3];let l;e[4]!==s?(l=s("Try again"),e[4]=s,e[5]=l):l=e[5];const m=n?.dataEditable,f=n?.functions,a=n?.initialShardKey,v=n?.openApiSpec,g=n?.openRpcSpec,u=n?.runAsIdentity,d=n?.scheduledCancel,h=n?.scheduledLoad,i=n?.schemaEditable;let p;e[6]!==c||e[7]!==o||e[8]!==d||e[9]!==h||e[10]!==i||e[11]!==m||e[12]!==f||e[13]!==a||e[14]!==v||e[15]!==g||e[16]!==u?(p=b(V,{basePath:c,chrome:o,dataEditable:m,functions:f,initialShardKey:a,openApiSpec:v,openRpcSpec:g,runAsIdentity:u,scheduledCancel:d,scheduledLoad:h,schemaEditable:i}),e[6]=c,e[7]=o,e[8]=d,e[9]=h,e[10]=i,e[11]=m,e[12]=f,e[13]=a,e[14]=v,e[15]=g,e[16]=u,e[17]=p):p=e[17];let x;return e[18]!==t||e[19]!==p||e[20]!==r||e[21]!==l?(x=b(G,{fallbackTitle:t,label:r,retryLabel:l,children:p}),e[18]=t,e[19]=p,e[20]=r,e[21]=l,e[22]=x):x=e[22],x},ce=k=>{const e=E(20),{basePath:c,clearToken:o,client:n,i18n:s,onTokenChange:t,rulesInstalled:r,studio:l,token:m}=k,{resolvedTheme:f}=R();let a;e[0]!==o||e[1]!==t||e[2]!==r||e[3]!==m?(a={clearToken:o,onTokenChange:t,rulesInstalled:r,token:m},e[0]=o,e[1]=t,e[2]=r,e[3]=m,e[4]=a):a=e[4];const v=a,g=f==="dark"&&"dark";let u;e[5]!==g?(u=W(F,g,"flex h-dvh flex-col overflow-hidden bg-sidebar text-sm text-foreground"),e[5]=g,e[6]=u):u=e[6];let d;e[7]!==c||e[8]!==v||e[9]!==l?(d=b(Q,{children:b(de,{basePath:c,chrome:v,studio:l})}),e[7]=c,e[8]=v,e[9]=l,e[10]=d):d=e[10];let h;e[11]!==s||e[12]!==d?(h=b(M,{i18n:s,children:d}),e[11]=s,e[12]=d,e[13]=h):h=e[13];let i;e[14]!==n||e[15]!==h?(i=b(q,{client:n,children:h}),e[14]=n,e[15]=h,e[16]=i):i=e[16];let p;return e[17]!==u||e[18]!==i?(p=b("div",{className:u,"data-testid":"lunora-studio-app",children:i}),e[17]=u,e[18]=i,e[19]=p):p=e[19],p},Ae=k=>{const e=E(27);let c;e[0]!==k?(c=k===void 0?{}:k,e[0]=k,e[1]=c):c=e[1];const{adminToken:o,basePath:n,baseUrl:s,client:t,rulesInstalled:r,studio:l,locale:m}=c;let f;e[2]!==o?(f=()=>o??oe(),e[2]=o,e[3]=f):f=e[3];const[a,v]=K(f);let g,u;e[4]!==a?(g=()=>{ne(a)},u=[a],e[4]=a,e[5]=g,e[6]=u):(g=e[5],u=e[6]),U(g,u);const d=X(a,300);let h;e:{if(t!==void 0){let A;e[7]!==t?(A=j(t),e[7]=t,e[8]=A):A=e[8],h=A;break e}let N;if(e[9]!==s||e[10]!==d){const A=Z(s),P=d===""?void 0:ae({adminToken:d,baseUrl:A}),L=new z({url:A,...P===void 0?{}:{wsToken:P.getToken}});P!==void 0&&(L.setAuthToken(d),L.onTokenExpired(P.invalidate)),N=j(L),e[9]=s,e[10]=d,e[11]=N}else N=e[11];h=N}const i=h;let p,x;e[12]!==i||e[13]!==t?(p=()=>()=>{t===void 0&&i.close()},x=[i,t],e[12]=i,e[13]=t,e[14]=p,e[15]=x):(p=e[14],x=e[15]),U(p,x);let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=N=>{v(N.target.value)},e[16]=y):y=e[16];const I=y;let S;e[17]===Symbol.for("react.memo_cache_sentinel")?(S=()=>{v("")},e[17]=S):S=e[17];const _=S;let T;e[18]!==m?(T=Y(m),e[18]=m,e[19]=T):T=e[19];const w=T;let $;return e[20]!==n||e[21]!==i||e[22]!==w||e[23]!==r||e[24]!==l||e[25]!==a?($=b(J,{children:a===""?b(ie,{i18n:w,onSubmit:v}):b(ce,{basePath:n,clearToken:_,client:i,i18n:w,onTokenChange:I,rulesInstalled:r,studio:l,token:a})}),e[20]=n,e[21]=i,e[22]=w,e[23]=r,e[24]=l,e[25]=a,e[26]=$):$=e[26],$};export{Ae as StudioApp};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{c as L}from"react/compiler-runtime";import{useNavigate as Qe}from"@tanstack/react-router";import{useState as Ee,useEffect as Fe,lazy as nt,Suspense as at}from"react";import{g as Ye}from"./badge-BbuuAio7.js";import{u as Ze,c as K}from"./card-CIDGUN6K.js";import{E as rt}from"./empty-state-Cg7t_8qu.js";import{N as _e}from"./use-admin-query-QJ-ibl5u.js";import{useT as I}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as Ne}from"./ADMIN_FUNCTIONS-
|
|
1
|
+
import{c as L}from"react/compiler-runtime";import{useNavigate as Qe}from"@tanstack/react-router";import{useState as Ee,useEffect as Fe,lazy as nt,Suspense as at}from"react";import{g as Ye}from"./badge-BbuuAio7.js";import{u as Ze,c as K}from"./card-CIDGUN6K.js";import{E as rt}from"./empty-state-Cg7t_8qu.js";import{N as _e}from"./use-admin-query-QJ-ibl5u.js";import{useT as I}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{ADMIN_FUNCTIONS as Ne}from"./ADMIN_FUNCTIONS-4aE59aDq.js";import{f as Se,d as st,g as ot,r as lt,c as it,k as ct}from"./internal-BSIsQVC6.js";import{c as Xe}from"./utils-bhneXptQ.js";import{deriveInsights as dt}from"./DEFAULT_INSIGHT_THRESHOLDS-B-hcFVoi.js";import{useLunora as et}from"@lunora/react";import{jsx as r,jsxs as h}from"react/jsx-runtime";import{u as We}from"./button-BkCrNcAs.js";const mt=ot(Ne.studioFeatures),tt={analytics:!0,auth:!0,containers:!0,flags:!0,kv:!0,mail:!0,notifications:!0,payments:!0,queues:!0,scheduler:!0,storage:!0,vectors:!0,workflows:!0},ut=t=>{if(t===null||typeof t!="object")return tt;const e=t,a=n=>typeof e[n]=="boolean"?e[n]:!0;return{analytics:a("analytics"),auth:a("auth"),containers:a("containers"),flags:a("flags"),kv:a("kv"),mail:a("mail"),notifications:a("notifications"),payments:a("payments"),queues:a("queues"),scheduler:a("scheduler"),storage:a("storage"),vectors:a("vectors"),workflows:a("workflows")}},pt=()=>{const t=L(3),e=et(),[a,n]=Ee(tt);let s,o;return t[0]!==e?(s=()=>{Se((async()=>{try{n(ut(await e.query(mt,{},st(""))))}catch{}})())},o=[e],t[0]=e,t[1]=s,t[2]=o):(s=t[1],o=t[2]),Fe(s,o),a},ft=()=>{const t=L(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.6,viewBox:"0 0 24 24",children:r("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),t[0]=e):e=t[0],e},ht=t=>{const e=L(24),{group:a}=t,n=I(),s=Qe();let o;e[0]!==a.tab||e[1]!==s?(o=()=>{Se(s({to:`/${a.tab}`}))},e[0]=a.tab,e[1]=s,e[2]=o):o=e[2];const l=o,i=a.bindings.length;let c;e[3]!==a.label?(c=r("span",{className:"text-sm font-medium text-foreground",children:a.label}),e[3]=a.label,e[4]=c):c=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=r(ft,{}),e[5]=u):u=e[5];let d;e[6]!==c?(d=h("div",{className:"flex items-center justify-between",children:[c,u]}),e[6]=c,e[7]=d):d=e[7];let p;e[8]!==i||e[9]!==n?(p=i===1?n("1 binding"):n("{count} bindings",{count:i}),e[8]=i,e[9]=n,e[10]=p):p=e[10];let m;e[11]!==p?(m=r("span",{className:"text-xs text-muted-foreground",children:p}),e[11]=p,e[12]=m):m=e[12];let f;e[13]!==i||e[14]!==a.bindings?(f=i>0&&r("div",{className:"flex flex-wrap gap-1.5",children:a.bindings.map(bt)}),e[13]=i,e[14]=a.bindings,e[15]=f):f=e[15];let g;e[16]!==d||e[17]!==m||e[18]!==f?(g=h(Ze,{className:"flex flex-col gap-2 py-4",children:[d,m,f]}),e[16]=d,e[17]=m,e[18]=f,e[19]=g):g=e[19];let x;return e[20]!==a.testId||e[21]!==l||e[22]!==g?(x=r(K,{className:"cursor-pointer gap-0 py-0 transition-colors hover:bg-muted/40","data-testid":a.testId,onClick:l,children:g}),e[20]=a.testId,e[21]=l,e[22]=g,e[23]=x):x=e[23],x},Ue=["kv","files","vectors"],gt=(t,e)=>[...t.filter(a=>a.tab!==e.tab),e].toSorted((a,n)=>Ue.indexOf(a.tab)-Ue.indexOf(n.tab)),xt=()=>{const t=L(19),e=et(),a=pt(),n=I();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=[],t[0]=s):s=t[0];const[o,l]=Ee(s);let i,c;if(t[1]!==e||t[2]!==a.kv||t[3]!==a.storage||t[4]!==a.vectors||t[5]!==n?(i=()=>{const g={cancelled:!1},x=[{enabled:a.kv,label:n("KV Namespaces"),load:async()=>(await e.listKvNamespaces()).map(yt),tab:"kv",testId:"home-binding-kv"},{enabled:a.storage,label:n("R2 Buckets"),load:()=>e.listStorageBuckets(),tab:"files",testId:"home-binding-r2"},{enabled:a.vectors,label:n("Vectorize Indexes"),load:async()=>(await e.listVectorIndexes()).map(vt),tab:"vectors",testId:"home-binding-vectors"}];for(const b of x)b.enabled&&Se((async()=>{try{const y=await b.load();if(!g.cancelled){const S={bindings:y,label:b.label,tab:b.tab,testId:b.testId};l(M=>gt(M,S))}}catch{}})());return()=>{g.cancelled=!0}},c=[e,a.kv,a.storage,a.vectors,n],t[1]=e,t[2]=a.kv,t[3]=a.storage,t[4]=a.vectors,t[5]=n,t[6]=i,t[7]=c):(i=t[6],c=t[7]),Fe(i,c),o.length===0)return null;let u;t[8]!==n?(u=n("Bindings"),t[8]=n,t[9]=u):u=t[9];let d;t[10]!==u?(d=r("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:u}),t[10]=u,t[11]=d):d=t[11];let p;t[12]!==o?(p=o.map(Nt),t[12]=o,t[13]=p):p=t[13];let m;t[14]!==p?(m=r("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p}),t[14]=p,t[15]=m):m=t[15];let f;return t[16]!==d||t[17]!==m?(f=h("section",{className:"flex flex-col gap-3","data-testid":"home-bindings",children:[d,m]}),t[16]=d,t[17]=m,t[18]=f):f=t[18],f};function bt(t){return r(Ye,{variant:"secondary",children:t},t)}function yt(t){return t.binding}function vt(t){return t.name}function Nt(t){return r(ht,{group:t},t.tab)}const _t=[{name:"lunora_list_functions",summary:"list every query, mutation, and action with its path"},{name:"lunora_list_tables",summary:"list the schema's tables"},{name:"lunora_get_function_schema",summary:"read a function's argument JSON Schema before calling it"},{name:"lunora_run_query",summary:"run a read-only query"},{name:"lunora_run_mutation",summary:"run a mutation — writes; only when LUNORA_MCP_ALLOW_WRITES is set"},{name:"lunora_run_action",summary:"run an action — writes/effects; only when LUNORA_MCP_ALLOW_WRITES is set"}],St=t=>JSON.stringify({mcpServers:{lunora:{args:["-y","@lunora/mcp"],command:"npx",env:{LUNORA_ADMIN_TOKEN:"<your-admin-token>",LUNORA_URL:t}}}},null,2),kt=t=>{const e=_t.map(a=>`- ${a.name} — ${a.summary}`).join(`
|
|
2
2
|
`);return[`You have a Lunora MCP server connected to the deployment at ${t}.`,"It exposes this backend's functions and schema so you can inspect and operate it:",e,"",`Start by calling lunora_list_functions and lunora_list_tables to learn what exists, then lunora_get_function_schema before any run call. The full HTTP API is also documented at ${t}/_lunora/admin/openapi (that endpoint needs the same admin token the MCP server is configured with).`].join(`
|
|
3
3
|
`)},wt=1500,$t=()=>{const t=L(35),e=I();let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=lt(),t[0]=a):a=t[0];const n=a,[s,o]=Ee(null);let l,i;t[1]!==s?(l=()=>{if(s===null)return;const A=globalThis.setTimeout(()=>{o(null)},wt);return()=>{globalThis.clearTimeout(A)}},i=[s],t[1]=s,t[2]=l,t[3]=i):(l=t[2],i=t[3]),Fe(l,i);let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=(A,C)=>{it(C)&&o(A)},t[4]=c):c=t[4];const u=c;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{u("config",St(n))},t[5]=d):d=t[5];const p=d;let m;t[6]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{u("prompt",kt(n))},t[6]=m):m=t[6];const f=m;let g;t[7]!==e?(g=e("Connect an AI agent"),t[7]=e,t[8]=g):g=t[8];let x;t[9]!==g?(x=r("span",{className:"text-sm font-medium text-foreground",children:g}),t[9]=g,t[10]=x):x=t[10];let b;t[11]!==e?(b=e("Drive this deployment from an AI agent over the Model Context Protocol — it can list functions and tables, read schemas, and run read-only queries. Writes stay off unless you opt in."),t[11]=e,t[12]=b):b=t[12];let y;t[13]!==b?(y=r("span",{className:"text-xs text-muted-foreground",children:b}),t[13]=b,t[14]=y):y=t[14];let S;t[15]!==x||t[16]!==y?(S=h("div",{className:"flex flex-col gap-1.5 p-4",children:[x,y]}),t[15]=x,t[16]=y,t[17]=S):S=t[17];let M;t[18]===Symbol.for("react.memo_cache_sentinel")?(M=r("code",{className:"font-mono text-xs text-muted-foreground","data-testid":"home-connect-agent-command",children:"npx -y @lunora/mcp"}),t[18]=M):M=t[18];let k;t[19]!==s||t[20]!==e?(k=e(s==="config"?"Copied":"Copy MCP config"),t[19]=s,t[20]=e,t[21]=k):k=t[21];let v;t[22]!==k?(v=r(We,{"data-testid":"home-connect-agent-copy-config",onClick:p,size:"xs",variant:"outline",children:k}),t[22]=k,t[23]=v):v=t[23];let w;t[24]!==s||t[25]!==e?(w=e(s==="prompt"?"Copied":"Copy agent prompt"),t[24]=s,t[25]=e,t[26]=w):w=t[26];let $;t[27]!==w?($=r(We,{"data-testid":"home-connect-agent-copy-prompt",onClick:f,size:"xs",variant:"outline",children:w}),t[27]=w,t[28]=$):$=t[28];let N;t[29]!==v||t[30]!==$?(N=h("div",{className:"flex flex-col gap-3 border-t border-border bg-muted/50 px-4 py-3",children:[M,h("div",{className:"flex flex-wrap gap-2",children:[v,$]})]}),t[29]=v,t[30]=$,t[31]=N):N=t[31];let _;return t[32]!==S||t[33]!==N?(_=h(K,{className:"gap-0 py-0","data-testid":"home-connect-agent",children:[S,N]}),t[32]=S,t[33]=N,t[34]=_):_=t[34],_},Lt=nt(()=>import("../packem_chunks/sparkline.js").then(t=>({default:t.Sparkline}))),Be=t=>{if(t<1e3)return`${String(Math.round(t))}ms`;const e=t>=1e4?0:1;return`${(t/1e3).toFixed(e)}s`},Mt=(t,e)=>{const a=Math.max(0,Math.round((e-t)/1e3));if(a<60)return`${String(a)}s ago`;const n=Math.round(a/60);if(n<60)return`${String(n)}m ago`;const s=Math.round(n/60);return s<24?`${String(s)}h ago`:`${String(Math.round(s/24))}d ago`},He=(t,e)=>{if(t===void 0||t.length===0)return[];const a=new Map;for(const n of t)a.set(n.bucketMs,(a.get(n.bucketMs)??0)+n[e]);return[...a.entries()].toSorted(([n],[s])=>n-s).map(([,n])=>n)},Je=(t,e=!0)=>{if(t.length<4)return null;const a=Math.floor(t.length/2),n=t.slice(0,a).reduce((l,i)=>l+i,0),s=t.slice(a).reduce((l,i)=>l+i,0);if(n===0)return null;const o=(s-n)/n*100;return{positive:e?o>=0:o<=0,text:`${o>=0?"+":""}${o.toFixed(1)}%`}},Oe=t=>{const e=L(24),{delta:a,footer:n,label:s,trend:o,unit:l,value:i}=t,c=I();let u;e[0]!==s?(u=r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:s}),e[0]=s,e[1]=u):u=e[1];let d;e[2]!==i?(d=r("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[2]=i,e[3]=d):d=e[3];let p;e[4]!==l?(p=l!==void 0&&r("span",{className:"text-xs text-muted-foreground",children:l}),e[4]=l,e[5]=p):p=e[5];let m;e[6]!==d||e[7]!==p?(m=h("span",{className:"flex items-baseline gap-1.5",children:[d,p]}),e[6]=d,e[7]=p,e[8]=m):m=e[8];let f;e[9]!==o?(f=o!==void 0&&r(at,{fallback:r("div",{"aria-hidden":"true",className:"h-8 w-28"}),children:r(Lt,{data:o})}),e[9]=o,e[10]=f):f=e[10];let g;e[11]!==m||e[12]!==f?(g=h("div",{className:"flex items-center justify-between gap-3",children:[m,f]}),e[11]=m,e[12]=f,e[13]=g):g=e[13];let x;e[14]!==u||e[15]!==g?(x=h("div",{className:"flex flex-col gap-2.5 p-4",children:[u,g]}),e[14]=u,e[15]=g,e[16]=x):x=e[16];let b;e[17]!==a||e[18]!==n||e[19]!==c?(b=a==null?n!=null&&r("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px] text-muted-foreground",children:n}):h("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5 text-[11px]",children:[r("span",{className:Xe("font-semibold",a.positive?"text-success":"text-destructive"),children:a.text})," ",r("span",{className:"text-muted-foreground",children:c("vs. prev.")})]}),e[17]=a,e[18]=n,e[19]=c,e[20]=b):b=e[20];let y;return e[21]!==x||e[22]!==b?(y=h(K,{className:"justify-between gap-0 py-0",children:[x,b]}),e[21]=x,e[22]=b,e[23]=y):y=e[23],y},At=()=>{const t=L(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r("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:r("path",{d:"m9 6 6 6-6 6"})}),t[0]=e):e=t[0],e},De=t=>{const e=L(7),{command:a,label:n}=t;let s;e[0]!==n?(s=r("div",{className:"p-4",children:r("span",{className:"text-sm font-medium text-foreground",children:n})}),e[0]=n,e[1]=s):s=e[1];let o;e[2]!==a?(o=r("div",{className:"border-t border-border bg-muted/50 px-4 py-2.5",children:r("code",{className:"font-mono text-xs text-muted-foreground",children:a})}),e[2]=a,e[3]=o):o=e[3];let l;return e[4]!==s||e[5]!==o?(l=h(K,{className:"justify-between gap-0 py-0",children:[s,o]}),e[4]=s,e[5]=o,e[6]=l):l=e[6],l},Ge=t=>{const e=L(18),{count:a,onView:n,testId:s,title:o}=t,l=I();let i;e[0]!==o?(i=r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:o}),e[0]=o,e[1]=i):i=e[1];let c;e[2]!==a||e[3]!==l?(c=a===null?r("span",{className:"text-xs text-muted-foreground",children:l("No data yet")}):r(Ye,{variant:a>0?"destructive":"success",children:a>0?a:l("All clear")}),e[2]=a,e[3]=l,e[4]=c):c=e[4];let u;e[5]!==i||e[6]!==c?(u=h("div",{className:"flex items-start justify-between gap-2 p-4",children:[i,c]}),e[5]=i,e[6]=c,e[7]=u):u=e[7];let d;e[8]!==l?(d=l("View"),e[8]=l,e[9]=d):d=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=r(At,{}),e[10]=p):p=e[10];let m;e[11]!==n||e[12]!==d?(m=h("button",{className:"flex items-center gap-1 border-t border-border bg-muted/50 px-4 py-2.5 text-[12px] font-medium text-foreground outline-none transition-colors hover:bg-muted focus-visible:bg-muted",onClick:n,type:"button",children:[d,p]}),e[11]=n,e[12]=d,e[13]=m):m=e[13];let f;return e[14]!==u||e[15]!==m||e[16]!==s?(f=h(K,{className:"justify-between gap-0 py-0","data-testid":s,children:[u,m]}),e[14]=u,e[15]=m,e[16]=s,e[17]=f):f=e[17],f},Ct=t=>{const e=L(7),{functions:a}=t,n=I();let s;if(e[0]!==a||e[1]!==n){const o=[...a].toSorted(Ot).slice(0,5);let l;e[3]!==n?(l=n("Top functions"),e[3]=n,e[4]=l):l=e[4];let i;e[5]!==l?(i=r("div",{className:"border-b border-border px-4 py-3",children:r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l})}),e[5]=l,e[6]=i):i=e[6],s=h(K,{className:"gap-0 py-0","data-testid":"home-top-functions",children:[i,o.length===0?r("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:n("No functions called yet.")}):h("div",{className:"divide-y divide-border",children:[h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] gap-4 px-4 py-1.5 font-mono text-[10px] tracking-wide text-muted-foreground uppercase",children:[r("span",{children:n("Function")}),r("span",{className:"text-end",children:n("Calls")}),r("span",{className:"w-12 text-end",children:n("Avg")}),r("span",{className:"w-8 text-end",children:n("Err")})]}),o.map(Rt)]})]}),e[0]=a,e[1]=n,e[2]=s}else s=e[2];return s},It=t=>{const e=L(26),{subs:a}=t,n=I();let s;e[0]!==n?(s=n("Live connections"),e[0]=n,e[1]=s):s=e[1];let o;e[2]!==s?(o=r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:s}),e[2]=s,e[3]=o):o=e[3];const l=a?.totalConnections??0;let i;e[4]!==l?(i=l.toLocaleString(),e[4]=l,e[5]=i):i=e[5];let c;e[6]!==i?(c=r("span",{className:"text-2xl font-semibold tabular-nums text-foreground",children:i}),e[6]=i,e[7]=c):c=e[7];let u;e[8]!==n?(u=n("sockets"),e[8]=n,e[9]=u):u=e[9];let d;e[10]!==u?(d=r("span",{className:"text-xs text-muted-foreground",children:u}),e[10]=u,e[11]=d):d=e[11];let p;e[12]!==c||e[13]!==d?(p=h("span",{className:"flex items-baseline gap-1.5",children:[c,d]}),e[12]=c,e[13]=d,e[14]=p):p=e[14];const m=a?.totalSubscriptions??0;let f;e[15]!==m?(f=m.toLocaleString(),e[15]=m,e[16]=f):f=e[16];let g;e[17]!==n?(g=n("active subscriptions"),e[17]=n,e[18]=g):g=e[18];let x;e[19]!==f||e[20]!==g?(x=h("span",{className:"text-[11px] text-muted-foreground",children:[f," ",g]}),e[19]=f,e[20]=g,e[21]=x):x=e[21];let b;return e[22]!==x||e[23]!==o||e[24]!==p?(b=r(K,{"data-testid":"home-live-connections",children:h(Ze,{className:"flex flex-col gap-2.5 py-4",children:[o,p,x]})}),e[22]=x,e[23]=o,e[24]=p,e[25]=b):b=e[25],b},jt=t=>{const e=L(7),{entries:a}=t,n=I();let s;if(e[0]!==a||e[1]!==n){const o=Date.now();let l;e[3]!==n?(l=n("Recent activity"),e[3]=n,e[4]=l):l=e[4];let i;e[5]!==l?(i=r("div",{className:"border-b border-border px-4 py-3",children:r("span",{className:"font-mono text-[11px] tracking-wide text-muted-foreground uppercase",children:l})}),e[5]=l,e[6]=i):i=e[6],s=h(K,{className:"gap-0 py-0","data-testid":"home-recent-activity",children:[i,a.length===0?r("p",{className:"px-4 py-8 text-center text-xs text-muted-foreground",children:n("No recent activity.")}):r("ul",{className:"divide-y divide-border",children:a.slice(0,5).map(c=>h("li",{className:"flex items-center justify-between gap-3 px-4 py-2 text-[13px]",children:[h("span",{className:"flex min-w-0 items-center gap-2",children:[r("span",{"aria-hidden":"true",className:"size-1.5 shrink-0 rounded-full bg-muted-foreground/40"}),h("span",{className:"truncate text-foreground",children:[c.op,c.table!==void 0&&h("span",{className:"text-muted-foreground",children:[" · ",c.table,c.id===void 0?"":`#${c.id}`]})]})]}),r("span",{className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:Mt(c.ts,o)})]},c.seq))})]}),e[0]=a,e[1]=n,e[2]=s}else s=e[2];return s},Tt=t=>{const e=t.reduce((a,n)=>a+n.calls,0);return e===0?null:t.reduce((a,n)=>a+n.totalDurationMs,0)/e},Zt=t=>{const e=L(151),{initialShardKey:a}=t,n=I(),s=Qe(),o=a??"";let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={},e[0]=l):l=e[0];let i;e[1]!==o?(i={shardKey:o},e[1]=o,e[2]=i):i=e[2];const c=_e(Ne.getMetrics,l,i);let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={},e[3]=u):u=e[3];let d;e[4]!==o?(d={shardKey:o},e[4]=o,e[5]=d):d=e[5];const p=_e(Ne.getFunctionStats,u,d);let m,f;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={},f={shardKey:""},e[6]=m,e[7]=f):(m=e[6],f=e[7]);const g=_e(Ne.getSecurityAudit,m,f);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={},e[8]=x):x=e[8];let b;e[9]!==o?(b={shardKey:o},e[9]=o,e[10]=b):b=e[10];const y=_e(Ne.listSubscriptions,x,b);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S={},e[11]=S):S=e[11];let M;e[12]!==o?(M={shardKey:o},e[12]=o,e[13]=M):M=e[13];const k=_e(Ne.getAuditLog,S,M),v=c.data??null;let w,$,N,_,A,C,P,j,T,z,D,B,O,R,E,F,V,W;if(e[14]!==k.data||e[15]!==g.data||e[16]!==v||e[17]!==c.data||e[18]!==s||e[19]!==p.data||e[20]!==y.data||e[21]!==n){_=Array.isArray(p.data?.functions)?p.data.functions:[],P=y.data??null;let Le;e[40]!==k.data?(Le=Array.isArray(k.data?.entries)?k.data.entries:[],e[40]=k.data,e[41]=Le):Le=e[41],$=Le,A=c.data===void 0||p.data===void 0?null:dt(v,_).length,C=Array.isArray(g.data?.findings)?g.data.findings.length:null;let Me;e[42]!==s?(Me=()=>{Se(s({to:"/security"}))},e[42]=s,e[43]=Me):Me=e[43],W=Me;let Ae;e[44]!==s?(Ae=()=>{Se(s({to:"/insights"}))},e[44]=s,e[45]=Ae):Ae=e[45],V=Ae;const Ce=He(v?.history,"calls"),Ie=He(v?.history,"errors"),Ve=Tt(_),je=Math.max(0,..._.map(qt)),q=v?.cache;let Te;e[46]!==q?(Te=q!=null&&q.hits+q.misses>0?Math.round(q.hits/(q.hits+q.misses)*100):null,e[46]=q,e[47]=Te):Te=e[47],N=Te,E="flex flex-col gap-6",F="lunora-home",D="grid gap-3 sm:grid-cols-2 xl:grid-cols-4",B="home-health";const qe=Je(Ce);let xe;e[48]!==n?(xe=n("Requests"),e[48]=n,e[49]=xe):xe=e[49];const Ke=v?.requests??0;let be;e[50]!==Ke?(be=Ke.toLocaleString(),e[50]=Ke,e[51]=be):be=e[51],e[52]!==Ce||e[53]!==qe||e[54]!==xe||e[55]!==be?(O=r(Oe,{delta:qe,label:xe,trend:Ce,value:be}),e[52]=Ce,e[53]=qe,e[54]=xe,e[55]=be,e[56]=O):O=e[56];const Pe=Je(Ie,!1);let ye;e[57]!==n?(ye=n("Errors"),e[57]=n,e[58]=ye):ye=e[58];const ze=v?.errors??0;let ve;e[59]!==ze?(ve=ze.toLocaleString(),e[59]=ze,e[60]=ve):ve=e[60],e[61]!==Ie||e[62]!==Pe||e[63]!==ye||e[64]!==ve?(R=r(Oe,{delta:Pe,label:ye,trend:Ie,value:ve}),e[61]=Ie,e[62]=Pe,e[63]=ye,e[64]=ve,e[65]=R):R=e[65],w=Oe,e[66]!==je||e[67]!==n?(j=je>0?`${n("max")} ${Be(je)}`:void 0,e[66]=je,e[67]=n,e[68]=j):j=e[68],e[69]!==n?(T=n("Avg latency"),e[69]=n,e[70]=T):T=e[70],z=Ve===null?"—":Be(Ve),e[14]=k.data,e[15]=g.data,e[16]=v,e[17]=c.data,e[18]=s,e[19]=p.data,e[20]=y.data,e[21]=n,e[22]=w,e[23]=$,e[24]=N,e[25]=_,e[26]=A,e[27]=C,e[28]=P,e[29]=j,e[30]=T,e[31]=z,e[32]=D,e[33]=B,e[34]=O,e[35]=R,e[36]=E,e[37]=F,e[38]=V,e[39]=W}else w=e[22],$=e[23],N=e[24],_=e[25],A=e[26],C=e[27],P=e[28],j=e[29],T=e[30],z=e[31],D=e[32],B=e[33],O=e[34],R=e[35],E=e[36],F=e[37],V=e[38],W=e[39];let U;e[71]!==w||e[72]!==j||e[73]!==T||e[74]!==z?(U=r(w,{footer:j,label:T,value:z}),e[71]=w,e[72]=j,e[73]=T,e[74]=z,e[75]=U):U=e[75];let H;e[76]!==N||e[77]!==n?(H=N===null?void 0:`${String(N)}% ${n("cache hit")}`,e[76]=N,e[77]=n,e[78]=H):H=e[78];let J;e[79]!==n?(J=n("Database size"),e[79]=n,e[80]=J):J=e[80];const Re=v?.databaseSize??null;let G;e[81]!==Re?(G=ct(Re),e[81]=Re,e[82]=G):G=e[82];let Q;e[83]!==H||e[84]!==J||e[85]!==G?(Q=r(Oe,{footer:H,label:J,value:G}),e[83]=H,e[84]=J,e[85]=G,e[86]=Q):Q=e[86];let Y;e[87]!==D||e[88]!==B||e[89]!==O||e[90]!==R||e[91]!==U||e[92]!==Q?(Y=h("div",{className:D,"data-testid":B,children:[O,R,U,Q]}),e[87]=D,e[88]=B,e[89]=O,e[90]=R,e[91]=U,e[92]=Q,e[93]=Y):Y=e[93];let ke;e[94]===Symbol.for("react.memo_cache_sentinel")?(ke=r(xt,{}),e[94]=ke):ke=e[94];let Z;e[95]!==_?(Z=r("div",{className:"lg:col-span-2",children:r(Ct,{functions:_})}),e[95]=_,e[96]=Z):Z=e[96];let X;e[97]!==P?(X=r(It,{subs:P}),e[97]=P,e[98]=X):X=e[98];let ee;e[99]!==$?(ee=r(jt,{entries:$}),e[99]=$,e[100]=ee):ee=e[100];let te;e[101]!==X||e[102]!==ee?(te=h("div",{className:"flex flex-col gap-3",children:[X,ee]}),e[101]=X,e[102]=ee,e[103]=te):te=e[103];let ne;e[104]!==Z||e[105]!==te?(ne=h("div",{className:"grid gap-3 lg:grid-cols-3",children:[Z,te]}),e[104]=Z,e[105]=te,e[106]=ne):ne=e[106];let ae;e[107]!==n?(ae=n("Advisors"),e[107]=n,e[108]=ae):ae=e[108];let re;e[109]!==ae?(re=r("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:ae}),e[109]=ae,e[110]=re):re=e[110];let se;e[111]!==A||e[112]!==C||e[113]!==n||e[114]!==V||e[115]!==W?(se=C===0&&A===0?r(rt,{description:n("No security or performance issues detected."),icon:h("svg",{"aria-hidden":"true",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.6,viewBox:"0 0 24 24",children:[r("path",{d:"M12 3 4 6v5c0 5 3.4 8.5 8 10 4.6-1.5 8-5 8-10V6l-8-3Z"}),r("path",{d:"m9 12 2 2 4-4"})]}),testId:"home-advisors-clear",title:n("No issues found")}):h("div",{className:"grid gap-3 sm:grid-cols-2",children:[r(Ge,{count:C,onView:W,testId:"home-security",title:n("Security findings")}),r(Ge,{count:A,onView:V,testId:"home-performance",title:n("Performance issues")})]}),e[111]=A,e[112]=C,e[113]=n,e[114]=V,e[115]=W,e[116]=se):se=e[116];let oe;e[117]!==re||e[118]!==se?(oe=h("section",{className:"flex flex-col gap-3","data-testid":"home-advisors",children:[re,se]}),e[117]=re,e[118]=se,e[119]=oe):oe=e[119];let le;e[120]!==n?(le=n("Get connected"),e[120]=n,e[121]=le):le=e[121];let ie;e[122]!==le?(ie=r("h2",{className:"text-sm font-semibold tracking-tight text-foreground",children:le}),e[122]=le,e[123]=ie):ie=e[123];let ce;e[124]!==n?(ce=n("Client SDK"),e[124]=n,e[125]=ce):ce=e[125];let de;e[126]!==ce?(de=r(De,{command:"npm i @lunora/client",label:ce}),e[126]=ce,e[127]=de):de=e[127];let me;e[128]!==n?(me=n("React"),e[128]=n,e[129]=me):me=e[129];let ue;e[130]!==me?(ue=r(De,{command:"npm i @lunora/react",label:me}),e[130]=me,e[131]=ue):ue=e[131];let pe;e[132]!==n?(pe=n("CLI"),e[132]=n,e[133]=pe):pe=e[133];let fe;e[134]!==pe?(fe=r(De,{command:"lunora dev",label:pe}),e[134]=pe,e[135]=fe):fe=e[135];let he;e[136]!==de||e[137]!==ue||e[138]!==fe?(he=h("div",{className:"grid gap-3 sm:grid-cols-3",children:[de,ue,fe]}),e[136]=de,e[137]=ue,e[138]=fe,e[139]=he):he=e[139];let we;e[140]===Symbol.for("react.memo_cache_sentinel")?(we=r($t,{}),e[140]=we):we=e[140];let ge;e[141]!==ie||e[142]!==he?(ge=h("section",{className:"flex flex-col gap-3","data-testid":"home-get-connected",children:[ie,he,we]}),e[141]=ie,e[142]=he,e[143]=ge):ge=e[143];let $e;return e[144]!==E||e[145]!==F||e[146]!==Y||e[147]!==ne||e[148]!==oe||e[149]!==ge?($e=h("div",{className:E,"data-testid":F,children:[Y,ke,ne,oe,ge]}),e[144]=E,e[145]=F,e[146]=Y,e[147]=ne,e[148]=oe,e[149]=ge,e[150]=$e):$e=e[150],$e};function Ot(t,e){return e.calls-t.calls}function Rt(t){return h("div",{className:"grid grid-cols-[1fr_auto_auto_auto] items-center gap-4 px-4 py-2 text-[13px]",children:[r("span",{className:"truncate font-mono text-xs text-foreground",children:t.path}),r("span",{className:"text-end tabular-nums",children:t.calls.toLocaleString()}),r("span",{className:"w-12 text-end tabular-nums text-muted-foreground",children:Be(t.calls>0?t.totalDurationMs/t.calls:0)}),r("span",{className:Xe("w-8 text-end tabular-nums",t.errors>0?"text-destructive":"text-muted-foreground"),children:t.errors})]},t.path)}function qt(t){return t.maxDurationMs}export{Zt as H,pt as S};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{c as w}from"react/compiler-runtime";import{RouterProvider as Xt,createRootRoute as Yt,createRoute as Nt,createBrowserHistory as Gt,createMemoryHistory as ea,createRouter as ta,useSearch as aa,useNavigate as Pt,useRouterState as ra,Outlet as sa}from"@tanstack/react-router";import*as rt from"react";import{useState as ot,useEffect as st,use as kt,createContext as $t,useSyncExternalStore as na,lazy as Q,Suspense as oa}from"react";import{c as A}from"./utils-bhneXptQ.js";import{jsx as s,jsxs as x,Fragment as At}from"react/jsx-runtime";import{ErrorBoundary as ia}from"./ErrorBoundary-DvzYskH7.js";import{O as la,u as da}from"./operation-console-provider-BMJNtiyB.js";import{useT as G}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{LunoraError as Tt}from"@lunora/errors";import{g as it}from"./badge-BbuuAio7.js";import{u as zt}from"./input-JHu63lTv.js";import{Popover as nt}from"@base-ui/react/popover";import{Cancel01Icon as ca,SidebarLeftIcon as ua}from"@hugeicons/core-free-icons";import{HugeiconsIcon as Et}from"@hugeicons/react";import{mergeProps as Rt}from"@base-ui/react/merge-props";import{useRender as It}from"@base-ui/react/use-render";import{cva as ha}from"class-variance-authority";import{u as Ht}from"./button-BkCrNcAs.js";import{Dialog as ae}from"@base-ui/react/dialog";import{Tooltip as te}from"@base-ui/react/tooltip";import{n as gt}from"./skeleton-C1wQ9M5t.js";import{H as ma,S as pa}from"./home-panel-B60-5YfI.js";import{c as fa,f as yt}from"./internal-BSIsQVC6.js";import{y as ut}from"./use-admin-query-QJ-ibl5u.js";import{StudioI18nProvider as ga}from"./StudioI18nProvider-CZ5h4nrV.js";import{v as ba,a as va}from"./data-view-params-ClrV7XgF.js";import{CommandPalette as ya,openCommandPalette as xa}from"./CommandPalette--SQwfTW1.js";import{motion as ka}from"motion/react";const Kt="(prefers-color-scheme: dark)",Vt=()=>{try{return globalThis.localStorage}catch{return}},wa=t=>t==="system"||t==="light"||t==="dark",Zt=()=>globalThis.matchMedia,Ot="lunora-studio-theme",bt=["system","light","dark"],Na=(t="system")=>{try{const e=Vt()?.getItem(Ot);return wa(e)?e:t}catch{return t}},St=t=>{const e=Vt();if(e!==void 0)try{e.setItem(Ot,t)}catch{}},Sa=()=>{try{return Zt()?.(Kt).matches?"dark":"light"}catch{return"light"}},Ma=(t,e)=>t==="system"?e:t,Ca=t=>{let e;try{e=Zt()?.(Kt)}catch{e=void 0}if(e===void 0)return()=>{};const a=r=>{t(r.matches?"dark":"light")};return e.addEventListener("change",a),()=>{e.removeEventListener("change",a)}},wt=$t(null),_a=({children:t,defaultTheme:e="system"})=>{const[a,r]=ot(()=>Na(e)),[n,o]=ot(()=>Sa());st(()=>Ca(o),[]);const i=d=>{St(d),r(d)},l={cycleTheme:()=>{r(d=>{const u=bt[(bt.indexOf(d)+1)%bt.length]??d;return St(u),u})},resolvedTheme:Ma(a,n),setTheme:i,systemTheme:n,theme:a};return s(wt,{value:l,children:t})},La=t=>{const e=w(3),{children:a}=t,r=kt(wt);let n;return e[0]!==a||e[1]!==r?(n=r===null?s(_a,{children:a}):a,e[0]=a,e[1]=r,e[2]=n):n=e[2],n},Pa=()=>{const t=kt(wt);if(t===null)throw new Tt("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function dn({delay:t=0,...e}){return s(te.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function $a(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(te.Root,{"data-slot":"tooltip",...a}),e[2]=a,e[3]=r):r=e[3],r}function Aa(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(te.Trigger,{"data-slot":"tooltip-trigger",...a}),e[2]=a,e[3]=r):r=e[3],r}function Ta({className:t,side:e="top",sideOffset:a=4,align:r="center",alignOffset:n=0,children:o,...i}){return s(te.Portal,{children:s(te.Positioner,{align:r,alignOffset:n,side:e,sideOffset:a,className:"isolate z-50",children:x(te.Popup,{"data-slot":"tooltip-content",className:A("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...i,children:[o,s(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 za=t=>{const e=w(5),{className:a}=t;let r;e[0]!==a?(r=A("h-full w-full text-foreground",a),e[0]=a,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s("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 o;return e[3]!==r?(o=s("svg",{"aria-hidden":"true",className:r,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=r,e[4]=o):o=e[4],o},qt="lunora.studio.rulesBannerDismissed",Ea=()=>{try{return globalThis.localStorage.getItem(qt)==="1"}catch{return!1}},Ra=()=>{try{globalThis.localStorage.setItem(qt,"1")}catch{}},Ia=()=>{const t=w(18),e=G(),[a,r]=ot(Ha);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{r(!0),Ra()},t[0]=n):n=t[0];const o=n;if(a)return null;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=i):i=t[1];let l;t[2]!==e?(l=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=l):l=t[3];let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=s("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=d):d=t[4];let u;t[5]!==e?(u=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=u):u=t[6];let c;t[7]!==l||t[8]!==u?(c=x("span",{children:[l," ",d," ",u]}),t[7]=l,t[8]=u,t[9]=c):c=t[9];let p;t[10]!==e?(p=e("Dismiss"),t[10]=e,t[11]=p):p=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:s("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=g):g=t[12];let h;t[13]!==p?(h=s("button",{"aria-label":p,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:o,type:"button",children:g}),t[13]=p,t[14]=h):h=t[14];let f;return t[15]!==c||t[16]!==h?(f=x("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[i,c,h]}),t[15]=c,t[16]=h,t[17]=f):f=t[17],f};function Ha(){return Ea()}function Bt(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(nt.Root,{"data-slot":"popover",...a}),e[2]=a,e[3]=r):r=e[3],r}function Dt(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(nt.Trigger,{"data-slot":"popover-trigger",...a}),e[2]=a,e[3]=r):r=e[3],r}function Wt({align:t="end",alignOffset:e=0,className:a,keepMounted:r=!1,side:n="bottom",sideOffset:o=6,...i}){return s(nt.Portal,{keepMounted:r,children:s(nt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:o,children:s(nt.Popup,{className:A("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",a),"data-slot":"popover-content",...i})})})}const vt=768;function Ka(){const t=w(2),[e,a]=ot(void 0);let r,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=globalThis.matchMedia(`(max-width: ${vt-1}px)`),i=()=>{a(globalThis.innerWidth<vt)};return o.addEventListener("change",i),a(globalThis.innerWidth<vt),()=>{o.removeEventListener("change",i)}},n=[],t[0]=r,t[1]=n):(r=t[0],n=t[1]),st(r,n),!!e}function Va(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(ae.Root,{"data-slot":"sheet",...a}),e[2]=a,e[3]=r):r=e[3],r}function Za(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(ae.Portal,{"data-slot":"sheet-portal",...a}),e[2]=a,e[3]=r):r=e[3],r}function Oa(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("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:",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s(ae.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function qa({className:t,children:e,side:a="right",showCloseButton:r=!0,...n}){return x(Za,{children:[s(Oa,{}),x(ae.Popup,{"data-slot":"sheet-content","data-side":a,className:A("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,r&&x(ae.Close,{"data-slot":"sheet-close",render:s(Ht,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[s(Et,{icon:ca,strokeWidth:2}),s("span",{className:"sr-only",children:"Close"})]})]})]})}function Ba(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex flex-col gap-0.5 p-4",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sheet-header",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Da(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("text-sm font-medium text-foreground",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s(ae.Title,{"data-slot":"sheet-title",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Wa(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("text-xs/relaxed text-muted-foreground",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s(ae.Description,{"data-slot":"sheet-description",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}const Fa="sidebar_state",ja=3600*24*7,Ua="16rem",Qa="18rem",Ja="3rem",Xa="b",Ft=rt.createContext(null);function ht(){const t=rt.useContext(Ft);if(!t)throw new Tt("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function Ya({defaultOpen:t=!0,open:e,onOpenChange:a,className:r,style:n,children:o,...i}){const l=Ka(),[d,u]=rt.useState(!1),[c,p]=rt.useState(t),g=e??c,h=m=>{const y=typeof m=="function"?m(g):m;a?a(y):p(y),document.cookie=`${Fa}=${y}; path=/; max-age=${ja}`},f=()=>l?u(m=>!m):h(m=>!m),v=rt.useEffectEvent(()=>{f()});rt.useEffect(()=>{const m=y=>{y.key===Xa&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),v())};return globalThis.addEventListener("keydown",m),()=>globalThis.removeEventListener("keydown",m)},[]);const b={state:g?"expanded":"collapsed",open:g,setOpen:h,isMobile:l,openMobile:d,setOpenMobile:u,toggleSidebar:f};return s(Ft.Provider,{value:b,children:s("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ua,"--sidebar-width-icon":Ja,...n},className:A("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...i,children:o})})}function Ga({side:t="left",variant:e="sidebar",collapsible:a="offcanvas",className:r,children:n,dir:o,...i}){const{isMobile:l,state:d,openMobile:u,setOpenMobile:c}=ht();return a==="none"?s("div",{"data-slot":"sidebar",className:A("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...i,children:n}):l?s(Va,{open:u,onOpenChange:c,...i,children:x(qa,{dir:o,"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":Qa},side:t,children:[x(Ba,{className:"sr-only",children:[s(Da,{children:"Sidebar"}),s(Wa,{children:"Displays the mobile sidebar."})]}),s("div",{className:"flex h-full w-full flex-col",children:n})]})}):x("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[s("div",{"data-slot":"sidebar-gap",className:A("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)")}),s("div",{"data-slot":"sidebar-container","data-side":t,className:A("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",r),...i,children:s("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 er(t){const e=w(15);let a,r,n;e[0]!==t?({className:a,onClick:r,...n}=t,e[0]=t,e[1]=a,e[2]=r,e[3]=n):(a=e[1],r=e[2],n=e[3]);const{toggleSidebar:o}=ht();let i;e[4]!==a?(i=A(a),e[4]=a,e[5]=i):i=e[5];let l;e[6]!==r||e[7]!==o?(l=p=>{r?.(p),o()},e[6]=r,e[7]=o,e[8]=l):l=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s(Et,{icon:ua,strokeWidth:2,className:"rtl:rotate-180"}),u=s("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]!==i||e[13]!==l?(c=x(Ht,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:i,onClick:l,...n,children:[d,u]}),e[11]=n,e[12]=i,e[13]=l,e[14]=c):c=e[14],c}function tr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("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",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("main",{"data-slot":"sidebar-inset",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function ar(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex flex-col gap-2 p-2",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function rr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex flex-col gap-2 p-2",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function sr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("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",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function nr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("relative flex w-full min-w-0 flex-col p-2",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function or(t){const e=w(10);let a,r,n,o;if(e[0]!==t){const{className:d,render:u,...c}=t;a=u,o=It,r="div",n=Rt({className:A("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]=a,e[2]=r,e[3]=n,e[4]=o}else a=e[1],r=e[2],n=e[3],o=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=i):i=e[5];let l;return e[6]!==a||e[7]!==r||e[8]!==n?(l={defaultTagName:r,props:n,render:a,state:i},e[6]=a,e[7]=r,e[8]=n,e[9]=l):l=e[9],o(l)}function ir(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("w-full text-xs",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Mt(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex w-full min-w-0 flex-col gap-0",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Ct(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("group/menu-item relative",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}const lr=ha("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 jt({render:t,isActive:e=!1,variant:a="default",size:r="default",tooltip:n,className:o,...i}){const{isMobile:l,state:d}=ht(),u=It({defaultTagName:"button",props:Rt({className:A(lr({variant:a,size:r}),o)},i),render:n?s(Aa,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:e}});return n?(typeof n=="string"&&(n={children:n}),x($a,{children:[u,s(Ta,{side:"right",align:"center",hidden:d!=="collapsed"||l,...n})]})):u}const dr=t=>t.replace("__lunora_admin__:",""),cr=()=>na(ut.subscribe,ut.getSnapshot,ut.getSnapshot),ur=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",hr=t=>{const e=w(56),{entry:a,focused:r}=t,n=G();let o;e[0]!==r?(o=E=>{E!==null&&r&&E.scrollIntoView({block:"nearest"})},e[0]=r,e[1]=o):o=e[1];const i=o;let l;e[2]!==a.functionPath||e[3]!==a.shardKey||e[4]!==a.summary?(l=()=>{fa(`${a.functionPath} ${a.summary}${a.shardKey===""?"":` (shard ${a.shardKey})`}`)},e[2]=a.functionPath,e[3]=a.shardKey,e[4]=a.summary,e[5]=l):l=e[5];const d=l,u=r&&"bg-accent ring-1 ring-inset ring-primary/40";let c;e[6]!==u?(c=A("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=c):c=e[7];let p;e[8]!==a.status?(p=ur(a.status),e[8]=a.status,e[9]=p):p=e[9];const g=a.status==="pending"?"…":a.status;let h;e[10]!==p||e[11]!==g?(h=s(it,{className:"mt-px shrink-0",variant:p,children:g}),e[10]=p,e[11]=g,e[12]=h):h=e[12];let f;e[13]!==a.functionPath?(f=dr(a.functionPath),e[13]=a.functionPath,e[14]=f):f=e[14];let v;e[15]!==f?(v=s("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:f}),e[15]=f,e[16]=v):v=e[16];let b;e[17]!==a.kind||e[18]!==n?(b=a.kind==="subscription"&&s(it,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=a.kind,e[18]=n,e[19]=b):b=e[19];let m;e[20]!==a.summary?(m=a.summary!==""&&s("span",{className:"min-w-0 truncate text-muted-foreground",children:a.summary}),e[20]=a.summary,e[21]=m):m=e[21];let y;e[22]!==a.shardKey?(y=a.shardKey!==""&&s("span",{className:"font-mono",children:a.shardKey}),e[22]=a.shardKey,e[23]=y):y=e[23];let k;e[24]!==a.resultCount||e[25]!==n?(k=a.resultCount!==void 0&&s("span",{children:n("{count} rows",{count:a.resultCount})}),e[24]=a.resultCount,e[25]=n,e[26]=k):k=e[26];let S;e[27]!==a.pushes||e[28]!==n?(S=a.pushes!==void 0&&a.pushes>0&&s("span",{children:n("{count} pushes",{count:a.pushes})}),e[27]=a.pushes,e[28]=n,e[29]=S):S=e[29];let _;e[30]!==a.durationMs?(_=a.durationMs!==void 0&&x("span",{children:[a.durationMs,"ms"]}),e[30]=a.durationMs,e[31]=_):_=e[31];let L;e[32]!==n?(L=n("Copy"),e[32]=n,e[33]=L):L=e[33];let N;e[34]!==d||e[35]!==L?(N=s("button",{"aria-label":L,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]=L,e[36]=N):N=e[36];let P;e[37]!==y||e[38]!==k||e[39]!==S||e[40]!==_||e[41]!==N?(P=x("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[y,k,S,_,N]}),e[37]=y,e[38]=k,e[39]=S,e[40]=_,e[41]=N,e[42]=P):P=e[42];let M;e[43]!==b||e[44]!==m||e[45]!==P||e[46]!==h||e[47]!==v?(M=x("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[h,v,b,m,P]}),e[43]=b,e[44]=m,e[45]=P,e[46]=h,e[47]=v,e[48]=M):M=e[48];let $;e[49]!==a.error?($=a.error!==void 0&&s("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:a.error}),e[49]=a.error,e[50]=$):$=e[50];let T;return e[51]!==i||e[52]!==M||e[53]!==$||e[54]!==c?(T=x("li",{className:c,"data-testid":"oc-row",ref:i,children:[M,$]}),e[51]=i,e[52]=M,e[53]=$,e[54]=c,e[55]=T):T=e[55],T},mr=t=>{const e=w(62),{focusSeq:a,onClose:r,onShownChange:n,shown:o}=t,i=G(),l=cr(),[d,u]=ot("");let c;if(e[0]!==l||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==n||e[5]!==o||e[6]!==i){const p=d.trim().toLowerCase(),g=l.filter(z=>(o==="errors"?z.status==="error":!0)&&(p===""||`${z.functionPath} ${z.summary} ${z.shardKey}`.toLowerCase().includes(p))).toReversed();let h;e[8]!==l?(h=l.filter(pr),e[8]=l,e[9]=h):h=e[9];const f=h.length;let v;e[10]!==i?(v=i("Operation console"),e[10]=i,e[11]=v):v=e[11];let b;e[12]!==i?(b=i("Operation console"),e[12]=i,e[13]=b):b=e[13];let m;e[14]!==b?(m=s("span",{className:"text-xs font-medium",children:b}),e[14]=b,e[15]=m):m=e[15];let y;e[16]!==l.length||e[17]!==i?(y=i("{count} calls",{count:l.length}),e[16]=l.length,e[17]=i,e[18]=y):y=e[18];let k;e[19]!==y?(k=s(it,{variant:"secondary",children:y}),e[19]=y,e[20]=k):k=e[20];let S;e[21]!==f||e[22]!==i?(S=f>0&&s(it,{variant:"destructive",children:i("{count} failed",{count:f})}),e[21]=f,e[22]=i,e[23]=S):S=e[23];const _=o==="errors",L=o==="errors"&&"bg-accent";let N;e[24]!==L?(N=A("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",L),e[24]=L,e[25]=N):N=e[25];let P;e[26]!==n||e[27]!==o?(P=()=>{n(o==="errors"?"all":"errors")},e[26]=n,e[27]=o,e[28]=P):P=e[28];let M;e[29]!==i?(M=i("Errors"),e[29]=i,e[30]=M):M=e[30];let $;e[31]!==N||e[32]!==P||e[33]!==M||e[34]!==_?($=s("button",{"aria-pressed":_,className:N,"data-testid":"oc-filter-errors",onClick:P,type:"button",children:M}),e[31]=N,e[32]=P,e[33]=M,e[34]=_,e[35]=$):$=e[35];let T;e[36]!==i?(T=i("Filter"),e[36]=i,e[37]=T):T=e[37];let E;e[38]===Symbol.for("react.memo_cache_sentinel")?(E=z=>{u(z.target.value)},e[38]=E):E=e[38];let H;e[39]!==i?(H=i("Filter"),e[39]=i,e[40]=H):H=e[40];let K;e[41]!==d||e[42]!==T||e[43]!==H?(K=s(zt,{"aria-label":T,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:E,placeholder:H,value:d}),e[41]=d,e[42]=T,e[43]=H,e[44]=K):K=e[44];let R;e[45]!==i?(R=i("Clear"),e[45]=i,e[46]=R):R=e[46];let I;e[47]!==R?(I=s("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:fr,type:"button",children:R}),e[47]=R,e[48]=I):I=e[48];let V;e[49]!==i?(V=i("Hide"),e[49]=i,e[50]=V):V=e[50];let Z;e[51]!==r||e[52]!==V?(Z=s("button",{"aria-label":V,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:r,type:"button",children:"✕"}),e[51]=r,e[52]=V,e[53]=Z):Z=e[53];let q;e[54]!==$||e[55]!==K||e[56]!==I||e[57]!==Z||e[58]!==m||e[59]!==k||e[60]!==S?(q=x("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[m,k,S,$,K,I,Z]}),e[54]=$,e[55]=K,e[56]=I,e[57]=Z,e[58]=m,e[59]=k,e[60]=S,e[61]=q):q=e[61],c=x("section",{"aria-label":v,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[q,g.length===0?s("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:i("Every admin call this studio makes is recorded here.")}):s("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:g.map(z=>s(hr,{entry:z,focused:z.seq===a},z.seq))})]}),e[0]=l,e[1]=a,e[2]=d,e[3]=r,e[4]=n,e[5]=o,e[6]=i,e[7]=c}else c=e[7];return c};function pr(t){return t.status==="error"}function fr(){ut.clear()}const gr=()=>{const t=w(304),e=G();let a;t[0]!==e?(a=e("Health score"),t[0]=e,t[1]=a):a=t[1];let r;t[2]!==e?(r=e("Agents"),t[2]=e,t[3]=r):r=t[3];let n;t[4]!==e?(n=e("Analytics"),t[4]=e,t[5]=n):n=t[5];let o;t[6]!==e?(o=e("API"),t[6]=e,t[7]=o):o=t[7];let i;t[8]!==e?(i=e("Audit"),t[8]=e,t[9]=i):i=t[9];let l;t[10]!==e?(l=e("Auth audit"),t[10]=e,t[11]=l):l=t[11];let d;t[12]!==e?(d=e("Configuration"),t[12]=e,t[13]=d):d=t[13];let u;t[14]!==e?(u=e("Sessions"),t[14]=e,t[15]=u):u=t[15];let c;t[16]!==e?(c=e("Containers"),t[16]=e,t[17]=c):c=t[17];let p;t[18]!==e?(p=e("Dashboards"),t[18]=e,t[19]=p):p=t[19];let g;t[20]!==e?(g=e("Data"),t[20]=e,t[21]=g):g=t[21];let h;t[22]!==e?(h=e("Deployment health"),t[22]=e,t[23]=h):h=t[23];let f;t[24]!==e?(f=e("Log drains"),t[24]=e,t[25]=f):f=t[25];let v;t[26]!==e?(v=e("Export / Import"),t[26]=e,t[27]=v):v=t[27];let b;t[28]!==e?(b=e("Fan-out"),t[28]=e,t[29]=b):b=t[29];let m;t[30]!==e?(m=e("Files"),t[30]=e,t[31]=m):m=t[31];let y;t[32]!==e?(y=e("Flags"),t[32]=e,t[33]=y):y=t[33];let k;t[34]!==e?(k=e("Functions"),t[34]=e,t[35]=k):k=t[35];let S;t[36]!==e?(S=e("Health"),t[36]=e,t[37]=S):S=t[37];let _;t[38]!==e?(_=e("Home"),t[38]=e,t[39]=_):_=t[39];let L;t[40]!==e?(L=e("Performance"),t[40]=e,t[41]=L):L=t[41];let N;t[42]!==e?(N=e("Issues"),t[42]=e,t[43]=N):N=t[43];let P;t[44]!==e?(P=e("KV"),t[44]=e,t[45]=P):P=t[45];let M;t[46]!==e?(M=e("Logs"),t[46]=e,t[47]=M):M=t[47];let $;t[48]!==e?($=e("Metrics"),t[48]=e,t[49]=$):$=t[49];let T;t[50]!==e?(T=e("Migrations"),t[50]=e,t[51]=T):T=t[51];let E;t[52]!==e?(E=e("Notifications"),t[52]=e,t[53]=E):E=t[53];let H;t[54]!==e?(H=e("Organizations"),t[54]=e,t[55]=H):H=t[55];let K;t[56]!==e?(K=e("Time Travel"),t[56]=e,t[57]=K):K=t[57];let R;t[58]!==e?(R=e("Mail"),t[58]=e,t[59]=R):R=t[59];let I;t[60]!==e?(I=e("Payments"),t[60]=e,t[61]=I):I=t[61];let V;t[62]!==e?(V=e("Permissions"),t[62]=e,t[63]=V):V=t[63];let Z;t[64]!==e?(Z=e("Queues"),t[64]=e,t[65]=Z):Z=t[65];let q;t[66]!==e?(q=e("Realtime"),t[66]=e,t[67]=q):q=t[67];let z;t[68]!==e?(z=e("RLS Policies"),t[68]=e,t[69]=z):z=t[69];let Y;t[70]!==e?(Y=e("Scheduled"),t[70]=e,t[71]=Y):Y=t[71];let B;t[72]!==e?(B=e("Schema"),t[72]=e,t[73]=B):B=t[73];let J;t[74]!==e?(J=e("Security"),t[74]=e,t[75]=J):J=t[75];let D;t[76]!==e?(D=e("Settings"),t[76]=e,t[77]=D):D=t[77];let W;t[78]!==e?(W=e("SQL editor"),t[78]=e,t[79]=W):W=t[79];let F;t[80]!==e?(F=e("Traces"),t[80]=e,t[81]=F):F=t[81];let j;t[82]!==e?(j=e("Access Rules"),t[82]=e,t[83]=j):j=t[83];let U;t[84]!==e?(U=e("Users"),t[84]=e,t[85]=U):U=t[85];let X;t[86]!==e?(X=e("Vectors"),t[86]=e,t[87]=X):X=t[87];let O;t[88]!==e?(O=e("Workflows"),t[88]=e,t[89]=O):O=t[89];let ee;t[90]!==a||t[91]!==r||t[92]!==g||t[93]!==h||t[94]!==f||t[95]!==v||t[96]!==b||t[97]!==m||t[98]!==y||t[99]!==k||t[100]!==S||t[101]!==_||t[102]!==n||t[103]!==L||t[104]!==N||t[105]!==P||t[106]!==M||t[107]!==$||t[108]!==T||t[109]!==E||t[110]!==H||t[111]!==K||t[112]!==R||t[113]!==o||t[114]!==I||t[115]!==V||t[116]!==Z||t[117]!==q||t[118]!==z||t[119]!==Y||t[120]!==B||t[121]!==J||t[122]!==D||t[123]!==W||t[124]!==i||t[125]!==F||t[126]!==j||t[127]!==U||t[128]!==X||t[129]!==O||t[130]!==l||t[131]!==d||t[132]!==u||t[133]!==c||t[134]!==p?(ee={advisorHealth:a,agents:r,analytics:n,api:o,audit:i,authAudit:l,authConfig:d,authSessions:u,containers:c,dashboards:p,data:g,deploymentHealth:h,drains:f,export:v,fanout:b,files:m,flags:y,functions:k,health:S,home:_,insights:L,issues:N,kv:P,logs:M,metrics:$,migrations:T,notifications:E,organizations:H,pitr:K,mail:R,payments:I,permissions:V,queues:Z,realtime:q,rls:z,schedule:Y,schema:B,security:J,settings:D,sql:W,traces:F,storageRules:j,users:U,vectors:X,workflows:O},t[90]=a,t[91]=r,t[92]=g,t[93]=h,t[94]=f,t[95]=v,t[96]=b,t[97]=m,t[98]=y,t[99]=k,t[100]=S,t[101]=_,t[102]=n,t[103]=L,t[104]=N,t[105]=P,t[106]=M,t[107]=$,t[108]=T,t[109]=E,t[110]=H,t[111]=K,t[112]=R,t[113]=o,t[114]=I,t[115]=V,t[116]=Z,t[117]=q,t[118]=z,t[119]=Y,t[120]=B,t[121]=J,t[122]=D,t[123]=W,t[124]=i,t[125]=F,t[126]=j,t[127]=U,t[128]=X,t[129]=O,t[130]=l,t[131]=d,t[132]=u,t[133]=c,t[134]=p,t[135]=ee):ee=t[135];const mt=ee;let re;t[136]!==e?(re=e("Advisors"),t[136]=e,t[137]=re):re=t[137];let se;t[138]!==e?(se=e("Auth"),t[138]=e,t[139]=se):se=t[139];let ne;t[140]!==e?(ne=e("Database"),t[140]=e,t[141]=ne):ne=t[141];let oe;t[142]!==e?(oe=e("Functions"),t[142]=e,t[143]=oe):oe=t[143];let ie;t[144]!==e?(ie=e("Observability"),t[144]=e,t[145]=ie):ie=t[145];let le;t[146]!==e?(le=e("Operations"),t[146]=e,t[147]=le):le=t[147];let de;t[148]!==e?(de=e("Overview"),t[148]=e,t[149]=de):de=t[149];let ce;t[150]!==e?(ce=e("Settings"),t[150]=e,t[151]=ce):ce=t[151];let ue;t[152]!==e?(ue=e("Storage"),t[152]=e,t[153]=ue):ue=t[153];let lt;t[154]!==re||t[155]!==se||t[156]!==ne||t[157]!==oe||t[158]!==ie||t[159]!==le||t[160]!==de||t[161]!==ce||t[162]!==ue?(lt={advisors:re,auth:se,database:ne,functions:oe,observability:ie,operations:le,overview:de,settings:ce,storage:ue},t[154]=re,t[155]=se,t[156]=ne,t[157]=oe,t[158]=ie,t[159]=le,t[160]=de,t[161]=ce,t[162]=ue,t[163]=lt):lt=t[163];const pt=lt;let he;t[164]!==e?(he=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[164]=e,t[165]=he):he=t[165];let me;t[166]!==e?(me=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[166]=e,t[167]=me):me=t[167];let pe;t[168]!==e?(pe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[168]=e,t[169]=pe):pe=t[169];let fe;t[170]!==e?(fe=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[170]=e,t[171]=fe):fe=t[171];let ge;t[172]!==e?(ge=e("A durable log of admin state-changing operations."),t[172]=e,t[173]=ge):ge=t[173];let be;t[174]!==e?(be=e("Authentication and security events — sign-ins, MFA, and session changes."),t[174]=e,t[175]=be):be=t[175];let ve;t[176]!==e?(ve=e("Enabled plugins and session config (read-only)."),t[176]=e,t[177]=ve):ve=t[177];let ye;t[178]!==e?(ye=e("Browse and revoke active sessions across all users."),t[178]=e,t[179]=ye):ye=t[179];let xe;t[180]!==e?(xe=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[180]=e,t[181]=xe):xe=t[181];let ke;t[182]!==e?(ke=e("Chart widgets backed by saved read-only SQL queries."),t[182]=e,t[183]=ke):ke=t[183];let we;t[184]!==e?(we=e("Browse and edit rows across your shard and global tables."),t[184]=e,t[185]=we):we=t[185];let Ne;t[186]!==e?(Ne=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[186]=e,t[187]=Ne):Ne=t[187];let Se;t[188]!==e?(Se=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[188]=e,t[189]=Se):Se=t[189];let Me;t[190]!==e?(Me=e("Export a shard to NDJSON, or import rows from it."),t[190]=e,t[191]=Me):Me=t[191];let Ce;t[192]!==e?(Ce=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[192]=e,t[193]=Ce):Ce=t[193];let _e;t[194]!==e?(_e=e("Browse objects in your R2 storage buckets."),t[194]=e,t[195]=_e):_e=t[195];let Le;t[196]!==e?(Le=e("Inspect feature flags and their live evaluation under a targeting context."),t[196]=e,t[197]=Le):Le=t[197];let Pe;t[198]!==e?(Pe=e("Run registered queries, mutations, and actions."),t[198]=e,t[199]=Pe):Pe=t[199];let $e;t[200]!==e?($e=e("At-a-glance connection, error, and shard signals."),t[200]=e,t[201]=$e):$e=t[201];let Ae;t[202]!==e?(Ae=e("Connection, health, and advisor summary for your deployment."),t[202]=e,t[203]=Ae):Ae=t[203];let Te;t[204]!==e?(Te=e("Surface slow functions, error spikes, and cache problems."),t[204]=e,t[205]=Te):Te=t[205];let ze;t[206]!==e?(ze=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[206]=e,t[207]=ze):ze=t[207];let Ee;t[208]!==e?(Ee=e("A live stream of recent function logs."),t[208]=e,t[209]=Ee):Ee=t[209];let Re;t[210]!==e?(Re=e("Per-shard health and aggregate metrics."),t[210]=e,t[211]=Re):Re=t[211];let Ie;t[212]!==e?(Ie=e("Review migration status and run them."),t[212]=e,t[213]=Ie):Ie=t[213];let He;t[214]!==e?(He=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[214]=e,t[215]=He):He=t[215];let Ke;t[216]!==e?(Ke=e("Browse and manage organizations, members, and invitations."),t[216]=e,t[217]=Ke):Ke=t[217];let Ve;t[218]!==e?(Ve=e("Restore a shard to a point in the last 30 days."),t[218]=e,t[219]=Ve):Ve=t[219];let Ze;t[220]!==e?(Ze=e("Email your app sent, captured in dev."),t[220]=e,t[221]=Ze):Ze=t[221];let Oe;t[222]!==e?(Oe=e("Synced customers, subscriptions, and webhook events."),t[222]=e,t[223]=Oe):Oe=t[223];let qe;t[224]!==e?(qe=e("Inspect access policies per table, and probe a function as any identity."),t[224]=e,t[225]=qe):qe=t[225];let Be;t[226]!==e?(Be=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[226]=e,t[227]=Be):Be=t[227];let De;t[228]!==e?(De=e("Active WebSocket subscriptions on this shard."),t[228]=e,t[229]=De):De=t[229];let We;t[230]!==e?(We=e("Inspect row-level-security policies and roles, per table."),t[230]=e,t[231]=We):We=t[231];let Fe;t[232]!==e?(Fe=e("Inspect and cancel scheduled jobs."),t[232]=e,t[233]=Fe):Fe=t[233];let je;t[234]!==e?(je=e("Inspect each table and its columns."),t[234]=e,t[235]=je):je=t[235];let Ue;t[236]!==e?(Ue=e("Review admin gates, credentials, and log redaction."),t[236]=e,t[237]=Ue):Ue=t[237];let Qe;t[238]!==e?(Qe=e("Read-only deployment config — vars, secrets, and bindings."),t[238]=e,t[239]=Qe):Qe=t[239];let Je;t[240]!==e?(Je=e("Run read-only SQL against a shard."),t[240]=e,t[241]=Je):Je=t[241];let Xe;t[242]!==e?(Xe=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[242]=e,t[243]=Xe):Xe=t[243];let Ye;t[244]!==e?(Ye=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[244]=e,t[245]=Ye):Ye=t[245];let Ge;t[246]!==e?(Ge=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[246]=e,t[247]=Ge):Ge=t[247];let et;t[248]!==e?(et=e("Manage auth users — roles, bans, sessions, and identity."),t[248]=e,t[249]=et):et=t[249];let tt;t[250]!==e?(tt=e("Browse Vectorize indexes and run similarity searches."),t[250]=e,t[251]=tt):tt=t[251];let at;t[252]!==e?(at=e("Inspect declared Cloudflare Workflows and their bindings."),t[252]=e,t[253]=at):at=t[253];let dt;t[254]!==at||t[255]!==he||t[256]!==me||t[257]!==pe||t[258]!==fe||t[259]!==ge||t[260]!==be||t[261]!==ve||t[262]!==ye||t[263]!==xe||t[264]!==ke||t[265]!==we||t[266]!==Ne||t[267]!==Se||t[268]!==Me||t[269]!==Ce||t[270]!==_e||t[271]!==Le||t[272]!==Pe||t[273]!==$e||t[274]!==Ae||t[275]!==Te||t[276]!==ze||t[277]!==Ee||t[278]!==Re||t[279]!==Ie||t[280]!==He||t[281]!==Ke||t[282]!==Ve||t[283]!==Ze||t[284]!==Oe||t[285]!==qe||t[286]!==Be||t[287]!==De||t[288]!==We||t[289]!==Fe||t[290]!==je||t[291]!==Ue||t[292]!==Qe||t[293]!==Je||t[294]!==Xe||t[295]!==Ye||t[296]!==Ge||t[297]!==et||t[298]!==tt?(dt={advisorHealth:he,agents:me,analytics:pe,api:fe,audit:ge,authAudit:be,authConfig:ve,authSessions:ye,containers:xe,dashboards:ke,data:we,deploymentHealth:Ne,drains:Se,export:Me,fanout:Ce,files:_e,flags:Le,functions:Pe,health:$e,home:Ae,insights:Te,issues:ze,logs:Ee,metrics:Re,migrations:Ie,notifications:He,organizations:Ke,pitr:Ve,mail:Ze,payments:Oe,permissions:qe,queues:Be,realtime:De,rls:We,schedule:Fe,schema:je,security:Ue,settings:Qe,sql:Je,kv:Xe,storageRules:Ye,traces:Ge,users:et,vectors:tt,workflows:at},t[254]=at,t[255]=he,t[256]=me,t[257]=pe,t[258]=fe,t[259]=ge,t[260]=be,t[261]=ve,t[262]=ye,t[263]=xe,t[264]=ke,t[265]=we,t[266]=Ne,t[267]=Se,t[268]=Me,t[269]=Ce,t[270]=_e,t[271]=Le,t[272]=Pe,t[273]=$e,t[274]=Ae,t[275]=Te,t[276]=ze,t[277]=Ee,t[278]=Re,t[279]=Ie,t[280]=He,t[281]=Ke,t[282]=Ve,t[283]=Ze,t[284]=Oe,t[285]=qe,t[286]=Be,t[287]=De,t[288]=We,t[289]=Fe,t[290]=je,t[291]=Ue,t[292]=Qe,t[293]=Je,t[294]=Xe,t[295]=Ye,t[296]=Ge,t[297]=et,t[298]=tt,t[299]=dt):dt=t[299];const ft=dt;let ct;return t[300]!==pt||t[301]!==ft||t[302]!==mt?(ct={groupLabel:pt,tabDescription:ft,tabLabel:mt},t[300]=pt,t[301]=ft,t[302]=mt,t[303]=ct):ct=t[303],ct},br=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x("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:[s("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),s("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},vr=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x("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:[s("circle",{cx:"12",cy:"12",r:"4"}),s("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},yr=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s("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:s("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},xr=[{Icon:br,value:"system"},{Icon:vr,value:"light"},{Icon:yr,value:"dark"}],kr=()=>{const t=w(19),{theme:e,setTheme:a}=Pa(),r=G();let n;t[0]!==r?(n=r("Dark theme"),t[0]=r,t[1]=n):n=t[1];let o;t[2]!==r?(o=r("Light theme"),t[2]=r,t[3]=o):o=t[3];let i;t[4]!==r?(i=r("System theme"),t[4]=r,t[5]=i):i=t[5];let l;t[6]!==n||t[7]!==o||t[8]!==i?(l={dark:n,light:o,system:i},t[6]=n,t[7]=o,t[8]=i,t[9]=l):l=t[9];const d=l;let u;t[10]!==r?(u=r("Theme"),t[10]=r,t[11]=u):u=t[11];let c;t[12]!==d||t[13]!==a||t[14]!==e?(c=xr.map(g=>{const{Icon:h,value:f}=g,v=e===f;return x("button",{"aria-checked":v,"aria-label":d[f],className:A("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:()=>{a(f)},role:"radio",title:d[f],type:"button",children:[v&&s(ka.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"}}),s("span",{className:"relative",children:s(h,{})})]},f)}),t[12]=d,t[13]=a,t[14]=e,t[15]=c):c=t[15];let p;return t[16]!==u||t[17]!==c?(p=s("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]=p):p=t[18],p},wr=t=>{const e=w(23),{domain:a,onOpenCommandPalette:r,page:n}=t,o=G();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s(er,{className:"-ms-1"}),e[0]=i):i=e[0];let l;e[1]!==o?(l=o("Breadcrumb"),e[1]=o,e[2]=l):l=e[2];let d;e[3]!==a?(d=s("span",{className:"text-muted-foreground",children:a}),e[3]=a,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s("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:s("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=u):u=e[5];let c;e[6]!==n?(c=s("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=c):c=e[7];let p;e[8]!==l||e[9]!==d||e[10]!==c?(p=x("nav",{"aria-label":l,className:"flex items-center gap-1.5 text-[13px]",children:[d,u,c]}),e[8]=l,e[9]=d,e[10]=c,e[11]=p):p=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=x("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[s("circle",{cx:"11",cy:"11",r:"7"}),s("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=g):g=e[12];let h;e[13]!==o?(h=o("Search…"),e[13]=o,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=s("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=f):f=e[15];let v;e[16]!==r||e[17]!==h?(v=x("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:r,type:"button",children:[g,h,f]}),e[16]=r,e[17]=h,e[18]=v):v=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:s(kr,{})}),e[19]=b):b=e[19];let m;return e[20]!==v||e[21]!==p?(m=x("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[i,p,v,b]}),e[20]=v,e[21]=p,e[22]=m):m=e[22],m},Nr=t=>{const e=w(3);let a,r;e[0]!==t?(a=()=>{if(t===void 0)return;const n=o=>{if(!o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||o.repeat||o.key!=="`")return;const{target:i}=o;i instanceof HTMLElement&&(i.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(i.tagName))||(o.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},r=[t],e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]),st(a,r)},C=(t,e)=>Q(()=>t().then(a=>({default:a[e]}))),Sr=C(()=>import("../packem_chunks/InsightsPanel.js"),"InsightsPanel"),Mr=Q(()=>import("../packem_chunks/rls-panel.js")),Cr=Q(()=>import("../packem_chunks/AdvisorHealthPanel.js")),_r=Q(()=>import("../packem_chunks/SecurityAdvisorPanel.js")),Lr=C(()=>import("../packem_chunks/agents-panel.js"),"AgentsPanel"),Pr=C(()=>import("../packem_chunks/analytics-panel.js"),"AnalyticsPanel"),$r=Q(()=>import("../packem_chunks/ApiTab.js")),Ar=C(()=>import("../packem_chunks/auth-audit-panel.js"),"AuthAuditPanel"),Tr=C(()=>import("../packem_chunks/auth-config-panel.js"),"AuthConfigPanel"),zr=C(()=>import("../packem_chunks/auth-sessions-panel.js"),"AuthSessionsPanel"),Er=C(()=>import("../packem_chunks/organizations-panel.js"),"OrganizationsPanel"),Rr=C(()=>import("../packem_chunks/users-panel.js"),"UsersPanel"),Ir=C(()=>import("../packem_chunks/containers-panel.js"),"ContainersPanel"),Hr=C(()=>import("../packem_chunks/DeploymentHealthPanel.js"),"DeploymentHealthPanel"),Kr=C(()=>import("../packem_chunks/TableEditor.js"),"TableEditor"),Vr=C(()=>import("../packem_chunks/ExportImportPanel.js"),"ExportImportPanel"),Zr=C(()=>import("../packem_chunks/migrations-route.js"),"MigrationsRoutePanel"),Or={data:va,migrations:ba},qr=C(()=>import("../packem_chunks/PitrPanel.js"),"PitrPanel"),Br=C(()=>import("../packem_chunks/flags-panel.js"),"FlagsPanel"),Dr=C(()=>import("../packem_chunks/FunctionRunner.js"),"FunctionRunner"),Wr=C(()=>import("../packem_chunks/FunctionStatsPanel.js"),"FunctionStatsPanel"),Fr=C(()=>import("../packem_chunks/issues-panel.js"),"IssuesPanel"),jr=C(()=>import("../packem_chunks/AuditPanel.js"),"AuditPanel"),Ur=C(()=>import("../packem_chunks/log-drains-panel.js"),"LogDrainsPanel"),Qr=Q(()=>import("../packem_chunks/LogsPanel.js").then(t=>({default:t.LogsPanel}))),Jr=C(()=>import("../packem_chunks/MailPanel.js"),"MailPanel"),Xr=C(()=>import("../packem_chunks/schedule-panel.js"),"SchedulePanel"),Yr=Q(()=>import("../packem_chunks/subscriptions-panel.js")),Gr=Q(()=>import("../packem_chunks/sync-client-panel.js")),es=C(()=>import("../packem_chunks/kv-browser.js"),"KvBrowser"),ts=C(()=>import("../packem_chunks/NotificationsPanel.js"),"NotificationsPanel"),as=C(()=>import("../packem_chunks/payments-panel.js"),"PaymentsPanel"),rs=C(()=>import("../packem_chunks/permissions-panel.js"),"PermissionsPanel"),ss=Q(()=>import("../packem_chunks/queues-panel.js")),ns=Q(()=>import("../packem_chunks/dashboards-panel.js")),os=Q(()=>import("../packem_chunks/fanout-panel.js")),is=C(()=>import("../packem_chunks/HealthPanel.js"),"HealthPanel"),ls=C(()=>import("../packem_chunks/MetricsPanel.js"),"MetricsPanel"),ds=C(()=>import("../packem_chunks/SchemaViewer.js"),"SchemaViewer"),cs=C(()=>import("../packem_chunks/SettingsPanel.js"),"SettingsPanel"),us=C(()=>import("../packem_chunks/SqlEditorPanel.js"),"SqlEditorPanel"),hs=C(()=>import("../packem_chunks/FileBrowser.js"),"FileBrowser"),ms=C(()=>import("../packem_chunks/storage-rules-panel.js"),"StorageRulesPanel"),ps=C(()=>import("../packem_chunks/traces-panel.js"),"TracesPanel"),fs=C(()=>import("../packem_chunks/vector-browser.js"),"VectorBrowser"),gs=Q(()=>import("../packem_chunks/workflows-panel.js")),Ut=$t(null),bs={analytics:s("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:s("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:s("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:s("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:s("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:s("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:s("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:s("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:s("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:s("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:s("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:s("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:s("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:s("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:s("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:s("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:s("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),health:s("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:s("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:s("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:s("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:s("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:s("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:s("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:s("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:s("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:s("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:s("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:s("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:s("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:s("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:s("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:s("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:s("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:s("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:s("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:s("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:s("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:s("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:s("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:s("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:s("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:s("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:s("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:s("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},_t=[{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","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"]}],vs={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 a=vs[t];return a===void 0||e[a]},xt=t=>{const e=w(2),{tab:a}=t,r=bs[a];let n;return e[0]!==r?(n=s("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:r}),e[0]=r,e[1]=n):n=e[1],n},ys=t=>t,Qt=ys(["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","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),xs=new Set(["api","data","migrations","sql"]),ks=t=>{const e=t.split("/").findLast(Boolean)??"";return Qt.includes(e)?e:"home"},ws=t=>{const e=w(19),{chrome:a,connected:r}=t,n=G();let o;e[0]!==n?(o=n("admin token"),e[0]=n,e[1]=o):o=e[1];let i;e[2]!==o?(i=s("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:o}),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==a.onTokenChange||e[5]!==a.token?(l=s(zt,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:a.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:a.token}),e[4]=a.onTokenChange,e[5]=a.token,e[6]=l):l=e[6];let d;e[7]!==r||e[8]!==n?(d=r&&x("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[s("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]=r,e[8]=n,e[9]=d):d=e[9];let u;e[10]!==a.clearToken||e[11]!==r||e[12]!==n?(u=r&&s("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:a.clearToken,type:"button",children:n("Clear")}),e[10]=a.clearToken,e[11]=r,e[12]=n,e[13]=u):u=e[13];let c;return e[14]!==i||e[15]!==l||e[16]!==d||e[17]!==u?(c=x("div",{className:"flex flex-col gap-2",children:[i,l,d,u]}),e[14]=i,e[15]=l,e[16]=d,e[17]=u,e[18]=c):c=e[18],c},Ns=t=>{const e=w(25),{current:a,group:r,groupLabel:n,selectTab:o,tabDescription:i,tabLabel:l}=t,d=r.tabs.includes(a)?"page":void 0,u=n[r.key],c=r.tabs[0];let p;e[0]!==c?(p=s(xt,{tab:c}),e[0]=c,e[1]=p):p=e[1];let g;e[2]!==d||e[3]!==u||e[4]!==p?(g=s(Dt,{"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:p}),e[2]=d,e[3]=u,e[4]=p,e[5]=g):g=e[5];const h=n[r.key];let f;e[6]!==h?(f=s("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h}),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==a||e[9]!==r.tabs||e[10]!==o||e[11]!==i||e[12]!==l){let y;e[14]!==a||e[15]!==o||e[16]!==i||e[17]!==l?(y=k=>x("button",{"aria-current":a===k?"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":k,"data-testid":`dash-tab-${k}`,onClick:o,title:i[k],type:"button",children:[s(xt,{tab:k}),s("span",{children:l[k]})]},k),e[14]=a,e[15]=o,e[16]=i,e[17]=l,e[18]=y):y=e[18],v=r.tabs.map(y),e[8]=a,e[9]=r.tabs,e[10]=o,e[11]=i,e[12]=l,e[13]=v}else v=e[13];let b;e[19]!==f||e[20]!==v?(b=x(Wt,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]}),e[19]=f,e[20]=v,e[21]=b):b=e[21];let m;return e[22]!==g||e[23]!==b?(m=x(Bt,{children:[g,b]}),e[22]=g,e[23]=b,e[24]=m):m=e[24],m},Ss=t=>{const e=w(45),{chrome:a,collapsed:r,connected:n}=t,o=G();if(a===null){let k;e[0]!==o?(k=o("Admin"),e[0]=o,e[1]=k):k=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=s("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=S):S=e[2];let _;e[3]!==o?(_=o("Admin"),e[3]=o,e[4]=_):_=e[4];let L;e[5]!==_?(L=s("span",{className:"truncate text-[13px] font-medium",children:_}),e[5]=_,e[6]=L):L=e[6];let N;e[7]!==o?(N=o("Studio"),e[7]=o,e[8]=N):N=e[8];let P;e[9]!==N?(P=s("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=P):P=e[10];let M;e[11]!==L||e[12]!==P?(M=x("span",{className:"grid flex-1 text-start leading-tight",children:[L,P]}),e[11]=L,e[12]=P,e[13]=M):M=e[13];let $;return e[14]!==k||e[15]!==M?($=x(jt,{className:"data-active:bg-transparent",size:"lg",tooltip:k,children:[S,M]}),e[14]=k,e[15]=M,e[16]=$):$=e[16],$}const i=r?"mx-auto size-8 justify-center":"w-full p-2";let l;e[17]!==i?(l=A("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",i),e[17]=i,e[18]=l):l=e[18];let d;e[19]!==n||e[20]!==o?(d=o(n?"Connected":"Not connected"),e[19]=n,e[20]=o,e[21]=d):d=e[21];const u=n?"bg-success":"bg-muted-foreground/50";let c;e[22]!==u?(c=A("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 p;e[24]!==c?(p=x("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",s("span",{"aria-hidden":"true",className:c})]}),e[24]=c,e[25]=p):p=e[25];let g;e[26]!==r||e[27]!==n||e[28]!==o?(g=!r&&x(At,{children:[x("span",{className:"grid flex-1 text-start leading-tight",children:[s("span",{className:"truncate text-[13px] font-medium",children:o("Admin")}),s("span",{className:"truncate text-[11px] text-muted-foreground",children:o(n?"Connected":"Not connected")})]}),s("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:s("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=r,e[27]=n,e[28]=o,e[29]=g):g=e[29];let h;e[30]!==l||e[31]!==d||e[32]!==p||e[33]!==g?(h=x(Dt,{className:l,"data-testid":"dash-app-connect",title:d,children:[p,g]}),e[30]=l,e[31]=d,e[32]=p,e[33]=g,e[34]=h):h=e[34];const f=r?"end":"start",v=r?"right":"top";let b;e[35]!==a||e[36]!==n?(b=s(ws,{chrome:a,connected:n}),e[35]=a,e[36]=n,e[37]=b):b=e[37];let m;e[38]!==v||e[39]!==b||e[40]!==f?(m=s(Wt,{align:f,keepMounted:!0,side:v,children:b}),e[38]=v,e[39]=b,e[40]=f,e[41]=m):m=e[41];let y;return e[42]!==m||e[43]!==h?(y=x(Bt,{children:[h,m]}),e[42]=m,e[43]=h,e[44]=y):y=e[44],y},Ms=t=>{const e=w(28),{chrome:a,connected:r,current:n,groupLabel:o,groups:i,selectTab:l,tabDescription:d,tabLabel:u}=t,c=G(),{state:p}=ht(),g=p==="collapsed",h=g&&"justify-center px-0";let f;e[0]!==h?(f=A("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=s(za,{className:"size-9 shrink-0 text-foreground"}),e[2]=v):v=e[2];let b;e[3]!==g||e[4]!==r||e[5]!==c?(b=!g&&x(At,{children:[x("span",{className:"grid flex-1 leading-tight",children:[s("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),s("span",{className:"truncate text-[11px] text-muted-foreground",children:c("Studio")})]}),s(it,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:c(r?"Live":"Local")})]}),e[3]=g,e[4]=r,e[5]=c,e[6]=b):b=e[6];let m;e[7]!==f||e[8]!==b?(m=s(ar,{children:x("div",{className:f,children:[v,b]})}),e[7]=f,e[8]=b,e[9]=m):m=e[9];let y;e[10]!==g||e[11]!==n||e[12]!==o||e[13]!==i||e[14]!==l||e[15]!==d||e[16]!==u?(y=g?i.map(L=>s(Ns,{current:n,group:L,groupLabel:o,selectTab:l,tabDescription:d,tabLabel:u},L.key)):i.map(L=>x(nr,{children:[s(or,{className:"text-[11px] font-medium tracking-wider uppercase",children:o[L.key]}),s(ir,{children:s(Mt,{children:L.tabs.map(N=>s(Ct,{children:x(jt,{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:l,title:d[N],tooltip:d[N],children:[s(xt,{tab:N}),s("span",{children:u[N]})]})},N))})})]},L.key)),e[10]=g,e[11]=n,e[12]=o,e[13]=i,e[14]=l,e[15]=d,e[16]=u,e[17]=y):y=e[17];let k;e[18]!==y?(k=s(sr,{children:y}),e[18]=y,e[19]=k):k=e[19];let S;e[20]!==a||e[21]!==g||e[22]!==r?(S=s(rr,{children:s(Mt,{children:s(Ct,{children:s(Ss,{chrome:a,collapsed:g,connected:r})})})}),e[20]=a,e[21]=g,e[22]=r,e[23]=S):S=e[23];let _;return e[24]!==m||e[25]!==k||e[26]!==S?(_=x(Ga,{collapsible:"icon",variant:"inset",children:[m,k,S]}),e[24]=m,e[25]=k,e[26]=S,e[27]=_):_=e[27],_},Jt=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[x("div",{className:"flex items-center gap-2",children:[s(gt,{className:"h-8 w-40"}),s(gt,{className:"h-8 w-24"})]}),s(gt,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Cs=()=>{const t=w(64),e=G(),a=Pt();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={select:Ts},t[0]=r):r=t[0];const n=ra(r);let o,i;t[1]!==n?(o=ks(n),i=xs.has(o),t[1]=n,t[2]=o,t[3]=i):(o=t[2],i=t[3]);const l=i,d=da(),u=d?.toggle;Nr(u);const c=pa(),{groupLabel:p,tabDescription:g,tabLabel:h}=gr();let f;t[4]!==c?(f=O=>({...O,tabs:O.tabs.filter(ee=>Lt(ee,c))}),t[4]=c,t[5]=f):f=t[5];const v=_t.map(f).filter(zs);let b,m;t[6]!==o||t[7]!==c||t[8]!==a?(b=()=>{Lt(o,c)||yt(a({replace:!0,to:"/home"}))},m=[o,c,a],t[6]=o,t[7]=c,t[8]=a,t[9]=b,t[10]=m):(b=t[9],m=t[10]),st(b,m);let y;t[11]!==a?(y=O=>{yt(a({to:`/${O.currentTarget.dataset.tab??""}`}))},t[11]=a,t[12]=y):y=t[12];const k=y;let S,_;t[13]!==o||t[14]!==h?(S=()=>{typeof document<"u"&&(document.title=`${h[o]} · lunora`)},_=[o,h],t[13]=o,t[14]=h,t[15]=S,t[16]=_):(S=t[15],_=t[16]),st(S,_);const L=v.find(O=>O.tabs.includes(o))??_t[0];let N;t[17]!==p||t[18]!==h?(N=O=>O.tabs.map(ee=>({group:p[O.key],label:h[ee],to:`/${ee}`})),t[17]=p,t[18]=h,t[19]=N):N=t[19];const P=v.flatMap(N),M=kt(Ut),$=M!==null&&M.token!=="";let T;t[20]!==P?(T=s(ya,{items:P}),t[20]=P,t[21]=T):T=t[21];let E;t[22]!==M||t[23]!==$||t[24]!==o||t[25]!==p||t[26]!==k||t[27]!==g||t[28]!==h||t[29]!==v?(E=s(Ms,{chrome:M,connected:$,current:o,groupLabel:p,groups:v,selectTab:k,tabDescription:g,tabLabel:h}),t[22]=M,t[23]=$,t[24]=o,t[25]=p,t[26]=k,t[27]=g,t[28]=h,t[29]=v,t[30]=E):E=t[30];const H=p[L.key],K=h[o];let R;t[31]!==H||t[32]!==K?(R=s(wr,{domain:H,onOpenCommandPalette:xa,page:K}),t[31]=H,t[32]=K,t[33]=R):R=t[33];let I;t[34]!==M?.rulesInstalled?(I=M?.rulesInstalled===!1&&s(Ia,{}),t[34]=M?.rulesInstalled,t[35]=I):I=t[35];const V=`dash-tab-${o}`,Z=l?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",q=h[o];let z;t[36]!==e||t[37]!==q?(z=e("{title} failed",{title:q}),t[36]=e,t[37]=q,t[38]=z):z=t[38];const Y=h[o];let B;t[39]!==e?(B=e("Try again"),t[39]=e,t[40]=B):B=t[40];let J;t[41]===Symbol.for("react.memo_cache_sentinel")?(J=s(oa,{fallback:s(Jt,{}),children:s(sa,{})}),t[41]=J):J=t[41];let D;t[42]!==o||t[43]!==z||t[44]!==Y||t[45]!==B?(D=s(ia,{fallbackTitle:z,label:Y,retryLabel:B,children:J},o),t[42]=o,t[43]=z,t[44]=Y,t[45]=B,t[46]=D):D=t[46];let W;t[47]!==Z||t[48]!==D?(W=s("div",{className:Z,children:D}),t[47]=Z,t[48]=D,t[49]=W):W=t[49];let F;t[50]!==d?(F=d?.open===!0&&s(mr,{focusSeq:d.focusSeq,onClose:d.close,onShownChange:d.setShown,shown:d.shown}),t[50]=d,t[51]=F):F=t[51];let j;t[52]!==V||t[53]!==W||t[54]!==F?(j=x("div",{"aria-labelledby":V,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[W,F]}),t[52]=V,t[53]=W,t[54]=F,t[55]=j):j=t[55];let U;t[56]!==R||t[57]!==I||t[58]!==j?(U=x(tr,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[R,I,j]}),t[56]=R,t[57]=I,t[58]=j,t[59]=U):U=t[59];let X;return t[60]!==E||t[61]!==U||t[62]!==T?(X=x(Ya,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[T,E,U]}),t[60]=E,t[61]=U,t[62]=T,t[63]=X):X=t[63],X},_s=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s(la,{children:s(Cs,{})}),t[0]=e):e=t[0],e},Ls=t=>{const e=w(5),{initialShardKey:a,schemaEditable:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const o=aa(n),{table:i}=o,l=typeof i=="string"?i:void 0;let d;return e[1]!==a||e[2]!==l||e[3]!==r?(d=s(ds,{initialShardKey:a,initialTable:l,schemaEditable:r}),e[1]=a,e[2]=l,e[3]=r,e[4]=d):d=e[4],d},Ps=()=>{const t=w(3),e=Pt();let a,r;return t[0]!==e?(a=()=>{yt(e({replace:!0,to:"/home"}))},r=[e],t[0]=e,t[1]=a,t[2]=r):(a=t[1],r=t[2]),st(a,r),null},$s=({basePath:t,dataEditable:e=!1,functions:a,initialShardKey:r,openApiSpec:n,openRpcSpec:o,runAsIdentity:i=!1,schemaEditable:l=!1,scheduledCancel:d,scheduledCron:u,scheduledLoad:c})=>{const p=Yt({component:_s}),g={agents:s(Lr,{initialShardKey:r}),analytics:s(Pr,{}),api:s($r,{functions:a,initialShardKey:r,openApiSpec:n,openRpcSpec:o}),audit:s(jr,{initialShardKey:r}),authAudit:s(Ar,{}),authConfig:s(Tr,{}),authSessions:s(zr,{}),containers:s(Ir,{}),dashboards:s(ns,{initialShardKey:r}),data:s(Kr,{editable:e,initialShardKey:r}),deploymentHealth:s(Hr,{}),drains:s(Ur,{}),export:s(Vr,{initialShardKey:r}),fanout:s(os,{initialShardKey:r}),files:s(hs,{}),kv:s(es,{}),flags:s(Br,{initialShardKey:r}),functions:x("div",{className:"flex flex-col gap-8",children:[s(Wr,{functions:a,initialShardKey:r}),s(Dr,{functions:a,runAsIdentity:i})]}),health:s(is,{initialShardKey:r}),home:s(ma,{initialShardKey:r}),insights:s(Sr,{initialShardKey:r}),issues:s(Fr,{initialShardKey:r}),logs:s(Qr,{initialShardKey:r}),traces:s(ps,{initialShardKey:r}),metrics:s(ls,{initialShardKey:r}),migrations:s(Zr,{initialShardKey:r}),notifications:s(ts,{}),organizations:s(Er,{}),permissions:s(rs,{functions:a,runAsIdentity:i,schemaEditable:l}),pitr:s(qr,{initialShardKey:r}),mail:s(Jr,{}),payments:s(as,{}),queues:s(ss,{}),realtime:x("div",{className:"flex flex-col gap-8",children:[s(Yr,{initialShardKey:r}),s(Gr,{})]}),rls:s(Mr,{}),schedule:s(Xr,{loadCronJobs:u,scheduledCancel:d,scheduledLoad:c}),schema:s(Ls,{initialShardKey:r,schemaEditable:l}),advisorHealth:s(Cr,{}),security:s(_r,{}),settings:s(cs,{initialShardKey:r}),sql:s(us,{initialShardKey:r}),storageRules:s(ms,{}),users:s(Rr,{}),vectors:s(fs,{}),workflows:s(gs,{})},h=Nt({component:()=>g.home,getParentRoute:()=>p,path:"/"}),f=Qt.map(m=>Nt({component:()=>g[m],getParentRoute:()=>p,path:`/${m}`,validateSearch:Or[m]})),v=p.addChildren([h,...f]),b="window"in globalThis?Gt():ea({initialEntries:["/home"]});return ta({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Ps,defaultPendingComponent:Jt,defaultPendingMinMs:0,defaultPendingMs:0,history:b,routeTree:v})},As=t=>{const e=w(17),{basePath:a,chrome:r,dataEditable:n,functions:o,initialShardKey:i,openApiSpec:l,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:p,scheduledCron:g,scheduledLoad:h}=t;let f;e[0]!==a||e[1]!==n||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==d||e[6]!==u||e[7]!==p||e[8]!==g||e[9]!==h||e[10]!==c?(f=$s({basePath:a,dataEditable:n,functions:o,initialShardKey:i,openApiSpec:l,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:p,scheduledCron:g,scheduledLoad:h}),e[0]=a,e[1]=n,e[2]=o,e[3]=i,e[4]=l,e[5]=d,e[6]=u,e[7]=p,e[8]=g,e[9]=h,e[10]=c,e[11]=f):f=e[11];const v=f,b=r??null;let m;e[12]!==v?(m=s(Xt,{router:v}),e[12]=v,e[13]=m):m=e[13];let y;return e[14]!==b||e[15]!==m?(y=s(Ut,{value:b,children:m}),e[14]=b,e[15]=m,e[16]=y):y=e[16],y},cn=t=>{const e=w(17),{basePath:a,chrome:r,dataEditable:n,functions:o,i18n:i,initialShardKey:l,locale:d,openApiSpec:u,openRpcSpec:c,runAsIdentity:p,schemaEditable:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t;let b;e[0]!==a||e[1]!==r||e[2]!==n||e[3]!==o||e[4]!==l||e[5]!==u||e[6]!==c||e[7]!==p||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==g?(b=s(La,{children:s(As,{basePath:a,chrome:r,dataEditable:n,functions:o,initialShardKey:l,openApiSpec:u,openRpcSpec:c,runAsIdentity:p,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:g})}),e[0]=a,e[1]=r,e[2]=n,e[3]=o,e[4]=l,e[5]=u,e[6]=c,e[7]=p,e[8]=h,e[9]=f,e[10]=v,e[11]=g,e[12]=b):b=e[12];const m=b;if(i===void 0&&d===void 0)return m;let y;return e[13]!==i||e[14]!==d||e[15]!==m?(y=s(ga,{i18n:i,locale:d,children:m}),e[13]=i,e[14]=d,e[15]=m,e[16]=y):y=e[16],y};function Ts(t){return t.location.pathname}function zs(t){return t.tabs.length>0}export{Ba as N,cn as S,_a as a,Pa as b,qa as c,za as f,Va as g,dn as m,Da as v};
|
|
2
|
+
import{c as w}from"react/compiler-runtime";import{RouterProvider as Xt,createRootRoute as Yt,createRoute as Nt,createBrowserHistory as Gt,createMemoryHistory as ea,createRouter as ta,useSearch as aa,useNavigate as Pt,useRouterState as ra,Outlet as sa}from"@tanstack/react-router";import*as rt from"react";import{useState as ot,useEffect as st,use as kt,createContext as $t,useSyncExternalStore as na,lazy as Q,Suspense as oa}from"react";import{c as A}from"./utils-bhneXptQ.js";import{jsx as s,jsxs as x,Fragment as At}from"react/jsx-runtime";import{ErrorBoundary as ia}from"./ErrorBoundary-DvzYskH7.js";import{O as la,u as da}from"./operation-console-provider-BMJNtiyB.js";import{useT as G}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{LunoraError as Tt}from"@lunora/errors";import{g as it}from"./badge-BbuuAio7.js";import{u as zt}from"./input-JHu63lTv.js";import{Popover as nt}from"@base-ui/react/popover";import{Cancel01Icon as ca,SidebarLeftIcon as ua}from"@hugeicons/core-free-icons";import{HugeiconsIcon as Et}from"@hugeicons/react";import{mergeProps as Rt}from"@base-ui/react/merge-props";import{useRender as It}from"@base-ui/react/use-render";import{cva as ha}from"class-variance-authority";import{u as Ht}from"./button-BkCrNcAs.js";import{Dialog as ae}from"@base-ui/react/dialog";import{Tooltip as te}from"@base-ui/react/tooltip";import{n as gt}from"./skeleton-C1wQ9M5t.js";import{H as ma,S as pa}from"./home-panel-CeeqqV0z.js";import{c as fa,f as yt}from"./internal-BSIsQVC6.js";import{y as ut}from"./use-admin-query-QJ-ibl5u.js";import{StudioI18nProvider as ga}from"./StudioI18nProvider-CZ5h4nrV.js";import{v as ba,a as va}from"./data-view-params-ClrV7XgF.js";import{CommandPalette as ya,openCommandPalette as xa}from"./CommandPalette--SQwfTW1.js";import{motion as ka}from"motion/react";const Kt="(prefers-color-scheme: dark)",Vt=()=>{try{return globalThis.localStorage}catch{return}},wa=t=>t==="system"||t==="light"||t==="dark",Zt=()=>globalThis.matchMedia,Ot="lunora-studio-theme",bt=["system","light","dark"],Na=(t="system")=>{try{const e=Vt()?.getItem(Ot);return wa(e)?e:t}catch{return t}},St=t=>{const e=Vt();if(e!==void 0)try{e.setItem(Ot,t)}catch{}},Sa=()=>{try{return Zt()?.(Kt).matches?"dark":"light"}catch{return"light"}},Ma=(t,e)=>t==="system"?e:t,Ca=t=>{let e;try{e=Zt()?.(Kt)}catch{e=void 0}if(e===void 0)return()=>{};const a=r=>{t(r.matches?"dark":"light")};return e.addEventListener("change",a),()=>{e.removeEventListener("change",a)}},wt=$t(null),_a=({children:t,defaultTheme:e="system"})=>{const[a,r]=ot(()=>Na(e)),[n,o]=ot(()=>Sa());st(()=>Ca(o),[]);const i=d=>{St(d),r(d)},l={cycleTheme:()=>{r(d=>{const u=bt[(bt.indexOf(d)+1)%bt.length]??d;return St(u),u})},resolvedTheme:Ma(a,n),setTheme:i,systemTheme:n,theme:a};return s(wt,{value:l,children:t})},La=t=>{const e=w(3),{children:a}=t,r=kt(wt);let n;return e[0]!==a||e[1]!==r?(n=r===null?s(_a,{children:a}):a,e[0]=a,e[1]=r,e[2]=n):n=e[2],n},Pa=()=>{const t=kt(wt);if(t===null)throw new Tt("INTERNAL","useTheme must be used within a <ThemeProvider>");return t};function dn({delay:t=0,...e}){return s(te.Provider,{"data-slot":"tooltip-provider",delay:t,...e})}function $a(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(te.Root,{"data-slot":"tooltip",...a}),e[2]=a,e[3]=r):r=e[3],r}function Aa(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(te.Trigger,{"data-slot":"tooltip-trigger",...a}),e[2]=a,e[3]=r):r=e[3],r}function Ta({className:t,side:e="top",sideOffset:a=4,align:r="center",alignOffset:n=0,children:o,...i}){return s(te.Portal,{children:s(te.Positioner,{align:r,alignOffset:n,side:e,sideOffset:a,className:"isolate z-50",children:x(te.Popup,{"data-slot":"tooltip-content",className:A("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pe-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-start-2 data-[side=inline-start]:slide-in-from-end-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-md data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",t),...i,children:[o,s(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 za=t=>{const e=w(5),{className:a}=t;let r;e[0]!==a?(r=A("h-full w-full text-foreground",a),e[0]=a,e[1]=r):r=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=s("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 o;return e[3]!==r?(o=s("svg",{"aria-hidden":"true",className:r,fill:"currentColor",viewBox:"0 0 543 446",children:n}),e[3]=r,e[4]=o):o=e[4],o},qt="lunora.studio.rulesBannerDismissed",Ea=()=>{try{return globalThis.localStorage.getItem(qt)==="1"}catch{return!1}},Ra=()=>{try{globalThis.localStorage.setItem(qt,"1")}catch{}},Ia=()=>{const t=w(18),e=G(),[a,r]=ot(Ha);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{r(!0),Ra()},t[0]=n):n=t[0];const o=n;if(a)return null;let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s("span",{"aria-hidden":"true",className:"text-warning",children:"⚠"}),t[1]=i):i=t[1];let l;t[2]!==e?(l=e("Lunora AI rules aren't installed."),t[2]=e,t[3]=l):l=t[3];let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d=s("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-[11px]",children:"lunora rules install"}),t[4]=d):d=t[4];let u;t[5]!==e?(u=e("lets your coding agent use Lunora correctly."),t[5]=e,t[6]=u):u=t[6];let c;t[7]!==l||t[8]!==u?(c=x("span",{children:[l," ",d," ",u]}),t[7]=l,t[8]=u,t[9]=c):c=t[9];let p;t[10]!==e?(p=e("Dismiss"),t[10]=e,t[11]=p):p=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:1.8,viewBox:"0 0 24 24",children:s("path",{d:"M18 6 6 18M6 6l12 12"})}),t[12]=g):g=t[12];let h;t[13]!==p?(h=s("button",{"aria-label":p,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:o,type:"button",children:g}),t[13]=p,t[14]=h):h=t[14];let f;return t[15]!==c||t[16]!==h?(f=x("div",{className:"flex shrink-0 items-center gap-2 border-b border-warning/30 bg-warning/10 px-6 py-2 text-[12px] text-foreground","data-testid":"dash-app-rules-banner",role:"note",children:[i,c,h]}),t[15]=c,t[16]=h,t[17]=f):f=t[17],f};function Ha(){return Ea()}function Bt(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(nt.Root,{"data-slot":"popover",...a}),e[2]=a,e[3]=r):r=e[3],r}function Dt(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(nt.Trigger,{"data-slot":"popover-trigger",...a}),e[2]=a,e[3]=r):r=e[3],r}function Wt({align:t="end",alignOffset:e=0,className:a,keepMounted:r=!1,side:n="bottom",sideOffset:o=6,...i}){return s(nt.Portal,{keepMounted:r,children:s(nt.Positioner,{align:t,alignOffset:e,className:"isolate z-50 outline-none",side:n,sideOffset:o,children:s(nt.Popup,{className:A("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",a),"data-slot":"popover-content",...i})})})}const vt=768;function Ka(){const t=w(2),[e,a]=ot(void 0);let r,n;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const o=globalThis.matchMedia(`(max-width: ${vt-1}px)`),i=()=>{a(globalThis.innerWidth<vt)};return o.addEventListener("change",i),a(globalThis.innerWidth<vt),()=>{o.removeEventListener("change",i)}},n=[],t[0]=r,t[1]=n):(r=t[0],n=t[1]),st(r,n),!!e}function Va(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(ae.Root,{"data-slot":"sheet",...a}),e[2]=a,e[3]=r):r=e[3],r}function Za(t){const e=w(4);let a;e[0]!==t?({...a}=t,e[0]=t,e[1]=a):a=e[1];let r;return e[2]!==a?(r=s(ae.Portal,{"data-slot":"sheet-portal",...a}),e[2]=a,e[3]=r):r=e[3],r}function Oa(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("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:",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s(ae.Backdrop,{"data-slot":"sheet-overlay",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function qa({className:t,children:e,side:a="right",showCloseButton:r=!0,...n}){return x(Za,{children:[s(Oa,{}),x(ae.Popup,{"data-slot":"sheet-content","data-side":a,className:A("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,r&&x(ae.Close,{"data-slot":"sheet-close",render:s(Ht,{variant:"ghost",className:"absolute top-3 end-3",size:"icon-sm"}),children:[s(Et,{icon:ca,strokeWidth:2}),s("span",{className:"sr-only",children:"Close"})]})]})]})}function Ba(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex flex-col gap-0.5 p-4",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sheet-header",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Da(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("text-sm font-medium text-foreground",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s(ae.Title,{"data-slot":"sheet-title",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Wa(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("text-xs/relaxed text-muted-foreground",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s(ae.Description,{"data-slot":"sheet-description",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}const Fa="sidebar_state",ja=3600*24*7,Ua="16rem",Qa="18rem",Ja="3rem",Xa="b",Ft=rt.createContext(null);function ht(){const t=rt.useContext(Ft);if(!t)throw new Tt("INTERNAL","useSidebar must be used within a SidebarProvider.");return t}function Ya({defaultOpen:t=!0,open:e,onOpenChange:a,className:r,style:n,children:o,...i}){const l=Ka(),[d,u]=rt.useState(!1),[c,p]=rt.useState(t),g=e??c,h=m=>{const y=typeof m=="function"?m(g):m;a?a(y):p(y),document.cookie=`${Fa}=${y}; path=/; max-age=${ja}`},f=()=>l?u(m=>!m):h(m=>!m),v=rt.useEffectEvent(()=>{f()});rt.useEffect(()=>{const m=y=>{y.key===Xa&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),v())};return globalThis.addEventListener("keydown",m),()=>globalThis.removeEventListener("keydown",m)},[]);const b={state:g?"expanded":"collapsed",open:g,setOpen:h,isMobile:l,openMobile:d,setOpenMobile:u,toggleSidebar:f};return s(Ft.Provider,{value:b,children:s("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":Ua,"--sidebar-width-icon":Ja,...n},className:A("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",r),...i,children:o})})}function Ga({side:t="left",variant:e="sidebar",collapsible:a="offcanvas",className:r,children:n,dir:o,...i}){const{isMobile:l,state:d,openMobile:u,setOpenMobile:c}=ht();return a==="none"?s("div",{"data-slot":"sidebar",className:A("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",r),...i,children:n}):l?s(Va,{open:u,onOpenChange:c,...i,children:x(qa,{dir:o,"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":Qa},side:t,children:[x(Ba,{className:"sr-only",children:[s(Da,{children:"Sidebar"}),s(Wa,{children:"Displays the mobile sidebar."})]}),s("div",{className:"flex h-full w-full flex-col",children:n})]})}):x("div",{className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":e,"data-side":t,"data-slot":"sidebar",children:[s("div",{"data-slot":"sidebar-gap",className:A("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)")}),s("div",{"data-slot":"sidebar-container","data-side":t,className:A("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",r),...i,children:s("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 er(t){const e=w(15);let a,r,n;e[0]!==t?({className:a,onClick:r,...n}=t,e[0]=t,e[1]=a,e[2]=r,e[3]=n):(a=e[1],r=e[2],n=e[3]);const{toggleSidebar:o}=ht();let i;e[4]!==a?(i=A(a),e[4]=a,e[5]=i):i=e[5];let l;e[6]!==r||e[7]!==o?(l=p=>{r?.(p),o()},e[6]=r,e[7]=o,e[8]=l):l=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=s(Et,{icon:ua,strokeWidth:2,className:"rtl:rotate-180"}),u=s("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]!==i||e[13]!==l?(c=x(Ht,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-sm",className:i,onClick:l,...n,children:[d,u]}),e[11]=n,e[12]=i,e[13]=l,e[14]=c):c=e[14],c}function tr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("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",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("main",{"data-slot":"sidebar-inset",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function ar(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex flex-col gap-2 p-2",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function rr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex flex-col gap-2 p-2",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function sr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("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",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function nr(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("relative flex w-full min-w-0 flex-col p-2",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function or(t){const e=w(10);let a,r,n,o;if(e[0]!==t){const{className:d,render:u,...c}=t;a=u,o=It,r="div",n=Rt({className:A("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]=a,e[2]=r,e[3]=n,e[4]=o}else a=e[1],r=e[2],n=e[3],o=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i={slot:"sidebar-group-label",sidebar:"group-label"},e[5]=i):i=e[5];let l;return e[6]!==a||e[7]!==r||e[8]!==n?(l={defaultTagName:r,props:n,render:a,state:i},e[6]=a,e[7]=r,e[8]=n,e[9]=l):l=e[9],o(l)}function ir(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("w-full text-xs",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Mt(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("flex w-full min-w-0 flex-col gap-0",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}function Ct(t){const e=w(8);let a,r;e[0]!==t?({className:a,...r}=t,e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]);let n;e[3]!==a?(n=A("group/menu-item relative",a),e[3]=a,e[4]=n):n=e[4];let o;return e[5]!==r||e[6]!==n?(o=s("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:n,...r}),e[5]=r,e[6]=n,e[7]=o):o=e[7],o}const lr=ha("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 jt({render:t,isActive:e=!1,variant:a="default",size:r="default",tooltip:n,className:o,...i}){const{isMobile:l,state:d}=ht(),u=It({defaultTagName:"button",props:Rt({className:A(lr({variant:a,size:r}),o)},i),render:n?s(Aa,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:r,active:e}});return n?(typeof n=="string"&&(n={children:n}),x($a,{children:[u,s(Ta,{side:"right",align:"center",hidden:d!=="collapsed"||l,...n})]})):u}const dr=t=>t.replace("__lunora_admin__:",""),cr=()=>na(ut.subscribe,ut.getSnapshot,ut.getSnapshot),ur=t=>t==="error"?"destructive":t==="pending"?"secondary":"default",hr=t=>{const e=w(56),{entry:a,focused:r}=t,n=G();let o;e[0]!==r?(o=E=>{E!==null&&r&&E.scrollIntoView({block:"nearest"})},e[0]=r,e[1]=o):o=e[1];const i=o;let l;e[2]!==a.functionPath||e[3]!==a.shardKey||e[4]!==a.summary?(l=()=>{fa(`${a.functionPath} ${a.summary}${a.shardKey===""?"":` (shard ${a.shardKey})`}`)},e[2]=a.functionPath,e[3]=a.shardKey,e[4]=a.summary,e[5]=l):l=e[5];const d=l,u=r&&"bg-accent ring-1 ring-inset ring-primary/40";let c;e[6]!==u?(c=A("border-b border-border/60 last:border-b-0",u),e[6]=u,e[7]=c):c=e[7];let p;e[8]!==a.status?(p=ur(a.status),e[8]=a.status,e[9]=p):p=e[9];const g=a.status==="pending"?"…":a.status;let h;e[10]!==p||e[11]!==g?(h=s(it,{className:"mt-px shrink-0",variant:p,children:g}),e[10]=p,e[11]=g,e[12]=h):h=e[12];let f;e[13]!==a.functionPath?(f=dr(a.functionPath),e[13]=a.functionPath,e[14]=f):f=e[14];let v;e[15]!==f?(v=s("span",{className:"shrink-0 font-mono text-[11px] text-foreground",children:f}),e[15]=f,e[16]=v):v=e[16];let b;e[17]!==a.kind||e[18]!==n?(b=a.kind==="subscription"&&s(it,{className:"shrink-0",variant:"outline",children:n("live")}),e[17]=a.kind,e[18]=n,e[19]=b):b=e[19];let m;e[20]!==a.summary?(m=a.summary!==""&&s("span",{className:"min-w-0 truncate text-muted-foreground",children:a.summary}),e[20]=a.summary,e[21]=m):m=e[21];let y;e[22]!==a.shardKey?(y=a.shardKey!==""&&s("span",{className:"font-mono",children:a.shardKey}),e[22]=a.shardKey,e[23]=y):y=e[23];let k;e[24]!==a.resultCount||e[25]!==n?(k=a.resultCount!==void 0&&s("span",{children:n("{count} rows",{count:a.resultCount})}),e[24]=a.resultCount,e[25]=n,e[26]=k):k=e[26];let S;e[27]!==a.pushes||e[28]!==n?(S=a.pushes!==void 0&&a.pushes>0&&s("span",{children:n("{count} pushes",{count:a.pushes})}),e[27]=a.pushes,e[28]=n,e[29]=S):S=e[29];let _;e[30]!==a.durationMs?(_=a.durationMs!==void 0&&x("span",{children:[a.durationMs,"ms"]}),e[30]=a.durationMs,e[31]=_):_=e[31];let L;e[32]!==n?(L=n("Copy"),e[32]=n,e[33]=L):L=e[33];let N;e[34]!==d||e[35]!==L?(N=s("button",{"aria-label":L,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]=L,e[36]=N):N=e[36];let P;e[37]!==y||e[38]!==k||e[39]!==S||e[40]!==_||e[41]!==N?(P=x("span",{className:"ms-auto flex shrink-0 items-center gap-2 text-[11px] text-muted-foreground",children:[y,k,S,_,N]}),e[37]=y,e[38]=k,e[39]=S,e[40]=_,e[41]=N,e[42]=P):P=e[42];let M;e[43]!==b||e[44]!==m||e[45]!==P||e[46]!==h||e[47]!==v?(M=x("div",{className:"flex items-start gap-2 px-3 py-1.5 text-xs",children:[h,v,b,m,P]}),e[43]=b,e[44]=m,e[45]=P,e[46]=h,e[47]=v,e[48]=M):M=e[48];let $;e[49]!==a.error?($=a.error!==void 0&&s("p",{className:"px-3 pb-1.5 font-mono text-[11px] text-destructive","data-testid":"oc-error",children:a.error}),e[49]=a.error,e[50]=$):$=e[50];let T;return e[51]!==i||e[52]!==M||e[53]!==$||e[54]!==c?(T=x("li",{className:c,"data-testid":"oc-row",ref:i,children:[M,$]}),e[51]=i,e[52]=M,e[53]=$,e[54]=c,e[55]=T):T=e[55],T},mr=t=>{const e=w(62),{focusSeq:a,onClose:r,onShownChange:n,shown:o}=t,i=G(),l=cr(),[d,u]=ot("");let c;if(e[0]!==l||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==n||e[5]!==o||e[6]!==i){const p=d.trim().toLowerCase(),g=l.filter(z=>(o==="errors"?z.status==="error":!0)&&(p===""||`${z.functionPath} ${z.summary} ${z.shardKey}`.toLowerCase().includes(p))).toReversed();let h;e[8]!==l?(h=l.filter(pr),e[8]=l,e[9]=h):h=e[9];const f=h.length;let v;e[10]!==i?(v=i("Operation console"),e[10]=i,e[11]=v):v=e[11];let b;e[12]!==i?(b=i("Operation console"),e[12]=i,e[13]=b):b=e[13];let m;e[14]!==b?(m=s("span",{className:"text-xs font-medium",children:b}),e[14]=b,e[15]=m):m=e[15];let y;e[16]!==l.length||e[17]!==i?(y=i("{count} calls",{count:l.length}),e[16]=l.length,e[17]=i,e[18]=y):y=e[18];let k;e[19]!==y?(k=s(it,{variant:"secondary",children:y}),e[19]=y,e[20]=k):k=e[20];let S;e[21]!==f||e[22]!==i?(S=f>0&&s(it,{variant:"destructive",children:i("{count} failed",{count:f})}),e[21]=f,e[22]=i,e[23]=S):S=e[23];const _=o==="errors",L=o==="errors"&&"bg-accent";let N;e[24]!==L?(N=A("rounded px-2 py-0.5 text-xs outline-none hover:bg-accent focus-visible:bg-accent",L),e[24]=L,e[25]=N):N=e[25];let P;e[26]!==n||e[27]!==o?(P=()=>{n(o==="errors"?"all":"errors")},e[26]=n,e[27]=o,e[28]=P):P=e[28];let M;e[29]!==i?(M=i("Errors"),e[29]=i,e[30]=M):M=e[30];let $;e[31]!==N||e[32]!==P||e[33]!==M||e[34]!==_?($=s("button",{"aria-pressed":_,className:N,"data-testid":"oc-filter-errors",onClick:P,type:"button",children:M}),e[31]=N,e[32]=P,e[33]=M,e[34]=_,e[35]=$):$=e[35];let T;e[36]!==i?(T=i("Filter"),e[36]=i,e[37]=T):T=e[37];let E;e[38]===Symbol.for("react.memo_cache_sentinel")?(E=z=>{u(z.target.value)},e[38]=E):E=e[38];let H;e[39]!==i?(H=i("Filter"),e[39]=i,e[40]=H):H=e[40];let K;e[41]!==d||e[42]!==T||e[43]!==H?(K=s(zt,{"aria-label":T,className:"h-7 w-40 text-xs","data-testid":"oc-search",onChange:E,placeholder:H,value:d}),e[41]=d,e[42]=T,e[43]=H,e[44]=K):K=e[44];let R;e[45]!==i?(R=i("Clear"),e[45]=i,e[46]=R):R=e[46];let I;e[47]!==R?(I=s("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:fr,type:"button",children:R}),e[47]=R,e[48]=I):I=e[48];let V;e[49]!==i?(V=i("Hide"),e[49]=i,e[50]=V):V=e[50];let Z;e[51]!==r||e[52]!==V?(Z=s("button",{"aria-label":V,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:r,type:"button",children:"✕"}),e[51]=r,e[52]=V,e[53]=Z):Z=e[53];let q;e[54]!==$||e[55]!==K||e[56]!==I||e[57]!==Z||e[58]!==m||e[59]!==k||e[60]!==S?(q=x("div",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-1.5",children:[m,k,S,$,K,I,Z]}),e[54]=$,e[55]=K,e[56]=I,e[57]=Z,e[58]=m,e[59]=k,e[60]=S,e[61]=q):q=e[61],c=x("section",{"aria-label":v,className:"flex max-h-80 flex-col border-t border-border bg-card","data-testid":"lunora-operation-console",children:[q,g.length===0?s("p",{className:"p-3 text-xs text-muted-foreground","data-testid":"oc-empty",children:i("Every admin call this studio makes is recorded here.")}):s("ul",{className:"min-h-0 flex-1 overflow-y-auto","data-testid":"oc-rows",children:g.map(z=>s(hr,{entry:z,focused:z.seq===a},z.seq))})]}),e[0]=l,e[1]=a,e[2]=d,e[3]=r,e[4]=n,e[5]=o,e[6]=i,e[7]=c}else c=e[7];return c};function pr(t){return t.status==="error"}function fr(){ut.clear()}const gr=()=>{const t=w(304),e=G();let a;t[0]!==e?(a=e("Health score"),t[0]=e,t[1]=a):a=t[1];let r;t[2]!==e?(r=e("Agents"),t[2]=e,t[3]=r):r=t[3];let n;t[4]!==e?(n=e("Analytics"),t[4]=e,t[5]=n):n=t[5];let o;t[6]!==e?(o=e("API"),t[6]=e,t[7]=o):o=t[7];let i;t[8]!==e?(i=e("Audit"),t[8]=e,t[9]=i):i=t[9];let l;t[10]!==e?(l=e("Auth audit"),t[10]=e,t[11]=l):l=t[11];let d;t[12]!==e?(d=e("Configuration"),t[12]=e,t[13]=d):d=t[13];let u;t[14]!==e?(u=e("Sessions"),t[14]=e,t[15]=u):u=t[15];let c;t[16]!==e?(c=e("Containers"),t[16]=e,t[17]=c):c=t[17];let p;t[18]!==e?(p=e("Dashboards"),t[18]=e,t[19]=p):p=t[19];let g;t[20]!==e?(g=e("Data"),t[20]=e,t[21]=g):g=t[21];let h;t[22]!==e?(h=e("Deployment health"),t[22]=e,t[23]=h):h=t[23];let f;t[24]!==e?(f=e("Log drains"),t[24]=e,t[25]=f):f=t[25];let v;t[26]!==e?(v=e("Export / Import"),t[26]=e,t[27]=v):v=t[27];let b;t[28]!==e?(b=e("Fan-out"),t[28]=e,t[29]=b):b=t[29];let m;t[30]!==e?(m=e("Files"),t[30]=e,t[31]=m):m=t[31];let y;t[32]!==e?(y=e("Flags"),t[32]=e,t[33]=y):y=t[33];let k;t[34]!==e?(k=e("Functions"),t[34]=e,t[35]=k):k=t[35];let S;t[36]!==e?(S=e("Health"),t[36]=e,t[37]=S):S=t[37];let _;t[38]!==e?(_=e("Home"),t[38]=e,t[39]=_):_=t[39];let L;t[40]!==e?(L=e("Performance"),t[40]=e,t[41]=L):L=t[41];let N;t[42]!==e?(N=e("Issues"),t[42]=e,t[43]=N):N=t[43];let P;t[44]!==e?(P=e("KV"),t[44]=e,t[45]=P):P=t[45];let M;t[46]!==e?(M=e("Logs"),t[46]=e,t[47]=M):M=t[47];let $;t[48]!==e?($=e("Metrics"),t[48]=e,t[49]=$):$=t[49];let T;t[50]!==e?(T=e("Migrations"),t[50]=e,t[51]=T):T=t[51];let E;t[52]!==e?(E=e("Notifications"),t[52]=e,t[53]=E):E=t[53];let H;t[54]!==e?(H=e("Organizations"),t[54]=e,t[55]=H):H=t[55];let K;t[56]!==e?(K=e("Time Travel"),t[56]=e,t[57]=K):K=t[57];let R;t[58]!==e?(R=e("Mail"),t[58]=e,t[59]=R):R=t[59];let I;t[60]!==e?(I=e("Payments"),t[60]=e,t[61]=I):I=t[61];let V;t[62]!==e?(V=e("Permissions"),t[62]=e,t[63]=V):V=t[63];let Z;t[64]!==e?(Z=e("Queues"),t[64]=e,t[65]=Z):Z=t[65];let q;t[66]!==e?(q=e("Realtime"),t[66]=e,t[67]=q):q=t[67];let z;t[68]!==e?(z=e("RLS Policies"),t[68]=e,t[69]=z):z=t[69];let Y;t[70]!==e?(Y=e("Scheduled"),t[70]=e,t[71]=Y):Y=t[71];let B;t[72]!==e?(B=e("Schema"),t[72]=e,t[73]=B):B=t[73];let J;t[74]!==e?(J=e("Security"),t[74]=e,t[75]=J):J=t[75];let D;t[76]!==e?(D=e("Settings"),t[76]=e,t[77]=D):D=t[77];let W;t[78]!==e?(W=e("SQL editor"),t[78]=e,t[79]=W):W=t[79];let F;t[80]!==e?(F=e("Traces"),t[80]=e,t[81]=F):F=t[81];let j;t[82]!==e?(j=e("Access Rules"),t[82]=e,t[83]=j):j=t[83];let U;t[84]!==e?(U=e("Users"),t[84]=e,t[85]=U):U=t[85];let X;t[86]!==e?(X=e("Vectors"),t[86]=e,t[87]=X):X=t[87];let O;t[88]!==e?(O=e("Workflows"),t[88]=e,t[89]=O):O=t[89];let ee;t[90]!==a||t[91]!==r||t[92]!==g||t[93]!==h||t[94]!==f||t[95]!==v||t[96]!==b||t[97]!==m||t[98]!==y||t[99]!==k||t[100]!==S||t[101]!==_||t[102]!==n||t[103]!==L||t[104]!==N||t[105]!==P||t[106]!==M||t[107]!==$||t[108]!==T||t[109]!==E||t[110]!==H||t[111]!==K||t[112]!==R||t[113]!==o||t[114]!==I||t[115]!==V||t[116]!==Z||t[117]!==q||t[118]!==z||t[119]!==Y||t[120]!==B||t[121]!==J||t[122]!==D||t[123]!==W||t[124]!==i||t[125]!==F||t[126]!==j||t[127]!==U||t[128]!==X||t[129]!==O||t[130]!==l||t[131]!==d||t[132]!==u||t[133]!==c||t[134]!==p?(ee={advisorHealth:a,agents:r,analytics:n,api:o,audit:i,authAudit:l,authConfig:d,authSessions:u,containers:c,dashboards:p,data:g,deploymentHealth:h,drains:f,export:v,fanout:b,files:m,flags:y,functions:k,health:S,home:_,insights:L,issues:N,kv:P,logs:M,metrics:$,migrations:T,notifications:E,organizations:H,pitr:K,mail:R,payments:I,permissions:V,queues:Z,realtime:q,rls:z,schedule:Y,schema:B,security:J,settings:D,sql:W,traces:F,storageRules:j,users:U,vectors:X,workflows:O},t[90]=a,t[91]=r,t[92]=g,t[93]=h,t[94]=f,t[95]=v,t[96]=b,t[97]=m,t[98]=y,t[99]=k,t[100]=S,t[101]=_,t[102]=n,t[103]=L,t[104]=N,t[105]=P,t[106]=M,t[107]=$,t[108]=T,t[109]=E,t[110]=H,t[111]=K,t[112]=R,t[113]=o,t[114]=I,t[115]=V,t[116]=Z,t[117]=q,t[118]=z,t[119]=Y,t[120]=B,t[121]=J,t[122]=D,t[123]=W,t[124]=i,t[125]=F,t[126]=j,t[127]=U,t[128]=X,t[129]=O,t[130]=l,t[131]=d,t[132]=u,t[133]=c,t[134]=p,t[135]=ee):ee=t[135];const mt=ee;let re;t[136]!==e?(re=e("Advisors"),t[136]=e,t[137]=re):re=t[137];let se;t[138]!==e?(se=e("Auth"),t[138]=e,t[139]=se):se=t[139];let ne;t[140]!==e?(ne=e("Database"),t[140]=e,t[141]=ne):ne=t[141];let oe;t[142]!==e?(oe=e("Functions"),t[142]=e,t[143]=oe):oe=t[143];let ie;t[144]!==e?(ie=e("Observability"),t[144]=e,t[145]=ie):ie=t[145];let le;t[146]!==e?(le=e("Operations"),t[146]=e,t[147]=le):le=t[147];let de;t[148]!==e?(de=e("Overview"),t[148]=e,t[149]=de):de=t[149];let ce;t[150]!==e?(ce=e("Settings"),t[150]=e,t[151]=ce):ce=t[151];let ue;t[152]!==e?(ue=e("Storage"),t[152]=e,t[153]=ue):ue=t[153];let lt;t[154]!==re||t[155]!==se||t[156]!==ne||t[157]!==oe||t[158]!==ie||t[159]!==le||t[160]!==de||t[161]!==ce||t[162]!==ue?(lt={advisors:re,auth:se,database:ne,functions:oe,observability:ie,operations:le,overview:de,settings:ce,storage:ue},t[154]=re,t[155]=se,t[156]=ne,t[157]=oe,t[158]=ie,t[159]=le,t[160]=de,t[161]=ce,t[162]=ue,t[163]=lt):lt=t[163];const pt=lt;let he;t[164]!==e?(he=e("Score your app's advisor findings: a grade, the coverage split, and every procedure ranked worst-first."),t[164]=e,t[165]=he):he=t[165];let me;t[166]!==e?(me=e("Inspect agent threads, message timelines, tool calls, and token usage."),t[166]=e,t[167]=me):me=t[167];let pe;t[168]!==e?(pe=e("Usage and latency from Analytics Engine — request volume, p50/p95, and hot shards."),t[168]=e,t[169]=pe):pe=t[169];let fe;t[170]!==e?(fe=e("Interactive OpenAPI reference and copy-paste snippets for your functions."),t[170]=e,t[171]=fe):fe=t[171];let ge;t[172]!==e?(ge=e("A durable log of admin state-changing operations."),t[172]=e,t[173]=ge):ge=t[173];let be;t[174]!==e?(be=e("Authentication and security events — sign-ins, MFA, and session changes."),t[174]=e,t[175]=be):be=t[175];let ve;t[176]!==e?(ve=e("Enabled plugins and session config (read-only)."),t[176]=e,t[177]=ve):ve=t[177];let ye;t[178]!==e?(ye=e("Browse and revoke active sessions across all users."),t[178]=e,t[179]=ye):ye=t[179];let xe;t[180]!==e?(xe=e("Live Cloudflare Containers — current lifecycle state per instance from the log stream."),t[180]=e,t[181]=xe):xe=t[181];let ke;t[182]!==e?(ke=e("Chart widgets backed by saved read-only SQL queries."),t[182]=e,t[183]=ke):ke=t[183];let we;t[184]!==e?(we=e("Browse and edit rows across your shard and global tables."),t[184]=e,t[185]=we):we=t[185];let Ne;t[186]!==e?(Ne=e("Live liveness, readiness, and per-binding health from the deployment's /_lunora/health endpoint."),t[186]=e,t[187]=Ne):Ne=t[187];let Se;t[188]!==e?(Se=e("Forward logs to Logpush, Tail Workers, or a webhook collector."),t[188]=e,t[189]=Se):Se=t[189];let Me;t[190]!==e?(Me=e("Export a shard to NDJSON, or import rows from it."),t[190]=e,t[191]=Me):Me=t[191];let Ce;t[192]!==e?(Ce=e("Realtime fan-out cost and per-topic subscriber counts for this shard."),t[192]=e,t[193]=Ce):Ce=t[193];let _e;t[194]!==e?(_e=e("Browse objects in your R2 storage buckets."),t[194]=e,t[195]=_e):_e=t[195];let Le;t[196]!==e?(Le=e("Inspect feature flags and their live evaluation under a targeting context."),t[196]=e,t[197]=Le):Le=t[197];let Pe;t[198]!==e?(Pe=e("Run registered queries, mutations, and actions."),t[198]=e,t[199]=Pe):Pe=t[199];let $e;t[200]!==e?($e=e("At-a-glance connection, error, and shard signals."),t[200]=e,t[201]=$e):$e=t[201];let Ae;t[202]!==e?(Ae=e("Connection, health, and advisor summary for your deployment."),t[202]=e,t[203]=Ae):Ae=t[203];let Te;t[204]!==e?(Te=e("Surface slow functions, error spikes, and cache problems."),t[204]=e,t[205]=Te):Te=t[205];let ze;t[206]!==e?(ze=e("Grouped error triage — Worker throws and container crashes folded by fingerprint."),t[206]=e,t[207]=ze):ze=t[207];let Ee;t[208]!==e?(Ee=e("A live stream of recent function logs."),t[208]=e,t[209]=Ee):Ee=t[209];let Re;t[210]!==e?(Re=e("Per-shard health and aggregate metrics."),t[210]=e,t[211]=Re):Re=t[211];let Ie;t[212]!==e?(Ie=e("Review migration status and run them."),t[212]=e,t[213]=Ie):Ie=t[213];let He;t[214]!==e?(He=e("Registered push devices — endpoint, kind, last-send status, and delivery errors."),t[214]=e,t[215]=He):He=t[215];let Ke;t[216]!==e?(Ke=e("Browse and manage organizations, members, and invitations."),t[216]=e,t[217]=Ke):Ke=t[217];let Ve;t[218]!==e?(Ve=e("Restore a shard to a point in the last 30 days."),t[218]=e,t[219]=Ve):Ve=t[219];let Ze;t[220]!==e?(Ze=e("Email your app sent, captured in dev."),t[220]=e,t[221]=Ze):Ze=t[221];let Oe;t[222]!==e?(Oe=e("Synced customers, subscriptions, and webhook events."),t[222]=e,t[223]=Oe):Oe=t[223];let qe;t[224]!==e?(qe=e("Inspect access policies per table, and probe a function as any identity."),t[224]=e,t[225]=qe):qe=t[225];let Be;t[226]!==e?(Be=e("Inspect declared Cloudflare Queues — their producer bindings, consumer mode, and dead-letter queue."),t[226]=e,t[227]=Be):Be=t[227];let De;t[228]!==e?(De=e("Active WebSocket subscriptions on this shard."),t[228]=e,t[229]=De):De=t[229];let We;t[230]!==e?(We=e("Inspect row-level-security policies and roles, per table."),t[230]=e,t[231]=We):We=t[231];let Fe;t[232]!==e?(Fe=e("Inspect and cancel scheduled jobs."),t[232]=e,t[233]=Fe):Fe=t[233];let je;t[234]!==e?(je=e("Inspect each table and its columns."),t[234]=e,t[235]=je):je=t[235];let Ue;t[236]!==e?(Ue=e("Review admin gates, credentials, and log redaction."),t[236]=e,t[237]=Ue):Ue=t[237];let Qe;t[238]!==e?(Qe=e("Read-only deployment config — vars, secrets, and bindings."),t[238]=e,t[239]=Qe):Qe=t[239];let Je;t[240]!==e?(Je=e("Run read-only SQL against a shard."),t[240]=e,t[241]=Je):Je=t[241];let Xe;t[242]!==e?(Xe=e("Browse and edit key-value pairs in your Workers KV namespaces."),t[242]=e,t[243]=Xe):Xe=t[243];let Ye;t[244]!==e?(Ye=e("Inspect storage access rules — per bucket, operation, and key prefix."),t[244]=e,t[245]=Ye):Ye=t[245];let Ge;t[246]!==e?(Ge=e("Recent ctx.trace waterfalls for this shard — the drill-down from a log line."),t[246]=e,t[247]=Ge):Ge=t[247];let et;t[248]!==e?(et=e("Manage auth users — roles, bans, sessions, and identity."),t[248]=e,t[249]=et):et=t[249];let tt;t[250]!==e?(tt=e("Browse Vectorize indexes and run similarity searches."),t[250]=e,t[251]=tt):tt=t[251];let at;t[252]!==e?(at=e("Inspect declared Cloudflare Workflows and their bindings."),t[252]=e,t[253]=at):at=t[253];let dt;t[254]!==at||t[255]!==he||t[256]!==me||t[257]!==pe||t[258]!==fe||t[259]!==ge||t[260]!==be||t[261]!==ve||t[262]!==ye||t[263]!==xe||t[264]!==ke||t[265]!==we||t[266]!==Ne||t[267]!==Se||t[268]!==Me||t[269]!==Ce||t[270]!==_e||t[271]!==Le||t[272]!==Pe||t[273]!==$e||t[274]!==Ae||t[275]!==Te||t[276]!==ze||t[277]!==Ee||t[278]!==Re||t[279]!==Ie||t[280]!==He||t[281]!==Ke||t[282]!==Ve||t[283]!==Ze||t[284]!==Oe||t[285]!==qe||t[286]!==Be||t[287]!==De||t[288]!==We||t[289]!==Fe||t[290]!==je||t[291]!==Ue||t[292]!==Qe||t[293]!==Je||t[294]!==Xe||t[295]!==Ye||t[296]!==Ge||t[297]!==et||t[298]!==tt?(dt={advisorHealth:he,agents:me,analytics:pe,api:fe,audit:ge,authAudit:be,authConfig:ve,authSessions:ye,containers:xe,dashboards:ke,data:we,deploymentHealth:Ne,drains:Se,export:Me,fanout:Ce,files:_e,flags:Le,functions:Pe,health:$e,home:Ae,insights:Te,issues:ze,logs:Ee,metrics:Re,migrations:Ie,notifications:He,organizations:Ke,pitr:Ve,mail:Ze,payments:Oe,permissions:qe,queues:Be,realtime:De,rls:We,schedule:Fe,schema:je,security:Ue,settings:Qe,sql:Je,kv:Xe,storageRules:Ye,traces:Ge,users:et,vectors:tt,workflows:at},t[254]=at,t[255]=he,t[256]=me,t[257]=pe,t[258]=fe,t[259]=ge,t[260]=be,t[261]=ve,t[262]=ye,t[263]=xe,t[264]=ke,t[265]=we,t[266]=Ne,t[267]=Se,t[268]=Me,t[269]=Ce,t[270]=_e,t[271]=Le,t[272]=Pe,t[273]=$e,t[274]=Ae,t[275]=Te,t[276]=ze,t[277]=Ee,t[278]=Re,t[279]=Ie,t[280]=He,t[281]=Ke,t[282]=Ve,t[283]=Ze,t[284]=Oe,t[285]=qe,t[286]=Be,t[287]=De,t[288]=We,t[289]=Fe,t[290]=je,t[291]=Ue,t[292]=Qe,t[293]=Je,t[294]=Xe,t[295]=Ye,t[296]=Ge,t[297]=et,t[298]=tt,t[299]=dt):dt=t[299];const ft=dt;let ct;return t[300]!==pt||t[301]!==ft||t[302]!==mt?(ct={groupLabel:pt,tabDescription:ft,tabLabel:mt},t[300]=pt,t[301]=ft,t[302]=mt,t[303]=ct):ct=t[303],ct},br=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x("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:[s("rect",{height:"14",rx:"2",width:"20",x:"2",y:"3"}),s("path",{d:"M8 21h8M12 17v4"})]}),t[0]=e):e=t[0],e},vr=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x("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:[s("circle",{cx:"12",cy:"12",r:"4"}),s("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},yr=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s("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:s("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},xr=[{Icon:br,value:"system"},{Icon:vr,value:"light"},{Icon:yr,value:"dark"}],kr=()=>{const t=w(19),{theme:e,setTheme:a}=Pa(),r=G();let n;t[0]!==r?(n=r("Dark theme"),t[0]=r,t[1]=n):n=t[1];let o;t[2]!==r?(o=r("Light theme"),t[2]=r,t[3]=o):o=t[3];let i;t[4]!==r?(i=r("System theme"),t[4]=r,t[5]=i):i=t[5];let l;t[6]!==n||t[7]!==o||t[8]!==i?(l={dark:n,light:o,system:i},t[6]=n,t[7]=o,t[8]=i,t[9]=l):l=t[9];const d=l;let u;t[10]!==r?(u=r("Theme"),t[10]=r,t[11]=u):u=t[11];let c;t[12]!==d||t[13]!==a||t[14]!==e?(c=xr.map(g=>{const{Icon:h,value:f}=g,v=e===f;return x("button",{"aria-checked":v,"aria-label":d[f],className:A("relative flex size-7 cursor-pointer items-center justify-center rounded-md outline-none transition-colors focus-visible:bg-accent",v?"text-foreground":"text-muted-foreground hover:text-foreground"),"data-testid":`dash-app-theme-${f}`,onClick:()=>{a(f)},role:"radio",title:d[f],type:"button",children:[v&&s(ka.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"}}),s("span",{className:"relative",children:s(h,{})})]},f)}),t[12]=d,t[13]=a,t[14]=e,t[15]=c):c=t[15];let p;return t[16]!==u||t[17]!==c?(p=s("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]=p):p=t[18],p},wr=t=>{const e=w(23),{domain:a,onOpenCommandPalette:r,page:n}=t,o=G();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s(er,{className:"-ms-1"}),e[0]=i):i=e[0];let l;e[1]!==o?(l=o("Breadcrumb"),e[1]=o,e[2]=l):l=e[2];let d;e[3]!==a?(d=s("span",{className:"text-muted-foreground",children:a}),e[3]=a,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=s("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:s("path",{d:"m9 6 6 6-6 6",strokeLinecap:"round",strokeLinejoin:"round"})}),e[5]=u):u=e[5];let c;e[6]!==n?(c=s("span",{className:"font-medium text-foreground",children:n}),e[6]=n,e[7]=c):c=e[7];let p;e[8]!==l||e[9]!==d||e[10]!==c?(p=x("nav",{"aria-label":l,className:"flex items-center gap-1.5 text-[13px]",children:[d,u,c]}),e[8]=l,e[9]=d,e[10]=c,e[11]=p):p=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=x("svg",{"aria-hidden":"true",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:1.8,viewBox:"0 0 24 24",children:[s("circle",{cx:"11",cy:"11",r:"7"}),s("path",{d:"m21 21-4.3-4.3",strokeLinecap:"round"})]}),e[12]=g):g=e[12];let h;e[13]!==o?(h=o("Search…"),e[13]=o,e[14]=h):h=e[14];let f;e[15]===Symbol.for("react.memo_cache_sentinel")?(f=s("kbd",{className:"ms-auto rounded border border-border bg-background px-1 font-sans text-[10px] text-muted-foreground",children:"⌘K"}),e[15]=f):f=e[15];let v;e[16]!==r||e[17]!==h?(v=x("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:r,type:"button",children:[g,h,f]}),e[16]=r,e[17]=h,e[18]=v):v=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s("div",{className:"ms-auto flex items-center gap-1.5 md:ms-0",children:s(kr,{})}),e[19]=b):b=e[19];let m;return e[20]!==v||e[21]!==p?(m=x("header",{className:"flex h-11 shrink-0 items-center gap-2 border-b border-border px-4","data-testid":"dash-app-header",children:[i,p,v,b]}),e[20]=v,e[21]=p,e[22]=m):m=e[22],m},Nr=t=>{const e=w(3);let a,r;e[0]!==t?(a=()=>{if(t===void 0)return;const n=o=>{if(!o.ctrlKey||o.metaKey||o.altKey||o.shiftKey||o.repeat||o.key!=="`")return;const{target:i}=o;i instanceof HTMLElement&&(i.isContentEditable||["INPUT","SELECT","TEXTAREA"].includes(i.tagName))||(o.preventDefault(),t())};return globalThis.addEventListener("keydown",n),()=>{globalThis.removeEventListener("keydown",n)}},r=[t],e[0]=t,e[1]=a,e[2]=r):(a=e[1],r=e[2]),st(a,r)},C=(t,e)=>Q(()=>t().then(a=>({default:a[e]}))),Sr=C(()=>import("../packem_chunks/InsightsPanel.js"),"InsightsPanel"),Mr=Q(()=>import("../packem_chunks/rls-panel.js")),Cr=Q(()=>import("../packem_chunks/AdvisorHealthPanel.js")),_r=Q(()=>import("../packem_chunks/SecurityAdvisorPanel.js")),Lr=C(()=>import("../packem_chunks/agents-panel.js"),"AgentsPanel"),Pr=C(()=>import("../packem_chunks/analytics-panel.js"),"AnalyticsPanel"),$r=Q(()=>import("../packem_chunks/ApiTab.js")),Ar=C(()=>import("../packem_chunks/auth-audit-panel.js"),"AuthAuditPanel"),Tr=C(()=>import("../packem_chunks/auth-config-panel.js"),"AuthConfigPanel"),zr=C(()=>import("../packem_chunks/auth-sessions-panel.js"),"AuthSessionsPanel"),Er=C(()=>import("../packem_chunks/organizations-panel.js"),"OrganizationsPanel"),Rr=C(()=>import("../packem_chunks/users-panel.js"),"UsersPanel"),Ir=C(()=>import("../packem_chunks/containers-panel.js"),"ContainersPanel"),Hr=C(()=>import("../packem_chunks/DeploymentHealthPanel.js"),"DeploymentHealthPanel"),Kr=C(()=>import("../packem_chunks/TableEditor.js"),"TableEditor"),Vr=C(()=>import("../packem_chunks/ExportImportPanel.js"),"ExportImportPanel"),Zr=C(()=>import("../packem_chunks/migrations-route.js"),"MigrationsRoutePanel"),Or={data:va,migrations:ba},qr=C(()=>import("../packem_chunks/PitrPanel.js"),"PitrPanel"),Br=C(()=>import("../packem_chunks/flags-panel.js"),"FlagsPanel"),Dr=C(()=>import("../packem_chunks/FunctionRunner.js"),"FunctionRunner"),Wr=C(()=>import("../packem_chunks/FunctionStatsPanel.js"),"FunctionStatsPanel"),Fr=C(()=>import("../packem_chunks/issues-panel.js"),"IssuesPanel"),jr=C(()=>import("../packem_chunks/AuditPanel.js"),"AuditPanel"),Ur=C(()=>import("../packem_chunks/log-drains-panel.js"),"LogDrainsPanel"),Qr=Q(()=>import("../packem_chunks/LogsPanel.js").then(t=>({default:t.LogsPanel}))),Jr=C(()=>import("../packem_chunks/MailPanel.js"),"MailPanel"),Xr=C(()=>import("../packem_chunks/schedule-panel.js"),"SchedulePanel"),Yr=Q(()=>import("../packem_chunks/subscriptions-panel.js")),Gr=Q(()=>import("../packem_chunks/sync-client-panel.js")),es=C(()=>import("../packem_chunks/kv-browser.js"),"KvBrowser"),ts=C(()=>import("../packem_chunks/NotificationsPanel.js"),"NotificationsPanel"),as=C(()=>import("../packem_chunks/payments-panel.js"),"PaymentsPanel"),rs=C(()=>import("../packem_chunks/permissions-panel.js"),"PermissionsPanel"),ss=Q(()=>import("../packem_chunks/queues-panel.js")),ns=Q(()=>import("../packem_chunks/dashboards-panel.js")),os=Q(()=>import("../packem_chunks/fanout-panel.js")),is=C(()=>import("../packem_chunks/HealthPanel.js"),"HealthPanel"),ls=C(()=>import("../packem_chunks/MetricsPanel.js"),"MetricsPanel"),ds=C(()=>import("../packem_chunks/SchemaViewer.js"),"SchemaViewer"),cs=C(()=>import("../packem_chunks/SettingsPanel.js"),"SettingsPanel"),us=C(()=>import("../packem_chunks/SqlEditorPanel.js"),"SqlEditorPanel"),hs=C(()=>import("../packem_chunks/FileBrowser.js"),"FileBrowser"),ms=C(()=>import("../packem_chunks/storage-rules-panel.js"),"StorageRulesPanel"),ps=C(()=>import("../packem_chunks/traces-panel.js"),"TracesPanel"),fs=C(()=>import("../packem_chunks/vector-browser.js"),"VectorBrowser"),gs=Q(()=>import("../packem_chunks/workflows-panel.js")),Ut=$t(null),bs={analytics:s("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),api:s("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4M13 5l-2 14"}),audit:s("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:s("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:s("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:s("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:s("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),containers:s("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:s("path",{d:"M4 5h7v6H4V5Zm9 0h7v4h-7V5ZM4 14h7v5H4v-5Zm9-1h7v6h-7v-6Z"}),deploymentHealth:s("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:s("path",{d:"M5 5h14M7 5v6a5 5 0 0 0 10 0V5M10 16h4v3h-4zM12 19v2"}),data:s("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:s("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:s("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:s("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:s("path",{d:"M6 21V4m0 0h11l-2 3 2 3H6"}),functions:s("path",{d:"m9 8-4 4 4 4m6-8 4 4-4 4"}),health:s("path",{d:"M3 12h4l2 6 4-14 2 8h6"}),home:s("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:s("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:s("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:s("path",{d:"M5 5h14v4H5V5Zm0 5h14v4H5v-4Zm0 5h14v4H5v-4Z"}),logs:s("path",{d:"M5 6h14M5 10h14M5 14h9M5 18h11"}),mail:s("path",{d:"M4 5h16v14H4V5Zm0 1.5 8 6 8-6"}),payments:s("path",{d:"M3 7h18v10H3V7Zm0 3h18M7 14h4"}),metrics:s("path",{d:"M5 20V10m6.5 10V4M18 20v-7M3 20h18"}),migrations:s("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:s("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:s("path",{d:"M3 21V8l6-4 6 4v13M9 21v-5h2v5M15 11h6v10M18 14v.01M18 17v.01M6 9v.01M6 12v.01M6 15v.01"}),permissions:s("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:s("path",{d:"M12 21a9 9 0 1 0-9-9M12 7.5V12l3 2M3 12l-2-2m2 2 2-2"}),queues:s("path",{d:"M4 6h16M4 10h16M4 14h10M4 18h10m4-2 3 2-3 2v-4Z"}),realtime:s("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:s("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:s("path",{d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18Zm0-13.5V12l4 2"}),schema:s("path",{d:"M4 5h16v14H4V5Zm0 5h16M10 10v9M4 14.5h16"}),sql:s("path",{d:"M4 5h16v14H4V5Zm3 4 3 3-3 3m6 0h4"}),storageRules:s("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:s("path",{d:"M3 12h4l2-5 3 10 2-5h5"}),security:s("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:s("path",{d:"M3 6h9M6 12h12M10 18h7"}),settings:s("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:s("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:s("path",{d:"M4 7l8-4 8 4-8 4-8-4Zm0 5 8 4 8-4M4 17l8 4 8-4"}),workflows:s("path",{d:"M5 5h5v5H5V5Zm9 9h5v5h-5v-5ZM7.5 10v2a2 2 0 0 0 2 2H14m2.5-4V8a2 2 0 0 0-2-2H10"})},_t=[{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","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"]}],vs={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 a=vs[t];return a===void 0||e[a]},xt=t=>{const e=w(2),{tab:a}=t,r=bs[a];let n;return e[0]!==r?(n=s("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:r}),e[0]=r,e[1]=n):n=e[1],n},ys=t=>t,Qt=ys(["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","realtime","fanout","mail","notifications","payments","audit","schedule","drains","flags","settings"]),xs=new Set(["api","data","migrations","sql"]),ks=t=>{const e=t.split("/").findLast(Boolean)??"";return Qt.includes(e)?e:"home"},ws=t=>{const e=w(19),{chrome:a,connected:r}=t,n=G();let o;e[0]!==n?(o=n("admin token"),e[0]=n,e[1]=o):o=e[1];let i;e[2]!==o?(i=s("label",{className:"text-xs font-medium text-foreground",htmlFor:"dash-app-token",children:o}),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==a.onTokenChange||e[5]!==a.token?(l=s(zt,{className:"h-8","data-testid":"dash-app-token",id:"dash-app-token",onChange:a.onTokenChange,placeholder:"LUNORA_ADMIN_TOKEN",type:"password",value:a.token}),e[4]=a.onTokenChange,e[5]=a.token,e[6]=l):l=e[6];let d;e[7]!==r||e[8]!==n?(d=r&&x("p",{className:"flex items-start gap-1.5 text-[11px] text-muted-foreground","data-testid":"dash-app-token-warning",role:"note",children:[s("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]=r,e[8]=n,e[9]=d):d=e[9];let u;e[10]!==a.clearToken||e[11]!==r||e[12]!==n?(u=r&&s("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:a.clearToken,type:"button",children:n("Clear")}),e[10]=a.clearToken,e[11]=r,e[12]=n,e[13]=u):u=e[13];let c;return e[14]!==i||e[15]!==l||e[16]!==d||e[17]!==u?(c=x("div",{className:"flex flex-col gap-2",children:[i,l,d,u]}),e[14]=i,e[15]=l,e[16]=d,e[17]=u,e[18]=c):c=e[18],c},Ns=t=>{const e=w(25),{current:a,group:r,groupLabel:n,selectTab:o,tabDescription:i,tabLabel:l}=t,d=r.tabs.includes(a)?"page":void 0,u=n[r.key],c=r.tabs[0];let p;e[0]!==c?(p=s(xt,{tab:c}),e[0]=c,e[1]=p):p=e[1];let g;e[2]!==d||e[3]!==u||e[4]!==p?(g=s(Dt,{"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:p}),e[2]=d,e[3]=u,e[4]=p,e[5]=g):g=e[5];const h=n[r.key];let f;e[6]!==h?(f=s("div",{className:"px-2 py-1.5 text-[11px] font-medium tracking-wider text-muted-foreground uppercase",children:h}),e[6]=h,e[7]=f):f=e[7];let v;if(e[8]!==a||e[9]!==r.tabs||e[10]!==o||e[11]!==i||e[12]!==l){let y;e[14]!==a||e[15]!==o||e[16]!==i||e[17]!==l?(y=k=>x("button",{"aria-current":a===k?"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":k,"data-testid":`dash-tab-${k}`,onClick:o,title:i[k],type:"button",children:[s(xt,{tab:k}),s("span",{children:l[k]})]},k),e[14]=a,e[15]=o,e[16]=i,e[17]=l,e[18]=y):y=e[18],v=r.tabs.map(y),e[8]=a,e[9]=r.tabs,e[10]=o,e[11]=i,e[12]=l,e[13]=v}else v=e[13];let b;e[19]!==f||e[20]!==v?(b=x(Wt,{align:"start",className:"w-56 p-1",side:"right",sideOffset:8,children:[f,v]}),e[19]=f,e[20]=v,e[21]=b):b=e[21];let m;return e[22]!==g||e[23]!==b?(m=x(Bt,{children:[g,b]}),e[22]=g,e[23]=b,e[24]=m):m=e[24],m},Ss=t=>{const e=w(45),{chrome:a,collapsed:r,connected:n}=t,o=G();if(a===null){let k;e[0]!==o?(k=o("Admin"),e[0]=o,e[1]=k):k=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=s("span",{className:"flex size-8 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:"C"}),e[2]=S):S=e[2];let _;e[3]!==o?(_=o("Admin"),e[3]=o,e[4]=_):_=e[4];let L;e[5]!==_?(L=s("span",{className:"truncate text-[13px] font-medium",children:_}),e[5]=_,e[6]=L):L=e[6];let N;e[7]!==o?(N=o("Studio"),e[7]=o,e[8]=N):N=e[8];let P;e[9]!==N?(P=s("span",{className:"truncate text-[11px] text-muted-foreground",children:N}),e[9]=N,e[10]=P):P=e[10];let M;e[11]!==L||e[12]!==P?(M=x("span",{className:"grid flex-1 text-start leading-tight",children:[L,P]}),e[11]=L,e[12]=P,e[13]=M):M=e[13];let $;return e[14]!==k||e[15]!==M?($=x(jt,{className:"data-active:bg-transparent",size:"lg",tooltip:k,children:[S,M]}),e[14]=k,e[15]=M,e[16]=$):$=e[16],$}const i=r?"mx-auto size-8 justify-center":"w-full p-2";let l;e[17]!==i?(l=A("flex items-center gap-2 rounded-md text-start outline-none transition-colors hover:bg-sidebar-accent focus-visible:bg-sidebar-accent",i),e[17]=i,e[18]=l):l=e[18];let d;e[19]!==n||e[20]!==o?(d=o(n?"Connected":"Not connected"),e[19]=n,e[20]=o,e[21]=d):d=e[21];const u=n?"bg-success":"bg-muted-foreground/50";let c;e[22]!==u?(c=A("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 p;e[24]!==c?(p=x("span",{className:"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-sidebar-accent text-[11px] font-medium",children:["C",s("span",{"aria-hidden":"true",className:c})]}),e[24]=c,e[25]=p):p=e[25];let g;e[26]!==r||e[27]!==n||e[28]!==o?(g=!r&&x(At,{children:[x("span",{className:"grid flex-1 text-start leading-tight",children:[s("span",{className:"truncate text-[13px] font-medium",children:o("Admin")}),s("span",{className:"truncate text-[11px] text-muted-foreground",children:o(n?"Connected":"Not connected")})]}),s("svg",{"aria-hidden":"true",className:"size-4 text-muted-foreground",fill:"none",stroke:"currentColor",strokeWidth:1.7,viewBox:"0 0 24 24",children:s("path",{d:"m8 9 4-4 4 4M8 15l4 4 4-4",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e[26]=r,e[27]=n,e[28]=o,e[29]=g):g=e[29];let h;e[30]!==l||e[31]!==d||e[32]!==p||e[33]!==g?(h=x(Dt,{className:l,"data-testid":"dash-app-connect",title:d,children:[p,g]}),e[30]=l,e[31]=d,e[32]=p,e[33]=g,e[34]=h):h=e[34];const f=r?"end":"start",v=r?"right":"top";let b;e[35]!==a||e[36]!==n?(b=s(ws,{chrome:a,connected:n}),e[35]=a,e[36]=n,e[37]=b):b=e[37];let m;e[38]!==v||e[39]!==b||e[40]!==f?(m=s(Wt,{align:f,keepMounted:!0,side:v,children:b}),e[38]=v,e[39]=b,e[40]=f,e[41]=m):m=e[41];let y;return e[42]!==m||e[43]!==h?(y=x(Bt,{children:[h,m]}),e[42]=m,e[43]=h,e[44]=y):y=e[44],y},Ms=t=>{const e=w(28),{chrome:a,connected:r,current:n,groupLabel:o,groups:i,selectTab:l,tabDescription:d,tabLabel:u}=t,c=G(),{state:p}=ht(),g=p==="collapsed",h=g&&"justify-center px-0";let f;e[0]!==h?(f=A("flex items-center gap-2.5 px-1.5 py-1",h),e[0]=h,e[1]=f):f=e[1];let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=s(za,{className:"size-9 shrink-0 text-foreground"}),e[2]=v):v=e[2];let b;e[3]!==g||e[4]!==r||e[5]!==c?(b=!g&&x(At,{children:[x("span",{className:"grid flex-1 leading-tight",children:[s("span",{className:"truncate text-sm font-semibold text-foreground",children:"lunora"}),s("span",{className:"truncate text-[11px] text-muted-foreground",children:c("Studio")})]}),s(it,{className:"px-1.5 text-[10px] tracking-wider uppercase",variant:"secondary",children:c(r?"Live":"Local")})]}),e[3]=g,e[4]=r,e[5]=c,e[6]=b):b=e[6];let m;e[7]!==f||e[8]!==b?(m=s(ar,{children:x("div",{className:f,children:[v,b]})}),e[7]=f,e[8]=b,e[9]=m):m=e[9];let y;e[10]!==g||e[11]!==n||e[12]!==o||e[13]!==i||e[14]!==l||e[15]!==d||e[16]!==u?(y=g?i.map(L=>s(Ns,{current:n,group:L,groupLabel:o,selectTab:l,tabDescription:d,tabLabel:u},L.key)):i.map(L=>x(nr,{children:[s(or,{className:"text-[11px] font-medium tracking-wider uppercase",children:o[L.key]}),s(ir,{children:s(Mt,{children:L.tabs.map(N=>s(Ct,{children:x(jt,{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:l,title:d[N],tooltip:d[N],children:[s(xt,{tab:N}),s("span",{children:u[N]})]})},N))})})]},L.key)),e[10]=g,e[11]=n,e[12]=o,e[13]=i,e[14]=l,e[15]=d,e[16]=u,e[17]=y):y=e[17];let k;e[18]!==y?(k=s(sr,{children:y}),e[18]=y,e[19]=k):k=e[19];let S;e[20]!==a||e[21]!==g||e[22]!==r?(S=s(rr,{children:s(Mt,{children:s(Ct,{children:s(Ss,{chrome:a,collapsed:g,connected:r})})})}),e[20]=a,e[21]=g,e[22]=r,e[23]=S):S=e[23];let _;return e[24]!==m||e[25]!==k||e[26]!==S?(_=x(Ga,{collapsible:"icon",variant:"inset",children:[m,k,S]}),e[24]=m,e[25]=k,e[26]=S,e[27]=_):_=e[27],_},Jt=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x("div",{className:"flex flex-col gap-4","data-testid":"dash-pending",children:[x("div",{className:"flex items-center gap-2",children:[s(gt,{className:"h-8 w-40"}),s(gt,{className:"h-8 w-24"})]}),s(gt,{className:"h-72 w-full"})]}),t[0]=e):e=t[0],e},Cs=()=>{const t=w(64),e=G(),a=Pt();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={select:Ts},t[0]=r):r=t[0];const n=ra(r);let o,i;t[1]!==n?(o=ks(n),i=xs.has(o),t[1]=n,t[2]=o,t[3]=i):(o=t[2],i=t[3]);const l=i,d=da(),u=d?.toggle;Nr(u);const c=pa(),{groupLabel:p,tabDescription:g,tabLabel:h}=gr();let f;t[4]!==c?(f=O=>({...O,tabs:O.tabs.filter(ee=>Lt(ee,c))}),t[4]=c,t[5]=f):f=t[5];const v=_t.map(f).filter(zs);let b,m;t[6]!==o||t[7]!==c||t[8]!==a?(b=()=>{Lt(o,c)||yt(a({replace:!0,to:"/home"}))},m=[o,c,a],t[6]=o,t[7]=c,t[8]=a,t[9]=b,t[10]=m):(b=t[9],m=t[10]),st(b,m);let y;t[11]!==a?(y=O=>{yt(a({to:`/${O.currentTarget.dataset.tab??""}`}))},t[11]=a,t[12]=y):y=t[12];const k=y;let S,_;t[13]!==o||t[14]!==h?(S=()=>{typeof document<"u"&&(document.title=`${h[o]} · lunora`)},_=[o,h],t[13]=o,t[14]=h,t[15]=S,t[16]=_):(S=t[15],_=t[16]),st(S,_);const L=v.find(O=>O.tabs.includes(o))??_t[0];let N;t[17]!==p||t[18]!==h?(N=O=>O.tabs.map(ee=>({group:p[O.key],label:h[ee],to:`/${ee}`})),t[17]=p,t[18]=h,t[19]=N):N=t[19];const P=v.flatMap(N),M=kt(Ut),$=M!==null&&M.token!=="";let T;t[20]!==P?(T=s(ya,{items:P}),t[20]=P,t[21]=T):T=t[21];let E;t[22]!==M||t[23]!==$||t[24]!==o||t[25]!==p||t[26]!==k||t[27]!==g||t[28]!==h||t[29]!==v?(E=s(Ms,{chrome:M,connected:$,current:o,groupLabel:p,groups:v,selectTab:k,tabDescription:g,tabLabel:h}),t[22]=M,t[23]=$,t[24]=o,t[25]=p,t[26]=k,t[27]=g,t[28]=h,t[29]=v,t[30]=E):E=t[30];const H=p[L.key],K=h[o];let R;t[31]!==H||t[32]!==K?(R=s(wr,{domain:H,onOpenCommandPalette:xa,page:K}),t[31]=H,t[32]=K,t[33]=R):R=t[33];let I;t[34]!==M?.rulesInstalled?(I=M?.rulesInstalled===!1&&s(Ia,{}),t[34]=M?.rulesInstalled,t[35]=I):I=t[35];const V=`dash-tab-${o}`,Z=l?"flex min-w-0 flex-1 flex-col overflow-hidden":"min-w-0 flex-1 overflow-auto p-6",q=h[o];let z;t[36]!==e||t[37]!==q?(z=e("{title} failed",{title:q}),t[36]=e,t[37]=q,t[38]=z):z=t[38];const Y=h[o];let B;t[39]!==e?(B=e("Try again"),t[39]=e,t[40]=B):B=t[40];let J;t[41]===Symbol.for("react.memo_cache_sentinel")?(J=s(oa,{fallback:s(Jt,{}),children:s(sa,{})}),t[41]=J):J=t[41];let D;t[42]!==o||t[43]!==z||t[44]!==Y||t[45]!==B?(D=s(ia,{fallbackTitle:z,label:Y,retryLabel:B,children:J},o),t[42]=o,t[43]=z,t[44]=Y,t[45]=B,t[46]=D):D=t[46];let W;t[47]!==Z||t[48]!==D?(W=s("div",{className:Z,children:D}),t[47]=Z,t[48]=D,t[49]=W):W=t[49];let F;t[50]!==d?(F=d?.open===!0&&s(mr,{focusSeq:d.focusSeq,onClose:d.close,onShownChange:d.setShown,shown:d.shown}),t[50]=d,t[51]=F):F=t[51];let j;t[52]!==V||t[53]!==W||t[54]!==F?(j=x("div",{"aria-labelledby":V,className:"flex min-w-0 flex-1 flex-col overflow-hidden","data-testid":"dash-panel",id:"dash-panel",role:"tabpanel",children:[W,F]}),t[52]=V,t[53]=W,t[54]=F,t[55]=j):j=t[55];let U;t[56]!==R||t[57]!==I||t[58]!==j?(U=x(tr,{className:"overflow-hidden md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm",children:[R,I,j]}),t[56]=R,t[57]=I,t[58]=j,t[59]=U):U=t[59];let X;return t[60]!==E||t[61]!==U||t[62]!==T?(X=x(Ya,{className:"min-h-0 flex-1","data-testid":"lunora-studio",children:[T,E,U]}),t[60]=E,t[61]=U,t[62]=T,t[63]=X):X=t[63],X},_s=()=>{const t=w(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s(la,{children:s(Cs,{})}),t[0]=e):e=t[0],e},Ls=t=>{const e=w(5),{initialShardKey:a,schemaEditable:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const o=aa(n),{table:i}=o,l=typeof i=="string"?i:void 0;let d;return e[1]!==a||e[2]!==l||e[3]!==r?(d=s(ds,{initialShardKey:a,initialTable:l,schemaEditable:r}),e[1]=a,e[2]=l,e[3]=r,e[4]=d):d=e[4],d},Ps=()=>{const t=w(3),e=Pt();let a,r;return t[0]!==e?(a=()=>{yt(e({replace:!0,to:"/home"}))},r=[e],t[0]=e,t[1]=a,t[2]=r):(a=t[1],r=t[2]),st(a,r),null},$s=({basePath:t,dataEditable:e=!1,functions:a,initialShardKey:r,openApiSpec:n,openRpcSpec:o,runAsIdentity:i=!1,schemaEditable:l=!1,scheduledCancel:d,scheduledCron:u,scheduledLoad:c})=>{const p=Yt({component:_s}),g={agents:s(Lr,{initialShardKey:r}),analytics:s(Pr,{}),api:s($r,{functions:a,initialShardKey:r,openApiSpec:n,openRpcSpec:o}),audit:s(jr,{initialShardKey:r}),authAudit:s(Ar,{}),authConfig:s(Tr,{}),authSessions:s(zr,{}),containers:s(Ir,{}),dashboards:s(ns,{initialShardKey:r}),data:s(Kr,{editable:e,initialShardKey:r}),deploymentHealth:s(Hr,{}),drains:s(Ur,{}),export:s(Vr,{initialShardKey:r}),fanout:s(os,{initialShardKey:r}),files:s(hs,{}),kv:s(es,{}),flags:s(Br,{initialShardKey:r}),functions:x("div",{className:"flex flex-col gap-8",children:[s(Wr,{functions:a,initialShardKey:r}),s(Dr,{functions:a,runAsIdentity:i})]}),health:s(is,{initialShardKey:r}),home:s(ma,{initialShardKey:r}),insights:s(Sr,{initialShardKey:r}),issues:s(Fr,{initialShardKey:r}),logs:s(Qr,{initialShardKey:r}),traces:s(ps,{initialShardKey:r}),metrics:s(ls,{initialShardKey:r}),migrations:s(Zr,{initialShardKey:r}),notifications:s(ts,{}),organizations:s(Er,{}),permissions:s(rs,{functions:a,runAsIdentity:i,schemaEditable:l}),pitr:s(qr,{initialShardKey:r}),mail:s(Jr,{}),payments:s(as,{}),queues:s(ss,{}),realtime:x("div",{className:"flex flex-col gap-8",children:[s(Yr,{initialShardKey:r}),s(Gr,{})]}),rls:s(Mr,{}),schedule:s(Xr,{loadCronJobs:u,scheduledCancel:d,scheduledLoad:c}),schema:s(Ls,{initialShardKey:r,schemaEditable:l}),advisorHealth:s(Cr,{}),security:s(_r,{}),settings:s(cs,{initialShardKey:r}),sql:s(us,{initialShardKey:r}),storageRules:s(ms,{}),users:s(Rr,{}),vectors:s(fs,{}),workflows:s(gs,{})},h=Nt({component:()=>g.home,getParentRoute:()=>p,path:"/"}),f=Qt.map(m=>Nt({component:()=>g[m],getParentRoute:()=>p,path:`/${m}`,validateSearch:Or[m]})),v=p.addChildren([h,...f]),b="window"in globalThis?Gt():ea({initialEntries:["/home"]});return ta({...t===void 0||t==="/"?{}:{basepath:t},defaultNotFoundComponent:Ps,defaultPendingComponent:Jt,defaultPendingMinMs:0,defaultPendingMs:0,history:b,routeTree:v})},As=t=>{const e=w(17),{basePath:a,chrome:r,dataEditable:n,functions:o,initialShardKey:i,openApiSpec:l,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:p,scheduledCron:g,scheduledLoad:h}=t;let f;e[0]!==a||e[1]!==n||e[2]!==o||e[3]!==i||e[4]!==l||e[5]!==d||e[6]!==u||e[7]!==p||e[8]!==g||e[9]!==h||e[10]!==c?(f=$s({basePath:a,dataEditable:n,functions:o,initialShardKey:i,openApiSpec:l,openRpcSpec:d,runAsIdentity:u,schemaEditable:c,scheduledCancel:p,scheduledCron:g,scheduledLoad:h}),e[0]=a,e[1]=n,e[2]=o,e[3]=i,e[4]=l,e[5]=d,e[6]=u,e[7]=p,e[8]=g,e[9]=h,e[10]=c,e[11]=f):f=e[11];const v=f,b=r??null;let m;e[12]!==v?(m=s(Xt,{router:v}),e[12]=v,e[13]=m):m=e[13];let y;return e[14]!==b||e[15]!==m?(y=s(Ut,{value:b,children:m}),e[14]=b,e[15]=m,e[16]=y):y=e[16],y},cn=t=>{const e=w(17),{basePath:a,chrome:r,dataEditable:n,functions:o,i18n:i,initialShardKey:l,locale:d,openApiSpec:u,openRpcSpec:c,runAsIdentity:p,schemaEditable:g,scheduledCancel:h,scheduledCron:f,scheduledLoad:v}=t;let b;e[0]!==a||e[1]!==r||e[2]!==n||e[3]!==o||e[4]!==l||e[5]!==u||e[6]!==c||e[7]!==p||e[8]!==h||e[9]!==f||e[10]!==v||e[11]!==g?(b=s(La,{children:s(As,{basePath:a,chrome:r,dataEditable:n,functions:o,initialShardKey:l,openApiSpec:u,openRpcSpec:c,runAsIdentity:p,scheduledCancel:h,scheduledCron:f,scheduledLoad:v,schemaEditable:g})}),e[0]=a,e[1]=r,e[2]=n,e[3]=o,e[4]=l,e[5]=u,e[6]=c,e[7]=p,e[8]=h,e[9]=f,e[10]=v,e[11]=g,e[12]=b):b=e[12];const m=b;if(i===void 0&&d===void 0)return m;let y;return e[13]!==i||e[14]!==d||e[15]!==m?(y=s(ga,{i18n:i,locale:d,children:m}),e[13]=i,e[14]=d,e[15]=m,e[16]=y):y=e[16],y};function Ts(t){return t.location.pathname}function zs(t){return t.tabs.length>0}export{Ba as N,cn as S,_a as a,Pa as b,qa as c,za as f,Va as g,dn as m,Da as v};
|