adonisjs-server-stats 1.6.2 → 1.6.11

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 (88) hide show
  1. package/README.md +1 -0
  2. package/dist/core/api-client.d.ts.map +1 -1
  3. package/dist/core/dashboard-api.d.ts +2 -1
  4. package/dist/core/dashboard-api.d.ts.map +1 -1
  5. package/dist/core/dashboard-data-controller.d.ts +2 -0
  6. package/dist/core/dashboard-data-controller.d.ts.map +1 -1
  7. package/dist/core/debug-data-controller.d.ts +1 -0
  8. package/dist/core/debug-data-controller.d.ts.map +1 -1
  9. package/dist/core/history-buffer.d.ts.map +1 -1
  10. package/dist/core/index.js +404 -361
  11. package/dist/core/server-stats-controller.d.ts +1 -0
  12. package/dist/core/server-stats-controller.d.ts.map +1 -1
  13. package/dist/core/sparkline.d.ts.map +1 -1
  14. package/dist/react/core/api-client.d.ts.map +1 -1
  15. package/dist/react/core/dashboard-api.d.ts +2 -1
  16. package/dist/react/core/dashboard-api.d.ts.map +1 -1
  17. package/dist/react/core/dashboard-data-controller.d.ts +2 -0
  18. package/dist/react/core/dashboard-data-controller.d.ts.map +1 -1
  19. package/dist/react/core/debug-data-controller.d.ts +1 -0
  20. package/dist/react/core/debug-data-controller.d.ts.map +1 -1
  21. package/dist/react/core/history-buffer.d.ts.map +1 -1
  22. package/dist/react/core/server-stats-controller.d.ts +1 -0
  23. package/dist/react/core/server-stats-controller.d.ts.map +1 -1
  24. package/dist/react/core/sparkline.d.ts.map +1 -1
  25. package/dist/src/collectors/app_collector.d.ts.map +1 -1
  26. package/dist/src/collectors/db_pool_collector.d.ts.map +1 -1
  27. package/dist/src/collectors/redis_collector.d.ts.map +1 -1
  28. package/dist/src/controller/debug_controller.d.ts +3 -1
  29. package/dist/src/controller/debug_controller.d.ts.map +1 -1
  30. package/dist/src/controller/debug_controller.js +25 -20
  31. package/dist/src/dashboard/chart_aggregator.js +42 -41
  32. package/dist/src/dashboard/dashboard_controller.d.ts.map +1 -1
  33. package/dist/src/dashboard/dashboard_controller.js +7 -5
  34. package/dist/src/dashboard/dashboard_store.d.ts +61 -19
  35. package/dist/src/dashboard/dashboard_store.d.ts.map +1 -1
  36. package/dist/src/dashboard/dashboard_store.js +677 -474
  37. package/dist/src/dashboard/integrations/config_inspector.d.ts +4 -0
  38. package/dist/src/dashboard/integrations/config_inspector.d.ts.map +1 -1
  39. package/dist/src/dashboard/integrations/config_inspector.js +16 -2
  40. package/dist/src/dashboard/migrator.d.ts.map +1 -1
  41. package/dist/src/dashboard/migrator.js +30 -4
  42. package/dist/src/data/data_access.d.ts.map +1 -1
  43. package/dist/src/data/data_access.js +40 -7
  44. package/dist/src/debug/debug_store.d.ts.map +1 -1
  45. package/dist/src/debug/debug_store.js +17 -7
  46. package/dist/src/debug/email_collector.d.ts +2 -0
  47. package/dist/src/debug/email_collector.d.ts.map +1 -1
  48. package/dist/src/debug/email_collector.js +17 -13
  49. package/dist/src/debug/event_collector.d.ts +7 -1
  50. package/dist/src/debug/event_collector.d.ts.map +1 -1
  51. package/dist/src/debug/event_collector.js +46 -17
  52. package/dist/src/debug/query_collector.d.ts +12 -0
  53. package/dist/src/debug/query_collector.d.ts.map +1 -1
  54. package/dist/src/debug/query_collector.js +35 -5
  55. package/dist/src/debug/ring_buffer.d.ts +14 -0
  56. package/dist/src/debug/ring_buffer.d.ts.map +1 -1
  57. package/dist/src/debug/ring_buffer.js +48 -2
  58. package/dist/src/debug/trace_collector.d.ts +1 -0
  59. package/dist/src/debug/trace_collector.d.ts.map +1 -1
  60. package/dist/src/debug/trace_collector.js +4 -1
  61. package/dist/src/define_config.d.ts.map +1 -1
  62. package/dist/src/define_config.js +5 -1
  63. package/dist/src/edge/client/dashboard.js +2 -2
  64. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  65. package/dist/src/edge/client/debug-panel.js +1 -1
  66. package/dist/src/edge/client/stats-bar.js +1 -1
  67. package/dist/src/edge/client-vue/dashboard.js +5 -5
  68. package/dist/src/edge/client-vue/debug-panel-deferred.js +2 -2
  69. package/dist/src/edge/client-vue/debug-panel.js +2 -2
  70. package/dist/src/edge/client-vue/stats-bar.js +3 -3
  71. package/dist/src/engine/request_metrics.d.ts.map +1 -1
  72. package/dist/src/engine/request_metrics.js +33 -3
  73. package/dist/src/log_stream/log_stream_provider.js +1 -1
  74. package/dist/src/log_stream/log_stream_service.d.ts +1 -0
  75. package/dist/src/log_stream/log_stream_service.d.ts.map +1 -1
  76. package/dist/src/log_stream/log_stream_service.js +13 -3
  77. package/dist/src/prometheus/prometheus_collector.d.ts +14 -3
  78. package/dist/src/prometheus/prometheus_collector.d.ts.map +1 -1
  79. package/dist/src/prometheus/prometheus_collector.js +209 -198
  80. package/dist/src/provider/server_stats_provider.d.ts.map +1 -1
  81. package/dist/src/provider/server_stats_provider.js +17 -31
  82. package/dist/src/stubs/config.stub +3 -0
  83. package/dist/src/types.d.ts +12 -0
  84. package/dist/src/types.d.ts.map +1 -1
  85. package/dist/src/utils/logger.d.ts +7 -5
  86. package/dist/src/utils/logger.d.ts.map +1 -1
  87. package/dist/src/utils/logger.js +27 -5
  88. package/package.json +6 -2
@@ -1,5 +1,5 @@
1
- (function(){"use strict";function fn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Ee={},zt=[],dt=()=>{},ul=()=>!1,As=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),hn=e=>e.startsWith("onUpdate:"),Ne=Object.assign,pn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},pa=Object.prototype.hasOwnProperty,ke=(e,t)=>pa.call(e,t),pe=Array.isArray,Wt=e=>hs(e)==="[object Map]",cl=e=>hs(e)==="[object Set]",dl=e=>hs(e)==="[object Date]",ve=e=>typeof e=="function",Fe=e=>typeof e=="string",at=e=>typeof e=="symbol",Se=e=>e!==null&&typeof e=="object",fl=e=>(Se(e)||ve(e))&&ve(e.then)&&ve(e.catch),hl=Object.prototype.toString,hs=e=>hl.call(e),va=e=>hs(e).slice(8,-1),pl=e=>hs(e)==="[object Object]",vn=e=>Fe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ps=fn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Rs=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},ga=/-\w/g,st=Rs(e=>e.replace(ga,t=>t.slice(1).toUpperCase())),ya=/\B([A-Z])/g,Et=Rs(e=>e.replace(ya,"-$1").toLowerCase()),Ls=Rs(e=>e.charAt(0).toUpperCase()+e.slice(1)),gn=Rs(e=>e?`on${Ls(e)}`:""),Pt=(e,t)=>!Object.is(e,t),yn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},vl=(e,t,s,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:s})},ma=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ba=e=>{const t=Fe(e)?Number(e):NaN;return isNaN(t)?e:t};let gl;const Fs=()=>gl||(gl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ke(e){if(pe(e)){const t={};for(let s=0;s<e.length;s++){const l=e[s],o=Fe(l)?$a(l):Ke(l);if(o)for(const a in o)t[a]=o[a]}return t}else if(Fe(e)||Se(e))return e}const _a=/;(?![^(]*\))/g,xa=/:([^]+)/,wa=/\/\*[^]*?\*\//g;function $a(e){const t={};return e.replace(wa,"").split(_a).forEach(s=>{if(s){const l=s.split(xa);l.length>1&&(t[l[0].trim()]=l[1].trim())}}),t}function O(e){let t="";if(Fe(e))t=e;else if(pe(e))for(let s=0;s<e.length;s++){const l=O(e[s]);l&&(t+=l+" ")}else if(Se(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const ka=fn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function yl(e){return!!e||e===""}function Sa(e,t){if(e.length!==t.length)return!1;let s=!0;for(let l=0;s&&l<e.length;l++)s=mn(e[l],t[l]);return s}function mn(e,t){if(e===t)return!0;let s=dl(e),l=dl(t);if(s||l)return s&&l?e.getTime()===t.getTime():!1;if(s=at(e),l=at(t),s||l)return e===t;if(s=pe(e),l=pe(t),s||l)return s&&l?Sa(e,t):!1;if(s=Se(e),l=Se(t),s||l){if(!s||!l)return!1;const o=Object.keys(e).length,a=Object.keys(t).length;if(o!==a)return!1;for(const i in e){const r=e.hasOwnProperty(i),d=t.hasOwnProperty(i);if(r&&!d||!r&&d||!mn(e[i],t[i]))return!1}}return String(e)===String(t)}const ml=e=>!!(e&&e.__v_isRef===!0),f=e=>Fe(e)?e:e==null?"":pe(e)||Se(e)&&(e.toString===hl||!ve(e.toString))?ml(e)?f(e.value):JSON.stringify(e,bl,2):String(e),bl=(e,t)=>ml(t)?bl(e,t.value):Wt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[l,o],a)=>(s[bn(l,a)+" =>"]=o,s),{})}:cl(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>bn(s))}:at(t)?bn(t):Se(t)&&!pe(t)&&!pl(t)?String(t):t,bn=(e,t="")=>{var s;return at(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Qe;class Ca{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Qe,!t&&Qe&&(this.index=(Qe.scopes||(Qe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Qe;try{return Qe=this,t()}finally{Qe=s}}}on(){++this._on===1&&(this.prevScope=Qe,Qe=this)}off(){this._on>0&&--this._on===0&&(Qe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,l;for(s=0,l=this.effects.length;s<l;s++)this.effects[s].stop();for(this.effects.length=0,s=0,l=this.cleanups.length;s<l;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,l=this.scopes.length;s<l;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Ta(){return Qe}let Pe;const _n=new WeakSet;class _l{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qe&&Qe.active&&Qe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,_n.has(this)&&(_n.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||wl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Tl(this),$l(this);const t=Pe,s=it;Pe=this,it=!0;try{return this.fn()}finally{kl(this),Pe=t,it=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)kn(t);this.deps=this.depsTail=void 0,Tl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?_n.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){$n(this)&&this.run()}get dirty(){return $n(this)}}let xl=0,vs,gs;function wl(e,t=!1){if(e.flags|=8,t){e.next=gs,gs=e;return}e.next=vs,vs=e}function xn(){xl++}function wn(){if(--xl>0)return;if(gs){let t=gs;for(gs=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;vs;){let t=vs;for(vs=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(l){e||(e=l)}t=s}}if(e)throw e}function $l(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function kl(e){let t,s=e.depsTail,l=s;for(;l;){const o=l.prevDep;l.version===-1?(l===s&&(s=o),kn(l),Ea(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=o}e.deps=t,e.depsTail=s}function $n(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Sl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Sl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ys)||(e.globalVersion=ys,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!$n(e))))return;e.flags|=2;const t=e.dep,s=Pe,l=it;Pe=e,it=!0;try{$l(e);const o=e.fn(e._value);(t.version===0||Pt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Pe=s,it=l,kl(e),e.flags&=-3}}function kn(e,t=!1){const{dep:s,prevSub:l,nextSub:o}=e;if(l&&(l.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=l,e.nextSub=void 0),s.subs===e&&(s.subs=l,!l&&s.computed)){s.computed.flags&=-5;for(let a=s.computed.deps;a;a=a.nextDep)kn(a,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Ea(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let it=!0;const Cl=[];function ft(){Cl.push(it),it=!1}function ht(){const e=Cl.pop();it=e===void 0?!0:e}function Tl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Pe;Pe=void 0;try{t()}finally{Pe=s}}}let ys=0;class Pa{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Sn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Pe||!it||Pe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Pe)s=this.activeLink=new Pa(Pe,this),Pe.deps?(s.prevDep=Pe.depsTail,Pe.depsTail.nextDep=s,Pe.depsTail=s):Pe.deps=Pe.depsTail=s,El(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const l=s.nextDep;l.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=l),s.prevDep=Pe.depsTail,s.nextDep=void 0,Pe.depsTail.nextDep=s,Pe.depsTail=s,Pe.deps===s&&(Pe.deps=l)}return s}trigger(t){this.version++,ys++,this.notify(t)}notify(t){xn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{wn()}}}function El(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let l=t.deps;l;l=l.nextDep)El(l)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Cn=new WeakMap,Nt=Symbol(""),Tn=Symbol(""),ms=Symbol("");function Ue(e,t,s){if(it&&Pe){let l=Cn.get(e);l||Cn.set(e,l=new Map);let o=l.get(s);o||(l.set(s,o=new Sn),o.map=l,o.key=s),o.track()}}function _t(e,t,s,l,o,a){const i=Cn.get(e);if(!i){ys++;return}const r=d=>{d&&d.trigger()};if(xn(),t==="clear")i.forEach(r);else{const d=pe(e),g=d&&vn(s);if(d&&s==="length"){const v=Number(l);i.forEach((m,p)=>{(p==="length"||p===ms||!at(p)&&p>=v)&&r(m)})}else switch((s!==void 0||i.has(void 0))&&r(i.get(s)),g&&r(i.get(ms)),t){case"add":d?g&&r(i.get("length")):(r(i.get(Nt)),Wt(e)&&r(i.get(Tn)));break;case"delete":d||(r(i.get(Nt)),Wt(e)&&r(i.get(Tn)));break;case"set":Wt(e)&&r(i.get(Nt));break}}wn()}function Jt(e){const t=we(e);return t===e?t:(Ue(t,"iterate",ms),nt(e)?t:t.map(rt))}function Os(e){return Ue(e=we(e),"iterate",ms),e}function Mt(e,t){return wt(e)?Gt(jt(e)?rt(t):t):rt(t)}const Ma={__proto__:null,[Symbol.iterator](){return En(this,Symbol.iterator,e=>Mt(this,e))},concat(...e){return Jt(this).concat(...e.map(t=>pe(t)?Jt(t):t))},entries(){return En(this,"entries",e=>(e[1]=Mt(this,e[1]),e))},every(e,t){return xt(this,"every",e,t,void 0,arguments)},filter(e,t){return xt(this,"filter",e,t,s=>s.map(l=>Mt(this,l)),arguments)},find(e,t){return xt(this,"find",e,t,s=>Mt(this,s),arguments)},findIndex(e,t){return xt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xt(this,"findLast",e,t,s=>Mt(this,s),arguments)},findLastIndex(e,t){return xt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Pn(this,"includes",e)},indexOf(...e){return Pn(this,"indexOf",e)},join(e){return Jt(this).join(e)},lastIndexOf(...e){return Pn(this,"lastIndexOf",e)},map(e,t){return xt(this,"map",e,t,void 0,arguments)},pop(){return bs(this,"pop")},push(...e){return bs(this,"push",e)},reduce(e,...t){return Pl(this,"reduce",e,t)},reduceRight(e,...t){return Pl(this,"reduceRight",e,t)},shift(){return bs(this,"shift")},some(e,t){return xt(this,"some",e,t,void 0,arguments)},splice(...e){return bs(this,"splice",e)},toReversed(){return Jt(this).toReversed()},toSorted(e){return Jt(this).toSorted(e)},toSpliced(...e){return Jt(this).toSpliced(...e)},unshift(...e){return bs(this,"unshift",e)},values(){return En(this,"values",e=>Mt(this,e))}};function En(e,t,s){const l=Os(e),o=l[t]();return l!==e&&!nt(e)&&(o._next=o.next,o.next=()=>{const a=o._next();return a.done||(a.value=s(a.value)),a}),o}const Aa=Array.prototype;function xt(e,t,s,l,o,a){const i=Os(e),r=i!==e&&!nt(e),d=i[t];if(d!==Aa[t]){const m=d.apply(e,a);return r?rt(m):m}let g=s;i!==e&&(r?g=function(m,p){return s.call(this,Mt(e,m),p,e)}:s.length>2&&(g=function(m,p){return s.call(this,m,p,e)}));const v=d.call(i,g,l);return r&&o?o(v):v}function Pl(e,t,s,l){const o=Os(e);let a=s;return o!==e&&(nt(e)?s.length>3&&(a=function(i,r,d){return s.call(this,i,r,d,e)}):a=function(i,r,d){return s.call(this,i,Mt(e,r),d,e)}),o[t](a,...l)}function Pn(e,t,s){const l=we(e);Ue(l,"iterate",ms);const o=l[t](...s);return(o===-1||o===!1)&&Rn(s[0])?(s[0]=we(s[0]),l[t](...s)):o}function bs(e,t,s=[]){ft(),xn();const l=we(e)[t].apply(e,s);return wn(),ht(),l}const Ra=fn("__proto__,__v_isRef,__isVue"),Ml=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(at));function La(e){at(e)||(e=String(e));const t=we(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class Al{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,l){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return a;if(s==="__v_raw")return l===(o?a?Il:Dl:a?Ol:Fl).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(l)?t:void 0;const i=pe(t);if(!o){let d;if(i&&(d=Ma[s]))return d;if(s==="hasOwnProperty")return La}const r=Reflect.get(t,s,je(t)?t:l);if((at(s)?Ml.has(s):Ra(s))||(o||Ue(t,"get",s),a))return r;if(je(r)){const d=i&&vn(s)?r:r.value;return o&&Se(d)?An(d):d}return Se(r)?o?An(r):Qt(r):r}}class Rl extends Al{constructor(t=!1){super(!1,t)}set(t,s,l,o){let a=t[s];const i=pe(t)&&vn(s);if(!this._isShallow){const g=wt(a);if(!nt(l)&&!wt(l)&&(a=we(a),l=we(l)),!i&&je(a)&&!je(l))return g||(a.value=l),!0}const r=i?Number(s)<t.length:ke(t,s),d=Reflect.set(t,s,l,je(t)?t:o);return t===we(o)&&(r?Pt(l,a)&&_t(t,"set",s,l):_t(t,"add",s,l)),d}deleteProperty(t,s){const l=ke(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&l&&_t(t,"delete",s,void 0),o}has(t,s){const l=Reflect.has(t,s);return(!at(s)||!Ml.has(s))&&Ue(t,"has",s),l}ownKeys(t){return Ue(t,"iterate",pe(t)?"length":Nt),Reflect.ownKeys(t)}}class Ll extends Al{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Fa=new Rl,Oa=new Ll,Da=new Rl(!0),Ia=new Ll(!0),Mn=e=>e,Ds=e=>Reflect.getPrototypeOf(e);function Ba(e,t,s){return function(...l){const o=this.__v_raw,a=we(o),i=Wt(a),r=e==="entries"||e===Symbol.iterator&&i,d=e==="keys"&&i,g=o[e](...l),v=s?Mn:t?Gt:rt;return!t&&Ue(a,"iterate",d?Tn:Nt),Ne(Object.create(g),{next(){const{value:m,done:p}=g.next();return p?{value:m,done:p}:{value:r?[v(m[0]),v(m[1])]:v(m),done:p}}})}}function Is(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Na(e,t){const s={get(o){const a=this.__v_raw,i=we(a),r=we(o);e||(Pt(o,r)&&Ue(i,"get",o),Ue(i,"get",r));const{has:d}=Ds(i),g=t?Mn:e?Gt:rt;if(d.call(i,o))return g(a.get(o));if(d.call(i,r))return g(a.get(r));a!==i&&a.get(o)},get size(){const o=this.__v_raw;return!e&&Ue(we(o),"iterate",Nt),o.size},has(o){const a=this.__v_raw,i=we(a),r=we(o);return e||(Pt(o,r)&&Ue(i,"has",o),Ue(i,"has",r)),o===r?a.has(o):a.has(o)||a.has(r)},forEach(o,a){const i=this,r=i.__v_raw,d=we(r),g=t?Mn:e?Gt:rt;return!e&&Ue(d,"iterate",Nt),r.forEach((v,m)=>o.call(a,g(v),g(m),i))}};return Ne(s,e?{add:Is("add"),set:Is("set"),delete:Is("delete"),clear:Is("clear")}:{add(o){!t&&!nt(o)&&!wt(o)&&(o=we(o));const a=we(this);return Ds(a).has.call(a,o)||(a.add(o),_t(a,"add",o,o)),this},set(o,a){!t&&!nt(a)&&!wt(a)&&(a=we(a));const i=we(this),{has:r,get:d}=Ds(i);let g=r.call(i,o);g||(o=we(o),g=r.call(i,o));const v=d.call(i,o);return i.set(o,a),g?Pt(a,v)&&_t(i,"set",o,a):_t(i,"add",o,a),this},delete(o){const a=we(this),{has:i,get:r}=Ds(a);let d=i.call(a,o);d||(o=we(o),d=i.call(a,o)),r&&r.call(a,o);const g=a.delete(o);return d&&_t(a,"delete",o,void 0),g},clear(){const o=we(this),a=o.size!==0,i=o.clear();return a&&_t(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Ba(o,e,t)}),s}function Bs(e,t){const s=Na(e,t);return(l,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?l:Reflect.get(ke(s,o)&&o in l?s:l,o,a)}const ja={get:Bs(!1,!1)},Ha={get:Bs(!1,!0)},Ua={get:Bs(!0,!1)},qa={get:Bs(!0,!0)},Fl=new WeakMap,Ol=new WeakMap,Dl=new WeakMap,Il=new WeakMap;function Ka(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Va(e){return e.__v_skip||!Object.isExtensible(e)?0:Ka(va(e))}function Qt(e){return wt(e)?e:Ns(e,!1,Fa,ja,Fl)}function za(e){return Ns(e,!1,Da,Ha,Ol)}function An(e){return Ns(e,!0,Oa,Ua,Dl)}function g1(e){return Ns(e,!0,Ia,qa,Il)}function Ns(e,t,s,l,o){if(!Se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=Va(e);if(a===0)return e;const i=o.get(e);if(i)return i;const r=new Proxy(e,a===2?l:s);return o.set(e,r),r}function jt(e){return wt(e)?jt(e.__v_raw):!!(e&&e.__v_isReactive)}function wt(e){return!!(e&&e.__v_isReadonly)}function nt(e){return!!(e&&e.__v_isShallow)}function Rn(e){return e?!!e.__v_raw:!1}function we(e){const t=e&&e.__v_raw;return t?we(t):e}function Wa(e){return!ke(e,"__v_skip")&&Object.isExtensible(e)&&vl(e,"__v_skip",!0),e}const rt=e=>Se(e)?Qt(e):e,Gt=e=>Se(e)?An(e):e;function je(e){return e?e.__v_isRef===!0:!1}function J(e){return Ja(e,!1)}function Ja(e,t){return je(e)?e:new Qa(e,t)}class Qa{constructor(t,s){this.dep=new Sn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:we(t),this._value=s?t:rt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,l=this.__v_isShallow||nt(t)||wt(t);t=l?t:we(t),Pt(t,s)&&(this._rawValue=t,this._value=l?t:rt(t),this.dep.trigger())}}function k(e){return je(e)?e.value:e}const Ga={get:(e,t,s)=>t==="__v_raw"?e:k(Reflect.get(e,t,s)),set:(e,t,s,l)=>{const o=e[t];return je(o)&&!je(s)?(o.value=s,!0):Reflect.set(e,t,s,l)}};function Bl(e){return jt(e)?e:new Proxy(e,Ga)}class Ya{constructor(t,s,l){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Sn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ys-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&Pe!==this)return wl(this,!0),!0}get value(){const t=this.dep.track();return Sl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Xa(e,t,s=!1){let l,o;return ve(e)?l=e:(l=e.get,o=e.set),new Ya(l,o,s)}const js={},Hs=new WeakMap;let Ht;function Za(e,t=!1,s=Ht){if(s){let l=Hs.get(s);l||Hs.set(s,l=[]),l.push(e)}}function ei(e,t,s=Ee){const{immediate:l,deep:o,once:a,scheduler:i,augmentJob:r,call:d}=s,g=$=>o?$:nt($)||o===!1||o===0?At($,1):At($);let v,m,p,_,x=!1,w=!1;if(je(e)?(m=()=>e.value,x=nt(e)):jt(e)?(m=()=>g(e),x=!0):pe(e)?(w=!0,x=e.some($=>jt($)||nt($)),m=()=>e.map($=>{if(je($))return $.value;if(jt($))return g($);if(ve($))return d?d($,2):$()})):ve(e)?t?m=d?()=>d(e,2):e:m=()=>{if(p){ft();try{p()}finally{ht()}}const $=Ht;Ht=v;try{return d?d(e,3,[_]):e(_)}finally{Ht=$}}:m=dt,t&&o){const $=m,T=o===!0?1/0:o;m=()=>At($(),T)}const P=Ta(),F=()=>{v.stop(),P&&P.active&&pn(P.effects,v)};if(a&&t){const $=t;t=(...T)=>{$(...T),F()}}let A=w?new Array(e.length).fill(js):js;const y=$=>{if(!(!(v.flags&1)||!v.dirty&&!$))if(t){const T=v.run();if(o||x||(w?T.some((Q,V)=>Pt(Q,A[V])):Pt(T,A))){p&&p();const Q=Ht;Ht=v;try{const V=[T,A===js?void 0:w&&A[0]===js?[]:A,_];A=T,d?d(t,3,V):t(...V)}finally{Ht=Q}}}else v.run()};return r&&r(y),v=new _l(m),v.scheduler=i?()=>i(y,!1):y,_=$=>Za($,!1,v),p=v.onStop=()=>{const $=Hs.get(v);if($){if(d)d($,4);else for(const T of $)T();Hs.delete(v)}},t?l?y(!0):A=v.run():i?i(y.bind(null,!0),!0):v.run(),F.pause=v.pause.bind(v),F.resume=v.resume.bind(v),F.stop=F,F}function At(e,t=1/0,s){if(t<=0||!Se(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,je(e))At(e.value,t,s);else if(pe(e))for(let l=0;l<e.length;l++)At(e[l],t,s);else if(cl(e)||Wt(e))e.forEach(l=>{At(l,t,s)});else if(pl(e)){for(const l in e)At(e[l],t,s);for(const l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&At(e[l],t,s)}return e}const _s=[];let Ln=!1;function y1(e,...t){if(Ln)return;Ln=!0,ft();const s=_s.length?_s[_s.length-1].component:null,l=s&&s.appContext.config.warnHandler,o=ti();if(l)Yt(l,s,11,[e+t.map(a=>{var i,r;return(r=(i=a.toString)==null?void 0:i.call(a))!=null?r:JSON.stringify(a)}).join(""),s&&s.proxy,o.map(({vnode:a})=>`at <${Bo(s,a.type)}>`).join(`
2
- `),o]);else{const a=[`[Vue warn]: ${e}`,...t];o.length&&a.push(`
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
- `],...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: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"}))})();
1
+ (function(){"use strict";function dn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Ee={},Vt=[],dt=()=>{},rl=()=>!1,As=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),fn=e=>e.startsWith("onUpdate:"),Ne=Object.assign,hn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},ha=Object.prototype.hasOwnProperty,ke=(e,t)=>ha.call(e,t),pe=Array.isArray,zt=e=>fs(e)==="[object Map]",ul=e=>fs(e)==="[object Set]",cl=e=>fs(e)==="[object Date]",ve=e=>typeof e=="function",Oe=e=>typeof e=="string",at=e=>typeof e=="symbol",Se=e=>e!==null&&typeof e=="object",dl=e=>(Se(e)||ve(e))&&ve(e.then)&&ve(e.catch),fl=Object.prototype.toString,fs=e=>fl.call(e),pa=e=>fs(e).slice(8,-1),hl=e=>fs(e)==="[object Object]",pn=e=>Oe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,hs=dn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ms=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},va=/-\w/g,st=Ms(e=>e.replace(va,t=>t.slice(1).toUpperCase())),ga=/\B([A-Z])/g,Et=Ms(e=>e.replace(ga,"-$1").toLowerCase()),Rs=Ms(e=>e.charAt(0).toUpperCase()+e.slice(1)),vn=Ms(e=>e?`on${Rs(e)}`:""),Pt=(e,t)=>!Object.is(e,t),gn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},pl=(e,t,s,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:s})},ya=e=>{const t=parseFloat(e);return isNaN(t)?e:t},ma=e=>{const t=Oe(e)?Number(e):NaN;return isNaN(t)?e:t};let vl;const Ls=()=>vl||(vl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ke(e){if(pe(e)){const t={};for(let s=0;s<e.length;s++){const l=e[s],a=Oe(l)?wa(l):Ke(l);if(a)for(const o in a)t[o]=a[o]}return t}else if(Oe(e)||Se(e))return e}const ba=/;(?![^(]*\))/g,_a=/:([^]+)/,xa=/\/\*[^]*?\*\//g;function wa(e){const t={};return e.replace(xa,"").split(ba).forEach(s=>{if(s){const l=s.split(_a);l.length>1&&(t[l[0].trim()]=l[1].trim())}}),t}function F(e){let t="";if(Oe(e))t=e;else if(pe(e))for(let s=0;s<e.length;s++){const l=F(e[s]);l&&(t+=l+" ")}else if(Se(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const $a=dn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function gl(e){return!!e||e===""}function ka(e,t){if(e.length!==t.length)return!1;let s=!0;for(let l=0;s&&l<e.length;l++)s=yn(e[l],t[l]);return s}function yn(e,t){if(e===t)return!0;let s=cl(e),l=cl(t);if(s||l)return s&&l?e.getTime()===t.getTime():!1;if(s=at(e),l=at(t),s||l)return e===t;if(s=pe(e),l=pe(t),s||l)return s&&l?ka(e,t):!1;if(s=Se(e),l=Se(t),s||l){if(!s||!l)return!1;const a=Object.keys(e).length,o=Object.keys(t).length;if(a!==o)return!1;for(const i in e){const r=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(r&&!c||!r&&c||!yn(e[i],t[i]))return!1}}return String(e)===String(t)}const yl=e=>!!(e&&e.__v_isRef===!0),f=e=>Oe(e)?e:e==null?"":pe(e)||Se(e)&&(e.toString===fl||!ve(e.toString))?yl(e)?f(e.value):JSON.stringify(e,ml,2):String(e),ml=(e,t)=>yl(t)?ml(e,t.value):zt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[l,a],o)=>(s[mn(l,o)+" =>"]=a,s),{})}:ul(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>mn(s))}:at(t)?mn(t):Se(t)&&!pe(t)&&!hl(t)?String(t):t,mn=(e,t="")=>{var s;return at(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Qe;class Sa{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.__v_skip=!0,this.parent=Qe,!t&&Qe&&(this.index=(Qe.scopes||(Qe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=Qe;try{return Qe=this,t()}finally{Qe=s}}}on(){++this._on===1&&(this.prevScope=Qe,Qe=this)}off(){this._on>0&&--this._on===0&&(Qe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,l;for(s=0,l=this.effects.length;s<l;s++)this.effects[s].stop();for(this.effects.length=0,s=0,l=this.cleanups.length;s<l;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,l=this.scopes.length;s<l;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const a=this.parent.scopes.pop();a&&a!==this&&(this.parent.scopes[this.index]=a,a.index=this.index)}this.parent=void 0}}}function Ca(){return Qe}let Pe;const bn=new WeakSet;class bl{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qe&&Qe.active&&Qe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,bn.has(this)&&(bn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||xl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Cl(this),wl(this);const t=Pe,s=it;Pe=this,it=!0;try{return this.fn()}finally{$l(this),Pe=t,it=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)$n(t);this.deps=this.depsTail=void 0,Cl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?bn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){wn(this)&&this.run()}get dirty(){return wn(this)}}let _l=0,ps,vs;function xl(e,t=!1){if(e.flags|=8,t){e.next=vs,vs=e;return}e.next=ps,ps=e}function _n(){_l++}function xn(){if(--_l>0)return;if(vs){let t=vs;for(vs=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ps;){let t=ps;for(ps=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(l){e||(e=l)}t=s}}if(e)throw e}function wl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $l(e){let t,s=e.depsTail,l=s;for(;l;){const a=l.prevDep;l.version===-1?(l===s&&(s=a),$n(l),Ta(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=a}e.deps=t,e.depsTail=s}function wn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(kl(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function kl(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===gs)||(e.globalVersion=gs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!wn(e))))return;e.flags|=2;const t=e.dep,s=Pe,l=it;Pe=e,it=!0;try{wl(e);const a=e.fn(e._value);(t.version===0||Pt(a,e._value))&&(e.flags|=128,e._value=a,t.version++)}catch(a){throw t.version++,a}finally{Pe=s,it=l,$l(e),e.flags&=-3}}function $n(e,t=!1){const{dep:s,prevSub:l,nextSub:a}=e;if(l&&(l.nextSub=a,e.prevSub=void 0),a&&(a.prevSub=l,e.nextSub=void 0),s.subs===e&&(s.subs=l,!l&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)$n(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Ta(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let it=!0;const Sl=[];function ft(){Sl.push(it),it=!1}function ht(){const e=Sl.pop();it=e===void 0?!0:e}function Cl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=Pe;Pe=void 0;try{t()}finally{Pe=s}}}let gs=0;class Ea{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class kn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Pe||!it||Pe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Pe)s=this.activeLink=new Ea(Pe,this),Pe.deps?(s.prevDep=Pe.depsTail,Pe.depsTail.nextDep=s,Pe.depsTail=s):Pe.deps=Pe.depsTail=s,Tl(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const l=s.nextDep;l.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=l),s.prevDep=Pe.depsTail,s.nextDep=void 0,Pe.depsTail.nextDep=s,Pe.depsTail=s,Pe.deps===s&&(Pe.deps=l)}return s}trigger(t){this.version++,gs++,this.notify(t)}notify(t){_n();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{xn()}}}function Tl(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let l=t.deps;l;l=l.nextDep)Tl(l)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Sn=new WeakMap,Nt=Symbol(""),Cn=Symbol(""),ys=Symbol("");function Ue(e,t,s){if(it&&Pe){let l=Sn.get(e);l||Sn.set(e,l=new Map);let a=l.get(s);a||(l.set(s,a=new kn),a.map=l,a.key=s),a.track()}}function _t(e,t,s,l,a,o){const i=Sn.get(e);if(!i){gs++;return}const r=c=>{c&&c.trigger()};if(_n(),t==="clear")i.forEach(r);else{const c=pe(e),g=c&&pn(s);if(c&&s==="length"){const v=Number(l);i.forEach((m,p)=>{(p==="length"||p===ys||!at(p)&&p>=v)&&r(m)})}else switch((s!==void 0||i.has(void 0))&&r(i.get(s)),g&&r(i.get(ys)),t){case"add":c?g&&r(i.get("length")):(r(i.get(Nt)),zt(e)&&r(i.get(Cn)));break;case"delete":c||(r(i.get(Nt)),zt(e)&&r(i.get(Cn)));break;case"set":zt(e)&&r(i.get(Nt));break}}xn()}function Wt(e){const t=we(e);return t===e?t:(Ue(t,"iterate",ys),nt(e)?t:t.map(rt))}function Os(e){return Ue(e=we(e),"iterate",ys),e}function At(e,t){return wt(e)?Qt(jt(e)?rt(t):t):rt(t)}const Pa={__proto__:null,[Symbol.iterator](){return Tn(this,Symbol.iterator,e=>At(this,e))},concat(...e){return Wt(this).concat(...e.map(t=>pe(t)?Wt(t):t))},entries(){return Tn(this,"entries",e=>(e[1]=At(this,e[1]),e))},every(e,t){return xt(this,"every",e,t,void 0,arguments)},filter(e,t){return xt(this,"filter",e,t,s=>s.map(l=>At(this,l)),arguments)},find(e,t){return xt(this,"find",e,t,s=>At(this,s),arguments)},findIndex(e,t){return xt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return xt(this,"findLast",e,t,s=>At(this,s),arguments)},findLastIndex(e,t){return xt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return xt(this,"forEach",e,t,void 0,arguments)},includes(...e){return En(this,"includes",e)},indexOf(...e){return En(this,"indexOf",e)},join(e){return Wt(this).join(e)},lastIndexOf(...e){return En(this,"lastIndexOf",e)},map(e,t){return xt(this,"map",e,t,void 0,arguments)},pop(){return ms(this,"pop")},push(...e){return ms(this,"push",e)},reduce(e,...t){return El(this,"reduce",e,t)},reduceRight(e,...t){return El(this,"reduceRight",e,t)},shift(){return ms(this,"shift")},some(e,t){return xt(this,"some",e,t,void 0,arguments)},splice(...e){return ms(this,"splice",e)},toReversed(){return Wt(this).toReversed()},toSorted(e){return Wt(this).toSorted(e)},toSpliced(...e){return Wt(this).toSpliced(...e)},unshift(...e){return ms(this,"unshift",e)},values(){return Tn(this,"values",e=>At(this,e))}};function Tn(e,t,s){const l=Os(e),a=l[t]();return l!==e&&!nt(e)&&(a._next=a.next,a.next=()=>{const o=a._next();return o.done||(o.value=s(o.value)),o}),a}const Aa=Array.prototype;function xt(e,t,s,l,a,o){const i=Os(e),r=i!==e&&!nt(e),c=i[t];if(c!==Aa[t]){const m=c.apply(e,o);return r?rt(m):m}let g=s;i!==e&&(r?g=function(m,p){return s.call(this,At(e,m),p,e)}:s.length>2&&(g=function(m,p){return s.call(this,m,p,e)}));const v=c.call(i,g,l);return r&&a?a(v):v}function El(e,t,s,l){const a=Os(e);let o=s;return a!==e&&(nt(e)?s.length>3&&(o=function(i,r,c){return s.call(this,i,r,c,e)}):o=function(i,r,c){return s.call(this,i,At(e,r),c,e)}),a[t](o,...l)}function En(e,t,s){const l=we(e);Ue(l,"iterate",ys);const a=l[t](...s);return(a===-1||a===!1)&&Mn(s[0])?(s[0]=we(s[0]),l[t](...s)):a}function ms(e,t,s=[]){ft(),_n();const l=we(e)[t].apply(e,s);return xn(),ht(),l}const Ma=dn("__proto__,__v_isRef,__isVue"),Pl=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(at));function Ra(e){at(e)||(e=String(e));const t=we(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class Al{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,l){if(s==="__v_skip")return t.__v_skip;const a=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!a;if(s==="__v_isReadonly")return a;if(s==="__v_isShallow")return o;if(s==="__v_raw")return l===(a?o?Dl:Fl:o?Ol:Ll).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(l)?t:void 0;const i=pe(t);if(!a){let c;if(i&&(c=Pa[s]))return c;if(s==="hasOwnProperty")return Ra}const r=Reflect.get(t,s,je(t)?t:l);if((at(s)?Pl.has(s):Ma(s))||(a||Ue(t,"get",s),o))return r;if(je(r)){const c=i&&pn(s)?r:r.value;return a&&Se(c)?An(c):c}return Se(r)?a?An(r):Jt(r):r}}class Ml extends Al{constructor(t=!1){super(!1,t)}set(t,s,l,a){let o=t[s];const i=pe(t)&&pn(s);if(!this._isShallow){const g=wt(o);if(!nt(l)&&!wt(l)&&(o=we(o),l=we(l)),!i&&je(o)&&!je(l))return g||(o.value=l),!0}const r=i?Number(s)<t.length:ke(t,s),c=Reflect.set(t,s,l,je(t)?t:a);return t===we(a)&&(r?Pt(l,o)&&_t(t,"set",s,l):_t(t,"add",s,l)),c}deleteProperty(t,s){const l=ke(t,s);t[s];const a=Reflect.deleteProperty(t,s);return a&&l&&_t(t,"delete",s,void 0),a}has(t,s){const l=Reflect.has(t,s);return(!at(s)||!Pl.has(s))&&Ue(t,"has",s),l}ownKeys(t){return Ue(t,"iterate",pe(t)?"length":Nt),Reflect.ownKeys(t)}}class Rl extends Al{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const La=new Ml,Oa=new Rl,Fa=new Ml(!0),Da=new Rl(!0),Pn=e=>e,Fs=e=>Reflect.getPrototypeOf(e);function Ia(e,t,s){return function(...l){const a=this.__v_raw,o=we(a),i=zt(o),r=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,g=a[e](...l),v=s?Pn:t?Qt:rt;return!t&&Ue(o,"iterate",c?Cn:Nt),Ne(Object.create(g),{next(){const{value:m,done:p}=g.next();return p?{value:m,done:p}:{value:r?[v(m[0]),v(m[1])]:v(m),done:p}}})}}function Ds(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ba(e,t){const s={get(a){const o=this.__v_raw,i=we(o),r=we(a);e||(Pt(a,r)&&Ue(i,"get",a),Ue(i,"get",r));const{has:c}=Fs(i),g=t?Pn:e?Qt:rt;if(c.call(i,a))return g(o.get(a));if(c.call(i,r))return g(o.get(r));o!==i&&o.get(a)},get size(){const a=this.__v_raw;return!e&&Ue(we(a),"iterate",Nt),a.size},has(a){const o=this.__v_raw,i=we(o),r=we(a);return e||(Pt(a,r)&&Ue(i,"has",a),Ue(i,"has",r)),a===r?o.has(a):o.has(a)||o.has(r)},forEach(a,o){const i=this,r=i.__v_raw,c=we(r),g=t?Pn:e?Qt:rt;return!e&&Ue(c,"iterate",Nt),r.forEach((v,m)=>a.call(o,g(v),g(m),i))}};return Ne(s,e?{add:Ds("add"),set:Ds("set"),delete:Ds("delete"),clear:Ds("clear")}:{add(a){!t&&!nt(a)&&!wt(a)&&(a=we(a));const o=we(this);return Fs(o).has.call(o,a)||(o.add(a),_t(o,"add",a,a)),this},set(a,o){!t&&!nt(o)&&!wt(o)&&(o=we(o));const i=we(this),{has:r,get:c}=Fs(i);let g=r.call(i,a);g||(a=we(a),g=r.call(i,a));const v=c.call(i,a);return i.set(a,o),g?Pt(o,v)&&_t(i,"set",a,o):_t(i,"add",a,o),this},delete(a){const o=we(this),{has:i,get:r}=Fs(o);let c=i.call(o,a);c||(a=we(a),c=i.call(o,a)),r&&r.call(o,a);const g=o.delete(a);return c&&_t(o,"delete",a,void 0),g},clear(){const a=we(this),o=a.size!==0,i=a.clear();return o&&_t(a,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(a=>{s[a]=Ia(a,e,t)}),s}function Is(e,t){const s=Ba(e,t);return(l,a,o)=>a==="__v_isReactive"?!e:a==="__v_isReadonly"?e:a==="__v_raw"?l:Reflect.get(ke(s,a)&&a in l?s:l,a,o)}const Na={get:Is(!1,!1)},ja={get:Is(!1,!0)},Ha={get:Is(!0,!1)},Ua={get:Is(!0,!0)},Ll=new WeakMap,Ol=new WeakMap,Fl=new WeakMap,Dl=new WeakMap;function qa(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ka(e){return e.__v_skip||!Object.isExtensible(e)?0:qa(pa(e))}function Jt(e){return wt(e)?e:Bs(e,!1,La,Na,Ll)}function Va(e){return Bs(e,!1,Fa,ja,Ol)}function An(e){return Bs(e,!0,Oa,Ha,Fl)}function p1(e){return Bs(e,!0,Da,Ua,Dl)}function Bs(e,t,s,l,a){if(!Se(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Ka(e);if(o===0)return e;const i=a.get(e);if(i)return i;const r=new Proxy(e,o===2?l:s);return a.set(e,r),r}function jt(e){return wt(e)?jt(e.__v_raw):!!(e&&e.__v_isReactive)}function wt(e){return!!(e&&e.__v_isReadonly)}function nt(e){return!!(e&&e.__v_isShallow)}function Mn(e){return e?!!e.__v_raw:!1}function we(e){const t=e&&e.__v_raw;return t?we(t):e}function za(e){return!ke(e,"__v_skip")&&Object.isExtensible(e)&&pl(e,"__v_skip",!0),e}const rt=e=>Se(e)?Jt(e):e,Qt=e=>Se(e)?An(e):e;function je(e){return e?e.__v_isRef===!0:!1}function J(e){return Wa(e,!1)}function Wa(e,t){return je(e)?e:new Ja(e,t)}class Ja{constructor(t,s){this.dep=new kn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:we(t),this._value=s?t:rt(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,l=this.__v_isShallow||nt(t)||wt(t);t=l?t:we(t),Pt(t,s)&&(this._rawValue=t,this._value=l?t:rt(t),this.dep.trigger())}}function k(e){return je(e)?e.value:e}const Qa={get:(e,t,s)=>t==="__v_raw"?e:k(Reflect.get(e,t,s)),set:(e,t,s,l)=>{const a=e[t];return je(a)&&!je(s)?(a.value=s,!0):Reflect.set(e,t,s,l)}};function Il(e){return jt(e)?e:new Proxy(e,Qa)}class Ga{constructor(t,s,l){this.fn=t,this.setter=s,this._value=void 0,this.dep=new kn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=gs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&Pe!==this)return xl(this,!0),!0}get value(){const t=this.dep.track();return kl(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ya(e,t,s=!1){let l,a;return ve(e)?l=e:(l=e.get,a=e.set),new Ga(l,a,s)}const Ns={},js=new WeakMap;let Ht;function Xa(e,t=!1,s=Ht){if(s){let l=js.get(s);l||js.set(s,l=[]),l.push(e)}}function Za(e,t,s=Ee){const{immediate:l,deep:a,once:o,scheduler:i,augmentJob:r,call:c}=s,g=$=>a?$:nt($)||a===!1||a===0?Mt($,1):Mt($);let v,m,p,x,w=!1,_=!1;if(je(e)?(m=()=>e.value,w=nt(e)):jt(e)?(m=()=>g(e),w=!0):pe(e)?(_=!0,w=e.some($=>jt($)||nt($)),m=()=>e.map($=>{if(je($))return $.value;if(jt($))return g($);if(ve($))return c?c($,2):$()})):ve(e)?t?m=c?()=>c(e,2):e:m=()=>{if(p){ft();try{p()}finally{ht()}}const $=Ht;Ht=v;try{return c?c(e,3,[x]):e(x)}finally{Ht=$}}:m=dt,t&&a){const $=m,T=a===!0?1/0:a;m=()=>Mt($(),T)}const P=Ca(),R=()=>{v.stop(),P&&P.active&&hn(P.effects,v)};if(o&&t){const $=t;t=(...T)=>{$(...T),R()}}let M=_?new Array(e.length).fill(Ns):Ns;const y=$=>{if(!(!(v.flags&1)||!v.dirty&&!$))if(t){const T=v.run();if(a||w||(_?T.some((Q,V)=>Pt(Q,M[V])):Pt(T,M))){p&&p();const Q=Ht;Ht=v;try{const V=[T,M===Ns?void 0:_&&M[0]===Ns?[]:M,x];M=T,c?c(t,3,V):t(...V)}finally{Ht=Q}}}else v.run()};return r&&r(y),v=new bl(m),v.scheduler=i?()=>i(y,!1):y,x=$=>Xa($,!1,v),p=v.onStop=()=>{const $=js.get(v);if($){if(c)c($,4);else for(const T of $)T();js.delete(v)}},t?l?y(!0):M=v.run():i?i(y.bind(null,!0),!0):v.run(),R.pause=v.pause.bind(v),R.resume=v.resume.bind(v),R.stop=R,R}function Mt(e,t=1/0,s){if(t<=0||!Se(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,je(e))Mt(e.value,t,s);else if(pe(e))for(let l=0;l<e.length;l++)Mt(e[l],t,s);else if(ul(e)||zt(e))e.forEach(l=>{Mt(l,t,s)});else if(hl(e)){for(const l in e)Mt(e[l],t,s);for(const l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&Mt(e[l],t,s)}return e}const bs=[];let Rn=!1;function v1(e,...t){if(Rn)return;Rn=!0,ft();const s=bs.length?bs[bs.length-1].component:null,l=s&&s.appContext.config.warnHandler,a=ei();if(l)Gt(l,s,11,[e+t.map(o=>{var i,r;return(r=(i=o.toString)==null?void 0:i.call(o))!=null?r:JSON.stringify(o)}).join(""),s&&s.proxy,a.map(({vnode:o})=>`at <${Io(s,o.type)}>`).join(`
2
+ `),a]);else{const o=[`[Vue warn]: ${e}`,...t];a.length&&o.push(`
3
+ `,...ti(a)),console.warn(...o)}ht(),Rn=!1}function ei(){let e=bs[bs.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 ti(e){const t=[];return e.forEach((s,l)=>{t.push(...l===0?[]:[`
4
+ `],...si(s))}),t}function si({vnode:e,recurseCount:t}){const s=t>0?`... (${t} recursive calls)`:"",l=e.component?e.component.parent==null:!1,a=` at <${Io(e.component,e.type,l)}`,o=">"+s;return e.props?[a,...ni(e.props),o]:[a+o]}function ni(e){const t=[],s=Object.keys(e);return s.slice(0,3).forEach(l=>{t.push(...Bl(l,e[l]))}),s.length>3&&t.push(" ..."),t}function Bl(e,t,s){return Oe(t)?(t=JSON.stringify(t),s?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?s?t:[`${e}=${t}`]:je(t)?(t=Bl(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 Gt(e,t,s,l){try{return l?e(...l):e()}catch(a){Yt(a,t,s)}}function pt(e,t,s,l){if(ve(e)){const a=Gt(e,t,s,l);return a&&dl(a)&&a.catch(o=>{Yt(o,t,s)}),a}if(pe(e)){const a=[];for(let o=0;o<e.length;o++)a.push(pt(e[o],t,s,l));return a}}function Yt(e,t,s,l=!0){const a=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ee;if(t){let r=t.parent;const c=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,c,g)===!1)return}r=r.parent}if(o){ft(),Gt(o,null,10,[e,c,g]),ht();return}}li(e,s,a,l,i)}function li(e,t,s,l=!0,a=!1){if(a)throw e;console.error(e)}const Ve=[];let vt=-1;const Xt=[];let Rt=null,Zt=0;const Nl=Promise.resolve();let Hs=null;function jl(e){const t=Hs||Nl;return e?t.then(this?e.bind(this):e):t}function oi(e){let t=vt+1,s=Ve.length;for(;t<s;){const l=t+s>>>1,a=Ve[l],o=_s(a);o<e||o===e&&a.flags&2?t=l+1:s=l}return t}function Ln(e){if(!(e.flags&1)){const t=_s(e),s=Ve[Ve.length-1];!s||!(e.flags&2)&&t>=_s(s)?Ve.push(e):Ve.splice(oi(t),0,e),e.flags|=1,Hl()}}function Hl(){Hs||(Hs=Nl.then(Kl))}function On(e){pe(e)?Xt.push(...e):Rt&&e.id===-1?Rt.splice(Zt+1,0,e):e.flags&1||(Xt.push(e),e.flags|=1),Hl()}function Ul(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 ql(e){if(Xt.length){const t=[...new Set(Xt)].sort((s,l)=>_s(s)-_s(l));if(Xt.length=0,Rt){Rt.push(...t);return}for(Rt=t,Zt=0;Zt<Rt.length;Zt++){const s=Rt[Zt];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Rt=null,Zt=0}}const _s=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Kl(e){try{for(vt=0;vt<Ve.length;vt++){const t=Ve[vt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Gt(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,ql(),Hs=null,(Ve.length||Xt.length)&&Kl()}}let ze=null,Vl=null;function Us(e){const t=ze;return ze=e,Vl=e&&e.type.__scopeId||null,t}function es(e,t=ze,s){if(!t||e._n)return e;const l=(...a)=>{l._d&&Gs(-1);const o=Us(t);let i;try{i=e(...a)}finally{Us(o),l._d&&Gs(1)}return i};return l._n=!0,l._c=!0,l._d=!0,l}function Ut(e,t,s,l){const a=e.dirs,o=t&&t.dirs;for(let i=0;i<a.length;i++){const r=a[i];o&&(r.oldValue=o[i].value);let c=r.dir[l];c&&(ft(),pt(c,s,8,[e.el,r,e,t]),ht())}}function ts(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=fr();if(l||ns){let a=ns?ns._context.provides:l?l.parent==null||l.ce?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(a&&e in a)return a[e];if(arguments.length>1)return s&&ve(t)?t.call(l&&l.proxy):t}}const ai=Symbol.for("v-scx"),ii=()=>re(ai);function gt(e,t,s){return zl(e,t,s)}function zl(e,t,s=Ee){const{immediate:l,deep:a,flush:o,once:i}=s,r=Ne({},s),c=t&&l||!t&&o!=="post";let g;if(rs){if(o==="sync"){const x=ii();g=x.__watcherHandles||(x.__watcherHandles=[])}else if(!c){const x=()=>{};return x.stop=dt,x.resume=dt,x.pause=dt,x}}const v=He;r.call=(x,w,_)=>pt(x,v,w,_);let m=!1;o==="post"?r.scheduler=x=>{Je(x,v&&v.suspense)}:o!=="sync"&&(m=!0,r.scheduler=(x,w)=>{w?x():Ln(x)}),r.augmentJob=x=>{t&&(x.flags|=4),m&&(x.flags|=2,v&&(x.id=v.uid,x.i=v))};const p=Za(e,t,r);return rs&&(g?g.push(p):c&&p()),p}function ri(e,t,s){const l=this.proxy,a=Oe(e)?e.includes(".")?Wl(l,e):()=>l[e]:e.bind(l,l);let o;ve(t)?o=t:(o=t.handler,s=t);const i=Cs(this),r=zl(a,o.bind(l),s);return i(),r}function Wl(e,t){const s=t.split(".");return()=>{let l=e;for(let a=0;a<s.length&&l;a++)l=l[s[a]];return l}}const ui=Symbol("_vte"),ci=e=>e.__isTeleport,di=Symbol("_leaveCb");function Fn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fn(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 Fe(e,t){return ve(e)?Ne({name:e.name},t,{setup:e}):e}function Dn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Jl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const qs=new WeakMap;function xs(e,t,s,l,a=!1){if(pe(e)){e.forEach((_,P)=>xs(_,t&&(pe(t)?t[P]:t),s,l,a));return}if(ss(l)&&!a){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&xs(e,t,s,l.component.subTree);return}const o=l.shapeFlag&4?Yn(l.component):l.el,i=a?null:o,{i:r,r:c}=e,g=t&&t.r,v=r.refs===Ee?r.refs={}:r.refs,m=r.setupState,p=we(m),x=m===Ee?rl:_=>Jl(v,_)?!1:ke(p,_),w=(_,P)=>!(P&&Jl(v,P));if(g!=null&&g!==c){if(Ql(t),Oe(g))v[g]=null,x(g)&&(m[g]=null);else if(je(g)){const _=t;w(g,_.k)&&(g.value=null),_.k&&(v[_.k]=null)}}if(ve(c))Gt(c,r,12,[i,v]);else{const _=Oe(c),P=je(c);if(_||P){const R=()=>{if(e.f){const M=_?x(c)?m[c]:v[c]:w()||!e.k?c.value:v[e.k];if(a)pe(M)&&hn(M,o);else if(pe(M))M.includes(o)||M.push(o);else if(_)v[c]=[o],x(c)&&(m[c]=v[c]);else{const y=[o];w(c,e.k)&&(c.value=y),e.k&&(v[e.k]=y)}}else _?(v[c]=i,x(c)&&(m[c]=i)):P&&(w(c,e.k)&&(c.value=i),e.k&&(v[e.k]=i))};if(i){const M=()=>{R(),qs.delete(e)};M.id=-1,qs.set(e,M),Je(M,s)}else Ql(e),R()}}}function Ql(e){const t=qs.get(e);t&&(t.flags|=8,qs.delete(e))}const Gl=e=>e.nodeType===8;Ls().requestIdleCallback,Ls().cancelIdleCallback;function fi(e,t){if(Gl(e)&&e.data==="["){let s=1,l=e.nextSibling;for(;l;){if(l.nodeType===1){if(t(l)===!1)break}else if(Gl(l))if(l.data==="]"){if(--s===0)break}else l.data==="["&&s++;l=l.nextSibling}}else t(e)}const ss=e=>!!e.type.__asyncLoader;function lt(e){ve(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:l,delay:a=200,hydrate:o,timeout:i,suspensible:r=!0,onError:c}=e;let g=null,v,m=0;const p=()=>(m++,g=null,x()),x=()=>{let w;return g||(w=g=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((P,R)=>{c(_,()=>P(p()),()=>R(_),m+1)});throw _}).then(_=>w!==g&&g?g:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),v=_,_)))};return Fe({name:"AsyncComponentWrapper",__asyncLoader:x,__asyncHydrate(w,_,P){let R=!1;(_.bu||(_.bu=[])).push(()=>R=!0);const M=()=>{R||P()},y=o?()=>{const $=o(M,T=>fi(w,T));$&&(_.bum||(_.bum=[])).push($)}:M;v?y():x().then(()=>!_.isUnmounted&&y())},get __asyncResolved(){return v},setup(){const w=He;if(Dn(w),v)return()=>Ks(v,w);const _=y=>{g=null,Yt(y,w,13,!l)};if(r&&w.suspense||rs)return x().then(y=>()=>Ks(y,w)).catch(y=>(_(y),()=>l?me(l,{error:y}):null));const P=J(!1),R=J(),M=J(!!a);return a&&setTimeout(()=>{M.value=!1},a),i!=null&&setTimeout(()=>{if(!P.value&&!R.value){const y=new Error(`Async component timed out after ${i}ms.`);_(y),R.value=y}},i),x().then(()=>{P.value=!0,w.parent&&In(w.parent.vnode)&&w.parent.update()}).catch(y=>{_(y),R.value=y}),()=>{if(P.value&&v)return Ks(v,w);if(R.value&&l)return me(l,{error:R.value});if(s&&!M.value)return Ks(s,w)}}})}function Ks(e,t){const{ref:s,props:l,children:a,ce:o}=t.vnode,i=me(e,l,a);return i.ref=s,i.ce=o,delete t.vnode.ce,i}const In=e=>e.type.__isKeepAlive;function hi(e,t){Yl(e,"a",t)}function pi(e,t){Yl(e,"da",t)}function Yl(e,t,s=He){const l=e.__wdc||(e.__wdc=()=>{let a=s;for(;a;){if(a.isDeactivated)return;a=a.parent}return e()});if(Vs(t,l,s),s){let a=s.parent;for(;a&&a.parent;)In(a.parent.vnode)&&vi(l,t,s,a),a=a.parent}}function vi(e,t,s,l){const a=Vs(t,e,l,!0);Ot(()=>{hn(l[t],a)},s)}function Vs(e,t,s=He,l=!1){if(s){const a=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...i)=>{ft();const r=Cs(s),c=pt(t,s,e,i);return r(),ht(),c});return l?a.unshift(o):a.push(o),o}}const $t=e=>(t,s=He)=>{(!rs||e==="sp")&&Vs(e,(...l)=>t(...l),s)},gi=$t("bm"),Lt=$t("m"),yi=$t("bu"),mi=$t("u"),Xl=$t("bum"),Ot=$t("um"),bi=$t("sp"),_i=$t("rtg"),xi=$t("rtc");function wi(e,t=He){Vs("ec",e,t)}const $i="components",Zl=Symbol.for("v-ndc");function ki(e){return Oe(e)?Si($i,e,!1)||e:e||Zl}function Si(e,t,s=!0,l=!1){const a=ze||He;if(a){const o=a.type;{const r=Do(o,!1);if(r&&(r===t||r===st(t)||r===Rs(st(t))))return o}const i=eo(a[e]||o[e],t)||eo(a.appContext[e],t);return!i&&l?o:i}}function eo(e,t){return e&&(e[t]||e[st(t)]||e[Rs(st(t))])}function ye(e,t,s,l){let a;const o=s,i=pe(e);if(i||Oe(e)){const r=i&&jt(e);let c=!1,g=!1;r&&(c=!nt(e),g=wt(e),e=Os(e)),a=new Array(e.length);for(let v=0,m=e.length;v<m;v++)a[v]=t(c?g?Qt(rt(e[v])):rt(e[v]):e[v],v,void 0,o)}else if(typeof e=="number"){a=new Array(e);for(let r=0;r<e;r++)a[r]=t(r+1,r,void 0,o)}else if(Se(e))if(e[Symbol.iterator])a=Array.from(e,(r,c)=>t(r,c,void 0,o));else{const r=Object.keys(e);a=new Array(r.length);for(let c=0,g=r.length;c<g;c++){const v=r[c];a[c]=t(e[v],v,c,o)}}else a=[];return a}function Ci(e,t,s={},l,a){if(ze.ce||ze.parent&&ss(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 o=e[t];o&&o._c&&(o._d=!1),u();const i=o&&to(o(s)),r=s.key||i&&i.key,c=Xe(U,{key:(r&&!at(r)?r:`_${t}`)+(!i&&l?"_fb":"")},i||[],i&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function to(e){return e.some(t=>as(t)?!(t.type===ut||t.type===U&&!to(t.children)):!0)?e:null}const Bn=e=>e?Oo(e)?Yn(e):Bn(e.parent):null,ws=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=>Bn(e.parent),$root:e=>Bn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>oo(e),$forceUpdate:e=>e.f||(e.f=()=>{Ln(e.update)}),$nextTick:e=>e.n||(e.n=jl.bind(e.proxy)),$watch:e=>ri.bind(e)}),Nn=(e,t)=>e!==Ee&&!e.__isScriptSetup&&ke(e,t),Ti={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:l,data:a,props:o,accessCache:i,type:r,appContext:c}=e;if(t[0]!=="$"){const p=i[t];if(p!==void 0)switch(p){case 1:return l[t];case 2:return a[t];case 4:return s[t];case 3:return o[t]}else{if(Nn(l,t))return i[t]=1,l[t];if(a!==Ee&&ke(a,t))return i[t]=2,a[t];if(ke(o,t))return i[t]=3,o[t];if(s!==Ee&&ke(s,t))return i[t]=4,s[t];jn&&(i[t]=0)}}const g=ws[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=c.config.globalProperties,ke(m,t))return m[t]},set({_:e},t,s){const{data:l,setupState:a,ctx:o}=e;return Nn(a,t)?(a[t]=s,!0):l!==Ee&&ke(l,t)?(l[t]=s,!0):ke(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:l,appContext:a,props:o,type:i}},r){let c;return!!(s[r]||e!==Ee&&r[0]!=="$"&&ke(e,r)||Nn(t,r)||ke(o,r)||ke(l,r)||ke(ws,r)||ke(a.config.globalProperties,r)||(c=i.__cssModules)&&c[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 so(e){return pe(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let jn=!0;function Ei(e){const t=oo(e),s=e.proxy,l=e.ctx;jn=!1,t.beforeCreate&&no(t.beforeCreate,e,"bc");const{data:a,computed:o,methods:i,watch:r,provide:c,inject:g,created:v,beforeMount:m,mounted:p,beforeUpdate:x,updated:w,activated:_,deactivated:P,beforeDestroy:R,beforeUnmount:M,destroyed:y,unmounted:$,render:T,renderTracked:Q,renderTriggered:V,errorCaptured:G,serverPrefetch:L,expose:K,inheritAttrs:se,components:be,directives:Me,filters:Le}=t;if(g&&Pi(g,l,null),i)for(const de in i){const E=i[de];ve(E)&&(l[de]=E.bind(s))}if(a){const de=a.call(s,s);Se(de)&&(e.data=Jt(de))}if(jn=!0,o)for(const de in o){const E=o[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)lo(r[de],l,s,de);if(c){const de=ve(c)?c.call(s):c;Reflect.ownKeys(de).forEach(E=>{ts(E,de[E])})}v&&no(v,e,"c");function ge(de,E){pe(E)?E.forEach(C=>de(C.bind(s))):E&&de(E.bind(s))}if(ge(gi,m),ge(Lt,p),ge(yi,x),ge(mi,w),ge(hi,_),ge(pi,P),ge(wi,G),ge(xi,Q),ge(_i,V),ge(Xl,M),ge(Ot,$),ge(bi,L),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),Me&&(e.directives=Me),L&&Dn(e)}function Pi(e,t,s=dt){pe(e)&&(e=Hn(e));for(const l in e){const a=e[l];let o;Se(a)?"default"in a?o=re(a.from||l,a.default,!0):o=re(a.from||l):o=re(a),je(o)?Object.defineProperty(t,l,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[l]=o}}function no(e,t,s){pt(pe(e)?e.map(l=>l.bind(t.proxy)):e.bind(t.proxy),t,s)}function lo(e,t,s,l){let a=l.includes(".")?Wl(s,l):()=>s[l];if(Oe(e)){const o=t[e];ve(o)&&gt(a,o)}else if(ve(e))gt(a,e.bind(s));else if(Se(e))if(pe(e))e.forEach(o=>lo(o,t,s,l));else{const o=ve(e.handler)?e.handler.bind(s):t[e.handler];ve(o)&&gt(a,o,e)}}function oo(e){const t=e.type,{mixins:s,extends:l}=t,{mixins:a,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,r=o.get(t);let c;return r?c=r:!a.length&&!s&&!l?c=t:(c={},a.length&&a.forEach(g=>zs(c,g,i,!0)),zs(c,t,i)),Se(t)&&o.set(t,c),c}function zs(e,t,s,l=!1){const{mixins:a,extends:o}=t;o&&zs(e,o,s,!0),a&&a.forEach(i=>zs(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:ao,props:io,emits:io,methods:$s,computed:$s,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:$s,directives:$s,watch:Ri,provide:ao,inject:Mi};function ao(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 Mi(e,t){return $s(Hn(e),Hn(t))}function Hn(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 $s(e,t){return e?Ne(Object.create(null),e,t):t}function io(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:Ne(Object.create(null),so(e),so(t??{})):t}function Ri(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 ro(){return{app:null,config:{isNativeTag:rl,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 Li=0;function Oi(e,t){return function(l,a=null){ve(l)||(l=Ne({},l)),a!=null&&!Se(a)&&(a=null);const o=ro(),i=new WeakSet,r=[];let c=!1;const g=o.app={_uid:Li++,_component:l,_props:a,_container:null,_context:o,_instance:null,version:_r,get config(){return o.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 o.mixins.includes(v)||o.mixins.push(v),g},component(v,m){return m?(o.components[v]=m,g):o.components[v]},directive(v,m){return m?(o.directives[v]=m,g):o.directives[v]},mount(v,m,p){if(!c){const x=g._ceVNode||me(l,a);return x.appContext=o,p===!0?p="svg":p===!1&&(p=void 0),e(x,v,p),c=!0,g._container=v,v.__vue_app__=g,Yn(x.component)}},onUnmount(v){r.push(v)},unmount(){c&&(pt(r,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(v,m){return o.provides[v]=m,g},runWithContext(v){const m=ns;ns=g;try{return v()}finally{ns=m}}};return g}}let ns=null;const Fi=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${st(t)}Modifiers`]||e[`${Et(t)}Modifiers`];function Di(e,t,...s){if(e.isUnmounted)return;const l=e.vnode.props||Ee;let a=s;const o=t.startsWith("update:"),i=o&&Fi(l,t.slice(7));i&&(i.trim&&(a=s.map(v=>Oe(v)?v.trim():v)),i.number&&(a=s.map(ya)));let r,c=l[r=vn(t)]||l[r=vn(st(t))];!c&&o&&(c=l[r=vn(Et(t))]),c&&pt(c,e,6,a);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,a)}}const Ii=new WeakMap;function uo(e,t,s=!1){const l=s?Ii:t.emitsCache,a=l.get(e);if(a!==void 0)return a;const o=e.emits;let i={},r=!1;if(!ve(e)){const c=g=>{const v=uo(g,t,!0);v&&(r=!0,Ne(i,v))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!r?(Se(e)&&l.set(e,null),null):(pe(o)?o.forEach(c=>i[c]=null):Ne(i,o),Se(e)&&l.set(e,i),i)}function Ws(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 g1(){}function co(e){const{type:t,vnode:s,proxy:l,withProxy:a,propsOptions:[o],slots:i,attrs:r,emit:c,render:g,renderCache:v,props:m,data:p,setupState:x,ctx:w,inheritAttrs:_}=e,P=Us(e);let R,M;try{if(s.shapeFlag&4){const $=a||l,T=$;R=ct(g.call(T,$,v,m,x,p,w)),M=r}else{const $=t;R=ct($.length>1?$(m,{attrs:r,slots:i,emit:c}):$(m,null)),M=t.props?r:Ni(r)}}catch($){Ss.length=0,Yt($,e,1),R=me(ut)}let y=R;if(M&&_!==!1){const $=Object.keys(M),{shapeFlag:T}=y;$.length&&T&7&&(o&&$.some(fn)&&(M=ji(M,o)),y=is(y,M,!1,!0))}return s.dirs&&(y=is(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(s.dirs):s.dirs),s.transition&&Fn(y,s.transition),R=y,Us(P),R}function Bi(e,t=!0){let s;for(let l=0;l<e.length;l++){const a=e[l];if(as(a)){if(a.type!==ut||a.children==="v-if"){if(s)return;s=a}}else return}return s}const Ni=e=>{let t;for(const s in e)(s==="class"||s==="style"||As(s))&&((t||(t={}))[s]=e[s]);return t},ji=(e,t)=>{const s={};for(const l in e)(!fn(l)||!(l.slice(9)in t))&&(s[l]=e[l]);return s};function Hi(e,t,s){const{props:l,children:a,component:o}=e,{props:i,children:r,patchFlag:c}=t,g=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return l?fo(l,i,g):!!i;if(c&8){const v=t.dynamicProps;for(let m=0;m<v.length;m++){const p=v[m];if(ho(i,l,p)&&!Ws(g,p))return!0}}}else return(a||r)&&(!r||!r.$stable)?!0:l===i?!1:l?i?fo(l,i,g):!0:!!i;return!1}function fo(e,t,s){const l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let a=0;a<l.length;a++){const o=l[a];if(ho(t,e,o)&&!Ws(s,o))return!0}return!1}function ho(e,t,s){const l=e[s],a=t[s];return s==="style"&&Se(l)&&Se(a)?!yn(l,a):l!==a}function Un({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 po={},vo=()=>Object.create(po),go=e=>Object.getPrototypeOf(e)===po;function Ui(e,t,s,l=!1){const a={},o=vo();e.propsDefaults=Object.create(null),yo(e,t,a,o);for(const i in e.propsOptions[0])i in a||(a[i]=void 0);s?e.props=l?a:Va(a):e.type.props?e.props=a:e.props=o,e.attrs=o}function qi(e,t,s,l){const{props:a,attrs:o,vnode:{patchFlag:i}}=e,r=we(a),[c]=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(Ws(e.emitsOptions,p))continue;const x=t[p];if(c)if(ke(o,p))x!==o[p]&&(o[p]=x,g=!0);else{const w=st(p);a[w]=qn(c,r,w,x,e,!1)}else x!==o[p]&&(o[p]=x,g=!0)}}}else{yo(e,t,a,o)&&(g=!0);let v;for(const m in r)(!t||!ke(t,m)&&((v=Et(m))===m||!ke(t,v)))&&(c?s&&(s[m]!==void 0||s[v]!==void 0)&&(a[m]=qn(c,r,m,void 0,e,!0)):delete a[m]);if(o!==r)for(const m in o)(!t||!ke(t,m))&&(delete o[m],g=!0)}g&&_t(e.attrs,"set","")}function yo(e,t,s,l){const[a,o]=e.propsOptions;let i=!1,r;if(t)for(let c in t){if(hs(c))continue;const g=t[c];let v;a&&ke(a,v=st(c))?!o||!o.includes(v)?s[v]=g:(r||(r={}))[v]=g:Ws(e.emitsOptions,c)||(!(c in l)||g!==l[c])&&(l[c]=g,i=!0)}if(o){const c=we(s),g=r||Ee;for(let v=0;v<o.length;v++){const m=o[v];s[m]=qn(a,c,m,g[m],e,!ke(g,m))}}return i}function qn(e,t,s,l,a,o){const i=e[s];if(i!=null){const r=ke(i,"default");if(r&&l===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&ve(c)){const{propsDefaults:g}=a;if(s in g)l=g[s];else{const v=Cs(a);l=g[s]=c.call(null,t),v()}}else l=c;a.ce&&a.ce._setProp(s,l)}i[0]&&(o&&!r?l=!1:i[1]&&(l===""||l===Et(s))&&(l=!0))}return l}const Ki=new WeakMap;function mo(e,t,s=!1){const l=s?Ki:t.propsCache,a=l.get(e);if(a)return a;const o=e.props,i={},r=[];let c=!1;if(!ve(e)){const v=m=>{c=!0;const[p,x]=mo(m,t,!0);Ne(i,p),x&&r.push(...x)};!s&&t.mixins.length&&t.mixins.forEach(v),e.extends&&v(e.extends),e.mixins&&e.mixins.forEach(v)}if(!o&&!c)return Se(e)&&l.set(e,Vt),Vt;if(pe(o))for(let v=0;v<o.length;v++){const m=st(o[v]);bo(m)&&(i[m]=Ee)}else if(o)for(const v in o){const m=st(v);if(bo(m)){const p=o[v],x=i[m]=pe(p)||ve(p)?{type:p}:Ne({},p),w=x.type;let _=!1,P=!0;if(pe(w))for(let R=0;R<w.length;++R){const M=w[R],y=ve(M)&&M.name;if(y==="Boolean"){_=!0;break}else y==="String"&&(P=!1)}else _=ve(w)&&w.name==="Boolean";x[0]=_,x[1]=P,(_||ke(x,"default"))&&r.push(m)}}const g=[i,r];return Se(e)&&l.set(e,g),g}function bo(e){return e[0]!=="$"&&!hs(e)}const Kn=e=>e==="_"||e==="_ctx"||e==="$stable",Vn=e=>pe(e)?e.map(ct):[ct(e)],Vi=(e,t,s)=>{if(t._n)return t;const l=es((...a)=>Vn(t(...a)),s);return l._c=!1,l},_o=(e,t,s)=>{const l=e._ctx;for(const a in e){if(Kn(a))continue;const o=e[a];if(ve(o))t[a]=Vi(a,o,l);else if(o!=null){const i=Vn(o);t[a]=()=>i}}},xo=(e,t)=>{const s=Vn(t);e.slots.default=()=>s},wo=(e,t,s)=>{for(const l in t)(s||!Kn(l))&&(e[l]=t[l])},zi=(e,t,s)=>{const l=e.slots=vo();if(e.vnode.shapeFlag&32){const a=t._;a?(wo(l,t,s),s&&pl(l,"_",a,!0)):_o(t,l)}else t&&xo(e,t)},Wi=(e,t,s)=>{const{vnode:l,slots:a}=e;let o=!0,i=Ee;if(l.shapeFlag&32){const r=t._;r?s&&r===1?o=!1:wo(a,t,s):(o=!t.$stable,_o(t,a)),i=t}else t&&(xo(e,t),i={default:1});if(o)for(const r in a)!Kn(r)&&i[r]==null&&delete a[r]},Je=nr;function Ji(e){return Qi(e)}function Qi(e,t){const s=Ls();s.__VUE__=!0;const{insert:l,remove:a,patchProp:o,createElement:i,createText:r,createComment:c,setText:g,setElementText:v,parentNode:m,nextSibling:p,setScopeId:x=dt,insertStaticContent:w}=e,_=(h,b,A,j=null,D=null,I=null,Y=void 0,W=null,B=!!b.dynamicChildren)=>{if(h===b)return;h&&!Ft(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 Js:P(h,b,A,j);break;case ut:R(h,b,A,j);break;case Qs:h==null&&M(b,A,j,Y);break;case U:be(h,b,A,j,D,I,Y,W,B);break;default:ee&1?T(h,b,A,j,D,I,Y,W,B):ee&6?Me(h,b,A,j,D,I,Y,W,B):(ee&64||ee&128)&&N.process(h,b,A,j,D,I,Y,W,B,Tt)}ce!=null&&D?xs(ce,h&&h.ref,I,b||h,!b):ce==null&&h&&h.ref!=null&&xs(h.ref,null,I,h,!0)},P=(h,b,A,j)=>{if(h==null)l(b.el=r(b.children),A,j);else{const D=b.el=h.el;b.children!==h.children&&g(D,b.children)}},R=(h,b,A,j)=>{h==null?l(b.el=c(b.children||""),A,j):b.el=h.el},M=(h,b,A,j)=>{[h.el,h.anchor]=w(h.children,b,A,j,h.el,h.anchor)},y=({el:h,anchor:b},A,j)=>{let D;for(;h&&h!==b;)D=p(h),l(h,A,j),h=D;l(b,A,j)},$=({el:h,anchor:b})=>{let A;for(;h&&h!==b;)A=p(h),a(h),h=A;a(b)},T=(h,b,A,j,D,I,Y,W,B)=>{if(b.type==="svg"?Y="svg":b.type==="math"&&(Y="mathml"),h==null)Q(b,A,j,D,I,Y,W,B);else{const N=h.el&&h.el._isVueCE?h.el:null;try{N&&N._beginPatch(),L(h,b,D,I,Y,W,B)}finally{N&&N._endPatch()}}},Q=(h,b,A,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,zn(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"&&!hs(Ce)&&o(B,Ce,null,ce[Ce],I,j);"value"in ce&&o(B,"value",null,ce.value,I),(N=ce.onVnodeBeforeMount)&&yt(N,j,h)}he&&Ut(h,null,j,"beforeMount");const xe=Gi(D,ae);xe&&ae.beforeEnter(B),l(B,b,A),((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,A,j,D)=>{if(A&&x(h,A),j)for(let I=0;I<j.length;I++)x(h,j[I]);if(D){let I=D.subTree;if(b===I||To(I.type)&&(I.ssContent===b||I.ssFallback===b)){const Y=D.vnode;V(h,Y,Y.scopeId,Y.slotScopeIds,D.parent)}}},G=(h,b,A,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]);_(null,ce,b,A,j,D,I,Y,W)}},L=(h,b,A,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(A&&qt(A,!1),(he=ae.onVnodeBeforeUpdate)&&yt(he,A,b,h),ce&&Ut(b,h,A,"beforeUpdate"),A&&qt(A,!0),(ee.innerHTML&&ae.innerHTML==null||ee.textContent&&ae.textContent==null)&&v(W,""),N?K(h.dynamicChildren,N,W,A,j,zn(b,D),I):Y||E(h,b,W,null,A,j,zn(b,D),I,!1),B>0){if(B&16)se(W,ee,ae,A,D);else if(B&2&&ee.class!==ae.class&&o(W,"class",null,ae.class,D),B&4&&o(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")&&o(W,$e,qe,Be,D,A)}}B&1&&h.children!==b.children&&v(W,b.children)}else!Y&&N==null&&se(W,ee,ae,A,D);((he=ae.onVnodeUpdated)||ce)&&Je(()=>{he&&yt(he,A,b,h),ce&&Ut(b,h,A,"updated")},j)},K=(h,b,A,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||!Ft(B,N)||B.shapeFlag&198)?m(B.el):A;_(B,N,ce,null,j,D,I,Y,!0)}},se=(h,b,A,j,D)=>{if(b!==A){if(b!==Ee)for(const I in b)!hs(I)&&!(I in A)&&o(h,I,b[I],null,D,j);for(const I in A){if(hs(I))continue;const Y=A[I],W=b[I];Y!==W&&I!=="value"&&o(h,I,W,Y,D,j)}"value"in A&&o(h,"value",b.value,A.value,D)}},be=(h,b,A,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,A,j),l(ce,A,j),G(b.children||[],A,ce,D,I,Y,W,B)):ee>0&&ee&64&&ae&&h.dynamicChildren&&h.dynamicChildren.length===ae.length?(K(h.dynamicChildren,ae,A,D,I,Y,W),(b.key!=null||D&&b===D.subTree)&&$o(h,b,!0)):E(h,b,A,ce,D,I,Y,W,B)},Me=(h,b,A,j,D,I,Y,W,B)=>{b.slotScopeIds=W,h==null?b.shapeFlag&512?D.ctx.activate(b,A,j,Y,B):Le(b,A,j,D,I,Y,B):Re(h,b,B)},Le=(h,b,A,j,D,I,Y)=>{const W=h.component=dr(h,j,D);if(In(h)&&(W.ctx.renderer=Tt),hr(W,!1,Y),W.asyncDep){if(D&&D.registerDep(W,ge,Y),!h.el){const B=W.subTree=me(ut);R(null,B,b,A),h.placeholder=B.el}}else ge(W,h,b,A,D,I,Y)},Re=(h,b,A)=>{const j=b.component=h.component;if(Hi(h,b,A))if(j.asyncDep&&!j.asyncResolved){de(j,b,A);return}else j.next=b,j.update();else b.el=h.el,j.vnode=b},ge=(h,b,A,j,D,I,Y)=>{const W=()=>{if(h.isMounted){let{next:ee,bu:ae,u:he,parent:xe,vnode:Ce}=h;{const Ye=ko(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&&gn(ae),(qe=ee.props&&ee.props.onVnodeBeforeUpdate)&&yt(qe,xe,ee,Ce),qt(h,!0);const Be=co(h),et=h.subTree;h.subTree=Be,_(et,Be,m(et.el),oe(et),h,D,I),ee.el=Be.el,$e===null&&Un(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=ss(b);qt(h,!1),xe&&gn(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=co(h);_(null,Ye,A,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&&ss($e.vnode)&&$e.vnode.shapeFlag&256)&&h.a&&Je(h.a,D),h.isMounted=!0,b=A=j=null}};h.scope.on();const B=h.effect=new bl(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=()=>Ln(ce),qt(h,!0),N()},de=(h,b,A)=>{b.component=h;const j=h.vnode.props;h.vnode=b,h.next=null,qi(h,b.props,j,A),Wi(h,b.children,A),ft(),Ul(h),ht()},E=(h,b,A,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,A,j,D,I,Y,W,B);return}else if(ae&256){C(N,ee,A,j,D,I,Y,W,B);return}}he&8?(ce&16&&z(N,D,I),ee!==N&&v(A,ee)):ce&16?he&16?S(N,ee,A,j,D,I,Y,W,B):z(N,D,I,!0):(ce&8&&v(A,""),he&16&&G(ee,A,j,D,I,Y,W,B))},C=(h,b,A,j,D,I,Y,W,B)=>{h=h||Vt,b=b||Vt;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]);_(h[ae],he,A,null,D,I,Y,W,B)}N>ce?z(h,D,I,!0,!1,ee):G(b,A,j,D,I,Y,W,B,ee)},S=(h,b,A,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(Ft(he,xe))_(he,xe,A,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(Ft(he,xe))_(he,xe,A,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;)_(null,b[N]=B?kt(b[N]):ct(b[N]),A,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&&Ft(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,_(le,b[fe],A,null,D,I,Y,W,B),qe++)}const O=et?Yi(Z):Vt;for($e=O.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||Co(ot):j;Z[N]===0?_(null,fe,A,tt,D,I,Y,W,B):et&&($e<0||N!==O[$e]?H(fe,A,tt,2):$e--)}}},H=(h,b,A,j,D=null)=>{const{el:I,type:Y,transition:W,children:B,shapeFlag:N}=h;if(N&6){H(h.component.subTree,b,A,j);return}if(N&128){h.suspense.move(b,A,j);return}if(N&64){Y.move(h,b,A,Tt);return}if(Y===U){l(I,b,A);for(let ee=0;ee<B.length;ee++)H(B[ee],b,A,j);l(h.anchor,b,A);return}if(Y===Qs){y(h,b,A);return}if(j!==2&&N&1&&W)if(j===0)W.beforeEnter(I),l(I,b,A),Je(()=>W.enter(I),D);else{const{leave:ee,delayLeave:ae,afterLeave:he}=W,xe=()=>{h.ctx.isUnmounted?a(I):l(I,b,A)},Ce=()=>{I._isLeaving&&I[di](!0),ee(I,()=>{xe(),he&&he()})};ae?ae(I,xe,Ce):Ce()}else l(I,b,A)},ne=(h,b,A,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(),xs(W,null,A,h,!0),ht()),he!=null&&(b.renderCache[he]=void 0),ce&256){b.ctx.deactivate(h);return}const xe=ce&1&&ae,Ce=!ss(h);let $e;if(Ce&&($e=Y&&Y.onVnodeBeforeUnmount)&&yt($e,b,h),ce&6)ie(h.component,A,j);else{if(ce&128){h.suspense.unmount(A,j);return}xe&&Ut(h,null,b,"beforeUnmount"),ce&64?h.type.remove(h,b,A,Tt,j):N&&!N.hasOnce&&(I!==U||ee>0&&ee&64)?z(N,b,A,!1,!0):(I===U&&ee&384||!D&&ce&16)&&z(B,b,A),j&&Te(h)}(Ce&&($e=Y&&Y.onVnodeUnmounted)||xe)&&Je(()=>{$e&&yt($e,b,h),xe&&Ut(h,null,b,"unmounted")},A)},Te=h=>{const{type:b,el:A,anchor:j,transition:D}=h;if(b===U){X(A,j);return}if(b===Qs){$(h);return}const I=()=>{a(A),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(h.shapeFlag&1&&D&&!D.persisted){const{leave:Y,delayLeave:W}=D,B=()=>Y(A,I);W?W(h.el,I,B):B()}else I()},X=(h,b)=>{let A;for(;h!==b;)A=p(h),a(h),h=A;a(b)},ie=(h,b,A)=>{const{bum:j,scope:D,job:I,subTree:Y,um:W,m:B,a:N}=h;So(B),So(N),j&&gn(j),D.stop(),I&&(I.flags|=8,ne(Y,h,b,A)),W&&Je(W,b),Je(()=>{h.isUnmounted=!0},b)},z=(h,b,A,j=!1,D=!1,I=0)=>{for(let Y=I;Y<h.length;Y++)ne(h[Y],b,A,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),A=b&&b[ui];return A?p(A):b};let Ie=!1;const un=(h,b,A)=>{let j;h==null?b._vnode&&(ne(b._vnode,null,null,!0),j=b._vnode.component):_(b._vnode||null,h,b,null,null,null,A),b._vnode=h,Ie||(Ie=!0,Ul(j),ql(),Ie=!1)},Tt={p:_,um:ne,m:H,r:Te,mt:Le,mc:G,pc:E,pbc:K,n:oe,o:e};return{render:un,hydrate:void 0,createApp:Oi(un)}}function zn({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 Gi(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function $o(e,t,s=!1){const l=e.children,a=t.children;if(pe(l)&&pe(a))for(let o=0;o<l.length;o++){const i=l[o];let r=a[o];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=a[o]=kt(a[o]),r.el=i.el),!s&&r.patchFlag!==-2&&$o(i,r)),r.type===Js&&(r.patchFlag===-1&&(r=a[o]=kt(r)),r.el=i.el),r.type===ut&&!r.el&&(r.el=i.el)}}function Yi(e){const t=e.slice(),s=[0];let l,a,o,i,r;const c=e.length;for(l=0;l<c;l++){const g=e[l];if(g!==0){if(a=s[s.length-1],e[a]<g){t[l]=a,s.push(l);continue}for(o=0,i=s.length-1;o<i;)r=o+i>>1,e[s[r]]<g?o=r+1:i=r;g<e[s[o]]&&(o>0&&(t[l]=s[o-1]),s[o]=l)}}for(o=s.length,i=s[o-1];o-- >0;)s[o]=i,i=t[i];return s}function ko(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ko(t)}function So(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Co(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Co(t.subTree):null}const To=e=>e.__isSuspense;let Wn=0;const Xi={name:"Suspense",__isSuspense:!0,process(e,t,s,l,a,o,i,r,c,g){if(e==null)Zi(t,s,l,a,o,i,r,c,g);else{if(o&&o.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}er(e,t,s,l,a,i,r,c,g)}},hydrate:tr,normalize:sr};function ks(e,t){const s=e.props&&e.props[t];ve(s)&&s()}function Zi(e,t,s,l,a,o,i,r,c){const{p:g,o:{createElement:v}}=c,m=v("div"),p=e.suspense=Eo(e,a,l,t,m,s,o,i,r,c);g(null,p.pendingBranch=e.ssContent,m,null,l,p,o,i),p.deps>0?(ks(e,"onPending"),ks(e,"onFallback"),g(null,e.ssFallback,t,s,l,null,o,i),ls(p,e.ssFallback)):p.resolve(!1,!0)}function er(e,t,s,l,a,o,i,r,{p:c,um:g,o:{createElement:v}}){const m=t.suspense=e.suspense;m.vnode=t,t.el=e.el;const p=t.ssContent,x=t.ssFallback,{activeBranch:w,pendingBranch:_,isInFallback:P,isHydrating:R}=m;if(_)m.pendingBranch=p,Ft(_,p)?(c(_,p,m.hiddenContainer,null,a,m,o,i,r),m.deps<=0?m.resolve():P&&(R||(c(w,x,s,l,a,null,o,i,r),ls(m,x)))):(m.pendingId=Wn++,R?(m.isHydrating=!1,m.activeBranch=_):g(_,a,m),m.deps=0,m.effects.length=0,m.hiddenContainer=v("div"),P?(c(null,p,m.hiddenContainer,null,a,m,o,i,r),m.deps<=0?m.resolve():(c(w,x,s,l,a,null,o,i,r),ls(m,x))):w&&Ft(w,p)?(c(w,p,s,l,a,m,o,i,r),m.resolve(!0)):(c(null,p,m.hiddenContainer,null,a,m,o,i,r),m.deps<=0&&m.resolve()));else if(w&&Ft(w,p))c(w,p,s,l,a,m,o,i,r),ls(m,p);else if(ks(t,"onPending"),m.pendingBranch=p,p.shapeFlag&512?m.pendingId=p.component.suspenseId:m.pendingId=Wn++,c(null,p,m.hiddenContainer,null,a,m,o,i,r),m.deps<=0)m.resolve();else{const{timeout:M,pendingId:y}=m;M>0?setTimeout(()=>{m.pendingId===y&&m.fallback(x)},M):M===0&&m.fallback(x)}}function Eo(e,t,s,l,a,o,i,r,c,g,v=!1){const{p:m,m:p,um:x,n:w,o:{parentNode:_,remove:P}}=g;let R;const M=lr(e);M&&t&&t.pendingBranch&&(R=t.pendingId,t.deps++);const y=e.props?ma(e.props.timeout):void 0,$=o,T={vnode:e,parent:t,parentComponent:s,namespace:i,container:l,hiddenContainer:a,deps:0,pendingId:Wn++,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:L,pendingBranch:K,pendingId:se,effects:be,parentComponent:Me,container:Le,isInFallback:Re}=T;let ge=!1;T.isHydrating?T.isHydrating=!1:Q||(ge=L&&K.transition&&K.transition.mode==="out-in",ge&&(L.transition.afterLeave=()=>{se===T.pendingId&&(p(K,Le,o===$?w(L):o,0),On(be),Re&&G.ssFallback&&(G.ssFallback.el=null))}),L&&(_(L.el)===Le&&(o=w(L)),x(L,Me,T,!0),!ge&&Re&&G.ssFallback&&Je(()=>G.ssFallback.el=null,T)),ge||p(K,Le,o,0)),ls(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=[],M&&t&&t.pendingBranch&&R===t.pendingId&&(t.deps--,t.deps===0&&!V&&t.resolve()),ks(G,"onResolve")},fallback(Q){if(!T.pendingBranch)return;const{vnode:V,activeBranch:G,parentComponent:L,container:K,namespace:se}=T;ks(V,"onFallback");const be=w(G),Me=()=>{T.isInFallback&&(m(null,Q,K,be,L,null,se,r,c),ls(T,Q))},Le=Q.transition&&Q.transition.mode==="out-in";Le&&(G.transition.afterLeave=Me),T.isInFallback=!0,x(G,L,null,!0),Le||Me()},move(Q,V,G){T.activeBranch&&p(T.activeBranch,Q,V,G),T.container=Q},next(){return T.activeBranch&&w(T.activeBranch)},registerDep(Q,V,G){const L=!!T.pendingBranch;L&&T.deps++;const K=Q.vnode.el;Q.asyncDep.catch(se=>{Yt(se,Q,0)}).then(se=>{if(Q.isUnmounted||T.isUnmounted||T.pendingId!==Q.suspenseId)return;Q.asyncResolved=!0;const{vnode:be}=Q;Gn(Q,se),K&&(be.el=K);const Me=!K&&Q.subTree.el;V(Q,be,_(K||Q.subTree.el),K?null:w(Q.subTree),T,i,G),Me&&(be.placeholder=null,P(Me)),Un(Q,be.el),L&&--T.deps===0&&T.resolve()})},unmount(Q,V){T.isUnmounted=!0,T.activeBranch&&x(T.activeBranch,s,Q,V),T.pendingBranch&&x(T.pendingBranch,s,Q,V)}};return T}function tr(e,t,s,l,a,o,i,r,c){const g=t.suspense=Eo(t,l,s,e.parentNode,document.createElement("div"),null,a,o,i,r,!0),v=c(e,g.pendingBranch=t.ssContent,s,g,o,i);return g.deps===0&&g.resolve(!1,!0),v}function sr(e){const{shapeFlag:t,children:s}=e,l=t&32;e.ssContent=Po(l?s.default:s),e.ssFallback=l?Po(s.fallback):me(ut)}function Po(e){let t;if(ve(e)){const s=os&&e._c;s&&(e._d=!1,u()),e=e(),s&&(e._d=!0,t=Ge,Ao())}return pe(e)&&(e=Bi(e)),e=ct(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function nr(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):On(e)}function ls(e,t){e.activeBranch=t;const{vnode:s,parentComponent:l}=e;let a=t.el;for(;!a&&t.component;)t=t.component.subTree,a=t.el;s.el=a,l&&l.subTree===s&&(l.vnode.el=a,Un(l,a))}function lr(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const U=Symbol.for("v-fgt"),Js=Symbol.for("v-txt"),ut=Symbol.for("v-cmt"),Qs=Symbol.for("v-stc"),Ss=[];let Ge=null;function u(e=!1){Ss.push(Ge=e?null:[])}function Ao(){Ss.pop(),Ge=Ss[Ss.length-1]||null}let os=1;function Gs(e,t=!1){os+=e,e<0&&Ge&&t&&(Ge.hasOnce=!0)}function Mo(e){return e.dynamicChildren=os>0?Ge||Vt:null,Ao(),os>0&&Ge&&Ge.push(e),e}function d(e,t,s,l,a,o){return Mo(n(e,t,s,l,a,o,!0))}function Xe(e,t,s,l,a){return Mo(me(e,t,s,l,a,!0))}function as(e){return e?e.__v_isVNode===!0:!1}function Ft(e,t){return e.type===t.type&&e.key===t.key}const Ro=({key:e})=>e??null,Ys=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Oe(e)||je(e)||ve(e)?{i:ze,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,l=0,a=null,o=e===U?0:1,i=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ro(t),ref:t&&Ys(t),scopeId:Vl,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:o,patchFlag:l,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:ze};return r?(Jn(c,s),o&128&&e.normalize(c)):s&&(c.shapeFlag|=Oe(s)?8:16),os>0&&!i&&Ge&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Ge.push(c),c}const me=or;function or(e,t=null,s=null,l=0,a=null,o=!1){if((!e||e===Zl)&&(e=ut),as(e)){const r=is(e,t,!0);return s&&Jn(r,s),os>0&&!o&&Ge&&(r.shapeFlag&6?Ge[Ge.indexOf(e)]=r:Ge.push(r)),r.patchFlag=-2,r}if(br(e)&&(e=e.__vccOpts),t){t=ar(t);let{class:r,style:c}=t;r&&!Oe(r)&&(t.class=F(r)),Se(c)&&(Mn(c)&&!pe(c)&&(c=Ne({},c)),t.style=Ke(c))}const i=Oe(e)?1:To(e)?128:ci(e)?64:Se(e)?4:ve(e)?2:0;return n(e,t,s,l,a,i,o,!0)}function ar(e){return e?Mn(e)||go(e)?Ne({},e):e:null}function is(e,t,s=!1,l=!1){const{props:a,ref:o,patchFlag:i,children:r,transition:c}=e,g=t?rr(a||{},t):a,v={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Ro(g),ref:t&&t.ref?s&&o?pe(o)?o.concat(Ys(t)):[o,Ys(t)]:Ys(t):o,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:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&is(e.ssContent),ssFallback:e.ssFallback&&is(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&l&&Fn(v,c.clone(v)),v}function _e(e=" ",t=0){return me(Js,null,e,t)}function ir(e,t){const s=me(Qs,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()):as(e)?kt(e):me(Js,null,String(e))}function kt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:is(e)}function Jn(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 a=t.default;a&&(a._c&&(a._d=!1),Jn(e,a()),a._c&&(a._d=!0));return}else{s=32;const a=t._;!a&&!go(t)?t._ctx=ze:a===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 rr(...e){const t={};for(let s=0;s<e.length;s++){const l=e[s];for(const a in l)if(a==="class")t.class!==l.class&&(t.class=F([t.class,l.class]));else if(a==="style")t.style=Ke([t.style,l.style]);else if(As(a)){const o=t[a],i=l[a];i&&o!==i&&!(pe(o)&&o.includes(i))&&(t[a]=o?[].concat(o,i):i)}else a!==""&&(t[a]=l[a])}return t}function yt(e,t,s,l=null){pt(e,t,7,[s,l])}const ur=ro();let cr=0;function dr(e,t,s){const l=e.type,a=(t?t.appContext:e.appContext)||ur,o={uid:cr++,vnode:e,type:l,parent:t,appContext:a,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Sa(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(a.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:mo(l,a),emitsOptions:uo(l,a),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 o.ctx={_:o},o.root=t?t.root:o,o.emit=Di.bind(null,o),e.ce&&e.ce(o),o}let He=null;const fr=()=>He||ze;let Xs,Qn;{const e=Ls(),t=(s,l)=>{let a;return(a=e[s])||(a=e[s]=[]),a.push(l),o=>{a.length>1?a.forEach(i=>i(o)):a[0](o)}};Xs=t("__VUE_INSTANCE_SETTERS__",s=>He=s),Qn=t("__VUE_SSR_SETTERS__",s=>rs=s)}const Cs=e=>{const t=He;return Xs(e),e.scope.on(),()=>{e.scope.off(),Xs(t)}},Lo=()=>{He&&He.scope.off(),Xs(null)};function Oo(e){return e.vnode.shapeFlag&4}let rs=!1;function hr(e,t=!1,s=!1){t&&Qn(t);const{props:l,children:a}=e.vnode,o=Oo(e);Ui(e,l,o,t),zi(e,a,s||t);const i=o?pr(e,t):void 0;return t&&Qn(!1),i}function pr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ti);const{setup:l}=s;if(l){ft();const a=e.setupContext=l.length>1?gr(e):null,o=Cs(e),i=Gt(l,e,0,[e.props,a]),r=dl(i);if(ht(),o(),(r||e.sp)&&!ss(e)&&Dn(e),r){if(i.then(Lo,Lo),t)return i.then(c=>{Gn(e,c)}).catch(c=>{Yt(c,e,0)});e.asyncDep=i}else Gn(e,i)}else Fo(e)}function Gn(e,t,s){ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Se(t)&&(e.setupState=Il(t)),Fo(e)}function Fo(e,t,s){const l=e.type;e.render||(e.render=l.render||dt);{const a=Cs(e);ft();try{Ei(e)}finally{ht(),a()}}}const vr={get(e,t){return Ue(e,"get",""),e[t]}};function gr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,vr),slots:e.slots,emit:e.emit,expose:t}}function Yn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Il(za(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in ws)return ws[s](e)},has(t,s){return s in t||s in ws}})):e.proxy}const yr=/(?:^|[-_])\w/g,mr=e=>e.replace(yr,t=>t.toUpperCase()).replace(/[-_]/g,"");function Do(e,t=!0){return ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Io(e,t,s=!1){let l=Do(t);if(!l&&t.__file){const a=t.__file.match(/([^/\\]+)\.\w+$/);a&&(l=a[1])}if(!l&&e){const a=o=>{for(const i in o)if(o[i]===t)return i};l=a(e.components)||e.parent&&a(e.parent.type.components)||a(e.appContext.components)}return l?mr(l):s?"App":"Anonymous"}function br(e){return ve(e)&&"__vccOpts"in e}const q=(e,t)=>Ya(e,t,rs);function us(e,t,s){try{Gs(-1);const l=arguments.length;return l===2?Se(t)&&!pe(t)?as(t)?me(e,null,[t]):me(e,t):me(e,null,t):(l>3?s=Array.prototype.slice.call(arguments,2):l===3&&as(s)&&(s=[s]),me(e,t,s))}finally{Gs(1)}}const _r="3.5.29";let Xn;const Bo=typeof window<"u"&&window.trustedTypes;if(Bo)try{Xn=Bo.createPolicy("vue",{createHTML:e=>e})}catch{}const No=Xn?e=>Xn.createHTML(e):e=>e,xr="http://www.w3.org/2000/svg",wr="http://www.w3.org/1998/Math/MathML",St=typeof document<"u"?document:null,jo=St&&St.createElement("template"),$r={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 a=t==="svg"?St.createElementNS(xr,e):t==="mathml"?St.createElementNS(wr,e):s?St.createElement(e,{is:s}):St.createElement(e);return e==="select"&&l&&l.multiple!=null&&a.setAttribute("multiple",l.multiple),a},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,a,o){const i=s?s.previousSibling:t.lastChild;if(a&&(a===o||a.nextSibling))for(;t.insertBefore(a.cloneNode(!0),s),!(a===o||!(a=a.nextSibling)););else{jo.innerHTML=No(l==="svg"?`<svg>${e}</svg>`:l==="mathml"?`<math>${e}</math>`:e);const r=jo.content;if(l==="svg"||l==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},kr=Symbol("_vtc");function Sr(e,t,s){const l=e[kr];l&&(t=(t?[t,...l]:[...l]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ho=Symbol("_vod"),Cr=Symbol("_vsh"),Tr=Symbol(""),Er=/(?:^|;)\s*display\s*:/;function Pr(e,t,s){const l=e.style,a=Oe(s);let o=!1;if(s&&!a){if(t)if(Oe(t))for(const i of t.split(";")){const r=i.slice(0,i.indexOf(":")).trim();s[r]==null&&Zs(l,r,"")}else for(const i in t)s[i]==null&&Zs(l,i,"");for(const i in s)i==="display"&&(o=!0),Zs(l,i,s[i])}else if(a){if(t!==s){const i=l[Tr];i&&(s+=";"+i),l.cssText=s,o=Er.test(s)}}else t&&e.removeAttribute("style");Ho in e&&(e[Ho]=o?l.display:"",e[Cr]&&(l.display="none"))}const Uo=/\s*!important$/;function Zs(e,t,s){if(pe(s))s.forEach(l=>Zs(e,t,l));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const l=Ar(e,t);Uo.test(s)?e.setProperty(Et(l),s.replace(Uo,""),"important"):e[l]=s}}const qo=["Webkit","Moz","ms"],Zn={};function Ar(e,t){const s=Zn[t];if(s)return s;let l=st(t);if(l!=="filter"&&l in e)return Zn[t]=l;l=Rs(l);for(let a=0;a<qo.length;a++){const o=qo[a]+l;if(o in e)return Zn[t]=o}return t}const Ko="http://www.w3.org/1999/xlink";function Vo(e,t,s,l,a,o=$a(t)){l&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Ko,t.slice(6,t.length)):e.setAttributeNS(Ko,t,s):s==null||o&&!gl(s)?e.removeAttribute(t):e.setAttribute(t,o?"":at(s)?String(s):s)}function zo(e,t,s,l,a){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?No(s):s);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const r=o==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(r!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=gl(s):s==null&&r==="string"?(s="",i=!0):r==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(a||t)}function Mr(e,t,s,l){e.addEventListener(t,s,l)}function Rr(e,t,s,l){e.removeEventListener(t,s,l)}const Wo=Symbol("_vei");function Lr(e,t,s,l,a=null){const o=e[Wo]||(e[Wo]={}),i=o[t];if(l&&i)i.value=l;else{const[r,c]=Or(t);if(l){const g=o[t]=Ir(l,a);Mr(e,r,g,c)}else i&&(Rr(e,r,i,c),o[t]=void 0)}}const Jo=/(?:Once|Passive|Capture)$/;function Or(e){let t;if(Jo.test(e)){t={};let l;for(;l=e.match(Jo);)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 el=0;const Fr=Promise.resolve(),Dr=()=>el||(Fr.then(()=>el=0),el=Date.now());function Ir(e,t){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;pt(Br(l,s.value),t,5,[l])};return s.value=e,s.attached=Dr(),s}function Br(e,t){if(pe(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(l=>a=>!a._stopped&&l&&l(a))}else return t}const Qo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Nr=(e,t,s,l,a,o)=>{const i=a==="svg";t==="class"?Sr(e,l,i):t==="style"?Pr(e,s,l):As(t)?fn(t)||Lr(e,t,s,l,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jr(e,t,l,i))?(zo(e,t,l),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Vo(e,t,l,i,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Oe(l))?zo(e,st(t),l,o,t):(t==="true-value"?e._trueValue=l:t==="false-value"&&(e._falseValue=l),Vo(e,t,l,i))};function jr(e,t,s,l){if(l)return!!(t==="innerHTML"||t==="textContent"||t in e&&Qo(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 a=e.tagName;if(a==="IMG"||a==="VIDEO"||a==="CANVAS"||a==="SOURCE")return!1}return Qo(t)&&Oe(s)?!1:t in e}const Hr=["ctrl","shift","alt","meta"],Ur={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)=>Hr.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]=((a,...o)=>{for(let i=0;i<t.length;i++){const r=Ur[t[i]];if(r&&r(a,t))return}return e(a,...o)}))},qr={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ts=(e,t)=>{const s=e._withKeys||(e._withKeys={}),l=t.join(".");return s[l]||(s[l]=(a=>{if(!("key"in a))return;const o=Et(a.key);if(t.some(i=>i===o||qr[i]===o))return e(a)}))},Kr=Ne({patchProp:Nr},$r);let Go;function Vr(){return Go||(Go=Ji(Kr))}const zr=((...e)=>{const t=Vr().createApp(...e),{mount:s}=t;return t.mount=l=>{const a=Jr(l);if(!a)return;const o=t._component;!ve(o)&&!o.render&&!o.template&&(o.template=a.innerHTML),a.nodeType===1&&(a.textContent="");const i=s(a,!1,Wr(a));return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),i},t});function Wr(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Jr(e){return Oe(e)?document.querySelector(e):e}async function Qr(){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 Gr(e){let t=null,s=null,l=!1;return{subscribe:async()=>{try{const i=await Qr();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 Yr(e){let t=!1;const s=Gr({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 en extends Error{status;constructor(t=403){super(`Unauthorized (HTTP ${t})`),this.name="UnauthorizedError",this.status=t}}class Xr extends Error{status;body;constructor(t,s){super(`API error (HTTP ${t})`),this.name="ApiError",this.status=t,this.body=s}}class tl{baseUrl;authToken;constructor(t){this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.authToken=t.authToken}async fetch(t,s){const a={...{Accept:"application/json",...this.authToken?{Authorization:`Bearer ${this.authToken}`}:{}},...s?.headers},o=await globalThis.fetch(`${this.baseUrl}${t}`,{...s,headers:a,credentials:this.authToken?"omit":"include"});if(s?.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");if(o.status===401||o.status===403)throw new en(o.status);if(!o.ok){const i=await o.text().catch(()=>"");throw new Xr(o.status,i)}return o.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 tn="ss-dash-theme",sl="ss-theme-change";function Es(){if(typeof window>"u")return"light";const e=localStorage.getItem(tn);return e==="dark"||e==="light"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function Zr(e){typeof window>"u"||(localStorage.setItem(tn,e),window.dispatchEvent(new CustomEvent(sl,{detail:e})))}function eu(){const t=Es()==="dark"?"light":"dark";return Zr(t),t}function Yo(e){if(typeof window>"u")return()=>{};const t=o=>{const i=o.detail;(i==="dark"||i==="light")&&e(i)},s=o=>{if(o.key===tn){const i=o.newValue;e(i==="dark"||i==="light"?i:Es())}},l=window.matchMedia("(prefers-color-scheme: dark)"),a=o=>{localStorage.getItem(tn)||e(o.matches?"dark":"light")};return window.addEventListener(sl,t),window.addEventListener("storage",s),l.addEventListener("change",a),()=>{window.removeEventListener(sl,t),window.removeEventListener("storage",s),l.removeEventListener("change",a)}}const tu={color:"#34d399",fillOpacityTop:.25,fillOpacityBottom:.02,strokeWidth:1.5,width:120,height:32,padding:2};function su(e){return{...tu,...e}}let nu=0;function lu(){return`ss-grad-${nu++}`}function ou(e){if(e.length===0)return null;let t=e[0],s=e[0],l=e[0];for(let a=1;a<e.length;a++){const o=e[a];o<t&&(t=o),o>s&&(s=o),l+=o}return{min:t,max:s,avg:l/e.length}}function au(e,t){if(e.length<2)return null;const s=su(t),l=ou(e),a=l.max-l.min||1,o=s.width-s.padding*2,i=s.height-s.padding*2,r=s.padding,c=e.length,g=new Array(c);for(let _=0;_<c;_++){const P=r+_/(c-1)*o,R=r+i-(e[_]-l.min)/a*i;g[_]=`${P.toFixed(1)},${R.toFixed(1)}`}const v=g.join(" "),m=(r+o).toFixed(1),p=(r+i).toFixed(1),x=r.toFixed(1),w=`M${g[0]} `+g.slice(1).map(_=>`L${_}`).join(" ")+` L${m},${p} L${x},${p} Z`;return{points:v,areaPath:w,gradientId:lu(),options:s,stats:l}}const iu=5e3,Xo=1e4,Zo=100,ru=500;function uu(e){if(!e&&e!==0)return"-";const t=Math.floor(e),s=Math.floor(t/86400),l=Math.floor(t%86400/3600),a=Math.floor(t%3600/60);return s>0?`${s}d ${l}h`:l>0?`${l}h ${a}m`:a>0?`${a}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 sn(e){return e>ru?"very-slow":e>Zo?"slow":"normal"}function nn(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(a=>nn(a,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 o=0;o<Math.min(s.length,4);o++)l.push(s[o]+": "+nn(e[s[o]],30));const a="{ "+l.join(", ")+(s.length>4?", ...+"+(s.length-4):"")+" }";return a.length>t?"{ "+s.slice(0,6).join(", ")+(s.length>6?", ...":"")+" }":a}return String(e)}function cu(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 du(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function fu(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 hu(e,t,s=2){if(t<=1)return[1];const l=[],a=Math.max(2,e-s),o=Math.min(t-1,e+s);l.push(1),a>2&&l.push("...");for(let i=a;i<=o;i++)l.push(i);return o<t-1&&l.push("..."),t>1&&l.push(t),l}const ea="/admin/api/debug",ta={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 pu(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 vu(e,t=ea){const s=`${t.replace(/\/+$/,"")}/config`;return e.fetch(s)}async function gu(e){const{baseUrl:t="",debugEndpoint:s=ea,authToken:l}=e,a=new tl({baseUrl:t,authToken:l});try{const o=await vu(a,s);return pu(o)}catch{return ta}}const yu={overview:"/overview",requests:"/requests",queries:"/queries",events:"/events",routes:"/routes",logs:"/logs",emails:"/emails",timeline:"/traces",cache:"/cache",jobs:"/jobs",config:"/config"};function mu(e){return yu[e]||`/${e}`}class sa{constructor(t,s){this.client=t,this.basePath=s}async fetchSection(t,s,l){const a=mu(t),o=s?`${this.basePath}${a}?${s}`:`${this.basePath}${a}`;return this.client.fetch(o,l)}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 bu{client;api;callbacks;endpoint;perPage;section;page=1;search;sort;sortDir;filters;timeRange;timer=null;fetchId=0;explicitFetchPending=!1;hasFetched=!1;stopped=!1;abortController=null;constructor(t){this.client=new tl({baseUrl:t.baseUrl,authToken:t.authToken}),this.api=new sa(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(),this.abortController?.abort(),this.abortController=null}async fetch(t=!0){if(t&&this.explicitFetchPending)return;this.abortController?.abort();const s=new AbortController;this.abortController=s;const l=++this.fetchId,a=this.section;if(!a)return;const o=this.filters,i=this.sort?this.sort.replace(/[A-Z]/g,c=>"_"+c.toLowerCase()):void 0,r=fu({page:this.page,perPage:this.perPage,search:this.search,sort:i,sortDir:this.sort?this.sortDir:void 0,filters:o&&Object.keys(o).length>0?o:void 0,timeRange:a.startsWith("overview")?this.timeRange:void 0});t||(this.callbacks.onLoading(!0),this.explicitFetchPending=!0);try{const c=await this.api.fetchSection(a,r||void 0,{signal:s.signal});if(l!==this.fetchId||this.stopped)return;if(c&&typeof c=="object"&&c.data!==void 0&&c.meta!==void 0){const g=c;this.callbacks.onData(g.data),this.callbacks.onPagination(g.meta)}else this.callbacks.onData(c),this.callbacks.onPagination(null);this.callbacks.onError(null),this.callbacks.onLoading(!1),this.hasFetched=!0}catch(c){if(c instanceof DOMException&&c.name==="AbortError"||s.signal.aborted||l!==this.fetchId||this.stopped)return;if(c instanceof en){this.callbacks.onError(c),this.callbacks.onLoading(!1),this.stopRefreshTimer(),this.callbacks.onUnauthorized();return}t||(this.callbacks.onError(c instanceof Error?c:new Error(String(c))),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 a=`${this.endpoint}/${t}`;try{const o=s==="post"?await this.client.post(a,l):await this.client.delete(a);return await this.fetch(!0),o}catch(o){throw o instanceof Error?o:new Error(String(o))}}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"?iu:Xo;this.timer=setInterval(()=>this.fetch(!0),t)}stopRefreshTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}}const Ae={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"/>']}},_u="ss-col-resize",na="ss-resizing";function xu(e){const t=Array.from(e.querySelectorAll("thead th"));if(t.length===0)return()=>{};const s=[];let l=!1;function a(){if(!l){l=!0;for(const o of t)o.style.width=o.offsetWidth+"px";e.style.tableLayout="fixed"}}for(const o of t){let i=function(c){c.preventDefault(),c.stopPropagation(),a();const g=c.clientX,v=o.offsetWidth;r.classList.add(na),r.setPointerCapture(c.pointerId);function m(x){const w=x.clientX-g,_=Math.max(30,v+w);o.style.width=_+"px"}function p(){r.classList.remove(na),r.removeEventListener("pointermove",m),r.removeEventListener("pointerup",p)}r.addEventListener("pointermove",m),r.addEventListener("pointerup",p)};if(!o.textContent?.trim())continue;const r=document.createElement("div");r.className=_u,o.appendChild(r),r.addEventListener("pointerdown",i),s.push(()=>{r.removeEventListener("pointerdown",i),r.remove()})}return()=>{for(const o of s)o()}}const wu=["all","error","warn","info","debug"];function la(e){return(e.levelName||e.level_name||(typeof e.level=="string"?e.level:"")||"info").toLowerCase()}function $u(e){return e.msg||e.message||JSON.stringify(e)}function ln(e){return e.createdAt||e.created_at||e.time||e.timestamp||0}function Ps(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 ku(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 Su=["all","active","waiting","delayed","completed","failed"];function Cu(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 Tu(e){if(!e)return[];if(Array.isArray(e))return e;const t=e;return t.jobs||t.data||[]}function Eu(e){if(!e||Array.isArray(e))return null;const t=e;return t.stats||t.overview||null}function nl(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function oa(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function ll(e,t,s,l=0){return e[t]||e[s]||l}function Pu(e){return{method:e.method||"",url:e.url||"",statusCode:ll(e,"status_code","statusCode"),totalDuration:ll(e,"total_duration","totalDuration")||e.duration||0,spanCount:ll(e,"span_count","spanCount"),spans:nl(e.spans),warnings:oa(e.warnings)}}const Au=["password","secret","token","key","credential","auth"];function Mu(e){const t=e.toLowerCase();return Au.some(s=>t.includes(s))}function Ru(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 Lu={collectionInterval:"Stats Collection",dashboardBroadcast:"Dashboard Broadcast",debugBroadcast:"Debug Broadcast",persistFlush:"Persist Flush",retentionCleanup:"Retention Cleanup"};function Ou(e){return Lu[e]||e}const Fu={prometheus:"Prometheus",pinoHook:"Pino Log Hook",edgePlugin:"Edge Plugin",cacheInspector:"Cache Inspector",queueInspector:"Queue Inspector"};function Du(e){return Fu[e]||e}function Iu(e){return"active"in e?e.active?"active":"inactive":"available"in e?e.available?"available":"unavailable":"unknown"}function Bu(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 Nu(e){return Object.entries(e).map(([t,s])=>({key:t,value:Ru(s),secret:Mu(t)}))}function ju(e,t){return t?Math.min(100,Math.round(e/t*100)):0}const Hu=["healthy","active","connected","available","ready"],Uu=["errored","unavailable"];function qu(e){return Hu.includes(e)?"ok":Uu.includes(e)?"err":""}function De(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.__redacted===!0}function on(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 a=t?`${t}.${l}`:l,o=e[l];typeof o=="object"&&o!==null&&!Array.isArray(o)&&!De(o)?s.push(...on(o,a)):s.push({path:a,value:o})}return s}function Ku(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 aa(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+=aa(e[s]);return t}function Vu(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 zu(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 Wu(e={}){const{baseUrl:t="",debugEndpoint:s="/admin/api/debug",authToken:l}=e,a=J({...ta}),o=J(!0);return Lt(async()=>{a.value=await gu({baseUrl:t,debugEndpoint:s,authToken:l}),o.value=!1}),{features:a,loading:o}}function ia(){const e=J(Es());let t=null;function s(a){e.value=a}function l(){const a=eu();return e.value=a,a}return Lt(()=>{e.value=Es(),t=Yo(s)}),Ot(()=>{t?.()}),{theme:e,toggleTheme:l}}function Ze(e,t={}){const{baseUrl:s="",dashboardEndpoint:l="/__stats/api",authToken:a,perPage:o=50,refreshKey:i}=t,r=J(null),c=J(!1),g=J(null),v=J(!1),m=J("1h"),p=Jt({page:1,perPage:o,total:0,totalPages:1}),x=Jt({search:""}),w=Jt({column:"",direction:"desc"}),_=new bu({baseUrl:s,endpoint:l,authToken:a,section:e(),perPage:o,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=>{c.value=S},onError:S=>{g.value=S},onUnauthorized:()=>{v.value=!0}}});let P=null;const R=_.getApi();async function M(S){try{return await R.fetchChart(S)}catch(H){return H instanceof en&&(v.value=!0),null}}async function y(){try{return await R.fetchGroupedQueries()}catch{return null}}async function $(S){try{return await R.explainQuery(S)}catch{return null}}async function T(S){try{return await R.retryJob(S),!0}catch{return!1}}async function Q(S){try{return await R.deleteCacheKey(S),!0}catch{return!1}}async function V(S){try{return(await R.fetchEmailPreview(S))?.html||null}catch{return null}}function G(S){p.page=S,C()}function L(S){x.search=S,p.page=1,C()}function K(S,H){x[S]=H,p.page=1,C()}function se(S,H){w.column===S&&!H?w.direction=w.direction==="asc"?"desc":"asc":(w.column=S,w.direction=H||"desc"),C()}function be(S){m.value=S,C()}async function Me(S,H="post",ne){return _.mutate(S,H,ne)}function Le(){E(),_.fetch(!0)}function Re(){_.start()}function ge(){_.stop()}function de(){const S={};for(const[H,ne]of Object.entries(x))H!=="search"&&ne!==""&&ne!==void 0&&ne!==null&&(S[H]=String(ne));return S}function E(){const S=e(),H=de();_.configure({page:p.page,perPage:p.perPage,search:x.search||void 0,sort:w.column||void 0,sortDir:w.column?w.direction:void 0,filters:Object.keys(H).length>0?H:void 0,timeRange:S.startsWith("overview")?m.value:void 0})}function C(){E(),_.fetch(!1)}return gt(e,()=>{p.page=1;for(const S of Object.keys(x))S==="search"?x.search="":delete x[S];w.column="",r.value=null,_.setSection(e()),E()}),i&&gt(i,()=>{E(),_.handleRefreshSignal()}),Lt(()=>{E(),_.start()}),Ot(()=>{_.stop()}),{data:r,loading:c,error:g,isUnauthorized:v,pagination:p,filter:x,sort:w,timeRange:m,goToPage:G,setSearch:L,setFilter:K,setSort:se,setTimeRange:be,refresh:Le,startRefresh:Re,stopRefresh:ge,mutate:Me,fetchChart:M,fetchGroupedQueries:y,explainQuery:$,retryJob:T,deleteCacheKey:Q,fetchEmailPreview:V}}const Ju=["title","aria-label"],Qu=["viewBox","innerHTML"],Gu=["viewBox","innerHTML"],Yu=Fe({__name:"ThemeToggle",props:{classPrefix:{default:"ss-dbg"}},setup(e){const t=e,{theme:s,toggleTheme:l}=ia(),a=q(()=>s.value==="dark"),o=q(()=>a.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,c)=>(u(),d("button",{type:"button",class:F(i.value),title:o.value,"aria-label":o.value,onClick:c[0]||(c[0]=(...g)=>k(l)&&k(l)(...g))},[a.value?(u(),d("svg",{key:0,width:"16",height:"16",viewBox:k(Ae).sun.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Ae).sun.elements.join("")},null,8,Qu)):(u(),d("svg",{key:1,width:"16",height:"16",viewBox:k(Ae).moon.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Ae).moon.elements.join("")},null,8,Gu))],10,Ju))}}),Xu=["data-theme"],Zu={class:"ss-dash-header"},ec={class:"ss-dash-header-center"},tc={class:"ss-dash-header-right"},sc=["href"],nc={class:"ss-dash-body"},lc={class:"ss-dash-nav"},oc=["data-ss-section","onClick","title"],ac={class:"ss-dash-nav-icon"},ic=["viewBox","innerHTML"],rc={class:"ss-dash-nav-label"},uc={key:0,class:"ss-dash-nav-sep"},cc=["onClick","title"],dc={class:"ss-dash-nav-icon"},fc=["viewBox","innerHTML"],hc={class:"ss-dash-nav-label"},pc=["title"],vc=["viewBox","innerHTML"],gc=["viewBox","innerHTML"],yc={class:"ss-dash-main"},mc=["id"],bc={class:"ss-dash-pane-inner"},_c={key:1,class:"ss-dash-empty"},xc=Fe({__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(()=>Pf)),s=lt(()=>Promise.resolve().then(()=>yh)),l=lt(()=>Promise.resolve().then(()=>Xh)),a=lt(()=>Promise.resolve().then(()=>op)),o=lt(()=>Promise.resolve().then(()=>pp)),i=lt(()=>Promise.resolve().then(()=>Op)),r=lt(()=>Promise.resolve().then(()=>Yp)),c=lt(()=>Promise.resolve().then(()=>dv)),g=lt(()=>Promise.resolve().then(()=>Rv)),v=lt(()=>Promise.resolve().then(()=>sg)),m=lt(()=>Promise.resolve().then(()=>Mg)),p=lt(()=>Promise.resolve().then(()=>f1)),x=["overview","requests","queries","events","routes","logs","emails","timeline","cache","jobs","config","internals"],w=e,{theme:_}=ia(),{features:P}=Wu({baseUrl:w.baseUrl,debugEndpoint:w.debugEndpoint,authToken:w.authToken}),R=J("overview"),M=J(!1),y=J(!1),$=J(0);ts("ss-refresh-key",$),ts("ss-base-url",w.baseUrl),ts("ss-dashboard-endpoint",w.dashboardEndpoint),ts("ss-debug-endpoint",w.debugEndpoint),ts("ss-auth-token",w.authToken),typeof window<"u"&&(M.value=localStorage.getItem("ss-dash-sidebar")==="collapsed");let T=null;function Q(){if(T&&(T(),T=null),!w.channelName)return;T=Yr({baseUrl:w.baseUrl,channelName:w.channelName,authToken:w.authToken,onMessage:()=>{$.value+=1},onConnect:()=>{y.value=!0},onDisconnect:()=>{y.value=!1},onError:()=>{y.value=!1}}).unsubscribe}Lt(()=>{Q()}),Ot(()=>{T&&(T(),T=null)});const V=q(()=>P.value.customPanes||[]);function G(S){const H=S.replace("#","").split("?")[0];return H&&[...x,...V.value.map(Te=>Te.id)].includes(H)?H:"overview"}function L(){const S=G(window.location.hash);S!==R.value&&(R.value=S)}Lt(()=>{if(typeof window>"u")return;const S=G(window.location.hash);(S!=="overview"||window.location.hash)&&(R.value=S),window.addEventListener("hashchange",L)}),Ot(()=>{window.removeEventListener("hashchange",L)}),gt(R,S=>{typeof window<"u"&&(window.location.hash=S)});function K(){M.value=!M.value,localStorage.setItem("ss-dash-sidebar",M.value?"collapsed":"expanded")}function se(S){S!==R.value&&(R.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}]),Me=q(()=>be.value.filter(S=>S.visible)),{data:Le}=Ze(()=>"overview",{baseUrl:w.baseUrl,dashboardEndpoint:w.dashboardEndpoint,authToken:w.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:a,routes:o,logs:i,emails:r,timeline:c,cache:g,jobs:v,config:m,internals:p},E=q(()=>de[R.value]||null);function C(S){return S==="timeline"?"dashboard-timeline":S}return(S,H)=>(u(),d("div",{class:"ss-dash","data-theme":k(_),id:"ss-dash"},[n("div",Zu,[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",ec,[n("span",{class:F(["ss-dash-live-dot",{"ss-dash-connected":y.value}]),id:"ss-dash-live-dot"},null,2),n("span",{class:F(["ss-dash-live-label",{"ss-dash-connected":y.value}]),id:"ss-dash-live-label"},f(y.value?"Live":"Polling"),3)]),n("div",tc,[me(Yu,{"class-prefix":"ss-dash"}),e.backUrl?(u(),d("a",{key:0,href:e.backUrl,class:"ss-dash-back-link",title:"Back to app"}," ← App ",8,sc)):te("",!0)])]),n("div",nc,[n("div",{class:F(["ss-dash-sidebar",{"ss-dash-collapsed":M.value}]),id:"ss-dash-sidebar"},[n("nav",lc,[(u(!0),d(U,null,ye(Me.value,ne=>(u(),d("button",{key:ne.id,type:"button",class:F(["ss-dash-nav-item",{"ss-dash-active":R.value===ne.id}]),"data-ss-section":ne.id,onClick:Te=>se(ne.id),title:M.value?ne.label:void 0},[n("span",ac,[(u(),d("svg",{width:"20",height:"20",viewBox:(k(Ae)[C(ne.id)]||k(Ae).config).viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:(k(Ae)[C(ne.id)]||k(Ae).config).elements.join("")},null,8,ic))]),n("span",rc,f(ne.label),1),ge.value[ne.id]&&ge.value[ne.id].count>0?(u(),d("span",{key:0,class:F(["ss-dash-nav-badge",ge.value[ne.id].variant||""])},f(ge.value[ne.id].count),3)):te("",!0)],10,oc))),128)),V.value.length>0?(u(),d("div",uc)):te("",!0),(u(!0),d(U,null,ye(V.value,ne=>(u(),d("button",{key:ne.id,type:"button",class:F(["ss-dash-nav-item",{"ss-dash-active":R.value===ne.id}]),onClick:Te=>se(ne.id),title:M.value?ne.label:void 0},[n("span",dc,[(u(),d("svg",{width:"20",height:"20",viewBox:k(Ae)["custom-pane"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Ae)["custom-pane"].elements.join("")},null,8,fc))]),n("span",hc,f(ne.label),1)],10,cc))),128))]),n("button",{type:"button",class:"ss-dash-sidebar-toggle",id:"ss-dash-sidebar-toggle",onClick:K,title:M.value?"Expand sidebar":"Collapse sidebar"},[M.value?(u(),d("svg",{key:0,width:"16",height:"16",viewBox:k(Ae)["chevron-right"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:k(Ae)["chevron-right"].elements.join("")},null,8,vc)):(u(),d("svg",{key:1,width:"16",height:"16",viewBox:k(Ae)["chevron-left"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:k(Ae)["chevron-left"].elements.join("")},null,8,gc))],8,pc)],2),n("div",yc,[n("div",{class:"ss-dash-pane ss-dash-active",id:`ss-dash-pane-${R.value}`},[n("div",bc,[(u(),Xe(Xi,null,{fallback:es(()=>[...H[1]||(H[1]=[n("div",{class:"ss-dash-empty"},"Loading...",-1)])]),default:es(()=>[E.value?(u(),Xe(ki(E.value),{key:0})):(u(),d("div",_c,"Unknown section"))]),_:1}))])],8,mc)])])],8,Xu))}});function wc(e){const t=document.getElementById(e);return t?JSON.parse(t.textContent||"{}"):{}}function $c(){function e(t){document.documentElement.setAttribute("data-theme",t)}e(Es()),Yo(e)}const cs=wc("ss-dash-config");$c();const ra=document.getElementById("ss-dash");ra&&zr(xc,{baseUrl:cs.baseUrl,dashboardEndpoint:cs.dashboardEndpoint,debugEndpoint:cs.debugEndpoint,authToken:cs.authToken,backUrl:cs.backUrl,channelName:cs.channelName}).mount(ra);const kc=["width","height","viewBox"],Sc=["id"],Cc=["stop-color"],Tc=["stop-color"],Ec=["d","fill"],Pc=["d","stroke"],Ac=["x","y"],an=Fe({__name:"Sparkline",props:{data:{},color:{default:"#34d399"},width:{default:120},height:{default:32}},setup(e){const t=e,s=q(()=>au(t.data,{width:t.width,height:t.height,color:t.color})),l=q(()=>s.value!==null),a=q(()=>`sg-${t.color.replace("#","")}`);return(o,i)=>(u(),d("div",{class:"ss-dash-sparkline",style:Ke({"--ss-accent":e.color})},[(u(),d("svg",{width:e.width,height:e.height,viewBox:`0 0 ${e.width} ${e.height}`,style:{display:"block"}},[l.value&&s.value?(u(),d(U,{key:0},[n("defs",null,[n("linearGradient",{id:a.value,x1:"0",y1:"0",x2:"0",y2:"1"},[n("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.25"},null,8,Cc),n("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0.02"},null,8,Tc)],8,Sc)]),n("path",{d:s.value.areaPath,fill:`url(#${a.value})`},null,8,Ec),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,Pc)],64)):(u(),d("text",{key:1,x:e.width/2,y:e.height/2+3,"text-anchor":"middle",fill:"#737373","font-size":"9"}," collecting... ",8,Ac))],8,kc))],4))}}),Mc={class:"ss-dash-btn-group"},Rc=["onClick"],Lc=Fe({__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(a,o)=>(u(),d("div",Mc,[(u(),d(U,null,ye(l,i=>n("button",{key:i.value,type:"button",class:F(`ss-dash-btn ${e.modelValue===i.value?"ss-dash-active":""}`),onClick:r=>s("update:modelValue",i.value)},f(i.label),11,Rc)),64))]))}}),Oc={class:"ss-dash-overview"},Fc={key:0,class:"ss-dash-empty"},Dc={class:"ss-dash-cards"},Ic={class:"ss-dash-card"},Bc={class:"ss-dash-sparkline"},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-chart-container"},zc={class:"ss-dash-chart-header"},Wc={class:"ss-dash-chart",id:"ss-dash-chart-area"},Jc={key:0,class:"ss-dash-empty",style:{"min-height":"120px"}},Qc=["viewBox"],Gc=["id"],Yc=["id"],Xc=["x1","y1","x2","y2"],Zc=["x","y"],ed=["d","fill"],td=["d"],sd=["d","fill"],nd=["d"],ld=["x","y","width","height","data-idx","onMouseenter"],od=["cx","cy","r","data-idx","opacity"],ad=["cx","cy","r","data-idx","opacity"],id=["x","y"],rd={key:0,style:{color:"var(--ss-red-fg)"}},ud={class:"ss-dash-chart-legend",id:"ss-dash-chart-legend"},cd={key:0,class:"ss-dash-chart-legend-item"},dd={class:"ss-dash-secondary-cards"},fd={class:"ss-dash-secondary-card"},hd={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},pd={key:1,class:"ss-dash-secondary-list"},vd=["href"],gd=["title"],yd={class:"ss-dash-secondary-card"},md={class:"ss-dash-secondary-list"},bd={class:"ss-dash-secondary-list-value"},_d={class:"ss-dash-secondary-list-value"},xd={class:"ss-dash-secondary-list-value"},wd={class:"ss-dash-secondary-card"},$d={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},kd={key:1,class:"ss-dash-secondary-list"},Sd=["href"],Cd=["title"],Td=["title"],Ed={class:"ss-dash-secondary-card"},Pd={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},Ad={key:1,class:"ss-dash-secondary-list"},Md=["href"],Rd={class:"ss-dash-secondary-list-value"},Ld={class:"ss-dash-secondary-card"},Od={class:"ss-dash-secondary-list"},Fd={href:"#emails?status=sent",class:"ss-dash-widget-row-link"},Dd={class:"ss-dash-secondary-list-value"},Id={href:"#emails?status=queued",class:"ss-dash-widget-row-link"},Bd={class:"ss-dash-secondary-list-value"},Nd={href:"#emails?status=failed",class:"ss-dash-widget-row-link"},jd={class:"ss-dash-secondary-card"},Hd={class:"ss-dash-secondary-list"},Ud={href:"#logs?level=error",class:"ss-dash-widget-row-link"},qd={class:"ss-dash-secondary-list-value"},Kd={href:"#logs?level=warn",class:"ss-dash-widget-row-link"},Vd={class:"ss-dash-secondary-list-value"},zd={href:"#logs?level=info",class:"ss-dash-widget-row-link"},Wd={class:"ss-dash-secondary-list-value"},Jd={href:"#logs?level=debug",class:"ss-dash-widget-row-link"},Qd={class:"ss-dash-secondary-list-value"},Gd={key:0,class:"ss-dash-secondary-card"},Yd={class:"ss-dash-secondary-list"},Xd={href:"#cache",class:"ss-dash-widget-row-link"},Zd={class:"ss-dash-secondary-list-value"},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={key:1,class:"ss-dash-secondary-card"},of={class:"ss-dash-secondary-list"},af={href:"#jobs?status=active",class:"ss-dash-widget-row-link"},rf={class:"ss-dash-secondary-list-value"},uf={href:"#jobs?status=waiting",class:"ss-dash-widget-row-link"},cf={class:"ss-dash-secondary-list-value"},df={href:"#jobs?status=failed",class:"ss-dash-widget-row-link"},ff={href:"#jobs?status=completed",class:"ss-dash-widget-row-link"},hf={class:"ss-dash-secondary-list-value"},pf={class:"ss-dash-secondary-card"},vf={class:"ss-dash-secondary-list"},gf={href:"#requests?status=2xx",class:"ss-dash-widget-row-link"},yf={class:"ss-dash-secondary-list-value"},mf={href:"#requests?status=3xx",class:"ss-dash-widget-row-link"},bf={class:"ss-dash-secondary-list-value"},_f={href:"#requests?status=4xx",class:"ss-dash-widget-row-link"},xf={class:"ss-dash-secondary-list-value"},wf={href:"#requests?status=5xx",class:"ss-dash-widget-row-link"},$f={class:"ss-dash-secondary-list-value"},kf={class:"ss-dash-secondary-card"},Sf={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},Cf={key:1,class:"ss-dash-secondary-list"},Tf=["href"],Ef=["title"],ol=220,ua=120,Pf=Object.freeze(Object.defineProperty({__proto__:null,default:((e,t)=>{const s=e.__vccOpts||e;for(const[l,a]of t)s[l]=a;return s})(Fe({__name:"OverviewSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-dashboard-endpoint","/__stats/api"),a=re("ss-auth-token",void 0),o=Math.random().toString(36).slice(2,8),i=J("1h"),{data:r,loading:c}=Ze(()=>"overview",{baseUrl:s,dashboardEndpoint:l,authToken:a,refreshKey:t}),{data:g,setTimeRange:v}=Ze(()=>"overview/chart",{baseUrl:s,dashboardEndpoint:l,authToken:a,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:[]}),x=q(()=>p.value),w=q(()=>p.value.avgResponseTime||Number(x.value.avg_response_time)||0),_=q(()=>p.value.p95ResponseTime||Number(x.value.p95_response_time)||0),P=q(()=>p.value.requestsPerMinute||Number(x.value.requests_per_minute)||0),R=q(()=>p.value.errorRate||Number(x.value.error_rate)||0),M=q(()=>p.value.totalRequests||Number(x.value.total_requests)||0),y=q(()=>M.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)),L=q(()=>`ss-cg-total-${o}`),K=q(()=>`ss-cg-error-${o}`);function se(Z,O){if(Z<=0)return[0];const le=Z/O,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 cn=[];for(let il=tt;il<=Z+tt*.5;il+=tt)cn.push(Math.round(il));return cn.length===0&&cn.push(Math.ceil(Z)),cn}function be(Z){try{return new Date(Z).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return""}}function Me(Z){if(Z.length===0)return"";if(Z.length===1)return`M${Z[0].x},${Z[0].y}`;let O=`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;O+=` C${tt.toFixed(1)},${fe.y.toFixed(1)} ${tt.toFixed(1)},${ot.y.toFixed(1)} ${ot.x.toFixed(1)},${ot.y.toFixed(1)}`}return O}function Le(Z){const O=sn(Z);return O==="very-slow"?"ss-dash-very-slow":O==="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(O=>{for(const le of O)ge.value=le.contentRect.width}),de.observe(Z))}),Ot(()=>{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(()=>ol-E.top-E.bottom),ne=q(()=>E.top+H.value),Te=q(()=>$.value.map(Z=>{const O=Z;return(Z.requestCount??0)+(Number(O.request_count)||0)||Z.total||0})),X=q(()=>$.value.map(Z=>{const O=Z;return(Z.errorCount??0)+(Number(O.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)),un=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 ds(Z){return E.top+H.value-Z/(un.value||1)*H.value}const h=q(()=>$.value.map((Z,O)=>({x:Tt(O),y:ds(Te.value[O])}))),b=q(()=>$.value.map((Z,O)=>({x:Tt(O),y:ds(X.value[O])}))),A=q(()=>Me(h.value)),j=q(()=>oe.value?Me(b.value):""),D=q(()=>h.value.length>1?`${A.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 O=h.value[Z].x;B.value={visible:!0,x:O,idx:Z}}function ce(){B.value={visible:!1,x:0,idx:-1}}const ee=q(()=>B.value.visible?Math.max(ua/2,Math.min(B.value.x,C.value-ua/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?w.value>500?"ss-dash-red":w.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Ce(){return y.value?_.value>500?"ss-dash-red":_.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?R.value>5?"ss-dash-red":R.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,O)=>(u(),d("div",Oc,[k(c)&&!m.value?(u(),d("div",Fc,"Loading overview...")):(u(),d(U,{key:1},[n("div",Dc,[n("div",Ic,[O[1]||(O[1]=n("div",{class:"ss-dash-card-title"},"Avg Response Time",-1)),n("div",{class:F(["ss-dash-card-value",xe()])},f(y.value?k(Dt)(w.value):"-"),3),n("div",Bc,[me(an,{data:T.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Nc,[O[2]||(O[2]=n("div",{class:"ss-dash-card-title"},"P95 Response Time",-1)),n("div",{class:F(["ss-dash-card-value",Ce()])},f(y.value?k(Dt)(_.value):"-"),3),n("div",jc,[me(an,{data:Q.value,color:"#60a5fa",width:160,height:40},null,8,["data"])])]),n("div",Hc,[O[3]||(O[3]=n("div",{class:"ss-dash-card-title"},"Requests / min",-1)),n("div",{class:F(["ss-dash-card-value",$e()])},f(y.value?P.value.toFixed(1):"-"),3),n("div",Uc,[me(an,{data:V.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",qc,[O[4]||(O[4]=n("div",{class:"ss-dash-card-title"},"Error Rate",-1)),n("div",{class:F(["ss-dash-card-value",qe()])},f(y.value?`${R.value.toFixed(1)}%`:"-"),3),n("div",Kc,[me(an,{data:G.value,color:"#f87171",width:160,height:40},null,8,["data"])])])]),n("div",Vc,[n("div",zc,[O[5]||(O[5]=n("span",{class:"ss-dash-chart-title"},"Request Volume",-1)),me(Lc,{"model-value":i.value,"onUpdate:modelValue":O[0]||(O[0]=le=>i.value=le)},null,8,["model-value"])]),n("div",Wc,[$.value.length===0?(u(),d("div",Jc," No data for this range ")):(u(),d("div",{key:1,ref_key:"chartContainerRef",ref:Re,style:{position:"relative"}},[(u(),d("svg",{viewBox:`0 0 ${C.value} ${ol}`,class:"ss-dash-chart-svg"},[n("defs",null,[n("linearGradient",{id:L.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...O[6]||(O[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,Gc),n("linearGradient",{id:K.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...O[7]||(O[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,Yc)]),(u(!0),d(U,null,ye(Ie.value,le=>(u(),d("g",{key:`ytick-${le}`},[n("line",{x1:E.left,y1:ds(le),x2:C.value-E.right,y2:ds(le),stroke:"var(--ss-border-faint)","stroke-width":"0.5","stroke-dasharray":"3,3"},null,8,Xc),n("text",{x:E.left-6,y:ds(le),"text-anchor":"end",fill:"var(--ss-dim)","font-size":"9","dominant-baseline":"middle"},f(le),9,Zc)]))),128)),D.value?(u(),d("path",{key:0,d:D.value,fill:`url(#${L.value})`},null,8,ed)):te("",!0),A.value?(u(),d("path",{key:1,d:A.value,fill:"none",stroke:"var(--ss-accent)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"},null,8,td)):te("",!0),I.value?(u(),d("path",{key:2,d:I.value,fill:`url(#${K.value})`},null,8,sd)):te("",!0),j.value?(u(),d("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,nd)):te("",!0),(u(!0),d(U,null,ye($.value,(le,fe)=>(u(),d("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,ld),Te.value[fe]>0?(u(),d("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,od)):te("",!0),X.value[fe]>0?(u(),d("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,ad)):te("",!0)]))),128)),(u(!0),d(U,null,ye($.value,(le,fe)=>(u(),d(U,{key:`xlabel-${fe}`},[he(fe)&&be(le.bucket)?(u(),d("text",{key:0,x:Tt(fe),y:ol-6,"text-anchor":"middle",fill:"var(--ss-dim)","font-size":"9"},f(be(le.bucket)),9,id)):te("",!0)],64))),128))],8,Qc)),B.value.visible&&B.value.idx>=0?(u(),d("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(),d("div",rd," Errors: "+f(X.value[B.value.idx]),1)):te("",!0)],4)):te("",!0)],512))]),n("div",ud,[O[9]||(O[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(),d("span",cd,[...O[8]||(O[8]=[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-red-fg)"}},null,-1),_e(" Errors ",-1)])])):te("",!0)])]),n("div",dd,[n("div",fd,[O[10]||(O[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(),d("div",hd," No data yet ")):(u(),d("ul",pd,[(u(!0),d(U,null,ye(p.value.slowestEndpoints.slice(0,5),(le,fe)=>(u(),d("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,gd),n("span",{class:F(["ss-dash-secondary-list-value","ss-dash-duration",Le(le.avgDuration)])},f(k(Dt)(le.avgDuration)),3)],8,vd)]))),128))]))]),n("div",yd,[O[14]||(O[14]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Query Stats")],-1)),n("ul",md,[n("li",null,[O[11]||(O[11]=n("span",null,"Total Queries",-1)),n("span",bd,f(p.value.queryStats.total),1)]),n("li",null,[O[12]||(O[12]=n("span",null,"Avg Duration",-1)),n("span",_d,f(k(Dt)(p.value.queryStats.avgDuration)),1)]),n("li",null,[O[13]||(O[13]=n("span",null,"Queries / Request",-1)),n("span",xd,f(p.value.queryStats.perRequest.toFixed(1)),1)])])]),n("div",wd,[O[15]||(O[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(),d("div",$d," No recent errors ")):(u(),d("ul",kd,[(u(!0),d(U,null,ye(p.value.recentErrors,(le,fe)=>(u(),d("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,Cd),le.timestamp?(u(),d("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,Td)):te("",!0)],8,Sd)]))),128))]))]),n("div",Ed,[O[16]||(O[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(),d("div",Pd," No events yet ")):(u(),d("ul",Ad,[(u(!0),d(U,null,ye(p.value.topEvents.slice(0,5),(le,fe)=>(u(),d("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",Rd,f(le.count),1)],8,Md)]))),128))]))]),n("div",Ld,[O[20]||(O[20]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#emails",class:"ss-dash-widget-link"},"Email Activity")],-1)),n("ul",Od,[n("li",null,[n("a",Fd,[O[17]||(O[17]=n("span",null,"Sent",-1)),n("span",Dd,f(p.value.emailActivity.sent),1)])]),n("li",null,[n("a",Id,[O[18]||(O[18]=n("span",null,"Queued",-1)),n("span",Bd,f(p.value.emailActivity.queued),1)])]),n("li",null,[n("a",Nd,[O[19]||(O[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",jd,[O[25]||(O[25]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs",class:"ss-dash-widget-link"},"Log Levels")],-1)),n("ul",Hd,[n("li",null,[n("a",Ud,[O[21]||(O[21]=n("span",{style:{color:"var(--ss-red-fg)"}},"Error",-1)),n("span",qd,f(p.value.logLevelBreakdown.error),1)])]),n("li",null,[n("a",Kd,[O[22]||(O[22]=n("span",{style:{color:"var(--ss-amber-fg)"}},"Warn",-1)),n("span",Vd,f(p.value.logLevelBreakdown.warn),1)])]),n("li",null,[n("a",zd,[O[23]||(O[23]=n("span",{style:{color:"var(--ss-green-fg)"}},"Info",-1)),n("span",Wd,f(p.value.logLevelBreakdown.info),1)])]),n("li",null,[n("a",Jd,[O[24]||(O[24]=n("span",{style:{color:"var(--ss-dim)"}},"Debug",-1)),n("span",Qd,f(p.value.logLevelBreakdown.debug),1)])])])]),p.value.cacheStats&&p.value.cacheStats.available?(u(),d("div",Gd,[O[29]||(O[29]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#cache",class:"ss-dash-widget-link"},"Cache")],-1)),n("ul",Yd,[n("li",null,[n("a",Xd,[O[26]||(O[26]=n("span",null,"Keys",-1)),n("span",Zd,f(p.value.cacheStats.totalKeys),1)])]),n("li",null,[n("a",ef,[O[27]||(O[27]=n("span",null,"Hit Rate",-1)),n("span",tf,f(p.value.cacheStats.hitRate.toFixed(1))+"%",1)])]),n("li",null,[n("a",sf,[O[28]||(O[28]=n("span",null,"Memory",-1)),n("span",nf,f(p.value.cacheStats.memoryUsedHuman),1)])])])])):te("",!0),p.value.jobQueueStatus&&p.value.jobQueueStatus.available?(u(),d("div",lf,[O[34]||(O[34]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#jobs",class:"ss-dash-widget-link"},"Job Queue")],-1)),n("ul",of,[n("li",null,[n("a",af,[O[30]||(O[30]=n("span",null,"Active",-1)),n("span",rf,f(p.value.jobQueueStatus.active),1)])]),n("li",null,[n("a",uf,[O[31]||(O[31]=n("span",null,"Waiting",-1)),n("span",cf,f(p.value.jobQueueStatus.waiting),1)])]),n("li",null,[n("a",df,[O[32]||(O[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",ff,[O[33]||(O[33]=n("span",null,"Completed",-1)),n("span",hf,f(p.value.jobQueueStatus.completed),1)])])])])):te("",!0),n("div",pf,[O[39]||(O[39]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Response Status")],-1)),n("ul",vf,[n("li",null,[n("a",gf,[O[35]||(O[35]=n("span",{style:{color:"var(--ss-green-fg)"}},"2xx",-1)),n("span",yf,f(p.value.statusDistribution["2xx"]),1)])]),n("li",null,[n("a",mf,[O[36]||(O[36]=n("span",{style:{color:"var(--ss-blue-fg)"}},"3xx",-1)),n("span",bf,f(p.value.statusDistribution["3xx"]),1)])]),n("li",null,[n("a",_f,[O[37]||(O[37]=n("span",{style:{color:"var(--ss-amber-fg)"}},"4xx",-1)),n("span",xf,f(p.value.statusDistribution["4xx"]),1)])]),n("li",null,[n("a",wf,[O[38]||(O[38]=n("span",{style:{color:"var(--ss-red-fg)"}},"5xx",-1)),n("span",$f,f(p.value.statusDistribution["5xx"]),1)])])])]),n("div",kf,[O[40]||(O[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(),d("div",Sf," No query data yet ")):(u(),d("ul",Cf,[(u(!0),d(U,null,ye(p.value.slowestQueries.slice(0,5),(le,fe)=>(u(),d("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,Ef),n("span",{class:F(["ss-dash-secondary-list-value","ss-dash-duration",Le(le.avgDuration)])},f(k(Dt)(le.avgDuration)),3)],8,Tf)]))),128))]))])])],64))]))}}),[["__scopeId","data-v-1e96b18b"]])},Symbol.toStringTag,{value:"Module"}));function rn(e="",t){let s=null;return function(){return s||(s=new tl({baseUrl:e,authToken:t})),s}}function Bt(e){const t=J(null);let s=null;function l(){s&&s(),s=null,jl(()=>{t.value&&(s=xu(t.value))})}return e&&gt(e,l),Lt(l),Xl(()=>{s&&s(),s=null}),{tableRef:t}}const Af={class:"ss-dash-filter-bar"},Mf={key:0,class:"ss-dash-summary"},Rf={class:"ss-dash-search-wrapper"},Lf=["viewBox","innerHTML"],Of=["value","placeholder"],Ff={key:1,class:"ss-dash-filter-controls"},Ct=Fe({__name:"FilterBar",props:{modelValue:{},placeholder:{},summary:{}},emits:["update:modelValue","clear"],setup(e,{emit:t}){const s=t;function l(o){s("update:modelValue",o.target.value)}function a(){s("update:modelValue",""),s("clear")}return(o,i)=>(u(),d("div",Af,[e.summary?(u(),d("span",Mf,f(e.summary),1)):te("",!0),n("div",Rf,[(u(),d("svg",{class:"ss-dash-search-icon",viewBox:k(Ae).search.viewBox,width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:k(Ae).search.elements.join("")},null,8,Lf)),n("input",{class:"ss-dash-search",type:"text",value:e.modelValue,placeholder:e.placeholder||"Search...",onInput:l},null,40,Of),e.modelValue?(u(),d("button",{key:0,type:"button",class:"ss-dash-search-clear",onClick:a}," × ")):te("",!0)]),o.$slots.default?(u(),d("div",Ff,[Ci(o.$slots,"default")])):te("",!0)]))}}),Df={key:0,class:"ss-dash-pagination"},If={class:"ss-dash-page-info"},Bf={class:"ss-dash-pagination-controls"},Nf=["disabled"],jf={key:0,class:"ss-dash-page-ellipsis"},Hf=["onClick"],Uf=["disabled"],Kt=Fe({__name:"PaginationControls",props:{page:{},lastPage:{},total:{}},emits:["pageChange"],setup(e,{emit:t}){const s=e,l=t,a=q(()=>hu(s.page,s.lastPage));return(o,i)=>e.lastPage>1?(u(),d("div",Df,[n("span",If," Page "+f(e.page)+" of "+f(e.lastPage)+" ("+f(e.total)+" total) ",1),n("div",Bf,[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,Nf),(u(!0),d(U,null,ye(a.value,(r,c)=>(u(),d(U,{key:r==="..."?`ellipsis-${c}`:r},[r==="..."?(u(),d("span",jf,"...")):(u(),d("button",{key:1,type:"button",class:F(`ss-dash-page-btn ${r===e.page?"ss-dash-active":""}`),onClick:g=>l("pageChange",r)},f(r),11,Hf))],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,Uf)])])):te("",!0)}}),qf={key:0,class:"ss-dash-empty"},Kf={class:"ss-dash-tl-legend"},Vf=["title"],zf={class:"ss-dash-tl-track"},Wf=["title"],Jf={class:"ss-dash-tl-dur"},Qf={key:0,class:"ss-dash-tl-warnings"},Gf={class:"ss-dash-tl-warnings-title"},ca=Fe({__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"},a=q(()=>t.spans||[]),o=q(()=>[...a.value].sort((x,w)=>x.startOffset-w.startOffset)),i=q(()=>{const x={};for(const w of o.value)x[w.id]=w.parentId?(x[w.parentId]||0)+1:0;return x});function r(x){const w=t.totalDuration||1;return`${x.startOffset/w*100}%`}function c(x){const w=t.totalDuration||1;return`${Math.max(x.duration/w*100,.5)}%`}function g(x){return x.length>50?x.slice(0,50)+"...":x}function v(x){return x==="db"?"DB":x}function m(x){return x==="db"?"purple":x==="mail"?"green":x==="event"?"amber":x==="view"?"blue":"muted"}function p(x){const w=x.metadata?Object.entries(x.metadata).filter(([,_])=>_!=null).map(([_,P])=>`${_}=${P}`).join(", "):"";return w?`${x.label} (${x.duration.toFixed(2)}ms)
5
+ ${w}`:`${x.label} (${x.duration.toFixed(2)}ms)`}return(x,w)=>a.value.length===0?(u(),d("div",qf,"No spans recorded")):(u(),d("div",{key:1,class:F(`ss-dash-tl-waterfall ${e.className||""}`)},[n("div",Kf,[(u(),d(U,null,ye(l,(_,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(_),1)])),64))]),(u(!0),d(U,null,ye(o.value,_=>(u(),d("div",{key:_.id,class:"ss-dash-tl-row"},[n("div",{class:"ss-dash-tl-label",title:p(_),style:Ke({paddingLeft:8+(i.value[_.id]||0)*16+"px"})},[n("span",{class:F(`ss-dash-badge ss-dash-badge-${m(_.category)}`),style:{"font-size":"9px","margin-right":"4px"}},f(v(_.category)),3),_e(" "+f(g(_.label)),1)],12,Vf),n("div",zf,[n("div",{class:F(`ss-dash-tl-bar ss-dash-tl-bar-${_.category||"custom"}`),style:Ke({left:r(_),width:c(_)}),title:p(_)},null,14,Wf)]),n("span",Jf,f(_.duration.toFixed(2))+"ms",1)]))),128)),e.warnings&&e.warnings.length>0?(u(),d("div",Qf,[n("div",Gf,"Warnings ("+f(e.warnings.length)+")",1),(u(!0),d(U,null,ye(e.warnings,(_,P)=>(u(),d("div",{key:P,class:"ss-dash-tl-warning"},f(_),1))),128))])):te("",!0)],2))}}),Yf={class:"ss-dash-tl-detail-header"},Xf={style:{color:"var(--ss-text)"}},Zf={class:"ss-dash-tl-meta"},eh={class:"ss-dash-tl-detail-header"},th={key:0,class:"ss-dash-empty"},sh={key:1,class:"ss-dash-empty"},nh={class:"ss-dash-table-wrap"},lh={key:0,class:"ss-dash-sort-arrow"},oh={key:0,class:"ss-dash-sort-arrow"},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=["onClick"],ch={style:{color:"var(--ss-dim)"}},dh=["title"],fh={style:{color:"var(--ss-muted)","text-align":"center"}},hh={key:0,style:{color:"var(--ss-amber-fg)","text-align":"center",display:"block"}},ph={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},vh=["title"],gh={key:1,class:"ss-dash-empty"},yh=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,error:r,pagination:c,sort:g,goToPage:v,setSearch:m,setSort:p}=Ze(()=>"requests",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),x=J(""),w=J(null),_=J(!1),P=J(null),R=q(()=>{if(!o.value)return[];const L=o.value;return L.data||L.requests||o.value||[]}),M=rn(a,l);async function y(L){const K=L.id;_.value=!0;try{const se=s||"/__stats/api",be=await M().fetch(`${se}/requests/${K}`);P.value=Pu(be),w.value=L}catch{}finally{_.value=!1}}function $(){w.value=null,P.value=null}function T(L){x.value=L,m(L)}function Q(L){p(L)}function V(L){const K=sn(L);return K==="very-slow"?"ss-dash-very-slow":K==="slow"?"ss-dash-slow":""}const{tableRef:G}=Bt(()=>R.value);return(L,K)=>(u(),d("div",null,[P.value&&w.value?(u(),d(U,{key:0},[n("div",Yf,[n("button",{type:"button",class:"ss-dash-btn",onClick:$}," ← Back to Requests "),n("span",{class:F(`ss-dash-method ss-dash-method-${(P.value.method||"").toLowerCase()}`)},f(P.value.method),3),n("span",Xf,f(P.value.url),1),n("span",{class:F(`ss-dash-status ss-dash-status-${Math.floor((P.value.statusCode||200)/100)}xx`)},f(P.value.statusCode),3),n("span",Zf,f(P.value.totalDuration.toFixed(1))+"ms · "+f(P.value.spanCount)+" spans ",1)]),me(ca,{spans:P.value.spans,"total-duration":P.value.totalDuration,warnings:P.value.warnings},null,8,["spans","total-duration","warnings"])],64)):_.value?(u(),d(U,{key:1},[n("div",eh,[n("button",{type:"button",class:"ss-dash-btn",onClick:K[0]||(K[0]=se=>_.value=!1)}," ← Back to Requests ")]),K[6]||(K[6]=n("div",{class:"ss-dash-empty"},"Loading request detail...",-1))],64)):(u(),d(U,{key:2},[me(Ct,{"model-value":x.value,placeholder:"Filter requests...",summary:`${k(c).total??0} requests`,"onUpdate:modelValue":T},null,8,["model-value","summary"]),k(r)?(u(),d("div",th,"Failed to load requests")):te("",!0),k(i)&&!k(o)?(u(),d("div",sh,"Loading requests...")):(u(),d(U,{key:2},[n("div",nh,[R.value.length>0?(u(),d("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(),d("span",lh,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(),d("span",oh,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(),d("span",ah,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(),d("span",ih,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(),d("span",rh,f(k(g).direction==="asc"?" ▲":" ▼"),1)):te("",!0)])])]),n("tbody",null,[(u(!0),d(U,null,ye(R.value,se=>(u(),d("tr",{key:se.id,class:"ss-dash-clickable",onClick:be=>y(se)},[n("td",null,[n("span",ch,f(se.id),1)]),n("td",null,[n("span",{class:F(`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,dh)]),n("td",null,[n("span",{class:F(`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:F(`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",fh,f(se.span_count||se.spanCount||0),1)]),n("td",null,[(se.warning_count||se.warningCount||0)>0?(u(),d("span",hh,f(se.warning_count||se.warningCount||0),1)):(u(),d("span",ph,"-"))]),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,vh)])],8,uh))),128))])],512)):(u(),d("div",gh,"No requests recorded yet"))]),k(c).totalPages>1?(u(),Xe(Kt,{key:0,page:k(c).page,"last-page":k(c).totalPages,total:k(c).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),mh={class:"ss-dash-btn-group"},bh={key:0,class:"ss-dash-empty"},_h={key:1,class:"ss-dash-table-wrap"},xh={key:0,class:"ss-dash-sort-arrow"},wh={key:0,class:"ss-dash-sort-arrow"},$h={key:0,class:"ss-dash-sort-arrow"},kh=["onClick","onKeydown"],Sh={key:0,class:"ss-dash-dup"},Ch={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Th={class:"ss-dash-duration"},Eh={class:"ss-dash-duration"},Ph={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Ah={key:1,class:"ss-dash-empty"},Mh={class:"ss-dash-table-wrap"},Rh={key:0,class:"ss-dash-sort-arrow"},Lh={key:0,class:"ss-dash-sort-arrow"},Oh={style:{color:"var(--ss-dim)"}},Fh=["onClick","onKeydown"],Dh={key:0,class:"ss-dash-dup"},Ih=["title"],Bh={style:{color:"var(--ss-dim)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Nh=["title"],jh=["disabled","onClick"],Hh={key:0,class:"ss-dash-explain-row"},Uh={colspan:"8",class:"ss-dash-explain"},qh={style:{display:"flex","justify-content":"space-between","align-items":"start"}},Kh={style:{flex:"1"}},Vh={key:0,class:"ss-dash-explain-result ss-dash-explain-error"},zh={key:0},Wh={key:1,class:"ss-dash-explain-result"},Jh={key:2,class:"ss-dash-explain-result"},Qh={key:3,class:"ss-dash-explain-result"},Gh={key:1,class:"ss-dash-empty"};function da(e,t){if(!e)return null;const s=t*20,l=e["Node Type"]||"Unknown",a=e["Relation Name"]||"",o=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 c=e.Plans||[];return us("div",{class:"ss-dash-explain-node",style:{marginLeft:`${s}px`}},[us("div",{class:"ss-dash-explain-node-header"},[us("span",{class:"ss-dash-explain-node-type"},l),a?[" on ",us("strong",null,a)]:null,o||null,i?[" using ",us("em",null,i)]:null]),r.length>0?us("div",{class:"ss-dash-explain-metrics"},r.join(" · ")):null,...c.map((g,v)=>da(g,t+1))])}const fa=Fe({name:"ExplainPlanNode",props:{node:{type:Object,required:!0},depth:{type:Number,default:0}},setup(e){return()=>da(e.node,e.depth)}}),Yh=Fe({...{components:{ExplainPlanNode:fa}},__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),a=re("ss-base-url",""),o=J("list"),i=J(null),r=J(null),c=J(null),g=q(()=>o.value==="grouped"?"queries/grouped":"queries"),{data:v,loading:m,pagination:p,sort:x,goToPage:w,setSearch:_,setSort:P,explainQuery:R}=Ze(()=>g.value,{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),M=J(""),y=q(()=>v.value?o.value==="grouped"?v.value.groups||[]:v.value.data||v.value||[]:[]),$=q(()=>o.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>Zo&&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(o.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){M.value=E,_(E)}function L(E){E!==o.value&&(o.value=E,i.value=null,r.value=null,c.value=null)}function K(E){P(E)}async function se(E){if(r.value&&r.value.queryId===E){r.value=null;return}c.value=E;try{const C=await R(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{c.value=null}}function be(E){const C=sn(E);return C==="very-slow"?"ss-dash-very-slow":C==="slow"?"ss-dash-slow":""}function Me(){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(),d("div",null,[me(Ct,{"model-value":M.value,placeholder:"Filter queries...",summary:V.value,"onUpdate:modelValue":G},{default:es(()=>[n("div",mh,[n("button",{type:"button",class:F(`ss-dash-btn ${o.value==="list"?"ss-dash-active":""}`),onClick:C[0]||(C[0]=S=>L("list"))}," List ",2),n("button",{type:"button",class:F(`ss-dash-btn ${o.value==="grouped"?"ss-dash-active":""}`),onClick:C[1]||(C[1]=S=>L("grouped"))}," Grouped ",2)])]),_:1},8,["model-value","summary"]),k(m)&&!k(v)?(u(),d("div",bh,"Loading queries...")):o.value==="grouped"?(u(),d("div",_h,[$.value.length>0?(u(),d("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(x).column==="count"?(u(),d("span",xh,f(k(x).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(x).column==="avgDuration"?(u(),d("span",wh,f(k(x).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(x).column==="totalDuration"?(u(),d("span",$h,f(k(x).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[14]||(C[14]=n("th",null,"% Time",-1))])]),n("tbody",null,[(u(!0),d(U,null,ye($.value,(S,H)=>(u(),d("tr",{key:H},[n("td",null,[n("span",{class:F(`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:Ts(ne=>i.value=i.value===S.sqlNormalized?null:S.sqlNormalized,["enter"])},f(S.sqlNormalized),43,kh),(S.count||0)>=3?(u(),d("span",Sh,"DUP")):te("",!0)]),n("td",null,[n("span",Ch,f(S.count||0),1)]),n("td",null,[n("span",{class:F(`ss-dash-duration ${be(S.avgDuration||0)}`)},f((S.avgDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Th,f((S.minDuration||0).toFixed(2))+"ms",1)]),n("td",null,[n("span",{class:F(`ss-dash-duration ${be(S.maxDuration||0)}`)},f((S.maxDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Eh,f((S.totalDuration||0).toFixed(1))+"ms",1)]),n("td",null,[n("span",Ph,f((S.percentOfTotal||0).toFixed(1))+"%",1)])]))),128))])],512)):(u(),d("div",Ah,"No queries recorded"))])):(u(),d(U,{key:2},[n("div",Mh,[$.value.length>0?(u(),d("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(x).column==="duration"?(u(),d("span",Rh,f(k(x).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(x).column==="createdAt"?(u(),d("span",Lh,f(k(x).direction==="asc"?" ▲":" ▼"),1)):te("",!0)]),C[22]||(C[22]=n("th",null,null,-1))])]),n("tbody",null,[(u(!0),d(U,null,ye($.value,S=>(u(),d(U,{key:S.id},[n("tr",null,[n("td",null,[n("span",Oh,f(S.id),1)]),n("td",null,[n("div",null,[n("span",{class:F(`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:Ts(H=>i.value=i.value===S.id?null:S.id,["enter"])},f(S.sql||S.sql_text||""),43,Fh),(T.value.get((S.sqlNormalized||S.sql||S.sql_text)??"")??0)>1?(u(),d("span",Dh," ×"+f(T.value.get((S.sqlNormalized||S.sql||S.sql_text)??"")),1)):te("",!0)])]),n("td",null,[n("span",{class:F(`ss-dash-duration ${be(S.duration||0)}`)},f((S.duration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",{class:F(`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,Ih)]),n("td",null,[n("span",Bh,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,Nh)]),n("td",null,[(S.method||S.sql_method||"")==="select"?(u(),d("button",{key:0,type:"button",class:F(`ss-dash-explain-btn${r.value?.queryId===S.id&&!r.value?.error?" ss-dash-explain-btn-active":""}`),disabled:c.value===S.id,onClick:mt(H=>se(S.id),["stop"])},f(c.value===S.id?"...":"EXPLAIN"),11,jh)):te("",!0)])]),r.value&&r.value.queryId===S.id?(u(),d("tr",Hh,[n("td",Uh,[n("div",qh,[n("div",Kh,[r.value.error?(u(),d("div",Vh,[C[23]||(C[23]=n("strong",null,"Error:",-1)),_e(" "+f(r.value.error)+" ",1),r.value.message?(u(),d("br",zh)):te("",!0),_e(" "+f(r.value.message),1)])):Re()?(u(),d("div",Wh,[me(k(fa),{node:ge(),depth:0},null,8,["node"])])):r.value.plan&&r.value.plan.length>0&&typeof r.value.plan[0]=="object"?(u(),d("div",Jh,[n("table",null,[n("thead",null,[n("tr",null,[(u(!0),d(U,null,ye(Me(),H=>(u(),d("th",{key:H},f(H),1))),128))])]),n("tbody",null,[(u(!0),d(U,null,ye(r.value.plan,(H,ne)=>(u(),d("tr",{key:ne},[(u(!0),d(U,null,ye(Me(),Te=>(u(),d("td",{key:Te},f(Le(H,Te)),1))),128))]))),128))])])])):(u(),d("div",Qh,"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(),d("div",Gh,"No queries recorded"))]),k(p).totalPages>1?(u(),Xe(Kt,{key:0,page:k(p).page,"last-page":k(p).totalPages,total:k(p).total,onPageChange:k(w)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}}),Xh=Object.freeze(Object.defineProperty({__proto__:null,default:Yh},Symbol.toStringTag,{value:"Module"})),al=Fe({__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 nn(JSON.parse(t.value),t.maxLen||100)}catch{return t.value.length>100?t.value.slice(0,100)+"...":t.value}return nn(t.value,t.maxLen||100)}),a=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 o(){s.value=!s.value}function i(){navigator.clipboard?.writeText(a.value)}return(r,c)=>e.value===null||e.value===void 0?(u(),d("span",{key:0,class:F(`ss-dim ${t.classPrefix}-c-dim`)},"-",2)):(u(),d("div",{key:1,class:F(`${t.classPrefix}-data-cell`)},[n("span",{class:F(`${t.classPrefix}-data-preview`),role:"button",tabindex:0,onClick:o,onKeydown:c[0]||(c[0]=g=>g.key==="Enter"&&o())},f(l.value),35),s.value?(u(),d("div",{key:0,class:F(`${t.classPrefix}-data-full`),onClick:o},[n("button",{class:F(`${t.classPrefix}-copy-btn`),title:"Copy to clipboard",onClick:mt(i,["stop"])}," Copy ",2),n("pre",null,f(a.value),1)],2)):te("",!0)],2))}}),Zh={key:0,class:"ss-dash-empty"},ep={class:"ss-dash-table-wrap"},tp={style:{color:"var(--ss-dim)"}},sp=["title"],np=["title"],lp={key:1,class:"ss-dash-empty"},op=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,pagination:r,goToPage:c,setSearch:g}=Ze(()=>"events",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),v=J(""),m=q(()=>{if(!o.value)return[];const w=o.value;return w.data||w.events||o.value||[]});function p(w){v.value=w,g(w)}const{tableRef:x}=Bt(()=>m.value);return(w,_)=>(u(),d("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(o)?(u(),d("div",Zh,"Loading events...")):(u(),d(U,{key:1},[n("div",ep,[m.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:x,class:"ss-dash-table"},[_[0]||(_[0]=n("colgroup",null,[n("col",{style:{width:"40px"}}),n("col"),n("col"),n("col",{style:{width:"80px"}})],-1)),_[1]||(_[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),d(U,null,ye(m.value,P=>(u(),d("tr",{key:P.id},[n("td",null,[n("span",tp,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,sp)]),n("td",null,[me(al,{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,np)])]))),128))])],512)):(u(),d("div",lp,"No events recorded yet"))]),k(r).totalPages>1?(u(),Xe(Kt,{key:0,page:k(r).page,"last-page":k(r).totalPages,total:k(r).total,onPageChange:k(c)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),ap={key:0,class:"ss-dash-empty"},ip={key:1,class:"ss-dash-empty"},rp={key:2,class:"ss-dash-table-wrap"},up=["title"],cp=["title"],dp=["title"],fp=["title"],hp={key:1,class:"ss-dash-empty"},pp=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,error:r,setSearch:c}=Ze(()=>"routes",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=J(""),v=q(()=>{if(!o.value)return[];const x=o.value;return Array.isArray(x)?x:Array.isArray(x.routes)?x.routes:Array.isArray(x.data)?x.data:[]});function m(x){g.value=x,c(x)}const{tableRef:p}=Bt(()=>v.value);return(x,w)=>(u(),d("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(),d("div",ap,"Failed to load routes")):k(i)&&!k(o)?(u(),d("div",ip,"Loading routes...")):(u(),d("div",rp,[v.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:p,class:"ss-dash-table"},[w[0]||(w[0]=n("colgroup",null,[n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"120px"}}),n("col"),n("col")],-1)),w[1]||(w[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),d(U,null,ye(v.value,(_,P)=>(u(),d("tr",{key:_.pattern||P},[n("td",null,[n("span",{class:F(`ss-dash-method ss-dash-method-${(_.method||"").toLowerCase()}`)},f(_.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.pattern},f(_.pattern),9,up)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.name||"-"},f(_.name||"-"),9,cp)]),n("td",null,[n("span",{style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.handler},f(_.handler),9,dp)]),n("td",null,[n("span",{style:{color:"var(--ss-dim)","font-size":"10px",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.middleware?.length?_.middleware.join(", "):"-"},f(_.middleware?.length?_.middleware.join(", "):"-"),9,fp)])]))),128))])],512)):(u(),d("div",hp,"No routes available"))]))]))}})},Symbol.toStringTag,{value:"Module"})),vp={class:"ss-dash-log-filters"},gp=["onClick"],yp=["value"],mp={class:"ss-dash-structured-search"},bp=["value"],_p=["value"],xp=["value"],wp={key:0,class:"ss-dash-filter-chips"},$p={key:0,class:"ss-dash-filter-chip"},kp={key:1,class:"ss-dash-filter-chip"},Sp=["onClick"],Cp={key:1,class:"ss-dash-empty"},Tp={key:2,class:"ss-dash-empty"},Ep={key:3,class:"ss-dash-empty"},Pp={key:4,class:"ss-dash-log-entries"},Ap=["title"],Mp=["title","onClick","onKeydown"],Rp={key:1,class:"ss-dash-log-reqid-empty"},Lp={class:"ss-dash-log-msg"},Op=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,error:r,pagination:c,filter:g,goToPage:v,setSearch:m,setFilter:p,refresh:x}=Ze(()=>"logs",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),w=J(""),_=J("all"),P=J(""),R=J(""),M=J([]),y=J("level"),$=J("equals"),T=J(""),Q=q(()=>{if(!o.value)return[];const C=o.value;return C.data||C.logs||o.value||[]}),V=q(()=>_.value!=="all"||P.value!==""||M.value.length>0);function G(C){w.value=C,m(C)}function L(C){_.value=C,C==="all"?p("level",""):p("level",C)}function K(C){P.value=C,R.value=C,p("request_id",C)}function se(){const C=R.value.trim();P.value=C,p("request_id",C)}function be(){P.value="",R.value="",p("request_id","")}function Me(){_.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];M.value.forEach((S,H)=>{C[`filter_field_${H}`]=S.field,C[`filter_op_${H}`]=S.operator,C[`filter_value_${H}`]=S.value}),c.page=1,x()}function Re(){const C=T.value.trim();C&&(M.value.push({field:y.value,operator:$.value,value:C}),T.value="",Le())}function ge(C){M.value.splice(C,1),Le()}function de(C){return C.target.value}function E(C){return C.target.value}return(C,S)=>(u(),d("div",null,[me(Ct,{"model-value":w.value,placeholder:"Search logs...",summary:`${k(c).total??0} logs`,"onUpdate:modelValue":G},{default:es(()=>[n("div",vp,[(u(!0),d(U,null,ye(k(wu),H=>(u(),d("button",{key:H,type:"button",class:F(`ss-dash-log-filter ${_.value===H?"ss-dash-active":""}`),onClick:ne=>L(H)},f(H),11,gp))),128)),n("input",{type:"text",class:"ss-dash-filter-input ss-dash-reqid-input",placeholder:"Filter by request ID...",value:R.value,onInput:S[0]||(S[0]=H=>R.value=de(H)),onKeydown:Ts(se,["enter"])},null,40,yp),R.value||P.value?(u(),d("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",mp,[n("select",{class:"ss-dash-filter-select",value:y.value,onChange:S[1]||(S[1]=H=>y.value=E(H))},[...S[4]||(S[4]=[ir('<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,bp),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,_p),n("input",{class:"ss-dash-filter-input",placeholder:"Value...",value:T.value,onInput:S[3]||(S[3]=H=>T.value=de(H)),onKeydown:Ts(Re,["enter"])},null,40,xp),n("button",{type:"button",class:"ss-dash-btn",onClick:Re},"Add")]),V.value?(u(),d("div",wp,[_.value!=="all"?(u(),d("span",$p,[_e(" level: "+f(_.value)+" ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:Me}," × ")])):te("",!0),P.value?(u(),d("span",kp,[_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),d(U,null,ye(M.value,(H,ne)=>(u(),d("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,Sp)]))),128))])):te("",!0),k(r)?(u(),d("div",Cp,"Failed to load logs")):k(i)&&!k(o)?(u(),d("div",Tp,"Loading logs...")):Q.value.length===0?(u(),d("div",Ep," No log entries"+f(P.value?` matching request ${P.value}`:_.value!=="all"?` for ${_.value}`:""),1)):(u(),d("div",Pp,[(u(!0),d(U,null,ye(Q.value,(H,ne)=>(u(),d("div",{key:String(H.id||ne),class:"ss-dash-log-entry"},[n("span",{class:F(`ss-dash-log-level ${k(ku)(k(la)(H),"ss-dash-log-level")}`)},f(k(la)(H).toUpperCase()),3),n("span",{class:"ss-dash-log-time",title:k(ln)(H)?k(It)(k(ln)(H)):""},f(k(ln)(H)?k(bt)(k(ln)(H)):"-"),9,Ap),k(Ps)(H)?(u(),d("span",{key:0,class:"ss-dash-log-reqid",title:k(Ps)(H),role:"button",tabindex:"0",onClick:Te=>K(k(Ps)(H)),onKeydown:Ts(Te=>K(k(Ps)(H)),["enter"])},f(k(Ps)(H).slice(0,8)),41,Mp)):(u(),d("span",Rp,"--")),n("span",Lp,f(k($u)(H)),1)]))),128))])),k(c).totalPages>1?(u(),Xe(Kt,{key:5,page:k(c).page,"last-page":k(c).totalPages,total:k(c).total,onPageChange:k(v)},null,8,["page","last-page","total","onPageChange"])):te("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Fp={key:0,class:"ss-dash-email-preview",id:"ss-dash-email-preview"},Dp={class:"ss-dash-email-preview-header"},Ip={class:"ss-dash-email-preview-meta",id:"ss-dash-email-preview-meta"},Bp=["srcdoc"],Np={key:0,class:"ss-dash-empty"},jp={class:"ss-dash-table-wrap"},Hp=["onClick"],Up={style:{color:"var(--ss-dim)"}},qp=["title"],Kp=["title"],Vp=["title"],zp={key:0,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Wp={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Jp=["title"],Qp=["title"],Gp={key:1,class:"ss-dash-empty"},Yp=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,pagination:r,goToPage:c,setSearch:g,fetchEmailPreview:v}=Ze(()=>"emails",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),m=J(""),p=J(null),x=J(null),w=q(()=>{if(!o.value)return[];const y=o.value;return y.data||y.emails||o.value||[]});function _(y){m.value=y,g(y)}async function P(y){if(y.html){p.value=y.id,x.value=y.html;return}const $=await v(y.id);p.value=y.id,x.value=$}function R(){p.value=null,x.value=null}const{tableRef:M}=Bt(()=>w.value);return(y,$)=>(u(),d("div",null,[p.value&&x.value?(u(),d("div",Fp,[n("div",Dp,[n("div",Ip,[w.value.find(T=>T.id===p.value)?(u(),d(U,{key:0},[$[4]||($[4]=n("strong",null,"Subject:",-1)),_e(" "+f(w.value.find(T=>T.id===p.value)?.subject)+"   |  ",1),$[5]||($[5]=n("strong",null,"From:",-1)),_e(" "+f(w.value.find(T=>T.id===p.value)?.from_addr||w.value.find(T=>T.id===p.value)?.from)+"   |  ",1),$[6]||($[6]=n("strong",null,"To:",-1)),_e(" "+f(w.value.find(T=>T.id===p.value)?.to_addr||w.value.find(T=>T.id===p.value)?.to)+" ",1),w.value.find(T=>T.id===p.value)?.cc||w.value.find(T=>T.id===p.value)?.cc_addr?(u(),d(U,{key:0},[$[0]||($[0]=_e("   |  ",-1)),$[1]||($[1]=n("strong",null,"CC:",-1)),_e(" "+f(w.value.find(T=>T.id===p.value)?.cc||w.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:F(`ss-dash-badge ss-dash-email-status-${w.value.find(T=>T.id===p.value)?.status}`)},f(w.value.find(T=>T.id===p.value)?.status),3),w.value.find(T=>T.id===p.value)?.mailer?(u(),d(U,{key:1},[$[2]||($[2]=_e("   |  ",-1)),$[3]||($[3]=n("strong",null,"Mailer:",-1)),_e(" "+f(w.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:R}," Close ")]),n("iframe",{class:"ss-dash-email-iframe",id:"ss-dash-email-iframe",srcdoc:x.value,title:"Email preview",sandbox:""},null,8,Bp)])):(u(),d(U,{key:1},[me(Ct,{"model-value":m.value,placeholder:"Filter emails...",summary:`${k(r).total??0} emails`,"onUpdate:modelValue":_},null,8,["model-value","summary"]),k(i)&&!k(o)?(u(),d("div",Np,"Loading emails...")):(u(),d(U,{key:1},[n("div",jp,[w.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:M,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),d(U,null,ye(w.value,T=>(u(),d("tr",{key:T.id,class:"ss-dash-clickable ss-dash-email-row",onClick:Q=>P(T)},[n("td",null,[n("span",Up,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,qp)]),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,Kp)]),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,Vp)]),n("td",null,[n("span",{class:F(`ss-dash-badge ss-dash-email-status-${T.status||""}`)},f(T.status),3)]),n("td",null,[(T.attachment_count||T.attachmentCount||0)>0?(u(),d("span",zp,f(T.attachment_count||T.attachmentCount||0),1)):(u(),d("span",Wp,"-"))]),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,Jp)]),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,Qp)])],8,Hp))),128))])],512)):(u(),d("div",Gp,"No emails captured yet"))]),k(r).totalPages>1?(u(),Xe(Kt,{key:0,page:k(r).page,"last-page":k(r).totalPages,total:k(r).total,onPageChange:k(c)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),Xp={key:0,class:"ss-dash-empty"},Zp={class:"ss-dash-tl-detail-header"},ev={style:{color:"var(--ss-text)"}},tv={class:"ss-dash-tl-meta"},sv={key:0,class:"ss-dash-empty"},nv={key:1,class:"ss-dash-empty"},lv={class:"ss-dash-table-wrap"},ov=["onClick"],av={style:{color:"var(--ss-dim)"}},iv=["title"],rv={style:{color:"var(--ss-muted)","text-align":"center"}},uv=["title"],cv={key:1,class:"ss-dash-empty"},dv=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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"),a=re("ss-auth-token",void 0),o=re("ss-base-url",""),{data:i,loading:r,error:c,pagination:g,goToPage:v,setSearch:m}=Ze(()=>"traces",{baseUrl:o,dashboardEndpoint:l,authToken:a,refreshKey:s}),p=J(""),x=J(null),w=J(null),_=J(!1),P=q(()=>{if(!i.value)return[];const V=i.value;return V.data||V.traces||i.value||[]}),R=rn(o,a);async function M(V){x.value=V,_.value=!0,w.value=null;try{const G=l||"/__stats/api",L=await R().fetch(`${G}/traces/${V}`);w.value=L}catch{}finally{_.value=!1}}function y(){x.value=null,w.value=null}function $(V){p.value=V,m(V)}function T(V){const G=sn(V);return G==="very-slow"?"ss-dash-very-slow":G==="slow"?"ss-dash-slow":""}const{tableRef:Q}=Bt(()=>P.value);return(V,G)=>(u(),d("div",null,[t.tracingEnabled?x.value&&w.value?(u(),d(U,{key:1},[n("div",Zp,[n("button",{type:"button",class:"ss-dash-btn",onClick:y},"← Back"),n("span",{class:F(`ss-dash-method ss-dash-method-${(w.value.method||"").toLowerCase()}`)},f(w.value.method),3),n("span",ev,f(w.value.url),1),n("span",{class:F(`ss-dash-status ss-dash-status-${Math.floor((w.value.status_code||w.value.statusCode||0)/100)}xx`)},f(w.value.status_code||w.value.statusCode||0),3),n("span",tv,f((w.value.total_duration||w.value.totalDuration||0).toFixed(1))+"ms · "+f(w.value.spanCount??k(nl)(w.value.spans).length)+" spans ",1)]),me(ca,{spans:k(nl)(w.value.spans),"total-duration":w.value.total_duration||w.value.totalDuration||0,warnings:k(oa)(w.value.warnings)},null,8,["spans","total-duration","warnings"])],64)):x.value&&_.value?(u(),d(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(),d(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(c)?(u(),d("div",sv,"Failed to load traces")):te("",!0),k(r)&&!k(i)?(u(),d("div",nv,"Loading traces...")):(u(),d(U,{key:2},[n("div",lv,[P.value.length>0?(u(),d("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),d(U,null,ye(P.value,L=>(u(),d("tr",{key:L.id,class:"ss-dash-clickable",onClick:K=>M(L.id)},[n("td",null,[n("span",av,f(L.id),1)]),n("td",null,[n("span",{class:F(`ss-dash-method ss-dash-method-${(L.method||"").toLowerCase()}`)},f(L.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:L.url},f(L.url),9,iv)]),n("td",null,[n("span",{class:F(`ss-dash-status ss-dash-status-${Math.floor((L.statusCode||L.status_code||0)/100)}xx`)},f(L.statusCode||L.status_code||0),3)]),n("td",null,[n("span",{class:F(`ss-dash-duration ${T(L.totalDuration||L.total_duration||0)}`)},f((L.totalDuration||L.total_duration||0).toFixed(1))+"ms ",3)]),n("td",null,[n("span",rv,f(L.spanCount||L.span_count||0),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",title:k(It)(L.createdAt||L.created_at||L.timestamp)},f(k(bt)(L.createdAt||L.created_at||L.timestamp)),9,uv)])],8,ov))),128))])],512)):(u(),d("div",cv,"No traces recorded"))]),k(g).totalPages>1?(u(),Xe(Kt,{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(),d("div",Xp," Tracing is not enabled. Enable tracing in your server-stats config to use the timeline. "))]))}})},Symbol.toStringTag,{value:"Module"})),fv={key:0,class:"ss-dash-cache-stats"},hv={class:"ss-dash-cache-stat"},pv={class:"ss-dash-cache-stat-value"},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={key:1,class:"ss-dash-empty"},wv={key:2,class:"ss-dash-empty"},$v={key:3,class:"ss-dash-table-wrap"},kv=["onClick"],Sv=["title"],Cv={style:{color:"var(--ss-muted)"}},Tv=["onClick"],Ev={key:1,class:"ss-dash-empty"},Pv={key:4,class:"ss-dash-cache-detail"},Av={key:0,class:"ss-dash-empty"},Mv={key:1,class:"ss-dash-empty",style:{color:"var(--ss-red-fg)"}},Rv=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,setSearch:r,mutate:c}=Ze(()=>"cache",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=rn(a||"",l),v=new sa(g(),s||"/__stats/api"),m=J(""),p=J(null),x=J(null),w=J(!1),_=J(null),P=q(()=>o.value),R=q(()=>P.value?.keys||P.value?.data||[]);function M(Q){m.value=Q,r(Q)}async function y(Q){if(confirm(`Delete cache key "${Q}"?`))try{await c(`cache/${encodeURIComponent(Q)}`,"delete"),p.value===Q&&(p.value=null,x.value=null,_.value=null)}catch{}}const{tableRef:$}=Bt(()=>R.value);async function T(Q){if(p.value===Q){p.value=null,x.value=null,_.value=null;return}p.value=Q,x.value=null,_.value=null,w.value=!0;try{const V=await v.fetchCacheKey(Q);x.value=V.value!==void 0?V.value:V.data!==void 0?V.data:V,_.value=null}catch{x.value=null,_.value="Failed to fetch key value"}finally{w.value=!1}}return(Q,V)=>(u(),d("div",null,[P.value?.available&&P.value?.stats?(u(),d("div",fv,[n("div",hv,[V[0]||(V[0]=n("span",{class:"ss-dash-cache-stat-label"},"Hit Rate:",-1)),n("span",pv,f((P.value.stats.hitRate??0).toFixed(1))+"%",1)]),n("div",vv,[V[1]||(V[1]=n("span",{class:"ss-dash-cache-stat-label"},"Hits:",-1)),n("span",gv,f(P.value.stats.hits??0),1)]),n("div",yv,[V[2]||(V[2]=n("span",{class:"ss-dash-cache-stat-label"},"Misses:",-1)),n("span",mv,f(P.value.stats.misses??0),1)]),n("div",bv,[V[3]||(V[3]=n("span",{class:"ss-dash-cache-stat-label"},"Keys:",-1)),n("span",_v,f(P.value.stats.totalKeys||P.value.stats.keyCount||R.value.length||0),1)])])):te("",!0),me(Ct,{"model-value":m.value,placeholder:"Filter cache keys...",summary:`${R.value.length} keys`,"onUpdate:modelValue":M},null,8,["model-value","summary"]),k(i)&&!k(o)?(u(),d("div",xv,"Loading cache...")):!P.value||!P.value.available?(u(),d("div",wv," Cache inspector not available ")):(u(),d("div",$v,[R.value.length>0?(u(),d("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),d(U,null,ye(R.value,G=>(u(),d("tr",{key:G.key,class:"ss-dash-clickable",onClick:L=>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,Sv)]),n("td",null,[n("span",Cv,f(G.type),1)]),n("td",null,f(G.size!==null&&G.size!==void 0&&G.size>0?k(du)(G.size):"-"),1),n("td",null,f(G.ttl>0?k(cu)(G.ttl):"-"),1),n("td",null,[n("button",{type:"button",class:"ss-dash-retry-btn",onClick:mt(L=>y(G.key),["stop"])}," Delete ",8,Tv)])],8,kv))),128))])],512)):(u(),d("div",Ev,"No cache keys found"))])),p.value?(u(),d("div",Pv,[n("h4",null,"Key: "+f(p.value),1),w.value?(u(),d("div",Av,"Loading value...")):_.value?(u(),d("div",Mv,f(_.value),1)):(u(),Xe(al,{key:2,value:x.value},null,8,["value"]))])):te("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Lv={key:0,class:"ss-dash-job-stats"},Ov={class:"ss-dash-job-stat"},Fv={class:"ss-dash-job-stat-value"},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",style:{color:"var(--ss-red-fg)"}},Kv={class:"ss-dash-btn-group"},Vv=["onClick"],zv={key:1,class:"ss-dash-empty"},Wv={key:2,class:"ss-dash-empty"},Jv={class:"ss-dash-table-wrap"},Qv={style:{color:"var(--ss-dim)"}},Gv=["title"],Yv={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Xv={class:"ss-dash-duration"},Zv=["title"],eg=["disabled","onClick"],tg={key:1,class:"ss-dash-empty"},sg=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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),a=re("ss-base-url",""),{data:o,loading:i,error:r,pagination:c,goToPage:g,setSearch:v,setFilter:m,refresh:p,mutate:x}=Ze(()=>"jobs",{baseUrl:a,dashboardEndpoint:s,authToken:l,refreshKey:t}),w=J(""),_=J("all"),P=J({}),R=q(()=>Tu(o.value)),M=q(()=>Eu(o.value));function y(V){w.value=V,v(V)}function $(V){_.value=V,V==="all"?m("status",""):m("status",V)}const{tableRef:T}=Bt(()=>R.value);async function Q(V){P.value[V]="pending";try{await x(`jobs/${V}/retry`),P.value[V]="success",setTimeout(()=>{delete P.value[V],p()},1e3)}catch{delete P.value[V]}}return(V,G)=>(u(),d("div",null,[M.value?(u(),d("div",Lv,[n("div",Ov,[G[0]||(G[0]=n("span",{class:"ss-dash-job-stat-label"},"Active:",-1)),n("span",Fv,f(M.value.active??0),1)]),n("div",Dv,[G[1]||(G[1]=n("span",{class:"ss-dash-job-stat-label"},"Waiting:",-1)),n("span",Iv,f(M.value.waiting??0),1)]),n("div",Bv,[G[2]||(G[2]=n("span",{class:"ss-dash-job-stat-label"},"Delayed:",-1)),n("span",Nv,f(M.value.delayed??0),1)]),n("div",jv,[G[3]||(G[3]=n("span",{class:"ss-dash-job-stat-label"},"Completed:",-1)),n("span",Hv,f(M.value.completed??0),1)]),n("div",Uv,[G[4]||(G[4]=n("span",{class:"ss-dash-job-stat-label"},"Failed:",-1)),n("span",qv,f(M.value.failed??0),1)])])):te("",!0),me(Ct,{"model-value":w.value,placeholder:"Filter jobs...",summary:`${k(c).total||R.value.length} jobs`,"onUpdate:modelValue":y},{default:es(()=>[n("div",Kv,[(u(!0),d(U,null,ye(k(Su),L=>(u(),d("button",{key:L,type:"button",class:F(`ss-dash-btn ${_.value===L?"ss-dash-active":""}`),onClick:K=>$(L)},f(L.charAt(0).toUpperCase()+L.slice(1)),11,Vv))),128))])]),_:1},8,["model-value","summary"]),k(i)&&!k(o)?(u(),d("div",zv,"Loading jobs...")):k(r)?(u(),d("div",Wv,"Jobs/Queue not available")):(u(),d(U,{key:3},[n("div",Jv,[R.value.length>0?(u(),d("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),d(U,null,ye(R.value,L=>(u(),d("tr",{key:L.id},[n("td",null,[n("span",Qv,f(L.id),1)]),n("td",null,[n("span",{style:{color:"var(--ss-text)"},title:L.name},f(L.name),9,Gv)]),n("td",null,[n("span",{class:F(`ss-dash-badge ss-dash-badge-${k(Cu)(L.status)}`)},f(L.status),3)]),n("td",null,[me(al,{value:L.payload||L.data,"max-len":60},null,8,["value"])]),n("td",null,[n("span",Yv,f(L.attempts||L.attemptsMade||0),1)]),n("td",null,[n("span",Xv,f(L.duration!==null&&L.duration!==void 0?k(Dt)(L.duration):"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:k(It)(L.timestamp||L.createdAt||L.processedAt||L.created_at)},f(k(bt)(L.timestamp||L.createdAt||L.processedAt||L.created_at)),9,Zv)]),n("td",null,[L.status==="failed"?(u(),d("button",{key:0,type:"button",class:"ss-dash-retry-btn",disabled:P.value[L.id]==="pending"||P.value[L.id]==="success",onClick:mt(K=>Q(L.id),["stop"])},f(P.value[L.id]==="pending"?"...":P.value[L.id]==="success"?"OK":"Retry"),9,eg)):te("",!0)])]))),128))])],512)):(u(),d("div",tg,"No jobs found"))]),k(c).totalPages>1?(u(),Xe(Kt,{key:0,page:k(c).page,"last-page":k(c).totalPages,total:k(c).total,onPageChange:k(g)},null,8,["page","last-page","total","onPageChange"])):te("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),ng={style:{position:"relative",flex:1}},lg=["value"],og=["title","onClick"],ag=["viewBox","innerHTML"],ig=["viewBox","innerHTML"],rg=["onClick"],ug={key:0},cg=["title","onClick"],dg=["viewBox","innerHTML"],fg=["viewBox","innerHTML"],hg=["onClick"],pg={key:0},vg={style:{padding:"4px 16px",fontSize:"10px",color:"var(--ss-muted)"}},gg=["onClick"],yg=["title"],mg=["title"],bg=["title","onClick"],_g=["viewBox","innerHTML"],xg=["viewBox","innerHTML"],wg=["onClick"],$g=["title","onClick"],kg=["viewBox","innerHTML"],Sg=["viewBox","innerHTML"],Cg={key:1,style:{color:"var(--ss-dim)"}},Tg={key:3,style:{color:"var(--ss-amber-fg)"}},Eg={key:4,style:{color:"var(--ss-purple-fg)"}},Pg={key:5},Ag=["onClick"],ue="ss-dash",Mg=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__name:"ConfigSection",setup(e){const t=re("ss-refresh-key",J(0)),s=re("ss-base-url",""),l=re("ss-dashboard-endpoint","/__stats/api"),a=re("ss-auth-token",void 0),{data:o,loading:i}=Ze(()=>"config",{baseUrl:s,dashboardEndpoint:l,authToken:a,refreshKey:t}),r=J(""),c=J(""),g=J("app"),v=J(new Set),m=J("Copy JSON"),p=J(new Set),x=J(new Map);let w=null;function _(X){r.value=X,w&&clearTimeout(w),w=setTimeout(()=>{c.value=X},200)}function P(X){return X.target.value}const R=q(()=>o.value??null),M=q(()=>{const X=R.value?.env??{},ie=c.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=R.value?.app??{},ie=c.value.toLowerCase();return on(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=R.value?.app??{};return on(X,"").length}),T=q(()=>{const X=R.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(!R.value)return;const X=g.value==="app"?R.value.app:R.value.env;if(!X)return;const ie=Vu(X);v.value=new Set(ie)}function G(){v.value=new Set}function L(){if(!R.value)return;const X=g.value==="app"?R.value.app:R.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){x.value.set(X,ie)}function be(X,ie,z){z.stopPropagation(),zu(X,x.value.get(ie)??null,ue)}function Me(X){return X!==null&&typeof X=="object"&&!Array.isArray(X)&&!De(X)}function Le(X,ie){return on(X,ie)}function Re(X,ie){return X.indexOf(ie+".")===0?X.slice(ie.length+1):X}function ge(X){return Ku(X)}function de(X){return De(X)?X.display:X==null?"null":String(X)}function E(X){const ie=R.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="",c.value=""}function H(X){return De(X)?X.display:""}const ne=q(()=>Ae.eye.elements.join("")),Te=q(()=>Ae["eye-off"].elements.join(""));return(X,ie)=>(u(),d("div",null,[n("div",{class:F(`${ue}-config-toolbar`),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px"}},[n("button",{type:"button",class:F(`${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:F(`${ue}-config-tab${g.value==="env"?` ${ue}-active`:""}`),onClick:ie[1]||(ie[1]=z=>g.value="env")}," Env ",2),n("div",ng,[n("input",{type:"text",class:F(`${ue}-search`),placeholder:"Search keys and values...",value:r.value,style:{width:"100%"},onInput:ie[2]||(ie[2]=z=>_(P(z)))},null,42,lg),r.value?(u(),d("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"&&!c.value?(u(),d(U,{key:0},[n("button",{type:"button",class:F(`${ue}-btn`),onClick:V},"Expand All",2),n("button",{type:"button",class:F(`${ue}-btn`),onClick:G},"Collapse All",2)],64)):te("",!0),n("button",{type:"button",class:F(`${ue}-btn`),onClick:L},f(m.value),3)],2),k(i)&&!k(o)?(u(),d("div",{key:0,class:F(`${ue}-empty`)},"Loading config...",2)):R.value?g.value==="env"?(u(),d("div",{key:2,class:F(`${ue}-config-table-wrap`)},[n("table",{class:F(`${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),d(U,null,ye(M.value,([z,oe])=>(u(),d("tr",{key:z},[n("td",{class:F(`${ue}-env-key`)},[n("span",{class:F(`${ue}-config-key`)},f(z),3)],2),n("td",{class:F(`${ue}-env-val`)},[k(De)(oe)?(u(),d("span",{key:0,class:F(`${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:F(`${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(),d("svg",{key:0,width:"14",height:"14",viewBox:k(Ae)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,ag)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:k(Ae).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,ig))],10,og)],2)):(u(),d("span",{key:1,class:F(`${ue}-config-val`)},f(de(oe)),3))],2),n("td",null,[k(De)(oe)?te("",!0):(u(),d("button",{key:0,type:"button",class:F(`${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,rg))])]))),128)),M.value.length===0?(u(),d("tr",ug,[...ie[3]||(ie[3]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching variables ",-1)])])):te("",!0)])],2)],2)):c.value?(u(),d("div",{key:3,class:F(`${ue}-config-table-wrap`)},[n("table",{class:F(`${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),d(U,null,ye(y.value,z=>(u(),d("tr",{key:z.path},[n("td",null,[n("span",{class:F(`${ue}-config-key`),style:{whiteSpace:"nowrap"}},f(z.path),3)]),n("td",null,[k(De)(z.value)?(u(),d("span",{key:0,class:F(`${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:F(`${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(),d("svg",{key:0,width:"14",height:"14",viewBox:k(Ae)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,dg)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:k(Ae).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,fg))],10,cg)],2)):(u(),d("span",{key:1,class:F(`${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(),d("button",{key:0,type:"button",class:F(`${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,hg))])]))),128)),y.value.length===0?(u(),d("tr",pg,[...ie[5]||(ie[5]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching entries ",-1)])])):te("",!0)])],2),n("div",vg,f(y.value.length)+" of "+f($.value)+" entries ",1)],2)):(u(),d("div",{key:4,class:F(`${ue}-config-table-wrap`)},[n("div",{class:F(`${ue}-config-sections`)},[(u(!0),d(U,null,ye(T.value,z=>(u(),d("div",{key:z,class:F(`${ue}-config-section`)},[Me(E(z))?(u(),d(U,{key:0},[n("div",{class:F(`${ue}-config-section-header`),style:{cursor:"pointer"},onClick:oe=>Q(z)},[n("span",{class:F(`${ue}-config-toggle`)},f(v.value.has(z)?"▼":"▶"),3),n("span",{class:F(`${ue}-config-key`)},f(z),3),n("span",{class:F(`${ue}-config-count`)},f(k(aa)(E(z)))+" entries ",3)],10,gg),v.value.has(z)?(u(),d("div",{key:0,class:F(`${ue}-config-section-body`)},[n("table",{class:F(`${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),d(U,null,ye(Le(E(z),z),oe=>(u(),d("tr",{key:oe.path},[n("td",{title:Re(oe.path,z)},[n("span",{class:F(`${ue}-config-key`)},f(Re(oe.path,z)),3)],8,yg),n("td",{title:k(De)(oe.value)?H(oe.value):ge(oe.value).text},[k(De)(oe.value)?(u(),d("span",{key:0,class:F(`${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:F(`${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(),d("svg",{key:0,width:"14",height:"14",viewBox:k(Ae)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,_g)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:k(Ae).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,xg))],10,bg)],2)):(u(),d("span",{key:1,class:F(`${ue}-config-val`),style:Ke({color:ge(oe.value).color})},f(ge(oe.value).text),7))],8,mg),n("td",null,[k(De)(oe.value)?te("",!0):(u(),d("button",{key:0,type:"button",class:F(`${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,wg))])]))),128))])],2)],2)):te("",!0)],64)):(u(),d("div",{key:1,class:F(`${ue}-config-section-header ${ue}-config-leaf`),style:{cursor:"default"}},[n("span",{class:F(`${ue}-config-toggle`),style:{visibility:"hidden"}},"•",2),n("span",{class:F(`${ue}-config-key`)},f(z),3),n("span",{class:F(`${ue}-config-val`),style:{marginLeft:"8px"}},[k(De)(E(z))?(u(),d("span",{key:0,class:F(`${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:F(`${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(),d("svg",{key:0,width:"14",height:"14",viewBox:k(Ae)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:Te.value},null,8,kg)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:k(Ae).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:ne.value},null,8,Sg))],10,$g)],2)):E(z)===null||E(z)===void 0?(u(),d("span",Cg,"null")):typeof E(z)=="boolean"?(u(),d("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(),d("span",Tg,f(String(E(z))),1)):Array.isArray(E(z))?(u(),d("span",Eg,f(ge(E(z)).text),1)):(u(),d("span",Pg,f(String(E(z))),1))],2),k(De)(E(z))?te("",!0):(u(),d("button",{key:0,type:"button",class:F(`${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,Ag))],2))],2))),128))],2)],2)):(u(),d("div",{key:1,class:F(`${ue}-empty`)},"Config not available",2))]))}})},Symbol.toStringTag,{value:"Module"})),Rg={key:0,class:"ss-dash-empty"},Lg={key:1,class:"ss-dash-empty"},Og={key:2,class:"ss-dash-empty"},Fg={class:"ss-dash-info-cards"},Dg={class:"ss-dash-info-card-label"},Ig={class:"ss-dash-info-card-value"},Bg={key:0,class:"ss-dash-empty"},Ng={key:1,class:"ss-dash-table"},jg={style:{"font-family":"monospace","font-size":"11px"}},Hg={key:0,style:{"margin-left":"6px","font-size":"11px",color:"var(--ss-dim)"}},Ug={style:{color:"var(--ss-dim)","margin-left":"4px"}},qg={style:{"font-size":"11px"}},Kg=["onClick"],Vg=["onClick"],zg={key:2,class:"ss-dash-empty"},Wg={key:3,class:"ss-dash-table"},Jg={class:"ss-dash-bar"},Qg={class:"ss-dash-bar-track",style:{"max-width":"120px"}},Gg={key:4,class:"ss-dash-empty"},Yg={key:5,class:"ss-dash-table"},Xg={style:{color:"var(--ss-dim)"}},Zg={key:6,class:"ss-dash-empty"},e1={key:7,class:"ss-dash-table"},t1={style:{color:"var(--ss-dim)","font-size":"11px"}},s1={class:"ss-dash-table"},n1={style:{"font-family":"monospace","font-size":"11px"}},l1={key:0,class:"ss-dash-table",style:{"margin-top":"8px"}},o1={style:{"font-family":"monospace","font-size":"11px"}},a1={class:"ss-dash-table"},i1={class:"ss-dash-table"},r1={style:{"font-family":"monospace","font-size":"11px"}},u1={style:{"font-family":"monospace","font-size":"11px"}},c1={style:{"font-family":"monospace","font-size":"11px"}},d1={style:{"font-size":"11px"}},f1=Object.freeze(Object.defineProperty({__proto__:null,default:Fe({__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"),a=re("ss-auth-token",void 0),o=J(null),i=J(!0),r=J(null),c=J(new Set),g=rn(s,a);let v=null;async function m(){try{const M=await g().fetch(`${l}/diagnostics`);o.value=M,r.value=null,i.value=!1}catch(M){if(M instanceof en){r.value=M,i.value=!1,v&&(clearInterval(v),v=null);return}r.value=M instanceof Error?M:new Error(String(M)),i.value=!1}}Lt(()=>{i.value=!0,r.value=null,m(),v=setInterval(m,Xo)}),Ot(()=>{v&&clearInterval(v)}),gt(t,()=>{m()});function p(M){c.value.has(M)?c.value.delete(M):c.value.add(M)}function x(M){const y=qu(M);return y==="ok"?"ss-dash-dot-ok":y==="err"?"ss-dash-dot-err":""}function w(M){return M.debounceMs!==void 0?`${Dt(M.debounceMs)} (debounce)`:M.intervalMs!==void 0?Dt(M.intervalMs):"-"}const _=q(()=>o.value?.buffers?Object.entries(o.value.buffers).map(([M,y])=>({name:M.charAt(0).toUpperCase()+M.slice(1),...y,percent:ju(y.current,y.max)})):[]),P=q(()=>o.value?.timers?Object.entries(o.value.timers).map(([M,y])=>({key:M,label:Ou(M),...y,interval:w(y)})):[]),R=q(()=>{if(!o.value)return[];const M=[];if(o.value.transmit&&M.push({key:"transmit",label:"Transmit (SSE)",status:o.value.transmit.available?"connected":"unavailable",details:o.value.transmit.available?`Channels: ${o.value.transmit.channels.join(", ")}`:"Not installed"}),o.value.integrations)for(const[y,$]of Object.entries(o.value.integrations))M.push({key:y,label:Du(y),status:Iu($),details:Bu(y,$)});return M});return(M,y)=>(u(),d("div",null,[i.value&&!o.value?(u(),d("div",Rg,"Loading diagnostics...")):r.value&&!o.value?(u(),d("div",Lg,"Error: "+f(r.value.message),1)):o.value?(u(),d(U,{key:3},[y[41]||(y[41]=n("h3",{class:"ss-dash-section-title"},"Package Info",-1)),n("div",Fg,[(u(!0),d(U,null,ye([{label:"Version",value:o.value.package?.version||"-"},{label:"Node.js",value:o.value.package?.nodeVersion||"-"},{label:"AdonisJS",value:o.value.package?.adonisVersion||"-"},{label:"Uptime",value:k(uu)(o.value.uptime||o.value.package?.uptime)},{label:"Renderer",value:o.value.devToolbar?.renderer||"preact"}],$=>(u(),d("div",{key:$.label,class:"ss-dash-info-card"},[n("span",Dg,f($.label),1),n("span",Ig,f($.value),1)]))),128))]),y[42]||(y[42]=n("h3",{class:"ss-dash-section-title"},"Collectors",-1)),o.value.collectors?.length?(u(),d("table",Ng,[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),d(U,null,ye(o.value.collectors,$=>(u(),d("tr",{key:$.name},[n("td",null,[n("span",jg,f($.name),1),$.label&&$.label!==$.name?(u(),d("span",Hg,f($.label),1)):te("",!0)]),n("td",null,[n("span",{class:F(["ss-dash-dot",x($.status)])},null,2),_e(" "+f($.status),1)]),n("td",{style:Ke($.lastError?{color:"var(--ss-red-fg)"}:{})},[$.lastError?(u(),d(U,{key:0},[_e(f($.lastError)+" ",1),n("span",Ug,f(k(bt)($.lastErrorAt??0)),1)],64)):(u(),d(U,{key:1},[_e("-")],64))],4),n("td",qg,[Object.keys($.config||{}).length?(u(!0),d(U,{key:0},ye(k(Nu)($.config),T=>(u(),d("span",{key:T.key,style:{"margin-right":"8px"}},[_e(f(T.key)+"=",1),T.secret&&!c.value.has(`collector-${$.name}-${T.key}`)?(u(),d("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:Q=>p(`collector-${$.name}-${T.key}`)},"••••••••",8,Kg)):(u(),d(U,{key:1},[n("span",null,f(T.value),1),T.secret?(u(),d("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,Vg)):te("",!0)],64))]))),128)):(u(),d(U,{key:1},[_e("-")],64))])]))),128))])])):(u(),d("div",Bg,"No collectors")),y[43]||(y[43]=n("h3",{class:"ss-dash-section-title"},"Buffers",-1)),_.value.length?(u(),d("table",Wg,[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),d(U,null,ye(_.value,$=>(u(),d("tr",{key:$.name},[n("td",null,f($.name),1),n("td",null,f($.current.toLocaleString())+" / "+f($.max.toLocaleString()),1),n("td",null,[n("div",Jg,[n("div",Qg,[n("div",{class:F(["ss-dash-bar-fill",$.percent>=100?"ss-dash-bar-fill-warn":""]),style:Ke({width:$.percent+"%"})},null,6)]),n("span",{class:F(["ss-dash-bar-pct",$.percent>=100?"ss-dash-bar-pct-warn":""])},f($.percent)+"%",3)])])]))),128))])])):(u(),d("div",zg,"No buffer data")),y[44]||(y[44]=n("h3",{class:"ss-dash-section-title"},"Timers",-1)),P.value.length?(u(),d("table",Yg,[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),d(U,null,ye(P.value,$=>(u(),d("tr",{key:$.key},[n("td",null,f($.label),1),n("td",null,[n("span",{class:F(["ss-dash-dot",x($.active?"active":"inactive")])},null,2),_e(" "+f($.active?"active":"inactive"),1)]),n("td",Xg,f($.interval),1)]))),128))])])):(u(),d("div",Gg,"No timer data")),y[45]||(y[45]=n("h3",{class:"ss-dash-section-title"},"Integrations",-1)),R.value.length?(u(),d("table",e1,[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),d(U,null,ye(R.value,$=>(u(),d("tr",{key:$.key},[n("td",null,f($.label),1),n("td",null,[n("span",{class:F(["ss-dash-dot",x($.status)])},null,2),_e(" "+f($.status),1)]),n("td",t1,f($.details),1)]))),128))])])):(u(),d("div",Zg,"No integration data")),o.value.storage?(u(),d(U,{key:8},[y[16]||(y[16]=n("h3",{class:"ss-dash-section-title"},"Storage",-1)),n("table",s1,[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:F(["ss-dash-dot",x(o.value.storage.ready?"ready":"unavailable")])},null,2),_e(" "+f(o.value.storage.ready?"ready":"not ready"),1)])]),n("tr",null,[y[9]||(y[9]=n("td",null,"DB Path",-1)),n("td",n1,f(o.value.storage.dbPath),1)]),n("tr",null,[y[10]||(y[10]=n("td",null,"File Size",-1)),n("td",null,f(o.value.storage.fileSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[11]||(y[11]=n("td",null,"WAL Size",-1)),n("td",null,f(o.value.storage.walSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[12]||(y[12]=n("td",null,"Retention",-1)),n("td",null,f(o.value.storage.retentionDays)+" days",1)]),n("tr",null,[y[13]||(y[13]=n("td",null,"Last Cleanup",-1)),n("td",null,f(k(bt)(o.value.storage.lastCleanupAt??0)),1)])])]),o.value.storage.tables?.length?(u(),d("table",l1,[y[15]||(y[15]=n("thead",null,[n("tr",null,[n("th",null,"Table"),n("th",null,"Rows")])],-1)),n("tbody",null,[(u(!0),d(U,null,ye(o.value.storage.tables,$=>(u(),d("tr",{key:$.name},[n("td",o1,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",a1,[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(o.value.config?.intervalMs),1)]),n("tr",null,[y[18]||(y[18]=n("td",null,"transport",-1)),n("td",null,f(o.value.config?.transport),1)]),n("tr",null,[y[19]||(y[19]=n("td",null,"channelName",-1)),n("td",null,f(o.value.config?.channelName),1)]),n("tr",null,[y[20]||(y[20]=n("td",null,"endpoint",-1)),n("td",null,f(o.value.config?.endpoint===!1?"false":o.value.config?.endpoint),1)]),n("tr",null,[y[21]||(y[21]=n("td",null,"skipInTest",-1)),n("td",null,f(o.value.config?.skipInTest),1)]),n("tr",null,[y[22]||(y[22]=n("td",null,"onStats callback",-1)),n("td",null,f(o.value.config?.hasOnStatsCallback?"defined":"not defined"),1)]),n("tr",null,[y[23]||(y[23]=n("td",null,"shouldShow callback",-1)),n("td",null,f(o.value.config?.hasShouldShowCallback?"defined":"not defined"),1)])])]),y[47]||(y[47]=n("h4",{class:"ss-dash-section-title"},"DevToolbar",-1)),n("table",i1,[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(o.value.devToolbar?.enabled),1)]),n("tr",null,[y[26]||(y[26]=n("td",null,"tracing",-1)),n("td",null,f(o.value.devToolbar?.tracing),1)]),n("tr",null,[y[27]||(y[27]=n("td",null,"dashboard",-1)),n("td",null,f(o.value.devToolbar?.dashboard),1)]),n("tr",null,[y[28]||(y[28]=n("td",null,"dashboardPath",-1)),n("td",r1,f(o.value.devToolbar?.dashboardPath),1)]),n("tr",null,[y[29]||(y[29]=n("td",null,"debugEndpoint",-1)),n("td",u1,[c.value.has("cfg-debugEndpoint")?(u(),d(U,{key:1},[_e(f(o.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(),d("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(o.value.devToolbar?.maxQueries),1)]),n("tr",null,[y[31]||(y[31]=n("td",null,"maxEvents",-1)),n("td",null,f(o.value.devToolbar?.maxEvents),1)]),n("tr",null,[y[32]||(y[32]=n("td",null,"maxEmails",-1)),n("td",null,f(o.value.devToolbar?.maxEmails),1)]),n("tr",null,[y[33]||(y[33]=n("td",null,"maxTraces",-1)),n("td",null,f(o.value.devToolbar?.maxTraces),1)]),n("tr",null,[y[34]||(y[34]=n("td",null,"slowQueryThresholdMs",-1)),n("td",null,f(o.value.devToolbar?.slowQueryThresholdMs),1)]),n("tr",null,[y[35]||(y[35]=n("td",null,"retentionDays",-1)),n("td",null,f(o.value.devToolbar?.retentionDays),1)]),n("tr",null,[y[36]||(y[36]=n("td",null,"dbPath",-1)),n("td",c1,[c.value.has("cfg-dbPath")?(u(),d(U,{key:1},[_e(f(o.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(),d("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(o.value.devToolbar?.persistDebugData),1)]),n("tr",null,[y[38]||(y[38]=n("td",null,"excludeFromTracing",-1)),n("td",d1,f(o.value.devToolbar?.excludeFromTracing?.join(", ")||"-"),1)]),n("tr",null,[y[39]||(y[39]=n("td",null,"customPanes",-1)),n("td",null,f(o.value.devToolbar?.customPaneCount??0)+" registered",1)])])])],64)):(u(),d("div",Og,"Diagnostics not available"))]))}})},Symbol.toStringTag,{value:"Module"}))})();