diff options
Diffstat (limited to 'web/gui/v2/442.5189af01dfd7a61ba40e.chunk.js')
-rw-r--r-- | web/gui/v2/442.5189af01dfd7a61ba40e.chunk.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/web/gui/v2/442.5189af01dfd7a61ba40e.chunk.js b/web/gui/v2/442.5189af01dfd7a61ba40e.chunk.js new file mode 100644 index 00000000..9f0ac5e9 --- /dev/null +++ b/web/gui/v2/442.5189af01dfd7a61ba40e.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]="a2957804-3703-480e-801a-e4087e5a03d9",e._sentryDebugIdIdentifier="sentry-dbid-a2957804-3703-480e-801a-e4087e5a03d9")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"068845a823c962888381794c354a8f6b6e263031"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[442],{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(15557),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)),h=n(60677);function v(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,h.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?v(Object(n),!0).forEach((function(t){(0,g.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(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=h.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,h.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,h.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"})([""]),k=(0,h.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,h.default)(d.Icon).withConfig({displayName:"styled__DropdownIcon",componentId:"sc-gwjt9o-5"})(["fill:",";width:12px;height:12px;"],(0,d.getColor)("text")),C=h.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")),O=(0,h.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,h.default)(d.TextInput).withConfig({displayName:"styled__StyledDateInput",componentId:"sc-gwjt9o-8"})(["margin-left:20px;margin-right:20px;"]),Z=h.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),T=n(49546),N=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])},U=function(e,t){var n=(0,j.Z)(new Date(0),(0,g.Z)({},t,e));return-(0,D.Z)(n)},V={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"}],G=function(e,t){var n=(0,N.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())},W=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})})))},Y=(n(9653),n(33161),n(12274)),J=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],h=(0,f.Z)(),v=(0,o.Z)(h,4),b=v[0],y=v[1],O=v[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,Y.default)(i)&&(0,D.Z)(i)<=94694400?n(U(t,a),a):p(r<=0?z(-r,a):0)}),[a,m]),I=(0,i.useCallback)((function(e){return function(){n(U(m,e),e),O()}}),[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(C,{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(k,{align:{top:"bottom",left:"left"},animation:!0,close:O,"data-testid":"timePeriodDropdown",onClickOutside:O,onEsc:O,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)}))))},q=n(313),K=n(89405),$=n(9198),X=n.n($),Q=(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,h=e.startOpen,v=void 0!==h&&h,b=e.inline,y=void 0!==b&&b,w=e.selectsRange,E=void 0!==w&&w,k=e.monthsShown,x=void 0===k?1:k,C=e.showPopperArrow,O=void 0===C||C,S=e.calendarContainer,Z=void 0===S?null:S;return i.createElement(X(),{selected:t,onChange:u,selectsStart:r,selectsEnd:a,startDate:c,endDate:l,minDate:s,maxDate:d,dateFormat:f,open:g,startOpen:v,inline:y,selectsRange:E,monthsShown:x,showPopperArrow:O,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,K.rA)().utcOffset,f=(0,i.useState)(""),p=(0,o.Z)(f,2),g=p[0],h=p[1],v=(0,i.useCallback)((function(e){var t=e.target.value;h(t)}),[]),b=(0,i.useCallback)((function(e){if((0,Y.default)(e)){var t=(0,T.default)(e,"MMMM d yyyy, H:mm");h(t)}}),[]),y=(0,i.useCallback)((function(e){var t=G(e.target.value,m);if((0,Y.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:v,onBlur:y,onFocus:u,placeholder:d,"data-testid":"datePicker-input"})},te=n(19013),ne=function(){var e=(0,K.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,h=void 0===p?new Date:p,v=e.minDate,b=void 0===v?new Date("1/1/2018"):v,y=e.isSinglePicker,w=ae(t,a),E=(0,o.Z)(w,2),k=E[0],x=E[1],C=oe(u),O=(0,K.rA)().utcOffset,S=ne(),P=(0,i.useCallback)((function(e,t){return(0,q.default)(re(e,S),x)?n(e):t()}),[a,S]),I=(0,i.useCallback)((function(e,t){return(0,q.default)(k,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?G((0,T.default)(t,"MMMM d yyyy, H:mm"),O):t,o=n?G((0,T.default)(n,"MMMM d yyyy, H:mm"),O):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}))}),[O]);return i.createElement(d.Flex,{column:!0,justifyContent:"center",alignItems:"center",flex:!0,gap:3,"data-testid":"datePicker-wrapper"},i.createElement(Q,(0,r.Z)({selected:y?C:k,onChange:j},y?{}:{startDate:k,endDate:x},{maxDate:h,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:C,onDatesChange:j,placeholderText:"Select a date"}):i.createElement(d.Flex,{justifyContent:"around",alignItems:"center",width:"100%"},i.createElement(ee,{name:"startDate",value:k,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,T.default)(e,n),formattedEndDate:(0,T.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"}],he=["hours","minutes","seconds"],ve=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,K.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,h.default)(d.Flex).withConfig({displayName:"styled__Container",componentId:"sc-1s7311w-0"})(["cursor:pointer;&:hover *{color:",";fill:",";}"],(0,d.getColor)("textLite"),(0,d.getColor)("textLite")),ke=(0,h.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"],Ce=(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,h=e.isSinglePicker,v=e.noDateSelected,b=(0,a.Z)(e,xe),y=(0,ue.I)(),w=(0,i.useMemo)((function(){if(v)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,v]),E=(0,o.Z)(w,3),k=E[0],x=E[1],C=E[2],O=(0,i.useMemo)((function(){return v?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&&he.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})}(k,x),{withTime:!p})}),[u,k,x,v]);return i.createElement(ke,{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),h&&v?i.createElement(ve,null):i.createElement(be,{isPlaying:u,endDate:x,startDate:k,isSameDate:C,color:m,onlyDates:p}),!p&&!h&&!v&&i.createElement(ye,{isPlaying:u,duration:O,color:m,fluid:f})))})),Oe=Ce,Se=n(95248),Ze=(n(32023),n(89211)),Pe=n(67622),Ie=n(37689),je=n(92517),De=(0,h.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"})([""]),Te=(0,h.default)(d.Flex).attrs({column:!0,padding:[2,0,0],overflow:{vertical:"auto"},height:{max:"320px"}}).withConfig({displayName:"container__Container",componentId:"sc-1gtygg6-0"})([""]),Ne=(0,h.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:Ne,"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],h=(0,i.useRef)(),v=(0,i.useRef)();(0,i.useEffect)((function(){v.current&&p&&v.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:h,Wrapper:Ne,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"})),h.current&&p&&i.createElement(De,{onClickOutside:y,onEsc:y,ref:r,target:h.current},i.createElement(d.Box,{padding:[0,2]},i.createElement(Ie.Z,{value:u,onChange:E,ref:v,"data-ga":"timezone-picker::click-search::global-view"})),i.createElement(Te,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,h=void 0===g?{}:g,v=h.start,y=h.end,w=h.singleDate,E=e.defaultValue,k=void 0===E?-900:E,x=e.tagging,C=void 0===x?"":x,S=e.isPlaying,Z=e.onlyDates,P=e.accessorProps,I=void 0===P?{}:P,j=e.maxDate,D=e.minDate,T=e.accessorTooltipContent,N=(0,a.Z)(e,Re),_=(0,i.useState)(w),F=(0,o.Z)(_,2),M=F[0],A=F[1],L=(0,i.useState)(v),B=(0,o.Z)(L,2),R=B[0],z=B[1],U=(0,i.useState)(v),H=(0,o.Z)(U,2),G=H[0],Y=H[1],q=(0,p.Z)("resolution","minutes"),K=(0,o.Z)(q,2),$=K[0],X=K[1],Q=(0,i.useState)("startDate"),ee=(0,o.Z)(Q,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),he=(0,o.Z)(ge,2),ve=he[0],be=he[1],ye=(0,i.useState)(null),we=(0,o.Z)(ye,2),Ee=we[0],ke=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,ve,Ee,se.current]),(0,c.Z)((function(){xe(!!ae)}),[ae]);var Ce=(0,i.useCallback)((function(e){var t=e.startDate,n=e.endDate;z(t),Y(n)}),[]);(0,i.useEffect)((function(){Ce({startDate:v,endDate:y})}),[v,y]);var Se=(0,i.useCallback)((function(){n?(A(w),ue()):Ce({startDate:k,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:G}),xe(!1)),ue()},je=(0,i.useMemo)((function(){return function(e){return V[e]}(te)}),[te]),De=!!n||null!==R&&null!==G&&R!==G,Te=!n&&(R===v&&G===y),Ne=(0,i.useMemo)((function(){return k}),[]),_e=R===Ne,Fe=(0,i.useCallback)((function(e,t){X(t),Ce({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",C,String(a));else{Ce(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",C,String(i))}},ze=(0,i.useMemo)((function(){return se.current&&ae?i.createElement(O,{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"},N),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(W,{handleTimePeriodChange:Fe,selectedDate:R,tagging:C}),i.createElement(J,{handleTimePeriodChange:Fe,customTimePeriodRef:pe,resolution:$,tagging:C,value:R})),i.createElement(ce,{startDate:R,endDate:G,singleDate:M,setStartDate:z,setEndDate:Y,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:ke}),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:G,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(C,"-").concat(je),"data-testid":"datePicker-clear",small:!0}),i.createElement(d.Button,{label:"Apply",onClick:Ie,disabled:!De||Te,"data-ga":"date-picker::click-apply::".concat(C,"-").concat(je),"data-testid":"datePicker-apply",small:!0})))))):null}),[R,C,$,G,De,_e,je,Te,M,ae]);return i.createElement(i.Fragment,null,i.createElement(Oe,(0,r.Z)({onClick:Pe,tagging:C,isPickerOpen:ae,isPlaying:S,setRangeValues:t,start:n?M:v,end:n?M:y,ref:se,onlyDates:Z,tooltipContent:T,isSinglePicker:n,noDateSelected:n&&!M},I)),ze)}},2379:function(e,t,n){n.d(t,{I:function(){return o},o:function(){return a}});var r=n(89250),o=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"),o=(0,r.bS)("/spaces/:spaceSlug/rooms/:roomSlug/functions");return e||t||n||o},a=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 v}});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"):""},h=function(e){return(e=p(e))?(0,i.default)(e,"HH:mm"):""},v=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))}:h}),[t]),utcOffset:n}}},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(15557),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},45916:function(e,t,n){var r=n(67294),o=n(15557),a=n(82351);t.Z=function(e){var t=e.children,n=e.background,i=e.testId,c=e.onClose,l=i||"header-banner";return r.createElement(o.Flex,{background:n,"data-testid":l,height:{min:10},padding:[2,10,2,2],position:"sticky",zIndex:5},t,r.createElement(a.Z,{align:"bottom",content:"Dismiss message",isBasic:!0,plain:!0,stretch:"align"},c&&r.createElement(o.Box,{"data-testid":"".concat(l,"-close-button"),as:o.Icon,color:"separator",cursor:"pointer",name:"x",position:"absolute",right:"8px",onClick:function(e){c&&(e.stopPropagation(),c())}})))}},27644:function(e,t,n){var r=n(87462),o=n(29439),a=(n(21249),n(57640),n(9924),n(47941),n(92222),n(67294)),i=n(52428),c=n(16931),l=n(15557),u=function(e){var t=e.gaPrefix,n=e.isNightly,u=e.os,s=e.rooms,d=e.tokens,m=(0,a.useState)(0),f=(0,o.Z)(m,2),p=f[0],g=f[1],h=(0,i.iE)(n,u,s,d,s),v=Object.keys(h),b=h[v[p]],y="".concat(v[p],"-claimTerminalCommand");return a.createElement(l.Flex,{column:!0},function(e){var t=e.selectedTab,n=e.setSelectedTab,r=e.configKeys,o=e.configModes;return a.createElement(l.Tabs,{selected:t,onChange:n},r.map((function(e){return a.createElement(l.Tab,{key:e,label:o[e].label})})))}({selectedTab:p,setSelectedTab:g,configKeys:v,configModes:h}),a.createElement(c.i0,{"data-testid":y,onClick:(0,i.JG)(b.command,{text:"Config copied to your clipboard."})},b.command,a.createElement(c.xL,(0,r.Z)({name:"copy",size:"small",color:"primary",onClick:(0,i.JG)(b.command,{text:"Config copied to your clipboard."})},t&&{"data-ga":"".concat(t,"::click-copybash::all-pages::").concat(u,"-config")}))))};t.Z=(0,a.memo)(u)},38346:function(e,t,n){n.d(t,{Z:function(){return j}});var r=n(87462),o=n(29439),a=n(45987),i=(n(21249),n(57640),n(9924),n(47941),n(92222),n(82526),n(41817),n(67294)),c=n(91008),l=n(33582),u=n(74059),s=n(15557),d=n(60677),m=n(16931),f=n(52428),p=(0,d.default)(s.Icon).withConfig({displayName:"copyInfo__StyledIcon",componentId:"sc-fgr5qt-0"})(["display:flex;align-self:center;cursor:pointer;position:absolute;right:16px;"]),g=function(e){var t=e.gaPrefix,n=void 0===t?"claim-nodes":t,r=e.info,o=e.title,a=void 0===o?"Claim token":o,c=e.type,l=void 0===c?"token":c;return i.createElement(s.Flex,{cursor:"pointer","data-testid":"".concat(l,"Copy"),gap:2,onClick:(0,f.JG)(r,{text:"".concat(a," copied to clipboard")}),position:"relative"},i.createElement(m.U8,{"data-testid":"".concat(l,"TextBlock")},r),i.createElement(p,{"data-testid":"".concat(l,"CopyButton"),"data-ga":"".concat(n,"::click-copy-").concat(l,"::allpages"),name:"copy",size:"small",color:"primary",onClick:(0,f.JG)(r,{text:"".concat(a," copied to clipboard")})}))},h=n(27644),v=n(95826),b=n(58477),y=function(e){var t=e.gaPrefix,n=e.isNightly,o=e.os,a=void 0===o?"linux":o,c=e.rooms,l=e.tokens;return i.createElement(i.Fragment,null,i.createElement(s.Flex,{column:!0},i.createElement(v.Z,{os:a,gaPrefix:t}),i.createElement(s.Text,null,"Debian, CentOS, RHEL and more...")),i.createElement(h.Z,{gaPrefix:t,isNightly:n,os:a,rooms:c,tokens:l}),i.createElement(b.Z,(0,r.Z)({os:a},t&&{"data-ga":"".concat(t,"::click-read-documentation::allpages}")})))},w=function(e){var t=e.gaPrefix,n=e.isNightly,o=e.os,a=void 0===o?"docker":o,c=e.rooms,l=e.tokens;return i.createElement(i.Fragment,null,i.createElement(v.Z,{os:a,gaPrefix:t}),i.createElement(h.Z,{gaPrefix:t,isNightly:n,os:a,rooms:c,tokens:l}),i.createElement(b.Z,(0,r.Z)({os:a},t&&{"data-ga":"".concat(t,"::click-read-documentation::allpages}")})))},E=(0,i.memo)(w),k=function(e){var t=e.dataTransferTool,n=void 0===t?"":t,o=e.gaPrefix,a=e.isNightly,c=e.os,l=e.rooms,u=e.testIdPrefix,s=e.tokens,d=n?(0,f.NS)(s,a,c,l)[n]:(0,f.NS)(s,a,c,l);return i.createElement(m.i0,{"data-testid":"".concat(u,"-claimTerminalCommand"),onClick:(0,f.JG)(d)},d,i.createElement(m.xL,(0,r.Z)({name:"copy",size:"small",color:"primary",onClick:(0,f.JG)(d)},o&&{"data-ga":"".concat(o,"::click-copybash::all-pages::").concat(c)})))},x=(0,i.memo)(k),C=[{label:"linux",testId:"claimingNodes-linux-button",dataGa:"::click-os::allpages::linux",Component:y},{label:"docker",testId:"claimingNodes-docker-button",dataGa:"::click-os::allpages::docker",Component:E},{label:"mac OS",testId:"claimingNodes-macOs-button",dataGa:"::click-os::allpages::macos",Component:function(e){var t=e.gaPrefix,n=e.isNightly,o=e.os,a=void 0===o?"macos":o,c=e.rooms,l=e.tokens;return i.createElement(i.Fragment,null,i.createElement(v.Z,{os:a,gaPrefix:t}),i.createElement(x,{gaPrefix:t,isNightly:n,os:a,rooms:c,testIdPrefix:"macos",tokens:l}),i.createElement(b.Z,(0,r.Z)({os:a},t&&{"data-ga":"".concat(t,"::click-read-documentation::allpages}")})))}},{label:"kubernetes",testId:"claimingNodes-kubernetes-button",dataGa:"::click-os::allpages::kubernetes",Component:n(39653).Z}],O={Community:"nightly",default:"stable",EarlyBird:"nightly"},S={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"}},Z=function(e){var t=e.label;return t?i.createElement(i.Fragment,null,i.createElement(s.Icon,{name:"code",size:"small"}),i.createElement(s.TextNano,{strong:!0,textTransform:"uppercase"},t)):null},P=(0,i.memo)(Z),I=["margin","rooms","spaceId","gaPrefix"],j=function(e){var t=e.margin,n=void 0===t?[0]:t,d=e.rooms,f=e.spaceId,p=e.gaPrefix,h=(0,a.Z)(e,I),v=(0,l.Z)(f),b=(0,u.OS)("plan"),y=(0,i.useState)(0),w=(0,o.Z)(y,2),E=w[0],k=w[1],x=(0,i.useState)(O[b]||O.default),Z=(0,o.Z)(x,2),j=Z[0],D=Z[1],T=null!==d&&void 0!==d&&d.length?d.join(","):"",N=function(e){return D(e.target.value)};return i.createElement(s.Flex,{column:!0,gap:2,margin:n,width:"100%"},i.createElement(s.Flex,{column:!0,gap:4},i.createElement(s.Flex,{column:!0,gap:1},i.createElement(c.Z,{Component:m.un,"data-testid":"version-title",href:"https://learn.netdata.cloud/docs/getting-started/install-netdata#nightly-vs-stable-releases",padding:[0,0,0,1],rel:"noopener noreferrer",target:"_blank"},i.createElement(s.H5,{"data-testid":"version-title-text"},"Updates channel"),i.createElement(s.Icon,{color:"text","data-testid":"version-title-icon",name:"goToNode",width:"18px",height:"18px"})),Object.keys(S).map((function(e){return i.createElement(m.EU,{alignItems:"start",checked:j===e,"data-ga":"".concat(p||"claim-nodes","::click-").concat(e,"-version::allpages"),"data-testid":"".concat(e,"VersionOption"),key:e,onChange:N,value:e},i.createElement(s.Flex,{column:!0},i.createElement(s.Text,null,S[e].title),i.createElement(s.TextSmall,{color:"textLite"},S[e].description)))}))),i.createElement(s.Tabs,(0,r.Z)({selected:E,onChange:k,TabContent:m.m7,tabsProps:{gap:1,margin:[0,0,4,0]}},h),C.map((function(e){var t=e.label,n=e.testId,o=e.dataGa,a=e.Component;return i.createElement(s.Tab,(0,r.Z)({as:m.Sn},p&&{"data-ga":"".concat(p).concat(o)},{"data-testid":n,key:t,label:i.createElement(P,{label:t})}),i.createElement(a,{gaPrefix:p,rooms:d,tokens:v,isNightly:"nightly"===j}))})))),(null===v||void 0===v?void 0:v.length)&&i.createElement(s.Flex,{column:!0,gap:1},i.createElement(s.Text,null,"Claim token"),i.createElement(g,{info:v[0].token})),T&&i.createElement(s.Flex,{column:!0,gap:1},i.createElement(s.Text,null,"Room IDs"),i.createElement(g,{info:T,title:"Room IDs",type:"rooms"})))}},58477:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(91008),c=n(52428),l=["os"],u=function(e){var t=e.os,n=(0,o.Z)(e,l);return a.createElement(i.Z,(0,r.Z)({href:c.f0[t],target:"_blank",rel:"noopener noreferrer",padding:[0,0,0,1]},n),"Check out documentation")};t.Z=(0,a.memo)(u)},39653:function(e,t,n){var r=n(87462),o=n(67294),a=n(15557),i=n(95826),c=n(27644),l=n(58477),u=function(){return o.createElement(a.Text,null,"For a new installation use helm install or for existing clusters add what we provide to your",o.createElement(a.Text,{color:"textLite",margin:[0,1.5]},"override.yaml"),"and then run",o.createElement(a.Text,{color:"textLite",margin:[0,0,0,1.5]},"helm upgrade -f override.yml netdata netdata/netdata"))};t.Z=function(e){var t=e.gaPrefix,n=e.isNightly,a=e.os,s=void 0===a?"kubernetes":a,d=e.rooms,m=e.tokens;return o.createElement(o.Fragment,null,o.createElement(i.Z,{os:s,gaPrefix:t}),o.createElement(u,null),o.createElement(c.Z,{isNightly:n,rooms:d,tokens:m,os:s,gaPrefix:t}),o.createElement(l.Z,(0,r.Z)({os:s},t&&{"data-ga":"".concat(t,"::click-read-documentation::allpages}")})))}},16931:function(e,t,n){n.d(t,{EU:function(){return d},Sn:function(){return s},U8:function(){return i},i0:function(){return c},m7:function(){return u},un:function(){return m},xL:function(){return l}});var r=n(67294),o=n(60677),a=n(15557),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=o.default.div.withConfig({displayName:"styled__StyledTerminalCommand",componentId:"sc-1lice8m-1"})(["display:flex;flex-direction:column;color:",";background:",";border:1px solid ",';border-radius:4px;cursor:pointer;overflow-wrap:anywhere;white-space:pre-wrap;padding:24px 24px 18px;width:100%;font-family:"Courier New",Courier,monospace;letter-spacing:0.09px;line-height:18px;font-size:14px;word-break:break-word;'],(0,a.getColor)("textDescription"),(0,a.getColor)("modalTabsBackground"),(0,a.getColor)("borderSecondary")),l=(0,o.default)(a.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1lice8m-2"})(["display:flex;align-self:flex-end;cursor:pointer;"]),u=function(e){var t=e.children;return r.createElement(a.Flex,{column:!0,gap:4},t)},s=((0,o.default)(a.Flex).attrs({margin:[4,0]}).withConfig({displayName:"styled__StyledFlex",componentId:"sc-1lice8m-3"})(["nav{border:none;gap:",";padding:0;}"],(0,a.getSizeBy)(1)),(0,o.default)(a.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-1lice8m-4"})(["&&{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})}))),d=(0,o.default)(a.RadioButton).withConfig({displayName:"styled__RadioButton",componentId:"sc-1lice8m-5"})(["&&{align-items:baseline !important;color:red;}"]),m=(0,o.default)(a.Flex).attrs({color:"text",gap:.5}).withConfig({displayName:"styled__VersionTitle",componentId:"sc-1lice8m-6"})(["h5{color:inherit;}"])},95826:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=n(52428),l=["os"],u=function(e){var t=e.os,n=(0,o.Z)(e,l);return a.createElement(i.Text,(0,r.Z)({"data-testid":"command-disclaimer",strong:!0},n),"function"===typeof c.d[t]?c.d[t]():c.d[t])};t.Z=(0,a.memo)(u)},52428:function(e,t,n){n.d(t,{JG:function(){return C},NS:function(){return v},d:function(){return b},f0:function(){return y},iE:function(){return x}});var r=n(4942),o=n(29439),a=(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)),i=n(15557),c=n(58206),l=n(52631),u=n(74855),s=n(91008);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=function(e){var t=e.isNightly,n=e.rooms,r=e.token,o=e.url;return{curl:"curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --".concat(t?"nightly":"stable","-channel --claim-token ").concat(r).concat(n?" --claim-rooms ".concat(n):""," --claim-url ").concat(o),wget:"wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --".concat(t?"nightly":"stable","-channel --claim-token ").concat(r).concat(n?" --claim-rooms ".concat(n):""," --claim-url ").concat(o)}},p=function(e){var t=e.isNightly,n=e.rooms,r=e.token;return"helm install netdata netdata/netdata \\\n --set image.tag=".concat(t?"latest":"stable",' \\\n --set parent.claiming.enabled="true" \\\n --set parent.claiming.token=').concat(r," \\")+"".concat(n&&"\n --set parent.claiming.rooms=".concat(n," \\"),'\n --set child.claiming.enabled="true" \\\n --set child.claiming.token=').concat(r)+"".concat(n&&" \\\n --set child.claiming.rooms=".concat(n))},g=function(e){var t=e.isNightly,n=e.rooms,r=e.token,o=e.url;return"docker run -d --name=netdata \\\n --pid=host \\\n --network=host \\\n -v netdataconfig:/etc/netdata \\\n -v netdatalib:/var/lib/netdata \\\n -v netdatacache:/var/cache/netdata \\\n -v /etc/passwd:/host/etc/passwd:ro \\\n -v /etc/group:/host/etc/group:ro \\\n -v /proc:/host/proc:ro \\\n -v /sys:/host/sys:ro \\\n -v /etc/os-release:/host/etc/os-release:ro \\\n -v /var/run/docker.sock:/var/run/docker.sock:ro \\\n --restart unless-stopped \\\n --cap-add SYS_PTRACE \\\n --cap-add SYS_ADMIN \\\n --security-opt apparmor=unconfined \\\n -e NETDATA_CLAIM_TOKEN=".concat(r," \\\n -e NETDATA_CLAIM_URL=").concat(o," \\")+"".concat(n&&"\n -e NETDATA_CLAIM_ROOMS=".concat(n," \\"),"\n netdata/netdata:").concat(t?"edge":"stable")},h={linux:f,docker:g,macos:function(e){var t=e.isNightly,n=e.rooms,r=e.token,o=e.url;return"curl https://my-netdata.io/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --".concat(t?"nightly":"stable","-channel --claim-token ").concat(r).concat(n?" --claim-rooms ".concat(n):""," --claim-url ").concat(o)},kubernetes:p,windows:function(e){var t=e.rooms,n=e.token,r=e.url;return"msiexec.exe /i netdata.msi TOKEN=".concat(n," ").concat(t?"ROOMS="+t:""," URL=").concat(r)}},v=function(e,t,n,r){if(null===e||void 0===e||!e.length)return"Loading tokens...";var a=(0,o.Z)(e,1)[0].token,i=null!==r&&void 0!==r&&r.length?r.join(","):"",c=window.envSettings.apiUrl;return h[n]({isNightly:t,rooms:i,token:a,url:c})},b={linux:"Run the script below on your node's terminal",windows:function(){return a.createElement(i.Flex,{column:!0,gap:3},a.createElement(i.Text,{strong:!0},"Install Netdata on Windows"),a.createElement(i.Box,{sx:{listStyleType:"circle"},column:!0,as:"ul",padding:[3.5],gap:1},a.createElement(i.Box,{as:"li"},a.createElement(i.Text,null,"Download the latest"," ",a.createElement(s.Z,{href:"https://github.com/netdata/msi-installer",rel:"noopener noreferrer",strong:!0,target:"_blank"},"netdata.msi"))),a.createElement(i.Box,{as:"li"},a.createElement(i.Text,null,"From an admin terminal, run the below command in the same location as the downloaded file:"))))},docker:function(){return a.createElement(i.Flex,{column:!0,gap:2},a.createElement(i.Text,null,"Install and connect new Docker containers")," ",a.createElement(i.Text,null,"Find the commands for ",a.createElement(i.Text,{code:!0},"docker run"),", ",a.createElement(i.Text,{code:!0},"docker compose")," or Docker Swarm. On the last two you can copy the configs, then run"," ",a.createElement(i.Text,{code:!0},"docker-compose up -d")," in the same directory as the"," ",a.createElement(i.Text,{code:!0},"docker-compose.yml")),a.createElement(i.Flex,{background:"modalBackground",padding:[3],column:!0,gap:2},a.createElement(i.Box,null,a.createElement(i.Text,null,"Netdata container requires different privileges and mounts to provide functionality similar to that provided by Netdata installed on the host. More info"," ",a.createElement(s.Z,{href:"https://learn.netdata.cloud/docs/installing/docker#create-a-new-netdata-agent-container",target:"_blank",whiteSpace:"nowrap"},"here"))),a.createElement(i.Box,null,a.createElement(i.Text,null,"Netdata will use the hostname from the container in which it is run instead of that of the host system. To change the default hostname check"," ",a.createElement(s.Z,{href:"https://learn.netdata.cloud/docs/agent/packaging/docker#change-the-default-hostname",target:"_blank",whiteSpace:"nowrap"},"here")))))},macos:"Run the script below on your OSX, macOS server",kubernetes:"Use helm install to install Netdata on your Kubernetes cluster"},y={windows:"https://learn.netdata.cloud/docs/agent/collectors/go.d.plugin/modules/wmi",linux:"https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-linux",docker:"https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-docker",macos:"https://learn.netdata.cloud/docs/agent/claim#connect-an-agent-running-in-macos",kubernetes:"https://learn.netdata.cloud/docs/agent/packaging/installer/methods/kubernetes#connect-your-kubernetes-cluster-to-netdata-cloud"},w=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.envSettings.apiUrl;return{dockerCli:{command:g({isNightly:e,rooms:t,token:n,url:r}),label:"Docker CLI"},compose:{label:"Docker Compose",command:"version: '3'\nservices:\n netdata:\n image: netdata/netdata:".concat(e?"edge":"stable","\n container_name: netdata\n pid: host\n network_mode: host\n restart: unless-stopped\n cap_add:\n - SYS_PTRACE\n - SYS_ADMIN\n security_opt:\n - apparmor:unconfined\n volumes:\n - netdataconfig:/etc/netdata\n - netdatalib:/var/lib/netdata\n - netdatacache:/var/cache/netdata\n - /etc/passwd:/host/etc/passwd:ro\n - /etc/group:/host/etc/group:ro\n - /proc:/host/proc:ro\n - /sys:/host/sys:ro\n - /etc/os-release:/host/etc/os-release:ro\n - /var/run/docker.sock:/var/run/docker.sock:ro\n environment:\n - NETDATA_CLAIM_TOKEN=").concat(n,"\n - NETDATA_CLAIM_URL=").concat(r,"\n - NETDATA_CLAIM_ROOMS=").concat(t,"\n\nvolumes:\n netdataconfig:\n netdatalib:\n netdatacache:")},swarm:{label:"Docker Swarm",command:"version: '3'\nservices:\n netdata:\n image: netdata/netdata:".concat(e?"edge":"stable","\n container_name: netdata\n ports:\n - 19999:19999\n restart: unless-stopped\n cap_add:\n - SYS_PTRACE\n security_opt:\n - apparmor:unconfined\n volumes:\n - netdataconfig:/etc/netdata\n - netdatalib:/var/lib/netdata\n - netdatacache:/var/cache/netdata\n - /etc/passwd:/host/etc/passwd:ro\n - /etc/group:/host/etc/group:ro\n - /proc:/host/proc:ro\n - /sys:/host/sys:ro\n - /etc/os-release:/host/etc/os-release:ro\n - /etc/hostname:/etc/hostname:ro\n environment:\n - NETDATA_CLAIM_TOKEN=").concat(n,"\n - NETDATA_CLAIM_URL=").concat(r,"\n - NETDATA_CLAIM_ROOMS=").concat(t,"\n deploy:\n mode: global\n\nvolumes:\n netdataconfig:\n netdatalib:\n netdatacache:")}}},E=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window.envSettings.apiUrl;return{wget:{command:f({isNightly:e,rooms:t,token:n,url:r}).wget,label:"wget"},curl:{command:f({isNightly:e,rooms:t,token:n,url:r}).curl,label:"curl"}}},k=function(e,t,n){return{helm:{command:p({isNightly:e,rooms:t,token:n}),label:"Helm"},existingCluster:{label:"Existing cluster",command:"image:\n tag: ".concat(e?"latest":"stable","\n ").concat(e?"\nrestarter:\n enabled: true\n ":"","\nparent:\n claiming:\n enabled: true\n token: ").concat(n,"\n rooms: ").concat(t,"\n \nchild:\n claiming:\n enabled: true\n token: ").concat(n,"\n rooms: ").concat(t)}}},x=function(e,t,n,r){if(null===r||void 0===r||!r.length)return"Loading tokens...";var a=(0,o.Z)(r,1)[0].token,i=null!==n&&void 0!==n&&n.length?n.join(","):"";return{docker:w(e,i,a),linux:E(e,i,a),kubernetes:k(e,i,a)}[t]},C=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,c.Z)(e);var n=(0,u.sc)(m(m({header:"Copied",text:"Command copied to your clipboard! Please run it on your node's terminal.",icon:"gear"},t),{},{success:!0}));l.Z.success(n,{context:"copy"})}}},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(60677),o=n(67294),a=n(15557),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,h=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:h},r))}));t.Z=c},27261:function(e,t,n){var r=n(15557),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,null,o.createElement(r.Box,{margin:[0,1,0,0]},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(15557);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:"primary",indicatorWrapperColor:"primary",counterColor:"bright"},stale:{statusTextColor:["green","vista"],indicatorWrapperColor:["green","vista"],counterColor:"bright"},offline:{statusTextColor:"textLite",indicatorWrapperColor:"textLite",counterColor:"bright"},unseen:{statusTextColor:"textLite",indicatorWrapperColor:["yellow","seaBuckthorn"],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(60677),a=n(15557),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},23442:function(e,t,n){n.r(t),n.d(t,{default:function(){return Je}});n(66992),n(41539),n(88674),n(78783),n(33948);var r=n(67294),o=n(2145),a=n(15557),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),h=n(37931),v=n(67622),b=n(61458),y=n(37518),w=n(60677),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"})([""]),k=(0,w.default)(a.H6).attrs({color:"border",padding:[2,4]}).withConfig({displayName:"styled__OtherRoomsHeader",componentId:"sc-1vwntsm-1"})([""]),x=n(82351),C=n(93033),O=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,C.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(v.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(O.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:k},r.createElement(a.Flex,{onClick:i,column:!0,height:{max:100},overflow:{vertical:"auto"}},r.createElement(h.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))},T=n(91008),N=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(T.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}),U=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}},V=[{id:"updateSeverity",desc:!1}],H=function(){var e=U().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:V,rowActions:t,columns:B,disableClickRow:function(e){var t=e.data;return!t.isLive&&"stale"!==t.state}}},G=n(18129),W={updateSeverity:!0,connectionToCloud:!1},Y=function(e){var t=e.data,n=H(),o=n.rowActions,a=n.onClickRow,i=n.disableClickRow,c=n.sortBy;return r.createElement(N.Z,{"data-testid":"nodesTable-layout",overflow:"hidden",height:"100%"},r.createElement(G.Z,{customSortBy:c,customNodes:t,showdDefaultRowActions:!1,showDefaultBulkActions:!1,columnVisibility:W,customRowActions:o,enableSelection:!1,onClickRow:a,disableClickRow:i}))},J=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,null,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 Cloud")}),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(T.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(Y,{data:o})))))},q=n(48286),K=n(91128),$=n(2379),X=n(54576),Q=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","netdata"]:["neutral","ratsbane"],n?.3:1):(0,a.getRgbColor)(n?["green","frostee"]:["neutral","porcelain"]))({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":"border",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(v.Z,{icon:"playOutline",onClick:function(){d(),u()},testid:"playOptions-play"},"Play"),r.createElement(v.Z,{icon:"pauseOutline",onClick:function(){m(),u()},testid:"playOptions-pause"},"Pause"),r.createElement(v.Z,{icon:"forcePlayOutline",onClick:function(){f(),u()},testid:"playOptions-forcePlay"},"Force Play")))},me=(0,r.memo)(de),fe=(0,X.withChartProvider)((function(){var e=(0,$.I)(),t=(0,$.o)(),n=(0,r.useRef)(),o=(0,X.useAttributeValue)("autofetch"),a=!(0,X.useAttributeValue)("paused")&&o&&!t,i=(0,X.useAttributeValue)("autofetchOnWindowBlur"),c=(0,K.Z)();return(0,q.Z)((function(){c(!!e||!!t)}),[e,t]),r.createElement(re.Z,{hasBorder:!0,borderColor:"borderSecondary",testId:"global-controls"},r.createElement(oe,{isPlaying:a,padding:[2,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,Q.e)().getRoot();return r.createElement(fe,{chart:e})},ge=n(96929),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"})))},ve=function(){var e=(0,ge.zN)().length>0;return r.createElement(a.News,{app:"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}))}))},be=n(4514),ye=n(13710),we=n(45916),Ee=n(62200),ke={warning:{background:"warningBackground",isDissmissable:!0,icon:"warning_triangle_hollow",iconColor:"warning"},critical:{background:"errorBackground",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:"panel"},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:"panel"},"Please update them")," ","to ensure you get the latest security bug fixes."))},Ce=function(e){var t=e.warningLevel,n=e.numberOfNodesWithCriticalSeverity,o=e.onClose,a=e.onClickUpdate,i=ke[t],c=i.background,l=i.isDissmissable,u=i.icon,s=i.iconColor;return r.createElement(we.Z,{background:c,onClose:l?o:null},r.createElement(xe,{iconColor:s,icon:u,warningLevel:t,numberOfNodesWithCriticalSeverity:n,onClickUpdate:a}))},Oe=function(){var e=U().openModal,t=(0,Z.Ng)({severity:"critical"}).length;return t?r.createElement(Ce,{numberOfNodesWithCriticalSeverity:t,warningLevel:"critical",onClickUpdate:e}):r.createElement(r.Fragment,null)},Se=function(){var e=(0,Z.Ng)({severity:"critical"}).length;return r.createElement(r.Fragment,null,!e&&r.createElement(ye.Z,null),r.createElement(Oe,null))},Ze=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",onClick:t,size:"small"},o)):null},Pe=n(83356),Ie=function(){var e=(0,i.Iy)("isAnonymous"),t=(0,Pe.Z)();return e?r.createElement(a.Button,{label:"Sign In",margin:[0,1,0,0],padding:[2,4],onClick:t}):null},je=(0,o.Z)((function(){return Promise.all([n.e(367),n.e(714)]).then(n.bind(n,40644))}),"NodesIndicator"),De=function(){var e=U(),t=e.isModalVisible,n=e.closeModal,o=e.openModal;return r.createElement(r.Fragment,null,r.createElement(Se,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(J,{onClose:n}),r.createElement(S,null),r.createElement(a.Flex,{alignItems:"center","data-testid":"header-features",gap:3},r.createElement(ve,null),r.createElement(pe,null),r.createElement(r.Suspense,{fallback:r.createElement(be.c,{disabled:!0})},r.createElement(je,null)),r.createElement(Ie,null),r.createElement(Ze,{onOpenModalClick:o}))))},Te=n(15257),Ne=(0,w.default)(a.Flex).withConfig({displayName:"layout__UserControlContainer",componentId:"sc-18en99b-0"})(["bottom:0;left:0;"]),_e=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(Ne,{position:"absolute",padding:[4]},r.createElement(Te.Z,null)))},Fe=(0,w.keyframes)(["from{opacity:0.4;}to{opacity:1;}"]),Me=(0,w.default)(a.Icon).withConfig({displayName:"loading__StyledIcon",componentId:"sc-11p1wp-0"})(["width:208px;height:177px;animation:"," 1.6s ease-in infinite;"],Fe),Ae=function(){return r.createElement(r.Fragment,null,r.createElement(Me,{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!"))},Le=n(83732),Be=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,Le.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}))},Re=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(_e,null,n?r.createElement(Ae,null):r.createElement(Be,null))},ze=n(78710),Ue=n(27622),Ve=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"}))},He=(0,o.Z)((function(){return n.e(296).then(n.bind(n,88296))}),"Sidebar"),Ge=(0,o.Z)((function(){return Promise.all([n.e(440),n.e(969)]).then(n.bind(n,65969))}),"Modals"),We=(0,o.Z)((function(){return n.e(102).then(n.bind(n,48102))}),"AcceptTermsDialog"),Ye=(0,o.Z)((function(){return Promise.all([n.e(193),n.e(663),n.e(367),n.e(380)]).then(n.bind(n,98478))}),"SpacePages"),Je=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(d.SX,{id:n,permissions: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,s.Iw)(),o=(0,s.GM)("loaded"),p=(0,s.GM)("error"),g=(0,i.Iy)("isAnonymous");if(!t||!p&&!g&&!o)return r.createElement(f.Z,{title:"Loading your space..."});var h=n.length;if(p&&!h)throw p;return ze.ZP||g||h?r.createElement(a.Flex,{overflow:"hidden",height:"100vh",width:"100vw"},r.createElement(r.Suspense,{fallback:r.createElement(Ve,null)},r.createElement(He,null)),r.createElement(a.Flex,{column:!0,position:"relative",overflow:"hidden",flex:!0},r.createElement(De,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(Ye,null)))),r.createElement(r.Suspense,{fallback:""},r.createElement(Ge,null),r.createElement(We,null))):r.createElement(Re,null)}},27622:function(e,t,n){var r=n(87462),o=n(67294),a=n(15557);t.Z=function(e){return o.createElement(a.Icon,(0,r.Z)({name:"netdataPress",color:"success",height:"32px",width:"32px"},e))}},67622:function(e,t,n){n.d(t,{z:function(){return d}});var r=n(87462),o=n(45987),a=n(67294),i=n(60677),c=n(15557),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=function(e){return e?"selected":"borderSecondary"},d=(0,i.default)(c.Flex).withConfig({displayName:"item__PanelRowContainer",componentId:"sc-lf007z-0"})(["cursor:pointer;&:hover{background:",";}",""],(function(e){return(0,c.getColor)(s(e.isSidebar))(e)}),(function(e){return e.selected&&"background: ".concat((0,c.getColor)(s(e.isSidebar))(e),";")})),m=(0,i.default)(c.Icon).withConfig({displayName:"item__StyledIcon",componentId:"sc-lf007z-1"})(["flex:0 0 auto;"]),f=(0,i.default)(c.IconComponents.LoaderIcon).withConfig({displayName:"item__StyledLoaderIcon",componentId:"sc-lf007z-2"})(["flex:0 0 auto;height:16px;width:16px;"]),p=(0,a.forwardRef)((function(e,t){var n=e.disabled,i=e.children,s=e.Wrapper,p=void 0===s?c.Text:s,g=e.textProps,h=e.to,v=void 0===h?"":h,b=e.onClick,y=e.testid,w=e.icon,E=e.iconHeight,k=void 0===E?"16px":E,x=e.iconWidth,C=void 0===x?"16px":x,O=e.iconColor,S=void 0===O?"text":O,Z=e.textColor,P=void 0===Z?"text":Z,I=e.padding,j=void 0===I?[2,4]:I,D=e.margin,T=void 0===D?[0]:D,N=e.round,_=void 0===N?0:N,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,U=e.isSidebar,V=void 0!==U&&U,H=e.isSecondary,G=(0,o.Z)(e,u),W=(0,l.s0)(),Y=(0,a.useCallback)((function(){n||(b&&b(),v&&W(v))}),[b,n,v]),J=G["data-ga"]||"";return a.createElement(d,(0,r.Z)({ref:t,flexWrap:!1,justifyContent:"between",alignItems:"center",padding:j,margin:T,round:_,onClick:Y,"data-testid":y,width:z,selected:L,disabled:n,isSidebar:V},J&&{"data-ga":J}),a.createElement(c.Flex,{alignItems:"center",gap:M,flex:!0,basis:""},B?a.createElement(f,null):"string"===typeof w?a.createElement(m,{name:w,disabled:n,color:S,height:k,width:C}):w,a.createElement(p,(0,r.Z)({opacity:n?"medium":void 0,width:"150px",color:P,italic:H},g),i)),A)}));t.Z=p},61458:function(e,t,n){n.d(t,{g:function(){return u}});var r=n(87462),o=n(45987),a=n(67294),i=n(60677),c=n(15557),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))}},13710:function(e,t,n){var r=n(29439),o=(n(26699),n(32023),n(67294)),a=n(37518),i=n(96929),c=n(45916),l=n(15557),u=n(5795),s=n(46667),d=n(89250),m=n(53338),f=n(33335);t.Z=function(){var e=(0,a.UL)(),t=(0,i.X7)(e,"ids"),n=(0,s.Z)(),p=(0,r.Z)(n,4),g=p[0],h=p[2],v=p[3],b=(0,i.X7)(e,"loaded"),y=(0,d.TH)().pathname,w=(0,f.gI)("node:Create"),E=(0,a.vf)(),k=y.includes("/overview")||y.includes("/nodes")&&!y.includes("/nodes/"),x=0===t.length?"You have no nodes. To unleash the full power of Netdata please add":"You only have one node! To unleash the full power of Netdata please add",C=t.length<2,O=b&&!t.length;return C&&b&&(k||O)&&w&&E===m.i_?o.createElement(c.Z,{background:"successBackground"},o.createElement(l.Flex,{justifyContent:"center",alignItems:"center",width:"100%",gap:2},o.createElement(l.Icon,{"data-testid":"icon-banner-need-more-nodes",color:"primary",name:"add_node"}),o.createElement(l.Text,{"data-testid":"text-need-more-nodes",color:"panel"},x," ",o.createElement(l.Box,{"data-testid":"open-add-node",onClick:h,as:l.Text,cursor:"pointer",textDecoration:"underline",color:"panel"},"two or more nodes!")),g&&o.createElement(u.Z,{onClose:v,room:e}))):null}},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(15557),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",flavour:"warning",hollow:"warning",reccomendedVersion:l.I3,warningText:"is below the latest stable agent version"},critical:{icon:"warning_triangle_hollow",iconColor:"error",flavour:"error",hollow:"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,h=e.os,v=e.name,b=e.labels,y=e.version,w=(0,a.Z)(e,d),E=f[t],k=E.icon,x=E.flavour,C=E.hollow,O=E.reccomendedVersion,S=E.iconColor,Z=E.warningText,P=(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:h,version:y},b));window.open(e,"_blank","noopener,noreferrer")}),[g,h]),I="".concat(v," ").concat(Z," ").concat(O);return i.createElement(c.Tooltip,{allowHoverOnTooltip:!0,content:i.createElement(p,{message:I,icon:k,iconColor:S,warningLevel:t,handeleNavigateToDocs:P})},i.createElement(c.Pill,(0,r.Z)({icon:k,flavour:x,hollow:C},w),(0,s.fm)(l)))}},11389:function(e,t,n){var r=n(67294),o=n(89050),a=n(62200),i=n(15557);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(15557);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 Cloud"),r.createElement(o.TextMicro,{color:"white"},r.createElement(o.TextMicro,{color:"white",strong:!0},"Stale:")," ","Node is currently offline and not streaming metrics to Cloud. 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 Cloud 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 Cloud, 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(15557),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.children;return(0,r.gI)(t)?n:null}},14428:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),c=n(33335),l=["ifForbidden","permission"],u=(0,a.forwardRef)((function(e,t){var n=e.ifForbidden,u=void 0===n?"disabled":n,s=e.permission,d=(0,o.Z)(e,l),m=(0,c.gI)(s);return"hide"!==u||m?a.createElement(i.Button,(0,r.Z)({ref:t,disabled:"disabled"===u&&!m||d.disabled},d)):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"];t.Z=function(e){var t=e.Component,n=e.ifForbidden,l=void 0===n?"disabled":n,u=e.permission,s=e.children,d=(0,o.Z)(e,c),m=(0,i.gI)(u);return"hide"!==l||m?"function"===typeof s?s(m):t?a.createElement(t,(0,r.Z)({},d,{disabled:"disabled"===l&&!m||d.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(60677),c=n(15557),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(15557),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(60677),a=n(15557),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)("mainBackground"),(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)("mainBackground"),(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:"mainBackground",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:"mainBackground",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(60677),a=n(15557);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(15557),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:"elementBackground",alignItems:"center",padding:[4,6]},n),a.createElement(i.H3,null,t))}},81488:function(e,t,n){var r=n(29439),o=n(67294),a=n(43337),i=n(15557),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(15557),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]),h=(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]),v=(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:h,onChange:v}))}},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(60677)),c=n(67294),l=n(15557),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)(3)),d=n(67622),m=n(31203),f=n(46667),p=n(13477),g=n(1043),h=n(83356),v=(n(88674),n(17727),n(16645)),b=n(7693),y=n(73256),w=n(62289),E={flex:!0},k=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)({}),h=(0,a.Z)(g,2),k=h[0],x=h[1],C=(0,w.Z)(),O=C.handleChangeTab,S=C.activeTabIndex,Z=C.tabsByName,P=C.tabs,I=(0,p.oH)(void 0,{shouldPersist:!0,onSuccess:t}),j=(0,c.useCallback)((function(){u(!0),I(k).finally((function(){return u(!1)}))}),[k]),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(v.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:O,TabContent:v.TZ,TabsHeader:y.G,tabsProps:E},D))},x=n(82351),C=(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);"]),O=n(78710),S=["hasSeparator","name"],Z={"Operational Status":function(){return!0},"Sign In":function(e){return e.isAnonymous},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"),v=(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")}),[]),T=(0,g.UQ)(),N=(0,h.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:N,hasSeparator:!0,testid:"userControl-signOut"},{name:"Sign Out",onClick:T,hasSeparator:!0,testid:"userControl-signOut"}].filter((function(e){return Z[e.name]({isAgent:O.ZP,isAnonymous:v})}))}),[v,O.ZP]);return c.createElement(u.Z,null,c.createElement(x.Z,!v&&{content:"Edit your account settings and manage your notifications",align:"right"},v?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(C,{width:52,background:n,padding:[3]},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(k,{onClose:M}))}},16772:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),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))}},62289:function(e,t,n){n.d(t,{Z:function(){return Qe}});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(15557),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)),h=["value","isValid","setIsValid","onChange","label","validators","fieldMessage"],v="User name cannot exceed ".concat(40," characters"),b=function(e){var t=e.length<=40;return(0,l.f)(t,v)},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,v=e.fieldMessage,y=(0,p.Z)(e,h),w=(0,l.A)([b].concat((0,f.Z)(d))),E=(0,o.useState)(""),k=(0,r.Z)(E,2),x=k[0],C=k[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),C(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:v,error:!n&&x},y))},w=n(16772),E=n(46715),k=n(74059),x=n(94666),C=n(72671),O=n(60677),S=(0,O.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=O.default.div.withConfig({displayName:"styled__AvatarBlock",componentId:"sc-anprf9-1"})(["height:",";display:flex;margin-bottom:",";"],(0,c.getSizeBy)(10),(0,c.getSizeBy)(4)),P=(O.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,O.default)(c.TextSmall).withConfig({displayName:"styled__StyledTextSmall",componentId:"sc-anprf9-3"})(["margin-bottom:",";"],(0,c.getSizeBy)(2)),(0,O.default)(c.TextNano).withConfig({displayName:"styled__StyledTextNano",componentId:"sc-anprf9-4"})(["color:",";"],(0,c.getColor)("textFocus")),O.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=O.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(){},T=(0,C.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 Cloud"),". 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?"))})),N=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],h=m[3],v=(0,o.useState)(!1),b=(0,r.Z)(v,2),C=b[0],O=b[1],P=(0,d.Z)(),N=(0,r.Z)(P,4),_=N[0],F=N[2],M=N[3],A=(0,d.Z)(),L=(0,r.Z)(A,2),B=L[0],R=L[1],z=(0,E.RP)().value,U=(0,k.OS)(),V=1===(0,x.H4)().length,H=(0,i.Iy)("email"),G=(0,i.Iy)("avatarURL");(0,o.useEffect)((function(){h&&t(C)}),[h,C]),(0,o.useEffect)((function(){n({name:f})}),[f]);var W=(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:G||"","data-testid":"userProfile-avatar",width:24,height:24})),o.createElement(y,{"data-testid":"userProfile-username",value:f,label:"Name",onChange:p,isValid:C,setIsValid:O,validators:j,fieldIndicator:g,instantFeedback:"positiveFirst",isDirty:h}),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(),W()},handleDecline:M,message:o.createElement(T,{isLastMember:V,spaceName:U.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),U=(0,O.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,O.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,O.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,O.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 V(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?V(Object(n),!0).forEach((function(t){(0,M.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var G=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),h=g[0],v=g[1],b=(0,L.F)(),y=(0,r.Z)(b,2)[1],w=function(e){return function(t){var n=t.target;v((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(h[u]?"enabled":"disabled"),"data-testid":"".concat(u,"-switch"),checked:h[u],disabled:a,onChange:w(u)})),o.createElement(c.TextSmall,{color:"textLite","data-testid":"".concat(u,"-description")},r))})),o.createElement(U,{alignSelf:"end","data-ga":"".concat(n,"::click-save-preferences::").concat(l),"data-testid":"".concat(m,"-savePreferences"),disabled:(0,z.fY)(h),flavour:"hollow",label:"Save preferences",onClick:function(){var e=[],t={};Object.keys(h).forEach((function(n){var r=h[n]?R.Ci.granted:R.Ci.denied;e.push("".concat(R.Ew[n].eventName,"=").concat(h[n].toString())),(0,z.ej)(n)!==r&&(R.Ew[n].gmtKeys.forEach((function(e){t[e]=r})),h[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]}))},W=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(G,{gaPrefix:"manage-cookies",onClick:t,testPrefix:"manageCookies"}))},Y=n(33937),J=function(){var e=(0,Y.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"})))},q=n(15861),K=n(64687),$=n.n(K),X=(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"})))}),Q=O.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")),ee=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"])}}))},te=function(e){return o.createElement(c.Text,(0,m.Z)({},e,{color:["neutral","bluebayoux"]}))},ne=function(e){return o.createElement(c.Flex,(0,m.Z)({},e,{as:c.Icon,sx:{alignSelf:"flex-end",cursor:"pointer"}}))},re=n(58206),oe=n(55678),ae=n(74855);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}function ce(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,M.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}var le=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(){(0,re.Z)(e);var n=(0,ae.sc)(ce(ce({},ce({header:"Copied",text:"Token copied to your clipboard!",icon:"gear"},t)),{},{success:!0}));oe.Am.success(n,{context:"copy"})}},ue=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(Q,null,o.createElement("span",{"data-testid":"token"},n),o.createElement(ne,{name:"copy",size:"small",color:"primary",onClick:le(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(ee,{"data-testid":"noNodesView-warningBannerIcon",name:"exclamation",color:"warning"}),o.createElement(te,{"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})))},se=n(26398),de=function(e){return se.Z.post("/api/v1/auth/account/api-token",{description:e})},me=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],h=function(){var e=(0,q.Z)($().mark((function e(t){var r;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,de(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(X,{"data-testid":"create-view",onCloseModal:t,onCreate:h}),"CopyTokenView"===s&&p&&o.createElement(ue,{onCloseModal:t,token:p}))},fe=n(49546);function pe(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 ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pe(Object(n),!0).forEach((function(t){(0,M.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var he=n(82351),ve=[{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(he.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())}}],be=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=function(){var e=(0,o.useState)([]),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=function(){var e=(0,q.Z)($().mark((function e(){var t;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se.Z.get("/api/v1/auth/account/api-token");case 2:t=e.sent,a(t.data.map((function(e){return ge(ge({},e),{},{created_at:e.created_at?(0,fe.default)(new Date(e.created_at),"dd/MM/yyyy"):null,last_used_at:e.last_used_at?(0,fe.default)(new Date(e.last_used_at),"dd/MM/yyyy"):null})})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,o.useEffect)((function(){i()}),[]),{data:n,setData:a,fetchData:i}}(),h=g.data,v=g.setData,b=g.fetchData,y=(0,o.useMemo)((function(){return{addEntry:{handleAction:function(){return a(!0)},tooltipText:"Create new token"}}}),[]),w=(0,o.useMemo)((function(){return{delete:{handleAction:function(){var e=(0,q.Z)($().mark((function e(t){var n;return $().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.id,e.next=3,r=n,se.Z.delete("/api/v1/auth/account/api-token/".concat(r));case 3:v(h.filter((function(e){return e.id!==n}))),(0,A.L)("api-token","delete-token","profile");case 5:case"end":return e.stop()}var r}),e)})));return function(t){return e.apply(this,arguments)}}(),confirmationTitle:"Delete API Token",confirmationMessage:"You are about to delete API Token, are you sure you want to continue?"}}}),[h]);return o.createElement(o.Fragment,null,o.createElement(c.NetdataTable,{dataColumns:ve,data:h,bulkActions:y,rowActions:w}),n&&o.createElement(me,{view:"CreateView",onCloseModal:function(){return a(!1)},onTokenCreated:b}),u&&o.createElement(me,{view:"CopyTokenView",onCloseModal:function(){s(!1),p(null)},token:f}))},ye=n(3528),we=function(){var e=(0,ye.MJ)("email"),t=(0,r.Z)(e,2),n=t[0],a=t[1],i=(0,o.useCallback)((function(){return a(!n)}),[n,a]);return o.createElement(c.Flex,{justifyContent:"between",alignItems:"center"},o.createElement(c.Box,null,o.createElement(c.H5,null,"E-mail"),o.createElement(c.TextSmall,null,"Netdata will send you health notifications via e-mails")),o.createElement(c.Toggle,{colored:!0,onChange:i,checked:n,"data-testid":"profileNotifications-emailNotificationsToggle","data-ga":"profile-ntab::click-toggle::global-view::".concat(n?"enabled":"disabled")}))},Ee=(n(85827),n(25387),n(72608),n(78266)),ke=n(33335),xe=(n(69826),n(31672),n(59461),n(89211)),Ce=n(45736),Oe=n(23383),Se=n(95383),Ze=n(3689),Pe=n(8018),Ie=n(37518),je=O.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)),De=(0,O.default)(c.Icon).withConfig({displayName:"styled__StyledIcon",componentId:"sc-lpc291-1"})(["width:20px;height:20px;margin-right:",";"],(0,c.getSizeBy)()),Te=(0,O.css)(["&&{width:200px;}margin-left:auto;"]),Ne=(0,O.default)(c.Select).withConfig({displayName:"styled__StyledSelect",componentId:"sc-lpc291-2"})(["",""],Te),_e=(0,O.default)(c.Button).withConfig({displayName:"styled__SettingsLoader",componentId:"sc-lpc291-3"})([""," color:",";border:1px solid ",";.path{stroke:",";}"],Te,(0,c.getColor)("text"),(0,c.getColor)("border"),(0,c.getColor)("text")),Fe=function(e){var t=e.roomId,n=e.spaceId,a=(0,ye.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(Ne,{options:Object.values(Ze.YM),value:Ze.YM[c],onChange:u})},Me=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,Pe.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(he.Z,{content:"Join this room to activate notifications for it",isBasic:!0},o.createElement(c.Button,{isLoading:l,label:"Join",onClick:d,flavour:"hollow"})))},Ae=function(e){var t=e.isMember,n=e.roomId,r=e.spaceId,a=(0,Ie.tE)(n,"name");return o.createElement(je,{"data-testid":"roomSettings-room-".concat(a),"data-ga":"profile-ntab::click-join-room-".concat(a,"::global-view")},o.createElement(De,{name:"room",color:"text"}),o.createElement(c.Text,null,a),t?o.createElement(o.Suspense,{fallback:o.createElement(_e,{isLoading:!0,flavour:"hollow",label:"Loading settings.."})},o.createElement(Fe,{roomId:n,spaceId:r})):o.createElement(Me,{roomId:n,spaceId:r}))},Le=O.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)),Be=(0,O.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)"})),Re=(0,O.default)(c.Icon).withConfig({displayName:"styled__SpaceIcon",componentId:"sc-1p8t8zr-2"})(["width:20px;height:20px;margin-right:",";"],(0,c.getSizeBy)()),ze=(0,O.default)(c.Text).withConfig({displayName:"styled__SpaceLabel",componentId:"sc-1p8t8zr-3"})(["font-weight:bold;"]),Ue=(0,O.default)(c.TextSmall).withConfig({displayName:"styled__SettingsInfo",componentId:"sc-1p8t8zr-4"})(["margin-left:auto;opacity:0.8;"]),Ve=n(26913),He=function(e){var t=e.expanded,n=e.onExpand,r=e.label,a=e.spaceId;(0,Ve.Z)(a);var i=(0,Ce.pV)(a,"channels").find((function(e){return"Email"===e.integration}))||{};return o.createElement(Le,{onClick:n,"data-testid":"spaceRoot-space-".concat(r)},o.createElement(Be,{name:"chevron_right_s",expanded:t,color:"text"}),o.createElement(Re,{name:"space",color:"text"}),o.createElement(ze,null,r),!i.enabled&&o.createElement(Ue,null,"E-mail notifications for this space has been disabled by admin"))},Ge={width:"108px",height:"77px"},We=function(e){var t=e.spaceId,n=e.isCurrent,a=e.showAllRooms,i=(0,xe.Z)(n),l=(0,r.Z)(i,2),u=l[0],s=l[1],d=(0,Oe.Z)(t,{autorun:!1,polling:!1}),m=(0,Se.y3)(t,"loaded");(0,o.useEffect)((function(){t&&u&&!m&&d()}),[u,m,t,d]);var f=(0,k.vu)(t,"name"),p=(0,Se.WY)(t),g=(0,o.useMemo)((function(){return a?p:p.filter((function(e){return e.isMember}))}),[p,a]),h=(0,o.useRef)();return(0,o.useEffect)((function(){u&&h.current&&h.current.scrollIntoView({behavior:"smooth",block:"start"})}),[u]),o.createElement(c.Flex,{column:!0,ref:h},o.createElement(He,{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(Ae,{isMember:r,key:n,roomId:n,spaceId:t})}))):o.createElement(Ee.Z,{iconProps:Ge,title:"Loading..."})})))},Ye=n(22613),Je={width:"108px",height:"77px"},qe=function(){var e=(0,k.th)(),t=function(e){var t=(0,k.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,ke.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(Ye.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(Ee.Z,{iconProps:Je,title:"Loading notification settings..."})},t.map((function(t){return o.createElement(We,{key:t,isCurrent:t===e,showAllRooms:l,spaceId:t})})))))},Ke={offline:["theme"],online:["profile","theme","notifications","apiTokens","manageCookies"]},$e={profile:{Component:N,label:"Profile",order:0,testId:"profileTab"},theme:{Component:J,label:"Theme",order:1,testId:"themeTab"},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(we,null)),o.createElement(c.Flex,{height:"1px",background:"border"}),o.createElement(qe,null))})),label:"Notifications",order:2,testId:"notificationsTab"},apiTokens:{Component:be,label:"API tokens",order:3,testId:"apiTokensTab"},manageCookies:{Component:W,label:"Manage cookies",order:4,testId:"manageCookiesTab"}},Xe=function(e){return($e[e]||$e.profile).order},Qe=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($e).filter((function(e){return Ke[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)(Xe(s)),g=(0,r.Z)(p,2),h=g[0],v=g[1],b=function(e){f(e)};return(0,o.useEffect)((function(){v(Xe(s))}),[s]),{handleOpenProfileModal:function(){d(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"profile")},handleCloseProfileModal:function(){m()},getPreselectedTab:Xe,setCurrentTab:b,handleChangeTab:function(e){var t=c[e];v(e),b(t)},tabs:c,tabsByName:$e,activeTabIndex:h,isProfileModalOpen:u}}},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")}),[])}},82040:function(e,t,n){n.d(t,{IC:function(){return g},Sq:function(){return f},cA:function(){return v},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(15557),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?")},h=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?")},v=function(e){var t=e.name,n=e.nodesLength;return n?1===n&&t?c.createElement(g,{name:t}):c.createElement(h,{nodesLength:n}):""};t.ZP=function(e){var t=e.ids,n=void 0===t?[]:t,a=e.name,p=e.onClose,v=(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,v(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(h,{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 h},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(15557),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):""},h=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?")},v=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(h,{name:t,roomName:r}):c.createElement(v,{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)}}(),k=a?{"data-ga":"".concat(d,"WithName"),"data-testid":"".concat(m,"WithName"),message:c.createElement(h,{name:a,roomName:w}),title:f(a)}:{"data-ga":"".concat(d,"Bulk"),"data-testid":"".concat(m,"Bulk"),message:c.createElement(v,{nodesLength:y,roomName:w}),title:p(y)};return c.createElement(l.ConfirmationDialog,(0,r.Z)({handleConfirm:E,handleDecline:g},k))}},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 h}});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,h=0},89050:function(e,t,n){n.d(t,{Aw:function(){return _},Br:function(){return F},Dy:function(){return C},I$:function(){return v},Lt:function(){return x},MC:function(){return Z},O2:function(){return O},Q5:function(){return k},V3:function(){return p},_0:function(){return b},cB:function(){return S},jG:function(){return M},jo:function(){return N},kR:function(){return w},oy:function(){return h},yK:function(){return P}});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"},h=function(e,t){return m(m({},e),{},{alertStatus:g(e),nodeStatus:k(e.state),virtualRowHeight:t})},v=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"},k=function(e){return E[e]||E.stale},x=function(e){return"created"===e?"Pending":"Completed"},C=function(e){return e?{background:"nodeBadgeBackground",border:"successText",color:"successText",label:"ON",status:"ON"}:{background:"nodeBadgeBackground",border:"warningText",color:"warningText",label:"OFF",status:"OFF"}},O=function(e){return!e||"unknown"===e},S=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" \u2022 ";return O(e)?s.h8:"".concat(e).concat(n).concat(t)},Z=function(e,t){return O(e)?s.h8:t?"".concat(e," ").concat(t):e},P=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]:""},I={none:!0,null:!0,unknown:!0},j=function(e){return!!e&&!I[e]},D={container:"container","container-other":"container",other:"container"},T={"$(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"},N=function(e,t){return j(e)?{icon:"container",iconSize:"18px",label:D[e]||e}:j(t)?{icon:"cluster",iconSize:"18px",label:T[t]||t}:{icon:"ram",iconSize:"14px",label:"Bare Metal"}},_=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}),[])},F=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)}}(),M=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 $}});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(15557),i=n(96929),c=n(5795),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)),h=n(64637),v=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,h.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,v.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(61536),E=n(86711),k=n(83925);function x(e,t){return e===t?0:e>t?1:-1}var C=[{id:"name",accessor:"name",header:"Name"},{id:"agent",accessor:"os",header:"Name",size:120,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)},cell:function(e){var t=e.getValue,n=e.row,r=t();return o.createElement(w.E,{title:r||"Unknown OS",url:r,name:n.original.name})}},{id:"version",accessor:"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(k.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",accessor:"state",header:"Status",cell:function(e){var t=e.getValue;return o.createElement(p.Z,{state:t()})},sortingFn:function(e,t){return x((0,v.Q5)(e.original.state),(0,v.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,v.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(E.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 x((0,v.Lt)(e.original.state),(0,v.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",accessor:"updateSeverity",header:"Severity",cell:function(e){var t=e.getValue,n=e.row.original;return o.createElement(k.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),S=n(15861),Z=n(64687),P=n.n(Z),I=n(82040),j=n(5633),D=n(55899),T=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 _=function(e){return Array.isArray(e)?e.filter((function(e){return!e.hasAccessibleData})):e.hasAccessibleData?[]:[{id:e.id}]},F=function(e){return Array.isArray(e)?e:[{id:e.id}]},M=function(e){var t=e.openClaimNodeModal,n=e.roomUntouchable,a=e.isSpace,i=(0,D.Z)(),c=(0,T.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,S.Z)(P().mark((function e(t,n){var r,o;return P().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,i(o);case 6:n.resetRowSelection();case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),h=function(){var e=(0,S.Z)(P().mark((function e(t,n){var r,o;return P().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=F(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)}}(),v=(0,o.useMemo)((function(){return{delete:{confirmLabel:"Yes, delete",confirmationMessage:function(e){return o.createElement(I.IC,{name:e.name})},confirmationTitle:function(e){return(0,I.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(j.O3,{name:e.name,roomName:u})},confirmationTitle:function(e){return(0,j.Br)(e.name)},declineLabel:"Cancel",handleAction:h,tooltipText:"Remove node from room",isVisible:!a,isDisabled:function(e){return e.disabled||n||!m},disabledTooltipText:n?"Remove is disabled":"Only admins can remove"}}}),[I.IC,I.Sq,j.Br,g,h,j.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(I.cA,{name:t[0].name,nodesLength:t.length})},confirmationTitle:function(e,t){return(0,I.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(j.ar,{name:t[0].name,nodesLength:t.length,roomName:u})},confirmationTitle:function(e,t){return(0,j.d1)({name:t[0].name,nodesLength:t.length})},declineLabel:"Cancel",disabledTooltipText:n?"Remove is disabled":"Only admins can remove",handleAction:h,isDisabled:n||!m,tooltipText:"Remove nodes from room"}})}),[I.cA,I.l9,j.d1,g,h,f,s,m,j.ar,n,a]);return{rowActions:v,bulkActions:b,hasPermissionToDelete:s,hasPermissionToRemove:m}};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 L(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 B={name:!1,updateSeverity:!1,connectionToCloud:!1},R=[{id:"state",desc:!1}],z=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),h=(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),k=E[0],x=E[2],S=E[3],Z=M({openClaimNodeModal:x,roomUntouchable:t,isSpace:a}),P=Z.rowActions,I=Z.bulkActions,j=Z.hasPermissionToDelete,D=Z.hasPermissionToRemove,T=(0,o.useCallback)((function(e,t,n){var r=n.toLowerCase(),o=e.getValue("name").toLowerCase(),a=(0,v.Q5)(e.getValue("state")).toLocaleLowerCase(),i=(0,v.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:h.map((function(e){return L(L({},e),{},{disabled:a?!j||!r&&e.hasAccessibleData:!D})}))||[],nodeIds:p,columns:C,rowActions:P,bulkActions:I,isClaimNodeModalOpen:k,sortBy:R,columnVisibility:B,setGlobalFilter:y,openClaimNodeModal:x,closeClaimNodeModal:S,globalFilterFn:T}},U=n(90025),V=n(74059),H=n(33582),G=n(38346),W=n(16645),Y=n(7693),J=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,H.Z)(n),o.createElement(W.u6,{onClose:t,"data-testid":"addNodes",right:!0,closeOnEsc:!0,closeOnOverlayClick:!0},o.createElement(Y.x,{"data-testid":"addNodes-header",title:"Add Nodes",onClose:t}),o.createElement(W.TZ,{hasModalTitle:!1},o.createElement(a.Flex,{column:!0,"data-testid":"manageClaimedNodes-controls",gap:3},o.createElement(U.Z,{placeholder:"Select Rooms",selectedValue:l,onChange:s}),o.createElement(G.Z,{"data-testid":"manageClaimedNodes-claimingNodes",rooms:l,spaceId:n}))))};function q(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 K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $=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,h=void 0===g||g,v=e.showDefaultBulkActions,b=void 0===v||v,y=e.onRowSelected,w=e.onClickRow,E=e.disableClickRow,k=e.columnVisibility,x=e.customSortBy,C=e.showClaimModalWithRoomSelection,O=void 0!==C&&C,S=e.alwaysEnableNodeSelection,Z=void 0!==S&&S,P=e.isSpace,I=z({roomUntouchable:t,customNodes:s,alwaysEnableNodeSelection:Z,isSpace:P,showClaimModalWithRoomSelection:O}),j=I.nodes,D=I.columns,T=I.rowActions,N=I.bulkActions,_=I.sortBy,F=I.isClaimNodeModalOpen,M=I.openClaimNodeModal,A=I.closeClaimNodeModal,L=I.columnVisibility,B=I.setGlobalFilter,R=I.globalFilterFn,U=(0,l.gI)("node:Create"),V=(0,i.fD)();(0,o.useEffect)((function(){V&&r&&U&&0===j.length&&M()}),[V]);var H=(0,o.useMemo)((function(){return K(K({},L),k)}),[L,k]);return o.createElement(o.Fragment,null,o.createElement(a.NetdataTable,{onRowSelected:y,globalFilterFn:R,columnVisibility:H,enableSelection:p,enableSorting:!0,dataColumns:D,data:j,rowActions:h&&T||m,bulkActions:b&&N||d,sortBy:x||_,onGlobalSearchChange:B,testPrefixCallback:function(e){return e.hostname||e.name},onClickRow:w,disableClickRow:E}),F&&!O&&o.createElement(c.Z,{onClose:A,isSubmodal:!0}),F&&O&&o.createElement(J,{onClose:A}))}},77184:function(e,t,n){n.d(t,{$3:function(){return v},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)},h=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},v=function(e,t){return o.Z.get("/api/v2/spaces/".concat(e,"/channel/").concat(t),{transform:h})},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},XK:function(){return s},YM:function(){return p},aU:function(){return u},k_:function(){return i},mN:function(){return m},q7:function(){return h},rc:function(){return c},uK:function(){return f},yV:function(){return v},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"}},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"},h={string:"input"},v=/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)/g},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 I},hd:function(){return Z},MJ:function(){return P}});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(45987),c=n(64687),l=n.n(c),u=n(4480),s=n(93017),d=(n(92222),n(26398)),m=["domain"];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={email:null,browser:null,mobile:null},h={alerts:null},v={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")}},b=function(e){var t=e.domain,n=(0,i.Z)(e,m);return(0,v[t])(n)},y=(0,u.xu)({key:"notificationsSettings",default:function(e){var t=function(e){var t=e.domain;return{me:g,room:h}[t]}(e),n=b(e);return d.Z.get(n).then((function(e){return p(p(p({},t),e.data),{},{isLoaded:!0})})).catch((function(){return p(p({},t),{},{isLoaded:!0})}))}}),w=n(68008),E=["prop"];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 x(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,a.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 C=(0,u.CG)({key:"notificationsSettings",get:function(e){return function(t){return(0,t.get)(y(e))}},set:function(e){return function(t,n){var r=t.set,o=e.prop,c=(0,i.Z)(e,E);r(y(c),(function(e){return o?x(x({},e),{},(0,a.Z)({},o,n)):n}))}}}),O=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).shouldPersist,n=void 0===t||t,i=(0,u.Zl)(C(e)),c=function(e){return(0,w.Z)((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.Z.patch(b(e),t)}),[e.domain,e.spaceId,e.roomId])}(e),m=(0,s.Z)(),f=(0,o.Z)(m,2)[1];return(0,u._8)((function(t){var o=t.snapshot;return function(){var t=(0,r.Z)(l().mark((function t(r){var u,s;return l().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(C(e));case 5:return u=t.sent,s=e.prop,t.prev=7,t.next=10,c(x({},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?u[s]:u);case 16:case"end":return t.stop()}}),t,null,[[7,12]])})));return function(e){return t.apply(this,arguments)}}()}),[e])},S=function(e){return(0,u.$P)(C(e))},Z=function(){return(0,u.$P)(y({domain:"me"}))},P=function(e){var t={domain:"me"},n=S(t),r="hasValue"!==n.state?g:n.contents,o=O(x(x({},t),{},{prop:e}));return[e?r[e]:r,o]},I=function(e){var t=e.roomId,n=e.spaceId,r=e.key,o={domain:"room",roomId:t,spaceId:n},a=S(o),i="hasValue"!==a.state?h:a.contents,c=O(x(x({},o),{},{prop:r}));return[r?i[r]:i,c]}},45736:function(e,t,n){n.d(t,{Cz:function(){return g},R1:function(){return y},h3:function(){return m},pV:function(){return p},ry:function(){return b},rz:function(){return h},su:function(){return d}});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);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=(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?u(u({},e),{},(0,r.Z)({},n,o)):u(u({},e),o)}))}}}),d=function(e,t){return(0,o.sJ)(s({id:e,key:t}))},m=function(e){return(0,o.rb)(s(e))},f=(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 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?u(u({},e),{},(0,r.Z)({},n,o)):u(u({},e),o)}))}}}),p=function(e,t){return(0,o.sJ)(f({id:e,key:t}))},g=function(e,t){return(0,o.Zl)(s({id:e,key:t}))},h=function(e,t){return(0,o.Zl)(f({id:e,key:t}))},v=(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 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?u(u({},e),{},(0,r.Z)({},n,o)):u(u({},e),o)}))}}}),b=function(e,t){return(0,o.sJ)(v({id:e,key:t}))},y=function(e,t){return(0,o.Zl)(v({id:e,key:t}))}},31790:function(e,t,n){n.d(t,{uf:function(){return h},xW:function(){return v},D4:function(){return b},sY:function(){return y},XM:function(){return w},ae:function(){return E},A_:function(){return k}});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),h=n.includes(e),v={description:c,id:e,isRequired:h,placeholder:d||"",title:f||e};if("string"===p&&"selection"!==e){var b=g.format,w=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)&&!(w&&e.length>w))}},w?{maxlength:w}:{}),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"},v)}if("object"===p){var k=g.oneOf,x=g.patternProperties;if(k)return m(m({component:"select",getValue:function(e){var t,n,r=e.id,o=e.secrets;return{label:(null===(t=k.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)||(h?k[0].title:"None"),value:(null===(n=o[r])||void 0===n?void 0:n.selection)||(h?k[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=k.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,k.find((function(e){return e.title===a})).required))})),r((function(e){return m(m({},e),{},(0,o.Z)({},t,{selection:i}))}))}}},k.reduce((function(e,t){return{fields:m(m({},e.fields),{},(0,o.Z)({},t.properties.selection.const,y(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:h?[]:[{label:"None",value:""}],required:{}})),v);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]]}))},v)}return null};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,o.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 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)}))},v=function(e,t,n){return!!t&&("selection"===e||("select"===n.component||n.isValid(t)))},b=function(e){return"Delete ".concat(e," channel")},y=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 g(g({},e),a?(0,o.Z)({},r,a):{})}),{})},w=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)},E=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(", ")},k=function(e,t){return Object.values(e).reduce((function(e,n){return"select"===n.component&&t.includes(n.id)?g(g({},e),{},(0,o.Z)({},n.id,{selection:n.options[0].value})):e}),{})}},28350:function(e,t,n){n.d(t,{Z:function(){return E}});var r=n(87462),o=n(45987),a=n(67294),i=n(15557),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})})))},h=n(93433),v=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,v.Z)(n,2),o=r[0],i=r[1],c=(0,a.useState)(!0),l=(0,v.Z)(c,2),u=l[0],s=l[1],d=(0,a.useState)([]),m=(0,v.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,h.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,h=e.canAddNodes,v=e.addNodesGA,E=(0,o.Z)(e,y),k=b({setNodes:m}).onRowSelected,x=(0,l.OS)(),C=(0,u.tE)(d),O=(0,a.useMemo)((function(){return{addEntry:{handleAction:p,tooltipText:"Add the selected nodes to the room",isDisabled:!h,disabledTooltipText:"Select some nodes to add to the room","data-ga":v}}}),[p,h]);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 ",C.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:O,onRowSelected:k,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],h=p[1],v=p[2],b=(0,o.useState)([]),y=(0,r.Z)(b,2),w=y[0],E=y[1],k=(0,i.th)(),x=(0,c.HM)(k,l.i_),C=(0,f.Z)(),O=(0,r.Z)(C,2)[1],S=(0,m.Z)((function(){return{enabled:!!x,fetch:function(){return(0,u.Fz)({roomId:x,spaceId:k})},initialValue:[],onFail:function(e){O(e)}}}),[x,k]),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)(k,e,{onSuccess:t});return[{claimedNodeIds:I,data:j,filter:g,setFilter:h,debouncedFilter:v,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}]}},5795:function(e,t,n){var r=n(87462),o=n(29439),a=n(67294),i=n(15557),c=n(37518),l=n(74059),u=n(16645),s=n(7693),d=n(92903),m=n(38346),f=n(28350),p=n(86242),g=n(97346);t.Z=function(e){var t=e.onClose,n=e.isSubmodal,h=(0,l.th)(),v=(0,c.Hm)(),b=(0,p.Z)(v.id,{addNodesCallback:t}),y=(0,o.Z)(b,2),w=y[0],E=y[1],k=E.onAddNodes,x=E.selectedNodes;return a.createElement(u.u6,{"data-testid":"addWarRoomModal",right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t},a.createElement(s.x,{"data-testid":"addWarRoomModal-header",title:a.createElement(a.Fragment,null,"Manage room",a.createElement(i.TextBig,{color:"textLite"},"\xa0/ Add Nodes")),isSubmodal:n,onClose:t}),a.createElement(d.B,{"data-testid":"addWarRoomModal-title"},"Add nodes to\xa0",null===v||void 0===v?void 0:v.name),a.createElement(u.TZ,{"data-testid":"addWarRoomModal-content",overflow:"auto",hasFooter:!0},a.createElement(g.Z,{permission:"node:Create"},a.createElement(m.Z,{"data-testid":"addWarRoomModal-adminClaimNodes",rooms:[v.id],spaceId:h})),!v.untouchable&&a.createElement(f.Z,(0,r.Z)({"data-testid":"addWarRoomModal-availableNodes"},w,{onAddNodes:k,canAddNodes:!!x.length,addNodesGA:"add-war-room-modal::click-add-node::global-view"}))),a.createElement(u.ZW,{"data-testid":"addWarRoomModal-footer"},a.createElement(i.Button,{"data-ga":"add-war-room-modal::click-back::global-view","data-testid":"addWarRoomModal-backAction",neutral:!0,flavour:"borderless",label:"Back",onClick:t})))}},61536:function(e,t,n){n.d(t,{E:function(){return s},M:function(){return d}});var r=n(67294),o=n(60677),a=n(15557),i=n(64637),c=n(31203),l=o.default.div.withConfig({displayName:"styled__CellBox",componentId:"sc-1nen61k-0"})(["",";display:flex;flex-direction:",";height:",";align-items:center;"],(function(e){var t=e.width;return t?"width: ".concat(t,"px"):"width: auto"}),(function(e){return e.reversed?"row-reverse":"row"}),(0,a.getSizeBy)(5)),u=o.default.div.withConfig({displayName:"styled__IconContainer",componentId:"sc-1nen61k-1"})(["margin:0 "," 0 0;"],(0,a.getSizeBy)(1)),s=function(e){var t=e.url,n=e.name,o=e.title,s=(e.width-32)/7,d=(0,r.useMemo)((function(){return s?(0,i.a)(n,s):n}),[s,n]);return r.createElement(l,null,r.createElement(a.Flex,{alignItems:"center"},r.createElement(u,null,r.createElement(c.Z,{src:t,title:o})),r.createElement(a.TextSmall,null,d)))},d=o.default.div.withConfig({displayName:"styled__TableArea",componentId:"sc-1nen61k-2"})(["display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:100%;margin:"," 0;",""],(0,a.getSizeBy)(2),(function(e){return e.isVirtualized&&"min-height: 300px;"}))},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(15557),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,h=e.polling,v=void 0===h||h,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),k=E[0],x=E[1],C=(0,f.X7)(t,"loaded"),O=(0,d.gI)("room:Read");(0,o.useEffect)((function(){C&&b((function(e){return e&&e.filter((function(e){return y.includes(e)}))}))}),[y,C]),(0,o.useEffect)((function(){C&&k!==y.length&&((0,a.L)("node-count","node-count-changed-from-".concat(k,"-to-").concat(y.length),"","","","node-count-change"),x(y.length))}),[y.length,k,C]),(0,c.Z)((function(){return{key:p({id:t,spaceId:n}),autorun:!!O&&!!n&&!!t,fetch:function(){return(0,m.Fz)({roomId:t,spaceId:n})},polling:v,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 v},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})},h=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}})}},v=function(e,t){return h("checkout")(e,t)},b=function(e,t){return h()(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 k},fG:function(){return v}});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"}}),h=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]},v=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?h(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)}},k=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"),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"}},2509:function(e,t,n){n.d(t,{Q$:function(){return s},Sr:function(){return g},bK:function(){return u},dH:function(){return m},eq:function(){return i},fM:function(){return d},fV:function(){return f},m3:function(){return a},xN:function(){return h},z2:function(){return p}});var r,o=n(4942),a="info",i="rooms",c="nodes",l="users",u="notifications",s="integrations",d="billing",m=[a,i,c,l,u,d],f=(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"),r),p=m[0],g="/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(15557),u=n(97346),s=n(91008),d=n(82351),m=n(53606),f=n(46585),p=n(13477),g=n(46667),h=n(46715),v=["currentPlan"],b=["id","isLastSpace","name","onClose"],y=function(e){return function(t){var n=t.currentPlan,r=(0,a.Z)(t,v),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,v=e.onClose,y=(0,a.Z)(e,b),E=(0,c.s0)(),k=(0,m.Z)(t),x=(0,p.jr)(),C=(0,h.RP)().value,O=(0,g.Z)(),S=(0,o.Z)(O,4),Z=S[0],P=S[2],I=S[3],j=(0,g.Z)(),D=(0,o.Z)(j,2),T=D[0],N=D[1],_=(0,i.useCallback)((function(e){v(),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:T?"Deleting...":"Yes, delete","data-ga":"delete-space","data-testid":"deleteSpaceDialog",handleConfirm:function(){N(),k({onSuccess:_})},handleDecline:I,message:i.createElement(w,{spaceName:s,currentPlan:C}),title:"Delete ".concat(s," space"),isConfirmDisabled:T,isConfirmLoading:T,isDeclineDisabled:T}))}},22613:function(e,t,n){var r=n(87462),o=n(45987),a=n(67294),i=n(15557),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"}))}},37931:function(e,t,n){n.d(t,{Z:function(){return I}});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(15557),u=n(95383),s=n(74059),d=n(33335),m=(n(92222),n(45781)),f=n(37518),p=(n(69826),n(31672),n(59461),n(4480)),g={alertCounter:{warning:0,critical:0},unreachableCount:0},h=(0,p.CG)({key:"roomAlertSummaryState",get:function(e){var t=e.id,n=e.key;return function(e){var r=e.get,o=r(s.BN),a=r((0,m.e$)({id:o,key:"entries"})).find((function(e){return e.id===t}))||g;return n?a[n]:a}}}),v=n(67622),b=n(82351),y=n(60677),w=(0,y.default)(l.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"})([""]),E=(0,y.default)(w).attrs({background:"warning"}).withConfig({displayName:"indicators__WarningIndicator",componentId:"sc-19hg3ay-1"})([""]),k=(0,y.default)(w).attrs({background:"textLite"}).withConfig({displayName:"indicators__UnreachableIndicator",componentId:"sc-19hg3ay-2"})([""]),x=n(81488),C=n(20031),O=["id","isSidebar","hideAlerts","differentiateIsMember"],S=function(e){var t=e.id,n=e.isSidebar,o=e.hideAlerts,c=e.differentiateIsMember,u=(0,a.Z)(e,O),d=(0,f.UL)(),g=function(e,t){return(0,p.sJ)(h({id:e,key:t}))}(t),y=g.alertCounter,S=y.critical,Z=y.warning,P=g.unreachableCount,I=(0,s.uk)(),j=(0,f.tE)(t,"slug"),D=(0,f.tE)(t,"name"),T=(0,f.tE)(t,"isMember"),N=(0,m.Mt)("error"),_=(0,m.Mt)("updatedAt");return i.createElement(v.Z,(0,r.Z)({to:"/spaces/".concat(I,"/rooms/").concat(j),testid:"roomLabel-warRoom-".concat(D),actions:o?null:i.createElement(b.Z,{content:i.createElement(x.Z,{error:N,text:"Room alerts",updatedAt:_}),isBasic:!0,align:"right"},i.createElement(l.Flex,{flex:!1,flexWrap:!1,justifyContent:"end",width:{min:6},height:{min:2}},S>0&&i.createElement(w,null),Z>0&&i.createElement(E,null),P>0&&i.createElement(k,null))),icon:c&&T&&i.createElement(C.Z,null),iconColor:"successLite",iconHeight:"12px",iconWidth:"12px",gap:1,textProps:c&&!T&&{padding:[0,0,0,4]},selected:t===d,isSidebar:n,isSecondary:!T},u),D)},Z=n(22613),P=["isSidebar"],I=function(e){var t=e.isSidebar,n=(0,a.Z)(e,P),m=(0,u.J7)(),f=(0,i.useState)(!1),p=(0,o.Z)(f,2),g=p[0],h=p[1],v=(0,s.th)();(0,c.Z)((function(){h(!1)}),[v]);var b=(0,d.gI)("room:ReadAll"),y=(0,i.useMemo)((function(){return m.filter((function(e){return e.isMember}))}),[m]),w=b&&y.length>0,E=w&&!g?y:m;return i.createElement(i.Fragment,null,w&&i.createElement(Z.Z,{onFilterClick:function(e){return function(t){t.stopPropagation(),h(e)}},showAllRooms:g}),E.map((function(e,o){var a=e.id,c=e.untouchable;return i.createElement(i.Fragment,{key:a},i.createElement(S,(0,r.Z)({id:a,hideAlerts:!t,Wrapper:l.Text,isSidebar:t,differentiateIsMember:g},n)),c&&o!==E.length-1&&i.createElement(l.Flex,{border:{side:"top",color:"tabsBorder"},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(60677),o=n(15557),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;}"])},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 k},H4:function(){return h},kf:function(){return v},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"}}),h=function(){var e,t,n=(0,c.th)();return e=n,t="ids",(0,o.sJ)(m({id:e,key:t}))},v=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=h();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}))}}}),k=function(){var e=(0,c.th)(),t=h();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,h,v,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,h=g.id,v=g.slug,b=g.name,a((0,s.ZP)(h),{id:h,slug:v,name:d?b:c,loaded:!0}),a((0,s.bo)(v),h),a((0,u.st)("ids"),(function(e){return e=(0,r.Z)(new Set([].concat((0,r.Z)(e),[h])))})),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 h,v,b,y,w,E,k,x;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return h=r.onSuccess,v=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 k=t.t0,x=k.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:h&&h(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),v&&v();case 32:case"end":return t.stop()}}),t,null,[[18,27]])})));return function(e){return t.apply(this,arguments)}}()}),[e])}},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"),h=(0,r.Z)(g,2),v=h[0],b=h[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:v}}},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})}})}},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 |