Repository: TwiN/gatus

Issue:
Allow configuring page heading/subheading
### Describe the feature request

As I understand it, while you can change the tab title + the logo:
```
Health Dashboard
Monitor the health of your endpoints in real-time
```
is hard-coded:
https://github.com/TwiN/gatus/blob/40345a03d3fe647807db2478de1a6d700dc412c5/web/app/src/views/Home.vue#L7-L8

It would be nice to be able to configure this too

### Why do you personally want this feature to be implemented?

_No response_

### How long have you been using this project?

_No response_

### Additional information

_No response_

Discussion:
@TwiN: This feature has been implemented 

Solution patch:
diff --git a/README.md b/README.md
index 84020469..d234bbdb 100644
--- a/README.md
+++ b/README.md
@@ -263,6 +263,8 @@ If you want to test it locally, see [Docker](#docker).
 | `ui`                         | UI configuration.                                                                                                                        | `{}`                       |
 | `ui.title`                   | [Title of the document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title).                                                | `Health Dashboard ǀ Gatus` |
 | `ui.description`             | Meta description for the page.                                                                                                           | `Gatus is an advanced...`. |
+| `ui.dashboard-heading`       | Dashboard title between header and endpoints                                                                                             | `Health Dashboard` |
+| `ui.dashboard-subheading`    | Dashboard description between header and endpoints                                                                                       | `Monitor the health of your endpoints in real-time` |
 | `ui.header`                  | Header at the top of the dashboard.                                                                                                      | `Gatus`                    |
 | `ui.logo`                    | URL to the logo to display.                                                                                                              | `""`                       |
 | `ui.link`                    | Link to open when the logo is clicked.                                                                                                   | `""`                       |
diff --git a/config/ui/ui.go b/config/ui/ui.go
index 649007a3..e56a8c5c 100644
--- a/config/ui/ui.go
+++ b/config/ui/ui.go
@@ -10,14 +10,16 @@ import (
 )
 
 const (
-	defaultTitle       = "Health Dashboard | Gatus"
-	defaultDescription = "Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue"
-	defaultHeader      = "Gatus"
-	defaultLogo        = ""
-	defaultLink        = ""
-	defaultCustomCSS   = ""
-	defaultSortBy      = "name"
-	defaultFilterBy    = "none"
+	defaultTitle                = "Health Dashboard | Gatus"
+	defaultDescription          = "Gatus is an advanced automated status page that lets you monitor your applications and configure alerts to notify you if there's an issue"
+	defaultHeader               = "Gatus"
+	defaultDashboardHeading     = "Health Dashboard"
+	defaultDashboardSubheading  = "Monitor the health of your endpoints in real-time"
+	defaultLogo                 = ""
+	defaultLink                 = ""
+	defaultCustomCSS            = ""
+	defaultSortBy               = "name"
+	defaultFilterBy             = "none"
 )
 
 var (
@@ -30,17 +32,18 @@ var (
 
 // Config is the configuration for the UI of Gatus
 type Config struct {
-	Title           string   `yaml:"title,omitempty"`             // Title of the page
-	Description     string   `yaml:"description,omitempty"`       // Meta description of the page
-	Header          string   `yaml:"header,omitempty"`            // Header is the text at the top of the page
-	Logo            string   `yaml:"logo,omitempty"`              // Logo to display on the page
-	Link            string   `yaml:"link,omitempty"`              // Link to open when clicking on the logo
-	Buttons         []Button `yaml:"buttons,omitempty"`           // Buttons to display below the header
-	CustomCSS       string   `yaml:"custom-css,omitempty"`        // Custom CSS to include in the page
-	DarkMode        *bool    `yaml:"dark-mode,omitempty"`         // DarkMode is a flag to enable dark mode by default
-	DefaultSortBy   string   `yaml:"default-sort-by,omitempty"`   // DefaultSortBy is the default sort option ('name', 'group', 'health')
-	DefaultFilterBy string   `yaml:"default-filter-by,omitempty"` // DefaultFilterBy is the default filter option ('none', 'failing', 'unstable')
-
+	Title                   string   `yaml:"title,omitempty"`                  // Title of the page
+	Description             string   `yaml:"description,omitempty"`            // Meta description of the page
+	DashboardHeading        string   `yaml:"dashboard-heading,omitempty"`      // Dashboard Title between header and endpoints
+	DashboardSubheading     string   `yaml:"dashboard-subheading,omitempty"`   // Dashboard Description between header and endpoints
+	Header                  string   `yaml:"header,omitempty"`                 // Header is the text at the top of the page
+	Logo                    string   `yaml:"logo,omitempty"`                   // Logo to display on the page
+	Link                    string   `yaml:"link,omitempty"`                   // Link to open when clicking on the logo
+	Buttons                 []Button `yaml:"buttons,omitempty"`                // Buttons to display below the header
+	CustomCSS               string   `yaml:"custom-css,omitempty"`             // Custom CSS to include in the page
+	DarkMode                *bool    `yaml:"dark-mode,omitempty"`              // DarkMode is a flag to enable dark mode by default
+	DefaultSortBy           string   `yaml:"default-sort-by,omitempty"`        // DefaultSortBy is the default sort option ('name', 'group', 'health')
+	DefaultFilterBy         string   `yaml:"default-filter-by,omitempty"`      // DefaultFilterBy is the default filter option ('none', 'failing', 'unstable')
 	//////////////////////////////////////////////
 	// Non-configurable - used for UI rendering //
 	//////////////////////////////////////////////
@@ -73,6 +76,8 @@ func GetDefaultConfig() *Config {
 	return &Config{
 		Title:                  defaultTitle,
 		Description:            defaultDescription,
+		DashboardHeading:       defaultDashboardHeading,
+		DashboardSubheading:    defaultDashboardSubheading,
 		Header:                 defaultHeader,
 		Logo:                   defaultLogo,
 		Link:                   defaultLink,
@@ -92,6 +97,12 @@ func (cfg *Config) ValidateAndSetDefaults() error {
 	if len(cfg.Description) == 0 {
 		cfg.Description = defaultDescription
 	}
+	if len(cfg.DashboardHeading) == 0 {
+		cfg.DashboardHeading = defaultDashboardHeading
+	}
+	if len(cfg.DashboardSubheading) == 0 {
+		cfg.DashboardSubheading = defaultDashboardSubheading
+	}
 	if len(cfg.Header) == 0 {
 		cfg.Header = defaultHeader
 	}
diff --git a/web/app/public/index.html b/web/app/public/index.html
index 5655ef75..292029a9 100644
--- a/web/app/public/index.html
+++ b/web/app/public/index.html
@@ -3,7 +3,7 @@
   <head>
     <meta charset="utf-8" />
     <script type="text/javascript">
-      window.config = {logo: "{{ .UI.Logo }}", header: "{{ .UI.Header }}", link: "{{ .UI.Link }}", buttons: [], maximumNumberOfResults: "{{ .UI.MaximumNumberOfResults }}", defaultSortBy: "{{ .UI.DefaultSortBy }}", defaultFilterBy: "{{ .UI.DefaultFilterBy }}"};{{- range .UI.Buttons}}window.config.buttons.push({name:"{{ .Name }}",link:"{{ .Link }}"});{{end}}
+      window.config = {logo: "{{ .UI.Logo }}", header: "{{ .UI.Header }}", dashboardHeading: "{{ .UI.DashboardHeading }}", dashboardSubheading: "{{ .UI.DashboardSubheading }}", link: "{{ .UI.Link }}", buttons: [], maximumNumberOfResults: "{{ .UI.MaximumNumberOfResults }}", defaultSortBy: "{{ .UI.DefaultSortBy }}", defaultFilterBy: "{{ .UI.DefaultFilterBy }}"};{{- range .UI.Buttons}}window.config.buttons.push({name:"{{ .Name }}",link:"{{ .Link }}"});{{end}}
       // Initialize theme immediately to prevent flash
       (function() {
         const themeFromCookie = document.cookie.match(/theme=(dark|light);?/)?.[1];
diff --git a/web/app/src/views/Home.vue b/web/app/src/views/Home.vue
index e8d6d9d2..f1743161 100644
--- a/web/app/src/views/Home.vue
+++ b/web/app/src/views/Home.vue
@@ -4,8 +4,8 @@
       <div class="mb-6">
         <div class="flex items-center justify-between mb-6">
           <div>
-            <h1 class="text-4xl font-bold tracking-tight">Health Dashboard</h1>
-            <p class="text-muted-foreground mt-2">Monitor the health of your endpoints in real-time</p>
+            <h1 class="text-4xl font-bold tracking-tight">{{ dashboardHeading }}</h1>
+            <p class="text-muted-foreground mt-2">{{ dashboardSubheading }}</p>
           </div>
           <div class="flex items-center gap-4">
             <Button 
@@ -532,6 +532,14 @@ const initializeCollapsedGroups = () => {
   }
 }
 
+const dashboardHeading = computed(() => {
+  return window.config && window.config.dashboardHeading && window.config.dashboardHeading !== '{{ .UI.DashboardHeading }}' ? window.config.dashboardHeading : "Health Dashboard"
+})
+
+const dashboardSubheading = computed(() => {
+  return window.config && window.config.dashboardSubheading && window.config.dashboardSubheading !== '{{ .UI.dashboardSubheading }}' ? window.config.dashboardSubheading : "Monitor the health of your endpoints in real-time"
+})
+
 onMounted(() => {
   fetchData()
 })
diff --git a/web/static/index.html b/web/static/index.html
index 703607b7..9f9a0a29 100644
--- a/web/static/index.html
+++ b/web/static/index.html
@@ -1,4 +1,4 @@
-<!doctype html><html lang="en" class="{{ .Theme }}"><head><meta charset="utf-8"/><script>window.config = {logo: "{{ .UI.Logo }}", header: "{{ .UI.Header }}", link: "{{ .UI.Link }}", buttons: [], maximumNumberOfResults: "{{ .UI.MaximumNumberOfResults }}", defaultSortBy: "{{ .UI.DefaultSortBy }}", defaultFilterBy: "{{ .UI.DefaultFilterBy }}"};{{- range .UI.Buttons}}window.config.buttons.push({name:"{{ .Name }}",link:"{{ .Link }}"});{{end}}
+<!doctype html><html lang="en" class="{{ .Theme }}"><head><meta charset="utf-8"/><script>window.config = {logo: "{{ .UI.Logo }}", header: "{{ .UI.Header }}", dashboardHeading: "{{ .UI.DashboardHeading }}", dashboardSubheading: "{{ .UI.DashboardSubheading }}", link: "{{ .UI.Link }}", buttons: [], maximumNumberOfResults: "{{ .UI.MaximumNumberOfResults }}", defaultSortBy: "{{ .UI.DefaultSortBy }}", defaultFilterBy: "{{ .UI.DefaultFilterBy }}"};{{- range .UI.Buttons}}window.config.buttons.push({name:"{{ .Name }}",link:"{{ .Link }}"});{{end}}
       // Initialize theme immediately to prevent flash
       (function() {
         const themeFromCookie = document.cookie.match(/theme=(dark|light);?/)?.[1];
diff --git a/web/static/js/app.js b/web/static/js/app.js
index ebc4da50..e2224cea 100644
--- a/web/static/js/app.js
+++ b/web/static/js/app.js
@@ -1 +1 @@
-(function(){"use strict";var e={763:function(e,t,s){s.d(t,{L:function(){return Kr}});var l=s(963),a=s(252),n=s(577),r=s(262),o=s.p+"img/logo.svg",u=s(201),i=s(507),d=s(970),c=s(135),g=s(3),m=s(512),p=s(388);function v(...e){return(0,p.m6)((0,m.W)(e))}const f=["disabled"];var w={__name:"Button",props:{variant:{type:String,default:"default"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1}},setup(e){const t=(0,g.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});return(s,l)=>((0,a.wg)(),(0,a.iD)("button",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant,size:e.size}),s.$attrs.class??"")),disabled:e.disabled},[(0,a.WI)(s.$slots,"default")],10,f))}};const h=w;var x=h,b={__name:"Card",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("rounded-lg border bg-card text-card-foreground shadow-sm",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const y=b;var k=y,_={__name:"CardHeader",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("flex flex-col space-y-1.5 p-6",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const S=_;var D=S,U={__name:"CardTitle",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("h3",{class:(0,n.C_)((0,r.SU)(v)("text-2xl font-semibold leading-none tracking-tight",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const C=U;var z=C,W={__name:"CardContent",setup(e){return(e,t)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("p-6 pt-0",e.$attrs.class??""))},[(0,a.WI)(e.$slots,"default")],2))}};const H=W;var j=H;const F={id:"social"};function R(e,t){return(0,a.wg)(),(0,a.iD)("div",F,t[0]||(t[0]=[(0,a._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,a._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,a._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1)]))}var T=s(744);const $={},E=(0,T.Z)($,[["render",R],["__scopeId","data-v-788af9ce"]]);var q=E;const L=e=>{let t=(new Date).getTime()-new Date(e).getTime();if(t<500)return"now";if(t>2592e5){let e=(t/864e5).toFixed(0);return e+" day"+("1"!==e?"s":"")+" ago"}if(t>36e5){let e=(t/36e5).toFixed(0);return e+" hour"+("1"!==e?"s":"")+" ago"}if(t>6e4){let e=(t/6e4).toFixed(0);return e+" minute"+("1"!==e?"s":"")+" ago"}let s=(t/1e3).toFixed(0);return s+" second"+("1"!==s?"s":"")+" ago"},Z=(e,t)=>{const s=new Date(e)-new Date(t),l=Math.floor(s/1e3),a=Math.floor(l/60),n=Math.floor(a/60);if(n>0){const e=a%60,t=n+(1===n?" hour":" hours");return e>0?t+" "+e+(1===e?" minute":" minutes"):t}if(a>0){const e=l%60,t=a+(1===a?" minute":" minutes");return e>0?t+" "+e+(1===e?" second":" seconds"):t}return l+(1===l?" second":" seconds")},A=e=>{let t=new Date(e),s=t.getFullYear(),l=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),a=(t.getDate()<10?"0":"")+t.getDate(),n=(t.getHours()<10?"0":"")+t.getHours(),r=(t.getMinutes()<10?"0":"")+t.getMinutes(),o=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+l+"-"+a+" "+n+":"+r+":"+o},M={key:0,class:"space-y-2"},N={key:0,class:"flex items-center gap-2"},Y={class:"text-xs font-semibold"},I={class:"font-mono text-xs"},O={key:1},P={class:"font-mono text-xs"},K={key:0,class:"mt-1 space-y-0.5"},V={class:"truncate"},B={class:"text-muted-foreground"},G={key:0,class:"text-xs text-muted-foreground"},J={class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},X={class:"font-mono text-xs"},Q={key:2},ee={class:"font-mono text-xs space-y-0.5"},te={class:"break-all"},se={key:3},le={class:"font-mono text-xs space-y-0.5"};var ae={__name:"Tooltip",props:{event:{type:[Event,Object],default:null},result:{type:Object,default:null},isPersistent:{type:Boolean,default:!1}},setup(e){const t=(0,u.yj)(),s=e,l=(0,r.iH)(!0),o=(0,r.iH)(0),i=(0,r.iH)(0),d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,a.Fl)((()=>s.result&&void 0!==s.result.endpointResults)),m=(0,a.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.length:0)),p=(0,a.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.filter((e=>e.success)).length:0)),v=async()=>{if(!c.value||!d.value||l.value)return;await(0,a.Y3)();const e=c.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft;let r=e.bottom+s+8,u=e.left+n;const g=window.innerHeight-e.bottom,m=e.top;g<t.height+20&&(r=m>t.height+20?e.top+s-t.height-8:m>g?s+10:s+window.innerHeight-t.height-10);const p=window.innerWidth-e.left;p<t.width+20&&(u=e.right+n-t.width,u<n+10&&(u=n+10)),o.value=Math.round(r),i.value=Math.round(u)},f=async()=>{if(s.event&&s.event.type)if(await(0,a.Y3)(),"mouseenter"!==s.event.type&&"click"!==s.event.type||!d.value)"mouseleave"===s.event.type&&(s.isPersistent||(l.value=!0,c.value=null));else{const e=s.event.target;c.value=e,l.value=!1,await(0,a.Y3)(),await v()}},w=()=>{v()};return(0,a.bv)((()=>{window.addEventListener("resize",w)})),(0,a.Ah)((()=>{window.removeEventListener("resize",w)})),(0,a.YP)((()=>s.event),(e=>{e&&e.type&&("mouseenter"===e.type||"click"===e.type?(l.value=!1,(0,a.Y3)((()=>f()))):"mouseleave"===e.type&&(s.isPersistent||(l.value=!0)))}),{immediate:!0}),(0,a.YP)((()=>s.result),(()=>{l.value||(0,a.Y3)((()=>f()))})),(0,a.YP)((()=>[s.isPersistent,s.result]),(([e,t])=>{e||t?t&&(e||"mouseenter"===s.event?.type)&&(l.value=!1,(0,a.Y3)((()=>f()))):l.value=!0})),(0,a.YP)((()=>t.path),(()=>{l.value=!0,c.value=null})),(t,s)=>((0,a.wg)(),(0,a.iD)("div",{id:"tooltip",ref_key:"tooltip",ref:d,class:(0,n.C_)(["absolute z-50 px-3 py-2 text-sm rounded-md shadow-lg border transition-all duration-200","bg-popover text-popover-foreground border-border",l.value?"invisible opacity-0":"visible opacity-100"]),style:(0,n.j5)(`top: ${o.value}px; left: ${i.value}px;`)},[e.result?((0,a.wg)(),(0,a.iD)("div",M,[g.value?((0,a.wg)(),(0,a.iD)("div",N,[(0,a._)("span",{class:(0,n.C_)(["inline-block w-2 h-2 rounded-full",e.result.success?"bg-green-500":"bg-red-500"])},null,2),(0,a._)("span",Y,(0,n.zw)(e.result.success?"Suite Passed":"Suite Failed"),1)])):(0,a.kq)("",!0),(0,a._)("div",null,[s[0]||(s[0]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Timestamp",-1)),(0,a._)("div",I,(0,n.zw)((0,r.SU)(A)(e.result.timestamp)),1)]),g.value&&e.result.endpointResults?((0,a.wg)(),(0,a.iD)("div",O,[s[1]||(s[1]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Endpoints",-1)),(0,a._)("div",P,[(0,a._)("span",{class:(0,n.C_)(p.value===m.value?"text-green-500":"text-yellow-500")},(0,n.zw)(p.value)+"/"+(0,n.zw)(m.value)+" passed ",3)]),e.result.endpointResults.length>0?((0,a.wg)(),(0,a.iD)("div",K,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.result.endpointResults.slice(0,5),((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"flex items-center gap-1 text-xs"},[(0,a._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,a._)("span",V,(0,n.zw)(e.name),1),(0,a._)("span",B,"("+(0,n.zw)((e.duration/1e6).toFixed(0))+"ms)",1)])))),128)),e.result.endpointResults.length>5?((0,a.wg)(),(0,a.iD)("div",G," ... and "+(0,n.zw)(e.result.endpointResults.length-5)+" more ",1)):(0,a.kq)("",!0)])):(0,a.kq)("",!0)])):(0,a.kq)("",!0),(0,a._)("div",null,[(0,a._)("div",J,(0,n.zw)(g.value?"Total Duration":"Response Time"),1),(0,a._)("div",X,(0,n.zw)((g.value,(e.result.duration/1e6).toFixed(0)))+"ms ",1)]),!g.value&&e.result.conditionResults&&e.result.conditionResults.length?((0,a.wg)(),(0,a.iD)("div",Q,[s[2]||(s[2]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Conditions",-1)),(0,a._)("div",ee,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.result.conditionResults,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"flex items-start gap-1"},[(0,a._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,a._)("span",te,(0,n.zw)(e.condition),1)])))),128))])])):(0,a.kq)("",!0),e.result.errors&&e.result.errors.length?((0,a.wg)(),(0,a.iD)("div",se,[s[3]||(s[3]=(0,a._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Errors",-1)),(0,a._)("div",le,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.result.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"text-red-500"}," • "+(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0)])):(0,a.kq)("",!0)],6))}};const ne=ae;var re=ne;const oe={class:"flex justify-center items-center"};var ue={__name:"Loading",props:{size:{type:String,default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)}},setup(e){const t=e,s=(0,a.Fl)((()=>{const e={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"};return e[t.size]||e.md}));return(e,t)=>((0,a.wg)(),(0,a.iD)("div",oe,[(0,a._)("img",{class:(0,n.C_)(["animate-spin rounded-full opacity-60 grayscale",s.value]),src:o,alt:"Gatus logo"},null,2)]))}};const ie=ue;var de=ie;const ce={id:"global",class:"bg-background text-foreground"},ge={key:0,class:"flex items-center justify-center min-h-screen"},me={key:1,class:"relative"},pe={class:"border-b bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/60"},ve={class:"container mx-auto px-4 py-4 max-w-7xl"},fe={class:"flex items-center justify-between"},we={class:"flex items-center gap-4"},he={class:"w-12 h-12 flex items-center justify-center"},xe=["src"],be={key:1,src:o,alt:"Gatus",class:"w-full h-full object-contain"},ye={class:"text-2xl font-bold tracking-tight"},ke={key:0,class:"text-sm text-muted-foreground"},_e={class:"flex items-center gap-2"},Se={key:0,class:"hidden md:flex items-center gap-1"},De=["href"],Ue={key:0,class:"md:hidden mt-4 pt-4 border-t space-y-1"},Ce=["href"],ze={class:"relative"},We={class:"border-t mt-auto"},He={class:"container mx-auto px-4 py-6 max-w-7xl"},je={class:"flex flex-col items-center gap-4"},Fe={key:2,id:"login-container",class:"flex items-center justify-center min-h-screen p-4"},Re={key:0,class:"mb-6"},Te={class:"p-3 rounded-md bg-destructive/10 border border-destructive/20"},$e={class:"text-sm text-destructive text-center"},Ee={key:0},qe={key:1},Le=["href"];var Ze={__name:"App",setup(e){const t=(0,u.yj)(),s=(0,r.iH)(!1),l=(0,r.iH)({oidc:!1,authenticated:!0}),g=(0,r.iH)([]),m=(0,r.iH)({}),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!1);let w=null;const h=(0,a.Fl)((()=>window.config&&window.config.logo&&"{{ .UI.Logo }}"!==window.config.logo?window.config.logo:"")),b=(0,a.Fl)((()=>window.config&&window.config.header&&"{{ .UI.Header }}"!==window.config.header?window.config.header:"Gatus")),y=(0,a.Fl)((()=>window.config&&window.config.link&&"{{ .UI.Link }}"!==window.config.link?window.config.link:null)),_=(0,a.Fl)((()=>window.config&&window.config.buttons?window.config.buttons:[])),S=async()=>{try{const e=await fetch(`${Kr}/api/v1/config`,{credentials:"include"});if(200===e.status){const t=await e.json();l.value=t,g.value=t.announcements||[]}s.value=!0}catch(e){console.error("Failed to fetch config:",e),s.value=!0}},U=(e,t,s="hover")=>{"click"===s?e?(m.value={result:e,event:t},f.value=!0):(m.value={},f.value=!1):"hover"===s&&(f.value||(m.value={result:e,event:t}))},C=e=>{if(f.value){const t=document.getElementById("tooltip"),s=e.target.closest(".flex-1.h-6, .flex-1.h-8");!t||t.contains(e.target)||s||(m.value={},f.value=!1,window.dispatchEvent(new CustomEvent("clear-data-point-selection")))}};return(0,a.bv)((()=>{S(),w=setInterval(S,6e5),document.addEventListener("click",C)})),(0,a.Ah)((()=>{w&&(clearInterval(w),w=null),document.removeEventListener("click",C)})),(e,u)=>{const w=(0,a.up)("router-view");return(0,a.wg)(),(0,a.iD)("div",ce,[s.value?l.value&&l.value.oidc&&!l.value.authenticated?((0,a.wg)(),(0,a.iD)("div",Fe,[(0,a.Wm)((0,r.SU)(k),{class:"w-full max-w-md"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"text-center"},{default:(0,a.w5)((()=>[u[5]||(u[5]=(0,a._)("img",{src:o,alt:"Gatus",class:"w-20 h-20 mx-auto mb-4"},null,-1)),(0,a.Wm)((0,r.SU)(z),{class:"text-3xl"},{default:(0,a.w5)((()=>u[4]||(u[4]=[(0,a.Uk)("Gatus",-1)]))),_:1,__:[4]}),u[6]||(u[6]=(0,a._)("p",{class:"text-muted-foreground mt-2"},"System Monitoring Dashboard",-1))])),_:1,__:[5,6]}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,r.SU)(t)&&(0,r.SU)(t).query.error?((0,a.wg)(),(0,a.iD)("div",Re,[(0,a._)("div",Te,[(0,a._)("p",$e,["access_denied"===(0,r.SU)(t).query.error?((0,a.wg)(),(0,a.iD)("span",Ee," You do not have access to this status page ")):((0,a.wg)(),(0,a.iD)("span",qe,(0,n.zw)((0,r.SU)(t).query.error),1))])])])):(0,a.kq)("",!0),(0,a._)("a",{href:`${(0,r.SU)(Kr)}/oidc/login`,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-11 px-8 w-full",onClick:u[2]||(u[2]=e=>v.value=!0)},[v.value?((0,a.wg)(),(0,a.j4)(de,{key:0,size:"xs"})):((0,a.wg)(),(0,a.iD)(a.HY,{key:1},[(0,a.Wm)((0,r.SU)(c.Z),{class:"mr-2 h-4 w-4"}),u[7]||(u[7]=(0,a.Uk)(" Login with OIDC ",-1))],64))],8,Le)])),_:1})])),_:1})])):((0,a.wg)(),(0,a.iD)("div",me,[(0,a._)("header",pe,[(0,a._)("div",ve,[(0,a._)("div",fe,[(0,a._)("div",we,[((0,a.wg)(),(0,a.j4)((0,a.LL)(y.value?"a":"div"),{href:y.value,target:"_blank",class:"flex items-center gap-3 hover:opacity-80 transition-opacity"},{default:(0,a.w5)((()=>[(0,a._)("div",he,[h.value?((0,a.wg)(),(0,a.iD)("img",{key:0,src:h.value,alt:"Gatus",class:"w-full h-full object-contain"},null,8,xe)):((0,a.wg)(),(0,a.iD)("img",be))]),(0,a._)("div",null,[(0,a._)("h1",ye,(0,n.zw)(b.value),1),_.value&&_.value.length?((0,a.wg)(),(0,a.iD)("p",ke," System Monitoring Dashboard ")):(0,a.kq)("",!0)])])),_:1},8,["href"]))]),(0,a._)("div",_e,[_.value&&_.value.length?((0,a.wg)(),(0,a.iD)("nav",Se,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(_.value,(e=>((0,a.wg)(),(0,a.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors"},(0,n.zw)(e.name),9,De)))),128))])):(0,a.kq)("",!0),_.value&&_.value.length?((0,a.wg)(),(0,a.j4)((0,r.SU)(x),{key:1,variant:"ghost",size:"icon",class:"md:hidden",onClick:u[0]||(u[0]=e=>p.value=!p.value)},{default:(0,a.w5)((()=>[p.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(d.Z),{key:1,class:"h-5 w-5"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(i.Z),{key:0,class:"h-5 w-5"}))])),_:1})):(0,a.kq)("",!0)])]),_.value&&_.value.length&&p.value?((0,a.wg)(),(0,a.iD)("nav",Ue,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(_.value,(e=>((0,a.wg)(),(0,a.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"block px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",onClick:u[1]||(u[1]=e=>p.value=!1)},(0,n.zw)(e.name),9,Ce)))),128))])):(0,a.kq)("",!0)])]),(0,a._)("main",ze,[(0,a.Wm)(w,{onShowTooltip:U,announcements:g.value},null,8,["announcements"])]),(0,a._)("footer",We,[(0,a._)("div",He,[(0,a._)("div",je,[u[3]||(u[3]=(0,a._)("div",{class:"text-sm text-muted-foreground text-center"},[(0,a.Uk)(" Powered by "),(0,a._)("a",{href:"https://gatus.io",target:"_blank",class:"font-medium text-emerald-800 hover:text-emerald-600"},"Gatus")],-1)),(0,a.Wm)(q)])])])])):((0,a.wg)(),(0,a.iD)("div",ge,[(0,a.Wm)(de,{size:"lg"})])),(0,a.Wm)(re,{result:m.value.result,event:m.value.event,isPersistent:f.value},null,8,["result","event","isPersistent"])])}}};const Ae=Ze;var Me=Ae,Ne=s(793),Ye=s(138),Ie=s(254),Oe=s(146),Pe=s(485),Ke=s(893),Ve=s(89),Be=s(372),Ge=s(981),Je={__name:"Badge",props:{variant:{type:String,default:"default"}},setup(e){const t=(0,g.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500 text-white",warning:"border-transparent bg-yellow-500 text-white"}},defaultVariants:{variant:"default"}});return(s,l)=>((0,a.wg)(),(0,a.iD)("div",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant}),s.$attrs.class??""))},[(0,a.WI)(s.$slots,"default")],2))}};const Xe=Je;var Qe=Xe,et={__name:"StatusBadge",props:{status:{type:String,required:!0,validator:e=>["healthy","unhealthy","degraded","unknown"].includes(e)}},setup(e){const t=e,s=(0,a.Fl)((()=>{switch(t.status){case"healthy":return"success";case"unhealthy":return"destructive";case"degraded":return"warning";default:return"secondary"}})),l=(0,a.Fl)((()=>{switch(t.status){case"healthy":return"Healthy";case"unhealthy":return"Unhealthy";case"degraded":return"Degraded";default:return"Unknown"}})),o=(0,a.Fl)((()=>{switch(t.status){case"healthy":return"bg-green-400";case"unhealthy":return"bg-red-400";case"degraded":return"bg-yellow-400";default:return"bg-gray-400"}}));return(e,t)=>((0,a.wg)(),(0,a.j4)((0,r.SU)(Qe),{variant:s.value,class:"flex items-center gap-1"},{default:(0,a.w5)((()=>[(0,a._)("span",{class:(0,n.C_)(["w-2 h-2 rounded-full",o.value])},null,2),(0,a.Uk)(" "+(0,n.zw)(l.value),1)])),_:1},8,["variant"]))}};const tt=et;var st=tt;const lt={class:"flex items-start justify-between gap-2 sm:gap-3"},at={class:"flex-1 min-w-0 overflow-hidden"},nt=["title","aria-label"],rt={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground min-h-[1.25rem]"},ot=["title"],ut={key:1},it=["title"],dt={class:"flex-shrink-0 ml-2"},ct={class:"space-y-2"},gt={class:"flex items-center justify-between mb-1"},mt=["title"],pt={class:"flex gap-0.5"},vt=["onMouseenter","onMouseleave","onClick"],ft={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var wt={__name:"EndpointCard",props:{endpoint:{type:Object,required:!0},maxResults:{type:Number,default:50},showAverageResponseTime:{type:Boolean,default:!0}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,u.tv)(),o=e,i=t,d=(0,r.iH)(null),c=(0,a.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?o.endpoint.results[o.endpoint.results.length-1]:null)),g=(0,a.Fl)((()=>c.value?c.value.success?"healthy":"unhealthy":"unknown")),m=(0,a.Fl)((()=>c.value?.hostname||null)),p=(0,a.Fl)((()=>{const e=[...o.endpoint.results||[]];while(e.length<o.maxResults)e.unshift(null);return e.slice(-o.maxResults)})),v=(0,a.Fl)((()=>{if(!o.endpoint.results||0===o.endpoint.results.length)return"N/A";let e=0,t=0,s=1/0,l=0;for(const a of o.endpoint.results)if(a.duration){const n=a.duration/1e6;e+=n,t++,s=Math.min(s,n),l=Math.max(l,n)}if(0===t)return"N/A";if(o.showAverageResponseTime){const s=Math.round(e/t);return`~${s}ms`}{const e=Math.round(s),t=Math.round(l);return e===t?`${e}ms`:`${e}-${t}ms`}})),f=(0,a.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?L(o.endpoint.results[0].timestamp):"")),w=(0,a.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?L(o.endpoint.results[o.endpoint.results.length-1].timestamp):"")),h=()=>{s.push(`/endpoints/${o.endpoint.key}`)},x=(e,t)=>{i("showTooltip",e,t,"hover")},b=(e,t)=>{i("showTooltip",null,t,"hover")},y=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,i("showTooltip",null,t,"click")):(d.value=s,i("showTooltip",e,t,"click"))},_=()=>{d.value=null};return(0,a.bv)((()=>{window.addEventListener("clear-data-point-selection",_)})),(0,a.Ah)((()=>{window.removeEventListener("clear-data-point-selection",_)})),(t,s)=>((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{class:"endpoint h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"endpoint-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,a.w5)((()=>[(0,a._)("div",lt,[(0,a._)("div",at,[(0,a.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,a.w5)((()=>[(0,a._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:h,onKeydown:(0,l.D2)(h,["enter"]),title:e.endpoint.name,role:"link",tabindex:"0","aria-label":`View details for ${e.endpoint.name}`},(0,n.zw)(e.endpoint.name),41,nt)])),_:1}),(0,a._)("div",rt,[e.endpoint.group?((0,a.wg)(),(0,a.iD)("span",{key:0,class:"truncate",title:e.endpoint.group},(0,n.zw)(e.endpoint.group),9,ot)):(0,a.kq)("",!0),e.endpoint.group&&m.value?((0,a.wg)(),(0,a.iD)("span",ut,"•")):(0,a.kq)("",!0),m.value?((0,a.wg)(),(0,a.iD)("span",{key:2,class:"truncate",title:m.value},(0,n.zw)(m.value),9,it)):(0,a.kq)("",!0)])]),(0,a._)("div",dt,[(0,a.Wm)(st,{status:g.value},null,8,["status"])])])])),_:1}),(0,a.Wm)((0,r.SU)(j),{class:"endpoint-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,a.w5)((()=>[(0,a._)("div",ct,[(0,a._)("div",null,[(0,a._)("div",gt,[s[0]||(s[0]=(0,a._)("div",{class:"flex-1"},null,-1)),(0,a._)("p",{class:"text-xs text-muted-foreground",title:e.showAverageResponseTime?"Average response time":"Minimum and maximum response time"},(0,n.zw)(v.value),9,mt)]),(0,a._)("div",pt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(p.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":"",e?e.success?d.value===t?"bg-green-700":"bg-green-500 hover:bg-green-700":d.value===t?"bg-red-700":"bg-red-500 hover:bg-red-700":"bg-gray-200 dark:bg-gray-700"]),onMouseenter:t=>e&&x(e,t),onMouseleave:t=>e&&b(e,t),onClick:(0,l.iM)((s=>e&&y(e,s,t)),["stop"])},null,42,vt)))),128))]),(0,a._)("div",ft,[(0,a._)("span",null,(0,n.zw)(f.value),1),(0,a._)("span",null,(0,n.zw)(w.value),1)])])])])),_:1})])),_:1}))}};const ht=wt;var xt=ht;const bt={class:"flex items-start justify-between gap-2 sm:gap-3"},yt={class:"flex-1 min-w-0 overflow-hidden"},kt=["title","aria-label"],_t={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground"},St=["title"],Dt={key:1},Ut={key:2},Ct={class:"flex-shrink-0 ml-2"},zt={class:"space-y-2"},Wt={class:"flex items-center justify-between mb-1"},Ht={class:"text-xs text-muted-foreground"},jt={key:0,class:"text-xs text-muted-foreground"},Ft={class:"flex gap-0.5"},Rt=["onMouseenter","onMouseleave","onClick"],Tt={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var $t={__name:"SuiteCard",props:{suite:{type:Object,required:!0},maxResults:{type:Number,default:50}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,u.tv)(),o=e,i=t,d=(0,r.iH)(null),c=(0,a.Fl)((()=>{const e=[...o.suite.results||[]];while(e.length<o.maxResults)e.unshift(null);return e.slice(-o.maxResults)})),g=(0,a.Fl)((()=>o.suite.results&&0!==o.suite.results.length?o.suite.results[o.suite.results.length-1].success?"healthy":"unhealthy":"unknown")),m=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results[o.suite.results.length-1];return e.endpointResults?e.endpointResults.length:0})),p=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results.filter((e=>e.success)).length;return Math.round(e/o.suite.results.length*100)})),v=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return null;const e=o.suite.results.reduce(((e,t)=>e+(t.duration||0)),0);return Math.round(e/o.suite.results.length/1e6)})),f=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"N/A";const e=o.suite.results[0];return L(e.timestamp)})),w=(0,a.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"Now";const e=o.suite.results[o.suite.results.length-1];return L(e.timestamp)})),h=()=>{s.push(`/suites/${o.suite.key}`)},x=(e,t)=>{i("showTooltip",e,t,"hover")},b=(e,t)=>{i("showTooltip",null,t,"hover")},y=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,i("showTooltip",null,t,"click")):(d.value=s,i("showTooltip",e,t,"click"))},_=()=>{d.value=null};return(0,a.bv)((()=>{window.addEventListener("clear-data-point-selection",_)})),(0,a.Ah)((()=>{window.removeEventListener("clear-data-point-selection",_)})),(t,s)=>((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{class:"suite h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"suite-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,a.w5)((()=>[(0,a._)("div",bt,[(0,a._)("div",yt,[(0,a.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,a.w5)((()=>[(0,a._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:h,onKeydown:(0,l.D2)(h,["enter"]),title:e.suite.name,role:"link",tabindex:"0","aria-label":`View details for suite ${e.suite.name}`},(0,n.zw)(e.suite.name),41,kt)])),_:1}),(0,a._)("div",_t,[e.suite.group?((0,a.wg)(),(0,a.iD)("span",{key:0,class:"truncate",title:e.suite.group},(0,n.zw)(e.suite.group),9,St)):(0,a.kq)("",!0),e.suite.group&&m.value?((0,a.wg)(),(0,a.iD)("span",Dt,"•")):(0,a.kq)("",!0),m.value?((0,a.wg)(),(0,a.iD)("span",Ut,(0,n.zw)(m.value)+" endpoint"+(0,n.zw)(1!==m.value?"s":""),1)):(0,a.kq)("",!0)])]),(0,a._)("div",Ct,[(0,a.Wm)(st,{status:g.value},null,8,["status"])])])])),_:1}),(0,a.Wm)((0,r.SU)(j),{class:"suite-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,a.w5)((()=>[(0,a._)("div",zt,[(0,a._)("div",null,[(0,a._)("div",Wt,[(0,a._)("p",Ht,"Success Rate: "+(0,n.zw)(p.value)+"%",1),v.value?((0,a.wg)(),(0,a.iD)("p",jt,(0,n.zw)(v.value)+"ms avg",1)):(0,a.kq)("",!0)]),(0,a._)("div",Ft,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(c.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":"",e?e.success?d.value===t?"bg-green-700":"bg-green-500 hover:bg-green-700":d.value===t?"bg-red-700":"bg-red-500 hover:bg-red-700":"bg-gray-200 dark:bg-gray-700"]),onMouseenter:t=>e&&x(e,t),onMouseleave:t=>e&&b(e,t),onClick:(0,l.iM)((s=>e&&y(e,s,t)),["stop"])},null,42,Rt)))),128))]),(0,a._)("div",Tt,[(0,a._)("span",null,(0,n.zw)(f.value),1),(0,a._)("span",null,(0,n.zw)(w.value),1)])])])])),_:1})])),_:1}))}};const Et=(0,T.Z)($t,[["__scopeId","data-v-230a1fd1"]]);var qt=Et,Lt=s(275);const Zt=["value"];var At={__name:"Input",props:{modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(e){return(t,s)=>((0,a.wg)(),(0,a.iD)("input",{class:(0,n.C_)((0,r.SU)(v)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.$attrs.class??"")),value:e.modelValue,onInput:s[0]||(s[0]=e=>t.$emit("update:modelValue",e.target.value))},null,42,Zt))}};const Mt=At;var Nt=Mt,Yt=s(368);const It=["aria-expanded","aria-label"],Ot={class:"truncate"},Pt={key:0,role:"listbox",class:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95"},Kt={class:"p-1"},Vt=["onClick","aria-selected"],Bt={class:"absolute left-1.5 sm:left-2 flex h-3.5 w-3.5 items-center justify-center"};var Gt={__name:"Select",props:{modelValue:{type:String,default:""},options:{type:Array,required:!0},placeholder:{type:String,default:"Select..."},class:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,l=t,o=(0,r.iH)(!1),u=(0,r.iH)(null),i=(0,r.iH)(-1),d=(0,a.Fl)((()=>s.options.find((e=>e.value===s.modelValue))||{label:s.placeholder,value:""})),c=e=>{l("update:modelValue",e.value),o.value=!1},g=()=>{if(o.value=!o.value,o.value){const e=s.options.findIndex((e=>e.value===s.modelValue));i.value=e>=0?e:0}else i.value=-1},m=e=>{u.value&&!u.value.contains(e.target)&&(o.value=!1,i.value=-1)},p=e=>{if(o.value)switch(e.key){case"ArrowDown":e.preventDefault(),i.value=Math.min(i.value+1,s.options.length-1);break;case"ArrowUp":e.preventDefault(),i.value=Math.max(i.value-1,0);break;case"Enter":case" ":e.preventDefault(),i.value>=0&&i.value<s.options.length&&c(s.options[i.value]);break;case"Escape":e.preventDefault(),o.value=!1,i.value=-1;break}else"Enter"!==e.key&&" "!==e.key&&"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),g())};return(0,a.bv)((()=>{document.addEventListener("click",m)})),(0,a.Ah)((()=>{document.removeEventListener("click",m)})),(t,l)=>((0,a.wg)(),(0,a.iD)("div",{ref_key:"selectRef",ref:u,class:(0,n.C_)(["relative",s.class])},[(0,a._)("button",{onClick:g,onKeydown:p,"aria-expanded":o.value,"aria-haspopup":!0,"aria-label":d.value.label||s.placeholder,class:"flex h-9 sm:h-10 w-full items-center justify-between rounded-md border border-input bg-background px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"},[(0,a._)("span",Ot,(0,n.zw)(d.value.label),1),(0,a.Wm)((0,r.SU)(Pe.Z),{class:"h-3 w-3 sm:h-4 sm:w-4 opacity-50 flex-shrink-0 ml-1"})],40,It),o.value?((0,a.wg)(),(0,a.iD)("div",Pt,[(0,a._)("div",Kt,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.options,((t,s)=>((0,a.wg)(),(0,a.iD)("div",{key:t.value,onClick:e=>c(t),class:(0,n.C_)(["relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-6 sm:pl-8 pr-2 text-xs sm:text-sm outline-none hover:bg-accent hover:text-accent-foreground",s===i.value&&"bg-accent text-accent-foreground"]),role:"option","aria-selected":e.modelValue===t.value},[(0,a._)("span",Bt,[e.modelValue===t.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(Yt.Z),{key:0,class:"h-3 w-3 sm:h-4 sm:w-4"})):(0,a.kq)("",!0)]),(0,a.Uk)(" "+(0,n.zw)(t.label),1)],10,Vt)))),128))])])):(0,a.kq)("",!0)],2))}};const Jt=Gt;var Xt=Jt;const Qt={class:"flex flex-col lg:flex-row gap-3 lg:gap-4 p-3 sm:p-4 bg-card rounded-lg border"},es={class:"flex-1"},ts={class:"relative"},ss={class:"flex flex-col sm:flex-row gap-3 sm:gap-4"},ls={class:"flex items-center gap-2 flex-1 sm:flex-initial"},as={class:"flex items-center gap-2 flex-1 sm:flex-initial"};var ns={__name:"SearchBar",emits:["search","update:showOnlyFailing","update:showRecentFailures","update:groupByGroup","update:sortBy","initializeCollapsedGroups"],setup(e,{emit:t}){const s=(0,r.iH)(""),l=(0,r.iH)(localStorage.getItem("gatus:filter-by")||"undefined"!==typeof window&&window.config?.defaultFilterBy||"none"),n=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"undefined"!==typeof window&&window.config?.defaultSortBy||"name"),o=[{label:"None",value:"none"},{label:"Failing",value:"failing"},{label:"Unstable",value:"unstable"}],u=[{label:"Name",value:"name"},{label:"Group",value:"group"},{label:"Health",value:"health"}],i=t,d=e=>{l.value=e,localStorage.setItem("gatus:filter-by",e),i("update:showOnlyFailing",!1),i("update:showRecentFailures",!1),"failing"===e?i("update:showOnlyFailing",!0):"unstable"===e&&i("update:showRecentFailures",!0)},c=e=>{n.value=e,localStorage.setItem("gatus:sort-by",e),i("update:sortBy",e),i("update:groupByGroup","group"===e),"group"===e&&i("initializeCollapsedGroups")};return(0,a.bv)((()=>{d(l.value),c(n.value)})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",Qt,[(0,a._)("div",es,[(0,a._)("div",ts,[(0,a.Wm)((0,r.SU)(Lt.Z),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),t[4]||(t[4]=(0,a._)("label",{for:"search-input",class:"sr-only"},"Search endpoints",-1)),(0,a.Wm)((0,r.SU)(Nt),{id:"search-input",modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),type:"text",placeholder:"Search endpoints...",class:"pl-10 text-sm sm:text-base",onInput:t[1]||(t[1]=t=>e.$emit("search",s.value))},null,8,["modelValue"])])]),(0,a._)("div",ss,[(0,a._)("div",ls,[t[5]||(t[5]=(0,a._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Filter by:",-1)),(0,a.Wm)((0,r.SU)(Xt),{modelValue:l.value,"onUpdate:modelValue":[t[2]||(t[2]=e=>l.value=e),d],options:o,placeholder:"None",class:"flex-1 sm:w-[140px] md:w-[160px]"},null,8,["modelValue"])]),(0,a._)("div",as,[t[6]||(t[6]=(0,a._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Sort by:",-1)),(0,a.Wm)((0,r.SU)(Xt),{modelValue:n.value,"onUpdate:modelValue":[t[3]||(t[3]=e=>n.value=e),c],options:u,placeholder:"Name",class:"flex-1 sm:w-[90px] md:w-[100px]"},null,8,["modelValue"])])])]))}};const rs=ns;var os=rs,us=s(789),is=s(679);const ds={id:"settings",class:"fixed bottom-4 left-4 z-50"},cs={class:"flex items-center gap-1 bg-background/95 backdrop-blur-sm border rounded-full shadow-md p-1"},gs=["aria-label","aria-expanded"],ms={class:"text-xs font-medium"},ps=["onClick"],vs=["aria-label"],fs={class:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-popover text-popover-foreground text-xs rounded-md shadow-md opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap"},ws="300",hs="theme",xs=31536e3;var bs={__name:"Settings",emits:["refreshData"],setup(e,{emit:t}){const s=t,o=[{value:"10",label:"10s"},{value:"30",label:"30s"},{value:"60",label:"1m"},{value:"120",label:"2m"},{value:"300",label:"5m"},{value:"600",label:"10m"}],u={REFRESH_INTERVAL:"gatus:refresh-interval"};function i(){const e=document.cookie.match(new RegExp(`${hs}=(dark|light);?`))?.[1];return"dark"===e||!e&&(window.matchMedia("(prefers-color-scheme: dark)").matches||document.documentElement.classList.contains("dark"))}function d(){const e=localStorage.getItem(u.REFRESH_INTERVAL),t=e&&parseInt(e),s=t&&t>=10&&o.some((t=>t.value===e));return s?e:ws}const c=(0,r.iH)(d()),g=(0,r.iH)(i()),m=(0,r.iH)(!1);let p=null;const v=e=>{const t=o.find((t=>t.value===e));return t?t.label:`${e}s`},f=e=>{localStorage.setItem(u.REFRESH_INTERVAL,e),p&&clearInterval(p),p=setInterval((()=>{w()}),1e3*e)},w=()=>{s("refreshData")},h=e=>{c.value=e,m.value=!1,w(),f(e)},x=e=>{const t=document.getElementById("settings");t&&!t.contains(e.target)&&(m.value=!1)},b=e=>{document.cookie=`${hs}=${e}; path=/; max-age=${xs}; samesite=strict`},y=()=>{const e=i()?"light":"dark";b(e),k()},k=()=>{const e=i();g.value=e,document.documentElement.classList.toggle("dark",e)};return(0,a.bv)((()=>{f(c.value),k(),document.addEventListener("click",x)})),(0,a.Ah)((()=>{p&&clearInterval(p),document.removeEventListener("click",x)})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",ds,[(0,a._)("div",cs,[(0,a._)("button",{onClick:t[1]||(t[1]=e=>m.value=!m.value),"aria-label":`Refresh interval: ${v(c.value)}`,"aria-expanded":m.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-full hover:bg-accent transition-colors relative"},[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"w-3.5 h-3.5 text-muted-foreground"}),(0,a._)("span",ms,(0,n.zw)(v(c.value)),1),m.value?((0,a.wg)(),(0,a.iD)("div",{key:0,onClick:t[0]||(t[0]=(0,l.iM)((()=>{}),["stop"])),class:"absolute bottom-full left-0 mb-2 bg-popover border rounded-lg shadow-lg overflow-hidden"},[((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(o,(e=>(0,a._)("button",{key:e.value,onClick:t=>h(e.value),class:(0,n.C_)(["block w-full px-4 py-2 text-xs text-left hover:bg-accent transition-colors",c.value===e.value&&"bg-accent"])},(0,n.zw)(e.label),11,ps))),64))])):(0,a.kq)("",!0)],8,gs),t[2]||(t[2]=(0,a._)("div",{class:"h-5 w-px bg-border/50"},null,-1)),(0,a._)("button",{onClick:y,"aria-label":g.value?"Switch to light mode":"Switch to dark mode",class:"p-1.5 rounded-full hover:bg-accent transition-colors group relative"},[g.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(us.Z),{key:0,class:"h-3.5 w-3.5 transition-all"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(is.Z),{key:1,class:"h-3.5 w-3.5 transition-all"})),(0,a._)("div",fs,(0,n.zw)(g.value?"Light mode":"Dark mode"),1)],8,vs)])]))}};const ys=(0,T.Z)(bs,[["__scopeId","data-v-482756f8"]]);var ks=ys,_s=s(691),Ss=s(446),Ds=s(5),Us=s(337),Cs=s(441),zs=s(424);const Ws=e=>null===e||void 0===e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Hs=new Cs.TU.Renderer;Hs.link=(e,t,s)=>{const l="object"===typeof e&&null!==e?e:null,a=l?l.href:e,n=l?l.title:t,r=l?l.text:s,o=Ws(a||""),u=n?` title="${Ws(n)}"`:"",i=r||"";return`<a href="${o}" target="_blank" rel="noopener noreferrer" class="text-blue-700 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline font-medium"${u}>${i}</a>`},Cs.TU.use({renderer:Hs,breaks:!0,gfm:!0,headerIds:!1,mangle:!1});const js=e=>{if(!e)return"";const t=String(e),s=Cs.TU.parse(t);return zs.Z.sanitize(s,{ADD_ATTR:["target","rel"]})},Fs={key:0,class:"announcement-container mb-6"},Rs={class:"flex items-center justify-between"},Ts={class:"flex items-center gap-2"},$s={class:"text-xs text-gray-500 dark:text-gray-400"},Es={key:0,class:"announcement-content p-4 transition-all duration-200 rounded-b-lg"},qs={class:"relative"},Ls={class:"space-y-3"},Zs={class:"flex items-center gap-3 mb-2 relative"},As={class:"relative z-10 bg-white dark:bg-gray-800 px-2 py-1 rounded-md border border-gray-200 dark:border-gray-600"},Ms={class:"text-sm font-medium text-gray-600 dark:text-gray-300"},Ns={class:"space-y-2 ml-7 relative"},Ys={key:0,class:"absolute w-0.5 bg-gray-300 dark:bg-gray-600 pointer-events-none",style:{left:"-16px",top:"-2.5rem",height:"calc(50% + 2.5rem)"}},Is={class:"flex items-center gap-3"},Os=["title"],Ps={class:"flex-1 min-w-0"},Ks=["innerHTML"];var Vs={__name:"AnnouncementBanner",props:{announcements:{type:Array,default:()=>[]}},setup(e){const t=e,s=(0,r.iH)(!1),l=()=>{s.value=!s.value},o={outage:{icon:_s.Z,background:"bg-red-50 border-gray-200 dark:bg-red-900/50 dark:border-gray-600",border:"border-red-500",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:Ss.Z,background:"bg-yellow-50 border-gray-200 dark:bg-yellow-900/50 dark:border-gray-600",border:"border-yellow-500",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:Ds.Z,background:"bg-blue-50 border-gray-200 dark:bg-blue-900/50 dark:border-gray-600",border:"border-blue-500",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ve.Z,background:"bg-green-50 border-gray-200 dark:bg-green-900/50 dark:border-gray-600",border:"border-green-500",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Us.Z,background:"bg-gray-50 border-gray-200 dark:bg-gray-800/50 dark:border-gray-600",border:"border-gray-500",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},u=(0,a.Fl)((()=>t.announcements&&t.announcements.length>0?t.announcements[0]:null)),i=(0,a.Fl)((()=>{const e=u.value?.type||"none";return o[e]?.icon||Us.Z})),d=(0,a.Fl)((()=>{const e=u.value?.type||"none";return o[e]?.iconColor||"text-gray-600 dark:text-gray-400"})),c=(0,a.Fl)((()=>{const e=u.value?.type||"none",t=o[e];return`border-l-4 ${t.border.replace("border-","border-l-")}`})),g=(0,a.Fl)((()=>{if(!t.announcements||0===t.announcements.length)return{};const e={};return t.announcements.forEach((t=>{const s=new Date(t.timestamp).toDateString();e[s]||(e[s]=[]),e[s].push(t)})),e})),m=e=>o[e]?.icon||Us.Z,p=e=>o[e]||o.none,v=e=>{const t=new Date(e),s=new Date,l=new Date(s);return l.setDate(l.getDate()-1),t.toDateString()===s.toDateString()?"Today":t.toDateString()===l.toDateString()?"Yesterday":t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},f=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),w=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,o)=>e.announcements&&e.announcements.length?((0,a.wg)(),(0,a.iD)("div",Fs,[(0,a._)("div",{class:(0,n.C_)(["rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",c.value])},[(0,a._)("div",{class:(0,n.C_)(["announcement-header px-4 py-3 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",s.value?"rounded-lg":"rounded-t-lg border-b border-gray-200 dark:border-gray-600"]),onClick:l},[(0,a._)("div",Rs,[(0,a._)("div",Ts,[((0,a.wg)(),(0,a.j4)((0,a.LL)(i.value),{class:(0,n.C_)(["w-5 h-5",d.value])},null,8,["class"])),o[0]||(o[0]=(0,a._)("h2",{class:"text-base font-semibold text-gray-900 dark:text-gray-100"},"Announcements",-1)),(0,a._)("span",$s," ("+(0,n.zw)(e.announcements.length)+") ",1)]),(0,a.Wm)((0,r.SU)(Pe.Z),{class:(0,n.C_)(["w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform duration-200",s.value?"-rotate-90":"rotate-0"])},null,8,["class"])])],2),s.value?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",Es,[(0,a._)("div",qs,[(0,a._)("div",Ls,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"relative"},[(0,a._)("div",Zs,[(0,a._)("div",As,[(0,a._)("time",Ms,(0,n.zw)(v(t)),1)]),o[1]||(o[1]=(0,a._)("div",{class:"flex-1 border-t border-gray-200 dark:border-gray-600"},null,-1))]),(0,a._)("div",Ns,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e,((s,l)=>((0,a.wg)(),(0,a.iD)("div",{key:`${t}-${l}-${s.timestamp}`,class:"relative"},[(0,a._)("div",{class:(0,n.C_)(["absolute -left-[26px] w-5 h-5 rounded-full border bg-white dark:bg-gray-800 flex items-center justify-center z-10",l===e.length-1?"top-3":"top-1/2 -translate-y-1/2",p(s.type).border])},[((0,a.wg)(),(0,a.j4)((0,a.LL)(m(s.type)),{class:(0,n.C_)(["w-3 h-3",p(s.type).iconColor])},null,8,["class"]))],2),0===l?((0,a.wg)(),(0,a.iD)("div",Ys)):(0,a.kq)("",!0),l<e.length-1?((0,a.wg)(),(0,a.iD)("div",{key:1,class:"absolute w-0.5 bg-gray-300 dark:bg-gray-600 pointer-events-none",style:(0,n.j5)({left:"-16px",top:"50%",height:l===e.length-2?"calc(50% + 1.25rem)":"calc(50% + 2rem)"})},null,4)):(0,a.kq)("",!0),(0,a._)("div",{class:(0,n.C_)(["rounded-md border p-3 transition-all duration-200 hover:shadow-sm",p(s.type).background])},[(0,a._)("div",Is,[(0,a._)("time",{class:(0,n.C_)(["text-sm font-mono whitespace-nowrap flex-shrink-0",p(s.type).text]),title:w(s.timestamp)},(0,n.zw)(f(s.timestamp)),11,Os),(0,a._)("div",Ps,[(0,a._)("p",{class:"text-sm leading-relaxed text-gray-900 dark:text-gray-100",innerHTML:(0,r.SU)(js)(s.message)},null,8,Ks)])])],2)])))),128))])])))),128))])])]))],2)])):(0,a.kq)("",!0)}};const Bs=(0,T.Z)(Vs,[["__scopeId","data-v-f1600768"]]);var Gs=Bs;const Js={key:0,class:"past-announcements"},Xs={class:"space-y-8"},Qs={class:"mb-3"},el={class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider"},tl={key:0,class:"space-y-3"},sl={class:"flex items-start gap-3"},ll=["title"],al={class:"flex-1 min-w-0"},nl=["innerHTML"],rl={key:1,class:"py-2"},ol={key:0};var ul={__name:"PastAnnouncements",props:{announcements:{type:Array,default:()=>[]}},setup(e){const t=e,s=(0,r.iH)(!1),l={outage:{icon:_s.Z,background:"bg-red-50 dark:bg-red-900/20",borderColor:"border-red-500 dark:border-red-400",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:Ss.Z,background:"bg-yellow-50 dark:bg-yellow-900/20",borderColor:"border-yellow-500 dark:border-yellow-400",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:Ds.Z,background:"bg-blue-50 dark:bg-blue-900/20",borderColor:"border-blue-500 dark:border-blue-400",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ve.Z,background:"bg-green-50 dark:bg-green-900/20",borderColor:"border-green-500 dark:border-green-400",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Us.Z,background:"bg-gray-50 dark:bg-gray-800/20",borderColor:"border-gray-500 dark:border-gray-400",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},o=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},u=(0,a.Fl)((()=>{if(!t.announcements?.length)return{};const e={};let l=new Date;t.announcements.forEach((t=>{const s=new Date(t.timestamp),a=s.toDateString();e[a]=e[a]||[],e[a].push(t),s<l&&(l=s)}));const a=o(new Date),n=s.value?o(l):new Date(a.getTime()-12096e5),r={},u=a.toDateString();e[u]&&(r[u]=e[u]);for(let t=new Date(a.getTime()-864e5);t>=n;t.setDate(t.getDate()-1))r[t.toDateString()]=e[t.toDateString()]||[];return r})),i=(0,a.Fl)((()=>{if(!t.announcements?.length)return!1;const e=new Date(o(new Date).getTime()-12096e5);return t.announcements.some((t=>new Date(t.timestamp)<e))})),d=e=>l[e]?.icon||Us.Z,c=e=>l[e]||l.none,g=e=>{const t=new Date(e);return t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},m=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),p=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,l)=>e.announcements&&e.announcements.length?((0,a.wg)(),(0,a.iD)("div",Js,[l[3]||(l[3]=(0,a._)("h2",{class:"text-2xl font-semibold text-foreground mb-6"},"Past Announcements",-1)),(0,a._)("div",Xs,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(u.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t},[(0,a._)("div",Qs,[(0,a._)("h3",el,(0,n.zw)(g(t)),1)]),e.length>0?((0,a.wg)(),(0,a.iD)("div",tl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e,((e,s)=>((0,a.wg)(),(0,a.iD)("div",{key:`${t}-${s}-${e.timestamp}`,class:(0,n.C_)(["border-l-4 p-4 transition-all duration-200",c(e.type).background,c(e.type).borderColor])},[(0,a._)("div",sl,[((0,a.wg)(),(0,a.j4)((0,a.LL)(d(e.type)),{class:(0,n.C_)(["w-5 h-5 flex-shrink-0 mt-0.5",c(e.type).iconColor])},null,8,["class"])),(0,a._)("time",{class:(0,n.C_)(["text-sm font-mono whitespace-nowrap flex-shrink-0 mt-0.5",c(e.type).text]),title:p(e.timestamp)},(0,n.zw)(m(e.timestamp)),11,ll),(0,a._)("div",al,[(0,a._)("p",{class:"text-sm leading-relaxed text-gray-900 dark:text-gray-100",innerHTML:(0,r.SU)(js)(e.message)},null,8,nl)])])],2)))),128))])):((0,a.wg)(),(0,a.iD)("div",rl,l[1]||(l[1]=[(0,a._)("p",{class:"text-sm italic text-muted-foreground/60"}," No incidents reported on this day ",-1)])))])))),128)),i.value&&!s.value?((0,a.wg)(),(0,a.iD)("div",ol,[(0,a._)("button",{onClick:l[0]||(l[0]=e=>s.value=!0),class:"inline-flex items-center gap-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-200 cursor-pointer group"},[(0,a.Wm)((0,r.SU)(Pe.Z),{class:"w-4 h-4 group-hover:translate-y-0.5 transition-transform duration-200"}),l[2]||(l[2]=(0,a._)("span",{class:"group-hover:underline"},"View older announcements",-1))])])):(0,a.kq)("",!0)])])):(0,a.kq)("",!0)}};const il=ul;var dl=il;const cl={class:"dashboard-container bg-background"},gl={class:"container mx-auto px-4 py-8 max-w-7xl"},ml={class:"mb-6"},pl={class:"flex items-center justify-between mb-6"},vl={class:"flex items-center gap-4"},fl={key:0,class:"flex items-center justify-center py-20"},wl={key:1,class:"text-center py-20"},hl={class:"text-muted-foreground"},xl={key:2},bl={key:0,class:"space-y-6"},yl=["onClick"],kl={class:"flex items-center gap-3"},_l={class:"text-xl font-semibold text-foreground"},Sl={class:"flex items-center gap-2"},Dl={key:0,class:"bg-red-600 text-white px-2 py-1 rounded-full text-sm font-medium"},Ul={key:0,class:"endpoint-group-content p-4"},Cl={key:0,class:"mb-4"},zl={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Wl={key:1},Hl={key:0,class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},jl={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Fl={key:1},Rl={key:0,class:"mb-6"},Tl={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},$l={key:1},El={key:0,class:"text-lg font-semibold text-foreground mb-3"},ql={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Ll={key:2,class:"mt-8 flex items-center justify-center gap-2"},Zl={class:"flex gap-1"},Al={key:3,class:"mt-12 pb-8"},Ml=96;var Nl={__name:"Home",props:{announcements:{type:Array,default:()=>[]}},emits:["showTooltip"],setup(e,{emit:t}){const s=e,l=(0,a.Fl)((()=>s.announcements?s.announcements.filter((e=>!e.archived)):[])),o=(0,a.Fl)((()=>s.announcements?s.announcements.filter((e=>e.archived)):[])),u=t,i=(0,r.iH)([]),d=(0,r.iH)([]),c=(0,r.iH)(!1),g=(0,r.iH)(1),m=(0,r.iH)(""),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!0),w=(0,r.iH)(!1),h=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"name"),b=(0,r.iH)(new Set),y=(0,a.Fl)((()=>{let e=[...i.value];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success}))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===h.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,l=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&l?-1:s&&!l?1:e.name.localeCompare(t.name)})),e})),k=(0,a.Fl)((()=>{let e=[...d.value||[]];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===h.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,l=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&l?-1:s&&!l?1:e.name.localeCompare(t.name)})),e})),_=(0,a.Fl)((()=>Math.ceil((y.value.length+k.value.length)/Ml))),S=(0,a.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]=[]),e[s].push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),D=(0,a.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].endpoints.push(t)})),k.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].suites.push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),U=(0,a.Fl)((()=>{if(w.value)return S.value;const e=(g.value-1)*Ml,t=e+Ml;return y.value.slice(e,t)})),C=(0,a.Fl)((()=>{if(w.value)return k.value;const e=(g.value-1)*Ml,t=e+Ml;return k.value.slice(e,t)})),z=(0,a.Fl)((()=>{const e=[],t=5;let s=Math.max(1,g.value-Math.floor(t/2)),l=Math.min(_.value,s+t-1);l-s<t-1&&(s=Math.max(1,l-t+1));for(let a=s;a<=l;a++)e.push(a);return e})),W=async()=>{const e=0===i.value.length&&0===d.value.length;e&&(c.value=!0);try{const t=await fetch(`${Kr}/api/v1/endpoints/statuses?page=1&pageSize=100`,{credentials:"include"});if(200===t.status){const e=await t.json();i.value=e}else console.error("[Home][fetchData] Error fetching endpoints:",await t.text());const s=await fetch(`${Kr}/api/v1/suites/statuses?page=1&pageSize=100`,{credentials:"include"});if(200===s.status){const e=await s.json();d.value=e||[]}else console.error("[Home][fetchData] Error fetching suites:",await s.text()),d.value||(d.value=[])}catch(t){console.error("[Home][fetchData] Error:",t)}finally{e&&(c.value=!1)}},H=()=>{i.value=[],d.value=[],W()},j=e=>{m.value=e,g.value=1},F=e=>{g.value=e,window.scrollTo({top:0,behavior:"smooth"})},R=()=>{f.value=!f.value},T=(e,t,s="hover")=>{u("showTooltip",e,t,s)},$=e=>e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success})).length,E=e=>e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success)).length,q=e=>{b.value.has(e)?b.value.delete(e):b.value.add(e);const t=Array.from(b.value);localStorage.setItem("gatus:uncollapsed-groups",JSON.stringify(t)),localStorage.removeItem("gatus:collapsed-groups")},L=()=>{try{const e=localStorage.getItem("gatus:uncollapsed-groups");e&&(b.value=new Set(JSON.parse(e)))}catch(e){console.warn("Failed to parse saved uncollapsed groups:",e),localStorage.removeItem("gatus:uncollapsed-groups")}};return(0,a.bv)((()=>{W()})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",cl,[(0,a._)("div",gl,[(0,a._)("div",ml,[(0,a._)("div",pl,[t[6]||(t[6]=(0,a._)("div",null,[(0,a._)("h1",{class:"text-4xl font-bold tracking-tight"},"Health Dashboard"),(0,a._)("p",{class:"text-muted-foreground mt-2"},"Monitor the health of your endpoints in real-time")],-1)),(0,a._)("div",vl,[(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:R,title:f.value?"Show min-max response time":"Show average response time"},{default:(0,a.w5)((()=>[f.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(Ne.Z),{key:0,class:"h-5 w-5"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ye.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:H,title:"Refresh data"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"h-5 w-5"})])),_:1})])]),(0,a.Wm)(Gs,{announcements:l.value},null,8,["announcements"]),(0,a.Wm)(os,{onSearch:j,"onUpdate:showOnlyFailing":t[0]||(t[0]=e=>p.value=e),"onUpdate:showRecentFailures":t[1]||(t[1]=e=>v.value=e),"onUpdate:groupByGroup":t[2]||(t[2]=e=>w.value=e),"onUpdate:sortBy":t[3]||(t[3]=e=>h.value=e),onInitializeCollapsedGroups:L})]),c.value?((0,a.wg)(),(0,a.iD)("div",fl,[(0,a.Wm)(de,{size:"lg"})])):0===y.value.length&&0===k.value.length?((0,a.wg)(),(0,a.iD)("div",wl,[(0,a.Wm)((0,r.SU)(Oe.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[7]||(t[7]=(0,a._)("h3",{class:"text-lg font-semibold mb-2"},"No endpoints or suites found",-1)),(0,a._)("p",hl,(0,n.zw)(m.value||p.value||v.value?"Try adjusting your filters":"No endpoints or suites are configured"),1)])):((0,a.wg)(),(0,a.iD)("div",xl,[w.value?((0,a.wg)(),(0,a.iD)("div",bl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(D.value,((e,s)=>((0,a.wg)(),(0,a.iD)("div",{key:s,class:"endpoint-group border rounded-lg overflow-hidden"},[(0,a._)("div",{onClick:e=>q(s),class:"endpoint-group-header flex items-center justify-between p-4 bg-card border-b cursor-pointer hover:bg-accent/50 transition-colors"},[(0,a._)("div",kl,[b.value.has(s)?((0,a.wg)(),(0,a.j4)((0,r.SU)(Pe.Z),{key:0,class:"h-5 w-5 text-muted-foreground"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ke.Z),{key:1,class:"h-5 w-5 text-muted-foreground"})),(0,a._)("h2",_l,(0,n.zw)(s),1)]),(0,a._)("div",Sl,[$(e.endpoints)+E(e.suites)>0?((0,a.wg)(),(0,a.iD)("span",Dl,(0,n.zw)($(e.endpoints)+E(e.suites)),1)):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ve.Z),{key:1,class:"h-6 w-6 text-green-600"}))])],8,yl),b.value.has(s)?((0,a.wg)(),(0,a.iD)("div",Ul,[e.suites.length>0?((0,a.wg)(),(0,a.iD)("div",Cl,[t[8]||(t[8]=(0,a._)("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},"Suites",-1)),(0,a._)("div",zl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.suites,(e=>((0,a.wg)(),(0,a.j4)(qt,{key:e.key,suite:e,maxResults:50,onShowTooltip:T},null,8,["suite"])))),128))])])):(0,a.kq)("",!0),e.endpoints.length>0?((0,a.wg)(),(0,a.iD)("div",Wl,[e.suites.length>0?((0,a.wg)(),(0,a.iD)("h3",Hl,"Endpoints")):(0,a.kq)("",!0),(0,a._)("div",jl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.endpoints,(e=>((0,a.wg)(),(0,a.j4)(xt,{key:e.key,endpoint:e,maxResults:50,showAverageResponseTime:f.value,onShowTooltip:T},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,a.kq)("",!0)])):(0,a.kq)("",!0)])))),128))])):((0,a.wg)(),(0,a.iD)("div",Fl,[k.value.length>0?((0,a.wg)(),(0,a.iD)("div",Rl,[t[9]||(t[9]=(0,a._)("h2",{class:"text-lg font-semibold text-foreground mb-3"},"Suites",-1)),(0,a._)("div",Tl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(C.value,(e=>((0,a.wg)(),(0,a.j4)(qt,{key:e.key,suite:e,maxResults:50,onShowTooltip:T},null,8,["suite"])))),128))])])):(0,a.kq)("",!0),y.value.length>0?((0,a.wg)(),(0,a.iD)("div",$l,[k.value.length>0?((0,a.wg)(),(0,a.iD)("h2",El,"Endpoints")):(0,a.kq)("",!0),(0,a._)("div",ql,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(U.value,(e=>((0,a.wg)(),(0,a.j4)(xt,{key:e.key,endpoint:e,maxResults:50,showAverageResponseTime:f.value,onShowTooltip:T},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,a.kq)("",!0)])),!w.value&&_.value>1?((0,a.wg)(),(0,a.iD)("div",Ll,[(0,a.Wm)((0,r.SU)(x),{variant:"outline",size:"icon",disabled:1===g.value,onClick:t[4]||(t[4]=e=>F(g.value-1))},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"]),(0,a._)("div",Zl,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(z.value,(e=>((0,a.wg)(),(0,a.j4)((0,r.SU)(x),{key:e,variant:e===g.value?"default":"outline",size:"sm",onClick:t=>F(e)},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(e),1)])),_:2},1032,["variant","onClick"])))),128))]),(0,a.Wm)((0,r.SU)(x),{variant:"outline",size:"icon",disabled:g.value===_.value,onClick:t[5]||(t[5]=e=>F(g.value+1))},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"])])):(0,a.kq)("",!0)])),o.value.length>0?((0,a.wg)(),(0,a.iD)("div",Al,[(0,a.Wm)(dl,{announcements:o.value},null,8,["announcements"])])):(0,a.kq)("",!0)]),(0,a.Wm)(ks,{onRefreshData:W})]))}};const Yl=Nl;var Il=Yl,Ol=s(318),Pl=s(779),Kl=s(141),Vl=s(478);const Bl={class:"flex items-center justify-between"},Gl={class:"text-sm text-muted-foreground"};var Jl={__name:"Pagination",props:{numberOfResultsPerPage:Number,currentPageProp:{type:Number,default:1}},emits:["page"],setup(e,{emit:t}){const s=e,l=t,o=(0,r.iH)(s.currentPageProp),u=(0,a.Fl)((()=>{let e=100;if("undefined"!==typeof window&&window.config&&window.config.maximumNumberOfResults){const t=parseInt(window.config.maximumNumberOfResults);isNaN(t)||(e=t)}return Math.ceil(e/s.numberOfResultsPerPage)})),i=()=>{o.value--,l("page",o.value)},d=()=>{o.value++,l("page",o.value)};return(e,t)=>((0,a.wg)(),(0,a.iD)("div",Bl,[(0,a.Wm)((0,r.SU)(x),{variant:"outline",size:"sm",disabled:o.value>=u.value,onClick:d,class:"flex items-center gap-1"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4"}),t[0]||(t[0]=(0,a.Uk)(" Previous ",-1))])),_:1,__:[0]},8,["disabled"]),(0,a._)("span",Gl," Page "+(0,n.zw)(o.value)+" of "+(0,n.zw)(u.value),1),(0,a.Wm)((0,r.SU)(x),{variant:"outline",size:"sm",disabled:o.value<=1,onClick:i,class:"flex items-center gap-1"},{default:(0,a.w5)((()=>[t[1]||(t[1]=(0,a.Uk)(" Next ",-1)),(0,a.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4"})])),_:1,__:[1]},8,["disabled"])]))}};const Xl=Jl;var Ql=Xl,ea=s(334),ta=s(148),sa=s(282);s(210);const la={class:"relative w-full",style:{height:"300px"}},aa={key:0,class:"absolute inset-0 flex items-center justify-center bg-background/50"},na={key:1,class:"absolute inset-0 flex items-center justify-center text-muted-foreground"};var ra={__name:"ResponseTimeChart",props:{endpointKey:{type:String,required:!0},duration:{type:String,required:!0,validator:e=>["24h","7d","30d"].includes(e)},serverUrl:{type:String,default:".."},events:{type:Array,default:()=>[]}},setup(e){ta.kL.register(ta.uw,ta.f$,ta.od,ta.jn,ta.Dx,ta.u,ta.De,ta.Gu,ta.FB,sa.Z);const t=e,s=(0,r.iH)(!0),l=(0,r.iH)(null),o=(0,r.iH)([]),u=(0,r.iH)([]),i=(0,r.iH)(document.documentElement.classList.contains("dark")),d=(0,r.iH)(null),c=()=>"rgba(239, 68, 68, 0.8)",g=(0,a.Fl)((()=>{if(!t.events||0===t.events.length)return[];const e=new Date;let s;switch(t.duration){case"24h":s=new Date(e.getTime()-864e5);break;case"7d":s=new Date(e.getTime()-6048e5);break;case"30d":s=new Date(e.getTime()-2592e6);break;default:return[]}const l=[];for(let a=0;a<t.events.length;a++){const n=t.events[a];if("UNHEALTHY"!==n.type)continue;const r=new Date(n.timestamp);if(r<s||r>e)continue;let o=null,u=!1;if(a+1<t.events.length){const e=t.events[a+1];o=Z(e.timestamp,n.timestamp)}else o=Z(e,n.timestamp),u=!0;l.push({...n,duration:o,isOngoing:u})}return l})),m=(0,a.Fl)((()=>{if(0===o.value.length)return{labels:[],datasets:[]};const e=o.value.map((e=>new Date(e)));return{labels:e,datasets:[{label:"Response Time (ms)",data:u.value,borderColor:i.value?"rgb(96, 165, 250)":"rgb(59, 130, 246)",backgroundColor:i.value?"rgba(96, 165, 250, 0.1)":"rgba(59, 130, 246, 0.1)",borderWidth:2,pointRadius:2,pointHoverRadius:4,tension:.1,fill:!0}]}})),p=(0,a.Fl)((()=>{d.value;const e=u.value.length>0?Math.max(...u.value):0,s=e/2;return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{backgroundColor:i.value?"rgba(31, 41, 55, 0.95)":"rgba(255, 255, 255, 0.95)",titleColor:i.value?"#f9fafb":"#111827",bodyColor:i.value?"#d1d5db":"#374151",borderColor:i.value?"#4b5563":"#e5e7eb",borderWidth:1,padding:12,displayColors:!1,callbacks:{title:e=>{if(e.length>0){const t=new Date(e[0].parsed.x);return t.toLocaleString()}return""},label:e=>{const t=e.parsed.y;return`${t}ms`}}},annotation:{annotations:g.value.reduce(((e,t,l)=>{const a=new Date(t.timestamp).getTime();let n=0;if(o.value.length>0&&u.value.length>0){const e=o.value.reduce(((e,t,s)=>{const l=new Date(t).getTime(),n=Math.abs(l-a),r=Math.abs(new Date(o.value[e]).getTime()-a);return n<r?s:e}),0);n=u.value[e]}const r=n<=s?"end":"start";return e[`event-${l}`]={type:"line",xMin:new Date(t.timestamp),xMax:new Date(t.timestamp),borderColor:c(),borderWidth:1,borderDash:[5,5],enter(){d.value=l},leave(){d.value=null},label:{display:()=>d.value===l,content:[t.isOngoing?"Status: ONGOING":"Status: RESOLVED",`Unhealthy for ${t.duration}`,`Started at ${new Date(t.timestamp).toLocaleString()}`],backgroundColor:c(),color:"#ffffff",font:{size:11},padding:6,position:r}},e}),{})}},scales:{x:{type:"time",time:{unit:"24h"===t.duration?"hour":(t.duration,"day"),displayFormats:{hour:"MMM d, ha",day:"MMM d"}},grid:{color:i.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:i.value?"#9ca3af":"#6b7280",maxRotation:0,autoSkipPadding:20}},y:{beginAtZero:!0,grid:{color:i.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:i.value?"#9ca3af":"#6b7280",callback:e=>`${e}ms`}}}}})),v=async()=>{s.value=!0,l.value=null;try{const e=await fetch(`${t.serverUrl}/api/v1/endpoints/${t.endpointKey}/response-times/${t.duration}/history`,{credentials:"include"});if(200===e.status){const t=await e.json();o.value=t.timestamps||[],u.value=t.values||[]}else l.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",await e.text())}catch(e){l.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",e)}finally{s.value=!1}};return(0,a.YP)((()=>t.duration),(()=>{v()})),(0,a.bv)((()=>{v();const e=new MutationObserver((()=>{i.value=document.documentElement.classList.contains("dark")}));e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),(0,a.Ah)((()=>e.disconnect()))})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",la,[s.value?((0,a.wg)(),(0,a.iD)("div",aa,[(0,a.Wm)(de)])):l.value?((0,a.wg)(),(0,a.iD)("div",na,(0,n.zw)(l.value),1)):((0,a.wg)(),(0,a.j4)((0,r.SU)(ea.x1),{key:2,data:m.value,options:p.value},null,8,["data","options"]))]))}};const oa=ra;var ua=oa;const ia={class:"dashboard-container bg-background"},da={class:"container mx-auto px-4 py-8 max-w-7xl"},ca={class:"mb-6"},ga={key:0,class:"space-y-6"},ma={class:"flex items-start justify-between"},pa={class:"text-4xl font-bold tracking-tight"},va={class:"flex items-center gap-3 text-muted-foreground mt-2"},fa={key:0},wa={key:1},ha={key:2},xa={class:"grid gap-6 md:grid-cols-2 lg:grid-cols-4"},ba={class:"text-2xl font-bold"},ya={class:"text-2xl font-bold"},ka={class:"text-2xl font-bold"},_a={class:"text-2xl font-bold"},Sa={class:"flex items-center justify-between"},Da={class:"flex items-center gap-2"},Ua={class:"space-y-4"},Ca={key:1,class:"pt-4 border-t"},za={key:0,class:"space-y-6"},Wa={class:"flex items-center justify-between"},Ha={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},ja=["src","alt"],Fa={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Ra={class:"text-sm text-muted-foreground mb-2"},Ta=["src","alt"],$a={class:"text-center"},Ea=["src"],qa={class:"space-y-4"},La={class:"mt-1"},Za={class:"flex-1"},Aa={class:"font-medium"},Ma={class:"text-sm text-muted-foreground"},Na={key:1,class:"flex items-center justify-center py-20"};var Ya={__name:"EndpointDetails",emits:["showTooltip"],setup(e,{emit:t}){const s=(0,u.tv)(),o=(0,u.yj)(),i=t,d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,r.iH)([]),m=(0,r.iH)(1),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)("24h"),w="."===Kr?"..":Kr,h=(0,r.iH)(!1),b=(0,a.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?c.value.results[c.value.results.length-1]:null)),y=(0,a.Fl)((()=>b.value?b.value.success?"healthy":"unhealthy":"unknown")),_=(0,a.Fl)((()=>b.value?.hostname||null)),S=(0,a.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=0,t=0;for(const s of d.value.results)s.duration&&(e+=s.duration,t++);return 0===t?"N/A":Math.round(e/t/1e6)})),U=(0,a.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=1/0,t=0,s=!1;for(const n of d.value.results)if(n.duration){const l=n.duration/1e6;e=Math.min(e,l),t=Math.max(t,l),s=!0}if(!s)return"N/A";const l=Math.round(e),a=Math.round(t);return l===a?`${l}ms`:`${l}-${a}ms`})),C=(0,a.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?L(c.value.results[c.value.results.length-1].timestamp):"Never")),W=async()=>{h.value=!0;try{const e=await fetch(`${w}/api/v1/endpoints/${o.params.key}/statuses?page=${m.value}&pageSize=50`,{credentials:"include"});if(200===e.status){const t=await e.json();d.value=t,1===m.value&&(c.value=t);let s=[];if(t.events&&t.events.length>0)for(let e=t.events.length-1;e>=0;e--){let l=t.events[e];if(e===t.events.length-1)"UNHEALTHY"===l.type?l.fancyText="Endpoint is unhealthy":"HEALTHY"===l.type?l.fancyText="Endpoint is healthy":"START"===l.type&&(l.fancyText="Monitoring started");else{let s=t.events[e+1];"HEALTHY"===l.type?l.fancyText="Endpoint became healthy":"UNHEALTHY"===l.type?l.fancyText=s?"Endpoint was unhealthy for "+Z(s.timestamp,l.timestamp):"Endpoint became unhealthy":"START"===l.type&&(l.fancyText="Monitoring started")}l.fancyTimeAgo=L(l.timestamp),s.push(l)}if(g.value=s,t.results&&t.results.length>0)for(let e=0;e<t.results.length;e++)if(t.results[e].duration>0){p.value=!0;break}}else console.error("[Details][fetchData] Error:",await e.text())}catch(e){console.error("[Details][fetchData] Error:",e)}finally{h.value=!1}},H=()=>{s.push("/")},F=e=>{m.value=e,W()},R=(e,t,s="hover")=>{i("showTooltip",e,t,s)},T=e=>new Date(e).toLocaleString(),$=()=>`${w}/api/v1/endpoints/${d.value.key}/health/badge.svg`,E=e=>`${w}/api/v1/endpoints/${d.value.key}/uptimes/${e}/badge.svg`,q=e=>`${w}/api/v1/endpoints/${d.value.key}/response-times/${e}/badge.svg`;return(0,a.bv)((()=>{W()})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",ia,[(0,a._)("div",da,[(0,a._)("div",ca,[(0,a.Wm)((0,r.SU)(x),{variant:"ghost",class:"mb-4",onClick:H},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ol.Z),{class:"h-4 w-4 mr-2"}),t[2]||(t[2]=(0,a.Uk)(" Back to Dashboard ",-1))])),_:1,__:[2]}),d.value&&d.value.name?((0,a.wg)(),(0,a.iD)("div",ga,[(0,a._)("div",ma,[(0,a._)("div",null,[(0,a._)("h1",pa,(0,n.zw)(d.value.name),1),(0,a._)("div",va,[d.value.group?((0,a.wg)(),(0,a.iD)("span",fa,"Group: "+(0,n.zw)(d.value.group),1)):(0,a.kq)("",!0),d.value.group&&_.value?((0,a.wg)(),(0,a.iD)("span",wa,"•")):(0,a.kq)("",!0),_.value?((0,a.wg)(),(0,a.iD)("span",ha,(0,n.zw)(_.value),1)):(0,a.kq)("",!0)])]),(0,a.Wm)(st,{status:y.value},null,8,["status"])]),(0,a._)("div",xa,[(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[3]||(t[3]=[(0,a.Uk)("Current Status",-1)]))),_:1,__:[3]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",ba,(0,n.zw)("healthy"===y.value?"Operational":"Issues Detected"),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[4]||(t[4]=[(0,a.Uk)("Avg Response Time",-1)]))),_:1,__:[4]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",ya,(0,n.zw)(S.value)+"ms",1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[5]||(t[5]=[(0,a.Uk)("Response Time Range",-1)]))),_:1,__:[5]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",ka,(0,n.zw)(U.value),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,a.w5)((()=>t[6]||(t[6]=[(0,a.Uk)("Last Check",-1)]))),_:1,__:[6]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",_a,(0,n.zw)(C.value),1)])),_:1})])),_:1})]),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a._)("div",Sa,[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[7]||(t[7]=[(0,a.Uk)("Recent Checks",-1)]))),_:1,__:[7]}),(0,a._)("div",Da,[(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:t[0]||(t[0]=e=>v.value=!v.value),title:v.value?"Show min-max response time":"Show average response time"},{default:(0,a.w5)((()=>[v.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(Ne.Z),{key:0,class:"h-5 w-5"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Ye.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:W,title:"Refresh data",disabled:h.value},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ie.Z),{class:(0,n.C_)(["h-4 w-4",h.value&&"animate-spin"])},null,8,["class"])])),_:1},8,["disabled"])])])])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",Ua,[d.value?((0,a.wg)(),(0,a.j4)(xt,{key:0,endpoint:d.value,maxResults:50,showAverageResponseTime:v.value,onShowTooltip:R,class:"border-0 shadow-none bg-transparent p-0"},null,8,["endpoint","showAverageResponseTime"])):(0,a.kq)("",!0),d.value&&d.value.key?((0,a.wg)(),(0,a.iD)("div",Ca,[(0,a.Wm)(Ql,{onPage:F,numberOfResultsPerPage:50,currentPageProp:m.value},null,8,["currentPageProp"])])):(0,a.kq)("",!0)])])),_:1})])),_:1}),p.value?((0,a.wg)(),(0,a.iD)("div",za,[(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a._)("div",Wa,[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[8]||(t[8]=[(0,a.Uk)("Response Time Trend",-1)]))),_:1,__:[8]}),(0,a.wy)((0,a._)("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>f.value=e),class:"text-sm bg-background border rounded-md px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring"},t[9]||(t[9]=[(0,a._)("option",{value:"24h"},"24 hours",-1),(0,a._)("option",{value:"7d"},"7 days",-1),(0,a._)("option",{value:"30d"},"30 days",-1)]),512),[[l.bM,f.value]])])])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[d.value&&d.value.key?((0,a.wg)(),(0,a.j4)(ua,{key:0,endpointKey:d.value.key,duration:f.value,serverUrl:(0,r.SU)(w),events:d.value.events||[]},null,8,["endpointKey","duration","serverUrl","events"])):(0,a.kq)("",!0)])),_:1})])),_:1}),(0,a._)("div",Ha,[((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(["30d","7d","24h","1h"],(e=>(0,a.Wm)((0,r.SU)(k),{key:e},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground text-center"},{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1)])),_:2},1024)])),_:2},1024),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("img",{src:q(e),alt:`${e} response time`,class:"mx-auto mt-2"},null,8,ja)])),_:2},1024)])),_:2},1024))),64))])])):(0,a.kq)("",!0),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[10]||(t[10]=[(0,a.Uk)("Uptime Statistics",-1)]))),_:1,__:[10]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",Fa,[((0,a.wg)(),(0,a.iD)(a.HY,null,(0,a.Ko)(["30d","7d","24h","1h"],(e=>(0,a._)("div",{key:e,class:"text-center"},[(0,a._)("p",Ra,(0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1),(0,a._)("img",{src:E(e),alt:`${e} uptime`,class:"mx-auto"},null,8,Ta)]))),64))])])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[11]||(t[11]=[(0,a.Uk)("Current Health",-1)]))),_:1,__:[11]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",$a,[(0,a._)("img",{src:$(),alt:"health badge",class:"mx-auto"},null,8,Ea)])])),_:1})])),_:1}),g.value&&g.value.length>0?((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{key:1},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[12]||(t[12]=[(0,a.Uk)("Events",-1)]))),_:1,__:[12]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",qa,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,(e=>((0,a.wg)(),(0,a.iD)("div",{key:e.timestamp,class:"flex items-start gap-4 pb-4 border-b last:border-0"},[(0,a._)("div",La,["HEALTHY"===e.type?((0,a.wg)(),(0,a.j4)((0,r.SU)(Pl.Z),{key:0,class:"h-5 w-5 text-green-500"})):"UNHEALTHY"===e.type?((0,a.wg)(),(0,a.j4)((0,r.SU)(Kl.Z),{key:1,class:"h-5 w-5 text-red-500"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(Vl.Z),{key:2,class:"h-5 w-5 text-muted-foreground"}))]),(0,a._)("div",Za,[(0,a._)("p",Aa,(0,n.zw)(e.fancyText),1),(0,a._)("p",Ma,(0,n.zw)(T(e.timestamp))+" • "+(0,n.zw)(e.fancyTimeAgo),1)])])))),128))])])),_:1})])),_:1})):(0,a.kq)("",!0)])):((0,a.wg)(),(0,a.iD)("div",Na,[(0,a.Wm)(de,{size:"lg"})]))])]),(0,a.Wm)(ks,{onRefreshData:W})]))}};const Ia=Ya;var Oa=Ia,Pa=s(469),Ka=s(399),Va=s(167);const Ba=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`},Ga={class:"relative flex-shrink-0"},Ja={class:"flex-1 min-w-0 pt-1"},Xa={class:"flex items-center justify-between gap-2 mb-1"},Qa={class:"font-medium text-sm truncate"},en={class:"text-xs text-muted-foreground whitespace-nowrap"},tn={class:"flex flex-wrap gap-1"},sn={key:0,class:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-md"},ln={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 rounded-md"};var an={__name:"FlowStep",props:{step:{type:Object,required:!0},index:{type:Number,required:!0},isLast:{type:Boolean,default:!1},previousStep:{type:Object,default:null}},emits:["step-click"],setup(e){const t=e,s=(0,a.Fl)((()=>{switch(t.step.status){case"success":return Ve.Z;case"failed":return _s.Z;case"skipped":return Pa.Z;case"not-started":return Va.Z;default:return Va.Z}})),l=(0,a.Fl)((()=>{const e="border-2";if(t.step.isAlwaysRun)switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600 ring-2 ring-blue-200 dark:ring-blue-800`;case"failed":return`${e} bg-red-500 text-white border-red-600 ring-2 ring-blue-200 dark:ring-blue-800`;default:return`${e} bg-blue-500 text-white border-blue-600 ring-2 ring-blue-200 dark:ring-blue-800`}switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600`;case"failed":return`${e} bg-red-500 text-white border-red-600`;case"skipped":return`${e} bg-gray-400 text-white border-gray-500`;case"not-started":return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`;default:return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`}})),o=(0,a.Fl)((()=>{if(!t.previousStep)return"bg-gray-300 dark:bg-gray-600";if("skipped"===t.step.status)return"border-l-2 border-dashed border-gray-400 bg-transparent";switch(t.previousStep.status){case"success":return"bg-green-500";case"failed":return"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}})),u=(0,a.Fl)((()=>{const e=t.step.nextStepStatus;switch(t.step.status){case"success":return"skipped"===e?"bg-gray-300 dark:bg-gray-600":"bg-green-500";case"failed":return"skipped"===e?"border-l-2 border-dashed border-gray-400 bg-transparent":"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}}));return(t,i)=>((0,a.wg)(),(0,a.iD)("div",{class:"flex items-start gap-4 relative group hover:bg-accent/30 rounded-lg p-2 -m-2 transition-colors cursor-pointer",onClick:i[0]||(i[0]=e=>t.$emit("step-click"))},[(0,a._)("div",Ga,[e.index>0?((0,a.wg)(),(0,a.iD)("div",{key:0,class:(0,n.C_)([o.value,"absolute left-1/2 bottom-8 w-0.5 h-4 -translate-x-px"])},null,2)):(0,a.kq)("",!0),(0,a._)("div",{class:(0,n.C_)([l.value,"w-8 h-8 rounded-full flex items-center justify-center"])},[((0,a.wg)(),(0,a.j4)((0,a.LL)(s.value),{class:"w-4 h-4"}))],2),e.isLast?(0,a.kq)("",!0):((0,a.wg)(),(0,a.iD)("div",{key:1,class:(0,n.C_)([u.value,"absolute left-1/2 top-8 w-0.5 h-4 -translate-x-px"])},null,2))]),(0,a._)("div",Ja,[(0,a._)("div",Xa,[(0,a._)("h4",Qa,(0,n.zw)(e.step.name),1),(0,a._)("span",en,(0,n.zw)((0,r.SU)(Ba)(e.step.duration)),1)]),(0,a._)("div",tn,[e.step.isAlwaysRun?((0,a.wg)(),(0,a.iD)("span",sn,[(0,a.Wm)((0,r.SU)(Ka.Z),{class:"w-3 h-3"}),i[1]||(i[1]=(0,a.Uk)(" Always Run ",-1))])):(0,a.kq)("",!0),e.step.errors?.length?((0,a.wg)(),(0,a.iD)("span",ln,(0,n.zw)(e.step.errors.length)+" error"+(0,n.zw)(1!==e.step.errors.length?"s":""),1)):(0,a.kq)("",!0)])])]))}};const nn=an;var rn=nn;const on={class:"space-y-4"},un={class:"flex items-center gap-4"},dn={class:"flex-1 h-1 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},cn={class:"flex items-center justify-between text-xs text-muted-foreground"},gn={key:0},mn={class:"space-y-2"},pn={class:"mt-6 pt-4 border-t"},vn={class:"grid grid-cols-2 md:grid-cols-4 gap-3 text-xs"},fn={key:0,class:"flex items-center gap-2"},wn={class:"w-4 h-4 rounded-full bg-green-500 flex items-center justify-center"},hn={key:1,class:"flex items-center gap-2"},xn={class:"w-4 h-4 rounded-full bg-red-500 flex items-center justify-center"},bn={key:2,class:"flex items-center gap-2"},yn={class:"w-4 h-4 rounded-full bg-gray-400 flex items-center justify-center"},kn={key:3,class:"flex items-center gap-2"},_n={class:"w-4 h-4 rounded-full bg-blue-500 border-2 border-blue-200 dark:border-blue-800 flex items-center justify-center"};var Sn={__name:"SequentialFlowDiagram",props:{flowSteps:{type:Array,default:()=>[]},progressPercentage:{type:Number,default:0},completedSteps:{type:Number,default:0},totalSteps:{type:Number,default:0}},emits:["step-selected"],setup(e){const t=e,s=(0,a.Fl)((()=>t.completedSteps)),l=(0,a.Fl)((()=>t.totalSteps)),o=(0,a.Fl)((()=>t.flowSteps.reduce(((e,t)=>e+(t.duration||0)),0))),u=(0,a.Fl)((()=>t.flowSteps.some((e=>"success"===e.status)))),i=(0,a.Fl)((()=>t.flowSteps.some((e=>"failed"===e.status)))),d=(0,a.Fl)((()=>t.flowSteps.some((e=>"skipped"===e.status)))),c=(0,a.Fl)((()=>t.flowSteps.some((e=>!0===e.isAlwaysRun))));return(t,g)=>((0,a.wg)(),(0,a.iD)("div",on,[(0,a._)("div",un,[g[0]||(g[0]=(0,a._)("div",{class:"text-sm font-medium text-muted-foreground"},"Start",-1)),(0,a._)("div",dn,[(0,a._)("div",{class:"h-full bg-green-500 dark:bg-green-600 rounded-full transition-all duration-300 ease-out",style:(0,n.j5)({width:e.progressPercentage+"%"})},null,4)]),g[1]||(g[1]=(0,a._)("div",{class:"text-sm font-medium text-muted-foreground"},"End",-1))]),(0,a._)("div",cn,[(0,a._)("span",null,(0,n.zw)(s.value)+"/"+(0,n.zw)(l.value)+" steps successful",1),o.value>0?((0,a.wg)(),(0,a.iD)("span",gn,(0,n.zw)((0,r.SU)(Ba)(o.value))+" total",1)):(0,a.kq)("",!0)]),(0,a._)("div",mn,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.flowSteps,((s,l)=>((0,a.wg)(),(0,a.j4)(rn,{key:l,step:s,index:l,"is-last":l===e.flowSteps.length-1,"previous-step":l>0?e.flowSteps[l-1]:null,onStepClick:e=>t.$emit("step-selected",s,l)},null,8,["step","index","is-last","previous-step","onStepClick"])))),128))]),(0,a._)("div",pn,[g[6]||(g[6]=(0,a._)("div",{class:"text-sm font-medium text-muted-foreground mb-2"},"Status Legend",-1)),(0,a._)("div",vn,[u.value?((0,a.wg)(),(0,a.iD)("div",fn,[(0,a._)("div",wn,[(0,a.Wm)((0,r.SU)(Ve.Z),{class:"w-3 h-3 text-white"})]),g[2]||(g[2]=(0,a._)("span",{class:"text-muted-foreground"},"Success",-1))])):(0,a.kq)("",!0),i.value?((0,a.wg)(),(0,a.iD)("div",hn,[(0,a._)("div",xn,[(0,a.Wm)((0,r.SU)(_s.Z),{class:"w-3 h-3 text-white"})]),g[3]||(g[3]=(0,a._)("span",{class:"text-muted-foreground"},"Failed",-1))])):(0,a.kq)("",!0),d.value?((0,a.wg)(),(0,a.iD)("div",bn,[(0,a._)("div",yn,[(0,a.Wm)((0,r.SU)(Pa.Z),{class:"w-3 h-3 text-white"})]),g[4]||(g[4]=(0,a._)("span",{class:"text-muted-foreground"},"Skipped",-1))])):(0,a.kq)("",!0),c.value?((0,a.wg)(),(0,a.iD)("div",kn,[(0,a._)("div",_n,[(0,a.Wm)((0,r.SU)(Ka.Z),{class:"w-3 h-3 text-white"})]),g[5]||(g[5]=(0,a._)("span",{class:"text-muted-foreground"},"Always Run",-1))])):(0,a.kq)("",!0)])])]))}};const Dn=Sn;var Un=Dn,Cn=s(293),zn=s(322),Wn=s(740);const Hn={class:"flex items-center justify-between p-4 border-b"},jn={class:"text-lg font-semibold flex items-center gap-2"},Fn={class:"text-sm text-muted-foreground mt-1"},Rn={class:"p-4 space-y-4 overflow-y-auto max-h-[60vh]"},Tn={key:0,class:"flex flex-wrap gap-2"},$n={class:"flex items-center gap-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/30 rounded-lg border border-blue-200 dark:border-blue-700"},En={key:1,class:"space-y-2"},qn={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},Ln={class:"space-y-2"},Zn={key:2,class:"space-y-2"},An={class:"text-sm font-medium flex items-center gap-2"},Mn={class:"text-xs font-mono text-muted-foreground"},Nn={key:3,class:"space-y-2"},Yn={class:"text-sm font-medium flex items-center gap-2"},In={class:"grid grid-cols-2 gap-4 text-xs"},On={class:"font-mono mt-1"},Pn={key:4,class:"space-y-2"},Kn={class:"text-sm font-medium flex items-center gap-2"},Vn={class:"space-y-2 max-h-48 overflow-y-auto"},Bn={class:"flex-shrink-0 mt-0.5"},Gn={class:"flex-1 min-w-0 flex items-center justify-between gap-3"},Jn={key:5,class:"space-y-2"},Xn={class:"text-sm font-medium flex items-center gap-2"},Qn={class:"space-y-3 text-xs"},er={key:0},tr={class:"font-mono mt-1 break-all"},sr={key:1},lr={class:"mt-1 font-medium"},ar={key:2},nr={class:"mt-1"},rr={key:3},or={class:"mt-1"},ur={key:6,class:"space-y-2"},ir={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},dr={class:"space-y-2 max-h-32 overflow-y-auto"};var cr={__name:"StepDetailsModal",props:{step:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["close"],setup(e){const t=e,s=(0,a.Fl)((()=>{switch(t.step.status){case"success":return Ve.Z;case"failed":return _s.Z;case"skipped":return Pa.Z;case"not-started":return Va.Z;default:return Va.Z}})),o=(0,a.Fl)((()=>{switch(t.step.status){case"success":return"text-green-600 dark:text-green-400";case"failed":return"text-red-600 dark:text-red-400";case"skipped":return"text-gray-600 dark:text-gray-400";default:return"text-blue-600 dark:text-blue-400"}}));return(t,u)=>((0,a.wg)(),(0,a.iD)("div",{class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:u[2]||(u[2]=e=>t.$emit("close"))},[(0,a._)("div",{class:"bg-background border rounded-lg shadow-lg max-w-2xl w-full max-h-[80vh] overflow-hidden",onClick:u[1]||(u[1]=(0,l.iM)((()=>{}),["stop"]))},[(0,a._)("div",Hn,[(0,a._)("div",null,[(0,a._)("h2",jn,[((0,a.wg)(),(0,a.j4)((0,a.LL)(s.value),{class:(0,n.C_)([o.value,"w-5 h-5"])},null,8,["class"])),(0,a.Uk)(" "+(0,n.zw)(e.step.name),1)]),(0,a._)("p",Fn," Step "+(0,n.zw)(e.index+1)+" • "+(0,n.zw)((0,r.SU)(Ba)(e.step.duration)),1)]),(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:u[0]||(u[0]=e=>t.$emit("close"))},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(d.Z),{class:"w-4 h-4"})])),_:1})]),(0,a._)("div",Rn,[e.step.isAlwaysRun?((0,a.wg)(),(0,a.iD)("div",Tn,[(0,a._)("div",$n,[(0,a.Wm)((0,r.SU)(Ka.Z),{class:"w-4 h-4 text-blue-600 dark:text-blue-400"}),u[3]||(u[3]=(0,a._)("div",null,[(0,a._)("p",{class:"text-sm font-medium text-blue-900 dark:text-blue-200"},"Always Run"),(0,a._)("p",{class:"text-xs text-blue-600 dark:text-blue-400"},"This endpoint is configured to execute even after failures")],-1))])])):(0,a.kq)("",!0),e.step.errors?.length?((0,a.wg)(),(0,a.iD)("div",En,[(0,a._)("h3",qn,[(0,a.Wm)((0,r.SU)(Oe.Z),{class:"w-4 h-4"}),(0,a.Uk)(" Errors ("+(0,n.zw)(e.step.errors.length)+") ",1)]),(0,a._)("div",Ln,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.step.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0),e.step.result&&e.step.result.timestamp?((0,a.wg)(),(0,a.iD)("div",Zn,[(0,a._)("h3",An,[(0,a.Wm)((0,r.SU)(Cn.Z),{class:"w-4 h-4"}),u[4]||(u[4]=(0,a.Uk)(" Timestamp ",-1))]),(0,a._)("p",Mn,(0,n.zw)((0,r.SU)(A)(e.step.result.timestamp)),1)])):(0,a.kq)("",!0),e.step.result?((0,a.wg)(),(0,a.iD)("div",Nn,[(0,a._)("h3",Yn,[(0,a.Wm)((0,r.SU)(zn.Z),{class:"w-4 h-4"}),u[5]||(u[5]=(0,a.Uk)(" Response ",-1))]),(0,a._)("div",In,[(0,a._)("div",null,[u[6]||(u[6]=(0,a._)("span",{class:"text-muted-foreground"},"Duration:",-1)),(0,a._)("p",On,(0,n.zw)((0,r.SU)(Ba)(e.step.result.duration)),1)]),(0,a._)("div",null,[u[7]||(u[7]=(0,a._)("span",{class:"text-muted-foreground"},"Success:",-1)),(0,a._)("p",{class:(0,n.C_)(["mt-1",e.step.result.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.step.result.success?"Yes":"No"),3)])])])):(0,a.kq)("",!0),e.step.result?.conditionResults?.length?((0,a.wg)(),(0,a.iD)("div",Pn,[(0,a._)("h3",Kn,[(0,a.Wm)((0,r.SU)(Ve.Z),{class:"w-4 h-4"}),(0,a.Uk)(" Condition Results ("+(0,n.zw)(e.step.result.conditionResults.length)+") ",1)]),(0,a._)("div",Vn,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.step.result.conditionResults,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex items-start gap-3 p-1 rounded-lg border",e.success?"bg-green-50 dark:bg-green-900/30 border-green-200 dark:border-green-700":"bg-red-50 dark:bg-red-900/30 border-red-200 dark:border-red-700"])},[(0,a._)("div",Bn,[e.success?((0,a.wg)(),(0,a.j4)((0,r.SU)(Ve.Z),{key:0,class:"w-4 h-4 text-green-600 dark:text-green-400"})):((0,a.wg)(),(0,a.j4)((0,r.SU)(_s.Z),{key:1,class:"w-4 h-4 text-red-600 dark:text-red-400"}))]),(0,a._)("div",Gn,[(0,a._)("p",{class:(0,n.C_)(["text-sm font-mono break-all",e.success?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"])},(0,n.zw)(e.condition),3),(0,a._)("span",{class:(0,n.C_)(["text-xs font-medium whitespace-nowrap",e.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.success?"Passed":"Failed"),3)])],2)))),128))])])):(0,a.kq)("",!0),e.step.endpoint?((0,a.wg)(),(0,a.iD)("div",Jn,[(0,a._)("h3",Xn,[(0,a.Wm)((0,r.SU)(Wn.Z),{class:"w-4 h-4"}),u[8]||(u[8]=(0,a.Uk)(" Endpoint Configuration ",-1))]),(0,a._)("div",Qn,[e.step.endpoint.url?((0,a.wg)(),(0,a.iD)("div",er,[u[9]||(u[9]=(0,a._)("span",{class:"text-muted-foreground"},"URL:",-1)),(0,a._)("p",tr,(0,n.zw)(e.step.endpoint.url),1)])):(0,a.kq)("",!0),e.step.endpoint.method?((0,a.wg)(),(0,a.iD)("div",sr,[u[10]||(u[10]=(0,a._)("span",{class:"text-muted-foreground"},"Method:",-1)),(0,a._)("p",lr,(0,n.zw)(e.step.endpoint.method),1)])):(0,a.kq)("",!0),e.step.endpoint.interval?((0,a.wg)(),(0,a.iD)("div",ar,[u[11]||(u[11]=(0,a._)("span",{class:"text-muted-foreground"},"Interval:",-1)),(0,a._)("p",nr,(0,n.zw)(e.step.endpoint.interval),1)])):(0,a.kq)("",!0),e.step.endpoint.timeout?((0,a.wg)(),(0,a.iD)("div",rr,[u[12]||(u[12]=(0,a._)("span",{class:"text-muted-foreground"},"Timeout:",-1)),(0,a._)("p",or,(0,n.zw)(e.step.endpoint.timeout),1)])):(0,a.kq)("",!0)])])):(0,a.kq)("",!0),e.step.result?.errors?.length?((0,a.wg)(),(0,a.iD)("div",ur,[(0,a._)("h3",ir,[(0,a.Wm)((0,r.SU)(Oe.Z),{class:"w-4 h-4"}),(0,a.Uk)(" Result Errors ("+(0,n.zw)(e.step.result.errors.length)+") ",1)]),(0,a._)("div",dr,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(e.step.result.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0)])])]))}};const gr=cr;var mr=gr;const pr={class:"suite-details-container bg-background min-h-screen"},vr={class:"container mx-auto px-4 py-8 max-w-7xl"},fr={class:"mb-6"},wr={class:"flex items-start justify-between"},hr={class:"text-3xl font-bold tracking-tight"},xr={class:"text-muted-foreground mt-2"},br={key:0},yr={key:1},kr={class:"flex items-center gap-2"},_r={key:0,class:"flex items-center justify-center py-20"},Sr={key:1,class:"text-center py-20"},Dr={key:2,class:"space-y-6"},Ur={class:"space-y-4"},Cr={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},zr={class:"text-lg font-medium"},Wr={class:"text-lg font-medium"},Hr={class:"text-lg font-medium"},jr={class:"text-lg font-medium"},Fr={class:"mt-6"},Rr={key:0,class:"mt-6"},Tr={class:"space-y-2"},$r={key:0,class:"space-y-2"},Er=["onClick"],qr={class:"flex items-center gap-3"},Lr={class:"text-sm font-medium"},Zr={class:"text-xs text-muted-foreground"},Ar={key:1,class:"text-center py-8 text-muted-foreground"};var Mr={__name:"SuiteDetails",setup(e){const t=(0,u.tv)(),s=(0,u.yj)(),l=(0,r.iH)(!1),o=(0,r.iH)(null),i=(0,r.iH)(null),d=(0,r.iH)(null),c=(0,r.iH)(0),g=(0,a.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?[...o.value.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))):[])),m=(0,a.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?i.value||g.value[0]:null)),p=async()=>{const e=!o.value;e&&(l.value=!0);try{const t=await fetch(`${Kr}/api/v1/suites/${s.params.key}/statuses`,{credentials:"include"});if(200===t.status){const e=await t.json(),s=o.value;if(o.value=e,e.results&&e.results.length>0){const t=[...e.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))),l=!i.value||s?.results&&i.value.timestamp===[...s.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp)))[0]?.timestamp;l&&(i.value=t[0])}}else 404===t.status?o.value=null:console.error("[SuiteDetails][fetchData] Error:",await t.text())}catch(t){console.error("[SuiteDetails][fetchData] Error:",t)}finally{e&&(l.value=!1)}},v=()=>{p()},f=()=>{t.push("/")},w=e=>L(e),h=e=>{const t=new Date(e);return t.toLocaleString()},b=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`},y=e=>{if(!e||!e.endpointResults||0===e.endpointResults.length)return 0;const t=e.endpointResults.filter((e=>e.success)).length;return Math.round(t/e.endpointResults.length*100)},_=(0,a.Fl)((()=>{if(!m.value||!m.value.endpointResults)return[];const e=m.value.endpointResults;return e.map(((t,s)=>{const l=o.value?.endpoints?.[s],a=e[s+1];let n=!1;for(let r=0;r<s;r++)if(!e[r].success){n=!0;break}return{name:l?.name||t.name||`Step ${s+1}`,endpoint:l,result:t,status:C(t,l),duration:t.duration||0,isAlwaysRun:n,errors:t.errors||[],nextStepStatus:a?C(a,o.value?.endpoints?.[s+1]):null}}))})),S=(0,a.Fl)((()=>_.value.filter((e=>"success"===e.status)).length)),U=(0,a.Fl)((()=>_.value.length?Math.round(S.value/_.value.length*100):0)),C=e=>e?e.conditionResults&&e.conditionResults.some((e=>e.condition.includes("SKIP")))?"skipped":e.success?"success":"failed":"not-started",W=(e,t)=>{d.value=e,c.value=t};return(0,a.bv)((()=>{p()})),(e,t)=>((0,a.wg)(),(0,a.iD)("div",pr,[(0,a._)("div",vr,[(0,a._)("div",fr,[(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"sm",onClick:f,class:"mb-4"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ol.Z),{class:"h-4 w-4 mr-2"}),t[1]||(t[1]=(0,a.Uk)(" Back to Dashboard ",-1))])),_:1,__:[1]}),(0,a._)("div",wr,[(0,a._)("div",null,[(0,a._)("h1",hr,(0,n.zw)(o.value?.name||"Loading..."),1),(0,a._)("p",xr,[o.value?.group?((0,a.wg)(),(0,a.iD)("span",br,(0,n.zw)(o.value.group)+" • ",1)):(0,a.kq)("",!0),m.value?((0,a.wg)(),(0,a.iD)("span",yr,(0,n.zw)(i.value&&i.value.timestamp!==g.value[0]?.timestamp?"Ran":"Last run")+" "+(0,n.zw)(w(m.value.timestamp)),1)):(0,a.kq)("",!0)])]),(0,a._)("div",kr,[m.value?((0,a.wg)(),(0,a.j4)(st,{key:0,status:m.value.success?"healthy":"unhealthy"},null,8,["status"])):(0,a.kq)("",!0),(0,a.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:v,title:"Refresh"},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(Ie.Z),{class:"h-5 w-5"})])),_:1})])])]),l.value?((0,a.wg)(),(0,a.iD)("div",_r,[(0,a.Wm)(de,{size:"lg"})])):o.value?((0,a.wg)(),(0,a.iD)("div",Dr,[m.value?((0,a.wg)(),(0,a.j4)((0,r.SU)(k),{key:0},{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>[(0,a.Uk)((0,n.zw)(i.value?.timestamp===g.value[0]?.timestamp?"Latest Execution":`Execution at ${h(i.value.timestamp)}`),1)])),_:1})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[(0,a._)("div",Ur,[(0,a._)("div",Cr,[(0,a._)("div",null,[t[4]||(t[4]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Status",-1)),(0,a._)("p",zr,(0,n.zw)(m.value.success?"Success":"Failed"),1)]),(0,a._)("div",null,[t[5]||(t[5]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Duration",-1)),(0,a._)("p",Wr,(0,n.zw)(b(m.value.duration)),1)]),(0,a._)("div",null,[t[6]||(t[6]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Endpoints",-1)),(0,a._)("p",Hr,(0,n.zw)(m.value.endpointResults?.length||0),1)]),(0,a._)("div",null,[t[7]||(t[7]=(0,a._)("p",{class:"text-sm text-muted-foreground"},"Success Rate",-1)),(0,a._)("p",jr,(0,n.zw)(y(m.value))+"%",1)])]),(0,a._)("div",Fr,[t[8]||(t[8]=(0,a._)("h3",{class:"text-lg font-semibold mb-4"},"Execution Flow",-1)),(0,a.Wm)(Un,{"flow-steps":_.value,"progress-percentage":U.value,"completed-steps":S.value,"total-steps":_.value.length,onStepSelected:W},null,8,["flow-steps","progress-percentage","completed-steps","total-steps"])]),m.value.errors&&m.value.errors.length>0?((0,a.wg)(),(0,a.iD)("div",Rr,[t[9]||(t[9]=(0,a._)("h3",{class:"text-lg font-semibold mb-3 text-red-500"},"Suite Errors",-1)),(0,a._)("div",Tr,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(m.value.errors,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:"bg-red-50 dark:bg-red-950 text-red-700 dark:text-red-300 p-3 rounded-md text-sm"},(0,n.zw)(e),1)))),128))])])):(0,a.kq)("",!0)])])),_:1})])),_:1})):(0,a.kq)("",!0),(0,a.Wm)((0,r.SU)(k),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(D),null,{default:(0,a.w5)((()=>[(0,a.Wm)((0,r.SU)(z),null,{default:(0,a.w5)((()=>t[10]||(t[10]=[(0,a.Uk)("Execution History",-1)]))),_:1,__:[10]})])),_:1}),(0,a.Wm)((0,r.SU)(j),null,{default:(0,a.w5)((()=>[g.value.length>0?((0,a.wg)(),(0,a.iD)("div",$r,[((0,a.wg)(!0),(0,a.iD)(a.HY,null,(0,a.Ko)(g.value,((e,t)=>((0,a.wg)(),(0,a.iD)("div",{key:t,class:(0,n.C_)(["flex items-center justify-between p-3 border rounded-lg hover:bg-accent/50 transition-colors cursor-pointer",{"bg-accent":i.value&&i.value.timestamp===e.timestamp}]),onClick:t=>i.value=e},[(0,a._)("div",qr,[(0,a.Wm)(st,{status:e.success?"healthy":"unhealthy",size:"sm"},null,8,["status"]),(0,a._)("div",null,[(0,a._)("p",Lr,(0,n.zw)(h(e.timestamp)),1),(0,a._)("p",Zr,(0,n.zw)(e.endpointResults?.length||0)+" endpoints • "+(0,n.zw)(b(e.duration)),1)])]),(0,a.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4 text-muted-foreground"})],10,Er)))),128))])):((0,a.wg)(),(0,a.iD)("div",Ar," No execution history available "))])),_:1})])),_:1})])):((0,a.wg)(),(0,a.iD)("div",Sr,[(0,a.Wm)((0,r.SU)(Oe.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[2]||(t[2]=(0,a._)("h3",{class:"text-lg font-semibold mb-2"},"Suite not found",-1)),t[3]||(t[3]=(0,a._)("p",{class:"text-muted-foreground"},"The requested suite could not be found.",-1))]))]),(0,a.Wm)(ks,{onRefreshData:p}),d.value?((0,a.wg)(),(0,a.j4)(mr,{key:0,step:d.value,index:c.value,onClose:t[0]||(t[0]=e=>d.value=null)},null,8,["step","index"])):(0,a.kq)("",!0)]))}};const Nr=(0,T.Z)(Mr,[["__scopeId","data-v-01b6e7cc"]]);var Yr=Nr;const Ir=[{path:"/",name:"Home",component:Il},{path:"/endpoints/:key",name:"EndpointDetails",component:Oa},{path:"/suites/:key",name:"SuiteDetails",component:Yr}],Or=(0,u.p7)({history:(0,u.PO)("/"),routes:Ir});var Pr=Or;const Kr="";(0,l.ri)(Me).use(Pr).mount("#app")}},t={};function s(l){var a=t[l];if(void 0!==a)return a.exports;var n=t[l]={exports:{}};return e[l](n,n.exports,s),n.exports}s.m=e,function(){var e=[];s.O=function(t,l,a,n){if(!l){var r=1/0;for(d=0;d<e.length;d++){l=e[d][0],a=e[d][1],n=e[d][2];for(var o=!0,u=0;u<l.length;u++)(!1&n||r>=n)&&Object.keys(s.O).every((function(e){return s.O[e](l[u])}))?l.splice(u--,1):(o=!1,n<r&&(r=n));if(o){e.splice(d--,1);var i=a();void 0!==i&&(t=i)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[l,a,n]}}(),function(){s.d=function(e,t){for(var l in t)s.o(t,l)&&!s.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){s.p="/"}(),function(){var e={143:0};s.O.j=function(t){return 0===e[t]};var t=function(t,l){var a,n,r=l[0],o=l[1],u=l[2],i=0;if(r.some((function(t){return 0!==e[t]}))){for(a in o)s.o(o,a)&&(s.m[a]=o[a]);if(u)var d=u(s)}for(t&&t(l);i<r.length;i++)n=r[i],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return s.O(d)},l=self["webpackChunkgatus"]=self["webpackChunkgatus"]||[];l.forEach(t.bind(null,0)),l.push=t.bind(null,l.push.bind(l))}();var l=s.O(void 0,[998],(function(){return s(763)}));l=s.O(l)})();
\ No newline at end of file
+(function(){"use strict";var e={763:function(e,t,s){s.d(t,{L:function(){return Br}});var a=s(963),l=s(252),n=s(577),r=s(262),o=s.p+"img/logo.svg",i=s(201),u=s(507),d=s(970),c=s(135),g=s(3),m=s(512),p=s(388);function v(...e){return(0,p.m6)((0,m.W)(e))}const f=["disabled"];var w={__name:"Button",props:{variant:{type:String,default:"default"},size:{type:String,default:"default"},disabled:{type:Boolean,default:!1}},setup(e){const t=(0,g.j)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});return(s,a)=>((0,l.wg)(),(0,l.iD)("button",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant,size:e.size}),s.$attrs.class??"")),disabled:e.disabled},[(0,l.WI)(s.$slots,"default")],10,f))}};const h=w;var x=h,b={__name:"Card",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("rounded-lg border bg-card text-card-foreground shadow-sm",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const y=b;var k=y,_={__name:"CardHeader",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("flex flex-col space-y-1.5 p-6",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const S=_;var D=S,U={__name:"CardTitle",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("h3",{class:(0,n.C_)((0,r.SU)(v)("text-2xl font-semibold leading-none tracking-tight",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const C=U;var z=C,W={__name:"CardContent",setup(e){return(e,t)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)("p-6 pt-0",e.$attrs.class??""))},[(0,l.WI)(e.$slots,"default")],2))}};const H=W;var j=H;const F={id:"social"};function R(e,t){return(0,l.wg)(),(0,l.iD)("div",F,t[0]||(t[0]=[(0,l._)("a",{href:"https://github.com/TwiN/gatus",target:"_blank",title:"Gatus on GitHub"},[(0,l._)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 16 16",class:"hover:scale-110"},[(0,l._)("path",{fill:"gray",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})])],-1)]))}var T=s(744);const $={},E=(0,T.Z)($,[["render",R],["__scopeId","data-v-788af9ce"]]);var q=E;const L=e=>{let t=(new Date).getTime()-new Date(e).getTime();if(t<500)return"now";if(t>2592e5){let e=(t/864e5).toFixed(0);return e+" day"+("1"!==e?"s":"")+" ago"}if(t>36e5){let e=(t/36e5).toFixed(0);return e+" hour"+("1"!==e?"s":"")+" ago"}if(t>6e4){let e=(t/6e4).toFixed(0);return e+" minute"+("1"!==e?"s":"")+" ago"}let s=(t/1e3).toFixed(0);return s+" second"+("1"!==s?"s":"")+" ago"},Z=(e,t)=>{const s=new Date(e)-new Date(t),a=Math.floor(s/1e3),l=Math.floor(a/60),n=Math.floor(l/60);if(n>0){const e=l%60,t=n+(1===n?" hour":" hours");return e>0?t+" "+e+(1===e?" minute":" minutes"):t}if(l>0){const e=a%60,t=l+(1===l?" minute":" minutes");return e>0?t+" "+e+(1===e?" second":" seconds"):t}return a+(1===a?" second":" seconds")},A=e=>{let t=new Date(e),s=t.getFullYear(),a=(t.getMonth()+1<10?"0":"")+(t.getMonth()+1),l=(t.getDate()<10?"0":"")+t.getDate(),n=(t.getHours()<10?"0":"")+t.getHours(),r=(t.getMinutes()<10?"0":"")+t.getMinutes(),o=(t.getSeconds()<10?"0":"")+t.getSeconds();return s+"-"+a+"-"+l+" "+n+":"+r+":"+o},M={key:0,class:"space-y-2"},N={key:0,class:"flex items-center gap-2"},Y={class:"text-xs font-semibold"},I={class:"font-mono text-xs"},O={key:1},P={class:"font-mono text-xs"},K={key:0,class:"mt-1 space-y-0.5"},V={class:"truncate"},B={class:"text-muted-foreground"},G={key:0,class:"text-xs text-muted-foreground"},J={class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},X={class:"font-mono text-xs"},Q={key:2},ee={class:"font-mono text-xs space-y-0.5"},te={class:"break-all"},se={key:3},ae={class:"font-mono text-xs space-y-0.5"};var le={__name:"Tooltip",props:{event:{type:[Event,Object],default:null},result:{type:Object,default:null},isPersistent:{type:Boolean,default:!1}},setup(e){const t=(0,i.yj)(),s=e,a=(0,r.iH)(!0),o=(0,r.iH)(0),u=(0,r.iH)(0),d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,l.Fl)((()=>s.result&&void 0!==s.result.endpointResults)),m=(0,l.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.length:0)),p=(0,l.Fl)((()=>g.value&&s.result.endpointResults?s.result.endpointResults.filter((e=>e.success)).length:0)),v=async()=>{if(!c.value||!d.value||a.value)return;await(0,l.Y3)();const e=c.value.getBoundingClientRect(),t=d.value.getBoundingClientRect(),s=window.pageYOffset||document.documentElement.scrollTop,n=window.pageXOffset||document.documentElement.scrollLeft;let r=e.bottom+s+8,i=e.left+n;const g=window.innerHeight-e.bottom,m=e.top;g<t.height+20&&(r=m>t.height+20?e.top+s-t.height-8:m>g?s+10:s+window.innerHeight-t.height-10);const p=window.innerWidth-e.left;p<t.width+20&&(i=e.right+n-t.width,i<n+10&&(i=n+10)),o.value=Math.round(r),u.value=Math.round(i)},f=async()=>{if(s.event&&s.event.type)if(await(0,l.Y3)(),"mouseenter"!==s.event.type&&"click"!==s.event.type||!d.value)"mouseleave"===s.event.type&&(s.isPersistent||(a.value=!0,c.value=null));else{const e=s.event.target;c.value=e,a.value=!1,await(0,l.Y3)(),await v()}},w=()=>{v()};return(0,l.bv)((()=>{window.addEventListener("resize",w)})),(0,l.Ah)((()=>{window.removeEventListener("resize",w)})),(0,l.YP)((()=>s.event),(e=>{e&&e.type&&("mouseenter"===e.type||"click"===e.type?(a.value=!1,(0,l.Y3)((()=>f()))):"mouseleave"===e.type&&(s.isPersistent||(a.value=!0)))}),{immediate:!0}),(0,l.YP)((()=>s.result),(()=>{a.value||(0,l.Y3)((()=>f()))})),(0,l.YP)((()=>[s.isPersistent,s.result]),(([e,t])=>{e||t?t&&(e||"mouseenter"===s.event?.type)&&(a.value=!1,(0,l.Y3)((()=>f()))):a.value=!0})),(0,l.YP)((()=>t.path),(()=>{a.value=!0,c.value=null})),(t,s)=>((0,l.wg)(),(0,l.iD)("div",{id:"tooltip",ref_key:"tooltip",ref:d,class:(0,n.C_)(["absolute z-50 px-3 py-2 text-sm rounded-md shadow-lg border transition-all duration-200","bg-popover text-popover-foreground border-border",a.value?"invisible opacity-0":"visible opacity-100"]),style:(0,n.j5)(`top: ${o.value}px; left: ${u.value}px;`)},[e.result?((0,l.wg)(),(0,l.iD)("div",M,[g.value?((0,l.wg)(),(0,l.iD)("div",N,[(0,l._)("span",{class:(0,n.C_)(["inline-block w-2 h-2 rounded-full",e.result.success?"bg-green-500":"bg-red-500"])},null,2),(0,l._)("span",Y,(0,n.zw)(e.result.success?"Suite Passed":"Suite Failed"),1)])):(0,l.kq)("",!0),(0,l._)("div",null,[s[0]||(s[0]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Timestamp",-1)),(0,l._)("div",I,(0,n.zw)((0,r.SU)(A)(e.result.timestamp)),1)]),g.value&&e.result.endpointResults?((0,l.wg)(),(0,l.iD)("div",O,[s[1]||(s[1]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Endpoints",-1)),(0,l._)("div",P,[(0,l._)("span",{class:(0,n.C_)(p.value===m.value?"text-green-500":"text-yellow-500")},(0,n.zw)(p.value)+"/"+(0,n.zw)(m.value)+" passed ",3)]),e.result.endpointResults.length>0?((0,l.wg)(),(0,l.iD)("div",K,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.result.endpointResults.slice(0,5),((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"flex items-center gap-1 text-xs"},[(0,l._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,l._)("span",V,(0,n.zw)(e.name),1),(0,l._)("span",B,"("+(0,n.zw)((e.duration/1e6).toFixed(0))+"ms)",1)])))),128)),e.result.endpointResults.length>5?((0,l.wg)(),(0,l.iD)("div",G," ... and "+(0,n.zw)(e.result.endpointResults.length-5)+" more ",1)):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])):(0,l.kq)("",!0),(0,l._)("div",null,[(0,l._)("div",J,(0,n.zw)(g.value?"Total Duration":"Response Time"),1),(0,l._)("div",X,(0,n.zw)((g.value,(e.result.duration/1e6).toFixed(0)))+"ms ",1)]),!g.value&&e.result.conditionResults&&e.result.conditionResults.length?((0,l.wg)(),(0,l.iD)("div",Q,[s[2]||(s[2]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Conditions",-1)),(0,l._)("div",ee,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.result.conditionResults,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"flex items-start gap-1"},[(0,l._)("span",{class:(0,n.C_)(e.success?"text-green-500":"text-red-500")},(0,n.zw)(e.success?"✓":"✗"),3),(0,l._)("span",te,(0,n.zw)(e.condition),1)])))),128))])])):(0,l.kq)("",!0),e.result.errors&&e.result.errors.length?((0,l.wg)(),(0,l.iD)("div",se,[s[3]||(s[3]=(0,l._)("div",{class:"text-xs font-semibold text-muted-foreground uppercase tracking-wider"},"Errors",-1)),(0,l._)("div",ae,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.result.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"text-red-500"}," • "+(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0)],6))}};const ne=le;var re=ne;const oe={class:"flex justify-center items-center"};var ie={__name:"Loading",props:{size:{type:String,default:"md",validator:e=>["xs","sm","md","lg","xl"].includes(e)}},setup(e){const t=e,s=(0,l.Fl)((()=>{const e={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"};return e[t.size]||e.md}));return(e,t)=>((0,l.wg)(),(0,l.iD)("div",oe,[(0,l._)("img",{class:(0,n.C_)(["animate-spin rounded-full opacity-60 grayscale",s.value]),src:o,alt:"Gatus logo"},null,2)]))}};const ue=ie;var de=ue;const ce={id:"global",class:"bg-background text-foreground"},ge={key:0,class:"flex items-center justify-center min-h-screen"},me={key:1,class:"relative"},pe={class:"border-b bg-card/50 backdrop-blur supports-[backdrop-filter]:bg-card/60"},ve={class:"container mx-auto px-4 py-4 max-w-7xl"},fe={class:"flex items-center justify-between"},we={class:"flex items-center gap-4"},he={class:"w-12 h-12 flex items-center justify-center"},xe=["src"],be={key:1,src:o,alt:"Gatus",class:"w-full h-full object-contain"},ye={class:"text-2xl font-bold tracking-tight"},ke={key:0,class:"text-sm text-muted-foreground"},_e={class:"flex items-center gap-2"},Se={key:0,class:"hidden md:flex items-center gap-1"},De=["href"],Ue={key:0,class:"md:hidden mt-4 pt-4 border-t space-y-1"},Ce=["href"],ze={class:"relative"},We={class:"border-t mt-auto"},He={class:"container mx-auto px-4 py-6 max-w-7xl"},je={class:"flex flex-col items-center gap-4"},Fe={key:2,id:"login-container",class:"flex items-center justify-center min-h-screen p-4"},Re={key:0,class:"mb-6"},Te={class:"p-3 rounded-md bg-destructive/10 border border-destructive/20"},$e={class:"text-sm text-destructive text-center"},Ee={key:0},qe={key:1},Le=["href"];var Ze={__name:"App",setup(e){const t=(0,i.yj)(),s=(0,r.iH)(!1),a=(0,r.iH)({oidc:!1,authenticated:!0}),g=(0,r.iH)([]),m=(0,r.iH)({}),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!1);let w=null;const h=(0,l.Fl)((()=>window.config&&window.config.logo&&"{{ .UI.Logo }}"!==window.config.logo?window.config.logo:"")),b=(0,l.Fl)((()=>window.config&&window.config.header&&"{{ .UI.Header }}"!==window.config.header?window.config.header:"Gatus")),y=(0,l.Fl)((()=>window.config&&window.config.link&&"{{ .UI.Link }}"!==window.config.link?window.config.link:null)),_=(0,l.Fl)((()=>window.config&&window.config.buttons?window.config.buttons:[])),S=async()=>{try{const e=await fetch(`${Br}/api/v1/config`,{credentials:"include"});if(200===e.status){const t=await e.json();a.value=t,g.value=t.announcements||[]}s.value=!0}catch(e){console.error("Failed to fetch config:",e),s.value=!0}},U=(e,t,s="hover")=>{"click"===s?e?(m.value={result:e,event:t},f.value=!0):(m.value={},f.value=!1):"hover"===s&&(f.value||(m.value={result:e,event:t}))},C=e=>{if(f.value){const t=document.getElementById("tooltip"),s=e.target.closest(".flex-1.h-6, .flex-1.h-8");!t||t.contains(e.target)||s||(m.value={},f.value=!1,window.dispatchEvent(new CustomEvent("clear-data-point-selection")))}};return(0,l.bv)((()=>{S(),w=setInterval(S,6e5),document.addEventListener("click",C)})),(0,l.Ah)((()=>{w&&(clearInterval(w),w=null),document.removeEventListener("click",C)})),(e,i)=>{const w=(0,l.up)("router-view");return(0,l.wg)(),(0,l.iD)("div",ce,[s.value?a.value&&a.value.oidc&&!a.value.authenticated?((0,l.wg)(),(0,l.iD)("div",Fe,[(0,l.Wm)((0,r.SU)(k),{class:"w-full max-w-md"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"text-center"},{default:(0,l.w5)((()=>[i[5]||(i[5]=(0,l._)("img",{src:o,alt:"Gatus",class:"w-20 h-20 mx-auto mb-4"},null,-1)),(0,l.Wm)((0,r.SU)(z),{class:"text-3xl"},{default:(0,l.w5)((()=>i[4]||(i[4]=[(0,l.Uk)("Gatus",-1)]))),_:1,__:[4]}),i[6]||(i[6]=(0,l._)("p",{class:"text-muted-foreground mt-2"},"System Monitoring Dashboard",-1))])),_:1,__:[5,6]}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,r.SU)(t)&&(0,r.SU)(t).query.error?((0,l.wg)(),(0,l.iD)("div",Re,[(0,l._)("div",Te,[(0,l._)("p",$e,["access_denied"===(0,r.SU)(t).query.error?((0,l.wg)(),(0,l.iD)("span",Ee," You do not have access to this status page ")):((0,l.wg)(),(0,l.iD)("span",qe,(0,n.zw)((0,r.SU)(t).query.error),1))])])])):(0,l.kq)("",!0),(0,l._)("a",{href:`${(0,r.SU)(Br)}/oidc/login`,class:"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground hover:bg-primary/90 h-11 px-8 w-full",onClick:i[2]||(i[2]=e=>v.value=!0)},[v.value?((0,l.wg)(),(0,l.j4)(de,{key:0,size:"xs"})):((0,l.wg)(),(0,l.iD)(l.HY,{key:1},[(0,l.Wm)((0,r.SU)(c.Z),{class:"mr-2 h-4 w-4"}),i[7]||(i[7]=(0,l.Uk)(" Login with OIDC ",-1))],64))],8,Le)])),_:1})])),_:1})])):((0,l.wg)(),(0,l.iD)("div",me,[(0,l._)("header",pe,[(0,l._)("div",ve,[(0,l._)("div",fe,[(0,l._)("div",we,[((0,l.wg)(),(0,l.j4)((0,l.LL)(y.value?"a":"div"),{href:y.value,target:"_blank",class:"flex items-center gap-3 hover:opacity-80 transition-opacity"},{default:(0,l.w5)((()=>[(0,l._)("div",he,[h.value?((0,l.wg)(),(0,l.iD)("img",{key:0,src:h.value,alt:"Gatus",class:"w-full h-full object-contain"},null,8,xe)):((0,l.wg)(),(0,l.iD)("img",be))]),(0,l._)("div",null,[(0,l._)("h1",ye,(0,n.zw)(b.value),1),_.value&&_.value.length?((0,l.wg)(),(0,l.iD)("p",ke," System Monitoring Dashboard ")):(0,l.kq)("",!0)])])),_:1},8,["href"]))]),(0,l._)("div",_e,[_.value&&_.value.length?((0,l.wg)(),(0,l.iD)("nav",Se,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(_.value,(e=>((0,l.wg)(),(0,l.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors"},(0,n.zw)(e.name),9,De)))),128))])):(0,l.kq)("",!0),_.value&&_.value.length?((0,l.wg)(),(0,l.j4)((0,r.SU)(x),{key:1,variant:"ghost",size:"icon",class:"md:hidden",onClick:i[0]||(i[0]=e=>p.value=!p.value)},{default:(0,l.w5)((()=>[p.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(d.Z),{key:1,class:"h-5 w-5"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(u.Z),{key:0,class:"h-5 w-5"}))])),_:1})):(0,l.kq)("",!0)])]),_.value&&_.value.length&&p.value?((0,l.wg)(),(0,l.iD)("nav",Ue,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(_.value,(e=>((0,l.wg)(),(0,l.iD)("a",{key:e.name,href:e.link,target:"_blank",class:"block px-3 py-2 text-sm font-medium rounded-md hover:bg-accent hover:text-accent-foreground transition-colors",onClick:i[1]||(i[1]=e=>p.value=!1)},(0,n.zw)(e.name),9,Ce)))),128))])):(0,l.kq)("",!0)])]),(0,l._)("main",ze,[(0,l.Wm)(w,{onShowTooltip:U,announcements:g.value},null,8,["announcements"])]),(0,l._)("footer",We,[(0,l._)("div",He,[(0,l._)("div",je,[i[3]||(i[3]=(0,l._)("div",{class:"text-sm text-muted-foreground text-center"},[(0,l.Uk)(" Powered by "),(0,l._)("a",{href:"https://gatus.io",target:"_blank",class:"font-medium text-emerald-800 hover:text-emerald-600"},"Gatus")],-1)),(0,l.Wm)(q)])])])])):((0,l.wg)(),(0,l.iD)("div",ge,[(0,l.Wm)(de,{size:"lg"})])),(0,l.Wm)(re,{result:m.value.result,event:m.value.event,isPersistent:f.value},null,8,["result","event","isPersistent"])])}}};const Ae=Ze;var Me=Ae,Ne=s(793),Ye=s(138),Ie=s(254),Oe=s(146),Pe=s(485),Ke=s(893),Ve=s(89),Be=s(372),Ge=s(981),Je={__name:"Badge",props:{variant:{type:String,default:"default"}},setup(e){const t=(0,g.j)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground",success:"border-transparent bg-green-500 text-white",warning:"border-transparent bg-yellow-500 text-white"}},defaultVariants:{variant:"default"}});return(s,a)=>((0,l.wg)(),(0,l.iD)("div",{class:(0,n.C_)((0,r.SU)(v)((0,r.SU)(t)({variant:e.variant}),s.$attrs.class??""))},[(0,l.WI)(s.$slots,"default")],2))}};const Xe=Je;var Qe=Xe,et={__name:"StatusBadge",props:{status:{type:String,required:!0,validator:e=>["healthy","unhealthy","degraded","unknown"].includes(e)}},setup(e){const t=e,s=(0,l.Fl)((()=>{switch(t.status){case"healthy":return"success";case"unhealthy":return"destructive";case"degraded":return"warning";default:return"secondary"}})),a=(0,l.Fl)((()=>{switch(t.status){case"healthy":return"Healthy";case"unhealthy":return"Unhealthy";case"degraded":return"Degraded";default:return"Unknown"}})),o=(0,l.Fl)((()=>{switch(t.status){case"healthy":return"bg-green-400";case"unhealthy":return"bg-red-400";case"degraded":return"bg-yellow-400";default:return"bg-gray-400"}}));return(e,t)=>((0,l.wg)(),(0,l.j4)((0,r.SU)(Qe),{variant:s.value,class:"flex items-center gap-1"},{default:(0,l.w5)((()=>[(0,l._)("span",{class:(0,n.C_)(["w-2 h-2 rounded-full",o.value])},null,2),(0,l.Uk)(" "+(0,n.zw)(a.value),1)])),_:1},8,["variant"]))}};const tt=et;var st=tt;const at={class:"flex items-start justify-between gap-2 sm:gap-3"},lt={class:"flex-1 min-w-0 overflow-hidden"},nt=["title","aria-label"],rt={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground min-h-[1.25rem]"},ot=["title"],it={key:1},ut=["title"],dt={class:"flex-shrink-0 ml-2"},ct={class:"space-y-2"},gt={class:"flex items-center justify-between mb-1"},mt=["title"],pt={class:"flex gap-0.5"},vt=["onMouseenter","onMouseleave","onClick"],ft={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var wt={__name:"EndpointCard",props:{endpoint:{type:Object,required:!0},maxResults:{type:Number,default:50},showAverageResponseTime:{type:Boolean,default:!0}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,i.tv)(),o=e,u=t,d=(0,r.iH)(null),c=(0,l.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?o.endpoint.results[o.endpoint.results.length-1]:null)),g=(0,l.Fl)((()=>c.value?c.value.success?"healthy":"unhealthy":"unknown")),m=(0,l.Fl)((()=>c.value?.hostname||null)),p=(0,l.Fl)((()=>{const e=[...o.endpoint.results||[]];while(e.length<o.maxResults)e.unshift(null);return e.slice(-o.maxResults)})),v=(0,l.Fl)((()=>{if(!o.endpoint.results||0===o.endpoint.results.length)return"N/A";let e=0,t=0,s=1/0,a=0;for(const l of o.endpoint.results)if(l.duration){const n=l.duration/1e6;e+=n,t++,s=Math.min(s,n),a=Math.max(a,n)}if(0===t)return"N/A";if(o.showAverageResponseTime){const s=Math.round(e/t);return`~${s}ms`}{const e=Math.round(s),t=Math.round(a);return e===t?`${e}ms`:`${e}-${t}ms`}})),f=(0,l.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?L(o.endpoint.results[0].timestamp):"")),w=(0,l.Fl)((()=>o.endpoint.results&&0!==o.endpoint.results.length?L(o.endpoint.results[o.endpoint.results.length-1].timestamp):"")),h=()=>{s.push(`/endpoints/${o.endpoint.key}`)},x=(e,t)=>{u("showTooltip",e,t,"hover")},b=(e,t)=>{u("showTooltip",null,t,"hover")},y=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,u("showTooltip",null,t,"click")):(d.value=s,u("showTooltip",e,t,"click"))},_=()=>{d.value=null};return(0,l.bv)((()=>{window.addEventListener("clear-data-point-selection",_)})),(0,l.Ah)((()=>{window.removeEventListener("clear-data-point-selection",_)})),(t,s)=>((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{class:"endpoint h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"endpoint-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,l.w5)((()=>[(0,l._)("div",at,[(0,l._)("div",lt,[(0,l.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,l.w5)((()=>[(0,l._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:h,onKeydown:(0,a.D2)(h,["enter"]),title:e.endpoint.name,role:"link",tabindex:"0","aria-label":`View details for ${e.endpoint.name}`},(0,n.zw)(e.endpoint.name),41,nt)])),_:1}),(0,l._)("div",rt,[e.endpoint.group?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"truncate",title:e.endpoint.group},(0,n.zw)(e.endpoint.group),9,ot)):(0,l.kq)("",!0),e.endpoint.group&&m.value?((0,l.wg)(),(0,l.iD)("span",it,"•")):(0,l.kq)("",!0),m.value?((0,l.wg)(),(0,l.iD)("span",{key:2,class:"truncate",title:m.value},(0,n.zw)(m.value),9,ut)):(0,l.kq)("",!0)])]),(0,l._)("div",dt,[(0,l.Wm)(st,{status:g.value},null,8,["status"])])])])),_:1}),(0,l.Wm)((0,r.SU)(j),{class:"endpoint-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,l.w5)((()=>[(0,l._)("div",ct,[(0,l._)("div",null,[(0,l._)("div",gt,[s[0]||(s[0]=(0,l._)("div",{class:"flex-1"},null,-1)),(0,l._)("p",{class:"text-xs text-muted-foreground",title:e.showAverageResponseTime?"Average response time":"Minimum and maximum response time"},(0,n.zw)(v.value),9,mt)]),(0,l._)("div",pt,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(p.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":"",e?e.success?d.value===t?"bg-green-700":"bg-green-500 hover:bg-green-700":d.value===t?"bg-red-700":"bg-red-500 hover:bg-red-700":"bg-gray-200 dark:bg-gray-700"]),onMouseenter:t=>e&&x(e,t),onMouseleave:t=>e&&b(e,t),onClick:(0,a.iM)((s=>e&&y(e,s,t)),["stop"])},null,42,vt)))),128))]),(0,l._)("div",ft,[(0,l._)("span",null,(0,n.zw)(f.value),1),(0,l._)("span",null,(0,n.zw)(w.value),1)])])])])),_:1})])),_:1}))}};const ht=wt;var xt=ht;const bt={class:"flex items-start justify-between gap-2 sm:gap-3"},yt={class:"flex-1 min-w-0 overflow-hidden"},kt=["title","aria-label"],_t={class:"flex items-center gap-2 text-xs sm:text-sm text-muted-foreground"},St=["title"],Dt={key:1},Ut={key:2},Ct={class:"flex-shrink-0 ml-2"},zt={class:"space-y-2"},Wt={class:"flex items-center justify-between mb-1"},Ht={class:"text-xs text-muted-foreground"},jt={key:0,class:"text-xs text-muted-foreground"},Ft={class:"flex gap-0.5"},Rt=["onMouseenter","onMouseleave","onClick"],Tt={class:"flex items-center justify-between text-xs text-muted-foreground mt-1"};var $t={__name:"SuiteCard",props:{suite:{type:Object,required:!0},maxResults:{type:Number,default:50}},emits:["showTooltip"],setup(e,{emit:t}){const s=(0,i.tv)(),o=e,u=t,d=(0,r.iH)(null),c=(0,l.Fl)((()=>{const e=[...o.suite.results||[]];while(e.length<o.maxResults)e.unshift(null);return e.slice(-o.maxResults)})),g=(0,l.Fl)((()=>o.suite.results&&0!==o.suite.results.length?o.suite.results[o.suite.results.length-1].success?"healthy":"unhealthy":"unknown")),m=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results[o.suite.results.length-1];return e.endpointResults?e.endpointResults.length:0})),p=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return 0;const e=o.suite.results.filter((e=>e.success)).length;return Math.round(e/o.suite.results.length*100)})),v=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return null;const e=o.suite.results.reduce(((e,t)=>e+(t.duration||0)),0);return Math.round(e/o.suite.results.length/1e6)})),f=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"N/A";const e=o.suite.results[0];return L(e.timestamp)})),w=(0,l.Fl)((()=>{if(!o.suite.results||0===o.suite.results.length)return"Now";const e=o.suite.results[o.suite.results.length-1];return L(e.timestamp)})),h=()=>{s.push(`/suites/${o.suite.key}`)},x=(e,t)=>{u("showTooltip",e,t,"hover")},b=(e,t)=>{u("showTooltip",null,t,"hover")},y=(e,t,s)=>{window.dispatchEvent(new CustomEvent("clear-data-point-selection")),d.value===s?(d.value=null,u("showTooltip",null,t,"click")):(d.value=s,u("showTooltip",e,t,"click"))},_=()=>{d.value=null};return(0,l.bv)((()=>{window.addEventListener("clear-data-point-selection",_)})),(0,l.Ah)((()=>{window.removeEventListener("clear-data-point-selection",_)})),(t,s)=>((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{class:"suite h-full flex flex-col transition hover:shadow-lg hover:scale-[1.01] dark:hover:border-gray-700"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"suite-header px-3 sm:px-6 pt-3 sm:pt-6 pb-2 space-y-0"},{default:(0,l.w5)((()=>[(0,l._)("div",bt,[(0,l._)("div",yt,[(0,l.Wm)((0,r.SU)(z),{class:"text-base sm:text-lg truncate"},{default:(0,l.w5)((()=>[(0,l._)("span",{class:"hover:text-primary cursor-pointer hover:underline text-sm sm:text-base block truncate",onClick:h,onKeydown:(0,a.D2)(h,["enter"]),title:e.suite.name,role:"link",tabindex:"0","aria-label":`View details for suite ${e.suite.name}`},(0,n.zw)(e.suite.name),41,kt)])),_:1}),(0,l._)("div",_t,[e.suite.group?((0,l.wg)(),(0,l.iD)("span",{key:0,class:"truncate",title:e.suite.group},(0,n.zw)(e.suite.group),9,St)):(0,l.kq)("",!0),e.suite.group&&m.value?((0,l.wg)(),(0,l.iD)("span",Dt,"•")):(0,l.kq)("",!0),m.value?((0,l.wg)(),(0,l.iD)("span",Ut,(0,n.zw)(m.value)+" endpoint"+(0,n.zw)(1!==m.value?"s":""),1)):(0,l.kq)("",!0)])]),(0,l._)("div",Ct,[(0,l.Wm)(st,{status:g.value},null,8,["status"])])])])),_:1}),(0,l.Wm)((0,r.SU)(j),{class:"suite-content flex-1 pb-3 sm:pb-4 px-3 sm:px-6 pt-2"},{default:(0,l.w5)((()=>[(0,l._)("div",zt,[(0,l._)("div",null,[(0,l._)("div",Wt,[(0,l._)("p",Ht,"Success Rate: "+(0,n.zw)(p.value)+"%",1),v.value?((0,l.wg)(),(0,l.iD)("p",jt,(0,n.zw)(v.value)+"ms avg",1)):(0,l.kq)("",!0)]),(0,l._)("div",Ft,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(c.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex-1 h-6 sm:h-8 rounded-sm transition-all",e?"cursor-pointer":"",e?e.success?d.value===t?"bg-green-700":"bg-green-500 hover:bg-green-700":d.value===t?"bg-red-700":"bg-red-500 hover:bg-red-700":"bg-gray-200 dark:bg-gray-700"]),onMouseenter:t=>e&&x(e,t),onMouseleave:t=>e&&b(e,t),onClick:(0,a.iM)((s=>e&&y(e,s,t)),["stop"])},null,42,Rt)))),128))]),(0,l._)("div",Tt,[(0,l._)("span",null,(0,n.zw)(f.value),1),(0,l._)("span",null,(0,n.zw)(w.value),1)])])])])),_:1})])),_:1}))}};const Et=(0,T.Z)($t,[["__scopeId","data-v-230a1fd1"]]);var qt=Et,Lt=s(275);const Zt=["value"];var At={__name:"Input",props:{modelValue:{type:[String,Number],default:""}},emits:["update:modelValue"],setup(e){return(t,s)=>((0,l.wg)(),(0,l.iD)("input",{class:(0,n.C_)((0,r.SU)(v)("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.$attrs.class??"")),value:e.modelValue,onInput:s[0]||(s[0]=e=>t.$emit("update:modelValue",e.target.value))},null,42,Zt))}};const Mt=At;var Nt=Mt,Yt=s(368);const It=["aria-expanded","aria-label"],Ot={class:"truncate"},Pt={key:0,role:"listbox",class:"absolute top-full left-0 z-50 mt-1 w-full rounded-md border bg-popover text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95"},Kt={class:"p-1"},Vt=["onClick","aria-selected"],Bt={class:"absolute left-1.5 sm:left-2 flex h-3.5 w-3.5 items-center justify-center"};var Gt={__name:"Select",props:{modelValue:{type:String,default:""},options:{type:Array,required:!0},placeholder:{type:String,default:"Select..."},class:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const s=e,a=t,o=(0,r.iH)(!1),i=(0,r.iH)(null),u=(0,r.iH)(-1),d=(0,l.Fl)((()=>s.options.find((e=>e.value===s.modelValue))||{label:s.placeholder,value:""})),c=e=>{a("update:modelValue",e.value),o.value=!1},g=()=>{if(o.value=!o.value,o.value){const e=s.options.findIndex((e=>e.value===s.modelValue));u.value=e>=0?e:0}else u.value=-1},m=e=>{i.value&&!i.value.contains(e.target)&&(o.value=!1,u.value=-1)},p=e=>{if(o.value)switch(e.key){case"ArrowDown":e.preventDefault(),u.value=Math.min(u.value+1,s.options.length-1);break;case"ArrowUp":e.preventDefault(),u.value=Math.max(u.value-1,0);break;case"Enter":case" ":e.preventDefault(),u.value>=0&&u.value<s.options.length&&c(s.options[u.value]);break;case"Escape":e.preventDefault(),o.value=!1,u.value=-1;break}else"Enter"!==e.key&&" "!==e.key&&"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),g())};return(0,l.bv)((()=>{document.addEventListener("click",m)})),(0,l.Ah)((()=>{document.removeEventListener("click",m)})),(t,a)=>((0,l.wg)(),(0,l.iD)("div",{ref_key:"selectRef",ref:i,class:(0,n.C_)(["relative",s.class])},[(0,l._)("button",{onClick:g,onKeydown:p,"aria-expanded":o.value,"aria-haspopup":!0,"aria-label":d.value.label||s.placeholder,class:"flex h-9 sm:h-10 w-full items-center justify-between rounded-md border border-input bg-background px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"},[(0,l._)("span",Ot,(0,n.zw)(d.value.label),1),(0,l.Wm)((0,r.SU)(Pe.Z),{class:"h-3 w-3 sm:h-4 sm:w-4 opacity-50 flex-shrink-0 ml-1"})],40,It),o.value?((0,l.wg)(),(0,l.iD)("div",Pt,[(0,l._)("div",Kt,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.options,((t,s)=>((0,l.wg)(),(0,l.iD)("div",{key:t.value,onClick:e=>c(t),class:(0,n.C_)(["relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-6 sm:pl-8 pr-2 text-xs sm:text-sm outline-none hover:bg-accent hover:text-accent-foreground",s===u.value&&"bg-accent text-accent-foreground"]),role:"option","aria-selected":e.modelValue===t.value},[(0,l._)("span",Bt,[e.modelValue===t.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(Yt.Z),{key:0,class:"h-3 w-3 sm:h-4 sm:w-4"})):(0,l.kq)("",!0)]),(0,l.Uk)(" "+(0,n.zw)(t.label),1)],10,Vt)))),128))])])):(0,l.kq)("",!0)],2))}};const Jt=Gt;var Xt=Jt;const Qt={class:"flex flex-col lg:flex-row gap-3 lg:gap-4 p-3 sm:p-4 bg-card rounded-lg border"},es={class:"flex-1"},ts={class:"relative"},ss={class:"flex flex-col sm:flex-row gap-3 sm:gap-4"},as={class:"flex items-center gap-2 flex-1 sm:flex-initial"},ls={class:"flex items-center gap-2 flex-1 sm:flex-initial"};var ns={__name:"SearchBar",emits:["search","update:showOnlyFailing","update:showRecentFailures","update:groupByGroup","update:sortBy","initializeCollapsedGroups"],setup(e,{emit:t}){const s=(0,r.iH)(""),a=(0,r.iH)(localStorage.getItem("gatus:filter-by")||"undefined"!==typeof window&&window.config?.defaultFilterBy||"none"),n=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"undefined"!==typeof window&&window.config?.defaultSortBy||"name"),o=[{label:"None",value:"none"},{label:"Failing",value:"failing"},{label:"Unstable",value:"unstable"}],i=[{label:"Name",value:"name"},{label:"Group",value:"group"},{label:"Health",value:"health"}],u=t,d=e=>{a.value=e,localStorage.setItem("gatus:filter-by",e),u("update:showOnlyFailing",!1),u("update:showRecentFailures",!1),"failing"===e?u("update:showOnlyFailing",!0):"unstable"===e&&u("update:showRecentFailures",!0)},c=e=>{n.value=e,localStorage.setItem("gatus:sort-by",e),u("update:sortBy",e),u("update:groupByGroup","group"===e),"group"===e&&u("initializeCollapsedGroups")};return(0,l.bv)((()=>{d(a.value),c(n.value)})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",Qt,[(0,l._)("div",es,[(0,l._)("div",ts,[(0,l.Wm)((0,r.SU)(Lt.Z),{class:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),t[4]||(t[4]=(0,l._)("label",{for:"search-input",class:"sr-only"},"Search endpoints",-1)),(0,l.Wm)((0,r.SU)(Nt),{id:"search-input",modelValue:s.value,"onUpdate:modelValue":t[0]||(t[0]=e=>s.value=e),type:"text",placeholder:"Search endpoints...",class:"pl-10 text-sm sm:text-base",onInput:t[1]||(t[1]=t=>e.$emit("search",s.value))},null,8,["modelValue"])])]),(0,l._)("div",ss,[(0,l._)("div",as,[t[5]||(t[5]=(0,l._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Filter by:",-1)),(0,l.Wm)((0,r.SU)(Xt),{modelValue:a.value,"onUpdate:modelValue":[t[2]||(t[2]=e=>a.value=e),d],options:o,placeholder:"None",class:"flex-1 sm:w-[140px] md:w-[160px]"},null,8,["modelValue"])]),(0,l._)("div",ls,[t[6]||(t[6]=(0,l._)("label",{class:"text-xs sm:text-sm font-medium text-muted-foreground whitespace-nowrap"},"Sort by:",-1)),(0,l.Wm)((0,r.SU)(Xt),{modelValue:n.value,"onUpdate:modelValue":[t[3]||(t[3]=e=>n.value=e),c],options:i,placeholder:"Name",class:"flex-1 sm:w-[90px] md:w-[100px]"},null,8,["modelValue"])])])]))}};const rs=ns;var os=rs,is=s(789),us=s(679);const ds={id:"settings",class:"fixed bottom-4 left-4 z-50"},cs={class:"flex items-center gap-1 bg-background/95 backdrop-blur-sm border rounded-full shadow-md p-1"},gs=["aria-label","aria-expanded"],ms={class:"text-xs font-medium"},ps=["onClick"],vs=["aria-label"],fs={class:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-popover text-popover-foreground text-xs rounded-md shadow-md opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none whitespace-nowrap"},ws="300",hs="theme",xs=31536e3;var bs={__name:"Settings",emits:["refreshData"],setup(e,{emit:t}){const s=t,o=[{value:"10",label:"10s"},{value:"30",label:"30s"},{value:"60",label:"1m"},{value:"120",label:"2m"},{value:"300",label:"5m"},{value:"600",label:"10m"}],i={REFRESH_INTERVAL:"gatus:refresh-interval"};function u(){const e=document.cookie.match(new RegExp(`${hs}=(dark|light);?`))?.[1];return"dark"===e||!e&&(window.matchMedia("(prefers-color-scheme: dark)").matches||document.documentElement.classList.contains("dark"))}function d(){const e=localStorage.getItem(i.REFRESH_INTERVAL),t=e&&parseInt(e),s=t&&t>=10&&o.some((t=>t.value===e));return s?e:ws}const c=(0,r.iH)(d()),g=(0,r.iH)(u()),m=(0,r.iH)(!1);let p=null;const v=e=>{const t=o.find((t=>t.value===e));return t?t.label:`${e}s`},f=e=>{localStorage.setItem(i.REFRESH_INTERVAL,e),p&&clearInterval(p),p=setInterval((()=>{w()}),1e3*e)},w=()=>{s("refreshData")},h=e=>{c.value=e,m.value=!1,w(),f(e)},x=e=>{const t=document.getElementById("settings");t&&!t.contains(e.target)&&(m.value=!1)},b=e=>{document.cookie=`${hs}=${e}; path=/; max-age=${xs}; samesite=strict`},y=()=>{const e=u()?"light":"dark";b(e),k()},k=()=>{const e=u();g.value=e,document.documentElement.classList.toggle("dark",e)};return(0,l.bv)((()=>{f(c.value),k(),document.addEventListener("click",x)})),(0,l.Ah)((()=>{p&&clearInterval(p),document.removeEventListener("click",x)})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",ds,[(0,l._)("div",cs,[(0,l._)("button",{onClick:t[1]||(t[1]=e=>m.value=!m.value),"aria-label":`Refresh interval: ${v(c.value)}`,"aria-expanded":m.value,class:"flex items-center gap-1.5 px-3 py-1.5 rounded-full hover:bg-accent transition-colors relative"},[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"w-3.5 h-3.5 text-muted-foreground"}),(0,l._)("span",ms,(0,n.zw)(v(c.value)),1),m.value?((0,l.wg)(),(0,l.iD)("div",{key:0,onClick:t[0]||(t[0]=(0,a.iM)((()=>{}),["stop"])),class:"absolute bottom-full left-0 mb-2 bg-popover border rounded-lg shadow-lg overflow-hidden"},[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(o,(e=>(0,l._)("button",{key:e.value,onClick:t=>h(e.value),class:(0,n.C_)(["block w-full px-4 py-2 text-xs text-left hover:bg-accent transition-colors",c.value===e.value&&"bg-accent"])},(0,n.zw)(e.label),11,ps))),64))])):(0,l.kq)("",!0)],8,gs),t[2]||(t[2]=(0,l._)("div",{class:"h-5 w-px bg-border/50"},null,-1)),(0,l._)("button",{onClick:y,"aria-label":g.value?"Switch to light mode":"Switch to dark mode",class:"p-1.5 rounded-full hover:bg-accent transition-colors group relative"},[g.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(is.Z),{key:0,class:"h-3.5 w-3.5 transition-all"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(us.Z),{key:1,class:"h-3.5 w-3.5 transition-all"})),(0,l._)("div",fs,(0,n.zw)(g.value?"Light mode":"Dark mode"),1)],8,vs)])]))}};const ys=(0,T.Z)(bs,[["__scopeId","data-v-482756f8"]]);var ks=ys,_s=s(691),Ss=s(446),Ds=s(5),Us=s(337),Cs=s(441),zs=s(424);const Ws=e=>null===e||void 0===e?"":String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),Hs=new Cs.TU.Renderer;Hs.link=(e,t,s)=>{const a="object"===typeof e&&null!==e?e:null,l=a?a.href:e,n=a?a.title:t,r=a?a.text:s,o=Ws(l||""),i=n?` title="${Ws(n)}"`:"",u=r||"";return`<a href="${o}" target="_blank" rel="noopener noreferrer" class="text-blue-700 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline font-medium"${i}>${u}</a>`},Cs.TU.use({renderer:Hs,breaks:!0,gfm:!0,headerIds:!1,mangle:!1});const js=e=>{if(!e)return"";const t=String(e),s=Cs.TU.parse(t);return zs.Z.sanitize(s,{ADD_ATTR:["target","rel"]})},Fs={key:0,class:"announcement-container mb-6"},Rs={class:"flex items-center justify-between"},Ts={class:"flex items-center gap-2"},$s={class:"text-xs text-gray-500 dark:text-gray-400"},Es={key:0,class:"announcement-content p-4 transition-all duration-200 rounded-b-lg"},qs={class:"relative"},Ls={class:"space-y-3"},Zs={class:"flex items-center gap-3 mb-2 relative"},As={class:"relative z-10 bg-white dark:bg-gray-800 px-2 py-1 rounded-md border border-gray-200 dark:border-gray-600"},Ms={class:"text-sm font-medium text-gray-600 dark:text-gray-300"},Ns={class:"space-y-2 ml-7 relative"},Ys={key:0,class:"absolute w-0.5 bg-gray-300 dark:bg-gray-600 pointer-events-none",style:{left:"-16px",top:"-2.5rem",height:"calc(50% + 2.5rem)"}},Is={class:"flex items-center gap-3"},Os=["title"],Ps={class:"flex-1 min-w-0"},Ks=["innerHTML"];var Vs={__name:"AnnouncementBanner",props:{announcements:{type:Array,default:()=>[]}},setup(e){const t=e,s=(0,r.iH)(!1),a=()=>{s.value=!s.value},o={outage:{icon:_s.Z,background:"bg-red-50 border-gray-200 dark:bg-red-900/50 dark:border-gray-600",border:"border-red-500",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:Ss.Z,background:"bg-yellow-50 border-gray-200 dark:bg-yellow-900/50 dark:border-gray-600",border:"border-yellow-500",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:Ds.Z,background:"bg-blue-50 border-gray-200 dark:bg-blue-900/50 dark:border-gray-600",border:"border-blue-500",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ve.Z,background:"bg-green-50 border-gray-200 dark:bg-green-900/50 dark:border-gray-600",border:"border-green-500",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Us.Z,background:"bg-gray-50 border-gray-200 dark:bg-gray-800/50 dark:border-gray-600",border:"border-gray-500",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},i=(0,l.Fl)((()=>t.announcements&&t.announcements.length>0?t.announcements[0]:null)),u=(0,l.Fl)((()=>{const e=i.value?.type||"none";return o[e]?.icon||Us.Z})),d=(0,l.Fl)((()=>{const e=i.value?.type||"none";return o[e]?.iconColor||"text-gray-600 dark:text-gray-400"})),c=(0,l.Fl)((()=>{const e=i.value?.type||"none",t=o[e];return`border-l-4 ${t.border.replace("border-","border-l-")}`})),g=(0,l.Fl)((()=>{if(!t.announcements||0===t.announcements.length)return{};const e={};return t.announcements.forEach((t=>{const s=new Date(t.timestamp).toDateString();e[s]||(e[s]=[]),e[s].push(t)})),e})),m=e=>o[e]?.icon||Us.Z,p=e=>o[e]||o.none,v=e=>{const t=new Date(e),s=new Date,a=new Date(s);return a.setDate(a.getDate()-1),t.toDateString()===s.toDateString()?"Today":t.toDateString()===a.toDateString()?"Yesterday":t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},f=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),w=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,o)=>e.announcements&&e.announcements.length?((0,l.wg)(),(0,l.iD)("div",Fs,[(0,l._)("div",{class:(0,n.C_)(["rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200",c.value])},[(0,l._)("div",{class:(0,n.C_)(["announcement-header px-4 py-3 cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors",s.value?"rounded-lg":"rounded-t-lg border-b border-gray-200 dark:border-gray-600"]),onClick:a},[(0,l._)("div",Rs,[(0,l._)("div",Ts,[((0,l.wg)(),(0,l.j4)((0,l.LL)(u.value),{class:(0,n.C_)(["w-5 h-5",d.value])},null,8,["class"])),o[0]||(o[0]=(0,l._)("h2",{class:"text-base font-semibold text-gray-900 dark:text-gray-100"},"Announcements",-1)),(0,l._)("span",$s," ("+(0,n.zw)(e.announcements.length)+") ",1)]),(0,l.Wm)((0,r.SU)(Pe.Z),{class:(0,n.C_)(["w-4 h-4 text-gray-500 dark:text-gray-400 transition-transform duration-200",s.value?"-rotate-90":"rotate-0"])},null,8,["class"])])],2),s.value?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",Es,[(0,l._)("div",qs,[(0,l._)("div",Ls,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(g.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"relative"},[(0,l._)("div",Zs,[(0,l._)("div",As,[(0,l._)("time",Ms,(0,n.zw)(v(t)),1)]),o[1]||(o[1]=(0,l._)("div",{class:"flex-1 border-t border-gray-200 dark:border-gray-600"},null,-1))]),(0,l._)("div",Ns,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,((s,a)=>((0,l.wg)(),(0,l.iD)("div",{key:`${t}-${a}-${s.timestamp}`,class:"relative"},[(0,l._)("div",{class:(0,n.C_)(["absolute -left-[26px] w-5 h-5 rounded-full border bg-white dark:bg-gray-800 flex items-center justify-center z-10",a===e.length-1?"top-3":"top-1/2 -translate-y-1/2",p(s.type).border])},[((0,l.wg)(),(0,l.j4)((0,l.LL)(m(s.type)),{class:(0,n.C_)(["w-3 h-3",p(s.type).iconColor])},null,8,["class"]))],2),0===a?((0,l.wg)(),(0,l.iD)("div",Ys)):(0,l.kq)("",!0),a<e.length-1?((0,l.wg)(),(0,l.iD)("div",{key:1,class:"absolute w-0.5 bg-gray-300 dark:bg-gray-600 pointer-events-none",style:(0,n.j5)({left:"-16px",top:"50%",height:a===e.length-2?"calc(50% + 1.25rem)":"calc(50% + 2rem)"})},null,4)):(0,l.kq)("",!0),(0,l._)("div",{class:(0,n.C_)(["rounded-md border p-3 transition-all duration-200 hover:shadow-sm",p(s.type).background])},[(0,l._)("div",Is,[(0,l._)("time",{class:(0,n.C_)(["text-sm font-mono whitespace-nowrap flex-shrink-0",p(s.type).text]),title:w(s.timestamp)},(0,n.zw)(f(s.timestamp)),11,Os),(0,l._)("div",Ps,[(0,l._)("p",{class:"text-sm leading-relaxed text-gray-900 dark:text-gray-100",innerHTML:(0,r.SU)(js)(s.message)},null,8,Ks)])])],2)])))),128))])])))),128))])])]))],2)])):(0,l.kq)("",!0)}};const Bs=(0,T.Z)(Vs,[["__scopeId","data-v-f1600768"]]);var Gs=Bs;const Js={key:0,class:"past-announcements"},Xs={class:"space-y-8"},Qs={class:"mb-3"},ea={class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider"},ta={key:0,class:"space-y-3"},sa={class:"flex items-start gap-3"},aa=["title"],la={class:"flex-1 min-w-0"},na=["innerHTML"],ra={key:1,class:"py-2"},oa={key:0};var ia={__name:"PastAnnouncements",props:{announcements:{type:Array,default:()=>[]}},setup(e){const t=e,s=(0,r.iH)(!1),a={outage:{icon:_s.Z,background:"bg-red-50 dark:bg-red-900/20",borderColor:"border-red-500 dark:border-red-400",iconColor:"text-red-600 dark:text-red-400",text:"text-red-700 dark:text-red-300"},warning:{icon:Ss.Z,background:"bg-yellow-50 dark:bg-yellow-900/20",borderColor:"border-yellow-500 dark:border-yellow-400",iconColor:"text-yellow-600 dark:text-yellow-400",text:"text-yellow-700 dark:text-yellow-300"},information:{icon:Ds.Z,background:"bg-blue-50 dark:bg-blue-900/20",borderColor:"border-blue-500 dark:border-blue-400",iconColor:"text-blue-600 dark:text-blue-400",text:"text-blue-700 dark:text-blue-300"},operational:{icon:Ve.Z,background:"bg-green-50 dark:bg-green-900/20",borderColor:"border-green-500 dark:border-green-400",iconColor:"text-green-600 dark:text-green-400",text:"text-green-700 dark:text-green-300"},none:{icon:Us.Z,background:"bg-gray-50 dark:bg-gray-800/20",borderColor:"border-gray-500 dark:border-gray-400",iconColor:"text-gray-600 dark:text-gray-400",text:"text-gray-700 dark:text-gray-300"}},o=e=>{const t=new Date(e);return t.setHours(0,0,0,0),t},i=(0,l.Fl)((()=>{if(!t.announcements?.length)return{};const e={};let a=new Date;t.announcements.forEach((t=>{const s=new Date(t.timestamp),l=s.toDateString();e[l]=e[l]||[],e[l].push(t),s<a&&(a=s)}));const l=o(new Date),n=s.value?o(a):new Date(l.getTime()-12096e5),r={},i=l.toDateString();e[i]&&(r[i]=e[i]);for(let t=new Date(l.getTime()-864e5);t>=n;t.setDate(t.getDate()-1))r[t.toDateString()]=e[t.toDateString()]||[];return r})),u=(0,l.Fl)((()=>{if(!t.announcements?.length)return!1;const e=new Date(o(new Date).getTime()-12096e5);return t.announcements.some((t=>new Date(t.timestamp)<e))})),d=e=>a[e]?.icon||Us.Z,c=e=>a[e]||a.none,g=e=>{const t=new Date(e);return t.toLocaleDateString("en-US",{weekday:"long",year:"numeric",month:"long",day:"numeric"})},m=e=>new Date(e).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",hour12:!1}),p=e=>new Date(e).toLocaleString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"});return(t,a)=>e.announcements&&e.announcements.length?((0,l.wg)(),(0,l.iD)("div",Js,[a[3]||(a[3]=(0,l._)("h2",{class:"text-2xl font-semibold text-foreground mb-6"},"Past Announcements",-1)),(0,l._)("div",Xs,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(i.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t},[(0,l._)("div",Qs,[(0,l._)("h3",ea,(0,n.zw)(g(t)),1)]),e.length>0?((0,l.wg)(),(0,l.iD)("div",ta,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e,((e,s)=>((0,l.wg)(),(0,l.iD)("div",{key:`${t}-${s}-${e.timestamp}`,class:(0,n.C_)(["border-l-4 p-4 transition-all duration-200",c(e.type).background,c(e.type).borderColor])},[(0,l._)("div",sa,[((0,l.wg)(),(0,l.j4)((0,l.LL)(d(e.type)),{class:(0,n.C_)(["w-5 h-5 flex-shrink-0 mt-0.5",c(e.type).iconColor])},null,8,["class"])),(0,l._)("time",{class:(0,n.C_)(["text-sm font-mono whitespace-nowrap flex-shrink-0 mt-0.5",c(e.type).text]),title:p(e.timestamp)},(0,n.zw)(m(e.timestamp)),11,aa),(0,l._)("div",la,[(0,l._)("p",{class:"text-sm leading-relaxed text-gray-900 dark:text-gray-100",innerHTML:(0,r.SU)(js)(e.message)},null,8,na)])])],2)))),128))])):((0,l.wg)(),(0,l.iD)("div",ra,a[1]||(a[1]=[(0,l._)("p",{class:"text-sm italic text-muted-foreground/60"}," No incidents reported on this day ",-1)])))])))),128)),u.value&&!s.value?((0,l.wg)(),(0,l.iD)("div",oa,[(0,l._)("button",{onClick:a[0]||(a[0]=e=>s.value=!0),class:"inline-flex items-center gap-2 text-sm font-medium text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors duration-200 cursor-pointer group"},[(0,l.Wm)((0,r.SU)(Pe.Z),{class:"w-4 h-4 group-hover:translate-y-0.5 transition-transform duration-200"}),a[2]||(a[2]=(0,l._)("span",{class:"group-hover:underline"},"View older announcements",-1))])])):(0,l.kq)("",!0)])])):(0,l.kq)("",!0)}};const ua=ia;var da=ua;const ca={class:"dashboard-container bg-background"},ga={class:"container mx-auto px-4 py-8 max-w-7xl"},ma={class:"mb-6"},pa={class:"flex items-center justify-between mb-6"},va={class:"text-4xl font-bold tracking-tight"},fa={class:"text-muted-foreground mt-2"},wa={class:"flex items-center gap-4"},ha={key:0,class:"flex items-center justify-center py-20"},xa={key:1,class:"text-center py-20"},ba={class:"text-muted-foreground"},ya={key:2},ka={key:0,class:"space-y-6"},_a=["onClick"],Sa={class:"flex items-center gap-3"},Da={class:"text-xl font-semibold text-foreground"},Ua={class:"flex items-center gap-2"},Ca={key:0,class:"bg-red-600 text-white px-2 py-1 rounded-full text-sm font-medium"},za={key:0,class:"endpoint-group-content p-4"},Wa={key:0,class:"mb-4"},Ha={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},ja={key:1},Fa={key:0,class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},Ra={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Ta={key:1},$a={key:0,class:"mb-6"},Ea={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},qa={key:1},La={key:0,class:"text-lg font-semibold text-foreground mb-3"},Za={class:"grid gap-3 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3"},Aa={key:2,class:"mt-8 flex items-center justify-center gap-2"},Ma={class:"flex gap-1"},Na={key:3,class:"mt-12 pb-8"},Ya=96;var Ia={__name:"Home",props:{announcements:{type:Array,default:()=>[]}},emits:["showTooltip"],setup(e,{emit:t}){const s=e,a=(0,l.Fl)((()=>s.announcements?s.announcements.filter((e=>!e.archived)):[])),o=(0,l.Fl)((()=>s.announcements?s.announcements.filter((e=>e.archived)):[])),i=t,u=(0,r.iH)([]),d=(0,r.iH)([]),c=(0,r.iH)(!1),g=(0,r.iH)(1),m=(0,r.iH)(""),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)(!0),w=(0,r.iH)(!1),h=(0,r.iH)(localStorage.getItem("gatus:sort-by")||"name"),b=(0,r.iH)(new Set),y=(0,l.Fl)((()=>{let e=[...u.value];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success}))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===h.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,a=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&a?-1:s&&!a?1:e.name.localeCompare(t.name)})),e})),k=(0,l.Fl)((()=>{let e=[...d.value||[]];if(m.value){const t=m.value.toLowerCase();e=e.filter((e=>e.name.toLowerCase().includes(t)||e.group&&e.group.toLowerCase().includes(t)))}return p.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success))),v.value&&(e=e.filter((e=>!(!e.results||0===e.results.length)&&e.results.some((e=>!e.success))))),"health"===h.value&&e.sort(((e,t)=>{const s=e.results&&e.results.length>0&&e.results[e.results.length-1].success,a=t.results&&t.results.length>0&&t.results[t.results.length-1].success;return!s&&a?-1:s&&!a?1:e.name.localeCompare(t.name)})),e})),_=(0,l.Fl)((()=>Math.ceil((y.value.length+k.value.length)/Ya))),S=(0,l.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]=[]),e[s].push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),D=(0,l.Fl)((()=>{if(!w.value)return null;const e={};y.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].endpoints.push(t)})),k.value.forEach((t=>{const s=t.group||"No Group";e[s]||(e[s]={endpoints:[],suites:[]}),e[s].suites.push(t)}));const t=Object.keys(e).sort(((e,t)=>"No Group"===e?1:"No Group"===t?-1:e.localeCompare(t))),s={};return t.forEach((t=>{s[t]=e[t]})),s})),U=(0,l.Fl)((()=>{if(w.value)return S.value;const e=(g.value-1)*Ya,t=e+Ya;return y.value.slice(e,t)})),C=(0,l.Fl)((()=>{if(w.value)return k.value;const e=(g.value-1)*Ya,t=e+Ya;return k.value.slice(e,t)})),z=(0,l.Fl)((()=>{const e=[],t=5;let s=Math.max(1,g.value-Math.floor(t/2)),a=Math.min(_.value,s+t-1);a-s<t-1&&(s=Math.max(1,a-t+1));for(let l=s;l<=a;l++)e.push(l);return e})),W=async()=>{const e=0===u.value.length&&0===d.value.length;e&&(c.value=!0);try{const t=await fetch(`${Br}/api/v1/endpoints/statuses?page=1&pageSize=100`,{credentials:"include"});if(200===t.status){const e=await t.json();u.value=e}else console.error("[Home][fetchData] Error fetching endpoints:",await t.text());const s=await fetch(`${Br}/api/v1/suites/statuses?page=1&pageSize=100`,{credentials:"include"});if(200===s.status){const e=await s.json();d.value=e||[]}else console.error("[Home][fetchData] Error fetching suites:",await s.text()),d.value||(d.value=[])}catch(t){console.error("[Home][fetchData] Error:",t)}finally{e&&(c.value=!1)}},H=()=>{u.value=[],d.value=[],W()},j=e=>{m.value=e,g.value=1},F=e=>{g.value=e,window.scrollTo({top:0,behavior:"smooth"})},R=()=>{f.value=!f.value},T=(e,t,s="hover")=>{i("showTooltip",e,t,s)},$=e=>e.filter((e=>{if(!e.results||0===e.results.length)return!1;const t=e.results[e.results.length-1];return!t.success})).length,E=e=>e.filter((e=>!(!e.results||0===e.results.length)&&!e.results[e.results.length-1].success)).length,q=e=>{b.value.has(e)?b.value.delete(e):b.value.add(e);const t=Array.from(b.value);localStorage.setItem("gatus:uncollapsed-groups",JSON.stringify(t)),localStorage.removeItem("gatus:collapsed-groups")},L=()=>{try{const e=localStorage.getItem("gatus:uncollapsed-groups");e&&(b.value=new Set(JSON.parse(e)))}catch(e){console.warn("Failed to parse saved uncollapsed groups:",e),localStorage.removeItem("gatus:uncollapsed-groups")}},Z=(0,l.Fl)((()=>window.config&&window.config.dashboardHeading&&"{{ .UI.DashboardHeading }}"!==window.config.dashboardHeading?window.config.dashboardHeading:"Health Dashboard")),A=(0,l.Fl)((()=>window.config&&window.config.dashboardSubheading&&"{{ .UI.dashboardSubheading }}"!==window.config.dashboardSubheading?window.config.dashboardSubheading:"Monitor the health of your endpoints in real-time"));return(0,l.bv)((()=>{W()})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",ca,[(0,l._)("div",ga,[(0,l._)("div",ma,[(0,l._)("div",pa,[(0,l._)("div",null,[(0,l._)("h1",va,(0,n.zw)(Z.value),1),(0,l._)("p",fa,(0,n.zw)(A.value),1)]),(0,l._)("div",wa,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:R,title:f.value?"Show min-max response time":"Show average response time"},{default:(0,l.w5)((()=>[f.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ne.Z),{key:0,class:"h-5 w-5"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ye.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:H,title:"Refresh data"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"h-5 w-5"})])),_:1})])]),(0,l.Wm)(Gs,{announcements:a.value},null,8,["announcements"]),(0,l.Wm)(os,{onSearch:j,"onUpdate:showOnlyFailing":t[0]||(t[0]=e=>p.value=e),"onUpdate:showRecentFailures":t[1]||(t[1]=e=>v.value=e),"onUpdate:groupByGroup":t[2]||(t[2]=e=>w.value=e),"onUpdate:sortBy":t[3]||(t[3]=e=>h.value=e),onInitializeCollapsedGroups:L})]),c.value?((0,l.wg)(),(0,l.iD)("div",ha,[(0,l.Wm)(de,{size:"lg"})])):0===y.value.length&&0===k.value.length?((0,l.wg)(),(0,l.iD)("div",xa,[(0,l.Wm)((0,r.SU)(Oe.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[6]||(t[6]=(0,l._)("h3",{class:"text-lg font-semibold mb-2"},"No endpoints or suites found",-1)),(0,l._)("p",ba,(0,n.zw)(m.value||p.value||v.value?"Try adjusting your filters":"No endpoints or suites are configured"),1)])):((0,l.wg)(),(0,l.iD)("div",ya,[w.value?((0,l.wg)(),(0,l.iD)("div",ka,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(D.value,((e,s)=>((0,l.wg)(),(0,l.iD)("div",{key:s,class:"endpoint-group border rounded-lg overflow-hidden"},[(0,l._)("div",{onClick:e=>q(s),class:"endpoint-group-header flex items-center justify-between p-4 bg-card border-b cursor-pointer hover:bg-accent/50 transition-colors"},[(0,l._)("div",Sa,[b.value.has(s)?((0,l.wg)(),(0,l.j4)((0,r.SU)(Pe.Z),{key:0,class:"h-5 w-5 text-muted-foreground"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ke.Z),{key:1,class:"h-5 w-5 text-muted-foreground"})),(0,l._)("h2",Da,(0,n.zw)(s),1)]),(0,l._)("div",Ua,[$(e.endpoints)+E(e.suites)>0?((0,l.wg)(),(0,l.iD)("span",Ca,(0,n.zw)($(e.endpoints)+E(e.suites)),1)):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ve.Z),{key:1,class:"h-6 w-6 text-green-600"}))])],8,_a),b.value.has(s)?((0,l.wg)(),(0,l.iD)("div",za,[e.suites.length>0?((0,l.wg)(),(0,l.iD)("div",Wa,[t[7]||(t[7]=(0,l._)("h3",{class:"text-sm font-semibold text-muted-foreground uppercase tracking-wider mb-3"},"Suites",-1)),(0,l._)("div",Ha,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.suites,(e=>((0,l.wg)(),(0,l.j4)(qt,{key:e.key,suite:e,maxResults:50,onShowTooltip:T},null,8,["suite"])))),128))])])):(0,l.kq)("",!0),e.endpoints.length>0?((0,l.wg)(),(0,l.iD)("div",ja,[e.suites.length>0?((0,l.wg)(),(0,l.iD)("h3",Fa,"Endpoints")):(0,l.kq)("",!0),(0,l._)("div",Ra,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.endpoints,(e=>((0,l.wg)(),(0,l.j4)(xt,{key:e.key,endpoint:e,maxResults:50,showAverageResponseTime:f.value,onShowTooltip:T},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,l.kq)("",!0)])):(0,l.kq)("",!0)])))),128))])):((0,l.wg)(),(0,l.iD)("div",Ta,[k.value.length>0?((0,l.wg)(),(0,l.iD)("div",$a,[t[8]||(t[8]=(0,l._)("h2",{class:"text-lg font-semibold text-foreground mb-3"},"Suites",-1)),(0,l._)("div",Ea,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(C.value,(e=>((0,l.wg)(),(0,l.j4)(qt,{key:e.key,suite:e,maxResults:50,onShowTooltip:T},null,8,["suite"])))),128))])])):(0,l.kq)("",!0),y.value.length>0?((0,l.wg)(),(0,l.iD)("div",qa,[k.value.length>0?((0,l.wg)(),(0,l.iD)("h2",La,"Endpoints")):(0,l.kq)("",!0),(0,l._)("div",Za,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(U.value,(e=>((0,l.wg)(),(0,l.j4)(xt,{key:e.key,endpoint:e,maxResults:50,showAverageResponseTime:f.value,onShowTooltip:T},null,8,["endpoint","showAverageResponseTime"])))),128))])])):(0,l.kq)("",!0)])),!w.value&&_.value>1?((0,l.wg)(),(0,l.iD)("div",Aa,[(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"icon",disabled:1===g.value,onClick:t[4]||(t[4]=e=>F(g.value-1))},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"]),(0,l._)("div",Ma,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(z.value,(e=>((0,l.wg)(),(0,l.j4)((0,r.SU)(x),{key:e,variant:e===g.value?"default":"outline",size:"sm",onClick:t=>F(e)},{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)(e),1)])),_:2},1032,["variant","onClick"])))),128))]),(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"icon",disabled:g.value===_.value,onClick:t[5]||(t[5]=e=>F(g.value+1))},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4"})])),_:1},8,["disabled"])])):(0,l.kq)("",!0)])),o.value.length>0?((0,l.wg)(),(0,l.iD)("div",Na,[(0,l.Wm)(da,{announcements:o.value},null,8,["announcements"])])):(0,l.kq)("",!0)]),(0,l.Wm)(ks,{onRefreshData:W})]))}};const Oa=Ia;var Pa=Oa,Ka=s(318),Va=s(779),Ba=s(141),Ga=s(478);const Ja={class:"flex items-center justify-between"},Xa={class:"text-sm text-muted-foreground"};var Qa={__name:"Pagination",props:{numberOfResultsPerPage:Number,currentPageProp:{type:Number,default:1}},emits:["page"],setup(e,{emit:t}){const s=e,a=t,o=(0,r.iH)(s.currentPageProp),i=(0,l.Fl)((()=>{let e=100;if("undefined"!==typeof window&&window.config&&window.config.maximumNumberOfResults){const t=parseInt(window.config.maximumNumberOfResults);isNaN(t)||(e=t)}return Math.ceil(e/s.numberOfResultsPerPage)})),u=()=>{o.value--,a("page",o.value)},d=()=>{o.value++,a("page",o.value)};return(e,t)=>((0,l.wg)(),(0,l.iD)("div",Ja,[(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"sm",disabled:o.value>=i.value,onClick:d,class:"flex items-center gap-1"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Be.Z),{class:"h-4 w-4"}),t[0]||(t[0]=(0,l.Uk)(" Previous ",-1))])),_:1,__:[0]},8,["disabled"]),(0,l._)("span",Xa," Page "+(0,n.zw)(o.value)+" of "+(0,n.zw)(i.value),1),(0,l.Wm)((0,r.SU)(x),{variant:"outline",size:"sm",disabled:o.value<=1,onClick:u,class:"flex items-center gap-1"},{default:(0,l.w5)((()=>[t[1]||(t[1]=(0,l.Uk)(" Next ",-1)),(0,l.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4"})])),_:1,__:[1]},8,["disabled"])]))}};const el=Qa;var tl=el,sl=s(334),al=s(148),ll=s(282);s(210);const nl={class:"relative w-full",style:{height:"300px"}},rl={key:0,class:"absolute inset-0 flex items-center justify-center bg-background/50"},ol={key:1,class:"absolute inset-0 flex items-center justify-center text-muted-foreground"};var il={__name:"ResponseTimeChart",props:{endpointKey:{type:String,required:!0},duration:{type:String,required:!0,validator:e=>["24h","7d","30d"].includes(e)},serverUrl:{type:String,default:".."},events:{type:Array,default:()=>[]}},setup(e){al.kL.register(al.uw,al.f$,al.od,al.jn,al.Dx,al.u,al.De,al.Gu,al.FB,ll.Z);const t=e,s=(0,r.iH)(!0),a=(0,r.iH)(null),o=(0,r.iH)([]),i=(0,r.iH)([]),u=(0,r.iH)(document.documentElement.classList.contains("dark")),d=(0,r.iH)(null),c=()=>"rgba(239, 68, 68, 0.8)",g=(0,l.Fl)((()=>{if(!t.events||0===t.events.length)return[];const e=new Date;let s;switch(t.duration){case"24h":s=new Date(e.getTime()-864e5);break;case"7d":s=new Date(e.getTime()-6048e5);break;case"30d":s=new Date(e.getTime()-2592e6);break;default:return[]}const a=[];for(let l=0;l<t.events.length;l++){const n=t.events[l];if("UNHEALTHY"!==n.type)continue;const r=new Date(n.timestamp);if(r<s||r>e)continue;let o=null,i=!1;if(l+1<t.events.length){const e=t.events[l+1];o=Z(e.timestamp,n.timestamp)}else o=Z(e,n.timestamp),i=!0;a.push({...n,duration:o,isOngoing:i})}return a})),m=(0,l.Fl)((()=>{if(0===o.value.length)return{labels:[],datasets:[]};const e=o.value.map((e=>new Date(e)));return{labels:e,datasets:[{label:"Response Time (ms)",data:i.value,borderColor:u.value?"rgb(96, 165, 250)":"rgb(59, 130, 246)",backgroundColor:u.value?"rgba(96, 165, 250, 0.1)":"rgba(59, 130, 246, 0.1)",borderWidth:2,pointRadius:2,pointHoverRadius:4,tension:.1,fill:!0}]}})),p=(0,l.Fl)((()=>{d.value;const e=i.value.length>0?Math.max(...i.value):0,s=e/2;return{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{display:!1},tooltip:{backgroundColor:u.value?"rgba(31, 41, 55, 0.95)":"rgba(255, 255, 255, 0.95)",titleColor:u.value?"#f9fafb":"#111827",bodyColor:u.value?"#d1d5db":"#374151",borderColor:u.value?"#4b5563":"#e5e7eb",borderWidth:1,padding:12,displayColors:!1,callbacks:{title:e=>{if(e.length>0){const t=new Date(e[0].parsed.x);return t.toLocaleString()}return""},label:e=>{const t=e.parsed.y;return`${t}ms`}}},annotation:{annotations:g.value.reduce(((e,t,a)=>{const l=new Date(t.timestamp).getTime();let n=0;if(o.value.length>0&&i.value.length>0){const e=o.value.reduce(((e,t,s)=>{const a=new Date(t).getTime(),n=Math.abs(a-l),r=Math.abs(new Date(o.value[e]).getTime()-l);return n<r?s:e}),0);n=i.value[e]}const r=n<=s?"end":"start";return e[`event-${a}`]={type:"line",xMin:new Date(t.timestamp),xMax:new Date(t.timestamp),borderColor:c(),borderWidth:1,borderDash:[5,5],enter(){d.value=a},leave(){d.value=null},label:{display:()=>d.value===a,content:[t.isOngoing?"Status: ONGOING":"Status: RESOLVED",`Unhealthy for ${t.duration}`,`Started at ${new Date(t.timestamp).toLocaleString()}`],backgroundColor:c(),color:"#ffffff",font:{size:11},padding:6,position:r}},e}),{})}},scales:{x:{type:"time",time:{unit:"24h"===t.duration?"hour":(t.duration,"day"),displayFormats:{hour:"MMM d, ha",day:"MMM d"}},grid:{color:u.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:u.value?"#9ca3af":"#6b7280",maxRotation:0,autoSkipPadding:20}},y:{beginAtZero:!0,grid:{color:u.value?"rgba(75, 85, 99, 0.3)":"rgba(229, 231, 235, 0.8)",drawBorder:!1},ticks:{color:u.value?"#9ca3af":"#6b7280",callback:e=>`${e}ms`}}}}})),v=async()=>{s.value=!0,a.value=null;try{const e=await fetch(`${t.serverUrl}/api/v1/endpoints/${t.endpointKey}/response-times/${t.duration}/history`,{credentials:"include"});if(200===e.status){const t=await e.json();o.value=t.timestamps||[],i.value=t.values||[]}else a.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",await e.text())}catch(e){a.value="Failed to load chart data",console.error("[ResponseTimeChart] Error:",e)}finally{s.value=!1}};return(0,l.YP)((()=>t.duration),(()=>{v()})),(0,l.bv)((()=>{v();const e=new MutationObserver((()=>{u.value=document.documentElement.classList.contains("dark")}));e.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),(0,l.Ah)((()=>e.disconnect()))})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",nl,[s.value?((0,l.wg)(),(0,l.iD)("div",rl,[(0,l.Wm)(de)])):a.value?((0,l.wg)(),(0,l.iD)("div",ol,(0,n.zw)(a.value),1)):((0,l.wg)(),(0,l.j4)((0,r.SU)(sl.x1),{key:2,data:m.value,options:p.value},null,8,["data","options"]))]))}};const ul=il;var dl=ul;const cl={class:"dashboard-container bg-background"},gl={class:"container mx-auto px-4 py-8 max-w-7xl"},ml={class:"mb-6"},pl={key:0,class:"space-y-6"},vl={class:"flex items-start justify-between"},fl={class:"text-4xl font-bold tracking-tight"},wl={class:"flex items-center gap-3 text-muted-foreground mt-2"},hl={key:0},xl={key:1},bl={key:2},yl={class:"grid gap-6 md:grid-cols-2 lg:grid-cols-4"},kl={class:"text-2xl font-bold"},_l={class:"text-2xl font-bold"},Sl={class:"text-2xl font-bold"},Dl={class:"text-2xl font-bold"},Ul={class:"flex items-center justify-between"},Cl={class:"flex items-center gap-2"},zl={class:"space-y-4"},Wl={key:1,class:"pt-4 border-t"},Hl={key:0,class:"space-y-6"},jl={class:"flex items-center justify-between"},Fl={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},Rl=["src","alt"],Tl={class:"grid gap-4 md:grid-cols-2 lg:grid-cols-4"},$l={class:"text-sm text-muted-foreground mb-2"},El=["src","alt"],ql={class:"text-center"},Ll=["src"],Zl={class:"space-y-4"},Al={class:"mt-1"},Ml={class:"flex-1"},Nl={class:"font-medium"},Yl={class:"text-sm text-muted-foreground"},Il={key:1,class:"flex items-center justify-center py-20"};var Ol={__name:"EndpointDetails",emits:["showTooltip"],setup(e,{emit:t}){const s=(0,i.tv)(),o=(0,i.yj)(),u=t,d=(0,r.iH)(null),c=(0,r.iH)(null),g=(0,r.iH)([]),m=(0,r.iH)(1),p=(0,r.iH)(!1),v=(0,r.iH)(!1),f=(0,r.iH)("24h"),w="."===Br?"..":Br,h=(0,r.iH)(!1),b=(0,l.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?c.value.results[c.value.results.length-1]:null)),y=(0,l.Fl)((()=>b.value?b.value.success?"healthy":"unhealthy":"unknown")),_=(0,l.Fl)((()=>b.value?.hostname||null)),S=(0,l.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=0,t=0;for(const s of d.value.results)s.duration&&(e+=s.duration,t++);return 0===t?"N/A":Math.round(e/t/1e6)})),U=(0,l.Fl)((()=>{if(!d.value||!d.value.results||0===d.value.results.length)return"N/A";let e=1/0,t=0,s=!1;for(const n of d.value.results)if(n.duration){const a=n.duration/1e6;e=Math.min(e,a),t=Math.max(t,a),s=!0}if(!s)return"N/A";const a=Math.round(e),l=Math.round(t);return a===l?`${a}ms`:`${a}-${l}ms`})),C=(0,l.Fl)((()=>c.value&&c.value.results&&0!==c.value.results.length?L(c.value.results[c.value.results.length-1].timestamp):"Never")),W=async()=>{h.value=!0;try{const e=await fetch(`${w}/api/v1/endpoints/${o.params.key}/statuses?page=${m.value}&pageSize=50`,{credentials:"include"});if(200===e.status){const t=await e.json();d.value=t,1===m.value&&(c.value=t);let s=[];if(t.events&&t.events.length>0)for(let e=t.events.length-1;e>=0;e--){let a=t.events[e];if(e===t.events.length-1)"UNHEALTHY"===a.type?a.fancyText="Endpoint is unhealthy":"HEALTHY"===a.type?a.fancyText="Endpoint is healthy":"START"===a.type&&(a.fancyText="Monitoring started");else{let s=t.events[e+1];"HEALTHY"===a.type?a.fancyText="Endpoint became healthy":"UNHEALTHY"===a.type?a.fancyText=s?"Endpoint was unhealthy for "+Z(s.timestamp,a.timestamp):"Endpoint became unhealthy":"START"===a.type&&(a.fancyText="Monitoring started")}a.fancyTimeAgo=L(a.timestamp),s.push(a)}if(g.value=s,t.results&&t.results.length>0)for(let e=0;e<t.results.length;e++)if(t.results[e].duration>0){p.value=!0;break}}else console.error("[Details][fetchData] Error:",await e.text())}catch(e){console.error("[Details][fetchData] Error:",e)}finally{h.value=!1}},H=()=>{s.push("/")},F=e=>{m.value=e,W()},R=(e,t,s="hover")=>{u("showTooltip",e,t,s)},T=e=>new Date(e).toLocaleString(),$=()=>`${w}/api/v1/endpoints/${d.value.key}/health/badge.svg`,E=e=>`${w}/api/v1/endpoints/${d.value.key}/uptimes/${e}/badge.svg`,q=e=>`${w}/api/v1/endpoints/${d.value.key}/response-times/${e}/badge.svg`;return(0,l.bv)((()=>{W()})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",cl,[(0,l._)("div",gl,[(0,l._)("div",ml,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",class:"mb-4",onClick:H},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ka.Z),{class:"h-4 w-4 mr-2"}),t[2]||(t[2]=(0,l.Uk)(" Back to Dashboard ",-1))])),_:1,__:[2]}),d.value&&d.value.name?((0,l.wg)(),(0,l.iD)("div",pl,[(0,l._)("div",vl,[(0,l._)("div",null,[(0,l._)("h1",fl,(0,n.zw)(d.value.name),1),(0,l._)("div",wl,[d.value.group?((0,l.wg)(),(0,l.iD)("span",hl,"Group: "+(0,n.zw)(d.value.group),1)):(0,l.kq)("",!0),d.value.group&&_.value?((0,l.wg)(),(0,l.iD)("span",xl,"•")):(0,l.kq)("",!0),_.value?((0,l.wg)(),(0,l.iD)("span",bl,(0,n.zw)(_.value),1)):(0,l.kq)("",!0)])]),(0,l.Wm)(st,{status:y.value},null,8,["status"])]),(0,l._)("div",yl,[(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[3]||(t[3]=[(0,l.Uk)("Current Status",-1)]))),_:1,__:[3]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",kl,(0,n.zw)("healthy"===y.value?"Operational":"Issues Detected"),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[4]||(t[4]=[(0,l.Uk)("Avg Response Time",-1)]))),_:1,__:[4]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",_l,(0,n.zw)(S.value)+"ms",1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[5]||(t[5]=[(0,l.Uk)("Response Time Range",-1)]))),_:1,__:[5]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Sl,(0,n.zw)(U.value),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground"},{default:(0,l.w5)((()=>t[6]||(t[6]=[(0,l.Uk)("Last Check",-1)]))),_:1,__:[6]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Dl,(0,n.zw)(C.value),1)])),_:1})])),_:1})]),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l._)("div",Ul,[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[7]||(t[7]=[(0,l.Uk)("Recent Checks",-1)]))),_:1,__:[7]}),(0,l._)("div",Cl,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:t[0]||(t[0]=e=>v.value=!v.value),title:v.value?"Show min-max response time":"Show average response time"},{default:(0,l.w5)((()=>[v.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ne.Z),{key:0,class:"h-5 w-5"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ye.Z),{key:1,class:"h-5 w-5"}))])),_:1},8,["title"]),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:W,title:"Refresh data",disabled:h.value},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ie.Z),{class:(0,n.C_)(["h-4 w-4",h.value&&"animate-spin"])},null,8,["class"])])),_:1},8,["disabled"])])])])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",zl,[d.value?((0,l.wg)(),(0,l.j4)(xt,{key:0,endpoint:d.value,maxResults:50,showAverageResponseTime:v.value,onShowTooltip:R,class:"border-0 shadow-none bg-transparent p-0"},null,8,["endpoint","showAverageResponseTime"])):(0,l.kq)("",!0),d.value&&d.value.key?((0,l.wg)(),(0,l.iD)("div",Wl,[(0,l.Wm)(tl,{onPage:F,numberOfResultsPerPage:50,currentPageProp:m.value},null,8,["currentPageProp"])])):(0,l.kq)("",!0)])])),_:1})])),_:1}),p.value?((0,l.wg)(),(0,l.iD)("div",Hl,[(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l._)("div",jl,[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[8]||(t[8]=[(0,l.Uk)("Response Time Trend",-1)]))),_:1,__:[8]}),(0,l.wy)((0,l._)("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>f.value=e),class:"text-sm bg-background border rounded-md px-3 py-1 focus:outline-none focus:ring-2 focus:ring-ring"},t[9]||(t[9]=[(0,l._)("option",{value:"24h"},"24 hours",-1),(0,l._)("option",{value:"7d"},"7 days",-1),(0,l._)("option",{value:"30d"},"30 days",-1)]),512),[[a.bM,f.value]])])])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[d.value&&d.value.key?((0,l.wg)(),(0,l.j4)(dl,{key:0,endpointKey:d.value.key,duration:f.value,serverUrl:(0,r.SU)(w),events:d.value.events||[]},null,8,["endpointKey","duration","serverUrl","events"])):(0,l.kq)("",!0)])),_:1})])),_:1}),(0,l._)("div",Fl,[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(["30d","7d","24h","1h"],(e=>(0,l.Wm)((0,r.SU)(k),{key:e},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),{class:"pb-2"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),{class:"text-sm font-medium text-muted-foreground text-center"},{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1)])),_:2},1024)])),_:2},1024),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("img",{src:q(e),alt:`${e} response time`,class:"mx-auto mt-2"},null,8,Rl)])),_:2},1024)])),_:2},1024))),64))])])):(0,l.kq)("",!0),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[10]||(t[10]=[(0,l.Uk)("Uptime Statistics",-1)]))),_:1,__:[10]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Tl,[((0,l.wg)(),(0,l.iD)(l.HY,null,(0,l.Ko)(["30d","7d","24h","1h"],(e=>(0,l._)("div",{key:e,class:"text-center"},[(0,l._)("p",$l,(0,n.zw)("30d"===e?"Last 30 days":"7d"===e?"Last 7 days":"24h"===e?"Last 24 hours":"Last hour"),1),(0,l._)("img",{src:E(e),alt:`${e} uptime`,class:"mx-auto"},null,8,El)]))),64))])])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[11]||(t[11]=[(0,l.Uk)("Current Health",-1)]))),_:1,__:[11]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",ql,[(0,l._)("img",{src:$(),alt:"health badge",class:"mx-auto"},null,8,Ll)])])),_:1})])),_:1}),g.value&&g.value.length>0?((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{key:1},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[12]||(t[12]=[(0,l.Uk)("Events",-1)]))),_:1,__:[12]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",Zl,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(g.value,(e=>((0,l.wg)(),(0,l.iD)("div",{key:e.timestamp,class:"flex items-start gap-4 pb-4 border-b last:border-0"},[(0,l._)("div",Al,["HEALTHY"===e.type?((0,l.wg)(),(0,l.j4)((0,r.SU)(Va.Z),{key:0,class:"h-5 w-5 text-green-500"})):"UNHEALTHY"===e.type?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ba.Z),{key:1,class:"h-5 w-5 text-red-500"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(Ga.Z),{key:2,class:"h-5 w-5 text-muted-foreground"}))]),(0,l._)("div",Ml,[(0,l._)("p",Nl,(0,n.zw)(e.fancyText),1),(0,l._)("p",Yl,(0,n.zw)(T(e.timestamp))+" • "+(0,n.zw)(e.fancyTimeAgo),1)])])))),128))])])),_:1})])),_:1})):(0,l.kq)("",!0)])):((0,l.wg)(),(0,l.iD)("div",Il,[(0,l.Wm)(de,{size:"lg"})]))])]),(0,l.Wm)(ks,{onRefreshData:W})]))}};const Pl=Ol;var Kl=Pl,Vl=s(469),Bl=s(399),Gl=s(167);const Jl=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`},Xl={class:"relative flex-shrink-0"},Ql={class:"flex-1 min-w-0 pt-1"},en={class:"flex items-center justify-between gap-2 mb-1"},tn={class:"font-medium text-sm truncate"},sn={class:"text-xs text-muted-foreground whitespace-nowrap"},an={class:"flex flex-wrap gap-1"},ln={key:0,class:"inline-flex items-center gap-1 px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200 rounded-md"},nn={key:1,class:"inline-flex items-center px-2 py-1 text-xs font-medium bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 rounded-md"};var rn={__name:"FlowStep",props:{step:{type:Object,required:!0},index:{type:Number,required:!0},isLast:{type:Boolean,default:!1},previousStep:{type:Object,default:null}},emits:["step-click"],setup(e){const t=e,s=(0,l.Fl)((()=>{switch(t.step.status){case"success":return Ve.Z;case"failed":return _s.Z;case"skipped":return Vl.Z;case"not-started":return Gl.Z;default:return Gl.Z}})),a=(0,l.Fl)((()=>{const e="border-2";if(t.step.isAlwaysRun)switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600 ring-2 ring-blue-200 dark:ring-blue-800`;case"failed":return`${e} bg-red-500 text-white border-red-600 ring-2 ring-blue-200 dark:ring-blue-800`;default:return`${e} bg-blue-500 text-white border-blue-600 ring-2 ring-blue-200 dark:ring-blue-800`}switch(t.step.status){case"success":return`${e} bg-green-500 text-white border-green-600`;case"failed":return`${e} bg-red-500 text-white border-red-600`;case"skipped":return`${e} bg-gray-400 text-white border-gray-500`;case"not-started":return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`;default:return`${e} bg-gray-200 text-gray-500 border-gray-300 dark:bg-gray-700 dark:text-gray-400 dark:border-gray-600`}})),o=(0,l.Fl)((()=>{if(!t.previousStep)return"bg-gray-300 dark:bg-gray-600";if("skipped"===t.step.status)return"border-l-2 border-dashed border-gray-400 bg-transparent";switch(t.previousStep.status){case"success":return"bg-green-500";case"failed":return"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}})),i=(0,l.Fl)((()=>{const e=t.step.nextStepStatus;switch(t.step.status){case"success":return"skipped"===e?"bg-gray-300 dark:bg-gray-600":"bg-green-500";case"failed":return"skipped"===e?"border-l-2 border-dashed border-gray-400 bg-transparent":"bg-red-500";default:return"bg-gray-300 dark:bg-gray-600"}}));return(t,u)=>((0,l.wg)(),(0,l.iD)("div",{class:"flex items-start gap-4 relative group hover:bg-accent/30 rounded-lg p-2 -m-2 transition-colors cursor-pointer",onClick:u[0]||(u[0]=e=>t.$emit("step-click"))},[(0,l._)("div",Xl,[e.index>0?((0,l.wg)(),(0,l.iD)("div",{key:0,class:(0,n.C_)([o.value,"absolute left-1/2 bottom-8 w-0.5 h-4 -translate-x-px"])},null,2)):(0,l.kq)("",!0),(0,l._)("div",{class:(0,n.C_)([a.value,"w-8 h-8 rounded-full flex items-center justify-center"])},[((0,l.wg)(),(0,l.j4)((0,l.LL)(s.value),{class:"w-4 h-4"}))],2),e.isLast?(0,l.kq)("",!0):((0,l.wg)(),(0,l.iD)("div",{key:1,class:(0,n.C_)([i.value,"absolute left-1/2 top-8 w-0.5 h-4 -translate-x-px"])},null,2))]),(0,l._)("div",Ql,[(0,l._)("div",en,[(0,l._)("h4",tn,(0,n.zw)(e.step.name),1),(0,l._)("span",sn,(0,n.zw)((0,r.SU)(Jl)(e.step.duration)),1)]),(0,l._)("div",an,[e.step.isAlwaysRun?((0,l.wg)(),(0,l.iD)("span",ln,[(0,l.Wm)((0,r.SU)(Bl.Z),{class:"w-3 h-3"}),u[1]||(u[1]=(0,l.Uk)(" Always Run ",-1))])):(0,l.kq)("",!0),e.step.errors?.length?((0,l.wg)(),(0,l.iD)("span",nn,(0,n.zw)(e.step.errors.length)+" error"+(0,n.zw)(1!==e.step.errors.length?"s":""),1)):(0,l.kq)("",!0)])])]))}};const on=rn;var un=on;const dn={class:"space-y-4"},cn={class:"flex items-center gap-4"},gn={class:"flex-1 h-1 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden"},mn={class:"flex items-center justify-between text-xs text-muted-foreground"},pn={key:0},vn={class:"space-y-2"},fn={class:"mt-6 pt-4 border-t"},wn={class:"grid grid-cols-2 md:grid-cols-4 gap-3 text-xs"},hn={key:0,class:"flex items-center gap-2"},xn={class:"w-4 h-4 rounded-full bg-green-500 flex items-center justify-center"},bn={key:1,class:"flex items-center gap-2"},yn={class:"w-4 h-4 rounded-full bg-red-500 flex items-center justify-center"},kn={key:2,class:"flex items-center gap-2"},_n={class:"w-4 h-4 rounded-full bg-gray-400 flex items-center justify-center"},Sn={key:3,class:"flex items-center gap-2"},Dn={class:"w-4 h-4 rounded-full bg-blue-500 border-2 border-blue-200 dark:border-blue-800 flex items-center justify-center"};var Un={__name:"SequentialFlowDiagram",props:{flowSteps:{type:Array,default:()=>[]},progressPercentage:{type:Number,default:0},completedSteps:{type:Number,default:0},totalSteps:{type:Number,default:0}},emits:["step-selected"],setup(e){const t=e,s=(0,l.Fl)((()=>t.completedSteps)),a=(0,l.Fl)((()=>t.totalSteps)),o=(0,l.Fl)((()=>t.flowSteps.reduce(((e,t)=>e+(t.duration||0)),0))),i=(0,l.Fl)((()=>t.flowSteps.some((e=>"success"===e.status)))),u=(0,l.Fl)((()=>t.flowSteps.some((e=>"failed"===e.status)))),d=(0,l.Fl)((()=>t.flowSteps.some((e=>"skipped"===e.status)))),c=(0,l.Fl)((()=>t.flowSteps.some((e=>!0===e.isAlwaysRun))));return(t,g)=>((0,l.wg)(),(0,l.iD)("div",dn,[(0,l._)("div",cn,[g[0]||(g[0]=(0,l._)("div",{class:"text-sm font-medium text-muted-foreground"},"Start",-1)),(0,l._)("div",gn,[(0,l._)("div",{class:"h-full bg-green-500 dark:bg-green-600 rounded-full transition-all duration-300 ease-out",style:(0,n.j5)({width:e.progressPercentage+"%"})},null,4)]),g[1]||(g[1]=(0,l._)("div",{class:"text-sm font-medium text-muted-foreground"},"End",-1))]),(0,l._)("div",mn,[(0,l._)("span",null,(0,n.zw)(s.value)+"/"+(0,n.zw)(a.value)+" steps successful",1),o.value>0?((0,l.wg)(),(0,l.iD)("span",pn,(0,n.zw)((0,r.SU)(Jl)(o.value))+" total",1)):(0,l.kq)("",!0)]),(0,l._)("div",vn,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.flowSteps,((s,a)=>((0,l.wg)(),(0,l.j4)(un,{key:a,step:s,index:a,"is-last":a===e.flowSteps.length-1,"previous-step":a>0?e.flowSteps[a-1]:null,onStepClick:e=>t.$emit("step-selected",s,a)},null,8,["step","index","is-last","previous-step","onStepClick"])))),128))]),(0,l._)("div",fn,[g[6]||(g[6]=(0,l._)("div",{class:"text-sm font-medium text-muted-foreground mb-2"},"Status Legend",-1)),(0,l._)("div",wn,[i.value?((0,l.wg)(),(0,l.iD)("div",hn,[(0,l._)("div",xn,[(0,l.Wm)((0,r.SU)(Ve.Z),{class:"w-3 h-3 text-white"})]),g[2]||(g[2]=(0,l._)("span",{class:"text-muted-foreground"},"Success",-1))])):(0,l.kq)("",!0),u.value?((0,l.wg)(),(0,l.iD)("div",bn,[(0,l._)("div",yn,[(0,l.Wm)((0,r.SU)(_s.Z),{class:"w-3 h-3 text-white"})]),g[3]||(g[3]=(0,l._)("span",{class:"text-muted-foreground"},"Failed",-1))])):(0,l.kq)("",!0),d.value?((0,l.wg)(),(0,l.iD)("div",kn,[(0,l._)("div",_n,[(0,l.Wm)((0,r.SU)(Vl.Z),{class:"w-3 h-3 text-white"})]),g[4]||(g[4]=(0,l._)("span",{class:"text-muted-foreground"},"Skipped",-1))])):(0,l.kq)("",!0),c.value?((0,l.wg)(),(0,l.iD)("div",Sn,[(0,l._)("div",Dn,[(0,l.Wm)((0,r.SU)(Bl.Z),{class:"w-3 h-3 text-white"})]),g[5]||(g[5]=(0,l._)("span",{class:"text-muted-foreground"},"Always Run",-1))])):(0,l.kq)("",!0)])])]))}};const Cn=Un;var zn=Cn,Wn=s(293),Hn=s(322),jn=s(740);const Fn={class:"flex items-center justify-between p-4 border-b"},Rn={class:"text-lg font-semibold flex items-center gap-2"},Tn={class:"text-sm text-muted-foreground mt-1"},$n={class:"p-4 space-y-4 overflow-y-auto max-h-[60vh]"},En={key:0,class:"flex flex-wrap gap-2"},qn={class:"flex items-center gap-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/30 rounded-lg border border-blue-200 dark:border-blue-700"},Ln={key:1,class:"space-y-2"},Zn={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},An={class:"space-y-2"},Mn={key:2,class:"space-y-2"},Nn={class:"text-sm font-medium flex items-center gap-2"},Yn={class:"text-xs font-mono text-muted-foreground"},In={key:3,class:"space-y-2"},On={class:"text-sm font-medium flex items-center gap-2"},Pn={class:"grid grid-cols-2 gap-4 text-xs"},Kn={class:"font-mono mt-1"},Vn={key:4,class:"space-y-2"},Bn={class:"text-sm font-medium flex items-center gap-2"},Gn={class:"space-y-2 max-h-48 overflow-y-auto"},Jn={class:"flex-shrink-0 mt-0.5"},Xn={class:"flex-1 min-w-0 flex items-center justify-between gap-3"},Qn={key:5,class:"space-y-2"},er={class:"text-sm font-medium flex items-center gap-2"},tr={class:"space-y-3 text-xs"},sr={key:0},ar={class:"font-mono mt-1 break-all"},lr={key:1},nr={class:"mt-1 font-medium"},rr={key:2},or={class:"mt-1"},ir={key:3},ur={class:"mt-1"},dr={key:6,class:"space-y-2"},cr={class:"text-sm font-medium flex items-center gap-2 text-red-600 dark:text-red-400"},gr={class:"space-y-2 max-h-32 overflow-y-auto"};var mr={__name:"StepDetailsModal",props:{step:{type:Object,required:!0},index:{type:Number,required:!0}},emits:["close"],setup(e){const t=e,s=(0,l.Fl)((()=>{switch(t.step.status){case"success":return Ve.Z;case"failed":return _s.Z;case"skipped":return Vl.Z;case"not-started":return Gl.Z;default:return Gl.Z}})),o=(0,l.Fl)((()=>{switch(t.step.status){case"success":return"text-green-600 dark:text-green-400";case"failed":return"text-red-600 dark:text-red-400";case"skipped":return"text-gray-600 dark:text-gray-400";default:return"text-blue-600 dark:text-blue-400"}}));return(t,i)=>((0,l.wg)(),(0,l.iD)("div",{class:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center p-4 z-50",onClick:i[2]||(i[2]=e=>t.$emit("close"))},[(0,l._)("div",{class:"bg-background border rounded-lg shadow-lg max-w-2xl w-full max-h-[80vh] overflow-hidden",onClick:i[1]||(i[1]=(0,a.iM)((()=>{}),["stop"]))},[(0,l._)("div",Fn,[(0,l._)("div",null,[(0,l._)("h2",Rn,[((0,l.wg)(),(0,l.j4)((0,l.LL)(s.value),{class:(0,n.C_)([o.value,"w-5 h-5"])},null,8,["class"])),(0,l.Uk)(" "+(0,n.zw)(e.step.name),1)]),(0,l._)("p",Tn," Step "+(0,n.zw)(e.index+1)+" • "+(0,n.zw)((0,r.SU)(Jl)(e.step.duration)),1)]),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:i[0]||(i[0]=e=>t.$emit("close"))},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(d.Z),{class:"w-4 h-4"})])),_:1})]),(0,l._)("div",$n,[e.step.isAlwaysRun?((0,l.wg)(),(0,l.iD)("div",En,[(0,l._)("div",qn,[(0,l.Wm)((0,r.SU)(Bl.Z),{class:"w-4 h-4 text-blue-600 dark:text-blue-400"}),i[3]||(i[3]=(0,l._)("div",null,[(0,l._)("p",{class:"text-sm font-medium text-blue-900 dark:text-blue-200"},"Always Run"),(0,l._)("p",{class:"text-xs text-blue-600 dark:text-blue-400"},"This endpoint is configured to execute even after failures")],-1))])])):(0,l.kq)("",!0),e.step.errors?.length?((0,l.wg)(),(0,l.iD)("div",Ln,[(0,l._)("h3",Zn,[(0,l.Wm)((0,r.SU)(Oe.Z),{class:"w-4 h-4"}),(0,l.Uk)(" Errors ("+(0,n.zw)(e.step.errors.length)+") ",1)]),(0,l._)("div",An,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.step.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0),e.step.result&&e.step.result.timestamp?((0,l.wg)(),(0,l.iD)("div",Mn,[(0,l._)("h3",Nn,[(0,l.Wm)((0,r.SU)(Wn.Z),{class:"w-4 h-4"}),i[4]||(i[4]=(0,l.Uk)(" Timestamp ",-1))]),(0,l._)("p",Yn,(0,n.zw)((0,r.SU)(A)(e.step.result.timestamp)),1)])):(0,l.kq)("",!0),e.step.result?((0,l.wg)(),(0,l.iD)("div",In,[(0,l._)("h3",On,[(0,l.Wm)((0,r.SU)(Hn.Z),{class:"w-4 h-4"}),i[5]||(i[5]=(0,l.Uk)(" Response ",-1))]),(0,l._)("div",Pn,[(0,l._)("div",null,[i[6]||(i[6]=(0,l._)("span",{class:"text-muted-foreground"},"Duration:",-1)),(0,l._)("p",Kn,(0,n.zw)((0,r.SU)(Jl)(e.step.result.duration)),1)]),(0,l._)("div",null,[i[7]||(i[7]=(0,l._)("span",{class:"text-muted-foreground"},"Success:",-1)),(0,l._)("p",{class:(0,n.C_)(["mt-1",e.step.result.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.step.result.success?"Yes":"No"),3)])])])):(0,l.kq)("",!0),e.step.result?.conditionResults?.length?((0,l.wg)(),(0,l.iD)("div",Vn,[(0,l._)("h3",Bn,[(0,l.Wm)((0,r.SU)(Ve.Z),{class:"w-4 h-4"}),(0,l.Uk)(" Condition Results ("+(0,n.zw)(e.step.result.conditionResults.length)+") ",1)]),(0,l._)("div",Gn,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.step.result.conditionResults,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex items-start gap-3 p-1 rounded-lg border",e.success?"bg-green-50 dark:bg-green-900/30 border-green-200 dark:border-green-700":"bg-red-50 dark:bg-red-900/30 border-red-200 dark:border-red-700"])},[(0,l._)("div",Jn,[e.success?((0,l.wg)(),(0,l.j4)((0,r.SU)(Ve.Z),{key:0,class:"w-4 h-4 text-green-600 dark:text-green-400"})):((0,l.wg)(),(0,l.j4)((0,r.SU)(_s.Z),{key:1,class:"w-4 h-4 text-red-600 dark:text-red-400"}))]),(0,l._)("div",Xn,[(0,l._)("p",{class:(0,n.C_)(["text-sm font-mono break-all",e.success?"text-green-800 dark:text-green-200":"text-red-800 dark:text-red-200"])},(0,n.zw)(e.condition),3),(0,l._)("span",{class:(0,n.C_)(["text-xs font-medium whitespace-nowrap",e.success?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"])},(0,n.zw)(e.success?"Passed":"Failed"),3)])],2)))),128))])])):(0,l.kq)("",!0),e.step.endpoint?((0,l.wg)(),(0,l.iD)("div",Qn,[(0,l._)("h3",er,[(0,l.Wm)((0,r.SU)(jn.Z),{class:"w-4 h-4"}),i[8]||(i[8]=(0,l.Uk)(" Endpoint Configuration ",-1))]),(0,l._)("div",tr,[e.step.endpoint.url?((0,l.wg)(),(0,l.iD)("div",sr,[i[9]||(i[9]=(0,l._)("span",{class:"text-muted-foreground"},"URL:",-1)),(0,l._)("p",ar,(0,n.zw)(e.step.endpoint.url),1)])):(0,l.kq)("",!0),e.step.endpoint.method?((0,l.wg)(),(0,l.iD)("div",lr,[i[10]||(i[10]=(0,l._)("span",{class:"text-muted-foreground"},"Method:",-1)),(0,l._)("p",nr,(0,n.zw)(e.step.endpoint.method),1)])):(0,l.kq)("",!0),e.step.endpoint.interval?((0,l.wg)(),(0,l.iD)("div",rr,[i[11]||(i[11]=(0,l._)("span",{class:"text-muted-foreground"},"Interval:",-1)),(0,l._)("p",or,(0,n.zw)(e.step.endpoint.interval),1)])):(0,l.kq)("",!0),e.step.endpoint.timeout?((0,l.wg)(),(0,l.iD)("div",ir,[i[12]||(i[12]=(0,l._)("span",{class:"text-muted-foreground"},"Timeout:",-1)),(0,l._)("p",ur,(0,n.zw)(e.step.endpoint.timeout),1)])):(0,l.kq)("",!0)])])):(0,l.kq)("",!0),e.step.result?.errors?.length?((0,l.wg)(),(0,l.iD)("div",dr,[(0,l._)("h3",cr,[(0,l.Wm)((0,r.SU)(Oe.Z),{class:"w-4 h-4"}),(0,l.Uk)(" Result Errors ("+(0,n.zw)(e.step.result.errors.length)+") ",1)]),(0,l._)("div",gr,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(e.step.result.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"p-3 bg-red-50 dark:bg-red-900/50 border border-red-200 dark:border-red-700 rounded text-sm font-mono text-red-800 dark:text-red-300 break-all"},(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0)])])]))}};const pr=mr;var vr=pr;const fr={class:"suite-details-container bg-background min-h-screen"},wr={class:"container mx-auto px-4 py-8 max-w-7xl"},hr={class:"mb-6"},xr={class:"flex items-start justify-between"},br={class:"text-3xl font-bold tracking-tight"},yr={class:"text-muted-foreground mt-2"},kr={key:0},_r={key:1},Sr={class:"flex items-center gap-2"},Dr={key:0,class:"flex items-center justify-center py-20"},Ur={key:1,class:"text-center py-20"},Cr={key:2,class:"space-y-6"},zr={class:"space-y-4"},Wr={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},Hr={class:"text-lg font-medium"},jr={class:"text-lg font-medium"},Fr={class:"text-lg font-medium"},Rr={class:"text-lg font-medium"},Tr={class:"mt-6"},$r={key:0,class:"mt-6"},Er={class:"space-y-2"},qr={key:0,class:"space-y-2"},Lr=["onClick"],Zr={class:"flex items-center gap-3"},Ar={class:"text-sm font-medium"},Mr={class:"text-xs text-muted-foreground"},Nr={key:1,class:"text-center py-8 text-muted-foreground"};var Yr={__name:"SuiteDetails",setup(e){const t=(0,i.tv)(),s=(0,i.yj)(),a=(0,r.iH)(!1),o=(0,r.iH)(null),u=(0,r.iH)(null),d=(0,r.iH)(null),c=(0,r.iH)(0),g=(0,l.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?[...o.value.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))):[])),m=(0,l.Fl)((()=>o.value&&o.value.results&&0!==o.value.results.length?u.value||g.value[0]:null)),p=async()=>{const e=!o.value;e&&(a.value=!0);try{const t=await fetch(`${Br}/api/v1/suites/${s.params.key}/statuses`,{credentials:"include"});if(200===t.status){const e=await t.json(),s=o.value;if(o.value=e,e.results&&e.results.length>0){const t=[...e.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp))),a=!u.value||s?.results&&u.value.timestamp===[...s.results].sort(((e,t)=>new Date(t.timestamp)-new Date(e.timestamp)))[0]?.timestamp;a&&(u.value=t[0])}}else 404===t.status?o.value=null:console.error("[SuiteDetails][fetchData] Error:",await t.text())}catch(t){console.error("[SuiteDetails][fetchData] Error:",t)}finally{e&&(a.value=!1)}},v=()=>{p()},f=()=>{t.push("/")},w=e=>L(e),h=e=>{const t=new Date(e);return t.toLocaleString()},b=e=>{if(!e&&0!==e)return"N/A";const t=e/1e6;return t<1e3?`${t.toFixed(0)}ms`:`${(t/1e3).toFixed(2)}s`},y=e=>{if(!e||!e.endpointResults||0===e.endpointResults.length)return 0;const t=e.endpointResults.filter((e=>e.success)).length;return Math.round(t/e.endpointResults.length*100)},_=(0,l.Fl)((()=>{if(!m.value||!m.value.endpointResults)return[];const e=m.value.endpointResults;return e.map(((t,s)=>{const a=o.value?.endpoints?.[s],l=e[s+1];let n=!1;for(let r=0;r<s;r++)if(!e[r].success){n=!0;break}return{name:a?.name||t.name||`Step ${s+1}`,endpoint:a,result:t,status:C(t,a),duration:t.duration||0,isAlwaysRun:n,errors:t.errors||[],nextStepStatus:l?C(l,o.value?.endpoints?.[s+1]):null}}))})),S=(0,l.Fl)((()=>_.value.filter((e=>"success"===e.status)).length)),U=(0,l.Fl)((()=>_.value.length?Math.round(S.value/_.value.length*100):0)),C=e=>e?e.conditionResults&&e.conditionResults.some((e=>e.condition.includes("SKIP")))?"skipped":e.success?"success":"failed":"not-started",W=(e,t)=>{d.value=e,c.value=t};return(0,l.bv)((()=>{p()})),(e,t)=>((0,l.wg)(),(0,l.iD)("div",fr,[(0,l._)("div",wr,[(0,l._)("div",hr,[(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"sm",onClick:f,class:"mb-4"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ka.Z),{class:"h-4 w-4 mr-2"}),t[1]||(t[1]=(0,l.Uk)(" Back to Dashboard ",-1))])),_:1,__:[1]}),(0,l._)("div",xr,[(0,l._)("div",null,[(0,l._)("h1",br,(0,n.zw)(o.value?.name||"Loading..."),1),(0,l._)("p",yr,[o.value?.group?((0,l.wg)(),(0,l.iD)("span",kr,(0,n.zw)(o.value.group)+" • ",1)):(0,l.kq)("",!0),m.value?((0,l.wg)(),(0,l.iD)("span",_r,(0,n.zw)(u.value&&u.value.timestamp!==g.value[0]?.timestamp?"Ran":"Last run")+" "+(0,n.zw)(w(m.value.timestamp)),1)):(0,l.kq)("",!0)])]),(0,l._)("div",Sr,[m.value?((0,l.wg)(),(0,l.j4)(st,{key:0,status:m.value.success?"healthy":"unhealthy"},null,8,["status"])):(0,l.kq)("",!0),(0,l.Wm)((0,r.SU)(x),{variant:"ghost",size:"icon",onClick:v,title:"Refresh"},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(Ie.Z),{class:"h-5 w-5"})])),_:1})])])]),a.value?((0,l.wg)(),(0,l.iD)("div",Dr,[(0,l.Wm)(de,{size:"lg"})])):o.value?((0,l.wg)(),(0,l.iD)("div",Cr,[m.value?((0,l.wg)(),(0,l.j4)((0,r.SU)(k),{key:0},{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>[(0,l.Uk)((0,n.zw)(u.value?.timestamp===g.value[0]?.timestamp?"Latest Execution":`Execution at ${h(u.value.timestamp)}`),1)])),_:1})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[(0,l._)("div",zr,[(0,l._)("div",Wr,[(0,l._)("div",null,[t[4]||(t[4]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Status",-1)),(0,l._)("p",Hr,(0,n.zw)(m.value.success?"Success":"Failed"),1)]),(0,l._)("div",null,[t[5]||(t[5]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Duration",-1)),(0,l._)("p",jr,(0,n.zw)(b(m.value.duration)),1)]),(0,l._)("div",null,[t[6]||(t[6]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Endpoints",-1)),(0,l._)("p",Fr,(0,n.zw)(m.value.endpointResults?.length||0),1)]),(0,l._)("div",null,[t[7]||(t[7]=(0,l._)("p",{class:"text-sm text-muted-foreground"},"Success Rate",-1)),(0,l._)("p",Rr,(0,n.zw)(y(m.value))+"%",1)])]),(0,l._)("div",Tr,[t[8]||(t[8]=(0,l._)("h3",{class:"text-lg font-semibold mb-4"},"Execution Flow",-1)),(0,l.Wm)(zn,{"flow-steps":_.value,"progress-percentage":U.value,"completed-steps":S.value,"total-steps":_.value.length,onStepSelected:W},null,8,["flow-steps","progress-percentage","completed-steps","total-steps"])]),m.value.errors&&m.value.errors.length>0?((0,l.wg)(),(0,l.iD)("div",$r,[t[9]||(t[9]=(0,l._)("h3",{class:"text-lg font-semibold mb-3 text-red-500"},"Suite Errors",-1)),(0,l._)("div",Er,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(m.value.errors,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:"bg-red-50 dark:bg-red-950 text-red-700 dark:text-red-300 p-3 rounded-md text-sm"},(0,n.zw)(e),1)))),128))])])):(0,l.kq)("",!0)])])),_:1})])),_:1})):(0,l.kq)("",!0),(0,l.Wm)((0,r.SU)(k),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(D),null,{default:(0,l.w5)((()=>[(0,l.Wm)((0,r.SU)(z),null,{default:(0,l.w5)((()=>t[10]||(t[10]=[(0,l.Uk)("Execution History",-1)]))),_:1,__:[10]})])),_:1}),(0,l.Wm)((0,r.SU)(j),null,{default:(0,l.w5)((()=>[g.value.length>0?((0,l.wg)(),(0,l.iD)("div",qr,[((0,l.wg)(!0),(0,l.iD)(l.HY,null,(0,l.Ko)(g.value,((e,t)=>((0,l.wg)(),(0,l.iD)("div",{key:t,class:(0,n.C_)(["flex items-center justify-between p-3 border rounded-lg hover:bg-accent/50 transition-colors cursor-pointer",{"bg-accent":u.value&&u.value.timestamp===e.timestamp}]),onClick:t=>u.value=e},[(0,l._)("div",Zr,[(0,l.Wm)(st,{status:e.success?"healthy":"unhealthy",size:"sm"},null,8,["status"]),(0,l._)("div",null,[(0,l._)("p",Ar,(0,n.zw)(h(e.timestamp)),1),(0,l._)("p",Mr,(0,n.zw)(e.endpointResults?.length||0)+" endpoints • "+(0,n.zw)(b(e.duration)),1)])]),(0,l.Wm)((0,r.SU)(Ge.Z),{class:"h-4 w-4 text-muted-foreground"})],10,Lr)))),128))])):((0,l.wg)(),(0,l.iD)("div",Nr," No execution history available "))])),_:1})])),_:1})])):((0,l.wg)(),(0,l.iD)("div",Ur,[(0,l.Wm)((0,r.SU)(Oe.Z),{class:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),t[2]||(t[2]=(0,l._)("h3",{class:"text-lg font-semibold mb-2"},"Suite not found",-1)),t[3]||(t[3]=(0,l._)("p",{class:"text-muted-foreground"},"The requested suite could not be found.",-1))]))]),(0,l.Wm)(ks,{onRefreshData:p}),d.value?((0,l.wg)(),(0,l.j4)(vr,{key:0,step:d.value,index:c.value,onClose:t[0]||(t[0]=e=>d.value=null)},null,8,["step","index"])):(0,l.kq)("",!0)]))}};const Ir=(0,T.Z)(Yr,[["__scopeId","data-v-01b6e7cc"]]);var Or=Ir;const Pr=[{path:"/",name:"Home",component:Pa},{path:"/endpoints/:key",name:"EndpointDetails",component:Kl},{path:"/suites/:key",name:"SuiteDetails",component:Or}],Kr=(0,i.p7)({history:(0,i.PO)("/"),routes:Pr});var Vr=Kr;const Br="";(0,a.ri)(Me).use(Vr).mount("#app")}},t={};function s(a){var l=t[a];if(void 0!==l)return l.exports;var n=t[a]={exports:{}};return e[a](n,n.exports,s),n.exports}s.m=e,function(){var e=[];s.O=function(t,a,l,n){if(!a){var r=1/0;for(d=0;d<e.length;d++){a=e[d][0],l=e[d][1],n=e[d][2];for(var o=!0,i=0;i<a.length;i++)(!1&n||r>=n)&&Object.keys(s.O).every((function(e){return s.O[e](a[i])}))?a.splice(i--,1):(o=!1,n<r&&(r=n));if(o){e.splice(d--,1);var u=l();void 0!==u&&(t=u)}}return t}n=n||0;for(var d=e.length;d>0&&e[d-1][2]>n;d--)e[d]=e[d-1];e[d]=[a,l,n]}}(),function(){s.d=function(e,t){for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){s.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){s.p="/"}(),function(){var e={143:0};s.O.j=function(t){return 0===e[t]};var t=function(t,a){var l,n,r=a[0],o=a[1],i=a[2],u=0;if(r.some((function(t){return 0!==e[t]}))){for(l in o)s.o(o,l)&&(s.m[l]=o[l]);if(i)var d=i(s)}for(t&&t(a);u<r.length;u++)n=r[u],s.o(e,n)&&e[n]&&e[n][0](),e[n]=0;return s.O(d)},a=self["webpackChunkgatus"]=self["webpackChunkgatus"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var a=s.O(void 0,[998],(function(){return s(763)}));a=s.O(a)})();
\ No newline at end of file


Test patch:
diff --git a/config/ui/ui_test.go b/config/ui/ui_test.go
index 86cf5d5b..ec132bf4 100644
--- a/config/ui/ui_test.go
+++ b/config/ui/ui_test.go
@@ -8,11 +8,13 @@ import (
 
 func TestConfig_ValidateAndSetDefaults(t *testing.T) {
 	cfg := &Config{
-		Title:       "",
-		Description: "",
-		Header:      "",
-		Logo:        "",
-		Link:        "",
+		Title:                "",
+		Description:          "",
+		DashboardHeading:     "",
+		DashboardSubheading:  "",
+		Header:               "",
+		Logo:                 "",
+		Link:                 "",
 	}
 	if err := cfg.ValidateAndSetDefaults(); err != nil {
 		t.Error("expected no error, got", err.Error())
@@ -23,6 +25,12 @@ func TestConfig_ValidateAndSetDefaults(t *testing.T) {
 	if cfg.Description != defaultDescription {
 		t.Errorf("expected description to be %s, got %s", defaultDescription, cfg.Description)
 	}
+	if cfg.DashboardHeading != defaultDashboardHeading {
+		t.Errorf("expected DashboardHeading to be %s, got %s", defaultDashboardHeading, cfg.DashboardHeading)
+	}
+	if cfg.DashboardSubheading != defaultDashboardSubheading {
+		t.Errorf("expected DashboardSubheading to be %s, got %s", defaultDashboardSubheading, cfg.DashboardSubheading)
+	}
 	if cfg.Header != defaultHeader {
 		t.Errorf("expected header to be %s, got %s", defaultHeader, cfg.Header)
 	}
@@ -78,6 +86,12 @@ func TestGetDefaultConfig(t *testing.T) {
 	if defaultConfig.Title != defaultTitle {
 		t.Error("expected GetDefaultConfig() to return defaultTitle, got", defaultConfig.Title)
 	}
+	if defaultConfig.DashboardHeading != defaultDashboardHeading {
+		t.Error("expected GetDefaultConfig() to return defaultDashboardHeading, got", defaultConfig.DashboardHeading)
+	}
+	if defaultConfig.DashboardSubheading != defaultDashboardSubheading {
+		t.Error("expected GetDefaultConfig() to return defaultDashboardSubheading, got", defaultConfig.DashboardSubheading)
+	}
 	if defaultConfig.Logo != defaultLogo {
 		t.Error("expected GetDefaultConfig() to return defaultLogo, got", defaultConfig.Logo)
 	}