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/6842.192ce36fad4c34fb0c91.chunk.js
try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8a2e5dc3-6812-4f92-99f6-10d031a4bb6b",e._sentryDebugIdIdentifier="sentry-dbid-8a2e5dc3-6812-4f92-99f6-10d031a4bb6b")}()}catch(e){}!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"211fba685705af0d3bd5f116a0eb09f7293a1656"}}catch(e){}}(),(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[5187,6842],{17667:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ut});var o=n(96540),l=n(63766),r=n(24285),a=n(88934),s=n(18121),i=n(17702),c=n(6304),d=n(32742),u=(n(98992),n(81454),n(33185)),p=n(24609),h=n(70140),g=n(24655),x=n(74848);const m=(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;}"]),C=()=>{const e=(0,p.vt)(),t=(0,h.A)(),{spaceIds:n,colors:o}=t||{};return(0,x.jsx)(m,{"data-testid":"workspaceBar-spacesList",children:n.map((t=>{const n=o?.[t];return(0,x.jsx)(g.A,{testIdPrefix:"workspaceBar-space",spaceId:t,active:t===e,backgroundColor:n},t)}))})};var b=n(46587),f=n(72679),j=n(64156),v=n(63872);const k=()=>{const e=(0,o.useRef)(),[t,,n,l]=(0,c.A)(),[a,s]=(0,r.tF)("spacesList"),i=(0,h.A)(),[d,u]=(0,o.useState)(i),[p,,g,x]=(0,c.A)(),[m]=(0,v.A)(),C=(0,o.useCallback)((e=>{u((t=>({...t,spaceIds:e})))}),[u]),b=(0,o.useCallback)((e=>{let{id:t,color:n}=e;u((e=>({...e,colors:{...e.colors,[t]:n}})))}),[u]),f=(0,o.useCallback)((e=>{u((t=>({...t,colors:{...t.colors,[e]:i.colors?.[e]}})))}),[i,u]),j=(0,o.useCallback)((e=>{u((t=>({...t,colors:{...t.colors,[e]:void 0}})))}),[u]),k=(0,o.useCallback)((e=>{n(),s(d),l(),x(),m({header:"Success",text:"Your changes have been successfully saved."}),"function"===typeof e&&e()}),[d,s,x,m,n,l]),w=(0,o.useMemo)((()=>!!a),[a]),y=(0,o.useCallback)((()=>{n(),s(null),l(),m({header:"Success",text:"All settings have been successfully deleted."})}),[s,n,l]),I=(0,o.useCallback)((()=>{u(i),x()}),[i,u,x]);return(0,o.useEffect)((()=>{u(i)}),[i,u]),(0,o.useEffect)((()=>(e.current=Date.now(),()=>{e.current=0})),[]),(0,o.useEffect)((()=>{Date.now()-e.current>500&&g()}),[d,e]),{state:d,onOrderChange:C,onColorChange:b,onColorReset:f,onColorClear:j,onSave:k,onDelete:y,onReset:I,canDelete:w,isDirty:p,loading:t}};var w=n(43375),y=n(43627),I=n(74979),A=n(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 B=n(45087);n(8872);const R={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 _=n(74891);const T=(0,_.A)(S),P=e=>{let{value:t,theme:n,onChange:r}=e;const a=(0,o.useMemo)((()=>Object.entries(R).reduce(((e,t)=>{let[o,r]=t;return[...e,...r.map((e=>(0,l.getColor)([o,e])({theme:n})))]}),[])),[n]),s=(0,o.useCallback)((()=>{const e=Math.floor(Math.random()*a.length-1),t=a[e];r({target:{value:t}})}),[a,r]);return(0,x.jsx)(T,{border:"none",background:t,onClick:s,tooltip:"Change to random color",children:(0,x.jsx)(F,{name:"refresh",backgroundColor:t})})},D=(0,o.memo)(P),H=e=>{let{theme:t,onChange:n}=e;return(0,x.jsx)(l.Flex,{gap:2,children:Object.entries(R).map((e=>{let[o,r]=e;return(0,x.jsx)(l.Flex,{column:!0,gap:2,children:r.map((e=>{const r=(0,l.getColor)([o,e])({theme:t});return(0,x.jsx)(S,{border:"none",background:r,onClick:()=>n({target:{value:r}})},e)}))},o)}))})},N=(0,o.memo)(H),M=e=>{let{value:t,onChange:n}=e;const r=(0,u.useTheme)(),[a,s]=(0,o.useState)();return(0,o.useEffect)((()=>{s((0,A.Bi)(t)?null:"Invalid color value.")}),[t]),(0,x.jsxs)(l.Flex,{column:!0,gap:2,padding:[4],children:[(0,x.jsxs)(l.Flex,{gap:2,children:[(0,x.jsx)(D,{value:t,theme:r,onChange:n}),(0,x.jsx)(l.TextInput,{height:7,value:t,onChange:n,error:a})]}),(0,x.jsx)(l.TextSmall,{children:"Choose from default colors."}),(0,x.jsx)(N,{theme:r,onChange:n})]})},L=e=>{let{value:t,tooltip:n,onChange:r}=e;const a=(0,o.useRef)(),[s,i,,d]=(0,c.A)(!1);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(B.A,{align:"bottom",content:n,children:(0,x.jsx)(l.Flex,{ref:a,children:(0,x.jsx)(S,{background:t,onClick:i})})}),a.current&&s?(0,x.jsx)(l.Drop,{width:60,target:a.current,align:{top:"bottom",right:"right"},background:"modalBackground",margin:[2,0,0],round:!0,onClickOutside:d,onEsc:d,children:(0,x.jsx)(M,{value:t,onChange:r})}):null]})},O=e=>{let{value:t,onChange:n}=e;const l=(0,u.useTheme)(),r=(0,o.useMemo)((()=>l?.colors?.spaceIdle),[l]);return(0,x.jsx)(L,{value:t||r,onChange:n,tooltip:"Change color"})},E=e=>{let{id:t,color:n,onColorChange:l,onColorReset:r,onColorClear:a}=e;const s=(0,h.A)(),i=(0,o.useMemo)((()=>s.colors?.[t]!=n),[s,n]),c=(0,o.useCallback)((e=>{l({id:t,color:e.target.value})}),[t,l]),d=(0,o.useCallback)((()=>{r(t)}),[t,r]),u=(0,o.useCallback)((()=>{a(t)}),[t,a]);return{isDirty:i,hasColor:!!n,onChange:c,onReset:d,onClear:u}},z=(0,_.A)(l.Icon),W=e=>{let{id:t,color:n,onColorChange:o,onColorReset:r,onColorClear:a}=e;const{attributes:s,listeners:i,setNodeRef:c,transform:d,transition:u}=(0,y.gl)({id:t}),h={transform:I.Ks.Transform.toString(d),transition:u},{name:g}=(0,p.ns)(t),{isDirty:m,hasColor:C,onChange:b,onReset:f,onClear:j}=E({id:t,color:n,onColorChange:o,onColorReset:r,onColorClear:a});return(0,x.jsx)("div",{ref:c,style:h,...s,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)(O,{value:n,onChange:b}),(0,x.jsx)(l.TextBig,{padding:[0,0,0,2],children:g}),m?(0,x.jsx)(z,{name:"reload",color:"text",cursor:"pointer",onClick:f,tooltip:"Reset background color to previous value",noWrapper:!0}):null,C?(0,x.jsx)(z,{name:"x",color:"text",cursor:"pointer",onClick:j,tooltip:"Remove background color",noWrapper:!0}):null]},t)})},U=e=>{let{spaceIds:t,colors:n,onOrderChange:l,onColorChange:r,onColorReset:a,onColorClear:s}=e;const[i,c]=(0,o.useState)(t),d=(0,w.FR)((0,w.MS)(w.AN),(0,w.MS)(w.uN,{coordinateGetter:y.JR})),u=(0,o.useCallback)((e=>{const{active:t,over:n}=e;t?.id&&n?.id&&t.id!==n.id&&c((e=>{const o=e.indexOf(t.id),l=e.indexOf(n.id);return(0,y.be)(e,o,l)}))}),[y.be,c]);return(0,o.useEffect)((()=>{c(t)}),[t,c]),(0,o.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:n?.[e],onColorChange:r,onColorReset:a,onColorClear:s},e)))})})},V=e=>{let{spaceIds:t,colors:n,onOrderChange:o,onColorChange:r,onColorReset:a,onColorClear:s}=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:t,colors:n,onOrderChange:o,onColorChange:r,onColorReset:a,onColorClear:s})})]})},q="closeModal",G="deleteSettings",Y=()=>(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?"})]}),$=()=>(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?"})]}),J={[q]:{title:"Close modal",confirmLabel:"Close without saving",message:(0,x.jsx)(Y,{})},[G]:{title:"Delete settings",confirmLabel:"Yes, delete settings",message:(0,x.jsx)($,{})}},Z=e=>{let{flavour:t,handleConfirm:n,handleDecline:r}=e;const a=(0,o.useMemo)((()=>J[t]),[t]);return(0,x.jsx)(l.ConfirmationDialog,{"data-testid":"spacesListDialog",handleConfirm:n,handleDecline:r,...a})},K=(0,_.A)(l.Button),X=e=>{let{onClose:t}=e;const{state:n,onOrderChange:r,onColorChange:a,onColorReset:s,onColorClear:i,onSave:c,onDelete:d,onReset:u,canDelete:p,isDirty:h,loading:g}=k(),{spaceIds:m,colors:C}=n||{},b=(0,j.A)("(max-width: 767px)"),f=g,[v,w]=(0,o.useState)(),y=(0,o.useCallback)((()=>w()),[w]),I=(0,o.useMemo)((()=>({width:b?"90vw":{min:"400px",base:"30vw"},height:b?"90vh":{max:"90vh"}})),[b]),A=(0,o.useCallback)((()=>{h?w(q):t()}),[h,w,t]),S=(0,o.useCallback)((()=>{w(G)}),[w]),F=(0,o.useCallback)((()=>{if(v===q)return y(),void t();v===G&&(d(),t())}),[v,t,y]),B=(0,o.useCallback)((()=>{c(t)}),[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)(V,{spaceIds:m,colors:C,onOrderChange:r,onColorChange:a,onColorReset:s,onColorClear:i})}),(0,x.jsxs)(l.ModalFooter,{gap:2,justifyContent:"between",children:[(0,x.jsx)(K,{label:"Delete all settings",flavour:"borderless",disabled:f||!p,onClick:S,danger:!0,tooltip:f||!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:f}),(0,x.jsx)(l.Button,{label:"Reset",flavour:"hollow",onClick:u,disabled:f||!h}),(0,x.jsx)(l.Button,{label:"Save",onClick:B,disabled:f||!h})]})]})]})}),v?(0,x.jsx)(Z,{flavour:v,handleConfirm:F,handleDecline:y}):null]})};var Q=n(21548);const ee=e=>{let{onSpaceSettingsClick:t,onSpaceListClick:n,onClose:r}=e;const a=(0,o.useCallback)((e=>()=>{"function"===typeof e&&e(),r()}),[r]),s=(0,o.useMemo)((()=>[{label:"Space Settings",onClick:a(t),border:{side:"bottom",color:"border"}},{label:"Customize Space List",onClick:a(n)}]),[t,n,r]);return(0,x.jsx)(l.Flex,{column:!0,round:.5,border:{side:"all",color:"border"},children:s.map((e=>(0,x.jsx)(Q.A,{...e},e.label)))})},te=u.default.div.withConfig({displayName:"separator__Separator",componentId:"sc-met802-0"})(["height:1px;width:",";background:",";"],(0,l.getSizeBy)(3),(0,l.getColor)("border")),ne=()=>{const e=(0,o.useRef)(),[t,n,,r]=(0,c.A)(!1),[a,,s,i]=(0,c.A)(),d=(0,h.A)(),{spaceIds:u}=d||{},p=(0,b.uW)("isAnonymous"),g=(0,f.A)();return p||!u.length?null:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(te,{"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:n})}),e.current&&t?(0,x.jsx)(l.Drop,{width:45,target:e.current,align:{top:"top",left:"right"},background:"darkBackground",round:!0,onClickOutside:r,onEsc:r,children:(0,x.jsx)(ee,{onSpaceSettingsClick:g,onSpaceListClick:s,onClose:r})}):null,a&&(0,x.jsx)(X,{onClose:i})]})};var oe=n(30582),le=n(99746),re=n(51571),ae=n(19186),se=n(45187),ie=n(48464),ce=n(39175);const de=(0,_.A)(l.IconButton),ue=e=>{const t=(0,ae.ID)(),n=(0,ce.tB)(t),o=(0,b.uW)("isAnonymous"),{isInitialized:r}=(0,se.R)();return!r||n||o?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,_.A)(l.IconButton),he=e=>{let{modalProps:t={},...n}=e;const o=(0,p.vt)(),r=(0,ce.ES)(o);return(0,x.jsx)(l.News,{app:ce.Ay?r?"agent":["cloud","agent"]:"cloud",modalProps:t,children:e=>{let{toggle:t,upToDate:o}=e;return(0,x.jsx)(pe,{icon:"insights",iconColor:o?"text":"attention",onClick:t,"data-ga":"news::click-news::global-view","data-testid":"cloud-app-news",neutral:o,width:"20px",height:"20px",tooltip:{title:"News & Announcements",description:"Stay updated with the latest Netdata features and improvements"},tooltipProps:{align:"right"},...n})}})};var ge=n(41514),xe=n(92318);const me=(0,_.A)(l.IconButton),Ce=(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:t}=e;return t?"":"visibility: hidden;"})),fe={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")},je=()=>{const[e,t]=(0,s.useHovered)({},[]),n=t,r=(0,o.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:n,children:[(0,x.jsx)(l.Documentation,{app:"cloud",demoUrl:xe.A.demoUrl,modalProps:{"data-testid":"space-info-content-container"},...fe,children:e=>(0,x.jsx)(me,{icon:"question",iconColor:"primary",neutral:!1,onClick:e,"data-ga":"header-help::click-help::global-view","data-testid":"documentation-button",width:"16px",height:"16px",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)(me,{icon:"antenna",iconColor:"primary",neutral:!1,onClick:r,width:"16px",height:"16px",tooltip:{title:"Operational Status",description:"View service status, incidents, and maintenance updates for Netdata Cloud"},tooltipProps:{align:"right"}}),!window.envSettings.onprem&&(0,x.jsx)(o.Suspense,{fallback:"",children:(0,x.jsx)(he,{iconColor:"primary",neutral:!1,modalProps:{"data-testid":"space-info-content-container"},width:"16px",height:"16px"})}),(0,x.jsx)(ue,{iconColor:"primary",neutral:!1,width:"16px",height:"16px"})]}),(0,x.jsx)(Ce,{isOpen:n,children:(0,x.jsx)(l.Icon,{name:"informationPress",color:n?"primary":"text"})})]})};var ve=n(81811),ke=n(94404),we=n(78152);const ye=(0,_.A)(re.A),Ie=(0,_.A)(i.A),Ae=(0,ke.A)(ye),Se=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;const[r,,i,u]=(0,c.A)(),p=(0,a.Zp)(),h=(0,o.useCallback)((function(){let{slug:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return p(`/spaces/${e}`)}),[]),[g,m]=(0,s.useHovered)({},[]),{accessorEnabled:b,open:f}=(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:[t&&m?(0,x.jsx)(l.Flex,{"data-testid":"workspaceBar-expandButton",width:"32px",height:"32px",alignItems:"center",justifyContent:"center",cursor:"pointer",onClick:n,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:f,disabled:!b,tooltip:{title:"Netdata AI",description:"You can ask anything about your infrastructure"},tooltipProps:{align:"right"}}):null,(0,x.jsx)(te,{"data-testid":"workspaceBar-separator"}),(0,x.jsx)(C,{}),(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)(ne,{})]}),(0,x.jsxs)(l.Flex,{column:!0,"data-testid":"workspaceBar-actionsList",gap:4,alignItems:"center",children:[(0,x.jsx)(je,{}),(0,x.jsx)(le.A,{})]}),r&&(0,x.jsx)(oe.A,{onClose:u,onDone:h})]})};var Fe=n(85005),Be=n(98595),Re=n(64602),_e=n(99728);const Te=e=>t=>{const n=(0,p.vt)();return(0,o.createElement)(e,{...t,key:n})};var Pe=n(31933);const De={isSidebar:!0,padding:[1,2,1,4],textColor:"menuItem"},He=Te((()=>{const e=(0,_e.JT)("room:Create"),t=(0,_e.JT)("room:Read"),[n,r]=(0,c.A)(t),[a,,s,i]=(0,c.A)(!1),d=(0,o.useCallback)((t=>{t.stopPropagation(),e&&s()}),[e]);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Be.A,{"data-testid":"workspaceRooms-menuList",disabled:!t,headerTestId:"workspaceRooms-warRooms",isOpen:n,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)(B.A,{content:"Create a new room",align:"right",children:(0,x.jsx)(re.A,{permission:"room:Create",icon:"plus",flavour:"hollow",onClick:d,"data-testid":"workspaceRooms-addWarRoom-button"})}),(0,x.jsx)(Re.v,{right:!n,name:"chevron_down",size:"small",color:"textLite"})]})]}),toggleOpen:r,children:(0,x.jsx)(l.Flex,{column:!0,"data-testid":"workspaceRooms-warRoomsList",padding:[0,0,1],children:(0,x.jsx)(Pe.A,{...De})})}),a&&(0,x.jsx)(Fe.n,{onClose:i,isSubmodal:!1})]})}));var Ne=n(7960),Me=n(85720),Le=n(98591);const Oe=(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;}"],Me.G),Ee=(0,Ne.A)((()=>n.e(35).then(n.bind(n,70035))),"CurrentPlan"),ze=e=>{let{children:t,onToggle:n}=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:t}),(0,x.jsx)(l.Button,{onClick:n,icon:"chevron_left",neutral:!0,flavour:"hollow",small:!0})]}),(0,x.jsx)(o.Suspense,{fallback:"",children:(0,x.jsx)(Ee,{})})]})};var We=n(89590),Ue=n(1174),Ve=n(61661),qe=n(89942);const Ge=()=>{const e=(0,qe.PP)(),[t,n]=(0,Ve.XL)(),{reset:l}=(0,Ve.b8)(),r=(0,o.useCallback)((()=>{l(),(0,qe.Z8)({...e,integrationsModalOpen:"true"}),n("true")}),[l,n,e]);return{isIntegrationsVisible:t,hideIntegrations:(0,o.useCallback)((()=>{(0,qe.Z8)({...e,integrationsModalOpen:""}),n("")}),[e,n]),onIntegrationsClick:r}};var Ye=n(56284);const $e=(0,Ne.A)((()=>n.e(2201).then(n.bind(n,52201)).then((e=>({default:e.TrialWarning})))),"TrialWarning"),Je=(0,u.default)(Be.N).attrs({padding:[2],color:"textLite"}).withConfig({displayName:"spacePanel__ListHeader",componentId:"sc-1275zgk-0"})([""]),Ze=e=>(0,x.jsxs)(l.Flex,{alignItems:"center",gap:2,...e,children:[(0,x.jsx)(Oe,{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:t}=e;const n=(0,p.ap)(),[r,,a,s]=(0,c.A)(),[,i]=(0,Le.A)("manageInvitations"),d=(0,p.dg)(),{onIntegrationsClick:u}=Ge();return(0,x.jsxs)(x.Fragment,{children:[r&&(0,x.jsx)(We.A,{onClose:s}),(0,x.jsx)(Be.A,{"data-testid":"spacesPanel",isOpen:!0,label:(0,x.jsx)(ze,{onToggle:t,children:(0,x.jsx)(Ye.default,{maxFontSize:20,Component:l.TextSmall,strong:!0,title:n.name,lineHeight:"unset",children:n.name})}),headerTestId:"spacesPanel-activeSpaceHeader",Header:Je,children:(0,x.jsxs)(l.Flex,{column:!0,padding:[2,0,1],"data-testid":"spacesPanel-menuList",children:[(0,x.jsx)(o.Suspense,{fallback:"",children:(0,x.jsx)($e,{flavour:"sidebar"})}),(0,x.jsx)(Me.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)(Me.A,{actions:e?null:(0,x.jsx)(Ze,{"data-testid":"adminWarning-notAdmin"}),disabled:!e,onClick:a,testid:"spacesPanel-claimNodes",icon:"nodes_hollow",...Ke,children:"Connect Nodes"})}),(0,x.jsx)(Ue.A,{permission:"space:InviteUser",children:e=>(0,x.jsx)(Me.A,{actions:e?null:(0,x.jsx)(Ze,{"data-testid":"adminWarning-cannotInvite"}),disabled:!e,onClick:i,testid:"spacesPanel-inviteUsers",icon:"user",...Ke,children:"Invite Users"})})]})]})})]})},Qe=e=>{let{spacePanelCollapsed:t,toggleSpacePanel:n}=e;return(0,x.jsx)(l.Collapsible,{width:56,background:"sideBar",border:{side:"right",color:"borderSecondary"},open:!t,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:n}),(0,x.jsx)(l.Flex,{overflow:{vertical:"auto"},flex:!0,column:!0,children:(0,x.jsx)(He,{})})]})})};var et=n(29263),tt=n(32788),nt=n(37846),ot=n(62718),lt=n(14815),rt=n(60908);const at=(0,Ne.A)((()=>Promise.all([n.e(3864),n.e(8791),n.e(3185),n.e(1861)]).then(n.bind(n,53185)))),st={"data-testid":"addIntegrationModal"},it={"data-testid":"addIntegration-header"},ct={"data-testid":"addIntegration-content",overflow:"hidden",hasFooter:!1,padding:[0],hasModalTitle:!1},dt=e=>{let{title:t="Integrations",onClose:n}=e;return(0,x.jsx)(rt.Ay,{feature:"IntegrationsModal",children:(0,x.jsxs)(nt.GO,{right:!0,closeOnEsc:!0,closeOnOverlayClick:!0,onClose:n,...st,children:[(0,x.jsx)(et.z,{title:(0,x.jsx)(l.TextBig,{color:"textLite",children:t}),onClose:n,...it||{}}),(0,x.jsx)(tt.Yv,{...ct||{},children:(0,x.jsx)(o.Suspense,{fallback:(0,x.jsx)(ot.H$,{}),children:(0,x.jsx)(at,{flavour:lt.D_.addNodesModal})})})]})})},ut=(0,o.memo)((()=>{const[e,t]=(0,r.tF)("spacePanelCollapsed"),{isIntegrationsVisible:n,hideIntegrations:a}=Ge(),s=(0,o.useCallback)((()=>t(!e)),[e,t]);return(0,o.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:s}),(0,x.jsx)(Qe,{spacePanelCollapsed:e,toggleSpacePanel:s}),n&&(0,x.jsx)(dt,{onClose:a})]})}))},17702:(e,t,n)=>{n.d(t,{A:()=>i});var o=n(63766),l=n(74891),r=n(74848);const a=(0,l.A)(o.Button),s={icon:"ai",label:"Ask AI",textTransform:"",noWrapper:!0,colorPalette:{primary:"primaryAI",accent:"accentAI",secondaryColor:"secondaryColorAI",primaryHighlight:"primaryHighlightAI",secondaryHighlight:"secondaryHighlightAI"}},i=e=>(0,r.jsx)(a,{...s,...e})},21996:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(33185),l=n(63766),r=n(74848);const a=o.default.textarea.withConfig({displayName:"textarea__TextareaField",componentId:"sc-id2xk2-0"})(["width:",";background:",";border-width:1px;border-style:solid;border-color:",";border-radius:",";color:",";padding:8px 12px;opacity:",";font-size:",';font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif;resize:',";",""],(e=>{let{width:t}=e;return t||"auto"}),(e=>{let{background:t}=e;return(0,l.getColor)(t||"inputBg")}),(e=>{let{hasValue:t,error:n}=e;return t?(0,l.getColor)("text"):n?(0,l.getColor)("error"):(0,l.getColor)("inputBorder")}),(e=>{let{round:t}=e;return t||"2px"}),(e=>{let{disabled:t,hasValue:n}=e;return n?(0,l.getColor)("text"):t?(0,l.getColor)("placeholder"):(0,l.getColor)("textLite")}),(e=>{let{disabled:t}=e;return t?".4":"1"}),(e=>{let{fontSize:t}=e;return t||"14px"}),(e=>{let{resize:t}=e;return t||"both"}),(e=>{let{minHeight:t}=e;return t?`min-height: ${t}`:""})),s=e=>{let{value:t,placeholder:n,disabled:o,onChange:l,options:s,rawErrors:i,...c}=e;const{rows:d=2}=s||{};return(0,r.jsx)(a,{placeholder:n,disabled:o,onChange:e=>l(e.target.value),rows:d,value:t,hasValue:!!t,error:!!i?.length,...c})}},32277:(e,t,n)=>{n.d(t,{A:()=>h});var o=n(33185),l=n(63766),r=n(79748),a=n(30005),s=n(92318),i=n(74848);const c=e=>(0,i.jsx)(l.TextBig,{fontSize:"14px",lineHeight:1.5,...e}),d=(0,o.default)(c).withConfig({displayName:"markdocSchema__ItalicText",componentId:"sc-3ofl2o-0"})(["font-style:italic;"]),u=o.default.ol.withConfig({displayName:"markdocSchema__OrderedList",componentId:"sc-3ofl2o-1"})(["list-style:roman;padding-left:16px;font-size:14px;line-height:1.5;"]),p=o.default.ul.withConfig({displayName:"markdocSchema__UnorderedList",componentId:"sc-3ofl2o-2"})(['list-style-image:url("','/img/list-style-image.svg");font-size:14px;padding-left:16px;line-height:1.5;'],s.A.assetsBaseURL),h={heading:{render:e=>{let{level:t=1,...n}=e,o=l.H1;switch(t){case 2:o=l.H2;break;case 3:o=l.H3;break;case 4:o=l.H4;break;case 5:o=l.H5;break;case 6:o=l.H6}return(0,i.jsx)(o,{margin:[2,0],...n})},attributes:{id:{type:String},level:{type:Number}}},paragraph:{render:e=>{let{children:t,...n}=e;return(0,i.jsx)(l.Flex,{padding:[2,0],...n,children:(0,i.jsx)(c,{children:t})})}},strong:{render:e=>{let{children:t,...n}=e;return(0,i.jsx)(c,{strong:!0,...n,children:t})}},em:{render:e=>{let{children:t,...n}=e;return(0,i.jsx)(d,{...n,children:t})}},link:{render:e=>{let{children:t,href:n,...o}=e;return(0,i.jsx)(r.A,{href:n,fontSize:"14px",rel:"noopener noreferrer",target:"_blank",...o,children:t})},attributes:{href:{type:String}}},code:{render:e=>{let{content:t,...n}=e;return(0,i.jsx)(a.R0,{fontSize:"14px",...n,children:t})},attributes:{content:{type:String}}},fence:{render:e=>{let{content:t,...n}=e;return(0,i.jsx)(a.Ay,{...n,children:t})},attributes:{content:{type:String}}},list:{render:e=>{let{ordered:t,children:n,...o}=e;const l=t?u:p;return(0,i.jsx)(l,{...o,children:n})},attributes:{ordered:{type:Boolean}}}}},43119:(e,t,n)=>{t.A=void 0;var o=n(96540);t.A=function(e){return(0,o.useEffect)((function(){if(e){var t=function(t){27===t.keyCode&&e(t)};return document.addEventListener("keydown",t),function(){return document.removeEventListener("keydown",t)}}}),[e])}},45187:(e,t,n)=>{n.d(t,{R:()=>i,H:()=>c});var o=n(34843),l=n(52035);const r=(0,l.eU)(!1),a=(0,l.eU)(!1);var s=n(96540);const i=()=>{const[e,t]=(0,o.fp)(r);return{isInitialized:e,init:(0,s.useCallback)((()=>t(!0)),[t])}},c=()=>{const[e,t]=(0,o.fp)(a);return{isActive:e,activate:(0,s.useCallback)((()=>t(!0)),[t]),deactivate:(0,s.useCallback)((()=>t(!1)),[t])}}}}]);