nestlens 0.9.0 → 0.9.2

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 (64) hide show
  1. package/dist/dashboard/public/assets/{BatchDetailView-D8PKMRJK.js → BatchDetailView-CNyv7Vc1.js} +1 -1
  2. package/dist/dashboard/public/assets/{BatchesPage-DT5Mywoo.js → BatchesPage-BrvAux3V.js} +1 -1
  3. package/dist/dashboard/public/assets/{CacheDetailView-BKg5s6do.js → CacheDetailView-CtmDMMR2.js} +1 -1
  4. package/dist/dashboard/public/assets/{CachePage-Dv0sIWfb.js → CachePage-D-LhEY8p.js} +1 -1
  5. package/dist/dashboard/public/assets/{CommandDetailView-34Fp3Zse.js → CommandDetailView-B_6u-4-M.js} +1 -1
  6. package/dist/dashboard/public/assets/{CommandsPage-DfJBmcAu.js → CommandsPage-BtMSnG2A.js} +1 -1
  7. package/dist/dashboard/public/assets/{CopyButton-CVTvd0EZ.js → CopyButton-C2sNp4HP.js} +1 -1
  8. package/dist/dashboard/public/assets/{DashboardPage-Bl0QYNJ5.js → DashboardPage-wUYPGV_y.js} +1 -1
  9. package/dist/dashboard/public/assets/{DataTable-DNJpoFzh.js → DataTable-PCSvmOPj.js} +1 -1
  10. package/dist/dashboard/public/assets/{DetailRow-CouZ8riB.js → DetailRow-CfonsGvS.js} +1 -1
  11. package/dist/dashboard/public/assets/{DumpDetailView-B6-Nre38.js → DumpDetailView-DGy7eSQl.js} +1 -1
  12. package/dist/dashboard/public/assets/{DumpsPage-Cd0B4s9o.js → DumpsPage-jeUeiAuN.js} +1 -1
  13. package/dist/dashboard/public/assets/{EntryDetailPage-QTrST2MQ.js → EntryDetailPage-C5QubCqk.js} +3 -3
  14. package/dist/dashboard/public/assets/{EntrySearchInput-DqIRbpja.js → EntrySearchInput-DLuCL4Ys.js} +1 -1
  15. package/dist/dashboard/public/assets/{EventDetailView-2SmuXgrJ.js → EventDetailView-DrExHdP3.js} +1 -1
  16. package/dist/dashboard/public/assets/{EventsPage-DCpLnIob.js → EventsPage-CA-mVFw2.js} +1 -1
  17. package/dist/dashboard/public/assets/{ExceptionDetailView-DxGim-Jg.js → ExceptionDetailView-xmNdG8Nb.js} +1 -1
  18. package/dist/dashboard/public/assets/{ExceptionsPage-Qa60iwA4.js → ExceptionsPage-D6ww4tft.js} +1 -1
  19. package/dist/dashboard/public/assets/{GateDetailView-DFVtRPBk.js → GateDetailView-Db3NrQmm.js} +1 -1
  20. package/dist/dashboard/public/assets/{GatesPage-DHGIZzbG.js → GatesPage-CuEy3xE1.js} +1 -1
  21. package/dist/dashboard/public/assets/{GraphQLDetailView-DvHekddm.js → GraphQLDetailView-DZPwXidi.js} +1 -1
  22. package/dist/dashboard/public/assets/{GraphQLPage-Cft-KFpI.js → GraphQLPage-D4vF4fhg.js} +1 -1
  23. package/dist/dashboard/public/assets/{HttpClientDetailView-qU0JPxsC.js → HttpClientDetailView-7v6RERdZ.js} +1 -1
  24. package/dist/dashboard/public/assets/{HttpClientPage-Kxa5nm75.js → HttpClientPage-Dz07Icgz.js} +1 -1
  25. package/dist/dashboard/public/assets/{JobDetailView-BfAICIc4.js → JobDetailView-DrDFXY-t.js} +1 -1
  26. package/dist/dashboard/public/assets/{JobsPage-BpBk0bYd.js → JobsPage-C7MOQ5N5.js} +1 -1
  27. package/dist/dashboard/public/assets/{LogDetailView-CdSLEf4Q.js → LogDetailView-OhpY0czv.js} +1 -1
  28. package/dist/dashboard/public/assets/{LogsPage-CaCtKQZ0.js → LogsPage-CELJRQdo.js} +1 -1
  29. package/dist/dashboard/public/assets/{MailDetailView-BiBUkOXW.js → MailDetailView-rmPDboFn.js} +1 -1
  30. package/dist/dashboard/public/assets/{MailPage-DAkydOVp.js → MailPage-CPmDY6cW.js} +1 -1
  31. package/dist/dashboard/public/assets/{ModelDetailView-CXCgDnpy.js → ModelDetailView-DVh-32OU.js} +1 -1
  32. package/dist/dashboard/public/assets/{ModelsPage-BwK3r0-I.js → ModelsPage-Bi2hB6U7.js} +1 -1
  33. package/dist/dashboard/public/assets/{NotificationDetailView-Bljgzgiz.js → NotificationDetailView-C_IGKjY3.js} +1 -1
  34. package/dist/dashboard/public/assets/{NotificationsPage-DMGpuTU-.js → NotificationsPage-Bn3roYs1.js} +1 -1
  35. package/dist/dashboard/public/assets/{PageHeader-BAc6Jvef.js → PageHeader-CIBDYg8j.js} +1 -1
  36. package/dist/dashboard/public/assets/{QueriesPage-DPls44cD.js → QueriesPage-DzWPvH8G.js} +1 -1
  37. package/dist/dashboard/public/assets/QueryDetailView-RUxW9Uqs.js +29 -0
  38. package/dist/dashboard/public/assets/{RedisDetailView-Ds3Hzc8m.js → RedisDetailView-Ceo27Mx3.js} +1 -1
  39. package/dist/dashboard/public/assets/{RedisPage-DhAhXwAd.js → RedisPage-pBNy_8Qd.js} +1 -1
  40. package/dist/dashboard/public/assets/{RequestDetailView-BwTcMKOH.js → RequestDetailView-t5odupt4.js} +1 -1
  41. package/dist/dashboard/public/assets/{RequestsPage-CIHqEF5P.js → RequestsPage-B2dLu5n_.js} +1 -1
  42. package/dist/dashboard/public/assets/{ScheduleDetailView-2RmRtcvM.js → ScheduleDetailView-D8OZ-_yh.js} +1 -1
  43. package/dist/dashboard/public/assets/{SchedulePage-D3MuXtV1.js → SchedulePage-CZ_j6ucP.js} +1 -1
  44. package/dist/dashboard/public/assets/{UserCard-Cbu0ICp6.js → UserCard-Dom0aCbz.js} +1 -1
  45. package/dist/dashboard/public/assets/{ViewDetailView-rCONPvjG.js → ViewDetailView-Bxd64RN9.js} +1 -1
  46. package/dist/dashboard/public/assets/{ViewsPage-CW5aN_D5.js → ViewsPage-Bvm7RI_3.js} +1 -1
  47. package/dist/dashboard/public/assets/{calendar-DcK1CETU.js → calendar-BMPz0Z6s.js} +1 -1
  48. package/dist/dashboard/public/assets/{circle-alert-CgZfn5uS.js → circle-alert-t2lIvGjF.js} +1 -1
  49. package/dist/dashboard/public/assets/{circle-check-big-1S8vooWx.js → circle-check-big-DfHJ1LXS.js} +1 -1
  50. package/dist/dashboard/public/assets/{circle-x-BOe5goDy.js → circle-x-Cgixh9fi.js} +1 -1
  51. package/dist/dashboard/public/assets/{eye-PnSIQ7GH.js → eye-DRW5kZff.js} +1 -1
  52. package/dist/dashboard/public/assets/format-BlNP-apw.js +1 -0
  53. package/dist/dashboard/public/assets/index-DOVqOa07.js +361 -0
  54. package/dist/dashboard/public/assets/{search-D9V4itpU.js → search-DgNz5G1h.js} +1 -1
  55. package/dist/dashboard/public/assets/{send-DOt7lNQl.js → send-BKsI3HhT.js} +1 -1
  56. package/dist/dashboard/public/assets/{timer-CZxO8Y_Q.js → timer-hkll0vuQ.js} +1 -1
  57. package/dist/dashboard/public/assets/{types-DZUckfsW.js → types-nsz9P0qo.js} +1 -1
  58. package/dist/dashboard/public/assets/{users-9cJRsfQV.js → users-CTNyAW4A.js} +1 -1
  59. package/dist/dashboard/public/assets/{zap-B0E2zzJ8.js → zap-BolYLTQe.js} +1 -1
  60. package/dist/dashboard/public/index.html +1 -1
  61. package/package.json +2 -2
  62. package/dist/dashboard/public/assets/QueryDetailView-BEwgxDtv.js +0 -29
  63. package/dist/dashboard/public/assets/format-PC0kH-TG.js +0 -1
  64. package/dist/dashboard/public/assets/index-DyvNu-oR.js +0 -361
@@ -1 +1 @@
1
- import{j as e,D as u,a as f,C as y}from"./index-DyvNu-oR.js";import{b as N}from"./vendor-DBTT3jXp.js";import{p as o,f as v}from"./badgeColors-DQ_P_DOX.js";import{D as a,f as k}from"./DetailRow-CouZ8riB.js";import{C as n}from"./types-DZUckfsW.js";import{u as x,C as m,T as C}from"./EntryDetailPage-QTrST2MQ.js";import{C as w}from"./CopyButton-CVTvd0EZ.js";import{C as T}from"./circle-check-big-1S8vooWx.js";import{C as g}from"./circle-x-BOe5goDy.js";import"./search-D9V4itpU.js";function H({entry:h}){const{payload:s,createdAt:i}=h,d=x(),l=x(),[c,p]=N.useState("args"),r=s.status==="success"?{icon:T,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},b=r.icon,t=[];s.args&&s.args.length>0&&t.push({id:"args",label:"Arguments",content:e.jsx(m,{data:s.args,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),s.result!==void 0&&t.push({id:"result",label:"Result",content:e.jsx(m,{data:s.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})});const j=()=>{if(c==="args"&&s.args&&s.args.length>0)return e.jsx(d.Toolbar,{data:s.args});if(c==="result"&&s.result!==void 0)return e.jsx(l.Toolbar,{data:s.result})};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 ${r.bg} rounded-lg`,children:e.jsx(u,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.command}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Redis Command"})]})]}),e.jsx(w,{text:s.command,label:"Copy command"})]})}),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(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:s.command})]}),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:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:s.status.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(y,{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:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),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(a,{label:"Time",value:e.jsxs("span",{children:[k(o(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(o(i),{addSuffix:!0}),")"]})]})}),e.jsx(a,{label:"Command",value:e.jsx(n,{listType:"redis",filterType:"commands",filterValue:s.command,children:s.command})}),s.keyPattern&&e.jsx(a,{label:"Key Pattern",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.keyPattern})}),e.jsx(a,{label:"Status",value:e.jsx(n,{listType:"redis",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(a,{label:"Duration",value:`${s.duration}ms`})]})})]}),s.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(g,{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:s.error})})]}),t.length>0&&e.jsx(C,{tabs:t,defaultTab:"args",hashKey:"redis",headerRight:j(),onTabChange:p})]})}export{H as default};
1
+ import{j as e,D as u,a as f,C as y}from"./index-DOVqOa07.js";import{b as N}from"./vendor-DBTT3jXp.js";import{p as o,f as v}from"./badgeColors-DQ_P_DOX.js";import{D as a,f as k}from"./DetailRow-CfonsGvS.js";import{C as n}from"./types-nsz9P0qo.js";import{u as x,C as m,T as C}from"./EntryDetailPage-C5QubCqk.js";import{C as w}from"./CopyButton-C2sNp4HP.js";import{C as T}from"./circle-check-big-DfHJ1LXS.js";import{C as g}from"./circle-x-Cgixh9fi.js";import"./search-DgNz5G1h.js";function H({entry:h}){const{payload:s,createdAt:i}=h,d=x(),l=x(),[c,p]=N.useState("args"),r=s.status==="success"?{icon:T,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:g,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},b=r.icon,t=[];s.args&&s.args.length>0&&t.push({id:"args",label:"Arguments",content:e.jsx(m,{data:s.args,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})}),s.result!==void 0&&t.push({id:"result",label:"Result",content:e.jsx(m,{data:s.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})});const j=()=>{if(c==="args"&&s.args&&s.args.length>0)return e.jsx(d.Toolbar,{data:s.args});if(c==="result"&&s.result!==void 0)return e.jsx(l.Toolbar,{data:s.result})};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 ${r.bg} rounded-lg`,children:e.jsx(u,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:s.command}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Redis Command"})]})]}),e.jsx(w,{text:s.command,label:"Copy command"})]})}),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(f,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Command"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:s.command})]}),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:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${r.color}`,children:s.status.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(y,{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:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]})]})]}),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(a,{label:"Time",value:e.jsxs("span",{children:[k(o(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",v(o(i),{addSuffix:!0}),")"]})]})}),e.jsx(a,{label:"Command",value:e.jsx(n,{listType:"redis",filterType:"commands",filterValue:s.command,children:s.command})}),s.keyPattern&&e.jsx(a,{label:"Key Pattern",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.keyPattern})}),e.jsx(a,{label:"Status",value:e.jsx(n,{listType:"redis",filterType:"statuses",filterValue:s.status,children:s.status.toUpperCase()})}),e.jsx(a,{label:"Duration",value:`${s.duration}ms`})]})})]}),s.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(g,{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:s.error})})]}),t.length>0&&e.jsx(C,{tabs:t,defaultTab:"args",hashKey:"redis",headerRight:j(),onTabChange:p})]})}export{H as default};
@@ -1 +1 @@
1
- import{j as a,D as d}from"./index-DyvNu-oR.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as T,P as A,N as M,L as B}from"./PageHeader-BAc6Jvef.js";import{u as L,k as H,C as l}from"./types-DZUckfsW.js";import{T as n,D as S,b as W}from"./DataTable-DNJpoFzh.js";function G(){const c=R(),{addFilter:t,clearAll:m,serverFilters:u,headerFilters:h,hasFilters:p}=L("redis"),{entries:x,loading:g,refreshing:r,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:k,autoRefreshEnabled:C,live:w,setAutoRefresh:N,meta:s,isHighlighted:b}=T({type:"redis",limit:50,filters:u}),o=x.filter(e=>H(e)),P=v.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("commands",e.payload.command)},className:"font-mono",children:e.payload.command})},{key:"keyPattern",header:"Key Pattern",minWidth:"200px",render:e=>e.payload.keyPattern?a.jsx(n,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.keyPattern}):a.jsx(n,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(S,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(n,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(A,{title:"Redis",icon:d,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:C,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:m}),a.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[a.jsx(M,{count:y,onClick:k,loading:r}),a.jsx(W,{columns:P,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/redis/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:f,onClick:j,loading:r})]})]})}export{G as default};
1
+ import{j as a,D as d}from"./index-DOVqOa07.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as T,P as A,N as M,L as B}from"./PageHeader-CIBDYg8j.js";import{u as L,k as H,C as l}from"./types-nsz9P0qo.js";import{T as n,D as S,b as W}from"./DataTable-PCSvmOPj.js";function G(){const c=R(),{addFilter:t,clearAll:m,serverFilters:u,headerFilters:h,hasFilters:p}=L("redis"),{entries:x,loading:g,refreshing:r,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:k,autoRefreshEnabled:C,live:w,setAutoRefresh:N,meta:s,isHighlighted:b}=T({type:"redis",limit:50,filters:u}),o=x.filter(e=>H(e)),P=v.useMemo(()=>[{key:"command",header:"Command",width:"120px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("commands",e.payload.command)},className:"font-mono",children:e.payload.command})},{key:"keyPattern",header:"Key Pattern",minWidth:"200px",render:e=>e.payload.keyPattern?a.jsx(n,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.keyPattern}):a.jsx(n,{secondary:!0,children:"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(S,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(l,{onClick:i=>{i.stopPropagation(),t("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(n,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[t]);if(g&&o.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const E=p?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(A,{title:"Redis",icon:d,iconColor:"text-red-600 dark:text-red-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:C,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:m}),a.jsxs("div",{className:`${E} space-y-4 transition-all duration-200`,children:[a.jsx(M,{count:y,onClick:k,loading:r}),a.jsx(W,{columns:P,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/redis/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No Redis commands recorded yet",emptyIcon:a.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(B,{hasMore:f,onClick:j,loading:r})]})]})}export{G as default};
@@ -1 +1 @@
1
- import{j as e,g}from"./index-DyvNu-oR.js";import{b as h,L as y}from"./vendor-DBTT3jXp.js";import{f as q,p as k}from"./badgeColors-DQ_P_DOX.js";import{D as c,f as $}from"./DetailRow-CouZ8riB.js";import{b as R,c as H,a as D,d as V,e as U,f as L,g as O,C as o,B as E}from"./types-DZUckfsW.js";import{u as S,T as C,C as j}from"./EntryDetailPage-QTrST2MQ.js";import{U as F}from"./UserCard-Cbu0ICp6.js";import"./search-D9V4itpU.js";function p(r){return r<1?"<1 ms":r<1e3?`${r.toFixed(2)} ms`:`${(r/1e3).toFixed(2)} s`}function b(r,t){return r.length<=t?r:r.substring(0,t)+"..."}function I({entries:r}){const t=h.useMemo(()=>{const a=r.filter(l=>R(l)),n=r.filter(l=>H(l)),d=r.filter(l=>D(l)),x=r.filter(l=>V(l)),f=r.filter(l=>U(l)),N=r.filter(l=>L(l)),T=r.filter(l=>O(l));return{exceptions:a,logs:n,queries:d,events:x,jobs:f,cache:N,mail:T}},[r]),s=h.useMemo(()=>[{id:"exceptions",label:"Exceptions",entries:t.exceptions,color:"bg-red-500"},{id:"logs",label:"Logs",entries:t.logs,color:"bg-blue-500"},{id:"queries",label:"Queries",entries:t.queries,color:"bg-purple-500"},{id:"events",label:"Events",entries:t.events,color:"bg-green-500"},{id:"jobs",label:"Jobs",entries:t.jobs,color:"bg-yellow-500"},{id:"cache",label:"Cache",entries:t.cache,color:"bg-cyan-500"},{id:"mail",label:"Mail",entries:t.mail,color:"bg-pink-500"}].filter(n=>n.entries.length>0),[t]),[i,m]=h.useState(()=>t.exceptions.length>0?"exceptions":t.logs.length>0?"logs":t.queries.length>0?"queries":t.events.length>0?"events":t.jobs.length>0?"jobs":t.cache.length>0?"cache":t.mail.length>0?"mail":"queries"),u=h.useMemo(()=>{if(t.queries.length===0)return null;const a=t.queries.reduce((x,f)=>x+f.payload.duration,0),n=new Set(t.queries.map(x=>x.payload.query)).size,d=t.queries.length-n;return{total:a,duplicates:d}},[t.queries]);return s.length===0?null:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsx("div",{className:"flex flex-wrap gap-1 p-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:s.map(a=>e.jsxs("button",{onClick:()=>m(a.id),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors flex items-center gap-2 ${i===a.id?"bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[a.label,e.jsx("span",{className:`inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium rounded ${i===a.id?"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300":"bg-gray-200 dark:bg-gray-600 text-gray-600 dark:text-gray-400"}`,children:a.entries.length})]},a.id))}),e.jsxs("div",{children:[i==="queries"&&t.queries.length>0&&e.jsxs("div",{children:[u&&e.jsxs("div",{className:"px-4 py-2 bg-gray-100 dark:bg-gray-800/50 text-sm text-gray-600 dark:text-gray-400 flex justify-between",children:[e.jsxs("span",{children:[t.queries.length," queries, ",u.duplicates," of which are duplicated"]}),e.jsxs("span",{children:["Total: ",e.jsx("strong",{children:p(u.total)})]})]}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.queries.map(a=>e.jsxs(y,{to:`/queries/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate flex-1 mr-4",children:b(a.payload.query,70)}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.slow&&e.jsx(o,{listType:"queries",children:"SLOW"}),e.jsx("span",{className:`text-sm font-mono ${a.payload.slow?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400"}`,children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]}),i==="exceptions"&&t.exceptions.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.exceptions.map(a=>e.jsx(y,{to:`/exceptions/${a.id}`,className:"block px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{listType:"exceptions",filterType:"names",filterValue:a.payload.name,children:a.payload.name}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:b(a.payload.message,60)})]}),a.payload.context&&e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:["at ",a.payload.context]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]})},a.id))}),i==="logs"&&t.logs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.logs.map(a=>e.jsxs(y,{to:`/logs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"logs",filterType:"levels",filterValue:a.payload.level,children:a.payload.level.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.message,60)}),a.payload.context&&e.jsx(o,{listType:"logs",filterType:"contexts",filterValue:a.payload.context,className:"text-xs",children:a.payload.context})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="events"&&t.events.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.events.map(a=>e.jsxs(y,{to:`/events/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"events",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:[a.payload.listeners.length," listener(s)"]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="jobs"&&t.jobs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.jobs.map(a=>e.jsxs(y,{to:`/jobs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"jobs",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["on ",a.payload.queue]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.duration!==void 0&&e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="cache"&&t.cache.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.cache.map(a=>e.jsxs(y,{to:`/cache/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"cache",filterType:"operations",filterValue:a.payload.operation,children:a.payload.operation.toUpperCase()}),e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.key,50)}),a.payload.hit!==void 0&&e.jsx(o,{listType:"cache",clickable:!1,children:a.payload.hit?"HIT":"MISS"})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="mail"&&t.mail.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.mail.map(a=>e.jsxs(y,{to:`/mail/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"mail",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:a.payload.subject}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["to ",Array.isArray(a.payload.to)?a.payload.to.join(", "):a.payload.to]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]})]})}function J(r){if(r===0)return"0 B";const t=1024,s=["B","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(t));return`${parseFloat((r/Math.pow(t,i)).toFixed(1))} ${s[i]}`}function K(r){return r<1e3?`${r} ms`:`${(r/1e3).toFixed(2)} s`}function P(r,t){if(t){const s=Object.keys(t).find(i=>i.toLowerCase()==="host");if(s&&t[s])return t[s]}try{return new URL(r).host}catch{return"-"}}function Q(r,t){return r!=null&&r.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function ae({entry:r,related:t=[]}){const{payload:s,createdAt:i}=r,m=P(s.url,s.headers),u=Q(s.path,s.method),a=(r.tags??[]).filter(M=>M.toUpperCase()!==u),n=S(),d=S(),[x,f]=h.useState("payload"),[N,T]=h.useState("response"),l={};s.body&&(l.body=s.body),s.query&&Object.keys(s.query).length>0&&(l.query=s.query),s.params&&Object.keys(s.params).length>0&&(l.params=s.params);const w={payload:Object.keys(l).length>0?l:{},headers:s.headers||{}},v={response:s.responseBody||{},"response-headers":s.responseHeaders??{},session:s.session&&Object.keys(s.session).length>0?s.session:{}},B=[{id:"payload",label:"Payload",content:e.jsx(j,{data:w.payload,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})},{id:"headers",label:"Headers",content:e.jsx(j,{data:w.headers,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})}],A=[{id:"response",label:"Response",content:e.jsx(j,{data:v.response,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"response-headers",label:"Headers",content:e.jsx(j,{data:v["response-headers"],toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"session",label:"Session",content:e.jsx(j,{data:v.session,toolbarState:d.state,searchBar:d.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:"Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(c,{label:"Time",value:e.jsxs("span",{children:[$(k(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",q(k(i),{addSuffix:!0}),")"]})]})}),e.jsx(c,{label:"Hostname",value:m!=="-"?e.jsx(o,{listType:"requests",filterType:"hostnames",filterValue:m,className:"font-mono",children:m}):"-"}),s.controllerAction&&e.jsx(c,{label:"Controller Action",value:e.jsx(o,{listType:"requests",filterType:"controllers",filterValue:s.controllerAction,className:"font-mono",children:s.controllerAction})}),e.jsx(c,{label:"Path",value:e.jsx(o,{listType:"requests",filterType:"paths",filterValue:s.path,className:"font-mono",children:s.path})}),e.jsx(c,{label:"Status",value:s.statusCode?e.jsx(o,{listType:"requests",filterType:"statuses",filterValue:String(s.statusCode),children:String(s.statusCode)}):"-"}),e.jsx(c,{label:"Duration",value:s.duration!==void 0?e.jsx("span",{className:s.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:K(s.duration)}):"-"}),e.jsx(c,{label:"IP Address",value:s.ip?e.jsx(o,{listType:"requests",filterType:"ips",filterValue:s.ip,className:"font-mono",children:s.ip}):"-"}),s.userAgent&&e.jsx(c,{label:"User Agent",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.userAgent})}),s.handler&&s.handler!==s.controllerAction&&e.jsx(c,{label:"Handler",value:e.jsx("code",{className:"font-mono text-sm",children:s.handler})}),e.jsx(c,{label:"Memory Usage",value:s.memory!==void 0?J(s.memory):"-"}),a.length>0&&e.jsx(c,{label:"Tags",value:e.jsx(E,{items:a,listType:"requests",maxItems:99})})]})})]}),s.user&&e.jsx(F,{user:s.user}),e.jsx(C,{tabs:B,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(n.Toolbar,{data:w[x]}),onTabChange:f}),e.jsx(C,{tabs:A,defaultTab:"response",hashKey:"res",headerRight:e.jsx(d.Toolbar,{data:v[N]}),onTabChange:T}),e.jsx(I,{entries:t})]})}export{ae as default};
1
+ import{j as e,g}from"./index-DOVqOa07.js";import{b as h,L as y}from"./vendor-DBTT3jXp.js";import{f as q,p as k}from"./badgeColors-DQ_P_DOX.js";import{D as c,f as $}from"./DetailRow-CfonsGvS.js";import{b as R,c as H,a as D,d as V,e as U,f as L,g as O,C as o,B as E}from"./types-nsz9P0qo.js";import{u as S,T as C,C as j}from"./EntryDetailPage-C5QubCqk.js";import{U as F}from"./UserCard-Dom0aCbz.js";import"./search-DgNz5G1h.js";function p(r){return r<1?"<1 ms":r<1e3?`${r.toFixed(2)} ms`:`${(r/1e3).toFixed(2)} s`}function b(r,t){return r.length<=t?r:r.substring(0,t)+"..."}function I({entries:r}){const t=h.useMemo(()=>{const a=r.filter(l=>R(l)),n=r.filter(l=>H(l)),d=r.filter(l=>D(l)),x=r.filter(l=>V(l)),f=r.filter(l=>U(l)),N=r.filter(l=>L(l)),T=r.filter(l=>O(l));return{exceptions:a,logs:n,queries:d,events:x,jobs:f,cache:N,mail:T}},[r]),s=h.useMemo(()=>[{id:"exceptions",label:"Exceptions",entries:t.exceptions,color:"bg-red-500"},{id:"logs",label:"Logs",entries:t.logs,color:"bg-blue-500"},{id:"queries",label:"Queries",entries:t.queries,color:"bg-purple-500"},{id:"events",label:"Events",entries:t.events,color:"bg-green-500"},{id:"jobs",label:"Jobs",entries:t.jobs,color:"bg-yellow-500"},{id:"cache",label:"Cache",entries:t.cache,color:"bg-cyan-500"},{id:"mail",label:"Mail",entries:t.mail,color:"bg-pink-500"}].filter(n=>n.entries.length>0),[t]),[i,m]=h.useState(()=>t.exceptions.length>0?"exceptions":t.logs.length>0?"logs":t.queries.length>0?"queries":t.events.length>0?"events":t.jobs.length>0?"jobs":t.cache.length>0?"cache":t.mail.length>0?"mail":"queries"),u=h.useMemo(()=>{if(t.queries.length===0)return null;const a=t.queries.reduce((x,f)=>x+f.payload.duration,0),n=new Set(t.queries.map(x=>x.payload.query)).size,d=t.queries.length-n;return{total:a,duplicates:d}},[t.queries]);return s.length===0?null:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsx("div",{className:"flex flex-wrap gap-1 p-2 bg-gray-50 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700",children:s.map(a=>e.jsxs("button",{onClick:()=>m(a.id),className:`px-3 py-1.5 text-sm font-medium rounded-md transition-colors flex items-center gap-2 ${i===a.id?"bg-white dark:bg-gray-900 text-gray-900 dark:text-white shadow-sm":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[a.label,e.jsx("span",{className:`inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium rounded ${i===a.id?"bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300":"bg-gray-200 dark:bg-gray-600 text-gray-600 dark:text-gray-400"}`,children:a.entries.length})]},a.id))}),e.jsxs("div",{children:[i==="queries"&&t.queries.length>0&&e.jsxs("div",{children:[u&&e.jsxs("div",{className:"px-4 py-2 bg-gray-100 dark:bg-gray-800/50 text-sm text-gray-600 dark:text-gray-400 flex justify-between",children:[e.jsxs("span",{children:[t.queries.length," queries, ",u.duplicates," of which are duplicated"]}),e.jsxs("span",{children:["Total: ",e.jsx("strong",{children:p(u.total)})]})]}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.queries.map(a=>e.jsxs(y,{to:`/queries/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate flex-1 mr-4",children:b(a.payload.query,70)}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.slow&&e.jsx(o,{listType:"queries",children:"SLOW"}),e.jsx("span",{className:`text-sm font-mono ${a.payload.slow?"text-yellow-600 dark:text-yellow-400":"text-gray-500 dark:text-gray-400"}`,children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]}),i==="exceptions"&&t.exceptions.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.exceptions.map(a=>e.jsx(y,{to:`/exceptions/${a.id}`,className:"block px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(o,{listType:"exceptions",filterType:"names",filterValue:a.payload.name,children:a.payload.name}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400 truncate",children:b(a.payload.message,60)})]}),a.payload.context&&e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-500 mt-1",children:["at ",a.payload.context]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]})},a.id))}),i==="logs"&&t.logs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.logs.map(a=>e.jsxs(y,{to:`/logs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"logs",filterType:"levels",filterValue:a.payload.level,children:a.payload.level.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.message,60)}),a.payload.context&&e.jsx(o,{listType:"logs",filterType:"contexts",filterValue:a.payload.context,className:"text-xs",children:a.payload.context})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:q(k(a.createdAt),{addSuffix:!0})}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="events"&&t.events.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.events.map(a=>e.jsxs(y,{to:`/events/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"events",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:[a.payload.listeners.length," listener(s)"]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="jobs"&&t.jobs.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.jobs.map(a=>e.jsxs(y,{to:`/jobs/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"jobs",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:a.payload.name}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["on ",a.payload.queue]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[a.payload.duration!==void 0&&e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="cache"&&t.cache.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.cache.map(a=>e.jsxs(y,{to:`/cache/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"cache",filterType:"operations",filterValue:a.payload.operation,children:a.payload.operation.toUpperCase()}),e.jsx("code",{className:"text-sm font-mono text-gray-700 dark:text-gray-300 truncate",children:b(a.payload.key,50)}),a.payload.hit!==void 0&&e.jsx(o,{listType:"cache",clickable:!1,children:a.payload.hit?"HIT":"MISS"})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))}),i==="mail"&&t.mail.length>0&&e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:t.mail.map(a=>e.jsxs(y,{to:`/mail/${a.id}`,className:"flex items-center justify-between px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-800 transition-colors group",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 mr-4",children:[e.jsx(o,{listType:"mail",filterType:"statuses",filterValue:a.payload.status,children:a.payload.status.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300 truncate",children:a.payload.subject}),e.jsxs("span",{className:"text-xs text-gray-500 dark:text-gray-500",children:["to ",Array.isArray(a.payload.to)?a.payload.to.join(", "):a.payload.to]})]}),e.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[e.jsx("span",{className:"text-sm font-mono text-gray-500 dark:text-gray-400",children:p(a.payload.duration)}),e.jsx(g,{className:"h-4 w-4 text-gray-400 group-hover:text-gray-600 dark:group-hover:text-gray-300"})]})]},a.id))})]})]})}function J(r){if(r===0)return"0 B";const t=1024,s=["B","KB","MB","GB"],i=Math.floor(Math.log(r)/Math.log(t));return`${parseFloat((r/Math.pow(t,i)).toFixed(1))} ${s[i]}`}function K(r){return r<1e3?`${r} ms`:`${(r/1e3).toFixed(2)} s`}function P(r,t){if(t){const s=Object.keys(t).find(i=>i.toLowerCase()==="host");if(s&&t[s])return t[s]}try{return new URL(r).host}catch{return"-"}}function Q(r,t){return r!=null&&r.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function ae({entry:r,related:t=[]}){const{payload:s,createdAt:i}=r,m=P(s.url,s.headers),u=Q(s.path,s.method),a=(r.tags??[]).filter(M=>M.toUpperCase()!==u),n=S(),d=S(),[x,f]=h.useState("payload"),[N,T]=h.useState("response"),l={};s.body&&(l.body=s.body),s.query&&Object.keys(s.query).length>0&&(l.query=s.query),s.params&&Object.keys(s.params).length>0&&(l.params=s.params);const w={payload:Object.keys(l).length>0?l:{},headers:s.headers||{}},v={response:s.responseBody||{},"response-headers":s.responseHeaders??{},session:s.session&&Object.keys(s.session).length>0?s.session:{}},B=[{id:"payload",label:"Payload",content:e.jsx(j,{data:w.payload,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})},{id:"headers",label:"Headers",content:e.jsx(j,{data:w.headers,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400})}],A=[{id:"response",label:"Response",content:e.jsx(j,{data:v.response,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"response-headers",label:"Headers",content:e.jsx(j,{data:v["response-headers"],toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})},{id:"session",label:"Session",content:e.jsx(j,{data:v.session,toolbarState:d.state,searchBar:d.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:"Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(c,{label:"Time",value:e.jsxs("span",{children:[$(k(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",q(k(i),{addSuffix:!0}),")"]})]})}),e.jsx(c,{label:"Hostname",value:m!=="-"?e.jsx(o,{listType:"requests",filterType:"hostnames",filterValue:m,className:"font-mono",children:m}):"-"}),s.controllerAction&&e.jsx(c,{label:"Controller Action",value:e.jsx(o,{listType:"requests",filterType:"controllers",filterValue:s.controllerAction,className:"font-mono",children:s.controllerAction})}),e.jsx(c,{label:"Path",value:e.jsx(o,{listType:"requests",filterType:"paths",filterValue:s.path,className:"font-mono",children:s.path})}),e.jsx(c,{label:"Status",value:s.statusCode?e.jsx(o,{listType:"requests",filterType:"statuses",filterValue:String(s.statusCode),children:String(s.statusCode)}):"-"}),e.jsx(c,{label:"Duration",value:s.duration!==void 0?e.jsx("span",{className:s.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:K(s.duration)}):"-"}),e.jsx(c,{label:"IP Address",value:s.ip?e.jsx(o,{listType:"requests",filterType:"ips",filterValue:s.ip,className:"font-mono",children:s.ip}):"-"}),s.userAgent&&e.jsx(c,{label:"User Agent",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:s.userAgent})}),s.handler&&s.handler!==s.controllerAction&&e.jsx(c,{label:"Handler",value:e.jsx("code",{className:"font-mono text-sm",children:s.handler})}),e.jsx(c,{label:"Memory Usage",value:s.memory!==void 0?J(s.memory):"-"}),a.length>0&&e.jsx(c,{label:"Tags",value:e.jsx(E,{items:a,listType:"requests",maxItems:99})})]})})]}),s.user&&e.jsx(F,{user:s.user}),e.jsx(C,{tabs:B,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(n.Toolbar,{data:w[x]}),onTabChange:f}),e.jsx(C,{tabs:A,defaultTab:"response",hashKey:"res",headerRight:e.jsx(d.Toolbar,{data:v[N]}),onTabChange:T}),e.jsx(I,{entries:t})]})}export{ae as default};
@@ -1 +1 @@
1
- import{j as t,A as P,d as A}from"./index-DyvNu-oR.js";import{e as q,b as R}from"./vendor-DBTT3jXp.js";import{f as v,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as L,P as M,N as F,L as H}from"./PageHeader-BAc6Jvef.js";import{u as S,i as G,C as l}from"./types-DZUckfsW.js";import{E as B}from"./EntrySearchInput-DqIRbpja.js";import{T as d,D as I,a as O,b as U}from"./DataTable-DNJpoFzh.js";import"./search-D9V4itpU.js";const W=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","GRAPHQL"],Q=s=>{var a;return(a=s.payload.path)!=null&&a.toLowerCase().includes("/graphql")?"GRAPHQL":s.payload.method.toUpperCase()};function _(){const s=q(),{addFilter:a,clearAll:u,serverFilters:h,headerFilters:p,hasFilters:c}=S("requests"),{entries:m,loading:g,refreshing:r,newEntriesCount:x,hasMore:y,loadMore:f,loadNew:j,autoRefreshEnabled:C,live:T,setAutoRefresh:E,meta:i,isHighlighted:b}=L({type:"request",limit:50,filters:h}),o=m.filter(e=>G(e)),k=R.useMemo(()=>[{key:"method",header:"Method",width:"100px",render:e=>t.jsx(l,{listType:"requests",filterType:"methods",children:Q(e)})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.path})},{key:"status",header:"Status",width:"80px",align:"center",render:e=>t.jsx(l,{listType:"requests",filterType:"statuses",children:e.payload.statusCode??0})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(I,{ms:e.payload.duration??0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>t.jsx(O,{tags:(e.tags??[]).filter(n=>!W.includes(n.toUpperCase())),max:3,onTagClick:(n,N)=>{N.stopPropagation(),a("tags",n)}})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:v(D(e.createdAt),{addSuffix:!0})})}],[a]);if(g&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const w=c?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Requests",icon:P,iconColor:"text-blue-600 dark:text-blue-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:r,autoRefreshEnabled:C,live:T,onAutoRefreshToggle:E,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(B,{placeholder:"Search by path, method, status, tag, or content..."}),t.jsx(F,{count:x,onClick:j,loading:r}),t.jsx(U,{columns:k,data:o,keyExtractor:e=>e.id,onRowClick:e=>s(`/requests/${e.id}`),emptyMessage:"No requests recorded yet",emptyIcon:t.jsx(A,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"}),rowClassName:e=>b(e.id)?"highlight-new":""}),t.jsx(H,{hasMore:y,onClick:f,loading:r})]})]})}export{_ as default};
1
+ import{j as t,A as P,d as A}from"./index-DOVqOa07.js";import{e as q,b as R}from"./vendor-DBTT3jXp.js";import{f as v,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as L,P as M,N as F,L as H}from"./PageHeader-CIBDYg8j.js";import{u as S,i as G,C as l}from"./types-nsz9P0qo.js";import{E as B}from"./EntrySearchInput-DLuCL4Ys.js";import{T as d,D as I,a as O,b as U}from"./DataTable-PCSvmOPj.js";import"./search-DgNz5G1h.js";const W=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS","GRAPHQL"],Q=s=>{var a;return(a=s.payload.path)!=null&&a.toLowerCase().includes("/graphql")?"GRAPHQL":s.payload.method.toUpperCase()};function _(){const s=q(),{addFilter:a,clearAll:u,serverFilters:h,headerFilters:p,hasFilters:c}=S("requests"),{entries:m,loading:g,refreshing:r,newEntriesCount:x,hasMore:y,loadMore:f,loadNew:j,autoRefreshEnabled:C,live:T,setAutoRefresh:E,meta:i,isHighlighted:b}=L({type:"request",limit:50,filters:h}),o=m.filter(e=>G(e)),k=R.useMemo(()=>[{key:"method",header:"Method",width:"100px",render:e=>t.jsx(l,{listType:"requests",filterType:"methods",children:Q(e)})},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"400px",children:e.payload.path})},{key:"status",header:"Status",width:"80px",align:"center",render:e=>t.jsx(l,{listType:"requests",filterType:"statuses",children:e.payload.statusCode??0})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(I,{ms:e.payload.duration??0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>t.jsx(O,{tags:(e.tags??[]).filter(n=>!W.includes(n.toUpperCase())),max:3,onTagClick:(n,N)=>{N.stopPropagation(),a("tags",n)}})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:v(D(e.createdAt),{addSuffix:!0})})}],[a]);if(g&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const w=c?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Requests",icon:P,iconColor:"text-blue-600 dark:text-blue-400",count:o.length,totalCount:i==null?void 0:i.total,refreshing:r,autoRefreshEnabled:C,live:T,onAutoRefreshToggle:E,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(B,{placeholder:"Search by path, method, status, tag, or content..."}),t.jsx(F,{count:x,onClick:j,loading:r}),t.jsx(U,{columns:k,data:o,keyExtractor:e=>e.id,onRowClick:e=>s(`/requests/${e.id}`),emptyMessage:"No requests recorded yet",emptyIcon:t.jsx(A,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"}),rowClassName:e=>b(e.id)?"highlight-new":""}),t.jsx(H,{hasMore:y,onClick:f,loading:r})]})]})}export{_ as default};
@@ -1 +1 @@
1
- import{w as b,j as e,C as n}from"./index-DyvNu-oR.js";import{f as a,c as N}from"./format-PC0kH-TG.js";import{C as o,B as v}from"./types-DZUckfsW.js";import{p as l,f as m}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as g}from"./DetailRow-CouZ8riB.js";import{C as u}from"./circle-x-BOe5goDy.js";import{C as k}from"./circle-check-big-1S8vooWx.js";import{T as w}from"./timer-CZxO8Y_Q.js";import{C as T}from"./calendar-DcK1CETU.js";import"./vendor-DBTT3jXp.js";function d(i){try{return N.toString(i)}catch{return null}}const h={started:{icon:b,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30",label:"STARTED"},completed:{icon:k,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30",label:"COMPLETED"},failed:{icon:u,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30",label:"FAILED"}},C=["started","completed","failed"];function I({entry:i}){const{payload:s,createdAt:c,tags:j}=i,x=(j??[]).filter(f=>!C.includes(f.toLowerCase())),r=h[s.status]||h.started,p=r.icon,y=()=>s.cron?s.cron:s.interval?`${s.interval}ms`:"-";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.jsx("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 ${r.bg} rounded-lg`,children:e.jsx(n,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white truncate font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Scheduled Task"})]})]})})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 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(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${s.status==="completed"?"text-green-600 dark:text-green-400":s.status==="failed"?"text-red-600 dark:text-red-400":"text-blue-600 dark:text-blue-400"}`,children:r.label})]}),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(w,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.duration!==void 0?e.jsxs(e.Fragment,{children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]}):"-"})]}),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(T,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Schedule"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:y()}),s.cron&&d(s.cron)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d(s.cron)}),s.interval&&a(s.interval)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.interval)})]}),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:"Timeout"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.timeout!==void 0?e.jsxs(e.Fragment,{children:[s.timeout,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]}):"-"}),s.timeout!==void 0&&a(s.timeout)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.timeout)})]})]})]}),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(t,{label:"Time",value:e.jsxs("span",{children:[g(l(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",m(l(c),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Task Name",value:e.jsx(o,{listType:"schedule",filterType:"names",filterValue:s.name,className:"font-mono",children:s.name})}),s.cron&&e.jsx(t,{label:"Cron Expression",value:e.jsxs("div",{children:[e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.cron}),d(s.cron)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d(s.cron)})]})}),s.interval&&e.jsx(t,{label:"Interval",value:e.jsxs("div",{children:[e.jsxs("span",{children:[s.interval,"ms"]}),a(s.interval)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.interval)})]})}),e.jsx(t,{label:"Status",value:e.jsx(o,{listType:"schedule",filterType:"statuses",filterValue:s.status,children:s.status})}),s.duration!==void 0&&e.jsx(t,{label:"Duration",value:`${s.duration}ms`}),s.timeout!==void 0&&e.jsx(t,{label:"Timeout",value:e.jsxs("div",{children:[e.jsxs("span",{children:[s.timeout,"ms"]}),a(s.timeout)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.timeout)})]})}),s.nextRun&&e.jsx(t,{label:"Next Run",value:e.jsxs("span",{children:[g(l(s.nextRun),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",m(l(s.nextRun),{addSuffix:!0}),")"]})]})}),x.length>0&&e.jsx(t,{label:"Tags",value:e.jsx(v,{items:x,listType:"schedule"})})]})})]}),s.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(u,{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:s.error})})]})]})}export{I as default};
1
+ import{w as b,j as e,C as n}from"./index-DOVqOa07.js";import{f as a,c as N}from"./format-BlNP-apw.js";import{C as o,B as v}from"./types-nsz9P0qo.js";import{p as l,f as m}from"./badgeColors-DQ_P_DOX.js";import{D as t,f as g}from"./DetailRow-CfonsGvS.js";import{C as u}from"./circle-x-Cgixh9fi.js";import{C as k}from"./circle-check-big-DfHJ1LXS.js";import{T as w}from"./timer-hkll0vuQ.js";import{C as T}from"./calendar-BMPz0Z6s.js";import"./vendor-DBTT3jXp.js";function d(i){try{return N.toString(i)}catch{return null}}const h={started:{icon:b,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30",label:"STARTED"},completed:{icon:k,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30",label:"COMPLETED"},failed:{icon:u,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30",label:"FAILED"}},C=["started","completed","failed"];function I({entry:i}){const{payload:s,createdAt:c,tags:j}=i,x=(j??[]).filter(f=>!C.includes(f.toLowerCase())),r=h[s.status]||h.started,p=r.icon,y=()=>s.cron?s.cron:s.interval?`${s.interval}ms`:"-";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.jsx("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 ${r.bg} rounded-lg`,children:e.jsx(n,{className:`h-5 w-5 ${r.color}`})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white truncate font-mono",children:s.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Scheduled Task"})]})]})})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 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(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${s.status==="completed"?"text-green-600 dark:text-green-400":s.status==="failed"?"text-red-600 dark:text-red-400":"text-blue-600 dark:text-blue-400"}`,children:r.label})]}),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(w,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.duration!==void 0?e.jsxs(e.Fragment,{children:[s.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]}):"-"})]}),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(T,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Schedule"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:y()}),s.cron&&d(s.cron)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d(s.cron)}),s.interval&&a(s.interval)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.interval)})]}),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:"Timeout"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:s.timeout!==void 0?e.jsxs(e.Fragment,{children:[s.timeout,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]}):"-"}),s.timeout!==void 0&&a(s.timeout)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.timeout)})]})]})]}),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(t,{label:"Time",value:e.jsxs("span",{children:[g(l(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",m(l(c),{addSuffix:!0}),")"]})]})}),e.jsx(t,{label:"Task Name",value:e.jsx(o,{listType:"schedule",filterType:"names",filterValue:s.name,className:"font-mono",children:s.name})}),s.cron&&e.jsx(t,{label:"Cron Expression",value:e.jsxs("div",{children:[e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:s.cron}),d(s.cron)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:d(s.cron)})]})}),s.interval&&e.jsx(t,{label:"Interval",value:e.jsxs("div",{children:[e.jsxs("span",{children:[s.interval,"ms"]}),a(s.interval)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.interval)})]})}),e.jsx(t,{label:"Status",value:e.jsx(o,{listType:"schedule",filterType:"statuses",filterValue:s.status,children:s.status})}),s.duration!==void 0&&e.jsx(t,{label:"Duration",value:`${s.duration}ms`}),s.timeout!==void 0&&e.jsx(t,{label:"Timeout",value:e.jsxs("div",{children:[e.jsxs("span",{children:[s.timeout,"ms"]}),a(s.timeout)&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:a(s.timeout)})]})}),s.nextRun&&e.jsx(t,{label:"Next Run",value:e.jsxs("span",{children:[g(l(s.nextRun),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",m(l(s.nextRun),{addSuffix:!0}),")"]})]})}),x.length>0&&e.jsx(t,{label:"Tags",value:e.jsx(v,{items:x,listType:"schedule"})})]})})]}),s.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(u,{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:s.error})})]})]})}export{I as default};
@@ -1 +1 @@
1
- import{j as a,C as c}from"./index-DyvNu-oR.js";import{e as A,b as u}from"./vendor-DBTT3jXp.js";import{f as h,c as L}from"./format-PC0kH-TG.js";import{f as R,p as H}from"./badgeColors-DQ_P_DOX.js";import{u as B,P as W,N as $,L as I}from"./PageHeader-BAc6Jvef.js";import{u as q,h as z,C as m}from"./types-DZUckfsW.js";import{T as i,D as G,a as J,b as K}from"./DataTable-DNJpoFzh.js";const O=["started","completed","failed"];function p(t){try{return L.toString(t)}catch{return null}}function ee(){const t=A(),{addFilter:n,clearAll:x,serverFilters:g,headerFilters:f,hasFilters:y}=q("schedule"),{entries:k,loading:j,refreshing:s,newEntriesCount:C,hasMore:N,loadMore:T,loadNew:v,autoRefreshEnabled:b,live:w,setAutoRefresh:E,meta:r,isHighlighted:S}=B({type:"schedule",limit:50,filters:g}),l=k.filter(e=>z(e)),d=u.useCallback(e=>e.payload.cron?e.payload.cron:e.payload.interval?`${e.payload.interval}ms`:"-",[]),D=u.useMemo(()=>[{key:"task",header:"Task",minWidth:"200px",render:e=>a.jsx(m,{listType:"schedule",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"schedule",header:"Schedule",minWidth:"150px",render:e=>a.jsxs("div",{children:[a.jsx(i,{mono:!0,children:d(e)}),e.payload.cron&&p(e.payload.cron)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:p(e.payload.cron)}),e.payload.interval&&h(e.payload.interval)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:h(e.payload.interval)})]})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(m,{listType:"schedule",filterType:"statuses",children:e.payload.status})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?a.jsx(G,{ms:e.payload.duration}):a.jsx(i,{secondary:!0,children:"—"})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const M=(e.tags??[]).filter(o=>!O.includes(o.toLowerCase()));return a.jsx(J,{tags:M,max:3,onTagClick:(o,P)=>{P.stopPropagation(),n("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:R(H(e.createdAt),{addSuffix:!0})})}],[n,d]);if(j&&l.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const F=y?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(W,{title:"Schedule",icon:c,iconColor:"text-gray-600 dark:text-gray-400",count:l.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:b,live:w,onAutoRefreshToggle:E,filters:f,onClearAllFilters:x}),a.jsxs("div",{className:`${F} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:C,onClick:v,loading:s}),a.jsx(K,{columns:D,data:l,keyExtractor:e=>e.id,onRowClick:e=>t(`/schedule/${e.id}`),rowClassName:e=>S(e.id)?"highlight-new":"",emptyMessage:"No scheduled tasks recorded yet",emptyIcon:a.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:N,onClick:T,loading:s})]})]})}export{ee as default};
1
+ import{j as a,C as c}from"./index-DOVqOa07.js";import{e as A,b as u}from"./vendor-DBTT3jXp.js";import{f as h,c as L}from"./format-BlNP-apw.js";import{f as R,p as H}from"./badgeColors-DQ_P_DOX.js";import{u as B,P as W,N as $,L as I}from"./PageHeader-CIBDYg8j.js";import{u as q,h as z,C as m}from"./types-nsz9P0qo.js";import{T as i,D as G,a as J,b as K}from"./DataTable-PCSvmOPj.js";const O=["started","completed","failed"];function p(t){try{return L.toString(t)}catch{return null}}function ee(){const t=A(),{addFilter:n,clearAll:x,serverFilters:g,headerFilters:f,hasFilters:y}=q("schedule"),{entries:k,loading:j,refreshing:s,newEntriesCount:C,hasMore:N,loadMore:T,loadNew:v,autoRefreshEnabled:b,live:w,setAutoRefresh:E,meta:r,isHighlighted:S}=B({type:"schedule",limit:50,filters:g}),l=k.filter(e=>z(e)),d=u.useCallback(e=>e.payload.cron?e.payload.cron:e.payload.interval?`${e.payload.interval}ms`:"-",[]),D=u.useMemo(()=>[{key:"task",header:"Task",minWidth:"200px",render:e=>a.jsx(m,{listType:"schedule",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"schedule",header:"Schedule",minWidth:"150px",render:e=>a.jsxs("div",{children:[a.jsx(i,{mono:!0,children:d(e)}),e.payload.cron&&p(e.payload.cron)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:p(e.payload.cron)}),e.payload.interval&&h(e.payload.interval)&&a.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400 block mt-0.5",children:h(e.payload.interval)})]})},{key:"status",header:"Status",width:"100px",render:e=>a.jsx(m,{listType:"schedule",filterType:"statuses",children:e.payload.status})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?a.jsx(G,{ms:e.payload.duration}):a.jsx(i,{secondary:!0,children:"—"})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const M=(e.tags??[]).filter(o=>!O.includes(o.toLowerCase()));return a.jsx(J,{tags:M,max:3,onTagClick:(o,P)=>{P.stopPropagation(),n("tags",o)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>a.jsx(i,{secondary:!0,className:"text-xs",children:R(H(e.createdAt),{addSuffix:!0})})}],[n,d]);if(j&&l.length===0)return a.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:a.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const F=y?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(W,{title:"Schedule",icon:c,iconColor:"text-gray-600 dark:text-gray-400",count:l.length,totalCount:r==null?void 0:r.total,refreshing:s,autoRefreshEnabled:b,live:w,onAutoRefreshToggle:E,filters:f,onClearAllFilters:x}),a.jsxs("div",{className:`${F} space-y-4 transition-all duration-200`,children:[a.jsx($,{count:C,onClick:v,loading:s}),a.jsx(K,{columns:D,data:l,keyExtractor:e=>e.id,onRowClick:e=>t(`/schedule/${e.id}`),rowClassName:e=>S(e.id)?"highlight-new":"",emptyMessage:"No scheduled tasks recorded yet",emptyIcon:a.jsx(c,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(I,{hasMore:N,onClick:T,loading:s})]})]})}export{ee as default};
@@ -1 +1 @@
1
- import{j as h}from"./index-DyvNu-oR.js";import{D as _}from"./DetailRow-CouZ8riB.js";function J(x){function j(t,l){return t<<l|t>>>32-l}function i(t,l){const a=(t&65535)+(l&65535);return(t>>16)+(l>>16)+(a>>16)<<16|a&65535}function E(t,l,a){return t&l|~t&a}function R(t,l,a){return t&a|l&~a}function T(t,l,a){return t^l^a}function M(t,l,a){return l^(t|~a)}function c(t,l,a,f,p,S,g){return t=i(t,i(i(E(l,a,f),p),g)),i(j(t,S),l)}function d(t,l,a,f,p,S,g){return t=i(t,i(i(R(l,a,f),p),g)),i(j(t,S),l)}function m(t,l,a,f,p,S,g){return t=i(t,i(i(T(l,a,f),p),g)),i(j(t,S),l)}function u(t,l,a,f,p,S,g){return t=i(t,i(i(M(l,a,f),p),g)),i(j(t,S),l)}function q(t){const l=[],a=t.length,f=a+8,S=((f-f%64)/64+1)*16;for(let b=0;b<S;b++)l[b]=0;let g=0,N=0;for(;N<a;){const b=(N-N%4)/4;g=N%4*8,l[b]=l[b]|t.charCodeAt(N)<<g,N++}const $=(N-N%4)/4;return g=N%4*8,l[$]=l[$]|128<<g,l[S-2]=a<<3,l[S-1]=a>>>29,l}function v(t){let l="";for(let a=0;a<=3;a++){const f=t>>>a*8&255;l+=("0"+f.toString(16)).slice(-2)}return l}const s=q(x);let e=1732584193,n=4023233417,r=2562383102,o=271733878;const w=7,y=12,W=17,C=22,A=5,U=9,k=14,D=20,B=4,G=11,H=16,I=23,O=6,F=10,L=15,P=21;for(let t=0;t<s.length;t+=16){const l=e,a=n,f=r,p=o;e=c(e,n,r,o,s[t+0],w,3614090360),o=c(o,e,n,r,s[t+1],y,3905402710),r=c(r,o,e,n,s[t+2],W,606105819),n=c(n,r,o,e,s[t+3],C,3250441966),e=c(e,n,r,o,s[t+4],w,4118548399),o=c(o,e,n,r,s[t+5],y,1200080426),r=c(r,o,e,n,s[t+6],W,2821735955),n=c(n,r,o,e,s[t+7],C,4249261313),e=c(e,n,r,o,s[t+8],w,1770035416),o=c(o,e,n,r,s[t+9],y,2336552879),r=c(r,o,e,n,s[t+10],W,4294925233),n=c(n,r,o,e,s[t+11],C,2304563134),e=c(e,n,r,o,s[t+12],w,1804603682),o=c(o,e,n,r,s[t+13],y,4254626195),r=c(r,o,e,n,s[t+14],W,2792965006),n=c(n,r,o,e,s[t+15],C,1236535329),e=d(e,n,r,o,s[t+1],A,4129170786),o=d(o,e,n,r,s[t+6],U,3225465664),r=d(r,o,e,n,s[t+11],k,643717713),n=d(n,r,o,e,s[t+0],D,3921069994),e=d(e,n,r,o,s[t+5],A,3593408605),o=d(o,e,n,r,s[t+10],U,38016083),r=d(r,o,e,n,s[t+15],k,3634488961),n=d(n,r,o,e,s[t+4],D,3889429448),e=d(e,n,r,o,s[t+9],A,568446438),o=d(o,e,n,r,s[t+14],U,3275163606),r=d(r,o,e,n,s[t+3],k,4107603335),n=d(n,r,o,e,s[t+8],D,1163531501),e=d(e,n,r,o,s[t+13],A,2850285829),o=d(o,e,n,r,s[t+2],U,4243563512),r=d(r,o,e,n,s[t+7],k,1735328473),n=d(n,r,o,e,s[t+12],D,2368359562),e=m(e,n,r,o,s[t+5],B,4294588738),o=m(o,e,n,r,s[t+8],G,2272392833),r=m(r,o,e,n,s[t+11],H,1839030562),n=m(n,r,o,e,s[t+14],I,4259657740),e=m(e,n,r,o,s[t+1],B,2763975236),o=m(o,e,n,r,s[t+4],G,1272893353),r=m(r,o,e,n,s[t+7],H,4139469664),n=m(n,r,o,e,s[t+10],I,3200236656),e=m(e,n,r,o,s[t+13],B,681279174),o=m(o,e,n,r,s[t+0],G,3936430074),r=m(r,o,e,n,s[t+3],H,3572445317),n=m(n,r,o,e,s[t+6],I,76029189),e=m(e,n,r,o,s[t+9],B,3654602809),o=m(o,e,n,r,s[t+12],G,3873151461),r=m(r,o,e,n,s[t+15],H,530742520),n=m(n,r,o,e,s[t+2],I,3299628645),e=u(e,n,r,o,s[t+0],O,4096336452),o=u(o,e,n,r,s[t+7],F,1126891415),r=u(r,o,e,n,s[t+14],L,2878612391),n=u(n,r,o,e,s[t+5],P,4237533241),e=u(e,n,r,o,s[t+12],O,1700485571),o=u(o,e,n,r,s[t+3],F,2399980690),r=u(r,o,e,n,s[t+10],L,4293915773),n=u(n,r,o,e,s[t+1],P,2240044497),e=u(e,n,r,o,s[t+8],O,1873313359),o=u(o,e,n,r,s[t+15],F,4264355552),r=u(r,o,e,n,s[t+6],L,2734768916),n=u(n,r,o,e,s[t+13],P,1309151649),e=u(e,n,r,o,s[t+4],O,4149444226),o=u(o,e,n,r,s[t+11],F,3174756917),r=u(r,o,e,n,s[t+2],L,718787259),n=u(n,r,o,e,s[t+9],P,3951481745),e=i(e,l),n=i(n,a),r=i(r,f),o=i(o,p)}return v(e)+v(n)+v(r)+v(o)}function K(x,j=80){return`https://www.gravatar.com/avatar/${J(x.toLowerCase().trim())}?d=identicon&s=${j}`}function X({user:x}){const j=x.email?K(x.email):null;return h.jsxs("div",{className:"card",children:[h.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Authenticated User"})}),h.jsx("div",{className:"p-4",children:h.jsxs("dl",{className:"divide-y-0",children:[h.jsx(_,{label:"ID",value:h.jsx("code",{className:"text-sm font-mono bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded",children:String(x.id)})}),x.name&&h.jsx(_,{label:"Name",value:h.jsxs("span",{className:"flex items-center gap-2",children:[j&&h.jsx("img",{src:j,alt:x.name,className:"w-6 h-6 rounded-full"}),h.jsx("span",{children:x.name})]})}),x.email&&h.jsx(_,{label:"Email Address",value:h.jsx("a",{href:`mailto:${x.email}`,className:"text-indigo-600 dark:text-indigo-400 hover:underline",children:x.email})})]})})]})}export{X as U};
1
+ import{j as h}from"./index-DOVqOa07.js";import{D as _}from"./DetailRow-CfonsGvS.js";function J(x){function j(t,l){return t<<l|t>>>32-l}function i(t,l){const a=(t&65535)+(l&65535);return(t>>16)+(l>>16)+(a>>16)<<16|a&65535}function E(t,l,a){return t&l|~t&a}function R(t,l,a){return t&a|l&~a}function T(t,l,a){return t^l^a}function M(t,l,a){return l^(t|~a)}function c(t,l,a,f,p,S,g){return t=i(t,i(i(E(l,a,f),p),g)),i(j(t,S),l)}function d(t,l,a,f,p,S,g){return t=i(t,i(i(R(l,a,f),p),g)),i(j(t,S),l)}function m(t,l,a,f,p,S,g){return t=i(t,i(i(T(l,a,f),p),g)),i(j(t,S),l)}function u(t,l,a,f,p,S,g){return t=i(t,i(i(M(l,a,f),p),g)),i(j(t,S),l)}function q(t){const l=[],a=t.length,f=a+8,S=((f-f%64)/64+1)*16;for(let b=0;b<S;b++)l[b]=0;let g=0,N=0;for(;N<a;){const b=(N-N%4)/4;g=N%4*8,l[b]=l[b]|t.charCodeAt(N)<<g,N++}const $=(N-N%4)/4;return g=N%4*8,l[$]=l[$]|128<<g,l[S-2]=a<<3,l[S-1]=a>>>29,l}function v(t){let l="";for(let a=0;a<=3;a++){const f=t>>>a*8&255;l+=("0"+f.toString(16)).slice(-2)}return l}const s=q(x);let e=1732584193,n=4023233417,r=2562383102,o=271733878;const w=7,y=12,W=17,C=22,A=5,U=9,k=14,D=20,B=4,G=11,H=16,I=23,O=6,F=10,L=15,P=21;for(let t=0;t<s.length;t+=16){const l=e,a=n,f=r,p=o;e=c(e,n,r,o,s[t+0],w,3614090360),o=c(o,e,n,r,s[t+1],y,3905402710),r=c(r,o,e,n,s[t+2],W,606105819),n=c(n,r,o,e,s[t+3],C,3250441966),e=c(e,n,r,o,s[t+4],w,4118548399),o=c(o,e,n,r,s[t+5],y,1200080426),r=c(r,o,e,n,s[t+6],W,2821735955),n=c(n,r,o,e,s[t+7],C,4249261313),e=c(e,n,r,o,s[t+8],w,1770035416),o=c(o,e,n,r,s[t+9],y,2336552879),r=c(r,o,e,n,s[t+10],W,4294925233),n=c(n,r,o,e,s[t+11],C,2304563134),e=c(e,n,r,o,s[t+12],w,1804603682),o=c(o,e,n,r,s[t+13],y,4254626195),r=c(r,o,e,n,s[t+14],W,2792965006),n=c(n,r,o,e,s[t+15],C,1236535329),e=d(e,n,r,o,s[t+1],A,4129170786),o=d(o,e,n,r,s[t+6],U,3225465664),r=d(r,o,e,n,s[t+11],k,643717713),n=d(n,r,o,e,s[t+0],D,3921069994),e=d(e,n,r,o,s[t+5],A,3593408605),o=d(o,e,n,r,s[t+10],U,38016083),r=d(r,o,e,n,s[t+15],k,3634488961),n=d(n,r,o,e,s[t+4],D,3889429448),e=d(e,n,r,o,s[t+9],A,568446438),o=d(o,e,n,r,s[t+14],U,3275163606),r=d(r,o,e,n,s[t+3],k,4107603335),n=d(n,r,o,e,s[t+8],D,1163531501),e=d(e,n,r,o,s[t+13],A,2850285829),o=d(o,e,n,r,s[t+2],U,4243563512),r=d(r,o,e,n,s[t+7],k,1735328473),n=d(n,r,o,e,s[t+12],D,2368359562),e=m(e,n,r,o,s[t+5],B,4294588738),o=m(o,e,n,r,s[t+8],G,2272392833),r=m(r,o,e,n,s[t+11],H,1839030562),n=m(n,r,o,e,s[t+14],I,4259657740),e=m(e,n,r,o,s[t+1],B,2763975236),o=m(o,e,n,r,s[t+4],G,1272893353),r=m(r,o,e,n,s[t+7],H,4139469664),n=m(n,r,o,e,s[t+10],I,3200236656),e=m(e,n,r,o,s[t+13],B,681279174),o=m(o,e,n,r,s[t+0],G,3936430074),r=m(r,o,e,n,s[t+3],H,3572445317),n=m(n,r,o,e,s[t+6],I,76029189),e=m(e,n,r,o,s[t+9],B,3654602809),o=m(o,e,n,r,s[t+12],G,3873151461),r=m(r,o,e,n,s[t+15],H,530742520),n=m(n,r,o,e,s[t+2],I,3299628645),e=u(e,n,r,o,s[t+0],O,4096336452),o=u(o,e,n,r,s[t+7],F,1126891415),r=u(r,o,e,n,s[t+14],L,2878612391),n=u(n,r,o,e,s[t+5],P,4237533241),e=u(e,n,r,o,s[t+12],O,1700485571),o=u(o,e,n,r,s[t+3],F,2399980690),r=u(r,o,e,n,s[t+10],L,4293915773),n=u(n,r,o,e,s[t+1],P,2240044497),e=u(e,n,r,o,s[t+8],O,1873313359),o=u(o,e,n,r,s[t+15],F,4264355552),r=u(r,o,e,n,s[t+6],L,2734768916),n=u(n,r,o,e,s[t+13],P,1309151649),e=u(e,n,r,o,s[t+4],O,4149444226),o=u(o,e,n,r,s[t+11],F,3174756917),r=u(r,o,e,n,s[t+2],L,718787259),n=u(n,r,o,e,s[t+9],P,3951481745),e=i(e,l),n=i(n,a),r=i(r,f),o=i(o,p)}return v(e)+v(n)+v(r)+v(o)}function K(x,j=80){return`https://www.gravatar.com/avatar/${J(x.toLowerCase().trim())}?d=identicon&s=${j}`}function X({user:x}){const j=x.email?K(x.email):null;return h.jsxs("div",{className:"card",children:[h.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Authenticated User"})}),h.jsx("div",{className:"p-4",children:h.jsxs("dl",{className:"divide-y-0",children:[h.jsx(_,{label:"ID",value:h.jsx("code",{className:"text-sm font-mono bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded",children:String(x.id)})}),x.name&&h.jsx(_,{label:"Name",value:h.jsxs("span",{className:"flex items-center gap-2",children:[j&&h.jsx("img",{src:j,alt:x.name,className:"w-6 h-6 rounded-full"}),h.jsx("span",{children:x.name})]})}),x.email&&h.jsx(_,{label:"Email Address",value:h.jsx("a",{href:`mailto:${x.email}`,className:"text-indigo-600 dark:text-indigo-400 hover:underline",children:x.email})})]})})]})}export{X as U};
@@ -1 +1 @@
1
- import{j as e,F as p,C as h}from"./index-DyvNu-oR.js";import{p as i,f as j}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as g}from"./DetailRow-CouZ8riB.js";import{C as c}from"./types-DZUckfsW.js";import{u as b,C as f,T as N}from"./EntryDetailPage-QTrST2MQ.js";import{C as u}from"./CopyButton-CVTvd0EZ.js";import{E as o}from"./eye-PnSIQ7GH.js";import{C as y}from"./circle-check-big-1S8vooWx.js";import{C as x}from"./circle-x-BOe5goDy.js";import"./vendor-DBTT3jXp.js";import"./search-D9V4itpU.js";function M({entry:n}){const{payload:a,createdAt:d}=n,r=b(),t=a.status==="rendered"?{icon:y,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:x,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},m=t.icon,l=[];return a.locals!==void 0&&l.push({id:"locals",label:"Locals",content:e.jsx(f,{data:a.locals,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}),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 ${t.bg} rounded-lg`,children:e.jsx(o,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.template}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"View Render"})]})]}),e.jsx(u,{text:a.template,label:"Copy template"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 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(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Format"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:a.format||"HTML"})]}),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(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:a.status.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(h,{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"})]})]}),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:"Cache"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.cacheHit?"Yes":"No"})]})]})]}),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:[g(i(d),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",j(i(d),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Template",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:a.template})}),a.format&&e.jsx(s,{label:"Format",value:e.jsx(c,{listType:"views",filterType:"formats",filterValue:a.format,children:a.format})}),e.jsx(s,{label:"Status",value:e.jsx(c,{listType:"views",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.cacheHit!==void 0&&e.jsx(s,{label:"Cached",value:a.cacheHit?"Yes":"No"}),a.dataSize!==void 0&&e.jsx(s,{label:"Data Size",value:`${a.dataSize} bytes`}),a.outputSize!==void 0&&e.jsx(s,{label:"Output Size",value:`${a.outputSize} bytes`})]})})]}),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(x,{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})})]}),l.length>0&&e.jsx(N,{tabs:l,defaultTab:"locals",hashKey:"view",headerRight:a.locals!==void 0?e.jsx(r.Toolbar,{data:a.locals}):void 0})]})}export{M as default};
1
+ import{j as e,F as p,C as h}from"./index-DOVqOa07.js";import{p as i,f as j}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as g}from"./DetailRow-CfonsGvS.js";import{C as c}from"./types-nsz9P0qo.js";import{u as b,C as f,T as N}from"./EntryDetailPage-C5QubCqk.js";import{C as u}from"./CopyButton-C2sNp4HP.js";import{E as o}from"./eye-DRW5kZff.js";import{C as y}from"./circle-check-big-DfHJ1LXS.js";import{C as x}from"./circle-x-Cgixh9fi.js";import"./vendor-DBTT3jXp.js";import"./search-DgNz5G1h.js";function M({entry:n}){const{payload:a,createdAt:d}=n,r=b(),t=a.status==="rendered"?{icon:y,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:x,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},m=t.icon,l=[];return a.locals!==void 0&&l.push({id:"locals",label:"Locals",content:e.jsx(f,{data:a.locals,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}),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 ${t.bg} rounded-lg`,children:e.jsx(o,{className:`h-5 w-5 ${t.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.template}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"View Render"})]})]}),e.jsx(u,{text:a.template,label:"Copy template"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 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(p,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Format"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono",children:a.format||"HTML"})]}),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(m,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:a.status.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(h,{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"})]})]}),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:"Cache"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.cacheHit?"Yes":"No"})]})]})]}),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:[g(i(d),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",j(i(d),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Template",value:e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:a.template})}),a.format&&e.jsx(s,{label:"Format",value:e.jsx(c,{listType:"views",filterType:"formats",filterValue:a.format,children:a.format})}),e.jsx(s,{label:"Status",value:e.jsx(c,{listType:"views",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.cacheHit!==void 0&&e.jsx(s,{label:"Cached",value:a.cacheHit?"Yes":"No"}),a.dataSize!==void 0&&e.jsx(s,{label:"Data Size",value:`${a.dataSize} bytes`}),a.outputSize!==void 0&&e.jsx(s,{label:"Output Size",value:`${a.outputSize} bytes`})]})})]}),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(x,{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})})]}),l.length>0&&e.jsx(N,{tabs:l,defaultTab:"locals",hashKey:"view",headerRight:a.locals!==void 0?e.jsx(r.Toolbar,{data:a.locals}):void 0})]})}export{M as default};
@@ -1 +1 @@
1
- import{j as t}from"./index-DyvNu-oR.js";import{e as P,b as T}from"./vendor-DBTT3jXp.js";import{f as D,p as A}from"./badgeColors-DQ_P_DOX.js";import{u as M,P as R,N as H,L as B}from"./PageHeader-BAc6Jvef.js";import{u as L,n as V,C as l}from"./types-DZUckfsW.js";import{T as r,D as S,b as W}from"./DataTable-DNJpoFzh.js";import{E as d}from"./eye-PnSIQ7GH.js";function J(){const c=P(),{addFilter:s,clearAll:h,serverFilters:m,headerFilters:u,hasFilters:p}=L("views"),{entries:x,loading:g,refreshing:i,newEntriesCount:f,hasMore:y,loadMore:w,loadNew:j,autoRefreshEnabled:C,live:k,setAutoRefresh:N,meta:o,isHighlighted:v}=M({type:"view",limit:50,filters:m}),n=x.filter(e=>V(e)),E=T.useMemo(()=>[{key:"template",header:"Template",minWidth:"250px",render:e=>t.jsx(r,{mono:!0,truncate:!0,maxWidth:"350px",children:e.payload.template})},{key:"format",header:"Format",width:"100px",render:e=>{const a=e.payload.format;return a?t.jsx(l,{onClick:F=>{F.stopPropagation(),s("formats",a)},className:"font-mono",children:a}):t.jsx(r,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(S,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),s("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"cache",header:"Cache",width:"80px",align:"center",render:e=>e.payload.cacheHit!==void 0?t.jsx(r,{children:e.payload.cacheHit?"Yes":"No"}):t.jsx(r,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(r,{secondary:!0,className:"text-xs",children:D(A(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&n.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=p?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(R,{title:"Views",icon:d,iconColor:"text-teal-600 dark:text-teal-400",count:n.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:C,live:k,onAutoRefreshToggle:N,filters:u,onClearAllFilters:h}),t.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[t.jsx(H,{count:f,onClick:j,loading:i}),t.jsx(W,{columns:E,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/views/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No view renders recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:y,onClick:w,loading:i})]})]})}export{J as default};
1
+ import{j as t}from"./index-DOVqOa07.js";import{e as P,b as T}from"./vendor-DBTT3jXp.js";import{f as D,p as A}from"./badgeColors-DQ_P_DOX.js";import{u as M,P as R,N as H,L as B}from"./PageHeader-CIBDYg8j.js";import{u as L,n as V,C as l}from"./types-nsz9P0qo.js";import{T as r,D as S,b as W}from"./DataTable-PCSvmOPj.js";import{E as d}from"./eye-DRW5kZff.js";function J(){const c=P(),{addFilter:s,clearAll:h,serverFilters:m,headerFilters:u,hasFilters:p}=L("views"),{entries:x,loading:g,refreshing:i,newEntriesCount:f,hasMore:y,loadMore:w,loadNew:j,autoRefreshEnabled:C,live:k,setAutoRefresh:N,meta:o,isHighlighted:v}=M({type:"view",limit:50,filters:m}),n=x.filter(e=>V(e)),E=T.useMemo(()=>[{key:"template",header:"Template",minWidth:"250px",render:e=>t.jsx(r,{mono:!0,truncate:!0,maxWidth:"350px",children:e.payload.template})},{key:"format",header:"Format",width:"100px",render:e=>{const a=e.payload.format;return a?t.jsx(l,{onClick:F=>{F.stopPropagation(),s("formats",a)},className:"font-mono",children:a}):t.jsx(r,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(S,{ms:e.payload.duration||0})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),s("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"cache",header:"Cache",width:"80px",align:"center",render:e=>e.payload.cacheHit!==void 0?t.jsx(r,{children:e.payload.cacheHit?"Yes":"No"}):t.jsx(r,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(r,{secondary:!0,className:"text-xs",children:D(A(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&n.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const b=p?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(R,{title:"Views",icon:d,iconColor:"text-teal-600 dark:text-teal-400",count:n.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:C,live:k,onAutoRefreshToggle:N,filters:u,onClearAllFilters:h}),t.jsxs("div",{className:`${b} space-y-4 transition-all duration-200`,children:[t.jsx(H,{count:f,onClick:j,loading:i}),t.jsx(W,{columns:E,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/views/${e.id}`),rowClassName:e=>v(e.id)?"highlight-new":"",emptyMessage:"No view renders recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:y,onClick:w,loading:i})]})]})}export{J as default};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-DyvNu-oR.js";/**
1
+ import{c as e}from"./index-DOVqOa07.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 e}from"./index-DyvNu-oR.js";/**
1
+ import{c as e}from"./index-DOVqOa07.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-DyvNu-oR.js";/**
1
+ import{c}from"./index-DOVqOa07.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-DyvNu-oR.js";/**
1
+ import{c}from"./index-DOVqOa07.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-DyvNu-oR.js";/**
1
+ import{c}from"./index-DOVqOa07.js";/**
2
2
  * @license lucide-react v0.468.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -0,0 +1 @@
1
+ import{g as U}from"./vendor-DBTT3jXp.js";var L={exports:{}},H;function R(){return H||(H=1,(function(b,k){(function(X,S){b.exports=S()})(globalThis,()=>(()=>{var _={949(g,p,v){Object.defineProperty(p,"__esModule",{value:!0}),p.CronParser=void 0;var o=v(515),y=(function(){function l(e,t,r){t===void 0&&(t=!0),r===void 0&&(r=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=r}return l.prototype.parse=function(){var e,t,r=(e=this.expression)!==null&&e!==void 0?e:"";if(r==="@reboot")return t=["@reboot","","","","","",""],t;if(r.startsWith("@")){var n=this.parseSpecial(this.expression);t=this.extractParts(n)}else t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},l.prototype.parseSpecial=function(e){var t={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},r=t[e];if(!r)throw new Error("Unknown special expression.");return r},l.prototype.extractParts=function(e){if(!this.expression)throw new Error("cron expression is empty");for(var t=e.trim().split(/[ ]+/),r=0;r<t.length;r++)if(t[r].includes(",")){var n=t[r].split(",").map(function(a){return a.trim()}).filter(function(a){return a!==""}).map(function(a){return isNaN(Number(a))?a:Number(a)}).filter(function(a){return a!==null&&a!==""});n.length===0&&n.push("*"),n.sort(function(a,u){return a!==null&&u!==null?a-u:0}),t[r]=n.map(function(a){return a!==null?a.toString():""}).join(",")}if(t.length<5)throw new Error("Expression has only ".concat(t.length," part").concat(t.length==1?"":"s",". At least 5 parts are required."));if(t.length==5)t.unshift(""),t.push("");else if(t.length==6){var i=/\d{4}$/.test(t[5])||t[4]=="?"||t[2]=="?";i?t.unshift(""):t.push("")}else if(t.length>7)throw new Error("Expression has ".concat(t.length," parts; too many!"));return t},l.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace("?","*"),e[5]=e[5].replace("?","*"),e[2]=e[2].replace("?","*"),e[0].indexOf("0/")==0&&(e[0]=e[0].replace("0/","*/")),e[1].indexOf("0/")==0&&(e[1]=e[1].replace("0/","*/")),e[2].indexOf("0/")==0&&(e[2]=e[2].replace("0/","*/")),e[3].indexOf("1/")==0&&(e[3]=e[3].replace("1/","*/")),e[4].indexOf("1/")==0&&(e[4]=e[4].replace("1/","*/")),e[6].indexOf("1/")==0&&(e[6]=e[6].replace("1/","*/")),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,function(c){var d=c.replace(/\D/,""),f=d;return t.dayOfWeekStartIndexZero?d=="7"&&(f="0"):f=(parseInt(d)-1).toString(),c.replace(d,f)}),e[5]=="L"&&(e[5]="6"),e[3]=="?"&&(e[3]="*"),e[3].indexOf("W")>-1&&(e[3].indexOf(",")>-1||e[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var r={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in r)e[5]=e[5].replace(new RegExp(n,"gi"),r[n].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(c){var d=c.replace(/\D/,""),f=d;return t.monthStartIndexZero&&(f=(parseInt(d)+1).toString()),c.replace(d,f)});var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)e[4]=e[4].replace(new RegExp(a,"gi"),i[a].toString());e[0]=="0"&&(e[0]=""),!/\*|\-|\,|\//.test(e[2])&&(/\*|\//.test(e[1])||/\*|\//.test(e[0]))&&(e[2]+="-".concat(e[2]));for(var u=0;u<e.length;u++)if(e[u].indexOf(",")!=-1&&(e[u]=e[u].split(",").filter(function(c){return c!==""}).join(",")||"*"),e[u]=="*/1"&&(e[u]="*"),e[u].indexOf("/")>-1&&!/^\*|\-|\,/.test(e[u])){var s=null;switch(u){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null;break}if(s!==null){var h=e[u].split("/");e[u]="".concat(h[0],"-").concat(s,"/").concat(h[1])}}},l.prototype.validate=function(e){var t="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},l.prototype.validateAnyRanges=function(e){o.default.secondRange(e[0]),o.default.minuteRange(e[1]),o.default.hourRange(e[2]),o.default.dayOfMonthRange(e[3]),o.default.monthRange(e[4],this.monthStartIndexZero),o.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},l.prototype.validateOnlyExpectedCharactersFound=function(e,t){var r=e.match(new RegExp("[^".concat(t,"]+"),"gi"));if(r&&r.length)throw new Error("Expression contains invalid values: '".concat(r.toString(),"'"))},l})();p.CronParser=y},333(g,p,v){Object.defineProperty(p,"__esModule",{value:!0}),p.ExpressionDescriptor=void 0;var o=v(823),y=v(949),l=(function(){function e(t,r){if(this.expression=t,this.options=r,this.expressionParts=new Array(5),!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var n=Object.keys(e.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(n,"'.")),this.options.locale=n}this.i18n=e.locales[this.options.locale],r.use24HourTimeFormat===void 0&&(r.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,r){var n=r===void 0?{}:r,i=n.throwExceptionOnParseError,a=i===void 0?!0:i,u=n.verbose,s=u===void 0?!1:u,h=n.dayOfWeekStartIndexZero,c=h===void 0?!0:h,d=n.monthStartIndexZero,f=d===void 0?!1:d,O=n.use24HourTimeFormat,E=n.trimHoursLeadingZero,m=E===void 0?!1:E,x=n.locale,D=x===void 0?null:x,M=n.logicalAndDayFields,A=M===void 0?!1:M,w={throwExceptionOnParseError:a,verbose:s,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:O,trimHoursLeadingZero:m,locale:D,logicalAndDayFields:A};w.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var I=new e(t,w);return I.getFullDescription()},e.initialize=function(t,r){r===void 0&&(r="en"),e.specialCharacters=["/","-",",","*"],e.defaultLocale=r,t.load(e.locales)},e.prototype.getFullDescription=function(){var t,r,n="";try{var i=new y.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=i.parse(),this.expressionParts[0]==="@reboot")return((r=(t=this.i18n).atReboot)===null||r===void 0?void 0:r.call(t))||"Run once, at startup";var a=this.getTimeOfDayDescription(),u=this.getDayOfMonthDescription(),s=this.getMonthDescription(),h=this.getDayOfWeekDescription(),c=this.getYearDescription();n+=a+u+h+s+c,n=this.transformVerbosity(n,!!this.options.verbose),n=n.charAt(0).toLocaleUpperCase()+n.substr(1)}catch(d){if(!this.options.throwExceptionOnParseError)n=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(d)}return n},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],r=this.expressionParts[1],n=this.expressionParts[2],i="";if(!o.StringUtilities.containsAny(r,e.specialCharacters)&&!o.StringUtilities.containsAny(n,e.specialCharacters)&&!o.StringUtilities.containsAny(t,e.specialCharacters))i+=this.i18n.atSpace()+this.formatTime(n,r,t);else if(!t&&r.indexOf("-")>-1&&!(r.indexOf(",")>-1)&&!(r.indexOf("/")>-1)&&!o.StringUtilities.containsAny(n,e.specialCharacters)){var a=r.split("-");i+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(n,a[0],""),this.formatTime(n,a[1],""))}else if(!t&&n.indexOf(",")>-1&&n.indexOf("-")==-1&&n.indexOf("/")==-1&&!o.StringUtilities.containsAny(r,e.specialCharacters)){var u=n.split(",");i+=this.i18n.at();for(var s=0;s<u.length;s++)i&&(i+=" "),i+=this.formatTime(u[s],r,""),s<u.length-2&&(i+=","),s==u.length-2&&(i+=this.i18n.spaceAnd())}else{var h=this.getSecondsDescription(),c=this.getMinutesDescription(),d=this.getHoursDescription();if(i+=h,i&&c&&(i+=", "),i+=c,c===d)return i;i&&d&&(i+=", "),i+=d}return i},e.prototype.getSecondsDescription=function(){var t=this,r=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(n){return n},function(n){return o.StringUtilities.format(t.i18n.everyX0Seconds(n),n)},function(n){return t.i18n.secondsX0ThroughX1PastTheMinute()},function(n){return n=="0"?"":parseInt(n)<20?t.i18n.atX0SecondsPastTheMinute(n):t.i18n.atX0SecondsPastTheMinuteGt20()||t.i18n.atX0SecondsPastTheMinute(n)});return r},e.prototype.getMinutesDescription=function(){var t=this,r=this.expressionParts[0],n=this.expressionParts[2],i=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(a){return a},function(a){return o.StringUtilities.format(t.i18n.everyX0Minutes(a),a)},function(a){return t.i18n.minutesX0ThroughX1PastTheHour()},function(a){var u,s;try{return a=="0"&&n.indexOf("/")==-1&&r==""?t.i18n.everyHour():a=="0"?((s=(u=t.i18n).onTheHour)===null||s===void 0?void 0:s.call(u))||t.i18n.atX0MinutesPastTheHour(a):parseInt(a)<20?t.i18n.atX0MinutesPastTheHour(a):t.i18n.atX0MinutesPastTheHourGt20()||t.i18n.atX0MinutesPastTheHour(a)}catch{return t.i18n.atX0MinutesPastTheHour(a)}});return i},e.prototype.getHoursDescription=function(){var t=this,r=this.expressionParts[2],n=0,i=[];r.split("/")[0].split(",").forEach(function(s){var h=s.split("-");h.length===2&&i.push({value:h[1],index:n+1}),n+=h.length});var a=0,u=this.getSegmentDescription(r,this.i18n.everyHour(),function(s){var h=i.find(function(d){return d.value===s&&d.index===a}),c=h&&t.expressionParts[1]!=="0";return a++,c?t.formatTime(s,"59",""):t.formatTime(s,"0","")},function(s){return o.StringUtilities.format(t.i18n.everyX0Hours(s),s)},function(s){return t.i18n.betweenX0AndX1()},function(s){return t.i18n.atX0()});return u},e.prototype.getDayOfWeekDescription=function(){var t=this,r=this.i18n.daysOfTheWeek(),n=null;return this.expressionParts[5]=="*"?n="":n=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(i,a){var u=i;i.indexOf("#")>-1?u=i.substring(0,i.indexOf("#")):i.indexOf("L")>-1&&(u=u.replace("L",""));var s=parseInt(u),h=t.i18n.daysOfTheWeekInCase?t.i18n.daysOfTheWeekInCase(a)[s]:r[s];if(i.indexOf("#")>-1){var c=null,d=i.substring(i.indexOf("#")+1),f=i.substring(0,i.indexOf("#"));switch(d){case"1":c=t.i18n.first(f);break;case"2":c=t.i18n.second(f);break;case"3":c=t.i18n.third(f);break;case"4":c=t.i18n.fourth(f);break;case"5":c=t.i18n.fifth(f);break}h=c+" "+h}return h},function(i){return parseInt(i)==1?"":o.StringUtilities.format(t.i18n.commaEveryX0DaysOfTheWeek(i),i)},function(i){var a=i.substring(0,i.indexOf("-")),u=t.expressionParts[3]!="*";return u?t.i18n.commaAndX0ThroughX1(a):t.i18n.commaX0ThroughX1(a)},function(i){var a=null;if(i.indexOf("#")>-1){var u=i.substring(i.indexOf("#")+1),s=i.substring(0,i.indexOf("#"));a=t.i18n.commaOnThe(u,s).trim()+t.i18n.spaceX0OfTheMonth()}else if(i.indexOf("L")>-1)a=t.i18n.commaOnTheLastX0OfTheMonth(i.replace("L",""));else{var h=t.expressionParts[3]!="*";h?t.options.logicalAndDayFields?a=t.i18n.commaOnlyOnX0(i):a=t.i18n.commaAndOnX0():a=t.i18n.commaOnlyOnX0(i)}return a}),n},e.prototype.getMonthDescription=function(){var t=this,r=this.i18n.monthsOfTheYear(),n=this.getSegmentDescription(this.expressionParts[4],"",function(i,a){return a&&t.i18n.monthsOfTheYearInCase?t.i18n.monthsOfTheYearInCase(a)[parseInt(i)-1]:r[parseInt(i)-1]},function(i){return parseInt(i)==1?"":o.StringUtilities.format(t.i18n.commaEveryX0Months(i),i)},function(i){return t.i18n.commaMonthX0ThroughMonthX1()||t.i18n.commaX0ThroughX1()},function(i){return t.i18n.commaOnlyInMonthX0?t.i18n.commaOnlyInMonthX0():t.i18n.commaOnlyInX0()});return n},e.prototype.getDayOfMonthDescription=function(){var t=this,r=null,n=this.expressionParts[3];switch(n){case"L":r=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":r=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=n.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var a=parseInt(i[0].replace("W","")),u=a==1?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),a.toString());r=o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),u);break}else{var s=n.match(/L-(\d{1,2})/);if(s){var h=s[1];r=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(h),h);break}else{if(n=="*"&&this.expressionParts[5]!="*")return"";r=this.getSegmentDescription(n,this.i18n.commaEveryDay(),function(c){return c=="L"?t.i18n.lastDay():t.i18n.dayX0?o.StringUtilities.format(t.i18n.dayX0(),c):c},function(c){return c=="1"?t.i18n.commaEveryDay():t.i18n.commaEveryX0Days(c)},function(c){return t.i18n.commaBetweenDayX0AndX1OfTheMonth(c)},function(c){return t.i18n.commaOnDayX0OfTheMonth(c)})}break}}return r},e.prototype.getYearDescription=function(){var t=this,r=this.getSegmentDescription(this.expressionParts[6],"",function(n){return/^\d+$/.test(n)?new Date(parseInt(n),1).getFullYear().toString():n},function(n){return o.StringUtilities.format(t.i18n.commaEveryX0Years(n),n)},function(n){return t.i18n.commaYearX0ThroughYearX1()||t.i18n.commaX0ThroughX1()},function(n){return t.i18n.commaOnlyInYearX0?t.i18n.commaOnlyInYearX0():t.i18n.commaOnlyInX0()});return r},e.prototype.getSegmentDescription=function(t,r,n,i,a,u){var s=null,h=t.indexOf("/")>-1,c=t.indexOf("-")>-1,d=t.indexOf(",")>-1;if(!t)s="";else if(t==="*")s=r;else if(!h&&!c&&!d)s=o.StringUtilities.format(u(t),n(t));else if(d){for(var f=t.split(","),O="",E=this.i18n.spaceAnd(),m=0;m<f.length;m++)if(m>0&&f.length>2&&(O+=",",m<f.length-1&&(O+=" ")),m>0&&f.length>1&&(m==f.length-1||f.length==2)&&(O+=E==","&&f.length>2?" ":"".concat(E," ")),f[m].indexOf("/")>-1||f[m].indexOf("-")>-1){var x=f[m].indexOf("-")>-1&&f[m].indexOf("/")==-1,D=this.getSegmentDescription(f[m],r,n,i,x?this.i18n.commaX0ThroughX1:a,u);x&&(D=D.replace(", ","")),O+=D}else if(!h)O+=n(f[m]);else{var M=this.getSegmentDescription(f[m],r,n,i,a,u);M&&M.startsWith(", ")&&(M=M.substring(2)),O+=M}h?s=O:s=o.StringUtilities.format(u(t),O)}else if(h){var f=t.split("/");if(s=o.StringUtilities.format(i(f[1]),f[1]),f[0].indexOf("-")>-1){var A=this.generateRangeSegmentDescription(f[0],a,n);A.indexOf(", ")!=0&&(s+=", "),s+=A}else if(f[0].indexOf("*")==-1){var w=o.StringUtilities.format(u(f[0]),n(f[0]));w=w.replace(", ",""),s+=o.StringUtilities.format(this.i18n.commaStartingX0(),w)}}else c&&(s=this.generateRangeSegmentDescription(t,a,n));return s},e.prototype.generateRangeSegmentDescription=function(t,r,n){var i="",a=t.split("-"),u=n(a[0],1),s=n(a[1],2),h=r(t);return i+=o.StringUtilities.format(h,u,s),i},e.prototype.formatTime=function(t,r,n){var i=0,a=0,u=parseInt(t)+i,s=parseInt(r)+a;s>=60?(s-=60,u+=1):s<0&&(s+=60,u-=1),u>=24?u=u-24:u<0&&(u=24+u);var h="",c=!1;this.options.use24HourTimeFormat||(c=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),h=c?"".concat(this.getPeriod(u)," "):" ".concat(this.getPeriod(u)),u>12&&(u-=12),u===0&&(u=12));var d="";n&&(d=":".concat(("00"+n).substring(n.length)));var f=u.toString(),O=("00"+f).substring(f.length),E=s.toString(),m=("00"+E).substring(E.length),x=this.options.trimHoursLeadingZero?f:O;return"".concat(c?h:"").concat(x,":").concat(m).concat(d).concat(c?"":h)},e.prototype.transformVerbosity=function(t,r){if(!r&&(t=t.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),t=t.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),t=t.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),t=t.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var n=0,i=Object.entries(this.i18n.conciseVerbosityReplacements());n<i.length;n++){var a=i[n],u=a[0],s=a[1];t=t.replace(new RegExp(u,"g"),s)}return t},e.prototype.getPeriod=function(t){return t>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},e.locales={},e})();p.ExpressionDescriptor=l},747(g,p,v){Object.defineProperty(p,"__esModule",{value:!0}),p.enLocaleLoader=void 0;var o=v(486),y=(function(){function l(){}return l.prototype.load=function(e){e.en=new o.en},l})();p.enLocaleLoader=y},486(g,p){Object.defineProperty(p,"__esModule",{value:!0}),p.en=void 0;var v=(function(){function o(){}return o.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},o.prototype.atX0MinutesPastTheHourGt20=function(){return null},o.prototype.commaMonthX0ThroughMonthX1=function(){return null},o.prototype.commaYearX0ThroughYearX1=function(){return null},o.prototype.use24HourTimeFormatByDefault=function(){return!1},o.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},o.prototype.everyMinute=function(){return"every minute"},o.prototype.everyHour=function(){return"every hour"},o.prototype.atSpace=function(){return"At "},o.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},o.prototype.at=function(){return"At"},o.prototype.spaceAnd=function(){return" and"},o.prototype.everySecond=function(){return"every second"},o.prototype.everyX0Seconds=function(){return"every %s seconds"},o.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},o.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},o.prototype.everyX0Minutes=function(){return"every %s minutes"},o.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},o.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},o.prototype.everyX0Hours=function(){return"every %s hours"},o.prototype.betweenX0AndX1=function(){return"between %s and %s"},o.prototype.atX0=function(){return"at %s"},o.prototype.commaEveryDay=function(){return", every day"},o.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},o.prototype.commaX0ThroughX1=function(){return", %s through %s"},o.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},o.prototype.first=function(){return"first"},o.prototype.second=function(){return"second"},o.prototype.third=function(){return"third"},o.prototype.fourth=function(){return"fourth"},o.prototype.fifth=function(){return"fifth"},o.prototype.commaOnThe=function(){return", on the "},o.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},o.prototype.lastDay=function(){return"the last day"},o.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},o.prototype.commaOnlyOnX0=function(){return", only on %s"},o.prototype.commaAndOnX0=function(){return", and on %s"},o.prototype.commaEveryX0Months=function(){return", every %s months"},o.prototype.commaOnlyInX0=function(){return", only in %s"},o.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},o.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},o.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},o.prototype.firstWeekday=function(){return"first weekday"},o.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},o.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},o.prototype.commaEveryX0Days=function(){return", every %s days in a month"},o.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},o.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},o.prototype.commaEveryHour=function(){return", every hour"},o.prototype.commaEveryX0Years=function(){return", every %s years"},o.prototype.commaStartingX0=function(){return", starting %s"},o.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},o.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},o.prototype.atReboot=function(){return"Run once, at startup"},o.prototype.onTheHour=function(){return"on the hour"},o})();p.en=v},515(g,p){Object.defineProperty(p,"__esModule",{value:!0});function v(y,l){if(!y)throw new Error(l)}var o=(function(){function y(){}return y.secondRange=function(l){for(var e=l.split(","),t=0;t<e.length;t++)if(!isNaN(parseInt(e[t],10))){var r=parseInt(e[t],10);v(r>=0&&r<=59,"seconds part must be >= 0 and <= 59")}},y.minuteRange=function(l){for(var e=l.split(","),t=0;t<e.length;t++)if(!isNaN(parseInt(e[t],10))){var r=parseInt(e[t],10);v(r>=0&&r<=59,"minutes part must be >= 0 and <= 59")}},y.hourRange=function(l){for(var e=l.split(","),t=0;t<e.length;t++)if(!isNaN(parseInt(e[t],10))){var r=parseInt(e[t],10);v(r>=0&&r<=23,"hours part must be >= 0 and <= 23")}},y.dayOfMonthRange=function(l){for(var e=l.split(","),t=0;t<e.length;t++)if(!isNaN(parseInt(e[t],10))){var r=parseInt(e[t],10);v(r>=1&&r<=31,"DOM part must be >= 1 and <= 31")}},y.monthRange=function(l,e){for(var t=l.split(","),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);v(n>=1&&n<=12,e?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},y.dayOfWeekRange=function(l,e){for(var t=l.split(","),r=0;r<t.length;r++)if(!isNaN(parseInt(t[r],10))){var n=parseInt(t[r],10);v(n>=0&&n<=6,e?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},y})();p.default=o},823(g,p){Object.defineProperty(p,"__esModule",{value:!0}),p.StringUtilities=void 0;var v=(function(){function o(){}return o.format=function(y){for(var l=[],e=1;e<arguments.length;e++)l[e-1]=arguments[e];return y.replace(/%s/g,function(t){return l.shift()})},o.containsAny=function(y,l){return l.some(function(e){return y.indexOf(e)>-1})},o})();p.StringUtilities=v}},X={};function S(g){var p=X[g];if(p!==void 0)return p.exports;var v=X[g]={exports:{}};return _[g](v,v.exports,S),v.exports}var T={};return(()=>{var g=T;Object.defineProperty(g,"__esModule",{value:!0}),g.toString=void 0;var p=S(333),v=S(747);p.ExpressionDescriptor.initialize(new v.enLocaleLoader),g.default=p.ExpressionDescriptor;var o=p.ExpressionDescriptor.toString;g.toString=o})(),T})())})(L)),L.exports}var C=R();const N=U(C);function W(b){if(b<1e3)return`${b}ms`;const k=Math.floor(b/1e3),_=Math.floor(k/60),X=Math.floor(_/60),S=Math.floor(X/24);if(S>0){const T=X%24;return T>0?`${S}d ${T}h`:`${S}d`}if(X>0){const T=_%60;return T>0?`${X}h ${T}m`:`${X}h`}if(_>0){const T=k%60;return T>0?`${_}m ${T}s`:`${_}m`}return`${k}s`}function Y(b){return b<1e3?null:W(b)}export{N as c,Y as f};