adonisjs-server-stats 1.12.1 → 1.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +19 -1
  2. package/dist/core/api-client.d.ts +1 -1
  3. package/dist/core/index.js +1 -1
  4. package/dist/react/{CacheSection-ewL3Ss82.js → CacheSection-CX2duJuc.js} +1 -1
  5. package/dist/react/{CacheTab-B1wjTs64.js → CacheTab-CgT4t0oZ.js} +1 -1
  6. package/dist/react/{ConfigSection-DAHu9mfy.js → ConfigSection-Dt0FyeaW.js} +1 -1
  7. package/dist/react/{ConfigTab-B4E7Pitz.js → ConfigTab-KtiTtsrj.js} +1 -1
  8. package/dist/react/{CustomPaneTab-iP7K6TLu.js → CustomPaneTab-15QoEplP.js} +1 -1
  9. package/dist/react/{EmailsSection-hUkyUnKo.js → EmailsSection-YcJYR5eA.js} +1 -1
  10. package/dist/react/{EmailsTab-zZ4ucCv5.js → EmailsTab-CUjubln_.js} +2 -2
  11. package/dist/react/{EventsSection-CbGz-b_I.js → EventsSection-GGPoYSNv.js} +1 -1
  12. package/dist/react/{EventsTab-BUNTKy9p.js → EventsTab-Wdwr0_ny.js} +1 -1
  13. package/dist/react/{JobsSection-D10TwmEZ.js → JobsSection-BqqIh_DR.js} +1 -1
  14. package/dist/react/{JobsTab-CGrcuRPt.js → JobsTab-CBrU-ryL.js} +1 -1
  15. package/dist/react/{LogEntryRow-CkS9LMbl.js → LogEntryRow-BOrRkhRU.js} +1 -1
  16. package/dist/react/{LogsSection-BhS0Orbh.js → LogsSection-Cm_lphM6.js} +2 -2
  17. package/dist/react/{LogsTab-TChjBgV3.js → LogsTab-jKwv9G7Q.js} +2 -2
  18. package/dist/react/{OverviewSection-DhU9kO4C.js → OverviewSection-XF7bakyM.js} +1 -1
  19. package/dist/react/{QueriesSection-Dz4Eird3.js → QueriesSection-DsQBKrNK.js} +1 -1
  20. package/dist/react/{QueriesTab-CGMtuFFF.js → QueriesTab-CxCC1GVq.js} +1 -1
  21. package/dist/react/{RequestsSection-CrwlbkXj.js → RequestsSection-D8cMbZU0.js} +2 -2
  22. package/dist/react/{RoutesSection-DNmTM3w6.js → RoutesSection-D0y5JQP4.js} +1 -1
  23. package/dist/react/{RoutesTab-BS4PNbRf.js → RoutesTab-Y_alJVMV.js} +1 -1
  24. package/dist/react/{SplitPaneWrapper-CIygm7YI.js → SplitPaneWrapper-CZl1ouIT.js} +1 -1
  25. package/dist/react/{TimelineTab-M3wrwrmF.js → TimelineTab-HyqZpfbp.js} +2 -2
  26. package/dist/react/{index-LkZK--Bi.js → index-CsprmgzI.js} +2 -2
  27. package/dist/react/index.js +1 -1
  28. package/dist/src/edge/client/dashboard.js +1 -1
  29. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  30. package/dist/src/edge/client/stats-bar.js +1 -1
  31. package/dist/src/edge/client-vue/dashboard.js +1 -1
  32. package/dist/src/edge/client-vue/debug-panel-deferred.js +1 -1
  33. package/dist/src/edge/client-vue/stats-bar.js +1 -1
  34. package/dist/src/provider/auth_middleware_detector.d.ts +12 -6
  35. package/dist/src/provider/auth_middleware_detector.js +53 -6
  36. package/dist/src/provider/boot_helpers.d.ts +1 -0
  37. package/dist/src/provider/boot_helpers.js +7 -1
  38. package/dist/src/provider/server_stats_provider.js +2 -1
  39. package/dist/src/routes/no_session_middleware.d.ts +14 -0
  40. package/dist/src/routes/no_session_middleware.js +16 -0
  41. package/dist/src/routes/register_routes.js +5 -1
  42. package/dist/vue/{CacheSection-PpnXregU.js → CacheSection-DRqV3YX2.js} +1 -1
  43. package/dist/vue/{ConfigSection-CX5Vg95P.js → ConfigSection-C6pQCHAL.js} +1 -1
  44. package/dist/vue/{EmailsSection-BGHPwUgY.js → EmailsSection-BTNw3ZU2.js} +1 -1
  45. package/dist/vue/{EmailsTab-CNyEODVB.js → EmailsTab-CwIF1fik.js} +1 -1
  46. package/dist/vue/{EventsSection-x1DFVMLb.js → EventsSection-BpgkWIwM.js} +1 -1
  47. package/dist/vue/{JobsSection-BEiYKfvI.js → JobsSection-DrghFEKL.js} +1 -1
  48. package/dist/vue/{LogsSection-ChxccWDj.js → LogsSection-BDxx9Bfi.js} +1 -1
  49. package/dist/vue/{OverviewSection-OAWpIQZS.js → OverviewSection-BAgZTPjY.js} +1 -1
  50. package/dist/vue/{QueriesSection-gKNTbjZz.js → QueriesSection-CUpwhp7u.js} +1 -1
  51. package/dist/vue/{RequestsSection-CgLTYSVg.js → RequestsSection-D8P2xpF2.js} +1 -1
  52. package/dist/vue/{RoutesSection-Bhnj_f3a.js → RoutesSection-0qB81hTT.js} +1 -1
  53. package/dist/vue/{index-DQxTdRYT.js → index-30jLw-_w.js} +2 -2
  54. package/dist/vue/index.js +1 -1
  55. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";function hn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Oe={},Gt=[],yt=()=>{},fl=()=>!1,Os=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),pn=e=>e.startsWith("onUpdate:"),Ue=Object.assign,vn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},_i=Object.prototype.hasOwnProperty,Pe=(e,t)=>_i.call(e,t),ge=Array.isArray,Yt=e=>vs(e)==="[object Map]",hl=e=>vs(e)==="[object Set]",pl=e=>vs(e)==="[object Date]",ve=e=>typeof e=="function",Ie=e=>typeof e=="string",ct=e=>typeof e=="symbol",Ae=e=>e!==null&&typeof e=="object",vl=e=>(Ae(e)||ve(e))&&ve(e.then)&&ve(e.catch),gl=Object.prototype.toString,vs=e=>gl.call(e),xi=e=>vs(e).slice(8,-1),yl=e=>vs(e)==="[object Object]",gn=e=>Ie(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gs=hn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ds=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},wi=/-\w/g,ot=Ds(e=>e.replace(wi,t=>t.slice(1).toUpperCase())),ki=/\B([A-Z])/g,At=Ds(e=>e.replace(ki,"-$1").toLowerCase()),Fs=Ds(e=>e.charAt(0).toUpperCase()+e.slice(1)),yn=Ds(e=>e?`on${Fs(e)}`:""),Lt=(e,t)=>!Object.is(e,t),mn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},ml=(e,t,s,l=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:l,value:s})},$i=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Si=e=>{const t=Ie(e)?Number(e):NaN;return isNaN(t)?e:t};let bl;const Is=()=>bl||(bl=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function qe(e){if(ge(e)){const t={};for(let s=0;s<e.length;s++){const l=e[s],i=Ie(l)?Pi(l):qe(l);if(i)for(const o in i)t[o]=i[o]}return t}else if(Ie(e)||Ae(e))return e}const Ci=/;(?![^(]*\))/g,Ti=/:([^]+)/,Ei=/\/\*[^]*?\*\//g;function Pi(e){const t={};return e.replace(Ei,"").split(Ci).forEach(s=>{if(s){const l=s.split(Ti);l.length>1&&(t[l[0].trim()]=l[1].trim())}}),t}function R(e){let t="";if(Ie(e))t=e;else if(ge(e))for(let s=0;s<e.length;s++){const l=R(e[s]);l&&(t+=l+" ")}else if(Ae(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ri=hn("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function _l(e){return!!e||e===""}function Mi(e,t){if(e.length!==t.length)return!1;let s=!0;for(let l=0;s&&l<e.length;l++)s=bn(e[l],t[l]);return s}function bn(e,t){if(e===t)return!0;let s=pl(e),l=pl(t);if(s||l)return s&&l?e.getTime()===t.getTime():!1;if(s=ct(e),l=ct(t),s||l)return e===t;if(s=ge(e),l=ge(t),s||l)return s&&l?Mi(e,t):!1;if(s=Ae(e),l=Ae(t),s||l){if(!s||!l)return!1;const i=Object.keys(e).length,o=Object.keys(t).length;if(i!==o)return!1;for(const a in e){const r=e.hasOwnProperty(a),c=t.hasOwnProperty(a);if(r&&!c||!r&&c||!bn(e[a],t[a]))return!1}}return String(e)===String(t)}const xl=e=>!!(e&&e.__v_isRef===!0),h=e=>Ie(e)?e:e==null?"":ge(e)||Ae(e)&&(e.toString===gl||!ve(e.toString))?xl(e)?h(e.value):JSON.stringify(e,wl,2):String(e),wl=(e,t)=>xl(t)?wl(e,t.value):Yt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[l,i],o)=>(s[_n(l,o)+" =>"]=i,s),{})}:hl(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>_n(s))}:ct(t)?_n(t):Ae(t)&&!ge(t)&&!yl(t)?String(t):t,_n=(e,t="")=>{var s;return ct(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};let Ze;class Ai{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=Ze,!t&&Ze&&(this.index=(Ze.scopes||(Ze.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=Ze;try{return Ze=this,t()}finally{Ze=s}}}on(){++this._on===1&&(this.prevScope=Ze,Ze=this)}off(){this._on>0&&--this._on===0&&(Ze=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 i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Li(){return Ze}let De;const xn=new WeakSet;class kl{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,Ze&&Ze.active&&Ze.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,xn.has(this)&&(xn.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Sl(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Rl(this),Cl(this);const t=De,s=dt;De=this,dt=!0;try{return this.fn()}finally{Tl(this),De=t,dt=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Sn(t);this.deps=this.depsTail=void 0,Rl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?xn.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){$n(this)&&this.run()}get dirty(){return $n(this)}}let $l=0,ys,ms;function Sl(e,t=!1){if(e.flags|=8,t){e.next=ms,ms=e;return}e.next=ys,ys=e}function wn(){$l++}function kn(){if(--$l>0)return;if(ms){let t=ms;for(ms=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ys;){let t=ys;for(ys=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 Cl(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tl(e){let t,s=e.depsTail,l=s;for(;l;){const i=l.prevDep;l.version===-1?(l===s&&(s=i),Sn(l),Oi(l)):t=l,l.dep.activeLink=l.prevActiveLink,l.prevActiveLink=void 0,l=i}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&&(El(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function El(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===bs)||(e.globalVersion=bs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!$n(e))))return;e.flags|=2;const t=e.dep,s=De,l=dt;De=e,dt=!0;try{Cl(e);const i=e.fn(e._value);(t.version===0||Lt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{De=s,dt=l,Tl(e),e.flags&=-3}}function Sn(e,t=!1){const{dep:s,prevSub:l,nextSub:i}=e;if(l&&(l.nextSub=i,e.prevSub=void 0),i&&(i.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)Sn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Oi(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let dt=!0;const Pl=[];function mt(){Pl.push(dt),dt=!1}function bt(){const e=Pl.pop();dt=e===void 0?!0:e}function Rl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=De;De=void 0;try{t()}finally{De=s}}}let bs=0;class Di{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 Cn{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(!De||!dt||De===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==De)s=this.activeLink=new Di(De,this),De.deps?(s.prevDep=De.depsTail,De.depsTail.nextDep=s,De.depsTail=s):De.deps=De.depsTail=s,Ml(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=De.depsTail,s.nextDep=void 0,De.depsTail.nextDep=s,De.depsTail=s,De.deps===s&&(De.deps=l)}return s}trigger(t){this.version++,bs++,this.notify(t)}notify(t){wn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{kn()}}}function Ml(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)Ml(l)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const Tn=new WeakMap,Kt=Symbol(""),En=Symbol(""),_s=Symbol("");function We(e,t,s){if(dt&&De){let l=Tn.get(e);l||Tn.set(e,l=new Map);let i=l.get(s);i||(l.set(s,i=new Cn),i.map=l,i.key=s),i.track()}}function St(e,t,s,l,i,o){const a=Tn.get(e);if(!a){bs++;return}const r=c=>{c&&c.trigger()};if(wn(),t==="clear")a.forEach(r);else{const c=ge(e),g=c&&gn(s);if(c&&s==="length"){const p=Number(l);a.forEach((b,v)=>{(v==="length"||v===_s||!ct(v)&&v>=p)&&r(b)})}else switch((s!==void 0||a.has(void 0))&&r(a.get(s)),g&&r(a.get(_s)),t){case"add":c?g&&r(a.get("length")):(r(a.get(Kt)),Yt(e)&&r(a.get(En)));break;case"delete":c||(r(a.get(Kt)),Yt(e)&&r(a.get(En)));break;case"set":Yt(e)&&r(a.get(Kt));break}}kn()}function Xt(e){const t=Te(e);return t===e?t:(We(t,"iterate",_s),it(e)?t:t.map(ft))}function Bs(e){return We(e=Te(e),"iterate",_s),e}function Ot(e,t){return Tt(e)?es(Vt(e)?ft(t):t):ft(t)}const Fi={__proto__:null,[Symbol.iterator](){return Pn(this,Symbol.iterator,e=>Ot(this,e))},concat(...e){return Xt(this).concat(...e.map(t=>ge(t)?Xt(t):t))},entries(){return Pn(this,"entries",e=>(e[1]=Ot(this,e[1]),e))},every(e,t){return Ct(this,"every",e,t,void 0,arguments)},filter(e,t){return Ct(this,"filter",e,t,s=>s.map(l=>Ot(this,l)),arguments)},find(e,t){return Ct(this,"find",e,t,s=>Ot(this,s),arguments)},findIndex(e,t){return Ct(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ct(this,"findLast",e,t,s=>Ot(this,s),arguments)},findLastIndex(e,t){return Ct(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ct(this,"forEach",e,t,void 0,arguments)},includes(...e){return Rn(this,"includes",e)},indexOf(...e){return Rn(this,"indexOf",e)},join(e){return Xt(this).join(e)},lastIndexOf(...e){return Rn(this,"lastIndexOf",e)},map(e,t){return Ct(this,"map",e,t,void 0,arguments)},pop(){return xs(this,"pop")},push(...e){return xs(this,"push",e)},reduce(e,...t){return Al(this,"reduce",e,t)},reduceRight(e,...t){return Al(this,"reduceRight",e,t)},shift(){return xs(this,"shift")},some(e,t){return Ct(this,"some",e,t,void 0,arguments)},splice(...e){return xs(this,"splice",e)},toReversed(){return Xt(this).toReversed()},toSorted(e){return Xt(this).toSorted(e)},toSpliced(...e){return Xt(this).toSpliced(...e)},unshift(...e){return xs(this,"unshift",e)},values(){return Pn(this,"values",e=>Ot(this,e))}};function Pn(e,t,s){const l=Bs(e),i=l[t]();return l!==e&&!it(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Ii=Array.prototype;function Ct(e,t,s,l,i,o){const a=Bs(e),r=a!==e&&!it(e),c=a[t];if(c!==Ii[t]){const b=c.apply(e,o);return r?ft(b):b}let g=s;a!==e&&(r?g=function(b,v){return s.call(this,Ot(e,b),v,e)}:s.length>2&&(g=function(b,v){return s.call(this,b,v,e)}));const p=c.call(a,g,l);return r&&i?i(p):p}function Al(e,t,s,l){const i=Bs(e);let o=s;return i!==e&&(it(e)?s.length>3&&(o=function(a,r,c){return s.call(this,a,r,c,e)}):o=function(a,r,c){return s.call(this,a,Ot(e,r),c,e)}),i[t](o,...l)}function Rn(e,t,s){const l=Te(e);We(l,"iterate",_s);const i=l[t](...s);return(i===-1||i===!1)&&Ln(s[0])?(s[0]=Te(s[0]),l[t](...s)):i}function xs(e,t,s=[]){mt(),wn();const l=Te(e)[t].apply(e,s);return kn(),bt(),l}const Bi=hn("__proto__,__v_isRef,__isVue"),Ll=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(ct));function Ni(e){ct(e)||(e=String(e));const t=Te(this);return We(t,"has",e),t.hasOwnProperty(e)}class Ol{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,l){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return l===(i?o?jl:Nl:o?Bl:Il).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(l)?t:void 0;const a=ge(t);if(!i){let c;if(a&&(c=Fi[s]))return c;if(s==="hasOwnProperty")return Ni}const r=Reflect.get(t,s,Ke(t)?t:l);if((ct(s)?Ll.has(s):Bi(s))||(i||We(t,"get",s),o))return r;if(Ke(r)){const c=a&&gn(s)?r:r.value;return i&&Ae(c)?An(c):c}return Ae(r)?i?An(r):Zt(r):r}}class Dl extends Ol{constructor(t=!1){super(!1,t)}set(t,s,l,i){let o=t[s];const a=ge(t)&&gn(s);if(!this._isShallow){const g=Tt(o);if(!it(l)&&!Tt(l)&&(o=Te(o),l=Te(l)),!a&&Ke(o)&&!Ke(l))return g||(o.value=l),!0}const r=a?Number(s)<t.length:Pe(t,s),c=Reflect.set(t,s,l,Ke(t)?t:i);return t===Te(i)&&(r?Lt(l,o)&&St(t,"set",s,l):St(t,"add",s,l)),c}deleteProperty(t,s){const l=Pe(t,s);t[s];const i=Reflect.deleteProperty(t,s);return i&&l&&St(t,"delete",s,void 0),i}has(t,s){const l=Reflect.has(t,s);return(!ct(s)||!Ll.has(s))&&We(t,"has",s),l}ownKeys(t){return We(t,"iterate",ge(t)?"length":Kt),Reflect.ownKeys(t)}}class Fl extends Ol{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const ji=new Dl,Hi=new Fl,Ui=new Dl(!0),qi=new Fl(!0),Mn=e=>e,Ns=e=>Reflect.getPrototypeOf(e);function Ki(e,t,s){return function(...l){const i=this.__v_raw,o=Te(i),a=Yt(o),r=e==="entries"||e===Symbol.iterator&&a,c=e==="keys"&&a,g=i[e](...l),p=s?Mn:t?es:ft;return!t&&We(o,"iterate",c?En:Kt),Ue(Object.create(g),{next(){const{value:b,done:v}=g.next();return v?{value:b,done:v}:{value:r?[p(b[0]),p(b[1])]:p(b),done:v}}})}}function js(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Vi(e,t){const s={get(i){const o=this.__v_raw,a=Te(o),r=Te(i);e||(Lt(i,r)&&We(a,"get",i),We(a,"get",r));const{has:c}=Ns(a),g=t?Mn:e?es:ft;if(c.call(a,i))return g(o.get(i));if(c.call(a,r))return g(o.get(r));o!==a&&o.get(i)},get size(){const i=this.__v_raw;return!e&&We(Te(i),"iterate",Kt),i.size},has(i){const o=this.__v_raw,a=Te(o),r=Te(i);return e||(Lt(i,r)&&We(a,"has",i),We(a,"has",r)),i===r?o.has(i):o.has(i)||o.has(r)},forEach(i,o){const a=this,r=a.__v_raw,c=Te(r),g=t?Mn:e?es:ft;return!e&&We(c,"iterate",Kt),r.forEach((p,b)=>i.call(o,g(p),g(b),a))}};return Ue(s,e?{add:js("add"),set:js("set"),delete:js("delete"),clear:js("clear")}:{add(i){!t&&!it(i)&&!Tt(i)&&(i=Te(i));const o=Te(this);return Ns(o).has.call(o,i)||(o.add(i),St(o,"add",i,i)),this},set(i,o){!t&&!it(o)&&!Tt(o)&&(o=Te(o));const a=Te(this),{has:r,get:c}=Ns(a);let g=r.call(a,i);g||(i=Te(i),g=r.call(a,i));const p=c.call(a,i);return a.set(i,o),g?Lt(o,p)&&St(a,"set",i,o):St(a,"add",i,o),this},delete(i){const o=Te(this),{has:a,get:r}=Ns(o);let c=a.call(o,i);c||(i=Te(i),c=a.call(o,i)),r&&r.call(o,i);const g=o.delete(i);return c&&St(o,"delete",i,void 0),g},clear(){const i=Te(this),o=i.size!==0,a=i.clear();return o&&St(i,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=Ki(i,e,t)}),s}function Hs(e,t){const s=Vi(e,t);return(l,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?l:Reflect.get(Pe(s,i)&&i in l?s:l,i,o)}const zi={get:Hs(!1,!1)},Wi={get:Hs(!1,!0)},Qi={get:Hs(!0,!1)},Ji={get:Hs(!0,!0)},Il=new WeakMap,Bl=new WeakMap,Nl=new WeakMap,jl=new WeakMap;function Gi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Yi(e){return e.__v_skip||!Object.isExtensible(e)?0:Gi(xi(e))}function Zt(e){return Tt(e)?e:Us(e,!1,ji,zi,Il)}function Xi(e){return Us(e,!1,Ui,Wi,Bl)}function An(e){return Us(e,!0,Hi,Qi,Nl)}function oy(e){return Us(e,!0,qi,Ji,jl)}function Us(e,t,s,l,i){if(!Ae(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=Yi(e);if(o===0)return e;const a=i.get(e);if(a)return a;const r=new Proxy(e,o===2?l:s);return i.set(e,r),r}function Vt(e){return Tt(e)?Vt(e.__v_raw):!!(e&&e.__v_isReactive)}function Tt(e){return!!(e&&e.__v_isReadonly)}function it(e){return!!(e&&e.__v_isShallow)}function Ln(e){return e?!!e.__v_raw:!1}function Te(e){const t=e&&e.__v_raw;return t?Te(t):e}function Zi(e){return!Pe(e,"__v_skip")&&Object.isExtensible(e)&&ml(e,"__v_skip",!0),e}const ft=e=>Ae(e)?Zt(e):e,es=e=>Ae(e)?An(e):e;function Ke(e){return e?e.__v_isRef===!0:!1}function W(e){return ea(e,!1)}function ea(e,t){return Ke(e)?e:new ta(e,t)}class ta{constructor(t,s){this.dep=new Cn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Te(t),this._value=s?t:ft(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,l=this.__v_isShallow||it(t)||Tt(t);t=l?t:Te(t),Lt(t,s)&&(this._rawValue=t,this._value=l?t:ft(t),this.dep.trigger())}}function x(e){return Ke(e)?e.value:e}const sa={get:(e,t,s)=>t==="__v_raw"?e:x(Reflect.get(e,t,s)),set:(e,t,s,l)=>{const i=e[t];return Ke(i)&&!Ke(s)?(i.value=s,!0):Reflect.set(e,t,s,l)}};function Hl(e){return Vt(e)?e:new Proxy(e,sa)}class na{constructor(t,s,l){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Cn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=bs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=l}notify(){if(this.flags|=16,!(this.flags&8)&&De!==this)return Sl(this,!0),!0}get value(){const t=this.dep.track();return El(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function la(e,t,s=!1){let l,i;return ve(e)?l=e:(l=e.get,i=e.set),new na(l,i,s)}const qs={},Ks=new WeakMap;let zt;function oa(e,t=!1,s=zt){if(s){let l=Ks.get(s);l||Ks.set(s,l=[]),l.push(e)}}function ia(e,t,s=Oe){const{immediate:l,deep:i,once:o,scheduler:a,augmentJob:r,call:c}=s,g=k=>i?k:it(k)||i===!1||i===0?Dt(k,1):Dt(k);let p,b,v,w,$=!1,_=!1;if(Ke(e)?(b=()=>e.value,$=it(e)):Vt(e)?(b=()=>g(e),$=!0):ge(e)?(_=!0,$=e.some(k=>Vt(k)||it(k)),b=()=>e.map(k=>{if(Ke(k))return k.value;if(Vt(k))return g(k);if(ve(k))return c?c(k,2):k()})):ve(e)?t?b=c?()=>c(e,2):e:b=()=>{if(v){mt();try{v()}finally{bt()}}const k=zt;zt=p;try{return c?c(e,3,[w]):e(w)}finally{zt=k}}:b=yt,t&&i){const k=b,S=i===!0?1/0:i;b=()=>Dt(k(),S)}const C=Li(),A=()=>{p.stop(),C&&C.active&&vn(C.effects,p)};if(o&&t){const k=t;t=(...S)=>{k(...S),A()}}let P=_?new Array(e.length).fill(qs):qs;const y=k=>{if(!(!(p.flags&1)||!p.dirty&&!k))if(t){const S=p.run();if(i||$||(_?S.some((Q,te)=>Lt(Q,P[te])):Lt(S,P))){v&&v();const Q=zt;zt=p;try{const te=[S,P===qs?void 0:_&&P[0]===qs?[]:P,w];P=S,c?c(t,3,te):t(...te)}finally{zt=Q}}}else p.run()};return r&&r(y),p=new kl(b),p.scheduler=a?()=>a(y,!1):y,w=k=>oa(k,!1,p),v=p.onStop=()=>{const k=Ks.get(p);if(k){if(c)c(k,4);else for(const S of k)S();Ks.delete(p)}},t?l?y(!0):P=p.run():a?a(y.bind(null,!0),!0):p.run(),A.pause=p.pause.bind(p),A.resume=p.resume.bind(p),A.stop=A,A}function Dt(e,t=1/0,s){if(t<=0||!Ae(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,Ke(e))Dt(e.value,t,s);else if(ge(e))for(let l=0;l<e.length;l++)Dt(e[l],t,s);else if(hl(e)||Yt(e))e.forEach(l=>{Dt(l,t,s)});else if(yl(e)){for(const l in e)Dt(e[l],t,s);for(const l of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,l)&&Dt(e[l],t,s)}return e}const ws=[];let On=!1;function iy(e,...t){if(On)return;On=!0,mt();const s=ws.length?ws[ws.length-1].component:null,l=s&&s.appContext.config.warnHandler,i=aa();if(l)ts(l,s,11,[e+t.map(o=>{var a,r;return(r=(a=o.toString)==null?void 0:a.call(o))!=null?r:JSON.stringify(o)}).join(""),s&&s.proxy,i.map(({vnode:o})=>`at <${Ho(s,o.type)}>`).join(`
2
2
  `),i]);else{const o=[`[Vue warn]: ${e}`,...t];i.length&&o.push(`
3
3
  `,...ra(i)),console.warn(...o)}bt(),On=!1}function aa(){let e=ws[ws.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 ra(e){const t=[];return e.forEach((s,l)=>{t.push(...l===0?[]:[`
4
- `],...ua(s))}),t}function ua({vnode:e,recurseCount:t}){const s=t>0?`... (${t} recursive calls)`:"",l=e.component?e.component.parent==null:!1,i=` at <${Ho(e.component,e.type,l)}`,o=">"+s;return e.props?[i,...ca(e.props),o]:[i+o]}function ca(e){const t=[],s=Object.keys(e);return s.slice(0,3).forEach(l=>{t.push(...Ul(l,e[l]))}),s.length>3&&t.push(" ..."),t}function Ul(e,t,s){return Ie(t)?(t=JSON.stringify(t),s?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?s?t:[`${e}=${t}`]:Ke(t)?(t=Ul(e,Te(t.value),!0),s?t:[`${e}=Ref<`,t,">"]):ve(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Te(t),s?t:[`${e}=`,t])}function ts(e,t,s,l){try{return l?e(...l):e()}catch(i){ss(i,t,s)}}function _t(e,t,s,l){if(ve(e)){const i=ts(e,t,s,l);return i&&vl(i)&&i.catch(o=>{ss(o,t,s)}),i}if(ge(e)){const i=[];for(let o=0;o<e.length;o++)i.push(_t(e[o],t,s,l));return i}}function ss(e,t,s,l=!0){const i=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||Oe;if(t){let r=t.parent;const c=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${s}`;for(;r;){const p=r.ec;if(p){for(let b=0;b<p.length;b++)if(p[b](e,c,g)===!1)return}r=r.parent}if(o){mt(),ts(o,null,10,[e,c,g]),bt();return}}da(e,s,i,l,a)}function da(e,t,s,l=!0,i=!1){if(i)throw e;console.error(e)}const Je=[];let xt=-1;const ns=[];let Ft=null,ls=0;const ql=Promise.resolve();let Vs=null;function Dn(e){const t=Vs||ql;return e?t.then(this?e.bind(this):e):t}function fa(e){let t=xt+1,s=Je.length;for(;t<s;){const l=t+s>>>1,i=Je[l],o=ks(i);o<e||o===e&&i.flags&2?t=l+1:s=l}return t}function Fn(e){if(!(e.flags&1)){const t=ks(e),s=Je[Je.length-1];!s||!(e.flags&2)&&t>=ks(s)?Je.push(e):Je.splice(fa(t),0,e),e.flags|=1,Kl()}}function Kl(){Vs||(Vs=ql.then(Wl))}function In(e){ge(e)?ns.push(...e):Ft&&e.id===-1?Ft.splice(ls+1,0,e):e.flags&1||(ns.push(e),e.flags|=1),Kl()}function Vl(e,t,s=xt+1){for(;s<Je.length;s++){const l=Je[s];if(l&&l.flags&2){if(e&&l.id!==e.uid)continue;Je.splice(s,1),s--,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function zl(e){if(ns.length){const t=[...new Set(ns)].sort((s,l)=>ks(s)-ks(l));if(ns.length=0,Ft){Ft.push(...t);return}for(Ft=t,ls=0;ls<Ft.length;ls++){const s=Ft[ls];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ft=null,ls=0}}const ks=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Wl(e){try{for(xt=0;xt<Je.length;xt++){const t=Je[xt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ts(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;xt<Je.length;xt++){const t=Je[xt];t&&(t.flags&=-2)}xt=-1,Je.length=0,zl(),Vs=null,(Je.length||ns.length)&&Wl()}}let Ge=null,Ql=null;function zs(e){const t=Ge;return Ge=e,Ql=e&&e.type.__scopeId||null,t}function os(e,t=Ge,s){if(!t||e._n)return e;const l=(...i)=>{l._d&&Oo(-1);const o=zs(t);let a;try{a=e(...i)}finally{zs(o),l._d&&Oo(1)}return a};return l._n=!0,l._c=!0,l._d=!0,l}function Wt(e,t,s,l){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const r=i[a];o&&(r.oldValue=o[a].value);let c=r.dir[l];c&&(mt(),_t(c,s,8,[e.el,r,e,t]),bt())}}function is(e,t){if(Ve){let s=Ve.provides;const l=Ve.parent&&Ve.parent.provides;l===s&&(s=Ve.provides=Object.create(l)),s[e]=t}}function de(e,t,s=!1){const l=br();if(l||rs){let i=rs?rs._context.provides:l?l.parent==null||l.ce?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&ve(t)?t.call(l&&l.proxy):t}}const ha=Symbol.for("v-scx"),pa=()=>de(ha);function ht(e,t,s){return Jl(e,t,s)}function Jl(e,t,s=Oe){const{immediate:l,deep:i,flush:o,once:a}=s,r=Ue({},s),c=t&&l||!t&&o!=="post";let g;if(fs){if(o==="sync"){const w=pa();g=w.__watcherHandles||(w.__watcherHandles=[])}else if(!c){const w=()=>{};return w.stop=yt,w.resume=yt,w.pause=yt,w}}const p=Ve;r.call=(w,$,_)=>_t(w,p,$,_);let b=!1;o==="post"?r.scheduler=w=>{Xe(w,p&&p.suspense)}:o!=="sync"&&(b=!0,r.scheduler=(w,$)=>{$?w():Fn(w)}),r.augmentJob=w=>{t&&(w.flags|=4),b&&(w.flags|=2,p&&(w.id=p.uid,w.i=p))};const v=ia(e,t,r);return fs&&(g?g.push(v):c&&v()),v}function va(e,t,s){const l=this.proxy,i=Ie(e)?e.includes(".")?Gl(l,e):()=>l[e]:e.bind(l,l);let o;ve(t)?o=t:(o=t.handler,s=t);const a=Ps(this),r=Jl(i,o.bind(l),s);return a(),r}function Gl(e,t){const s=t.split(".");return()=>{let l=e;for(let i=0;i<s.length&&l;i++)l=l[s[i]];return l}}const ga=Symbol("_vte"),ya=e=>e.__isTeleport,ma=Symbol("_leaveCb");function Bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Bn(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 Ne(e,t){return ve(e)?Ue({name:e.name},t,{setup:e}):e}function Nn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Yl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Ws=new WeakMap;function $s(e,t,s,l,i=!1){if(ge(e)){e.forEach((_,C)=>$s(_,t&&(ge(t)?t[C]:t),s,l,i));return}if(as(l)&&!i){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&$s(e,t,s,l.component.subTree);return}const o=l.shapeFlag&4?el(l.component):l.el,a=i?null:o,{i:r,r:c}=e,g=t&&t.r,p=r.refs===Oe?r.refs={}:r.refs,b=r.setupState,v=Te(b),w=b===Oe?fl:_=>Yl(p,_)?!1:Pe(v,_),$=(_,C)=>!(C&&Yl(p,C));if(g!=null&&g!==c){if(Xl(t),Ie(g))p[g]=null,w(g)&&(b[g]=null);else if(Ke(g)){const _=t;$(g,_.k)&&(g.value=null),_.k&&(p[_.k]=null)}}if(ve(c))ts(c,r,12,[a,p]);else{const _=Ie(c),C=Ke(c);if(_||C){const A=()=>{if(e.f){const P=_?w(c)?b[c]:p[c]:$()||!e.k?c.value:p[e.k];if(i)ge(P)&&vn(P,o);else if(ge(P))P.includes(o)||P.push(o);else if(_)p[c]=[o],w(c)&&(b[c]=p[c]);else{const y=[o];$(c,e.k)&&(c.value=y),e.k&&(p[e.k]=y)}}else _?(p[c]=a,w(c)&&(b[c]=a)):C&&($(c,e.k)&&(c.value=a),e.k&&(p[e.k]=a))};if(a){const P=()=>{A(),Ws.delete(e)};P.id=-1,Ws.set(e,P),Xe(P,s)}else Xl(e),A()}}}function Xl(e){const t=Ws.get(e);t&&(t.flags|=8,Ws.delete(e))}const Zl=e=>e.nodeType===8;Is().requestIdleCallback,Is().cancelIdleCallback;function ba(e,t){if(Zl(e)&&e.data==="["){let s=1,l=e.nextSibling;for(;l;){if(l.nodeType===1){if(t(l)===!1)break}else if(Zl(l))if(l.data==="]"){if(--s===0)break}else l.data==="["&&s++;l=l.nextSibling}}else t(e)}const as=e=>!!e.type.__asyncLoader;function pt(e){ve(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:l,delay:i=200,hydrate:o,timeout:a,suspensible:r=!0,onError:c}=e;let g=null,p,b=0;const v=()=>(b++,g=null,w()),w=()=>{let $;return g||($=g=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((C,A)=>{c(_,()=>C(v()),()=>A(_),b+1)});throw _}).then(_=>$!==g&&g?g:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),p=_,_)))};return Ne({name:"AsyncComponentWrapper",__asyncLoader:w,__asyncHydrate($,_,C){let A=!1;(_.bu||(_.bu=[])).push(()=>A=!0);const P=()=>{A||C()},y=o?()=>{const k=o(P,S=>ba($,S));k&&(_.bum||(_.bum=[])).push(k)}:P;p?y():w().then(()=>!_.isUnmounted&&y())},get __asyncResolved(){return p},setup(){const $=Ve;if(Nn($),p)return()=>Qs(p,$);const _=y=>{g=null,ss(y,$,13,!l)};if(r&&$.suspense||fs)return w().then(y=>()=>Qs(y,$)).catch(y=>(_(y),()=>l?Se(l,{error:y}):null));const C=W(!1),A=W(),P=W(!!i);return i&&setTimeout(()=>{P.value=!1},i),a!=null&&setTimeout(()=>{if(!C.value&&!A.value){const y=new Error(`Async component timed out after ${a}ms.`);_(y),A.value=y}},a),w().then(()=>{C.value=!0,$.parent&&jn($.parent.vnode)&&$.parent.update()}).catch(y=>{_(y),A.value=y}),()=>{if(C.value&&p)return Qs(p,$);if(A.value&&l)return Se(l,{error:A.value});if(s&&!P.value)return Qs(s,$)}}})}function Qs(e,t){const{ref:s,props:l,children:i,ce:o}=t.vnode,a=Se(e,l,i);return a.ref=s,a.ce=o,delete t.vnode.ce,a}const jn=e=>e.type.__isKeepAlive;function _a(e,t){eo(e,"a",t)}function xa(e,t){eo(e,"da",t)}function eo(e,t,s=Ve){const l=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Js(t,l,s),s){let i=s.parent;for(;i&&i.parent;)jn(i.parent.vnode)&&wa(l,t,s,i),i=i.parent}}function wa(e,t,s,l){const i=Js(t,e,l,!0);Pt(()=>{vn(l[t],i)},s)}function Js(e,t,s=Ve,l=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...a)=>{mt();const r=Ps(s),c=_t(t,s,e,a);return r(),bt(),c});return l?i.unshift(o):i.push(o),o}}const Et=e=>(t,s=Ve)=>{(!fs||e==="sp")&&Js(e,(...l)=>t(...l),s)},ka=Et("bm"),It=Et("m"),$a=Et("bu"),Sa=Et("u"),to=Et("bum"),Pt=Et("um"),Ca=Et("sp"),Ta=Et("rtg"),Ea=Et("rtc");function Pa(e,t=Ve){Js("ec",e,t)}const Ra="components",so=Symbol.for("v-ndc");function Ma(e){return Ie(e)?Aa(Ra,e,!1)||e:e||so}function Aa(e,t,s=!0,l=!1){const i=Ge||Ve;if(i){const o=i.type;{const r=jo(o,!1);if(r&&(r===t||r===ot(t)||r===Fs(ot(t))))return o}const a=no(i[e]||o[e],t)||no(i.appContext[e],t);return!a&&l?o:a}}function no(e,t){return e&&(e[t]||e[ot(t)]||e[Fs(ot(t))])}function ye(e,t,s,l){let i;const o=s,a=ge(e);if(a||Ie(e)){const r=a&&Vt(e);let c=!1,g=!1;r&&(c=!it(e),g=Tt(e),e=Bs(e)),i=new Array(e.length);for(let p=0,b=e.length;p<b;p++)i[p]=t(c?g?es(ft(e[p])):ft(e[p]):e[p],p,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,o)}else if(Ae(e))if(e[Symbol.iterator])i=Array.from(e,(r,c)=>t(r,c,void 0,o));else{const r=Object.keys(e);i=new Array(r.length);for(let c=0,g=r.length;c<g;c++){const p=r[c];i[c]=t(e[p],p,c,o)}}else i=[];return i}function La(e,t,s={},l,i){if(Ge.ce||Ge.parent&&as(Ge.parent)&&Ge.parent.ce){const g=Object.keys(s).length>0;return u(),st(N,null,[Se("slot",s,l)],g?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),u();const a=o&&lo(o(s)),r=s.key||a&&a.key,c=st(N,{key:(r&&!ct(r)?r:`_${t}`)+(!a&&l?"_fb":"")},a||[],a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function lo(e){return e.some(t=>en(t)?!(t.type===vt||t.type===N&&!lo(t.children)):!0)?e:null}const Hn=e=>e?Bo(e)?el(e):Hn(e.parent):null,Ss=Ue(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=>Hn(e.parent),$root:e=>Hn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ro(e),$forceUpdate:e=>e.f||(e.f=()=>{Fn(e.update)}),$nextTick:e=>e.n||(e.n=Dn.bind(e.proxy)),$watch:e=>va.bind(e)}),Un=(e,t)=>e!==Oe&&!e.__isScriptSetup&&Pe(e,t),Oa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:l,data:i,props:o,accessCache:a,type:r,appContext:c}=e;if(t[0]!=="$"){const v=a[t];if(v!==void 0)switch(v){case 1:return l[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Un(l,t))return a[t]=1,l[t];if(i!==Oe&&Pe(i,t))return a[t]=2,i[t];if(Pe(o,t))return a[t]=3,o[t];if(s!==Oe&&Pe(s,t))return a[t]=4,s[t];qn&&(a[t]=0)}}const g=Ss[t];let p,b;if(g)return t==="$attrs"&&We(e.attrs,"get",""),g(e);if((p=r.__cssModules)&&(p=p[t]))return p;if(s!==Oe&&Pe(s,t))return a[t]=4,s[t];if(b=c.config.globalProperties,Pe(b,t))return b[t]},set({_:e},t,s){const{data:l,setupState:i,ctx:o}=e;return Un(i,t)?(i[t]=s,!0):l!==Oe&&Pe(l,t)?(l[t]=s,!0):Pe(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:i,props:o,type:a}},r){let c;return!!(s[r]||e!==Oe&&r[0]!=="$"&&Pe(e,r)||Un(t,r)||Pe(o,r)||Pe(l,r)||Pe(Ss,r)||Pe(i.config.globalProperties,r)||(c=a.__cssModules)&&c[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Pe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function oo(e){return ge(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let qn=!0;function Da(e){const t=ro(e),s=e.proxy,l=e.ctx;qn=!1,t.beforeCreate&&io(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:r,provide:c,inject:g,created:p,beforeMount:b,mounted:v,beforeUpdate:w,updated:$,activated:_,deactivated:C,beforeDestroy:A,beforeUnmount:P,destroyed:y,unmounted:k,render:S,renderTracked:Q,renderTriggered:te,errorCaptured:se,serverPrefetch:Y,expose:be,inheritAttrs:Re,components:ke,directives:Me,filters:Ce}=t;if(g&&Fa(g,l,null),a)for(const B in a){const j=a[B];ve(j)&&(l[B]=j.bind(s))}if(i){const B=i.call(s,s);Ae(B)&&(e.data=Zt(B))}if(qn=!0,o)for(const B in o){const j=o[B],_e=ve(j)?j.bind(s,s):ve(j.get)?j.get.bind(s,s):yt,xe=!ve(j)&&ve(j.set)?j.set.bind(s):yt,ie=H({get:_e,set:xe});Object.defineProperty(l,B,{enumerable:!0,configurable:!0,get:()=>ie.value,set:he=>ie.value=he})}if(r)for(const B in r)ao(r[B],l,s,B);if(c){const B=ve(c)?c.call(s):c;Reflect.ownKeys(B).forEach(j=>{is(j,B[j])})}p&&io(p,e,"c");function z(B,j){ge(j)?j.forEach(_e=>B(_e.bind(s))):j&&B(j.bind(s))}if(z(ka,b),z(It,v),z($a,w),z(Sa,$),z(_a,_),z(xa,C),z(Pa,se),z(Ea,Q),z(Ta,te),z(to,P),z(Pt,k),z(Ca,Y),ge(be))if(be.length){const B=e.exposed||(e.exposed={});be.forEach(j=>{Object.defineProperty(B,j,{get:()=>s[j],set:_e=>s[j]=_e,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===yt&&(e.render=S),Re!=null&&(e.inheritAttrs=Re),ke&&(e.components=ke),Me&&(e.directives=Me),Y&&Nn(e)}function Fa(e,t,s=yt){ge(e)&&(e=Kn(e));for(const l in e){const i=e[l];let o;Ae(i)?"default"in i?o=de(i.from||l,i.default,!0):o=de(i.from||l):o=de(i),Ke(o)?Object.defineProperty(t,l,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[l]=o}}function io(e,t,s){_t(ge(e)?e.map(l=>l.bind(t.proxy)):e.bind(t.proxy),t,s)}function ao(e,t,s,l){let i=l.includes(".")?Gl(s,l):()=>s[l];if(Ie(e)){const o=t[e];ve(o)&&ht(i,o)}else if(ve(e))ht(i,e.bind(s));else if(Ae(e))if(ge(e))e.forEach(o=>ao(o,t,s,l));else{const o=ve(e.handler)?e.handler.bind(s):t[e.handler];ve(o)&&ht(i,o,e)}}function ro(e){const t=e.type,{mixins:s,extends:l}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,r=o.get(t);let c;return r?c=r:!i.length&&!s&&!l?c=t:(c={},i.length&&i.forEach(g=>Gs(c,g,a,!0)),Gs(c,t,a)),Ae(t)&&o.set(t,c),c}function Gs(e,t,s,l=!1){const{mixins:i,extends:o}=t;o&&Gs(e,o,s,!0),i&&i.forEach(a=>Gs(e,a,s,!0));for(const a in t)if(!(l&&a==="expose")){const r=Ia[a]||s&&s[a];e[a]=r?r(e[a],t[a]):t[a]}return e}const Ia={data:uo,props:co,emits:co,methods:Cs,computed:Cs,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:Cs,directives:Cs,watch:Na,provide:uo,inject:Ba};function uo(e,t){return t?e?function(){return Ue(ve(e)?e.call(this,this):e,ve(t)?t.call(this,this):t)}:t:e}function Ba(e,t){return Cs(Kn(e),Kn(t))}function Kn(e){if(ge(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ye(e,t){return e?[...new Set([].concat(e,t))]:t}function Cs(e,t){return e?Ue(Object.create(null),e,t):t}function co(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:Ue(Object.create(null),oo(e),oo(t??{})):t}function Na(e,t){if(!e)return t;if(!t)return e;const s=Ue(Object.create(null),e);for(const l in t)s[l]=Ye(e[l],t[l]);return s}function fo(){return{app:null,config:{isNativeTag:fl,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 ja=0;function Ha(e,t){return function(l,i=null){ve(l)||(l=Ue({},l)),i!=null&&!Ae(i)&&(i=null);const o=fo(),a=new WeakSet,r=[];let c=!1;const g=o.app={_uid:ja++,_component:l,_props:i,_container:null,_context:o,_instance:null,version:Tr,get config(){return o.config},set config(p){},use(p,...b){return a.has(p)||(p&&ve(p.install)?(a.add(p),p.install(g,...b)):ve(p)&&(a.add(p),p(g,...b))),g},mixin(p){return o.mixins.includes(p)||o.mixins.push(p),g},component(p,b){return b?(o.components[p]=b,g):o.components[p]},directive(p,b){return b?(o.directives[p]=b,g):o.directives[p]},mount(p,b,v){if(!c){const w=g._ceVNode||Se(l,i);return w.appContext=o,v===!0?v="svg":v===!1&&(v=void 0),e(w,p,v),c=!0,g._container=p,p.__vue_app__=g,el(w.component)}},onUnmount(p){r.push(p)},unmount(){c&&(_t(r,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(p,b){return o.provides[p]=b,g},runWithContext(p){const b=rs;rs=g;try{return p()}finally{rs=b}}};return g}}let rs=null;const Ua=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ot(t)}Modifiers`]||e[`${At(t)}Modifiers`];function qa(e,t,...s){if(e.isUnmounted)return;const l=e.vnode.props||Oe;let i=s;const o=t.startsWith("update:"),a=o&&Ua(l,t.slice(7));a&&(a.trim&&(i=s.map(p=>Ie(p)?p.trim():p)),a.number&&(i=s.map($i)));let r,c=l[r=yn(t)]||l[r=yn(ot(t))];!c&&o&&(c=l[r=yn(At(t))]),c&&_t(c,e,6,i);const g=l[r+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,_t(g,e,6,i)}}const Ka=new WeakMap;function ho(e,t,s=!1){const l=s?Ka:t.emitsCache,i=l.get(e);if(i!==void 0)return i;const o=e.emits;let a={},r=!1;if(!ve(e)){const c=g=>{const p=ho(g,t,!0);p&&(r=!0,Ue(a,p))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!r?(Ae(e)&&l.set(e,null),null):(ge(o)?o.forEach(c=>a[c]=null):Ue(a,o),Ae(e)&&l.set(e,a),a)}function Ys(e,t){return!e||!Os(t)?!1:(t=t.slice(2).replace(/Once$/,""),Pe(e,t[0].toLowerCase()+t.slice(1))||Pe(e,At(t))||Pe(e,t))}function ay(){}function po(e){const{type:t,vnode:s,proxy:l,withProxy:i,propsOptions:[o],slots:a,attrs:r,emit:c,render:g,renderCache:p,props:b,data:v,setupState:w,ctx:$,inheritAttrs:_}=e,C=zs(e);let A,P;try{if(s.shapeFlag&4){const k=i||l,S=k;A=gt(g.call(S,k,p,b,w,v,$)),P=r}else{const k=t;A=gt(k.length>1?k(b,{attrs:r,slots:a,emit:c}):k(b,null)),P=t.props?r:za(r)}}catch(k){Es.length=0,ss(k,e,1),A=Se(vt)}let y=A;if(P&&_!==!1){const k=Object.keys(P),{shapeFlag:S}=y;k.length&&S&7&&(o&&k.some(pn)&&(P=Wa(P,o)),y=ds(y,P,!1,!0))}return s.dirs&&(y=ds(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(s.dirs):s.dirs),s.transition&&Bn(y,s.transition),A=y,zs(C),A}function Va(e,t=!0){let s;for(let l=0;l<e.length;l++){const i=e[l];if(en(i)){if(i.type!==vt||i.children==="v-if"){if(s)return;s=i}}else return}return s}const za=e=>{let t;for(const s in e)(s==="class"||s==="style"||Os(s))&&((t||(t={}))[s]=e[s]);return t},Wa=(e,t)=>{const s={};for(const l in e)(!pn(l)||!(l.slice(9)in t))&&(s[l]=e[l]);return s};function Qa(e,t,s){const{props:l,children:i,component:o}=e,{props:a,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?vo(l,a,g):!!a;if(c&8){const p=t.dynamicProps;for(let b=0;b<p.length;b++){const v=p[b];if(go(a,l,v)&&!Ys(g,v))return!0}}}else return(i||r)&&(!r||!r.$stable)?!0:l===a?!1:l?a?vo(l,a,g):!0:!!a;return!1}function vo(e,t,s){const l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let i=0;i<l.length;i++){const o=l[i];if(go(t,e,o)&&!Ys(s,o))return!0}return!1}function go(e,t,s){const l=e[s],i=t[s];return s==="style"&&Ae(l)&&Ae(i)?!bn(l,i):l!==i}function Vn({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 yo={},mo=()=>Object.create(yo),bo=e=>Object.getPrototypeOf(e)===yo;function Ja(e,t,s,l=!1){const i={},o=mo();e.propsDefaults=Object.create(null),_o(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);s?e.props=l?i:Xi(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Ga(e,t,s,l){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,r=Te(i),[c]=e.propsOptions;let g=!1;if((l||a>0)&&!(a&16)){if(a&8){const p=e.vnode.dynamicProps;for(let b=0;b<p.length;b++){let v=p[b];if(Ys(e.emitsOptions,v))continue;const w=t[v];if(c)if(Pe(o,v))w!==o[v]&&(o[v]=w,g=!0);else{const $=ot(v);i[$]=zn(c,r,$,w,e,!1)}else w!==o[v]&&(o[v]=w,g=!0)}}}else{_o(e,t,i,o)&&(g=!0);let p;for(const b in r)(!t||!Pe(t,b)&&((p=At(b))===b||!Pe(t,p)))&&(c?s&&(s[b]!==void 0||s[p]!==void 0)&&(i[b]=zn(c,r,b,void 0,e,!0)):delete i[b]);if(o!==r)for(const b in o)(!t||!Pe(t,b))&&(delete o[b],g=!0)}g&&St(e.attrs,"set","")}function _o(e,t,s,l){const[i,o]=e.propsOptions;let a=!1,r;if(t)for(let c in t){if(gs(c))continue;const g=t[c];let p;i&&Pe(i,p=ot(c))?!o||!o.includes(p)?s[p]=g:(r||(r={}))[p]=g:Ys(e.emitsOptions,c)||(!(c in l)||g!==l[c])&&(l[c]=g,a=!0)}if(o){const c=Te(s),g=r||Oe;for(let p=0;p<o.length;p++){const b=o[p];s[b]=zn(i,c,b,g[b],e,!Pe(g,b))}}return a}function zn(e,t,s,l,i,o){const a=e[s];if(a!=null){const r=Pe(a,"default");if(r&&l===void 0){const c=a.default;if(a.type!==Function&&!a.skipFactory&&ve(c)){const{propsDefaults:g}=i;if(s in g)l=g[s];else{const p=Ps(i);l=g[s]=c.call(null,t),p()}}else l=c;i.ce&&i.ce._setProp(s,l)}a[0]&&(o&&!r?l=!1:a[1]&&(l===""||l===At(s))&&(l=!0))}return l}const Ya=new WeakMap;function xo(e,t,s=!1){const l=s?Ya:t.propsCache,i=l.get(e);if(i)return i;const o=e.props,a={},r=[];let c=!1;if(!ve(e)){const p=b=>{c=!0;const[v,w]=xo(b,t,!0);Ue(a,v),w&&r.push(...w)};!s&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!o&&!c)return Ae(e)&&l.set(e,Gt),Gt;if(ge(o))for(let p=0;p<o.length;p++){const b=ot(o[p]);wo(b)&&(a[b]=Oe)}else if(o)for(const p in o){const b=ot(p);if(wo(b)){const v=o[p],w=a[b]=ge(v)||ve(v)?{type:v}:Ue({},v),$=w.type;let _=!1,C=!0;if(ge($))for(let A=0;A<$.length;++A){const P=$[A],y=ve(P)&&P.name;if(y==="Boolean"){_=!0;break}else y==="String"&&(C=!1)}else _=ve($)&&$.name==="Boolean";w[0]=_,w[1]=C,(_||Pe(w,"default"))&&r.push(b)}}const g=[a,r];return Ae(e)&&l.set(e,g),g}function wo(e){return e[0]!=="$"&&!gs(e)}const Wn=e=>e==="_"||e==="_ctx"||e==="$stable",Qn=e=>ge(e)?e.map(gt):[gt(e)],Xa=(e,t,s)=>{if(t._n)return t;const l=os((...i)=>Qn(t(...i)),s);return l._c=!1,l},ko=(e,t,s)=>{const l=e._ctx;for(const i in e){if(Wn(i))continue;const o=e[i];if(ve(o))t[i]=Xa(i,o,l);else if(o!=null){const a=Qn(o);t[i]=()=>a}}},$o=(e,t)=>{const s=Qn(t);e.slots.default=()=>s},So=(e,t,s)=>{for(const l in t)(s||!Wn(l))&&(e[l]=t[l])},Za=(e,t,s)=>{const l=e.slots=mo();if(e.vnode.shapeFlag&32){const i=t._;i?(So(l,t,s),s&&ml(l,"_",i,!0)):ko(t,l)}else t&&$o(e,t)},er=(e,t,s)=>{const{vnode:l,slots:i}=e;let o=!0,a=Oe;if(l.shapeFlag&32){const r=t._;r?s&&r===1?o=!1:So(i,t,s):(o=!t.$stable,ko(t,i)),a=t}else t&&($o(e,t),a={default:1});if(o)for(const r in i)!Wn(r)&&a[r]==null&&delete i[r]},Xe=cr;function tr(e){return sr(e)}function sr(e,t){const s=Is();s.__VUE__=!0;const{insert:l,remove:i,patchProp:o,createElement:a,createText:r,createComment:c,setText:g,setElementText:p,parentNode:b,nextSibling:v,setScopeId:w=yt,insertStaticContent:$}=e,_=(f,m,T,I=null,L=null,O=null,J=void 0,V=null,D=!!m.dynamicChildren)=>{if(f===m)return;f&&!Bt(f,m)&&(I=oe(f),he(f,L,O,!0),f=null),m.patchFlag===-2&&(D=!1,m.dynamicChildren=null);const{type:F,ref:ce,shapeFlag:ee}=m;switch(F){case Xs:C(f,m,T,I);break;case vt:A(f,m,T,I);break;case Zs:f==null&&P(m,T,I,J);break;case N:ke(f,m,T,I,L,O,J,V,D);break;default:ee&1?S(f,m,T,I,L,O,J,V,D):ee&6?Me(f,m,T,I,L,O,J,V,D):(ee&64||ee&128)&&F.process(f,m,T,I,L,O,J,V,D,E)}ce!=null&&L?$s(ce,f&&f.ref,O,m||f,!m):ce==null&&f&&f.ref!=null&&$s(f.ref,null,O,f,!0)},C=(f,m,T,I)=>{if(f==null)l(m.el=r(m.children),T,I);else{const L=m.el=f.el;m.children!==f.children&&g(L,m.children)}},A=(f,m,T,I)=>{f==null?l(m.el=c(m.children||""),T,I):m.el=f.el},P=(f,m,T,I)=>{[f.el,f.anchor]=$(f.children,m,T,I,f.el,f.anchor)},y=({el:f,anchor:m},T,I)=>{let L;for(;f&&f!==m;)L=v(f),l(f,T,I),f=L;l(m,T,I)},k=({el:f,anchor:m})=>{let T;for(;f&&f!==m;)T=v(f),i(f),f=T;i(m)},S=(f,m,T,I,L,O,J,V,D)=>{if(m.type==="svg"?J="svg":m.type==="math"&&(J="mathml"),f==null)Q(m,T,I,L,O,J,V,D);else{const F=f.el&&f.el._isVueCE?f.el:null;try{F&&F._beginPatch(),Y(f,m,L,O,J,V,D)}finally{F&&F._endPatch()}}},Q=(f,m,T,I,L,O,J,V)=>{let D,F;const{props:ce,shapeFlag:ee,transition:ae,dirs:pe}=f;if(D=f.el=a(f.type,O,ce&&ce.is,ce),ee&8?p(D,f.children):ee&16&&se(f.children,D,null,I,L,Jn(f,O),J,V),pe&&Wt(f,null,I,"created"),te(D,f,f.scopeId,J,I),ce){for(const Le in ce)Le!=="value"&&!gs(Le)&&o(D,Le,null,ce[Le],O,I);"value"in ce&&o(D,"value",null,ce.value,O),(F=ce.onVnodeBeforeMount)&&wt(F,I,f)}pe&&Wt(f,null,I,"beforeMount");const $e=nr(L,ae);$e&&ae.beforeEnter(D),l(D,m,T),((F=ce&&ce.onVnodeMounted)||$e||pe)&&Xe(()=>{F&&wt(F,I,f),$e&&ae.enter(D),pe&&Wt(f,null,I,"mounted")},L)},te=(f,m,T,I,L)=>{if(T&&w(f,T),I)for(let O=0;O<I.length;O++)w(f,I[O]);if(L){let O=L.subTree;if(m===O||Ro(O.type)&&(O.ssContent===m||O.ssFallback===m)){const J=L.vnode;te(f,J,J.scopeId,J.slotScopeIds,L.parent)}}},se=(f,m,T,I,L,O,J,V,D=0)=>{for(let F=D;F<f.length;F++){const ce=f[F]=V?Rt(f[F]):gt(f[F]);_(null,ce,m,T,I,L,O,J,V)}},Y=(f,m,T,I,L,O,J)=>{const V=m.el=f.el;let{patchFlag:D,dynamicChildren:F,dirs:ce}=m;D|=f.patchFlag&16;const ee=f.props||Oe,ae=m.props||Oe;let pe;if(T&&Qt(T,!1),(pe=ae.onVnodeBeforeUpdate)&&wt(pe,T,m,f),ce&&Wt(m,f,T,"beforeUpdate"),T&&Qt(T,!0),(ee.innerHTML&&ae.innerHTML==null||ee.textContent&&ae.textContent==null)&&p(V,""),F?be(f.dynamicChildren,F,V,T,I,Jn(m,L),O):J||j(f,m,V,null,T,I,Jn(m,L),O,!1),D>0){if(D&16)Re(V,ee,ae,T,L);else if(D&2&&ee.class!==ae.class&&o(V,"class",null,ae.class,L),D&4&&o(V,"style",ee.style,ae.style,L),D&8){const $e=m.dynamicProps;for(let Le=0;Le<$e.length;Le++){const Ee=$e[Le],Qe=ee[Ee],He=ae[Ee];(He!==Qe||Ee==="value")&&o(V,Ee,Qe,He,L,T)}}D&1&&f.children!==m.children&&p(V,m.children)}else!J&&F==null&&Re(V,ee,ae,T,L);((pe=ae.onVnodeUpdated)||ce)&&Xe(()=>{pe&&wt(pe,T,m,f),ce&&Wt(m,f,T,"updated")},I)},be=(f,m,T,I,L,O,J)=>{for(let V=0;V<m.length;V++){const D=f[V],F=m[V],ce=D.el&&(D.type===N||!Bt(D,F)||D.shapeFlag&198)?b(D.el):T;_(D,F,ce,null,I,L,O,J,!0)}},Re=(f,m,T,I,L)=>{if(m!==T){if(m!==Oe)for(const O in m)!gs(O)&&!(O in T)&&o(f,O,m[O],null,L,I);for(const O in T){if(gs(O))continue;const J=T[O],V=m[O];J!==V&&O!=="value"&&o(f,O,V,J,L,I)}"value"in T&&o(f,"value",m.value,T.value,L)}},ke=(f,m,T,I,L,O,J,V,D)=>{const F=m.el=f?f.el:r(""),ce=m.anchor=f?f.anchor:r("");let{patchFlag:ee,dynamicChildren:ae,slotScopeIds:pe}=m;pe&&(V=V?V.concat(pe):pe),f==null?(l(F,T,I),l(ce,T,I),se(m.children||[],T,ce,L,O,J,V,D)):ee>0&&ee&64&&ae&&f.dynamicChildren&&f.dynamicChildren.length===ae.length?(be(f.dynamicChildren,ae,T,L,O,J,V),(m.key!=null||L&&m===L.subTree)&&Co(f,m,!0)):j(f,m,T,ce,L,O,J,V,D)},Me=(f,m,T,I,L,O,J,V,D)=>{m.slotScopeIds=V,f==null?m.shapeFlag&512?L.ctx.activate(m,T,I,J,D):Ce(m,T,I,L,O,J,D):we(f,m,D)},Ce=(f,m,T,I,L,O,J)=>{const V=f.component=mr(f,I,L);if(jn(f)&&(V.ctx.renderer=E),_r(V,!1,J),V.asyncDep){if(L&&L.registerDep(V,z,J),!f.el){const D=V.subTree=Se(vt);A(null,D,m,T),f.placeholder=D.el}}else z(V,f,m,T,L,O,J)},we=(f,m,T)=>{const I=m.component=f.component;if(Qa(f,m,T))if(I.asyncDep&&!I.asyncResolved){B(I,m,T);return}else I.next=m,I.update();else m.el=f.el,I.vnode=m},z=(f,m,T,I,L,O,J)=>{const V=()=>{if(f.isMounted){let{next:ee,bu:ae,u:pe,parent:$e,vnode:Le}=f;{const tt=To(f);if(tt){ee&&(ee.el=Le.el,B(f,ee,J)),tt.asyncDep.then(()=>{Xe(()=>{f.isUnmounted||F()},L)});return}}let Ee=ee,Qe;Qt(f,!1),ee?(ee.el=Le.el,B(f,ee,J)):ee=Le,ae&&mn(ae),(Qe=ee.props&&ee.props.onVnodeBeforeUpdate)&&wt(Qe,$e,ee,Le),Qt(f,!0);const He=po(f),nt=f.subTree;f.subTree=He,_(nt,He,b(nt.el),oe(nt),f,L,O),ee.el=He.el,Ee===null&&Vn(f,He.el),pe&&Xe(pe,L),(Qe=ee.props&&ee.props.onVnodeUpdated)&&Xe(()=>wt(Qe,$e,ee,Le),L)}else{let ee;const{el:ae,props:pe}=m,{bm:$e,m:Le,parent:Ee,root:Qe,type:He}=f,nt=as(m);Qt(f,!1),$e&&mn($e),!nt&&(ee=pe&&pe.onVnodeBeforeMount)&&wt(ee,Ee,m),Qt(f,!0);{Qe.ce&&Qe.ce._hasShadowRoot()&&Qe.ce._injectChildStyle(He);const tt=f.subTree=po(f);_(null,tt,T,I,f,L,O),m.el=tt.el}if(Le&&Xe(Le,L),!nt&&(ee=pe&&pe.onVnodeMounted)){const tt=m;Xe(()=>wt(ee,Ee,tt),L)}(m.shapeFlag&256||Ee&&as(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&f.a&&Xe(f.a,L),f.isMounted=!0,m=T=I=null}};f.scope.on();const D=f.effect=new kl(V);f.scope.off();const F=f.update=D.run.bind(D),ce=f.job=D.runIfDirty.bind(D);ce.i=f,ce.id=f.uid,D.scheduler=()=>Fn(ce),Qt(f,!0),F()},B=(f,m,T)=>{m.component=f;const I=f.vnode.props;f.vnode=m,f.next=null,Ga(f,m.props,I,T),er(f,m.children,T),mt(),Vl(f),bt()},j=(f,m,T,I,L,O,J,V,D=!1)=>{const F=f&&f.children,ce=f?f.shapeFlag:0,ee=m.children,{patchFlag:ae,shapeFlag:pe}=m;if(ae>0){if(ae&128){xe(F,ee,T,I,L,O,J,V,D);return}else if(ae&256){_e(F,ee,T,I,L,O,J,V,D);return}}pe&8?(ce&16&&U(F,L,O),ee!==F&&p(T,ee)):ce&16?pe&16?xe(F,ee,T,I,L,O,J,V,D):U(F,L,O,!0):(ce&8&&p(T,""),pe&16&&se(ee,T,I,L,O,J,V,D))},_e=(f,m,T,I,L,O,J,V,D)=>{f=f||Gt,m=m||Gt;const F=f.length,ce=m.length,ee=Math.min(F,ce);let ae;for(ae=0;ae<ee;ae++){const pe=m[ae]=D?Rt(m[ae]):gt(m[ae]);_(f[ae],pe,T,null,L,O,J,V,D)}F>ce?U(f,L,O,!0,!1,ee):se(m,T,I,L,O,J,V,D,ee)},xe=(f,m,T,I,L,O,J,V,D)=>{let F=0;const ce=m.length;let ee=f.length-1,ae=ce-1;for(;F<=ee&&F<=ae;){const pe=f[F],$e=m[F]=D?Rt(m[F]):gt(m[F]);if(Bt(pe,$e))_(pe,$e,T,null,L,O,J,V,D);else break;F++}for(;F<=ee&&F<=ae;){const pe=f[ee],$e=m[ae]=D?Rt(m[ae]):gt(m[ae]);if(Bt(pe,$e))_(pe,$e,T,null,L,O,J,V,D);else break;ee--,ae--}if(F>ee){if(F<=ae){const pe=ae+1,$e=pe<ce?m[pe].el:I;for(;F<=ae;)_(null,m[F]=D?Rt(m[F]):gt(m[F]),T,$e,L,O,J,V,D),F++}}else if(F>ae)for(;F<=ee;)he(f[F],L,O,!0),F++;else{const pe=F,$e=F,Le=new Map;for(F=$e;F<=ae;F++){const ne=m[F]=D?Rt(m[F]):gt(m[F]);ne.key!=null&&Le.set(ne.key,F)}let Ee,Qe=0;const He=ae-$e+1;let nt=!1,tt=0;const X=new Array(He);for(F=0;F<He;F++)X[F]=0;for(F=pe;F<=ee;F++){const ne=f[F];if(Qe>=He){he(ne,L,O,!0);continue}let fe;if(ne.key!=null)fe=Le.get(ne.key);else for(Ee=$e;Ee<=ae;Ee++)if(X[Ee-$e]===0&&Bt(ne,m[Ee])){fe=Ee;break}fe===void 0?he(ne,L,O,!0):(X[fe-$e]=F+1,fe>=tt?tt=fe:nt=!0,_(ne,m[fe],T,null,L,O,J,V,D),Qe++)}const M=nt?lr(X):Gt;for(Ee=M.length-1,F=He-1;F>=0;F--){const ne=$e+F,fe=m[ne],ut=m[ne+1],lt=ne+1<ce?ut.el||Po(ut):I;X[F]===0?_(null,fe,T,lt,L,O,J,V,D):nt&&(Ee<0||F!==M[Ee]?ie(fe,T,lt,2):Ee--)}}},ie=(f,m,T,I,L=null)=>{const{el:O,type:J,transition:V,children:D,shapeFlag:F}=f;if(F&6){ie(f.component.subTree,m,T,I);return}if(F&128){f.suspense.move(m,T,I);return}if(F&64){J.move(f,m,T,E);return}if(J===N){l(O,m,T);for(let ee=0;ee<D.length;ee++)ie(D[ee],m,T,I);l(f.anchor,m,T);return}if(J===Zs){y(f,m,T);return}if(I!==2&&F&1&&V)if(I===0)V.beforeEnter(O),l(O,m,T),Xe(()=>V.enter(O),L);else{const{leave:ee,delayLeave:ae,afterLeave:pe}=V,$e=()=>{f.ctx.isUnmounted?i(O):l(O,m,T)},Le=()=>{O._isLeaving&&O[ma](!0),ee(O,()=>{$e(),pe&&pe()})};ae?ae(O,$e,Le):Le()}else l(O,m,T)},he=(f,m,T,I=!1,L=!1)=>{const{type:O,props:J,ref:V,children:D,dynamicChildren:F,shapeFlag:ce,patchFlag:ee,dirs:ae,cacheIndex:pe}=f;if(ee===-2&&(L=!1),V!=null&&(mt(),$s(V,null,T,f,!0),bt()),pe!=null&&(m.renderCache[pe]=void 0),ce&256){m.ctx.deactivate(f);return}const $e=ce&1&&ae,Le=!as(f);let Ee;if(Le&&(Ee=J&&J.onVnodeBeforeUnmount)&&wt(Ee,m,f),ce&6)le(f.component,T,I);else{if(ce&128){f.suspense.unmount(T,I);return}$e&&Wt(f,null,m,"beforeUnmount"),ce&64?f.type.remove(f,m,T,E,I):F&&!F.hasOnce&&(O!==N||ee>0&&ee&64)?U(F,m,T,!1,!0):(O===N&&ee&384||!L&&ce&16)&&U(D,m,T),I&&re(f)}(Le&&(Ee=J&&J.onVnodeUnmounted)||$e)&&Xe(()=>{Ee&&wt(Ee,m,f),$e&&Wt(f,null,m,"unmounted")},T)},re=f=>{const{type:m,el:T,anchor:I,transition:L}=f;if(m===N){q(T,I);return}if(m===Zs){k(f);return}const O=()=>{i(T),L&&!L.persisted&&L.afterLeave&&L.afterLeave()};if(f.shapeFlag&1&&L&&!L.persisted){const{leave:J,delayLeave:V}=L,D=()=>J(T,O);V?V(f.el,O,D):D()}else O()},q=(f,m)=>{let T;for(;f!==m;)T=v(f),i(f),f=T;i(m)},le=(f,m,T)=>{const{bum:I,scope:L,job:O,subTree:J,um:V,m:D,a:F}=f;Eo(D),Eo(F),I&&mn(I),L.stop(),O&&(O.flags|=8,he(J,f,m,T)),V&&Xe(V,m),Xe(()=>{f.isUnmounted=!0},m)},U=(f,m,T,I=!1,L=!1,O=0)=>{for(let J=O;J<f.length;J++)he(f[J],m,T,I,L)},oe=f=>{if(f.shapeFlag&6)return oe(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const m=v(f.anchor||f.el),T=m&&m[ga];return T?v(T):m};let K=!1;const Z=(f,m,T)=>{let I;f==null?m._vnode&&(he(m._vnode,null,null,!0),I=m._vnode.component):_(m._vnode||null,f,m,null,null,null,T),m._vnode=f,K||(K=!0,Vl(I),zl(),K=!1)},E={p:_,um:he,m:ie,r:re,mt:Ce,mc:se,pc:j,pbc:be,n:oe,o:e};return{render:Z,hydrate:void 0,createApp:Ha(Z)}}function Jn({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 nr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Co(e,t,s=!1){const l=e.children,i=t.children;if(ge(l)&&ge(i))for(let o=0;o<l.length;o++){const a=l[o];let r=i[o];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=i[o]=Rt(i[o]),r.el=a.el),!s&&r.patchFlag!==-2&&Co(a,r)),r.type===Xs&&(r.patchFlag===-1&&(r=i[o]=Rt(r)),r.el=a.el),r.type===vt&&!r.el&&(r.el=a.el)}}function lr(e){const t=e.slice(),s=[0];let l,i,o,a,r;const c=e.length;for(l=0;l<c;l++){const g=e[l];if(g!==0){if(i=s[s.length-1],e[i]<g){t[l]=i,s.push(l);continue}for(o=0,a=s.length-1;o<a;)r=o+a>>1,e[s[r]]<g?o=r+1:a=r;g<e[s[o]]&&(o>0&&(t[l]=s[o-1]),s[o]=l)}}for(o=s.length,a=s[o-1];o-- >0;)s[o]=a,a=t[a];return s}function To(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:To(t)}function Eo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Po(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Po(t.subTree):null}const Ro=e=>e.__isSuspense;let Gn=0;const or={name:"Suspense",__isSuspense:!0,process(e,t,s,l,i,o,a,r,c,g){if(e==null)ir(t,s,l,i,o,a,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}ar(e,t,s,l,i,a,r,c,g)}},hydrate:rr,normalize:ur};function Ts(e,t){const s=e.props&&e.props[t];ve(s)&&s()}function ir(e,t,s,l,i,o,a,r,c){const{p:g,o:{createElement:p}}=c,b=p("div"),v=e.suspense=Mo(e,i,l,t,b,s,o,a,r,c);g(null,v.pendingBranch=e.ssContent,b,null,l,v,o,a),v.deps>0?(Ts(e,"onPending"),Ts(e,"onFallback"),g(null,e.ssFallback,t,s,l,null,o,a),us(v,e.ssFallback)):v.resolve(!1,!0)}function ar(e,t,s,l,i,o,a,r,{p:c,um:g,o:{createElement:p}}){const b=t.suspense=e.suspense;b.vnode=t,t.el=e.el;const v=t.ssContent,w=t.ssFallback,{activeBranch:$,pendingBranch:_,isInFallback:C,isHydrating:A}=b;if(_)b.pendingBranch=v,Bt(_,v)?(c(_,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0?b.resolve():C&&(A||(c($,w,s,l,i,null,o,a,r),us(b,w)))):(b.pendingId=Gn++,A?(b.isHydrating=!1,b.activeBranch=_):g(_,i,b),b.deps=0,b.effects.length=0,b.hiddenContainer=p("div"),C?(c(null,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0?b.resolve():(c($,w,s,l,i,null,o,a,r),us(b,w))):$&&Bt($,v)?(c($,v,s,l,i,b,o,a,r),b.resolve(!0)):(c(null,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0&&b.resolve()));else if($&&Bt($,v))c($,v,s,l,i,b,o,a,r),us(b,v);else if(Ts(t,"onPending"),b.pendingBranch=v,v.shapeFlag&512?b.pendingId=v.component.suspenseId:b.pendingId=Gn++,c(null,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0)b.resolve();else{const{timeout:P,pendingId:y}=b;P>0?setTimeout(()=>{b.pendingId===y&&b.fallback(w)},P):P===0&&b.fallback(w)}}function Mo(e,t,s,l,i,o,a,r,c,g,p=!1){const{p:b,m:v,um:w,n:$,o:{parentNode:_,remove:C}}=g;let A;const P=dr(e);P&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const y=e.props?Si(e.props.timeout):void 0,k=o,S={vnode:e,parent:t,parentComponent:s,namespace:a,container:l,hiddenContainer:i,deps:0,pendingId:Gn++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!p,isHydrating:p,isUnmounted:!1,effects:[],resolve(Q=!1,te=!1){const{vnode:se,activeBranch:Y,pendingBranch:be,pendingId:Re,effects:ke,parentComponent:Me,container:Ce,isInFallback:we}=S;let z=!1;S.isHydrating?S.isHydrating=!1:Q||(z=Y&&be.transition&&be.transition.mode==="out-in",z&&(Y.transition.afterLeave=()=>{Re===S.pendingId&&(v(be,Ce,o===k?$(Y):o,0),In(ke),we&&se.ssFallback&&(se.ssFallback.el=null))}),Y&&(_(Y.el)===Ce&&(o=$(Y)),w(Y,Me,S,!0),!z&&we&&se.ssFallback&&Xe(()=>se.ssFallback.el=null,S)),z||v(be,Ce,o,0)),us(S,be),S.pendingBranch=null,S.isInFallback=!1;let B=S.parent,j=!1;for(;B;){if(B.pendingBranch){B.effects.push(...ke),j=!0;break}B=B.parent}!j&&!z&&In(ke),S.effects=[],P&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!te&&t.resolve()),Ts(se,"onResolve")},fallback(Q){if(!S.pendingBranch)return;const{vnode:te,activeBranch:se,parentComponent:Y,container:be,namespace:Re}=S;Ts(te,"onFallback");const ke=$(se),Me=()=>{S.isInFallback&&(b(null,Q,be,ke,Y,null,Re,r,c),us(S,Q))},Ce=Q.transition&&Q.transition.mode==="out-in";Ce&&(se.transition.afterLeave=Me),S.isInFallback=!0,w(se,Y,null,!0),Ce||Me()},move(Q,te,se){S.activeBranch&&v(S.activeBranch,Q,te,se),S.container=Q},next(){return S.activeBranch&&$(S.activeBranch)},registerDep(Q,te,se){const Y=!!S.pendingBranch;Y&&S.deps++;const be=Q.vnode.el;Q.asyncDep.catch(Re=>{ss(Re,Q,0)}).then(Re=>{if(Q.isUnmounted||S.isUnmounted||S.pendingId!==Q.suspenseId)return;Q.asyncResolved=!0;const{vnode:ke}=Q;Zn(Q,Re),be&&(ke.el=be);const Me=!be&&Q.subTree.el;te(Q,ke,_(be||Q.subTree.el),be?null:$(Q.subTree),S,a,se),Me&&(ke.placeholder=null,C(Me)),Vn(Q,ke.el),Y&&--S.deps===0&&S.resolve()})},unmount(Q,te){S.isUnmounted=!0,S.activeBranch&&w(S.activeBranch,s,Q,te),S.pendingBranch&&w(S.pendingBranch,s,Q,te)}};return S}function rr(e,t,s,l,i,o,a,r,c){const g=t.suspense=Mo(t,l,s,e.parentNode,document.createElement("div"),null,i,o,a,r,!0),p=c(e,g.pendingBranch=t.ssContent,s,g,o,a);return g.deps===0&&g.resolve(!1,!0),p}function ur(e){const{shapeFlag:t,children:s}=e,l=t&32;e.ssContent=Ao(l?s.default:s),e.ssFallback=l?Ao(s.fallback):Se(vt)}function Ao(e){let t;if(ve(e)){const s=cs&&e._c;s&&(e._d=!1,u()),e=e(),s&&(e._d=!0,t=et,Lo())}return ge(e)&&(e=Va(e)),e=gt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function cr(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):In(e)}function us(e,t){e.activeBranch=t;const{vnode:s,parentComponent:l}=e;let i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;s.el=i,l&&l.subTree===s&&(l.vnode.el=i,Vn(l,i))}function dr(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const N=Symbol.for("v-fgt"),Xs=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),Zs=Symbol.for("v-stc"),Es=[];let et=null;function u(e=!1){Es.push(et=e?null:[])}function Lo(){Es.pop(),et=Es[Es.length-1]||null}let cs=1;function Oo(e,t=!1){cs+=e,e<0&&et&&t&&(et.hasOnce=!0)}function Do(e){return e.dynamicChildren=cs>0?et||Gt:null,Lo(),cs>0&&et&&et.push(e),e}function d(e,t,s,l,i,o){return Do(n(e,t,s,l,i,o,!0))}function st(e,t,s,l,i){return Do(Se(e,t,s,l,i,!0))}function en(e){return e?e.__v_isVNode===!0:!1}function Bt(e,t){return e.type===t.type&&e.key===t.key}const Fo=({key:e})=>e??null,tn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ie(e)||Ke(e)||ve(e)?{i:Ge,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,l=0,i=null,o=e===N?0:1,a=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Fo(t),ref:t&&tn(t),scopeId:Ql,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:i,dynamicChildren:null,appContext:null,ctx:Ge};return r?(Yn(c,s),o&128&&e.normalize(c)):s&&(c.shapeFlag|=Ie(s)?8:16),cs>0&&!a&&et&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&et.push(c),c}const Se=fr;function fr(e,t=null,s=null,l=0,i=null,o=!1){if((!e||e===so)&&(e=vt),en(e)){const r=ds(e,t,!0);return s&&Yn(r,s),cs>0&&!o&&et&&(r.shapeFlag&6?et[et.indexOf(e)]=r:et.push(r)),r.patchFlag=-2,r}if(Cr(e)&&(e=e.__vccOpts),t){t=hr(t);let{class:r,style:c}=t;r&&!Ie(r)&&(t.class=R(r)),Ae(c)&&(Ln(c)&&!ge(c)&&(c=Ue({},c)),t.style=qe(c))}const a=Ie(e)?1:Ro(e)?128:ya(e)?64:Ae(e)?4:ve(e)?2:0;return n(e,t,s,l,i,a,o,!0)}function hr(e){return e?Ln(e)||bo(e)?Ue({},e):e:null}function ds(e,t,s=!1,l=!1){const{props:i,ref:o,patchFlag:a,children:r,transition:c}=e,g=t?vr(i||{},t):i,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Fo(g),ref:t&&t.ref?s&&o?ge(o)?o.concat(tn(t)):[o,tn(t)]:tn(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!==N?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ds(e.ssContent),ssFallback:e.ssFallback&&ds(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&l&&Bn(p,c.clone(p)),p}function me(e=" ",t=0){return Se(Xs,null,e,t)}function pr(e,t){const s=Se(Zs,null,e);return s.staticCount=t,s}function G(e="",t=!1){return t?(u(),st(vt,null,e)):Se(vt,null,e)}function gt(e){return e==null||typeof e=="boolean"?Se(vt):ge(e)?Se(N,null,e.slice()):en(e)?Rt(e):Se(Xs,null,String(e))}function Rt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ds(e)}function Yn(e,t){let s=0;const{shapeFlag:l}=e;if(t==null)t=null;else if(ge(t))s=16;else if(typeof t=="object")if(l&65){const i=t.default;i&&(i._c&&(i._d=!1),Yn(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!bo(t)?t._ctx=Ge:i===3&&Ge&&(Ge.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ve(t)?(t={default:t,_ctx:Ge},s=32):(t=String(t),l&64?(s=16,t=[me(t)]):s=8);e.children=t,e.shapeFlag|=s}function vr(...e){const t={};for(let s=0;s<e.length;s++){const l=e[s];for(const i in l)if(i==="class")t.class!==l.class&&(t.class=R([t.class,l.class]));else if(i==="style")t.style=qe([t.style,l.style]);else if(Os(i)){const o=t[i],a=l[i];a&&o!==a&&!(ge(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=l[i])}return t}function wt(e,t,s,l=null){_t(e,t,7,[s,l])}const gr=fo();let yr=0;function mr(e,t,s){const l=e.type,i=(t?t.appContext:e.appContext)||gr,o={uid:yr++,vnode:e,type:l,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ai(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xo(l,i),emitsOptions:ho(l,i),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:l.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,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=qa.bind(null,o),e.ce&&e.ce(o),o}let Ve=null;const br=()=>Ve||Ge;let sn,Xn;{const e=Is(),t=(s,l)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(l),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};sn=t("__VUE_INSTANCE_SETTERS__",s=>Ve=s),Xn=t("__VUE_SSR_SETTERS__",s=>fs=s)}const Ps=e=>{const t=Ve;return sn(e),e.scope.on(),()=>{e.scope.off(),sn(t)}},Io=()=>{Ve&&Ve.scope.off(),sn(null)};function Bo(e){return e.vnode.shapeFlag&4}let fs=!1;function _r(e,t=!1,s=!1){t&&Xn(t);const{props:l,children:i}=e.vnode,o=Bo(e);Ja(e,l,o,t),Za(e,i,s||t);const a=o?xr(e,t):void 0;return t&&Xn(!1),a}function xr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Oa);const{setup:l}=s;if(l){mt();const i=e.setupContext=l.length>1?kr(e):null,o=Ps(e),a=ts(l,e,0,[e.props,i]),r=vl(a);if(bt(),o(),(r||e.sp)&&!as(e)&&Nn(e),r){if(a.then(Io,Io),t)return a.then(c=>{Zn(e,c)}).catch(c=>{ss(c,e,0)});e.asyncDep=a}else Zn(e,a)}else No(e)}function Zn(e,t,s){ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ae(t)&&(e.setupState=Hl(t)),No(e)}function No(e,t,s){const l=e.type;e.render||(e.render=l.render||yt);{const i=Ps(e);mt();try{Da(e)}finally{bt(),i()}}}const wr={get(e,t){return We(e,"get",""),e[t]}};function kr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,wr),slots:e.slots,emit:e.emit,expose:t}}function el(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Hl(Zi(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ss)return Ss[s](e)},has(t,s){return s in t||s in Ss}})):e.proxy}const $r=/(?:^|[-_])\w/g,Sr=e=>e.replace($r,t=>t.toUpperCase()).replace(/[-_]/g,"");function jo(e,t=!0){return ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Ho(e,t,s=!1){let l=jo(t);if(!l&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(l=i[1])}if(!l&&e){const i=o=>{for(const a in o)if(o[a]===t)return a};l=i(e.components)||e.parent&&i(e.parent.type.components)||i(e.appContext.components)}return l?Sr(l):s?"App":"Anonymous"}function Cr(e){return ve(e)&&"__vccOpts"in e}const H=(e,t)=>la(e,t,fs),Tr="3.5.29";let tl;const Uo=typeof window<"u"&&window.trustedTypes;if(Uo)try{tl=Uo.createPolicy("vue",{createHTML:e=>e})}catch{}const qo=tl?e=>tl.createHTML(e):e=>e,Er="http://www.w3.org/2000/svg",Pr="http://www.w3.org/1998/Math/MathML",Mt=typeof document<"u"?document:null,Ko=Mt&&Mt.createElement("template"),Rr={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 i=t==="svg"?Mt.createElementNS(Er,e):t==="mathml"?Mt.createElementNS(Pr,e):s?Mt.createElement(e,{is:s}):Mt.createElement(e);return e==="select"&&l&&l.multiple!=null&&i.setAttribute("multiple",l.multiple),i},createText:e=>Mt.createTextNode(e),createComment:e=>Mt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,l,i,o){const a=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Ko.innerHTML=qo(l==="svg"?`<svg>${e}</svg>`:l==="mathml"?`<math>${e}</math>`:e);const r=Ko.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[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Mr=Symbol("_vtc");function Ar(e,t,s){const l=e[Mr];l&&(t=(t?[t,...l]:[...l]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Vo=Symbol("_vod"),Lr=Symbol("_vsh"),Or=Symbol(""),Dr=/(?:^|;)\s*display\s*:/;function Fr(e,t,s){const l=e.style,i=Ie(s);let o=!1;if(s&&!i){if(t)if(Ie(t))for(const a of t.split(";")){const r=a.slice(0,a.indexOf(":")).trim();s[r]==null&&nn(l,r,"")}else for(const a in t)s[a]==null&&nn(l,a,"");for(const a in s)a==="display"&&(o=!0),nn(l,a,s[a])}else if(i){if(t!==s){const a=l[Or];a&&(s+=";"+a),l.cssText=s,o=Dr.test(s)}}else t&&e.removeAttribute("style");Vo in e&&(e[Vo]=o?l.display:"",e[Lr]&&(l.display="none"))}const zo=/\s*!important$/;function nn(e,t,s){if(ge(s))s.forEach(l=>nn(e,t,l));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const l=Ir(e,t);zo.test(s)?e.setProperty(At(l),s.replace(zo,""),"important"):e[l]=s}}const Wo=["Webkit","Moz","ms"],sl={};function Ir(e,t){const s=sl[t];if(s)return s;let l=ot(t);if(l!=="filter"&&l in e)return sl[t]=l;l=Fs(l);for(let i=0;i<Wo.length;i++){const o=Wo[i]+l;if(o in e)return sl[t]=o}return t}const Qo="http://www.w3.org/1999/xlink";function Jo(e,t,s,l,i,o=Ri(t)){l&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Qo,t.slice(6,t.length)):e.setAttributeNS(Qo,t,s):s==null||o&&!_l(s)?e.removeAttribute(t):e.setAttribute(t,o?"":ct(s)?String(s):s)}function Go(e,t,s,l,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?qo(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 a=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=_l(s):s==null&&r==="string"?(s="",a=!0):r==="number"&&(s=0,a=!0)}try{e[t]=s}catch{}a&&e.removeAttribute(i||t)}function Br(e,t,s,l){e.addEventListener(t,s,l)}function Nr(e,t,s,l){e.removeEventListener(t,s,l)}const Yo=Symbol("_vei");function jr(e,t,s,l,i=null){const o=e[Yo]||(e[Yo]={}),a=o[t];if(l&&a)a.value=l;else{const[r,c]=Hr(t);if(l){const g=o[t]=Kr(l,i);Br(e,r,g,c)}else a&&(Nr(e,r,a,c),o[t]=void 0)}}const Xo=/(?:Once|Passive|Capture)$/;function Hr(e){let t;if(Xo.test(e)){t={};let l;for(;l=e.match(Xo);)e=e.slice(0,e.length-l[0].length),t[l[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):At(e.slice(2)),t]}let nl=0;const Ur=Promise.resolve(),qr=()=>nl||(Ur.then(()=>nl=0),nl=Date.now());function Kr(e,t){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;_t(Vr(l,s.value),t,5,[l])};return s.value=e,s.attached=qr(),s}function Vr(e,t){if(ge(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(l=>i=>!i._stopped&&l&&l(i))}else return t}const Zo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zr=(e,t,s,l,i,o)=>{const a=i==="svg";t==="class"?Ar(e,l,a):t==="style"?Fr(e,s,l):Os(t)?pn(t)||jr(e,t,s,l,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Wr(e,t,l,a))?(Go(e,t,l),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jo(e,t,l,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ie(l))?Go(e,ot(t),l,o,t):(t==="true-value"?e._trueValue=l:t==="false-value"&&(e._falseValue=l),Jo(e,t,l,a))};function Wr(e,t,s,l){if(l)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zo(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 i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Zo(t)&&Ie(s)?!1:t in e}const Qr=["ctrl","shift","alt","meta"],Jr={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)=>Qr.some(s=>e[`${s}Key`]&&!t.includes(s))},at=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),l=t.join(".");return s[l]||(s[l]=((i,...o)=>{for(let a=0;a<t.length;a++){const r=Jr[t[a]];if(r&&r(i,t))return}return e(i,...o)}))},Gr={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rs=(e,t)=>{const s=e._withKeys||(e._withKeys={}),l=t.join(".");return s[l]||(s[l]=(i=>{if(!("key"in i))return;const o=At(i.key);if(t.some(a=>a===o||Gr[a]===o))return e(i)}))},Yr=Ue({patchProp:zr},Rr);let ei;function Xr(){return ei||(ei=tr(Yr))}const Zr=((...e)=>{const t=Xr().createApp(...e),{mount:s}=t;return t.mount=l=>{const i=tu(l);if(!i)return;const o=t._component;!ve(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=s(i,!1,eu(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t});function eu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function tu(e){return Ie(e)?document.querySelector(e):e}function su(e,t){const s=e||(typeof window<"u"?window.location.origin:"");if(!t)return{baseUrl:s};const l={headers:{Authorization:`Bearer ${t}`}};return{baseUrl:s,beforeSubscribe(i){return l},beforeUnsubscribe(i){return l}}}async function nu(){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 lu(e){let t=null,s=null,l=!1;return{subscribe:async()=>{try{const a=await nu();if(!a)throw new Error("Transmit client not available (neither window.Transmit nor @adonisjs/transmit-client)");if(l)return;t=new a(su(e.baseUrl,e.authToken)),s=t.subscription(e.channelName),s.onMessage(r=>{l||e.onMessage(r)}),await s.create()}catch(a){e.onError?.(a)}},unsubscribe:async()=>{l=!0;try{await s?.delete(),s=null,t=null}catch{}}}}function ou(e){let t=!1;const s=lu({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 ln extends Error{status;constructor(t=403){super(`Unauthorized (HTTP ${t})`),this.name="UnauthorizedError",this.status=t}}class iu extends Error{status;body;constructor(t,s){super(`API error (HTTP ${t})`),this.name="ApiError",this.status=t,this.body=s}}class ll{baseUrl;authToken;constructor(t){this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.authToken=t.authToken}async fetch(t,s){const i={...{Accept:"application/json",...this.authToken?{Authorization:`Bearer ${this.authToken}`}:{}},...s?.headers},o=await globalThis.fetch(`${this.baseUrl}${t}`,{...s,headers:i,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 ln(o.status);if(!o.ok){const a=await o.text().catch(()=>"");throw new iu(o.status,a)}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 on="ss-dash-theme",ol="ss-theme-change";function Ms(){if(typeof window>"u")return"light";const e=localStorage.getItem(on);return e==="dark"||e==="light"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function au(e){typeof window>"u"||(localStorage.setItem(on,e),window.dispatchEvent(new CustomEvent(ol,{detail:e})))}function ru(){const t=Ms()==="dark"?"light":"dark";return au(t),t}function ti(e){if(typeof window>"u")return()=>{};const t=o=>{const a=o.detail;(a==="dark"||a==="light")&&e(a)},s=o=>{if(o.key===on){const a=o.newValue;e(a==="dark"||a==="light"?a:Ms())}},l=window.matchMedia("(prefers-color-scheme: dark)"),i=o=>{localStorage.getItem(on)||e(o.matches?"dark":"light")};return window.addEventListener(ol,t),window.addEventListener("storage",s),l.addEventListener("change",i),()=>{window.removeEventListener(ol,t),window.removeEventListener("storage",s),l.removeEventListener("change",i)}}const uu={color:"#34d399",fillOpacityTop:.25,fillOpacityBottom:.02,strokeWidth:1.5,width:120,height:32,padding:2};function cu(e){return{...uu,...e}}let du=0;function fu(){return`ss-grad-${du++}`}function hu(e){if(e.length===0)return null;let t=e[0],s=e[0],l=e[0];for(let i=1;i<e.length;i++){const o=e[i];o<t&&(t=o),o>s&&(s=o),l+=o}return{min:t,max:s,avg:l/e.length}}function pu(e,t){if(e.length<2)return null;const s=cu(t),l=hu(e),i=l.max-l.min||1,o=s.width-s.padding*2,a=s.height-s.padding*2,r=s.padding,c=e.length,g=Array.from({length:c});for(let _=0;_<c;_++){const C=r+_/(c-1)*o,A=r+a-(e[_]-l.min)/i*a;g[_]=`${C.toFixed(1)},${A.toFixed(1)}`}const p=g.join(" "),b=(r+o).toFixed(1),v=(r+a).toFixed(1),w=r.toFixed(1),$=`M${g[0]} `+g.slice(1).map(_=>`L${_}`).join(" ")+` L${b},${v} L${w},${v} Z`;return{points:p,areaPath:$,gradientId:fu(),options:s,stats:l}}const vu=5e3,si=1e4,ni=100,gu=500;function yu(e){return'"'+(e.length>40?e.slice(0,40)+"...":e)+'"'}function mu(e,t,s){if(e.length===0)return"[]";const l=e.slice(0,3).map(a=>s(a,30)),i=e.length>3?", ..."+e.length+" items":"",o="["+l.join(", ")+i+"]";return o.length>t?"["+e.length+" items]":o}function bu(e,t,s){const l=Object.keys(e);if(l.length===0)return"{}";const i=[];for(let c=0;c<Math.min(l.length,4);c++)i.push(l[c]+": "+s(e[l[c]],30));const o=l.length>4?", ...+"+(l.length-4):"",a="{ "+i.join(", ")+o+" }";return a.length<=t?a:"{ "+(l.slice(0,6).join(", ")+(l.length>6?", ...":""))+" }"}function _u(e){if(!e&&e!==0)return"-";const t=Math.floor(e),s=Math.floor(t/86400),l=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return s>0?`${s}d ${l}h`:l>0?`${l}h ${i}m`:i>0?`${i}m ${t%60}s`:`${t}s`}function Nt(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:e>=1?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`}function li(e){return/([+-]\d{2}:?\d{2}|Z)\s*$/.test(e)?e:e+"Z"}function jt(e){if(!e)return"-";const t=typeof e=="string"?new Date(li(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 kt(e){if(!e)return"-";const t=typeof e=="string"?new Date(li(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 xu(e){return e>gu?"very-slow":e>ni?"slow":"normal"}function il(e,t="ss-dash"){const s=xu(e);return s==="very-slow"?`${t}-very-slow`:s==="slow"?`${t}-slow`:""}function an(e,t=100){return e===null?"null":e===void 0?"-":typeof e=="string"?yu(e):typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?mu(e,t,an):typeof e=="object"?bu(e,t,an):String(e)}function wu(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 ku(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}const $u=[{key:"page",param:"page",isNumeric:!0},{key:"perPage",param:"perPage",isNumeric:!0},{key:"search",param:"search"},{key:"sort",param:"sort"},{key:"sortDir",param:"direction"},{key:"timeRange",param:"range"}];function Su(e){const t=new URLSearchParams,s=e;for(const{key:l,param:i,isNumeric:o}of $u){const a=s[l];(o?a!=null:a)&&t.set(i,String(a))}if(e.filters)for(const[l,i]of Object.entries(e.filters))i&&t.set(l,i);return t.toString()}function Cu(e,t,s=2){if(t<=1)return[1];const l=[],i=Math.max(2,e-s),o=Math.min(t-1,e+s);l.push(1),i>2&&l.push("...");for(let a=i;a<=o;a++)l.push(a);return o<t-1&&l.push("..."),t>1&&l.push(t),l}const Tu=["tracing","process","system","http","db","redis","queues","cache","app","log","emails","dashboard"],oi="/admin/api/debug",ii={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 Eu(e){const t={customPanes:e.customPanes??[]},s=e.features;for(const l of Tu)t[l]=s?.[l]??!1;return t}async function Pu(e,t=oi){const s=`${t.replace(/\/+$/,"")}/config`;return e.fetch(s)}async function Ru(e){const{baseUrl:t="",debugEndpoint:s=oi,authToken:l}=e,i=new ll({baseUrl:t,authToken:l});try{const o=await Pu(i,s);return Eu(o)}catch{return ii}}const Mu={overview:"/overview",requests:"/requests",queries:"/queries",events:"/events",routes:"/routes",logs:"/logs",emails:"/emails",timeline:"/traces",cache:"/cache",jobs:"/jobs",config:"/config"};function Au(e){return Mu[e]||`/${e}`}class ai{constructor(t,s){this.client=t,this.basePath=s}async fetchSection(t,s,l){const i=Au(t),o=s?`${this.basePath}${i}?${s}`:`${this.basePath}${i}`;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`)}}function Lu(e){if(!e||typeof e!="object")return!1;const t=e;return t.data!==void 0&&t.meta!==void 0}function Ou(e,t){return t.aborted?!0:e instanceof DOMException&&e.name==="AbortError"}class Du{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 ll({baseUrl:t.baseUrl,authToken:t.authToken}),this.api=new ai(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(this.shouldSkipFetch(t))return;const{controller:s,myFetchId:l}=this.prepareFetch(t);try{const i=await this.executeFetch(s);if(this.isStaleResponse(l))return;this.applyFetchResult(i)}catch(i){if(this.shouldIgnoreError(i,s.signal,l))return;this.handleFetchError(i,t)}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 i=`${this.endpoint}/${t}`;try{const o=s==="post"?await this.client.post(i,l):await this.client.delete(i);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}shouldSkipFetch(t){return t&&this.explicitFetchPending?!0:!this.section}prepareFetch(t){this.abortController?.abort();const s=new AbortController;this.abortController=s;const l=++this.fetchId;return t||(this.callbacks.onLoading(!0),this.explicitFetchPending=!0),{controller:s,myFetchId:l}}async executeFetch(t){const s=this.buildCurrentQueryString();return this.api.fetchSection(this.section,s||void 0,{signal:t.signal})}isStaleResponse(t){return t!==this.fetchId||this.stopped}shouldIgnoreError(t,s,l){return Ou(t,s)?!0:this.isStaleResponse(l)}buildCurrentQueryString(){const t=this.sort?this.sort.replace(/[A-Z]/g,l=>"_"+l.toLowerCase()):void 0,s=this.filters;return Su({page:this.page,perPage:this.perPage,search:this.search,sort:t,sortDir:this.sort?this.sortDir:void 0,filters:s&&Object.keys(s).length>0?s:void 0,timeRange:this.section.startsWith("overview")?this.timeRange:void 0})}applyFetchResult(t){Lu(t)?(this.callbacks.onData(t.data),this.callbacks.onPagination(t.meta)):(this.callbacks.onData(t),this.callbacks.onPagination(null)),this.callbacks.onError(null),this.callbacks.onLoading(!1),this.hasFetched=!0}handleFetchError(t,s){if(t instanceof ln){this.callbacks.onError(t),this.callbacks.onLoading(!1),this.stopRefreshTimer(),this.callbacks.onUnauthorized();return}s||(this.callbacks.onError(t instanceof Error?t:new Error(String(t))),this.callbacks.onLoading(!1))}startRefreshTimer(){this.stopRefreshTimer();const t=this.section==="overview"?vu:si;this.timer=setInterval(()=>this.fetch(!0),t)}stopRefreshTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}}const Fe={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"/>']}},Fu="ss-col-resize",ri="ss-resizing";function Iu(e){const t=Array.from(e.querySelectorAll("thead th"));if(t.length===0)return()=>{};const s=[];let l=!1;function i(){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 a=function(c){c.preventDefault(),c.stopPropagation(),i();const g=c.clientX,p=o.offsetWidth;r.classList.add(ri),r.setPointerCapture(c.pointerId);function b(w){const $=w.clientX-g,_=Math.max(30,p+$);o.style.width=_+"px"}function v(){r.classList.remove(ri),r.removeEventListener("pointermove",b),r.removeEventListener("pointerup",v)}r.addEventListener("pointermove",b),r.addEventListener("pointerup",v)};if(!o.textContent?.trim())continue;const r=document.createElement("div");r.className=Fu,o.appendChild(r),r.addEventListener("pointerdown",a),s.push(()=>{r.removeEventListener("pointerdown",a),r.remove()})}return()=>{for(const o of s)o()}}function Bu(e){const{container:t,handle:s,topPane:l,bottomPane:i,storageKey:o,minHeight:a=60}=e;if(o){const c=localStorage.getItem(o);if(c){const g=parseFloat(c);g>0&&g<1&&(l.style.flex=`${g}`,i.style.flex=`${1-g}`)}}function r(c){c.preventDefault(),s.setPointerCapture(c.pointerId);const p=t.getBoundingClientRect().height,b=c.clientY,v=l.getBoundingClientRect().height;function w(_){const C=_.clientY-b;let A=v+C;const P=p-a-s.offsetHeight;A=Math.max(a,Math.min(A,P));const y=A/(p-s.offsetHeight);l.style.flex=`${y}`,i.style.flex=`${1-y}`}function $(){if(s.removeEventListener("pointermove",w),s.removeEventListener("pointerup",$),o){const _=t.getBoundingClientRect().height-s.offsetHeight;if(_>0){const C=l.getBoundingClientRect().height/_;localStorage.setItem(o,String(C))}}}s.addEventListener("pointermove",w),s.addEventListener("pointerup",$)}return s.addEventListener("pointerdown",r),()=>{s.removeEventListener("pointerdown",r)}}function Nu(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return null}return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:null}function ui(e){const t={};for(const[s,l]of Object.entries(e))Hu.has(s)||(t[s]=l);return Object.keys(t).length>0?t:null}const ju=["all","error","warn","info","debug"];function rn(e){return(e.levelName||e.level_name||(typeof e.level=="string"?e.level:"")||"info").toLowerCase()}function ci(e){return e.msg||e.message||JSON.stringify(e)}function Ht(e){return e.createdAt||e.created_at||e.time||e.timestamp||0}function Ut(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 di(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 Hu=new Set(["level","time","pid","hostname","msg","message","v","name","levelName","level_name","timestamp","createdAt","created_at","requestId","request_id","x-request-id","id","data"]);function $t(e){if(e.data){const t=Nu(e.data);if(t){const s=ui(t);if(s)return s}}return ui(e)}function ze(e,...t){for(const s of t){const l=e[s];if(l!=null)return l}}function Uu(e){return ze(e,"createdAt","created_at","timestamp")}function qu(e){return ze(e,"method","sql_method")??""}function fi(e){return ze(e,"sqlNormalized","normalizedSql","sql_normalized","sql")??""}function Ku(e,t){let s=0,l=0;for(const c of e){const g=ze(c,"duration")??0;l+=g,g>ni&&s++}const i=hi(e);let o=0;for(const c of i.values())c>1&&(o+=c);const a=e.length>0?l/e.length:0,r=t?.total??e.length;return{slowCount:s,dupCount:o,avgDuration:a,totalCount:r}}function Vu(e){return{id:ze(e,"id")??0,sql:ze(e,"sql","sql_text")??"",sqlNormalized:fi(e),duration:ze(e,"duration")??0,method:qu(e),model:ze(e,"model")??"",connection:ze(e,"connection")??"",timestamp:Uu(e)??0,inTransaction:ze(e,"inTransaction","in_transaction")??!1}}function hi(e){const t=new Map;for(const s of e){const i=fi(s);t.set(i,(t.get(i)||0)+1)}return t}function zu(e){const t=[];if(e["Startup Cost"]!==null&&e["Startup Cost"]!==void 0&&t.push(`cost=${e["Startup Cost"]}..${e["Total Cost"]}`),e["Plan Rows"]!==null&&e["Plan Rows"]!==void 0&&t.push(`rows=${e["Plan Rows"]}`),e["Plan Width"]!==null&&e["Plan Width"]!==void 0&&t.push(`width=${e["Plan Width"]}`),e.Filter&&t.push(`filter: ${e.Filter}`),e["Index Cond"]&&t.push(`cond: ${e["Index Cond"]}`),e["Hash Cond"]&&t.push(`hash: ${e["Hash Cond"]}`),e["Join Type"]&&t.push(`join: ${e["Join Type"]}`),e["Sort Key"]){const s=Array.isArray(e["Sort Key"])?e["Sort Key"].join(", "):e["Sort Key"];t.push(`sort: ${s}`)}return t}function pi(e,t=0){if(!e)return[];const l=[{depth:t,nodeType:e["Node Type"]||"Unknown",relationName:e["Relation Name"]||"",alias:e.Alias&&e.Alias!==e["Relation Name"]?e.Alias:"",indexName:e["Index Name"]||"",metrics:zu(e),isRoot:t===0}],i=e.Plans||[];for(const o of i)l.push(...pi(o,t+1));return l}function Wu(e){return!e||typeof e!="object"?!1:"Plan"in e}function Qu(e){if(!e||e.length===0)return[];const t=e[0];return!t||typeof t!="object"?[]:Object.keys(t)}function Ju(e){return e==null?"-":String(e)}function Gu(e){const t=[{key:"id",label:"#",width:"40px",type:"index"},{key:"sql",label:"SQL",type:"sql"},{key:"duration",label:"Duration",width:"70px",sortable:!0,type:"duration"},{key:"method",label:"Method",width:"60px",type:"method"},{key:"model",label:"Model",width:"90px",type:"model"},{key:"connection",label:"Connection",width:"80px",type:"connection"},{key:"createdAt",label:"Time",width:"90px",sortable:!0,type:"time"}];return t.push({key:"id",label:"",width:"70px",type:"explain"}),t}function Yu(){return[{key:"sqlNormalized",label:"Pattern",type:"sql"},{key:"count",label:"Count",width:"60px",sortable:!0},{key:"avgDuration",label:"Avg",width:"70px",sortable:!0,type:"duration"},{key:"minDuration",label:"Min",width:"70px",type:"duration"},{key:"maxDuration",label:"Max",width:"70px",type:"duration"},{key:"totalDuration",label:"Total",width:"70px",sortable:!0,type:"duration"},{key:"percentOfTotal",label:"% Time",width:"60px"}]}class Xu{state;constructor(t="list"){this.state={viewMode:t,sort:{key:t==="list"?"createdAt":"count",dir:"desc"},expandedIds:new Set,explainData:new Map,search:""}}setViewMode(t){return this.state.viewMode=t,this.state.sort={key:t==="list"?"createdAt":"count",dir:"desc"},this.state.expandedIds=new Set,this.state.explainData=new Map,this.state}toggleSort(t){return this.state.sort.key===t?this.state.sort={key:t,dir:this.state.sort.dir==="asc"?"desc":"asc"}:this.state.sort={key:t,dir:"desc"},this.state}toggleExpand(t){return this.state.expandedIds.has(t)?this.state.expandedIds.delete(t):this.state.expandedIds.add(t),this.state}isExpanded(t){return this.state.expandedIds.has(t)}setSearch(t){return this.state.search=t,this.state}startExplain(t){this.state.explainData.set(t,{loading:!0})}completeExplain(t,s){this.state.explainData.set(t,{loading:!1,result:s})}failExplain(t,s){this.state.explainData.set(t,{loading:!1,error:s})}clearExplain(){this.state.explainData=new Map}getExplainState(t){return this.state.explainData.get(t)}}const Zu=["all","active","waiting","delayed","completed","failed"];function ec(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 tc(e){if(!e)return[];if(Array.isArray(e))return e;const t=e;return t.jobs||t.data||[]}function sc(e){if(!e||Array.isArray(e))return null;const t=e;return t.stats||t.overview||null}function nc(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function lc(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function al(e,t,s,l=0){return e[t]??e[s]??l}function oc(e){return{method:e.method||"",url:e.url||"",statusCode:al(e,"status_code","statusCode"),totalDuration:al(e,"total_duration","totalDuration")||e.duration||0,spanCount:al(e,"span_count","spanCount"),spans:nc(e.spans),warnings:lc(e.warnings),logs:e.logs||[],httpRequestId:e.httpRequestId||e.http_request_id||void 0}}const ic=["password","secret","token","key","credential","auth"];function ac(e){const t=e.toLowerCase();return ic.some(s=>t.includes(s))}function rc(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 uc={collectionInterval:"Stats Collection",dashboardBroadcast:"Dashboard Broadcast",debugBroadcast:"Debug Broadcast",persistFlush:"Persist Flush",retentionCleanup:"Retention Cleanup"};function cc(e){return uc[e]||e}const dc={prometheus:"Prometheus",pinoHook:"Pino Log Hook",edgePlugin:"Edge Plugin",cacheInspector:"Cache Inspector",queueInspector:"Queue Inspector"};function fc(e){return dc[e]||e}function hc(e){return"active"in e?e.active?"active":"inactive":"available"in e?e.available?"available":"unavailable":"unknown"}function pc(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 vc(e){return Object.entries(e).map(([t,s])=>({key:t,value:rc(s),secret:ac(t)}))}function gc(e,t){return t?Math.min(100,Math.round(e/t*100)):0}const yc=["healthy","active","connected","available","ready"],mc=["errored","unavailable"];function bc(e){return yc.includes(e)?"ok":mc.includes(e)?"err":""}function je(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.__redacted===!0}function un(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)&&!je(e)}function cn(e,t=""){if(!un(e))return[{path:t,value:e}];const s=[];for(const l of Object.keys(e)){const i=t?`${t}.${l}`:l,o=e[l];un(o)?s.push(...cn(o,i)):s.push({path:i,value:o})}return s}function _c(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 vi(e){if(e==null||typeof e!="object"||Array.isArray(e)||je(e))return 1;let t=0;for(const s of Object.keys(e))t+=vi(e[s]);return t}function xc(e){if(!un(e))return[];const t=[];for(const s of Object.keys(e))un(e[s])&&t.push(s);return t}function wc(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 kc(e={}){const{baseUrl:t="",debugEndpoint:s="/admin/api/debug",authToken:l}=e,i=W({...ii}),o=W(!0);return It(async()=>{i.value=await Ru({baseUrl:t,debugEndpoint:s,authToken:l}),o.value=!1}),{features:i,loading:o}}function gi(){const e=W(Ms());let t=null;function s(i){e.value=i}function l(){const i=ru();return e.value=i,i}return It(()=>{e.value=Ms(),t=ti(s)}),Pt(()=>{t?.()}),{theme:e,toggleTheme:l}}function $c(e){let t=null;return{onData:s=>{t=s},onPagination:s=>{s?(e.pagination.total=s.total,e.pagination.totalPages=s.lastPage??(Math.ceil(s.total/e.pagination.perPage)||1),e.data.value={data:t,meta:s}):e.data.value=t},onLoading:s=>{e.loading.value=s},onError:s=>{e.error.value=s},onUnauthorized:()=>{e.isUnauthorized.value=!0}}}function Sc(e){const t={};for(const[s,l]of Object.entries(e))s!=="search"&&l!==""&&l!==void 0&&l!==null&&(t[s]=String(l));return t}async function rl(e){try{return await e()}catch{return null}}function Cc(e){return{fetchGroupedQueries:()=>rl(()=>e.fetchGroupedQueries()),explainQuery:t=>rl(()=>e.explainQuery(t)),fetchEmailPreview:async t=>(await rl(()=>e.fetchEmailPreview(t)))?.html||null}}function Tc(e){return{retryJob:async t=>{try{return await e.retryJob(t),!0}catch{return!1}},deleteCacheKey:async t=>{try{return await e.deleteCacheKey(t),!0}catch{return!1}}}}function Ec(e,t){return{fetchChart:async s=>{try{return await e.fetchChart(s)}catch(l){return l instanceof ln&&(t.value=!0),null}}}}function As(e,t,s){const l=t(),i=Sc(s.filter);e.configure({page:s.pagination.page,perPage:s.pagination.perPage,search:s.filter.search||void 0,sort:s.sort.column||void 0,sortDir:s.sort.column?s.sort.direction:void 0,filters:Object.keys(i).length>0?i:void 0,timeRange:l.startsWith("overview")?s.timeRange.value:void 0})}function Pc(e,t){return{goToPage(s){e.pagination.page=s,t()},setSearch(s){e.filter.search=s,e.pagination.page=1,t()},setFilter(s,l){e.filter[s]=l,e.pagination.page=1,t()},setSort(s,l){e.sort.column===s&&!l?e.sort.direction=e.sort.direction==="asc"?"desc":"asc":(e.sort.column=s,e.sort.direction=l||"desc"),t()},setTimeRange(s){e.timeRange.value=s,t()}}}function Rc(e,t,s){return{async mutate(l,i="post",o){return e.mutate(l,i,o)},refresh(){As(e,t,s),e.fetch(!0)},startRefresh(){e.start()},stopRefresh(){e.stop()}}}function Mc(e,t,s,l){ht(t,()=>{s.pagination.page=1;for(const i of Object.keys(s.filter))i==="search"?s.filter.search="":delete s.filter[i];s.sort.column="",s.data.value=null,e.setSection(t()),As(e,t,s)}),l&&ht(l,()=>{As(e,t,s),e.handleRefreshSignal()})}function Ac(e){return{data:W(null),loading:W(!1),error:W(null),isUnauthorized:W(!1),timeRange:W("1h"),pagination:Zt({page:1,perPage:e,total:0,totalPages:1}),filter:Zt({search:""}),sort:Zt({column:"",direction:"desc"})}}function Lc(e,t,s,l){return{data:e.data,loading:e.loading,error:e.error,isUnauthorized:e.isUnauthorized,pagination:e.pagination,filter:e.filter,sort:e.sort,timeRange:e.timeRange,...t,...s,...l}}function rt(e,t={}){const{baseUrl:s="",dashboardEndpoint:l="/__stats/api",authToken:i,perPage:o=50,refreshKey:a}=t,r=Ac(o),c=new Du({baseUrl:s,endpoint:l,authToken:i,section:e(),perPage:o,callbacks:$c(r)}),g=c.getApi(),b=Pc(r,()=>{As(c,e,r),c.fetch(!1)}),v=Rc(c,e,r),w={...Ec(g,r.isUnauthorized),...Cc(g),...Tc(g)};return Mc(c,e,r,a),It(()=>{As(c,e,r),c.start()}),Pt(()=>{c.stop()}),Lc(r,b,v,w)}const Oc=["title","aria-label"],Dc=["viewBox","innerHTML"],Fc=["viewBox","innerHTML"],Ic=Ne({__name:"ThemeToggle",props:{classPrefix:{default:"ss-dbg"}},setup(e){const t=e,{theme:s,toggleTheme:l}=gi(),i=H(()=>s.value==="dark"),o=H(()=>i.value?"Switch to light theme":"Switch to dark theme"),a=H(()=>t.classPrefix==="ss-dbg"?"ss-dbg-theme-toggle":"ss-dash-theme-btn");return(r,c)=>(u(),d("button",{type:"button",class:R(a.value),title:o.value,"aria-label":o.value,onClick:c[0]||(c[0]=(...g)=>x(l)&&x(l)(...g))},[i.value?(u(),d("svg",{key:0,width:"16",height:"16",viewBox:x(Fe).sun.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe).sun.elements.join("")},null,8,Dc)):(u(),d("svg",{key:1,width:"16",height:"16",viewBox:x(Fe).moon.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe).moon.elements.join("")},null,8,Fc))],10,Oc))}}),Bc=["data-theme"],Nc={class:"ss-dash-header"},jc={class:"ss-dash-header-center"},Hc={class:"ss-dash-header-right"},Uc=["href"],qc={class:"ss-dash-body"},Kc={class:"ss-dash-nav"},Vc=["data-ss-section","onClick","title"],zc={class:"ss-dash-nav-icon"},Wc=["viewBox","innerHTML"],Qc={class:"ss-dash-nav-label"},Jc={key:0,class:"ss-dash-nav-sep"},Gc=["onClick","title"],Yc={class:"ss-dash-nav-icon"},Xc=["viewBox","innerHTML"],Zc={class:"ss-dash-nav-label"},ed=["title"],td=["viewBox","innerHTML"],sd=["viewBox","innerHTML"],nd={class:"ss-dash-main"},ld=["id"],od={class:"ss-dash-pane-inner"},id={key:1,class:"ss-dash-empty"},ad=Ne({__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=pt(()=>Promise.resolve().then(()=>vh)),s=pt(()=>Promise.resolve().then(()=>vp)),l=pt(()=>Promise.resolve().then(()=>Zp)),i=pt(()=>Promise.resolve().then(()=>iv)),o=pt(()=>Promise.resolve().then(()=>vv)),a=pt(()=>Promise.resolve().then(()=>Bv)),r=pt(()=>Promise.resolve().then(()=>tg)),c=pt(()=>Promise.resolve().then(()=>wg)),g=pt(()=>Promise.resolve().then(()=>zg)),p=pt(()=>Promise.resolve().then(()=>x1)),b=pt(()=>Promise.resolve().then(()=>ny)),v=["overview","requests","queries","events","routes","logs","emails","cache","jobs","config","internals"],w=e,{theme:$}=gi(),{features:_}=kc({baseUrl:w.baseUrl,debugEndpoint:w.debugEndpoint,authToken:w.authToken}),C=W("overview"),A=W(!1),P=W(!1),y=W(0);is("ss-refresh-key",y),is("ss-base-url",w.baseUrl),is("ss-dashboard-endpoint",w.dashboardEndpoint),is("ss-debug-endpoint",w.debugEndpoint),is("ss-auth-token",w.authToken),typeof window<"u"&&(A.value=localStorage.getItem("ss-dash-sidebar")==="collapsed");let k=null;function S(){if(k&&(k(),k=null),!w.channelName)return;k=ou({baseUrl:w.baseUrl,channelName:w.channelName,authToken:w.authToken,onMessage:()=>{y.value+=1},onConnect:()=>{P.value=!0},onDisconnect:()=>{P.value=!1},onError:()=>{P.value=!1}}).unsubscribe}It(()=>{S()}),Pt(()=>{k&&(k(),k=null)});const Q=H(()=>_.value.customPanes||[]);function te(j){const _e=j.replace("#","").split("?")[0];return _e&&[...v,...Q.value.map(ie=>ie.id)].includes(_e)?_e:"overview"}function se(){const j=te(window.location.hash);j!==C.value&&(C.value=j)}It(()=>{if(typeof window>"u")return;const j=te(window.location.hash);(j!=="overview"||window.location.hash)&&(C.value=j),window.addEventListener("hashchange",se)}),Pt(()=>{window.removeEventListener("hashchange",se)}),ht(C,j=>{typeof window<"u"&&(window.location.hash=j)});function Y(){A.value=!A.value,localStorage.setItem("ss-dash-sidebar",A.value?"collapsed":"expanded")}function be(j){j!==C.value&&(C.value=j)}const Re=H(()=>[{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:"cache",label:"Cache",visible:_.value.cache},{id:"jobs",label:"Jobs",visible:_.value.queues},{id:"config",label:"Config",visible:!0},{id:"internals",label:"Internals",visible:!0}]),ke=H(()=>Re.value.filter(j=>j.visible)),{data:Me}=rt(()=>"overview",{baseUrl:w.baseUrl,dashboardEndpoint:w.dashboardEndpoint,authToken:w.authToken,refreshKey:y}),Ce=H(()=>Me.value),we=H(()=>{const j={};if(!Ce.value)return j;if(Ce.value.totalRequests>0&&(j.requests={count:Ce.value.totalRequests}),Ce.value.queryStats?.total>0&&(j.queries={count:Ce.value.queryStats.total}),Ce.value.logLevelBreakdown){const _e=Ce.value.logLevelBreakdown,xe=_e.error+_e.warn+_e.info+_e.debug;xe>0&&(j.logs={count:xe})}return j}),z={overview:t,requests:s,queries:l,events:i,routes:o,logs:a,emails:r,cache:c,jobs:g,config:p,internals:b},B=H(()=>z[C.value]||null);return(j,_e)=>(u(),d("div",{class:"ss-dash","data-theme":x($),id:"ss-dash"},[n("div",Nc,[_e[0]||(_e[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",jc,[n("span",{class:R(["ss-dash-live-dot",{"ss-dash-connected":P.value}]),id:"ss-dash-live-dot"},null,2),n("span",{class:R(["ss-dash-live-label",{"ss-dash-connected":P.value}]),id:"ss-dash-live-label"},h(P.value?"Live":"Polling"),3)]),n("div",Hc,[Se(Ic,{"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,Uc)):G("",!0)])]),n("div",qc,[n("div",{class:R(["ss-dash-sidebar",{"ss-dash-collapsed":A.value}]),id:"ss-dash-sidebar"},[n("nav",Kc,[(u(!0),d(N,null,ye(ke.value,xe=>(u(),d("button",{key:xe.id,type:"button",class:R(["ss-dash-nav-item",{"ss-dash-active":C.value===xe.id}]),"data-ss-section":xe.id,onClick:ie=>be(xe.id),title:A.value?xe.label:void 0},[n("span",zc,[(u(),d("svg",{width:"20",height:"20",viewBox:(x(Fe)[xe.id]||x(Fe).config).viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:(x(Fe)[xe.id]||x(Fe).config).elements.join("")},null,8,Wc))]),n("span",Qc,h(xe.label),1),we.value[xe.id]&&we.value[xe.id].count>0?(u(),d("span",{key:0,class:R(["ss-dash-nav-badge",we.value[xe.id].variant||""])},h(we.value[xe.id].count),3)):G("",!0)],10,Vc))),128)),Q.value.length>0?(u(),d("div",Jc)):G("",!0),(u(!0),d(N,null,ye(Q.value,xe=>(u(),d("button",{key:xe.id,type:"button",class:R(["ss-dash-nav-item",{"ss-dash-active":C.value===xe.id}]),onClick:ie=>be(xe.id),title:A.value?xe.label:void 0},[n("span",Yc,[(u(),d("svg",{width:"20",height:"20",viewBox:x(Fe)["custom-pane"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe)["custom-pane"].elements.join("")},null,8,Xc))]),n("span",Zc,h(xe.label),1)],10,Gc))),128))]),n("button",{type:"button",class:"ss-dash-sidebar-toggle",id:"ss-dash-sidebar-toggle",onClick:Y,title:A.value?"Expand sidebar":"Collapse sidebar"},[A.value?(u(),d("svg",{key:0,width:"16",height:"16",viewBox:x(Fe)["chevron-right"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:x(Fe)["chevron-right"].elements.join("")},null,8,td)):(u(),d("svg",{key:1,width:"16",height:"16",viewBox:x(Fe)["chevron-left"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:x(Fe)["chevron-left"].elements.join("")},null,8,sd))],8,ed)],2),n("div",nd,[n("div",{class:"ss-dash-pane ss-dash-active",id:`ss-dash-pane-${C.value}`},[n("div",od,[(u(),st(or,null,{fallback:os(()=>[..._e[1]||(_e[1]=[n("div",{class:"ss-dash-empty"},"Loading...",-1)])]),default:os(()=>[B.value?(u(),st(Ma(B.value),{key:0})):(u(),d("div",id,"Unknown section"))]),_:1}))])],8,ld)])])],8,Bc))}});function rd(e){const t=document.getElementById(e);return t?JSON.parse(t.textContent||"{}"):{}}function ud(){function e(t){document.documentElement.setAttribute("data-theme",t)}e(Ms()),ti(e)}const hs=rd("ss-dash-config");ud();const yi=document.getElementById("ss-dash");yi&&Zr(ad,{baseUrl:hs.baseUrl,dashboardEndpoint:hs.dashboardEndpoint,debugEndpoint:hs.debugEndpoint,authToken:hs.authToken,backUrl:hs.backUrl,channelName:hs.channelName}).mount(yi);const cd=["width","height","viewBox"],dd=["id"],fd=["stop-color"],hd=["stop-color"],pd=["d","fill"],vd=["d","stroke"],gd=["x","y"],dn=Ne({__name:"Sparkline",props:{data:{},color:{default:"#34d399"},width:{default:120},height:{default:32}},setup(e){const t=e,s=H(()=>pu(t.data,{width:t.width,height:t.height,color:t.color})),l=H(()=>s.value!==null),i=H(()=>`sg-${t.color.replace("#","")}`);return(o,a)=>(u(),d("div",{class:"ss-dash-sparkline",style:qe({"--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(N,{key:0},[n("defs",null,[n("linearGradient",{id:i.value,x1:"0",y1:"0",x2:"0",y2:"1"},[n("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.25"},null,8,fd),n("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0.02"},null,8,hd)],8,dd)]),n("path",{d:s.value.areaPath,fill:`url(#${i.value})`},null,8,pd),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,vd)],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,gd))],8,cd))],4))}}),yd={class:"ss-dash-btn-group"},md=["onClick"],bd=Ne({__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(i,o)=>(u(),d("div",yd,[(u(),d(N,null,ye(l,a=>n("button",{key:a.value,type:"button",class:R(`ss-dash-btn ${e.modelValue===a.value?"ss-dash-active":""}`),onClick:r=>s("update:modelValue",a.value)},h(a.label),11,md)),64))]))}}),_d={class:"ss-dash-overview"},xd={key:0,class:"ss-dash-empty"},wd={class:"ss-dash-cards"},kd={class:"ss-dash-card"},$d={class:"ss-dash-sparkline"},Sd={class:"ss-dash-card"},Cd={class:"ss-dash-sparkline"},Td={class:"ss-dash-card"},Ed={class:"ss-dash-sparkline"},Pd={class:"ss-dash-card"},Rd={class:"ss-dash-sparkline"},Md={class:"ss-dash-chart-container"},Ad={class:"ss-dash-chart-header"},Ld={class:"ss-dash-chart",id:"ss-dash-chart-area"},Od={key:0,class:"ss-dash-empty",style:{"min-height":"120px"}},Dd=["viewBox"],Fd=["id"],Id=["id"],Bd=["x1","y1","x2","y2"],Nd=["x","y"],jd=["d","fill"],Hd=["d"],Ud=["d","fill"],qd=["d"],Kd=["x","y","width","height","data-idx","onMouseenter"],Vd=["cx","cy","r","data-idx","opacity"],zd=["cx","cy","r","data-idx","opacity"],Wd=["x","y"],Qd={key:0,style:{color:"var(--ss-red-fg)"}},Jd={class:"ss-dash-chart-legend",id:"ss-dash-chart-legend"},Gd={key:0,class:"ss-dash-chart-legend-item"},Yd={class:"ss-dash-secondary-cards"},Xd={class:"ss-dash-secondary-card"},Zd={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},ef={key:1,class:"ss-dash-secondary-list"},tf=["href"],sf=["title"],nf={class:"ss-dash-secondary-card"},lf={class:"ss-dash-secondary-list"},of={class:"ss-dash-secondary-list-value"},af={class:"ss-dash-secondary-list-value"},rf={class:"ss-dash-secondary-list-value"},uf={class:"ss-dash-secondary-card"},cf={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},df={key:1,class:"ss-dash-secondary-list"},ff=["href"],hf=["title"],pf=["title"],vf={class:"ss-dash-secondary-card"},gf={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},yf={key:1,class:"ss-dash-secondary-list"},mf=["href"],bf={class:"ss-dash-secondary-list-value"},_f={class:"ss-dash-secondary-card"},xf={class:"ss-dash-secondary-list"},wf={href:"#emails?status=sent",class:"ss-dash-widget-row-link"},kf={class:"ss-dash-secondary-list-value"},$f={href:"#emails?status=queued",class:"ss-dash-widget-row-link"},Sf={class:"ss-dash-secondary-list-value"},Cf={href:"#emails?status=failed",class:"ss-dash-widget-row-link"},Tf={class:"ss-dash-secondary-card"},Ef={class:"ss-dash-secondary-list"},Pf={href:"#logs?level=error",class:"ss-dash-widget-row-link"},Rf={class:"ss-dash-secondary-list-value"},Mf={href:"#logs?level=warn",class:"ss-dash-widget-row-link"},Af={class:"ss-dash-secondary-list-value"},Lf={href:"#logs?level=info",class:"ss-dash-widget-row-link"},Of={class:"ss-dash-secondary-list-value"},Df={href:"#logs?level=debug",class:"ss-dash-widget-row-link"},Ff={class:"ss-dash-secondary-list-value"},If={key:0,class:"ss-dash-secondary-card"},Bf={class:"ss-dash-secondary-list"},Nf={href:"#cache",class:"ss-dash-widget-row-link"},jf={class:"ss-dash-secondary-list-value"},Hf={href:"#cache",class:"ss-dash-widget-row-link"},Uf={class:"ss-dash-secondary-list-value"},qf={href:"#cache",class:"ss-dash-widget-row-link"},Kf={class:"ss-dash-secondary-list-value"},Vf={key:1,class:"ss-dash-secondary-card"},zf={class:"ss-dash-secondary-list"},Wf={href:"#jobs?status=active",class:"ss-dash-widget-row-link"},Qf={class:"ss-dash-secondary-list-value"},Jf={href:"#jobs?status=waiting",class:"ss-dash-widget-row-link"},Gf={class:"ss-dash-secondary-list-value"},Yf={href:"#jobs?status=failed",class:"ss-dash-widget-row-link"},Xf={href:"#jobs?status=completed",class:"ss-dash-widget-row-link"},Zf={class:"ss-dash-secondary-list-value"},eh={class:"ss-dash-secondary-card"},th={class:"ss-dash-secondary-list"},sh={href:"#requests?status=2xx",class:"ss-dash-widget-row-link"},nh={class:"ss-dash-secondary-list-value"},lh={href:"#requests?status=3xx",class:"ss-dash-widget-row-link"},oh={class:"ss-dash-secondary-list-value"},ih={href:"#requests?status=4xx",class:"ss-dash-widget-row-link"},ah={class:"ss-dash-secondary-list-value"},rh={href:"#requests?status=5xx",class:"ss-dash-widget-row-link"},uh={class:"ss-dash-secondary-list-value"},ch={class:"ss-dash-secondary-card"},dh={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},fh={key:1,class:"ss-dash-secondary-list"},hh=["href"],ph=["title"],ul=220,mi=120,vh=Object.freeze(Object.defineProperty({__proto__:null,default:((e,t)=>{const s=e.__vccOpts||e;for(const[l,i]of t)s[l]=i;return s})(Ne({__name:"OverviewSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-base-url",""),l=de("ss-dashboard-endpoint","/__stats/api"),i=de("ss-auth-token",void 0),o=Math.random().toString(36).slice(2,8),a=W("1h"),{data:r,loading:c}=rt(()=>"overview",{baseUrl:s,dashboardEndpoint:l,authToken:i,refreshKey:t}),{data:g,setTimeRange:p}=rt(()=>"overview/chart",{baseUrl:s,dashboardEndpoint:l,authToken:i,refreshKey:t});ht(a,X=>{p(X)});const b=H(()=>r.value),v=H(()=>b.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:[]}),w=H(()=>v.value),$=H(()=>v.value.avgResponseTime||Number(w.value.avg_response_time)||0),_=H(()=>v.value.p95ResponseTime||Number(w.value.p95_response_time)||0),C=H(()=>v.value.requestsPerMinute||Number(w.value.requests_per_minute)||0),A=H(()=>v.value.errorRate||Number(w.value.error_rate)||0),P=H(()=>v.value.totalRequests||Number(w.value.total_requests)||0),y=H(()=>P.value>0),k=H(()=>g.value?.buckets||[]),S=H(()=>v.value.sparklines?.avgResponseTime??k.value.map(X=>X.avgDuration??0)),Q=H(()=>v.value.sparklines?.p95ResponseTime??k.value.map(X=>X.p95Duration??0)),te=H(()=>v.value.sparklines?.requestsPerMinute??k.value.map(X=>X.requestCount??0)),se=H(()=>v.value.sparklines?.errorRate??k.value.map(X=>X.errorCount??0)),Y=H(()=>`ss-cg-total-${o}`),be=H(()=>`ss-cg-error-${o}`);function Re(X,M){if(X<=0)return[0];const ne=X/M,fe=Math.pow(10,Math.floor(Math.log10(ne))),ut=ne/fe;let lt;ut<=1?lt=fe:ut<=2?lt=2*fe:ut<=5?lt=5*fe:lt=10*fe;const fn=[];for(let dl=lt;dl<=X+lt*.5;dl+=lt)fn.push(Math.round(dl));return fn.length===0&&fn.push(Math.ceil(X)),fn}function ke(X){try{return new Date(X).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return""}}function Me(X){if(X.length===0)return"";if(X.length===1)return`M${X[0].x},${X[0].y}`;let M=`M${X[0].x.toFixed(1)},${X[0].y.toFixed(1)}`;for(let ne=0;ne<X.length-1;ne++){const fe=X[ne],ut=X[ne+1],lt=(fe.x+ut.x)/2;M+=` C${lt.toFixed(1)},${fe.y.toFixed(1)} ${lt.toFixed(1)},${ut.y.toFixed(1)} ${ut.x.toFixed(1)},${ut.y.toFixed(1)}`}return M}function Ce(X){return il(X,"ss-dash")}const we=W(null),z=W(0);let B=null;ht(we,X=>{B?.disconnect(),B=null,X&&(z.value=X.clientWidth,B=new ResizeObserver(M=>{for(const ne of M)z.value=ne.contentRect.width}),B.observe(X))}),Pt(()=>{B?.disconnect()});const j={top:12,right:12,bottom:28,left:38},_e=H(()=>z.value||600),xe=H(()=>_e.value-j.left-j.right),ie=H(()=>ul-j.top-j.bottom),he=H(()=>j.top+ie.value),re=H(()=>k.value.map(X=>{const M=X;return(X.requestCount??0)+(Number(M.request_count)||0)||X.total||0})),q=H(()=>k.value.map(X=>{const M=X;return(X.errorCount??0)+(Number(M.error_count)||0)})),le=H(()=>Math.max(...re.value,1)),U=H(()=>Math.ceil(le.value*1.1)),oe=H(()=>q.value.some(X=>X>0)),K=H(()=>Re(U.value,4)),Z=H(()=>K.value.length>0?K.value[K.value.length-1]:U.value);function E(X){return j.left+X/Math.max(k.value.length-1,1)*xe.value}function Be(X){return j.top+ie.value-X/(Z.value||1)*ie.value}const f=H(()=>k.value.map((X,M)=>({x:E(M),y:Be(re.value[M])}))),m=H(()=>k.value.map((X,M)=>({x:E(M),y:Be(q.value[M])}))),T=H(()=>Me(f.value)),I=H(()=>oe.value?Me(m.value):""),L=H(()=>f.value.length>1?`${T.value} L${f.value[f.value.length-1].x.toFixed(1)},${he.value} L${f.value[0].x.toFixed(1)},${he.value} Z`:""),O=H(()=>oe.value&&m.value.length>1?`${I.value} L${m.value[m.value.length-1].x.toFixed(1)},${he.value} L${m.value[0].x.toFixed(1)},${he.value} Z`:""),J=H(()=>Math.min(10,k.value.length)),V=H(()=>Math.max(1,Math.ceil(k.value.length/J.value))),D=W({visible:!1,x:0,idx:-1});function F(X){const M=f.value[X].x;D.value={visible:!0,x:M,idx:X}}function ce(){D.value={visible:!1,x:0,idx:-1}}const ee=H(()=>D.value.visible?Math.max(mi/2,Math.min(D.value.x,_e.value-mi/2)):0),ae=H(()=>xe.value/(k.value.length||1));function pe(X){return X%V.value===0||X===k.value.length-1}function $e(){return y.value?$.value>500?"ss-dash-red":$.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Le(){return y.value?_.value>500?"ss-dash-red":_.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Ee(){return y.value?"ss-dash-accent":"ss-dash-dim"}function Qe(){return y.value?A.value>5?"ss-dash-red":A.value>1?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function He(X){return X.url||X.pattern||"-"}function nt(X){return X.name||X.eventName||X.event_name||X.event||""}function tt(X){return X.sqlNormalized||X.normalizedSql||X.sql_normalized||X.sql||"-"}return(X,M)=>(u(),d("div",_d,[x(c)&&!b.value?(u(),d("div",xd,"Loading overview...")):(u(),d(N,{key:1},[n("div",wd,[n("div",kd,[M[1]||(M[1]=n("div",{class:"ss-dash-card-title"},"Avg Response Time",-1)),n("div",{class:R(["ss-dash-card-value",$e()])},h(y.value?x(Nt)($.value):"-"),3),n("div",$d,[Se(dn,{data:S.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Sd,[M[2]||(M[2]=n("div",{class:"ss-dash-card-title"},"P95 Response Time",-1)),n("div",{class:R(["ss-dash-card-value",Le()])},h(y.value?x(Nt)(_.value):"-"),3),n("div",Cd,[Se(dn,{data:Q.value,color:"#60a5fa",width:160,height:40},null,8,["data"])])]),n("div",Td,[M[3]||(M[3]=n("div",{class:"ss-dash-card-title"},"Requests / min",-1)),n("div",{class:R(["ss-dash-card-value",Ee()])},h(y.value?C.value.toFixed(1):"-"),3),n("div",Ed,[Se(dn,{data:te.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Pd,[M[4]||(M[4]=n("div",{class:"ss-dash-card-title"},"Error Rate",-1)),n("div",{class:R(["ss-dash-card-value",Qe()])},h(y.value?`${A.value.toFixed(1)}%`:"-"),3),n("div",Rd,[Se(dn,{data:se.value,color:"#f87171",width:160,height:40},null,8,["data"])])])]),n("div",Md,[n("div",Ad,[M[5]||(M[5]=n("span",{class:"ss-dash-chart-title"},"Request Volume",-1)),Se(bd,{"model-value":a.value,"onUpdate:modelValue":M[0]||(M[0]=ne=>a.value=ne)},null,8,["model-value"])]),n("div",Ld,[k.value.length===0?(u(),d("div",Od," No data for this range ")):(u(),d("div",{key:1,ref_key:"chartContainerRef",ref:we,style:{position:"relative"}},[(u(),d("svg",{viewBox:`0 0 ${_e.value} ${ul}`,class:"ss-dash-chart-svg"},[n("defs",null,[n("linearGradient",{id:Y.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...M[6]||(M[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,Fd),n("linearGradient",{id:be.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...M[7]||(M[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,Id)]),(u(!0),d(N,null,ye(K.value,ne=>(u(),d("g",{key:`ytick-${ne}`},[n("line",{x1:j.left,y1:Be(ne),x2:_e.value-j.right,y2:Be(ne),stroke:"var(--ss-border-faint)","stroke-width":"0.5","stroke-dasharray":"3,3"},null,8,Bd),n("text",{x:j.left-6,y:Be(ne),"text-anchor":"end",fill:"var(--ss-dim)","font-size":"9","dominant-baseline":"middle"},h(ne),9,Nd)]))),128)),L.value?(u(),d("path",{key:0,d:L.value,fill:`url(#${Y.value})`},null,8,jd)):G("",!0),T.value?(u(),d("path",{key:1,d:T.value,fill:"none",stroke:"var(--ss-accent)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"},null,8,Hd)):G("",!0),O.value?(u(),d("path",{key:2,d:O.value,fill:`url(#${be.value})`},null,8,Ud)):G("",!0),I.value?(u(),d("path",{key:3,d:I.value,fill:"none",stroke:"var(--ss-red-fg)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round","stroke-dasharray":"4,2"},null,8,qd)):G("",!0),(u(!0),d(N,null,ye(k.value,(ne,fe)=>(u(),d("g",{key:fe},[n("rect",{x:f.value[fe].x-ae.value/2,y:j.top,width:ae.value,height:ie.value,fill:"transparent",class:"ss-dash-chart-hover-zone","data-idx":fe,onMouseenter:ut=>F(fe),onMouseleave:ce},null,40,Kd),re.value[fe]>0?(u(),d("circle",{key:0,cx:f.value[fe].x,cy:f.value[fe].y,r:D.value.visible&&D.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:D.value.visible&&D.value.idx!==fe?.3:1},null,8,Vd)):G("",!0),q.value[fe]>0?(u(),d("circle",{key:1,cx:f.value[fe].x,cy:m.value[fe].y,r:D.value.visible&&D.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:D.value.visible&&D.value.idx!==fe?.3:1},null,8,zd)):G("",!0)]))),128)),(u(!0),d(N,null,ye(k.value,(ne,fe)=>(u(),d(N,{key:`xlabel-${fe}`},[pe(fe)&&ke(ne.bucket)?(u(),d("text",{key:0,x:E(fe),y:ul-6,"text-anchor":"middle",fill:"var(--ss-dim)","font-size":"9"},h(ke(ne.bucket)),9,Wd)):G("",!0)],64))),128))],8,Dd)),D.value.visible&&D.value.idx>=0?(u(),d("div",{key:0,class:"ss-dash-chart-tooltip",style:qe({left:ee.value+"px",top:j.top-4+"px",transform:"translate(-50%, -100%)"})},[n("div",null,h(ke(k.value[D.value.idx].bucket)),1),n("div",null,"Requests: "+h(re.value[D.value.idx]),1),q.value[D.value.idx]>0?(u(),d("div",Qd," Errors: "+h(q.value[D.value.idx]),1)):G("",!0)],4)):G("",!0)],512))]),n("div",Jd,[M[9]||(M[9]=n("span",{class:"ss-dash-chart-legend-item"},[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-accent)"}}),me(" Requests ")],-1)),k.value.some(ne=>(ne.errorCount??0)>0)?(u(),d("span",Gd,[...M[8]||(M[8]=[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-red-fg)"}},null,-1),me(" Errors ",-1)])])):G("",!0)])]),n("div",Yd,[n("div",Xd,[M[10]||(M[10]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Slowest Endpoints")],-1)),v.value.slowestEndpoints.length===0?(u(),d("div",Zd," No data yet ")):(u(),d("ul",ef,[(u(!0),d(N,null,ye(v.value.slowestEndpoints.slice(0,5),(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#requests?url=${encodeURIComponent(He(ne))}`,class:"ss-dash-widget-row-link"},[n("span",{title:He(ne)},h(He(ne)),9,sf),n("span",{class:R(["ss-dash-secondary-list-value","ss-dash-duration",Ce(ne.avgDuration)])},h(x(Nt)(ne.avgDuration)),3)],8,tf)]))),128))]))]),n("div",nf,[M[14]||(M[14]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Query Stats")],-1)),n("ul",lf,[n("li",null,[M[11]||(M[11]=n("span",null,"Total Queries",-1)),n("span",of,h(v.value.queryStats.total),1)]),n("li",null,[M[12]||(M[12]=n("span",null,"Avg Duration",-1)),n("span",af,h(x(Nt)(v.value.queryStats.avgDuration)),1)]),n("li",null,[M[13]||(M[13]=n("span",null,"Queries / Request",-1)),n("span",rf,h(v.value.queryStats.perRequest.toFixed(1)),1)])])]),n("div",uf,[M[15]||(M[15]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs?level=error",class:"ss-dash-widget-link"},"Recent Errors")],-1)),v.value.recentErrors.length===0?(u(),d("div",cf," No recent errors ")):(u(),d("ul",df,[(u(!0),d(N,null,ye(v.value.recentErrors,(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#logs?id=${ne.id??""}`,class:"ss-dash-widget-row-link"},[n("span",{style:{color:"var(--ss-red-fg)"},title:ne.message},h(ne.message),9,hf),ne.timestamp?(u(),d("span",{key:0,class:"ss-dash-secondary-list-value",style:{color:"var(--ss-dim)"},title:x(jt)(ne.timestamp)},h(x(kt)(ne.timestamp)),9,pf)):G("",!0)],8,ff)]))),128))]))]),n("div",vf,[M[16]||(M[16]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#events",class:"ss-dash-widget-link"},"Top Events")],-1)),v.value.topEvents.length===0?(u(),d("div",gf," No events yet ")):(u(),d("ul",yf,[(u(!0),d(N,null,ye(v.value.topEvents.slice(0,5),(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#events?event_name=${encodeURIComponent(nt(ne))}`,class:"ss-dash-widget-row-link"},[n("span",null,h(nt(ne)),1),n("span",bf,h(ne.count),1)],8,mf)]))),128))]))]),n("div",_f,[M[20]||(M[20]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#emails",class:"ss-dash-widget-link"},"Email Activity")],-1)),n("ul",xf,[n("li",null,[n("a",wf,[M[17]||(M[17]=n("span",null,"Sent",-1)),n("span",kf,h(v.value.emailActivity.sent),1)])]),n("li",null,[n("a",$f,[M[18]||(M[18]=n("span",null,"Queued",-1)),n("span",Sf,h(v.value.emailActivity.queued),1)])]),n("li",null,[n("a",Cf,[M[19]||(M[19]=n("span",null,"Failed",-1)),n("span",{class:"ss-dash-secondary-list-value",style:qe(v.value.emailActivity.failed>0?{color:"var(--ss-red-fg)"}:void 0)},h(v.value.emailActivity.failed),5)])])])]),n("div",Tf,[M[25]||(M[25]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs",class:"ss-dash-widget-link"},"Log Levels")],-1)),n("ul",Ef,[n("li",null,[n("a",Pf,[M[21]||(M[21]=n("span",{style:{color:"var(--ss-red-fg)"}},"Error",-1)),n("span",Rf,h(v.value.logLevelBreakdown.error),1)])]),n("li",null,[n("a",Mf,[M[22]||(M[22]=n("span",{style:{color:"var(--ss-amber-fg)"}},"Warn",-1)),n("span",Af,h(v.value.logLevelBreakdown.warn),1)])]),n("li",null,[n("a",Lf,[M[23]||(M[23]=n("span",{style:{color:"var(--ss-green-fg)"}},"Info",-1)),n("span",Of,h(v.value.logLevelBreakdown.info),1)])]),n("li",null,[n("a",Df,[M[24]||(M[24]=n("span",{style:{color:"var(--ss-dim)"}},"Debug",-1)),n("span",Ff,h(v.value.logLevelBreakdown.debug),1)])])])]),v.value.cacheStats&&v.value.cacheStats.available?(u(),d("div",If,[M[29]||(M[29]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#cache",class:"ss-dash-widget-link"},"Cache")],-1)),n("ul",Bf,[n("li",null,[n("a",Nf,[M[26]||(M[26]=n("span",null,"Keys",-1)),n("span",jf,h(v.value.cacheStats.totalKeys),1)])]),n("li",null,[n("a",Hf,[M[27]||(M[27]=n("span",null,"Hit Rate",-1)),n("span",Uf,h(v.value.cacheStats.hitRate.toFixed(1))+"%",1)])]),n("li",null,[n("a",qf,[M[28]||(M[28]=n("span",null,"Memory",-1)),n("span",Kf,h(v.value.cacheStats.memoryUsedHuman),1)])])])])):G("",!0),v.value.jobQueueStatus&&v.value.jobQueueStatus.available?(u(),d("div",Vf,[M[34]||(M[34]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#jobs",class:"ss-dash-widget-link"},"Job Queue")],-1)),n("ul",zf,[n("li",null,[n("a",Wf,[M[30]||(M[30]=n("span",null,"Active",-1)),n("span",Qf,h(v.value.jobQueueStatus.active),1)])]),n("li",null,[n("a",Jf,[M[31]||(M[31]=n("span",null,"Waiting",-1)),n("span",Gf,h(v.value.jobQueueStatus.waiting),1)])]),n("li",null,[n("a",Yf,[M[32]||(M[32]=n("span",null,"Failed",-1)),n("span",{class:"ss-dash-secondary-list-value",style:qe(v.value.jobQueueStatus.failed>0?{color:"var(--ss-red-fg)"}:void 0)},h(v.value.jobQueueStatus.failed),5)])]),n("li",null,[n("a",Xf,[M[33]||(M[33]=n("span",null,"Completed",-1)),n("span",Zf,h(v.value.jobQueueStatus.completed),1)])])])])):G("",!0),n("div",eh,[M[39]||(M[39]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Response Status")],-1)),n("ul",th,[n("li",null,[n("a",sh,[M[35]||(M[35]=n("span",{style:{color:"var(--ss-green-fg)"}},"2xx",-1)),n("span",nh,h(v.value.statusDistribution["2xx"]),1)])]),n("li",null,[n("a",lh,[M[36]||(M[36]=n("span",{style:{color:"var(--ss-blue-fg)"}},"3xx",-1)),n("span",oh,h(v.value.statusDistribution["3xx"]),1)])]),n("li",null,[n("a",ih,[M[37]||(M[37]=n("span",{style:{color:"var(--ss-amber-fg)"}},"4xx",-1)),n("span",ah,h(v.value.statusDistribution["4xx"]),1)])]),n("li",null,[n("a",rh,[M[38]||(M[38]=n("span",{style:{color:"var(--ss-red-fg)"}},"5xx",-1)),n("span",uh,h(v.value.statusDistribution["5xx"]),1)])])])]),n("div",ch,[M[40]||(M[40]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Slowest Queries")],-1)),v.value.slowestQueries.length===0?(u(),d("div",dh," No query data yet ")):(u(),d("ul",fh,[(u(!0),d(N,null,ye(v.value.slowestQueries.slice(0,5),(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#queries?pattern=${encodeURIComponent(tt(ne))}`,class:"ss-dash-widget-row-link"},[n("span",{title:tt(ne)},h(tt(ne)),9,ph),n("span",{class:R(["ss-dash-secondary-list-value","ss-dash-duration",Ce(ne.avgDuration)])},h(x(Nt)(ne.avgDuration)),3)],8,hh)]))),128))]))])])],64))]))}}),[["__scopeId","data-v-6c6eb892"]])},Symbol.toStringTag,{value:"Module"}));function cl(e="",t){let s=null;return function(){return s||(s=new ll({baseUrl:e,authToken:t})),s}}function Jt(e){const t=W(null);let s=null;function l(){s&&s(),s=null,Dn(()=>{t.value&&(s=Iu(t.value))})}return e&&ht(e,l),It(l),to(()=>{s&&s(),s=null}),{tableRef:t}}const gh={class:"ss-dash-filter-bar"},yh={key:0,class:"ss-dash-summary"},mh={class:"ss-dash-search-wrapper"},bh=["viewBox","innerHTML"],_h=["value","placeholder"],xh={key:1,class:"ss-dash-filter-controls"},qt=Ne({__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 i(){s("update:modelValue",""),s("clear")}return(o,a)=>(u(),d("div",gh,[e.summary?(u(),d("span",yh,h(e.summary),1)):G("",!0),n("div",mh,[(u(),d("svg",{class:"ss-dash-search-icon",viewBox:x(Fe).search.viewBox,width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe).search.elements.join("")},null,8,bh)),n("input",{class:"ss-dash-search",type:"text",value:e.modelValue,placeholder:e.placeholder||"Search...",onInput:l},null,40,_h),e.modelValue?(u(),d("button",{key:0,type:"button",class:"ss-dash-search-clear",onClick:i}," × ")):G("",!0)]),o.$slots.default?(u(),d("div",xh,[La(o.$slots,"default")])):G("",!0)]))}}),wh={key:0,class:"ss-dash-pagination"},kh={class:"ss-dash-page-info"},$h={class:"ss-dash-pagination-controls"},Sh=["disabled"],Ch={key:0,class:"ss-dash-page-ellipsis"},Th=["onClick"],Eh=["disabled"],ps=Ne({__name:"PaginationControls",props:{page:{},lastPage:{},total:{}},emits:["pageChange"],setup(e,{emit:t}){const s=e,l=t,i=H(()=>Cu(s.page,s.lastPage));return(o,a)=>e.lastPage>1?(u(),d("div",wh,[n("span",kh," Page "+h(e.page)+" of "+h(e.lastPage)+" ("+h(e.total)+" total) ",1),n("div",$h,[n("button",{type:"button",class:"ss-dash-page-btn",disabled:e.page<=1,onClick:a[0]||(a[0]=r=>l("pageChange",e.page-1))}," « Prev ",8,Sh),(u(!0),d(N,null,ye(i.value,(r,c)=>(u(),d(N,{key:r==="..."?`ellipsis-${c}`:r},[r==="..."?(u(),d("span",Ch,"...")):(u(),d("button",{key:1,type:"button",class:R(`ss-dash-page-btn ${r===e.page?"ss-dash-active":""}`),onClick:g=>l("pageChange",r)},h(r),11,Th))],64))),128)),n("button",{type:"button",class:"ss-dash-page-btn",disabled:e.page>=e.lastPage,onClick:a[1]||(a[1]=r=>l("pageChange",e.page+1))}," Next » ",8,Eh)])])):G("",!0)}}),Ph={key:0,class:"ss-dash-empty"},Rh={class:"ss-dash-tl-legend"},Mh=["title"],Ah={class:"ss-dash-tl-track"},Lh=["title"],Oh={class:"ss-dash-tl-dur"},Dh={key:0,class:"ss-dash-tl-warnings"},Fh={class:"ss-dash-tl-warnings-title"},bi=Ne({__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"},i=H(()=>t.spans||[]),o=H(()=>[...i.value].sort((w,$)=>w.startOffset-$.startOffset)),a=H(()=>{const w={};for(const $ of o.value)w[$.id]=$.parentId?(w[$.parentId]||0)+1:0;return w});function r(w){const $=t.totalDuration||1;return`${w.startOffset/$*100}%`}function c(w){const $=t.totalDuration||1;return`${Math.max(w.duration/$*100,.5)}%`}function g(w){return w.length>50?w.slice(0,50)+"...":w}function p(w){return w==="db"?"DB":w}function b(w){return w==="db"?"purple":w==="mail"?"green":w==="event"?"amber":w==="view"?"blue":"muted"}function v(w){const $=w.metadata?Object.entries(w.metadata).filter(([,_])=>_!=null).map(([_,C])=>`${_}=${C}`).join(", "):"";return $?`${w.label} (${w.duration.toFixed(2)}ms)
4
+ `],...ua(s))}),t}function ua({vnode:e,recurseCount:t}){const s=t>0?`... (${t} recursive calls)`:"",l=e.component?e.component.parent==null:!1,i=` at <${Ho(e.component,e.type,l)}`,o=">"+s;return e.props?[i,...ca(e.props),o]:[i+o]}function ca(e){const t=[],s=Object.keys(e);return s.slice(0,3).forEach(l=>{t.push(...Ul(l,e[l]))}),s.length>3&&t.push(" ..."),t}function Ul(e,t,s){return Ie(t)?(t=JSON.stringify(t),s?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?s?t:[`${e}=${t}`]:Ke(t)?(t=Ul(e,Te(t.value),!0),s?t:[`${e}=Ref<`,t,">"]):ve(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=Te(t),s?t:[`${e}=`,t])}function ts(e,t,s,l){try{return l?e(...l):e()}catch(i){ss(i,t,s)}}function _t(e,t,s,l){if(ve(e)){const i=ts(e,t,s,l);return i&&vl(i)&&i.catch(o=>{ss(o,t,s)}),i}if(ge(e)){const i=[];for(let o=0;o<e.length;o++)i.push(_t(e[o],t,s,l));return i}}function ss(e,t,s,l=!0){const i=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||Oe;if(t){let r=t.parent;const c=t.proxy,g=`https://vuejs.org/error-reference/#runtime-${s}`;for(;r;){const p=r.ec;if(p){for(let b=0;b<p.length;b++)if(p[b](e,c,g)===!1)return}r=r.parent}if(o){mt(),ts(o,null,10,[e,c,g]),bt();return}}da(e,s,i,l,a)}function da(e,t,s,l=!0,i=!1){if(i)throw e;console.error(e)}const Je=[];let xt=-1;const ns=[];let Ft=null,ls=0;const ql=Promise.resolve();let Vs=null;function Dn(e){const t=Vs||ql;return e?t.then(this?e.bind(this):e):t}function fa(e){let t=xt+1,s=Je.length;for(;t<s;){const l=t+s>>>1,i=Je[l],o=ks(i);o<e||o===e&&i.flags&2?t=l+1:s=l}return t}function Fn(e){if(!(e.flags&1)){const t=ks(e),s=Je[Je.length-1];!s||!(e.flags&2)&&t>=ks(s)?Je.push(e):Je.splice(fa(t),0,e),e.flags|=1,Kl()}}function Kl(){Vs||(Vs=ql.then(Wl))}function In(e){ge(e)?ns.push(...e):Ft&&e.id===-1?Ft.splice(ls+1,0,e):e.flags&1||(ns.push(e),e.flags|=1),Kl()}function Vl(e,t,s=xt+1){for(;s<Je.length;s++){const l=Je[s];if(l&&l.flags&2){if(e&&l.id!==e.uid)continue;Je.splice(s,1),s--,l.flags&4&&(l.flags&=-2),l(),l.flags&4||(l.flags&=-2)}}}function zl(e){if(ns.length){const t=[...new Set(ns)].sort((s,l)=>ks(s)-ks(l));if(ns.length=0,Ft){Ft.push(...t);return}for(Ft=t,ls=0;ls<Ft.length;ls++){const s=Ft[ls];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}Ft=null,ls=0}}const ks=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Wl(e){try{for(xt=0;xt<Je.length;xt++){const t=Je[xt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ts(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;xt<Je.length;xt++){const t=Je[xt];t&&(t.flags&=-2)}xt=-1,Je.length=0,zl(),Vs=null,(Je.length||ns.length)&&Wl()}}let Ge=null,Ql=null;function zs(e){const t=Ge;return Ge=e,Ql=e&&e.type.__scopeId||null,t}function os(e,t=Ge,s){if(!t||e._n)return e;const l=(...i)=>{l._d&&Oo(-1);const o=zs(t);let a;try{a=e(...i)}finally{zs(o),l._d&&Oo(1)}return a};return l._n=!0,l._c=!0,l._d=!0,l}function Wt(e,t,s,l){const i=e.dirs,o=t&&t.dirs;for(let a=0;a<i.length;a++){const r=i[a];o&&(r.oldValue=o[a].value);let c=r.dir[l];c&&(mt(),_t(c,s,8,[e.el,r,e,t]),bt())}}function is(e,t){if(Ve){let s=Ve.provides;const l=Ve.parent&&Ve.parent.provides;l===s&&(s=Ve.provides=Object.create(l)),s[e]=t}}function de(e,t,s=!1){const l=br();if(l||rs){let i=rs?rs._context.provides:l?l.parent==null||l.ce?l.vnode.appContext&&l.vnode.appContext.provides:l.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return s&&ve(t)?t.call(l&&l.proxy):t}}const ha=Symbol.for("v-scx"),pa=()=>de(ha);function ht(e,t,s){return Jl(e,t,s)}function Jl(e,t,s=Oe){const{immediate:l,deep:i,flush:o,once:a}=s,r=Ue({},s),c=t&&l||!t&&o!=="post";let g;if(fs){if(o==="sync"){const w=pa();g=w.__watcherHandles||(w.__watcherHandles=[])}else if(!c){const w=()=>{};return w.stop=yt,w.resume=yt,w.pause=yt,w}}const p=Ve;r.call=(w,$,_)=>_t(w,p,$,_);let b=!1;o==="post"?r.scheduler=w=>{Xe(w,p&&p.suspense)}:o!=="sync"&&(b=!0,r.scheduler=(w,$)=>{$?w():Fn(w)}),r.augmentJob=w=>{t&&(w.flags|=4),b&&(w.flags|=2,p&&(w.id=p.uid,w.i=p))};const v=ia(e,t,r);return fs&&(g?g.push(v):c&&v()),v}function va(e,t,s){const l=this.proxy,i=Ie(e)?e.includes(".")?Gl(l,e):()=>l[e]:e.bind(l,l);let o;ve(t)?o=t:(o=t.handler,s=t);const a=Ps(this),r=Jl(i,o.bind(l),s);return a(),r}function Gl(e,t){const s=t.split(".");return()=>{let l=e;for(let i=0;i<s.length&&l;i++)l=l[s[i]];return l}}const ga=Symbol("_vte"),ya=e=>e.__isTeleport,ma=Symbol("_leaveCb");function Bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Bn(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 Ne(e,t){return ve(e)?Ue({name:e.name},t,{setup:e}):e}function Nn(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Yl(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Ws=new WeakMap;function $s(e,t,s,l,i=!1){if(ge(e)){e.forEach((_,C)=>$s(_,t&&(ge(t)?t[C]:t),s,l,i));return}if(as(l)&&!i){l.shapeFlag&512&&l.type.__asyncResolved&&l.component.subTree.component&&$s(e,t,s,l.component.subTree);return}const o=l.shapeFlag&4?el(l.component):l.el,a=i?null:o,{i:r,r:c}=e,g=t&&t.r,p=r.refs===Oe?r.refs={}:r.refs,b=r.setupState,v=Te(b),w=b===Oe?fl:_=>Yl(p,_)?!1:Pe(v,_),$=(_,C)=>!(C&&Yl(p,C));if(g!=null&&g!==c){if(Xl(t),Ie(g))p[g]=null,w(g)&&(b[g]=null);else if(Ke(g)){const _=t;$(g,_.k)&&(g.value=null),_.k&&(p[_.k]=null)}}if(ve(c))ts(c,r,12,[a,p]);else{const _=Ie(c),C=Ke(c);if(_||C){const A=()=>{if(e.f){const P=_?w(c)?b[c]:p[c]:$()||!e.k?c.value:p[e.k];if(i)ge(P)&&vn(P,o);else if(ge(P))P.includes(o)||P.push(o);else if(_)p[c]=[o],w(c)&&(b[c]=p[c]);else{const y=[o];$(c,e.k)&&(c.value=y),e.k&&(p[e.k]=y)}}else _?(p[c]=a,w(c)&&(b[c]=a)):C&&($(c,e.k)&&(c.value=a),e.k&&(p[e.k]=a))};if(a){const P=()=>{A(),Ws.delete(e)};P.id=-1,Ws.set(e,P),Xe(P,s)}else Xl(e),A()}}}function Xl(e){const t=Ws.get(e);t&&(t.flags|=8,Ws.delete(e))}const Zl=e=>e.nodeType===8;Is().requestIdleCallback,Is().cancelIdleCallback;function ba(e,t){if(Zl(e)&&e.data==="["){let s=1,l=e.nextSibling;for(;l;){if(l.nodeType===1){if(t(l)===!1)break}else if(Zl(l))if(l.data==="]"){if(--s===0)break}else l.data==="["&&s++;l=l.nextSibling}}else t(e)}const as=e=>!!e.type.__asyncLoader;function pt(e){ve(e)&&(e={loader:e});const{loader:t,loadingComponent:s,errorComponent:l,delay:i=200,hydrate:o,timeout:a,suspensible:r=!0,onError:c}=e;let g=null,p,b=0;const v=()=>(b++,g=null,w()),w=()=>{let $;return g||($=g=t().catch(_=>{if(_=_ instanceof Error?_:new Error(String(_)),c)return new Promise((C,A)=>{c(_,()=>C(v()),()=>A(_),b+1)});throw _}).then(_=>$!==g&&g?g:(_&&(_.__esModule||_[Symbol.toStringTag]==="Module")&&(_=_.default),p=_,_)))};return Ne({name:"AsyncComponentWrapper",__asyncLoader:w,__asyncHydrate($,_,C){let A=!1;(_.bu||(_.bu=[])).push(()=>A=!0);const P=()=>{A||C()},y=o?()=>{const k=o(P,S=>ba($,S));k&&(_.bum||(_.bum=[])).push(k)}:P;p?y():w().then(()=>!_.isUnmounted&&y())},get __asyncResolved(){return p},setup(){const $=Ve;if(Nn($),p)return()=>Qs(p,$);const _=y=>{g=null,ss(y,$,13,!l)};if(r&&$.suspense||fs)return w().then(y=>()=>Qs(y,$)).catch(y=>(_(y),()=>l?Se(l,{error:y}):null));const C=W(!1),A=W(),P=W(!!i);return i&&setTimeout(()=>{P.value=!1},i),a!=null&&setTimeout(()=>{if(!C.value&&!A.value){const y=new Error(`Async component timed out after ${a}ms.`);_(y),A.value=y}},a),w().then(()=>{C.value=!0,$.parent&&jn($.parent.vnode)&&$.parent.update()}).catch(y=>{_(y),A.value=y}),()=>{if(C.value&&p)return Qs(p,$);if(A.value&&l)return Se(l,{error:A.value});if(s&&!P.value)return Qs(s,$)}}})}function Qs(e,t){const{ref:s,props:l,children:i,ce:o}=t.vnode,a=Se(e,l,i);return a.ref=s,a.ce=o,delete t.vnode.ce,a}const jn=e=>e.type.__isKeepAlive;function _a(e,t){eo(e,"a",t)}function xa(e,t){eo(e,"da",t)}function eo(e,t,s=Ve){const l=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Js(t,l,s),s){let i=s.parent;for(;i&&i.parent;)jn(i.parent.vnode)&&wa(l,t,s,i),i=i.parent}}function wa(e,t,s,l){const i=Js(t,e,l,!0);Pt(()=>{vn(l[t],i)},s)}function Js(e,t,s=Ve,l=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...a)=>{mt();const r=Ps(s),c=_t(t,s,e,a);return r(),bt(),c});return l?i.unshift(o):i.push(o),o}}const Et=e=>(t,s=Ve)=>{(!fs||e==="sp")&&Js(e,(...l)=>t(...l),s)},ka=Et("bm"),It=Et("m"),$a=Et("bu"),Sa=Et("u"),to=Et("bum"),Pt=Et("um"),Ca=Et("sp"),Ta=Et("rtg"),Ea=Et("rtc");function Pa(e,t=Ve){Js("ec",e,t)}const Ra="components",so=Symbol.for("v-ndc");function Ma(e){return Ie(e)?Aa(Ra,e,!1)||e:e||so}function Aa(e,t,s=!0,l=!1){const i=Ge||Ve;if(i){const o=i.type;{const r=jo(o,!1);if(r&&(r===t||r===ot(t)||r===Fs(ot(t))))return o}const a=no(i[e]||o[e],t)||no(i.appContext[e],t);return!a&&l?o:a}}function no(e,t){return e&&(e[t]||e[ot(t)]||e[Fs(ot(t))])}function ye(e,t,s,l){let i;const o=s,a=ge(e);if(a||Ie(e)){const r=a&&Vt(e);let c=!1,g=!1;r&&(c=!it(e),g=Tt(e),e=Bs(e)),i=new Array(e.length);for(let p=0,b=e.length;p<b;p++)i[p]=t(c?g?es(ft(e[p])):ft(e[p]):e[p],p,void 0,o)}else if(typeof e=="number"){i=new Array(e);for(let r=0;r<e;r++)i[r]=t(r+1,r,void 0,o)}else if(Ae(e))if(e[Symbol.iterator])i=Array.from(e,(r,c)=>t(r,c,void 0,o));else{const r=Object.keys(e);i=new Array(r.length);for(let c=0,g=r.length;c<g;c++){const p=r[c];i[c]=t(e[p],p,c,o)}}else i=[];return i}function La(e,t,s={},l,i){if(Ge.ce||Ge.parent&&as(Ge.parent)&&Ge.parent.ce){const g=Object.keys(s).length>0;return u(),st(N,null,[Se("slot",s,l)],g?-2:64)}let o=e[t];o&&o._c&&(o._d=!1),u();const a=o&&lo(o(s)),r=s.key||a&&a.key,c=st(N,{key:(r&&!ct(r)?r:`_${t}`)+(!a&&l?"_fb":"")},a||[],a&&e._===1?64:-2);return c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),o&&o._c&&(o._d=!0),c}function lo(e){return e.some(t=>en(t)?!(t.type===vt||t.type===N&&!lo(t.children)):!0)?e:null}const Hn=e=>e?Bo(e)?el(e):Hn(e.parent):null,Ss=Ue(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=>Hn(e.parent),$root:e=>Hn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ro(e),$forceUpdate:e=>e.f||(e.f=()=>{Fn(e.update)}),$nextTick:e=>e.n||(e.n=Dn.bind(e.proxy)),$watch:e=>va.bind(e)}),Un=(e,t)=>e!==Oe&&!e.__isScriptSetup&&Pe(e,t),Oa={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:l,data:i,props:o,accessCache:a,type:r,appContext:c}=e;if(t[0]!=="$"){const v=a[t];if(v!==void 0)switch(v){case 1:return l[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Un(l,t))return a[t]=1,l[t];if(i!==Oe&&Pe(i,t))return a[t]=2,i[t];if(Pe(o,t))return a[t]=3,o[t];if(s!==Oe&&Pe(s,t))return a[t]=4,s[t];qn&&(a[t]=0)}}const g=Ss[t];let p,b;if(g)return t==="$attrs"&&We(e.attrs,"get",""),g(e);if((p=r.__cssModules)&&(p=p[t]))return p;if(s!==Oe&&Pe(s,t))return a[t]=4,s[t];if(b=c.config.globalProperties,Pe(b,t))return b[t]},set({_:e},t,s){const{data:l,setupState:i,ctx:o}=e;return Un(i,t)?(i[t]=s,!0):l!==Oe&&Pe(l,t)?(l[t]=s,!0):Pe(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:i,props:o,type:a}},r){let c;return!!(s[r]||e!==Oe&&r[0]!=="$"&&Pe(e,r)||Un(t,r)||Pe(o,r)||Pe(l,r)||Pe(Ss,r)||Pe(i.config.globalProperties,r)||(c=a.__cssModules)&&c[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Pe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function oo(e){return ge(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let qn=!0;function Da(e){const t=ro(e),s=e.proxy,l=e.ctx;qn=!1,t.beforeCreate&&io(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:a,watch:r,provide:c,inject:g,created:p,beforeMount:b,mounted:v,beforeUpdate:w,updated:$,activated:_,deactivated:C,beforeDestroy:A,beforeUnmount:P,destroyed:y,unmounted:k,render:S,renderTracked:Q,renderTriggered:te,errorCaptured:se,serverPrefetch:Y,expose:be,inheritAttrs:Re,components:ke,directives:Me,filters:Ce}=t;if(g&&Fa(g,l,null),a)for(const B in a){const j=a[B];ve(j)&&(l[B]=j.bind(s))}if(i){const B=i.call(s,s);Ae(B)&&(e.data=Zt(B))}if(qn=!0,o)for(const B in o){const j=o[B],_e=ve(j)?j.bind(s,s):ve(j.get)?j.get.bind(s,s):yt,xe=!ve(j)&&ve(j.set)?j.set.bind(s):yt,ie=H({get:_e,set:xe});Object.defineProperty(l,B,{enumerable:!0,configurable:!0,get:()=>ie.value,set:he=>ie.value=he})}if(r)for(const B in r)ao(r[B],l,s,B);if(c){const B=ve(c)?c.call(s):c;Reflect.ownKeys(B).forEach(j=>{is(j,B[j])})}p&&io(p,e,"c");function z(B,j){ge(j)?j.forEach(_e=>B(_e.bind(s))):j&&B(j.bind(s))}if(z(ka,b),z(It,v),z($a,w),z(Sa,$),z(_a,_),z(xa,C),z(Pa,se),z(Ea,Q),z(Ta,te),z(to,P),z(Pt,k),z(Ca,Y),ge(be))if(be.length){const B=e.exposed||(e.exposed={});be.forEach(j=>{Object.defineProperty(B,j,{get:()=>s[j],set:_e=>s[j]=_e,enumerable:!0})})}else e.exposed||(e.exposed={});S&&e.render===yt&&(e.render=S),Re!=null&&(e.inheritAttrs=Re),ke&&(e.components=ke),Me&&(e.directives=Me),Y&&Nn(e)}function Fa(e,t,s=yt){ge(e)&&(e=Kn(e));for(const l in e){const i=e[l];let o;Ae(i)?"default"in i?o=de(i.from||l,i.default,!0):o=de(i.from||l):o=de(i),Ke(o)?Object.defineProperty(t,l,{enumerable:!0,configurable:!0,get:()=>o.value,set:a=>o.value=a}):t[l]=o}}function io(e,t,s){_t(ge(e)?e.map(l=>l.bind(t.proxy)):e.bind(t.proxy),t,s)}function ao(e,t,s,l){let i=l.includes(".")?Gl(s,l):()=>s[l];if(Ie(e)){const o=t[e];ve(o)&&ht(i,o)}else if(ve(e))ht(i,e.bind(s));else if(Ae(e))if(ge(e))e.forEach(o=>ao(o,t,s,l));else{const o=ve(e.handler)?e.handler.bind(s):t[e.handler];ve(o)&&ht(i,o,e)}}function ro(e){const t=e.type,{mixins:s,extends:l}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=e.appContext,r=o.get(t);let c;return r?c=r:!i.length&&!s&&!l?c=t:(c={},i.length&&i.forEach(g=>Gs(c,g,a,!0)),Gs(c,t,a)),Ae(t)&&o.set(t,c),c}function Gs(e,t,s,l=!1){const{mixins:i,extends:o}=t;o&&Gs(e,o,s,!0),i&&i.forEach(a=>Gs(e,a,s,!0));for(const a in t)if(!(l&&a==="expose")){const r=Ia[a]||s&&s[a];e[a]=r?r(e[a],t[a]):t[a]}return e}const Ia={data:uo,props:co,emits:co,methods:Cs,computed:Cs,beforeCreate:Ye,created:Ye,beforeMount:Ye,mounted:Ye,beforeUpdate:Ye,updated:Ye,beforeDestroy:Ye,beforeUnmount:Ye,destroyed:Ye,unmounted:Ye,activated:Ye,deactivated:Ye,errorCaptured:Ye,serverPrefetch:Ye,components:Cs,directives:Cs,watch:Na,provide:uo,inject:Ba};function uo(e,t){return t?e?function(){return Ue(ve(e)?e.call(this,this):e,ve(t)?t.call(this,this):t)}:t:e}function Ba(e,t){return Cs(Kn(e),Kn(t))}function Kn(e){if(ge(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ye(e,t){return e?[...new Set([].concat(e,t))]:t}function Cs(e,t){return e?Ue(Object.create(null),e,t):t}function co(e,t){return e?ge(e)&&ge(t)?[...new Set([...e,...t])]:Ue(Object.create(null),oo(e),oo(t??{})):t}function Na(e,t){if(!e)return t;if(!t)return e;const s=Ue(Object.create(null),e);for(const l in t)s[l]=Ye(e[l],t[l]);return s}function fo(){return{app:null,config:{isNativeTag:fl,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 ja=0;function Ha(e,t){return function(l,i=null){ve(l)||(l=Ue({},l)),i!=null&&!Ae(i)&&(i=null);const o=fo(),a=new WeakSet,r=[];let c=!1;const g=o.app={_uid:ja++,_component:l,_props:i,_container:null,_context:o,_instance:null,version:Tr,get config(){return o.config},set config(p){},use(p,...b){return a.has(p)||(p&&ve(p.install)?(a.add(p),p.install(g,...b)):ve(p)&&(a.add(p),p(g,...b))),g},mixin(p){return o.mixins.includes(p)||o.mixins.push(p),g},component(p,b){return b?(o.components[p]=b,g):o.components[p]},directive(p,b){return b?(o.directives[p]=b,g):o.directives[p]},mount(p,b,v){if(!c){const w=g._ceVNode||Se(l,i);return w.appContext=o,v===!0?v="svg":v===!1&&(v=void 0),e(w,p,v),c=!0,g._container=p,p.__vue_app__=g,el(w.component)}},onUnmount(p){r.push(p)},unmount(){c&&(_t(r,g._instance,16),e(null,g._container),delete g._container.__vue_app__)},provide(p,b){return o.provides[p]=b,g},runWithContext(p){const b=rs;rs=g;try{return p()}finally{rs=b}}};return g}}let rs=null;const Ua=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ot(t)}Modifiers`]||e[`${At(t)}Modifiers`];function qa(e,t,...s){if(e.isUnmounted)return;const l=e.vnode.props||Oe;let i=s;const o=t.startsWith("update:"),a=o&&Ua(l,t.slice(7));a&&(a.trim&&(i=s.map(p=>Ie(p)?p.trim():p)),a.number&&(i=s.map($i)));let r,c=l[r=yn(t)]||l[r=yn(ot(t))];!c&&o&&(c=l[r=yn(At(t))]),c&&_t(c,e,6,i);const g=l[r+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,_t(g,e,6,i)}}const Ka=new WeakMap;function ho(e,t,s=!1){const l=s?Ka:t.emitsCache,i=l.get(e);if(i!==void 0)return i;const o=e.emits;let a={},r=!1;if(!ve(e)){const c=g=>{const p=ho(g,t,!0);p&&(r=!0,Ue(a,p))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!r?(Ae(e)&&l.set(e,null),null):(ge(o)?o.forEach(c=>a[c]=null):Ue(a,o),Ae(e)&&l.set(e,a),a)}function Ys(e,t){return!e||!Os(t)?!1:(t=t.slice(2).replace(/Once$/,""),Pe(e,t[0].toLowerCase()+t.slice(1))||Pe(e,At(t))||Pe(e,t))}function ay(){}function po(e){const{type:t,vnode:s,proxy:l,withProxy:i,propsOptions:[o],slots:a,attrs:r,emit:c,render:g,renderCache:p,props:b,data:v,setupState:w,ctx:$,inheritAttrs:_}=e,C=zs(e);let A,P;try{if(s.shapeFlag&4){const k=i||l,S=k;A=gt(g.call(S,k,p,b,w,v,$)),P=r}else{const k=t;A=gt(k.length>1?k(b,{attrs:r,slots:a,emit:c}):k(b,null)),P=t.props?r:za(r)}}catch(k){Es.length=0,ss(k,e,1),A=Se(vt)}let y=A;if(P&&_!==!1){const k=Object.keys(P),{shapeFlag:S}=y;k.length&&S&7&&(o&&k.some(pn)&&(P=Wa(P,o)),y=ds(y,P,!1,!0))}return s.dirs&&(y=ds(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(s.dirs):s.dirs),s.transition&&Bn(y,s.transition),A=y,zs(C),A}function Va(e,t=!0){let s;for(let l=0;l<e.length;l++){const i=e[l];if(en(i)){if(i.type!==vt||i.children==="v-if"){if(s)return;s=i}}else return}return s}const za=e=>{let t;for(const s in e)(s==="class"||s==="style"||Os(s))&&((t||(t={}))[s]=e[s]);return t},Wa=(e,t)=>{const s={};for(const l in e)(!pn(l)||!(l.slice(9)in t))&&(s[l]=e[l]);return s};function Qa(e,t,s){const{props:l,children:i,component:o}=e,{props:a,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?vo(l,a,g):!!a;if(c&8){const p=t.dynamicProps;for(let b=0;b<p.length;b++){const v=p[b];if(go(a,l,v)&&!Ys(g,v))return!0}}}else return(i||r)&&(!r||!r.$stable)?!0:l===a?!1:l?a?vo(l,a,g):!0:!!a;return!1}function vo(e,t,s){const l=Object.keys(t);if(l.length!==Object.keys(e).length)return!0;for(let i=0;i<l.length;i++){const o=l[i];if(go(t,e,o)&&!Ys(s,o))return!0}return!1}function go(e,t,s){const l=e[s],i=t[s];return s==="style"&&Ae(l)&&Ae(i)?!bn(l,i):l!==i}function Vn({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 yo={},mo=()=>Object.create(yo),bo=e=>Object.getPrototypeOf(e)===yo;function Ja(e,t,s,l=!1){const i={},o=mo();e.propsDefaults=Object.create(null),_o(e,t,i,o);for(const a in e.propsOptions[0])a in i||(i[a]=void 0);s?e.props=l?i:Xi(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Ga(e,t,s,l){const{props:i,attrs:o,vnode:{patchFlag:a}}=e,r=Te(i),[c]=e.propsOptions;let g=!1;if((l||a>0)&&!(a&16)){if(a&8){const p=e.vnode.dynamicProps;for(let b=0;b<p.length;b++){let v=p[b];if(Ys(e.emitsOptions,v))continue;const w=t[v];if(c)if(Pe(o,v))w!==o[v]&&(o[v]=w,g=!0);else{const $=ot(v);i[$]=zn(c,r,$,w,e,!1)}else w!==o[v]&&(o[v]=w,g=!0)}}}else{_o(e,t,i,o)&&(g=!0);let p;for(const b in r)(!t||!Pe(t,b)&&((p=At(b))===b||!Pe(t,p)))&&(c?s&&(s[b]!==void 0||s[p]!==void 0)&&(i[b]=zn(c,r,b,void 0,e,!0)):delete i[b]);if(o!==r)for(const b in o)(!t||!Pe(t,b))&&(delete o[b],g=!0)}g&&St(e.attrs,"set","")}function _o(e,t,s,l){const[i,o]=e.propsOptions;let a=!1,r;if(t)for(let c in t){if(gs(c))continue;const g=t[c];let p;i&&Pe(i,p=ot(c))?!o||!o.includes(p)?s[p]=g:(r||(r={}))[p]=g:Ys(e.emitsOptions,c)||(!(c in l)||g!==l[c])&&(l[c]=g,a=!0)}if(o){const c=Te(s),g=r||Oe;for(let p=0;p<o.length;p++){const b=o[p];s[b]=zn(i,c,b,g[b],e,!Pe(g,b))}}return a}function zn(e,t,s,l,i,o){const a=e[s];if(a!=null){const r=Pe(a,"default");if(r&&l===void 0){const c=a.default;if(a.type!==Function&&!a.skipFactory&&ve(c)){const{propsDefaults:g}=i;if(s in g)l=g[s];else{const p=Ps(i);l=g[s]=c.call(null,t),p()}}else l=c;i.ce&&i.ce._setProp(s,l)}a[0]&&(o&&!r?l=!1:a[1]&&(l===""||l===At(s))&&(l=!0))}return l}const Ya=new WeakMap;function xo(e,t,s=!1){const l=s?Ya:t.propsCache,i=l.get(e);if(i)return i;const o=e.props,a={},r=[];let c=!1;if(!ve(e)){const p=b=>{c=!0;const[v,w]=xo(b,t,!0);Ue(a,v),w&&r.push(...w)};!s&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!o&&!c)return Ae(e)&&l.set(e,Gt),Gt;if(ge(o))for(let p=0;p<o.length;p++){const b=ot(o[p]);wo(b)&&(a[b]=Oe)}else if(o)for(const p in o){const b=ot(p);if(wo(b)){const v=o[p],w=a[b]=ge(v)||ve(v)?{type:v}:Ue({},v),$=w.type;let _=!1,C=!0;if(ge($))for(let A=0;A<$.length;++A){const P=$[A],y=ve(P)&&P.name;if(y==="Boolean"){_=!0;break}else y==="String"&&(C=!1)}else _=ve($)&&$.name==="Boolean";w[0]=_,w[1]=C,(_||Pe(w,"default"))&&r.push(b)}}const g=[a,r];return Ae(e)&&l.set(e,g),g}function wo(e){return e[0]!=="$"&&!gs(e)}const Wn=e=>e==="_"||e==="_ctx"||e==="$stable",Qn=e=>ge(e)?e.map(gt):[gt(e)],Xa=(e,t,s)=>{if(t._n)return t;const l=os((...i)=>Qn(t(...i)),s);return l._c=!1,l},ko=(e,t,s)=>{const l=e._ctx;for(const i in e){if(Wn(i))continue;const o=e[i];if(ve(o))t[i]=Xa(i,o,l);else if(o!=null){const a=Qn(o);t[i]=()=>a}}},$o=(e,t)=>{const s=Qn(t);e.slots.default=()=>s},So=(e,t,s)=>{for(const l in t)(s||!Wn(l))&&(e[l]=t[l])},Za=(e,t,s)=>{const l=e.slots=mo();if(e.vnode.shapeFlag&32){const i=t._;i?(So(l,t,s),s&&ml(l,"_",i,!0)):ko(t,l)}else t&&$o(e,t)},er=(e,t,s)=>{const{vnode:l,slots:i}=e;let o=!0,a=Oe;if(l.shapeFlag&32){const r=t._;r?s&&r===1?o=!1:So(i,t,s):(o=!t.$stable,ko(t,i)),a=t}else t&&($o(e,t),a={default:1});if(o)for(const r in i)!Wn(r)&&a[r]==null&&delete i[r]},Xe=cr;function tr(e){return sr(e)}function sr(e,t){const s=Is();s.__VUE__=!0;const{insert:l,remove:i,patchProp:o,createElement:a,createText:r,createComment:c,setText:g,setElementText:p,parentNode:b,nextSibling:v,setScopeId:w=yt,insertStaticContent:$}=e,_=(f,m,T,I=null,L=null,O=null,J=void 0,V=null,D=!!m.dynamicChildren)=>{if(f===m)return;f&&!Bt(f,m)&&(I=oe(f),he(f,L,O,!0),f=null),m.patchFlag===-2&&(D=!1,m.dynamicChildren=null);const{type:F,ref:ce,shapeFlag:ee}=m;switch(F){case Xs:C(f,m,T,I);break;case vt:A(f,m,T,I);break;case Zs:f==null&&P(m,T,I,J);break;case N:ke(f,m,T,I,L,O,J,V,D);break;default:ee&1?S(f,m,T,I,L,O,J,V,D):ee&6?Me(f,m,T,I,L,O,J,V,D):(ee&64||ee&128)&&F.process(f,m,T,I,L,O,J,V,D,E)}ce!=null&&L?$s(ce,f&&f.ref,O,m||f,!m):ce==null&&f&&f.ref!=null&&$s(f.ref,null,O,f,!0)},C=(f,m,T,I)=>{if(f==null)l(m.el=r(m.children),T,I);else{const L=m.el=f.el;m.children!==f.children&&g(L,m.children)}},A=(f,m,T,I)=>{f==null?l(m.el=c(m.children||""),T,I):m.el=f.el},P=(f,m,T,I)=>{[f.el,f.anchor]=$(f.children,m,T,I,f.el,f.anchor)},y=({el:f,anchor:m},T,I)=>{let L;for(;f&&f!==m;)L=v(f),l(f,T,I),f=L;l(m,T,I)},k=({el:f,anchor:m})=>{let T;for(;f&&f!==m;)T=v(f),i(f),f=T;i(m)},S=(f,m,T,I,L,O,J,V,D)=>{if(m.type==="svg"?J="svg":m.type==="math"&&(J="mathml"),f==null)Q(m,T,I,L,O,J,V,D);else{const F=f.el&&f.el._isVueCE?f.el:null;try{F&&F._beginPatch(),Y(f,m,L,O,J,V,D)}finally{F&&F._endPatch()}}},Q=(f,m,T,I,L,O,J,V)=>{let D,F;const{props:ce,shapeFlag:ee,transition:ae,dirs:pe}=f;if(D=f.el=a(f.type,O,ce&&ce.is,ce),ee&8?p(D,f.children):ee&16&&se(f.children,D,null,I,L,Jn(f,O),J,V),pe&&Wt(f,null,I,"created"),te(D,f,f.scopeId,J,I),ce){for(const Le in ce)Le!=="value"&&!gs(Le)&&o(D,Le,null,ce[Le],O,I);"value"in ce&&o(D,"value",null,ce.value,O),(F=ce.onVnodeBeforeMount)&&wt(F,I,f)}pe&&Wt(f,null,I,"beforeMount");const $e=nr(L,ae);$e&&ae.beforeEnter(D),l(D,m,T),((F=ce&&ce.onVnodeMounted)||$e||pe)&&Xe(()=>{F&&wt(F,I,f),$e&&ae.enter(D),pe&&Wt(f,null,I,"mounted")},L)},te=(f,m,T,I,L)=>{if(T&&w(f,T),I)for(let O=0;O<I.length;O++)w(f,I[O]);if(L){let O=L.subTree;if(m===O||Ro(O.type)&&(O.ssContent===m||O.ssFallback===m)){const J=L.vnode;te(f,J,J.scopeId,J.slotScopeIds,L.parent)}}},se=(f,m,T,I,L,O,J,V,D=0)=>{for(let F=D;F<f.length;F++){const ce=f[F]=V?Rt(f[F]):gt(f[F]);_(null,ce,m,T,I,L,O,J,V)}},Y=(f,m,T,I,L,O,J)=>{const V=m.el=f.el;let{patchFlag:D,dynamicChildren:F,dirs:ce}=m;D|=f.patchFlag&16;const ee=f.props||Oe,ae=m.props||Oe;let pe;if(T&&Qt(T,!1),(pe=ae.onVnodeBeforeUpdate)&&wt(pe,T,m,f),ce&&Wt(m,f,T,"beforeUpdate"),T&&Qt(T,!0),(ee.innerHTML&&ae.innerHTML==null||ee.textContent&&ae.textContent==null)&&p(V,""),F?be(f.dynamicChildren,F,V,T,I,Jn(m,L),O):J||j(f,m,V,null,T,I,Jn(m,L),O,!1),D>0){if(D&16)Re(V,ee,ae,T,L);else if(D&2&&ee.class!==ae.class&&o(V,"class",null,ae.class,L),D&4&&o(V,"style",ee.style,ae.style,L),D&8){const $e=m.dynamicProps;for(let Le=0;Le<$e.length;Le++){const Ee=$e[Le],Qe=ee[Ee],He=ae[Ee];(He!==Qe||Ee==="value")&&o(V,Ee,Qe,He,L,T)}}D&1&&f.children!==m.children&&p(V,m.children)}else!J&&F==null&&Re(V,ee,ae,T,L);((pe=ae.onVnodeUpdated)||ce)&&Xe(()=>{pe&&wt(pe,T,m,f),ce&&Wt(m,f,T,"updated")},I)},be=(f,m,T,I,L,O,J)=>{for(let V=0;V<m.length;V++){const D=f[V],F=m[V],ce=D.el&&(D.type===N||!Bt(D,F)||D.shapeFlag&198)?b(D.el):T;_(D,F,ce,null,I,L,O,J,!0)}},Re=(f,m,T,I,L)=>{if(m!==T){if(m!==Oe)for(const O in m)!gs(O)&&!(O in T)&&o(f,O,m[O],null,L,I);for(const O in T){if(gs(O))continue;const J=T[O],V=m[O];J!==V&&O!=="value"&&o(f,O,V,J,L,I)}"value"in T&&o(f,"value",m.value,T.value,L)}},ke=(f,m,T,I,L,O,J,V,D)=>{const F=m.el=f?f.el:r(""),ce=m.anchor=f?f.anchor:r("");let{patchFlag:ee,dynamicChildren:ae,slotScopeIds:pe}=m;pe&&(V=V?V.concat(pe):pe),f==null?(l(F,T,I),l(ce,T,I),se(m.children||[],T,ce,L,O,J,V,D)):ee>0&&ee&64&&ae&&f.dynamicChildren&&f.dynamicChildren.length===ae.length?(be(f.dynamicChildren,ae,T,L,O,J,V),(m.key!=null||L&&m===L.subTree)&&Co(f,m,!0)):j(f,m,T,ce,L,O,J,V,D)},Me=(f,m,T,I,L,O,J,V,D)=>{m.slotScopeIds=V,f==null?m.shapeFlag&512?L.ctx.activate(m,T,I,J,D):Ce(m,T,I,L,O,J,D):we(f,m,D)},Ce=(f,m,T,I,L,O,J)=>{const V=f.component=mr(f,I,L);if(jn(f)&&(V.ctx.renderer=E),_r(V,!1,J),V.asyncDep){if(L&&L.registerDep(V,z,J),!f.el){const D=V.subTree=Se(vt);A(null,D,m,T),f.placeholder=D.el}}else z(V,f,m,T,L,O,J)},we=(f,m,T)=>{const I=m.component=f.component;if(Qa(f,m,T))if(I.asyncDep&&!I.asyncResolved){B(I,m,T);return}else I.next=m,I.update();else m.el=f.el,I.vnode=m},z=(f,m,T,I,L,O,J)=>{const V=()=>{if(f.isMounted){let{next:ee,bu:ae,u:pe,parent:$e,vnode:Le}=f;{const tt=To(f);if(tt){ee&&(ee.el=Le.el,B(f,ee,J)),tt.asyncDep.then(()=>{Xe(()=>{f.isUnmounted||F()},L)});return}}let Ee=ee,Qe;Qt(f,!1),ee?(ee.el=Le.el,B(f,ee,J)):ee=Le,ae&&mn(ae),(Qe=ee.props&&ee.props.onVnodeBeforeUpdate)&&wt(Qe,$e,ee,Le),Qt(f,!0);const He=po(f),nt=f.subTree;f.subTree=He,_(nt,He,b(nt.el),oe(nt),f,L,O),ee.el=He.el,Ee===null&&Vn(f,He.el),pe&&Xe(pe,L),(Qe=ee.props&&ee.props.onVnodeUpdated)&&Xe(()=>wt(Qe,$e,ee,Le),L)}else{let ee;const{el:ae,props:pe}=m,{bm:$e,m:Le,parent:Ee,root:Qe,type:He}=f,nt=as(m);Qt(f,!1),$e&&mn($e),!nt&&(ee=pe&&pe.onVnodeBeforeMount)&&wt(ee,Ee,m),Qt(f,!0);{Qe.ce&&Qe.ce._hasShadowRoot()&&Qe.ce._injectChildStyle(He);const tt=f.subTree=po(f);_(null,tt,T,I,f,L,O),m.el=tt.el}if(Le&&Xe(Le,L),!nt&&(ee=pe&&pe.onVnodeMounted)){const tt=m;Xe(()=>wt(ee,Ee,tt),L)}(m.shapeFlag&256||Ee&&as(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&f.a&&Xe(f.a,L),f.isMounted=!0,m=T=I=null}};f.scope.on();const D=f.effect=new kl(V);f.scope.off();const F=f.update=D.run.bind(D),ce=f.job=D.runIfDirty.bind(D);ce.i=f,ce.id=f.uid,D.scheduler=()=>Fn(ce),Qt(f,!0),F()},B=(f,m,T)=>{m.component=f;const I=f.vnode.props;f.vnode=m,f.next=null,Ga(f,m.props,I,T),er(f,m.children,T),mt(),Vl(f),bt()},j=(f,m,T,I,L,O,J,V,D=!1)=>{const F=f&&f.children,ce=f?f.shapeFlag:0,ee=m.children,{patchFlag:ae,shapeFlag:pe}=m;if(ae>0){if(ae&128){xe(F,ee,T,I,L,O,J,V,D);return}else if(ae&256){_e(F,ee,T,I,L,O,J,V,D);return}}pe&8?(ce&16&&U(F,L,O),ee!==F&&p(T,ee)):ce&16?pe&16?xe(F,ee,T,I,L,O,J,V,D):U(F,L,O,!0):(ce&8&&p(T,""),pe&16&&se(ee,T,I,L,O,J,V,D))},_e=(f,m,T,I,L,O,J,V,D)=>{f=f||Gt,m=m||Gt;const F=f.length,ce=m.length,ee=Math.min(F,ce);let ae;for(ae=0;ae<ee;ae++){const pe=m[ae]=D?Rt(m[ae]):gt(m[ae]);_(f[ae],pe,T,null,L,O,J,V,D)}F>ce?U(f,L,O,!0,!1,ee):se(m,T,I,L,O,J,V,D,ee)},xe=(f,m,T,I,L,O,J,V,D)=>{let F=0;const ce=m.length;let ee=f.length-1,ae=ce-1;for(;F<=ee&&F<=ae;){const pe=f[F],$e=m[F]=D?Rt(m[F]):gt(m[F]);if(Bt(pe,$e))_(pe,$e,T,null,L,O,J,V,D);else break;F++}for(;F<=ee&&F<=ae;){const pe=f[ee],$e=m[ae]=D?Rt(m[ae]):gt(m[ae]);if(Bt(pe,$e))_(pe,$e,T,null,L,O,J,V,D);else break;ee--,ae--}if(F>ee){if(F<=ae){const pe=ae+1,$e=pe<ce?m[pe].el:I;for(;F<=ae;)_(null,m[F]=D?Rt(m[F]):gt(m[F]),T,$e,L,O,J,V,D),F++}}else if(F>ae)for(;F<=ee;)he(f[F],L,O,!0),F++;else{const pe=F,$e=F,Le=new Map;for(F=$e;F<=ae;F++){const ne=m[F]=D?Rt(m[F]):gt(m[F]);ne.key!=null&&Le.set(ne.key,F)}let Ee,Qe=0;const He=ae-$e+1;let nt=!1,tt=0;const X=new Array(He);for(F=0;F<He;F++)X[F]=0;for(F=pe;F<=ee;F++){const ne=f[F];if(Qe>=He){he(ne,L,O,!0);continue}let fe;if(ne.key!=null)fe=Le.get(ne.key);else for(Ee=$e;Ee<=ae;Ee++)if(X[Ee-$e]===0&&Bt(ne,m[Ee])){fe=Ee;break}fe===void 0?he(ne,L,O,!0):(X[fe-$e]=F+1,fe>=tt?tt=fe:nt=!0,_(ne,m[fe],T,null,L,O,J,V,D),Qe++)}const M=nt?lr(X):Gt;for(Ee=M.length-1,F=He-1;F>=0;F--){const ne=$e+F,fe=m[ne],ut=m[ne+1],lt=ne+1<ce?ut.el||Po(ut):I;X[F]===0?_(null,fe,T,lt,L,O,J,V,D):nt&&(Ee<0||F!==M[Ee]?ie(fe,T,lt,2):Ee--)}}},ie=(f,m,T,I,L=null)=>{const{el:O,type:J,transition:V,children:D,shapeFlag:F}=f;if(F&6){ie(f.component.subTree,m,T,I);return}if(F&128){f.suspense.move(m,T,I);return}if(F&64){J.move(f,m,T,E);return}if(J===N){l(O,m,T);for(let ee=0;ee<D.length;ee++)ie(D[ee],m,T,I);l(f.anchor,m,T);return}if(J===Zs){y(f,m,T);return}if(I!==2&&F&1&&V)if(I===0)V.beforeEnter(O),l(O,m,T),Xe(()=>V.enter(O),L);else{const{leave:ee,delayLeave:ae,afterLeave:pe}=V,$e=()=>{f.ctx.isUnmounted?i(O):l(O,m,T)},Le=()=>{O._isLeaving&&O[ma](!0),ee(O,()=>{$e(),pe&&pe()})};ae?ae(O,$e,Le):Le()}else l(O,m,T)},he=(f,m,T,I=!1,L=!1)=>{const{type:O,props:J,ref:V,children:D,dynamicChildren:F,shapeFlag:ce,patchFlag:ee,dirs:ae,cacheIndex:pe}=f;if(ee===-2&&(L=!1),V!=null&&(mt(),$s(V,null,T,f,!0),bt()),pe!=null&&(m.renderCache[pe]=void 0),ce&256){m.ctx.deactivate(f);return}const $e=ce&1&&ae,Le=!as(f);let Ee;if(Le&&(Ee=J&&J.onVnodeBeforeUnmount)&&wt(Ee,m,f),ce&6)le(f.component,T,I);else{if(ce&128){f.suspense.unmount(T,I);return}$e&&Wt(f,null,m,"beforeUnmount"),ce&64?f.type.remove(f,m,T,E,I):F&&!F.hasOnce&&(O!==N||ee>0&&ee&64)?U(F,m,T,!1,!0):(O===N&&ee&384||!L&&ce&16)&&U(D,m,T),I&&re(f)}(Le&&(Ee=J&&J.onVnodeUnmounted)||$e)&&Xe(()=>{Ee&&wt(Ee,m,f),$e&&Wt(f,null,m,"unmounted")},T)},re=f=>{const{type:m,el:T,anchor:I,transition:L}=f;if(m===N){q(T,I);return}if(m===Zs){k(f);return}const O=()=>{i(T),L&&!L.persisted&&L.afterLeave&&L.afterLeave()};if(f.shapeFlag&1&&L&&!L.persisted){const{leave:J,delayLeave:V}=L,D=()=>J(T,O);V?V(f.el,O,D):D()}else O()},q=(f,m)=>{let T;for(;f!==m;)T=v(f),i(f),f=T;i(m)},le=(f,m,T)=>{const{bum:I,scope:L,job:O,subTree:J,um:V,m:D,a:F}=f;Eo(D),Eo(F),I&&mn(I),L.stop(),O&&(O.flags|=8,he(J,f,m,T)),V&&Xe(V,m),Xe(()=>{f.isUnmounted=!0},m)},U=(f,m,T,I=!1,L=!1,O=0)=>{for(let J=O;J<f.length;J++)he(f[J],m,T,I,L)},oe=f=>{if(f.shapeFlag&6)return oe(f.component.subTree);if(f.shapeFlag&128)return f.suspense.next();const m=v(f.anchor||f.el),T=m&&m[ga];return T?v(T):m};let K=!1;const Z=(f,m,T)=>{let I;f==null?m._vnode&&(he(m._vnode,null,null,!0),I=m._vnode.component):_(m._vnode||null,f,m,null,null,null,T),m._vnode=f,K||(K=!0,Vl(I),zl(),K=!1)},E={p:_,um:he,m:ie,r:re,mt:Ce,mc:se,pc:j,pbc:be,n:oe,o:e};return{render:Z,hydrate:void 0,createApp:Ha(Z)}}function Jn({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 nr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Co(e,t,s=!1){const l=e.children,i=t.children;if(ge(l)&&ge(i))for(let o=0;o<l.length;o++){const a=l[o];let r=i[o];r.shapeFlag&1&&!r.dynamicChildren&&((r.patchFlag<=0||r.patchFlag===32)&&(r=i[o]=Rt(i[o]),r.el=a.el),!s&&r.patchFlag!==-2&&Co(a,r)),r.type===Xs&&(r.patchFlag===-1&&(r=i[o]=Rt(r)),r.el=a.el),r.type===vt&&!r.el&&(r.el=a.el)}}function lr(e){const t=e.slice(),s=[0];let l,i,o,a,r;const c=e.length;for(l=0;l<c;l++){const g=e[l];if(g!==0){if(i=s[s.length-1],e[i]<g){t[l]=i,s.push(l);continue}for(o=0,a=s.length-1;o<a;)r=o+a>>1,e[s[r]]<g?o=r+1:a=r;g<e[s[o]]&&(o>0&&(t[l]=s[o-1]),s[o]=l)}}for(o=s.length,a=s[o-1];o-- >0;)s[o]=a,a=t[a];return s}function To(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:To(t)}function Eo(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Po(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Po(t.subTree):null}const Ro=e=>e.__isSuspense;let Gn=0;const or={name:"Suspense",__isSuspense:!0,process(e,t,s,l,i,o,a,r,c,g){if(e==null)ir(t,s,l,i,o,a,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}ar(e,t,s,l,i,a,r,c,g)}},hydrate:rr,normalize:ur};function Ts(e,t){const s=e.props&&e.props[t];ve(s)&&s()}function ir(e,t,s,l,i,o,a,r,c){const{p:g,o:{createElement:p}}=c,b=p("div"),v=e.suspense=Mo(e,i,l,t,b,s,o,a,r,c);g(null,v.pendingBranch=e.ssContent,b,null,l,v,o,a),v.deps>0?(Ts(e,"onPending"),Ts(e,"onFallback"),g(null,e.ssFallback,t,s,l,null,o,a),us(v,e.ssFallback)):v.resolve(!1,!0)}function ar(e,t,s,l,i,o,a,r,{p:c,um:g,o:{createElement:p}}){const b=t.suspense=e.suspense;b.vnode=t,t.el=e.el;const v=t.ssContent,w=t.ssFallback,{activeBranch:$,pendingBranch:_,isInFallback:C,isHydrating:A}=b;if(_)b.pendingBranch=v,Bt(_,v)?(c(_,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0?b.resolve():C&&(A||(c($,w,s,l,i,null,o,a,r),us(b,w)))):(b.pendingId=Gn++,A?(b.isHydrating=!1,b.activeBranch=_):g(_,i,b),b.deps=0,b.effects.length=0,b.hiddenContainer=p("div"),C?(c(null,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0?b.resolve():(c($,w,s,l,i,null,o,a,r),us(b,w))):$&&Bt($,v)?(c($,v,s,l,i,b,o,a,r),b.resolve(!0)):(c(null,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0&&b.resolve()));else if($&&Bt($,v))c($,v,s,l,i,b,o,a,r),us(b,v);else if(Ts(t,"onPending"),b.pendingBranch=v,v.shapeFlag&512?b.pendingId=v.component.suspenseId:b.pendingId=Gn++,c(null,v,b.hiddenContainer,null,i,b,o,a,r),b.deps<=0)b.resolve();else{const{timeout:P,pendingId:y}=b;P>0?setTimeout(()=>{b.pendingId===y&&b.fallback(w)},P):P===0&&b.fallback(w)}}function Mo(e,t,s,l,i,o,a,r,c,g,p=!1){const{p:b,m:v,um:w,n:$,o:{parentNode:_,remove:C}}=g;let A;const P=dr(e);P&&t&&t.pendingBranch&&(A=t.pendingId,t.deps++);const y=e.props?Si(e.props.timeout):void 0,k=o,S={vnode:e,parent:t,parentComponent:s,namespace:a,container:l,hiddenContainer:i,deps:0,pendingId:Gn++,timeout:typeof y=="number"?y:-1,activeBranch:null,pendingBranch:null,isInFallback:!p,isHydrating:p,isUnmounted:!1,effects:[],resolve(Q=!1,te=!1){const{vnode:se,activeBranch:Y,pendingBranch:be,pendingId:Re,effects:ke,parentComponent:Me,container:Ce,isInFallback:we}=S;let z=!1;S.isHydrating?S.isHydrating=!1:Q||(z=Y&&be.transition&&be.transition.mode==="out-in",z&&(Y.transition.afterLeave=()=>{Re===S.pendingId&&(v(be,Ce,o===k?$(Y):o,0),In(ke),we&&se.ssFallback&&(se.ssFallback.el=null))}),Y&&(_(Y.el)===Ce&&(o=$(Y)),w(Y,Me,S,!0),!z&&we&&se.ssFallback&&Xe(()=>se.ssFallback.el=null,S)),z||v(be,Ce,o,0)),us(S,be),S.pendingBranch=null,S.isInFallback=!1;let B=S.parent,j=!1;for(;B;){if(B.pendingBranch){B.effects.push(...ke),j=!0;break}B=B.parent}!j&&!z&&In(ke),S.effects=[],P&&t&&t.pendingBranch&&A===t.pendingId&&(t.deps--,t.deps===0&&!te&&t.resolve()),Ts(se,"onResolve")},fallback(Q){if(!S.pendingBranch)return;const{vnode:te,activeBranch:se,parentComponent:Y,container:be,namespace:Re}=S;Ts(te,"onFallback");const ke=$(se),Me=()=>{S.isInFallback&&(b(null,Q,be,ke,Y,null,Re,r,c),us(S,Q))},Ce=Q.transition&&Q.transition.mode==="out-in";Ce&&(se.transition.afterLeave=Me),S.isInFallback=!0,w(se,Y,null,!0),Ce||Me()},move(Q,te,se){S.activeBranch&&v(S.activeBranch,Q,te,se),S.container=Q},next(){return S.activeBranch&&$(S.activeBranch)},registerDep(Q,te,se){const Y=!!S.pendingBranch;Y&&S.deps++;const be=Q.vnode.el;Q.asyncDep.catch(Re=>{ss(Re,Q,0)}).then(Re=>{if(Q.isUnmounted||S.isUnmounted||S.pendingId!==Q.suspenseId)return;Q.asyncResolved=!0;const{vnode:ke}=Q;Zn(Q,Re),be&&(ke.el=be);const Me=!be&&Q.subTree.el;te(Q,ke,_(be||Q.subTree.el),be?null:$(Q.subTree),S,a,se),Me&&(ke.placeholder=null,C(Me)),Vn(Q,ke.el),Y&&--S.deps===0&&S.resolve()})},unmount(Q,te){S.isUnmounted=!0,S.activeBranch&&w(S.activeBranch,s,Q,te),S.pendingBranch&&w(S.pendingBranch,s,Q,te)}};return S}function rr(e,t,s,l,i,o,a,r,c){const g=t.suspense=Mo(t,l,s,e.parentNode,document.createElement("div"),null,i,o,a,r,!0),p=c(e,g.pendingBranch=t.ssContent,s,g,o,a);return g.deps===0&&g.resolve(!1,!0),p}function ur(e){const{shapeFlag:t,children:s}=e,l=t&32;e.ssContent=Ao(l?s.default:s),e.ssFallback=l?Ao(s.fallback):Se(vt)}function Ao(e){let t;if(ve(e)){const s=cs&&e._c;s&&(e._d=!1,u()),e=e(),s&&(e._d=!0,t=et,Lo())}return ge(e)&&(e=Va(e)),e=gt(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(s=>s!==e)),e}function cr(e,t){t&&t.pendingBranch?ge(e)?t.effects.push(...e):t.effects.push(e):In(e)}function us(e,t){e.activeBranch=t;const{vnode:s,parentComponent:l}=e;let i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;s.el=i,l&&l.subTree===s&&(l.vnode.el=i,Vn(l,i))}function dr(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const N=Symbol.for("v-fgt"),Xs=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),Zs=Symbol.for("v-stc"),Es=[];let et=null;function u(e=!1){Es.push(et=e?null:[])}function Lo(){Es.pop(),et=Es[Es.length-1]||null}let cs=1;function Oo(e,t=!1){cs+=e,e<0&&et&&t&&(et.hasOnce=!0)}function Do(e){return e.dynamicChildren=cs>0?et||Gt:null,Lo(),cs>0&&et&&et.push(e),e}function d(e,t,s,l,i,o){return Do(n(e,t,s,l,i,o,!0))}function st(e,t,s,l,i){return Do(Se(e,t,s,l,i,!0))}function en(e){return e?e.__v_isVNode===!0:!1}function Bt(e,t){return e.type===t.type&&e.key===t.key}const Fo=({key:e})=>e??null,tn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Ie(e)||Ke(e)||ve(e)?{i:Ge,r:e,k:t,f:!!s}:e:null);function n(e,t=null,s=null,l=0,i=null,o=e===N?0:1,a=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Fo(t),ref:t&&tn(t),scopeId:Ql,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:i,dynamicChildren:null,appContext:null,ctx:Ge};return r?(Yn(c,s),o&128&&e.normalize(c)):s&&(c.shapeFlag|=Ie(s)?8:16),cs>0&&!a&&et&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&et.push(c),c}const Se=fr;function fr(e,t=null,s=null,l=0,i=null,o=!1){if((!e||e===so)&&(e=vt),en(e)){const r=ds(e,t,!0);return s&&Yn(r,s),cs>0&&!o&&et&&(r.shapeFlag&6?et[et.indexOf(e)]=r:et.push(r)),r.patchFlag=-2,r}if(Cr(e)&&(e=e.__vccOpts),t){t=hr(t);let{class:r,style:c}=t;r&&!Ie(r)&&(t.class=R(r)),Ae(c)&&(Ln(c)&&!ge(c)&&(c=Ue({},c)),t.style=qe(c))}const a=Ie(e)?1:Ro(e)?128:ya(e)?64:Ae(e)?4:ve(e)?2:0;return n(e,t,s,l,i,a,o,!0)}function hr(e){return e?Ln(e)||bo(e)?Ue({},e):e:null}function ds(e,t,s=!1,l=!1){const{props:i,ref:o,patchFlag:a,children:r,transition:c}=e,g=t?vr(i||{},t):i,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Fo(g),ref:t&&t.ref?s&&o?ge(o)?o.concat(tn(t)):[o,tn(t)]:tn(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!==N?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ds(e.ssContent),ssFallback:e.ssFallback&&ds(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&l&&Bn(p,c.clone(p)),p}function me(e=" ",t=0){return Se(Xs,null,e,t)}function pr(e,t){const s=Se(Zs,null,e);return s.staticCount=t,s}function G(e="",t=!1){return t?(u(),st(vt,null,e)):Se(vt,null,e)}function gt(e){return e==null||typeof e=="boolean"?Se(vt):ge(e)?Se(N,null,e.slice()):en(e)?Rt(e):Se(Xs,null,String(e))}function Rt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ds(e)}function Yn(e,t){let s=0;const{shapeFlag:l}=e;if(t==null)t=null;else if(ge(t))s=16;else if(typeof t=="object")if(l&65){const i=t.default;i&&(i._c&&(i._d=!1),Yn(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!bo(t)?t._ctx=Ge:i===3&&Ge&&(Ge.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ve(t)?(t={default:t,_ctx:Ge},s=32):(t=String(t),l&64?(s=16,t=[me(t)]):s=8);e.children=t,e.shapeFlag|=s}function vr(...e){const t={};for(let s=0;s<e.length;s++){const l=e[s];for(const i in l)if(i==="class")t.class!==l.class&&(t.class=R([t.class,l.class]));else if(i==="style")t.style=qe([t.style,l.style]);else if(Os(i)){const o=t[i],a=l[i];a&&o!==a&&!(ge(o)&&o.includes(a))&&(t[i]=o?[].concat(o,a):a)}else i!==""&&(t[i]=l[i])}return t}function wt(e,t,s,l=null){_t(e,t,7,[s,l])}const gr=fo();let yr=0;function mr(e,t,s){const l=e.type,i=(t?t.appContext:e.appContext)||gr,o={uid:yr++,vnode:e,type:l,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ai(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:xo(l,i),emitsOptions:ho(l,i),emit:null,emitted:null,propsDefaults:Oe,inheritAttrs:l.inheritAttrs,ctx:Oe,data:Oe,props:Oe,attrs:Oe,slots:Oe,refs:Oe,setupState:Oe,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=qa.bind(null,o),e.ce&&e.ce(o),o}let Ve=null;const br=()=>Ve||Ge;let sn,Xn;{const e=Is(),t=(s,l)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(l),o=>{i.length>1?i.forEach(a=>a(o)):i[0](o)}};sn=t("__VUE_INSTANCE_SETTERS__",s=>Ve=s),Xn=t("__VUE_SSR_SETTERS__",s=>fs=s)}const Ps=e=>{const t=Ve;return sn(e),e.scope.on(),()=>{e.scope.off(),sn(t)}},Io=()=>{Ve&&Ve.scope.off(),sn(null)};function Bo(e){return e.vnode.shapeFlag&4}let fs=!1;function _r(e,t=!1,s=!1){t&&Xn(t);const{props:l,children:i}=e.vnode,o=Bo(e);Ja(e,l,o,t),Za(e,i,s||t);const a=o?xr(e,t):void 0;return t&&Xn(!1),a}function xr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Oa);const{setup:l}=s;if(l){mt();const i=e.setupContext=l.length>1?kr(e):null,o=Ps(e),a=ts(l,e,0,[e.props,i]),r=vl(a);if(bt(),o(),(r||e.sp)&&!as(e)&&Nn(e),r){if(a.then(Io,Io),t)return a.then(c=>{Zn(e,c)}).catch(c=>{ss(c,e,0)});e.asyncDep=a}else Zn(e,a)}else No(e)}function Zn(e,t,s){ve(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ae(t)&&(e.setupState=Hl(t)),No(e)}function No(e,t,s){const l=e.type;e.render||(e.render=l.render||yt);{const i=Ps(e);mt();try{Da(e)}finally{bt(),i()}}}const wr={get(e,t){return We(e,"get",""),e[t]}};function kr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,wr),slots:e.slots,emit:e.emit,expose:t}}function el(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Hl(Zi(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Ss)return Ss[s](e)},has(t,s){return s in t||s in Ss}})):e.proxy}const $r=/(?:^|[-_])\w/g,Sr=e=>e.replace($r,t=>t.toUpperCase()).replace(/[-_]/g,"");function jo(e,t=!0){return ve(e)?e.displayName||e.name:e.name||t&&e.__name}function Ho(e,t,s=!1){let l=jo(t);if(!l&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(l=i[1])}if(!l&&e){const i=o=>{for(const a in o)if(o[a]===t)return a};l=i(e.components)||e.parent&&i(e.parent.type.components)||i(e.appContext.components)}return l?Sr(l):s?"App":"Anonymous"}function Cr(e){return ve(e)&&"__vccOpts"in e}const H=(e,t)=>la(e,t,fs),Tr="3.5.29";let tl;const Uo=typeof window<"u"&&window.trustedTypes;if(Uo)try{tl=Uo.createPolicy("vue",{createHTML:e=>e})}catch{}const qo=tl?e=>tl.createHTML(e):e=>e,Er="http://www.w3.org/2000/svg",Pr="http://www.w3.org/1998/Math/MathML",Mt=typeof document<"u"?document:null,Ko=Mt&&Mt.createElement("template"),Rr={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 i=t==="svg"?Mt.createElementNS(Er,e):t==="mathml"?Mt.createElementNS(Pr,e):s?Mt.createElement(e,{is:s}):Mt.createElement(e);return e==="select"&&l&&l.multiple!=null&&i.setAttribute("multiple",l.multiple),i},createText:e=>Mt.createTextNode(e),createComment:e=>Mt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Mt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,l,i,o){const a=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Ko.innerHTML=qo(l==="svg"?`<svg>${e}</svg>`:l==="mathml"?`<math>${e}</math>`:e);const r=Ko.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[a?a.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Mr=Symbol("_vtc");function Ar(e,t,s){const l=e[Mr];l&&(t=(t?[t,...l]:[...l]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Vo=Symbol("_vod"),Lr=Symbol("_vsh"),Or=Symbol(""),Dr=/(?:^|;)\s*display\s*:/;function Fr(e,t,s){const l=e.style,i=Ie(s);let o=!1;if(s&&!i){if(t)if(Ie(t))for(const a of t.split(";")){const r=a.slice(0,a.indexOf(":")).trim();s[r]==null&&nn(l,r,"")}else for(const a in t)s[a]==null&&nn(l,a,"");for(const a in s)a==="display"&&(o=!0),nn(l,a,s[a])}else if(i){if(t!==s){const a=l[Or];a&&(s+=";"+a),l.cssText=s,o=Dr.test(s)}}else t&&e.removeAttribute("style");Vo in e&&(e[Vo]=o?l.display:"",e[Lr]&&(l.display="none"))}const zo=/\s*!important$/;function nn(e,t,s){if(ge(s))s.forEach(l=>nn(e,t,l));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const l=Ir(e,t);zo.test(s)?e.setProperty(At(l),s.replace(zo,""),"important"):e[l]=s}}const Wo=["Webkit","Moz","ms"],sl={};function Ir(e,t){const s=sl[t];if(s)return s;let l=ot(t);if(l!=="filter"&&l in e)return sl[t]=l;l=Fs(l);for(let i=0;i<Wo.length;i++){const o=Wo[i]+l;if(o in e)return sl[t]=o}return t}const Qo="http://www.w3.org/1999/xlink";function Jo(e,t,s,l,i,o=Ri(t)){l&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(Qo,t.slice(6,t.length)):e.setAttributeNS(Qo,t,s):s==null||o&&!_l(s)?e.removeAttribute(t):e.setAttribute(t,o?"":ct(s)?String(s):s)}function Go(e,t,s,l,i){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?qo(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 a=!1;if(s===""||s==null){const r=typeof e[t];r==="boolean"?s=_l(s):s==null&&r==="string"?(s="",a=!0):r==="number"&&(s=0,a=!0)}try{e[t]=s}catch{}a&&e.removeAttribute(i||t)}function Br(e,t,s,l){e.addEventListener(t,s,l)}function Nr(e,t,s,l){e.removeEventListener(t,s,l)}const Yo=Symbol("_vei");function jr(e,t,s,l,i=null){const o=e[Yo]||(e[Yo]={}),a=o[t];if(l&&a)a.value=l;else{const[r,c]=Hr(t);if(l){const g=o[t]=Kr(l,i);Br(e,r,g,c)}else a&&(Nr(e,r,a,c),o[t]=void 0)}}const Xo=/(?:Once|Passive|Capture)$/;function Hr(e){let t;if(Xo.test(e)){t={};let l;for(;l=e.match(Xo);)e=e.slice(0,e.length-l[0].length),t[l[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):At(e.slice(2)),t]}let nl=0;const Ur=Promise.resolve(),qr=()=>nl||(Ur.then(()=>nl=0),nl=Date.now());function Kr(e,t){const s=l=>{if(!l._vts)l._vts=Date.now();else if(l._vts<=s.attached)return;_t(Vr(l,s.value),t,5,[l])};return s.value=e,s.attached=qr(),s}function Vr(e,t){if(ge(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(l=>i=>!i._stopped&&l&&l(i))}else return t}const Zo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zr=(e,t,s,l,i,o)=>{const a=i==="svg";t==="class"?Ar(e,l,a):t==="style"?Fr(e,s,l):Os(t)?pn(t)||jr(e,t,s,l,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Wr(e,t,l,a))?(Go(e,t,l),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Jo(e,t,l,a,o,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ie(l))?Go(e,ot(t),l,o,t):(t==="true-value"?e._trueValue=l:t==="false-value"&&(e._falseValue=l),Jo(e,t,l,a))};function Wr(e,t,s,l){if(l)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zo(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 i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Zo(t)&&Ie(s)?!1:t in e}const Qr=["ctrl","shift","alt","meta"],Jr={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)=>Qr.some(s=>e[`${s}Key`]&&!t.includes(s))},at=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),l=t.join(".");return s[l]||(s[l]=((i,...o)=>{for(let a=0;a<t.length;a++){const r=Jr[t[a]];if(r&&r(i,t))return}return e(i,...o)}))},Gr={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Rs=(e,t)=>{const s=e._withKeys||(e._withKeys={}),l=t.join(".");return s[l]||(s[l]=(i=>{if(!("key"in i))return;const o=At(i.key);if(t.some(a=>a===o||Gr[a]===o))return e(i)}))},Yr=Ue({patchProp:zr},Rr);let ei;function Xr(){return ei||(ei=tr(Yr))}const Zr=((...e)=>{const t=Xr().createApp(...e),{mount:s}=t;return t.mount=l=>{const i=tu(l);if(!i)return;const o=t._component;!ve(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const a=s(i,!1,eu(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},t});function eu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function tu(e){return Ie(e)?document.querySelector(e):e}function su(e,t){const s=e||(typeof window<"u"?window.location.origin:"");if(!t)return{baseUrl:s};const l={headers:{Authorization:`Bearer ${t}`}};return{baseUrl:s,beforeSubscribe(i){return l},beforeUnsubscribe(i){return l}}}async function nu(){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 lu(e){let t=null,s=null,l=!1;return{subscribe:async()=>{try{const a=await nu();if(!a)throw new Error("Transmit client not available (neither window.Transmit nor @adonisjs/transmit-client)");if(l)return;t=new a(su(e.baseUrl,e.authToken)),s=t.subscription(e.channelName),s.onMessage(r=>{l||e.onMessage(r)}),await s.create()}catch(a){e.onError?.(a)}},unsubscribe:async()=>{l=!0;try{await s?.delete(),s=null,t=null}catch{}}}}function ou(e){let t=!1;const s=lu({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 ln extends Error{status;constructor(t=403){super(`Unauthorized (HTTP ${t})`),this.name="UnauthorizedError",this.status=t}}class iu extends Error{status;body;constructor(t,s){super(`API error (HTTP ${t})`),this.name="ApiError",this.status=t,this.body=s}}class ll{baseUrl;authToken;constructor(t){this.baseUrl=t.baseUrl.replace(/\/+$/,""),this.authToken=t.authToken}async fetch(t,s){const i={...{Accept:"application/json",...this.authToken?{Authorization:`Bearer ${this.authToken}`}:{}},...s?.headers},o=await globalThis.fetch(`${this.baseUrl}${t}`,{...s,headers:i,credentials:this.authToken?"omit":"same-origin"});if(s?.signal?.aborted)throw new DOMException("The operation was aborted.","AbortError");if(o.status===401||o.status===403)throw new ln(o.status);if(!o.ok){const a=await o.text().catch(()=>"");throw new iu(o.status,a)}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 on="ss-dash-theme",ol="ss-theme-change";function Ms(){if(typeof window>"u")return"light";const e=localStorage.getItem(on);return e==="dark"||e==="light"?e:window.matchMedia?.("(prefers-color-scheme: dark)").matches?"dark":"light"}function au(e){typeof window>"u"||(localStorage.setItem(on,e),window.dispatchEvent(new CustomEvent(ol,{detail:e})))}function ru(){const t=Ms()==="dark"?"light":"dark";return au(t),t}function ti(e){if(typeof window>"u")return()=>{};const t=o=>{const a=o.detail;(a==="dark"||a==="light")&&e(a)},s=o=>{if(o.key===on){const a=o.newValue;e(a==="dark"||a==="light"?a:Ms())}},l=window.matchMedia("(prefers-color-scheme: dark)"),i=o=>{localStorage.getItem(on)||e(o.matches?"dark":"light")};return window.addEventListener(ol,t),window.addEventListener("storage",s),l.addEventListener("change",i),()=>{window.removeEventListener(ol,t),window.removeEventListener("storage",s),l.removeEventListener("change",i)}}const uu={color:"#34d399",fillOpacityTop:.25,fillOpacityBottom:.02,strokeWidth:1.5,width:120,height:32,padding:2};function cu(e){return{...uu,...e}}let du=0;function fu(){return`ss-grad-${du++}`}function hu(e){if(e.length===0)return null;let t=e[0],s=e[0],l=e[0];for(let i=1;i<e.length;i++){const o=e[i];o<t&&(t=o),o>s&&(s=o),l+=o}return{min:t,max:s,avg:l/e.length}}function pu(e,t){if(e.length<2)return null;const s=cu(t),l=hu(e),i=l.max-l.min||1,o=s.width-s.padding*2,a=s.height-s.padding*2,r=s.padding,c=e.length,g=Array.from({length:c});for(let _=0;_<c;_++){const C=r+_/(c-1)*o,A=r+a-(e[_]-l.min)/i*a;g[_]=`${C.toFixed(1)},${A.toFixed(1)}`}const p=g.join(" "),b=(r+o).toFixed(1),v=(r+a).toFixed(1),w=r.toFixed(1),$=`M${g[0]} `+g.slice(1).map(_=>`L${_}`).join(" ")+` L${b},${v} L${w},${v} Z`;return{points:p,areaPath:$,gradientId:fu(),options:s,stats:l}}const vu=5e3,si=1e4,ni=100,gu=500;function yu(e){return'"'+(e.length>40?e.slice(0,40)+"...":e)+'"'}function mu(e,t,s){if(e.length===0)return"[]";const l=e.slice(0,3).map(a=>s(a,30)),i=e.length>3?", ..."+e.length+" items":"",o="["+l.join(", ")+i+"]";return o.length>t?"["+e.length+" items]":o}function bu(e,t,s){const l=Object.keys(e);if(l.length===0)return"{}";const i=[];for(let c=0;c<Math.min(l.length,4);c++)i.push(l[c]+": "+s(e[l[c]],30));const o=l.length>4?", ...+"+(l.length-4):"",a="{ "+i.join(", ")+o+" }";return a.length<=t?a:"{ "+(l.slice(0,6).join(", ")+(l.length>6?", ...":""))+" }"}function _u(e){if(!e&&e!==0)return"-";const t=Math.floor(e),s=Math.floor(t/86400),l=Math.floor(t%86400/3600),i=Math.floor(t%3600/60);return s>0?`${s}d ${l}h`:l>0?`${l}h ${i}m`:i>0?`${i}m ${t%60}s`:`${t}s`}function Nt(e){return e>=1e3?`${(e/1e3).toFixed(2)}s`:e>=1?`${e.toFixed(0)}ms`:`${e.toFixed(2)}ms`}function li(e){return/([+-]\d{2}:?\d{2}|Z)\s*$/.test(e)?e:e+"Z"}function jt(e){if(!e)return"-";const t=typeof e=="string"?new Date(li(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 kt(e){if(!e)return"-";const t=typeof e=="string"?new Date(li(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 xu(e){return e>gu?"very-slow":e>ni?"slow":"normal"}function il(e,t="ss-dash"){const s=xu(e);return s==="very-slow"?`${t}-very-slow`:s==="slow"?`${t}-slow`:""}function an(e,t=100){return e===null?"null":e===void 0?"-":typeof e=="string"?yu(e):typeof e=="number"||typeof e=="boolean"?String(e):Array.isArray(e)?mu(e,t,an):typeof e=="object"?bu(e,t,an):String(e)}function wu(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 ku(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(1)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}const $u=[{key:"page",param:"page",isNumeric:!0},{key:"perPage",param:"perPage",isNumeric:!0},{key:"search",param:"search"},{key:"sort",param:"sort"},{key:"sortDir",param:"direction"},{key:"timeRange",param:"range"}];function Su(e){const t=new URLSearchParams,s=e;for(const{key:l,param:i,isNumeric:o}of $u){const a=s[l];(o?a!=null:a)&&t.set(i,String(a))}if(e.filters)for(const[l,i]of Object.entries(e.filters))i&&t.set(l,i);return t.toString()}function Cu(e,t,s=2){if(t<=1)return[1];const l=[],i=Math.max(2,e-s),o=Math.min(t-1,e+s);l.push(1),i>2&&l.push("...");for(let a=i;a<=o;a++)l.push(a);return o<t-1&&l.push("..."),t>1&&l.push(t),l}const Tu=["tracing","process","system","http","db","redis","queues","cache","app","log","emails","dashboard"],oi="/admin/api/debug",ii={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 Eu(e){const t={customPanes:e.customPanes??[]},s=e.features;for(const l of Tu)t[l]=s?.[l]??!1;return t}async function Pu(e,t=oi){const s=`${t.replace(/\/+$/,"")}/config`;return e.fetch(s)}async function Ru(e){const{baseUrl:t="",debugEndpoint:s=oi,authToken:l}=e,i=new ll({baseUrl:t,authToken:l});try{const o=await Pu(i,s);return Eu(o)}catch{return ii}}const Mu={overview:"/overview",requests:"/requests",queries:"/queries",events:"/events",routes:"/routes",logs:"/logs",emails:"/emails",timeline:"/traces",cache:"/cache",jobs:"/jobs",config:"/config"};function Au(e){return Mu[e]||`/${e}`}class ai{constructor(t,s){this.client=t,this.basePath=s}async fetchSection(t,s,l){const i=Au(t),o=s?`${this.basePath}${i}?${s}`:`${this.basePath}${i}`;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`)}}function Lu(e){if(!e||typeof e!="object")return!1;const t=e;return t.data!==void 0&&t.meta!==void 0}function Ou(e,t){return t.aborted?!0:e instanceof DOMException&&e.name==="AbortError"}class Du{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 ll({baseUrl:t.baseUrl,authToken:t.authToken}),this.api=new ai(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(this.shouldSkipFetch(t))return;const{controller:s,myFetchId:l}=this.prepareFetch(t);try{const i=await this.executeFetch(s);if(this.isStaleResponse(l))return;this.applyFetchResult(i)}catch(i){if(this.shouldIgnoreError(i,s.signal,l))return;this.handleFetchError(i,t)}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 i=`${this.endpoint}/${t}`;try{const o=s==="post"?await this.client.post(i,l):await this.client.delete(i);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}shouldSkipFetch(t){return t&&this.explicitFetchPending?!0:!this.section}prepareFetch(t){this.abortController?.abort();const s=new AbortController;this.abortController=s;const l=++this.fetchId;return t||(this.callbacks.onLoading(!0),this.explicitFetchPending=!0),{controller:s,myFetchId:l}}async executeFetch(t){const s=this.buildCurrentQueryString();return this.api.fetchSection(this.section,s||void 0,{signal:t.signal})}isStaleResponse(t){return t!==this.fetchId||this.stopped}shouldIgnoreError(t,s,l){return Ou(t,s)?!0:this.isStaleResponse(l)}buildCurrentQueryString(){const t=this.sort?this.sort.replace(/[A-Z]/g,l=>"_"+l.toLowerCase()):void 0,s=this.filters;return Su({page:this.page,perPage:this.perPage,search:this.search,sort:t,sortDir:this.sort?this.sortDir:void 0,filters:s&&Object.keys(s).length>0?s:void 0,timeRange:this.section.startsWith("overview")?this.timeRange:void 0})}applyFetchResult(t){Lu(t)?(this.callbacks.onData(t.data),this.callbacks.onPagination(t.meta)):(this.callbacks.onData(t),this.callbacks.onPagination(null)),this.callbacks.onError(null),this.callbacks.onLoading(!1),this.hasFetched=!0}handleFetchError(t,s){if(t instanceof ln){this.callbacks.onError(t),this.callbacks.onLoading(!1),this.stopRefreshTimer(),this.callbacks.onUnauthorized();return}s||(this.callbacks.onError(t instanceof Error?t:new Error(String(t))),this.callbacks.onLoading(!1))}startRefreshTimer(){this.stopRefreshTimer();const t=this.section==="overview"?vu:si;this.timer=setInterval(()=>this.fetch(!0),t)}stopRefreshTimer(){this.timer&&(clearInterval(this.timer),this.timer=null)}}const Fe={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"/>']}},Fu="ss-col-resize",ri="ss-resizing";function Iu(e){const t=Array.from(e.querySelectorAll("thead th"));if(t.length===0)return()=>{};const s=[];let l=!1;function i(){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 a=function(c){c.preventDefault(),c.stopPropagation(),i();const g=c.clientX,p=o.offsetWidth;r.classList.add(ri),r.setPointerCapture(c.pointerId);function b(w){const $=w.clientX-g,_=Math.max(30,p+$);o.style.width=_+"px"}function v(){r.classList.remove(ri),r.removeEventListener("pointermove",b),r.removeEventListener("pointerup",v)}r.addEventListener("pointermove",b),r.addEventListener("pointerup",v)};if(!o.textContent?.trim())continue;const r=document.createElement("div");r.className=Fu,o.appendChild(r),r.addEventListener("pointerdown",a),s.push(()=>{r.removeEventListener("pointerdown",a),r.remove()})}return()=>{for(const o of s)o()}}function Bu(e){const{container:t,handle:s,topPane:l,bottomPane:i,storageKey:o,minHeight:a=60}=e;if(o){const c=localStorage.getItem(o);if(c){const g=parseFloat(c);g>0&&g<1&&(l.style.flex=`${g}`,i.style.flex=`${1-g}`)}}function r(c){c.preventDefault(),s.setPointerCapture(c.pointerId);const p=t.getBoundingClientRect().height,b=c.clientY,v=l.getBoundingClientRect().height;function w(_){const C=_.clientY-b;let A=v+C;const P=p-a-s.offsetHeight;A=Math.max(a,Math.min(A,P));const y=A/(p-s.offsetHeight);l.style.flex=`${y}`,i.style.flex=`${1-y}`}function $(){if(s.removeEventListener("pointermove",w),s.removeEventListener("pointerup",$),o){const _=t.getBoundingClientRect().height-s.offsetHeight;if(_>0){const C=l.getBoundingClientRect().height/_;localStorage.setItem(o,String(C))}}}s.addEventListener("pointermove",w),s.addEventListener("pointerup",$)}return s.addEventListener("pointerdown",r),()=>{s.removeEventListener("pointerdown",r)}}function Nu(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return null}return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:null}function ui(e){const t={};for(const[s,l]of Object.entries(e))Hu.has(s)||(t[s]=l);return Object.keys(t).length>0?t:null}const ju=["all","error","warn","info","debug"];function rn(e){return(e.levelName||e.level_name||(typeof e.level=="string"?e.level:"")||"info").toLowerCase()}function ci(e){return e.msg||e.message||JSON.stringify(e)}function Ht(e){return e.createdAt||e.created_at||e.time||e.timestamp||0}function Ut(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 di(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 Hu=new Set(["level","time","pid","hostname","msg","message","v","name","levelName","level_name","timestamp","createdAt","created_at","requestId","request_id","x-request-id","id","data"]);function $t(e){if(e.data){const t=Nu(e.data);if(t){const s=ui(t);if(s)return s}}return ui(e)}function ze(e,...t){for(const s of t){const l=e[s];if(l!=null)return l}}function Uu(e){return ze(e,"createdAt","created_at","timestamp")}function qu(e){return ze(e,"method","sql_method")??""}function fi(e){return ze(e,"sqlNormalized","normalizedSql","sql_normalized","sql")??""}function Ku(e,t){let s=0,l=0;for(const c of e){const g=ze(c,"duration")??0;l+=g,g>ni&&s++}const i=hi(e);let o=0;for(const c of i.values())c>1&&(o+=c);const a=e.length>0?l/e.length:0,r=t?.total??e.length;return{slowCount:s,dupCount:o,avgDuration:a,totalCount:r}}function Vu(e){return{id:ze(e,"id")??0,sql:ze(e,"sql","sql_text")??"",sqlNormalized:fi(e),duration:ze(e,"duration")??0,method:qu(e),model:ze(e,"model")??"",connection:ze(e,"connection")??"",timestamp:Uu(e)??0,inTransaction:ze(e,"inTransaction","in_transaction")??!1}}function hi(e){const t=new Map;for(const s of e){const i=fi(s);t.set(i,(t.get(i)||0)+1)}return t}function zu(e){const t=[];if(e["Startup Cost"]!==null&&e["Startup Cost"]!==void 0&&t.push(`cost=${e["Startup Cost"]}..${e["Total Cost"]}`),e["Plan Rows"]!==null&&e["Plan Rows"]!==void 0&&t.push(`rows=${e["Plan Rows"]}`),e["Plan Width"]!==null&&e["Plan Width"]!==void 0&&t.push(`width=${e["Plan Width"]}`),e.Filter&&t.push(`filter: ${e.Filter}`),e["Index Cond"]&&t.push(`cond: ${e["Index Cond"]}`),e["Hash Cond"]&&t.push(`hash: ${e["Hash Cond"]}`),e["Join Type"]&&t.push(`join: ${e["Join Type"]}`),e["Sort Key"]){const s=Array.isArray(e["Sort Key"])?e["Sort Key"].join(", "):e["Sort Key"];t.push(`sort: ${s}`)}return t}function pi(e,t=0){if(!e)return[];const l=[{depth:t,nodeType:e["Node Type"]||"Unknown",relationName:e["Relation Name"]||"",alias:e.Alias&&e.Alias!==e["Relation Name"]?e.Alias:"",indexName:e["Index Name"]||"",metrics:zu(e),isRoot:t===0}],i=e.Plans||[];for(const o of i)l.push(...pi(o,t+1));return l}function Wu(e){return!e||typeof e!="object"?!1:"Plan"in e}function Qu(e){if(!e||e.length===0)return[];const t=e[0];return!t||typeof t!="object"?[]:Object.keys(t)}function Ju(e){return e==null?"-":String(e)}function Gu(e){const t=[{key:"id",label:"#",width:"40px",type:"index"},{key:"sql",label:"SQL",type:"sql"},{key:"duration",label:"Duration",width:"70px",sortable:!0,type:"duration"},{key:"method",label:"Method",width:"60px",type:"method"},{key:"model",label:"Model",width:"90px",type:"model"},{key:"connection",label:"Connection",width:"80px",type:"connection"},{key:"createdAt",label:"Time",width:"90px",sortable:!0,type:"time"}];return t.push({key:"id",label:"",width:"70px",type:"explain"}),t}function Yu(){return[{key:"sqlNormalized",label:"Pattern",type:"sql"},{key:"count",label:"Count",width:"60px",sortable:!0},{key:"avgDuration",label:"Avg",width:"70px",sortable:!0,type:"duration"},{key:"minDuration",label:"Min",width:"70px",type:"duration"},{key:"maxDuration",label:"Max",width:"70px",type:"duration"},{key:"totalDuration",label:"Total",width:"70px",sortable:!0,type:"duration"},{key:"percentOfTotal",label:"% Time",width:"60px"}]}class Xu{state;constructor(t="list"){this.state={viewMode:t,sort:{key:t==="list"?"createdAt":"count",dir:"desc"},expandedIds:new Set,explainData:new Map,search:""}}setViewMode(t){return this.state.viewMode=t,this.state.sort={key:t==="list"?"createdAt":"count",dir:"desc"},this.state.expandedIds=new Set,this.state.explainData=new Map,this.state}toggleSort(t){return this.state.sort.key===t?this.state.sort={key:t,dir:this.state.sort.dir==="asc"?"desc":"asc"}:this.state.sort={key:t,dir:"desc"},this.state}toggleExpand(t){return this.state.expandedIds.has(t)?this.state.expandedIds.delete(t):this.state.expandedIds.add(t),this.state}isExpanded(t){return this.state.expandedIds.has(t)}setSearch(t){return this.state.search=t,this.state}startExplain(t){this.state.explainData.set(t,{loading:!0})}completeExplain(t,s){this.state.explainData.set(t,{loading:!1,result:s})}failExplain(t,s){this.state.explainData.set(t,{loading:!1,error:s})}clearExplain(){this.state.explainData=new Map}getExplainState(t){return this.state.explainData.get(t)}}const Zu=["all","active","waiting","delayed","completed","failed"];function ec(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 tc(e){if(!e)return[];if(Array.isArray(e))return e;const t=e;return t.jobs||t.data||[]}function sc(e){if(!e||Array.isArray(e))return null;const t=e;return t.stats||t.overview||null}function nc(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function lc(e){if(!e)return[];if(typeof e=="string")try{return JSON.parse(e)}catch{return[]}return Array.isArray(e)?e:[]}function al(e,t,s,l=0){return e[t]??e[s]??l}function oc(e){return{method:e.method||"",url:e.url||"",statusCode:al(e,"status_code","statusCode"),totalDuration:al(e,"total_duration","totalDuration")||e.duration||0,spanCount:al(e,"span_count","spanCount"),spans:nc(e.spans),warnings:lc(e.warnings),logs:e.logs||[],httpRequestId:e.httpRequestId||e.http_request_id||void 0}}const ic=["password","secret","token","key","credential","auth"];function ac(e){const t=e.toLowerCase();return ic.some(s=>t.includes(s))}function rc(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 uc={collectionInterval:"Stats Collection",dashboardBroadcast:"Dashboard Broadcast",debugBroadcast:"Debug Broadcast",persistFlush:"Persist Flush",retentionCleanup:"Retention Cleanup"};function cc(e){return uc[e]||e}const dc={prometheus:"Prometheus",pinoHook:"Pino Log Hook",edgePlugin:"Edge Plugin",cacheInspector:"Cache Inspector",queueInspector:"Queue Inspector"};function fc(e){return dc[e]||e}function hc(e){return"active"in e?e.active?"active":"inactive":"available"in e?e.available?"available":"unavailable":"unknown"}function pc(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 vc(e){return Object.entries(e).map(([t,s])=>({key:t,value:rc(s),secret:ac(t)}))}function gc(e,t){return t?Math.min(100,Math.round(e/t*100)):0}const yc=["healthy","active","connected","available","ready"],mc=["errored","unavailable"];function bc(e){return yc.includes(e)?"ok":mc.includes(e)?"err":""}function je(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&e.__redacted===!0}function un(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)&&!je(e)}function cn(e,t=""){if(!un(e))return[{path:t,value:e}];const s=[];for(const l of Object.keys(e)){const i=t?`${t}.${l}`:l,o=e[l];un(o)?s.push(...cn(o,i)):s.push({path:i,value:o})}return s}function _c(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 vi(e){if(e==null||typeof e!="object"||Array.isArray(e)||je(e))return 1;let t=0;for(const s of Object.keys(e))t+=vi(e[s]);return t}function xc(e){if(!un(e))return[];const t=[];for(const s of Object.keys(e))un(e[s])&&t.push(s);return t}function wc(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 kc(e={}){const{baseUrl:t="",debugEndpoint:s="/admin/api/debug",authToken:l}=e,i=W({...ii}),o=W(!0);return It(async()=>{i.value=await Ru({baseUrl:t,debugEndpoint:s,authToken:l}),o.value=!1}),{features:i,loading:o}}function gi(){const e=W(Ms());let t=null;function s(i){e.value=i}function l(){const i=ru();return e.value=i,i}return It(()=>{e.value=Ms(),t=ti(s)}),Pt(()=>{t?.()}),{theme:e,toggleTheme:l}}function $c(e){let t=null;return{onData:s=>{t=s},onPagination:s=>{s?(e.pagination.total=s.total,e.pagination.totalPages=s.lastPage??(Math.ceil(s.total/e.pagination.perPage)||1),e.data.value={data:t,meta:s}):e.data.value=t},onLoading:s=>{e.loading.value=s},onError:s=>{e.error.value=s},onUnauthorized:()=>{e.isUnauthorized.value=!0}}}function Sc(e){const t={};for(const[s,l]of Object.entries(e))s!=="search"&&l!==""&&l!==void 0&&l!==null&&(t[s]=String(l));return t}async function rl(e){try{return await e()}catch{return null}}function Cc(e){return{fetchGroupedQueries:()=>rl(()=>e.fetchGroupedQueries()),explainQuery:t=>rl(()=>e.explainQuery(t)),fetchEmailPreview:async t=>(await rl(()=>e.fetchEmailPreview(t)))?.html||null}}function Tc(e){return{retryJob:async t=>{try{return await e.retryJob(t),!0}catch{return!1}},deleteCacheKey:async t=>{try{return await e.deleteCacheKey(t),!0}catch{return!1}}}}function Ec(e,t){return{fetchChart:async s=>{try{return await e.fetchChart(s)}catch(l){return l instanceof ln&&(t.value=!0),null}}}}function As(e,t,s){const l=t(),i=Sc(s.filter);e.configure({page:s.pagination.page,perPage:s.pagination.perPage,search:s.filter.search||void 0,sort:s.sort.column||void 0,sortDir:s.sort.column?s.sort.direction:void 0,filters:Object.keys(i).length>0?i:void 0,timeRange:l.startsWith("overview")?s.timeRange.value:void 0})}function Pc(e,t){return{goToPage(s){e.pagination.page=s,t()},setSearch(s){e.filter.search=s,e.pagination.page=1,t()},setFilter(s,l){e.filter[s]=l,e.pagination.page=1,t()},setSort(s,l){e.sort.column===s&&!l?e.sort.direction=e.sort.direction==="asc"?"desc":"asc":(e.sort.column=s,e.sort.direction=l||"desc"),t()},setTimeRange(s){e.timeRange.value=s,t()}}}function Rc(e,t,s){return{async mutate(l,i="post",o){return e.mutate(l,i,o)},refresh(){As(e,t,s),e.fetch(!0)},startRefresh(){e.start()},stopRefresh(){e.stop()}}}function Mc(e,t,s,l){ht(t,()=>{s.pagination.page=1;for(const i of Object.keys(s.filter))i==="search"?s.filter.search="":delete s.filter[i];s.sort.column="",s.data.value=null,e.setSection(t()),As(e,t,s)}),l&&ht(l,()=>{As(e,t,s),e.handleRefreshSignal()})}function Ac(e){return{data:W(null),loading:W(!1),error:W(null),isUnauthorized:W(!1),timeRange:W("1h"),pagination:Zt({page:1,perPage:e,total:0,totalPages:1}),filter:Zt({search:""}),sort:Zt({column:"",direction:"desc"})}}function Lc(e,t,s,l){return{data:e.data,loading:e.loading,error:e.error,isUnauthorized:e.isUnauthorized,pagination:e.pagination,filter:e.filter,sort:e.sort,timeRange:e.timeRange,...t,...s,...l}}function rt(e,t={}){const{baseUrl:s="",dashboardEndpoint:l="/__stats/api",authToken:i,perPage:o=50,refreshKey:a}=t,r=Ac(o),c=new Du({baseUrl:s,endpoint:l,authToken:i,section:e(),perPage:o,callbacks:$c(r)}),g=c.getApi(),b=Pc(r,()=>{As(c,e,r),c.fetch(!1)}),v=Rc(c,e,r),w={...Ec(g,r.isUnauthorized),...Cc(g),...Tc(g)};return Mc(c,e,r,a),It(()=>{As(c,e,r),c.start()}),Pt(()=>{c.stop()}),Lc(r,b,v,w)}const Oc=["title","aria-label"],Dc=["viewBox","innerHTML"],Fc=["viewBox","innerHTML"],Ic=Ne({__name:"ThemeToggle",props:{classPrefix:{default:"ss-dbg"}},setup(e){const t=e,{theme:s,toggleTheme:l}=gi(),i=H(()=>s.value==="dark"),o=H(()=>i.value?"Switch to light theme":"Switch to dark theme"),a=H(()=>t.classPrefix==="ss-dbg"?"ss-dbg-theme-toggle":"ss-dash-theme-btn");return(r,c)=>(u(),d("button",{type:"button",class:R(a.value),title:o.value,"aria-label":o.value,onClick:c[0]||(c[0]=(...g)=>x(l)&&x(l)(...g))},[i.value?(u(),d("svg",{key:0,width:"16",height:"16",viewBox:x(Fe).sun.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe).sun.elements.join("")},null,8,Dc)):(u(),d("svg",{key:1,width:"16",height:"16",viewBox:x(Fe).moon.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe).moon.elements.join("")},null,8,Fc))],10,Oc))}}),Bc=["data-theme"],Nc={class:"ss-dash-header"},jc={class:"ss-dash-header-center"},Hc={class:"ss-dash-header-right"},Uc=["href"],qc={class:"ss-dash-body"},Kc={class:"ss-dash-nav"},Vc=["data-ss-section","onClick","title"],zc={class:"ss-dash-nav-icon"},Wc=["viewBox","innerHTML"],Qc={class:"ss-dash-nav-label"},Jc={key:0,class:"ss-dash-nav-sep"},Gc=["onClick","title"],Yc={class:"ss-dash-nav-icon"},Xc=["viewBox","innerHTML"],Zc={class:"ss-dash-nav-label"},ed=["title"],td=["viewBox","innerHTML"],sd=["viewBox","innerHTML"],nd={class:"ss-dash-main"},ld=["id"],od={class:"ss-dash-pane-inner"},id={key:1,class:"ss-dash-empty"},ad=Ne({__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=pt(()=>Promise.resolve().then(()=>vh)),s=pt(()=>Promise.resolve().then(()=>vp)),l=pt(()=>Promise.resolve().then(()=>Zp)),i=pt(()=>Promise.resolve().then(()=>iv)),o=pt(()=>Promise.resolve().then(()=>vv)),a=pt(()=>Promise.resolve().then(()=>Bv)),r=pt(()=>Promise.resolve().then(()=>tg)),c=pt(()=>Promise.resolve().then(()=>wg)),g=pt(()=>Promise.resolve().then(()=>zg)),p=pt(()=>Promise.resolve().then(()=>x1)),b=pt(()=>Promise.resolve().then(()=>ny)),v=["overview","requests","queries","events","routes","logs","emails","cache","jobs","config","internals"],w=e,{theme:$}=gi(),{features:_}=kc({baseUrl:w.baseUrl,debugEndpoint:w.debugEndpoint,authToken:w.authToken}),C=W("overview"),A=W(!1),P=W(!1),y=W(0);is("ss-refresh-key",y),is("ss-base-url",w.baseUrl),is("ss-dashboard-endpoint",w.dashboardEndpoint),is("ss-debug-endpoint",w.debugEndpoint),is("ss-auth-token",w.authToken),typeof window<"u"&&(A.value=localStorage.getItem("ss-dash-sidebar")==="collapsed");let k=null;function S(){if(k&&(k(),k=null),!w.channelName)return;k=ou({baseUrl:w.baseUrl,channelName:w.channelName,authToken:w.authToken,onMessage:()=>{y.value+=1},onConnect:()=>{P.value=!0},onDisconnect:()=>{P.value=!1},onError:()=>{P.value=!1}}).unsubscribe}It(()=>{S()}),Pt(()=>{k&&(k(),k=null)});const Q=H(()=>_.value.customPanes||[]);function te(j){const _e=j.replace("#","").split("?")[0];return _e&&[...v,...Q.value.map(ie=>ie.id)].includes(_e)?_e:"overview"}function se(){const j=te(window.location.hash);j!==C.value&&(C.value=j)}It(()=>{if(typeof window>"u")return;const j=te(window.location.hash);(j!=="overview"||window.location.hash)&&(C.value=j),window.addEventListener("hashchange",se)}),Pt(()=>{window.removeEventListener("hashchange",se)}),ht(C,j=>{typeof window<"u"&&(window.location.hash=j)});function Y(){A.value=!A.value,localStorage.setItem("ss-dash-sidebar",A.value?"collapsed":"expanded")}function be(j){j!==C.value&&(C.value=j)}const Re=H(()=>[{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:"cache",label:"Cache",visible:_.value.cache},{id:"jobs",label:"Jobs",visible:_.value.queues},{id:"config",label:"Config",visible:!0},{id:"internals",label:"Internals",visible:!0}]),ke=H(()=>Re.value.filter(j=>j.visible)),{data:Me}=rt(()=>"overview",{baseUrl:w.baseUrl,dashboardEndpoint:w.dashboardEndpoint,authToken:w.authToken,refreshKey:y}),Ce=H(()=>Me.value),we=H(()=>{const j={};if(!Ce.value)return j;if(Ce.value.totalRequests>0&&(j.requests={count:Ce.value.totalRequests}),Ce.value.queryStats?.total>0&&(j.queries={count:Ce.value.queryStats.total}),Ce.value.logLevelBreakdown){const _e=Ce.value.logLevelBreakdown,xe=_e.error+_e.warn+_e.info+_e.debug;xe>0&&(j.logs={count:xe})}return j}),z={overview:t,requests:s,queries:l,events:i,routes:o,logs:a,emails:r,cache:c,jobs:g,config:p,internals:b},B=H(()=>z[C.value]||null);return(j,_e)=>(u(),d("div",{class:"ss-dash","data-theme":x($),id:"ss-dash"},[n("div",Nc,[_e[0]||(_e[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",jc,[n("span",{class:R(["ss-dash-live-dot",{"ss-dash-connected":P.value}]),id:"ss-dash-live-dot"},null,2),n("span",{class:R(["ss-dash-live-label",{"ss-dash-connected":P.value}]),id:"ss-dash-live-label"},h(P.value?"Live":"Polling"),3)]),n("div",Hc,[Se(Ic,{"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,Uc)):G("",!0)])]),n("div",qc,[n("div",{class:R(["ss-dash-sidebar",{"ss-dash-collapsed":A.value}]),id:"ss-dash-sidebar"},[n("nav",Kc,[(u(!0),d(N,null,ye(ke.value,xe=>(u(),d("button",{key:xe.id,type:"button",class:R(["ss-dash-nav-item",{"ss-dash-active":C.value===xe.id}]),"data-ss-section":xe.id,onClick:ie=>be(xe.id),title:A.value?xe.label:void 0},[n("span",zc,[(u(),d("svg",{width:"20",height:"20",viewBox:(x(Fe)[xe.id]||x(Fe).config).viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:(x(Fe)[xe.id]||x(Fe).config).elements.join("")},null,8,Wc))]),n("span",Qc,h(xe.label),1),we.value[xe.id]&&we.value[xe.id].count>0?(u(),d("span",{key:0,class:R(["ss-dash-nav-badge",we.value[xe.id].variant||""])},h(we.value[xe.id].count),3)):G("",!0)],10,Vc))),128)),Q.value.length>0?(u(),d("div",Jc)):G("",!0),(u(!0),d(N,null,ye(Q.value,xe=>(u(),d("button",{key:xe.id,type:"button",class:R(["ss-dash-nav-item",{"ss-dash-active":C.value===xe.id}]),onClick:ie=>be(xe.id),title:A.value?xe.label:void 0},[n("span",Yc,[(u(),d("svg",{width:"20",height:"20",viewBox:x(Fe)["custom-pane"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe)["custom-pane"].elements.join("")},null,8,Xc))]),n("span",Zc,h(xe.label),1)],10,Gc))),128))]),n("button",{type:"button",class:"ss-dash-sidebar-toggle",id:"ss-dash-sidebar-toggle",onClick:Y,title:A.value?"Expand sidebar":"Collapse sidebar"},[A.value?(u(),d("svg",{key:0,width:"16",height:"16",viewBox:x(Fe)["chevron-right"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:x(Fe)["chevron-right"].elements.join("")},null,8,td)):(u(),d("svg",{key:1,width:"16",height:"16",viewBox:x(Fe)["chevron-left"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"1.5",innerHTML:x(Fe)["chevron-left"].elements.join("")},null,8,sd))],8,ed)],2),n("div",nd,[n("div",{class:"ss-dash-pane ss-dash-active",id:`ss-dash-pane-${C.value}`},[n("div",od,[(u(),st(or,null,{fallback:os(()=>[..._e[1]||(_e[1]=[n("div",{class:"ss-dash-empty"},"Loading...",-1)])]),default:os(()=>[B.value?(u(),st(Ma(B.value),{key:0})):(u(),d("div",id,"Unknown section"))]),_:1}))])],8,ld)])])],8,Bc))}});function rd(e){const t=document.getElementById(e);return t?JSON.parse(t.textContent||"{}"):{}}function ud(){function e(t){document.documentElement.setAttribute("data-theme",t)}e(Ms()),ti(e)}const hs=rd("ss-dash-config");ud();const yi=document.getElementById("ss-dash");yi&&Zr(ad,{baseUrl:hs.baseUrl,dashboardEndpoint:hs.dashboardEndpoint,debugEndpoint:hs.debugEndpoint,authToken:hs.authToken,backUrl:hs.backUrl,channelName:hs.channelName}).mount(yi);const cd=["width","height","viewBox"],dd=["id"],fd=["stop-color"],hd=["stop-color"],pd=["d","fill"],vd=["d","stroke"],gd=["x","y"],dn=Ne({__name:"Sparkline",props:{data:{},color:{default:"#34d399"},width:{default:120},height:{default:32}},setup(e){const t=e,s=H(()=>pu(t.data,{width:t.width,height:t.height,color:t.color})),l=H(()=>s.value!==null),i=H(()=>`sg-${t.color.replace("#","")}`);return(o,a)=>(u(),d("div",{class:"ss-dash-sparkline",style:qe({"--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(N,{key:0},[n("defs",null,[n("linearGradient",{id:i.value,x1:"0",y1:"0",x2:"0",y2:"1"},[n("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.25"},null,8,fd),n("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0.02"},null,8,hd)],8,dd)]),n("path",{d:s.value.areaPath,fill:`url(#${i.value})`},null,8,pd),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,vd)],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,gd))],8,cd))],4))}}),yd={class:"ss-dash-btn-group"},md=["onClick"],bd=Ne({__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(i,o)=>(u(),d("div",yd,[(u(),d(N,null,ye(l,a=>n("button",{key:a.value,type:"button",class:R(`ss-dash-btn ${e.modelValue===a.value?"ss-dash-active":""}`),onClick:r=>s("update:modelValue",a.value)},h(a.label),11,md)),64))]))}}),_d={class:"ss-dash-overview"},xd={key:0,class:"ss-dash-empty"},wd={class:"ss-dash-cards"},kd={class:"ss-dash-card"},$d={class:"ss-dash-sparkline"},Sd={class:"ss-dash-card"},Cd={class:"ss-dash-sparkline"},Td={class:"ss-dash-card"},Ed={class:"ss-dash-sparkline"},Pd={class:"ss-dash-card"},Rd={class:"ss-dash-sparkline"},Md={class:"ss-dash-chart-container"},Ad={class:"ss-dash-chart-header"},Ld={class:"ss-dash-chart",id:"ss-dash-chart-area"},Od={key:0,class:"ss-dash-empty",style:{"min-height":"120px"}},Dd=["viewBox"],Fd=["id"],Id=["id"],Bd=["x1","y1","x2","y2"],Nd=["x","y"],jd=["d","fill"],Hd=["d"],Ud=["d","fill"],qd=["d"],Kd=["x","y","width","height","data-idx","onMouseenter"],Vd=["cx","cy","r","data-idx","opacity"],zd=["cx","cy","r","data-idx","opacity"],Wd=["x","y"],Qd={key:0,style:{color:"var(--ss-red-fg)"}},Jd={class:"ss-dash-chart-legend",id:"ss-dash-chart-legend"},Gd={key:0,class:"ss-dash-chart-legend-item"},Yd={class:"ss-dash-secondary-cards"},Xd={class:"ss-dash-secondary-card"},Zd={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},ef={key:1,class:"ss-dash-secondary-list"},tf=["href"],sf=["title"],nf={class:"ss-dash-secondary-card"},lf={class:"ss-dash-secondary-list"},of={class:"ss-dash-secondary-list-value"},af={class:"ss-dash-secondary-list-value"},rf={class:"ss-dash-secondary-list-value"},uf={class:"ss-dash-secondary-card"},cf={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},df={key:1,class:"ss-dash-secondary-list"},ff=["href"],hf=["title"],pf=["title"],vf={class:"ss-dash-secondary-card"},gf={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},yf={key:1,class:"ss-dash-secondary-list"},mf=["href"],bf={class:"ss-dash-secondary-list-value"},_f={class:"ss-dash-secondary-card"},xf={class:"ss-dash-secondary-list"},wf={href:"#emails?status=sent",class:"ss-dash-widget-row-link"},kf={class:"ss-dash-secondary-list-value"},$f={href:"#emails?status=queued",class:"ss-dash-widget-row-link"},Sf={class:"ss-dash-secondary-list-value"},Cf={href:"#emails?status=failed",class:"ss-dash-widget-row-link"},Tf={class:"ss-dash-secondary-card"},Ef={class:"ss-dash-secondary-list"},Pf={href:"#logs?level=error",class:"ss-dash-widget-row-link"},Rf={class:"ss-dash-secondary-list-value"},Mf={href:"#logs?level=warn",class:"ss-dash-widget-row-link"},Af={class:"ss-dash-secondary-list-value"},Lf={href:"#logs?level=info",class:"ss-dash-widget-row-link"},Of={class:"ss-dash-secondary-list-value"},Df={href:"#logs?level=debug",class:"ss-dash-widget-row-link"},Ff={class:"ss-dash-secondary-list-value"},If={key:0,class:"ss-dash-secondary-card"},Bf={class:"ss-dash-secondary-list"},Nf={href:"#cache",class:"ss-dash-widget-row-link"},jf={class:"ss-dash-secondary-list-value"},Hf={href:"#cache",class:"ss-dash-widget-row-link"},Uf={class:"ss-dash-secondary-list-value"},qf={href:"#cache",class:"ss-dash-widget-row-link"},Kf={class:"ss-dash-secondary-list-value"},Vf={key:1,class:"ss-dash-secondary-card"},zf={class:"ss-dash-secondary-list"},Wf={href:"#jobs?status=active",class:"ss-dash-widget-row-link"},Qf={class:"ss-dash-secondary-list-value"},Jf={href:"#jobs?status=waiting",class:"ss-dash-widget-row-link"},Gf={class:"ss-dash-secondary-list-value"},Yf={href:"#jobs?status=failed",class:"ss-dash-widget-row-link"},Xf={href:"#jobs?status=completed",class:"ss-dash-widget-row-link"},Zf={class:"ss-dash-secondary-list-value"},eh={class:"ss-dash-secondary-card"},th={class:"ss-dash-secondary-list"},sh={href:"#requests?status=2xx",class:"ss-dash-widget-row-link"},nh={class:"ss-dash-secondary-list-value"},lh={href:"#requests?status=3xx",class:"ss-dash-widget-row-link"},oh={class:"ss-dash-secondary-list-value"},ih={href:"#requests?status=4xx",class:"ss-dash-widget-row-link"},ah={class:"ss-dash-secondary-list-value"},rh={href:"#requests?status=5xx",class:"ss-dash-widget-row-link"},uh={class:"ss-dash-secondary-list-value"},ch={class:"ss-dash-secondary-card"},dh={key:0,class:"ss-dash-empty",style:{"min-height":"60px"}},fh={key:1,class:"ss-dash-secondary-list"},hh=["href"],ph=["title"],ul=220,mi=120,vh=Object.freeze(Object.defineProperty({__proto__:null,default:((e,t)=>{const s=e.__vccOpts||e;for(const[l,i]of t)s[l]=i;return s})(Ne({__name:"OverviewSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-base-url",""),l=de("ss-dashboard-endpoint","/__stats/api"),i=de("ss-auth-token",void 0),o=Math.random().toString(36).slice(2,8),a=W("1h"),{data:r,loading:c}=rt(()=>"overview",{baseUrl:s,dashboardEndpoint:l,authToken:i,refreshKey:t}),{data:g,setTimeRange:p}=rt(()=>"overview/chart",{baseUrl:s,dashboardEndpoint:l,authToken:i,refreshKey:t});ht(a,X=>{p(X)});const b=H(()=>r.value),v=H(()=>b.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:[]}),w=H(()=>v.value),$=H(()=>v.value.avgResponseTime||Number(w.value.avg_response_time)||0),_=H(()=>v.value.p95ResponseTime||Number(w.value.p95_response_time)||0),C=H(()=>v.value.requestsPerMinute||Number(w.value.requests_per_minute)||0),A=H(()=>v.value.errorRate||Number(w.value.error_rate)||0),P=H(()=>v.value.totalRequests||Number(w.value.total_requests)||0),y=H(()=>P.value>0),k=H(()=>g.value?.buckets||[]),S=H(()=>v.value.sparklines?.avgResponseTime??k.value.map(X=>X.avgDuration??0)),Q=H(()=>v.value.sparklines?.p95ResponseTime??k.value.map(X=>X.p95Duration??0)),te=H(()=>v.value.sparklines?.requestsPerMinute??k.value.map(X=>X.requestCount??0)),se=H(()=>v.value.sparklines?.errorRate??k.value.map(X=>X.errorCount??0)),Y=H(()=>`ss-cg-total-${o}`),be=H(()=>`ss-cg-error-${o}`);function Re(X,M){if(X<=0)return[0];const ne=X/M,fe=Math.pow(10,Math.floor(Math.log10(ne))),ut=ne/fe;let lt;ut<=1?lt=fe:ut<=2?lt=2*fe:ut<=5?lt=5*fe:lt=10*fe;const fn=[];for(let dl=lt;dl<=X+lt*.5;dl+=lt)fn.push(Math.round(dl));return fn.length===0&&fn.push(Math.ceil(X)),fn}function ke(X){try{return new Date(X).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"})}catch{return""}}function Me(X){if(X.length===0)return"";if(X.length===1)return`M${X[0].x},${X[0].y}`;let M=`M${X[0].x.toFixed(1)},${X[0].y.toFixed(1)}`;for(let ne=0;ne<X.length-1;ne++){const fe=X[ne],ut=X[ne+1],lt=(fe.x+ut.x)/2;M+=` C${lt.toFixed(1)},${fe.y.toFixed(1)} ${lt.toFixed(1)},${ut.y.toFixed(1)} ${ut.x.toFixed(1)},${ut.y.toFixed(1)}`}return M}function Ce(X){return il(X,"ss-dash")}const we=W(null),z=W(0);let B=null;ht(we,X=>{B?.disconnect(),B=null,X&&(z.value=X.clientWidth,B=new ResizeObserver(M=>{for(const ne of M)z.value=ne.contentRect.width}),B.observe(X))}),Pt(()=>{B?.disconnect()});const j={top:12,right:12,bottom:28,left:38},_e=H(()=>z.value||600),xe=H(()=>_e.value-j.left-j.right),ie=H(()=>ul-j.top-j.bottom),he=H(()=>j.top+ie.value),re=H(()=>k.value.map(X=>{const M=X;return(X.requestCount??0)+(Number(M.request_count)||0)||X.total||0})),q=H(()=>k.value.map(X=>{const M=X;return(X.errorCount??0)+(Number(M.error_count)||0)})),le=H(()=>Math.max(...re.value,1)),U=H(()=>Math.ceil(le.value*1.1)),oe=H(()=>q.value.some(X=>X>0)),K=H(()=>Re(U.value,4)),Z=H(()=>K.value.length>0?K.value[K.value.length-1]:U.value);function E(X){return j.left+X/Math.max(k.value.length-1,1)*xe.value}function Be(X){return j.top+ie.value-X/(Z.value||1)*ie.value}const f=H(()=>k.value.map((X,M)=>({x:E(M),y:Be(re.value[M])}))),m=H(()=>k.value.map((X,M)=>({x:E(M),y:Be(q.value[M])}))),T=H(()=>Me(f.value)),I=H(()=>oe.value?Me(m.value):""),L=H(()=>f.value.length>1?`${T.value} L${f.value[f.value.length-1].x.toFixed(1)},${he.value} L${f.value[0].x.toFixed(1)},${he.value} Z`:""),O=H(()=>oe.value&&m.value.length>1?`${I.value} L${m.value[m.value.length-1].x.toFixed(1)},${he.value} L${m.value[0].x.toFixed(1)},${he.value} Z`:""),J=H(()=>Math.min(10,k.value.length)),V=H(()=>Math.max(1,Math.ceil(k.value.length/J.value))),D=W({visible:!1,x:0,idx:-1});function F(X){const M=f.value[X].x;D.value={visible:!0,x:M,idx:X}}function ce(){D.value={visible:!1,x:0,idx:-1}}const ee=H(()=>D.value.visible?Math.max(mi/2,Math.min(D.value.x,_e.value-mi/2)):0),ae=H(()=>xe.value/(k.value.length||1));function pe(X){return X%V.value===0||X===k.value.length-1}function $e(){return y.value?$.value>500?"ss-dash-red":$.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Le(){return y.value?_.value>500?"ss-dash-red":_.value>200?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function Ee(){return y.value?"ss-dash-accent":"ss-dash-dim"}function Qe(){return y.value?A.value>5?"ss-dash-red":A.value>1?"ss-dash-amber":"ss-dash-accent":"ss-dash-dim"}function He(X){return X.url||X.pattern||"-"}function nt(X){return X.name||X.eventName||X.event_name||X.event||""}function tt(X){return X.sqlNormalized||X.normalizedSql||X.sql_normalized||X.sql||"-"}return(X,M)=>(u(),d("div",_d,[x(c)&&!b.value?(u(),d("div",xd,"Loading overview...")):(u(),d(N,{key:1},[n("div",wd,[n("div",kd,[M[1]||(M[1]=n("div",{class:"ss-dash-card-title"},"Avg Response Time",-1)),n("div",{class:R(["ss-dash-card-value",$e()])},h(y.value?x(Nt)($.value):"-"),3),n("div",$d,[Se(dn,{data:S.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Sd,[M[2]||(M[2]=n("div",{class:"ss-dash-card-title"},"P95 Response Time",-1)),n("div",{class:R(["ss-dash-card-value",Le()])},h(y.value?x(Nt)(_.value):"-"),3),n("div",Cd,[Se(dn,{data:Q.value,color:"#60a5fa",width:160,height:40},null,8,["data"])])]),n("div",Td,[M[3]||(M[3]=n("div",{class:"ss-dash-card-title"},"Requests / min",-1)),n("div",{class:R(["ss-dash-card-value",Ee()])},h(y.value?C.value.toFixed(1):"-"),3),n("div",Ed,[Se(dn,{data:te.value,color:"#34d399",width:160,height:40},null,8,["data"])])]),n("div",Pd,[M[4]||(M[4]=n("div",{class:"ss-dash-card-title"},"Error Rate",-1)),n("div",{class:R(["ss-dash-card-value",Qe()])},h(y.value?`${A.value.toFixed(1)}%`:"-"),3),n("div",Rd,[Se(dn,{data:se.value,color:"#f87171",width:160,height:40},null,8,["data"])])])]),n("div",Md,[n("div",Ad,[M[5]||(M[5]=n("span",{class:"ss-dash-chart-title"},"Request Volume",-1)),Se(bd,{"model-value":a.value,"onUpdate:modelValue":M[0]||(M[0]=ne=>a.value=ne)},null,8,["model-value"])]),n("div",Ld,[k.value.length===0?(u(),d("div",Od," No data for this range ")):(u(),d("div",{key:1,ref_key:"chartContainerRef",ref:we,style:{position:"relative"}},[(u(),d("svg",{viewBox:`0 0 ${_e.value} ${ul}`,class:"ss-dash-chart-svg"},[n("defs",null,[n("linearGradient",{id:Y.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...M[6]||(M[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,Fd),n("linearGradient",{id:be.value,x1:"0",y1:"0",x2:"0",y2:"1"},[...M[7]||(M[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,Id)]),(u(!0),d(N,null,ye(K.value,ne=>(u(),d("g",{key:`ytick-${ne}`},[n("line",{x1:j.left,y1:Be(ne),x2:_e.value-j.right,y2:Be(ne),stroke:"var(--ss-border-faint)","stroke-width":"0.5","stroke-dasharray":"3,3"},null,8,Bd),n("text",{x:j.left-6,y:Be(ne),"text-anchor":"end",fill:"var(--ss-dim)","font-size":"9","dominant-baseline":"middle"},h(ne),9,Nd)]))),128)),L.value?(u(),d("path",{key:0,d:L.value,fill:`url(#${Y.value})`},null,8,jd)):G("",!0),T.value?(u(),d("path",{key:1,d:T.value,fill:"none",stroke:"var(--ss-accent)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round"},null,8,Hd)):G("",!0),O.value?(u(),d("path",{key:2,d:O.value,fill:`url(#${be.value})`},null,8,Ud)):G("",!0),I.value?(u(),d("path",{key:3,d:I.value,fill:"none",stroke:"var(--ss-red-fg)","stroke-width":"1.5","stroke-linejoin":"round","stroke-linecap":"round","stroke-dasharray":"4,2"},null,8,qd)):G("",!0),(u(!0),d(N,null,ye(k.value,(ne,fe)=>(u(),d("g",{key:fe},[n("rect",{x:f.value[fe].x-ae.value/2,y:j.top,width:ae.value,height:ie.value,fill:"transparent",class:"ss-dash-chart-hover-zone","data-idx":fe,onMouseenter:ut=>F(fe),onMouseleave:ce},null,40,Kd),re.value[fe]>0?(u(),d("circle",{key:0,cx:f.value[fe].x,cy:f.value[fe].y,r:D.value.visible&&D.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:D.value.visible&&D.value.idx!==fe?.3:1},null,8,Vd)):G("",!0),q.value[fe]>0?(u(),d("circle",{key:1,cx:f.value[fe].x,cy:m.value[fe].y,r:D.value.visible&&D.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:D.value.visible&&D.value.idx!==fe?.3:1},null,8,zd)):G("",!0)]))),128)),(u(!0),d(N,null,ye(k.value,(ne,fe)=>(u(),d(N,{key:`xlabel-${fe}`},[pe(fe)&&ke(ne.bucket)?(u(),d("text",{key:0,x:E(fe),y:ul-6,"text-anchor":"middle",fill:"var(--ss-dim)","font-size":"9"},h(ke(ne.bucket)),9,Wd)):G("",!0)],64))),128))],8,Dd)),D.value.visible&&D.value.idx>=0?(u(),d("div",{key:0,class:"ss-dash-chart-tooltip",style:qe({left:ee.value+"px",top:j.top-4+"px",transform:"translate(-50%, -100%)"})},[n("div",null,h(ke(k.value[D.value.idx].bucket)),1),n("div",null,"Requests: "+h(re.value[D.value.idx]),1),q.value[D.value.idx]>0?(u(),d("div",Qd," Errors: "+h(q.value[D.value.idx]),1)):G("",!0)],4)):G("",!0)],512))]),n("div",Jd,[M[9]||(M[9]=n("span",{class:"ss-dash-chart-legend-item"},[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-accent)"}}),me(" Requests ")],-1)),k.value.some(ne=>(ne.errorCount??0)>0)?(u(),d("span",Gd,[...M[8]||(M[8]=[n("span",{class:"ss-dash-legend-dot",style:{background:"var(--ss-red-fg)"}},null,-1),me(" Errors ",-1)])])):G("",!0)])]),n("div",Yd,[n("div",Xd,[M[10]||(M[10]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Slowest Endpoints")],-1)),v.value.slowestEndpoints.length===0?(u(),d("div",Zd," No data yet ")):(u(),d("ul",ef,[(u(!0),d(N,null,ye(v.value.slowestEndpoints.slice(0,5),(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#requests?url=${encodeURIComponent(He(ne))}`,class:"ss-dash-widget-row-link"},[n("span",{title:He(ne)},h(He(ne)),9,sf),n("span",{class:R(["ss-dash-secondary-list-value","ss-dash-duration",Ce(ne.avgDuration)])},h(x(Nt)(ne.avgDuration)),3)],8,tf)]))),128))]))]),n("div",nf,[M[14]||(M[14]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Query Stats")],-1)),n("ul",lf,[n("li",null,[M[11]||(M[11]=n("span",null,"Total Queries",-1)),n("span",of,h(v.value.queryStats.total),1)]),n("li",null,[M[12]||(M[12]=n("span",null,"Avg Duration",-1)),n("span",af,h(x(Nt)(v.value.queryStats.avgDuration)),1)]),n("li",null,[M[13]||(M[13]=n("span",null,"Queries / Request",-1)),n("span",rf,h(v.value.queryStats.perRequest.toFixed(1)),1)])])]),n("div",uf,[M[15]||(M[15]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs?level=error",class:"ss-dash-widget-link"},"Recent Errors")],-1)),v.value.recentErrors.length===0?(u(),d("div",cf," No recent errors ")):(u(),d("ul",df,[(u(!0),d(N,null,ye(v.value.recentErrors,(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#logs?id=${ne.id??""}`,class:"ss-dash-widget-row-link"},[n("span",{style:{color:"var(--ss-red-fg)"},title:ne.message},h(ne.message),9,hf),ne.timestamp?(u(),d("span",{key:0,class:"ss-dash-secondary-list-value",style:{color:"var(--ss-dim)"},title:x(jt)(ne.timestamp)},h(x(kt)(ne.timestamp)),9,pf)):G("",!0)],8,ff)]))),128))]))]),n("div",vf,[M[16]||(M[16]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#events",class:"ss-dash-widget-link"},"Top Events")],-1)),v.value.topEvents.length===0?(u(),d("div",gf," No events yet ")):(u(),d("ul",yf,[(u(!0),d(N,null,ye(v.value.topEvents.slice(0,5),(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#events?event_name=${encodeURIComponent(nt(ne))}`,class:"ss-dash-widget-row-link"},[n("span",null,h(nt(ne)),1),n("span",bf,h(ne.count),1)],8,mf)]))),128))]))]),n("div",_f,[M[20]||(M[20]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#emails",class:"ss-dash-widget-link"},"Email Activity")],-1)),n("ul",xf,[n("li",null,[n("a",wf,[M[17]||(M[17]=n("span",null,"Sent",-1)),n("span",kf,h(v.value.emailActivity.sent),1)])]),n("li",null,[n("a",$f,[M[18]||(M[18]=n("span",null,"Queued",-1)),n("span",Sf,h(v.value.emailActivity.queued),1)])]),n("li",null,[n("a",Cf,[M[19]||(M[19]=n("span",null,"Failed",-1)),n("span",{class:"ss-dash-secondary-list-value",style:qe(v.value.emailActivity.failed>0?{color:"var(--ss-red-fg)"}:void 0)},h(v.value.emailActivity.failed),5)])])])]),n("div",Tf,[M[25]||(M[25]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#logs",class:"ss-dash-widget-link"},"Log Levels")],-1)),n("ul",Ef,[n("li",null,[n("a",Pf,[M[21]||(M[21]=n("span",{style:{color:"var(--ss-red-fg)"}},"Error",-1)),n("span",Rf,h(v.value.logLevelBreakdown.error),1)])]),n("li",null,[n("a",Mf,[M[22]||(M[22]=n("span",{style:{color:"var(--ss-amber-fg)"}},"Warn",-1)),n("span",Af,h(v.value.logLevelBreakdown.warn),1)])]),n("li",null,[n("a",Lf,[M[23]||(M[23]=n("span",{style:{color:"var(--ss-green-fg)"}},"Info",-1)),n("span",Of,h(v.value.logLevelBreakdown.info),1)])]),n("li",null,[n("a",Df,[M[24]||(M[24]=n("span",{style:{color:"var(--ss-dim)"}},"Debug",-1)),n("span",Ff,h(v.value.logLevelBreakdown.debug),1)])])])]),v.value.cacheStats&&v.value.cacheStats.available?(u(),d("div",If,[M[29]||(M[29]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#cache",class:"ss-dash-widget-link"},"Cache")],-1)),n("ul",Bf,[n("li",null,[n("a",Nf,[M[26]||(M[26]=n("span",null,"Keys",-1)),n("span",jf,h(v.value.cacheStats.totalKeys),1)])]),n("li",null,[n("a",Hf,[M[27]||(M[27]=n("span",null,"Hit Rate",-1)),n("span",Uf,h(v.value.cacheStats.hitRate.toFixed(1))+"%",1)])]),n("li",null,[n("a",qf,[M[28]||(M[28]=n("span",null,"Memory",-1)),n("span",Kf,h(v.value.cacheStats.memoryUsedHuman),1)])])])])):G("",!0),v.value.jobQueueStatus&&v.value.jobQueueStatus.available?(u(),d("div",Vf,[M[34]||(M[34]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#jobs",class:"ss-dash-widget-link"},"Job Queue")],-1)),n("ul",zf,[n("li",null,[n("a",Wf,[M[30]||(M[30]=n("span",null,"Active",-1)),n("span",Qf,h(v.value.jobQueueStatus.active),1)])]),n("li",null,[n("a",Jf,[M[31]||(M[31]=n("span",null,"Waiting",-1)),n("span",Gf,h(v.value.jobQueueStatus.waiting),1)])]),n("li",null,[n("a",Yf,[M[32]||(M[32]=n("span",null,"Failed",-1)),n("span",{class:"ss-dash-secondary-list-value",style:qe(v.value.jobQueueStatus.failed>0?{color:"var(--ss-red-fg)"}:void 0)},h(v.value.jobQueueStatus.failed),5)])]),n("li",null,[n("a",Xf,[M[33]||(M[33]=n("span",null,"Completed",-1)),n("span",Zf,h(v.value.jobQueueStatus.completed),1)])])])])):G("",!0),n("div",eh,[M[39]||(M[39]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#requests",class:"ss-dash-widget-link"},"Response Status")],-1)),n("ul",th,[n("li",null,[n("a",sh,[M[35]||(M[35]=n("span",{style:{color:"var(--ss-green-fg)"}},"2xx",-1)),n("span",nh,h(v.value.statusDistribution["2xx"]),1)])]),n("li",null,[n("a",lh,[M[36]||(M[36]=n("span",{style:{color:"var(--ss-blue-fg)"}},"3xx",-1)),n("span",oh,h(v.value.statusDistribution["3xx"]),1)])]),n("li",null,[n("a",ih,[M[37]||(M[37]=n("span",{style:{color:"var(--ss-amber-fg)"}},"4xx",-1)),n("span",ah,h(v.value.statusDistribution["4xx"]),1)])]),n("li",null,[n("a",rh,[M[38]||(M[38]=n("span",{style:{color:"var(--ss-red-fg)"}},"5xx",-1)),n("span",uh,h(v.value.statusDistribution["5xx"]),1)])])])]),n("div",ch,[M[40]||(M[40]=n("div",{class:"ss-dash-secondary-card-title"},[n("a",{href:"#queries",class:"ss-dash-widget-link"},"Slowest Queries")],-1)),v.value.slowestQueries.length===0?(u(),d("div",dh," No query data yet ")):(u(),d("ul",fh,[(u(!0),d(N,null,ye(v.value.slowestQueries.slice(0,5),(ne,fe)=>(u(),d("li",{key:fe},[n("a",{href:`#queries?pattern=${encodeURIComponent(tt(ne))}`,class:"ss-dash-widget-row-link"},[n("span",{title:tt(ne)},h(tt(ne)),9,ph),n("span",{class:R(["ss-dash-secondary-list-value","ss-dash-duration",Ce(ne.avgDuration)])},h(x(Nt)(ne.avgDuration)),3)],8,hh)]))),128))]))])])],64))]))}}),[["__scopeId","data-v-6c6eb892"]])},Symbol.toStringTag,{value:"Module"}));function cl(e="",t){let s=null;return function(){return s||(s=new ll({baseUrl:e,authToken:t})),s}}function Jt(e){const t=W(null);let s=null;function l(){s&&s(),s=null,Dn(()=>{t.value&&(s=Iu(t.value))})}return e&&ht(e,l),It(l),to(()=>{s&&s(),s=null}),{tableRef:t}}const gh={class:"ss-dash-filter-bar"},yh={key:0,class:"ss-dash-summary"},mh={class:"ss-dash-search-wrapper"},bh=["viewBox","innerHTML"],_h=["value","placeholder"],xh={key:1,class:"ss-dash-filter-controls"},qt=Ne({__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 i(){s("update:modelValue",""),s("clear")}return(o,a)=>(u(),d("div",gh,[e.summary?(u(),d("span",yh,h(e.summary),1)):G("",!0),n("div",mh,[(u(),d("svg",{class:"ss-dash-search-icon",viewBox:x(Fe).search.viewBox,width:"14",height:"14",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:x(Fe).search.elements.join("")},null,8,bh)),n("input",{class:"ss-dash-search",type:"text",value:e.modelValue,placeholder:e.placeholder||"Search...",onInput:l},null,40,_h),e.modelValue?(u(),d("button",{key:0,type:"button",class:"ss-dash-search-clear",onClick:i}," × ")):G("",!0)]),o.$slots.default?(u(),d("div",xh,[La(o.$slots,"default")])):G("",!0)]))}}),wh={key:0,class:"ss-dash-pagination"},kh={class:"ss-dash-page-info"},$h={class:"ss-dash-pagination-controls"},Sh=["disabled"],Ch={key:0,class:"ss-dash-page-ellipsis"},Th=["onClick"],Eh=["disabled"],ps=Ne({__name:"PaginationControls",props:{page:{},lastPage:{},total:{}},emits:["pageChange"],setup(e,{emit:t}){const s=e,l=t,i=H(()=>Cu(s.page,s.lastPage));return(o,a)=>e.lastPage>1?(u(),d("div",wh,[n("span",kh," Page "+h(e.page)+" of "+h(e.lastPage)+" ("+h(e.total)+" total) ",1),n("div",$h,[n("button",{type:"button",class:"ss-dash-page-btn",disabled:e.page<=1,onClick:a[0]||(a[0]=r=>l("pageChange",e.page-1))}," « Prev ",8,Sh),(u(!0),d(N,null,ye(i.value,(r,c)=>(u(),d(N,{key:r==="..."?`ellipsis-${c}`:r},[r==="..."?(u(),d("span",Ch,"...")):(u(),d("button",{key:1,type:"button",class:R(`ss-dash-page-btn ${r===e.page?"ss-dash-active":""}`),onClick:g=>l("pageChange",r)},h(r),11,Th))],64))),128)),n("button",{type:"button",class:"ss-dash-page-btn",disabled:e.page>=e.lastPage,onClick:a[1]||(a[1]=r=>l("pageChange",e.page+1))}," Next » ",8,Eh)])])):G("",!0)}}),Ph={key:0,class:"ss-dash-empty"},Rh={class:"ss-dash-tl-legend"},Mh=["title"],Ah={class:"ss-dash-tl-track"},Lh=["title"],Oh={class:"ss-dash-tl-dur"},Dh={key:0,class:"ss-dash-tl-warnings"},Fh={class:"ss-dash-tl-warnings-title"},bi=Ne({__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"},i=H(()=>t.spans||[]),o=H(()=>[...i.value].sort((w,$)=>w.startOffset-$.startOffset)),a=H(()=>{const w={};for(const $ of o.value)w[$.id]=$.parentId?(w[$.parentId]||0)+1:0;return w});function r(w){const $=t.totalDuration||1;return`${w.startOffset/$*100}%`}function c(w){const $=t.totalDuration||1;return`${Math.max(w.duration/$*100,.5)}%`}function g(w){return w.length>50?w.slice(0,50)+"...":w}function p(w){return w==="db"?"DB":w}function b(w){return w==="db"?"purple":w==="mail"?"green":w==="event"?"amber":w==="view"?"blue":"muted"}function v(w){const $=w.metadata?Object.entries(w.metadata).filter(([,_])=>_!=null).map(([_,C])=>`${_}=${C}`).join(", "):"";return $?`${w.label} (${w.duration.toFixed(2)}ms)
5
5
  ${$}`:`${w.label} (${w.duration.toFixed(2)}ms)`}return(w,$)=>i.value.length===0?(u(),d("div",Ph,"No spans recorded")):(u(),d("div",{key:1,class:R(`ss-dash-tl-waterfall ${e.className||""}`)},[n("div",Rh,[(u(),d(N,null,ye(l,(_,C)=>n("div",{key:C,class:"ss-dash-tl-legend-item"},[n("span",{class:"ss-dash-tl-legend-dot",style:qe({background:s[C]||s.custom})},null,4),n("span",null,h(_),1)])),64))]),(u(!0),d(N,null,ye(o.value,_=>(u(),d("div",{key:_.id,class:"ss-dash-tl-row"},[n("div",{class:"ss-dash-tl-label",title:v(_),style:qe({paddingLeft:8+(a.value[_.id]||0)*16+"px"})},[n("span",{class:R(`ss-dash-badge ss-dash-badge-${b(_.category)}`),style:{"font-size":"9px","margin-right":"4px"}},h(p(_.category)),3),me(" "+h(g(_.label)),1)],12,Mh),n("div",Ah,[n("div",{class:R(`ss-dash-tl-bar ss-dash-tl-bar-${_.category||"custom"}`),style:qe({left:r(_),width:c(_)}),title:v(_)},null,14,Lh)]),n("span",Oh,h(_.duration.toFixed(2))+"ms",1)]))),128)),e.warnings&&e.warnings.length>0?(u(),d("div",Dh,[n("div",Fh,"Warnings ("+h(e.warnings.length)+")",1),(u(!0),d(N,null,ye(e.warnings,(_,C)=>(u(),d("div",{key:C,class:"ss-dash-tl-warning"},h(_),1))),128))])):G("",!0)],2))}}),Ls=Ne({__name:"JsonViewer",props:{value:{},maxLen:{},classPrefix:{default:"ss-dash"},defaultExpanded:{type:Boolean,default:!1}},setup(e){const t=e,s=W(t.defaultExpanded),l=H(()=>{if(t.value===null||t.value===void 0)return"-";if(typeof t.value=="string")try{return an(JSON.parse(t.value),t.maxLen||100)}catch{return t.value.length>100?t.value.slice(0,100)+"...":t.value}return an(t.value,t.maxLen||100)}),i=H(()=>{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 a(){navigator.clipboard?.writeText(i.value)}return(r,c)=>e.value===null||e.value===void 0?(u(),d("span",{key:0,class:R(`ss-dim ${t.classPrefix}-c-dim`)},"-",2)):(u(),d("div",{key:1,class:R(`${t.classPrefix}-data-cell`)},[s.value?G("",!0):(u(),d("span",{key:0,class:R(`${t.classPrefix}-data-preview`),role:"button",tabindex:0,onClick:o,onKeydown:c[0]||(c[0]=g=>g.key==="Enter"&&o())},h(l.value),35)),s.value?(u(),d("div",{key:1,class:R(`${t.classPrefix}-data-full`),onClick:o},[n("button",{class:R(`${t.classPrefix}-copy-btn`),title:"Copy to clipboard",onClick:at(a,["stop"])}," Copy ",2),n("pre",null,h(i.value),1)],2)):G("",!0)],2))}}),Ih={key:0},Bh={class:"ss-related-logs-title"},Nh={class:"ss-related-logs-count"},jh={style:{overflow:"auto"}},Hh=["onClick"],Uh=["title"],qh=["title"],Kh={key:1,class:"ss-log-reqid-empty"},Vh={key:3,style:{width:"14px"}},zh={class:"ss-log-msg"},Wh={key:0,class:"ss-log-detail"},Qh=Ne({__name:"RelatedLogs",props:{logs:{}},setup(e){const t=W(null);function s(l,i){i&&(t.value=t.value===l?null:l)}return(l,i)=>e.logs.length>0?(u(),d("div",Ih,[n("div",Bh,[i[0]||(i[0]=me(" Related Logs ",-1)),n("span",Nh,"("+h(e.logs.length)+")",1)]),n("div",jh,[(u(!0),d(N,null,ye(e.logs,(o,a)=>(u(),d(N,{key:o.id||a},[n("div",{class:R(["ss-log-entry",x($t)(o)?"ss-log-entry-expandable":""]),onClick:r=>s(a,!!x($t)(o))},[n("span",{class:R(["ss-log-level",x(di)(x(rn)(o),"ss-log-level")])},h(x(rn)(o).toUpperCase()),3),n("span",{class:"ss-log-time",title:x(Ht)(o)?x(jt)(x(Ht)(o)):""},h(x(Ht)(o)?x(kt)(x(Ht)(o)):"-"),9,Uh),x(Ut)(o)?(u(),d("span",{key:0,class:"ss-log-reqid",title:x(Ut)(o)},h(x(Ut)(o).slice(0,8)),9,qh)):(u(),d("span",Kh,"--")),x($t)(o)?(u(),d("span",{key:2,class:R(["ss-log-expand-icon",t.value===a?"ss-log-expand-icon-open":""])},"▶",2)):(u(),d("span",Vh)),n("span",zh,h(x(ci)(o)),1)],10,Hh),t.value===a&&x($t)(o)?(u(),d("div",Wh,[Se(Ls,{value:x($t)(o),"class-prefix":"ss-dbg","default-expanded":!0},null,8,["value"])])):G("",!0)],64))),128))])])):G("",!0)}}),Jh={class:"ss-dash-tl-detail-header"},Gh={style:{color:"var(--ss-text)"}},Yh={class:"ss-dash-tl-meta"},Xh={class:"ss-dash-tl-detail-header"},Zh={key:0,class:"ss-dash-empty"},ep={key:1,class:"ss-dash-empty"},tp={class:"ss-dash-table-wrap"},sp={key:0,class:"ss-dash-sort-arrow"},np={key:0,class:"ss-dash-sort-arrow"},lp={key:0,class:"ss-dash-sort-arrow"},op={key:0,class:"ss-dash-sort-arrow"},ip={key:0,class:"ss-dash-sort-arrow"},ap=["onClick"],rp={style:{color:"var(--ss-dim)"}},up=["title"],cp={style:{color:"var(--ss-muted)","text-align":"center"}},dp={key:0,style:{color:"var(--ss-amber-fg)","text-align":"center",display:"block"}},fp={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},hp=["title"],pp={key:1,class:"ss-dash-empty"},vp=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"RequestsSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,error:r,pagination:c,sort:g,goToPage:p,setSearch:b,setSort:v}=rt(()=>"requests",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),w=W(""),$=W(null),_=W(!1),C=W(null),A=H(()=>{if(!o.value)return[];const we=o.value;return we.data||we.requests||o.value||[]}),P=cl(i,l);async function y(we){const z=we.id;_.value=!0;try{const B=s||"/__stats/api",_e=await P().fetch(`${B}/requests/${z}`),xe=_e.trace,ie=xe?{..._e,...xe,logs:_e.logs}:_e;C.value=oc(ie),$.value=we}catch{}finally{_.value=!1}}function k(){$.value=null,C.value=null}function S(we){w.value=we,b(we)}function Q(we){v(we)}function te(we){return il(we,"ss-dash")}const{tableRef:se}=Jt(()=>A.value),Y=W(null),be=W(null),Re=W(null),ke=W(null);let Me=null;const Ce=H(()=>C.value?C.value.logs||[]:[]);return ht([()=>$.value,()=>C.value],async()=>{Me?.(),Me=null,C.value&&Ce.value.length>0&&(await Dn(),Y.value&&be.value&&Re.value&&ke.value&&(Me=Bu({container:Y.value,handle:be.value,topPane:Re.value,bottomPane:ke.value,storageKey:"ss-requests-split"})))}),Pt(()=>{Me?.()}),(we,z)=>(u(),d("div",null,[C.value&&$.value?(u(),d(N,{key:0},[n("div",Jh,[n("button",{type:"button",class:"ss-dash-btn",onClick:k}," ← Back to Requests "),n("span",{class:R(`ss-dash-method ss-dash-method-${(C.value.method||"").toLowerCase()}`)},h(C.value.method),3),n("span",Gh,h(C.value.url),1),n("span",{class:R(`ss-dash-status ss-dash-status-${Math.floor((C.value.statusCode||200)/100)}xx`)},h(C.value.statusCode),3),n("span",Yh,h(C.value.totalDuration.toFixed(1))+"ms · "+h(C.value.spanCount)+" spans ",1)]),Ce.value.length>0?(u(),d("div",{key:0,ref_key:"splitContainerRef",ref:Y,class:"ss-dash-split-container"},[n("div",{ref_key:"splitTopRef",ref:Re,class:"ss-dash-split-top"},[Se(bi,{spans:C.value.spans,"total-duration":C.value.totalDuration,warnings:C.value.warnings},null,8,["spans","total-duration","warnings"])],512),n("div",{ref_key:"splitHandleRef",ref:be,class:"ss-dash-split-handle"},null,512),n("div",{ref_key:"splitBottomRef",ref:ke,class:"ss-dash-split-bottom"},[Se(Qh,{logs:Ce.value},null,8,["logs"])],512)],512)):(u(),st(bi,{key:1,spans:C.value.spans,"total-duration":C.value.totalDuration,warnings:C.value.warnings},null,8,["spans","total-duration","warnings"]))],64)):_.value?(u(),d(N,{key:1},[n("div",Xh,[n("button",{type:"button",class:"ss-dash-btn",onClick:z[0]||(z[0]=B=>_.value=!1)}," ← Back to Requests ")]),z[6]||(z[6]=n("div",{class:"ss-dash-empty"},"Loading request detail...",-1))],64)):(u(),d(N,{key:2},[Se(qt,{"model-value":w.value,placeholder:"Filter requests...",summary:`${x(c).total??0} requests`,"onUpdate:modelValue":S},null,8,["model-value","summary"]),x(r)?(u(),d("div",Zh,"Failed to load requests")):G("",!0),x(a)&&!x(o)?(u(),d("div",ep,"Loading requests...")):(u(),d(N,{key:2},[n("div",tp,[A.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:se,class:"ss-dash-table"},[z[15]||(z[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,[z[12]||(z[12]=n("th",null,"#",-1)),n("th",{class:"ss-dash-sortable",onClick:z[1]||(z[1]=B=>Q("method"))},[z[7]||(z[7]=me(" Method ",-1)),x(g).column==="method"?(u(),d("span",sp,h(x(g).direction==="asc"?" ▲":" ▼"),1)):G("",!0)]),n("th",{class:"ss-dash-sortable",onClick:z[2]||(z[2]=B=>Q("url"))},[z[8]||(z[8]=me(" URL ",-1)),x(g).column==="url"?(u(),d("span",np,h(x(g).direction==="asc"?" ▲":" ▼"),1)):G("",!0)]),n("th",{class:"ss-dash-sortable",onClick:z[3]||(z[3]=B=>Q("statusCode"))},[z[9]||(z[9]=me(" Status ",-1)),x(g).column==="statusCode"?(u(),d("span",lp,h(x(g).direction==="asc"?" ▲":" ▼"),1)):G("",!0)]),n("th",{class:"ss-dash-sortable",onClick:z[4]||(z[4]=B=>Q("duration"))},[z[10]||(z[10]=me(" Duration ",-1)),x(g).column==="duration"?(u(),d("span",op,h(x(g).direction==="asc"?" ▲":" ▼"),1)):G("",!0)]),z[13]||(z[13]=n("th",null,"Spans",-1)),z[14]||(z[14]=n("th",null,"⚠",-1)),n("th",{class:"ss-dash-sortable",onClick:z[5]||(z[5]=B=>Q("createdAt"))},[z[11]||(z[11]=me(" Time ",-1)),x(g).column==="createdAt"?(u(),d("span",ip,h(x(g).direction==="asc"?" ▲":" ▼"),1)):G("",!0)])])]),n("tbody",null,[(u(!0),d(N,null,ye(A.value,B=>(u(),d("tr",{key:B.id,class:"ss-dash-clickable",onClick:j=>y(B)},[n("td",null,[n("span",rp,h(B.id),1)]),n("td",null,[n("span",{class:R(`ss-dash-method ss-dash-method-${(B.method||"").toLowerCase()}`)},h(B.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:B.url},h(B.url),9,up)]),n("td",null,[n("span",{class:R(`ss-dash-status ss-dash-status-${Math.floor((B.status_code||B.statusCode||200)/100)}xx`)},h(B.status_code||B.statusCode),3)]),n("td",null,[n("span",{class:R(`ss-dash-duration ${te(B.total_duration||B.totalDuration||B.duration||0)}`)},h((B.total_duration||B.totalDuration||B.duration||0).toFixed(1))+"ms ",3)]),n("td",null,[n("span",cp,h(B.span_count||B.spanCount||0),1)]),n("td",null,[(B.warning_count||B.warningCount||0)>0?(u(),d("span",dp,h(B.warning_count||B.warningCount||0),1)):(u(),d("span",fp,"-"))]),n("td",null,[n("span",{class:"ss-dash-event-time",title:x(jt)(B.createdAt||B.created_at||B.timestamp||"")},h(x(kt)(B.createdAt||B.created_at||B.timestamp||"")),9,hp)])],8,ap))),128))])],512)):(u(),d("div",pp,"No requests recorded yet"))]),x(c).totalPages>1?(u(),st(ps,{key:0,page:x(c).page,"last-page":x(c).totalPages,total:x(c).total,onPageChange:x(p)},null,8,["page","last-page","total","onPageChange"])):G("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),gp={class:"ss-dash-btn-group"},yp={key:0,class:"ss-dash-empty"},mp={key:1,class:"ss-dash-table-wrap"},bp=["onClick"],_p={key:0,class:"ss-dash-sort-arrow"},xp=["onClick","onKeydown"],wp={key:0,class:"ss-dash-dup"},kp={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},$p={class:"ss-dash-duration"},Sp={class:"ss-dash-duration"},Cp={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Tp={key:1,class:"ss-dash-empty"},Ep={class:"ss-dash-table-wrap"},Pp=["onClick"],Rp={key:0,class:"ss-dash-sort-arrow"},Mp={key:1},Ap={style:{color:"var(--ss-dim)"}},Lp=["onClick","onKeydown"],Op={key:0,class:"ss-dash-dup"},Dp=["title"],Fp={style:{color:"var(--ss-dim)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}},Ip=["title"],Bp=["disabled","onClick"],Np={key:0,class:"ss-dash-explain-row"},jp={colspan:"8",class:"ss-dash-explain"},Hp={style:{display:"flex","justify-content":"space-between","align-items":"start"}},Up={style:{flex:"1"}},qp={key:0,class:"ss-dash-explain-result ss-dash-explain-error"},Kp={key:0},Vp={key:1,class:"ss-dash-explain-result"},zp={class:"ss-dash-explain-node-header"},Wp={class:"ss-dash-explain-node-type"},Qp={key:0,class:"ss-dash-explain-metrics"},Jp={key:2,class:"ss-dash-explain-result"},Gp={key:3,class:"ss-dash-explain-result"},Yp=["onClick"],Xp={key:1,class:"ss-dash-empty"},Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"QueriesSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),o=new Xu("list"),a=W(0);function r(){a.value++}const c=H(()=>(a.value,o.state.viewMode)),g=H(()=>Gu()),p=H(()=>Yu()),b=H(()=>c.value==="grouped"?"queries/grouped":"queries"),{data:v,loading:w,pagination:$,sort:_,goToPage:C,setSearch:A,setSort:P,explainQuery:y}=rt(()=>b.value,{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),k=W(""),S=H(()=>v.value?c.value==="grouped"?v.value.groups||[]:v.value.data||v.value||[]:[]),Q=H(()=>c.value!=="grouped"?S.value:S.value.map(K=>{const Z={...K};return(Z.sqlNormalized===null||Z.sqlNormalized===void 0)&&(Z.sqlNormalized=ze(K,"sql_normalized","pattern")??""),(Z.count===null||Z.count===void 0)&&(Z.count=ze(K,"total_count")??void 0),(Z.avgDuration===null||Z.avgDuration===void 0)&&(Z.avgDuration=ze(K,"avg_duration")??void 0),(Z.maxDuration===null||Z.maxDuration===void 0)&&(Z.maxDuration=ze(K,"max_duration")??void 0),(Z.minDuration===null||Z.minDuration===void 0)&&(Z.minDuration=ze(K,"min_duration")??void 0),(Z.totalDuration===null||Z.totalDuration===void 0)&&(Z.totalDuration=ze(K,"total_duration")??void 0),(Z.percentOfTotal===null||Z.percentOfTotal===void 0)&&(Z.percentOfTotal=ze(K,"pct_time")??void 0),Z})),te=H(()=>c.value!=="list"?[]:S.value.map(K=>Vu(K))),se=H(()=>hi(S.value)),Y=H(()=>Ku(S.value,{total:$.total})),be=H(()=>{if(c.value==="grouped")return`${Q.value.length} query patterns`;const K=[`${Y.value.totalCount} queries`];return Y.value.slowCount>0&&K.push(`${Y.value.slowCount} slow`),Y.value.dupCount>0&&K.push(`${Y.value.dupCount} dup`),K.push(`avg ${(Y.value.avgDuration||0).toFixed(1)}ms`),K.join(", ")});function Re(K){k.value=K,A(K)}function ke(K){K!==c.value&&(o.setViewMode(K),r())}function Me(K){P(K)}function Ce(K){return a.value,o.isExpanded(K)}function we(K){o.toggleExpand(K),r()}async function z(K){const Z=o.getExplainState(K);if(Z&&!Z.loading){o.state.explainData.delete(K),r();return}o.startExplain(K),r();try{const E=await y(K);if(E&&E.error){const Be=E.message?`${E.error}: ${E.message}`:E.error;o.failExplain(K,Be)}else o.completeExplain(K,{plan:E?.plan,rows:E?.rows})}catch(E){let Be=E instanceof Error?E.message:String(E);const f=E?.body;if(f)try{const m=JSON.parse(f);m.message?Be=m.error?`${m.error}: ${m.message}`:m.message:m.error&&(Be=m.error)}catch{}o.failExplain(K,Be)}r()}function B(K){return a.value,o.getExplainState(K)}function j(K){return a.value,o.getExplainState(K)?.loading??!1}function _e(K){a.value;const Z=o.getExplainState(K);return!!Z&&!Z.loading&&!Z.error&&!!Z.result}function xe(K){o.state.explainData.delete(K),r()}function ie(K){const Z=B(K);if(!Z?.result)return[];const E=Z.result.plan||Z.result.rows;if(!E||E.length===0)return[];const Be=E[0];return!Be||typeof Be!="object"?[]:"Plan"in Be?pi(Be.Plan):[]}function he(K){const Z=B(K);if(!Z?.result)return[];const E=Z.result.plan||Z.result.rows;return!E||E.length===0?[]:Qu(E)}function re(K){const Z=B(K);return Z?.result?Z.result.plan||Z.result.rows||[]:[]}function q(K){const Z=B(K);if(!Z?.result)return!1;const E=Z.result.plan||Z.result.rows;return!E||E.length===0?!1:Wu(E[0])}function le(K){const Z=B(K);if(!Z?.result)return!1;const E=Z.result.plan||Z.result.rows;return!!E&&E.length>0&&typeof E[0]=="object"}function U(K){return il(K,"ss-dash")}const{tableRef:oe}=Jt(()=>Q.value);return(K,Z)=>(u(),d("div",null,[Se(qt,{"model-value":k.value,placeholder:"Filter queries...",summary:be.value,"onUpdate:modelValue":Re},{default:os(()=>[n("div",gp,[n("button",{type:"button",class:R(`ss-dash-btn ${c.value==="list"?"ss-dash-active":""}`),onClick:Z[0]||(Z[0]=E=>ke("list"))}," List ",2),n("button",{type:"button",class:R(`ss-dash-btn ${c.value==="grouped"?"ss-dash-active":""}`),onClick:Z[1]||(Z[1]=E=>ke("grouped"))}," Grouped ",2)])]),_:1},8,["model-value","summary"]),x(w)&&!x(v)?(u(),d("div",yp,"Loading queries...")):c.value==="grouped"?(u(),d("div",mp,[Q.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:oe,class:"ss-dash-table"},[n("thead",null,[n("tr",null,[(u(!0),d(N,null,ye(p.value,E=>(u(),d("th",{key:E.key,class:R(E.sortable?"ss-dash-sortable":""),onClick:Be=>E.sortable?Me(E.key):void 0},[me(h(E.label)+" ",1),E.sortable&&x(_).column===E.key?(u(),d("span",_p,h(x(_).direction==="asc"?" ▲":" ▼"),1)):G("",!0)],10,bp))),128))])]),n("tbody",null,[(u(!0),d(N,null,ye(Q.value,(E,Be)=>(u(),d("tr",{key:Be},[n("td",null,[n("span",{class:R(`ss-dash-sql ${Ce(E.sqlNormalized)?"ss-dash-expanded":""}`),title:"Click to expand",role:"button",tabindex:"0",onClick:at(f=>we(E.sqlNormalized),["stop"]),onKeydown:Rs(f=>we(E.sqlNormalized),["enter"])},h(E.sqlNormalized),43,xp),(E.count||0)>=3?(u(),d("span",wp,"DUP")):G("",!0)]),n("td",null,[n("span",kp,h(E.count||0),1)]),n("td",null,[n("span",{class:R(`ss-dash-duration ${U(E.avgDuration||0)}`)},h((E.avgDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",$p,h((E.minDuration||0).toFixed(2))+"ms",1)]),n("td",null,[n("span",{class:R(`ss-dash-duration ${U(E.maxDuration||0)}`)},h((E.maxDuration||0).toFixed(2))+"ms ",3)]),n("td",null,[n("span",Sp,h((E.totalDuration||0).toFixed(1))+"ms",1)]),n("td",null,[n("span",Cp,h((E.percentOfTotal||0).toFixed(1))+"%",1)])]))),128))])],512)):(u(),d("div",Tp,[...Z[2]||(Z[2]=[n("span",null,"No queries recorded",-1),n("span",{class:"ss-empty-hint"},[me(" Queries require "),n("code",null,"debug: true"),me(" on your Lucid connections in "),n("code",null,"config/database.ts")],-1)])]))])):(u(),d(N,{key:2},[n("div",Ep,[te.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:oe,class:"ss-dash-table"},[n("colgroup",null,[(u(!0),d(N,null,ye(g.value,E=>(u(),d("col",{key:E.key+E.type,style:qe(E.width?{width:E.width}:{})},null,4))),128))]),n("thead",null,[n("tr",null,[(u(!0),d(N,null,ye(g.value,E=>(u(),d(N,{key:E.key+E.type},[E.sortable?(u(),d("th",{key:0,class:"ss-dash-sortable",onClick:Be=>Me(E.key)},[me(h(E.label)+" ",1),x(_).column===E.key?(u(),d("span",Rp,h(x(_).direction==="asc"?" ▲":" ▼"),1)):G("",!0)],8,Pp)):(u(),d("th",Mp,h(E.label),1))],64))),128))])]),n("tbody",null,[(u(!0),d(N,null,ye(te.value,(E,Be)=>(u(),d(N,{key:E.id},[n("tr",null,[n("td",null,[n("span",Ap,h(E.id),1)]),n("td",null,[n("div",null,[n("span",{class:R(`ss-dash-sql ${Ce(E.id)?"ss-dash-expanded":""}`),title:"Click to expand",role:"button",tabindex:"0",onClick:at(f=>we(E.id),["stop"]),onKeydown:Rs(f=>we(E.id),["enter"])},h(E.sql),43,Lp),(se.value.get(E.sqlNormalized)??0)>1?(u(),d("span",Op," ×"+h(se.value.get(E.sqlNormalized)),1)):G("",!0)])]),n("td",null,[n("span",{class:R(`ss-dash-duration ${U(E.duration)}`)},h(E.duration.toFixed(2))+"ms ",3)]),n("td",null,[n("span",{class:R(`ss-dash-method ss-dash-method-${E.method.toLowerCase()}`)},h(E.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:E.model},h(E.model||"-"),9,Dp)]),n("td",null,[n("span",Fp,h(E.connection||"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",title:x(jt)(String(E.timestamp))},h(x(kt)(String(E.timestamp))),9,Ip)]),n("td",null,[E.method==="select"?(u(),d("button",{key:0,type:"button",class:R(`ss-dash-explain-btn${_e(E.id)?" ss-dash-explain-btn-active":""}`),disabled:j(E.id),onClick:at(f=>z(E.id),["stop"])},h(j(E.id)?"...":"EXPLAIN"),11,Bp)):G("",!0)])]),B(E.id)?(u(),d("tr",Np,[n("td",jp,[n("div",Hp,[n("div",Up,[B(E.id)?.error?(u(),d("div",qp,[Z[3]||(Z[3]=n("strong",null,"Error:",-1)),me(" "+h(B(E.id)?.error)+" ",1),B(E.id)?.result?.message?(u(),d("br",Kp)):G("",!0),me(" "+h(B(E.id)?.result?.message),1)])):q(E.id)?(u(),d("div",Vp,[(u(!0),d(N,null,ye(ie(E.id),(f,m)=>(u(),d("div",{key:m,class:"ss-dash-explain-node",style:qe({marginLeft:`${f.depth*20}px`})},[n("div",zp,[n("span",Wp,h(f.nodeType),1),f.relationName?(u(),d(N,{key:0},[Z[4]||(Z[4]=me(h(" on "),-1)),n("strong",null,h(f.relationName),1)],64)):G("",!0),f.alias?(u(),d(N,{key:1},[me(h(` (${f.alias})`),1)],64)):G("",!0),f.indexName?(u(),d(N,{key:2},[Z[5]||(Z[5]=me(h(" using "),-1)),n("em",null,h(f.indexName),1)],64)):G("",!0)]),f.metrics.length>0?(u(),d("div",Qp,h(f.metrics.join(" · ")),1)):G("",!0)],4))),128))])):le(E.id)?(u(),d("div",Jp,[n("table",null,[n("thead",null,[n("tr",null,[(u(!0),d(N,null,ye(he(E.id),f=>(u(),d("th",{key:f},h(f),1))),128))])]),n("tbody",null,[(u(!0),d(N,null,ye(re(E.id),(f,m)=>(u(),d("tr",{key:m},[(u(!0),d(N,null,ye(he(E.id),T=>(u(),d("td",{key:T},h(x(Ju)(f[T])),1))),128))]))),128))])])])):(u(),d("div",Gp,"No plan data returned"))]),n("button",{type:"button",class:"ss-dash-explain-btn",style:{"margin-left":"8px","flex-shrink":"0"},onClick:f=>xe(E.id)}," Close ",8,Yp)])])])):G("",!0)],64))),128))])],512)):(u(),d("div",Xp,[...Z[6]||(Z[6]=[n("span",null,"No queries recorded",-1),n("span",{class:"ss-empty-hint"},[me(" Queries require "),n("code",null,"debug: true"),me(" on your Lucid connections in "),n("code",null,"config/database.ts")],-1)])]))]),x($).totalPages>1?(u(),st(ps,{key:0,page:x($).page,"last-page":x($).totalPages,total:x($).total,onPageChange:x(C)},null,8,["page","last-page","total","onPageChange"])):G("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),ev={key:0,class:"ss-dash-empty"},tv={class:"ss-dash-table-wrap"},sv={style:{color:"var(--ss-dim)"}},nv=["title"],lv=["title"],ov={key:1,class:"ss-dash-empty"},iv=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"EventsSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,pagination:r,goToPage:c,setSearch:g}=rt(()=>"events",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),p=W(""),b=H(()=>{if(!o.value)return[];const $=o.value;return $.data||$.events||o.value||[]});function v($){p.value=$,g($)}const{tableRef:w}=Jt(()=>b.value);return($,_)=>(u(),d("div",null,[Se(qt,{"model-value":p.value,placeholder:"Filter events...",summary:`${x(r).total??0} events`,"onUpdate:modelValue":v},null,8,["model-value","summary"]),x(a)&&!x(o)?(u(),d("div",ev,"Loading events...")):(u(),d(N,{key:1},[n("div",tv,[b.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:w,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(N,null,ye(b.value,C=>(u(),d("tr",{key:C.id},[n("td",null,[n("span",sv,h(C.id),1)]),n("td",null,[n("span",{class:"ss-dash-event-name",title:C.event_name||C.eventName||C.event||"",style:{overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},h(C.event_name||C.eventName||C.event||""),9,nv)]),n("td",null,[Se(Ls,{value:C.data,class:"ss-dash-event-data"},null,8,["value"])]),n("td",null,[n("span",{class:"ss-dash-event-time",title:x(jt)(C.createdAt||C.created_at||C.timestamp)},h(x(kt)(C.createdAt||C.created_at||C.timestamp)),9,lv)])]))),128))])],512)):(u(),d("div",ov,"No events recorded yet"))]),x(r).totalPages>1?(u(),st(ps,{key:0,page:x(r).page,"last-page":x(r).totalPages,total:x(r).total,onPageChange:x(c)},null,8,["page","last-page","total","onPageChange"])):G("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),av={key:0,class:"ss-dash-empty"},rv={key:1,class:"ss-dash-empty"},uv={key:2,class:"ss-dash-table-wrap"},cv=["title"],dv=["title"],fv=["title"],hv=["title"],pv={key:1,class:"ss-dash-empty"},vv=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"RoutesSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,error:r,setSearch:c}=rt(()=>"routes",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=W(""),p=H(()=>{if(!o.value)return[];const w=o.value;return Array.isArray(w)?w:Array.isArray(w.routes)?w.routes:Array.isArray(w.data)?w.data:[]});function b(w){g.value=w,c(w)}const{tableRef:v}=Jt(()=>p.value);return(w,$)=>(u(),d("div",null,[Se(qt,{"model-value":g.value,placeholder:"Filter routes...",summary:`${p.value.length} routes`,"onUpdate:modelValue":b},null,8,["model-value","summary"]),x(r)?(u(),d("div",av,"Failed to load routes")):x(a)&&!x(o)?(u(),d("div",rv,"Loading routes...")):(u(),d("div",uv,[p.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:v,class:"ss-dash-table"},[$[0]||($[0]=n("colgroup",null,[n("col",{style:{width:"70px"}}),n("col"),n("col",{style:{width:"120px"}}),n("col"),n("col")],-1)),$[1]||($[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(N,null,ye(p.value,(_,C)=>(u(),d("tr",{key:_.pattern||C},[n("td",null,[n("span",{class:R(`ss-dash-method ss-dash-method-${(_.method||"").toLowerCase()}`)},h(_.method),3)]),n("td",null,[n("span",{style:{color:"var(--ss-text)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.pattern},h(_.pattern),9,cv)]),n("td",null,[n("span",{style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.name||"-"},h(_.name||"-"),9,dv)]),n("td",null,[n("span",{style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"},title:_.handler},h(_.handler),9,fv)]),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(", "):"-"},h(_.middleware?.length?_.middleware.join(", "):"-"),9,hv)])]))),128))])],512)):(u(),d("div",pv,"No routes available"))]))]))}})},Symbol.toStringTag,{value:"Module"})),gv={class:"ss-dash-log-filters"},yv=["onClick"],mv=["value"],bv={class:"ss-dash-structured-search"},_v=["value"],xv=["value"],wv=["value"],kv={key:0,class:"ss-dash-filter-chips"},$v={key:0,class:"ss-dash-filter-chip"},Sv={key:1,class:"ss-dash-filter-chip"},Cv=["onClick"],Tv={key:1,class:"ss-dash-empty"},Ev={key:2,class:"ss-dash-empty"},Pv={key:3,class:"ss-dash-empty"},Rv={key:4,class:"ss-dash-log-entries"},Mv=["onClick"],Av=["title"],Lv=["title","onClick","onKeydown"],Ov={key:1,class:"ss-dash-log-reqid-empty"},Dv={key:3,style:{width:"14px"}},Fv={class:"ss-dash-log-msg"},Iv={key:0,class:"ss-dash-log-detail"},Bv=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"LogsSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,error:r,pagination:c,filter:g,goToPage:p,setSearch:b,setFilter:v,refresh:w}=rt(()=>"logs",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),$=W(""),_=W("all"),C=W(""),A=W(""),P=W(null),y=W([]),k=W("level"),S=W("equals"),Q=W(""),te=H(()=>{if(!o.value)return[];const ie=o.value;return ie.data||ie.logs||o.value||[]}),se=H(()=>_.value!=="all"||C.value!==""||y.value.length>0);function Y(ie,he){he&&(P.value=P.value===ie?null:ie)}function be(ie){$.value=ie,b(ie)}function Re(ie){_.value=ie,ie==="all"?v("level",""):v("level",ie)}function ke(ie){C.value=ie,A.value=ie,v("request_id",ie)}function Me(){const ie=A.value.trim();C.value=ie,v("request_id",ie)}function Ce(){C.value="",A.value="",v("request_id","")}function we(){_.value="all",v("level","")}function z(){const ie=g;for(const he of Object.keys(ie))(he.startsWith("filter_field_")||he.startsWith("filter_op_")||he.startsWith("filter_value_"))&&delete ie[he];y.value.forEach((he,re)=>{ie[`filter_field_${re}`]=he.field,ie[`filter_op_${re}`]=he.operator,ie[`filter_value_${re}`]=he.value}),c.page=1,w()}function B(){const ie=Q.value.trim();ie&&(y.value.push({field:k.value,operator:S.value,value:ie}),Q.value="",z())}function j(ie){y.value.splice(ie,1),z()}function _e(ie){return ie.target.value}function xe(ie){return ie.target.value}return(ie,he)=>(u(),d("div",null,[Se(qt,{"model-value":$.value,placeholder:"Search logs...",summary:`${x(c).total??0} logs`,"onUpdate:modelValue":be},{default:os(()=>[n("div",gv,[(u(!0),d(N,null,ye(x(ju),re=>(u(),d("button",{key:re,type:"button",class:R(`ss-dash-log-filter ${_.value===re?"ss-dash-active":""}`),onClick:q=>Re(re)},h(re),11,yv))),128)),n("input",{type:"text",class:"ss-dash-filter-input ss-dash-reqid-input",placeholder:"Filter by request ID...",value:A.value,onInput:he[0]||(he[0]=re=>A.value=_e(re)),onKeydown:Rs(Me,["enter"])},null,40,mv),A.value||C.value?(u(),d("button",{key:0,type:"button",class:"ss-dash-btn ss-dash-reqid-clear",onClick:Ce}," Clear ")):G("",!0)])]),_:1},8,["model-value","summary"]),n("div",bv,[n("select",{class:"ss-dash-filter-select",value:k.value,onChange:he[1]||(he[1]=re=>k.value=xe(re))},[...he[4]||(he[4]=[pr('<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,_v),n("select",{class:"ss-dash-filter-select",value:S.value,onChange:he[2]||(he[2]=re=>S.value=xe(re))},[...he[5]||(he[5]=[n("option",{value:"equals"},"equals",-1),n("option",{value:"contains"},"contains",-1),n("option",{value:"starts_with"},"starts with",-1)])],40,xv),n("input",{class:"ss-dash-filter-input",placeholder:"Value...",value:Q.value,onInput:he[3]||(he[3]=re=>Q.value=_e(re)),onKeydown:Rs(B,["enter"])},null,40,wv),n("button",{type:"button",class:"ss-dash-btn",onClick:B},"Add")]),se.value?(u(),d("div",kv,[_.value!=="all"?(u(),d("span",$v,[me(" level: "+h(_.value)+" ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:we}," × ")])):G("",!0),C.value?(u(),d("span",Sv,[me(" requestId: "+h(C.value.slice(0,8))+"... ",1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:Ce}," × ")])):G("",!0),(u(!0),d(N,null,ye(y.value,(re,q)=>(u(),d("span",{key:q,class:"ss-dash-filter-chip"},[me(h(re.field)+" "+h(re.operator)+' "'+h(re.value)+'" ',1),n("button",{type:"button",class:"ss-dash-filter-chip-remove",onClick:le=>j(q)}," × ",8,Cv)]))),128))])):G("",!0),x(r)?(u(),d("div",Tv,"Failed to load logs")):x(a)&&!x(o)?(u(),d("div",Ev,"Loading logs...")):te.value.length===0?(u(),d("div",Pv," No log entries"+h(C.value?` matching request ${C.value}`:_.value!=="all"?` for ${_.value}`:""),1)):(u(),d("div",Rv,[(u(!0),d(N,null,ye(te.value,(re,q)=>(u(),d(N,{key:String(re.id||q)},[n("div",{class:R(["ss-dash-log-entry",{"ss-dash-log-entry-expandable":!!x($t)(re)}]),onClick:le=>Y(q,!!x($t)(re))},[n("span",{class:R(`ss-dash-log-level ${x(di)(x(rn)(re),"ss-dash-log-level")}`)},h(x(rn)(re).toUpperCase()),3),n("span",{class:"ss-dash-log-time",title:x(Ht)(re)?x(jt)(x(Ht)(re)):""},h(x(Ht)(re)?x(kt)(x(Ht)(re)):"-"),9,Av),x(Ut)(re)?(u(),d("span",{key:0,class:"ss-dash-log-reqid",title:x(Ut)(re),role:"button",tabindex:"0",onClick:at(le=>ke(x(Ut)(re)),["stop"]),onKeydown:Rs(at(le=>ke(x(Ut)(re)),["stop"]),["enter"])},h(x(Ut)(re).slice(0,8)),41,Lv)):(u(),d("span",Ov,"--")),x($t)(re)?(u(),d("span",{key:2,class:R(["ss-dash-log-expand-icon",{"ss-dash-log-expand-icon-open":P.value===q}])},"▶",2)):(u(),d("span",Dv)),n("span",Fv,h(x(ci)(re)),1)],10,Mv),P.value===q&&x($t)(re)?(u(),d("div",Iv,[Se(Ls,{value:x($t)(re),"class-prefix":"ss-dash","default-expanded":""},null,8,["value"])])):G("",!0)],64))),128))])),x(c).totalPages>1?(u(),st(ps,{key:5,page:x(c).page,"last-page":x(c).totalPages,total:x(c).total,onPageChange:x(p)},null,8,["page","last-page","total","onPageChange"])):G("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),Nv={key:0,class:"ss-dash-email-preview",id:"ss-dash-email-preview"},jv={class:"ss-dash-email-preview-header"},Hv={class:"ss-dash-email-preview-meta",id:"ss-dash-email-preview-meta"},Uv=["srcdoc"],qv={key:0,class:"ss-dash-empty"},Kv={class:"ss-dash-table-wrap"},Vv=["onClick"],zv={style:{color:"var(--ss-dim)"}},Wv=["title"],Qv=["title"],Jv=["title"],Gv={key:0,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Yv={key:1,style:{color:"var(--ss-dim)","text-align":"center",display:"block"}},Xv=["title"],Zv=["title"],eg={key:1,class:"ss-dash-empty"},tg=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"EmailsSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,pagination:r,goToPage:c,setSearch:g,fetchEmailPreview:p}=rt(()=>"emails",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),b=W(""),v=W(null),w=W(null),$=H(()=>{if(!o.value)return[];const y=o.value;return y.data||y.emails||o.value||[]});function _(y){b.value=y,g(y)}async function C(y){if(y.html){v.value=y.id,w.value=y.html;return}const k=await p(y.id);v.value=y.id,w.value=k}function A(){v.value=null,w.value=null}const{tableRef:P}=Jt(()=>$.value);return(y,k)=>(u(),d("div",null,[v.value&&w.value?(u(),d("div",Nv,[n("div",jv,[n("div",Hv,[$.value.find(S=>S.id===v.value)?(u(),d(N,{key:0},[k[4]||(k[4]=n("strong",null,"Subject:",-1)),me(" "+h($.value.find(S=>S.id===v.value)?.subject)+"   |  ",1),k[5]||(k[5]=n("strong",null,"From:",-1)),me(" "+h($.value.find(S=>S.id===v.value)?.from_addr||$.value.find(S=>S.id===v.value)?.from)+"   |  ",1),k[6]||(k[6]=n("strong",null,"To:",-1)),me(" "+h($.value.find(S=>S.id===v.value)?.to_addr||$.value.find(S=>S.id===v.value)?.to)+" ",1),$.value.find(S=>S.id===v.value)?.cc||$.value.find(S=>S.id===v.value)?.cc_addr?(u(),d(N,{key:0},[k[0]||(k[0]=me("   |  ",-1)),k[1]||(k[1]=n("strong",null,"CC:",-1)),me(" "+h($.value.find(S=>S.id===v.value)?.cc||$.value.find(S=>S.id===v.value)?.cc_addr),1)],64)):G("",!0),k[7]||(k[7]=me("   |  ",-1)),k[8]||(k[8]=n("strong",null,"Status:",-1)),n("span",{class:R(`ss-dash-badge ss-dash-email-status-${$.value.find(S=>S.id===v.value)?.status}`)},h($.value.find(S=>S.id===v.value)?.status),3),$.value.find(S=>S.id===v.value)?.mailer?(u(),d(N,{key:1},[k[2]||(k[2]=me("   |  ",-1)),k[3]||(k[3]=n("strong",null,"Mailer:",-1)),me(" "+h($.value.find(S=>S.id===v.value)?.mailer),1)],64)):G("",!0)],64)):G("",!0)]),n("button",{type:"button",class:"ss-dash-btn",id:"ss-dash-email-preview-close",onClick:A}," Close ")]),n("iframe",{class:"ss-dash-email-iframe",id:"ss-dash-email-iframe",srcdoc:w.value,title:"Email preview",sandbox:""},null,8,Uv)])):(u(),d(N,{key:1},[Se(qt,{"model-value":b.value,placeholder:"Filter emails...",summary:`${x(r).total??0} emails`,"onUpdate:modelValue":_},null,8,["model-value","summary"]),x(a)&&!x(o)?(u(),d("div",qv,"Loading emails...")):(u(),d(N,{key:1},[n("div",Kv,[$.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:P,class:"ss-dash-table"},[k[9]||(k[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)),k[10]||(k[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(N,null,ye($.value,S=>(u(),d("tr",{key:S.id,class:"ss-dash-clickable ss-dash-email-row",onClick:Q=>C(S)},[n("td",null,[n("span",zv,h(S.id),1)]),n("td",null,[n("span",{title:S.from_addr||S.from||"",style:{color:"var(--ss-text-secondary)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},h(S.from_addr||S.from||""),9,Wv)]),n("td",null,[n("span",{title:S.to_addr||S.to||"",style:{color:"var(--ss-text-secondary)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},h(S.to_addr||S.to||""),9,Qv)]),n("td",null,[n("span",{title:S.subject||"",style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},h(S.subject||""),9,Jv)]),n("td",null,[n("span",{class:R(`ss-dash-badge ss-dash-email-status-${S.status||""}`)},h(S.status),3)]),n("td",null,[(S.attachment_count||S.attachmentCount||0)>0?(u(),d("span",Gv,h(S.attachment_count||S.attachmentCount||0),1)):(u(),d("span",Yv,"-"))]),n("td",null,[n("span",{title:S.mailer||"",style:{color:"var(--ss-muted)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},h(S.mailer||""),9,Xv)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:x(jt)(S.createdAt||S.created_at||S.timestamp)},h(x(kt)(S.createdAt||S.created_at||S.timestamp)),9,Zv)])],8,Vv))),128))])],512)):(u(),d("div",eg,"No emails captured yet"))]),x(r).totalPages>1?(u(),st(ps,{key:0,page:x(r).page,"last-page":x(r).totalPages,total:x(r).total,onPageChange:x(c)},null,8,["page","last-page","total","onPageChange"])):G("",!0)],64))],64))]))}})},Symbol.toStringTag,{value:"Module"})),sg={key:0,class:"ss-dash-cache-stats"},ng={class:"ss-dash-cache-stat"},lg={class:"ss-dash-cache-stat-value"},og={class:"ss-dash-cache-stat"},ig={class:"ss-dash-cache-stat-value"},ag={class:"ss-dash-cache-stat"},rg={class:"ss-dash-cache-stat-value"},ug={class:"ss-dash-cache-stat"},cg={class:"ss-dash-cache-stat-value"},dg={key:1,class:"ss-dash-empty"},fg={key:2,class:"ss-dash-empty"},hg={key:3,class:"ss-dash-table-wrap"},pg=["onClick"],vg=["title"],gg={style:{color:"var(--ss-muted)"}},yg=["onClick"],mg={key:1,class:"ss-dash-empty"},bg={key:4,class:"ss-dash-cache-detail"},_g={key:0,class:"ss-dash-empty"},xg={key:1,class:"ss-dash-empty",style:{color:"var(--ss-red-fg)"}},wg=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"CacheSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,setSearch:r,mutate:c}=rt(()=>"cache",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),g=cl(i||"",l),p=new ai(g(),s||"/__stats/api"),b=W(""),v=W(null),w=W(null),$=W(!1),_=W(null),C=H(()=>o.value),A=H(()=>C.value?.keys||C.value?.data||[]);function P(Q){b.value=Q,r(Q)}async function y(Q){if(confirm(`Delete cache key "${Q}"?`))try{await c(`cache/${encodeURIComponent(Q)}`,"delete"),v.value===Q&&(v.value=null,w.value=null,_.value=null)}catch{}}const{tableRef:k}=Jt(()=>A.value);async function S(Q){if(v.value===Q){v.value=null,w.value=null,_.value=null;return}v.value=Q,w.value=null,_.value=null,$.value=!0;try{const te=await p.fetchCacheKey(Q);w.value=te.value!==void 0?te.value:te.data!==void 0?te.data:te,_.value=null}catch{w.value=null,_.value="Failed to fetch key value"}finally{$.value=!1}}return(Q,te)=>(u(),d("div",null,[C.value?.available&&C.value?.stats?(u(),d("div",sg,[n("div",ng,[te[0]||(te[0]=n("span",{class:"ss-dash-cache-stat-label"},"Hit Rate:",-1)),n("span",lg,h((C.value.stats.hitRate??0).toFixed(1))+"%",1)]),n("div",og,[te[1]||(te[1]=n("span",{class:"ss-dash-cache-stat-label"},"Hits:",-1)),n("span",ig,h(C.value.stats.hits??0),1)]),n("div",ag,[te[2]||(te[2]=n("span",{class:"ss-dash-cache-stat-label"},"Misses:",-1)),n("span",rg,h(C.value.stats.misses??0),1)]),n("div",ug,[te[3]||(te[3]=n("span",{class:"ss-dash-cache-stat-label"},"Keys:",-1)),n("span",cg,h(C.value.stats.totalKeys||C.value.stats.keyCount||A.value.length||0),1)])])):G("",!0),Se(qt,{"model-value":b.value,placeholder:"Filter cache keys...",summary:`${A.value.length} keys`,"onUpdate:modelValue":P},null,8,["model-value","summary"]),x(a)&&!x(o)?(u(),d("div",dg,"Loading cache...")):!C.value||!C.value.available?(u(),d("div",fg," Cache inspector not available ")):(u(),d("div",hg,[A.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:k,class:"ss-dash-table"},[te[4]||(te[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(N,null,ye(A.value,se=>(u(),d("tr",{key:se.key,class:"ss-dash-clickable",onClick:Y=>S(se.key)},[n("td",null,[n("span",{title:se.key,style:{color:"var(--ss-sql-color)",overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap",display:"block"}},h(se.key),9,vg)]),n("td",null,[n("span",gg,h(se.type),1)]),n("td",null,h(se.size!==null&&se.size!==void 0&&se.size>0?x(ku)(se.size):"-"),1),n("td",null,h(se.ttl>0?x(wu)(se.ttl):"-"),1),n("td",null,[n("button",{type:"button",class:"ss-dash-retry-btn",onClick:at(Y=>y(se.key),["stop"])}," Delete ",8,yg)])],8,pg))),128))])],512)):(u(),d("div",mg,"No cache keys found"))])),v.value?(u(),d("div",bg,[n("h4",null,"Key: "+h(v.value),1),$.value?(u(),d("div",_g,"Loading value...")):_.value?(u(),d("div",xg,h(_.value),1)):(u(),st(Ls,{key:2,value:w.value},null,8,["value"]))])):G("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),kg={key:0,class:"ss-dash-job-stats"},$g={class:"ss-dash-job-stat"},Sg={class:"ss-dash-job-stat-value"},Cg={class:"ss-dash-job-stat"},Tg={class:"ss-dash-job-stat-value"},Eg={class:"ss-dash-job-stat"},Pg={class:"ss-dash-job-stat-value"},Rg={class:"ss-dash-job-stat"},Mg={class:"ss-dash-job-stat-value"},Ag={class:"ss-dash-job-stat"},Lg={class:"ss-dash-job-stat-value",style:{color:"var(--ss-red-fg)"}},Og={class:"ss-dash-btn-group"},Dg=["onClick"],Fg={key:1,class:"ss-dash-empty"},Ig={key:2,class:"ss-dash-empty"},Bg={class:"ss-dash-table-wrap"},Ng={style:{color:"var(--ss-dim)"}},jg=["title"],Hg={style:{color:"var(--ss-muted)","text-align":"center",display:"block"}},Ug={class:"ss-dash-duration"},qg=["title"],Kg=["disabled","onClick"],Vg={key:1,class:"ss-dash-empty"},zg=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"JobsSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-dashboard-endpoint","/__stats/api"),l=de("ss-auth-token",void 0),i=de("ss-base-url",""),{data:o,loading:a,error:r,pagination:c,goToPage:g,setSearch:p,setFilter:b,refresh:v,mutate:w}=rt(()=>"jobs",{baseUrl:i,dashboardEndpoint:s,authToken:l,refreshKey:t}),$=W(""),_=W("all"),C=W({}),A=H(()=>tc(o.value)),P=H(()=>sc(o.value));function y(te){$.value=te,p(te)}function k(te){_.value=te,te==="all"?b("status",""):b("status",te)}const{tableRef:S}=Jt(()=>A.value);async function Q(te){C.value[te]="pending";try{await w(`jobs/${te}/retry`),C.value[te]="success",setTimeout(()=>{delete C.value[te],v()},1e3)}catch{delete C.value[te]}}return(te,se)=>(u(),d("div",null,[P.value?(u(),d("div",kg,[n("div",$g,[se[0]||(se[0]=n("span",{class:"ss-dash-job-stat-label"},"Active:",-1)),n("span",Sg,h(P.value.active??0),1)]),n("div",Cg,[se[1]||(se[1]=n("span",{class:"ss-dash-job-stat-label"},"Waiting:",-1)),n("span",Tg,h(P.value.waiting??0),1)]),n("div",Eg,[se[2]||(se[2]=n("span",{class:"ss-dash-job-stat-label"},"Delayed:",-1)),n("span",Pg,h(P.value.delayed??0),1)]),n("div",Rg,[se[3]||(se[3]=n("span",{class:"ss-dash-job-stat-label"},"Completed:",-1)),n("span",Mg,h(P.value.completed??0),1)]),n("div",Ag,[se[4]||(se[4]=n("span",{class:"ss-dash-job-stat-label"},"Failed:",-1)),n("span",Lg,h(P.value.failed??0),1)])])):G("",!0),Se(qt,{"model-value":$.value,placeholder:"Filter jobs...",summary:`${x(c).total||A.value.length} jobs`,"onUpdate:modelValue":y},{default:os(()=>[n("div",Og,[(u(!0),d(N,null,ye(x(Zu),Y=>(u(),d("button",{key:Y,type:"button",class:R(`ss-dash-btn ${_.value===Y?"ss-dash-active":""}`),onClick:be=>k(Y)},h(Y.charAt(0).toUpperCase()+Y.slice(1)),11,Dg))),128))])]),_:1},8,["model-value","summary"]),x(a)&&!x(o)?(u(),d("div",Fg,"Loading jobs...")):x(r)?(u(),d("div",Ig,"Jobs/Queue not available")):(u(),d(N,{key:3},[n("div",Bg,[A.value.length>0?(u(),d("table",{key:0,ref_key:"tableRef",ref:S,class:"ss-dash-table"},[se[5]||(se[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)),se[6]||(se[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(N,null,ye(A.value,Y=>(u(),d("tr",{key:Y.id},[n("td",null,[n("span",Ng,h(Y.id),1)]),n("td",null,[n("span",{style:{color:"var(--ss-text)"},title:Y.name},h(Y.name),9,jg)]),n("td",null,[n("span",{class:R(`ss-dash-badge ss-dash-badge-${x(ec)(Y.status)}`)},h(Y.status),3)]),n("td",null,[Se(Ls,{value:Y.payload||Y.data,"max-len":60},null,8,["value"])]),n("td",null,[n("span",Hg,h(Y.attempts||Y.attemptsMade||0),1)]),n("td",null,[n("span",Ug,h(Y.duration!==null&&Y.duration!==void 0?x(Nt)(Y.duration):"-"),1)]),n("td",null,[n("span",{class:"ss-dash-event-time",style:{"white-space":"nowrap"},title:x(jt)(Y.timestamp||Y.createdAt||Y.processedAt||Y.created_at)},h(x(kt)(Y.timestamp||Y.createdAt||Y.processedAt||Y.created_at)),9,qg)]),n("td",null,[Y.status==="failed"?(u(),d("button",{key:0,type:"button",class:"ss-dash-retry-btn",disabled:C.value[Y.id]==="pending"||C.value[Y.id]==="success",onClick:at(be=>Q(Y.id),["stop"])},h(C.value[Y.id]==="pending"?"...":C.value[Y.id]==="success"?"OK":"Retry"),9,Kg)):G("",!0)])]))),128))])],512)):(u(),d("div",Vg,"No jobs found"))]),x(c).totalPages>1?(u(),st(ps,{key:0,page:x(c).page,"last-page":x(c).totalPages,total:x(c).total,onPageChange:x(g)},null,8,["page","last-page","total","onPageChange"])):G("",!0)],64))]))}})},Symbol.toStringTag,{value:"Module"})),Wg={style:{position:"relative",flex:1}},Qg=["value"],Jg=["title","onClick"],Gg=["viewBox","innerHTML"],Yg=["viewBox","innerHTML"],Xg=["onClick"],Zg={key:0},e1=["title","onClick"],t1=["viewBox","innerHTML"],s1=["viewBox","innerHTML"],n1=["onClick"],l1={key:0},o1={style:{padding:"4px 16px",fontSize:"10px",color:"var(--ss-muted)"}},i1=["onClick"],a1=["title"],r1=["title"],u1=["title","onClick"],c1=["viewBox","innerHTML"],d1=["viewBox","innerHTML"],f1=["onClick"],h1=["title","onClick"],p1=["viewBox","innerHTML"],v1=["viewBox","innerHTML"],g1={key:1,style:{color:"var(--ss-dim)"}},y1={key:3,style:{color:"var(--ss-amber-fg)"}},m1={key:4,style:{color:"var(--ss-purple-fg)"}},b1={key:5},_1=["onClick"],ue="ss-dash",x1=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"ConfigSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-base-url",""),l=de("ss-dashboard-endpoint","/__stats/api"),i=de("ss-auth-token",void 0),{data:o,loading:a}=rt(()=>"config",{baseUrl:s,dashboardEndpoint:l,authToken:i,refreshKey:t}),r=W(""),c=W(""),g=W("app"),p=W(new Set),b=W("Copy JSON"),v=W(new Set),w=W(new Map);let $=null;function _(q){r.value=q,$&&clearTimeout($),$=setTimeout(()=>{c.value=q},200)}function C(q){return q.target.value}const A=H(()=>o.value??null),P=H(()=>{const q=A.value?.env??{},le=c.value.toLowerCase();return Object.entries(q).filter(([U,oe])=>{if(!le)return!0;const K=je(oe)?oe.display:oe==null?"":String(oe);return U.toLowerCase().includes(le)||K.toLowerCase().includes(le)})}),y=H(()=>{const q=A.value?.app??{},le=c.value.toLowerCase();return cn(q,"").filter(oe=>{const K=je(oe.value)?oe.value.display:oe.value===null||oe.value===void 0?"":String(oe.value);return oe.path.toLowerCase().includes(le)||K.toLowerCase().includes(le)})}),k=H(()=>{const q=A.value?.app??{};return cn(q,"").length}),S=H(()=>{const q=A.value?.app;return!q||typeof q!="object"||Array.isArray(q)||je(q)?[]:Object.keys(q)});function Q(q){const le=new Set(p.value);le.has(q)?le.delete(q):le.add(q),p.value=le}function te(){if(!A.value)return;const q=g.value==="app"?A.value.app:A.value.env;if(!q)return;const le=xc(q);p.value=new Set(le)}function se(){p.value=new Set}function Y(){if(!A.value)return;const q=g.value==="app"?A.value.app:A.value.env;navigator.clipboard?.writeText(JSON.stringify(q,null,2)).then(()=>{b.value="Copied!",setTimeout(()=>{b.value="Copy JSON"},1500)}).catch(()=>{})}function be(q){const le=new Set(v.value);le.has(q)?le.delete(q):le.add(q),v.value=le}function Re(q,le){w.value.set(q,le)}function ke(q,le,U){U.stopPropagation(),wc(q,w.value.get(le)??null,ue)}function Me(q){return q!==null&&typeof q=="object"&&!Array.isArray(q)&&!je(q)}function Ce(q,le){return cn(q,le)}function we(q,le){return q.indexOf(le+".")===0?q.slice(le.length+1):q}function z(q){return _c(q)}function B(q){return je(q)?q.display:q==null?"null":String(q)}function j(q){const le=A.value?.app;return!le||typeof le!="object"?null:le[q]??null}function _e(q,le){return je(q)?le?q.value:q.display:""}function xe(){r.value="",c.value=""}function ie(q){return je(q)?q.display:""}const he=H(()=>Fe.eye.elements.join("")),re=H(()=>Fe["eye-off"].elements.join(""));return(q,le)=>(u(),d("div",null,[n("div",{class:R(`${ue}-config-toolbar`),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px"}},[n("button",{type:"button",class:R(`${ue}-config-tab${g.value==="app"?` ${ue}-active`:""}`),onClick:le[0]||(le[0]=U=>g.value="app")}," App Config ",2),n("button",{type:"button",class:R(`${ue}-config-tab${g.value==="env"?` ${ue}-active`:""}`),onClick:le[1]||(le[1]=U=>g.value="env")}," Env ",2),n("div",Wg,[n("input",{type:"text",class:R(`${ue}-search`),placeholder:"Search keys and values...",value:r.value,style:{width:"100%"},onInput:le[2]||(le[2]=U=>_(C(U)))},null,42,Qg),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:xe}," × ")):G("",!0)]),g.value==="app"&&!c.value?(u(),d(N,{key:0},[n("button",{type:"button",class:R(`${ue}-btn`),onClick:te},"Expand All",2),n("button",{type:"button",class:R(`${ue}-btn`),onClick:se},"Collapse All",2)],64)):G("",!0),n("button",{type:"button",class:R(`${ue}-btn`),onClick:Y},h(b.value),3)],2),x(a)&&!x(o)?(u(),d("div",{key:0,class:R(`${ue}-empty`)},"Loading config...",2)):A.value?g.value==="env"?(u(),d("div",{key:2,class:R(`${ue}-config-table-wrap`)},[n("table",{class:R(`${ue}-table ${ue}-config-env-table`)},[le[4]||(le[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(N,null,ye(P.value,([U,oe])=>(u(),d("tr",{key:U},[n("td",{class:R(`${ue}-env-key`)},[n("span",{class:R(`${ue}-config-key`)},h(U),3)],2),n("td",{class:R(`${ue}-env-val`)},[x(je)(oe)?(u(),d("span",{key:0,class:R(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,h(_e(oe,v.value.has(U))),1),n("button",{type:"button",class:R(`${ue}-btn`),title:v.value.has(U)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:at(K=>be(U),["stop"])},[v.value.has(U)?(u(),d("svg",{key:0,width:"14",height:"14",viewBox:x(Fe)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:re.value},null,8,Gg)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:x(Fe).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:he.value},null,8,Yg))],10,Jg)],2)):(u(),d("span",{key:1,class:R(`${ue}-config-val`)},h(B(oe)),3))],2),n("td",null,[x(je)(oe)?G("",!0):(u(),d("button",{key:0,type:"button",class:R(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:K=>Re(`env-${U}`,K),onClick:K=>ke(`${U}=${B(oe)}`,`env-${U}`,K)}," ⎘ ",10,Xg))])]))),128)),P.value.length===0?(u(),d("tr",Zg,[...le[3]||(le[3]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching variables ",-1)])])):G("",!0)])],2)],2)):c.value?(u(),d("div",{key:3,class:R(`${ue}-config-table-wrap`)},[n("table",{class:R(`${ue}-table`)},[le[6]||(le[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(N,null,ye(y.value,U=>(u(),d("tr",{key:U.path},[n("td",null,[n("span",{class:R(`${ue}-config-key`),style:{whiteSpace:"nowrap"}},h(U.path),3)]),n("td",null,[x(je)(U.value)?(u(),d("span",{key:0,class:R(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,h(_e(U.value,v.value.has(U.path))),1),n("button",{type:"button",class:R(`${ue}-btn`),title:v.value.has(U.path)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:at(oe=>be(U.path),["stop"])},[v.value.has(U.path)?(u(),d("svg",{key:0,width:"14",height:"14",viewBox:x(Fe)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:re.value},null,8,t1)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:x(Fe).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:he.value},null,8,s1))],10,e1)],2)):(u(),d("span",{key:1,class:R(`${ue}-config-val`),style:qe({wordBreak:"break-all",color:z(U.value).color})},h(z(U.value).text),7))]),n("td",null,[x(je)(U.value)?G("",!0):(u(),d("button",{key:0,type:"button",class:R(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:oe=>Re(`search-${U.path}`,oe),onClick:oe=>ke(`${U.path}: ${x(je)(U.value)?ie(U.value):z(U.value).text}`,`search-${U.path}`,oe)}," ⎘ ",10,n1))])]))),128)),y.value.length===0?(u(),d("tr",l1,[...le[5]||(le[5]=[n("td",{colspan:"3",style:{textAlign:"center",color:"var(--ss-dim)"}}," No matching entries ",-1)])])):G("",!0)])],2),n("div",o1,h(y.value.length)+" of "+h(k.value)+" entries ",1)],2)):(u(),d("div",{key:4,class:R(`${ue}-config-table-wrap`)},[n("div",{class:R(`${ue}-config-sections`)},[(u(!0),d(N,null,ye(S.value,U=>(u(),d("div",{key:U,class:R(`${ue}-config-section`)},[Me(j(U))?(u(),d(N,{key:0},[n("div",{class:R(`${ue}-config-section-header`),style:{cursor:"pointer"},onClick:oe=>Q(U)},[n("span",{class:R(`${ue}-config-toggle`)},h(p.value.has(U)?"▼":"▶"),3),n("span",{class:R(`${ue}-config-key`)},h(U),3),n("span",{class:R(`${ue}-config-count`)},h(x(vi)(j(U)))+" entries ",3)],10,i1),p.value.has(U)?(u(),d("div",{key:0,class:R(`${ue}-config-section-body`)},[n("table",{class:R(`${ue}-table ${ue}-config-inner-table`)},[le[7]||(le[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(N,null,ye(Ce(j(U),U),oe=>(u(),d("tr",{key:oe.path},[n("td",{title:we(oe.path,U)},[n("span",{class:R(`${ue}-config-key`)},h(we(oe.path,U)),3)],8,a1),n("td",{title:x(je)(oe.value)?ie(oe.value):z(oe.value).text},[x(je)(oe.value)?(u(),d("span",{key:0,class:R(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,h(_e(oe.value,v.value.has(oe.path))),1),n("button",{type:"button",class:R(`${ue}-btn`),title:v.value.has(oe.path)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:at(K=>be(oe.path),["stop"])},[v.value.has(oe.path)?(u(),d("svg",{key:0,width:"14",height:"14",viewBox:x(Fe)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:re.value},null,8,c1)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:x(Fe).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:he.value},null,8,d1))],10,u1)],2)):(u(),d("span",{key:1,class:R(`${ue}-config-val`),style:qe({color:z(oe.value).color})},h(z(oe.value).text),7))],8,r1),n("td",null,[x(je)(oe.value)?G("",!0):(u(),d("button",{key:0,type:"button",class:R(`${ue}-copy-row-btn`),title:"Copy",ref_for:!0,ref:K=>Re(`inner-${oe.path}`,K),onClick:K=>ke(`${oe.path}: ${z(oe.value).text}`,`inner-${oe.path}`,K)}," ⎘ ",10,f1))])]))),128))])],2)],2)):G("",!0)],64)):(u(),d("div",{key:1,class:R(`${ue}-config-section-header ${ue}-config-leaf`),style:{cursor:"default"}},[n("span",{class:R(`${ue}-config-toggle`),style:{visibility:"hidden"}},"•",2),n("span",{class:R(`${ue}-config-key`)},h(U),3),n("span",{class:R(`${ue}-config-val`),style:{marginLeft:"8px"}},[x(je)(j(U))?(u(),d("span",{key:0,class:R(`${ue}-config-redacted`),style:{display:"inline-flex",alignItems:"center",gap:"4px"}},[n("span",null,h(_e(j(U),v.value.has(U))),1),n("button",{type:"button",class:R(`${ue}-btn`),title:v.value.has(U)?"Hide":"Reveal",style:{padding:"0 4px",fontSize:"0.85em",lineHeight:1,minWidth:"auto"},onClick:at(oe=>be(U),["stop"])},[v.value.has(U)?(u(),d("svg",{key:0,width:"14",height:"14",viewBox:x(Fe)["eye-off"].viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:re.value},null,8,p1)):(u(),d("svg",{key:1,width:"14",height:"14",viewBox:x(Fe).eye.viewBox,fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",innerHTML:he.value},null,8,v1))],10,h1)],2)):j(U)===null||j(U)===void 0?(u(),d("span",g1,"null")):typeof j(U)=="boolean"?(u(),d("span",{key:2,style:qe({color:j(U)?"var(--ss-green-fg)":"var(--ss-red-fg)"})},h(String(j(U))),5)):typeof j(U)=="number"?(u(),d("span",y1,h(String(j(U))),1)):Array.isArray(j(U))?(u(),d("span",m1,h(z(j(U)).text),1)):(u(),d("span",b1,h(String(j(U))),1))],2),x(je)(j(U))?G("",!0):(u(),d("button",{key:0,type:"button",class:R(`${ue}-copy-row-btn`),style:{marginLeft:"4px"},title:"Copy",ref_for:!0,ref:oe=>Re(`leaf-${U}`,oe),onClick:oe=>ke(`${U}: ${z(j(U)).text}`,`leaf-${U}`,oe)}," ⎘ ",10,_1))],2))],2))),128))],2)],2)):(u(),d("div",{key:1,class:R(`${ue}-empty`)},"Config not available",2))]))}})},Symbol.toStringTag,{value:"Module"})),w1={key:0,class:"ss-dash-empty"},k1={key:1,class:"ss-dash-empty"},$1={key:2,class:"ss-dash-empty"},S1={key:0,style:{background:"var(--ss-amber-bg)",color:"var(--ss-amber-fg)",padding:"8px 12px",borderRadius:"6px",fontSize:"12px",marginBottom:"12px",lineHeight:"1.5"}},C1={class:"ss-dash-info-cards"},T1={class:"ss-dash-info-card-label"},E1={class:"ss-dash-info-card-value"},P1={key:1,class:"ss-dash-empty"},R1={key:2,class:"ss-dash-table"},M1={style:{"font-family":"monospace","font-size":"11px"}},A1={key:0,style:{"margin-left":"6px","font-size":"11px",color:"var(--ss-dim)"}},L1={style:{color:"var(--ss-dim)","margin-left":"4px"}},O1={style:{"font-size":"11px"}},D1=["onClick"],F1=["onClick"],I1={key:3,class:"ss-dash-empty"},B1={key:4,class:"ss-dash-table"},N1={class:"ss-dash-bar"},j1={class:"ss-dash-bar-track",style:{"max-width":"120px"}},H1={key:5,class:"ss-dash-empty"},U1={key:6,class:"ss-dash-table"},q1={style:{color:"var(--ss-dim)"}},K1={key:7,class:"ss-dash-empty"},V1={key:8,class:"ss-dash-table"},z1={style:{color:"var(--ss-dim)","font-size":"11px"}},W1={class:"ss-dash-table"},Q1={style:{"font-family":"monospace","font-size":"11px"}},J1={key:0,class:"ss-dash-table",style:{"margin-top":"8px"}},G1={style:{"font-family":"monospace","font-size":"11px"}},Y1={class:"ss-dash-table"},X1={class:"ss-dash-table"},Z1={style:{"font-family":"monospace","font-size":"11px"}},ey={style:{"font-family":"monospace","font-size":"11px"}},ty={style:{"font-family":"monospace","font-size":"11px"}},sy={style:{"font-size":"11px"}},ny=Object.freeze(Object.defineProperty({__proto__:null,default:Ne({__name:"InternalsSection",setup(e){const t=de("ss-refresh-key",W(0)),s=de("ss-base-url",""),l=de("ss-debug-endpoint","/admin/api/debug"),i=de("ss-auth-token",void 0),o=W(null),a=W(!0),r=W(null),c=W(new Set),g=cl(s,i);let p=null;async function b(){try{const P=await g().fetch(`${l}/diagnostics`);o.value=P,r.value=null,a.value=!1}catch(P){if(P instanceof ln){r.value=P,a.value=!1,p&&(clearInterval(p),p=null);return}r.value=P instanceof Error?P:new Error(String(P)),a.value=!1}}It(()=>{a.value=!0,r.value=null,b(),p=setInterval(b,si)}),Pt(()=>{p&&clearInterval(p)}),ht(t,()=>{b()});function v(P){c.value.has(P)?c.value.delete(P):c.value.add(P)}function w(P){const y=bc(P);return y==="ok"?"ss-dash-dot-ok":y==="err"?"ss-dash-dot-err":""}function $(P){return P.debounceMs!==void 0?`${Nt(P.debounceMs)} (debounce)`:P.intervalMs!==void 0?Nt(P.intervalMs):"-"}const _=H(()=>o.value?.buffers?Object.entries(o.value.buffers).map(([P,y])=>({name:P.charAt(0).toUpperCase()+P.slice(1),...y,percent:gc(y.current,y.max)})):[]),C=H(()=>o.value?.timers?Object.entries(o.value.timers).map(([P,y])=>({key:P,label:cc(P),...y,interval:$(y)})):[]),A=H(()=>{if(!o.value)return[];const P=[];if(o.value.transmit&&P.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,k]of Object.entries(o.value.integrations))P.push({key:y,label:fc(y),status:hc(k),details:pc(y,k)});return P});return(P,y)=>(u(),d("div",null,[a.value&&!o.value?(u(),d("div",w1,"Loading diagnostics...")):r.value&&!o.value?(u(),d("div",k1,"Error: "+h(r.value.message),1)):o.value?(u(),d(N,{key:3},[o.value.collectors?.some(k=>k.name==="db_pool"||k.name==="app")&&Array.isArray(o.value.lucidDebugConnections)&&o.value.lucidDebugConnections.length===0?(u(),d("div",S1,[...y[4]||(y[4]=[n("strong",null,"Query capture disabled",-1),me(" — no Lucid connections have ",-1),n("code",{style:{"font-size":"11px"}},"debug: true",-1),me(". Add it to your database connection in ",-1),n("code",{style:{"font-size":"11px"}},"config/database.ts",-1),me(" to see queries in the Queries panel. ",-1)])])):G("",!0),y[42]||(y[42]=n("h3",{class:"ss-dash-section-title"},"Package Info",-1)),n("div",C1,[(u(!0),d(N,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:x(_u)(o.value.uptime||o.value.package?.uptime)},{label:"Renderer",value:o.value.devToolbar?.renderer||"preact"}],k=>(u(),d("div",{key:k.label,class:"ss-dash-info-card"},[n("span",T1,h(k.label),1),n("span",E1,h(k.value),1)]))),128))]),y[43]||(y[43]=n("h3",{class:"ss-dash-section-title"},"Collectors",-1)),o.value.collectors?.length?(u(),d("table",R1,[y[5]||(y[5]=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(N,null,ye(o.value.collectors,k=>(u(),d("tr",{key:k.name},[n("td",null,[n("span",M1,h(k.name),1),k.label&&k.label!==k.name?(u(),d("span",A1,h(k.label),1)):G("",!0)]),n("td",null,[n("span",{class:R(["ss-dash-dot",w(k.status)])},null,2),me(" "+h(k.status),1)]),n("td",{style:qe(k.lastError?{color:"var(--ss-red-fg)"}:{})},[k.lastError?(u(),d(N,{key:0},[me(h(k.lastError)+" ",1),n("span",L1,h(x(kt)(k.lastErrorAt??0)),1)],64)):(u(),d(N,{key:1},[me("-")],64))],4),n("td",O1,[Object.keys(k.config||{}).length?(u(!0),d(N,{key:0},ye(x(vc)(k.config),S=>(u(),d("span",{key:S.key,style:{"margin-right":"8px"}},[me(h(S.key)+"=",1),S.secret&&!c.value.has(`collector-${k.name}-${S.key}`)?(u(),d("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:Q=>v(`collector-${k.name}-${S.key}`)},"••••••••",8,D1)):(u(),d(N,{key:1},[n("span",null,h(S.value),1),S.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=>v(`collector-${k.name}-${S.key}`)}," Hide ",8,F1)):G("",!0)],64))]))),128)):(u(),d(N,{key:1},[me("-")],64))])]))),128))])])):(u(),d("div",P1,"No collectors")),y[44]||(y[44]=n("h3",{class:"ss-dash-section-title"},"Buffers",-1)),_.value.length?(u(),d("table",B1,[y[6]||(y[6]=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(N,null,ye(_.value,k=>(u(),d("tr",{key:k.name},[n("td",null,h(k.name),1),n("td",null,h(k.current.toLocaleString())+" / "+h(k.max.toLocaleString()),1),n("td",null,[n("div",N1,[n("div",j1,[n("div",{class:R(["ss-dash-bar-fill",k.percent>=100?"ss-dash-bar-fill-warn":""]),style:qe({width:k.percent+"%"})},null,6)]),n("span",{class:R(["ss-dash-bar-pct",k.percent>=100?"ss-dash-bar-pct-warn":""])},h(k.percent)+"%",3)])])]))),128))])])):(u(),d("div",I1,"No buffer data")),y[45]||(y[45]=n("h3",{class:"ss-dash-section-title"},"Timers",-1)),C.value.length?(u(),d("table",U1,[y[7]||(y[7]=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(N,null,ye(C.value,k=>(u(),d("tr",{key:k.key},[n("td",null,h(k.label),1),n("td",null,[n("span",{class:R(["ss-dash-dot",w(k.active?"active":"inactive")])},null,2),me(" "+h(k.active?"active":"inactive"),1)]),n("td",q1,h(k.interval),1)]))),128))])])):(u(),d("div",H1,"No timer data")),y[46]||(y[46]=n("h3",{class:"ss-dash-section-title"},"Integrations",-1)),A.value.length?(u(),d("table",V1,[y[8]||(y[8]=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(N,null,ye(A.value,k=>(u(),d("tr",{key:k.key},[n("td",null,h(k.label),1),n("td",null,[n("span",{class:R(["ss-dash-dot",w(k.status)])},null,2),me(" "+h(k.status),1)]),n("td",z1,h(k.details),1)]))),128))])])):(u(),d("div",K1,"No integration data")),o.value.storage?(u(),d(N,{key:9},[y[17]||(y[17]=n("h3",{class:"ss-dash-section-title"},"Storage",-1)),n("table",W1,[y[15]||(y[15]=n("thead",null,[n("tr",null,[n("th",null,"Metric"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[9]||(y[9]=n("td",null,"Status",-1)),n("td",null,[n("span",{class:R(["ss-dash-dot",w(o.value.storage.ready?"ready":"unavailable")])},null,2),me(" "+h(o.value.storage.ready?"ready":"not ready"),1)])]),n("tr",null,[y[10]||(y[10]=n("td",null,"DB Path",-1)),n("td",Q1,h(o.value.storage.dbPath),1)]),n("tr",null,[y[11]||(y[11]=n("td",null,"File Size",-1)),n("td",null,h(o.value.storage.fileSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[12]||(y[12]=n("td",null,"WAL Size",-1)),n("td",null,h(o.value.storage.walSizeMb.toFixed(1))+" MB",1)]),n("tr",null,[y[13]||(y[13]=n("td",null,"Retention",-1)),n("td",null,h(o.value.storage.retentionDays)+" days",1)]),n("tr",null,[y[14]||(y[14]=n("td",null,"Last Cleanup",-1)),n("td",null,h(x(kt)(o.value.storage.lastCleanupAt??0)),1)])])]),o.value.storage.tables?.length?(u(),d("table",J1,[y[16]||(y[16]=n("thead",null,[n("tr",null,[n("th",null,"Table"),n("th",null,"Rows")])],-1)),n("tbody",null,[(u(!0),d(N,null,ye(o.value.storage.tables,k=>(u(),d("tr",{key:k.name},[n("td",G1,h(k.name),1),n("td",null,h(k.rowCount.toLocaleString()),1)]))),128))])])):G("",!0)],64)):G("",!0),y[47]||(y[47]=n("h3",{class:"ss-dash-section-title"},"Resolved Config",-1)),n("table",Y1,[y[25]||(y[25]=n("thead",null,[n("tr",null,[n("th",null,"Setting"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[18]||(y[18]=n("td",null,"intervalMs",-1)),n("td",null,h(o.value.config?.intervalMs),1)]),n("tr",null,[y[19]||(y[19]=n("td",null,"transport",-1)),n("td",null,h(o.value.config?.transport),1)]),n("tr",null,[y[20]||(y[20]=n("td",null,"channelName",-1)),n("td",null,h(o.value.config?.channelName),1)]),n("tr",null,[y[21]||(y[21]=n("td",null,"endpoint",-1)),n("td",null,h(o.value.config?.endpoint===!1?"false":o.value.config?.endpoint),1)]),n("tr",null,[y[22]||(y[22]=n("td",null,"skipInTest",-1)),n("td",null,h(o.value.config?.skipInTest),1)]),n("tr",null,[y[23]||(y[23]=n("td",null,"onStats callback",-1)),n("td",null,h(o.value.config?.hasOnStatsCallback?"defined":"not defined"),1)]),n("tr",null,[y[24]||(y[24]=n("td",null,"shouldShow callback",-1)),n("td",null,h(o.value.config?.hasShouldShowCallback?"defined":"not defined"),1)])])]),y[48]||(y[48]=n("h4",{class:"ss-dash-section-title"},"DevToolbar",-1)),n("table",X1,[y[41]||(y[41]=n("thead",null,[n("tr",null,[n("th",null,"Setting"),n("th",null,"Value")])],-1)),n("tbody",null,[n("tr",null,[y[26]||(y[26]=n("td",null,"enabled",-1)),n("td",null,h(o.value.devToolbar?.enabled),1)]),n("tr",null,[y[27]||(y[27]=n("td",null,"tracing",-1)),n("td",null,h(o.value.devToolbar?.tracing),1)]),n("tr",null,[y[28]||(y[28]=n("td",null,"dashboard",-1)),n("td",null,h(o.value.devToolbar?.dashboard),1)]),n("tr",null,[y[29]||(y[29]=n("td",null,"dashboardPath",-1)),n("td",Z1,h(o.value.devToolbar?.dashboardPath),1)]),n("tr",null,[y[30]||(y[30]=n("td",null,"debugEndpoint",-1)),n("td",ey,[c.value.has("cfg-debugEndpoint")?(u(),d(N,{key:1},[me(h(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]=k=>v("cfg-debugEndpoint"))}," Hide ")],64)):(u(),d("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:y[0]||(y[0]=k=>v("cfg-debugEndpoint"))},"••••••••"))])]),n("tr",null,[y[31]||(y[31]=n("td",null,"maxQueries",-1)),n("td",null,h(o.value.devToolbar?.maxQueries),1)]),n("tr",null,[y[32]||(y[32]=n("td",null,"maxEvents",-1)),n("td",null,h(o.value.devToolbar?.maxEvents),1)]),n("tr",null,[y[33]||(y[33]=n("td",null,"maxEmails",-1)),n("td",null,h(o.value.devToolbar?.maxEmails),1)]),n("tr",null,[y[34]||(y[34]=n("td",null,"maxTraces",-1)),n("td",null,h(o.value.devToolbar?.maxTraces),1)]),n("tr",null,[y[35]||(y[35]=n("td",null,"slowQueryThresholdMs",-1)),n("td",null,h(o.value.devToolbar?.slowQueryThresholdMs),1)]),n("tr",null,[y[36]||(y[36]=n("td",null,"retentionDays",-1)),n("td",null,h(o.value.devToolbar?.retentionDays),1)]),n("tr",null,[y[37]||(y[37]=n("td",null,"dbPath",-1)),n("td",ty,[c.value.has("cfg-dbPath")?(u(),d(N,{key:1},[me(h(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]=k=>v("cfg-dbPath"))}," Hide ")],64)):(u(),d("span",{key:0,style:{color:"var(--ss-muted)",cursor:"pointer"},onClick:y[2]||(y[2]=k=>v("cfg-dbPath"))},"••••••••"))])]),n("tr",null,[y[38]||(y[38]=n("td",null,"persistDebugData",-1)),n("td",null,h(o.value.devToolbar?.persistDebugData),1)]),n("tr",null,[y[39]||(y[39]=n("td",null,"excludeFromTracing",-1)),n("td",sy,h(o.value.devToolbar?.excludeFromTracing?.join(", ")||"-"),1)]),n("tr",null,[y[40]||(y[40]=n("td",null,"customPanes",-1)),n("td",null,h(o.value.devToolbar?.customPaneCount??0)+" registered",1)])])])],64)):(u(),d("div",$1,"Diagnostics not available"))]))}})},Symbol.toStringTag,{value:"Module"}))})();