(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4841],{1210:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var r=n(82394),i=n(21831),o=n(82684),u=n(47999),s=n(49894),l=n(93461),c=n(57384),a=n(40881),d=n(72454),f=n(28598);function h(e,t){var n=e.children;return(0,f.jsx)(d.HS,{ref:t,children:n})}var v=o.forwardRef(h),p=n(32063),b=n(85019),j=n(82531),O=n(66166),w=n(3055),m=n(49125),g=n(91427),x=n(24141);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){(0,r.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var k=function(e){var t,n=e.after,r=e.afterHidden,h=e.afterWidth,_=e.afterWidthOverride,k=e.before,y=e.beforeWidth,M=e.breadcrumbs,P=e.children,E=e.errors,C=e.headerMenuItems,S=e.navigationItems,A=e.setErrors,I=e.subheaderChildren,W=e.title,N=e.uuid,D=(0,x.i)().width,H="dashboard_after_width_".concat(N),R="dashboard_before_width_".concat(N),T=(0,o.useRef)(null),B=(0,o.useState)(_?h:(0,g.U2)(H,h)),z=B[0],F=B[1],U=(0,o.useState)(!1),X=U[0],q=U[1],G=(0,o.useState)(k?Math.max((0,g.U2)(R,y),13*m.iI):null),J=G[0],K=G[1],L=(0,o.useState)(!1),Q=L[0],V=L[1],Y=(0,o.useState)(null)[1],$=j.ZP.projects.list({},{revalidateOnFocus:!1}).data,ee=null===$||void 0===$?void 0:$.projects,te=[];M?te.push.apply(te,(0,i.Z)(M)):(null===ee||void 0===ee?void 0:ee.length)>=1&&te.push.apply(te,[{label:function(){var e;return null===(e=ee[0])||void 0===e?void 0:e.name},linkProps:{href:"/"}},{bold:!0,label:function(){return W}}]),(0,o.useEffect)((function(){null===T||void 0===T||!T.current||X||Q||null===Y||void 0===Y||Y(T.current.getBoundingClientRect().width)}),[X,z,Q,J,T,Y,D]),(0,o.useEffect)((function(){X||(0,g.t8)(H,z)}),[r,X,z,H]),(0,o.useEffect)((function(){Q||(0,g.t8)(R,J)}),[Q,J,R]);var ne=(0,O.Z)(h);return(0,o.useEffect)((function(){_&&ne!==h&&F(h)}),[_,h,ne]),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(c.Z,{title:W}),(0,f.jsx)(a.Z,{breadcrumbs:te,menuItems:C,project:null===ee||void 0===ee?void 0:ee[0],version:null===ee||void 0===ee||null===(t=ee[0])||void 0===t?void 0:t.version}),(0,f.jsxs)(d.Nk,{children:[0!==(null===S||void 0===S?void 0:S.length)&&(0,f.jsx)(d.lm,{showMore:!0,children:(0,f.jsx)(b.Z,{navigationItems:S,showMore:!0})}),(0,f.jsx)(l.Z,{flex:1,flexDirection:"column",children:(0,f.jsxs)(p.Z,{after:n,afterHeightOffset:w.Mz,afterHidden:r,afterMousedownActive:X,afterWidth:z,before:k,beforeHeightOffset:w.Mz,beforeMousedownActive:Q,beforeWidth:d.k1+(k?J:0),hideAfterCompletely:!0,leftOffset:k?d.k1:null,mainContainerRef:T,setAfterMousedownActive:q,setAfterWidth:F,setBeforeMousedownActive:V,setBeforeWidth:K,children:[I&&(0,f.jsx)(v,{children:I}),P]})})]}),E&&(0,f.jsx)(u.Z,{disableClickOutside:!0,isOpen:!0,onClickOutside:function(){return null===A||void 0===A?void 0:A(null)},children:(0,f.jsx)(s.Z,Z(Z({},E),{},{onClose:function(){return null===A||void 0===A?void 0:A(null)}}))})]})}},72433:function(e,t,n){"use strict";n.r(t);var r=n(77837),i=n(38860),o=n.n(i),u=n(82684),s=n(56085),l=n(35490),c=n(1210),a=n(41788),d=n(33699),f=n(94353),h=n(28799),v=n(28598);function p(){var e=(0,u.useMemo)((function(){return new l.Z}),[]),t=(0,u.useMemo)((function(){return{api_key:f.l,token:e.decodedToken.token}}),[e]),n=(0,s.ZP)((0,h.Ib)("terminal"),{shouldReconnect:function(){return!0},queryParams:t}),r=n.lastMessage,i=n.sendMessage;return(0,v.jsx)(c.Z,{title:"Terminal",uuid:"terminal/index",children:(0,v.jsx)(d.Z,{lastMessage:r,sendMessage:i})})}p.getInitialProps=(0,r.Z)(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{});case 1:case"end":return e.stop()}}),e)}))),t.default=(0,a.Z)(p)},27271:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/terminal",function(){return n(72433)}])}},function(e){e.O(0,[3879,881,4506,9774,2888,179],(function(){return t=27271,e(e.s=t);var t}));var t=e.O();_N_E=t}]);