notebook 7.3.0b0__py3-none-any.whl → 7.3.0b1__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 (174) hide show
  1. notebook/_version.py +1 -1
  2. notebook/static/1088.bundle.js +1 -1
  3. notebook/static/113.bundle.js +1 -1
  4. notebook/static/1198.bundle.js +1 -1
  5. notebook/static/{3463.bundle.js → 1261.bundle.js} +1 -1
  6. notebook/static/131.bundle.js +1 -1
  7. notebook/static/1326.bundle.js +1 -1
  8. notebook/static/134.bundle.js +1 -1
  9. notebook/static/1408.bundle.js +1 -1
  10. notebook/static/1496.bundle.js +1 -1
  11. notebook/static/1647.bundle.js +1 -1
  12. notebook/static/1650.bundle.js +1 -1
  13. notebook/static/1684.bundle.js +1 -1
  14. notebook/static/1809.bundle.js +1 -1
  15. notebook/static/1827.bundle.js +1 -1
  16. notebook/static/1833.bundle.js +1 -1
  17. notebook/static/1958.bundle.js +1 -1
  18. notebook/static/1962.bundle.js +1 -1
  19. notebook/static/2007.bundle.js +1 -1
  20. notebook/static/2065.bundle.js +1 -1
  21. notebook/static/2088.bundle.js +1 -1
  22. notebook/static/2089.bundle.js +1 -1
  23. notebook/static/2122.bundle.js +1 -1
  24. notebook/static/2167.bundle.js +1 -1
  25. notebook/static/2184.bundle.js +1 -1
  26. notebook/static/2311.bundle.js +1 -1
  27. notebook/static/2401.bundle.js +1 -1
  28. notebook/static/2479.bundle.js +1 -1
  29. notebook/static/2489.bundle.js +1 -1
  30. notebook/static/2607.bundle.js +1 -1
  31. notebook/static/2615.bundle.js +1 -1
  32. notebook/static/2636.bundle.js +1 -1
  33. notebook/static/2924.bundle.js +1 -1
  34. notebook/static/2944.bundle.js +1 -1
  35. notebook/static/3129.bundle.js +1 -1
  36. notebook/static/3146.bundle.js +1 -1
  37. notebook/static/3187.bundle.js +1 -1
  38. notebook/static/3213.bundle.js +1 -1
  39. notebook/static/3340.bundle.js +1 -1
  40. notebook/static/3360.bundle.js +1 -1
  41. notebook/static/3466.bundle.js +1 -1
  42. notebook/static/3512.bundle.js +1 -1
  43. notebook/static/3676.bundle.js +1 -1
  44. notebook/static/3680.bundle.js +1 -1
  45. notebook/static/374.bundle.js +1 -1
  46. notebook/static/3768.bundle.js +1 -1
  47. notebook/static/377.bundle.js +1 -1
  48. notebook/static/3863.bundle.js +1 -1
  49. notebook/static/3881.bundle.js +1 -1
  50. notebook/static/4042.bundle.js +1 -1
  51. notebook/static/4212.bundle.js +1 -1
  52. notebook/static/4242.bundle.js +1 -1
  53. notebook/static/4382.bundle.js +1 -1
  54. notebook/static/4499.bundle.js +1 -1
  55. notebook/static/4630.bundle.js +1 -1
  56. notebook/static/4645.bundle.js +1 -1
  57. notebook/static/4811.bundle.js +1 -1
  58. notebook/static/4837.bundle.js +1 -1
  59. notebook/static/5099.bundle.js +1 -1
  60. notebook/static/5135.bundle.js +1 -1
  61. notebook/static/5254.bundle.js +1 -1
  62. notebook/static/5263.bundle.js +1 -1
  63. notebook/static/5313.bundle.js +1 -1
  64. notebook/static/5325.bundle.js +1 -1
  65. notebook/static/5346.bundle.js +1 -1
  66. notebook/static/5426.bundle.js +1 -1
  67. notebook/static/545.bundle.js +1 -1
  68. notebook/static/5573.bundle.js +1 -1
  69. notebook/static/5601.bundle.js +1 -1
  70. notebook/static/5649.bundle.js +2 -2
  71. notebook/static/5733.bundle.js +1 -1
  72. notebook/static/5912.bundle.js +1 -1
  73. notebook/static/5952.bundle.js +1 -0
  74. notebook/static/6017.bundle.js +1 -1
  75. notebook/static/6139.bundle.js +1 -1
  76. notebook/static/62.bundle.js +1 -1
  77. notebook/static/6345.bundle.js +1 -1
  78. notebook/static/6604.bundle.js +1 -1
  79. notebook/static/6621.bundle.js +1 -1
  80. notebook/static/6627.bundle.js +1 -1
  81. notebook/static/6748.bundle.js +1 -1
  82. notebook/static/6815.bundle.js +1 -1
  83. notebook/static/6853.bundle.js +1 -1
  84. notebook/static/6893.bundle.js +1 -1
  85. notebook/static/690.bundle.js +1 -1
  86. notebook/static/6962.bundle.js +1 -1
  87. notebook/static/6999.bundle.js +1 -1
  88. notebook/static/7226.bundle.js +1 -1
  89. notebook/static/7252.bundle.js +1 -1
  90. notebook/static/7302.bundle.js +1 -1
  91. notebook/static/7386.bundle.js +1 -1
  92. notebook/static/7391.bundle.js +1 -1
  93. notebook/static/7543.bundle.js +1 -1
  94. notebook/static/755.bundle.js +1 -1
  95. notebook/static/7603.bundle.js +1 -1
  96. notebook/static/7639.bundle.js +1 -1
  97. notebook/static/7655.bundle.js +1 -1
  98. notebook/static/7684.bundle.js +1 -1
  99. notebook/static/7811.bundle.js +1 -1
  100. notebook/static/7812.bundle.js +1 -1
  101. notebook/static/7819.bundle.js +1 -1
  102. notebook/static/7854.bundle.js +1 -1
  103. notebook/static/7900.bundle.js +1 -1
  104. notebook/static/7906.bundle.js +1 -1
  105. notebook/static/8471.bundle.js +1 -1
  106. notebook/static/8579.bundle.js +1 -1
  107. notebook/static/8633.bundle.js +1 -1
  108. notebook/static/8771.bundle.js +1 -1
  109. notebook/static/8781.bundle.js +1 -1
  110. notebook/static/8875.bundle.js +1 -1
  111. notebook/static/8907.bundle.js +1 -1
  112. notebook/static/8928.bundle.js +1 -1
  113. notebook/static/893.bundle.js +1 -1
  114. notebook/static/901.bundle.js +1 -1
  115. notebook/static/9068.bundle.js +1 -1
  116. notebook/static/9136.bundle.js +1 -1
  117. notebook/static/9151.bundle.js +1 -1
  118. notebook/static/9161.bundle.js +1 -1
  119. notebook/static/9268.bundle.js +1 -1
  120. notebook/static/9335.bundle.js +1 -1
  121. notebook/static/9341.bundle.js +1 -1
  122. notebook/static/9357.bundle.js +1 -0
  123. notebook/static/9380.bundle.js +1 -1
  124. notebook/static/9605.bundle.js +1 -1
  125. notebook/static/9638.bundle.js +1 -1
  126. notebook/static/9680.bundle.js +1 -1
  127. notebook/static/9685.bundle.js +1 -1
  128. notebook/static/9752.bundle.js +1 -1
  129. notebook/static/9821.bundle.js +1 -1
  130. notebook/static/9852.bundle.js +1 -1
  131. notebook/static/bundle.js +1 -1
  132. notebook/static/third-party-licenses.json +101 -101
  133. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
  134. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
  135. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  136. notebook-7.3.0b1.data/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/full-width-notebook.json +27 -0
  137. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
  138. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
  139. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +6 -0
  140. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
  141. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
  142. notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/466.16ad54314911066edf9c.js +1 -0
  143. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js → notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.963a302c93b1c86218b2.js +1 -1
  144. notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.2635b6a9fd871a610e32.js +1 -0
  145. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js → notebook-7.3.0b1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.c690bcb5ab5c38794e5d.js +1 -1
  146. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  147. {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/METADATA +2 -2
  148. {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/RECORD +170 -169
  149. notebook/static/5921.bundle.js +0 -1
  150. notebook/static/911.bundle.js +0 -1
  151. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +0 -1
  152. notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +0 -1
  153. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  154. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  155. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  156. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  157. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  158. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  159. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  160. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  161. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  162. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  163. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  164. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  165. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  166. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  167. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  168. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  169. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  170. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
  171. {notebook-7.3.0b0.data → notebook-7.3.0b1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  172. {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/WHEEL +0 -0
  173. {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/entry_points.txt +0 -0
  174. {notebook-7.3.0b0.dist-info → notebook-7.3.0b1.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 7811.bundle.js.LICENSE.txt */
2
- (self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7811],{79349:r=>{r.exports=function(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}},80594:r=>{r.exports=function(r,t){for(var e=-1,n=null==r?0:r.length;++e<n&&!1!==t(r[e],e,r););return r}},71928:(r,t,e)=>{var n=e(88799),o=e(85638),a=Object.prototype.hasOwnProperty;r.exports=function(r,t,e){var c=r[t];a.call(r,t)&&o(c,e)&&(void 0!==e||t in r)||n(r,t,e)}},41876:(r,t,e)=>{var n=e(35159),o=e(50098);r.exports=function(r,t){return r&&n(t,o(t),r)}},5947:(r,t,e)=>{var n=e(35159),o=e(53893);r.exports=function(r,t){return r&&n(t,o(t),r)}},88799:(r,t,e)=>{var n=e(42630);r.exports=function(r,t,e){"__proto__"==t&&n?n(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}},40699:(r,t,e)=>{var n=e(23694),o=e(80594),a=e(71928),c=e(41876),u=e(5947),i=e(2734),f=e(37561),s=e(31102),p=e(37048),l=e(51385),v=e(39759),b=e(3533),y=e(86541),x=e(2078),j=e(9560),h=e(19785),g=e(43854),O=e(98247),d=e(11611),w=e(47614),_=e(50098),A=e(53893),S="[object Arguments]",m="[object Function]",P="[object Object]",U={};U[S]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U[P]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U[m]=U["[object WeakMap]"]=!1,r.exports=function r(t,e,E,I,R,T){var k,C=1&e,F=2&e,B=4&e;if(E&&(k=R?E(t,I,R,T):E(t)),void 0!==k)return k;if(!d(t))return t;var D=h(t);if(D){if(k=y(t),!C)return f(t,k)}else{var L=b(t),M=L==m||"[object GeneratorFunction]"==L;if(g(t))return i(t,C);if(L==P||L==S||M&&!R){if(k=F||M?{}:j(t),!C)return F?p(t,u(k,t)):s(t,c(k,t))}else{if(!U[L])return R?t:{};k=x(t,L,C)}}T||(T=new n);var N=T.get(t);if(N)return N;T.set(t,k),w(t)?t.forEach((function(n){k.add(r(n,e,E,n,t,T))})):O(t)&&t.forEach((function(n,o){k.set(o,r(n,e,E,o,t,T))}));var Y=D?void 0:(B?F?v:l:F?A:_)(t);return o(Y||t,(function(n,o){Y&&(n=t[o=n]),a(k,o,r(n,e,E,o,t,T))})),k}},80158:(r,t,e)=>{var n=e(11611),o=Object.create,a=function(){function r(){}return function(t){if(!n(t))return{};if(o)return o(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}();r.exports=a},23545:(r,t,e)=>{var n=e(97141),o=e(72889);r.exports=function r(t,e,a,c,u){var i=-1,f=t.length;for(a||(a=o),u||(u=[]);++i<f;){var s=t[i];e>0&&a(s)?e>1?r(s,e-1,a,c,u):n(u,s):c||(u[u.length]=s)}return u}},30124:r=>{var t=Object.prototype.hasOwnProperty;r.exports=function(r,e){return null!=r&&t.call(r,e)}},21610:r=>{r.exports=function(r,t){return null!=r&&t in Object(r)}},57657:(r,t,e)=>{var n=e(3533),o=e(92360);r.exports=function(r){return o(r)&&"[object Map]"==n(r)}},26903:(r,t,e)=>{var n=e(3533),o=e(92360);r.exports=function(r){return o(r)&&"[object Set]"==n(r)}},59464:(r,t,e)=>{var n=e(11611),o=e(56016),a=e(21586),c=Object.prototype.hasOwnProperty;r.exports=function(r){if(!n(r))return a(r);var t=o(r),e=[];for(var u in r)("constructor"!=u||!t&&c.call(r,u))&&e.push(u);return e}},78859:(r,t,e)=>{var n=e(71928),o=e(76747),a=e(42383),c=e(11611),u=e(37948);r.exports=function(r,t,e,i){if(!c(r))return r;for(var f=-1,s=(t=o(t,r)).length,p=s-1,l=r;null!=l&&++f<s;){var v=u(t[f]),b=e;if("__proto__"===v||"constructor"===v||"prototype"===v)return r;if(f!=p){var y=l[v];void 0===(b=i?i(y,v,l):void 0)&&(b=c(y)?y:a(t[f+1])?[]:{})}n(l,v,b),l=l[v]}return r}},54459:(r,t,e)=>{var n=e(551),o=e(42630),a=e(31137),c=o?function(r,t){return o(r,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:a;r.exports=c},75733:r=>{r.exports=function(r,t,e){var n=-1,o=r.length;t<0&&(t=-t>o?0:o+t),(e=e>o?o:e)<0&&(e+=o),o=t>e?0:e-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=r[n+t];return a}},70830:(r,t,e)=>{var n=e(76747),o=e(31159),a=e(64373),c=e(37948);r.exports=function(r,t){return t=n(t,r),null==(r=a(r,t))||delete r[c(o(t))]}},95825:(r,t,e)=>{var n=e(59942);r.exports=function(r){var t=new r.constructor(r.byteLength);return new n(t).set(new n(r)),t}},2734:(r,t,e)=>{r=e.nmd(r);var n=e(77400),o=t&&!t.nodeType&&t,a=o&&r&&!r.nodeType&&r,c=a&&a.exports===o?n.Buffer:void 0,u=c?c.allocUnsafe:void 0;r.exports=function(r,t){if(t)return r.slice();var e=r.length,n=u?u(e):new r.constructor(e);return r.copy(n),n}},61859:(r,t,e)=>{var n=e(95825);r.exports=function(r,t){var e=t?n(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}},9377:r=>{var t=/\w*$/;r.exports=function(r){var e=new r.constructor(r.source,t.exec(r));return e.lastIndex=r.lastIndex,e}},24116:(r,t,e)=>{var n=e(96539),o=n?n.prototype:void 0,a=o?o.valueOf:void 0;r.exports=function(r){return a?Object(a.call(r)):{}}},63428:(r,t,e)=>{var n=e(95825);r.exports=function(r,t){var e=t?n(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}},37561:r=>{r.exports=function(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e<n;)t[e]=r[e];return t}},35159:(r,t,e)=>{var n=e(71928),o=e(88799);r.exports=function(r,t,e,a){var c=!e;e||(e={});for(var u=-1,i=t.length;++u<i;){var f=t[u],s=a?a(e[f],r[f],f,e,r):void 0;void 0===s&&(s=r[f]),c?o(e,f,s):n(e,f,s)}return e}},31102:(r,t,e)=>{var n=e(35159),o=e(83080);r.exports=function(r,t){return n(r,o(r),t)}},37048:(r,t,e)=>{var n=e(35159),o=e(30791);r.exports=function(r,t){return n(r,o(r),t)}},97820:(r,t,e)=>{var n=e(40861);r.exports=function(r){return n(r)?void 0:r}},42630:(r,t,e)=>{var n=e(81822),o=function(){try{var r=n(Object,"defineProperty");return r({},"",{}),r}catch(r){}}();r.exports=o},24288:(r,t,e)=>{var n=e(89754),o=e(11871),a=e(63132);r.exports=function(r){return a(o(r,void 0,n),r+"")}},39759:(r,t,e)=>{var n=e(11324),o=e(30791),a=e(53893);r.exports=function(r){return n(r,a,o)}},2173:(r,t,e)=>{var n=e(58023)(Object.getPrototypeOf,Object);r.exports=n},30791:(r,t,e)=>{var n=e(97141),o=e(2173),a=e(83080),c=e(15937),u=Object.getOwnPropertySymbols?function(r){for(var t=[];r;)n(t,a(r)),r=o(r);return t}:c;r.exports=u},731:(r,t,e)=>{var n=e(76747),o=e(2900),a=e(19785),c=e(42383),u=e(84194),i=e(37948);r.exports=function(r,t,e){for(var f=-1,s=(t=n(t,r)).length,p=!1;++f<s;){var l=i(t[f]);if(!(p=null!=r&&e(r,l)))break;r=r[l]}return p||++f!=s?p:!!(s=null==r?0:r.length)&&u(s)&&c(l,s)&&(a(r)||o(r))}},86541:r=>{var t=Object.prototype.hasOwnProperty;r.exports=function(r){var e=r.length,n=new r.constructor(e);return e&&"string"==typeof r[0]&&t.call(r,"index")&&(n.index=r.index,n.input=r.input),n}},2078:(r,t,e)=>{var n=e(95825),o=e(61859),a=e(9377),c=e(24116),u=e(63428);r.exports=function(r,t,e){var i=r.constructor;switch(t){case"[object ArrayBuffer]":return n(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return o(r,e);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(r,e);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return a(r);case"[object Symbol]":return c(r)}}},9560:(r,t,e)=>{var n=e(80158),o=e(2173),a=e(56016);r.exports=function(r){return"function"!=typeof r.constructor||a(r)?{}:n(o(r))}},72889:(r,t,e)=>{var n=e(96539),o=e(2900),a=e(19785),c=n?n.isConcatSpreadable:void 0;r.exports=function(r){return a(r)||o(r)||!!(c&&r&&r[c])}},21586:r=>{r.exports=function(r){var t=[];if(null!=r)for(var e in Object(r))t.push(e);return t}},11871:(r,t,e)=>{var n=e(79349),o=Math.max;r.exports=function(r,t,e){return t=o(void 0===t?r.length-1:t,0),function(){for(var a=arguments,c=-1,u=o(a.length-t,0),i=Array(u);++c<u;)i[c]=a[t+c];c=-1;for(var f=Array(t+1);++c<t;)f[c]=a[c];return f[t]=e(i),n(r,this,f)}}},64373:(r,t,e)=>{var n=e(79867),o=e(75733);r.exports=function(r,t){return t.length<2?r:n(r,o(t,0,-1))}},63132:(r,t,e)=>{var n=e(54459),o=e(49591)(n);r.exports=o},49591:r=>{var t=Date.now;r.exports=function(r){var e=0,n=0;return function(){var o=t(),a=16-(o-n);if(n=o,a>0){if(++e>=800)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}},30454:(r,t,e)=>{var n=e(40699);r.exports=function(r){return n(r,5)}},551:r=>{r.exports=function(r){return function(){return r}}},89754:(r,t,e)=>{var n=e(23545);r.exports=function(r){return null!=r&&r.length?n(r,1):[]}},73915:(r,t,e)=>{var n=e(30124),o=e(731);r.exports=function(r,t){return null!=r&&o(r,t,n)}},79749:(r,t,e)=>{var n=e(21610),o=e(731);r.exports=function(r,t){return null!=r&&o(r,t,n)}},31137:r=>{r.exports=function(r){return r}},90104:(r,t,e)=>{var n=e(20186),o=e(3533),a=e(2900),c=e(19785),u=e(80068),i=e(43854),f=e(56016),s=e(48519),p=Object.prototype.hasOwnProperty;r.exports=function(r){if(null==r)return!0;if(u(r)&&(c(r)||"string"==typeof r||"function"==typeof r.splice||i(r)||s(r)||a(r)))return!r.length;var t=o(r);if("[object Map]"==t||"[object Set]"==t)return!r.size;if(f(r))return!n(r).length;for(var e in r)if(p.call(r,e))return!1;return!0}},98247:(r,t,e)=>{var n=e(57657),o=e(39334),a=e(18125),c=a&&a.isMap,u=c?o(c):n;r.exports=u},40861:(r,t,e)=>{var n=e(99736),o=e(2173),a=e(92360),c=Function.prototype,u=Object.prototype,i=c.toString,f=u.hasOwnProperty,s=i.call(Object);r.exports=function(r){if(!a(r)||"[object Object]"!=n(r))return!1;var t=o(r);if(null===t)return!0;var e=f.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&i.call(e)==s}},47614:(r,t,e)=>{var n=e(26903),o=e(39334),a=e(18125),c=a&&a.isSet,u=c?o(c):n;r.exports=u},53893:(r,t,e)=>{var n=e(98213),o=e(59464),a=e(80068);r.exports=function(r){return a(r)?n(r,!0):o(r)}},31159:r=>{r.exports=function(r){var t=null==r?0:r.length;return t?r[t-1]:void 0}},48159:(r,t,e)=>{var n=e(66070),o=e(40699),a=e(70830),c=e(76747),u=e(35159),i=e(97820),f=e(24288),s=e(39759),p=f((function(r,t){var e={};if(null==r)return e;var f=!1;t=n(t,(function(t){return t=c(t,r),f||(f=t.length>1),t})),u(r,s(r),e),f&&(e=o(e,7,i));for(var p=t.length;p--;)a(e,t[p]);return e}));r.exports=p},47215:(r,t,e)=>{var n=e(78859);r.exports=function(r,t,e){return null==r?r:n(r,t,e)}},40110:(r,t,e)=>{var n=e(66070),o=e(37561),a=e(19785),c=e(55193),u=e(23419),i=e(37948),f=e(65567);r.exports=function(r){return a(r)?n(r,i):c(r)?[r]:o(u(f(r)))}},71426:(r,t,e)=>{"use strict";var n=e(78156),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function f(r,t,e){var n,a={},f=null,s=null;for(n in void 0!==e&&(f=""+e),void 0!==t.key&&(f=""+t.key),void 0!==t.ref&&(s=t.ref),t)c.call(t,n)&&!i.hasOwnProperty(n)&&(a[n]=t[n]);if(r&&r.defaultProps)for(n in t=r.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:r,key:f,ref:s,props:a,_owner:u.current}}t.Fragment=a,t.jsx=f,t.jsxs=f},24246:(r,t,e)=>{"use strict";r.exports=e(71426)}}]);
2
+ (self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7811],{79349:r=>{r.exports=function(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}},80594:r=>{r.exports=function(r,t){for(var e=-1,n=null==r?0:r.length;++e<n&&!1!==t(r[e],e,r););return r}},71928:(r,t,e)=>{var n=e(88799),o=e(85638),a=Object.prototype.hasOwnProperty;r.exports=function(r,t,e){var c=r[t];a.call(r,t)&&o(c,e)&&(void 0!==e||t in r)||n(r,t,e)}},41876:(r,t,e)=>{var n=e(35159),o=e(50098);r.exports=function(r,t){return r&&n(t,o(t),r)}},5947:(r,t,e)=>{var n=e(35159),o=e(53893);r.exports=function(r,t){return r&&n(t,o(t),r)}},88799:(r,t,e)=>{var n=e(42630);r.exports=function(r,t,e){"__proto__"==t&&n?n(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}},40699:(r,t,e)=>{var n=e(23694),o=e(80594),a=e(71928),c=e(41876),u=e(5947),i=e(2734),f=e(37561),s=e(31102),p=e(37048),l=e(51385),v=e(39759),b=e(3533),y=e(86541),x=e(2078),j=e(9560),h=e(19785),g=e(43854),O=e(98247),d=e(11611),w=e(47614),_=e(50098),A=e(53893),S="[object Arguments]",m="[object Function]",P="[object Object]",U={};U[S]=U["[object Array]"]=U["[object ArrayBuffer]"]=U["[object DataView]"]=U["[object Boolean]"]=U["[object Date]"]=U["[object Float32Array]"]=U["[object Float64Array]"]=U["[object Int8Array]"]=U["[object Int16Array]"]=U["[object Int32Array]"]=U["[object Map]"]=U["[object Number]"]=U[P]=U["[object RegExp]"]=U["[object Set]"]=U["[object String]"]=U["[object Symbol]"]=U["[object Uint8Array]"]=U["[object Uint8ClampedArray]"]=U["[object Uint16Array]"]=U["[object Uint32Array]"]=!0,U["[object Error]"]=U[m]=U["[object WeakMap]"]=!1,r.exports=function r(t,e,E,I,R,T){var k,C=1&e,F=2&e,B=4&e;if(E&&(k=R?E(t,I,R,T):E(t)),void 0!==k)return k;if(!d(t))return t;var D=h(t);if(D){if(k=y(t),!C)return f(t,k)}else{var L=b(t),M=L==m||"[object GeneratorFunction]"==L;if(g(t))return i(t,C);if(L==P||L==S||M&&!R){if(k=F||M?{}:j(t),!C)return F?p(t,u(k,t)):s(t,c(k,t))}else{if(!U[L])return R?t:{};k=x(t,L,C)}}T||(T=new n);var N=T.get(t);if(N)return N;T.set(t,k),w(t)?t.forEach((function(n){k.add(r(n,e,E,n,t,T))})):O(t)&&t.forEach((function(n,o){k.set(o,r(n,e,E,o,t,T))}));var Y=D?void 0:(B?F?v:l:F?A:_)(t);return o(Y||t,(function(n,o){Y&&(n=t[o=n]),a(k,o,r(n,e,E,o,t,T))})),k}},80158:(r,t,e)=>{var n=e(11611),o=Object.create,a=function(){function r(){}return function(t){if(!n(t))return{};if(o)return o(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}();r.exports=a},23545:(r,t,e)=>{var n=e(97141),o=e(72889);r.exports=function r(t,e,a,c,u){var i=-1,f=t.length;for(a||(a=o),u||(u=[]);++i<f;){var s=t[i];e>0&&a(s)?e>1?r(s,e-1,a,c,u):n(u,s):c||(u[u.length]=s)}return u}},30124:r=>{var t=Object.prototype.hasOwnProperty;r.exports=function(r,e){return null!=r&&t.call(r,e)}},21610:r=>{r.exports=function(r,t){return null!=r&&t in Object(r)}},57657:(r,t,e)=>{var n=e(3533),o=e(92360);r.exports=function(r){return o(r)&&"[object Map]"==n(r)}},26903:(r,t,e)=>{var n=e(3533),o=e(92360);r.exports=function(r){return o(r)&&"[object Set]"==n(r)}},59464:(r,t,e)=>{var n=e(11611),o=e(56016),a=e(21586),c=Object.prototype.hasOwnProperty;r.exports=function(r){if(!n(r))return a(r);var t=o(r),e=[];for(var u in r)("constructor"!=u||!t&&c.call(r,u))&&e.push(u);return e}},78859:(r,t,e)=>{var n=e(71928),o=e(76747),a=e(42383),c=e(11611),u=e(37948);r.exports=function(r,t,e,i){if(!c(r))return r;for(var f=-1,s=(t=o(t,r)).length,p=s-1,l=r;null!=l&&++f<s;){var v=u(t[f]),b=e;if("__proto__"===v||"constructor"===v||"prototype"===v)return r;if(f!=p){var y=l[v];void 0===(b=i?i(y,v,l):void 0)&&(b=c(y)?y:a(t[f+1])?[]:{})}n(l,v,b),l=l[v]}return r}},54459:(r,t,e)=>{var n=e(551),o=e(42630),a=e(31137),c=o?function(r,t){return o(r,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:a;r.exports=c},75733:r=>{r.exports=function(r,t,e){var n=-1,o=r.length;t<0&&(t=-t>o?0:o+t),(e=e>o?o:e)<0&&(e+=o),o=t>e?0:e-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=r[n+t];return a}},70830:(r,t,e)=>{var n=e(76747),o=e(31159),a=e(64373),c=e(37948);r.exports=function(r,t){return t=n(t,r),null==(r=a(r,t))||delete r[c(o(t))]}},95825:(r,t,e)=>{var n=e(59942);r.exports=function(r){var t=new r.constructor(r.byteLength);return new n(t).set(new n(r)),t}},2734:(r,t,e)=>{r=e.nmd(r);var n=e(77400),o=t&&!t.nodeType&&t,a=o&&r&&!r.nodeType&&r,c=a&&a.exports===o?n.Buffer:void 0,u=c?c.allocUnsafe:void 0;r.exports=function(r,t){if(t)return r.slice();var e=r.length,n=u?u(e):new r.constructor(e);return r.copy(n),n}},61859:(r,t,e)=>{var n=e(95825);r.exports=function(r,t){var e=t?n(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}},9377:r=>{var t=/\w*$/;r.exports=function(r){var e=new r.constructor(r.source,t.exec(r));return e.lastIndex=r.lastIndex,e}},24116:(r,t,e)=>{var n=e(96539),o=n?n.prototype:void 0,a=o?o.valueOf:void 0;r.exports=function(r){return a?Object(a.call(r)):{}}},63428:(r,t,e)=>{var n=e(95825);r.exports=function(r,t){var e=t?n(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}},37561:r=>{r.exports=function(r,t){var e=-1,n=r.length;for(t||(t=Array(n));++e<n;)t[e]=r[e];return t}},35159:(r,t,e)=>{var n=e(71928),o=e(88799);r.exports=function(r,t,e,a){var c=!e;e||(e={});for(var u=-1,i=t.length;++u<i;){var f=t[u],s=a?a(e[f],r[f],f,e,r):void 0;void 0===s&&(s=r[f]),c?o(e,f,s):n(e,f,s)}return e}},31102:(r,t,e)=>{var n=e(35159),o=e(83080);r.exports=function(r,t){return n(r,o(r),t)}},37048:(r,t,e)=>{var n=e(35159),o=e(30791);r.exports=function(r,t){return n(r,o(r),t)}},97820:(r,t,e)=>{var n=e(40861);r.exports=function(r){return n(r)?void 0:r}},42630:(r,t,e)=>{var n=e(81822),o=function(){try{var r=n(Object,"defineProperty");return r({},"",{}),r}catch(r){}}();r.exports=o},24288:(r,t,e)=>{var n=e(89754),o=e(11871),a=e(63132);r.exports=function(r){return a(o(r,void 0,n),r+"")}},39759:(r,t,e)=>{var n=e(11324),o=e(30791),a=e(53893);r.exports=function(r){return n(r,a,o)}},2173:(r,t,e)=>{var n=e(58023)(Object.getPrototypeOf,Object);r.exports=n},30791:(r,t,e)=>{var n=e(97141),o=e(2173),a=e(83080),c=e(15937),u=Object.getOwnPropertySymbols?function(r){for(var t=[];r;)n(t,a(r)),r=o(r);return t}:c;r.exports=u},731:(r,t,e)=>{var n=e(76747),o=e(2900),a=e(19785),c=e(42383),u=e(43319),i=e(37948);r.exports=function(r,t,e){for(var f=-1,s=(t=n(t,r)).length,p=!1;++f<s;){var l=i(t[f]);if(!(p=null!=r&&e(r,l)))break;r=r[l]}return p||++f!=s?p:!!(s=null==r?0:r.length)&&u(s)&&c(l,s)&&(a(r)||o(r))}},86541:r=>{var t=Object.prototype.hasOwnProperty;r.exports=function(r){var e=r.length,n=new r.constructor(e);return e&&"string"==typeof r[0]&&t.call(r,"index")&&(n.index=r.index,n.input=r.input),n}},2078:(r,t,e)=>{var n=e(95825),o=e(61859),a=e(9377),c=e(24116),u=e(63428);r.exports=function(r,t,e){var i=r.constructor;switch(t){case"[object ArrayBuffer]":return n(r);case"[object Boolean]":case"[object Date]":return new i(+r);case"[object DataView]":return o(r,e);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(r,e);case"[object Map]":case"[object Set]":return new i;case"[object Number]":case"[object String]":return new i(r);case"[object RegExp]":return a(r);case"[object Symbol]":return c(r)}}},9560:(r,t,e)=>{var n=e(80158),o=e(2173),a=e(56016);r.exports=function(r){return"function"!=typeof r.constructor||a(r)?{}:n(o(r))}},72889:(r,t,e)=>{var n=e(96539),o=e(2900),a=e(19785),c=n?n.isConcatSpreadable:void 0;r.exports=function(r){return a(r)||o(r)||!!(c&&r&&r[c])}},21586:r=>{r.exports=function(r){var t=[];if(null!=r)for(var e in Object(r))t.push(e);return t}},11871:(r,t,e)=>{var n=e(79349),o=Math.max;r.exports=function(r,t,e){return t=o(void 0===t?r.length-1:t,0),function(){for(var a=arguments,c=-1,u=o(a.length-t,0),i=Array(u);++c<u;)i[c]=a[t+c];c=-1;for(var f=Array(t+1);++c<t;)f[c]=a[c];return f[t]=e(i),n(r,this,f)}}},64373:(r,t,e)=>{var n=e(79867),o=e(75733);r.exports=function(r,t){return t.length<2?r:n(r,o(t,0,-1))}},63132:(r,t,e)=>{var n=e(54459),o=e(49591)(n);r.exports=o},49591:r=>{var t=Date.now;r.exports=function(r){var e=0,n=0;return function(){var o=t(),a=16-(o-n);if(n=o,a>0){if(++e>=800)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}},30454:(r,t,e)=>{var n=e(40699);r.exports=function(r){return n(r,5)}},551:r=>{r.exports=function(r){return function(){return r}}},89754:(r,t,e)=>{var n=e(23545);r.exports=function(r){return null!=r&&r.length?n(r,1):[]}},73915:(r,t,e)=>{var n=e(30124),o=e(731);r.exports=function(r,t){return null!=r&&o(r,t,n)}},79749:(r,t,e)=>{var n=e(21610),o=e(731);r.exports=function(r,t){return null!=r&&o(r,t,n)}},31137:r=>{r.exports=function(r){return r}},90104:(r,t,e)=>{var n=e(20186),o=e(3533),a=e(2900),c=e(19785),u=e(80068),i=e(43854),f=e(56016),s=e(48519),p=Object.prototype.hasOwnProperty;r.exports=function(r){if(null==r)return!0;if(u(r)&&(c(r)||"string"==typeof r||"function"==typeof r.splice||i(r)||s(r)||a(r)))return!r.length;var t=o(r);if("[object Map]"==t||"[object Set]"==t)return!r.size;if(f(r))return!n(r).length;for(var e in r)if(p.call(r,e))return!1;return!0}},98247:(r,t,e)=>{var n=e(57657),o=e(39334),a=e(18125),c=a&&a.isMap,u=c?o(c):n;r.exports=u},40861:(r,t,e)=>{var n=e(99736),o=e(2173),a=e(92360),c=Function.prototype,u=Object.prototype,i=c.toString,f=u.hasOwnProperty,s=i.call(Object);r.exports=function(r){if(!a(r)||"[object Object]"!=n(r))return!1;var t=o(r);if(null===t)return!0;var e=f.call(t,"constructor")&&t.constructor;return"function"==typeof e&&e instanceof e&&i.call(e)==s}},47614:(r,t,e)=>{var n=e(26903),o=e(39334),a=e(18125),c=a&&a.isSet,u=c?o(c):n;r.exports=u},53893:(r,t,e)=>{var n=e(98213),o=e(59464),a=e(80068);r.exports=function(r){return a(r)?n(r,!0):o(r)}},31159:r=>{r.exports=function(r){var t=null==r?0:r.length;return t?r[t-1]:void 0}},48159:(r,t,e)=>{var n=e(66070),o=e(40699),a=e(70830),c=e(76747),u=e(35159),i=e(97820),f=e(24288),s=e(39759),p=f((function(r,t){var e={};if(null==r)return e;var f=!1;t=n(t,(function(t){return t=c(t,r),f||(f=t.length>1),t})),u(r,s(r),e),f&&(e=o(e,7,i));for(var p=t.length;p--;)a(e,t[p]);return e}));r.exports=p},47215:(r,t,e)=>{var n=e(78859);r.exports=function(r,t,e){return null==r?r:n(r,t,e)}},40110:(r,t,e)=>{var n=e(66070),o=e(37561),a=e(19785),c=e(55193),u=e(23419),i=e(37948),f=e(65567);r.exports=function(r){return a(r)?n(r,i):c(r)?[r]:o(u(f(r)))}},71426:(r,t,e)=>{"use strict";var n=e(78156),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),c=Object.prototype.hasOwnProperty,u=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function f(r,t,e){var n,a={},f=null,s=null;for(n in void 0!==e&&(f=""+e),void 0!==t.key&&(f=""+t.key),void 0!==t.ref&&(s=t.ref),t)c.call(t,n)&&!i.hasOwnProperty(n)&&(a[n]=t[n]);if(r&&r.defaultProps)for(n in t=r.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:r,key:f,ref:s,props:a,_owner:u.current}}t.Fragment=a,t.jsx=f,t.jsxs=f},24246:(r,t,e)=>{"use strict";r.exports=e(71426)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7812,9680],{99680:(e,t,n)=>{n.r(t),n.d(t,{IMarkdownViewerTracker:()=>a,MarkdownDocument:()=>w,MarkdownViewer:()=>f,MarkdownViewerFactory:()=>_,MarkdownViewerTableOfContentsFactory:()=>s,MarkdownViewerTableOfContentsModel:()=>i});var r=n(10035);class i extends r.TableOfContentsModel{constructor(e,t,n){super(e,n),this.parser=t}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}getHeadings(){const e=this.widget.context.model.toString(),t=r.TableOfContentsUtils.filterHeadings(r.TableOfContentsUtils.Markdown.getHeadings(e),{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class s extends r.TableOfContentsFactory{constructor(e,t,n){super(e),this.parser=t,this.sanitizer=n}_createNew(e,t){const n=new i(e,this.parser,t);let s=new WeakMap;const o=(t,n)=>{if(n){const t=s.get(n);if(t){const n=e.content.node.getBoundingClientRect(),r=t.getBoundingClientRect();(r.top>n.bottom||r.bottom<n.top)&&t.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",n,"in widget",e)}},a=()=>{this.parser&&(r.TableOfContentsUtils.clearNumbering(e.content.node),s=new WeakMap,n.headings.forEach((async t=>{var n;const i=await r.TableOfContentsUtils.Markdown.getHeadingId(this.parser,t.raw,t.level,this.sanitizer);if(!i)return;const o=`h${t.level}[id="${CSS.escape(i)}"]`;s.set(t,r.TableOfContentsUtils.addPrefix(e.content.node,o,null!==(n=t.prefix)&&void 0!==n?n:""))})))};return e.content.ready.then((()=>{a(),e.content.rendered.connect(a),n.activeHeadingChanged.connect(o),n.headingsChanged.connect(a),e.disposed.connect((()=>{e.content.rendered.disconnect(a),n.activeHeadingChanged.disconnect(o),n.headingsChanged.disconnect(a)}))})),n}}var o=n(21961);const a=new o.Token("@jupyterlab/markdownviewer:IMarkdownViewerTracker","A widget tracker for markdown\n document viewers. Use this if you want to iterate over and interact with rendered markdown documents.");var d=n(53876),c=n(20754),l=n(23764),h=n(58194),u=n(93050),g=n(2159),m=n(2260);const p="text/markdown";class f extends m.Widget{constructor(e){super(),this._config={...f.defaultConfig},this._fragment="",this._ready=new o.PromiseDelegate,this._isRendering=!1,this._renderRequested=!1,this._rendered=new g.Signal(this),this.context=e.context,this.translator=e.translator||u.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.renderer=e.renderer,this.node.tabIndex=0,this.addClass("jp-MarkdownViewer"),(this.layout=new m.StackedLayout).addWidget(this.renderer),this.context.ready.then((async()=>{await this._render(),this._monitor=new c.ActivityMonitor({signal:this.context.model.contentChanged,timeout:this._config.renderTimeout}),this._monitor.activityStopped.connect(this.update,this),this._ready.resolve(void 0)}))}get ready(){return this._ready.promise}get rendered(){return this._rendered}setFragment(e){this._fragment=e,this.update()}setOption(e,t){if(this._config[e]===t)return;this._config[e]=t;const{style:n}=this.renderer.node;switch(e){case"fontFamily":n.setProperty("font-family",t);break;case"fontSize":n.setProperty("font-size",t?t+"px":null);break;case"hideFrontMatter":this.update();break;case"lineHeight":n.setProperty("line-height",t?t.toString():null);break;case"lineWidth":{const e=t?`calc(50% - ${t/2}ch)`:null;n.setProperty("padding-left",e),n.setProperty("padding-right",e);break}case"renderTimeout":this._monitor&&(this._monitor.timeout=t)}}dispose(){this.isDisposed||(this._monitor&&this._monitor.dispose(),this._monitor=null,super.dispose())}onUpdateRequest(e){this.context.isReady&&!this.isDisposed&&(this._render(),this._fragment="")}onActivateRequest(e){this.node.focus()}async _render(){if(this.isDisposed)return;if(this._isRendering)return void(this._renderRequested=!0);this._renderRequested=!1;const{context:e}=this,{model:t}=e,n=t.toString(),r={};r[p]=this._config.hideFrontMatter?y.removeFrontMatter(n):n;const i=new h.MimeModel({data:r,metadata:{fragment:this._fragment}});try{if(this._isRendering=!0,await this.renderer.renderModel(i),this._isRendering=!1,this._renderRequested)return this._render();this._rendered.emit()}catch(t){requestAnimationFrame((()=>{this.dispose()})),(0,d.showErrorMessage)(this._trans.__("Renderer Failure: %1",e.path),t)}}}!function(e){e.defaultConfig={fontFamily:null,fontSize:null,lineHeight:null,lineWidth:null,hideFrontMatter:!0,renderTimeout:1e3}}(f||(f={}));class w extends l.DocumentWidget{setFragment(e){this.content.setFragment(e)}}class _ extends l.ABCWidgetFactory{constructor(e){super(y.createRegistryOptions(e)),this._fileType=e.primaryFileType,this._rendermime=e.rendermime}createNewWidget(e){var t,n,r,i,s;const o=this._rendermime.clone({resolver:e.urlResolver}).createRenderer(p),a=new f({context:e,renderer:o});return a.title.icon=null===(t=this._fileType)||void 0===t?void 0:t.icon,a.title.iconClass=null!==(r=null===(n=this._fileType)||void 0===n?void 0:n.iconClass)&&void 0!==r?r:"",a.title.iconLabel=null!==(s=null===(i=this._fileType)||void 0===i?void 0:i.iconLabel)&&void 0!==s?s:"",a.title.caption=this.label,new w({content:a,context:e})}}var y;!function(e){e.createRegistryOptions=function(e){return{...e,readOnly:!0}},e.removeFrontMatter=function(e){const t=e.match(/^---\n[^]*?\n(---|...)\n/);if(!t)return e;const{length:n}=t[0];return e.slice(n)}}(y||(y={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7812,9680],{99680:(e,t,n)=>{n.r(t),n.d(t,{IMarkdownViewerTracker:()=>a,MarkdownDocument:()=>w,MarkdownViewer:()=>f,MarkdownViewerFactory:()=>_,MarkdownViewerTableOfContentsFactory:()=>s,MarkdownViewerTableOfContentsModel:()=>i});var r=n(61362);class i extends r.TableOfContentsModel{constructor(e,t,n){super(e,n),this.parser=t}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}getHeadings(){const e=this.widget.context.model.toString(),t=r.TableOfContentsUtils.filterHeadings(r.TableOfContentsUtils.Markdown.getHeadings(e),{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class s extends r.TableOfContentsFactory{constructor(e,t,n){super(e),this.parser=t,this.sanitizer=n}_createNew(e,t){const n=new i(e,this.parser,t);let s=new WeakMap;const o=(t,n)=>{if(n){const t=s.get(n);if(t){const n=e.content.node.getBoundingClientRect(),r=t.getBoundingClientRect();(r.top>n.bottom||r.bottom<n.top)&&t.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",n,"in widget",e)}},a=()=>{this.parser&&(r.TableOfContentsUtils.clearNumbering(e.content.node),s=new WeakMap,n.headings.forEach((async t=>{var n;const i=await r.TableOfContentsUtils.Markdown.getHeadingId(this.parser,t.raw,t.level,this.sanitizer);if(!i)return;const o=`h${t.level}[id="${CSS.escape(i)}"]`;s.set(t,r.TableOfContentsUtils.addPrefix(e.content.node,o,null!==(n=t.prefix)&&void 0!==n?n:""))})))};return e.content.ready.then((()=>{a(),e.content.rendered.connect(a),n.activeHeadingChanged.connect(o),n.headingsChanged.connect(a),e.disposed.connect((()=>{e.content.rendered.disconnect(a),n.activeHeadingChanged.disconnect(o),n.headingsChanged.disconnect(a)}))})),n}}var o=n(21961);const a=new o.Token("@jupyterlab/markdownviewer:IMarkdownViewerTracker","A widget tracker for markdown\n document viewers. Use this if you want to iterate over and interact with rendered markdown documents.");var d=n(20911),c=n(77075),l=n(21428),h=n(95704),u=n(66649),g=n(2159),m=n(2260);const p="text/markdown";class f extends m.Widget{constructor(e){super(),this._config={...f.defaultConfig},this._fragment="",this._ready=new o.PromiseDelegate,this._isRendering=!1,this._renderRequested=!1,this._rendered=new g.Signal(this),this.context=e.context,this.translator=e.translator||u.nullTranslator,this._trans=this.translator.load("jupyterlab"),this.renderer=e.renderer,this.node.tabIndex=0,this.addClass("jp-MarkdownViewer"),(this.layout=new m.StackedLayout).addWidget(this.renderer),this.context.ready.then((async()=>{await this._render(),this._monitor=new c.ActivityMonitor({signal:this.context.model.contentChanged,timeout:this._config.renderTimeout}),this._monitor.activityStopped.connect(this.update,this),this._ready.resolve(void 0)}))}get ready(){return this._ready.promise}get rendered(){return this._rendered}setFragment(e){this._fragment=e,this.update()}setOption(e,t){if(this._config[e]===t)return;this._config[e]=t;const{style:n}=this.renderer.node;switch(e){case"fontFamily":n.setProperty("font-family",t);break;case"fontSize":n.setProperty("font-size",t?t+"px":null);break;case"hideFrontMatter":this.update();break;case"lineHeight":n.setProperty("line-height",t?t.toString():null);break;case"lineWidth":{const e=t?`calc(50% - ${t/2}ch)`:null;n.setProperty("padding-left",e),n.setProperty("padding-right",e);break}case"renderTimeout":this._monitor&&(this._monitor.timeout=t)}}dispose(){this.isDisposed||(this._monitor&&this._monitor.dispose(),this._monitor=null,super.dispose())}onUpdateRequest(e){this.context.isReady&&!this.isDisposed&&(this._render(),this._fragment="")}onActivateRequest(e){this.node.focus()}async _render(){if(this.isDisposed)return;if(this._isRendering)return void(this._renderRequested=!0);this._renderRequested=!1;const{context:e}=this,{model:t}=e,n=t.toString(),r={};r[p]=this._config.hideFrontMatter?y.removeFrontMatter(n):n;const i=new h.MimeModel({data:r,metadata:{fragment:this._fragment}});try{if(this._isRendering=!0,await this.renderer.renderModel(i),this._isRendering=!1,this._renderRequested)return this._render();this._rendered.emit()}catch(t){requestAnimationFrame((()=>{this.dispose()})),(0,d.showErrorMessage)(this._trans.__("Renderer Failure: %1",e.path),t)}}}!function(e){e.defaultConfig={fontFamily:null,fontSize:null,lineHeight:null,lineWidth:null,hideFrontMatter:!0,renderTimeout:1e3}}(f||(f={}));class w extends l.DocumentWidget{setFragment(e){this.content.setFragment(e)}}class _ extends l.ABCWidgetFactory{constructor(e){super(y.createRegistryOptions(e)),this._fileType=e.primaryFileType,this._rendermime=e.rendermime}createNewWidget(e){var t,n,r,i,s;const o=this._rendermime.clone({resolver:e.urlResolver}).createRenderer(p),a=new f({context:e,renderer:o});return a.title.icon=null===(t=this._fileType)||void 0===t?void 0:t.icon,a.title.iconClass=null!==(r=null===(n=this._fileType)||void 0===n?void 0:n.iconClass)&&void 0!==r?r:"",a.title.iconLabel=null!==(s=null===(i=this._fileType)||void 0===i?void 0:i.iconLabel)&&void 0!==s?s:"",a.title.caption=this.label,new w({content:a,context:e})}}var y;!function(e){e.createRegistryOptions=function(e){return{...e,readOnly:!0}},e.removeFrontMatter=function(e){const t=e.match(/^---\n[^]*?\n(---|...)\n/);if(!t)return e;const{length:n}=t[0];return e.slice(n)}}(y||(y={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7819],{14978:(t,e,r)=>{function n(t){return t.replace("-","_")}r.r(e),r.d(e,{Gettext:()=>s,ITranslator:()=>d,ITranslatorConnector:()=>g,NullTranslator:()=>a,TranslationManager:()=>m,TranslatorConnector:()=>p,nullTranslator:()=>i,requestTranslationsAPI:()=>_});class s{constructor(t){t=t||{},this._defaults={domain:"messages",locale:document.documentElement.getAttribute("lang")||"en",pluralFunc:function(t){return{nplurals:2,plural:1!=t?1:0}},contextDelimiter:String.fromCharCode(4),stringsPrefix:""},this._locale=(t.locale||this._defaults.locale).replace("_","-"),this._domain=n(t.domain||this._defaults.domain),this._contextDelimiter=t.contextDelimiter||this._defaults.contextDelimiter,this._stringsPrefix=t.stringsPrefix||this._defaults.stringsPrefix,this._pluralFuncs={},this._dictionary={},this._pluralForms={},t.messages&&(this._dictionary[this._domain]={},this._dictionary[this._domain][this._locale]=t.messages),t.pluralForms&&(this._pluralForms[this._locale]=t.pluralForms)}setContextDelimiter(t){this._contextDelimiter=t}getContextDelimiter(){return this._contextDelimiter}setLocale(t){this._locale=t.replace("_","-")}getLocale(){return this._locale}setDomain(t){this._domain=n(t)}getDomain(){return this._domain}setStringsPrefix(t){this._stringsPrefix=t}getStringsPrefix(){return this._stringsPrefix}static strfmt(t,...e){return t.replace(/%%/g,"%% ").replace(/%(\d+)/g,(function(t,r){return e[r-1]})).replace(/%% /g,"%")}loadJSON(t,e){if(!t[""]||!t[""].language||!t[""].pluralForms)throw new Error(`Wrong jsonData, it must have an empty key ("") with "language" and "pluralForms" information: ${t}`);e=n(e);let r=t[""],s=JSON.parse(JSON.stringify(t));delete s[""],this.setMessages(e||this._defaults.domain,r.language,s,r.pluralForms)}__(t,...e){return this.gettext(t,...e)}_n(t,e,r,...n){return this.ngettext(t,e,r,...n)}_p(t,e,...r){return this.pgettext(t,e,...r)}_np(t,e,r,n,...s){return this.npgettext(t,e,r,n,...s)}gettext(t,...e){return this.dcnpgettext("","",t,"",0,...e)}ngettext(t,e,r,...n){return this.dcnpgettext("","",t,e,r,...n)}pgettext(t,e,...r){return this.dcnpgettext("",t,e,"",0,...r)}npgettext(t,e,r,n,...s){return this.dcnpgettext("",t,e,r,n,...s)}dcnpgettext(t,e,r,s,a,...i){let l;t=n(t)||this._domain;let o=e?e+this._contextDelimiter+r:r,u={pluralForm:!1},c=!1,h=this._locale,_=this.expandLocale(this._locale);for(let e in _)if(h=_[e],c=this._dictionary[t]&&this._dictionary[t][h]&&this._dictionary[t][h][o],c=s?c&&this._dictionary[t][h][o].length>1:c&&1==this._dictionary[t][h][o].length,c){u.locale=h;break}if(c?l=this._dictionary[t][h][o]:(l=[r],u.pluralFunc=this._defaults.pluralFunc),!s)return this.t(l,a,u,...i);u.pluralForm=!0;let g=c?l:[r,s];return this.t(g,a,u,...i)}expandLocale(t){let e=[t],r=t.lastIndexOf("-");for(;r>0;)t=t.slice(0,r),e.push(t),r=t.lastIndexOf("-");return e}getPluralFunc(t){if(!new RegExp("^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_()])+").test(t))throw new Error(s.strfmt('The plural form "%1" is not valid',t));return new Function("n","let plural, nplurals; "+t+" return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };")}removeContext(t){return-1!==t.indexOf(this._contextDelimiter)?t.split(this._contextDelimiter)[1]:t}t(t,e,r,...n){if(!r.pluralForm)return this._stringsPrefix+s.strfmt(this.removeContext(t[0]),...n);let a;return r.pluralFunc?a=r.pluralFunc(e):(this._pluralFuncs[r.locale||""]||(this._pluralFuncs[r.locale||""]=this.getPluralFunc(this._pluralForms[r.locale||""])),a=this._pluralFuncs[r.locale||""](e)),(void 0===!a.plural||a.plural>a.nplurals||t.length<=a.plural)&&(a.plural=0),this._stringsPrefix+s.strfmt(this.removeContext(t[a.plural]),...[e].concat(n))}setMessages(t,e,r,s){t=n(t),s&&(this._pluralForms[e]=s),this._dictionary[t]||(this._dictionary[t]={}),this._dictionary[t][e]=r}}class a{constructor(t){this.languageCode="en",this._languageBundle=t}load(t){return this._languageBundle}}const i=new a(new class{__(t,...e){return this.gettext(t,...e)}_n(t,e,r,...n){return this.ngettext(t,e,r,...n)}_p(t,e,...r){return this.pgettext(t,e,...r)}_np(t,e,r,n,...s){return this.npgettext(t,e,r,n,...s)}gettext(t,...e){return s.strfmt(t,...e)}ngettext(t,e,r,...n){return s.strfmt(1==r?t:e,...[r].concat(n))}pgettext(t,e,...r){return s.strfmt(e,...r)}npgettext(t,e,r,n,...s){return this.ngettext(e,r,n,...s)}dcnpgettext(t,e,r,n,s,...a){return this.ngettext(r,n,s,...a)}});var l=r(45556),o=r(21961),u=r(20754),c=r(5348);const h="api/translations";async function _(t="",e="",r={},n=void 0){const s=null!=n?n:c.ServerConnection.makeSettings();t=t||`${s.appUrl}/${h}`;const a=u.URLExt.join(s.baseUrl,t),i=u.URLExt.join(a,e);if(!i.startsWith(a))throw new Error("Can only be used for translations requests");let l;try{l=await c.ServerConnection.makeRequest(i,r,s)}catch(t){throw new c.ServerConnection.NetworkError(t)}let o=await l.text();if(o.length>0)try{o=JSON.parse(o)}catch(t){console.error("Not a JSON response body.",l)}if(!l.ok)throw new c.ServerConnection.ResponseError(l,o.message||o);return o}const g=new o.Token("@jupyterlab/translation:ITranslatorConnector","A service to connect to the server translation endpoint.");class p extends l.DataConnector{constructor(t="",e){super(),this._translationsUrl=t,this._serverSettings=e}async fetch(t){return _(this._translationsUrl,t.language,{},this._serverSettings)}}const d=new o.Token("@jupyterlab/translation:ITranslator","A service to translate strings.");class m{constructor(t="",e,r){this._domainData={},this._translationBundles={},this._connector=new p(t,r),this._stringsPrefix=e||"",this._englishBundle=new s({stringsPrefix:this._stringsPrefix})}get languageCode(){return this._currentLocale}async fetch(t){var e,r,n,s;if(this._languageData=await this._connector.fetch({language:t}),this._languageData&&"default"===t)try{for(const t of Object.values(null!==(e=this._languageData.data)&&void 0!==e?e:{})){this._currentLocale=t[""].language.replace("_","-");break}}catch(t){this._currentLocale="en"}else this._currentLocale=t;this._domainData=null!==(n=null===(r=this._languageData)||void 0===r?void 0:r.data)&&void 0!==n?n:{};const a=null===(s=this._languageData)||void 0===s?void 0:s.message;a&&"en"!==t&&console.warn(a)}load(t){if(this._domainData){if("en"==this._currentLocale)return this._englishBundle;if(!((t=n(t))in this._translationBundles)){let e=new s({domain:t,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(t in this._domainData){let r=this._domainData[t][""];"plural_forms"in r&&(r.pluralForms=r.plural_forms,delete r.plural_forms,this._domainData[t][""]=r),e.loadJSON(this._domainData[t],t)}this._translationBundles[t]=e}return this._translationBundles[t]}return this._englishBundle}}}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7819],{57819:(t,e,r)=>{function n(t){return t.replace("-","_")}r.r(e),r.d(e,{Gettext:()=>s,ITranslator:()=>d,ITranslatorConnector:()=>g,NullTranslator:()=>a,TranslationManager:()=>m,TranslatorConnector:()=>p,nullTranslator:()=>i,requestTranslationsAPI:()=>_});class s{constructor(t){t=t||{},this._defaults={domain:"messages",locale:document.documentElement.getAttribute("lang")||"en",pluralFunc:function(t){return{nplurals:2,plural:1!=t?1:0}},contextDelimiter:String.fromCharCode(4),stringsPrefix:""},this._locale=(t.locale||this._defaults.locale).replace("_","-"),this._domain=n(t.domain||this._defaults.domain),this._contextDelimiter=t.contextDelimiter||this._defaults.contextDelimiter,this._stringsPrefix=t.stringsPrefix||this._defaults.stringsPrefix,this._pluralFuncs={},this._dictionary={},this._pluralForms={},t.messages&&(this._dictionary[this._domain]={},this._dictionary[this._domain][this._locale]=t.messages),t.pluralForms&&(this._pluralForms[this._locale]=t.pluralForms)}setContextDelimiter(t){this._contextDelimiter=t}getContextDelimiter(){return this._contextDelimiter}setLocale(t){this._locale=t.replace("_","-")}getLocale(){return this._locale}setDomain(t){this._domain=n(t)}getDomain(){return this._domain}setStringsPrefix(t){this._stringsPrefix=t}getStringsPrefix(){return this._stringsPrefix}static strfmt(t,...e){return t.replace(/%%/g,"%% ").replace(/%(\d+)/g,(function(t,r){return e[r-1]})).replace(/%% /g,"%")}loadJSON(t,e){if(!t[""]||!t[""].language||!t[""].pluralForms)throw new Error(`Wrong jsonData, it must have an empty key ("") with "language" and "pluralForms" information: ${t}`);e=n(e);let r=t[""],s=JSON.parse(JSON.stringify(t));delete s[""],this.setMessages(e||this._defaults.domain,r.language,s,r.pluralForms)}__(t,...e){return this.gettext(t,...e)}_n(t,e,r,...n){return this.ngettext(t,e,r,...n)}_p(t,e,...r){return this.pgettext(t,e,...r)}_np(t,e,r,n,...s){return this.npgettext(t,e,r,n,...s)}gettext(t,...e){return this.dcnpgettext("","",t,"",0,...e)}ngettext(t,e,r,...n){return this.dcnpgettext("","",t,e,r,...n)}pgettext(t,e,...r){return this.dcnpgettext("",t,e,"",0,...r)}npgettext(t,e,r,n,...s){return this.dcnpgettext("",t,e,r,n,...s)}dcnpgettext(t,e,r,s,a,...i){let l;t=n(t)||this._domain;let o=e?e+this._contextDelimiter+r:r,u={pluralForm:!1},c=!1,h=this._locale,_=this.expandLocale(this._locale);for(let e in _)if(h=_[e],c=this._dictionary[t]&&this._dictionary[t][h]&&this._dictionary[t][h][o],c=s?c&&this._dictionary[t][h][o].length>1:c&&1==this._dictionary[t][h][o].length,c){u.locale=h;break}if(c?l=this._dictionary[t][h][o]:(l=[r],u.pluralFunc=this._defaults.pluralFunc),!s)return this.t(l,a,u,...i);u.pluralForm=!0;let g=c?l:[r,s];return this.t(g,a,u,...i)}expandLocale(t){let e=[t],r=t.lastIndexOf("-");for(;r>0;)t=t.slice(0,r),e.push(t),r=t.lastIndexOf("-");return e}getPluralFunc(t){if(!new RegExp("^\\s*nplurals\\s*=\\s*[0-9]+\\s*;\\s*plural\\s*=\\s*(?:\\s|[-\\?\\|&=!<>+*/%:;n0-9_()])+").test(t))throw new Error(s.strfmt('The plural form "%1" is not valid',t));return new Function("n","let plural, nplurals; "+t+" return { nplurals: nplurals, plural: (plural === true ? 1 : (plural ? plural : 0)) };")}removeContext(t){return-1!==t.indexOf(this._contextDelimiter)?t.split(this._contextDelimiter)[1]:t}t(t,e,r,...n){if(!r.pluralForm)return this._stringsPrefix+s.strfmt(this.removeContext(t[0]),...n);let a;return r.pluralFunc?a=r.pluralFunc(e):(this._pluralFuncs[r.locale||""]||(this._pluralFuncs[r.locale||""]=this.getPluralFunc(this._pluralForms[r.locale||""])),a=this._pluralFuncs[r.locale||""](e)),(void 0===!a.plural||a.plural>a.nplurals||t.length<=a.plural)&&(a.plural=0),this._stringsPrefix+s.strfmt(this.removeContext(t[a.plural]),...[e].concat(n))}setMessages(t,e,r,s){t=n(t),s&&(this._pluralForms[e]=s),this._dictionary[t]||(this._dictionary[t]={}),this._dictionary[t][e]=r}}class a{constructor(t){this.languageCode="en",this._languageBundle=t}load(t){return this._languageBundle}}const i=new a(new class{__(t,...e){return this.gettext(t,...e)}_n(t,e,r,...n){return this.ngettext(t,e,r,...n)}_p(t,e,...r){return this.pgettext(t,e,...r)}_np(t,e,r,n,...s){return this.npgettext(t,e,r,n,...s)}gettext(t,...e){return s.strfmt(t,...e)}ngettext(t,e,r,...n){return s.strfmt(1==r?t:e,...[r].concat(n))}pgettext(t,e,...r){return s.strfmt(e,...r)}npgettext(t,e,r,n,...s){return this.ngettext(e,r,n,...s)}dcnpgettext(t,e,r,n,s,...a){return this.ngettext(r,n,s,...a)}});var l=r(71565),o=r(21961),u=r(77075),c=r(68086);const h="api/translations";async function _(t="",e="",r={},n=void 0){const s=null!=n?n:c.ServerConnection.makeSettings();t=t||`${s.appUrl}/${h}`;const a=u.URLExt.join(s.baseUrl,t),i=u.URLExt.join(a,e);if(!i.startsWith(a))throw new Error("Can only be used for translations requests");let l;try{l=await c.ServerConnection.makeRequest(i,r,s)}catch(t){throw new c.ServerConnection.NetworkError(t)}let o=await l.text();if(o.length>0)try{o=JSON.parse(o)}catch(t){console.error("Not a JSON response body.",l)}if(!l.ok)throw new c.ServerConnection.ResponseError(l,o.message||o);return o}const g=new o.Token("@jupyterlab/translation:ITranslatorConnector","A service to connect to the server translation endpoint.");class p extends l.DataConnector{constructor(t="",e){super(),this._translationsUrl=t,this._serverSettings=e}async fetch(t){return _(this._translationsUrl,t.language,{},this._serverSettings)}}const d=new o.Token("@jupyterlab/translation:ITranslator","A service to translate strings.");class m{constructor(t="",e,r){this._domainData={},this._translationBundles={},this._connector=new p(t,r),this._stringsPrefix=e||"",this._englishBundle=new s({stringsPrefix:this._stringsPrefix})}get languageCode(){return this._currentLocale}async fetch(t){var e,r,n,s;if(this._languageData=await this._connector.fetch({language:t}),this._languageData&&"default"===t)try{for(const t of Object.values(null!==(e=this._languageData.data)&&void 0!==e?e:{})){this._currentLocale=t[""].language.replace("_","-");break}}catch(t){this._currentLocale="en"}else this._currentLocale=t;this._domainData=null!==(n=null===(r=this._languageData)||void 0===r?void 0:r.data)&&void 0!==n?n:{};const a=null===(s=this._languageData)||void 0===s?void 0:s.message;a&&"en"!==t&&console.warn(a)}load(t){if(this._domainData){if("en"==this._currentLocale)return this._englishBundle;if(!((t=n(t))in this._translationBundles)){let e=new s({domain:t,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(t in this._domainData){let r=this._domainData[t][""];"plural_forms"in r&&(r.pluralForms=r.plural_forms,delete r.plural_forms,this._domainData[t][""]=r),e.loadJSON(this._domainData[t],t)}this._translationBundles[t]=e}return this._translationBundles[t]}return this._englishBundle}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7854],{97854:(e,n,t)=>{t.r(n),t.d(n,{CommandIDs:()=>f,default:()=>v});var o=t(73852),s=t(53876),a=t(26537),i=t(7073),r=t(45556),l=t(93050),c=t(76878),d=t(20754),u=t(5348),h=t(32406),m=t(2159),g=t(78156),p=t.n(g);const w="jp-mod-kernel",b="jp-RunningSessions-item-label-kernel-id";var _;!function(e){e.KernelSpecItem=class{constructor(e){this._name=e.name,this.className="jp-mod-kernelspec",this._kernels=e.kernels,this.spec=e.spec||null,this.trans=e.trans}icon(){const{spec:e}=this;return e&&e.resources?e.resources["logo-svg"]||e.resources["logo-64x64"]||e.resources["logo-32x32"]:c.jupyterIcon}label(){const{_name:e,spec:n}=this;return(null==n?void 0:n.display_name)||e}get children(){return this._kernels}},e.RunningKernel=class{constructor(e){this.className=w,this.commands=e.commands,this.kernel=e.kernel,this.context=this.kernel.id,this.kernels=e.kernels,this.sessions=e.sessions,this.trans=e.trans,this._mode=e.mode}get children(){var e;const n=[],t=f.kernelOpenSession,{commands:o}=this;for(const s of this.sessions.running())if(this.kernel.id===(null===(e=s.kernel)||void 0===e?void 0:e.id)){const{name:e,path:a,type:i}=s;n.push({className:"jp-mod-kernel-widget",context:this.kernel.id,open:()=>{o.execute(t,{name:e,path:a,type:i})},icon:()=>"console"===i?c.consoleIcon:"notebook"===i?c.notebookIcon:c.jupyterIcon,label:()=>{if("tree"===this._mode)return e;const n=this.kernel.id.split("-")[0];return p().createElement(p().Fragment,null,e," ",p().createElement("span",{className:b},"(",n,")"))},labelTitle:()=>a,name:()=>e})}return n}shutdown(){return this.kernels.shutdown(this.kernel.id)}icon(){return c.kernelIcon}label(){const{kernel:e}=this,n=e.id.split("-")[0];return p().createElement(p().Fragment,null,this._summary," ",p().createElement("span",{className:b},"(",n,")"))}labelTitle(){var e;const{trans:n}=this,{id:t}=this.kernel,o=[`${this._summary}: ${t}`];for(const t of this.sessions.running())if(this.kernel.id===(null===(e=t.kernel)||void 0===e?void 0:e.id)){const{path:e,type:s}=t;o.push(n.__("%1\nPath: %2",s,e))}return o.join("\n\n")}get _summary(){const e=this.children;return 0===e.length?this.trans.__("No sessions connected"):1==e.length?e[0].name():this.trans.__("%1 and %2 more",e[0].name(),e.length-1)}},e.runningChanged=new m.Signal({})}(_||(_={}));var f,k=t(23764);class y{constructor(e){this._tabsChanged=new m.Signal(this),this._widgets=[],this._labShell=e,this._labShell.layoutModified.connect(this._emitTabsChanged,this)}get tabsChanged(){return this._tabsChanged}addWidget(e){e.title.changed.connect(this._emitTabsChanged,this),this._widgets.push(e)}_emitTabsChanged(){this._widgets.forEach((e=>{e.title.changed.disconnect(this._emitTabsChanged,this)})),this._widgets=[],this._tabsChanged.emit(void 0)}}!function(e){e.kernelNewConsole="running:kernel-new-console",e.kernelNewNotebook="running:kernel-new-notebook",e.kernelOpenSession="running:kernel-open-session",e.kernelShutDown="running:kernel-shut-down",e.kernelShutDownUnused="running:kernel-shut-down-unused",e.showPanel="running:show-panel",e.showModal="running:show-modal"}(f||(f={}));const v=[{id:"@jupyterlab/running-extension:plugin",description:"Provides the running session managers.",provides:a.IRunningSessionManagers,requires:[l.ITranslator],optional:[o.ILabShell],autoStart:!0,activate:(e,n,t)=>{const o=new a.RunningSessionManagers;return t&&function(e,n,t){const o=new y(t),s=n.load("jupyterlab");e.add({name:s.__("Open Tabs"),supportsMultipleViews:!1,running:()=>Array.from(t.widgets("main")).map((e=>(o.addWidget(e),new a(e)))),shutdownAll:()=>{for(const e of t.widgets("main"))e.close()},refreshRunning:()=>{},runningChanged:o.tabsChanged,shutdownLabel:s.__("Close"),shutdownAllLabel:s.__("Close All"),shutdownAllConfirmationText:s.__("Are you sure you want to close all open tabs?")});class a{constructor(e){this._widget=e}open(){t.activateById(this._widget.id)}shutdown(){this._widget.close()}icon(){const e=this._widget.title.icon;return e instanceof c.LabIcon?e:c.fileIcon}label(){return this._widget.title.label}labelTitle(){let e;return e=this._widget instanceof k.DocumentWidget?this._widget.context.path:this._widget.title.label,e}}}(o,n,t),async function(e,n,t){const{commands:o,contextMenu:a,serviceManager:i}=t,{kernels:r,kernelspecs:l,sessions:m}=i,{runningChanged:g,RunningKernel:b}=_,k=new h.Throttler((()=>g.emit(void 0)),100),y=n.load("jupyterlab"),v=y.__("Shut Down Unused");let S=!1;const C=new h.Throttler((async function(){const e=S;S=I().length>0,e!==S&&o.notifyCommandChanged(f.kernelShutDownUnused)}),1e4);function I(){return Array.from(r.running()).filter((e=>{var n;return(null!==(n=e.connections)&&void 0!==n?n:1)<1}))}r.runningChanged.connect((()=>{k.invoke(),C.invoke()})),m.runningChanged.connect((()=>{k.invoke()})),await Promise.all([r.ready,l.ready,m.ready]),o.addCommand(f.kernelShutDownUnused,{label:e=>e.toolbar?"":v,icon:e=>e.toolbar?c.cleaningIcon:void 0,execute:async()=>{const e=I();0!==e.length&&(await(0,s.showDialog)({title:v,body:p().createElement(p().Fragment,null,y.__("Are you sure you want to shut down the following unused kernels?"),p().createElement("ul",null,e.map((e=>p().createElement("li",{key:e.id},y.__("%1 (%2)",e.name,e.id.slice(0,8))))))),buttons:[s.Dialog.cancelButton(),s.Dialog.warnButton({label:v})]})).button.accept&&(await Promise.allSettled(e.map((e=>u.KernelAPI.shutdownKernel(e.id)))),await Promise.all([r.refreshRunning(),m.refreshRunning()]))},isEnabled:()=>S}),e.add({name:y.__("Kernels"),supportsMultipleViews:!0,running:e=>{var n;const t=new Map;for(const s of r.running()){const a=null!==(n=t.get(s.name))&&void 0!==n?n:[];t.set(s.name,a),a.push(new b({commands:o,kernel:s,kernels:r,sessions:m,trans:y,mode:e.mode}))}const s=Array.from(t.entries()).map((([e,n])=>{var t;return new _.KernelSpecItem({name:e,kernels:n,spec:null===(t=l.specs)||void 0===t?void 0:t.kernelspecs[e],trans:y})}));return"tree"===e.mode?s:s.map((e=>e.children.map((e=>{var n;return null!==(n=e.children)&&void 0!==n?n:[]})).flat())).flat()},shutdownAll:()=>r.shutdownAll(),refreshRunning:()=>Promise.all([r.refreshRunning(),m.refreshRunning()]),runningChanged:g,shutdownLabel:y.__("Shut Down Kernel"),shutdownAllLabel:y.__("Shut Down All"),shutdownAllConfirmationText:()=>y._n("Are you sure you want to permanently shut down the running kernel?","Are you sure you want to permanently shut down the %1 running kernels?",r.runningCount),toolbarButtons:[new c.CommandToolbarButton({commands:o,id:f.kernelShutDownUnused,caption:v,args:{toolbar:!0}})]});const T=e=>e.classList.contains(w);o.addCommand(f.kernelNewConsole,{icon:c.consoleIcon,label:y.__("New Console for Kernel"),execute:e=>{var n;const s=t.contextMenuHitTest(T),a=null!==(n=e.id)&&void 0!==n?n:null==s?void 0:s.dataset.context;if(a)return o.execute("console:create",{kernelPreference:{id:a}})}}),o.addCommand(f.kernelNewNotebook,{icon:c.notebookIcon,label:y.__("New Notebook for Kernel"),execute:e=>{var n;const s=t.contextMenuHitTest(T),a=null!==(n=e.id)&&void 0!==n?n:null==s?void 0:s.dataset.context;if(a)return o.execute("notebook:create-new",{kernelId:a})}}),o.addCommand(f.kernelOpenSession,{icon:e=>"console"===e.type?c.consoleIcon:"notebook"===e.type?c.notebookIcon:void 0,isEnabled:({path:e,type:n})=>!!n||void 0!==e,label:({name:e,path:n})=>e||d.PathExt.basename(n||y.__("Unknown Session")),execute:({path:e,type:n})=>{if(!n||void 0===e)return;const t="console"===n?"console:open":"docmanager:open";return o.execute(t,{path:e})}}),o.addCommand(f.kernelShutDown,{icon:c.closeIcon,label:y.__("Shut Down Kernel"),execute:e=>{var n;const o=t.contextMenuHitTest(T),s=null!==(n=e.id)&&void 0!==n?n:null==o?void 0:o.dataset.context;if(s)return r.shutdown(s)}});const x=[];a.opened.connect((async()=>{var e,n,o;const s=null!==(n=null===(e=a.menu.items.find((e=>{var n;return"submenu"===e.type&&"jp-contextmenu-connected-sessions"===(null===(n=e.submenu)||void 0===n?void 0:n.id)})))||void 0===e?void 0:e.submenu)&&void 0!==n?n:null;if(!s)return;x.forEach((e=>e.dispose())),x.length=0,s.clearItems();const i=t.contextMenuHitTest(T),r=null==i?void 0:i.dataset.context;if(!r)return;const l=f.kernelOpenSession;for(const e of m.running())if(r===(null===(o=e.kernel)||void 0===o?void 0:o.id)){const{name:n,path:t,type:o}=e;x.push(s.addItem({command:l,args:{name:n,path:t,type:o}}))}}))}(o,n,e),o}},{id:"@jupyterlab/running-extension:sidebar",description:"Provides the running session sidebar.",provides:a.IRunningSessionSidebar,requires:[a.IRunningSessionManagers,l.ITranslator],optional:[o.ILayoutRestorer,r.IStateDB],autoStart:!0,activate:(e,n,t,o,s)=>{const i=t.load("jupyterlab"),r=new a.RunningSessions(n,t,s);return r.id="jp-running-sessions",r.title.caption=i.__("Running Terminals and Kernels"),r.title.icon=c.runningIcon,r.node.setAttribute("role","region"),r.node.setAttribute("aria-label",i.__("Running Sessions section")),o&&o.add(r,"running-sessions"),e.shell.add(r,"left",{rank:200,type:"Sessions and Tabs"}),e.commands.addCommand(f.showPanel,{label:i.__("Sessions and Tabs"),execute:()=>{e.shell.activateById(r.id)}}),r}},{id:"@jupyterlab/running-extension:recently-closed",description:"Adds recently closed documents list.",requires:[a.IRunningSessionManagers,i.IRecentsManager,l.ITranslator],autoStart:!0,activate:(e,n,t,o)=>{!function(e,n,t,o,s){const a=s.load("jupyterlab");e.add({name:a.__("Recently Closed"),supportsMultipleViews:!1,running:()=>n.recentlyClosed.map((e=>new i(e))),shutdownAll:()=>{for(const e of n.recentlyClosed)n.removeRecent(e,"closed")},refreshRunning:()=>{},runningChanged:n.changed,shutdownLabel:a.__("Forget"),shutdownAllLabel:a.__("Forget All"),shutdownAllConfirmationText:a.__("Are you sure you want to clear recently closed tabs?")});class i{constructor(e){this._recent=e}async open(){const e=this._recent;await n.validate(e)&&(await t.execute("docmanager:open",{path:e.path,factory:e.factory}),n.removeRecent(e,"closed"))}shutdown(){n.removeRecent(this._recent,"closed")}icon(){if(!this._recent.factory)return c.fileIcon;const e=o.getFileTypesForPath(this._recent.path);for(const n of e){const e=n.icon;if(e instanceof c.LabIcon)return e}const n=o.getWidgetFactory(this._recent.factory);if(n)for(const e of n.fileTypes){const n=o.getFileType(e),t=null==n?void 0:n.icon;if(t instanceof c.LabIcon)return t}return c.fileIcon}label(){return d.PathExt.basename(this._recent.path)}labelTitle(){return this._recent.path}}}(n,t,e.commands,e.docRegistry,o)}},{id:"@jupyterlab/running-extension:search-tabs",description:"Adds a widget to search open and closed tabs.",requires:[a.IRunningSessionManagers,l.ITranslator],optional:[s.ICommandPalette,a.IRunningSessionSidebar],autoStart:!0,activate:(e,n,t,o,i)=>{const r=t.load("jupyterlab");if(e.commands.addCommand(f.showModal,{execute:()=>{const e=new a.SearchableSessions(n,t),o=new s.Dialog({title:r.__("Tabs and Running Sessions"),body:e,buttons:[s.Dialog.okButton({})],hasClose:!0});return o.addClass("jp-SearchableSessions-modal"),o.launch()},label:r.__("Search Tabs and Running Sessions")}),o&&o.addItem({command:f.showModal,category:r.__("Running")}),i){const n=new c.CommandToolbarButton({commands:e.commands,id:f.showModal,icon:c.launcherIcon,label:""});i.toolbar.addItem("open-as-modal",n)}}}]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7854],{97854:(e,n,t)=>{t.r(n),t.d(n,{CommandIDs:()=>f,default:()=>v});var o=t(84241),s=t(20911),a=t(2315),i=t(20780),r=t(71565),l=t(66649),c=t(7258),d=t(77075),u=t(68086),h=t(32406),m=t(2159),g=t(78156),p=t.n(g);const w="jp-mod-kernel",b="jp-RunningSessions-item-label-kernel-id";var _;!function(e){e.KernelSpecItem=class{constructor(e){this._name=e.name,this.className="jp-mod-kernelspec",this._kernels=e.kernels,this.spec=e.spec||null,this.trans=e.trans}icon(){const{spec:e}=this;return e&&e.resources?e.resources["logo-svg"]||e.resources["logo-64x64"]||e.resources["logo-32x32"]:c.jupyterIcon}label(){const{_name:e,spec:n}=this;return(null==n?void 0:n.display_name)||e}get children(){return this._kernels}},e.RunningKernel=class{constructor(e){this.className=w,this.commands=e.commands,this.kernel=e.kernel,this.context=this.kernel.id,this.kernels=e.kernels,this.sessions=e.sessions,this.trans=e.trans,this._mode=e.mode}get children(){var e;const n=[],t=f.kernelOpenSession,{commands:o}=this;for(const s of this.sessions.running())if(this.kernel.id===(null===(e=s.kernel)||void 0===e?void 0:e.id)){const{name:e,path:a,type:i}=s;n.push({className:"jp-mod-kernel-widget",context:this.kernel.id,open:()=>{o.execute(t,{name:e,path:a,type:i})},icon:()=>"console"===i?c.consoleIcon:"notebook"===i?c.notebookIcon:c.jupyterIcon,label:()=>{if("tree"===this._mode)return e;const n=this.kernel.id.split("-")[0];return p().createElement(p().Fragment,null,e," ",p().createElement("span",{className:b},"(",n,")"))},labelTitle:()=>a,name:()=>e})}return n}shutdown(){return this.kernels.shutdown(this.kernel.id)}icon(){return c.kernelIcon}label(){const{kernel:e}=this,n=e.id.split("-")[0];return p().createElement(p().Fragment,null,this._summary," ",p().createElement("span",{className:b},"(",n,")"))}labelTitle(){var e;const{trans:n}=this,{id:t}=this.kernel,o=[`${this._summary}: ${t}`];for(const t of this.sessions.running())if(this.kernel.id===(null===(e=t.kernel)||void 0===e?void 0:e.id)){const{path:e,type:s}=t;o.push(n.__("%1\nPath: %2",s,e))}return o.join("\n\n")}get _summary(){const e=this.children;return 0===e.length?this.trans.__("No sessions connected"):1==e.length?e[0].name():this.trans.__("%1 and %2 more",e[0].name(),e.length-1)}},e.runningChanged=new m.Signal({})}(_||(_={}));var f,k=t(21428);class y{constructor(e){this._tabsChanged=new m.Signal(this),this._widgets=[],this._labShell=e,this._labShell.layoutModified.connect(this._emitTabsChanged,this)}get tabsChanged(){return this._tabsChanged}addWidget(e){e.title.changed.connect(this._emitTabsChanged,this),this._widgets.push(e)}_emitTabsChanged(){this._widgets.forEach((e=>{e.title.changed.disconnect(this._emitTabsChanged,this)})),this._widgets=[],this._tabsChanged.emit(void 0)}}!function(e){e.kernelNewConsole="running:kernel-new-console",e.kernelNewNotebook="running:kernel-new-notebook",e.kernelOpenSession="running:kernel-open-session",e.kernelShutDown="running:kernel-shut-down",e.kernelShutDownUnused="running:kernel-shut-down-unused",e.showPanel="running:show-panel",e.showModal="running:show-modal"}(f||(f={}));const v=[{id:"@jupyterlab/running-extension:plugin",description:"Provides the running session managers.",provides:a.IRunningSessionManagers,requires:[l.ITranslator],optional:[o.ILabShell],autoStart:!0,activate:(e,n,t)=>{const o=new a.RunningSessionManagers;return t&&function(e,n,t){const o=new y(t),s=n.load("jupyterlab");e.add({name:s.__("Open Tabs"),supportsMultipleViews:!1,running:()=>Array.from(t.widgets("main")).map((e=>(o.addWidget(e),new a(e)))),shutdownAll:()=>{for(const e of t.widgets("main"))e.close()},refreshRunning:()=>{},runningChanged:o.tabsChanged,shutdownLabel:s.__("Close"),shutdownAllLabel:s.__("Close All"),shutdownAllConfirmationText:s.__("Are you sure you want to close all open tabs?")});class a{constructor(e){this._widget=e}open(){t.activateById(this._widget.id)}shutdown(){this._widget.close()}icon(){const e=this._widget.title.icon;return e instanceof c.LabIcon?e:c.fileIcon}label(){return this._widget.title.label}labelTitle(){let e;return e=this._widget instanceof k.DocumentWidget?this._widget.context.path:this._widget.title.label,e}}}(o,n,t),async function(e,n,t){const{commands:o,contextMenu:a,serviceManager:i}=t,{kernels:r,kernelspecs:l,sessions:m}=i,{runningChanged:g,RunningKernel:b}=_,k=new h.Throttler((()=>g.emit(void 0)),100),y=n.load("jupyterlab"),v=y.__("Shut Down Unused");let S=!1;const C=new h.Throttler((async function(){const e=S;S=I().length>0,e!==S&&o.notifyCommandChanged(f.kernelShutDownUnused)}),1e4);function I(){return Array.from(r.running()).filter((e=>{var n;return(null!==(n=e.connections)&&void 0!==n?n:1)<1}))}r.runningChanged.connect((()=>{k.invoke(),C.invoke()})),m.runningChanged.connect((()=>{k.invoke()})),await Promise.all([r.ready,l.ready,m.ready]),o.addCommand(f.kernelShutDownUnused,{label:e=>e.toolbar?"":v,icon:e=>e.toolbar?c.cleaningIcon:void 0,execute:async()=>{const e=I();0!==e.length&&(await(0,s.showDialog)({title:v,body:p().createElement(p().Fragment,null,y.__("Are you sure you want to shut down the following unused kernels?"),p().createElement("ul",null,e.map((e=>p().createElement("li",{key:e.id},y.__("%1 (%2)",e.name,e.id.slice(0,8))))))),buttons:[s.Dialog.cancelButton(),s.Dialog.warnButton({label:v})]})).button.accept&&(await Promise.allSettled(e.map((e=>u.KernelAPI.shutdownKernel(e.id)))),await Promise.all([r.refreshRunning(),m.refreshRunning()]))},isEnabled:()=>S}),e.add({name:y.__("Kernels"),supportsMultipleViews:!0,running:e=>{var n;const t=new Map;for(const s of r.running()){const a=null!==(n=t.get(s.name))&&void 0!==n?n:[];t.set(s.name,a),a.push(new b({commands:o,kernel:s,kernels:r,sessions:m,trans:y,mode:e.mode}))}const s=Array.from(t.entries()).map((([e,n])=>{var t;return new _.KernelSpecItem({name:e,kernels:n,spec:null===(t=l.specs)||void 0===t?void 0:t.kernelspecs[e],trans:y})}));return"tree"===e.mode?s:s.map((e=>e.children.map((e=>{var n;return null!==(n=e.children)&&void 0!==n?n:[]})).flat())).flat()},shutdownAll:()=>r.shutdownAll(),refreshRunning:()=>Promise.all([r.refreshRunning(),m.refreshRunning()]),runningChanged:g,shutdownLabel:y.__("Shut Down Kernel"),shutdownAllLabel:y.__("Shut Down All"),shutdownAllConfirmationText:()=>y._n("Are you sure you want to permanently shut down the running kernel?","Are you sure you want to permanently shut down the %1 running kernels?",r.runningCount),toolbarButtons:[new c.CommandToolbarButton({commands:o,id:f.kernelShutDownUnused,caption:v,args:{toolbar:!0}})]});const T=e=>e.classList.contains(w);o.addCommand(f.kernelNewConsole,{icon:c.consoleIcon,label:y.__("New Console for Kernel"),execute:e=>{var n;const s=t.contextMenuHitTest(T),a=null!==(n=e.id)&&void 0!==n?n:null==s?void 0:s.dataset.context;if(a)return o.execute("console:create",{kernelPreference:{id:a}})}}),o.addCommand(f.kernelNewNotebook,{icon:c.notebookIcon,label:y.__("New Notebook for Kernel"),execute:e=>{var n;const s=t.contextMenuHitTest(T),a=null!==(n=e.id)&&void 0!==n?n:null==s?void 0:s.dataset.context;if(a)return o.execute("notebook:create-new",{kernelId:a})}}),o.addCommand(f.kernelOpenSession,{icon:e=>"console"===e.type?c.consoleIcon:"notebook"===e.type?c.notebookIcon:void 0,isEnabled:({path:e,type:n})=>!!n||void 0!==e,label:({name:e,path:n})=>e||d.PathExt.basename(n||y.__("Unknown Session")),execute:({path:e,type:n})=>{if(!n||void 0===e)return;const t="console"===n?"console:open":"docmanager:open";return o.execute(t,{path:e})}}),o.addCommand(f.kernelShutDown,{icon:c.closeIcon,label:y.__("Shut Down Kernel"),execute:e=>{var n;const o=t.contextMenuHitTest(T),s=null!==(n=e.id)&&void 0!==n?n:null==o?void 0:o.dataset.context;if(s)return r.shutdown(s)}});const x=[];a.opened.connect((async()=>{var e,n,o;const s=null!==(n=null===(e=a.menu.items.find((e=>{var n;return"submenu"===e.type&&"jp-contextmenu-connected-sessions"===(null===(n=e.submenu)||void 0===n?void 0:n.id)})))||void 0===e?void 0:e.submenu)&&void 0!==n?n:null;if(!s)return;x.forEach((e=>e.dispose())),x.length=0,s.clearItems();const i=t.contextMenuHitTest(T),r=null==i?void 0:i.dataset.context;if(!r)return;const l=f.kernelOpenSession;for(const e of m.running())if(r===(null===(o=e.kernel)||void 0===o?void 0:o.id)){const{name:n,path:t,type:o}=e;x.push(s.addItem({command:l,args:{name:n,path:t,type:o}}))}}))}(o,n,e),o}},{id:"@jupyterlab/running-extension:sidebar",description:"Provides the running session sidebar.",provides:a.IRunningSessionSidebar,requires:[a.IRunningSessionManagers,l.ITranslator],optional:[o.ILayoutRestorer,r.IStateDB],autoStart:!0,activate:(e,n,t,o,s)=>{const i=t.load("jupyterlab"),r=new a.RunningSessions(n,t,s);return r.id="jp-running-sessions",r.title.caption=i.__("Running Terminals and Kernels"),r.title.icon=c.runningIcon,r.node.setAttribute("role","region"),r.node.setAttribute("aria-label",i.__("Running Sessions section")),o&&o.add(r,"running-sessions"),e.shell.add(r,"left",{rank:200,type:"Sessions and Tabs"}),e.commands.addCommand(f.showPanel,{label:i.__("Sessions and Tabs"),execute:()=>{e.shell.activateById(r.id)}}),r}},{id:"@jupyterlab/running-extension:recently-closed",description:"Adds recently closed documents list.",requires:[a.IRunningSessionManagers,i.IRecentsManager,l.ITranslator],autoStart:!0,activate:(e,n,t,o)=>{!function(e,n,t,o,s){const a=s.load("jupyterlab");e.add({name:a.__("Recently Closed"),supportsMultipleViews:!1,running:()=>n.recentlyClosed.map((e=>new i(e))),shutdownAll:()=>{for(const e of n.recentlyClosed)n.removeRecent(e,"closed")},refreshRunning:()=>{},runningChanged:n.changed,shutdownLabel:a.__("Forget"),shutdownAllLabel:a.__("Forget All"),shutdownAllConfirmationText:a.__("Are you sure you want to clear recently closed tabs?")});class i{constructor(e){this._recent=e}async open(){const e=this._recent;await n.validate(e)&&(await t.execute("docmanager:open",{path:e.path,factory:e.factory}),n.removeRecent(e,"closed"))}shutdown(){n.removeRecent(this._recent,"closed")}icon(){if(!this._recent.factory)return c.fileIcon;const e=o.getFileTypesForPath(this._recent.path);for(const n of e){const e=n.icon;if(e instanceof c.LabIcon)return e}const n=o.getWidgetFactory(this._recent.factory);if(n)for(const e of n.fileTypes){const n=o.getFileType(e),t=null==n?void 0:n.icon;if(t instanceof c.LabIcon)return t}return c.fileIcon}label(){return d.PathExt.basename(this._recent.path)}labelTitle(){return this._recent.path}}}(n,t,e.commands,e.docRegistry,o)}},{id:"@jupyterlab/running-extension:search-tabs",description:"Adds a widget to search open and closed tabs.",requires:[a.IRunningSessionManagers,l.ITranslator],optional:[s.ICommandPalette,a.IRunningSessionSidebar],autoStart:!0,activate:(e,n,t,o,i)=>{const r=t.load("jupyterlab");if(e.commands.addCommand(f.showModal,{execute:()=>{const e=new a.SearchableSessions(n,t),o=new s.Dialog({title:r.__("Tabs and Running Sessions"),body:e,buttons:[s.Dialog.okButton({})],hasClose:!0});return o.addClass("jp-SearchableSessions-modal"),o.launch()},label:r.__("Search Tabs and Running Sessions")}),o&&o.addItem({command:f.showModal,category:r.__("Running")}),i){const n=new c.CommandToolbarButton({commands:e.commands,id:f.showModal,icon:c.launcherIcon,label:""});i.toolbar.addItem("open-as-modal",n)}}}]}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7900,8928],{67900:(t,e,i)=>{i.r(e),i.d(e,{IImageTracker:()=>r,ImageViewer:()=>l,ImageViewerFactory:()=>d});var s=i(21961);const r=new s.Token("@jupyterlab/imageviewer:IImageTracker","A widget tracker for images.\n Use this if you want to be able to iterate over and interact with images\n viewed by the application.");var a,o=i(20754),n=i(53876),c=i(23764),h=i(2260);class l extends h.Widget{constructor(t){super(),this._scale=1,this._matrix=[1,0,0,1],this._colorinversion=0,this._ready=new s.PromiseDelegate,this.context=t,this.node.tabIndex=0,this.addClass("jp-ImageViewer"),this._img=document.createElement("img"),this.node.appendChild(this._img),this._onTitleChanged(),t.pathChanged.connect(this._onTitleChanged,this),t.ready.then((()=>{if(this.isDisposed)return;const e=t.contentsModel;this._mimeType=e.mimetype,this._render(),t.model.contentChanged.connect(this.update,this),t.fileChanged.connect(this.update,this),this._ready.resolve(void 0)}))}[n.Printing.symbol](){return()=>n.Printing.printWidget(this)}get ready(){return this._ready.promise}get scale(){return this._scale}set scale(t){t!==this._scale&&(this._scale=t,this._updateStyle())}get colorinversion(){return this._colorinversion}set colorinversion(t){t!==this._colorinversion&&(this._colorinversion=t,this._updateStyle())}dispose(){this._img.src&&URL.revokeObjectURL(this._img.src||""),super.dispose()}resetRotationFlip(){this._matrix=[1,0,0,1],this._updateStyle()}rotateCounterclockwise(){this._matrix=a.prod(this._matrix,a.rotateCounterclockwiseMatrix),this._updateStyle()}rotateClockwise(){this._matrix=a.prod(this._matrix,a.rotateClockwiseMatrix),this._updateStyle()}flipHorizontal(){this._matrix=a.prod(this._matrix,a.flipHMatrix),this._updateStyle()}flipVertical(){this._matrix=a.prod(this._matrix,a.flipVMatrix),this._updateStyle()}onUpdateRequest(t){!this.isDisposed&&this.context.isReady&&this._render()}onActivateRequest(t){this.node.focus()}_onTitleChanged(){this.title.label=o.PathExt.basename(this.context.localPath)}_render(){const t=this.context,e=t.contentsModel;if(!e)return;const i=this._img.src||"";let s=t.model.toString();if("base64"===e.format)this._img.src=`data:${this._mimeType};base64,${s}`;else{const t=new Blob([s],{type:this._mimeType});this._img.src=URL.createObjectURL(t)}URL.revokeObjectURL(i)}_updateStyle(){const[t,e,i,s]=this._matrix,[r,o]=a.prodVec(this._matrix,[1,1]),n=`matrix(${t}, ${e}, ${i}, ${s}, 0, 0) translate(${r<0?-100:0}%, ${o<0?-100:0}%) `;this._img.style.transform=`scale(${this._scale}) ${n}`,this._img.style.filter=`invert(${this._colorinversion})`}}class d extends c.ABCWidgetFactory{createNewWidget(t){const e=new l(t);return new c.DocumentWidget({content:e,context:t})}}!function(t){t.prod=function([t,e,i,s],[r,a,o,n]){return[t*r+e*o,t*a+e*n,i*r+s*o,i*a+s*n]},t.prodVec=function([t,e,i,s],[r,a]){return[t*r+e*a,i*r+s*a]},t.rotateClockwiseMatrix=[0,1,-1,0],t.rotateCounterclockwiseMatrix=[0,-1,1,0],t.flipHMatrix=[-1,0,0,1],t.flipVMatrix=[1,0,0,-1]}(a||(a={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7900,8928],{67900:(t,e,i)=>{i.r(e),i.d(e,{IImageTracker:()=>r,ImageViewer:()=>l,ImageViewerFactory:()=>d});var s=i(21961);const r=new s.Token("@jupyterlab/imageviewer:IImageTracker","A widget tracker for images.\n Use this if you want to be able to iterate over and interact with images\n viewed by the application.");var a,o=i(77075),n=i(20911),c=i(21428),h=i(2260);class l extends h.Widget{constructor(t){super(),this._scale=1,this._matrix=[1,0,0,1],this._colorinversion=0,this._ready=new s.PromiseDelegate,this.context=t,this.node.tabIndex=0,this.addClass("jp-ImageViewer"),this._img=document.createElement("img"),this.node.appendChild(this._img),this._onTitleChanged(),t.pathChanged.connect(this._onTitleChanged,this),t.ready.then((()=>{if(this.isDisposed)return;const e=t.contentsModel;this._mimeType=e.mimetype,this._render(),t.model.contentChanged.connect(this.update,this),t.fileChanged.connect(this.update,this),this._ready.resolve(void 0)}))}[n.Printing.symbol](){return()=>n.Printing.printWidget(this)}get ready(){return this._ready.promise}get scale(){return this._scale}set scale(t){t!==this._scale&&(this._scale=t,this._updateStyle())}get colorinversion(){return this._colorinversion}set colorinversion(t){t!==this._colorinversion&&(this._colorinversion=t,this._updateStyle())}dispose(){this._img.src&&URL.revokeObjectURL(this._img.src||""),super.dispose()}resetRotationFlip(){this._matrix=[1,0,0,1],this._updateStyle()}rotateCounterclockwise(){this._matrix=a.prod(this._matrix,a.rotateCounterclockwiseMatrix),this._updateStyle()}rotateClockwise(){this._matrix=a.prod(this._matrix,a.rotateClockwiseMatrix),this._updateStyle()}flipHorizontal(){this._matrix=a.prod(this._matrix,a.flipHMatrix),this._updateStyle()}flipVertical(){this._matrix=a.prod(this._matrix,a.flipVMatrix),this._updateStyle()}onUpdateRequest(t){!this.isDisposed&&this.context.isReady&&this._render()}onActivateRequest(t){this.node.focus()}_onTitleChanged(){this.title.label=o.PathExt.basename(this.context.localPath)}_render(){const t=this.context,e=t.contentsModel;if(!e)return;const i=this._img.src||"";let s=t.model.toString();if("base64"===e.format)this._img.src=`data:${this._mimeType};base64,${s}`;else{const t=new Blob([s],{type:this._mimeType});this._img.src=URL.createObjectURL(t)}URL.revokeObjectURL(i)}_updateStyle(){const[t,e,i,s]=this._matrix,[r,o]=a.prodVec(this._matrix,[1,1]),n=`matrix(${t}, ${e}, ${i}, ${s}, 0, 0) translate(${r<0?-100:0}%, ${o<0?-100:0}%) `;this._img.style.transform=`scale(${this._scale}) ${n}`,this._img.style.filter=`invert(${this._colorinversion})`}}class d extends c.ABCWidgetFactory{createNewWidget(t){const e=new l(t);return new c.DocumentWidget({content:e,context:t})}}!function(t){t.prod=function([t,e,i,s],[r,a,o,n]){return[t*r+e*o,t*a+e*n,i*r+s*o,i*a+s*n]},t.prodVec=function([t,e,i,s],[r,a]){return[t*r+e*a,i*r+s*a]},t.rotateClockwiseMatrix=[0,1,-1,0],t.rotateCounterclockwiseMatrix=[0,-1,1,0],t.flipHMatrix=[-1,0,0,1],t.flipVMatrix=[1,0,0,-1]}(a||(a={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7906,4382],{54382:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(95514),o=r(28976);const c="jp-mod-searchable",a=[{id:"@jupyter-notebook/documentsearch-extension:notebookShellWidgetListener",requires:[o.INotebookShell,n.ISearchProviderRegistry],autoStart:!0,description:"A plugin to add document search functionalities",activate:(e,t,r)=>{const n=e=>{e&&(r.hasProvider(e)?e.addClass(c):e.removeClass(c))};r.changed.connect((()=>n(t.currentWidget))),t.currentChanged.connect(((e,r)=>{t.currentWidget&&n(t.currentWidget)}))}}]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[7906,4382],{54382:(e,t,r)=>{r.r(t),r.d(t,{default:()=>a});var n=r(12043),o=r(20763);const c="jp-mod-searchable",a=[{id:"@jupyter-notebook/documentsearch-extension:notebookShellWidgetListener",requires:[o.INotebookShell,n.ISearchProviderRegistry],autoStart:!0,description:"A plugin to add document search functionalities",activate:(e,t,r)=>{const n=e=>{e&&(r.hasProvider(e)?e.addClass(c):e.removeClass(c))};r.changed.connect((()=>n(t.currentWidget))),t.currentChanged.connect(((e,r)=>{t.currentWidget&&n(t.currentWidget)}))}}]}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8471],{8471:(e,t,n)=>{n.r(t),n.d(t,{ToolbarItems:()=>E,default:()=>T,downloadPlugin:()=>W,openBrowserTabPlugin:()=>F,pathStatusPlugin:()=>I,savingStatusPlugin:()=>S});var o,a,r=n(73852),i=n(53876),l=n(20754),d=n(7073),s=n(3012),c=n(33441),u=n(93050),m=n(76878),g=n(14931),p=n(21961),h=n(2159),v=n(2260),f=n(78156),w=n(45556);!function(e){e.clearRecents="docmanager:clear-recents"}(o||(o={})),function(e){e.recentsManager="@jupyterlab/docmanager-extension:recents",e.reopenClosed="@jupyterlab/docmanager-extension:reopen-recently-closed",e.mainPlugin="@jupyterlab/docmanager-extension:plugin"}(a||(a={}));const _={id:a.recentsManager,description:"Provides a manager of recently opened and closed documents.",autoStart:!0,requires:[w.IStateDB],optional:[s.ISettingRegistry,u.ITranslator],provides:d.IRecentsManager,activate:(e,t,n,r)=>{const{serviceManager:i}=e,l=(null!=r?r:u.nullTranslator).load("jupyterlab"),s=new d.RecentsManager({stateDB:t,contents:i.contents}),c=e=>{s.maximalRecentsLength=e.get("maxNumberRecents").composite};return n&&Promise.all([e.restored,n.load(a.mainPlugin)]).then((([e,t])=>{t.changed.connect(c),c(t)})),e.commands.addCommand(o.clearRecents,{execute:()=>{s.clearRecents()},isEnabled:()=>0!=s.recentlyOpened.length||0!=s.recentlyClosed.length,label:l.__("Clear Recent Documents"),caption:l.__("Clear the list of recently opened items.")}),s}};var b;!function(e){e.clone="docmanager:clone",e.deleteFile="docmanager:delete-file",e.newUntitled="docmanager:new-untitled",e.open="docmanager:open",e.openBrowserTab="docmanager:open-browser-tab",e.reload="docmanager:reload",e.rename="docmanager:rename",e.del="docmanager:delete",e.duplicate="docmanager:duplicate",e.restoreCheckpoint="docmanager:restore-checkpoint",e.save="docmanager:save",e.saveAll="docmanager:save-all",e.saveAs="docmanager:save-as",e.download="docmanager:download",e.toggleAutosave="docmanager:toggle-autosave",e.showInFileBrowser="docmanager:show-in-file-browser"}(b||(b={}));const y="@jupyterlab/docmanager-extension:plugin",C={id:"@jupyterlab/docmanager-extension:opener",description:"Provides the widget opener.",autoStart:!0,provides:d.IDocumentWidgetOpener,activate:e=>{const{shell:t}=e;return new class{constructor(){this._opened=new h.Signal(this)}open(e,n){e.id||(e.id="document-manager-"+ ++R.id),e.title.dataset={type:"document-title",...e.title.dataset},e.isAttached||t.add(e,"main",n||{}),t.activateById(e.id),this._opened.emit(e)}get opened(){return this._opened}}}},x={id:"@jupyterlab/docmanager-extension:contexts",description:"Adds the handling of opened documents dirty state.",autoStart:!0,requires:[d.IDocumentManager,d.IDocumentWidgetOpener],optional:[r.ILabStatus],activate:(e,t,n,o)=>{const a=new WeakSet;n.opened.connect(((e,n)=>{const r=t.contextForWidget(n);r&&!a.has(r)&&(o&&function(e,t){let n=null;const o=(t,o)=>{"dirty"===o.name&&(!0===o.newValue?n||(n=e.setDirty()):n&&(n.dispose(),n=null))};t.ready.then((()=>{t.model.stateChanged.connect(o),t.model.dirty&&(n=e.setDirty())})),t.disposed.connect((()=>{n&&n.dispose()}))}(o,r),a.add(r))}))}},D={id:"@jupyterlab/docmanager-extension:manager",description:"Provides the document manager.",provides:d.IDocumentManager,requires:[d.IDocumentWidgetOpener],optional:[u.ITranslator,r.ILabStatus,i.ISessionContextDialogs,r.JupyterLab.IInfo,d.IRecentsManager],activate:(e,t,n,o,a,r,l)=>{var s;const{serviceManager:c,docRegistry:m}=e,g=null!=n?n:u.nullTranslator,p=null!=a?a:new i.SessionContextDialogs({translator:g}),h=e.restored.then((()=>{}));return new d.DocumentManager({registry:m,manager:c,opener:t,when:h,setBusy:null!==(s=o&&(()=>o.setBusy()))&&void 0!==s?s:void 0,sessionDialogs:p,translator:null!=g?g:u.nullTranslator,isConnectedCallback:()=>!r||r.isConnected,recentsManager:null!=l?l:void 0})}},k={id:y,description:"Adds commands and settings to the document manager.",autoStart:!0,requires:[d.IDocumentManager,d.IDocumentWidgetOpener,s.ISettingRegistry],optional:[u.ITranslator,i.ICommandPalette,r.ILabShell],activate:(e,t,n,o,a,r,s)=>{const c=(a=null!=a?a:u.nullTranslator).load("jupyterlab"),h=e.docRegistry;!function(e,t,n,o,a,r,s){var c;const u=a.load("jupyterlab"),{commands:p,shell:h}=e,v=u.__("File Operations"),f=()=>{const{currentWidget:e}=h;return!(!e||!t.contextForWidget(e))},w=()=>{var e;const{currentWidget:n}=h;if(!n)return!1;const o=t.contextForWidget(n);return!!(null===(e=null==o?void 0:o.contentsModel)||void 0===e?void 0:e.writable)},_=e=>i.Notification.warning(u.__('%1 is read-only. Use "Save as…" instead.',e),{autoClose:5e3});r&&function(e,t,n,o,a){const r=a.load("jupyterlab"),{commands:l}=e,s=()=>{var o;const a=/[Pp]ath:\s?(.*)\n?/,r=e.contextMenuHitTest((e=>{var t;return!!(null===(t=e.title)||void 0===t?void 0:t.match(a))})),i=null==r?void 0:r.title.match(a);return null!==(o=i&&t.findWidget(i[1],null))&&void 0!==o?o:n.currentWidget},c=()=>{const{currentWidget:e}=n;return!(!e||!t.contextForWidget(e))};l.addCommand(b.clone,{label:()=>r.__("New View for %1",M(s(),t)),isEnabled:c,execute:e=>{const n=s(),a=e.options||{mode:"split-right"};if(!n)return;const r=t.cloneWidget(n);r&&o.open(r,a)}}),l.addCommand(b.rename,{label:()=>{let e=M(s(),t);return e&&(e=" "+e),r.__("Rename%1…",e)},isEnabled:c,execute:()=>{if(c()){const e=t.contextForWidget(s());return(0,d.renameDialog)(t,e)}}}),l.addCommand(b.duplicate,{label:()=>r.__("Duplicate %1",M(s(),t)),isEnabled:c,execute:()=>{if(c()){const e=t.contextForWidget(s());if(!e)return;return t.duplicate(e.path)}}}),l.addCommand(b.del,{label:()=>r.__("Delete %1",M(s(),t)),isEnabled:c,execute:async()=>{if(c()){const n=t.contextForWidget(s());if(!n)return;(await(0,i.showDialog)({title:r.__("Delete"),body:r.__("Are you sure you want to delete %1",n.path),buttons:[i.Dialog.cancelButton(),i.Dialog.warnButton({label:r.__("Delete")})]})).button.accept&&await e.commands.execute("docmanager:delete-file",{path:n.path})}}}),l.addCommand(b.showInFileBrowser,{label:()=>r.__("Show in File Browser"),isEnabled:c,execute:async()=>{const e=s(),n=e&&t.contextForWidget(e);n&&(await l.execute("filebrowser:activate",{path:n.path}),await l.execute("filebrowser:go-to-path",{path:n.path}))}}),n.currentChanged.connect((()=>{[b.clone,b.rename,b.duplicate,b.del,b.showInFileBrowser].forEach((t=>{e.commands.notifyCommandChanged(t)}))}))}(e,t,r,n,a),p.addCommand(b.deleteFile,{label:()=>`Delete ${M(h.currentWidget,t)}`,execute:e=>{const n=void 0===e.path?"":e.path;if(!n){const e=b.deleteFile;throw new Error(`A non-empty path is required for ${e}.`)}return t.deleteFile(n)}}),p.addCommand(b.newUntitled,{execute:async e=>{const n=e.error||u.__("Error"),o=void 0===e.path?"":e.path,a={type:e.type,path:o};return"file"===e.type&&(a.ext=e.ext||".txt"),t.services.contents.newUntitled(a).catch((e=>(0,i.showErrorMessage)(n,e)))},label:e=>e.label||`New ${e.type}`}),p.addCommand(b.open,{execute:async e=>{const n=void 0===e.path?"":e.path,o=e.factory||void 0,a=null==e?void 0:e.kernel,r=e.options||void 0;return t.services.contents.get(n,{content:!1}).then((()=>t.openOrReveal(n,o,a,r)))},iconClass:e=>e.icon||"",label:e=>{var t;return null!==(t=e.label||e.factory)&&void 0!==t?t:u.__("Open the provided `path`.")},mnemonic:e=>e.mnemonic||-1}),p.addCommand(b.reload,{label:()=>u.__("Reload %1 from Disk",M(h.currentWidget,t)),caption:u.__("Reload contents from disk"),isEnabled:f,execute:()=>{if(!f())return;const e=t.contextForWidget(h.currentWidget),n=M(h.currentWidget,t);return e?e.model.dirty?(0,i.showDialog)({title:u.__("Reload %1 from Disk",n),body:u.__("Are you sure you want to reload the %1 from the disk?",n),buttons:[i.Dialog.cancelButton(),i.Dialog.warnButton({label:u.__("Reload")})]}).then((t=>{if(t.button.accept&&!e.isDisposed)return e.revert()})):e.isDisposed?void 0:e.revert():(0,i.showDialog)({title:u.__("Cannot Reload"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]})}}),p.addCommand(b.restoreCheckpoint,{label:()=>u.__("Revert %1 to Checkpoint…",M(h.currentWidget,t)),caption:u.__("Revert contents to previous checkpoint"),isEnabled:f,execute:()=>{if(!f())return;const e=t.contextForWidget(h.currentWidget);return e?e.listCheckpoints().then((async n=>{const o=M(h.currentWidget,t);if(n.length<1)return void await(0,i.showErrorMessage)(u.__("No checkpoints"),u.__("No checkpoints are available for this %1.",o));const a=1===n.length?n[0]:await R.getTargetCheckpoint(n.reverse(),u);return a?(0,i.showDialog)({title:u.__("Revert %1 to checkpoint",o),body:new A(a,u,o),buttons:[i.Dialog.cancelButton(),i.Dialog.warnButton({label:u.__("Revert"),ariaLabel:u.__("Revert to Checkpoint")})]}).then((t=>{if(!e.isDisposed)return t.button.accept?e.model.readOnly?e.revert():e.restoreCheckpoint(a.id).then((()=>e.revert())):void 0})):void 0})):(0,i.showDialog)({title:u.__("Cannot Revert"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]})}});const C=new WeakSet;p.addCommand(b.save,{label:()=>u.__("Save %1",M(h.currentWidget,t)),caption:()=>{if(h.currentWidget){const e=t.contextForWidget(h.currentWidget);if(null==e?void 0:e.model.collaborative)return u.__("In collaborative mode, the document is saved automatically after every change");if(!w())return u.__('Document is read-only. "Save" is disabled; use "Save as…" instead')}return u.__("Save and create checkpoint")},icon:e=>e.toolbar?m.saveIcon:void 0,isEnabled:e=>e._luminoEvent&&"keybinding"===e._luminoEvent.type||w(),execute:async e=>{var n,a,r,d,s;const c=h.currentWidget,m=t.contextForWidget(c);if(f()){if(!m)return(0,i.showDialog)({title:u.__("Cannot Save"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]});{if(C.has(m))return;if(!(null===(n=m.contentsModel)||void 0===n?void 0:n.writable)&&!m.model.collaborative){let t=null===(a=e._luminoEvent)||void 0===a?void 0:a.type;return e._luminoEvent&&"keybinding"===t?void _(m.path):(0,i.showDialog)({title:u.__("Cannot Save"),body:u.__("Document is read-only"),buttons:[i.Dialog.okButton()]})}C.add(m);const g=l.PathExt.basename(null!==(d=null===(r=m.contentsModel)||void 0===r?void 0:r.path)&&void 0!==d?d:"");let p=g;if(t.renameUntitledFileOnSave&&!0===c.isUntitled){const e=await i.InputDialog.getText({title:u.__("Rename file"),okLabel:u.__("Rename"),placeholder:u.__("File name"),text:g,selectionRange:g.length-l.PathExt.extname(g).length,checkbox:{label:u.__("Do not ask me again."),caption:u.__("If checked, you will not be asked to rename future untitled files when saving them.")}});if(e.button.accept&&(p=null!==(s=e.value)&&void 0!==s?s:g,c.isUntitled=!1,"boolean"==typeof e.isChecked)){const t=(await o.get(y,"renameUntitledFileOnSave")).composite;e.isChecked===t&&o.set(y,"renameUntitledFileOnSave",!e.isChecked).catch((e=>{console.error(`Fail to set 'renameUntitledFileOnSave:\n${e}`)}))}}try{if(await m.save(),!(null==c?void 0:c.isDisposed))return m.createCheckpoint()}catch(e){if("ModalCancelError"===e.name)return;throw e}finally{C.delete(m),p!==g&&await m.rename(p)}}}}}),p.addCommand(b.saveAll,{label:()=>u.__("Save All"),caption:u.__("Save all open documents"),isEnabled:()=>(0,g.some)(h.widgets("main"),(e=>{var n,o,a;return null!==(a=null===(o=null===(n=t.contextForWidget(e))||void 0===n?void 0:n.contentsModel)||void 0===o?void 0:o.writable)&&void 0!==a&&a})),execute:()=>{var e;const n=[],o=new Set;for(const a of h.widgets("main")){const r=t.contextForWidget(a);r&&!o.has(r.path)&&((null===(e=r.contentsModel)||void 0===e?void 0:e.writable)?(o.add(r.path),n.push(r.save())):_(r.path))}return Promise.all(n)}}),p.addCommand(b.saveAs,{label:()=>u.__("Save %1 As…",M(h.currentWidget,t)),caption:u.__("Save with new path"),isEnabled:f,execute:()=>{if(f()){const e=t.contextForWidget(h.currentWidget);if(!e)return(0,i.showDialog)({title:u.__("Cannot Save"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]});const n=(n,o)=>{"save"===o.type&&o.newValue&&o.newValue.path!==e.path&&(t.closeFile(e.path),p.execute(b.open,{path:o.newValue.path}))};t.services.contents.fileChanged.connect(n),e.saveAs().finally((()=>t.services.contents.fileChanged.disconnect(n)))}}}),null===(c=e.shell.currentChanged)||void 0===c||c.connect((()=>{[b.reload,b.restoreCheckpoint,b.save,b.saveAll,b.saveAs].forEach((t=>{e.commands.notifyCommandChanged(t)}))})),p.addCommand(b.toggleAutosave,{label:u.__("Autosave Documents"),isToggled:()=>t.autosave,execute:()=>{const e=!t.autosave,n="autosave";return o.set(y,n,e).catch((e=>{console.error(`Failed to set ${y}:${n} - ${e.message}`)}))}}),s&&[b.reload,b.restoreCheckpoint,b.save,b.saveAs,b.toggleAutosave,b.duplicate].forEach((e=>{s.addItem({command:e,category:v})}))}(e,t,n,o,a,s,r);const v=n=>{const o=n.get("autosave").composite;t.autosave=!0!==o&&!1!==o||o,e.commands.notifyCommandChanged(b.toggleAutosave);const a=n.get("confirmClosingDocument").composite;t.confirmClosingDocument=null==a||a;const r=n.get("autosaveInterval").composite;t.autosaveInterval=r||120;const i=n.get("lastModifiedCheckMargin").composite;t.lastModifiedCheckMargin=i||500;const l=n.get("renameUntitledFileOnSave").composite;t.renameUntitledFileOnSave=null==l||l;const d=n.get("defaultViewers").composite,s={};Object.keys(d).forEach((e=>{h.getFileType(e)?(h.getWidgetFactory(d[e])||console.warn(`Document viewer ${d[e]} not found`),s[e]=d[e]):console.warn(`File Type ${e} not found`)}));for(const e of h.fileTypes())try{h.setDefaultWidgetFactory(e.name,s[e.name])}catch(t){console.warn(`Failed to set default viewer ${s[e.name]} for file type ${e.name}`)}};Promise.all([o.load(y),e.restored]).then((([e])=>{e.changed.connect(v),v(e),t.stateChanged.connect(((t,n)=>{["autosave","autosaveInterval","confirmClosingDocument","lastModifiedCheckMargin","renameUntitledFileOnSave"].includes(n.name)&&e.get(n.name).composite!==n.newValue&&e.set(n.name,n.newValue).catch((e=>{console.error(`Failed to set the setting '${n.name}':\n${e}`)}))}))})).catch((e=>{console.error(e.message)})),o.transform(y,{fetch:e=>{const t=Array.from(h.fileTypes()).map((e=>e.name)).join(" \n"),n=Array.from(h.widgetFactories()).map((e=>e.name)).join(" \n"),o=c.__('Overrides for the default viewers for file types.\nSpecify a mapping from file type name to document viewer name, for example:\n\ndefaultViewers: {\n markdown: "Markdown Preview"\n}\n\nIf you specify non-existent file types or viewers, or if a viewer cannot\nopen a given file type, the override will not function.\n\nAvailable viewers:\n%1\n\nAvailable file types:\n%2',n,t),a=p.JSONExt.deepCopy(e.schema);return a.properties.defaultViewers.description=o,{...e,schema:a}}}),h.changed.connect((()=>o.load(y,!0)))}},S={id:"@jupyterlab/docmanager-extension:saving-status",description:"Adds a saving status indicator.",autoStart:!0,requires:[d.IDocumentManager,r.ILabShell],optional:[u.ITranslator,c.IStatusBar],activate:(e,t,n,o,a)=>{if(!a)return;const r=new d.SavingStatus({docManager:t,translator:null!=o?o:u.nullTranslator});r.model.widget=n.currentWidget,n.currentChanged.connect((()=>{r.model.widget=n.currentWidget})),a.registerStatusItem(S.id,{item:r,align:"middle",isActive:()=>null!==r.model&&null!==r.model.status,activeStateChanged:r.model.stateChanged})}},I={id:"@jupyterlab/docmanager-extension:path-status",description:"Adds a file path indicator in the status bar.",autoStart:!0,requires:[d.IDocumentManager,r.ILabShell],optional:[c.IStatusBar],activate:(e,t,n,o)=>{if(!o)return;const a=new d.PathStatus({docManager:t});a.model.widget=n.currentWidget,n.currentChanged.connect((()=>{a.model.widget=n.currentWidget})),o.registerStatusItem(I.id,{item:a,align:"right",rank:0})}},W={id:"@jupyterlab/docmanager-extension:download",description:"Adds command to download files.",autoStart:!0,requires:[d.IDocumentManager],optional:[u.ITranslator,i.ICommandPalette],activate:(e,t,n,o)=>{var a;const r=(null!=n?n:u.nullTranslator).load("jupyterlab"),{commands:l,shell:d}=e,s=()=>{const{currentWidget:e}=d;return!(!e||!t.contextForWidget(e))};l.addCommand(b.download,{label:r.__("Download"),caption:r.__("Download the file to your computer"),isEnabled:s,execute:()=>{if(s()){const e=t.contextForWidget(d.currentWidget);return e?e.download():(0,i.showDialog)({title:r.__("Cannot Download"),body:r.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]})}}}),null===(a=e.shell.currentChanged)||void 0===a||a.connect((()=>{e.commands.notifyCommandChanged(b.download)}));const c=r.__("File Operations");o&&o.addItem({command:b.download,category:c})}},F={id:"@jupyterlab/docmanager-extension:open-browser-tab",description:"Adds command to open a browser tab.",autoStart:!0,requires:[d.IDocumentManager],optional:[u.ITranslator],activate:(e,t,n)=>{const o=(null!=n?n:u.nullTranslator).load("jupyterlab"),{commands:a}=e;a.addCommand(b.openBrowserTab,{execute:e=>{const n=void 0===e.path?"":e.path;if(n)return t.services.contents.getDownloadUrl(n).then((e=>{const t=window.open();if(!t)throw new Error("Failed to open new browser tab.");t.opener=null,t.location.href=e}))},iconClass:e=>e.icon||"",label:()=>o.__("Open in New Browser Tab")})}},T=[D,k,x,I,S,W,F,C,_];var E,R;!function(e){e.createSaveButton=function(e,t){return(0,i.addCommandToolbarButtonClass)(i.ReactWidget.create(f.createElement(i.UseSignal,{signal:t},(()=>f.createElement(i.CommandToolbarButtonComponent,{commands:e,id:b.save,label:"",args:{toolbar:!0}})))))}}(E||(E={}));class A extends v.Widget{constructor(e,t,n="notebook"){super({node:R.createRevertConfirmNode(e,n,t)})}}function M(e,t){if(!e)return"File";const n=t.contextForWidget(e);if(!n)return"";const o=t.registry.getFileTypesForPath(n.path);return o.length&&o[0].displayName?o[0].displayName:"File"}!function(e){e.id=0,e.createRevertConfirmNode=function(e,t,n){const o=document.createElement("div"),a=document.createElement("p"),r=document.createTextNode(n.__("Are you sure you want to revert the %1 to checkpoint? ",t)),i=document.createElement("strong");i.textContent=n.__("This cannot be undone."),a.appendChild(r),a.appendChild(i);const d=document.createElement("p"),s=document.createTextNode(n.__("The checkpoint was last updated at: ")),c=document.createElement("p"),u=new Date(e.last_modified);return c.style.textAlign="center",c.textContent=l.Time.format(u)+" ("+l.Time.formatHuman(u)+")",d.appendChild(s),d.appendChild(c),o.appendChild(a),o.appendChild(d),o},e.getTargetCheckpoint=async function(e,t){const n=e.map(((e,t)=>`${t}. ${l.Time.format(e.last_modified)} (${l.Time.formatHuman(e.last_modified)})`)),o=(await i.InputDialog.getItem({items:n,title:t.__("Choose a checkpoint")})).value;if(!o)return;const a=o.split(".",1)[0];return e[parseInt(a,10)]}}(R||(R={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8471],{8471:(e,t,n)=>{n.r(t),n.d(t,{ToolbarItems:()=>E,default:()=>T,downloadPlugin:()=>W,openBrowserTabPlugin:()=>F,pathStatusPlugin:()=>I,savingStatusPlugin:()=>S});var o,a,r=n(84241),i=n(20911),l=n(77075),d=n(20780),s=n(68878),c=n(15603),u=n(66649),m=n(7258),g=n(14931),p=n(21961),h=n(2159),v=n(2260),f=n(78156),w=n(71565);!function(e){e.clearRecents="docmanager:clear-recents"}(o||(o={})),function(e){e.recentsManager="@jupyterlab/docmanager-extension:recents",e.reopenClosed="@jupyterlab/docmanager-extension:reopen-recently-closed",e.mainPlugin="@jupyterlab/docmanager-extension:plugin"}(a||(a={}));const _={id:a.recentsManager,description:"Provides a manager of recently opened and closed documents.",autoStart:!0,requires:[w.IStateDB],optional:[s.ISettingRegistry,u.ITranslator],provides:d.IRecentsManager,activate:(e,t,n,r)=>{const{serviceManager:i}=e,l=(null!=r?r:u.nullTranslator).load("jupyterlab"),s=new d.RecentsManager({stateDB:t,contents:i.contents}),c=e=>{s.maximalRecentsLength=e.get("maxNumberRecents").composite};return n&&Promise.all([e.restored,n.load(a.mainPlugin)]).then((([e,t])=>{t.changed.connect(c),c(t)})),e.commands.addCommand(o.clearRecents,{execute:()=>{s.clearRecents()},isEnabled:()=>0!=s.recentlyOpened.length||0!=s.recentlyClosed.length,label:l.__("Clear Recent Documents"),caption:l.__("Clear the list of recently opened items.")}),s}};var b;!function(e){e.clone="docmanager:clone",e.deleteFile="docmanager:delete-file",e.newUntitled="docmanager:new-untitled",e.open="docmanager:open",e.openBrowserTab="docmanager:open-browser-tab",e.reload="docmanager:reload",e.rename="docmanager:rename",e.del="docmanager:delete",e.duplicate="docmanager:duplicate",e.restoreCheckpoint="docmanager:restore-checkpoint",e.save="docmanager:save",e.saveAll="docmanager:save-all",e.saveAs="docmanager:save-as",e.download="docmanager:download",e.toggleAutosave="docmanager:toggle-autosave",e.showInFileBrowser="docmanager:show-in-file-browser"}(b||(b={}));const y="@jupyterlab/docmanager-extension:plugin",C={id:"@jupyterlab/docmanager-extension:opener",description:"Provides the widget opener.",autoStart:!0,provides:d.IDocumentWidgetOpener,activate:e=>{const{shell:t}=e;return new class{constructor(){this._opened=new h.Signal(this)}open(e,n){e.id||(e.id="document-manager-"+ ++R.id),e.title.dataset={type:"document-title",...e.title.dataset},e.isAttached||t.add(e,"main",n||{}),t.activateById(e.id),this._opened.emit(e)}get opened(){return this._opened}}}},x={id:"@jupyterlab/docmanager-extension:contexts",description:"Adds the handling of opened documents dirty state.",autoStart:!0,requires:[d.IDocumentManager,d.IDocumentWidgetOpener],optional:[r.ILabStatus],activate:(e,t,n,o)=>{const a=new WeakSet;n.opened.connect(((e,n)=>{const r=t.contextForWidget(n);r&&!a.has(r)&&(o&&function(e,t){let n=null;const o=(t,o)=>{"dirty"===o.name&&(!0===o.newValue?n||(n=e.setDirty()):n&&(n.dispose(),n=null))};t.ready.then((()=>{t.model.stateChanged.connect(o),t.model.dirty&&(n=e.setDirty())})),t.disposed.connect((()=>{n&&n.dispose()}))}(o,r),a.add(r))}))}},D={id:"@jupyterlab/docmanager-extension:manager",description:"Provides the document manager.",provides:d.IDocumentManager,requires:[d.IDocumentWidgetOpener],optional:[u.ITranslator,r.ILabStatus,i.ISessionContextDialogs,r.JupyterLab.IInfo,d.IRecentsManager],activate:(e,t,n,o,a,r,l)=>{var s;const{serviceManager:c,docRegistry:m}=e,g=null!=n?n:u.nullTranslator,p=null!=a?a:new i.SessionContextDialogs({translator:g}),h=e.restored.then((()=>{}));return new d.DocumentManager({registry:m,manager:c,opener:t,when:h,setBusy:null!==(s=o&&(()=>o.setBusy()))&&void 0!==s?s:void 0,sessionDialogs:p,translator:null!=g?g:u.nullTranslator,isConnectedCallback:()=>!r||r.isConnected,recentsManager:null!=l?l:void 0})}},k={id:y,description:"Adds commands and settings to the document manager.",autoStart:!0,requires:[d.IDocumentManager,d.IDocumentWidgetOpener,s.ISettingRegistry],optional:[u.ITranslator,i.ICommandPalette,r.ILabShell],activate:(e,t,n,o,a,r,s)=>{const c=(a=null!=a?a:u.nullTranslator).load("jupyterlab"),h=e.docRegistry;!function(e,t,n,o,a,r,s){var c;const u=a.load("jupyterlab"),{commands:p,shell:h}=e,v=u.__("File Operations"),f=()=>{const{currentWidget:e}=h;return!(!e||!t.contextForWidget(e))},w=()=>{var e;const{currentWidget:n}=h;if(!n)return!1;const o=t.contextForWidget(n);return!!(null===(e=null==o?void 0:o.contentsModel)||void 0===e?void 0:e.writable)},_=e=>i.Notification.warning(u.__('%1 is read-only. Use "Save as…" instead.',e),{autoClose:5e3});r&&function(e,t,n,o,a){const r=a.load("jupyterlab"),{commands:l}=e,s=()=>{var o;const a=/[Pp]ath:\s?(.*)\n?/,r=e.contextMenuHitTest((e=>{var t;return!!(null===(t=e.title)||void 0===t?void 0:t.match(a))})),i=null==r?void 0:r.title.match(a);return null!==(o=i&&t.findWidget(i[1],null))&&void 0!==o?o:n.currentWidget},c=()=>{const{currentWidget:e}=n;return!(!e||!t.contextForWidget(e))};l.addCommand(b.clone,{label:()=>r.__("New View for %1",M(s(),t)),isEnabled:c,execute:e=>{const n=s(),a=e.options||{mode:"split-right"};if(!n)return;const r=t.cloneWidget(n);r&&o.open(r,a)}}),l.addCommand(b.rename,{label:()=>{let e=M(s(),t);return e&&(e=" "+e),r.__("Rename%1…",e)},isEnabled:c,execute:()=>{if(c()){const e=t.contextForWidget(s());return(0,d.renameDialog)(t,e)}}}),l.addCommand(b.duplicate,{label:()=>r.__("Duplicate %1",M(s(),t)),isEnabled:c,execute:()=>{if(c()){const e=t.contextForWidget(s());if(!e)return;return t.duplicate(e.path)}}}),l.addCommand(b.del,{label:()=>r.__("Delete %1",M(s(),t)),isEnabled:c,execute:async()=>{if(c()){const n=t.contextForWidget(s());if(!n)return;(await(0,i.showDialog)({title:r.__("Delete"),body:r.__("Are you sure you want to delete %1",n.path),buttons:[i.Dialog.cancelButton(),i.Dialog.warnButton({label:r.__("Delete")})]})).button.accept&&await e.commands.execute("docmanager:delete-file",{path:n.path})}}}),l.addCommand(b.showInFileBrowser,{label:()=>r.__("Show in File Browser"),isEnabled:c,execute:async()=>{const e=s(),n=e&&t.contextForWidget(e);n&&(await l.execute("filebrowser:activate",{path:n.path}),await l.execute("filebrowser:go-to-path",{path:n.path}))}}),n.currentChanged.connect((()=>{[b.clone,b.rename,b.duplicate,b.del,b.showInFileBrowser].forEach((t=>{e.commands.notifyCommandChanged(t)}))}))}(e,t,r,n,a),p.addCommand(b.deleteFile,{label:()=>`Delete ${M(h.currentWidget,t)}`,execute:e=>{const n=void 0===e.path?"":e.path;if(!n){const e=b.deleteFile;throw new Error(`A non-empty path is required for ${e}.`)}return t.deleteFile(n)}}),p.addCommand(b.newUntitled,{execute:async e=>{const n=e.error||u.__("Error"),o=void 0===e.path?"":e.path,a={type:e.type,path:o};return"file"===e.type&&(a.ext=e.ext||".txt"),t.services.contents.newUntitled(a).catch((e=>(0,i.showErrorMessage)(n,e)))},label:e=>e.label||`New ${e.type}`}),p.addCommand(b.open,{execute:async e=>{const n=void 0===e.path?"":e.path,o=e.factory||void 0,a=null==e?void 0:e.kernel,r=e.options||void 0;return t.services.contents.get(n,{content:!1}).then((()=>t.openOrReveal(n,o,a,r)))},iconClass:e=>e.icon||"",label:e=>{var t;return null!==(t=e.label||e.factory)&&void 0!==t?t:u.__("Open the provided `path`.")},mnemonic:e=>e.mnemonic||-1}),p.addCommand(b.reload,{label:()=>u.__("Reload %1 from Disk",M(h.currentWidget,t)),caption:u.__("Reload contents from disk"),isEnabled:f,execute:()=>{if(!f())return;const e=t.contextForWidget(h.currentWidget),n=M(h.currentWidget,t);return e?e.model.dirty?(0,i.showDialog)({title:u.__("Reload %1 from Disk",n),body:u.__("Are you sure you want to reload the %1 from the disk?",n),buttons:[i.Dialog.cancelButton(),i.Dialog.warnButton({label:u.__("Reload")})]}).then((t=>{if(t.button.accept&&!e.isDisposed)return e.revert()})):e.isDisposed?void 0:e.revert():(0,i.showDialog)({title:u.__("Cannot Reload"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]})}}),p.addCommand(b.restoreCheckpoint,{label:()=>u.__("Revert %1 to Checkpoint…",M(h.currentWidget,t)),caption:u.__("Revert contents to previous checkpoint"),isEnabled:f,execute:()=>{if(!f())return;const e=t.contextForWidget(h.currentWidget);return e?e.listCheckpoints().then((async n=>{const o=M(h.currentWidget,t);if(n.length<1)return void await(0,i.showErrorMessage)(u.__("No checkpoints"),u.__("No checkpoints are available for this %1.",o));const a=1===n.length?n[0]:await R.getTargetCheckpoint(n.reverse(),u);return a?(0,i.showDialog)({title:u.__("Revert %1 to checkpoint",o),body:new A(a,u,o),buttons:[i.Dialog.cancelButton(),i.Dialog.warnButton({label:u.__("Revert"),ariaLabel:u.__("Revert to Checkpoint")})]}).then((t=>{if(!e.isDisposed)return t.button.accept?e.model.readOnly?e.revert():e.restoreCheckpoint(a.id).then((()=>e.revert())):void 0})):void 0})):(0,i.showDialog)({title:u.__("Cannot Revert"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]})}});const C=new WeakSet;p.addCommand(b.save,{label:()=>u.__("Save %1",M(h.currentWidget,t)),caption:()=>{if(h.currentWidget){const e=t.contextForWidget(h.currentWidget);if(null==e?void 0:e.model.collaborative)return u.__("In collaborative mode, the document is saved automatically after every change");if(!w())return u.__('Document is read-only. "Save" is disabled; use "Save as…" instead')}return u.__("Save and create checkpoint")},icon:e=>e.toolbar?m.saveIcon:void 0,isEnabled:e=>e._luminoEvent&&"keybinding"===e._luminoEvent.type||w(),execute:async e=>{var n,a,r,d,s;const c=h.currentWidget,m=t.contextForWidget(c);if(f()){if(!m)return(0,i.showDialog)({title:u.__("Cannot Save"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]});{if(C.has(m))return;if(!(null===(n=m.contentsModel)||void 0===n?void 0:n.writable)&&!m.model.collaborative){let t=null===(a=e._luminoEvent)||void 0===a?void 0:a.type;return e._luminoEvent&&"keybinding"===t?void _(m.path):(0,i.showDialog)({title:u.__("Cannot Save"),body:u.__("Document is read-only"),buttons:[i.Dialog.okButton()]})}C.add(m);const g=l.PathExt.basename(null!==(d=null===(r=m.contentsModel)||void 0===r?void 0:r.path)&&void 0!==d?d:"");let p=g;if(t.renameUntitledFileOnSave&&!0===c.isUntitled){const e=await i.InputDialog.getText({title:u.__("Rename file"),okLabel:u.__("Rename"),placeholder:u.__("File name"),text:g,selectionRange:g.length-l.PathExt.extname(g).length,checkbox:{label:u.__("Do not ask me again."),caption:u.__("If checked, you will not be asked to rename future untitled files when saving them.")}});if(e.button.accept&&(p=null!==(s=e.value)&&void 0!==s?s:g,c.isUntitled=!1,"boolean"==typeof e.isChecked)){const t=(await o.get(y,"renameUntitledFileOnSave")).composite;e.isChecked===t&&o.set(y,"renameUntitledFileOnSave",!e.isChecked).catch((e=>{console.error(`Fail to set 'renameUntitledFileOnSave:\n${e}`)}))}}try{if(await m.save(),!(null==c?void 0:c.isDisposed))return m.createCheckpoint()}catch(e){if("ModalCancelError"===e.name)return;throw e}finally{C.delete(m),p!==g&&await m.rename(p)}}}}}),p.addCommand(b.saveAll,{label:()=>u.__("Save All"),caption:u.__("Save all open documents"),isEnabled:()=>(0,g.some)(h.widgets("main"),(e=>{var n,o,a;return null!==(a=null===(o=null===(n=t.contextForWidget(e))||void 0===n?void 0:n.contentsModel)||void 0===o?void 0:o.writable)&&void 0!==a&&a})),execute:()=>{var e;const n=[],o=new Set;for(const a of h.widgets("main")){const r=t.contextForWidget(a);r&&!o.has(r.path)&&((null===(e=r.contentsModel)||void 0===e?void 0:e.writable)?(o.add(r.path),n.push(r.save())):_(r.path))}return Promise.all(n)}}),p.addCommand(b.saveAs,{label:()=>u.__("Save %1 As…",M(h.currentWidget,t)),caption:u.__("Save with new path"),isEnabled:f,execute:()=>{if(f()){const e=t.contextForWidget(h.currentWidget);if(!e)return(0,i.showDialog)({title:u.__("Cannot Save"),body:u.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]});const n=(n,o)=>{"save"===o.type&&o.newValue&&o.newValue.path!==e.path&&(t.closeFile(e.path),p.execute(b.open,{path:o.newValue.path}))};t.services.contents.fileChanged.connect(n),e.saveAs().finally((()=>t.services.contents.fileChanged.disconnect(n)))}}}),null===(c=e.shell.currentChanged)||void 0===c||c.connect((()=>{[b.reload,b.restoreCheckpoint,b.save,b.saveAll,b.saveAs].forEach((t=>{e.commands.notifyCommandChanged(t)}))})),p.addCommand(b.toggleAutosave,{label:u.__("Autosave Documents"),isToggled:()=>t.autosave,execute:()=>{const e=!t.autosave,n="autosave";return o.set(y,n,e).catch((e=>{console.error(`Failed to set ${y}:${n} - ${e.message}`)}))}}),s&&[b.reload,b.restoreCheckpoint,b.save,b.saveAs,b.toggleAutosave,b.duplicate].forEach((e=>{s.addItem({command:e,category:v})}))}(e,t,n,o,a,s,r);const v=n=>{const o=n.get("autosave").composite;t.autosave=!0!==o&&!1!==o||o,e.commands.notifyCommandChanged(b.toggleAutosave);const a=n.get("confirmClosingDocument").composite;t.confirmClosingDocument=null==a||a;const r=n.get("autosaveInterval").composite;t.autosaveInterval=r||120;const i=n.get("lastModifiedCheckMargin").composite;t.lastModifiedCheckMargin=i||500;const l=n.get("renameUntitledFileOnSave").composite;t.renameUntitledFileOnSave=null==l||l;const d=n.get("defaultViewers").composite,s={};Object.keys(d).forEach((e=>{h.getFileType(e)?(h.getWidgetFactory(d[e])||console.warn(`Document viewer ${d[e]} not found`),s[e]=d[e]):console.warn(`File Type ${e} not found`)}));for(const e of h.fileTypes())try{h.setDefaultWidgetFactory(e.name,s[e.name])}catch(t){console.warn(`Failed to set default viewer ${s[e.name]} for file type ${e.name}`)}};Promise.all([o.load(y),e.restored]).then((([e])=>{e.changed.connect(v),v(e),t.stateChanged.connect(((t,n)=>{["autosave","autosaveInterval","confirmClosingDocument","lastModifiedCheckMargin","renameUntitledFileOnSave"].includes(n.name)&&e.get(n.name).composite!==n.newValue&&e.set(n.name,n.newValue).catch((e=>{console.error(`Failed to set the setting '${n.name}':\n${e}`)}))}))})).catch((e=>{console.error(e.message)})),o.transform(y,{fetch:e=>{const t=Array.from(h.fileTypes()).map((e=>e.name)).join(" \n"),n=Array.from(h.widgetFactories()).map((e=>e.name)).join(" \n"),o=c.__('Overrides for the default viewers for file types.\nSpecify a mapping from file type name to document viewer name, for example:\n\ndefaultViewers: {\n markdown: "Markdown Preview"\n}\n\nIf you specify non-existent file types or viewers, or if a viewer cannot\nopen a given file type, the override will not function.\n\nAvailable viewers:\n%1\n\nAvailable file types:\n%2',n,t),a=p.JSONExt.deepCopy(e.schema);return a.properties.defaultViewers.description=o,{...e,schema:a}}}),h.changed.connect((()=>o.load(y,!0)))}},S={id:"@jupyterlab/docmanager-extension:saving-status",description:"Adds a saving status indicator.",autoStart:!0,requires:[d.IDocumentManager,r.ILabShell],optional:[u.ITranslator,c.IStatusBar],activate:(e,t,n,o,a)=>{if(!a)return;const r=new d.SavingStatus({docManager:t,translator:null!=o?o:u.nullTranslator});r.model.widget=n.currentWidget,n.currentChanged.connect((()=>{r.model.widget=n.currentWidget})),a.registerStatusItem(S.id,{item:r,align:"middle",isActive:()=>null!==r.model&&null!==r.model.status,activeStateChanged:r.model.stateChanged})}},I={id:"@jupyterlab/docmanager-extension:path-status",description:"Adds a file path indicator in the status bar.",autoStart:!0,requires:[d.IDocumentManager,r.ILabShell],optional:[c.IStatusBar],activate:(e,t,n,o)=>{if(!o)return;const a=new d.PathStatus({docManager:t});a.model.widget=n.currentWidget,n.currentChanged.connect((()=>{a.model.widget=n.currentWidget})),o.registerStatusItem(I.id,{item:a,align:"right",rank:0})}},W={id:"@jupyterlab/docmanager-extension:download",description:"Adds command to download files.",autoStart:!0,requires:[d.IDocumentManager],optional:[u.ITranslator,i.ICommandPalette],activate:(e,t,n,o)=>{var a;const r=(null!=n?n:u.nullTranslator).load("jupyterlab"),{commands:l,shell:d}=e,s=()=>{const{currentWidget:e}=d;return!(!e||!t.contextForWidget(e))};l.addCommand(b.download,{label:r.__("Download"),caption:r.__("Download the file to your computer"),isEnabled:s,execute:()=>{if(s()){const e=t.contextForWidget(d.currentWidget);return e?e.download():(0,i.showDialog)({title:r.__("Cannot Download"),body:r.__("No context found for current widget!"),buttons:[i.Dialog.okButton()]})}}}),null===(a=e.shell.currentChanged)||void 0===a||a.connect((()=>{e.commands.notifyCommandChanged(b.download)}));const c=r.__("File Operations");o&&o.addItem({command:b.download,category:c})}},F={id:"@jupyterlab/docmanager-extension:open-browser-tab",description:"Adds command to open a browser tab.",autoStart:!0,requires:[d.IDocumentManager],optional:[u.ITranslator],activate:(e,t,n)=>{const o=(null!=n?n:u.nullTranslator).load("jupyterlab"),{commands:a}=e;a.addCommand(b.openBrowserTab,{execute:e=>{const n=void 0===e.path?"":e.path;if(n)return t.services.contents.getDownloadUrl(n).then((e=>{const t=window.open();if(!t)throw new Error("Failed to open new browser tab.");t.opener=null,t.location.href=e}))},iconClass:e=>e.icon||"",label:()=>o.__("Open in New Browser Tab")})}},T=[D,k,x,I,S,W,F,C,_];var E,R;!function(e){e.createSaveButton=function(e,t){return(0,i.addCommandToolbarButtonClass)(i.ReactWidget.create(f.createElement(i.UseSignal,{signal:t},(()=>f.createElement(i.CommandToolbarButtonComponent,{commands:e,id:b.save,label:"",args:{toolbar:!0}})))))}}(E||(E={}));class A extends v.Widget{constructor(e,t,n="notebook"){super({node:R.createRevertConfirmNode(e,n,t)})}}function M(e,t){if(!e)return"File";const n=t.contextForWidget(e);if(!n)return"";const o=t.registry.getFileTypesForPath(n.path);return o.length&&o[0].displayName?o[0].displayName:"File"}!function(e){e.id=0,e.createRevertConfirmNode=function(e,t,n){const o=document.createElement("div"),a=document.createElement("p"),r=document.createTextNode(n.__("Are you sure you want to revert the %1 to checkpoint? ",t)),i=document.createElement("strong");i.textContent=n.__("This cannot be undone."),a.appendChild(r),a.appendChild(i);const d=document.createElement("p"),s=document.createTextNode(n.__("The checkpoint was last updated at: ")),c=document.createElement("p"),u=new Date(e.last_modified);return c.style.textAlign="center",c.textContent=l.Time.format(u)+" ("+l.Time.formatHuman(u)+")",d.appendChild(s),d.appendChild(c),o.appendChild(a),o.appendChild(d),o},e.getTargetCheckpoint=async function(e,t){const n=e.map(((e,t)=>`${t}. ${l.Time.format(e.last_modified)} (${l.Time.formatHuman(e.last_modified)})`)),o=(await i.InputDialog.getItem({items:n,title:t.__("Choose a checkpoint")})).value;if(!o)return;const a=o.split(".",1)[0];return e[parseInt(a,10)]}}(R||(R={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8579],{88579:(e,t,o)=>{o.r(t),o.d(t,{default:()=>q});var n=o(73852),a=o(53876),i=o(26177),r=o(20754),d=o(7073),l=o(23764),s=o(70607),c=o(58194),p=o(3012),u=o(93050),g=o(28976),m=o(38048),h=o(21961),b=o(49901),f=o(2260);const v=new RegExp("/(notebooks|edit)/(.*)"),y=/\.ipynb$/;var k;!function(e){e.duplicate="application:duplicate",e.handleLink="application:handle-local-link",e.toggleTop="application:toggle-top",e.togglePanel="application:toggle-panel",e.toggleZen="application:toggle-zen",e.openLab="application:open-lab",e.openTree="application:open-tree",e.rename="application:rename",e.resolveTree="application:resolve-tree"}(k||(k={}));const w={id:"@jupyter-notebook/application-extension:dirty",description:"Check if the application is dirty before closing the browser tab.",autoStart:!0,requires:[n.ILabStatus,u.ITranslator],activate:(e,t,o)=>{if(!(e instanceof g.NotebookApp))throw new Error(`${w.id} must be activated in Jupyter Notebook.`);const n=o.load("notebook").__("Are you sure you want to exit Jupyter Notebook?\n\nAny unsaved changes will be lost.");window.addEventListener("beforeunload",(t=>{if(e.status.isDirty)return t.returnValue=n}))}},x={id:"@jupyter-notebook/application-extension:logo",description:"The logo plugin.",autoStart:!0,activate:e=>{const t=r.PageConfig.getBaseUrl(),o=document.createElement("a");o.href=`${t}tree`,o.target="_blank",o.rel="noopener noreferrer";const n=new f.Widget({node:o});m.jupyterIcon.element({container:o,elementPosition:"center",padding:"2px 2px 2px 8px",height:"28px",width:"auto",cursor:"pointer",margin:"auto"}),n.id="jp-NotebookLogo",e.shell.add(n,"top",{rank:0})}},I={id:"@jupyter-notebook/application-extension:opener",description:"A plugin to open documents in the main area.",autoStart:!0,requires:[n.IRouter,d.IDocumentManager],optional:[p.ISettingRegistry],activate:(e,t,o,n)=>{const{commands:a,docRegistry:i}=e,r="router:tree";a.addCommand(r,{execute:t=>{var a;const r=t,d=null!==(a=r.path.match(v))&&void 0!==a?a:[],[,,l]=d;l&&e.started.then((async()=>{var e;const t=decodeURIComponent(l),a=new URLSearchParams(r.search);let d=i.defaultWidgetFactory(l).name;if(n){const e=(await n.load("@jupyterlab/docmanager-extension:plugin")).get("defaultViewers").composite;i.getFileTypesForPath(l).forEach((t=>{void 0!==e[t.name]&&i.getWidgetFactory(e[t.name])&&(d=e[t.name])}))}const s=null!==(e=a.get("factory"))&&void 0!==e?e:d;o.open(t,s,void 0,{ref:"_noref"})}))}}),t.register({command:r,pattern:v})}},P={id:"@jupyter-notebook/application-extension:menus",description:"A plugin to customize menus.",requires:[s.IMainMenu],autoStart:!0,activate:(e,t)=>{switch(t.tabsMenu.dispose(),r.PageConfig.getOption("notebookPage")){case"consoles":case"terminals":case"tree":t.editMenu.dispose(),t.kernelMenu.dispose(),t.runMenu.dispose();break;case"edit":t.kernelMenu.dispose(),t.runMenu.dispose()}}},C={id:"@jupyter-notebook/application-extension:menu-spacer",description:"A plugin to provide a spacer at rank 900 in the menu area.",autoStart:!0,activate:e=>{const t=new f.Widget;t.id=a.DOMUtils.createDomID(),t.addClass("jp-NotebookSpacer"),e.shell.add(t,"menu",{rank:900})}},S={id:"@jupyter-notebook/application-extension:pages",description:"Add commands to open the tree and running pages.",autoStart:!0,requires:[u.ITranslator],optional:[a.ICommandPalette],activate:(e,t,o)=>{const n=t.load("notebook"),a=r.PageConfig.getBaseUrl();e.commands.addCommand(k.openLab,{label:n.__("Open JupyterLab"),execute:()=>{window.open(r.URLExt.join(a,"lab"))}});const i=r.PageConfig.getOption("notebookPage");e.commands.addCommand(k.openTree,{label:n.__("File Browser"),execute:()=>{"tree"===i?e.commands.execute("filebrowser:activate"):window.open(r.URLExt.join(a,"tree"))}}),o&&(o.addItem({command:k.openLab,category:"View"}),o.addItem({command:k.openTree,category:"View"}))}},T={id:"@jupyter-notebook/application-extension:path-opener",description:"A plugin to open paths in new browser tabs.",autoStart:!0,provides:g.INotebookPathOpener,activate:e=>g.defaultNotebookPathOpener},R={id:"@jupyter-notebook/application-extension:paths",description:"The default paths for a Jupyter Notebook app.",autoStart:!0,provides:n.JupyterFrontEnd.IPaths,activate:e=>{if(!(e instanceof g.NotebookApp))throw new Error(`${R.id} must be activated in Jupyter Notebook.`);return e.paths}},_={id:"@jupyter-notebook/application-extension:rendermime",description:"A plugin providing a rendermime registry.",autoStart:!0,provides:c.IRenderMimeRegistry,optional:[d.IDocumentManager,c.ILatexTypesetter,a.ISanitizer,c.IMarkdownParser,u.ITranslator,g.INotebookPathOpener],activate:(e,t,o,n,a,i,d)=>{const l=(null!=i?i:u.nullTranslator).load("jupyterlab"),s=null!=d?d:g.defaultNotebookPathOpener;return t&&e.commands.addCommand(k.handleLink,{label:l.__("Handle Local Link"),execute:e=>{const o=e.path;if(null!=o)return t.services.contents.get(o,{content:!1}).then((e=>{const t=r.PageConfig.getBaseUrl();s.open({prefix:r.URLExt.join(t,"tree"),path:e.path,target:"_blank"})}))}}),new c.RenderMimeRegistry({initialFactories:c.standardRendererFactories,linkHandler:t?{handleLink:(t,o,n)=>{"A"===t.tagName&&t.hasAttribute("download")||e.commandLinker.connectNode(t,k.handleLink,{path:o,id:n})}}:void 0,latexTypesetter:null!=o?o:void 0,markdownParser:null!=a?a:void 0,translator:null!=i?i:void 0,sanitizer:null!=n?n:void 0})}},E={id:"@jupyter-notebook/application-extension:shell",description:"The default Jupyter Notebook application shell.",autoStart:!0,provides:g.INotebookShell,optional:[p.ISettingRegistry],activate:(e,t)=>{if(!(e.shell instanceof g.NotebookShell))throw new Error(`${E.id} did not find a NotebookShell instance.`);const o=e.shell;return t&&t.load(E.id).then((e=>{const t=e.composite.layout;o.restoreLayout(t)})).catch((e=>{console.error("Fail to load settings for the layout restorer."),console.error(e)})),o}},L={id:"@jupyter-notebook/application-extension:splash",description:"Provides an empty splash screen.",autoStart:!0,provides:a.ISplashScreen,activate:e=>{const{restored:t}=e,o=document.createElement("div");return o.style.position="absolute",o.style.width="100%",o.style.height="100%",o.style.zIndex="10",{show:(e=!0)=>(o.style.backgroundColor=e?"white":"#111111",document.body.appendChild(o),new b.DisposableDelegate((async()=>{await t,document.body.removeChild(o)})))}}},j={id:"@jupyter-notebook/application-extension:status",description:"The default JupyterLab application status provider.",autoStart:!0,provides:n.ILabStatus,activate:e=>{if(!(e instanceof g.NotebookApp))throw new Error(`${j.id} must be activated in Jupyter Notebook.`);return e.status}},N={id:"@jupyter-notebook/application-extension:tab-title",description:"A plugin to display the document title in the browser tab title.",autoStart:!0,requires:[g.INotebookShell],activate:(e,t)=>{const o=()=>{const e=t.currentWidget;if(e instanceof i.ConsolePanel){const t=()=>{const t=e.sessionContext.path||e.sessionContext.name,o=r.PathExt.basename(t);document.title=o.replace(y,"")};return e.sessionContext.sessionChanged.connect(t),void t()}if(e instanceof l.DocumentWidget){const t=()=>{const t=r.PathExt.basename(e.context.path);document.title=t.replace(y,"")};e.context.pathChanged.connect(t),t()}};t.currentChanged.connect(o),o()}},H={id:"@jupyter-notebook/application-extension:title",description:"A plugin to display and rename the title of a file.",autoStart:!0,requires:[g.INotebookShell,u.ITranslator],optional:[d.IDocumentManager,n.IRouter,a.IToolbarWidgetRegistry],activate:(e,t,o,n,a,i)=>{const{commands:s}=e,c=o.load("notebook"),p=document.createElement("div");i&&i.addFactory("TopBar","widgetTitle",(e=>{const t=new f.Widget({node:p});return t.id="jp-title",t}));const u=async()=>{const e=t.currentWidget;if(!(e&&e instanceof l.DocumentWidget))return;if(p.children.length>0)return;const o=document.createElement("h1");if(o.textContent=e.title.label.replace(y,""),p.appendChild(o),p.style.marginLeft="10px",!n)return;const i=()=>{const{currentWidget:e}=t;return!(!e||!n.contextForWidget(e))};s.addCommand(k.duplicate,{label:()=>c.__("Duplicate"),isEnabled:i,execute:async()=>{if(!i())return;const t=await n.duplicate(e.context.path);await s.execute("docmanager:open",{path:t.path})}}),s.addCommand(k.rename,{label:()=>c.__("Rename…"),isEnabled:i,execute:async()=>{var t;if(!i())return;const l=await(0,d.renameDialog)(n,e.context);if(e&&e.activate(),null===l)return;const s=e.context.path,c=r.PathExt.basename(s);if(o.textContent=c.replace(y,""),!a)return;const p=null!==(t=a.current.path.match(v))&&void 0!==t?t:[],[,u,g]=p;if(!u||!g)return;const m=encodeURIComponent(s);a.navigate(`/${u}/${m}`,{skipRouting:!0})}}),p.onclick=async()=>{s.execute(k.rename)}};t.currentChanged.connect(u),u()}},A={id:"@jupyter-notebook/application-extension:top",description:"Plugin to toggle the top header visibility.",requires:[g.INotebookShell,u.ITranslator],optional:[p.ISettingRegistry,a.ICommandPalette],activate:(e,t,o,n,a)=>{const i=o.load("notebook"),r=t.top,d=A.id;e.commands.addCommand(k.toggleTop,{label:i.__("Show Header"),execute:()=>{r.setHidden(r.isVisible),n&&n.set(d,"visible",r.isVisible?"yes":"no")},isToggled:()=>r.isVisible});let l=!1;if(n){const t=n.load(d),o=e=>{let t=e.get("visible").composite;void 0!==e.user.visible&&(t=e.user.visible),r.setHidden("no"===t),l="automatic"===t};Promise.all([t,e.restored]).then((([e])=>{o(e),e.changed.connect((e=>{o(e)}))})).catch((e=>{console.error(e.message)}))}a&&a.addItem({command:k.toggleTop,category:"View"}),e.formatChanged.connect((()=>{l&&("desktop"===e.format?t.expandTop():t.collapseTop())}))},autoStart:!0},M={id:"@jupyter-notebook/application-extension:sidepanel",description:"Plugin to toggle the visibility of left or right side panel.",requires:[g.INotebookShell,u.ITranslator],optional:[s.IMainMenu,a.ICommandPalette],autoStart:!0,activate:(e,t,o,n,a)=>{const i=o.load("notebook");e.commands.addCommand(k.togglePanel,{label:e=>e.title,caption:e=>"left"===e.side?i.__("Show %1 in the left sidebar",e.title):"right"===e.side?i.__("Show %1 in the right sidebar",e.title):i.__("Show %1 in the sidebar",e.title),execute:e=>{var o,n;switch(e.side){case"left":t.leftCollapsed||(null===(o=t.leftHandler.currentWidget)||void 0===o?void 0:o.id)!==e.id?t.expandLeft(e.id):(t.collapseLeft(),t.currentWidget&&t.activateById(t.currentWidget.id));break;case"right":t.rightCollapsed||(null===(n=t.rightHandler.currentWidget)||void 0===n?void 0:n.id)!==e.id?t.expandRight(e.id):(t.collapseRight(),t.currentWidget&&t.activateById(t.currentWidget.id))}},isToggled:e=>{switch(e.side){case"left":{if(t.leftCollapsed)return!1;const o=t.leftHandler.currentWidget;return!!o&&o.id===e.id}case"right":{if(t.rightCollapsed)return!1;const o=t.rightHandler.currentWidget;return!!o&&o.id===e.id}}return!1}});const r={left:null,right:null},d=(o,a)=>{var i;if(null===n)return null;null===(i=r[o])||void 0===i||i.dispose();const d=new f.Menu({commands:e.commands});d.title.label=a;const l=t.widgets(o);let s=!1;for(const e of l)d.addItem({command:k.togglePanel,args:{side:o,title:`Show ${e.title.caption}`,id:e.id}}),s=!0;s&&(r[o]=n.viewMenu.addItem({type:"submenu",submenu:d}))};e.restored.then((()=>{if(n){const e=e=>"left"===e?i.__("Left Sidebar"):i.__("Right Sidebar"),o=t.leftHandler.area,n=e(o);d(o,n);const a=t.rightHandler.area,r=e(a);d(a,r);const l=(t,o)=>{const n=e(t.area);d(t.area,n)};t.leftHandler.widgetAdded.connect(l),t.leftHandler.widgetRemoved.connect(l),t.rightHandler.widgetAdded.connect(l),t.rightHandler.widgetRemoved.connect(l)}if(a){const e=new g.SidePanelPalette({commandPalette:a,command:k.togglePanel});t.leftHandler.widgets.forEach((o=>{e.addItem(o,t.leftHandler.area)})),t.rightHandler.widgets.forEach((o=>{e.addItem(o,t.rightHandler.area)})),t.leftHandler.widgetAdded.connect(((t,o)=>{e.addItem(o,t.area)})),t.leftHandler.widgetRemoved.connect(((t,o)=>{e.removeItem(o,t.area)})),t.rightHandler.widgetAdded.connect(((t,o)=>{e.addItem(o,t.area)})),t.rightHandler.widgetRemoved.connect(((t,o)=>{e.removeItem(o,t.area)}))}}))}},U={id:"@jupyter-notebook/application-extension:tree-resolver",description:"The default tree route resolver plugin.",autoStart:!0,requires:[n.IRouter],provides:n.JupyterFrontEnd.ITreeResolver,activate:(e,t)=>{const{commands:o}=e,n=new b.DisposableSet,a=new h.PromiseDelegate,i=new RegExp("/(/tree/.*)?");n.add(o.addCommand(k.resolveTree,{execute:async e=>{var t;if(n.isDisposed)return;const o=r.URLExt.queryStringToObject(null!==(t=e.search)&&void 0!==t?t:""),i=o["file-browser-path"]||"";delete o["file-browser-path"],n.dispose(),a.resolve({browser:i,file:r.PageConfig.getOption("treePath")})}})),n.add(t.register({command:k.resolveTree,pattern:i}));const d=()=>{n.isDisposed||(n.dispose(),a.resolve(null))};return t.routed.connect(d),n.add(new b.DisposableDelegate((()=>{t.routed.disconnect(d)}))),{paths:a.promise}}},W={id:"@jupyter-notebook/application-extension:tree-updater",description:"Plugin to update tree path.",requires:[n.IRouter],provides:n.ITreePathUpdater,activate:(e,t)=>function(e){if(e!==r.PageConfig.getOption("treePath")){const o=r.URLExt.join(r.PageConfig.getOption("baseUrl")||"/","tree",r.URLExt.encodeParts(e));t.navigate(o,{skipRouting:!0}),r.PageConfig.setOption("treePath",e)}},autoStart:!0},D={id:"@jupyter-notebook/application-extension:translator",description:"Translator plugin",requires:[g.INotebookShell,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{t.translator=o}},O={id:"@jupyter-notebook/application-extension:zen",description:"Zen mode plugin.",autoStart:!0,requires:[u.ITranslator],optional:[a.ICommandPalette,g.INotebookShell],activate:(e,t,o,n)=>{const{commands:a}=e,i=document.documentElement,r=t.load("notebook"),d=()=>{null==n||n.expandTop(),null==n||n.menu.setHidden(!1),l=!1};let l=!1;a.addCommand(k.toggleZen,{label:r.__("Toggle Zen Mode"),execute:()=>{l?(document.exitFullscreen(),d()):(i.requestFullscreen(),null==n||n.collapseTop(),null==n||n.menu.setHidden(!0),l=!0)}}),document.addEventListener("fullscreenchange",(()=>{document.fullscreenElement||d()})),o&&o.addItem({command:k.toggleZen,category:"Mode"})}},q=[w,x,P,C,I,S,T,R,_,E,M,L,j,N,H,A,U,W,D,O]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8579],{88579:(e,t,o)=>{o.r(t),o.d(t,{default:()=>q});var n=o(84241),a=o(20911),i=o(17934),r=o(77075),d=o(20780),l=o(21428),s=o(68567),c=o(95704),p=o(68878),u=o(66649),g=o(20763),m=o(98977),h=o(21961),b=o(49901),f=o(2260);const v=new RegExp("/(notebooks|edit)/(.*)"),y=/\.ipynb$/;var k;!function(e){e.duplicate="application:duplicate",e.handleLink="application:handle-local-link",e.toggleTop="application:toggle-top",e.togglePanel="application:toggle-panel",e.toggleZen="application:toggle-zen",e.openLab="application:open-lab",e.openTree="application:open-tree",e.rename="application:rename",e.resolveTree="application:resolve-tree"}(k||(k={}));const w={id:"@jupyter-notebook/application-extension:dirty",description:"Check if the application is dirty before closing the browser tab.",autoStart:!0,requires:[n.ILabStatus,u.ITranslator],activate:(e,t,o)=>{if(!(e instanceof g.NotebookApp))throw new Error(`${w.id} must be activated in Jupyter Notebook.`);const n=o.load("notebook").__("Are you sure you want to exit Jupyter Notebook?\n\nAny unsaved changes will be lost.");window.addEventListener("beforeunload",(t=>{if(e.status.isDirty)return t.returnValue=n}))}},x={id:"@jupyter-notebook/application-extension:logo",description:"The logo plugin.",autoStart:!0,activate:e=>{const t=r.PageConfig.getBaseUrl(),o=document.createElement("a");o.href=`${t}tree`,o.target="_blank",o.rel="noopener noreferrer";const n=new f.Widget({node:o});m.jupyterIcon.element({container:o,elementPosition:"center",padding:"2px 2px 2px 8px",height:"28px",width:"auto",cursor:"pointer",margin:"auto"}),n.id="jp-NotebookLogo",e.shell.add(n,"top",{rank:0})}},I={id:"@jupyter-notebook/application-extension:opener",description:"A plugin to open documents in the main area.",autoStart:!0,requires:[n.IRouter,d.IDocumentManager],optional:[p.ISettingRegistry],activate:(e,t,o,n)=>{const{commands:a,docRegistry:i}=e,r="router:tree";a.addCommand(r,{execute:t=>{var a;const r=t,d=null!==(a=r.path.match(v))&&void 0!==a?a:[],[,,l]=d;l&&e.started.then((async()=>{var e;const t=decodeURIComponent(l),a=new URLSearchParams(r.search);let d=i.defaultWidgetFactory(l).name;if(n){const e=(await n.load("@jupyterlab/docmanager-extension:plugin")).get("defaultViewers").composite;i.getFileTypesForPath(l).forEach((t=>{void 0!==e[t.name]&&i.getWidgetFactory(e[t.name])&&(d=e[t.name])}))}const s=null!==(e=a.get("factory"))&&void 0!==e?e:d;o.open(t,s,void 0,{ref:"_noref"})}))}}),t.register({command:r,pattern:v})}},P={id:"@jupyter-notebook/application-extension:menus",description:"A plugin to customize menus.",requires:[s.IMainMenu],autoStart:!0,activate:(e,t)=>{switch(t.tabsMenu.dispose(),r.PageConfig.getOption("notebookPage")){case"consoles":case"terminals":case"tree":t.editMenu.dispose(),t.kernelMenu.dispose(),t.runMenu.dispose();break;case"edit":t.kernelMenu.dispose(),t.runMenu.dispose()}}},C={id:"@jupyter-notebook/application-extension:menu-spacer",description:"A plugin to provide a spacer at rank 900 in the menu area.",autoStart:!0,activate:e=>{const t=new f.Widget;t.id=a.DOMUtils.createDomID(),t.addClass("jp-NotebookSpacer"),e.shell.add(t,"menu",{rank:900})}},S={id:"@jupyter-notebook/application-extension:pages",description:"Add commands to open the tree and running pages.",autoStart:!0,requires:[u.ITranslator],optional:[a.ICommandPalette],activate:(e,t,o)=>{const n=t.load("notebook"),a=r.PageConfig.getBaseUrl();e.commands.addCommand(k.openLab,{label:n.__("Open JupyterLab"),execute:()=>{window.open(r.URLExt.join(a,"lab"))}});const i=r.PageConfig.getOption("notebookPage");e.commands.addCommand(k.openTree,{label:n.__("File Browser"),execute:()=>{"tree"===i?e.commands.execute("filebrowser:activate"):window.open(r.URLExt.join(a,"tree"))}}),o&&(o.addItem({command:k.openLab,category:"View"}),o.addItem({command:k.openTree,category:"View"}))}},T={id:"@jupyter-notebook/application-extension:path-opener",description:"A plugin to open paths in new browser tabs.",autoStart:!0,provides:g.INotebookPathOpener,activate:e=>g.defaultNotebookPathOpener},R={id:"@jupyter-notebook/application-extension:paths",description:"The default paths for a Jupyter Notebook app.",autoStart:!0,provides:n.JupyterFrontEnd.IPaths,activate:e=>{if(!(e instanceof g.NotebookApp))throw new Error(`${R.id} must be activated in Jupyter Notebook.`);return e.paths}},_={id:"@jupyter-notebook/application-extension:rendermime",description:"A plugin providing a rendermime registry.",autoStart:!0,provides:c.IRenderMimeRegistry,optional:[d.IDocumentManager,c.ILatexTypesetter,a.ISanitizer,c.IMarkdownParser,u.ITranslator,g.INotebookPathOpener],activate:(e,t,o,n,a,i,d)=>{const l=(null!=i?i:u.nullTranslator).load("jupyterlab"),s=null!=d?d:g.defaultNotebookPathOpener;return t&&e.commands.addCommand(k.handleLink,{label:l.__("Handle Local Link"),execute:e=>{const o=e.path;if(null!=o)return t.services.contents.get(o,{content:!1}).then((e=>{const t=r.PageConfig.getBaseUrl();s.open({prefix:r.URLExt.join(t,"tree"),path:e.path,target:"_blank"})}))}}),new c.RenderMimeRegistry({initialFactories:c.standardRendererFactories,linkHandler:t?{handleLink:(t,o,n)=>{"A"===t.tagName&&t.hasAttribute("download")||e.commandLinker.connectNode(t,k.handleLink,{path:o,id:n})}}:void 0,latexTypesetter:null!=o?o:void 0,markdownParser:null!=a?a:void 0,translator:null!=i?i:void 0,sanitizer:null!=n?n:void 0})}},E={id:"@jupyter-notebook/application-extension:shell",description:"The default Jupyter Notebook application shell.",autoStart:!0,provides:g.INotebookShell,optional:[p.ISettingRegistry],activate:(e,t)=>{if(!(e.shell instanceof g.NotebookShell))throw new Error(`${E.id} did not find a NotebookShell instance.`);const o=e.shell;return t&&t.load(E.id).then((e=>{const t=e.composite.layout;o.restoreLayout(t)})).catch((e=>{console.error("Fail to load settings for the layout restorer."),console.error(e)})),o}},L={id:"@jupyter-notebook/application-extension:splash",description:"Provides an empty splash screen.",autoStart:!0,provides:a.ISplashScreen,activate:e=>{const{restored:t}=e,o=document.createElement("div");return o.style.position="absolute",o.style.width="100%",o.style.height="100%",o.style.zIndex="10",{show:(e=!0)=>(o.style.backgroundColor=e?"white":"#111111",document.body.appendChild(o),new b.DisposableDelegate((async()=>{await t,document.body.removeChild(o)})))}}},j={id:"@jupyter-notebook/application-extension:status",description:"The default JupyterLab application status provider.",autoStart:!0,provides:n.ILabStatus,activate:e=>{if(!(e instanceof g.NotebookApp))throw new Error(`${j.id} must be activated in Jupyter Notebook.`);return e.status}},N={id:"@jupyter-notebook/application-extension:tab-title",description:"A plugin to display the document title in the browser tab title.",autoStart:!0,requires:[g.INotebookShell],activate:(e,t)=>{const o=()=>{const e=t.currentWidget;if(e instanceof i.ConsolePanel){const t=()=>{const t=e.sessionContext.path||e.sessionContext.name,o=r.PathExt.basename(t);document.title=o.replace(y,"")};return e.sessionContext.sessionChanged.connect(t),void t()}if(e instanceof l.DocumentWidget){const t=()=>{const t=r.PathExt.basename(e.context.path);document.title=t.replace(y,"")};e.context.pathChanged.connect(t),t()}};t.currentChanged.connect(o),o()}},H={id:"@jupyter-notebook/application-extension:title",description:"A plugin to display and rename the title of a file.",autoStart:!0,requires:[g.INotebookShell,u.ITranslator],optional:[d.IDocumentManager,n.IRouter,a.IToolbarWidgetRegistry],activate:(e,t,o,n,a,i)=>{const{commands:s}=e,c=o.load("notebook"),p=document.createElement("div");i&&i.addFactory("TopBar","widgetTitle",(e=>{const t=new f.Widget({node:p});return t.id="jp-title",t}));const u=async()=>{const e=t.currentWidget;if(!(e&&e instanceof l.DocumentWidget))return;if(p.children.length>0)return;const o=document.createElement("h1");if(o.textContent=e.title.label.replace(y,""),p.appendChild(o),p.style.marginLeft="10px",!n)return;const i=()=>{const{currentWidget:e}=t;return!(!e||!n.contextForWidget(e))};s.addCommand(k.duplicate,{label:()=>c.__("Duplicate"),isEnabled:i,execute:async()=>{if(!i())return;const t=await n.duplicate(e.context.path);await s.execute("docmanager:open",{path:t.path})}}),s.addCommand(k.rename,{label:()=>c.__("Rename…"),isEnabled:i,execute:async()=>{var t;if(!i())return;const l=await(0,d.renameDialog)(n,e.context);if(e&&e.activate(),null===l)return;const s=e.context.path,c=r.PathExt.basename(s);if(o.textContent=c.replace(y,""),!a)return;const p=null!==(t=a.current.path.match(v))&&void 0!==t?t:[],[,u,g]=p;if(!u||!g)return;const m=encodeURIComponent(s);a.navigate(`/${u}/${m}`,{skipRouting:!0})}}),p.onclick=async()=>{s.execute(k.rename)}};t.currentChanged.connect(u),u()}},A={id:"@jupyter-notebook/application-extension:top",description:"Plugin to toggle the top header visibility.",requires:[g.INotebookShell,u.ITranslator],optional:[p.ISettingRegistry,a.ICommandPalette],activate:(e,t,o,n,a)=>{const i=o.load("notebook"),r=t.top,d=A.id;e.commands.addCommand(k.toggleTop,{label:i.__("Show Header"),execute:()=>{r.setHidden(r.isVisible),n&&n.set(d,"visible",r.isVisible?"yes":"no")},isToggled:()=>r.isVisible});let l=!1;if(n){const t=n.load(d),o=e=>{let t=e.get("visible").composite;void 0!==e.user.visible&&(t=e.user.visible),r.setHidden("no"===t),l="automatic"===t};Promise.all([t,e.restored]).then((([e])=>{o(e),e.changed.connect((e=>{o(e)}))})).catch((e=>{console.error(e.message)}))}a&&a.addItem({command:k.toggleTop,category:"View"}),e.formatChanged.connect((()=>{l&&("desktop"===e.format?t.expandTop():t.collapseTop())}))},autoStart:!0},M={id:"@jupyter-notebook/application-extension:sidepanel",description:"Plugin to toggle the visibility of left or right side panel.",requires:[g.INotebookShell,u.ITranslator],optional:[s.IMainMenu,a.ICommandPalette],autoStart:!0,activate:(e,t,o,n,a)=>{const i=o.load("notebook");e.commands.addCommand(k.togglePanel,{label:e=>e.title,caption:e=>"left"===e.side?i.__("Show %1 in the left sidebar",e.title):"right"===e.side?i.__("Show %1 in the right sidebar",e.title):i.__("Show %1 in the sidebar",e.title),execute:e=>{var o,n;switch(e.side){case"left":t.leftCollapsed||(null===(o=t.leftHandler.currentWidget)||void 0===o?void 0:o.id)!==e.id?t.expandLeft(e.id):(t.collapseLeft(),t.currentWidget&&t.activateById(t.currentWidget.id));break;case"right":t.rightCollapsed||(null===(n=t.rightHandler.currentWidget)||void 0===n?void 0:n.id)!==e.id?t.expandRight(e.id):(t.collapseRight(),t.currentWidget&&t.activateById(t.currentWidget.id))}},isToggled:e=>{switch(e.side){case"left":{if(t.leftCollapsed)return!1;const o=t.leftHandler.currentWidget;return!!o&&o.id===e.id}case"right":{if(t.rightCollapsed)return!1;const o=t.rightHandler.currentWidget;return!!o&&o.id===e.id}}return!1}});const r={left:null,right:null},d=(o,a)=>{var i;if(null===n)return null;null===(i=r[o])||void 0===i||i.dispose();const d=new f.Menu({commands:e.commands});d.title.label=a;const l=t.widgets(o);let s=!1;for(const e of l)d.addItem({command:k.togglePanel,args:{side:o,title:`Show ${e.title.caption}`,id:e.id}}),s=!0;s&&(r[o]=n.viewMenu.addItem({type:"submenu",submenu:d}))};e.restored.then((()=>{if(n){const e=e=>"left"===e?i.__("Left Sidebar"):i.__("Right Sidebar"),o=t.leftHandler.area,n=e(o);d(o,n);const a=t.rightHandler.area,r=e(a);d(a,r);const l=(t,o)=>{const n=e(t.area);d(t.area,n)};t.leftHandler.widgetAdded.connect(l),t.leftHandler.widgetRemoved.connect(l),t.rightHandler.widgetAdded.connect(l),t.rightHandler.widgetRemoved.connect(l)}if(a){const e=new g.SidePanelPalette({commandPalette:a,command:k.togglePanel});t.leftHandler.widgets.forEach((o=>{e.addItem(o,t.leftHandler.area)})),t.rightHandler.widgets.forEach((o=>{e.addItem(o,t.rightHandler.area)})),t.leftHandler.widgetAdded.connect(((t,o)=>{e.addItem(o,t.area)})),t.leftHandler.widgetRemoved.connect(((t,o)=>{e.removeItem(o,t.area)})),t.rightHandler.widgetAdded.connect(((t,o)=>{e.addItem(o,t.area)})),t.rightHandler.widgetRemoved.connect(((t,o)=>{e.removeItem(o,t.area)}))}}))}},U={id:"@jupyter-notebook/application-extension:tree-resolver",description:"The default tree route resolver plugin.",autoStart:!0,requires:[n.IRouter],provides:n.JupyterFrontEnd.ITreeResolver,activate:(e,t)=>{const{commands:o}=e,n=new b.DisposableSet,a=new h.PromiseDelegate,i=new RegExp("/(/tree/.*)?");n.add(o.addCommand(k.resolveTree,{execute:async e=>{var t;if(n.isDisposed)return;const o=r.URLExt.queryStringToObject(null!==(t=e.search)&&void 0!==t?t:""),i=o["file-browser-path"]||"";delete o["file-browser-path"],n.dispose(),a.resolve({browser:i,file:r.PageConfig.getOption("treePath")})}})),n.add(t.register({command:k.resolveTree,pattern:i}));const d=()=>{n.isDisposed||(n.dispose(),a.resolve(null))};return t.routed.connect(d),n.add(new b.DisposableDelegate((()=>{t.routed.disconnect(d)}))),{paths:a.promise}}},W={id:"@jupyter-notebook/application-extension:tree-updater",description:"Plugin to update tree path.",requires:[n.IRouter],provides:n.ITreePathUpdater,activate:(e,t)=>function(e){if(e!==r.PageConfig.getOption("treePath")){const o=r.URLExt.join(r.PageConfig.getOption("baseUrl")||"/","tree",r.URLExt.encodeParts(e));t.navigate(o,{skipRouting:!0}),r.PageConfig.setOption("treePath",e)}},autoStart:!0},D={id:"@jupyter-notebook/application-extension:translator",description:"Translator plugin",requires:[g.INotebookShell,u.ITranslator],autoStart:!0,activate:(e,t,o)=>{t.translator=o}},O={id:"@jupyter-notebook/application-extension:zen",description:"Zen mode plugin.",autoStart:!0,requires:[u.ITranslator],optional:[a.ICommandPalette,g.INotebookShell],activate:(e,t,o,n)=>{const{commands:a}=e,i=document.documentElement,r=t.load("notebook"),d=()=>{null==n||n.expandTop(),null==n||n.menu.setHidden(!1),l=!1};let l=!1;a.addCommand(k.toggleZen,{label:r.__("Toggle Zen Mode"),execute:()=>{l?(document.exitFullscreen(),d()):(i.requestFullscreen(),null==n||n.collapseTop(),null==n||n.menu.setHidden(!0),l=!0)}}),document.addEventListener("fullscreenchange",(()=>{document.fullscreenElement||d()})),o&&o.addItem({command:k.toggleZen,category:"Mode"})}},q=[w,x,P,C,I,S,T,R,_,E,M,L,j,N,H,A,U,W,D,O]}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8633],{98633:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var i,r=n(73852),a=n(53876),o=n(983),d=n(76878),s=n(58194),c=n(24758),l=n(77627),g=n(3012),u=n(45556),p=n(93050);!function(e){e.open="settingeditor:open",e.openJSON="settingeditor:open-json",e.revert="settingeditor:revert",e.save="settingeditor:save"}(i||(i={}));const m={id:"@jupyterlab/settingeditor-extension:form-ui",description:"Adds the interactive settings editor and provides its tracker.",requires:[g.ISettingRegistry,u.IStateDB,p.ITranslator,d.IFormRendererRegistry,r.ILabStatus],optional:[r.ILayoutRestorer,a.ICommandPalette,c.g,l.IPluginManager],autoStart:!0,provides:c.O,activate:function(e,t,r,o,s,c,l,g,u,p){const v=o.load("jupyterlab"),{commands:y,shell:S}=e,b="setting-editor",I=new a.WidgetTracker({namespace:b});return l&&l.restore(I,{command:i.open,args:e=>({}),name:e=>b}),y.addCommand(i.open,{execute:async e=>{var l;"ui"===e.settingEditorType?y.execute(i.open,{query:null!==(l=e.query)&&void 0!==l?l:""}):"json"===e.settingEditorType?y.execute(i.openJSON):t.load(m.id).then((l=>{var g;"json"===l.get("settingEditorType").composite?y.execute(i.openJSON):(async e=>{if(I.currentWidget&&!I.currentWidget.isDisposed)return I.currentWidget.isAttached||S.add(I.currentWidget,"main",{type:"Settings"}),void S.activateById(I.currentWidget.id);const l=m.id,{SettingsEditor:g}=await n.e(3470).then(n.t.bind(n,23470,23)),h=new a.MainAreaWidget({content:new g({editorRegistry:s,key:l,registry:t,state:r,commands:y,toSkip:["@jupyterlab/application-extension:context-menu","@jupyterlab/mainmenu-extension:plugin"],translator:o,status:c,query:e.query})});h.toolbar.addItem("spacer",d.Toolbar.createSpacerItem()),p&&h.toolbar.addItem("open-plugin-manager",new d.ToolbarButton({onClick:async()=>{await p.open()},icon:d.launchIcon,label:v.__("Plugin Manager")})),u&&h.toolbar.addItem("open-json-editor",new d.CommandToolbarButton({commands:y,id:i.openJSON,icon:d.launchIcon,label:v.__("JSON Settings Editor")})),h.id=b,h.title.icon=d.settingsIcon,h.title.label=v.__("Settings"),h.title.closable=!0,I.add(h),S.add(h,"main",{type:"Settings"})})({query:null!==(g=e.query)&&void 0!==g?g:""})}))},label:e=>e.label?e.label:v.__("Settings Editor")}),g&&g.addItem({category:v.__("Settings"),command:i.open,args:{settingEditorType:"ui"}}),I}},v={id:"@jupyterlab/settingeditor-extension:plugin",description:"Adds the JSON settings editor and provides its tracker.",requires:[g.ISettingRegistry,o.IEditorServices,u.IStateDB,s.IRenderMimeRegistry,r.ILabStatus,p.ITranslator],optional:[r.ILayoutRestorer,a.ICommandPalette],autoStart:!0,provides:c.g,activate:function(e,t,r,o,s,c,l,g,u){const p=l.load("jupyterlab"),{commands:v,shell:y}=e,S="json-setting-editor",b=r.factoryService.newInlineEditor,I=new a.WidgetTracker({namespace:S});return g&&g.restore(I,{command:i.openJSON,args:e=>({}),name:e=>S}),v.addCommand(i.openJSON,{execute:async()=>{if(I.currentWidget&&!I.currentWidget.isDisposed)return I.currentWidget.isAttached||y.add(I.currentWidget,"main",{type:"Advanced Settings"}),void y.activateById(I.currentWidget.id);const r=m.id,g=e.restored,{JsonSettingEditor:u}=await n.e(3470).then(n.t.bind(n,23470,23)),h=new u({commands:{registry:v,revert:i.revert,save:i.save},editorFactory:b,key:r,registry:t,rendermime:s,state:o,translator:l,when:g});let w=null;h.commandsChanged.connect(((e,t)=>{t.forEach((e=>{v.notifyCommandChanged(e)})),h.canSaveRaw?w||(w=c.setDirty()):w&&(w.dispose(),w=null),h.disposed.connect((()=>{w&&w.dispose()}))}));const _=new a.MainAreaWidget({content:h});_.id=S,_.title.icon=d.settingsIcon,_.title.label=p.__("Advanced Settings Editor"),_.title.closable=!0,I.add(_),y.add(_,"main",{type:"Advanced Settings"})},label:p.__("Advanced Settings Editor")}),u&&u.addItem({category:p.__("Settings"),command:i.openJSON}),v.addCommand(i.revert,{execute:()=>{var e;null===(e=I.currentWidget)||void 0===e||e.content.revert()},icon:d.undoIcon,label:p.__("Revert User Settings"),isEnabled:()=>{var e,t;return null!==(t=null===(e=I.currentWidget)||void 0===e?void 0:e.content.canRevertRaw)&&void 0!==t&&t}}),v.addCommand(i.save,{execute:()=>{var e;return null===(e=I.currentWidget)||void 0===e?void 0:e.content.save()},icon:d.saveIcon,label:p.__("Save User Settings"),isEnabled:()=>{var e,t;return null!==(t=null===(e=I.currentWidget)||void 0===e?void 0:e.content.canSaveRaw)&&void 0!==t&&t}}),I}},y=[m,v]},24758:(e,t,n)=>{n.d(t,{O:()=>r,g:()=>a});var i=n(21961);const r=new i.Token("@jupyterlab/settingeditor:ISettingEditorTracker","A widget tracker for the interactive setting editor.\n Use this if you want to be able to iterate over and interact with setting editors\n created by the application."),a=new i.Token("@jupyterlab/settingeditor:IJSONSettingEditorTracker","A widget tracker for the JSON setting editor.\n Use this if you want to be able to iterate over and interact with setting editors\n created by the application.")}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8633],{98633:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var i,r=n(84241),a=n(20911),o=n(71386),d=n(7258),s=n(95704),c=n(24758),l=n(8967),g=n(68878),u=n(71565),p=n(66649);!function(e){e.open="settingeditor:open",e.openJSON="settingeditor:open-json",e.revert="settingeditor:revert",e.save="settingeditor:save"}(i||(i={}));const m={id:"@jupyterlab/settingeditor-extension:form-ui",description:"Adds the interactive settings editor and provides its tracker.",requires:[g.ISettingRegistry,u.IStateDB,p.ITranslator,d.IFormRendererRegistry,r.ILabStatus],optional:[r.ILayoutRestorer,a.ICommandPalette,c.g,l.IPluginManager],autoStart:!0,provides:c.O,activate:function(e,t,r,o,s,c,l,g,u,p){const v=o.load("jupyterlab"),{commands:y,shell:S}=e,b="setting-editor",I=new a.WidgetTracker({namespace:b});return l&&l.restore(I,{command:i.open,args:e=>({}),name:e=>b}),y.addCommand(i.open,{execute:async e=>{var l;"ui"===e.settingEditorType?y.execute(i.open,{query:null!==(l=e.query)&&void 0!==l?l:""}):"json"===e.settingEditorType?y.execute(i.openJSON):t.load(m.id).then((l=>{var g;"json"===l.get("settingEditorType").composite?y.execute(i.openJSON):(async e=>{if(I.currentWidget&&!I.currentWidget.isDisposed)return I.currentWidget.isAttached||S.add(I.currentWidget,"main",{type:"Settings"}),void S.activateById(I.currentWidget.id);const l=m.id,{SettingsEditor:g}=await n.e(6718).then(n.t.bind(n,96718,23)),h=new a.MainAreaWidget({content:new g({editorRegistry:s,key:l,registry:t,state:r,commands:y,toSkip:["@jupyterlab/application-extension:context-menu","@jupyterlab/mainmenu-extension:plugin"],translator:o,status:c,query:e.query})});h.toolbar.addItem("spacer",d.Toolbar.createSpacerItem()),p&&h.toolbar.addItem("open-plugin-manager",new d.ToolbarButton({onClick:async()=>{await p.open()},icon:d.launchIcon,label:v.__("Plugin Manager")})),u&&h.toolbar.addItem("open-json-editor",new d.CommandToolbarButton({commands:y,id:i.openJSON,icon:d.launchIcon,label:v.__("JSON Settings Editor")})),h.id=b,h.title.icon=d.settingsIcon,h.title.label=v.__("Settings"),h.title.closable=!0,I.add(h),S.add(h,"main",{type:"Settings"})})({query:null!==(g=e.query)&&void 0!==g?g:""})}))},label:e=>e.label?e.label:v.__("Settings Editor")}),g&&g.addItem({category:v.__("Settings"),command:i.open,args:{settingEditorType:"ui"}}),I}},v={id:"@jupyterlab/settingeditor-extension:plugin",description:"Adds the JSON settings editor and provides its tracker.",requires:[g.ISettingRegistry,o.IEditorServices,u.IStateDB,s.IRenderMimeRegistry,r.ILabStatus,p.ITranslator],optional:[r.ILayoutRestorer,a.ICommandPalette],autoStart:!0,provides:c.g,activate:function(e,t,r,o,s,c,l,g,u){const p=l.load("jupyterlab"),{commands:v,shell:y}=e,S="json-setting-editor",b=r.factoryService.newInlineEditor,I=new a.WidgetTracker({namespace:S});return g&&g.restore(I,{command:i.openJSON,args:e=>({}),name:e=>S}),v.addCommand(i.openJSON,{execute:async()=>{if(I.currentWidget&&!I.currentWidget.isDisposed)return I.currentWidget.isAttached||y.add(I.currentWidget,"main",{type:"Advanced Settings"}),void y.activateById(I.currentWidget.id);const r=m.id,g=e.restored,{JsonSettingEditor:u}=await n.e(6718).then(n.t.bind(n,96718,23)),h=new u({commands:{registry:v,revert:i.revert,save:i.save},editorFactory:b,key:r,registry:t,rendermime:s,state:o,translator:l,when:g});let w=null;h.commandsChanged.connect(((e,t)=>{t.forEach((e=>{v.notifyCommandChanged(e)})),h.canSaveRaw?w||(w=c.setDirty()):w&&(w.dispose(),w=null),h.disposed.connect((()=>{w&&w.dispose()}))}));const _=new a.MainAreaWidget({content:h});_.id=S,_.title.icon=d.settingsIcon,_.title.label=p.__("Advanced Settings Editor"),_.title.closable=!0,I.add(_),y.add(_,"main",{type:"Advanced Settings"})},label:p.__("Advanced Settings Editor")}),u&&u.addItem({category:p.__("Settings"),command:i.openJSON}),v.addCommand(i.revert,{execute:()=>{var e;null===(e=I.currentWidget)||void 0===e||e.content.revert()},icon:d.undoIcon,label:p.__("Revert User Settings"),isEnabled:()=>{var e,t;return null!==(t=null===(e=I.currentWidget)||void 0===e?void 0:e.content.canRevertRaw)&&void 0!==t&&t}}),v.addCommand(i.save,{execute:()=>{var e;return null===(e=I.currentWidget)||void 0===e?void 0:e.content.save()},icon:d.saveIcon,label:p.__("Save User Settings"),isEnabled:()=>{var e,t;return null!==(t=null===(e=I.currentWidget)||void 0===e?void 0:e.content.canSaveRaw)&&void 0!==t&&t}}),I}},y=[m,v]},24758:(e,t,n)=>{n.d(t,{O:()=>r,g:()=>a});var i=n(21961);const r=new i.Token("@jupyterlab/settingeditor:ISettingEditorTracker","A widget tracker for the interactive setting editor.\n Use this if you want to be able to iterate over and interact with setting editors\n created by the application."),a=new i.Token("@jupyterlab/settingeditor:IJSONSettingEditorTracker","A widget tracker for the JSON setting editor.\n Use this if you want to be able to iterate over and interact with setting editors\n created by the application.")}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8771,9638],{68771:(e,t,n)=>{n.r(t),n.d(t,{ILauncher:()=>a,Launcher:()=>p,LauncherModel:()=>u});const a=new(n(21961).Token)("@jupyterlab/launcher:ILauncher","A service for the application activity launcher.\n Use this to add your extension activities to the launcher panel.");var s,r=n(53876),c=n(93050),o=n(76878),i=n(14931),l=n(49901),d=n(80480),h=n(2260),m=n(78156);class u extends o.VDomModel{constructor(){super(...arguments),this.itemsList=[]}add(e){const t=s.createItem(e);return this.itemsList.push(t),this.stateChanged.emit(void 0),new l.DisposableDelegate((()=>{i.ArrayExt.removeFirstOf(this.itemsList,t),this.stateChanged.emit(void 0)}))}items(){return this.itemsList[Symbol.iterator]()}}class p extends o.VDomRenderer{constructor(e){super(e.model),this._pending=!1,this._cwd="",this._cwd=e.cwd,this.translator=e.translator||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._callback=e.callback,this._commands=e.commands,this.addClass("jp-Launcher")}get cwd(){return this._cwd}set cwd(e){this._cwd=e,this.update()}get pending(){return this._pending}set pending(e){this._pending=e}render(){if(!this.model)return null;const e=[this._trans.__("Notebook"),this._trans.__("Console"),this._trans.__("Other")],t=[this._trans.__("Notebook"),this._trans.__("Console")],n=Object.create(null);for(const e of this.model.items()){const t=e.category||this._trans.__("Other");t in n||(n[t]=[]),n[t].push(e)}for(const e in n)n[e]=n[e].sort(((e,t)=>s.sortCmp(e,t,this._cwd,this._commands)));const a=[];let c;const l=[];for(const t of e)l.push(t);for(const t in n)-1===e.indexOf(t)&&l.push(t);return l.forEach((e=>{if(!n[e])return;const l=n[e][0],d={...l.args,cwd:this.cwd},u=t.indexOf(e)>-1,p=this._commands.iconClass(l.command,d),_=this._commands.icon(l.command,d);e in n&&(c=m.createElement("div",{className:"jp-Launcher-section",key:e},m.createElement("div",{className:"jp-Launcher-sectionHeader"},m.createElement(o.LabIcon.resolveReact,{icon:_,iconClass:(0,o.classes)(p,"jp-Icon-cover"),stylesheet:"launcherSection","aria-hidden":"true"}),m.createElement("h2",{className:"jp-Launcher-sectionTitle"},e)),m.createElement("div",{className:"jp-Launcher-cardContainer"},Array.from((0,i.map)(n[e],(e=>function(e,t,n,a,c,i){const l=t.command,d={...t.args,cwd:n.cwd},u=a.caption(l,d),p=a.label(l,d),_=e?p:u||p,g=()=>{!0!==n.pending&&(n.pending=!0,a.execute(l,{...t.args,cwd:n.cwd}).then((e=>{n.pending=!1,e instanceof h.Widget&&i(e)})).catch((e=>{console.error(e),n.pending=!1,(0,r.showErrorMessage)(c._p("Error","Launcher Error"),e)})))},E=a.iconClass(l,d),L=a.icon(l,d);return m.createElement("div",{className:"jp-LauncherCard",title:_,onClick:g,onKeyPress:e=>{"Enter"===e.key&&g()},tabIndex:0,"data-category":t.category||c.__("Other"),key:s.keyProperty.get(t)},m.createElement("div",{className:"jp-LauncherCard-icon"},e?t.kernelIconUrl?m.createElement("img",{src:t.kernelIconUrl,className:"jp-Launcher-kernelIcon",alt:_}):m.createElement("div",{className:"jp-LauncherCard-noKernelIcon"},p[0].toUpperCase()):m.createElement(o.LabIcon.resolveReact,{icon:L,iconClass:(0,o.classes)(E,"jp-Icon-cover"),stylesheet:"launcherCard"})),m.createElement("div",{className:"jp-LauncherCard-label",title:_},m.createElement("p",null,p)))}(u,e,this,this._commands,this._trans,this._callback)))))),a.push(c))})),m.createElement("div",{className:"jp-Launcher-body"},m.createElement("div",{className:"jp-Launcher-content"},m.createElement("div",{className:"jp-Launcher-cwd"},m.createElement("h3",null,this.cwd)),a))}}!function(e){let t=0;e.keyProperty=new d.AttachedProperty({name:"key",create:()=>t++}),e.createItem=function(e){return{...e,category:e.category||"",rank:void 0!==e.rank?e.rank:1/0}},e.sortCmp=function(e,t,n,a){const s=e.rank,r=t.rank;if(s!==r&&void 0!==s&&void 0!==r)return s<r?-1:1;const c=a.label(e.command,{...e.args,cwd:n}),o=a.label(t.command,{...t.args,cwd:n});return c.localeCompare(o)}}(s||(s={}))}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[8771,9638],{68771:(e,t,n)=>{n.r(t),n.d(t,{ILauncher:()=>a,Launcher:()=>p,LauncherModel:()=>u});const a=new(n(21961).Token)("@jupyterlab/launcher:ILauncher","A service for the application activity launcher.\n Use this to add your extension activities to the launcher panel.");var s,r=n(20911),c=n(66649),o=n(7258),i=n(14931),l=n(49901),d=n(80480),h=n(2260),m=n(78156);class u extends o.VDomModel{constructor(){super(...arguments),this.itemsList=[]}add(e){const t=s.createItem(e);return this.itemsList.push(t),this.stateChanged.emit(void 0),new l.DisposableDelegate((()=>{i.ArrayExt.removeFirstOf(this.itemsList,t),this.stateChanged.emit(void 0)}))}items(){return this.itemsList[Symbol.iterator]()}}class p extends o.VDomRenderer{constructor(e){super(e.model),this._pending=!1,this._cwd="",this._cwd=e.cwd,this.translator=e.translator||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._callback=e.callback,this._commands=e.commands,this.addClass("jp-Launcher")}get cwd(){return this._cwd}set cwd(e){this._cwd=e,this.update()}get pending(){return this._pending}set pending(e){this._pending=e}render(){if(!this.model)return null;const e=[this._trans.__("Notebook"),this._trans.__("Console"),this._trans.__("Other")],t=[this._trans.__("Notebook"),this._trans.__("Console")],n=Object.create(null);for(const e of this.model.items()){const t=e.category||this._trans.__("Other");t in n||(n[t]=[]),n[t].push(e)}for(const e in n)n[e]=n[e].sort(((e,t)=>s.sortCmp(e,t,this._cwd,this._commands)));const a=[];let c;const l=[];for(const t of e)l.push(t);for(const t in n)-1===e.indexOf(t)&&l.push(t);return l.forEach((e=>{if(!n[e])return;const l=n[e][0],d={...l.args,cwd:this.cwd},u=t.indexOf(e)>-1,p=this._commands.iconClass(l.command,d),_=this._commands.icon(l.command,d);e in n&&(c=m.createElement("div",{className:"jp-Launcher-section",key:e},m.createElement("div",{className:"jp-Launcher-sectionHeader"},m.createElement(o.LabIcon.resolveReact,{icon:_,iconClass:(0,o.classes)(p,"jp-Icon-cover"),stylesheet:"launcherSection","aria-hidden":"true"}),m.createElement("h2",{className:"jp-Launcher-sectionTitle"},e)),m.createElement("div",{className:"jp-Launcher-cardContainer"},Array.from((0,i.map)(n[e],(e=>function(e,t,n,a,c,i){const l=t.command,d={...t.args,cwd:n.cwd},u=a.caption(l,d),p=a.label(l,d),_=e?p:u||p,g=()=>{!0!==n.pending&&(n.pending=!0,a.execute(l,{...t.args,cwd:n.cwd}).then((e=>{n.pending=!1,e instanceof h.Widget&&i(e)})).catch((e=>{console.error(e),n.pending=!1,(0,r.showErrorMessage)(c._p("Error","Launcher Error"),e)})))},E=a.iconClass(l,d),L=a.icon(l,d);return m.createElement("div",{className:"jp-LauncherCard",title:_,onClick:g,onKeyPress:e=>{"Enter"===e.key&&g()},tabIndex:0,"data-category":t.category||c.__("Other"),key:s.keyProperty.get(t)},m.createElement("div",{className:"jp-LauncherCard-icon"},e?t.kernelIconUrl?m.createElement("img",{src:t.kernelIconUrl,className:"jp-Launcher-kernelIcon",alt:_}):m.createElement("div",{className:"jp-LauncherCard-noKernelIcon"},p[0].toUpperCase()):m.createElement(o.LabIcon.resolveReact,{icon:L,iconClass:(0,o.classes)(E,"jp-Icon-cover"),stylesheet:"launcherCard"})),m.createElement("div",{className:"jp-LauncherCard-label",title:_},m.createElement("p",null,p)))}(u,e,this,this._commands,this._trans,this._callback)))))),a.push(c))})),m.createElement("div",{className:"jp-Launcher-body"},m.createElement("div",{className:"jp-Launcher-content"},m.createElement("div",{className:"jp-Launcher-cwd"},m.createElement("h3",null,this.cwd)),a))}}!function(e){let t=0;e.keyProperty=new d.AttachedProperty({name:"key",create:()=>t++}),e.createItem=function(e){return{...e,category:e.category||"",rank:void 0!==e.rank?e.rank:1/0}},e.sortCmp=function(e,t,n,a){const s=e.rank,r=t.rank;if(s!==r&&void 0!==s&&void 0!==r)return s<r?-1:1;const c=a.label(e.command,{...e.args,cwd:n}),o=a.label(t.command,{...t.args,cwd:n});return c.localeCompare(o)}}(s||(s={}))}}]);