nestlens 0.8.13 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/content-encoding.d.ts +20 -0
- package/dist/api/content-encoding.js +92 -0
- package/dist/api/dashboard.controller.d.ts +37 -5
- package/dist/api/dashboard.controller.js +114 -28
- package/dist/api/route-path.js +19 -1
- package/dist/core/collector.service.js +6 -0
- package/dist/core/pruning.service.js +4 -1
- package/dist/core/storage/index.js +4 -3
- package/dist/core/storage/memory.storage.d.ts +2 -2
- package/dist/core/storage/memory.storage.js +5 -3
- package/dist/core/storage/redis.storage.d.ts +2 -2
- package/dist/core/storage/redis.storage.js +5 -3
- package/dist/core/storage/sqlite.storage.d.ts +23 -2
- package/dist/core/storage/sqlite.storage.js +59 -7
- package/dist/core/storage/storage.factory.js +26 -0
- package/dist/core/storage/tag-normalization.d.ts +10 -0
- package/dist/core/storage/tag-normalization.js +14 -0
- package/dist/core/tag.service.js +5 -2
- package/dist/dashboard/public/assets/BatchDetailView-D5HvA77t.js +1 -0
- package/dist/dashboard/public/assets/BatchesPage-DuRRA37y.js +1 -0
- package/dist/dashboard/public/assets/CacheDetailView-1UxogliV.js +6 -0
- package/dist/dashboard/public/assets/CachePage-BW4xXkPr.js +1 -0
- package/dist/dashboard/public/assets/CommandDetailView-BpgW7Td3.js +1 -0
- package/dist/dashboard/public/assets/CommandsPage-ds87Sc7B.js +1 -0
- package/dist/dashboard/public/assets/CopyButton-CVcLaHry.js +3 -0
- package/dist/dashboard/public/assets/{DashboardPage-BxTgQDmh.js → DashboardPage-DNHQ3XIO.js} +2 -2
- package/dist/dashboard/public/assets/DataTable-DBtrADsk.js +53 -0
- package/dist/dashboard/public/assets/DetailRow-C0vUMqsn.js +1 -0
- package/dist/dashboard/public/assets/DumpDetailView-DpIq0X3G.js +11 -0
- package/dist/dashboard/public/assets/DumpsPage-BEMRyaRD.js +1 -0
- package/dist/dashboard/public/assets/EntryDetailPage-CIQyW46e.js +27 -0
- package/dist/dashboard/public/assets/EntrySearchInput-_mfQ0GTh.js +1 -0
- package/dist/dashboard/public/assets/EventDetailView-P73VP_Fy.js +1 -0
- package/dist/dashboard/public/assets/EventsPage-CGVLTNsT.js +1 -0
- package/dist/dashboard/public/assets/ExceptionDetailView-BGARMi0L.js +8 -0
- package/dist/dashboard/public/assets/ExceptionsPage-D0QFk7Th.js +6 -0
- package/dist/dashboard/public/assets/GateDetailView-qlS8o8Vj.js +6 -0
- package/dist/dashboard/public/assets/GatesPage-DRAeMoww.js +1 -0
- package/dist/dashboard/public/assets/GraphQLDetailView-DxhebEpl.js +6 -0
- package/dist/dashboard/public/assets/GraphQLPage-DFvzS6gG.js +6 -0
- package/dist/dashboard/public/assets/HttpClientDetailView-Ce86dSVL.js +1 -0
- package/dist/dashboard/public/assets/HttpClientPage-DF8GOfV0.js +1 -0
- package/dist/dashboard/public/assets/JobDetailView-Ddwlj0Oz.js +6 -0
- package/dist/dashboard/public/assets/JobsPage-Bd0RuywX.js +1 -0
- package/dist/dashboard/public/assets/LogDetailView-C-TzEuYz.js +1 -0
- package/dist/dashboard/public/assets/LogsPage-BIKUhnPY.js +1 -0
- package/dist/dashboard/public/assets/MailDetailView-DTL0Ys2p.js +9 -0
- package/dist/dashboard/public/assets/MailPage-DFT9mR2h.js +1 -0
- package/dist/dashboard/public/assets/ModelDetailView-D3-lYlRT.js +1 -0
- package/dist/dashboard/public/assets/ModelsPage-C1020vlQ.js +1 -0
- package/dist/dashboard/public/assets/NotificationDetailView-D3SwDytA.js +1 -0
- package/dist/dashboard/public/assets/NotificationsPage-B9od-UaX.js +1 -0
- package/dist/dashboard/public/assets/PageHeader-D5AT-Mxc.js +1 -0
- package/dist/dashboard/public/assets/QueriesPage-DhewLYn5.js +1 -0
- package/dist/dashboard/public/assets/QueryDetailView-YBMinBib.js +29 -0
- package/dist/dashboard/public/assets/RedisDetailView-BRcONsdJ.js +1 -0
- package/dist/dashboard/public/assets/RedisPage-Bya5L8h1.js +1 -0
- package/dist/dashboard/public/assets/RequestDetailView-BY1-cZjR.js +1 -0
- package/dist/dashboard/public/assets/RequestsPage-DNnN4EV_.js +1 -0
- package/dist/dashboard/public/assets/ScheduleDetailView-Bm_xNamm.js +1 -0
- package/dist/dashboard/public/assets/SchedulePage-BPSF96Cq.js +1 -0
- package/dist/dashboard/public/assets/UserCard-BUmnN8l-.js +1 -0
- package/dist/dashboard/public/assets/ViewDetailView-DrMVO93F.js +1 -0
- package/dist/dashboard/public/assets/ViewsPage-CP7MTNTk.js +1 -0
- package/dist/dashboard/public/assets/badgeColors-DQ_P_DOX.js +1 -0
- package/dist/dashboard/public/assets/{calendar-DfnYRiPH.js → calendar-DaXjWGJG.js} +1 -1
- package/dist/dashboard/public/assets/circle-alert-BoSdc5v7.js +6 -0
- package/dist/dashboard/public/assets/{circle-check-big-CdzBeD3-.js → circle-check-big-pHbbgVmy.js} +1 -1
- package/dist/dashboard/public/assets/circle-x-CBdlQncP.js +6 -0
- package/dist/dashboard/public/assets/{eye-BwC2X41m.js → eye-RDdYWiOL.js} +1 -1
- package/dist/dashboard/public/assets/format-BlNP-apw.js +1 -0
- package/dist/dashboard/public/assets/index-B9BCPNKv.css +1 -0
- package/dist/dashboard/public/assets/index-DSn-BKqm.js +361 -0
- package/dist/dashboard/public/assets/{search-CyCRC3Aj.js → search-BZHB1sYK.js} +1 -1
- package/dist/dashboard/public/assets/send-CqQmINCf.js +6 -0
- package/dist/dashboard/public/assets/timer-ytyQLcvS.js +6 -0
- package/dist/dashboard/public/assets/types-Rt2vyU68.js +1 -0
- package/dist/dashboard/public/assets/users-CgFaJMH4.js +6 -0
- package/dist/dashboard/public/assets/{zap-yEefbKzX.js → zap-BHRzQYJO.js} +1 -1
- package/dist/dashboard/public/index.html +2 -2
- package/package.json +52 -11
- package/dist/dashboard/public/assets/BatchesPage-DEz38KR5.js +0 -1
- package/dist/dashboard/public/assets/CachePage-CZxLvTJq.js +0 -1
- package/dist/dashboard/public/assets/ClickableBadge-DVTcykCM.js +0 -1
- package/dist/dashboard/public/assets/CommandsPage-DnUHcHF_.js +0 -1
- package/dist/dashboard/public/assets/DumpsPage-DNXepzfv.js +0 -1
- package/dist/dashboard/public/assets/EntryDetailPage-0WBhBUsh.js +0 -126
- package/dist/dashboard/public/assets/EntrySearchInput-BKjIppvt.js +0 -1
- package/dist/dashboard/public/assets/EventsPage-xPiqDte_.js +0 -1
- package/dist/dashboard/public/assets/ExceptionsPage-ZJNqTX3Q.js +0 -6
- package/dist/dashboard/public/assets/GatesPage-CdvK6bSz.js +0 -1
- package/dist/dashboard/public/assets/GraphQLPage-DaLLpAf8.js +0 -6
- package/dist/dashboard/public/assets/HttpClientPage-e8BqONkc.js +0 -1
- package/dist/dashboard/public/assets/JobsPage-CjHsAC5o.js +0 -1
- package/dist/dashboard/public/assets/LogsPage-ny3e-b51.js +0 -1
- package/dist/dashboard/public/assets/MailPage-dpbs1DH3.js +0 -1
- package/dist/dashboard/public/assets/ModelsPage-DZaU9bdR.js +0 -1
- package/dist/dashboard/public/assets/NotificationsPage-xKjgSJyj.js +0 -1
- package/dist/dashboard/public/assets/PageHeader-yPvqJXYA.js +0 -1
- package/dist/dashboard/public/assets/QueriesPage-DsMLeBtH.js +0 -1
- package/dist/dashboard/public/assets/RedisPage-Daw6beWw.js +0 -1
- package/dist/dashboard/public/assets/RequestsPage-CDMXEx7M.js +0 -1
- package/dist/dashboard/public/assets/SchedulePage-CkbyutFW.js +0 -1
- package/dist/dashboard/public/assets/ViewsPage-B7fHFzy2.js +0 -1
- package/dist/dashboard/public/assets/format-PC0kH-TG.js +0 -1
- package/dist/dashboard/public/assets/index-DDZJvSAq.css +0 -1
- package/dist/dashboard/public/assets/index-jX7JpX7L.js +0 -361
- package/dist/dashboard/public/assets/types-C1scQJYx.js +0 -53
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RequestDetailView-BY1-cZjR.js","./index-DSn-BKqm.js","./vendor-DBTT3jXp.js","./index-B9BCPNKv.css","./badgeColors-DQ_P_DOX.js","./DetailRow-C0vUMqsn.js","./types-Rt2vyU68.js","./UserCard-BUmnN8l-.js","./search-BZHB1sYK.js","./QueryDetailView-YBMinBib.js","./ExceptionDetailView-BGARMi0L.js","./LogDetailView-C-TzEuYz.js","./EventDetailView-P73VP_Fy.js","./CopyButton-CVcLaHry.js","./zap-BHRzQYJO.js","./users-CgFaJMH4.js","./JobDetailView-Ddwlj0Oz.js","./circle-alert-BoSdc5v7.js","./circle-check-big-pHbbgVmy.js","./CacheDetailView-1UxogliV.js","./circle-x-CBdlQncP.js","./timer-ytyQLcvS.js","./MailDetailView-DTL0Ys2p.js","./ScheduleDetailView-Bm_xNamm.js","./format-BlNP-apw.js","./calendar-DaXjWGJG.js","./HttpClientDetailView-Ce86dSVL.js","./RedisDetailView-BRcONsdJ.js","./ModelDetailView-D3-lYlRT.js","./NotificationDetailView-D3SwDytA.js","./send-CqQmINCf.js","./ViewDetailView-DrMVO93F.js","./eye-RDdYWiOL.js","./CommandDetailView-BpgW7Td3.js","./GateDetailView-qlS8o8Vj.js","./BatchDetailView-D5HvA77t.js","./DumpDetailView-DpIq0X3G.js","./GraphQLDetailView-DxhebEpl.js","./DataTable-DBtrADsk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as P,j as e,X as W,z as O,t as ge,g as ue,v as fe,_ as u}from"./index-DSn-BKqm.js";import{b as r,h as je,L as J}from"./vendor-DBTT3jXp.js";import{f as be,p as ke}from"./badgeColors-DQ_P_DOX.js";import{i as B,C as p,a as H,b as G,c as Q,d as ae,e as re,f as se,g as ne,h as le,j as X,k as ie,l as oe,m as ce,n as de,o as xe,p as ye,q as pe,r as he,s as Y}from"./types-Rt2vyU68.js";import{S as L}from"./search-BZHB1sYK.js";/**
|
|
3
|
+
* @license lucide-react v0.468.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the ISC license.
|
|
6
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/const we=P("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
8
|
+
* @license lucide-react v0.468.0 - ISC
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the ISC license.
|
|
11
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/const Z=P("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
13
|
+
* @license lucide-react v0.468.0 - ISC
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the ISC license.
|
|
16
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/const I=P("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
18
|
+
* @license lucide-react v0.468.0 - ISC
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the ISC license.
|
|
21
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/const K=P("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
23
|
+
* @license lucide-react v0.468.0 - ISC
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the ISC license.
|
|
26
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/const ee=P("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);function me(a,t){if(!a||typeof window>"u")return t;const s=window.location.hash.slice(1);if(!s)return t;try{return new URLSearchParams(s).get(a)||t}catch{return t}}function Ne({tabs:a,defaultTab:t,hashKey:s,headerRight:i,onTabChange:f}){var S,N;const g=t||((S=a[0])==null?void 0:S.id),[h,b]=r.useState(()=>me(s,g));r.useEffect(()=>{if(!s)return;const n=()=>{const y=me(s,g);b(y)};return window.addEventListener("hashchange",n),()=>window.removeEventListener("hashchange",n)},[s,g]);const w=r.useCallback(n=>{if(b(n),f==null||f(n),!s)return;const y=window.location.hash.slice(1),c=new URLSearchParams(y);n===g?c.delete(s):c.set(s,n);const T=c.toString(),D=T?`#${T}`:window.location.pathname+window.location.search;window.history.replaceState(null,"",D)},[s,g,f]),o=(N=a.find(n=>n.id===h))==null?void 0:N.content,x=r.useRef(new Map),l=r.useCallback((n,y)=>{var T;let c=null;switch(n.key){case"ArrowLeft":n.preventDefault(),c=y===0?a.length-1:y-1;break;case"ArrowRight":n.preventDefault(),c=y===a.length-1?0:y+1;break;case"Home":n.preventDefault(),c=0;break;case"End":n.preventDefault(),c=a.length-1;break}if(c!==null){const D=a[c];w(D.id),(T=x.current.get(D.id))==null||T.focus()}},[a,w]);return e.jsxs("div",{className:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"flex items-center border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800",children:[e.jsx("div",{className:"flex flex-1",role:"tablist","aria-label":"Content tabs",children:a.map((n,y)=>e.jsxs("button",{ref:c=>{c&&x.current.set(n.id,c)},role:"tab","aria-selected":h===n.id,"aria-controls":`tabpanel-${n.id}`,id:`tab-${n.id}`,tabIndex:h===n.id?0:-1,onClick:()=>w(n.id),onKeyDown:c=>l(c,y),className:`px-4 py-2.5 text-sm font-medium transition-colors relative ${h===n.id?"text-indigo-600 dark:text-indigo-400 bg-white dark:bg-gray-900":"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[n.label,n.badge!==void 0&&n.badge>0&&e.jsx("span",{className:"inline-flex items-center justify-center px-1.5 py-0.5 text-xs font-medium bg-gray-200 dark:bg-gray-600 text-gray-700 dark:text-gray-300 rounded",children:n.badge})]}),h===n.id&&e.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-indigo-600 dark:bg-indigo-400","aria-hidden":"true"})]},n.id))}),i&&e.jsx("div",{className:"px-3 flex items-center",children:i})]}),e.jsx("div",{role:"tabpanel",id:`tabpanel-${h}`,"aria-labelledby":`tab-${h}`,tabIndex:0,className:"bg-white dark:bg-gray-900",children:o})]})}function Ee(a){return a===null?"null":a===void 0?"undefined":Array.isArray(a)?"array":typeof a}function Te(a,t){return t==="array"?a.length:t==="object"?Object.keys(a).length:0}function ve(a,t,s){if(!t)return!1;const i=t.toLowerCase();return a===null?"null".includes(i):typeof a=="string"?a.toLowerCase().includes(i):typeof a=="number"||typeof a=="boolean"?String(a).includes(i):!1}function te(a,t){if(!t)return!1;const s=t.toLowerCase();return a===null?"null".includes(s):typeof a=="string"?a.toLowerCase().includes(s):typeof a=="number"||typeof a=="boolean"?String(a).includes(s):Array.isArray(a)?a.some(i=>te(i,t)):typeof a=="object"&&a!==null?Object.entries(a).some(([i,f])=>i.toLowerCase().includes(s)||te(f,t)):!1}const Ce=r.memo(function a({keyName:t,value:s,depth:i,expandedPaths:f,onToggle:g,searchTerm:h,path:b,isArrayItem:w=!1}){const o=Ee(s),x=o==="object"||o==="array",l=f.has(b),S=Te(s,o),N=S===0,n=!!h&&((t==null?void 0:t.toLowerCase().includes(h.toLowerCase()))??!1),y=ve(s,h),c=n||y,T=r.useCallback(()=>{g(b)},[g,b]),D=r.useCallback(E=>{E.stopPropagation();const j=typeof s=="string"?s:JSON.stringify(s,null,2);navigator.clipboard.writeText(j),O.success("Copied!")},[s]),V=()=>{const E=y?"bg-yellow-400/30 rounded px-0.5":"";switch(o){case"null":return e.jsx("span",{className:`text-orange-600 dark:text-orange-400 italic ${E}`,children:"null"});case"undefined":return e.jsx("span",{className:`text-gray-500 italic ${E}`,children:"undefined"});case"boolean":return e.jsx("span",{className:`text-purple-600 dark:text-purple-400 ${E}`,children:String(s)});case"number":return e.jsx("span",{className:`text-cyan-600 dark:text-cyan-400 ${E}`,children:String(s)});case"string":{const j=s,A=300,$=j.length>A,R=$?j.slice(0,A):j,M=/^https?:\/\//.test(j),U=/^\d{4}-\d{2}-\d{2}/.test(j),m=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(j);return e.jsxs("span",{className:`text-green-600 dark:text-green-400 ${E}`,children:['"',R,$&&e.jsxs("span",{className:"text-gray-500",children:["... (",j.length-A," more)"]}),'"',M&&e.jsx("span",{className:"ml-1 text-blue-600 dark:text-blue-400 text-xs",children:"(URL)"}),U&&e.jsx("span",{className:"ml-1 text-amber-600 dark:text-yellow-400 text-xs",children:"(Date)"}),m&&e.jsx("span",{className:"ml-1 text-pink-600 dark:text-pink-400 text-xs",children:"(Email)"})]})}case"array":return l?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"["}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["[",N?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[S," items"]}),"]"]});case"object":return l?e.jsx("span",{className:"text-gray-600 dark:text-gray-400",children:"{"}):e.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["{",N?"":e.jsxs("span",{className:"text-gray-500 text-xs ml-1",children:[S," keys"]}),"}"]});default:return e.jsx("span",{className:"text-gray-700 dark:text-gray-300",children:String(s)})}},z=()=>{if(!x||!l)return null;const E=o==="array"?s.map((j,A)=>[String(A),j]):Object.entries(s);return e.jsxs(e.Fragment,{children:[E.map(([j,A])=>e.jsx(a,{keyName:j,value:A,depth:i+1,expandedPaths:f,onToggle:g,searchTerm:h,path:`${b}.${j}`,isArrayItem:o==="array"},`${b}.${j}`)),e.jsxs("div",{className:"flex items-start",children:[e.jsx("span",{className:"w-6 flex-shrink-0"}),e.jsx("div",{style:{paddingLeft:i*16+16},className:"text-gray-600 dark:text-gray-400",children:o==="array"?"]":"}"})]})]})},F=i*16;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`group flex items-start py-[1px] hover:bg-gray-100 dark:hover:bg-white/5 rounded cursor-pointer transition-colors ${c?"bg-yellow-500/10":""}`,onClick:x?T:void 0,children:[e.jsx("span",{className:"w-6 h-6 flex items-center justify-center flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsx("button",{onClick:D,className:"p-1 hover:bg-gray-200 dark:hover:bg-gray-700 rounded text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",title:"Copy value",children:e.jsx(I,{className:"w-4 h-4"})})}),e.jsxs("div",{className:"flex items-start flex-1",style:{paddingLeft:F},children:[e.jsx("span",{className:"w-4 h-5 flex items-center justify-center flex-shrink-0",children:x&&!N&&(l?e.jsx(ge,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}):e.jsx(ue,{className:"w-3.5 h-3.5 text-gray-400 dark:text-gray-500"}))}),t!==null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`${w?"text-gray-500":"text-blue-700 dark:text-blue-300"} ${n?"bg-yellow-400/30 rounded px-0.5":""}`,children:w?t:`"${t}"`}),e.jsx("span",{className:"text-gray-500 mx-1",children:":"})]}),e.jsx("span",{className:"flex-1",children:V()})]})]}),z()]})});function _e({data:a,title:t,initialExpanded:s=!0,maxInitialDepth:i=2,searchable:f=!0,maxHeight:g=500,inline:h=!1,showToolbar:b=!1,externalSearchTerm:w}){const[o,x]=r.useState(!1),[l,S]=r.useState(""),[N,n]=r.useState(!1),y=w??l,c=S,[T,D]=r.useState(()=>{const m=new Set;if(s){const k=(d,v,C)=>{C>=i||(m.add(v),Array.isArray(d)?d.forEach((_,q)=>k(_,`${v}.${q}`,C+1)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([_,q])=>k(q,`${v}.${_}`,C+1)))};k(a,"root",0)}return m}),V=r.useMemo(()=>{const m=new Set;if(!y)return m;const k=(d,v)=>{te(d,y)&&m.add(v),Array.isArray(d)?d.forEach((C,_)=>k(C,`${v}.${_}`)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([C,_])=>k(_,`${v}.${C}`))};return k(a,"root"),m},[y,a]),z=r.useMemo(()=>V.size===0?T:new Set([...T,...V]),[T,V]),F=r.useCallback(m=>{D(k=>{const d=new Set(k);return d.has(m)?d.delete(m):d.add(m),d})},[]),E=r.useCallback(()=>{const m=new Set,k=(d,v)=>{m.add(v),Array.isArray(d)?d.forEach((C,_)=>k(C,`${v}.${_}`)):typeof d=="object"&&d!==null&&Object.entries(d).forEach(([C,_])=>k(_,`${v}.${C}`))};k(a,"root"),D(m)},[a]),j=r.useCallback(()=>{D(new Set)},[]),A=async()=>{try{await navigator.clipboard.writeText(JSON.stringify(a,null,2)),x(!0),O.success("JSON copied!"),setTimeout(()=>x(!1),2e3)}catch{O.error("Failed to copy")}},$=()=>{n(m=>!m),N&&c("")},R=e.jsx("div",{className:`p-3 overflow-auto font-mono text-sm ${h?"":"bg-white dark:bg-gray-800"}`,style:{maxHeight:typeof g=="number"?`${g}px`:g},children:e.jsx(Ce,{keyName:null,value:a,depth:0,expandedPaths:z,onToggle:F,searchTerm:y,path:"root"})}),M=e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),e.jsxs("div",{className:`flex items-center space-x-1 ${t?"":"ml-auto"}`,children:[e.jsx("button",{onClick:E,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:j,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),f&&e.jsx("button",{onClick:$,className:`p-1.5 rounded transition-colors ${N?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:A,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:o?e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]})]}),U=N&&e.jsx("div",{className:"mb-2",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:y,onChange:m=>c(m.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),y&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})});return h?b?e.jsxs("div",{children:[M,U,R]}):R:e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-2.5 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between bg-gray-50 dark:bg-gray-800/50",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[t&&e.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-white",children:t}),e.jsx("span",{className:"text-xs text-gray-500",children:Array.isArray(a)?`${a.length} items`:typeof a=="object"&&a!==null?`${Object.keys(a).length} keys`:""})]}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:E,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:j,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),f&&e.jsx("button",{onClick:$,className:`p-1.5 rounded transition-colors ${N?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search (Ctrl+F)",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:A,className:"flex items-center gap-1.5 px-2 py-1 text-xs font-medium text-gray-600 dark:text-gray-400 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:o?e.jsxs(e.Fragment,{children:[e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}),e.jsx("span",{className:"text-green-500",children:"Copied!"})]}):e.jsxs(e.Fragment,{children:[e.jsx(I,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:"Copy"})]})})]})]}),N&&e.jsx("div",{className:"px-3 py-2 border-b border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/30",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:y,onChange:m=>c(m.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),y&&e.jsx("button",{onClick:()=>c(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})}),R]})}function Se({data:a,toolbarState:t,maxHeight:s=400,searchBar:i}){const f=`${t.expandAllTrigger}-${t.collapseAllTrigger}`,g=t.expandAllTrigger>t.collapseAllTrigger,h=g?100:t.collapseAllTrigger>0?0:2;return e.jsxs("div",{children:[i,e.jsx(_e,{data:a,inline:!0,maxHeight:s,initialExpanded:g||t.expandAllTrigger===0,maxInitialDepth:h,searchable:!1,showToolbar:!1,externalSearchTerm:t.searchTerm},f)]})}function De(){const[a,t]=r.useState({expandAllTrigger:0,collapseAllTrigger:0,showSearch:!1,searchTerm:""}),[s,i]=r.useState(!1),f=r.useCallback(()=>{t(l=>({...l,expandAllTrigger:l.expandAllTrigger+1}))},[]),g=r.useCallback(()=>{t(l=>({...l,collapseAllTrigger:l.collapseAllTrigger+1}))},[]),h=r.useCallback(()=>{t(l=>({...l,showSearch:!l.showSearch,searchTerm:l.showSearch?"":l.searchTerm}))},[]),b=r.useCallback(l=>{t(S=>({...S,searchTerm:l}))},[]),w=r.useCallback(async l=>{try{await navigator.clipboard.writeText(JSON.stringify(l,null,2)),i(!0),O.success("Copied!"),setTimeout(()=>i(!1),2e3)}catch{O.error("Failed to copy")}},[]),o=({data:l})=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:f,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(K,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:g,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),e.jsx("button",{onClick:h,className:`p-1.5 rounded transition-colors ${a.showSearch?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(L,{className:"h-3.5 w-3.5"})}),l&&e.jsx("button",{onClick:()=>w(l),className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy JSON",children:s?e.jsx(Z,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(I,{className:"h-3.5 w-3.5 text-gray-500"})})]}),x=a.showSearch?e.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"relative",children:[e.jsx(L,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:a.searchTerm,onChange:l=>b(l.target.value),placeholder:"Search keys and values...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),a.searchTerm&&e.jsx("button",{onClick:()=>b(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(W,{className:"h-3.5 w-3.5"})})]})}):null;return{state:a,Toolbar:o,SearchBar:x}}function Ae(){return e.jsxs("div",{className:"animate-pulse space-y-3","aria-hidden":"true",children:[e.jsx("div",{className:"h-8 rounded bg-gray-100 dark:bg-gray-800"}),e.jsx("div",{className:"h-40 rounded bg-gray-100 dark:bg-gray-800"})]})}const Le=r.lazy(()=>u(()=>import("./RequestDetailView-BY1-cZjR.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),Ve=r.lazy(()=>u(()=>import("./QueryDetailView-YBMinBib.js"),__vite__mapDeps([9,1,2,3,4,5,6,8]),import.meta.url)),$e=r.lazy(()=>u(()=>import("./ExceptionDetailView-BGARMi0L.js"),__vite__mapDeps([10,1,2,3,4,5,6,8]),import.meta.url)),Re=r.lazy(()=>u(()=>import("./LogDetailView-C-TzEuYz.js"),__vite__mapDeps([11,1,2,3,4,5,6,8]),import.meta.url)),Oe=r.lazy(()=>u(()=>import("./EventDetailView-P73VP_Fy.js"),__vite__mapDeps([12,1,2,3,13,6,4,14,15,8]),import.meta.url)),Pe=r.lazy(()=>u(()=>import("./JobDetailView-Ddwlj0Oz.js"),__vite__mapDeps([16,1,2,3,4,5,6,13,17,18,8]),import.meta.url)),Ie=r.lazy(()=>u(()=>import("./CacheDetailView-1UxogliV.js"),__vite__mapDeps([19,1,2,3,4,5,6,13,18,20,21,8]),import.meta.url)),ze=r.lazy(()=>u(()=>import("./MailDetailView-DTL0Ys2p.js"),__vite__mapDeps([22,1,2,3,6,4,5,13,20,18,15,17,8]),import.meta.url)),Fe=r.lazy(()=>u(()=>import("./ScheduleDetailView-Bm_xNamm.js"),__vite__mapDeps([23,1,2,3,24,6,4,5,20,18,21,25]),import.meta.url)),Me=r.lazy(()=>u(()=>import("./HttpClientDetailView-Ce86dSVL.js"),__vite__mapDeps([26,1,2,3,4,5,6,8]),import.meta.url)),Ue=r.lazy(()=>u(()=>import("./RedisDetailView-BRcONsdJ.js"),__vite__mapDeps([27,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),qe=r.lazy(()=>u(()=>import("./ModelDetailView-D3-lYlRT.js"),__vite__mapDeps([28,1,2,3,4,5,6,13,20,8]),import.meta.url)),Je=r.lazy(()=>u(()=>import("./NotificationDetailView-D3SwDytA.js"),__vite__mapDeps([29,1,2,3,4,5,6,13,18,20,30,8]),import.meta.url)),We=r.lazy(()=>u(()=>import("./ViewDetailView-DrMVO93F.js"),__vite__mapDeps([31,1,2,3,4,5,6,13,32,18,20,8]),import.meta.url)),Be=r.lazy(()=>u(()=>import("./CommandDetailView-BpgW7Td3.js"),__vite__mapDeps([33,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),He=r.lazy(()=>u(()=>import("./GateDetailView-qlS8o8Vj.js"),__vite__mapDeps([34,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Ge=r.lazy(()=>u(()=>import("./BatchDetailView-D5HvA77t.js"),__vite__mapDeps([35,1,2,3,4,5,6,13,20,17,18,8]),import.meta.url)),Qe=r.lazy(()=>u(()=>import("./DumpDetailView-DpIq0X3G.js"),__vite__mapDeps([36,1,2,3,4,5,6,13,18,20,8]),import.meta.url)),Xe=r.lazy(()=>u(()=>import("./GraphQLDetailView-DxhebEpl.js"),__vite__mapDeps([37,1,2,3,4,5,6,38,7,8,14,30]),import.meta.url));function Ye(a,t){return a!=null&&a.toLowerCase().includes("/graphql")?"GRAPHQL":t.toUpperCase()}function Ze(a){const t=a.trim().toUpperCase();return t.startsWith("SELECT")?"SELECT":t.startsWith("INSERT")?"INSERT":t.startsWith("UPDATE")?"UPDATE":t.startsWith("DELETE")?"DELETE":t.startsWith("CREATE")?"CREATE":t.startsWith("ALTER")?"ALTER":t.startsWith("DROP")?"DROP":t.startsWith("TRUNCATE")?"TRUNCATE":t.startsWith("BEGIN")||t.startsWith("START")?"TRANSACTION":t.startsWith("COMMIT")?"COMMIT":t.startsWith("ROLLBACK")?"ROLLBACK":"QUERY"}function Ke(){const{id:a}=je(),[t,s]=r.useState(null),[i,f]=r.useState([]),[g,h]=r.useState(!0),b=De();if(r.useEffect(()=>{(async()=>{if(a)try{const x=await fe(parseInt(a));s(x.data),f(x.related??[])}catch(x){console.error("Failed to fetch entry:",x)}finally{h(!1)}})()},[a]),g)return e.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});if(!t)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 dark:text-white",children:"Entry not found"}),e.jsx(J,{to:"/",className:"text-primary-600 hover:text-primary-700 mt-4 inline-block",children:"Go back to dashboard"})]});const w=()=>{if(B(t))return e.jsx(Le,{entry:t,related:i});if(H(t))return e.jsx(Ve,{entry:t});if(G(t))return e.jsx($e,{entry:t});if(Q(t))return e.jsx(Re,{entry:t});if(ae(t))return e.jsx(Oe,{entry:t});if(re(t))return e.jsx(Pe,{entry:t});if(se(t))return e.jsx(Ie,{entry:t});if(ne(t))return e.jsx(ze,{entry:t});if(le(t))return e.jsx(Fe,{entry:t});if(X(t))return e.jsx(Me,{entry:t});if(ie(t))return e.jsx(Ue,{entry:t});if(oe(t))return e.jsx(qe,{entry:t});if(ce(t))return e.jsx(Je,{entry:t});if(de(t))return e.jsx(We,{entry:t});if(xe(t))return e.jsx(Be,{entry:t});if(ye(t))return e.jsx(He,{entry:t});if(pe(t))return e.jsx(Ge,{entry:t});if(he(t))return e.jsx(Qe,{entry:t});if(Y(t))return e.jsx(Xe,{entry:t});const x=t.payload,l=[{id:"payload",label:"Payload",content:e.jsx(Se,{data:x,toolbarState:b.state,searchBar:b.SearchBar,maxHeight:400})}];return e.jsx(Ne,{tabs:l,defaultTab:"payload",headerRight:e.jsx(b.Toolbar,{data:x})})};return e.jsxs("div",{children:[e.jsx("div",{className:"fixed top-0 left-0 right-0 lg:left-64 z-30 h-16 bg-gray-50 dark:bg-gray-900 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center space-x-4 px-4 lg:px-6 h-full",children:[e.jsx(J,{to:-1,className:"p-2 hover:bg-gray-200 dark:hover:bg-gray-800 rounded-lg transition-colors",children:e.jsx(we,{className:"h-5 w-5 text-gray-500"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center space-x-3",children:B(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"requests",children:Ye(t.payload.path,t.payload.method)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.path})]}):H(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"queries",filterType:"types",children:Ze(t.payload.query)}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.query.length>100?t.payload.query.substring(0,100)+"...":t.payload.query})]}):G(t)?(()=>{var x;const o=t.payload.name&&t.payload.name.toLowerCase()!=="error"?t.payload.name:t.payload.code?String(t.payload.code):"Exception";return e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"exceptions",filterType:"names",children:o}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:((x=t.payload.request)==null?void 0:x.url)||t.payload.message})]})})():Q(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"logs",filterType:"levels",children:t.payload.level.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.message.length>100?t.payload.message.substring(0,100)+"...":t.payload.message})]}):ae(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"events",filterType:"names",children:t.payload.name}),e.jsxs("h1",{className:"text-sm text-gray-600 dark:text-gray-300",children:[t.payload.listeners.length," listener",t.payload.listeners.length!==1?"s":""," · ",t.payload.duration,"ms"]})]}):re(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"jobs",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:[t.payload.queue," · ",t.payload.duration?`${t.payload.duration}ms`:"-"]})]}):se(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"cache",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),t.payload.operation==="get"&&e.jsx(p,{listType:"cache",children:t.payload.hit?"HIT":"MISS"}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.key.length>60?t.payload.key.substring(0,60)+"...":t.payload.key})]}):ne(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"mail",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.subject.length>60?t.payload.subject.substring(0,60)+"...":t.payload.subject})]}):le(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"schedule",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name}),t.payload.cron&&e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400 font-mono",children:t.payload.cron})]}):X(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"http-client",filterType:"methods",filterValue:t.payload.method,children:t.payload.method}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.hostname||t.payload.url})]}):ie(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"redis",filterType:"commands",filterValue:t.payload.command,children:t.payload.command}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.keyPattern||"Redis Command"})]}):oe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"models",filterType:"actions",filterValue:t.payload.action,children:t.payload.action.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.entity})]}):ce(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"notifications",filterType:"types",filterValue:t.payload.type,children:t.payload.type}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.title||t.payload.recipient})]}):de(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"views",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.template})]}):xe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"commands",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):ye(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"gates",filterType:"results",filterValue:t.payload.allowed?"ALLOWED":"DENIED",children:t.payload.allowed?"ALLOWED":"DENIED"}),e.jsx("h1",{className:"text-sm text-gray-900 dark:text-white truncate",children:t.payload.gate})]}):pe(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"batches",filterType:"statuses",filterValue:t.payload.status,children:t.payload.status.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.name})]}):he(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"dumps",filterType:"operations",filterValue:t.payload.operation,children:t.payload.operation.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.format})]}):Y(t)?e.jsxs(e.Fragment,{children:[e.jsx(p,{listType:"graphql",filterType:"operationTypes",filterValue:t.payload.operationType,children:t.payload.operationType.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:t.payload.operationName||"(anonymous)"}),t.payload.hasErrors&&e.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 text-xs font-medium rounded bg-red-100 text-red-700 dark:bg-red-900/50 dark:text-red-300",children:"Error"})]}):(()=>{const o=t;return e.jsxs(e.Fragment,{children:[e.jsx(p,{clickable:!1,children:o.type.toUpperCase()}),e.jsx("h1",{className:"text-sm font-mono text-gray-900 dark:text-white truncate",children:o.requestId||`#${o.id}`})]})})()})})]})}),e.jsxs("div",{className:"pt-16 space-y-6",children:[e.jsx(r.Suspense,{fallback:e.jsx(Ae,{}),children:w()}),i.length>0&&e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:["Related Entries (",i.length,")"]})}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-700",children:i.map(o=>e.jsx(J,{to:et(o),className:"p-4 block hover:bg-gray-50 dark:hover:bg-gray-700/50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx(p,{clickable:!1,children:o.type.toUpperCase()}),e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-300",children:tt(o)})]}),e.jsx("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:be(ke(o.createdAt),{addSuffix:!0})})]})},o.id))})]})]})]})}function et(a){return`/${{request:"requests",query:"queries",exception:"exceptions",log:"logs",event:"events",job:"jobs",cache:"cache",mail:"mail",schedule:"schedule","http-client":"http-client",redis:"redis",model:"models",notification:"notifications",view:"views",command:"commands",gate:"gates",batch:"batches",dump:"dumps",graphql:"graphql"}[a.type]||"entries"}/${a.id}`}function tt(a){if(H(a)){const t=a.payload.query;return t.length>50?t.substring(0,50)+"...":t}if(G(a))return`${a.payload.name}: ${a.payload.message}`;if(Q(a)){const t=a.payload.message;return t.length>50?t.substring(0,50)+"...":t}return B(a)?`${a.payload.method} ${a.payload.path}`:X(a)?`${a.payload.method} ${a.payload.hostname||a.payload.url}`:Y(a)?`${a.payload.operationType} ${a.payload.operationName||"(anonymous)"}`:`Entry #${a.id}`}const it=Object.freeze(Object.defineProperty({__proto__:null,default:Ke},Symbol.toStringTag,{value:"Module"}));export{Se as C,it as E,K as M,Ne as T,Z as a,I as b,ee as c,De as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,X as p}from"./index-DSn-BKqm.js";import{f as g,b as o}from"./vendor-DBTT3jXp.js";import{S as x}from"./search-BZHB1sYK.js";function S({placeholder:n="Search..."}){const[u,l]=g(),r=u.get("search")??"",[e,s]=o.useState(r),[h,i]=o.useState(r);return r!==h&&(i(r),s(r)),o.useEffect(()=>{const c=setTimeout(()=>{l(m=>{const a=new URLSearchParams(m);return(a.get("search")||"")===e||(e?a.set("search",e):a.delete("search")),a},{replace:!0})},350);return()=>clearTimeout(c)},[e,l]),t.jsxs("div",{className:"relative",children:[t.jsx(x,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none"}),t.jsx("input",{type:"text",value:e,onChange:c=>s(c.target.value),placeholder:n,"aria-label":n,className:"w-full pl-9 pr-9 py-2 text-sm rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent"}),e&&t.jsx("button",{onClick:()=>s(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300","aria-label":"Clear search",children:t.jsx(p,{className:"h-4 w-4"})})]})}export{S as E};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,C as x,D as o}from"./index-DSn-BKqm.js";import{b as m}from"./vendor-DBTT3jXp.js";import{u as p,C as g,T as h}from"./EntryDetailPage-CIQyW46e.js";import{C as l}from"./CopyButton-CVcLaHry.js";import{C as y}from"./types-Rt2vyU68.js";import{Z as j}from"./zap-BHRzQYJO.js";import{U as N}from"./users-CgFaJMH4.js";import"./badgeColors-DQ_P_DOX.js";import"./search-BZHB1sYK.js";function B({entry:d}){const{payload:a}=d,s=p(),[i,n]=m.useState("listeners"),c=[{id:"listeners",label:"Listeners",badge:a.listeners.length,content:e.jsx("div",{className:"p-4",children:a.listeners.length===0?e.jsx("div",{className:"text-center py-8 text-gray-500 dark:text-gray-400",children:"No listeners for this event"}):e.jsx("div",{className:"space-y-2",children:a.listeners.map((t,r)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-800 rounded-lg",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 rounded-full text-sm font-medium",children:r+1}),e.jsx("span",{className:"font-mono text-sm text-gray-900 dark:text-white",children:t})]}),e.jsx(l,{text:t})]},r))})})},{id:"payload",label:"Payload",content:a.payload?e.jsx(g,{data:a.payload,toolbarState:s.state,searchBar:s.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No payload data"})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-green-100 dark:bg-green-900/30 rounded-lg",children:e.jsx(j,{className:"h-5 w-5 text-green-600 dark:text-green-400"})}),e.jsxs("div",{children:[e.jsx(y,{listType:"events",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400 mt-1",children:"Event Details"})]})]}),e.jsx(l,{text:a.name,label:"Copy event name"})]})}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 divide-x divide-gray-200 dark:divide-gray-700",children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(N,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Listeners"})]}),e.jsx("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:a.listeners.length})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(x,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.payload&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Payload Size"})]}),e.jsxs("p",{className:"text-2xl font-bold text-gray-900 dark:text-white",children:[Object.keys(a.payload).length,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:" keys"})]})]})]})]}),e.jsx(h,{tabs:c,defaultTab:"listeners",hashKey:"event",headerRight:i==="payload"&&a.payload?e.jsx(s.Toolbar,{data:a.payload}):void 0,onTabChange:n})]})}export{B as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,R as i}from"./index-DSn-BKqm.js";import{e as b,b as R}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as P,P as T,N as A,L as M}from"./PageHeader-D5AT-Mxc.js";import{u as L,d as B,C as H}from"./types-Rt2vyU68.js";import{T as o,D as $,b as I}from"./DataTable-DBtrADsk.js";function K(){const l=b(),{addFilter:n,clearAll:d,serverFilters:c,headerFilters:m,hasFilters:h}=L("events"),{entries:u,loading:g,refreshing:a,newEntriesCount:x,hasMore:p,loadMore:f,loadNew:y,autoRefreshEnabled:v,live:j,setAutoRefresh:C,meta:s,isHighlighted:E}=P({type:"event",limit:50,filters:c}),r=u.filter(e=>B(e)),N=R.useMemo(()=>[{key:"event",header:"Event",minWidth:"200px",render:e=>t.jsx(H,{onClick:w=>{w.stopPropagation(),n("names",e.payload.name)},className:"font-mono",children:e.payload.name})},{key:"listeners",header:"Listeners",width:"120px",align:"center",render:e=>t.jsxs(o,{secondary:!0,children:[e.payload.listeners.length," listener",e.payload.listeners.length!==1?"s":""]})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[n]);if(g&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const k=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(T,{title:"Events",icon:i,iconColor:"text-emerald-600 dark:text-emerald-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:v,live:j,onAutoRefreshToggle:C,filters:m,onClearAllFilters:d}),t.jsxs("div",{className:`${k} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:x,onClick:y,loading:a}),t.jsx(I,{columns:N,data:r,keyExtractor:e=>e.id,onRowClick:e=>l(`/events/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No events recorded yet",emptyIcon:t.jsx(i,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:p,onClick:f,loading:a})]})]})}export{K as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{c as k,j as e,t as v,z as j}from"./index-DSn-BKqm.js";import{p as f,f as w}from"./badgeColors-DQ_P_DOX.js";import{D as c,f as T}from"./DetailRow-C0vUMqsn.js";import{C as y}from"./types-Rt2vyU68.js";import{a as C,b as q,u as S,C as F,T as I}from"./EntryDetailPage-CIQyW46e.js";import{b as g}from"./vendor-DBTT3jXp.js";import"./search-BZHB1sYK.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const V=k("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);function D(d){const s=d.trim();if(!(s!=null&&s.startsWith("at ")))return null;const t=s.match(/^at\s+(async\s+)?(.+?)\s+\((.+?):(\d+):(\d+)\)$/),n=s.match(/^at\s+(.+?):(\d+):(\d+)$/);let l="<anonymous>",r="",a,i;if(t)l=(t[1]?"async ":"")+t[2],r=t[3],a=parseInt(t[4],10),i=parseInt(t[5],10);else if(n)r=n[1],a=parseInt(n[2],10),i=parseInt(n[3],10);else{const x=s.match(/^at\s+(.+)$/);x&&(l=x[1])}const m=r.includes("node_modules")||r.includes("internal/")||r.startsWith("node:"),p=!m&&r.length>0;return{raw:s,functionName:l,file:r,line:a,column:i,isVendor:m,isApp:p}}function E(d){const s=d.split(`
|
|
7
|
+
`),t=[],n=[];let l=!1;for(const a of s)a.trim().startsWith("at ")?(l=!0,n.push(a)):l?n.push(a):t.push(a);const r=n.map(D).filter(a=>a!==null);return{message:t.join(`
|
|
8
|
+
`).trim(),frames:r}}function M({stack:d,initialFrames:s=5}){const[t,n]=g.useState(!1),[l,r]=g.useState(!1),{message:a,frames:i}=g.useMemo(()=>E(d),[d]),m=i.findIndex(o=>o.isApp),p=t?i:i.slice(0,s),x=i.length-s,N=async()=>{try{await navigator.clipboard.writeText(d),r(!0),j.success("Stack trace copied!"),setTimeout(()=>r(!1),2e3)}catch{j.error("Failed to copy")}};return e.jsxs("div",{className:"card overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between",children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Stack Trace"}),e.jsx("button",{onClick:N,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",title:"Copy stack trace",children:l?e.jsx(C,{className:"h-4 w-4 text-green-500"}):e.jsx(q,{className:"h-4 w-4 text-gray-500"})})]}),e.jsxs("div",{className:"bg-gray-50 dark:bg-gray-900 overflow-x-auto",children:[a&&e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-800",children:e.jsx("pre",{className:"text-sm text-red-700 dark:text-red-400 font-mono whitespace-pre-wrap",children:a})}),e.jsx("div",{className:"divide-y divide-gray-200 dark:divide-gray-800",children:p.map((o,h)=>{const u=h===m,b=o.isVendor;return e.jsxs("div",{className:`px-4 py-2 font-mono text-sm ${u?"bg-red-100 dark:bg-red-900/30 border-l-2 border-red-500":b?"opacity-60":""}`,children:[e.jsxs("span",{className:"text-gray-500 dark:text-gray-500 mr-2 select-none",children:[String(h+1).padStart(2," "),"."]}),e.jsx("span",{className:u?"text-red-700 dark:text-red-300":"text-blue-700 dark:text-blue-300",children:o.functionName}),o.file&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-500 dark:text-gray-500 mx-1",children:"at"}),e.jsx("span",{className:b?"text-gray-500 dark:text-gray-500":"text-emerald-700 dark:text-green-400",children:o.file}),o.line&&e.jsxs("span",{className:"text-amber-700 dark:text-yellow-400",children:[":",o.line,o.column&&`:${o.column}`]})]}),u&&e.jsx("span",{className:"ml-2 text-xs bg-red-500 text-white px-1.5 py-0.5 rounded",children:"origin"})]},h)})}),x>0&&e.jsx("button",{onClick:()=>n(!t),className:"w-full px-4 py-3 text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors flex items-center justify-center space-x-2",children:t?e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"h-4 w-4"}),e.jsx("span",{children:"Show less"})]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"h-4 w-4"}),e.jsxs("span",{children:["Show ",x," more frames"]})]})})]})]})}function W({entry:d}){var r,a;const{payload:s,createdAt:t}=d,n=S(),l=(r=s.request)!=null&&r.body?[{id:"request-body",label:"Request Body",content:e.jsx(F,{data:s.request.body,toolbarState:n.state,searchBar:n.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:"Exception 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:[T(f(t),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",w(f(t),{addSuffix:!0}),")"]})]})}),s.context&&e.jsx(c,{label:"Context",value:s.context}),e.jsx(c,{label:"Exception",value:e.jsx(y,{listType:"exceptions",filterType:"names",filterValue:s.name,children:s.name})}),e.jsx(c,{label:"Message",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:s.message})}),s.code!==void 0&&e.jsx(c,{label:"Error Code",value:e.jsx("code",{className:"text-sm font-mono bg-gray-100 dark:bg-gray-800 px-2 py-0.5 rounded",children:s.code})})]})})]}),s.request&&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 Context"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(c,{label:"Method",value:e.jsx(y,{listType:"exceptions",filterType:"methods",filterValue:s.request.method,children:s.request.method})}),e.jsx(c,{label:"URL",value:e.jsx(y,{listType:"exceptions",filterType:"paths",filterValue:s.request.url,className:"font-mono",children:s.request.url})})]})})]}),l.length>0&&e.jsx(I,{tabs:l,defaultTab:"request-body",headerRight:e.jsx(n.Toolbar,{data:(a=s.request)==null?void 0:a.body})}),s.stack&&e.jsx(M,{stack:s.stack,initialFrames:5})]})}export{W as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as B,u as W,n as $,o as H,j as t,i as U,T as g}from"./index-DSn-BKqm.js";import{e as z,b as r}from"./vendor-DBTT3jXp.js";import{f as G,p as J}from"./badgeColors-DQ_P_DOX.js";import{u as K,P as O,F as Q,N as V,L as X}from"./PageHeader-D5AT-Mxc.js";import{u as Y,b as Z,C as u}from"./types-Rt2vyU68.js";import{E as _}from"./EntrySearchInput-_mfQ0GTh.js";import{T as o,b as ee}from"./DataTable-DBtrADsk.js";import{C as te}from"./circle-check-big-pHbbgVmy.js";import"./search-BZHB1sYK.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const se=B("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);function ue(){const f=z(),[l,y]=r.useState("all"),[i,h]=r.useState(null),{refreshStats:x}=W(),{clearAll:v,serverFilters:j,headerFilters:b,hasFilters:C}=Y("exceptions"),w={...j,resolved:l==="all"?void 0:l==="resolved"},{entries:E,loading:k,refreshing:n,newEntriesCount:N,hasMore:T,loadMore:A,loadNew:S,autoRefreshEnabled:F,live:M,setAutoRefresh:R,updateEntry:d,meta:c,isHighlighted:P}=K({type:"exception",limit:50,filters:w}),p=E.filter(e=>Z(e)),D=e=>e.payload.name&&e.payload.name.toLowerCase()!=="error"?e.payload.name:e.payload.code?String(e.payload.code):"Error",I=[{id:"all",label:"All"},{id:"unresolved",label:"Unresolved"},{id:"resolved",label:"Resolved"}],m=r.useCallback(async(e,s)=>{e.preventDefault(),e.stopPropagation(),h(s.id);try{if(s.resolvedAt){const a=await $(s.id);d(a.data)}else{const a=await H(s.id);d(a.data)}await x()}catch(a){console.error("Failed to toggle resolution:",a)}finally{h(null)}},[d,x]),L=r.useMemo(()=>[{key:"exception",header:"Exception",minWidth:"180px",render:e=>{const s=D(e);return t.jsx(u,{listType:"exceptions",filterType:"names",children:s})}},{key:"message",header:"Message",minWidth:"200px",render:e=>t.jsx(o,{truncate:!0,maxWidth:"300px",children:e.payload.message})},{key:"method",header:"Method",width:"100px",render:e=>{var a;const s=((a=e.payload.request)==null?void 0:a.method)||"-";return s!=="-"?t.jsx(u,{listType:"exceptions",filterType:"methods",children:s}):t.jsx(o,{secondary:!0,children:"—"})}},{key:"path",header:"Path",minWidth:"150px",render:e=>{var a;const s=((a=e.payload.request)==null?void 0:a.url)||"-";return s!=="-"?t.jsx(u,{listType:"exceptions",filterType:"paths",className:"font-mono",children:s.length>40?s.substring(0,40)+"...":s}):t.jsx(o,{secondary:!0,children:"—"})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:G(J(e.createdAt),{addSuffix:!0})})},{key:"status",header:"Status",width:"80px",align:"center",render:e=>t.jsx("button",{onClick:s=>m(s,e),disabled:i===e.id,className:`p-1 transition-colors ${e.resolvedAt?"text-green-500 hover:text-green-600":"text-gray-400 hover:text-green-500"}`,title:e.resolvedAt?"Mark as unresolved":"Mark as resolved",children:i===e.id?t.jsx(U,{className:"h-5 w-5 animate-spin"}):e.resolvedAt?t.jsx(te,{className:"h-5 w-5"}):t.jsx(se,{className:"h-5 w-5"})})}],[i,m]);if(k&&p.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 q=C?"pt-36":"pt-24";return t.jsxs("div",{children:[t.jsx(O,{title:"Exceptions",icon:g,iconColor:"text-red-600 dark:text-red-400",count:p.length,totalCount:c==null?void 0:c.total,refreshing:n,autoRefreshEnabled:F,live:M,onAutoRefreshToggle:R,filters:b,onClearAllFilters:v,filterControls:t.jsx(Q,{tabs:I,activeTab:l,onChange:e=>y(e)})}),t.jsxs("div",{className:`${q} space-y-4 transition-all duration-200`,children:[t.jsx(_,{placeholder:"Search by exception name, message, tag, or content..."}),t.jsx(V,{count:N,onClick:S,loading:n}),t.jsx(ee,{columns:L,data:p,keyExtractor:e=>e.id,onRowClick:e=>f(`/exceptions/${e.id}`),emptyMessage:"No exceptions recorded yet",emptyIcon:t.jsx(g,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"}),rowClassName:e=>{const s=[];return e.resolvedAt&&s.push("opacity-50"),P(e.id)&&s.push("highlight-new"),s.join(" ")}}),t.jsx(X,{hasMore:T,onClick:A,loading:n})]})]})}export{ue as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as m,j as e,S as i,C as g}from"./index-DSn-BKqm.js";import{p as d,f as h}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as j}from"./DetailRow-C0vUMqsn.js";import{C as x}from"./types-Rt2vyU68.js";import{u as p,C as b,T as u}from"./EntryDetailPage-CIQyW46e.js";import{C as y}from"./CopyButton-CVcLaHry.js";import{C as N}from"./circle-check-big-pHbbgVmy.js";import{C as f}from"./circle-x-CBdlQncP.js";import"./vendor-DBTT3jXp.js";import"./search-BZHB1sYK.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const v=m("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);function $({entry:n}){const{payload:a,createdAt:l}=n,r=p(),t=a.allowed?{icon:N,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30",label:"allowed"}:{icon:f,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30",label:"denied"},o=t.icon,c=a.context?[{id:"context",label:"Context",content:e.jsx(b,{data:a.context,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}]:[];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 ${t.bg} rounded-lg`,children:e.jsx(i,{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",children:a.gate}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Authorization Gate"})]})]}),e.jsx(y,{text:a.gate,label:"Copy gate name"})]})}),e.jsxs("div",{className:`grid ${a.userId?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(i,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Gate"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",title:a.gate,children:a.gate})]}),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:"Result"})]}),e.jsx("p",{className:`text-lg font-bold ${t.color}`,children:t.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(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.userId&&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(v,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"User"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",children:a.userId})]})]})]}),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:[j(d(l),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",h(d(l),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Gate",value:e.jsx(x,{listType:"gates",filterType:"names",filterValue:a.gate,children:a.gate})}),e.jsx(s,{label:"Action",value:a.action}),e.jsx(s,{label:"Result",value:e.jsx(x,{listType:"gates",filterType:"results",filterValue:t.label,children:t.label})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.userId&&e.jsx(s,{label:"User ID",value:String(a.userId)}),a.subject&&e.jsx(s,{label:"Subject",value:a.subject}),a.reason&&e.jsx(s,{label:"Reason",value:a.reason})]})})]}),c.length>0&&e.jsx(u,{tabs:c,defaultTab:"context",hashKey:"gate",headerRight:e.jsx(r.Toolbar,{data:a.context})})]})}export{$ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,S as d}from"./index-DSn-BKqm.js";import{e as A,b as F}from"./vendor-DBTT3jXp.js";import{f as R,p as T}from"./badgeColors-DQ_P_DOX.js";import{u as M,P as S,N as W,L as G}from"./PageHeader-D5AT-Mxc.js";import{u as B,p as D,C as n}from"./types-Rt2vyU68.js";import{T as a,b as I}from"./DataTable-DBtrADsk.js";function V(){const c=A(),{addFilter:s,clearAll:u,serverFilters:h,headerFilters:p,hasFilters:x}=B("gates"),{entries:m,loading:g,refreshing:i,newEntriesCount:y,hasMore:j,loadMore:f,loadNew:b,autoRefreshEnabled:k,live:w,setAutoRefresh:C,meta:o,isHighlighted:N}=M({type:"gate",limit:50,filters:h}),l=m.filter(e=>D(e)),E=F.useMemo(()=>[{key:"gate",header:"Gate",minWidth:"200px",render:e=>t.jsx(n,{onClick:r=>{r.stopPropagation(),s("names",e.payload.gate)},children:e.payload.gate})},{key:"action",header:"Action",width:"150px",render:e=>e.payload.action?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.action}):t.jsx(a,{secondary:!0,children:"-"})},{key:"subject",header:"Subject",minWidth:"150px",render:e=>e.payload.subject?t.jsx(a,{mono:!0,truncate:!0,maxWidth:"200px",children:typeof e.payload.subject=="string"?e.payload.subject:JSON.stringify(e.payload.subject)}):t.jsx(a,{secondary:!0,children:"-"})},{key:"result",header:"Result",width:"100px",render:e=>{const r=e.payload.allowed?"allowed":"denied";return t.jsx(n,{onClick:P=>{P.stopPropagation(),s("results",r)},children:r.toUpperCase()})}},{key:"user",header:"User",width:"150px",render:e=>e.payload.userId?t.jsx(a,{truncate:!0,maxWidth:"150px",children:e.payload.userId}):t.jsx(a,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:R(T(e.createdAt),{addSuffix:!0})})}],[s]);if(g&&l.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(S,{title:"Gates",icon:d,iconColor:"text-amber-600 dark:text-amber-400",count:l.length,totalCount:o==null?void 0:o.total,refreshing:i,autoRefreshEnabled:k,live:w,onAutoRefreshToggle:C,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(W,{count:y,onClick:b,loading:i}),t.jsx(I,{columns:E,data:l,keyExtractor:e=>e.id,onRowClick:e=>c(`/gates/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No gate checks recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(G,{hasMore:j,onClick:f,loading:i})]})]})}export{V as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as M,z as E,j as e,X as O,t as z,g as H,L as q,C as P,T as U}from"./index-DSn-BKqm.js";import{b,e as W}from"./vendor-DBTT3jXp.js";import{p as B,f as J}from"./badgeColors-DQ_P_DOX.js";import{D as m,f as Z}from"./DetailRow-C0vUMqsn.js";import{C as $,B as X}from"./types-Rt2vyU68.js";import{G as K,N as Y}from"./DataTable-DBtrADsk.js";import{M as _,c as ee,a as ae,b as se,u as L,C as D,T as R}from"./EntryDetailPage-CIQyW46e.js";import{U as te}from"./UserCard-BUmnN8l-.js";import{S as Q}from"./search-BZHB1sYK.js";import{Z as re}from"./zap-BHRzQYJO.js";import{S as le}from"./send-CqQmINCf.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ne=M("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);function ie(){const[r,t]=b.useState({expandAllTrigger:0,collapseAllTrigger:0,showSearch:!1,searchTerm:""}),[a,s]=b.useState(!1),c=b.useCallback(()=>{t(i=>({...i,expandAllTrigger:i.expandAllTrigger+1}))},[]),p=b.useCallback(()=>{t(i=>({...i,collapseAllTrigger:i.collapseAllTrigger+1}))},[]),x=b.useCallback(()=>{t(i=>({...i,showSearch:!i.showSearch,searchTerm:i.showSearch?"":i.searchTerm}))},[]),n=b.useCallback(i=>{t(u=>({...u,searchTerm:i}))},[]),h=b.useCallback(async i=>{try{await navigator.clipboard.writeText(i),s(!0),E.success("Copied!"),setTimeout(()=>s(!1),2e3)}catch{E.error("Failed to copy")}},[]),g=({code:i})=>e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx("button",{onClick:c,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Expand all",children:e.jsx(_,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("button",{onClick:p,className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Collapse all",children:e.jsx(ee,{className:"h-3.5 w-3.5 text-gray-500"})}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 mx-1"}),e.jsx("button",{onClick:x,className:`p-1.5 rounded transition-colors ${r.showSearch?"bg-primary-100 dark:bg-primary-900/30 text-primary-600 dark:text-primary-400":"hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-500"}`,title:"Search",children:e.jsx(Q,{className:"h-3.5 w-3.5"})}),e.jsx("button",{onClick:()=>h(i),className:"p-1.5 hover:bg-gray-200 dark:hover:bg-gray-700 rounded transition-colors",title:"Copy query",children:a?e.jsx(ae,{className:"h-3.5 w-3.5 text-green-500"}):e.jsx(se,{className:"h-3.5 w-3.5 text-gray-500"})})]}),y=r.showSearch?e.jsx("div",{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"relative",children:[e.jsx(Q,{className:"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-gray-400"}),e.jsx("input",{type:"text",value:r.searchTerm,onChange:i=>n(i.target.value),placeholder:"Search fields, arguments...",className:"w-full pl-8 pr-8 py-1.5 text-sm bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded focus:ring-2 focus:ring-primary-500 focus:border-transparent",autoFocus:!0}),r.searchTerm&&e.jsx("button",{onClick:()=>n(""),className:"absolute right-2.5 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600",children:e.jsx(O,{className:"h-3.5 w-3.5"})})]})}):null;return{state:r,Toolbar:g,SearchBar:y}}function oe(r){const t=[];let a="",s=!1,c="";for(let p=0;p<r.length;p++){const x=r[p];if(s){a+=x,x===c&&r[p-1]!=="\\"&&(t.push(a),a="",s=!1);continue}if(x==='"'||x==="'"){a&&t.push(a),a=x,s=!0,c=x;continue}if(/[\s,]/.test(x)){a&&t.push(a),a="";continue}if(/[{}():\[\]!$@]/.test(x)){a&&t.push(a),t.push(x),a="";continue}a+=x}return a&&t.push(a),t}function ce(r){const t=oe(r),a=[];let s=0;function c(){const n=[];if(t[s]!=="{")return n;for(s++;s<t.length&&t[s]!=="}";){const h=p();h&&n.push(h)}return s++,n}function p(){if(t[s]==="...")if(s++,t[s]==="on"){s++;const u=t[s++],l=c();return{type:"inline-fragment",typeCondition:u,children:l}}else return{type:"fragment",name:t[s++]};let n=t[s++],h;t[s]===":"&&(s++,h=n,n=t[s++]);let g;if(t[s]==="("){for(g=[],s++;s<t.length&&t[s]!==")";){const u=t[s++];if(t[s]===":"){s++;let l="",o=0;for(;s<t.length;){const d=t[s];if((d==="{"||d==="[")&&o++,(d==="}"||d==="]")&&o--,o===0&&(d===")"||t[s+1]===":"))break;l+=d+" ",s++}g.push({name:u,value:l.trim()})}}t[s]===")"&&s++}let y;for(;t[s]==="@";){s++;const u=t[s++];y=y??[];const l={name:u};if(t[s]==="("){for(l.arguments=[],s++;s<t.length&&t[s]!==")";){const o=t[s++];if(t[s]===":"){s++;const d=t[s++];l.arguments.push({name:o,value:d})}}t[s]===")"&&s++}y.push(l)}let i;return t[s]==="{"&&(i=c()),{type:"field",name:n,alias:h,arguments:g,directives:y,children:i}}function x(){const n=t[s];if(!["query","mutation","subscription","fragment"].includes(n))return t[s]==="{"?{type:"operation",operationType:"query",children:c()}:null;if(s++,n==="fragment"){const i=t[s++];s++;const u=t[s++],l=c();return{type:"fragment",name:i,typeCondition:u,children:l}}let h,g;if(t[s]&&t[s]!=="("&&t[s]!=="{"&&(h=t[s++]),t[s]==="("){for(g=[],s++;s<t.length&&t[s]!==")";)if(t[s]==="$"){s++;const i=t[s++];s++;let u="";for(;s<t.length&&![")","=","$"].includes(t[s]);)u+=t[s++];let l;t[s]==="="&&(s++,l=t[s++]),g.push({name:i,type:u.trim(),defaultValue:l})}else s++;t[s]===")"&&s++}const y=c();return{type:"operation",operationType:n,name:h,variableDefinitions:g,children:y}}for(;s<t.length;){const n=x();n?a.push(n):s++}return a}function F({node:r,depth:t=0,searchTerm:a,defaultExpanded:s}){const[c,p]=b.useState(s),[x,n]=b.useState(void 0),h=r.children&&r.children.length>0,g=t*16,y=b.useMemo(()=>{if(!a)return!1;const l=a.toLowerCase(),o=d=>{var j,v,k,w,C,T,S;return!!((j=d.name)!=null&&j.toLowerCase().includes(l)||(v=d.alias)!=null&&v.toLowerCase().includes(l)||(k=d.operationType)!=null&&k.toLowerCase().includes(l)||(w=d.typeCondition)!=null&&w.toLowerCase().includes(l)||(C=d.arguments)!=null&&C.some(N=>N.name.toLowerCase().includes(l)||N.value.toLowerCase().includes(l))||(T=d.variableDefinitions)!=null&&T.some(N=>N.name.toLowerCase().includes(l)||N.type.toLowerCase().includes(l))||(S=d.children)!=null&&S.some(o))};return o(r)},[r,a]);a&&y&&x!==a&&(n(a),p(!0));const i=l=>{if(!a)return l;const o=l.toLowerCase().indexOf(a.toLowerCase());return o===-1?l:e.jsxs(e.Fragment,{children:[l.slice(0,o),e.jsx("span",{className:"bg-yellow-300 dark:bg-yellow-600 rounded px-0.5",children:l.slice(o,o+a.length)}),l.slice(o+a.length)]})},u=()=>{const l=[];if(r.operationType&&l.push(e.jsx("span",{className:"text-pink-600 dark:text-pink-400 font-medium",children:i(r.operationType)},"op")),r.type==="inline-fragment"&&l.push(e.jsx("span",{className:"text-gray-500",children:"..."},"spread"),e.jsx("span",{className:"text-pink-600 dark:text-pink-400 font-medium ml-1",children:"on"},"on")),r.typeCondition&&l.push(e.jsx("span",{className:"text-yellow-600 dark:text-yellow-400 ml-1",children:i(r.typeCondition)},"type")),r.alias&&l.push(e.jsx("span",{className:"text-purple-600 dark:text-purple-400 ml-1",children:i(r.alias)},"alias"),e.jsx("span",{className:"text-gray-500",children:":"},"colon")),r.name){const o=r.type==="operation"||r.type==="fragment"?"text-blue-600 dark:text-blue-400":"text-cyan-600 dark:text-cyan-400";l.push(e.jsx("span",{className:`${o} ml-1`,children:i(r.name)},"name"))}return r.variableDefinitions&&r.variableDefinitions.length>0&&l.push(e.jsxs("span",{className:"text-gray-500 ml-1",children:["(",r.variableDefinitions.map((o,d)=>e.jsxs("span",{children:[d>0&&e.jsx("span",{className:"text-gray-500",children:", "}),e.jsxs("span",{className:"text-orange-500 dark:text-orange-400",children:["$",i(o.name)]}),e.jsx("span",{className:"text-gray-500",children:": "}),e.jsx("span",{className:"text-yellow-600 dark:text-yellow-400",children:i(o.type)}),o.defaultValue&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-gray-500",children:" = "}),e.jsx("span",{className:"text-green-600 dark:text-green-400",children:o.defaultValue})]})]},d)),")"]},"vars")),r.arguments&&r.arguments.length>0&&l.push(e.jsxs("span",{className:"text-gray-500",children:["(",r.arguments.map((o,d)=>e.jsxs("span",{children:[d>0&&e.jsx("span",{className:"text-gray-500",children:", "}),e.jsx("span",{className:"text-purple-500 dark:text-purple-400",children:i(o.name)}),e.jsx("span",{className:"text-gray-500",children:": "}),e.jsx("span",{className:"text-green-600 dark:text-green-400",children:i(o.value)})]},d)),")"]},"args")),r.directives&&r.directives.length>0&&r.directives.forEach((o,d)=>{l.push(e.jsxs("span",{className:"text-pink-500 dark:text-pink-400 ml-1",children:["@",o.name,o.arguments&&o.arguments.length>0&&e.jsxs("span",{className:"text-gray-500",children:["(",o.arguments.map((j,v)=>e.jsxs("span",{children:[v>0&&", ",e.jsx("span",{className:"text-purple-500",children:j.name}),": ",e.jsx("span",{className:"text-green-600",children:j.value})]},v)),")"]})]},`dir-${d}`))}),h&&l.push(e.jsx("span",{className:"text-gray-500 ml-1",children:c?"{":"{ ... }"},"brace")),l};return e.jsxs("div",{className:y&&a?"bg-yellow-50 dark:bg-yellow-900/20":"",children:[e.jsxs("div",{className:"group flex items-start py-0.5 hover:bg-gray-100 dark:hover:bg-white/5 rounded transition-colors font-mono text-sm",style:{paddingLeft:g},children:[e.jsx("button",{onClick:()=>p(!c),className:`w-5 h-5 flex items-center justify-center flex-shrink-0 ${h?"cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-700 rounded":""}`,disabled:!h,children:h&&(c?e.jsx(z,{className:"h-3.5 w-3.5 text-gray-400"}):e.jsx(H,{className:"h-3.5 w-3.5 text-gray-400"}))}),e.jsx("div",{className:"flex-1 whitespace-nowrap",children:u()})]}),c&&r.children&&r.children.length>0&&e.jsxs("div",{children:[r.children.map((l,o)=>e.jsx(F,{node:l,depth:t+1,searchTerm:a,defaultExpanded:s},o)),e.jsx("div",{className:"py-0.5 font-mono text-sm text-gray-500",style:{paddingLeft:g+20},children:"}"})]})]})}function de({query:r,maxHeight:t=400,toolbarState:a,searchBar:s}){const c=b.useMemo(()=>ce(r),[r]),p=a.expandAllTrigger>a.collapseAllTrigger||a.expandAllTrigger===0,x=`${a.expandAllTrigger}-${a.collapseAllTrigger}`;return e.jsxs("div",{children:[s,e.jsx("div",{className:"p-3 overflow-auto",style:{maxHeight:typeof t=="number"?`${t}px`:t},children:c.length>0?e.jsx("div",{children:c.map((n,h)=>e.jsx(F,{node:n,searchTerm:a.searchTerm,defaultExpanded:p},h))},x):e.jsx("pre",{className:"text-sm text-gray-600 dark:text-gray-400 whitespace-pre-wrap font-mono",children:r})})]})}function f(r){return r<1?`${(r*1e3).toFixed(0)} us`:r<1e3?`${r.toFixed(2)} ms`:`${(r/1e3).toFixed(2)} s`}function xe({parsing:r,validation:t,execution:a,total:s}){if(!r&&!t&&!a)return null;const c=[{label:"Parsing",value:r,color:"bg-blue-400"},{label:"Validation",value:t,color:"bg-purple-400"},{label:"Execution",value:a,color:"bg-green-400"}].filter(n=>n.value!==void 0&&n.value>0),p=c.reduce((n,h)=>n+(h.value??0),0),x=s-p;return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"h-3 rounded-full overflow-hidden bg-gray-100 dark:bg-gray-700 flex",children:[c.map((n,h)=>e.jsx("div",{className:`${n.color} transition-all`,style:{width:`${(n.value??0)/s*100}%`},title:`${n.label}: ${f(n.value??0)}`},h)),x>0&&e.jsx("div",{className:"bg-gray-300 dark:bg-gray-600",style:{width:`${x/s*100}%`},title:`Other: ${f(x)}`})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 text-xs text-gray-600 dark:text-gray-400",children:[c.map((n,h)=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:`w-2.5 h-2.5 rounded ${n.color}`}),e.jsxs("span",{children:[n.label,": ",f(n.value??0)]})]},h)),x>0&&e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded bg-gray-300 dark:bg-gray-600"}),e.jsxs("span",{children:["Other: ",f(x)]})]})]})]})}function he({warnings:r}){return!r||r.length===0?null:e.jsxs("div",{className:"card border-amber-200 dark:border-amber-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-amber-200 dark:border-amber-800 bg-amber-50 dark:bg-amber-900/20",children:e.jsxs("h2",{className:"text-lg font-semibold text-amber-800 dark:text-amber-200 flex items-center gap-2",children:[e.jsx(U,{className:"h-5 w-5"}),"Potential N+1 Queries (",r.length,")"]})}),e.jsx("div",{className:"divide-y divide-amber-100 dark:divide-amber-900/30",children:r.map((t,a)=>e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{children:[e.jsxs("code",{className:"text-sm font-mono text-amber-700 dark:text-amber-300",children:[t.parentType,".",t.field]}),e.jsxs("p",{className:"text-sm text-gray-600 dark:text-gray-400 mt-1",children:["Called ",e.jsxs("span",{className:"font-semibold text-amber-600 dark:text-amber-400",children:[t.count," times"]})]})]})}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-500 mt-2",children:t.suggestion})]},a))})]})}function pe({errors:r}){return!r||r.length===0?null: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("h2",{className:"text-lg font-semibold text-red-800 dark:text-red-200",children:["GraphQL Errors (",r.length,")"]})}),e.jsx("div",{className:"divide-y divide-red-100 dark:divide-red-900/30",children:r.map((t,a)=>e.jsxs("div",{className:"p-4",children:[e.jsx("p",{className:"text-sm font-medium text-red-700 dark:text-red-300",children:t.message}),t.path&&t.path.length>0&&e.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1 font-mono",children:["Path: ",t.path.join(" > ")]}),t.locations&&t.locations.length>0&&e.jsxs("p",{className:"text-xs text-gray-500 dark:text-gray-400 mt-1",children:["Location: ",t.locations.map(s=>`Line ${s.line}, Col ${s.column}`).join("; ")]})]},a))})]})}function me({traces:r,totalDuration:t}){if(!r||r.length===0)return null;const a=[...r].sort((s,c)=>s.startOffset-c.startOffset);return e.jsx("div",{className:"space-y-1",children:a.map((s,c)=>{const p=s.startOffset/t*100,x=Math.max(s.duration/t*100,.5);return e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("div",{className:"w-40 truncate text-gray-600 dark:text-gray-400 font-mono",title:s.path,children:s.fieldName}),e.jsx("div",{className:"flex-1 h-4 bg-gray-100 dark:bg-gray-700 rounded relative",children:e.jsx("div",{className:"absolute h-full bg-primary-400 dark:bg-primary-500 rounded",style:{left:`${p}%`,width:`${x}%`},title:`${s.path}: ${f(s.duration)}`})}),e.jsx("div",{className:"w-16 text-right text-gray-500 dark:text-gray-400 tabular-nums",children:f(s.duration)})]},c)})})}function Te({entry:r}){var A;const t=W(),{payload:a,createdAt:s}=r,c=(r.tags??[]).filter(G=>!["query","mutation","subscription"].includes(G.toLowerCase())),p=()=>t("/graphql?hasErrors=true"),x=()=>t("/graphql?hasN1=true"),n=ie(),h=L(),g=L(),y=L(),[i,u]=b.useState("query"),l=e.jsx(de,{query:a.query,toolbarState:n.state,searchBar:n.SearchBar,maxHeight:400}),o=e.jsx(D,{data:a.variables??{},toolbarState:h.state,searchBar:h.SearchBar,maxHeight:400}),d=Object.keys(a.headers??{}).length,j=d>0?e.jsx(D,{data:a.headers??{},toolbarState:g.state,searchBar:g.SearchBar,maxHeight:400}):e.jsxs("div",{className:"p-8 text-center text-gray-500 dark:text-gray-400",children:[e.jsx("p",{children:"No headers captured for this operation."}),e.jsxs("p",{className:"text-xs mt-1",children:["Ensure ",e.jsx("code",{className:"px-1 py-0.5 bg-gray-100 dark:bg-gray-700 rounded",children:"captureHeaders"})," is enabled in the GraphQL watcher config."]})]}),v=e.jsx(D,{data:a.responseData||{},toolbarState:y.state,searchBar:y.SearchBar,maxHeight:400}),k=a.errors&&a.errors.length>0?e.jsx(pe,{errors:a.errors}):e.jsx("div",{className:"p-8 text-center text-gray-500 dark:text-gray-400",children:"No errors"}),w=a.fieldTraces&&a.fieldTraces.length>0?e.jsx("div",{className:"p-4",children:e.jsx(me,{traces:a.fieldTraces,totalDuration:a.duration})}):a.hasErrors?e.jsxs("div",{className:"p-8 text-center text-gray-500 dark:text-gray-400",children:[e.jsx("p",{children:"No resolver traces available."}),e.jsx("p",{className:"text-xs mt-1",children:"Query failed before execution phase - resolvers were not called."})]}):e.jsxs("div",{className:"p-8 text-center text-gray-500 dark:text-gray-400",children:[e.jsx("p",{children:"Resolver tracing not enabled for this operation."}),e.jsxs("p",{className:"text-xs mt-1",children:["Enable ",e.jsx("code",{className:"px-1 py-0.5 bg-gray-100 dark:bg-gray-700 rounded",children:"traceFieldResolvers"})," in GraphQL watcher config."]})]}),C=[{id:"query",label:"Query",content:l},{id:"variables",label:"Variables",content:o},{id:"headers",label:`Headers${d?` (${d})`:""}`,content:j}],T=[{id:"response",label:"Response",content:v},{id:"errors",label:`Errors${(A=a.errors)!=null&&A.length?` (${a.errors.length})`:""}`,content:k},{id:"resolvers",label:"Resolvers",content:w}],[S,N]=b.useState("response"),V=()=>{switch(i){case"query":return e.jsx(n.Toolbar,{code:a.query});case"variables":return e.jsx(h.Toolbar,{data:a.variables??{}});case"headers":return d>0?e.jsx(g.Toolbar,{data:a.headers??{}}):null;default:return null}},I=()=>{switch(S){case"response":return e.jsx(y.Toolbar,{data:a.responseData||{}});default:return null}};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:"Operation Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(m,{label:"Time",value:e.jsxs("span",{children:[Z(B(s),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",J(B(s),{addSuffix:!0}),")"]})]})}),e.jsx(m,{label:"Operation Type",value:e.jsx($,{listType:"graphql",filterType:"operationTypes",filterValue:a.operationType,children:a.operationType.toUpperCase()})}),e.jsx(m,{label:"Operation Name",value:a.operationName?e.jsx($,{listType:"graphql",filterType:"operationNames",filterValue:a.operationName,className:"font-mono",children:a.operationName}):e.jsx("span",{className:"text-gray-400 dark:text-gray-500 italic",children:"(anonymous)"})}),e.jsx(m,{label:"Query Hash",value:e.jsx("code",{className:"text-xs font-mono text-gray-500 dark:text-gray-400",children:a.queryHash})}),e.jsx(m,{label:"Status",value:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{listType:"graphql",filterType:"statuses",filterValue:String(a.statusCode),children:String(a.statusCode)}),a.hasErrors&&e.jsx(K,{onClick:p}),a.potentialN1&&a.potentialN1.length>0&&e.jsx(Y,{count:a.potentialN1.length,onClick:x})]})}),e.jsx(m,{label:"Duration",value:e.jsx("span",{className:a.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:f(a.duration)})}),a.resolverCount!==void 0&&e.jsx(m,{label:"Resolver Count",value:e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(q,{className:"h-4 w-4 text-gray-400"}),a.resolverCount]})}),a.depthReached!==void 0&&e.jsx(m,{label:"Query Depth",value:e.jsx("span",{className:a.depthReached>5?"text-amber-600 dark:text-amber-400":"",children:a.depthReached})}),a.ip&&e.jsx(m,{label:"IP Address",value:e.jsx($,{listType:"graphql",filterType:"ips",filterValue:a.ip,className:"font-mono",children:a.ip})}),a.userAgent&&e.jsx(m,{label:"User Agent",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:a.userAgent})}),a.fieldCount!==void 0&&e.jsx(m,{label:"Field Count",value:a.fieldCount}),c.length>0&&e.jsx(m,{label:"Tags",value:e.jsx(X,{items:c,listType:"graphql",maxItems:99})})]})})]}),(a.parsingDuration!==void 0||a.validationDuration!==void 0||a.executionDuration!==void 0)&&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.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[e.jsx(P,{className:"h-5 w-5 text-gray-400"}),"Timing Breakdown"]})}),e.jsx("div",{className:"p-4",children:e.jsx(xe,{parsing:a.parsingDuration,validation:a.validationDuration,execution:a.executionDuration,total:a.duration})})]}),a.batchId&&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.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[e.jsx(q,{className:"h-5 w-5 text-gray-400"}),"Batch Request"]})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(m,{label:"Batch ID",value:e.jsx("code",{className:"font-mono text-sm",children:a.batchId})}),a.batchSize!==void 0&&e.jsx(m,{label:"Position",value:e.jsxs("span",{children:[(a.batchIndex??0)+1," of ",a.batchSize]})})]})})]}),a.operationType==="subscription"&&a.subscriptionId&&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.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[e.jsx(re,{className:"h-5 w-5 text-green-500"}),"Subscription Details"]})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(m,{label:"Subscription ID",value:e.jsx("code",{className:"font-mono text-sm",children:a.subscriptionId})}),a.subscriptionEvent&&e.jsx(m,{label:"Event",value:e.jsx("span",{className:"capitalize",children:a.subscriptionEvent})}),a.messageCount!==void 0&&e.jsx(m,{label:"Messages Sent",value:a.messageCount}),a.subscriptionDuration!==void 0&&e.jsx(m,{label:"Total Duration",value:f(a.subscriptionDuration)})]})})]}),a.user&&e.jsx(te,{user:a.user}),e.jsx(he,{warnings:a.potentialN1}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[e.jsx(le,{className:"h-5 w-5 text-blue-500"}),"Client Request"]}),e.jsx(R,{tabs:C,defaultTab:"query",headerRight:V(),onTabChange:u})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white flex items-center gap-2",children:[e.jsx(ne,{className:"h-5 w-5 text-green-500"}),"Server Response"]}),e.jsx(R,{tabs:T,defaultTab:"response",headerRight:I(),onTabChange:N})]})]})}export{Te as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as M,j as a}from"./index-DSn-BKqm.js";import{e as Q,f as U,b as p}from"./vendor-DBTT3jXp.js";import{f as W,p as I}from"./badgeColors-DQ_P_DOX.js";import{E as O}from"./EntrySearchInput-_mfQ0GTh.js";import{u as $,P as z,N as V,L as J}from"./PageHeader-D5AT-Mxc.js";import{u as K,s as X,C as x}from"./types-Rt2vyU68.js";import{T as h,G as Y,N as Z,D as _,a as ee,b as ae}from"./DataTable-DBtrADsk.js";import"./search-BZHB1sYK.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const y=M("Hexagon",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]]);function ce(){const f=Q(),[t,s]=U(),o=t.get("hasErrors")==="true",n=t.get("hasN1")==="true",{serverFilters:N,headerFilters:w,hasFilters:j,addFilter:u}=K("graphql"),v={...N,hasErrors:o?!0:void 0,hasN1:n?!0:void 0},i=[];o&&i.push({category:"Status",value:"ERROR",onRemove:()=>{const e=new URLSearchParams(t);e.delete("hasErrors"),s(e,{replace:!0})}}),n&&i.push({category:"Performance",value:"N+1",onRemove:()=>{const e=new URLSearchParams(t);e.delete("hasN1"),s(e,{replace:!0})}});const C=[...w,...i],E=j||o||n,k=()=>{s({},{replace:!0})},m=p.useCallback(e=>{e.stopPropagation();const r=new URLSearchParams(t);r.set("hasErrors","true"),s(r,{replace:!0})},[t,s]),g=p.useCallback(e=>{e.stopPropagation();const r=new URLSearchParams(t);r.set("hasN1","true"),s(r,{replace:!0})},[t,s]),{entries:P,loading:b,refreshing:l,newEntriesCount:F,hasMore:T,loadMore:L,loadNew:R,autoRefreshEnabled:S,live:q,setAutoRefresh:A,meta:d,isHighlighted:B}=$({type:"graphql",limit:50,filters:v}),c=P.filter(e=>X(e)),H=p.useMemo(()=>[{key:"type",header:"Type",width:"110px",render:e=>a.jsx(x,{listType:"graphql",filterType:"operationTypes",children:e.payload.operationType})},{key:"operation",header:"Operation",minWidth:"150px",render:e=>a.jsx(h,{mono:!0,truncate:!0,maxWidth:"280px",children:e.payload.operationName||"(anonymous)"})},{key:"status",header:"Status",width:"180px",align:"center",render:e=>a.jsxs("div",{className:"flex items-center gap-1.5 justify-center",children:[a.jsx(x,{listType:"graphql",filterType:"statuses",children:e.payload.statusCode}),e.payload.hasErrors&&a.jsx(Y,{onClick:m}),e.payload.potentialN1&&e.payload.potentialN1.length>0&&a.jsx(Z,{count:e.payload.potentialN1.length,onClick:g})]})},{key:"resolvers",header:"Resolvers",width:"90px",align:"center",render:e=>a.jsx(h,{secondary:!0,className:"text-xs tabular-nums",children:e.payload.resolverCount??"-"})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>a.jsx(_,{ms:e.payload.duration})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>a.jsx(ee,{tags:(e.tags??[]).filter(r=>!["query","mutation","subscription"].includes(r.toLowerCase())),max:3,onTagClick:(r,G)=>{G.stopPropagation(),u("tags",r)}})},{key:"time",header:"Time",width:"180px",align:"right",render:e=>a.jsx(h,{secondary:!0,className:"text-xs whitespace-nowrap",children:W(I(e.createdAt),{addSuffix:!0})})}],[m,g,u]);if(b&&c.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 D=E?"pt-28":"pt-16";return a.jsxs("div",{children:[a.jsx(z,{title:"GraphQL",icon:y,iconColor:"text-purple-600 dark:text-purple-400",count:c.length,totalCount:d==null?void 0:d.total,refreshing:l,autoRefreshEnabled:S,live:q,onAutoRefreshToggle:A,filters:C,onClearAllFilters:k}),a.jsxs("div",{className:`${D} space-y-4 transition-all duration-200`,children:[a.jsx(O,{placeholder:"Search by operation, type, tag, or query content..."}),a.jsx(V,{count:F,onClick:R,loading:l}),a.jsx(ae,{columns:H,data:c,keyExtractor:e=>e.id,onRowClick:e=>f(`/graphql/${e.id}`),rowClassName:e=>B(e.id)?"highlight-new":"",emptyMessage:"No GraphQL operations recorded yet",emptyIcon:a.jsx(y,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),a.jsx(J,{hasMore:T,onClick:L,loading:l})]})]})}export{ce as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./index-DSn-BKqm.js";import{b as T}from"./vendor-DBTT3jXp.js";import{p as b,f as E}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as N}from"./DetailRow-C0vUMqsn.js";import{C as i,B}from"./types-Rt2vyU68.js";import{u as j,T as f,C as l}from"./EntryDetailPage-CIQyW46e.js";import"./search-BZHB1sYK.js";const H=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],D=["2XX","3XX","4XX","5XX","SUCCESS","ERROR","CLIENT-ERROR","REDIRECT"];function q(t){return t<1e3?`${t} ms`:`${(t/1e3).toFixed(2)} s`}function O({entry:t}){const{payload:a,createdAt:c}=t,h=a.statusCode??0,m=(t.tags??[]).filter(p=>{var u;const x=p.toUpperCase();return!H.includes(x)&&!D.includes(x)&&p.toLowerCase()!==((u=a.hostname)==null?void 0:u.toLowerCase())}),r=j(),o=j(),[y,R]=T.useState("payload"),[S,C]=T.useState("response"),n={payload:a.requestBody||{},headers:a.requestHeaders??{}},d={response:a.responseBody||{},headers:a.responseHeaders??{}},g=[{id:"payload",label:"Request Body",content:e.jsx(l,{data:n.payload,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})},{id:"headers",label:"Request Headers",content:e.jsx(l,{data:n.headers,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400})}],v=[{id:"response",label:"Response Body",content:e.jsx(l,{data:d.response,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})},{id:"headers",label:"Response Headers",content:e.jsx(l,{data:d.headers,toolbarState:o.state,searchBar:o.SearchBar,maxHeight:400})}];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"HTTP Client Request Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[N(b(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",E(b(c),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Method",value:e.jsx(i,{listType:"http-client",filterType:"methods",filterValue:a.method,className:"font-mono font-medium",children:a.method})}),e.jsx(s,{label:"URL",value:e.jsx("span",{className:"font-mono text-sm break-all",children:a.url})}),a.hostname&&e.jsx(s,{label:"Hostname",value:e.jsx(i,{listType:"http-client",filterType:"hostnames",filterValue:a.hostname,className:"font-mono",children:a.hostname})}),a.path&&e.jsx(s,{label:"Path",value:e.jsx("span",{className:"font-mono text-sm",children:a.path})}),e.jsx(s,{label:"Status Code",value:e.jsx(i,{listType:"http-client",filterType:"statuses",filterValue:a.statusCode?String(a.statusCode):"ERR",children:h>0?h:"ERR"})}),e.jsx(s,{label:"Duration",value:e.jsx("span",{className:a.duration>1e3?"text-yellow-600 dark:text-yellow-400 font-medium":"",children:q(a.duration)})}),a.error&&e.jsx(s,{label:"Error",value:e.jsx("span",{className:"text-red-600 dark:text-red-400 font-medium",children:a.error})}),m.length>0&&e.jsx(s,{label:"Tags",value:e.jsx(B,{items:m,listType:"http-client",maxItems:99})})]})})]}),e.jsx(f,{tabs:g,defaultTab:"payload",hashKey:"req",headerRight:e.jsx(r.Toolbar,{data:n[y]}),onTabChange:R}),e.jsx(f,{tabs:v,defaultTab:"response",hashKey:"res",headerRight:e.jsx(o.Toolbar,{data:d[S]}),onTabChange:C})]})}export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,d as h}from"./index-DSn-BKqm.js";import{e as R,b as v}from"./vendor-DBTT3jXp.js";import{f as H,p as D}from"./badgeColors-DQ_P_DOX.js";import{u as F,P as M,N as A,L as B}from"./PageHeader-D5AT-Mxc.js";import{u as L,j as S,C as l}from"./types-Rt2vyU68.js";import{T as d,D as W,b as $}from"./DataTable-DBtrADsk.js";function O(){const c=R(),{addFilter:s,clearAll:u,serverFilters:m,headerFilters:p,hasFilters:x}=L("http-client"),{entries:g,loading:y,refreshing:r,newEntriesCount:f,hasMore:C,loadMore:j,loadNew:k,autoRefreshEnabled:w,live:N,setAutoRefresh:E,meta:o,isHighlighted:b}=F({type:"http-client",limit:50,filters:m}),n=g.filter(e=>S(e)),P=v.useMemo(()=>[{key:"method",header:"Method",width:"90px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),s("methods",e.payload.method)},className:"font-mono",children:e.payload.method})},{key:"status",header:"Status",width:"80px",render:e=>{const a=e.payload.statusCode??0;return t.jsx(l,{onClick:i=>{i.stopPropagation(),s("statuses",a>0?String(a):"ERR")},children:a>0?a:"ERR"})}},{key:"hostname",header:"Host",width:"180px",render:e=>{const a=e.payload.hostname;return a?t.jsx(l,{onClick:i=>{i.stopPropagation(),s("hostnames",a)},className:"font-mono",children:a}):t.jsx(d,{secondary:!0,children:"-"})}},{key:"path",header:"Path",minWidth:"200px",render:e=>t.jsx(d,{mono:!0,truncate:!0,maxWidth:"300px",children:e.payload.path||e.payload.url})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(W,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(d,{secondary:!0,className:"text-xs",children:H(D(e.createdAt),{addSuffix:!0})})}],[s]);if(y&&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 T=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"HTTP Client",icon:h,iconColor:"text-cyan-600 dark:text-cyan-400",count:n.length,totalCount:o==null?void 0:o.total,refreshing:r,autoRefreshEnabled:w,live:N,onAutoRefreshToggle:E,filters:p,onClearAllFilters:u}),t.jsxs("div",{className:`${T} space-y-4 transition-all duration-200`,children:[t.jsx(A,{count:f,onClick:k,loading:r}),t.jsx($,{columns:P,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/http-client/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No outgoing HTTP requests recorded yet",emptyIcon:t.jsx(h,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:C,onClick:j,loading:r})]})]})}export{O as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as k,C as h,i as j,j as e,B as n}from"./index-DSn-BKqm.js";import{b as w}from"./vendor-DBTT3jXp.js";import{p as m,f as C}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as T}from"./DetailRow-C0vUMqsn.js";import{C as i}from"./types-Rt2vyU68.js";import{u as b,C as p,T as D}from"./EntryDetailPage-CIQyW46e.js";import{C as S}from"./CopyButton-CVcLaHry.js";import{C as y}from"./circle-alert-BoSdc5v7.js";import{C as B}from"./circle-check-big-pHbbgVmy.js";import"./search-BZHB1sYK.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const M=k("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]),u={waiting:{icon:M,color:"text-gray-500",bg:"bg-gray-100 dark:bg-gray-800"},active:{icon:j,color:"text-blue-500",bg:"bg-blue-100 dark:bg-blue-900/30"},completed:{icon:B,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"},failed:{icon:y,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},delayed:{icon:h,color:"text-yellow-500",bg:"bg-yellow-100 dark:bg-yellow-900/30"}};function g(t){return t<1e3?`${t}ms`:t<6e4?`${(t/1e3).toFixed(2)}s`:`${(t/6e4).toFixed(2)}m`}function F({entry:t}){const{payload:a,createdAt:c}=t,r=b(),l=b(),[o,f]=w.useState("data"),d=u[a.status]||u.waiting,v=d.icon,x=[{id:"data",label:"Job Data",content:a.data?e.jsx(p,{data:a.data,toolbarState:r.state,searchBar:r.SearchBar,maxHeight:400}):e.jsx("div",{className:"p-4 text-center py-8 text-gray-500 dark:text-gray-400",children:"No job data"})}];a.result!==void 0&&x.push({id:"result",label:"Result",content:e.jsx(p,{data:a.result,toolbarState:l.state,searchBar:l.SearchBar,maxHeight:400})});const N=()=>{if(o==="data"&&a.data)return e.jsx(r.Toolbar,{data:a.data});if(o==="result"&&a.result!==void 0)return e.jsx(l.Toolbar,{data:a.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 ${d.bg} rounded-lg`,children:e.jsx(n,{className:`h-5 w-5 ${d.color}`})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.name}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Job Details"})]})]}),e.jsx(S,{text:a.name,label:"Copy job name"})]})}),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(v,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("span",{className:`text-lg font-bold ${a.status==="completed"?"text-green-600 dark:text-green-400":a.status==="failed"?"text-red-600 dark:text-red-400":a.status==="active"?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,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.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.duration?g(a.duration):"-"})]}),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(j,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Attempts"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.attempts})]}),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:"Queue"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",title:a.queue,children:a.queue})]})]})]}),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:[T(m(c),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",C(m(c),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Job Name",value:e.jsx(i,{listType:"jobs",filterType:"names",filterValue:a.name,className:"font-mono",children:a.name})}),e.jsx(s,{label:"Queue",value:e.jsx(i,{listType:"jobs",filterType:"queues",filterValue:a.queue,children:a.queue})}),e.jsx(s,{label:"Status",value:e.jsx(i,{listType:"jobs",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(s,{label:"Attempts",value:String(a.attempts)}),a.duration!==void 0&&e.jsx(s,{label:"Duration",value:g(a.duration)})]})})]}),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(y,{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})})]}),e.jsx(D,{tabs:x,defaultTab:"data",hashKey:"job",headerRight:N(),onTabChange:f})]})}export{F as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,B as l}from"./index-DSn-BKqm.js";import{e as T,b as E}from"./vendor-DBTT3jXp.js";import{f as v,p as A}from"./badgeColors-DQ_P_DOX.js";import{u as D,P as B,N as F,L as M}from"./PageHeader-D5AT-Mxc.js";import{u as P,e as R,C as o}from"./types-Rt2vyU68.js";import{T as i,D as J,b as q}from"./DataTable-DBtrADsk.js";function W(){const n=T(),{clearAll:d,serverFilters:u,headerFilters:c,hasFilters:h}=P("jobs"),{entries:p,loading:m,refreshing:a,newEntriesCount:x,hasMore:y,loadMore:f,loadNew:g,autoRefreshEnabled:j,live:b,setAutoRefresh:w,meta:s,isHighlighted:k}=D({type:"job",limit:50,filters:u}),r=p.filter(e=>R(e)),C=E.useMemo(()=>[{key:"job",header:"Job",minWidth:"200px",render:e=>t.jsx(o,{listType:"jobs",filterType:"names",className:"font-mono",children:e.payload.name})},{key:"queue",header:"Queue",width:"120px",render:e=>t.jsx(o,{listType:"jobs",filterType:"queues",children:e.payload.queue})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(o,{listType:"jobs",filterType:"statuses",children:e.payload.status})},{key:"attempts",header:"Attempts",width:"80px",align:"center",render:e=>t.jsx(i,{secondary:!0,children:e.payload.attempts})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>e.payload.duration?t.jsx(J,{ms:e.payload.duration}):t.jsx(i,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(i,{secondary:!0,className:"text-xs",children:v(A(e.createdAt),{addSuffix:!0})})}],[]);if(m&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const N=h?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(B,{title:"Jobs",icon:l,iconColor:"text-yellow-600 dark:text-yellow-400",count:r.length,totalCount:s==null?void 0:s.total,refreshing:a,autoRefreshEnabled:j,live:b,onAutoRefreshToggle:w,filters:c,onClearAllFilters:d}),t.jsxs("div",{className:`${N} space-y-4 transition-all duration-200`,children:[t.jsx(F,{count:x,onClick:g,loading:a}),t.jsx(q,{columns:C,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/jobs/${e.id}`),rowClassName:e=>k(e.id)?"highlight-new":"",emptyMessage:"No jobs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(M,{hasMore:y,onClick:f,loading:a})]})]})}export{W as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a}from"./index-DSn-BKqm.js";import{p as d,f as x}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as m}from"./DetailRow-C0vUMqsn.js";import{C as o}from"./types-Rt2vyU68.js";import{u as b,C as h,T as g}from"./EntryDetailPage-CIQyW46e.js";import"./vendor-DBTT3jXp.js";import"./search-BZHB1sYK.js";const i={verbose:{variant:"default",label:"VERBOSE"},debug:{variant:"info",label:"DEBUG"},log:{variant:"success",label:"LOG"},warn:{variant:"warning",label:"WARNING"},error:{variant:"error",label:"ERROR"}};function w({entry:c}){const{payload:e,createdAt:r}=c,n=i[e.level]||i.log,t=b(),l=e.metadata&&Object.keys(e.metadata).length>0?[{id:"metadata",label:"Metadata",content:a.jsx(h,{data:e.metadata,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}]:[];return a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Log Details"})}),a.jsx("div",{className:"p-4",children:a.jsxs("dl",{className:"divide-y-0",children:[a.jsx(s,{label:"Time",value:a.jsxs("span",{children:[m(d(r),"MMMM do yyyy, h:mm:ss a")," ",a.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",x(d(r),{addSuffix:!0}),")"]})]})}),a.jsx(s,{label:"Level",value:a.jsx(o,{listType:"logs",filterType:"levels",filterValue:e.level,children:n.label})}),e.context&&a.jsx(s,{label:"Context",value:a.jsx(o,{listType:"logs",filterType:"contexts",filterValue:e.context,className:"font-mono",children:e.context})})]})})]}),a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Message"})}),a.jsx("div",{className:"p-4",children:a.jsx("p",{className:`text-sm ${e.level==="error"?"text-red-600 dark:text-red-400":e.level==="warn"?"text-yellow-600 dark:text-yellow-400":"text-gray-900 dark:text-white"}`,children:e.message})})]}),l.length>0&&a.jsx(g,{tabs:l,defaultTab:"metadata",headerRight:a.jsx(t.Toolbar,{data:e.metadata})}),e.stack&&a.jsxs("div",{className:"card",children:[a.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:a.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Stack Trace"})}),a.jsx("div",{className:"p-4 bg-gray-900 dark:bg-gray-950 overflow-x-auto",children:a.jsx("pre",{className:"text-sm text-red-400 font-mono whitespace-pre-wrap",children:e.stack})})]})]})}export{w as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,F as l}from"./index-DSn-BKqm.js";import{e as E,b as k}from"./vendor-DBTT3jXp.js";import{f as T,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as L,P as M,N as A,L as P}from"./PageHeader-D5AT-Mxc.js";import{u as R,c as B,C as i}from"./types-Rt2vyU68.js";import{E as D}from"./EntrySearchInput-_mfQ0GTh.js";import{T as o,b as S}from"./DataTable-DBtrADsk.js";import"./search-BZHB1sYK.js";function K(){const n=E(),{clearAll:d,serverFilters:c,headerFilters:g,hasFilters:m}=R("logs"),{entries:x,loading:h,refreshing:s,newEntriesCount:p,hasMore:u,loadMore:f,loadNew:y,autoRefreshEnabled:j,live:v,setAutoRefresh:C,meta:a,isHighlighted:N}=L({type:"log",limit:50,filters:c}),r=x.filter(e=>B(e)),b=k.useMemo(()=>[{key:"level",header:"Level",width:"100px",render:e=>t.jsx(i,{listType:"logs",filterType:"levels",children:e.payload.level})},{key:"message",header:"Message",minWidth:"300px",render:e=>t.jsx(o,{truncate:!0,maxWidth:"500px",children:e.payload.message.length>100?e.payload.message.substring(0,100)+"...":e.payload.message})},{key:"context",header:"Context",width:"150px",render:e=>e.payload.context?t.jsx(i,{listType:"logs",filterType:"contexts",className:"font-mono",children:e.payload.context}):t.jsx(o,{secondary:!0,children:"—"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:T(F(e.createdAt),{addSuffix:!0})})}],[]);if(h&&r.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const w=m?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(M,{title:"Logs",icon:l,iconColor:"text-green-600 dark:text-green-400",count:r.length,totalCount:a==null?void 0:a.total,refreshing:s,autoRefreshEnabled:j,live:v,onAutoRefreshToggle:C,filters:g,onClearAllFilters:d}),t.jsxs("div",{className:`${w} space-y-4 transition-all duration-200`,children:[t.jsx(D,{placeholder:"Search by message, level, context, tag, or content..."}),t.jsx(A,{count:p,onClick:y,loading:s}),t.jsx(S,{columns:b,data:r,keyExtractor:e=>e.id,onRowClick:e=>n(`/logs/${e.id}`),rowClassName:e=>N(e.id)?"highlight-new":"",emptyMessage:"No logs recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(P,{hasMore:u,onClick:f,loading:s})]})]})}export{K as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{c as Un,j as i,M as Ht,C as Fn}from"./index-DSn-BKqm.js";import{C as zn,B as Hn}from"./types-Rt2vyU68.js";import{p as Gt,f as Gn}from"./badgeColors-DQ_P_DOX.js";import{D as B,f as Bn}from"./DetailRow-C0vUMqsn.js";import{T as Wn}from"./EntryDetailPage-CIQyW46e.js";import{C as be}from"./CopyButton-CVcLaHry.js";import{C as $n}from"./circle-x-CBdlQncP.js";import{C as Yn}from"./circle-check-big-pHbbgVmy.js";import{U as Xn}from"./users-CgFaJMH4.js";import{C as Vn}from"./circle-alert-BoSdc5v7.js";import"./vendor-DBTT3jXp.js";import"./search-BZHB1sYK.js";/**
|
|
2
|
+
* @license lucide-react v0.468.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const qn=Un("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/*! @license DOMPurify 3.4.13 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.13/LICENSE */function Bt(n,r){(r==null||r>n.length)&&(r=n.length);for(var s=0,c=Array(r);s<r;s++)c[s]=n[s];return c}function Kn(n){if(Array.isArray(n))return n}function Zn(n,r){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var c,f,d,g,W=[],R=!0,G=!1;try{if(d=(s=s.call(n)).next,r!==0)for(;!(R=(c=d.call(s)).done)&&(W.push(c.value),W.length!==r);R=!0);}catch($){G=!0,f=$}finally{try{if(!R&&s.return!=null&&(g=s.return(),Object(g)!==g))return}finally{if(G)throw f}}return W}}function Jn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
7
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qn(n,r){return Kn(n)||Zn(n,r)||er(n,r)||Jn()}function er(n,r){if(n){if(typeof n=="string")return Bt(n,r);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Bt(n,r):void 0}}const sn=Object.entries,Wt=Object.setPrototypeOf,tr=Object.isFrozen,nr=Object.getPrototypeOf,rr=Object.getOwnPropertyDescriptor;let O=Object.freeze,D=Object.seal,de=Object.create,an=typeof Reflect<"u"&&Reflect,ft=an.apply,mt=an.construct;O||(O=function(r){return r});D||(D=function(r){return r});ft||(ft=function(r,s){for(var c=arguments.length,f=new Array(c>2?c-2:0),d=2;d<c;d++)f[d-2]=arguments[d];return r.apply(s,f)});mt||(mt=function(r){for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return new r(...c)});const me=A(Array.prototype.forEach),or=A(Array.prototype.lastIndexOf),$t=A(Array.prototype.pop),pe=A(Array.prototype.push),sr=A(Array.prototype.splice),Z=Array.isArray,Ae=A(String.prototype.toLowerCase),ot=A(String.prototype.toString),Yt=A(String.prototype.match),ye=A(String.prototype.replace),Xt=A(String.prototype.indexOf),ar=A(String.prototype.trim),ir=A(Number.prototype.toString),lr=A(Boolean.prototype.toString),Vt=typeof BigInt>"u"?null:A(BigInt.prototype.toString),qt=typeof Symbol>"u"?null:A(Symbol.prototype.toString),w=A(Object.prototype.hasOwnProperty),Ee=A(Object.prototype.toString),N=A(RegExp.prototype.test),re=cr(TypeError);function A(n){return function(r){r instanceof RegExp&&(r.lastIndex=0);for(var s=arguments.length,c=new Array(s>1?s-1:0),f=1;f<s;f++)c[f-1]=arguments[f];return ft(n,r,c)}}function cr(n){return function(){for(var r=arguments.length,s=new Array(r),c=0;c<r;c++)s[c]=arguments[c];return mt(n,s)}}function p(n,r){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Ae;if(Wt&&Wt(n,null),!Z(r))return n;let c=r.length;for(;c--;){let f=r[c];if(typeof f=="string"){const d=s(f);d!==f&&(tr(r)||(r[c]=d),f=d)}n[f]=!0}return n}function ur(n){for(let r=0;r<n.length;r++)w(n,r)||(n[r]=null);return n}function C(n){const r=de(null);for(const c of sn(n)){var s=Qn(c,2);const f=s[0],d=s[1];w(n,f)&&(Z(d)?r[f]=ur(d):d&&typeof d=="object"&&d.constructor===Object?r[f]=C(d):r[f]=d)}return r}function fr(n){switch(typeof n){case"string":return n;case"number":return ir(n);case"boolean":return lr(n);case"bigint":return Vt?Vt(n):"0";case"symbol":return qt?qt(n):"Symbol()";case"undefined":return Ee(n);case"function":case"object":{if(n===null)return Ee(n);const r=n,s=j(r,"toString");if(typeof s=="function"){const c=s(r);return typeof c=="string"?c:Ee(c)}return Ee(n)}default:return Ee(n)}}function j(n,r){for(;n!==null;){const c=rr(n,r);if(c){if(c.get)return A(c.get);if(typeof c.value=="function")return A(c.value)}n=nr(n)}function s(){return null}return s}function mr(n){try{return N(n,""),!0}catch{return!1}}const Kt=O(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),st=O(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),at=O(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pr=O(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),it=O(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),dr=O(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Zt=O(["#text"]),Jt=O(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),lt=O(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Qt=O(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),je=O(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),hr=D(/{{[\w\W]*|^[\w\W]*}}/g),gr=D(/<%[\w\W]*|^[\w\W]*%>/g),Tr=D(/\${[\w\W]*/g),_r=D(/^data-[\-\w.\u00B7-\uFFFF]+$/),xr=D(/^aria-[\-\w]+$/),en=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),br=D(/^(?:\w+script|data):/i),yr=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Er=D(/^html$/i),Ar=D(/^[a-z][.\w]*(-[.\w]+)+$/i),tn=D(/<[/\w!]/g),nn=D(/<[/\w]/g),Sr=D(/<\/no(script|embed|frames)/i),Nr=D(/\/>/i),P={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},wr=function(){return typeof window>"u"?null:window},Rr=function(r,s){if(typeof r!="object"||typeof r.createPolicy!="function")return null;let c=null;const f="data-tt-policy-suffix";s&&s.hasAttribute(f)&&(c=s.getAttribute(f));const d="dompurify"+(c?"#"+c:"");try{return r.createPolicy(d,{createHTML(g){return g},createScriptURL(g){return g}})}catch{return console.warn("TrustedTypes policy "+d+" could not be created."),null}},rn=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},K=function(r,s,c,f){return w(r,s)&&Z(r[s])?p(f.base?C(f.base):{},r[s],f.transform):c};function ln(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wr();const r=a=>ln(a);if(r.version="3.4.13",r.removed=[],!n||!n.document||n.document.nodeType!==P.document||!n.Element)return r.isSupported=!1,r;let s=n.document;const c=s,f=c.currentScript;n.DocumentFragment;const d=n.HTMLTemplateElement,g=n.Node,W=n.Element,R=n.NodeFilter,G=n.NamedNodeMap;G===void 0&&(n.NamedNodeMap||n.MozNamedAttrMap),n.HTMLFormElement;const $=n.DOMParser,oe=n.trustedTypes,S=W.prototype,J=j(S,"cloneNode"),Ue=j(S,"remove"),cn=j(S,"nextSibling"),se=j(S,"childNodes"),Q=j(S,"parentNode"),pt=j(S,"shadowRoot"),Fe=j(S,"attributes"),I=g&&g.prototype?j(g.prototype,"nodeType"):null,U=g&&g.prototype?j(g.prototype,"nodeName"):null,Se=g&&g.prototype?j(g.prototype,"ownerDocument"):null;if(typeof d=="function"){const a=s.createElement("template");a.content&&a.content.ownerDocument&&(s=a.content.ownerDocument)}let M,ee="",ze,dt=!1,he=0;const ht=function(){if(he>0)throw re('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},ae=function(e){ht(),he++;try{return M.createHTML(e)}finally{he--}},un=function(e){ht(),he++;try{return M.createScriptURL(e)}finally{he--}},fn=function(){return dt||(ze=Rr(oe,f),dt=!0),ze},Ne=s,He=Ne.implementation,gt=Ne.createNodeIterator,mn=Ne.createDocumentFragment,pn=Ne.getElementsByTagName,dn=c.importNode;let T=rn();r.isSupported=typeof sn=="function"&&typeof Q=="function"&&He&&He.createHTMLDocument!==void 0;const hn=hr,gn=gr,Tn=Tr,_n=_r,xn=xr,bn=br,Tt=yr,yn=Ar;let _t=en,_=null;const Ge=p({},[...Kt,...st,...at,...it,...Zt]);let x=null;const Be=p({},[...Jt,...lt,...Qt,...je]);let E=Object.seal(de(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ge=null,xt=null;const Y=Object.seal(de(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let bt=!0,We=!0,yt=!1,Et=!0,X=!1,V=!0,te=!1,$e=!1,we=null,Re=null,Ye=!1,ie=!1,Oe=!1,De=!1,At=!0,St=!1;const Nt="user-content-";let Xe=!0,Ce=!1,le={},F=null;const Ve=p({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let wt=null;const Rt=p({},["audio","video","img","source","image","track"]);let qe=null;const Ot=p({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ie="http://www.w3.org/1998/Math/MathML",Le="http://www.w3.org/2000/svg",z="http://www.w3.org/1999/xhtml";let ce=z,Ke=!1,Ze=null;const En=p({},[Ie,Le,z],ot),Dt=O(["mi","mo","mn","ms","mtext"]);let Je=p({},Dt);const Ct=O(["annotation-xml"]);let Qe=p({},Ct);const An=p({},["title","style","font","a","script"]);let Te=null;const Sn=["application/xhtml+xml","text/html"],Nn="text/html";let b=null,ue=null;const wn=s.createElement("form"),It=function(e){return e instanceof RegExp||e instanceof Function},et=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ue&&ue===e)return;(!e||typeof e!="object")&&(e={}),e=C(e),Te=Sn.indexOf(e.PARSER_MEDIA_TYPE)===-1?Nn:e.PARSER_MEDIA_TYPE,b=Te==="application/xhtml+xml"?ot:Ae,_=K(e,"ALLOWED_TAGS",Ge,{transform:b}),x=K(e,"ALLOWED_ATTR",Be,{transform:b}),Ze=K(e,"ALLOWED_NAMESPACES",En,{transform:ot}),qe=K(e,"ADD_URI_SAFE_ATTR",Ot,{transform:b,base:Ot}),wt=K(e,"ADD_DATA_URI_TAGS",Rt,{transform:b,base:Rt}),F=K(e,"FORBID_CONTENTS",Ve,{transform:b}),ge=K(e,"FORBID_TAGS",C({}),{transform:b}),xt=K(e,"FORBID_ATTR",C({}),{transform:b}),le=w(e,"USE_PROFILES")?e.USE_PROFILES&&typeof e.USE_PROFILES=="object"?C(e.USE_PROFILES):e.USE_PROFILES:!1,bt=e.ALLOW_ARIA_ATTR!==!1,We=e.ALLOW_DATA_ATTR!==!1,yt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,X=e.SAFE_FOR_TEMPLATES||!1,V=e.SAFE_FOR_XML!==!1,te=e.WHOLE_DOCUMENT||!1,ie=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,De=e.RETURN_TRUSTED_TYPE||!1,Ye=e.FORCE_BODY||!1,At=e.SANITIZE_DOM!==!1,St=e.SANITIZE_NAMED_PROPS||!1,Xe=e.KEEP_CONTENT!==!1,Ce=e.IN_PLACE||!1,_t=mr(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:en,ce=typeof e.NAMESPACE=="string"?e.NAMESPACE:z,Je=w(e,"MATHML_TEXT_INTEGRATION_POINTS")&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS=="object"?C(e.MATHML_TEXT_INTEGRATION_POINTS):p({},Dt),Qe=w(e,"HTML_INTEGRATION_POINTS")&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS=="object"?C(e.HTML_INTEGRATION_POINTS):p({},Ct);const t=w(e,"CUSTOM_ELEMENT_HANDLING")&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING=="object"?C(e.CUSTOM_ELEMENT_HANDLING):de(null);if(E=de(null),w(t,"tagNameCheck")&&It(t.tagNameCheck)&&(E.tagNameCheck=t.tagNameCheck),w(t,"attributeNameCheck")&&It(t.attributeNameCheck)&&(E.attributeNameCheck=t.attributeNameCheck),w(t,"allowCustomizedBuiltInElements")&&typeof t.allowCustomizedBuiltInElements=="boolean"&&(E.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),D(E),X&&(We=!1),Oe&&(ie=!0),le&&(_=p({},Zt),x=de(null),le.html===!0&&(p(_,Kt),p(x,Jt)),le.svg===!0&&(p(_,st),p(x,lt),p(x,je)),le.svgFilters===!0&&(p(_,at),p(x,lt),p(x,je)),le.mathMl===!0&&(p(_,it),p(x,Qt),p(x,je))),Y.tagCheck=null,Y.attributeCheck=null,w(e,"ADD_TAGS")&&(typeof e.ADD_TAGS=="function"?Y.tagCheck=e.ADD_TAGS:Z(e.ADD_TAGS)&&(_===Ge&&(_=C(_)),p(_,e.ADD_TAGS,b))),w(e,"ADD_ATTR")&&(typeof e.ADD_ATTR=="function"?Y.attributeCheck=e.ADD_ATTR:Z(e.ADD_ATTR)&&(x===Be&&(x=C(x)),p(x,e.ADD_ATTR,b))),w(e,"ADD_URI_SAFE_ATTR")&&Z(e.ADD_URI_SAFE_ATTR)&&p(qe,e.ADD_URI_SAFE_ATTR,b),w(e,"FORBID_CONTENTS")&&Z(e.FORBID_CONTENTS)&&(F===Ve&&(F=C(F)),p(F,e.FORBID_CONTENTS,b)),w(e,"ADD_FORBID_CONTENTS")&&Z(e.ADD_FORBID_CONTENTS)&&(F===Ve&&(F=C(F)),p(F,e.ADD_FORBID_CONTENTS,b)),Xe&&(_["#text"]=!0),te&&p(_,["html","head","body"]),_.table&&(p(_,["tbody"]),delete ge.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw re('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw re('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const o=M;M=e.TRUSTED_TYPES_POLICY;try{ee=ae("")}catch(l){throw M=o,l}}else e.TRUSTED_TYPES_POLICY===null?(M=void 0,ee=""):(M===void 0&&(M=fn()),M&&typeof ee=="string"&&(ee=ae("")));O&&O(e),ue=e},Lt=p({},[...st,...at,...pr]),Mt=p({},[...it,...dr]),Rn=function(e,t,o){return t.namespaceURI===z?e==="svg":t.namespaceURI===Ie?e==="svg"&&(o==="annotation-xml"||Je[o]):!!Lt[e]},On=function(e,t,o){return t.namespaceURI===z?e==="math":t.namespaceURI===Le?e==="math"&&Qe[o]:!!Mt[e]},Dn=function(e,t,o){return t.namespaceURI===Le&&!Qe[o]||t.namespaceURI===Ie&&!Je[o]?!1:!Mt[e]&&(An[e]||!Lt[e])},Cn=function(e){let t=Q(e);(!t||!t.tagName)&&(t={namespaceURI:ce,tagName:"template"});const o=Ae(e.tagName),l=Ae(t.tagName);return Ze[e.namespaceURI]?e.namespaceURI===Le?Rn(o,t,l):e.namespaceURI===Ie?On(o,t,l):e.namespaceURI===z?Dn(o,t,l):!!(Te==="application/xhtml+xml"&&Ze[e.namespaceURI]):!1},q=function(e){pe(r.removed,{element:e});try{Q(e).removeChild(e)}catch{if(Ue(e),!Q(e))throw re("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Me=function(e){_e(e);const t=se(e);if(t){const l=[];me(t,u=>{pe(l,u)}),me(l,u=>{try{Ue(u)}catch{}})}const o=Fe(e);if(o)for(let l=o.length-1;l>=0;--l){const u=o[l],m=u&&u.name;if(typeof m=="string")try{e.removeAttribute(m)}catch{}}},ne=function(e,t){try{pe(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch{pe(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(ie||Oe)try{q(t)}catch{}else try{t.setAttribute(e,"")}catch{}},In=function(e){const t=Fe(e);if(t)for(let o=t.length-1;o>=0;--o){const l=t[o],u=l&&l.name;if(!(typeof u!="string"||x[b(u)]))try{e.removeAttribute(u)}catch{}}},_e=function(e){const t=[e];for(;t.length>0;){const o=t.pop();(I?I(o):o.nodeType)===P.element&&In(o);const u=se(o);if(u)for(let m=u.length-1;m>=0;--m)t.push(u[m])}},Ln=function(e){if(!V)return;const t=[e];for(;t.length>0;){const o=t.pop(),l=I?I(o):o.nodeType;if(l===P.processingInstruction||l===P.comment&&N(nn,o.data)){try{Ue(o)}catch{}continue}if(l===P.element){const m=o,h=b(U?U(o):o.nodeName);try{m.hasAttribute&&m.hasAttribute("patchsrc")&&m.removeAttribute("patchsrc"),m.hasAttribute&&m.hasAttribute("for")&&h!=="label"&&h!=="output"&&m.removeAttribute("for")}catch{}}const u=se(o);if(u)for(let m=u.length-1;m>=0;--m)t.push(u[m])}},kt=function(e){let t=null,o=null;if(Ye)e="<remove></remove>"+e;else{const m=Yt(e,/^[\r\n\t ]+/);o=m&&m[0]}Te==="application/xhtml+xml"&&ce===z&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const l=M?ae(e):e;if(ce===z)try{t=new $().parseFromString(l,Te)}catch{}if(!t||!t.documentElement){t=He.createDocument(ce,"template",null);try{t.documentElement.innerHTML=Ke?ee:l}catch{}}const u=t.body||t.documentElement;return e&&o&&u.insertBefore(s.createTextNode(o),u.childNodes[0]||null),ce===z?pn.call(t,te?"html":"body")[0]:te?t.documentElement:u},vt=function(e){const t=Se?Se(e):e.ownerDocument;return gt.call(t||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},ke=function(e){return e=ye(e,hn," "),e=ye(e,gn," "),e=ye(e,Tn," "),e},tt=function(e){var t;e.normalize();const o=Se?Se(e):e.ownerDocument,l=gt.call(o||e,e,R.SHOW_TEXT|R.SHOW_COMMENT|R.SHOW_CDATA_SECTION|R.SHOW_PROCESSING_INSTRUCTION,null);let u=l.nextNode();for(;u;)u.data=ke(u.data),u=l.nextNode();const m=(t=e.querySelectorAll)===null||t===void 0?void 0:t.call(e,"template");m&&me(m,h=>{fe(h.content)&&tt(h.content)})},ve=function(e){const t=U?U(e):null;return typeof t!="string"||b(t)!=="form"?!1:typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||e.attributes!==Fe(e)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function"||e.nodeType!==I(e)||e.childNodes!==se(e)},fe=function(e){if(!I||typeof e!="object"||e===null)return!1;try{return I(e)===P.documentFragment}catch{return!1}},xe=function(e){if(!I||typeof e!="object"||e===null)return!1;try{return typeof I(e)=="number"}catch{return!1}};function H(a,e,t){a.length!==0&&me(a,o=>{o.call(r,e,t,ue)})}const Mn=function(e,t){return!!(V&&e.hasChildNodes()&&!xe(e.firstElementChild)&&N(tn,e.textContent)&&N(tn,e.innerHTML)||V&&e.namespaceURI===z&&t==="style"&&xe(e.firstElementChild)||e.nodeType===P.processingInstruction||V&&e.nodeType===P.comment&&N(nn,e.data))},kn=function(e,t,o){if(!ge[t]&&Ft(t)&&(E.tagNameCheck instanceof RegExp&&N(E.tagNameCheck,t)||E.tagNameCheck instanceof Function&&E.tagNameCheck(t)))return!1;if(Xe&&!F[t]){const l=Q(e),u=se(e);if(u&&l){const m=u.length;for(let h=m-1;h>=0;--h){const y=e===o?J(u[h],!0):u[h];l.insertBefore(y,cn(e))}}}return q(e),!0},Pt=function(e,t,o,l){return e.length===0?t:t===o||t===l?C(t):t},jt=function(e,t){if(H(T.beforeSanitizeElements,e,null),e!==t&&Q(e)===null)return Ce&&_e(e),!0;if(ve(e))return q(e),!0;const o=b(U?U(e):e.nodeName);if(_=Pt(T.uponSanitizeElement,_,Ge,we),H(T.uponSanitizeElement,e,{tagName:o,allowedTags:_}),e!==t&&Q(e)===null)return Ce&&_e(e),!0;if(Mn(e,o))return q(e),!0;if(ge[o]||!(Y.tagCheck instanceof Function&&Y.tagCheck(o))&&!_[o]){const u=kn(e,o,t);return u===!1&&H(T.afterSanitizeElements,e,null),u}if((I?I(e):e.nodeType)===P.element&&!Cn(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&N(Sr,e.innerHTML))return q(e),!0;if(X&&e.nodeType===P.text){const u=ke(e.textContent);e.textContent!==u&&(pe(r.removed,{element:e.cloneNode()}),e.textContent=u)}return H(T.afterSanitizeElements,e,null),!1},Ut=function(e,t,o){if(xt[t]||V&&t==="patchsrc"||V&&t==="for"&&e!=="label"&&e!=="output"||At&&(t==="id"||t==="name")&&(o in s||o in wn))return!1;const l=x[t]||Y.attributeCheck instanceof Function&&Y.attributeCheck(t,e);if(!(We&&N(_n,t))){if(!(bt&&N(xn,t))){if(l){if(!qe[t]){if(!N(_t,ye(o,Tt,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&Xt(o,"data:")===0&&wt[e])){if(!(yt&&!N(bn,ye(o,Tt,"")))){if(o)return!1}}}}}else if(!(Ft(e)&&(E.tagNameCheck instanceof RegExp&&N(E.tagNameCheck,e)||E.tagNameCheck instanceof Function&&E.tagNameCheck(e))&&(E.attributeNameCheck instanceof RegExp&&N(E.attributeNameCheck,t)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(t,e))||t==="is"&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&N(E.tagNameCheck,o)||E.tagNameCheck instanceof Function&&E.tagNameCheck(o))))return!1}}return!0},vn=p({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ft=function(e){return!vn[Ae(e)]&&N(yn,e)},Pn=function(e,t,o,l){if(M&&typeof oe=="object"&&typeof oe.getAttributeType=="function"&&!o)switch(oe.getAttributeType(e,t)){case"TrustedHTML":return ae(l);case"TrustedScriptURL":return un(l)}return l},jn=function(e,t,o,l){try{o?e.setAttributeNS(o,t,l):e.setAttribute(t,l),ve(e)?q(e):$t(r.removed)}catch{ne(t,e)}},zt=function(e){H(T.beforeSanitizeAttributes,e,null);const t=e.attributes;if(!t||ve(e))return;x=Pt(T.uponSanitizeAttribute,x,Be,Re);const o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:x,forceKeepAttr:void 0};let l=t.length;const u=b(e.nodeName);for(;l--;){const m=t[l],h=m.name,y=m.namespaceURI,k=m.value,v=b(h),rt=k;let L=h==="value"?rt:ar(rt);if(o.attrName=v,o.attrValue=L,o.keepAttr=!0,o.forceKeepAttr=void 0,H(T.uponSanitizeAttribute,e,o),L=o.attrValue,St&&(v==="id"||v==="name")&&Xt(L,Nt)!==0&&(ne(h,e),L=Nt+L),V&&N(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,L)){ne(h,e);continue}if(v==="attributename"&&Yt(L,"href")){ne(h,e);continue}if(!o.forceKeepAttr){if(!o.keepAttr){ne(h,e);continue}if(!Et&&N(Nr,L)){ne(h,e);continue}if(X&&(L=ke(L)),!Ut(u,v,L)){ne(h,e);continue}L=Pn(u,v,y,L),L!==rt&&jn(e,h,y,L)}}H(T.afterSanitizeAttributes,e,null)},Pe=function(e){let t=null;const o=vt(e);for(H(T.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)if(H(T.uponSanitizeShadowNode,t,null),jt(t,e),zt(t),fe(t.content)&&Pe(t.content),(I?I(t):t.nodeType)===P.element){const u=pt(t);fe(u)&&(nt(u),Pe(u))}H(T.afterSanitizeShadowDOM,e,null)},nt=function(e){const t=[{node:e,shadow:null}];for(;t.length>0;){const o=t.pop();if(o.shadow){Pe(o.shadow);continue}const l=o.node,m=(I?I(l):l.nodeType)===P.element,h=se(l);if(h)for(let y=h.length-1;y>=0;--y)t.push({node:h[y],shadow:null});if(m){const y=U?U(l):null;if(typeof y=="string"&&b(y)==="template"){const k=l.content;fe(k)&&t.push({node:k,shadow:null})}}if(m){const y=pt(l);fe(y)&&t.push({node:null,shadow:y},{node:y,shadow:null})}}};return r.sanitize=function(a){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,l=null,u=null;if(Ke=!a,Ke&&(a="<!-->"),typeof a!="string"&&!xe(a)&&(a=fr(a),typeof a!="string"))throw re("dirty is not a string, aborting");if(!r.isSupported)return a;$e?(_=we,x=Re):et(e),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(_=C(_)),T.uponSanitizeAttribute.length>0&&(x=C(x)),r.removed=[];const m=Ce&&typeof a!="string"&&xe(a);if(m){Ln(a);const k=U?U(a):a.nodeName;if(typeof k=="string"){const v=b(k);if(!_[v]||ge[v])throw Me(a),re("root node is forbidden and cannot be sanitized in-place")}if(ve(a))throw Me(a),re("root node is clobbered and cannot be sanitized in-place");try{nt(a)}catch(v){throw Me(a),v}}else if(xe(a))t=kt("<!---->"),o=t.ownerDocument.importNode(a,!0),o.nodeType===P.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o),nt(o);else{if(!ie&&!X&&!te&&a.indexOf("<")===-1)return M&&De?ae(a):a;if(t=kt(a),!t)return ie?null:De?ee:""}t&&Ye&&q(t.firstChild);const h=m?a:t;try{const k=vt(h);for(;l=k.nextNode();)jt(l,h),zt(l),fe(l.content)&&Pe(l.content)}catch(k){throw m&&(Me(a),me(r.removed,v=>{v.element&&_e(v.element)})),k}if(m)return me(r.removed,k=>{k.element&&_e(k.element)}),X&&tt(a),a;if(ie){if(X&&tt(t),Oe)for(u=mn.call(t.ownerDocument);t.firstChild;)u.appendChild(t.firstChild);else u=t;return(x.shadowroot||x.shadowrootmode)&&(u=dn.call(c,u,!0)),u}let y=te?t.outerHTML:t.innerHTML;return te&&_["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&N(Er,t.ownerDocument.doctype.name)&&(y="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
|
|
8
|
+
`+y),X&&(y=ke(y)),M&&De?ae(y):y},r.setConfig=function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};et(a),$e=!0,we=_,Re=x},r.clearConfig=function(){ue=null,$e=!1,we=null,Re=null,M=ze,ee=""},r.isValidAttribute=function(a,e,t){ue||et({});const o=b(a),l=b(e);return Ut(o,l,t)},r.addHook=function(a,e){typeof e=="function"&&w(T,a)&&pe(T[a],e)},r.removeHook=function(a,e){if(w(T,a)){if(e!==void 0){const t=or(T[a],e);return t===-1?void 0:sr(T[a],t,1)[0]}return $t(T[a])}},r.removeHooks=function(a){w(T,a)&&(T[a]=[])},r.removeAllHooks=function(){T=rn()},r}var Or=ln();function ct(n){return Array.isArray(n)?n.join(", "):n}function Dr(n){return/[^\x00-\x7F]/.test(n)?`=?UTF-8?B?${btoa(unescape(encodeURIComponent(n)))}?=`:n}function Cr(){const n=Date.now(),r=Math.random().toString(36).substring(2,15);return`<${n}.${r}@nestlens.local>`}function Ir(n,r){const s=[],c=`----=_Part_${Date.now()}_${Math.random().toString(36).substring(2)}`,f=n.html&&n.text;return n.from&&s.push(`From: ${n.from}`),s.push(`To: ${ct(n.to)}`),n.cc&&s.push(`Cc: ${ct(n.cc)}`),n.bcc&&s.push(`Bcc: ${ct(n.bcc)}`),s.push(`Subject: ${Dr(n.subject)}`),s.push(`Date: ${new Date(r).toUTCString()}`),s.push(`Message-ID: ${Cr()}`),s.push("MIME-Version: 1.0"),s.push("X-NestLens-Status: "+n.status),n.duration&&s.push("X-NestLens-Duration: "+n.duration+"ms"),f?(s.push(`Content-Type: multipart/alternative; boundary="${c}"`),s.push(""),s.push(`--${c}`),s.push("Content-Type: text/plain; charset=utf-8"),s.push("Content-Transfer-Encoding: 8bit"),s.push(""),s.push(n.text||""),s.push(""),s.push(`--${c}`),s.push("Content-Type: text/html; charset=utf-8"),s.push("Content-Transfer-Encoding: 8bit"),s.push(""),s.push(n.html||""),s.push(""),s.push(`--${c}--`)):n.html?(s.push("Content-Type: text/html; charset=utf-8"),s.push("Content-Transfer-Encoding: 8bit"),s.push(""),s.push(n.html)):(s.push("Content-Type: text/plain; charset=utf-8"),s.push("Content-Transfer-Encoding: 8bit"),s.push(""),s.push(n.text||"")),s.join(`\r
|
|
9
|
+
`)}function Lr(n,r,s){const c=Ir(n,r),f=new Blob([c],{type:"message/rfc822"}),d=URL.createObjectURL(f),g=document.createElement("a");g.href=d,g.download=`mail-${n.subject.substring(0,30).replace(/[^a-zA-Z0-9]/g,"_")}.eml`,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(d)}const on={sent:{icon:Yn,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30",label:"SENT"},failed:{icon:$n,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30",label:"FAILED"}};function ut(n){return Array.isArray(n)?n:[n]}const Mr=["sent","failed"];function Yr({entry:n}){const{payload:r,createdAt:s,tags:c}=n,f=(c??[]).filter(S=>!Mr.includes(S.toLowerCase())),d=on[r.status]||on.sent,g=d.icon,W=ut(r.to),R=r.cc?ut(r.cc):[],G=r.bcc?ut(r.bcc):[],$=[];r.html&&$.push({id:"html",label:"HTML Preview",content:i.jsx("div",{className:"p-4",children:i.jsx("div",{className:"mail-preview bg-white text-gray-900 border border-gray-200 dark:border-gray-600 rounded-lg p-4 max-h-[500px] overflow-auto shadow-sm",dangerouslySetInnerHTML:{__html:Or.sanitize(r.html)}})})}),r.text&&$.push({id:"text",label:"Plain Text",content:i.jsx("div",{className:"p-4",children:i.jsx("pre",{className:"bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 text-sm text-gray-900 dark:text-white whitespace-pre-wrap font-mono max-h-[500px] overflow-auto",children:r.text})})});const oe=r.html?"html":"text";return i.jsxs("div",{className:"space-y-6",children:[i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsxs("div",{className:"flex items-center space-x-3",children:[i.jsx("div",{className:`p-2 ${d.bg} rounded-lg`,children:i.jsx(Ht,{className:`h-5 w-5 ${d.color}`})}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white truncate",children:r.subject}),i.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Mail Details"})]})]}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(be,{text:r.subject,label:"Copy subject"}),i.jsx("button",{onClick:()=>Lr(r,s),className:"p-2 text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",title:"Download as .eml file",children:i.jsx(qn,{className:"h-4 w-4"})})]})]})}),i.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 divide-x divide-gray-200 dark:divide-gray-700",children:[i.jsxs("div",{className:"p-4",children:[i.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[i.jsx(g,{className:"h-4 w-4"}),i.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Status"})]}),i.jsx("p",{className:`text-lg font-bold ${r.status==="sent"?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"}`,children:d.label})]}),i.jsxs("div",{className:"p-4",children:[i.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[i.jsx(Fn,{className:"h-4 w-4"}),i.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),i.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[r.duration,i.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),i.jsxs("div",{className:"p-4",children:[i.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[i.jsx(Xn,{className:"h-4 w-4"}),i.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Recipients"})]}),i.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:W.length+R.length+G.length})]}),i.jsxs("div",{className:"p-4",children:[i.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[i.jsx(Ht,{className:"h-4 w-4"}),i.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Content"})]}),i.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[r.html?"HTML":"",r.html&&r.text?" + ":"",r.text?"Text":"",!r.html&&!r.text&&"-"]})]})]})]}),i.jsxs("div",{className:"card",children:[i.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:i.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),i.jsx("div",{className:"p-4",children:i.jsxs("dl",{className:"divide-y-0",children:[i.jsx(B,{label:"Time",value:i.jsxs("span",{children:[Bn(Gt(s),"MMMM do yyyy, h:mm:ss a")," ",i.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",Gn(Gt(s),{addSuffix:!0}),")"]})]})}),i.jsx(B,{label:"Subject",value:i.jsx("span",{className:"font-medium text-gray-900 dark:text-white",children:r.subject})}),r.from&&i.jsx(B,{label:"From",value:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:r.from}),i.jsx(be,{text:r.from})]})}),i.jsx(B,{label:"To",value:i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:W.map((S,J)=>i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:S}),i.jsx(be,{text:S})]},J))})}),R.length>0&&i.jsx(B,{label:"CC",value:i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:R.map((S,J)=>i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:S}),i.jsx(be,{text:S})]},J))})}),G.length>0&&i.jsx(B,{label:"BCC",value:i.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1",children:G.map((S,J)=>i.jsxs("div",{className:"flex items-center space-x-1",children:[i.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:S}),i.jsx(be,{text:S})]},J))})}),i.jsx(B,{label:"Status",value:i.jsx(zn,{listType:"mail",filterType:"statuses",filterValue:r.status,children:r.status.toUpperCase()})}),i.jsx(B,{label:"Duration",value:`${r.duration}ms`}),f.length>0&&i.jsx(B,{label:"Tags",value:i.jsx(Hn,{items:f,listType:"mail"})})]})})]}),r.error&&i.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[i.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:i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(Vn,{className:"h-5 w-5 text-red-500"}),i.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),i.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:i.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:r.error})})]}),$.length>0&&i.jsx(Wn,{tabs:$,defaultTab:oe,hashKey:"mail"})]})}export{Yr as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,M as u}from"./index-DSn-BKqm.js";import{e as D,b as c}from"./vendor-DBTT3jXp.js";import{f as F,p as P}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as L,N as S,L as W}from"./PageHeader-D5AT-Mxc.js";import{u as $,g as B,C as H}from"./types-Rt2vyU68.js";import{T as l,D as q,a as I,b as z}from"./DataTable-DBtrADsk.js";const G=["sent","failed","pending","queued","error"];function X(){const h=D(),{addFilter:o,clearAll:m,serverFilters:g,headerFilters:p,hasFilters:x}=$("mail"),{entries:f,loading:y,refreshing:r,newEntriesCount:j,hasMore:b,loadMore:k,loadNew:C,autoRefreshEnabled:w,live:T,setAutoRefresh:N,meta:s,isHighlighted:E}=R({type:"mail",limit:50,filters:g}),i=f.filter(e=>B(e)),d=c.useCallback(e=>{const a=Array.isArray(e)?e:[e];return a.length===1?a[0]:`${a[0]} +${a.length-1}`},[]),M=c.useMemo(()=>[{key:"status",header:"Status",width:"80px",render:e=>t.jsx(H,{listType:"mail",filterType:"statuses",children:e.payload.status})},{key:"subject",header:"Subject",minWidth:"250px",render:e=>t.jsx(l,{truncate:!0,maxWidth:"350px",children:e.payload.subject.length>60?e.payload.subject.substring(0,60)+"...":e.payload.subject})},{key:"to",header:"To",width:"200px",render:e=>t.jsx(l,{mono:!0,secondary:!0,truncate:!0,maxWidth:"180px",children:d(e.payload.to)})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(q,{ms:e.payload.duration||0})},{key:"tags",header:"Tags",minWidth:"150px",render:e=>{const a=(e.tags??[]).filter(n=>!G.includes(n.toLowerCase()));return t.jsx(I,{tags:a,max:3,onTagClick:(n,A)=>{A.stopPropagation(),o("tags",n)}})}},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(l,{secondary:!0,className:"text-xs",children:F(P(e.createdAt),{addSuffix:!0})})}],[o,d]);if(y&&i.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(L,{title:"Mail",icon:u,iconColor:"text-pink-600 dark:text-pink-400",count:i.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:w,live:T,onAutoRefreshToggle:N,filters:p,onClearAllFilters:m}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(S,{count:j,onClick:C,loading:r}),t.jsx(z,{columns:M,data:i,keyExtractor:e=>e.id,onRowClick:e=>h(`/mail/${e.id}`),rowClassName:e=>E(e.id)?"highlight-new":"",emptyMessage:"No emails recorded yet",emptyIcon:t.jsx(u,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(W,{hasMore:b,onClick:k,loading:r})]})]})}export{X as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,b as o,F as b,C as g,D as u}from"./index-DSn-BKqm.js";import{b as y}from"./vendor-DBTT3jXp.js";import{p as x,f}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as v}from"./DetailRow-C0vUMqsn.js";import{C as l}from"./types-Rt2vyU68.js";import{u as n,C as m,T as N}from"./EntryDetailPage-CIQyW46e.js";import{C as k}from"./CopyButton-CVcLaHry.js";import{C as w}from"./circle-x-CBdlQncP.js";import"./search-BZHB1sYK.js";function V({entry:p}){const{payload:a,createdAt:i}=p,t=n(),d=n(),[c,h]=y.useState("data"),r=[];a.data!==void 0&&r.push({id:"data",label:"Data",content:e.jsx(m,{data:a.data,toolbarState:t.state,searchBar:t.SearchBar,maxHeight:400})}),a.where!==void 0&&r.push({id:"where",label:"Where",content:e.jsx(m,{data:a.where,toolbarState:d.state,searchBar:d.SearchBar,maxHeight:400})});const j=()=>{if(c==="data"&&a.data!==void 0)return e.jsx(t.Toolbar,{data:a.data});if(c==="where"&&a.where!==void 0)return e.jsx(d.Toolbar,{data:a.where})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"p-4 border-b border-gray-200 dark:border-gray-700",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-3",children:[e.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg",children:e.jsx(o,{className:"h-5 w-5 text-purple-600 dark:text-purple-400"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white font-mono",children:a.entity}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Model Event"})]})]}),e.jsx(k,{text:a.entity,label:"Copy entity name"})]})}),e.jsxs("div",{className:`grid ${a.recordCount!==void 0?"grid-cols-2 md:grid-cols-4":"grid-cols-2 md:grid-cols-3"} divide-x divide-gray-200 dark:divide-gray-700`,children:[e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(b,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Action"})]}),e.jsx("p",{className:"text-lg font-bold text-purple-600 dark:text-purple-400",children:a.action.toUpperCase()})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(o,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Entity"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white font-mono truncate",title:a.entity,children:a.entity})]}),e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(g,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Duration"})]}),e.jsxs("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:[a.duration,e.jsx("span",{className:"text-sm font-normal text-gray-500 dark:text-gray-400",children:"ms"})]})]}),a.recordCount!==void 0&&e.jsxs("div",{className:"p-4",children:[e.jsxs("div",{className:"flex items-center space-x-2 text-gray-500 dark:text-gray-400 mb-1",children:[e.jsx(u,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Records"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:a.recordCount})]})]})]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:e.jsx("h2",{className:"text-lg font-semibold text-gray-900 dark:text-white",children:"Details"})}),e.jsx("div",{className:"p-4",children:e.jsxs("dl",{className:"divide-y-0",children:[e.jsx(s,{label:"Time",value:e.jsxs("span",{children:[v(x(i),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",f(x(i),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Action",value:e.jsx(l,{listType:"models",filterType:"actions",filterValue:a.action,children:a.action.toUpperCase()})}),e.jsx(s,{label:"Entity",value:e.jsx(l,{listType:"models",filterType:"entities",filterValue:a.entity,children:a.entity})}),a.source&&e.jsx(s,{label:"Source",value:e.jsx(l,{listType:"models",filterType:"sources",filterValue:a.source,children:a.source})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`}),a.recordCount!==void 0&&e.jsx(s,{label:"Records",value:String(a.recordCount)})]})})]}),a.error&&e.jsxs("div",{className:"card border-red-200 dark:border-red-800",children:[e.jsx("div",{className:"px-4 py-3 border-b border-red-200 dark:border-red-800 bg-red-50 dark:bg-red-900/20",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(w,{className:"h-5 w-5 text-red-500"}),e.jsx("h2",{className:"text-lg font-semibold text-red-700 dark:text-red-400",children:"Error"})]})}),e.jsx("div",{className:"p-4 bg-red-50/50 dark:bg-red-900/10",children:e.jsx("pre",{className:"text-sm text-red-600 dark:text-red-400 font-mono whitespace-pre-wrap overflow-x-auto",children:a.error})})]}),r.length>0&&e.jsx(N,{tabs:r,defaultTab:"data",hashKey:"model",headerRight:j(),onTabChange:h})]})}export{V as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,b as d}from"./index-DSn-BKqm.js";import{e as P,b as A}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as T,N as B,L}from"./PageHeader-D5AT-Mxc.js";import{u as H,l as S,C as l}from"./types-Rt2vyU68.js";import{T as o,D as $,b as I}from"./DataTable-DBtrADsk.js";function O(){const c=P(),{addFilter:r,clearAll:u,serverFilters:p,headerFilters:h,hasFilters:x}=H("models"),{entries:m,loading:g,refreshing:s,newEntriesCount:y,hasMore:f,loadMore:j,loadNew:C,autoRefreshEnabled:k,live:w,setAutoRefresh:N,meta:i,isHighlighted:b}=R({type:"model",limit:50,filters:p}),n=m.filter(e=>S(e)),E=A.useMemo(()=>[{key:"action",header:"Action",width:"120px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("actions",e.payload.action)},children:e.payload.action.toUpperCase()})},{key:"entity",header:"Entity",width:"150px",render:e=>t.jsx(l,{onClick:a=>{a.stopPropagation(),r("entities",e.payload.entity)},className:"font-mono",children:e.payload.entity})},{key:"source",header:"Source",width:"150px",render:e=>{const a=e.payload.source;return a?t.jsx(l,{onClick:M=>{M.stopPropagation(),r("sources",a)},className:"font-mono text-xs",children:a}):t.jsx(o,{secondary:!0,children:"-"})}},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx($,{ms:e.payload.duration||0})},{key:"records",header:"Records",width:"80px",align:"center",render:e=>e.payload.recordCount!==void 0?t.jsx(o,{children:e.payload.recordCount}):t.jsx(o,{secondary:!0,children:"-"})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(o,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[r]);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 v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(T,{title:"Models",icon:d,iconColor:"text-purple-600 dark:text-purple-400",count:n.length,totalCount:i==null?void 0:i.total,refreshing:s,autoRefreshEnabled:k,live:w,onAutoRefreshToggle:N,filters:h,onClearAllFilters:u}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(B,{count:y,onClick:C,loading:s}),t.jsx(I,{columns:E,data:n,keyExtractor:e=>e.id,onRowClick:e=>c(`/models/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No model events recorded yet",emptyIcon:t.jsx(d,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(L,{hasMore:f,onClick:j,loading:s})]})]})}export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,e as c,C as j}from"./index-DSn-BKqm.js";import{p as x,f as y}from"./badgeColors-DQ_P_DOX.js";import{D as s,f as b}from"./DetailRow-C0vUMqsn.js";import{C as n}from"./types-Rt2vyU68.js";import{u as N,C as f,T as u}from"./EntryDetailPage-CIQyW46e.js";import{C as v}from"./CopyButton-CVcLaHry.js";import{C as k}from"./circle-check-big-pHbbgVmy.js";import{C as o}from"./circle-x-CBdlQncP.js";import{S as w}from"./send-CqQmINCf.js";import"./vendor-DBTT3jXp.js";import"./search-BZHB1sYK.js";function I({entry:m}){const{payload:a,createdAt:l}=m,i=N(),t=a.status==="sent"?{icon:k,color:"text-green-500",bg:"bg-green-100 dark:bg-green-900/30"}:{icon:o,color:"text-red-500",bg:"bg-red-100 dark:bg-red-900/30"},p=t.icon,d=a.metadata!==void 0?[{id:"metadata",label:"Metadata",content:e.jsx(f,{data:a.metadata,toolbarState:i.state,searchBar:i.SearchBar,maxHeight:400})}]:[],r=Array.isArray(a.recipient)?a.recipient:[a.recipient];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 ${t.bg} rounded-lg`,children:e.jsx(c,{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",children:a.title||a.type}),e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Notification"})]})]}),e.jsx(v,{text:r.join(", "),label:"Copy recipient"})]})}),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(c,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Type"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white truncate",title:a.type,children:a.type})]}),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 ${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(j,{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(w,{className:"h-4 w-4"}),e.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Recipients"})]}),e.jsx("p",{className:"text-lg font-bold text-gray-900 dark:text-white",children:r.length})]})]})]}),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:[b(x(l),"MMMM do yyyy, h:mm:ss a")," ",e.jsxs("span",{className:"text-gray-500 dark:text-gray-400",children:["(",y(x(l),{addSuffix:!0}),")"]})]})}),e.jsx(s,{label:"Type",value:e.jsx(n,{listType:"notifications",filterType:"types",filterValue:a.type,children:a.type})}),e.jsx(s,{label:r.length>1?"Recipients":"Recipient",value:e.jsx("div",{className:"flex flex-wrap gap-2",children:r.map((h,g)=>e.jsx("code",{className:"text-sm font-mono text-gray-900 dark:text-white",children:h},g))})}),a.title&&e.jsx(s,{label:"Title",value:a.title}),a.message&&e.jsx(s,{label:"Message",value:e.jsx("span",{className:"text-sm text-gray-600 dark:text-gray-400",children:a.message})}),e.jsx(s,{label:"Status",value:e.jsx(n,{listType:"notifications",filterType:"statuses",filterValue:a.status,children:a.status.toUpperCase()})}),e.jsx(s,{label:"Duration",value:`${a.duration}ms`})]})})]}),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(o,{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})})]}),d.length>0&&e.jsx(u,{tabs:d,defaultTab:"metadata",hashKey:"notification",headerRight:e.jsx(i.Toolbar,{data:a.metadata})})]})}export{I as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t,e as l}from"./index-DSn-BKqm.js";import{e as T,b as P}from"./vendor-DBTT3jXp.js";import{f as D,p as F}from"./badgeColors-DQ_P_DOX.js";import{u as R,P as A,N as M,L as B}from"./PageHeader-D5AT-Mxc.js";import{u as W,m as L,C as d}from"./types-Rt2vyU68.js";import{T as a,D as H,b as S}from"./DataTable-DBtrADsk.js";function J(){const c=T(),{addFilter:i,clearAll:p,serverFilters:u,headerFilters:h,hasFilters:x}=W("notifications"),{entries:m,loading:g,refreshing:r,newEntriesCount:f,hasMore:y,loadMore:j,loadNew:C,autoRefreshEnabled:k,live:N,setAutoRefresh:w,meta:s,isHighlighted:b}=R({type:"notification",limit:50,filters:u}),o=m.filter(e=>L(e)),E=P.useMemo(()=>[{key:"type",header:"Type",width:"150px",render:e=>t.jsx(d,{onClick:n=>{n.stopPropagation(),i("types",e.payload.type)},children:e.payload.type})},{key:"recipient",header:"Recipient",minWidth:"200px",render:e=>t.jsx(a,{mono:!0,truncate:!0,maxWidth:"250px",children:e.payload.recipient})},{key:"title",header:"Title",minWidth:"200px",render:e=>e.payload.title?t.jsx(a,{truncate:!0,maxWidth:"300px",children:e.payload.title}):t.jsx(a,{secondary:!0,children:"-"})},{key:"status",header:"Status",width:"100px",render:e=>t.jsx(d,{onClick:n=>{n.stopPropagation(),i("statuses",e.payload.status)},children:e.payload.status.toUpperCase()})},{key:"duration",header:"Duration",width:"100px",align:"right",render:e=>t.jsx(H,{ms:e.payload.duration||0})},{key:"time",header:"Time",width:"170px",align:"right",render:e=>t.jsx(a,{secondary:!0,className:"text-xs",children:D(F(e.createdAt),{addSuffix:!0})})}],[i]);if(g&&o.length===0)return t.jsx("div",{className:"flex items-center justify-center h-64",role:"status","aria-label":"Loading...",children:t.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})});const v=x?"pt-28":"pt-16";return t.jsxs("div",{children:[t.jsx(A,{title:"Notifications",icon:l,iconColor:"text-indigo-600 dark:text-indigo-400",count:o.length,totalCount:s==null?void 0:s.total,refreshing:r,autoRefreshEnabled:k,live:N,onAutoRefreshToggle:w,filters:h,onClearAllFilters:p}),t.jsxs("div",{className:`${v} space-y-4 transition-all duration-200`,children:[t.jsx(M,{count:f,onClick:C,loading:r}),t.jsx(S,{columns:E,data:o,keyExtractor:e=>e.id,onRowClick:e=>c(`/notifications/${e.id}`),rowClassName:e=>b(e.id)?"highlight-new":"",emptyMessage:"No notifications recorded yet",emptyIcon:t.jsx(l,{className:"h-8 w-8 text-gray-400 dark:text-gray-500"})}),t.jsx(B,{hasMore:y,onClick:j,loading:r})]})]})}export{J as default};
|