nestlens 0.3.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/__tests__/watchers/job.watcher.spec.js +330 -0
  2. package/dist/__tests__/watchers/job.watcher.spec.js.map +1 -1
  3. package/dist/dashboard/public/assets/{BatchesPage-CBuvtLok.js → BatchesPage-DmqbLFCs.js} +1 -1
  4. package/dist/dashboard/public/assets/{CachePage-CVI2MWOP.js → CachePage-CfA-UrdM.js} +1 -1
  5. package/dist/dashboard/public/assets/{ClickableBadge-BFhMLE2u.js → ClickableBadge-CW4jdcpl.js} +1 -1
  6. package/dist/dashboard/public/assets/{CommandsPage-CpXlDpH2.js → CommandsPage-DJ1ZxHj8.js} +1 -1
  7. package/dist/dashboard/public/assets/{DashboardPage-DBq9olrb.js → DashboardPage-BnnZ3TMF.js} +1 -1
  8. package/dist/dashboard/public/assets/{DumpsPage-CvCmvONu.js → DumpsPage-fshG-ETf.js} +1 -1
  9. package/dist/dashboard/public/assets/EntryDetailPage-Cf7K34er.js +130 -0
  10. package/dist/dashboard/public/assets/{EventsPage-B__c8fMG.js → EventsPage-DiPB0Sfy.js} +1 -1
  11. package/dist/dashboard/public/assets/{ExceptionsPage-gYd6g1uV.js → ExceptionsPage-BoauuDFu.js} +1 -1
  12. package/dist/dashboard/public/assets/{GatesPage-CY-lCHBF.js → GatesPage-CB0kqyp_.js} +1 -1
  13. package/dist/dashboard/public/assets/{GraphQLPage-45EotnyF.js → GraphQLPage-_inMfKh4.js} +1 -1
  14. package/dist/dashboard/public/assets/{HttpClientPage-B504GqrK.js → HttpClientPage-5vVzz7TU.js} +1 -1
  15. package/dist/dashboard/public/assets/{JobsPage-BCaWNqRu.js → JobsPage-CHYjmhlh.js} +1 -1
  16. package/dist/dashboard/public/assets/{LogsPage-4QbIACro.js → LogsPage-z4yYJ1qQ.js} +1 -1
  17. package/dist/dashboard/public/assets/{MailPage-rwNbPrlt.js → MailPage-DQ2PuRS9.js} +1 -1
  18. package/dist/dashboard/public/assets/ModelsPage-PBBI9K5M.js +1 -0
  19. package/dist/dashboard/public/assets/{NotificationsPage-CHkJmY88.js → NotificationsPage-CjleWNhr.js} +1 -1
  20. package/dist/dashboard/public/assets/{PageHeader-FW-7_zU_.js → PageHeader-QBzFo308.js} +1 -1
  21. package/dist/dashboard/public/assets/{QueriesPage-Cq_dTmNR.js → QueriesPage-Cpi1b2Mz.js} +1 -1
  22. package/dist/dashboard/public/assets/{RedisPage-WyIqRY51.js → RedisPage-C7vFV3r4.js} +1 -1
  23. package/dist/dashboard/public/assets/{RequestsPage-Ddf6EpBe.js → RequestsPage-B9-Qq2vH.js} +1 -1
  24. package/dist/dashboard/public/assets/{SchedulePage-Bnj6BP7j.js → SchedulePage-BXPldddV.js} +1 -1
  25. package/dist/dashboard/public/assets/{ViewsPage-DgdMD9iC.js → ViewsPage-COo7BNBc.js} +1 -1
  26. package/dist/dashboard/public/assets/{calendar-C6HprwOI.js → calendar-WMtbNas7.js} +1 -1
  27. package/dist/dashboard/public/assets/{circle-check-big-cy9U-hu6.js → circle-check-big-U-4nHjTQ.js} +1 -1
  28. package/dist/dashboard/public/assets/{eye-D01Pihl7.js → eye-Bc29awES.js} +1 -1
  29. package/dist/dashboard/public/assets/{index-yKzNgrAF.js → index-C8he4ZUV.js} +2 -2
  30. package/dist/dashboard/public/assets/{types-CvWsUZ4q.js → types-BYamMo0R.js} +1 -1
  31. package/dist/dashboard/public/assets/{zap-DOqgN4r4.js → zap-BxD9CCmf.js} +1 -1
  32. package/dist/dashboard/public/index.html +1 -1
  33. package/dist/watchers/graphql/adapters/base.adapter.d.ts.map +1 -1
  34. package/dist/watchers/graphql/adapters/base.adapter.js +5 -1
  35. package/dist/watchers/graphql/adapters/base.adapter.js.map +1 -1
  36. package/dist/watchers/job.watcher.d.ts +24 -0
  37. package/dist/watchers/job.watcher.d.ts.map +1 -1
  38. package/dist/watchers/job.watcher.js +123 -0
  39. package/dist/watchers/job.watcher.js.map +1 -1
  40. package/package.json +1 -1
  41. package/dist/dashboard/public/assets/EntryDetailPage-DYSZpdsH.js +0 -125
  42. package/dist/dashboard/public/assets/ModelsPage-Jc7WSrV2.js +0 -1
@@ -1 +1 @@
1
- import{j as t,R as i}from"./index-yKzNgrAF.js";import{e as w,b}from"./vendor-B2nVRih0.js";import{u as R,C as D,f as F,p as P}from"./ClickableBadge-BFhMLE2u.js";import{u as T,P as A,N as M,L}from"./PageHeader-FW-7_zU_.js";import{f as B,T as o,D as H,b as $}from"./types-CvWsUZ4q.js";function G(){const l=w(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m,hasFilters:h}=R("events"),{entries:u,loading:g,refreshing:a,newEntriesCount:x,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:j,setAutoRefresh:v,meta:s,isHighlighted:C}=T({type:"event",limit:50,filters:c}),r=u.filter(e=>B(e)),E=b.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx(D,{onClick:k=>{k.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(o,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(H,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:F(P(e.createdAt),{addSuffix:!0})})}],[n]);if(g&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const N=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(A,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:j,onAutoRefreshToggle:v,filters:m,onClearAllFilters:d}),t.jsxs("div",{className:`${N} space-y-4 transition-all duration-200`,children:[t.jsx(M,{count:x,onClick:y,loading:a}),t.jsx($,{columns:E,data:r,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>C(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:p,onClick:f,loading:a})]})]})}export{G as default};
1
+ import{j as t,R as i}from"./index-C8he4ZUV.js";import{e as w,b}from"./vendor-B2nVRih0.js";import{u as R,C as D,f as F,p as P}from"./ClickableBadge-CW4jdcpl.js";import{u as T,P as A,N as M,L}from"./PageHeader-QBzFo308.js";import{f as B,T as o,D as H,b as $}from"./types-BYamMo0R.js";function G(){const l=w(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m,hasFilters:h}=R("events"),{entries:u,loading:g,refreshing:a,newEntriesCount:x,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:j,setAutoRefresh:v,meta:s,isHighlighted:C}=T({type:"event",limit:50,filters:c}),r=u.filter(e=>B(e)),E=b.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx(D,{onClick:k=>{k.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(o,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(H,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:F(P(e.createdAt),{addSuffix:!0})})}],[n]);if(g&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const N=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(A,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:j,onAutoRefreshToggle:v,filters:m,onClearAllFilters:d}),t.jsxs("div",{className:`${N} space-y-4 transition-all duration-200`,children:[t.jsx(M,{count:x,onClick:y,loading:a}),t.jsx($,{columns:E,data:r,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>C(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:p,onClick:f,loading:a})]})]})}export{G as default};
@@ -1,4 +1,4 @@
1
- import{c as B,u as I,j as t,i as W,T as m,n as $,o as H}from"./index-yKzNgrAF.js";import{e as U,b as c}from"./vendor-B2nVRih0.js";import{u as z,C as u,f as G,p as J}from"./ClickableBadge-BFhMLE2u.js";import{u as K,P as O,F as Q,N as V,L as X}from"./PageHeader-FW-7_zU_.js";import{d as Y,T as r,b as Z}from"./types-CvWsUZ4q.js";import{C as _}from"./circle-check-big-cy9U-hu6.js";/**
1
+ import{c as B,u as I,j as t,i as W,T as m,n as $,o as H}from"./index-C8he4ZUV.js";import{e as U,b as c}from"./vendor-B2nVRih0.js";import{u as z,C as u,f as G,p as J}from"./ClickableBadge-CW4jdcpl.js";import{u as K,P as O,F as Q,N as V,L as X}from"./PageHeader-QBzFo308.js";import{d as Y,T as r,b as Z}from"./types-BYamMo0R.js";import{C as _}from"./circle-check-big-U-4nHjTQ.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as t,S as d}from"./index-yKzNgrAF.js";import{e as P,b as A}from"./vendor-B2nVRih0.js";import{u as F,C as n,f as R,p as T}from"./ClickableBadge-BFhMLE2u.js";import{u as M,P as S,N as W,L as G}from"./PageHeader-FW-7_zU_.js";import{r as B,T as a,b as D}from"./types-CvWsUZ4q.js";function J(){const c=P(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:p,hasFilters:x}=F("gates"),{entries:m,loading:g,refreshing:i,newEntriesCount:y,hasMore:j,loadMore:f,loadNew:b,autoRefreshEnabled:k,setAutoRefresh:w,meta:o,isHighlighted:C}=M({type:"gate",limit:50,filters:h}),l=m.filter(e=>B(e)),N=A.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(n,{onClick:r=>{r.stopPropagation(),s("names",e.payload.gate)},children:e.payload.gate})},{key:"action",header:"Action",width:"150px",render:e=>e.payload.action?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.action}):t.jsx(a,{secondary:!0,children:"-"})},{key:"subject",header:"Subject",minWidth:"150px",render:e=>e.payload.subject?t.jsx(a,{mono:!0,truncate:!0,maxWidth:"200px",children:typeof e.payload.subject=="string"?e.payload.subject:JSON.stringify(e.payload.subject)}):t.jsx(a,{secondary:!0,children:"-"})},{key:"result",header:"Result",width:"100px",render:e=>{const r=e.payload.allowed?"allowed":"denied";return t.jsx(n,{onClick:v=>{v.stopPropagation(),s("results",r)},children:r.toUpperCase()})}},{key:"user",header:"User",width:"150px",render:e=>e.payload.userId?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.userId}):t.jsx(a,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:R(T(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&l.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(S,{title:"Gates",icon:d,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:k,onAutoRefreshToggle:w,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[t.jsx(W,{count:y,onClick:b,loading:i}),t.jsx(D,{columns:N,data:l,keyExtractor:e=>e.id,onRowClick:e=>c(`/gates/${e.id}`),rowClassName:e=>C(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(G,{hasMore:j,onClick:f,loading:i})]})]})}export{J as default};
1
+ import{j as t,S as d}from"./index-C8he4ZUV.js";import{e as P,b as A}from"./vendor-B2nVRih0.js";import{u as F,C as n,f as R,p as T}from"./ClickableBadge-CW4jdcpl.js";import{u as M,P as S,N as W,L as G}from"./PageHeader-QBzFo308.js";import{r as B,T as a,b as D}from"./types-BYamMo0R.js";function J(){const c=P(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:p,hasFilters:x}=F("gates"),{entries:m,loading:g,refreshing:i,newEntriesCount:y,hasMore:j,loadMore:f,loadNew:b,autoRefreshEnabled:k,setAutoRefresh:w,meta:o,isHighlighted:C}=M({type:"gate",limit:50,filters:h}),l=m.filter(e=>B(e)),N=A.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(n,{onClick:r=>{r.stopPropagation(),s("names",e.payload.gate)},children:e.payload.gate})},{key:"action",header:"Action",width:"150px",render:e=>e.payload.action?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.action}):t.jsx(a,{secondary:!0,children:"-"})},{key:"subject",header:"Subject",minWidth:"150px",render:e=>e.payload.subject?t.jsx(a,{mono:!0,truncate:!0,maxWidth:"200px",children:typeof e.payload.subject=="string"?e.payload.subject:JSON.stringify(e.payload.subject)}):t.jsx(a,{secondary:!0,children:"-"})},{key:"result",header:"Result",width:"100px",render:e=>{const r=e.payload.allowed?"allowed":"denied";return t.jsx(n,{onClick:v=>{v.stopPropagation(),s("results",r)},children:r.toUpperCase()})}},{key:"user",header:"User",width:"150px",render:e=>e.payload.userId?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.userId}):t.jsx(a,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:R(T(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&l.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(S,{title:"Gates",icon:d,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:k,onAutoRefreshToggle:w,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[t.jsx(W,{count:y,onClick:b,loading:i}),t.jsx(D,{columns:N,data:l,keyExtractor:e=>e.id,onRowClick:e=>c(`/gates/${e.id}`),rowClassName:e=>C(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(G,{hasMore:j,onClick:f,loading:i})]})]})}export{J as default};
@@ -1,4 +1,4 @@
1
- import{c as H,j as a}from"./index-yKzNgrAF.js";import{e as D,f as G,b as M}from"./vendor-B2nVRih0.js";import{u as q,C as m,f as Q,p as U}from"./ClickableBadge-BFhMLE2u.js";import{u as W,P as I,N as O,L as $}from"./PageHeader-FW-7_zU_.js";import{u as z,T as h,G as V,N as J,D as K,b as X}from"./types-CvWsUZ4q.js";/**
1
+ import{c as H,j as a}from"./index-C8he4ZUV.js";import{e as D,f as G,b as M}from"./vendor-B2nVRih0.js";import{u as q,C as m,f as Q,p as U}from"./ClickableBadge-CW4jdcpl.js";import{u as W,P as I,N as O,L as $}from"./PageHeader-QBzFo308.js";import{u as z,T as h,G as V,N as J,D as K,b as X}from"./types-BYamMo0R.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{j as t,d}from"./index-yKzNgrAF.js";import{e as T,b as R}from"./vendor-B2nVRih0.js";import{u as v,C as n,f as H,p as D}from"./ClickableBadge-BFhMLE2u.js";import{u as F,P as M,N as A,L as B}from"./PageHeader-FW-7_zU_.js";import{l as L,T as l,D as S,b as W}from"./types-CvWsUZ4q.js";function z(){const h=T(),{addFilter:s,clearAll:c,serverFilters:p,headerFilters:u,hasFilters:m}=v("http-client"),{entries:x,loading:g,refreshing:o,newEntriesCount:y,hasMore:f,loadMore:C,loadNew:j,autoRefreshEnabled:k,setAutoRefresh:w,meta:r,isHighlighted:N}=F({type:"http-client",limit:50,filters:p}),i=x.filter(e=>L(e)),E=R.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(n,{onClick:a=>{a.stopPropagation(),s("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>t.jsx(n,{onClick:a=>{a.stopPropagation();const P=e.payload.statusCode?String(e.payload.statusCode):"ERR";s("statuses",P)},children:e.payload.statusCode||"ERR"})},{key:"hostname",header:"Host",width:"180px",render:e=>e.payload.hostname?t.jsx(n,{onClick:a=>{a.stopPropagation(),s("hostnames",e.payload.hostname)},className:"font-mono",children:e.payload.hostname}):t.jsx(l,{secondary:!0,children:"-"})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(l,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.path||e.payload.url})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(S,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:H(D(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&i.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=m?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"HTTP Client",icon:d,iconColor:"text-cyan-600 dark:text-cyan-400",count:i.length,totalCount:r==null?void 0:r.total,refreshing:o,autoRefreshEnabled:k,onAutoRefreshToggle:w,filters:u,onClearAllFilters:c}),t.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:y,onClick:j,loading:o}),t.jsx(W,{columns:E,data:i,keyExtractor:e=>e.id,onRowClick:e=>h(`/http-client/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:f,onClick:C,loading:o})]})]})}export{z as default};
1
+ import{j as t,d}from"./index-C8he4ZUV.js";import{e as T,b as R}from"./vendor-B2nVRih0.js";import{u as v,C as n,f as H,p as D}from"./ClickableBadge-CW4jdcpl.js";import{u as F,P as M,N as A,L as B}from"./PageHeader-QBzFo308.js";import{l as L,T as l,D as S,b as W}from"./types-BYamMo0R.js";function z(){const h=T(),{addFilter:s,clearAll:c,serverFilters:p,headerFilters:u,hasFilters:m}=v("http-client"),{entries:x,loading:g,refreshing:o,newEntriesCount:y,hasMore:f,loadMore:C,loadNew:j,autoRefreshEnabled:k,setAutoRefresh:w,meta:r,isHighlighted:N}=F({type:"http-client",limit:50,filters:p}),i=x.filter(e=>L(e)),E=R.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(n,{onClick:a=>{a.stopPropagation(),s("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>t.jsx(n,{onClick:a=>{a.stopPropagation();const P=e.payload.statusCode?String(e.payload.statusCode):"ERR";s("statuses",P)},children:e.payload.statusCode||"ERR"})},{key:"hostname",header:"Host",width:"180px",render:e=>e.payload.hostname?t.jsx(n,{onClick:a=>{a.stopPropagation(),s("hostnames",e.payload.hostname)},className:"font-mono",children:e.payload.hostname}):t.jsx(l,{secondary:!0,children:"-"})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(l,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.path||e.payload.url})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(S,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:H(D(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&i.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=m?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"HTTP Client",icon:d,iconColor:"text-cyan-600 dark:text-cyan-400",count:i.length,totalCount:r==null?void 0:r.total,refreshing:o,autoRefreshEnabled:k,onAutoRefreshToggle:w,filters:u,onClearAllFilters:c}),t.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:y,onClick:j,loading:o}),t.jsx(W,{columns:E,data:i,keyExtractor:e=>e.id,onRowClick:e=>h(`/http-client/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:f,onClick:C,loading:o})]})]})}export{z as default};
@@ -1 +1 @@
1
- import{j as t,B as l}from"./index-yKzNgrAF.js";import{e as N,b as T}from"./vendor-B2nVRih0.js";import{u as E,C as o,f as v,p as A}from"./ClickableBadge-BFhMLE2u.js";import{u as D,P as B,N as F,L as M}from"./PageHeader-FW-7_zU_.js";import{g as P,T as i,D as R,b as J}from"./types-CvWsUZ4q.js";function I(){const n=N(),{clearAll:d,serverFilters:u,headerFilters:c,hasFilters:h}=E("jobs"),{entries:p,loading:m,refreshing:a,newEntriesCount:x,hasMore:y,loadMore:g,loadNew:f,autoRefreshEnabled:j,setAutoRefresh:b,meta:s,isHighlighted:w}=D({type:"job",limit:50,filters:u}),r=p.filter(e=>P(e)),k=T.useMemo(()=>[{key:"job",header:"Job",minWidth:"200px",render:e=>t.jsx(o,{listType:"jobs",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"queue",header:"Queue",width:"120px",render:e=>t.jsx(o,{listType:"jobs",filterType:"queues",children:e.payload.queue})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(o,{listType:"jobs",filterType:"statuses",children:e.payload.status})},{key:"attempts",header:"Attempts",width:"80px",align:"center",render:e=>t.jsx(i,{secondary:!0,children:e.payload.attempts})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(R,{ms:e.payload.duration}):t.jsx(i,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(i,{secondary:!0,className:"text-xs",children:v(A(e.createdAt),{addSuffix:!0})})}],[]);if(m&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const C=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:l,iconColor:"text-yellow-600 dark:text-yellow-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:j,onAutoRefreshToggle:b,filters:c,onClearAllFilters:d}),t.jsxs("div",{className:`${C} space-y-4 transition-all duration-200`,children:[t.jsx(F,{count:x,onClick:f,loading:a}),t.jsx(J,{columns:k,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/jobs/${e.id}`),rowClassName:e=>w(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:y,onClick:g,loading:a})]})]})}export{I as default};
1
+ import{j as t,B as l}from"./index-C8he4ZUV.js";import{e as N,b as T}from"./vendor-B2nVRih0.js";import{u as E,C as o,f as v,p as A}from"./ClickableBadge-CW4jdcpl.js";import{u as D,P as B,N as F,L as M}from"./PageHeader-QBzFo308.js";import{g as P,T as i,D as R,b as J}from"./types-BYamMo0R.js";function I(){const n=N(),{clearAll:d,serverFilters:u,headerFilters:c,hasFilters:h}=E("jobs"),{entries:p,loading:m,refreshing:a,newEntriesCount:x,hasMore:y,loadMore:g,loadNew:f,autoRefreshEnabled:j,setAutoRefresh:b,meta:s,isHighlighted:w}=D({type:"job",limit:50,filters:u}),r=p.filter(e=>P(e)),k=T.useMemo(()=>[{key:"job",header:"Job",minWidth:"200px",render:e=>t.jsx(o,{listType:"jobs",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"queue",header:"Queue",width:"120px",render:e=>t.jsx(o,{listType:"jobs",filterType:"queues",children:e.payload.queue})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(o,{listType:"jobs",filterType:"statuses",children:e.payload.status})},{key:"attempts",header:"Attempts",width:"80px",align:"center",render:e=>t.jsx(i,{secondary:!0,children:e.payload.attempts})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(R,{ms:e.payload.duration}):t.jsx(i,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(i,{secondary:!0,className:"text-xs",children:v(A(e.createdAt),{addSuffix:!0})})}],[]);if(m&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const C=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:l,iconColor:"text-yellow-600 dark:text-yellow-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:j,onAutoRefreshToggle:b,filters:c,onClearAllFilters:d}),t.jsxs("div",{className:`${C} space-y-4 transition-all duration-200`,children:[t.jsx(F,{count:x,onClick:f,loading:a}),t.jsx(J,{columns:k,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/jobs/${e.id}`),rowClassName:e=>w(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:y,onClick:g,loading:a})]})]})}export{I as default};
@@ -1 +1 @@
1
- import{j as t,F as l}from"./index-yKzNgrAF.js";import{e as k,b as v}from"./vendor-B2nVRih0.js";import{u as T,C as i,f as E,p as F}from"./ClickableBadge-BFhMLE2u.js";import{u as L,P as M,N as A,L as P}from"./PageHeader-FW-7_zU_.js";import{e as R,T as o,b as B}from"./types-CvWsUZ4q.js";function S(){const n=k(),{clearAll:d,serverFilters:c,headerFilters:g,hasFilters:x}=T("logs"),{entries:h,loading:m,refreshing:s,newEntriesCount:u,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:j,setAutoRefresh:C,meta:a,isHighlighted:N}=L({type:"log",limit:50,filters:c}),r=h.filter(e=>R(e)),w=v.useMemo(()=>[{key:"level",header:"Level",width:"100px",render:e=>t.jsx(i,{listType:"logs",filterType:"levels",children:e.payload.level})},{key:"message",header:"Message",minWidth:"300px",render:e=>t.jsx(o,{truncate:!0,maxWidth:"500px",children:e.payload.message.length>100?e.payload.message.substring(0,100)+"...":e.payload.message})},{key:"context",header:"Context",width:"150px",render:e=>e.payload.context?t.jsx(i,{listType:"logs",filterType:"contexts",className:"font-mono",children:e.payload.context}):t.jsx(o,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:E(F(e.createdAt),{addSuffix:!0})})}],[]);if(m&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Logs",icon:l,iconColor:"text-green-600 dark:text-green-400",count:r.length,totalCount:a==null?void 0:a.total,refreshing:s,autoRefreshEnabled:j,onAutoRefreshToggle:C,filters:g,onClearAllFilters:d}),t.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:u,onClick:y,loading:s}),t.jsx(B,{columns:w,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/logs/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(P,{hasMore:p,onClick:f,loading:s})]})]})}export{S as default};
1
+ import{j as t,F as l}from"./index-C8he4ZUV.js";import{e as k,b as v}from"./vendor-B2nVRih0.js";import{u as T,C as i,f as E,p as F}from"./ClickableBadge-CW4jdcpl.js";import{u as L,P as M,N as A,L as P}from"./PageHeader-QBzFo308.js";import{e as R,T as o,b as B}from"./types-BYamMo0R.js";function S(){const n=k(),{clearAll:d,serverFilters:c,headerFilters:g,hasFilters:x}=T("logs"),{entries:h,loading:m,refreshing:s,newEntriesCount:u,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:j,setAutoRefresh:C,meta:a,isHighlighted:N}=L({type:"log",limit:50,filters:c}),r=h.filter(e=>R(e)),w=v.useMemo(()=>[{key:"level",header:"Level",width:"100px",render:e=>t.jsx(i,{listType:"logs",filterType:"levels",children:e.payload.level})},{key:"message",header:"Message",minWidth:"300px",render:e=>t.jsx(o,{truncate:!0,maxWidth:"500px",children:e.payload.message.length>100?e.payload.message.substring(0,100)+"...":e.payload.message})},{key:"context",header:"Context",width:"150px",render:e=>e.payload.context?t.jsx(i,{listType:"logs",filterType:"contexts",className:"font-mono",children:e.payload.context}):t.jsx(o,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:E(F(e.createdAt),{addSuffix:!0})})}],[]);if(m&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Logs",icon:l,iconColor:"text-green-600 dark:text-green-400",count:r.length,totalCount:a==null?void 0:a.total,refreshing:s,autoRefreshEnabled:j,onAutoRefreshToggle:C,filters:g,onClearAllFilters:d}),t.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:u,onClick:y,loading:s}),t.jsx(B,{columns:w,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/logs/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(P,{hasMore:p,onClick:f,loading:s})]})]})}export{S as default};
@@ -1 +1 @@
1
- import{j as t,M as u}from"./index-yKzNgrAF.js";import{e as v,b as A}from"./vendor-B2nVRih0.js";import{u as D,C as F,f as P,p as R}from"./ClickableBadge-BFhMLE2u.js";import{u as L,P as S,N as W,L as $}from"./PageHeader-FW-7_zU_.js";import{j as B,T as l,D as H,a as q,b as I}from"./types-CvWsUZ4q.js";const z=["sent","failed","pending","queued","error"];function U(){const c=v(),{addFilter:o,clearAll:h,serverFilters:m,headerFilters:g,hasFilters:p}=D("mail"),{entries:x,loading:f,refreshing:s,newEntriesCount:y,hasMore:j,loadMore:b,loadNew:k,autoRefreshEnabled:C,setAutoRefresh:w,meta:r,isHighlighted:T}=L({type:"mail",limit:50,filters:m}),i=x.filter(e=>B(e)),d=e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},N=A.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(F,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(l,{truncate:!0,maxWidth:"350px",children:e.payload.subject.length>60?e.payload.subject.substring(0,60)+"...":e.payload.subject})},{key:"to",header:"To",width:"200px",render:e=>t.jsx(l,{mono:!0,secondary:!0,truncate:!0,maxWidth:"180px",children:d(e.payload.to)})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(H,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags||[]).filter(n=>!z.includes(n.toLowerCase()));return t.jsx(q,{tags:a,max:3,onTagClick:(n,M)=>{M.stopPropagation(),o("tags",n)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:P(R(e.createdAt),{addSuffix:!0})})}],[o,d]);if(f&&i.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=p?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(S,{title:"Mail",icon:u,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:C,onAutoRefreshToggle:w,filters:g,onClearAllFilters:h}),t.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[t.jsx(W,{count:y,onClick:k,loading:s}),t.jsx(I,{columns:N,data:i,keyExtractor:e=>e.id,onRowClick:e=>c(`/mail/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",emptyIcon:t.jsx(u,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx($,{hasMore:j,onClick:b,loading:s})]})]})}export{U as default};
1
+ import{j as t,M as u}from"./index-C8he4ZUV.js";import{e as v,b as A}from"./vendor-B2nVRih0.js";import{u as D,C as F,f as P,p as R}from"./ClickableBadge-CW4jdcpl.js";import{u as L,P as S,N as W,L as $}from"./PageHeader-QBzFo308.js";import{j as B,T as l,D as H,a as q,b as I}from"./types-BYamMo0R.js";const z=["sent","failed","pending","queued","error"];function U(){const c=v(),{addFilter:o,clearAll:h,serverFilters:m,headerFilters:g,hasFilters:p}=D("mail"),{entries:x,loading:f,refreshing:s,newEntriesCount:y,hasMore:j,loadMore:b,loadNew:k,autoRefreshEnabled:C,setAutoRefresh:w,meta:r,isHighlighted:T}=L({type:"mail",limit:50,filters:m}),i=x.filter(e=>B(e)),d=e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},N=A.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(F,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(l,{truncate:!0,maxWidth:"350px",children:e.payload.subject.length>60?e.payload.subject.substring(0,60)+"...":e.payload.subject})},{key:"to",header:"To",width:"200px",render:e=>t.jsx(l,{mono:!0,secondary:!0,truncate:!0,maxWidth:"180px",children:d(e.payload.to)})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(H,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags||[]).filter(n=>!z.includes(n.toLowerCase()));return t.jsx(q,{tags:a,max:3,onTagClick:(n,M)=>{M.stopPropagation(),o("tags",n)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:P(R(e.createdAt),{addSuffix:!0})})}],[o,d]);if(f&&i.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=p?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(S,{title:"Mail",icon:u,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:C,onAutoRefreshToggle:w,filters:g,onClearAllFilters:h}),t.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[t.jsx(W,{count:y,onClick:k,loading:s}),t.jsx(I,{columns:N,data:i,keyExtractor:e=>e.id,onRowClick:e=>c(`/mail/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",emptyIcon:t.jsx(u,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx($,{hasMore:j,onClick:b,loading:s})]})]})}export{U as default};
@@ -0,0 +1 @@
1
+ import{j as a,b as d}from"./index-C8he4ZUV.js";import{e as v,b as M}from"./vendor-B2nVRih0.js";import{u as P,C as l,f as A,p as D}from"./ClickableBadge-CW4jdcpl.js";import{u as F,P as R,N as T,L as B}from"./PageHeader-QBzFo308.js";import{n as L,T as o,D as H,b as S}from"./types-BYamMo0R.js";function G(){const c=v(),{addFilter:r,clearAll:p,serverFilters:u,headerFilters:h,hasFilters:x}=P("models"),{entries:m,loading:g,refreshing:s,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:C,autoRefreshEnabled:k,setAutoRefresh:w,meta:i,isHighlighted:N}=F({type:"model",limit:50,filters:u}),n=m.filter(e=>L(e)),b=M.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>a.jsx(l,{onClick:t=>{t.stopPropagation(),r("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>a.jsx(l,{onClick:t=>{t.stopPropagation(),r("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>e.payload.source?a.jsx(l,{onClick:t=>{t.stopPropagation(),r("sources",e.payload.source)},className:"font-mono text-xs",children:e.payload.source}):a.jsx(o,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(H,{ms:e.payload.duration||0})},{key:"records",header:"Records",width:"80px",align:"center",render:e=>e.payload.recordCount!==void 0?a.jsx(o,{children:e.payload.recordCount}):a.jsx(o,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(o,{secondary:!0,className:"text-xs",children:A(D(e.createdAt),{addSuffix:!0})})}],[r]);if(g&&n.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=x?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(R,{title:"Models",icon:d,iconColor:"text-purple-600 dark:text-purple-400",count:n.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:k,onAutoRefreshToggle:w,filters:h,onClearAllFilters:p}),a.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[a.jsx(T,{count:y,onClick:C,loading:s}),a.jsx(S,{columns:b,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/models/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:f,onClick:j,loading:s})]})]})}export{G as default};
@@ -1 +1 @@
1
- import{j as t,e as l}from"./index-yKzNgrAF.js";import{e as T,b as v}from"./vendor-B2nVRih0.js";import{u as P,C as d,f as D,p as F}from"./ClickableBadge-BFhMLE2u.js";import{u as R,P as A,N as M,L as B}from"./PageHeader-FW-7_zU_.js";import{o as W,T as a,D as L,b as H}from"./types-CvWsUZ4q.js";function z(){const c=T(),{addFilter:i,clearAll:p,serverFilters:u,headerFilters:h,hasFilters:x}=P("notifications"),{entries:m,loading:g,refreshing:r,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:C,autoRefreshEnabled:k,setAutoRefresh:N,meta:s,isHighlighted:w}=R({type:"notification",limit:50,filters:u}),o=m.filter(e=>W(e)),b=v.useMemo(()=>[{key:"type",header:"Type",width:"150px",render:e=>t.jsx(d,{onClick:n=>{n.stopPropagation(),i("types",e.payload.type)},children:e.payload.type})},{key:"recipient",header:"Recipient",minWidth:"200px",render:e=>t.jsx(a,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.recipient})},{key:"title",header:"Title",minWidth:"200px",render:e=>e.payload.title?t.jsx(a,{truncate:!0,maxWidth:"300px",children:e.payload.title}):t.jsx(a,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(d,{onClick:n=>{n.stopPropagation(),i("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(L,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[i]);if(g&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(A,{title:"Notifications",icon:l,iconColor:"text-indigo-600 dark:text-indigo-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:k,onAutoRefreshToggle:N,filters:h,onClearAllFilters:p}),t.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[t.jsx(M,{count:y,onClick:C,loading:r}),t.jsx(H,{columns:b,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/notifications/${e.id}`),rowClassName:e=>w(e.id)?"highlight-new":"",emptyMessage:"No notifications recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:f,onClick:j,loading:r})]})]})}export{z as default};
1
+ import{j as t,e as l}from"./index-C8he4ZUV.js";import{e as T,b as v}from"./vendor-B2nVRih0.js";import{u as P,C as d,f as D,p as F}from"./ClickableBadge-CW4jdcpl.js";import{u as R,P as A,N as M,L as B}from"./PageHeader-QBzFo308.js";import{o as W,T as a,D as L,b as H}from"./types-BYamMo0R.js";function z(){const c=T(),{addFilter:i,clearAll:p,serverFilters:u,headerFilters:h,hasFilters:x}=P("notifications"),{entries:m,loading:g,refreshing:r,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:C,autoRefreshEnabled:k,setAutoRefresh:N,meta:s,isHighlighted:w}=R({type:"notification",limit:50,filters:u}),o=m.filter(e=>W(e)),b=v.useMemo(()=>[{key:"type",header:"Type",width:"150px",render:e=>t.jsx(d,{onClick:n=>{n.stopPropagation(),i("types",e.payload.type)},children:e.payload.type})},{key:"recipient",header:"Recipient",minWidth:"200px",render:e=>t.jsx(a,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.recipient})},{key:"title",header:"Title",minWidth:"200px",render:e=>e.payload.title?t.jsx(a,{truncate:!0,maxWidth:"300px",children:e.payload.title}):t.jsx(a,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(d,{onClick:n=>{n.stopPropagation(),i("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(L,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[i]);if(g&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(A,{title:"Notifications",icon:l,iconColor:"text-indigo-600 dark:text-indigo-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:k,onAutoRefreshToggle:N,filters:h,onClearAllFilters:p}),t.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[t.jsx(M,{count:y,onClick:C,loading:r}),t.jsx(H,{columns:b,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/notifications/${e.id}`),rowClassName:e=>w(e.id)?"highlight-new":"",emptyMessage:"No notifications recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:f,onClick:j,loading:r})]})]})}export{z as default};
@@ -1 +1 @@
1
- import{b as s}from"./vendor-B2nVRih0.js";import{m as F,z as q,p as J,q as _,j as r,i as A,e as Q,s as V,X as Z}from"./index-yKzNgrAF.js";function $(t){return t==null?"":typeof t!="object"?String(t):Array.isArray(t)?"["+t.map($).join(",")+"]":"{"+Object.keys(t).sort().map(n=>`"${n}":${$(t[n])}`).join(",")+"}"}const z="nestlens-auto-refresh";function ee(){try{const t=localStorage.getItem(z);return t===null?!0:t==="true"}catch{return!0}}function re(t){try{localStorage.setItem(z,String(t))}catch{}}function se(t={}){const{type:a,limit:n=50,autoRefresh:c,autoRefreshInterval:f=5e3,filters:y}=t,m=$(y),[v,h]=s.useState([]),[j,N]=s.useState(!0),[S,g]=s.useState(!1),[I,b]=s.useState(null),[d,k]=s.useState(null),[R,o]=s.useState(0),[x,w]=s.useState(c??ee()),l=s.useRef(null),E=s.useRef(null),L=s.useRef(!0),B=s.useRef(m),C=s.useRef(new Map),[,G]=s.useState(0),H=1e4,O=s.useCallback(async()=>{L.current?N(!0):g(!0);try{b(null);const e=await F({type:a,limit:n,filters:y});h(e.data),k(e.meta),l.current=e.meta.newestSequence,o(0),L.current=!1,B.current=m}catch(e){const i=e instanceof Error?e:new Error("Failed to fetch entries");b(i),console.error("Failed to fetch entries:",e),q.error("Failed to load entries")}finally{N(!1),g(!1)}},[a,n,m]),K=s.useCallback(async()=>{if(!(!(d!=null&&d.oldestSequence)||!d.hasMore)){g(!0);try{const e=await F({type:a,limit:n,beforeSequence:d.oldestSequence,filters:y});h(i=>[...i,...e.data]),k(e.meta)}catch(e){console.error("Failed to load more entries:",e),q.error("Failed to load more entries")}finally{g(!1)}}},[a,n,d,m]),P=s.useCallback(async()=>{if(l.current){g(!0);try{const e=await F({type:a,limit:R||n,afterSequence:l.current,filters:y});if(e.data.length>0){const i=Date.now();e.data.forEach(u=>{C.current.set(u.id,i)}),h(u=>[...e.data,...u]),l.current=e.meta.newestSequence,o(0)}}catch(e){console.error("Failed to load new entries:",e),q.error("Failed to load new entries")}finally{g(!1)}}},[a,n,R,m]),U=s.useCallback(async()=>{g(!0);try{b(null);const e=await F({type:a,limit:n,filters:y});h(e.data),k(e.meta),l.current=e.meta.newestSequence,o(0)}catch(e){const i=e instanceof Error?e:new Error("Failed to refresh entries");b(i),console.error("Failed to refresh entries:",e),q.error("Failed to refresh entries")}finally{g(!1)}},[a,n,m]),D=s.useCallback(async()=>{if(!l.current){try{(await J(a)).data&&o(1)}catch{}return}try{const e=await _(l.current,a);o(e.data.count)}catch{}},[a]),W=s.useCallback(e=>{w(e),re(e)},[]),X=s.useCallback(e=>{h(i=>i.map(u=>u.id===e.id?e:u))},[]);s.useEffect(()=>{O()},[O]);const Y=s.useCallback(e=>{const i=C.current.get(e);return i?Date.now()-i<H:!1},[]),M=s.useCallback(()=>{const e=Date.now();let i=!1;C.current.forEach((u,p)=>{e-u>=H&&(C.current.delete(p),i=!0)}),i&&G(u=>u+1)},[]),T=s.useCallback(async()=>{if(l.current)try{const e=await _(l.current,a);if(e.data.count>0){const i=await F({type:a,limit:e.data.count,afterSequence:l.current,filters:y});if(i.data.length>0){const u=Date.now();i.data.forEach(p=>{C.current.set(p.id,u)}),h(p=>[...i.data,...p]),l.current=i.meta.newestSequence,k(p=>p?{...p,total:p.total+i.data.length,newestSequence:i.meta.newestSequence}:i.meta)}}}catch{}},[a,m]);return s.useEffect(()=>(x?E.current=setInterval(T,f):E.current=setInterval(D,f),()=>{E.current&&(clearInterval(E.current),E.current=null)}),[x,f,T,D]),s.useEffect(()=>{const e=setInterval(M,1e3);return()=>clearInterval(e)},[M]),{entries:v,loading:j,refreshing:S,error:I,meta:d,newEntriesCount:R,hasMore:(d==null?void 0:d.hasMore)??!1,loadMore:K,loadNew:P,refresh:U,setAutoRefresh:W,autoRefreshEnabled:x,updateEntry:X,isHighlighted:Y}}function ne({count:t,onClick:a,loading:n}){return t===0?null:r.jsxs("button",{onClick:a,disabled:n,className:"w-full py-3 px-4 bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 font-medium rounded-lg hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?r.jsx(A,{className:"h-4 w-4 animate-spin"}):r.jsx(Q,{className:"h-4 w-4"}),r.jsxs("span",{children:["Load ",t," new ",t===1?"entry":"entries"]})]})}function ie({hasMore:t,onClick:a,loading:n}){return t?r.jsxs("button",{onClick:a,disabled:n,className:"w-full py-3 px-4 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 font-medium rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?r.jsx(A,{className:"h-4 w-4 animate-spin"}):r.jsx(V,{className:"h-4 w-4"}),r.jsx("span",{children:"Load older entries"})]}):null}function ce({title:t,icon:a,iconColor:n="text-primary-600 dark:text-primary-400",count:c,totalCount:f,subtitle:y,loading:m,refreshing:v,onRefresh:h,autoRefreshEnabled:j,onAutoRefreshToggle:N,filters:S=[],onClearAllFilters:g,actions:I,filterControls:b}){const d=S.length>0,k=c??f,R=S.reduce((o,x)=>(o[x.category]||(o[x.category]=[]),o[x.category].push(x),o),{});return r.jsxs("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:[r.jsxs("div",{className:"h-16 px-4 lg:px-6 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"hidden sm:flex p-2 rounded-lg bg-gray-100 dark:bg-gray-800",children:r.jsx(a,{className:`h-5 w-5 ${n}`})}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t}),k!==void 0&&r.jsxs("span",{role:"status","aria-live":"polite",className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300",children:[k.toLocaleString(),f!==void 0&&c!==void 0&&c!==f&&r.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",f.toLocaleString()]})]}),y&&r.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:y})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[I,N&&r.jsxs("button",{onClick:()=>N(!j),className:`hidden sm:flex items-center space-x-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${j?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,title:j?"Auto-refresh enabled":"Auto-refresh disabled",children:[r.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${j?"bg-green-500 animate-pulse":"bg-gray-400"}`}),r.jsx("span",{children:"Auto Refresh"})]}),h&&r.jsx("button",{onClick:h,disabled:m||v,"aria-busy":v,"aria-label":v?"Refreshing...":"Refresh",className:"p-2 rounded-lg text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Refresh",children:r.jsx(A,{className:`h-4 w-4 ${v?"animate-spin":""}`})})]})]}),b&&r.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:b}),d&&r.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:r.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[r.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider mr-1",children:"Filters:"}),Object.entries(R).map(([o,x])=>r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:[o,":"]}),x.map((w,l)=>r.jsxs("button",{onClick:w.onRemove,"aria-label":`Remove ${o} filter: ${w.value}`,className:"inline-flex items-center space-x-1 px-2 py-0.5 rounded-md text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 hover:bg-primary-200 dark:hover:bg-primary-900/50 transition-colors group uppercase",children:[r.jsx("span",{children:w.value}),r.jsx(Z,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${w.category}-${w.value}-${l}`))]},o)),g&&S.length>1&&r.jsx("button",{onClick:g,className:"ml-2 text-xs text-gray-500 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",children:"Clear all"})]})})]})}function oe({tabs:t,activeTab:a,onChange:n}){return r.jsx("div",{className:"flex items-center space-x-1",children:t.map(c=>r.jsxs("button",{onClick:()=>n(c.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${a===c.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/50 dark:text-primary-300":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[c.label,c.count!==void 0&&r.jsx("span",{className:`ml-1.5 text-xs ${a===c.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:c.count})]},c.id))})}function le({label:t,enabled:a,onChange:n,icon:c}){return r.jsxs("button",{onClick:()=>n(!a),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${a?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,children:[c&&r.jsx(c,{className:"h-4 w-4"}),r.jsx("span",{children:t})]})}export{oe as F,ie as L,ne as N,ce as P,le as T,se as u};
1
+ import{b as s}from"./vendor-B2nVRih0.js";import{m as F,z as q,p as J,q as _,j as r,i as A,e as Q,s as V,X as Z}from"./index-C8he4ZUV.js";function $(t){return t==null?"":typeof t!="object"?String(t):Array.isArray(t)?"["+t.map($).join(",")+"]":"{"+Object.keys(t).sort().map(n=>`"${n}":${$(t[n])}`).join(",")+"}"}const z="nestlens-auto-refresh";function ee(){try{const t=localStorage.getItem(z);return t===null?!0:t==="true"}catch{return!0}}function re(t){try{localStorage.setItem(z,String(t))}catch{}}function se(t={}){const{type:a,limit:n=50,autoRefresh:c,autoRefreshInterval:f=5e3,filters:y}=t,m=$(y),[v,h]=s.useState([]),[j,N]=s.useState(!0),[S,g]=s.useState(!1),[I,b]=s.useState(null),[d,k]=s.useState(null),[R,o]=s.useState(0),[x,w]=s.useState(c??ee()),l=s.useRef(null),E=s.useRef(null),L=s.useRef(!0),B=s.useRef(m),C=s.useRef(new Map),[,G]=s.useState(0),H=1e4,O=s.useCallback(async()=>{L.current?N(!0):g(!0);try{b(null);const e=await F({type:a,limit:n,filters:y});h(e.data),k(e.meta),l.current=e.meta.newestSequence,o(0),L.current=!1,B.current=m}catch(e){const i=e instanceof Error?e:new Error("Failed to fetch entries");b(i),console.error("Failed to fetch entries:",e),q.error("Failed to load entries")}finally{N(!1),g(!1)}},[a,n,m]),K=s.useCallback(async()=>{if(!(!(d!=null&&d.oldestSequence)||!d.hasMore)){g(!0);try{const e=await F({type:a,limit:n,beforeSequence:d.oldestSequence,filters:y});h(i=>[...i,...e.data]),k(e.meta)}catch(e){console.error("Failed to load more entries:",e),q.error("Failed to load more entries")}finally{g(!1)}}},[a,n,d,m]),P=s.useCallback(async()=>{if(l.current){g(!0);try{const e=await F({type:a,limit:R||n,afterSequence:l.current,filters:y});if(e.data.length>0){const i=Date.now();e.data.forEach(u=>{C.current.set(u.id,i)}),h(u=>[...e.data,...u]),l.current=e.meta.newestSequence,o(0)}}catch(e){console.error("Failed to load new entries:",e),q.error("Failed to load new entries")}finally{g(!1)}}},[a,n,R,m]),U=s.useCallback(async()=>{g(!0);try{b(null);const e=await F({type:a,limit:n,filters:y});h(e.data),k(e.meta),l.current=e.meta.newestSequence,o(0)}catch(e){const i=e instanceof Error?e:new Error("Failed to refresh entries");b(i),console.error("Failed to refresh entries:",e),q.error("Failed to refresh entries")}finally{g(!1)}},[a,n,m]),D=s.useCallback(async()=>{if(!l.current){try{(await J(a)).data&&o(1)}catch{}return}try{const e=await _(l.current,a);o(e.data.count)}catch{}},[a]),W=s.useCallback(e=>{w(e),re(e)},[]),X=s.useCallback(e=>{h(i=>i.map(u=>u.id===e.id?e:u))},[]);s.useEffect(()=>{O()},[O]);const Y=s.useCallback(e=>{const i=C.current.get(e);return i?Date.now()-i<H:!1},[]),M=s.useCallback(()=>{const e=Date.now();let i=!1;C.current.forEach((u,p)=>{e-u>=H&&(C.current.delete(p),i=!0)}),i&&G(u=>u+1)},[]),T=s.useCallback(async()=>{if(l.current)try{const e=await _(l.current,a);if(e.data.count>0){const i=await F({type:a,limit:e.data.count,afterSequence:l.current,filters:y});if(i.data.length>0){const u=Date.now();i.data.forEach(p=>{C.current.set(p.id,u)}),h(p=>[...i.data,...p]),l.current=i.meta.newestSequence,k(p=>p?{...p,total:p.total+i.data.length,newestSequence:i.meta.newestSequence}:i.meta)}}}catch{}},[a,m]);return s.useEffect(()=>(x?E.current=setInterval(T,f):E.current=setInterval(D,f),()=>{E.current&&(clearInterval(E.current),E.current=null)}),[x,f,T,D]),s.useEffect(()=>{const e=setInterval(M,1e3);return()=>clearInterval(e)},[M]),{entries:v,loading:j,refreshing:S,error:I,meta:d,newEntriesCount:R,hasMore:(d==null?void 0:d.hasMore)??!1,loadMore:K,loadNew:P,refresh:U,setAutoRefresh:W,autoRefreshEnabled:x,updateEntry:X,isHighlighted:Y}}function ne({count:t,onClick:a,loading:n}){return t===0?null:r.jsxs("button",{onClick:a,disabled:n,className:"w-full py-3 px-4 bg-primary-50 dark:bg-primary-900/20 text-primary-600 dark:text-primary-400 font-medium rounded-lg hover:bg-primary-100 dark:hover:bg-primary-900/30 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?r.jsx(A,{className:"h-4 w-4 animate-spin"}):r.jsx(Q,{className:"h-4 w-4"}),r.jsxs("span",{children:["Load ",t," new ",t===1?"entry":"entries"]})]})}function ie({hasMore:t,onClick:a,loading:n}){return t?r.jsxs("button",{onClick:a,disabled:n,className:"w-full py-3 px-4 bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 font-medium rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors flex items-center justify-center space-x-2 disabled:opacity-50",children:[n?r.jsx(A,{className:"h-4 w-4 animate-spin"}):r.jsx(V,{className:"h-4 w-4"}),r.jsx("span",{children:"Load older entries"})]}):null}function ce({title:t,icon:a,iconColor:n="text-primary-600 dark:text-primary-400",count:c,totalCount:f,subtitle:y,loading:m,refreshing:v,onRefresh:h,autoRefreshEnabled:j,onAutoRefreshToggle:N,filters:S=[],onClearAllFilters:g,actions:I,filterControls:b}){const d=S.length>0,k=c??f,R=S.reduce((o,x)=>(o[x.category]||(o[x.category]=[]),o[x.category].push(x),o),{});return r.jsxs("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:[r.jsxs("div",{className:"h-16 px-4 lg:px-6 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"hidden sm:flex p-2 rounded-lg bg-gray-100 dark:bg-gray-800",children:r.jsx(a,{className:`h-5 w-5 ${n}`})}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("h1",{className:"text-xl font-bold text-gray-900 dark:text-white",children:t}),k!==void 0&&r.jsxs("span",{role:"status","aria-live":"polite",className:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-300",children:[k.toLocaleString(),f!==void 0&&c!==void 0&&c!==f&&r.jsxs("span",{className:"text-gray-400 dark:text-gray-500 ml-1",children:["/ ",f.toLocaleString()]})]}),y&&r.jsx("span",{className:"hidden md:inline text-sm text-gray-500 dark:text-gray-400",children:y})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[I,N&&r.jsxs("button",{onClick:()=>N(!j),className:`hidden sm:flex items-center space-x-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors whitespace-nowrap ${j?"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,title:j?"Auto-refresh enabled":"Auto-refresh disabled",children:[r.jsx("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${j?"bg-green-500 animate-pulse":"bg-gray-400"}`}),r.jsx("span",{children:"Auto Refresh"})]}),h&&r.jsx("button",{onClick:h,disabled:m||v,"aria-busy":v,"aria-label":v?"Refreshing...":"Refresh",className:"p-2 rounded-lg text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800 hover:text-gray-700 dark:hover:text-gray-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",title:"Refresh",children:r.jsx(A,{className:`h-4 w-4 ${v?"animate-spin":""}`})})]})]}),b&&r.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:b}),d&&r.jsx("div",{className:"px-4 lg:px-6 py-2 border-t border-gray-100 dark:border-gray-800 bg-gray-50/50 dark:bg-gray-900/50",children:r.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[r.jsx("span",{className:"text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider mr-1",children:"Filters:"}),Object.entries(R).map(([o,x])=>r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsxs("span",{className:"text-xs text-gray-400 dark:text-gray-500",children:[o,":"]}),x.map((w,l)=>r.jsxs("button",{onClick:w.onRemove,"aria-label":`Remove ${o} filter: ${w.value}`,className:"inline-flex items-center space-x-1 px-2 py-0.5 rounded-md text-xs font-medium bg-primary-100 dark:bg-primary-900/30 text-primary-700 dark:text-primary-300 hover:bg-primary-200 dark:hover:bg-primary-900/50 transition-colors group uppercase",children:[r.jsx("span",{children:w.value}),r.jsx(Z,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},`${w.category}-${w.value}-${l}`))]},o)),g&&S.length>1&&r.jsx("button",{onClick:g,className:"ml-2 text-xs text-gray-500 dark:text-gray-400 hover:text-red-600 dark:hover:text-red-400 transition-colors",children:"Clear all"})]})})]})}function oe({tabs:t,activeTab:a,onChange:n}){return r.jsx("div",{className:"flex items-center space-x-1",children:t.map(c=>r.jsxs("button",{onClick:()=>n(c.id),className:`px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${a===c.id?"bg-primary-100 text-primary-700 dark:bg-primary-900/50 dark:text-primary-300":"text-gray-600 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-800"}`,children:[c.label,c.count!==void 0&&r.jsx("span",{className:`ml-1.5 text-xs ${a===c.id?"text-primary-600 dark:text-primary-400":"text-gray-400 dark:text-gray-500"}`,children:c.count})]},c.id))})}function le({label:t,enabled:a,onChange:n,icon:c}){return r.jsxs("button",{onClick:()=>n(!a),className:`flex items-center space-x-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors ${a?"bg-primary-100 text-primary-700 dark:bg-primary-900/30 dark:text-primary-300":"bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700"}`,children:[c&&r.jsx(c,{className:"h-4 w-4"}),r.jsx("span",{children:t})]})}export{oe as F,ie as L,ne as N,ce as P,le as T,se as u};
@@ -1 +1 @@
1
- import{j as s,D as n}from"./index-yKzNgrAF.js";import{e as P,b as d}from"./vendor-B2nVRih0.js";import{u as A,C as M,f as R,p as Q}from"./ClickableBadge-BFhMLE2u.js";import{u as B,P as O,T as W,N as H,L as Z}from"./PageHeader-FW-7_zU_.js";import{c as $,T as u,D as I,a as z,b as G}from"./types-CvWsUZ4q.js";import{Z as c}from"./zap-DOqgN4r4.js";function _(){const h=P(),[i,p]=d.useState(!1),{addFilter:l,clearAll:x,serverFilters:g,headerFilters:m,hasFilters:y}=A("queries"),f={...g,slow:i?!0:void 0},{entries:w,loading:j,refreshing:a,newEntriesCount:C,hasMore:k,loadMore:b,loadNew:T,autoRefreshEnabled:N,setAutoRefresh:v,meta:t,isHighlighted:E}=B({type:"query",limit:50,filters:f}),r=w.filter(e=>$(e)),q=d.useMemo(()=>[{key:"source",header:"Source",width:"120px",render:e=>s.jsx(M,{listType:"queries",filterType:"sources",children:e.payload.source||"unknown"})},{key:"query",header:"Query",minWidth:"300px",render:e=>s.jsxs("div",{className:"flex items-start space-x-2",children:[e.payload.slow&&s.jsx(c,{className:"h-4 w-4 text-yellow-500 flex-shrink-0 mt-0.5"}),s.jsx(u,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.query.length>100?e.payload.query.substring(0,100)+"...":e.payload.query})]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>s.jsx(I,{ms:e.payload.duration||0,slowThreshold:e.payload.slow?0:1e3})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const D=(e.payload.source||"unknown").toLowerCase(),F=(e.tags||[]).filter(o=>o.toLowerCase()!==D);return s.jsx(z,{tags:F,max:3,onTagClick:(o,L)=>{L.stopPropagation(),l("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>s.jsx(u,{secondary:!0,className:"text-xs",children:R(Q(e.createdAt),{addSuffix:!0})})}],[l]);if(j&&r.length===0)return s.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const S=y?"pt-28":"pt-16";return s.jsxs("div",{children:[s.jsx(O,{title:"Queries",icon:n,iconColor:"text-purple-600 dark:text-purple-400",count:r.length,totalCount:t==null?void 0:t.total,refreshing:a,autoRefreshEnabled:N,onAutoRefreshToggle:v,filters:m,onClearAllFilters:x,actions:s.jsx(W,{label:"Slow Only",enabled:i,onChange:p,icon:c})}),s.jsxs("div",{className:`${S} space-y-4 transition-all duration-200`,children:[s.jsx(H,{count:C,onClick:T,loading:a}),s.jsx(G,{columns:q,data:r,keyExtractor:e=>e.id,onRowClick:e=>h(`/queries/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No queries recorded yet",emptyIcon:s.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),s.jsx(Z,{hasMore:k,onClick:b,loading:a})]})]})}export{_ as default};
1
+ import{j as s,D as n}from"./index-C8he4ZUV.js";import{e as P,b as d}from"./vendor-B2nVRih0.js";import{u as A,C as M,f as R,p as Q}from"./ClickableBadge-CW4jdcpl.js";import{u as B,P as O,T as W,N as H,L as Z}from"./PageHeader-QBzFo308.js";import{c as $,T as u,D as I,a as z,b as G}from"./types-BYamMo0R.js";import{Z as c}from"./zap-BxD9CCmf.js";function _(){const h=P(),[i,p]=d.useState(!1),{addFilter:l,clearAll:x,serverFilters:g,headerFilters:m,hasFilters:y}=A("queries"),f={...g,slow:i?!0:void 0},{entries:w,loading:j,refreshing:a,newEntriesCount:C,hasMore:k,loadMore:b,loadNew:T,autoRefreshEnabled:N,setAutoRefresh:v,meta:t,isHighlighted:E}=B({type:"query",limit:50,filters:f}),r=w.filter(e=>$(e)),q=d.useMemo(()=>[{key:"source",header:"Source",width:"120px",render:e=>s.jsx(M,{listType:"queries",filterType:"sources",children:e.payload.source||"unknown"})},{key:"query",header:"Query",minWidth:"300px",render:e=>s.jsxs("div",{className:"flex items-start space-x-2",children:[e.payload.slow&&s.jsx(c,{className:"h-4 w-4 text-yellow-500 flex-shrink-0 mt-0.5"}),s.jsx(u,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.query.length>100?e.payload.query.substring(0,100)+"...":e.payload.query})]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>s.jsx(I,{ms:e.payload.duration||0,slowThreshold:e.payload.slow?0:1e3})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const D=(e.payload.source||"unknown").toLowerCase(),F=(e.tags||[]).filter(o=>o.toLowerCase()!==D);return s.jsx(z,{tags:F,max:3,onTagClick:(o,L)=>{L.stopPropagation(),l("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>s.jsx(u,{secondary:!0,className:"text-xs",children:R(Q(e.createdAt),{addSuffix:!0})})}],[l]);if(j&&r.length===0)return s.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:s.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const S=y?"pt-28":"pt-16";return s.jsxs("div",{children:[s.jsx(O,{title:"Queries",icon:n,iconColor:"text-purple-600 dark:text-purple-400",count:r.length,totalCount:t==null?void 0:t.total,refreshing:a,autoRefreshEnabled:N,onAutoRefreshToggle:v,filters:m,onClearAllFilters:x,actions:s.jsx(W,{label:"Slow Only",enabled:i,onChange:p,icon:c})}),s.jsxs("div",{className:`${S} space-y-4 transition-all duration-200`,children:[s.jsx(H,{count:C,onClick:T,loading:a}),s.jsx(G,{columns:q,data:r,keyExtractor:e=>e.id,onRowClick:e=>h(`/queries/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No queries recorded yet",emptyIcon:s.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),s.jsx(Z,{hasMore:k,onClick:b,loading:a})]})]})}export{_ as default};
@@ -1 +1 @@
1
- import{j as a,D as d}from"./index-yKzNgrAF.js";import{e as E,b as R}from"./vendor-B2nVRih0.js";import{u as D,C as l,f as v,p as F}from"./ClickableBadge-BFhMLE2u.js";import{u as T,P as A,N as M,L as B}from"./PageHeader-FW-7_zU_.js";import{m as L,T as n,D as H,b as S}from"./types-CvWsUZ4q.js";function q(){const c=E(),{addFilter:t,clearAll:m,serverFilters:u,headerFilters:h,hasFilters:p}=D("redis"),{entries:x,loading:g,refreshing:s,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:k,autoRefreshEnabled:C,setAutoRefresh:w,meta:r,isHighlighted:N}=T({type:"redis",limit:50,filters:u}),o=x.filter(e=>L(e)),b=R.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("commands",e.payload.command)},className:"font-mono",children:e.payload.command})},{key:"keyPattern",header:"Key Pattern",minWidth:"200px",render:e=>e.payload.keyPattern?a.jsx(n,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.keyPattern}):a.jsx(n,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(H,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(n,{secondary:!0,className:"text-xs",children:v(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const P=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(A,{title:"Redis",icon:d,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:C,onAutoRefreshToggle:w,filters:h,onClearAllFilters:m}),a.jsxs("div",{className:`${P} space-y-4 transition-all duration-200`,children:[a.jsx(M,{count:y,onClick:k,loading:s}),a.jsx(S,{columns:b,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/redis/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:f,onClick:j,loading:s})]})]})}export{q as default};
1
+ import{j as a,D as d}from"./index-C8he4ZUV.js";import{e as E,b as R}from"./vendor-B2nVRih0.js";import{u as D,C as l,f as v,p as F}from"./ClickableBadge-CW4jdcpl.js";import{u as T,P as A,N as M,L as B}from"./PageHeader-QBzFo308.js";import{m as L,T as n,D as H,b as S}from"./types-BYamMo0R.js";function q(){const c=E(),{addFilter:t,clearAll:m,serverFilters:u,headerFilters:h,hasFilters:p}=D("redis"),{entries:x,loading:g,refreshing:s,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:k,autoRefreshEnabled:C,setAutoRefresh:w,meta:r,isHighlighted:N}=T({type:"redis",limit:50,filters:u}),o=x.filter(e=>L(e)),b=R.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("commands",e.payload.command)},className:"font-mono",children:e.payload.command})},{key:"keyPattern",header:"Key Pattern",minWidth:"200px",render:e=>e.payload.keyPattern?a.jsx(n,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.keyPattern}):a.jsx(n,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(H,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(n,{secondary:!0,className:"text-xs",children:v(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const P=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(A,{title:"Redis",icon:d,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:C,onAutoRefreshToggle:w,filters:h,onClearAllFilters:m}),a.jsxs("div",{className:`${P} space-y-4 transition-all duration-200`,children:[a.jsx(M,{count:y,onClick:k,loading:s}),a.jsx(S,{columns:b,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/redis/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:f,onClick:j,loading:s})]})]})}export{q as default};
@@ -1 +1 @@
1
- import{j as t,A as N,d as P}from"./index-yKzNgrAF.js";import{e as A,b as q}from"./vendor-B2nVRih0.js";import{u as R,C as l,f as D,p as v}from"./ClickableBadge-BFhMLE2u.js";import{u as L,P as M,N as F,L as H}from"./PageHeader-FW-7_zU_.js";import{i as G,T as d,D as S,a as B,b as O}from"./types-CvWsUZ4q.js";const U=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","GRAPHQL"],W=a=>{var s;return(s=a.payload.path)!=null&&s.toLowerCase().includes("/graphql")?"GRAPHQL":a.payload.method.toUpperCase()};function K(){const a=A(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:c,hasFilters:p}=R("requests"),{entries:g,loading:x,refreshing:r,newEntriesCount:m,hasMore:y,loadMore:f,loadNew:C,autoRefreshEnabled:T,setAutoRefresh:j,meta:i,isHighlighted:E}=L({type:"request",limit:50,filters:h}),o=g.filter(e=>G(e)),k=q.useMemo(()=>[{key:"method",header:"Method",width:"100px",render:e=>t.jsx(l,{listType:"requests",filterType:"methods",children:W(e)})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.path})},{key:"status",header:"Status",width:"80px",align:"center",render:e=>t.jsx(l,{listType:"requests",filterType:"statuses",children:e.payload.statusCode||0})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(S,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>t.jsx(B,{tags:(e.tags||[]).filter(n=>!U.includes(n.toUpperCase())),max:3,onTagClick:(n,b)=>{b.stopPropagation(),s("tags",n)}})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:D(v(e.createdAt),{addSuffix:!0})})}],[s]);if(x&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const w=p?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Requests",icon:N,iconColor:"text-blue-600 dark:text-blue-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:r,autoRefreshEnabled:T,onAutoRefreshToggle:j,filters:c,onClearAllFilters:u}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(F,{count:m,onClick:C,loading:r}),t.jsx(O,{columns:k,data:o,keyExtractor:e=>e.id,onRowClick:e=>a(`/requests/${e.id}`),emptyMessage:"No requests recorded yet",emptyIcon:t.jsx(P,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"}),rowClassName:e=>E(e.id)?"highlight-new":""}),t.jsx(H,{hasMore:y,onClick:f,loading:r})]})]})}export{K as default};
1
+ import{j as t,A as N,d as P}from"./index-C8he4ZUV.js";import{e as A,b as q}from"./vendor-B2nVRih0.js";import{u as R,C as l,f as D,p as v}from"./ClickableBadge-CW4jdcpl.js";import{u as L,P as M,N as F,L as H}from"./PageHeader-QBzFo308.js";import{i as G,T as d,D as S,a as B,b as O}from"./types-BYamMo0R.js";const U=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","GRAPHQL"],W=a=>{var s;return(s=a.payload.path)!=null&&s.toLowerCase().includes("/graphql")?"GRAPHQL":a.payload.method.toUpperCase()};function K(){const a=A(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:c,hasFilters:p}=R("requests"),{entries:g,loading:x,refreshing:r,newEntriesCount:m,hasMore:y,loadMore:f,loadNew:C,autoRefreshEnabled:T,setAutoRefresh:j,meta:i,isHighlighted:E}=L({type:"request",limit:50,filters:h}),o=g.filter(e=>G(e)),k=q.useMemo(()=>[{key:"method",header:"Method",width:"100px",render:e=>t.jsx(l,{listType:"requests",filterType:"methods",children:W(e)})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.path})},{key:"status",header:"Status",width:"80px",align:"center",render:e=>t.jsx(l,{listType:"requests",filterType:"statuses",children:e.payload.statusCode||0})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(S,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>t.jsx(B,{tags:(e.tags||[]).filter(n=>!U.includes(n.toUpperCase())),max:3,onTagClick:(n,b)=>{b.stopPropagation(),s("tags",n)}})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:D(v(e.createdAt),{addSuffix:!0})})}],[s]);if(x&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const w=p?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Requests",icon:N,iconColor:"text-blue-600 dark:text-blue-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:r,autoRefreshEnabled:T,onAutoRefreshToggle:j,filters:c,onClearAllFilters:u}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(F,{count:m,onClick:C,loading:r}),t.jsx(O,{columns:k,data:o,keyExtractor:e=>e.id,onRowClick:e=>a(`/requests/${e.id}`),emptyMessage:"No requests recorded yet",emptyIcon:t.jsx(P,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"}),rowClassName:e=>E(e.id)?"highlight-new":""}),t.jsx(H,{hasMore:y,onClick:f,loading:r})]})]})}export{K as default};
@@ -1 +1 @@
1
- import{j as a,C as c}from"./index-yKzNgrAF.js";import{e as M,b as P}from"./vendor-B2nVRih0.js";import{f as u,c as A}from"./format-BFldcnCk.js";import{u as L,C as h,f as R,p as H}from"./ClickableBadge-BFhMLE2u.js";import{u as B,P as W,N as $,L as I}from"./PageHeader-FW-7_zU_.js";import{k as q,T as i,D as z,a as G,b as J}from"./types-CvWsUZ4q.js";const K=["started","completed","failed"];function m(t){try{return A.toString(t)}catch{return null}}function Z(){const t=M(),{addFilter:n,clearAll:p,serverFilters:x,headerFilters:g,hasFilters:f}=L("schedule"),{entries:y,loading:k,refreshing:s,newEntriesCount:j,hasMore:C,loadMore:N,loadNew:T,autoRefreshEnabled:v,setAutoRefresh:w,meta:r,isHighlighted:b}=B({type:"schedule",limit:50,filters:x}),l=y.filter(e=>q(e)),d=e=>e.payload.cron?e.payload.cron:e.payload.interval?`${e.payload.interval}ms`:"-",E=P.useMemo(()=>[{key:"task",header:"Task",minWidth:"200px",render:e=>a.jsx(h,{listType:"schedule",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"schedule",header:"Schedule",minWidth:"150px",render:e=>a.jsxs("div",{children:[a.jsx(i,{mono:!0,children:d(e)}),e.payload.cron&&m(e.payload.cron)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:m(e.payload.cron)}),e.payload.interval&&u(e.payload.interval)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:u(e.payload.interval)})]})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(h,{listType:"schedule",filterType:"statuses",children:e.payload.status})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?a.jsx(z,{ms:e.payload.duration}):a.jsx(i,{secondary:!0,children:"—"})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const D=(e.tags||[]).filter(o=>!K.includes(o.toLowerCase()));return a.jsx(G,{tags:D,max:3,onTagClick:(o,F)=>{F.stopPropagation(),n("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:R(H(e.createdAt),{addSuffix:!0})})}],[n,d]);if(k&&l.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const S=f?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(W,{title:"Schedule",icon:c,iconColor:"text-gray-600 dark:text-gray-400",count:l.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:v,onAutoRefreshToggle:w,filters:g,onClearAllFilters:p}),a.jsxs("div",{className:`${S} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:j,onClick:T,loading:s}),a.jsx(J,{columns:E,data:l,keyExtractor:e=>e.id,onRowClick:e=>t(`/schedule/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No scheduled tasks recorded yet",emptyIcon:a.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:C,onClick:N,loading:s})]})]})}export{Z as default};
1
+ import{j as a,C as c}from"./index-C8he4ZUV.js";import{e as M,b as P}from"./vendor-B2nVRih0.js";import{f as u,c as A}from"./format-BFldcnCk.js";import{u as L,C as h,f as R,p as H}from"./ClickableBadge-CW4jdcpl.js";import{u as B,P as W,N as $,L as I}from"./PageHeader-QBzFo308.js";import{k as q,T as i,D as z,a as G,b as J}from"./types-BYamMo0R.js";const K=["started","completed","failed"];function m(t){try{return A.toString(t)}catch{return null}}function Z(){const t=M(),{addFilter:n,clearAll:p,serverFilters:x,headerFilters:g,hasFilters:f}=L("schedule"),{entries:y,loading:k,refreshing:s,newEntriesCount:j,hasMore:C,loadMore:N,loadNew:T,autoRefreshEnabled:v,setAutoRefresh:w,meta:r,isHighlighted:b}=B({type:"schedule",limit:50,filters:x}),l=y.filter(e=>q(e)),d=e=>e.payload.cron?e.payload.cron:e.payload.interval?`${e.payload.interval}ms`:"-",E=P.useMemo(()=>[{key:"task",header:"Task",minWidth:"200px",render:e=>a.jsx(h,{listType:"schedule",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"schedule",header:"Schedule",minWidth:"150px",render:e=>a.jsxs("div",{children:[a.jsx(i,{mono:!0,children:d(e)}),e.payload.cron&&m(e.payload.cron)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:m(e.payload.cron)}),e.payload.interval&&u(e.payload.interval)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:u(e.payload.interval)})]})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(h,{listType:"schedule",filterType:"statuses",children:e.payload.status})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?a.jsx(z,{ms:e.payload.duration}):a.jsx(i,{secondary:!0,children:"—"})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const D=(e.tags||[]).filter(o=>!K.includes(o.toLowerCase()));return a.jsx(G,{tags:D,max:3,onTagClick:(o,F)=>{F.stopPropagation(),n("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:R(H(e.createdAt),{addSuffix:!0})})}],[n,d]);if(k&&l.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const S=f?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(W,{title:"Schedule",icon:c,iconColor:"text-gray-600 dark:text-gray-400",count:l.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:v,onAutoRefreshToggle:w,filters:g,onClearAllFilters:p}),a.jsxs("div",{className:`${S} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:j,onClick:T,loading:s}),a.jsx(J,{columns:E,data:l,keyExtractor:e=>e.id,onRowClick:e=>t(`/schedule/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No scheduled tasks recorded yet",emptyIcon:a.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:C,onClick:N,loading:s})]})]})}export{Z as default};
@@ -1 +1 @@
1
- import{j as a}from"./index-yKzNgrAF.js";import{e as b,b as F}from"./vendor-B2nVRih0.js";import{u as P,C as n,f as T,p as D}from"./ClickableBadge-BFhMLE2u.js";import{u as A,P as M,N as R,L as H}from"./PageHeader-FW-7_zU_.js";import{p as B,T as t,D as L,b as V}from"./types-CvWsUZ4q.js";import{E as d}from"./eye-D01Pihl7.js";function q(){const c=b(),{addFilter:r,clearAll:h,serverFilters:m,headerFilters:p,hasFilters:u}=P("views"),{entries:x,loading:g,refreshing:s,newEntriesCount:f,hasMore:y,loadMore:w,loadNew:j,autoRefreshEnabled:C,setAutoRefresh:k,meta:i,isHighlighted:N}=A({type:"view",limit:50,filters:m}),o=x.filter(e=>B(e)),v=F.useMemo(()=>[{key:"template",header:"Template",minWidth:"250px",render:e=>a.jsx(t,{mono:!0,truncate:!0,maxWidth:"350px",children:e.payload.template})},{key:"format",header:"Format",width:"100px",render:e=>e.payload.format?a.jsx(n,{onClick:l=>{l.stopPropagation(),r("formats",e.payload.format)},className:"font-mono",children:e.payload.format}):a.jsx(t,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(L,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(n,{onClick:l=>{l.stopPropagation(),r("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"cache",header:"Cache",width:"80px",align:"center",render:e=>e.payload.cacheHit!==void 0?a.jsx(t,{children:e.payload.cacheHit?"Yes":"No"}):a.jsx(t,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(t,{secondary:!0,className:"text-xs",children:T(D(e.createdAt),{addSuffix:!0})})}],[r]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=u?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(M,{title:"Views",icon:d,iconColor:"text-teal-600 dark:text-teal-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:C,onAutoRefreshToggle:k,filters:p,onClearAllFilters:h}),a.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[a.jsx(R,{count:f,onClick:j,loading:s}),a.jsx(V,{columns:v,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/views/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No view renders recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(H,{hasMore:y,onClick:w,loading:s})]})]})}export{q as default};
1
+ import{j as a}from"./index-C8he4ZUV.js";import{e as b,b as F}from"./vendor-B2nVRih0.js";import{u as P,C as n,f as T,p as D}from"./ClickableBadge-CW4jdcpl.js";import{u as A,P as M,N as R,L as H}from"./PageHeader-QBzFo308.js";import{p as B,T as t,D as L,b as V}from"./types-BYamMo0R.js";import{E as d}from"./eye-Bc29awES.js";function q(){const c=b(),{addFilter:r,clearAll:h,serverFilters:m,headerFilters:p,hasFilters:u}=P("views"),{entries:x,loading:g,refreshing:s,newEntriesCount:f,hasMore:y,loadMore:w,loadNew:j,autoRefreshEnabled:C,setAutoRefresh:k,meta:i,isHighlighted:N}=A({type:"view",limit:50,filters:m}),o=x.filter(e=>B(e)),v=F.useMemo(()=>[{key:"template",header:"Template",minWidth:"250px",render:e=>a.jsx(t,{mono:!0,truncate:!0,maxWidth:"350px",children:e.payload.template})},{key:"format",header:"Format",width:"100px",render:e=>e.payload.format?a.jsx(n,{onClick:l=>{l.stopPropagation(),r("formats",e.payload.format)},className:"font-mono",children:e.payload.format}):a.jsx(t,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(L,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(n,{onClick:l=>{l.stopPropagation(),r("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"cache",header:"Cache",width:"80px",align:"center",render:e=>e.payload.cacheHit!==void 0?a.jsx(t,{children:e.payload.cacheHit?"Yes":"No"}):a.jsx(t,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(t,{secondary:!0,className:"text-xs",children:T(D(e.createdAt),{addSuffix:!0})})}],[r]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=u?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(M,{title:"Views",icon:d,iconColor:"text-teal-600 dark:text-teal-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:C,onAutoRefreshToggle:k,filters:p,onClearAllFilters:h}),a.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[a.jsx(R,{count:f,onClick:j,loading:s}),a.jsx(V,{columns:v,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/views/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No view renders recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(H,{hasMore:y,onClick:w,loading:s})]})]})}export{q as default};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-yKzNgrAF.js";/**
1
+ import{c as e}from"./index-C8he4ZUV.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-yKzNgrAF.js";/**
1
+ import{c}from"./index-C8he4ZUV.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-yKzNgrAF.js";/**
1
+ import{c}from"./index-C8he4ZUV.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-DBq9olrb.js","assets/vendor-B2nVRih0.js","assets/ClickableBadge-BFhMLE2u.js","assets/zap-DOqgN4r4.js","assets/calendar-C6HprwOI.js","assets/RequestsPage-Ddf6EpBe.js","assets/PageHeader-FW-7_zU_.js","assets/types-CvWsUZ4q.js","assets/QueriesPage-Cq_dTmNR.js","assets/ExceptionsPage-gYd6g1uV.js","assets/circle-check-big-cy9U-hu6.js","assets/LogsPage-4QbIACro.js","assets/EventsPage-B__c8fMG.js","assets/JobsPage-BCaWNqRu.js","assets/CachePage-CVI2MWOP.js","assets/MailPage-rwNbPrlt.js","assets/SchedulePage-Bnj6BP7j.js","assets/format-BFldcnCk.js","assets/HttpClientPage-B504GqrK.js","assets/RedisPage-WyIqRY51.js","assets/ModelsPage-Jc7WSrV2.js","assets/NotificationsPage-CHkJmY88.js","assets/ViewsPage-DgdMD9iC.js","assets/eye-D01Pihl7.js","assets/CommandsPage-CpXlDpH2.js","assets/GatesPage-CY-lCHBF.js","assets/BatchesPage-CBuvtLok.js","assets/DumpsPage-CvCmvONu.js","assets/GraphQLPage-45EotnyF.js","assets/EntryDetailPage-DYSZpdsH.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-BnnZ3TMF.js","assets/vendor-B2nVRih0.js","assets/ClickableBadge-CW4jdcpl.js","assets/zap-BxD9CCmf.js","assets/calendar-WMtbNas7.js","assets/RequestsPage-B9-Qq2vH.js","assets/PageHeader-QBzFo308.js","assets/types-BYamMo0R.js","assets/QueriesPage-Cpi1b2Mz.js","assets/ExceptionsPage-BoauuDFu.js","assets/circle-check-big-U-4nHjTQ.js","assets/LogsPage-z4yYJ1qQ.js","assets/EventsPage-DiPB0Sfy.js","assets/JobsPage-CHYjmhlh.js","assets/CachePage-CfA-UrdM.js","assets/MailPage-DQ2PuRS9.js","assets/SchedulePage-BXPldddV.js","assets/format-BFldcnCk.js","assets/HttpClientPage-5vVzz7TU.js","assets/RedisPage-C7vFV3r4.js","assets/ModelsPage-PBBI9K5M.js","assets/NotificationsPage-CjleWNhr.js","assets/ViewsPage-COo7BNBc.js","assets/eye-Bc29awES.js","assets/CommandsPage-DJ1ZxHj8.js","assets/GatesPage-CB0kqyp_.js","assets/BatchesPage-DmqbLFCs.js","assets/DumpsPage-fshG-ETf.js","assets/GraphQLPage-_inMfKh4.js","assets/EntryDetailPage-Cf7K34er.js"])))=>i.map(i=>d[i]);
2
2
  var we=Object.defineProperty;var Se=(s,a,e)=>a in s?we(s,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[a]=e;var z=(s,a,e)=>Se(s,typeof a!="symbol"?a+"":a,e);import{r as Ne,a as _e,g as Ee,b as r,u as Pe,L as D,O as Ce,R as Re,c as x,N as Le,d as Oe,B as Ae}from"./vendor-B2nVRih0.js";(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const n of o.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&i(n)}).observe(document,{childList:!0,subtree:!0});function e(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=e(l);fetch(l.href,o)}})();var G={exports:{}},M={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.min.js
@@ -358,4 +358,4 @@ to {
358
358
  *
359
359
  * This source code is licensed under the ISC license.
360
360
  * See the LICENSE file in the root directory of this source tree.
361
- */const Yt=g("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),es=()=>`${window.location.origin}/__nestlens__/api`,ke=es();async function P(s,a){const e=await fetch(`${ke}${s}`,a);if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function Ds(s){return P(`/entries/${s}`)}async function ts(){return P("/stats")}async function ss(){return(await fetch(`${ke}/entries`,{method:"DELETE"})).json()}async function Ms(s){const a=new URLSearchParams;if(s.type&&a.set("type",s.type),s.limit&&a.set("limit",s.limit.toString()),s.beforeSequence!==void 0&&a.set("beforeSequence",s.beforeSequence.toString()),s.afterSequence!==void 0&&a.set("afterSequence",s.afterSequence.toString()),s.filters){const e=s.filters;e.levels&&e.levels.length>0&&a.set("levels",e.levels.join(",")),e.contexts&&e.contexts.length>0&&a.set("contexts",e.contexts.join(",")),e.queryTypes&&e.queryTypes.length>0&&a.set("queryTypes",e.queryTypes.join(",")),e.sources&&e.sources.length>0&&a.set("sources",e.sources.join(",")),e.slow!==void 0&&a.set("slow",e.slow.toString()),e.names&&e.names.length>0&&a.set("names",e.names.join(",")),e.methods&&e.methods.length>0&&a.set("methods",e.methods.join(",")),e.paths&&e.paths.length>0&&a.set("paths",e.paths.join(",")),e.resolved!==void 0&&a.set("resolved",e.resolved.toString()),e.statuses&&e.statuses.length>0&&a.set("statuses",e.statuses.join(",")),e.hostnames&&e.hostnames.length>0&&a.set("hostnames",e.hostnames.join(",")),e.controllers&&e.controllers.length>0&&a.set("controllers",e.controllers.join(",")),e.ips&&e.ips.length>0&&a.set("ips",e.ips.join(",")),e.eventNames&&e.eventNames.length>0&&a.set("eventNames",e.eventNames.join(",")),e.scheduleStatuses&&e.scheduleStatuses.length>0&&a.set("scheduleStatuses",e.scheduleStatuses.join(",")),e.scheduleNames&&e.scheduleNames.length>0&&a.set("scheduleNames",e.scheduleNames.join(",")),e.jobStatuses&&e.jobStatuses.length>0&&a.set("jobStatuses",e.jobStatuses.join(",")),e.jobNames&&e.jobNames.length>0&&a.set("jobNames",e.jobNames.join(",")),e.queues&&e.queues.length>0&&a.set("queues",e.queues.join(",")),e.cacheOperations&&e.cacheOperations.length>0&&a.set("cacheOperations",e.cacheOperations.join(",")),e.mailStatuses&&e.mailStatuses.length>0&&a.set("mailStatuses",e.mailStatuses.join(",")),e.redisStatuses&&e.redisStatuses.length>0&&a.set("redisStatuses",e.redisStatuses.join(",")),e.redisCommands&&e.redisCommands.length>0&&a.set("redisCommands",e.redisCommands.join(",")),e.modelActions&&e.modelActions.length>0&&a.set("modelActions",e.modelActions.join(",")),e.entities&&e.entities.length>0&&a.set("entities",e.entities.join(",")),e.modelSources&&e.modelSources.length>0&&a.set("modelSources",e.modelSources.join(",")),e.notificationTypes&&e.notificationTypes.length>0&&a.set("notificationTypes",e.notificationTypes.join(",")),e.notificationStatuses&&e.notificationStatuses.length>0&&a.set("notificationStatuses",e.notificationStatuses.join(",")),e.viewFormats&&e.viewFormats.length>0&&a.set("viewFormats",e.viewFormats.join(",")),e.viewStatuses&&e.viewStatuses.length>0&&a.set("viewStatuses",e.viewStatuses.join(",")),e.commandStatuses&&e.commandStatuses.length>0&&a.set("commandStatuses",e.commandStatuses.join(",")),e.commandNames&&e.commandNames.length>0&&a.set("commandNames",e.commandNames.join(",")),e.gateNames&&e.gateNames.length>0&&a.set("gateNames",e.gateNames.join(",")),e.gateResults&&e.gateResults.length>0&&a.set("gateResults",e.gateResults.join(",")),e.batchStatuses&&e.batchStatuses.length>0&&a.set("batchStatuses",e.batchStatuses.join(",")),e.batchOperations&&e.batchOperations.length>0&&a.set("batchOperations",e.batchOperations.join(",")),e.dumpStatuses&&e.dumpStatuses.length>0&&a.set("dumpStatuses",e.dumpStatuses.join(",")),e.dumpOperations&&e.dumpOperations.length>0&&a.set("dumpOperations",e.dumpOperations.join(",")),e.dumpFormats&&e.dumpFormats.length>0&&a.set("dumpFormats",e.dumpFormats.join(",")),e.operationTypes&&e.operationTypes.length>0&&a.set("operationTypes",e.operationTypes.join(",")),e.operationNames&&e.operationNames.length>0&&a.set("operationNames",e.operationNames.join(",")),e.hasErrors!==void 0&&a.set("hasErrors",e.hasErrors.toString()),e.hasN1!==void 0&&a.set("hasN1",e.hasN1.toString()),e.tags&&e.tags.length>0&&a.set("tags",e.tags.join(",")),e.search&&a.set("search",e.search)}return P(`/entries/cursor?${a.toString()}`)}async function qs(s){const a=new URLSearchParams;return s&&a.set("type",s),P(`/entries/latest-sequence?${a.toString()}`)}async function $s(s,a){const e=new URLSearchParams;return e.set("afterSequence",s.toString()),a&&e.set("type",a),P(`/entries/check-new?${e.toString()}`)}async function zs(){return P("/storage/stats")}async function Is(){return P("/pruning/status")}async function Ks(){return P("/pruning/run",{method:"POST"})}async function Vs(s){return P(`/entries/${s}/resolve`,{method:"PATCH"})}async function Bs(s){return P(`/entries/${s}/unresolve`,{method:"PATCH"})}async function as(s){return P("/recording/pause",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:s})})}async function rs(){return P("/recording/resume",{method:"POST"})}async function ns(){return P("/recording/status")}function os(s){const a=r.useCallback(e=>{const i=e.target,l=i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable;for(const o of s){const{key:n,ctrl:c,meta:d,shift:h,alt:u,handler:m,preventDefault:f=!0}=o;if(l&&n.toLowerCase()!=="escape")continue;const j=e.key.toLowerCase()===n.toLowerCase(),E=h?e.shiftKey:!e.shiftKey,p=u?e.altKey:!e.altKey;if(c){if((e.ctrlKey||e.metaKey)&&j&&E&&p){f&&e.preventDefault(),m(e);return}continue}if(d){if(e.metaKey&&!e.ctrlKey&&j&&E&&p){f&&e.preventDefault(),m(e);return}continue}if(!e.ctrlKey&&!e.metaKey&&j&&E&&p){f&&e.preventDefault(),m(e);return}}},[s]);r.useEffect(()=>(document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}),[a])}const ve=r.createContext(void 0);function is({children:s}){const[a,e]=r.useState(null),[i,l]=r.useState(null),o=r.useRef(!0),n=r.useCallback(async()=>{try{const c=await ts();e(c.data),l(null)}catch(c){const d=c instanceof Error?c:new Error("Failed to fetch stats");l(d),console.error("Failed to fetch stats:",c),o.current&&q.error("Failed to load statistics")}finally{o.current=!1}},[]);return r.useEffect(()=>{n();const c=setInterval(n,1e4);return()=>clearInterval(c)},[n]),t.jsx(ve.Provider,{value:{stats:a,error:i,refreshStats:n},children:s})}function ls(){const s=r.useContext(ve);if(s===void 0)throw new Error("useStats must be used within a StatsProvider");return s}function ce(){const[s,a]=r.useState(null),[e,i]=r.useState(!1);r.useEffect(()=>{const o=async()=>{try{const c=await ns();a(c.data)}catch(c){console.error("Failed to fetch recording status:",c)}};o();const n=setInterval(o,5e3);return()=>clearInterval(n)},[]);const l=async()=>{if(!(!s||e)){i(!0);try{if(s.isPaused){const o=await rs();a(o.data),q.success("Recording resumed")}else{const o=await as();a(o.data),q.success("Recording paused")}}catch{q.error("Failed to toggle recording")}finally{i(!1)}}};return s?t.jsx("button",{onClick:l,disabled:e,className:`p-2.5 rounded-lg transition-colors ${s.isPaused?"text-yellow-600 hover:text-yellow-700 dark:text-yellow-400 dark:hover:text-yellow-300 hover:bg-yellow-50 dark:hover:bg-yellow-900/20":"text-green-600 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300 hover:bg-green-50 dark:hover:bg-green-900/20"} ${e?"opacity-50 cursor-not-allowed":""}`,"aria-label":s.isPaused?"Resume recording":"Pause recording",title:s.isPaused?"Resume Recording":"Pause Recording",children:s.isPaused?t.jsx(Jt,{className:"h-5 w-5"}):t.jsx(Ut,{className:"h-5 w-5"})}):null}const de={dashboard:"text-primary-500",request:"text-blue-500",query:"text-purple-500",graphql:"text-fuchsia-500",exception:"text-red-500",log:"text-green-500",job:"text-yellow-500",schedule:"text-gray-500",batch:"text-lime-500",command:"text-slate-500",cache:"text-cyan-500",redis:"text-rose-500",model:"text-violet-500","http-client":"text-indigo-500",mail:"text-pink-500",notification:"text-orange-500",event:"text-emerald-500",view:"text-teal-500",gate:"text-amber-500",dump:"text-stone-500"},ue=[{name:"Overview",items:[{name:"Dashboard",href:"/",icon:Vt,colorKey:"dashboard"}]},{name:"Core",items:[{name:"Requests",href:"/requests",icon:Ot,colorKey:"request"},{name:"Queries",href:"/queries",icon:qt,colorKey:"query"},{name:"GraphQL",href:"/graphql",icon:zt,colorKey:"graphql"},{name:"Exceptions",href:"/exceptions",icon:be,badge:"exceptions",colorKey:"exception"},{name:"Logs",href:"/logs",icon:$t,colorKey:"log"}]},{name:"Background",items:[{name:"Jobs",href:"/jobs",icon:Dt,colorKey:"job"},{name:"Schedule",href:"/schedule",icon:Mt,colorKey:"schedule"},{name:"Batches",href:"/batches",icon:Ht,colorKey:"batch"},{name:"Commands",href:"/commands",icon:Xt,colorKey:"command"}]},{name:"Data",items:[{name:"Cache",href:"/cache",icon:ne,colorKey:"cache"},{name:"Redis",href:"/redis",icon:Tt,colorKey:"redis"},{name:"Models",href:"/models",icon:Kt,colorKey:"model"}]},{name:"Communication",items:[{name:"HTTP Client",href:"/http-client",icon:It,colorKey:"http-client"},{name:"Mail",href:"/mail",icon:Bt,colorKey:"mail"},{name:"Notifications",href:"/notifications",icon:At,colorKey:"notification"},{name:"Events",href:"/events",icon:Qt,colorKey:"event"}]},{name:"System",items:[{name:"Views",href:"/views",icon:Gt,colorKey:"view"},{name:"Gates",href:"/gates",icon:Zt,colorKey:"gate"},{name:"Dumps",href:"/dumps",icon:ne,colorKey:"dump"}]}];function cs(){const s=Pe(),[a,e]=r.useState(!1),{stats:i}=ls(),[l,o]=r.useState(()=>{if(typeof window<"u"){const p=localStorage.getItem("nestlens-collapsed-groups");return p?new Set(JSON.parse(p)):new Set}return new Set}),[n,c]=r.useState(()=>typeof window<"u"?document.documentElement.classList.contains("dark"):!1),[d,h]=r.useState(()=>{if(typeof window<"u"){const p=localStorage.getItem("nestlens-theme");if(p==="system"||p==="light"||p==="dark")return p}return"system"}),u=r.useCallback(p=>{o(N=>{const S=new Set(N);return S.has(p)?S.delete(p):S.add(p),localStorage.setItem("nestlens-collapsed-groups",JSON.stringify([...S])),S})},[]),m=r.useCallback(p=>{if(!i)return 0;switch(p){case"exceptions":return i.unresolvedExceptions??i.byType.exception??0;default:return 0}},[i]),f=r.useCallback(p=>{let N=!1;p==="system"?N=window.matchMedia("(prefers-color-scheme: dark)").matches:N=p==="dark",N?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(N)},[]),j=r.useCallback(()=>{const p=n?"light":"dark";h(p),localStorage.setItem("nestlens-theme",p),f(p)},[n,f]),E=r.useCallback(async()=>{window.confirm("Are you sure you want to clear all entries?")&&(await ss(),q.success("All entries cleared"),window.location.reload())},[]);return r.useEffect(()=>{if(f(d),d==="system"){const p=window.matchMedia("(prefers-color-scheme: dark)"),N=S=>{const b=S.matches;b?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(b)};return p.addEventListener("change",N),()=>p.removeEventListener("change",N)}},[d,f]),os([{key:"k",ctrl:!0,handler:()=>E()},{key:"Escape",handler:()=>{a&&e(!1)},preventDefault:!1},{key:"d",ctrl:!0,handler:()=>j()}]),t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[t.jsxs("div",{className:`fixed inset-0 z-50 lg:hidden ${a?"":"hidden"}`,children:[t.jsx("div",{className:"fixed inset-0 bg-gray-900/80",onClick:()=>e(!1)}),t.jsxs("div",{id:"mobile-sidebar",className:"fixed inset-y-0 left-0 w-64 bg-white dark:bg-gray-800 flex flex-col",children:[t.jsxs("div",{className:"flex h-16 items-center justify-between px-4 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-8 w-8 text-primary-600"}),t.jsx("span",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"NestLens"})]}),t.jsx("button",{onClick:()=>e(!1),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-label":"Close sidebar",children:t.jsx(Yt,{className:"h-6 w-6","aria-hidden":"true"})})]}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((p,N)=>{const S=l.has(p.name);return t.jsxs("div",{className:N>0?"mt-4":"",children:[t.jsxs("button",{onClick:()=>u(p.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!S,"aria-controls":`nav-group-${p.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:p.name}),S?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!S&&t.jsx("div",{className:"mt-1 space-y-0.5",children:p.items.map(b=>{const _=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":_?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-colors ${_?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-white"}`,onClick:()=>e(!1),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-4 w-4 ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-medium bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400 rounded-full",children:C>99?"99+":C})]},b.name)})})]},p.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:E,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})]}),t.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col",children:t.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700",children:[t.jsx("div",{className:"flex h-16 items-center px-4 border-b border-gray-200 dark:border-gray-700",children:t.jsxs(D,{to:"/",className:"flex items-center space-x-2.5",children:[t.jsx("div",{className:"p-1.5 bg-primary-100 dark:bg-primary-900/50 rounded-lg",children:t.jsx(U,{className:"h-6 w-6 text-primary-600 dark:text-primary-400"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"}),t.jsxs("span",{className:"hidden xl:inline text-xs text-gray-400 dark:text-gray-500 ml-1.5",children:["v","0.3.4"]})]})]})}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((p,N)=>{const S=l.has(p.name);return t.jsxs("div",{className:N>0?"mt-6":"",children:[t.jsxs("button",{onClick:()=>u(p.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-[11px] font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!S,"aria-controls":`desktop-nav-group-${p.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:p.name}),S?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!S&&t.jsx("div",{className:"mt-1 space-y-0.5",children:p.items.map(b=>{const _=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":_?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-all duration-150 ${_?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium shadow-sm":"text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800/50 hover:text-gray-900 dark:hover:text-white"}`,children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-[18px] w-[18px] ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:`inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-semibold rounded-full transition-colors ${_?"bg-primary-200 text-primary-800 dark:bg-primary-800 dark:text-primary-200":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400"}`,children:C>99?"99+":C})]},b.name)})})]},p.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",title:n?"Light Mode (⌘D)":"Dark Mode (⌘D)",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:E,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",title:"Clear All Data (⌘K)",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",title:"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})}),t.jsxs("div",{className:"lg:pl-64",children:[t.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center gap-4 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-4 lg:hidden",children:[t.jsx("button",{onClick:()=>e(!0),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-expanded":a,"aria-controls":"mobile-sidebar","aria-label":"Open navigation menu",children:t.jsx(Ft,{className:"h-6 w-6","aria-hidden":"true"})}),t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-6 w-6 text-primary-600"}),t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"})]})]}),t.jsx("main",{className:"p-4 lg:p-6",children:t.jsx(Ce,{})})]})]})}function y(){return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex flex-col items-center gap-3",children:[t.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-primary-600 dark:border-primary-400"}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading..."})]})})}const ds=r.lazy(()=>k(()=>import("./DashboardPage-DBq9olrb.js"),__vite__mapDeps([0,1,2,3,4]))),us=r.lazy(()=>k(()=>import("./RequestsPage-Ddf6EpBe.js"),__vite__mapDeps([5,1,2,6,7]))),hs=r.lazy(()=>k(()=>import("./QueriesPage-Cq_dTmNR.js"),__vite__mapDeps([8,1,2,6,7,3]))),ms=r.lazy(()=>k(()=>import("./ExceptionsPage-gYd6g1uV.js"),__vite__mapDeps([9,1,2,6,7,10]))),ps=r.lazy(()=>k(()=>import("./LogsPage-4QbIACro.js"),__vite__mapDeps([11,1,2,6,7]))),xs=r.lazy(()=>k(()=>import("./EventsPage-B__c8fMG.js"),__vite__mapDeps([12,1,2,6,7]))),fs=r.lazy(()=>k(()=>import("./JobsPage-BCaWNqRu.js"),__vite__mapDeps([13,1,2,6,7]))),ys=r.lazy(()=>k(()=>import("./CachePage-CVI2MWOP.js"),__vite__mapDeps([14,1,2,6,7]))),gs=r.lazy(()=>k(()=>import("./MailPage-rwNbPrlt.js"),__vite__mapDeps([15,1,2,6,7]))),js=r.lazy(()=>k(()=>import("./SchedulePage-Bnj6BP7j.js"),__vite__mapDeps([16,1,17,2,6,7]))),bs=r.lazy(()=>k(()=>import("./HttpClientPage-B504GqrK.js"),__vite__mapDeps([18,1,2,6,7]))),ks=r.lazy(()=>k(()=>import("./RedisPage-WyIqRY51.js"),__vite__mapDeps([19,1,2,6,7]))),vs=r.lazy(()=>k(()=>import("./ModelsPage-Jc7WSrV2.js"),__vite__mapDeps([20,1,2,6,7]))),ws=r.lazy(()=>k(()=>import("./NotificationsPage-CHkJmY88.js"),__vite__mapDeps([21,1,2,6,7]))),Ss=r.lazy(()=>k(()=>import("./ViewsPage-DgdMD9iC.js"),__vite__mapDeps([22,1,2,6,7,23]))),Ns=r.lazy(()=>k(()=>import("./CommandsPage-CpXlDpH2.js"),__vite__mapDeps([24,1,2,6,7]))),_s=r.lazy(()=>k(()=>import("./GatesPage-CY-lCHBF.js"),__vite__mapDeps([25,1,2,6,7]))),Es=r.lazy(()=>k(()=>import("./BatchesPage-CBuvtLok.js"),__vite__mapDeps([26,1,2,6,7]))),Ps=r.lazy(()=>k(()=>import("./DumpsPage-CvCmvONu.js"),__vite__mapDeps([27,1,2,6,7]))),Cs=r.lazy(()=>k(()=>import("./GraphQLPage-45EotnyF.js"),__vite__mapDeps([28,1,2,6,7]))),v=r.lazy(()=>k(()=>import("./EntryDetailPage-DYSZpdsH.js"),__vite__mapDeps([29,1,2,7,3,10,17,4,23])));function Rs(){return t.jsx(Re,{children:t.jsxs(x,{path:"/",element:t.jsx(cs,{}),children:[t.jsx(x,{index:!0,element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ds,{})})}),t.jsx(x,{path:"requests",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(us,{})})}),t.jsx(x,{path:"queries",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(hs,{})})}),t.jsx(x,{path:"exceptions",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ms,{})})}),t.jsx(x,{path:"logs",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ps,{})})}),t.jsx(x,{path:"events",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(xs,{})})}),t.jsx(x,{path:"jobs",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(fs,{})})}),t.jsx(x,{path:"cache",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ys,{})})}),t.jsx(x,{path:"mail",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(gs,{})})}),t.jsx(x,{path:"schedule",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(js,{})})}),t.jsx(x,{path:"http-client",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(bs,{})})}),t.jsx(x,{path:"redis",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ks,{})})}),t.jsx(x,{path:"models",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(vs,{})})}),t.jsx(x,{path:"notifications",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ws,{})})}),t.jsx(x,{path:"views",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Ss,{})})}),t.jsx(x,{path:"commands",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Ns,{})})}),t.jsx(x,{path:"gates",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(_s,{})})}),t.jsx(x,{path:"batches",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Es,{})})}),t.jsx(x,{path:"dumps",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Ps,{})})}),t.jsx(x,{path:"graphql",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Cs,{})})}),t.jsx(x,{path:"requests/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"queries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"exceptions/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"logs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"events/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"jobs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"cache/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"mail/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"schedule/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"http-client/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"redis/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"models/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"notifications/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"views/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"commands/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"gates/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"batches/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"dumps/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"graphql/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"entries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"*",element:t.jsx(Le,{to:"/",replace:!0})})]})})}class Ls extends r.Component{constructor(){super(...arguments);z(this,"state",{hasError:!1});z(this,"handleReload",()=>{window.location.reload()});z(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,i){console.error("ErrorBoundary caught an error:",e,i),this.setState({errorInfo:i})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 p-4",children:t.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[t.jsx("div",{className:"mx-auto w-12 h-12 flex items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:t.jsx(be,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),t.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Something went wrong"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"An unexpected error occurred. Please try refreshing the page."}),this.state.error&&t.jsx("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-lg text-left",children:t.jsx("p",{className:"text-sm font-mono text-red-600 dark:text-red-400 break-all",children:this.state.error.message})}),t.jsxs("div",{className:"flex gap-3 justify-center",children:[t.jsx("button",{onClick:this.handleReset,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors",children:"Try Again"}),t.jsxs("button",{onClick:this.handleReload,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 rounded-lg transition-colors",children:[t.jsx(Wt,{className:"h-4 w-4"}),"Refresh Page"]})]}),!1]})}):this.props.children}}const Os=()=>{const s=window.location.pathname,a=s.indexOf("/nestlens");return a!==-1?s.substring(0,a+9):"/nestlens"};$e.createRoot(document.getElementById("root")).render(t.jsx(Oe.StrictMode,{children:t.jsx(Ls,{children:t.jsx(Ae,{basename:Os(),children:t.jsxs(is,{children:[t.jsx(Rs,{}),t.jsx(_t,{position:"bottom-right",toastOptions:{duration:3e3,style:{background:"#1f2937",color:"#f3f4f6",borderRadius:"0.5rem"},success:{iconTheme:{primary:"#10b981",secondary:"#f3f4f6"}},error:{iconTheme:{primary:"#ef4444",secondary:"#f3f4f6"}}}})]})})})}));export{Ot as A,Dt as B,Mt as C,qt as D,$t as F,zt as G,ne as H,Kt as L,Bt as M,Ht as P,Qt as R,Zt as S,be as T,Yt as X,Xt as a,Tt as b,g as c,It as d,At as e,Gt as f,ae as g,le as h,Wt as i,t as j,zs as k,Is as l,Ms as m,Bs as n,Vs as o,qs as p,$s as q,Ks as r,se as s,Jt as t,ls as u,Ds as v,q as z};
361
+ */const Yt=g("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),es=()=>`${window.location.origin}/__nestlens__/api`,ke=es();async function P(s,a){const e=await fetch(`${ke}${s}`,a);if(!e.ok)throw new Error(`API error: ${e.status}`);return e.json()}async function Ds(s){return P(`/entries/${s}`)}async function ts(){return P("/stats")}async function ss(){return(await fetch(`${ke}/entries`,{method:"DELETE"})).json()}async function Ms(s){const a=new URLSearchParams;if(s.type&&a.set("type",s.type),s.limit&&a.set("limit",s.limit.toString()),s.beforeSequence!==void 0&&a.set("beforeSequence",s.beforeSequence.toString()),s.afterSequence!==void 0&&a.set("afterSequence",s.afterSequence.toString()),s.filters){const e=s.filters;e.levels&&e.levels.length>0&&a.set("levels",e.levels.join(",")),e.contexts&&e.contexts.length>0&&a.set("contexts",e.contexts.join(",")),e.queryTypes&&e.queryTypes.length>0&&a.set("queryTypes",e.queryTypes.join(",")),e.sources&&e.sources.length>0&&a.set("sources",e.sources.join(",")),e.slow!==void 0&&a.set("slow",e.slow.toString()),e.names&&e.names.length>0&&a.set("names",e.names.join(",")),e.methods&&e.methods.length>0&&a.set("methods",e.methods.join(",")),e.paths&&e.paths.length>0&&a.set("paths",e.paths.join(",")),e.resolved!==void 0&&a.set("resolved",e.resolved.toString()),e.statuses&&e.statuses.length>0&&a.set("statuses",e.statuses.join(",")),e.hostnames&&e.hostnames.length>0&&a.set("hostnames",e.hostnames.join(",")),e.controllers&&e.controllers.length>0&&a.set("controllers",e.controllers.join(",")),e.ips&&e.ips.length>0&&a.set("ips",e.ips.join(",")),e.eventNames&&e.eventNames.length>0&&a.set("eventNames",e.eventNames.join(",")),e.scheduleStatuses&&e.scheduleStatuses.length>0&&a.set("scheduleStatuses",e.scheduleStatuses.join(",")),e.scheduleNames&&e.scheduleNames.length>0&&a.set("scheduleNames",e.scheduleNames.join(",")),e.jobStatuses&&e.jobStatuses.length>0&&a.set("jobStatuses",e.jobStatuses.join(",")),e.jobNames&&e.jobNames.length>0&&a.set("jobNames",e.jobNames.join(",")),e.queues&&e.queues.length>0&&a.set("queues",e.queues.join(",")),e.cacheOperations&&e.cacheOperations.length>0&&a.set("cacheOperations",e.cacheOperations.join(",")),e.mailStatuses&&e.mailStatuses.length>0&&a.set("mailStatuses",e.mailStatuses.join(",")),e.redisStatuses&&e.redisStatuses.length>0&&a.set("redisStatuses",e.redisStatuses.join(",")),e.redisCommands&&e.redisCommands.length>0&&a.set("redisCommands",e.redisCommands.join(",")),e.modelActions&&e.modelActions.length>0&&a.set("modelActions",e.modelActions.join(",")),e.entities&&e.entities.length>0&&a.set("entities",e.entities.join(",")),e.modelSources&&e.modelSources.length>0&&a.set("modelSources",e.modelSources.join(",")),e.notificationTypes&&e.notificationTypes.length>0&&a.set("notificationTypes",e.notificationTypes.join(",")),e.notificationStatuses&&e.notificationStatuses.length>0&&a.set("notificationStatuses",e.notificationStatuses.join(",")),e.viewFormats&&e.viewFormats.length>0&&a.set("viewFormats",e.viewFormats.join(",")),e.viewStatuses&&e.viewStatuses.length>0&&a.set("viewStatuses",e.viewStatuses.join(",")),e.commandStatuses&&e.commandStatuses.length>0&&a.set("commandStatuses",e.commandStatuses.join(",")),e.commandNames&&e.commandNames.length>0&&a.set("commandNames",e.commandNames.join(",")),e.gateNames&&e.gateNames.length>0&&a.set("gateNames",e.gateNames.join(",")),e.gateResults&&e.gateResults.length>0&&a.set("gateResults",e.gateResults.join(",")),e.batchStatuses&&e.batchStatuses.length>0&&a.set("batchStatuses",e.batchStatuses.join(",")),e.batchOperations&&e.batchOperations.length>0&&a.set("batchOperations",e.batchOperations.join(",")),e.dumpStatuses&&e.dumpStatuses.length>0&&a.set("dumpStatuses",e.dumpStatuses.join(",")),e.dumpOperations&&e.dumpOperations.length>0&&a.set("dumpOperations",e.dumpOperations.join(",")),e.dumpFormats&&e.dumpFormats.length>0&&a.set("dumpFormats",e.dumpFormats.join(",")),e.operationTypes&&e.operationTypes.length>0&&a.set("operationTypes",e.operationTypes.join(",")),e.operationNames&&e.operationNames.length>0&&a.set("operationNames",e.operationNames.join(",")),e.hasErrors!==void 0&&a.set("hasErrors",e.hasErrors.toString()),e.hasN1!==void 0&&a.set("hasN1",e.hasN1.toString()),e.tags&&e.tags.length>0&&a.set("tags",e.tags.join(",")),e.search&&a.set("search",e.search)}return P(`/entries/cursor?${a.toString()}`)}async function qs(s){const a=new URLSearchParams;return s&&a.set("type",s),P(`/entries/latest-sequence?${a.toString()}`)}async function $s(s,a){const e=new URLSearchParams;return e.set("afterSequence",s.toString()),a&&e.set("type",a),P(`/entries/check-new?${e.toString()}`)}async function zs(){return P("/storage/stats")}async function Is(){return P("/pruning/status")}async function Ks(){return P("/pruning/run",{method:"POST"})}async function Vs(s){return P(`/entries/${s}/resolve`,{method:"PATCH"})}async function Bs(s){return P(`/entries/${s}/unresolve`,{method:"PATCH"})}async function as(s){return P("/recording/pause",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:s})})}async function rs(){return P("/recording/resume",{method:"POST"})}async function ns(){return P("/recording/status")}function os(s){const a=r.useCallback(e=>{const i=e.target,l=i.tagName==="INPUT"||i.tagName==="TEXTAREA"||i.isContentEditable;for(const o of s){const{key:n,ctrl:c,meta:d,shift:h,alt:u,handler:m,preventDefault:f=!0}=o;if(l&&n.toLowerCase()!=="escape")continue;const j=e.key.toLowerCase()===n.toLowerCase(),E=h?e.shiftKey:!e.shiftKey,p=u?e.altKey:!e.altKey;if(c){if((e.ctrlKey||e.metaKey)&&j&&E&&p){f&&e.preventDefault(),m(e);return}continue}if(d){if(e.metaKey&&!e.ctrlKey&&j&&E&&p){f&&e.preventDefault(),m(e);return}continue}if(!e.ctrlKey&&!e.metaKey&&j&&E&&p){f&&e.preventDefault(),m(e);return}}},[s]);r.useEffect(()=>(document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}),[a])}const ve=r.createContext(void 0);function is({children:s}){const[a,e]=r.useState(null),[i,l]=r.useState(null),o=r.useRef(!0),n=r.useCallback(async()=>{try{const c=await ts();e(c.data),l(null)}catch(c){const d=c instanceof Error?c:new Error("Failed to fetch stats");l(d),console.error("Failed to fetch stats:",c),o.current&&q.error("Failed to load statistics")}finally{o.current=!1}},[]);return r.useEffect(()=>{n();const c=setInterval(n,1e4);return()=>clearInterval(c)},[n]),t.jsx(ve.Provider,{value:{stats:a,error:i,refreshStats:n},children:s})}function ls(){const s=r.useContext(ve);if(s===void 0)throw new Error("useStats must be used within a StatsProvider");return s}function ce(){const[s,a]=r.useState(null),[e,i]=r.useState(!1);r.useEffect(()=>{const o=async()=>{try{const c=await ns();a(c.data)}catch(c){console.error("Failed to fetch recording status:",c)}};o();const n=setInterval(o,5e3);return()=>clearInterval(n)},[]);const l=async()=>{if(!(!s||e)){i(!0);try{if(s.isPaused){const o=await rs();a(o.data),q.success("Recording resumed")}else{const o=await as();a(o.data),q.success("Recording paused")}}catch{q.error("Failed to toggle recording")}finally{i(!1)}}};return s?t.jsx("button",{onClick:l,disabled:e,className:`p-2.5 rounded-lg transition-colors ${s.isPaused?"text-yellow-600 hover:text-yellow-700 dark:text-yellow-400 dark:hover:text-yellow-300 hover:bg-yellow-50 dark:hover:bg-yellow-900/20":"text-green-600 hover:text-green-700 dark:text-green-400 dark:hover:text-green-300 hover:bg-green-50 dark:hover:bg-green-900/20"} ${e?"opacity-50 cursor-not-allowed":""}`,"aria-label":s.isPaused?"Resume recording":"Pause recording",title:s.isPaused?"Resume Recording":"Pause Recording",children:s.isPaused?t.jsx(Jt,{className:"h-5 w-5"}):t.jsx(Ut,{className:"h-5 w-5"})}):null}const de={dashboard:"text-primary-500",request:"text-blue-500",query:"text-purple-500",graphql:"text-fuchsia-500",exception:"text-red-500",log:"text-green-500",job:"text-yellow-500",schedule:"text-gray-500",batch:"text-lime-500",command:"text-slate-500",cache:"text-cyan-500",redis:"text-rose-500",model:"text-violet-500","http-client":"text-indigo-500",mail:"text-pink-500",notification:"text-orange-500",event:"text-emerald-500",view:"text-teal-500",gate:"text-amber-500",dump:"text-stone-500"},ue=[{name:"Overview",items:[{name:"Dashboard",href:"/",icon:Vt,colorKey:"dashboard"}]},{name:"Core",items:[{name:"Requests",href:"/requests",icon:Ot,colorKey:"request"},{name:"Queries",href:"/queries",icon:qt,colorKey:"query"},{name:"GraphQL",href:"/graphql",icon:zt,colorKey:"graphql"},{name:"Exceptions",href:"/exceptions",icon:be,badge:"exceptions",colorKey:"exception"},{name:"Logs",href:"/logs",icon:$t,colorKey:"log"}]},{name:"Background",items:[{name:"Jobs",href:"/jobs",icon:Dt,colorKey:"job"},{name:"Schedule",href:"/schedule",icon:Mt,colorKey:"schedule"},{name:"Batches",href:"/batches",icon:Ht,colorKey:"batch"},{name:"Commands",href:"/commands",icon:Xt,colorKey:"command"}]},{name:"Data",items:[{name:"Cache",href:"/cache",icon:ne,colorKey:"cache"},{name:"Redis",href:"/redis",icon:Tt,colorKey:"redis"},{name:"Models",href:"/models",icon:Kt,colorKey:"model"}]},{name:"Communication",items:[{name:"HTTP Client",href:"/http-client",icon:It,colorKey:"http-client"},{name:"Mail",href:"/mail",icon:Bt,colorKey:"mail"},{name:"Notifications",href:"/notifications",icon:At,colorKey:"notification"},{name:"Events",href:"/events",icon:Qt,colorKey:"event"}]},{name:"System",items:[{name:"Views",href:"/views",icon:Gt,colorKey:"view"},{name:"Gates",href:"/gates",icon:Zt,colorKey:"gate"},{name:"Dumps",href:"/dumps",icon:ne,colorKey:"dump"}]}];function cs(){const s=Pe(),[a,e]=r.useState(!1),{stats:i}=ls(),[l,o]=r.useState(()=>{if(typeof window<"u"){const p=localStorage.getItem("nestlens-collapsed-groups");return p?new Set(JSON.parse(p)):new Set}return new Set}),[n,c]=r.useState(()=>typeof window<"u"?document.documentElement.classList.contains("dark"):!1),[d,h]=r.useState(()=>{if(typeof window<"u"){const p=localStorage.getItem("nestlens-theme");if(p==="system"||p==="light"||p==="dark")return p}return"system"}),u=r.useCallback(p=>{o(N=>{const S=new Set(N);return S.has(p)?S.delete(p):S.add(p),localStorage.setItem("nestlens-collapsed-groups",JSON.stringify([...S])),S})},[]),m=r.useCallback(p=>{if(!i)return 0;switch(p){case"exceptions":return i.unresolvedExceptions??i.byType.exception??0;default:return 0}},[i]),f=r.useCallback(p=>{let N=!1;p==="system"?N=window.matchMedia("(prefers-color-scheme: dark)").matches:N=p==="dark",N?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(N)},[]),j=r.useCallback(()=>{const p=n?"light":"dark";h(p),localStorage.setItem("nestlens-theme",p),f(p)},[n,f]),E=r.useCallback(async()=>{window.confirm("Are you sure you want to clear all entries?")&&(await ss(),q.success("All entries cleared"),window.location.reload())},[]);return r.useEffect(()=>{if(f(d),d==="system"){const p=window.matchMedia("(prefers-color-scheme: dark)"),N=S=>{const b=S.matches;b?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),c(b)};return p.addEventListener("change",N),()=>p.removeEventListener("change",N)}},[d,f]),os([{key:"k",ctrl:!0,handler:()=>E()},{key:"Escape",handler:()=>{a&&e(!1)},preventDefault:!1},{key:"d",ctrl:!0,handler:()=>j()}]),t.jsxs("div",{className:"min-h-screen bg-gray-50 dark:bg-gray-900",children:[t.jsxs("div",{className:`fixed inset-0 z-50 lg:hidden ${a?"":"hidden"}`,children:[t.jsx("div",{className:"fixed inset-0 bg-gray-900/80",onClick:()=>e(!1)}),t.jsxs("div",{id:"mobile-sidebar",className:"fixed inset-y-0 left-0 w-64 bg-white dark:bg-gray-800 flex flex-col",children:[t.jsxs("div",{className:"flex h-16 items-center justify-between px-4 border-b border-gray-200 dark:border-gray-700",children:[t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-8 w-8 text-primary-600"}),t.jsx("span",{className:"text-xl font-bold text-gray-900 dark:text-white",children:"NestLens"})]}),t.jsx("button",{onClick:()=>e(!1),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-label":"Close sidebar",children:t.jsx(Yt,{className:"h-6 w-6","aria-hidden":"true"})})]}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((p,N)=>{const S=l.has(p.name);return t.jsxs("div",{className:N>0?"mt-4":"",children:[t.jsxs("button",{onClick:()=>u(p.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!S,"aria-controls":`nav-group-${p.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:p.name}),S?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!S&&t.jsx("div",{className:"mt-1 space-y-0.5",children:p.items.map(b=>{const _=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":_?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-colors ${_?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium":"text-gray-600 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-800 hover:text-gray-900 dark:hover:text-white"}`,onClick:()=>e(!1),children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-4 w-4 ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-medium bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400 rounded-full",children:C>99?"99+":C})]},b.name)})})]},p.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:E,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})]}),t.jsx("div",{className:"hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col",children:t.jsxs("div",{className:"flex flex-col h-full bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700",children:[t.jsx("div",{className:"flex h-16 items-center px-4 border-b border-gray-200 dark:border-gray-700",children:t.jsxs(D,{to:"/",className:"flex items-center space-x-2.5",children:[t.jsx("div",{className:"p-1.5 bg-primary-100 dark:bg-primary-900/50 rounded-lg",children:t.jsx(U,{className:"h-6 w-6 text-primary-600 dark:text-primary-400"})}),t.jsxs("div",{children:[t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"}),t.jsxs("span",{className:"hidden xl:inline text-xs text-gray-400 dark:text-gray-500 ml-1.5",children:["v","0.4.0"]})]})]})}),t.jsx("nav",{className:"flex-1 min-h-0 overflow-y-auto py-4 px-3",children:ue.map((p,N)=>{const S=l.has(p.name);return t.jsxs("div",{className:N>0?"mt-6":"",children:[t.jsxs("button",{onClick:()=>u(p.name),className:"flex items-center justify-between w-full px-2 py-1.5 text-[11px] font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider hover:text-gray-600 dark:hover:text-gray-400 transition-colors","aria-expanded":!S,"aria-controls":`desktop-nav-group-${p.name.toLowerCase().replace(/\s+/g,"-")}`,children:[t.jsx("span",{children:p.name}),S?t.jsx(ae,{className:"h-3 w-3","aria-hidden":"true"}):t.jsx(se,{className:"h-3 w-3","aria-hidden":"true"})]}),!S&&t.jsx("div",{className:"mt-1 space-y-0.5",children:p.items.map(b=>{const _=b.href==="/"?s.pathname==="/":s.pathname.startsWith(b.href),C="badge"in b?m(b.badge):0;return t.jsxs(D,{to:b.href,"aria-current":_?"page":void 0,className:`group flex items-center justify-between px-3 py-2 rounded-lg transition-all duration-150 ${_?"bg-primary-50 text-primary-700 dark:bg-primary-900/50 dark:text-primary-200 font-medium shadow-sm":"text-gray-600 hover:bg-gray-50 dark:text-gray-400 dark:hover:bg-gray-800/50 hover:text-gray-900 dark:hover:text-white"}`,children:[t.jsxs("div",{className:"flex items-center space-x-3",children:[t.jsx(b.icon,{className:`h-[18px] w-[18px] ${de[b.colorKey]||"text-gray-400"}`}),t.jsx("span",{className:"text-sm",children:b.name})]}),C>0&&t.jsx("span",{className:`inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-xs font-semibold rounded-full transition-colors ${_?"bg-primary-200 text-primary-800 dark:bg-primary-800 dark:text-primary-200":"bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-400"}`,children:C>99?"99+":C})]},b.name)})})]},p.name)})}),t.jsx("div",{className:"flex-shrink-0 p-3 border-t border-gray-200 dark:border-gray-700",children:t.jsxs("div",{className:"flex items-center justify-center gap-1",children:[t.jsx(ce,{}),t.jsx("button",{onClick:j,className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":n?"Switch to light mode":"Switch to dark mode",title:n?"Light Mode (⌘D)":"Dark Mode (⌘D)",children:n?t.jsx(ie,{className:"h-5 w-5"}):t.jsx(oe,{className:"h-5 w-5"})}),t.jsx("button",{onClick:E,className:"p-2.5 text-gray-500 hover:text-red-600 dark:text-gray-400 dark:hover:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20 rounded-lg transition-colors","aria-label":"Clear all data",title:"Clear All Data (⌘K)",children:t.jsx(le,{className:"h-5 w-5"})}),t.jsx("a",{href:"https://github.com/mogretici/nestlens",target:"_blank",rel:"noopener noreferrer",className:"p-2.5 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors","aria-label":"Documentation",title:"Documentation",children:t.jsx(re,{className:"h-5 w-5"})})]})})]})}),t.jsxs("div",{className:"lg:pl-64",children:[t.jsxs("header",{className:"sticky top-0 z-40 flex h-14 items-center gap-4 border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 px-4 lg:hidden",children:[t.jsx("button",{onClick:()=>e(!0),className:"text-gray-500 hover:text-gray-700 dark:text-gray-400","aria-expanded":a,"aria-controls":"mobile-sidebar","aria-label":"Open navigation menu",children:t.jsx(Ft,{className:"h-6 w-6","aria-hidden":"true"})}),t.jsxs(D,{to:"/",className:"flex items-center space-x-2",children:[t.jsx(U,{className:"h-6 w-6 text-primary-600"}),t.jsx("span",{className:"text-lg font-bold text-gray-900 dark:text-white",children:"NestLens"})]})]}),t.jsx("main",{className:"p-4 lg:p-6",children:t.jsx(Ce,{})})]})]})}function y(){return t.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:t.jsxs("div",{className:"flex flex-col items-center gap-3",children:[t.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-primary-600 dark:border-primary-400"}),t.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Loading..."})]})})}const ds=r.lazy(()=>k(()=>import("./DashboardPage-BnnZ3TMF.js"),__vite__mapDeps([0,1,2,3,4]))),us=r.lazy(()=>k(()=>import("./RequestsPage-B9-Qq2vH.js"),__vite__mapDeps([5,1,2,6,7]))),hs=r.lazy(()=>k(()=>import("./QueriesPage-Cpi1b2Mz.js"),__vite__mapDeps([8,1,2,6,7,3]))),ms=r.lazy(()=>k(()=>import("./ExceptionsPage-BoauuDFu.js"),__vite__mapDeps([9,1,2,6,7,10]))),ps=r.lazy(()=>k(()=>import("./LogsPage-z4yYJ1qQ.js"),__vite__mapDeps([11,1,2,6,7]))),xs=r.lazy(()=>k(()=>import("./EventsPage-DiPB0Sfy.js"),__vite__mapDeps([12,1,2,6,7]))),fs=r.lazy(()=>k(()=>import("./JobsPage-CHYjmhlh.js"),__vite__mapDeps([13,1,2,6,7]))),ys=r.lazy(()=>k(()=>import("./CachePage-CfA-UrdM.js"),__vite__mapDeps([14,1,2,6,7]))),gs=r.lazy(()=>k(()=>import("./MailPage-DQ2PuRS9.js"),__vite__mapDeps([15,1,2,6,7]))),js=r.lazy(()=>k(()=>import("./SchedulePage-BXPldddV.js"),__vite__mapDeps([16,1,17,2,6,7]))),bs=r.lazy(()=>k(()=>import("./HttpClientPage-5vVzz7TU.js"),__vite__mapDeps([18,1,2,6,7]))),ks=r.lazy(()=>k(()=>import("./RedisPage-C7vFV3r4.js"),__vite__mapDeps([19,1,2,6,7]))),vs=r.lazy(()=>k(()=>import("./ModelsPage-PBBI9K5M.js"),__vite__mapDeps([20,1,2,6,7]))),ws=r.lazy(()=>k(()=>import("./NotificationsPage-CjleWNhr.js"),__vite__mapDeps([21,1,2,6,7]))),Ss=r.lazy(()=>k(()=>import("./ViewsPage-COo7BNBc.js"),__vite__mapDeps([22,1,2,6,7,23]))),Ns=r.lazy(()=>k(()=>import("./CommandsPage-DJ1ZxHj8.js"),__vite__mapDeps([24,1,2,6,7]))),_s=r.lazy(()=>k(()=>import("./GatesPage-CB0kqyp_.js"),__vite__mapDeps([25,1,2,6,7]))),Es=r.lazy(()=>k(()=>import("./BatchesPage-DmqbLFCs.js"),__vite__mapDeps([26,1,2,6,7]))),Ps=r.lazy(()=>k(()=>import("./DumpsPage-fshG-ETf.js"),__vite__mapDeps([27,1,2,6,7]))),Cs=r.lazy(()=>k(()=>import("./GraphQLPage-_inMfKh4.js"),__vite__mapDeps([28,1,2,6,7]))),v=r.lazy(()=>k(()=>import("./EntryDetailPage-Cf7K34er.js"),__vite__mapDeps([29,1,2,7,3,10,17,4,23])));function Rs(){return t.jsx(Re,{children:t.jsxs(x,{path:"/",element:t.jsx(cs,{}),children:[t.jsx(x,{index:!0,element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ds,{})})}),t.jsx(x,{path:"requests",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(us,{})})}),t.jsx(x,{path:"queries",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(hs,{})})}),t.jsx(x,{path:"exceptions",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ms,{})})}),t.jsx(x,{path:"logs",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ps,{})})}),t.jsx(x,{path:"events",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(xs,{})})}),t.jsx(x,{path:"jobs",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(fs,{})})}),t.jsx(x,{path:"cache",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ys,{})})}),t.jsx(x,{path:"mail",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(gs,{})})}),t.jsx(x,{path:"schedule",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(js,{})})}),t.jsx(x,{path:"http-client",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(bs,{})})}),t.jsx(x,{path:"redis",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ks,{})})}),t.jsx(x,{path:"models",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(vs,{})})}),t.jsx(x,{path:"notifications",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(ws,{})})}),t.jsx(x,{path:"views",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Ss,{})})}),t.jsx(x,{path:"commands",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Ns,{})})}),t.jsx(x,{path:"gates",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(_s,{})})}),t.jsx(x,{path:"batches",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Es,{})})}),t.jsx(x,{path:"dumps",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Ps,{})})}),t.jsx(x,{path:"graphql",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(Cs,{})})}),t.jsx(x,{path:"requests/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"queries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"exceptions/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"logs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"events/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"jobs/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"cache/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"mail/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"schedule/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"http-client/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"redis/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"models/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"notifications/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"views/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"commands/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"gates/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"batches/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"dumps/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"graphql/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"entries/:id",element:t.jsx(r.Suspense,{fallback:t.jsx(y,{}),children:t.jsx(v,{})})}),t.jsx(x,{path:"*",element:t.jsx(Le,{to:"/",replace:!0})})]})})}class Ls extends r.Component{constructor(){super(...arguments);z(this,"state",{hasError:!1});z(this,"handleReload",()=>{window.location.reload()});z(this,"handleReset",()=>{this.setState({hasError:!1,error:void 0,errorInfo:void 0})})}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,i){console.error("ErrorBoundary caught an error:",e,i),this.setState({errorInfo:i})}render(){return this.state.hasError?this.props.fallback?this.props.fallback:t.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 p-4",children:t.jsxs("div",{className:"max-w-md w-full bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6 text-center",children:[t.jsx("div",{className:"mx-auto w-12 h-12 flex items-center justify-center rounded-full bg-red-100 dark:bg-red-900/30 mb-4",children:t.jsx(be,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),t.jsx("h1",{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:"Something went wrong"}),t.jsx("p",{className:"text-gray-600 dark:text-gray-400 mb-4",children:"An unexpected error occurred. Please try refreshing the page."}),this.state.error&&t.jsx("div",{className:"mb-4 p-3 bg-red-50 dark:bg-red-900/20 rounded-lg text-left",children:t.jsx("p",{className:"text-sm font-mono text-red-600 dark:text-red-400 break-all",children:this.state.error.message})}),t.jsxs("div",{className:"flex gap-3 justify-center",children:[t.jsx("button",{onClick:this.handleReset,className:"px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors",children:"Try Again"}),t.jsxs("button",{onClick:this.handleReload,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium text-white bg-primary-600 hover:bg-primary-700 rounded-lg transition-colors",children:[t.jsx(Wt,{className:"h-4 w-4"}),"Refresh Page"]})]}),!1]})}):this.props.children}}const Os=()=>{const s=window.location.pathname,a=s.indexOf("/nestlens");return a!==-1?s.substring(0,a+9):"/nestlens"};$e.createRoot(document.getElementById("root")).render(t.jsx(Oe.StrictMode,{children:t.jsx(Ls,{children:t.jsx(Ae,{basename:Os(),children:t.jsxs(is,{children:[t.jsx(Rs,{}),t.jsx(_t,{position:"bottom-right",toastOptions:{duration:3e3,style:{background:"#1f2937",color:"#f3f4f6",borderRadius:"0.5rem"},success:{iconTheme:{primary:"#10b981",secondary:"#f3f4f6"}},error:{iconTheme:{primary:"#ef4444",secondary:"#f3f4f6"}}}})]})})})}));export{Ot as A,Dt as B,Mt as C,qt as D,$t as F,zt as G,ne as H,Kt as L,Bt as M,Ht as P,Qt as R,Zt as S,be as T,Yt as X,Xt as a,Tt as b,g as c,It as d,At as e,Gt as f,ae as g,le as h,Wt as i,t as j,zs as k,Is as l,Ms as m,Bs as n,Vs as o,qs as p,$s as q,Ks as r,se as s,Jt as t,ls as u,Ds as v,q as z};
@@ -1,4 +1,4 @@
1
- import{c as q,j as t,g as A}from"./index-yKzNgrAF.js";import{b as d}from"./vendor-B2nVRih0.js";import{g as b}from"./ClickableBadge-BFhMLE2u.js";/**
1
+ import{c as q,j as t,g as A}from"./index-C8he4ZUV.js";import{b as d}from"./vendor-B2nVRih0.js";import{g as b}from"./ClickableBadge-CW4jdcpl.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as a}from"./index-yKzNgrAF.js";/**
1
+ import{c as a}from"./index-C8he4ZUV.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -5,7 +5,7 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/nestlens/nestlens-icon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>NestLens - Debug Dashboard</title>
8
- <script type="module" crossorigin src="/nestlens/assets/index-yKzNgrAF.js"></script>
8
+ <script type="module" crossorigin src="/nestlens/assets/index-C8he4ZUV.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/nestlens/assets/vendor-B2nVRih0.js">
10
10
  <link rel="stylesheet" crossorigin href="/nestlens/assets/index-CCwxFPOj.css">
11
11
  </head>
@@ -1 +1 @@
1
- {"version":3,"file":"base.adapter.d.ts","sourceRoot":"","sources":["../../../../src/watchers/graphql/adapters/base.adapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;AAExF;;GAEG;AACH,8BAAsB,kBAAkB;IACtC,SAAS,CAAC,MAAM,EAAG,qBAAqB,CAAC;IACzC,SAAS,CAAC,SAAS,EAAG,gBAAgB,CAAC;IACvC,SAAS,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAE/C;;OAEG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO;IAE/B;;OAEG;IACH,UAAU,CACR,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,gBAAgB,EAC3B,SAAS,CAAC,EAAE,oBAAoB,GAC/B,IAAI;IAMP;;OAEG;IACH,QAAQ,CAAC,SAAS,IAAI,OAAO;IAE7B;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,OAAO;IAIjC;;OAEG;IACH,SAAS,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO;IAiBhF;;OAEG;cACa,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUvF;;OAEG;cACa,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhG;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAiC3D;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAe5D;;OAEG;IACH,SAAS,CAAC,WAAW,CACnB,OAAO,EAAE,OAAO,GACf;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAyBrE;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;CAG9C;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAc/D"}
1
+ {"version":3,"file":"base.adapter.d.ts","sourceRoot":"","sources":["../../../../src/watchers/graphql/adapters/base.adapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;AAExF;;GAEG;AACH,8BAAsB,kBAAkB;IACtC,SAAS,CAAC,MAAM,EAAG,qBAAqB,CAAC;IACzC,SAAS,CAAC,SAAS,EAAG,gBAAgB,CAAC;IACvC,SAAS,CAAC,SAAS,CAAC,EAAE,oBAAoB,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,WAAW,CAAC;IAE/C;;OAEG;IACH,QAAQ,CAAC,WAAW,IAAI,OAAO;IAE/B;;OAEG;IACH,UAAU,CACR,MAAM,EAAE,qBAAqB,EAC7B,SAAS,EAAE,gBAAgB,EAC3B,SAAS,CAAC,EAAE,oBAAoB,GAC/B,IAAI;IAMP;;OAEG;IACH,QAAQ,CAAC,SAAS,IAAI,OAAO;IAE7B;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,SAAS,CAAC,YAAY,IAAI,OAAO;IAIjC;;OAEG;IACH,SAAS,CAAC,qBAAqB,CAAC,aAAa,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO;IAqBhF;;OAEG;cACa,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUvF;;OAEG;cACa,qBAAqB,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAUhG;;OAEG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAiC3D;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAe5D;;OAEG;IACH,SAAS,CAAC,WAAW,CACnB,OAAO,EAAE,OAAO,GACf;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS;IAyBrE;;OAEG;IACH,SAAS,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM;CAG9C;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,kBAAkB,CAAC;AAEtD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAc/D"}
@@ -38,8 +38,12 @@ class BaseGraphQLAdapter {
38
38
  // Check introspection
39
39
  if (this.config.ignoreIntrospection && query) {
40
40
  const lowerQuery = query.toLowerCase();
41
+ // Check for introspection fields: __schema and __type (but NOT __typename)
42
+ // __type is followed by ( or whitespace when used as introspection field
43
+ // __typename is a meta-field that Apollo Client adds for caching - should NOT be ignored
41
44
  if (lowerQuery.includes('__schema') ||
42
- lowerQuery.includes('__type') ||
45
+ /\b__type\s*\(/.test(lowerQuery) ||
46
+ /\b__type\s*\{/.test(lowerQuery) ||
43
47
  lowerQuery.includes('introspectionquery')) {
44
48
  return true;
45
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base.adapter.js","sourceRoot":"","sources":["../../../../src/watchers/graphql/adapters/base.adapter.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"base.adapter.js","sourceRoot":"","sources":["../../../../src/watchers/graphql/adapters/base.adapter.ts"],"names":[],"mappings":"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"}