notebook 7.2.0__py3-none-any.whl → 7.2.0a0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of notebook might be problematic. Click here for more details.

Files changed (188) hide show
  1. notebook/_version.py +1 -1
  2. notebook/static/{6078.bundle.js → 1053.bundle.js} +1 -1
  3. notebook/static/1198.bundle.js +1 -1
  4. notebook/static/134.bundle.js +1 -1
  5. notebook/static/1408.bundle.js +1 -1
  6. notebook/static/1496.bundle.js +1 -1
  7. notebook/static/1647.bundle.js +1 -1
  8. notebook/static/1650.bundle.js +1 -1
  9. notebook/static/1684.bundle.js +1 -1
  10. notebook/static/1809.bundle.js +1 -1
  11. notebook/static/1827.bundle.js +1 -1
  12. notebook/static/1833.bundle.js +1 -1
  13. notebook/static/1846.bundle.js +1 -1
  14. notebook/static/1950.bundle.js +1 -0
  15. notebook/static/1958.bundle.js +1 -1
  16. notebook/static/2007.bundle.js +1 -1
  17. notebook/static/2065.bundle.js +1 -1
  18. notebook/static/2067.bundle.js +1 -0
  19. notebook/static/2088.bundle.js +1 -1
  20. notebook/static/2089.bundle.js +1 -1
  21. notebook/static/2094.bundle.js +1 -0
  22. notebook/static/2122.bundle.js +1 -1
  23. notebook/static/2167.bundle.js +1 -1
  24. notebook/static/2184.bundle.js +1 -1
  25. notebook/static/2311.bundle.js +1 -1
  26. notebook/static/2401.bundle.js +1 -1
  27. notebook/static/2479.bundle.js +1 -1
  28. notebook/static/2489.bundle.js +1 -1
  29. notebook/static/2512.bundle.js +1 -0
  30. notebook/static/2557.bundle.js +743 -0
  31. notebook/static/2577.bundle.js +1 -0
  32. notebook/static/2607.bundle.js +1 -1
  33. notebook/static/2615.bundle.js +1 -1
  34. notebook/static/2758.bundle.js +1 -0
  35. notebook/static/2866.bundle.js +1 -1
  36. notebook/static/2924.bundle.js +1 -1
  37. notebook/static/2944.bundle.js +1 -1
  38. notebook/static/3129.bundle.js +1 -1
  39. notebook/static/3146.bundle.js +1 -1
  40. notebook/static/3187.bundle.js +1 -1
  41. notebook/static/3213.bundle.js +1 -1
  42. notebook/static/3340.bundle.js +1 -1
  43. notebook/static/3360.bundle.js +1 -1
  44. notebook/static/3466.bundle.js +1 -1
  45. notebook/static/3512.bundle.js +1 -1
  46. notebook/static/3654.bundle.js +1 -0
  47. notebook/static/3676.bundle.js +1 -1
  48. notebook/static/3680.bundle.js +1 -1
  49. notebook/static/3768.bundle.js +1 -1
  50. notebook/static/377.bundle.js +1 -1
  51. notebook/static/3863.bundle.js +1 -1
  52. notebook/static/3881.bundle.js +1 -1
  53. notebook/static/4042.bundle.js +1 -1
  54. notebook/static/4212.bundle.js +1 -1
  55. notebook/static/4382.bundle.js +1 -1
  56. notebook/static/4630.bundle.js +1 -1
  57. notebook/static/4645.bundle.js +1 -1
  58. notebook/static/4811.bundle.js +1 -1
  59. notebook/static/4837.bundle.js +1 -1
  60. notebook/static/4928.bundle.js +1 -0
  61. notebook/static/4997.bundle.js +1 -0
  62. notebook/static/5099.bundle.js +1 -1
  63. notebook/static/5135.bundle.js +1 -1
  64. notebook/static/5263.bundle.js +1 -1
  65. notebook/static/5313.bundle.js +1 -1
  66. notebook/static/5325.bundle.js +1 -1
  67. notebook/static/5346.bundle.js +1 -1
  68. notebook/static/5425.bundle.js +1 -1
  69. notebook/static/5426.bundle.js +1 -1
  70. notebook/static/545.bundle.js +1 -1
  71. notebook/static/5573.bundle.js +1 -1
  72. notebook/static/5601.bundle.js +1 -1
  73. notebook/static/5733.bundle.js +1 -1
  74. notebook/static/5912.bundle.js +1 -1
  75. notebook/static/5921.bundle.js +1 -1
  76. notebook/static/6017.bundle.js +1 -1
  77. notebook/static/6139.bundle.js +1 -1
  78. notebook/static/62.bundle.js +1 -1
  79. notebook/static/6256.bundle.js +1 -0
  80. notebook/static/6345.bundle.js +1 -1
  81. notebook/static/6467.bundle.js +1 -0
  82. notebook/static/6604.bundle.js +1 -1
  83. notebook/static/6621.bundle.js +1 -1
  84. notebook/static/6627.bundle.js +1 -1
  85. notebook/static/6815.bundle.js +1 -1
  86. notebook/static/6853.bundle.js +1 -1
  87. notebook/static/6893.bundle.js +1 -1
  88. notebook/static/690.bundle.js +1 -1
  89. notebook/static/6962.bundle.js +1 -1
  90. notebook/static/6999.bundle.js +1 -1
  91. notebook/static/7226.bundle.js +1 -1
  92. notebook/static/7252.bundle.js +1 -1
  93. notebook/static/7302.bundle.js +1 -1
  94. notebook/static/7386.bundle.js +1 -1
  95. notebook/static/7391.bundle.js +1 -1
  96. notebook/static/7394.bundle.js +1 -0
  97. notebook/static/7543.bundle.js +1 -1
  98. notebook/static/7603.bundle.js +1 -1
  99. notebook/static/7639.bundle.js +1 -1
  100. notebook/static/7684.bundle.js +1 -1
  101. notebook/static/7812.bundle.js +1 -1
  102. notebook/static/7819.bundle.js +1 -1
  103. notebook/static/7854.bundle.js +1 -1
  104. notebook/static/7900.bundle.js +1 -1
  105. notebook/static/7906.bundle.js +1 -1
  106. notebook/static/8032.bundle.js +1 -1
  107. notebook/static/8471.bundle.js +1 -1
  108. notebook/static/8579.bundle.js +1 -1
  109. notebook/static/8633.bundle.js +1 -1
  110. notebook/static/8771.bundle.js +1 -1
  111. notebook/static/8781.bundle.js +1 -1
  112. notebook/static/8845.bundle.js +1 -1
  113. notebook/static/8875.bundle.js +1 -1
  114. notebook/static/8907.bundle.js +1 -1
  115. notebook/static/8928.bundle.js +1 -1
  116. notebook/static/893.bundle.js +1 -1
  117. notebook/static/901.bundle.js +1 -1
  118. notebook/static/9068.bundle.js +1 -1
  119. notebook/static/9151.bundle.js +1 -1
  120. notebook/static/9161.bundle.js +1 -1
  121. notebook/static/9268.bundle.js +1 -1
  122. notebook/static/9335.bundle.js +1 -1
  123. notebook/static/9341.bundle.js +1 -1
  124. notebook/static/9380.bundle.js +1 -1
  125. notebook/static/9605.bundle.js +1 -1
  126. notebook/static/9638.bundle.js +1 -1
  127. notebook/static/9680.bundle.js +1 -1
  128. notebook/static/9685.bundle.js +1 -1
  129. notebook/static/9752.bundle.js +1 -1
  130. notebook/static/9821.bundle.js +1 -1
  131. notebook/static/9852.bundle.js +1 -1
  132. notebook/static/bundle.js +1 -1
  133. notebook/static/third-party-licenses.json +135 -141
  134. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
  135. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
  136. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  137. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
  138. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
  139. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
  140. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
  141. notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.7788635067bbb0f78314.js +1 -0
  142. notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.76f40c4b4ee1c8583ca3.js → notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.1e2ca839fc49c8dc7f13.js +1 -1
  143. notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/302.8a8d0af0376cb309e580.js → notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/993.b8375a7b921d370031f6.js +1 -1
  144. notebook-7.2.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.e5cd5d0bbfa59d2e79c6.js +1 -0
  145. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  146. {notebook-7.2.0.dist-info → notebook-7.2.0a0.dist-info}/METADATA +4 -4
  147. {notebook-7.2.0.dist-info → notebook-7.2.0a0.dist-info}/RECORD +171 -173
  148. {notebook-7.2.0.dist-info → notebook-7.2.0a0.dist-info}/WHEEL +1 -1
  149. notebook/static/113.bundle.js +0 -1
  150. notebook/static/1884.bundle.js +0 -386
  151. notebook/static/1962.bundle.js +0 -1
  152. notebook/static/2636.bundle.js +0 -1
  153. notebook/static/3462.bundle.js +0 -1
  154. notebook/static/374.bundle.js +0 -1
  155. notebook/static/4430.bundle.js +0 -1
  156. notebook/static/4708.bundle.js +0 -1
  157. notebook/static/5254.bundle.js +0 -1
  158. notebook/static/6521.bundle.js +0 -1
  159. notebook/static/6748.bundle.js +0 -1
  160. notebook/static/7506.bundle.js +0 -703
  161. notebook/static/7655.bundle.js +0 -1
  162. notebook/static/7884.bundle.js +0 -1
  163. notebook/static/9136.bundle.js +0 -1
  164. notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.aff74c88f76bc9000e65.js +0 -1
  165. notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.eced2d228ddfce366f36.js +0 -1
  166. /notebook/static/{7506.bundle.js.LICENSE.txt → 2557.bundle.js.LICENSE.txt} +0 -0
  167. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  168. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  169. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  170. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  171. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  172. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  173. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  174. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  175. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  176. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  177. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  178. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  179. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  180. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  181. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  182. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
  183. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  184. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  185. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  186. {notebook-7.2.0.data → notebook-7.2.0a0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  187. {notebook-7.2.0.dist-info → notebook-7.2.0a0.dist-info}/entry_points.txt +0 -0
  188. {notebook-7.2.0.dist-info → notebook-7.2.0a0.dist-info}/licenses/LICENSE +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[5254],{95254:(e,a,t)=>{t.r(a),t.d(a,{default:()=>i});var r=t(53312),s=t(12030);const i={id:"@jupyterlab/theme-dark-high-contrast-extension:plugin",description:"Adds a dark high contrast theme.",requires:[r.IThemeManager,s.ITranslator],activate:(e,a,t)=>{const r=t.load("jupyterlab");a.register({name:"JupyterLab Dark High Contrast",displayName:r.__("JupyterLab Dark High Contrast"),isLight:!1,themeScrollbars:!0,load:()=>a.loadCSS("@jupyterlab/theme-dark-high-contrast-extension/index.css"),unload:()=>Promise.resolve(void 0)})},autoStart:!0}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6521],{86521:e=>{var t;self,t=()=>(()=>{"use strict";var e={6:(e,t)=>{function r(e){try{const t=new URL(e),r=t.password&&t.username?`${t.protocol}//${t.username}:${t.password}@${t.host}`:t.username?`${t.protocol}//${t.username}@${t.host}`:`${t.protocol}//${t.host}`;return e.toLocaleLowerCase().startsWith(r.toLocaleLowerCase())}catch(e){return!1}}Object.defineProperty(t,"__esModule",{value:!0}),t.LinkComputer=t.WebLinkProvider=void 0,t.WebLinkProvider=class{constructor(e,t,r,n={}){this._terminal=e,this._regex=t,this._handler=r,this._options=n}provideLinks(e,t){const r=n.computeLink(e,this._regex,this._terminal,this._handler);t(this._addCallbacks(r))}_addCallbacks(e){return e.map((e=>(e.leave=this._options.leave,e.hover=(t,r)=>{if(this._options.hover){const{range:n}=e;this._options.hover(t,r,n)}},e)))}};class n{static computeLink(e,t,s,i){const o=new RegExp(t.source,(t.flags||"")+"g"),[a,l]=n._getWindowedLineStrings(e-1,s),c=a.join("");let d;const h=[];for(;d=o.exec(c);){const e=d[0];if(!r(e))continue;const[t,o]=n._mapStrIdx(s,l,0,d.index),[a,c]=n._mapStrIdx(s,t,o,e.length);if(-1===t||-1===o||-1===a||-1===c)continue;const p={start:{x:o+1,y:t+1},end:{x:c,y:a+1}};h.push({range:p,text:e,activate:i})}return h}static _getWindowedLineStrings(e,t){let r,n=e,s=e,i=0,o="";const a=[];if(r=t.buffer.active.getLine(e)){const e=r.translateToString(!0);if(r.isWrapped&&" "!==e[0]){for(i=0;(r=t.buffer.active.getLine(--n))&&i<2048&&(o=r.translateToString(!0),i+=o.length,a.push(o),r.isWrapped&&-1===o.indexOf(" ")););a.reverse()}for(a.push(e),i=0;(r=t.buffer.active.getLine(++s))&&r.isWrapped&&i<2048&&(o=r.translateToString(!0),i+=o.length,a.push(o),-1===o.indexOf(" ")););}return[a,n]}static _mapStrIdx(e,t,r,n){const s=e.buffer.active,i=s.getNullCell();let o=r;for(;n;){const e=s.getLine(t);if(!e)return[-1,-1];for(let r=o;r<e.length;++r){e.getCell(r,i);const o=i.getChars();if(i.getWidth()&&(n-=o.length||1,r===e.length-1&&""===o)){const e=s.getLine(t+1);e&&e.isWrapped&&(e.getCell(0,i),2===i.getWidth()&&(n+=1))}if(n<0)return[t,r]}t++,o=0}return[t,o]}}t.LinkComputer=n}},t={};function r(n){var s=t[n];if(void 0!==s)return s.exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.WebLinksAddon=void 0;const t=r(6),s=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function i(e,t){const r=window.open();if(r){try{r.opener=null}catch{}r.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}e.WebLinksAddon=class{constructor(e=i,t={}){this._handler=e,this._options=t}activate(e){this._terminal=e;const r=this._options,n=r.urlRegex||s;this._linkProvider=this._terminal.registerLinkProvider(new t.WebLinkProvider(this._terminal,n,this._handler,r))}dispose(){this._linkProvider?.dispose()}}})(),n})(),e.exports=t()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[6748],{86748:(e,n,o)=>{o.r(n),o.d(n,{default:()=>P});var t=o(44604),r=o(53312),l=o(51429),s=o(81002),a=o(67260),c=o(71427),i=o(86810),d=o(29879),u=o(81221),p=o(23295),m=o(12030),C=o(35613),v=o(33625),g=o(20998),h=o(2549),b=o(14421);const f={id:"@jupyterlab/console-extension:foreign",description:"Add foreign handler of IOPub messages to the console.",requires:[a.IConsoleTracker,p.ISettingRegistry,m.ITranslator],optional:[r.ICommandPalette],activate:function(e,n,o,t,r){var l;const s=t.load("jupyterlab"),{shell:c}=e;n.widgetAdded.connect(((e,n)=>{const t=n.console,r=new a.ForeignHandler({sessionContext:t.sessionContext,parent:t});k.foreignHandlerProperty.set(t,r),o.get("@jupyterlab/console-extension:tracker","showAllKernelActivity").then((({composite:e})=>{const n=e;r.enabled=n})),t.disposed.connect((()=>{r.dispose()}))}));const{commands:i}=e,d=s.__("Console"),u="console:toggle-show-all-kernel-activity";i.addCommand(u,{label:e=>s.__("Show All Kernel Activity"),execute:e=>{const o=function(e){const o=n.currentWidget;return!1!==e.activate&&o&&c.activateById(o.id),o}(e);if(!o)return;const t=k.foreignHandlerProperty.get(o.console);t&&(t.enabled=!t.enabled)},isToggled:()=>{var e;return null!==n.currentWidget&&!!(null===(e=k.foreignHandlerProperty.get(n.currentWidget.console))||void 0===e?void 0:e.enabled)},isEnabled:()=>null!==n.currentWidget&&n.currentWidget===c.currentWidget});const p=()=>{i.notifyCommandChanged(u)};n.currentChanged.connect(p),null===(l=c.currentChanged)||void 0===l||l.connect(p),r&&r.addItem({command:u,category:d,args:{isPalette:!0}})},autoStart:!0},y=f;var k;!function(e){e.foreignHandlerProperty=new b.AttachedProperty({name:"foreignHandler",create:()=>{}})}(k||(k={}));const _={id:"@jupyterlab/console-extension:cell-executor",description:"Provides the console cell executor.",autoStart:!0,provides:a.IConsoleCellExecutor,activate:()=>Object.freeze({runCell:a.runCell})};var x;!function(e){e.autoClosingBrackets="console:toggle-autoclosing-brackets",e.create="console:create",e.clear="console:clear",e.runUnforced="console:run-unforced",e.runForced="console:run-forced",e.linebreak="console:linebreak",e.interrupt="console:interrupt-kernel",e.restart="console:restart-kernel",e.closeAndShutdown="console:close-and-shutdown",e.open="console:open",e.inject="console:inject",e.changeKernel="console:change-kernel",e.getKernel="console:get-kernel",e.interactionMode="console:interaction-mode",e.redo="console:redo",e.replaceSelection="console:replace-selection",e.shutdown="console:shutdown",e.undo="console:undo",e.invokeCompleter="completer:invoke-console",e.selectCompleter="completer:select-console"}(x||(x={}));const w={id:"@jupyterlab/console-extension:tracker",description:"Provides the console widget tracker.",provides:a.IConsoleTracker,requires:[a.ConsolePanel.IContentFactory,l.IEditorServices,a.IConsoleCellExecutor,u.IRenderMimeRegistry,p.ISettingRegistry],optional:[t.ILayoutRestorer,c.IDefaultFileBrowser,d.IMainMenu,r.ICommandPalette,i.ILauncher,t.ILabStatus,r.ISessionContextDialogs,C.IFormRendererRegistry,m.ITranslator],activate:async function(e,n,o,t,l,s,c,i,d,u,p,b,f,y,k){var _;const w=null!=k?k:m.nullTranslator,I=w.load("jupyterlab"),E=e.serviceManager,{commands:S,shell:P}=e,M=I.__("Console"),j=null!=f?f:new r.SessionContextDialogs({translator:w}),T=new r.WidgetTracker({namespace:"console"});async function A(e){var r,c;await E.ready;const i=new a.ConsolePanel({manager:E,contentFactory:n,mimeTypeService:o.mimeTypeService,rendermime:l,sessionDialogs:j,executor:t,translator:w,setBusy:null!==(r=b&&(()=>b.setBusy()))&&void 0!==r?r:void 0,...e}),d=(await s.get("@jupyterlab/console-extension:tracker","interactionMode")).composite;return i.console.node.dataset.jpInteractionMode=d,await T.add(i),i.sessionContext.propertyChanged.connect((()=>{T.save(i)})),P.add(i,"main",{ref:e.ref,mode:e.insertMode,activate:!1!==e.activate,type:null!==(c=e.type)&&void 0!==c?c:"Console"}),i}c&&c.restore(T,{command:x.create,args:e=>{const{path:n,name:o,kernelPreference:t}=e.console.sessionContext;return{path:n,name:o,kernelPreference:{...t}}},name:e=>{var n;return null!==(n=e.console.sessionContext.path)&&void 0!==n?n:g.UUID.uuid4()},when:E.ready}),p&&E.ready.then((()=>{let e=null;const n=()=>{e&&(e.dispose(),e=null);const n=E.kernelspecs.specs;if(n){e=new h.DisposableSet;for(const o in n.kernelspecs){const t=o===n.default?0:1/0,r=n.kernelspecs[o],l=r.resources["logo-svg"]||r.resources["logo-64x64"];e.add(p.add({command:x.create,args:{isLauncher:!0,kernelPreference:{name:o}},category:I.__("Console"),rank:t,kernelIconUrl:l,metadata:{kernel:g.JSONExt.deepCopy(r.metadata||{})}}))}}};n(),E.kernelspecs.specsChanged.connect(n)}));const K="@jupyterlab/console-extension:tracker";let R,B={};async function U(e){R=(await s.get(K,"interactionMode")).composite,B=(await s.get(K,"promptCellConfig")).composite;const n=e=>{var n,o;e.console.node.dataset.jpInteractionMode=R,e.console.editorConfig=B,null===(o=null===(n=e.console.promptCell)||void 0===n?void 0:n.editor)||void 0===o||o.setOptions(B)};e?n(e):T.forEach(n)}if(s.pluginChanged.connect(((e,n)=>{n===K&&U()})),await U(),y){const e=y.getRenderer("@jupyterlab/codemirror-extension:plugin.defaultConfig");e&&y.addRenderer("@jupyterlab/console-extension:tracker.promptCellConfig",e)}function W(){return null!==T.currentWidget&&T.currentWidget===P.currentWidget}function D(e){const n=T.currentWidget;return!1!==e.activate&&n&&P.activateById(n.id),null!=n?n:null}T.widgetAdded.connect(((e,n)=>{U(n)})),S.addCommand(x.autoClosingBrackets,{execute:async e=>{var n;B.autoClosingBrackets=!!(null!==(n=e.force)&&void 0!==n?n:!B.autoClosingBrackets),await s.set(K,"promptCellConfig",B)},label:I.__("Auto Close Brackets for Code Console Prompt"),isToggled:()=>B.autoClosingBrackets}),S.addCommand(x.open,{label:I.__("Open a console for the provided `path`."),execute:e=>{const n=e.path,o=T.find((e=>{var o;return(null===(o=e.console.sessionContext.session)||void 0===o?void 0:o.path)===n}));return o?(!1!==e.activate&&P.activateById(o.id),o):E.ready.then((()=>(0,v.find)(E.sessions.running(),(e=>e.path===n))?A(e):Promise.reject(`No running kernel session for path: ${n}`)))}}),S.addCommand(x.create,{label:e=>{var n,o,t,r;if(e.isPalette)return I.__("New Console");if(e.isLauncher&&e.kernelPreference){const l=e.kernelPreference;return null!==(r=null===(t=null===(o=null===(n=E.kernelspecs)||void 0===n?void 0:n.specs)||void 0===o?void 0:o.kernelspecs[l.name||""])||void 0===t?void 0:t.display_name)&&void 0!==r?r:""}return I.__("Console")},icon:e=>e.isPalette?void 0:C.consoleIcon,execute:e=>{var n;return A({basePath:null!==(n=e.basePath||e.cwd||(null==i?void 0:i.model.path))&&void 0!==n?n:"",...e})}}),S.addCommand(x.undo,{execute:e=>{var n;const o=D(e);if(!o)return;const t=null===(n=o.console.promptCell)||void 0===n?void 0:n.editor;t&&t.undo()},isEnabled:e=>{var n,o,t;if(!W())return!1;const r=null===(t=null===(o=null===(n=D(e))||void 0===n?void 0:n.console)||void 0===o?void 0:o.promptCell)||void 0===t?void 0:t.editor;return!!r&&r.model.sharedModel.canUndo()},icon:C.undoIcon.bindprops({stylesheet:"menuItem"}),label:I.__("Undo")}),S.addCommand(x.redo,{execute:e=>{var n;const o=D(e);if(!o)return;const t=null===(n=o.console.promptCell)||void 0===n?void 0:n.editor;t&&t.redo()},isEnabled:e=>{var n,o,t;if(!W())return!1;const r=null===(t=null===(o=null===(n=D(e))||void 0===n?void 0:n.console)||void 0===o?void 0:o.promptCell)||void 0===t?void 0:t.editor;return!!r&&r.model.sharedModel.canRedo()},icon:C.redoIcon.bindprops({stylesheet:"menuItem"}),label:I.__("Redo")}),S.addCommand(x.clear,{label:I.__("Clear Console Cells"),execute:e=>{const n=D(e);n&&n.console.clear()},isEnabled:W}),S.addCommand(x.runUnforced,{label:I.__("Run Cell (unforced)"),execute:e=>{const n=D(e);if(n)return n.console.execute()},isEnabled:W}),S.addCommand(x.runForced,{label:I.__("Run Cell (forced)"),execute:e=>{const n=D(e);if(n)return n.console.execute(!0)},isEnabled:W}),S.addCommand(x.linebreak,{label:I.__("Insert Line Break"),execute:e=>{const n=D(e);n&&n.console.insertLinebreak()},isEnabled:W}),S.addCommand(x.replaceSelection,{label:I.__("Replace Selection in Console"),execute:e=>{const n=D(e);if(!n)return;const o=e.text||"";n.console.replaceSelection(o)},isEnabled:W}),S.addCommand(x.interrupt,{label:I.__("Interrupt Kernel"),execute:e=>{var n;const o=D(e);if(!o)return;const t=null===(n=o.console.sessionContext.session)||void 0===n?void 0:n.kernel;return t?t.interrupt():void 0},isEnabled:W}),S.addCommand(x.restart,{label:I.__("Restart Kernel…"),execute:e=>{const n=D(e);if(n)return j.restart(n.console.sessionContext)},isEnabled:W}),S.addCommand(x.shutdown,{label:I.__("Shut Down"),execute:e=>{const n=D(e);if(n)return n.console.sessionContext.shutdown()}}),S.addCommand(x.closeAndShutdown,{label:I.__("Close and Shut Down…"),execute:e=>{const n=D(e);if(n)return(0,r.showDialog)({title:I.__("Shut down the console?"),body:I.__('Are you sure you want to close "%1"?',n.title.label),buttons:[r.Dialog.cancelButton({ariaLabel:I.__("Cancel console Shut Down")}),r.Dialog.warnButton({ariaLabel:I.__("Confirm console Shut Down")})]}).then((e=>!!e.button.accept&&S.execute(x.shutdown,{activate:!1}).then((()=>(n.dispose(),!0)))))},isEnabled:W}),S.addCommand(x.inject,{label:I.__("Inject some code in a console."),execute:e=>{const n=e.path;T.find((o=>{var t;return(null===(t=o.console.sessionContext.session)||void 0===t?void 0:t.path)===n&&(!1!==e.activate&&P.activateById(o.id),o.console.inject(e.code,e.metadata),!0)}))},isEnabled:W}),S.addCommand(x.changeKernel,{label:I.__("Change Kernel…"),execute:e=>{const n=D(e);if(n)return j.selectKernel(n.console.sessionContext)},isEnabled:W}),S.addCommand(x.getKernel,{label:I.__("Get Kernel"),execute:e=>{var n;const o=D({activate:!1,...e});if(o)return null===(n=o.sessionContext.session)||void 0===n?void 0:n.kernel},isEnabled:W});const F=[x.create],L=()=>{Object.values(x).filter((e=>!F.includes(e))).forEach((n=>e.commands.notifyCommandChanged(n)))};T.currentChanged.connect(L),null===(_=P.currentChanged)||void 0===_||_.connect(L),u&&[x.create,x.linebreak,x.clear,x.runUnforced,x.runForced,x.restart,x.interrupt,x.changeKernel,x.closeAndShutdown].forEach((e=>{u.addItem({command:e,category:M,args:{isPalette:!0}})})),d&&(d.fileMenu.closeAndCleaners.add({id:x.closeAndShutdown,isEnabled:W}),d.kernelMenu.kernelUsers.changeKernel.add({id:x.changeKernel,isEnabled:W}),d.kernelMenu.kernelUsers.clearWidget.add({id:x.clear,isEnabled:W}),d.kernelMenu.kernelUsers.interruptKernel.add({id:x.interrupt,isEnabled:W}),d.kernelMenu.kernelUsers.restartKernel.add({id:x.restart,isEnabled:W}),d.kernelMenu.kernelUsers.shutdownKernel.add({id:x.shutdown,isEnabled:W}),d.runMenu.codeRunners.run.add({id:x.runForced,isEnabled:W}),d.editMenu.clearers.clearCurrent.add({id:x.clear,isEnabled:W}),d.editMenu.undoers.redo.add({id:x.redo,isEnabled:W}),d.editMenu.undoers.undo.add({id:x.undo,isEnabled:W}),d.helpMenu.getKernel.add({id:x.getKernel,isEnabled:W}));const O={notebook:I.__("Execute with Shift+Enter"),terminal:I.__("Execute with Enter")};return S.addCommand(x.interactionMode,{label:e=>{var n;return null!==(n=O[e.interactionMode])&&void 0!==n?n:"Set the console interaction mode."},execute:async e=>{try{await s.set(K,"interactionMode",e.interactionMode)}catch(e){console.error(`Failed to set ${K}:keyMap - ${e.message}`)}},isToggled:e=>e.interactionMode===R}),T},autoStart:!0},I={id:"@jupyterlab/console-extension:factory",description:"Provides the console widget content factory.",provides:a.ConsolePanel.IContentFactory,requires:[l.IEditorServices],autoStart:!0,activate:(e,n)=>{const o=n.factoryService.newInlineEditor;return new a.ConsolePanel.ContentFactory({editorFactory:o})}},E={id:"@jupyterlab/console-extension:kernel-status",description:"Adds the console to the kernel status indicator model.",autoStart:!0,requires:[a.IConsoleTracker,r.IKernelStatusModel],activate:(e,n,o)=>{o.addSessionProvider((e=>e&&n.has(e)?e.sessionContext:null))}},S={id:"@jupyterlab/console-extension:cursor-position",description:"Adds the console to the code editor cursor position model.",autoStart:!0,requires:[a.IConsoleTracker,l.IPositionModel],activate:(e,n,o)=>{let t=null;o.addEditorProvider((async e=>{let r=null;if(e!==t){if(null==t||t.console.promptCellCreated.disconnect(o.update),t=null,e&&n.has(e)){e.console.promptCellCreated.connect(o.update);const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor),t=e}}else if(e){const n=e.console.promptCell;r=null,n&&(await n.ready,r=n.editor)}return r}))}},P=[I,w,y,E,S,{id:"@jupyterlab/console-extension:completer",description:"Adds completion to the console.",autoStart:!0,requires:[a.IConsoleTracker],optional:[s.ICompletionProviderManager,m.ITranslator,r.ISanitizer],activate:function(e,n,o,t,l){if(!o)return;const s=(null!=t?t:m.nullTranslator).load("jupyterlab"),a=null!=l?l:new r.Sanitizer;e.commands.addCommand(x.invokeCompleter,{label:s.__("Display the completion helper."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.invoke(e)}}),e.commands.addCommand(x.selectCompleter,{label:s.__("Select the completion suggestion."),execute:()=>{const e=n.currentWidget&&n.currentWidget.id;if(e)return o.select(e)}}),e.commands.addKeyBinding({command:x.selectCompleter,keys:["Enter"],selector:".jp-ConsolePanel .jp-mod-completer-active"});const c=async(e,n)=>{var t,r;const l={editor:null!==(r=null===(t=n.console.promptCell)||void 0===t?void 0:t.editor)&&void 0!==r?r:null,session:n.console.sessionContext.session,widget:n};await o.updateCompleter(l),n.console.promptCellCreated.connect(((e,t)=>{const r={editor:t.editor,session:e.sessionContext.session,widget:n,sanitzer:a};o.updateCompleter(r).catch(console.error)})),n.console.sessionContext.sessionChanged.connect((()=>{var e,t;const r={editor:null!==(t=null===(e=n.console.promptCell)||void 0===e?void 0:e.editor)&&void 0!==t?t:null,session:n.console.sessionContext.session,widget:n,sanitizer:a};o.updateCompleter(r).catch(console.error)}))};n.widgetAdded.connect(c),o.activeProvidersChanged.connect((()=>{n.forEach((e=>{c(0,e).catch((e=>console.error(e)))}))}))}},_]}}]);