(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[15],{"1U+3":function(t,e,n){"use strict";function i(t){return(i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}n.d(e,"a",(function(){return o}));var r=n("g2+O");function o(t,e){return!e||"object"!==i(e)&&"function"!==typeof e?Object(r.a)(t):e}},"1pMm":function(t,e,n){"use strict";var i=n("oYCi"),r=n("/dBk"),o=n.n(r),a=n("qd51"),c=n("mXGw"),s=n.n(c),p=n("UutA"),l=n("m6w3"),u=n("uEoR"),d=n("oA/F"),f=n("dAGg"),h=n.n(f),b=n("1wd3"),m=n.n(b),g=n("KFw2"),y=n("81xT"),j=n("hFOo"),x=n("Q7hF"),O=function(t){var e=s.a.useState(""),n=Object(u.a)(e,2),r=n[0],o=n[1],a=s.a.useState("Email is required"),c=Object(u.a)(a,2),p=c[0],l=c[1],d=s.a.useState(!1),f=Object(u.a)(d,2),h=f[0],b=f[1];return s.a.useEffect((function(){o(t.subscriberInfo.email||"")}),[t.subscriberInfo]),s.a.useEffect((function(){t.userExist&&l("Subscriber email already exist")}),[t.userExist]),Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(y.b,{children:Object(i.jsxs)(x.Flex,{width:1,flexDirection:"column",children:[Object(i.jsx)(x.Box,{p:"12px",align:"center",children:"Subscribe here to get email notifications when\n             ".concat(t.pagetitle||t.pagename," creates, updates, or resolves an incident")}),Object(i.jsx)("input",{className:"emailInput",type:"email",name:"email",placeholder:"Enter email address",onChange:function(t){var e;(e=t.target.value).length&&(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-z\-0-9]+\.)+[a-z]{2,}))$/.test(String(e.trim()))?(o(e),l(null)):l("Enter a valid email"))},defaultValue:r||t.subscriberInfo.email||null}),h&&Object(i.jsx)("span",{className:"errortext",style:{bottom:"75px"},children:p})]})}),Object(i.jsx)(y.c,{children:Object(i.jsxs)(g.c,{children:[Object(i.jsx)(x.Box,{mx:"5px",children:Object(i.jsx)(g.f,{className:"resetbtn",onClick:function(){return t.close()},children:"Cancel"})}),Object(i.jsx)(x.Box,{mx:"5px",children:Object(i.jsx)(g.b,{className:"submitbtn",onClick:function(){b(!0),p||t.getSubscriptionInfo(r)},children:t.pageLevelSubscription?"Subscribe":"Next"})})]})})]})},v=n("M8Tb");function w(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function _(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?w(Object(n),!0).forEach((function(e){Object(l.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var D={email:null,subscribed_services:["*"],subscribed_groups:["*"]};var S=function(t){var e=t.accountId,n=t.pageLevelSubscription,r=void 0===n||n,c=t.componentsList,p=void 0===c?[]:c,l=Object(d.a)(t,["accountId","pageLevelSubscription","componentsList"]),f=s.a.useState(D),b=Object(u.a)(f,2),x=b[0],w=b[1],S=s.a.useState(!1),P=Object(u.a)(S,2),z=P[0],C=P[1],k=s.a.useState("default"),M=Object(u.a)(k,2),I=M[0],N=M[1],H=s.a.useState(!1),E=Object(u.a)(H,2),R=E[0],A=E[1],F=function(){A(!1),w(D),N("default"),C(!1)},L=function(){var t=Object(a.a)(o.a.mark((function t(n){var i;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=R?"/public-update-subscribers/".concat(x.id,"/?account_id=").concat(e):"/public-update-subscribers/?account_id=".concat(e),t.next=3,Object(j.b)(i,{method:R?"PATCH":"POST",payload:_({},R?m()(n,["email"]):n),auth:R}).then((function(){var t=R?"/subscribe/verify":"/subscribe";h.a.push(t,t,{shallow:!0})}));case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),T=function(){var t=Object(a.a)(o.a.mark((function t(n){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!r){t.next=5;break}return t.next=3,Object(j.b)("/public-update-subscribers/?account_id=".concat(e),{method:"POST",payload:{email:n}}).then((function(){h.a.push("/subscribe","/subscribe",{shallow:!0})}));case 3:t.next=7;break;case 5:return t.next=7,Object(j.b)("/public-update-subscribers/?email=".concat(n,"&account_id=").concat(e)).then((function(t){t.data?(A(!0),w(t.data),N("subscribe")):(w(_(_({},x),{},{email:n})),N("subscribe"))}));case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)("button",{type:"button",className:"subscribe",onClick:function(){return C(!0)},children:"Subscribe"}),Object(i.jsx)(y.a,{isOpen:z,size:"default",children:Object(i.jsxs)(g.d,{"aria-label":"subscriber",children:[Object(i.jsxs)(g.e,{children:[Object(i.jsx)("h4",{children:"Subscribe to updates"}),r?null:Object(i.jsx)("div",{className:"helptext",children:" Step ".concat("default"===I?"1":"2"," of 2")})]}),"default"===I?Object(i.jsx)(O,_({getSubscriptionInfo:T,setcurrentpage:N,close:F,subscriberInfo:x,pageLevelSubscription:r,userExist:R},l)):Object(i.jsx)(v.a,{subscriberInfo:x,componentsList:p,submit:L,close:F,setcurrentpage:N})]})})]})},P=n("zUqs"),z=(e.a=function(t){var e=t.branding,n=void 0===e?{}:e,r=t.name,p=t.preference,l=void 0===p?{}:p,u=t.accountId,d=t.componentsList,f=void 0===d?[]:d,h=n.title,b=n.manageSubscriber,m=void 0===b||b,g=n.pageLevelSubscription,y=Object(c.useState)(null),x=y[0],O=y[1],v=function(){var t=Object(a.a)(o.a.mark((function t(){return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Object(j.b)("/public-update-subscribers/?account_id=".concat(u)).then((function(t){O(t.count)}));case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();s.a.useEffect((function(){v()}),[]);return Object(i.jsxs)(z,{children:[Object(i.jsxs)("div",{className:"filtered-card-content",children:[Object(i.jsx)("div",{className:"filtered-card-content-name",children:"This Status Page is Filtered"}),Object(i.jsx)("div",{className:"filtered-card-content-desc",children:"Services and related information is based on the filters applied in the URL."})]}),Object(i.jsxs)("div",{className:"filtered-card-actions",children:[m&&x<l.max_subscribers?Object(i.jsx)(S,{accountId:u,pagename:r,pagetitle:h,pageLevelSubscription:g,componentsList:f}):null,Object(i.jsx)("div",{className:"filtered-card-actions-separator"}),Object(i.jsxs)("button",{type:"button",className:"filtered-card-clear",onClick:function(){window.location.href=window.location.origin+window.location.pathname},children:[Object(i.jsx)("div",{children:Object(i.jsx)(P.g,{height:10,width:10})}),Object(i.jsx)("div",{children:"Clear"})]})]})]})},p.default.div.withConfig({displayName:"FilterComponentsCard__TooltipContent",componentId:"sc-1ry4x1h-0"})(["padding:16px;max-width:350px;width:auto;"]),p.default.div.withConfig({displayName:"FilterComponentsCard__StyledFilterComponentsCard",componentId:"sc-1ry4x1h-1"})(["display:flex;justify-content:space-between;padding:12px 20px;margin:38px 0;position:relative;background:#fff;border:1px solid #e8e8e8;box-shadow:0px 2px 8px rgba(0,0,0,0.08);border-radius:4px;align-items:center;.filtered-card-content-name{font-size:16px;font-weight:bold;color:var(--heading-color) !important;}.filtered-card-content-desc{color:#7d8190;font-size:13px;}.filtered-card-actions{min-width:155px;text-align:end;.subscribe{padding:8px 15px;border-radius:3px;font-family:var(--font-sans);background:var(--primary-color);color:rgb(255,255,255);font-weight:700;font-size:14px;cursor:pointer;margin-left:12px;}.filtered-card-clear{color:#475867;display:inline-flex;padding:8px 15px;border-radius:3px;font-family:var(--font-sans);background:var(--secondary-color);font-size:14px;cursor:pointer;font-weight:600;text-align:center;&:hover{background-color:var(--secondary-color);}> div:first-child{padding-right:5px;}}.filtered-card-actions-separator{border-left:1px solid #cfdceb;display:inline;height:15px;margin:0 12px;}}@media only screen and (max-width:600px){flex-direction:column;padding:16px;.filtered-card-actions{text-align:center;> button{margin-bottom:0;}}}"]))},"4jfz":function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function r(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}n.d(e,"a",(function(){return r}))},DY1Z:function(t,e,n){"use strict";function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return i}))},"F/wX":function(t,e,n){(t.exports=n("sm7q")).tz.load(n("iWC8"))},GeT8:function(t,e,n){"use strict";n.d(e,"b",(function(){return N})),n.d(e,"c",(function(){return R})),n.d(e,"a",(function(){return A}));var i=n("oYCi"),r=n("/dBk"),o=n.n(r),a=n("qd51"),c=n("etRO"),s=n("4jfz"),p=n("g2+O"),l=n("mHfP"),u=n("1U+3"),d=n("DY1Z"),f=n("m6w3"),h=n("mXGw"),b=n.n(h),m=n("Q7hF"),g=n("UutA"),y=n("dAGg"),j=n.n(y),x=n("TiKg"),O=n.n(x),v=n("28l7"),w=n("XZkU"),_=n("v0uu"),D=n("7E/E"),S=n("hFOo"),P=n("xS2u"),z=n("fZZI");function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function k(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach((function(e){Object(f.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function M(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(d.a)(t);if(e){var r=Object(d.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(u.a)(this,n)}}var I=function(t){Object(l.a)(n,t);var e=M(n);function n(t){var i;return Object(c.a)(this,n),i=e.call(this,t),Object(f.a)(Object(p.a)(i),"updateComponent",Object(a.a)(o.a.mark((function t(){var e,n,r,a,c,s;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=i.props,n=e.accountId,r=e.componentData,a=e.graphTimespan,c=e.incidentsList,s=r&&r.display_options&&r.display_options.service_start_date?O()(r.display_options.service_start_date).utc().format():null,i.getComponentReport(r.id,n,c,_.c[r.status],a.graph_timespan_days,a.bar_timespan_hours,s);case 3:case"end":return t.stop()}}),t)})))),Object(f.a)(Object(p.a)(i),"getComponentReport",function(){var t=Object(a.a)(o.a.mark((function t(e,n,r,a,c,s,l){var u,d,f,h;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=Object(D.h)(s,c),d=Object(p.a)(i),f=u[0].start,h=u[u.length-1].end,l&&new Date(l)-new Date(f)>=0&&(f=l),t.next=7,Object(S.b)("/public-component-updates/?account_id=".concat(n,"&component_id=").concat(e,"&start_time=").concat(f,"&end_time=").concat(h)).then((function(t){var n=[],o={},c={OP:0,PD:0,MO:0,PO:0,UM:0},p=r.filter((function(t){return t.affected_components.find((function(t){return t.component==e}))}));u.forEach((function(e,i){if(new Date(e.start)-new Date(f)>=0){var r,a={OP:0,PD:0,MO:0,PO:0,UM:0},s="OP",l=[];t.result.forEach((function(t){new Date(t.display_time)-new Date(e.start)<=0?r=t:new Date(t.display_time)-new Date(e.start)>=0&&new Date(t.display_time)-new Date(e.end)<0&&l.push(t)})),r&&(s=r.new_status);var u=e.start;l.forEach((function(t){a[s]+=Math.ceil((new Date(t.display_time)-new Date(u))/1e3),u=t.display_time,s=t.new_status})),a[s]+=Math.ceil((new Date(e.end)-new Date(u))/1e3);var d=a.OP+a.UM,h=a.PO+a.MO+a.PD+d,b=d/h*100,m=p.filter((function(t){return t&&(!t.end_time||new Date(t.end_time)>=new Date(e.start))&&new Date(t.start_time)<new Date(e.end)}));m=m.map((function(t){return t.id}));var g={start:e.start,end:e.end,duration_seconds_by_state:a,availability_percentage:b,incidents:m};n.push(g),(100!==b||h!==a.OP||m.length)&&(o[i]=g),c.OP+=a.OP,c.PD+=a.PD,c.MO+=a.MO,c.PO+=a.PO,c.UM+=a.UM}else{var y={start:e.start,end:e.end,duration_seconds_by_state:null,availability_percentage:100,incidents:[]};n.push(y)}}));var l=c.OP+c.PD+c.UM,h=l/(c.PO+c.MO+l)*100;d.setState({componentHistory:n,availability:h.toString().substring(0,4),bar_timespan_hours:s,status:a}),i.props.setAffectedDaysHistory&&i.props.setAffectedDaysHistory(e,k({},o)),d.props.availabilityHandler&&d.props.availabilityHandler(h)}));case 7:case"end":return t.stop()}}),t)})));return function(e,n,i,r,o,a,c){return t.apply(this,arguments)}}()),Object(f.a)(Object(p.a)(i),"redirect",(function(t,e){var n="/uptime-history/".concat(e).concat(i.props.queryParams);if(!t)return!1;j.a.push(n)})),i.state={status:null},i}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.props.incidentsList&&this.updateComponent()}},{key:"componentDidUpdate",value:function(t){t.incidentsList!==this.props.incidentsList&&this.updateComponent()}},{key:"render",value:function(){var t=this,e=this.props,n=e.componentData,r=e.graphTimespan,o=e.incidentsList,a=e.timezone,c=e.deviceSize,s=this.state,p=s.componentHistory,l=s.status,u=s.availability,d=s.bar_timespan_hours,f=!(!n||!n.display_options||"true"!==n.display_options.uptime_history_enabled),h=Object(i.jsx)("div",{className:"history",children:f&&u?"device-small"===c?Object(i.jsx)(i.Fragment,{children:"(".concat(u||"","%) ").concat(r.graph_timespan_days," ").concat(r.graph_timespan_days>1?"days":"day")}):Object(i.jsx)(i.Fragment,{children:"".concat(u||"","% on the last ").concat(r.graph_timespan_days," ").concat(r.graph_timespan_days>1?"days":"day")}):null}),b=f?Object(i.jsx)(i.Fragment,{children:p?Object(i.jsx)(w.a,{deviceSize:c,componentHistory:p,id:n.id,bar_timespan_hours:d,incidentsList:o,timezone:a}):Object(i.jsx)(P.b,{children:"\xa0\xa0"})}):null,g=Object(i.jsxs)("div",{className:"".concat(l," component_name ").concat(!f&&"no-history"),children:[Object(i.jsx)(L,{title:n.name,nameonly:!n.description,children:n.name}),n.description?Object(i.jsx)(z.a,{id:n.id,component:Object(i.jsx)(R,{children:n.description}),children:Object(i.jsx)(A,{})}):null]});return Object(i.jsxs)(T,{ctype:n.status,className:(f?"component ":"component only ")+c,onClick:function(){return t.redirect(f,n.id)},children:[Object(i.jsx)("div",{className:"component_header",children:f?Object(i.jsxs)(i.Fragment,{children:[g,h]}):Object(i.jsxs)(m.Flex,{justifyContent:"space-between",alignItems:"center",children:[g,f?null:Object(i.jsx)(m.Box,{className:"comp-status",children:l})]})}),b]})}}]),n}(b.a.Component);e.d=I;var N=function(){return Object(i.jsxs)(i.Fragment,{children:[Object(i.jsx)(H,{}),Object(i.jsx)(H,{}),Object(i.jsx)(H,{})]})},H=function(){return Object(i.jsxs)(T,{children:[Object(i.jsxs)(m.Flex,{justifyContent:"space-between",children:[Object(i.jsx)(L,{children:Object(i.jsx)(P.b,{height:"12px",width:"150px",children:"\xa0\xa0"})}),Object(i.jsx)(L,{children:Object(i.jsx)(P.b,{height:"12px",width:"120px",children:"\xa0\xa0"})})]}),Object(i.jsx)(F,{children:Object(i.jsx)(P.b,{height:"32px",children:"\xa0\xa0"})})]})},E={OP:"#29B15C",MO:"#C43410",PO:"#DB861F",PD:"#D6B337",UM:"#2063E3"},R=g.default.div.withConfig({displayName:"Component__TooltipContent",componentId:"sc-g3c5bz-0"})(["padding:16px;max-width:350px;width:auto;"]),A=g.default.div.withConfig({displayName:"Component__Info",componentId:"sc-g3c5bz-1"})(["width:14px;min-width:14px;height:14px;background:url(/icons/information.svg) no-repeat center;background-size:14px;display:inline-block;vertical-align:middle;margin-left:5px;"]),F=g.default.div.withConfig({displayName:"Component__BarChartWrapper",componentId:"sc-g3c5bz-2"})(["width:100%;"]),L=g.default.div.withConfig({displayName:"Component__Name",componentId:"sc-g3c5bz-3"})(["display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;max-width:",";"],(function(t){return t.nameonly?"90%":"60%"})),T=g.default.div.withConfig({displayName:"Component__StyledComponent",componentId:"sc-g3c5bz-4"})(["position:relative;display:block;background:",";padding:20px 30px 18px 42px;margin-bottom:15px;background:#ffffff;border:1px solid #ececec;box-sizing:border-box;box-shadow:0px 2px 8px rgba(0,0,0,0.04);border-radius:4px;cursor:pointer;width:100%;&.only{padding-bottom:9px;padding-top:9px;cursor:default !important;}.component_header{align-items:center;justify-content:space-between;display:block;margin-bottom:5px;.comp-status{font-weight:700;color:",";margin-right:2px;white-space:nowrap;}}.component_name,.history{display:inline-block;position:relative;vertical-align:middle;padding:8px 0;}.component_name{padding-left:20px;width:calc(100% - 165px);font-size:14px;color:#000000;&:before{display:inline-block;position:absolute;width:13px;height:13px;content:'';left:0;top:14px;vertical-align:middle;background-image:url(/icons/tick.svg);background-size:13px;background-repeat:no-repeat;}&.no-history{width:75%;}&.Degraded:before{background-image:url(/icons/degraded.svg);}&.Partial:before{background-image:url(/icons/partial.svg);}&.Major:before{background-image:url(/icons/cross.svg);}&.Maintenance:before{background-image:url(/icons/maintenance.svg);}}.history{padding:5px 2px;text-align:right;font-size:12px;line-height:14px;color:rgb(0 0 0 / 0.5);width:165px;}@media only screen and (max-width:600px){.component_name{width:calc(100% - 100px);}.history{width:100px;}.no-history{max-width:40% !important;}}.bars-list{display:flex;justify-content:space-evenly;}"],v.a.colors.white,(function(t){var e=t.ctype;return E[e]}))},XZkU:function(t,e,n){"use strict";var i=n("etRO"),r=n("4jfz"),o=n("g2+O"),a=n("mHfP"),c=n("1U+3"),s=n("DY1Z"),p=n("m6w3"),l=n("oYCi"),u=n("mXGw"),d=n.n(u),f=n("UutA"),h=n("F/wX"),b=n.n(h),m=n("fZZI"),g=n("c35h"),y=n("7E/E");function j(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function x(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(s.a)(t);if(e){var r=Object(s.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(c.a)(this,n)}}var O=function(t){var e=t.data,n=t.getBalloonString,i=t.getDetails;return Object(l.jsx)(g.a,{data:e.duration_seconds_by_state?Object(y.i)(e):null,incidentsData:i(e.incidents),date:n(e.start,e.end)})},v=function(t){var e=t.getColorcode,n=t.componentHistory,i=t.deviceSize,r=t.getBalloonString,o=t.getDetails;return Object(l.jsx)(_,{viewBox:{"device-large":"0 0 900 42","device-mid":"0 0 600 42","device-small":"0 0 300 42"}[i],preserveAspectRatio:"none",children:n.map((function(t,n){return Object(l.jsx)(m.a,{id:"".concat(n,"-").concat(Date.now()),component:Object(l.jsx)(O,{data:t,getBalloonString:r,getDetails:o}),children:Object(l.jsx)("rect",{className:e(t.duration_seconds_by_state),x:8*n+2*n,width:8})},"".concat(n,"-").concat(Date.now()))}))})},w=function(t){Object(a.a)(n,t);var e=x(n);function n(t){var r;return Object(i.a)(this,n),r=e.call(this,t),Object(p.a)(Object(o.a)(r),"getBalloonString",(function(t,e){if(24===r.props.bar_timespan_hours)return b()(new Date(t)).format("dddd DD MMM");var n=b()(new Date(t)).format("dddd DD MMM"),i=b()(new Date(t)).format("h:mm a"),o=b()(new Date(e)).format("h:mm a");return"".concat(n,", ").concat(i," - ").concat(o)})),Object(p.a)(Object(o.a)(r),"getColorcode",(function(t){return t&&t.MO>0?"red":t&&t.PO>0?"orange":t&&t.PD>0?"yellow":t&&t.OP>0||t&&t.UM>0?"green":"grey"})),Object(p.a)(Object(o.a)(r),"getStatus",(function(t){var e="";return null===t?e="Service not available":t.MO||t.PO?e+="".concat(parseInt(t.MO/60)+parseInt(t.PO/60)," minutes of Outage"):t.UM?e+="".concat(parseInt(t.UM/60)," minutes of Under Maintenance"):t.PD?e+="".concat(parseInt(t.PD/60)," minutes of Degraded Performance"):e="A smooth day",e})),Object(p.a)(Object(o.a)(r),"getIconUrl",(function(t,e){var n=t.affected_components.find((function(t){return t.component==e})),i={};return n?y.a[n.new_status].iconUrl:(t.affected_components.forEach((function(t){i[t.new_status]=t.new_status})),y.a[i.MO||i.PO||i.PD||i.UM||i.OP||""].iconUrl)})),Object(p.a)(Object(o.a)(r),"getDetails",(function(t){var e=r.props,n=e.timezone,i=e.id,a=Object(o.a)(r),c=[];return r.props.incidentsList&&t&&t.length&&(c=r.props.incidentsList.filter((function(e){return t.find((function(t){return e.id==t}))}))),(c=c.sort((function(t,e){return new Date(t.start_time)-new Date(e.start_time)})).map((function(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?j(Object(n),!0).forEach((function(e){Object(p.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({timezone:n,iconUrl:a.getIconUrl(t,i)},t)})))||[]})),r}return Object(r.a)(n,[{key:"render",value:function(){return Object(l.jsx)(v,{getBalloonString:this.getBalloonString,getDetails:this.getDetails,getColorcode:this.getColorcode,deviceSize:this.props.deviceSize,componentHistory:this.props.componentHistory})}}]),n}(d.a.PureComponent);e.a=w;var _=f.default.svg.withConfig({displayName:"BarChart__StyledSvg",componentId:"sc-b8cfwu-0"})(["pointer-events:all;fill:#d7d7d7;height:42px;width:100%;display:inline-block;rect{height:100%;transition:all 0.1s ease;transform:scaleY(0.875) translateY(10.5px);transform-box:fill-box;&:hover{transform-origin:center;transform:translateY(7.5px) scaleY(1.1) scaleX(1.15);}}.green,.grey{transform:translateY(3.5px) scaleY(0.835);&:hover{transform:translateY(0px) scaleY(1) scaleX(1.15);}}.green{fill:#29b15c;&:hover{fill:#127336;}}.midred{fill:#c43410;height:28px;}.orange{fill:#db861f;height:28px;}.grey{background:#dadada;}.red{fill:#c43410;height:28px;}.yellow{fill:#d6b337;height:28px;}"])},c35h:function(t,e,n){"use strict";var i=n("m6w3"),r=n("oYCi"),o=n("oA/F"),a=(n("mXGw"),n("UutA")),c=n("TiKg"),s=n.n(c),p=n("F/wX"),l=n.n(p),u=n("Q7hF"),d=(n("28l7"),n("FYVh"));function f(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function h(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?f(Object(n),!0).forEach((function(e){Object(i.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}e.a=function(t){var e=t.date,n=t.data,i=t.incidentsData,a=void 0===i?[]:i,c=Object(o.a)(t,["date","data","incidentsData"]),p=Object(d.b)().timezone;return Object(r.jsxs)(b,h(h({},c),{},{children:[Object(r.jsx)(m,{children:e}),null===n?Object(r.jsx)(O,{children:"Service not available"}):Object(r.jsx)(y,{children:a&&a.length?a.map((function(t){return t.id&&Object(r.jsxs)(u.Flex,{className:"incident-item",children:[t.iconUrl&&Object(r.jsx)(j,{height:14,width:14,alt:"",src:t.iconUrl,style:{marginTop:"4px"}}),Object(r.jsxs)(u.Flex,{flexDirection:"column",children:[Object(r.jsx)("a",{href:"/incident/".concat(t.id),children:Object(r.jsx)("div",{className:"title",children:t.title})}),Object(r.jsxs)("div",{className:"time-attr",children:[s()(t.start_time).isAfter((new Date).toString())?"Start On: ":"Started: ",l.a.tz(t.start_time,p).format("MMM DD hh:mm a z")]}),t.end_time&&Object(r.jsxs)("div",{className:"time-attr",children:[s()(t.end_time).isAfter(new Date)?"Complete on: ":"Completed: ",l.a.tz(t.end_time,p).format("MMM DD hh:mm a z")]})]})]})})):Object(r.jsx)(r.Fragment,{children:n.length>0?n.map((function(t){return Object(r.jsxs)(g,{children:[Object(r.jsxs)("div",{className:"status-name",children:[Object(r.jsx)(j,{height:14,width:14,alt:"cross",src:t.iconUrl}),Object(r.jsx)("div",{children:t.name})]}),Object(r.jsx)("div",{children:t.time})]},t.id)})):Object(r.jsx)(x,{children:"No downtime"})})})]}))};var b=a.default.div.withConfig({displayName:"EventHistory__History",componentId:"sc-1lypgqm-0"})(["padding:20px 10px;white-space:nowrap;display:block;"]),m=a.default.div.withConfig({displayName:"EventHistory__StyledDate",componentId:"sc-1lypgqm-1"})(["margin-bottom:8px;text-align:center;font-size:12px;line-height:12px;color:#5f5f8a;"]),g=a.default.div.withConfig({displayName:"EventHistory__Item",componentId:"sc-1lypgqm-2"})(["display:flex;align-items:center;justify-content:space-between;border-radius:4px;padding:8px;"]),y=a.default.div.withConfig({displayName:"EventHistory__List",componentId:"sc-1lypgqm-3"})(["max-width:330px;max-height:300px;overflow:auto;@media only screen and (max-width:400px){max-width:260px;.incident-item{width:240px !important;}.title{max-width:200px !important;}}.title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px;}.time-attr{font-size:12px;line-height:14px;color:#7b7b7b;margin-top:8px;}.incident-item{border-bottom:1px solid #f0f2f3;padding:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:320px;}.incident-item:last-child{border-bottom:0;padding-bottom:0;}.status-name{display:flex;align-items:center;margin-right:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:320px;}"]),j=a.default.img.withConfig({displayName:"EventHistory__Icon",componentId:"sc-1lypgqm-4"})(["margin-right:8px;"]),x=a.default.div.withConfig({displayName:"EventHistory__Default",componentId:"sc-1lypgqm-5"})(["padding:10px;text-align:center;font-weight:bold;font-size:14px;line-height:17px;color:#000000;&:before{content:'';width:6px;height:6px;line-height:17px;background:#49ca7a;border-radius:30px;display:inline-block;vertical-align:middle;margin-right:6px;}"]),O=a.default.div.withConfig({displayName:"EventHistory__Empty",componentId:"sc-1lypgqm-6"})(["padding:8px;text-align:center;"])},etRO:function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,"a",(function(){return i}))},fZZI:function(t,e,n){"use strict";var i=n("oYCi"),r=n("etRO"),o=n("4jfz"),a=n("g2+O"),c=n("mHfP"),s=n("1U+3"),p=n("DY1Z"),l=n("m6w3"),u=n("mXGw"),d=n.n(u),f=n("xARA"),h=n.n(f),b=n("oA/F"),m=n("UutA"),g=n("28l7");function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function j(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?y(Object(n),!0).forEach((function(e){Object(l.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var x=m.default.div.withConfig({displayName:"PopOverComponent__Pop",componentId:"sc-tagls9-0"})(["background:white;min-height:2rem;min-width:12rem;position:absolute;border:1px solid ",";box-shadow:0 0 6px 0 ",";transform:translate(-50%,4px);border-radius:4px;padding:5px 10px;& #child{}&:after{content:'';position:absolute;top:0;left:50%;width:0;height:0;border:8px solid transparent;border-bottom-color:white;border-top:0;margin-left:-8px;margin-top:-8px;}",""],g.a.colors.grey,g.a.colors.lightgrey,(function(t){return"right"===t.position&&"\n    &:after {\n      top: 50%;\n      left: 0;\n      transform: rotate(-90deg);\n    }\n  "})),O=function(t){t.stopPropagation()},v=function(t){var e=t.children,n=Object(b.a)(t,["children"]);return Object(i.jsx)(x,j(j({},n),{},{onClick:O,children:Object(i.jsx)("div",{id:"child",children:e})}))};function w(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(p.a)(t);if(e){var r=Object(p.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(s.a)(this,n)}}var _=function(t){Object(c.a)(n,t);var e=w(n);function n(t){var i;return Object(r.a)(this,n),i=e.call(this,t),Object(l.a)(Object(a.a)(i),"clearTimeoutId",(function(){clearTimeout(i.timeOutID)})),Object(l.a)(Object(a.a)(i),"timeOutFunc",(function(){var t=setTimeout((function(){return i.closeMenu()}),10);i.timeOutID=t})),Object(l.a)(Object(a.a)(i),"openMenu",(function(t,e){t.preventDefault();var n=i.props.position,r=void 0===n?"bottom":n,o=window,a=o.scrollY,c=o.scrollX,s=document.getElementById(e).getBoundingClientRect(),p="right"===r?s.top-s.height-10+a:s.top+s.height+a,l="right"===r?s.left+s.width+90+c:s.left+s.width/2+c;i.setState({open:!0,divStyle:{top:p,left:l}})})),Object(l.a)(Object(a.a)(i),"closeMenu",(function(t){t&&(t.preventDefault(),t.stopPropagation()),i.setState({open:!1})})),i.timeOutID=null,i.state={open:!1,divStyle:{top:0,left:0}},i}return Object(o.a)(n,[{key:"render",value:function(){var t=this,e=this.state,n=e.open,r=e.divStyle,o=this.props,a=o.children,c=o.component,s=o.id,p=[],l=d.a.cloneElement(a,{id:"".concat(s,"-tooltip"),key:"".concat(s,"-tooltip"),onMouseEnter:function(e){return t.openMenu(e,"".concat(s,"-tooltip"))},onMouseLeave:function(e){return t.timeOutFunc(e)}});if(p.push(l),n){var u=h.a.createPortal(Object(i.jsx)(v,{style:r,onMouseEnter:function(e){t.clearTimeoutId(),e.preventDefault()},position:this.props.position,onMouseLeave:function(){return t.setState({open:!1})},children:d.a.cloneElement(c)}),document.body);p.push(u)}return p}}]),n}(d.a.Component);e.a=_},"g2+O":function(t,e,n){"use strict";function i(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return i}))},mHfP:function(t,e,n){"use strict";function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function r(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}n.d(e,"a",(function(){return r}))},sm7q:function(t,e,n){var i,r,o;!function(a,c){"use strict";t.exports?t.exports=c(n("TiKg")):(r=[n("TiKg")],void 0===(o="function"===typeof(i=c)?i.apply(e,r):i)||(t.exports=o))}(0,(function(t){"use strict";void 0===t.version&&t.default&&(t=t.default);var e,n={},i={},r={},o={},a={};t&&"string"===typeof t.version||C("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var c=t.version.split("."),s=+c[0],p=+c[1];function l(t){return t>96?t-87:t>64?t-29:t-48}function u(t){var e=0,n=t.split("."),i=n[0],r=n[1]||"",o=1,a=0,c=1;for(45===t.charCodeAt(0)&&(e=1,c=-1);e<i.length;e++)a=60*a+l(i.charCodeAt(e));for(e=0;e<r.length;e++)o/=60,a+=l(r.charCodeAt(e))*o;return a*c}function d(t){for(var e=0;e<t.length;e++)t[e]=u(t[e])}function f(t,e){var n,i=[];for(n=0;n<e.length;n++)i[n]=t[e[n]];return i}function h(t){var e=t.split("|"),n=e[2].split(" "),i=e[3].split(""),r=e[4].split(" ");return d(n),d(i),d(r),function(t,e){for(var n=0;n<e;n++)t[n]=Math.round((t[n-1]||0)+6e4*t[n]);t[e-1]=1/0}(r,i.length),{name:e[0],abbrs:f(e[1].split(" "),i),offsets:f(n,i),untils:r,population:0|e[5]}}function b(t){t&&this._set(h(t))}function m(t,e){this.name=t,this.zones=e}function g(t){var e=t.toTimeString(),n=e.match(/\([a-z ]+\)/i);"GMT"===(n=n&&n[0]?(n=n[0].match(/[A-Z]/g))?n.join(""):void 0:(n=e.match(/[A-Z]{3,5}/g))?n[0]:void 0)&&(n=void 0),this.at=+t,this.abbr=n,this.offset=t.getTimezoneOffset()}function y(t){this.zone=t,this.offsetScore=0,this.abbrScore=0}function j(t,e){for(var n,i;i=6e4*((e.at-t.at)/12e4|0);)(n=new g(new Date(t.at+i))).offset===t.offset?t=n:e=n;return t}function x(t,e){return t.offsetScore!==e.offsetScore?t.offsetScore-e.offsetScore:t.abbrScore!==e.abbrScore?t.abbrScore-e.abbrScore:t.zone.population!==e.zone.population?e.zone.population-t.zone.population:e.zone.name.localeCompare(t.zone.name)}function O(t,e){var n,i;for(d(e),n=0;n<e.length;n++)i=e[n],a[i]=a[i]||{},a[i][t]=!0}function v(t){var e,n,i,r,c=t.length,s={},p=[],l={};for(e=0;e<c;e++)if(i=t[e].offset,!l.hasOwnProperty(i)){for(n in r=a[i]||{})r.hasOwnProperty(n)&&(s[n]=!0);l[i]=!0}for(e in s)s.hasOwnProperty(e)&&p.push(o[e]);return p}function w(){try{var t=Intl.DateTimeFormat().resolvedOptions().timeZone;if(t&&t.length>3){var e=o[_(t)];if(e)return e;C("Moment Timezone found "+t+" from the Intl api, but did not have that data loaded.")}}catch(l){}var n,i,r,a=function(){var t,e,n,i,r=(new Date).getFullYear()-2,o=new g(new Date(r,0,1)),a=o.offset,c=[o];for(i=1;i<48;i++)(n=new Date(r,i,1).getTimezoneOffset())!==a&&(t=j(o,e=new g(new Date(r,i,1))),c.push(t),c.push(new g(new Date(t.at+6e4))),o=e,a=n);for(i=0;i<4;i++)c.push(new g(new Date(r+i,0,1))),c.push(new g(new Date(r+i,6,1)));return c}(),c=a.length,s=v(a),p=[];for(i=0;i<s.length;i++){for(n=new y(S(s[i]),c),r=0;r<c;r++)n.scoreOffsetAt(a[r]);p.push(n)}return p.sort(x),p.length>0?p[0].zone.name:void 0}function _(t){return(t||"").toLowerCase().replace(/\//g,"_")}function D(t){var e,i,r,a;for("string"===typeof t&&(t=[t]),e=0;e<t.length;e++)a=_(i=(r=t[e].split("|"))[0]),n[a]=t[e],o[a]=i,O(a,r[2].split(" "))}function S(t,e){t=_(t);var r,a=n[t];return a instanceof b?a:"string"===typeof a?(a=new b(a),n[t]=a,a):i[t]&&e!==S&&(r=S(i[t],S))?((a=n[t]=new b)._set(r),a.name=o[t],a):null}function P(t){var e,n,r,a;for("string"===typeof t&&(t=[t]),e=0;e<t.length;e++)r=_((n=t[e].split("|"))[0]),a=_(n[1]),i[r]=a,o[r]=n[0],i[a]=r,o[a]=n[1]}function z(t){var e="X"===t._f||"x"===t._f;return!(!t._a||void 0!==t._tzm||e)}function C(t){"undefined"!==typeof console&&"function"===typeof console.error&&console.error(t)}function k(e){var n,i=Array.prototype.slice.call(arguments,0,-1),r=arguments[arguments.length-1],o=t.utc.apply(null,i);return!t.isMoment(e)&&z(o)&&(n=S(r))&&o.add(n.parse(o),"minutes"),o.tz(r),o}(s<2||2===s&&p<6)&&C("Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js "+t.version+". See momentjs.com"),b.prototype={_set:function(t){this.name=t.name,this.abbrs=t.abbrs,this.untils=t.untils,this.offsets=t.offsets,this.population=t.population},_index:function(t){var e;if((e=function(t,e){var n,i=e.length;if(t<e[0])return 0;if(i>1&&e[i-1]===1/0&&t>=e[i-2])return i-1;if(t>=e[i-1])return-1;for(var r=0,o=i-1;o-r>1;)e[n=Math.floor((r+o)/2)]<=t?r=n:o=n;return o}(+t,this.untils))>=0)return e},countries:function(){var t=this.name;return Object.keys(r).filter((function(e){return-1!==r[e].zones.indexOf(t)}))},parse:function(t){var e,n,i,r,o=+t,a=this.offsets,c=this.untils,s=c.length-1;for(r=0;r<s;r++)if(e=a[r],n=a[r+1],i=a[r?r-1:r],e<n&&k.moveAmbiguousForward?e=n:e>i&&k.moveInvalidForward&&(e=i),o<c[r]-6e4*e)return a[r];return a[s]},abbr:function(t){return this.abbrs[this._index(t)]},offset:function(t){return C("zone.offset has been deprecated in favor of zone.utcOffset"),this.offsets[this._index(t)]},utcOffset:function(t){return this.offsets[this._index(t)]}},y.prototype.scoreOffsetAt=function(t){this.offsetScore+=Math.abs(this.zone.utcOffset(t.at)-t.offset),this.zone.abbr(t.at).replace(/[^A-Z]/g,"")!==t.abbr&&this.abbrScore++},k.version="0.5.45",k.dataVersion="",k._zones=n,k._links=i,k._names=o,k._countries=r,k.add=D,k.link=P,k.load=function(t){D(t.zones),P(t.links),function(t){var e,n,i,o;if(t&&t.length)for(e=0;e<t.length;e++)n=(o=t[e].split("|"))[0].toUpperCase(),i=o[1].split(" "),r[n]=new m(n,i)}(t.countries),k.dataVersion=t.version},k.zone=S,k.zoneExists=function t(e){return t.didShowError||(t.didShowError=!0,C("moment.tz.zoneExists('"+e+"') has been deprecated in favor of !moment.tz.zone('"+e+"')")),!!S(e)},k.guess=function(t){return e&&!t||(e=w()),e},k.names=function(){var t,e=[];for(t in o)o.hasOwnProperty(t)&&(n[t]||n[i[t]])&&o[t]&&e.push(o[t]);return e.sort()},k.Zone=b,k.unpack=h,k.unpackBase60=u,k.needsOffset=z,k.moveInvalidForward=!0,k.moveAmbiguousForward=!1,k.countries=function(){return Object.keys(r)},k.zonesForCountry=function(t,e){var n;if(n=(n=t).toUpperCase(),!(t=r[n]||null))return null;var i=t.zones.sort();return e?i.map((function(t){return{name:t,offset:S(t).utcOffset(new Date)}})):i};var M,I=t.fn;function N(t){return function(){return this._z?this._z.abbr(this):t.call(this)}}function H(t){return function(){return this._z=null,t.apply(this,arguments)}}t.tz=k,t.defaultZone=null,t.updateOffset=function(e,n){var i,r=t.defaultZone;if(void 0===e._z&&(r&&z(e)&&!e._isUTC&&e.isValid()&&(e._d=t.utc(e._a)._d,e.utc().add(r.parse(e),"minutes")),e._z=r),e._z)if(i=e._z.utcOffset(e),Math.abs(i)<16&&(i/=60),void 0!==e.utcOffset){var o=e._z;e.utcOffset(-i,n),e._z=o}else e.zone(i,n)},I.tz=function(e,n){if(e){if("string"!==typeof e)throw new Error("Time zone name must be a string, got "+e+" ["+typeof e+"]");return this._z=S(e),this._z?t.updateOffset(this,n):C("Moment Timezone has no data for "+e+". See http://momentjs.com/timezone/docs/#/data-loading/."),this}if(this._z)return this._z.name},I.zoneName=N(I.zoneName),I.zoneAbbr=N(I.zoneAbbr),I.utc=H(I.utc),I.local=H(I.local),I.utcOffset=(M=I.utcOffset,function(){return arguments.length>0&&(this._z=null),M.apply(this,arguments)}),t.tz.setDefault=function(e){return(s<2||2===s&&p<9)&&C("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+t.version+"."),t.defaultZone=e?S(e):null,t};var E=t.momentProperties;return"[object Array]"===Object.prototype.toString.call(E)?(E.push("_z"),E.push("_a")):E&&(E._z=null),t}))},xS2u:function(t,e,n){"use strict";n.d(e,"c",(function(){return I})),n.d(e,"d",(function(){return N})),n.d(e,"b",(function(){return E})),n.d(e,"a",(function(){return A}));var i=n("oYCi"),r=n("etRO"),o=n("4jfz"),a=n("g2+O"),c=n("mHfP"),s=n("1U+3"),p=n("DY1Z"),l=n("m6w3"),u=n("mXGw"),d=n.n(u),f=n("Q7hF"),h=n("UutA"),b=n("28l7"),m=n("v0uu"),g=n("GeT8");function y(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(p.a)(t);if(e){var r=Object(p.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(s.a)(this,n)}}var j=function(t){Object(c.a)(n,t);var e=y(n);function n(t){var i;return Object(r.a)(this,n),i=e.call(this,t),Object(l.a)(Object(a.a)(i),"getConsolidatedReport",(function(t){var e,n=(e=t).reduce((function(t,e){return t+e}),0)/e.length;return parseFloat(n).toString().substring(0,4)})),i.state={deviceSize:i.props.deviceSize},i}return Object(o.a)(n,[{key:"componentDidUpdate",value:function(){var t=this.props.deviceSize,e=this.state.deviceSize;t&&t!==e&&this.setState({deviceSize:t})}},{key:"render",value:function(){var t=this.props,e=t.componentsLength,n=t.graphTimespan,r=(t.className,t.showConsolidated),o=t.availability,a=t.deviceSize,c=null;return o.length===e&&(c=parseFloat(this.getConsolidatedReport(o))),Object(i.jsx)("div",{className:"history",children:r&&c?"device-small"===a?Object(i.jsx)(i.Fragment,{children:"(".concat(c,"%) ").concat(n.graph_timespan_days," ").concat(n.graph_timespan_days>1?"days":"day")}):Object(i.jsx)(i.Fragment,{children:"".concat(c,"% on the last ").concat(n.graph_timespan_days," ").concat(n.graph_timespan_days>1?"days":"day")}):null})}}]),n}(d.a.Component),x=n("XZkU"),O=n("7E/E"),v=n("fZZI");function w(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(p.a)(t);if(e){var r=Object(p.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(s.a)(this,n)}}var _=function(t){Object(c.a)(n,t);var e=w(n);function n(t){var i;return Object(r.a)(this,n),i=e.call(this,t),Object(l.a)(Object(a.a)(i),"toggleGroupPanel",(function(){var t=i.state.isOpen;i.setState({isOpen:!t})})),Object(l.a)(Object(a.a)(i),"getGroupStatus",(function(){var t=i.props.componentsList,e=void 0===t?[]:t;if(e){var n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.includes("MO")?"MO":t.includes("PO")?"PO":t.includes("PD")?"PD":t.includes("UM")?"UM":"OP"}((e||[]).map((function(t){return t.status})));i.setState({currentGroupStatus:m.d[n||"OP"]})}})),i.state={isOpen:!0,showConsolidated:!0,componentHistory:[],availabilityArray:[],currentGroupStatus:null},i.availabilityHandler=i.availabilityHandler.bind(Object(a.a)(i)),i}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var t=this.props.component.display_options;this.setState({showConsolidated:!(t&&"false"===t.uptime_history_enabled),isOpen:!(t&&"false"===t.expand_on_load)})}},{key:"componentDidUpdate",value:function(t){var e=this;if(t.affectedDaysHistory!==this.props.affectedDaysHistory){var n={},i=!0;if(this.props.componentsList.forEach((function(t){e.props.affectedDaysHistory[t.id]||(i=!1),n[t.id]=e.props.affectedDaysHistory[t.id]})),i){var r=Object(O.c)(this.props.graphTimespan.bar_timespan_hours,this.props.graphTimespan.graph_timespan_days,n);this.setState({componentHistory:r})}}}},{key:"availabilityHandler",value:function(t){this.props.availabilityHandler&&this.props.availabilityHandler(t),this.setState({availabilityArray:this.state.availabilityArray.concat(t)})}},{key:"render",value:function(){var t=this,e=this.props,n=e.component,r=e.componentsList,o=e.graphTimespan,a=e.metainfo,c=e.accountId,s=e.deviceSize,p=e.timezone,l=e.incidentsList,d=e.queryParams,h=this.state,b=h.isOpen,m=h.showConsolidated,y=h.componentHistory,O=h.currentGroupStatus,w=!(!n||!n.display_options||"true"!==n.display_options.uptime_history_enabled);return Object(i.jsxs)(P,{children:[Object(i.jsxs)(A,{className:(b?"opened ":"collasped ")+s,onClick:function(){return t.toggleGroupPanel()},children:[Object(i.jsxs)(f.Flex,{direction:"row",justifyContent:"space-between",width:1,pr:"16px",children:[Object(i.jsxs)(f.Flex,{alignItems:"center",className:"grouptitlebox",children:[Object(i.jsx)(f.Box,{ml:"10px",my:"5px",mr:"12px",className:"expand"}),Object(i.jsx)(I,{title:n.name,children:n.name}),n.description?Object(i.jsx)(v.a,{id:n.id,component:Object(i.jsx)(g.c,{children:n.description}),children:Object(i.jsx)(g.a,{})}):null,b||w?null:Object(i.jsx)(N,{className:"group-status",style:O?{color:O.color}:{},children:O?O.label:this.getGroupStatus()})]}),this.state.availabilityArray&&!b?Object(i.jsx)(j,{className:b?"hide":"show",componentsLength:r.length,graphTimespan:o,accountId:c,showConsolidated:m,availability:this.state.availabilityArray,deviceSize:s}):null]}),w&&Object(i.jsx)("div",{className:"bargraph-wrapper",children:y.length?Object(i.jsx)(x.a,{deviceSize:s,componentHistory:y,id:n.id,bar_timespan_hours:o.bar_timespan_hours,incidentsList:l,timezone:p}):Object(i.jsx)(E,{className:"bargraph-wrapper",style:{paddingLeft:"24px",paddingRight:"4px",height:"40px"},children:"\xa0\xa0"})})]}),Object(i.jsx)(S,{className:b?"show":"hide",children:r&&r.map((function(e,n){return Object(i.jsx)(u.Fragment,{children:Object(i.jsx)(g.d,{componentData:e,graphTimespan:o,metainfo:a,accountId:c,deviceSize:s,availabilityHandler:t.availabilityHandler,setAffectedDaysHistory:t.props.setAffectedDaysHistory,incidentsList:l,timezone:p,queryParams:d})},"subComp_".concat(n))}))})]})}}]),n}(d.a.Component),D=Object(h.keyframes)(["from{height:10%;opacity:0;}to{height:100%;opacity:1}"]),S=h.default.div.withConfig({displayName:"SubGroup__ComponentList",componentId:"sc-1onwb3m-0"})(["margin:0;margin-top:8px;min-height:30px;.component{padding:0px 0px 8px 24px !important;border:0;box-shadow:none;&.only{margin:0;padding-bottom:0 !important;}}.empty{text-align:center;color:",";}&.hide{transition:opacity 3s ease-out;opacity:0;height:0;overflow:hidden;display:none;}&.show{backface-visibility:hidden;animation:"," 1s ease 0s 1 normal forwards running;}"],b.a.colors.helptext,D),P=h.default.div.withConfig({displayName:"SubGroup__StyledGroup",componentId:"sc-1onwb3m-1"})(["margin:16px 5px 8px 18px;background:#ffffff;border:1px solid #ececec;box-sizing:border-box;box-shadow:0px 2px 8px rgba(0,0,0,0.04);border-radius:4px;padding:10px;&:hover{border:1px solid #dcd6d6;box-shadow:0px 2px 8px rgba(0,0,0,0.08);}.grouptitlebox{width:calc(100% - 125px);}@media only screen and (max-width:600px){.grouptitlebox{width:100%;}}"]);function z(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function C(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?z(Object(n),!0).forEach((function(e){Object(l.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function k(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=Object(p.a)(t);if(e){var r=Object(p.a)(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Object(s.a)(this,n)}}var M=function(t){Object(c.a)(n,t);var e=k(n);function n(t){var i;return Object(r.a)(this,n),i=e.call(this,t),Object(l.a)(Object(a.a)(i),"setAffectedDaysHistory",(function(t,e){i.affectedCompCounterRef.current+=1,i.setState((function(n){return{affectedDaysHistory:C(C({},n.affectedDaysHistory),{},Object(l.a)({},t,e))}}))})),Object(l.a)(Object(a.a)(i),"availabilityHandler",(function(t){i.setState({availabilityArray:i.state.availabilityArray.concat(t)})})),Object(l.a)(Object(a.a)(i),"toggleGroupPanel",(function(){var t=i.state.isOpen;i.setState({isOpen:!t})})),Object(l.a)(Object(a.a)(i),"getGroupStatus",(function(){var t=i.props.componentsList,e=void 0===t?[]:t;if(e){var n=[];e.forEach((function(t){t.status&&n.push(t.status),t.components&&t.components.length>0&&t.components.forEach((function(t){t.status&&n.push(t.status)}))}));var r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return t.includes("MO")?"MO":t.includes("PO")?"PO":t.includes("PD")?"PD":t.includes("UM")?"UM":"OP"}(n);i.setState({currentGroupStatus:m.d[r||"OP"]})}})),i.compCounterRef=d.a.createRef(0),i.affectedCompCounterRef=d.a.createRef(0),i.state={isOpen:!0,showConsolidated:!0,leafComponents:[],currentGroupStatus:null,affectedDaysHistory:{},componentHistory:[],availabilityArray:[]},i.availabilityHandler=i.availabilityHandler.bind(Object(a.a)(i)),i}return Object(o.a)(n,[{key:"componentDidMount",value:function(){var t=this,e=this.props.component.display_options;if(this.props.componentsList){var n=[];this.props.componentsList.forEach((function(e){e.components?(n=n.concat(e.components),t.compCounterRef.current+=e.components.length):(n=n.concat(e),t.compCounterRef.current+=1)})),this.setState({leafComponents:n})}this.setState({showConsolidated:!(e&&"false"===e.uptime_history_enabled),isOpen:!(e&&"false"===e.expand_on_load)})}},{key:"componentDidUpdate",value:function(t,e){var n=this;if(e.affectedDaysHistory!==this.state.affectedDaysHistory&&this.affectedCompCounterRef.current===this.compCounterRef.current){var i=Object(O.c)(this.props.graphTimespan.bar_timespan_hours,this.props.graphTimespan.graph_timespan_days,this.state.affectedDaysHistory);this.setState({componentHistory:i})}if(t.componentsList!==this.props.componentsList&&0==this.compCounterRef.current){var r=[];this.props.componentsList.forEach((function(t){t.components?(r=r.concat(t.components),n.compCounterRef.current+=t.components.length):(leafComponent=r.concat(t),n.compCounterRef.current+=1)})),this.setState({leafComponents:r})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.component,r=e.componentsList,o=e.graphTimespan,a=e.metainfo,c=e.accountId,s=e.deviceSize,p=e.incidentsList,l=e.liveIncidents,d=e.timezone,h=e.queryParams,b=this.state,m=b.isOpen,y=b.showConsolidated,O=b.affectedDaysHistory,w=b.componentHistory,D=b.currentGroupStatus,S=!(!n||!n.display_options||"true"!==n.display_options.uptime_history_enabled);return Object(i.jsxs)(L,{children:[Object(i.jsxs)(A,{className:(m?"opened ":"collasped ")+s,onClick:function(){return t.toggleGroupPanel()},children:[Object(i.jsxs)(f.Flex,{direction:"row",justifyContent:"space-between",width:1,pr:"16px",children:[Object(i.jsxs)(f.Flex,{alignItems:"center",width:"calc(100% - 165px)",children:[Object(i.jsx)(f.Box,{ml:"10px",my:"5px",mr:"12px",className:"expand"}),Object(i.jsx)(I,{title:n.name,children:n.name}),n.description?Object(i.jsx)(v.a,{id:n.id,component:Object(i.jsx)(g.c,{children:n.description}),children:Object(i.jsx)(g.a,{})}):null,m||S?null:Object(i.jsx)(N,{className:"group-status",style:D?{color:D.color}:{},children:D?D.label:this.getGroupStatus()})]}),this.state.availabilityArray&&!m&&n&&n.display_options?Object(i.jsx)(j,{componentsLength:this.compCounterRef.current,graphTimespan:o,accountId:c,showConsolidated:y,availability:this.state.availabilityArray,deviceSize:s}):null]}),S&&Object(i.jsx)("div",{className:"bargraph-wrapper",children:w.length?Object(i.jsx)(x.a,{deviceSize:s,componentHistory:w,id:n.id,bar_timespan_hours:o.bar_timespan_hours,incidentsList:p,timezone:d}):Object(i.jsx)(E,{children:" \xa0\xa0"})})]}),Object(i.jsx)(F,{className:m?"show":"hide",children:r.map((function(e,n){return Object(i.jsx)(u.Fragment,{children:e.components?Object(i.jsx)(_,{component:e,componentsList:e.components,graphTimespan:o,metainfo:a,affectedDaysHistory:O,accountId:c,deviceSize:s,setAffectedDaysHistory:t.setAffectedDaysHistory,availabilityHandler:t.availabilityHandler,incidentsList:p,timezone:d,liveIncidents:l,queryParams:h}):Object(i.jsx)(g.d,{componentData:e,graphTimespan:o,metainfo:a,accountId:c,deviceSize:s,incidentsList:p,availabilityHandler:t.availabilityHandler,setAffectedDaysHistory:t.setAffectedDaysHistory,timezone:d,queryParams:h})},"group_comp".concat(n))}))})]})}}]),n}(d.a.Component),I=(e.e=M,h.default.div.withConfig({displayName:"Group__Name",componentId:"sc-l7rdyy-0"})(["text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:90%;font-weight:600;font-size:14px;color:#000;"])),N=h.default.div.withConfig({displayName:"Group__Status",componentId:"sc-l7rdyy-1"})(["margin:0px auto;font-size:15px;font-weight:700;position:absolute;right:22px;"]),H=Object(h.keyframes)(["0%{transform:translateX(-33%) translateY(0%);}100%{transform:translateX(90%) translateY(0%);}}"]),E=h.default.div.withConfig({displayName:"Group__Loader",componentId:"sc-l7rdyy-2"})(["display:inline-block;width:",";height:",";background:#eee;position:relative;border-radius:4px;overflow:hidden;&:before{content:'';display:block;width:100%;height:100%;border-radius:4px;background:linear-gradient(to right,#eee 8%,#ddd 18%,#eee 33%);animation-duration:1s;animation-fill-mode:forwards;animation-iteration-count:infinite;animation-name:",";animation-timing-function:linear;}"],(function(t){return t.width?t.width:"100%"}),(function(t){return t.height?t.height:"40px"}),H),R=Object(h.keyframes)(["from{height:10%;opacity:0;}to{height:100%;opacity:1}"]),A=h.default.div.withConfig({displayName:"Group__GroupHeader",componentId:"sc-l7rdyy-3"})(["position:relative;display:flex;flex-direction:column;width:100%;justify-content:space-between;align-items:end;cursor:pointer;.component_name,.history{position:relative;padding:8px 0;}.history{padding:5px 2px;text-align:right;font-size:12px;line-height:14px;color:rgb(0 0 0 / 0.5);width:165px;}&.opened .expand{transform:rotate(45deg) !important;transition:rotate 150ms ease-in;top:0px;}.expand{box-sizing:border-box;height:7px;width:7px;min-height:9px;min-width:9px;border-style:solid;border-color:",";border-width:0px 2px 2px 0px;transform:rotate(315deg);transition:rotate 150ms ease-in;}.hide{transition:opacity 3s ease-out;opacity:0;height:0;overflow:hidden;display:none;}.show{backface-visibility:hidden;animation:"," 1s ease 0s 1 normal forwards running;}.bargraph-wrapper{width:100%;padding:18px 8px 0 30px;}&.device-small{.history{width:100px;}.group-status{display:none;}}"],b.a.colors.helptext,R),F=h.default.div.withConfig({displayName:"Group__ComponentList",componentId:"sc-l7rdyy-4"})(["min-height:30px;margin-top:8px;margin-left:8px;.component{padding:0px 10px 8px 30px;border:0;margin:0;box-shadow:none;&.only{margin:0;padding-bottom:0;}}.empty{text-align:center;color:",";}&.hide{transition:opacity 3s ease-out;opacity:0;height:0;overflow:hidden;display:none;}&.show{backface-visibility:hidden;animation:"," 1s ease 0s 1 normal forwards running;}"],b.a.colors.helptext,R),L=h.default.div.withConfig({displayName:"Group__StyledGroup",componentId:"sc-l7rdyy-5"})(["margin:0 auto;margin-bottom:15px;background:#ffffff;border:1px solid #ececec;box-sizing:border-box;box-shadow:0px 2px 8px rgba(0,0,0,0.04);border-radius:4px;padding:20px 12px;&:hover{border:1px solid #dcd6d6;box-shadow:0px 2px 8px rgba(0,0,0,0.08);}"])}}]);