nestlens 0.12.0 → 0.13.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 (79) hide show
  1. package/dist/api/api.controller.d.ts +17 -1
  2. package/dist/api/api.controller.js +13 -3
  3. package/dist/core/alerting.service.js +37 -1
  4. package/dist/core/collector.service.d.ts +18 -0
  5. package/dist/core/collector.service.js +26 -0
  6. package/dist/core/storage/redis-url.d.ts +26 -0
  7. package/dist/core/storage/redis-url.js +51 -0
  8. package/dist/core/storage/redis.storage.js +10 -44
  9. package/dist/dashboard/public/assets/{BatchDetailView-Kz8lmg7b.js → BatchDetailView-DZr7YDwl.js} +1 -1
  10. package/dist/dashboard/public/assets/{BatchesPage-DFiQiYm9.js → BatchesPage-2Hv2zWa4.js} +1 -1
  11. package/dist/dashboard/public/assets/{CacheDetailView-gWQ36gpT.js → CacheDetailView-DGXqcx8-.js} +1 -1
  12. package/dist/dashboard/public/assets/{CachePage-CcP5UUIo.js → CachePage-BU15yBss.js} +1 -1
  13. package/dist/dashboard/public/assets/{CommandDetailView-tLDOIYKo.js → CommandDetailView-li2tXFC7.js} +1 -1
  14. package/dist/dashboard/public/assets/{CommandsPage-x_pU8uSm.js → CommandsPage-DaKvbjLB.js} +1 -1
  15. package/dist/dashboard/public/assets/{CopyButton-Dp88z3zD.js → CopyButton-DzToeJlr.js} +1 -1
  16. package/dist/dashboard/public/assets/{DashboardPage-CHgsQI3w.js → DashboardPage-fYcPzXMR.js} +1 -1
  17. package/dist/dashboard/public/assets/{DataTable-CiPeRzYj.js → DataTable-B_I--NVC.js} +1 -1
  18. package/dist/dashboard/public/assets/{DetailRow-ZFijkJy9.js → DetailRow-Dc2FzrKz.js} +1 -1
  19. package/dist/dashboard/public/assets/{DumpDetailView-BQ_0UMzI.js → DumpDetailView-BaW5Zi1h.js} +1 -1
  20. package/dist/dashboard/public/assets/{DumpsPage-D0o-EOvX.js → DumpsPage-DmCtyQ1Q.js} +1 -1
  21. package/dist/dashboard/public/assets/{EntryDetailPage-BhGVuHY8.js → EntryDetailPage-CiECQkN4.js} +3 -3
  22. package/dist/dashboard/public/assets/{EntrySearchInput-BhuYJjcJ.js → EntrySearchInput-Cq-Ji-C2.js} +1 -1
  23. package/dist/dashboard/public/assets/{EventDetailView-CqB1VO-o.js → EventDetailView-BPeTgmqk.js} +1 -1
  24. package/dist/dashboard/public/assets/{EventsPage-BWvlMQOM.js → EventsPage-DW1hhOrJ.js} +1 -1
  25. package/dist/dashboard/public/assets/{ExceptionDetailView-BrwzI-Ny.js → ExceptionDetailView-B-V0O6G_.js} +1 -1
  26. package/dist/dashboard/public/assets/{ExceptionsPage-7wZOjI4L.js → ExceptionsPage-BuAt8VvQ.js} +1 -1
  27. package/dist/dashboard/public/assets/{GateDetailView-DETgnBEJ.js → GateDetailView-Kn1IPKwS.js} +1 -1
  28. package/dist/dashboard/public/assets/{GatesPage-Biem1pTa.js → GatesPage-B3eMpohX.js} +1 -1
  29. package/dist/dashboard/public/assets/{GraphQLDetailView-Z2P5Z_wK.js → GraphQLDetailView-uAonhJH8.js} +1 -1
  30. package/dist/dashboard/public/assets/{GraphQLPage-D7IVeu7T.js → GraphQLPage-Dv-1T6j_.js} +1 -1
  31. package/dist/dashboard/public/assets/{HttpClientDetailView-DjgiZtq7.js → HttpClientDetailView-CsBP-NRW.js} +1 -1
  32. package/dist/dashboard/public/assets/{HttpClientPage-D-9rOwxW.js → HttpClientPage-u1ZUWsG_.js} +1 -1
  33. package/dist/dashboard/public/assets/{JobDetailView-DVKXNyhm.js → JobDetailView-BjtxrqrA.js} +1 -1
  34. package/dist/dashboard/public/assets/{JobsPage-DudumyIp.js → JobsPage-DSBpskNC.js} +1 -1
  35. package/dist/dashboard/public/assets/{LogDetailView-Cdwx8HAo.js → LogDetailView-C8q-I_AQ.js} +1 -1
  36. package/dist/dashboard/public/assets/{LogsPage-DWkRIHul.js → LogsPage-CG-7wDcm.js} +1 -1
  37. package/dist/dashboard/public/assets/{MailDetailView-5VJ2aebx.js → MailDetailView-CQra2Fen.js} +1 -1
  38. package/dist/dashboard/public/assets/{MailPage-ClZNTH_r.js → MailPage-IJnGG2Dj.js} +1 -1
  39. package/dist/dashboard/public/assets/{ModelDetailView-Btpt8H6c.js → ModelDetailView-CqXFOspt.js} +1 -1
  40. package/dist/dashboard/public/assets/{ModelsPage-PxJ57v2N.js → ModelsPage-BRNDZcOZ.js} +1 -1
  41. package/dist/dashboard/public/assets/{NotificationDetailView-84rPC1SX.js → NotificationDetailView-c_SH4SBf.js} +1 -1
  42. package/dist/dashboard/public/assets/{NotificationsPage-qNuVSo-j.js → NotificationsPage-DTpaCZD5.js} +1 -1
  43. package/dist/dashboard/public/assets/{PageHeader-BlZTS6Mp.js → PageHeader-BLRAvkWc.js} +1 -1
  44. package/dist/dashboard/public/assets/{QueriesPage-BY0lUO0g.js → QueriesPage-CObP-nH5.js} +1 -1
  45. package/dist/dashboard/public/assets/{QueryDetailView-CIJHScnv.js → QueryDetailView-D-evIo6B.js} +1 -1
  46. package/dist/dashboard/public/assets/{RedisDetailView-C2MB0DYY.js → RedisDetailView-uM9LOGK-.js} +1 -1
  47. package/dist/dashboard/public/assets/{RedisPage-C0MTmo7p.js → RedisPage-BkBILFAA.js} +1 -1
  48. package/dist/dashboard/public/assets/{RequestDetailView-w80IdX1R.js → RequestDetailView-Bsr5V8FV.js} +1 -1
  49. package/dist/dashboard/public/assets/{RequestsPage-DDoBHD10.js → RequestsPage-C0ZycYjW.js} +1 -1
  50. package/dist/dashboard/public/assets/{ScheduleDetailView-DJyMNKdl.js → ScheduleDetailView-D1oDL2wj.js} +1 -1
  51. package/dist/dashboard/public/assets/{SchedulePage-D3Y5zH7a.js → SchedulePage-DQzehEF6.js} +1 -1
  52. package/dist/dashboard/public/assets/{UserCard-DWitStWv.js → UserCard-DCiq53By.js} +1 -1
  53. package/dist/dashboard/public/assets/{ViewDetailView-DVM9EkE8.js → ViewDetailView-CGYGCNEr.js} +1 -1
  54. package/dist/dashboard/public/assets/{ViewsPage-CvOj7zwQ.js → ViewsPage-tEd0XxCD.js} +1 -1
  55. package/dist/dashboard/public/assets/{calendar-DSvr3OS6.js → calendar-Cy_qncyr.js} +1 -1
  56. package/dist/dashboard/public/assets/{circle-alert-sFDCyGtd.js → circle-alert-BCQHt4U6.js} +1 -1
  57. package/dist/dashboard/public/assets/{circle-check-big-1nqSueTn.js → circle-check-big-CyDf-yDO.js} +1 -1
  58. package/dist/dashboard/public/assets/{circle-x-DuabRgyL.js → circle-x-D3OiizLY.js} +1 -1
  59. package/dist/dashboard/public/assets/{eye-Bx7jqdVx.js → eye-CCRjHtzP.js} +1 -1
  60. package/dist/dashboard/public/assets/{index-QEFm0Hwa.js → index-Db_zkULa.js} +2 -2
  61. package/dist/dashboard/public/assets/{search-CzOe6pQ2.js → search-C83cbagr.js} +1 -1
  62. package/dist/dashboard/public/assets/{send-CQVyUZLn.js → send-BsoLJbNI.js} +1 -1
  63. package/dist/dashboard/public/assets/{timer-Wzp2Wnna.js → timer-DP5XgATT.js} +1 -1
  64. package/dist/dashboard/public/assets/{types-Dd6NUxj7.js → types-DOZkJpXV.js} +1 -1
  65. package/dist/dashboard/public/assets/{users-64hxmfDp.js → users-lOn2MScD.js} +1 -1
  66. package/dist/dashboard/public/assets/{zap-DvUE0l48.js → zap-CXCUXb-_.js} +1 -1
  67. package/dist/dashboard/public/index.html +1 -1
  68. package/dist/index.d.ts +2 -1
  69. package/dist/index.js +0 -1
  70. package/dist/nestlens.config.d.ts +67 -5
  71. package/dist/nestlens.module.js +9 -2
  72. package/dist/presets.d.ts +29 -0
  73. package/dist/presets.js +78 -0
  74. package/dist/startup-summary.d.ts +15 -0
  75. package/dist/startup-summary.js +84 -0
  76. package/dist/types/entry.types.d.ts +13 -1
  77. package/dist/types/entry.types.js +33 -0
  78. package/dist/watchers/graphql/graphql.watcher.js +6 -1
  79. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{c as n,j as e,H as d,D as h,F as j,C as g}from"./index-QEFm0Hwa.js";import{p as c,f as u}from"./date-Dwgqy666.js";import{D as a,f}from"./DetailRow-ZFijkJy9.js";import{C as l}from"./types-Dd6NUxj7.js";import{C as N}from"./CopyButton-Dp88z3zD.js";import{C as y}from"./circle-check-big-1nqSueTn.js";import{C as x}from"./circle-x-DuabRgyL.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-BhGVuHY8.js";import"./search-CzOe6pQ2.js";/**
1
+ import{c as n,j as e,H as d,D as h,F as j,C as g}from"./index-Db_zkULa.js";import{p as c,f as u}from"./date-Dwgqy666.js";import{D as a,f}from"./DetailRow-Dc2FzrKz.js";import{C as l}from"./types-DOZkJpXV.js";import{C as N}from"./CopyButton-DzToeJlr.js";import{C as y}from"./circle-check-big-CyDf-yDO.js";import{C as x}from"./circle-x-D3OiizLY.js";import"./vendor-DBTT3jXp.js";import"./EntryDetailPage-CiECQkN4.js";import"./search-C83cbagr.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 r,H as l}from"./index-QEFm0Hwa.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as S,p as T}from"./date-Dwgqy666.js";import{u as A,a as $,P as z,R as H,N as L,L as b}from"./PageHeader-BlZTS6Mp.js";import{u as U,r as G,C as d}from"./types-Dd6NUxj7.js";import{T as o,D as I,b as K}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";function Y(){const p=M(),{addFilter:t,clearAll:u,serverFilters:c,headerFilters:m}=U("dumps"),{rangeFilters:h,windowMinutes:x}=A(),{entries:g,loading:f,refreshing:s,error:j,refresh:y,newEntriesCount:C,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:F,live:v,setAutoRefresh:D,meta:i,isHighlighted:E}=$({type:"dump",limit:50,filters:{...c,...h},windowMinutes:x}),n=g.filter(e=>G(e)),R=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)}MB`:`${(e/(1024*1024*1024)).toFixed(1)}GB`:"-",B=P.useMemo(()=>[{key:"operation",header:"Operation",width:"120px",render:e=>r.jsx(d,{onClick:a=>{a.stopPropagation(),t("operations",e.payload.operation)},children:e.payload.operation.toUpperCase()})},{key:"format",header:"Format",width:"100px",render:e=>r.jsx(d,{onClick:a=>{a.stopPropagation(),t("formats",e.payload.format)},className:"font-mono",children:e.payload.format})},{key:"records",header:"Records",width:"100px",align:"right",render:e=>e.payload.recordCount!==void 0?r.jsx(o,{children:e.payload.recordCount.toLocaleString()}):r.jsx(o,{secondary:!0,children:"-"})},{key:"size",header:"Size",width:"100px",align:"right",render:e=>r.jsx(o,{children:R(e.payload.fileSize)})},{key:"status",header:"Status",width:"100px",render:e=>r.jsx(d,{onClick:a=>{a.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>r.jsx(I,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>r.jsx(o,{secondary:!0,className:"text-xs",children:S(T(e.createdAt),{addSuffix:!0})})}],[t]);return f&&n.length===0?r.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.jsxs("div",{children:[r.jsx(z,{title:"Dumps",icon:l,iconColor:"text-slate-600 dark:text-slate-400",count:n.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:F,live:v,onAutoRefreshToggle:D,filters:m,filterControls:r.jsx(H,{route:"dumps"}),onClearAllFilters:u}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(L,{count:C,onClick:N,loading:s}),r.jsx(K,{columns:B,data:n,keyExtractor:e=>e.id,onRowClick:e=>p(`/dumps/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No data dumps recorded yet",error:j,onRetry:y,emptyIcon:r.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),r.jsx(b,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};
1
+ import{j as r,H as l}from"./index-Db_zkULa.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as S,p as T}from"./date-Dwgqy666.js";import{u as A,a as $,P as z,R as H,N as L,L as b}from"./PageHeader-BLRAvkWc.js";import{u as U,r as G,C as d}from"./types-DOZkJpXV.js";import{T as o,D as I,b as K}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";function Y(){const p=M(),{addFilter:t,clearAll:u,serverFilters:c,headerFilters:m}=U("dumps"),{rangeFilters:h,windowMinutes:x}=A(),{entries:g,loading:f,refreshing:s,error:j,refresh:y,newEntriesCount:C,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:F,live:v,setAutoRefresh:D,meta:i,isHighlighted:E}=$({type:"dump",limit:50,filters:{...c,...h},windowMinutes:x}),n=g.filter(e=>G(e)),R=e=>e?e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)}MB`:`${(e/(1024*1024*1024)).toFixed(1)}GB`:"-",B=P.useMemo(()=>[{key:"operation",header:"Operation",width:"120px",render:e=>r.jsx(d,{onClick:a=>{a.stopPropagation(),t("operations",e.payload.operation)},children:e.payload.operation.toUpperCase()})},{key:"format",header:"Format",width:"100px",render:e=>r.jsx(d,{onClick:a=>{a.stopPropagation(),t("formats",e.payload.format)},className:"font-mono",children:e.payload.format})},{key:"records",header:"Records",width:"100px",align:"right",render:e=>e.payload.recordCount!==void 0?r.jsx(o,{children:e.payload.recordCount.toLocaleString()}):r.jsx(o,{secondary:!0,children:"-"})},{key:"size",header:"Size",width:"100px",align:"right",render:e=>r.jsx(o,{children:R(e.payload.fileSize)})},{key:"status",header:"Status",width:"100px",render:e=>r.jsx(d,{onClick:a=>{a.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>r.jsx(I,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>r.jsx(o,{secondary:!0,className:"text-xs",children:S(T(e.createdAt),{addSuffix:!0})})}],[t]);return f&&n.length===0?r.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:r.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.jsxs("div",{children:[r.jsx(z,{title:"Dumps",icon:l,iconColor:"text-slate-600 dark:text-slate-400",count:n.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:F,live:v,onAutoRefreshToggle:D,filters:m,filterControls:r.jsx(H,{route:"dumps"}),onClearAllFilters:u}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(L,{count:C,onClick:N,loading:s}),r.jsx(K,{columns:B,data:n,keyExtractor:e=>e.id,onRowClick:e=>p(`/dumps/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No data dumps recorded yet",error:j,onRetry:y,emptyIcon:r.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),r.jsx(b,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetailView-w80IdX1R.js","./index-QEFm0Hwa.js","./vendor-DBTT3jXp.js","./index-C256oDAK.css","./date-Dwgqy666.js","./DetailRow-ZFijkJy9.js","./types-Dd6NUxj7.js","./UserCard-DWitStWv.js","./search-CzOe6pQ2.js","./QueryDetailView-CIJHScnv.js","./ExceptionDetailView-BrwzI-Ny.js","./LogDetailView-Cdwx8HAo.js","./EventDetailView-CqB1VO-o.js","./CopyButton-Dp88z3zD.js","./zap-DvUE0l48.js","./users-64hxmfDp.js","./JobDetailView-DVKXNyhm.js","./circle-alert-sFDCyGtd.js","./circle-check-big-1nqSueTn.js","./CacheDetailView-gWQ36gpT.js","./circle-x-DuabRgyL.js","./timer-Wzp2Wnna.js","./MailDetailView-5VJ2aebx.js","./ScheduleDetailView-DJyMNKdl.js","./format-BlNP-apw.js","./calendar-DSvr3OS6.js","./HttpClientDetailView-DjgiZtq7.js","./RedisDetailView-C2MB0DYY.js","./ModelDetailView-Btpt8H6c.js","./NotificationDetailView-84rPC1SX.js","./send-CQVyUZLn.js","./ViewDetailView-DVM9EkE8.js","./eye-Bx7jqdVx.js","./CommandDetailView-tLDOIYKo.js","./GateDetailView-DETgnBEJ.js","./BatchDetailView-Kz8lmg7b.js","./DumpDetailView-BQ_0UMzI.js","./GraphQLDetailView-Z2P5Z_wK.js","./DataTable-CiPeRzYj.js"])))=>i.map(i=>d[i]);
2
- import{c as O,j as e,y as fe,z as $,I as je,X as B,x as be,i as ke,J as ae,K as we,_ as b}from"./index-QEFm0Hwa.js";import{b as i,h as Ne,L as J}from"./vendor-DBTT3jXp.js";import{g as Ee,f as ve,p as Te}from"./date-Dwgqy666.js";import{t as Ce,C as h,i as X,a as Y,b as Z,c as K,d as re,e as le,f as ie,g as ne,h as oe,j as ee,k as ce,l as de,m as xe,n as pe,o as me,p as he,q as ge,r as ue,s as te}from"./types-Dd6NUxj7.js";import{S as L}from"./search-CzOe6pQ2.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetailView-Bsr5V8FV.js","./index-Db_zkULa.js","./vendor-DBTT3jXp.js","./index-C256oDAK.css","./date-Dwgqy666.js","./DetailRow-Dc2FzrKz.js","./types-DOZkJpXV.js","./UserCard-DCiq53By.js","./search-C83cbagr.js","./QueryDetailView-D-evIo6B.js","./ExceptionDetailView-B-V0O6G_.js","./LogDetailView-C8q-I_AQ.js","./EventDetailView-BPeTgmqk.js","./CopyButton-DzToeJlr.js","./zap-CXCUXb-_.js","./users-lOn2MScD.js","./JobDetailView-BjtxrqrA.js","./circle-alert-BCQHt4U6.js","./circle-check-big-CyDf-yDO.js","./CacheDetailView-DGXqcx8-.js","./circle-x-D3OiizLY.js","./timer-DP5XgATT.js","./MailDetailView-CQra2Fen.js","./ScheduleDetailView-D1oDL2wj.js","./format-BlNP-apw.js","./calendar-Cy_qncyr.js","./HttpClientDetailView-CsBP-NRW.js","./RedisDetailView-uM9LOGK-.js","./ModelDetailView-CqXFOspt.js","./NotificationDetailView-c_SH4SBf.js","./send-BsoLJbNI.js","./ViewDetailView-CGYGCNEr.js","./eye-CCRjHtzP.js","./CommandDetailView-li2tXFC7.js","./GateDetailView-Kn1IPKwS.js","./BatchDetailView-DZr7YDwl.js","./DumpDetailView-BaW5Zi1h.js","./GraphQLDetailView-uAonhJH8.js","./DataTable-B_I--NVC.js"])))=>i.map(i=>d[i]);
2
+ import{c as O,j as e,y as fe,z as $,I as je,X as B,x as be,i as ke,J as ae,K as we,_ as b}from"./index-Db_zkULa.js";import{b as i,h as Ne,L as J}from"./vendor-DBTT3jXp.js";import{g as Ee,f as ve,p as Te}from"./date-Dwgqy666.js";import{t as Ce,C as h,i as X,a as Y,b as Z,c as K,d as re,e as le,f as ie,g as ne,h as oe,j as ee,k as ce,l as de,m as xe,n as pe,o as me,p as he,q as ge,r as ue,s as te}from"./types-DOZkJpXV.js";import{S as L}from"./search-C83cbagr.js";/**
3
3
  * @license lucide-react v0.468.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -24,4 +24,4 @@ import{c as O,j as e,y as fe,z as $,I as je,X as B,x as be,i as ke,J as ae,K as
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
- */const G=O("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function se(t,a){if(!t||typeof window>"u")return a;const l=window.location.hash.slice(1);if(!l)return a;try{return new URLSearchParams(l).get(t)||a}catch{return a}}function Se({tabs:t,defaultTab:a,hashKey:l,headerRight:o,onTabChange:y}){var g,w;const s=a||((g=t[0])==null?void 0:g.id),[x,j]=i.useState(()=>se(l,s));i.useEffect(()=>{if(!l)return;const r=()=>{const d=se(l,s);j(d)};return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[l,s]);const N=i.useCallback(r=>{if(j(r),y==null||y(r),!l)return;const d=window.location.hash.slice(1),p=new URLSearchParams(d);r===s?p.delete(l):p.set(l,r);const T=p.toString(),A=T?`#${T}`:window.location.pathname+window.location.search;window.history.replaceState(null,"",A)},[l,s,y]),f=(w=t.find(r=>r.id===x))==null?void 0:w.content,c=i.useRef(new Map),n=i.useCallback((r,d)=>{var T;let p=null;switch(r.key){case"ArrowLeft":r.preventDefault(),p=d===0?t.length-1:d-1;break;case"ArrowRight":r.preventDefault(),p=d===t.length-1?0:d+1;break;case"Home":r.preventDefault(),p=0;break;case"End":r.preventDefault(),p=t.length-1;break}if(p!==null){const A=t[p];N(A.id),(T=c.current.get(A.id))==null||T.focus()}},[t,N]);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("div",{className:"flex flex-1",role:"tablist","aria-label":"Content tabs",children:t.map((r,d)=>e.jsxs("button",{ref:p=>{p&&c.current.set(r.id,p)},role:"tab","aria-selected":x===r.id,"aria-controls":`tabpanel-${r.id}`,id:`tab-${r.id}`,tabIndex:x===r.id?0:-1,onClick:()=>N(r.id),onKeyDown:p=>n(p,d),className:`px-4 py-2.5 text-sm font-medium transition-colors relative ${x===r.id?"text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-900":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[r.label,r.badge!==void 0&&r.badge>0&&e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300 rounded",children:r.badge})]}),x===r.id&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-indigo-600 dark:bg-indigo-400","aria-hidden":"true"})]},r.id))}),o&&e.jsx("div",{className:"px-3 flex items-center",children:o})]}),e.jsx("div",{role:"tabpanel",id:`tabpanel-${x}`,"aria-labelledby":`tab-${x}`,tabIndex:0,className:"bg-white dark:bg-gray-900",children:f})]})}function Ae({entryId:t,tags:a,onTagsChange:l,editable:o=!1,size:y="sm"}){const[s,x]=i.useState(!1),[j,N]=i.useState(""),[f,c]=i.useState(a),n=y==="sm"?"px-1.5 py-0.5 text-xs":"px-2 py-1 text-sm",g=async()=>{if(j.trim())try{const r=await je(t,[j.trim()]);c(r.data),l==null||l(r.data),N(""),x(!1)}catch(r){console.error("Failed to add tag:",r),$.error(`Could not add the tag: ${r.message}`)}},w=async r=>{try{const d=await fe(t,[r]);c(d.data),l==null||l(d.data)}catch(d){console.error("Failed to remove tag:",d),$.error(`Could not remove the tag: ${d.message}`)}};return f.length===0&&!o?null:e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[f.map(r=>e.jsxs("span",{className:`inline-flex items-center rounded font-bold uppercase tracking-wide shadow ${n} ${Ee(r)}`,children:[r.toUpperCase(),o&&e.jsx("button",{onClick:d=>{d.stopPropagation(),w(r)},"aria-label":`Remove tag ${r}`,className:"ml-1 hover:text-red-600 dark:hover:text-red-400",children:"×"})]},r)),o&&e.jsx(e.Fragment,{children:s?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"text",value:j,onChange:r=>N(r.target.value),onKeyDown:r=>{r.key==="Enter"&&g(),r.key==="Escape"&&x(!1)},placeholder:"New tag...","aria-label":"New tag",className:"px-2 py-0.5 text-xs border rounded dark:bg-gray-700 dark:border-gray-600 w-24",autoFocus:!0}),e.jsx("button",{onClick:g,"aria-label":"Save tag",className:"text-green-600 hover:text-green-700 text-xs",children:"+"}),e.jsx("button",{onClick:()=>x(!1),"aria-label":"Cancel adding a tag",className:"text-gray-400 hover:text-gray-600 text-xs",children:"×"})]}):e.jsx("button",{onClick:r=>{r.stopPropagation(),x(!0)},"aria-label":"Add a tag",className:`inline-flex items-center rounded-lg font-medium ${n} bg-gray-100 text-gray-500 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600`,children:"+ Tag"})})]})}function De(t){return t===null?"null":t===void 0?"undefined":Array.isArray(t)?"array":typeof t}function $e(t,a){return a==="array"?t.length:a==="object"?Object.keys(t).length:0}function Le(t,a,l){if(!a)return!1;const o=a.toLowerCase();return t===null?"null".includes(o):typeof t=="string"?t.toLowerCase().includes(o):typeof t=="number"||typeof t=="boolean"?String(t).includes(o):!1}function Q(t,a){if(!a)return!1;const l=a.toLowerCase();return t===null?"null".includes(l):typeof t=="string"?t.toLowerCase().includes(l):typeof t=="number"||typeof t=="boolean"?String(t).includes(l):Array.isArray(t)?t.some(o=>Q(o,a)):typeof t=="object"&&t!==null?Object.entries(t).some(([o,y])=>o.toLowerCase().includes(l)||Q(y,a)):!1}const Ve=i.memo(function t({keyName:a,value:l,depth:o,expandedPaths:y,onToggle:s,searchTerm:x,path:j,isArrayItem:N=!1}){const f=De(l),c=f==="object"||f==="array",n=y.has(j),g=$e(l,f),w=g===0,r=!!x&&((a==null?void 0:a.toLowerCase().includes(x.toLowerCase()))??!1),d=Le(l,x),p=r||d,T=i.useCallback(()=>{s(j)},[s,j]),A=i.useCallback(v=>{v.stopPropagation();const k=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(k),$.success("Copied!")},[l]),V=()=>{const v=d?"bg-yellow-400/30 rounded px-0.5":"";switch(f){case"null":return e.jsx("span",{className:`text-orange-600 dark:text-orange-400 italic ${v}`,children:"null"});case"undefined":return e.jsx("span",{className:`text-gray-500 italic ${v}`,children:"undefined"});case"boolean":return e.jsx("span",{className:`text-purple-600 dark:text-purple-400 ${v}`,children:String(l)});case"number":return e.jsx("span",{className:`text-cyan-600 dark:text-cyan-400 ${v}`,children:String(l)});case"string":{const k=l,D=300,R=k.length>D,P=R?k.slice(0,D):k,M=/^https?:\/\//.test(k),U=/^\d{4}-\d{2}-\d{2}/.test(k),u=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k);return e.jsxs("span",{className:`text-green-600 dark:text-green-400 ${v}`,children:['"',P,R&&e.jsxs("span",{className:"text-gray-500",children:["... (",k.length-D," more)"]}),'"',M&&e.jsx("span",{className:"ml-1 text-blue-600 dark:text-blue-400 text-xs",children:"(URL)"}),U&&e.jsx("span",{className:"ml-1 text-amber-600 dark:text-yellow-400 text-xs",children:"(Date)"}),u&&e.jsx("span",{className:"ml-1 text-pink-600 dark:text-pink-400 text-xs",children:"(Email)"})]})}case"array":return n?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"["}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["[",w?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[g," items"]}),"]"]});case"object":return n?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"{"}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["{",w?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[g," keys"]}),"}"]});default:return e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:String(l)})}},F=()=>{if(!c||!n)return null;const v=f==="array"?l.map((k,D)=>[String(D),k]):Object.entries(l);return e.jsxs(e.Fragment,{children:[v.map(([k,D])=>e.jsx(t,{keyName:k,value:D,depth:o+1,expandedPaths:y,onToggle:s,searchTerm:x,path:`${j}.${k}`,isArrayItem:f==="array"},`${j}.${k}`)),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"w-6 flex-shrink-0"}),e.jsx("div",{style:{paddingLeft:o*16+16},className:"text-gray-600 dark:text-gray-400",children:f==="array"?"]":"}"})]})]})},z=o*16;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`group flex items-start py-[1px] hover:bg-gray-100 dark:hover:bg-white/5 rounded cursor-pointer transition-colors ${p?"bg-yellow-500/10":""}`,onClick:c?T:void 0,children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("button",{onClick:A,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:"Copy value",children:e.jsx(I,{className:"w-4 h-4"})})}),e.jsxs("div",{className:"flex items-start flex-1",style:{paddingLeft:z},children:[e.jsx("span",{className:"w-4 h-5 flex items-center justify-center flex-shrink-0",children:c&&!w&&(n?e.jsx(be,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}):e.jsx(ke,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}))}),a!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`${N?"text-gray-500":"text-blue-700 dark:text-blue-300"} ${r?"bg-yellow-400/30 rounded px-0.5":""}`,children:N?a:`"${a}"`}),e.jsx("span",{className:"text-gray-500 mx-1",children:":"})]}),e.jsx("span",{className:"flex-1",children:V()})]})]}),F()]})});function ye({data:t,title:a,initialExpanded:l=!0,maxInitialDepth:o=2,searchable:y=!0,maxHeight:s=500,inline:x=!1,showToolbar:j=!1,externalSearchTerm:N}){const[f,c]=i.useState(!1),[n,g]=i.useState(""),[w,r]=i.useState(!1),d=N??n,p=g,[T,A]=i.useState(()=>{const u=new Set;if(l){const E=(m,C,_)=>{_>=o||(u.add(C),Array.isArray(m)?m.forEach((S,q)=>E(S,`${C}.${q}`,_+1)):typeof m=="object"&&m!==null&&Object.entries(m).forEach(([S,q])=>E(q,`${C}.${S}`,_+1)))};E(t,"root",0)}return u}),V=i.useMemo(()=>{const u=new Set;if(!d)return u;const E=(m,C)=>{Q(m,d)&&u.add(C),Array.isArray(m)?m.forEach((_,S)=>E(_,`${C}.${S}`)):typeof m=="object"&&m!==null&&Object.entries(m).forEach(([_,S])=>E(S,`${C}.${_}`))};return E(t,"root"),u},[d,t]),F=i.useMemo(()=>V.size===0?T:new Set([...T,...V]),[T,V]),z=i.useCallback(u=>{A(E=>{const m=new Set(E);return m.has(u)?m.delete(u):m.add(u),m})},[]),v=i.useCallback(()=>{const u=new Set,E=(m,C)=>{u.add(C),Array.isArray(m)?m.forEach((_,S)=>E(_,`${C}.${S}`)):typeof m=="object"&&m!==null&&Object.entries(m).forEach(([_,S])=>E(S,`${C}.${_}`))};E(t,"root"),A(u)},[t]),k=i.useCallback(()=>{A(new Set)},[]),D=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(t,null,2)),c(!0),$.success("JSON copied!"),setTimeout(()=>c(!1),2e3)}catch{$.error("Failed to copy")}},R=()=>{r(u=>!u),w&&p("")},P=e.jsx("div",{className:`p-3 overflow-auto font-mono text-sm ${x?"":"bg-white dark:bg-gray-800"}`,style:{maxHeight:typeof s=="number"?`${s}px`:s},children:e.jsx(Ve,{keyName:null,value:t,depth:0,expandedPaths:F,onToggle:z,searchTerm:d,path:"root"})}),M=e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:a}),e.jsxs("div",{className:`flex items-center space-x-1 ${a?"":"ml-auto"}`,children:[e.jsx("button",{onClick:v,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(H,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:k,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(G,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),y&&e.jsx("button",{onClick:R,className:`p-1.5 rounded transition-colors ${w?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:D,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:f?e.jsx(W,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]})]}),U=w&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:d,onChange:u=>p(u.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),d&&e.jsx("button",{onClick:()=>p(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(B,{className:"h-3.5 w-3.5"})})]})});return x?j?e.jsxs("div",{children:[M,U,P]}):P:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[a&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:a}),e.jsx("span",{className:"text-xs text-gray-500",children:Array.isArray(t)?`${t.length} items`:typeof t=="object"&&t!==null?`${Object.keys(t).length} keys`:""})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:v,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(H,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:k,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(G,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),y&&e.jsx("button",{onClick:R,className:`p-1.5 rounded transition-colors ${w?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search (Ctrl+F)",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:D,className:"flex items-center gap-1.5 px-2 py-1 text-xs font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:f?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"h-3.5 w-3.5 text-green-500"}),e.jsx("span",{className:"text-green-500",children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Copy"})]})})]})]}),w&&e.jsx("div",{className:"px-3 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/30",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:d,onChange:u=>p(u.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),d&&e.jsx("button",{onClick:()=>p(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(B,{className:"h-3.5 w-3.5"})})]})}),P]})}function Re({data:t,toolbarState:a,maxHeight:l=400,searchBar:o}){const y=`${a.expandAllTrigger}-${a.collapseAllTrigger}`,s=a.expandAllTrigger>a.collapseAllTrigger,x=s?100:a.collapseAllTrigger>0?0:2;return e.jsxs("div",{children:[o,e.jsx(ye,{data:t,inline:!0,maxHeight:l,initialExpanded:s||a.expandAllTrigger===0,maxInitialDepth:x,searchable:!1,showToolbar:!1,externalSearchTerm:a.searchTerm},y)]})}function Pe(){const[t,a]=i.useState({expandAllTrigger:0,collapseAllTrigger:0,showSearch:!1,searchTerm:""}),[l,o]=i.useState(!1),y=i.useCallback(()=>{a(n=>({...n,expandAllTrigger:n.expandAllTrigger+1}))},[]),s=i.useCallback(()=>{a(n=>({...n,collapseAllTrigger:n.collapseAllTrigger+1}))},[]),x=i.useCallback(()=>{a(n=>({...n,showSearch:!n.showSearch,searchTerm:n.showSearch?"":n.searchTerm}))},[]),j=i.useCallback(n=>{a(g=>({...g,searchTerm:n}))},[]),N=i.useCallback(async n=>{try{await navigator.clipboard.writeText(JSON.stringify(n,null,2)),o(!0),$.success("Copied!"),setTimeout(()=>o(!1),2e3)}catch{$.error("Failed to copy")}},[]),f=({data:n})=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:y,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(H,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:s,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(G,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),e.jsx("button",{onClick:x,className:`p-1.5 rounded transition-colors ${t.showSearch?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),n&&e.jsx("button",{onClick:()=>N(n),className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:l?e.jsx(W,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]}),c=t.showSearch?e.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:t.searchTerm,onChange:n=>j(n.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),t.searchTerm&&e.jsx("button",{onClick:()=>j(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(B,{className:"h-3.5 w-3.5"})})]})}):null;return{state:t,Toolbar:f,SearchBar:c}}function Oe({entry:t}){return e.jsx("div",{className:"flex items-center space-x-3",children:X(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"requests",children:nt(t.payload.path,t.payload.method)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.path})]}):Y(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"queries",filterType:"types",children:ot(t.payload.query)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.query.length>100?t.payload.query.substring(0,100)+"...":t.payload.query})]}):Z(t)?(()=>{var l;const a=t.payload.name&&t.payload.name.toLowerCase()!=="error"?t.payload.name:t.payload.code?String(t.payload.code):"Exception";return e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"exceptions",filterType:"names",children:a}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:((l=t.payload.request)==null?void 0:l.url)||t.payload.message})]})})():K(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"logs",filterType:"levels",children:t.payload.level.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.message.length>100?t.payload.message.substring(0,100)+"...":t.payload.message})]}):re(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"events",filterType:"names",children:t.payload.name}),e.jsxs("h1",{className:"text-sm text-gray-600 dark:text-gray-300",children:[t.payload.listeners.length," listener",t.payload.listeners.length!==1?"s":""," · ",t.payload.duration,"ms"]})]}):le(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"jobs",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t.payload.queue," · ",t.payload.duration?`${t.payload.duration}ms`:"-"]})]}):ie(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"cache",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),t.payload.operation==="get"&&e.jsx(h,{listType:"cache",children:t.payload.hit?"HIT":"MISS"}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.key.length>60?t.payload.key.substring(0,60)+"...":t.payload.key})]}):ne(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"mail",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.subject.length>60?t.payload.subject.substring(0,60)+"...":t.payload.subject})]}):oe(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"schedule",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),t.payload.cron&&e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 font-mono",children:t.payload.cron})]}):ee(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"http-client",filterType:"methods",filterValue:t.payload.method,children:t.payload.method}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.hostname||t.payload.url})]}):ce(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"redis",filterType:"commands",filterValue:t.payload.command,children:t.payload.command}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.keyPattern||"Redis Command"})]}):de(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"models",filterType:"actions",filterValue:t.payload.action,children:t.payload.action.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.entity})]}):xe(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"notifications",filterType:"types",filterValue:t.payload.type,children:t.payload.type}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.title||t.payload.recipient})]}):pe(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"views",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.template})]}):me(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"commands",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):he(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"gates",filterType:"results",filterValue:t.payload.allowed?"ALLOWED":"DENIED",children:t.payload.allowed?"ALLOWED":"DENIED"}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.gate})]}):ge(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"batches",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):ue(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"dumps",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.format})]}):te(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"graphql",filterType:"operationTypes",filterValue:t.payload.operationType,children:t.payload.operationType.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.operationName||"(anonymous)"}),t.payload.hasErrors&&e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",children:"Error"})]}):(()=>{const a=t;return e.jsxs(e.Fragment,{children:[e.jsx(h,{clickable:!1,children:a.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:a.requestId||`#${a.id}`})]})})()})}function Ie({entry:t}){const[a,l]=i.useState(t.tags??[]);return e.jsx("div",{className:"card","data-testid":"entry-tags",children:e.jsxs("div",{className:"p-4 flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Tags"}),e.jsx(Ae,{entryId:t.id,tags:a,editable:!0,onTagsChange:l})]})})}function Fe({entry:t}){return e.jsxs("div",{className:"flex items-center space-x-3","data-testid":"plain-heading",children:[e.jsx(h,{clickable:!1,children:t.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.requestId||`#${t.id}`})]})}function ze({entry:t}){return e.jsxs("div",{className:"card","data-testid":"raw-payload",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Entry payload"}),e.jsxs("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:["This entry does not have the shape the ",t.type," view expects, so it is shown as it was recorded."]})]}),e.jsx("div",{className:"p-4",children:e.jsx(ye,{data:t.payload??{},inline:!0})})]})}function Me(){return e.jsxs("div",{className:"animate-pulse space-y-3","aria-hidden":"true",children:[e.jsx("div",{className:"h-8 rounded bg-gray-100 dark:bg-gray-800"}),e.jsx("div",{className:"h-40 rounded bg-gray-100 dark:bg-gray-800"})]})}const Ue=i.lazy(()=>b(()=>import("./RequestDetailView-w80IdX1R.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),qe=i.lazy(()=>b(()=>import("./QueryDetailView-CIJHScnv.js"),__vite__mapDeps([9,1,2,3,4,5,6,8]),import.meta.url)),Je=i.lazy(()=>b(()=>import("./ExceptionDetailView-BrwzI-Ny.js"),__vite__mapDeps([10,1,2,3,4,5,6,8]),import.meta.url)),Be=i.lazy(()=>b(()=>import("./LogDetailView-Cdwx8HAo.js"),__vite__mapDeps([11,1,2,3,4,5,6,8]),import.meta.url)),We=i.lazy(()=>b(()=>import("./EventDetailView-CqB1VO-o.js"),__vite__mapDeps([12,1,2,3,13,6,4,14,15,8]),import.meta.url)),He=i.lazy(()=>b(()=>import("./JobDetailView-DVKXNyhm.js"),__vite__mapDeps([16,1,2,3,4,5,6,13,17,18,8]),import.meta.url)),Ge=i.lazy(()=>b(()=>import("./CacheDetailView-gWQ36gpT.js"),__vite__mapDeps([19,1,2,3,4,5,6,13,18,20,21,8]),import.meta.url)),Qe=i.lazy(()=>b(()=>import("./MailDetailView-5VJ2aebx.js"),__vite__mapDeps([22,1,2,3,6,4,5,13,20,18,15,17,8]),import.meta.url)),Xe=i.lazy(()=>b(()=>import("./ScheduleDetailView-DJyMNKdl.js"),__vite__mapDeps([23,1,2,3,24,6,4,5,20,18,21,25]),import.meta.url)),Ye=i.lazy(()=>b(()=>import("./HttpClientDetailView-DjgiZtq7.js"),__vite__mapDeps([26,1,2,3,4,5,6,8]),import.meta.url)),Ze=i.lazy(()=>b(()=>import("./RedisDetailView-C2MB0DYY.js"),__vite__mapDeps([27,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Ke=i.lazy(()=>b(()=>import("./ModelDetailView-Btpt8H6c.js"),__vite__mapDeps([28,1,2,3,4,5,6,13,20,8]),import.meta.url)),et=i.lazy(()=>b(()=>import("./NotificationDetailView-84rPC1SX.js"),__vite__mapDeps([29,1,2,3,4,5,6,13,18,20,30,8]),import.meta.url)),tt=i.lazy(()=>b(()=>import("./ViewDetailView-DVM9EkE8.js"),__vite__mapDeps([31,1,2,3,4,5,6,13,32,18,20,8]),import.meta.url)),at=i.lazy(()=>b(()=>import("./CommandDetailView-tLDOIYKo.js"),__vite__mapDeps([33,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),st=i.lazy(()=>b(()=>import("./GateDetailView-DETgnBEJ.js"),__vite__mapDeps([34,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),rt=i.lazy(()=>b(()=>import("./BatchDetailView-Kz8lmg7b.js"),__vite__mapDeps([35,1,2,3,4,5,6,13,20,17,18,8]),import.meta.url)),lt=i.lazy(()=>b(()=>import("./DumpDetailView-BQ_0UMzI.js"),__vite__mapDeps([36,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),it=i.lazy(()=>b(()=>import("./GraphQLDetailView-Z2P5Z_wK.js"),__vite__mapDeps([37,1,2,3,4,5,6,38,7,8,14,30]),import.meta.url));function nt(t,a){return t!=null&&t.toLowerCase().includes("/graphql")?"GRAPHQL":a.toUpperCase()}function ot(t){const a=t.trim().toUpperCase();return a.startsWith("SELECT")?"SELECT":a.startsWith("INSERT")?"INSERT":a.startsWith("UPDATE")?"UPDATE":a.startsWith("DELETE")?"DELETE":a.startsWith("CREATE")?"CREATE":a.startsWith("ALTER")?"ALTER":a.startsWith("DROP")?"DROP":a.startsWith("TRUNCATE")?"TRUNCATE":a.startsWith("BEGIN")||a.startsWith("START")?"TRANSACTION":a.startsWith("COMMIT")?"COMMIT":a.startsWith("ROLLBACK")?"ROLLBACK":"QUERY"}function ct(){var f;const{id:t}=Ne(),[a,l]=i.useState({entry:null,related:[]}),o=Pe(),y=a.id!==t,s=a.entry,x=a.related;if(i.useEffect(()=>{let c=!0;return(async()=>{if(t)try{const g=await we(parseInt(t,10));c&&l({id:t,entry:g.data,related:g.related??[]})}catch(g){console.error("Failed to fetch entry:",g);const w=g instanceof Error?g:new Error("Failed to load this entry"),r=/\b404\b/.test(w.message);c&&l({id:t,entry:null,related:[],failure:r?void 0:w})}})(),()=>{c=!1}},[t]),y)return e.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});if(!s){const c=a.failure;return e.jsxs("div",{className:"text-center py-12",role:c?"alert":void 0,children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white","data-testid":c?"entry-error":"entry-missing",children:c?"Could not load this entry":"Entry not found"}),c&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:c.message}),e.jsx(J,{to:"/",className:"text-primary-600 hover:text-primary-700 mt-4 inline-block",children:"Go back to dashboard"})]})}const j=()=>{if(X(s))return e.jsx(Ue,{entry:s,related:x});if(Y(s))return e.jsx(qe,{entry:s});if(Z(s))return e.jsx(Je,{entry:s});if(K(s))return e.jsx(Be,{entry:s});if(re(s))return e.jsx(We,{entry:s});if(le(s))return e.jsx(He,{entry:s});if(ie(s))return e.jsx(Ge,{entry:s});if(ne(s))return e.jsx(Qe,{entry:s});if(oe(s))return e.jsx(Xe,{entry:s});if(ee(s))return e.jsx(Ye,{entry:s});if(ce(s))return e.jsx(Ze,{entry:s});if(de(s))return e.jsx(Ke,{entry:s});if(xe(s))return e.jsx(et,{entry:s});if(pe(s))return e.jsx(tt,{entry:s});if(me(s))return e.jsx(at,{entry:s});if(he(s))return e.jsx(st,{entry:s});if(ge(s))return e.jsx(rt,{entry:s});if(ue(s))return e.jsx(lt,{entry:s});if(te(s))return e.jsx(it,{entry:s});const n=s.payload,g=[{id:"payload",label:"Payload",content:e.jsx(Re,{data:n,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsx(Se,{tabs:g,defaultTab:"payload",headerRight:e.jsx(o.Toolbar,{data:n})})},N=`/${((f=Ce(s.type))==null?void 0:f.route)??"requests"}`;return e.jsxs("div",{children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 h-16 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center space-x-4 px-4 lg:px-6 h-full",children:[e.jsx(J,{to:N,"aria-label":`Back to ${N.slice(1)}`,className:"p-2 hover:bg-gray-200 dark:hover:bg-gray-800 rounded-lg transition-colors",children:e.jsx(_e,{className:"h-5 w-5 text-gray-500"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(ae,{fallback:e.jsx(Fe,{entry:s}),children:e.jsx(Oe,{entry:s})},`heading-${s.id}`)})]})}),e.jsxs("div",{className:"pt-16 space-y-6",children:[e.jsx(Ie,{entry:s}),e.jsx(ae,{fallback:e.jsx(ze,{entry:s}),children:e.jsx(i.Suspense,{fallback:e.jsx(Me,{}),children:j()})},s.id),x.length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Related Entries (",x.length,")"]})}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:x.map(c=>e.jsx(J,{to:dt(c),className:"p-4 block hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(h,{clickable:!1,children:c.type.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:xt(c)})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:ve(Te(c.createdAt),{addSuffix:!0})})]})},c.id))})]})]})]})}function dt(t){return`/${{request:"requests",query:"queries",exception:"exceptions",log:"logs",event:"events",job:"jobs",cache:"cache",mail:"mail",schedule:"schedule","http-client":"http-client",redis:"redis",model:"models",notification:"notifications",view:"views",command:"commands",gate:"gates",batch:"batches",dump:"dumps",graphql:"graphql"}[t.type]||"entries"}/${t.id}`}function xt(t){if(Y(t)){const a=t.payload.query;return a.length>50?a.substring(0,50)+"...":a}if(Z(t))return`${t.payload.name}: ${t.payload.message}`;if(K(t)){const a=t.payload.message;return a.length>50?a.substring(0,50)+"...":a}return X(t)?`${t.payload.method} ${t.payload.path}`:ee(t)?`${t.payload.method} ${t.payload.hostname||t.payload.url}`:te(t)?`${t.payload.operationType} ${t.payload.operationName||"(anonymous)"}`:`Entry #${t.id}`}const yt=Object.freeze(Object.defineProperty({__proto__:null,default:ct},Symbol.toStringTag,{value:"Module"}));export{Re as C,yt as E,H as M,Se as T,W as a,I as b,G as c,Pe as u};
27
+ */const G=O("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function se(t,a){if(!t||typeof window>"u")return a;const l=window.location.hash.slice(1);if(!l)return a;try{return new URLSearchParams(l).get(t)||a}catch{return a}}function Se({tabs:t,defaultTab:a,hashKey:l,headerRight:o,onTabChange:y}){var g,w;const s=a||((g=t[0])==null?void 0:g.id),[x,j]=i.useState(()=>se(l,s));i.useEffect(()=>{if(!l)return;const r=()=>{const d=se(l,s);j(d)};return window.addEventListener("hashchange",r),()=>window.removeEventListener("hashchange",r)},[l,s]);const N=i.useCallback(r=>{if(j(r),y==null||y(r),!l)return;const d=window.location.hash.slice(1),p=new URLSearchParams(d);r===s?p.delete(l):p.set(l,r);const T=p.toString(),A=T?`#${T}`:window.location.pathname+window.location.search;window.history.replaceState(null,"",A)},[l,s,y]),f=(w=t.find(r=>r.id===x))==null?void 0:w.content,c=i.useRef(new Map),n=i.useCallback((r,d)=>{var T;let p=null;switch(r.key){case"ArrowLeft":r.preventDefault(),p=d===0?t.length-1:d-1;break;case"ArrowRight":r.preventDefault(),p=d===t.length-1?0:d+1;break;case"Home":r.preventDefault(),p=0;break;case"End":r.preventDefault(),p=t.length-1;break}if(p!==null){const A=t[p];N(A.id),(T=c.current.get(A.id))==null||T.focus()}},[t,N]);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("div",{className:"flex flex-1",role:"tablist","aria-label":"Content tabs",children:t.map((r,d)=>e.jsxs("button",{ref:p=>{p&&c.current.set(r.id,p)},role:"tab","aria-selected":x===r.id,"aria-controls":`tabpanel-${r.id}`,id:`tab-${r.id}`,tabIndex:x===r.id?0:-1,onClick:()=>N(r.id),onKeyDown:p=>n(p,d),className:`px-4 py-2.5 text-sm font-medium transition-colors relative ${x===r.id?"text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-900":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[r.label,r.badge!==void 0&&r.badge>0&&e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300 rounded",children:r.badge})]}),x===r.id&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-indigo-600 dark:bg-indigo-400","aria-hidden":"true"})]},r.id))}),o&&e.jsx("div",{className:"px-3 flex items-center",children:o})]}),e.jsx("div",{role:"tabpanel",id:`tabpanel-${x}`,"aria-labelledby":`tab-${x}`,tabIndex:0,className:"bg-white dark:bg-gray-900",children:f})]})}function Ae({entryId:t,tags:a,onTagsChange:l,editable:o=!1,size:y="sm"}){const[s,x]=i.useState(!1),[j,N]=i.useState(""),[f,c]=i.useState(a),n=y==="sm"?"px-1.5 py-0.5 text-xs":"px-2 py-1 text-sm",g=async()=>{if(j.trim())try{const r=await je(t,[j.trim()]);c(r.data),l==null||l(r.data),N(""),x(!1)}catch(r){console.error("Failed to add tag:",r),$.error(`Could not add the tag: ${r.message}`)}},w=async r=>{try{const d=await fe(t,[r]);c(d.data),l==null||l(d.data)}catch(d){console.error("Failed to remove tag:",d),$.error(`Could not remove the tag: ${d.message}`)}};return f.length===0&&!o?null:e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[f.map(r=>e.jsxs("span",{className:`inline-flex items-center rounded font-bold uppercase tracking-wide shadow ${n} ${Ee(r)}`,children:[r.toUpperCase(),o&&e.jsx("button",{onClick:d=>{d.stopPropagation(),w(r)},"aria-label":`Remove tag ${r}`,className:"ml-1 hover:text-red-600 dark:hover:text-red-400",children:"×"})]},r)),o&&e.jsx(e.Fragment,{children:s?e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("input",{type:"text",value:j,onChange:r=>N(r.target.value),onKeyDown:r=>{r.key==="Enter"&&g(),r.key==="Escape"&&x(!1)},placeholder:"New tag...","aria-label":"New tag",className:"px-2 py-0.5 text-xs border rounded dark:bg-gray-700 dark:border-gray-600 w-24",autoFocus:!0}),e.jsx("button",{onClick:g,"aria-label":"Save tag",className:"text-green-600 hover:text-green-700 text-xs",children:"+"}),e.jsx("button",{onClick:()=>x(!1),"aria-label":"Cancel adding a tag",className:"text-gray-400 hover:text-gray-600 text-xs",children:"×"})]}):e.jsx("button",{onClick:r=>{r.stopPropagation(),x(!0)},"aria-label":"Add a tag",className:`inline-flex items-center rounded-lg font-medium ${n} bg-gray-100 text-gray-500 hover:bg-gray-200 dark:bg-gray-700 dark:text-gray-400 dark:hover:bg-gray-600`,children:"+ Tag"})})]})}function De(t){return t===null?"null":t===void 0?"undefined":Array.isArray(t)?"array":typeof t}function $e(t,a){return a==="array"?t.length:a==="object"?Object.keys(t).length:0}function Le(t,a,l){if(!a)return!1;const o=a.toLowerCase();return t===null?"null".includes(o):typeof t=="string"?t.toLowerCase().includes(o):typeof t=="number"||typeof t=="boolean"?String(t).includes(o):!1}function Q(t,a){if(!a)return!1;const l=a.toLowerCase();return t===null?"null".includes(l):typeof t=="string"?t.toLowerCase().includes(l):typeof t=="number"||typeof t=="boolean"?String(t).includes(l):Array.isArray(t)?t.some(o=>Q(o,a)):typeof t=="object"&&t!==null?Object.entries(t).some(([o,y])=>o.toLowerCase().includes(l)||Q(y,a)):!1}const Ve=i.memo(function t({keyName:a,value:l,depth:o,expandedPaths:y,onToggle:s,searchTerm:x,path:j,isArrayItem:N=!1}){const f=De(l),c=f==="object"||f==="array",n=y.has(j),g=$e(l,f),w=g===0,r=!!x&&((a==null?void 0:a.toLowerCase().includes(x.toLowerCase()))??!1),d=Le(l,x),p=r||d,T=i.useCallback(()=>{s(j)},[s,j]),A=i.useCallback(v=>{v.stopPropagation();const k=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(k),$.success("Copied!")},[l]),V=()=>{const v=d?"bg-yellow-400/30 rounded px-0.5":"";switch(f){case"null":return e.jsx("span",{className:`text-orange-600 dark:text-orange-400 italic ${v}`,children:"null"});case"undefined":return e.jsx("span",{className:`text-gray-500 italic ${v}`,children:"undefined"});case"boolean":return e.jsx("span",{className:`text-purple-600 dark:text-purple-400 ${v}`,children:String(l)});case"number":return e.jsx("span",{className:`text-cyan-600 dark:text-cyan-400 ${v}`,children:String(l)});case"string":{const k=l,D=300,R=k.length>D,P=R?k.slice(0,D):k,M=/^https?:\/\//.test(k),U=/^\d{4}-\d{2}-\d{2}/.test(k),u=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(k);return e.jsxs("span",{className:`text-green-600 dark:text-green-400 ${v}`,children:['"',P,R&&e.jsxs("span",{className:"text-gray-500",children:["... (",k.length-D," more)"]}),'"',M&&e.jsx("span",{className:"ml-1 text-blue-600 dark:text-blue-400 text-xs",children:"(URL)"}),U&&e.jsx("span",{className:"ml-1 text-amber-600 dark:text-yellow-400 text-xs",children:"(Date)"}),u&&e.jsx("span",{className:"ml-1 text-pink-600 dark:text-pink-400 text-xs",children:"(Email)"})]})}case"array":return n?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"["}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["[",w?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[g," items"]}),"]"]});case"object":return n?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"{"}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["{",w?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[g," keys"]}),"}"]});default:return e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:String(l)})}},F=()=>{if(!c||!n)return null;const v=f==="array"?l.map((k,D)=>[String(D),k]):Object.entries(l);return e.jsxs(e.Fragment,{children:[v.map(([k,D])=>e.jsx(t,{keyName:k,value:D,depth:o+1,expandedPaths:y,onToggle:s,searchTerm:x,path:`${j}.${k}`,isArrayItem:f==="array"},`${j}.${k}`)),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"w-6 flex-shrink-0"}),e.jsx("div",{style:{paddingLeft:o*16+16},className:"text-gray-600 dark:text-gray-400",children:f==="array"?"]":"}"})]})]})},z=o*16;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`group flex items-start py-[1px] hover:bg-gray-100 dark:hover:bg-white/5 rounded cursor-pointer transition-colors ${p?"bg-yellow-500/10":""}`,onClick:c?T:void 0,children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("button",{onClick:A,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:"Copy value",children:e.jsx(I,{className:"w-4 h-4"})})}),e.jsxs("div",{className:"flex items-start flex-1",style:{paddingLeft:z},children:[e.jsx("span",{className:"w-4 h-5 flex items-center justify-center flex-shrink-0",children:c&&!w&&(n?e.jsx(be,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}):e.jsx(ke,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}))}),a!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`${N?"text-gray-500":"text-blue-700 dark:text-blue-300"} ${r?"bg-yellow-400/30 rounded px-0.5":""}`,children:N?a:`"${a}"`}),e.jsx("span",{className:"text-gray-500 mx-1",children:":"})]}),e.jsx("span",{className:"flex-1",children:V()})]})]}),F()]})});function ye({data:t,title:a,initialExpanded:l=!0,maxInitialDepth:o=2,searchable:y=!0,maxHeight:s=500,inline:x=!1,showToolbar:j=!1,externalSearchTerm:N}){const[f,c]=i.useState(!1),[n,g]=i.useState(""),[w,r]=i.useState(!1),d=N??n,p=g,[T,A]=i.useState(()=>{const u=new Set;if(l){const E=(m,C,_)=>{_>=o||(u.add(C),Array.isArray(m)?m.forEach((S,q)=>E(S,`${C}.${q}`,_+1)):typeof m=="object"&&m!==null&&Object.entries(m).forEach(([S,q])=>E(q,`${C}.${S}`,_+1)))};E(t,"root",0)}return u}),V=i.useMemo(()=>{const u=new Set;if(!d)return u;const E=(m,C)=>{Q(m,d)&&u.add(C),Array.isArray(m)?m.forEach((_,S)=>E(_,`${C}.${S}`)):typeof m=="object"&&m!==null&&Object.entries(m).forEach(([_,S])=>E(S,`${C}.${_}`))};return E(t,"root"),u},[d,t]),F=i.useMemo(()=>V.size===0?T:new Set([...T,...V]),[T,V]),z=i.useCallback(u=>{A(E=>{const m=new Set(E);return m.has(u)?m.delete(u):m.add(u),m})},[]),v=i.useCallback(()=>{const u=new Set,E=(m,C)=>{u.add(C),Array.isArray(m)?m.forEach((_,S)=>E(_,`${C}.${S}`)):typeof m=="object"&&m!==null&&Object.entries(m).forEach(([_,S])=>E(S,`${C}.${_}`))};E(t,"root"),A(u)},[t]),k=i.useCallback(()=>{A(new Set)},[]),D=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(t,null,2)),c(!0),$.success("JSON copied!"),setTimeout(()=>c(!1),2e3)}catch{$.error("Failed to copy")}},R=()=>{r(u=>!u),w&&p("")},P=e.jsx("div",{className:`p-3 overflow-auto font-mono text-sm ${x?"":"bg-white dark:bg-gray-800"}`,style:{maxHeight:typeof s=="number"?`${s}px`:s},children:e.jsx(Ve,{keyName:null,value:t,depth:0,expandedPaths:F,onToggle:z,searchTerm:d,path:"root"})}),M=e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:a}),e.jsxs("div",{className:`flex items-center space-x-1 ${a?"":"ml-auto"}`,children:[e.jsx("button",{onClick:v,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(H,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:k,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(G,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),y&&e.jsx("button",{onClick:R,className:`p-1.5 rounded transition-colors ${w?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:D,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:f?e.jsx(W,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]})]}),U=w&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:d,onChange:u=>p(u.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),d&&e.jsx("button",{onClick:()=>p(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(B,{className:"h-3.5 w-3.5"})})]})});return x?j?e.jsxs("div",{children:[M,U,P]}):P:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[a&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:a}),e.jsx("span",{className:"text-xs text-gray-500",children:Array.isArray(t)?`${t.length} items`:typeof t=="object"&&t!==null?`${Object.keys(t).length} keys`:""})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:v,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(H,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:k,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(G,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),y&&e.jsx("button",{onClick:R,className:`p-1.5 rounded transition-colors ${w?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search (Ctrl+F)",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:D,className:"flex items-center gap-1.5 px-2 py-1 text-xs font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:f?e.jsxs(e.Fragment,{children:[e.jsx(W,{className:"h-3.5 w-3.5 text-green-500"}),e.jsx("span",{className:"text-green-500",children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Copy"})]})})]})]}),w&&e.jsx("div",{className:"px-3 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/30",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:d,onChange:u=>p(u.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),d&&e.jsx("button",{onClick:()=>p(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(B,{className:"h-3.5 w-3.5"})})]})}),P]})}function Re({data:t,toolbarState:a,maxHeight:l=400,searchBar:o}){const y=`${a.expandAllTrigger}-${a.collapseAllTrigger}`,s=a.expandAllTrigger>a.collapseAllTrigger,x=s?100:a.collapseAllTrigger>0?0:2;return e.jsxs("div",{children:[o,e.jsx(ye,{data:t,inline:!0,maxHeight:l,initialExpanded:s||a.expandAllTrigger===0,maxInitialDepth:x,searchable:!1,showToolbar:!1,externalSearchTerm:a.searchTerm},y)]})}function Pe(){const[t,a]=i.useState({expandAllTrigger:0,collapseAllTrigger:0,showSearch:!1,searchTerm:""}),[l,o]=i.useState(!1),y=i.useCallback(()=>{a(n=>({...n,expandAllTrigger:n.expandAllTrigger+1}))},[]),s=i.useCallback(()=>{a(n=>({...n,collapseAllTrigger:n.collapseAllTrigger+1}))},[]),x=i.useCallback(()=>{a(n=>({...n,showSearch:!n.showSearch,searchTerm:n.showSearch?"":n.searchTerm}))},[]),j=i.useCallback(n=>{a(g=>({...g,searchTerm:n}))},[]),N=i.useCallback(async n=>{try{await navigator.clipboard.writeText(JSON.stringify(n,null,2)),o(!0),$.success("Copied!"),setTimeout(()=>o(!1),2e3)}catch{$.error("Failed to copy")}},[]),f=({data:n})=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:y,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(H,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:s,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(G,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),e.jsx("button",{onClick:x,className:`p-1.5 rounded transition-colors ${t.showSearch?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),n&&e.jsx("button",{onClick:()=>N(n),className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:l?e.jsx(W,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]}),c=t.showSearch?e.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:t.searchTerm,onChange:n=>j(n.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),t.searchTerm&&e.jsx("button",{onClick:()=>j(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(B,{className:"h-3.5 w-3.5"})})]})}):null;return{state:t,Toolbar:f,SearchBar:c}}function Oe({entry:t}){return e.jsx("div",{className:"flex items-center space-x-3",children:X(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"requests",children:nt(t.payload.path,t.payload.method)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.path})]}):Y(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"queries",filterType:"types",children:ot(t.payload.query)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.query.length>100?t.payload.query.substring(0,100)+"...":t.payload.query})]}):Z(t)?(()=>{var l;const a=t.payload.name&&t.payload.name.toLowerCase()!=="error"?t.payload.name:t.payload.code?String(t.payload.code):"Exception";return e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"exceptions",filterType:"names",children:a}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:((l=t.payload.request)==null?void 0:l.url)||t.payload.message})]})})():K(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"logs",filterType:"levels",children:t.payload.level.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.message.length>100?t.payload.message.substring(0,100)+"...":t.payload.message})]}):re(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"events",filterType:"names",children:t.payload.name}),e.jsxs("h1",{className:"text-sm text-gray-600 dark:text-gray-300",children:[t.payload.listeners.length," listener",t.payload.listeners.length!==1?"s":""," · ",t.payload.duration,"ms"]})]}):le(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"jobs",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t.payload.queue," · ",t.payload.duration?`${t.payload.duration}ms`:"-"]})]}):ie(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"cache",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),t.payload.operation==="get"&&e.jsx(h,{listType:"cache",children:t.payload.hit?"HIT":"MISS"}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.key.length>60?t.payload.key.substring(0,60)+"...":t.payload.key})]}):ne(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"mail",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.subject.length>60?t.payload.subject.substring(0,60)+"...":t.payload.subject})]}):oe(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"schedule",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),t.payload.cron&&e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 font-mono",children:t.payload.cron})]}):ee(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"http-client",filterType:"methods",filterValue:t.payload.method,children:t.payload.method}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.hostname||t.payload.url})]}):ce(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"redis",filterType:"commands",filterValue:t.payload.command,children:t.payload.command}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.keyPattern||"Redis Command"})]}):de(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"models",filterType:"actions",filterValue:t.payload.action,children:t.payload.action.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.entity})]}):xe(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"notifications",filterType:"types",filterValue:t.payload.type,children:t.payload.type}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.title||t.payload.recipient})]}):pe(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"views",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.template})]}):me(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"commands",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):he(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"gates",filterType:"results",filterValue:t.payload.allowed?"ALLOWED":"DENIED",children:t.payload.allowed?"ALLOWED":"DENIED"}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.gate})]}):ge(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"batches",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):ue(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"dumps",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.format})]}):te(t)?e.jsxs(e.Fragment,{children:[e.jsx(h,{listType:"graphql",filterType:"operationTypes",filterValue:t.payload.operationType,children:t.payload.operationType.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.operationName||"(anonymous)"}),t.payload.hasErrors&&e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",children:"Error"})]}):(()=>{const a=t;return e.jsxs(e.Fragment,{children:[e.jsx(h,{clickable:!1,children:a.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:a.requestId||`#${a.id}`})]})})()})}function Ie({entry:t}){const[a,l]=i.useState(t.tags??[]);return e.jsx("div",{className:"card","data-testid":"entry-tags",children:e.jsxs("div",{className:"p-4 flex items-center gap-3 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"Tags"}),e.jsx(Ae,{entryId:t.id,tags:a,editable:!0,onTagsChange:l})]})})}function Fe({entry:t}){return e.jsxs("div",{className:"flex items-center space-x-3","data-testid":"plain-heading",children:[e.jsx(h,{clickable:!1,children:t.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.requestId||`#${t.id}`})]})}function ze({entry:t}){return e.jsxs("div",{className:"card","data-testid":"raw-payload",children:[e.jsxs("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Entry payload"}),e.jsxs("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:["This entry does not have the shape the ",t.type," view expects, so it is shown as it was recorded."]})]}),e.jsx("div",{className:"p-4",children:e.jsx(ye,{data:t.payload??{},inline:!0})})]})}function Me(){return e.jsxs("div",{className:"animate-pulse space-y-3","aria-hidden":"true",children:[e.jsx("div",{className:"h-8 rounded bg-gray-100 dark:bg-gray-800"}),e.jsx("div",{className:"h-40 rounded bg-gray-100 dark:bg-gray-800"})]})}const Ue=i.lazy(()=>b(()=>import("./RequestDetailView-Bsr5V8FV.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),qe=i.lazy(()=>b(()=>import("./QueryDetailView-D-evIo6B.js"),__vite__mapDeps([9,1,2,3,4,5,6,8]),import.meta.url)),Je=i.lazy(()=>b(()=>import("./ExceptionDetailView-B-V0O6G_.js"),__vite__mapDeps([10,1,2,3,4,5,6,8]),import.meta.url)),Be=i.lazy(()=>b(()=>import("./LogDetailView-C8q-I_AQ.js"),__vite__mapDeps([11,1,2,3,4,5,6,8]),import.meta.url)),We=i.lazy(()=>b(()=>import("./EventDetailView-BPeTgmqk.js"),__vite__mapDeps([12,1,2,3,13,6,4,14,15,8]),import.meta.url)),He=i.lazy(()=>b(()=>import("./JobDetailView-BjtxrqrA.js"),__vite__mapDeps([16,1,2,3,4,5,6,13,17,18,8]),import.meta.url)),Ge=i.lazy(()=>b(()=>import("./CacheDetailView-DGXqcx8-.js"),__vite__mapDeps([19,1,2,3,4,5,6,13,18,20,21,8]),import.meta.url)),Qe=i.lazy(()=>b(()=>import("./MailDetailView-CQra2Fen.js"),__vite__mapDeps([22,1,2,3,6,4,5,13,20,18,15,17,8]),import.meta.url)),Xe=i.lazy(()=>b(()=>import("./ScheduleDetailView-D1oDL2wj.js"),__vite__mapDeps([23,1,2,3,24,6,4,5,20,18,21,25]),import.meta.url)),Ye=i.lazy(()=>b(()=>import("./HttpClientDetailView-CsBP-NRW.js"),__vite__mapDeps([26,1,2,3,4,5,6,8]),import.meta.url)),Ze=i.lazy(()=>b(()=>import("./RedisDetailView-uM9LOGK-.js"),__vite__mapDeps([27,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Ke=i.lazy(()=>b(()=>import("./ModelDetailView-CqXFOspt.js"),__vite__mapDeps([28,1,2,3,4,5,6,13,20,8]),import.meta.url)),et=i.lazy(()=>b(()=>import("./NotificationDetailView-c_SH4SBf.js"),__vite__mapDeps([29,1,2,3,4,5,6,13,18,20,30,8]),import.meta.url)),tt=i.lazy(()=>b(()=>import("./ViewDetailView-CGYGCNEr.js"),__vite__mapDeps([31,1,2,3,4,5,6,13,32,18,20,8]),import.meta.url)),at=i.lazy(()=>b(()=>import("./CommandDetailView-li2tXFC7.js"),__vite__mapDeps([33,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),st=i.lazy(()=>b(()=>import("./GateDetailView-Kn1IPKwS.js"),__vite__mapDeps([34,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),rt=i.lazy(()=>b(()=>import("./BatchDetailView-DZr7YDwl.js"),__vite__mapDeps([35,1,2,3,4,5,6,13,20,17,18,8]),import.meta.url)),lt=i.lazy(()=>b(()=>import("./DumpDetailView-BaW5Zi1h.js"),__vite__mapDeps([36,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),it=i.lazy(()=>b(()=>import("./GraphQLDetailView-uAonhJH8.js"),__vite__mapDeps([37,1,2,3,4,5,6,38,7,8,14,30]),import.meta.url));function nt(t,a){return t!=null&&t.toLowerCase().includes("/graphql")?"GRAPHQL":a.toUpperCase()}function ot(t){const a=t.trim().toUpperCase();return a.startsWith("SELECT")?"SELECT":a.startsWith("INSERT")?"INSERT":a.startsWith("UPDATE")?"UPDATE":a.startsWith("DELETE")?"DELETE":a.startsWith("CREATE")?"CREATE":a.startsWith("ALTER")?"ALTER":a.startsWith("DROP")?"DROP":a.startsWith("TRUNCATE")?"TRUNCATE":a.startsWith("BEGIN")||a.startsWith("START")?"TRANSACTION":a.startsWith("COMMIT")?"COMMIT":a.startsWith("ROLLBACK")?"ROLLBACK":"QUERY"}function ct(){var f;const{id:t}=Ne(),[a,l]=i.useState({entry:null,related:[]}),o=Pe(),y=a.id!==t,s=a.entry,x=a.related;if(i.useEffect(()=>{let c=!0;return(async()=>{if(t)try{const g=await we(parseInt(t,10));c&&l({id:t,entry:g.data,related:g.related??[]})}catch(g){console.error("Failed to fetch entry:",g);const w=g instanceof Error?g:new Error("Failed to load this entry"),r=/\b404\b/.test(w.message);c&&l({id:t,entry:null,related:[],failure:r?void 0:w})}})(),()=>{c=!1}},[t]),y)return e.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});if(!s){const c=a.failure;return e.jsxs("div",{className:"text-center py-12",role:c?"alert":void 0,children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white","data-testid":c?"entry-error":"entry-missing",children:c?"Could not load this entry":"Entry not found"}),c&&e.jsx("p",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:c.message}),e.jsx(J,{to:"/",className:"text-primary-600 hover:text-primary-700 mt-4 inline-block",children:"Go back to dashboard"})]})}const j=()=>{if(X(s))return e.jsx(Ue,{entry:s,related:x});if(Y(s))return e.jsx(qe,{entry:s});if(Z(s))return e.jsx(Je,{entry:s});if(K(s))return e.jsx(Be,{entry:s});if(re(s))return e.jsx(We,{entry:s});if(le(s))return e.jsx(He,{entry:s});if(ie(s))return e.jsx(Ge,{entry:s});if(ne(s))return e.jsx(Qe,{entry:s});if(oe(s))return e.jsx(Xe,{entry:s});if(ee(s))return e.jsx(Ye,{entry:s});if(ce(s))return e.jsx(Ze,{entry:s});if(de(s))return e.jsx(Ke,{entry:s});if(xe(s))return e.jsx(et,{entry:s});if(pe(s))return e.jsx(tt,{entry:s});if(me(s))return e.jsx(at,{entry:s});if(he(s))return e.jsx(st,{entry:s});if(ge(s))return e.jsx(rt,{entry:s});if(ue(s))return e.jsx(lt,{entry:s});if(te(s))return e.jsx(it,{entry:s});const n=s.payload,g=[{id:"payload",label:"Payload",content:e.jsx(Re,{data:n,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsx(Se,{tabs:g,defaultTab:"payload",headerRight:e.jsx(o.Toolbar,{data:n})})},N=`/${((f=Ce(s.type))==null?void 0:f.route)??"requests"}`;return e.jsxs("div",{children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 h-16 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center space-x-4 px-4 lg:px-6 h-full",children:[e.jsx(J,{to:N,"aria-label":`Back to ${N.slice(1)}`,className:"p-2 hover:bg-gray-200 dark:hover:bg-gray-800 rounded-lg transition-colors",children:e.jsx(_e,{className:"h-5 w-5 text-gray-500"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(ae,{fallback:e.jsx(Fe,{entry:s}),children:e.jsx(Oe,{entry:s})},`heading-${s.id}`)})]})}),e.jsxs("div",{className:"pt-16 space-y-6",children:[e.jsx(Ie,{entry:s}),e.jsx(ae,{fallback:e.jsx(ze,{entry:s}),children:e.jsx(i.Suspense,{fallback:e.jsx(Me,{}),children:j()})},s.id),x.length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Related Entries (",x.length,")"]})}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:x.map(c=>e.jsx(J,{to:dt(c),className:"p-4 block hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(h,{clickable:!1,children:c.type.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:xt(c)})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:ve(Te(c.createdAt),{addSuffix:!0})})]})},c.id))})]})]})]})}function dt(t){return`/${{request:"requests",query:"queries",exception:"exceptions",log:"logs",event:"events",job:"jobs",cache:"cache",mail:"mail",schedule:"schedule","http-client":"http-client",redis:"redis",model:"models",notification:"notifications",view:"views",command:"commands",gate:"gates",batch:"batches",dump:"dumps",graphql:"graphql"}[t.type]||"entries"}/${t.id}`}function xt(t){if(Y(t)){const a=t.payload.query;return a.length>50?a.substring(0,50)+"...":a}if(Z(t))return`${t.payload.name}: ${t.payload.message}`;if(K(t)){const a=t.payload.message;return a.length>50?a.substring(0,50)+"...":a}return X(t)?`${t.payload.method} ${t.payload.path}`:ee(t)?`${t.payload.method} ${t.payload.hostname||t.payload.url}`:te(t)?`${t.payload.operationType} ${t.payload.operationName||"(anonymous)"}`:`Entry #${t.id}`}const yt=Object.freeze(Object.defineProperty({__proto__:null,default:ct},Symbol.toStringTag,{value:"Module"}));export{Re as C,yt as E,H as M,Se as T,W as a,I as b,G as c,Pe as u};
@@ -1 +1 @@
1
- import{j as t,X as p}from"./index-QEFm0Hwa.js";import{f as g,b as o}from"./vendor-DBTT3jXp.js";import{S as x}from"./search-CzOe6pQ2.js";function S({placeholder:n="Search..."}){const[u,l]=g(),r=u.get("search")??"",[e,s]=o.useState(r),[h,i]=o.useState(r);return r!==h&&(i(r),s(r)),o.useEffect(()=>{const c=setTimeout(()=>{l(m=>{const a=new URLSearchParams(m);return(a.get("search")||"")===e||(e?a.set("search",e):a.delete("search")),a},{replace:!0})},350);return()=>clearTimeout(c)},[e,l]),t.jsxs("div",{className:"relative",children:[t.jsx(x,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"}),t.jsx("input",{type:"text",value:e,onChange:c=>s(c.target.value),placeholder:n,"aria-label":n,className:"w-full pl-9 pr-9 py-2 text-sm rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"}),e&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":"Clear search",children:t.jsx(p,{className:"h-4 w-4"})})]})}export{S as E};
1
+ import{j as t,X as p}from"./index-Db_zkULa.js";import{f as g,b as o}from"./vendor-DBTT3jXp.js";import{S as x}from"./search-C83cbagr.js";function S({placeholder:n="Search..."}){const[u,l]=g(),r=u.get("search")??"",[e,s]=o.useState(r),[h,i]=o.useState(r);return r!==h&&(i(r),s(r)),o.useEffect(()=>{const c=setTimeout(()=>{l(m=>{const a=new URLSearchParams(m);return(a.get("search")||"")===e||(e?a.set("search",e):a.delete("search")),a},{replace:!0})},350);return()=>clearTimeout(c)},[e,l]),t.jsxs("div",{className:"relative",children:[t.jsx(x,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"}),t.jsx("input",{type:"text",value:e,onChange:c=>s(c.target.value),placeholder:n,"aria-label":n,className:"w-full pl-9 pr-9 py-2 text-sm rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"}),e&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":"Clear search",children:t.jsx(p,{className:"h-4 w-4"})})]})}export{S as E};
@@ -1 +1 @@
1
- import{j as e,C as x,D as o}from"./index-QEFm0Hwa.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-BhGVuHY8.js";import{C as l}from"./CopyButton-Dp88z3zD.js";import{C as y}from"./types-Dd6NUxj7.js";import{Z as j}from"./zap-DvUE0l48.js";import{U as N}from"./users-64hxmfDp.js";import"./date-Dwgqy666.js";import"./search-CzOe6pQ2.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
1
+ import{j as e,C as x,D as o}from"./index-Db_zkULa.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-CiECQkN4.js";import{C as l}from"./CopyButton-DzToeJlr.js";import{C as y}from"./types-DOZkJpXV.js";import{Z as j}from"./zap-CXCUXb-_.js";import{U as N}from"./users-lOn2MScD.js";import"./date-Dwgqy666.js";import"./search-C83cbagr.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
@@ -1 +1 @@
1
- import{j as t,R as i}from"./index-QEFm0Hwa.js";import{e as F,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./date-Dwgqy666.js";import{u as A,a as P,P as L,R as B,N as H,L as I}from"./PageHeader-BlZTS6Mp.js";import{u as S,d as W,C as $}from"./types-Dd6NUxj7.js";import{T as o,D as q,b as z}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";function X(){const l=F(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m}=S("events"),{rangeFilters:u,windowMinutes:h}=A(),{entries:g,loading:x,refreshing:s,error:p,refresh:f,newEntriesCount:y,hasMore:v,loadMore:j,loadNew:C,autoRefreshEnabled:w,live:E,setAutoRefresh:N,meta:r,isHighlighted:k}=P({type:"event",limit:50,filters:{...c,...u},windowMinutes:h}),a=g.filter(e=>W(e)),R=D.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx($,{onClick:b=>{b.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(q,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[n]);return x&&a.length===0?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"})}):t.jsxs("div",{children:[t.jsx(L,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:a.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:w,live:E,onAutoRefreshToggle:N,filters:m,filterControls:t.jsx(B,{route:"events"}),onClearAllFilters:d}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:y,onClick:C,loading:s}),t.jsx(z,{columns:R,data:a,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>k(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",error:p,onRetry:f,emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(I,{hasMore:v,onClick:j,loading:s})]})]})}export{X as default};
1
+ import{j as t,R as i}from"./index-Db_zkULa.js";import{e as F,b as D}from"./vendor-DBTT3jXp.js";import{f as M,p as T}from"./date-Dwgqy666.js";import{u as A,a as P,P as L,R as B,N as H,L as I}from"./PageHeader-BLRAvkWc.js";import{u as S,d as W,C as $}from"./types-DOZkJpXV.js";import{T as o,D as q,b as z}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";function X(){const l=F(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m}=S("events"),{rangeFilters:u,windowMinutes:h}=A(),{entries:g,loading:x,refreshing:s,error:p,refresh:f,newEntriesCount:y,hasMore:v,loadMore:j,loadNew:C,autoRefreshEnabled:w,live:E,setAutoRefresh:N,meta:r,isHighlighted:k}=P({type:"event",limit:50,filters:{...c,...u},windowMinutes:h}),a=g.filter(e=>W(e)),R=D.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx($,{onClick:b=>{b.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(q,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:M(T(e.createdAt),{addSuffix:!0})})}],[n]);return x&&a.length===0?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"})}):t.jsxs("div",{children:[t.jsx(L,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:a.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:w,live:E,onAutoRefreshToggle:N,filters:m,filterControls:t.jsx(B,{route:"events"}),onClearAllFilters:d}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:y,onClick:C,loading:s}),t.jsx(z,{columns:R,data:a,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>k(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",error:p,onRetry:f,emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(I,{hasMore:v,onClick:j,loading:s})]})]})}export{X as default};
@@ -1,4 +1,4 @@
1
- import{c as k,j as e,x as v,z as j}from"./index-QEFm0Hwa.js";import{p as f,f as w}from"./date-Dwgqy666.js";import{D as c,f as T}from"./DetailRow-ZFijkJy9.js";import{C as y}from"./types-Dd6NUxj7.js";import{a as C,b as q,u as S,C as F,T as I}from"./EntryDetailPage-BhGVuHY8.js";import{b as g}from"./vendor-DBTT3jXp.js";import"./search-CzOe6pQ2.js";/**
1
+ import{c as k,j as e,x as v,z as j}from"./index-Db_zkULa.js";import{p as f,f as w}from"./date-Dwgqy666.js";import{D as c,f as T}from"./DetailRow-Dc2FzrKz.js";import{C as y}from"./types-DOZkJpXV.js";import{a as C,b as q,u as S,C as F,T as I}from"./EntryDetailPage-CiECQkN4.js";import{b as g}from"./vendor-DBTT3jXp.js";import"./search-C83cbagr.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 z,u as H,q as G,s as U,E as J,z as f,j as t,l as K,T as y}from"./index-QEFm0Hwa.js";import{e as O,b as r}from"./vendor-DBTT3jXp.js";import{f as Q,p as V}from"./date-Dwgqy666.js";import{u as X,a as Y,P as Z,F as _,R as ee,N as te,L as se}from"./PageHeader-BlZTS6Mp.js";import{u as ae,b as re,C as h}from"./types-Dd6NUxj7.js";import{E as oe}from"./EntrySearchInput-BhuYJjcJ.js";import{T as o,b as ie}from"./DataTable-CiPeRzYj.js";import{C as le}from"./circle-check-big-1nqSueTn.js";import"./timer-Wzp2Wnna.js";import"./search-CzOe6pQ2.js";/**
1
+ import{c as z,u as H,q as G,s as U,E as J,z as f,j as t,l as K,T as y}from"./index-Db_zkULa.js";import{e as O,b as r}from"./vendor-DBTT3jXp.js";import{f as Q,p as V}from"./date-Dwgqy666.js";import{u as X,a as Y,P as Z,F as _,R as ee,N as te,L as se}from"./PageHeader-BLRAvkWc.js";import{u as ae,b as re,C as h}from"./types-DOZkJpXV.js";import{E as oe}from"./EntrySearchInput-Cq-Ji-C2.js";import{T as o,b as ie}from"./DataTable-B_I--NVC.js";import{C as le}from"./circle-check-big-CyDf-yDO.js";import"./timer-DP5XgATT.js";import"./search-C83cbagr.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 m,j as e,S as i,C as g}from"./index-QEFm0Hwa.js";import{p as d,f as h}from"./date-Dwgqy666.js";import{D as s,f as j}from"./DetailRow-ZFijkJy9.js";import{C as x}from"./types-Dd6NUxj7.js";import{u as p,C as b,T as u}from"./EntryDetailPage-BhGVuHY8.js";import{C as y}from"./CopyButton-Dp88z3zD.js";import{C as N}from"./circle-check-big-1nqSueTn.js";import{C as f}from"./circle-x-DuabRgyL.js";import"./vendor-DBTT3jXp.js";import"./search-CzOe6pQ2.js";/**
1
+ import{c as m,j as e,S as i,C as g}from"./index-Db_zkULa.js";import{p as d,f as h}from"./date-Dwgqy666.js";import{D as s,f as j}from"./DetailRow-Dc2FzrKz.js";import{C as x}from"./types-DOZkJpXV.js";import{u as p,C as b,T as u}from"./EntryDetailPage-CiECQkN4.js";import{C as y}from"./CopyButton-DzToeJlr.js";import{C as N}from"./circle-check-big-CyDf-yDO.js";import{C as f}from"./circle-x-D3OiizLY.js";import"./vendor-DBTT3jXp.js";import"./search-C83cbagr.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 n}from"./index-QEFm0Hwa.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as T,p as S}from"./date-Dwgqy666.js";import{u as W,a as G,P as B,R as D,N as I,L}from"./PageHeader-BlZTS6Mp.js";import{u as H,p as U,C as d}from"./types-Dd6NUxj7.js";import{T as a,b as J}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";function X(){const c=M(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:p}=H("gates"),{rangeFilters:x,windowMinutes:m}=W(),{entries:g,loading:y,refreshing:i,error:f,refresh:j,newEntriesCount:b,hasMore:w,loadMore:k,loadNew:C,autoRefreshEnabled:N,live:E,setAutoRefresh:R,meta:o,isHighlighted:v}=G({type:"gate",limit:50,filters:{...h,...x},windowMinutes:m}),l=g.filter(e=>U(e)),F=P.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(d,{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(d,{onClick:A=>{A.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:T(S(e.createdAt),{addSuffix:!0})})}],[s]);return y&&l.length===0?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"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Gates",icon:n,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:N,live:E,onAutoRefreshToggle:R,filters:p,filterControls:t.jsx(D,{route:"gates"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:b,onClick:C,loading:i}),t.jsx(J,{columns:F,data:l,keyExtractor:e=>e.id,onRowClick:e=>c(`/gates/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",error:f,onRetry:j,emptyIcon:t.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:w,onClick:k,loading:i})]})]})}export{X as default};
1
+ import{j as t,S as n}from"./index-Db_zkULa.js";import{e as M,b as P}from"./vendor-DBTT3jXp.js";import{f as T,p as S}from"./date-Dwgqy666.js";import{u as W,a as G,P as B,R as D,N as I,L}from"./PageHeader-BLRAvkWc.js";import{u as H,p as U,C as d}from"./types-DOZkJpXV.js";import{T as a,b as J}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";function X(){const c=M(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:p}=H("gates"),{rangeFilters:x,windowMinutes:m}=W(),{entries:g,loading:y,refreshing:i,error:f,refresh:j,newEntriesCount:b,hasMore:w,loadMore:k,loadNew:C,autoRefreshEnabled:N,live:E,setAutoRefresh:R,meta:o,isHighlighted:v}=G({type:"gate",limit:50,filters:{...h,...x},windowMinutes:m}),l=g.filter(e=>U(e)),F=P.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(d,{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(d,{onClick:A=>{A.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:T(S(e.createdAt),{addSuffix:!0})})}],[s]);return y&&l.length===0?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"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Gates",icon:n,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:N,live:E,onAutoRefreshToggle:R,filters:p,filterControls:t.jsx(D,{route:"gates"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:b,onClick:C,loading:i}),t.jsx(J,{columns:F,data:l,keyExtractor:e=>e.id,onRowClick:e=>c(`/gates/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",error:f,onRetry:j,emptyIcon:t.jsx(n,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:w,onClick:k,loading:i})]})]})}export{X as default};
@@ -1,4 +1,4 @@
1
- import{c as z,z as q,j as e,X as H,x as P,i as U,L as B,C as _,T as W}from"./index-QEFm0Hwa.js";import{b as j,e as J}from"./vendor-DBTT3jXp.js";import{p as R,f as X}from"./date-Dwgqy666.js";import{D as g,f as Z}from"./DetailRow-ZFijkJy9.js";import{C as $,B as K}from"./types-Dd6NUxj7.js";import{G as Y,N as ee}from"./DataTable-CiPeRzYj.js";import{M as ae,c as se,a as te,b as re,u as D,C as L,T as M}from"./EntryDetailPage-BhGVuHY8.js";import{U as le}from"./UserCard-DWitStWv.js";import{S as Q}from"./search-CzOe6pQ2.js";import{Z as ne}from"./zap-DvUE0l48.js";import{S as ie}from"./send-CQVyUZLn.js";/**
1
+ import{c as z,z as q,j as e,X as H,x as P,i as U,L as B,C as _,T as W}from"./index-Db_zkULa.js";import{b as j,e as J}from"./vendor-DBTT3jXp.js";import{p as R,f as X}from"./date-Dwgqy666.js";import{D as g,f as Z}from"./DetailRow-Dc2FzrKz.js";import{C as $,B as K}from"./types-DOZkJpXV.js";import{G as Y,N as ee}from"./DataTable-B_I--NVC.js";import{M as ae,c as se,a as te,b as re,u as D,C as L,T as M}from"./EntryDetailPage-CiECQkN4.js";import{U as le}from"./UserCard-DCiq53By.js";import{S as Q}from"./search-C83cbagr.js";import{Z as ne}from"./zap-CXCUXb-_.js";import{S as ie}from"./send-BsoLJbNI.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 Q,j as a}from"./index-QEFm0Hwa.js";import{e as U,f as W,b as d}from"./vendor-DBTT3jXp.js";import{f as I,p as O}from"./date-Dwgqy666.js";import{E as z}from"./EntrySearchInput-BhuYJjcJ.js";import{u as V,a as $,P as J,R as K,N as X,L as Y}from"./PageHeader-BlZTS6Mp.js";import{u as Z,s as _,C as x}from"./types-Dd6NUxj7.js";import{T as c,G as ee,N as ae,D as re,a as te,b as se}from"./DataTable-CiPeRzYj.js";import"./search-CzOe6pQ2.js";import"./timer-Wzp2Wnna.js";/**
1
+ import{c as Q,j as a}from"./index-Db_zkULa.js";import{e as U,f as W,b as d}from"./vendor-DBTT3jXp.js";import{f as I,p as O}from"./date-Dwgqy666.js";import{E as z}from"./EntrySearchInput-Cq-Ji-C2.js";import{u as V,a as $,P as J,R as K,N as X,L as Y}from"./PageHeader-BLRAvkWc.js";import{u as Z,s as _,C as x}from"./types-DOZkJpXV.js";import{T as c,G as ee,N as ae,D as re,a as te,b as se}from"./DataTable-B_I--NVC.js";import"./search-C83cbagr.js";import"./timer-DP5XgATT.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 e}from"./index-QEFm0Hwa.js";import{b as T}from"./vendor-DBTT3jXp.js";import{p as b,f as E}from"./date-Dwgqy666.js";import{D as s,f as N}from"./DetailRow-ZFijkJy9.js";import{C as i,B}from"./types-Dd6NUxj7.js";import{u as j,T as f,C as l}from"./EntryDetailPage-BhGVuHY8.js";import"./search-CzOe6pQ2.js";const H=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],D=["2XX","3XX","4XX","5XX","SUCCESS","ERROR","CLIENT-ERROR","REDIRECT"];function q(t){return t<1e3?`${t} ms`:`${(t/1e3).toFixed(2)} s`}function O({entry:t}){const{payload:a,createdAt:c}=t,h=a.statusCode??0,m=(t.tags??[]).filter(p=>{var u;const x=p.toUpperCase();return!H.includes(x)&&!D.includes(x)&&p.toLowerCase()!==((u=a.hostname)==null?void 0:u.toLowerCase())}),r=j(),o=j(),[y,R]=T.useState("payload"),[S,C]=T.useState("response"),n={payload:a.requestBody||{},headers:a.requestHeaders??{}},d={response:a.responseBody||{},headers:a.responseHeaders??{}},g=[{id:"payload",label:"Request Body",content:e.jsx(l,{data:n.payload,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})},{id:"headers",label:"Request Headers",content:e.jsx(l,{data:n.headers,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}],v=[{id:"response",label:"Response Body",content:e.jsx(l,{data:d.response,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})},{id:"headers",label:"Response Headers",content:e.jsx(l,{data:d.headers,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"HTTP Client Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[N(b(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",E(b(c),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Method",value:e.jsx(i,{listType:"http-client",filterType:"methods",filterValue:a.method,className:"font-mono font-medium",children:a.method})}),e.jsx(s,{label:"URL",value:e.jsx("span",{className:"font-mono text-sm break-all",children:a.url})}),a.hostname&&e.jsx(s,{label:"Hostname",value:e.jsx(i,{listType:"http-client",filterType:"hostnames",filterValue:a.hostname,className:"font-mono",children:a.hostname})}),a.path&&e.jsx(s,{label:"Path",value:e.jsx("span",{className:"font-mono text-sm",children:a.path})}),e.jsx(s,{label:"Status Code",value:e.jsx(i,{listType:"http-client",filterType:"statuses",filterValue:a.statusCode?String(a.statusCode):"ERR",children:h>0?h:"ERR"})}),e.jsx(s,{label:"Duration",value:e.jsx("span",{className:a.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:q(a.duration)})}),a.error&&e.jsx(s,{label:"Error",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:a.error})}),m.length>0&&e.jsx(s,{label:"Tags",value:e.jsx(B,{items:m,listType:"http-client",maxItems:99})})]})})]}),e.jsx(f,{tabs:g,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(r.Toolbar,{data:n[y]}),onTabChange:R}),e.jsx(f,{tabs:v,defaultTab:"response",hashKey:"res",headerRight:e.jsx(o.Toolbar,{data:d[S]}),onTabChange:C})]})}export{O as default};
1
+ import{j as e}from"./index-Db_zkULa.js";import{b as T}from"./vendor-DBTT3jXp.js";import{p as b,f as E}from"./date-Dwgqy666.js";import{D as s,f as N}from"./DetailRow-Dc2FzrKz.js";import{C as i,B}from"./types-DOZkJpXV.js";import{u as j,T as f,C as l}from"./EntryDetailPage-CiECQkN4.js";import"./search-C83cbagr.js";const H=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],D=["2XX","3XX","4XX","5XX","SUCCESS","ERROR","CLIENT-ERROR","REDIRECT"];function q(t){return t<1e3?`${t} ms`:`${(t/1e3).toFixed(2)} s`}function O({entry:t}){const{payload:a,createdAt:c}=t,h=a.statusCode??0,m=(t.tags??[]).filter(p=>{var u;const x=p.toUpperCase();return!H.includes(x)&&!D.includes(x)&&p.toLowerCase()!==((u=a.hostname)==null?void 0:u.toLowerCase())}),r=j(),o=j(),[y,R]=T.useState("payload"),[S,C]=T.useState("response"),n={payload:a.requestBody||{},headers:a.requestHeaders??{}},d={response:a.responseBody||{},headers:a.responseHeaders??{}},g=[{id:"payload",label:"Request Body",content:e.jsx(l,{data:n.payload,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})},{id:"headers",label:"Request Headers",content:e.jsx(l,{data:n.headers,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}],v=[{id:"response",label:"Response Body",content:e.jsx(l,{data:d.response,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})},{id:"headers",label:"Response Headers",content:e.jsx(l,{data:d.headers,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"HTTP Client Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[N(b(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",E(b(c),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Method",value:e.jsx(i,{listType:"http-client",filterType:"methods",filterValue:a.method,className:"font-mono font-medium",children:a.method})}),e.jsx(s,{label:"URL",value:e.jsx("span",{className:"font-mono text-sm break-all",children:a.url})}),a.hostname&&e.jsx(s,{label:"Hostname",value:e.jsx(i,{listType:"http-client",filterType:"hostnames",filterValue:a.hostname,className:"font-mono",children:a.hostname})}),a.path&&e.jsx(s,{label:"Path",value:e.jsx("span",{className:"font-mono text-sm",children:a.path})}),e.jsx(s,{label:"Status Code",value:e.jsx(i,{listType:"http-client",filterType:"statuses",filterValue:a.statusCode?String(a.statusCode):"ERR",children:h>0?h:"ERR"})}),e.jsx(s,{label:"Duration",value:e.jsx("span",{className:a.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:q(a.duration)})}),a.error&&e.jsx(s,{label:"Error",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:a.error})}),m.length>0&&e.jsx(s,{label:"Tags",value:e.jsx(B,{items:m,listType:"http-client",maxItems:99})})]})})]}),e.jsx(f,{tabs:g,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(r.Toolbar,{data:n[y]}),onTabChange:R}),e.jsx(f,{tabs:v,defaultTab:"response",hashKey:"res",headerRight:e.jsx(o.Toolbar,{data:d[S]}),onTabChange:C})]})}export{O as default};
@@ -1 +1 @@
1
- import{j as t,e as h}from"./index-QEFm0Hwa.js";import{e as F,b as H}from"./vendor-DBTT3jXp.js";import{f as M,p as D}from"./date-Dwgqy666.js";import{u as A,a as B,P as L,R as S,N as W,L as q}from"./PageHeader-BlZTS6Mp.js";import{u as G,j as I,C as l}from"./types-Dd6NUxj7.js";import{T as d,D as $,b as z}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";function Y(){const c=F(),{addFilter:r,clearAll:u,serverFilters:m,headerFilters:p}=G("http-client"),{rangeFilters:x,windowMinutes:g}=A(),{entries:y,loading:f,refreshing:s,error:C,refresh:j,newEntriesCount:k,hasMore:w,loadMore:N,loadNew:R,autoRefreshEnabled:E,live:b,setAutoRefresh:P,meta:o,isHighlighted:T}=B({type:"http-client",limit:50,filters:{...m,...x},windowMinutes:g}),n=y.filter(e=>I(e)),v=H.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>{const a=e.payload.statusCode??0;return t.jsx(l,{onClick:i=>{i.stopPropagation(),r("statuses",a>0?String(a):"ERR")},children:a>0?a:"ERR"})}},{key:"hostname",header:"Host",width:"180px",render:e=>{const a=e.payload.hostname;return a?t.jsx(l,{onClick:i=>{i.stopPropagation(),r("hostnames",a)},className:"font-mono",children:a}):t.jsx(d,{secondary:!0,children:"-"})}},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{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($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:M(D(e.createdAt),{addSuffix:!0})})}],[r]);return f&&n.length===0?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"})}):t.jsxs("div",{children:[t.jsx(L,{title:"HTTP Client",icon:h,iconColor:"text-cyan-600 dark:text-cyan-400",count:n.length,totalCount:o==null?void 0:o.total,refreshing:s,autoRefreshEnabled:E,live:b,onAutoRefreshToggle:P,filters:p,filterControls:t.jsx(S,{route:"http-client"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{count:k,onClick:R,loading:s}),t.jsx(z,{columns:v,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/http-client/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",error:C,onRetry:j,emptyIcon:t.jsx(h,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:N,loading:s})]})]})}export{Y as default};
1
+ import{j as t,e as h}from"./index-Db_zkULa.js";import{e as F,b as H}from"./vendor-DBTT3jXp.js";import{f as M,p as D}from"./date-Dwgqy666.js";import{u as A,a as B,P as L,R as S,N as W,L as q}from"./PageHeader-BLRAvkWc.js";import{u as G,j as I,C as l}from"./types-DOZkJpXV.js";import{T as d,D as $,b as z}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";function Y(){const c=F(),{addFilter:r,clearAll:u,serverFilters:m,headerFilters:p}=G("http-client"),{rangeFilters:x,windowMinutes:g}=A(),{entries:y,loading:f,refreshing:s,error:C,refresh:j,newEntriesCount:k,hasMore:w,loadMore:N,loadNew:R,autoRefreshEnabled:E,live:b,setAutoRefresh:P,meta:o,isHighlighted:T}=B({type:"http-client",limit:50,filters:{...m,...x},windowMinutes:g}),n=y.filter(e=>I(e)),v=H.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>{const a=e.payload.statusCode??0;return t.jsx(l,{onClick:i=>{i.stopPropagation(),r("statuses",a>0?String(a):"ERR")},children:a>0?a:"ERR"})}},{key:"hostname",header:"Host",width:"180px",render:e=>{const a=e.payload.hostname;return a?t.jsx(l,{onClick:i=>{i.stopPropagation(),r("hostnames",a)},className:"font-mono",children:a}):t.jsx(d,{secondary:!0,children:"-"})}},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{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($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:M(D(e.createdAt),{addSuffix:!0})})}],[r]);return f&&n.length===0?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"})}):t.jsxs("div",{children:[t.jsx(L,{title:"HTTP Client",icon:h,iconColor:"text-cyan-600 dark:text-cyan-400",count:n.length,totalCount:o==null?void 0:o.total,refreshing:s,autoRefreshEnabled:E,live:b,onAutoRefreshToggle:P,filters:p,filterControls:t.jsx(S,{route:"http-client"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{count:k,onClick:R,loading:s}),t.jsx(z,{columns:v,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/http-client/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",error:C,onRetry:j,emptyIcon:t.jsx(h,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:N,loading:s})]})]})}export{Y as default};
@@ -1,4 +1,4 @@
1
- import{c as k,C as h,l as j,j as e,B as n}from"./index-QEFm0Hwa.js";import{b as w}from"./vendor-DBTT3jXp.js";import{p as m,f as C}from"./date-Dwgqy666.js";import{D as s,f as T}from"./DetailRow-ZFijkJy9.js";import{C as i}from"./types-Dd6NUxj7.js";import{u as b,C as p,T as D}from"./EntryDetailPage-BhGVuHY8.js";import{C as S}from"./CopyButton-Dp88z3zD.js";import{C as y}from"./circle-alert-sFDCyGtd.js";import{C as B}from"./circle-check-big-1nqSueTn.js";import"./search-CzOe6pQ2.js";/**
1
+ import{c as k,C as h,l as j,j as e,B as n}from"./index-Db_zkULa.js";import{b as w}from"./vendor-DBTT3jXp.js";import{p as m,f as C}from"./date-Dwgqy666.js";import{D as s,f as T}from"./DetailRow-Dc2FzrKz.js";import{C as i}from"./types-DOZkJpXV.js";import{u as b,C as p,T as D}from"./EntryDetailPage-CiECQkN4.js";import{C as S}from"./CopyButton-DzToeJlr.js";import{C as y}from"./circle-alert-BCQHt4U6.js";import{C as B}from"./circle-check-big-CyDf-yDO.js";import"./search-C83cbagr.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,B as l}from"./index-QEFm0Hwa.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as F,p as A}from"./date-Dwgqy666.js";import{u as D,a as M,P as B,R as J,N as P,L as q}from"./PageHeader-BlZTS6Mp.js";import{u as L,e as H,C as o}from"./types-Dd6NUxj7.js";import{T as i,D as S,b as I}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";function U(){const n=R(),{clearAll:d,serverFilters:u,headerFilters:c}=L("jobs"),{rangeFilters:h,windowMinutes:m}=D(),{entries:p,loading:x,refreshing:s,error:y,refresh:f,newEntriesCount:g,hasMore:j,loadMore:b,loadNew:w,autoRefreshEnabled:C,live:k,setAutoRefresh:N,meta:r,isHighlighted:T}=M({type:"job",limit:50,filters:{...u,...h},windowMinutes:m}),a=p.filter(e=>H(e)),E=v.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(S,{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:F(A(e.createdAt),{addSuffix:!0})})}],[]);return x&&a.length===0?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"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:l,iconColor:"text-yellow-600 dark:text-yellow-400",count:a.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:C,live:k,onAutoRefreshToggle:N,filters:c,filterControls:t.jsx(J,{route:"jobs"}),onClearAllFilters:d}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(P,{count:g,onClick:w,loading:s}),t.jsx(I,{columns:E,data:a,keyExtractor:e=>e.id,onRowClick:e=>n(`/jobs/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",error:y,onRetry:f,emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:j,onClick:b,loading:s})]})]})}export{U as default};
1
+ import{j as t,B as l}from"./index-Db_zkULa.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as F,p as A}from"./date-Dwgqy666.js";import{u as D,a as M,P as B,R as J,N as P,L as q}from"./PageHeader-BLRAvkWc.js";import{u as L,e as H,C as o}from"./types-DOZkJpXV.js";import{T as i,D as S,b as I}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";function U(){const n=R(),{clearAll:d,serverFilters:u,headerFilters:c}=L("jobs"),{rangeFilters:h,windowMinutes:m}=D(),{entries:p,loading:x,refreshing:s,error:y,refresh:f,newEntriesCount:g,hasMore:j,loadMore:b,loadNew:w,autoRefreshEnabled:C,live:k,setAutoRefresh:N,meta:r,isHighlighted:T}=M({type:"job",limit:50,filters:{...u,...h},windowMinutes:m}),a=p.filter(e=>H(e)),E=v.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(S,{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:F(A(e.createdAt),{addSuffix:!0})})}],[]);return x&&a.length===0?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"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:l,iconColor:"text-yellow-600 dark:text-yellow-400",count:a.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:C,live:k,onAutoRefreshToggle:N,filters:c,filterControls:t.jsx(J,{route:"jobs"}),onClearAllFilters:d}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(P,{count:g,onClick:w,loading:s}),t.jsx(I,{columns:E,data:a,keyExtractor:e=>e.id,onRowClick:e=>n(`/jobs/${e.id}`),rowClassName:e=>T(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",error:y,onRetry:f,emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:j,onClick:b,loading:s})]})]})}export{U as default};
@@ -1 +1 @@
1
- import{j as a}from"./index-QEFm0Hwa.js";import{p as d,f as x}from"./date-Dwgqy666.js";import{D as s,f as m}from"./DetailRow-ZFijkJy9.js";import{C as o}from"./types-Dd6NUxj7.js";import{u as b,C as h,T as g}from"./EntryDetailPage-BhGVuHY8.js";import"./vendor-DBTT3jXp.js";import"./search-CzOe6pQ2.js";const i={verbose:{variant:"default",label:"VERBOSE"},debug:{variant:"info",label:"DEBUG"},log:{variant:"success",label:"LOG"},warn:{variant:"warning",label:"WARNING"},error:{variant:"error",label:"ERROR"}};function w({entry:c}){const{payload:e,createdAt:r}=c,n=i[e.level]||i.log,t=b(),l=e.metadata&&Object.keys(e.metadata).length>0?[{id:"metadata",label:"Metadata",content:a.jsx(h,{data:e.metadata,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}]:[];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Log Details"})}),a.jsx("div",{className:"p-4",children:a.jsxs("dl",{className:"divide-y-0",children:[a.jsx(s,{label:"Time",value:a.jsxs("span",{children:[m(d(r),"MMMM do yyyy, h:mm:ss a")," ",a.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",x(d(r),{addSuffix:!0}),")"]})]})}),a.jsx(s,{label:"Level",value:a.jsx(o,{listType:"logs",filterType:"levels",filterValue:e.level,children:n.label})}),e.context&&a.jsx(s,{label:"Context",value:a.jsx(o,{listType:"logs",filterType:"contexts",filterValue:e.context,className:"font-mono",children:e.context})})]})})]}),a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Message"})}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:`text-sm ${e.level==="error"?"text-red-600 dark:text-red-400":e.level==="warn"?"text-yellow-600 dark:text-yellow-400":"text-gray-900 dark:text-white"}`,children:e.message})})]}),l.length>0&&a.jsx(g,{tabs:l,defaultTab:"metadata",headerRight:a.jsx(t.Toolbar,{data:e.metadata})}),e.stack&&a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Stack Trace"})}),a.jsx("div",{className:"p-4 bg-gray-900 dark:bg-gray-950 overflow-x-auto",children:a.jsx("pre",{className:"text-sm text-red-400 font-mono whitespace-pre-wrap",children:e.stack})})]})]})}export{w as default};
1
+ import{j as a}from"./index-Db_zkULa.js";import{p as d,f as x}from"./date-Dwgqy666.js";import{D as s,f as m}from"./DetailRow-Dc2FzrKz.js";import{C as o}from"./types-DOZkJpXV.js";import{u as b,C as h,T as g}from"./EntryDetailPage-CiECQkN4.js";import"./vendor-DBTT3jXp.js";import"./search-C83cbagr.js";const i={verbose:{variant:"default",label:"VERBOSE"},debug:{variant:"info",label:"DEBUG"},log:{variant:"success",label:"LOG"},warn:{variant:"warning",label:"WARNING"},error:{variant:"error",label:"ERROR"}};function w({entry:c}){const{payload:e,createdAt:r}=c,n=i[e.level]||i.log,t=b(),l=e.metadata&&Object.keys(e.metadata).length>0?[{id:"metadata",label:"Metadata",content:a.jsx(h,{data:e.metadata,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}]:[];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Log Details"})}),a.jsx("div",{className:"p-4",children:a.jsxs("dl",{className:"divide-y-0",children:[a.jsx(s,{label:"Time",value:a.jsxs("span",{children:[m(d(r),"MMMM do yyyy, h:mm:ss a")," ",a.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",x(d(r),{addSuffix:!0}),")"]})]})}),a.jsx(s,{label:"Level",value:a.jsx(o,{listType:"logs",filterType:"levels",filterValue:e.level,children:n.label})}),e.context&&a.jsx(s,{label:"Context",value:a.jsx(o,{listType:"logs",filterType:"contexts",filterValue:e.context,className:"font-mono",children:e.context})})]})})]}),a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Message"})}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:`text-sm ${e.level==="error"?"text-red-600 dark:text-red-400":e.level==="warn"?"text-yellow-600 dark:text-yellow-400":"text-gray-900 dark:text-white"}`,children:e.message})})]}),l.length>0&&a.jsx(g,{tabs:l,defaultTab:"metadata",headerRight:a.jsx(t.Toolbar,{data:e.metadata})}),e.stack&&a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Stack Trace"})}),a.jsx("div",{className:"p-4 bg-gray-900 dark:bg-gray-950 overflow-x-auto",children:a.jsx("pre",{className:"text-sm text-red-400 font-mono whitespace-pre-wrap",children:e.stack})})]})]})}export{w as default};
@@ -1 +1 @@
1
- import{j as t,F as l}from"./index-QEFm0Hwa.js";import{e as T,b as F}from"./vendor-DBTT3jXp.js";import{f as R,p as L}from"./date-Dwgqy666.js";import{u as M,a as A,P,R as B,N as D,L as S}from"./PageHeader-BlZTS6Mp.js";import{u as H,c as I,C as i}from"./types-Dd6NUxj7.js";import{E as W}from"./EntrySearchInput-BhuYJjcJ.js";import{T as o,b as $}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";import"./search-CzOe6pQ2.js";function X(){const n=T(),{clearAll:d,serverFilters:c,headerFilters:g}=H("logs"),{rangeFilters:m,windowMinutes:x}=M(),{entries:h,loading:p,refreshing:s,error:u,refresh:f,newEntriesCount:y,hasMore:j,loadMore:w,loadNew:C,autoRefreshEnabled:v,live:N,setAutoRefresh:b,meta:r,isHighlighted:E}=A({type:"log",limit:50,filters:{...c,...m},windowMinutes:x}),a=h.filter(e=>I(e)),k=F.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:R(L(e.createdAt),{addSuffix:!0})})}],[]);return p&&a.length===0?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"})}):t.jsxs("div",{children:[t.jsx(P,{title:"Logs",icon:l,iconColor:"text-green-600 dark:text-green-400",count:a.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:v,live:N,onAutoRefreshToggle:b,filters:g,filterControls:t.jsx(B,{route:"logs"}),onClearAllFilters:d}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{placeholder:"Search by message, level, context, tag, or content..."}),t.jsx(D,{count:y,onClick:C,loading:s}),t.jsx($,{columns:k,data:a,keyExtractor:e=>e.id,onRowClick:e=>n(`/logs/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",error:u,onRetry:f,emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(S,{hasMore:j,onClick:w,loading:s})]})]})}export{X as default};
1
+ import{j as t,F as l}from"./index-Db_zkULa.js";import{e as T,b as F}from"./vendor-DBTT3jXp.js";import{f as R,p as L}from"./date-Dwgqy666.js";import{u as M,a as A,P,R as B,N as D,L as S}from"./PageHeader-BLRAvkWc.js";import{u as H,c as I,C as i}from"./types-DOZkJpXV.js";import{E as W}from"./EntrySearchInput-Cq-Ji-C2.js";import{T as o,b as $}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";import"./search-C83cbagr.js";function X(){const n=T(),{clearAll:d,serverFilters:c,headerFilters:g}=H("logs"),{rangeFilters:m,windowMinutes:x}=M(),{entries:h,loading:p,refreshing:s,error:u,refresh:f,newEntriesCount:y,hasMore:j,loadMore:w,loadNew:C,autoRefreshEnabled:v,live:N,setAutoRefresh:b,meta:r,isHighlighted:E}=A({type:"log",limit:50,filters:{...c,...m},windowMinutes:x}),a=h.filter(e=>I(e)),k=F.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:R(L(e.createdAt),{addSuffix:!0})})}],[]);return p&&a.length===0?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"})}):t.jsxs("div",{children:[t.jsx(P,{title:"Logs",icon:l,iconColor:"text-green-600 dark:text-green-400",count:a.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:v,live:N,onAutoRefreshToggle:b,filters:g,filterControls:t.jsx(B,{route:"logs"}),onClearAllFilters:d}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(W,{placeholder:"Search by message, level, context, tag, or content..."}),t.jsx(D,{count:y,onClick:C,loading:s}),t.jsx($,{columns:k,data:a,keyExtractor:e=>e.id,onRowClick:e=>n(`/logs/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",error:u,onRetry:f,emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(S,{hasMore:j,onClick:w,loading:s})]})]})}export{X as default};
@@ -1,4 +1,4 @@
1
- import{c as Un,j as i,M as Gt,C as Fn}from"./index-QEFm0Hwa.js";import{C as zn,B as Hn}from"./types-Dd6NUxj7.js";import{p as ft,f as Gn}from"./date-Dwgqy666.js";import{D as B,f as Bn}from"./DetailRow-ZFijkJy9.js";import{T as Wn}from"./EntryDetailPage-BhGVuHY8.js";import{C as be}from"./CopyButton-Dp88z3zD.js";import{C as $n}from"./circle-x-DuabRgyL.js";import{C as Yn}from"./circle-check-big-1nqSueTn.js";import{U as Xn}from"./users-64hxmfDp.js";import{C as Vn}from"./circle-alert-sFDCyGtd.js";import"./vendor-DBTT3jXp.js";import"./search-CzOe6pQ2.js";/**
1
+ import{c as Un,j as i,M as Gt,C as Fn}from"./index-Db_zkULa.js";import{C as zn,B as Hn}from"./types-DOZkJpXV.js";import{p as ft,f as Gn}from"./date-Dwgqy666.js";import{D as B,f as Bn}from"./DetailRow-Dc2FzrKz.js";import{T as Wn}from"./EntryDetailPage-CiECQkN4.js";import{C as be}from"./CopyButton-DzToeJlr.js";import{C as $n}from"./circle-x-D3OiizLY.js";import{C as Yn}from"./circle-check-big-CyDf-yDO.js";import{U as Xn}from"./users-lOn2MScD.js";import{C as Vn}from"./circle-alert-BCQHt4U6.js";import"./vendor-DBTT3jXp.js";import"./search-C83cbagr.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,M as u}from"./index-QEFm0Hwa.js";import{e as D,b as c}from"./vendor-DBTT3jXp.js";import{f as L,p as P}from"./date-Dwgqy666.js";import{u as S,a as W,P as B,R as $,N as H,L as q}from"./PageHeader-BlZTS6Mp.js";import{u as I,g as z,C as G}from"./types-Dd6NUxj7.js";import{T as o,D as J,a as K,b as O}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";const Q=["sent","failed","pending","queued","error"];function te(){const m=D(),{addFilter:l,clearAll:g,serverFilters:h,headerFilters:p}=I("mail"),{rangeFilters:x,windowMinutes:f}=S(),{entries:y,loading:j,refreshing:r,error:b,refresh:k,newEntriesCount:C,hasMore:w,loadMore:T,loadNew:N,autoRefreshEnabled:M,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=W({type:"mail",limit:50,filters:{...h,...x},windowMinutes:f}),i=y.filter(e=>z(e)),d=c.useCallback(e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},[]),F=c.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(G,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(o,{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(o,{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(J,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags??[]).filter(n=>!Q.includes(n.toLowerCase()));return t.jsx(K,{tags:a,max:3,onTagClick:(n,A)=>{A.stopPropagation(),l("tags",n)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:L(P(e.createdAt),{addSuffix:!0})})}],[l,d]);return j&&i.length===0?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"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Mail",icon:u,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:M,live:E,onAutoRefreshToggle:R,filters:p,filterControls:t.jsx($,{route:"mail"}),onClearAllFilters:g}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:C,onClick:N,loading:r}),t.jsx(O,{columns:F,data:i,keyExtractor:e=>e.id,onRowClick:e=>m(`/mail/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",error:b,onRetry:k,emptyIcon:t.jsx(u,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:T,loading:r})]})]})}export{te as default};
1
+ import{j as t,M as u}from"./index-Db_zkULa.js";import{e as D,b as c}from"./vendor-DBTT3jXp.js";import{f as L,p as P}from"./date-Dwgqy666.js";import{u as S,a as W,P as B,R as $,N as H,L as q}from"./PageHeader-BLRAvkWc.js";import{u as I,g as z,C as G}from"./types-DOZkJpXV.js";import{T as o,D as J,a as K,b as O}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";const Q=["sent","failed","pending","queued","error"];function te(){const m=D(),{addFilter:l,clearAll:g,serverFilters:h,headerFilters:p}=I("mail"),{rangeFilters:x,windowMinutes:f}=S(),{entries:y,loading:j,refreshing:r,error:b,refresh:k,newEntriesCount:C,hasMore:w,loadMore:T,loadNew:N,autoRefreshEnabled:M,live:E,setAutoRefresh:R,meta:s,isHighlighted:v}=W({type:"mail",limit:50,filters:{...h,...x},windowMinutes:f}),i=y.filter(e=>z(e)),d=c.useCallback(e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},[]),F=c.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(G,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(o,{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(o,{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(J,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags??[]).filter(n=>!Q.includes(n.toLowerCase()));return t.jsx(K,{tags:a,max:3,onTagClick:(n,A)=>{A.stopPropagation(),l("tags",n)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:L(P(e.createdAt),{addSuffix:!0})})}],[l,d]);return j&&i.length===0?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"})}):t.jsxs("div",{children:[t.jsx(B,{title:"Mail",icon:u,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:M,live:E,onAutoRefreshToggle:R,filters:p,filterControls:t.jsx($,{route:"mail"}),onClearAllFilters:g}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(H,{count:C,onClick:N,loading:r}),t.jsx(O,{columns:F,data:i,keyExtractor:e=>e.id,onRowClick:e=>m(`/mail/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",error:b,onRetry:k,emptyIcon:t.jsx(u,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(q,{hasMore:w,onClick:T,loading:r})]})]})}export{te as default};
@@ -1 +1 @@
1
- import{j as e,d as o,F as b,C as g,D as u}from"./index-QEFm0Hwa.js";import{b as y}from"./vendor-DBTT3jXp.js";import{p as x,f}from"./date-Dwgqy666.js";import{D as s,f as v}from"./DetailRow-ZFijkJy9.js";import{C as l}from"./types-Dd6NUxj7.js";import{u as n,C as m,T as N}from"./EntryDetailPage-BhGVuHY8.js";import{C as k}from"./CopyButton-Dp88z3zD.js";import{C as w}from"./circle-x-DuabRgyL.js";import"./search-CzOe6pQ2.js";function V({entry:p}){const{payload:a,createdAt:i}=p,t=n(),d=n(),[c,h]=y.useState("data"),r=[];a.data!==void 0&&r.push({id:"data",label:"Data",content:e.jsx(m,{data:a.data,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}),a.where!==void 0&&r.push({id:"where",label:"Where",content:e.jsx(m,{data:a.where,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})});const j=()=>{if(c==="data"&&a.data!==void 0)return e.jsx(t.Toolbar,{data:a.data});if(c==="where"&&a.where!==void 0)return e.jsx(d.Toolbar,{data:a.where})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg",children:e.jsx(o,{className:"h-5 w-5 text-purple-600 dark:text-purple-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.entity}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Model Event"})]})]}),e.jsx(k,{text:a.entity,label:"Copy entity name"})]})}),e.jsxs("div",{className:`grid ${a.recordCount!==void 0?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Action"})]}),e.jsx("p",{className:"text-lg font-bold text-purple-600 dark:text-purple-400",children:a.action.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Entity"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.entity,children:a.entity})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.recordCount!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.recordCount})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[v(x(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",f(x(i),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Action",value:e.jsx(l,{listType:"models",filterType:"actions",filterValue:a.action,children:a.action.toUpperCase()})}),e.jsx(s,{label:"Entity",value:e.jsx(l,{listType:"models",filterType:"entities",filterValue:a.entity,children:a.entity})}),a.source&&e.jsx(s,{label:"Source",value:e.jsx(l,{listType:"models",filterType:"sources",filterValue:a.source,children:a.source})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.recordCount!==void 0&&e.jsx(s,{label:"Records",value:String(a.recordCount)})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),r.length>0&&e.jsx(N,{tabs:r,defaultTab:"data",hashKey:"model",headerRight:j(),onTabChange:h})]})}export{V as default};
1
+ import{j as e,d as o,F as b,C as g,D as u}from"./index-Db_zkULa.js";import{b as y}from"./vendor-DBTT3jXp.js";import{p as x,f}from"./date-Dwgqy666.js";import{D as s,f as v}from"./DetailRow-Dc2FzrKz.js";import{C as l}from"./types-DOZkJpXV.js";import{u as n,C as m,T as N}from"./EntryDetailPage-CiECQkN4.js";import{C as k}from"./CopyButton-DzToeJlr.js";import{C as w}from"./circle-x-D3OiizLY.js";import"./search-C83cbagr.js";function V({entry:p}){const{payload:a,createdAt:i}=p,t=n(),d=n(),[c,h]=y.useState("data"),r=[];a.data!==void 0&&r.push({id:"data",label:"Data",content:e.jsx(m,{data:a.data,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}),a.where!==void 0&&r.push({id:"where",label:"Where",content:e.jsx(m,{data:a.where,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})});const j=()=>{if(c==="data"&&a.data!==void 0)return e.jsx(t.Toolbar,{data:a.data});if(c==="where"&&a.where!==void 0)return e.jsx(d.Toolbar,{data:a.where})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg",children:e.jsx(o,{className:"h-5 w-5 text-purple-600 dark:text-purple-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.entity}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Model Event"})]})]}),e.jsx(k,{text:a.entity,label:"Copy entity name"})]})}),e.jsxs("div",{className:`grid ${a.recordCount!==void 0?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Action"})]}),e.jsx("p",{className:"text-lg font-bold text-purple-600 dark:text-purple-400",children:a.action.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Entity"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.entity,children:a.entity})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.recordCount!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.recordCount})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[v(x(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",f(x(i),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Action",value:e.jsx(l,{listType:"models",filterType:"actions",filterValue:a.action,children:a.action.toUpperCase()})}),e.jsx(s,{label:"Entity",value:e.jsx(l,{listType:"models",filterType:"entities",filterValue:a.entity,children:a.entity})}),a.source&&e.jsx(s,{label:"Source",value:e.jsx(l,{listType:"models",filterType:"sources",filterValue:a.source,children:a.source})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.recordCount!==void 0&&e.jsx(s,{label:"Records",value:String(a.recordCount)})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),r.length>0&&e.jsx(N,{tabs:r,defaultTab:"data",hashKey:"model",headerRight:j(),onTabChange:h})]})}export{V as default};
@@ -1 +1 @@
1
- import{j as t,d}from"./index-QEFm0Hwa.js";import{e as P,b as A}from"./vendor-DBTT3jXp.js";import{f as D,p as T}from"./date-Dwgqy666.js";import{u as B,a as L,P as H,R as S,N as I,L as U}from"./PageHeader-BlZTS6Mp.js";import{u as $,l as q,C as l}from"./types-Dd6NUxj7.js";import{T as o,D as z,b as G}from"./DataTable-CiPeRzYj.js";import"./timer-Wzp2Wnna.js";function Y(){const c=P(),{addFilter:a,clearAll:u,serverFilters:p,headerFilters:h}=$("models"),{rangeFilters:m,windowMinutes:x}=B(),{entries:g,loading:y,refreshing:s,error:f,refresh:j,newEntriesCount:C,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:E,live:b,setAutoRefresh:v,meta:i,isHighlighted:R}=L({type:"model",limit:50,filters:{...p,...m},windowMinutes:x}),n=g.filter(e=>q(e)),M=A.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>{const r=e.payload.source;return r?t.jsx(l,{onClick:F=>{F.stopPropagation(),a("sources",r)},className:"font-mono text-xs",children:r}):t.jsx(o,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(z,{ms:e.payload.duration||0})},{key:"records",header:"Records",width:"80px",align:"center",render:e=>e.payload.recordCount!==void 0?t.jsx(o,{children:e.payload.recordCount}):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:D(T(e.createdAt),{addSuffix:!0})})}],[a]);return y&&n.length===0?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"})}):t.jsxs("div",{children:[t.jsx(H,{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:E,live:b,onAutoRefreshToggle:v,filters:h,filterControls:t.jsx(S,{route:"models"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:C,onClick:N,loading:s}),t.jsx(G,{columns:M,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/models/${e.id}`),rowClassName:e=>R(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",error:f,onRetry:j,emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(U,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};
1
+ import{j as t,d}from"./index-Db_zkULa.js";import{e as P,b as A}from"./vendor-DBTT3jXp.js";import{f as D,p as T}from"./date-Dwgqy666.js";import{u as B,a as L,P as H,R as S,N as I,L as U}from"./PageHeader-BLRAvkWc.js";import{u as $,l as q,C as l}from"./types-DOZkJpXV.js";import{T as o,D as z,b as G}from"./DataTable-B_I--NVC.js";import"./timer-DP5XgATT.js";function Y(){const c=P(),{addFilter:a,clearAll:u,serverFilters:p,headerFilters:h}=$("models"),{rangeFilters:m,windowMinutes:x}=B(),{entries:g,loading:y,refreshing:s,error:f,refresh:j,newEntriesCount:C,hasMore:w,loadMore:k,loadNew:N,autoRefreshEnabled:E,live:b,setAutoRefresh:v,meta:i,isHighlighted:R}=L({type:"model",limit:50,filters:{...p,...m},windowMinutes:x}),n=g.filter(e=>q(e)),M=A.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>t.jsx(l,{onClick:r=>{r.stopPropagation(),a("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>{const r=e.payload.source;return r?t.jsx(l,{onClick:F=>{F.stopPropagation(),a("sources",r)},className:"font-mono text-xs",children:r}):t.jsx(o,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(z,{ms:e.payload.duration||0})},{key:"records",header:"Records",width:"80px",align:"center",render:e=>e.payload.recordCount!==void 0?t.jsx(o,{children:e.payload.recordCount}):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:D(T(e.createdAt),{addSuffix:!0})})}],[a]);return y&&n.length===0?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"})}):t.jsxs("div",{children:[t.jsx(H,{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:E,live:b,onAutoRefreshToggle:v,filters:h,filterControls:t.jsx(S,{route:"models"}),onClearAllFilters:u}),t.jsxs("div",{className:"space-y-4",children:[t.jsx(I,{count:C,onClick:N,loading:s}),t.jsx(G,{columns:M,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/models/${e.id}`),rowClassName:e=>R(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",error:f,onRetry:j,emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(U,{hasMore:w,onClick:k,loading:s})]})]})}export{Y as default};