@lunora/studio 1.0.0-alpha.95 → 1.0.0-alpha.97
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.js +1 -1
- package/dist/mount.js +1 -1
- package/dist/packem_chunks/AdvisorHealthPanel.js +1 -1
- package/dist/packem_chunks/AuditPanel.js +1 -1
- package/dist/packem_chunks/DeploymentHealthPanel.js +1 -1
- package/dist/packem_chunks/ExportImportPanel.js +1 -1
- package/dist/packem_chunks/FileBrowser.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/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/analytics-panel.js +1 -1
- package/dist/packem_chunks/auth-audit-panel.js +1 -1
- package/dist/packem_chunks/auth-config-panel.js +1 -1
- package/dist/packem_chunks/auth-sessions-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/log-drains-panel.js +2 -2
- package/dist/packem_chunks/migrations-route.js +1 -1
- package/dist/packem_chunks/organizations-panel.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/schedule-panel.js +1 -1
- package/dist/packem_chunks/sparkline.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/sync-client-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/vector-browser.js +1 -1
- package/dist/packem_chunks/workflows-panel.js +1 -1
- package/dist/packem_shared/{DataBrowser-H4oUFkPJ.js → DataBrowser-CPNKM0KZ.js} +1 -1
- package/dist/packem_shared/{GlobalDataBrowser-CeA8bDjX.js → GlobalDataBrowser-BSmyOO0n.js} +1 -1
- package/dist/packem_shared/{HomePanel-DLP1nQdC.js → HomePanel-BUO6BcYQ.js} +1 -1
- package/dist/packem_shared/{MigrationsPanel-dm_M75mR.js → MigrationsPanel-BAnvY79E.js} +1 -1
- package/dist/packem_shared/{ScheduledJobs-DDJG9Je7.js → ScheduledJobs-pHVlh2xU.js} +1 -1
- package/dist/packem_shared/{Studio-BYg65qWq.js → Studio-DG_n-8Pc.js} +1 -1
- package/dist/packem_shared/{StudioApp-D0UOg0a_.js → StudioApp-bavavhpe.js} +1 -1
- package/dist/packem_shared/advisor-view-CGcwvlMo.js +1 -0
- package/dist/packem_shared/bar-chart-B8oDHgnw.js +6 -0
- package/dist/packem_shared/{card-CIDGUN6K.js → card-BMKx5UdA.js} +1 -1
- package/dist/packem_shared/{dropdown-menu-C3RQ_HlW.js → dropdown-menu-BgS2zw1i.js} +1 -1
- package/dist/packem_shared/error-alert-_2q2VtVG.js +1 -0
- package/dist/packem_shared/{grid-features-Db_BNYRo.js → grid-features-Y2YSjhCf.js} +2 -2
- package/dist/packem_shared/home-panel-Ir3YHReO.js +3 -0
- package/dist/packem_shared/result-chart-0VgP_3FP.js +1 -0
- package/dist/packem_shared/schema-diagram-GVgnLWTf.js +2 -0
- package/dist/packem_shared/{select-Bul-DeII.js → select-BssZMiFY.js} +1 -1
- package/dist/packem_shared/{sparkline-CgjeUU2I.js → sparkline-BNvxiJj_.js} +1 -1
- package/dist/packem_shared/{stat-card-fm_TF1mo.js → stat-card-BGJdhfm6.js} +1 -1
- package/dist/packem_shared/studio-C9Qvg13j.js +2 -0
- package/dist/packem_shared/{table-DdJBrClo.js → table-DZAB8cs3.js} +1 -1
- package/dist/packem_shared/{trace-handoff-Dw7mwjxu.js → trace-handoff-CuZ6WGgo.js} +1 -1
- package/dist/packem_shared/use-async-submit-B32whHJO.js +1 -0
- package/dist/standalone/{chunk-BN4CIAXU.js → chunk-2KRXOCZ2.js} +1 -1
- package/dist/standalone/{chunk-D62SDRMM.js → chunk-3626PHEZ.js} +1 -1
- package/dist/standalone/{chunk-TITX6XEA.js → chunk-3IF75YS7.js} +1 -1
- package/dist/standalone/chunk-3SCGCJYS.js +1 -0
- package/dist/standalone/{chunk-2OUIHY7G.js → chunk-3SGYSFRC.js} +1 -1
- package/dist/standalone/{chunk-7YJNH3RB.js → chunk-4EHNOASW.js} +1 -1
- package/dist/standalone/{chunk-YD5O2NWK.js → chunk-5A7NIX77.js} +1 -1
- package/dist/standalone/{chunk-UIGAA3GV.js → chunk-5L2VKBAJ.js} +1 -1
- package/dist/standalone/{chunk-NNKN2XEZ.js → chunk-5L63KFHD.js} +1 -1
- package/dist/standalone/{chunk-ZNAGZU6H.js → chunk-6F7KP54M.js} +1 -1
- package/dist/standalone/{chunk-3FIN5PH4.js → chunk-6V27P65N.js} +2 -2
- package/dist/standalone/{chunk-2T22UR7E.js → chunk-73B3T2SA.js} +1 -1
- package/dist/standalone/chunk-7CWPU3LW.js +1 -0
- package/dist/standalone/{chunk-PE7TI4TQ.js → chunk-A6NAMYVS.js} +1 -1
- package/dist/standalone/{chunk-RNOSWEMO.js → chunk-AB5WGAX6.js} +2 -2
- package/dist/standalone/{chunk-IBVBIKUI.js → chunk-ATLV7KWK.js} +1 -1
- package/dist/standalone/{chunk-IUUSMC2R.js → chunk-BLHSTFG3.js} +1 -1
- package/dist/standalone/chunk-C2ZFQARQ.js +11 -0
- package/dist/standalone/chunk-CXBXUT5A.js +3 -0
- package/dist/standalone/chunk-CZZWYUTR.js +1 -0
- package/dist/standalone/{chunk-LZKU262J.js → chunk-D264UAKY.js} +1 -1
- package/dist/standalone/{chunk-VVNQP4CI.js → chunk-DDO5EGID.js} +1 -1
- package/dist/standalone/{chunk-DMJDUC4L.js → chunk-E3Z4QXAD.js} +1 -1
- package/dist/standalone/{chunk-WI4XINU2.js → chunk-EZKBI7SZ.js} +1 -1
- package/dist/standalone/{chunk-BNAMPDZ2.js → chunk-FHZ5WDTU.js} +1 -1
- package/dist/standalone/{chunk-TMNKNTC4.js → chunk-FXBBFE7Y.js} +1 -1
- package/dist/standalone/{chunk-JYLYJT27.js → chunk-G2O3XP7Y.js} +5 -5
- package/dist/standalone/{chunk-SCKKQIAE.js → chunk-H5ZYPSLB.js} +1 -1
- package/dist/standalone/{chunk-Z4AX76YZ.js → chunk-HH5CZ6KD.js} +1 -1
- package/dist/standalone/{chunk-UGU5GYDV.js → chunk-I7V54EDS.js} +1 -1
- package/dist/standalone/{chunk-6K46XGR5.js → chunk-II64XEZV.js} +1 -1
- package/dist/standalone/{chunk-U6KDYJJC.js → chunk-IZFPJXB3.js} +1 -1
- package/dist/standalone/{chunk-QNHU4SKL.js → chunk-J4UYSDWF.js} +1 -1
- package/dist/standalone/{chunk-JWXKUXYA.js → chunk-JNY7CFF4.js} +1 -1
- package/dist/standalone/{chunk-DYMO6MDG.js → chunk-KP6VHTO4.js} +1 -1
- package/dist/standalone/{chunk-SKYFKPJC.js → chunk-LAEO6D34.js} +1 -1
- package/dist/standalone/{chunk-VNQB6HY4.js → chunk-LHAHIDNT.js} +1 -1
- package/dist/standalone/{chunk-4LCY5XUR.js → chunk-M2M3RYJU.js} +1 -1
- package/dist/standalone/{chunk-3KXDX76D.js → chunk-M3Z2YAHD.js} +1 -1
- package/dist/standalone/{chunk-YTWBHPAT.js → chunk-MW5YIENZ.js} +1 -1
- package/dist/standalone/chunk-NBANYYGB.js +1 -0
- package/dist/standalone/{chunk-465RIA2L.js → chunk-NCKRVNF2.js} +1 -1
- package/dist/standalone/{chunk-A3DBEJLO.js → chunk-NDO6YSEG.js} +1 -1
- package/dist/standalone/{chunk-O3UMJLO3.js → chunk-NJRW66LJ.js} +1 -1
- package/dist/standalone/{chunk-AQ4JNJF3.js → chunk-OKZP3YY3.js} +1 -1
- package/dist/standalone/{chunk-2O65JEMI.js → chunk-ON2FIVI2.js} +1 -1
- package/dist/standalone/chunk-OQIGV6FX.js +59 -0
- package/dist/standalone/{chunk-QXECM52Z.js → chunk-OZA2RA45.js} +1 -1
- package/dist/standalone/{chunk-XNGYYOLS.js → chunk-P33WK7YI.js} +4 -4
- package/dist/standalone/{chunk-KEVIGWKP.js → chunk-PKWJ7UOG.js} +1 -1
- package/dist/standalone/chunk-PLFTCTMX.js +1 -0
- package/dist/standalone/{chunk-7ONX5YGW.js → chunk-PMGTIUU2.js} +1 -1
- package/dist/standalone/{chunk-ABYJC3LS.js → chunk-QC4T2L6I.js} +1 -1
- package/dist/standalone/{chunk-3DJ3IUUG.js → chunk-QEVFPILV.js} +1 -1
- package/dist/standalone/{chunk-PGVJE5F5.js → chunk-QQYX5WN4.js} +1 -1
- package/dist/standalone/{chunk-G6GX5TVB.js → chunk-S7ZOM3NK.js} +1 -1
- package/dist/standalone/{chunk-M7AWSDGY.js → chunk-SPE3AB54.js} +1 -1
- package/dist/standalone/{chunk-OM36OEHZ.js → chunk-STESBRLN.js} +1 -1
- package/dist/standalone/{chunk-QM4EXWKF.js → chunk-SZXVX6PY.js} +1 -1
- package/dist/standalone/{chunk-EQZTSISX.js → chunk-TMGHRD6W.js} +1 -1
- package/dist/standalone/{chunk-ZA5YIHZM.js → chunk-UYPXC3OO.js} +1 -1
- package/dist/standalone/{chunk-ZVAGD3FT.js → chunk-VH2IO643.js} +1 -1
- package/dist/standalone/{chunk-5TDGHWYU.js → chunk-WLXH4ECM.js} +1 -1
- package/dist/standalone/{chunk-UZERI5YC.js → chunk-WQH3LT2P.js} +1 -1
- package/dist/standalone/{chunk-DBMFI2HC.js → chunk-XPOUF2XH.js} +1 -1
- package/dist/standalone/{chunk-JEZDJ7D6.js → chunk-YP7WZ6YM.js} +1 -1
- package/dist/standalone/chunk-YZIR7PL5.js +1 -0
- package/dist/standalone/studio.js +1 -1
- package/dist/styles.css +1 -1
- package/package.json +6 -6
- package/dist/packem_shared/advisor-view-Coipc04R.js +0 -1
- package/dist/packem_shared/bar-chart-DraN_srt.js +0 -9
- package/dist/packem_shared/error-alert--Ie7ofJ0.js +0 -1
- package/dist/packem_shared/home-panel-BtxdqXDe.js +0 -3
- package/dist/packem_shared/result-chart-Gywg9DOk.js +0 -1
- package/dist/packem_shared/schema-diagram-DTRaCp6Y.js +0 -2
- package/dist/packem_shared/studio-Drf4en3j.js +0 -2
- package/dist/packem_shared/use-async-submit-BFIMhRqh.js +0 -1
- package/dist/standalone/chunk-5KCULF7S.js +0 -11
- package/dist/standalone/chunk-GZMKPBTJ.js +0 -1
- package/dist/standalone/chunk-ILNELDFC.js +0 -1
- package/dist/standalone/chunk-MV4A2PAK.js +0 -1
- package/dist/standalone/chunk-Q2Q7FR3R.js +0 -1
- package/dist/standalone/chunk-S3DWUXGY.js +0 -62
- package/dist/standalone/chunk-UBIPFCOZ.js +0 -1
- package/dist/standalone/chunk-ZQPWVALL.js +0 -3
- package/dist/standalone/chunk-ZZJ7VUVZ.js +0 -1
- /package/dist/standalone/{chunk-7H7LZRLP.js → chunk-4KIQ5RLS.js} +0 -0
- /package/dist/standalone/{chunk-UU2QJMGJ.js → chunk-MKYEFQCA.js} +0 -0
- /package/dist/standalone/{chunk-KUVMORDQ.js → chunk-PKSAWP56.js} +0 -0
- /package/dist/standalone/{chunk-MIQTKZAR.js → chunk-WJQLNYGX.js} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{c as N}from"react/compiler-runtime";import{LunoraError as le}from"@lunora/errors";import{useMotionValue as re,useSpring as pe,useTransform as Z,useMotionValueEvent as ge,motion as V,useReducedMotion as Ue}from"motion/react";import*as K from"react";import{useId as se,useEffect as ie,useState as Q,use as ze,createContext as Be,useRef as Le}from"react";import*as ve from"recharts";import{ZIndexLayer as Ae,ResponsiveContainer as ne,LineChart as Ke,Line as De,BarChart as ke,Bar as de,AreaChart as Re,Area as Te,ReferenceLine as je,Rectangle as ae,XAxis as Ge}from"recharts";import{jsx as n,jsxs as k,Fragment as B}from"react/jsx-runtime";import{c as T}from"./utils-bhneXptQ.js";const Pe=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("circle",{className:"text-border dark:text-border",cx:"2",cy:"2",fill:"currentColor",r:"1"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"20",id:r,patternUnits:"userSpaceOnUse",width:"20",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},He=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M 20 0 L 0 0 0 20",fill:"none",stroke:"currentColor",strokeWidth:"0.5"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"20",id:r,patternUnits:"userSpaceOnUse",width:"20",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Ee=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border/60 dark:text-border/50",d:"M 0 0 L 20 20 M 20 0 L 0 20",fill:"none",stroke:"currentColor",strokeWidth:"0.5"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"20",id:r,patternUnits:"userSpaceOnUse",width:"20",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Xe=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("line",{className:"text-border dark:text-border",stroke:"currentColor",strokeWidth:"0.5",x1:"0",x2:"0",y1:"0",y2:"6"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"6",id:r,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"6",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Ve=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M 8 4 L 8 12 M 4 8 L 12 8",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"0.5"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"16",id:r,patternUnits:"userSpaceOnUse",width:"16",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},We=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M2 6h12L8 18 2 6zm18 36h12l-6 12-6-12z",fill:"currentColor",fillOpacity:"0.4",transform:"scale(0.5)"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"36",id:r,patternUnits:"userSpaceOnUse",width:"18",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Fe=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("polygon",{className:"text-border dark:text-border",fill:"currentColor",fillOpacity:"0.4",fillRule:"evenodd",points:"5 3 8 4 5 5 4 8 3 5 0 4 3 3 4 0 5 3"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"16",id:r,patternUnits:"userSpaceOnUse",width:"16",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Ye=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M0 0h4v4H0V0zm4 4h4v4H4V4z",fill:"currentColor",fillOpacity:"0.2",fillRule:"evenodd"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"8",id:r,patternUnits:"userSpaceOnUse",width:"8",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},qe=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M25 25c0-2.762 2.238-5 5-5s5 2.238 5 5-2.238 5-5 5c0 2.762-2.238 5-5 5s-5-2.238-5-5 2.238-5 5-5zM5 5c0-2.762 2.238-5 5-5s5 2.238 5 5-2.238 5-5 5c0 2.762-2.238 5-5 5S0 12.762 0 10s2.238-5 5-5zm5 4c2.209 0 4-1.791 4-4s-1.791-4-4-4-4 1.791-4 4 1.791 4 4 4zm20 20c2.209 0 4-1.791 4-4s-1.791-4-4-4-4 1.791-4 4 1.791 4 4 4z",fill:"currentColor",fillOpacity:"0.4",fillRule:"evenodd"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"40",id:r,patternUnits:"userSpaceOnUse",width:"40",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Je=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z",fill:"currentColor",fillOpacity:"0.4"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"26",id:r,patternTransform:"scale(0.6)",patternUnits:"userSpaceOnUse",width:"52",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Ze=i=>{const e=N(3),{id:r}=i;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("path",{className:"text-border dark:text-border",d:"M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z",fill:"currentColor",fillOpacity:"0.4",fillRule:"evenodd"}),e[0]=t):t=e[0];let a;return e[1]!==r?(a=n("pattern",{height:"100",id:r,patternTransform:"scale(0.6667)",patternUnits:"userSpaceOnUse",width:"100",x:"0",y:"0",children:t}),e[1]=r,e[2]=a):a=e[2],a},Qe={dots:Pe,grid:He,plus:Ve,bubbles:Ze,"cross-hatch":Ee,"diagonal-lines":Xe,"falling-triangles":We,"4-pointed-star":Fe,"tiny-checkers":Ye,"overlapping-circles":qe,"wiggle-lines":Je},et=i=>{const e=N(23),{variant:r}=i,t=se();let a;e[0]!==t?(a=t.replaceAll(":",""),e[0]=t,e[1]=a):a=e[1];const o=a,l=`${o}-bg-${r}`,s=`${o}-bg-edge-fade`,d=`${o}-bg-blur`,m=Qe[r];let u;e[2]!==m||e[3]!==l?(u=n(m,{id:l}),e[2]=m,e[3]=l,e[4]=u):u=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=n("feGaussianBlur",{stdDeviation:"25"}),e[5]=c):c=e[5];let f;e[6]!==d?(f=n("filter",{id:d,children:c}),e[6]=d,e[7]=f):f=e[7];const h=`url(#${d})`;let p;e[8]!==h?(p=n("rect",{fill:"white",filter:h,height:"60%",width:"85%",x:"8%",y:"20%"}),e[8]=h,e[9]=p):p=e[9];let g;e[10]!==s||e[11]!==p?(g=n("mask",{id:s,maskUnits:"userSpaceOnUse",children:p}),e[10]=s,e[11]=p,e[12]=g):g=e[12];let y;e[13]!==u||e[14]!==f||e[15]!==g?(y=k("defs",{children:[u,f,g]}),e[13]=u,e[14]=f,e[15]=g,e[16]=y):y=e[16];const x=`url(#${l})`,b=`url(#${s})`;let w;e[17]!==x||e[18]!==b?(w=n("rect",{fill:x,height:"100%",mask:b,width:"100%"}),e[17]=x,e[18]=b,e[19]=w):w=e[19];let $;return e[20]!==w||e[21]!==y?($=k(Ae,{zIndex:-1,children:[y,w]}),e[20]=w,e[21]=y,e[22]=$):$=e[22],$},we={light:"",dark:".dark"},oe=Object.keys(we);function tt(i){for(const[e,r]of Object.entries(i))if(r.colors&&!oe.some(t=>r.colors?.[t]!==void 0))throw new le("INTERNAL",`[EvilCharts] Invalid chart config for "${e}": colors object must have at least one theme key (${oe.join(", ")}). Received empty object or invalid keys.`)}const Ce=K.createContext(null);function rt(){const i=K.useContext(Ce);if(!i)throw new le("INTERNAL","useChart must be used within a <ChartContainer />");return i}const nt=({id:i,config:e,initialDimension:r={width:320,height:200},className:t,children:a,footer:o,...l})=>{const s=K.useId(),d=`chart-${i??s.replaceAll(":","")}`;return tt(e),n(Ce.Provider,{value:{config:e},children:k("div",{className:T("min-h-0 w-full flex-1","[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-axis-tick_text]:font-mono [&_.recharts-cartesian-axis-tick_text]:text-[11px] [&_.recharts-cartesian-axis-tick_text]:tracking-wide [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border relative flex flex-col justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",!o&&"aspect-video",t),"data-chart":d,"data-slot":"chart",...l,children:[n(Se,{config:e,id:d}),n(ve.ResponsiveContainer,{className:"min-h-0 w-full flex-1",initialDimension:r,children:a}),o]})})},at=i=>{const e=N(1),{isLoading:r}=i;if(!r)return null;let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center",children:k("div",{className:"text-primary bg-background flex items-center justify-center gap-2 rounded-md border px-2 py-0.5 text-sm",children:[n("div",{className:"border-border border-t-primary h-3 w-3 animate-spin rounded-full border"}),n("span",{children:"Loading"})]})}),e[0]=t):t=e[0],t};function it(i,e){const r=i.length;if(r>=e)return i.slice(0,e);const t=[],a=Math.floor(e/r),o=e%r;for(let l=0;l<r;l++){const s=l>=r-o,d=a+(s?1:0);for(let m=0;m<d;m++)t.push(i[l])}return t}const Se=i=>{const e=N(6),{id:r,config:t}=i;let a,o;if(e[0]!==t||e[1]!==r){o=Symbol.for("react.early_return_sentinel");e:{const d=Object.entries(t).filter(lt);if(d.length===0){o=null;break e}const m=u=>d.flatMap(c=>{const[f,h]=c,p=h.colors?.[u];if(!p||!Array.isArray(p)||p.length===0)return[];const g=W(h);return it(p,g).map((y,x)=>` --color-${f}-${x}: ${y};`)}).filter(Boolean).join(`
|
|
3
|
-
`);a=Object.entries(we).map(u=>{const[c,f]=u;return`${f} [data-chart=${r}] {
|
|
4
|
-
${m(c)}
|
|
5
|
-
}`})}e[0]=t,e[1]=r,e[2]=a,e[3]=o}else a=e[2],o=e[3];if(o!==Symbol.for("react.early_return_sentinel"))return o;const l=a.join(`
|
|
6
|
-
`);let s;return e[4]!==l?(s=n("style",{dangerouslySetInnerHTML:{__html:l}}),e[4]=l,e[5]=s):s=e[5],s};function ye(i,e,r){if(typeof e!="object"||e===null)return;const t="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let a=r;return r in e&&typeof e[r]=="string"?a=e[r]:t&&r in t&&typeof t[r]=="string"&&(a=t[r]),a in i?i[a]:i[r]}function W(i){if(!i.colors)return 1;const e=oe.map(r=>i.colors?.[r]?.length??0);return Math.max(...e,1)}const ot=(i=10,e=0,r=70)=>{const t=r-e;return Array.from({length:i},()=>({loading:Math.floor(Math.random()*t)+e}))};function lt(i){const[,e]=i;return e.colors}const xe={stiffness:300,damping:35,mass:.8};function st(i){const e=N(16),{range:r,totalPoints:t,containerRef:a,commit:o}=i,l=K.useRef(null),[s,d]=K.useState(!1);let m;e[0]!==a||e[1]!==t?(m=$=>!a.current||t<=1?0:Math.round($/a.current.getBoundingClientRect().width*(t-1)),e[0]=a,e[1]=t,e[2]=m):m=e[2];const u=m;let c;e[3]!==r?(c=($,v)=>{$.preventDefault(),$.target.setPointerCapture($.pointerId),l.current={type:v,originX:$.clientX,originRange:{...r}},d(!0)},e[3]=r,e[4]=c):c=e[4];const f=c;let h;e[5]!==o||e[6]!==u||e[7]!==t?(h=$=>{const v=l.current;if(!v)return;const I=u($.clientX-v.originX),{type:C,originRange:S}=v;if(C==="left")o({startIndex:S.startIndex+I,endIndex:S.endIndex},"left");else if(C==="right")o({startIndex:S.startIndex,endIndex:S.endIndex+I},"right");else{const M=S.endIndex-S.startIndex;let _=S.startIndex+I,O=_+M;_<0&&(_=0,O=M),O>t-1&&(O=t-1,_=Math.max(0,O-M)),o({startIndex:_,endIndex:O},"middle")}},e[5]=o,e[6]=u,e[7]=t,e[8]=h):h=e[8];const p=h;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=$=>{$.target.releasePointerCapture($.pointerId),l.current=null,d(!1)},e[9]=g):g=e[9];const y=g;let x;e[10]!==f||e[11]!==p?(x=$=>({onPointerDown:v=>{f(v,$)},onPointerMove:p,onPointerUp:y}),e[10]=f,e[11]=p,e[12]=x):x=e[12];const b=x;let w;return e[13]!==b||e[14]!==s?(w={isDragging:s,bind:b},e[13]=b,e[14]=s,e[15]=w):w=e[15],w}const dt=({data:i,chartConfig:e,dataKeys:r,xDataKey:t,variant:a="area",height:o=56,className:l,stacked:s=!1,strokeVariant:d="solid",connectNulls:m=!1,barRadius:u,startIndex:c,endIndex:f,defaultStartIndex:h=0,defaultEndIndex:p,onChange:g,formatLabel:y,curveType:x="monotone",minSpan:b=2,showLabels:w=!0,skipStyle:$=!1})=>{const v=K.useRef(null),I=r??Object.keys(e),C=i.length,S=K.useId().replaceAll(":",""),M=c!==void 0&&f!==void 0,[_,O]=K.useState(()=>({startIndex:Math.max(0,Math.min(h,C-1)),endIndex:Math.max(0,Math.min(p??C-1,C-1))})),A=K.useRef(_);ie(()=>{if(!M){const U=Math.max(0,C-1),j={startIndex:Math.min(A.current.startIndex,U),endIndex:Math.min(A.current.endIndex,U)};A.current=j,O(j)}},[C,M]);const R=(U,j)=>{let{startIndex:z,endIndex:L}=U;const J=Math.max(0,C-1);if(z=Math.max(0,Math.min(z,J)),L=Math.max(0,Math.min(L,J)),j==="left"){const te=Math.max(0,L-b);return z=Math.min(z,te),{startIndex:z,endIndex:L}}if(j==="right"){const te=Math.min(J,z+b);return L=Math.max(L,te),{startIndex:z,endIndex:L}}return L-z<b&&(L=Math.min(z+b,J),L-z<b&&(z=Math.max(0,L-b))),{startIndex:z,endIndex:L}},D=(U,j)=>{const z=R(U,j),L=A.current;L.startIndex===z.startIndex&&L.endIndex===z.endIndex||(A.current=z,O(z),K.startTransition(()=>{g?.(z)}))},{isDragging:F,bind:H}=st({range:_,totalPoints:C,containerRef:v,commit:D}),P=_;ie(()=>{if(M&&!F){const U={startIndex:c,endIndex:f};O(U),A.current=U}},[M,c,f,F]);const E=C>1?P.startIndex/(C-1)*100:0,X=C>1?P.endIndex/(C-1)*100:100,G=re(E),ee=re(X);G.get()!==E&&G.set(E),ee.get()!==X&&ee.set(X);const Y=pe(G,xe),q=pe(ee,xe),he=Z(Y,U=>`${U}%`),Me=Z(q,U=>`${U}%`),Ne=Z(Y,U=>`${U}%`),Oe=Z(q,U=>`${Math.max(0,100-U)}%`),ue=re(`${Math.max(0,X-E)}%`),fe=()=>{ue.set(`${Math.max(0,q.get()-Y.get())}%`)};ge(Y,"change",fe),ge(q,"change",fe);const me=U=>{if(!t)return String(U);const j=i[U]?.[t];return y?y(j,U):String(j??U)};return C===0?null:k("div",{className:T("group relative select-none",l),"data-chart":$?void 0:S,ref:v,style:{height:o},children:[!$&&n(Se,{config:e,id:S}),n("div",{className:"absolute inset-0 overflow-hidden rounded-md",children:n(ct,{barRadius:u,chartConfig:e,chartId:S,connectNulls:m,curveType:x,data:i,keys:I,stacked:s,strokeVariant:d==="animated-dashed"?"dashed":d,variant:a})}),n(V.div,{className:"bg-background pointer-events-none absolute inset-y-0 start-0 rounded-s-md",style:{width:Ne}}),n(V.div,{className:"bg-background pointer-events-none absolute inset-y-0 end-0 rounded-e-md",style:{width:Oe}}),n(V.div,{className:"absolute inset-y-0 cursor-grab touch-none rounded-sm border active:cursor-grabbing",style:{left:he,width:ue},...H("middle")}),n(be,{bind:H("left"),label:w?me(P.startIndex):void 0,position:he,side:"left"}),n(be,{bind:H("right"),label:w?me(P.endIndex):void 0,position:Me,side:"right"})]})},be=i=>{const e=N(20),{side:r,position:t,label:a,bind:o}=i,l=r==="left";let s;e[0]!==t?(s={left:t},e[0]=t,e[1]=s):s=e[1];const d=l?"":"-translate-x-full rtl:translate-x-full";let m;e[2]!==d?(m=T("group absolute inset-y-0 flex w-3 cursor-ew-resize touch-none items-center justify-center after:absolute after:inset-y-0 after:-start-4 after:w-11 after:content-['']",d),e[2]=d,e[3]=m):m=e[3];const u=l?"-start-[5.5px]":"-end-[5.5px]";let c;e[4]!==u?(c=T("bg-muted-foreground group-hover:bg-foreground relative flex h-4 w-1.5 items-center justify-center rounded-md transition-colors",u),e[4]=u,e[5]=c):c=e[5];let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=k("div",{className:"flex flex-col gap-[2px]",children:[n("div",{className:"bg-background h-[2px] w-[2px] rounded-full"}),n("div",{className:"bg-background h-[2px] w-[2px] rounded-full"}),n("div",{className:"bg-background h-[2px] w-[2px] rounded-full"})]}),e[6]=f):f=e[6];let h;e[7]!==c?(h=n("div",{className:c,children:f}),e[7]=c,e[8]=h):h=e[8];let p;e[9]!==o||e[10]!==m||e[11]!==h?(p=n("div",{className:m,...o,children:h}),e[9]=o,e[10]=m,e[11]=h,e[12]=p):p=e[12];let g;e[13]!==l||e[14]!==a?(g=a&&n("div",{className:T("bg-foreground text-background pointer-events-none absolute -bottom-3 -translate-y-1/2 rounded-[3px] px-1 py-px text-[8px] leading-tight font-medium whitespace-nowrap opacity-0 group-hover:opacity-100",l?"start-1.5":"end-1.5"),children:a}),e[13]=l,e[14]=a,e[15]=g):g=e[15];let y;return e[16]!==s||e[17]!==p||e[18]!==g?(y=k(V.div,{className:"absolute inset-y-0 z-10",style:s,children:[p,g]}),e[16]=s,e[17]=p,e[18]=g,e[19]=y):y=e[19],y},ct=({data:i,keys:e,chartConfig:r,variant:t,curveType:a,chartId:o,stacked:l,strokeVariant:s="solid",connectNulls:d=!1,barRadius:m})=>{const u=Object.entries(r).filter(([h])=>e.includes(h)).map(([h,p])=>({dataKey:h,colorsCount:W(p)})),c=s==="dashed"||s==="animated-dashed"?"4 4":void 0,f=k(B,{children:[t==="area"&&k("linearGradient",{id:`${o}-zm-vertical-fade`,x1:"0",x2:"0",y1:"0",y2:"1",children:[n("stop",{offset:"0%",stopColor:"white",stopOpacity:.15}),n("stop",{offset:"100%",stopColor:"white",stopOpacity:0})]}),u.map(({dataKey:h,colorsCount:p})=>{const g=p===1?k(B,{children:[n("stop",{offset:"0%",stopColor:`var(--color-${h}-0)`}),n("stop",{offset:"100%",stopColor:`var(--color-${h}-0)`})]}):Array.from({length:p},(y,x)=>n("stop",{offset:`${x/(p-1)*100}%`,stopColor:`var(--color-${h}-${x}, var(--color-${h}-0))`},x));return k(K.Fragment,{children:[n("linearGradient",{id:`${o}-zm-${h}`,x1:"0",x2:"0",y1:"0",y2:"1",children:g}),t==="area"&&k(B,{children:[n("mask",{id:`${o}-zm-fill-mask-${h}`,children:n("rect",{fill:`url(#${o}-zm-vertical-fade)`,height:"100%",width:"100%"})}),n("pattern",{height:"100%",id:`${o}-zm-fill-${h}`,patternUnits:"userSpaceOnUse",width:"100%",children:n("rect",{fill:`url(#${o}-zm-${h})`,height:"100%",mask:`url(#${o}-zm-fill-mask-${h})`,width:"100%"})})]})]},h)})]});if(t==="line")return n(ne,{height:"100%",width:"100%",children:k(Ke,{data:i,margin:{top:4,right:0,bottom:0,left:0},children:[n("defs",{children:f}),e.map(h=>n(De,{activeDot:!1,connectNulls:d,dataKey:h,dot:!1,isAnimationActive:!1,stroke:`url(#${o}-zm-${h})`,strokeDasharray:c,strokeOpacity:.5,strokeWidth:1,type:a},h))]})});if(t==="bar"){const h=m??3;return n(ne,{height:"100%",width:"100%",children:k(ke,{barGap:2,barSize:14,data:i,margin:{top:2,right:0,bottom:0,left:0},children:[n("defs",{children:f}),e.map(p=>n(de,{dataKey:p,fill:`url(#${o}-zm-${p})`,fillOpacity:.35,isAnimationActive:!1,radius:[h,h,h,h],stackId:l?"zm-stack":void 0},p))]})})}return n(ne,{height:"100%",width:"100%",children:k(Re,{data:i,margin:{top:4,right:0,bottom:0,left:0},children:[n("defs",{children:f}),e.map(h=>n(Te,{activeDot:!1,connectNulls:d,dataKey:h,dot:!1,fill:`url(#${o}-zm-fill-${h})`,fillOpacity:1,isAnimationActive:!1,stackId:l?"zm-stack":void 0,stroke:`url(#${o}-zm-${h})`,strokeDasharray:c,strokeOpacity:.5,strokeWidth:1,type:a},h))]})})};function ht({data:i,defaultStartIndex:e=0,defaultEndIndex:r}){const[t,a]=K.useState({startIndex:e,endIndex:r??Math.max(0,i.length-1)}),o=K.useDeferredValue(t);ie(()=>{a({startIndex:0,endIndex:Math.max(0,i.length-1)})},[i.length]);const l=i.slice(o.startIndex,o.endIndex+1);return{range:t,visibleData:l,brushProps:{startIndex:t.startIndex,endIndex:t.endIndex,onChange:a}}}const ut={sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl"},ft={default:"bg-background","frosted-glass":"bg-background"},mt=({active:i,payload:e,className:r,indicator:t="dot",hideLabel:a=!1,hideIndicator:o=!1,label:l,labelFormatter:s,labelClassName:d,formatter:m,nameKey:u,labelKey:c,selected:f,roundness:h="lg",variant:p="default"})=>{const{config:g}=rt(),y=K.useMemo(()=>{if(a||!e?.length)return null;const[b]=e,w=`${c??b?.dataKey??b?.name??"value"}`,$=ye(g,b,w),v=!c&&typeof l=="string"?g[l]?.label??l:$?.label;return s?n("div",{className:T("font-medium",d),children:s(v,e)}):v?n("div",{className:T("font-medium",d),children:v}):null},[l,s,e,a,d,g,c]);if(!i||!e?.length)return n("span",{className:"p-4"});const x=e.length===1&&t!=="dot";return k("div",{className:T("border-border/50 grid min-w-32 items-start gap-1.5 border px-2.5 py-1.5 text-xs",ut[h],ft[p],r),children:[x?null:y,n("div",{className:"grid gap-1.5",children:e.filter(b=>b.type!=="none").map((b,w)=>{const $=`${(u&&b.payload?b.payload[u]:void 0)??b.name??b.dataKey??"value"}`,v=ye(g,b,$),I=v?W(v):1;return n("div",{className:T("[&>svg]:text-muted-foreground flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5",t==="dot"&&"items-center",f!=null&&f!==b.dataKey&&"opacity-30"),children:m&&b?.value!==void 0&&b.name?m(b.value,b.name,b,w,b.payload):k(B,{children:[v?.icon?n(v.icon,{}):!o&&n("div",{className:T("shrink-0 rounded-[2px]",{"h-2.5 w-2.5":t==="dot","w-1":t==="line","w-0 border-[1.5px] border-dashed bg-transparent!":t==="dashed","my-0.5":x&&t==="dashed"}),style:pt($,I)}),k("div",{className:T("flex flex-1 justify-between gap-4 leading-none",x?"items-end":"items-center"),children:[k("div",{className:"grid gap-1.5",children:[x?y:null,n("span",{className:"text-muted-foreground",children:v?.label??b.name})]}),b.value!=null&&n("span",{className:"text-foreground font-mono font-medium tabular-nums",children:typeof b.value=="number"?b.value.toLocaleString():String(b.value)})]})]})},w)})})]})};function pt(i,e){return e<=1?{background:`var(--color-${i}-0)`}:{background:`linear-gradient(to right, ${Array.from({length:e},(r,t)=>{const a=t/(e-1)*100;return`var(--color-${i}-${t}) ${a}%`}).join(", ")})`}}const gt=({animationDuration:i=200,...e})=>n(ve.Tooltip,{animationDuration:i,...e}),Ie=2,yt="loading",xt=2e3,bt="evil-stacked",$t=.5,vt=.05,kt=[0,.7,.5,1],_e=Be(null);function ce(){const i=ze(_e);if(!i)throw new le("INTERNAL","Bar chart parts (<Bar />, <XAxis />, …) must be used within <EvilBarChart />");return i}const Wt=({config:i,data:e,children:r,className:t,chartProps:a,stackType:o="default",layout:l="vertical",barRadius:s=Ie,animationType:d="left-to-right",barGap:m,barCategoryGap:u,backgroundVariant:c,defaultSelectedDataKey:f=null,onSelectionChange:h,isLoading:p=!1,loadingBars:g,showBrush:y=!1,xDataKey:x,brushHeight:b,brushFormatLabel:w,onBrushChange:$})=>{const v=se().replaceAll(":",""),[I]=Q(()=>Date.now()),[C,S]=Q(f),[M,_]=Q(!1),{loadingData:O,onShimmerExit:A}=At(p,g),{visibleData:R,brushProps:D}=ht({data:e}),F=o==="stacked"||o==="percent",H=l==="horizontal",P=y&&!p?R:e,E=G=>{S(G),h?.(G)},X={config:i,isStacked:F,isHorizontal:H,isLoading:p,barRadius:s,animationType:d,introStartedAt:I,dataLength:P.length,selectedDataKey:C,selectDataKey:E,isMouseInChart:M};return n(_e,{value:X,children:k(nt,{className:t,config:i,footer:y&&!p&&n(dt,{barRadius:s,chartConfig:i,className:"mt-1",data:e,formatLabel:w,height:b,skipStyle:!0,stacked:F,variant:"bar",xDataKey:x,...D,onChange:G=>{D.onChange(G),$?.(G)}}),children:[n(at,{isLoading:p}),k(ke,{accessibilityLayer:!0,barCategoryGap:u,barGap:m,data:p?O:P,id:v,layout:H?"vertical":"horizontal",onMouseEnter:()=>{_(!0)},onMouseLeave:()=>{_(!1)},stackOffset:o==="percent"?"expand":void 0,...a,children:[c&&n(et,{variant:c}),n(je,{stroke:"var(--border)"}),r,p&&n(Dt,{chartId:v,onShimmerExit:A})]})]})})},Ft=({dataKey:i,variant:e="default",radius:r,animationType:t,isClickable:a=!1,enableHoverHighlight:o=!1,glowing:l=!1,bufferBar:s=!1,barProps:d})=>{const{config:m,isStacked:u,isHorizontal:c,isLoading:f,barRadius:h,animationType:p,introStartedAt:g,dataLength:y,selectedDataKey:x,selectDataKey:b,isMouseInChart:w}=ce(),$=se().replaceAll(":",""),v=Ue();if(f)return null;const I=r??h,C=x===i,S=v?"none":t??p,M={id:$,dataKey:i,variant:e,barRadius:I,glowing:l,bufferBar:s,isClickable:a,enableHoverHighlight:o,isMouseInChart:w,isHorizontal:c,introStartedAt:g,selectedDataKey:x,dataLength:y,onClick:()=>{a&&b(C?null:i)}};return k(B,{children:[n(de,{activeBar:_=>n($e,{..._,...M,animationType:"none"}),dataKey:i,fill:`url(#${$}-colors-${i})`,isAnimationActive:!1,radius:I,shape:_=>n($e,{..._,...M,animationType:S}),stackId:u?bt:void 0,style:a||o?{cursor:"pointer"}:void 0,...d}),k("defs",{children:[n(It,{config:m,dataKey:i,id:$}),e==="hatched"&&n(_t,{dataKey:i,id:$}),e==="duotone"&&n(Nt,{config:m,dataKey:i,id:$}),e==="duotone-reverse"&&n(Ot,{config:m,dataKey:i,id:$}),e==="gradient"&&n(Ut,{dataKey:i,id:$}),e==="stripped"&&n(zt,{dataKey:i,id:$}),s&&n(Mt,{dataKey:i,id:$}),l&&n(Bt,{dataKey:i,id:$})]})]})},Yt=({tickLine:i=!1,axisLine:e=!1,tickMargin:r=8,minTickGap:t=8,type:a,...o})=>{const{isLoading:l,isHorizontal:s}=ce();return l?null:n(Ge,{axisLine:e,minTickGap:t,tickLine:i,tickMargin:r,type:a??(s?"number":"category"),...o})},qt=i=>{const e=N(7),{variant:r,roundness:t,defaultIndex:a}=i,{isLoading:o,selectedDataKey:l}=ce();if(o)return null;let s;e[0]!==t||e[1]!==l||e[2]!==r?(s=n(mt,{roundness:t,selected:l,variant:r}),e[0]=t,e[1]=l,e[2]=r,e[3]=s):s=e[3];let d;return e[4]!==a||e[5]!==s?(d=n(gt,{content:s,cursor:!1,defaultIndex:a}),e[4]=a,e[5]=s,e[6]=d):d=e[6],d},$e=i=>{const{x:e=0,y:r=0,width:t=0,height:a=0,id:o,dataKey:l,variant:s,barRadius:d,glowing:m,bufferBar:u,isClickable:c,enableHoverHighlight:f,isMouseInChart:h,isHorizontal:p=!1,animationType:g="none",introStartedAt:y=0,selectedDataKey:x,isActive:b,dataLength:w=0,onClick:$}=i,v=typeof i.index=="number"?i.index:-1,I=u&&w>0&&v===w-1,C=s==="stripped",S=wt(g,v,w,p,y),M=I?`url(#${o}-buffer-hatched-${l})`:Ct(s,o,l),_=m?`url(#${o}-bar-glow-${l})`:void 0,O=St({isClickable:c,selectedDataKey:x,dataKey:l,enableHoverHighlight:f,isMouseInChart:h,isActive:b}),A=c||f?{cursor:"pointer"}:void 0,R=C?[d,d,0,0]:d,D=k(B,{children:[n(ae,{fill:M,filter:_,height:Math.max(0,a-3),opacity:O,radius:R,stroke:I?`url(#${o}-colors-${l})`:void 0,strokeWidth:I?1:void 0,width:t,x:e,y:r}),C&&n(ae,{fill:`url(#${o}-colors-${l})`,height:2,radius:1,width:t,x:e,y:r-4})]});return k("g",{onClick:$,style:A,children:[n(ae,{...i,fill:"transparent"}),S?n(V.g,{animate:S.animate,initial:S.initial,style:S.style,transition:S.transition,children:D}):D]})},wt=(i,e,r,t,a)=>{if(i==="none"||e<0||r<=0)return null;const o=r-1,l=o/2;let s;switch(i){case"center-out":{s=Math.abs(e-l);break}case"edges-in":{s=l-Math.abs(e-l);break}case"right-to-left":{s=o-e;break}default:s=e}const d=s*vt*1e3,m=$t*1e3,u=d+m,c=Date.now()-a;if(c>=u)return null;const f=c<=d?0:(c-d)/m,h={duration:(u-Math.max(c,d))/1e3,ease:kt,delay:Math.max(0,d-c)/1e3};return t?{initial:{scaleX:f},animate:{scaleX:1},transition:h,style:{originX:0}}:{initial:{scaleY:f},animate:{scaleY:1},transition:h,style:{originY:1}}},Ct=(i,e,r)=>{switch(i){case"duotone":return`url(#${e}-duotone-${r})`;case"duotone-reverse":return`url(#${e}-duotone-reverse-${r})`;case"gradient":return`url(#${e}-gradient-${r})`;case"hatched":return`url(#${e}-hatched-${r})`;case"stripped":return`url(#${e}-stripped-${r})`;default:return`url(#${e}-colors-${r})`}},St=({isClickable:i,selectedDataKey:e,dataKey:r,enableHoverHighlight:t,isMouseInChart:a,isActive:o})=>{const l=i&&e!==null?e===null||e===r?1:.3:1;return t&&a?o?l:l*.3:l},It=i=>{const e=N(16),{id:r,dataKey:t,config:a}=i;let o,l,s,d,m,u;if(e[0]!==a||e[1]!==t||e[2]!==r){const f=W(a[t]??{});o=`${r}-colors-${t}`,l="0",s="0",d="0",m="1",u=f===1?k(B,{children:[n("stop",{offset:"0%",stopColor:`var(--color-${t}-0)`}),n("stop",{offset:"100%",stopColor:`var(--color-${t}-0)`})]}):Array.from({length:f},(h,p)=>{const g=`${p/(f-1)*100}%`;return n("stop",{offset:g,stopColor:`var(--color-${t}-${p}, var(--color-${t}-0))`},g)}),e[0]=a,e[1]=t,e[2]=r,e[3]=o,e[4]=l,e[5]=s,e[6]=d,e[7]=m,e[8]=u}else o=e[3],l=e[4],s=e[5],d=e[6],m=e[7],u=e[8];let c;return e[9]!==o||e[10]!==l||e[11]!==s||e[12]!==d||e[13]!==m||e[14]!==u?(c=n("linearGradient",{id:o,x1:l,x2:s,y1:d,y2:m,children:u}),e[9]=o,e[10]=l,e[11]=s,e[12]=d,e[13]=m,e[14]=u,e[15]=c):c=e[15],c},_t=i=>{const e=N(19),{id:r,dataKey:t}=i,a=`${r}-hatched-mask-pattern`;let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n("rect",{fill:"white",fillOpacity:.3,height:"5",width:"5"}),l=n("rect",{fill:"white",fillOpacity:1,height:"5",width:"1.5"}),e[0]=o,e[1]=l):(o=e[0],l=e[1]);let s;e[2]!==a?(s=k("pattern",{height:"5",id:a,patternTransform:"rotate(-45)",patternUnits:"userSpaceOnUse",width:"5",x:"0",y:"0",children:[o,l]}),e[2]=a,e[3]=s):s=e[3];const d=`${r}-hatched-mask-${t}`,m=`url(#${r}-hatched-mask-pattern)`;let u;e[4]!==m?(u=n("rect",{fill:m,height:"100%",width:"100%"}),e[4]=m,e[5]=u):u=e[5];let c;e[6]!==d||e[7]!==u?(c=n("mask",{id:d,children:u}),e[6]=d,e[7]=u,e[8]=c):c=e[8];const f=`${r}-hatched-${t}`,h=`url(#${r}-colors-${t})`,p=`url(#${r}-hatched-mask-${t})`;let g;e[9]!==h||e[10]!==p?(g=n("rect",{fill:h,height:"100%",mask:p,width:"100%"}),e[9]=h,e[10]=p,e[11]=g):g=e[11];let y;e[12]!==g||e[13]!==f?(y=n("pattern",{height:"100%",id:f,patternUnits:"userSpaceOnUse",width:"100%",children:g}),e[12]=g,e[13]=f,e[14]=y):y=e[14];let x;return e[15]!==y||e[16]!==s||e[17]!==c?(x=k(B,{children:[s,c,y]}),e[15]=y,e[16]=s,e[17]=c,e[18]=x):x=e[18],x},Mt=i=>{const e=N(19),{id:r,dataKey:t}=i,a=`${r}-buffer-hatched-mask-pattern`;let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n("rect",{fill:"black",fillOpacity:0,height:"5",width:"5"}),l=n("rect",{fill:"white",fillOpacity:1,height:"5",width:"1"}),e[0]=o,e[1]=l):(o=e[0],l=e[1]);let s;e[2]!==a?(s=k("pattern",{height:"5",id:a,patternTransform:"rotate(-45)",patternUnits:"userSpaceOnUse",width:"5",x:"0",y:"0",children:[o,l]}),e[2]=a,e[3]=s):s=e[3];const d=`${r}-buffer-hatched-mask-${t}`,m=`url(#${r}-buffer-hatched-mask-pattern)`;let u;e[4]!==m?(u=n("rect",{fill:m,height:"100%",width:"100%"}),e[4]=m,e[5]=u):u=e[5];let c;e[6]!==d||e[7]!==u?(c=n("mask",{id:d,children:u}),e[6]=d,e[7]=u,e[8]=c):c=e[8];const f=`${r}-buffer-hatched-${t}`,h=`url(#${r}-colors-${t})`,p=`url(#${r}-buffer-hatched-mask-${t})`;let g;e[9]!==h||e[10]!==p?(g=n("rect",{fill:h,height:"100%",mask:p,width:"100%"}),e[9]=h,e[10]=p,e[11]=g):g=e[11];let y;e[12]!==g||e[13]!==f?(y=n("pattern",{height:"100%",id:f,patternUnits:"userSpaceOnUse",width:"100%",children:g}),e[12]=g,e[13]=f,e[14]=y):y=e[14];let x;return e[15]!==y||e[16]!==s||e[17]!==c?(x=k(B,{children:[s,c,y]}),e[15]=y,e[16]=s,e[17]=c,e[18]=x):x=e[18],x},Nt=i=>{const e=N(39),{id:r,dataKey:t,config:a}=i;let o,l,s,d,m,u,c,f;if(e[0]!==a||e[1]!==t||e[2]!==r){const S=W(a[t]??{}),M=`${r}-duotone-mask-gradient-${t}`;let _,O;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=n("stop",{offset:"50%",stopColor:"white",stopOpacity:.4}),O=n("stop",{offset:"50%",stopColor:"white",stopOpacity:1}),e[11]=_,e[12]=O):(_=e[11],O=e[12]),e[13]!==M?(f=k("linearGradient",{gradientUnits:"objectBoundingBox",id:M,x1:"0",x2:"1",y1:"0",y2:"0",children:[_,O]}),e[13]=M,e[14]=f):f=e[14],o="objectBoundingBox",l=`${r}-duotone-colors-${t}`,s="0",d="0",m="0",u="1",c=S===1?k(B,{children:[n("stop",{offset:"0%",stopColor:`var(--color-${t}-0)`}),n("stop",{offset:"100%",stopColor:`var(--color-${t}-0)`})]}):Array.from({length:S},(A,R)=>{const D=`${R/(S-1)*100}%`;return n("stop",{offset:D,stopColor:`var(--color-${t}-${R}, var(--color-${t}-0))`},D)}),e[0]=a,e[1]=t,e[2]=r,e[3]=o,e[4]=l,e[5]=s,e[6]=d,e[7]=m,e[8]=u,e[9]=c,e[10]=f}else o=e[3],l=e[4],s=e[5],d=e[6],m=e[7],u=e[8],c=e[9],f=e[10];let h;e[15]!==o||e[16]!==l||e[17]!==s||e[18]!==d||e[19]!==m||e[20]!==u||e[21]!==c?(h=n("linearGradient",{gradientUnits:o,id:l,x1:s,x2:d,y1:m,y2:u,children:c}),e[15]=o,e[16]=l,e[17]=s,e[18]=d,e[19]=m,e[20]=u,e[21]=c,e[22]=h):h=e[22];const p=`${r}-duotone-mask-${t}`,g=`url(#${r}-duotone-mask-gradient-${t})`;let y;e[23]!==g?(y=n("rect",{fill:g,height:"1",width:"1",x:"0",y:"0"}),e[23]=g,e[24]=y):y=e[24];let x;e[25]!==p||e[26]!==y?(x=n("mask",{id:p,maskContentUnits:"objectBoundingBox",children:y}),e[25]=p,e[26]=y,e[27]=x):x=e[27];const b=`${r}-duotone-${t}`,w=`url(#${r}-duotone-colors-${t})`,$=`url(#${r}-duotone-mask-${t})`;let v;e[28]!==w||e[29]!==$?(v=n("rect",{fill:w,height:"1",mask:$,width:"1",x:"0",y:"0"}),e[28]=w,e[29]=$,e[30]=v):v=e[30];let I;e[31]!==b||e[32]!==v?(I=n("pattern",{height:"1",id:b,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",children:v}),e[31]=b,e[32]=v,e[33]=I):I=e[33];let C;return e[34]!==x||e[35]!==I||e[36]!==f||e[37]!==h?(C=k(B,{children:[f,h,x,I]}),e[34]=x,e[35]=I,e[36]=f,e[37]=h,e[38]=C):C=e[38],C},Ot=i=>{const e=N(39),{id:r,dataKey:t,config:a}=i;let o,l,s,d,m,u,c,f;if(e[0]!==a||e[1]!==t||e[2]!==r){const S=W(a[t]??{}),M=`${r}-duotone-reverse-mask-gradient-${t}`;let _,O;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=n("stop",{offset:"50%",stopColor:"white",stopOpacity:1}),O=n("stop",{offset:"50%",stopColor:"white",stopOpacity:.4}),e[11]=_,e[12]=O):(_=e[11],O=e[12]),e[13]!==M?(f=k("linearGradient",{gradientUnits:"objectBoundingBox",id:M,x1:"0",x2:"1",y1:"0",y2:"0",children:[_,O]}),e[13]=M,e[14]=f):f=e[14],o="objectBoundingBox",l=`${r}-duotone-reverse-colors-${t}`,s="0",d="0",m="0",u="1",c=S===1?k(B,{children:[n("stop",{offset:"0%",stopColor:`var(--color-${t}-0)`}),n("stop",{offset:"100%",stopColor:`var(--color-${t}-0)`})]}):Array.from({length:S},(A,R)=>{const D=`${R/(S-1)*100}%`;return n("stop",{offset:D,stopColor:`var(--color-${t}-${R}, var(--color-${t}-0))`},D)}),e[0]=a,e[1]=t,e[2]=r,e[3]=o,e[4]=l,e[5]=s,e[6]=d,e[7]=m,e[8]=u,e[9]=c,e[10]=f}else o=e[3],l=e[4],s=e[5],d=e[6],m=e[7],u=e[8],c=e[9],f=e[10];let h;e[15]!==o||e[16]!==l||e[17]!==s||e[18]!==d||e[19]!==m||e[20]!==u||e[21]!==c?(h=n("linearGradient",{gradientUnits:o,id:l,x1:s,x2:d,y1:m,y2:u,children:c}),e[15]=o,e[16]=l,e[17]=s,e[18]=d,e[19]=m,e[20]=u,e[21]=c,e[22]=h):h=e[22];const p=`${r}-duotone-reverse-mask-${t}`,g=`url(#${r}-duotone-reverse-mask-gradient-${t})`;let y;e[23]!==g?(y=n("rect",{fill:g,height:"1",width:"1",x:"0",y:"0"}),e[23]=g,e[24]=y):y=e[24];let x;e[25]!==p||e[26]!==y?(x=n("mask",{id:p,maskContentUnits:"objectBoundingBox",children:y}),e[25]=p,e[26]=y,e[27]=x):x=e[27];const b=`${r}-duotone-reverse-${t}`,w=`url(#${r}-duotone-reverse-colors-${t})`,$=`url(#${r}-duotone-reverse-mask-${t})`;let v;e[28]!==w||e[29]!==$?(v=n("rect",{fill:w,height:"1",mask:$,width:"1",x:"0",y:"0"}),e[28]=w,e[29]=$,e[30]=v):v=e[30];let I;e[31]!==b||e[32]!==v?(I=n("pattern",{height:"1",id:b,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",children:v}),e[31]=b,e[32]=v,e[33]=I):I=e[33];let C;return e[34]!==x||e[35]!==I||e[36]!==f||e[37]!==h?(C=k(B,{children:[f,h,x,I]}),e[34]=x,e[35]=I,e[36]=f,e[37]=h,e[38]=C):C=e[38],C},Ut=i=>{const e=N(19),{id:r,dataKey:t}=i,a=`${r}-gradient-mask-gradient`;let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n("stop",{offset:"20%",stopColor:"white",stopOpacity:1}),l=n("stop",{offset:"90%",stopColor:"white",stopOpacity:0}),e[0]=o,e[1]=l):(o=e[0],l=e[1]);let s;e[2]!==a?(s=k("linearGradient",{id:a,x1:"0",x2:"0",y1:"0",y2:"1",children:[o,l]}),e[2]=a,e[3]=s):s=e[3];const d=`${r}-gradient-mask-${t}`,m=`url(#${r}-gradient-mask-gradient)`;let u;e[4]!==m?(u=n("rect",{fill:m,height:"100%",width:"100%"}),e[4]=m,e[5]=u):u=e[5];let c;e[6]!==d||e[7]!==u?(c=n("mask",{id:d,children:u}),e[6]=d,e[7]=u,e[8]=c):c=e[8];const f=`${r}-gradient-${t}`,h=`url(#${r}-colors-${t})`,p=`url(#${r}-gradient-mask-${t})`;let g;e[9]!==h||e[10]!==p?(g=n("rect",{fill:h,height:"100%",mask:p,width:"100%"}),e[9]=h,e[10]=p,e[11]=g):g=e[11];let y;e[12]!==g||e[13]!==f?(y=n("pattern",{height:"100%",id:f,patternUnits:"userSpaceOnUse",width:"100%",children:g}),e[12]=g,e[13]=f,e[14]=y):y=e[14];let x;return e[15]!==y||e[16]!==s||e[17]!==c?(x=k(B,{children:[s,c,y]}),e[15]=y,e[16]=s,e[17]=c,e[18]=x):x=e[18],x},zt=i=>{const e=N(19),{id:r,dataKey:t}=i,a=`${r}-stripped-mask-gradient`;let o,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n("stop",{offset:"0%",stopColor:"white",stopOpacity:.2}),l=n("stop",{offset:"100%",stopColor:"white",stopOpacity:.2}),e[0]=o,e[1]=l):(o=e[0],l=e[1]);let s;e[2]!==a?(s=k("linearGradient",{id:a,x1:"0",x2:"0",y1:"0",y2:"1",children:[o,l]}),e[2]=a,e[3]=s):s=e[3];const d=`${r}-stripped-mask-${t}`,m=`url(#${r}-stripped-mask-gradient)`;let u;e[4]!==m?(u=n("rect",{fill:m,height:"100%",width:"100%"}),e[4]=m,e[5]=u):u=e[5];let c;e[6]!==d||e[7]!==u?(c=n("mask",{id:d,children:u}),e[6]=d,e[7]=u,e[8]=c):c=e[8];const f=`${r}-stripped-${t}`,h=`url(#${r}-colors-${t})`,p=`url(#${r}-stripped-mask-${t})`;let g;e[9]!==h||e[10]!==p?(g=n("rect",{fill:h,height:"100%",mask:p,width:"100%"}),e[9]=h,e[10]=p,e[11]=g):g=e[11];let y;e[12]!==g||e[13]!==f?(y=n("pattern",{height:"100%",id:f,patternUnits:"userSpaceOnUse",width:"100%",children:g}),e[12]=g,e[13]=f,e[14]=y):y=e[14];let x;return e[15]!==y||e[16]!==s||e[17]!==c?(x=k(B,{children:[s,c,y]}),e[15]=y,e[16]=s,e[17]=c,e[18]=x):x=e[18],x},Bt=i=>{const e=N(5),{id:r,dataKey:t}=i,a=`${r}-bar-glow-${t}`;let o,l,s;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n("feGaussianBlur",{in:"SourceGraphic",result:"blur",stdDeviation:"8"}),l=n("feColorMatrix",{in:"blur",result:"glow",type:"matrix",values:`1 0 0 0 0
|
|
7
|
-
0 1 0 0 0
|
|
8
|
-
0 0 1 0 0
|
|
9
|
-
0 0 0 0.5 0`}),s=k("feMerge",{children:[n("feMergeNode",{in:"glow"}),n("feMergeNode",{in:"SourceGraphic"})]}),e[0]=o,e[1]=l,e[2]=s):(o=e[0],l=e[1],s=e[2]);let d;return e[3]!==a?(d=k("filter",{height:"300%",id:a,width:"300%",x:"-100%",y:"-100%",children:[o,l,s]}),e[3]=a,e[4]=d):d=e[4],d},Lt=(i=17,e=.05,r=.9)=>Array.from({length:i},(t,a)=>{const o=a/(i-1),l=Math.sin(o*Math.PI)**2,s=e+l*(r-e);return{offset:`${(o*100).toFixed(0)}%`,opacity:Number(s.toFixed(3))}});function At(i,e){const r=N(8),t=e===void 0?12:e,[,a]=Q(!1);let o;r[0]!==i||r[1]!==a?(o=()=>{i&&a(Kt)},r[0]=i,r[1]=a,r[2]=o):o=r[2];const l=o;let s;r[3]!==t?(s=ot(t,20,80),r[3]=t,r[4]=s):s=r[4];const d=s;let m;return r[5]!==d||r[6]!==l?(m={loadingData:d,onShimmerExit:l},r[5]=d,r[6]=l,r[7]=m):m=r[7],m}function Kt(i){return!i}const Dt=i=>{const e=N(8),{chartId:r,onShimmerExit:t}=i,a=`url(#${r}-loading-mask)`;let o;e[0]!==a?(o=n(de,{dataKey:yt,fill:"currentColor",fillOpacity:.15,isAnimationActive:!1,legendType:"none",radius:Ie,style:{mask:a}}),e[0]=a,e[1]=o):o=e[1];let l;e[2]!==r||e[3]!==t?(l=n("defs",{children:n(Rt,{chartId:r,onShimmerExit:t})}),e[2]=r,e[3]=t,e[4]=l):l=e[4];let s;return e[5]!==o||e[6]!==l?(s=k(B,{children:[o,l]}),e[5]=o,e[6]=l,e[7]=s):s=e[7],s},Rt=i=>{const e=N(23),{chartId:r,onShimmerExit:t}=i,a=Lt(),o=Le(-1),l=`${r}-loading-mask-gradient`,s="0",d="1",m="0",u="0",c=a.map(Tt);let f;e[0]!==l||e[1]!==c?(f=n("linearGradient",{id:l,x1:s,x2:d,y1:m,y2:u,children:c}),e[0]=l,e[1]=c,e[2]=f):f=e[2];const h=`${r}-loading-mask-pattern`;let p;e[3]===Symbol.for("react.memo_cache_sentinel")?(p={x:2},e[3]=p):p=e[3];const g=`url(#${r}-loading-mask-gradient)`;let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y={x:-1},e[4]=y):y=e[4];let x;e[5]!==t?(x=_=>{const O=typeof _.x=="number"?_.x:-1,A=o.current;O>=1&&A<1&&t(),o.current=O},e[5]=t,e[6]=x):x=e[6];let b;e[7]===Symbol.for("react.memo_cache_sentinel")?(b={duration:xt/1e3,ease:"linear",repeat:1/0,repeatType:"loop"},e[7]=b):b=e[7];let w;e[8]!==g||e[9]!==x?(w=n(V.rect,{animate:p,fill:g,height:"1",initial:y,onUpdate:x,transition:b,width:"1",y:"0"}),e[8]=g,e[9]=x,e[10]=w):w=e[10];let $;e[11]!==w||e[12]!==h?($=n("pattern",{height:"1",id:h,patternContentUnits:"objectBoundingBox",patternTransform:"rotate(25)",patternUnits:"objectBoundingBox",width:3,x:"0",y:"0",children:w}),e[11]=w,e[12]=h,e[13]=$):$=e[13];const v=`${r}-loading-mask`,I=`url(#${r}-loading-mask-pattern)`;let C;e[14]!==I?(C=n("rect",{fill:I,height:"100%",width:"100%"}),e[14]=I,e[15]=C):C=e[15];let S;e[16]!==v||e[17]!==C?(S=n("mask",{id:v,maskUnits:"userSpaceOnUse",children:C}),e[16]=v,e[17]=C,e[18]=S):S=e[18];let M;return e[19]!==$||e[20]!==S||e[21]!==f?(M=k(B,{children:[f,$,S]}),e[19]=$,e[20]=S,e[21]=f,e[22]=M):M=e[22],M};function Tt(i){const{offset:e,opacity:r}=i;return n("stop",{offset:e,stopColor:"white",stopOpacity:r},e)}export{gt as A,Ft as B,Wt as E,nt as L,qt as T,Yt as X,mt as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as A}from"react/compiler-runtime";import{flattenHint as $}from"@lunora/errors";import{useT as j}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{e as E,a as H,b as I}from"./internal-zkEvTqy8.js";import{b as O}from"./recording-client-DtUxwVNY.js";import{u as V}from"./operation-console-provider-BMJNtiyB.js";import{A as q}from"./alert-CVcOFuDR.js";import{jsx as v,jsxs as D}from"react/jsx-runtime";const G=C=>{const e=A(38),{className:N,error:r,testId:g}=C,w=j(),t=V();let l,s,n,i,a,c,o,m;if(e[0]!==N||e[1]!==r||e[2]!==t||e[3]!==g){const y=E(r);let b;e[12]!==r?(b=H(r),e[12]=r,e[13]=b):b=e[13],s=b;let h;e[14]!==r?(h=O(r),e[14]=r,e[15]=h):h=e[15];const k=h;let x;e[16]!==t||e[17]!==k?(x=()=>{t?.openConsole({errorsOnly:!0,seq:k})},e[16]=t,e[17]=k,e[18]=x):x=e[18],n=x,l=q,i=N,a=g,c="destructive";let p;e[19]!==r?(p=I(r),e[19]=r,e[20]=p):p=e[20],e[21]!==p?(o=v("p",{className:"font-medium",children:p}),e[21]=p,e[22]=o):o=e[22],m=y===void 0?null:v("p",{className:"mt-1 whitespace-pre-wrap text-xs opacity-90",children:$(y)}),e[0]=N,e[1]=r,e[2]=t,e[3]=g,e[4]=l,e[5]=s,e[6]=n,e[7]=i,e[8]=a,e[9]=c,e[10]=o,e[11]=m}else l=e[4],s=e[5],n=e[6],i=e[7],a=e[8],c=e[9],o=e[10],m=e[11];let u;e[23]!==s?(u=s===void 0?null:v("a",{"aria-label":"View documentation for this error",className:"mt-1 inline-block text-xs underline",href:s,rel:"noreferrer",target:"_blank",children:"View error docs"}),e[23]=s,e[24]=u):u=e[24];let d;e[25]!==t||e[26]!==n||e[27]!==w?(d=t===void 0?null:v("button",{className:"mt-1 block text-xs underline outline-none focus-visible:ring-1 focus-visible:ring-ring","data-testid":"error-show-in-console",onClick:n,type:"button",children:w("Show in console")}),e[25]=t,e[26]=n,e[27]=w,e[28]=d):d=e[28];let f;return e[29]!==l||e[30]!==i||e[31]!==a||e[32]!==c||e[33]!==o||e[34]!==m||e[35]!==u||e[36]!==d?(f=D(l,{className:i,testId:a,variant:c,children:[o,m,u,d]}),e[29]=l,e[30]=i,e[31]=a,e[32]=c,e[33]=o,e[34]=m,e[35]=u,e[36]=d,e[37]=f):f=e[37],f};export{G as E};
|
|
@@ -1,3 +0,0 @@
|
|
|
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-CnnyWJXM.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,l as ct}from"./internal-zkEvTqy8.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
|
-
`);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
|
-
`)},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 +0,0 @@
|
|
|
1
|
-
import{c as C}from"react/compiler-runtime";import{AreaChart as X,CartesianGrid as g,XAxis as L,Area as B,LineChart as E,Line as T}from"recharts";import{useT as $}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{h as j}from"./internal-zkEvTqy8.js";import{E as q,X as O,B as S,T as F,L as G,A as N,a as A}from"./bar-chart-DraN_srt.js";import{jsx as l,jsxs as b}from"react/jsx-runtime";const H=50,K={value:{colors:{dark:["var(--chart-1)"],light:["var(--chart-1)"]},label:"value"}},I=s=>{const a=s.columns.find(e=>s.rows.length>0&&s.rows.every(t=>typeof t[e]=="number"))??null;return{label:s.columns.find(e=>e!==a)??null,value:a}},W=s=>{const a=C(3),{data:e,kind:t}=s;let o;return a[0]!==e||a[1]!==t?(o=l(G,{className:"h-full w-full",config:K,children:t==="area"?b(X,{data:e,children:[l(g,{vertical:!1}),l(L,{axisLine:!1,dataKey:"label",tickLine:!1}),l(N,{content:l(A,{})}),l(B,{dataKey:"value",fill:"var(--color-value-0)",fillOpacity:.2,stroke:"var(--color-value-0)",type:"monotone"})]}):b(E,{data:e,children:[l(g,{vertical:!1}),l(L,{axisLine:!1,dataKey:"label",tickLine:!1}),l(N,{content:l(A,{})}),l(T,{dataKey:"value",dot:!1,stroke:"var(--color-value-0)",strokeWidth:2,type:"monotone"})]})}),a[0]=e,a[1]=t,a[2]=o):o=a[2],o},R=s=>{const a=C(21),{axes:e,result:t}=s,o=$();let u;a[0]!==t?(u=I(t),a[0]=t,a[1]=u):u=a[1];const k=u;let m;a[2]!==t.columns?(m=new Set(t.columns),a[2]=t.columns,a[3]=m):m=a[3];const f=m,h=e!==void 0&&f.has(e.x)?e.x:k.label;let v;a[4]!==e?.y||a[5]!==f?(v=e?.y.find(r=>f.has(r)),a[4]=e?.y,a[5]=f,a[6]=v):v=a[6];const w=v,d=w??k.value;let p;a[7]!==h||a[8]!==t.rows||a[9]!==d?(p=d===null?[]:t.rows.slice(0,H).map((r,c)=>({label:h===null?`#${(c+1).toString()}`:j(r[h]),value:Number(r[d])||0})),a[7]=h,a[8]=t.rows,a[9]=d,a[10]=p):p=a[10];const y=p;if(d===null){let r;a[11]!==o?(r=o("No numeric column to chart."),a[11]=o,a[12]=r):r=a[12];let c;return a[13]!==r?(c=l("p",{className:"p-4 text-sm text-muted-foreground","data-testid":"sql-chart-empty",children:r}),a[13]=r,a[14]=c):c=a[14],c}const n=e!==void 0&&w!==void 0?e.kind:"bar";let i;a[15]!==y||a[16]!==n?(i=n==="bar"?b(q,{className:"h-full w-full",config:K,data:y,children:[l(O,{dataKey:"label"}),l(S,{dataKey:"value"}),l(F,{})]}):l(W,{data:y,kind:n}),a[15]=y,a[16]=n,a[17]=i):i=a[17];let x;return a[18]!==n||a[19]!==i?(x=l("div",{className:"h-80 w-full p-3","data-chart-kind":n,"data-testid":"sql-chart",children:i}),a[18]=n,a[19]=i,a[20]=x):x=a[20],x};export{R as I};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import{c as w}from"react/compiler-runtime";import{Download01Icon as X}from"@hugeicons/core-free-icons";import{HugeiconsIcon as ee}from"@hugeicons/react";import{Handle as F,Position as P,getNodesBounds as te,getViewportForBounds as ae,useNodesState as re,useEdgesState as oe,ReactFlow as ne,Background as se,Panel as R,Controls as le,MiniMap as de,useNodes as ie,useReactFlow as K,useNodesInitialized as ce}from"@xyflow/react";import{useState as T,useMemo as C,useRef as me,useEffect as j}from"react";import{g as ue,d as y}from"./storage-tier-DznqOf-q.js";import{g as v}from"./badge-BbuuAio7.js";import{u as I}from"./button-BkCrNcAs.js";import{h as fe,$ as pe,b as ge,N as M}from"./dropdown-menu-C3RQ_HlW.js";import{u as he}from"./input-JHu63lTv.js";import{useT as S}from"./DEFAULT_LOCALE-BZ4NojpD.js";import{f as E}from"./internal-zkEvTqy8.js";import{c as N}from"./utils-bhneXptQ.js";import{jsx as d,jsxs as p}from"react/jsx-runtime";import{LunoraError as be}from"@lunora/errors";import{toBlob as xe,toSvg as ye}from"html-to-image";function Ne(a){const e=w(10);let t,s,o;e[0]!==a?({className:t,selected:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===!0?"":void 0;let r;e[4]!==t?(r=N("rounded-md border border-border bg-card text-card-foreground shadow-sm transition-colors","data-[selected]:border-ring data-[selected]:ring-[3px] data-[selected]:ring-ring/30",t),e[4]=t,e[5]=r):r=e[5];let l;return e[6]!==s||e[7]!==n||e[8]!==r?(l=d("div",{"data-slot":"base-node","data-selected":n,className:r,...s}),e[6]=s,e[7]=n,e[8]=r,e[9]=l):l=e[9],l}function we(a){const e=w(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=N("flex items-center gap-2 rounded-t-md bg-muted/50 px-3 py-1.5",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=d("div",{"data-slot":"base-node-header",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function ve(a){const e=w(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=N("flex flex-col",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=d("div",{"data-slot":"base-node-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}const U=a=>{const e=a.ref===void 0?a.type:`${a.type} → ${a.ref}`;return a.optional===!0?`${e}?`:e},$e=a=>{const e=w(22),{data:t,selected:s}=a,o=S();let n;e[0]!==t.label||e[1]!==t.loadError||e[2]!==o?(n=t.loadError===!0?d("span",{className:"px-3 py-1.5 text-xs text-destructive","data-testid":`sd-node-${t.label}-error`,children:o("Columns unavailable")}):d("span",{className:"px-3 py-1.5 text-xs text-muted-foreground",children:"—"}),e[0]=t.label,e[1]=t.loadError,e[2]=o,e[3]=n):n=e[3];const r=n,l=`sd-node-${t.label}`;let c;e[4]!==t.label?(c=d("span",{className:"truncate font-mono text-xs font-semibold",title:t.label,children:t.label}),e[4]=t.label,e[5]=c):c=e[5];let m;e[6]!==t.tier?(m=d("span",{className:"ms-auto",children:d(ue,{tier:t.tier})}),e[6]=t.tier,e[7]=m):m=e[7];let i;e[8]!==c||e[9]!==m?(i=p(we,{children:[c,m]}),e[8]=c,e[9]=m,e[10]=i):i=e[10];let u;e[11]!==t.columns||e[12]!==t.label||e[13]!==r?(u=t.columns.length===0?r:t.columns.map(g=>p("div",{className:N("relative flex items-center gap-2 border-t border-border px-3 py-1.5 text-xs first:border-t-0",g.pk===!0&&"bg-muted/30"),"data-testid":`sd-col-${t.label}-${g.name}`,children:[d(F,{className:"!h-2 !w-2 !-left-1 !border-border !bg-muted-foreground/70",id:g.name,isConnectable:!1,position:P.Left,type:"target"}),d("span",{className:"truncate font-mono",title:g.name,children:g.name}),g.pk===!0&&d(v,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),g.ref!==void 0&&d(v,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),d("span",{className:"ms-auto truncate text-muted-foreground",title:U(g),children:U(g)}),d(F,{className:"!h-2 !w-2 !-right-1 !border-border !bg-muted-foreground/70",id:g.name,isConnectable:!1,position:P.Right,type:"source"})]},g.name)),e[11]=t.columns,e[12]=t.label,e[13]=r,e[14]=u):u=e[14];let f;e[15]!==u?(f=d(ve,{children:u}),e[15]=u,e[16]=f):f=e[16];let b;return e[17]!==s||e[18]!==l||e[19]!==i||e[20]!==f?(b=p(Ne,{className:"w-64 overflow-hidden","data-testid":l,selected:s,children:[i,f]}),e[17]=s,e[18]=l,e[19]=i,e[20]=f,e[21]=b):b=e[21],b},x=1920,$=1080,D=32,L=(a,e)=>{const t=globalThis.document.createElement("a");t.href=a,t.download=e,globalThis.document.body.append(t),t.click(),t.remove()},Se=(a,e,t="schema-diagram.json")=>{const s={edges:e,exportedAt:new Date().toISOString(),nodes:a},o=JSON.stringify(s,void 0,2),n=globalThis.URL.createObjectURL(new globalThis.Blob([o],{type:"application/json"}));L(n,t),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(n)},0)},H=(a,e,t,s)=>{const o=te(a),{x:n,y:r,zoom:l}=ae(o,e,t,.1,2,s);return{transform:[n,r,l],zoom:l}},ke=async(a,e,t="schema-diagram.png")=>{const{transform:s}=H(e,x,$,D),[o,n,r]=s,l=await xe(a,{backgroundColor:"#ffffff",height:$,style:{transform:`translate(${o.toString()}px, ${n.toString()}px) scale(${r.toString()})`,transformOrigin:"top left",width:`${x.toString()}px`},width:x});if(l===null)throw new be("INTERNAL","html-to-image produced no blob");const c=globalThis.URL.createObjectURL(l);L(c,t),globalThis.setTimeout(()=>{globalThis.URL.revokeObjectURL(c)},0)},Ce=async(a,e,t="schema-diagram.svg")=>{const{transform:s}=H(e,x,$,D),[o,n,r]=s,l=await ye(a,{backgroundColor:"#ffffff",height:$,style:{transform:`translate(${o.toString()}px, ${n.toString()}px) scale(${r.toString()})`,transformOrigin:"top left",width:`${x.toString()}px`},width:x});L(l,t)},Me=a=>{const e=Math.max(1,Math.round(Math.sqrt(1.4*a/368)));return Math.max(480,a/e)},B=a=>38+Math.max(1,a)*28,Re=(a,e)=>{const t=new Map;for(const r of a)t.set(r,[]);for(const r of e)r.to!==r.from&&t.has(r.from)&&t.has(r.to)&&t.get(r.from)?.push(r.to);const s=new Map,o=new Set,n=r=>{const l=s.get(r);if(l!==void 0)return l;if(o.has(r))return 0;o.add(r);let c=0;for(const m of t.get(r)??[])c=Math.max(c,n(m)+1);return o.delete(r),s.set(r,c),c};for(const r of a)n(r);return s},Te=(a,e,t)=>{const s=Re(a,e),o=new Map;for(const m of a){const i=s.get(m)??0,u=o.get(i);u===void 0?o.set(i,[m]):u.push(m)}const n=a.reduce((m,i)=>m+B(t.get(i)??0)+36,0),r=Me(n),l=[];let c=0;for(const m of[...o.keys()].toSorted((i,u)=>i-u)){let i=0,u=24;for(const f of o.get(m)??[]){const b=B(t.get(f)??0);u>24&&u+b>r&&(i+=1,u=24),l.push({name:f,x:24+(c+i)*368,y:u}),u+=b+36}c+=i+1}return l},je={databaseSchema:$e},V={backgroundColor:y.shard.color},A={backgroundColor:y.global.color},Ee={global:!0,shard:!0},Le={},_e=a=>{const e=a.find(t=>t.pk===!0)?.name;return e!==void 0?e:a.some(t=>t.name==="_id")?"_id":a.some(t=>t.name==="id")?"id":a[0]?.name??"_id"},q=a=>a.flatMap(e=>e.columns.filter(t=>t.ref!==void 0).map(t=>({column:t.name,from:e.name,to:t.ref}))),ze=(a,e,t)=>{const s=a.map(l=>l.name),o=new Map(a.map(l=>[l.name,l.columns.length])),n=Te(s,q(a),o),r=new Map(a.map(l=>[l.name,l]));return n.flatMap(({name:l,x:c,y:m})=>{const i=r.get(l);return i===void 0?[]:[{className:t[l],data:{columns:i.columns,label:l,loadError:e,tier:i.tier},id:l,position:{x:c,y:m},type:"databaseSchema"}]})},Oe=a=>{const e=new Map(a.map(t=>[t.name,t.columns]));return q(a).flatMap(t=>{const s=e.get(t.to)??[],o=e.get(t.from)??[],n=_e(s);return!s.some(r=>r.name===n)||!o.some(r=>r.name===t.column)?[]:[{id:`${t.from}.${t.column}->${t.to}`,source:t.to,sourceHandle:n,target:t.from,targetHandle:t.column}]})},Fe=()=>{const a=w(15),e=S();let t;a[0]===Symbol.for("react.memo_cache_sentinel")?(t=p("span",{className:"flex items-center gap-1",children:[d("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:V}),y.shard.label]}),a[0]=t):t=a[0];let s;a[1]===Symbol.for("react.memo_cache_sentinel")?(s=p("span",{className:"flex items-center gap-1",children:[d("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:A}),y.global.label]}),a[1]=s):s=a[1];let o;a[2]===Symbol.for("react.memo_cache_sentinel")?(o=d(v,{className:"px-1 py-0 text-[10px] leading-tight",variant:"secondary",children:"PK"}),a[2]=o):o=a[2];let n;a[3]!==e?(n=e("Primary key"),a[3]=e,a[4]=n):n=a[4];let r;a[5]!==n?(r=p("span",{className:"flex items-center gap-1",children:[o,n]}),a[5]=n,a[6]=r):r=a[6];let l;a[7]===Symbol.for("react.memo_cache_sentinel")?(l=d(v,{className:"px-1 py-0 text-[10px] leading-tight",variant:"outline",children:"FK"}),a[7]=l):l=a[7];let c;a[8]!==e?(c=e("Foreign key"),a[8]=e,a[9]=c):c=a[9];let m;a[10]!==c?(m=p("span",{className:"flex items-center gap-1",children:[l,c]}),a[10]=c,a[11]=m):m=a[11];let i;return a[12]!==r||a[13]!==m?(i=p("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 rounded-xl border border-border bg-card/95 px-2.5 py-1.5 text-[11px] text-muted-foreground shadow-xs",children:[t,s,r,m]}),a[12]=r,a[13]=m,a[14]=i):i=a[14],i},Pe=12,Ie=a=>{const e=w(9),{containerRef:t,seedKey:s}=a,o=ce(),{fitView:n}=K();let r;e[0]!==t||e[1]!==n||e[2]!==o?(r=()=>{if(!o)return;const c=()=>{E(n({duration:0,maxZoom:1.6,padding:.14}))};c();const m=t.current;if(m===null)return;const i=new ResizeObserver(()=>{c()});return i.observe(m),()=>{i.disconnect()}},e[0]=t,e[1]=n,e[2]=o,e[3]=r):r=e[3];let l;return e[4]!==t||e[5]!==n||e[6]!==o||e[7]!==s?(l=[t,n,o,s],e[4]=t,e[5]=n,e[6]=o,e[7]=s,e[8]=l):l=e[8],j(r,l),null},Ue=({containerRef:a,testIdPrefix:e})=>{const t=S(),s=ie(),{getEdges:o}=K(),[n,r]=T(null),l=async()=>{const f=a.current?.querySelector(".react-flow__viewport");if(f){r("png");try{await ke(f,s,`${e}-schema-diagram.png`)}finally{r(null)}}},c=async()=>{const f=a.current?.querySelector(".react-flow__viewport");if(f){r("svg");try{await Ce(f,s,`${e}-schema-diagram.svg`)}finally{r(null)}}},m=()=>{r("json");try{Se(s,o(),`${e}-schema-diagram.json`)}finally{r(null)}},i=()=>{E(l())},u=()=>{E(c())};return d(R,{position:"top-right",children:p(fe,{children:[p(pe,{className:"group/button inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-md border border-border bg-background px-2 text-xs font-medium whitespace-nowrap hover:bg-muted disabled:pointer-events-none disabled:opacity-50","data-testid":`${e}-export-trigger`,disabled:n!==null,children:[d(ee,{className:"size-3.5",icon:X,strokeWidth:2}),t("Export")]}),p(ge,{align:"end",children:[d(M,{"data-testid":`${e}-export-png`,disabled:n!==null,onClick:i,children:t("PNG")}),d(M,{"data-testid":`${e}-export-svg`,disabled:n!==null,onClick:u,children:t("SVG")}),d(M,{"data-testid":`${e}-export-json`,disabled:n!==null,onClick:m,children:t("JSON")})]})]})})},at=({columnsError:a,fill:e=!1,nodeClasses:t,tables:s,testIdPrefix:o})=>{const n=S(),[r,l]=T(Ee),[c,m]=T(""),i=C(()=>{const h=c.trim().toLowerCase();return s.filter(O=>r[O.tier]&&O.name.toLowerCase().includes(h))},[s,r,c]),u=C(()=>ze(i,a??!1,t??Le),[i,a,t]),f=C(()=>Oe(i),[i]),b=i.map(h=>h.name).join(","),[g,_,G]=re(u),[J,z,W]=oe(f),k=me(null);j(()=>{_(u)},[u,_]),j(()=>{z(f)},[f,z]);const Z=h=>{m(h.target.value)},Y=()=>{l(h=>({...h,shard:!h.shard}))},Q=()=>{l(h=>({...h,global:!h.global}))};return s.length===0?d("section",{className:"flex flex-col gap-2","data-testid":`${o}-section`,children:d("p",{className:"text-sm text-muted-foreground","data-testid":`${o}-empty`,children:n("No tables to graph.")})}):d("section",{className:N("flex flex-col",e&&"min-h-0 flex-1"),"data-testid":`${o}-section`,children:d("div",{className:N("w-full overflow-hidden border border-border bg-muted/20",e?"min-h-0 flex-1":"h-[560px]"),"data-testid":`${o}-canvas`,ref:k,children:p(ne,{edges:J,elementsSelectable:!0,fitView:!0,minZoom:.2,nodes:g,nodesConnectable:!1,nodeTypes:je,onEdgesChange:W,onNodesChange:G,children:[d(se,{}),d(R,{position:"top-left",children:p("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card/95 p-2 shadow-xs",children:[d(he,{"aria-label":n("Find table…"),className:"h-7 w-44 text-xs","data-testid":`${o}-find`,onChange:Z,placeholder:n("Find table…"),value:c}),p("div",{"aria-label":n("Storage tiers"),className:"flex items-center gap-1.5",role:"group",children:[p(I,{"aria-pressed":r.shard,className:"gap-1.5","data-testid":`${o}-tier-shard`,onClick:Y,size:"xs",type:"button",variant:r.shard?"default":"outline",children:[d("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:V}),y.shard.label]}),p(I,{"aria-pressed":r.global,className:"gap-1.5","data-testid":`${o}-tier-global`,onClick:Q,size:"xs",type:"button",variant:r.global?"default":"outline",children:[d("span",{"aria-hidden":"true",className:"size-1.5 rounded-full",style:A}),y.global.label]})]})]})}),d(R,{position:"bottom-center",children:d(Fe,{})}),d(le,{showInteractive:!1}),i.length>Pe&&d(de,{className:"!border !border-border !bg-card",maskColor:"var(--color-muted)",nodeColor:"var(--color-muted-foreground)",nodeStrokeWidth:0,pannable:!0,zoomable:!0}),d(Ue,{containerRef:k,testIdPrefix:o}),d(Ie,{containerRef:k,seedKey:b})]})})})};export{at as S};
|
|
@@ -1,2 +0,0 @@
|
|
|
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-BtxdqXDe.js";import{c as fa,f as yt}from"./internal-zkEvTqy8.js";import{y as ut}from"./use-admin-query-CnnyWJXM.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-mPR8-vIm.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};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f}from"react/compiler-runtime";import{useState as c}from"react";import{f as i,b as y}from"./internal-zkEvTqy8.js";const g=()=>{const r=f(4),[o,a]=c(!1),[s,n]=c(null);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e=l=>{i((async()=>{a(!0),n(null);try{await l()}catch(m){n(y(m))}a(!1)})())},r[0]=e):e=r[0];const u=e;let t;return r[1]!==o||r[2]!==s?(t={busy:o,error:s,run:u},r[1]=o,r[2]=s,r[3]=t):t=r[3],t};export{g as u};
|