adonisjs-server-stats 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/src/collectors/app_collector.d.ts.map +1 -1
  2. package/dist/src/collectors/app_collector.js +2 -1
  3. package/dist/src/collectors/auto_detect.d.ts.map +1 -1
  4. package/dist/src/collectors/auto_detect.js +7 -3
  5. package/dist/src/collectors/db_pool_collector.d.ts.map +1 -1
  6. package/dist/src/collectors/db_pool_collector.js +2 -1
  7. package/dist/src/collectors/http_collector.d.ts +4 -3
  8. package/dist/src/collectors/http_collector.d.ts.map +1 -1
  9. package/dist/src/collectors/http_collector.js +3 -5
  10. package/dist/src/collectors/redis_collector.d.ts.map +1 -1
  11. package/dist/src/collectors/redis_collector.js +2 -1
  12. package/dist/src/controller/debug_controller.d.ts +5 -0
  13. package/dist/src/controller/debug_controller.d.ts.map +1 -1
  14. package/dist/src/controller/debug_controller.js +24 -1
  15. package/dist/src/dashboard/chart_aggregator.d.ts.map +1 -1
  16. package/dist/src/dashboard/chart_aggregator.js +3 -2
  17. package/dist/src/dashboard/dashboard_store.d.ts.map +1 -1
  18. package/dist/src/dashboard/dashboard_store.js +47 -11
  19. package/dist/src/dashboard/migrator.d.ts +5 -0
  20. package/dist/src/dashboard/migrator.d.ts.map +1 -1
  21. package/dist/src/dashboard/migrator.js +44 -9
  22. package/dist/src/data/data_access.d.ts +4 -2
  23. package/dist/src/data/data_access.d.ts.map +1 -1
  24. package/dist/src/data/data_access.js +8 -3
  25. package/dist/src/define_config.d.ts.map +1 -1
  26. package/dist/src/define_config.js +7 -6
  27. package/dist/src/edge/client-vue/dashboard.js +1 -1
  28. package/dist/src/edge/client-vue/debug-panel-deferred.js +1 -1
  29. package/dist/src/edge/client-vue/debug-panel.js +1 -1
  30. package/dist/src/middleware/request_tracking_middleware.d.ts.map +1 -1
  31. package/dist/src/middleware/request_tracking_middleware.js +7 -0
  32. package/dist/src/provider/server_stats_provider.d.ts +9 -0
  33. package/dist/src/provider/server_stats_provider.d.ts.map +1 -1
  34. package/dist/src/provider/server_stats_provider.js +196 -59
  35. package/dist/src/utils/app_import.d.ts +23 -0
  36. package/dist/src/utils/app_import.d.ts.map +1 -0
  37. package/dist/src/utils/app_import.js +44 -0
  38. package/dist/vue/{CacheSection-CkrIB4-j.js → CacheSection-C788Yfai.js} +1 -1
  39. package/dist/vue/{ConfigSection-gulpOiq1.js → ConfigSection-CRzYxqW2.js} +1 -1
  40. package/dist/vue/{CustomPaneTab-J57ED_bh.js → CustomPaneTab-BJxT5Dp7.js} +33 -33
  41. package/dist/vue/{EmailsSection-BlKvQDx8.js → EmailsSection-C8JFMtW7.js} +1 -1
  42. package/dist/vue/{EventsSection-BdzQvIVJ.js → EventsSection-C4wXUgxG.js} +1 -1
  43. package/dist/vue/{JobsSection-DOzuMrG3.js → JobsSection-CsKWTjgN.js} +1 -1
  44. package/dist/vue/{LogsSection-CNN4y92u.js → LogsSection-BFVjSZ24.js} +12 -12
  45. package/dist/vue/{LogsTab-CJerb22r.js → LogsTab-DpEQ7euu.js} +17 -17
  46. package/dist/vue/{OverviewSection-SITNR_dA.js → OverviewSection-CbMdAido.js} +1 -1
  47. package/dist/vue/{QueriesSection-BAebAHkD.js → QueriesSection-BPiv7u3r.js} +1 -1
  48. package/dist/vue/{RequestsSection-CIR0IX39.js → RequestsSection-LtImH4rD.js} +1 -1
  49. package/dist/vue/{RoutesSection-j1U2oa0g.js → RoutesSection-CrxOxmzx.js} +1 -1
  50. package/dist/vue/{TimelineSection-Dw980UPg.js → TimelineSection-DLxMW2J_.js} +1 -1
  51. package/dist/vue/{index-COgsk_nv.js → index-qCQpBftQ.js} +2 -2
  52. package/dist/vue/index.js +1 -1
  53. package/package.json +5 -1
@@ -2,4 +2,4 @@
2
2
  `),o]);else{const a=[`[Vue warn]: ${e}`,...t];o.length&&a.push(`
3
3
  `,...si(o)),console.warn(...a)}ht(),Ln=!1}function ti(){let e=_s[_s.length-1];if(!e)return[];const t=[];for(;e;){const s=t[0];s&&s.vnode===e?s.recurseCount++:t.push({vnode:e,recurseCount:0});const l=e.component&&e.component.parent;e=l&&l.vnode}return t}function si(e){const t=[];return e.forEach((s,l)=>{t.push(...l===0?[]:[`
4
4
  `],...ni(s))}),t}function ni({vnode:e,recurseCount:t}){const s=t>0?`... (${t} recursive calls)`:"",l=e.component?e.component.parent==null:!1,o=` at <${Bo(e.component,e.type,l)}`,a=">"+s;return e.props?[o,...li(e.props),a]:[o+a]}function li(e){const t=[],s=Object.keys(e);return s.slice(0,3).forEach(l=>{t.push(...Nl(l,e[l]))}),s.length>3&&t.push(" ..."),t}function Nl(e,t,s){return Fe(t)?(t=JSON.stringify(t),s?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?s?t:[`${e}=${t}`]:je(t)?(t=Nl(e,we(t.value),!0),s?t:[`${e}=Ref<`,t,">"]):ve(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=we(t),s?t:[`${e}=`,t])}function Yt(e,t,s,l){try{return l?e(...l):e()}catch(o){Xt(o,t,s)}}function pt(e,t,s,l){if(ve(e)){const o=Yt(e,t,s,l);return o&&fl(o)&&o.catch(a=>{Xt(a,t,s)}),o}if(pe(e)){const o=[];for(let a=0;a<e.length;a++)o.push(pt(e[a],t,s,l));return o}}function Xt(e,t,s,l=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ee;if(t){let r=t.parent;const d=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${s}`;for(;r;){const v=r.ec;if(v){for(let m=0;m<v.length;m++)if(v[m](e,d,g)===!1)return}r=r.parent}if(a){ft(),Yt(a,null,10,[e,d,g]),ht();return}}oi(e,s,o,l,i)}function oi(e,t,s,l=!0,o=!1){if(o)throw e;console.error(e)}const Ve=[];let vt=-1;const Zt=[];let Rt=null,es=0;const jl=Promise.resolve();let Us=null;function Hl(e){const t=Us||jl;return e?t.then(this?e.bind(this):e):t}function ai(e){let t=vt+1,s=Ve.length;for(;t<s;){const l=t+s>>>1,o=Ve[l],a=xs(o);a<e||a===e&&o.flags&2?t=l+1:s=l}return t}function Fn(e){if(!(e.flags&1)){const t=xs(e),s=Ve[Ve.length-1];!s||!(e.flags&2)&&t>=xs(s)?Ve.push(e):Ve.splice(ai(t),0,e),e.flags|=1,Ul()}}function Ul(){Us||(Us=jl.then(Vl))}function On(e){pe(e)?Zt.push(...e):Rt&&e.id===-1?Rt.splice(es+1,0,e):e.flags&1||(Zt.push(e),e.flags|=1),Ul()}function ql(e,t,s=vt+1){for(;s<Ve.length;s++){const l=Ve[s];if(l&&l.flags&2){if(e&&l.id!==e.uid)continue;Ve.splice(s,1),s--,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function Kl(e){if(Zt.length){const t=[...new Set(Zt)].sort((s,l)=>xs(s)-xs(l));if(Zt.length=0,Rt){Rt.push(...t);return}for(Rt=t,es=0;es<Rt.length;es++){const s=Rt[es];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Rt=null,es=0}}const xs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vl(e){try{for(vt=0;vt<Ve.length;vt++){const t=Ve[vt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Yt(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;vt<Ve.length;vt++){const t=Ve[vt];t&&(t.flags&=-2)}vt=-1,Ve.length=0,Kl(),Us=null,(Ve.length||Zt.length)&&Vl()}}let ze=null,zl=null;function qs(e){const t=ze;return ze=e,zl=e&&e.type.__scopeId||null,t}function ts(e,t=ze,s){if(!t||e._n)return e;const l=(...o)=>{l._d&&Ys(-1);const a=qs(t);let i;try{i=e(...o)}finally{qs(a),l._d&&Ys(1)}return i};return l._n=!0,l._c=!0,l._d=!0,l}function Ut(e,t,s,l){const o=e.dirs,a=t&&t.dirs;for(let i=0;i<o.length;i++){const r=o[i];a&&(r.oldValue=a[i].value);let d=r.dir[l];d&&(ft(),pt(d,s,8,[e.el,r,e,t]),ht())}}function ss(e,t){if(He){let s=He.provides;const l=He.parent&&He.parent.provides;l===s&&(s=He.provides=Object.create(l)),s[e]=t}}function re(e,t,s=!1){const l=hr();if(l||ls){let o=ls?ls._context.provides:l?l.parent==null||l.ce?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&ve(t)?t.call(l&&l.proxy):t}}const ii=Symbol.for("v-scx"),ri=()=>re(ii);function gt(e,t,s){return Wl(e,t,s)}function Wl(e,t,s=Ee){const{immediate:l,deep:o,flush:a,once:i}=s,r=Ne({},s),d=t&&l||!t&&a!=="post";let g;if(us){if(a==="sync"){const _=ri();g=_.__watcherHandles||(_.__watcherHandles=[])}else if(!d){const _=()=>{};return _.stop=dt,_.resume=dt,_.pause=dt,_}}const v=He;r.call=(_,x,w)=>pt(_,v,x,w);let m=!1;a==="post"?r.scheduler=_=>{Je(_,v&&v.suspense)}:a!=="sync"&&(m=!0,r.scheduler=(_,x)=>{x?_():Fn(_)}),r.augmentJob=_=>{t&&(_.flags|=4),m&&(_.flags|=2,v&&(_.id=v.uid,_.i=v))};const p=ei(e,t,r);return us&&(g?g.push(p):d&&p()),p}function ui(e,t,s){const l=this.proxy,o=Fe(e)?e.includes(".")?Jl(l,e):()=>l[e]:e.bind(l,l);let a;ve(t)?a=t:(a=t.handler,s=t);const i=Ts(this),r=Wl(o,a.bind(l),s);return i(),r}function Jl(e,t){const s=t.split(".");return()=>{let l=e;for(let o=0;o<s.length&&l;o++)l=l[s[o]];return l}}const ci=Symbol("_vte"),di=e=>e.__isTeleport,fi=Symbol("_leaveCb");function Dn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Oe(e,t){return ve(e)?Ne({name:e.name},t,{setup:e}):e}function In(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ql(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Ks=new WeakMap;function ws(e,t,s,l,o=!1){if(pe(e)){e.forEach((w,P)=>ws(w,t&&(pe(t)?t[P]:t),s,l,o));return}if(ns(l)&&!o){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&ws(e,t,s,l.component.subTree);return}const a=l.shapeFlag&4?Xn(l.component):l.el,i=o?null:a,{i:r,r:d}=e,g=t&&t.r,v=r.refs===Ee?r.refs={}:r.refs,m=r.setupState,p=we(m),_=m===Ee?ul:w=>Ql(v,w)?!1:ke(p,w),x=(w,P)=>!(P&&Ql(v,P));if(g!=null&&g!==d){if(Gl(t),Fe(g))v[g]=null,_(g)&&(m[g]=null);else if(je(g)){const w=t;x(g,w.k)&&(g.value=null),w.k&&(v[w.k]=null)}}if(ve(d))Yt(d,r,12,[i,v]);else{const w=Fe(d),P=je(d);if(w||P){const F=()=>{if(e.f){const A=w?_(d)?m[d]:v[d]:x()||!e.k?d.value:v[e.k];if(o)pe(A)&&pn(A,a);else if(pe(A))A.includes(a)||A.push(a);else if(w)v[d]=[a],_(d)&&(m[d]=v[d]);else{const y=[a];x(d,e.k)&&(d.value=y),e.k&&(v[e.k]=y)}}else w?(v[d]=i,_(d)&&(m[d]=i)):P&&(x(d,e.k)&&(d.value=i),e.k&&(v[e.k]=i))};if(i){const A=()=>{F(),Ks.delete(e)};A.id=-1,Ks.set(e,A),Je(A,s)}else Gl(e),F()}}}function Gl(e){const t=Ks.get(e);t&&(t.flags|=8,Ks.delete(e))}const Yl=e=>e.nodeType===8;Fs().requestIdleCallback,Fs().cancelIdleCallback;function hi(e,t){if(Yl(e)&&e.data==="["){let s=1,l=e.nextSibling;for(;l;){if(l.nodeType===1){if(t(l)===!1)break}else if(Yl(l))if(l.data==="]"){if(--s===0)break}else l.data==="["&&s++;l=l.nextSibling}}else t(e)}const ns=e=>!!e.type.__asyncLoader;function lt(e){ve(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:l,delay:o=200,hydrate:a,timeout:i,suspensible:r=!0,onError:d}=e;let g=null,v,m=0;const p=()=>(m++,g=null,_()),_=()=>{let x;return g||(x=g=t().catch(w=>{if(w=w instanceof Error?w:new Error(String(w)),d)return new Promise((P,F)=>{d(w,()=>P(p()),()=>F(w),m+1)});throw w}).then(w=>x!==g&&g?g:(w&&(w.__esModule||w[Symbol.toStringTag]==="Module")&&(w=w.default),v=w,w)))};return Oe({name:"AsyncComponentWrapper",__asyncLoader:_,__asyncHydrate(x,w,P){let F=!1;(w.bu||(w.bu=[])).push(()=>F=!0);const A=()=>{F||P()},y=a?()=>{const $=a(A,T=>hi(x,T));$&&(w.bum||(w.bum=[])).push($)}:A;v?y():_().then(()=>!w.isUnmounted&&y())},get __asyncResolved(){return v},setup(){const x=He;if(In(x),v)return()=>Vs(v,x);const w=y=>{g=null,Xt(y,x,13,!l)};if(r&&x.suspense||us)return _().then(y=>()=>Vs(y,x)).catch(y=>(w(y),()=>l?me(l,{error:y}):null));const P=J(!1),F=J(),A=J(!!o);return o&&setTimeout(()=>{A.value=!1},o),i!=null&&setTimeout(()=>{if(!P.value&&!F.value){const y=new Error(`Async component timed out after ${i}ms.`);w(y),F.value=y}},i),_().then(()=>{P.value=!0,x.parent&&Bn(x.parent.vnode)&&x.parent.update()}).catch(y=>{w(y),F.value=y}),()=>{if(P.value&&v)return Vs(v,x);if(F.value&&l)return me(l,{error:F.value});if(s&&!A.value)return Vs(s,x)}}})}function Vs(e,t){const{ref:s,props:l,children:o,ce:a}=t.vnode,i=me(e,l,o);return i.ref=s,i.ce=a,delete t.vnode.ce,i}const Bn=e=>e.type.__isKeepAlive;function pi(e,t){Xl(e,"a",t)}function vi(e,t){Xl(e,"da",t)}function Xl(e,t,s=He){const l=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(zs(t,l,s),s){let o=s.parent;for(;o&&o.parent;)Bn(o.parent.vnode)&&gi(l,t,s,o),o=o.parent}}function gi(e,t,s,l){const o=zs(t,e,l,!0);Ft(()=>{pn(l[t],o)},s)}function zs(e,t,s=He,l=!1){if(s){const o=s[e]||(s[e]=[]),a=t.__weh||(t.__weh=(...i)=>{ft();const r=Ts(s),d=pt(t,s,e,i);return r(),ht(),d});return l?o.unshift(a):o.push(a),a}}const $t=e=>(t,s=He)=>{(!us||e==="sp")&&zs(e,(...l)=>t(...l),s)},yi=$t("bm"),Lt=$t("m"),mi=$t("bu"),bi=$t("u"),Zl=$t("bum"),Ft=$t("um"),_i=$t("sp"),xi=$t("rtg"),wi=$t("rtc");function $i(e,t=He){zs("ec",e,t)}const ki="components",eo=Symbol.for("v-ndc");function Si(e){return Fe(e)?Ci(ki,e,!1)||e:e||eo}function Ci(e,t,s=!0,l=!1){const o=ze||He;if(o){const a=o.type;{const r=Io(a,!1);if(r&&(r===t||r===st(t)||r===Ls(st(t))))return a}const i=to(o[e]||a[e],t)||to(o.appContext[e],t);return!i&&l?a:i}}function to(e,t){return e&&(e[t]||e[st(t)]||e[Ls(st(t))])}function ye(e,t,s,l){let o;const a=s,i=pe(e);if(i||Fe(e)){const r=i&&jt(e);let d=!1,g=!1;r&&(d=!nt(e),g=wt(e),e=Os(e)),o=new Array(e.length);for(let v=0,m=e.length;v<m;v++)o[v]=t(d?g?Gt(rt(e[v])):rt(e[v]):e[v],v,void 0,a)}else if(typeof e=="number"){o=new Array(e);for(let r=0;r<e;r++)o[r]=t(r+1,r,void 0,a)}else if(Se(e))if(e[Symbol.iterator])o=Array.from(e,(r,d)=>t(r,d,void 0,a));else{const r=Object.keys(e);o=new Array(r.length);for(let d=0,g=r.length;d<g;d++){const v=r[d];o[d]=t(e[v],v,d,a)}}else o=[];return o}function Ti(e,t,s={},l,o){if(ze.ce||ze.parent&&ns(ze.parent)&&ze.parent.ce){const g=Object.keys(s).length>0;return u(),Xe(U,null,[me("slot",s,l)],g?-2:64)}let a=e[t];a&&a._c&&(a._d=!1),u();const i=a&&so(a(s)),r=s.key||i&&i.key,d=Xe(U,{key:(r&&!at(r)?r:`_${t}`)+(!i&&l?"_fb":"")},i||[],i&&e._===1?64:-2);return d.scopeId&&(d.slotScopeIds=[d.scopeId+"-s"]),a&&a._c&&(a._d=!0),d}function so(e){return e.some(t=>is(t)?!(t.type===ut||t.type===U&&!so(t.children)):!0)?e:null}const Nn=e=>e?Oo(e)?Xn(e):Nn(e.parent):null,$s=Ne(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Nn(e.parent),$root:e=>Nn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ao(e),$forceUpdate:e=>e.f||(e.f=()=>{Fn(e.update)}),$nextTick:e=>e.n||(e.n=Hl.bind(e.proxy)),$watch:e=>ui.bind(e)}),jn=(e,t)=>e!==Ee&&!e.__isScriptSetup&&ke(e,t),Ei={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:l,data:o,props:a,accessCache:i,type:r,appContext:d}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return l[t];case 2:return o[t];case 4:return s[t];case 3:return a[t]}else{if(jn(l,t))return i[t]=1,l[t];if(o!==Ee&&ke(o,t))return i[t]=2,o[t];if(ke(a,t))return i[t]=3,a[t];if(s!==Ee&&ke(s,t))return i[t]=4,s[t];Hn&&(i[t]=0)}}const g=$s[t];let v,m;if(g)return t==="$attrs"&&Ue(e.attrs,"get",""),g(e);if((v=r.__cssModules)&&(v=v[t]))return v;if(s!==Ee&&ke(s,t))return i[t]=4,s[t];if(m=d.config.globalProperties,ke(m,t))return m[t]},set({_:e},t,s){const{data:l,setupState:o,ctx:a}=e;return jn(o,t)?(o[t]=s,!0):l!==Ee&&ke(l,t)?(l[t]=s,!0):ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:l,appContext:o,props:a,type:i}},r){let d;return!!(s[r]||e!==Ee&&r[0]!=="$"&&ke(e,r)||jn(t,r)||ke(a,r)||ke(l,r)||ke($s,r)||ke(o.config.globalProperties,r)||(d=i.__cssModules)&&d[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:ke(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function no(e){return pe(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Hn=!0;function Pi(e){const t=ao(e),s=e.proxy,l=e.ctx;Hn=!1,t.beforeCreate&&lo(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:i,watch:r,provide:d,inject:g,created:v,beforeMount:m,mounted:p,beforeUpdate:_,updated:x,activated:w,deactivated:P,beforeDestroy:F,beforeUnmount:A,destroyed:y,unmounted:$,render:T,renderTracked:Q,renderTriggered:V,errorCaptured:G,serverPrefetch:R,expose:K,inheritAttrs:se,components:be,directives:Ae,filters:Le}=t;if(g&&Mi(g,l,null),i)for(const de in i){const E=i[de];ve(E)&&(l[de]=E.bind(s))}if(o){const de=o.call(s,s);Se(de)&&(e.data=Qt(de))}if(Hn=!0,a)for(const de in a){const E=a[de],C=ve(E)?E.bind(s,s):ve(E.get)?E.get.bind(s,s):dt,S=!ve(E)&&ve(E.set)?E.set.bind(s):dt,H=q({get:C,set:S});Object.defineProperty(l,de,{enumerable:!0,configurable:!0,get:()=>H.value,set:ne=>H.value=ne})}if(r)for(const de in r)oo(r[de],l,s,de);if(d){const de=ve(d)?d.call(s):d;Reflect.ownKeys(de).forEach(E=>{ss(E,de[E])})}v&&lo(v,e,"c");function ge(de,E){pe(E)?E.forEach(C=>de(C.bind(s))):E&&de(E.bind(s))}if(ge(yi,m),ge(Lt,p),ge(mi,_),ge(bi,x),ge(pi,w),ge(vi,P),ge($i,G),ge(wi,Q),ge(xi,V),ge(Zl,A),ge(Ft,$),ge(_i,R),pe(K))if(K.length){const de=e.exposed||(e.exposed={});K.forEach(E=>{Object.defineProperty(de,E,{get:()=>s[E],set:C=>s[E]=C,enumerable:!0})})}else e.exposed||(e.exposed={});T&&e.render===dt&&(e.render=T),se!=null&&(e.inheritAttrs=se),be&&(e.components=be),Ae&&(e.directives=Ae),R&&In(e)}function Mi(e,t,s=dt){pe(e)&&(e=Un(e));for(const l in e){const o=e[l];let a;Se(o)?"default"in o?a=re(o.from||l,o.default,!0):a=re(o.from||l):a=re(o),je(a)?Object.defineProperty(t,l,{enumerable:!0,configurable:!0,get:()=>a.value,set:i=>a.value=i}):t[l]=a}}function lo(e,t,s){pt(pe(e)?e.map(l=>l.bind(t.proxy)):e.bind(t.proxy),t,s)}function oo(e,t,s,l){let o=l.includes(".")?Jl(s,l):()=>s[l];if(Fe(e)){const a=t[e];ve(a)&&gt(o,a)}else if(ve(e))gt(o,e.bind(s));else if(Se(e))if(pe(e))e.forEach(a=>oo(a,t,s,l));else{const a=ve(e.handler)?e.handler.bind(s):t[e.handler];ve(a)&&gt(o,a,e)}}function ao(e){const t=e.type,{mixins:s,extends:l}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:i}}=e.appContext,r=a.get(t);let d;return r?d=r:!o.length&&!s&&!l?d=t:(d={},o.length&&o.forEach(g=>Ws(d,g,i,!0)),Ws(d,t,i)),Se(t)&&a.set(t,d),d}function Ws(e,t,s,l=!1){const{mixins:o,extends:a}=t;a&&Ws(e,a,s,!0),o&&o.forEach(i=>Ws(e,i,s,!0));for(const i in t)if(!(l&&i==="expose")){const r=Ai[i]||s&&s[i];e[i]=r?r(e[i],t[i]):t[i]}return e}const Ai={data:io,props:ro,emits:ro,methods:ks,computed:ks,beforeCreate:We,created:We,beforeMount:We,mounted:We,beforeUpdate:We,updated:We,beforeDestroy:We,beforeUnmount:We,destroyed:We,unmounted:We,activated:We,deactivated:We,errorCaptured:We,serverPrefetch:We,components:ks,directives:ks,watch:Li,provide:io,inject:Ri};function io(e,t){return t?e?function(){return Ne(ve(e)?e.call(this,this):e,ve(t)?t.call(this,this):t)}:t:e}function Ri(e,t){return ks(Un(e),Un(t))}function Un(e){if(pe(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function We(e,t){return e?[...new Set([].concat(e,t))]:t}function ks(e,t){return e?Ne(Object.create(null),e,t):t}function ro(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:Ne(Object.create(null),no(e),no(t??{})):t}function Li(e,t){if(!e)return t;if(!t)return e;const s=Ne(Object.create(null),e);for(const l in t)s[l]=We(e[l],t[l]);return s}function uo(){return{app:null,config:{isNativeTag:ul,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Fi=0;function Oi(e,t){return function(l,o=null){ve(l)||(l=Ne({},l)),o!=null&&!Se(o)&&(o=null);const a=uo(),i=new WeakSet,r=[];let d=!1;const g=a.app={_uid:Fi++,_component:l,_props:o,_container:null,_context:a,_instance:null,version:xr,get config(){return a.config},set config(v){},use(v,...m){return i.has(v)||(v&&ve(v.install)?(i.add(v),v.install(g,...m)):ve(v)&&(i.add(v),v(g,...m))),g},mixin(v){return a.mixins.includes(v)||a.mixins.push(v),g},component(v,m){return m?(a.components[v]=m,g):a.components[v]},directive(v,m){return m?(a.directives[v]=m,g):a.directives[v]},mount(v,m,p){if(!d){const _=g._ceVNode||me(l,o);return _.appContext=a,p===!0?p="svg":p===!1&&(p=void 0),e(_,v,p),d=!0,g._container=v,v.__vue_app__=g,Xn(_.component)}},onUnmount(v){r.push(v)},unmount(){d&&(pt(r,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(v,m){return a.provides[v]=m,g},runWithContext(v){const m=ls;ls=g;try{return v()}finally{ls=m}}};return g}}let ls=null;const Di=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${st(t)}Modifiers`]||e[`${Et(t)}Modifiers`];function Ii(e,t,...s){if(e.isUnmounted)return;const l=e.vnode.props||Ee;let o=s;const a=t.startsWith("update:"),i=a&&Di(l,t.slice(7));i&&(i.trim&&(o=s.map(v=>Fe(v)?v.trim():v)),i.number&&(o=s.map(ma)));let r,d=l[r=gn(t)]||l[r=gn(st(t))];!d&&a&&(d=l[r=gn(Et(t))]),d&&pt(d,e,6,o);const g=l[r+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,pt(g,e,6,o)}}const Bi=new WeakMap;function co(e,t,s=!1){const l=s?Bi:t.emitsCache,o=l.get(e);if(o!==void 0)return o;const a=e.emits;let i={},r=!1;if(!ve(e)){const d=g=>{const v=co(g,t,!0);v&&(r=!0,Ne(i,v))};!s&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!a&&!r?(Se(e)&&l.set(e,null),null):(pe(a)?a.forEach(d=>i[d]=null):Ne(i,a),Se(e)&&l.set(e,i),i)}function Js(e,t){return!e||!As(t)?!1:(t=t.slice(2).replace(/Once$/,""),ke(e,t[0].toLowerCase()+t.slice(1))||ke(e,Et(t))||ke(e,t))}function m1(){}function fo(e){const{type:t,vnode:s,proxy:l,withProxy:o,propsOptions:[a],slots:i,attrs:r,emit:d,render:g,renderCache:v,props:m,data:p,setupState:_,ctx:x,inheritAttrs:w}=e,P=qs(e);let F,A;try{if(s.shapeFlag&4){const $=o||l,T=$;F=ct(g.call(T,$,v,m,_,p,x)),A=r}else{const $=t;F=ct($.length>1?$(m,{attrs:r,slots:i,emit:d}):$(m,null)),A=t.props?r:ji(r)}}catch($){Cs.length=0,Xt($,e,1),F=me(ut)}let y=F;if(A&&w!==!1){const $=Object.keys(A),{shapeFlag:T}=y;$.length&&T&7&&(a&&$.some(hn)&&(A=Hi(A,a)),y=rs(y,A,!1,!0))}return s.dirs&&(y=rs(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(s.dirs):s.dirs),s.transition&&Dn(y,s.transition),F=y,qs(P),F}function Ni(e,t=!0){let s;for(let l=0;l<e.length;l++){const o=e[l];if(is(o)){if(o.type!==ut||o.children==="v-if"){if(s)return;s=o}}else return}return s}const ji=e=>{let t;for(const s in e)(s==="class"||s==="style"||As(s))&&((t||(t={}))[s]=e[s]);return t},Hi=(e,t)=>{const s={};for(const l in e)(!hn(l)||!(l.slice(9)in t))&&(s[l]=e[l]);return s};function Ui(e,t,s){const{props:l,children:o,component:a}=e,{props:i,children:r,patchFlag:d}=t,g=a.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&d>=0){if(d&1024)return!0;if(d&16)return l?ho(l,i,g):!!i;if(d&8){const v=t.dynamicProps;for(let m=0;m<v.length;m++){const p=v[m];if(po(i,l,p)&&!Js(g,p))return!0}}}else return(o||r)&&(!r||!r.$stable)?!0:l===i?!1:l?i?ho(l,i,g):!0:!!i;return!1}function ho(e,t,s){const l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let o=0;o<l.length;o++){const a=l[o];if(po(t,e,a)&&!Js(s,a))return!0}return!1}function po(e,t,s){const l=e[s],o=t[s];return s==="style"&&Se(l)&&Se(o)?!mn(l,o):l!==o}function qn({vnode:e,parent:t},s){for(;t;){const l=t.subTree;if(l.suspense&&l.suspense.activeBranch===e&&(l.el=e.el),l===e)(e=t.vnode).el=s,t=t.parent;else break}}const vo={},go=()=>Object.create(vo),yo=e=>Object.getPrototypeOf(e)===vo;function qi(e,t,s,l=!1){const o={},a=go();e.propsDefaults=Object.create(null),mo(e,t,o,a);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=l?o:za(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function Ki(e,t,s,l){const{props:o,attrs:a,vnode:{patchFlag:i}}=e,r=we(o),[d]=e.propsOptions;let g=!1;if((l||i>0)&&!(i&16)){if(i&8){const v=e.vnode.dynamicProps;for(let m=0;m<v.length;m++){let p=v[m];if(Js(e.emitsOptions,p))continue;const _=t[p];if(d)if(ke(a,p))_!==a[p]&&(a[p]=_,g=!0);else{const x=st(p);o[x]=Kn(d,r,x,_,e,!1)}else _!==a[p]&&(a[p]=_,g=!0)}}}else{mo(e,t,o,a)&&(g=!0);let v;for(const m in r)(!t||!ke(t,m)&&((v=Et(m))===m||!ke(t,v)))&&(d?s&&(s[m]!==void 0||s[v]!==void 0)&&(o[m]=Kn(d,r,m,void 0,e,!0)):delete o[m]);if(a!==r)for(const m in a)(!t||!ke(t,m))&&(delete a[m],g=!0)}g&&_t(e.attrs,"set","")}function mo(e,t,s,l){const[o,a]=e.propsOptions;let i=!1,r;if(t)for(let d in t){if(ps(d))continue;const g=t[d];let v;o&&ke(o,v=st(d))?!a||!a.includes(v)?s[v]=g:(r||(r={}))[v]=g:Js(e.emitsOptions,d)||(!(d in l)||g!==l[d])&&(l[d]=g,i=!0)}if(a){const d=we(s),g=r||Ee;for(let v=0;v<a.length;v++){const m=a[v];s[m]=Kn(o,d,m,g[m],e,!ke(g,m))}}return i}function Kn(e,t,s,l,o,a){const i=e[s];if(i!=null){const r=ke(i,"default");if(r&&l===void 0){const d=i.default;if(i.type!==Function&&!i.skipFactory&&ve(d)){const{propsDefaults:g}=o;if(s in g)l=g[s];else{const v=Ts(o);l=g[s]=d.call(null,t),v()}}else l=d;o.ce&&o.ce._setProp(s,l)}i[0]&&(a&&!r?l=!1:i[1]&&(l===""||l===Et(s))&&(l=!0))}return l}const Vi=new WeakMap;function bo(e,t,s=!1){const l=s?Vi:t.propsCache,o=l.get(e);if(o)return o;const a=e.props,i={},r=[];let d=!1;if(!ve(e)){const v=m=>{d=!0;const[p,_]=bo(m,t,!0);Ne(i,p),_&&r.push(..._)};!s&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}if(!a&&!d)return Se(e)&&l.set(e,zt),zt;if(pe(a))for(let v=0;v<a.length;v++){const m=st(a[v]);_o(m)&&(i[m]=Ee)}else if(a)for(const v in a){const m=st(v);if(_o(m)){const p=a[v],_=i[m]=pe(p)||ve(p)?{type:p}:Ne({},p),x=_.type;let w=!1,P=!0;if(pe(x))for(let F=0;F<x.length;++F){const A=x[F],y=ve(A)&&A.name;if(y==="Boolean"){w=!0;break}else y==="String"&&(P=!1)}else w=ve(x)&&x.name==="Boolean";_[0]=w,_[1]=P,(w||ke(_,"default"))&&r.push(m)}}const g=[i,r];return Se(e)&&l.set(e,g),g}function _o(e){return e[0]!=="$"&&!ps(e)}const Vn=e=>e==="_"||e==="_ctx"||e==="$stable",zn=e=>pe(e)?e.map(ct):[ct(e)],zi=(e,t,s)=>{if(t._n)return t;const l=ts((...o)=>zn(t(...o)),s);return l._c=!1,l},xo=(e,t,s)=>{const l=e._ctx;for(const o in e){if(Vn(o))continue;const a=e[o];if(ve(a))t[o]=zi(o,a,l);else if(a!=null){const i=zn(a);t[o]=()=>i}}},wo=(e,t)=>{const s=zn(t);e.slots.default=()=>s},$o=(e,t,s)=>{for(const l in t)(s||!Vn(l))&&(e[l]=t[l])},Wi=(e,t,s)=>{const l=e.slots=go();if(e.vnode.shapeFlag&32){const o=t._;o?($o(l,t,s),s&&vl(l,"_",o,!0)):xo(t,l)}else t&&wo(e,t)},Ji=(e,t,s)=>{const{vnode:l,slots:o}=e;let a=!0,i=Ee;if(l.shapeFlag&32){const r=t._;r?s&&r===1?a=!1:$o(o,t,s):(a=!t.$stable,xo(t,o)),i=t}else t&&(wo(e,t),i={default:1});if(a)for(const r in o)!Vn(r)&&i[r]==null&&delete o[r]},Je=lr;function Qi(e){return Gi(e)}function Gi(e,t){const s=Fs();s.__VUE__=!0;const{insert:l,remove:o,patchProp:a,createElement:i,createText:r,createComment:d,setText:g,setElementText:v,parentNode:m,nextSibling:p,setScopeId:_=dt,insertStaticContent:x}=e,w=(h,b,M,j=null,D=null,I=null,Y=void 0,W=null,B=!!b.dynamicChildren)=>{if(h===b)return;h&&!Ot(h,b)&&(j=oe(h),ne(h,D,I,!0),h=null),b.patchFlag===-2&&(B=!1,b.dynamicChildren=null);const{type:N,ref:ce,shapeFlag:ee}=b;switch(N){case Qs:P(h,b,M,j);break;case ut:F(h,b,M,j);break;case Gs:h==null&&A(b,M,j,Y);break;case U:be(h,b,M,j,D,I,Y,W,B);break;default:ee&1?T(h,b,M,j,D,I,Y,W,B):ee&6?Ae(h,b,M,j,D,I,Y,W,B):(ee&64||ee&128)&&N.process(h,b,M,j,D,I,Y,W,B,Tt)}ce!=null&&D?ws(ce,h&&h.ref,I,b||h,!b):ce==null&&h&&h.ref!=null&&ws(h.ref,null,I,h,!0)},P=(h,b,M,j)=>{if(h==null)l(b.el=r(b.children),M,j);else{const D=b.el=h.el;b.children!==h.children&&g(D,b.children)}},F=(h,b,M,j)=>{h==null?l(b.el=d(b.children||""),M,j):b.el=h.el},A=(h,b,M,j)=>{[h.el,h.anchor]=x(h.children,b,M,j,h.el,h.anchor)},y=({el:h,anchor:b},M,j)=>{let D;for(;h&&h!==b;)D=p(h),l(h,M,j),h=D;l(b,M,j)},$=({el:h,anchor:b})=>{let M;for(;h&&h!==b;)M=p(h),o(h),h=M;o(b)},T=(h,b,M,j,D,I,Y,W,B)=>{if(b.type==="svg"?Y="svg":b.type==="math"&&(Y="mathml"),h==null)Q(b,M,j,D,I,Y,W,B);else{const N=h.el&&h.el._isVueCE?h.el:null;try{N&&N._beginPatch(),R(h,b,D,I,Y,W,B)}finally{N&&N._endPatch()}}},Q=(h,b,M,j,D,I,Y,W)=>{let B,N;const{props:ce,shapeFlag:ee,transition:ae,dirs:he}=h;if(B=h.el=i(h.type,I,ce&&ce.is,ce),ee&8?v(B,h.children):ee&16&&G(h.children,B,null,j,D,Wn(h,I),Y,W),he&&Ut(h,null,j,"created"),V(B,h,h.scopeId,Y,j),ce){for(const Ce in ce)Ce!=="value"&&!ps(Ce)&&a(B,Ce,null,ce[Ce],I,j);"value"in ce&&a(B,"value",null,ce.value,I),(N=ce.onVnodeBeforeMount)&&yt(N,j,h)}he&&Ut(h,null,j,"beforeMount");const xe=Yi(D,ae);xe&&ae.beforeEnter(B),l(B,b,M),((N=ce&&ce.onVnodeMounted)||xe||he)&&Je(()=>{N&&yt(N,j,h),xe&&ae.enter(B),he&&Ut(h,null,j,"mounted")},D)},V=(h,b,M,j,D)=>{if(M&&_(h,M),j)for(let I=0;I<j.length;I++)_(h,j[I]);if(D){let I=D.subTree;if(b===I||Eo(I.type)&&(I.ssContent===b||I.ssFallback===b)){const Y=D.vnode;V(h,Y,Y.scopeId,Y.slotScopeIds,D.parent)}}},G=(h,b,M,j,D,I,Y,W,B=0)=>{for(let N=B;N<h.length;N++){const ce=h[N]=W?kt(h[N]):ct(h[N]);w(null,ce,b,M,j,D,I,Y,W)}},R=(h,b,M,j,D,I,Y)=>{const W=b.el=h.el;let{patchFlag:B,dynamicChildren:N,dirs:ce}=b;B|=h.patchFlag&16;const ee=h.props||Ee,ae=b.props||Ee;let he;if(M&&qt(M,!1),(he=ae.onVnodeBeforeUpdate)&&yt(he,M,b,h),ce&&Ut(b,h,M,"beforeUpdate"),M&&qt(M,!0),(ee.innerHTML&&ae.innerHTML==null||ee.textContent&&ae.textContent==null)&&v(W,""),N?K(h.dynamicChildren,N,W,M,j,Wn(b,D),I):Y||E(h,b,W,null,M,j,Wn(b,D),I,!1),B>0){if(B&16)se(W,ee,ae,M,D);else if(B&2&&ee.class!==ae.class&&a(W,"class",null,ae.class,D),B&4&&a(W,"style",ee.style,ae.style,D),B&8){const xe=b.dynamicProps;for(let Ce=0;Ce<xe.length;Ce++){const $e=xe[Ce],qe=ee[$e],Be=ae[$e];(Be!==qe||$e==="value")&&a(W,$e,qe,Be,D,M)}}B&1&&h.children!==b.children&&v(W,b.children)}else!Y&&N==null&&se(W,ee,ae,M,D);((he=ae.onVnodeUpdated)||ce)&&Je(()=>{he&&yt(he,M,b,h),ce&&Ut(b,h,M,"updated")},j)},K=(h,b,M,j,D,I,Y)=>{for(let W=0;W<b.length;W++){const B=h[W],N=b[W],ce=B.el&&(B.type===U||!Ot(B,N)||B.shapeFlag&198)?m(B.el):M;w(B,N,ce,null,j,D,I,Y,!0)}},se=(h,b,M,j,D)=>{if(b!==M){if(b!==Ee)for(const I in b)!ps(I)&&!(I in M)&&a(h,I,b[I],null,D,j);for(const I in M){if(ps(I))continue;const Y=M[I],W=b[I];Y!==W&&I!=="value"&&a(h,I,W,Y,D,j)}"value"in M&&a(h,"value",b.value,M.value,D)}},be=(h,b,M,j,D,I,Y,W,B)=>{const N=b.el=h?h.el:r(""),ce=b.anchor=h?h.anchor:r("");let{patchFlag:ee,dynamicChildren:ae,slotScopeIds:he}=b;he&&(W=W?W.concat(he):he),h==null?(l(N,M,j),l(ce,M,j),G(b.children||[],M,ce,D,I,Y,W,B)):ee>0&&ee&64&&ae&&h.dynamicChildren&&h.dynamicChildren.length===ae.length?(K(h.dynamicChildren,ae,M,D,I,Y,W),(b.key!=null||D&&b===D.subTree)&&ko(h,b,!0)):E(h,b,M,ce,D,I,Y,W,B)},Ae=(h,b,M,j,D,I,Y,W,B)=>{b.slotScopeIds=W,h==null?b.shapeFlag&512?D.ctx.activate(b,M,j,Y,B):Le(b,M,j,D,I,Y,B):Re(h,b,B)},Le=(h,b,M,j,D,I,Y)=>{const W=h.component=fr(h,j,D);if(Bn(h)&&(W.ctx.renderer=Tt),pr(W,!1,Y),W.asyncDep){if(D&&D.registerDep(W,ge,Y),!h.el){const B=W.subTree=me(ut);F(null,B,b,M),h.placeholder=B.el}}else ge(W,h,b,M,D,I,Y)},Re=(h,b,M)=>{const j=b.component=h.component;if(Ui(h,b,M))if(j.asyncDep&&!j.asyncResolved){de(j,b,M);return}else j.next=b,j.update();else b.el=h.el,j.vnode=b},ge=(h,b,M,j,D,I,Y)=>{const W=()=>{if(h.isMounted){let{next:ee,bu:ae,u:he,parent:xe,vnode:Ce}=h;{const Ye=So(h);if(Ye){ee&&(ee.el=Ce.el,de(h,ee,Y)),Ye.asyncDep.then(()=>{Je(()=>{h.isUnmounted||N()},D)});return}}let $e=ee,qe;qt(h,!1),ee?(ee.el=Ce.el,de(h,ee,Y)):ee=Ce,ae&&yn(ae),(qe=ee.props&&ee.props.onVnodeBeforeUpdate)&&yt(qe,xe,ee,Ce),qt(h,!0);const Be=fo(h),et=h.subTree;h.subTree=Be,w(et,Be,m(et.el),oe(et),h,D,I),ee.el=Be.el,$e===null&&qn(h,Be.el),he&&Je(he,D),(qe=ee.props&&ee.props.onVnodeUpdated)&&Je(()=>yt(qe,xe,ee,Ce),D)}else{let ee;const{el:ae,props:he}=b,{bm:xe,m:Ce,parent:$e,root:qe,type:Be}=h,et=ns(b);qt(h,!1),xe&&yn(xe),!et&&(ee=he&&he.onVnodeBeforeMount)&&yt(ee,$e,b),qt(h,!0);{qe.ce&&qe.ce._hasShadowRoot()&&qe.ce._injectChildStyle(Be);const Ye=h.subTree=fo(h);w(null,Ye,M,j,h,D,I),b.el=Ye.el}if(Ce&&Je(Ce,D),!et&&(ee=he&&he.onVnodeMounted)){const Ye=b;Je(()=>yt(ee,$e,Ye),D)}(b.shapeFlag&256||$e&&ns($e.vnode)&&$e.vnode.shapeFlag&256)&&h.a&&Je(h.a,D),h.isMounted=!0,b=M=j=null}};h.scope.on();const B=h.effect=new _l(W);h.scope.off();const N=h.update=B.run.bind(B),ce=h.job=B.runIfDirty.bind(B);ce.i=h,ce.id=h.uid,B.scheduler=()=>Fn(ce),qt(h,!0),N()},de=(h,b,M)=>{b.component=h;const j=h.vnode.props;h.vnode=b,h.next=null,Ki(h,b.props,j,M),Ji(h,b.children,M),ft(),ql(h),ht()},E=(h,b,M,j,D,I,Y,W,B=!1)=>{const N=h&&h.children,ce=h?h.shapeFlag:0,ee=b.children,{patchFlag:ae,shapeFlag:he}=b;if(ae>0){if(ae&128){S(N,ee,M,j,D,I,Y,W,B);return}else if(ae&256){C(N,ee,M,j,D,I,Y,W,B);return}}he&8?(ce&16&&z(N,D,I),ee!==N&&v(M,ee)):ce&16?he&16?S(N,ee,M,j,D,I,Y,W,B):z(N,D,I,!0):(ce&8&&v(M,""),he&16&&G(ee,M,j,D,I,Y,W,B))},C=(h,b,M,j,D,I,Y,W,B)=>{h=h||zt,b=b||zt;const N=h.length,ce=b.length,ee=Math.min(N,ce);let ae;for(ae=0;ae<ee;ae++){const he=b[ae]=B?kt(b[ae]):ct(b[ae]);w(h[ae],he,M,null,D,I,Y,W,B)}N>ce?z(h,D,I,!0,!1,ee):G(b,M,j,D,I,Y,W,B,ee)},S=(h,b,M,j,D,I,Y,W,B)=>{let N=0;const ce=b.length;let ee=h.length-1,ae=ce-1;for(;N<=ee&&N<=ae;){const he=h[N],xe=b[N]=B?kt(b[N]):ct(b[N]);if(Ot(he,xe))w(he,xe,M,null,D,I,Y,W,B);else break;N++}for(;N<=ee&&N<=ae;){const he=h[ee],xe=b[ae]=B?kt(b[ae]):ct(b[ae]);if(Ot(he,xe))w(he,xe,M,null,D,I,Y,W,B);else break;ee--,ae--}if(N>ee){if(N<=ae){const he=ae+1,xe=he<ce?b[he].el:j;for(;N<=ae;)w(null,b[N]=B?kt(b[N]):ct(b[N]),M,xe,D,I,Y,W,B),N++}}else if(N>ae)for(;N<=ee;)ne(h[N],D,I,!0),N++;else{const he=N,xe=N,Ce=new Map;for(N=xe;N<=ae;N++){const le=b[N]=B?kt(b[N]):ct(b[N]);le.key!=null&&Ce.set(le.key,N)}let $e,qe=0;const Be=ae-xe+1;let et=!1,Ye=0;const Z=new Array(Be);for(N=0;N<Be;N++)Z[N]=0;for(N=he;N<=ee;N++){const le=h[N];if(qe>=Be){ne(le,D,I,!0);continue}let fe;if(le.key!=null)fe=Ce.get(le.key);else for($e=xe;$e<=ae;$e++)if(Z[$e-xe]===0&&Ot(le,b[$e])){fe=$e;break}fe===void 0?ne(le,D,I,!0):(Z[fe-xe]=N+1,fe>=Ye?Ye=fe:et=!0,w(le,b[fe],M,null,D,I,Y,W,B),qe++)}const L=et?Xi(Z):zt;for($e=L.length-1,N=Be-1;N>=0;N--){const le=xe+N,fe=b[le],ot=b[le+1],tt=le+1<ce?ot.el||To(ot):j;Z[N]===0?w(null,fe,M,tt,D,I,Y,W,B):et&&($e<0||N!==L[$e]?H(fe,M,tt,2):$e--)}}},H=(h,b,M,j,D=null)=>{const{el:I,type:Y,transition:W,children:B,shapeFlag:N}=h;if(N&6){H(h.component.subTree,b,M,j);return}if(N&128){h.suspense.move(b,M,j);return}if(N&64){Y.move(h,b,M,Tt);return}if(Y===U){l(I,b,M);for(let ee=0;ee<B.length;ee++)H(B[ee],b,M,j);l(h.anchor,b,M);return}if(Y===Gs){y(h,b,M);return}if(j!==2&&N&1&&W)if(j===0)W.beforeEnter(I),l(I,b,M),Je(()=>W.enter(I),D);else{const{leave:ee,delayLeave:ae,afterLeave:he}=W,xe=()=>{h.ctx.isUnmounted?o(I):l(I,b,M)},Ce=()=>{I._isLeaving&&I[fi](!0),ee(I,()=>{xe(),he&&he()})};ae?ae(I,xe,Ce):Ce()}else l(I,b,M)},ne=(h,b,M,j=!1,D=!1)=>{const{type:I,props:Y,ref:W,children:B,dynamicChildren:N,shapeFlag:ce,patchFlag:ee,dirs:ae,cacheIndex:he}=h;if(ee===-2&&(D=!1),W!=null&&(ft(),ws(W,null,M,h,!0),ht()),he!=null&&(b.renderCache[he]=void 0),ce&256){b.ctx.deactivate(h);return}const xe=ce&1&&ae,Ce=!ns(h);let $e;if(Ce&&($e=Y&&Y.onVnodeBeforeUnmount)&&yt($e,b,h),ce&6)ie(h.component,M,j);else{if(ce&128){h.suspense.unmount(M,j);return}xe&&Ut(h,null,b,"beforeUnmount"),ce&64?h.type.remove(h,b,M,Tt,j):N&&!N.hasOnce&&(I!==U||ee>0&&ee&64)?z(N,b,M,!1,!0):(I===U&&ee&384||!D&&ce&16)&&z(B,b,M),j&&Te(h)}(Ce&&($e=Y&&Y.onVnodeUnmounted)||xe)&&Je(()=>{$e&&yt($e,b,h),xe&&Ut(h,null,b,"unmounted")},M)},Te=h=>{const{type:b,el:M,anchor:j,transition:D}=h;if(b===U){X(M,j);return}if(b===Gs){$(h);return}const I=()=>{o(M),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(h.shapeFlag&1&&D&&!D.persisted){const{leave:Y,delayLeave:W}=D,B=()=>Y(M,I);W?W(h.el,I,B):B()}else I()},X=(h,b)=>{let M;for(;h!==b;)M=p(h),o(h),h=M;o(b)},ie=(h,b,M)=>{const{bum:j,scope:D,job:I,subTree:Y,um:W,m:B,a:N}=h;Co(B),Co(N),j&&yn(j),D.stop(),I&&(I.flags|=8,ne(Y,h,b,M)),W&&Je(W,b),Je(()=>{h.isUnmounted=!0},b)},z=(h,b,M,j=!1,D=!1,I=0)=>{for(let Y=I;Y<h.length;Y++)ne(h[Y],b,M,j,D)},oe=h=>{if(h.shapeFlag&6)return oe(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const b=p(h.anchor||h.el),M=b&&b[ci];return M?p(M):b};let Ie=!1;const cn=(h,b,M)=>{let j;h==null?b._vnode&&(ne(b._vnode,null,null,!0),j=b._vnode.component):w(b._vnode||null,h,b,null,null,null,M),b._vnode=h,Ie||(Ie=!0,ql(j),Kl(),Ie=!1)},Tt={p:w,um:ne,m:H,r:Te,mt:Le,mc:G,pc:E,pbc:K,n:oe,o:e};return{render:cn,hydrate:void 0,createApp:Oi(cn)}}function Wn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function qt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ko(e,t,s=!1){const l=e.children,o=t.children;if(pe(l)&&pe(o))for(let a=0;a<l.length;a++){const i=l[a];let r=o[a];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=o[a]=kt(o[a]),r.el=i.el),!s&&r.patchFlag!==-2&&ko(i,r)),r.type===Qs&&(r.patchFlag===-1&&(r=o[a]=kt(r)),r.el=i.el),r.type===ut&&!r.el&&(r.el=i.el)}}function Xi(e){const t=e.slice(),s=[0];let l,o,a,i,r;const d=e.length;for(l=0;l<d;l++){const g=e[l];if(g!==0){if(o=s[s.length-1],e[o]<g){t[l]=o,s.push(l);continue}for(a=0,i=s.length-1;a<i;)r=a+i>>1,e[s[r]]<g?a=r+1:i=r;g<e[s[a]]&&(a>0&&(t[l]=s[a-1]),s[a]=l)}}for(a=s.length,i=s[a-1];a-- >0;)s[a]=i,i=t[i];return s}function So(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:So(t)}function Co(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function To(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?To(t.subTree):null}const Eo=e=>e.__isSuspense;let Jn=0;const Zi={name:"Suspense",__isSuspense:!0,process(e,t,s,l,o,a,i,r,d,g){if(e==null)er(t,s,l,o,a,i,r,d,g);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}tr(e,t,s,l,o,i,r,d,g)}},hydrate:sr,normalize:nr};function Ss(e,t){const s=e.props&&e.props[t];ve(s)&&s()}function er(e,t,s,l,o,a,i,r,d){const{p:g,o:{createElement:v}}=d,m=v("div"),p=e.suspense=Po(e,o,l,t,m,s,a,i,r,d);g(null,p.pendingBranch=e.ssContent,m,null,l,p,a,i),p.deps>0?(Ss(e,"onPending"),Ss(e,"onFallback"),g(null,e.ssFallback,t,s,l,null,a,i),os(p,e.ssFallback)):p.resolve(!1,!0)}function tr(e,t,s,l,o,a,i,r,{p:d,um:g,o:{createElement:v}}){const m=t.suspense=e.suspense;m.vnode=t,t.el=e.el;const p=t.ssContent,_=t.ssFallback,{activeBranch:x,pendingBranch:w,isInFallback:P,isHydrating:F}=m;if(w)m.pendingBranch=p,Ot(w,p)?(d(w,p,m.hiddenContainer,null,o,m,a,i,r),m.deps<=0?m.resolve():P&&(F||(d(x,_,s,l,o,null,a,i,r),os(m,_)))):(m.pendingId=Jn++,F?(m.isHydrating=!1,m.activeBranch=w):g(w,o,m),m.deps=0,m.effects.length=0,m.hiddenContainer=v("div"),P?(d(null,p,m.hiddenContainer,null,o,m,a,i,r),m.deps<=0?m.resolve():(d(x,_,s,l,o,null,a,i,r),os(m,_))):x&&Ot(x,p)?(d(x,p,s,l,o,m,a,i,r),m.resolve(!0)):(d(null,p,m.hiddenContainer,null,o,m,a,i,r),m.deps<=0&&m.resolve()));else if(x&&Ot(x,p))d(x,p,s,l,o,m,a,i,r),os(m,p);else if(Ss(t,"onPending"),m.pendingBranch=p,p.shapeFlag&512?m.pendingId=p.component.suspenseId:m.pendingId=Jn++,d(null,p,m.hiddenContainer,null,o,m,a,i,r),m.deps<=0)m.resolve();else{const{timeout:A,pendingId:y}=m;A>0?setTimeout(()=>{m.pendingId===y&&m.fallback(_)},A):A===0&&m.fallback(_)}}function Po(e,t,s,l,o,a,i,r,d,g,v=!1){const{p:m,m:p,um:_,n:x,o:{parentNode:w,remove:P}}=g;let F;const A=or(e);A&&t&&t.pendingBranch&&(F=t.pendingId,t.deps++);const y=e.props?ba(e.props.timeout):void 0,$=a,T={vnode:e,parent:t,parentComponent:s,namespace:i,container:l,hiddenContainer:o,deps:0,pendingId:Jn++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!v,isHydrating:v,isUnmounted:!1,effects:[],resolve(Q=!1,V=!1){const{vnode:G,activeBranch:R,pendingBranch:K,pendingId:se,effects:be,parentComponent:Ae,container:Le,isInFallback:Re}=T;let ge=!1;T.isHydrating?T.isHydrating=!1:Q||(ge=R&&K.transition&&K.transition.mode==="out-in",ge&&(R.transition.afterLeave=()=>{se===T.pendingId&&(p(K,Le,a===$?x(R):a,0),On(be),Re&&G.ssFallback&&(G.ssFallback.el=null))}),R&&(w(R.el)===Le&&(a=x(R)),_(R,Ae,T,!0),!ge&&Re&&G.ssFallback&&Je(()=>G.ssFallback.el=null,T)),ge||p(K,Le,a,0)),os(T,K),T.pendingBranch=null,T.isInFallback=!1;let de=T.parent,E=!1;for(;de;){if(de.pendingBranch){de.effects.push(...be),E=!0;break}de=de.parent}!E&&!ge&&On(be),T.effects=[],A&&t&&t.pendingBranch&&F===t.pendingId&&(t.deps--,t.deps===0&&!V&&t.resolve()),Ss(G,"onResolve")},fallback(Q){if(!T.pendingBranch)return;const{vnode:V,activeBranch:G,parentComponent:R,container:K,namespace:se}=T;Ss(V,"onFallback");const be=x(G),Ae=()=>{T.isInFallback&&(m(null,Q,K,be,R,null,se,r,d),os(T,Q))},Le=Q.transition&&Q.transition.mode==="out-in";Le&&(G.transition.afterLeave=Ae),T.isInFallback=!0,_(G,R,null,!0),Le||Ae()},move(Q,V,G){T.activeBranch&&p(T.activeBranch,Q,V,G),T.container=Q},next(){return T.activeBranch&&x(T.activeBranch)},registerDep(Q,V,G){const R=!!T.pendingBranch;R&&T.deps++;const K=Q.vnode.el;Q.asyncDep.catch(se=>{Xt(se,Q,0)}).then(se=>{if(Q.isUnmounted||T.isUnmounted||T.pendingId!==Q.suspenseId)return;Q.asyncResolved=!0;const{vnode:be}=Q;Yn(Q,se),K&&(be.el=K);const Ae=!K&&Q.subTree.el;V(Q,be,w(K||Q.subTree.el),K?null:x(Q.subTree),T,i,G),Ae&&(be.placeholder=null,P(Ae)),qn(Q,be.el),R&&--T.deps===0&&T.resolve()})},unmount(Q,V){T.isUnmounted=!0,T.activeBranch&&_(T.activeBranch,s,Q,V),T.pendingBranch&&_(T.pendingBranch,s,Q,V)}};return T}function sr(e,t,s,l,o,a,i,r,d){const g=t.suspense=Po(t,l,s,e.parentNode,document.createElement("div"),null,o,a,i,r,!0),v=d(e,g.pendingBranch=t.ssContent,s,g,a,i);return g.deps===0&&g.resolve(!1,!0),v}function nr(e){const{shapeFlag:t,children:s}=e,l=t&32;e.ssContent=Mo(l?s.default:s),e.ssFallback=l?Mo(s.fallback):me(ut)}function Mo(e){let t;if(ve(e)){const s=as&&e._c;s&&(e._d=!1,u()),e=e(),s&&(e._d=!0,t=Ge,Ao())}return pe(e)&&(e=Ni(e)),e=ct(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function lr(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):On(e)}function os(e,t){e.activeBranch=t;const{vnode:s,parentComponent:l}=e;let o=t.el;for(;!o&&t.component;)t=t.component.subTree,o=t.el;s.el=o,l&&l.subTree===s&&(l.vnode.el=o,qn(l,o))}function or(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const U=Symbol.for("v-fgt"),Qs=Symbol.for("v-txt"),ut=Symbol.for("v-cmt"),Gs=Symbol.for("v-stc"),Cs=[];let Ge=null;function u(e=!1){Cs.push(Ge=e?null:[])}function Ao(){Cs.pop(),Ge=Cs[Cs.length-1]||null}let as=1;function Ys(e,t=!1){as+=e,e<0&&Ge&&t&&(Ge.hasOnce=!0)}function Ro(e){return e.dynamicChildren=as>0?Ge||zt:null,Ao(),as>0&&Ge&&Ge.push(e),e}function c(e,t,s,l,o,a){return Ro(n(e,t,s,l,o,a,!0))}function Xe(e,t,s,l,o){return Ro(me(e,t,s,l,o,!0))}function is(e){return e?e.__v_isVNode===!0:!1}function Ot(e,t){return e.type===t.type&&e.key===t.key}const Lo=({key:e})=>e??null,Xs=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Fe(e)||je(e)||ve(e)?{i:ze,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,l=0,o=null,a=e===U?0:1,i=!1,r=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Lo(t),ref:t&&Xs(t),scopeId:zl,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:l,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:ze};return r?(Qn(d,s),a&128&&e.normalize(d)):s&&(d.shapeFlag|=Fe(s)?8:16),as>0&&!i&&Ge&&(d.patchFlag>0||a&6)&&d.patchFlag!==32&&Ge.push(d),d}const me=ar;function ar(e,t=null,s=null,l=0,o=null,a=!1){if((!e||e===eo)&&(e=ut),is(e)){const r=rs(e,t,!0);return s&&Qn(r,s),as>0&&!a&&Ge&&(r.shapeFlag&6?Ge[Ge.indexOf(e)]=r:Ge.push(r)),r.patchFlag=-2,r}if(_r(e)&&(e=e.__vccOpts),t){t=ir(t);let{class:r,style:d}=t;r&&!Fe(r)&&(t.class=O(r)),Se(d)&&(Rn(d)&&!pe(d)&&(d=Ne({},d)),t.style=Ke(d))}const i=Fe(e)?1:Eo(e)?128:di(e)?64:Se(e)?4:ve(e)?2:0;return n(e,t,s,l,o,i,a,!0)}function ir(e){return e?Rn(e)||yo(e)?Ne({},e):e:null}function rs(e,t,s=!1,l=!1){const{props:o,ref:a,patchFlag:i,children:r,transition:d}=e,g=t?ur(o||{},t):o,v={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Lo(g),ref:t&&t.ref?s&&a?pe(a)?a.concat(Xs(t)):[a,Xs(t)]:Xs(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==U?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&rs(e.ssContent),ssFallback:e.ssFallback&&rs(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&l&&Dn(v,d.clone(v)),v}function _e(e=" ",t=0){return me(Qs,null,e,t)}function rr(e,t){const s=me(Gs,null,e);return s.staticCount=t,s}function te(e="",t=!1){return t?(u(),Xe(ut,null,e)):me(ut,null,e)}function ct(e){return e==null||typeof e=="boolean"?me(ut):pe(e)?me(U,null,e.slice()):is(e)?kt(e):me(Qs,null,String(e))}function kt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:rs(e)}function Qn(e,t){let s=0;const{shapeFlag:l}=e;if(t==null)t=null;else if(pe(t))s=16;else if(typeof t=="object")if(l&65){const o=t.default;o&&(o._c&&(o._d=!1),Qn(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!yo(t)?t._ctx=ze:o===3&&ze&&(ze.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ve(t)?(t={default:t,_ctx:ze},s=32):(t=String(t),l&64?(s=16,t=[_e(t)]):s=8);e.children=t,e.shapeFlag|=s}function ur(...e){const t={};for(let s=0;s<e.length;s++){const l=e[s];for(const o in l)if(o==="class")t.class!==l.class&&(t.class=O([t.class,l.class]));else if(o==="style")t.style=Ke([t.style,l.style]);else if(As(o)){const a=t[o],i=l[o];i&&a!==i&&!(pe(a)&&a.includes(i))&&(t[o]=a?[].concat(a,i):i)}else o!==""&&(t[o]=l[o])}return t}function yt(e,t,s,l=null){pt(e,t,7,[s,l])}const cr=uo();let dr=0;function fr(e,t,s){const l=e.type,o=(t?t.appContext:e.appContext)||cr,a={uid:dr++,vnode:e,type:l,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ca(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bo(l,o),emitsOptions:co(l,o),emit:null,emitted:null,propsDefaults:Ee,inheritAttrs:l.inheritAttrs,ctx:Ee,data:Ee,props:Ee,attrs:Ee,slots:Ee,refs:Ee,setupState:Ee,setupContext:null,suspense:s,suspenseId:s?s.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Ii.bind(null,a),e.ce&&e.ce(a),a}let He=null;const hr=()=>He||ze;let Zs,Gn;{const e=Fs(),t=(s,l)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(l),a=>{o.length>1?o.forEach(i=>i(a)):o[0](a)}};Zs=t("__VUE_INSTANCE_SETTERS__",s=>He=s),Gn=t("__VUE_SSR_SETTERS__",s=>us=s)}const Ts=e=>{const t=He;return Zs(e),e.scope.on(),()=>{e.scope.off(),Zs(t)}},Fo=()=>{He&&He.scope.off(),Zs(null)};function Oo(e){return e.vnode.shapeFlag&4}let us=!1;function pr(e,t=!1,s=!1){t&&Gn(t);const{props:l,children:o}=e.vnode,a=Oo(e);qi(e,l,a,t),Wi(e,o,s||t);const i=a?vr(e,t):void 0;return t&&Gn(!1),i}function vr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ei);const{setup:l}=s;if(l){ft();const o=e.setupContext=l.length>1?yr(e):null,a=Ts(e),i=Yt(l,e,0,[e.props,o]),r=fl(i);if(ht(),a(),(r||e.sp)&&!ns(e)&&In(e),r){if(i.then(Fo,Fo),t)return i.then(d=>{Yn(e,d)}).catch(d=>{Xt(d,e,0)});e.asyncDep=i}else Yn(e,i)}else Do(e)}function Yn(e,t,s){ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Se(t)&&(e.setupState=Bl(t)),Do(e)}function Do(e,t,s){const l=e.type;e.render||(e.render=l.render||dt);{const o=Ts(e);ft();try{Pi(e)}finally{ht(),o()}}}const gr={get(e,t){return Ue(e,"get",""),e[t]}};function yr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,gr),slots:e.slots,emit:e.emit,expose:t}}function Xn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Bl(Wa(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in $s)return $s[s](e)},has(t,s){return s in t||s in $s}})):e.proxy}const mr=/(?:^|[-_])\w/g,br=e=>e.replace(mr,t=>t.toUpperCase()).replace(/[-_]/g,"");function Io(e,t=!0){return ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Bo(e,t,s=!1){let l=Io(t);if(!l&&t.__file){const o=t.__file.match(/([^/\\]+)\.\w+$/);o&&(l=o[1])}if(!l&&e){const o=a=>{for(const i in a)if(a[i]===t)return i};l=o(e.components)||e.parent&&o(e.parent.type.components)||o(e.appContext.components)}return l?br(l):s?"App":"Anonymous"}function _r(e){return ve(e)&&"__vccOpts"in e}const q=(e,t)=>Xa(e,t,us);function cs(e,t,s){try{Ys(-1);const l=arguments.length;return l===2?Se(t)&&!pe(t)?is(t)?me(e,null,[t]):me(e,t):me(e,null,t):(l>3?s=Array.prototype.slice.call(arguments,2):l===3&&is(s)&&(s=[s]),me(e,t,s))}finally{Ys(1)}}const xr="3.5.29";let Zn;const No=typeof window<"u"&&window.trustedTypes;if(No)try{Zn=No.createPolicy("vue",{createHTML:e=>e})}catch{}const jo=Zn?e=>Zn.createHTML(e):e=>e,wr="http://www.w3.org/2000/svg",$r="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,Ho=St&&St.createElement("template"),kr={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,l)=>{const o=t==="svg"?St.createElementNS(wr,e):t==="mathml"?St.createElementNS($r,e):s?St.createElement(e,{is:s}):St.createElement(e);return e==="select"&&l&&l.multiple!=null&&o.setAttribute("multiple",l.multiple),o},createText:e=>St.createTextNode(e),createComment:e=>St.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>St.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,l,o,a){const i=s?s.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===a||!(o=o.nextSibling)););else{Ho.innerHTML=jo(l==="svg"?`<svg>${e}</svg>`:l==="mathml"?`<math>${e}</math>`:e);const r=Ho.content;if(l==="svg"||l==="mathml"){const d=r.firstChild;for(;d.firstChild;)r.appendChild(d.firstChild);r.removeChild(d)}t.insertBefore(r,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Sr=Symbol("_vtc");function Cr(e,t,s){const l=e[Sr];l&&(t=(t?[t,...l]:[...l]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Uo=Symbol("_vod"),Tr=Symbol("_vsh"),Er=Symbol(""),Pr=/(?:^|;)\s*display\s*:/;function Mr(e,t,s){const l=e.style,o=Fe(s);let a=!1;if(s&&!o){if(t)if(Fe(t))for(const i of t.split(";")){const r=i.slice(0,i.indexOf(":")).trim();s[r]==null&&en(l,r,"")}else for(const i in t)s[i]==null&&en(l,i,"");for(const i in s)i==="display"&&(a=!0),en(l,i,s[i])}else if(o){if(t!==s){const i=l[Er];i&&(s+=";"+i),l.cssText=s,a=Pr.test(s)}}else t&&e.removeAttribute("style");Uo in e&&(e[Uo]=a?l.display:"",e[Tr]&&(l.display="none"))}const qo=/\s*!important$/;function en(e,t,s){if(pe(s))s.forEach(l=>en(e,t,l));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const l=Ar(e,t);qo.test(s)?e.setProperty(Et(l),s.replace(qo,""),"important"):e[l]=s}}const Ko=["Webkit","Moz","ms"],el={};function Ar(e,t){const s=el[t];if(s)return s;let l=st(t);if(l!=="filter"&&l in e)return el[t]=l;l=Ls(l);for(let o=0;o<Ko.length;o++){const a=Ko[o]+l;if(a in e)return el[t]=a}return t}const Vo="http://www.w3.org/1999/xlink";function zo(e,t,s,l,o,a=ka(t)){l&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Vo,t.slice(6,t.length)):e.setAttributeNS(Vo,t,s):s==null||a&&!yl(s)?e.removeAttribute(t):e.setAttribute(t,a?"":at(s)?String(s):s)}function Wo(e,t,s,l,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?jo(s):s);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const r=a==="OPTION"?e.getAttribute("value")||"":e.value,d=s==null?e.type==="checkbox"?"on":"":String(s);(r!==d||!("_value"in e))&&(e.value=d),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=yl(s):s==null&&r==="string"?(s="",i=!0):r==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function Rr(e,t,s,l){e.addEventListener(t,s,l)}function Lr(e,t,s,l){e.removeEventListener(t,s,l)}const Jo=Symbol("_vei");function Fr(e,t,s,l,o=null){const a=e[Jo]||(e[Jo]={}),i=a[t];if(l&&i)i.value=l;else{const[r,d]=Or(t);if(l){const g=a[t]=Br(l,o);Rr(e,r,g,d)}else i&&(Lr(e,r,i,d),a[t]=void 0)}}const Qo=/(?:Once|Passive|Capture)$/;function Or(e){let t;if(Qo.test(e)){t={};let l;for(;l=e.match(Qo);)e=e.slice(0,e.length-l[0].length),t[l[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Et(e.slice(2)),t]}let tl=0;const Dr=Promise.resolve(),Ir=()=>tl||(Dr.then(()=>tl=0),tl=Date.now());function Br(e,t){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;pt(Nr(l,s.value),t,5,[l])};return s.value=e,s.attached=Ir(),s}function Nr(e,t){if(pe(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(l=>o=>!o._stopped&&l&&l(o))}else return t}const Go=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,jr=(e,t,s,l,o,a)=>{const i=o==="svg";t==="class"?Cr(e,l,i):t==="style"?Mr(e,s,l):As(t)?hn(t)||Fr(e,t,s,l,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Hr(e,t,l,i))?(Wo(e,t,l),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zo(e,t,l,i,a,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Fe(l))?Wo(e,st(t),l,a,t):(t==="true-value"?e._trueValue=l:t==="false-value"&&(e._falseValue=l),zo(e,t,l,i))};function Hr(e,t,s,l){if(l)return!!(t==="innerHTML"||t==="textContent"||t in e&&Go(t)&&ve(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Go(t)&&Fe(s)?!1:t in e}const Ur=["ctrl","shift","alt","meta"],qr={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ur.some(s=>e[`${s}Key`]&&!t.includes(s))},mt=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),l=t.join(".");return s[l]||(s[l]=((o,...a)=>{for(let i=0;i<t.length;i++){const r=qr[t[i]];if(r&&r(o,t))return}return e(o,...a)}))},Kr={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Es=(e,t)=>{const s=e._withKeys||(e._withKeys={}),l=t.join(".");return s[l]||(s[l]=(o=>{if(!("key"in o))return;const a=Et(o.key);if(t.some(i=>i===a||Kr[i]===a))return e(o)}))},Vr=Ne({patchProp:jr},kr);let Yo;function zr(){return Yo||(Yo=Qi(Vr))}const Wr=((...e)=>{const t=zr().createApp(...e),{mount:s}=t;return t.mount=l=>{const o=Qr(l);if(!o)return;const a=t._component;!ve(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Jr(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t});function Jr(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Qr(e){return Fe(e)?document.querySelector(e):e}async function Gr(){if(typeof window<"u"&&window.Transmit&&typeof window.Transmit=="function")return window.Transmit;try{const e=await import("@adonisjs/transmit-client");return e.Transmit??e.default??null}catch{return null}}function Yr(e){let t=null,s=null,l=!1;return{subscribe:async()=>{try{const i=await Gr();if(!i)throw new Error("Transmit client not available (neither window.Transmit nor @adonisjs/transmit-client)");if(l)return;t=new i({baseUrl:e.baseUrl||window.location.origin,...e.authToken?{beforeSubscribe(r){return{headers:{Authorization:`Bearer ${e.authToken}`}}},beforeUnsubscribe(r){return{headers:{Authorization:`Bearer ${e.authToken}`}}}}:{}}),s=t.subscription(e.channelName),s.onMessage(r=>{l||e.onMessage(r)}),await s.create()}catch(i){e.onError&&e.onError(i)}},unsubscribe:async()=>{l=!0;try{s&&(await s.delete(),s=null),t&&(t=null)}catch{}}}}function Xr(e){let t=!1;const s=Yr({baseUrl:e.baseUrl,channelName:e.channelName,authToken:e.authToken,onMessage:e.onMessage,onError:l=>{t=!0,e.onError?.(l),e.onDisconnect?.()}});return s.subscribe().then(()=>{t||e.onConnect?.()}).catch(l=>{e.onError?.(l),e.onDisconnect?.()}),{unsubscribe:()=>{s.unsubscribe().catch(()=>{})}}}class tn extends Error{status;constructor(t=403){super(`Unauthorized (HTTP ${t})`),this.name="UnauthorizedError",this.status=t}}class Zr extends Error{status;body;constructor(t,s){super(`API error (HTTP ${t})`),this.name="ApiError",this.status=t,this.body=s}}class sl{baseUrl;authToken;constructor(t){this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.authToken=t.authToken}async fetch(t,s){const o={...{Accept:"application/json",...this.authToken?{Authorization:`Bearer ${this.authToken}`}:{}},...s?.headers},a=await globalThis.fetch(`${this.baseUrl}${t}`,{...s,headers:o,credentials:this.authToken?"omit":"include"});if(a.status===401||a.status===403)throw new tn(a.status);if(!a.ok){const i=await a.text().catch(()=>"");throw new Zr(a.status,i)}return a.json()}async get(t,s){const l=s?`${t}?${s}`:t;return this.fetch(l)}async post(t,s){const l={method:"POST",...s!==void 0?{body:JSON.stringify(s),headers:{"Content-Type":"application/json"}}:{}};return this.fetch(t,l)}async delete(t){return this.fetch(t,{method:"DELETE"})}}const sn="ss-dash-theme",nl="ss-theme-change";function Ps(){if(typeof window>"u")return"light";const e=localStorage.getItem(sn);return e==="dark"||e==="light"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function eu(e){typeof window>"u"||(localStorage.setItem(sn,e),window.dispatchEvent(new CustomEvent(nl,{detail:e})))}function tu(){const t=Ps()==="dark"?"light":"dark";return eu(t),t}function Xo(e){if(typeof window>"u")return()=>{};const t=a=>{const i=a.detail;(i==="dark"||i==="light")&&e(i)},s=a=>{if(a.key===sn){const i=a.newValue;e(i==="dark"||i==="light"?i:Ps())}},l=window.matchMedia("(prefers-color-scheme: dark)"),o=a=>{localStorage.getItem(sn)||e(a.matches?"dark":"light")};return window.addEventListener(nl,t),window.addEventListener("storage",s),l.addEventListener("change",o),()=>{window.removeEventListener(nl,t),window.removeEventListener("storage",s),l.removeEventListener("change",o)}}const Kt={color:"#34d399",fillOpacityTop:.25,fillOpacityBottom:.02,strokeWidth:1.5,width:120,height:32,padding:2};function su(e){return{...Kt,...e}}function nu(e,t=Kt.width,s=Kt.height,l=Kt.padding){if(e.length<2)return null;const o=t-l*2,a=s-l*2,i=Math.min(...e),d=Math.max(...e)-i||1;return e.map((v,m)=>{const p=l+m/(e.length-1)*o,_=l+a-(v-i)/d*a;return`${p.toFixed(1)},${_.toFixed(1)}`}).join(" ")}function lu(e,t=Kt.width,s=Kt.height,l=Kt.padding){if(e.length<2)return null;const o=t-l*2,a=s-l*2,i=Math.min(...e),d=Math.max(...e)-i||1,g=e.map((_,x)=>{const w=l+x/(e.length-1)*o,P=l+a-(_-i)/d*a;return`${w.toFixed(1)},${P.toFixed(1)}`}),v=(l+o).toFixed(1),m=(l+a).toFixed(1),p=l.toFixed(1);return`M${g[0]} `+g.slice(1).map(_=>`L${_}`).join(" ")+` L${v},${m} L${p},${m} Z`}let ou=0;function au(){return`ss-grad-${ou++}`}function iu(e){if(e.length===0)return null;const t=Math.min(...e),s=Math.max(...e),l=e.reduce((o,a)=>o+a,0)/e.length;return{min:t,max:s,avg:l}}function ru(e,t){const s=su(t),l=nu(e,s.width,s.height,s.padding),o=lu(e,s.width,s.height,s.padding);return!l||!o?null:{points:l,areaPath:o,gradientId:au(),options:s,stats:iu(e)}}const uu=5e3,Zo=1e4,ea=100,cu=500;function du(e){if(!e&&e!==0)return"-";const t=Math.floor(e),s=Math.floor(t/86400),l=Math.floor(t%86400/3600),o=Math.floor(t%3600/60);return s>0?`${s}d ${l}h`:l>0?`${l}h ${o}m`:o>0?`${o}m ${t%60}s`:`${t}s`}function Dt(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:e>=1?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`}function It(e){if(!e)return"-";const t=typeof e=="string"?new Date(e):new Date(e);return Number.isNaN(t.getTime())?"-":t.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+"."+String(t.getMilliseconds()).padStart(3,"0")}function bt(e){if(!e)return"-";const t=typeof e=="string"?new Date(e).getTime():e,s=Math.floor((Date.now()-t)/1e3);return s<0?"just now":s<60?`${s}s ago`:s<3600?`${Math.floor(s/60)}m ago`:s<86400?`${Math.floor(s/3600)}h ago`:`${Math.floor(s/86400)}d ago`}function nn(e){return e>cu?"very-slow":e>ea?"slow":"normal"}function ln(e,t=100){if(e===null)return"null";if(e===void 0)return"-";if(typeof e=="string")return'"'+(e.length>40?e.slice(0,40)+"...":e)+'"';if(typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const l="["+e.slice(0,3).map(o=>ln(o,30)).join(", ")+(e.length>3?", ..."+e.length+" items":"")+"]";return l.length>t?"["+e.length+" items]":l}if(typeof e=="object"){const s=Object.keys(e);if(s.length===0)return"{}";const l=[];for(let a=0;a<Math.min(s.length,4);a++)l.push(s[a]+": "+ln(e[s[a]],30));const o="{ "+l.join(", ")+(s.length>4?", ...+"+(s.length-4):"")+" }";return o.length>t?"{ "+s.slice(0,6).join(", ")+(s.length>6?", ...":"")+" }":o}return String(e)}function fu(e){return e<0?"no expiry":e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m`:e<86400?`${Math.floor(e/3600)}h`:`${Math.floor(e/86400)}d`}function hu(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function pu(e){const t=new URLSearchParams;if(e.page!==null&&e.page!==void 0&&t.set("page",String(e.page)),e.perPage!==null&&e.perPage!==void 0&&t.set("perPage",String(e.perPage)),e.search&&t.set("search",e.search),e.sort&&t.set("sort",e.sort),e.sortDir&&t.set("direction",e.sortDir),e.timeRange&&t.set("range",e.timeRange),e.filters)for(const[s,l]of Object.entries(e.filters))l&&t.set(s,l);return t.toString()}function vu(e,t,s=2){if(t<=1)return[1];const l=[],o=Math.max(2,e-s),a=Math.min(t-1,e+s);l.push(1),o>2&&l.push("...");for(let i=o;i<=a;i++)l.push(i);return a<t-1&&l.push("..."),t>1&&l.push(t),l}const ta="/admin/api/debug",sa={tracing:!1,process:!1,system:!1,http:!1,db:!1,redis:!1,queues:!1,cache:!1,app:!1,log:!1,emails:!1,dashboard:!1,customPanes:[]};function gu(e){return{tracing:e.features?.tracing??!1,process:e.features?.process??!1,system:e.features?.system??!1,http:e.features?.http??!1,db:e.features?.db??!1,redis:e.features?.redis??!1,queues:e.features?.queues??!1,cache:e.features?.cache??!1,app:e.features?.app??!1,log:e.features?.log??!1,emails:e.features?.emails??!1,dashboard:e.features?.dashboard??!1,customPanes:e.customPanes??[]}}async function yu(e,t=ta){const s=`${t.replace(/\/+$/,"")}/config`;return e.fetch(s)}async function mu(e){const{baseUrl:t="",debugEndpoint:s=ta,authToken:l}=e,o=new sl({baseUrl:t,authToken:l});try{const a=await yu(o,s);return gu(a)}catch{return sa}}const bu={overview:"/overview",requests:"/requests",queries:"/queries",events:"/events",routes:"/routes",logs:"/logs",emails:"/emails",timeline:"/traces",cache:"/cache",jobs:"/jobs",config:"/config"};function _u(e){return bu[e]||`/${e}`}class na{constructor(t,s){this.client=t,this.basePath=s}async fetchSection(t,s){const l=_u(t),o=s?`${this.basePath}${l}?${s}`:`${this.basePath}${l}`;return this.client.fetch(o)}async fetchChart(t){return this.client.fetch(`${this.basePath}/overview/chart?range=${t}`)}async fetchGroupedQueries(){return this.client.fetch(`${this.basePath}/queries/grouped`)}async explainQuery(t){return this.client.fetch(`${this.basePath}/queries/${t}/explain`)}async retryJob(t){return this.client.fetch(`${this.basePath}/jobs/${t}/retry`,{method:"POST"})}async fetchCacheKey(t){return this.client.fetch(`${this.basePath}/cache/${encodeURIComponent(t)}`)}async deleteCacheKey(t){return this.client.fetch(`${this.basePath}/cache/${encodeURIComponent(t)}`,{method:"DELETE"})}async fetchEmailPreview(t){return this.client.fetch(`${this.basePath}/emails/${t}/preview`)}}class xu{client;api;callbacks;endpoint;perPage;section;page=1;search;sort;sortDir;filters;timeRange;timer=null;fetchId=0;explicitFetchPending=!1;hasFetched=!1;stopped=!1;constructor(t){this.client=new sl({baseUrl:t.baseUrl,authToken:t.authToken}),this.api=new na(this.client,t.endpoint),this.endpoint=t.endpoint,this.section=t.section,this.perPage=t.perPage,this.callbacks=t.callbacks}start(){this.stopped=!1,this.fetch(!1),this.startRefreshTimer()}stop(){this.stopped=!0,this.stopRefreshTimer()}async fetch(t=!0){if(t&&this.explicitFetchPending)return;const s=++this.fetchId,l=this.section;if(!l)return;const o=this.filters,a=this.sort?this.sort.replace(/[A-Z]/g,r=>"_"+r.toLowerCase()):void 0,i=pu({page:this.page,perPage:this.perPage,search:this.search,sort:a,sortDir:this.sort?this.sortDir:void 0,filters:o&&Object.keys(o).length>0?o:void 0,timeRange:l.startsWith("overview")?this.timeRange:void 0});t||(this.callbacks.onLoading(!0),this.explicitFetchPending=!0);try{const r=await this.api.fetchSection(l,i||void 0);if(s!==this.fetchId||this.stopped)return;if(r&&typeof r=="object"&&r.data!==void 0&&r.meta!==void 0){const d=r;this.callbacks.onData(d.data),this.callbacks.onPagination(d.meta)}else this.callbacks.onData(r),this.callbacks.onPagination(null);this.callbacks.onError(null),this.callbacks.onLoading(!1),this.hasFetched=!0}catch(r){if(s!==this.fetchId||this.stopped)return;if(r instanceof tn){this.callbacks.onError(r),this.callbacks.onLoading(!1),this.stopRefreshTimer(),this.callbacks.onUnauthorized();return}t||(this.callbacks.onError(r instanceof Error?r:new Error(String(r))),this.callbacks.onLoading(!1))}finally{t||(this.explicitFetchPending=!1)}}setSection(t){this.section!==t&&(this.section=t,this.page=1,this.search=void 0,this.sort=void 0,this.sortDir=void 0,this.filters=void 0,this.hasFetched=!1,this.callbacks.onData(null),this.callbacks.onPagination(null),this.callbacks.onLoading(!0),this.callbacks.onError(null),this.fetch(!1),this.startRefreshTimer())}setPage(t){this.page=t,this.fetch(!1)}setSearch(t){this.search=t||void 0,this.page=1,this.fetch(!1)}setFilter(t,s){this.filters||(this.filters={}),this.filters[t]=String(s),this.page=1,this.fetch(!1)}setSort(t,s){this.sort===t&&!s?this.sortDir=this.sortDir==="asc"?"desc":"asc":(this.sort=t,this.sortDir=s||"desc"),this.fetch(!1)}setTimeRange(t){this.timeRange=t,this.fetch(!1)}async mutate(t,s="post",l){const o=`${this.endpoint}/${t}`;try{const a=s==="post"?await this.client.post(o,l):await this.client.delete(o);return await this.fetch(!0),a}catch(a){throw a instanceof Error?a:new Error(String(a))}}configure(t){t.page!==void 0&&(this.page=t.page),t.perPage!==void 0&&(this.perPage=t.perPage),this.search=t.search,this.sort=t.sort,this.sortDir=t.sortDir,this.filters=t.filters,this.timeRange=t.timeRange}hasData(){return this.hasFetched}handleRefreshSignal(){this.hasFetched&&this.fetch(!0)}getApi(){return this.api}getClient(){return this.client}startRefreshTimer(){this.stopRefreshTimer();const t=this.section==="overview"?uu:Zo;this.timer=setInterval(()=>this.fetch(!0),t)}stopRefreshTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}}const Me={queries:{viewBox:"0 0 24 24",elements:['<ellipse cx="12" cy="5" rx="9" ry="3"/>','<path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/>','<path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/>']},events:{viewBox:"0 0 24 24",elements:['<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>']},emails:{viewBox:"0 0 24 24",elements:['<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>','<polyline points="22,6 12,13 2,6"/>']},routes:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="10"/>','<line x1="2" y1="12" x2="22" y2="12"/>','<path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/>']},logs:{viewBox:"0 0 24 24",elements:['<line x1="8" y1="6" x2="21" y2="6"/>','<line x1="8" y1="12" x2="21" y2="12"/>','<line x1="8" y1="18" x2="21" y2="18"/>','<line x1="3" y1="6" x2="3.01" y2="6"/>','<line x1="3" y1="12" x2="3.01" y2="12"/>','<line x1="3" y1="18" x2="3.01" y2="18"/>']},timeline:{viewBox:"0 0 24 24",elements:['<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>']},cache:{viewBox:"0 0 24 24",elements:['<rect x="2" y="2" width="20" height="8" rx="2" ry="2"/>','<rect x="2" y="14" width="20" height="8" rx="2" ry="2"/>','<line x1="6" y1="6" x2="6.01" y2="6"/>','<line x1="6" y1="18" x2="6.01" y2="18"/>']},jobs:{viewBox:"0 0 24 24",elements:['<rect x="2" y="7" width="20" height="14" rx="2" ry="2"/>','<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/>']},config:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="3"/>','<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/>']},internals:{viewBox:"0 0 24 24",elements:['<rect x="4" y="4" width="16" height="16" rx="2"/>','<rect x="9" y="9" width="6" height="6"/>','<line x1="9" y1="1" x2="9" y2="4"/>','<line x1="15" y1="1" x2="15" y2="4"/>','<line x1="9" y1="20" x2="9" y2="23"/>','<line x1="15" y1="20" x2="15" y2="23"/>','<line x1="20" y1="9" x2="23" y2="9"/>','<line x1="20" y1="14" x2="23" y2="14"/>','<line x1="1" y1="9" x2="4" y2="9"/>','<line x1="1" y1="14" x2="4" y2="14"/>']},overview:{viewBox:"0 0 24 24",elements:['<rect x="3" y="3" width="7" height="7"/>','<rect x="14" y="3" width="7" height="7"/>','<rect x="14" y="14" width="7" height="7"/>','<rect x="3" y="14" width="7" height="7"/>']},requests:{viewBox:"0 0 24 24",elements:['<polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/>']},"dashboard-timeline":{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="10"/>','<polyline points="12 6 12 12 16 14"/>']},"custom-pane":{viewBox:"0 0 24 24",elements:['<rect x="3" y="3" width="18" height="18" rx="2"/>','<path d="M9 3v18"/>']},wrench:{viewBox:"0 0 24 24",elements:['<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"/>']},"external-link":{viewBox:"0 0 24 24",elements:['<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>','<polyline points="15 3 21 3 21 9"/>','<line x1="10" y1="14" x2="21" y2="3"/>']},sun:{viewBox:"0 0 24 24",elements:['<circle cx="12" cy="12" r="5"/>','<line x1="12" y1="1" x2="12" y2="3"/>','<line x1="12" y1="21" x2="12" y2="23"/>','<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>','<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>','<line x1="1" y1="12" x2="3" y2="12"/>','<line x1="21" y1="12" x2="23" y2="12"/>','<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>','<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>']},moon:{viewBox:"0 0 24 24",elements:['<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/>']},search:{viewBox:"0 0 24 24",elements:['<circle cx="11" cy="11" r="8"/>','<line x1="21" y1="21" x2="16.65" y2="16.65"/>']},eye:{viewBox:"0 0 24 24",elements:['<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/>','<circle cx="12" cy="12" r="3"/>']},"eye-off":{viewBox:"0 0 24 24",elements:['<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94"/>','<path d="M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19"/>','<line x1="1" y1="1" x2="23" y2="23"/>','<path d="M14.12 14.12a3 3 0 1 1-4.24-4.24"/>']},"chevron-right":{viewBox:"0 0 24 24",elements:['<path d="M9 18l6-6-6-6"/>']},"chevron-left":{viewBox:"0 0 24 24",elements:['<path d="M15 18l-6-6 6-6"/>']},"open-external":{viewBox:"0 0 16 16",elements:['<path d="M6 3H3v10h10v-3M9 1h6v6M7 9L15 1"/>']}},wu="ss-col-resize",la="ss-resizing";function $u(e){const t=Array.from(e.querySelectorAll("thead th"));if(t.length===0)return()=>{};const s=[];let l=!1;function o(){if(!l){l=!0;for(const a of t)a.style.width=a.offsetWidth+"px";e.style.tableLayout="fixed"}}for(const a of t){let i=function(d){d.preventDefault(),d.stopPropagation(),o();const g=d.clientX,v=a.offsetWidth;r.classList.add(la),r.setPointerCapture(d.pointerId);function m(_){const x=_.clientX-g,w=Math.max(30,v+x);a.style.width=w+"px"}function p(){r.classList.remove(la),r.removeEventListener("pointermove",m),r.removeEventListener("pointerup",p)}r.addEventListener("pointermove",m),r.addEventListener("pointerup",p)};if(!a.textContent?.trim())continue;const r=document.createElement("div");r.className=wu,a.appendChild(r),r.addEventListener("pointerdown",i),s.push(()=>{r.removeEventListener("pointerdown",i),r.remove()})}return()=>{for(const a of s)a()}}const ku=["all","error","warn","info","debug"];function oa(e){return(e.levelName||e.level_name||(typeof e.level=="string"?e.level:"")||"info").toLowerCase()}function Su(e){return e.msg||e.message||JSON.stringify(e)}function on(e){return e.createdAt||e.created_at||e.time||e.timestamp||0}function Ms(e){const t=e.data||{};return e.requestId||e.request_id||e["x-request-id"]||t.requestId||t.request_id||t["x-request-id"]||""}function Cu(e,t="ss-dbg-log-level"){switch(e){case"error":case"fatal":return`${t}-error`;case"warn":return`${t}-warn`;case"info":return`${t}-info`;case"debug":return`${t}-debug`;case"trace":return`${t}-trace`;default:return`${t}-info`}}const Tu=["all","active","waiting","delayed","completed","failed"];function Eu(e){switch(e){case"active":return"blue";case"waiting":return"amber";case"delayed":return"purple";case"completed":return"green";case"failed":return"red";default:return"muted"}}function Pu(e){if(!e)return[];if(Array.isArray(e))return e;const t=e;return t.jobs||t.data||[]}function Mu(e){if(!e||Array.isArray(e))return null;const t=e;return t.stats||t.overview||null}function ll(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function aa(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function ol(e,t,s,l=0){return e[t]||e[s]||l}function Au(e){return{method:e.method||"",url:e.url||"",statusCode:ol(e,"status_code","statusCode"),totalDuration:ol(e,"total_duration","totalDuration")||e.duration||0,spanCount:ol(e,"span_count","spanCount"),spans:ll(e.spans),warnings:aa(e.warnings)}}const Ru=["password","secret","token","key","credential","auth"];function Lu(e){const t=e.toLowerCase();return Ru.some(s=>t.includes(s))}function Fu(e){if(e==null)return"-";if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return String(e);if(Array.isArray(e))return e.join(", ")||"-";try{return JSON.stringify(e)}catch{return String(e)}}const Ou={collectionInterval:"Stats Collection",dashboardBroadcast:"Dashboard Broadcast",debugBroadcast:"Debug Broadcast",persistFlush:"Persist Flush",retentionCleanup:"Retention Cleanup"};function Du(e){return Ou[e]||e}const Iu={prometheus:"Prometheus",pinoHook:"Pino Log Hook",edgePlugin:"Edge Plugin",cacheInspector:"Cache Inspector",queueInspector:"Queue Inspector"};function Bu(e){return Iu[e]||e}function Nu(e){return"active"in e?e.active?"active":"inactive":"available"in e?e.available?"available":"unavailable":"unknown"}function ju(e,t){return t.mode?`Mode: ${t.mode}`:e==="edgePlugin"&&t.active?"@serverStats() tag registered":e==="cacheInspector"?t.available?"Redis dependency detected":"Redis not installed":e==="queueInspector"?t.available?"Queue dependency detected":"@rlanz/bull-queue not installed":"-"}function Hu(e){return Object.entries(e).map(([t,s])=>({key:t,value:Fu(s),secret:Lu(t)}))}function Uu(e,t){return t?Math.min(100,Math.round(e/t*100)):0}const qu=["healthy","active","connected","available","ready"],Ku=["errored","unavailable"];function Vu(e){return qu.includes(e)?"ok":Ku.includes(e)?"err":""}function De(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.__redacted===!0}function an(e,t=""){if(typeof e!="object"||e===null||e===void 0)return[{path:t,value:e}];if(Array.isArray(e)||De(e))return[{path:t,value:e}];const s=[];for(const l of Object.keys(e)){const o=t?`${t}.${l}`:l,a=e[l];typeof a=="object"&&a!==null&&!Array.isArray(a)&&!De(a)?s.push(...an(a,o)):s.push({path:o,value:a})}return s}function zu(e){return e==null?{text:"null",color:"var(--ss-dim)"}:typeof e=="boolean"?{text:String(e),color:e?"var(--ss-green-fg)":"var(--ss-red-fg)"}:typeof e=="number"?{text:String(e),color:"var(--ss-amber-fg)"}:Array.isArray(e)?{text:`[${e.map(s=>s==null?"null":typeof s=="object"?JSON.stringify(s):String(s)).join(", ")}]`,color:"var(--ss-purple-fg)"}:typeof e=="object"?{text:JSON.stringify(e),color:"var(--ss-dim)"}:{text:String(e)}}function ia(e){if(e==null||typeof e!="object"||Array.isArray(e)||De(e))return 1;let t=0;for(const s of Object.keys(e))t+=ia(e[s]);return t}function Wu(e){if(e==null||typeof e!="object"||Array.isArray(e)||De(e))return[];const t=[];for(const s of Object.keys(e)){const l=e[s];l!==null&&typeof l=="object"&&!Array.isArray(l)&&!De(l)&&t.push(s)}return t}function Ju(e,t,s){t&&navigator.clipboard.writeText(e).then(()=>{const l=t.textContent;t.textContent="✓",t.classList.add(`${s}-copy-row-ok`),setTimeout(()=>{t.textContent=l,t.classList.remove(`${s}-copy-row-ok`)},1200)}).catch(()=>{})}function Qu(e={}){const{baseUrl:t="",debugEndpoint:s="/admin/api/debug",authToken:l}=e,o=J({...sa}),a=J(!0);return Lt(async()=>{o.value=await mu({baseUrl:t,debugEndpoint:s,authToken:l}),a.value=!1}),{features:o,loading:a}}function ra(){const e=J(Ps());let t=null;function s(o){e.value=o}function l(){const o=tu();return e.value=o,o}return Lt(()=>{e.value=Ps(),t=Xo(s)}),Ft(()=>{t?.()}),{theme:e,toggleTheme:l}}function Ze(e,t={}){const{baseUrl:s="",dashboardEndpoint:l="/__stats/api",authToken:o,perPage:a=50,refreshKey:i}=t,r=J(null),d=J(!1),g=J(null),v=J(!1),m=J("1h"),p=Qt({page:1,perPage:a,total:0,totalPages:1}),_=Qt({search:""}),x=Qt({column:"",direction:"desc"}),w=new xu({baseUrl:s,endpoint:l,authToken:o,section:e(),perPage:a,callbacks:{onData:S=>{P=S},onPagination:S=>{S?(p.total=S.total,p.totalPages=S.lastPage??(Math.ceil(S.total/p.perPage)||1),r.value={data:P,meta:S}):r.value=P},onLoading:S=>{d.value=S},onError:S=>{g.value=S},onUnauthorized:()=>{v.value=!0}}});let P=null;const F=w.getApi();async function A(S){try{return await F.fetchChart(S)}catch(H){return H instanceof tn&&(v.value=!0),null}}async function y(){try{return await F.fetchGroupedQueries()}catch{return null}}async function $(S){try{return await F.explainQuery(S)}catch{return null}}async function T(S){try{return await F.retryJob(S),!0}catch{return!1}}async function Q(S){try{return await F.deleteCacheKey(S),!0}catch{return!1}}async function V(S){try{return(await F.fetchEmailPreview(S))?.html||null}catch{return null}}function G(S){p.page=S,C()}function R(S){_.search=S,p.page=1,C()}function K(S,H){_[S]=H,p.page=1,C()}function se(S,H){x.column===S&&!H?x.direction=x.direction==="asc"?"desc":"asc":(x.column=S,x.direction=H||"desc"),C()}function be(S){m.value=S,C()}async function Ae(S,H="post",ne){return w.mutate(S,H,ne)}function Le(){E(),w.fetch(!0)}function Re(){w.start()}function ge(){w.stop()}function de(){const S={};for(const[H,ne]of Object.entries(_))H!=="search"&&ne!==""&&ne!==void 0&&ne!==null&&(S[H]=String(ne));return S}function E(){const S=e(),H=de();w.configure({page:p.page,perPage:p.perPage,search:_.search||void 0,sort:x.column||void 0,sortDir:x.column?x.direction:void 0,filters:Object.keys(H).length>0?H:void 0,timeRange:S.startsWith("overview")?m.value:void 0})}function C(){E(),w.fetch(!1)}return gt(e,()=>{p.page=1;for(const S of Object.keys(_))S==="search"?_.search="":delete _[S];x.column="",r.value=null,w.setSection(e()),E()}),i&&gt(i,()=>{E(),w.handleRefreshSignal()}),Lt(()=>{E(),w.start()}),Ft(()=>{w.stop()}),{data:r,loading:d,error:g,isUnauthorized:v,pagination:p,filter:_,sort:x,timeRange:m,goToPage:G,setSearch:R,setFilter:K,setSort:se,setTimeRange:be,refresh:Le,startRefresh:Re,stopRefresh:ge,mutate:Ae,fetchChart:A,fetchGroupedQueries:y,explainQuery:$,retryJob:T,deleteCacheKey:Q,fetchEmailPreview:V}}const Gu=["title","aria-label"],Yu=["viewBox","innerHTML"],Xu=["viewBox","innerHTML"],Zu=Oe({__name:"ThemeToggle",props:{classPrefix:{default:"ss-dbg"}},setup(e){const t=e,{theme:s,toggleTheme:l}=ra(),o=q(()=>s.value==="dark"),a=q(()=>o.value?"Switch to light theme":"Switch to dark theme"),i=q(()=>t.classPrefix==="ss-dbg"?"ss-dbg-theme-toggle":"ss-dash-theme-btn");return(r,d)=>(u(),c("button",{type:"button",class:O(i.value),title:a.value,"aria-label":a.value,onClick:d[0]||(d[0]=(...g)=>k(l)&&k(l)(...g))},[o.value?(u(),c("svg",{key:0,width:"16",height:"16",viewBox:k(Me).sun.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Me).sun.elements.join("")},null,8,Yu)):(u(),c("svg",{key:1,width:"16",height:"16",viewBox:k(Me).moon.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Me).moon.elements.join("")},null,8,Xu))],10,Gu))}}),ec=["data-theme"],tc={class:"ss-dash-header"},sc={class:"ss-dash-header-center"},nc={class:"ss-dash-header-right"},lc=["href"],oc={class:"ss-dash-body"},ac={class:"ss-dash-nav"},ic=["data-ss-section","onClick","title"],rc={class:"ss-dash-nav-icon"},uc=["viewBox","innerHTML"],cc={class:"ss-dash-nav-label"},dc={key:0,class:"ss-dash-nav-sep"},fc=["onClick","title"],hc={class:"ss-dash-nav-icon"},pc=["viewBox","innerHTML"],vc={class:"ss-dash-nav-label"},gc=["title"],yc=["viewBox","innerHTML"],mc=["viewBox","innerHTML"],bc={class:"ss-dash-main"},_c=["id"],xc={class:"ss-dash-pane-inner"},wc={key:1,class:"ss-dash-empty"},$c=Oe({__name:"DashboardPage",props:{baseUrl:{default:""},dashboardEndpoint:{default:"/__stats/api"},debugEndpoint:{default:void 0},authToken:{default:void 0},backUrl:{default:"/"},channelName:{default:"server-stats/dashboard"}},setup(e){const t=lt(()=>Promise.resolve().then(()=>Af)),s=lt(()=>Promise.resolve().then(()=>bh)),l=lt(()=>Promise.resolve().then(()=>ep)),o=lt(()=>Promise.resolve().then(()=>ip)),a=lt(()=>Promise.resolve().then(()=>gp)),i=lt(()=>Promise.resolve().then(()=>Dp)),r=lt(()=>Promise.resolve().then(()=>Zp)),d=lt(()=>Promise.resolve().then(()=>hv)),g=lt(()=>Promise.resolve().then(()=>Fv)),v=lt(()=>Promise.resolve().then(()=>lg)),m=lt(()=>Promise.resolve().then(()=>Lg)),p=lt(()=>Promise.resolve().then(()=>p1)),_=["overview","requests","queries","events","routes","logs","emails","timeline","cache","jobs","config","internals"],x=e,{theme:w}=ra(),{features:P}=Qu({baseUrl:x.baseUrl,debugEndpoint:x.debugEndpoint,authToken:x.authToken}),F=J("overview"),A=J(!1),y=J(!1),$=J(0);ss("ss-refresh-key",$),ss("ss-base-url",x.baseUrl),ss("ss-dashboard-endpoint",x.dashboardEndpoint),ss("ss-debug-endpoint",x.debugEndpoint),ss("ss-auth-token",x.authToken),typeof window<"u"&&(A.value=localStorage.getItem("ss-dash-sidebar")==="collapsed");let T=null;function Q(){if(T&&(T(),T=null),!x.channelName)return;T=Xr({baseUrl:x.baseUrl,channelName:x.channelName,authToken:x.authToken,onMessage:()=>{$.value+=1},onConnect:()=>{y.value=!0},onDisconnect:()=>{y.value=!1},onError:()=>{y.value=!1}}).unsubscribe}Lt(()=>{Q()}),Ft(()=>{T&&(T(),T=null)});const V=q(()=>P.value.customPanes||[]);function G(S){const H=S.replace("#","").split("?")[0];return H&&[..._,...V.value.map(Te=>Te.id)].includes(H)?H:"overview"}function R(){const S=G(window.location.hash);S!==F.value&&(F.value=S)}Lt(()=>{if(typeof window>"u")return;const S=G(window.location.hash);(S!=="overview"||window.location.hash)&&(F.value=S),window.addEventListener("hashchange",R)}),Ft(()=>{window.removeEventListener("hashchange",R)}),gt(F,S=>{typeof window<"u"&&(window.location.hash=S)});function K(){A.value=!A.value,localStorage.setItem("ss-dash-sidebar",A.value?"collapsed":"expanded")}function se(S){S!==F.value&&(F.value=S)}const be=q(()=>[{id:"overview",label:"Overview",visible:!0},{id:"requests",label:"Requests",visible:!0},{id:"queries",label:"Queries",visible:!0},{id:"events",label:"Events",visible:!0},{id:"routes",label:"Routes",visible:!0},{id:"logs",label:"Logs",visible:!0},{id:"emails",label:"Emails",visible:!0},{id:"timeline",label:"Timeline",visible:P.value.tracing},{id:"cache",label:"Cache",visible:P.value.cache},{id:"jobs",label:"Jobs",visible:P.value.queues},{id:"config",label:"Config",visible:!0},{id:"internals",label:"Internals",visible:!0}]),Ae=q(()=>be.value.filter(S=>S.visible)),{data:Le}=Ze(()=>"overview",{baseUrl:x.baseUrl,dashboardEndpoint:x.dashboardEndpoint,authToken:x.authToken,refreshKey:$}),Re=q(()=>Le.value),ge=q(()=>{const S={};if(!Re.value)return S;if(Re.value.totalRequests>0&&(S.requests={count:Re.value.totalRequests}),Re.value.queryStats?.total>0&&(S.queries={count:Re.value.queryStats.total}),Re.value.logLevelBreakdown){const H=Re.value.logLevelBreakdown,ne=H.error+H.warn+H.info+H.debug;ne>0&&(S.logs={count:ne})}return S}),de={overview:t,requests:s,queries:l,events:o,routes:a,logs:i,emails:r,timeline:d,cache:g,jobs:v,config:m,internals:p},E=q(()=>de[F.value]||null);function C(S){return S==="timeline"?"dashboard-timeline":S}return(S,H)=>(u(),c("div",{class:"ss-dash","data-theme":k(w),id:"ss-dash"},[n("div",tc,[H[0]||(H[0]=n("div",{class:"ss-dash-header-left"},[n("span",{class:"ss-dash-logo"},"Server Stats"),n("span",{class:"ss-dash-logo-sub"},"Dashboard")],-1)),n("div",sc,[n("span",{class:O(["ss-dash-live-dot",{"ss-dash-connected":y.value}]),id:"ss-dash-live-dot"},null,2),n("span",{class:O(["ss-dash-live-label",{"ss-dash-connected":y.value}]),id:"ss-dash-live-label"},f(y.value?"Live":"Polling"),3)]),n("div",nc,[me(Zu,{"class-prefix":"ss-dash"}),e.backUrl?(u(),c("a",{key:0,href:e.backUrl,class:"ss-dash-back-link",title:"Back to app"}," ← App ",8,lc)):te("",!0)])]),n("div",oc,[n("div",{class:O(["ss-dash-sidebar",{"ss-dash-collapsed":A.value}]),id:"ss-dash-sidebar"},[n("nav",ac,[(u(!0),c(U,null,ye(Ae.value,ne=>(u(),c("button",{key:ne.id,type:"button",class:O(["ss-dash-nav-item",{"ss-dash-active":F.value===ne.id}]),"data-ss-section":ne.id,onClick:Te=>se(ne.id),title:A.value?ne.label:void 0},[n("span",rc,[(u(),c("svg",{width:"20",height:"20",viewBox:(k(Me)[C(ne.id)]||k(Me).config).viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:(k(Me)[C(ne.id)]||k(Me).config).elements.join("")},null,8,uc))]),n("span",cc,f(ne.label),1),ge.value[ne.id]&&ge.value[ne.id].count>0?(u(),c("span",{key:0,class:O(["ss-dash-nav-badge",ge.value[ne.id].variant||""])},f(ge.value[ne.id].count),3)):te("",!0)],10,ic))),128)),V.value.length>0?(u(),c("div",dc)):te("",!0),(u(!0),c(U,null,ye(V.value,ne=>(u(),c("button",{key:ne.id,type:"button",class:O(["ss-dash-nav-item",{"ss-dash-active":F.value===ne.id}]),onClick:Te=>se(ne.id),title:A.value?ne.label:void 0},[n("span",hc,[(u(),c("svg",{width:"20",height:"20",viewBox:k(Me)["custom-pane"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Me)["custom-pane"].elements.join("")},null,8,pc))]),n("span",vc,f(ne.label),1)],10,fc))),128))]),n("button",{type:"button",class:"ss-dash-sidebar-toggle",id:"ss-dash-sidebar-toggle",onClick:K,title:A.value?"Expand sidebar":"Collapse sidebar"},[A.value?(u(),c("svg",{key:0,width:"16",height:"16",viewBox:k(Me)["chevron-right"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:k(Me)["chevron-right"].elements.join("")},null,8,yc)):(u(),c("svg",{key:1,width:"16",height:"16",viewBox:k(Me)["chevron-left"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:k(Me)["chevron-left"].elements.join("")},null,8,mc))],8,gc)],2),n("div",bc,[n("div",{class:"ss-dash-pane ss-dash-active",id:`ss-dash-pane-${F.value}`},[n("div",xc,[(u(),Xe(Zi,null,{fallback:ts(()=>[...H[1]||(H[1]=[n("div",{class:"ss-dash-empty"},"Loading...",-1)])]),default:ts(()=>[E.value?(u(),Xe(Si(E.value),{key:0})):(u(),c("div",wc,"Unknown section"))]),_:1}))])],8,_c)])])],8,ec))}});function kc(e){const t=document.getElementById(e);return t?JSON.parse(t.textContent||"{}"):{}}function Sc(){function e(t){document.documentElement.setAttribute("data-theme",t)}e(Ps()),Xo(e)}const ds=kc("ss-dash-config");Sc();const ua=document.getElementById("ss-dash");ua&&Wr($c,{baseUrl:ds.baseUrl,dashboardEndpoint:ds.dashboardEndpoint,debugEndpoint:ds.debugEndpoint,authToken:ds.authToken,backUrl:ds.backUrl,channelName:ds.channelName}).mount(ua);const Cc=["width","height","viewBox"],Tc=["id"],Ec=["stop-color"],Pc=["stop-color"],Mc=["d","fill"],Ac=["d","stroke"],Rc=["x","y"],rn=Oe({__name:"Sparkline",props:{data:{},color:{default:"#34d399"},width:{default:120},height:{default:32}},setup(e){const t=e,s=q(()=>ru(t.data,{width:t.width,height:t.height,color:t.color})),l=q(()=>s.value!==null),o=q(()=>`sg-${t.color.replace("#","")}`);return(a,i)=>(u(),c("div",{class:"ss-dash-sparkline",style:Ke({"--ss-accent":e.color})},[(u(),c("svg",{width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:{display:"block"}},[l.value&&s.value?(u(),c(U,{key:0},[n("defs",null,[n("linearGradient",{id:o.value,x1:"0",y1:"0",x2:"0",y2:"1"},[n("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.25"},null,8,Ec),n("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0.02"},null,8,Pc)],8,Tc)]),n("path",{d:s.value.areaPath,fill:`url(#${o.value})`},null,8,Mc),n("path",{class:"ss-dash-sparkline-line",d:"M"+s.value.points.replace(/ /g," L"),fill:"none",stroke:e.color,"stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"},null,8,Ac)],64)):(u(),c("text",{key:1,x:e.width/2,y:e.height/2+3,"text-anchor":"middle",fill:"#737373","font-size":"9"}," collecting... ",8,Rc))],8,Cc))],4))}}),Lc={class:"ss-dash-btn-group"},Fc=["onClick"],Oc=Oe({__name:"TimeRangeSelector",props:{modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const s=t,l=[{value:"5m",label:"5m"},{value:"15m",label:"15m"},{value:"30m",label:"30m"},{value:"1h",label:"1h"},{value:"6h",label:"6h"},{value:"24h",label:"24h"},{value:"7d",label:"7d"}];return(o,a)=>(u(),c("div",Lc,[(u(),c(U,null,ye(l,i=>n("button",{key:i.value,type:"button",class:O(`ss-dash-btn ${e.modelValue===i.value?"ss-dash-active":""}`),onClick:r=>s("update:modelValue",i.value)},f(i.label),11,Fc)),64))]))}}),Dc={class:"ss-dash-overview"},Ic={key:0,class:"ss-dash-empty"},Bc={class:"ss-dash-cards"},Nc={class:"ss-dash-card"},jc={class:"ss-dash-sparkline"},Hc={class:"ss-dash-card"},Uc={class:"ss-dash-sparkline"},qc={class:"ss-dash-card"},Kc={class:"ss-dash-sparkline"},Vc={class:"ss-dash-card"},zc={class:"ss-dash-sparkline"},Wc={class:"ss-dash-chart-container"},Jc={class:"ss-dash-chart-header"},Qc={class:"ss-dash-chart",id:"ss-dash-chart-area"},Gc={key:0,class:"ss-dash-empty",style:{"min-height":"120px"}},Yc=["viewBox"],Xc=["id"],Zc=["id"],ed=["x1","y1","x2","y2"],td=["x","y"],sd=["d","fill"],nd=["d"],ld=["d","fill"],od=["d"],ad=["x","y","width","height","data-idx","onMouseenter"],id=["cx","cy","r","data-idx","opacity"],rd=["cx","cy","r","data-idx","opacity"],ud=["x","y"],cd={key:0,style:{color:"var(--ss-red-fg)"}},dd={class:"ss-dash-chart-legend",id:"ss-dash-chart-legend"},fd={key:0,class:"ss-dash-chart-legend-item"},hd={class:"ss-dash-secondary-cards"},pd={class:"ss-dash-secondary-card"},vd={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},gd={key:1,class:"ss-dash-secondary-list"},yd=["href"],md=["title"],bd={class:"ss-dash-secondary-card"},_d={class:"ss-dash-secondary-list"},xd={class:"ss-dash-secondary-list-value"},wd={class:"ss-dash-secondary-list-value"},$d={class:"ss-dash-secondary-list-value"},kd={class:"ss-dash-secondary-card"},Sd={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},Cd={key:1,class:"ss-dash-secondary-list"},Td=["href"],Ed=["title"],Pd=["title"],Md={class:"ss-dash-secondary-card"},Ad={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},Rd={key:1,class:"ss-dash-secondary-list"},Ld=["href"],Fd={class:"ss-dash-secondary-list-value"},Od={class:"ss-dash-secondary-card"},Dd={class:"ss-dash-secondary-list"},Id={href:"#emails?status=sent",class:"ss-dash-widget-row-link"},Bd={class:"ss-dash-secondary-list-value"},Nd={href:"#emails?status=queued",class:"ss-dash-widget-row-link"},jd={class:"ss-dash-secondary-list-value"},Hd={href:"#emails?status=failed",class:"ss-dash-widget-row-link"},Ud={class:"ss-dash-secondary-card"},qd={class:"ss-dash-secondary-list"},Kd={href:"#logs?level=error",class:"ss-dash-widget-row-link"},Vd={class:"ss-dash-secondary-list-value"},zd={href:"#logs?level=warn",class:"ss-dash-widget-row-link"},Wd={class:"ss-dash-secondary-list-value"},Jd={href:"#logs?level=info",class:"ss-dash-widget-row-link"},Qd={class:"ss-dash-secondary-list-value"},Gd={href:"#logs?level=debug",class:"ss-dash-widget-row-link"},Yd={class:"ss-dash-secondary-list-value"},Xd={key:0,class:"ss-dash-secondary-card"},Zd={class:"ss-dash-secondary-list"},ef={href:"#cache",class:"ss-dash-widget-row-link"},tf={class:"ss-dash-secondary-list-value"},sf={href:"#cache",class:"ss-dash-widget-row-link"},nf={class:"ss-dash-secondary-list-value"},lf={href:"#cache",class:"ss-dash-widget-row-link"},of={class:"ss-dash-secondary-list-value"},af={key:1,class:"ss-dash-secondary-card"},rf={class:"ss-dash-secondary-list"},uf={href:"#jobs?status=active",class:"ss-dash-widget-row-link"},cf={class:"ss-dash-secondary-list-value"},df={href:"#jobs?status=waiting",class:"ss-dash-widget-row-link"},ff={class:"ss-dash-secondary-list-value"},hf={href:"#jobs?status=failed",class:"ss-dash-widget-row-link"},pf={href:"#jobs?status=completed",class:"ss-dash-widget-row-link"},vf={class:"ss-dash-secondary-list-value"},gf={class:"ss-dash-secondary-card"},yf={class:"ss-dash-secondary-list"},mf={href:"#requests?status=2xx",class:"ss-dash-widget-row-link"},bf={class:"ss-dash-secondary-list-value"},_f={href:"#requests?status=3xx",class:"ss-dash-widget-row-link"},xf={class:"ss-dash-secondary-list-value"},wf={href:"#requests?status=4xx",class:"ss-dash-widget-row-link"},$f={class:"ss-dash-secondary-list-value"},kf={href:"#requests?status=5xx",class:"ss-dash-widget-row-link"},Sf={class:"ss-dash-secondary-list-value"},Cf={class:"ss-dash-secondary-card"},Tf={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},Ef={key:1,class:"ss-dash-secondary-list"},Pf=["href"],Mf=["title"],al=220,ca=120,Af=Object.freeze(Object.defineProperty({__proto__:null,default:((e,t)=>{const s=e.__vccOpts||e;for(const[l,o]of t)s[l]=o;return s})(Oe({__name:"OverviewSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-dashboard-endpoint","/__stats/api"),o=re("ss-auth-token",void 0),a=Math.random().toString(36).slice(2,8),i=J("1h"),{data:r,loading:d}=Ze(()=>"overview",{baseUrl:s,dashboardEndpoint:l,authToken:o,refreshKey:t}),{data:g,setTimeRange:v}=Ze(()=>"overview/chart",{baseUrl:s,dashboardEndpoint:l,authToken:o,refreshKey:t});gt(i,Z=>{v(Z)});const m=q(()=>r.value),p=q(()=>m.value||{avgResponseTime:0,p95ResponseTime:0,requestsPerMinute:0,errorRate:0,totalRequests:0,slowestEndpoints:[],queryStats:{total:0,avgDuration:0,perRequest:0},recentErrors:[],topEvents:[],emailActivity:{sent:0,queued:0,failed:0},logLevelBreakdown:{error:0,warn:0,info:0,debug:0},cacheStats:null,jobQueueStatus:null,statusDistribution:{"2xx":0,"3xx":0,"4xx":0,"5xx":0},slowestQueries:[]}),_=q(()=>p.value),x=q(()=>p.value.avgResponseTime||Number(_.value.avg_response_time)||0),w=q(()=>p.value.p95ResponseTime||Number(_.value.p95_response_time)||0),P=q(()=>p.value.requestsPerMinute||Number(_.value.requests_per_minute)||0),F=q(()=>p.value.errorRate||Number(_.value.error_rate)||0),A=q(()=>p.value.totalRequests||Number(_.value.total_requests)||0),y=q(()=>A.value>0),$=q(()=>g.value?.buckets||[]),T=q(()=>p.value.sparklines?.avgResponseTime??$.value.map(Z=>Z.avgDuration??0)),Q=q(()=>p.value.sparklines?.p95ResponseTime??$.value.map(Z=>Z.p95Duration??0)),V=q(()=>p.value.sparklines?.requestsPerMinute??$.value.map(Z=>Z.requestCount??0)),G=q(()=>p.value.sparklines?.errorRate??$.value.map(Z=>Z.errorCount??0)),R=q(()=>`ss-cg-total-${a}`),K=q(()=>`ss-cg-error-${a}`);function se(Z,L){if(Z<=0)return[0];const le=Z/L,fe=Math.pow(10,Math.floor(Math.log10(le))),ot=le/fe;let tt;ot<=1?tt=fe:ot<=2?tt=2*fe:ot<=5?tt=5*fe:tt=10*fe;const dn=[];for(let rl=tt;rl<=Z+tt*.5;rl+=tt)dn.push(Math.round(rl));return dn.length===0&&dn.push(Math.ceil(Z)),dn}function be(Z){try{return new Date(Z).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return""}}function Ae(Z){if(Z.length===0)return"";if(Z.length===1)return`M${Z[0].x},${Z[0].y}`;let L=`M${Z[0].x.toFixed(1)},${Z[0].y.toFixed(1)}`;for(let le=0;le<Z.length-1;le++){const fe=Z[le],ot=Z[le+1],tt=(fe.x+ot.x)/2;L+=` C${tt.toFixed(1)},${fe.y.toFixed(1)} ${tt.toFixed(1)},${ot.y.toFixed(1)} ${ot.x.toFixed(1)},${ot.y.toFixed(1)}`}return L}function Le(Z){const L=nn(Z);return L==="very-slow"?"ss-dash-very-slow":L==="slow"?"ss-dash-slow":""}const Re=J(null),ge=J(0);let de=null;gt(Re,Z=>{de?.disconnect(),de=null,Z&&(ge.value=Z.clientWidth,de=new ResizeObserver(L=>{for(const le of L)ge.value=le.contentRect.width}),de.observe(Z))}),Ft(()=>{de?.disconnect()});const E={top:12,right:12,bottom:28,left:38},C=q(()=>ge.value||600),S=q(()=>C.value-E.left-E.right),H=q(()=>al-E.top-E.bottom),ne=q(()=>E.top+H.value),Te=q(()=>$.value.map(Z=>{const L=Z;return(Z.requestCount??0)+(Number(L.request_count)||0)||Z.total||0})),X=q(()=>$.value.map(Z=>{const L=Z;return(Z.errorCount??0)+(Number(L.error_count)||0)})),ie=q(()=>Math.max(...Te.value,1)),z=q(()=>Math.ceil(ie.value*1.1)),oe=q(()=>X.value.some(Z=>Z>0)),Ie=q(()=>se(z.value,4)),cn=q(()=>Ie.value.length>0?Ie.value[Ie.value.length-1]:z.value);function Tt(Z){return E.left+Z/Math.max($.value.length-1,1)*S.value}function fs(Z){return E.top+H.value-Z/(cn.value||1)*H.value}const h=q(()=>$.value.map((Z,L)=>({x:Tt(L),y:fs(Te.value[L])}))),b=q(()=>$.value.map((Z,L)=>({x:Tt(L),y:fs(X.value[L])}))),M=q(()=>Ae(h.value)),j=q(()=>oe.value?Ae(b.value):""),D=q(()=>h.value.length>1?`${M.value} L${h.value[h.value.length-1].x.toFixed(1)},${ne.value} L${h.value[0].x.toFixed(1)},${ne.value} Z`:""),I=q(()=>oe.value&&b.value.length>1?`${j.value} L${b.value[b.value.length-1].x.toFixed(1)},${ne.value} L${b.value[0].x.toFixed(1)},${ne.value} Z`:""),Y=q(()=>Math.min(10,$.value.length)),W=q(()=>Math.max(1,Math.ceil($.value.length/Y.value))),B=J({visible:!1,x:0,idx:-1});function N(Z){const L=h.value[Z].x;B.value={visible:!0,x:L,idx:Z}}function ce(){B.value={visible:!1,x:0,idx:-1}}const ee=q(()=>B.value.visible?Math.max(ca/2,Math.min(B.value.x,C.value-ca/2)):0),ae=q(()=>S.value/($.value.length||1));function he(Z){return Z%W.value===0||Z===$.value.length-1}function xe(){return y.value?x.value>500?"ss-dash-red":x.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Ce(){return y.value?w.value>500?"ss-dash-red":w.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function $e(){return y.value?"ss-dash-accent":"ss-dash-dim"}function qe(){return y.value?F.value>5?"ss-dash-red":F.value>1?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Be(Z){return Z.url||Z.pattern||"-"}function et(Z){return Z.name||Z.eventName||Z.event_name||Z.event||""}function Ye(Z){return Z.sqlNormalized||Z.normalizedSql||Z.sql_normalized||Z.sql||"-"}return(Z,L)=>(u(),c("div",Dc,[k(d)&&!m.value?(u(),c("div",Ic,"Loading overview...")):(u(),c(U,{key:1},[n("div",Bc,[n("div",Nc,[L[1]||(L[1]=n("div",{class:"ss-dash-card-title"},"Avg Response Time",-1)),n("div",{class:O(["ss-dash-card-value",xe()])},f(y.value?k(Dt)(x.value):"-"),3),n("div",jc,[me(rn,{data:T.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Hc,[L[2]||(L[2]=n("div",{class:"ss-dash-card-title"},"P95 Response Time",-1)),n("div",{class:O(["ss-dash-card-value",Ce()])},f(y.value?k(Dt)(w.value):"-"),3),n("div",Uc,[me(rn,{data:Q.value,color:"#60a5fa",width:160,height:40},null,8,["data"])])]),n("div",qc,[L[3]||(L[3]=n("div",{class:"ss-dash-card-title"},"Requests / min",-1)),n("div",{class:O(["ss-dash-card-value",$e()])},f(y.value?P.value.toFixed(1):"-"),3),n("div",Kc,[me(rn,{data:V.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Vc,[L[4]||(L[4]=n("div",{class:"ss-dash-card-title"},"Error Rate",-1)),n("div",{class:O(["ss-dash-card-value",qe()])},f(y.value?`${F.value.toFixed(1)}%`:"-"),3),n("div",zc,[me(rn,{data:G.value,color:"#f87171",width:160,height:40},null,8,["data"])])])]),n("div",Wc,[n("div",Jc,[L[5]||(L[5]=n("span",{class:"ss-dash-chart-title"},"Request Volume",-1)),me(Oc,{"model-value":i.value,"onUpdate:modelValue":L[0]||(L[0]=le=>i.value=le)},null,8,["model-value"])]),n("div",Qc,[$.value.length===0?(u(),c("div",Gc," No data for this range ")):(u(),c("div",{key:1,ref_key:"chartContainerRef",ref:Re,style:{position:"relative"}},[(u(),c("svg",{viewBox:`0 0 ${C.value} ${al}`,class:"ss-dash-chart-svg"},[n("defs",null,[n("linearGradient",{id:R.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...L[6]||(L[6]=[n("stop",{offset:"0%","stop-color":"var(--ss-accent)","stop-opacity":"0.3"},null,-1),n("stop",{offset:"100%","stop-color":"var(--ss-accent)","stop-opacity":"0.02"},null,-1)])],8,Xc),n("linearGradient",{id:K.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...L[7]||(L[7]=[n("stop",{offset:"0%","stop-color":"var(--ss-red-fg)","stop-opacity":"0.35"},null,-1),n("stop",{offset:"100%","stop-color":"var(--ss-red-fg)","stop-opacity":"0.02"},null,-1)])],8,Zc)]),(u(!0),c(U,null,ye(Ie.value,le=>(u(),c("g",{key:`ytick-${le}`},[n("line",{x1:E.left,y1:fs(le),x2:C.value-E.right,y2:fs(le),stroke:"var(--ss-border-faint)","stroke-width":"0.5","stroke-dasharray":"3,3"},null,8,ed),n("text",{x:E.left-6,y:fs(le),"text-anchor":"end",fill:"var(--ss-dim)","font-size":"9","dominant-baseline":"middle"},f(le),9,td)]))),128)),D.value?(u(),c("path",{key:0,d:D.value,fill:`url(#${R.value})`},null,8,sd)):te("",!0),M.value?(u(),c("path",{key:1,d:M.value,fill:"none",stroke:"var(--ss-accent)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"},null,8,nd)):te("",!0),I.value?(u(),c("path",{key:2,d:I.value,fill:`url(#${K.value})`},null,8,ld)):te("",!0),j.value?(u(),c("path",{key:3,d:j.value,fill:"none",stroke:"var(--ss-red-fg)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round","stroke-dasharray":"4,2"},null,8,od)):te("",!0),(u(!0),c(U,null,ye($.value,(le,fe)=>(u(),c("g",{key:fe},[n("rect",{x:h.value[fe].x-ae.value/2,y:E.top,width:ae.value,height:H.value,fill:"transparent",class:"ss-dash-chart-hover-zone","data-idx":fe,onMouseenter:ot=>N(fe),onMouseleave:ce},null,40,ad),Te.value[fe]>0?(u(),c("circle",{key:0,cx:h.value[fe].x,cy:h.value[fe].y,r:B.value.visible&&B.value.idx===fe?4:2.5,fill:"var(--ss-accent)",stroke:"var(--ss-surface)","stroke-width":"1",class:"ss-dash-chart-dot","data-idx":fe,opacity:B.value.visible&&B.value.idx!==fe?.3:1},null,8,id)):te("",!0),X.value[fe]>0?(u(),c("circle",{key:1,cx:h.value[fe].x,cy:b.value[fe].y,r:B.value.visible&&B.value.idx===fe?3.5:2,fill:"var(--ss-red-fg)",stroke:"var(--ss-surface)","stroke-width":"1",class:"ss-dash-chart-dot ss-dash-chart-dot-err","data-idx":fe,opacity:B.value.visible&&B.value.idx!==fe?.3:1},null,8,rd)):te("",!0)]))),128)),(u(!0),c(U,null,ye($.value,(le,fe)=>(u(),c(U,{key:`xlabel-${fe}`},[he(fe)&&be(le.bucket)?(u(),c("text",{key:0,x:Tt(fe),y:al-6,"text-anchor":"middle",fill:"var(--ss-dim)","font-size":"9"},f(be(le.bucket)),9,ud)):te("",!0)],64))),128))],8,Yc)),B.value.visible&&B.value.idx>=0?(u(),c("div",{key:0,class:"ss-dash-chart-tooltip",style:Ke({left:ee.value+"px",top:E.top-4+"px",transform:"translate(-50%, -100%)"})},[n("div",null,f(be($.value[B.value.idx].bucket)),1),n("div",null,"Requests: "+f(Te.value[B.value.idx]),1),X.value[B.value.idx]>0?(u(),c("div",cd," Errors: "+f(X.value[B.value.idx]),1)):te("",!0)],4)):te("",!0)],512))]),n("div",dd,[L[9]||(L[9]=n("span",{class:"ss-dash-chart-legend-item"},[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-accent)"}}),_e(" Requests ")],-1)),$.value.some(le=>(le.errorCount??0)>0)?(u(),c("span",fd,[...L[8]||(L[8]=[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-red-fg)"}},null,-1),_e(" Errors ",-1)])])):te("",!0)])]),n("div",hd,[n("div",pd,[L[10]||(L[10]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Slowest Endpoints")],-1)),p.value.slowestEndpoints.length===0?(u(),c("div",vd," No data yet ")):(u(),c("ul",gd,[(u(!0),c(U,null,ye(p.value.slowestEndpoints.slice(0,5),(le,fe)=>(u(),c("li",{key:fe},[n("a",{href:`#requests?url=${encodeURIComponent(Be(le))}`,class:"ss-dash-widget-row-link"},[n("span",{title:Be(le)},f(Be(le)),9,md),n("span",{class:O(["ss-dash-secondary-list-value","ss-dash-duration",Le(le.avgDuration)])},f(k(Dt)(le.avgDuration)),3)],8,yd)]))),128))]))]),n("div",bd,[L[14]||(L[14]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Query Stats")],-1)),n("ul",_d,[n("li",null,[L[11]||(L[11]=n("span",null,"Total Queries",-1)),n("span",xd,f(p.value.queryStats.total),1)]),n("li",null,[L[12]||(L[12]=n("span",null,"Avg Duration",-1)),n("span",wd,f(k(Dt)(p.value.queryStats.avgDuration)),1)]),n("li",null,[L[13]||(L[13]=n("span",null,"Queries / Request",-1)),n("span",$d,f(p.value.queryStats.perRequest.toFixed(1)),1)])])]),n("div",kd,[L[15]||(L[15]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs?level=error",class:"ss-dash-widget-link"},"Recent Errors")],-1)),p.value.recentErrors.length===0?(u(),c("div",Sd," No recent errors ")):(u(),c("ul",Cd,[(u(!0),c(U,null,ye(p.value.recentErrors,(le,fe)=>(u(),c("li",{key:fe},[n("a",{href:`#logs?id=${le.id??""}`,class:"ss-dash-widget-row-link"},[n("span",{style:{color:"var(--ss-red-fg)"},title:le.message},f(le.message),9,Ed),le.timestamp?(u(),c("span",{key:0,class:"ss-dash-secondary-list-value",style:{color:"var(--ss-dim)"},title:k(It)(le.timestamp)},f(k(bt)(le.timestamp)),9,Pd)):te("",!0)],8,Td)]))),128))]))]),n("div",Md,[L[16]||(L[16]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#events",class:"ss-dash-widget-link"},"Top Events")],-1)),p.value.topEvents.length===0?(u(),c("div",Ad," No events yet ")):(u(),c("ul",Rd,[(u(!0),c(U,null,ye(p.value.topEvents.slice(0,5),(le,fe)=>(u(),c("li",{key:fe},[n("a",{href:`#events?event_name=${encodeURIComponent(et(le))}`,class:"ss-dash-widget-row-link"},[n("span",null,f(et(le)),1),n("span",Fd,f(le.count),1)],8,Ld)]))),128))]))]),n("div",Od,[L[20]||(L[20]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#emails",class:"ss-dash-widget-link"},"Email Activity")],-1)),n("ul",Dd,[n("li",null,[n("a",Id,[L[17]||(L[17]=n("span",null,"Sent",-1)),n("span",Bd,f(p.value.emailActivity.sent),1)])]),n("li",null,[n("a",Nd,[L[18]||(L[18]=n("span",null,"Queued",-1)),n("span",jd,f(p.value.emailActivity.queued),1)])]),n("li",null,[n("a",Hd,[L[19]||(L[19]=n("span",null,"Failed",-1)),n("span",{class:"ss-dash-secondary-list-value",style:Ke(p.value.emailActivity.failed>0?{color:"var(--ss-red-fg)"}:void 0)},f(p.value.emailActivity.failed),5)])])])]),n("div",Ud,[L[25]||(L[25]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs",class:"ss-dash-widget-link"},"Log Levels")],-1)),n("ul",qd,[n("li",null,[n("a",Kd,[L[21]||(L[21]=n("span",{style:{color:"var(--ss-red-fg)"}},"Error",-1)),n("span",Vd,f(p.value.logLevelBreakdown.error),1)])]),n("li",null,[n("a",zd,[L[22]||(L[22]=n("span",{style:{color:"var(--ss-amber-fg)"}},"Warn",-1)),n("span",Wd,f(p.value.logLevelBreakdown.warn),1)])]),n("li",null,[n("a",Jd,[L[23]||(L[23]=n("span",{style:{color:"var(--ss-green-fg)"}},"Info",-1)),n("span",Qd,f(p.value.logLevelBreakdown.info),1)])]),n("li",null,[n("a",Gd,[L[24]||(L[24]=n("span",{style:{color:"var(--ss-dim)"}},"Debug",-1)),n("span",Yd,f(p.value.logLevelBreakdown.debug),1)])])])]),p.value.cacheStats&&p.value.cacheStats.available?(u(),c("div",Xd,[L[29]||(L[29]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#cache",class:"ss-dash-widget-link"},"Cache")],-1)),n("ul",Zd,[n("li",null,[n("a",ef,[L[26]||(L[26]=n("span",null,"Keys",-1)),n("span",tf,f(p.value.cacheStats.totalKeys),1)])]),n("li",null,[n("a",sf,[L[27]||(L[27]=n("span",null,"Hit Rate",-1)),n("span",nf,f(p.value.cacheStats.hitRate.toFixed(1))+"%",1)])]),n("li",null,[n("a",lf,[L[28]||(L[28]=n("span",null,"Memory",-1)),n("span",of,f(p.value.cacheStats.memoryUsedHuman),1)])])])])):te("",!0),p.value.jobQueueStatus&&p.value.jobQueueStatus.available?(u(),c("div",af,[L[34]||(L[34]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#jobs",class:"ss-dash-widget-link"},"Job Queue")],-1)),n("ul",rf,[n("li",null,[n("a",uf,[L[30]||(L[30]=n("span",null,"Active",-1)),n("span",cf,f(p.value.jobQueueStatus.active),1)])]),n("li",null,[n("a",df,[L[31]||(L[31]=n("span",null,"Waiting",-1)),n("span",ff,f(p.value.jobQueueStatus.waiting),1)])]),n("li",null,[n("a",hf,[L[32]||(L[32]=n("span",null,"Failed",-1)),n("span",{class:"ss-dash-secondary-list-value",style:Ke(p.value.jobQueueStatus.failed>0?{color:"var(--ss-red-fg)"}:void 0)},f(p.value.jobQueueStatus.failed),5)])]),n("li",null,[n("a",pf,[L[33]||(L[33]=n("span",null,"Completed",-1)),n("span",vf,f(p.value.jobQueueStatus.completed),1)])])])])):te("",!0),n("div",gf,[L[39]||(L[39]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Response Status")],-1)),n("ul",yf,[n("li",null,[n("a",mf,[L[35]||(L[35]=n("span",{style:{color:"var(--ss-green-fg)"}},"2xx",-1)),n("span",bf,f(p.value.statusDistribution["2xx"]),1)])]),n("li",null,[n("a",_f,[L[36]||(L[36]=n("span",{style:{color:"var(--ss-blue-fg)"}},"3xx",-1)),n("span",xf,f(p.value.statusDistribution["3xx"]),1)])]),n("li",null,[n("a",wf,[L[37]||(L[37]=n("span",{style:{color:"var(--ss-amber-fg)"}},"4xx",-1)),n("span",$f,f(p.value.statusDistribution["4xx"]),1)])]),n("li",null,[n("a",kf,[L[38]||(L[38]=n("span",{style:{color:"var(--ss-red-fg)"}},"5xx",-1)),n("span",Sf,f(p.value.statusDistribution["5xx"]),1)])])])]),n("div",Cf,[L[40]||(L[40]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Slowest Queries")],-1)),p.value.slowestQueries.length===0?(u(),c("div",Tf," No query data yet ")):(u(),c("ul",Ef,[(u(!0),c(U,null,ye(p.value.slowestQueries.slice(0,5),(le,fe)=>(u(),c("li",{key:fe},[n("a",{href:`#queries?pattern=${encodeURIComponent(Ye(le))}`,class:"ss-dash-widget-row-link"},[n("span",{title:Ye(le)},f(Ye(le)),9,Mf),n("span",{class:O(["ss-dash-secondary-list-value","ss-dash-duration",Le(le.avgDuration)])},f(k(Dt)(le.avgDuration)),3)],8,Pf)]))),128))]))])])],64))]))}}),[["__scopeId","data-v-1e96b18b"]])},Symbol.toStringTag,{value:"Module"}));function un(e="",t){let s=null;return function(){return s||(s=new sl({baseUrl:e,authToken:t})),s}}function Bt(e){const t=J(null);let s=null;function l(){s&&s(),s=null,Hl(()=>{t.value&&(s=$u(t.value))})}return e&&gt(e,l),Lt(l),Zl(()=>{s&&s(),s=null}),{tableRef:t}}const Rf={class:"ss-dash-filter-bar"},Lf={key:0,class:"ss-dash-summary"},Ff={class:"ss-dash-search-wrapper"},Of=["viewBox","innerHTML"],Df=["value","placeholder"],If={key:1,class:"ss-dash-filter-controls"},Ct=Oe({__name:"FilterBar",props:{modelValue:{},placeholder:{},summary:{}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const s=t;function l(a){s("update:modelValue",a.target.value)}function o(){s("update:modelValue",""),s("clear")}return(a,i)=>(u(),c("div",Rf,[e.summary?(u(),c("span",Lf,f(e.summary),1)):te("",!0),n("div",Ff,[(u(),c("svg",{class:"ss-dash-search-icon",viewBox:k(Me).search.viewBox,width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Me).search.elements.join("")},null,8,Of)),n("input",{class:"ss-dash-search",type:"text",value:e.modelValue,placeholder:e.placeholder||"Search...",onInput:l},null,40,Df),e.modelValue?(u(),c("button",{key:0,type:"button",class:"ss-dash-search-clear",onClick:o}," × ")):te("",!0)]),a.$slots.default?(u(),c("div",If,[Ti(a.$slots,"default")])):te("",!0)]))}}),Bf={key:0,class:"ss-dash-pagination"},Nf={class:"ss-dash-page-info"},jf={class:"ss-dash-pagination-controls"},Hf=["disabled"],Uf={key:0,class:"ss-dash-page-ellipsis"},qf=["onClick"],Kf=["disabled"],Vt=Oe({__name:"PaginationControls",props:{page:{},lastPage:{},total:{}},emits:["pageChange"],setup(e,{emit:t}){const s=e,l=t,o=q(()=>vu(s.page,s.lastPage));return(a,i)=>e.lastPage>1?(u(),c("div",Bf,[n("span",Nf," Page "+f(e.page)+" of "+f(e.lastPage)+" ("+f(e.total)+" total) ",1),n("div",jf,[n("button",{type:"button",class:"ss-dash-page-btn",disabled:e.page<=1,onClick:i[0]||(i[0]=r=>l("pageChange",e.page-1))}," « Prev ",8,Hf),(u(!0),c(U,null,ye(o.value,(r,d)=>(u(),c(U,{key:r==="..."?`ellipsis-${d}`:r},[r==="..."?(u(),c("span",Uf,"...")):(u(),c("button",{key:1,type:"button",class:O(`ss-dash-page-btn ${r===e.page?"ss-dash-active":""}`),onClick:g=>l("pageChange",r)},f(r),11,qf))],64))),128)),n("button",{type:"button",class:"ss-dash-page-btn",disabled:e.page>=e.lastPage,onClick:i[1]||(i[1]=r=>l("pageChange",e.page+1))}," Next » ",8,Kf)])])):te("",!0)}}),Vf={key:0,class:"ss-dash-empty"},zf={class:"ss-dash-tl-legend"},Wf=["title"],Jf={class:"ss-dash-tl-track"},Qf=["title"],Gf={class:"ss-dash-tl-dur"},Yf={key:0,class:"ss-dash-tl-warnings"},Xf={class:"ss-dash-tl-warnings-title"},da=Oe({__name:"WaterfallChart",props:{spans:{},totalDuration:{},className:{},warnings:{}},setup(e){const t=e,s={request:"#1e3a5f",middleware:"rgba(30, 58, 95, 0.7)",db:"#6d28d9",view:"#0e7490",mail:"#059669",event:"#b45309",custom:"var(--ss-dim)"},l={request:"Request",middleware:"Middleware",db:"DB",mail:"Mail",event:"Event",view:"View",custom:"Custom"},o=q(()=>t.spans||[]),a=q(()=>[...o.value].sort((_,x)=>_.startOffset-x.startOffset)),i=q(()=>{const _={};for(const x of a.value)_[x.id]=x.parentId?(_[x.parentId]||0)+1:0;return _});function r(_){const x=t.totalDuration||1;return`${_.startOffset/x*100}%`}function d(_){const x=t.totalDuration||1;return`${Math.max(_.duration/x*100,.5)}%`}function g(_){return _.length>50?_.slice(0,50)+"...":_}function v(_){return _==="db"?"DB":_}function m(_){return _==="db"?"purple":_==="mail"?"green":_==="event"?"amber":_==="view"?"blue":"muted"}function p(_){const x=_.metadata?Object.entries(_.metadata).filter(([,w])=>w!=null).map(([w,P])=>`${w}=${P}`).join(", "):"";return x?`${_.label} (${_.duration.toFixed(2)}ms)
5
- ${x}`:`${_.label} (${_.duration.toFixed(2)}ms)`}return(_,x)=>o.value.length===0?(u(),c("div",Vf,"No spans recorded")):(u(),c("div",{key:1,class:O(`ss-dash-tl-waterfall ${e.className||""}`)},[n("div",zf,[(u(),c(U,null,ye(l,(w,P)=>n("div",{key:P,class:"ss-dash-tl-legend-item"},[n("span",{class:"ss-dash-tl-legend-dot",style:Ke({background:s[P]||s.custom})},null,4),n("span",null,f(w),1)])),64))]),(u(!0),c(U,null,ye(a.value,w=>(u(),c("div",{key:w.id,class:"ss-dash-tl-row"},[n("div",{class:"ss-dash-tl-label",title:p(w),style:Ke({paddingLeft:8+(i.value[w.id]||0)*16+"px"})},[n("span",{class:O(`ss-dash-badge ss-dash-badge-${m(w.category)}`),style:{"font-size":"9px","margin-right":"4px"}},f(v(w.category)),3),_e(" "+f(g(w.label)),1)],12,Wf),n("div",Jf,[n("div",{class:O(`ss-dash-tl-bar ss-dash-tl-bar-${w.category||"custom"}`),style:Ke({left:r(w),width:d(w)}),title:p(w)},null,14,Qf)]),n("span",Gf,f(w.duration.toFixed(2))+"ms",1)]))),128)),e.warnings&&e.warnings.length>0?(u(),c("div",Yf,[n("div",Xf,"Warnings ("+f(e.warnings.length)+")",1),(u(!0),c(U,null,ye(e.warnings,(w,P)=>(u(),c("div",{key:P,class:"ss-dash-tl-warning"},f(w),1))),128))])):te("",!0)],2))}}),Zf={class:"ss-dash-tl-detail-header"},eh={style:{color:"var(--ss-text)"}},th={class:"ss-dash-tl-meta"},sh={class:"ss-dash-tl-detail-header"},nh={key:0,class:"ss-dash-empty"},lh={key:1,class:"ss-dash-empty"},oh={class:"ss-dash-table-wrap"},ah={key:0,class:"ss-dash-sort-arrow"},ih={key:0,class:"ss-dash-sort-arrow"},rh={key:0,class:"ss-dash-sort-arrow"},uh={key:0,class:"ss-dash-sort-arrow"},ch={key:0,class:"ss-dash-sort-arrow"},dh=["onClick"],fh={style:{color:"var(--ss-dim)"}},hh=["title"],ph={style:{color:"var(--ss-muted)","text-align":"center"}},vh={key:0,style:{color:"var(--ss-amber-fg)","text-align":"center",display:"block"}},gh={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},yh=["title"],mh={key:1,class:"ss-dash-empty"},bh=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"RequestsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,pagination:d,sort:g,goToPage:v,setSearch:m,setSort:p}=Ze(()=>"requests",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),_=J(""),x=J(null),w=J(!1),P=J(null),F=q(()=>{if(!a.value)return[];const R=a.value;return R.data||R.requests||a.value||[]}),A=un(o,l);async function y(R){const K=R.id;w.value=!0;try{const se=s||"/__stats/api",be=await A().fetch(`${se}/requests/${K}`);P.value=Au(be),x.value=R}catch{}finally{w.value=!1}}function $(){x.value=null,P.value=null}function T(R){_.value=R,m(R)}function Q(R){p(R)}function V(R){const K=nn(R);return K==="very-slow"?"ss-dash-very-slow":K==="slow"?"ss-dash-slow":""}const{tableRef:G}=Bt(()=>F.value);return(R,K)=>(u(),c("div",null,[P.value&&x.value?(u(),c(U,{key:0},[n("div",Zf,[n("button",{type:"button",class:"ss-dash-btn",onClick:$}," ← Back to Requests "),n("span",{class:O(`ss-dash-method ss-dash-method-${(P.value.method||"").toLowerCase()}`)},f(P.value.method),3),n("span",eh,f(P.value.url),1),n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((P.value.statusCode||200)/100)}xx`)},f(P.value.statusCode),3),n("span",th,f(P.value.totalDuration.toFixed(1))+"ms · "+f(P.value.spanCount)+" spans ",1)]),me(da,{spans:P.value.spans,"total-duration":P.value.totalDuration,warnings:P.value.warnings},null,8,["spans","total-duration","warnings"])],64)):w.value?(u(),c(U,{key:1},[n("div",sh,[n("button",{type:"button",class:"ss-dash-btn",onClick:K[0]||(K[0]=se=>w.value=!1)}," ← Back to Requests ")]),K[6]||(K[6]=n("div",{class:"ss-dash-empty"},"Loading request detail...",-1))],64)):(u(),c(U,{key:2},[me(Ct,{"model-value":_.value,placeholder:"Filter requests...",summary:`${k(d).total??0} requests`,"onUpdate:modelValue":T},null,8,["model-value","summary"]),k(r)?(u(),c("div",nh,"Failed to load requests")):te("",!0),k(i)&&!k(a)?(u(),c("div",lh,"Loading requests...")):(u(),c(U,{key:2},[n("div",oh,[F.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:G,class:"ss-dash-table"},[K[15]||(K[15]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"60px"}}),n("col",{style:{width:"80px"}}),n("col",{style:{width:"50px"}}),n("col",{style:{width:"40px"}}),n("col",{style:{width:"80px"}})],-1)),n("thead",null,[n("tr",null,[K[12]||(K[12]=n("th",null,"#",-1)),n("th",{class:"ss-dash-sortable",onClick:K[1]||(K[1]=se=>Q("method"))},[K[7]||(K[7]=_e(" Method ",-1)),k(g).column==="method"?(u(),c("span",ah,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:K[2]||(K[2]=se=>Q("url"))},[K[8]||(K[8]=_e(" URL ",-1)),k(g).column==="url"?(u(),c("span",ih,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:K[3]||(K[3]=se=>Q("statusCode"))},[K[9]||(K[9]=_e(" Status ",-1)),k(g).column==="statusCode"?(u(),c("span",rh,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:K[4]||(K[4]=se=>Q("duration"))},[K[10]||(K[10]=_e(" Duration ",-1)),k(g).column==="duration"?(u(),c("span",uh,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),K[13]||(K[13]=n("th",null,"Spans",-1)),K[14]||(K[14]=n("th",null,"⚠",-1)),n("th",{class:"ss-dash-sortable",onClick:K[5]||(K[5]=se=>Q("createdAt"))},[K[11]||(K[11]=_e(" Time ",-1)),k(g).column==="createdAt"?(u(),c("span",ch,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)])])]),n("tbody",null,[(u(!0),c(U,null,ye(F.value,se=>(u(),c("tr",{key:se.id,class:"ss-dash-clickable",onClick:be=>y(se)},[n("td",null,[n("span",fh,f(se.id),1)]),n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(se.method||"").toLowerCase()}`)},f(se.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:se.url},f(se.url),9,hh)]),n("td",null,[n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((se.status_code||se.statusCode||200)/100)}xx`)},f(se.status_code||se.statusCode),3)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${V(se.total_duration||se.totalDuration||se.duration||0)}`)},f((se.total_duration||se.totalDuration||se.duration||0).toFixed(1))+"ms ",3)]),n("td",null,[n("span",ph,f(se.span_count||se.spanCount||0),1)]),n("td",null,[(se.warning_count||se.warningCount||0)>0?(u(),c("span",vh,f(se.warning_count||se.warningCount||0),1)):(u(),c("span",gh,"-"))]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(se.createdAt||se.created_at||se.timestamp||"")},f(k(bt)(se.createdAt||se.created_at||se.timestamp||"")),9,yh)])],8,dh))),128))])],512)):(u(),c("div",mh,"No requests recorded yet"))]),k(d).totalPages>1?(u(),Xe(Vt,{key:0,page:k(d).page,"last-page":k(d).totalPages,total:k(d).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),_h={class:"ss-dash-btn-group"},xh={key:0,class:"ss-dash-empty"},wh={key:1,class:"ss-dash-table-wrap"},$h={key:0,class:"ss-dash-sort-arrow"},kh={key:0,class:"ss-dash-sort-arrow"},Sh={key:0,class:"ss-dash-sort-arrow"},Ch=["onClick","onKeydown"],Th={key:0,class:"ss-dash-dup"},Eh={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Ph={class:"ss-dash-duration"},Mh={class:"ss-dash-duration"},Ah={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Rh={key:1,class:"ss-dash-empty"},Lh={class:"ss-dash-table-wrap"},Fh={key:0,class:"ss-dash-sort-arrow"},Oh={key:0,class:"ss-dash-sort-arrow"},Dh={style:{color:"var(--ss-dim)"}},Ih=["onClick","onKeydown"],Bh={key:0,class:"ss-dash-dup"},Nh=["title"],jh={style:{color:"var(--ss-dim)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Hh=["title"],Uh=["disabled","onClick"],qh={key:0,class:"ss-dash-explain-row"},Kh={colspan:"8",class:"ss-dash-explain"},Vh={style:{display:"flex","justify-content":"space-between","align-items":"start"}},zh={style:{flex:"1"}},Wh={key:0,class:"ss-dash-explain-result ss-dash-explain-error"},Jh={key:0},Qh={key:1,class:"ss-dash-explain-result"},Gh={key:2,class:"ss-dash-explain-result"},Yh={key:3,class:"ss-dash-explain-result"},Xh={key:1,class:"ss-dash-empty"};function fa(e,t){if(!e)return null;const s=t*20,l=e["Node Type"]||"Unknown",o=e["Relation Name"]||"",a=e.Alias&&e.Alias!==e["Relation Name"]?` (${e.Alias})`:"",i=e["Index Name"]||"",r=[];if(e["Startup Cost"]!==null&&e["Startup Cost"]!==void 0&&r.push(`cost=${e["Startup Cost"]}..${e["Total Cost"]}`),e["Plan Rows"]!==null&&e["Plan Rows"]!==void 0&&r.push(`rows=${e["Plan Rows"]}`),e["Plan Width"]!==null&&e["Plan Width"]!==void 0&&r.push(`width=${e["Plan Width"]}`),e.Filter&&r.push(`filter: ${e.Filter}`),e["Index Cond"]&&r.push(`cond: ${e["Index Cond"]}`),e["Hash Cond"]&&r.push(`hash: ${e["Hash Cond"]}`),e["Join Type"]&&r.push(`join: ${e["Join Type"]}`),e["Sort Key"]){const g=Array.isArray(e["Sort Key"])?e["Sort Key"].join(", "):e["Sort Key"];r.push(`sort: ${g}`)}const d=e.Plans||[];return cs("div",{class:"ss-dash-explain-node",style:{marginLeft:`${s}px`}},[cs("div",{class:"ss-dash-explain-node-header"},[cs("span",{class:"ss-dash-explain-node-type"},l),o?[" on ",cs("strong",null,o)]:null,a||null,i?[" using ",cs("em",null,i)]:null]),r.length>0?cs("div",{class:"ss-dash-explain-metrics"},r.join(" · ")):null,...d.map((g,v)=>fa(g,t+1))])}const ha=Oe({name:"ExplainPlanNode",props:{node:{type:Object,required:!0},depth:{type:Number,default:0}},setup(e){return()=>fa(e.node,e.depth)}}),Zh=Oe({...{components:{ExplainPlanNode:ha}},__name:"QueriesSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),a=J("list"),i=J(null),r=J(null),d=J(null),g=q(()=>a.value==="grouped"?"queries/grouped":"queries"),{data:v,loading:m,pagination:p,sort:_,goToPage:x,setSearch:w,setSort:P,explainQuery:F}=Ze(()=>g.value,{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),A=J(""),y=q(()=>v.value?a.value==="grouped"?v.value.groups||[]:v.value.data||v.value||[]:[]),$=q(()=>a.value!=="grouped"?y.value:y.value.map(E=>{const C={...E};return(C.sqlNormalized===null||C.sqlNormalized===void 0&&(E.sql_normalized||E.pattern))&&(C.sqlNormalized=E.sql_normalized||E.pattern||""),(C.count===null||C.count===void 0)&&E.total_count!==null&&E.total_count!==void 0&&(C.count=E.total_count),(C.avgDuration===null||C.avgDuration===void 0)&&E.avg_duration!==null&&E.avg_duration!==void 0&&(C.avgDuration=E.avg_duration),(C.maxDuration===null||C.maxDuration===void 0)&&E.max_duration!==null&&E.max_duration!==void 0&&(C.maxDuration=E.max_duration),(C.minDuration===null||C.minDuration===void 0)&&E.min_duration!==null&&E.min_duration!==void 0&&(C.minDuration=E.min_duration),(C.totalDuration===null||C.totalDuration===void 0)&&E.total_duration!==null&&E.total_duration!==void 0&&(C.totalDuration=E.total_duration),(C.percentOfTotal===null||C.percentOfTotal===void 0)&&E.pct_time!==null&&E.pct_time!==void 0&&(C.percentOfTotal=E.pct_time),C})),T=q(()=>{const E=new Map;for(const C of $.value){const S=C.sqlNormalized||C.sql||C.sql_text||"";E.set(S,(E.get(S)||0)+1)}return E}),Q=q(()=>{const E=p.total??$.value.length;let C=0,S=0,H=0,ne=0;for(const Te of $.value){const X=Te.duration||0;H+=X,ne++,X>ea&&C++}for(const Te of T.value.values())Te>1&&(S+=Te);return{total:E,slow:C,duplicates:S,avgDuration:ne>0?H/ne:0}}),V=q(()=>{if(a.value==="grouped")return`${$.value.length} query patterns`;const E=[`${Q.value.total} queries`];return Q.value.slow>0&&E.push(`${Q.value.slow} slow`),Q.value.duplicates>0&&E.push(`${Q.value.duplicates} dup`),E.push(`avg ${(Q.value.avgDuration||0).toFixed(1)}ms`),E.join(", ")});function G(E){A.value=E,w(E)}function R(E){E!==a.value&&(a.value=E,i.value=null,r.value=null,d.value=null)}function K(E){P(E)}async function se(E){if(r.value&&r.value.queryId===E){r.value=null;return}d.value=E;try{const C=await F(E);C&&C.error?r.value={queryId:E,plan:[],error:C.error,message:C.message}:r.value={queryId:E,plan:C?.plan||C?.rows||[]}}catch(C){r.value={queryId:E,plan:[],error:C instanceof Error?C.message:String(C)}}finally{d.value=null}}function be(E){const C=nn(E);return C==="very-slow"?"ss-dash-very-slow":C==="slow"?"ss-dash-slow":""}function Ae(){const E=r.value?.plan;return!E||E.length===0||typeof E[0]!="object"||!E[0]?[]:Object.keys(E[0])}function Le(E,C){if(!E||typeof E!="object")return"-";const S=E[C];return S!=null?String(S):"-"}function Re(){const E=r.value?.plan;return!E||E.length===0||typeof E[0]!="object"||!E[0]?!1:"Plan"in E[0]}function ge(){const E=r.value?.plan;return!E||E.length===0||typeof E[0]!="object"||!E[0]?{}:E[0].Plan}const{tableRef:de}=Bt(()=>$.value);return(E,C)=>(u(),c("div",null,[me(Ct,{"model-value":A.value,placeholder:"Filter queries...",summary:V.value,"onUpdate:modelValue":G},{default:ts(()=>[n("div",_h,[n("button",{type:"button",class:O(`ss-dash-btn ${a.value==="list"?"ss-dash-active":""}`),onClick:C[0]||(C[0]=S=>R("list"))}," List ",2),n("button",{type:"button",class:O(`ss-dash-btn ${a.value==="grouped"?"ss-dash-active":""}`),onClick:C[1]||(C[1]=S=>R("grouped"))}," Grouped ",2)])]),_:1},8,["model-value","summary"]),k(m)&&!k(v)?(u(),c("div",xh,"Loading queries...")):a.value==="grouped"?(u(),c("div",wh,[$.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:de,class:"ss-dash-table"},[n("thead",null,[n("tr",null,[C[11]||(C[11]=n("th",null,"Pattern",-1)),n("th",{class:"ss-dash-sortable",onClick:C[2]||(C[2]=S=>K("count"))},[C[8]||(C[8]=_e(" Count ",-1)),k(_).column==="count"?(u(),c("span",$h,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:C[3]||(C[3]=S=>K("avgDuration"))},[C[9]||(C[9]=_e(" Avg ",-1)),k(_).column==="avgDuration"?(u(),c("span",kh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[12]||(C[12]=n("th",null,"Min",-1)),C[13]||(C[13]=n("th",null,"Max",-1)),n("th",{class:"ss-dash-sortable",onClick:C[4]||(C[4]=S=>K("totalDuration"))},[C[10]||(C[10]=_e(" Total ",-1)),k(_).column==="totalDuration"?(u(),c("span",Sh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[14]||(C[14]=n("th",null,"% Time",-1))])]),n("tbody",null,[(u(!0),c(U,null,ye($.value,(S,H)=>(u(),c("tr",{key:H},[n("td",null,[n("span",{class:O(`ss-dash-sql ${i.value===S.sqlNormalized?"ss-dash-expanded":""}`),title:"Click to expand",role:"button",tabindex:"0",onClick:mt(ne=>i.value=i.value===S.sqlNormalized?null:S.sqlNormalized,["stop"]),onKeydown:Es(ne=>i.value=i.value===S.sqlNormalized?null:S.sqlNormalized,["enter"])},f(S.sqlNormalized),43,Ch),(S.count||0)>=3?(u(),c("span",Th,"DUP")):te("",!0)]),n("td",null,[n("span",Eh,f(S.count||0),1)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${be(S.avgDuration||0)}`)},f((S.avgDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Ph,f((S.minDuration||0).toFixed(2))+"ms",1)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${be(S.maxDuration||0)}`)},f((S.maxDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Mh,f((S.totalDuration||0).toFixed(1))+"ms",1)]),n("td",null,[n("span",Ah,f((S.percentOfTotal||0).toFixed(1))+"%",1)])]))),128))])],512)):(u(),c("div",Rh,"No queries recorded"))])):(u(),c(U,{key:2},[n("div",Lh,[$.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:de,class:"ss-dash-table"},[C[24]||(C[24]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col",{style:{width:"70px"}}),n("col",{style:{width:"60px"}}),n("col",{style:{width:"90px"}}),n("col",{style:{width:"80px"}}),n("col",{style:{width:"90px"}}),n("col",{style:{width:"70px"}})],-1)),n("thead",null,[n("tr",null,[C[17]||(C[17]=n("th",null,"#",-1)),C[18]||(C[18]=n("th",null,"SQL",-1)),n("th",{class:"ss-dash-sortable",onClick:C[5]||(C[5]=S=>K("duration"))},[C[15]||(C[15]=_e(" Duration ",-1)),k(_).column==="duration"?(u(),c("span",Fh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[19]||(C[19]=n("th",null,"Method",-1)),C[20]||(C[20]=n("th",null,"Model",-1)),C[21]||(C[21]=n("th",null,"Connection",-1)),n("th",{class:"ss-dash-sortable",onClick:C[6]||(C[6]=S=>K("createdAt"))},[C[16]||(C[16]=_e(" Time ",-1)),k(_).column==="createdAt"?(u(),c("span",Oh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[22]||(C[22]=n("th",null,null,-1))])]),n("tbody",null,[(u(!0),c(U,null,ye($.value,S=>(u(),c(U,{key:S.id},[n("tr",null,[n("td",null,[n("span",Dh,f(S.id),1)]),n("td",null,[n("div",null,[n("span",{class:O(`ss-dash-sql ${i.value===S.id?"ss-dash-expanded":""}`),title:"Click to expand",role:"button",tabindex:"0",onClick:mt(H=>i.value=i.value===S.id?null:S.id,["stop"]),onKeydown:Es(H=>i.value=i.value===S.id?null:S.id,["enter"])},f(S.sql||S.sql_text||""),43,Ih),(T.value.get((S.sqlNormalized||S.sql||S.sql_text)??"")??0)>1?(u(),c("span",Bh," ×"+f(T.value.get((S.sqlNormalized||S.sql||S.sql_text)??"")),1)):te("",!0)])]),n("td",null,[n("span",{class:O(`ss-dash-duration ${be(S.duration||0)}`)},f((S.duration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(S.method||S.sql_method||"").toLowerCase()}`)},f(S.method||S.sql_method||""),3)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:S.model},f(S.model||"-"),9,Nh)]),n("td",null,[n("span",jh,f(S.connection||"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(S.createdAt||S.created_at||S.timestamp||"")},f(k(bt)(S.createdAt||S.created_at||S.timestamp||"")),9,Hh)]),n("td",null,[(S.method||S.sql_method||"")==="select"?(u(),c("button",{key:0,type:"button",class:O(`ss-dash-explain-btn${r.value?.queryId===S.id&&!r.value?.error?" ss-dash-explain-btn-active":""}`),disabled:d.value===S.id,onClick:mt(H=>se(S.id),["stop"])},f(d.value===S.id?"...":"EXPLAIN"),11,Uh)):te("",!0)])]),r.value&&r.value.queryId===S.id?(u(),c("tr",qh,[n("td",Kh,[n("div",Vh,[n("div",zh,[r.value.error?(u(),c("div",Wh,[C[23]||(C[23]=n("strong",null,"Error:",-1)),_e(" "+f(r.value.error)+" ",1),r.value.message?(u(),c("br",Jh)):te("",!0),_e(" "+f(r.value.message),1)])):Re()?(u(),c("div",Qh,[me(k(ha),{node:ge(),depth:0},null,8,["node"])])):r.value.plan&&r.value.plan.length>0&&typeof r.value.plan[0]=="object"?(u(),c("div",Gh,[n("table",null,[n("thead",null,[n("tr",null,[(u(!0),c(U,null,ye(Ae(),H=>(u(),c("th",{key:H},f(H),1))),128))])]),n("tbody",null,[(u(!0),c(U,null,ye(r.value.plan,(H,ne)=>(u(),c("tr",{key:ne},[(u(!0),c(U,null,ye(Ae(),Te=>(u(),c("td",{key:Te},f(Le(H,Te)),1))),128))]))),128))])])])):(u(),c("div",Yh,"No plan data returned"))]),n("button",{type:"button",class:"ss-dash-explain-btn",style:{"margin-left":"8px","flex-shrink":"0"},onClick:C[7]||(C[7]=H=>r.value=null)}," Close ")])])])):te("",!0)],64))),128))])],512)):(u(),c("div",Xh,"No queries recorded"))]),k(p).totalPages>1?(u(),Xe(Vt,{key:0,page:k(p).page,"last-page":k(p).totalPages,total:k(p).total,onPageChange:k(x)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}}),ep=Object.freeze(Object.defineProperty({__proto__:null,default:Zh},Symbol.toStringTag,{value:"Module"})),il=Oe({__name:"JsonViewer",props:{value:{},maxLen:{},classPrefix:{default:"ss-dash"}},setup(e){const t=e,s=J(!1),l=q(()=>{if(t.value===null||t.value===void 0)return"-";if(typeof t.value=="string")try{return ln(JSON.parse(t.value),t.maxLen||100)}catch{return t.value.length>100?t.value.slice(0,100)+"...":t.value}return ln(t.value,t.maxLen||100)}),o=q(()=>{if(t.value===null||t.value===void 0)return"";if(typeof t.value=="string")try{return JSON.stringify(JSON.parse(t.value),null,2)}catch{return t.value}return JSON.stringify(t.value,null,2)});function a(){s.value=!s.value}function i(){navigator.clipboard?.writeText(o.value)}return(r,d)=>e.value===null||e.value===void 0?(u(),c("span",{key:0,class:O(`ss-dim ${t.classPrefix}-c-dim`)},"-",2)):(u(),c("div",{key:1,class:O(`${t.classPrefix}-data-cell`)},[n("span",{class:O(`${t.classPrefix}-data-preview`),role:"button",tabindex:0,onClick:a,onKeydown:d[0]||(d[0]=g=>g.key==="Enter"&&a())},f(l.value),35),s.value?(u(),c("div",{key:0,class:O(`${t.classPrefix}-data-full`),onClick:a},[n("button",{class:O(`${t.classPrefix}-copy-btn`),title:"Copy to clipboard",onClick:mt(i,["stop"])}," Copy ",2),n("pre",null,f(o.value),1)],2)):te("",!0)],2))}}),tp={key:0,class:"ss-dash-empty"},sp={class:"ss-dash-table-wrap"},np={style:{color:"var(--ss-dim)"}},lp=["title"],op=["title"],ap={key:1,class:"ss-dash-empty"},ip=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"EventsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,pagination:r,goToPage:d,setSearch:g}=Ze(()=>"events",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),v=J(""),m=q(()=>{if(!a.value)return[];const x=a.value;return x.data||x.events||a.value||[]});function p(x){v.value=x,g(x)}const{tableRef:_}=Bt(()=>m.value);return(x,w)=>(u(),c("div",null,[me(Ct,{"model-value":v.value,placeholder:"Filter events...",summary:`${k(r).total??0} events`,"onUpdate:modelValue":p},null,8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",tp,"Loading events...")):(u(),c(U,{key:1},[n("div",sp,[m.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:_,class:"ss-dash-table"},[w[0]||(w[0]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col"),n("col",{style:{width:"80px"}})],-1)),w[1]||(w[1]=n("thead",null,[n("tr",null,[n("th",null,"#"),n("th",null,"Event"),n("th",null,"Data"),n("th",null,"Time")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(m.value,P=>(u(),c("tr",{key:P.id},[n("td",null,[n("span",np,f(P.id),1)]),n("td",null,[n("span",{class:"ss-dash-event-name",title:P.event_name||P.eventName||P.event||"",style:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(P.event_name||P.eventName||P.event||""),9,lp)]),n("td",null,[me(il,{value:P.data,class:"ss-dash-event-data"},null,8,["value"])]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(P.createdAt||P.created_at||P.timestamp)},f(k(bt)(P.createdAt||P.created_at||P.timestamp)),9,op)])]))),128))])],512)):(u(),c("div",ap,"No events recorded yet"))]),k(r).totalPages>1?(u(),Xe(Vt,{key:0,page:k(r).page,"last-page":k(r).totalPages,total:k(r).total,onPageChange:k(d)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),rp={key:0,class:"ss-dash-empty"},up={key:1,class:"ss-dash-empty"},cp={key:2,class:"ss-dash-table-wrap"},dp=["title"],fp=["title"],hp=["title"],pp=["title"],vp={key:1,class:"ss-dash-empty"},gp=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"RoutesSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,setSearch:d}=Ze(()=>"routes",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=J(""),v=q(()=>{if(!a.value)return[];const _=a.value;return Array.isArray(_)?_:Array.isArray(_.routes)?_.routes:Array.isArray(_.data)?_.data:[]});function m(_){g.value=_,d(_)}const{tableRef:p}=Bt(()=>v.value);return(_,x)=>(u(),c("div",null,[me(Ct,{"model-value":g.value,placeholder:"Filter routes...",summary:`${v.value.length} routes`,"onUpdate:modelValue":m},null,8,["model-value","summary"]),k(r)?(u(),c("div",rp,"Failed to load routes")):k(i)&&!k(a)?(u(),c("div",up,"Loading routes...")):(u(),c("div",cp,[v.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:p,class:"ss-dash-table"},[x[0]||(x[0]=n("colgroup",null,[n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"120px"}}),n("col"),n("col")],-1)),x[1]||(x[1]=n("thead",null,[n("tr",null,[n("th",null,"Method"),n("th",null,"Pattern"),n("th",null,"Name"),n("th",null,"Handler"),n("th",null,"Middleware")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(v.value,(w,P)=>(u(),c("tr",{key:w.pattern||P},[n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(w.method||"").toLowerCase()}`)},f(w.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.pattern},f(w.pattern),9,dp)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.name||"-"},f(w.name||"-"),9,fp)]),n("td",null,[n("span",{style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.handler},f(w.handler),9,hp)]),n("td",null,[n("span",{style:{color:"var(--ss-dim)","font-size":"10px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.middleware?.length?w.middleware.join(", "):"-"},f(w.middleware?.length?w.middleware.join(", "):"-"),9,pp)])]))),128))])],512)):(u(),c("div",vp,"No routes available"))]))]))}})},Symbol.toStringTag,{value:"Module"})),yp={class:"ss-dash-log-filters"},mp=["onClick"],bp=["value"],_p={class:"ss-dash-structured-search"},xp=["value"],wp=["value"],$p=["value"],kp={key:0,class:"ss-dash-filter-chips"},Sp={key:0,class:"ss-dash-filter-chip"},Cp={key:1,class:"ss-dash-filter-chip"},Tp=["onClick"],Ep={key:1,class:"ss-dash-empty"},Pp={key:2,class:"ss-dash-empty"},Mp={key:3,class:"ss-dash-empty"},Ap={key:4,class:"ss-dash-log-entries"},Rp=["title"],Lp=["title","onClick","onKeydown"],Fp={key:1,class:"ss-dash-log-reqid-empty"},Op={class:"ss-dash-log-msg"},Dp=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"LogsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,pagination:d,filter:g,goToPage:v,setSearch:m,setFilter:p,refresh:_}=Ze(()=>"logs",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),x=J(""),w=J("all"),P=J(""),F=J(""),A=J([]),y=J("level"),$=J("equals"),T=J(""),Q=q(()=>{if(!a.value)return[];const C=a.value;return C.data||C.logs||a.value||[]}),V=q(()=>w.value!=="all"||P.value!==""||A.value.length>0);function G(C){x.value=C,m(C)}function R(C){w.value=C,C==="all"?p("level",""):p("level",C)}function K(C){P.value=C,F.value=C,p("request_id",C)}function se(){const C=F.value.trim();P.value=C,p("request_id",C)}function be(){P.value="",F.value="",p("request_id","")}function Ae(){w.value="all",p("level","")}function Le(){const C=g;for(const S of Object.keys(C))(S.startsWith("filter_field_")||S.startsWith("filter_op_")||S.startsWith("filter_value_"))&&delete C[S];A.value.forEach((S,H)=>{C[`filter_field_${H}`]=S.field,C[`filter_op_${H}`]=S.operator,C[`filter_value_${H}`]=S.value}),d.page=1,_()}function Re(){const C=T.value.trim();C&&(A.value.push({field:y.value,operator:$.value,value:C}),T.value="",Le())}function ge(C){A.value.splice(C,1),Le()}function de(C){return C.target.value}function E(C){return C.target.value}return(C,S)=>(u(),c("div",null,[me(Ct,{"model-value":x.value,placeholder:"Search logs...",summary:`${k(d).total??0} logs`,"onUpdate:modelValue":G},{default:ts(()=>[n("div",yp,[(u(!0),c(U,null,ye(k(ku),H=>(u(),c("button",{key:H,type:"button",class:O(`ss-dash-log-filter ${w.value===H?"ss-dash-active":""}`),onClick:ne=>R(H)},f(H),11,mp))),128)),n("input",{type:"text",class:"ss-dash-filter-input ss-dash-reqid-input",placeholder:"Filter by request ID...",value:F.value,onInput:S[0]||(S[0]=H=>F.value=de(H)),onKeydown:Es(se,["enter"])},null,40,bp),F.value||P.value?(u(),c("button",{key:0,type:"button",class:"ss-dash-btn ss-dash-reqid-clear",onClick:be}," Clear ")):te("",!0)])]),_:1},8,["model-value","summary"]),n("div",_p,[n("select",{class:"ss-dash-filter-select",value:y.value,onChange:S[1]||(S[1]=H=>y.value=E(H))},[...S[4]||(S[4]=[rr('<option value="level">level</option><option value="message">message</option><option value="request_id">request_id</option><option value="userId">userId</option><option value="email">email</option><option value="path">path</option>',6)])],40,xp),n("select",{class:"ss-dash-filter-select",value:$.value,onChange:S[2]||(S[2]=H=>$.value=E(H))},[...S[5]||(S[5]=[n("option",{value:"equals"},"equals",-1),n("option",{value:"contains"},"contains",-1),n("option",{value:"starts_with"},"starts with",-1)])],40,wp),n("input",{class:"ss-dash-filter-input",placeholder:"Value...",value:T.value,onInput:S[3]||(S[3]=H=>T.value=de(H)),onKeydown:Es(Re,["enter"])},null,40,$p),n("button",{type:"button",class:"ss-dash-btn",onClick:Re},"Add")]),V.value?(u(),c("div",kp,[w.value!=="all"?(u(),c("span",Sp,[_e(" level: "+f(w.value)+" ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:Ae}," × ")])):te("",!0),P.value?(u(),c("span",Cp,[_e(" requestId: "+f(P.value.slice(0,8))+"... ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:be}," × ")])):te("",!0),(u(!0),c(U,null,ye(A.value,(H,ne)=>(u(),c("span",{key:ne,class:"ss-dash-filter-chip"},[_e(f(H.field)+" "+f(H.operator)+' "'+f(H.value)+'" ',1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:Te=>ge(ne)}," × ",8,Tp)]))),128))])):te("",!0),k(r)?(u(),c("div",Ep,"Failed to load logs")):k(i)&&!k(a)?(u(),c("div",Pp,"Loading logs...")):Q.value.length===0?(u(),c("div",Mp," No log entries"+f(P.value?` matching request ${P.value}`:w.value!=="all"?` for ${w.value}`:""),1)):(u(),c("div",Ap,[(u(!0),c(U,null,ye(Q.value,(H,ne)=>(u(),c("div",{key:H.id||ne,class:"ss-dash-log-entry"},[n("span",{class:O(`ss-dash-log-level ${k(Cu)(k(oa)(H),"ss-dash-log-level")}`)},f(k(oa)(H).toUpperCase()),3),n("span",{class:"ss-dash-log-time",title:k(on)(H)?k(It)(k(on)(H)):""},f(k(on)(H)?k(bt)(k(on)(H)):"-"),9,Rp),k(Ms)(H)?(u(),c("span",{key:0,class:"ss-dash-log-reqid",title:k(Ms)(H),role:"button",tabindex:"0",onClick:Te=>K(k(Ms)(H)),onKeydown:Es(Te=>K(k(Ms)(H)),["enter"])},f(k(Ms)(H).slice(0,8)),41,Lp)):(u(),c("span",Fp,"--")),n("span",Op,f(k(Su)(H)),1)]))),128))])),k(d).totalPages>1?(u(),Xe(Vt,{key:5,page:k(d).page,"last-page":k(d).totalPages,total:k(d).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Ip={key:0,class:"ss-dash-email-preview",id:"ss-dash-email-preview"},Bp={class:"ss-dash-email-preview-header"},Np={class:"ss-dash-email-preview-meta",id:"ss-dash-email-preview-meta"},jp=["srcdoc"],Hp={key:0,class:"ss-dash-empty"},Up={class:"ss-dash-table-wrap"},qp=["onClick"],Kp={style:{color:"var(--ss-dim)"}},Vp=["title"],zp=["title"],Wp=["title"],Jp={key:0,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Qp={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Gp=["title"],Yp=["title"],Xp={key:1,class:"ss-dash-empty"},Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"EmailsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,pagination:r,goToPage:d,setSearch:g,fetchEmailPreview:v}=Ze(()=>"emails",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),m=J(""),p=J(null),_=J(null),x=q(()=>{if(!a.value)return[];const y=a.value;return y.data||y.emails||a.value||[]});function w(y){m.value=y,g(y)}async function P(y){if(y.html){p.value=y.id,_.value=y.html;return}const $=await v(y.id);p.value=y.id,_.value=$}function F(){p.value=null,_.value=null}const{tableRef:A}=Bt(()=>x.value);return(y,$)=>(u(),c("div",null,[p.value&&_.value?(u(),c("div",Ip,[n("div",Bp,[n("div",Np,[x.value.find(T=>T.id===p.value)?(u(),c(U,{key:0},[$[4]||($[4]=n("strong",null,"Subject:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.subject)+"   |  ",1),$[5]||($[5]=n("strong",null,"From:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.from_addr||x.value.find(T=>T.id===p.value)?.from)+"   |  ",1),$[6]||($[6]=n("strong",null,"To:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.to_addr||x.value.find(T=>T.id===p.value)?.to)+" ",1),x.value.find(T=>T.id===p.value)?.cc||x.value.find(T=>T.id===p.value)?.cc_addr?(u(),c(U,{key:0},[$[0]||($[0]=_e("   |  ",-1)),$[1]||($[1]=n("strong",null,"CC:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.cc||x.value.find(T=>T.id===p.value)?.cc_addr),1)],64)):te("",!0),$[7]||($[7]=_e("   |  ",-1)),$[8]||($[8]=n("strong",null,"Status:",-1)),n("span",{class:O(`ss-dash-badge ss-dash-email-status-${x.value.find(T=>T.id===p.value)?.status}`)},f(x.value.find(T=>T.id===p.value)?.status),3),x.value.find(T=>T.id===p.value)?.mailer?(u(),c(U,{key:1},[$[2]||($[2]=_e("   |  ",-1)),$[3]||($[3]=n("strong",null,"Mailer:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.mailer),1)],64)):te("",!0)],64)):te("",!0)]),n("button",{type:"button",class:"ss-dash-btn",id:"ss-dash-email-preview-close",onClick:F}," Close ")]),n("iframe",{class:"ss-dash-email-iframe",id:"ss-dash-email-iframe",srcdoc:_.value,title:"Email preview",sandbox:""},null,8,jp)])):(u(),c(U,{key:1},[me(Ct,{"model-value":m.value,placeholder:"Filter emails...",summary:`${k(r).total??0} emails`,"onUpdate:modelValue":w},null,8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",Hp,"Loading emails...")):(u(),c(U,{key:1},[n("div",Up,[x.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:A,class:"ss-dash-table"},[$[9]||($[9]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col",{style:{width:"150px"}}),n("col",{style:{width:"150px"}}),n("col"),n("col",{style:{width:"80px"}}),n("col",{style:{width:"40px"}}),n("col",{style:{width:"70px"}}),n("col",{style:{width:"80px"}})],-1)),$[10]||($[10]=n("thead",null,[n("tr",null,[n("th",null,"#"),n("th",null,"From"),n("th",null,"To"),n("th",null,"Subject"),n("th",null,"Status"),n("th",null,"ATT"),n("th",null,"Mailer"),n("th",null,"Time")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(x.value,T=>(u(),c("tr",{key:T.id,class:"ss-dash-clickable ss-dash-email-row",onClick:Q=>P(T)},[n("td",null,[n("span",Kp,f(T.id),1)]),n("td",null,[n("span",{title:T.from_addr||T.from||"",style:{color:"var(--ss-text-secondary)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.from_addr||T.from||""),9,Vp)]),n("td",null,[n("span",{title:T.to_addr||T.to||"",style:{color:"var(--ss-text-secondary)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.to_addr||T.to||""),9,zp)]),n("td",null,[n("span",{title:T.subject||"",style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.subject||""),9,Wp)]),n("td",null,[n("span",{class:O(`ss-dash-badge ss-dash-email-status-${T.status||""}`)},f(T.status),3)]),n("td",null,[(T.attachment_count||T.attachmentCount||0)>0?(u(),c("span",Jp,f(T.attachment_count||T.attachmentCount||0),1)):(u(),c("span",Qp,"-"))]),n("td",null,[n("span",{title:T.mailer||"",style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.mailer||""),9,Gp)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:k(It)(T.createdAt||T.created_at||T.timestamp)},f(k(bt)(T.createdAt||T.created_at||T.timestamp)),9,Yp)])],8,qp))),128))])],512)):(u(),c("div",Xp,"No emails captured yet"))]),k(r).totalPages>1?(u(),Xe(Vt,{key:0,page:k(r).page,"last-page":k(r).totalPages,total:k(r).total,onPageChange:k(d)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),ev={key:0,class:"ss-dash-empty"},tv={class:"ss-dash-tl-detail-header"},sv={style:{color:"var(--ss-text)"}},nv={class:"ss-dash-tl-meta"},lv={key:0,class:"ss-dash-empty"},ov={key:1,class:"ss-dash-empty"},av={class:"ss-dash-table-wrap"},iv=["onClick"],rv={style:{color:"var(--ss-dim)"}},uv=["title"],cv={style:{color:"var(--ss-muted)","text-align":"center"}},dv=["title"],fv={key:1,class:"ss-dash-empty"},hv=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"TimelineSection",props:{tracingEnabled:{type:Boolean,default:!0}},setup(e){const t=e,s=re("ss-refresh-key",J(0)),l=re("ss-dashboard-endpoint","/__stats/api"),o=re("ss-auth-token",void 0),a=re("ss-base-url",""),{data:i,loading:r,error:d,pagination:g,goToPage:v,setSearch:m}=Ze(()=>"traces",{baseUrl:a,dashboardEndpoint:l,authToken:o,refreshKey:s}),p=J(""),_=J(null),x=J(null),w=J(!1),P=q(()=>{if(!i.value)return[];const V=i.value;return V.data||V.traces||i.value||[]}),F=un(a,o);async function A(V){_.value=V,w.value=!0,x.value=null;try{const G=l||"/__stats/api",R=await F().fetch(`${G}/traces/${V}`);x.value=R}catch{}finally{w.value=!1}}function y(){_.value=null,x.value=null}function $(V){p.value=V,m(V)}function T(V){const G=nn(V);return G==="very-slow"?"ss-dash-very-slow":G==="slow"?"ss-dash-slow":""}const{tableRef:Q}=Bt(()=>P.value);return(V,G)=>(u(),c("div",null,[t.tracingEnabled?_.value&&x.value?(u(),c(U,{key:1},[n("div",tv,[n("button",{type:"button",class:"ss-dash-btn",onClick:y},"← Back"),n("span",{class:O(`ss-dash-method ss-dash-method-${(x.value.method||"").toLowerCase()}`)},f(x.value.method),3),n("span",sv,f(x.value.url),1),n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((x.value.status_code||x.value.statusCode||0)/100)}xx`)},f(x.value.status_code||x.value.statusCode||0),3),n("span",nv,f((x.value.total_duration||x.value.totalDuration||0).toFixed(1))+"ms · "+f(x.value.spanCount??k(ll)(x.value.spans).length)+" spans ",1)]),me(da,{spans:k(ll)(x.value.spans),"total-duration":x.value.total_duration||x.value.totalDuration||0,warnings:k(aa)(x.value.warnings)},null,8,["spans","total-duration","warnings"])],64)):_.value&&w.value?(u(),c(U,{key:2},[n("div",{class:"ss-dash-tl-detail-header"},[n("button",{type:"button",class:"ss-dash-btn",onClick:y},"← Back")]),G[0]||(G[0]=n("div",{class:"ss-dash-empty"},"Loading trace detail...",-1))],64)):(u(),c(U,{key:3},[me(Ct,{"model-value":p.value,placeholder:"Filter traces...",summary:`${k(g).total??0} traces`,"onUpdate:modelValue":$},null,8,["model-value","summary"]),k(d)?(u(),c("div",lv,"Failed to load traces")):te("",!0),k(r)&&!k(i)?(u(),c("div",ov,"Loading traces...")):(u(),c(U,{key:2},[n("div",av,[P.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:Q,class:"ss-dash-table"},[G[1]||(G[1]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"60px"}}),n("col",{style:{width:"80px"}}),n("col",{style:{width:"50px"}}),n("col",{style:{width:"80px"}})],-1)),G[2]||(G[2]=n("thead",null,[n("tr",null,[n("th",null,"#"),n("th",null,"Method"),n("th",null,"URL"),n("th",null,"Status"),n("th",null,"Duration"),n("th",null,"Spans"),n("th",null,"Time")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(P.value,R=>(u(),c("tr",{key:R.id,class:"ss-dash-clickable",onClick:K=>A(R.id)},[n("td",null,[n("span",rv,f(R.id),1)]),n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(R.method||"").toLowerCase()}`)},f(R.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:R.url},f(R.url),9,uv)]),n("td",null,[n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((R.statusCode||R.status_code||0)/100)}xx`)},f(R.statusCode||R.status_code||0),3)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${T(R.totalDuration||R.total_duration||0)}`)},f((R.totalDuration||R.total_duration||0).toFixed(1))+"ms ",3)]),n("td",null,[n("span",cv,f(R.spanCount||R.span_count||0),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(R.createdAt||R.created_at||R.timestamp)},f(k(bt)(R.createdAt||R.created_at||R.timestamp)),9,dv)])],8,iv))),128))])],512)):(u(),c("div",fv,"No traces recorded"))]),k(g).totalPages>1?(u(),Xe(Vt,{key:0,page:k(g).page,"last-page":k(g).totalPages,total:k(g).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64)):(u(),c("div",ev," Tracing is not enabled. Enable tracing in your server-stats config to use the timeline. "))]))}})},Symbol.toStringTag,{value:"Module"})),pv={key:0,class:"ss-dash-cache-stats"},vv={class:"ss-dash-cache-stat"},gv={class:"ss-dash-cache-stat-value"},yv={class:"ss-dash-cache-stat"},mv={class:"ss-dash-cache-stat-value"},bv={class:"ss-dash-cache-stat"},_v={class:"ss-dash-cache-stat-value"},xv={class:"ss-dash-cache-stat"},wv={class:"ss-dash-cache-stat-value"},$v={key:1,class:"ss-dash-empty"},kv={key:2,class:"ss-dash-empty"},Sv={key:3,class:"ss-dash-table-wrap"},Cv=["onClick"],Tv=["title"],Ev={style:{color:"var(--ss-muted)"}},Pv=["onClick"],Mv={key:1,class:"ss-dash-empty"},Av={key:4,class:"ss-dash-cache-detail"},Rv={key:0,class:"ss-dash-empty"},Lv={key:1,class:"ss-dash-empty",style:{color:"var(--ss-red-fg)"}},Fv=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"CacheSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,setSearch:r,mutate:d}=Ze(()=>"cache",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=un(o||"",l),v=new na(g(),s||"/__stats/api"),m=J(""),p=J(null),_=J(null),x=J(!1),w=J(null),P=q(()=>a.value),F=q(()=>P.value?.keys||P.value?.data||[]);function A(Q){m.value=Q,r(Q)}async function y(Q){if(confirm(`Delete cache key "${Q}"?`))try{await d(`cache/${encodeURIComponent(Q)}`,"delete"),p.value===Q&&(p.value=null,_.value=null,w.value=null)}catch{}}const{tableRef:$}=Bt(()=>F.value);async function T(Q){if(p.value===Q){p.value=null,_.value=null,w.value=null;return}p.value=Q,_.value=null,w.value=null,x.value=!0;try{const V=await v.fetchCacheKey(Q);_.value=V.value!==void 0?V.value:V.data!==void 0?V.data:V,w.value=null}catch{_.value=null,w.value="Failed to fetch key value"}finally{x.value=!1}}return(Q,V)=>(u(),c("div",null,[P.value?.available&&P.value?.stats?(u(),c("div",pv,[n("div",vv,[V[0]||(V[0]=n("span",{class:"ss-dash-cache-stat-label"},"Hit Rate:",-1)),n("span",gv,f((P.value.stats.hitRate??0).toFixed(1))+"%",1)]),n("div",yv,[V[1]||(V[1]=n("span",{class:"ss-dash-cache-stat-label"},"Hits:",-1)),n("span",mv,f(P.value.stats.hits??0),1)]),n("div",bv,[V[2]||(V[2]=n("span",{class:"ss-dash-cache-stat-label"},"Misses:",-1)),n("span",_v,f(P.value.stats.misses??0),1)]),n("div",xv,[V[3]||(V[3]=n("span",{class:"ss-dash-cache-stat-label"},"Keys:",-1)),n("span",wv,f(P.value.stats.totalKeys||P.value.stats.keyCount||F.value.length||0),1)])])):te("",!0),me(Ct,{"model-value":m.value,placeholder:"Filter cache keys...",summary:`${F.value.length} keys`,"onUpdate:modelValue":A},null,8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",$v,"Loading cache...")):!P.value||!P.value.available?(u(),c("div",kv," Cache inspector not available ")):(u(),c("div",Sv,[F.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:$,class:"ss-dash-table"},[V[4]||(V[4]=n("thead",null,[n("tr",null,[n("th",null,"Key"),n("th",null,"Type"),n("th",null,"Size"),n("th",null,"TTL"),n("th")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(F.value,G=>(u(),c("tr",{key:G.key,class:"ss-dash-clickable",onClick:R=>T(G.key)},[n("td",null,[n("span",{title:G.key,style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(G.key),9,Tv)]),n("td",null,[n("span",Ev,f(G.type),1)]),n("td",null,f(G.size!==null&&G.size!==void 0&&G.size>0?k(hu)(G.size):"-"),1),n("td",null,f(G.ttl>0?k(fu)(G.ttl):"-"),1),n("td",null,[n("button",{type:"button",class:"ss-dash-retry-btn",onClick:mt(R=>y(G.key),["stop"])}," Delete ",8,Pv)])],8,Cv))),128))])],512)):(u(),c("div",Mv,"No cache keys found"))])),p.value?(u(),c("div",Av,[n("h4",null,"Key: "+f(p.value),1),x.value?(u(),c("div",Rv,"Loading value...")):w.value?(u(),c("div",Lv,f(w.value),1)):(u(),Xe(il,{key:2,value:_.value},null,8,["value"]))])):te("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Ov={key:0,class:"ss-dash-job-stats"},Dv={class:"ss-dash-job-stat"},Iv={class:"ss-dash-job-stat-value"},Bv={class:"ss-dash-job-stat"},Nv={class:"ss-dash-job-stat-value"},jv={class:"ss-dash-job-stat"},Hv={class:"ss-dash-job-stat-value"},Uv={class:"ss-dash-job-stat"},qv={class:"ss-dash-job-stat-value"},Kv={class:"ss-dash-job-stat"},Vv={class:"ss-dash-job-stat-value",style:{color:"var(--ss-red-fg)"}},zv={class:"ss-dash-btn-group"},Wv=["onClick"],Jv={key:1,class:"ss-dash-empty"},Qv={key:2,class:"ss-dash-empty"},Gv={class:"ss-dash-table-wrap"},Yv={style:{color:"var(--ss-dim)"}},Xv=["title"],Zv={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},eg={class:"ss-dash-duration"},tg=["title"],sg=["disabled","onClick"],ng={key:1,class:"ss-dash-empty"},lg=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"JobsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,pagination:d,goToPage:g,setSearch:v,setFilter:m,refresh:p,mutate:_}=Ze(()=>"jobs",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),x=J(""),w=J("all"),P=J({}),F=q(()=>Pu(a.value)),A=q(()=>Mu(a.value));function y(V){x.value=V,v(V)}function $(V){w.value=V,V==="all"?m("status",""):m("status",V)}const{tableRef:T}=Bt(()=>F.value);async function Q(V){P.value[V]="pending";try{await _(`jobs/${V}/retry`),P.value[V]="success",setTimeout(()=>{delete P.value[V],p()},1e3)}catch{delete P.value[V]}}return(V,G)=>(u(),c("div",null,[A.value?(u(),c("div",Ov,[n("div",Dv,[G[0]||(G[0]=n("span",{class:"ss-dash-job-stat-label"},"Active:",-1)),n("span",Iv,f(A.value.active??0),1)]),n("div",Bv,[G[1]||(G[1]=n("span",{class:"ss-dash-job-stat-label"},"Waiting:",-1)),n("span",Nv,f(A.value.waiting??0),1)]),n("div",jv,[G[2]||(G[2]=n("span",{class:"ss-dash-job-stat-label"},"Delayed:",-1)),n("span",Hv,f(A.value.delayed??0),1)]),n("div",Uv,[G[3]||(G[3]=n("span",{class:"ss-dash-job-stat-label"},"Completed:",-1)),n("span",qv,f(A.value.completed??0),1)]),n("div",Kv,[G[4]||(G[4]=n("span",{class:"ss-dash-job-stat-label"},"Failed:",-1)),n("span",Vv,f(A.value.failed??0),1)])])):te("",!0),me(Ct,{"model-value":x.value,placeholder:"Filter jobs...",summary:`${k(d).total||F.value.length} jobs`,"onUpdate:modelValue":y},{default:ts(()=>[n("div",zv,[(u(!0),c(U,null,ye(k(Tu),R=>(u(),c("button",{key:R,type:"button",class:O(`ss-dash-btn ${w.value===R?"ss-dash-active":""}`),onClick:K=>$(R)},f(R.charAt(0).toUpperCase()+R.slice(1)),11,Wv))),128))])]),_:1},8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",Jv,"Loading jobs...")):k(r)?(u(),c("div",Qv,"Jobs/Queue not available")):(u(),c(U,{key:3},[n("div",Gv,[F.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:T,class:"ss-dash-table"},[G[5]||(G[5]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col",{style:{width:"90px"}}),n("col"),n("col",{style:{width:"50px"}}),n("col",{style:{width:"75px"}}),n("col",{style:{width:"70px"}}),n("col",{style:{width:"50px"}})],-1)),G[6]||(G[6]=n("thead",null,[n("tr",null,[n("th",null,"ID"),n("th",null,"Name"),n("th",null,"Status"),n("th",null,"Payload"),n("th",null,"Tries"),n("th",null,"Duration"),n("th",null,"Time"),n("th")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(F.value,R=>(u(),c("tr",{key:R.id},[n("td",null,[n("span",Yv,f(R.id),1)]),n("td",null,[n("span",{style:{color:"var(--ss-text)"},title:R.name},f(R.name),9,Xv)]),n("td",null,[n("span",{class:O(`ss-dash-badge ss-dash-badge-${k(Eu)(R.status)}`)},f(R.status),3)]),n("td",null,[me(il,{value:R.payload||R.data,"max-len":60},null,8,["value"])]),n("td",null,[n("span",Zv,f(R.attempts||R.attemptsMade||0),1)]),n("td",null,[n("span",eg,f(R.duration!==null&&R.duration!==void 0?k(Dt)(R.duration):"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:k(It)(R.timestamp||R.createdAt||R.processedAt||R.created_at)},f(k(bt)(R.timestamp||R.createdAt||R.processedAt||R.created_at)),9,tg)]),n("td",null,[R.status==="failed"?(u(),c("button",{key:0,type:"button",class:"ss-dash-retry-btn",disabled:P.value[R.id]==="pending"||P.value[R.id]==="success",onClick:mt(K=>Q(R.id),["stop"])},f(P.value[R.id]==="pending"?"...":P.value[R.id]==="success"?"OK":"Retry"),9,sg)):te("",!0)])]))),128))])],512)):(u(),c("div",ng,"No jobs found"))]),k(d).totalPages>1?(u(),Xe(Vt,{key:0,page:k(d).page,"last-page":k(d).totalPages,total:k(d).total,onPageChange:k(g)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),og={style:{position:"relative",flex:1}},ag=["value"],ig=["title","onClick"],rg=["viewBox","innerHTML"],ug=["viewBox","innerHTML"],cg=["onClick"],dg={key:0},fg=["title","onClick"],hg=["viewBox","innerHTML"],pg=["viewBox","innerHTML"],vg=["onClick"],gg={key:0},yg={style:{padding:"4px 16px",fontSize:"10px",color:"var(--ss-muted)"}},mg=["onClick"],bg=["title"],_g=["title"],xg=["title","onClick"],wg=["viewBox","innerHTML"],$g=["viewBox","innerHTML"],kg=["onClick"],Sg=["title","onClick"],Cg=["viewBox","innerHTML"],Tg=["viewBox","innerHTML"],Eg={key:1,style:{color:"var(--ss-dim)"}},Pg={key:3,style:{color:"var(--ss-amber-fg)"}},Mg={key:4,style:{color:"var(--ss-purple-fg)"}},Ag={key:5},Rg=["onClick"],ue="ss-dash",Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"ConfigSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-dashboard-endpoint","/__stats/api"),o=re("ss-auth-token",void 0),{data:a,loading:i}=Ze(()=>"config",{baseUrl:s,dashboardEndpoint:l,authToken:o,refreshKey:t}),r=J(""),d=J(""),g=J("app"),v=J(new Set),m=J("Copy JSON"),p=J(new Set),_=J(new Map);let x=null;function w(X){r.value=X,x&&clearTimeout(x),x=setTimeout(()=>{d.value=X},200)}function P(X){return X.target.value}const F=q(()=>a.value??null),A=q(()=>{const X=F.value?.env??{},ie=d.value.toLowerCase();return Object.entries(X).filter(([z,oe])=>{if(!ie)return!0;const Ie=De(oe)?oe.display:oe==null?"":String(oe);return z.toLowerCase().includes(ie)||Ie.toLowerCase().includes(ie)})}),y=q(()=>{const X=F.value?.app??{},ie=d.value.toLowerCase();return an(X,"").filter(oe=>{const Ie=De(oe.value)?oe.value.display:oe.value===null||oe.value===void 0?"":String(oe.value);return oe.path.toLowerCase().includes(ie)||Ie.toLowerCase().includes(ie)})}),$=q(()=>{const X=F.value?.app??{};return an(X,"").length}),T=q(()=>{const X=F.value?.app;return!X||typeof X!="object"||Array.isArray(X)||De(X)?[]:Object.keys(X)});function Q(X){const ie=new Set(v.value);ie.has(X)?ie.delete(X):ie.add(X),v.value=ie}function V(){if(!F.value)return;const X=g.value==="app"?F.value.app:F.value.env;if(!X)return;const ie=Wu(X);v.value=new Set(ie)}function G(){v.value=new Set}function R(){if(!F.value)return;const X=g.value==="app"?F.value.app:F.value.env;navigator.clipboard?.writeText(JSON.stringify(X,null,2)).then(()=>{m.value="Copied!",setTimeout(()=>{m.value="Copy JSON"},1500)}).catch(()=>{})}function K(X){const ie=new Set(p.value);ie.has(X)?ie.delete(X):ie.add(X),p.value=ie}function se(X,ie){_.value.set(X,ie)}function be(X,ie,z){z.stopPropagation(),Ju(X,_.value.get(ie)??null,ue)}function Ae(X){return X!==null&&typeof X=="object"&&!Array.isArray(X)&&!De(X)}function Le(X,ie){return an(X,ie)}function Re(X,ie){return X.indexOf(ie+".")===0?X.slice(ie.length+1):X}function ge(X){return zu(X)}function de(X){return De(X)?X.display:X==null?"null":String(X)}function E(X){const ie=F.value?.app;return!ie||typeof ie!="object"?null:ie[X]??null}function C(X,ie){return De(X)?ie?X.value:X.display:""}function S(){r.value="",d.value=""}function H(X){return De(X)?X.display:""}const ne=q(()=>Me.eye.elements.join("")),Te=q(()=>Me["eye-off"].elements.join(""));return(X,ie)=>(u(),c("div",null,[n("div",{class:O(`${ue}-config-toolbar`),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px"}},[n("button",{type:"button",class:O(`${ue}-config-tab${g.value==="app"?` ${ue}-active`:""}`),onClick:ie[0]||(ie[0]=z=>g.value="app")}," App Config ",2),n("button",{type:"button",class:O(`${ue}-config-tab${g.value==="env"?` ${ue}-active`:""}`),onClick:ie[1]||(ie[1]=z=>g.value="env")}," Env ",2),n("div",og,[n("input",{type:"text",class:O(`${ue}-search`),placeholder:"Search keys and values...",value:r.value,style:{width:"100%"},onInput:ie[2]||(ie[2]=z=>w(P(z)))},null,42,ag),r.value?(u(),c("button",{key:0,type:"button",style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",fontSize:"14px",color:"var(--ss-dim)",padding:"0 2px",lineHeight:1},onClick:S}," × ")):te("",!0)]),g.value==="app"&&!d.value?(u(),c(U,{key:0},[n("button",{type:"button",class:O(`${ue}-btn`),onClick:V},"Expand All",2),n("button",{type:"button",class:O(`${ue}-btn`),onClick:G},"Collapse All",2)],64)):te("",!0),n("button",{type:"button",class:O(`${ue}-btn`),onClick:R},f(m.value),3)],2),k(i)&&!k(a)?(u(),c("div",{key:0,class:O(`${ue}-empty`)},"Loading config...",2)):F.value?g.value==="env"?(u(),c("div",{key:2,class:O(`${ue}-config-table-wrap`)},[n("table",{class:O(`${ue}-table ${ue}-config-env-table`)},[ie[4]||(ie[4]=n("thead",null,[n("tr",null,[n("th",null,"Variable"),n("th",null,"Value"),n("th",{style:{width:"36px"}})])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(A.value,([z,oe])=>(u(),c("tr",{key:z},[n("td",{class:O(`${ue}-env-key`)},[n("span",{class:O(`${ue}-config-key`)},f(z),3)],2),n("td",{class:O(`${ue}-env-val`)},[k(De)(oe)?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(oe,p.value.has(z))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(z)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(Ie=>K(z),["stop"])},[p.value.has(z)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,rg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,ug))],10,ig)],2)):(u(),c("span",{key:1,class:O(`${ue}-config-val`)},f(de(oe)),3))],2),n("td",null,[k(De)(oe)?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:Ie=>se(`env-${z}`,Ie),onClick:Ie=>be(`${z}=${de(oe)}`,`env-${z}`,Ie)}," ⎘ ",10,cg))])]))),128)),A.value.length===0?(u(),c("tr",dg,[...ie[3]||(ie[3]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching variables ",-1)])])):te("",!0)])],2)],2)):d.value?(u(),c("div",{key:3,class:O(`${ue}-config-table-wrap`)},[n("table",{class:O(`${ue}-table`)},[ie[6]||(ie[6]=n("thead",null,[n("tr",null,[n("th",null,"Path"),n("th",null,"Value"),n("th",{style:{width:"36px"}})])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(y.value,z=>(u(),c("tr",{key:z.path},[n("td",null,[n("span",{class:O(`${ue}-config-key`),style:{whiteSpace:"nowrap"}},f(z.path),3)]),n("td",null,[k(De)(z.value)?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(z.value,p.value.has(z.path))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(z.path)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(oe=>K(z.path),["stop"])},[p.value.has(z.path)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,hg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,pg))],10,fg)],2)):(u(),c("span",{key:1,class:O(`${ue}-config-val`),style:Ke({wordBreak:"break-all",color:ge(z.value).color})},f(ge(z.value).text),7))]),n("td",null,[k(De)(z.value)?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:oe=>se(`search-${z.path}`,oe),onClick:oe=>be(`${z.path}: ${k(De)(z.value)?H(z.value):ge(z.value).text}`,`search-${z.path}`,oe)}," ⎘ ",10,vg))])]))),128)),y.value.length===0?(u(),c("tr",gg,[...ie[5]||(ie[5]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching entries ",-1)])])):te("",!0)])],2),n("div",yg,f(y.value.length)+" of "+f($.value)+" entries ",1)],2)):(u(),c("div",{key:4,class:O(`${ue}-config-table-wrap`)},[n("div",{class:O(`${ue}-config-sections`)},[(u(!0),c(U,null,ye(T.value,z=>(u(),c("div",{key:z,class:O(`${ue}-config-section`)},[Ae(E(z))?(u(),c(U,{key:0},[n("div",{class:O(`${ue}-config-section-header`),style:{cursor:"pointer"},onClick:oe=>Q(z)},[n("span",{class:O(`${ue}-config-toggle`)},f(v.value.has(z)?"▼":"▶"),3),n("span",{class:O(`${ue}-config-key`)},f(z),3),n("span",{class:O(`${ue}-config-count`)},f(k(ia)(E(z)))+" entries ",3)],10,mg),v.value.has(z)?(u(),c("div",{key:0,class:O(`${ue}-config-section-body`)},[n("table",{class:O(`${ue}-table ${ue}-config-inner-table`)},[ie[7]||(ie[7]=n("thead",null,[n("tr",null,[n("th",{style:{width:"35%"}},"Key"),n("th",null,"Value"),n("th",{style:{width:"36px"}})])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(Le(E(z),z),oe=>(u(),c("tr",{key:oe.path},[n("td",{title:Re(oe.path,z)},[n("span",{class:O(`${ue}-config-key`)},f(Re(oe.path,z)),3)],8,bg),n("td",{title:k(De)(oe.value)?H(oe.value):ge(oe.value).text},[k(De)(oe.value)?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(oe.value,p.value.has(oe.path))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(oe.path)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(Ie=>K(oe.path),["stop"])},[p.value.has(oe.path)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,wg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,$g))],10,xg)],2)):(u(),c("span",{key:1,class:O(`${ue}-config-val`),style:Ke({color:ge(oe.value).color})},f(ge(oe.value).text),7))],8,_g),n("td",null,[k(De)(oe.value)?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:Ie=>se(`inner-${oe.path}`,Ie),onClick:Ie=>be(`${oe.path}: ${ge(oe.value).text}`,`inner-${oe.path}`,Ie)}," ⎘ ",10,kg))])]))),128))])],2)],2)):te("",!0)],64)):(u(),c("div",{key:1,class:O(`${ue}-config-section-header ${ue}-config-leaf`),style:{cursor:"default"}},[n("span",{class:O(`${ue}-config-toggle`),style:{visibility:"hidden"}},"•",2),n("span",{class:O(`${ue}-config-key`)},f(z),3),n("span",{class:O(`${ue}-config-val`),style:{marginLeft:"8px"}},[k(De)(E(z))?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(E(z),p.value.has(z))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(z)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(oe=>K(z),["stop"])},[p.value.has(z)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,Cg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,Tg))],10,Sg)],2)):E(z)===null||E(z)===void 0?(u(),c("span",Eg,"null")):typeof E(z)=="boolean"?(u(),c("span",{key:2,style:Ke({color:E(z)?"var(--ss-green-fg)":"var(--ss-red-fg)"})},f(String(E(z))),5)):typeof E(z)=="number"?(u(),c("span",Pg,f(String(E(z))),1)):Array.isArray(E(z))?(u(),c("span",Mg,f(ge(E(z)).text),1)):(u(),c("span",Ag,f(String(E(z))),1))],2),k(De)(E(z))?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),style:{marginLeft:"4px"},title:"Copy",ref_for:!0,ref:oe=>se(`leaf-${z}`,oe),onClick:oe=>be(`${z}: ${ge(E(z)).text}`,`leaf-${z}`,oe)}," ⎘ ",10,Rg))],2))],2))),128))],2)],2)):(u(),c("div",{key:1,class:O(`${ue}-empty`)},"Config not available",2))]))}})},Symbol.toStringTag,{value:"Module"})),Fg={key:0,class:"ss-dash-empty"},Og={key:1,class:"ss-dash-empty"},Dg={key:2,class:"ss-dash-empty"},Ig={class:"ss-dash-info-cards"},Bg={class:"ss-dash-info-card-label"},Ng={class:"ss-dash-info-card-value"},jg={key:0,class:"ss-dash-empty"},Hg={key:1,class:"ss-dash-table"},Ug={style:{"font-family":"monospace","font-size":"11px"}},qg={key:0,style:{"margin-left":"6px","font-size":"11px",color:"var(--ss-dim)"}},Kg={style:{color:"var(--ss-dim)","margin-left":"4px"}},Vg={style:{"font-size":"11px"}},zg=["onClick"],Wg=["onClick"],Jg={key:2,class:"ss-dash-empty"},Qg={key:3,class:"ss-dash-table"},Gg={class:"ss-dash-bar"},Yg={class:"ss-dash-bar-track",style:{"max-width":"120px"}},Xg={key:4,class:"ss-dash-empty"},Zg={key:5,class:"ss-dash-table"},e1={style:{color:"var(--ss-dim)"}},t1={key:6,class:"ss-dash-empty"},s1={key:7,class:"ss-dash-table"},n1={style:{color:"var(--ss-dim)","font-size":"11px"}},l1={class:"ss-dash-table"},o1={style:{"font-family":"monospace","font-size":"11px"}},a1={key:0,class:"ss-dash-table",style:{"margin-top":"8px"}},i1={style:{"font-family":"monospace","font-size":"11px"}},r1={class:"ss-dash-table"},u1={class:"ss-dash-table"},c1={style:{"font-family":"monospace","font-size":"11px"}},d1={style:{"font-family":"monospace","font-size":"11px"}},f1={style:{"font-family":"monospace","font-size":"11px"}},h1={style:{"font-size":"11px"}},p1=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"InternalsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-debug-endpoint","/admin/api/debug"),o=re("ss-auth-token",void 0),a=J(null),i=J(!0),r=J(null),d=J(new Set),g=un(s,o);let v=null;async function m(){try{const A=await g().fetch(`${l}/diagnostics`);a.value=A,r.value=null,i.value=!1}catch(A){if(A instanceof tn){r.value=A,i.value=!1,v&&(clearInterval(v),v=null);return}r.value=A instanceof Error?A:new Error(String(A)),i.value=!1}}Lt(()=>{i.value=!0,r.value=null,m(),v=setInterval(m,Zo)}),Ft(()=>{v&&clearInterval(v)}),gt(t,()=>{m()});function p(A){d.value.has(A)?d.value.delete(A):d.value.add(A)}function _(A){const y=Vu(A);return y==="ok"?"ss-dash-dot-ok":y==="err"?"ss-dash-dot-err":""}function x(A){return A.debounceMs!==void 0?`${Dt(A.debounceMs)} (debounce)`:A.intervalMs!==void 0?Dt(A.intervalMs):"-"}const w=q(()=>a.value?.buffers?Object.entries(a.value.buffers).map(([A,y])=>({name:A.charAt(0).toUpperCase()+A.slice(1),...y,percent:Uu(y.current,y.max)})):[]),P=q(()=>a.value?.timers?Object.entries(a.value.timers).map(([A,y])=>({key:A,label:Du(A),...y,interval:x(y)})):[]),F=q(()=>{if(!a.value)return[];const A=[];if(a.value.transmit&&A.push({key:"transmit",label:"Transmit (SSE)",status:a.value.transmit.available?"connected":"unavailable",details:a.value.transmit.available?`Channels: ${a.value.transmit.channels.join(", ")}`:"Not installed"}),a.value.integrations)for(const[y,$]of Object.entries(a.value.integrations))A.push({key:y,label:Bu(y),status:Nu($),details:ju(y,$)});return A});return(A,y)=>(u(),c("div",null,[i.value&&!a.value?(u(),c("div",Fg,"Loading diagnostics...")):r.value&&!a.value?(u(),c("div",Og,"Error: "+f(r.value.message),1)):a.value?(u(),c(U,{key:3},[y[41]||(y[41]=n("h3",{class:"ss-dash-section-title"},"Package Info",-1)),n("div",Ig,[(u(!0),c(U,null,ye([{label:"Version",value:a.value.package?.version||"-"},{label:"Node.js",value:a.value.package?.nodeVersion||"-"},{label:"AdonisJS",value:a.value.package?.adonisVersion||"-"},{label:"Uptime",value:k(du)(a.value.uptime||a.value.package?.uptime)},{label:"Renderer",value:a.value.devToolbar?.renderer||"preact"}],$=>(u(),c("div",{key:$.label,class:"ss-dash-info-card"},[n("span",Bg,f($.label),1),n("span",Ng,f($.value),1)]))),128))]),y[42]||(y[42]=n("h3",{class:"ss-dash-section-title"},"Collectors",-1)),a.value.collectors?.length?(u(),c("table",Hg,[y[4]||(y[4]=n("thead",null,[n("tr",null,[n("th",null,"Collector"),n("th",null,"Status"),n("th",null,"Last Error"),n("th",null,"Config")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(a.value.collectors,$=>(u(),c("tr",{key:$.name},[n("td",null,[n("span",Ug,f($.name),1),$.label&&$.label!==$.name?(u(),c("span",qg,f($.label),1)):te("",!0)]),n("td",null,[n("span",{class:O(["ss-dash-dot",_($.status)])},null,2),_e(" "+f($.status),1)]),n("td",{style:Ke($.lastError?{color:"var(--ss-red-fg)"}:{})},[$.lastError?(u(),c(U,{key:0},[_e(f($.lastError)+" ",1),n("span",Kg,f(k(bt)($.lastErrorAt??0)),1)],64)):(u(),c(U,{key:1},[_e("-")],64))],4),n("td",Vg,[Object.keys($.config||{}).length?(u(!0),c(U,{key:0},ye(k(Hu)($.config),T=>(u(),c("span",{key:T.key,style:{"margin-right":"8px"}},[_e(f(T.key)+"=",1),T.secret&&!d.value.has(`collector-${$.name}-${T.key}`)?(u(),c("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:Q=>p(`collector-${$.name}-${T.key}`)},"••••••••",8,zg)):(u(),c(U,{key:1},[n("span",null,f(T.value),1),T.secret?(u(),c("button",{key:0,style:{background:"none",border:"none",color:"var(--ss-link-color, #3b82f6)",cursor:"pointer","font-size":"10px","margin-left":"4px",padding:"0"},onClick:Q=>p(`collector-${$.name}-${T.key}`)}," Hide ",8,Wg)):te("",!0)],64))]))),128)):(u(),c(U,{key:1},[_e("-")],64))])]))),128))])])):(u(),c("div",jg,"No collectors")),y[43]||(y[43]=n("h3",{class:"ss-dash-section-title"},"Buffers",-1)),w.value.length?(u(),c("table",Qg,[y[5]||(y[5]=n("thead",null,[n("tr",null,[n("th",null,"Buffer"),n("th",null,"Usage"),n("th",null,"Fill %")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(w.value,$=>(u(),c("tr",{key:$.name},[n("td",null,f($.name),1),n("td",null,f($.current.toLocaleString())+" / "+f($.max.toLocaleString()),1),n("td",null,[n("div",Gg,[n("div",Yg,[n("div",{class:O(["ss-dash-bar-fill",$.percent>=100?"ss-dash-bar-fill-warn":""]),style:Ke({width:$.percent+"%"})},null,6)]),n("span",{class:O(["ss-dash-bar-pct",$.percent>=100?"ss-dash-bar-pct-warn":""])},f($.percent)+"%",3)])])]))),128))])])):(u(),c("div",Jg,"No buffer data")),y[44]||(y[44]=n("h3",{class:"ss-dash-section-title"},"Timers",-1)),P.value.length?(u(),c("table",Zg,[y[6]||(y[6]=n("thead",null,[n("tr",null,[n("th",null,"Timer"),n("th",null,"Status"),n("th",null,"Interval")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(P.value,$=>(u(),c("tr",{key:$.key},[n("td",null,f($.label),1),n("td",null,[n("span",{class:O(["ss-dash-dot",_($.active?"active":"inactive")])},null,2),_e(" "+f($.active?"active":"inactive"),1)]),n("td",e1,f($.interval),1)]))),128))])])):(u(),c("div",Xg,"No timer data")),y[45]||(y[45]=n("h3",{class:"ss-dash-section-title"},"Integrations",-1)),F.value.length?(u(),c("table",s1,[y[7]||(y[7]=n("thead",null,[n("tr",null,[n("th",null,"Integration"),n("th",null,"Status"),n("th",null,"Details")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(F.value,$=>(u(),c("tr",{key:$.key},[n("td",null,f($.label),1),n("td",null,[n("span",{class:O(["ss-dash-dot",_($.status)])},null,2),_e(" "+f($.status),1)]),n("td",n1,f($.details),1)]))),128))])])):(u(),c("div",t1,"No integration data")),a.value.storage?(u(),c(U,{key:8},[y[16]||(y[16]=n("h3",{class:"ss-dash-section-title"},"Storage",-1)),n("table",l1,[y[14]||(y[14]=n("thead",null,[n("tr",null,[n("th",null,"Metric"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[8]||(y[8]=n("td",null,"Status",-1)),n("td",null,[n("span",{class:O(["ss-dash-dot",_(a.value.storage.ready?"ready":"unavailable")])},null,2),_e(" "+f(a.value.storage.ready?"ready":"not ready"),1)])]),n("tr",null,[y[9]||(y[9]=n("td",null,"DB Path",-1)),n("td",o1,f(a.value.storage.dbPath),1)]),n("tr",null,[y[10]||(y[10]=n("td",null,"File Size",-1)),n("td",null,f(a.value.storage.fileSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[11]||(y[11]=n("td",null,"WAL Size",-1)),n("td",null,f(a.value.storage.walSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[12]||(y[12]=n("td",null,"Retention",-1)),n("td",null,f(a.value.storage.retentionDays)+" days",1)]),n("tr",null,[y[13]||(y[13]=n("td",null,"Last Cleanup",-1)),n("td",null,f(k(bt)(a.value.storage.lastCleanupAt??0)),1)])])]),a.value.storage.tables?.length?(u(),c("table",a1,[y[15]||(y[15]=n("thead",null,[n("tr",null,[n("th",null,"Table"),n("th",null,"Rows")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(a.value.storage.tables,$=>(u(),c("tr",{key:$.name},[n("td",i1,f($.name),1),n("td",null,f($.rowCount.toLocaleString()),1)]))),128))])])):te("",!0)],64)):te("",!0),y[46]||(y[46]=n("h3",{class:"ss-dash-section-title"},"Resolved Config",-1)),n("table",r1,[y[24]||(y[24]=n("thead",null,[n("tr",null,[n("th",null,"Setting"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[17]||(y[17]=n("td",null,"intervalMs",-1)),n("td",null,f(a.value.config?.intervalMs),1)]),n("tr",null,[y[18]||(y[18]=n("td",null,"transport",-1)),n("td",null,f(a.value.config?.transport),1)]),n("tr",null,[y[19]||(y[19]=n("td",null,"channelName",-1)),n("td",null,f(a.value.config?.channelName),1)]),n("tr",null,[y[20]||(y[20]=n("td",null,"endpoint",-1)),n("td",null,f(a.value.config?.endpoint===!1?"false":a.value.config?.endpoint),1)]),n("tr",null,[y[21]||(y[21]=n("td",null,"skipInTest",-1)),n("td",null,f(a.value.config?.skipInTest),1)]),n("tr",null,[y[22]||(y[22]=n("td",null,"onStats callback",-1)),n("td",null,f(a.value.config?.hasOnStatsCallback?"defined":"not defined"),1)]),n("tr",null,[y[23]||(y[23]=n("td",null,"shouldShow callback",-1)),n("td",null,f(a.value.config?.hasShouldShowCallback?"defined":"not defined"),1)])])]),y[47]||(y[47]=n("h4",{class:"ss-dash-section-title"},"DevToolbar",-1)),n("table",u1,[y[40]||(y[40]=n("thead",null,[n("tr",null,[n("th",null,"Setting"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[25]||(y[25]=n("td",null,"enabled",-1)),n("td",null,f(a.value.devToolbar?.enabled),1)]),n("tr",null,[y[26]||(y[26]=n("td",null,"tracing",-1)),n("td",null,f(a.value.devToolbar?.tracing),1)]),n("tr",null,[y[27]||(y[27]=n("td",null,"dashboard",-1)),n("td",null,f(a.value.devToolbar?.dashboard),1)]),n("tr",null,[y[28]||(y[28]=n("td",null,"dashboardPath",-1)),n("td",c1,f(a.value.devToolbar?.dashboardPath),1)]),n("tr",null,[y[29]||(y[29]=n("td",null,"debugEndpoint",-1)),n("td",d1,[d.value.has("cfg-debugEndpoint")?(u(),c(U,{key:1},[_e(f(a.value.devToolbar?.debugEndpoint)+" ",1),n("button",{style:{background:"none",border:"none",color:"var(--ss-link-color, #3b82f6)",cursor:"pointer","font-size":"10px","margin-left":"4px",padding:"0"},onClick:y[1]||(y[1]=$=>p("cfg-debugEndpoint"))}," Hide ")],64)):(u(),c("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:y[0]||(y[0]=$=>p("cfg-debugEndpoint"))},"••••••••"))])]),n("tr",null,[y[30]||(y[30]=n("td",null,"maxQueries",-1)),n("td",null,f(a.value.devToolbar?.maxQueries),1)]),n("tr",null,[y[31]||(y[31]=n("td",null,"maxEvents",-1)),n("td",null,f(a.value.devToolbar?.maxEvents),1)]),n("tr",null,[y[32]||(y[32]=n("td",null,"maxEmails",-1)),n("td",null,f(a.value.devToolbar?.maxEmails),1)]),n("tr",null,[y[33]||(y[33]=n("td",null,"maxTraces",-1)),n("td",null,f(a.value.devToolbar?.maxTraces),1)]),n("tr",null,[y[34]||(y[34]=n("td",null,"slowQueryThresholdMs",-1)),n("td",null,f(a.value.devToolbar?.slowQueryThresholdMs),1)]),n("tr",null,[y[35]||(y[35]=n("td",null,"retentionDays",-1)),n("td",null,f(a.value.devToolbar?.retentionDays),1)]),n("tr",null,[y[36]||(y[36]=n("td",null,"dbPath",-1)),n("td",f1,[d.value.has("cfg-dbPath")?(u(),c(U,{key:1},[_e(f(a.value.devToolbar?.dbPath)+" ",1),n("button",{style:{background:"none",border:"none",color:"var(--ss-link-color, #3b82f6)",cursor:"pointer","font-size":"10px","margin-left":"4px",padding:"0"},onClick:y[3]||(y[3]=$=>p("cfg-dbPath"))}," Hide ")],64)):(u(),c("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:y[2]||(y[2]=$=>p("cfg-dbPath"))},"••••••••"))])]),n("tr",null,[y[37]||(y[37]=n("td",null,"persistDebugData",-1)),n("td",null,f(a.value.devToolbar?.persistDebugData),1)]),n("tr",null,[y[38]||(y[38]=n("td",null,"excludeFromTracing",-1)),n("td",h1,f(a.value.devToolbar?.excludeFromTracing?.join(", ")||"-"),1)]),n("tr",null,[y[39]||(y[39]=n("td",null,"customPanes",-1)),n("td",null,f(a.value.devToolbar?.customPaneCount??0)+" registered",1)])])])],64)):(u(),c("div",Dg,"Diagnostics not available"))]))}})},Symbol.toStringTag,{value:"Module"}))})();
5
+ ${x}`:`${_.label} (${_.duration.toFixed(2)}ms)`}return(_,x)=>o.value.length===0?(u(),c("div",Vf,"No spans recorded")):(u(),c("div",{key:1,class:O(`ss-dash-tl-waterfall ${e.className||""}`)},[n("div",zf,[(u(),c(U,null,ye(l,(w,P)=>n("div",{key:P,class:"ss-dash-tl-legend-item"},[n("span",{class:"ss-dash-tl-legend-dot",style:Ke({background:s[P]||s.custom})},null,4),n("span",null,f(w),1)])),64))]),(u(!0),c(U,null,ye(a.value,w=>(u(),c("div",{key:w.id,class:"ss-dash-tl-row"},[n("div",{class:"ss-dash-tl-label",title:p(w),style:Ke({paddingLeft:8+(i.value[w.id]||0)*16+"px"})},[n("span",{class:O(`ss-dash-badge ss-dash-badge-${m(w.category)}`),style:{"font-size":"9px","margin-right":"4px"}},f(v(w.category)),3),_e(" "+f(g(w.label)),1)],12,Wf),n("div",Jf,[n("div",{class:O(`ss-dash-tl-bar ss-dash-tl-bar-${w.category||"custom"}`),style:Ke({left:r(w),width:d(w)}),title:p(w)},null,14,Qf)]),n("span",Gf,f(w.duration.toFixed(2))+"ms",1)]))),128)),e.warnings&&e.warnings.length>0?(u(),c("div",Yf,[n("div",Xf,"Warnings ("+f(e.warnings.length)+")",1),(u(!0),c(U,null,ye(e.warnings,(w,P)=>(u(),c("div",{key:P,class:"ss-dash-tl-warning"},f(w),1))),128))])):te("",!0)],2))}}),Zf={class:"ss-dash-tl-detail-header"},eh={style:{color:"var(--ss-text)"}},th={class:"ss-dash-tl-meta"},sh={class:"ss-dash-tl-detail-header"},nh={key:0,class:"ss-dash-empty"},lh={key:1,class:"ss-dash-empty"},oh={class:"ss-dash-table-wrap"},ah={key:0,class:"ss-dash-sort-arrow"},ih={key:0,class:"ss-dash-sort-arrow"},rh={key:0,class:"ss-dash-sort-arrow"},uh={key:0,class:"ss-dash-sort-arrow"},ch={key:0,class:"ss-dash-sort-arrow"},dh=["onClick"],fh={style:{color:"var(--ss-dim)"}},hh=["title"],ph={style:{color:"var(--ss-muted)","text-align":"center"}},vh={key:0,style:{color:"var(--ss-amber-fg)","text-align":"center",display:"block"}},gh={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},yh=["title"],mh={key:1,class:"ss-dash-empty"},bh=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"RequestsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,pagination:d,sort:g,goToPage:v,setSearch:m,setSort:p}=Ze(()=>"requests",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),_=J(""),x=J(null),w=J(!1),P=J(null),F=q(()=>{if(!a.value)return[];const R=a.value;return R.data||R.requests||a.value||[]}),A=un(o,l);async function y(R){const K=R.id;w.value=!0;try{const se=s||"/__stats/api",be=await A().fetch(`${se}/requests/${K}`);P.value=Au(be),x.value=R}catch{}finally{w.value=!1}}function $(){x.value=null,P.value=null}function T(R){_.value=R,m(R)}function Q(R){p(R)}function V(R){const K=nn(R);return K==="very-slow"?"ss-dash-very-slow":K==="slow"?"ss-dash-slow":""}const{tableRef:G}=Bt(()=>F.value);return(R,K)=>(u(),c("div",null,[P.value&&x.value?(u(),c(U,{key:0},[n("div",Zf,[n("button",{type:"button",class:"ss-dash-btn",onClick:$}," ← Back to Requests "),n("span",{class:O(`ss-dash-method ss-dash-method-${(P.value.method||"").toLowerCase()}`)},f(P.value.method),3),n("span",eh,f(P.value.url),1),n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((P.value.statusCode||200)/100)}xx`)},f(P.value.statusCode),3),n("span",th,f(P.value.totalDuration.toFixed(1))+"ms · "+f(P.value.spanCount)+" spans ",1)]),me(da,{spans:P.value.spans,"total-duration":P.value.totalDuration,warnings:P.value.warnings},null,8,["spans","total-duration","warnings"])],64)):w.value?(u(),c(U,{key:1},[n("div",sh,[n("button",{type:"button",class:"ss-dash-btn",onClick:K[0]||(K[0]=se=>w.value=!1)}," ← Back to Requests ")]),K[6]||(K[6]=n("div",{class:"ss-dash-empty"},"Loading request detail...",-1))],64)):(u(),c(U,{key:2},[me(Ct,{"model-value":_.value,placeholder:"Filter requests...",summary:`${k(d).total??0} requests`,"onUpdate:modelValue":T},null,8,["model-value","summary"]),k(r)?(u(),c("div",nh,"Failed to load requests")):te("",!0),k(i)&&!k(a)?(u(),c("div",lh,"Loading requests...")):(u(),c(U,{key:2},[n("div",oh,[F.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:G,class:"ss-dash-table"},[K[15]||(K[15]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"60px"}}),n("col",{style:{width:"80px"}}),n("col",{style:{width:"50px"}}),n("col",{style:{width:"40px"}}),n("col",{style:{width:"80px"}})],-1)),n("thead",null,[n("tr",null,[K[12]||(K[12]=n("th",null,"#",-1)),n("th",{class:"ss-dash-sortable",onClick:K[1]||(K[1]=se=>Q("method"))},[K[7]||(K[7]=_e(" Method ",-1)),k(g).column==="method"?(u(),c("span",ah,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:K[2]||(K[2]=se=>Q("url"))},[K[8]||(K[8]=_e(" URL ",-1)),k(g).column==="url"?(u(),c("span",ih,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:K[3]||(K[3]=se=>Q("statusCode"))},[K[9]||(K[9]=_e(" Status ",-1)),k(g).column==="statusCode"?(u(),c("span",rh,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:K[4]||(K[4]=se=>Q("duration"))},[K[10]||(K[10]=_e(" Duration ",-1)),k(g).column==="duration"?(u(),c("span",uh,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),K[13]||(K[13]=n("th",null,"Spans",-1)),K[14]||(K[14]=n("th",null,"⚠",-1)),n("th",{class:"ss-dash-sortable",onClick:K[5]||(K[5]=se=>Q("createdAt"))},[K[11]||(K[11]=_e(" Time ",-1)),k(g).column==="createdAt"?(u(),c("span",ch,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)])])]),n("tbody",null,[(u(!0),c(U,null,ye(F.value,se=>(u(),c("tr",{key:se.id,class:"ss-dash-clickable",onClick:be=>y(se)},[n("td",null,[n("span",fh,f(se.id),1)]),n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(se.method||"").toLowerCase()}`)},f(se.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:se.url},f(se.url),9,hh)]),n("td",null,[n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((se.status_code||se.statusCode||200)/100)}xx`)},f(se.status_code||se.statusCode),3)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${V(se.total_duration||se.totalDuration||se.duration||0)}`)},f((se.total_duration||se.totalDuration||se.duration||0).toFixed(1))+"ms ",3)]),n("td",null,[n("span",ph,f(se.span_count||se.spanCount||0),1)]),n("td",null,[(se.warning_count||se.warningCount||0)>0?(u(),c("span",vh,f(se.warning_count||se.warningCount||0),1)):(u(),c("span",gh,"-"))]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(se.createdAt||se.created_at||se.timestamp||"")},f(k(bt)(se.createdAt||se.created_at||se.timestamp||"")),9,yh)])],8,dh))),128))])],512)):(u(),c("div",mh,"No requests recorded yet"))]),k(d).totalPages>1?(u(),Xe(Vt,{key:0,page:k(d).page,"last-page":k(d).totalPages,total:k(d).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),_h={class:"ss-dash-btn-group"},xh={key:0,class:"ss-dash-empty"},wh={key:1,class:"ss-dash-table-wrap"},$h={key:0,class:"ss-dash-sort-arrow"},kh={key:0,class:"ss-dash-sort-arrow"},Sh={key:0,class:"ss-dash-sort-arrow"},Ch=["onClick","onKeydown"],Th={key:0,class:"ss-dash-dup"},Eh={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Ph={class:"ss-dash-duration"},Mh={class:"ss-dash-duration"},Ah={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Rh={key:1,class:"ss-dash-empty"},Lh={class:"ss-dash-table-wrap"},Fh={key:0,class:"ss-dash-sort-arrow"},Oh={key:0,class:"ss-dash-sort-arrow"},Dh={style:{color:"var(--ss-dim)"}},Ih=["onClick","onKeydown"],Bh={key:0,class:"ss-dash-dup"},Nh=["title"],jh={style:{color:"var(--ss-dim)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Hh=["title"],Uh=["disabled","onClick"],qh={key:0,class:"ss-dash-explain-row"},Kh={colspan:"8",class:"ss-dash-explain"},Vh={style:{display:"flex","justify-content":"space-between","align-items":"start"}},zh={style:{flex:"1"}},Wh={key:0,class:"ss-dash-explain-result ss-dash-explain-error"},Jh={key:0},Qh={key:1,class:"ss-dash-explain-result"},Gh={key:2,class:"ss-dash-explain-result"},Yh={key:3,class:"ss-dash-explain-result"},Xh={key:1,class:"ss-dash-empty"};function fa(e,t){if(!e)return null;const s=t*20,l=e["Node Type"]||"Unknown",o=e["Relation Name"]||"",a=e.Alias&&e.Alias!==e["Relation Name"]?` (${e.Alias})`:"",i=e["Index Name"]||"",r=[];if(e["Startup Cost"]!==null&&e["Startup Cost"]!==void 0&&r.push(`cost=${e["Startup Cost"]}..${e["Total Cost"]}`),e["Plan Rows"]!==null&&e["Plan Rows"]!==void 0&&r.push(`rows=${e["Plan Rows"]}`),e["Plan Width"]!==null&&e["Plan Width"]!==void 0&&r.push(`width=${e["Plan Width"]}`),e.Filter&&r.push(`filter: ${e.Filter}`),e["Index Cond"]&&r.push(`cond: ${e["Index Cond"]}`),e["Hash Cond"]&&r.push(`hash: ${e["Hash Cond"]}`),e["Join Type"]&&r.push(`join: ${e["Join Type"]}`),e["Sort Key"]){const g=Array.isArray(e["Sort Key"])?e["Sort Key"].join(", "):e["Sort Key"];r.push(`sort: ${g}`)}const d=e.Plans||[];return cs("div",{class:"ss-dash-explain-node",style:{marginLeft:`${s}px`}},[cs("div",{class:"ss-dash-explain-node-header"},[cs("span",{class:"ss-dash-explain-node-type"},l),o?[" on ",cs("strong",null,o)]:null,a||null,i?[" using ",cs("em",null,i)]:null]),r.length>0?cs("div",{class:"ss-dash-explain-metrics"},r.join(" · ")):null,...d.map((g,v)=>fa(g,t+1))])}const ha=Oe({name:"ExplainPlanNode",props:{node:{type:Object,required:!0},depth:{type:Number,default:0}},setup(e){return()=>fa(e.node,e.depth)}}),Zh=Oe({...{components:{ExplainPlanNode:ha}},__name:"QueriesSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),a=J("list"),i=J(null),r=J(null),d=J(null),g=q(()=>a.value==="grouped"?"queries/grouped":"queries"),{data:v,loading:m,pagination:p,sort:_,goToPage:x,setSearch:w,setSort:P,explainQuery:F}=Ze(()=>g.value,{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),A=J(""),y=q(()=>v.value?a.value==="grouped"?v.value.groups||[]:v.value.data||v.value||[]:[]),$=q(()=>a.value!=="grouped"?y.value:y.value.map(E=>{const C={...E};return(C.sqlNormalized===null||C.sqlNormalized===void 0&&(E.sql_normalized||E.pattern))&&(C.sqlNormalized=E.sql_normalized||E.pattern||""),(C.count===null||C.count===void 0)&&E.total_count!==null&&E.total_count!==void 0&&(C.count=E.total_count),(C.avgDuration===null||C.avgDuration===void 0)&&E.avg_duration!==null&&E.avg_duration!==void 0&&(C.avgDuration=E.avg_duration),(C.maxDuration===null||C.maxDuration===void 0)&&E.max_duration!==null&&E.max_duration!==void 0&&(C.maxDuration=E.max_duration),(C.minDuration===null||C.minDuration===void 0)&&E.min_duration!==null&&E.min_duration!==void 0&&(C.minDuration=E.min_duration),(C.totalDuration===null||C.totalDuration===void 0)&&E.total_duration!==null&&E.total_duration!==void 0&&(C.totalDuration=E.total_duration),(C.percentOfTotal===null||C.percentOfTotal===void 0)&&E.pct_time!==null&&E.pct_time!==void 0&&(C.percentOfTotal=E.pct_time),C})),T=q(()=>{const E=new Map;for(const C of $.value){const S=C.sqlNormalized||C.sql||C.sql_text||"";E.set(S,(E.get(S)||0)+1)}return E}),Q=q(()=>{const E=p.total??$.value.length;let C=0,S=0,H=0,ne=0;for(const Te of $.value){const X=Te.duration||0;H+=X,ne++,X>ea&&C++}for(const Te of T.value.values())Te>1&&(S+=Te);return{total:E,slow:C,duplicates:S,avgDuration:ne>0?H/ne:0}}),V=q(()=>{if(a.value==="grouped")return`${$.value.length} query patterns`;const E=[`${Q.value.total} queries`];return Q.value.slow>0&&E.push(`${Q.value.slow} slow`),Q.value.duplicates>0&&E.push(`${Q.value.duplicates} dup`),E.push(`avg ${(Q.value.avgDuration||0).toFixed(1)}ms`),E.join(", ")});function G(E){A.value=E,w(E)}function R(E){E!==a.value&&(a.value=E,i.value=null,r.value=null,d.value=null)}function K(E){P(E)}async function se(E){if(r.value&&r.value.queryId===E){r.value=null;return}d.value=E;try{const C=await F(E);C&&C.error?r.value={queryId:E,plan:[],error:C.error,message:C.message}:r.value={queryId:E,plan:C?.plan||C?.rows||[]}}catch(C){r.value={queryId:E,plan:[],error:C instanceof Error?C.message:String(C)}}finally{d.value=null}}function be(E){const C=nn(E);return C==="very-slow"?"ss-dash-very-slow":C==="slow"?"ss-dash-slow":""}function Ae(){const E=r.value?.plan;return!E||E.length===0||typeof E[0]!="object"||!E[0]?[]:Object.keys(E[0])}function Le(E,C){if(!E||typeof E!="object")return"-";const S=E[C];return S!=null?String(S):"-"}function Re(){const E=r.value?.plan;return!E||E.length===0||typeof E[0]!="object"||!E[0]?!1:"Plan"in E[0]}function ge(){const E=r.value?.plan;return!E||E.length===0||typeof E[0]!="object"||!E[0]?{}:E[0].Plan}const{tableRef:de}=Bt(()=>$.value);return(E,C)=>(u(),c("div",null,[me(Ct,{"model-value":A.value,placeholder:"Filter queries...",summary:V.value,"onUpdate:modelValue":G},{default:ts(()=>[n("div",_h,[n("button",{type:"button",class:O(`ss-dash-btn ${a.value==="list"?"ss-dash-active":""}`),onClick:C[0]||(C[0]=S=>R("list"))}," List ",2),n("button",{type:"button",class:O(`ss-dash-btn ${a.value==="grouped"?"ss-dash-active":""}`),onClick:C[1]||(C[1]=S=>R("grouped"))}," Grouped ",2)])]),_:1},8,["model-value","summary"]),k(m)&&!k(v)?(u(),c("div",xh,"Loading queries...")):a.value==="grouped"?(u(),c("div",wh,[$.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:de,class:"ss-dash-table"},[n("thead",null,[n("tr",null,[C[11]||(C[11]=n("th",null,"Pattern",-1)),n("th",{class:"ss-dash-sortable",onClick:C[2]||(C[2]=S=>K("count"))},[C[8]||(C[8]=_e(" Count ",-1)),k(_).column==="count"?(u(),c("span",$h,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),n("th",{class:"ss-dash-sortable",onClick:C[3]||(C[3]=S=>K("avgDuration"))},[C[9]||(C[9]=_e(" Avg ",-1)),k(_).column==="avgDuration"?(u(),c("span",kh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[12]||(C[12]=n("th",null,"Min",-1)),C[13]||(C[13]=n("th",null,"Max",-1)),n("th",{class:"ss-dash-sortable",onClick:C[4]||(C[4]=S=>K("totalDuration"))},[C[10]||(C[10]=_e(" Total ",-1)),k(_).column==="totalDuration"?(u(),c("span",Sh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[14]||(C[14]=n("th",null,"% Time",-1))])]),n("tbody",null,[(u(!0),c(U,null,ye($.value,(S,H)=>(u(),c("tr",{key:H},[n("td",null,[n("span",{class:O(`ss-dash-sql ${i.value===S.sqlNormalized?"ss-dash-expanded":""}`),title:"Click to expand",role:"button",tabindex:"0",onClick:mt(ne=>i.value=i.value===S.sqlNormalized?null:S.sqlNormalized,["stop"]),onKeydown:Es(ne=>i.value=i.value===S.sqlNormalized?null:S.sqlNormalized,["enter"])},f(S.sqlNormalized),43,Ch),(S.count||0)>=3?(u(),c("span",Th,"DUP")):te("",!0)]),n("td",null,[n("span",Eh,f(S.count||0),1)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${be(S.avgDuration||0)}`)},f((S.avgDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Ph,f((S.minDuration||0).toFixed(2))+"ms",1)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${be(S.maxDuration||0)}`)},f((S.maxDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Mh,f((S.totalDuration||0).toFixed(1))+"ms",1)]),n("td",null,[n("span",Ah,f((S.percentOfTotal||0).toFixed(1))+"%",1)])]))),128))])],512)):(u(),c("div",Rh,"No queries recorded"))])):(u(),c(U,{key:2},[n("div",Lh,[$.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:de,class:"ss-dash-table"},[C[24]||(C[24]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col",{style:{width:"70px"}}),n("col",{style:{width:"60px"}}),n("col",{style:{width:"90px"}}),n("col",{style:{width:"80px"}}),n("col",{style:{width:"90px"}}),n("col",{style:{width:"70px"}})],-1)),n("thead",null,[n("tr",null,[C[17]||(C[17]=n("th",null,"#",-1)),C[18]||(C[18]=n("th",null,"SQL",-1)),n("th",{class:"ss-dash-sortable",onClick:C[5]||(C[5]=S=>K("duration"))},[C[15]||(C[15]=_e(" Duration ",-1)),k(_).column==="duration"?(u(),c("span",Fh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[19]||(C[19]=n("th",null,"Method",-1)),C[20]||(C[20]=n("th",null,"Model",-1)),C[21]||(C[21]=n("th",null,"Connection",-1)),n("th",{class:"ss-dash-sortable",onClick:C[6]||(C[6]=S=>K("createdAt"))},[C[16]||(C[16]=_e(" Time ",-1)),k(_).column==="createdAt"?(u(),c("span",Oh,f(k(_).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[22]||(C[22]=n("th",null,null,-1))])]),n("tbody",null,[(u(!0),c(U,null,ye($.value,S=>(u(),c(U,{key:S.id},[n("tr",null,[n("td",null,[n("span",Dh,f(S.id),1)]),n("td",null,[n("div",null,[n("span",{class:O(`ss-dash-sql ${i.value===S.id?"ss-dash-expanded":""}`),title:"Click to expand",role:"button",tabindex:"0",onClick:mt(H=>i.value=i.value===S.id?null:S.id,["stop"]),onKeydown:Es(H=>i.value=i.value===S.id?null:S.id,["enter"])},f(S.sql||S.sql_text||""),43,Ih),(T.value.get((S.sqlNormalized||S.sql||S.sql_text)??"")??0)>1?(u(),c("span",Bh," ×"+f(T.value.get((S.sqlNormalized||S.sql||S.sql_text)??"")),1)):te("",!0)])]),n("td",null,[n("span",{class:O(`ss-dash-duration ${be(S.duration||0)}`)},f((S.duration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(S.method||S.sql_method||"").toLowerCase()}`)},f(S.method||S.sql_method||""),3)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:S.model},f(S.model||"-"),9,Nh)]),n("td",null,[n("span",jh,f(S.connection||"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(S.createdAt||S.created_at||S.timestamp||"")},f(k(bt)(S.createdAt||S.created_at||S.timestamp||"")),9,Hh)]),n("td",null,[(S.method||S.sql_method||"")==="select"?(u(),c("button",{key:0,type:"button",class:O(`ss-dash-explain-btn${r.value?.queryId===S.id&&!r.value?.error?" ss-dash-explain-btn-active":""}`),disabled:d.value===S.id,onClick:mt(H=>se(S.id),["stop"])},f(d.value===S.id?"...":"EXPLAIN"),11,Uh)):te("",!0)])]),r.value&&r.value.queryId===S.id?(u(),c("tr",qh,[n("td",Kh,[n("div",Vh,[n("div",zh,[r.value.error?(u(),c("div",Wh,[C[23]||(C[23]=n("strong",null,"Error:",-1)),_e(" "+f(r.value.error)+" ",1),r.value.message?(u(),c("br",Jh)):te("",!0),_e(" "+f(r.value.message),1)])):Re()?(u(),c("div",Qh,[me(k(ha),{node:ge(),depth:0},null,8,["node"])])):r.value.plan&&r.value.plan.length>0&&typeof r.value.plan[0]=="object"?(u(),c("div",Gh,[n("table",null,[n("thead",null,[n("tr",null,[(u(!0),c(U,null,ye(Ae(),H=>(u(),c("th",{key:H},f(H),1))),128))])]),n("tbody",null,[(u(!0),c(U,null,ye(r.value.plan,(H,ne)=>(u(),c("tr",{key:ne},[(u(!0),c(U,null,ye(Ae(),Te=>(u(),c("td",{key:Te},f(Le(H,Te)),1))),128))]))),128))])])])):(u(),c("div",Yh,"No plan data returned"))]),n("button",{type:"button",class:"ss-dash-explain-btn",style:{"margin-left":"8px","flex-shrink":"0"},onClick:C[7]||(C[7]=H=>r.value=null)}," Close ")])])])):te("",!0)],64))),128))])],512)):(u(),c("div",Xh,"No queries recorded"))]),k(p).totalPages>1?(u(),Xe(Vt,{key:0,page:k(p).page,"last-page":k(p).totalPages,total:k(p).total,onPageChange:k(x)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}}),ep=Object.freeze(Object.defineProperty({__proto__:null,default:Zh},Symbol.toStringTag,{value:"Module"})),il=Oe({__name:"JsonViewer",props:{value:{},maxLen:{},classPrefix:{default:"ss-dash"}},setup(e){const t=e,s=J(!1),l=q(()=>{if(t.value===null||t.value===void 0)return"-";if(typeof t.value=="string")try{return ln(JSON.parse(t.value),t.maxLen||100)}catch{return t.value.length>100?t.value.slice(0,100)+"...":t.value}return ln(t.value,t.maxLen||100)}),o=q(()=>{if(t.value===null||t.value===void 0)return"";if(typeof t.value=="string")try{return JSON.stringify(JSON.parse(t.value),null,2)}catch{return t.value}return JSON.stringify(t.value,null,2)});function a(){s.value=!s.value}function i(){navigator.clipboard?.writeText(o.value)}return(r,d)=>e.value===null||e.value===void 0?(u(),c("span",{key:0,class:O(`ss-dim ${t.classPrefix}-c-dim`)},"-",2)):(u(),c("div",{key:1,class:O(`${t.classPrefix}-data-cell`)},[n("span",{class:O(`${t.classPrefix}-data-preview`),role:"button",tabindex:0,onClick:a,onKeydown:d[0]||(d[0]=g=>g.key==="Enter"&&a())},f(l.value),35),s.value?(u(),c("div",{key:0,class:O(`${t.classPrefix}-data-full`),onClick:a},[n("button",{class:O(`${t.classPrefix}-copy-btn`),title:"Copy to clipboard",onClick:mt(i,["stop"])}," Copy ",2),n("pre",null,f(o.value),1)],2)):te("",!0)],2))}}),tp={key:0,class:"ss-dash-empty"},sp={class:"ss-dash-table-wrap"},np={style:{color:"var(--ss-dim)"}},lp=["title"],op=["title"],ap={key:1,class:"ss-dash-empty"},ip=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"EventsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,pagination:r,goToPage:d,setSearch:g}=Ze(()=>"events",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),v=J(""),m=q(()=>{if(!a.value)return[];const x=a.value;return x.data||x.events||a.value||[]});function p(x){v.value=x,g(x)}const{tableRef:_}=Bt(()=>m.value);return(x,w)=>(u(),c("div",null,[me(Ct,{"model-value":v.value,placeholder:"Filter events...",summary:`${k(r).total??0} events`,"onUpdate:modelValue":p},null,8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",tp,"Loading events...")):(u(),c(U,{key:1},[n("div",sp,[m.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:_,class:"ss-dash-table"},[w[0]||(w[0]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col"),n("col",{style:{width:"80px"}})],-1)),w[1]||(w[1]=n("thead",null,[n("tr",null,[n("th",null,"#"),n("th",null,"Event"),n("th",null,"Data"),n("th",null,"Time")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(m.value,P=>(u(),c("tr",{key:P.id},[n("td",null,[n("span",np,f(P.id),1)]),n("td",null,[n("span",{class:"ss-dash-event-name",title:P.event_name||P.eventName||P.event||"",style:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(P.event_name||P.eventName||P.event||""),9,lp)]),n("td",null,[me(il,{value:P.data,class:"ss-dash-event-data"},null,8,["value"])]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(P.createdAt||P.created_at||P.timestamp)},f(k(bt)(P.createdAt||P.created_at||P.timestamp)),9,op)])]))),128))])],512)):(u(),c("div",ap,"No events recorded yet"))]),k(r).totalPages>1?(u(),Xe(Vt,{key:0,page:k(r).page,"last-page":k(r).totalPages,total:k(r).total,onPageChange:k(d)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),rp={key:0,class:"ss-dash-empty"},up={key:1,class:"ss-dash-empty"},cp={key:2,class:"ss-dash-table-wrap"},dp=["title"],fp=["title"],hp=["title"],pp=["title"],vp={key:1,class:"ss-dash-empty"},gp=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"RoutesSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,setSearch:d}=Ze(()=>"routes",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=J(""),v=q(()=>{if(!a.value)return[];const _=a.value;return Array.isArray(_)?_:Array.isArray(_.routes)?_.routes:Array.isArray(_.data)?_.data:[]});function m(_){g.value=_,d(_)}const{tableRef:p}=Bt(()=>v.value);return(_,x)=>(u(),c("div",null,[me(Ct,{"model-value":g.value,placeholder:"Filter routes...",summary:`${v.value.length} routes`,"onUpdate:modelValue":m},null,8,["model-value","summary"]),k(r)?(u(),c("div",rp,"Failed to load routes")):k(i)&&!k(a)?(u(),c("div",up,"Loading routes...")):(u(),c("div",cp,[v.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:p,class:"ss-dash-table"},[x[0]||(x[0]=n("colgroup",null,[n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"120px"}}),n("col"),n("col")],-1)),x[1]||(x[1]=n("thead",null,[n("tr",null,[n("th",null,"Method"),n("th",null,"Pattern"),n("th",null,"Name"),n("th",null,"Handler"),n("th",null,"Middleware")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(v.value,(w,P)=>(u(),c("tr",{key:w.pattern||P},[n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(w.method||"").toLowerCase()}`)},f(w.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.pattern},f(w.pattern),9,dp)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.name||"-"},f(w.name||"-"),9,fp)]),n("td",null,[n("span",{style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.handler},f(w.handler),9,hp)]),n("td",null,[n("span",{style:{color:"var(--ss-dim)","font-size":"10px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:w.middleware?.length?w.middleware.join(", "):"-"},f(w.middleware?.length?w.middleware.join(", "):"-"),9,pp)])]))),128))])],512)):(u(),c("div",vp,"No routes available"))]))]))}})},Symbol.toStringTag,{value:"Module"})),yp={class:"ss-dash-log-filters"},mp=["onClick"],bp=["value"],_p={class:"ss-dash-structured-search"},xp=["value"],wp=["value"],$p=["value"],kp={key:0,class:"ss-dash-filter-chips"},Sp={key:0,class:"ss-dash-filter-chip"},Cp={key:1,class:"ss-dash-filter-chip"},Tp=["onClick"],Ep={key:1,class:"ss-dash-empty"},Pp={key:2,class:"ss-dash-empty"},Mp={key:3,class:"ss-dash-empty"},Ap={key:4,class:"ss-dash-log-entries"},Rp=["title"],Lp=["title","onClick","onKeydown"],Fp={key:1,class:"ss-dash-log-reqid-empty"},Op={class:"ss-dash-log-msg"},Dp=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"LogsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,pagination:d,filter:g,goToPage:v,setSearch:m,setFilter:p,refresh:_}=Ze(()=>"logs",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),x=J(""),w=J("all"),P=J(""),F=J(""),A=J([]),y=J("level"),$=J("equals"),T=J(""),Q=q(()=>{if(!a.value)return[];const C=a.value;return C.data||C.logs||a.value||[]}),V=q(()=>w.value!=="all"||P.value!==""||A.value.length>0);function G(C){x.value=C,m(C)}function R(C){w.value=C,C==="all"?p("level",""):p("level",C)}function K(C){P.value=C,F.value=C,p("request_id",C)}function se(){const C=F.value.trim();P.value=C,p("request_id",C)}function be(){P.value="",F.value="",p("request_id","")}function Ae(){w.value="all",p("level","")}function Le(){const C=g;for(const S of Object.keys(C))(S.startsWith("filter_field_")||S.startsWith("filter_op_")||S.startsWith("filter_value_"))&&delete C[S];A.value.forEach((S,H)=>{C[`filter_field_${H}`]=S.field,C[`filter_op_${H}`]=S.operator,C[`filter_value_${H}`]=S.value}),d.page=1,_()}function Re(){const C=T.value.trim();C&&(A.value.push({field:y.value,operator:$.value,value:C}),T.value="",Le())}function ge(C){A.value.splice(C,1),Le()}function de(C){return C.target.value}function E(C){return C.target.value}return(C,S)=>(u(),c("div",null,[me(Ct,{"model-value":x.value,placeholder:"Search logs...",summary:`${k(d).total??0} logs`,"onUpdate:modelValue":G},{default:ts(()=>[n("div",yp,[(u(!0),c(U,null,ye(k(ku),H=>(u(),c("button",{key:H,type:"button",class:O(`ss-dash-log-filter ${w.value===H?"ss-dash-active":""}`),onClick:ne=>R(H)},f(H),11,mp))),128)),n("input",{type:"text",class:"ss-dash-filter-input ss-dash-reqid-input",placeholder:"Filter by request ID...",value:F.value,onInput:S[0]||(S[0]=H=>F.value=de(H)),onKeydown:Es(se,["enter"])},null,40,bp),F.value||P.value?(u(),c("button",{key:0,type:"button",class:"ss-dash-btn ss-dash-reqid-clear",onClick:be}," Clear ")):te("",!0)])]),_:1},8,["model-value","summary"]),n("div",_p,[n("select",{class:"ss-dash-filter-select",value:y.value,onChange:S[1]||(S[1]=H=>y.value=E(H))},[...S[4]||(S[4]=[rr('<option value="level">level</option><option value="message">message</option><option value="request_id">request_id</option><option value="userId">userId</option><option value="email">email</option><option value="path">path</option>',6)])],40,xp),n("select",{class:"ss-dash-filter-select",value:$.value,onChange:S[2]||(S[2]=H=>$.value=E(H))},[...S[5]||(S[5]=[n("option",{value:"equals"},"equals",-1),n("option",{value:"contains"},"contains",-1),n("option",{value:"starts_with"},"starts with",-1)])],40,wp),n("input",{class:"ss-dash-filter-input",placeholder:"Value...",value:T.value,onInput:S[3]||(S[3]=H=>T.value=de(H)),onKeydown:Es(Re,["enter"])},null,40,$p),n("button",{type:"button",class:"ss-dash-btn",onClick:Re},"Add")]),V.value?(u(),c("div",kp,[w.value!=="all"?(u(),c("span",Sp,[_e(" level: "+f(w.value)+" ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:Ae}," × ")])):te("",!0),P.value?(u(),c("span",Cp,[_e(" requestId: "+f(P.value.slice(0,8))+"... ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:be}," × ")])):te("",!0),(u(!0),c(U,null,ye(A.value,(H,ne)=>(u(),c("span",{key:ne,class:"ss-dash-filter-chip"},[_e(f(H.field)+" "+f(H.operator)+' "'+f(H.value)+'" ',1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:Te=>ge(ne)}," × ",8,Tp)]))),128))])):te("",!0),k(r)?(u(),c("div",Ep,"Failed to load logs")):k(i)&&!k(a)?(u(),c("div",Pp,"Loading logs...")):Q.value.length===0?(u(),c("div",Mp," No log entries"+f(P.value?` matching request ${P.value}`:w.value!=="all"?` for ${w.value}`:""),1)):(u(),c("div",Ap,[(u(!0),c(U,null,ye(Q.value,(H,ne)=>(u(),c("div",{key:String(H.id||ne),class:"ss-dash-log-entry"},[n("span",{class:O(`ss-dash-log-level ${k(Cu)(k(oa)(H),"ss-dash-log-level")}`)},f(k(oa)(H).toUpperCase()),3),n("span",{class:"ss-dash-log-time",title:k(on)(H)?k(It)(k(on)(H)):""},f(k(on)(H)?k(bt)(k(on)(H)):"-"),9,Rp),k(Ms)(H)?(u(),c("span",{key:0,class:"ss-dash-log-reqid",title:k(Ms)(H),role:"button",tabindex:"0",onClick:Te=>K(k(Ms)(H)),onKeydown:Es(Te=>K(k(Ms)(H)),["enter"])},f(k(Ms)(H).slice(0,8)),41,Lp)):(u(),c("span",Fp,"--")),n("span",Op,f(k(Su)(H)),1)]))),128))])),k(d).totalPages>1?(u(),Xe(Vt,{key:5,page:k(d).page,"last-page":k(d).totalPages,total:k(d).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Ip={key:0,class:"ss-dash-email-preview",id:"ss-dash-email-preview"},Bp={class:"ss-dash-email-preview-header"},Np={class:"ss-dash-email-preview-meta",id:"ss-dash-email-preview-meta"},jp=["srcdoc"],Hp={key:0,class:"ss-dash-empty"},Up={class:"ss-dash-table-wrap"},qp=["onClick"],Kp={style:{color:"var(--ss-dim)"}},Vp=["title"],zp=["title"],Wp=["title"],Jp={key:0,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Qp={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Gp=["title"],Yp=["title"],Xp={key:1,class:"ss-dash-empty"},Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"EmailsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,pagination:r,goToPage:d,setSearch:g,fetchEmailPreview:v}=Ze(()=>"emails",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),m=J(""),p=J(null),_=J(null),x=q(()=>{if(!a.value)return[];const y=a.value;return y.data||y.emails||a.value||[]});function w(y){m.value=y,g(y)}async function P(y){if(y.html){p.value=y.id,_.value=y.html;return}const $=await v(y.id);p.value=y.id,_.value=$}function F(){p.value=null,_.value=null}const{tableRef:A}=Bt(()=>x.value);return(y,$)=>(u(),c("div",null,[p.value&&_.value?(u(),c("div",Ip,[n("div",Bp,[n("div",Np,[x.value.find(T=>T.id===p.value)?(u(),c(U,{key:0},[$[4]||($[4]=n("strong",null,"Subject:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.subject)+"   |  ",1),$[5]||($[5]=n("strong",null,"From:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.from_addr||x.value.find(T=>T.id===p.value)?.from)+"   |  ",1),$[6]||($[6]=n("strong",null,"To:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.to_addr||x.value.find(T=>T.id===p.value)?.to)+" ",1),x.value.find(T=>T.id===p.value)?.cc||x.value.find(T=>T.id===p.value)?.cc_addr?(u(),c(U,{key:0},[$[0]||($[0]=_e("   |  ",-1)),$[1]||($[1]=n("strong",null,"CC:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.cc||x.value.find(T=>T.id===p.value)?.cc_addr),1)],64)):te("",!0),$[7]||($[7]=_e("   |  ",-1)),$[8]||($[8]=n("strong",null,"Status:",-1)),n("span",{class:O(`ss-dash-badge ss-dash-email-status-${x.value.find(T=>T.id===p.value)?.status}`)},f(x.value.find(T=>T.id===p.value)?.status),3),x.value.find(T=>T.id===p.value)?.mailer?(u(),c(U,{key:1},[$[2]||($[2]=_e("   |  ",-1)),$[3]||($[3]=n("strong",null,"Mailer:",-1)),_e(" "+f(x.value.find(T=>T.id===p.value)?.mailer),1)],64)):te("",!0)],64)):te("",!0)]),n("button",{type:"button",class:"ss-dash-btn",id:"ss-dash-email-preview-close",onClick:F}," Close ")]),n("iframe",{class:"ss-dash-email-iframe",id:"ss-dash-email-iframe",srcdoc:_.value,title:"Email preview",sandbox:""},null,8,jp)])):(u(),c(U,{key:1},[me(Ct,{"model-value":m.value,placeholder:"Filter emails...",summary:`${k(r).total??0} emails`,"onUpdate:modelValue":w},null,8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",Hp,"Loading emails...")):(u(),c(U,{key:1},[n("div",Up,[x.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:A,class:"ss-dash-table"},[$[9]||($[9]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col",{style:{width:"150px"}}),n("col",{style:{width:"150px"}}),n("col"),n("col",{style:{width:"80px"}}),n("col",{style:{width:"40px"}}),n("col",{style:{width:"70px"}}),n("col",{style:{width:"80px"}})],-1)),$[10]||($[10]=n("thead",null,[n("tr",null,[n("th",null,"#"),n("th",null,"From"),n("th",null,"To"),n("th",null,"Subject"),n("th",null,"Status"),n("th",null,"ATT"),n("th",null,"Mailer"),n("th",null,"Time")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(x.value,T=>(u(),c("tr",{key:T.id,class:"ss-dash-clickable ss-dash-email-row",onClick:Q=>P(T)},[n("td",null,[n("span",Kp,f(T.id),1)]),n("td",null,[n("span",{title:T.from_addr||T.from||"",style:{color:"var(--ss-text-secondary)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.from_addr||T.from||""),9,Vp)]),n("td",null,[n("span",{title:T.to_addr||T.to||"",style:{color:"var(--ss-text-secondary)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.to_addr||T.to||""),9,zp)]),n("td",null,[n("span",{title:T.subject||"",style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.subject||""),9,Wp)]),n("td",null,[n("span",{class:O(`ss-dash-badge ss-dash-email-status-${T.status||""}`)},f(T.status),3)]),n("td",null,[(T.attachment_count||T.attachmentCount||0)>0?(u(),c("span",Jp,f(T.attachment_count||T.attachmentCount||0),1)):(u(),c("span",Qp,"-"))]),n("td",null,[n("span",{title:T.mailer||"",style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(T.mailer||""),9,Gp)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:k(It)(T.createdAt||T.created_at||T.timestamp)},f(k(bt)(T.createdAt||T.created_at||T.timestamp)),9,Yp)])],8,qp))),128))])],512)):(u(),c("div",Xp,"No emails captured yet"))]),k(r).totalPages>1?(u(),Xe(Vt,{key:0,page:k(r).page,"last-page":k(r).totalPages,total:k(r).total,onPageChange:k(d)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),ev={key:0,class:"ss-dash-empty"},tv={class:"ss-dash-tl-detail-header"},sv={style:{color:"var(--ss-text)"}},nv={class:"ss-dash-tl-meta"},lv={key:0,class:"ss-dash-empty"},ov={key:1,class:"ss-dash-empty"},av={class:"ss-dash-table-wrap"},iv=["onClick"],rv={style:{color:"var(--ss-dim)"}},uv=["title"],cv={style:{color:"var(--ss-muted)","text-align":"center"}},dv=["title"],fv={key:1,class:"ss-dash-empty"},hv=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"TimelineSection",props:{tracingEnabled:{type:Boolean,default:!0}},setup(e){const t=e,s=re("ss-refresh-key",J(0)),l=re("ss-dashboard-endpoint","/__stats/api"),o=re("ss-auth-token",void 0),a=re("ss-base-url",""),{data:i,loading:r,error:d,pagination:g,goToPage:v,setSearch:m}=Ze(()=>"traces",{baseUrl:a,dashboardEndpoint:l,authToken:o,refreshKey:s}),p=J(""),_=J(null),x=J(null),w=J(!1),P=q(()=>{if(!i.value)return[];const V=i.value;return V.data||V.traces||i.value||[]}),F=un(a,o);async function A(V){_.value=V,w.value=!0,x.value=null;try{const G=l||"/__stats/api",R=await F().fetch(`${G}/traces/${V}`);x.value=R}catch{}finally{w.value=!1}}function y(){_.value=null,x.value=null}function $(V){p.value=V,m(V)}function T(V){const G=nn(V);return G==="very-slow"?"ss-dash-very-slow":G==="slow"?"ss-dash-slow":""}const{tableRef:Q}=Bt(()=>P.value);return(V,G)=>(u(),c("div",null,[t.tracingEnabled?_.value&&x.value?(u(),c(U,{key:1},[n("div",tv,[n("button",{type:"button",class:"ss-dash-btn",onClick:y},"← Back"),n("span",{class:O(`ss-dash-method ss-dash-method-${(x.value.method||"").toLowerCase()}`)},f(x.value.method),3),n("span",sv,f(x.value.url),1),n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((x.value.status_code||x.value.statusCode||0)/100)}xx`)},f(x.value.status_code||x.value.statusCode||0),3),n("span",nv,f((x.value.total_duration||x.value.totalDuration||0).toFixed(1))+"ms · "+f(x.value.spanCount??k(ll)(x.value.spans).length)+" spans ",1)]),me(da,{spans:k(ll)(x.value.spans),"total-duration":x.value.total_duration||x.value.totalDuration||0,warnings:k(aa)(x.value.warnings)},null,8,["spans","total-duration","warnings"])],64)):_.value&&w.value?(u(),c(U,{key:2},[n("div",{class:"ss-dash-tl-detail-header"},[n("button",{type:"button",class:"ss-dash-btn",onClick:y},"← Back")]),G[0]||(G[0]=n("div",{class:"ss-dash-empty"},"Loading trace detail...",-1))],64)):(u(),c(U,{key:3},[me(Ct,{"model-value":p.value,placeholder:"Filter traces...",summary:`${k(g).total??0} traces`,"onUpdate:modelValue":$},null,8,["model-value","summary"]),k(d)?(u(),c("div",lv,"Failed to load traces")):te("",!0),k(r)&&!k(i)?(u(),c("div",ov,"Loading traces...")):(u(),c(U,{key:2},[n("div",av,[P.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:Q,class:"ss-dash-table"},[G[1]||(G[1]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"60px"}}),n("col",{style:{width:"80px"}}),n("col",{style:{width:"50px"}}),n("col",{style:{width:"80px"}})],-1)),G[2]||(G[2]=n("thead",null,[n("tr",null,[n("th",null,"#"),n("th",null,"Method"),n("th",null,"URL"),n("th",null,"Status"),n("th",null,"Duration"),n("th",null,"Spans"),n("th",null,"Time")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(P.value,R=>(u(),c("tr",{key:R.id,class:"ss-dash-clickable",onClick:K=>A(R.id)},[n("td",null,[n("span",rv,f(R.id),1)]),n("td",null,[n("span",{class:O(`ss-dash-method ss-dash-method-${(R.method||"").toLowerCase()}`)},f(R.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:R.url},f(R.url),9,uv)]),n("td",null,[n("span",{class:O(`ss-dash-status ss-dash-status-${Math.floor((R.statusCode||R.status_code||0)/100)}xx`)},f(R.statusCode||R.status_code||0),3)]),n("td",null,[n("span",{class:O(`ss-dash-duration ${T(R.totalDuration||R.total_duration||0)}`)},f((R.totalDuration||R.total_duration||0).toFixed(1))+"ms ",3)]),n("td",null,[n("span",cv,f(R.spanCount||R.span_count||0),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(R.createdAt||R.created_at||R.timestamp)},f(k(bt)(R.createdAt||R.created_at||R.timestamp)),9,dv)])],8,iv))),128))])],512)):(u(),c("div",fv,"No traces recorded"))]),k(g).totalPages>1?(u(),Xe(Vt,{key:0,page:k(g).page,"last-page":k(g).totalPages,total:k(g).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64)):(u(),c("div",ev," Tracing is not enabled. Enable tracing in your server-stats config to use the timeline. "))]))}})},Symbol.toStringTag,{value:"Module"})),pv={key:0,class:"ss-dash-cache-stats"},vv={class:"ss-dash-cache-stat"},gv={class:"ss-dash-cache-stat-value"},yv={class:"ss-dash-cache-stat"},mv={class:"ss-dash-cache-stat-value"},bv={class:"ss-dash-cache-stat"},_v={class:"ss-dash-cache-stat-value"},xv={class:"ss-dash-cache-stat"},wv={class:"ss-dash-cache-stat-value"},$v={key:1,class:"ss-dash-empty"},kv={key:2,class:"ss-dash-empty"},Sv={key:3,class:"ss-dash-table-wrap"},Cv=["onClick"],Tv=["title"],Ev={style:{color:"var(--ss-muted)"}},Pv=["onClick"],Mv={key:1,class:"ss-dash-empty"},Av={key:4,class:"ss-dash-cache-detail"},Rv={key:0,class:"ss-dash-empty"},Lv={key:1,class:"ss-dash-empty",style:{color:"var(--ss-red-fg)"}},Fv=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"CacheSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,setSearch:r,mutate:d}=Ze(()=>"cache",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=un(o||"",l),v=new na(g(),s||"/__stats/api"),m=J(""),p=J(null),_=J(null),x=J(!1),w=J(null),P=q(()=>a.value),F=q(()=>P.value?.keys||P.value?.data||[]);function A(Q){m.value=Q,r(Q)}async function y(Q){if(confirm(`Delete cache key "${Q}"?`))try{await d(`cache/${encodeURIComponent(Q)}`,"delete"),p.value===Q&&(p.value=null,_.value=null,w.value=null)}catch{}}const{tableRef:$}=Bt(()=>F.value);async function T(Q){if(p.value===Q){p.value=null,_.value=null,w.value=null;return}p.value=Q,_.value=null,w.value=null,x.value=!0;try{const V=await v.fetchCacheKey(Q);_.value=V.value!==void 0?V.value:V.data!==void 0?V.data:V,w.value=null}catch{_.value=null,w.value="Failed to fetch key value"}finally{x.value=!1}}return(Q,V)=>(u(),c("div",null,[P.value?.available&&P.value?.stats?(u(),c("div",pv,[n("div",vv,[V[0]||(V[0]=n("span",{class:"ss-dash-cache-stat-label"},"Hit Rate:",-1)),n("span",gv,f((P.value.stats.hitRate??0).toFixed(1))+"%",1)]),n("div",yv,[V[1]||(V[1]=n("span",{class:"ss-dash-cache-stat-label"},"Hits:",-1)),n("span",mv,f(P.value.stats.hits??0),1)]),n("div",bv,[V[2]||(V[2]=n("span",{class:"ss-dash-cache-stat-label"},"Misses:",-1)),n("span",_v,f(P.value.stats.misses??0),1)]),n("div",xv,[V[3]||(V[3]=n("span",{class:"ss-dash-cache-stat-label"},"Keys:",-1)),n("span",wv,f(P.value.stats.totalKeys||P.value.stats.keyCount||F.value.length||0),1)])])):te("",!0),me(Ct,{"model-value":m.value,placeholder:"Filter cache keys...",summary:`${F.value.length} keys`,"onUpdate:modelValue":A},null,8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",$v,"Loading cache...")):!P.value||!P.value.available?(u(),c("div",kv," Cache inspector not available ")):(u(),c("div",Sv,[F.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:$,class:"ss-dash-table"},[V[4]||(V[4]=n("thead",null,[n("tr",null,[n("th",null,"Key"),n("th",null,"Type"),n("th",null,"Size"),n("th",null,"TTL"),n("th")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(F.value,G=>(u(),c("tr",{key:G.key,class:"ss-dash-clickable",onClick:R=>T(G.key)},[n("td",null,[n("span",{title:G.key,style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},f(G.key),9,Tv)]),n("td",null,[n("span",Ev,f(G.type),1)]),n("td",null,f(G.size!==null&&G.size!==void 0&&G.size>0?k(hu)(G.size):"-"),1),n("td",null,f(G.ttl>0?k(fu)(G.ttl):"-"),1),n("td",null,[n("button",{type:"button",class:"ss-dash-retry-btn",onClick:mt(R=>y(G.key),["stop"])}," Delete ",8,Pv)])],8,Cv))),128))])],512)):(u(),c("div",Mv,"No cache keys found"))])),p.value?(u(),c("div",Av,[n("h4",null,"Key: "+f(p.value),1),x.value?(u(),c("div",Rv,"Loading value...")):w.value?(u(),c("div",Lv,f(w.value),1)):(u(),Xe(il,{key:2,value:_.value},null,8,["value"]))])):te("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Ov={key:0,class:"ss-dash-job-stats"},Dv={class:"ss-dash-job-stat"},Iv={class:"ss-dash-job-stat-value"},Bv={class:"ss-dash-job-stat"},Nv={class:"ss-dash-job-stat-value"},jv={class:"ss-dash-job-stat"},Hv={class:"ss-dash-job-stat-value"},Uv={class:"ss-dash-job-stat"},qv={class:"ss-dash-job-stat-value"},Kv={class:"ss-dash-job-stat"},Vv={class:"ss-dash-job-stat-value",style:{color:"var(--ss-red-fg)"}},zv={class:"ss-dash-btn-group"},Wv=["onClick"],Jv={key:1,class:"ss-dash-empty"},Qv={key:2,class:"ss-dash-empty"},Gv={class:"ss-dash-table-wrap"},Yv={style:{color:"var(--ss-dim)"}},Xv=["title"],Zv={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},eg={class:"ss-dash-duration"},tg=["title"],sg=["disabled","onClick"],ng={key:1,class:"ss-dash-empty"},lg=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"JobsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-dashboard-endpoint","/__stats/api"),l=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:a,loading:i,error:r,pagination:d,goToPage:g,setSearch:v,setFilter:m,refresh:p,mutate:_}=Ze(()=>"jobs",{baseUrl:o,dashboardEndpoint:s,authToken:l,refreshKey:t}),x=J(""),w=J("all"),P=J({}),F=q(()=>Pu(a.value)),A=q(()=>Mu(a.value));function y(V){x.value=V,v(V)}function $(V){w.value=V,V==="all"?m("status",""):m("status",V)}const{tableRef:T}=Bt(()=>F.value);async function Q(V){P.value[V]="pending";try{await _(`jobs/${V}/retry`),P.value[V]="success",setTimeout(()=>{delete P.value[V],p()},1e3)}catch{delete P.value[V]}}return(V,G)=>(u(),c("div",null,[A.value?(u(),c("div",Ov,[n("div",Dv,[G[0]||(G[0]=n("span",{class:"ss-dash-job-stat-label"},"Active:",-1)),n("span",Iv,f(A.value.active??0),1)]),n("div",Bv,[G[1]||(G[1]=n("span",{class:"ss-dash-job-stat-label"},"Waiting:",-1)),n("span",Nv,f(A.value.waiting??0),1)]),n("div",jv,[G[2]||(G[2]=n("span",{class:"ss-dash-job-stat-label"},"Delayed:",-1)),n("span",Hv,f(A.value.delayed??0),1)]),n("div",Uv,[G[3]||(G[3]=n("span",{class:"ss-dash-job-stat-label"},"Completed:",-1)),n("span",qv,f(A.value.completed??0),1)]),n("div",Kv,[G[4]||(G[4]=n("span",{class:"ss-dash-job-stat-label"},"Failed:",-1)),n("span",Vv,f(A.value.failed??0),1)])])):te("",!0),me(Ct,{"model-value":x.value,placeholder:"Filter jobs...",summary:`${k(d).total||F.value.length} jobs`,"onUpdate:modelValue":y},{default:ts(()=>[n("div",zv,[(u(!0),c(U,null,ye(k(Tu),R=>(u(),c("button",{key:R,type:"button",class:O(`ss-dash-btn ${w.value===R?"ss-dash-active":""}`),onClick:K=>$(R)},f(R.charAt(0).toUpperCase()+R.slice(1)),11,Wv))),128))])]),_:1},8,["model-value","summary"]),k(i)&&!k(a)?(u(),c("div",Jv,"Loading jobs...")):k(r)?(u(),c("div",Qv,"Jobs/Queue not available")):(u(),c(U,{key:3},[n("div",Gv,[F.value.length>0?(u(),c("table",{key:0,ref_key:"tableRef",ref:T,class:"ss-dash-table"},[G[5]||(G[5]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col",{style:{width:"90px"}}),n("col"),n("col",{style:{width:"50px"}}),n("col",{style:{width:"75px"}}),n("col",{style:{width:"70px"}}),n("col",{style:{width:"50px"}})],-1)),G[6]||(G[6]=n("thead",null,[n("tr",null,[n("th",null,"ID"),n("th",null,"Name"),n("th",null,"Status"),n("th",null,"Payload"),n("th",null,"Tries"),n("th",null,"Duration"),n("th",null,"Time"),n("th")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(F.value,R=>(u(),c("tr",{key:R.id},[n("td",null,[n("span",Yv,f(R.id),1)]),n("td",null,[n("span",{style:{color:"var(--ss-text)"},title:R.name},f(R.name),9,Xv)]),n("td",null,[n("span",{class:O(`ss-dash-badge ss-dash-badge-${k(Eu)(R.status)}`)},f(R.status),3)]),n("td",null,[me(il,{value:R.payload||R.data,"max-len":60},null,8,["value"])]),n("td",null,[n("span",Zv,f(R.attempts||R.attemptsMade||0),1)]),n("td",null,[n("span",eg,f(R.duration!==null&&R.duration!==void 0?k(Dt)(R.duration):"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:k(It)(R.timestamp||R.createdAt||R.processedAt||R.created_at)},f(k(bt)(R.timestamp||R.createdAt||R.processedAt||R.created_at)),9,tg)]),n("td",null,[R.status==="failed"?(u(),c("button",{key:0,type:"button",class:"ss-dash-retry-btn",disabled:P.value[R.id]==="pending"||P.value[R.id]==="success",onClick:mt(K=>Q(R.id),["stop"])},f(P.value[R.id]==="pending"?"...":P.value[R.id]==="success"?"OK":"Retry"),9,sg)):te("",!0)])]))),128))])],512)):(u(),c("div",ng,"No jobs found"))]),k(d).totalPages>1?(u(),Xe(Vt,{key:0,page:k(d).page,"last-page":k(d).totalPages,total:k(d).total,onPageChange:k(g)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),og={style:{position:"relative",flex:1}},ag=["value"],ig=["title","onClick"],rg=["viewBox","innerHTML"],ug=["viewBox","innerHTML"],cg=["onClick"],dg={key:0},fg=["title","onClick"],hg=["viewBox","innerHTML"],pg=["viewBox","innerHTML"],vg=["onClick"],gg={key:0},yg={style:{padding:"4px 16px",fontSize:"10px",color:"var(--ss-muted)"}},mg=["onClick"],bg=["title"],_g=["title"],xg=["title","onClick"],wg=["viewBox","innerHTML"],$g=["viewBox","innerHTML"],kg=["onClick"],Sg=["title","onClick"],Cg=["viewBox","innerHTML"],Tg=["viewBox","innerHTML"],Eg={key:1,style:{color:"var(--ss-dim)"}},Pg={key:3,style:{color:"var(--ss-amber-fg)"}},Mg={key:4,style:{color:"var(--ss-purple-fg)"}},Ag={key:5},Rg=["onClick"],ue="ss-dash",Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"ConfigSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-dashboard-endpoint","/__stats/api"),o=re("ss-auth-token",void 0),{data:a,loading:i}=Ze(()=>"config",{baseUrl:s,dashboardEndpoint:l,authToken:o,refreshKey:t}),r=J(""),d=J(""),g=J("app"),v=J(new Set),m=J("Copy JSON"),p=J(new Set),_=J(new Map);let x=null;function w(X){r.value=X,x&&clearTimeout(x),x=setTimeout(()=>{d.value=X},200)}function P(X){return X.target.value}const F=q(()=>a.value??null),A=q(()=>{const X=F.value?.env??{},ie=d.value.toLowerCase();return Object.entries(X).filter(([z,oe])=>{if(!ie)return!0;const Ie=De(oe)?oe.display:oe==null?"":String(oe);return z.toLowerCase().includes(ie)||Ie.toLowerCase().includes(ie)})}),y=q(()=>{const X=F.value?.app??{},ie=d.value.toLowerCase();return an(X,"").filter(oe=>{const Ie=De(oe.value)?oe.value.display:oe.value===null||oe.value===void 0?"":String(oe.value);return oe.path.toLowerCase().includes(ie)||Ie.toLowerCase().includes(ie)})}),$=q(()=>{const X=F.value?.app??{};return an(X,"").length}),T=q(()=>{const X=F.value?.app;return!X||typeof X!="object"||Array.isArray(X)||De(X)?[]:Object.keys(X)});function Q(X){const ie=new Set(v.value);ie.has(X)?ie.delete(X):ie.add(X),v.value=ie}function V(){if(!F.value)return;const X=g.value==="app"?F.value.app:F.value.env;if(!X)return;const ie=Wu(X);v.value=new Set(ie)}function G(){v.value=new Set}function R(){if(!F.value)return;const X=g.value==="app"?F.value.app:F.value.env;navigator.clipboard?.writeText(JSON.stringify(X,null,2)).then(()=>{m.value="Copied!",setTimeout(()=>{m.value="Copy JSON"},1500)}).catch(()=>{})}function K(X){const ie=new Set(p.value);ie.has(X)?ie.delete(X):ie.add(X),p.value=ie}function se(X,ie){_.value.set(X,ie)}function be(X,ie,z){z.stopPropagation(),Ju(X,_.value.get(ie)??null,ue)}function Ae(X){return X!==null&&typeof X=="object"&&!Array.isArray(X)&&!De(X)}function Le(X,ie){return an(X,ie)}function Re(X,ie){return X.indexOf(ie+".")===0?X.slice(ie.length+1):X}function ge(X){return zu(X)}function de(X){return De(X)?X.display:X==null?"null":String(X)}function E(X){const ie=F.value?.app;return!ie||typeof ie!="object"?null:ie[X]??null}function C(X,ie){return De(X)?ie?X.value:X.display:""}function S(){r.value="",d.value=""}function H(X){return De(X)?X.display:""}const ne=q(()=>Me.eye.elements.join("")),Te=q(()=>Me["eye-off"].elements.join(""));return(X,ie)=>(u(),c("div",null,[n("div",{class:O(`${ue}-config-toolbar`),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px"}},[n("button",{type:"button",class:O(`${ue}-config-tab${g.value==="app"?` ${ue}-active`:""}`),onClick:ie[0]||(ie[0]=z=>g.value="app")}," App Config ",2),n("button",{type:"button",class:O(`${ue}-config-tab${g.value==="env"?` ${ue}-active`:""}`),onClick:ie[1]||(ie[1]=z=>g.value="env")}," Env ",2),n("div",og,[n("input",{type:"text",class:O(`${ue}-search`),placeholder:"Search keys and values...",value:r.value,style:{width:"100%"},onInput:ie[2]||(ie[2]=z=>w(P(z)))},null,42,ag),r.value?(u(),c("button",{key:0,type:"button",style:{position:"absolute",right:"6px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",cursor:"pointer",fontSize:"14px",color:"var(--ss-dim)",padding:"0 2px",lineHeight:1},onClick:S}," × ")):te("",!0)]),g.value==="app"&&!d.value?(u(),c(U,{key:0},[n("button",{type:"button",class:O(`${ue}-btn`),onClick:V},"Expand All",2),n("button",{type:"button",class:O(`${ue}-btn`),onClick:G},"Collapse All",2)],64)):te("",!0),n("button",{type:"button",class:O(`${ue}-btn`),onClick:R},f(m.value),3)],2),k(i)&&!k(a)?(u(),c("div",{key:0,class:O(`${ue}-empty`)},"Loading config...",2)):F.value?g.value==="env"?(u(),c("div",{key:2,class:O(`${ue}-config-table-wrap`)},[n("table",{class:O(`${ue}-table ${ue}-config-env-table`)},[ie[4]||(ie[4]=n("thead",null,[n("tr",null,[n("th",null,"Variable"),n("th",null,"Value"),n("th",{style:{width:"36px"}})])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(A.value,([z,oe])=>(u(),c("tr",{key:z},[n("td",{class:O(`${ue}-env-key`)},[n("span",{class:O(`${ue}-config-key`)},f(z),3)],2),n("td",{class:O(`${ue}-env-val`)},[k(De)(oe)?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(oe,p.value.has(z))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(z)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(Ie=>K(z),["stop"])},[p.value.has(z)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,rg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,ug))],10,ig)],2)):(u(),c("span",{key:1,class:O(`${ue}-config-val`)},f(de(oe)),3))],2),n("td",null,[k(De)(oe)?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:Ie=>se(`env-${z}`,Ie),onClick:Ie=>be(`${z}=${de(oe)}`,`env-${z}`,Ie)}," ⎘ ",10,cg))])]))),128)),A.value.length===0?(u(),c("tr",dg,[...ie[3]||(ie[3]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching variables ",-1)])])):te("",!0)])],2)],2)):d.value?(u(),c("div",{key:3,class:O(`${ue}-config-table-wrap`)},[n("table",{class:O(`${ue}-table`)},[ie[6]||(ie[6]=n("thead",null,[n("tr",null,[n("th",null,"Path"),n("th",null,"Value"),n("th",{style:{width:"36px"}})])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(y.value,z=>(u(),c("tr",{key:z.path},[n("td",null,[n("span",{class:O(`${ue}-config-key`),style:{whiteSpace:"nowrap"}},f(z.path),3)]),n("td",null,[k(De)(z.value)?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(z.value,p.value.has(z.path))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(z.path)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(oe=>K(z.path),["stop"])},[p.value.has(z.path)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,hg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,pg))],10,fg)],2)):(u(),c("span",{key:1,class:O(`${ue}-config-val`),style:Ke({wordBreak:"break-all",color:ge(z.value).color})},f(ge(z.value).text),7))]),n("td",null,[k(De)(z.value)?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:oe=>se(`search-${z.path}`,oe),onClick:oe=>be(`${z.path}: ${k(De)(z.value)?H(z.value):ge(z.value).text}`,`search-${z.path}`,oe)}," ⎘ ",10,vg))])]))),128)),y.value.length===0?(u(),c("tr",gg,[...ie[5]||(ie[5]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching entries ",-1)])])):te("",!0)])],2),n("div",yg,f(y.value.length)+" of "+f($.value)+" entries ",1)],2)):(u(),c("div",{key:4,class:O(`${ue}-config-table-wrap`)},[n("div",{class:O(`${ue}-config-sections`)},[(u(!0),c(U,null,ye(T.value,z=>(u(),c("div",{key:z,class:O(`${ue}-config-section`)},[Ae(E(z))?(u(),c(U,{key:0},[n("div",{class:O(`${ue}-config-section-header`),style:{cursor:"pointer"},onClick:oe=>Q(z)},[n("span",{class:O(`${ue}-config-toggle`)},f(v.value.has(z)?"▼":"▶"),3),n("span",{class:O(`${ue}-config-key`)},f(z),3),n("span",{class:O(`${ue}-config-count`)},f(k(ia)(E(z)))+" entries ",3)],10,mg),v.value.has(z)?(u(),c("div",{key:0,class:O(`${ue}-config-section-body`)},[n("table",{class:O(`${ue}-table ${ue}-config-inner-table`)},[ie[7]||(ie[7]=n("thead",null,[n("tr",null,[n("th",{style:{width:"35%"}},"Key"),n("th",null,"Value"),n("th",{style:{width:"36px"}})])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(Le(E(z),z),oe=>(u(),c("tr",{key:oe.path},[n("td",{title:Re(oe.path,z)},[n("span",{class:O(`${ue}-config-key`)},f(Re(oe.path,z)),3)],8,bg),n("td",{title:k(De)(oe.value)?H(oe.value):ge(oe.value).text},[k(De)(oe.value)?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(oe.value,p.value.has(oe.path))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(oe.path)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(Ie=>K(oe.path),["stop"])},[p.value.has(oe.path)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,wg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,$g))],10,xg)],2)):(u(),c("span",{key:1,class:O(`${ue}-config-val`),style:Ke({color:ge(oe.value).color})},f(ge(oe.value).text),7))],8,_g),n("td",null,[k(De)(oe.value)?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:Ie=>se(`inner-${oe.path}`,Ie),onClick:Ie=>be(`${oe.path}: ${ge(oe.value).text}`,`inner-${oe.path}`,Ie)}," ⎘ ",10,kg))])]))),128))])],2)],2)):te("",!0)],64)):(u(),c("div",{key:1,class:O(`${ue}-config-section-header ${ue}-config-leaf`),style:{cursor:"default"}},[n("span",{class:O(`${ue}-config-toggle`),style:{visibility:"hidden"}},"•",2),n("span",{class:O(`${ue}-config-key`)},f(z),3),n("span",{class:O(`${ue}-config-val`),style:{marginLeft:"8px"}},[k(De)(E(z))?(u(),c("span",{key:0,class:O(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,f(C(E(z),p.value.has(z))),1),n("button",{type:"button",class:O(`${ue}-btn`),title:p.value.has(z)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:mt(oe=>K(z),["stop"])},[p.value.has(z)?(u(),c("svg",{key:0,width:"14",height:"14",viewBox:k(Me)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,Cg)):(u(),c("svg",{key:1,width:"14",height:"14",viewBox:k(Me).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,Tg))],10,Sg)],2)):E(z)===null||E(z)===void 0?(u(),c("span",Eg,"null")):typeof E(z)=="boolean"?(u(),c("span",{key:2,style:Ke({color:E(z)?"var(--ss-green-fg)":"var(--ss-red-fg)"})},f(String(E(z))),5)):typeof E(z)=="number"?(u(),c("span",Pg,f(String(E(z))),1)):Array.isArray(E(z))?(u(),c("span",Mg,f(ge(E(z)).text),1)):(u(),c("span",Ag,f(String(E(z))),1))],2),k(De)(E(z))?te("",!0):(u(),c("button",{key:0,type:"button",class:O(`${ue}-copy-row-btn`),style:{marginLeft:"4px"},title:"Copy",ref_for:!0,ref:oe=>se(`leaf-${z}`,oe),onClick:oe=>be(`${z}: ${ge(E(z)).text}`,`leaf-${z}`,oe)}," ⎘ ",10,Rg))],2))],2))),128))],2)],2)):(u(),c("div",{key:1,class:O(`${ue}-empty`)},"Config not available",2))]))}})},Symbol.toStringTag,{value:"Module"})),Fg={key:0,class:"ss-dash-empty"},Og={key:1,class:"ss-dash-empty"},Dg={key:2,class:"ss-dash-empty"},Ig={class:"ss-dash-info-cards"},Bg={class:"ss-dash-info-card-label"},Ng={class:"ss-dash-info-card-value"},jg={key:0,class:"ss-dash-empty"},Hg={key:1,class:"ss-dash-table"},Ug={style:{"font-family":"monospace","font-size":"11px"}},qg={key:0,style:{"margin-left":"6px","font-size":"11px",color:"var(--ss-dim)"}},Kg={style:{color:"var(--ss-dim)","margin-left":"4px"}},Vg={style:{"font-size":"11px"}},zg=["onClick"],Wg=["onClick"],Jg={key:2,class:"ss-dash-empty"},Qg={key:3,class:"ss-dash-table"},Gg={class:"ss-dash-bar"},Yg={class:"ss-dash-bar-track",style:{"max-width":"120px"}},Xg={key:4,class:"ss-dash-empty"},Zg={key:5,class:"ss-dash-table"},e1={style:{color:"var(--ss-dim)"}},t1={key:6,class:"ss-dash-empty"},s1={key:7,class:"ss-dash-table"},n1={style:{color:"var(--ss-dim)","font-size":"11px"}},l1={class:"ss-dash-table"},o1={style:{"font-family":"monospace","font-size":"11px"}},a1={key:0,class:"ss-dash-table",style:{"margin-top":"8px"}},i1={style:{"font-family":"monospace","font-size":"11px"}},r1={class:"ss-dash-table"},u1={class:"ss-dash-table"},c1={style:{"font-family":"monospace","font-size":"11px"}},d1={style:{"font-family":"monospace","font-size":"11px"}},f1={style:{"font-family":"monospace","font-size":"11px"}},h1={style:{"font-size":"11px"}},p1=Object.freeze(Object.defineProperty({__proto__:null,default:Oe({__name:"InternalsSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-debug-endpoint","/admin/api/debug"),o=re("ss-auth-token",void 0),a=J(null),i=J(!0),r=J(null),d=J(new Set),g=un(s,o);let v=null;async function m(){try{const A=await g().fetch(`${l}/diagnostics`);a.value=A,r.value=null,i.value=!1}catch(A){if(A instanceof tn){r.value=A,i.value=!1,v&&(clearInterval(v),v=null);return}r.value=A instanceof Error?A:new Error(String(A)),i.value=!1}}Lt(()=>{i.value=!0,r.value=null,m(),v=setInterval(m,Zo)}),Ft(()=>{v&&clearInterval(v)}),gt(t,()=>{m()});function p(A){d.value.has(A)?d.value.delete(A):d.value.add(A)}function _(A){const y=Vu(A);return y==="ok"?"ss-dash-dot-ok":y==="err"?"ss-dash-dot-err":""}function x(A){return A.debounceMs!==void 0?`${Dt(A.debounceMs)} (debounce)`:A.intervalMs!==void 0?Dt(A.intervalMs):"-"}const w=q(()=>a.value?.buffers?Object.entries(a.value.buffers).map(([A,y])=>({name:A.charAt(0).toUpperCase()+A.slice(1),...y,percent:Uu(y.current,y.max)})):[]),P=q(()=>a.value?.timers?Object.entries(a.value.timers).map(([A,y])=>({key:A,label:Du(A),...y,interval:x(y)})):[]),F=q(()=>{if(!a.value)return[];const A=[];if(a.value.transmit&&A.push({key:"transmit",label:"Transmit (SSE)",status:a.value.transmit.available?"connected":"unavailable",details:a.value.transmit.available?`Channels: ${a.value.transmit.channels.join(", ")}`:"Not installed"}),a.value.integrations)for(const[y,$]of Object.entries(a.value.integrations))A.push({key:y,label:Bu(y),status:Nu($),details:ju(y,$)});return A});return(A,y)=>(u(),c("div",null,[i.value&&!a.value?(u(),c("div",Fg,"Loading diagnostics...")):r.value&&!a.value?(u(),c("div",Og,"Error: "+f(r.value.message),1)):a.value?(u(),c(U,{key:3},[y[41]||(y[41]=n("h3",{class:"ss-dash-section-title"},"Package Info",-1)),n("div",Ig,[(u(!0),c(U,null,ye([{label:"Version",value:a.value.package?.version||"-"},{label:"Node.js",value:a.value.package?.nodeVersion||"-"},{label:"AdonisJS",value:a.value.package?.adonisVersion||"-"},{label:"Uptime",value:k(du)(a.value.uptime||a.value.package?.uptime)},{label:"Renderer",value:a.value.devToolbar?.renderer||"preact"}],$=>(u(),c("div",{key:$.label,class:"ss-dash-info-card"},[n("span",Bg,f($.label),1),n("span",Ng,f($.value),1)]))),128))]),y[42]||(y[42]=n("h3",{class:"ss-dash-section-title"},"Collectors",-1)),a.value.collectors?.length?(u(),c("table",Hg,[y[4]||(y[4]=n("thead",null,[n("tr",null,[n("th",null,"Collector"),n("th",null,"Status"),n("th",null,"Last Error"),n("th",null,"Config")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(a.value.collectors,$=>(u(),c("tr",{key:$.name},[n("td",null,[n("span",Ug,f($.name),1),$.label&&$.label!==$.name?(u(),c("span",qg,f($.label),1)):te("",!0)]),n("td",null,[n("span",{class:O(["ss-dash-dot",_($.status)])},null,2),_e(" "+f($.status),1)]),n("td",{style:Ke($.lastError?{color:"var(--ss-red-fg)"}:{})},[$.lastError?(u(),c(U,{key:0},[_e(f($.lastError)+" ",1),n("span",Kg,f(k(bt)($.lastErrorAt??0)),1)],64)):(u(),c(U,{key:1},[_e("-")],64))],4),n("td",Vg,[Object.keys($.config||{}).length?(u(!0),c(U,{key:0},ye(k(Hu)($.config),T=>(u(),c("span",{key:T.key,style:{"margin-right":"8px"}},[_e(f(T.key)+"=",1),T.secret&&!d.value.has(`collector-${$.name}-${T.key}`)?(u(),c("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:Q=>p(`collector-${$.name}-${T.key}`)},"••••••••",8,zg)):(u(),c(U,{key:1},[n("span",null,f(T.value),1),T.secret?(u(),c("button",{key:0,style:{background:"none",border:"none",color:"var(--ss-link-color, #3b82f6)",cursor:"pointer","font-size":"10px","margin-left":"4px",padding:"0"},onClick:Q=>p(`collector-${$.name}-${T.key}`)}," Hide ",8,Wg)):te("",!0)],64))]))),128)):(u(),c(U,{key:1},[_e("-")],64))])]))),128))])])):(u(),c("div",jg,"No collectors")),y[43]||(y[43]=n("h3",{class:"ss-dash-section-title"},"Buffers",-1)),w.value.length?(u(),c("table",Qg,[y[5]||(y[5]=n("thead",null,[n("tr",null,[n("th",null,"Buffer"),n("th",null,"Usage"),n("th",null,"Fill %")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(w.value,$=>(u(),c("tr",{key:$.name},[n("td",null,f($.name),1),n("td",null,f($.current.toLocaleString())+" / "+f($.max.toLocaleString()),1),n("td",null,[n("div",Gg,[n("div",Yg,[n("div",{class:O(["ss-dash-bar-fill",$.percent>=100?"ss-dash-bar-fill-warn":""]),style:Ke({width:$.percent+"%"})},null,6)]),n("span",{class:O(["ss-dash-bar-pct",$.percent>=100?"ss-dash-bar-pct-warn":""])},f($.percent)+"%",3)])])]))),128))])])):(u(),c("div",Jg,"No buffer data")),y[44]||(y[44]=n("h3",{class:"ss-dash-section-title"},"Timers",-1)),P.value.length?(u(),c("table",Zg,[y[6]||(y[6]=n("thead",null,[n("tr",null,[n("th",null,"Timer"),n("th",null,"Status"),n("th",null,"Interval")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(P.value,$=>(u(),c("tr",{key:$.key},[n("td",null,f($.label),1),n("td",null,[n("span",{class:O(["ss-dash-dot",_($.active?"active":"inactive")])},null,2),_e(" "+f($.active?"active":"inactive"),1)]),n("td",e1,f($.interval),1)]))),128))])])):(u(),c("div",Xg,"No timer data")),y[45]||(y[45]=n("h3",{class:"ss-dash-section-title"},"Integrations",-1)),F.value.length?(u(),c("table",s1,[y[7]||(y[7]=n("thead",null,[n("tr",null,[n("th",null,"Integration"),n("th",null,"Status"),n("th",null,"Details")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(F.value,$=>(u(),c("tr",{key:$.key},[n("td",null,f($.label),1),n("td",null,[n("span",{class:O(["ss-dash-dot",_($.status)])},null,2),_e(" "+f($.status),1)]),n("td",n1,f($.details),1)]))),128))])])):(u(),c("div",t1,"No integration data")),a.value.storage?(u(),c(U,{key:8},[y[16]||(y[16]=n("h3",{class:"ss-dash-section-title"},"Storage",-1)),n("table",l1,[y[14]||(y[14]=n("thead",null,[n("tr",null,[n("th",null,"Metric"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[8]||(y[8]=n("td",null,"Status",-1)),n("td",null,[n("span",{class:O(["ss-dash-dot",_(a.value.storage.ready?"ready":"unavailable")])},null,2),_e(" "+f(a.value.storage.ready?"ready":"not ready"),1)])]),n("tr",null,[y[9]||(y[9]=n("td",null,"DB Path",-1)),n("td",o1,f(a.value.storage.dbPath),1)]),n("tr",null,[y[10]||(y[10]=n("td",null,"File Size",-1)),n("td",null,f(a.value.storage.fileSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[11]||(y[11]=n("td",null,"WAL Size",-1)),n("td",null,f(a.value.storage.walSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[12]||(y[12]=n("td",null,"Retention",-1)),n("td",null,f(a.value.storage.retentionDays)+" days",1)]),n("tr",null,[y[13]||(y[13]=n("td",null,"Last Cleanup",-1)),n("td",null,f(k(bt)(a.value.storage.lastCleanupAt??0)),1)])])]),a.value.storage.tables?.length?(u(),c("table",a1,[y[15]||(y[15]=n("thead",null,[n("tr",null,[n("th",null,"Table"),n("th",null,"Rows")])],-1)),n("tbody",null,[(u(!0),c(U,null,ye(a.value.storage.tables,$=>(u(),c("tr",{key:$.name},[n("td",i1,f($.name),1),n("td",null,f($.rowCount.toLocaleString()),1)]))),128))])])):te("",!0)],64)):te("",!0),y[46]||(y[46]=n("h3",{class:"ss-dash-section-title"},"Resolved Config",-1)),n("table",r1,[y[24]||(y[24]=n("thead",null,[n("tr",null,[n("th",null,"Setting"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[17]||(y[17]=n("td",null,"intervalMs",-1)),n("td",null,f(a.value.config?.intervalMs),1)]),n("tr",null,[y[18]||(y[18]=n("td",null,"transport",-1)),n("td",null,f(a.value.config?.transport),1)]),n("tr",null,[y[19]||(y[19]=n("td",null,"channelName",-1)),n("td",null,f(a.value.config?.channelName),1)]),n("tr",null,[y[20]||(y[20]=n("td",null,"endpoint",-1)),n("td",null,f(a.value.config?.endpoint===!1?"false":a.value.config?.endpoint),1)]),n("tr",null,[y[21]||(y[21]=n("td",null,"skipInTest",-1)),n("td",null,f(a.value.config?.skipInTest),1)]),n("tr",null,[y[22]||(y[22]=n("td",null,"onStats callback",-1)),n("td",null,f(a.value.config?.hasOnStatsCallback?"defined":"not defined"),1)]),n("tr",null,[y[23]||(y[23]=n("td",null,"shouldShow callback",-1)),n("td",null,f(a.value.config?.hasShouldShowCallback?"defined":"not defined"),1)])])]),y[47]||(y[47]=n("h4",{class:"ss-dash-section-title"},"DevToolbar",-1)),n("table",u1,[y[40]||(y[40]=n("thead",null,[n("tr",null,[n("th",null,"Setting"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[25]||(y[25]=n("td",null,"enabled",-1)),n("td",null,f(a.value.devToolbar?.enabled),1)]),n("tr",null,[y[26]||(y[26]=n("td",null,"tracing",-1)),n("td",null,f(a.value.devToolbar?.tracing),1)]),n("tr",null,[y[27]||(y[27]=n("td",null,"dashboard",-1)),n("td",null,f(a.value.devToolbar?.dashboard),1)]),n("tr",null,[y[28]||(y[28]=n("td",null,"dashboardPath",-1)),n("td",c1,f(a.value.devToolbar?.dashboardPath),1)]),n("tr",null,[y[29]||(y[29]=n("td",null,"debugEndpoint",-1)),n("td",d1,[d.value.has("cfg-debugEndpoint")?(u(),c(U,{key:1},[_e(f(a.value.devToolbar?.debugEndpoint)+" ",1),n("button",{style:{background:"none",border:"none",color:"var(--ss-link-color, #3b82f6)",cursor:"pointer","font-size":"10px","margin-left":"4px",padding:"0"},onClick:y[1]||(y[1]=$=>p("cfg-debugEndpoint"))}," Hide ")],64)):(u(),c("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:y[0]||(y[0]=$=>p("cfg-debugEndpoint"))},"••••••••"))])]),n("tr",null,[y[30]||(y[30]=n("td",null,"maxQueries",-1)),n("td",null,f(a.value.devToolbar?.maxQueries),1)]),n("tr",null,[y[31]||(y[31]=n("td",null,"maxEvents",-1)),n("td",null,f(a.value.devToolbar?.maxEvents),1)]),n("tr",null,[y[32]||(y[32]=n("td",null,"maxEmails",-1)),n("td",null,f(a.value.devToolbar?.maxEmails),1)]),n("tr",null,[y[33]||(y[33]=n("td",null,"maxTraces",-1)),n("td",null,f(a.value.devToolbar?.maxTraces),1)]),n("tr",null,[y[34]||(y[34]=n("td",null,"slowQueryThresholdMs",-1)),n("td",null,f(a.value.devToolbar?.slowQueryThresholdMs),1)]),n("tr",null,[y[35]||(y[35]=n("td",null,"retentionDays",-1)),n("td",null,f(a.value.devToolbar?.retentionDays),1)]),n("tr",null,[y[36]||(y[36]=n("td",null,"dbPath",-1)),n("td",f1,[d.value.has("cfg-dbPath")?(u(),c(U,{key:1},[_e(f(a.value.devToolbar?.dbPath)+" ",1),n("button",{style:{background:"none",border:"none",color:"var(--ss-link-color, #3b82f6)",cursor:"pointer","font-size":"10px","margin-left":"4px",padding:"0"},onClick:y[3]||(y[3]=$=>p("cfg-dbPath"))}," Hide ")],64)):(u(),c("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:y[2]||(y[2]=$=>p("cfg-dbPath"))},"••••••••"))])]),n("tr",null,[y[37]||(y[37]=n("td",null,"persistDebugData",-1)),n("td",null,f(a.value.devToolbar?.persistDebugData),1)]),n("tr",null,[y[38]||(y[38]=n("td",null,"excludeFromTracing",-1)),n("td",h1,f(a.value.devToolbar?.excludeFromTracing?.join(", ")||"-"),1)]),n("tr",null,[y[39]||(y[39]=n("td",null,"customPanes",-1)),n("td",null,f(a.value.devToolbar?.customPaneCount??0)+" registered",1)])])])],64)):(u(),c("div",Dg,"Diagnostics not available"))]))}})},Symbol.toStringTag,{value:"Module"}))})();