"use strict";(self.rspackChunk_JUPYTERLAB_CORE_OUTPUT=self.rspackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8109],{52913(e,t,n){n.r(t),n.d(t,{default:()=>l});var o=n(95867),a=n(47743),i=n(20295),r=n(51518);let l=[{id:"@jupyter-notebook/docmanager-extension:opener",autoStart:!0,optional:[i.INotebookPathOpener,i.INotebookShell],provides:a.IDocumentWidgetOpener,description:"Open documents in a new browser tab",activate:(e,t,n)=>{let a=o.PageConfig.getBaseUrl(),l=e.docRegistry,d=null!=t?t:i.defaultNotebookPathOpener,s=0;return new class{constructor(){this._opened=new r.Signal(this)}async open(t,i){var r,u,c;let p=null!=(r=null==i?void 0:i.type)?r:"",h=null==i?void 0:i.ref,f=null==(c=null==(u=null==n?void 0:n.userLayout)?void 0:u[p])?void 0:c.area;if("_noref"!==h&&void 0===f){let e,n=t.context.path,i=o.PathExt.extname(n),r="edit";("default"===p&&".ipynb"===i||p.includes("Notebook"))&&(t.context.sessionContext.kernelPreference.name&&await t.context.save(),r="notebooks"),p!==l.defaultWidgetFactory(n).name&&(e=new URLSearchParams({factory:p})),d.open({prefix:o.URLExt.join(a,r),path:n,searchParams:e}),t.dispose();return}t.id||(t.id=`document-manager-${++s}`),t.title.dataset={type:"document-title",...t.title.dataset},t.isAttached||e.shell.add(t,"main",i||{}),e.shell.activateById(t.id),this._opened.emit(t)}get opened(){return this._opened}}}}]}}]);