diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-04 08:57:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-04 08:57:49 +0000 |
commit | 5f647647b2683875bdbed970d955a9e5123284bd (patch) | |
tree | 66dcf1d9f7a60cd19dd9ac410e27d5f6ead521d3 /web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js | |
parent | Releasing debian version 1.42.1-1. (diff) | |
download | netdata-5f647647b2683875bdbed970d955a9e5123284bd.tar.xz netdata-5f647647b2683875bdbed970d955a9e5123284bd.zip |
Merging upstream version 1.42.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js b/web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js new file mode 100644 index 000000000..bc538b84b --- /dev/null +++ b/web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js @@ -0,0 +1 @@ +!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="cd5fb910-6271-406f-b065-2dc1539fa168",e._sentryDebugIdIdentifier="sentry-dbid-cd5fb910-6271-406f-b065-2dc1539fa168")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6845f9ce010d5a446e5d4a40f17204cb8341a07a"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[6143],{95665:function(e,t,n){n.d(t,{Z:function(){return ze}});var r=n(87462),o=n(29439),a=n(45987),i=(n(66992),n(41539),n(33948),n(92222),n(67294)),c=n(48286),l=n(28789),u=n(69119),s=n(83894),d=n(64969),m=n(92432),f=n(46667),p=n(23109),g=(n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4942)),v=n(71893);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var b=(0,v.default)(d.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({position:"relative",width:{min:200},height:{min:45},column:!0,background:"dropdown",color:"text",zIndex:60,round:!0,alignItems:"end"},e)})).withConfig({displayName:"styled__PickerBox",componentId:"sc-gwjt9o-0"})([""]),y=v.default.span.withConfig({displayName:"styled__StyledTimePeriod",componentId:"sc-gwjt9o-1"})(["margin-bottom:",";cursor:pointer;width:187px;height:",";&:last-of-type{margin-bottom:0;}& > span:hover{color:",";}"],(0,d.getSizeBy)(1.5),(0,d.getSizeBy)(2),(0,d.getColor)("textLite")),w=(0,v.default)(d.Flex).attrs((function(e){return{color:e.isSelected?"primary":"text",margin:[2,6,0]}})).withConfig({displayName:"styled__StyledCustomTimePeriod",componentId:"sc-gwjt9o-2"})(["cursor:pointer;&:first-of-type{margin-top:0;}&:hover{color:",";}"],(0,d.getColor)("textLite")),E=(0,v.default)(d.Flex).attrs({alignItems:"center",border:{side:"all",color:"border"},color:"text",flexWrap:!1,height:8,justifyContent:"center",padding:[2,0],round:1,width:22}).withConfig({displayName:"styled__TimePeriodDropdownButton",componentId:"sc-gwjt9o-3"})([""]),C=(0,v.default)(d.Drop).attrs({background:"mainBackground",column:!0,overflow:{vertical:"auto"},margin:[.5,0,0],padding:[2,0],round:1}).withConfig({displayName:"styled__TimePeriodDrop",componentId:"sc-gwjt9o-4"})([""]),x=(0,v.default)(d.Icon).withConfig({displayName:"styled__DropdownIcon",componentId:"sc-gwjt9o-5"})(["fill:",";width:12px;height:12px;"],(0,d.getColor)("text")),O=v.default.input.withConfig({displayName:"styled__CustomInput",componentId:"sc-gwjt9o-6"})(["border:1px solid ",";background:",";box-sizing:border-box;border-radius:4px;color:",";height:32px;margin-left:10px;margin-right:10px;outline:none;padding:4px;width:32px;&:focus{border:1px solid ",";}"],(0,d.getColor)("border"),(0,d.getColor)("mainBackground"),(0,d.getColor)("text"),(0,d.getColor)("primary")),k=(0,v.default)(d.Drop).attrs({background:"dropdown",round:2,margin:[.5,0,0],border:{side:"all",color:"borderSecondary"},animation:!0}).withConfig({displayName:"styled__StyledDrop",componentId:"sc-gwjt9o-7"})([""]),S=(0,v.default)(d.TextInput).withConfig({displayName:"styled__StyledDateInput",componentId:"sc-gwjt9o-8"})(["margin-left:20px;margin-right:20px;"]),Z=v.default.div.withConfig({displayName:"styled__StyledCalendar",componentId:"sc-gwjt9o-9"})(["background:",";border:0;&.react-datepicker{background:",";border:0;}.react-datepicker{&__navigation{top:8px;&-icon::before{border-color:",";}}&__month-container{height:260px;}&__header{background:",";border:0;.react-datepicker__current-month{color:",";font-weight:normal;}.react-datepicker__day-name{color:",";}}&__day{color:",";&:hover{background:",";}&--disabled{color:",";&:hover{background:inherit;}}&--keyboard-selected,&--keyboard-selected:hover{color:",";background:inherit;border-radius:inherit;}&--selected,&--selected:hover{color:",";background:",";border-radius:8px;}&--in-selecting-range,&--in-range{color:",";background:",";border-radius:0;}&--selecting-range-start,&--range-start{color:",";background:",";border-top-left-radius:8px;border-bottom-left-radius:8px;&:hover{color:",";background:",";border-radius:0;border-top-left-radius:8px;border-bottom-left-radius:8px;}}&--selecting-range-end,&--range-end{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;&:hover{color:",";background:",";border-top-right-radius:8px;border-bottom-right-radius:8px;}}}}"],(0,d.getColor)("dropdown"),(0,d.getColor)("dropdown"),(0,d.getColor)("text"),(0,d.getColor)("dropdown"),(0,d.getColor)("main"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("elementBackground"),(0,d.getColor)("textLite"),(0,d.getColor)("main"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("primary"),(0,d.getColor)("elementBackground"),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8),(0,d.getColor)("bright"),(0,d.getColor)("primary"),(0,d.getColor)("bright"),(0,d.getRgbColor)(["green","netdata"],.8)),P=function(e){var t=e.value,n=e.period,r=e.resolution,o=e.isSelected,a=e.setTimeRange,c=e.tagging,l=(0,i.useCallback)((function(){return a(t,r)}),[t,r]);return i.createElement(y,{key:t,onClick:l,"data-ga":"date-picker::click-quick-selector::".concat(c,"::").concat(-t),"data-testid":"timePeriod-value"},i.createElement(d.Text,{color:o?"primary":"text"},n))},I=(0,i.memo)(P),j=(n(39714),n(83112),n(66528),n(29422)),D=n(99982),N=n(49546),T=n(38431),_=n(76417),F=n(936),M=60,A=3600,L=86400,B=["minutes","hours","days","months"],R={minutes:M,hours:A,days:L,months:2592e3},z=function(e,t){return Math.round(e/R[t])},V=function(e,t){var n=(0,j.Z)(new Date(0),(0,g.Z)({},t,e));return-(0,D.Z)(n)},U={startDate:"start",endDate:"finish"},H=[{period:"Last 5 minutes",value:-300,resolution:"minutes"},{period:"Last 10 minutes",value:-600,resolution:"minutes"},{period:"Last 15 minutes",value:-900,resolution:"minutes"},{period:"Last 30 minutes",value:-1800,resolution:"minutes"},{period:"Last hour",value:-3600,resolution:"hours"},{period:"Last 2 hours",value:-7200,resolution:"hours"},{period:"Last 6 hours",value:-21600,resolution:"hours"},{period:"Last 12 hours",value:-43200,resolution:"hours"},{period:"Last day",value:-L,resolution:"days"},{period:"Last 2 days",value:-2*L,resolution:"days"},{period:"Last 7 days",value:-7*L,resolution:"days"}],W=function(e,t){var n=(0,T.Z)(e,"MMMM d yyyy, H:mm")?e:(0,_.default)(e,"MMMM d yyyy, H:mm",Date.now());return(0,_.default)("".concat(n," ").concat(function(e){if(!e)return"+00:00";var t=e.toString().split("."),n=t[0]>0?"+":"-",r=Math.abs(t[0]).toString(),o="".concat(n).concat(r.padStart(2,0));return t.length>1?"".concat(o,":").concat(String(.6*t[1]).padEnd(2,0)):"".concat(o,":00")}(t)),"MMMM d yyyy, H:mm xxx",Date.now())},G=function(e){var t=e.handleTimePeriodChange,n=e.selectedDate,r=e.tagging;return i.createElement(d.Flex,{column:!0,justifyContent:"start",alignItems:"start",height:{max:"260px"},overflow:{vertical:"auto"},"data-testid":"timePeriods"},H.map((function(e){var o=e.period,a=e.value,c=e.resolution;return i.createElement(I,{key:a,value:a,period:o,resolution:c,setTimeRange:t,isSelected:n===a,tagging:r})})))},K=(n(9653),n(33161),n(12274)),Y=function(e){var t=e.customTimePeriodRef,n=e.handleTimePeriodChange,r=e.value,a=e.resolution,c=e.tagging,l=function(){return r<=0?z(-r,a):0},u=(0,i.useState)(l),s=(0,o.Z)(u,2),m=s[0],p=s[1],v=(0,f.Z)(),h=(0,o.Z)(v,4),b=h[0],y=h[1],k=h[3],S=(0,i.useRef)();(0,i.useEffect)((function(){return p(l())}),[r]);var Z=(0,i.useCallback)((function(e){return p(e.target.value)}),[]),P=(0,i.useCallback)((function(e){var t=Number(e.currentTarget.value),o=!Number.isNaN(t)&&Number.isInteger(t)&&t>0,i=(0,j.Z)(new Date(0),(0,g.Z)({},a,t));return o&&(0,K.default)(i)&&(0,D.Z)(i)<=94694400?n(V(t,a),a):p(r<=0?z(-r,a):0)}),[a,m]),I=(0,i.useCallback)((function(e){return function(){n(V(m,e),e),k()}}),[m]);return i.createElement(d.Flex,{justifyContent:"start",alignItems:"center",height:8,"data-ga":"date-picker::click-last-integer::".concat(c),"data-testid":"customTimePeriod"},i.createElement(d.Text,{"data-testid":"customTimePeriod-label"},"Last"),i.createElement(O,{value:m,onChange:Z,onBlur:P,"data-ga":"date-picker::click-last-integer::".concat(c,"::").concat(m),"data-testid":"timePeriod-timeInput"}),i.createElement(E,{"data-testid":"timePeriodDropdown-button",onClick:y,ref:S},i.createElement(d.Text,{"data-testid":"timePeriodDropdown-buttonLabel",padding:[0,4,0,0]},a),i.createElement(x,{"data-testid":"timePeriodDropdown-buttonIcon",name:"triangle_down"})),S.current&&b&&i.createElement(C,{align:{top:"bottom",left:"left"},animation:!0,close:k,"data-testid":"timePeriodDropdown",onClickOutside:k,onEsc:k,ref:t,target:S.current},B.map((function(e){return i.createElement(w,{key:e,onClick:I(e),"data-ga":"date-picker::click-last-time-".concat(e,"::").concat(c),"data-testid":"timePeriod-option"},e)}))))},J=n(313),Q=n(89405),q=n(9198),$=n.n(q),X=(n(59061),function(e){var t=e.selected,n=e.selectsStart,r=void 0!==n&&n,o=e.selectsEnd,a=void 0!==o&&o,c=e.startDate,l=e.endDate,u=e.onChange,s=e.minDate,d=e.maxDate,m=e.dateFormat,f=void 0===m?"MM/dd/yyyy":m,p=e.open,g=void 0!==p&&p,v=e.startOpen,h=void 0!==v&&v,b=e.inline,y=void 0!==b&&b,w=e.selectsRange,E=void 0!==w&&w,C=e.monthsShown,x=void 0===C?1:C,O=e.showPopperArrow,k=void 0===O||O,S=e.calendarContainer,Z=void 0===S?null:S;return i.createElement($(),{selected:t,onChange:u,selectsStart:r,selectsEnd:a,startDate:c,endDate:l,minDate:s,maxDate:d,dateFormat:f,open:g,startOpen:h,inline:y,selectsRange:E,monthsShown:x,showPopperArrow:k,calendarContainer:Z})}),ee=function(e){var t=e.name,n=void 0===t?"":t,r=e.value,a=void 0===r?"":r,c=e.onDatesChange,u=e.onFocus,s=e.placeholderText,d=void 0===s?"":s,m=(0,Q.rA)().utcOffset,f=(0,i.useState)(""),p=(0,o.Z)(f,2),g=p[0],v=p[1],h=(0,i.useCallback)((function(e){var t=e.target.value;v(t)}),[]),b=(0,i.useCallback)((function(e){if((0,K.default)(e)){var t=(0,N.default)(e,"MMMM d yyyy, H:mm");v(t)}}),[]),y=(0,i.useCallback)((function(e){var t=W(e.target.value,m);if((0,K.default)(t)&&(0,l.default)(t)>0){var n=(0,l.default)(t);c(n,(function(){return b(a)}))}else b(a)}),[a,m]);return(0,i.useEffect)((function(){return b(a)}),[a]),i.createElement(S,{type:"text",name:n,value:a?g:d,onChange:h,onBlur:y,onFocus:u,placeholder:d,"data-testid":"datePicker-input"})},te=n(19013),ne=function(){var e=(0,Q.rA)(),t=e.localeTimeString,n=e.localeDateString;return(0,i.useCallback)((function(e){return"".concat(n(e,{locale:"en-us",long:!1})," ").concat(t(e,{locale:"en-us",secs:!1}))}),[t,n])},re=function(e,t){return e>0?(0,te.default)(new Date(t(e))):e||0===e?(0,te.default)(new Date(t((new Date).valueOf()+1e3*e))):null},oe=function(e){var t=ne();return(0,i.useMemo)((function(){return re(e,t)}),[e])},ae=function(e,t){return[oe(e),oe(t)]};function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ce=function(e){var t=e.startDate,n=e.setStartDate,a=e.endDate,c=e.setEndDate,u=e.singleDate,s=e.onDatesChange,m=e.onInputFocus,f=e.onlyDates,p=e.maxDate,v=void 0===p?new Date:p,h=e.minDate,b=void 0===h?new Date("1/1/2018"):h,y=e.isSinglePicker,w=ae(t,a),E=(0,o.Z)(w,2),C=E[0],x=E[1],O=oe(u),k=(0,Q.rA)().utcOffset,S=ne(),P=(0,i.useCallback)((function(e,t){return(0,J.default)(re(e,S),x)?n(e):t()}),[a,S]),I=(0,i.useCallback)((function(e,t){return(0,J.default)(C,re(e,S))?c(e):t()}),[t,S]),j=(0,i.useCallback)((function(e){var t=Array.isArray(e)?e[0]:e,n=Array.isArray(e)?e[1]:null,r=t?W((0,N.default)(t,"MMMM d yyyy, H:mm"),k):t,o=n?W((0,N.default)(n,"MMMM d yyyy, H:mm"),k):n,a=(0,l.default)(r)||null,i=(0,l.default)(o)||null;s(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},y?{singleDate:a}:{startDate:a,endDate:i}))}),[k]);return i.createElement(d.Flex,{column:!0,justifyContent:"center",alignItems:"center",flex:!0,gap:3,"data-testid":"datePicker-wrapper"},i.createElement(X,(0,r.Z)({selected:y?O:C,onChange:j},y?{}:{startDate:C,endDate:x},{maxDate:v,minDate:b,inline:!0,selectsRange:!0,monthsShown:y?1:2,dateFormat:"MMMM d yyyy, H:mm",showPopperArrow:!1,calendarContainer:Z})),!f&&(y?i.createElement(ee,{name:"date",value:O,onDatesChange:j,placeholderText:"Select a date"}):i.createElement(d.Flex,{justifyContent:"around",alignItems:"center",width:"100%"},i.createElement(ee,{name:"startDate",value:C,onDatesChange:P,onFocus:m,placeholderText:"Select a start date"}),i.createElement(ee,{name:"endDate",value:x,onDatesChange:I,onFocus:m,placeholderText:"Select an end date"}))))},le=function(e){var t=e.startDate,n=e.endDate,r=e.onlyDates,a=ae(t,n),c=(0,o.Z)(a,2),u=c[0],s=c[1],m=(0,i.useMemo)((function(){return function(e,t){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).onlyDates?"MMMM d yyyy":"MMMM d yyyy, H:mm:ss";return{formattedStartDate:(0,N.default)(e,n),formattedEndDate:(0,N.default)(t,n)}}(u,s,{onlyDates:r})}),[u,s]),f=m.formattedStartDate,p=m.formattedEndDate,g=(0,i.useMemo)((function(){return function(e,t){return(0,F.Z)((0,l.default)(e),(0,l.default)(t))}(u,s)}),[u,s]);return i.createElement(d.Flex,{alignItems:"center",gap:2},i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(d.TextSmall,{strong:!0,whiteSpace:"nowrap"},"From"),i.createElement(d.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-from"},f)),i.createElement(d.Icon,{name:"arrow_left",size:"small",color:"textLite",rotate:2}),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1.5},i.createElement(d.TextSmall,{strong:!0,whiteSpace:"nowrap"},"To"),i.createElement(d.TextSmall,{whiteSpace:"nowrap","data-testid":"periodIndication-to"},p)),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:2},i.createElement(d.TextSmall,{whiteSpace:"nowrap"},"/"),i.createElement(d.TextSmall,{color:"textLite",whiteSpace:"nowrap","data-testid":"periodIndication-period"},g)))},ue=n(2379),se=(n(85827),n(26699),n(3151)),de=n(33926),me=36e5,fe=864e5,pe=2592e6,ge=[{key:"years",value:31104e6,unit:"y"},{key:"months",value:pe,unit:"m"},{key:"days",value:fe,unit:"d"},{key:"hours",value:me,unit:"h"},{key:"minutes",value:6e4,unit:"min"},{key:"seconds",value:1e3,unit:"s"}],ve=["hours","minutes","seconds"],he=function(e){var t=e.placeholder,n=void 0===t?"No date":t;return i.createElement(d.TextSmall,null,n)},be=function(e){var t=e.isPlaying,n=e.startDate,r=e.endDate,o=e.isSameDate,a=e.color,c=e.onlyDates,l=(0,Q.rA)(),u=l.localeTimeString,s=l.localeDateString,m=a||(t?"accent":"textFocus");return i.createElement(d.Flex,{gap:2},i.createElement(d.TextSmall,{color:a,whiteSpace:"nowrap"},s(n,{long:!1}),!c&&i.createElement(i.Fragment,null," ","\u2022"," ",i.createElement(d.TextSmall,{color:m,whiteSpace:"nowrap"},u(n,{secs:!1})))),c&&!o&&i.createElement(i.Fragment,null,i.createElement(d.Icon,{name:"arrow_left",color:m,size:"small",rotate:2}),i.createElement(d.TextSmall,{color:a,whiteSpace:"nowrap"},!o&&s(r,{long:!1}),!c&&i.createElement(i.Fragment,null," ","\u2022"," ",i.createElement(d.TextSmall,{color:m,whiteSpace:"nowrap"},u(r,{secs:!1}))))))},ye=function(e){var t=e.isPlaying,n=e.duration,r=e.color,o=e.fluid,a=void 0!==o&&o;return i.createElement(d.Flex,{gap:1,align:"center"},i.createElement(d.TextSmall,{color:r},"\u2022"),i.createElement(d.Flex,{width:a?"auto":5},t&&i.createElement(d.TextSmall,{color:r},"last")),i.createElement(d.TextSmall,{color:r},n))},we=n(82351),Ee=(0,v.default)(d.Flex).withConfig({displayName:"styled__Container",componentId:"sc-1s7311w-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],(0,d.getColor)("textLite"),(0,d.getColor)("textLite")),Ce=(0,v.default)(we.Z).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-1s7311w-1"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),xe=["onClick","start","end","isPlaying","isPickerOpen","tagging","color","fluid","onlyDates","tooltipContent","isSinglePicker","noDateSelected"],Oe=(0,i.forwardRef)((function(e,t){var n=e.onClick,c=e.start,l=e.end,u=e.isPlaying,s=e.isPickerOpen,d=e.tagging,m=e.color,f=e.fluid,p=e.onlyDates,g=e.tooltipContent,v=e.isSinglePicker,h=e.noDateSelected,b=(0,a.Z)(e,xe),y=(0,ue.I)(),w=(0,i.useMemo)((function(){if(h)return[];var e=function(e){return e<0?(0,j.Z)(new Date,{seconds:e}):new Date(e)}(c),t=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e?new Date(e):new Date}(l),n=function(e,t){return(0,se.default)(e,t)}(e,t);return[e,t,n]}),[c,l,h]),E=(0,o.Z)(w,3),C=E[0],x=E[1],O=E[2],k=(0,i.useMemo)((function(){return h?0:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.withSeconds,r=void 0!==n&&n,o=t.withTime,a=void 0===o||o,i=r||!!e.seconds;return ge.reduce((function(t,n){var r=n.key,o=n.unit;return"seconds"!==r||i?!a&&ve.includes(r)?t:e[r]?t?"".concat(t," ").concat(e[r]).concat(o):"".concat(e[r]).concat(o):t:t}),"")}(function(e,t){return(0,de.Z)({start:e,end:t})}(C,x),{withTime:!p})}),[u,C,x,h]);return i.createElement(Ce,{content:s?function(){}:g||"Select a predefined or a custom timeframe",align:"bottom",isDisabled:!n||y,plain:!0},i.createElement(Ee,(0,r.Z)({alignItems:"center",justifyContent:"center",gap:1,height:"100%",onClick:n,padding:[0,1],ref:t,"data-ga":"date-picker::click-time::".concat(d),"data-testid":"datePicker-accessorElement"},b),v&&h?i.createElement(he,null):i.createElement(be,{isPlaying:u,endDate:x,startDate:C,isSameDate:O,color:m,onlyDates:p}),!p&&!v&&!h&&i.createElement(ye,{isPlaying:u,duration:k,color:m,fluid:f})))})),ke=Oe,Se=n(95248),Ze=(n(32023),n(89211)),Pe=n(67622),Ie=n(37689),je=n(92517),De=(0,v.default)(d.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[.5,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:80}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-pg99kg-0"})([""]),Ne=(0,v.default)(d.Flex).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"sc-1gtygg6-0"})([""]),Te=(0,v.default)(d.Flex).attrs({justifyContent:"between",alignItems:"center",width:"100%",gap:2}).withConfig({displayName:"wrapper__Wrapper",componentId:"sc-1ehauu1-0"})([""]),_e=function(e){var t=e.name,n=e.offset,r=e.utc,o=e.onSelect,a=(0,i.useCallback)((function(){return o(r,n,t)}),[r,t]);return i.createElement(Pe.Z,{round:1,onClick:a,Wrapper:Te,"data-ga":"timezone-picker::click-timezone::global-view::".concat(t)},i.createElement(d.Text,{color:"text"},t),i.createElement(d.Text,{color:"textLite",whiteSpace:"nowrap"},"UTC ",n))},Fe=n(14600),Me=function(e){var t=e.value,n=e.onChange,r=e.timezoneRef,a=e.timezoneName,c=(0,i.useState)(""),l=(0,o.Z)(c,2),u=l[0],s=l[1],m=(0,Ze.Z)(),f=(0,o.Z)(m,2),p=f[0],g=f[1],v=(0,i.useRef)(),h=(0,i.useRef)();(0,i.useEffect)((function(){h.current&&p&&h.current.focus()}),[p]);var b=(0,i.useMemo)((function(){return u?Fe.K.filter((function(e){var t=e.text,n=e.offset;return t.toUpperCase().includes(u.toUpperCase())||n.includes(u)})):Fe.K}),[u]),y=function(){g(!1),s("")},w=(0,i.useCallback)((function(e,t,r){n(e,t,r),y()}),[]),E=(0,i.useCallback)((function(e){return s(e.target.value)}),[]);return i.createElement(je.Z,{hasBorder:!1,testId:"timezone-picker"},i.createElement(Pe.Z,{round:1,onClick:g,ref:v,Wrapper:Te,padding:[2],"data-ga":"timezone-picker::click-picker::global-view",selected:!0},i.createElement(d.Flex,{gap:1},i.createElement(d.Text,{color:"text",whiteSpace:"nowrap"},a," UTC ",t)),i.createElement(d.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})),v.current&&p&&i.createElement(De,{onClickOutside:y,onEsc:y,ref:r,target:v.current},i.createElement(d.Box,{padding:[0,2]},i.createElement(Ie.Z,{value:u,onChange:E,ref:h,"data-ga":"timezone-picker::click-search::global-view"})),i.createElement(Ne,null,b.map((function(e){var t=e.text,n=e.offset,r=e.utc;return i.createElement(_e,{key:t,name:t,offset:n,utc:r[0],onSelect:w})})))))},Ae=function(e){var t=e.timezoneRef,n=(0,Se.I0)(),r=(0,o.Z)(n,2),a=r[0],c=a.offset,l=a.timezoneName,u=r[1],s=(0,i.useCallback)((function(e,t,n){return u({utc:e,offset:t,timezoneName:n})}),[]);return i.createElement(Me,{timezoneRef:t,timezoneName:l,value:c,onChange:s})},Le=(n(68216),n(79433),["mousedown","touchstart"]),Be=n(91128),Re=["onChange","isSinglePicker","values","defaultValue","tagging","isPlaying","onlyDates","accessorProps","maxDate","minDate","accessorTooltipContent"],ze=function(e){var t=e.onChange,n=e.isSinglePicker,g=e.values,v=void 0===g?{}:g,h=v.start,y=v.end,w=v.singleDate,E=e.defaultValue,C=void 0===E?-900:E,x=e.tagging,O=void 0===x?"":x,S=e.isPlaying,Z=e.onlyDates,P=e.accessorProps,I=void 0===P?{}:P,j=e.maxDate,D=e.minDate,N=e.accessorTooltipContent,T=(0,a.Z)(e,Re),_=(0,i.useState)(w),F=(0,o.Z)(_,2),M=F[0],A=F[1],L=(0,i.useState)(h),B=(0,o.Z)(L,2),R=B[0],z=B[1],V=(0,i.useState)(h),H=(0,o.Z)(V,2),W=H[0],K=H[1],J=(0,p.Z)("resolution","minutes"),Q=(0,o.Z)(J,2),q=Q[0],$=Q[1],X=(0,i.useState)("startDate"),ee=(0,o.Z)(X,2),te=ee[0],ne=ee[1],re=(0,f.Z)(),oe=(0,o.Z)(re,4),ae=oe[0],ie=oe[1],ue=oe[3],se=(0,i.useRef)(),de=(0,i.useState)(null),me=(0,o.Z)(de,2),fe=me[0],pe=me[1],ge=(0,i.useState)(null),ve=(0,o.Z)(ge,2),he=ve[0],be=ve[1],ye=(0,i.useState)(null),we=(0,o.Z)(ye,2),Ee=we[0],Ce=we[1],xe=(0,Be.Z)();!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Le,n=arguments.length>2?arguments[2]:void 0,r=(0,i.useRef)();(0,i.useEffect)((function(){var o=function(t){Array.isArray(n)?n.every((function(e){return!e||!e.contains(t.target)}))&&e():r.current&&!r.current.contains(t.target)&&e()};return t.forEach((function(e){return document.addEventListener(e,o)})),function(){t.forEach((function(e){return document.removeEventListener(e,o)}))}}),[r,e,n])}(ue,["mouseup","touchend"],[fe,he,Ee,se.current]),(0,c.Z)((function(){xe(!!ae)}),[ae]);var Oe=(0,i.useCallback)((function(e){var t=e.startDate,n=e.endDate;z(t),K(n)}),[]);(0,i.useEffect)((function(){Oe({startDate:h,endDate:y})}),[h,y]);var Se=(0,i.useCallback)((function(){n?(A(w),ue()):Oe({startDate:C,endDate:0})}),[n]),Ze=(0,i.useCallback)((function(e){e.target.name&&ne(e.target.name)}),[]),Pe=(0,i.useCallback)((function(e){e.stopPropagation(),ie()}),[ie]),Ie=function(){n?t(M):(t({start:R,end:W}),xe(!1)),ue()},je=(0,i.useMemo)((function(){return function(e){return U[e]}(te)}),[te]),De=!!n||null!==R&&null!==W&&R!==W,Ne=!n&&(R===h&&W===y),Te=(0,i.useMemo)((function(){return C}),[]),_e=R===Te,Fe=(0,i.useCallback)((function(e,t){$(t),Oe({startDate:e,endDate:0})}),[]),Me=function(e){var r=e.startDate,o=e.endDate,a=e.singleDate;if(n)A(a),t(a),(0,m.L)("date-picker","click-date-picker",O,String(a));else{Oe(Z?{startDate:r?(0,l.default)((0,u.default)(new Date(r))):r,endDate:o?(0,l.default)((0,s.default)(new Date(o))):o}:{startDate:r,endDate:o});var i="finish"===je?o||r:r||o;(0,m.L)("date-picker","click-date-picker",O,String(i))}},ze=(0,i.useMemo)((function(){return se.current&&ae?i.createElement(k,{backdrop:!0,target:se.current,canHideTarget:!1,align:{top:"bottom",left:"left"},onEsc:ue},i.createElement(b,(0,r.Z)({ref:be,"data-testid":"datePicker"},T),i.createElement(d.Flex,{alignItems:"center",width:"100%",padding:Z?[4]:[0,6]},!Z&&!n&&i.createElement(d.Flex,{column:!0,gap:3,margin:[0,4,0,0],padding:[6,0],border:{side:"right",color:"borderSecondary"}},i.createElement(G,{handleTimePeriodChange:Fe,selectedDate:R,tagging:O}),i.createElement(Y,{handleTimePeriodChange:Fe,customTimePeriodRef:pe,resolution:q,tagging:O,value:R})),i.createElement(ce,{startDate:R,endDate:W,singleDate:M,setStartDate:z,setEndDate:K,onDatesChange:Me,onInputFocus:Ze,onlyDates:Z,maxDate:j,minDate:D,isSinglePicker:n})),i.createElement(d.Flex,{column:!0,padding:[4,6,2],width:"100%",border:{side:"top",color:"borderSecondary"}},!Z&&!n&&i.createElement(Ae,{timezoneRef:Ce}),i.createElement(d.Flex,{gap:1,justifyContent:n?"end":Z?"center":De?"between":"end",width:"100%"},!Z&&!n&&De&&i.createElement(le,{startDate:R,endDate:W,onlyDates:Z}),i.createElement(d.Flex,{alignItems:"center",justifyContent:"center",gap:1},i.createElement(d.Button,{label:"Clear",flavour:"hollow",onClick:Se,disabled:_e,"data-ga":"date-picker::click-clear::".concat(O,"-").concat(je),"data-testid":"datePicker-clear",small:!0}),i.createElement(d.Button,{label:"Apply",onClick:Ie,disabled:!De||Ne,"data-ga":"date-picker::click-apply::".concat(O,"-").concat(je),"data-testid":"datePicker-apply",small:!0})))))):null}),[R,O,q,W,De,_e,je,Ne,M,ae]);return i.createElement(i.Fragment,null,i.createElement(ke,(0,r.Z)({onClick:Pe,tagging:O,isPickerOpen:ae,isPlaying:S,setRangeValues:t,start:n?M:h,end:n?M:y,ref:se,onlyDates:Z,tooltipContent:N,isSinglePicker:n,noDateSelected:n&&!M},I)),ze)}},2379:function(e,t,n){n.d(t,{I:function(){return i},o:function(){return c}});var r=n(89250),o=n(3322),a={},i=function(){var e=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/alerts"),t=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/alerts/:alertId"),n=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/home"),i=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/functions"),c=((0,o.ZQ)({extraKey:"fn"})||a).hasHistory;return e||t||n||i&&!c},c=function(){return(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/events")}},92432:function(e,t,n){n.d(t,{L:function(){return r}});var r=function(e,t,n,r,o){var a,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"gaCustomEvent";if(window.envSettings.tracking){if(window.dataLayer){var c={event:i,eventCategory:e,eventAction:t,eventLabel:n,eventValue:r,eventResults:o};window.dataLayer.push(c)}window.gtag&&window.gtag("event","gaCustomEvent",{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r,eventResults:o}),null!==(a=window.posthog)&&void 0!==a&&a.__loaded&&window.posthog.capture(i,{eventCategory:e,eventAction:t,eventLabel:n,eventValue:r})}}},89405:function(e,t,n){n.d(t,{rA:function(){return y},tb:function(){return h}});var r=n(4942),o=n(45987),a=(n(91058),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),i=n(49546),c=n(58591),l=n(14600),u=["long","isTime","secs","timezone"],s=["locale"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=!!(Intl&&Intl.DateTimeFormat&&navigator.language),p=function(e){return"number"===typeof e?new Date(e):e},g=function(e){return(e=p(e))?(0,i.default)(e,"MM/dd/yyyy"):""},v=function(e){return(e=p(e))?(0,i.default)(e,"HH:mm"):""},h=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new Date(new Date(e).getTime()+60*parseInt(t)*60*1e3)},b=function(e,t){var n=t.locale,r=(0,o.Z)(t,s);return new Intl.DateTimeFormat(null!==n&&void 0!==n?n:navigator.language,function(e){var t=e.long,n=e.isTime,r=e.secs,a=e.timezone,i=(0,o.Z)(e,u);return m(m(m({hourCycle:"h23"},n?{}:t?{weekday:"short",year:"numeric",month:"short",day:"2-digit"}:{dateStyle:"short"}),n&&{timeStyle:r?"medium":"short"}),{},{timeZone:a},i)}(r)).format(e)},y=function(){var e=function(){var e=(0,c.m$)().utc;return(0,l.E)("default",e)}(),t=e.utc,n=e.offset;return{localeDateString:(0,a.useMemo)((function(){return f?function(e,n){return b(e,m({long:!0,timezone:t},n))}:g}),[t]),localeTimeString:(0,a.useMemo)((function(){return f?function(e,n){return b(e,m({secs:!0,isTime:!0,timezone:t},n))}:v}),[t]),utcOffset:n}}},72437:function(e,t,n){n.d(t,{xy:function(){return o}});n(26699);var r=[];var o=function(e){if(r.includes(e))return function(){return!0};var t="true"===localStorage.getItem(e);return function(e){return e||t}}("mobileAppNotifications")()},20709:function(e,t){var n=36e5;t.Z=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date)-e;if(t<0)return"0 seconds ago";var r=Math.floor(t/864e5);if(r>1)return"".concat(r," days ago");var o=Math.floor(t/n);if(o>0)return"".concat(o," hours ago");var a=Math.floor(t/6e4);if(a>1)return"".concat(a," mins ago");var i=Math.floor(t/1e3);return"".concat(i," seconds ago")}},71752:function(e,t,n){n.d(t,{T:function(){return r}});var r=function(e){return e.messages&&e.messages.length>0?e.messages[0]:void 0}},30688:function(e,t,n){n.d(t,{A:function(){return a},f:function(){return o}});var r=n(93433),o=(n(92222),n(85827),n(41539),n(25387),n(2490),n(72608),function(e,t){return{isValid:e,message:t}});function a(e){return Array.isArray(e)?function(t){return e.reduce((n=t,function(e,t){var o=t(n),a=o.isValid,i=o.message;if(a)return e;var c=e.messages,l=void 0===c?[]:c;return{isValid:a,messages:[].concat((0,r.Z)(l),[i])}}),{isValid:!0});var n}:(t=e,function(e){var n=t(e),r=n.isValid,o=n.message;return o?{isValid:r,messages:[o]}:{isValid:r}});var t}},31203:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=["onClick","src","title"],l=(0,a.forwardRef)((function(e,t){var n=e.onClick,l=e.src,u=e.title,s=void 0===u?"User avatar":u,d=(0,o.Z)(e,c);return a.createElement(i.Flex,(0,r.Z)({cursor:"pointer",round:"50%",as:"img","data-testid":"userAvatar",src:l||"https://www.gravatar.com/avatar/00000000000000000000000000000000?d=mp&f=y",title:s,alt:s,onClick:function(e){return n&&n(e)},width:8,height:8},d,{ref:t}))}));t.Z=l},70842:function(e,t,n){n.d(t,{Z:function(){return W}});var r=n(87462),o=n(29439),a=n(67294),i=n(64969),c=n(61152),l=n(82351),u=n(24533),s=n(71893),d=n(57387),m=n(78266),f=n(45987),p=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(78710)),g=n(46667),v=n(36065),h=n(74059),b=n(77872),y=n(97346),w=n(14428),E=["selectedSpace","setSelectedSpace","column","showFullname"],C=s.default.div.withConfig({displayName:"spaces__Separator",componentId:"sc-19p9rsp-0"})(["height:1px;width:",";background:",";"],(0,i.getSizeBy)(3),(0,i.getColor)("border")),x=function(e){var t=e.selectedSpace,n=e.setSelectedSpace,c=e.column,u=e.showFullname,s=(0,f.Z)(e,E),d=(0,h.Iw)(),m=(0,a.useMemo)((function(){return d.filter((function(e){return!(0,p.Ly)(e)}))}),[d]),x=(0,g.Z)(),O=(0,o.Z)(x,4),k=O[0],S=O[2],Z=O[3];return a.createElement(i.Flex,(0,r.Z)({"data-testid":"workspaceBar",padding:[3,2],column:c,alignItems:"center",justifyContent:"center"},s),a.createElement(i.Flex,{column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden"},a.createElement(i.Flex,{column:c,"data-testid":"workspaceBar-spacesList",gap:c?4:2,overflow:{vertical:"auto"},flexWrap:!c},m.map((function(e){return a.createElement(b.Z,{testIdPrefix:"workspaceBar-space",key:e,spaceId:e,onClick:n,active:e===(null===t||void 0===t?void 0:t.id),background:"selected",color:"bright",showFullname:u})}))),a.createElement(y.Z,{permission:"user:CreateSpace"},a.createElement(C,{"data-testid":"workspaceBar-separator"}),a.createElement(l.Z,{content:"Create a new Space",align:"right"},a.createElement(w.Z,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:S,"data-testid":"workspaceBar-addSpace-button"})))),k&&a.createElement(v.Z,{onClose:Z,onDone:n}))},O=n(56662),k=n(61458),S=n(33335),Z=n(23383),P=n(95383),I=n(73398),j=function(e){var t=e.selectedSpace,n=e.selectedRoom,r=e.setSelectedRoom,c=t.id;(0,Z.Z)(c);var u=(0,S.gI)("room:Create",c),s=(0,S.gI)("room:Read",c),d=(0,g.Z)(!1),m=(0,o.Z)(d,4),f=m[0],p=m[2],v=m[3],h=(0,a.useCallback)((function(e){e.stopPropagation(),u&&p()}),[u]),b=(0,P.WY)(c),y=(0,a.useMemo)((function(){return b.filter((function(e){return e.isMember}))}),[b]);return(0,a.useEffect)((function(){null!==y&&void 0!==y&&y.length&&(n||r(y[0]))}),[y,n]),a.createElement(a.Fragment,null,a.createElement(k.Z,{"data-testid":"workspaceRooms-menuList",disabled:!s,headerTestId:"workspaceRooms-warRooms",isOpen:!0,label:a.createElement(i.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px"},a.createElement(i.Flex,{alignItems:"center",gap:2},a.createElement(i.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),a.createElement(i.TextSmall,{color:"menuItem"},"Select a room")),a.createElement(i.Flex,{alignItems:"center",gap:2},a.createElement(l.Z,{content:"Create a new room",align:"right"},a.createElement(w.Z,{permission:"room:Create",tiny:!0,icon:"plus",onClick:h,"data-testid":"workspaceRooms-addWarRoom-button",spaceId:c}))))},a.createElement(i.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1]},y.map((function(e){var t=e.id;return a.createElement(I.Z,{key:t,id:t,hideAlerts:!0,Wrapper:i.TextSmall,isSidebar:!0,selectedId:null===n||void 0===n?void 0:n.id,onClick:function(){return r(e)}})})))),f&&a.createElement(O.U,{onClose:v,isSubmodal:!1}))},D=n(4942),N=(n(92222),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(33582)),T=n(13477),_=n(93017),F=n(28234),M=n(94221),A=n(49254),L=n(39469);function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){(0,D.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=(0,s.default)(i.ModalContent).attrs({width:{base:"80vw"},height:{base:"80vh",min:"80vh"}}).withConfig({displayName:"modal__ModalContent",componentId:"sc-4dwymj-0"})(["box-shadow:0 18px 28px rgba(0,0,0,0.5);"]),V=function(e){var t=e.claim,n=e.loading,r=(e.error,e.privateKey),o=e.setPrivateKey,c=e.selectedSpace,l=e.setSelectedSpace,u=e.selectedRoom,s=e.keyFilename;return c?u?a.createElement(a.Fragment,null,a.createElement(m.H,null),a.createElement(i.H3,{textAlign:"center"},'You are ready to connect your agent in "',u.name,'" of "',c.name,'"'),a.createElement(i.Text,{textAlign:"center"},"Last step is to ensure you're the admin of this agent ;)"),a.createElement(i.TextSmall,{textAlign:"center"},"We've created a file with a random key. Can you read it?"),a.createElement(d.ZP,{"data-testid":"key-filename-command",commandText:"sudo cat ".concat(s),width:"60%"},"$ sudo cat ",s),a.createElement(i.Flex,{column:!0,round:!0,background:"accent",border:"primary",padding:[2],width:"60%"},a.createElement(i.TextSmall,{color:"tooltip"},a.createElement(i.TextSmall,{strong:!0,color:"tooltip"},"Tip:")," ","Run the command and paste here the key it will give you. If the command doesn't work out of the box, locate the ",s," file, open it in your favorite text editor, and copy it to your clipboard.")),a.createElement(i.TextInput,{value:r,placeholder:"Paste private key here",onChange:function(e){return o(e.target.value)},metaShrinked:!0,containerStyles:{width:"60%"}}),a.createElement(i.Button,{label:"Claim your agent",onClick:t,disabled:!r||n,isLoading:n})):a.createElement(a.Fragment,null,a.createElement(m.H,null),a.createElement(i.H3,{textAlign:"center"},'Select a room in "',c.name,'" for this agent'),a.createElement(i.TextBig,{color:"textDescription",textAlign:"center"},"or create a new one by hitting the [+] button.")):a.createElement(a.Fragment,null,a.createElement(m.H,null),a.createElement(i.H3,{textAlign:"center"},"Let's connect your agent"),a.createElement(i.TextBig,{color:"textDescription",textAlign:"center"},"Select the space you want this agent to join"),a.createElement(i.TextBig,{color:"textDescription",textAlign:"center"},"or create a new one by hitting the [+] button."),a.createElement(x,{column:!!c,selectedSpace:c,setSelectedSpace:l,showFullname:!0,width:"80%"}))},U=function(e){var t=e.onClose,n=e.keyFilename,r=function(e){var t,n=(0,a.useState)(),r=(0,o.Z)(n,2),i=r[0],c=r[1],l=(0,a.useState)(),s=(0,o.Z)(l,2),d=s[0],m=s[1],f=(0,a.useState)(""),p=(0,o.Z)(f,2),g=p[0],v=p[1],b=(0,N.Z)(null===i||void 0===i?void 0:i.id),y=(0,h.Q6)(),w=null===(t=window.localNetdataRegistry)||void 0===t?void 0:t.mg,E=(0,u.Lz)(w),C=(0,o.Z)(E,2),x=C[0],O=x.claiming,k=x.claimingError,S=C[1],Z=(0,T.Iy)("isAnonymous"),P=(0,_.Z)(),I=(0,o.Z)(P,2),j=I[0],D=I[1],B=(0,u.Hu)(),z=(0,A.Hu)(),V=(0,L.Hu)();return{claim:(0,a.useCallback)((function(){var t;g&&!O&&b&&w&&y&&!Z&&d&&(S({claiming:!0}),(0,M.c)({key:g,token:null===b||void 0===b||null===(t=b[0])||void 0===t?void 0:t.token,rooms:[d.id],url:window.envSettings.apiUrl}).then((function(t){var n=t.data;if(!n.success)return S({claiming:!1,claimingError:n.message,claimId:null}),void D({message:n.message});B(),z(),V(),S(R(R({claiming:!1},n),{},{claimingError:""})),e(),j({header:"Your agent got connected to Netdata",text:"You can see your agent in the room ".concat(d.name," of ").concat(i.name," space.")})})).catch((function(e){var t,n=null===e||void 0===e||null===(t=e.response)||void 0===t?void 0:t.data;S({claiming:!1,claimingError:(0,F.r)(null===n||void 0===n?void 0:n.errorMsgKey)||(null===n||void 0===n?void 0:n.errorMessage)||"Something went wrong",claimId:null}),D({message:(0,F.r)(null===n||void 0===n?void 0:n.errorMsgKey)||(null===n||void 0===n?void 0:n.errorMessage)||"Something went wrong"})})))}),[b,g,w,y,Z,O]),selectedSpace:i,setSelectedSpace:c,selectedRoom:d,setSelectedRoom:m,loading:O,error:k,privateKey:g,setPrivateKey:v}}(t),c=r.claim,l=r.selectedSpace,s=r.setSelectedSpace,d=r.selectedRoom,m=r.setSelectedRoom,f=r.loading,p=r.error,g=r.privateKey,v=r.setPrivateKey;return a.createElement(i.Modal,{zIndex:7e3,backdropProps:{backdropBlur:!0}},a.createElement(i.Flex,{column:!0,alignItems:"end",gap:3},a.createElement(z,{tabIndex:0},a.createElement(i.ModalHeader,{justifyContent:"between"},a.createElement(i.Flex,{gap:2,alignItems:"center"},"Connect your agent to Netdata"),a.createElement(i.ModalCloseButton,{onClose:t,testId:"claim-modal-close-button"})),a.createElement(i.ModalBody,{overflow:{vertical:"auto"},padding:[0],height:"100%",column:!1},a.createElement(i.Collapsible,{background:"sideBar",open:!!l,direction:"horizontal"},a.createElement(x,{column:!0,selectedSpace:l,setSelectedSpace:s,background:"sideBarMini",height:"100%"})),a.createElement(i.Collapsible,{background:"sideBar",open:!!l,direction:"horizontal"},a.createElement(i.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"auto"},padding:[2,0]},!!l&&a.createElement(j,{selectedSpace:l,selectedRoom:d,setSelectedRoom:m}))),a.createElement(i.Flex,{alignItems:"center",column:!0,"data-testid":"claim-modal-body",flex:!0,gap:3,justifyContent:"center",padding:[4]},a.createElement(V,{selectedSpace:l,selectedRoom:d,setSelectedSpace:s,keyFilename:n,claim:c,loading:f,error:p,privateKey:g,setPrivateKey:v}))))))},H={unavailable:"Netdata is not available for this agent.",available:"Netdata is available. Click to claim it and gain the full benefits of Netdata!",disabled:"Netdata is available, but it is disabled, you can change the agent configuration to enable it.",banned:"The agent has been banned from cloud.",offline:"The agent tries to connect to Netdata, but it fails to do so.",online:"The agent is already connected to Netdata :)"},W=function(e){var t=(0,c.Z)("claimModal"),n=(0,o.Z)(t,4),s=n[0],d=n[2],m=n[3],f=(0,u.Lz)(),p=(0,o.Z)(f,1)[0],g=p.canBeClaimed,v=p.cloudStatus,h=p.keyFilename;return a.createElement(a.Fragment,null,a.createElement(l.Z,{plain:!0,content:H[v],isBasic:!0},a.createElement("div",null,a.createElement(i.Button,(0,r.Z)({label:"Connect to Netdata",onClick:d},e,{disabled:!g})))),s&&a.createElement(U,{onClose:m,keyFilename:h}))}},35253:function(e,t,n){n.d(t,{J:function(){return o},N:function(){return r}});var r={Community:"nightly",default:"stable",EarlyBird:"nightly"},o={nightly:{description:"Released at most once every 24 hours with fully-tested code that fixes bugs or security flaws, or introduces new features to Netdata. Every nightly release is a candidate for then becoming a stable release.",title:"Nightly"},stable:{description:"Released when a major milestone is reached. Stable releases might be a better choice for those who run Netdata in mission-critical production systems, as updates will come more infrequently.",title:"Stable"}}},16931:function(e,t,n){n.d(t,{Sn:function(){return l},U8:function(){return i},m7:function(){return c}});var r=n(67294),o=n(71893),a=n(64969),i=(0,o.default)(a.Box).attrs({border:{side:"all",color:"border"},padding:[1.75,7,1.75,3],round:!0}).withConfig({displayName:"styled__InfoBlock",componentId:"sc-1lice8m-0"})(["color:",';font-family:"Courier New",Courier,monospace;font-size:14px;letter-spacing:0.09px;line-height:18px;max-height:34px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%;'],(0,a.getColor)("textLite")),c=((0,o.default)(a.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1lice8m-1"})(["display:flex;align-self:flex-end;cursor:pointer;"]),function(e){var t=e.children;return r.createElement(a.Flex,{column:!0,gap:4},t)}),l=((0,o.default)(a.Flex).attrs({margin:[4,0]}).withConfig({displayName:"styled__StyledFlex",componentId:"sc-1lice8m-2"})(["nav{border:none;gap:",";padding:0;}"],(0,a.getSizeBy)(1)),(0,o.default)(a.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-1lice8m-3"})(["&&{width:auto;min-width:auto;height:22px;background:",";border:1px solid ",";border-radius:4px;padding:0;&:hover{background:",";& > span{span{color:",";}svg{fill:",";}}}& > span{display:flex;align-items:center;gap:6px;margin:2px 8px 2px 4px;span{color:",";}svg{fill:",";}}}"],(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"primary":"modalBackground")({theme:n})}),(0,a.getColor)("primary"),(0,a.getColor)("primary"),(0,a.getColor)("modalBackground"),(0,a.getColor)("modalBackground"),(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"modalBackground":"primary")({theme:n})}),(function(e){var t=e.active,n=e.theme;return(0,a.getColor)(t?"modalBackground":"primary")({theme:n})})));(0,o.default)(a.RadioButton).withConfig({displayName:"styled__RadioButton",componentId:"sc-1lice8m-4"})(["&&{align-items:baseline !important;color:red;}"])},52428:function(e,t,n){n.d(t,{J:function(){return u}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(58206),a=n(52631),i=n(74855);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,o.Z)(e);var n=(0,i.sc)(l(l({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear"},t),{},{success:!0}));a.Z.success(n,{context:"copy"})}}},57387:function(e,t,n){n.d(t,{ZM:function(){return g}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(45987),o=n(4942),a=n(67294),i=n(71893),c=n(64969),l=n(52428),u=["children"],s=["children","confirmationText","commandText"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var m=(0,i.default)(c.Box).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({color:"textDescription",background:"modalTabsBackground",border:{side:"all",color:"borderSecondary"},padding:[4,10,4,4],position:"relative",width:"100%"},e)})).withConfig({displayName:"command__StyledTerminalCommand",componentId:"sc-wnwmk3-0"})(["color:",';border-radius:2px;overflow-wrap:anywhere;white-space:pre-wrap;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,c.getColor)("textDescription")),f=(0,i.default)(c.Icon).withConfig({displayName:"command__StyledIcon",componentId:"sc-wnwmk3-1"})(["display:flex;align-self:flex-end;cursor:pointer;"]),p=(0,i.default)(c.Box).attrs({color:"textDescription",border:{side:"all",color:"borderSecondary"},background:"modalTabsBackground",padding:[0,1]}).withConfig({displayName:"command__CodeText",componentId:"sc-wnwmk3-2"})(["display:inline-block;color:",';border-radius:2px;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,c.getColor)("textDescription")),g=function(e){var t=e.children,n=(0,r.Z)(e,u);return a.createElement(p,n,t)};t.ZP=function(e){var t=e.children,n=e.confirmationText,o=void 0===n?"Command copied to your clipboard.":n,i=e.commandText,u=void 0===i?t:i,d=(0,r.Z)(e,s);return a.createElement(m,d,t,a.createElement(c.Box,{position:"absolute",bottom:"8px",right:"8px"},a.createElement(f,{name:"copy",size:"small",color:"primary",onClick:(0,l.J)(u||t,{text:o})})))}},80606:function(e,t,n){n.d(t,{F:function(){return c},I:function(){return i}});var r=n(4480),o=n(78401),a=(0,r.cn)({key:"cookiePreferences",default:(0,o.O)()}),i=function(){return(0,r.sJ)(a)},c=function(){return(0,r.FV)(a)}},70459:function(e,t,n){n.d(t,{F:function(){return c}});var r=n(29439),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(67294)),a=n(54576),i=n(95248),c=function(){var e=(0,a.useChart)(),t=(0,i.I0)(),n=(0,r.Z)(t,2),c=n[0],l=c.after,u=c.before,s=n[1],d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{autofetchOnWindowBlur:!1};return function(){if(e.getNodes().forEach((function(e){return e.updateAttributes(t)})),!(l<0)){var n=Math.floor((u-l)/1e3);s({after:-n,before:0})}}};return{play:(0,o.useCallback)(d(),[u,l]),forcePlay:(0,o.useCallback)(d({autofetchOnWindowBlur:!0}),[u,l]),pause:(0,o.useCallback)((function(){if(!(l>0)){var e=Date.now();s({after:1e3*Math.floor(e/1e3+l),before:1e3*Math.floor(e/1e3)})}}),[l])}}},92517:function(e,t,n){var r=n(71893),o=n(67294),a=n(64969),i=(0,r.default)(a.Flex).withConfig({displayName:"item__StyledFlex",componentId:"sc-1gby0f1-0"})(["&:hover{background:",";}"],(function(e){var t=e.hasHoverBackground,n=e.theme,r=e.hoverBackground,o=void 0===r?"borderSecondary":r;return t?(0,a.getColor)(o)({theme:n}):null})),c=(0,o.forwardRef)((function(e,t){var n=e.background,r=e.children,c=e.cursor,l=e.hasBorder,u=e.hasHoverBackground,s=e.onClick,d=e.padding,m=e.testId,f=e.borderColor,p=void 0===f?"selected":f,g=e.round,v=e.hoverBackground;return o.createElement(a.Flex,{alignItems:"center",border:l&&{side:"right",color:p},cursor:c,"data-testid":m,onClick:s,ref:t},o.createElement(i,{round:g,alignItems:"center",background:n,hasHoverBackground:u,margin:l?[0,3,0,0]:void 0,padding:d,hoverBackground:v},r))}));t.Z=c},27261:function(e,t,n){var r=n(64969),o=n(67294),a="node-status-indicator";t.Z=function(e){var t=e.statusText,n=e.counter,i=e.statusColor,c=i.statusTextColor,l=i.indicatorWrapperColor,u=i.counterColor;return o.createElement(r.Flex,{alignItems:"center",gap:2},o.createElement(r.TextSmall,{"data-testid":"".concat(a,"-text-").concat(t),color:c},t),o.createElement(r.Flex,{justifyContent:"center",alignItems:"center",padding:[0,1],width:{min:7.5},height:5,background:l,round:!0},o.createElement(r.TextSmall,{"data-testid":"".concat(a,"-counter-").concat(t),color:u},n)))}},9458:function(e,t,n){var r=n(67294),o=n(64969);t.Z=function(){return r.createElement(o.Box,{as:"hr",height:3,margin:[0],sx:{borderWidth:"0px 0px 0px 1px",borderColor:"placeholder",borderStyle:"solid"}})}},6973:function(e,t,n){n.d(t,{B:function(){return r}});var r={live:{statusTextColor:"live",indicatorWrapperColor:"live",counterColor:"bright"},stale:{statusTextColor:"stale",indicatorWrapperColor:"stale",counterColor:"bright"},offline:{statusTextColor:"textLite",indicatorWrapperColor:"offline",counterColor:"bright"},unseen:{statusTextColor:"unseen",indicatorWrapperColor:"unseen",counterColor:"bright"}}},4514:function(e,t,n){n.d(t,{c:function(){return d}});n(21249),n(57640),n(9924),n(47941);var r=n(67294),o=n(71893),a=n(64969),i=n(27261),c=n(9458),l=n(6973),u=(0,o.default)(a.Flex).withConfig({displayName:"wrapper__NodesIndicatorWrapper",componentId:"sc-gy5ftg-0"})(["pointer-events:",";cursor:",";opacity:",";"],(function(e){return e.disabled?"none":"auto"}),(function(e){return e.disabled?"default":"pointer"}),(function(e){return e.disabled?"0.4":"1"})),s={live:{counter:0,statusText:"Live"},stale:{counter:0,statusText:"Stale"},offline:{counter:0,statusText:"Offline"},unseen:{counter:0,statusText:"Unseen"}},d=function(e){return r.createElement(u,e,Object.keys(s).map((function(e){return r.createElement(r.Fragment,{key:e},r.createElement(i.Z,{statusText:s[e].statusText,counter:s[e].counter,statusColor:l.B[e]}),r.createElement(c.Z,null))})))};t.Z=u},64599:function(e,t,n){var r=n(87462),o=n(67294),a=n(64969),i=n(13477),c=n(83356);t.Z=function(e){var t=(0,i.Iy)("isAnonymous"),n=(0,c.Z)();return t?o.createElement(a.Button,(0,r.Z)({label:"Sign In",onClick:n},e)):null}},66143:function(e,t,n){n.r(t),n.d(t,{default:function(){return Qe}});n(66992),n(41539),n(88674),n(78783),n(33948);var r=n(67294),o=n(2145),a=n(64969),i=n(13477),c=(n(15581),n(2490),n(34514),n(54747),n(68035)),l=n(4480),u=n(30266),s=n(74059),d=n(33335),m=n(94979),f=n(78266),p=n(29439),g=n(46667),v=n(59636),h=n(67622),b=n(61458),y=n(37518),w=n(71893),E=(0,w.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,background:"dropdown",column:!0,margin:[2,0,0],overflow:{vertical:"auto"},padding:[2,0],round:1,width:64}).withConfig({displayName:"styled__Dropdown",componentId:"sc-1vwntsm-0"})([""]),C=(0,w.default)(a.H6).attrs({color:"text",padding:[2,4]}).withConfig({displayName:"styled__OtherRoomsHeader",componentId:"sc-1vwntsm-1"})([""]),x=n(82351),O=n(93033),k=n(14428),S=function(){var e=(0,g.Z)(),t=(0,p.Z)(e,4),n=t[0],o=t[1],i=t[3],c=(0,r.useRef)(),l=(0,y.Hm)(),u=l.slug,m=(0,s.OS)("name"),f=(0,O.Z)({roomSlug:u}),w=(0,d.gI)("room:Read"),S=(0,s.Q6)();return r.createElement(r.Fragment,null,r.createElement(a.Flex,{alignItems:"center",gap:1,"data-testid":"header-roomOptions"},r.createElement(h.Z,{ref:c,testid:"roomDropdownMenu-roomOptions",icon:"space_new",onClick:o,padding:[2],round:1,width:"auto",disabled:!w||S},l.name&&r.createElement(a.Flex,{alignItems:"center",gap:4},r.createElement(a.Text,null,l.name),r.createElement(a.Icon,{name:"chevron_down",size:"small",color:"text"}))),r.createElement(x.Z,{align:"bottom",content:"Room settings"},r.createElement(k.Z,{permission:"room:Leave","data-ga":"header::click-war-room-settings::global-view","data-testid":"header-manageWarRoom",onClick:f,icon:"gear",flavour:"borderless",neutral:!0,small:!0}))),c.current&&n&&r.createElement(E,{target:c.current,onEsc:i,onClickOutside:i},r.createElement(b.Z,{isOpen:!0,label:"ROOMS IN ".concat(m.toUpperCase()),headerTestId:"roomDropdownMenu-otherRooms",Header:C},r.createElement(a.Flex,{onClick:i,column:!0,height:{max:100},overflow:{vertical:"auto"}},r.createElement(v.Z,null)))))},Z=(n(92222),n(97945)),P=n(82902),I=(n(82526),n(41817),function(e){var t=e.description,n=e.title,o=e.testId,i=e.children;return r.createElement(a.Flex,{"data-testid":o,column:!0,gap:2},r.createElement(a.H4,{color:"textDescription"},n),r.createElement(a.Flex,{column:!0,"data-testid":o,gap:2},r.createElement(a.Text,{color:"textDescription"},t),i))}),j=function(e){var t=e.children,n=e.testId,o=e.icon,i=void 0===o?"nodes_update":o;return r.createElement(a.Flex,{"data-testid":n,padding:[6],round:1,width:"100%",background:"modalInfoBackground"},r.createElement(a.Box,{margin:[0,4,0,0]},r.createElement(a.Box,{as:a.Icon,width:10,height:10,name:i})),t)},D=function(e){var t=e.title,n=e.desciription;return r.createElement(a.Flex,{column:!0},r.createElement(a.Flex,null,r.createElement(a.Box,{margin:[0,4,0,0]},r.createElement(a.Icon,{color:"main",name:"warning_triangle_hollow"})),r.createElement(a.H3,null,t)),r.createElement(a.Box,{margin:[6,0,0,0]},n))},N=n(91008),T=n(91268),_=n(89250),F=(n(64211),n(41874),n(11389)),M=n(89050),A=n(86711),L=n(83925);var B=[{id:"name",accessor:"name",header:"Name",cell:function(e){var t=e.getValue,n=e.row;return r.createElement(N.Z,{disabled:!n.original.isLive&&"stale"!==n.original.state,color:"text",hoverColor:"primary",visitedColor:"accent",Component:a.TextSmall},t())},minSize:60},{id:"version",accessor:"version",header:"Version",cell:function(e){var t=e.getValue;return r.createElement(a.Pill,{color:"neutralPillColor",flavour:"neutral"},t())}},{id:"state",accessor:"state",header:"Status",cell:function(e){var t=e.getValue;return r.createElement(F.Z,{state:t()})},sortingFn:function(e,t){return n=(0,M.Q5)(e.original.state),r=(0,M.Q5)(t.original.state),n===r?0:n>r?1:-1;var n,r},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||t===(0,M.Q5)(r.state)}))},meta:{tooltip:r.createElement(A.Z,null),filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"}]}}},{id:"updateSeverity",accessor:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return r.createElement(L.Z,{name:n.name,os:n.os.id,container:n.hw.container,warningLevel:n.updateSeverity,labels:n.labels||{},version:n.version,text:t()})}}],R=n(77823),z=(0,l.cn)({key:"notificationModal",default:!1}),V=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).resetOnUnmount,t=void 0!==e&&e,n=(0,l.rb)(z),o=(0,l.FV)(z),a=(0,p.Z)(o,2),i=a[0],c=a[1],u=(0,r.useCallback)((function(){return c(!0)}),[]),s=(0,r.useCallback)((function(){return c(!1)}),[]);return(0,R.Z)((function(){t&&n()})),{isModalVisible:i,openModal:u,closeModal:s,resetState:n}},U=[{id:"updateSeverity",desc:!1}],H=function(){var e=V().closeModal,t=(0,r.useMemo)((function(){return{goto:{handleAction:function(e){var t=((null===e||void 0===e?void 0:e.labels)||{})._install_type,n=void 0===t?null:t,r=e.hw.container,o=e.os.id,a=e.version,i=(0,P.Ly)({container:r,os:o,_install_type:n,version:a});window.open(i,"_blank","noopener,noreferrer")},tooltipText:"Go to documentation"}}}),[]),n=(0,_.s0)(),o=(0,Z.Hg)();return{onClickRow:(0,r.useCallback)((function(t){var r=t.data;if(r.isLive||"stale"===r.state){var a=o(r.id);n(a),e()}}),[]),sortBy:U,rowActions:t,columns:B,disableClickRow:function(e){var t=e.data;return!t.isLive&&"stale"!==t.state}}},W=n(18129),G={updateSeverity:!0,connectionToCloud:!1},K=function(e){var t=e.data,n=H(),o=n.rowActions,a=n.onClickRow,i=n.disableClickRow,c=n.sortBy;return r.createElement(T.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},r.createElement(W.Z,{customSortBy:c,customNodes:t,showdDefaultRowActions:!1,showDefaultBulkActions:!1,columnVisibility:G,customRowActions:o,enableSelection:!1,onClickRow:a,disableClickRow:i}))},Y=function(e){var t=e.onClose,n=(0,Z.Ng)(),o=(0,Z.Ne)(n),i=n.length,c="Need update (".concat(n.length," ").concat((0,P.V6)(n.length),")");return r.createElement(a.Modal,{backdropProps:{backdropBlur:!0}},r.createElement(a.ModalContent,{width:{min:200,base:270},height:200},r.createElement(a.ModalHeader,null,r.createElement(D,{title:"Nodes that need Attention",desciription:r.createElement(a.Text,null,"You have ",r.createElement(a.Text,{strong:!0},i)," ",(0,P.V6)(i)," that should be upgraded to ensure experience using Netdata")}),r.createElement(a.ModalCloseButton,{onClose:t,testId:"close-button"})),r.createElement(a.ModalBody,{overflow:"hidden"},r.createElement(j,null,r.createElement(I,{title:c},r.createElement(a.Text,null,r.createElement(a.Flex,{column:!0},r.createElement(a.Text,null,"Please upgrade to ensure you get the latest security and bug fixes.")," ",r.createElement(a.Box,null,"To update your nodes to the latest version"," ",r.createElement(N.Z,{href:P.XY.default,rel:"noopener noreferrer",strong:!0,target:"_blank"},"please read our documentation"," "),"and find direct links for each node depending on where it is running and/or how it was installed."))))),r.createElement(a.Box,{height:"calc(100% - 145px)",padding:[3,0],margin:[0,0,8,0]},r.createElement(K,{data:o})))))},J=n(48286),Q=n(91128),q=n(2379),$=n(54576),X=n(9058),ee=n(95665),te=n(95248),ne=function(e){var t=e.tagging,n=e.isPlaying,o=(0,te.I0)(),a=(0,p.Z)(o,2),i=a[0],c=i.offset,l=i.after,u=i.before,s=a[1],d=(0,r.useCallback)((function(e){var t=e.start,n=void 0===t?-900:t,r=e.end;s({after:n,before:n<0?0:void 0===r?0:r})}),[]),m=(0,r.useMemo)((function(){return{start:l<0?l:Math.floor(l),end:l<0?0:Math.ceil(u)}}),[l,u]);return r.createElement(ee.Z,{values:m,utc:c,onChange:d,tagging:t,isPlaying:n})},re=n(92517),oe=(0,w.default)(a.Flex).withConfig({displayName:"container__Container",componentId:"sc-qc13l0-0"})(["background:",";"],(function(e){var t=e.theme,n=e.isPlaying;return("Dark"===t.name?(0,a.getRgbColor)(n?["green","green40"]:["neutral","grey70"]):(0,a.getRgbColor)(n?["green","green190"]:["neutral","grey185"]))({theme:t})})),ae=n(70459),ie=(0,w.default)(x.Z).withConfig({displayName:"playPausePill__StyledTooltip",componentId:"sc-1umryvu-0"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),ce=function(e){var t=e.isPlaying,n=e.isForcePlaying,o=e.isDisabled,i=(0,ae.F)(),c=i.play,l=i.pause,u=(0,r.useMemo)((function(){return function(e,t){return e?t?"forcePlay":"playSolid":"pauseSolid"}(t,n)}),[t,n]);return r.createElement(ie,{content:t?"Click to pause":"Click to play",align:"bottom",isDisabled:o},r.createElement(a.Box,{as:a.Pill,icon:u,onClick:t?l:c,isPlaying:t,"data-testid":"playPause-button",flavour:t?"success":"neutral",hollow:!0,_hover:{background:t?"accent":"neutralPillColor"},background:t?"primary":"neutralPillBg",color:"bright"},t?"Playing":"Paused"))},le=(0,w.default)(a.Flex).attrs({padding:[1],role:"button"}).withConfig({displayName:"styled__MenuButton",componentId:"sc-3h0zgs-0"})(["cursor:pointer;"]),ue=(0,w.default)(a.Drop).attrs({align:{top:"bottom",left:"left"},animation:!0,backdrop:!0,column:!0,padding:[2,0],background:"dropdown",round:1,overflow:{vertical:"auto"},margin:[.5,0,0],width:40}).withConfig({displayName:"styled__Dropdown",componentId:"sc-3h0zgs-1"})([""]),se=(0,w.default)(x.Z).withConfig({displayName:"styled__StyledTooltip",componentId:"sc-3h0zgs-2"})(["pointer-events:",";"],(function(e){return e.isDisabled?"none":"auto"})),de=function(e){var t=e.target,n=e.isDisabled,o=(0,g.Z)(),i=(0,p.Z)(o,4),c=i[0],l=i[1],u=i[3],s=(0,ae.F)(),d=s.play,m=s.pause,f=s.forcePlay;return r.createElement(r.Fragment,null,c?r.createElement(le,{onClick:l,width:"auto","data-testid":"playOptions-picker"},r.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"})):r.createElement(se,{content:"Play to refresh and have live content, pause to see historical, or force play to keep refreshing even when the tab loses focus at the expense of some system performance.",align:{bottom:"bottom",right:"right"},isDisabled:n,plain:!0},r.createElement(le,{onClick:l,width:"auto","data-testid":"playOptions-picker"},r.createElement(a.Icon,{name:"chevron_down",color:"text",width:"12px",height:"12px"}))),t.current&&c&&!n&&r.createElement(ue,{target:t.current,onEsc:u,onClickOutside:u},r.createElement(h.Z,{icon:"playOutline",onClick:function(){d(),u()},testid:"playOptions-play"},"Play"),r.createElement(h.Z,{icon:"pauseOutline",onClick:function(){m(),u()},testid:"playOptions-pause"},"Pause"),r.createElement(h.Z,{icon:"forcePlayOutline",onClick:function(){f(),u()},testid:"playOptions-forcePlay"},"Force Play")))},me=(0,r.memo)(de),fe=(0,$.withChartProvider)((function(){var e=(0,q.I)(),t=(0,q.o)(),n=(0,r.useRef)(),o=(0,$.useAttributeValue)("autofetch"),a=!(0,$.useAttributeValue)("paused")&&o&&!t,i=(0,$.useAttributeValue)("autofetchOnWindowBlur"),c=(0,Q.Z)();return(0,J.Z)((function(){c(!!e||!!t)}),[e,t]),r.createElement(re.Z,{hasBorder:!0,borderColor:"border",testId:"global-controls"},r.createElement(oe,{isPlaying:a,padding:[1,2],round:!0,height:"100%",alignItems:"center",gap:1,isDisabled:e,ref:n},r.createElement(ce,{isPlaying:a,isForcePlaying:i,isDisabled:e||t}),r.createElement(me,{target:n,isDisabled:e||t}),r.createElement(ne,{isPlaying:a,tagging:"global-view"})))})),pe=function(){var e=(0,X.e)().getRoot();return r.createElement(fe,{chart:e})},ge=n(96929),ve=n(78710),he=function(e){var t=e.toggle,n=e.upToDate,o=e.hasBorder;return r.createElement(re.Z,{borderColor:"borderSecondary",hasHoverBackground:!0,hasBorder:o},r.createElement(x.Z,{content:"News & Announcements",align:"bottom"},r.createElement(a.Button,{name:"news",icon:"insights",flavour:"borderless",neutral:n,warning:!n,onClick:t,"data-ga":"news::click-news::global-view"})))},be=function(){var e=(0,ge.zN)().length>0;return r.createElement(a.News,{app:ve.ZP?(0,ve.iM)()?"agent":["cloud","agent"]:"cloud"},(function(t){var n=t.toggle,o=t.upToDate;return r.createElement(a.Flex,{alignItems:"center","data-testid":"cloud-app-news",flex:!0,gap:1},r.createElement(he,{toggle:n,upToDate:o,hasBorder:!e}))}))},ye=n(4514),we=function(e){var t=e.children,n=e.background,o=e.testId,i=e.onClose,c=o||"header-banner";return r.createElement(a.Flex,{background:n,"data-testid":c,height:{min:10},padding:[2,10,2,2],position:"sticky",zIndex:5},t,r.createElement(x.Z,{align:"bottom",content:"Dismiss message",isBasic:!0,plain:!0,stretch:"align"},i&&r.createElement(a.Box,{"data-testid":"".concat(c,"-close-button"),as:a.Icon,color:"text",cursor:"pointer",name:"x",position:"absolute",right:"8px",onClick:function(e){i&&(e.stopPropagation(),i())}})))},Ee=n(62200),Ce={warning:{background:"warningBannerBg",isDissmissable:!0,icon:"warning_triangle_hollow",iconColor:"warning"},critical:{background:"errorBannerBg",isDissmissable:!1,icon:"warning_triangle_hollow",iconColor:"error"}},xe=function(e){var t=e.iconColor,n=e.icon,o=e.warningLevel,i=e.numberOfNodesWithCriticalSeverity,c=e.onClickUpdate;return r.createElement(a.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},r.createElement(a.Icon,{"data-testid":"icon-banner-agent-outdated-".concat(o),color:t,name:n})," ",r.createElement(a.Text,{"data-testid":"text-agent-outdated-critical",color:"main"},i," ",(0,P.V6)(i)," ",i>1?"are":"is"," below recommend agent version"," ",Ee._b,"."," ",r.createElement(a.Box,{"data-testid":"open-add-node",onClick:c,as:a.Text,cursor:"pointer",textDecoration:"underline",color:"main"},"Please update them")," ","to ensure you get the latest security bug fixes."))},Oe=function(e){var t=e.warningLevel,n=e.numberOfNodesWithCriticalSeverity,o=e.onClose,a=e.onClickUpdate,i=Ce[t],c=i.background,l=i.isDissmissable,u=i.icon,s=i.iconColor;return r.createElement(we,{background:c,onClose:l?o:null},r.createElement(xe,{iconColor:s,icon:u,warningLevel:t,numberOfNodesWithCriticalSeverity:n,onClickUpdate:a}))},ke=function(){var e=V().openModal,t=(0,Z.Ng)({severity:"critical"}).length;return t?r.createElement(Oe,{numberOfNodesWithCriticalSeverity:t,warningLevel:"critical",onClickUpdate:e}):r.createElement(r.Fragment,null)},Se=function(e){var t=e.onOpenModalClick,n=(0,Z.Ng)({severity:"critical"}).length,o=(0,Z.Ng)().length;return o?r.createElement(re.Z,{borderColor:"borderSecondary",cursor:"pointer",testId:"update-netdata-version-menu-item",hasBorder:!0,padding:[2,0]},r.createElement(a.Pill,{"data-testid":"update-netdata-version-badge",flavour:n?"error":"warning",icon:"warning_triangle_hollow",iconSize:"16px",hollow:!0,onClick:t,size:"small"},o)):null},Ze=n(24533),Pe=n(70842),Ie=n(64599),je={offline:{icon:"switch_off",color:"attention",text:"Offline"},online:{icon:"checkmark_s",color:"primary",text:"Online"}},De=function(){var e=(0,s.Q6)(),t=(0,i.Iy)("isAnonymous"),n=(0,Ze.Lz)(),o=(0,p.Z)(n,1)[0],c=o.canBeClaimed,l=o.cloudStatus;if(t)return r.createElement(Ie.Z,null);if(!e)return null;if(je[l]){var u=je[l],d=u.icon,m=u.color,f=u.text;return r.createElement(a.Flex,{alignItems:"center",gap:1},r.createElement(a.Icon,{name:d,color:m,width:"14px",height:"14px"}),r.createElement(a.TextSmall,{color:m},f))}return c?r.createElement(Pe.Z,null):null},Ne=(0,o.Z)((function(){return Promise.all([n.e(2008),n.e(4915),n.e(5765)]).then(n.bind(n,7922))}),"NodesIndicator"),Te=function(){var e=V(),t=e.isModalVisible,n=e.closeModal,o=e.openModal;return r.createElement(r.Fragment,null,r.createElement(ke,null),r.createElement(a.Flex,{as:"header","data-testid":"header",padding:[2],justifyContent:"between",alignItems:"center",height:12,position:"sticky",background:"topBarBg",zIndex:5},t&&r.createElement(Y,{onClose:n}),r.createElement(S,null),r.createElement(a.Flex,{alignItems:"center","data-testid":"header-features",gap:3},!window.envSettings.onprem&&r.createElement(be,null),r.createElement(pe,null),r.createElement(r.Suspense,{fallback:r.createElement(ye.c,{disabled:!0})},r.createElement(Ne,null)),r.createElement(De,{margin:[0,1,0,0],padding:[2,4]}),r.createElement(Se,{onOpenModalClick:o}))))},_e=n(15257),Fe=(0,w.default)(a.Flex).withConfig({displayName:"layout__UserControlContainer",componentId:"sc-18en99b-0"})(["bottom:0;left:0;"]),Me=function(e){var t=e.children;return r.createElement(a.Flex,{width:"100vw",height:"100vh",column:!0,justifyContent:"center",alignItems:"center",background:"mainBackground",position:"relative"},t,r.createElement(Fe,{position:"absolute",padding:[4]},r.createElement(_e.Z,null)))},Ae=(0,w.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),Le=(0,w.default)(a.Icon).withConfig({displayName:"loading__StyledIcon",componentId:"sc-11p1wp-0"})(["width:208px;height:177px;animation:"," 1.6s ease-in infinite;"],Ae),Be=function(){return r.createElement(r.Fragment,null,r.createElement(Le,{name:"netdata",color:"primary",title:"Loading","data-testid":"spaceCreationLoading-logo"}),r.createElement(a.H3,{color:"text",margin:[1,0,0]},"We are attempting to create your space but the system is currently busy."),r.createElement(a.Text,{color:"text",margin:[4.5,0,0]},"Thank you for your patience!"))},Re=n(83732),ze=function(){var e=(0,i.jr)(),t=(0,i.Iy)("email"),n=(0,r.useState)(!1),o=(0,p.Z)(n,2),c=o[0],l=o[1],u=(0,r.useCallback)((function(){return l(!1)}),[]),s=(0,Re.Z)({onSuccess:u,onError:u,isDefault:!0}),d=(0,r.useCallback)((function(){l(!0),s({userId:e,email:t})}),[e,t]);return r.createElement(a.Flex,{column:!0,gap:6,alignItems:"center"},r.createElement(a.Flex,{column:!0,gap:2,alignItems:"center"},r.createElement(a.H3,{color:"text"},"There was a problem with automatically creating your space"),r.createElement(a.Text,{color:"text"},"Please try again below")),r.createElement(a.Button,{label:"Continue",isLoading:c,onClick:d}))},Ve=function(){var e=(0,r.useState)(!0),t=(0,p.Z)(e,2),n=t[0],o=t[1];return(0,r.useEffect)((function(){var e=setTimeout((function(){return o(!1)}),1e4);return function(){return clearTimeout(e)}}),[]),r.createElement(Me,null,n?r.createElement(Be,null):r.createElement(ze,null))},Ue=n(27622),He=function(){return r.createElement(a.Flex,{background:"sideBarMini","data-testid":"workspaceBar",padding:[3,2],column:!0,alignItems:"center",gap:6,height:"100vh",justifyContent:"between"},r.createElement(Ue.Z,{"data-testid":"workspaceBar-netdataLogo"}))},We=n(6308),Ge=(0,o.Z)((function(){return n.e(6264).then(n.bind(n,26264))}),"Sidebar"),Ke=(0,o.Z)((function(){return Promise.all([n.e(8663),n.e(5969)]).then(n.bind(n,65969))}),"Modals"),Ye=(0,o.Z)((function(){return n.e(8102).then(n.bind(n,48102))}),"AcceptTermsDialog"),Je=(0,o.Z)((function(){return Promise.all([n.e(161),n.e(1193),n.e(4581),n.e(2008),n.e(4915),n.e(5316),n.e(3071),n.e(3981),n.e(2097),n.e(5091)]).then(n.bind(n,4781))}),"SpacePages"),Qe=function(e){var t=e.isUserLoaded;!function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).isUserLoaded,t=(0,l._8)((function(e){var t=e.set;return function(e){var n=e.results;t((0,s.YH)(),n),n.forEach((function(e){var n=e.id,r=e.permissions;t((0,d.SX)(n),r)}))}}),[]);(0,c.Z)((function(){return{key:"spaces",cache:!1,autorun:!!e,fetch:u.oq,association:{getIds:function(){return(0,s.st)("ids")},getError:function(){return(0,s.st)("error")},getLoaded:function(){return(0,s.st)("loaded")},getUpdatedAt:function(){return(0,s.st)("updatedAt")}},getResource:function(e){return(0,s.U7)({id:e})},onReceive:t,pollingOptions:{pollingInterval:412e3}}}),[!!e])}({isUserLoaded:t}),(0,m.Z)();var n=(0,We.c)().isIntegrationsPath,o=(0,s.Iw)(),p=(0,s.GM)("loaded"),g=(0,s.GM)("error"),v=(0,i.Iy)("isAnonymous");if(!t||!g&&!v&&!p)return r.createElement(f.Z,{title:"Loading your space..."});var h=o.length;if(g&&!h)throw g;return ve.ZP||v||h?r.createElement(a.Flex,{overflow:"hidden",height:"100vh",width:"100vw"},r.createElement(r.Suspense,{fallback:r.createElement(He,null)},r.createElement(Ge,null)),r.createElement(a.Flex,{column:!0,position:"relative",overflow:"hidden",flex:!0},!n&&r.createElement(Te,null),r.createElement(a.Flex,{column:!0,as:"main",background:"mainBackground",flex:!0,basis:"100%",height:"100%",overflow:"hidden"},r.createElement(r.Suspense,{fallback:r.createElement(f.Z,{title:"Loading your space..."})},r.createElement(Je,null)))),r.createElement(r.Suspense,{fallback:""},r.createElement(Ke,null),r.createElement(Ye,null))):r.createElement(Ve,null)}},27622:function(e,t,n){var r=n(87462),o=n(67294),a=n(64969);t.Z=function(e){return o.createElement(a.Icon,(0,r.Z)({name:"netdataPress",color:"success",height:"32px",width:"32px"},e))}},34885:function(e,t,n){n.d(t,{Z:function(){return m}});var r=n(87462),o=n(45987),a=n(67294),i=n(4211),c=n(64969),l=function(){return a.createElement(c.Text,null,"Something went wrong during document parsing")},u=["transformConfiguration","validationConfig","validate","errorComponent","children"],s=function(e){return function(t){var n=t.transformConfiguration,c=void 0===n?{}:n,s=t.validationConfig,d=void 0===s?{}:s,m=t.validate,f=t.errorComponent,p=t.children,g=(0,o.Z)(t,u),v=function(e){var t=e.markdocContent,n=e.validate,r=e.validationConfig,o=e.transformConfiguration;return(0,a.useMemo)((function(){var e=i.ZP.parse("string"===typeof t?t:""),a=[];return n&&(a=i.ZP.validate(e,r)),{tree:a.length?null:i.ZP.transform(e,o),errors:a}}),[t,n,r,o])}({markdocContent:p,validate:m,validationConfig:d,transformConfiguration:c}),h=v.tree,b=v.errors,y=f&&"function"==typeof f?f:l;return b.length?a.createElement(y,{errors:b}):a.createElement(e,(0,r.Z)({tree:h},g))}},d=(0,a.memo)(s((function(e){var t=e.tree,n=e.renderConfiguration;return i.ZP.renderers.react(t,a,n)}))),m=(s((function(e){var t=e.tree;return i.ZP.renderers.html(t)})),d)},67622:function(e,t,n){n.d(t,{z:function(){return s}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),c=n(64969),l=n(89250),u=["disabled","children","Wrapper","textProps","to","onClick","testid","icon","iconHeight","iconWidth","iconColor","textColor","padding","margin","round","gap","actions","selected","loading","width","isSidebar","isSecondary"],s=(0,i.default)(c.Flex).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-lf007z-0"})(["cursor:pointer;&:hover{background:",";}",""],(function(e){return(0,c.getColor)((e.isSidebar,"selected"))(e)}),(function(e){return e.selected&&"background: ".concat((0,c.getColor)((e.isSidebar,"selected"))(e),";")})),d=(0,i.default)(c.Icon).withConfig({displayName:"item__StyledIcon",componentId:"sc-lf007z-1"})(["flex:0 0 auto;"]),m=(0,i.default)(c.IconComponents.LoaderIcon).withConfig({displayName:"item__StyledLoaderIcon",componentId:"sc-lf007z-2"})(["flex:0 0 auto;height:16px;width:16px;"]),f=(0,a.forwardRef)((function(e,t){var n=e.disabled,i=e.children,f=e.Wrapper,p=void 0===f?c.Text:f,g=e.textProps,v=e.to,h=void 0===v?"":v,b=e.onClick,y=e.testid,w=e.icon,E=e.iconHeight,C=void 0===E?"16px":E,x=e.iconWidth,O=void 0===x?"16px":x,k=e.iconColor,S=void 0===k?"text":k,Z=e.textColor,P=void 0===Z?"text":Z,I=e.padding,j=void 0===I?[2,4]:I,D=e.margin,N=void 0===D?[0]:D,T=e.round,_=void 0===T?0:T,F=e.gap,M=void 0===F?3:F,A=e.actions,L=e.selected,B=e.loading,R=e.width,z=void 0===R?"100%":R,V=e.isSidebar,U=void 0!==V&&V,H=e.isSecondary,W=(0,o.Z)(e,u),G=(0,l.s0)(),K=(0,a.useCallback)((function(){n||(b&&b(),h&&G(h))}),[b,n,h]),Y=W["data-ga"]||"";return a.createElement(s,(0,r.Z)({ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:j,margin:N,round:_,onClick:K,"data-testid":y,width:z,selected:L,disabled:n,isSidebar:U},Y&&{"data-ga":Y}),a.createElement(c.Flex,{alignItems:"center",gap:M,flex:!0,basis:""},B?a.createElement(m,null):"string"===typeof w?a.createElement(d,{name:w,disabled:n,color:S,height:C,width:O}):w,a.createElement(p,(0,r.Z)({opacity:n?"medium":void 0,width:"150px",color:P,italic:H},g),i)),A)}));t.Z=f},61458:function(e,t,n){n.d(t,{g:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),c=n(64969),l=["disabled","isOpen","toggleOpen","label","children","headerTestId","Header"],u=(0,i.default)(c.H4).attrs({padding:[0,2],background:"error"}).withConfig({displayName:"list__DefaultListHeader",componentId:"sc-5df7lw-0"})(["cursor:pointer;pointer-events:",";"],(function(e){return e.disabled?"none":"auto"})),s=function(e){var t=e.disabled,n=e.toggleOpen,r=e.label,o=e.testid,i=e.Header,c=void 0===i?u:i;return a.createElement(c,{"data-testid":o,onClick:n,opacity:t?"medium":void 0,disabled:t},r)};t.Z=function(e){var t=e.disabled,n=e.isOpen,i=void 0!==n&&n,u=e.toggleOpen,d=e.label,m=e.children,f=e.headerTestId,p=e.Header,g=(0,o.Z)(e,l);return a.createElement(c.Flex,(0,r.Z)({column:!0},g),a.createElement(s,{disabled:t,Header:p,toggleOpen:u,label:d,testid:f}),a.createElement(c.Collapsible,{open:i},m))}},83925:function(e,t,n){var r=n(87462),o=n(4942),a=n(45987),i=(n(92222),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),c=n(64969),l=n(62200),u=n(82902),s=n(64637),d=["warningLevel","text","container","os","name","labels","version"];function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var f={warning:{icon:"warning_triangle_hollow",iconColor:"warning",background:"warningSemi",color:"warning",border:"warning",reccomendedVersion:l.I3,warningText:"is below the latest stable agent version"},critical:{icon:"warning_triangle_hollow",iconColor:"error",background:"errorSemi",color:"error",border:"error",reccomendedVersion:l._b,warningText:"is below the recommend agent version"}},p=function(e){var t=e.icon,n=e.iconColor,r=e.warningLevel,o=e.handeleNavigateToDocs,a=e.message;return i.createElement(c.Flex,{column:!0,width:{max:"200px"},gap:2},i.createElement(c.Flex,{alignItems:"center",gap:2},i.createElement(c.Icon,{name:t,color:n}),i.createElement(c.TextMicro,{color:"white"},(0,s.fm)(r))),i.createElement(c.Flex,{column:!0,gap:2},i.createElement(c.TextMicro,{color:"white"},a),i.createElement(c.TextMicro,{"data-testid":"text-agent-outdated-critical",color:"white"},i.createElement(c.Box,{"data-testid":"open-add-node",onClick:o,as:c.TextMicro,cursor:"pointer",textDecoration:"underline",color:"white"}," ","Please update them"," "),"to ensure you get the latest security bug fixes.")))};t.Z=function(e){var t=e.warningLevel,n=e.text,l=void 0===n?"Needs Update":n,g=e.container,v=e.os,h=e.name,b=e.labels,y=e.version,w=(0,a.Z)(e,d),E=f[t],C=E.icon,x=(E.flavour,E.hollow,E.background),O=E.color,k=E.border,S=E.reccomendedVersion,Z=E.iconColor,P=E.warningText,I=(0,i.useCallback)((function(){var e=(0,u.Ly)(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({container:g,os:v,version:y},b));window.open(e,"_blank","noopener,noreferrer")}),[g,v]),j="".concat(h," ").concat(P," ").concat(S);return i.createElement(c.Tooltip,{allowHoverOnTooltip:!0,content:i.createElement(p,{message:j,icon:C,iconColor:Z,warningLevel:t,handeleNavigateToDocs:I})},i.createElement(c.Pill,(0,r.Z)({icon:C,background:x,borderColor:k,color:O},w),(0,s.fm)(l)))}},11389:function(e,t,n){var r=n(67294),o=n(89050),a=n(62200),i=n(64969);t.Z=function(e){var t=e.state,n=e.rawState,c=n||(0,o.Q5)(t),l=a.WV[c.toLocaleLowerCase()],u=l.counterColor,s=l.indicatorWrapperColor;return r.createElement(i.Flex,{margin:[0,"auto",0,"auto"],width:20,height:"20px",padding:[.5,0],border:{side:"all",color:s},background:"nodeBadgeBackground",justifyContent:"center",round:4},r.createElement(i.TextMicro,{strong:!0,color:u},c))}},86711:function(e,t,n){var r=n(67294),o=n(64969);t.Z=function(){return r.createElement(o.Flex,{column:!0,width:{max:"200px"},gap:2},r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Live:")," ","Node is actual collecting and streaming metrics to Netdata"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Stale:")," ","Node is currently offline and not streaming metrics to Netdata. It can show historical data from a parent node"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Offline:")," ","Node is currently offline, not streaming metrics to Netdata and not available in any parent node"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Unseen:")," ","Nodes have never been connected to Netdata, they are claimed but no successful connection was established"))}},91268:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=["children","rightBar"],l=(0,a.forwardRef)((function(e,t){var n=e.children,l=e.rightBar,u=void 0===l?null:l,s=(0,o.Z)(e,c);return a.createElement(i.Flex,{id:"main",height:"100%",width:"100%"},a.createElement(i.Flex,(0,r.Z)({column:!0,overflow:"hidden",width:"100%"},s,{ref:t}),n),u)}));t.Z=l},97346:function(e,t,n){var r=n(33335);t.Z=function(e){var t=e.permission,n=e.spaceId,o=e.children;return(0,r.gI)(t,n)?o:null}},14428:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=n(33335),l=["ifForbidden","permission","spaceId"],u=(0,a.forwardRef)((function(e,t){var n=e.ifForbidden,u=void 0===n?"disabled":n,s=e.permission,d=e.spaceId,m=(0,o.Z)(e,l),f=(0,c.gI)(s,d);return"hide"!==u||f?a.createElement(i.Button,(0,r.Z)({ref:t,disabled:"disabled"===u&&!f||m.disabled},m)):null}));t.Z=u},15418:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(33335),c=["Component","ifForbidden","permission","children","spaceId"];t.Z=function(e){var t=e.Component,n=e.ifForbidden,l=void 0===n?"disabled":n,u=e.permission,s=e.children,d=e.spaceId,m=(0,o.Z)(e,c),f=(0,i.gI)(u,d);return"hide"!==l||f?"function"===typeof s?s(f):t?a.createElement(t,(0,r.Z)({},m,{disabled:"disabled"===l&&!f||m.disabled})):s:null}},37689:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(87462),o=n(45987),a=n(67294),i=n(71893),c=n(64969),l=(0,i.default)(c.TextInput).withConfig({displayName:"searchInput__SearchInput",componentId:"sc-1x493x7-0"})(["& input{background:transparent;}& > label{margin-bottom:0;}"]),u=["value","onChange"],s=(0,a.forwardRef)((function(e,t){var n=e.value,i=e.onChange,c=(0,o.Z)(e,u);return a.createElement(l,(0,r.Z)({inputRef:t,value:n,onChange:i,placeholder:"Search",name:"search",metaShrinked:!0},c))}))},7693:function(e,t,n){n.d(t,{A:function(){return l},x:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=["children","isSubmodal","onClose","title"],l=14,u=function(e){var t=e.children,n=e.isSubmodal,u=e.onClose,s=e.title,d=(0,o.Z)(e,c);return a.createElement(i.Flex,{justifyContent:"between",background:"modalHeaderBackground",alignItems:"center",padding:[0,4]},a.createElement(i.Flex,{alignItems:"center",height:l},a.createElement(i.Button,{neutral:!0,flavour:"borderless",icon:n?"chevron_left":"x",onClick:u,"data-testid":"sidebarModalHeader_".concat(n?"chevron_left":"close_button")}),a.createElement(i.H4,(0,r.Z)({color:"text"},d),s)),t)}},16645:function(e,t,n){n.d(t,{TZ:function(){return s},ZW:function(){return d},oU:function(){return u},u6:function(){return l}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(71893),a=n(64969),i=n(7693);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var l=(0,o.default)(a.PortalSidebar).withConfig({displayName:"sidebar__SidebarModal",componentId:"sc-tmwerm-0"})(["z-index:35;background:",";width:50%;max-width:",";overflow:",";"],(0,a.getColor)("modalBackground"),(0,a.getSizeBy)(90),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),u=(0,o.default)(a.PortalSidebar).withConfig({displayName:"sidebar__FullModal",componentId:"sc-tmwerm-1"})(["z-index:35;background:",";width:100%;overflow:",";"],(0,a.getColor)("modalBackground"),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),s=(0,o.default)(a.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({column:!0,background:"modalBackground",width:"100%",padding:[4,4,8]},e)})).withConfig({displayName:"sidebar__SidebarContent",componentId:"sc-tmwerm-2"})(["overflow:",";height:calc( 100vh - "," );"],(function(e){var t=e.overflow;return void 0===t?"auto":t}),(function(e){var t=e.hasFooter,n=e.hasModalTitle,r=void 0===n||n?i.A:0;return(0,a.getSizeBy)(t?(i.A+r+20)/2:(i.A+r)/2)})),d=(0,o.default)(a.Flex).attrs({height:20,justifyContent:"end",alignItems:"center",padding:[3],background:"modalHeaderBackground",border:{side:"top",color:"borderSecondary"}}).withConfig({displayName:"sidebar__SidebarFooter",componentId:"sc-tmwerm-3"})([""])},73256:function(e,t,n){n.d(t,{G:function(){return c}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(71893),a=n(64969);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var c=(0,o.default)(a.Flex).attrs((function(e){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({padding:[4,6,0],width:"100%",background:"modalTabsBackground"},e)})).withConfig({displayName:"tabs__TabHeader",componentId:"sc-1ramyo4-0"})([""])},92903:function(e,t,n){n.d(t,{B:function(){return l}});var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=["children"],l=function(e){var t=e.children,n=(0,o.Z)(e,c);return a.createElement(i.Flex,(0,r.Z)({justifyContent:"between",background:"modalBackground",alignItems:"center",padding:[4,4,0]},n),a.createElement(i.H3,null,t))}},81488:function(e,t,n){var r=n(29439),o=n(67294),a=n(43337),i=n(64969),c=n(15794),l=n(20709);t.Z=function(e){var t=e.text,n=e.updatedAt,u=e.error,s=(0,o.useState)(),d=(0,r.Z)(s,2)[1],m=function(e){if(!e)return"";var t=new Date(e);return t.getTime()?(0,l.Z)(t,new Date):""}(n);return(0,a.Z)((function(){return d(Math.random())}),1e3),o.createElement(c.Z,{theme:"dark"},o.createElement(i.Flex,{column:!0,gap:3},o.createElement(i.TextSmall,{color:"key"},t),u&&o.createElement(i.Flex,{alignItems:"center",gap:2},o.createElement(i.Icon,{width:14,height:12,color:"text",name:"warning_triangle"}),o.createElement(i.TextSmall,null,"Error: ",m?"Data not updated":"No data")),m&&o.createElement(i.TextMicro,null,o.createElement(i.TextMicro,{color:"key"},"Last updated: "),m)))}},90025:function(e,t,n){var r=n(87462),o=n(4942),a=(n(21249),n(57640),n(9924),n(57327),n(41539),n(88449),n(2490),n(59849),n(26699),n(32023),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),i=n(64969),c=n(95383);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u={closeMenuOnSelect:!1,backspaceRemovesValue:!1,isClearable:!1,blurInputOnSelect:!0,captureMenuScroll:!0,isMulti:!0};t.Z=function(e){var t=e.selectedValue,n=e.onChange,s=e.formatOptions,d=e.filterValues,m=e.placeholder,f=void 0===m?"search...":m,p=(0,c.J7)(),g=(0,a.useMemo)((function(){return p.map((function(e){var t=e.id,n=e.name;return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({label:n,value:t},s&&s({id:t,name:n}))}))}),[p,s]),v=(0,a.useMemo)((function(){return g.filter((function(e){var n=e.label,r=e.value;return t.includes(r)||d&&d({label:n,value:r})}))}),[g,t,d]),h=(0,a.useCallback)((function(e){var t=e.map((function(e){return e.value}));n(t)}),[n]);return a.createElement(i.Select,(0,r.Z)({placeholder:f},u,{options:g,value:v,onChange:h}))}},88866:function(e,t,n){n.d(t,{V:function(){return c},_:function(){return l}});var r=n(4942);n(85827),n(41539),n(25387),n(2490),n(72608),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i=[{iconName:"osAlpineLinux",logoFilename:"alpine.svg",name:"alpine",osNames:["Alpine Linux"],title:"Alpine Linux"},{iconName:"osAmazonLinux",logoFilename:"linux.svg",name:"linux",osNames:["Amazon Linux","Amazon Linux AMI"],title:"Amazon Linux"},{iconName:"osArchLinux",logoFilename:"arch.svg",name:"archarm",osNames:["Archcraft","Arch Linux","Arch Linux 32","Arch Linux ARM","ArchLabs","ArchLinux"],title:"Arch Linux"},{iconName:"osCentos",logoFilename:"centos.svg",name:"centos",osNames:["CentOS","CentOS Linux","CentOS Stream"],title:"CentOS"},{iconName:"osCoreOS",logoFilename:"coreos.svg",name:"coreos",osNames:["Container Linux by CoreOS"],title:"CoreOS"},{iconName:"osDebian",logoFilename:"debian.svg",name:"debian",osNames:["Debian GNU/Linux"],title:"Debian"},{iconName:"osFedora",logoFilename:"fedora.svg",name:"fedora",osNames:["Fedora","Fedora Linux","Fedora Remix for WSL"],title:"Fedora"},{iconName:"osFreeBSD",logoFilename:"freebsd.svg",name:"freebsd",osNames:["FreeBSD"],title:"FreeBSD"},{iconName:"serviceFreeNAS",logoFilename:"freenas.svg",name:"freenas",osNames:[],title:"FreeNAS"},{iconName:"osGentoo",logoFilename:"gentoo.svg",name:"gentoo",osNames:["Gentoo"],title:"Gentoo"},{iconName:"serviceKubernetes",logoFilename:"kubernetes.svg",name:"kubernetes",osNames:[],title:"Kubernetes"},{iconName:"osLinux",logoFilename:"linux.svg",name:"linux",osNames:[],title:"Linux"},{iconName:"osMacOSX",logoFilename:"macos.svg",name:"macos",osNames:["mac"],title:"MacOS"},{iconName:"osMacOSX",logoFilename:"macos.svg",name:"mac",osNames:["mac"],title:"MacOS"},{iconName:"osLinuxManjaro",logoFilename:"manjaro.svg",name:"manjaro",osNames:["Manjaro Linux","Manjaro-ARM"],title:"Manjaro"},{iconName:"serviceOpenStack",logoFilename:"openstack.svg",name:"openstack",osNames:[],title:"OpenStack"},{iconName:"osSuseLinux",logoFilename:"opensuse.svg",name:"opensuse",osNames:["openSUSE","openSUSE Leap","openSUSE Leap Micro","openSUSE MicroOS","openSUSE Tumbleweed"],title:"Open Suse"},{iconName:"serviceOpenWrt",logoFilename:"openwrt.svg",name:"openwrt",osNames:["OpenWrt"],title:"OpenWRT"},{iconName:"osOracle",logoFilename:"oracle.svg",name:"oracle",osNames:["Oracle Linux Server"],title:"Oracle Linux"},{iconName:"servicePfSense",logoFilename:"pfsense.svg",name:"pfsense",osNames:[],title:"PFSense"},{logoFilename:"raspberry-pi.svg",name:"raspberry-pi",osNames:[],title:"Raspberry PI"},{iconName:"osRaspbian",name:"raspbian",osNames:["Raspbian","Raspbian GNU/Linux"],title:"Raspbian"},{iconName:"osRedHat",logoFilename:"redhat.svg",name:"redhat",osNames:["Red Hat Enterprise Linux","Red Hat Enterprise Linux Server","Red Hat Enterprise Linux Workstation","RedHatEnterpriseServer"],title:"Red Hat Enterprise Linux"},{iconName:"osSuseLinux",logoFilename:"suse.svg",name:"suse",osNames:[],title:"Suse"},{iconName:"osUbuntu",logoFilename:"ubuntu.svg",name:"ubuntu",osNames:["Ubuntu","Ubuntu Core"],title:"Ubuntu"}],c=i.reduce((function(e,t){return a(a({},e),{},(0,r.Z)({},t.name,t))}),{}),l=i.reduce((function(e,t){return a(a({},e),t.osNames.reduce((function(e,n){return a(a({},e),{},(0,r.Z)({},n,t))}),{}))}),{})},15257:function(e,t,n){n.d(t,{Z:function(){return I}});var r=n(87462),o=n(45987),a=n(29439),i=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(71893)),c=n(67294),l=n(64969),u=n(15794),s=i.default.div.withConfig({displayName:"styled__Divider",componentId:"sc-14bbmjw-0"})(["background:",";height:1px;width:auto;margin:"," ",";"],(0,l.getColor)("disabled"),(0,l.getSizeBy)(1),(0,l.getSizeBy)(2)),d=n(67622),m=n(31203),f=n(46667),p=n(13477),g=n(1043),v=n(83356),h=(n(88674),n(17727),n(16645)),b=n(7693),y=n(73256),w=n(57683),E={flex:!0},C=function(e){var t=e.onClose,n=(0,c.useState)(!1),o=(0,a.Z)(n,2),i=o[0],u=o[1],s=(0,c.useState)(!1),d=(0,a.Z)(s,2),m=d[0],f=d[1],g=(0,c.useState)({}),v=(0,a.Z)(g,2),C=v[0],x=v[1],O=(0,w.Z)(),k=O.handleChangeTab,S=O.activeTabIndex,Z=O.tabsByName,P=O.tabs,I=(0,p.oH)(void 0,{shouldPersist:!0,onSuccess:t}),j=(0,c.useCallback)((function(){u(!0),I(C).finally((function(){return u(!1)}))}),[C]),D=(0,c.useMemo)((function(){return P.map((function(e){var n=Z[e],o=n.label,a=n.testId,i=n.Component;return c.createElement(l.Tab,{key:e,label:o,"data-testid":"userProfileModal-".concat(a)},c.createElement(i,(0,r.Z)({},"profile"===e&&{setFormState:x,setFormValid:f},{onClose:t})))}))}),[P]);return c.createElement(h.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},c.createElement(b.x,{onClose:t,title:"Settings"},"profile"===P[S]&&c.createElement(l.Button,{disabled:!m,label:"Save",onClick:j,isLoading:i,loadingLabel:"saving..."})),c.createElement(l.Tabs,{selected:S,onChange:k,TabContent:h.TZ,TabsHeader:y.G,tabsProps:E},D))},x=n(82351),O=(0,i.default)(l.Flex).attrs({column:!0,round:1}).withConfig({displayName:"dropdown__Dropdown",componentId:"sc-w0ej6i-0"})(["box-shadow:0 4px 4px rgba(0,0,0,0.25);"]),k=n(78710),S=["hasSeparator","name"],Z={"Operational Status":function(){return!0},"Sign In":function(e){var t=e.isAgent,n=e.isAnonymous;return!t&&n},Settings:function(e){var t=e.isAgent,n=e.isAnonymous;return t||!n},"Sign Out":function(e){return!e.isAnonymous}},P=(0,i.default)(l.Button).withConfig({displayName:"userControl__SignInButton",componentId:"sc-n4ebn8-0"})(["&&{> .button-icon{width:24px;height:24px;}}"]),I=function(e){var t=e.dropdownBackground,n=void 0===t?"dropdown":t,i=(0,p.Iy)("avatarURL"),h=(0,p.Iy)("isAnonymous"),b=(0,f.Z)(),y=(0,a.Z)(b,4),E=y[0],I=y[2],j=y[3],D=(0,c.useCallback)((function(){window.open("https://status.netdata.cloud","_blank")}),[]),N=(0,g.UQ)(),T=(0,v.Z)(),_=(0,w.Z)(),F=_.handleOpenProfileModal,M=_.handleCloseProfileModal,A=_.isProfileModalOpen,L=(0,c.useMemo)((function(){return[{name:"Settings",onClick:F,hasSeparator:!1,testid:"userControl-settings"},{name:"Operational Status",onClick:D,hasSeparator:!1,testid:"userControl-operationalStatus"},{name:"Sign In",onClick:T,hasSeparator:!0,testid:"userControl-signOut"},{name:"Sign Out",onClick:N,hasSeparator:!0,testid:"userControl-signOut"}].filter((function(e){return Z[e.name]({isAgent:k.ZP,isAnonymous:h})}))}),[h,k.ZP]);return c.createElement(u.Z,null,c.createElement(x.Z,!h&&{content:"Edit your account settings and manage your notifications",align:"right"},!k.ZP&&h?c.createElement(x.Z,{content:"Sign In",align:"right"},c.createElement(P,{small:!0,icon:"sign_in",onClick:I,"data-ga":"sidebar-sign-in::click-dropdown::global-view","data-testid":"sign-in-dropdown",iconSize:"medium",margin:[0,0,2]})):c.createElement(m.Z,{src:i||"","data-testid":"userControl-userAvatar",onClick:I})),E&&c.createElement(l.Layer,{margin:[5,17],position:"bottom-left",onClickOutside:j,onEsc:j},c.createElement(O,{background:n,padding:[2]},L.map((function(e){var t=e.hasSeparator,n=e.name,a=(0,o.Z)(e,S);return c.createElement(c.Fragment,{key:n},t&&c.createElement(s,{key:"".concat(n,"-itemSeparator")}),c.createElement(d.Z,(0,r.Z)({key:n,round:1},a),n))})))),A&&c.createElement(C,{onClose:M}))}},16772:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=["onChange","value","onKeyDown","label"];t.Z=function(e){var t=e.onChange,n=e.value,l=e.onKeyDown,u=e.label,s=(0,o.Z)(e,c);return a.createElement(i.TextInput,(0,r.Z)({label:u,name:"userEmail",placeholder:"Enter an email address",value:n,onChange:t,onKeyDown:l},s))}},57683:function(e,t,n){n.d(t,{Z:function(){return dt}});var r=n(29439),o=(n(57327),n(41539),n(88449),n(2490),n(59849),n(47941),n(26699),n(32023),n(67294)),a=n(65351),i=n(13477),c=n(64969),l=n(30688),u=n(31203),s=n(1043),d=n(46667),m=n(87462),f=n(93433),p=n(45987),g=(n(92222),n(71752)),v=["value","isValid","setIsValid","onChange","label","validators","fieldMessage"],h="User name cannot exceed ".concat(40," characters"),b=function(e){var t=e.length<=40;return(0,l.f)(t,h)},y=function(e){var t=e.value,n=e.isValid,a=e.setIsValid,i=e.onChange,u=e.label,s=e.validators,d=void 0===s?[]:s,h=e.fieldMessage,y=(0,p.Z)(e,v),w=(0,l.A)([b].concat((0,f.Z)(d))),E=(0,o.useState)(""),C=(0,r.Z)(E,2),x=C[0],O=C[1];return(0,o.useEffect)((function(){var e=w(t),r=e.isValid,o=(0,g.T)(e);!n&&r?a(!0):n&&!r&&a(!1),O(o||"")}),[n,t]),o.createElement(c.TextInput,(0,m.Z)({label:u||" ",name:"userName",placeholder:"Enter the user's name",value:t,onChange:i,fieldMessage:h,error:!n&&x},y))},w=n(16772),E=n(46715),C=n(74059),x=n(94666),O=n(72671),k=n(71893),S=(0,k.default)(c.Text).withConfig({displayName:"styled__Label",componentId:"sc-anprf9-0"})(["height:",";font-weight:bold;display:flex;align-items:center;margin-bottom:",";"],(0,c.getSizeBy)(3),(0,c.getSizeBy)(3)),Z=k.default.div.withConfig({displayName:"styled__AvatarBlock",componentId:"sc-anprf9-1"})(["height:",";display:flex;margin-bottom:",";"],(0,c.getSizeBy)(10),(0,c.getSizeBy)(4)),P=(k.default.div.withConfig({displayName:"styled__GravatarInfo",componentId:"sc-anprf9-2"})(["padding:0 ",";display:flex;flex-direction:column;justify-content:center;"],(0,c.getSizeBy)(2)),(0,k.default)(c.TextSmall).withConfig({displayName:"styled__StyledTextSmall",componentId:"sc-anprf9-3"})(["margin-bottom:",";"],(0,c.getSizeBy)(2)),(0,k.default)(c.TextNano).withConfig({displayName:"styled__StyledTextNano",componentId:"sc-anprf9-4"})(["color:",";"],(0,c.getColor)("textFocus")),k.default.div.withConfig({displayName:"styled__RadioRow",componentId:"sc-anprf9-5"})(["display:flex;flex-flow:row nowrap;align-items:center;padding:0 0 "," ",";"],(0,c.getSizeBy)(2),(0,c.getSizeBy)(1))),I=k.default.section.withConfig({displayName:"styled__StyledSection",componentId:"sc-anprf9-6"})(["display:flex;margin-top:auto;justify-content:flex-end;"]),j=[function(e){return(0,l.f)(!!e,"Name should not be empty")}],D=function(){},N=(0,O.F)((function(e){var t=e.isLastMember,n=e.spaceName,r=e.children;return o.createElement(c.Flex,{column:!0,gap:2},o.createElement(c.Text,null,"You are about to delete your account at ",o.createElement("strong",null,"Netdata"),". All data related to your account will be deleted."),t&&o.createElement(o.Fragment,null,o.createElement(c.Text,null,o.createElement(c.Text,{strong:!0},n)," space will be deleted since you are the last member."),r),o.createElement(c.Text,null,"This cannot be undone. Are you sure you want to continue?"))})),T=function(e){var t=e.setFormValid,n=e.setFormState,a=(0,i.Iy)("name"),l=(0,c.useInputValue)({value:a,maxChars:40}),m=(0,r.Z)(l,4),f=m[0],p=m[1],g=m[2],v=m[3],h=(0,o.useState)(!1),b=(0,r.Z)(h,2),O=b[0],k=b[1],P=(0,d.Z)(),T=(0,r.Z)(P,4),_=T[0],F=T[2],M=T[3],A=(0,d.Z)(),L=(0,r.Z)(A,2),B=L[0],R=L[1],z=(0,E.RP)().value,V=(0,C.OS)(),U=1===(0,x.H4)().length,H=(0,i.Iy)("email"),W=(0,i.Iy)("avatarURL");(0,o.useEffect)((function(){v&&t(O)}),[v,O]),(0,o.useEffect)((function(){n({name:f})}),[f]);var G=(0,s.R2)();return o.createElement(o.Fragment,null,o.createElement(S,{"data-testid":"userProfile-label"},"Photo"),o.createElement(Z,{"data-testid":"userProfile-avatarSection"},o.createElement(u.Z,{src:W||"","data-testid":"userProfile-avatar",width:24,height:24})),o.createElement(y,{"data-testid":"userProfile-username",value:f,label:"Name",onChange:p,isValid:O,setIsValid:k,validators:j,fieldIndicator:g,instantFeedback:"positiveFirst",isDirty:v}),o.createElement(w.Z,{"data-testid":"userProfile-email",label:"Email",disabled:!0,value:H,onChange:D}),o.createElement(I,{"data-testid":"userProfile-actions"},o.createElement(c.Button,{danger:!0,onClick:F,label:"Delete account","data-ga":"user-profile-settings::click-delete::global-view","data-testid":"userProfile-deleteAccount-button"}),_&&o.createElement(c.ConfirmationDialog,{confirmLabel:B?"Deleting...":"Yes, delete","data-ga":"delete-account-dialog","data-testid":"deleteAccountDialog",handleConfirm:function(){R(),G()},handleDecline:M,message:o.createElement(N,{isLastMember:U,spaceName:V.name,currentPlan:z}),title:"Delete Account",isConfirmDisabled:B,isConfirmLoading:B,isDeclineDisabled:B})))},_=n(91008),F=function(e){var t=e.gaPrefix,n=void 0===t?"cookie-consent":t,r=e.gaView,a=void 0===r?"global-view":r,i=e.testPrefix,l=void 0===i?"cookieConsent":i;return o.createElement(c.TextSmall,{"data-testid":"".concat(l,"-description")},"This website stores cookies on your computer. These cookies are used to collect information about how you interact with our website and allow us to remember you. We use this information to improve and customize your browsing experience and for analytics and metrics about our visitors on this website and other media. To find out more about the cookies we use, see Netdata's"," ",o.createElement(_.Z,{alignSelf:"start",Component:c.TextSmall,"data-ga":"".concat(n,"::click-policy-link::").concat(a),"data-testid":"".concat(l,"-policyLink"),href:"https://netdata.cloud/privacy",rel:"noopener noreferer",target:"_blank"},"Privacy Policy"),".")},M=n(4942),A=(n(15581),n(34514),n(54747),n(39714),n(21249),n(57640),n(9924),n(26833),n(82526),n(41817),n(38880),n(49337),n(33321),n(69070),n(92432)),L=n(80606),B=n(78401),R=n(52971),z=n(85456),V=(0,k.default)(c.Button).attrs({textTransform:"none",width:"auto"}).withConfig({displayName:"styled__Action",componentId:"sc-aj53iu-0"})(["&&{height:36px;","}"],(function(e){return e.isBanner&&"\n border-width: 0;\n \n > span {\n align-items: center;\n display: flex;\n }\n "}));(0,k.default)(c.Box).withConfig({displayName:"styled__AppContainer",componentId:"sc-aj53iu-1"})(["backdrop-filter:blur(2.5px);background-color:rgba(255,255,255,0.7);inset:0;pointer-events:all;position:absolute;z-index:10;"]),(0,k.default)(c.Icon).attrs({color:"primary",name:"chevron_down_thin"}).withConfig({displayName:"styled__ArrowIcon",componentId:"sc-aj53iu-2"})(["",";"],(function(e){return e.isOpen&&"transform: rotate(180deg);"})),(0,k.default)(c.Box).attrs({background:"bright",border:{color:"borderSecondary",side:"top"},width:"100%"}).withConfig({displayName:"styled__BannerContainer",componentId:"sc-aj53iu-3"})(["bottom:0;position:absolute;"]);function U(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?U(Object(n),!0).forEach((function(t){(0,M.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var W=function(e){var t=e.gaPrefix,n=void 0===t?"cookie-consent":t,a=e.gaView,l=void 0===a?"global-view":a,u=e.onClick,s=void 0===u?function(){}:u,d=e.testPrefix,m=void 0===d?"cookieConsent":d,f=(0,i.Iy)("id"),p=(0,o.useState)(z.lF),g=(0,r.Z)(p,2),v=g[0],h=g[1],b=(0,L.F)(),y=(0,r.Z)(b,2)[1],w=function(e){return function(t){var n=t.target;h((function(t){return H(H({},t),{},(0,M.Z)({},e,n.checked))}))}};return o.createElement(c.Flex,{column:!0,"data-testid":"".concat(m,"-preferences"),gap:3},Object.values(R.Ew).map((function(e){var t=e.defaultValue,r=e.description,a=e.disabled,i=e.ga,u=e.id,s=e.title;return o.createElement(c.Flex,{column:!0,"data-testid":"".concat(m,"-").concat(u),gap:1,key:u},o.createElement(c.Flex,{alignItems:"center","data-testid":"".concat(u,"-actionRow"),justifyContent:"between"},o.createElement(c.Flex,{alignItems:"baseline","data-testid":"".concat(u,"-titleContainer")},o.createElement(c.Text,{color:"main","data-testid":"".concat(u,"-title")},s),a&&o.createElement(o.Fragment,null,"\xa0",o.createElement(c.TextSmall,{color:"main","data-testid":"".concat(u,"-statusDescription")},"(always ",R.pD[t],")"))),o.createElement(c.Toggle,{colored:!0,"data-ga":"".concat(n,"::click-").concat(i,"-switch::").concat(l,"::").concat(v[u]?"enabled":"disabled"),"data-testid":"".concat(u,"-switch"),checked:v[u],disabled:a,onChange:w(u)})),o.createElement(c.TextSmall,{color:"textLite","data-testid":"".concat(u,"-description")},r))})),o.createElement(V,{alignSelf:"end","data-ga":"".concat(n,"::click-save-preferences::").concat(l),"data-testid":"".concat(m,"-savePreferences"),disabled:(0,z.fY)(v),flavour:"hollow",label:"Save preferences",onClick:function(){var e=[],t={};Object.keys(v).forEach((function(n){var r=v[n]?R.Ci.granted:R.Ci.denied;e.push("".concat(R.Ew[n].eventName,"=").concat(v[n].toString())),(0,z.ej)(n)!==r&&(R.Ew[n].gmtKeys.forEach((function(e){t[e]=r})),v[n]?R.Ew[n].handleAccept():R.Ew[n].handleDeny(),(0,z.d8)(n,(0,z.ow)(1),r))})),y((0,B.O)()),(0,z.v)(t),(0,A.L)("cookie-consent","save-preferences",e.join(","),f,"","cookie-consent-save-preferences"),s()},padding:[2,4]}))},G=function(e){var t=e.onClose;return o.createElement(c.Flex,{column:!0,"data-testid":"manageCookies",gap:3},o.createElement(F,{gaPrefix:"manage-cookies",testPrefix:"manageCookies"}),o.createElement(W,{gaPrefix:"manage-cookies",onClick:t,testPrefix:"manageCookies"}))},K=n(33937),Y=function(){var e=(0,K.k)("theme"),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useCallback)((function(e){return a(e.target.value)}),[]);return o.createElement(o.Fragment,null,o.createElement(S,null,"Netdata Theme"),o.createElement(P,null,o.createElement(c.RadioButton,{label:"Light Theme",checked:"light"===n,onChange:i,value:"light"})),o.createElement(P,null,o.createElement(c.RadioButton,{label:"Dark Theme",checked:"light"!==n,onChange:i,value:"dark"})))},J=n(82351),Q=n(93017),q=n(15861),$=n(64687),X=n.n($),ee=(n(73210),function(e){var t=e.onCloseModal,n=e.onCreate,a=(0,o.useState)(""),i=(0,r.Z)(a,2),l=i[0],u=i[1];return o.createElement(c.ModalContent,null,o.createElement(c.ModalHeader,null,"Create New Token",o.createElement(c.ModalCloseButton,{testId:"close-button",onClose:t})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{height:10,width:80},o.createElement(c.TextInput,{"data-testid":"description",placeholder:"Enter Description",onChange:function(e){var t=e.target;return u(t.value)},value:l}))),o.createElement(c.ModalFooter,null,o.createElement(c.Button,{disabled:""===l.trim(),label:"Create",onClick:function(){return n(l)},"data-testid":"btn-create"})))}),te=k.default.div.withConfig({displayName:"styled__TokenContainer",componentId:"sc-s1axew-0"})(["display:flex;flex-direction:column;align-items:center;color:",";background:",";border:1px solid ",';border-radius:2px;overflow-wrap:anywhere;white-space:pre-wrap;padding:23px 27px 14px;width:100%;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,c.getColor)("textDescription"),(0,c.getColor)("modalTabsBackground"),(0,c.getColor)("borderSecondary")),ne=function(e){return o.createElement(c.Box,(0,m.Z)({},e,{as:c.Icon,sx:{borderRadius:"50%",overflow:"hidden",background:(0,c.getColor)(["neutral","white"])}}))},re=function(e){return o.createElement(c.Text,(0,m.Z)({},e,{color:["neutral","bluebayoux"]}))},oe=function(e){return o.createElement(c.Flex,(0,m.Z)({},e,{as:c.Icon,sx:{alignSelf:"flex-end",cursor:"pointer"}}))},ae=n(58206),ie=n(55678),ce=n(74855);function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){(0,M.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var se=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,ae.Z)(e);var n=(0,ce.sc)(ue(ue({},ue({header:"Copied",text:"Token copied to your clipboard!",icon:"gear"},t)),{},{success:!0}));ie.Am.success(n,{context:"copy"})}},de=function(e){var t=e.onCloseModal,n=e.token;return o.createElement(c.ModalContent,null,o.createElement(c.ModalHeader,null,"Token Generated",o.createElement(c.ModalCloseButton,{testId:"close-button",onClose:t})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{column:!0,gap:4},o.createElement(te,null,o.createElement("span",{"data-testid":"token"},n),o.createElement(oe,{name:"copy",size:"small",color:"primary",onClick:se(n),"data-ga":"profile::click-copytoken::all-pages::api-token"})),o.createElement(c.Flex,{alignItems:"center",background:"warningBackground",gap:4,padding:[3,3],round:!0},o.createElement(ne,{"data-testid":"noNodesView-warningBannerIcon",name:"exclamation",color:"warning"}),o.createElement(re,{"data-testid":"warning-message"},"Make sure to copy or store this token and add it where you need it. Once you close this modal you will not be able to retrieve it again.")))),o.createElement(c.ModalFooter,null,o.createElement(c.Button,{label:"Close",onClick:t})))},me=n(26398),fe=function(e){var t=e.description,n=e.scopes;return me.Z.post("/api/v1/auth/account/api-token",{description:t,scopes:n})},pe=function(e){return me.Z.delete("/api/v1/auth/account/api-token/".concat(e))},ge=function(e){var t=e.onCloseModal,n=e.onTokenCreated,a=e.view,i=e.token,l=(0,o.useState)(a),u=(0,r.Z)(l,2),s=u[0],d=u[1],m=(0,o.useState)(i),f=(0,r.Z)(m,2),p=f[0],g=f[1],v=function(){var e=(0,q.Z)(X().mark((function e(t){var r;return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fe({description:t});case 2:r=e.sent,(0,A.L)("api-token","create-token","profile",t),g(r.data.token),d("CopyTokenView"),n();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return o.createElement(c.Modal,null,"CreateView"===s&&o.createElement(ee,{"data-testid":"create-view",onCloseModal:t,onCreate:v}),"CopyTokenView"===s&&p&&o.createElement(de,{onCloseModal:t,token:p}))},ve=n(49546);function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){(0,M.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ye=function(){var e=(0,o.useState)([]),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,d.Z)(!0),c=(0,r.Z)(i,4),l=c[0],u=c[2],s=c[3],m=function(){var e=(0,q.Z)(X().mark((function e(){var t;return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u(),e.next=3,me.Z.get("/api/v1/auth/account/api-token");case 3:t=e.sent,s(),a(t.data.map((function(e){return be(be({},e),{},{created_at:e.created_at?(0,ve.default)(new Date(e.created_at),"dd/MM/yyyy"):null,last_used_at:e.last_used_at?(0,ve.default)(new Date(e.last_used_at),"dd/MM/yyyy"):null})})));case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){m()}),[]),{isLoading:l,data:n,setData:a,fetchData:m}},we=[{id:"description",header:"Description",size:250,minSize:60,meta:{cellStyles:{sx:{whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"}}},cell:function(e){var t=e.getValue;return o.createElement(J.Z,{plain:!0,content:t()||"",isBasic:!0},o.createElement(c.Text,{whiteSpace:"nowrap",truncate:!0},t()||""))}},{id:"created_at",header:"Created at",size:90,minSize:90,cell:function(e){return(0,e.getValue)()||"-"}},{id:"last_used_at",header:"Used at",size:90,minSize:90,cell:function(e){return(0,e.getValue)()||"-"}},{id:"ends_with",header:"Token",size:90,minSize:90,cell:function(e){var t=e.getValue;return o.createElement(o.Fragment,null,o.createElement(c.Text,{style:{verticalAlign:"sub"}},"******"),t())}}],Ee=function(){var e=(0,o.useState)(!1),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useState)(!1),l=(0,r.Z)(i,2),u=l[0],s=l[1],d=(0,o.useState)(null),m=(0,r.Z)(d,2),f=m[0],p=m[1],g=ye(),v=g.data,h=g.setData,b=g.fetchData,y=(0,o.useMemo)((function(){return{addEntry:{handleAction:function(){return a(!0)},tooltipText:"Create new token"}}}),[]),w=(0,Q.Z)(),E=(0,r.Z)(w,2)[1],C=(0,o.useMemo)((function(){return{delete:{handleAction:function(e){var t=e.id;pe(t).then((function(){h((function(e){return e.filter((function(e){return e.id!==t}))})),(0,A.L)("api-token","delete-token","profile")})).catch(E)},confirmationTitle:"Delete API Token",confirmationMessage:"You are about to delete API Token, are you sure you want to continue?"}}}),[v]);return o.createElement(o.Fragment,null,o.createElement(c.NetdataTable,{dataColumns:we,data:v,bulkActions:y,rowActions:C}),n&&o.createElement(ge,{view:"CreateView",onCloseModal:function(){return a(!1)},onTokenCreated:b}),u&&o.createElement(ge,{view:"CopyTokenView",onCloseModal:function(){s(!1),p(null)},token:f}))},Ce=n(3528),xe=n(72437),Oe=n(50308),ke=n.n(Oe),Se=["disabledInfo"],Ze=["title","description","label","checked","onChange"],Pe=function(e){var t,n=e.title,r=void 0===n?"":n,a=e.description,i=void 0===a?"":a,l=e.label,u=void 0===l?"":l,s=e.checked,d=e.onChange,f=void 0===d?ke():d,g=(0,p.Z)(e,Ze),v=(t=c.Toggle,function(e){var n=e.disabledInfo,r=void 0===n?"This setting is disabled":n,a=(0,p.Z)(e,Se);return(a||{}).disabled?o.createElement(J.Z,{content:r},o.createElement(c.Box,null,o.createElement(t,a))):o.createElement(t,a)});return o.createElement(c.Flex,{justifyContent:"between",alignItems:"center"},o.createElement(c.Box,null,o.createElement(c.H5,null,r),o.createElement(c.TextSmall,null,i)),o.createElement(v,(0,m.Z)({colored:!0,onChange:f,checked:s,"data-testid":"profileNotifications-".concat(u,"NotificationsToggle"),"data-ga":"profile-ntab::click-toggle::global-view::".concat(s?"enabled":"disabled")},g)))},Ie=n(1653),je=(n(66992),n(88674),n(78783),n(33948),function(e){var t=e.value;return o.createElement(c.Box,{width:"232px",height:"232px",background:"white",padding:[4],round:3},o.createElement(Ie.Z,{size:200,value:t}))}),De=function(e){var t=e.onClose,n=void 0===t?ke():t,a=function(){var e=ye(),t=e.isLoading,n=e.data,a=(0,o.useState)(),i=(0,r.Z)(a,2),c=i[0],l=i[1],u=(0,Q.Z)(),s=(0,r.Z)(u,2)[1],d=function(){var e=(0,q.Z)(X().mark((function e(){var t,r;return X().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null===n||void 0===n?void 0:n.length)>0)){e.next=3;break}return e.next=3,Promise.all(n.map((function(e){var t=e.id;return pe(t)}))).catch(s);case 3:return e.next=5,fe({description:"Mobile App",scopes:["scope:mobile-app"]});case 5:t=e.sent,null!==(r=t.data)&&void 0!==r&&r.token&&l(r.token);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){t||d()}),[t]),{token:c}}(),i=a.token;return o.createElement(c.Modal,null,o.createElement(c.ModalContent,{width:{min:100,base:140}},o.createElement(c.ModalHeader,null,o.createElement(c.Text,null,"Scan QR Code"),o.createElement(c.ModalCloseButton,{onClose:n,testId:"close-button"})),o.createElement(c.ModalBody,null,o.createElement(c.Flex,{alignItems:"center",justifyContent:"center",height:100},i?o.createElement(je,{value:i}):o.createElement(c.Flex,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center",padding:[4]},o.createElement(c.H3,null,"Generating token")))),o.createElement(c.ModalFooter,null,o.createElement(c.Flex,{justifyContent:"end",padding:[1,2]},o.createElement(c.Button,{label:"Done",onClick:n})))))},Ne=function(){var e=(0,Ce.MJ)("email"),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useCallback)((function(){return a(!n)}),[n,a]),l=(0,Ce.MJ)("mobileApp"),u=(0,r.Z)(l,2),s=u[0],m=u[1],f=(0,o.useCallback)((function(){m(!(null!==s&&void 0!==s&&s.enabled))}),[s,m]),p=(0,d.Z)(),g=(0,r.Z)(p,4),v=g[0],h=g[2],b=g[3];return o.createElement(c.Flex,{column:!0,gap:2},o.createElement(Pe,{title:"E-mail",description:"Netdata will send you health notifications via e-mails",label:"email",checked:n,onChange:i}),xe.xy&&o.createElement(c.Flex,{column:!0},o.createElement(Pe,{title:"Mobile App Notifications",description:"Netdata will send you health notifications via mobile app notifications",label:"mobileApp",checked:null===s||void 0===s?void 0:s.enabled,onChange:f,disabled:!(null!==s&&void 0!==s&&s.linked),disabledInfo:"You have to link a device first and then enable notifications"}),o.createElement(c.Flex,{justifyContent:"end"},o.createElement(c.Button,{flavour:"borderless",icon:"qrCode",iconColor:"primary",iconSize:"small",onClick:h},o.createElement(c.Text,{color:"primary"},"Show QR code"))),v&&o.createElement(De,{onClose:b})))},Te=(n(85827),n(25387),n(72608),n(78266)),_e=n(33335),Fe=(n(69826),n(31672),n(59461),n(89211)),Me=n(45736),Ae=n(23383),Le=n(95383),Be=n(3689),Re=n(8018),ze=n(37518),Ve=k.default.div.withConfig({displayName:"styled__Row",componentId:"sc-lpc291-0"})(["width:100%;height:",";display:flex;flex-flow:row nowrap;align-items:center;padding-left:",";margin-bottom:",";"],(0,c.getSizeBy)(5),(0,c.getSizeBy)(3),(0,c.getSizeBy)(2)),Ue=(0,k.default)(c.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-lpc291-1"})(["width:20px;height:20px;margin-right:",";"],(0,c.getSizeBy)()),He=(0,k.css)(["&&{width:200px;}margin-left:auto;"]),We=(0,k.default)(c.Select).withConfig({displayName:"styled__StyledSelect",componentId:"sc-lpc291-2"})(["",""],He),Ge=(0,k.default)(c.Button).withConfig({displayName:"styled__SettingsLoader",componentId:"sc-lpc291-3"})([""," color:",";border:1px solid ",";.path{stroke:",";}"],He,(0,c.getColor)("text"),(0,c.getColor)("border"),(0,c.getColor)("text")),Ke=function(e){var t=e.roomId,n=e.spaceId,a=(0,Ce.dR)({roomId:t,spaceId:n,key:"alarms"}),i=(0,r.Z)(a,2),c=i[0],l=i[1],u=(0,o.useCallback)((function(e){l(e.value)}),[l]);return o.createElement(We,{options:Object.values(Be.YM),value:Be.YM[c],onChange:u})},Ye=function(e){var t=e.roomId,n=e.spaceId,a=(0,o.useState)(),i=(0,r.Z)(a,2),l=i[0],u=i[1],s=(0,Re.qn)(n,t,{onFail:function(){u(!1)},onSuccess:function(){u(!1)}}),d=(0,o.useCallback)((function(){u(!0),s()}),[s,t]);return o.createElement(c.Box,{margin:[0,2,0,"auto"]},o.createElement(J.Z,{content:"Join this room to activate notifications for it",isBasic:!0},o.createElement(c.Button,{isLoading:l,label:"Join",onClick:d,flavour:"hollow"})))},Je=function(e){var t=e.isMember,n=e.roomId,r=e.spaceId,a=(0,ze.tE)(n,"name");return o.createElement(Ve,{"data-testid":"roomSettings-room-".concat(a),"data-ga":"profile-ntab::click-join-room-".concat(a,"::global-view")},o.createElement(Ue,{name:"room",color:"text"}),o.createElement(c.Text,null,a),t?o.createElement(o.Suspense,{fallback:o.createElement(Ge,{isLoading:!0,flavour:"hollow",label:"Loading settings.."})},o.createElement(Ke,{roomId:n,spaceId:r})):o.createElement(Ye,{roomId:n,spaceId:r}))},Qe=k.default.div.withConfig({displayName:"styled__CollapsibleRoot",componentId:"sc-1p8t8zr-0"})(["width:100%;height:",";display:flex;flex-flow:row nowrap;align-items:center;cursor:pointer;margin-bottom:",";"],(0,c.getSizeBy)(5),(0,c.getSizeBy)(2)),qe=(0,k.default)(c.Icon).withConfig({displayName:"styled__OpenerIcon",componentId:"sc-1p8t8zr-1"})(["height:5px;width:6px;margin-right:",";",";"],(0,c.getSizeBy)(2),(function(e){return e.expanded&&"transform: rotate(90deg)"})),$e=(0,k.default)(c.Icon).withConfig({displayName:"styled__SpaceIcon",componentId:"sc-1p8t8zr-2"})(["width:20px;height:20px;margin-right:",";"],(0,c.getSizeBy)()),Xe=(0,k.default)(c.Text).withConfig({displayName:"styled__SpaceLabel",componentId:"sc-1p8t8zr-3"})(["font-weight:bold;"]),et=(0,k.default)(c.TextSmall).withConfig({displayName:"styled__SettingsInfo",componentId:"sc-1p8t8zr-4"})(["margin-left:auto;opacity:0.8;"]),tt=n(26913),nt=function(e){var t=e.expanded,n=e.onExpand,r=e.label,a=e.spaceId;(0,tt.Z)(a);var i=(0,Me.pV)(a,"channels").find((function(e){return"Email"===e.integration}))||{};return o.createElement(Qe,{onClick:n,"data-testid":"spaceRoot-space-".concat(r)},o.createElement(qe,{name:"chevron_right_s",expanded:t,color:"text"}),o.createElement($e,{name:"space",color:"text"}),o.createElement(Xe,null,r),!i.enabled&&o.createElement(et,null,"E-mail notifications for this space has been disabled by admin"))},rt={width:"108px",height:"77px"},ot=function(e){var t=e.spaceId,n=e.isCurrent,a=e.showAllRooms,i=(0,Fe.Z)(n),l=(0,r.Z)(i,2),u=l[0],s=l[1],d=(0,Ae.Z)(t,{autorun:!1,polling:!1}),m=(0,Le.y3)(t,"loaded");(0,o.useEffect)((function(){t&&u&&!m&&d()}),[u,m,t,d]);var f=(0,C.vu)(t,"name"),p=(0,Le.WY)(t),g=(0,o.useMemo)((function(){return a?p:p.filter((function(e){return e.isMember}))}),[p,a]),v=(0,o.useRef)();return(0,o.useEffect)((function(){u&&v.current&&v.current.scrollIntoView({behavior:"smooth",block:"start"})}),[u]),o.createElement(c.Flex,{column:!0,ref:v},o.createElement(nt,{expanded:u,onExpand:s,label:f,spaceId:t}),o.createElement(c.Collapsible,{open:u},(function(){return m?o.createElement(o.Fragment,null,g.map((function(e){var n=e.id,r=e.isMember;return o.createElement(Je,{isMember:r,key:n,roomId:n,spaceId:t})}))):o.createElement(Te.Z,{iconProps:rt,title:"Loading..."})})))},at=n(22613),it={width:"108px",height:"77px"},ct=function(){var e=(0,C.th)(),t=function(e){var t=(0,C.GM)("ids");return(0,o.useMemo)((function(){return t.reduce((function(t,n){return n===e?[n].concat((0,f.Z)(t)):[].concat((0,f.Z)(t),[n])}),[])}),[e,t])}(e),n=(0,_e.gI)("room:ReadAll"),a=(0,o.useState)(!1),i=(0,r.Z)(a,2),l=i[0],u=i[1];return o.createElement(o.Fragment,null,o.createElement(c.H4,null,"Notifications for all your Netdata Spaces and all the Rooms you are in"),n&&o.createElement(at.Z,{onFilterClick:function(e){return function(t){t.stopPropagation(),u(e)}},showAllRooms:l,padding:[1,0]}),o.createElement(c.Flex,{overflow:{vertical:"auto"},column:!0,"data-testid":"spaceRoomNotifications-spacesContainer",padding:[3,0,3]},o.createElement(o.Suspense,{fallback:o.createElement(Te.Z,{iconProps:it,title:"Loading notification settings..."})},t.map((function(t){return o.createElement(ot,{key:t,isCurrent:t===e,showAllRooms:l,spaceId:t})})))))},lt={offline:["basic"],online:["profile","basic","notifications","apiTokens","manageCookies"]},ut={profile:{Component:T,label:"Profile",order:0,testId:"profileTab"},basic:{Component:Y,label:"Basic",order:1,testId:"baseTab"},notifications:{Component:(0,o.memo)((function(){return o.createElement(c.Flex,{overflow:{vertical:"hidden"},column:!0,gap:2},o.createElement(c.H4,null,"Notification Methods"),o.createElement(o.Suspense,{fallback:"..."},o.createElement(Ne,null)),o.createElement(c.Flex,{height:"1px",background:"border"}),o.createElement(ct,null))})),label:"Notifications",order:2,testId:"notificationsTab"},apiTokens:{Component:Ee,label:"API tokens",order:3,testId:"apiTokensTab"},manageCookies:{Component:G,label:"Manage cookies",order:4,testId:"manageCookiesTab"}},st=function(e){return(ut[e]||ut.profile).order},dt=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).modalName,t=void 0===e?"profile":e,n=(0,i.Iy)("isAnonymous"),c=(0,o.useMemo)((function(){return Object.keys(ut).filter((function(e){return lt[n?"offline":"online"].includes(e)}))}),[n]),l=(0,a.Z)(t),u=l.isModalOpen,s=l.currentModalTab,d=l.handleOpenModal,m=l.handleCloseModal,f=l.handleChangeModalTab,p=(0,o.useState)(st(s)),g=(0,r.Z)(p,2),v=g[0],h=g[1],b=function(e){f(e)};return(0,o.useEffect)((function(){h(st(s))}),[s]),{handleOpenProfileModal:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"profile")},handleCloseProfileModal:function(){m()},getPreselectedTab:st,setCurrentTab:b,handleChangeTab:function(e){var t=c[e];h(e),b(t)},tabs:c,tabsByName:ut,activeTabIndex:v,isProfileModalOpen:u}}},39840:function(e,t,n){n.d(t,{e8:function(){return f},m9:function(){return d},pK:function(){return m},yi:function(){return s}});n(92222);var r=n(89250),o=n(67294),a=n(37518),i=n(95248),c=n(45771),l=n(20709),u=n(89405),s=function(e){var t=(0,r.s0)(),n=(0,a.A3)(),c=(0,i.XT)({extraKey:"alerts"}),l=(0,i.Sf)("alertStatuses",{extraKey:"alerts"});return(0,o.useCallback)((function(r){e&&c([e]),r&&"string"===typeof r&&l([r]),t("".concat(n,"/alerts"))}),[e,n,c])},d=function(e,t){if(void 0===e)return"-";var n=(0,c.J)(e);return t?"".concat(n," ").concat(t):n},m=function(e,t){return(0,o.useMemo)((function(){return d(e,t)}),[e,t])},f=function(e){var t=e.rawTime,n=e.secs,r=void 0!==n&&n,a=e.long,i=void 0!==a&&a,c=(0,u.rA)(),s=c.localeTimeString,d=c.localeDateString;return(0,o.useMemo)((function(){var e=new Date(1e3*t);return isNaN(e.valueOf())?{}:{timeAgo:(0,l.Z)(e,new Date),formattedDate:"".concat(d(e,{long:i})," ").concat(s(e,{secs:r}))}}),[t,s,d])}},45771:function(e,t,n){n.d(t,{J:function(){return r},j:function(){return o}});n(9653),n(61874),n(26699),n(32023);var r=function(e){var t=e<1?Number(e).toPrecision(3):Number(e).toFixed(2),n=Number.parseFloat(t);return Math.abs(n)>=1e9||Math.abs(n)<=1e-5&&0!==n?n.toExponential(3):n},o=function(e){return e.includes("critical")?"critical":e.includes("warning")?"warning":e.includes("clear")?"clear":e[0]}},83356:function(e,t,n){n(74916),n(15306),n(92222);var r=n(67294),o=n(89250),a=n(64637),i=n(78710);t.Z=function(){var e=(0,o.s0)();return(0,r.useCallback)((function(){if(i.ZP){var t=window.location.origin+window.location.pathname.replace(i.tj,"");window.location.href=(0,a.h2)("".concat(window.envSettings.cloudUrl,"/trust?redirect_uri=").concat(encodeURIComponent(window.location.href),"&agent_uri=").concat(encodeURIComponent(t||window.envSettings.agentApiUrl)))}else e("/sign-in")}),[])}},4808:function(e,t,n){n.d(t,{Ru:function(){return b},bj:function(){return k},g3:function(){return S},oU:function(){return v}});var r=n(4942),o=n(29439),a=n(45987),i=(n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(74916),n(77601),n(2707),n(39714),n(66992),n(78783),n(33948),n(41637),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),c=n(66152),l=n(39840),u=n(55436),s=n(78710),d=["spaceId","cloudNodeIds","nodeIds","fn","acceptedParams","merge"],m=["nodeIds","spaceId","roomId","roomSlug","anchor","merge","after","before"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){var t=e.functions,n=e.nodes;return t.map((function(e){return{name:e.name,nodes:e.ni.reduce((function(e,t){return n[t]?(e[n[t].nd||n[t].mg]=!0,e):e}),{})}}))},v=function(e,t){return(0,s.Ly)(e)?i.Z.get("/api/v2/functions",{baseURL:window.envSettings.agentApiUrl,transform:g}):i.Z.post("/api/v3/spaces/".concat(e,"/rooms/").concat(t,"/functions"),{scope:{nodes:[]},selectors:{nodes:["*"]}},{transform:g})},h=function(e,t){return function(n){return(n=(0,c.Tg)(n)).defaultCharts||"processes"!==e||(n.defaultCharts=[["CPU","Category"],["Memory","Category"]]),n.defaultCharts=n.defaultCharts||[],n.aggregations=n.facets,n.merge=t,n}},b=function(e){var t=e.spaceId,n=e.cloudNodeIds,r=e.nodeIds,c=e.fn,l=e.acceptedParams,u=void 0===l?[]:l,m=e.merge,f=void 0!==m&&m,p=(0,a.Z)(e,d),g=u.reduce((function(e,t){var n=function(e,t){return"after"===e||"before"===e?Math.floor(t/1e3):t}(t,p[t]);return(n=n?"".concat(n):null)?e?"".concat(e," ").concat(t,":").concat(n):"".concat(t,":").concat(n):e}),""),v=(0,s.Ly)(t);if(g=g?"".concat(v?"%20":" ").concat(g):"",v){var b=(0,o.Z)(r,1)[0];return i.Z.get("/host/".concat(b,"/api/v1/function?function=").concat(c).concat(g),{baseURL:window.envSettings.agentApiUrl,transform:h(c,f)})}var y=(0,o.Z)(n,1)[0];return i.Z.get("/api/v2/nodes/".concat(y,"/function"),{params:{function:"".concat(c).concat(g)},transform:h(c,f)})},y={filter:!1,index:1,name:"Unknown",sort:"ascending",sortable:!0,sticky:!1,summary:"",type:"string",uniqueKey:!1,visible:!0,dummy:!1},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,r.Z)({},e,p(p({},y),{},{name:t.name||e},t))},E=p(p(p(p(p({},w("Timestamp",{type:"datetime",index:0})),w("Description",{type:"feedTemplate",index:1})),w("Tags",{type:"pill",index:2})),w("source",{type:"feedTemplate",index:3,dummy:!0})),w("json",{type:"feedTemplate",index:4,dummy:!0})),C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=(0,o.Z)(e,1)[0];return"retention"===(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).type?/exceeds the maximum data retention/.test(t)?"You've exceeded your plan's retention limit":"":t},x=function(e,t){return function(n){var r,o,a=n.errors,i=void 0===a?[]:a,c=n.page_size,l=n.results,u=l.hits,s=l.aggregations,d=(null===u||void 0===u?void 0:u.hits)||[];return{columns:p({},E),data:d.map((function(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n._source,o=void 0===r?{}:r,a=n._source,i=a.event,c=a.host,l=void 0===c?[]:c,u=a.agent,s=void 0===u?{}:u,d=a.Netdata,m=a.tags,f=Array.isArray(l)?l:[l];return d=p(p({},d),d.alert?{alert:p(p(p({},d.alert),{},{id:null===(e=d.alert.transition)||void 0===e?void 0:e.id},d.alert.name?{name:Array.isArray(d.alert.name)?d.alert.name:[d.alert.name]}:{}),d.alert.current?{current:p(p({},d.alert.current),{},{status:d.alert.current.status?Array.isArray(d.alert.current.status)?d.alert.current.status:[d.alert.current.status]:[]})}:{})}:{}),[o["@timestamp"],i.id,m||[],p(p(p(p({},o),i),d),{},{hosts:f,agentId:s.id,roomId:t}),o]})),default_sort_column:null,type:"table",update_every:5,pageSize:c,totalSize:(null===(r=u.total)||void 0===r?void 0:r.value)||0,anchor:null===(o=d[d.length-1])||void 0===o||null===(o=o.sort)||void 0===o?void 0:o[0],aggregations:s,merge:e,retentionWarning:C(i,{type:"retention"}),warning:C(i)}}},O=function(e,t,n,r){return function(n){var o,a=n.facets,i=void 0===a?[]:a,c=n.items,u=void 0===c?{}:c,s=n.transitions,d=void 0===s?[]:s,m=d.map((function(n){var r=n.machine_guid,o=n.transition_id,a=n.node_id,i=n.hostname,c=n.alert,u=n.new,s=u.status,d=u.value,m=n.when,f=n.old.status,p=n.instance,g=n.units,v={action:"alert-node-transition",space:{id:e},roomId:t,alert:{id:o,current:{status:[s],value_string:(0,l.m9)(d,g)},previous:{status:f},name:[c]},chart:{name:p},hosts:[{id:a||r,name:i}]};return[1e3*m,o,["alert","node_instance"],v,v,s,name,p]}));return{columns:p(p(p(p({},E),w("Status",{type:"value",index:5,dummy:!0,filter:"multiselect"})),w("Alert Name",{type:"value",index:6,dummy:!0,filter:"multiselect"})),w("Instance",{type:"value",index:7,dummy:!0,filter:"multiselect"})),data:m,default_sort_column:null,type:"table",update_every:5,pageSize:100,totalSize:(null===u||void 0===u?void 0:u.matched)||m.length,anchor:null===(o=d[d.length-1])||void 0===o?void 0:o.gi,aggregations:i,merge:r,retentionWarning:null,warning:null}}},k=function(e){var t,n=e.nodeIds,r=void 0===n?[]:n,o=e.spaceId,c=e.roomId,l=e.roomSlug,d=e.anchor,f=void 0===d?"":d,g=e.merge,v=void 0!==g&&g,h=e.after,b=e.before,y=(0,a.Z)(e,m);if((0,s.Ly)(o)){var w=new URLSearchParams(p({after:h?Math.floor(h/1e3):h,before:b?Math.ceil(b/1e3):b,last:100,anchor_gi:f,options:"minify"},y)).toString();return i.Z.get("/api/v2/alert_transitions?".concat(w),{baseURL:window.envSettings.agentApiUrl,transform:O(o,c,0,v)})}return i.Z.post("/api/v1/feed/search",p(p({},y),{},{histogram_seconds:(null===(t=(0,u.BZ)(h,b))||void 0===t?void 0:t.secs)||1,node_ids:r,page_size:100,space_id:o,room_ids:"all-nodes"!==l?[c]:[],search_before:f||Date.now(),from_timestamp:h,to_timestamp:b}),{transform:x(v,c)})},S=function(){return i.Z.get("/api/v1/feed/static/facets")}},81732:function(e,t,n){n.d(t,{GQ:function(){return u},Zn:function(){return d}});var r=n(4942),o=(n(41539),n(88674),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),a=n(4808);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l=(0,o.xu)({key:"checkAgainFnsAtom",default:function(){return 1}}),u=(0,o.CG)({key:"availableFunctionsSelector",get:function(e){var t=e.spaceId,n=e.roomId,r=e.extraKey;return function(e){return(0,e.get)(l(t)),function(e){var t=e.spaceId,n=e.roomId;return"feed"===e.extraKey?Promise.resolve({data:[{name:"feed"}]}):(0,a.oU)(t,n)}({spaceId:t,roomId:n,extraKey:r})}}}),s={id:null,loading:!0,loaded:!1,data:null,error:"",type:"",updateEvery:1,availableFilters:{}},d={table:c(c({},s),{},{sortColumn:"",sortDirection:"descending",columns:{},columnVisibility:{},sortedColumns:[],pinnedColumns:[],groupByColumns:[]}),default:s};t.ZP=(0,o.xu)({key:"function",default:function(e){return c(c({},s),{},{id:e})}})},85672:function(e,t,n){n.d(t,{Ih:function(){return c},Kl:function(){return i},bb:function(){return o},vK:function(){return r}});var r=["#19C89E","#14A6C7","#F3D63D","#E05296","#FF7448","#C082FF"],o={xs:100,sm:140,md:180,l:220,xl:280,xxl:500},a=3600,i=86400,c=[{minLimit:350*i,secs:7*i,unit:"week"},{minLimit:50*i,secs:i,unit:"day"},{minLimit:13*i,secs:21600,unit:"hour"},{minLimit:5*i,secs:10800,unit:"hour"},{minLimit:136800,secs:a,unit:"hour"},{minLimit:61200,secs:1800,unit:"minute"},{minLimit:28800,secs:600,unit:"minute"},{minLimit:10800,secs:300,unit:"minute"},{minLimit:2280,secs:60,unit:"minute"},{minLimit:780,secs:30,unit:"second"},{minLimit:420,secs:10,unit:"second"},{minLimit:300,secs:5,unit:"second"},{minLimit:1,secs:1,unit:"second"}]},3322:function(e,t,n){n.d(t,{CE:function(){return O},Cf:function(){return B},Eq:function(){return A},FF:function(){return _},Hv:function(){return k},I_:function(){return Z},KO:function(){return w},T2:function(){return I},WO:function(){return D},ZQ:function(){return S},e6:function(){return N},fg:function(){return F},kU:function(){return M},mO:function(){return P},tD:function(){return C}});n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(93433),o=n(45987),a=n(29439),i=n(4942),c=(n(41539),n(88674),n(2707),n(85827),n(25387),n(2490),n(72608),n(47941),n(21249),n(57640),n(9924),n(67294)),l=n(89250),u=n(4480),s=n(95248),d=n(74059),m=n(37518),f=n(78710),p=n(81732),g=n(4808),v=["key"],h=["key"];function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){(0,i.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w=function(e){var t,n=(0,d.th)(),r=(0,m.UL)(),o=(0,u.$P)((0,p.GQ)({spaceId:n,roomId:r,extraKey:e})),a=(0,u._8)((function(t){var o=t.refresh;return function(){return o((0,p.GQ)({spaceId:n,roomId:r,extraKey:e}))}}),[n,r,e]);return{loaded:"loading"!==o.state,value:null===(t=o.contents)||void 0===t?void 0:t.data,hasError:"hasError"===o.state,refresh:a}},E=[],C=(0,u.CG)({key:"fnState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,p.ZP)(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)((0,p.ZP)(t),(function(e){return n?y(y({},e),{},(0,i.Z)({},n,r)):y(y({},e),r)}))}}}),x={extraKey:"fn"},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=(0,s.tk)("selected",y({defaultValue:E},e));return(0,a.Z)(t,1)[0]},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return(0,s.D0)("selected",y({defaultValue:E},e))},S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:x).key;return(0,u.sJ)(C({id:e,key:t}))}(O(e),e)},Z=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:x).key;return(0,u.Zl)(C({id:e,key:t}))}(O(e),e)},P=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return[S(e),Z(e)]},I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return(0,s.tk)("isPolling",e)},j=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return(0,s.Sf)("isPolling",e)},D=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return[I(e),j(e)]},N=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return(0,s.tk)("pollingInterval",e)},T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return(0,s.Sf)("pollingInterval",e)},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x;return[N(e),T(e)]},F=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=e.key,n=(0,o.Z)(e,v),r=O(n);return(0,s.D0)(t,{extraKey:"".concat(r||n.extraKey,"Settings")})},M=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:x,t=e.key,n=(0,o.Z)(e,h),r=O(n);return(0,s.D0)(t,{extraKey:"".concat(r||n.extraKey,"Filters")})},A=function(e){var t=(0,l.s0)(),n=function(){var e=(0,m.A3)();return e&&"".concat(e,"/functions")}();return(0,c.useCallback)((function(){t(n,{state:{nodeId:arguments.length>0&&void 0!==arguments[0]?arguments[0]:e}})}),[n,t])},L=(0,u.CG)({key:"feedFacetsSelector",get:function(e){return function(){return e?(0,g.g3)():Promise.resolve({data:{}})}}}),B=function(e){var t=(0,d.th)(),n=(0,f.Ly)(t),o=S({extraKey:e}),a=o.loading,i=o.loaded,l=o.aggregations,s=(0,u.$P)(L(!n&&"feed"===e));return(0,c.useMemo)((function(){var e;if("hasValue"!==s.state||!i)return[];if(!l)return[];if(Array.isArray(l))return l.reduce((function(e,t){return e.push(y(y({},t),{},{options:(0,r.Z)(t.options).sort((function(e,t){return t.count-e.count}))})),e}),[]).sort((function(e,t){return e.order-t.order}));var t=(null===s||void 0===s||null===(e=s.contents)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.facets)||{};return Object.keys(t).sort((function(e,n){return t[e].order-t[n].order})).reduce((function(e,n){var r,o=t[n],a=o.display_name,i=o.field;return null!==(r=l[n])&&void 0!==r&&r.buckets?(e.push({id:n,name:a,options:l[n].buckets.map((function(e){var t,n;return{id:e.key,name:(null===(t=s.contents.data.fields)||void 0===t||null===(t=t[i])||void 0===t?void 0:t[e.key])||e.key,count:(null===(n=e.hits)||void 0===n?void 0:n.doc_count)||0}}))}),e):e}),[])}),[e,n,s.state,i,a])}},55436:function(e,t,n){n.d(t,{BZ:function(){return u},Jw:function(){return i},Ol:function(){return l},kl:function(){return c}});n(54678),n(92222),n(69826),n(41539),n(31672),n(2490),n(59461);var r=n(67294),o=n(89405),a=n(85672),i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.decimalPoints,r=t.defaultValue;return null===e?void 0===r?"":r:isNaN(n)?e:parseFloat(e).toFixed(n)},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.defaultValue,r=void 0===n?"":n,o=t.usec;if(void 0!==o&&o&&(e=e?Math.floor(e/1e3):e),null===e)return r;var a=Math.floor(e/86400);e-=24*a*3600;var i=Math.floor(e/3600);e-=3600*i;var c=Math.floor(e/60);return"".concat(a,"d ").concat(i,"h ").concat(c,"m")},l=function(){var e=(0,o.rA)(),t=e.localeTimeString,n=e.localeDateString;return(0,r.useCallback)((function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=r.defaultValue,a=void 0===o?"":o,i=r.usec;void 0!==i&&i&&(e=e?Math.floor(e/1e3):e);var c=new Date(e);return isNaN(c.valueOf())?a:"".concat(n(c,{long:!1})," ").concat(t(c,{secs:!0}))}),[])},u=function(e,t){return a.Ih.find((function(n){var r=n.minLimit;return function(e,t){return e<0?Math.abs(t-e):(t-e)/1e3}(e,t)>=r}))}},67996:function(e,t,n){n.d(t,{Z:function(){return Q}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(67294),a=n(34885),i=n(87462),c=n(45987),l=(n(9653),n(71893)),u=n(64969),s=n(91008),d=n(57387),m=n(668),f=n(46189),p=["level"],g=["children","href"],v=["content"],h=["ordered","children"],b=["children"],y=l.default.article.withConfig({displayName:"nodes__StyledArticle",componentId:"sc-z8xzec-0"})(["padding-right:8px;padding-bottom:16px;"]),w=l.default.p.withConfig({displayName:"nodes__StyledParagraph",componentId:"sc-z8xzec-1"})(["margin-top:14px;line-height:1.5;"]),E=(0,l.default)(d.ZP).withConfig({displayName:"nodes__StyledCommand",componentId:"sc-z8xzec-2"})(["padding:8px;padding-right:32px;margin-top:8px;"]),C=l.default.ol.withConfig({displayName:"nodes__OrderedList",componentId:"sc-z8xzec-3"})(["list-style:roman;padding-left:16px;line-height:2;"]),x=l.default.ul.withConfig({displayName:"nodes__UnorderedList",componentId:"sc-z8xzec-4"})(['list-style-image:url("','/img/list-style-image.svg");padding-left:16px;line-height:2;'],f.Z.assetsBaseURL),O={document:{render:y},heading:{render:function(e){var t=e.level,n=void 0===t?1:t,r=(0,c.Z)(e,p),a={1:u.H1,2:u.H2,3:u.H3,4:u.H4,5:u.H5,6:u.H6}[n]||u.H1,l=n<=3?6-n:2;return o.createElement(a,(0,i.Z)({margin:[l,0,2,0]},r))},attributes:{id:{type:String},level:{type:Number}}},paragraph:{render:w},link:{render:function(e){var t=e.children,n=e.href,r=(0,c.Z)(e,g);return o.createElement(s.Z,(0,i.Z)({href:n,rel:"noopener noreferrer",target:"_blank"},r),t)},attributes:{href:{type:String}}},code:{render:function(e){var t=e.content,n=(0,c.Z)(e,v);return o.createElement(d.ZM,(0,i.Z)({as:"span"},n),t)},attributes:{content:{type:String}}},fence:{render:E,attributes:{content:{type:String}}},list:{render:function(e){var t=e.ordered,n=e.children,r=(0,c.Z)(e,h),a=t?C:x;return o.createElement(a,r,n)},attributes:{ordered:{type:Boolean}}},table:{render:function(e){var t=e.children,n=(0,c.Z)(e,b);return o.createElement(m.AB,n,t)}}},k=function(e){var t=e.summary,n=void 0===t?"":t,r=e.open,a=void 0!==r&&r,i=e.children;return o.createElement(u.Flex,{margin:[2,0,0,0]},o.createElement("details",{open:a},o.createElement("summary",null,o.createElement(u.Text,{strong:!0},n)),i))},S=n(29439),Z=(n(21249),n(57640),n(9924),n(88674),n(66342),n(62962),n(23748),(0,l.default)(u.Flex).attrs({column:!0}).withConfig({displayName:"styled__StyledTerminalCommand",componentId:"sc-3zs5xg-0"})(["position:relative;top:-1px;color:",";background:",";border:1px solid ",';cursor:pointer;overflow-wrap:anywhere;white-space:pre-wrap;padding:8px 16px 16px 8px;width:100%;font-family:"Courier New",Courier,monospace;font-weight:bold;letter-spacing:0.09px;line-height:16px;font-size:14px;word-break:break-word;overflow-y:auto;margin-top:',";"],(0,u.getColor)("primary"),(0,u.getColor)("terminalGreen"),(0,u.getColor)("terminalGreenBorder"),(function(e){return e.noMargin?"0":"16px"}))),P=(0,l.default)(u.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-3zs5xg-1"})(["display:flex;align-self:flex-end;cursor:pointer;position:absolute;bottom:8px;right:8px;"]),I=n(19480),j=n(52428),D=["children"],N=function(e){var t=e.children,n=(0,c.Z)(e,D),r=(0,o.useMemo)((function(){return(0,I.$O)(t)}),[t]);return o.createElement(Z,(0,i.Z)({onClick:(0,j.J)(r,{text:"Config copied to your clipboard."})},n),t,o.createElement(P,{name:"copy",size:"small",color:"textLite",onClick:(0,j.J)(r,{text:"Config copied to your clipboard."})}))},T=function(e){var t=e.children,n=(0,o.useState)(0),r=(0,S.Z)(n,2),a=r[0],i=r[1],c=o.Children.toArray(t).map((function(e){return e.props}));return o.createElement(u.Flex,{column:!0,width:"100%",margin:[4,0,0,0]},o.createElement(u.Flex,{border:{side:"bottom",size:"1px",color:"borderSecondary"},padding:[0,4]},o.createElement(u.Tabs,{selected:a,onChange:i},c.map((function(e){var t=e.label;return o.createElement(u.Tab,{key:t,label:o.createElement(u.Text,null,t),minWidth:"auto",maxWidth:"auto",padding:[1,4],background:"mainBackground",small:!0})})))),o.createElement(u.Flex,{flex:!0},o.createElement(N,{noMargin:!0},c[a].children)))},_=n(95248),F=n(89250),M=n(74059),A=n(8641),L=n(67034),B=function(e){var t=e.children,n=e.onClick;return o.createElement(u.Box,{as:"a",cursor:"pointer",onClick:n},t)},R=function(e){var t=e.categoryId,n=e.navigateToSettings,r=e.children,a=(0,F.s0)(),i=(0,_.I0)("selectedIntegrationCategory"),c=(0,S.Z)(i,2)[1],l=(0,M.uk)(),u=(0,A.wC)().pushCategory,s=(0,L.Z)(),d=(0,o.useCallback)((function(){n?(c("deploy.docker-kubernetes"),a({pathname:"/spaces/".concat(l,"/settings/integrations"),replace:!0})):u(s(t))}),[u,t,s,n]);return o.createElement(B,{onClick:d},r)},z=(0,o.memo)(R),V=(n(74916),n(15306),n(68757),n(69826),n(31672),n(59461),n(13477)),U=n(33335),H=function(e){var t=e.showClaimingOptions,n=e.command,r=void 0===n?"":n,o=e.claimToken,a=void 0===o?"":o,i=e.claimUrl,c=void 0===i?"":i,l=e.claimRooms,u=void 0===l?"":l;if(t)return r.replaceAll(/{% if \$showClaimingOptions %}\n?/gi,"").replaceAll(/{% \/if %}\n?/gi,"").replaceAll(/{% claim_token %}/gi,a).replaceAll(/{% claim_url %}/gi,c).replaceAll(/{% \$claim_rooms %}/gi,u);return r.replaceAll(/\{%\s*if\s*\$showClaimingOptions\s*%\}[\s\S]*?\{%\s*\/if\s*%\}\n?/g,"")},W=function(e){var t,n=e.methods,r=e.isNightly,a=e.claimToken,i=void 0===a?"":a,c=e.claimUrl,l=void 0===c?"":c,s=e.claimRooms,d=void 0===s?"":s,m=r?"nightly":"stable",f=function(){var e=(0,V.Iy)("isAnonymous"),t=(0,U.gI)("node:Create");return{showClaimingOptions:!e&&t}}().showClaimingOptions;return n.length?f&&!i?o.createElement(u.Flex,{padding:[8,0]},o.createElement(u.Text,null,"Loading token...")):n.length>1?o.createElement(T,null,n.map((function(e){var t=e.method,n=(e.commands.find((function(e){return e.channel==m}))||{}).command;return o.createElement(u.Tab,{key:t,label:t},H({showClaimingOptions:f,command:n,claimToken:i,claimUrl:l,claimRooms:d}))}))):o.createElement(N,null,H({showClaimingOptions:f,command:((null===(t=n[0])||void 0===t?void 0:t.commands.find((function(e){return e.channel==m})))||{}).command||"",claimToken:i,claimUrl:l,claimRooms:d})):null},G={nodes:O,tags:{details:{render:k,attributes:{summary:{type:String,default:""},open:{type:Boolean,default:!1}}},tabs:{render:T},tab:{render:u.Tab,attributes:{label:{type:String,default:""}}},terminal:{render:N},goToCategory:{render:z,attributes:{categoryId:{type:String,default:""},navigateToSettings:{type:Boolean,default:!1}}},command:{render:W,attributes:{methods:{type:Array,default:[]},isNightly:{type:Boolean,default:!1},claimToken:{type:String,default:""},claimUrl:{type:String,default:""},claimRooms:{type:String,default:""}}}}};function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=function(e){var t=e.config,n=void 0===t?{}:t,r=e.children;return o.createElement(a.Z,{transformConfiguration:Y(Y({},G),n)},r)},Q=(0,o.memo)(J)},26017:function(e,t,n){n(74916),n(4723);var r=n(67294),o=n(89250),a=n(64969),i=n(67996),c=n(74059),l=n(33582),u=n(37518),s=n(53338);t.Z=function(e){var t=e.integration,n=void 0===t?{}:t,d=e.isNightly,m=e.rooms,f=void 0===m?[]:m,p=e.navigateToSettings,g=n.deployContent,v=n.methods,h=(0,c.th)(),b=function(){var e=(0,o.TH)().pathname.match(/rooms\/(.*?)\/integrate-anything/);return(null===e||void 0===e?void 0:e.length)>=2?e[1]:void 0}()||s.i_,y=(0,u.HM)(h,b),w=(0,l.Z)(h),E=window.envSettings.apiUrl,C=f.length?f.join(","):y,x=(0,r.useMemo)((function(){var e;return{variables:{methods:v,isNightly:d,claimToken:null===w||void 0===w||null===(e=w[0])||void 0===e?void 0:e.token,claimUrl:E,claimRooms:C,navigateToSettings:p}}}),[v,d,w,E,C,p]);return r.createElement(a.Flex,{width:"100%",column:!0,gap:4,padding:[4,0,0,0]},r.createElement(i.Z,{config:x},g))}},35819:function(e,t,n){n(82526),n(41817);var r=n(67294),o=n(64969),a=n(91008),i=n(82351),c=n(50308),l=n.n(c),u=n(35253),s={left:"stable",right:"nightly"},d=function(e){var t=e.right,n=u.J[s[t?"right":"left"]]||{},a=n.title,c=n.description;return r.createElement(i.Z,{content:c,align:"bottom"},r.createElement(o.Text,{padding:t?[0,0,0,1]:[0,1,0,0]},a))};t.Z=function(e){var t=e.isNightly,n=e.toggleNightly,i=void 0===n?l():n;return r.createElement(o.Flex,{column:!0,gap:1},r.createElement(a.Z,{href:"https://learn.netdata.cloud/docs/getting-started/install-netdata#nightly-vs-stable-releases",rel:"noopener noreferrer",target:"_blank"},r.createElement(o.Flex,{alignItems:"center",gap:1},r.createElement(o.Text,{color:"primary"},"Updates channel"),r.createElement(o.Icon,{color:"primary",name:"goToNode",width:"18px",height:"18px"}))),r.createElement(o.Toggle,{labelLeft:"Stable",labelRight:"Nightly",Label:d,colored:!1,checked:t,disabled:!1,onChange:i}))}},41898:function(e,t,n){n.d(t,{vE:function(){return B},n5:function(){return G},xN:function(){return K},Kl:function(){return R},p1:function(){return W},O_:function(){return z},RV:function(){return H},DW:function(){return L},ON:function(){return U},JZ:function(){return V}});var r=n(29439),o=n(87462),a=n(67294),i=n(50308),c=n.n(i),l=n(64969),u=n(27622),s=n(71893),d=n(74059),m=n(20428),f=n(46667),p=n(54131),g=function(e){var t=e.name,n=e.onEdit,r=void 0===n?c():n;return a.createElement(l.Flex,{alignItems:"center",gap:2},a.createElement(l.TextBig,null,t),a.createElement(l.Button,{icon:"pencilOutline",flavour:"borderless",iconColor:"text",iconSize:"small",padding:[0],onClick:r}))},v=(0,s.default)(l.Flex).withConfig({displayName:"spaceInfo__StyledWrapper",componentId:"sc-166ce7m-0"})(["margin-top:-3px !important;margin-bottom:-3px !important;"]),h=function(e){var t=e.name,n=e.setName,o=void 0===n?c():n,i=e.onSave,u=void 0===i?c():i,s=e.onCancel,d=void 0===s?c():s,m=e.isLoading,f=(0,a.useState)(),g=(0,r.Z)(f,2),h=g[0],b=g[1],y=(0,a.useMemo)((function(){return(0,p.x3)(t)}),[t]);return a.createElement(v,{gap:2},a.createElement(l.TextInput,{value:t,onChange:function(e){b(!0),o(e.target.value)},disabled:m,size:"tiny",error:p.Qj[y],isDirty:h,instantFeedback:"all"}),a.createElement(l.Button,{label:"Save",flavour:"borderless",iconColor:"text",iconSize:"small",padding:[0],onClick:u,disabled:m||!!y}),a.createElement(l.Button,{label:"Cancel",flavour:"borderless",iconColor:"text",iconSize:"small",padding:[0],onClick:d,disabled:m}))},b=function(){var e=(0,d.OS)(),t=e.id,n=e.name,o=(0,m.Z)(t),i=(0,f.Z)(),c=(0,r.Z)(i,4),l=c[0],u=c[2],s=c[3],p=(0,f.Z)(),v=(0,r.Z)(p,4),b=v[0],y=v[2],w=v[3],E=(0,a.useState)(n),C=(0,r.Z)(E,2),x=C[0],O=C[1],k=(0,a.useCallback)((function(){s(),w()}),[]),S=(0,a.useCallback)((function(){u(),o({name:x},{onSuccess:k,onFail:s})}),[x]);return b?a.createElement(h,{name:x,setName:O,onSave:S,onCancel:w,isLoading:l}):a.createElement(g,{name:n,onEdit:y})},y=n(82351),w=n(89149),E=n(91008),C=n(37518),x=n(33937),O=n(33335),k=(n(92222),n(89250)),S=n(46189),Z={light:"primary",dark:"white",unspecified:"primary"},P=function(e){var t={icon:"add_user",flavour:"borderless",onClick:e.onClick,label:"Invite your team"};return(0,O.gI)("space:InviteUser")?a.createElement(l.Button,t):a.createElement(y.Z,{content:"You can't invite a user with your current permissions"},a.createElement(l.Flex,null,a.createElement(l.Button,(0,o.Z)({},t,{disabled:!0}))))},I=function(e){var t=e.claimedNodes,n=e.onClick,r=void 0===n?c():n,o=(0,O.gI)("node:Create"),i=(0,a.useMemo)((function(){return{onClick:r,disabled:!o}}),[o]),u=t.length>0?"Connect more!":"Connect a node";return o?a.createElement(E.Z,i,u):a.createElement(y.Z,{content:"You don't have permission to connect new nodes. Please contact an administrator to do it"},a.createElement(l.Box,null,a.createElement(E.Z,i,u)))},j=function(e){var t=e.claimedNodes,n=e.onConnectClick,r=void 0===n?c():n;return a.createElement(l.Flex,{gap:2},a.createElement(I,{claimedNodes:t,onClick:r}),a.createElement(l.Text,null,"to get started"))},D=function(e){var t=e.claimedNodes,n=e.onConnectClick,r=void 0===n?c():n;return a.createElement(l.Flex,{gap:2},a.createElement(l.Text,null,"You have connected ",t.length," node",t.length<=1?"":"s","."),a.createElement(I,{claimedNodes:t,onClick:r}))},N=(0,a.memo)((function(e){var t=e.claimedNodes,n=e.onConnectClick,r=void 0===n?c():n,o=(0,a.useMemo)((function(){return{claimedNodes:t,onConnectClick:r}}),[t,r]);return a.createElement(l.Flex,{gap:2},a.createElement(l.Text,null,"This is your new space"),t.length>0?a.createElement(D,o):a.createElement(j,o))})),T=function(e){var t=e.claimedNodes,n=void 0===t?[]:t,o=e.onInvite,i=void 0===o?c():o,s=(0,x.R)("theme"),m=(0,C.UL)(),p=(0,f.Z)(),g=(0,r.Z)(p,4),v=g[0],h=g[2],y=g[3],E=function(){var e=(0,k.s0)(),t=(0,d.uk)(),n=(0,C.vf)(),r=S.Z.defaultRoomView;return(0,a.useCallback)((function(){e("/spaces/".concat(t,"/rooms/").concat(n,"/").concat(r),{replace:!0})}),[])}(),O=n.length>0;return a.createElement(a.Fragment,null,a.createElement(u.Z,{height:"66px",width:"66px",color:Z[s]}),a.createElement(l.H1,{strong:!1},"Welcome to Netdata!"),a.createElement(N,{claimedNodes:n,onConnectClick:function(e){e.preventDefault,h()}}),a.createElement(b,null),a.createElement(l.Flex,{gap:4},a.createElement(P,{onClick:i}),a.createElement(l.Button,{icon:"rocket",flavour:O?"default":"borderless",onClick:E,label:O?"Launch space":"Node Required for Launch",disabled:!O})),v&&a.createElement(w.Z,{onClose:y,room:m}))},_=function(){return a.createElement(a.Fragment,null,a.createElement(l.H1,{strong:!1},"Integrations Made Easy!"),a.createElement(l.Text,null,"Unleash the Power of Connected Systems"))},F=n(26017),M=n(67996),A=function(e){var t=e.integration,n=void 0===t?{}:t;return a.createElement(l.Flex,{width:"100%",column:!0,gap:2,padding:[4,0,0,0]},a.createElement(M.Z,null,n.alerts))},L="deploy.operating-systems",B=34,R="data-collection",z="deploy-kubernetes",V={deploy:"rocket","data-collection":"collect",notify:"alarmFilled",export:"importExport"},U={deploy:F.Z,"alert-notifications":A},H={homePage:"homePage",settingsPage:"settingsPage",addNodesModal:"addNodesModal"},W=H.homePage,G={homePage:{headerContent:T},settingsPage:{headerContent:_},addNodesModal:{headerContent:null}},K={homePage:{header:{height:284,wrapperProps:{padding:[4,0]}},search:{wrapperProps:{width:"500px",margin:[0]}},cncf:{height:80},categoryCharacterWidth:9},settingsPage:{header:{height:210,wrapperProps:{padding:[4,0]}},search:{wrapperProps:{width:"500px",margin:[0]}},cncf:{height:0},categoryCharacterWidth:9},addNodesModal:{header:{height:126,wrapperProps:{width:"100%",padding:[4]}},search:{wrapperProps:{width:"100%",margin:[0],flex:!0},inputProps:{size:"small"}},cncf:{height:16},categoryCharacterWidth:9}}},67034:function(e,t,n){n(69826),n(41539),n(31672),n(2490),n(59461);var r=n(8641);t.Z=function(){var e=(0,r.pZ)();return function(t){return e.find((function(e){return e.id==t}))}}},8641:function(e,t,n){n.d(t,{pZ:function(){return N},xh:function(){return j},mk:function(){return I},Oi:function(){return z},wC:function(){return D},RG:function(){return M},dG:function(){return L},lX:function(){return A},NE:function(){return F},P0:function(){return R},Si:function(){return B},Zc:function(){return _},BN:function(){return T}});var r=n(45987),o=n(4942),a=n(93433),i=n(29439),c=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(92222),n(47042),n(69826),n(31672),n(59461),n(47941),n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),l=n(4480),u=n(95248),s=(n(26699),n(32023),n(12934)),d=n(86348),m=n(85373),f=n(58591),p=n(41898);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=(0,l.cn)({key:"integrationsCategoriesAtom",default:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).hideEmptyCategories,t=void 0===e||e,n=(0,d.bu)(s.b),r=(0,m.tE)(s.l),o=[];if(t){var a=(0,d.GP)(r,(function(e){return n.find((function(t){return t.id==e}))}),n);o=n.filter((function(e){var t=e.id;return a.includes(t)}))}else o=n;return o}()}),b=(0,l.cn)({key:"topLevelIntegrationsCategoriesAtom",default:(0,l.nZ)({key:"topLevelIntegrationsCategoriesState",get:function(e){var t=e.get;return(0,d.gP)(t(h))}})}),y=(0,l.cn)({key:"integrationsNavigationHistoryAtom",default:(0,l.nZ)({key:"integrationsNavigationHistoryState",get:function(e){var t=e.get;return function(e){var t,n=e.categories,r=e.integrations,o=(0,f.m$)(),a=o.selectedIntegrationCategory,i=o.selectedIntegration,c=n.find((function(e){return e.id==(a||p.DW)})),l=(0,d.QQ)({category:c,getCategoryById:function(e){return n.find((function(t){return t.id==e}))}}).tree,u=null===(t=r.filter((function(e){return e.id==i})))||void 0===t?void 0:t[0],s=l.filter(Boolean).map((function(e,t){return v(v({},e),{},{type:"category",level:t+1})}));return u&&s.push(v(v({},u),{},{type:"integration"})),s}({categories:t(h),integrations:t(w)})}})}),w=(0,l.cn)({key:"integrationsNormalized",default:(0,l.nZ)({key:"integrationsNormalizedState",get:function(e){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,m.tE)(s.l,e)}((0,e.get)(h))}})}),E=(0,l.cn)({key:"integrationsSearchTerm",default:""}),C=(0,l.cn)({key:"integrationsHistoryBeforeSearch",default:null}),x=(0,l.cn)({key:"integrationsModalOpenAtom",default:"true"==(0,f.m$)().integrationsModalOpen}),O=n(67034),k=["flattenedCategory"];function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var P=(0,l.nZ)({key:"integrationsQuickStart",get:function(e){var t=(0,e.get)(w).filter((function(e){return e.quickStart>=0}));return(0,m.mi)(t)}}),I=function(){return(0,l.sJ)(C)},j=function(){return(0,l.FV)(C)},D=function(){var e=N(),t=(0,O.Z)(),n=(0,l.FV)(y),o=(0,i.Z)(n,2),s=o[0],m=o[1],f=(0,l.rb)(C),g=(0,u.I0)("selectedIntegrationCategory"),v=(0,i.Z)(g,2)[1],h=(0,u.I0)("selectedIntegration"),b=(0,i.Z)(h,2)[1],w=(0,u.I0)("selectedIntegrationTab"),E=(0,i.Z)(w,2)[1],x=(0,c.useCallback)((function(e){var n=(0,d.QQ)({category:e,getCategoryById:t}).parents,r=[].concat((0,a.Z)(n),[e]).map((function(e,t){return Z(Z({},e),{},{type:"category",level:t+1})}));m(r),b(""),E(""),f()}),[e,m]),S=(0,c.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.flattenedCategory,o=(0,r.Z)(e,k),i=n||(o.categories||[])[0],c=i.categoryId||i.id,l=t(c),u=(0,d.QQ)({category:l,getCategoryById:t}).parents,s=[].concat((0,a.Z)(u),[l]).map((function(e,t){return Z(Z({},e),{},{type:"category",level:t+1})}));m([].concat((0,a.Z)(s),[Z(Z({},o),{},{type:"integration"})])),E(""),f()}),[]),P=(0,c.useCallback)((function(){s.length>0&&(m(s.slice(0,s.length-1)),f())}),[s,m]),I=(0,c.useMemo)((function(){var e=s[s.length-1];return"integration"==(null===e||void 0===e?void 0:e.type)?e:null}),[s]),j=(0,c.useMemo)((function(){var e=s.filter((function(e){return"category"==e.type}))||[];return e.length?e[e.length-1]:null}),[s]),D=(0,c.useCallback)((function(){var t=e.find((function(e){return e.id==p.DW})),n=[e.find((function(e){return e.id==t.parentId})),t].filter(Boolean).map((function(e,t){return Z(Z({},e),{},{type:"category",level:t+1})}));m(n),f()}),[e,m]),T=(0,c.useMemo)((function(){return null===j||void 0===j?void 0:j.level}),[j]);return(0,c.useEffect)((function(){null!==j&&void 0!==j&&j.id&&v(j.id)}),[j]),(0,c.useEffect)((function(){null!==I&&void 0!==I&&I.id&&b(I.id)}),[I]),{history:s,level:T,selectedCategory:j,selectedIntegration:I,pushCategory:x,pushIntegration:S,pop:P,reset:D,setHistory:m}},N=function(){return(0,l.sJ)(h)},T=function(){return(0,l.sJ)(b)},_=function(){var e=D().selectedCategory,t=N(),n=F();return(0,d.KU)({category:e,integrations:n,categories:t})},F=function(){return(0,l.sJ)(w)},M=function(){return(0,l.sJ)(P)},A=function(){return(0,l.sJ)(E)},L=function(){return(0,l.FV)(E)},B=function(){return(0,l.rb)(E)},R=function(){var e=B(),t=D().reset;return function(){e(),t()}},z=function(){return(0,l.FV)(x)}},668:function(e,t,n){n.d(t,{AB:function(){return f},DF:function(){return c},J3:function(){return i},MJ:function(){return l},SZ:function(){return m},ZL:function(){return s},Zb:function(){return u},_K:function(){return d},pV:function(){return g},u6:function(){return p}});var r=n(71893),o=n(64969),a=n(19480),i=r.default.div.withConfig({displayName:"styled__LayoutGrid",componentId:"sc-1kju9s3-0"})(["display:grid;grid-template-columns:"," auto;column-gap:32px;padding:0 24px;height:calc( 100vh - ","px - ","px );@media screen and ","{grid-template-columns:"," auto;}@media screen and ","{grid-template-columns:"," auto;}"],(function(e){return e.isSidebarCollapsed?"".concat(60,"px"):"35%"}),(function(e){return(0,a.CF)(e.flavour)}),(function(e){return(0,a.CY)(e.flavour)}),o.breakpoints.laptop,(function(e){return e.isSidebarCollapsed?"".concat(60,"px"):"30%"}),o.breakpoints.desktop,(function(e){return e.isSidebarCollapsed?"".concat(60,"px"):"25%"})),c=r.default.div.withConfig({displayName:"styled__StyledVirtualRow",componentId:"sc-1kju9s3-1"})(["display:grid;grid-template-columns:repeat(",",1fr);grid-auto-rows:","px;column-gap:16px;row-gap:16px;"],(function(e){return e.itemsPerRow}),(function(e){var t=e.rowHeight;return t>16?t-16:t})),l=(0,r.default)(o.Flex).withConfig({displayName:"styled__CategoryWrapper",componentId:"sc-1kju9s3-2"})(["cursor:pointer;&:hover{background-color:",";}"],(0,o.getColor)("integrationMenuItemHover")),u=(0,r.default)(o.Flex).withConfig({displayName:"styled__Card",componentId:"sc-1kju9s3-3"})(["background:",";img{transition:all 200ms ease-in-out;}&:hover{img{transform:scale(1.2);}}"],(0,o.getColor)("panelBg")),s=r.default.div.withConfig({displayName:"styled__CardOverlay",componentId:"sc-1kju9s3-4"})(["position:absolute;width:100%;top:0;bottom:0;filter:blur(70px);opacity:0.2;&& img{width:100%;height:100%;}"]),d=(0,r.default)(o.Icon).withConfig({displayName:"styled__CardIcon",componentId:"sc-1kju9s3-5"})(["position:absolute;top:-20px;left:-35px;transform:rotate(40deg);opacity:0.1;"]),m=(0,r.default)(o.Flex).withConfig({displayName:"styled__CardDescription",componentId:"sc-1kju9s3-6"})(["position:absolute;bottom:0;left:0;transform:translateY(100%);transition:all 200ms ease-in-out;&&.hover{transform:translateY(0);}"]),f=r.default.table.withConfig({displayName:"styled__ContentTable",componentId:"sc-1kju9s3-7"})(["width:100%;border:1px solid ",";margin-top:16px;tr:nth-child(even){background:",";}th{padding:8px 16px;background:",";}td{padding:6px;}"],(0,o.getColor)("borderSecondary"),(0,o.getColor)("mainBackground"),(0,o.getColor)("mainBackground")),p=(0,r.default)(o.PortalSidebar).withConfig({displayName:"styled__SidebarModal",componentId:"sc-1kju9s3-8"})(["width:calc(100vw - 54px);z-index:35;background:",";overflow:",";"],(0,o.getColor)("mainBackground"),(function(e){var t=e.overflow;return void 0===t?"hidden":t})),g=(0,r.default)(o.Icon).withConfig({displayName:"styled__CategoryArrow",componentId:"sc-1kju9s3-9"})(["opacity:",";"],(function(e){return e.disabled?"0":"1"}))},86348:function(e,t,n){n.d(t,{GP:function(){return O},KT:function(){return b},KU:function(){return w},Ov:function(){return v},QQ:function(){return C},XB:function(){return k},bu:function(){return g},gP:function(){return h},tu:function(){return E}});n(47941),n(82526),n(38880),n(49337),n(33321),n(69070);var r=n(29439),o=n(93433),a=n(4942),i=n(45987),c=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(15581),n(34514),n(54747),n(2707),n(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(26699),n(32023),n(69826),n(31672),n(59461),n(47042),n(66992),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(91038),n(69720),n(50308)),l=n.n(c),u=n(41898),s=n(64637),d=n(19480),m=["children","most_popular"];function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function e(){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce((function(n,r){n.push(function(e){e.children;var t=e.most_popular,n=(0,i.Z)(e,m),r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return p(p({},n),{},{name:(0,s.fm)(n.name),mostPopular:t,parentId:r})}(r,t));var a=r.children||[];return n=[].concat((0,o.Z)(n),(0,o.Z)(e(a,r.id)))}),[])},v=function(){var e=[],t=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){void 0!==n.priority&&n.priority>=0?e.push(n):t.push(n)}));var n=[],r=[];t.forEach((function(e){e.mostPopular?n.push(e):r.push(e)}));var a=(0,d.BO)("priority"),i=(0,d.Of)("name"),c=[].concat((0,o.Z)(e.sort(a)),(0,o.Z)(n.sort(i)));return{categories:[].concat((0,o.Z)(c),(0,o.Z)(r.sort(i))),popular:c,rest:r}},h=function(){return((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[])||[]).filter((function(e){return null==e.parentId}))},b=function(e){var t=e.category;return e.categories.filter((function(e){var n=e.parentId;return t.id==n}))},y=function e(t){var n=t.category,r=t.categories,o=t.allSubcategories,a=void 0===o?[]:o;return(b({category:n,categories:r})||[]).forEach((function(t){a.push(t),e({category:t,categories:r,allSubcategories:a})})),a},w=function(e){var t=e.category,n=void 0===t?{}:t,r=e.integrations,a=void 0===r?[]:r,i=e.categories;if(null==n)return[];var c=y({category:n,categories:void 0===i?[]:i}),l=[n.id].concat((0,o.Z)(c.map((function(e){return e.id}))));return a.filter((function(e){for(var t=e.categories.map((function(e){return e.categoryId})),n=0;n<t.length;n++)if(l.includes(t[n]))return!0;return!1}))},E=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=n.find((function(e){return e.id==t}));return r?null===r.parentId?u.JZ[r.id]:e(r.parentId,n):null},C=function(e){var t=e.category,n=e.getCategoryById,r=void 0===n?l():n,o=function(e){return((null===e||void 0===e?void 0:e.id)||"").split(".").reduce((function(e,t){return e.length?e.push([e[e.length-1],t].join(".")):e.push(t),e}),[])}(t).map((function(e){return r(e)}));return{tree:o,parents:o.length>1?o.slice(0,o.length-1):[],topLevelCategory:o[0]}},x=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l(),o=arguments.length>3?arguments[3]:void 0;if(t){var a=r(t);if(a){n(a);var i=o.find((function(e){return e.id==(null===a||void 0===a?void 0:a.parentId)}));i&&e(i.id,n,r,o)}}},O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:l(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=new Set,o=function(e){return r.add(e.id)};return e.forEach((function(e){e.categories.forEach((function(e){var r=e.categoryId;x(r,o,t,n)}))})),Array.from(r)},k=function(e){var t=e.height,n=e.topLevelCategories,o=void 0===n?[]:n,a=e.categories,i=void 0===a?[]:a,c=e.setState,s=void 0===c?l():c,d={};if(!t||!o.length||!i.length)return d;var m=Math.floor((t/o.length-u.vE)/u.vE);o.forEach((function(e){var t=b({category:e,categories:i});d[e.id]={subcategories:t.length,limit:t.length>m?m:0}})),Object.entries(d).forEach((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1],a=o.subcategories,i=o.limit;n!=u.Kl&&i<m&&(d[u.Kl]=p(p({},d[u.Kl]),{},{limit:d[u.Kl].limit+(m-a)}))})),s(d)}},19480:function(e,t,n){n.d(t,{$O:function(){return l},BO:function(){return a},CF:function(){return i},CY:function(){return c},Of:function(){return o}});n(21249),n(57640),n(9924),n(69826),n(41539),n(31672),n(2490),n(59461),n(69720),n(26699),n(32023);var r=n(41898),o=function(e){return function(t,n){return t[e]<n[e]?-1:t[e]>n[e]?1:0}},a=function(e){return function(t,n){return t[e]-n[e]}},i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.p1;return(null===(e=r.xN[t])||void 0===e||null===(e=e.header)||void 0===e?void 0:e.height)||0},c=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.p1;return(null===(e=r.xN[t])||void 0===e||null===(e=e.cncf)||void 0===e?void 0:e.height)||0},l=function e(t){var n;return"string"===typeof t?t:Array.isArray(t)?t.map(e).join(""):null!==t&&void 0!==t&&null!==(n=t.props)&&void 0!==n&&n.children?e(t.props.children):""}},85373:function(e,t,n){n.d(t,{QJ:function(){return h},cW:function(){return v},mi:function(){return g},tE:function(){return p}});var r=n(93433),o=n(4942),a=n(45987),i=(n(21249),n(57640),n(9924),n(69826),n(41539),n(31672),n(2490),n(59461),n(15581),n(34514),n(54747),n(92222),n(2707),n(57327),n(88449),n(59849),n(26699),n(32023),n(85827),n(25387),n(72608),n(47941),n(82526),n(38880),n(49337),n(33321),n(69070),n(50308)),c=n.n(i),l=n(66152),u=n(19480),s=["meta"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return[e.installDescription,"{% command methods=$methods isNightly=$isNightly claimToken=$claimToken claimUrl=$claimUrl claimRooms=$claimRooms /%}",e.additionalInfo,e.platformInfo].join("\n\n")},p=function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map((function(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.meta,n=void 0===t?{}:t,r=(0,a.Z)(e,s),o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=n.monitored_instance,c=n.keywords,u=void 0===c?[]:c,d=n.most_popular,p=n.community,g=i||n,v=g.name,h=g.categories,b=void 0===h?[]:h,y=g.icon_filename,w="deploy"==r.integration_type;return(0,l.k5)(m(m({name:v,categories:b.map((function(e){var t=o.find((function(t){return t.id==e}));return{categoryId:e,name:null===t||void 0===t?void 0:t.name}})),icon:"https://www.netdata.cloud/img/"+y,keywords:u,mostPopular:d,community:p},r),w?{deployContent:f({installDescription:r.install_description,methods:r.methods,additionalInfo:r.additional_info,platformInfo:r.platform_info})}:{}))}(t,e)}))},g=function(){var e=[],t=[];(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){void 0!==n.quickStart&&n.quickStart>=0?e.push(n):t.push(n)}));var n=[],o=[];t.forEach((function(e){e.mostPopular?n.push(e):o.push(e)}));var a=[],i=[];o.forEach((function(e){e.community?i.push(e):a.push(e)}));var c=(0,u.BO)("quickStart"),l=(0,u.Of)("name");return[].concat((0,r.Z)(e.sort(c)),(0,r.Z)(n.sort(l)),(0,r.Z)(a.sort(l)),(0,r.Z)(i.sort(l)))},v=function(e){var t=e.searchTerm,n=void 0===t?"":t,o=e.integrations,a=void 0===o?[]:o;if(!n)return a;var i=n.toLocaleLowerCase();return a.filter((function(e){var t=e.name,n=e.keywords,o=e.categories,a=void 0===o?[]:o;if(t.toLocaleLowerCase().includes(i))return!0;var c=a.map((function(e){return e.name})).filter(Boolean);return[].concat((0,r.Z)(n),(0,r.Z)(c)).join(",").toLocaleLowerCase().includes(i)}))},h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c();return e.reduce((function(e,n){return n.categories.forEach((function(r){e.push(function(e,t,n){return m(m({},e),{},{flattenedKey:"".concat(e.id,"-").concat(t.categoryId),flattenedCategory:n(t.categoryId)})}(n,r,t))})),e}),[])}},82040:function(e,t,n){n.d(t,{IC:function(){return g},Sq:function(){return f},cA:function(){return h},l9:function(){return p}});var r=n(87462),o=n(15861),a=n(64687),i=n.n(a),c=(n(92222),n(67294)),l=n(64969),u=n(55899),s="delete-node-dialog",d="deleteNodeDialog",m=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"node":"nodes")},f=function(e){return"Delete ".concat(e," node")},p=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?f(t):m(n):""},g=function(e){var t=e.name;return c.createElement(c.Fragment,null,"You are about to delete offline node ",c.createElement("strong",null,t),".",c.createElement("br",null),"Node will be removed from all rooms and will no longer be accessible. Plus all metadata will be removed.",c.createElement("br",null),"Are you sure you want to continue?")},v=function(e){var t=e.nodesLength,n=1===t;return c.createElement(c.Fragment,null,"You are about to delete ",n?"this":"these"," ",c.createElement("strong",null,t," offline ",n?"node":"nodes"),".",c.createElement("br",null),n?"Node":"Nodes"," will be removed from all rooms and will no longer be accessible. Plus all metadata will be removed.",c.createElement("br",null),"Are you sure you want to continue?")},h=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?c.createElement(g,{name:t}):c.createElement(v,{nodesLength:n}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,p=e.onClose,h=(0,u.Z)(),b=function(){var e=(0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(n);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=a?{"data-ga":"".concat(s,"-with-name"),"data-testid":"".concat(d,"WithName"),message:c.createElement(g,{name:a}),title:f(a)}:{"data-ga":"".concat(s,"Bulk"),"data-testid":"".concat(d,"Bulk"),message:c.createElement(v,{nodesLength:n.length}),title:m(n.length)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({confirmLabel:"Yes, delete",handleConfirm:b,handleDecline:p},y))}},5633:function(e,t,n){n.d(t,{Br:function(){return f},O3:function(){return v},ar:function(){return b},d1:function(){return g}});var r=n(87462),o=n(15861),a=n(64687),i=n.n(a),c=(n(92222),n(67294)),l=n(64969),u=n(27624),s=n(37518),d="remove-node-dialog",m="removeNodeDialog",f=function(e){return"Remove ".concat(e," node")},p=function(e){var t=1===e;return"Remove ".concat(e," ").concat(t?"node":"nodes")},g=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?f(t):p(n):""},v=function(e){var t=e.name,n=e.roomName;return c.createElement(c.Fragment,null,"You are about to remove ",c.createElement("strong",null,t)," from room ",c.createElement("strong",null,n),".",c.createElement("br",null),"Are you sure you want to continue?")},h=function(e){var t=e.nodesLength,n=e.roomName,r=1===t;return c.createElement(c.Fragment,null,"You are about to remove"," ",c.createElement("strong",null,t," ",r?"node":"nodes")," ","from room ",c.createElement("strong",null,n),".",c.createElement("br",null),"Are you sure you want to continue?")},b=function(e){var t=e.name,n=e.nodesLength,r=e.roomName;return n?1===n&&t?c.createElement(v,{name:t,roomName:r}):c.createElement(h,{nodesLength:n,roomName:r}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,g=e.onClose,b=(0,u.Z)(),y=n.length,w=(0,s.Hm)("name"),E=function(){var e=(0,o.Z)(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,b(n);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=a?{"data-ga":"".concat(d,"WithName"),"data-testid":"".concat(m,"WithName"),message:c.createElement(v,{name:a,roomName:w}),title:f(a)}:{"data-ga":"".concat(d,"Bulk"),"data-testid":"".concat(m,"Bulk"),message:c.createElement(h,{nodesLength:y,roomName:w}),title:p(y)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({handleConfirm:E,handleDecline:g},C))}},89014:function(e,t,n){n.d(t,{m4:function(){return f},aJ:function(){return d},Ho:function(){return s},h8:function(){return u},Id:function(){return m},d6:function(){return g},Lo:function(){return p},En:function(){return v}});var r,o=n(4942),a="clear",i="warning",c="critical",l="unreachable",u="N/A",s={groupsOrder:{alertStatus:(r={},(0,o.Z)(r,c,1),(0,o.Z)(r,i,2),(0,o.Z)(r,a,3),(0,o.Z)(r,l,4),r),nodeStatus:{Online:1,Stale:2,Offline:3}},prioritySettings:{unprioritizedGroupsPlacement:1}},d=48,m=88,f=75,p=74,g=2,v=0},89050:function(e,t,n){n.d(t,{Aw:function(){return L},Br:function(){return B},Dy:function(){return O},I$:function(){return h},Lt:function(){return x},MC:function(){return Z},O2:function(){return k},Q5:function(){return C},V3:function(){return p},_0:function(){return b},cB:function(){return S},jG:function(){return R},jo:function(){return A},kR:function(){return w},oy:function(){return v},yK:function(){return N},yo:function(){return D},ys:function(){return I}});n(82526),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(15861),o=n(4942),a=n(64687),i=n.n(a),c=(n(85827),n(41539),n(25387),n(2490),n(72608),n(66992),n(33948),n(92222),n(69826),n(31672),n(59461),n(47941),n(47042),n(26699),n(32023),n(57327),n(88449),n(59849),n(21249),n(57640),n(9924),n(67294)),l=n(41379),u=n(71172),s=n(89014);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t){return e.reduce((function(e,n){var r="".concat(n.values[t]);return e[r]=Array.isArray(e[r])?e[r]:[],e[r].push(n),e}),{})},p=function(e,t){return f(e,"services"===t?"nodeStatus":t)},g=function(e){var t,n,r=e.isLive,o=e.health,a=void 0===o?{}:o;return r?null!==(t=a.alerts)&&void 0!==t&&t.critical?"critical":null!==(n=a.alerts)&&void 0!==n&&n.warning?"warning":"clear":"unreachable"},v=function(e,t){return m(m({},e),{},{alertStatus:g(e),nodeStatus:C(e.state),virtualRowHeight:t})},h=function(e,t){var n=t[e];return n.isVirtualGroupHeader?s.aJ:n.original.virtualRowHeight},b=function(e,t){var n,r=t.orderedRows[e]||{};return(null===r||void 0===r||null===(n=r.original)||void 0===n?void 0:n.id)&&"".concat(r.original.id,"_").concat(e)||r.id||e},y=function(e){return e>9?"9+":"".concat(e)},w=function(e){var t=e.count,n=e.dataTestId,r=e.isLive,o=e.onAlertClick,a=e.type,i=n?"".concat(n,"-alertIndicator"):"alertIndicator",c={"data-testid":"".concat(i,"-").concat(a)};return r?m(m(m(m({},c),t&&{flavour:"critical"===a?"error":"warning"}),t&&o&&{onClick:function(){return o(a)}}),{},{text:y(t)}):c},E={created:"Unseen",reachable:"Live",stale:"Stale",unreachable:"Offline"},C=function(e){return E[e]||E.stale},x=function(e){return"created"===e?"Pending":"Completed"},O=function(e){return e?{background:"successSemi",border:"success",color:"success",label:"ON",status:"ON"}:{background:"warningSemi",border:"warning",color:"warning",label:"OFF",status:"OFF"}},k=function(e){return!e||"unknown"===e},S=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" \u2022 ";return k(e)?s.h8:"".concat(e).concat(n).concat(t)},Z=function(e,t){return k(e)?s.h8:t?"".concat(e," ").concat(t):e},P={HZ:1,KHz:1e3,MHz:1e6,GHz:1e9,THz:1e12,PHz:1e15,EHz:1e18},I=function(e){if(k(e))return s.h8;var t=Object.keys(P).find((function(t){return 1e3>e/P[t]}));return"".concat((e/=P[t]).toFixed(2)," ").concat(t||"")},j={B:1,KiB:1024,MiB:1048576,GiB:1073741824,TiB:1099511627776,PiB:0x4000000000000,EiB:0x1000000000000000},D=function(e){if(k(e))return s.h8;var t=Object.keys(j).find((function(t){return 1024>e/j[t]}));return"".concat((e/=j[t]).toFixed(2)," ").concat(t||"")},N=function(e,t,n,r,o){var a={Live:c.createElement(c.Fragment,null,"is currently connected"),Offline:c.createElement(c.Fragment,null,"is currently not connected"),Stale:c.createElement(c.Fragment,null,"is currently not",c.createElement("br",null),"connected and has",c.createElement("br",null),"only historical data")},i={actionObsolete:c.createElement(c.Fragment,null,"Delete Node"),actionRemove:c.createElement(c.Fragment,null,"Remove Node from room"),alerts:c.createElement(c.Fragment,null,"The current Critical and",c.createElement("br",null),"Warning alerts for",c.createElement("br",null),r),cloudInfo:c.createElement(c.Fragment,null,r,c.createElement("br",null),"cloud information:",c.createElement("br",null),"Cloud Provider \u2022 Instance Type"),connectivity:t in a?c.createElement(c.Fragment,null,r,c.createElement("br",null),a[t]):c.createElement(c.Fragment,null),info:c.createElement(c.Fragment,null,"View node information"),k8s:c.createElement(c.Fragment,null,r," runs on Kubernetes cluster"),kernel:c.createElement(c.Fragment,null,"Kernel information of ",r),ml:c.createElement(c.Fragment,null,"Machine Learning status of ",r," is: ",n),fn:c.createElement(c.Fragment,null,"Functions capability of ",r," is: ",n),functions:c.createElement(c.Fragment,null,r," functions"),systemInfo:c.createElement(c.Fragment,null,r,c.createElement("br",null),"hardware information:",c.createElement("br",null),"O/S \u2022 CPU Frequency \u2022 CPU Cores \u2022 Architecture \u2022 Memory \u2022 Hard Disk Space"),type:c.createElement(c.Fragment,null,"The type of ",r,c.createElement("br",null),"is: ",o)};return e in i?i[e]:""},T={none:!0,null:!0,unknown:!0},_=function(e){return!!e&&!T[e]},F={container:"container","container-other":"container",other:"container"},M={"$(systemd-detect-virt -v)":"vm","$(systemd-detect-virt -v) docker-compose up":"vm","${VIRTUALIZATION}":"vm","(systemd-detect-virt -v)":"vm","detect-virt -v":"vm",lxc:"vm","none #vmware":"vmware",other:"vm","systemd-detect-virt -v":"vm",unknown:"vm","vm-other":"vm","VMware Virtual Platform":"vmware"},A=function(e,t){return _(e)?{icon:"container",iconSize:"18px",label:F[e]||e}:_(t)?{icon:"cluster",iconSize:"18px",label:M[t]||t}:{icon:"ram",iconSize:"14px",label:"Bare Metal"}},L=function(e){var t=e.orderedRows,n=e.start,r=e.end;return t.slice(n,r+1).reduce((function(e,t){return t.original&&!e.includes(t.original.id)&&e.push(t.original.id),e}),[])},B=function(){var e=(0,r.Z)(i().mark((function e(t){var n,r,o,a,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.cacheKeyPrefix,r=t.nodeIds,o=t.roomId,a=t.spaceId,c=function(e){return e.results.filter((function(e){return!r.includes(e.id)}))},s="".concat(n).concat((0,l.A)({id:o,spaceId:a})),e.next=5,(0,u.c)({key:s,handleResults:c});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),R=function(){var e=(0,r.Z)(i().mark((function e(t){var n,o,a,c,s;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.cacheKeyPrefix,o=t.nodeIds,a=t.roomIds,c=t.spaceId,s=function(e){return e.results.filter((function(e){return!o.includes(e.id)}))},a.map(function(){var e=(0,r.Z)(i().mark((function e(t){var r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r="".concat(n).concat((0,l.A)({id:t,spaceId:c})),e.next=3,(0,u.c)({key:r,handleResults:s});case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()},18129:function(e,t,n){n.d(t,{Z:function(){return Q}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(67294),a=n(64969),i=n(96929),c=n(89149),l=n(33335),u=n(29439),s=(n(26699),n(32023),n(21249),n(57640),n(9924),n(89250)),d=n(37518),m=n(97945),f=n(46322),p=(n(64211),n(41874),n(11389)),g=(n(92222),n(62200)),v=n(64637),h=n(89050),b=function(e){var t=e.icon,n=e.status,r=e.handleNavigateToDocs,i=e.message;return o.createElement(a.Flex,{column:!0,width:{max:"200px"},gap:2},o.createElement(a.Flex,{alignItems:"center",gap:2},o.createElement(a.Icon,{name:t,color:"bright",size:"small"}),o.createElement(a.TextMicro,{color:"white"},(0,v.fm)(n))),o.createElement(a.Flex,{column:!0,gap:2},o.createElement(a.TextMicro,{color:"white"},i),r&&o.createElement(a.TextMicro,{"data-testid":"text-agent-outdated-critical",color:"white"},o.createElement(a.Box,{"data-testid":"open-add-node",onClick:r,as:a.TextMicro,cursor:"pointer",textDecoration:"underline",color:"white"}," ","Check here"," "),"for troubleshooting")))},y=function(e){var t=e.state,n=e.name,r=(0,h.Lt)(t),i=g.R7[r.toLocaleLowerCase()],c=i.icon,l=i.text,u=i.textColor,s=i.indicatorWrapperColor,d=i.tooltip,m=(0,o.useCallback)((function(){window.open("https://learn.netdata.cloud/guides/troubleshoot/troubleshooting-agent-with-cloud-connection","_blank","noopener,noreferrer")}),[]),f="".concat(n," ").concat(d);return o.createElement(a.Tooltip,{allowHoverOnTooltip:!0,content:o.createElement(b,{message:f,icon:c,status:l,handleNavigateToDocs:"Pending"===r?m:void 0})},o.createElement(a.Flex,{margin:[0,"auto",0,"auto"],height:"20px",padding:[.5,0],border:{side:"all",color:s},background:"nodeBadgeBackground",justifyContent:"center",width:30,round:4,gap:2,alignItems:"center"},o.createElement(a.Icon,{name:c,size:"small",color:u}),o.createElement(a.TextMicro,{strong:!0,color:u},l)))},w=n(86711),E=n(83925);function C(e,t){return e===t?0:e>t?1:-1}var x=[{id:"agent",accessorKey:"name",enableColumnFilter:!1,filterFn:function(e,t,n){var r,o=(null===(r=e.original)||void 0===r?void 0:r.name)||"";return null===o||void 0===o?void 0:o.toLowerCase().includes(n)},header:"Name",cell:function(e){var t=e.getValue;return o.createElement(a.TextSmall,null,t())},size:120},{id:"version",accessorKey:"version",header:"Version",cell:function(e){var t=e.getValue,n=e.row;return o.createElement(a.Flex,{gap:1,flexWrap:!0},o.createElement(a.Pill,{color:"neutralPillColor",hollow:!0,margin:[1,0]},t()),n.original.updateSeverity&&o.createElement(E.Z,{name:n.original.name,os:n.original.os.id,container:n.original.hw.container,warningLevel:"critical"===n.original.updateSeverity?"critical":"warning",labels:n.original.labels,version:t(),margin:[1,0]}))},minSize:50},{id:"state",accessorKey:"state",header:"Status",cell:function(e){var t=e.getValue;return o.createElement(p.Z,{state:t()})},sortingFn:function(e,t){return C((0,h.Q5)(e.original.state),(0,h.Q5)(t.original.state))},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original.state;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||t===(0,h.Q5)(r)}))},meta:{filter:{component:"select",isMulti:!0,options:[{value:"Offline",label:"Offline"},{value:"Live",label:"Live"},{value:"Stale",label:"Stale"},{value:"Unseen",label:"Unseen"}]},tooltip:o.createElement(w.Z,null)}},{id:"connectionToCloud",accessorKey:"state",header:"Connection To Cloud",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(y,{state:t(),name:n.name})},sortingFn:function(e,t){return C((0,h.Lt)(e.original.state),(0,h.Lt)(t.original.state))},enableColumnFilter:!0,filterFn:function(e,t,n){var r=e.original.state;return n.length<1||n.some((function(e){var t=e.value;return"all"===t||("created"===r&&"created"===t||("created"!==r&&"completed"===t||void 0))}))},size:50,meta:{filter:{component:"select",isMulti:!0,options:[{value:"created",label:"Pending"},{value:"completed",label:"Completed"}]}}},{id:"updateSeverity",accessorKey:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(E.Z,{name:n.name,os:n.os.id,container:n.hw.container,warningLevel:n.updateSeverity,labels:n.labels||{},version:n.version,text:t()})}}],O=n(46667),k=n(15861),S=n(64687),Z=n.n(S),P=n(82040),I=n(5633),j=n(55899),D=n(27624);function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var T=function(e){return Array.isArray(e)?e.filter((function(e){return!e.hasAccessibleData})):e.hasAccessibleData?[]:[{id:e.id}]},_=function(e){return Array.isArray(e)?e:[{id:e.id}]},F=function(e){var t=e.openClaimNodeModal,n=e.roomUntouchable,a=e.isSpace,i=(0,j.Z)(),c=(0,D.Z)(),u=(0,d.Hm)("name"),s=(0,l.gI)("node:Delete"),m=(0,l.gI)("room:RemoveNode"),f=(0,l.gI)("node:Create"),p=(0,l.gI)("room:AddNode"),g=function(){var e=(0,k.Z)(Z().mark((function e(t,n){var r,o;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r=T(t),o=r.map((function(e){return e.id})),e.next=6,i(o);case 6:n.resetRowSelection();case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),v=function(){var e=(0,k.Z)(Z().mark((function e(t,n){var r,o;return Z().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r=_(t),o=r.map((function(e){return e.id})),e.next=6,c(o);case 6:n.resetRowSelection();case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),h=(0,o.useMemo)((function(){return{delete:{confirmLabel:"Yes, delete",confirmationMessage:function(e){return o.createElement(P.IC,{name:e.name})},confirmationTitle:function(e){return(0,P.Sq)(e.name)},declineLabel:"Cancel",disabledTooltipText:s?"Delete is disabled":"Only admins can delete",handleAction:g,isVisible:!!a,isDisabled:function(e){return e.disabled||!s},tooltipText:"Delete node from space"},remove:{confirmLabel:"Yes, remove",confirmationMessage:function(e){return o.createElement(I.O3,{name:e.name,roomName:u})},confirmationTitle:function(e){return(0,I.Br)(e.name)},declineLabel:"Cancel",handleAction:v,tooltipText:"Remove node from room",isVisible:!a,isDisabled:function(e){return e.disabled||n||!m},disabledTooltipText:n?"Remove is disabled":"Only admins can remove"}}}),[P.IC,P.Sq,I.Br,g,v,I.O3,n,a,s,m]),b=(0,o.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({addEntry:{disabledTooltipText:a?"Only admins can connect new nodes":"Only admins can add nodes to the room",handleAction:t,isDisabled:a?!f:!(f||p&&!n),tooltipText:a?"Connect new nodes to space":"Add nodes to room"}},a?{delete:{confirmLabel:"Yes, delete",confirmationMessage:function(e,t){return o.createElement(P.cA,{name:t[0].name,nodesLength:t.length})},confirmationTitle:function(e,t){return(0,P.l9)({name:t[0].name,nodesLength:t.length})},disabledTooltipText:s?"Delete is disabled":"Only admins can delete",declineLabel:"Cancel",handleAction:g,isDisabled:!s,tooltipText:"Delete nodes from space"}}:{remove:{confirmLabel:"Yes, remove",confirmationMessage:function(e,t){return o.createElement(I.ar,{name:t[0].name,nodesLength:t.length,roomName:u})},confirmationTitle:function(e,t){return(0,I.d1)({name:t[0].name,nodesLength:t.length})},declineLabel:"Cancel",disabledTooltipText:n?"Remove is disabled":"Only admins can remove",handleAction:v,isDisabled:n||!m,tooltipText:"Remove nodes from room"}})}),[P.cA,P.l9,I.d1,g,v,f,s,m,I.ar,n,a]);return{rowActions:h,bulkActions:b,hasPermissionToDelete:s,hasPermissionToRemove:m}};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L={name:!1,updateSeverity:!1,connectionToCloud:!1},B=[{id:"state",desc:!1}],R=function(e){var t=e.roomUntouchable,n=e.customNodes,r=e.alwaysEnableNodeSelection,a=e.isSpace,c=(0,s.UO)().roomSlug,l=(0,d.UL)(c),p=(0,i.X7)(l,"ids"),g=(0,m.Ne)(p),v=(0,o.useMemo)((function(){return(0,f.C)(n||g)}),[n,p]),b=(0,o.useState)(""),y=(0,u.Z)(b,2)[1],w=(0,O.Z)(),E=(0,u.Z)(w,4),C=E[0],k=E[2],S=E[3],Z=F({openClaimNodeModal:k,roomUntouchable:t,isSpace:a}),P=Z.rowActions,I=Z.bulkActions,j=Z.hasPermissionToDelete,D=Z.hasPermissionToRemove,N=(0,o.useCallback)((function(e,t,n){var r=n.toLowerCase(),o=e.getValue("agent").toLowerCase(),a=(0,h.Q5)(e.getValue("state")).toLocaleLowerCase(),i=(0,h.Lt)(e.getValue("connectionToCloud")).toLocaleLowerCase(),c=(e.getValue("updateSeverity")||"").toLocaleLowerCase(),l=e.getValue("version").toLowerCase();return o.includes(r)||a.includes(r)||l.includes(r)||i.includes(r)||c.includes(r)}),[]);return{nodes:v.map((function(e){return A(A({},e),{},{disabled:a?!j||!r&&e.hasAccessibleData:!D})}))||[],nodeIds:p,columns:x,rowActions:P,bulkActions:I,isClaimNodeModalOpen:C,sortBy:B,columnVisibility:L,setGlobalFilter:y,openClaimNodeModal:k,closeClaimNodeModal:S,globalFilterFn:N}},z=n(90025),V=n(74059),U=n(33582),H=n(16645),W=n(7693),G=n(8741),K=function(e){var t=e.onClose,n=(0,V.th)(),r=(0,d.UL)(),i=(0,o.useState)((function(){return r?[r]:[]})),c=(0,u.Z)(i,2),l=c[0],s=c[1];return(0,U.Z)(n),o.createElement(H.u6,{onClose:t,"data-testid":"addNodes",right:!0,closeOnEsc:!0,closeOnOverlayClick:!0},o.createElement(W.x,{"data-testid":"addNodes-header",title:"Add Nodes",onClose:t}),o.createElement(H.TZ,{hasModalTitle:!1},o.createElement(a.Flex,{column:!0,"data-testid":"manageClaimedNodes-controls",gap:3},o.createElement(z.Z,{placeholder:"Select Rooms",selectedValue:l,onChange:s}),o.createElement(G.Z,{rooms:l}))))};function Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Q=function(e){var t=e.roomUntouchable,n=e.showClaimNodeOnEmptySpace,r=void 0!==n&&n,u=e.customNodes,s=void 0===u?[]:u,d=e.customBulkActions,m=e.customRowActions,f=e.enableSelection,p=void 0===f||f,g=e.showdDefaultRowActions,v=void 0===g||g,h=e.showDefaultBulkActions,b=void 0===h||h,y=e.onRowSelected,w=e.onClickRow,E=e.disableClickRow,C=e.columnVisibility,x=e.customSortBy,O=e.showClaimModalWithRoomSelection,k=void 0!==O&&O,S=e.alwaysEnableNodeSelection,Z=void 0!==S&&S,P=e.isSpace,I=R({roomUntouchable:t,customNodes:s,alwaysEnableNodeSelection:Z,isSpace:P,showClaimModalWithRoomSelection:k}),j=I.nodes,D=I.columns,N=I.rowActions,T=I.bulkActions,_=I.sortBy,F=I.isClaimNodeModalOpen,M=I.openClaimNodeModal,A=I.closeClaimNodeModal,L=I.columnVisibility,B=I.setGlobalFilter,z=I.globalFilterFn,V=(0,l.gI)("node:Create"),U=(0,i.fD)();(0,o.useEffect)((function(){U&&r&&V&&0===j.length&&M()}),[U]);var H=(0,o.useMemo)((function(){return J(J({},L),C)}),[L,C]);return o.createElement(o.Fragment,null,o.createElement(a.NetdataTable,{onRowSelected:y,globalFilterFn:z,columnVisibility:H,enableSelection:p,enableSorting:!0,dataColumns:D,data:j,rowActions:v&&N||m,bulkActions:b&&T||d,sortBy:x||_,onGlobalSearchChange:B,testPrefixCallback:function(e){return e.hostname||e.name},onClickRow:w,disableClickRow:E}),F&&!k&&o.createElement(c.Z,{onClose:A,isSubmodal:!0}),F&&k&&o.createElement(K,{onClose:A}))}},77184:function(e,t,n){n.d(t,{$3:function(){return h},G1:function(){return y},IU:function(){return g},JV:function(){return p},Y0:function(){return f},eZ:function(){return w},h3:function(){return m}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(21249),n(57640),n(9924),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(64637),i=n(66152),c=n(3689),l=n(31790);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=function(e){var t=e.integrations;return t.reduce((function(e,t){var n,r=(0,i.k5)(t),o=r.available?"available":"unavailable";return r.kindLabel=(0,a.fm)(r.kind,!0),r.docsLink=null===(n=t.schema)||void 0===n?void 0:n.annotations.docsUrl,r.internal||(r.fields=(0,l.sY)(r.schema),r.required=r.schema.required),e[o].push(r),e}),{available:[],unavailable:[],original:t})},m=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/integrations"),{transform:d})},f=function(e,t){return o.Z.post("/api/v2/spaces/".concat(e,"/channel"),t)},p=function(e,t){return o.Z.delete("/api/v2/spaces/".concat(e,"/channel/").concat(t))},g=function(e,t,n){return o.Z.put("/api/v2/spaces/".concat(e,"/channel/").concat(t),n)},v=function(e){var t,n=(0,i.k5)(e);return n.docsLink=null===(t=n.schema)||void 0===t?void 0:t.annotations.docsUrl,n.internal||(n.fields=(0,l.sY)(n.schema),n.required=n.schema.required),n},h=function(e,t){return o.Z.get("/api/v2/spaces/".concat(e,"/channel/").concat(t),{transform:v})},b=function(e){return{channels:e.map((function(e){return s(s({},(0,i.k5)(e)),{},{notificationLabel:c.uK[e.alarms].label,kindLabel:(0,a.fm)(e.kind,!0)})})),original:e}},y=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/channel"),{transform:b})},w=function(e,t,n){return o.Z.patch("/api/v2/spaces/".concat(e,"/channel/").concat(t),{enabled:n})}},45939:function(e,t,n){n.d(t,{C:function(){return c}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={additionalProperties:!1,alerts:"ALARMS_SETTING_ALL",description:"",enabled:!0,error:"",fields:[],icon:"",internal:!0,id:"",integration:"",integrationId:"",kind:"",loading:!0,loaded:!1,name:"",rooms:null,roomSelections:[n(3689).k_],secrets:{}},l=(0,o.xu)({key:"spaceChannel",default:function(e){return function(e){return i(i({},c),{},{id:e})}(e)}});t.Z=l},15635:function(e,t,n){n.d(t,{g:function(){return c}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={currentChannelId:"",channels:[],error:"",id:null,loading:!0,loaded:!1,original:[]},l=(0,o.xu)({key:"spaceChannels",default:function(e){return function(e){return i(i({},c),{},{id:e})}(e)}});t.Z=l},3689:function(e,t,n){n.d(t,{Nq:function(){return d},Ue:function(){return l},XH:function(){return b},XK:function(){return s},YM:function(){return p},aU:function(){return u},k_:function(){return i},mN:function(){return m},q7:function(){return v},rc:function(){return c},uK:function(){return f},yV:function(){return h},zK:function(){return g}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var i={label:"All rooms",value:""},c={plan:"Your plan does not support this configuration.",role:"You do not have permission to change Global Notification configurations."},l="You do not have permission to add configurations. Contact a space administrator to add this configuration.",u={Discord:{name:"integrationDiscordColored"},Webhook:{name:"integrationWebhookColored"},Email:{name:"integrationEmailColored"},MobilePush:{color:"successLite",name:"mobilePushNotifications"},PagerDuty:{name:"integrationPagerdutyColored"},Slack:{name:"integrationSlackColored"},Opsgenie:{name:"integrationOpsgenieColored"},Mattermost:{name:"integrationMattermostColored"},RocketChat:{name:"integrationRocketChatColored"},MobileApp:{name:"integrationMobileAppColored"}},s={PERSONAL:{icon:"userPress",tooltip:"Notification methods whose destination will be a user-specific attribute, e.g. user's e-mail."},SYSTEM:{icon:"systemOverviewPress",tooltip:"Notification methods that the destination will be a target that usually isn't specific to a single user, e.g. Slack channel."}},d={ALARMS_SETTING_ALL:{value:"ALARMS_SETTING_ALL",label:"All Alerts and unreachable"},ALARMS_SETTING_ALL_BUT_UNREACHABLE:{value:"ALARMS_SETTING_ALL_BUT_UNREACHABLE",label:"All Alerts"},ALARMS_SETTING_CRITICAL:{value:"ALARMS_SETTING_CRITICAL",label:"Critical only"},ALARMS_SETTING_UNREACHABLE:{value:"ALARMS_SETTING_UNREACHABLE",label:"Unreachable only"}},m={label:"User defined",value:"USER_DEFINED"},f=a(a({},d),{},{USER_DEFINED:m}),p=a(a({},d),{},{ALARMS_SETTING_NONE:{value:"ALARMS_SETTING_NONE",label:"No notifications"}}),g={"^.*$":"input"},v={string:"input"},h=/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g,b="607bfd3c-02c1-4da2-b67a-0d01b518ce5d"},26913:function(e,t,n){n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(77184),a=n(45736),i=n(15635),c=n(5429);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=(0,a.rz)(e);(0,c.Z)((function(){return{enabled:!!e,fetch:function(){return(0,o.G1)(e)},onFail:function(e){return t(u(u({},i.g),{},{error:e.message}))},onSettle:function(){return t({loading:!1,loaded:!0})},onSuccess:function(e){return t(u(u({},i.g),e))}}}),[e])}},69414:function(e,t,n){n.d(t,{E:function(){return c}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c={available:[],error:"",id:null,loading:!0,loaded:!1,original:[],unavailable:[]};t.Z=(0,o.xu)({key:"spaceIntegrations",default:function(e){return function(e){return i(i({},c),{},{id:e})}(e)}})},3528:function(e,t,n){n.d(t,{dR:function(){return j},hd:function(){return P},MJ:function(){return I}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(15861),o=n(29439),a=n(4942),i=n(71002),c=n(45987),l=n(64687),u=n.n(l),s=n(4480),d=n(93017),m=(n(92222),n(26398)),f=["domain"];function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={email:null,browser:null,mobile:null},h={alerts:null},b={me:function(){return"/api/v2/accounts/me/notifications/settings"},room:function(e){var t=e.spaceId,n=e.roomId;return"/api/v2/spaces/".concat(t,"/rooms/").concat(n,"/notifications/settings")}},y=function(e){var t=e.domain,n=(0,c.Z)(e,f);return(0,b[t])(n)},w=(0,s.xu)({key:"notificationsSettings",default:function(e){var t=function(e){var t=e.domain;return{me:v,room:h}[t]}(e),n=y(e);return m.Z.get(n).then((function(e){return g(g(g({},t),e.data),{},{isLoaded:!0})})).catch((function(){return g(g({},t),{},{isLoaded:!0})}))}}),E=n(68008),C=["prop"];function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=(0,s.CG)({key:"notificationsSettings",get:function(e){return function(t){return(0,t.get)(w(e))}},set:function(e){return function(t,n){var r=t.set,o=e.prop,l=(0,c.Z)(e,C);r(w(l),(function(e){var t="object"==(0,i.Z)(e[o])?O(O({},e[o]),{},{enabled:n}):n;return o?O(O({},e),{},(0,a.Z)({},o,t)):t}))}}}),S=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldPersist,n=void 0===t||t,i=(0,s.Zl)(k(e)),c=function(e){return(0,E.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return m.Z.patch(y(e),t)}),[e.domain,e.spaceId,e.roomId])}(e),l=(0,d.Z)(),f=(0,o.Z)(l,2)[1];return(0,s._8)((function(t){var o=t.snapshot;return function(){var t=(0,r.Z)(u().mark((function t(r){var l,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i(r),n){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,o.getPromise(k(e));case 5:return l=t.sent,s=e.prop,t.prev=7,t.next=10,c(O({},s?(0,a.Z)({},s,r):r));case 10:t.next=16;break;case 12:t.prev=12,t.t0=t.catch(7),f(t.t0),i(s?l[s]:l);case 16:case"end":return t.stop()}}),t,null,[[7,12]])})));return function(e){return t.apply(this,arguments)}}()}),[e])},Z=function(e){return(0,s.$P)(k(e))},P=function(){return(0,s.$P)(w({domain:"me"}))},I=function(e){var t={domain:"me"},n=Z(t),r="hasValue"!==n.state?v:n.contents,o=S(O(O({},t),{},{prop:e}));return[e?r[e]:r,o]},j=function(e){var t=e.roomId,n=e.spaceId,r=e.key,o={domain:"room",roomId:t,spaceId:n},a=Z(o),i="hasValue"!==a.state?h:a.contents,c=S(O(O({},o),{},{prop:r}));return[r?i[r]:i,c]}},45736:function(e,t,n){n.d(t,{Cz:function(){return v},R1:function(){return w},h3:function(){return f},pV:function(){return g},ry:function(){return y},rz:function(){return h},su:function(){return m}});n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(4480),a=n(45939),i=n(15635),c=n(69414),l=n(31790);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var d=(0,o.CG)({key:"spaceChannelState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,a.Z)(t));return n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){(0,e.set)((0,a.Z)(t),(function(e){return n?s(s({},e),{},(0,r.Z)({},n,o)):s(s({},e),o)}))}}}),m=function(e,t){return(0,o.sJ)(d({id:e,key:t}))},f=function(e){return(0,o.rb)(d(e))},p=(0,o.CG)({key:"spaceChannelsState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,i.Z)(t));return r=s(s({},r),{},{channels:(0,l.SM)(r.channels)}),n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){(0,e.set)((0,i.Z)(t),(function(e){return n?s(s({},e),{},(0,r.Z)({},n,o)):s(s({},e),o)}))}}}),g=function(e,t){return(0,o.sJ)(p({id:e,key:t}))},v=function(e,t){return(0,o.Zl)(d({id:e,key:t}))},h=function(e,t){return(0,o.Zl)(p({id:e,key:t}))},b=(0,o.CG)({key:"spaceIntegrationsState",get:function(e){var t=e.id,n=e.key;return function(e){var r=(0,e.get)((0,c.Z)(t));return r=s(s({},r),{},{available:(0,l.SM)(r.available),unavailable:(0,l.SM)(r.unavailable)}),n?r[n]:r}},set:function(e){var t=e.id,n=e.key;return function(e,o){(0,e.set)((0,c.Z)(t),(function(e){return n?s(s({},e),{},(0,r.Z)({},n,o)):s(s({},e),o)}))}}}),y=function(e,t){return(0,o.sJ)(b({id:e,key:t}))},w=function(e,t){return(0,o.Zl)(b({id:e,key:t}))}},31790:function(e,t,n){n.d(t,{SM:function(){return O},uf:function(){return h},xW:function(){return b},D4:function(){return y},sY:function(){return w},XM:function(){return E},ae:function(){return C},A_:function(){return x}});var r=n(29439),o=n(4942),a=(n(26699),n(32023),n(57327),n(41539),n(88449),n(2490),n(59849),n(82526),n(41817),n(85827),n(25387),n(72608),n(47941),n(92222),n(69826),n(31672),n(59461),n(26833),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(93433)),i=n(45987),c=(n(74916),n(4723),n(21249),n(57640),n(9924),n(69720),n(57557)),l=n.n(c),u=n(3689),s=["description","placeholder","title","type"];function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var f=function(e,t,n){var c=t.description,d=t.placeholder,f=t.title,p=t.type,g=(0,i.Z)(t,s),v=n.includes(e),h={description:c,id:e,isRequired:v,placeholder:d||"",title:f||e};if("string"===p&&"selection"!==e){var b=g.format,y=g.maxLength,E=g.minLength;return m(m(m({component:"input",getValue:function(e){var t=e.id,n=e.secrets,r=e.subsetId;return(r?n[t][r]:n[t])||""},isValid:function(e){return!!("uri"!==b||null!==e&&void 0!==e&&e.match(u.yV))&&(!(E&&e.length<E)&&!(y&&e.length>y))}},y?{maxlength:y}:{}),E?{minlength:E}:{}),{},{onChange:function(e){var t=e.id,n=e.setSecrets,r=e.subsetId;return function(e){return n((function(n){return m(m({},n),{},r?(0,o.Z)({},t,m(m({},n[t]),{},(0,o.Z)({},r,e))):(0,o.Z)({},t,e))}))}},type:"uri"===b?"url":b||"text"},h)}if("object"===p){var C=g.oneOf,x=g.patternProperties;if(C)return m(m({component:"select",getValue:function(e){var t,n,r=e.id,o=e.secrets;return{label:(null===(t=C.find((function(e){var t;return e.properties.selection.const===(null===(t=o[r])||void 0===t?void 0:t.selection)})))||void 0===t?void 0:t.title)||(v?C[0].title:"None"),value:(null===(n=o[r])||void 0===n?void 0:n.selection)||(v?C[0].properties.selection.const:"")}},onChange:function(e){var t=e.id,n=e.setRequiredSubsets,r=e.setSecrets;return function(e){var a=e.label,i=e.value;if(!i)return n((function(e){return l()(e,t)})),void r((function(e){return l()(e,t)}));var c=C.find((function(e){return e.title===a}));null!==c&&void 0!==c&&c.required&&n((function(e){return m(m({},e),{},(0,o.Z)({},t,C.find((function(e){return e.title===a})).required))})),r((function(e){return m(m({},e),{},(0,o.Z)({},t,{selection:i}))}))}}},C.reduce((function(e,t){return{fields:m(m({},e.fields),{},(0,o.Z)({},t.properties.selection.const,w(t))),options:[].concat((0,a.Z)(e.options),[{label:t.title,value:t.properties.selection.const}]),required:m(m({},e.required),{},(0,o.Z)({},t.properties.selection.const,t.required))}}),{fields:{},options:v?[]:[{label:"None",value:""}],required:{}})),h);if(x)return m({component:"pairs",componentPairs:Object.entries(x).map((function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1].type;return[u.zK[n],u.q7[o]]}))},h)}return null},p=n(72437);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e,t){var n=function(e){return e.toLowerCase().includes(t.toLowerCase()||"")};return e.filter((function(e){var t=e.classification,r=e.description,o=e.kind,a=e.title;return n(t)||n(r)||n(o)||n(a)}))},b=function(e,t,n){return!!t&&("selection"===e||("select"===n.component||n.isValid(t)))},y=function(e){return"Delete ".concat(e," channel")},w=function(e){var t=e.properties,n=e.required;return Object.keys(t).reduce((function(e,r){var a=f(r,t[r],n);return v(v({},e),a?(0,o.Z)({},r,a):{})}),{})},E=function(e){var t=(0,r.Z)(e,2),n=t[0],o=t[1];return n===o?"".concat(n,"s"):"".concat(n,"/").concat(o)},C=function(e){var t=e.roomIds,n=e.roomOptions;return t.reduce((function(e,t){var r=n.find((function(e){return e.value===t}));return r&&e.push(r.label),e}),[]).join(", ")},x=function(e,t){return Object.values(e).reduce((function(e,n){return"select"===n.component&&t.includes(n.id)?v(v({},e),{},(0,o.Z)({},n.id,{selection:n.options[0].value})):e}),{})},O=function(e){return p.xy?e:e.filter((function(e){return e.id!==u.XH}))}},28350:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=n(91268),l=n(74059),u=n(37518),s=n(18129),d=n(46189),m=n(15418),f=function(e){var t=e.spaceName;return a.createElement(i.Text,{textAlign:"center"},"Please ask your administrator to claim more nodes to\xa0",a.createElement(i.Text,{strong:!0},t)," and you will be able to add them to this room")},p=function(){return a.createElement(i.Text,{textAlign:"center"},"To add nodes to this room, you first need to claim them to its space.")},g=function(e){var t=e.spaceName,n="".concat(d.Z.assetsBaseURL,"/img/rack.png");return a.createElement(i.Flex,{column:!0,padding:[4,8,0],alignItems:"center",gap:4},a.createElement("img",{src:n,alt:"server-rack",width:"188px",height:"188px"}),a.createElement(i.H4,{textAlign:"center"},"No claimed nodes available in this Space: ",t),a.createElement(m.Z,{permission:"node:Create"},(function(e){return e?a.createElement(p,null):a.createElement(f,{spaceName:t})})))},v=n(93433),h=n(29439),b=(n(21249),n(57640),n(9924),n(85827),n(41539),n(25387),n(2490),n(72608),n(57327),n(88449),n(59849),n(26699),n(32023),n(92222),function(e){var t=e.setNodes,n=(0,a.useState)(""),r=(0,h.Z)(n,2),o=r[0],i=r[1],c=(0,a.useState)(!0),l=(0,h.Z)(c,2),u=l[0],s=l[1],d=(0,a.useState)([]),m=(0,h.Z)(d,2),f=m[0],p=m[1];return(0,a.useEffect)((function(){var e=f.map((function(e){return e.id}));e.length||!o||u||t((function(e){return o.split(",").reduce((function(e,t){return e.filter((function(e){return e.id!==t}))}),e)})),e.length&&e.join()!==o&&(t((function(t){var n=t.map((function(e){return e.id}));return e.reduce((function(e,t,r){return n.includes(t)?e:[].concat((0,v.Z)(e),[f[r]])}),t)})),s(!1)),i(e.join())}),[f]),{onRowSelected:p}}),y=["claimedNodeIds","data","roomId","setNodes","showHeader","onAddNodes","canAddNodes","addNodesGA"],w={connectionToCloud:!1},E=function(e){var t=e.claimedNodeIds,n=e.data,d=e.roomId,m=e.setNodes,f=e.showHeader,p=e.onAddNodes,v=e.canAddNodes,h=e.addNodesGA,E=(0,o.Z)(e,y),C=b({setNodes:m}).onRowSelected,x=(0,l.OS)(),O=(0,u.tE)(d),k=(0,a.useMemo)((function(){return{addEntry:{handleAction:p,tooltipText:"Add the selected nodes to the room",isDisabled:!v,disabledTooltipText:"Select some nodes to add to the room","data-ga":h}}}),[p,v]);return a.createElement(i.Flex,(0,r.Z)({column:!0,gap:3,padding:[2,0,0],flex:"grow",width:"100%",height:"100%"},E),f&&a.createElement(i.Flex,{margin:[0,0,5]},a.createElement(i.H3,null,"Available Nodes (",t.length,")")),f&&a.createElement(i.Flex,null,a.createElement(i.Text,{color:"textDescription"},"Nodes in ",x.name," that can be added to ",O.name)),t.length>0?a.createElement(c.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},a.createElement(s.Z,{enableSelection:!0,customNodes:n,showdDefaultRowActions:!1,showDefaultBulkActions:!1,customBulkActions:k,onRowSelected:C,columnVisibility:w,alwaysEnableNodeSelection:!0})):a.createElement(g,{spaceName:x.name}))}},86242:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(29439),o=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(26699),n(32023),n(67294)),a=n(62554),i=n(74059),c=n(37518),l=n(53338),u=n(25819),s=n(96929),d=n(46322),m=n(5429),f=n(93017),p=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).addNodesCallback,n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(0,o.useState)(e),n=(0,r.Z)(t,2),i=n[0],c=n[1],l=(0,o.useState)([]),u=(0,r.Z)(l,2),s=u[0],d=u[1];(0,a.Z)((function(){d([i])}),300,[i]);var m=(0,o.useCallback)((function(e){return c(e.currentTarget.value)}),[c]);return[i,m,s]}(),p=(0,r.Z)(n,3),g=p[0],v=p[1],h=p[2],b=(0,o.useState)([]),y=(0,r.Z)(b,2),w=y[0],E=y[1],C=(0,i.th)(),x=(0,c.HM)(C,l.i_),O=(0,f.Z)(),k=(0,r.Z)(O,2)[1],S=(0,m.Z)((function(){return{enabled:!!x,fetch:function(){return(0,u.Fz)({roomId:x,spaceId:C})},initialValue:[],onFail:function(e){k(e)}}}),[x,C]),Z=(0,r.Z)(S,1)[0],P=(0,s.X7)(e,"ids"),I=(0,o.useMemo)((function(){return Z.map((function(e){return e.id})).filter((function(e){return!P.includes(e)}))}),[P,Z]),j=(0,o.useMemo)((function(){return(0,d.C)(Z)}),[Z]),D=(0,s.iB)(C,e,{onSuccess:t});return[{claimedNodeIds:I,data:j,filter:g,setFilter:v,debouncedFilter:h,setNodes:E},{onAddNodes:(0,o.useCallback)((function(){return D(w.map((function(e){return e.id})))}),[D,w]),onAddNode:(0,o.useCallback)((function(e){D([e],{makeCallback:!1})}),[D]),selectedNodes:w}]}},89149:function(e,t,n){n.d(t,{Z:function(){return F}});var r=n(87462),o=n(29439),a=(n(66992),n(41539),n(88674),n(78783),n(33948),n(67294)),i=n(2145),c=n(64969),l=n(37518),u=n(74059),s=n(16645),d=n(7693),m=n(92903),f=n(668),p=n(97346),g=n(8741),v=n(28350),h=n(86242),b=n(78266),y=n(45987),w=n(33582),E=n(50308),C=n.n(E),x=(n(92222),n(71893)),O=n(16931),k=n(52428),S=(0,x.default)(c.Icon).withConfig({displayName:"copyInfo__StyledIcon",componentId:"sc-fgr5qt-0"})(["display:flex;align-self:center;cursor:pointer;position:absolute;right:16px;"]),Z=function(e){var t=e.gaPrefix,n=void 0===t?"claim-nodes":t,r=e.info,o=e.title,i=void 0===o?"Claim token":o,l=e.type,u=void 0===l?"token":l,s=e.copyDisabled,d=void 0!==s&&s;return a.createElement(c.Flex,{cursor:"pointer","data-testid":"".concat(u,"Copy"),gap:2,onClick:(0,k.J)(r,{text:"".concat(i," copied to clipboard")}),position:"relative"},a.createElement(O.U8,{"data-testid":"".concat(u,"TextBlock")},r),!d&&a.createElement(S,{"data-testid":"".concat(u,"CopyButton"),"data-ga":"".concat(n,"::click-copy-").concat(u,"::allpages"),name:"copy",size:"small",color:"primary",onClick:(0,k.J)(r,{text:"".concat(i," copied to clipboard")})}))},P=function(e){var t=e.title,n=void 0===t?"":t,r=e.info,o=void 0===r?"Loading...":r,i=e.copyDisabled,l=void 0!==i&&i,u=e.onClose,s=void 0===u?C():u;return a.createElement(c.Modal,null,a.createElement(c.ModalContent,{width:{min:80,base:150},height:30},a.createElement(c.ModalHeader,null,a.createElement(c.H3,null,n),a.createElement(c.ModalCloseButton,{onClose:s})),a.createElement(c.ModalBody,null,a.createElement(Z,{info:o,copyDisabled:l}))))},I=["spaceId"],j=function(e){var t,n,o=e.spaceId,i=(0,y.Z)(e,I),c=(0,w.Z)(o);return a.createElement(P,(0,r.Z)({title:"Claim Token",info:null===(t=c[0])||void 0===t?void 0:t.token,copyDisabled:!(null!==(n=c[0])&&void 0!==n&&n.token)},i))},D=n(41898),N=n(46667),T=(0,i.Z)((function(){return Promise.all([n.e(6502),n.e(8663),n.e(6129),n.e(8447)]).then(n.bind(n,66129))})),_={default:{modal:{"data-testid":"addWarRoomModal"},sidebarModalHeader:{"data-testid":"addWarRoomModal-header"},sidebarContent:{"data-testid":"addWarRoomModal-content",overflow:"auto",hasFooter:!1}},integrations:{modal:{"data-testid":"addIntegrationModal"},sidebarModalHeader:{"data-testid":"addIntegration-header"},sidebarContent:{"data-testid":"addIntegration-content",overflow:"hidden",hasFooter:!1,padding:[0],hasModalTitle:!1}}},F=function(e){var t=e.title,n=void 0===t?"Add Nodes":t,i=e.onClose,y=e.isSubmodal,w=e.flavour,E=void 0===w?"default":w,C=(0,u.th)(),x=(0,l.Hm)(),O=(0,l.Jb)(),k=null!==x&&void 0!==x&&x.loaded?x:O,S=null===k||void 0===k?void 0:k.id,Z=(0,a.useMemo)((function(){return _[E]}),[E]),I="integrations"==E,F=I?f.u6:s.u6,M=(0,h.Z)(S,{addNodesCallback:i}),A=(0,o.Z)(M,2),L=A[0],B=A[1],R=B.onAddNodes,z=B.selectedNodes,V=(0,N.Z)(),U=(0,o.Z)(V,4),H=U[0],W=U[2],G=U[3],K=(0,N.Z)(),Y=(0,o.Z)(K,4),J=Y[0],Q=Y[2],q=Y[3];return a.createElement(a.Fragment,null,a.createElement(F,(0,r.Z)({right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:i},Z.modal),a.createElement(d.x,(0,r.Z)({title:I?a.createElement(c.TextBig,{color:"textLite"},n):a.createElement(a.Fragment,null,"Manage room",a.createElement(c.TextBig,{color:"textLite"},"\xa0/ Add Nodes")),isSubmodal:y,onClose:i},Z.sidebarModalHeader||{}),!I&&a.createElement(p.Z,{permission:"node:Create"},a.createElement(c.Flex,{gap:2},a.createElement(c.Button,{flavour:"borderless",onClick:W},"Claim Token"),a.createElement(c.Button,{flavour:"borderless",onClick:Q},"Room ID")))),!I&&a.createElement(m.B,{"data-testid":"addWarRoomModal-title"},"Add nodes to\xa0",null===k||void 0===k?void 0:k.name),a.createElement(s.TZ,Z.sidebarContent||{},I?a.createElement(a.Suspense,{fallback:a.createElement(b.Z,{title:"Loading integrations..."})},a.createElement(T,{flavour:D.RV.addNodesModal})):a.createElement(p.Z,{permission:"node:Create"},a.createElement(a.Fragment,null,a.createElement(g.Z,null),!k.untouchable&&a.createElement(v.Z,(0,r.Z)({"data-testid":"addWarRoomModal-availableNodes"},L,{onAddNodes:R,canAddNodes:!!z.length,addNodesGA:"add-war-room-modal::click-add-node::global-view"})))))),!I&&H&&a.createElement(j,{spaceId:C,onClose:G}),!I&&J&&a.createElement(P,{title:"Room ID",info:S,copyDisabled:!S,onClose:q}))}},8741:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(29439),o=(n(21249),n(57640),n(9924),n(67294)),a=n(64969),i=n(74059),c=n(8641),l=n(35819),u=n(26017),s=n(35253),d=function(e){var t=e.label;return t?o.createElement(o.Fragment,null,o.createElement(a.Icon,{name:"code",size:"small"}),o.createElement(a.TextNano,{strong:!0,textTransform:"uppercase"},t)):null},m=(0,o.memo)(d),f=n(16931),p=(n(69826),n(41539),n(31672),n(2490),n(59461),function(e){var t=e.integrationId,n=e.rooms,d=void 0===n?[]:n,p=(0,c.RG)(),g=(0,i.OS)("plan"),v=function(){var e=(0,c.NE)();return function(t){return e.find((function(e){return e.id==t}))}}(),h=v(t),b=(0,o.useState)(0),y=(0,r.Z)(b,2),w=y[0],E=y[1],C=(0,o.useState)(s.N[g]||s.N.default),x=(0,r.Z)(C,2),O=x[0],k=x[1];return o.createElement(a.Flex,{column:!0,gap:4,width:"100%"},o.createElement(a.Flex,{justifyContent:"end"},o.createElement(l.Z,{isNightly:"nightly"==O,toggleNightly:function(e){var t=e.target.checked?"nightly":"stable";k(t)}})),h?o.createElement(u.Z,{integration:h,isNightly:"nightly"==O,rooms:d,navigateToSettings:!0}):o.createElement(a.Tabs,{selected:w,onChange:E,TabContent:f.m7,tabsProps:{gap:1,margin:[0,0,4,0]}},p.map((function(e){return o.createElement(a.Tab,{as:f.Sn,key:e.name,label:o.createElement(m,{label:e.name})},o.createElement(u.Z,{integration:e,isNightly:"nightly"==O,rooms:d,navigateToSettings:!0}))}))))})},56662:function(e,t,n){n.d(t,{U:function(){return f}});var r=n(29439),o=n(67294),a=n(89250),i=n(12599),c=n(64969),l=n(97323),u=n(74059),s=n(37518),d=n(16645),m=n(7693),f=function(e){var t=e.onClose,n=e.onDone,f=e.isSubmodal,p=void 0===f||f,g=(0,u.th)(),v=(0,o.useState)(""),h=(0,r.Z)(v,2),b=h[0],y=h[1],w=(0,c.useInputValue)({maxChars:255,value:""}),E=(0,r.Z)(w,3),C=E[0],x=E[1],O=E[2],k=function(e){var t=(0,a.s0)(),n=(0,u.uk)();return(0,o.useMemo)((function(){return function(r){var o=r.slug,a=(0,i.Gn)("/spaces/:spaceSlug/rooms/:roomSlug",{spaceSlug:n,roomSlug:o});e(),t(a)}}),[n])}(t),S=(0,s.Dq)(g,{onSuccess:n||k}),Z=(0,o.useCallback)((function(){S({name:b,description:C})}),[b,C]);return o.createElement(d.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(m.x,{onClose:t,isSubmodal:p,title:"Create a new room"},o.createElement(c.Button,{label:"Add",onClick:Z,disabled:!b})),o.createElement(d.TZ,null,o.createElement(l.Q,{roomName:b,setRoomName:y,roomDescription:C,charsDescIndicator:O,setRoomDescription:x,isCreateForm:!0})))}},7724:function(e,t,n){n.d(t,{CE:function(){return s},M5:function(){return m},R4:function(){return d}});var r=n(29439),o=(n(92222),n(67294)),a=n(64969),i=n(74059),c=n(46667),l=n(37518),u=n(33335),s=function(e){var t=1===e;return"Delete ".concat(e," ").concat(t?"room":"rooms")},d=function(e){return"Delete ".concat(e," room")},m=function(e){var t=e.name,n=e.roomsLength,r=e.spaceName,a=t||"".concat(n,1===n?" room":" rooms");return o.createElement(o.Fragment,null,"You are about to delete ",o.createElement("strong",null,a)," from ",o.createElement("strong",null,r)," space.",o.createElement("br",null),"This cannot be undone. Are you sure you want to continue?")};t.ZP=function(e){var t=e.id,n=e.name,s=e.navigateToParent,f=(0,i.OS)("name"),p=(0,l.tE)(t,"untouchable"),g=(0,u.gI)("room:Delete")&&!p,v=(0,l.IX)(t,{onSuccess:s}),h=(0,c.Z)(),b=(0,r.Z)(h,4),y=b[0],w=b[2],E=b[3];return g?o.createElement(o.Fragment,null,o.createElement(a.Button,{"data-testid":"manageWarRoom-delete",flavour:"hollow",onClick:w,label:"Delete room",danger:!0}),y&&o.createElement(a.ConfirmationDialog,{confirmLabel:"Yes, delete","data-ga":"delete-war-room-dialog","data-testid":"deleteWarRoomDialog",handleConfirm:v,handleDecline:E,message:o.createElement(m,{name:n,spaceName:f}),title:d(n)})):null}},97323:function(e,t,n){n.d(t,{Q:function(){return O}});var r=n(87462),o=n(29439),a=n(45987),i=(n(24603),n(74916),n(88386),n(39714),n(82526),n(41817),n(77601),n(67294)),c=n(64969),l=n(62200),u=n(95383),s=n(37518),d=n(33335),m=n(1229),f=n(46667),p="leave-war-room-dialog",g="leaveWarRoomDialog",v=function(e){var t=e.id,n=e.name,a=e.navigateToParent,l=(0,m.IT)(t,"ids"),u=(0,s.iC)(t,{onSuccess:a}),d=(0,s.tE)(t,"untouchable"),v=(0,f.Z)(),h=(0,o.Z)(v,4),b=h[0],y=h[2],w=h[3],E=1===l.length&&!d?{"data-ga":"".concat(p,"-last-member"),"data-testid":"".concat(g,"LastMember"),message:i.createElement(i.Fragment,null,"If you leave, ",i.createElement("strong",null,n)," room will be deleted immediately.",i.createElement("br",null),"Are you sure you want to continue?"),title:"Leave and delete ".concat(n," room")}:{"data-ga":p,"data-testid":g,message:i.createElement(i.Fragment,null,"You are about to leave ",i.createElement("strong",null,n)," room.",i.createElement("br",null),"Are you sure you want to continue?"),title:"Leave ".concat(n," room")};return i.createElement(i.Fragment,null,i.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-leave-war-room::manage-war-room-modal","data-testid":"manageWarRoom-leave",icon:"switch_off",flavour:"borderless",label:"Leave room",neutral:!0,padding:[0],width:"fit-content",onClick:y}),b&&i.createElement(c.ConfirmationDialog,(0,r.Z)({confirmLabel:"Yes, leave",handleConfirm:u,handleDecline:w},E)))},h=n(7724),b=n(30688),y=["charsIndicator","isDisabled","isValid","handleChange","setIsValid","setValidationMessage","validationMessage","value"],w=(0,b.A)([function(e){var t=e.length>=1;return(0,b.f)(t,"Give your room a name that's at least one character.")},function(e){var t=e.length<=20;return(0,b.f)(t,"A room's name can't exceed 20 characters.")}]),E=function(e){var t=e.charsIndicator,n=e.isDisabled,l=e.isValid,u=e.handleChange,s=e.setIsValid,d=e.setValidationMessage,m=e.validationMessage,f=e.value,p=(0,a.Z)(e,y),g=(0,c.useTouchedState)({}),v=(0,o.Z)(g,2),h=v[0],b=v[1];return(0,i.useEffect)((function(){var e=w(f),t=e.isValid,n=e.messages&&e.messages.length?e.messages[0]:void 0;!l&&t?s(!0):l&&!t&&s(!1),n&&d(n)}),[l,s,f,h,d]),i.createElement(c.TextInput,(0,r.Z)({"data-testid":"warRoomOptions-warRoomNameInput",label:"Room name",name:"createRoom",placeholder:"Enter your room's name",fieldMessage:"Tip: Use rooms to group your Nodes by their service, purpose, or location.",fieldIndicator:t,value:f,touched:h,onBlur:b,onChange:u,success:l,error:!l&&m,instantFeedback:"all",disabled:n,autoFocus:!0},p))},C=["id","navigateToParent","isCreateForm","roomName","setRoomName","roomDescription","setRoomDescription","charsDescIndicator","onSaveClick"],x=new RegExp(/^[\w\s\d]*?$/),O=function(e){var t=e.id,n=e.navigateToParent,m=e.isCreateForm,f=e.roomName,p=e.setRoomName,g=e.roomDescription,b=e.setRoomDescription,y=e.charsDescIndicator,w=e.onSaveClick,O=(0,a.Z)(e,C),k=(0,s.tE)(t),S=(0,u.J7)(),Z=(0,i.useState)(!1),P=(0,o.Z)(Z,2),I=P[0],j=P[1],D=(0,i.useState)(""),N=(0,o.Z)(D,2),T=N[0],_=N[1],F=(0,i.useState)(""),M=(0,o.Z)(F,2),A=M[0],L=M[1],B=(0,c.useInputValue)({maxChars:l.v$}),R=(0,o.Z)(B,1)[0],z=(0,i.useCallback)((function(e){return p(e.target.value)}),[p]),V=!!t,U=((0,d.gI)("room:LeaveAllNodes")||!k.untouchable)&&S.length>1&&k.isMember,H=(0,c.useTouchedState)({defaultState:!0}),W=(0,o.Z)(H,2),G=W[0],K=W[1],Y=!k.name||f===k.name&&g===k.description;return(0,i.useEffect)((function(){L(x.test(g)&&G?"":"The description can only contain digits, letters, and spaces.")}),[G,g]),i.createElement(c.Flex,(0,r.Z)({column:!0,"data-testid":"manageWarRoom",flex:"grow",justifyContent:"between",height:"100%"},O),i.createElement(c.Flex,{column:!0,"data-testid":"manageWarRoom-settings",gap:2},i.createElement(c.Box,{"data-testid":"manageWarRoom-createRoomInputBox"},i.createElement(E,{"data-testid":"manageWarRoom-createRoomInput",value:f,handleChange:z,charsIndicator:R,validationMessage:T,setValidationMessage:_,isValid:I,setIsValid:j,isDisabled:V&&k.untouchable})),i.createElement(c.Box,{"data-testid":"manageWarRoom-descriptionInputBox"},i.createElement(c.TextInput,{"data-testid":"manageWarRoom-descriptionInput",label:"Description",name:"roomDescription",placeholder:"A room description...",instantFeedback:"positiveFirst",touched:G,onBlur:K,fieldIndicator:y,error:""!==A&&A,success:""===A,value:g,onChange:b}))),i.createElement(c.Flex,{"data-testid":"manageWarRoom-actions"},i.createElement(c.Flex,{"data-testid":"manageWarRoom-deleteLeaveActions",gap:4},V&&U&&i.createElement(v,{id:t,name:k.name,navigateToParent:n}),V&&i.createElement(h.ZP,{id:t,name:f,navigateToParent:n})),!m&&i.createElement(c.Button,{"data-ga":"manage-war-room-tab::click-save::manage-war-room-modal","data-testid":"manageRoom-saveButton",label:"Save",onClick:w,disabled:Y,margin:[0,0,0,"auto"]})))}},46322:function(e,t,n){n.d(t,{C:function(){return l},k:function(){return c}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(46189)),a=n(88866);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var c=function(e){var t=e.data,n=e.untouchable,r=e.currentUserId,o=e.canRemoveUser;return t.reduce((function(e,t){var a=r===(null===t||void 0===t?void 0:t.id);return e.push({name:t.name,email:t.email,user:{avatarURL:t.avatarURL,name:t.name,email:t.email,id:t.id},type:t.role,disabled:!o||a||n}),e}),[])},l=function(e){return e.reduce((function(e,t){var n;return e.push(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({name:t.name||"",os:t.os.id||"",node:{id:t.id,name:t.name||"",os:t.os?"".concat(o.Z.assetsBaseURL,"/img/logos/os/").concat((null===(n=a.V[t.os.id])||void 0===n?void 0:n.logoFilename)||"placeholder.svg"):"".concat(o.Z.assetsBaseURL,"/img/logos/os/placeholder.svg")}},t)),e}),[])}},20031:function(e,t,n){var r=n(87462),o=n(67294),a=n(64969),i=n(82351);t.Z=function(e){return o.createElement(i.Z,{content:"Room you're a member of. You're able to receive notifications related to nodes in this room"},o.createElement(a.Icon,(0,r.Z)({name:"checkmark",width:"12px",height:"12px"},e)))}},41379:function(e,t,n){n.d(t,{A:function(){return p}});var r=n(29439),o=(n(92222),n(57327),n(41539),n(88449),n(2490),n(59849),n(26699),n(32023),n(67294)),a=n(92432),i=n(78710),c=n(68035),l=n(97945),u=n(48854),s=n(95248),d=n(33335),m=n(25819),f=n(96929),p=i.ZP?function(e){var t=e.id;return"rooms.".concat(t,".nodes")}:function(e){var t=e.id,n=e.spaceId;return"spaces.".concat(n,".rooms.").concat(t,".nodes")};t.Z=function(e){var t=e.id,n=e.spaceId,i=e.pollingInterval,g=void 0===i?63e3:i,v=e.polling,h=void 0===v||v,b=(0,s.XT)(),y=(0,f.X7)(t,"ids"),w=(0,o.useState)((function(){return(null===y||void 0===y?void 0:y.length)||0})),E=(0,r.Z)(w,2),C=E[0],x=E[1],O=(0,f.X7)(t,"loaded"),k=(0,d.gI)("room:Read");(0,o.useEffect)((function(){O&&b((function(e){return e&&e.filter((function(e){return y.includes(e)}))}))}),[y,O]),(0,o.useEffect)((function(){O&&C!==y.length&&((0,a.L)("node-count","node-count-changed-from-".concat(C,"-to-").concat(y.length),"","","","node-count-change"),x(y.length))}),[y.length,C,O]),(0,c.Z)((function(){return{key:p({id:t,spaceId:n}),autorun:!!k&&!!n&&!!t,fetch:function(){return(0,m.Fz)({roomId:t,spaceId:n})},polling:h,association:{getError:function(){return(0,f.kY)({id:t,key:"error"})},getIds:function(){return(0,f.kY)({id:t,key:"ids"})},getLoaded:function(){return(0,f.kY)({id:t,key:"loaded"})},getUpdatedAt:function(){return(0,f.kY)({id:t,key:"updatedAt"})}},sort:function(e,t){return e.name.localeCompare(t.name,void 0,{sensitivity:"accent"})},getResource:function(e){return(0,l.zP)({id:e})},getResourcesInitializer:function(){return l.Jz},getResourceInitialState:function(){return u.a},pollingOptions:{pollingInterval:g},maxCacheAge:900,force:!0}}),[n,t,g])}},45781:function(e,t,n){n.d(t,{e$:function(){return m},Mt:function(){return f}});var r=n(4942),o=(n(66992),n(41539),n(33948),n(47941),n(82526),n(57327),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(4480)),a=n(18446),i=n.n(a),c=n(74059),l={loaded:!1,entries:[],error:null,updatedAt:""},u=(0,o.xu)({key:"spaceAlerts",default:l});function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=(0,o.CG)({key:"spaceAlertState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(u(t))[n]}},set:function(e){var t=e.id,n=e.key;return function(e,r){var o=e.set;o(u(t),"error"!==n?function(e){return{loaded:!0,entries:i()(r,e.entries)?e.entries:r,updatedAt:(new Date).toISOString()}}:d(d({},l),{},{error:r}))}}}),f=function(e){return function(e,t){return(0,o.sJ)(m({id:e,key:t}))}((0,c.th)(),e)}},69019:function(e,t,n){n.d(t,{Cl:function(){return h},E3:function(){return s},Vs:function(){return b},ZQ:function(){return p},fA:function(){return w},fh:function(){return g},fz:function(){return y},uV:function(){return E}});var r=n(4942),o=(n(85827),n(41539),n(25387),n(2490),n(72608),n(92222),n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(26398)),a=n(50308),i=n.n(a),c=n(66152);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var s={id:null,name:"",description:"",commitment:!1,pricing:[],enrolledAt:null,currentPeriodFrom:null,currentPeriodTo:null,committedNodes:0,billingEmail:"",balance:{amount:0,currency:"usd"}},d={Pro:"pro",Professional:"pro",Community:"free",EarlyBird:"earlyBird",Business:"business"},m=function(e){var t=d[e.class],n=(0,c.k5)(e),o=Array.isArray(n.pricing)?n.pricing.reduce((function(e,t){return u(u({},e),{},(0,r.Z)({},t.type,t))}),{}):{};return u(u(u({},s),n),{},{pricing:o,slug:t})},f=function(e){return(0,c.k5)(e)},p=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/plans"),{transform:function(e){return e.plans.reduce((function(e,t){var n=m(t),r=e[n.slug]||[];return"year"===n.interval?r.unshift(n):r.push(n),e[n.slug]=r,e}),{})}})},g=function(e){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/plan"),{transform:m})},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"update";return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r="update"==e?o.Z.put:o.Z.post;return"function"!==typeof r?i():r("/api/v2/spaces/".concat(t,"/billing/plan"),(0,c.v)(n),{transform:function(e){return e.url}})}},h=function(e,t){return v("checkout")(e,t)},b=function(e,t){return v()(e,t)},y=function(e,t){return o.Z.get("/api/v2/spaces/".concat(e,"/billing/portal?redirect_url=").concat(encodeURIComponent(t)),{transform:function(e){return e.url}})},w=function(e,t){var n=t.after,r=t.before;return o.Z.get("/api/v2/spaces/".concat(e,"/billing/node-count?from=").concat(n,"&to=").concat(r))},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.Z.put("/api/v2/spaces/".concat(e,"/billing/plan/preview"),(0,c.v)(t),{transform:f})}},46715:function(e,t,n){n.d(t,{Gl:function(){return p},RP:function(){return y},SH:function(){return w},Zn:function(){return x},eY:function(){return C},fG:function(){return h}});var r=n(29439),o=(n(41539),n(88674),n(17727),n(67294)),a=n(4480),i=n(50308),c=n.n(i),l=n(74059),u=n(93017),s=n(69019),d=n(49489),m=[],f=(0,a.CG)({key:"plans",get:function(e){return function(){return(0,s.ZQ)(e)}}}),p=function(){var e,t=(0,l.th)(),n=(0,a.$P)(f(t));return{loaded:"loading"!==n.state,value:(null===(e=n.contents)||void 0===e?void 0:e.data)||m,hasError:"hasError"===n.state}},g=(0,a.CG)({key:"previewPlan",get:function(e){var t=e.spaceId,n=e.payload;return function(){return(0,s.uV)(t,n)}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),v=function(e){var t;return d.Fi[null===e||void 0===e||null===(t=e.response)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.errorMsgKey]},h=function(e,t){var n,r=(0,l.th)(),o=(0,a.$P)(g({spaceId:r,payload:e,forceFetch:t}));return{loading:"loading"===o.state,value:(null===(n=o.contents)||void 0===n?void 0:n.data)||{},promoCodeError:"hasError"===o.state?v(o.contents):void 0}},b=(0,a.CG)({key:"currentPlan",get:function(e){return function(){return e?(0,s.fh)(e):Promise.resolve()}}}),y=function(){var e,t=(0,l.th)(),n=(0,a.$P)(b(t)),r=(0,a.C)(b(t));return{loaded:"loading"!==n.state,value:(null===(e=n.contents)||void 0===e?void 0:e.data)||s.E3,hasError:"hasError"===n.state,refresh:r}},w=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.location.href,t=(0,o.useState)(!1),n=(0,r.Z)(t,2),a=n[0],i=n[1],c=(0,l.th)();return[(0,o.useCallback)((function(){i(!0),(0,s.fz)(c,e).then((function(e){var t=e.data;return location.href=t})).finally((function(){return i(!1)}))}),[c,e]),a]},E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s.Vs,t=(0,u.Z)(),n=(0,r.Z)(t,2)[1],o=(0,l.th)(),a=y();return!a.loaded||a.hasError?c():function(t){return e(o,t).then((function(e){a.refresh(),null!==e&&void 0!==e&&e.data&&(location.href=e.data)})).catch(n)}},C=function(){return E(s.Cl)},x=function(){return E()}},33582:function(e,t,n){n.d(t,{Z:function(){return f}});var r=n(15861),o=n(64687),a=n.n(o),i=n(67294),c=n(4480),l=n(33335),u=n(26398),s=function(e){return u.Z.post("/api/v1/spaces/".concat(e,"/tokens"),void 0,{allow401:!0})},d=(0,c.xu)({key:"spaceClaimingTokens",default:[]}),m=(0,c.CG)({key:"claimingTokensState",get:function(e){return function(t){return(0,t.get)(d(e))}},set:function(e){return function(t,n){(0,t.set)(d(e),[n])}}}),f=function(e){var t=(0,c.sJ)(m(e)),n=(0,l.gI)("node:Create",e),o=(0,c._8)((function(e){var t=e.snapshot,n=e.set;return function(){var e=(0,r.Z)(a().mark((function e(r){var o,i;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getPromise(m(r));case 2:if(e.sent.length){e.next=9;break}return e.next=6,s(r);case 6:o=e.sent,i=o.data,n(m(r),i);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),[]);return(0,i.useEffect)((function(){n&&e&&o(e)}),[n,e]),t}},49489:function(e,t,n){n.d(t,{FC:function(){return o},Fi:function(){return i},Vc:function(){return r},go:function(){return a}});var r={free:{level:0,title:"Community"},earlyBird:{level:0,title:"Early Bird",features:['"Member" role available with existing permissions.','"Member" role with access to _All Nodes_ room.']},pro:{level:10,title:"Pro",features:["7 days of alert history and auditing events.",'Unlock the "Troubleshooter" role and add members to the space without providing management permission.',"Enable webhook alert notification integration."]},business:{level:20,title:"Business",features:["Up-to 90 days of alert history and topology events. Never miss an important event while troubleshooting.",'Unlock all user roles including "Manager", "Observer" and "Billing". Empower your teams to excel.',"Enable alert notification integrations (Slack, PagerDuty and more)."]}},o=["year","month"],a={year:"yearly",month:"monthly"},i={ErrInvalidPromotionCode:"Promotion code is invalid",ErrInactivePromotionCode:"Promotion code is inactive",ErrInvalidPromotionCodePlan:"Promotion code cannot be applied to this plan"}},36065:function(e,t,n){n.d(t,{Z:function(){return v}});var r=n(29439),o=n(67294),a=n(64969),i=n(83732),c=n(62200),l=n(16645),u=n(7693),s=n(92903),d=(n(24603),n(74916),n(88386),n(39714),n(77601),n(46585)),m=n(30688),f=new RegExp(/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff]|[!@#$%^&*()_+=\-])/),p=(0,m.A)([function(e){var t=e.length>=d.Pf;return(0,m.f)(t,"Please enter a name for the Space that is at least 5 characters.")},function(e){var t=e.length<=d.Qy;return(0,m.f)(t,"A Space's name can't exceed 20 characters.")},function(e){return f.test(e)?{isValid:!1,message:"There's an unexpected character in the Space's name. Use only alphanumberic characters (A-Z, a-z, 0-9) and spaces."}:{isValid:!0}}]),g=function(e){var t=e.value,n=e.isValid,i=e.setIsValid,c=e.charsIndicator,l=e.isDirty,u=e.handleChange,s=e.validationMessage,d=e.setValidationMessage,m=e.onKeyDown,f=(0,a.useTouchedState)({}),g=(0,r.Z)(f,2),v=g[0],h=g[1];return(0,o.useEffect)((function(){var e=p(t),r=e.isValid,o=e.messages&&e.messages.length?e.messages[0]:void 0;!n&&r?i(!0):n&&!r&&i(!1),o&&d(o)}),[n,t,v,i,d]),o.createElement(a.TextInput,{label:"Space name",name:"createWorkspace",placeholder:"Enter your Space's name",fieldMessage:"Give your Space a name that's between 5-20 characters. This cannot change.",fieldIndicator:c,value:t,touched:v,onBlur:h,onChange:u,success:n,error:!n&&s,instantFeedback:"positiveFirst",isDirty:l,onKeyDown:m})},v=function(e){var t=e.onClose,n=e.onDone,m=(0,o.useState)(!1),f=(0,r.Z)(m,2),p=f[0],v=f[1],h=(0,o.useState)(!1),b=(0,r.Z)(h,2),y=b[0],w=b[1],E=(0,a.useInputValue)({maxChars:d.Qy}),C=(0,r.Z)(E,4),x=C[0],O=C[1],k=C[2],S=C[3],Z=(0,o.useState)(""),P=(0,r.Z)(Z,2),I=P[0],j=P[1],D=(0,o.useCallback)((function(e){w(!1),t(),null===n||void 0===n||n(e)}),[t]),N=(0,i.Z)({onSuccess:D,onError:function(){return w(!1)}}),T=(0,o.useCallback)((function(){p&&(w(!0),N({name:x}))}),[x,p]);return o.createElement(l.u6,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},o.createElement(u.x,{onClose:t,title:"Create Space"},o.createElement(a.Button,{disabled:!p,isLoading:y,loadingLabel:"Creating",label:"Save",onClick:T})),o.createElement(s.B,null,"Create a new Space"),o.createElement(l.TZ,null,o.createElement(g,{isDirty:S,isValid:p,setIsValid:v,value:x,handleChange:O,charsIndicator:k,validationMessage:I,setValidationMessage:j,onKeyDown:function(e){e.keyCode===c.DV&&p&&T()}})))}},2509:function(e,t,n){n.d(t,{Q$:function(){return s},Sr:function(){return v},bK:function(){return u},dH:function(){return f},eq:function(){return i},fM:function(){return d},fV:function(){return p},m3:function(){return a},xN:function(){return h},z2:function(){return g}});var r,o=n(4942),a="info",i="rooms",c="nodes",l="users",u="notifications",s="integrations",d="billing",m="integrations",f=[a,i,c,l,u,d,m],p=(r={},(0,o.Z)(r,a,"Info"),(0,o.Z)(r,i,"Rooms"),(0,o.Z)(r,c,"Nodes"),(0,o.Z)(r,l,"Users"),(0,o.Z)(r,u,"Alerts & Notifications"),(0,o.Z)(r,s,"Services"),(0,o.Z)(r,d,"Plan & Billing"),(0,o.Z)(r,m,"Integrations"),r),g=f[0],v="/spaces/:spaceSlug/settings/:settingsTab/*",h="/spaces/:spaceSlug/settings/:settingsTab/:settingsSubTab/*"},72671:function(e,t,n){n.d(t,{F:function(){return y}});var r=n(87462),o=n(29439),a=n(45987),i=(n(92222),n(26699),n(67294)),c=n(89250),l=n(64969),u=n(97346),s=n(91008),d=n(82351),m=n(53606),f=n(46585),p=n(13477),g=n(46667),v=n(46715),h=["currentPlan"],b=["id","isLastSpace","name","onClose"],y=function(e){return function(t){var n=t.currentPlan,r=(0,a.Z)(t,h),o=n.class,c=n.interval,u=n.billingEmail,d="year"===c?"yearly":"monthy",m="".concat(o," ").concat(d),f=!["Community","EarlyBird"].includes(o),p=!!u&&!f;return i.createElement(e,r,f&&i.createElement(i.Fragment,null,i.createElement(l.Text,null,"You are currently on ",i.createElement(l.Text,{strong:!0},m)," subscription, which will be cancelled automatically and any due credit from unused period will be given to your credit balance."),i.createElement(l.Text,null,"Any available credit with us won't be automatically lost. If you want to use it in the future, within the defined period on our"," ",i.createElement(s.Z,{href:"https://www.netdata.cloud/service-terms/",rel:"noopener noreferrer",target:"_blank"},"Terms of Service"),", or have any requests about previous invoices you can reach out to"," ",i.createElement(l.Text,{strong:!0},"support@netdata.cloud"))),p&&i.createElement(l.Text,null,"You will lose direct access to you invoices and billing information. If you want to retrieve this information in the future, you'll have to contact"," ",i.createElement(l.Text,{strong:!0},"support@netdata.cloud")))}},w=y((function(e){var t=e.spaceName,n=e.children;return i.createElement(l.Flex,{column:!0,gap:2},i.createElement(l.Text,null,"You are about to delete ",i.createElement("strong",null,t)," space."),n,i.createElement(l.Text,null,"Are you sure you want to continue?"))}));t.Z=function(e){var t=e.id,n=e.isLastSpace,s=e.name,h=e.onClose,y=(0,a.Z)(e,b),E=(0,c.s0)(),C=(0,m.Z)(t),x=(0,p.jr)(),O=(0,v.RP)().value,k=(0,g.Z)(),S=(0,o.Z)(k,4),Z=S[0],P=S[2],I=S[3],j=(0,g.Z)(),D=(0,o.Z)(j,2),N=D[0],T=D[1],_=(0,i.useCallback)((function(e){h(),E("/spaces/".concat(e))}),[]);return x&&i.createElement(u.Z,{permission:"space:Delete"},i.createElement(d.Z,{align:"top",content:n&&f.T$.delete,isBasic:!0,stretch:"align"},i.createElement(l.Box,null,i.createElement(l.Button,(0,r.Z)({danger:!0,"data-ga":"manage-space-tab::click-delete-space::manage-space-modal","data-testid":"deleteSpace-button",disabled:n,flavour:"hollow",label:"DELETE SPACE",onClick:P},y)))),Z&&i.createElement(l.ConfirmationDialog,{confirmLabel:N?"Deleting...":"Yes, delete","data-ga":"delete-space","data-testid":"deleteSpaceDialog",handleConfirm:function(){T(),C({onSuccess:_})},handleDecline:I,message:i.createElement(w,{spaceName:s,currentPlan:O}),title:"Delete ".concat(s," space"),isConfirmDisabled:N,isConfirmLoading:N,isDeclineDisabled:N}))}},54131:function(e,t,n){n.d(t,{Qj:function(){return o},uB:function(){return i},x3:function(){return a}});n(74916),n(77601);var r=/^[a-zA-Z0-9@_.-\s!]*$/,o={minLength:"Space name should be more than 4 characters",allowedChars:"Please use alphanumberic characters (A-Z, a-z, 0-9), spaces, periods and supported special characters @, -, _,."},a=function(e){return e.length<5?"minLength":!r.test(e)&&"allowedChars"},i=function(e){return!r.test(e)&&"allowedChars"}},73398:function(e,t,n){n.d(t,{Z:function(){return C}});var r=n(87462),o=n(45987),a=(n(92222),n(67294)),i=n(64969),c=n(45781),l=(n(69826),n(41539),n(31672),n(2490),n(59461),n(4480)),u=n(74059),s={alertCounter:{warning:0,critical:0},unreachableCount:0},d=(0,l.CG)({key:"roomAlertSummaryState",get:function(e){var t=e.id,n=e.key;return function(e){var r=e.get,o=r(u.BN),a=r((0,c.e$)({id:o,key:"entries"})).find((function(e){return e.id===t}))||s;return n?a[n]:a}}}),m=n(37518),f=n(67622),p=n(82351),g=n(71893),v=(0,g.default)(i.Flex).attrs({flex:{grow:0,shrink:0},width:2,height:2,margin:[0,1,0,0],round:1,background:"error",justifyContent:"center",alignItems:"center"}).withConfig({displayName:"indicators__ErrorIndicator",componentId:"sc-19hg3ay-0"})([""]),h=(0,g.default)(v).attrs({background:"warning"}).withConfig({displayName:"indicators__WarningIndicator",componentId:"sc-19hg3ay-1"})([""]),b=(0,g.default)(v).attrs({background:"textLite"}).withConfig({displayName:"indicators__UnreachableIndicator",componentId:"sc-19hg3ay-2"})([""]),y=n(81488),w=n(20031),E=["id","selectedId","spaceSlug","isSidebar","hideAlerts","differentiateIsMember"],C=function(e){var t=e.id,n=e.selectedId,u=e.spaceSlug,s=e.isSidebar,g=e.hideAlerts,C=e.differentiateIsMember,x=(0,o.Z)(e,E),O=function(e,t){return(0,l.sJ)(d({id:e,key:t}))}(t),k=O.alertCounter,S=k.critical,Z=k.warning,P=O.unreachableCount,I=(0,m.tE)(t,"slug"),j=(0,m.tE)(t,"name"),D=(0,m.tE)(t,"isMember"),N=(0,c.Mt)("error"),T=(0,c.Mt)("updatedAt");return a.createElement(f.Z,(0,r.Z)({},!!u&&{to:"/spaces/".concat(u,"/rooms/").concat(I)},{testid:"roomLabel-warRoom-".concat(j),actions:g?null:a.createElement(p.Z,{content:a.createElement(y.Z,{error:N,text:"Room alerts",updatedAt:T}),isBasic:!0,align:"right"},a.createElement(i.Flex,{flex:!1,flexWrap:!1,justifyContent:"end",width:{min:6},height:{min:2}},S>0&&a.createElement(v,null),Z>0&&a.createElement(h,null),P>0&&a.createElement(b,null))),icon:C&&D&&a.createElement(w.Z,null),iconColor:"successLite",iconHeight:"12px",iconWidth:"12px",gap:1,textProps:C&&!D&&{padding:[0,0,0,4]},selected:t===n,isSidebar:s,isSecondary:!D},x),j)}},22613:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(64969),c=n(55917),l=["onFilterClick","showAllRooms"];t.Z=function(e){var t=e.onFilterClick,n=e.showAllRooms,u=(0,o.Z)(e,l);return a.createElement(i.Flex,(0,r.Z)({gap:2,padding:[1,2],"data-testid":"roomFilterPills"},u),a.createElement(c.S,{flavour:n?"hollow":"default",onClick:t(!1),label:"My Rooms","data-ga":"roomFilterPills::click-my::global-view","data-testid":"roomFilterPills-showMy"}),a.createElement(c.S,{flavour:n?"default":"hollow",onClick:t(!0),label:"All Rooms","data-ga":"roomFilterPills::click-show-all::global-view","data-testid":"roomFilterPills-showAll"}))}},59636:function(e,t,n){var r=n(87462),o=n(29439),a=n(45987),i=(n(57327),n(41539),n(88449),n(2490),n(59849),n(21249),n(57640),n(9924),n(67294)),c=n(48286),l=n(64969),u=n(95383),s=n(74059),d=n(37518),m=n(33335),f=n(73398),p=n(22613),g=["isSidebar"];t.Z=function(e){var t=e.isSidebar,n=(0,a.Z)(e,g),v=(0,u.J7)(),h=(0,i.useState)(!1),b=(0,o.Z)(h,2),y=b[0],w=b[1],E=(0,s.th)(),C=(0,s.uk)();(0,c.Z)((function(){w(!1)}),[E]);var x=(0,m.gI)("room:ReadAll"),O=(0,i.useMemo)((function(){return v.filter((function(e){return e.isMember}))}),[v]),k=x&&O.length>0,S=k&&!y?O:v,Z=(0,d.UL)();return i.createElement(i.Fragment,null,k&&i.createElement(p.Z,{onFilterClick:function(e){return function(t){t.stopPropagation(),w(e)}},showAllRooms:y}),S.map((function(e,o){var a=e.id,c=e.untouchable;return i.createElement(i.Fragment,{key:a},i.createElement(f.Z,(0,r.Z)({id:a,hideAlerts:!t,Wrapper:l.Text,isSidebar:t,differentiateIsMember:y,spaceSlug:C,selectedId:Z},n)),c&&o!==S.length-1&&i.createElement(l.Flex,{border:{side:"top",color:"border"},margin:[1.5,0],"data-testid":"roomLabel-warRoomSeparator"}))})))}},55917:function(e,t,n){n.d(t,{S:function(){return i},x:function(){return a}});var r=n(71893),o=n(64969),a=(0,r.default)(o.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-i0gfkp-0"})(["transform:",";"],(function(e){return e.right?"rotate(0)":"rotate(180deg)"})),i=(0,r.default)(o.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-i0gfkp-1"})(["&&{padding:2px 16px;font-size:12px;height:auto;width:auto;min-width:96px;}"])},77872:function(e,t,n){var r=n(87462),o=n(4942),a=n(45987),i=n(29439),c=(n(92222),n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070),n(67294)),l=n(71893),u=n(89250),s=n(64969),d=n(82351),m=n(74059),f=["active","background","showFullname"],p=["active","spaceId","testIdPrefix","local","onClick","showFullname","color"];function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var v=[],h=(0,l.default)(s.Flex).attrs((function(e){var t=e.active,n=(e.background,e.showFullname);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){(0,o.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({width:n?"auto":7,height:7,background:t?"spaceSelected":"spaceIdle",justifyContent:"center",alignItems:"center",round:.5,padding:n?[0,1]:[0],margin:n?[0,0,1]:[0]},(0,a.Z)(e,f))})).withConfig({displayName:"spaceLabel__SpaceBox",componentId:"sc-1e67mnq-0"})(["cursor:pointer;&:hover{background:",";}"],(function(e){return e.active?(0,s.getColor)("spaceSelected"):(0,s.getColor)("spaceHovered")}));t.Z=function(e){var t=e.active,n=e.spaceId,o=e.testIdPrefix,l=e.local,f=void 0!==l&&l,g=e.onClick,b=e.showFullname,y=e.color,w=(0,a.Z)(e,p),E=(0,u.s0)(),C=(0,m.vu)(n),x=function(e){if(!e)return v;var t=e.split(" "),n=(0,i.Z)(t,2),r=n[0],o=n[1];return[r[0],o?o[0]:""]}(C.name),O=(0,i.Z)(x,2),k=O[0],S=O[1],Z=(0,c.useCallback)((function(){return g?g(C):E(f?"/overview":"/spaces/".concat(C.slug))}),[C.slug,f,g]);return c.createElement(d.Z,{content:C.name,align:"right",isBasic:!0},c.createElement(h,(0,r.Z)({active:t,"data-testid":"".concat(o||"spaceLabel-space","-").concat(C.slug),onClick:Z},w,{showFullname:b}),f?c.createElement(s.Icon,{name:"node",color:t?"text":"textLite"}):b?c.createElement(s.TextSmall,{strong:!0,color:t?"main":y||"textLite"},C.name):c.createElement(c.Fragment,null,c.createElement(s.TextSmall,{strong:!0,color:t?"text":y||"textLite"},k),c.createElement(s.TextSmall,{strong:!0,color:t?"textLite":y||"textLite"},S))))}},94666:function(e,t,n){n.d(t,{zm:function(){return f},ZN:function(){return p},WA:function(){return m},J9:function(){return g},Wy:function(){return b},nP:function(){return C},H4:function(){return v},kf:function(){return h},Qk:function(){return w}});n(47941),n(82526),n(38880),n(49337),n(33321),n(69070);var r=n(4942),o=(n(41539),n(15581),n(2490),n(34514),n(54747),n(26833),n(21249),n(57640),n(9924),n(57327),n(88449),n(59849),n(4480)),a=n(34912),i=n(13477),c=n(74059),l={ids:(0,o.xu)({key:"spaceMemberIds",default:[]}),updatedAt:(0,o.xu)({key:"spaceMembersUpdatedAt",default:""}),loaded:(0,o.xu)({key:"spaceMembersLoaded",default:!1})},u=(0,o.xu)({key:"spaceMemberRole",default:""});function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m=(0,o.CG)({key:"spaceMemberState",get:function(e){var t=e.id,n=e.key;return function(e){return(0,e.get)(l[n](t))}},set:function(e){var t=e.id,n=e.key;return function(e,r){(0,e.set)(l[n](t),r)}}}),f=function(e,t){Object.values(l).forEach((function(n){return e(n(t))}))},p=(0,o.CG)({key:"spaceMemberRoleState",get:function(e){var t=e.id,n=e.spaceId;return function(e){return(0,e.get)(u({id:t,spaceId:n}))}},set:function(e){var t=e.id,n=e.spaceId;return function(e,r){(0,e.set)(u({id:t,spaceId:n}),r)}}}),g=(0,o.CG)({key:"spaceMembersRoleState",set:function(e){return function(t,n){var r=t.set;n.forEach((function(t){var n=t.id,o=t.role;r(p({id:n,spaceId:e}),o)}))}},get:function(e){var t=e.ids,n=e.spaceId;return function(e){var r=e.get;return t.map((function(e){return r(p({id:e,spaceId:n}))}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),v=function(){var e,t,n=(0,c.th)();return e=n,t="ids",(0,o.sJ)(m({id:e,key:t}))},h=function(e){var t=(0,c.th)();return(0,o.sJ)(g({ids:e,spaceId:t}))},b=function(){return"admin"===function(e){var t=(0,c.th)();return(0,o.sJ)(p({id:e,spaceId:t}))}((0,i.Iy)("id"))},y=(0,o.CG)({key:"currentSpaceMembersState",get:function(e){var t=e.ids,n=e.spaceId;return function(e){var r=e.get;return t.map((function(e){var t=r((0,a.mX)({id:e})),o=r(p({id:e,spaceId:n}));return d(d({},t),{},{role:o})}))}},cachePolicy_UNSTABLE:{eviction:"most-recent"}}),w=function(){var e=(0,c.th)(),t=v();return(0,o.sJ)(y({ids:t,spaceId:e}))},E=(0,o.CG)({key:"spaceAdminsState",get:function(e){var t=e.memberIds,n=e.spaceId;return function(e){return(0,e.get)(y({ids:t,spaceId:n})).filter((function(e){return"admin"===e.role}))}}}),C=function(){var e=(0,c.th)(),t=v();return(0,o.sJ)(E({memberIds:t,spaceId:e}))}},83732:function(e,t,n){var r=n(93433),o=n(15861),a=n(64687),i=n.n(a),c=(n(66992),n(41539),n(70189),n(78783),n(88921),n(96248),n(13599),n(11477),n(64362),n(15389),n(90401),n(45164),n(91238),n(54837),n(87485),n(56767),n(76651),n(61437),n(35285),n(39865),n(33948),n(92222),n(4480)),l=n(30266),u=n(74059),s=n(58502);t.Z=function(e){var t=e.onSuccess,n=e.onError,a=e.isDefault,d=void 0!==a&&a;return(0,c._8)((function(e){var a=e.set;return function(){var e=(0,o.Z)(i().mark((function e(o){var c,m,f,p,g,v,h,b;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=o.name,m=o.userId,f=o.email,e.prev=1,!d){e.next=8;break}return e.next=5,(0,l.A6)(m,f);case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,l.wh)(c);case 10:e.t0=e.sent;case 11:p=e.t0,g=p.data,v=g.id,h=g.slug,b=g.name,a((0,s.ZP)(v),{id:v,slug:h,name:d?b:c,loaded:!0}),a((0,s.bo)(h),v),a((0,u.st)("ids"),(function(e){return e=(0,r.Z)(new Set([].concat((0,r.Z)(e),[v])))})),a((0,u.st)("loaded"),!0),t&&t(g),e.next=24;break;case 21:e.prev=21,e.t1=e.catch(1),n&&n();case 24:case"end":return e.stop()}}),e,null,[[1,21]])})));return function(t){return e.apply(this,arguments)}}()}),[t,n])}},53606:function(e,t,n){var r=n(15861),o=n(29439),a=n(64687),i=n.n(a),c=(n(57327),n(41539),n(88449),n(2490),n(59849),n(4480)),l=n(93017),u=n(30266),s=n(46585),d=n(74059),m=n(58502),f=n(57079),p=n(94666),g=n(95383);t.Z=function(e){var t=(0,l.Z)(),n=(0,o.Z)(t,2)[1];return(0,c._8)((function(t){var a=t.snapshot,c=t.set,l=t.reset;return function(){var t=(0,r.Z)(i().mark((function t(r){var v,h,b,y,w,E,C,x;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return v=r.onSuccess,h=r.onError,t.next=3,a.getPromise((0,d.st)("ids"));case 3:if(b=t.sent,y=b.filter((function(t){return e!==t})),w=(0,o.Z)(y,1),E=w[0]){t.next=9;break}return n({header:"Spaces",text:s.T$.delete}),t.abrupt("return");case 9:if(t.t0=E,!t.t0){t.next=14;break}return t.next=13,a.getPromise((0,m.ZP)(E));case 13:t.t0=t.sent;case 14:return C=t.t0,x=C.slug,c((0,d.st)("ids"),y),c(f.Z,(function(t){return t.filter((function(t){return t!==e}))})),t.prev=18,t.next=21,(0,u.Ns)(e);case 21:v&&v(x),(0,p.zm)(l,e),(0,g.r1)(l,e),l((0,m.ZP)(e)),t.next=32;break;case 27:t.prev=27,t.t1=t.catch(18),c((0,d.st)("ids"),b),n(t.t1),h&&h();case 32:case"end":return t.stop()}}),t,null,[[18,27]])})));return function(e){return t.apply(this,arguments)}}()}),[e])}},20428:function(e,t,n){n(47941),n(82526),n(57327),n(41539),n(88449),n(2490),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(15861),a=n(29439),i=n(64687),c=n.n(i),l=n(4480),u=n(74059),s=n(30266),d=n(93017);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.Z=function(e){var t=(0,d.Z)(),n=(0,a.Z)(t,2),r=n[0],i=n[1];return(0,l._8)((function(t){var n=t.snapshot,a=t.set;return function(){var t=(0,o.Z)(c().mark((function t(o,l){var d,m,p;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return d=l.onSuccess,m=l.onFail,t.next=3,n.getPromise((0,u.U7)({id:e}));case 3:return p=t.sent,a((0,u.U7)({id:e}),(function(e){return f(f({},e),o)})),t.prev=5,t.next=8,(0,s.$F)(e,o);case 8:r({header:"Space successfully updated!"}),d&&d(),t.next=17;break;case 12:t.prev=12,t.t0=t.catch(5),a((0,u.U7)({id:e}),p),i(t.t0),m&&m();case 17:case"end":return t.stop()}}),t,null,[[5,12]])})));return function(e,n){return t.apply(this,arguments)}}()}),[e])}},6308:function(e,t,n){n.d(t,{c:function(){return f}});var r=n(29439),o=(n(74916),n(77601),n(67294)),a=n(89250),i=n(5429),c=n(74059),l=n(25819),u=n(37518),s=n(53338),d=n(93017),m=n(78710),f=function(){var e=(0,a.TH)().pathname;return{isIntegrationsPath:/integrate-anything$/.test(e)}};t.Z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).polling,t=void 0===e?0:e,n=(0,o.useState)(0),a=(0,r.Z)(n,2),f=a[0],p=a[1],g=(0,c.th)(),v=(0,u.HM)(g,s.i_),h=(0,d.Z)(),b=(0,r.Z)(h,2)[1],y=(0,o.useState)([]),w=(0,r.Z)(y,2),E=w[0],C=w[1];(0,o.useEffect)((function(){var e=null;return!m.ZP&&t&&(e=setInterval((function(){return p((function(e){return e+1}))}),t)),function(){clearInterval(e),e=null}}),[]);var x=(0,i.Z)((function(){return{enabled:!!v,fetch:function(){return(0,l.Fz)({roomId:v,spaceId:g})},initialValue:E,onFail:function(e){b(e)},isDefaultLoading:!0}}),[v,g,f]),O=(0,r.Z)(x,2),k=O[0],S=O[1];return(0,o.useEffect)((function(){S||C(k)}),[S,k]),{isEmptySpace:!m.ZP&&!S&&!k.length,loading:!m.ZP&&S,nodes:k}}},65351:function(e,t,n){var r=n(29439),o=n(67294),a=n(95248);t.Z=function(e,t,n,i){var c=(0,a.I0)("modal"),l=(0,r.Z)(c,2),u=l[0],s=l[1],d=(0,a.I0)("modalTab"),m=(0,r.Z)(d,2),f=m[0],p=m[1],g=(0,a.I0)("modalParams"),v=(0,r.Z)(g,2),h=v[0],b=v[1],y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;"string"===typeof t&&p(t),s(e),n&&b(n)};return(0,o.useEffect)((function(){t&&y(n,i)}),[]),{isModalOpen:e===u,currentModalTab:f,handleChangeModalTab:p,handleOpenModal:y,handleCloseModal:function(){p(""),s(""),b()},params:h}}},55899:function(e,t,n){var r=n(15861),o=n(64687),a=n.n(o),i=n(67294),c=n(7335),l=n(89050),u=n(96929),s=n(74059),d=n(95383),m=n(19368);t.Z=function(){var e=(0,m.P)(),t=(0,d.yE)(),n=(0,s.th)(),o=(0,c.XU)(),f=(0,u.Ww)(n,t,{onSuccess:function(r){return(0,l.jG)({cacheKeyPrefix:e,nodeIds:r,roomIds:t,spaceId:n})}});return(0,i.useCallback)(function(){var e=(0,r.Z)(a().mark((function e(t){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(t);case 2:return e.next=4,o(t);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),[f,o])}},91128:function(e,t,n){var r=n(29439),o=n(67294),a=n(48286),i=n(46667),c=n(9058);t.Z=function(){var e=(0,i.Z)(!1),t=(0,r.Z)(e,2),n=t[0],l=t[1],u=(0,c.e)(),s=(0,o.useRef)(null);return(0,a.Z)((function(){if(u)return s.current=null===s.current&&u.getRoot().getAttribute("after")>0,u.getRoot().updateAttribute("paused",n),function(){return u&&u.getRoot().updateAttribute("paused",s.current)}}),[n]),l}},93033:function(e,t,n){var r=n(89250),o=n(67294),a=n(12599),i=n(74059),c=n(2509);t.Z=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).roomSlug,t=(0,i.uk)(),n=(0,r.s0)(),l=(0,r.TH)().pathname,u="".concat(l);return(0,o.useCallback)((function(){var r=e?(0,a.Gn)(c.xN,{spaceSlug:t,settingsTab:c.eq,settingsSubTab:e}):"/spaces/".concat(t,"/settings");n(r,{state:{previousUrlPath:u}})}),[u,n,e,t])}},27624:function(e,t,n){var r=n(37518),o=n(96929),a=n(89050),i=n(19368);t.Z=function(e){var t=(0,i.P)(),n=(0,r.UL)(),c=(0,r.tE)(e||n,"spaceId");return(0,o.nI)(c,e||n,{onSuccess:function(r){return(0,a.Br)({cacheKeyPrefix:t,nodeIds:r,roomId:e||n,spaceId:c})}})}},61152:function(e,t,n){var r=n(65351);t.Z=function(e,t){var n=(0,r.Z)(e,t),o=n.isModalOpen,a=n.handleOpenModal,i=n.handleCloseModal;return[o,o?i:a,a,i,n.params]}},78401:function(e,t,n){n.d(t,{O:function(){return u}});n(47941),n(82526),n(57327),n(88449),n(59849),n(38880),n(15581),n(34514),n(54747),n(49337),n(33321),n(69070);var r=n(4942),o=n(29439),a=(n(85827),n(41539),n(25387),n(2490),n(72608),n(69720),n(26699),n(32023),n(52971)),i=n(85456);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=function(){return Object.entries(a.Ew).reduce((function(e,t){var n=(0,o.Z)(t,2),a=n[0],c=n[1];return l(l({},e),{},(0,r.Z)({},a,(0,i.gs)(c.id)))}),{})};t.Z=function(e){var t=e.avatar,n=e.createdAt,r=e.email,o=e.id,c=e.name,l=e.spacesCount,u=e.verifiedEmail;if(window.envSettings.tracking&&(!r||!r.includes("@netdata.msdc.co"))&&(!o||"00000000-0000-0000-0000-000000000000"!==o)&&(!r||!r.includes("anonymous@netdata.cloud"))){var s,d=new Date,m=d.toISOString(),f=new Date(n),p=Math.floor((d-f)/864e5);if((0,i.gs)(a.Ew.analyticsCookies.id))window.dataLayer&&window.dataLayer.push({event:"UserInfoAvailable",user_id:o,userIdentifier:o,userName:c,userEmail:r,userAccountCreatedAt:n,userAccountCreatedDaysAgo:p,userAvatarURL:t,userEmailVerified:u,spacesCount:l}),window.gtag&&window.gtag("config","G-J69Z2JCTFB",{user_id:o}),null!==(s=window.posthog)&&void 0!==s&&s.__loaded&&(window.posthog.identify(o),window.posthog.people.set({email:r||"unknown email",name:c,netdata_cloud_account_created_at:n,netdata_cloud_account_created_days_ago:p}),window.posthog.register({netdata_cloud_account_created_days_ago:p}),window.posthog.register_once({event_source:"cloud",netdata_cloud_account_created_at:n,netdata_cloud_account_email:r||"unknown email",netdata_cloud_account_id:o,netdata_cloud_signed_in_at:m}))}}}}]);
\ No newline at end of file |