MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/netdata/usr/local/local/share/netdata/web/v3/1649.8804a2a31e01e98b66c3.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},o=(new e.Error).stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="1a3940d3-e2cb-477d-b3ca-e0b152a251c5",e._sentryDebugIdIdentifier="sentry-dbid-1a3940d3-e2cb-477d-b3ca-e0b152a251c5")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"bbf0f036d26e8d5cdf711f08d224a9283a4dee0b"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1649,5187],{17667:(e,o,t)=>{t.r(o),t.d(o,{default:()=>po});var n=t(96540),l=t(63766),a=t(24285),s=t(88934),r=t(18121),i=t(17702),c=t(6304),d=t(32742),u=(t(98992),t(81454),t(33185)),p=t(24609),h=t(70140),g=t(24655),x=t(74848);const C=(0,u.default)(l.Flex).attrs((e=>({width:"100%",column:!0,alignItems:"center",overflow:{vertical:"auto",horizontal:"hidden"},...e}))).withConfig({displayName:"spacesList__SpacesListContainer",componentId:"sc-vabwjt-0"})(["margin-top:-8px;&&{margin-bottom:8px;}"]),m=()=>{const e=(0,p.vt)(),o=(0,h.A)(),{spaceIds:t,colors:n}=o||{};return(0,x.jsx)(C,{"data-testid":"workspaceBar-spacesList",children:t.map((o=>{const t=n?.[o];return(0,x.jsx)(g.A,{testIdPrefix:"workspaceBar-space",spaceId:o,active:o===e,backgroundColor:t},o)}))})};var b=t(46587),j=t(72679),f=t(64156),v=t(63872);const k=()=>{const e=(0,n.useRef)(),[o,,t,l]=(0,c.A)(),[s,r]=(0,a.tF)("spacesList"),i=(0,h.A)(),[d,u]=(0,n.useState)(i),[p,,g,x]=(0,c.A)(),[C]=(0,v.A)(),m=(0,n.useCallback)((e=>{u((o=>({...o,spaceIds:e})))}),[u]),b=(0,n.useCallback)((e=>{let{id:o,color:t}=e;u((e=>({...e,colors:{...e.colors,[o]:t}})))}),[u]),j=(0,n.useCallback)((e=>{u((o=>({...o,colors:{...o.colors,[e]:i.colors?.[e]}})))}),[i,u]),f=(0,n.useCallback)((e=>{u((o=>({...o,colors:{...o.colors,[e]:void 0}})))}),[u]),k=(0,n.useCallback)((e=>{t(),r(d),l(),x(),C({header:"Success",text:"Your changes have been successfully saved."}),"function"===typeof e&&e()}),[d,r,x,C,t,l]),w=(0,n.useMemo)((()=>!!s),[s]),y=(0,n.useCallback)((()=>{t(),r(null),l(),C({header:"Success",text:"All settings have been successfully deleted."})}),[r,t,l]),I=(0,n.useCallback)((()=>{u(i),x()}),[i,u,x]);return(0,n.useEffect)((()=>{u(i)}),[i,u]),(0,n.useEffect)((()=>(e.current=Date.now(),()=>{e.current=0})),[]),(0,n.useEffect)((()=>{Date.now()-e.current>500&&g()}),[d,e]),{state:d,onOrderChange:m,onColorChange:b,onColorReset:j,onColorClear:f,onSave:k,onDelete:y,onReset:I,canDelete:w,isDirty:p,loading:o}};var w=t(43375),y=t(43627),I=t(74979),A=t(7542);const S=(0,u.default)(l.Flex).attrs((e=>({width:7,height:7,round:!0,border:{side:"all",color:"border"},cursor:"pointer",alignItems:"center",justifyContent:"center",...e}))).withConfig({displayName:"styled__StyledColorBox",componentId:"sc-1iqu0oz-0"})(["background-color:",";"],(e=>e.background)),F=(0,u.default)(l.Icon).attrs((e=>({color:(0,A.T4)(e.backgroundColor)?["neutral","black"]:["neutral","white"],...e}))).withConfig({displayName:"styled__StyledIcon",componentId:"sc-1iqu0oz-1"})([""]);var R=t(45087);t(8872);const B={green:["green50","green100","green150","green180"],red:["red50","red100","red150","red180"],yellow:["yellow50","yellow100","yellow150","yellow180"],blue:["blue50","blue100","blue150","blue180"],purple:["purple50","purple100","purple150","purple180"],violet:["violet50","violet100","violet150","violet180"]};var P=t(74891);const T=(0,P.A)(S),D=e=>{let{value:o,theme:t,onChange:a}=e;const s=(0,n.useMemo)((()=>Object.entries(B).reduce(((e,o)=>{let[n,a]=o;return[...e,...a.map((e=>(0,l.getColor)([n,e])({theme:t})))]}),[])),[t]),r=(0,n.useCallback)((()=>{const e=Math.floor(Math.random()*s.length-1),o=s[e];a({target:{value:o}})}),[s,a]);return(0,x.jsx)(T,{border:"none",background:o,onClick:r,tooltip:"Change to random color",children:(0,x.jsx)(F,{name:"refresh",backgroundColor:o})})},_=(0,n.memo)(D),M=e=>{let{theme:o,onChange:t}=e;return(0,x.jsx)(l.Flex,{gap:2,children:Object.entries(B).map((e=>{let[n,a]=e;return(0,x.jsx)(l.Flex,{column:!0,gap:2,children:a.map((e=>{const a=(0,l.getColor)([n,e])({theme:o});return(0,x.jsx)(S,{border:"none",background:a,onClick:()=>t({target:{value:a}})},e)}))},n)}))})},O=(0,n.memo)(M),E=e=>{let{value:o,onChange:t}=e;const a=(0,u.useTheme)(),[s,r]=(0,n.useState)();return(0,n.useEffect)((()=>{r((0,A.Bi)(o)?null:"Invalid color value.")}),[o]),(0,x.jsxs)(l.Flex,{column:!0,gap:2,padding:[4],children:[(0,x.jsxs)(l.Flex,{gap:2,children:[(0,x.jsx)(_,{value:o,theme:a,onChange:t}),(0,x.jsx)(l.TextInput,{height:7,value:o,onChange:t,error:s})]}),(0,x.jsx)(l.TextSmall,{children:"Choose from default colors."}),(0,x.jsx)(O,{theme:a,onChange:t})]})},H=e=>{let{value:o,tooltip:t,onChange:a}=e;const s=(0,n.useRef)(),[r,i,,d]=(0,c.A)(!1);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(R.A,{align:"bottom",content:t,children:(0,x.jsx)(l.Flex,{ref:s,children:(0,x.jsx)(S,{background:o,onClick:i})})}),s.current&&r?(0,x.jsx)(l.Drop,{width:60,target:s.current,align:{top:"bottom",right:"right"},background:"modalBackground",margin:[2,0,0],round:!0,onClickOutside:d,onEsc:d,children:(0,x.jsx)(E,{value:o,onChange:a})}):null]})},L=e=>{let{value:o,onChange:t}=e;const l=(0,u.useTheme)(),a=(0,n.useMemo)((()=>l?.colors?.spaceIdle),[l]);return(0,x.jsx)(H,{value:o||a,onChange:t,tooltip:"Change color"})},N=e=>{let{id:o,color:t,onColorChange:l,onColorReset:a,onColorClear:s}=e;const r=(0,h.A)(),i=(0,n.useMemo)((()=>r.colors?.[o]!=t),[r,t]),c=(0,n.useCallback)((e=>{l({id:o,color:e.target.value})}),[o,l]),d=(0,n.useCallback)((()=>{a(o)}),[o,a]),u=(0,n.useCallback)((()=>{s(o)}),[o,s]);return{isDirty:i,hasColor:!!t,onChange:c,onReset:d,onClear:u}},z=(0,P.A)(l.Icon),W=e=>{let{id:o,color:t,onColorChange:n,onColorReset:a,onColorClear:s}=e;const{attributes:r,listeners:i,setNodeRef:c,transform:d,transition:u}=(0,y.gl)({id:o}),h={transform:I.Ks.Transform.toString(d),transition:u},{name:g}=(0,p.ns)(o),{isDirty:C,hasColor:m,onChange:b,onReset:j,onClear:f}=N({id:o,color:t,onColorChange:n,onColorReset:a,onColorClear:s});return(0,x.jsx)("div",{ref:c,style:h,...r,children:(0,x.jsxs)(l.Flex,{gap:1,alignItems:"center",children:[(0,x.jsx)(l.Icon,{name:"nav_dots",color:"textLite",...i,cursor:"grab"}),(0,x.jsx)(L,{value:t,onChange:b}),(0,x.jsx)(l.TextBig,{padding:[0,0,0,2],children:g}),C?(0,x.jsx)(z,{name:"reload",color:"text",cursor:"pointer",onClick:j,tooltip:"Reset background color to previous value",noWrapper:!0}):null,m?(0,x.jsx)(z,{name:"x",color:"text",cursor:"pointer",onClick:f,tooltip:"Remove background color",noWrapper:!0}):null]},o)})},U=e=>{let{spaceIds:o,colors:t,onOrderChange:l,onColorChange:a,onColorReset:s,onColorClear:r}=e;const[i,c]=(0,n.useState)(o),d=(0,w.FR)((0,w.MS)(w.AN),(0,w.MS)(w.uN,{coordinateGetter:y.JR})),u=(0,n.useCallback)((e=>{const{active:o,over:t}=e;o?.id&&t?.id&&o.id!==t.id&&c((e=>{const n=e.indexOf(o.id),l=e.indexOf(t.id);return(0,y.be)(e,n,l)}))}),[y.be,c]);return(0,n.useEffect)((()=>{c(o)}),[o,c]),(0,n.useEffect)((()=>{l(i)}),[i,l]),(0,x.jsx)(w.Mp,{sensors:d,collisionDetection:w.fp,onDragEnd:u,children:(0,x.jsx)(y.gB,{items:i,strategy:y._G,children:i.map((e=>(0,x.jsx)(W,{id:e,color:t?.[e],onColorChange:a,onColorReset:s,onColorClear:r},e)))})})},q=e=>{let{spaceIds:o,colors:t,onOrderChange:n,onColorChange:a,onColorReset:s,onColorClear:r}=e;return(0,x.jsxs)(l.Flex,{column:!0,gap:4,children:[(0,x.jsx)(l.Text,{children:"Reorder spaces by dragging and customize their colors using the color picker."}),(0,x.jsx)(l.Flex,{column:!0,gap:4,children:(0,x.jsx)(U,{spaceIds:o,colors:t,onOrderChange:n,onColorChange:a,onColorReset:s,onColorClear:r})})]})},G="closeModal",Y="deleteSettings",V=()=>(0,x.jsxs)(l.Flex,{column:!0,gap:2,children:[(0,x.jsx)(l.Text,{children:"There are some unsaved changes that will be lost after closing the modal window."}),(0,x.jsx)(l.Text,{children:"Are you sure you want to colse without saving your changes?"})]}),J=()=>(0,x.jsxs)(l.Flex,{column:!0,gap:2,children:[(0,x.jsx)(l.Text,{children:"You are about to delete all previously saved settings. This action cannot be reverted."}),(0,x.jsx)(l.Text,{children:"Are you sure you want to continue?"})]}),Z={[G]:{title:"Close modal",confirmLabel:"Close without saving",message:(0,x.jsx)(V,{})},[Y]:{title:"Delete settings",confirmLabel:"Yes, delete settings",message:(0,x.jsx)(J,{})}},$=e=>{let{flavour:o,handleConfirm:t,handleDecline:a}=e;const s=(0,n.useMemo)((()=>Z[o]),[o]);return(0,x.jsx)(l.ConfirmationDialog,{"data-testid":"spacesListDialog",handleConfirm:t,handleDecline:a,...s})},K=(0,P.A)(l.Button),X=e=>{let{onClose:o}=e;const{state:t,onOrderChange:a,onColorChange:s,onColorReset:r,onColorClear:i,onSave:c,onDelete:d,onReset:u,canDelete:p,isDirty:h,loading:g}=k(),{spaceIds:C,colors:m}=t||{},b=(0,f.A)("(max-width: 767px)"),j=g,[v,w]=(0,n.useState)(),y=(0,n.useCallback)((()=>w()),[w]),I=(0,n.useMemo)((()=>({width:b?"90vw":{min:"400px",base:"30vw"},height:b?"90vh":{max:"90vh"}})),[b]),A=(0,n.useCallback)((()=>{h?w(G):o()}),[h,w,o]),S=(0,n.useCallback)((()=>{w(Y)}),[w]),F=(0,n.useCallback)((()=>{if(v===G)return y(),void o();v===Y&&(d(),o())}),[v,o,y]),R=(0,n.useCallback)((()=>{c(o)}),[c]);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(l.Modal,{backdropProps:{backdropBlur:!0},onEsc:A,children:(0,x.jsxs)(l.ModalContent,{...I,children:[(0,x.jsxs)(l.ModalHeader,{justifyContent:"between",padding:[4],round:!0,children:[(0,x.jsx)(l.Flex,{gap:3,alignItems:"center",children:(0,x.jsx)(l.H4,{children:"Configure spaces list"})}),(0,x.jsx)(l.ModalCloseButton,{onClose:A})]}),(0,x.jsx)(l.ModalBody,{overflow:{vertical:"auto"},children:(0,x.jsx)(q,{spaceIds:C,colors:m,onOrderChange:a,onColorChange:s,onColorReset:r,onColorClear:i})}),(0,x.jsxs)(l.ModalFooter,{gap:2,justifyContent:"between",children:[(0,x.jsx)(K,{label:"Delete all settings",flavour:"borderless",disabled:j||!p,onClick:S,danger:!0,tooltip:j||!p?null:"Delete any previously saved settings."}),(0,x.jsxs)(l.Flex,{gap:2,children:[(0,x.jsx)(l.Button,{label:"Close",flavour:"hollow",onClick:A,disabled:j}),(0,x.jsx)(l.Button,{label:"Reset",flavour:"hollow",onClick:u,disabled:j||!h}),(0,x.jsx)(l.Button,{label:"Save",onClick:R,disabled:j||!h})]})]})]})}),v?(0,x.jsx)($,{flavour:v,handleConfirm:F,handleDecline:y}):null]})};var Q=t(21548);const ee=e=>{let{onSpaceSettingsClick:o,onSpaceListClick:t,onClose:a}=e;const s=(0,n.useCallback)((e=>()=>{"function"===typeof e&&e(),a()}),[a]),r=(0,n.useMemo)((()=>[{label:"Space Settings",onClick:s(o),border:{side:"bottom",color:"border"}},{label:"Customize Space List",onClick:s(t)}]),[o,t,a]);return(0,x.jsx)(l.Flex,{column:!0,round:.5,border:{side:"all",color:"border"},children:r.map((e=>(0,x.jsx)(Q.A,{...e},e.label)))})},oe=u.default.div.withConfig({displayName:"separator__Separator",componentId:"sc-met802-0"})(["height:1px;width:",";background:",";"],(0,l.getSizeBy)(3),(0,l.getColor)("border")),te=()=>{const e=(0,n.useRef)(),[o,t,,a]=(0,c.A)(!1),[s,,r,i]=(0,c.A)(),d=(0,h.A)(),{spaceIds:u}=d||{},p=(0,b.uW)("isAnonymous"),g=(0,j.A)();return p||!u.length?null:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(oe,{"data-testid":"workspaceBar-separator"}),(0,x.jsx)(l.Flex,{"data-testid":"space-list-settings-container",ref:e,children:(0,x.jsx)(l.IconButton,{icon:"settings_h",iconColor:"text",neutral:!0,onClick:t})}),e.current&&o?(0,x.jsx)(l.Drop,{width:45,target:e.current,align:{top:"top",left:"right"},background:"darkBackground",round:!0,onClickOutside:a,onEsc:a,children:(0,x.jsx)(ee,{onSpaceSettingsClick:g,onSpaceListClick:r,onClose:a})}):null,s&&(0,x.jsx)(X,{onClose:i})]})};var ne=t(30582),le=t(99746),ae=t(51571),se=t(19186),re=t(45187),ie=t(48464),ce=t(39175);const de=(0,P.A)(l.IconButton),ue=e=>{const o=(0,se.ID)(),t=(0,ce.tB)(o),n=(0,b.uW)("isAnonymous"),{isInitialized:a}=(0,re.R)();return!a||t||n?null:(0,x.jsx)(l.Flex,{position:"relative",children:(0,x.jsx)(de,{className:ie.zs,"data-testid":"open-referrer-modal",icon:"giftbox",neutral:!0,width:"20px",height:"20px",tooltip:{title:"Referral program",description:"Spread the word, earn up to $1000 with Netdata!"},tooltipProps:{align:"right"},...e})})},pe=(0,P.A)(l.IconButton),he=e=>{let{modalProps:o={},...t}=e;const n=(0,p.vt)(),a=(0,ce.ES)(n);return(0,x.jsx)(l.News,{app:ce.Ay?a?"agent":["cloud","agent"]:"cloud",modalProps:o,children:e=>{let{toggle:o,upToDate:n}=e;return(0,x.jsx)(pe,{icon:"insights",iconColor:n?"text":"attention",onClick:o,"data-ga":"news::click-news::global-view","data-testid":"cloud-app-news",neutral:n,width:"20px",height:"20px",tooltip:{title:"News & Announcements",description:"Stay updated with the latest Netdata features and improvements"},tooltipProps:{align:"right"},...t})}})};var ge=t(41514),xe=t(92318);const Ce=(0,P.A)(l.IconButton),me=(0,u.default)(l.Flex).attrs((e=>({width:"32px",height:"32px",alignItems:"center",justifyContent:"center",border:{side:"all",color:e.isOpen?"primary":"border"},round:"50%",...e}))).withConfig({displayName:"spaceInfo__Accessor",componentId:"sc-1jvcnnq-0"})([""]),be=(0,u.default)(l.Flex).attrs((e=>({column:!0,gap:1,alignItems:"center",...e}))).withConfig({displayName:"spaceInfo__IconsContainer",componentId:"sc-1jvcnnq-1"})(["",""],(e=>{let{visible:o}=e;return o?"":"visibility: hidden;"})),je={onClickOut:()=>(0,ge.H)("header-help","click-out-modal","global-view"),onCloseClick:()=>(0,ge.H)("header-help","click-close","global-view"),onOpenIssueClick:()=>(0,ge.H)("header-help","click-\u03bfpen-issue","global-view"),onContributeClick:()=>(0,ge.H)("header-help","click-contribute","global-view"),onOpenBugClick:()=>(0,ge.H)("header-help","click-bug","global-view"),onSupportClick:()=>(0,ge.H)("header-help","click-support","global-view"),onVisitDocumentClick:()=>(0,ge.H)("header-help","click-visit-doc","global-view"),onGoToDemoClick:()=>(0,ge.H)("header-help","click-go-to-demo","global-view")},fe=()=>{const[e,o]=(0,r.useHovered)({},[]),t=o,a=(0,n.useCallback)((()=>{window.open("https://status.netdata.cloud","_blank")}),[]);return(0,x.jsxs)(l.Flex,{id:"space-info-container",width:"100%",alignItems:"center",ref:e,column:!0,gap:2,children:[(0,x.jsxs)(be,{visible:t,children:[(0,x.jsx)(l.Documentation,{app:"cloud",demoUrl:xe.A.demoUrl,modalProps:{"data-testid":"space-info-content-container"},...je,children:e=>(0,x.jsx)(Ce,{icon:"question",iconColor:"primary",neutral:!1,onClick:e,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",width:"18px",height:"18px",tooltip:{title:"Help & Resources",description:"Read documentation, engage with the community and let us know about any feature requests or bugs"},tooltipProps:{align:"right"}})}),(0,x.jsx)(Ce,{icon:"antenna",iconColor:"primary",neutral:!1,onClick:a,width:"18px",height:"18px",tooltip:{title:"Operational Status",description:"View service status, incidents, and maintenance updates for Netdata Cloud"},tooltipProps:{align:"right"}}),!window.envSettings.onprem&&(0,x.jsx)(n.Suspense,{fallback:"",children:(0,x.jsx)(he,{iconColor:"primary",neutral:!1,modalProps:{"data-testid":"space-info-content-container"}})}),(0,x.jsx)(ue,{iconColor:"primary",neutral:!1})]}),(0,x.jsx)(me,{isOpen:t,children:(0,x.jsx)(l.Icon,{name:"informationPress",color:t?"primary":"text"})})]})};var ve=t(81811),ke=t(94404),we=t(78152);const ye=(0,P.A)(ae.A),Ie=(0,P.A)(i.A),Ae=(0,ke.A)(ye),Se=e=>{let{spacePanelCollapsed:o,toggleSpacePanel:t}=e;const[a,,i,u]=(0,c.A)(),p=(0,s.Zp)(),h=(0,n.useCallback)((function(){let{slug:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(`/spaces/${e}`)}),[]),[g,C]=(0,r.useHovered)({},[]),{accessorEnabled:b,open:j}=(0,ve.A)();return(0,x.jsxs)(l.Flex,{ref:g,height:"100vh",width:12,background:"sideBarMini","data-testid":"workspaceBar",padding:[3,0],column:!0,alignItems:"center",gap:6,justifyContent:"between",children:[(0,x.jsxs)(l.Flex,{width:"100%",column:!0,"data-testid":"workspaceBar-spaces-list",gap:4,alignItems:"center",overflow:"hidden",children:[o&&C?(0,x.jsx)(l.Flex,{"data-testid":"workspaceBar-expandButton",width:"32px",height:"32px",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:t,role:"button",children:(0,x.jsx)(l.Icon,{name:"chevron_right",color:"primary",width:"24px",height:"24px"})}):(0,x.jsx)(d.A,{"data-testid":"workspaceBar-netdataLogo"}),we.lv?(0,x.jsx)(Ie,{label:null,height:"24px",onClick:j,disabled:!b,tooltip:{title:"Netdata AI",description:"You can ask anything about your infrastructure"},tooltipProps:{align:"right"}}):null,(0,x.jsx)(oe,{"data-testid":"workspaceBar-separator"}),(0,x.jsx)(m,{}),(0,x.jsx)(Ae,{permission:"user:CreateSpace",ifForbidden:"hide",icon:"plus",onClick:i,"data-testid":"workspaceBar-addSpace-button",feature:"CreateSpace",isStart:!0,tooltip:{title:"Create New Space",description:"Spaces isolate infrastructure, providing fully independent administration and user management"},tooltipProps:{align:"right"},iconWidth:"20px",iconHeight:"20px",padding:[.5]}),(0,x.jsx)(te,{})]}),(0,x.jsxs)(l.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center",children:[(0,x.jsx)(fe,{}),(0,x.jsx)(le.A,{})]}),a&&(0,x.jsx)(ne.A,{onClose:u,onDone:h})]})};var Fe=t(85005),Re=t(98595),Be=t(64602),Pe=t(99728);const Te=e=>o=>{const t=(0,p.vt)();return(0,n.createElement)(e,{...o,key:t})};var De=t(31933);const _e={isSidebar:!0,padding:[1,2,1,4],textColor:"menuItem"},Me=Te((()=>{const e=(0,Pe.JT)("room:Create"),o=(0,Pe.JT)("room:Read"),[t,a]=(0,c.A)(o),[s,,r,i]=(0,c.A)(!1),d=(0,n.useCallback)((o=>{o.stopPropagation(),e&&r()}),[e]);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Re.A,{"data-testid":"workspaceRooms-menuList",disabled:!o,headerTestId:"workspaceRooms-warRooms",isOpen:t,label:(0,x.jsxs)(l.Flex,{padding:[1,0],margin:[0,0,1,0],flex:!0,justifyContent:"between",alignItems:"center",height:"24px",children:[(0,x.jsxs)(l.Flex,{alignItems:"center",gap:2,children:[(0,x.jsx)(l.Icon,{name:"space_new",color:"menuItem",width:"14px",height:"14px"}),(0,x.jsx)(l.Text,{color:"menuItem",children:"Rooms"})]}),(0,x.jsxs)(l.Flex,{alignItems:"center",gap:2,children:[(0,x.jsx)(R.A,{content:"Create a new room",align:"right",children:(0,x.jsx)(ae.A,{permission:"room:Create",icon:"plus",flavour:"hollow",onClick:d,"data-testid":"workspaceRooms-addWarRoom-button"})}),(0,x.jsx)(Be.v,{right:!t,name:"chevron_down",size:"small",color:"textLite"})]})]}),toggleOpen:a,children:(0,x.jsx)(l.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1],children:(0,x.jsx)(De.A,{..._e})})}),s&&(0,x.jsx)(Fe.n,{onClose:i,isSubmodal:!1})]})}));var Oe=t(7960),Ee=t(85720),He=t(98591);const Le=(0,u.default)(l.Flex).attrs({alignItems:"center",justifyContent:"center",width:10,height:4,round:.5,background:"sideBarMini"}).withConfig({displayName:"styled__AdminPill",componentId:"sc-1ps23b1-0"})(["opacity:0;",":hover &{opacity:1;}"],Ee.G),Ne=(0,Oe.A)((()=>t.e(35).then(t.bind(t,70035))),"CurrentPlan"),ze=e=>{let{children:o,onToggle:t}=e;return(0,x.jsxs)(l.Flex,{column:!0,gap:1,children:[(0,x.jsxs)(l.Flex,{justifyContent:"between",alignItems:"center",children:[(0,x.jsx)(l.Flex,{alignItems:"center",overflow:"hidden",children:o}),(0,x.jsx)(l.Button,{onClick:t,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0})]}),(0,x.jsx)(n.Suspense,{fallback:"",children:(0,x.jsx)(Ne,{})})]})};var We=t(89590),Ue=t(1174),qe=t(61661),Ge=t(89942);const Ye=()=>{const e=(0,Ge.PP)(),[o,t]=(0,qe.XL)(),{reset:l}=(0,qe.b8)(),a=(0,n.useCallback)((()=>{l(),(0,Ge.Z8)({...e,integrationsModalOpen:"true"}),t("true")}),[l,t,e]);return{isIntegrationsVisible:o,hideIntegrations:(0,n.useCallback)((()=>{(0,Ge.Z8)({...e,integrationsModalOpen:""}),t("")}),[e,t]),onIntegrationsClick:a}};var Ve=t(56284);const Je=(0,Oe.A)((()=>t.e(2201).then(t.bind(t,52201)).then((e=>({default:e.TrialWarning})))),"TrialWarning"),Ze=(0,u.default)(Re.N).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),$e=e=>(0,x.jsxs)(l.Flex,{alignItems:"center",gap:2,...e,children:[(0,x.jsx)(Le,{children:(0,x.jsx)(l.TextFemto,{strong:!0,color:"text",children:"ADMIN"})}),(0,x.jsx)(l.Flex,{opacity:"medium",children:(0,x.jsx)(l.Icon,{name:"padlock",size:"small",width:"18px",height:"18px",color:"text"})})]}),Ke={iconWidth:"14px",iconHeight:"14px",padding:[1,2],gap:2,isSidebar:!0,textColor:"menuItem",iconColor:"menuItem"},Xe=e=>{let{toggleSpacePanel:o}=e;const t=(0,p.ap)(),[a,,s,r]=(0,c.A)(),[,i]=(0,He.A)("manageInvitations"),d=(0,p.dg)(),{onIntegrationsClick:u}=Ye();return(0,x.jsxs)(x.Fragment,{children:[a&&(0,x.jsx)(We.A,{onClose:r}),(0,x.jsx)(Re.A,{"data-testid":"spacesPanel",isOpen:!0,label:(0,x.jsx)(ze,{onToggle:o,children:(0,x.jsx)(Ve.default,{maxFontSize:20,Component:l.TextSmall,strong:!0,title:t.name,lineHeight:"unset",children:t.name})}),headerTestId:"spacesPanel-activeSpaceHeader",Header:Ze,children:(0,x.jsxs)(l.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList",children:[(0,x.jsx)(n.Suspense,{fallback:"",children:(0,x.jsx)(Je,{flavour:"sidebar"})}),(0,x.jsx)(Ee.A,{onClick:u,testid:"agentDashboard-addIntegrations",dataGa:"integrations::click-add-integrations::sideMenu",icon:"integrations",...Ke,children:"Integrations"}),d?null:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Ue.A,{permission:"node:Create",children:e=>(0,x.jsx)(Ee.A,{actions:e?null:(0,x.jsx)($e,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:s,testid:"spacesPanel-claimNodes",icon:"nodes_hollow",...Ke,children:"Connect Nodes"})}),(0,x.jsx)(Ue.A,{permission:"space:InviteUser",children:e=>(0,x.jsx)(Ee.A,{actions:e?null:(0,x.jsx)($e,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:i,testid:"spacesPanel-inviteUsers",icon:"user",...Ke,children:"Invite Users"})})]})]})})]})},Qe=e=>{let{spacePanelCollapsed:o,toggleSpacePanel:t}=e;return(0,x.jsx)(l.Collapsible,{width:56,background:"sideBar",border:{side:"right",color:"borderSecondary"},open:!o,direction:"horizontal",children:(0,x.jsxs)(l.Flex,{flex:!0,width:56,column:!0,overflow:{vertical:"hidden"},padding:[2,0],position:"relative",children:[(0,x.jsx)(Xe,{toggleSpacePanel:t}),(0,x.jsx)(l.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0,children:(0,x.jsx)(Me,{})})]})})};var eo=t(29263),oo=t(32788),to=t(37846),no=t(62718),lo=t(14815),ao=t(60908);const so=(0,Oe.A)((()=>Promise.all([t.e(3864),t.e(8791),t.e(3185),t.e(1861)]).then(t.bind(t,53185)))),ro={"data-testid":"addIntegrationModal"},io={"data-testid":"addIntegration-header"},co={"data-testid":"addIntegration-content",overflow:"hidden",hasFooter:!1,padding:[0],hasModalTitle:!1},uo=e=>{let{title:o="Integrations",onClose:t}=e;return(0,x.jsx)(ao.Ay,{feature:"IntegrationsModal",children:(0,x.jsxs)(to.GO,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:t,...ro,children:[(0,x.jsx)(eo.z,{title:(0,x.jsx)(l.TextBig,{color:"textLite",children:o}),onClose:t,...io||{}}),(0,x.jsx)(oo.Yv,{...co||{},children:(0,x.jsx)(n.Suspense,{fallback:(0,x.jsx)(no.H$,{}),children:(0,x.jsx)(so,{flavour:lo.D_.addNodesModal})})})]})})},po=(0,n.memo)((()=>{const[e,o]=(0,a.tF)("spacePanelCollapsed"),{isIntegrationsVisible:t,hideIntegrations:s}=Ye(),r=(0,n.useCallback)((()=>o(!e)),[e,o]);return(0,n.useLayoutEffect)((()=>{const e=setTimeout((()=>window.dispatchEvent(new Event("resize"))),400);return()=>clearTimeout(e)}),[e]),(0,x.jsxs)(l.Flex,{children:[(0,x.jsx)(Se,{spacePanelCollapsed:e,toggleSpacePanel:r}),(0,x.jsx)(Qe,{spacePanelCollapsed:e,toggleSpacePanel:r}),t&&(0,x.jsx)(uo,{onClose:s})]})}))},17702:(e,o,t)=>{t.d(o,{A:()=>i});var n=t(63766),l=t(74891),a=t(74848);const s=(0,l.A)(n.Button),r={icon:"ai",label:"Ask AI",textTransform:"",noWrapper:!0,colorPalette:{primary:"primaryAI",accent:"accentAI",secondaryColor:"secondaryColorAI",primaryHighlight:"primaryHighlightAI",secondaryHighlight:"secondaryHighlightAI"}},i=e=>(0,a.jsx)(s,{...r,...e})},43119:(e,o,t)=>{o.A=void 0;var n=t(96540);o.A=function(e){return(0,n.useEffect)((function(){if(e){var o=function(o){27===o.keyCode&&e(o)};return document.addEventListener("keydown",o),function(){return document.removeEventListener("keydown",o)}}}),[e])}},45187:(e,o,t)=>{t.d(o,{R:()=>i,H:()=>c});var n=t(34843),l=t(52035);const a=(0,l.eU)(!1),s=(0,l.eU)(!1);var r=t(96540);const i=()=>{const[e,o]=(0,n.fp)(a);return{isInitialized:e,init:(0,r.useCallback)((()=>o(!0)),[o])}},c=()=>{const[e,o]=(0,n.fp)(s);return{isActive:e,activate:(0,r.useCallback)((()=>o(!0)),[o]),deactivate:(0,r.useCallback)((()=>o(!1)),[o])}}}}]);