notebook 7.1.0rc0__py3-none-any.whl → 7.1.1__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 (198) hide show
  1. notebook/__init__.py +1 -1
  2. notebook/_version.py +1 -1
  3. notebook/static/1198.bundle.js +1 -1
  4. notebook/static/131.bundle.js +1 -1
  5. notebook/static/1337.bundle.js +1 -1
  6. notebook/static/134.bundle.js +1 -1
  7. notebook/static/1388.bundle.js +1 -1
  8. notebook/static/1408.bundle.js +1 -1
  9. notebook/static/1495.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/1664.bundle.js +1 -1
  14. notebook/static/1682.bundle.js +1 -1
  15. notebook/static/1684.bundle.js +1 -1
  16. notebook/static/1809.bundle.js +1 -1
  17. notebook/static/1827.bundle.js +1 -1
  18. notebook/static/1833.bundle.js +1 -1
  19. notebook/static/1835.bundle.js +1 -1
  20. notebook/static/1846.bundle.js +1 -1
  21. notebook/static/1950.bundle.js +1 -1
  22. notebook/static/1958.bundle.js +1 -1
  23. notebook/static/2007.bundle.js +1 -1
  24. notebook/static/2067.bundle.js +1 -1
  25. notebook/static/2088.bundle.js +1 -1
  26. notebook/static/2089.bundle.js +1 -1
  27. notebook/static/2122.bundle.js +1 -1
  28. notebook/static/214.bundle.js +1 -1
  29. notebook/static/2167.bundle.js +1 -1
  30. notebook/static/2184.bundle.js +1 -1
  31. notebook/static/2241.bundle.js +1 -1
  32. notebook/static/2311.bundle.js +1 -1
  33. notebook/static/2324.bundle.js +1 -1
  34. notebook/static/2401.bundle.js +1 -1
  35. notebook/static/2479.bundle.js +1 -1
  36. notebook/static/2489.bundle.js +1 -1
  37. notebook/static/2512.bundle.js +1 -1
  38. notebook/static/2520.bundle.js +1 -1
  39. notebook/static/2577.bundle.js +1 -1
  40. notebook/static/2607.bundle.js +1 -1
  41. notebook/static/261.bundle.js +1 -1
  42. notebook/static/2615.bundle.js +1 -1
  43. notebook/static/2682.bundle.js +1 -1
  44. notebook/static/2692.bundle.js +1 -1
  45. notebook/static/2866.bundle.js +1 -1
  46. notebook/static/2924.bundle.js +1 -1
  47. notebook/static/2944.bundle.js +1 -1
  48. notebook/static/3129.bundle.js +1 -1
  49. notebook/static/3146.bundle.js +1 -1
  50. notebook/static/3154.bundle.js +1 -1
  51. notebook/static/3187.bundle.js +1 -1
  52. notebook/static/3213.bundle.js +1 -1
  53. notebook/static/3301.bundle.js +1 -1
  54. notebook/static/3340.bundle.js +1 -1
  55. notebook/static/3360.bundle.js +1 -1
  56. notebook/static/3466.bundle.js +1 -1
  57. notebook/static/3488.bundle.js +1 -1
  58. notebook/static/3512.bundle.js +1 -1
  59. notebook/static/3654.bundle.js +1 -1
  60. notebook/static/3676.bundle.js +1 -1
  61. notebook/static/3680.bundle.js +1 -1
  62. notebook/static/3768.bundle.js +1 -1
  63. notebook/static/377.bundle.js +1 -1
  64. notebook/static/3863.bundle.js +1 -1
  65. notebook/static/3881.bundle.js +1 -1
  66. notebook/static/4035.bundle.js +1 -1
  67. notebook/static/4042.bundle.js +1 -1
  68. notebook/static/4131.bundle.js +1 -1
  69. notebook/static/4212.bundle.js +1 -1
  70. notebook/static/4382.bundle.js +1 -1
  71. notebook/static/4558.bundle.js +1 -1
  72. notebook/static/4630.bundle.js +1 -1
  73. notebook/static/4645.bundle.js +1 -1
  74. notebook/static/4811.bundle.js +1 -1
  75. notebook/static/5088.bundle.js +1 -1
  76. notebook/static/5099.bundle.js +1 -1
  77. notebook/static/5135.bundle.js +1 -1
  78. notebook/static/514.bundle.js +1 -1
  79. notebook/static/5313.bundle.js +1 -1
  80. notebook/static/5325.bundle.js +1 -1
  81. notebook/static/5346.bundle.js +1 -1
  82. notebook/static/5426.bundle.js +1 -1
  83. notebook/static/5573.bundle.js +1 -1
  84. notebook/static/5601.bundle.js +1 -1
  85. notebook/static/5649.bundle.js +3 -3
  86. notebook/static/5733.bundle.js +1 -1
  87. notebook/static/5912.bundle.js +1 -1
  88. notebook/static/5921.bundle.js +1 -1
  89. notebook/static/6017.bundle.js +1 -1
  90. notebook/static/6139.bundle.js +1 -1
  91. notebook/static/62.bundle.js +1 -1
  92. notebook/static/6256.bundle.js +1 -1
  93. notebook/static/6281.bundle.js +1 -1
  94. notebook/static/6345.bundle.js +1 -1
  95. notebook/static/6417.bundle.js +1 -1
  96. notebook/static/6604.bundle.js +1 -1
  97. notebook/static/6621.bundle.js +1 -1
  98. notebook/static/6627.bundle.js +1 -1
  99. notebook/static/6640.bundle.js +1 -1
  100. notebook/static/6667.bundle.js +1 -1
  101. notebook/static/6815.bundle.js +1 -1
  102. notebook/static/6853.bundle.js +1 -1
  103. notebook/static/6893.bundle.js +1 -1
  104. notebook/static/690.bundle.js +1 -1
  105. notebook/static/6962.bundle.js +1 -1
  106. notebook/static/6999.bundle.js +1 -1
  107. notebook/static/{1608.bundle.js → 7005.bundle.js} +1 -1
  108. notebook/static/7097.bundle.js +1 -1
  109. notebook/static/7153.bundle.js +1 -1
  110. notebook/static/7226.bundle.js +1 -1
  111. notebook/static/7252.bundle.js +1 -1
  112. notebook/static/7302.bundle.js +1 -1
  113. notebook/static/7386.bundle.js +1 -1
  114. notebook/static/7391.bundle.js +1 -1
  115. notebook/static/7394.bundle.js +1 -1
  116. notebook/static/7427.bundle.js +1 -1
  117. notebook/static/755.bundle.js +1 -1
  118. notebook/static/7603.bundle.js +1 -1
  119. notebook/static/7639.bundle.js +1 -1
  120. notebook/static/7684.bundle.js +1 -1
  121. notebook/static/771.bundle.js +1 -0
  122. notebook/static/7811.bundle.js +1 -1
  123. notebook/static/7812.bundle.js +1 -1
  124. notebook/static/7819.bundle.js +1 -1
  125. notebook/static/7900.bundle.js +1 -1
  126. notebook/static/7906.bundle.js +1 -1
  127. notebook/static/7995.bundle.js +1 -1
  128. notebook/static/8579.bundle.js +1 -1
  129. notebook/static/8633.bundle.js +1 -1
  130. notebook/static/8768.bundle.js +1 -1
  131. notebook/static/8771.bundle.js +1 -1
  132. notebook/static/8781.bundle.js +1 -1
  133. notebook/static/8801.bundle.js +1 -1
  134. notebook/static/8875.bundle.js +1 -1
  135. notebook/static/8907.bundle.js +1 -1
  136. notebook/static/8928.bundle.js +1 -1
  137. notebook/static/8929.bundle.js +1 -1
  138. notebook/static/893.bundle.js +1 -1
  139. notebook/static/901.bundle.js +1 -1
  140. notebook/static/9068.bundle.js +1 -1
  141. notebook/static/911.bundle.js +1 -1
  142. notebook/static/9151.bundle.js +1 -1
  143. notebook/static/9161.bundle.js +1 -1
  144. notebook/static/9268.bundle.js +1 -1
  145. notebook/static/9335.bundle.js +1 -1
  146. notebook/static/9341.bundle.js +1 -1
  147. notebook/static/9380.bundle.js +1 -1
  148. notebook/static/9605.bundle.js +1 -1
  149. notebook/static/9638.bundle.js +1 -1
  150. notebook/static/9680.bundle.js +1 -1
  151. notebook/static/9685.bundle.js +1 -1
  152. notebook/static/9752.bundle.js +1 -1
  153. notebook/static/9821.bundle.js +1 -1
  154. notebook/static/9852.bundle.js +1 -1
  155. notebook/static/9866.bundle.js +1 -1
  156. notebook/static/bundle.js +1 -1
  157. notebook/static/third-party-licenses.json +99 -99
  158. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +14 -14
  159. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +4 -4
  160. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
  161. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +9 -9
  162. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +15 -15
  163. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +11 -11
  164. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +10 -10
  165. notebook-7.1.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/913.ed31b967ed65df80c2cf.js → notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/355.1213f16419258c4671ec.js +1 -1
  166. notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.c74a681c6a303d4da718.js +1 -0
  167. notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.32f48ad22cd5f6a8da04.js +1 -0
  168. notebook-7.1.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js → notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.d3d4e56f2f961c2c2a13.js +1 -1
  169. notebook-7.1.1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.330dffb5180b5b71100a.js +1 -0
  170. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
  171. {notebook-7.1.0rc0.dist-info → notebook-7.1.1.dist-info}/METADATA +2 -2
  172. {notebook-7.1.0rc0.dist-info → notebook-7.1.1.dist-info}/RECORD +194 -194
  173. notebook/static/4837.bundle.js +0 -1
  174. notebook-7.1.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.a662ef5ec5d782f45f74.js +0 -1
  175. notebook-7.1.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.bf68c8ab6c905f205d45.js +0 -1
  176. notebook-7.1.0rc0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.3444a26629e196e5b2de.js +0 -1
  177. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
  178. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
  179. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
  180. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
  181. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
  182. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
  183. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
  184. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
  185. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
  186. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
  187. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
  188. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
  189. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
  190. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
  191. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
  192. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
  193. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
  194. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
  195. {notebook-7.1.0rc0.data → notebook-7.1.1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
  196. {notebook-7.1.0rc0.dist-info → notebook-7.1.1.dist-info}/WHEEL +0 -0
  197. {notebook-7.1.0rc0.dist-info → notebook-7.1.1.dist-info}/entry_points.txt +0 -0
  198. {notebook-7.1.0rc0.dist-info → notebook-7.1.1.dist-info}/licenses/LICENSE +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3340],{33340:(e,n,t)=>{t.r(n),t.d(n,{default:()=>y});var o=t(70397),i=t(7267),r=t(80864),l=t(42539),a=t(32895),c=t(78156),s=t.n(c);const d="availableProviders";function m(e){const{schema:n}=e,t=n.title,o=n.description,i=e.formContext.settings,r=i.get(d).user,l={...n.default};if(r)for(const e of Object.keys(l))l[e]=e in r?r[e]:-1;const[a,m]=(0,c.useState)(l);return s().createElement("div",null,s().createElement("fieldset",null,s().createElement("legend",null,t),s().createElement("p",{className:"field-description"},o),Object.keys(l).map((e=>s().createElement("div",{key:e,className:"form-group small-field"},s().createElement("div",null,s().createElement("h3",null," ",e),s().createElement("div",{className:"inputFieldWrapper"},s().createElement("input",{className:"form-control",type:"number",value:a[e],onChange:n=>{((e,n)=>{const t={...a,[e]:parseInt(n.target.value)};i.set(d,t).catch(console.error),m(t)})(e,n)}}))))))))}const p="@jupyterlab/completer-extension:manager",u="@jupyterlab/completer-extension:inline-completer";var v;!function(e){e.nextInline="inline-completer:next",e.previousInline="inline-completer:previous",e.acceptInline="inline-completer:accept",e.invokeInline="inline-completer:invoke"}(v||(v={}));const I={id:"@jupyterlab/completer-extension:base-service",description:"Adds context and kernel completion providers.",requires:[i.ICompletionProviderManager],autoStart:!0,activate:(e,n)=>{n.registerProvider(new i.ContextCompleterProvider),n.registerProvider(new i.KernelCompleterProvider)}},f={id:"@jupyterlab/completer-extension:inline-history",description:"Adds inline completion provider suggesting code from execution history.",requires:[i.ICompletionProviderManager],optional:[l.ITranslator],autoStart:!0,activate:(e,n,t)=>{n.registerInlineProvider(new i.HistoryInlineCompletionProvider({translator:null!=t?t:l.nullTranslator}))}},g={id:"@jupyterlab/completer-extension:inline-completer-factory",description:"Provides a factory for inline completer.",provides:i.IInlineCompleterFactory,optional:[l.ITranslator],autoStart:!0,activate:(e,n)=>{const t=(n||l.nullTranslator).load("jupyterlab");return{factory:n=>{const r=new i.InlineCompleter({...n,trans:t}),l=n=>{const t=e.commands.keyBindings.find((e=>e.command===n)),o=t?a.CommandRegistry.formatKeystroke(t.keys):"";return o?`${o}`:""},c={[v.previousInline]:l(v.previousInline),[v.nextInline]:l(v.nextInline),[v.acceptInline]:l(v.acceptInline)};return e.commands.keyBindingChanged.connect(((e,n)=>{const t=n.binding.command;c.hasOwnProperty(t)&&(c[t]=l(t))})),r.toolbar.addItem("previous-inline-completion",new o.CommandToolbarButton({commands:e.commands,icon:o.caretLeftIcon,id:v.previousInline,label:()=>c[v.previousInline],caption:t.__("Previous")})),r.toolbar.addItem("next-inline-completion",new o.CommandToolbarButton({commands:e.commands,icon:o.caretRightIcon,id:v.nextInline,label:()=>c[v.nextInline],caption:t.__("Next")})),r.toolbar.addItem("accept-inline-completion",new o.CommandToolbarButton({commands:e.commands,icon:o.checkIcon,id:v.acceptInline,label:()=>c[v.acceptInline],caption:t.__("Accept")})),r}}}},b={id:u,description:"Provides a factory for inline completer.",requires:[i.ICompletionProviderManager,i.IInlineCompleterFactory,r.ISettingRegistry],optional:[l.ITranslator],autoStart:!0,activate:(e,n,t,o,i)=>{n.setInlineCompleterFactory(t);const r=(i||l.nullTranslator).load("jupyterlab"),a=()=>!!e.shell.currentWidget&&!!n.inline;e.commands.addCommand(v.nextInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.cycle(e.shell.currentWidget.id,"next")},label:r.__("Next Inline Completion"),isEnabled:a}),e.commands.addCommand(v.previousInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.cycle(e.shell.currentWidget.id,"previous")},label:r.__("Previous Inline Completion"),isEnabled:a}),e.commands.addCommand(v.acceptInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.accept(e.shell.currentWidget.id)},label:r.__("Accept Inline Completion"),isEnabled:a}),e.commands.addCommand(v.invokeInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.invoke(e.shell.currentWidget.id)},label:r.__("Invoke Inline Completer"),isEnabled:a});const c=e=>{var t;null===(t=n.inline)||void 0===t||t.configure(e.composite)};e.restored.then((()=>{var e;const t=null!==(e=n.inlineProviders)&&void 0!==e?e:[],i=e=>{var n,t;return{enabled:!0,timeout:5e3,debouncerDelay:0,...null!==(t=null===(n=e.schema)||void 0===n?void 0:n.default)&&void 0!==t?t:{}}};o.transform(u,{compose:e=>{var n,o;const r=null!==(n=e.data.composite.providers)&&void 0!==n?n:{};for(const e of t){const n=i(e);r[e.identifier]={...n,...null!==(o=r[e.identifier])&&void 0!==o?o:{}}}return e.data.composite.providers=r,e},fetch:e=>{var n,o;const l=e.schema.properties,a={};for(const e of t)a[e.identifier]={title:r.__("%1 provider",e.name),properties:{...null!==(o=null===(n=e.schema)||void 0===n?void 0:n.properties)&&void 0!==o?o:{},timeout:{title:r.__("Timeout"),description:r.__("Timeout for %1 provider (in milliseconds).",e.name),type:"number",minimum:0},debouncerDelay:{title:r.__("Debouncer delay"),minimum:0,description:r.__("Time since the last key press to wait before requesting completions from %1 provider (in milliseconds).",e.name),type:"number"},enabled:{title:r.__("Enabled"),description:r.__("Whether to fetch completions %1 provider.",e.name),type:"boolean"}},default:i(e),type:"object"};return l.providers.properties=a,e}}),o.load(u).then((e=>{c(e),e.changed.connect((e=>{c(e)}))})).catch(console.error)})).catch(console.error);const s=n=>e.commands.keyBindings.find((e=>e.command===n)),d={[v.acceptInline]:s(v.acceptInline),[v.invokeInline]:s(v.invokeInline)};e.commands.keyBindingChanged.connect(((e,n)=>{const t=n.binding.command;d.hasOwnProperty(t)&&(d[t]=s(t))})),document.addEventListener("keydown",(n=>{if(!(n.target instanceof Element))return;const t=n.target;switch(n.keyCode){case 9:{const o=[d[v.acceptInline],d[v.invokeInline]];for(const i of o)if(i&&1===i.keys.length&&"Tab"===i.keys[0]&&t.closest(i.selector))return e.commands.execute(i.command).catch(console.error),n.preventDefault(),n.stopPropagation(),void n.stopImmediatePropagation();break}default:return}}),!0)}},h={id:p,description:"Provides the completion provider manager.",requires:[r.ISettingRegistry],optional:[o.IFormRendererRegistry],provides:i.ICompletionProviderManager,autoStart:!0,activate:(e,n,t)=>{const o="availableProviders",r=new i.CompletionProviderManager,l=(e,n)=>{var t;const i=e.get(o),l=e.get("providerTimeout"),a=e.get("showDocumentationPanel"),c=e.get("autoCompletion");r.setTimeout(l.composite),r.setShowDocumentationPanel(a.composite),r.setContinuousHinting(c.composite);const s=null!==(t=i.user)&&void 0!==t?t:i.composite,d=Object.entries(null!=s?s:{}).filter((e=>e[1]>=0&&n.includes(e[0]))).sort((([,e],[,n])=>n-e)).map((e=>e[0]));r.activateProvider(d)};if(e.restored.then((()=>{const e=[...r.getProviders().entries()],t=e.map((([e,n])=>e));n.transform(p,{fetch:n=>{const t=n.schema.properties,i={};return e.forEach((([e,n],t)=>{var o;i[e]=null!==(o=n.rank)&&void 0!==o?o:10*(t+1)})),t[o].default=i,n}}),n.load(p).then((e=>{l(e,t),e.changed.connect((e=>{l(e,t)}))})).catch(console.error)})).catch(console.error),t){const e={fieldRenderer:e=>m(e)};t.addRenderer(`${p}.availableProviders`,e)}return r}},y=[h,I,f,g,b]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3340],{33340:(e,n,t)=>{t.r(n),t.d(n,{default:()=>y});var o=t(52018),i=t(65538),r=t(6312),l=t(11523),a=t(32895),c=t(78156),s=t.n(c);const d="availableProviders";function m(e){const{schema:n}=e,t=n.title,o=n.description,i=e.formContext.settings,r=i.get(d).user,l={...n.default};if(r)for(const e of Object.keys(l))l[e]=e in r?r[e]:-1;const[a,m]=(0,c.useState)(l);return s().createElement("div",null,s().createElement("fieldset",null,s().createElement("legend",null,t),s().createElement("p",{className:"field-description"},o),Object.keys(l).map((e=>s().createElement("div",{key:e,className:"form-group small-field"},s().createElement("div",null,s().createElement("h3",null," ",e),s().createElement("div",{className:"inputFieldWrapper"},s().createElement("input",{className:"form-control",type:"number",value:a[e],onChange:n=>{((e,n)=>{const t={...a,[e]:parseInt(n.target.value)};i.set(d,t).catch(console.error),m(t)})(e,n)}}))))))))}const p="@jupyterlab/completer-extension:manager",u="@jupyterlab/completer-extension:inline-completer";var v;!function(e){e.nextInline="inline-completer:next",e.previousInline="inline-completer:previous",e.acceptInline="inline-completer:accept",e.invokeInline="inline-completer:invoke"}(v||(v={}));const I={id:"@jupyterlab/completer-extension:base-service",description:"Adds context and kernel completion providers.",requires:[i.ICompletionProviderManager],autoStart:!0,activate:(e,n)=>{n.registerProvider(new i.ContextCompleterProvider),n.registerProvider(new i.KernelCompleterProvider)}},f={id:"@jupyterlab/completer-extension:inline-history",description:"Adds inline completion provider suggesting code from execution history.",requires:[i.ICompletionProviderManager],optional:[l.ITranslator],autoStart:!0,activate:(e,n,t)=>{n.registerInlineProvider(new i.HistoryInlineCompletionProvider({translator:null!=t?t:l.nullTranslator}))}},g={id:"@jupyterlab/completer-extension:inline-completer-factory",description:"Provides a factory for inline completer.",provides:i.IInlineCompleterFactory,optional:[l.ITranslator],autoStart:!0,activate:(e,n)=>{const t=(n||l.nullTranslator).load("jupyterlab");return{factory:n=>{const r=new i.InlineCompleter({...n,trans:t}),l=n=>{const t=e.commands.keyBindings.find((e=>e.command===n)),o=t?a.CommandRegistry.formatKeystroke(t.keys):"";return o?`${o}`:""},c={[v.previousInline]:l(v.previousInline),[v.nextInline]:l(v.nextInline),[v.acceptInline]:l(v.acceptInline)};return e.commands.keyBindingChanged.connect(((e,n)=>{const t=n.binding.command;c.hasOwnProperty(t)&&(c[t]=l(t))})),r.toolbar.addItem("previous-inline-completion",new o.CommandToolbarButton({commands:e.commands,icon:o.caretLeftIcon,id:v.previousInline,label:()=>c[v.previousInline],caption:t.__("Previous")})),r.toolbar.addItem("next-inline-completion",new o.CommandToolbarButton({commands:e.commands,icon:o.caretRightIcon,id:v.nextInline,label:()=>c[v.nextInline],caption:t.__("Next")})),r.toolbar.addItem("accept-inline-completion",new o.CommandToolbarButton({commands:e.commands,icon:o.checkIcon,id:v.acceptInline,label:()=>c[v.acceptInline],caption:t.__("Accept")})),r}}}},b={id:u,description:"Provides a factory for inline completer.",requires:[i.ICompletionProviderManager,i.IInlineCompleterFactory,r.ISettingRegistry],optional:[l.ITranslator],autoStart:!0,activate:(e,n,t,o,i)=>{n.setInlineCompleterFactory(t);const r=(i||l.nullTranslator).load("jupyterlab"),a=()=>!!e.shell.currentWidget&&!!n.inline;e.commands.addCommand(v.nextInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.cycle(e.shell.currentWidget.id,"next")},label:r.__("Next Inline Completion"),isEnabled:a}),e.commands.addCommand(v.previousInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.cycle(e.shell.currentWidget.id,"previous")},label:r.__("Previous Inline Completion"),isEnabled:a}),e.commands.addCommand(v.acceptInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.accept(e.shell.currentWidget.id)},label:r.__("Accept Inline Completion"),isEnabled:a}),e.commands.addCommand(v.invokeInline,{execute:()=>{var t;null===(t=n.inline)||void 0===t||t.invoke(e.shell.currentWidget.id)},label:r.__("Invoke Inline Completer"),isEnabled:a});const c=e=>{var t;null===(t=n.inline)||void 0===t||t.configure(e.composite)};e.restored.then((()=>{var e;const t=null!==(e=n.inlineProviders)&&void 0!==e?e:[],i=e=>{var n,t;return{enabled:!0,timeout:5e3,debouncerDelay:0,...null!==(t=null===(n=e.schema)||void 0===n?void 0:n.default)&&void 0!==t?t:{}}};o.transform(u,{compose:e=>{var n,o;const r=null!==(n=e.data.composite.providers)&&void 0!==n?n:{};for(const e of t){const n=i(e);r[e.identifier]={...n,...null!==(o=r[e.identifier])&&void 0!==o?o:{}}}return e.data.composite.providers=r,e},fetch:e=>{var n,o;const l=e.schema.properties,a={};for(const e of t)a[e.identifier]={title:r.__("%1 provider",e.name),properties:{...null!==(o=null===(n=e.schema)||void 0===n?void 0:n.properties)&&void 0!==o?o:{},timeout:{title:r.__("Timeout"),description:r.__("Timeout for %1 provider (in milliseconds).",e.name),type:"number",minimum:0},debouncerDelay:{title:r.__("Debouncer delay"),minimum:0,description:r.__("Time since the last key press to wait before requesting completions from %1 provider (in milliseconds).",e.name),type:"number"},enabled:{title:r.__("Enabled"),description:r.__("Whether to fetch completions %1 provider.",e.name),type:"boolean"}},default:i(e),type:"object"};return l.providers.properties=a,e}}),o.load(u).then((e=>{c(e),e.changed.connect((e=>{c(e)}))})).catch(console.error)})).catch(console.error);const s=n=>e.commands.keyBindings.find((e=>e.command===n)),d={[v.acceptInline]:s(v.acceptInline),[v.invokeInline]:s(v.invokeInline)};e.commands.keyBindingChanged.connect(((e,n)=>{const t=n.binding.command;d.hasOwnProperty(t)&&(d[t]=s(t))})),document.addEventListener("keydown",(n=>{if(!(n.target instanceof Element))return;const t=n.target;switch(n.keyCode){case 9:{const o=[d[v.acceptInline],d[v.invokeInline]];for(const i of o)if(i&&1===i.keys.length&&"Tab"===i.keys[0]&&t.closest(i.selector))return e.commands.execute(i.command).catch(console.error),n.preventDefault(),n.stopPropagation(),void n.stopImmediatePropagation();break}default:return}}),!0)}},h={id:p,description:"Provides the completion provider manager.",requires:[r.ISettingRegistry],optional:[o.IFormRendererRegistry],provides:i.ICompletionProviderManager,autoStart:!0,activate:(e,n,t)=>{const o="availableProviders",r=new i.CompletionProviderManager,l=(e,n)=>{var t;const i=e.get(o),l=e.get("providerTimeout"),a=e.get("showDocumentationPanel"),c=e.get("autoCompletion");r.setTimeout(l.composite),r.setShowDocumentationPanel(a.composite),r.setContinuousHinting(c.composite);const s=null!==(t=i.user)&&void 0!==t?t:i.composite,d=Object.entries(null!=s?s:{}).filter((e=>e[1]>=0&&n.includes(e[0]))).sort((([,e],[,n])=>n-e)).map((e=>e[0]));r.activateProvider(d)};if(e.restored.then((()=>{const e=[...r.getProviders().entries()],t=e.map((([e,n])=>e));n.transform(p,{fetch:n=>{const t=n.schema.properties,i={};return e.forEach((([e,n],t)=>{var o;i[e]=null!==(o=n.rank)&&void 0!==o?o:10*(t+1)})),t[o].default=i,n}}),n.load(p).then((e=>{l(e,t),e.changed.connect((e=>{l(e,t)}))})).catch(console.error)})).catch(console.error),t){const e={fieldRenderer:e=>m(e)};t.addRenderer(`${p}.availableProviders`,e)}return r}},y=[h,I,f,g,b]}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3360],{63360:(t,e,s)=>{s.r(e),s.d(e,{IJSONSettingEditorTracker:()=>W.g,ISettingEditorTracker:()=>W.O,JsonSettingEditor:()=>O,SettingsEditor:()=>S});var i=s(98244),r=s(42539),n=s(70397),a=s(81997),o=s(31516),l=s(78156),d=s.n(l),h=s(33625);class c extends i.ReactWidget{constructor(t){var e;super(),this._changed=new a.Signal(this),this._handleSelectSignal=new a.Signal(this),this._updateFilterSignal=new a.Signal(this),this._allPlugins=[],this._settings={},this._scrollTop=0,this._selection="",this.registry=t.registry,this.translator=t.translator||r.nullTranslator,this.addClass("jp-PluginList"),this._confirm=t.confirm,this.registry.pluginChanged.connect((()=>{this.update()}),this),this.mapPlugins=this.mapPlugins.bind(this),this.setFilter=this.setFilter.bind(this),this.setFilter(t.query?(0,n.updateFilterFunction)(t.query,!1,!1):null),this.setError=this.setError.bind(this),this._evtMousedown=this._evtMousedown.bind(this),this._query=null!==(e=t.query)&&void 0!==e?e:"",this._allPlugins=c.sortPlugins(this.registry).filter((e=>{var s;const{schema:i}=e,r=!0===i["jupyter.lab.setting-deprecated"],n=Object.keys(i.properties||{}).length>0,a=!1!==i.additionalProperties,o=this._confirm||!this._confirm&&!(null!==(s=t.toSkip)&&void 0!==s?s:[]).includes(e.id);return!r&&o&&(n||a)})),(async()=>{for(const t of this._allPlugins){const e=await this.registry.load(t.id);this._settings[t.id]=e}this.update()})(),this._errors={}}get changed(){return this._changed}get scrollTop(){var t;return null===(t=this.node.querySelector("ul"))||void 0===t?void 0:t.scrollTop}get hasErrors(){for(const t in this._errors)if(this._errors[t])return!0;return!1}get filter(){return this._filter}get selection(){return this._selection}set selection(t){this._selection=t,this.update()}get updateFilterSignal(){return this._updateFilterSignal}get handleSelectSignal(){return this._handleSelectSignal}onUpdateRequest(t){const e=this.node.querySelector("ul");e&&void 0!==this._scrollTop&&(e.scrollTop=this._scrollTop),super.onUpdateRequest(t)}_evtMousedown(t){const e=t.currentTarget.getAttribute("data-id");e&&(this._confirm?this._confirm(e).then((()=>{this.selection=e,this._changed.emit(void 0),this.update()})).catch((()=>{})):(this._scrollTop=this.scrollTop,this._selection=e,this._handleSelectSignal.emit(e),this._changed.emit(void 0),this.update()))}getHint(t,e,s){let i=s.data.user[t];if(i||(i=s.data.composite[t]),i||(i=s.schema[t]),!i){const{properties:s}=e.schema;i=s&&s[t]&&s[t].default}return"string"==typeof i?i:""}getFilterString(t,e,s,i){var r;if(i&&s&&(i=i.replace("#/definitions/",""),e=null!==(r=s[i])&&void 0!==r?r:{}),e.properties)e=e.properties;else{if(!e.items)return[];e=e.items}return e.$ref?this.getFilterString(t,e,s,e.$ref):0===Object.keys(e).length?[]:Object.keys(e).reduce(((i,r)=>{var n,a;const o=e[r];if(!o){if(t(null!==(n=e.title)&&void 0!==n?n:""))return e.title;if(t(r))return r}return t(null!==(a=o.title)&&void 0!==a?a:"")&&i.push(o.title),t(r)&&i.push(r),i.concat(this.getFilterString(t,o,s,o.$ref)),i}),[])}setFilter(t,e){this._filter=t?e=>{var s,i;return!t||t(null!==(s=e.schema.title)&&void 0!==s?s:"")?null:this.getFilterString(t,null!==(i=e.schema)&&void 0!==i?i:{},e.schema.definitions)}:null,this._query=e,this._updateFilterSignal.emit(this._filter),this.update()}setError(t,e){this._errors[t]!==e?(this._errors[t]=e,this.update()):this._errors[t]=e}mapPlugins(t){var e,s,i,r;const{id:a,schema:o,version:l}=t,c=this.translator.load("jupyterlab"),u="string"==typeof o.title?c._p("schema",o.title):a,p=h.StringExt.matchSumOfSquares(u.toLocaleLowerCase(),null!==(s=null===(e=this._query)||void 0===e?void 0:e.toLocaleLowerCase())&&void 0!==s?s:""),g=h.StringExt.highlight(u,null!==(i=null==p?void 0:p.indices)&&void 0!==i?i:[],(t=>d().createElement("mark",null,t))),_=`${"string"==typeof o.description?c._p("schema",o.description):""}\n${a}\n${l}`,m=this.getHint("jupyter.lab.setting-icon",this.registry,t),v=this.getHint("jupyter.lab.setting-icon-class",this.registry,t),f=this.getHint("jupyter.lab.setting-icon-label",this.registry,t),S=this._filter?null===(r=this._filter(t))||void 0===r?void 0:r.map((t=>{var e,s,i;const r=h.StringExt.matchSumOfSquares(t.toLocaleLowerCase(),null!==(s=null===(e=this._query)||void 0===e?void 0:e.toLocaleLowerCase())&&void 0!==s?s:""),n=h.StringExt.highlight(t,null!==(i=null==r?void 0:r.indices)&&void 0!==i?i:[],(t=>d().createElement("mark",null,t)));return d().createElement("li",{key:`${a}-${t}`}," ",n," ")})):void 0;return d().createElement("div",{onClick:this._evtMousedown,className:`${a===this.selection?"jp-mod-selected jp-PluginList-entry":"jp-PluginList-entry"} ${this._errors[a]?"jp-ErrorPlugin":""}`,"data-id":a,key:a,title:_},d().createElement("div",{className:"jp-PluginList-entry-label",role:"tab"},d().createElement("div",{className:"jp-SelectedIndicator"}),d().createElement(n.LabIcon.resolveReact,{icon:m||(v?void 0:n.settingsIcon),iconClass:(0,n.classes)(v,"jp-Icon"),title:f,tag:"span",stylesheet:"settingsEditor"}),d().createElement("span",{className:"jp-PluginList-entry-label-text"},g)),d().createElement("ul",null,S))}render(){const t=this.translator.load("jupyterlab"),e=this._allPlugins.filter((t=>{if(!this._filter)return!1;const e=this._filter(t);return null===e||e.length>0})),s=e.filter((t=>{var e;return null===(e=this._settings[t.id])||void 0===e?void 0:e.isModified})),i=s.map(this.mapPlugins),r=e.filter((t=>!s.includes(t))).map(this.mapPlugins);return d().createElement("div",{className:"jp-PluginList-wrapper"},d().createElement(n.FilterBox,{updateFilter:this.setFilter,useFuzzyFilter:!1,placeholder:t.__("Search settings…"),forceRefresh:!1,caseSensitive:!1,initialQuery:this._query}),i.length>0&&d().createElement("div",null,d().createElement("h1",{className:"jp-PluginList-header"},t.__("Modified")),d().createElement("ul",null,i)),r.length>0&&d().createElement("div",null,d().createElement("h1",{className:"jp-PluginList-header"},t.__("Settings")),d().createElement("ul",null,r)),0===i.length&&0===r.length&&d().createElement("p",{className:"jp-PluginList-noResults"},t.__("No items match your search.")))}}!function(t){t.sortPlugins=function(t){return Object.keys(t.plugins).map((e=>t.plugins[e])).sort(((t,e)=>(t.schema.title||t.id).localeCompare(e.schema.title||e.id)))}}(c||(c={}));var u=s(20998),p=s(97934),g=s(27478),_=s.n(g);class m extends d().Component{constructor(t){super(t),this.reset=async t=>{t.stopPropagation();for(const t in this.props.settings.user)await this.props.settings.remove(t);this._formData=this.props.settings.composite,this.setState({isModified:!1})},this._onChange=t=>{this.props.hasError(0!==t.errors.length),this._formData=t.formData,0===t.errors.length&&(this.props.updateDirtyState(!0),this._debouncer.invoke()),this.props.onSelect(this.props.settings.id)};const{settings:e}=t;this._formData=e.composite,this.state={isModified:e.isModified,uiSchema:{},filteredSchema:this.props.settings.schema,formContext:{defaultFormData:this.props.settings.default(),settings:this.props.settings}},this.handleChange=this.handleChange.bind(this),this._debouncer=new p.Debouncer(this.handleChange)}componentDidMount(){this._setUiSchema(),this._setFilteredSchema()}componentDidUpdate(t){this._setUiSchema(t.renderers[t.settings.id]),this._setFilteredSchema(t.filteredValues),t.settings!==this.props.settings&&this.setState({formContext:{settings:this.props.settings,defaultFormData:this.props.settings.default()}})}componentWillUnmount(){this._debouncer.dispose()}handleChange(){!this.props.settings.isModified&&this._formData&&this.props.settings.isDefault(this._formData)?this.props.updateDirtyState(!1):this.props.settings.save(JSON.stringify(this._formData,void 0,4)).then((()=>{this.props.updateDirtyState(!1),this.setState({isModified:this.props.settings.isModified})})).catch((t=>{this.props.updateDirtyState(!1);const e=this.props.translator.load("jupyterlab");(0,i.showErrorMessage)(e.__("Error saving settings."),t)}))}render(){const t=this.props.translator.load("jupyterlab");return d().createElement(d().Fragment,null,d().createElement("div",{className:"jp-SettingsHeader"},d().createElement("h2",{className:"jp-SettingsHeader-title",title:this.props.settings.schema.description},this.props.settings.schema.title),d().createElement("div",{className:"jp-SettingsHeader-buttonbar"},this.state.isModified&&d().createElement(n.Button,{className:"jp-RestoreButton",onClick:this.reset},t.__("Restore to Defaults"))),d().createElement("div",{className:"jp-SettingsHeader-description"},this.props.settings.schema.description)),d().createElement(n.FormComponent,{validator:_(),schema:this.state.filteredSchema,formData:this._getFilteredFormData(this.state.filteredSchema),uiSchema:this.state.uiSchema,fields:this.props.renderers[this.props.settings.id],formContext:this.state.formContext,liveValidate:!0,idPrefix:`jp-SettingsEditor-${this.props.settings.id}`,onChange:this._onChange,translator:this.props.translator,experimental_defaultFormStateBehavior:{emptyObjectFields:"populateRequiredDefaults"}}))}_setUiSchema(t){var e;const s=this.props.renderers[this.props.settings.id];if(!u.JSONExt.deepEqual(Object.keys(null!=t?t:{}).sort(),Object.keys(null!=s?s:{}).sort())){const t={};for(const s in this.props.renderers[this.props.settings.id])Object.keys(null!==(e=this.props.settings.schema.properties)&&void 0!==e?e:{}).includes(s)&&(t[s]={"ui:field":s});this.setState({uiSchema:t})}}_setFilteredSchema(t){var e,s,i,r;if(void 0===t||!u.JSONExt.deepEqual(t,this.props.filteredValues)){const t=u.JSONExt.deepCopy(this.props.settings.schema);if(null!==(s=null===(e=this.props.filteredValues)||void 0===e?void 0:e.length)&&void 0!==s&&s)for(const e in t.properties)(null===(i=this.props.filteredValues)||void 0===i?void 0:i.includes(null!==(r=t.properties[e].title)&&void 0!==r?r:e))||delete t.properties[e];this.setState({filteredSchema:t})}}_getFilteredFormData(t){if(!(null==t?void 0:t.properties))return this._formData;const e=u.JSONExt.deepCopy(this._formData);for(const s in e)t.properties[s]||delete e[s];return e}}const v=({translator:t})=>{const e=t.load("jupyterlab");return d().createElement("div",{className:"jp-SettingsEditor-placeholder"},d().createElement("div",{className:"jp-SettingsEditor-placeholderContent"},d().createElement("h3",null,e.__("No Plugin Selected")),d().createElement("p",null,e.__("Select a plugin from the list to view and edit its preferences."))))},f=({settings:t,editorRegistry:e,onSelect:s,handleSelectSignal:i,hasError:r,updateDirtyState:n,updateFilterSignal:a,translator:o,initialFilter:h})=>{const[c,u]=(0,l.useState)(null),[p,g]=(0,l.useState)(h?()=>h:null),_=d().useRef(null),f=d().useRef({});(0,l.useEffect)((()=>{var t;const e=(t,e)=>{g(e?()=>e:null)};a.connect(e);const s=(t,e)=>{u(e)};return null===(t=null==i?void 0:i.connect)||void 0===t||t.call(i,s),()=>{var t;a.disconnect(e),null===(t=null==i?void 0:i.disconnect)||void 0===t||t.call(i,s)}}),[]);const S=d().useCallback(((t,e)=>{if(f.current){f.current[t]=e;for(const t in f.current)if(f.current[t])return void n(!0)}n(!1)}),[f,n]),y=d().useMemo((()=>Object.entries(e.renderers).reduce(((t,[e,s])=>{const i=e.lastIndexOf("."),r=e.substring(0,i),n=e.substring(i+1);return t[r]||(t[r]={}),!t[r][n]&&s.fieldRenderer&&(t[r][n]=s.fieldRenderer),t}),{})),[e]);return c||p?d().createElement("div",{className:"jp-SettingsPanel",ref:_},t.map((t=>{const e=p?p(t.plugin):null;if(!(c&&c!==t.id||null!==e&&0===e.length))return d().createElement("div",{className:"jp-SettingsForm",key:`${t.id}SettingsEditor`},d().createElement(m,{filteredValues:e,settings:t,renderers:y,hasError:e=>{r(t.id,e)},updateDirtyState:e=>{S(t.id,e)},onSelect:s,translator:o}))}))):d().createElement(v,{translator:o})};class S extends o.SplitPanel{constructor(t){super({orientation:"horizontal",renderer:o.SplitPanel.defaultRenderer,spacing:1}),this._clearDirty=null,this._dirty=!1,this._saveStateChange=new a.Signal(this),this.translator=t.translator||r.nullTranslator,this._status=t.status;const e=this._list=new c({registry:t.registry,toSkip:t.toSkip,translator:this.translator,query:t.query});this.addWidget(e),this.setDirtyState=this.setDirtyState.bind(this),Promise.all(c.sortPlugins(t.registry).filter((t=>{const{schema:e}=t,s=!0===e["jupyter.lab.setting-deprecated"],i=Object.keys(e.properties||{}).length>0,r=!1!==e.additionalProperties;return!s&&(i||r)})).map((async e=>await t.registry.load(e.id)))).then((e=>{const s=n.ReactWidget.create(d().createElement(f,{settings:e.filter((e=>{var s;return!(null!==(s=t.toSkip)&&void 0!==s?s:[]).includes(e.id)})),editorRegistry:t.editorRegistry,handleSelectSignal:this._list.handleSelectSignal,onSelect:t=>this._list.selection=t,hasError:this._list.setError,updateFilterSignal:this._list.updateFilterSignal,updateDirtyState:this.setDirtyState,translator:this.translator,initialFilter:this._list.filter}));this.addWidget(s)})).catch((t=>{console.error(`Fail to load the setting plugins:\n${t}`)}))}get saveStateChanged(){return this._saveStateChange}setDirtyState(t){this._dirty=t,this._dirty&&!this._clearDirty?this._clearDirty=this._status.setDirty():!this._dirty&&this._clearDirty&&(this._clearDirty.dispose(),this._clearDirty=null),t?this.title.className.includes("jp-mod-dirty")||(this.title.className+=" jp-mod-dirty"):this.title.className=this.title.className.replace("jp-mod-dirty",""),this._saveStateChange.emit(t?"started":"completed")}onCloseRequest(t){const e=this.translator.load("jupyterlab");this._list.hasErrors?(0,i.showDialog)({title:e.__("Warning"),body:e.__("Unsaved changes due to validation error. Continue without saving?")}).then((e=>{e.button.accept&&(this.dispose(),super.onCloseRequest(t))})):this._dirty?(0,i.showDialog)({title:e.__("Warning"),body:e.__("Some changes have not been saved. Continue without saving?")}).then((e=>{e.button.accept&&(this.dispose(),super.onCloseRequest(t))})):(this.dispose(),super.onCloseRequest(t))}}var y=s(69319);const E="jp-Inspector-content";class w extends o.Panel{constructor(t={}){super(),this._source=null,this.translator=t.translator||r.nullTranslator,this._trans=this.translator.load("jupyterlab"),t.initialContent instanceof o.Widget?this._content=t.initialContent:"string"==typeof t.initialContent?this._content=w._generateContentWidget(`<p>${t.initialContent}</p>`):this._content=w._generateContentWidget("<p>"+this._trans.__("Click on a function to see documentation.")+"</p>"),this.addClass("jp-Inspector"),this.layout.addWidget(this._content)}[i.Printing.symbol](){return()=>i.Printing.printWidget(this)}get source(){return this._source}set source(t){this._source!==t&&(this._source&&(this._source.standby=!0,this._source.inspected.disconnect(this.onInspectorUpdate,this),this._source.disposed.disconnect(this.onSourceDisposed,this)),t&&t.isDisposed&&(t=null),this._source=t,this._source&&(this._source.standby=!1,this._source.inspected.connect(this.onInspectorUpdate,this),this._source.disposed.connect(this.onSourceDisposed,this)))}dispose(){this.isDisposed||(this.source=null,super.dispose())}onInspectorUpdate(t,e){const{content:s}=e;s&&s!==this._content&&(this._content.dispose(),this._content=s,s.addClass(E),this.layout.addWidget(s))}onSourceDisposed(t,e){this.source=null}static _generateContentWidget(t){const e=new o.Widget;return e.node.innerHTML=t,e.addClass(E),e.addClass("jp-Inspector-default-content"),e}}var b=s(70788),C=s(8627);class j{constructor(t){this._cleared=new a.Signal(this),this._disposed=new a.Signal(this),this._editor=null,this._inspected=new a.Signal(this),this._isDisposed=!1,this._pending=0,this._standby=!0,this._lastInspectedReply=null,this._connector=t.connector,this._rendermime=t.rendermime,this._debouncer=new p.Debouncer(this.onEditorChange.bind(this),250)}get cleared(){return this._cleared}get disposed(){return this._disposed}get inspected(){return this._inspected}get editor(){return this._editor}set editor(t){if(t===this._editor)return;a.Signal.disconnectReceiver(this);const e=this._editor=t;e&&(this._cleared.emit(void 0),this.onEditorChange(),e.model.selections.changed.connect(this._onChange,this),e.model.sharedModel.changed.connect(this._onChange,this))}get standby(){return this._standby}set standby(t){this._standby=t}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._debouncer.dispose(),this._disposed.emit(void 0),a.Signal.clearData(this))}onEditorChange(t){if(this._standby)return;const e=this.editor;if(!e)return;const s=t||e.model.sharedModel.getSource(),i=e.getCursorPosition(),r=b.Text.jsIndexToCharIndex(e.getOffsetAt(i),s),n={content:null},a=++this._pending;this._connector.fetch({offset:r,text:s}).then((t=>{if(!t||this.isDisposed||a!==this._pending)return this._lastInspectedReply=null,void this._inspected.emit(n);const{data:e}=t;if(this._lastInspectedReply&&u.JSONExt.deepEqual(this._lastInspectedReply,e))return;const s=this._rendermime.preferredMimeType(e);if(s){const t=this._rendermime.createRenderer(s),i=new C.MimeModel({data:e});t.renderModel(i),n.content=t}this._lastInspectedReply=t.data,this._inspected.emit(n)})).catch((t=>{this._lastInspectedReply=null,this._inspected.emit(n)}))}_onChange(){this._debouncer.invoke()}}var D=s(97511);class P extends D.DataConnector{constructor(t,e){super(),this._current=0,this._editor=t,this._trans=(null!=e?e:r.nullTranslator).load("jupyterlab")}fetch(t){return new Promise((e=>{const s=this._current=window.setTimeout((()=>{if(s!==this._current)return e(void 0);const i=this._validate(t.text);if(!i)return e({data:{"text/markdown":this._trans.__("No errors found")},metadata:{}});e({data:this.render(i),metadata:{}})}),100)}))}render(t){return{"text/markdown":t.map(this.renderError.bind(this)).join("")}}renderError(t){var e;switch(t.keyword){case"additionalProperties":return`**\`[${this._trans.__("additional property error")}]\`**\n ${this._trans.__("`%1` is not a valid property",null===(e=t.params)||void 0===e?void 0:e.additionalProperty)}`;case"syntax":return`**\`[${this._trans.__("syntax error")}]\`** *${t.message}*`;case"type":return`**\`[${this._trans.__("type error")}]\`**\n \`${t.instancePath}\` ${t.message}`;default:return`**\`[${this._trans.__("error")}]\`** *${t.message}*`}}_validate(t){const e=this._editor;if(!e.settings)return null;const{id:s,schema:i,version:r}=e.settings;return e.registry.validator.validateData({data:{composite:{},user:{}},id:s,raw:t,schema:i,version:r},!1)}}const R="jp-mod-error";class T extends o.SplitPanel{constructor(t){super({orientation:"horizontal",renderer:o.SplitPanel.defaultRenderer,spacing:1}),this._canRevert=!1,this._canSave=!1,this._commandsChanged=new a.Signal(this),this._settings=null,this._toolbar=new n.Toolbar;const{commands:e,editorFactory:s,registry:i,translator:l}=t;this.registry=i,this.translator=l||r.nullTranslator,this._commands=e;const d=this._defaults=new y.CodeEditorWrapper({editorOptions:{config:{readOnly:!0}},model:new y.CodeEditor.Model({mimeType:"text/javascript"}),factory:s}),h=this._user=new y.CodeEditorWrapper({editorOptions:{config:{lineNumbers:!0}},model:new y.CodeEditor.Model({mimeType:"text/javascript"}),factory:s});h.addClass("jp-SettingsRawEditor-user"),h.editor.model.sharedModel.changed.connect(this._onTextChanged,this),this._inspector=function(t,e,s){const i=(s=s||r.nullTranslator).load("jupyterlab"),n=new P(t,s),a=new w({initialContent:i.__("Any errors will be listed here"),translator:s}),o=new j({connector:n,rendermime:e||new C.RenderMimeRegistry({initialFactories:C.standardRendererFactories,translator:s})});return a.addClass("jp-SettingsDebug"),a.source=o,o.editor=t.source,a}(this,t.rendermime,this.translator),this.addClass("jp-SettingsRawEditor"),this._onSaveError=t.onSaveError,this.addWidget(x.defaultsEditor(d,this.translator)),this.addWidget(x.userEditor(h,this._toolbar,this._inspector,this.translator))}get canRevert(){return this._canRevert}get canSave(){return this._canSave}get commandsChanged(){return this._commandsChanged}get isDirty(){var t,e;return null!==(e=this._user.editor.model.sharedModel.getSource()!==(null===(t=this._settings)||void 0===t?void 0:t.raw))&&void 0!==e?e:""}get settings(){return this._settings}set settings(t){if(!t&&!this._settings)return;if(t&&this._settings&&t.plugin===this._settings.plugin)return;const e=this._defaults,s=this._user;this._settings&&this._settings.changed.disconnect(this._onSettingsChanged,this),t?(this._settings=t,this._settings.changed.connect(this._onSettingsChanged,this),this._onSettingsChanged()):(this._settings=null,e.editor.model.sharedModel.setSource(""),s.editor.model.sharedModel.setSource("")),this.update()}get sizes(){return this.relativeSizes()}set sizes(t){this.setRelativeSizes(t)}get source(){return this._user.editor}dispose(){this.isDisposed||(this._defaults.model.dispose(),this._defaults.dispose(),this._user.model.dispose(),this._user.dispose(),super.dispose())}revert(){var t,e;this._user.editor.model.sharedModel.setSource(null!==(e=null===(t=this.settings)||void 0===t?void 0:t.raw)&&void 0!==e?e:""),this._updateToolbar(!1,!1)}save(){if(!this.isDirty||!this._settings)return Promise.resolve(void 0);const t=this._settings,e=this._user.editor.model.sharedModel.getSource();return t.save(e).then((()=>{this._updateToolbar(!1,!1)})).catch((t=>{this._updateToolbar(!0,!1),this._onSaveError(t,this.translator)}))}onAfterAttach(t){x.populateToolbar(this._commands,this._toolbar),this.update()}_onTextChanged(){const t=this._user.editor.model.sharedModel.getSource(),e=this._settings;if(this.removeClass(R),e&&e.raw!==t)return e.validate(t)?(this.addClass(R),void this._updateToolbar(!0,!1)):void this._updateToolbar(!0,!0);this._updateToolbar(!1,!1)}_onSettingsChanged(){var t,e;const s=this._settings,i=this._defaults,r=this._user;i.editor.model.sharedModel.setSource(null!==(t=null==s?void 0:s.annotatedDefaults())&&void 0!==t?t:""),r.editor.model.sharedModel.setSource(null!==(e=null==s?void 0:s.raw)&&void 0!==e?e:"")}_updateToolbar(t=this._canRevert,e=this._canSave){const s=this._commands;this._canRevert=t,this._canSave=e,this._commandsChanged.emit([s.revert,s.save])}}var x,F;!function(t){t.defaultsEditor=function(t,e){const s=(e=e||r.nullTranslator).load("jupyterlab"),i=new o.Widget,a=i.layout=new o.BoxLayout({spacing:0}),l=new o.Widget,d=new n.Toolbar,h=s.__("System Defaults");return l.node.innerText=h,d.insertItem(0,"banner",l),a.addWidget(d),a.addWidget(t),i},t.populateToolbar=function(t,e){const{registry:s,revert:i,save:r}=t;e.addItem("spacer",n.Toolbar.createSpacerItem()),[i,r].forEach((t=>{const i=new n.CommandToolbarButton({commands:s,id:t});e.addItem(t,i)}))},t.userEditor=function(t,e,s,i){const n=(i=i||r.nullTranslator).load("jupyterlab").__("User Preferences"),a=new o.Widget,l=a.layout=new o.BoxLayout({spacing:0}),d=new o.Widget;return d.node.innerText=n,e.insertItem(0,"banner",d),l.addWidget(e),l.addWidget(t),l.addWidget(s),a}}(x||(x={}));class k extends o.Widget{constructor(t){super(),this._settings=null,this._stateChanged=new a.Signal(this),this.addClass("jp-PluginEditor");const{commands:e,editorFactory:s,registry:i,rendermime:n,translator:l}=t;this.translator=l||r.nullTranslator,this._trans=this.translator.load("jupyterlab");const d=this.layout=new o.StackedLayout,{onSaveError:h}=F;this.raw=this._rawEditor=new T({commands:e,editorFactory:s,onSaveError:h,registry:i,rendermime:n,translator:l}),this._rawEditor.handleMoved.connect(this._onStateChanged,this),d.addWidget(this._rawEditor)}get isDirty(){return this._rawEditor.isDirty}get settings(){return this._settings}set settings(t){if(this._settings===t)return;const e=this._rawEditor;this._settings=e.settings=t,this.update()}get state(){const t=this._settings?this._settings.id:"",{sizes:e}=this._rawEditor;return{plugin:t,sizes:e}}set state(t){u.JSONExt.deepEqual(this.state,t)||(this._rawEditor.sizes=t.sizes,this.update())}get stateChanged(){return this._stateChanged}confirm(){return!this.isHidden&&this.isAttached&&this.isDirty?(0,i.showDialog)({title:this._trans.__("You have unsaved changes."),body:this._trans.__("Do you want to leave without saving?"),buttons:[i.Dialog.cancelButton({label:this._trans.__("Cancel")}),i.Dialog.okButton({label:this._trans.__("Ok")})]}).then((t=>{if(!t.button.accept)throw new Error("User canceled.")})):Promise.resolve(void 0)}dispose(){this.isDisposed||(super.dispose(),this._rawEditor.dispose())}onAfterAttach(t){this.update()}onUpdateRequest(t){const e=this._rawEditor;this._settings?(this.show(),e.show()):this.hide()}_onStateChanged(){this.stateChanged.emit(void 0)}}!function(t){t.onSaveError=function(t,e){const s=(e=e||r.nullTranslator).load("jupyterlab");console.error(`Saving setting editor value failed: ${t.message}`),(0,i.showErrorMessage)(s.__("Your changes were not saved."),t)}}(F||(F={}));const N={sizes:[1,3],container:{editor:"raw",plugin:"",sizes:[1,1]}};class O extends o.SplitPanel{constructor(t){super({orientation:"horizontal",renderer:o.SplitPanel.defaultRenderer,spacing:1}),this._fetching=null,this._saving=!1,this._state=u.JSONExt.deepCopy(N),this.translator=t.translator||r.nullTranslator,this.addClass("jp-SettingEditor"),this.key=t.key,this.state=t.state;const{commands:e,editorFactory:s,rendermime:i}=t,a=this.registry=t.registry,d=this._instructions=n.ReactWidget.create(l.createElement(v,{translator:this.translator}));d.addClass("jp-SettingEditorInstructions");const h=this._editor=new k({commands:e,editorFactory:s,registry:a,rendermime:i,translator:this.translator}),p=this._list=new c({confirm:()=>h.confirm(),registry:a,translator:this.translator}),g=t.when;g&&(this._when=Array.isArray(g)?Promise.all(g):g),this.addWidget(p),this.addWidget(d),o.SplitPanel.setStretch(p,0),o.SplitPanel.setStretch(d,1),o.SplitPanel.setStretch(h,1),h.stateChanged.connect(this._onStateChanged,this),p.changed.connect(this._onStateChanged,this),this.handleMoved.connect(this._onStateChanged,this)}get canRevertRaw(){return this._editor.raw.canRevert}get canSaveRaw(){return this._editor.raw.canSave}get commandsChanged(){return this._editor.raw.commandsChanged}get settings(){return this._editor.settings}get source(){return this._editor.raw.source}dispose(){this.isDisposed||(super.dispose(),this._editor.dispose(),this._instructions.dispose(),this._list.dispose())}revert(){this._editor.raw.revert()}save(){return this._editor.raw.save()}onAfterAttach(t){super.onAfterAttach(t),this.hide(),this._fetchState().then((()=>{this.show(),this._setState()})).catch((t=>{console.error("Fetching setting editor state failed",t),this.show(),this._setState()}))}onCloseRequest(t){this._editor.confirm().then((()=>{super.onCloseRequest(t),this.dispose()})).catch((()=>{}))}_fetchState(){if(this._fetching)return this._fetching;const{key:t,state:e}=this,s=[e.fetch(t),this._when];return this._fetching=Promise.all(s).then((([t])=>{this._fetching=null,this._saving||(this._state=M.normalizeState(t,this._state))}))}async _onStateChanged(){this._state.sizes=this.relativeSizes(),this._state.container=this._editor.state,this._state.container.plugin=this._list.selection;try{await this._saveState()}catch(t){console.error("Saving setting editor state failed",t)}this._setState()}async _saveState(){const{key:t,state:e}=this,s=this._state;this._saving=!0;try{await e.save(t,s),this._saving=!1}catch(t){throw this._saving=!1,t}}_setLayout(){const t=this._editor,e=this._state;t.state=e.container,requestAnimationFrame((()=>{this.setRelativeSizes(e.sizes)}))}_setState(){const t=this._editor,e=this._list,{container:s}=this._state;if(!s.plugin)return t.settings=null,e.selection="",void this._setLayout();if(t.settings&&t.settings.id===s.plugin)return void this._setLayout();const i=this._instructions;this.registry.load(s.plugin).then((r=>{i.isAttached&&(i.parent=null),t.isAttached||this.addWidget(t),t.settings=r,e.selection=s.plugin,this._setLayout()})).catch((i=>{console.error(`Loading ${s.plugin} settings failed.`,i),e.selection=this._state.container.plugin="",t.settings=null,this._setLayout()}))}}var M;!function(t){function e(t){return Array.isArray(t)&&t.every((t=>"number"==typeof t))}t.normalizeState=function(t,s){if(!t)return u.JSONExt.deepCopy(N);if("sizes"in t&&e(t.sizes)||(t.sizes=u.JSONExt.deepCopy(N.sizes)),!("container"in t))return t.container=u.JSONExt.deepCopy(N.container),t;const i="container"in t&&t.container&&"object"==typeof t.container?t.container:{};return t.container={plugin:"string"==typeof i.plugin?i.plugin:N.container.plugin,sizes:e(i.sizes)?i.sizes:u.JSONExt.deepCopy(N.container.sizes)},t}}(M||(M={}));var W=s(24758)},24758:(t,e,s)=>{s.d(e,{O:()=>r,g:()=>n});var i=s(20998);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."),n=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([[3360],{63360:(t,e,s)=>{s.r(e),s.d(e,{IJSONSettingEditorTracker:()=>W.g,ISettingEditorTracker:()=>W.O,JsonSettingEditor:()=>O,SettingsEditor:()=>S});var i=s(57797),r=s(11523),n=s(52018),a=s(81997),o=s(31516),l=s(78156),d=s.n(l),h=s(33625);class c extends i.ReactWidget{constructor(t){var e;super(),this._changed=new a.Signal(this),this._handleSelectSignal=new a.Signal(this),this._updateFilterSignal=new a.Signal(this),this._allPlugins=[],this._settings={},this._scrollTop=0,this._selection="",this.registry=t.registry,this.translator=t.translator||r.nullTranslator,this.addClass("jp-PluginList"),this._confirm=t.confirm,this.registry.pluginChanged.connect((()=>{this.update()}),this),this.mapPlugins=this.mapPlugins.bind(this),this.setFilter=this.setFilter.bind(this),this.setFilter(t.query?(0,n.updateFilterFunction)(t.query,!1,!1):null),this.setError=this.setError.bind(this),this._evtMousedown=this._evtMousedown.bind(this),this._query=null!==(e=t.query)&&void 0!==e?e:"",this._allPlugins=c.sortPlugins(this.registry).filter((e=>{var s;const{schema:i}=e,r=!0===i["jupyter.lab.setting-deprecated"],n=Object.keys(i.properties||{}).length>0,a=!1!==i.additionalProperties,o=this._confirm||!this._confirm&&!(null!==(s=t.toSkip)&&void 0!==s?s:[]).includes(e.id);return!r&&o&&(n||a)})),(async()=>{for(const t of this._allPlugins){const e=await this.registry.load(t.id);this._settings[t.id]=e}this.update()})(),this._errors={}}get changed(){return this._changed}get scrollTop(){var t;return null===(t=this.node.querySelector("ul"))||void 0===t?void 0:t.scrollTop}get hasErrors(){for(const t in this._errors)if(this._errors[t])return!0;return!1}get filter(){return this._filter}get selection(){return this._selection}set selection(t){this._selection=t,this.update()}get updateFilterSignal(){return this._updateFilterSignal}get handleSelectSignal(){return this._handleSelectSignal}onUpdateRequest(t){const e=this.node.querySelector("ul");e&&void 0!==this._scrollTop&&(e.scrollTop=this._scrollTop),super.onUpdateRequest(t)}_evtMousedown(t){const e=t.currentTarget.getAttribute("data-id");e&&(this._confirm?this._confirm(e).then((()=>{this.selection=e,this._changed.emit(void 0),this.update()})).catch((()=>{})):(this._scrollTop=this.scrollTop,this._selection=e,this._handleSelectSignal.emit(e),this._changed.emit(void 0),this.update()))}getHint(t,e,s){let i=s.data.user[t];if(i||(i=s.data.composite[t]),i||(i=s.schema[t]),!i){const{properties:s}=e.schema;i=s&&s[t]&&s[t].default}return"string"==typeof i?i:""}getFilterString(t,e,s,i){var r;if(i&&s&&(i=i.replace("#/definitions/",""),e=null!==(r=s[i])&&void 0!==r?r:{}),e.properties)e=e.properties;else{if(!e.items)return[];e=e.items}return e.$ref?this.getFilterString(t,e,s,e.$ref):0===Object.keys(e).length?[]:Object.keys(e).reduce(((i,r)=>{var n,a;const o=e[r];if(!o){if(t(null!==(n=e.title)&&void 0!==n?n:""))return e.title;if(t(r))return r}return t(null!==(a=o.title)&&void 0!==a?a:"")&&i.push(o.title),t(r)&&i.push(r),i.concat(this.getFilterString(t,o,s,o.$ref)),i}),[])}setFilter(t,e){this._filter=t?e=>{var s,i;return!t||t(null!==(s=e.schema.title)&&void 0!==s?s:"")?null:this.getFilterString(t,null!==(i=e.schema)&&void 0!==i?i:{},e.schema.definitions)}:null,this._query=e,this._updateFilterSignal.emit(this._filter),this.update()}setError(t,e){this._errors[t]!==e?(this._errors[t]=e,this.update()):this._errors[t]=e}mapPlugins(t){var e,s,i,r;const{id:a,schema:o,version:l}=t,c=this.translator.load("jupyterlab"),u="string"==typeof o.title?c._p("schema",o.title):a,p=h.StringExt.matchSumOfSquares(u.toLocaleLowerCase(),null!==(s=null===(e=this._query)||void 0===e?void 0:e.toLocaleLowerCase())&&void 0!==s?s:""),g=h.StringExt.highlight(u,null!==(i=null==p?void 0:p.indices)&&void 0!==i?i:[],(t=>d().createElement("mark",null,t))),_=`${"string"==typeof o.description?c._p("schema",o.description):""}\n${a}\n${l}`,m=this.getHint("jupyter.lab.setting-icon",this.registry,t),v=this.getHint("jupyter.lab.setting-icon-class",this.registry,t),f=this.getHint("jupyter.lab.setting-icon-label",this.registry,t),S=this._filter?null===(r=this._filter(t))||void 0===r?void 0:r.map((t=>{var e,s,i;const r=h.StringExt.matchSumOfSquares(t.toLocaleLowerCase(),null!==(s=null===(e=this._query)||void 0===e?void 0:e.toLocaleLowerCase())&&void 0!==s?s:""),n=h.StringExt.highlight(t,null!==(i=null==r?void 0:r.indices)&&void 0!==i?i:[],(t=>d().createElement("mark",null,t)));return d().createElement("li",{key:`${a}-${t}`}," ",n," ")})):void 0;return d().createElement("div",{onClick:this._evtMousedown,className:`${a===this.selection?"jp-mod-selected jp-PluginList-entry":"jp-PluginList-entry"} ${this._errors[a]?"jp-ErrorPlugin":""}`,"data-id":a,key:a,title:_},d().createElement("div",{className:"jp-PluginList-entry-label",role:"tab"},d().createElement("div",{className:"jp-SelectedIndicator"}),d().createElement(n.LabIcon.resolveReact,{icon:m||(v?void 0:n.settingsIcon),iconClass:(0,n.classes)(v,"jp-Icon"),title:f,tag:"span",stylesheet:"settingsEditor"}),d().createElement("span",{className:"jp-PluginList-entry-label-text"},g)),d().createElement("ul",null,S))}render(){const t=this.translator.load("jupyterlab"),e=this._allPlugins.filter((t=>{if(!this._filter)return!1;const e=this._filter(t);return null===e||e.length>0})),s=e.filter((t=>{var e;return null===(e=this._settings[t.id])||void 0===e?void 0:e.isModified})),i=s.map(this.mapPlugins),r=e.filter((t=>!s.includes(t))).map(this.mapPlugins);return d().createElement("div",{className:"jp-PluginList-wrapper"},d().createElement(n.FilterBox,{updateFilter:this.setFilter,useFuzzyFilter:!1,placeholder:t.__("Search settings…"),forceRefresh:!1,caseSensitive:!1,initialQuery:this._query}),i.length>0&&d().createElement("div",null,d().createElement("h1",{className:"jp-PluginList-header"},t.__("Modified")),d().createElement("ul",null,i)),r.length>0&&d().createElement("div",null,d().createElement("h1",{className:"jp-PluginList-header"},t.__("Settings")),d().createElement("ul",null,r)),0===i.length&&0===r.length&&d().createElement("p",{className:"jp-PluginList-noResults"},t.__("No items match your search.")))}}!function(t){t.sortPlugins=function(t){return Object.keys(t.plugins).map((e=>t.plugins[e])).sort(((t,e)=>(t.schema.title||t.id).localeCompare(e.schema.title||e.id)))}}(c||(c={}));var u=s(20998),p=s(97934),g=s(27478),_=s.n(g);class m extends d().Component{constructor(t){super(t),this.reset=async t=>{t.stopPropagation();for(const t in this.props.settings.user)await this.props.settings.remove(t);this._formData=this.props.settings.composite,this.setState({isModified:!1})},this._onChange=t=>{this.props.hasError(0!==t.errors.length),this._formData=t.formData,0===t.errors.length&&(this.props.updateDirtyState(!0),this._debouncer.invoke()),this.props.onSelect(this.props.settings.id)};const{settings:e}=t;this._formData=e.composite,this.state={isModified:e.isModified,uiSchema:{},filteredSchema:this.props.settings.schema,formContext:{defaultFormData:this.props.settings.default(),settings:this.props.settings}},this.handleChange=this.handleChange.bind(this),this._debouncer=new p.Debouncer(this.handleChange)}componentDidMount(){this._setUiSchema(),this._setFilteredSchema()}componentDidUpdate(t){this._setUiSchema(t.renderers[t.settings.id]),this._setFilteredSchema(t.filteredValues),t.settings!==this.props.settings&&this.setState({formContext:{settings:this.props.settings,defaultFormData:this.props.settings.default()}})}componentWillUnmount(){this._debouncer.dispose()}handleChange(){!this.props.settings.isModified&&this._formData&&this.props.settings.isDefault(this._formData)?this.props.updateDirtyState(!1):this.props.settings.save(JSON.stringify(this._formData,void 0,4)).then((()=>{this.props.updateDirtyState(!1),this.setState({isModified:this.props.settings.isModified})})).catch((t=>{this.props.updateDirtyState(!1);const e=this.props.translator.load("jupyterlab");(0,i.showErrorMessage)(e.__("Error saving settings."),t)}))}render(){const t=this.props.translator.load("jupyterlab");return d().createElement(d().Fragment,null,d().createElement("div",{className:"jp-SettingsHeader"},d().createElement("h2",{className:"jp-SettingsHeader-title",title:this.props.settings.schema.description},this.props.settings.schema.title),d().createElement("div",{className:"jp-SettingsHeader-buttonbar"},this.state.isModified&&d().createElement(n.Button,{className:"jp-RestoreButton",onClick:this.reset},t.__("Restore to Defaults"))),d().createElement("div",{className:"jp-SettingsHeader-description"},this.props.settings.schema.description)),d().createElement(n.FormComponent,{validator:_(),schema:this.state.filteredSchema,formData:this._getFilteredFormData(this.state.filteredSchema),uiSchema:this.state.uiSchema,fields:this.props.renderers[this.props.settings.id],formContext:this.state.formContext,liveValidate:!0,idPrefix:`jp-SettingsEditor-${this.props.settings.id}`,onChange:this._onChange,translator:this.props.translator,experimental_defaultFormStateBehavior:{emptyObjectFields:"populateRequiredDefaults"}}))}_setUiSchema(t){var e;const s=this.props.renderers[this.props.settings.id];if(!u.JSONExt.deepEqual(Object.keys(null!=t?t:{}).sort(),Object.keys(null!=s?s:{}).sort())){const t={};for(const s in this.props.renderers[this.props.settings.id])Object.keys(null!==(e=this.props.settings.schema.properties)&&void 0!==e?e:{}).includes(s)&&(t[s]={"ui:field":s});this.setState({uiSchema:t})}}_setFilteredSchema(t){var e,s,i,r;if(void 0===t||!u.JSONExt.deepEqual(t,this.props.filteredValues)){const t=u.JSONExt.deepCopy(this.props.settings.schema);if(null!==(s=null===(e=this.props.filteredValues)||void 0===e?void 0:e.length)&&void 0!==s&&s)for(const e in t.properties)(null===(i=this.props.filteredValues)||void 0===i?void 0:i.includes(null!==(r=t.properties[e].title)&&void 0!==r?r:e))||delete t.properties[e];this.setState({filteredSchema:t})}}_getFilteredFormData(t){if(!(null==t?void 0:t.properties))return this._formData;const e=u.JSONExt.deepCopy(this._formData);for(const s in e)t.properties[s]||delete e[s];return e}}const v=({translator:t})=>{const e=t.load("jupyterlab");return d().createElement("div",{className:"jp-SettingsEditor-placeholder"},d().createElement("div",{className:"jp-SettingsEditor-placeholderContent"},d().createElement("h3",null,e.__("No Plugin Selected")),d().createElement("p",null,e.__("Select a plugin from the list to view and edit its preferences."))))},f=({settings:t,editorRegistry:e,onSelect:s,handleSelectSignal:i,hasError:r,updateDirtyState:n,updateFilterSignal:a,translator:o,initialFilter:h})=>{const[c,u]=(0,l.useState)(null),[p,g]=(0,l.useState)(h?()=>h:null),_=d().useRef(null),f=d().useRef({});(0,l.useEffect)((()=>{var t;const e=(t,e)=>{g(e?()=>e:null)};a.connect(e);const s=(t,e)=>{u(e)};return null===(t=null==i?void 0:i.connect)||void 0===t||t.call(i,s),()=>{var t;a.disconnect(e),null===(t=null==i?void 0:i.disconnect)||void 0===t||t.call(i,s)}}),[]);const S=d().useCallback(((t,e)=>{if(f.current){f.current[t]=e;for(const t in f.current)if(f.current[t])return void n(!0)}n(!1)}),[f,n]),y=d().useMemo((()=>Object.entries(e.renderers).reduce(((t,[e,s])=>{const i=e.lastIndexOf("."),r=e.substring(0,i),n=e.substring(i+1);return t[r]||(t[r]={}),!t[r][n]&&s.fieldRenderer&&(t[r][n]=s.fieldRenderer),t}),{})),[e]);return c||p?d().createElement("div",{className:"jp-SettingsPanel",ref:_},t.map((t=>{const e=p?p(t.plugin):null;if(!(c&&c!==t.id||null!==e&&0===e.length))return d().createElement("div",{className:"jp-SettingsForm",key:`${t.id}SettingsEditor`},d().createElement(m,{filteredValues:e,settings:t,renderers:y,hasError:e=>{r(t.id,e)},updateDirtyState:e=>{S(t.id,e)},onSelect:s,translator:o}))}))):d().createElement(v,{translator:o})};class S extends o.SplitPanel{constructor(t){super({orientation:"horizontal",renderer:o.SplitPanel.defaultRenderer,spacing:1}),this._clearDirty=null,this._dirty=!1,this._saveStateChange=new a.Signal(this),this.translator=t.translator||r.nullTranslator,this._status=t.status;const e=this._list=new c({registry:t.registry,toSkip:t.toSkip,translator:this.translator,query:t.query});this.addWidget(e),this.setDirtyState=this.setDirtyState.bind(this),Promise.all(c.sortPlugins(t.registry).filter((t=>{const{schema:e}=t,s=!0===e["jupyter.lab.setting-deprecated"],i=Object.keys(e.properties||{}).length>0,r=!1!==e.additionalProperties;return!s&&(i||r)})).map((async e=>await t.registry.load(e.id)))).then((e=>{const s=n.ReactWidget.create(d().createElement(f,{settings:e.filter((e=>{var s;return!(null!==(s=t.toSkip)&&void 0!==s?s:[]).includes(e.id)})),editorRegistry:t.editorRegistry,handleSelectSignal:this._list.handleSelectSignal,onSelect:t=>this._list.selection=t,hasError:this._list.setError,updateFilterSignal:this._list.updateFilterSignal,updateDirtyState:this.setDirtyState,translator:this.translator,initialFilter:this._list.filter}));this.addWidget(s)})).catch((t=>{console.error(`Fail to load the setting plugins:\n${t}`)}))}get saveStateChanged(){return this._saveStateChange}setDirtyState(t){this._dirty=t,this._dirty&&!this._clearDirty?this._clearDirty=this._status.setDirty():!this._dirty&&this._clearDirty&&(this._clearDirty.dispose(),this._clearDirty=null),t?this.title.className.includes("jp-mod-dirty")||(this.title.className+=" jp-mod-dirty"):this.title.className=this.title.className.replace("jp-mod-dirty",""),this._saveStateChange.emit(t?"started":"completed")}onCloseRequest(t){const e=this.translator.load("jupyterlab");this._list.hasErrors?(0,i.showDialog)({title:e.__("Warning"),body:e.__("Unsaved changes due to validation error. Continue without saving?")}).then((e=>{e.button.accept&&(this.dispose(),super.onCloseRequest(t))})):this._dirty?(0,i.showDialog)({title:e.__("Warning"),body:e.__("Some changes have not been saved. Continue without saving?")}).then((e=>{e.button.accept&&(this.dispose(),super.onCloseRequest(t))})):(this.dispose(),super.onCloseRequest(t))}}var y=s(2749);const E="jp-Inspector-content";class w extends o.Panel{constructor(t={}){super(),this._source=null,this.translator=t.translator||r.nullTranslator,this._trans=this.translator.load("jupyterlab"),t.initialContent instanceof o.Widget?this._content=t.initialContent:"string"==typeof t.initialContent?this._content=w._generateContentWidget(`<p>${t.initialContent}</p>`):this._content=w._generateContentWidget("<p>"+this._trans.__("Click on a function to see documentation.")+"</p>"),this.addClass("jp-Inspector"),this.layout.addWidget(this._content)}[i.Printing.symbol](){return()=>i.Printing.printWidget(this)}get source(){return this._source}set source(t){this._source!==t&&(this._source&&(this._source.standby=!0,this._source.inspected.disconnect(this.onInspectorUpdate,this),this._source.disposed.disconnect(this.onSourceDisposed,this)),t&&t.isDisposed&&(t=null),this._source=t,this._source&&(this._source.standby=!1,this._source.inspected.connect(this.onInspectorUpdate,this),this._source.disposed.connect(this.onSourceDisposed,this)))}dispose(){this.isDisposed||(this.source=null,super.dispose())}onInspectorUpdate(t,e){const{content:s}=e;s&&s!==this._content&&(this._content.dispose(),this._content=s,s.addClass(E),this.layout.addWidget(s))}onSourceDisposed(t,e){this.source=null}static _generateContentWidget(t){const e=new o.Widget;return e.node.innerHTML=t,e.addClass(E),e.addClass("jp-Inspector-default-content"),e}}var b=s(74787),C=s(56761);class j{constructor(t){this._cleared=new a.Signal(this),this._disposed=new a.Signal(this),this._editor=null,this._inspected=new a.Signal(this),this._isDisposed=!1,this._pending=0,this._standby=!0,this._lastInspectedReply=null,this._connector=t.connector,this._rendermime=t.rendermime,this._debouncer=new p.Debouncer(this.onEditorChange.bind(this),250)}get cleared(){return this._cleared}get disposed(){return this._disposed}get inspected(){return this._inspected}get editor(){return this._editor}set editor(t){if(t===this._editor)return;a.Signal.disconnectReceiver(this);const e=this._editor=t;e&&(this._cleared.emit(void 0),this.onEditorChange(),e.model.selections.changed.connect(this._onChange,this),e.model.sharedModel.changed.connect(this._onChange,this))}get standby(){return this._standby}set standby(t){this._standby=t}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._debouncer.dispose(),this._disposed.emit(void 0),a.Signal.clearData(this))}onEditorChange(t){if(this._standby)return;const e=this.editor;if(!e)return;const s=t||e.model.sharedModel.getSource(),i=e.getCursorPosition(),r=b.Text.jsIndexToCharIndex(e.getOffsetAt(i),s),n={content:null},a=++this._pending;this._connector.fetch({offset:r,text:s}).then((t=>{if(!t||this.isDisposed||a!==this._pending)return this._lastInspectedReply=null,void this._inspected.emit(n);const{data:e}=t;if(this._lastInspectedReply&&u.JSONExt.deepEqual(this._lastInspectedReply,e))return;const s=this._rendermime.preferredMimeType(e);if(s){const t=this._rendermime.createRenderer(s),i=new C.MimeModel({data:e});t.renderModel(i),n.content=t}this._lastInspectedReply=t.data,this._inspected.emit(n)})).catch((t=>{this._lastInspectedReply=null,this._inspected.emit(n)}))}_onChange(){this._debouncer.invoke()}}var D=s(78956);class P extends D.DataConnector{constructor(t,e){super(),this._current=0,this._editor=t,this._trans=(null!=e?e:r.nullTranslator).load("jupyterlab")}fetch(t){return new Promise((e=>{const s=this._current=window.setTimeout((()=>{if(s!==this._current)return e(void 0);const i=this._validate(t.text);if(!i)return e({data:{"text/markdown":this._trans.__("No errors found")},metadata:{}});e({data:this.render(i),metadata:{}})}),100)}))}render(t){return{"text/markdown":t.map(this.renderError.bind(this)).join("")}}renderError(t){var e;switch(t.keyword){case"additionalProperties":return`**\`[${this._trans.__("additional property error")}]\`**\n ${this._trans.__("`%1` is not a valid property",null===(e=t.params)||void 0===e?void 0:e.additionalProperty)}`;case"syntax":return`**\`[${this._trans.__("syntax error")}]\`** *${t.message}*`;case"type":return`**\`[${this._trans.__("type error")}]\`**\n \`${t.instancePath}\` ${t.message}`;default:return`**\`[${this._trans.__("error")}]\`** *${t.message}*`}}_validate(t){const e=this._editor;if(!e.settings)return null;const{id:s,schema:i,version:r}=e.settings;return e.registry.validator.validateData({data:{composite:{},user:{}},id:s,raw:t,schema:i,version:r},!1)}}const R="jp-mod-error";class T extends o.SplitPanel{constructor(t){super({orientation:"horizontal",renderer:o.SplitPanel.defaultRenderer,spacing:1}),this._canRevert=!1,this._canSave=!1,this._commandsChanged=new a.Signal(this),this._settings=null,this._toolbar=new n.Toolbar;const{commands:e,editorFactory:s,registry:i,translator:l}=t;this.registry=i,this.translator=l||r.nullTranslator,this._commands=e;const d=this._defaults=new y.CodeEditorWrapper({editorOptions:{config:{readOnly:!0}},model:new y.CodeEditor.Model({mimeType:"text/javascript"}),factory:s}),h=this._user=new y.CodeEditorWrapper({editorOptions:{config:{lineNumbers:!0}},model:new y.CodeEditor.Model({mimeType:"text/javascript"}),factory:s});h.addClass("jp-SettingsRawEditor-user"),h.editor.model.sharedModel.changed.connect(this._onTextChanged,this),this._inspector=function(t,e,s){const i=(s=s||r.nullTranslator).load("jupyterlab"),n=new P(t,s),a=new w({initialContent:i.__("Any errors will be listed here"),translator:s}),o=new j({connector:n,rendermime:e||new C.RenderMimeRegistry({initialFactories:C.standardRendererFactories,translator:s})});return a.addClass("jp-SettingsDebug"),a.source=o,o.editor=t.source,a}(this,t.rendermime,this.translator),this.addClass("jp-SettingsRawEditor"),this._onSaveError=t.onSaveError,this.addWidget(x.defaultsEditor(d,this.translator)),this.addWidget(x.userEditor(h,this._toolbar,this._inspector,this.translator))}get canRevert(){return this._canRevert}get canSave(){return this._canSave}get commandsChanged(){return this._commandsChanged}get isDirty(){var t,e;return null!==(e=this._user.editor.model.sharedModel.getSource()!==(null===(t=this._settings)||void 0===t?void 0:t.raw))&&void 0!==e?e:""}get settings(){return this._settings}set settings(t){if(!t&&!this._settings)return;if(t&&this._settings&&t.plugin===this._settings.plugin)return;const e=this._defaults,s=this._user;this._settings&&this._settings.changed.disconnect(this._onSettingsChanged,this),t?(this._settings=t,this._settings.changed.connect(this._onSettingsChanged,this),this._onSettingsChanged()):(this._settings=null,e.editor.model.sharedModel.setSource(""),s.editor.model.sharedModel.setSource("")),this.update()}get sizes(){return this.relativeSizes()}set sizes(t){this.setRelativeSizes(t)}get source(){return this._user.editor}dispose(){this.isDisposed||(this._defaults.model.dispose(),this._defaults.dispose(),this._user.model.dispose(),this._user.dispose(),super.dispose())}revert(){var t,e;this._user.editor.model.sharedModel.setSource(null!==(e=null===(t=this.settings)||void 0===t?void 0:t.raw)&&void 0!==e?e:""),this._updateToolbar(!1,!1)}save(){if(!this.isDirty||!this._settings)return Promise.resolve(void 0);const t=this._settings,e=this._user.editor.model.sharedModel.getSource();return t.save(e).then((()=>{this._updateToolbar(!1,!1)})).catch((t=>{this._updateToolbar(!0,!1),this._onSaveError(t,this.translator)}))}onAfterAttach(t){x.populateToolbar(this._commands,this._toolbar),this.update()}_onTextChanged(){const t=this._user.editor.model.sharedModel.getSource(),e=this._settings;if(this.removeClass(R),e&&e.raw!==t)return e.validate(t)?(this.addClass(R),void this._updateToolbar(!0,!1)):void this._updateToolbar(!0,!0);this._updateToolbar(!1,!1)}_onSettingsChanged(){var t,e;const s=this._settings,i=this._defaults,r=this._user;i.editor.model.sharedModel.setSource(null!==(t=null==s?void 0:s.annotatedDefaults())&&void 0!==t?t:""),r.editor.model.sharedModel.setSource(null!==(e=null==s?void 0:s.raw)&&void 0!==e?e:"")}_updateToolbar(t=this._canRevert,e=this._canSave){const s=this._commands;this._canRevert=t,this._canSave=e,this._commandsChanged.emit([s.revert,s.save])}}var x,F;!function(t){t.defaultsEditor=function(t,e){const s=(e=e||r.nullTranslator).load("jupyterlab"),i=new o.Widget,a=i.layout=new o.BoxLayout({spacing:0}),l=new o.Widget,d=new n.Toolbar,h=s.__("System Defaults");return l.node.innerText=h,d.insertItem(0,"banner",l),a.addWidget(d),a.addWidget(t),i},t.populateToolbar=function(t,e){const{registry:s,revert:i,save:r}=t;e.addItem("spacer",n.Toolbar.createSpacerItem()),[i,r].forEach((t=>{const i=new n.CommandToolbarButton({commands:s,id:t});e.addItem(t,i)}))},t.userEditor=function(t,e,s,i){const n=(i=i||r.nullTranslator).load("jupyterlab").__("User Preferences"),a=new o.Widget,l=a.layout=new o.BoxLayout({spacing:0}),d=new o.Widget;return d.node.innerText=n,e.insertItem(0,"banner",d),l.addWidget(e),l.addWidget(t),l.addWidget(s),a}}(x||(x={}));class k extends o.Widget{constructor(t){super(),this._settings=null,this._stateChanged=new a.Signal(this),this.addClass("jp-PluginEditor");const{commands:e,editorFactory:s,registry:i,rendermime:n,translator:l}=t;this.translator=l||r.nullTranslator,this._trans=this.translator.load("jupyterlab");const d=this.layout=new o.StackedLayout,{onSaveError:h}=F;this.raw=this._rawEditor=new T({commands:e,editorFactory:s,onSaveError:h,registry:i,rendermime:n,translator:l}),this._rawEditor.handleMoved.connect(this._onStateChanged,this),d.addWidget(this._rawEditor)}get isDirty(){return this._rawEditor.isDirty}get settings(){return this._settings}set settings(t){if(this._settings===t)return;const e=this._rawEditor;this._settings=e.settings=t,this.update()}get state(){const t=this._settings?this._settings.id:"",{sizes:e}=this._rawEditor;return{plugin:t,sizes:e}}set state(t){u.JSONExt.deepEqual(this.state,t)||(this._rawEditor.sizes=t.sizes,this.update())}get stateChanged(){return this._stateChanged}confirm(){return!this.isHidden&&this.isAttached&&this.isDirty?(0,i.showDialog)({title:this._trans.__("You have unsaved changes."),body:this._trans.__("Do you want to leave without saving?"),buttons:[i.Dialog.cancelButton({label:this._trans.__("Cancel")}),i.Dialog.okButton({label:this._trans.__("Ok")})]}).then((t=>{if(!t.button.accept)throw new Error("User canceled.")})):Promise.resolve(void 0)}dispose(){this.isDisposed||(super.dispose(),this._rawEditor.dispose())}onAfterAttach(t){this.update()}onUpdateRequest(t){const e=this._rawEditor;this._settings?(this.show(),e.show()):this.hide()}_onStateChanged(){this.stateChanged.emit(void 0)}}!function(t){t.onSaveError=function(t,e){const s=(e=e||r.nullTranslator).load("jupyterlab");console.error(`Saving setting editor value failed: ${t.message}`),(0,i.showErrorMessage)(s.__("Your changes were not saved."),t)}}(F||(F={}));const N={sizes:[1,3],container:{editor:"raw",plugin:"",sizes:[1,1]}};class O extends o.SplitPanel{constructor(t){super({orientation:"horizontal",renderer:o.SplitPanel.defaultRenderer,spacing:1}),this._fetching=null,this._saving=!1,this._state=u.JSONExt.deepCopy(N),this.translator=t.translator||r.nullTranslator,this.addClass("jp-SettingEditor"),this.key=t.key,this.state=t.state;const{commands:e,editorFactory:s,rendermime:i}=t,a=this.registry=t.registry,d=this._instructions=n.ReactWidget.create(l.createElement(v,{translator:this.translator}));d.addClass("jp-SettingEditorInstructions");const h=this._editor=new k({commands:e,editorFactory:s,registry:a,rendermime:i,translator:this.translator}),p=this._list=new c({confirm:()=>h.confirm(),registry:a,translator:this.translator}),g=t.when;g&&(this._when=Array.isArray(g)?Promise.all(g):g),this.addWidget(p),this.addWidget(d),o.SplitPanel.setStretch(p,0),o.SplitPanel.setStretch(d,1),o.SplitPanel.setStretch(h,1),h.stateChanged.connect(this._onStateChanged,this),p.changed.connect(this._onStateChanged,this),this.handleMoved.connect(this._onStateChanged,this)}get canRevertRaw(){return this._editor.raw.canRevert}get canSaveRaw(){return this._editor.raw.canSave}get commandsChanged(){return this._editor.raw.commandsChanged}get settings(){return this._editor.settings}get source(){return this._editor.raw.source}dispose(){this.isDisposed||(super.dispose(),this._editor.dispose(),this._instructions.dispose(),this._list.dispose())}revert(){this._editor.raw.revert()}save(){return this._editor.raw.save()}onAfterAttach(t){super.onAfterAttach(t),this.hide(),this._fetchState().then((()=>{this.show(),this._setState()})).catch((t=>{console.error("Fetching setting editor state failed",t),this.show(),this._setState()}))}onCloseRequest(t){this._editor.confirm().then((()=>{super.onCloseRequest(t),this.dispose()})).catch((()=>{}))}_fetchState(){if(this._fetching)return this._fetching;const{key:t,state:e}=this,s=[e.fetch(t),this._when];return this._fetching=Promise.all(s).then((([t])=>{this._fetching=null,this._saving||(this._state=M.normalizeState(t,this._state))}))}async _onStateChanged(){this._state.sizes=this.relativeSizes(),this._state.container=this._editor.state,this._state.container.plugin=this._list.selection;try{await this._saveState()}catch(t){console.error("Saving setting editor state failed",t)}this._setState()}async _saveState(){const{key:t,state:e}=this,s=this._state;this._saving=!0;try{await e.save(t,s),this._saving=!1}catch(t){throw this._saving=!1,t}}_setLayout(){const t=this._editor,e=this._state;t.state=e.container,requestAnimationFrame((()=>{this.setRelativeSizes(e.sizes)}))}_setState(){const t=this._editor,e=this._list,{container:s}=this._state;if(!s.plugin)return t.settings=null,e.selection="",void this._setLayout();if(t.settings&&t.settings.id===s.plugin)return void this._setLayout();const i=this._instructions;this.registry.load(s.plugin).then((r=>{i.isAttached&&(i.parent=null),t.isAttached||this.addWidget(t),t.settings=r,e.selection=s.plugin,this._setLayout()})).catch((i=>{console.error(`Loading ${s.plugin} settings failed.`,i),e.selection=this._state.container.plugin="",t.settings=null,this._setLayout()}))}}var M;!function(t){function e(t){return Array.isArray(t)&&t.every((t=>"number"==typeof t))}t.normalizeState=function(t,s){if(!t)return u.JSONExt.deepCopy(N);if("sizes"in t&&e(t.sizes)||(t.sizes=u.JSONExt.deepCopy(N.sizes)),!("container"in t))return t.container=u.JSONExt.deepCopy(N.container),t;const i="container"in t&&t.container&&"object"==typeof t.container?t.container:{};return t.container={plugin:"string"==typeof i.plugin?i.plugin:N.container.plugin,sizes:e(i.sizes)?i.sizes:u.JSONExt.deepCopy(N.container.sizes)},t}}(M||(M={}));var W=s(24758)},24758:(t,e,s)=>{s.d(e,{O:()=>r,g:()=>n});var i=s(20998);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."),n=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([[3466],{83466:(e,t,r)=>{r.r(t),r.d(t,{RunningLanguageServer:()=>_,default:()=>k});var n=r(59105),a=r(47005),s=r(80864),o=r(42539),i=r(70397),c=r(81997),l=r(20998),u=r(97934),m=r(78156),d=r.n(m),p=r(98244);const g="languageServers",h="configuration";function v(e){const{[h]:t,...r}=e.schema,{[h]:n,serverName:a,...s}=e.settings,[o,i]=(0,m.useState)(a),c={};Object.entries(n).forEach((([e,t])=>{const r={property:e,type:typeof t,value:t};c[l.UUID.uuid4()]=r}));const[g,v]=(0,m.useState)(c),E={};Object.entries(r).forEach((([e,t])=>{E[e]=e in s?s[e]:t.default}));const[S,y]=(0,m.useState)(E),b=t=>{const r={};Object.entries(g).forEach((([n,a])=>{n!==t&&(r[n]=a);const s={};Object.values(r).forEach((e=>{s[e.property]=e.value})),e.updateSetting.invoke(e.serverHash,{[h]:s}).catch(console.error),v(r)}))},j=new u.Debouncer(((t,r)=>{if(t in g){const n={...g,[t]:r},a={};Object.values(n).forEach((e=>{a[e.property]=e.value})),v(n),e.updateSetting.invoke(e.serverHash,{[h]:a}).catch(console.error)}})),_=(0,m.useRef)(p.DOMUtils.createDomID()+"-line-number-input");return d().createElement("div",{className:"array-item"},d().createElement("div",{className:"form-group "},d().createElement("div",{className:"jp-FormGroup-content"},d().createElement("div",{className:"jp-objectFieldWrapper"},d().createElement("fieldset",null,d().createElement("div",{className:"form-group small-field"},d().createElement("div",{className:"jp-modifiedIndicator jp-errorIndicator"}),d().createElement("div",{className:"jp-FormGroup-content"},d().createElement("label",{htmlFor:_.current,className:"jp-FormGroup-fieldLabel jp-FormGroup-contentItem"},e.trans.__("Server name:")),d().createElement("div",{className:"jp-inputFieldWrapper jp-FormGroup-contentItem"},d().createElement("input",{id:_.current,className:"form-control",type:"text",required:!0,value:o,onChange:t=>{(t=>{e.updateSetting.invoke(e.serverHash,{serverName:t.target.value}).catch(console.error),i(t.target.value)})(t)}})),d().createElement("div",{className:"validationErrors"},d().createElement("div",null,d().createElement("ul",{className:"error-detail bs-callout bs-callout-info"},d().createElement("li",{className:"text-danger"},e.trans.__("is a required property"))))))),Object.entries(r).map((([t,r],n)=>d().createElement("div",{key:`${n}-${t}`,className:"form-group small-field"},d().createElement("div",{className:"jp-FormGroup-content"},d().createElement("h3",{className:"jp-FormGroup-fieldLabel jp-FormGroup-contentItem"},r.title),d().createElement("div",{className:"jp-inputFieldWrapper jp-FormGroup-contentItem"},d().createElement("input",{className:"form-control",placeholder:"",type:r.type,value:S[t],onChange:n=>((t,r,n)=>{let a=r;"number"===n&&(a=parseFloat(r));const s={...S,[t]:a};e.updateSetting.invoke(e.serverHash,s).catch(console.error),y(s)})(t,n.target.value,r.type)})),d().createElement("div",{className:"jp-FormGroup-description"},r.description),d().createElement("div",{className:"validationErrors"}))))),d().createElement("fieldset",null,d().createElement("legend",null,t.title),Object.entries(g).map((([e,t])=>d().createElement(f,{key:e,hash:e,property:t,removeProperty:b,setProperty:j}))),d().createElement("span",null,t.description)))))),d().createElement("div",{className:"jp-ArrayOperations"},d().createElement("button",{className:"jp-mod-styled jp-mod-reject",onClick:()=>{const t=l.UUID.uuid4(),r={...g,[t]:{property:"",type:"string",value:""}},n={};Object.values(r).forEach((e=>{n[e.property]=e.value})),e.updateSetting.invoke(e.serverHash,{[h]:n}).catch(console.error),v(r)}},e.trans.__("Add property")),d().createElement("button",{className:"jp-mod-styled jp-mod-warn jp-FormGroup-removeButton",onClick:()=>e.removeSetting(e.serverHash)},e.trans.__("Remove server"))))}function f(e){const[t,r]=(0,m.useState)({...e.property}),n=(n,a)=>{let s=n;"number"===a&&(s=parseFloat(n));const o={...t,value:s};e.setProperty.invoke(e.hash,o).catch(console.error),r(o)};return d().createElement("div",{key:e.hash,className:"form-group small-field"},d().createElement("div",{className:"jp-FormGroup-content jp-LSPExtension-FormGroup-content"},d().createElement("input",{className:"form-control",type:"text",required:!0,placeholder:"Property name",value:t.property,onChange:n=>{(n=>{const a={...t,property:n};e.setProperty.invoke(e.hash,a).catch(console.error),r(a)})(n.target.value)}}),d().createElement("select",{className:"form-control",value:t.type,onChange:n=>(n=>{let a;a="boolean"!==n&&("number"===n?0:"");const s={...t,type:n,value:a};r(s),e.setProperty.invoke(e.hash,s).catch(console.error)})(n.target.value)},d().createElement("option",{value:"string"},"String"),d().createElement("option",{value:"number"},"Number"),d().createElement("option",{value:"boolean"},"Boolean")),d().createElement("input",{className:"form-control",type:{string:"text",number:"number",boolean:"checkbox"}[t.type],required:!1,placeholder:"Property value",value:"boolean"!==t.type?t.value:void 0,checked:"boolean"===t.type?t.value:void 0,onChange:"boolean"!==t.type?e=>n(e.target.value,t.type):e=>n(e.target.checked,t.type)}),d().createElement("button",{className:"jp-mod-minimal jp-Button",onClick:()=>{e.removeProperty(e.hash)}},d().createElement(i.closeIcon.react,null))))}class E extends d().Component{constructor(e){super(e),this.removeSetting=e=>{if(e in this.state.items){const t={};for(const r in this.state.items)r!==e&&(t[r]=this.state.items[r]);this.setState((e=>({...e,items:t})),(()=>{this.saveServerSetting()}))}},this.updateSetting=(e,t)=>{if(e in this.state.items){const r={};for(const n in this.state.items)r[n]=n===e?{...this.state.items[n],...t}:this.state.items[n];this.setState((e=>({...e,items:r})),(()=>{this.saveServerSetting()}))}},this.addServerSetting=()=>{let e=0,t="newKey";for(;Object.values(this.state.items).map((e=>e.serverName)).includes(t);)e+=1,t=`newKey-${e}`;this.setState((e=>({...e,items:{...e.items,[l.UUID.uuid4()]:{...this._defaultSetting,serverName:t}}})),(()=>{this.saveServerSetting()}))},this.saveServerSetting=()=>{const e={};Object.values(this.state.items).forEach((t=>{const{serverName:r,...n}=t;e[r]=n})),this._setting.set(g,e).catch(console.error)},this._setting=e.formContext.settings,this._trans=e.translator.load("jupyterlab");const t=this._setting.schema.definitions;this._defaultSetting=t.languageServer.default,this._schema=t.languageServer.properties;const r=e.schema.title,n=e.schema.description,a=e.formContext.settings.get(g).composite;let s={};a&&Object.entries(a).forEach((([e,t])=>{if(t){const r=l.UUID.uuid4();s[r]={serverName:e,...t}}})),this.state={title:r,desc:n,items:s},this._debouncedUpdateSetting=new u.Debouncer(this.updateSetting.bind(this))}render(){return d().createElement("div",null,d().createElement("fieldset",null,d().createElement("legend",null,this.state.title),d().createElement("p",{className:"field-description"},this.state.desc),d().createElement("div",{className:"field field-array field-array-of-object"},Object.entries(this.state.items).map((([e,t],r)=>d().createElement(v,{key:`${r}-${e}`,trans:this._trans,removeSetting:this.removeSetting,updateSetting:this._debouncedUpdateSetting,serverHash:e,settings:t,schema:this._schema})))),d().createElement("div",null,d().createElement("button",{style:{margin:2},className:"jp-mod-styled jp-mod-reject",onClick:this.addServerSetting},this._trans.__("Add server")))))}}const S={activate:function(e,t,r,a){const s=new n.LanguageServerManager({settings:e.serviceManager.serverSettings}),o=new n.DocumentConnectionManager({languageServerManager:s,adapterTracker:r});return a&&function(e,t,r){const n=r.load("jupyterlab"),a=new c.Signal(t);t.connected.connect((()=>a.emit(t))),t.disconnected.connect((()=>a.emit(t))),t.closed.connect((()=>a.emit(t))),t.documentsChanged.connect((()=>a.emit(t)));let s=[];e.add({name:n.__("Language servers"),running:()=>{const e=new Set([...t.connections.values()]);return s=[...e].map((e=>new _(e,t))),s},shutdownAll:()=>{s.forEach((e=>{e.shutdown()}))},refreshRunning:()=>{},runningChanged:a,shutdownLabel:n.__("Shut Down"),shutdownAllLabel:n.__("Shut Down All"),shutdownAllConfirmationText:n.__("Are you sure you want to permanently shut down all running language servers?")})}(a,o,t),o},id:"@jupyterlab/lsp-extension:plugin",description:"Provides the language server connection manager.",requires:[o.ITranslator,n.IWidgetLSPAdapterTracker],optional:[a.IRunningSessionManagers],provides:n.ILSPDocumentConnectionManager,autoStart:!0},y={id:"@jupyterlab/lsp-extension:feature",description:"Provides the language server feature manager.",activate:()=>new n.FeatureManager,provides:n.ILSPFeatureManager,autoStart:!0},b={activate:function(e,t,r,n,a){const s="languageServers",o=t.languageServerManager,i=e=>{const r=e.composite,n=r.languageServers||{};if("on"!==r.activate||o.isEnabled){if("off"===r.activate&&o.isEnabled)return void o.disable()}else o.enable().catch(console.error);t.initialConfigurations=n,t.updateConfiguration(n),t.updateServerConfigurations(n),t.updateLogging(r.logAllCommunication,r.setTrace)};if(r.transform(S.id,{fetch:e=>{const t=e.schema.properties,r={};return o.sessions.forEach(((e,t)=>{r[t]={rank:50,configuration:{}}})),t[s].default=r,e},compose:e=>{const t=e.schema.properties,r=e.data.user,n=t[s].default,a=r[s];let o={...n};a&&(o={...o,...a});const i={[s]:o};return Object.entries(t).forEach((([e,t])=>{e!==s&&(i[e]=e in r?r[e]:t.default)})),e.data.composite=i,e}}),o.sessionsChanged.connect((async()=>{await r.load(S.id,!0)})),r.load(S.id).then((e=>{i(e),e.changed.connect((()=>{i(e)})),o.disable()})).catch((e=>{console.error(e.message)})),a){const e={fieldRenderer:e=>function(e,t){return d().createElement(E,{...e,translator:t})}(e,n)};a.addRenderer(`${S.id}.${s}`,e)}},id:"@jupyterlab/lsp-extension:settings",description:"Provides the language server settings.",requires:[n.ILSPDocumentConnectionManager,s.ISettingRegistry,o.ITranslator],optional:[i.IFormRendererRegistry],autoStart:!0},j={id:n.ILSPCodeExtractorsManager.name,description:"Provides the code extractor manager.",activate:e=>{const t=new n.CodeExtractorsManager,r=new n.TextForeignCodeExtractor({language:"markdown",isStandalone:!1,file_extension:"md",cellType:["markdown"]});t.register(r,null);const a=new n.TextForeignCodeExtractor({language:"text",isStandalone:!1,file_extension:"txt",cellType:["raw"]});return t.register(a,null),t},provides:n.ILSPCodeExtractorsManager,autoStart:!0};class _{constructor(e,t){this._connection=new WeakSet([e]),this._manager=t,this._serverIdentifier=e.serverIdentifier,this._serverLanguage=e.serverLanguage}open(){}icon(){return i.pythonIcon}label(){var e,t;return`${null!==(e=this._serverIdentifier)&&void 0!==e?e:""} (${null!==(t=this._serverLanguage)&&void 0!==t?t:""})`}shutdown(){for(const[e,t]of this._manager.connections.entries())if(this._connection.has(t)){const{uri:t}=this._manager.documents.get(e);this._manager.unregisterDocument(t)}this._manager.disconnect(this._serverIdentifier)}}const N={id:"@jupyterlab/lsp-extension:tracker",description:"Provides the tracker of `WidgetLSPAdapter`.",autoStart:!0,provides:n.IWidgetLSPAdapterTracker,activate:e=>new n.WidgetLSPAdapterTracker({shell:e.shell})},k=[S,y,b,j,N]}}]);
1
+ "use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3466],{83466:(e,t,r)=>{r.r(t),r.d(t,{RunningLanguageServer:()=>_,default:()=>k});var n=r(94358),a=r(17173),s=r(6312),o=r(11523),i=r(52018),c=r(81997),l=r(20998),u=r(97934),m=r(78156),d=r.n(m),p=r(57797);const g="languageServers",h="configuration";function v(e){const{[h]:t,...r}=e.schema,{[h]:n,serverName:a,...s}=e.settings,[o,i]=(0,m.useState)(a),c={};Object.entries(n).forEach((([e,t])=>{const r={property:e,type:typeof t,value:t};c[l.UUID.uuid4()]=r}));const[g,v]=(0,m.useState)(c),E={};Object.entries(r).forEach((([e,t])=>{E[e]=e in s?s[e]:t.default}));const[S,y]=(0,m.useState)(E),b=t=>{const r={};Object.entries(g).forEach((([n,a])=>{n!==t&&(r[n]=a);const s={};Object.values(r).forEach((e=>{s[e.property]=e.value})),e.updateSetting.invoke(e.serverHash,{[h]:s}).catch(console.error),v(r)}))},j=new u.Debouncer(((t,r)=>{if(t in g){const n={...g,[t]:r},a={};Object.values(n).forEach((e=>{a[e.property]=e.value})),v(n),e.updateSetting.invoke(e.serverHash,{[h]:a}).catch(console.error)}})),_=(0,m.useRef)(p.DOMUtils.createDomID()+"-line-number-input");return d().createElement("div",{className:"array-item"},d().createElement("div",{className:"form-group "},d().createElement("div",{className:"jp-FormGroup-content"},d().createElement("div",{className:"jp-objectFieldWrapper"},d().createElement("fieldset",null,d().createElement("div",{className:"form-group small-field"},d().createElement("div",{className:"jp-modifiedIndicator jp-errorIndicator"}),d().createElement("div",{className:"jp-FormGroup-content"},d().createElement("label",{htmlFor:_.current,className:"jp-FormGroup-fieldLabel jp-FormGroup-contentItem"},e.trans.__("Server name:")),d().createElement("div",{className:"jp-inputFieldWrapper jp-FormGroup-contentItem"},d().createElement("input",{id:_.current,className:"form-control",type:"text",required:!0,value:o,onChange:t=>{(t=>{e.updateSetting.invoke(e.serverHash,{serverName:t.target.value}).catch(console.error),i(t.target.value)})(t)}})),d().createElement("div",{className:"validationErrors"},d().createElement("div",null,d().createElement("ul",{className:"error-detail bs-callout bs-callout-info"},d().createElement("li",{className:"text-danger"},e.trans.__("is a required property"))))))),Object.entries(r).map((([t,r],n)=>d().createElement("div",{key:`${n}-${t}`,className:"form-group small-field"},d().createElement("div",{className:"jp-FormGroup-content"},d().createElement("h3",{className:"jp-FormGroup-fieldLabel jp-FormGroup-contentItem"},r.title),d().createElement("div",{className:"jp-inputFieldWrapper jp-FormGroup-contentItem"},d().createElement("input",{className:"form-control",placeholder:"",type:r.type,value:S[t],onChange:n=>((t,r,n)=>{let a=r;"number"===n&&(a=parseFloat(r));const s={...S,[t]:a};e.updateSetting.invoke(e.serverHash,s).catch(console.error),y(s)})(t,n.target.value,r.type)})),d().createElement("div",{className:"jp-FormGroup-description"},r.description),d().createElement("div",{className:"validationErrors"}))))),d().createElement("fieldset",null,d().createElement("legend",null,t.title),Object.entries(g).map((([e,t])=>d().createElement(f,{key:e,hash:e,property:t,removeProperty:b,setProperty:j}))),d().createElement("span",null,t.description)))))),d().createElement("div",{className:"jp-ArrayOperations"},d().createElement("button",{className:"jp-mod-styled jp-mod-reject",onClick:()=>{const t=l.UUID.uuid4(),r={...g,[t]:{property:"",type:"string",value:""}},n={};Object.values(r).forEach((e=>{n[e.property]=e.value})),e.updateSetting.invoke(e.serverHash,{[h]:n}).catch(console.error),v(r)}},e.trans.__("Add property")),d().createElement("button",{className:"jp-mod-styled jp-mod-warn jp-FormGroup-removeButton",onClick:()=>e.removeSetting(e.serverHash)},e.trans.__("Remove server"))))}function f(e){const[t,r]=(0,m.useState)({...e.property}),n=(n,a)=>{let s=n;"number"===a&&(s=parseFloat(n));const o={...t,value:s};e.setProperty.invoke(e.hash,o).catch(console.error),r(o)};return d().createElement("div",{key:e.hash,className:"form-group small-field"},d().createElement("div",{className:"jp-FormGroup-content jp-LSPExtension-FormGroup-content"},d().createElement("input",{className:"form-control",type:"text",required:!0,placeholder:"Property name",value:t.property,onChange:n=>{(n=>{const a={...t,property:n};e.setProperty.invoke(e.hash,a).catch(console.error),r(a)})(n.target.value)}}),d().createElement("select",{className:"form-control",value:t.type,onChange:n=>(n=>{let a;a="boolean"!==n&&("number"===n?0:"");const s={...t,type:n,value:a};r(s),e.setProperty.invoke(e.hash,s).catch(console.error)})(n.target.value)},d().createElement("option",{value:"string"},"String"),d().createElement("option",{value:"number"},"Number"),d().createElement("option",{value:"boolean"},"Boolean")),d().createElement("input",{className:"form-control",type:{string:"text",number:"number",boolean:"checkbox"}[t.type],required:!1,placeholder:"Property value",value:"boolean"!==t.type?t.value:void 0,checked:"boolean"===t.type?t.value:void 0,onChange:"boolean"!==t.type?e=>n(e.target.value,t.type):e=>n(e.target.checked,t.type)}),d().createElement("button",{className:"jp-mod-minimal jp-Button",onClick:()=>{e.removeProperty(e.hash)}},d().createElement(i.closeIcon.react,null))))}class E extends d().Component{constructor(e){super(e),this.removeSetting=e=>{if(e in this.state.items){const t={};for(const r in this.state.items)r!==e&&(t[r]=this.state.items[r]);this.setState((e=>({...e,items:t})),(()=>{this.saveServerSetting()}))}},this.updateSetting=(e,t)=>{if(e in this.state.items){const r={};for(const n in this.state.items)r[n]=n===e?{...this.state.items[n],...t}:this.state.items[n];this.setState((e=>({...e,items:r})),(()=>{this.saveServerSetting()}))}},this.addServerSetting=()=>{let e=0,t="newKey";for(;Object.values(this.state.items).map((e=>e.serverName)).includes(t);)e+=1,t=`newKey-${e}`;this.setState((e=>({...e,items:{...e.items,[l.UUID.uuid4()]:{...this._defaultSetting,serverName:t}}})),(()=>{this.saveServerSetting()}))},this.saveServerSetting=()=>{const e={};Object.values(this.state.items).forEach((t=>{const{serverName:r,...n}=t;e[r]=n})),this._setting.set(g,e).catch(console.error)},this._setting=e.formContext.settings,this._trans=e.translator.load("jupyterlab");const t=this._setting.schema.definitions;this._defaultSetting=t.languageServer.default,this._schema=t.languageServer.properties;const r=e.schema.title,n=e.schema.description,a=e.formContext.settings.get(g).composite;let s={};a&&Object.entries(a).forEach((([e,t])=>{if(t){const r=l.UUID.uuid4();s[r]={serverName:e,...t}}})),this.state={title:r,desc:n,items:s},this._debouncedUpdateSetting=new u.Debouncer(this.updateSetting.bind(this))}render(){return d().createElement("div",null,d().createElement("fieldset",null,d().createElement("legend",null,this.state.title),d().createElement("p",{className:"field-description"},this.state.desc),d().createElement("div",{className:"field field-array field-array-of-object"},Object.entries(this.state.items).map((([e,t],r)=>d().createElement(v,{key:`${r}-${e}`,trans:this._trans,removeSetting:this.removeSetting,updateSetting:this._debouncedUpdateSetting,serverHash:e,settings:t,schema:this._schema})))),d().createElement("div",null,d().createElement("button",{style:{margin:2},className:"jp-mod-styled jp-mod-reject",onClick:this.addServerSetting},this._trans.__("Add server")))))}}const S={activate:function(e,t,r,a){const s=new n.LanguageServerManager({settings:e.serviceManager.serverSettings}),o=new n.DocumentConnectionManager({languageServerManager:s,adapterTracker:r});return a&&function(e,t,r){const n=r.load("jupyterlab"),a=new c.Signal(t);t.connected.connect((()=>a.emit(t))),t.disconnected.connect((()=>a.emit(t))),t.closed.connect((()=>a.emit(t))),t.documentsChanged.connect((()=>a.emit(t)));let s=[];e.add({name:n.__("Language servers"),running:()=>{const e=new Set([...t.connections.values()]);return s=[...e].map((e=>new _(e,t))),s},shutdownAll:()=>{s.forEach((e=>{e.shutdown()}))},refreshRunning:()=>{},runningChanged:a,shutdownLabel:n.__("Shut Down"),shutdownAllLabel:n.__("Shut Down All"),shutdownAllConfirmationText:n.__("Are you sure you want to permanently shut down all running language servers?")})}(a,o,t),o},id:"@jupyterlab/lsp-extension:plugin",description:"Provides the language server connection manager.",requires:[o.ITranslator,n.IWidgetLSPAdapterTracker],optional:[a.IRunningSessionManagers],provides:n.ILSPDocumentConnectionManager,autoStart:!0},y={id:"@jupyterlab/lsp-extension:feature",description:"Provides the language server feature manager.",activate:()=>new n.FeatureManager,provides:n.ILSPFeatureManager,autoStart:!0},b={activate:function(e,t,r,n,a){const s="languageServers",o=t.languageServerManager,i=e=>{const r=e.composite,n=r.languageServers||{};if("on"!==r.activate||o.isEnabled){if("off"===r.activate&&o.isEnabled)return void o.disable()}else o.enable().catch(console.error);t.initialConfigurations=n,t.updateConfiguration(n),t.updateServerConfigurations(n),t.updateLogging(r.logAllCommunication,r.setTrace)};if(r.transform(S.id,{fetch:e=>{const t=e.schema.properties,r={};return o.sessions.forEach(((e,t)=>{r[t]={rank:50,configuration:{}}})),t[s].default=r,e},compose:e=>{const t=e.schema.properties,r=e.data.user,n=t[s].default,a=r[s];let o={...n};a&&(o={...o,...a});const i={[s]:o};return Object.entries(t).forEach((([e,t])=>{e!==s&&(i[e]=e in r?r[e]:t.default)})),e.data.composite=i,e}}),o.sessionsChanged.connect((async()=>{await r.load(S.id,!0)})),r.load(S.id).then((e=>{i(e),e.changed.connect((()=>{i(e)})),o.disable()})).catch((e=>{console.error(e.message)})),a){const e={fieldRenderer:e=>function(e,t){return d().createElement(E,{...e,translator:t})}(e,n)};a.addRenderer(`${S.id}.${s}`,e)}},id:"@jupyterlab/lsp-extension:settings",description:"Provides the language server settings.",requires:[n.ILSPDocumentConnectionManager,s.ISettingRegistry,o.ITranslator],optional:[i.IFormRendererRegistry],autoStart:!0},j={id:n.ILSPCodeExtractorsManager.name,description:"Provides the code extractor manager.",activate:e=>{const t=new n.CodeExtractorsManager,r=new n.TextForeignCodeExtractor({language:"markdown",isStandalone:!1,file_extension:"md",cellType:["markdown"]});t.register(r,null);const a=new n.TextForeignCodeExtractor({language:"text",isStandalone:!1,file_extension:"txt",cellType:["raw"]});return t.register(a,null),t},provides:n.ILSPCodeExtractorsManager,autoStart:!0};class _{constructor(e,t){this._connection=new WeakSet([e]),this._manager=t,this._serverIdentifier=e.serverIdentifier,this._serverLanguage=e.serverLanguage}open(){}icon(){return i.pythonIcon}label(){var e,t;return`${null!==(e=this._serverIdentifier)&&void 0!==e?e:""} (${null!==(t=this._serverLanguage)&&void 0!==t?t:""})`}shutdown(){for(const[e,t]of this._manager.connections.entries())if(this._connection.has(t)){const{uri:t}=this._manager.documents.get(e);this._manager.unregisterDocument(t)}this._manager.disconnect(this._serverIdentifier)}}const N={id:"@jupyterlab/lsp-extension:tracker",description:"Provides the tracker of `WidgetLSPAdapter`.",autoStart:!0,provides:n.IWidgetLSPAdapterTracker,activate:e=>new n.WidgetLSPAdapterTracker({shell:e.shell})},k=[S,y,b,j,N]}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3488],{79580:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},69746:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=r[t];return e&&(e.indexOf?e:e.s.concat(e.f))},d=function(t,e){var n,i=r.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[s,function(t){this.afternoon=d(t,!1)}],a:[s,function(t){this.afternoon=d(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[s,function(t){var e=r.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[s,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function h(n){var i,s;i=n,s=r&&r.formats;for(var a=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c<o;c+=1){var l=a[c],d=u[l],h=d&&d[0],f=d&&d[1];a[c]=f?{regex:h,parser:f}:l.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,i=0;n<o;n+=1){var s=a[n];if("string"==typeof s)i+=s.length;else{var r=s.regex,c=s.parser,l=t.slice(i),d=r.exec(l)[0];c.call(e,d),t=t.replace(d,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var i=e.prototype,s=i.parse;i.parse=function(t){var e=t.date,i=t.utc,a=t.args;this.$u=i;var o=a[1];if("string"==typeof o){var c=!0===a[2],l=!0===a[3],d=c||l,u=a[2];l&&(u=a[2]),r=this.$locale(),!c&&u&&(r=n.Ls[u]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var i=h(e)(t),s=i.year,r=i.month,a=i.day,o=i.hours,c=i.minutes,l=i.seconds,d=i.milliseconds,u=i.zone,f=new Date,y=a||(s||r?1:f.getDate()),m=s||f.getFullYear(),k=0;s&&!r||(k=r>0?r-1:f.getMonth());var p=o||0,g=c||0,b=l||0,T=d||0;return u?new Date(Date.UTC(m,k,y,p,g,b,T+60*u.offset*1e3)):n?new Date(Date.UTC(m,k,y,p,g,b,T)):new Date(m,k,y,p,g,b,T)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),r={}}else if(o instanceof Array)for(var f=o.length,y=1;y<=f;y+=1){a[1]=o[y-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}y===f&&(this.$d=new Date(""))}else s.call(this,t)}}}()},57635:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},63488:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>tt});var i=n(7608),s=n(27693),r=n.n(s),a=n(57635),o=n.n(a),c=n(69746),l=n.n(c),d=n(79580),u=n.n(d),h=n(24028),f=n(23617),y=(n(86599),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],i=[1,26],s=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,9],d=[1,10],u=[1,11],h=[1,12],f=[1,13],y=[1,14],m=[1,15],k=[1,16],p=[1,18],g=[1,19],b=[1,20],T=[1,21],x=[1,22],v=[1,24],_=[1,32],w={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 16:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 17:i.TopAxis(),this.$=r[o].substr(8);break;case 18:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 19:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 20:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 21:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 22:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 24:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 25:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 28:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 30:i.addTask(r[o-1],r[o]),this.$="task";break;case 31:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 32:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 33:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 34:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 36:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 37:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 38:case 44:this.$=r[o-1]+" "+r[o];break;case 39:case 40:case 42:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 41:case 43:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:T,33:x,34:23,35:v,37:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:T,33:x,34:23,35:v,37:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=[0],n=[],i=[null],s=[],r=this.table,a="",o=0,c=0,l=s.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(u.yy[h]=this.yy[h]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var y=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,k,p,g,b,T,x,v,_,w={};;){if(k=e[e.length-1],this.defaultActions[k]?p=this.defaultActions[k]:(null==m&&(_=void 0,"number"!=typeof(_=n.pop()||d.lex()||1)&&(_ instanceof Array&&(_=(n=_).pop()),_=this.symbols_[_]||_),m=_),p=r[k]&&r[k][m]),void 0===p||!p.length||!p[0]){var $;for(b in v=[],r[k])this.terminals_[b]&&b>2&&v.push("'"+this.terminals_[b]+"'");$=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:v})}if(p[0]instanceof Array&&p.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(p[0]){case 1:e.push(m),i.push(d.yytext),s.push(d.yylloc),e.push(p[1]),m=null,c=d.yyleng,a=d.yytext,o=d.yylineno,f=d.yylloc;break;case 2:if(T=this.productions_[p[1]][1],w.$=i[i.length-T],w._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},y&&(w._$.range=[s[s.length-(T||1)].range[0],s[s.length-1].range[1]]),void 0!==(g=this.performAction.apply(w,[a,c,o,u.yy,p[1],i,s].concat(l))))return g;T&&(e=e.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),e.push(this.productions_[p[1]][0]),i.push(w.$),s.push(w._$),x=r[e[e.length-2]][e[e.length-1]],e.push(x);break;case 3:return!0}}return!0}},$={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 16:case 19:case 22:case 25:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:case 14:break;case 11:return 10;case 15:this.begin("href");break;case 17:return 40;case 18:this.begin("callbackname");break;case 20:this.popState(),this.begin("callbackargs");break;case 21:return 38;case 23:return 39;case 24:this.begin("click");break;case 26:return 37;case 27:return 4;case 28:return 19;case 29:return 20;case 30:return 21;case 31:return 22;case 32:return 23;case 33:return 25;case 34:return 24;case 35:return 26;case 36:return 12;case 37:return 13;case 38:return 14;case 39:return 15;case 40:return 16;case 41:return 17;case 42:return 18;case 43:return"date";case 44:return 27;case 45:return"accDescription";case 46:return 33;case 47:return 35;case 48:return 36;case 49:return":";case 50:return 6;case 51:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[22,23],inclusive:!1},callbackname:{rules:[19,20,21],inclusive:!1},href:{rules:[16,17],inclusive:!1},click:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,18,24,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};function D(){this.yy={}}return w.lexer=$,D.prototype=w,w.Parser=D,new D}());y.parser=y;const m=y;r().extend(o()),r().extend(l()),r().extend(u());let k,p="",g="",b="",T=[],x=[],v={},_=[],w=[],$="",D="";const C=["active","done","crit","milestone"];let S=[],E=!1,Y=!1,M="sunday",A=0;const L=function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&n.includes("weekends"))||!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim())))},O=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,a;s=t.startTime instanceof Date?r()(t.startTime):r()(t.startTime,e,!0),s=s.add(1,"d"),a=t.endTime instanceof Date?r()(t.endTime):r()(t.endTime,e,!0);const[o,c]=I(s,a,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},I=function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=L(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},F=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==i){let t=null;if(i[1].split(" ").forEach((function(e){let n=Z(e);void 0!==n&&(t?n.endTime>t.endTime&&(t=n):t=n)})),t)return t.endTime;{const t=new Date;return t.setHours(0,0,0,0),t}}let s=r()(n,e.trim(),!0);if(s.isValid())return s.toDate();{h.l.debug("Invalid date:"+n),h.l.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},W=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},P=function(t,e,n,i=!1){n=n.trim();let s=r()(n,e.trim(),!0);if(s.isValid())return i&&(s=s.add(1,"d")),s.toDate();let a=r()(t);const[o,c]=W(n);if(!Number.isNaN(o)){const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()};let B=0;const z=function(t){return void 0===t?(B+=1,"task"+B):t};let N,H,j=[];const U={},Z=function(t){const e=U[t];return j[e]},G=function(){const t=function(t){const e=j[t];let n="";switch(j[t].raw.startTime.type){case"prevTaskEnd":{const t=Z(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=F(0,p,j[t].raw.startTime.startData),n&&(j[t].startTime=n)}return j[t].startTime&&(j[t].endTime=P(j[t].startTime,p,j[t].raw.endTime.data,E),j[t].endTime&&(j[t].processed=!0,j[t].manualEndTime=r()(j[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),O(j[t],p,x,T))),j[t].processed};let e=!0;for(const[n,i]of j.entries())t(n),e=e&&i.processed;return e},R=function(t,e){t.split(",").forEach((function(t){let n=Z(t);void 0!==n&&n.classes.push(e)}))},V=function(t,e){S.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))},q={getConfig:()=>(0,h.c)().gantt,clear:function(){_=[],w=[],$="",S=[],B=0,N=void 0,H=void 0,j=[],p="",g="",D="",k=void 0,b="",T=[],x=[],E=!1,Y=!1,A=0,v={},(0,h.t)(),M="sunday"},setDateFormat:function(t){p=t},getDateFormat:function(){return p},enableInclusiveEndDates:function(){E=!0},endDatesAreInclusive:function(){return E},enableTopAxis:function(){Y=!0},topAxisEnabled:function(){return Y},setAxisFormat:function(t){g=t},getAxisFormat:function(){return g},setTickInterval:function(t){k=t},getTickInterval:function(){return k},setTodayMarker:function(t){b=t},getTodayMarker:function(){return b},setAccTitle:h.s,getAccTitle:h.g,setDiagramTitle:h.q,getDiagramTitle:h.r,setDisplayMode:function(t){D=t},getDisplayMode:function(){return D},setAccDescription:h.b,getAccDescription:h.a,addSection:function(t){$=t,_.push(t)},getSections:function(){return _},getTasks:function(){let t=G(),e=0;for(;!t&&e<10;)t=G(),e++;return w=j,w},addTask:function(t,e){const n={section:$,type:$,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};X(i,s,C);for(let t=0;t<i.length;t++)i[t]=i[t].trim();switch(i.length){case 1:s.id=z(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:i[0]};break;case 2:s.id=z(),s.startTime={type:"getStartDate",startData:i[0]},s.endTime={data:i[1]};break;case 3:s.id=z(i[0]),s.startTime={type:"getStartDate",startData:i[1]},s.endTime={data:i[2]}}return s}(H,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=H,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.order=A,A++;const s=j.push(n);H=n.id,U[n.id]=s-1},findTaskById:Z,addTaskOrg:function(t,e){const n={section:$,type:$,description:t,task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};X(i,s,C);for(let t=0;t<i.length;t++)i[t]=i[t].trim();let a="";switch(i.length){case 1:s.id=z(),s.startTime=t.endTime,a=i[0];break;case 2:s.id=z(),s.startTime=F(0,p,i[0]),a=i[1];break;case 3:s.id=z(i[0]),s.startTime=F(0,p,i[1]),a=i[2]}return a&&(s.endTime=P(s.startTime,p,a,E),s.manualEndTime=r()(a,"YYYY-MM-DD",!0).isValid(),O(s,p,x,T)),s}(N,e);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,N=n,w.push(n)},setIncludes:function(t){T=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return T},setExcludes:function(t){x=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return x},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"!==(0,h.c)().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),void 0!==Z(t)&&V(t,(()=>{h.u.runFunc(e,...i)}))}(t,e,n)})),R(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==(0,h.c)().securityLevel&&(n=(0,i.Nm)(e)),t.split(",").forEach((function(t){void 0!==Z(t)&&(V(t,(()=>{window.open(n,"_self")})),v[t]=n)})),R(t,"clickable")},getLinks:function(){return v},bindFunctions:function(t){S.forEach((function(e){e(t)}))},parseDuration:W,isInvalidDate:L,setWeekday:function(t){M=t},getWeekday:function(){return M}};function X(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}const Q={monday:f.Ox9,tuesday:f.YDX,wednesday:f.EFj,thursday:f.Igq,friday:f.y2j,saturday:f.LqH,sunday:f.Zyz},J=(t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const t of i)for(let i=0;i<n.length;i++)if(t.startTime>=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s};let K;const tt={parser:m,db:q,renderer:{setConf:function(){h.l.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const s=(0,h.c)().gantt,a=(0,h.c)().securityLevel;let o;"sandbox"===a&&(o=(0,f.Ys)("#i"+e));const c="sandbox"===a?(0,f.Ys)(o.nodes()[0].contentDocument.body):(0,f.Ys)("body"),l="sandbox"===a?o.nodes()[0].contentDocument:document,d=l.getElementById(e);K=d.parentElement.offsetWidth,void 0===K&&(K=1200),void 0!==s.useWidth&&(K=s.useWidth);const u=i.db.getTasks();let y=[];for(const t of u)y.push(t.type);y=function(t){const e={},n=[];for(let i=0,s=t.length;i<s;++i)Object.prototype.hasOwnProperty.call(e,t[i])||(e[t[i]]=!0,n.push(t[i]));return n}(y);const m={};let k=2*s.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===s.displayMode){const t={};for(const e of u)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=J(t[n],e)+1;e+=i,k+=i*(s.barHeight+s.barGap),m[n]=i}}else{k+=u.length*(s.barHeight+s.barGap);for(const t of y)m[t]=u.filter((e=>e.type===t)).length}d.setAttribute("viewBox","0 0 "+K+" "+k);const p=c.select(`[id="${e}"]`),g=(0,f.Xf)().domain([(0,f.VV$)(u,(function(t){return t.startTime})),(0,f.Fp7)(u,(function(t){return t.endTime}))]).rangeRound([0,K-s.leftPadding-s.rightPadding]);u.sort((function(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:n<i&&(s=-1),s})),function(t,n,a){const o=s.barHeight,c=o+s.barGap,d=s.topPadding,u=s.leftPadding;(0,f.BYU)().domain([0,y.length]).range(["#00B9FA","#F95002"]).interpolate(f.JHv),function(t,e,n,a,o,c,l,d){if(0===l.length&&0===d.length)return;let u,f;for(const{startTime:t,endTime:e}of c)(void 0===u||t<u)&&(u=t),(void 0===f||e>f)&&(f=e);if(!u||!f)return;if(r()(f).diff(r()(u),"year")>5)return void h.l.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),m=[];let k=null,b=r()(u);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,l,d)?k?k.end=b:k={start:b,end:b}:k&&(m.push(k),k=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",s.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",o-e-s.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*o).toString()+"px"})).attr("class","exclude-range")}(c,d,u,0,a,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,r){let a=(0,f.LLu)(g).tickSize(-r+e+s.gridLineStartPadding).tickFormat((0,f.i$Z)(i.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||s.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||s.weekday;switch(e){case"millisecond":a.ticks(f.U8T.every(t));break;case"second":a.ticks(f.S1K.every(t));break;case"minute":a.ticks(f.Z_i.every(t));break;case"hour":a.ticks(f.WQD.every(t));break;case"day":a.ticks(f.rr1.every(t));break;case"week":a.ticks(Q[n].every(t));break;case"month":a.ticks(f.F0B.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||s.topAxis){let n=(0,f.F5q)(g).tickSize(-r+e+s.gridLineStartPadding).tickFormat((0,f.i$Z)(i.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],r=i.db.getWeekday()||s.weekday;switch(e){case"millisecond":n.ticks(f.U8T.every(t));break;case"second":n.ticks(f.S1K.every(t));break;case"minute":n.ticks(f.Z_i.every(t));break;case"hour":n.ticks(f.WQD.every(t));break;case"day":n.ticks(f.rr1.every(t));break;case"week":n.ticks(Q[r].every(t));break;case"month":n.ticks(f.F0B.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(u,d,0,a),function(t,n,r,a,o,c,l){const d=[...new Set(t.map((t=>t.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(d).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+r-2})).attr("width",(function(){return l-s.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%s.numberSectionStyles;return"section section0"}));const u=p.append("g").selectAll("rect").data(t).enter(),m=i.db.getLinks();if(u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))-.5*o:g(t.startTime)+a})).attr("y",(function(t,e){return t.order*n+r})).attr("width",(function(t){return t.milestone?o:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+r+.5*o).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of y.entries())t.type===i&&(n=e%s.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,i+=" "+e,"task"+i})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",s.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*o),t.milestone&&(n=e+o);const i=this.getBBox().width;return i>n-e?n+i+1.5*s.leftPadding>l?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,e){return t.order*n+s.barHeight/2+(s.fontSize/2-2)+r})).attr("text-height",o).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+o);const i=this.getBBox().width;let r="";t.classes.length>0&&(r=t.classes.join(" "));let a=0;for(const[e,n]of y.entries())t.type===n&&(a=e%s.numberSectionStyles);let c="";return t.active&&(c=t.crit?"activeCritText"+a:"activeText"+a),t.done?c=t.crit?c+" doneCritText"+a:c+" doneText"+a:t.crit&&(c=c+" critText"+a),t.milestone&&(c+=" milestoneText"),i>n-e?n+i+1.5*s.leftPadding>l?r+" taskTextOutsideLeft taskTextOutside"+a+" "+c:r+" taskTextOutsideRight taskTextOutside"+a+" "+c+" width-"+i:r+" taskText taskText"+a+" "+c+" width-"+i})),"sandbox"===(0,h.c)().securityLevel){let t;t=(0,f.Ys)("#i"+e);const n=t.nodes()[0].contentDocument;u.filter((function(t){return void 0!==m[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",m[t.id]),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}(t,c,d,u,o,0,n),function(t,e){let n=0;const i=Object.keys(m).map((t=>[t,m[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(h.e.lineBreakRegex),n=-(e.length-1)/2,i=l.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=l.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a<r;a++)return n+=i[r-1][1],s[1]*t/2+n*t+e})).attr("font-size",s.sectionFontSize).attr("class",(function(t){for(const[e,n]of y.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"}))}(c,d),function(t,e,n,r){const a=i.db.getTodayMarker();if("off"===a)return;const o=p.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",g(c)+t).attr("x2",g(c)+t).attr("y1",s.titleTopMargin).attr("y2",r-s.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}(u,0,0,a)}(u,K,k),(0,h.i)(p,k,K,s.useMaxWidth),p.append("text").text(i.db.getDiagramTitle()).attr("x",K/2).attr("y",s.titleTopMargin).attr("class","titleText")}},styles:t=>`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`}}}]);
1
+ (self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3488],{79580:function(t){t.exports=function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}}));return i.bind(this)(r)}}}()},69746:function(t){t.exports=function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,r={},a=function(t){return(t=+t)+(t>68?1900:2e3)},o=function(t){return function(e){this[t]=+e}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],l=function(t){var e=r[t];return e&&(e.indexOf?e:e.s.concat(e.f))},d=function(t,e){var n,i=r.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},u={A:[s,function(t){this.afternoon=d(t,!1)}],a:[s,function(t){this.afternoon=d(t,!0)}],S:[/\d/,function(t){this.milliseconds=100*+t}],SS:[n,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[i,o("seconds")],ss:[i,o("seconds")],m:[i,o("minutes")],mm:[i,o("minutes")],H:[i,o("hours")],h:[i,o("hours")],HH:[i,o("hours")],hh:[i,o("hours")],D:[i,o("day")],DD:[n,o("day")],Do:[s,function(t){var e=r.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],M:[i,o("month")],MM:[n,o("month")],MMM:[s,function(t){var e=l("months"),n=(l("monthsShort")||e.map((function(t){return t.slice(0,3)}))).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[s,function(t){var e=l("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,o("year")],YY:[n,function(t){this.year=a(t)}],YYYY:[/\d{4}/,o("year")],Z:c,ZZ:c};function h(n){var i,s;i=n,s=r&&r.formats;for(var a=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(t,e,n){return e||n.slice(1)}))}))).match(e),o=a.length,c=0;c<o;c+=1){var l=a[c],d=u[l],h=d&&d[0],f=d&&d[1];a[c]=f?{regex:h,parser:f}:l.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,i=0;n<o;n+=1){var s=a[n];if("string"==typeof s)i+=s.length;else{var r=s.regex,c=s.parser,l=t.slice(i),d=r.exec(l)[0];c.call(e,d),t=t.replace(d,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(a=t.parseTwoDigitYear);var i=e.prototype,s=i.parse;i.parse=function(t){var e=t.date,i=t.utc,a=t.args;this.$u=i;var o=a[1];if("string"==typeof o){var c=!0===a[2],l=!0===a[3],d=c||l,u=a[2];l&&(u=a[2]),r=this.$locale(),!c&&u&&(r=n.Ls[u]),this.$d=function(t,e,n){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var i=h(e)(t),s=i.year,r=i.month,a=i.day,o=i.hours,c=i.minutes,l=i.seconds,d=i.milliseconds,u=i.zone,f=new Date,y=a||(s||r?1:f.getDate()),m=s||f.getFullYear(),k=0;s&&!r||(k=r>0?r-1:f.getMonth());var p=o||0,g=c||0,b=l||0,T=d||0;return u?new Date(Date.UTC(m,k,y,p,g,b,T+60*u.offset*1e3)):n?new Date(Date.UTC(m,k,y,p,g,b,T)):new Date(m,k,y,p,g,b,T)}catch(t){return new Date("")}}(e,o,i),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),r={}}else if(o instanceof Array)for(var f=o.length,y=1;y<=f;y+=1){a[1]=o[y-1];var m=n.apply(this,a);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}y===f&&(this.$d=new Date(""))}else s.call(this,t)}}}()},57635:function(t){t.exports=function(){"use strict";var t="day";return function(e,n,i){var s=function(e){return e.add(4-e.isoWeekday(),t)},r=n.prototype;r.isoWeekYear=function(){return s(this).year()},r.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),t);var n,r,a,o=s(this),c=(n=this.isoWeekYear(),a=4-(r=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),r.isoWeekday()>4&&(a+=7),r.add(a,t));return o.diff(c,"week")+1},r.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var a=r.startOf;r.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):a.bind(this)(t,e)}}}()},63488:(t,e,n)=>{"use strict";n.d(e,{diagram:()=>tt});var i=n(7608),s=n(27693),r=n.n(s),a=n(57635),o=n.n(a),c=n(69746),l=n.n(c),d=n(79580),u=n.n(d),h=n(24028),f=n(23617),y=(n(31699),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,30,32,33,35,37],n=[1,25],i=[1,26],s=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,9],d=[1,10],u=[1,11],h=[1,12],f=[1,13],y=[1,14],m=[1,15],k=[1,16],p=[1,18],g=[1,19],b=[1,20],T=[1,21],x=[1,22],v=[1,24],_=[1,32],w={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,dateFormat:19,inclusiveEndDates:20,topAxis:21,axisFormat:22,tickInterval:23,excludes:24,includes:25,todayMarker:26,title:27,acc_title:28,acc_title_value:29,acc_descr:30,acc_descr_value:31,acc_descr_multiline_value:32,section:33,clickStatement:34,taskTxt:35,taskData:36,click:37,callbackname:38,callbackargs:39,href:40,clickStatementDebug:41,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",19:"dateFormat",20:"inclusiveEndDates",21:"topAxis",22:"axisFormat",23:"tickInterval",24:"excludes",25:"includes",26:"todayMarker",27:"title",28:"acc_title",29:"acc_title_value",30:"acc_descr",31:"acc_descr_value",32:"acc_descr_multiline_value",33:"section",35:"taskTxt",36:"taskData",37:"click",38:"callbackname",39:"callbackargs",40:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[34,2],[34,3],[34,3],[34,4],[34,3],[34,4],[34,2],[41,2],[41,3],[41,3],[41,4],[41,3],[41,4],[41,2]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 16:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 17:i.TopAxis(),this.$=r[o].substr(8);break;case 18:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 19:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 20:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 21:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 22:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 24:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 25:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 26:case 27:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 28:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 30:i.addTask(r[o-1],r[o]),this.$="task";break;case 31:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 32:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 33:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 34:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 36:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 37:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 38:case 44:this.$=r[o-1]+" "+r[o];break;case 39:case 40:case 42:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 41:case 43:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:T,33:x,34:23,35:v,37:_},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:33,11:17,12:n,13:i,14:s,15:r,16:a,17:o,18:c,19:l,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,30:b,32:T,33:x,34:23,35:v,37:_},t(e,[2,5]),t(e,[2,6]),t(e,[2,15]),t(e,[2,16]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),{29:[1,34]},{31:[1,35]},t(e,[2,27]),t(e,[2,28]),t(e,[2,29]),{36:[1,36]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{38:[1,37],40:[1,38]},t(e,[2,4]),t(e,[2,25]),t(e,[2,26]),t(e,[2,30]),t(e,[2,31],{39:[1,39],40:[1,40]}),t(e,[2,37],{38:[1,41]}),t(e,[2,32],{40:[1,42]}),t(e,[2,33]),t(e,[2,35],{39:[1,43]}),t(e,[2,34]),t(e,[2,36])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=[0],n=[],i=[null],s=[],r=this.table,a="",o=0,c=0,l=s.slice.call(arguments,1),d=Object.create(this.lexer),u={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(u.yy[h]=this.yy[h]);d.setInput(t,u.yy),u.yy.lexer=d,u.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;s.push(f);var y=d.options&&d.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,k,p,g,b,T,x,v,_,w={};;){if(k=e[e.length-1],this.defaultActions[k]?p=this.defaultActions[k]:(null==m&&(_=void 0,"number"!=typeof(_=n.pop()||d.lex()||1)&&(_ instanceof Array&&(_=(n=_).pop()),_=this.symbols_[_]||_),m=_),p=r[k]&&r[k][m]),void 0===p||!p.length||!p[0]){var $;for(b in v=[],r[k])this.terminals_[b]&&b>2&&v.push("'"+this.terminals_[b]+"'");$=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:v})}if(p[0]instanceof Array&&p.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(p[0]){case 1:e.push(m),i.push(d.yytext),s.push(d.yylloc),e.push(p[1]),m=null,c=d.yyleng,a=d.yytext,o=d.yylineno,f=d.yylloc;break;case 2:if(T=this.productions_[p[1]][1],w.$=i[i.length-T],w._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},y&&(w._$.range=[s[s.length-(T||1)].range[0],s[s.length-1].range[1]]),void 0!==(g=this.performAction.apply(w,[a,c,o,u.yy,p[1],i,s].concat(l))))return g;T&&(e=e.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),e.push(this.productions_[p[1]][0]),i.push(w.$),s.push(w._$),x=r[e[e.length-2]][e[e.length-1]],e.push(x);break;case 3:return!0}}return!0}},$={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),28;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),30;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 16:case 19:case 22:case 25:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:case 14:break;case 11:return 10;case 15:this.begin("href");break;case 17:return 40;case 18:this.begin("callbackname");break;case 20:this.popState(),this.begin("callbackargs");break;case 21:return 38;case 23:return 39;case 24:this.begin("click");break;case 26:return 37;case 27:return 4;case 28:return 19;case 29:return 20;case 30:return 21;case 31:return 22;case 32:return 23;case 33:return 25;case 34:return 24;case 35:return 26;case 36:return 12;case 37:return 13;case 38:return 14;case 39:return 15;case 40:return 16;case 41:return 17;case 42:return 18;case 43:return"date";case 44:return 27;case 45:return"accDescription";case 46:return 33;case 47:return 35;case 48:return 36;case 49:return":";case 50:return 6;case 51:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[22,23],inclusive:!1},callbackname:{rules:[19,20,21],inclusive:!1},href:{rules:[16,17],inclusive:!1},click:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,18,24,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};function D(){this.yy={}}return w.lexer=$,D.prototype=w,w.Parser=D,new D}());y.parser=y;const m=y;r().extend(o()),r().extend(l()),r().extend(u());let k,p="",g="",b="",T=[],x=[],v={},_=[],w=[],$="",D="";const C=["active","done","crit","milestone"];let S=[],E=!1,Y=!1,M="sunday",A=0;const L=function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!!(t.isoWeekday()>=6&&n.includes("weekends"))||!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim())))},O=function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,a;s=t.startTime instanceof Date?r()(t.startTime):r()(t.startTime,e,!0),s=s.add(1,"d"),a=t.endTime instanceof Date?r()(t.endTime):r()(t.endTime,e,!0);const[o,c]=I(s,a,e,n,i);t.endTime=o.toDate(),t.renderEndTime=c},I=function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=L(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]},F=function(t,e,n){n=n.trim();const i=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==i){let t=null;if(i[1].split(" ").forEach((function(e){let n=Z(e);void 0!==n&&(t?n.endTime>t.endTime&&(t=n):t=n)})),t)return t.endTime;{const t=new Date;return t.setHours(0,0,0,0),t}}let s=r()(n,e.trim(),!0);if(s.isValid())return s.toDate();{h.l.debug("Invalid date:"+n),h.l.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},W=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},P=function(t,e,n,i=!1){n=n.trim();let s=r()(n,e.trim(),!0);if(s.isValid())return i&&(s=s.add(1,"d")),s.toDate();let a=r()(t);const[o,c]=W(n);if(!Number.isNaN(o)){const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()};let B=0;const z=function(t){return void 0===t?(B+=1,"task"+B):t};let N,H,j=[];const U={},Z=function(t){const e=U[t];return j[e]},G=function(){const t=function(t){const e=j[t];let n="";switch(j[t].raw.startTime.type){case"prevTaskEnd":{const t=Z(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=F(0,p,j[t].raw.startTime.startData),n&&(j[t].startTime=n)}return j[t].startTime&&(j[t].endTime=P(j[t].startTime,p,j[t].raw.endTime.data,E),j[t].endTime&&(j[t].processed=!0,j[t].manualEndTime=r()(j[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),O(j[t],p,x,T))),j[t].processed};let e=!0;for(const[n,i]of j.entries())t(n),e=e&&i.processed;return e},R=function(t,e){t.split(",").forEach((function(t){let n=Z(t);void 0!==n&&n.classes.push(e)}))},V=function(t,e){S.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))},q={getConfig:()=>(0,h.c)().gantt,clear:function(){_=[],w=[],$="",S=[],B=0,N=void 0,H=void 0,j=[],p="",g="",D="",k=void 0,b="",T=[],x=[],E=!1,Y=!1,A=0,v={},(0,h.t)(),M="sunday"},setDateFormat:function(t){p=t},getDateFormat:function(){return p},enableInclusiveEndDates:function(){E=!0},endDatesAreInclusive:function(){return E},enableTopAxis:function(){Y=!0},topAxisEnabled:function(){return Y},setAxisFormat:function(t){g=t},getAxisFormat:function(){return g},setTickInterval:function(t){k=t},getTickInterval:function(){return k},setTodayMarker:function(t){b=t},getTodayMarker:function(){return b},setAccTitle:h.s,getAccTitle:h.g,setDiagramTitle:h.q,getDiagramTitle:h.r,setDisplayMode:function(t){D=t},getDisplayMode:function(){return D},setAccDescription:h.b,getAccDescription:h.a,addSection:function(t){$=t,_.push(t)},getSections:function(){return _},getTasks:function(){let t=G(),e=0;for(;!t&&e<10;)t=G(),e++;return w=j,w},addTask:function(t,e){const n={section:$,type:$,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};X(i,s,C);for(let t=0;t<i.length;t++)i[t]=i[t].trim();switch(i.length){case 1:s.id=z(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:i[0]};break;case 2:s.id=z(),s.startTime={type:"getStartDate",startData:i[0]},s.endTime={data:i[1]};break;case 3:s.id=z(i[0]),s.startTime={type:"getStartDate",startData:i[1]},s.endTime={data:i[2]}}return s}(H,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=H,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.order=A,A++;const s=j.push(n);H=n.id,U[n.id]=s-1},findTaskById:Z,addTaskOrg:function(t,e){const n={section:$,type:$,description:t,task:t,classes:[]},i=function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};X(i,s,C);for(let t=0;t<i.length;t++)i[t]=i[t].trim();let a="";switch(i.length){case 1:s.id=z(),s.startTime=t.endTime,a=i[0];break;case 2:s.id=z(),s.startTime=F(0,p,i[0]),a=i[1];break;case 3:s.id=z(i[0]),s.startTime=F(0,p,i[1]),a=i[2]}return a&&(s.endTime=P(s.startTime,p,a,E),s.manualEndTime=r()(a,"YYYY-MM-DD",!0).isValid(),O(s,p,x,T)),s}(N,e);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,N=n,w.push(n)},setIncludes:function(t){T=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return T},setExcludes:function(t){x=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return x},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"!==(0,h.c)().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),void 0!==Z(t)&&V(t,(()=>{h.u.runFunc(e,...i)}))}(t,e,n)})),R(t,"clickable")},setLink:function(t,e){let n=e;"loose"!==(0,h.c)().securityLevel&&(n=(0,i.Nm)(e)),t.split(",").forEach((function(t){void 0!==Z(t)&&(V(t,(()=>{window.open(n,"_self")})),v[t]=n)})),R(t,"clickable")},getLinks:function(){return v},bindFunctions:function(t){S.forEach((function(e){e(t)}))},parseDuration:W,isInvalidDate:L,setWeekday:function(t){M=t},getWeekday:function(){return M}};function X(t,e,n){let i=!0;for(;i;)i=!1,n.forEach((function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)}))}const Q={monday:f.Ox9,tuesday:f.YDX,wednesday:f.EFj,thursday:f.Igq,friday:f.y2j,saturday:f.LqH,sunday:f.Zyz},J=(t,e)=>{let n=[...t].map((()=>-1/0)),i=[...t].sort(((t,e)=>t.startTime-e.startTime||t.order-e.order)),s=0;for(const t of i)for(let i=0;i<n.length;i++)if(t.startTime>=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s};let K;const tt={parser:m,db:q,renderer:{setConf:function(){h.l.debug("Something is calling, setConf, remove the call")},draw:function(t,e,n,i){const s=(0,h.c)().gantt,a=(0,h.c)().securityLevel;let o;"sandbox"===a&&(o=(0,f.Ys)("#i"+e));const c="sandbox"===a?(0,f.Ys)(o.nodes()[0].contentDocument.body):(0,f.Ys)("body"),l="sandbox"===a?o.nodes()[0].contentDocument:document,d=l.getElementById(e);K=d.parentElement.offsetWidth,void 0===K&&(K=1200),void 0!==s.useWidth&&(K=s.useWidth);const u=i.db.getTasks();let y=[];for(const t of u)y.push(t.type);y=function(t){const e={},n=[];for(let i=0,s=t.length;i<s;++i)Object.prototype.hasOwnProperty.call(e,t[i])||(e[t[i]]=!0,n.push(t[i]));return n}(y);const m={};let k=2*s.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===s.displayMode){const t={};for(const e of u)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=J(t[n],e)+1;e+=i,k+=i*(s.barHeight+s.barGap),m[n]=i}}else{k+=u.length*(s.barHeight+s.barGap);for(const t of y)m[t]=u.filter((e=>e.type===t)).length}d.setAttribute("viewBox","0 0 "+K+" "+k);const p=c.select(`[id="${e}"]`),g=(0,f.Xf)().domain([(0,f.VV$)(u,(function(t){return t.startTime})),(0,f.Fp7)(u,(function(t){return t.endTime}))]).rangeRound([0,K-s.leftPadding-s.rightPadding]);u.sort((function(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:n<i&&(s=-1),s})),function(t,n,a){const o=s.barHeight,c=o+s.barGap,d=s.topPadding,u=s.leftPadding;(0,f.BYU)().domain([0,y.length]).range(["#00B9FA","#F95002"]).interpolate(f.JHv),function(t,e,n,a,o,c,l,d){if(0===l.length&&0===d.length)return;let u,f;for(const{startTime:t,endTime:e}of c)(void 0===u||t<u)&&(u=t),(void 0===f||e>f)&&(f=e);if(!u||!f)return;if(r()(f).diff(r()(u),"year")>5)return void h.l.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),m=[];let k=null,b=r()(u);for(;b.valueOf()<=f;)i.db.isInvalidDate(b,y,l,d)?k?k.end=b:k={start:b,end:b}:k&&(m.push(k),k=null),b=b.add(1,"d");p.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return g(t.start)+n})).attr("y",s.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return g(e)-g(t.start)})).attr("height",o-e-s.gridLineStartPadding).attr("transform-origin",(function(e,i){return(g(e.start)+n+.5*(g(e.end)-g(e.start))).toString()+"px "+(i*t+.5*o).toString()+"px"})).attr("class","exclude-range")}(c,d,u,0,a,t,i.db.getExcludes(),i.db.getIncludes()),function(t,e,n,r){let a=(0,f.LLu)(g).tickSize(-r+e+s.gridLineStartPadding).tickFormat((0,f.i$Z)(i.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));const o=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||s.tickInterval);if(null!==o){const t=o[1],e=o[2],n=i.db.getWeekday()||s.weekday;switch(e){case"millisecond":a.ticks(f.U8T.every(t));break;case"second":a.ticks(f.S1K.every(t));break;case"minute":a.ticks(f.Z_i.every(t));break;case"hour":a.ticks(f.WQD.every(t));break;case"day":a.ticks(f.rr1.every(t));break;case"week":a.ticks(Q[n].every(t));break;case"month":a.ticks(f.F0B.every(t))}}if(p.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||s.topAxis){let n=(0,f.F5q)(g).tickSize(-r+e+s.gridLineStartPadding).tickFormat((0,f.i$Z)(i.db.getAxisFormat()||s.axisFormat||"%Y-%m-%d"));if(null!==o){const t=o[1],e=o[2],r=i.db.getWeekday()||s.weekday;switch(e){case"millisecond":n.ticks(f.U8T.every(t));break;case"second":n.ticks(f.S1K.every(t));break;case"minute":n.ticks(f.Z_i.every(t));break;case"hour":n.ticks(f.WQD.every(t));break;case"day":n.ticks(f.rr1.every(t));break;case"week":n.ticks(Q[r].every(t));break;case"month":n.ticks(f.F0B.every(t))}}p.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(u,d,0,a),function(t,n,r,a,o,c,l){const d=[...new Set(t.map((t=>t.order)))].map((e=>t.find((t=>t.order===e))));p.append("g").selectAll("rect").data(d).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*n+r-2})).attr("width",(function(){return l-s.rightPadding/2})).attr("height",n).attr("class",(function(t){for(const[e,n]of y.entries())if(t.type===n)return"section section"+e%s.numberSectionStyles;return"section section0"}));const u=p.append("g").selectAll("rect").data(t).enter(),m=i.db.getLinks();if(u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))-.5*o:g(t.startTime)+a})).attr("y",(function(t,e){return t.order*n+r})).attr("width",(function(t){return t.milestone?o:g(t.renderEndTime||t.endTime)-g(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(g(t.startTime)+a+.5*(g(t.endTime)-g(t.startTime))).toString()+"px "+(e*n+r+.5*o).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of y.entries())t.type===i&&(n=e%s.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,i+=" "+e,"task"+i})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",s.fontSize).attr("x",(function(t){let e=g(t.startTime),n=g(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(g(t.endTime)-g(t.startTime))-.5*o),t.milestone&&(n=e+o);const i=this.getBBox().width;return i>n-e?n+i+1.5*s.leftPadding>l?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,e){return t.order*n+s.barHeight/2+(s.fontSize/2-2)+r})).attr("text-height",o).attr("class",(function(t){const e=g(t.startTime);let n=g(t.endTime);t.milestone&&(n=e+o);const i=this.getBBox().width;let r="";t.classes.length>0&&(r=t.classes.join(" "));let a=0;for(const[e,n]of y.entries())t.type===n&&(a=e%s.numberSectionStyles);let c="";return t.active&&(c=t.crit?"activeCritText"+a:"activeText"+a),t.done?c=t.crit?c+" doneCritText"+a:c+" doneText"+a:t.crit&&(c=c+" critText"+a),t.milestone&&(c+=" milestoneText"),i>n-e?n+i+1.5*s.leftPadding>l?r+" taskTextOutsideLeft taskTextOutside"+a+" "+c:r+" taskTextOutsideRight taskTextOutside"+a+" "+c+" width-"+i:r+" taskText taskText"+a+" "+c+" width-"+i})),"sandbox"===(0,h.c)().securityLevel){let t;t=(0,f.Ys)("#i"+e);const n=t.nodes()[0].contentDocument;u.filter((function(t){return void 0!==m[t.id]})).each((function(t){var e=n.querySelector("#"+t.id),i=n.querySelector("#"+t.id+"-text");const s=e.parentNode;var r=n.createElement("a");r.setAttribute("xlink:href",m[t.id]),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(e),r.appendChild(i)}))}}(t,c,d,u,o,0,n),function(t,e){let n=0;const i=Object.keys(m).map((t=>[t,m[t]]));p.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(h.e.lineBreakRegex),n=-(e.length-1)/2,i=l.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=l.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i})).attr("x",10).attr("y",(function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a<r;a++)return n+=i[r-1][1],s[1]*t/2+n*t+e})).attr("font-size",s.sectionFontSize).attr("class",(function(t){for(const[e,n]of y.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"}))}(c,d),function(t,e,n,r){const a=i.db.getTodayMarker();if("off"===a)return;const o=p.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",g(c)+t).attr("x2",g(c)+t).attr("y1",s.titleTopMargin).attr("y2",r-s.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}(u,0,0,a)}(u,K,k),(0,h.i)(p,k,K,s.useMaxWidth),p.append("text").text(i.db.getDiagramTitle()).attr("x",K/2).attr("y",s.titleTopMargin).attr("class","titleText")}},styles:t=>`\n .mermaid-main-font {\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif);\n }\n`}}}]);