(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5601,853],{95601:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(21483),a=n(60977),i=n(98828),o=n(81734);const s=[{id:"@retrolab/terminal-extension:opener",requires:[r.IRouter,i.ITerminalTracker],autoStart:!0,activate:(e,t,n)=>{const{commands:r}=e,a=new RegExp("/terminals/(.*)"),i="router:terminal";r.addCommand(i,{execute:e=>{const t=e.path.match(a);if(!t)return;const[,i]=t;i&&(n.widgetAdded.connect(((e,t)=>{t.content.setOption("closeOnExit",!1)})),r.execute("terminal:open",{name:i}))}}),t.register({command:i,pattern:a})}},{id:"@retrolab/terminal-extension:redirect",requires:[i.ITerminalTracker],autoStart:!0,activate:(e,t)=>{const n=a.PageConfig.getBaseUrl();t.widgetAdded.connect(((t,r)=>{if((0,o.find)(e.shell.widgets("main"),(e=>e.id===r.id)))return;const a=r.content.session.name;window.open(`${n}retro/terminals/${a}`,"_blank"),r.dispose()}))}}]}}]);