mirror of
https://github.com/ethanrusz/status.git
synced 2024-11-26 21:47:46 -05:00
2 lines
26 KiB
JavaScript
2 lines
26 KiB
JavaScript
import{S as e,i as t,s as a,a as n,e as r,c as s,b as l,d as c,f as i,g as o,h as d,j as h,t as u,k as f,l as m,o as p,m as g,n as v,p as $,q as E,r as w,u as D,v as _,w as y,x as T,y as I,z as S,A as b,B as L,C as k,D as q,E as R,H as M,F as N,G as A,I as H,J as V,K as U,L as B}from"./client.1ee3744f.js";import{c as C,a as O,h as P,L as x}from"./createOctokit.19a7018d.js";function F(e,t,a){const n=e.slice();return n[5]=t[a],n}function j(e){let t,a,n,s=w.i18n.allSystemsOperational+"";return{c(){t=r("article"),a=g("✅ "),n=g(s),this.h()},l(e){t=l(e,"ARTICLE",{class:!0});var r=c(t);a=v(r,"✅ "),n=v(r,s),r.forEach(i),this.h()},h(){o(t,"class","up")},m(e,r){d(e,t,r),$(t,a),$(t,n)},p:E,d(e){e&&i(t)}}}function Y(e){let t,a,o,h,u=w.i18n.activeIncidents+"",f=e[1],m=[];for(let t=0;t<f.length;t+=1)m[t]=z(F(e,f,t));return{c(){t=r("h2"),a=g(u),o=n();for(let e=0;e<m.length;e+=1)m[e].c();h=D()},l(e){t=l(e,"H2",{});var n=c(t);a=v(n,u),n.forEach(i),o=s(e);for(let t=0;t<m.length;t+=1)m[t].l(e);h=D()},m(e,n){d(e,t,n),$(t,a),d(e,o,n);for(let t=0;t<m.length;t+=1)m[t]&&m[t].m(e,n);d(e,h,n)},p(e,t){if(2&t){let a;for(f=e[1],a=0;a<f.length;a+=1){const n=F(e,f,a);m[a]?m[a].p(n,t):(m[a]=z(n),m[a].c(),m[a].m(h.parentNode,h))}for(;a<m.length;a+=1)m[a].d(1);m.length=f.length}},i:E,o:E,d(e){e&&i(t),e&&i(o),_(m,e),e&&i(h)}}}function W(e){let t,a;return t=new x({}),{c(){y(t.$$.fragment)},l(e){T(t.$$.fragment,e)},m(e,n){I(t,e,n),a=!0},p:E,i(e){a||(m(t.$$.fragment,e),a=!0)},o(e){u(t.$$.fragment,e),a=!1},d(e){S(t,e)}}}function z(e){let t,a,h,u,f,m,p,E,D,_,y,T,I,S,L,k=e[5].title.replace("🛑","").replace("⚠️","").trim()+"",q=w.i18n.activeIncidentSummary.replace(/\$DATE/g,new Date(e[5].created_at).toLocaleString()).replace(/\$POSTS/g,e[5].comments)+"",R=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"";return{c(){t=r("article"),a=r("div"),h=r("div"),u=r("h4"),f=g(k),m=n(),p=r("div"),E=g(q),D=n(),_=r("div"),y=r("a"),T=g(R),S=n(),this.h()},l(e){t=l(e,"ARTICLE",{class:!0});var n=c(t);a=l(n,"DIV",{class:!0});var r=c(a);h=l(r,"DIV",{});var o=c(h);u=l(o,"H4",{});var d=c(u);f=v(d,k),d.forEach(i),m=s(o),p=l(o,"DIV",{});var g=c(p);E=v(g,q),g.forEach(i),o.forEach(i),D=s(r),_=l(r,"DIV",{class:!0});var $=c(_);y=l($,"A",{href:!0});var w=c(y);T=v(w,R),w.forEach(i),$.forEach(i),r.forEach(i),S=s(n),n.forEach(i),this.h()},h(){o(y,"href",I=`${w.path}/incident/${e[5].number}`),o(_,"class","f r"),o(a,"class","f"),o(t,"class",L="down down-active link "+(e[5].title.includes("degraded")?"degraded":""))},m(e,n){d(e,t,n),$(t,a),$(a,h),$(h,u),$(u,f),$(h,m),$(h,p),$(p,E),$(a,D),$(a,_),$(_,y),$(y,T),$(t,S)},p(e,a){2&a&&k!==(k=e[5].title.replace("🛑","").replace("⚠️","").trim()+"")&&b(f,k),2&a&&q!==(q=w.i18n.activeIncidentSummary.replace(/\$DATE/g,new Date(e[5].created_at).toLocaleString()).replace(/\$POSTS/g,e[5].comments)+"")&&b(E,q),2&a&&R!==(R=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"")&&b(T,R),2&a&&I!==(I=`${w.path}/incident/${e[5].number}`)&&o(y,"href",I),2&a&&L!==(L="down down-active link "+(e[5].title.includes("degraded")?"degraded":""))&&o(t,"class",L)},d(e){e&&i(t)}}}function G(e){let t,a,p,g,v,$=!e[1].length&&!e[0]&&j();const E=[W,Y],w=[];function D(e,t){return e[0]?0:e[1].length?1:-1}return~(p=D(e))&&(g=w[p]=E[p](e)),{c(){$&&$.c(),t=n(),a=r("section"),g&&g.c(),this.h()},l(e){$&&$.l(e),t=s(e),a=l(e,"SECTION",{class:!0});var n=c(a);g&&g.l(n),n.forEach(i),this.h()},h(){o(a,"class","svelte-8lnl4f")},m(e,n){$&&$.m(e,n),d(e,t,n),d(e,a,n),~p&&w[p].m(a,null),v=!0},p(e,n){let[r]=n;e[1].length||e[0]?$&&($.d(1),$=null):$?$.p(e,r):($=j(),$.c(),$.m(t.parentNode,t));let s=p;p=D(e),p===s?~p&&w[p].p(e,r):(g&&(h(),u(w[s],1,1,(()=>{w[s]=null})),f()),~p?(g=w[p],g?g.p(e,r):(g=w[p]=E[p](e),g.c()),m(g,1),g.m(a,null)):g=null)},i(e){v||(m(g),v=!0)},o(e){u(g),v=!1},d(e){$&&$.d(e),e&&i(t),e&&i(a),~p&&w[p].d()}}}function J(e,t,a){let n=!0;const r=C(),s=w.owner,l=w.repo;let c=[];return p((async()=>{try{a(1,c=(await O(`issues-${s}-${l}`,(()=>r.issues.listForRepo({owner:s,repo:l,state:"open",filter:"all",sort:"created",direction:"desc",labels:"status"})))).data),a(1,c=c.map(((e,t)=>(e.showHeading=0===t||new Date(c[t-1].created_at).toLocaleDateString()!==new Date(e.created_at).toLocaleDateString(),e))))}catch(e){P(e)}a(0,n=!1)})),[n,c]}class K extends e{constructor(e){super(),t(this,e,J,G,a,{})}}function Q(e,t,a){const n=e.slice();return n[5]=t[a],n}function X(e){let t,a,o,h,u=w.i18n.scheduledMaintenance+"",f=e[1],m=[];for(let t=0;t<f.length;t+=1)m[t]=te(Q(e,f,t));return{c(){t=r("h2"),a=g(u),o=n();for(let e=0;e<m.length;e+=1)m[e].c();h=D()},l(e){t=l(e,"H2",{});var n=c(t);a=v(n,u),n.forEach(i),o=s(e);for(let t=0;t<m.length;t+=1)m[t].l(e);h=D()},m(e,n){d(e,t,n),$(t,a),d(e,o,n);for(let t=0;t<m.length;t+=1)m[t]&&m[t].m(e,n);d(e,h,n)},p(e,t){if(2&t){let a;for(f=e[1],a=0;a<f.length;a+=1){const n=Q(e,f,a);m[a]?m[a].p(n,t):(m[a]=te(n),m[a].c(),m[a].m(h.parentNode,h))}for(;a<m.length;a+=1)m[a].d(1);m.length=f.length}},i:E,o:E,d(e){e&&i(t),e&&i(o),_(m,e),e&&i(h)}}}function Z(e){let t,a;return t=new x({}),{c(){y(t.$$.fragment)},l(e){T(t.$$.fragment,e)},m(e,n){I(t,e,n),a=!0},p:E,i(e){a||(m(t.$$.fragment,e),a=!0)},o(e){u(t.$$.fragment,e),a=!1},d(e){S(t,e)}}}function ee(e){let t,a,n=(new Date(e[5].metadata.start).getTime()<(new Date).getTime()?w.i18n.scheduledMaintenanceSummaryStarted:w.i18n.scheduledMaintenanceSummaryStarts).replace(/\$DATE/g,new Date(e[5].metadata.start).toLocaleString()).replace(/\$DURATION/g,Math.floor((new Date(e[5].metadata.end).getTime()-new Date(e[5].metadata.start).getTime())/6e4))+"";return{c(){t=r("div"),a=g(n)},l(e){t=l(e,"DIV",{});var r=c(t);a=v(r,n),r.forEach(i)},m(e,n){d(e,t,n),$(t,a)},p(e,t){2&t&&n!==(n=(new Date(e[5].metadata.start).getTime()<(new Date).getTime()?w.i18n.scheduledMaintenanceSummaryStarted:w.i18n.scheduledMaintenanceSummaryStarts).replace(/\$DATE/g,new Date(e[5].metadata.start).toLocaleString()).replace(/\$DURATION/g,Math.floor((new Date(e[5].metadata.end).getTime()-new Date(e[5].metadata.start).getTime())/6e4))+"")&&b(a,n)},d(e){e&&i(t)}}}function te(e){let t,a,h,u,f,m,p,E,D,_,y,T,I=e[5].title.replace("🛑","").replace("⚠️","").trim()+"",S=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"",L=e[5].metadata.start&&e[5].metadata.end&&ee(e);return{c(){t=r("article"),a=r("div"),h=r("div"),u=r("h4"),f=g(I),m=n(),L&&L.c(),p=n(),E=r("div"),D=r("a"),_=g(S),T=n(),this.h()},l(e){t=l(e,"ARTICLE",{class:!0});var n=c(t);a=l(n,"DIV",{class:!0});var r=c(a);h=l(r,"DIV",{});var o=c(h);u=l(o,"H4",{});var d=c(u);f=v(d,I),d.forEach(i),m=s(o),L&&L.l(o),o.forEach(i),p=s(r),E=l(r,"DIV",{class:!0});var g=c(E);D=l(g,"A",{href:!0});var $=c(D);_=v($,S),$.forEach(i),g.forEach(i),r.forEach(i),T=s(n),n.forEach(i),this.h()},h(){o(D,"href",y=`${w.path}/incident/${e[5].number}`),o(E,"class","f r"),o(a,"class","f"),o(t,"class","degraded degraded-active link")},m(e,n){d(e,t,n),$(t,a),$(a,h),$(h,u),$(u,f),$(h,m),L&&L.m(h,null),$(a,p),$(a,E),$(E,D),$(D,_),$(t,T)},p(e,t){2&t&&I!==(I=e[5].title.replace("🛑","").replace("⚠️","").trim()+"")&&b(f,I),e[5].metadata.start&&e[5].metadata.end?L?L.p(e,t):(L=ee(e),L.c(),L.m(h,null)):L&&(L.d(1),L=null),2&t&&S!==(S=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"")&&b(_,S),2&t&&y!==(y=`${w.path}/incident/${e[5].number}`)&&o(D,"href",y)},d(e){e&&i(t),L&&L.d()}}}function ae(e){let t,a,n,s;const p=[Z,X],g=[];function v(e,t){return e[0]?0:e[1].length?1:-1}return~(a=v(e))&&(n=g[a]=p[a](e)),{c(){t=r("section"),n&&n.c(),this.h()},l(e){t=l(e,"SECTION",{class:!0});var a=c(t);n&&n.l(a),a.forEach(i),this.h()},h(){o(t,"class","svelte-8lnl4f")},m(e,n){d(e,t,n),~a&&g[a].m(t,null),s=!0},p(e,r){let[s]=r,l=a;a=v(e),a===l?~a&&g[a].p(e,s):(n&&(h(),u(g[l],1,1,(()=>{g[l]=null})),f()),~a?(n=g[a],n?n.p(e,s):(n=g[a]=p[a](e),n.c()),m(n,1),n.m(t,null)):n=null)},i(e){s||(m(n),s=!0)},o(e){u(n),s=!1},d(e){e&&i(t),~a&&g[a].d()}}}function ne(e,t,a){let n=!0;const r=C(),s=w.owner,l=w.repo;let c=[];return p((async()=>{try{a(1,c=(await O(`scheduled-current-${s}-${l}`,(()=>r.issues.listForRepo({owner:s,repo:l,state:"open",filter:"all",sort:"created",direction:"desc",labels:"maintenance"})))).data),a(1,c=c.map(((e,t)=>{if(e.showHeading=0===t||new Date(c[t-1].created_at).toLocaleDateString()!==new Date(e.created_at).toLocaleDateString(),e.metadata={},e.body.includes("\x3c!--")){e.body.split("\x3c!--")[1].split("--\x3e")[0].split("\n").filter((e=>e.trim())).filter((e=>e.includes(":"))).forEach((t=>{e.metadata[t.split(/:(.+)/)[0].trim()]=t.split(/:(.+)/)[1].trim()}))}return e})))}catch(e){P(e)}a(0,n=!1)})),[n,c]}class re extends e{constructor(e){super(),t(this,e,ne,ae,a,{})}}function se(e,t,a){const n=e.slice();return n[5]=t[a],n}function le(e){let t,a,h,u,f=w.i18n.pastIncidents+"",m=e[1],p=[];for(let t=0;t<m.length;t+=1)p[t]=oe(se(e,m,t));return{c(){t=r("h2"),a=g(f),h=n();for(let e=0;e<p.length;e+=1)p[e].c();u=D(),this.h()},l(e){t=l(e,"H2",{class:!0});var n=c(t);a=v(n,f),n.forEach(i),h=s(e);for(let t=0;t<p.length;t+=1)p[t].l(e);u=D(),this.h()},h(){o(t,"class","svelte-18y4uo2")},m(e,n){d(e,t,n),$(t,a),d(e,h,n);for(let t=0;t<p.length;t+=1)p[t]&&p[t].m(e,n);d(e,u,n)},p(e,t){if(2&t){let a;for(m=e[1],a=0;a<m.length;a+=1){const n=se(e,m,a);p[a]?p[a].p(n,t):(p[a]=oe(n),p[a].c(),p[a].m(u.parentNode,u))}for(;a<p.length;a+=1)p[a].d(1);p.length=m.length}},i:E,o:E,d(e){e&&i(t),e&&i(h),_(p,e),e&&i(u)}}}function ce(e){let t,a;return t=new x({}),{c(){y(t.$$.fragment)},l(e){T(t.$$.fragment,e)},m(e,n){I(t,e,n),a=!0},p:E,i(e){a||(m(t.$$.fragment,e),a=!0)},o(e){u(t.$$.fragment,e),a=!1},d(e){S(t,e)}}}function ie(e){let t,a,n=new Date(e[5].created_at).toLocaleDateString()+"";return{c(){t=r("h3"),a=g(n)},l(e){t=l(e,"H3",{});var r=c(t);a=v(r,n),r.forEach(i)},m(e,n){d(e,t,n),$(t,a)},p(e,t){2&t&&n!==(n=new Date(e[5].created_at).toLocaleDateString()+"")&&b(a,n)},d(e){e&&i(t)}}}function oe(e){let t,a,h,u,f,m,p,E,D,_,y,T,I,S,L,k=e[5].title.replace("🛑","").replace("⚠️","").trim()+"",q=w.i18n.pastIncidentsResolved.replace(/\$MINUTES/g,((new Date(e[5].closed_at).getTime()-new Date(e[5].created_at).getTime())/6e4).toFixed(0)).replace(/\$POSTS/g,e[5].comments)+"",R=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"",M=e[5].showHeading&&ie(e);return{c(){M&&M.c(),t=n(),a=r("article"),h=r("div"),u=r("div"),f=r("h4"),m=g(k),p=n(),E=r("div"),D=n(),_=r("div"),y=r("a"),T=g(R),S=n(),this.h()},l(e){M&&M.l(e),t=s(e),a=l(e,"ARTICLE",{class:!0});var n=c(a);h=l(n,"DIV",{class:!0});var r=c(h);u=l(r,"DIV",{});var o=c(u);f=l(o,"H4",{});var d=c(f);m=v(d,k),d.forEach(i),p=s(o),E=l(o,"DIV",{}),c(E).forEach(i),o.forEach(i),D=s(r),_=l(r,"DIV",{class:!0});var g=c(_);y=l(g,"A",{href:!0});var $=c(y);T=v($,R),$.forEach(i),g.forEach(i),r.forEach(i),S=s(n),n.forEach(i),this.h()},h(){o(y,"href",I=`${w.path}/incident/${e[5].number}`),o(_,"class","f r"),o(h,"class","f"),o(a,"class",L="down link "+(e[5].title.includes("degraded")?"degraded":""))},m(e,n){M&&M.m(e,n),d(e,t,n),d(e,a,n),$(a,h),$(h,u),$(u,f),$(f,m),$(u,p),$(u,E),E.innerHTML=q,$(h,D),$(h,_),$(_,y),$(y,T),$(a,S)},p(e,n){e[5].showHeading?M?M.p(e,n):(M=ie(e),M.c(),M.m(t.parentNode,t)):M&&(M.d(1),M=null),2&n&&k!==(k=e[5].title.replace("🛑","").replace("⚠️","").trim()+"")&&b(m,k),2&n&&q!==(q=w.i18n.pastIncidentsResolved.replace(/\$MINUTES/g,((new Date(e[5].closed_at).getTime()-new Date(e[5].created_at).getTime())/6e4).toFixed(0)).replace(/\$POSTS/g,e[5].comments)+"")&&(E.innerHTML=q),2&n&&R!==(R=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"")&&b(T,R),2&n&&I!==(I=`${w.path}/incident/${e[5].number}`)&&o(y,"href",I),2&n&&L!==(L="down link "+(e[5].title.includes("degraded")?"degraded":""))&&o(a,"class",L)},d(e){M&&M.d(e),e&&i(t),e&&i(a)}}}function de(e){let t,a,n,s;const o=[ce,le],p=[];function g(e,t){return e[0]?0:e[1].length?1:-1}return~(a=g(e))&&(n=p[a]=o[a](e)),{c(){t=r("section"),n&&n.c()},l(e){t=l(e,"SECTION",{});var a=c(t);n&&n.l(a),a.forEach(i)},m(e,n){d(e,t,n),~a&&p[a].m(t,null),s=!0},p(e,r){let[s]=r,l=a;a=g(e),a===l?~a&&p[a].p(e,s):(n&&(h(),u(p[l],1,1,(()=>{p[l]=null})),f()),~a?(n=p[a],n?n.p(e,s):(n=p[a]=o[a](e),n.c()),m(n,1),n.m(t,null)):n=null)},i(e){s||(m(n),s=!0)},o(e){u(n),s=!1},d(e){e&&i(t),~a&&p[a].d()}}}function he(e,t,a){let n=!0;const r=C(),s=w.owner,l=w.repo;let c=[];return p((async()=>{try{a(1,c=(await O(`closed-issues-${s}-${l}`,(()=>r.issues.listForRepo({owner:s,repo:l,state:"closed",filter:"all",sort:"created",direction:"desc",labels:"status"})))).data)}catch(e){P(e)}a(1,c=c.map(((e,t)=>(e.showHeading=0===t||new Date(c[t-1].created_at).toLocaleDateString()!==new Date(e.created_at).toLocaleDateString(),e)))),a(0,n=!1)})),[n,c]}class ue extends e{constructor(e){super(),t(this,e,he,de,a,{})}}function fe(e,t,a){const n=e.slice();return n[18]=t[a],n}function me(e){let t,a=e[1],n=[];for(let t=0;t<a.length;t+=1)n[t]=ve(fe(e,a,t));return{c(){for(let e=0;e<n.length;e+=1)n[e].c();t=D()},l(e){for(let t=0;t<n.length;t+=1)n[t].l(e);t=D()},m(e,a){for(let t=0;t<n.length;t+=1)n[t]&&n[t].m(e,a);d(e,t,a)},p(e,r){if(26&r){let s;for(a=e[1],s=0;s<a.length;s+=1){const l=fe(e,a,s);n[s]?n[s].p(l,r):(n[s]=ve(l),n[s].c(),n[s].m(t.parentNode,t))}for(;s<n.length;s+=1)n[s].d(1);n.length=a.length}},i:E,o:E,d(e){_(n,e),e&&i(t)}}}function pe(e){let t,a;return t=new x({}),{c(){y(t.$$.fragment)},l(e){T(t.$$.fragment,e)},m(e,n){I(t,e,n),a=!0},p:E,i(e){a||(m(t.$$.fragment,e),a=!0)},o(e){u(t.$$.fragment,e),a=!1},d(e){S(t,e)}}}function ge(e){let t,a,h,u,f,m,p,E=w.i18n.averageResponseTime.split("$TIME")[0]+"",D=("day"===e[3]?e[18].timeDay:"week"===e[3]?e[18].timeWeek:"month"===e[3]?e[18].timeMonth:"year"===e[3]?e[18].timeYear:e[18].time)+"",_=w.i18n.averageResponseTime.split("$TIME")[1]+"";return{c(){t=r("div"),a=new M(!1),h=n(),u=r("span"),f=g(D),m=n(),p=new M(!1),this.h()},l(e){t=l(e,"DIV",{});var n=c(t);a=N(n,!1),h=s(n),u=l(n,"SPAN",{class:!0});var r=c(u);f=v(r,D),m=s(r),p=N(r,!1),r.forEach(i),n.forEach(i),this.h()},h(){a.a=h,p.a=null,o(u,"class","data svelte-fqsq6s")},m(e,n){d(e,t,n),a.m(E,t),$(t,h),$(t,u),$(u,f),$(u,m),p.m(_,u)},p(e,t){10&t&&D!==(D=("day"===e[3]?e[18].timeDay:"week"===e[3]?e[18].timeWeek:"month"===e[3]?e[18].timeMonth:"year"===e[3]?e[18].timeYear:e[18].time)+"")&&b(f,D)},d(e){e&&i(t)}}}function ve(e){let t,a,h,u,f,m,p,E,D,_,y,T,I,S,L,k,q,R,U,B=e[18].name+"",C=w.i18n.overallUptime.split("$UPTIME")[0]+"",O=("day"===e[3]?e[18].uptimeDay:"week"===e[3]?e[18].uptimeWeek:"month"===e[3]?e[18].uptimeMonth:"year"===e[3]?e[18].uptimeYear:e[18].uptime)+"",P=w.i18n.overallUptime.split("$UPTIME")[1]+"",x=(void 0===e[18].showAverageResponseTime||e[18].showAverageResponseTime)&&ge(e);return{c(){t=r("article"),a=r("h4"),h=r("img"),f=n(),m=r("a"),p=g(B),D=n(),_=r("div"),y=new M(!1),T=n(),I=r("span"),S=g(O),L=n(),k=new M(!1),q=n(),x&&x.c(),R=n(),this.h()},l(e){t=l(e,"ARTICLE",{class:!0,style:!0});var n=c(t);a=l(n,"H4",{});var r=c(a);h=l(r,"IMG",{class:!0,alt:!0,src:!0}),f=s(r),m=l(r,"A",{href:!0,class:!0});var o=c(m);p=v(o,B),o.forEach(i),r.forEach(i),D=s(n),_=l(n,"DIV",{});var d=c(_);y=N(d,!1),T=s(d),I=l(d,"SPAN",{class:!0});var u=c(I);S=v(u,O),L=s(u),k=N(u,!1),u.forEach(i),d.forEach(i),q=s(n),x&&x.l(n),R=s(n),n.forEach(i),this.h()},h(){o(h,"class","icon svelte-fqsq6s"),o(h,"alt",""),A(h.src,u=e[18].icon)||o(h,"src",u),o(m,"href",E=`${w.path}/history/${e[18].slug}`),o(m,"class","svelte-fqsq6s"),y.a=T,k.a=null,o(I,"class","data svelte-fqsq6s"),o(t,"class",U=H(`${e[18].status} link graph`)+" svelte-fqsq6s"),V(t,"--background",`url('${e[4]}/${e[18].slug}/response-time${"day"===e[3]?"-day":"week"===e[3]?"-week":"month"===e[3]?"-month":"year"===e[3]?"-year":""}.png')`)},m(e,n){d(e,t,n),$(t,a),$(a,h),$(a,f),$(a,m),$(m,p),$(t,D),$(t,_),y.m(C,_),$(_,T),$(_,I),$(I,S),$(I,L),k.m(P,I),$(t,q),x&&x.m(t,null),$(t,R)},p(e,a){2&a&&!A(h.src,u=e[18].icon)&&o(h,"src",u),2&a&&B!==(B=e[18].name+"")&&b(p,B),2&a&&E!==(E=`${w.path}/history/${e[18].slug}`)&&o(m,"href",E),10&a&&O!==(O=("day"===e[3]?e[18].uptimeDay:"week"===e[3]?e[18].uptimeWeek:"month"===e[3]?e[18].uptimeMonth:"year"===e[3]?e[18].uptimeYear:e[18].uptime)+"")&&b(S,O),void 0===e[18].showAverageResponseTime||e[18].showAverageResponseTime?x?x.p(e,a):(x=ge(e),x.c(),x.m(t,R)):x&&(x.d(1),x=null),2&a&&U!==(U=H(`${e[18].status} link graph`)+" svelte-fqsq6s")&&o(t,"class",U),10&a&&V(t,"--background",`url('${e[4]}/${e[18].slug}/response-time${"day"===e[3]?"-day":"week"===e[3]?"-week":"month"===e[3]?"-month":"year"===e[3]?"-year":""}.png')`)},d(e){e&&i(t),x&&x.d()}}}function $e(e){let t,a,p,E,D,_,y,T,I,S,b,R,M,N,A,H,V,U,B,C,O,P,x,F,j,Y,W,z,G,J,K,Q,X,Z,ee,te,ae,ne=w.i18n.liveStatus+"",re=w.i18n.duration24H+"",se=w.i18n.duration7D+"",le=w.i18n.duration30D+"",ce=w.i18n.duration1Y+"",ie=w.i18n.durationAll+"";const oe=[pe,me],de=[];function he(e,t){return e[0]?0:e[1].length?1:-1}return~(Q=he(e))&&(X=de[Q]=oe[Q](e)),ee=L(e[7][0]),{c(){t=r("div"),a=r("h2"),p=g(ne),E=n(),D=r("form"),_=r("div"),y=r("input"),T=r("label"),I=g(re),S=n(),b=r("div"),R=r("input"),M=r("label"),N=g(se),A=n(),H=r("div"),V=r("input"),U=r("label"),B=g(le),C=n(),O=r("div"),P=r("input"),x=r("label"),F=g(ce),j=n(),Y=r("div"),W=r("input"),z=r("label"),G=g(ie),J=n(),K=r("section"),X&&X.c(),this.h()},l(e){t=l(e,"DIV",{class:!0});var n=c(t);a=l(n,"H2",{});var r=c(a);p=v(r,ne),r.forEach(i),E=s(n),D=l(n,"FORM",{class:!0});var o=c(D);_=l(o,"DIV",{});var d=c(_);y=l(d,"INPUT",{name:!0,type:!0,id:!0,class:!0}),T=l(d,"LABEL",{for:!0,class:!0});var h=c(T);I=v(h,re),h.forEach(i),d.forEach(i),S=s(o),b=l(o,"DIV",{});var u=c(b);R=l(u,"INPUT",{name:!0,type:!0,id:!0,class:!0}),M=l(u,"LABEL",{for:!0,class:!0});var f=c(M);N=v(f,se),f.forEach(i),u.forEach(i),A=s(o),H=l(o,"DIV",{});var m=c(H);V=l(m,"INPUT",{name:!0,type:!0,id:!0,class:!0}),U=l(m,"LABEL",{for:!0,class:!0});var g=c(U);B=v(g,le),g.forEach(i),m.forEach(i),C=s(o),O=l(o,"DIV",{});var $=c(O);P=l($,"INPUT",{name:!0,type:!0,id:!0,class:!0}),x=l($,"LABEL",{for:!0,class:!0});var w=c(x);F=v(w,ce),w.forEach(i),$.forEach(i),j=s(o),Y=l(o,"DIV",{});var L=c(Y);W=l(L,"INPUT",{name:!0,type:!0,id:!0,class:!0}),z=l(L,"LABEL",{for:!0,class:!0});var k=c(z);G=v(k,ie),k.forEach(i),L.forEach(i),o.forEach(i),n.forEach(i),J=s(e),K=l(e,"SECTION",{class:!0});var q=c(K);X&&X.l(q),q.forEach(i),this.h()},h(){y.__value="day",y.value=y.__value,o(y,"name","d"),o(y,"type","radio"),o(y,"id","data_day"),o(y,"class","svelte-fqsq6s"),o(T,"for","data_day"),o(T,"class","svelte-fqsq6s"),R.__value="week",R.value=R.__value,o(R,"name","d"),o(R,"type","radio"),o(R,"id","data_week"),o(R,"class","svelte-fqsq6s"),o(M,"for","data_week"),o(M,"class","svelte-fqsq6s"),V.__value="month",V.value=V.__value,o(V,"name","d"),o(V,"type","radio"),o(V,"id","data_month"),o(V,"class","svelte-fqsq6s"),o(U,"for","data_month"),o(U,"class","svelte-fqsq6s"),P.__value="year",P.value=P.__value,o(P,"name","d"),o(P,"type","radio"),o(P,"id","data_year"),o(P,"class","svelte-fqsq6s"),o(x,"for","data_year"),o(x,"class","svelte-fqsq6s"),W.__value="all",W.value=W.__value,o(W,"name","d"),o(W,"type","radio"),o(W,"id","data_all"),o(W,"class","svelte-fqsq6s"),o(z,"for","data_all"),o(z,"class","svelte-fqsq6s"),o(D,"class","f r svelte-fqsq6s"),o(t,"class","f changed svelte-fqsq6s"),o(K,"class","live-status svelte-fqsq6s"),ee.p(y,R,V,P,W)},m(n,r){d(n,t,r),$(t,a),$(a,p),$(t,E),$(t,D),$(D,_),$(_,y),y.checked=y.__value===e[3],$(_,T),$(T,I),$(D,S),$(D,b),$(b,R),R.checked=R.__value===e[3],$(b,M),$(M,N),$(D,A),$(D,H),$(H,V),V.checked=V.__value===e[3],$(H,U),$(U,B),$(D,C),$(D,O),$(O,P),P.checked=P.__value===e[3],$(O,x),$(x,F),$(D,j),$(D,Y),$(Y,W),W.checked=W.__value===e[3],$(Y,z),$(z,G),e[12](t),d(n,J,r),d(n,K,r),~Q&&de[Q].m(K,null),Z=!0,te||(ae=[k(y,"change",e[6]),k(y,"change",e[5]),k(R,"change",e[8]),k(R,"change",e[5]),k(V,"change",e[9]),k(V,"change",e[5]),k(P,"change",e[10]),k(P,"change",e[5]),k(W,"change",e[11]),k(W,"change",e[5])],te=!0)},p(e,t){let[a]=t;8&a&&(y.checked=y.__value===e[3]),8&a&&(R.checked=R.__value===e[3]),8&a&&(V.checked=V.__value===e[3]),8&a&&(P.checked=P.__value===e[3]),8&a&&(W.checked=W.__value===e[3]);let n=Q;Q=he(e),Q===n?~Q&&de[Q].p(e,a):(X&&(h(),u(de[n],1,1,(()=>{de[n]=null})),f()),~Q?(X=de[Q],X?X.p(e,a):(X=de[Q]=oe[Q](e),X.c()),m(X,1),X.m(K,null)):X=null)},i(e){Z||(m(X),Z=!0)},o(e){u(X),Z=!1},d(a){a&&i(t),e[12](null),a&&i(J),a&&i(K),~Q&&de[Q].d(),ee.r(),te=!1,q(ae)}}}function Ee(e,t,a){let n=!0;C();const r=w.owner,s=w.repo;let l=[],{apiBaseUrl:c,userContentBaseUrl:i}=w["status-website"]||{};c||(c="https://api.github.com"),i||(i="https://raw.githubusercontent.com");const o=`${i}/${r}/${s}/master/graphs`;let d=null,h="week";p((async()=>{try{const e=await fetch(`${i}/${r}/${s}/master/history/summary.json`);a(1,l=await e.json())}catch(e){P(e)}a(0,n=!1),d&&d.classList.remove("changed")}));return[n,l,d,h,o,()=>{d&&(d.classList.add("changed"),setTimeout((()=>d.classList.remove("changed")),500))},function(){h=this.__value,a(3,h)},[[]],function(){h=this.__value,a(3,h)},function(){h=this.__value,a(3,h)},function(){h=this.__value,a(3,h)},function(){h=this.__value,a(3,h)},function(e){R[e?"unshift":"push"]((()=>{d=e,a(2,d)}))}]}class we extends e{constructor(e){super(),t(this,e,Ee,$e,a,{})}}function De(e,t,a){const n=e.slice();return n[5]=t[a],n}function _e(e){let t,a,h,u,f=w.i18n.pastScheduledMaintenance+"",m=e[1],p=[];for(let t=0;t<m.length;t+=1)p[t]=Ie(De(e,m,t));return{c(){t=r("h2"),a=g(f),h=n();for(let e=0;e<p.length;e+=1)p[e].c();u=D(),this.h()},l(e){t=l(e,"H2",{class:!0});var n=c(t);a=v(n,f),n.forEach(i),h=s(e);for(let t=0;t<p.length;t+=1)p[t].l(e);u=D(),this.h()},h(){o(t,"class","svelte-18y4uo2")},m(e,n){d(e,t,n),$(t,a),d(e,h,n);for(let t=0;t<p.length;t+=1)p[t]&&p[t].m(e,n);d(e,u,n)},p(e,t){if(2&t){let a;for(m=e[1],a=0;a<m.length;a+=1){const n=De(e,m,a);p[a]?p[a].p(n,t):(p[a]=Ie(n),p[a].c(),p[a].m(u.parentNode,u))}for(;a<p.length;a+=1)p[a].d(1);p.length=m.length}},i:E,o:E,d(e){e&&i(t),e&&i(h),_(p,e),e&&i(u)}}}function ye(e){let t,a;return t=new x({}),{c(){y(t.$$.fragment)},l(e){T(t.$$.fragment,e)},m(e,n){I(t,e,n),a=!0},p:E,i(e){a||(m(t.$$.fragment,e),a=!0)},o(e){u(t.$$.fragment,e),a=!1},d(e){S(t,e)}}}function Te(e){let t,a,n=new Date(e[5].created_at).toLocaleDateString()+"";return{c(){t=r("h3"),a=g(n)},l(e){t=l(e,"H3",{});var r=c(t);a=v(r,n),r.forEach(i)},m(e,n){d(e,t,n),$(t,a)},p(e,t){2&t&&n!==(n=new Date(e[5].created_at).toLocaleDateString()+"")&&b(a,n)},d(e){e&&i(t)}}}function Ie(e){let t,a,h,u,f,m,p,E,D,_,y,T,I,S,L,k=e[5].title.replace("🛑","").replace("⚠️","").trim()+"",q=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"",R=e[5].showHeading&&Te(e);return{c(){R&&R.c(),t=n(),a=r("article"),h=r("div"),u=r("div"),f=r("h4"),m=g(k),p=n(),E=r("div"),D=g("Completed"),_=n(),y=r("div"),T=r("a"),I=g(q),L=n(),this.h()},l(e){R&&R.l(e),t=s(e),a=l(e,"ARTICLE",{class:!0});var n=c(a);h=l(n,"DIV",{class:!0});var r=c(h);u=l(r,"DIV",{});var o=c(u);f=l(o,"H4",{});var d=c(f);m=v(d,k),d.forEach(i),p=s(o),E=l(o,"DIV",{});var g=c(E);D=v(g,"Completed"),g.forEach(i),o.forEach(i),_=s(r),y=l(r,"DIV",{class:!0});var $=c(y);T=l($,"A",{href:!0});var w=c(T);I=v(w,q),w.forEach(i),$.forEach(i),r.forEach(i),L=s(n),n.forEach(i),this.h()},h(){o(T,"href",S=`${w.path}/incident/${e[5].number}`),o(y,"class","f r"),o(h,"class","f"),o(a,"class","link degraded")},m(e,n){R&&R.m(e,n),d(e,t,n),d(e,a,n),$(a,h),$(h,u),$(u,f),$(f,m),$(u,p),$(u,E),$(E,D),$(h,_),$(h,y),$(y,T),$(T,I),$(a,L)},p(e,a){e[5].showHeading?R?R.p(e,a):(R=Te(e),R.c(),R.m(t.parentNode,t)):R&&(R.d(1),R=null),2&a&&k!==(k=e[5].title.replace("🛑","").replace("⚠️","").trim()+"")&&b(m,k),2&a&&q!==(q=w.i18n.incidentReport.replace(/\$NUMBER/g,e[5].number)+"")&&b(I,q),2&a&&S!==(S=`${w.path}/incident/${e[5].number}`)&&o(T,"href",S)},d(e){R&&R.d(e),e&&i(t),e&&i(a)}}}function Se(e){let t,a,n,s;const o=[ye,_e],p=[];function g(e,t){return e[0]?0:e[1].length?1:-1}return~(a=g(e))&&(n=p[a]=o[a](e)),{c(){t=r("section"),n&&n.c()},l(e){t=l(e,"SECTION",{});var a=c(t);n&&n.l(a),a.forEach(i)},m(e,n){d(e,t,n),~a&&p[a].m(t,null),s=!0},p(e,r){let[s]=r,l=a;a=g(e),a===l?~a&&p[a].p(e,s):(n&&(h(),u(p[l],1,1,(()=>{p[l]=null})),f()),~a?(n=p[a],n?n.p(e,s):(n=p[a]=o[a](e),n.c()),m(n,1),n.m(t,null)):n=null)},i(e){s||(m(n),s=!0)},o(e){u(n),s=!1},d(e){e&&i(t),~a&&p[a].d()}}}function be(e,t,a){let n=!0;const r=C(),s=w.owner,l=w.repo;let c=[];return p((async()=>{try{a(1,c=(await O(`maintenance-issues-${s}-${l}`,(()=>r.issues.listForRepo({owner:s,repo:l,state:"closed",filter:"all",sort:"created",direction:"desc",labels:"maintenance"})))).data)}catch(e){P(e)}a(1,c=c.map(((e,t)=>(e.showHeading=0===t||new Date(c[t-1].created_at).toLocaleDateString()!==new Date(e.created_at).toLocaleDateString(),e)))),a(0,n=!1)})),[n,c]}class Le extends e{constructor(e){super(),t(this,e,be,Se,a,{})}}function ke(e){let t,a=B(w["status-website"].introTitle)+"";return{c(){t=r("h1")},l(e){t=l(e,"H1",{}),c(t).forEach(i)},m(e,n){d(e,t,n),t.innerHTML=a},p:E,d(e){e&&i(t)}}}function qe(e){let t,a=B(w["status-website"].introMessage)+"";return{c(){t=r("p"),this.h()},l(e){t=l(e,"P",{class:!0}),c(t).forEach(i),this.h()},h(){o(t,"class","lead svelte-ngkazm")},m(e,n){d(e,t,n),t.innerHTML=a},p:E,d(e){e&&i(t)}}}function Re(e){let t,a,h,f,p,g,v,$,E,_,b,L,k,q;document.title=t=e[0];let R=w["status-website"]&&function(e){let t,a,r=w["status-website"].introTitle&&ke(),l=w["status-website"].introMessage&&qe();return{c(){r&&r.c(),t=n(),l&&l.c(),a=D()},l(e){r&&r.l(e),t=s(e),l&&l.l(e),a=D()},m(e,n){r&&r.m(e,n),d(e,t,n),l&&l.m(e,n),d(e,a,n)},p(e,t){w["status-website"].introTitle&&r.p(e,t),w["status-website"].introMessage&&l.p(e,t)},d(e){r&&r.d(e),e&&i(t),l&&l.d(e),e&&i(a)}}}();return p=new K({}),v=new re({}),E=new we({}),b=new Le({}),k=new ue({}),{c(){a=n(),h=r("header"),R&&R.c(),f=n(),y(p.$$.fragment),g=n(),y(v.$$.fragment),$=n(),y(E.$$.fragment),_=n(),y(b.$$.fragment),L=n(),y(k.$$.fragment),this.h()},l(e){U("svelte-1258swp",document.head).forEach(i),a=s(e),h=l(e,"HEADER",{class:!0});var t=c(h);R&&R.l(t),t.forEach(i),f=s(e),T(p.$$.fragment,e),g=s(e),T(v.$$.fragment,e),$=s(e),T(E.$$.fragment,e),_=s(e),T(b.$$.fragment,e),L=s(e),T(k.$$.fragment,e),this.h()},h(){o(h,"class","svelte-ngkazm")},m(e,t){d(e,a,t),d(e,h,t),R&&R.m(h,null),d(e,f,t),I(p,e,t),d(e,g,t),I(v,e,t),d(e,$,t),I(E,e,t),d(e,_,t),I(b,e,t),d(e,L,t),I(k,e,t),q=!0},p(e,a){let[n]=a;(!q||1&n)&&t!==(t=e[0])&&(document.title=t),w["status-website"]&&R.p(e,n)},i(e){q||(m(p.$$.fragment,e),m(v.$$.fragment,e),m(E.$$.fragment,e),m(b.$$.fragment,e),m(k.$$.fragment,e),q=!0)},o(e){u(p.$$.fragment,e),u(v.$$.fragment,e),u(E.$$.fragment,e),u(b.$$.fragment,e),u(k.$$.fragment,e),q=!1},d(e){e&&i(a),e&&i(h),R&&R.d(),e&&i(f),S(p,e),e&&i(g),S(v,e),e&&i($),S(E,e),e&&i(_),S(b,e),e&&i(L),S(k,e)}}}function Me(e,t,a){let n="Status";try{n=w["status-website"].name}catch(e){}return[n]}class Ne extends e{constructor(e){super(),t(this,e,Me,Re,a,{})}}export{Ne as default};
|