@naosystem/cf-workers-status-page 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ import{B as e,C as t,M as n,x as r,z as i}from"./src-seeRRxzL.js";import{C as a,E as o,S as s,T as c,_ as l,a as u,b as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,o as b,p as x,r as S,s as C,u as w,v as ee,w as te,x as T,y as ne}from"./index-RHRzex3u.js";var E=e(),D=i(),re=[`day`,`week`,`month`],O={day:{unit:`hour`,ago:[24,18,12,6,0],major:[24,12,0]},week:{unit:`day`,ago:[6,4,2,0],major:[6,0]},month:{unit:`day`,ago:[30,20,10,0],major:[30,0]}},k=1e3,A=200;function ie(e){let t=Math.max(1,e*1.15),n=10**Math.floor(Math.log10(t));for(let e of[1,2,2.5,5])if(e*n>=t)return e*n;return 10*n}function ae(e,t){let n=t=>e.length<=1?k:t/(e.length-1)*k,r=e=>A-Math.min(e,t)/t*A,i=[],a=[];e.forEach((e,t)=>{e===null?(a.length>0&&i.push(a),a=[]):a.push([n(t),r(e)])}),a.length>0&&i.push(a);let o=([e,t])=>`${e.toFixed(1)},${t.toFixed(1)}`;return{line:i.map(e=>`M${e.map(o).join(` L`)}${e.length===1?` h0.01`:``}`).join(` `),area:i.filter(e=>e.length>1).map(e=>{let t=e[0],n=e.at(-1);return`M${e.map(o).join(` L`)} L${n[0].toFixed(1)},${A} L${t[0].toFixed(1)},${A} Z`}).join(` `)}}function oe({id:e,name:n,latency:r,state:i}){let{t:a,f:o}=t(),[s,c]=(0,E.useState)(`day`);if(r===void 0)return(0,D.jsx)(`div`,{id:e,className:`m-latency`,children:(0,D.jsx)(`p`,{className:`m-muted m-small`,children:i.error!==null&&i.data===void 0?a(`public.modern.latency.failed`,{reason:w(i.error,a)}):a(`public.modern.latency.loading`)})});let l=r[s],u=e=>e===null?`—`:e.toLocaleString(o.locale),d=l.values.filter(e=>e!==null),f=ie(Math.max(0,...d)),{line:p,area:m}=ae(l.values,f),h=Math.max(1,(l.values.length-1)*l.bucketMs),g=new Intl.RelativeTimeFormat(o.locale,{numeric:`always`}),_=O[s].unit===`hour`?36e5:864e5,v=O[s].ago.map(e=>{let t=Math.max(0,Math.min(1,1-e*_/h));return{text:e===0?a(`public.modern.latency.now`):g.format(-e,O[s].unit),left:`${(t*100).toFixed(3)}%`,shift:t<=0?`start`:t>=1?`end`:`middle`,minor:!O[s].major.includes(e)}});return(0,D.jsxs)(`div`,{id:e,className:`m-latency`,children:[(0,D.jsxs)(`div`,{className:`m-latency__head`,children:[(0,D.jsx)(`dl`,{className:`m-latency__stats`,children:[[`latest`,r.latest?.ms??null],[`average`,l.averageMs],[`p95`,l.p95Ms]].map(([e,t])=>(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`dt`,{children:a(`public.modern.latency.${e}`)}),(0,D.jsxs)(`dd`,{className:`m-num`,children:[u(t),(0,D.jsx)(`span`,{className:`m-latency__unit`,children:`ms`})]})]},e))}),(0,D.jsx)(`div`,{className:`m-segmented`,role:`group`,"aria-label":a(`public.modern.latency.period`),children:re.map(e=>(0,D.jsx)(`button`,{type:`button`,className:`m-segmented__option`,"aria-pressed":s===e,onClick:()=>c(e),children:a(`public.modern.latency.${e}`)},e))})]}),d.length===0?(0,D.jsx)(`p`,{className:`m-muted m-small`,children:a(`public.modern.latency.none`)}):(0,D.jsxs)(`div`,{className:`m-chart`,children:[(0,D.jsxs)(`div`,{className:`m-chart__y m-num`,"aria-hidden":`true`,children:[(0,D.jsx)(`span`,{style:{top:`0%`},children:a(`public.modern.latency.value`,{ms:u(f)})}),(0,D.jsx)(`span`,{style:{top:`50%`},children:a(`public.modern.latency.value`,{ms:u(f/2)})}),(0,D.jsx)(`span`,{style:{top:`100%`},children:a(`public.modern.latency.value`,{ms:`0`})})]}),(0,D.jsxs)(`svg`,{className:`m-chart__plot`,viewBox:`0 0 ${k} ${A}`,preserveAspectRatio:`none`,role:`img`,"aria-label":a(`public.modern.latency.chart`,{component:n,period:a(`public.modern.latency.${s}`),average:a(`public.modern.latency.value`,{ms:u(l.averageMs)}),p95:a(`public.modern.latency.value`,{ms:u(l.p95Ms)})}),children:[(0,D.jsx)(`line`,{x1:`0`,y1:`0`,x2:k,y2:`0`,className:`m-chart__grid`}),(0,D.jsx)(`line`,{x1:`0`,y1:A/2,x2:k,y2:A/2,className:`m-chart__grid`}),(0,D.jsx)(`line`,{x1:`0`,y1:A,x2:k,y2:A,className:`m-chart__base`}),(0,D.jsx)(`path`,{d:m,className:`m-chart__area`}),(0,D.jsx)(`path`,{d:p,className:`m-chart__line`})]}),(0,D.jsx)(`div`,{className:`m-chart__x`,"aria-hidden":`true`,children:v.map(e=>(0,D.jsx)(`span`,{className:`m-chart__tick m-chart__tick--${e.shift}${e.minor?` m-chart__tick--minor`:``}`,style:{left:e.left},children:e.text},e.text))})]})]})}var j=`cf-workers-status-page:theme`;function se(){try{let e=localStorage.getItem(j);return e===`light`||e===`dark`?e:null}catch{return null}}function ce(e){try{localStorage.setItem(j,e)}catch{}}function le(){let[e,t]=(0,E.useState)(se),n=C(`(prefers-color-scheme: dark)`);return(0,E.useLayoutEffect)(()=>{let t=document.documentElement;return t.dataset.template=`modern`,e===null?delete t.dataset.theme:t.dataset.theme=e,()=>{delete t.dataset.template,delete t.dataset.theme}},[e]),{theme:e??(n?`dark`:`light`),choose:e=>{ce(e),t(e)}}}function M({tone:e,size:t=18}){return(0,D.jsxs)(`svg`,{className:`m-glyph m-glyph--${e}`,width:t,height:t,viewBox:`0 0 20 20`,"aria-hidden":`true`,focusable:`false`,children:[(0,D.jsx)(`circle`,{cx:`10`,cy:`10`,r:`9`,className:`m-glyph__disc`}),e===`up`&&(0,D.jsx)(`polyline`,{points:`6 10.5 8.8 13 14 7.5`,className:`m-glyph__mark`}),e===`degraded`&&(0,D.jsx)(`line`,{x1:`6`,y1:`10`,x2:`14`,y2:`10`,className:`m-glyph__mark`}),e===`down`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`line`,{x1:`7`,y1:`7`,x2:`13`,y2:`13`,className:`m-glyph__mark`}),(0,D.jsx)(`line`,{x1:`13`,y1:`7`,x2:`7`,y2:`13`,className:`m-glyph__mark`})]}),e===`unknown`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`path`,{d:`M7.6 7.6a2.5 2.5 0 1 1 3.4 2.3c-.6.3-1 .8-1 1.4v.3`,className:`m-glyph__mark`}),(0,D.jsx)(`circle`,{cx:`10`,cy:`14.4`,r:`1.1`,className:`m-glyph__dot`})]}),e===`maintenance`&&(0,D.jsx)(`polyline`,{points:`10 5.5 10 10 13 12`,className:`m-glyph__mark`}),e===`stale`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`line`,{x1:`10`,y1:`5.5`,x2:`10`,y2:`11`,className:`m-glyph__mark`}),(0,D.jsx)(`circle`,{cx:`10`,cy:`14.2`,r:`1.1`,className:`m-glyph__dot`})]})]})}function N({name:e,size:t=16}){return(0,D.jsxs)(`svg`,{className:`m-icon`,width:t,height:t,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:[e===`chevron-down`&&(0,D.jsx)(`polyline`,{points:`6 9 12 15 18 9`}),e===`chevron-right`&&(0,D.jsx)(`polyline`,{points:`9 6 15 12 9 18`}),e===`calendar`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`}),(0,D.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,D.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,D.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]}),e===`sun`&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`circle`,{cx:`12`,cy:`12`,r:`4`}),(0,D.jsx)(`line`,{x1:`12`,y1:`2`,x2:`12`,y2:`4`}),(0,D.jsx)(`line`,{x1:`12`,y1:`20`,x2:`12`,y2:`22`}),(0,D.jsx)(`line`,{x1:`2`,y1:`12`,x2:`4`,y2:`12`}),(0,D.jsx)(`line`,{x1:`20`,y1:`12`,x2:`22`,y2:`12`}),(0,D.jsx)(`line`,{x1:`4.9`,y1:`4.9`,x2:`6.3`,y2:`6.3`}),(0,D.jsx)(`line`,{x1:`17.7`,y1:`17.7`,x2:`19.1`,y2:`19.1`}),(0,D.jsx)(`line`,{x1:`4.9`,y1:`19.1`,x2:`6.3`,y2:`17.7`}),(0,D.jsx)(`line`,{x1:`17.7`,y1:`6.3`,x2:`19.1`,y2:`4.9`})]}),e===`moon`&&(0,D.jsx)(`path`,{d:`M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z`})]})}function P({appearance:e,title:n,home:r,reportUrl:i,children:a,after:s}){let{t:c}=t(),{theme:l,choose:u}=le();return o(e),(0,D.jsxs)(`div`,{className:`modern`,"data-theme":l,children:[(0,D.jsx)(`a`,{className:`m-skip`,href:`#main`,children:c(`ui.skipToContent`)}),(0,D.jsx)(ue,{appearance:e,title:n,home:r,reportUrl:i}),(0,D.jsxs)(`main`,{id:`main`,tabIndex:-1,className:`m-main`,children:[(0,D.jsx)(`div`,{className:`m-card`,children:a}),s]}),(0,D.jsx)(de,{appearance:e,title:n,theme:l,onTheme:u})]})}function ue({appearance:e,title:r,home:i,reportUrl:a}){let{t:o,locale:s}=t();if(r===null)return(0,D.jsx)(`header`,{className:`m-header`,children:(0,D.jsx)(`div`,{className:`m-header__inner`,children:(0,D.jsx)(`div`,{className:`m-brand m-brand--pending`,"aria-hidden":`true`,children:(0,D.jsxs)(`span`,{className:`m-brand__link`,children:[(0,D.jsx)(`svg`,{className:`m-brand__mark`,width:`30`,height:`30`,viewBox:`0 0 28 28`,focusable:`false`}),(0,D.jsx)(`span`,{className:`m-brand__title`,children:`\xA0`})]})})})});let{description:l,nav:u}=c(e,s),d=(0,D.jsxs)(D.Fragment,{children:[e?.logoUrl?(0,D.jsx)(`img`,{className:`m-brand__logo`,src:e.logoUrl,alt:``,referrerPolicy:`no-referrer`}):(0,D.jsxs)(`svg`,{className:`m-brand__mark`,width:`30`,height:`30`,viewBox:`0 0 28 28`,"aria-hidden":`true`,focusable:`false`,children:[(0,D.jsx)(`rect`,{width:`28`,height:`28`,rx:`8`}),(0,D.jsx)(`polyline`,{points:`5 15 10 15 12.5 9 16 20 18.5 13 23 13`})]}),(0,D.jsx)(`span`,{className:`m-brand__title`,children:r})]});return(0,D.jsx)(`header`,{className:`m-header`,children:(0,D.jsxs)(`div`,{className:`m-header__inner`,children:[(0,D.jsxs)(`div`,{className:`m-brand`,children:[e?.websiteUrl?(0,D.jsxs)(`a`,{className:`m-brand__link`,href:e.websiteUrl,rel:`noopener noreferrer`,children:[d,(0,D.jsxs)(`span`,{className:`m-visually-hidden`,children:[` (`,o(`public.header.website`),`)`]})]}):(0,D.jsx)(n,{href:i,className:`m-brand__link`,children:d}),l&&(0,D.jsx)(`p`,{className:`m-brand__description`,children:l})]}),(0,D.jsx)(te,{nav:u,after:a===null?void 0:(0,D.jsx)(`a`,{className:`m-header__link`,href:a,rel:`noopener noreferrer`,children:o(`public.modern.report`)})})]})})}function de({appearance:e,title:n,theme:i,onTheme:o}){let{t:s,f:l,locale:u}=t(),d=e?.websiteUrl?fe(e.websiteUrl):null;return(0,D.jsxs)(`footer`,{className:`m-footer`,children:[(0,D.jsx)(a,{footer:c(e,u).footer}),(0,D.jsxs)(`div`,{className:`m-footer__lines`,children:[(0,D.jsx)(`p`,{children:s(`public.footer.timeZone`,{timeZone:l.timeZone})}),d!==null&&e?.websiteUrl&&(0,D.jsxs)(`p`,{children:[n,` · `,(0,D.jsx)(`a`,{href:e.websiteUrl,children:d})]})]}),(0,D.jsxs)(`div`,{className:`m-footer__controls`,children:[(0,D.jsx)(r,{className:`m-language`}),(0,D.jsx)(`div`,{className:`m-segmented`,role:`group`,"aria-label":s(`public.modern.theme`),children:[`light`,`dark`].map(e=>(0,D.jsx)(`button`,{type:`button`,className:`m-segmented__option m-segmented__option--icon`,"aria-pressed":i===e,"aria-label":s(`public.modern.theme.${e}`),title:s(`public.modern.theme.${e}`),onClick:()=>o(e),children:(0,D.jsx)(N,{name:e===`light`?`sun`:`moon`,size:14})},e))})]})]})}function fe(e){try{return new URL(e).host}catch{return e}}var F=new Set([`up`,`degraded`,`down`]);function I(e,t,n,r){let i=Math.max(e,n.from),a=Math.min(t??r,n.to);return a>i?[i,a]:null}function pe(e){let t=0,n=-1/0;for(let[r,i]of[...e].sort((e,t)=>e[0]-t[0]))i<=n||(t+=i-Math.max(r,n),n=i);return t}function me(e,t,n,r,i,a,o){let s=n.filter(t=>t.componentId===e.id);return b(e,r).days.map(n=>{let r=u(n,e,t,a,o),c=S(n,e),l=n.to-n.from,d=[];for(let[e,r,a]of[[n.incidents,`incident`,t.incidents],[n.maintenance,`maintenance`,t.maintenance]])for(let t of e){let e=a.get(t),o=e===void 0?null:I(e.from,e.to,n,i);e!==void 0&&o!==null&&d.push({kind:r,from:o[0],to:o[1],title:e.title,who:null})}for(let e of s){let t=I(e.from,e.to,n,i);t!==null&&d.push({kind:`stoppage`,from:t[0],to:t[1],title:a(`public.modern.event.stoppage`),who:null})}d.sort((e,t)=>e.from-t.from);let f=F.has(c),p=pe(d.filter(e=>e.kind===`maintenance`).map(e=>[e.from,e.to])),m=f?n.downtimeMs??0:0,h=f?n.degradedMs??0:0,g=[];m>0&&g.push({text:a(`public.day.downtime`,{duration:o.duration(m)}),tone:`down`}),h>0&&g.push({text:a(`public.modern.day.degraded`,{duration:o.duration(h)}),tone:`degraded`}),p>0&&g.push({text:a(`public.modern.day.maintenance`,{duration:o.duration(p)}),tone:`maintenance`}),g.length===0&&r.incidents.length>0&&g.push({text:a(`public.day.incidents`,{titles:r.incidents.join(`, `)}),tone:`degraded`});let v=[];f||v.push(...r.summary),f&&n.uptime!==null&&v.push(a(`public.day.uptime`,{uptime:o.percent(n.uptime)})),f&&n.coverage!==null&&v.push(a(`public.day.coverage`,{coverage:o.percent(n.coverage)}));let y=g.length>0?{text:g.map(e=>e.text).join(` · `),tone:g[0].tone}:f?{text:a(`public.modern.day.noIssues`),tone:`up`}:{text:v.shift()??``,tone:`none`};return{date:r.date,from:n.from,to:n.to,kind:c,fractions:{maintenance:p/l,degraded:h/l,down:m/l},headline:y,lines:v,events:d,label:_(r,a)}})}var L={down:6,degraded:5,pending:4,up:3,nodata:2,notyet:1,unmonitored:0},R={down:4,degraded:3,maintenance:2,up:1,none:0};function he(e,t){let n=e[0];return n===void 0?[]:n.days.map((n,r)=>{let i=e.flatMap(e=>{let t=e.days[r];return t===void 0?[]:[{name:e.name,day:t}]}),a=i.reduce((e,{day:t})=>L[t.kind]>L[e]?t.kind:e,`unmonitored`),o=e=>Math.max(0,...i.map(({day:t})=>t.fractions[e])),s=i.filter(({day:e})=>e.headline.tone!==`up`&&e.headline.tone!==`none`).sort((e,t)=>R[t.day.headline.tone]-R[e.day.headline.tone]),c=i.some(({day:e})=>F.has(e.kind)),[l,...u]=s,d=l===void 0?c?{text:t(`public.modern.day.noIssues`),tone:`up`}:{text:n.headline.text,tone:`none`}:{text:`${l.name}: ${l.day.headline.text}`,tone:l.day.headline.tone},f=new Map;for(let{name:e,day:t}of i)for(let n of t.events){let t=n.kind===`stoppage`?`${n.kind}:${e}:${n.from}`:`${n.kind}:${n.title}:${n.from}:${n.to}`,r=f.get(t);f.set(t,r===void 0?{...n,who:e}:{...r,who:`${r.who}, ${e}`})}return{date:n.date,from:n.from,to:n.to,kind:a,fractions:{maintenance:o(`maintenance`),degraded:o(`degraded`),down:o(`down`)},headline:d,lines:u.map(({name:e,day:t})=>`${e}: ${t.headline.text}`),events:[...f.values()].sort((e,t)=>e.from-t.from),label:i.map(({name:e,day:t})=>`${e}: ${t.label}`).join(`. `)}})}function ge(e,t){let n=b(e,t);return{monitored:e.monitored,observedFrom:e.observedFrom,observedMs:n.observedMs,downMs:n.uptime===null?0:n.observedMs*(1-n.uptime)}}function _e(e){let t=e.filter(e=>e.monitored),n=t.flatMap(e=>e.observedFrom===null?[]:[e.observedFrom]);return{monitored:t.length>0,observedFrom:n.length===0?null:Math.min(...n),observedMs:t.reduce((e,t)=>e+t.observedMs,0),downMs:t.reduce((e,t)=>e+t.downMs,0)}}function ve(e,t,n){return!e.monitored||e.observedMs<864e5?null:t(`public.modern.uptime`,{uptime:n.percent(Math.max(0,1-e.downMs/e.observedMs))})}function z({figures:e}){let{t:n,f:r}=t(),i=ve(e,n,r);if(i!==null)return(0,D.jsx)(`span`,{className:`m-uptime m-num`,children:i});let a=e.monitored?e.observedFrom===null?n(`public.modern.uptime.notYet`):e.observedMs===0?n(`public.modern.uptime.noData`):n(`public.modern.uptime.notEnough`):n(`public.modern.uptime.notMonitored`);return(0,D.jsx)(`span`,{className:`m-uptime m-uptime--none`,children:a})}var B=new Map;function V(e,t,n,r){if(n>=r.to)return`24:00`;let i=`${t} ${e}`,a=B.get(i);return a===void 0&&(a=new Intl.DateTimeFormat(t,{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`,timeZone:e}),B.set(i,a)),a.format(n)}var H={incident:`degraded`,maintenance:`maintenance`,stoppage:`down`};function ye({days:e,label:n,timezone:r}){let{t:i,f:a}=t(),[o,s]=(0,E.useState)(e.length-1),[c,l]=(0,E.useState)(null),u=(0,E.useRef)(null);function d(t){let n=Math.max(0,Math.min(e.length-1,t));(u.current?.children[n])?.focus()}function f(t){let n={ArrowLeft:o-1,ArrowRight:o+1,Home:0,End:e.length-1}[t.key];n===void 0?t.key===`Escape`&&l(null):(t.preventDefault(),d(n))}let p=c===null?void 0:e[c],m=c===null?0:(c+.5)/e.length,h=m<.15?`start`:m>.85?`end`:`center`;return(0,D.jsxs)(`div`,{className:`m-bars-wrap`,children:[(0,D.jsx)(`div`,{ref:u,className:`m-bars`,role:`group`,"aria-label":n,onKeyDown:f,onMouseLeave:()=>l(null),children:e.map((e,t)=>(0,D.jsx)(`button`,{type:`button`,className:`m-bar m-bar--${e.kind}${c!==null&&c!==t?` is-dimmed`:``}`,tabIndex:t===o?0:-1,"aria-label":e.label,onFocus:()=>{s(t),l(t)},onBlur:()=>l(null),onMouseEnter:()=>l(t),onClick:()=>l(t),children:[`maintenance`,`degraded`,`down`].map(t=>e.fractions[t]>0?(0,D.jsx)(`span`,{className:`m-bar__seg m-bar__seg--${t}`,style:{height:`max(3px, ${Math.min(100,e.fractions[t]*100).toFixed(2)}%)`}},t):null)},e.date))}),p!==void 0&&(0,D.jsxs)(`div`,{className:`m-tip m-tip--${h}`,style:{"--at":`${(m*100).toFixed(2)}%`},"aria-hidden":`true`,children:[(0,D.jsx)(`p`,{className:`m-tip__date`,children:p.date}),(0,D.jsx)(`p`,{className:`m-tip__headline m-text--${p.headline.tone}`,children:p.headline.text}),p.lines.map(e=>(0,D.jsx)(`p`,{className:`m-tip__line`,children:e},e)),p.events.length>0&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`div`,{className:`m-tip__day${F.has(p.kind)?``:` is-empty`}`,children:p.events.map(e=>(0,D.jsx)(`span`,{className:`m-tip__span m-bg--${H[e.kind]}`,style:{left:`${((e.from-p.from)/(p.to-p.from)*100).toFixed(2)}%`,width:`max(2px, ${((e.to-e.from)/(p.to-p.from)*100).toFixed(2)}%)`}},`${e.kind}:${e.from}:${e.who??``}`))}),(0,D.jsxs)(`div`,{className:`m-tip__scale`,children:[(0,D.jsx)(`span`,{children:`0:00`}),(0,D.jsx)(`span`,{children:`12:00`}),(0,D.jsx)(`span`,{children:`24:00`})]}),(0,D.jsx)(`p`,{className:`m-tip__zone`,children:i(`public.modern.day.timeline`,{timezone:r})}),(0,D.jsx)(`ul`,{className:`m-tip__events`,children:p.events.map(e=>(0,D.jsxs)(`li`,{children:[(0,D.jsxs)(`span`,{className:`m-tip__event-head`,children:[(0,D.jsxs)(`span`,{className:`m-num`,children:[V(r,a.locale,e.from,p),`–`,V(r,a.locale,e.to,p)]}),(0,D.jsx)(`span`,{className:`m-text--${H[e.kind]}`,children:i(`public.modern.event.${e.kind}`)})]}),(0,D.jsxs)(`span`,{className:`m-tip__event-title`,children:[e.who!==null&&`${e.who}: `,e.kind===`stoppage`?``:e.title]})]},`${e.kind}:${e.from}:${e.who??``}`))})]})]})]})}var U={up:0,unknown:1,degraded:2,down:3};function be(e){return e.reduce((e,t)=>U[t]>U[e]?t:e,`up`)}function xe({state:e}){let{t:n}=t();return(0,D.jsx)(`span`,{className:`m-state m-text--${e}${e===`up`?` m-visually-hidden`:``}`,children:n(`public.state.${e}`)})}function W(){let{t:e}=t();return(0,D.jsx)(`span`,{className:`m-pill m-pill--maintenance m-pill--small`,children:e(`public.component.maintenance`)})}function G({days:e,label:n,input:r}){let{t:i}=t();return e!==null&&r.history!==void 0?(0,D.jsx)(ye,{days:e,label:n,timezone:r.history.timezone}):r.history===void 0&&!r.failed?(0,D.jsx)(`div`,{className:`m-bars m-bars--placeholder`,"aria-hidden":`true`}):r.history===void 0?(0,D.jsx)(`p`,{className:`m-muted m-small`,children:i(`public.components.historyFailed`)}):null}function Se({component:e,days:n,figures:r,input:i,count:a,latency:o,latencyOpen:s,onLatency:c,nested:l}){let{t:u,f:d}=t(),f=`m-latency-${e.id}`,p=o.data?.components.find(t=>t.id===e.id);return(0,D.jsxs)(`li`,{className:`m-row${l?` m-row--nested`:``}`,children:[(0,D.jsxs)(`div`,{className:`m-row__head`,children:[(0,D.jsxs)(`div`,{className:`m-row__title`,children:[(0,D.jsx)(M,{tone:e.state}),(0,D.jsx)(`h3`,{className:`m-row__name`,children:e.name}),(0,D.jsx)(xe,{state:e.state}),e.maintenance&&(0,D.jsx)(W,{})]}),(0,D.jsxs)(`div`,{className:`m-row__figures`,children:[e.latency&&(0,D.jsxs)(`button`,{type:`button`,className:`m-latency-toggle m-num`,"aria-expanded":s,"aria-controls":f,"aria-label":u(`public.modern.latency.toggle`,{component:e.name}),onClick:c,children:[p?.latest?u(`public.modern.latency.value`,{ms:p.latest.ms.toLocaleString(d.locale)}):`— ms`,(0,D.jsx)(`span`,{className:`m-chevron${s?` is-open`:``}`,children:(0,D.jsx)(N,{name:`chevron-down`,size:16})})]}),r!==null&&(0,D.jsx)(z,{figures:r})]})]}),(0,D.jsx)(G,{days:n,label:u(`public.bars.label`,{component:e.name,period:d.days(a)}),input:i}),e.latency&&s&&(0,D.jsx)(oe,{id:f,name:e.name,latency:p,state:o})]})}function Ce(e,t){let n=new Map(t.flatMap(e=>e.components.map(t=>[t,e]))),r=new Map(e.map(e=>[e.id,e])),i=new Set,a=[];for(let t of e){let e=n.get(t.id);if(e===void 0)a.push({kind:`component`,component:t});else if(!i.has(e.id)){i.add(e.id);let t=e.components.flatMap(e=>{let t=r.get(e);return t===void 0?[]:[t]});a.push({kind:`group`,group:e,members:t})}}return a}function we({components:e,groups:n,history:r,historyFailed:i,historyError:a,stoppages:o,latency:s,stale:c,now:l}){let{t:u,f:d}=t(),f=C(`(max-width: 600px)`)?30:90,[p,m]=(0,E.useState)(new Set),[h,g]=(0,E.useState)(()=>{let t=e.find(e=>e.latency);return new Set(t===void 0?[]:[t.id])});if(e.length===0)return null;let _=(e,t)=>{let n=new Set(e);return n.delete(t)||n.add(t),n},v=new Map(r?.components.map(e=>[e.id,e])),y={incidents:new Map(r?.incidents.map(e=>[e.id,e])),maintenance:new Map(r?.maintenance.map(e=>[e.id,e]))},b={history:r,failed:i},x=e=>{let t=v.get(e.id);return t===void 0?null:me(t,y,o,f,l,u,d)},S=e=>{let t=v.get(e.id);return t===void 0?null:ge(t,f)},w=(e,t=!1)=>(0,D.jsx)(Se,{component:e,days:x(e),figures:S(e),input:b,count:f,latency:s,latencyOpen:h.has(e.id),onLatency:()=>g(_(h,e.id)),nested:t},e.id);return(0,D.jsxs)(`section`,{className:`m-components`,"aria-label":u(`public.modern.components.label`),children:[c&&(0,D.jsx)(`p`,{className:`m-muted m-small`,children:u(`public.components.stale`)}),i&&r!==void 0&&(0,D.jsx)(`p`,{className:`m-muted m-small`,children:u(`public.components.historyStale`,{reason:a??``,time:d.time(r.generatedAt)})}),(0,D.jsx)(`ul`,{className:`m-rows${c?` is-stale`:``}`,children:Ce(e,n).map(e=>{if(e.kind===`component`)return w(e.component);let{group:t,members:n}=e,r=p.has(t.id),i=be(n.map(e=>e.state)),a=n.flatMap(e=>{let t=x(e);return t===null?[]:[{name:e.name,days:t}]}),o=a.length===n.length?he(a,u):null,s=n.map(S),c=s.every(e=>e!==null)?_e(s):null,l=`m-group-${t.id}`;return(0,D.jsxs)(`li`,{className:`m-row m-row--group`,children:[(0,D.jsxs)(`div`,{className:`m-row__head`,children:[(0,D.jsxs)(`div`,{className:`m-row__title`,children:[(0,D.jsxs)(`button`,{type:`button`,className:`m-group-toggle`,"aria-expanded":r,"aria-controls":l,onClick:()=>m(_(p,t.id)),children:[(0,D.jsx)(`span`,{className:`m-group-toggle__mark${r?` is-open`:``}`,children:(0,D.jsx)(N,{name:`chevron-right`,size:14})}),(0,D.jsx)(`h3`,{className:`m-row__name m-row__name--group`,children:t.name}),(0,D.jsxs)(`span`,{className:`m-muted`,children:[`· `,n.length===1?u(`public.modern.group.one`):u(`public.modern.group.count`,{count:n.length})]})]}),(0,D.jsx)(xe,{state:i}),n.some(e=>e.maintenance)&&(0,D.jsx)(W,{})]}),(0,D.jsx)(`div`,{className:`m-row__figures`,children:c!==null&&(0,D.jsx)(z,{figures:c})})]}),(0,D.jsx)(G,{days:o,label:u(`public.bars.label`,{component:t.name,period:d.days(f)}),input:b}),r&&(0,D.jsx)(`ul`,{id:l,className:`m-rows m-rows--nested`,children:n.map(e=>w(e,!0))})]},`group:${t.id}`)})}),(0,D.jsxs)(`div`,{className:`m-axis`,"aria-hidden":`true`,children:[(0,D.jsx)(`span`,{children:d.daysAgo(f)}),(0,D.jsx)(`span`,{children:u(`public.bars.today`)})]}),r!==void 0&&(0,D.jsx)(Te,{})]})}function Te(){let{t:e}=t(),n=[[`up`,e(`public.legend.up`)],[`degraded`,e(`public.legend.degraded`)],[`down`,e(`public.legend.down`)],[`maintenance`,e(`public.modern.legend.maintenance`)],[`none`,e(`public.legend.noData`)]];return(0,D.jsx)(`div`,{className:`m-legend`,children:(0,D.jsx)(`ul`,{className:`m-legend__items`,children:n.map(([e,t])=>(0,D.jsxs)(`li`,{children:[(0,D.jsx)(`span`,{className:`m-legend__swatch m-bg--${e}`,"aria-hidden":`true`}),t]},e))})})}var Ee=6048e5,K=new Map;function q(e){let t=`${e.locale} ${e.timeZone}`,n=K.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(e.locale,{hour:`numeric`,minute:`2-digit`,timeZoneName:`short`,timeZone:e.timeZone}),K.set(t,n)),n}function J(e,t,n){return n.date(e)===n.date(t)?q(n).format(e):n.dateTimeWithZone(e)}function De({body:e,freshness:n,now:r}){let{t:i,f:a}=t(),o=n.kind===`stale`,s=e.components.length>0,c=i(s?`public.overall.${e.overall}`:`public.overall.empty`),l=o?`stale`:s?e.overall:`unknown`,u=e.maintenance.active.length>0;return(0,D.jsxs)(`section`,{className:`m-overall`,"aria-labelledby":`m-overall-title`,children:[(0,D.jsxs)(`div`,{className:`m-overall__row`,children:[(0,D.jsx)(`span`,{className:`m-overall__glyph m-soft--${l}`,children:(0,D.jsx)(M,{tone:l,size:22})}),(0,D.jsx)(`h1`,{id:`m-overall-title`,className:`m-overall__title`,children:o?i(`public.overall.stale`):c})]}),o?(0,D.jsx)(`p`,{className:`m-overall__detail`,children:i(`public.overall.staleDetail`,{state:c,time:a.relative(e.generatedAt,r)})}):e.overall===`unknown`&&s?(0,D.jsx)(`p`,{className:`m-overall__detail`,children:i(`public.overall.unknownDetail`)}):null,u&&!o&&(0,D.jsx)(`p`,{className:`m-overall__detail`,children:i(`public.overall.maintenance`)}),(0,D.jsx)(`p`,{className:`m-overall__updated`,children:i(`public.modern.updated`,{time:a.dateTimeWithZone(e.generatedAt)})})]})}function Oe({freshness:e,dueAt:n,loading:r,now:i,onRetry:a}){let{t:o,f:s}=t(),c=e.kind===`fresh`||e.kind===`stale`?e.error:null;return c===null?null:(0,D.jsxs)(`div`,{className:`m-alert`,children:[(0,D.jsx)(`span`,{role:`status`,children:o(`public.freshness.failed`,{reason:w(c,o)})}),(0,D.jsx)(`span`,{children:r?o(`public.freshness.retrying`):n!==null&&o(`public.freshness.retryAt`,{time:s.relative(Math.max(n,i+1e3),i)})}),(0,D.jsx)(`button`,{type:`button`,className:`m-button m-button--small`,onClick:a,disabled:r,children:o(`public.freshness.retryNow`)})]})}function ke(){let{t:e}=t();return(0,D.jsx)(`div`,{className:`m-alert`,role:`status`,children:e(`public.freshness.incidentsOutdated`)})}var Y={none:`up`,degraded:`degraded`,down:`down`};function X(e,t,n){return n.list(e.components.map(n=>n.impact===e.impact?n.name:`${n.name} (${t(`impact.${n.impact}`)})`))}function Z({updates:e,now:n}){let{t:r,f:i}=t();return(0,D.jsx)(`ol`,{className:`m-timeline`,children:[...e].reverse().map(e=>(0,D.jsxs)(`li`,{className:`m-timeline__item`,children:[(0,D.jsxs)(`div`,{className:`m-timeline__when`,children:[(0,D.jsx)(`strong`,{children:r(`stage.${e.stage}`)}),(0,D.jsx)(`time`,{dateTime:new Date(e.createdAt).toISOString(),children:J(e.createdAt,n,i)})]}),(0,D.jsx)(`p`,{className:`m-timeline__body`,children:e.body})]},`${e.createdAt}:${e.stage}`))})}function Ae({incident:e,pageId:r,now:i}){let{t:a,f:o}=t(),s=Y[e.impact],c=J(e.startedAt,i,o);return(0,D.jsxs)(`article`,{className:`m-notice m-notice--${s}`,"aria-labelledby":`m-incident-${e.id}`,children:[(0,D.jsxs)(`div`,{className:`m-notice__meta`,children:[(0,D.jsx)(`span`,{className:`m-pill m-pill--${s}`,children:a(`impact.${e.impact}`)}),(0,D.jsx)(`span`,{className:`m-muted m-num`,children:e.components.length>0?a(`public.modern.incident.meta`,{time:c,components:X(e,a,o)}):a(`public.modern.incident.started`,{time:c})})]}),(0,D.jsx)(`h2`,{id:`m-incident-${e.id}`,className:`m-notice__title`,children:(0,D.jsx)(n,{href:l(r,e.id),children:e.title})}),(0,D.jsx)(Z,{updates:e.updates,now:i}),e.olderUpdates&&(0,D.jsx)(`p`,{children:(0,D.jsx)(n,{href:l(r,e.id),children:a(`public.incident.olderUpdates`)})})]})}function Q(e,t,n){let r=n.date(e.startsAt)===n.date(e.endsAt);return{from:J(e.startsAt,t,n),to:r?q(n).format(e.endsAt):n.dateTimeWithZone(e.endsAt)}}function je({maintenance:e,now:n}){let{t:r,f:i}=t(),a=Math.max(1,e.endsAt-e.startsAt),o=Math.floor(Math.min(a,Math.max(0,n-e.startsAt))/6e4)*6e4,s=i.list(e.components.map(e=>e.name));return(0,D.jsxs)(`article`,{className:`m-notice m-notice--maintenance`,"aria-labelledby":`m-maintenance-${e.id}`,children:[(0,D.jsxs)(`div`,{className:`m-notice__meta`,children:[(0,D.jsx)(`span`,{className:`m-pill m-pill--maintenance`,children:r(`public.modern.maintenance.badge`)}),(0,D.jsxs)(`span`,{className:`m-muted m-num`,children:[r(`public.modern.maintenance.window`,Q(e,n,i)),e.components.length>0&&(0,D.jsxs)(D.Fragment,{children:[` · `,r(`public.maintenance.components`,{components:s})]})]})]}),(0,D.jsx)(`h2`,{id:`m-maintenance-${e.id}`,className:`m-notice__title`,children:e.title}),(0,D.jsxs)(`div`,{className:`m-progress`,children:[(0,D.jsx)(`div`,{className:`m-progress__track`,role:`progressbar`,"aria-label":e.title,"aria-valuemin":0,"aria-valuemax":Math.round(a/6e4),"aria-valuenow":Math.round(o/6e4),"aria-valuetext":r(`public.modern.maintenance.progress`,{elapsed:i.duration(o),total:i.duration(a)}),children:(0,D.jsx)(`div`,{className:`m-progress__fill`,style:{width:`${o/a*100}%`}})}),(0,D.jsx)(`span`,{className:`m-muted m-small m-num`,children:r(`public.modern.maintenance.progress`,{elapsed:i.duration(o),total:i.duration(a)})})]}),e.body!==``&&(0,D.jsx)(`p`,{className:`m-notice__body`,children:e.body})]})}function Me({maintenance:e,now:n}){let{t:r,f:i}=t(),a=i.list(e.components.map(e=>e.name));return(0,D.jsxs)(`section`,{className:`m-upcoming`,"aria-labelledby":`m-upcoming-${e.id}`,children:[(0,D.jsx)(`span`,{className:`m-upcoming__icon`,children:(0,D.jsx)(N,{name:`calendar`,size:18})}),(0,D.jsxs)(`div`,{className:`m-upcoming__text`,children:[(0,D.jsx)(`p`,{className:`m-eyebrow`,children:r(`public.modern.maintenance.scheduled`)}),(0,D.jsx)(`h2`,{id:`m-upcoming-${e.id}`,className:`m-upcoming__title`,children:e.title}),(0,D.jsxs)(`p`,{className:`m-muted m-small m-num`,children:[r(`public.maintenance.window`,{from:i.dateTimeWithZone(e.startsAt),to:Q(e,n,i).to}),e.components.length>0&&(0,D.jsxs)(D.Fragment,{children:[` · `,r(`public.maintenance.components`,{components:a})]})]}),e.body!==``&&(0,D.jsx)(`p`,{className:`m-small m-upcoming__body`,children:e.body})]})]})}function $({incident:e,pageId:r,now:i}){let{t:a,f:o}=t(),[c,u]=(0,E.useState)(!1),d=ee(r,e.id),f=T(c?d:null,{load:e=>y(d,e),intervalMs:p,maxBackoffMs:m,isFatal:s}),h=Y[e.impact],g=e.resolvedAt===null?a(`public.incident.ongoingSince`,{time:o.dateTimeWithZone(e.startedAt)}):a(`public.modern.notices.period`,{from:o.dateTimeWithZone(e.startedAt),to:o.date(e.startedAt)===o.date(e.resolvedAt)?q(o).format(e.resolvedAt):o.dateTimeWithZone(e.resolvedAt)}),_=`m-past-${e.id}`,v=f.data?.body;return(0,D.jsxs)(`li`,{className:`m-past`,children:[(0,D.jsx)(`span`,{className:`m-past__glyph m-soft--${h}`,children:(0,D.jsx)(M,{tone:h,size:20})}),(0,D.jsxs)(`div`,{className:`m-past__text`,children:[(0,D.jsx)(`h3`,{className:`m-past__title`,children:(0,D.jsx)(n,{href:l(r,e.id),children:e.title})}),(0,D.jsxs)(`p`,{className:`m-muted m-small m-num`,children:[e.resolvedAt!==null&&(0,D.jsx)(`strong`,{className:`m-text--up`,children:a(`public.modern.notices.resolved`)}),e.resolvedAt!==null&&` · `,g,e.components.length>0&&(0,D.jsxs)(D.Fragment,{children:[` · `,X(e,a,o)]})]}),(0,D.jsxs)(`button`,{type:`button`,className:`m-link-button`,"aria-expanded":c,"aria-controls":_,onClick:()=>u(!c),children:[a(c?`public.modern.notices.hide`:`public.modern.notices.show`),(0,D.jsx)(`span`,{className:`m-chevron${c?` is-open`:``}`,children:(0,D.jsx)(N,{name:`chevron-down`,size:16})})]}),c&&(0,D.jsx)(`div`,{id:_,className:`m-past__updates`,children:v===void 0?f.error===null?(0,D.jsx)(`p`,{className:`m-muted m-small`,children:a(`ui.loading`)}):(0,D.jsx)(`p`,{className:`m-muted m-small`,children:a(`public.incident.earlierFailed`,{reason:w(f.error,a)})}):(0,D.jsx)(Z,{updates:v.updates,now:i})})]})]})}function Ne({pageId:e,refreshKey:r,now:i}){let{t:a}=t(),o=v(e,r),s=o.items.filter(e=>(e.resolvedAt??i)>=i-Ee);return(0,D.jsxs)(`section`,{className:`m-recent`,"aria-labelledby":`m-recent-title`,children:[(0,D.jsxs)(`div`,{className:`m-recent__head`,children:[(0,D.jsx)(`h2`,{id:`m-recent-title`,className:`m-eyebrow`,children:a(`public.modern.notices.heading`)}),(0,D.jsxs)(n,{href:h(e),className:`m-eyebrow-link`,children:[a(`public.modern.notices.history`),(0,D.jsx)(N,{name:`chevron-right`,size:14})]})]}),o.loaded?s.length===0?(0,D.jsx)(`p`,{className:`m-muted m-small`,children:a(`public.modern.notices.none`)}):(0,D.jsx)(`ul`,{className:`m-past-list`,children:s.map(t=>(0,D.jsx)($,{incident:t,pageId:e,now:i},t.id))}):(0,D.jsx)(`p`,{className:`m-muted m-small`,children:o.error===null?a(`ui.loading`):a(`public.history.failed`,{reason:w(o.error,a)})})]})}function Pe({frame:e,children:t}){return(0,D.jsx)(P,{appearance:e.appearance,title:e.title,home:e.home,reportUrl:e.reportUrl,children:t})}function Fe(){let{t:e}=t();return(0,D.jsx)(`div`,{className:`m-card__body m-card__body--waiting`,"aria-busy":`true`,children:(0,D.jsx)(`p`,{className:`m-muted`,children:e(`ui.loading`)})})}function Ie({reason:e,onRetry:n}){let{t:r}=t();return(0,D.jsxs)(`div`,{className:`m-card__body m-card__body--waiting`,children:[(0,D.jsx)(`h1`,{className:`m-overall__title`,children:r(`public.unavailable.title`)}),(0,D.jsx)(`p`,{role:`alert`,className:`m-alert`,children:r(`public.unavailable.detail`,{reason:e})}),(0,D.jsx)(`p`,{children:(0,D.jsx)(`button`,{type:`button`,className:`m-button`,onClick:n,children:r(`public.freshness.retryNow`)})})]})}function Le({message:e,back:r}){let{t:i}=t();return(0,D.jsxs)(`div`,{className:`m-card__body`,children:[(0,D.jsx)(`p`,{className:`m-back`,children:(0,D.jsxs)(n,{href:r,children:[`← `,i(`public.incident.back`)]})}),(0,D.jsx)(`h1`,{className:`m-overall__title`,children:i(`public.notFound.title`)}),(0,D.jsx)(`p`,{className:`m-muted`,children:e})]})}function Re(){return(0,D.jsx)(P,{appearance:void 0,title:null,home:`/`,reportUrl:null,children:(0,D.jsx)(Fe,{})})}function ze(e){return(0,D.jsx)(P,{appearance:void 0,title:null,home:`/`,reportUrl:null,children:(0,D.jsx)(Ie,{...e})})}function Be({pageId:e,body:r,status:i,history:a,stoppages:o,freshness:s,now:c}){let{t:l}=t(),u=r.components.some(e=>e.latency),d=ne(e),f=T(u?d:null,{load:e=>g(d,e),intervalMs:p,intervalAfter:e=>e.body.complete?p:x,maxBackoffMs:m}),_=r.incidentsOutdated||a.data?.body.incidentsOutdated===!0;return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)(`div`,{className:`m-card__body`,children:[(0,D.jsx)(De,{body:r,freshness:s,now:c}),(0,D.jsx)(Oe,{freshness:s,dueAt:i.dueAt,loading:i.loading,now:c,onRetry:i.refresh}),_&&(0,D.jsx)(ke,{}),r.incidents.map(t=>(0,D.jsx)(Ae,{incident:t,pageId:e,now:c},t.id)),r.maintenance.active.map(e=>(0,D.jsx)(je,{maintenance:e,now:c},e.id)),r.maintenance.upcoming.map(e=>(0,D.jsx)(Me,{maintenance:e,now:c},e.id)),(0,D.jsx)(we,{components:r.components,groups:r.groups,history:a.data?.body,historyFailed:a.error!==null,historyError:a.error===null?void 0:w(a.error,l),stoppages:o.data?.body.stoppages??[],latency:{data:f.data?.body,error:f.error},stale:s.kind===`stale`,now:c}),(0,D.jsx)(Ne,{pageId:e,refreshKey:r.incidents.map(e=>e.id).join(`,`),now:c})]}),(0,D.jsx)(`div`,{className:`m-card__foot`,children:(0,D.jsxs)(n,{href:h(e),className:`m-foot-link`,children:[l(`public.modern.notices.all`),(0,D.jsx)(N,{name:`chevron-right`,size:16})]})})]})}var Ve={none:`up`,degraded:`degraded`,down:`down`};function He(e){let{t:r,f:i}=t(),{incident:a,pageId:o,now:s}=e,c=Ve[a.impact];return(0,D.jsxs)(`div`,{className:`m-card__body`,children:[(0,D.jsx)(`p`,{className:`m-back`,children:(0,D.jsxs)(n,{href:d(o),children:[`← `,r(`public.incident.back`)]})}),(0,D.jsxs)(`article`,{className:`m-notice m-notice--${c} m-notice--page`,"aria-labelledby":`m-incident-title`,children:[(0,D.jsxs)(`div`,{className:`m-notice__meta`,children:[(0,D.jsx)(`span`,{className:`m-pill m-pill--${c}`,children:r(`impact.${a.impact}`)}),(0,D.jsx)(`span`,{className:`m-pill m-pill--stage`,children:r(`stage.${a.stage}`)})]}),(0,D.jsx)(`h1`,{id:`m-incident-title`,className:`m-notice__title m-notice__title--page`,children:a.title}),a.components.length>0&&(0,D.jsx)(`p`,{className:`m-muted m-small`,children:r(`public.incident.affects`,{components:i.list(a.components.map(e=>`${e.name} (${r(`impact.${e.impact}`)})`))})}),(0,D.jsx)(`p`,{className:`m-muted m-small m-num`,children:a.resolvedAt===null?r(`public.incident.ongoingSince`,{time:i.dateTimeWithZone(a.startedAt)}):r(`public.incident.lasted`,{from:i.dateTimeWithZone(a.startedAt),duration:i.duration(a.resolvedAt-a.startedAt)})}),(0,D.jsx)(Z,{updates:[...e.earlier,...a.updates],now:s}),e.canLoadEarlier&&(0,D.jsx)(`p`,{children:(0,D.jsx)(`button`,{type:`button`,className:`m-button`,onClick:e.onLoadEarlier,disabled:e.loadingEarlier,children:e.loadingEarlier?r(`ui.loading`):r(`public.incident.earlierUpdates`)})}),e.earlierError!==null&&(0,D.jsx)(`p`,{role:`alert`,className:`m-alert`,children:r(`public.incident.earlierFailed`,{reason:w(e.earlierError,r)})})]}),e.error!==null&&(0,D.jsxs)(`p`,{role:`status`,className:`m-alert`,children:[r(`public.freshness.failed`,{reason:w(e.error,r)}),` `,r(`public.freshness.updated`,{time:J(e.receivedAt??s,s,i)})]})]})}function Ue({pageId:e,stoppages:r,stoppagesFailed:i,names:a,refreshKey:o,now:s}){let{t:c}=t(),l=v(e,o);return(0,D.jsxs)(`div`,{className:`m-card__body`,children:[(0,D.jsx)(`p`,{className:`m-back`,children:(0,D.jsxs)(n,{href:d(e),children:[`← `,c(`public.incident.back`)]})}),(0,D.jsxs)(`section`,{"aria-labelledby":`m-history-title`,className:`m-history`,children:[(0,D.jsx)(`h1`,{id:`m-history-title`,className:`m-overall__title`,children:c(`public.modern.history.title`)}),l.loaded?l.items.length===0?(0,D.jsx)(`p`,{className:`m-muted m-small`,children:c(`public.history.none`)}):(0,D.jsx)(`ul`,{className:`m-past-list`,children:l.items.map(t=>(0,D.jsx)($,{incident:t,pageId:e,now:s},t.id))}):(0,D.jsx)(`p`,{className:`m-muted m-small`,children:l.error===null?c(`ui.loading`):c(`public.history.failed`,{reason:w(l.error,c)})}),l.hasMore&&(0,D.jsx)(`p`,{children:(0,D.jsx)(`button`,{type:`button`,className:`m-button`,onClick:()=>void l.loadMore(),disabled:l.loadingMore,children:l.loadingMore?c(`ui.loading`):c(`public.history.more`)})}),l.moreError!==null&&(0,D.jsx)(`p`,{role:`alert`,className:`m-alert`,children:c(`public.history.failed`,{reason:w(l.moreError,c)})})]}),(0,D.jsx)(`div`,{className:`m-stoppages`,children:(0,D.jsx)(f,{stoppages:r,names:a,failed:i,now:s})})]})}export{Pe as ModernFrame,Ue as ModernHistoryContent,He as ModernIncidentContent,Re as ModernLoadingView,Be as ModernStatusContent,ze as ModernUnavailableView,Fe as ModernViewLoading,Le as ModernViewNotFound,Ie as ModernViewUnavailable};
@@ -4,10 +4,10 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Status</title>
7
- <script type="module" crossorigin src="/assets/index-BgOspfsy.js"></script>
8
- <link rel="modulepreload" crossorigin href="/assets/src-BDi4qpij.js">
7
+ <script type="module" crossorigin src="/assets/index-RHRzex3u.js"></script>
8
+ <link rel="modulepreload" crossorigin href="/assets/src-seeRRxzL.js">
9
9
  <link rel="stylesheet" crossorigin href="/assets/src-C6ZFz-Gu.css">
10
- <link rel="stylesheet" crossorigin href="/assets/index-xpKyzvog.css">
10
+ <link rel="stylesheet" crossorigin href="/assets/index-BKO57-TM.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
@@ -14,6 +14,7 @@ The fonts of the modern template are also described in fonts.txt, next to this f
14
14
  - rolldown 1.2.19 (MIT)
15
15
  - scheduler 0.28.0 (MIT)
16
16
  - vite 8.3.8 (MIT)
17
+ - zod 4.6.7 (MIT)
17
18
 
18
19
  ----------------------------------------------------------------------------------------------------
19
20
  @fontsource-variable/inter 5.3.0 (OFL-1.1)
@@ -347,3 +348,29 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
347
348
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
348
349
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
349
350
  SOFTWARE.
351
+
352
+ ----------------------------------------------------------------------------------------------------
353
+ zod 4.6.7 (MIT)
354
+ https://zod.dev
355
+
356
+ MIT License
357
+
358
+ Copyright (c) 2025 Colin McDonnell
359
+
360
+ Permission is hereby granted, free of charge, to any person obtaining a copy
361
+ of this software and associated documentation files (the "Software"), to deal
362
+ in the Software without restriction, including without limitation the rights
363
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
364
+ copies of the Software, and to permit persons to whom the Software is
365
+ furnished to do so, subject to the following conditions:
366
+
367
+ The above copyright notice and this permission notice shall be included in all
368
+ copies or substantial portions of the Software.
369
+
370
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
371
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
372
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
373
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
374
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
375
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
376
+ SOFTWARE.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { A as addDays, C as resolveConfig, D as parseDuration, E as durationSchema, M as localDate, N as recentDays, O as confirmState, P as startOfLocalDay, S as defineConfig, T as LOCATION_HINTS, _ as worseOf, a as excludeWindows, b as INCIDENT_TEMPLATE_PLACEHOLDERS, c as mergeRanges, d as uptimeRatio, f as LATE_GRACE_MS, g as staleAfterMs, h as isCheckState, i as downPeriods, j as calendarDay, k as observationsNeeded, l as monitorTimeline, m as displayState, n as concatSegments, o as lateSpans, p as componentState, r as coverageRatio, s as mergeDownPeriods, t as combineTimelines, u as summarize, v as worstState, w as missingCapabilities, x as component, y as ConfigError } from "./chunks/timeline-YJXjehRf.js";
1
+ import { A as isNavMenu, B as calendarDay, C as resolveConfig, D as FRAME_LIMITS, E as EMPTY_HEADER, F as durationSchema, H as recentDays, I as parseDuration, L as confirmState, M as navLinkSchema, N as navUrlSchema, O as footerSchema, P as LOCATION_HINTS, R as observationsNeeded, S as defineConfig, T as EMPTY_FOOTER, U as startOfLocalDay, V as localDate, _ as worseOf, a as excludeWindows, b as INCIDENT_TEMPLATE_PLACEHOLDERS, c as mergeRanges, d as uptimeRatio, f as LATE_GRACE_MS, g as staleAfterMs, h as isCheckState, i as downPeriods, j as localizedTextSchema, k as headerSchema, l as monitorTimeline, m as displayState, n as concatSegments, o as lateSpans, p as componentState, r as coverageRatio, s as mergeDownPeriods, t as combineTimelines, u as summarize, v as worstState, w as missingCapabilities, x as component, y as ConfigError, z as addDays } from "./chunks/timeline-CsHxR6qb.js";
2
2
  import { i as defineProvider, n as RESERVED_MONITOR_KEYS, r as RESERVED_OPTION_KEYS, t as MONITOR_SETTING_KEYS } from "./chunks/monitor-B2u42off.js";
3
3
  import { a as pageTemplatesOf, i as formatPageTemplates, n as PAGE_TEMPLATES, o as parsePageTemplates, r as PAGE_TEMPLATES_META, s as withPageTemplates, t as DEFAULT_PAGE_TEMPLATE } from "./chunks/page-templates-DPZcMlic.js";
4
4
  import { a as MissingSecretError, c as resolveSecrets, d as secretOr, f as secretRefSchema, i as withheldRedirect, l as secret, n as MAX_REDIRECTS, o as isSecretRef, r as runCheck, s as redactSecrets, t as InsecureSecretError, u as secretNames } from "./chunks/run-check-bbo3LqI7.js";
@@ -13,6 +13,6 @@ var CAPABILITIES = [
13
13
  "tcp",
14
14
  "icmp"
15
15
  ];
16
- export { CAPABILITIES, ConfigError, DEFAULT_PAGE_TEMPLATE, INCIDENT_TEMPLATE_PLACEHOLDERS, InsecureSecretError, LATE_GRACE_MS, LOCATION_HINTS, MAX_REDIRECTS, MONITOR_SETTING_KEYS, MissingSecretError, NOTIFICATION_EVENTS, NotifierError, PAGE_TEMPLATES, PAGE_TEMPLATES_META, RESERVED_MONITOR_KEYS, RESERVED_OPTION_KEYS, addDays, calendarDay, combineTimelines, component, componentState, concatSegments, confirmState, coverageRatio, defineConfig, defineNotifier, defineProvider, destinationOptionOf, displayState, downPeriods, durationSchema, excludeWindows, expectSuccess, formatPageTemplates, isCheckState, isPublicHostname, isSecretRef, lateSpans, localDate, mergeDownPeriods, mergeRanges, missingCapabilities, monitorTimeline, observationsNeeded, pageTemplatesOf, parseDuration, parsePageTemplates, recentDays, redactSecrets, resolveConfig, resolveSecrets, retryAfterMs, runCheck, secret, secretNames, secretOr, secretRefSchema, staleAfterMs, startOfLocalDay, summarize, uptimeRatio, withPageTemplates, withheldRedirect, worseOf, worstState };
16
+ export { CAPABILITIES, ConfigError, DEFAULT_PAGE_TEMPLATE, EMPTY_FOOTER, EMPTY_HEADER, FRAME_LIMITS, INCIDENT_TEMPLATE_PLACEHOLDERS, InsecureSecretError, LATE_GRACE_MS, LOCATION_HINTS, MAX_REDIRECTS, MONITOR_SETTING_KEYS, MissingSecretError, NOTIFICATION_EVENTS, NotifierError, PAGE_TEMPLATES, PAGE_TEMPLATES_META, RESERVED_MONITOR_KEYS, RESERVED_OPTION_KEYS, addDays, calendarDay, combineTimelines, component, componentState, concatSegments, confirmState, coverageRatio, defineConfig, defineNotifier, defineProvider, destinationOptionOf, displayState, downPeriods, durationSchema, excludeWindows, expectSuccess, footerSchema, formatPageTemplates, headerSchema, isCheckState, isNavMenu, isPublicHostname, isSecretRef, lateSpans, localDate, localizedTextSchema, mergeDownPeriods, mergeRanges, missingCapabilities, monitorTimeline, navLinkSchema, navUrlSchema, observationsNeeded, pageTemplatesOf, parseDuration, parsePageTemplates, recentDays, redactSecrets, resolveConfig, resolveSecrets, retryAfterMs, runCheck, secret, secretNames, secretOr, secretRefSchema, staleAfterMs, startOfLocalDay, summarize, uptimeRatio, withPageTemplates, withheldRedirect, worseOf, worstState };
17
17
 
18
18
  //# sourceMappingURL=index.js.map