notebook 7.3.0a1__py3-none-any.whl → 7.3.0b0__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.
- notebook/_version.py +1 -1
- notebook/app.py +10 -2
- notebook/static/113.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -1
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/170.bundle.js +1 -1
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1828.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1958.bundle.js +1 -1
- notebook/static/1962.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2065.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/{3030.bundle.js → 2323.bundle.js} +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2424.bundle.js +377 -0
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2636.bundle.js +1 -1
- notebook/static/2756.bundle.js +1 -1
- notebook/static/2813.bundle.js +1 -1
- notebook/static/2866.bundle.js +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -1
- notebook/static/2955.bundle.js +1 -0
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3187.bundle.js +1 -1
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3301.bundle.js +1 -1
- notebook/static/3325.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/{1261.bundle.js → 3463.bundle.js} +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/35.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/374.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4058.bundle.js +1 -1
- notebook/static/409.bundle.js +1 -1
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4242.bundle.js +79 -0
- notebook/static/4271.bundle.js +1 -1
- notebook/static/4291.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4526.bundle.js +1 -1
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4630.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/5166.bundle.js +1 -1
- notebook/static/5234.bundle.js +1 -1
- notebook/static/5254.bundle.js +1 -1
- notebook/static/5261.bundle.js +1 -1
- notebook/static/5263.bundle.js +1 -0
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5426.bundle.js +1 -1
- notebook/static/5430.bundle.js +653 -0
- notebook/static/545.bundle.js +1 -1
- notebook/static/5451.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5649.bundle.js +3 -3
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6061.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6648.bundle.js +1 -0
- notebook/static/6731.bundle.js +1 -1
- notebook/static/6748.bundle.js +1 -1
- notebook/static/677.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7369.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7543.bundle.js +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7655.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7812.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7821.bundle.js +1 -1
- notebook/static/7854.bundle.js +1 -1
- notebook/static/7866.bundle.js +1 -0
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8032.bundle.js +1 -1
- notebook/static/8285.bundle.js +1 -1
- notebook/static/8471.bundle.js +1 -1
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8635.bundle.js +41 -0
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/8929.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/911.bundle.js +1 -1
- notebook/static/9136.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9672.bundle.js +352 -0
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9799.bundle.js +1 -0
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +124 -130
- notebook/templates/consoles.html +1 -1
- notebook/templates/edit.html +1 -1
- notebook/templates/error.html +1 -1
- notebook/templates/notebooks.html +1 -1
- notebook/templates/terminals.html +1 -1
- notebook/templates/tree.html +1 -1
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +17 -17
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +11 -11
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +18 -18
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -1
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +13 -13
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +12 -12
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.67f8b11d2af855286118.js +1 -0
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/600.25341cef1598f2727482.js → notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/907.767373e59d0c0e33ef12.js +1 -1
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.50419fa0a72e54064396.js +1 -0
- notebook-7.3.0b0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.fd0956ebf15f666a19f8.js +1 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/METADATA +2 -2
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/RECORD +210 -218
- notebook/static/1226.bundle.js +0 -1
- notebook/static/1750.bundle.js +0 -1
- notebook/static/1884.bundle.js +0 -386
- notebook/static/4045.bundle.js +0 -1
- notebook/static/4434.bundle.js +0 -1
- notebook/static/5018.bundle.js +0 -1
- notebook/static/5712.bundle.js +0 -1
- notebook/static/6164.bundle.js +0 -1
- notebook/static/6318.bundle.js +0 -1
- notebook/static/6619.bundle.js +0 -1
- notebook/static/6898.bundle.js +0 -1
- notebook/static/7506.bundle.js +0 -703
- notebook/static/7579.bundle.js +0 -1
- notebook/static/8054.bundle.js +0 -1
- notebook/static/8647.bundle.js +0 -1
- notebook/static/8723.bundle.js +0 -1
- notebook/static/9734.bundle.js +0 -1
- notebook/static/9906.bundle.js +0 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.45e1d3167710e94c3d26.js +0 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.b94c92715d631efb4a8f.js +0 -1
- notebook-7.3.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.8ca922abea871b34db72.js +0 -1
- /notebook/static/{7506.bundle.js.LICENSE.txt → 4242.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.3.0a1.data → notebook-7.3.0b0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/WHEEL +0 -0
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/entry_points.txt +0 -0
- {notebook-7.3.0a1.dist-info → notebook-7.3.0b0.dist-info}/licenses/LICENSE +0 -0
notebook/static/2088.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2088,6604],{6604:(e,o,t)=>{t.r(o),t.d(o,{default:()=>b});var n,i=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2088,6604],{6604:(e,o,t)=>{t.r(o),t.d(o,{default:()=>b});var n,i=t(26177),r=t(20754),l=t(2522),s=t(33729),a=t(58194),d=t(75303),c=t(93050),u=t(14931),p=t(2260);!function(e){e.dismiss="tooltip:dismiss",e.launchConsole="tooltip:launch-console",e.launchNotebook="tooltip:launch-notebook",e.launchFile="tooltip:launch-file"}(n||(n={}));const m={id:"@jupyterlab/tooltip-extension:manager",description:"Provides the tooltip manager.",autoStart:!0,optional:[c.ITranslator],provides:d.ITooltipManager,activate:(e,o)=>{const t=(null!=o?o:c.nullTranslator).load("jupyterlab");let i=null;return e.commands.addCommand(n.dismiss,{label:t.__("Dismiss the tooltip"),execute:()=>{i&&(i.dispose(),i=null)}}),{invoke(e){const{anchor:o,editor:t,kernel:n,rendermime:r}=e;return i&&(i.dispose(),i=null),T.fetch({detail:0,editor:t,kernel:n}).then((e=>{i=new d.Tooltip({anchor:o,bundle:e,editor:t,rendermime:r}),p.Widget.attach(i,document.body)})).catch((()=>{}))}}}},h={id:"@jupyterlab/tooltip-extension:consoles",description:"Adds the tooltip capability to consoles.",autoStart:!0,optional:[c.ITranslator],requires:[d.ITooltipManager,i.IConsoleTracker],activate:(e,o,t,i)=>{const r=(null!=i?i:c.nullTranslator).load("jupyterlab");e.commands.addCommand(n.launchConsole,{label:r.__("Open the tooltip"),execute:()=>{var e,n;const i=t.currentWidget;if(!i)return;const r=i.console,l=null===(e=r.promptCell)||void 0===e?void 0:e.editor,s=null===(n=r.sessionContext.session)||void 0===n?void 0:n.kernel,a=r.rendermime;return l&&s&&a?o.invoke({anchor:r,editor:l,kernel:s,rendermime:a}):void 0}})}},v={id:"@jupyterlab/tooltip-extension:notebooks",description:"Adds the tooltip capability to notebooks.",autoStart:!0,optional:[c.ITranslator],requires:[d.ITooltipManager,s.INotebookTracker],activate:(e,o,t,i)=>{const r=(null!=i?i:c.nullTranslator).load("jupyterlab");e.commands.addCommand(n.launchNotebook,{label:r.__("Open the tooltip"),execute:()=>{var e,n;const i=t.currentWidget;if(!i)return;const r=i.content,l=null===(e=r.activeCell)||void 0===e?void 0:e.editor,s=null===(n=i.sessionContext.session)||void 0===n?void 0:n.kernel,a=r.rendermime;return l&&s&&a?o.invoke({anchor:r,editor:l,kernel:s,rendermime:a}):void 0}})}},k={id:"@jupyterlab/tooltip-extension:files",description:"Adds the tooltip capability to file editors.",autoStart:!0,optional:[c.ITranslator],requires:[d.ITooltipManager,l.IEditorTracker,a.IRenderMimeRegistry],activate:(e,o,t,i,r)=>{const l=(null!=r?r:c.nullTranslator).load("jupyterlab"),s={},a=e.serviceManager.sessions,d=(e,o)=>{t.forEach((e=>{const t=(0,u.find)(o,(o=>e.context.path===o.path));if(t){const o=s[e.id];if(o&&o.id===t.id)return;o&&(delete s[e.id],o.dispose());const n=a.connectTo({model:t});s[e.id]=n}else{const o=s[e.id];o&&(o.dispose(),delete s[e.id])}}))};d(0,a.running()),a.runningChanged.connect(d),t.widgetAdded.connect(((e,o)=>{o.disposed.connect((e=>{const o=s[e.id];o&&(o.dispose(),delete s[e.id])}))})),e.commands.addCommand(n.launchFile,{label:l.__("Open the tooltip"),execute:async()=>{const e=t.currentWidget,n=e&&s[e.id]&&s[e.id].kernel;if(!n)return;const r=e.content,l=null==r?void 0:r.editor;return l&&n&&i?o.invoke({anchor:r,editor:l,kernel:n,rendermime:i}):void 0}})}},b=[m,h,v,k];var T;!function(e){let o=0;e.fetch=function(e){const{detail:t,editor:n,kernel:i}=e,l=n.model.sharedModel.getSource(),s=n.getCursorPosition(),a=r.Text.jsIndexToCharIndex(n.getOffsetAt(s),l);if(!l||!i)return Promise.reject(void 0);const d={code:l,cursor_pos:a,detail_level:t||0},c=++o;return i.requestInspect(d).then((e=>{const t=e.content;return c!==o?Promise.reject(void 0):"ok"===t.status&&t.found?Promise.resolve(t.data):Promise.reject(void 0)}))}}(T||(T={}))}}]);
|
notebook/static/2089.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2089],{2089:(e,t,s)=>{s.r(t),s.d(t,{ILoggerRegistry:()=>d,LogConsolePanel:()=>w,LogOutputModel:()=>a,Logger:()=>u,LoggerOutputAreaModel:()=>l,LoggerRegistry:()=>g,ScrollingWidget:()=>v});var i,r=s(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2089],{2089:(e,t,s)=>{s.r(t),s.d(t,{ILoggerRegistry:()=>d,LogConsolePanel:()=>w,LogOutputModel:()=>a,Logger:()=>u,LoggerOutputAreaModel:()=>l,LoggerRegistry:()=>g,ScrollingWidget:()=>v});var i,r=s(82416),n=s(58194),o=s(2159);class a extends n.OutputModel{constructor(e){super(e),this.timestamp=new Date(e.value.timestamp),this.level=e.value.level}}class h extends r.OutputAreaModel.ContentFactory{createOutputModel(e){return new a(e)}}class l extends r.OutputAreaModel{constructor({maxLength:e,...t}){super(t),this.maxLength=e}add(e){return super.add(e),this._applyMaxLength(),this.length}shouldCombine(e){const{value:t,lastModel:s}=e;return Math.trunc(s.timestamp.getTime()/1e3)===Math.trunc(t.timestamp/1e3)}get(e){return super.get(e)}get maxLength(){return this._maxLength}set maxLength(e){this._maxLength=e,this._applyMaxLength()}_applyMaxLength(){this.list.length>this._maxLength&&this.list.removeRange(0,this.list.length-this._maxLength)}}class u{constructor(e){this._isDisposed=!1,this._contentChanged=new o.Signal(this),this._stateChanged=new o.Signal(this),this._rendermime=null,this._version=0,this._level="warning",this.source=e.source,this.outputAreaModel=new l({contentFactory:new h,maxLength:e.maxLength})}get maxLength(){return this.outputAreaModel.maxLength}set maxLength(e){this.outputAreaModel.maxLength=e}get level(){return this._level}set level(e){const t=this._level;t!==e&&(this._level=e,this._log({output:{output_type:"display_data",data:{"text/plain":`Log level set to ${e}`}},level:"metadata"}),this._stateChanged.emit({name:"level",oldValue:t,newValue:e}))}get length(){return this.outputAreaModel.length}get contentChanged(){return this._contentChanged}get stateChanged(){return this._stateChanged}get rendermime(){return this._rendermime}set rendermime(e){if(e!==this._rendermime){const t=this._rendermime,s=this._rendermime=e;this._stateChanged.emit({name:"rendermime",oldValue:t,newValue:s})}}get version(){return this._version}log(e){if(i.LogLevel[e.level]<i.LogLevel[this._level])return;let t=null;switch(e.type){case"text":t={output_type:"display_data",data:{"text/plain":e.data}};break;case"html":t={output_type:"display_data",data:{"text/html":e.data}};break;case"output":t=e.data}t&&this._log({output:t,level:e.level})}clear(){this.outputAreaModel.clear(!1),this._contentChanged.emit("clear")}checkpoint(){this._log({output:{output_type:"display_data",data:{"text/html":"<hr/>"}},level:"metadata"})}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this.clear(),this._rendermime=null,o.Signal.clearData(this))}_log(e){this._version++,this.outputAreaModel.add({...e.output,timestamp:Date.now(),level:e.level}),this._contentChanged.emit("append")}}!function(e){let t;!function(e){e[e.debug=0]="debug",e[e.info=1]="info",e[e.warning=2]="warning",e[e.error=3]="error",e[e.critical=4]="critical",e[e.metadata=5]="metadata"}(t=e.LogLevel||(e.LogLevel={}))}(i||(i={}));class g{constructor(e){this._loggers=new Map,this._registryChanged=new o.Signal(this),this._isDisposed=!1,this._defaultRendermime=e.defaultRendermime,this._maxLength=e.maxLength}getLogger(e){const t=this._loggers;let s=t.get(e);return s||(s=new u({source:e,maxLength:this.maxLength}),s.rendermime=this._defaultRendermime,t.set(e,s),this._registryChanged.emit("append"),s)}getLoggers(){return Array.from(this._loggers.values())}get registryChanged(){return this._registryChanged}get maxLength(){return this._maxLength}set maxLength(e){this._maxLength=e,this._loggers.forEach((t=>{t.maxLength=e}))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,this._loggers.forEach((e=>e.dispose())),o.Signal.clearData(this))}}const d=new(s(21961).Token)("@jupyterlab/logconsole:ILoggerRegistry","A service providing a logger infrastructure.");var c=s(93050),_=s(2260);class p extends _.Widget{constructor(){super(),this._timestampNode=document.createElement("div"),this.node.append(this._timestampNode)}set timestamp(e){this._timestamp=e,this._timestampNode.innerHTML=this._timestamp.toLocaleTimeString(),this.update()}set level(e){this._level=e,this.node.dataset.logLevel=e,this.update()}update(){var e;void 0!==this._level&&void 0!==this._timestamp&&(this.node.title=`${this._timestamp.toLocaleString()}; ${e=this._level,0===e.length?e:e[0].toUpperCase()+e.slice(1)} level`)}}class m extends r.OutputArea{createOutputItem(e){const t=super.createOutputItem(e);if(null===t)return null;const s=t.widgets[0];return s.timestamp=e.timestamp,s.level=e.level,t}onInputRequest(e,t){}}class L extends r.OutputArea.ContentFactory{createOutputPrompt(){return new p}}class v extends _.Widget{constructor({content:e,...t}){super(t),this._observer=null,this.addClass("jp-Scrolling"),(this.layout=new _.PanelLayout).addWidget(e),this._content=e,this._sentinel=document.createElement("div"),this.node.appendChild(this._sentinel)}get content(){return this._content}onAfterAttach(e){super.onAfterAttach(e),requestAnimationFrame((()=>{this._sentinel.scrollIntoView(),this._scrollHeight=this.node.scrollHeight})),"undefined"!=typeof IntersectionObserver&&(this._observer=new IntersectionObserver((e=>{this._handleScroll(e)}),{root:this.node,threshold:1}),this._observer.observe(this._sentinel))}onBeforeDetach(e){this._observer&&this._observer.disconnect()}onAfterShow(e){this._tracking&&this._sentinel.scrollIntoView()}_handleScroll([e]){if(e.isIntersecting)this._tracking=!0;else if(this.isVisible){const e=this.node.scrollHeight;e===this._scrollHeight?this._tracking=!1:(this._sentinel.scrollIntoView(),this._scrollHeight=e,this._tracking=!0)}}}class w extends _.StackedPanel{constructor(e,t){super(),this._outputAreas=new Map,this._source=null,this._sourceChanged=new o.Signal(this),this._sourceDisplayed=new o.Signal(this),this._loggersWatched=new Set,this.translator=t||c.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._loggerRegistry=e,this.addClass("jp-LogConsolePanel"),e.registryChanged.connect(((e,t)=>{this._bindLoggerSignals()}),this),this._bindLoggerSignals(),this._placeholder=new _.Widget,this._placeholder.addClass("jp-LogConsoleListPlaceholder"),this.addWidget(this._placeholder)}get loggerRegistry(){return this._loggerRegistry}get logger(){return null===this.source?null:this.loggerRegistry.getLogger(this.source)}get source(){return this._source}set source(e){if(e===this._source)return;const t=this._source,s=this._source=e;this._showOutputFromSource(s),this._handlePlaceholder(),this._sourceChanged.emit({oldValue:t,newValue:s,name:"source"})}get sourceVersion(){const e=this.source;return null!==e?this._loggerRegistry.getLogger(e).version:null}get sourceChanged(){return this._sourceChanged}get sourceDisplayed(){return this._sourceDisplayed}onAfterAttach(e){super.onAfterAttach(e),this._updateOutputAreas(),this._showOutputFromSource(this._source),this._handlePlaceholder()}onAfterShow(e){super.onAfterShow(e),null!==this.source&&this._sourceDisplayed.emit({source:this.source,version:this.sourceVersion})}_bindLoggerSignals(){const e=this._loggerRegistry.getLoggers();for(const t of e)this._loggersWatched.has(t.source)||(t.contentChanged.connect(((e,t)=>{this._updateOutputAreas(),this._handlePlaceholder()}),this),t.stateChanged.connect(((e,t)=>{if("rendermime"!==t.name)return;const s=`source:${e.source}`,i=this._outputAreas.get(s);i&&(t.newValue?i.rendermime=t.newValue:i.dispose())}),this),this._loggersWatched.add(t.source))}_showOutputFromSource(e){const t=null===e?"null source":`source:${e}`;this._outputAreas.forEach(((e,s)=>{var i,r;e.id===t?(null===(i=e.parent)||void 0===i||i.show(),e.isVisible&&this._sourceDisplayed.emit({source:this.source,version:this.sourceVersion})):null===(r=e.parent)||void 0===r||r.hide()}));const s=null===e?this._trans.__("Log Console"):this._trans.__("Log: %1",e);this.title.label=s,this.title.caption=s}_handlePlaceholder(){null===this.source?(this._placeholder.node.textContent=this._trans.__("No source selected."),this._placeholder.show()):0===this._loggerRegistry.getLogger(this.source).length?(this._placeholder.node.textContent=this._trans.__("No log messages."),this._placeholder.show()):(this._placeholder.hide(),this._placeholder.node.textContent="")}_updateOutputAreas(){const e=new Set,t=this._loggerRegistry.getLoggers();for(const s of t){const t=s.source,i=`source:${t}`;if(e.add(i),!this._outputAreas.has(i)){const e=new m({rendermime:s.rendermime,contentFactory:new L,model:s.outputAreaModel});e.id=i;const r=new v({content:e});this.addWidget(r),this._outputAreas.set(i,e);const n=e=>{this.source===t&&e.isVisible&&this._sourceDisplayed.emit({source:this.source,version:this.sourceVersion})};e.outputLengthChanged.connect(n,this),n(e)}}const s=this._outputAreas.keys();for(const t of s)if(!e.has(t)){const e=this._outputAreas.get(t);null==e||e.dispose(),this._outputAreas.delete(t)}}}}}]);
|
notebook/static/2122.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2122],{92122:(t,
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2122],{92122:(e,t,o)=>{o.r(t),o.d(t,{default:()=>c});var l=o(3012),n=o(41733),a=o(53876),r=o(93050);const s="@jupyterlab/cell-toolbar-extension:plugin",i={id:s,description:"Add the cells toolbar.",autoStart:!0,activate:async(e,t,o,l)=>{function c(e){const t=null===e||e.get("showToolbar").composite;u.enabled=t}const d=t&&o?(0,a.createToolbarFactory)(o,t,n.CellBarExtension.FACTORY_NAME,i.id,null!=l?l:r.nullTranslator):void 0,u=new n.CellBarExtension(e.commands,d);null!==t&&Promise.all([e.restored,t.load(s)]).then((([,e])=>{c(e),e.changed.connect(c)})),e.docRegistry.addWidgetExtension("Notebook",u)},optional:[l.ISettingRegistry,a.IToolbarWidgetRegistry,r.ITranslator]},c=i}}]);
|
notebook/static/2167.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2167,1647],{51647:(t,e,o)=>{o.r(e),o.d(e,{ITooltipManager:()=>s,Tooltip:()=>a});const s=new(o(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2167,1647],{51647:(t,e,o)=>{o.r(e),o.d(e,{ITooltipManager:()=>s,Tooltip:()=>a});const s=new(o(21961).Token)("@jupyterlab/tooltip:ITooltipManager","A service for the tooltip manager for the application. Use this to allow your extension to invoke a tooltip.");var i=o(76878),n=o(58194),r=o(2260);const d="jp-mod-tooltip",h=!0;class a extends r.Widget{constructor(t){super(),this._content=null,this.addClass("jp-ThemedContainer");const e=this.layout=new r.PanelLayout,o=new n.MimeModel({data:t.bundle});this.anchor=t.anchor,this.addClass("jp-Tooltip"),this.hide(),this._editor=t.editor,this._position=t.position,this._rendermime=t.rendermime;const s=this._rendermime.preferredMimeType(t.bundle,"any");s&&(this._content=this._rendermime.createRenderer(s),this._content.renderModel(o).then((()=>this._setGeometry())).catch((t=>console.error("tooltip rendering failed",t))),this._content.addClass("jp-Tooltip-content"),e.addWidget(this._content))}dispose(){this._content&&(this._content.dispose(),this._content=null),super.dispose()}handleEvent(t){if(this.isHidden||this.isDisposed)return;const{node:e}=this,o=t.target;switch(t.type){case"keydown":if(e.contains(o))return;this.dispose();break;case"mousedown":if(e.contains(o))return void this.activate();this.dispose();break;case"scroll":this._evtScroll(t)}}onActivateRequest(t){this.node.tabIndex=0,this.node.focus()}onAfterAttach(t){document.body.classList.add(d),document.addEventListener("keydown",this,h),document.addEventListener("mousedown",this,h),this.anchor.node.addEventListener("scroll",this,h),this.update()}onBeforeDetach(t){document.body.classList.remove(d),document.removeEventListener("keydown",this,h),document.removeEventListener("mousedown",this,h),this.anchor.node.removeEventListener("scroll",this,h)}onUpdateRequest(t){this.isHidden&&this.show(),this._setGeometry(),super.onUpdateRequest(t)}_evtScroll(t){this.node.contains(t.target)||this.update()}_getTokenPosition(){const t=this._editor,e=t.getCursorPosition(),o=t.getOffsetAt(e),s=t.getLine(e.line);if(!s)return;const i=s.substring(0,o).split(/\W+/),n=i[i.length-1],r=n?o-n.length:o;return t.getPositionAt(r)}_setGeometry(){const t=this._position?this._position:this._getTokenPosition();if(!t)return;const e=this._editor,o=e.getCoordinateForPosition(t);if(!o)return;const s=window.getComputedStyle(this.node),n=parseInt(s.paddingLeft,10)||0,r=e.host.closest(".jp-MainAreaWidget > .lm-Widget")||e.host;i.HoverBox.setGeometry({anchor:o,host:r,maxHeight:250,minHeight:20,node:this.node,offset:{horizontal:-1*n},privilege:"below",outOfViewDisplay:{top:"stick-inside",bottom:"stick-inside"},style:s})}}}}]);
|
notebook/static/2184.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2184],{42184:(e,t,n)=>{n.r(t),n.d(t,{default:()=>E});var a=n(27961),o=n(15465),i=n(688),r=n(52712),s=n(97040),l=n(44548),d=n(82323),c=n(71120),u=n(33882),g=n(54560),b=n(30754),p=n(50102),v=n(87844),m=n(25291);function h(e){Object.values(d.Debugger.CommandIDs).forEach((t=>{e.commands.hasCommand(t)&&e.commands.notifyCommandChanged(t)}))}const I={id:"@jupyterlab/debugger-extension:consoles",description:"Add debugger capability to the consoles.",autoStart:!0,requires:[d.IDebugger,s.IConsoleTracker],optional:[a.ILabShell],activate:(e,t,n,a)=>{const o=new d.Debugger.Handler({type:"console",shell:e.shell,service:t}),i=async t=>{const{sessionContext:n}=t;await n.ready,await o.updateContext(t,n),h(e)};a?a.currentChanged.connect(((e,t)=>{const n=t.newValue;n instanceof s.ConsolePanel&&i(n)})):n.currentChanged.connect(((e,t)=>{t&&i(t)}))}},f={id:"@jupyterlab/debugger-extension:files",description:"Adds debugger capabilities to files.",autoStart:!0,requires:[d.IDebugger,u.IEditorTracker],optional:[a.ILabShell],activate:(e,t,n,a)=>{const o=new d.Debugger.Handler({type:"file",shell:e.shell,service:t}),i={},r=async t=>{const n=e.serviceManager.sessions;try{const a=await n.findByPath(t.context.path);if(!a)return;let r=i[a.id];r||(r=n.connectTo({model:a}),i[a.id]=r),await o.update(t,r),h(e)}catch(e){return}};a?a.currentChanged.connect(((e,t)=>{const n=t.newValue;if(n instanceof c.DocumentWidget){const{content:e}=n;e instanceof u.FileEditor&&r(n)}})):n.currentChanged.connect(((e,t)=>{t&&r(t)}))}},y={id:"@jupyterlab/debugger-extension:notebooks",description:"Adds debugger capability to notebooks and provides the debugger notebook handler.",autoStart:!0,requires:[d.IDebugger,b.INotebookTracker],optional:[a.ILabShell,o.ICommandPalette,o.ISessionContextDialogs,m.ITranslator],provides:d.IDebuggerHandler,activate:(e,t,n,a,i,r,s)=>{const l=null!=s?s:m.nullTranslator,c=null!=r?r:new o.SessionContextDialogs({translator:l}),u=new d.Debugger.Handler({type:"notebook",shell:e.shell,service:t}),g=l.load("jupyterlab");e.commands.addCommand(d.Debugger.CommandIDs.restartDebug,{label:g.__("Restart Kernel and Debug…"),caption:g.__("Restart Kernel and Debug…"),isEnabled:()=>t.isStarted,execute:async()=>{const e=t.getDebuggerState();await t.stop();const a=n.currentWidget;if(!a)return;const{content:o,sessionContext:i}=a;await c.restart(i)&&(await t.restoreDebuggerState(e),await u.updateWidget(a,i.session),await b.NotebookActions.runAll(o,i,c,l))}});const p=async t=>{if(t){const{sessionContext:e}=t;await e.ready,await u.updateContext(t,e)}h(e)};return a?a.currentChanged.connect(((e,t)=>{const n=t.newValue;n instanceof b.NotebookPanel&&p(n)})):n.currentChanged.connect(((e,t)=>{t&&p(t)})),i&&i.addItem({category:"Notebook Operations",command:d.Debugger.CommandIDs.restartDebug}),u}},C={id:"@jupyterlab/debugger-extension:service",description:"Provides the debugger service.",autoStart:!0,provides:d.IDebugger,requires:[d.IDebuggerConfig],optional:[d.IDebuggerSources,m.ITranslator],activate:(e,t,n,a)=>new d.Debugger.Service({config:t,debuggerSources:n,specsManager:e.serviceManager.kernelspecs,translator:a})},_={id:"@jupyterlab/debugger-extension:config",description:"Provides the debugger configuration",provides:d.IDebuggerConfig,autoStart:!0,activate:()=>new d.Debugger.Config},D={id:"@jupyterlab/debugger-extension:sources",description:"Provides the source feature for debugging",autoStart:!0,provides:d.IDebuggerSources,requires:[d.IDebuggerConfig,r.IEditorServices],optional:[b.INotebookTracker,s.IConsoleTracker,u.IEditorTracker],activate:(e,t,n,a,o,i)=>new d.Debugger.Sources({config:t,shell:e.shell,editorServices:n,notebookTracker:a,consoleTracker:o,editorTracker:i})},S={id:"@jupyterlab/debugger-extension:variables",description:"Adds variables renderer and inspection in the debugger variable panel.",autoStart:!0,requires:[d.IDebugger,d.IDebuggerHandler,m.ITranslator],optional:[o.IThemeManager,p.IRenderMimeRegistry],activate:(e,t,n,a,i,r)=>{const s=a.load("jupyterlab"),{commands:l,shell:c}=e,u=new o.WidgetTracker({namespace:"debugger/inspect-variable"}),g=new o.WidgetTracker({namespace:"debugger/render-variable"}),p=d.Debugger.CommandIDs;l.addCommand(p.inspectVariable,{label:s.__("Inspect Variable"),caption:s.__("Inspect Variable"),isEnabled:e=>{var n,a,o,i;return!!(null===(n=t.session)||void 0===n?void 0:n.isStarted)&&Number(null!==(i=null!==(a=e.variableReference)&&void 0!==a?a:null===(o=t.model.variables.selectedVariable)||void 0===o?void 0:o.variablesReference)&&void 0!==i?i:0)>0},execute:async e=>{var n,a,r,s;let{variableReference:g,name:b}=e;g||(g=null===(n=t.model.variables.selectedVariable)||void 0===n?void 0:n.variablesReference),b||(b=null===(a=t.model.variables.selectedVariable)||void 0===a?void 0:a.name);const p=`jp-debugger-variable-${b}`;if(!b||!g||u.find((e=>e.id===p)))return;const v=await t.inspectVariable(g);if(!v||0===v.length)return;const m=t.model.variables,h=new o.MainAreaWidget({content:new d.Debugger.VariablesGrid({model:m,commands:l,scopes:[{name:b,variables:v}],themeManager:i})});h.addClass("jp-DebuggerVariables"),h.id=p,h.title.icon=d.Debugger.Icons.variableIcon,h.title.label=`${null===(s=null===(r=t.session)||void 0===r?void 0:r.connection)||void 0===s?void 0:s.name} - ${b}`,u.add(h);const I=()=>{h.dispose(),m.changed.disconnect(I)};m.changed.connect(I),c.add(h,"main",{mode:u.currentWidget?"split-right":"split-bottom",activate:!1,type:"Debugger Variables"})}}),l.addCommand(p.renderMimeVariable,{label:s.__("Render Variable"),caption:s.__("Render variable according to its mime type"),isEnabled:()=>{var e;return!!(null===(e=t.session)||void 0===e?void 0:e.isStarted)},isVisible:()=>t.model.hasRichVariableRendering&&(null!==r||n.activeWidget instanceof b.NotebookPanel),execute:e=>{var o,i,s,l,u,p,v,m;let{name:h,frameId:I}=e;h||(h=null===(o=t.model.variables.selectedVariable)||void 0===o?void 0:o.name),I||(I=null===(i=t.model.callstack.frame)||void 0===i?void 0:i.id);const f=n.activeWidget;let y=f instanceof b.NotebookPanel?f.content.rendermime:r;if(!y)return;const C=`jp-debugger-variable-mime-${h}-${null===(l=null===(s=t.session)||void 0===s?void 0:s.connection)||void 0===l?void 0:l.path.replace("/","-")}`;if(!h||g.find((e=>e.id===C))||!I&&t.hasStoppedThreads())return;const _=t.model.variables,D=new d.Debugger.VariableRenderer({dataLoader:()=>t.inspectRichVariable(h,I),rendermime:y,translator:a});D.addClass("jp-DebuggerRichVariable"),D.id=C,D.title.icon=d.Debugger.Icons.variableIcon,D.title.label=`${h} - ${null===(p=null===(u=t.session)||void 0===u?void 0:u.connection)||void 0===p?void 0:p.name}`,D.title.caption=`${h} - ${null===(m=null===(v=t.session)||void 0===v?void 0:v.connection)||void 0===m?void 0:m.path}`,g.add(D);const S=()=>{D.dispose(),_.changed.disconnect(w),null==f||f.disposed.disconnect(S)},w=()=>{n.activeWidget===f&&D.refresh()};D.disposed.connect(S),_.changed.connect(w),null==f||f.disposed.connect(S),c.add(D,"main",{mode:g.currentWidget?"split-right":"split-bottom",activate:!1,type:"Debugger Variables"})}}),l.addCommand(p.copyToClipboard,{label:s.__("Copy to Clipboard"),caption:s.__("Copy text representation of the value to clipboard"),isEnabled:()=>{var e,n;return!!(null===(e=t.session)||void 0===e?void 0:e.isStarted)&&!!(null===(n=t.model.variables.selectedVariable)||void 0===n?void 0:n.value)},isVisible:()=>n.activeWidget instanceof b.NotebookPanel,execute:async()=>{const e=t.model.variables.selectedVariable.value;e&&o.Clipboard.copyToSystem(e)}}),l.addCommand(p.copyToGlobals,{label:s.__("Copy Variable to Globals"),caption:s.__("Copy variable to globals scope"),isEnabled:()=>{var e;return!!(null===(e=t.session)||void 0===e?void 0:e.isStarted)},isVisible:()=>n.activeWidget instanceof b.NotebookPanel&&t.model.supportCopyToGlobals,execute:async e=>{const n=t.model.variables.selectedVariable.name;await t.copyToGlobals(n)}})}},w={id:"@jupyterlab/debugger-extension:sidebar",description:"Provides the debugger sidebar.",provides:d.IDebuggerSidebar,requires:[d.IDebugger,r.IEditorServices,m.ITranslator],optional:[o.IThemeManager,v.ISettingRegistry],autoStart:!0,activate:async(e,t,n,a,o,i)=>{const{commands:r}=e,s=d.Debugger.CommandIDs,l={registry:r,continue:s.debugContinue,terminate:s.terminate,next:s.next,stepIn:s.stepIn,stepOut:s.stepOut,evaluate:s.evaluate},c={registry:r,pauseOnExceptions:s.pauseOnExceptions},u=new d.Debugger.Sidebar({service:t,callstackCommands:l,breakpointsCommands:c,editorServices:n,themeManager:o,translator:a});if(i){const e=await i.load(k.id),n=()=>{var n,a,o,i;const r=e.get("variableFilters").composite,s=null!==(i=null===(o=null===(a=null===(n=t.session)||void 0===n?void 0:n.connection)||void 0===a?void 0:a.kernel)||void 0===o?void 0:o.name)&&void 0!==i?i:"";s&&r[s]&&(u.variables.filter=new Set(r[s]));const l=e.get("defaultKernelSourcesFilter").composite;u.kernelSources.filter=l};n(),e.changed.connect(n),t.sessionChanged.connect(n)}return u}},x={id:"@jupyterlab/debugger-extension:source-viewer",description:"Initialize the debugger sources viewer.",requires:[d.IDebugger,r.IEditorServices,d.IDebuggerSources,m.ITranslator],provides:d.IDebuggerSourceViewer,autoStart:!0,activate:async(e,t,n,a,i)=>{const r=new d.Debugger.ReadOnlyEditorFactory({editorServices:n}),{model:s}=t;s.callstack.currentFrameChanged.connect(((e,n)=>{var o,i,r,s,l,c,u,g,b;a.find({focus:!0,kernel:null!==(s=null===(r=null===(i=null===(o=t.session)||void 0===o?void 0:o.connection)||void 0===i?void 0:i.kernel)||void 0===r?void 0:r.name)&&void 0!==s?s:"",path:null!==(u=null===(c=null===(l=t.session)||void 0===l?void 0:l.connection)||void 0===c?void 0:c.path)&&void 0!==u?u:"",source:null!==(b=null===(g=null==n?void 0:n.source)||void 0===g?void 0:g.path)&&void 0!==b?b:""}).forEach((e=>{requestAnimationFrame((()=>{e.reveal().then((()=>{const t=e.get();t&&d.Debugger.EditorHandler.showCurrentLine(t,n.line)}))}))}))}));const c=(e,n)=>{var o,i,s,c,u,g,b;if(!e)return;const{content:p,mimeType:v,path:m}=e,h=a.find({focus:!0,kernel:null!==(c=null===(s=null===(i=null===(o=t.session)||void 0===o?void 0:o.connection)||void 0===i?void 0:i.kernel)||void 0===s?void 0:s.name)&&void 0!==c?c:"",path:null!==(b=null===(g=null===(u=t.session)||void 0===u?void 0:u.connection)||void 0===g?void 0:g.path)&&void 0!==b?b:"",source:m});if(h.length>0)return void(n&&void 0!==n.line&&h.forEach((e=>{e.reveal().then((()=>{var t;null===(t=e.get())||void 0===t||t.revealPosition({line:n.line-1,column:n.column||0})}))})));const I=r.createNewEditor({content:p,mimeType:v,path:m}),f=I.editor,y=new d.Debugger.EditorHandler({debuggerService:t,editorReady:()=>Promise.resolve(f),getEditor:()=>f,path:m,src:f.model.sharedModel});I.disposed.connect((()=>y.dispose())),a.open({label:l.PathExt.basename(m),caption:m,editorWrapper:I});const C=t.model.callstack.frame;C&&d.Debugger.EditorHandler.showCurrentLine(f,C.line)},u=i.load("jupyterlab");return e.commands.addCommand(d.Debugger.CommandIDs.openSource,{label:u.__("Open Source"),caption:u.__("Open Source"),isEnabled:()=>!!x,execute:async e=>{const n=e.path||"";if(!n)throw Error("Path to open is needed");if(!t.isStarted){if(!(await(0,o.showDialog)({title:u.__("Start debugger?"),body:u.__("The debugger service is needed to open the source %1",n),buttons:[o.Dialog.cancelButton({label:u.__("Cancel")}),o.Dialog.okButton({label:u.__("Start debugger")})]})).button.accept)return;await t.start()}const a=await t.getSource({path:n});return c(a)}}),Object.freeze({open:c})}},k={id:"@jupyterlab/debugger-extension:main",description:"Initialize the debugger user interface.",requires:[d.IDebugger,d.IDebuggerSidebar,r.IEditorServices,m.ITranslator],optional:[o.ICommandPalette,d.IDebuggerSourceViewer,a.ILabShell,a.ILayoutRestorer,g.ILoggerRegistry,v.ISettingRegistry],autoStart:!0,activate:async(e,t,n,a,r,s,c,u,g,b,v)=>{var m;const I=r.load("jupyterlab"),{commands:f,shell:y,serviceManager:C}=e,{kernelspecs:_}=C,D=d.Debugger.CommandIDs;if("true"!==l.PageConfig.getOption("alwaysShowDebuggerExtension").toLowerCase()){await _.ready;const e=null===(m=_.specs)||void 0===m?void 0:m.kernelspecs;if(!e)return;const t=Object.keys(e).some((t=>{var n,a,o;return!(null===(o=null===(a=null===(n=e[t])||void 0===n?void 0:n.metadata)||void 0===a?void 0:a.debugger)||void 0===o||!o)}));if(!t)return}const S=new p.RenderMimeRegistry({initialFactories:p.standardRendererFactories});f.addCommand(D.evaluate,{label:I.__("Evaluate Code"),caption:I.__("Evaluate Code"),icon:d.Debugger.Icons.evaluateIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{var e,n,o;const r=await(async()=>{var e,n,o;const i=null===(n=null===(e=t.session)||void 0===e?void 0:e.connection)||void 0===n?void 0:n.kernel;if(!i)return"";const r=(await i.info).language_info.name;return null!==(o=a.mimeTypeService.getMimeTypeByLanguage({name:r}))&&void 0!==o?o:""})(),s=await d.Debugger.Dialogs.getCode({title:I.__("Evaluate Code"),okLabel:I.__("Evaluate"),cancelLabel:I.__("Cancel"),mimeType:r,contentFactory:new i.CodeCell.ContentFactory({editorFactory:e=>a.factoryService.newInlineEditor(e)}),rendermime:S}),l=s.value;if(!s.button.accept||!l)return;const c=await t.evaluate(l);if(c){const a=c.result,i=null===(n=null===(e=null==t?void 0:t.session)||void 0===e?void 0:e.connection)||void 0===n?void 0:n.path,r=i?null===(o=null==b?void 0:b.getLogger)||void 0===o?void 0:o.call(b,i):void 0;r?r.log({type:"text",data:a,level:r.level}):console.debug(a)}}}),f.addCommand(D.debugContinue,{label:()=>t.hasStoppedThreads()?I.__("Continue"):I.__("Pause"),caption:()=>t.hasStoppedThreads()?I.__("Continue"):I.__("Pause"),icon:()=>t.hasStoppedThreads()?d.Debugger.Icons.continueIcon:d.Debugger.Icons.pauseIcon,isEnabled:()=>{var e,n;return null!==(n=null===(e=t.session)||void 0===e?void 0:e.isStarted)&&void 0!==n&&n},execute:async()=>{t.hasStoppedThreads()?await t.continue():await t.pause(),f.notifyCommandChanged(D.debugContinue)}}),f.addCommand(D.terminate,{label:I.__("Terminate"),caption:I.__("Terminate"),icon:d.Debugger.Icons.terminateIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.restart(),h(e)}}),f.addCommand(D.next,{label:I.__("Next"),caption:I.__("Next"),icon:d.Debugger.Icons.stepOverIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.next()}}),f.addCommand(D.stepIn,{label:I.__("Step In"),caption:I.__("Step In"),icon:d.Debugger.Icons.stepIntoIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.stepIn()}}),f.addCommand(D.stepOut,{label:I.__("Step Out"),caption:I.__("Step Out"),icon:d.Debugger.Icons.stepOutIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.stepOut()}}),f.addCommand(D.pauseOnExceptions,{label:e=>e.filter||"Breakpoints on exception",caption:e=>e.description,isToggled:e=>{var n;return(null===(n=t.session)||void 0===n?void 0:n.isPausingOnException(e.filter))||!1},isEnabled:()=>t.pauseOnExceptionsIsValid(),execute:async e=>{var n,a,i;if(null==e?void 0:e.filter){let n=e.filter;await t.pauseOnExceptionsFilter(n)}else{let e=[];null===(a=null===(n=t.session)||void 0===n?void 0:n.exceptionBreakpointFilters)||void 0===a||a.forEach((t=>{e.push(t.filter)}));const r=await o.InputDialog.getMultipleItems({title:I.__("Select a filter for breakpoints on exception"),items:e,defaults:(null===(i=t.session)||void 0===i?void 0:i.currentExceptionFilters)||[]});let s=r.button.accept?r.value:null;null!==s&&await t.pauseOnExceptions(s)}}});let w=!1;if(v){const e=await v.load(k.id),t=()=>{w=e.get("autoCollapseDebuggerSidebar").composite};t(),e.changed.connect(t)}if(t.eventMessage.connect(((t,a)=>{h(e),u&&"initialized"===a.event?u.activateById(n.id):u&&n.isVisible&&"terminated"===a.event&&w&&u.collapseRight()})),t.sessionChanged.connect((t=>{h(e)})),g&&g.add(n,"debugger-sidebar"),n.node.setAttribute("role","region"),n.node.setAttribute("aria-label",I.__("Debugger section")),n.title.caption=I.__("Debugger"),y.add(n,"right",{type:"Debugger"}),f.addCommand(D.showPanel,{label:I.__("Debugger Panel"),execute:()=>{y.activateById(n.id)}}),s){const e=I.__("Debugger");[D.debugContinue,D.terminate,D.next,D.stepIn,D.stepOut,D.evaluate,D.pauseOnExceptions].forEach((t=>{s.addItem({command:t,category:e})}))}if(c){const{model:e}=t,n=(e,t,n)=>{t&&c.open(t,n)};e.sources.currentSourceOpened.connect(((e,t)=>{c.open(t)})),e.kernelSources.kernelSourceOpened.connect(n),e.breakpoints.clicked.connect((async(e,n)=>{var a;const o=null===(a=n.source)||void 0===a?void 0:a.path,i=await t.getSource({sourceReference:0,path:o});c.open(i,n)}))}}},E=[C,I,f,y,S,w,k,D,x,_]}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2184],{42184:(e,t,n)=>{n.r(t),n.d(t,{default:()=>T});var a=n(73852),o=n(53876),i=n(6532),r=n(983),s=n(26177),l=n(20754),d=n(98596),c=n(23764),u=n(2522),g=n(38589),b=n(33729),p=n(58194),v=n(3012),m=n(93050);function h(e,t){t.hasStoppedThreads()?document.body.dataset.jpDebuggerStoppedThreads="true":delete document.body.dataset.jpDebuggerStoppedThreads,function(e){Object.values(d.Debugger.CommandIDs).forEach((t=>{e.hasCommand(t)&&e.notifyCommandChanged(t)}))}(e)}const I={id:"@jupyterlab/debugger-extension:consoles",description:"Add debugger capability to the consoles.",autoStart:!0,requires:[d.IDebugger,s.IConsoleTracker],optional:[a.ILabShell],activate:(e,t,n,a)=>{const o=new d.Debugger.Handler({type:"console",shell:e.shell,service:t}),i=async n=>{const{sessionContext:a}=n;await a.ready,await o.updateContext(n,a),h(e.commands,t)};a?a.currentChanged.connect(((e,t)=>{const n=t.newValue;n instanceof s.ConsolePanel&&i(n)})):n.currentChanged.connect(((e,t)=>{t&&i(t)}))}},f={id:"@jupyterlab/debugger-extension:files",description:"Adds debugger capabilities to files.",autoStart:!0,requires:[d.IDebugger,u.IEditorTracker],optional:[a.ILabShell],activate:(e,t,n,a)=>{const o=new d.Debugger.Handler({type:"file",shell:e.shell,service:t}),i={},r=async n=>{const a=e.serviceManager.sessions;try{const r=await a.findByPath(n.context.path);if(!r)return;let s=i[r.id];s||(s=a.connectTo({model:r}),i[r.id]=s),await o.update(n,s),h(e.commands,t)}catch(e){return}};a?a.currentChanged.connect(((e,t)=>{const n=t.newValue;if(n instanceof c.DocumentWidget){const{content:e}=n;e instanceof u.FileEditor&&r(n)}})):n.currentChanged.connect(((e,t)=>{t&&r(t)}))}},y={id:"@jupyterlab/debugger-extension:notebooks",description:"Adds debugger capability to notebooks and provides the debugger notebook handler.",autoStart:!0,requires:[d.IDebugger,b.INotebookTracker],optional:[a.ILabShell,o.ICommandPalette,o.ISessionContextDialogs,m.ITranslator],provides:d.IDebuggerHandler,activate:(e,t,n,a,i,r,s)=>{const l=null!=s?s:m.nullTranslator,c=null!=r?r:new o.SessionContextDialogs({translator:l}),u=new d.Debugger.Handler({type:"notebook",shell:e.shell,service:t}),g=l.load("jupyterlab");e.commands.addCommand(d.Debugger.CommandIDs.restartDebug,{label:g.__("Restart Kernel and Debug…"),caption:g.__("Restart Kernel and Debug…"),isEnabled:()=>t.isStarted,execute:async()=>{const e=t.getDebuggerState();await t.stop();const a=n.currentWidget;if(!a)return;const{content:o,sessionContext:i}=a;await c.restart(i)&&(await t.restoreDebuggerState(e),await u.updateWidget(a,i.session),await b.NotebookActions.runAll(o,i,c,l))}});const p=async n=>{if(n){const{sessionContext:e}=n;await e.ready,await u.updateContext(n,e)}h(e.commands,t)};return a?a.currentChanged.connect(((e,t)=>{const n=t.newValue;n instanceof b.NotebookPanel&&p(n)})):n.currentChanged.connect(((e,t)=>{t&&p(t)})),i&&i.addItem({category:"Notebook Operations",command:d.Debugger.CommandIDs.restartDebug}),u}},C={id:"@jupyterlab/debugger-extension:service",description:"Provides the debugger service.",autoStart:!0,provides:d.IDebugger,requires:[d.IDebuggerConfig],optional:[d.IDebuggerSources,m.ITranslator],activate:(e,t,n,a)=>new d.Debugger.Service({config:t,debuggerSources:n,specsManager:e.serviceManager.kernelspecs,translator:a})},D={id:"@jupyterlab/debugger-extension:config",description:"Provides the debugger configuration",provides:d.IDebuggerConfig,autoStart:!0,activate:()=>new d.Debugger.Config},_={id:"@jupyterlab/debugger-extension:sources",description:"Provides the source feature for debugging",autoStart:!0,provides:d.IDebuggerSources,requires:[d.IDebuggerConfig,r.IEditorServices],optional:[b.INotebookTracker,s.IConsoleTracker,u.IEditorTracker],activate:(e,t,n,a,o,i)=>new d.Debugger.Sources({config:t,shell:e.shell,editorServices:n,notebookTracker:a,consoleTracker:o,editorTracker:i})},S={id:"@jupyterlab/debugger-extension:variables",description:"Adds variables renderer and inspection in the debugger variable panel.",autoStart:!0,requires:[d.IDebugger,d.IDebuggerHandler,m.ITranslator],optional:[o.IThemeManager,p.IRenderMimeRegistry],activate:(e,t,n,a,i,r)=>{const s=a.load("jupyterlab"),{commands:l,shell:c}=e,u=new o.WidgetTracker({namespace:"debugger/inspect-variable"}),g=new o.WidgetTracker({namespace:"debugger/render-variable"}),p=d.Debugger.CommandIDs;l.addCommand(p.inspectVariable,{label:s.__("Inspect Variable"),caption:s.__("Inspect Variable"),isEnabled:e=>{var n,a,o,i;return!!(null===(n=t.session)||void 0===n?void 0:n.isStarted)&&Number(null!==(i=null!==(a=e.variableReference)&&void 0!==a?a:null===(o=t.model.variables.selectedVariable)||void 0===o?void 0:o.variablesReference)&&void 0!==i?i:0)>0},execute:async e=>{var n,a,r,s;let{variableReference:g,name:b}=e;g||(g=null===(n=t.model.variables.selectedVariable)||void 0===n?void 0:n.variablesReference),b||(b=null===(a=t.model.variables.selectedVariable)||void 0===a?void 0:a.name);const p=`jp-debugger-variable-${b}`;if(!b||!g||u.find((e=>e.id===p)))return;const v=await t.inspectVariable(g);if(!v||0===v.length)return;const m=t.model.variables,h=new o.MainAreaWidget({content:new d.Debugger.VariablesGrid({model:m,commands:l,scopes:[{name:b,variables:v}],themeManager:i})});h.addClass("jp-DebuggerVariables"),h.id=p,h.title.icon=d.Debugger.Icons.variableIcon,h.title.label=`${null===(s=null===(r=t.session)||void 0===r?void 0:r.connection)||void 0===s?void 0:s.name} - ${b}`,u.add(h);const I=()=>{h.dispose(),m.changed.disconnect(I)};m.changed.connect(I),c.add(h,"main",{mode:u.currentWidget?"split-right":"split-bottom",activate:!1,type:"Debugger Variables"})}}),l.addCommand(p.renderMimeVariable,{label:s.__("Render Variable"),caption:s.__("Render variable according to its mime type"),isEnabled:()=>{var e;return!!(null===(e=t.session)||void 0===e?void 0:e.isStarted)},isVisible:()=>t.model.hasRichVariableRendering&&(null!==r||n.activeWidget instanceof b.NotebookPanel),execute:e=>{var o,i,s,l,u,p,v,m;let{name:h,frameId:I}=e;h||(h=null===(o=t.model.variables.selectedVariable)||void 0===o?void 0:o.name),I||(I=null===(i=t.model.callstack.frame)||void 0===i?void 0:i.id);const f=n.activeWidget;let y=f instanceof b.NotebookPanel?f.content.rendermime:r;if(!y)return;const C=`jp-debugger-variable-mime-${h}-${null===(l=null===(s=t.session)||void 0===s?void 0:s.connection)||void 0===l?void 0:l.path.replace("/","-")}`;if(!h||g.find((e=>e.id===C))||!I&&t.hasStoppedThreads())return;const D=t.model.variables,_=new d.Debugger.VariableRenderer({dataLoader:()=>t.inspectRichVariable(h,I),rendermime:y,translator:a});_.addClass("jp-DebuggerRichVariable"),_.id=C,_.title.icon=d.Debugger.Icons.variableIcon,_.title.label=`${h} - ${null===(p=null===(u=t.session)||void 0===u?void 0:u.connection)||void 0===p?void 0:p.name}`,_.title.caption=`${h} - ${null===(m=null===(v=t.session)||void 0===v?void 0:v.connection)||void 0===m?void 0:m.path}`,g.add(_);const S=()=>{_.dispose(),D.changed.disconnect(w),null==f||f.disposed.disconnect(S)},w=()=>{n.activeWidget===f&&_.refresh()};_.disposed.connect(S),D.changed.connect(w),null==f||f.disposed.connect(S),c.add(_,"main",{mode:g.currentWidget?"split-right":"split-bottom",activate:!1,type:"Debugger Variables"})}}),l.addCommand(p.copyToClipboard,{label:s.__("Copy to Clipboard"),caption:s.__("Copy text representation of the value to clipboard"),isEnabled:()=>{var e,n;return!!(null===(e=t.session)||void 0===e?void 0:e.isStarted)&&!!(null===(n=t.model.variables.selectedVariable)||void 0===n?void 0:n.value)},isVisible:()=>n.activeWidget instanceof b.NotebookPanel,execute:async()=>{const e=t.model.variables.selectedVariable.value;e&&o.Clipboard.copyToSystem(e)}}),l.addCommand(p.copyToGlobals,{label:s.__("Copy Variable to Globals"),caption:s.__("Copy variable to globals scope"),isEnabled:()=>{var e;return!!(null===(e=t.session)||void 0===e?void 0:e.isStarted)},isVisible:()=>n.activeWidget instanceof b.NotebookPanel&&t.model.supportCopyToGlobals,execute:async e=>{const n=t.model.variables.selectedVariable.name;await t.copyToGlobals(n)}})}},w={id:"@jupyterlab/debugger-extension:sidebar",description:"Provides the debugger sidebar.",provides:d.IDebuggerSidebar,requires:[d.IDebugger,r.IEditorServices,m.ITranslator],optional:[o.IThemeManager,v.ISettingRegistry],autoStart:!0,activate:async(e,t,n,a,o,i)=>{const{commands:r}=e,s=d.Debugger.CommandIDs,l={registry:r,continue:s.debugContinue,terminate:s.terminate,next:s.next,stepIn:s.stepIn,stepOut:s.stepOut,evaluate:s.evaluate},c={registry:r,pauseOnExceptions:s.pauseOnExceptions},u=new d.Debugger.Sidebar({service:t,callstackCommands:l,breakpointsCommands:c,editorServices:n,themeManager:o,translator:a});if(i){const e=await i.load(k.id),n=()=>{var n,a,o,i;const r=e.get("variableFilters").composite,s=null!==(i=null===(o=null===(a=null===(n=t.session)||void 0===n?void 0:n.connection)||void 0===a?void 0:a.kernel)||void 0===o?void 0:o.name)&&void 0!==i?i:"";s&&r[s]&&(u.variables.filter=new Set(r[s]));const l=e.get("defaultKernelSourcesFilter").composite;u.kernelSources.filter=l};n(),e.changed.connect(n),t.sessionChanged.connect(n)}return u}},x={id:"@jupyterlab/debugger-extension:source-viewer",description:"Initialize the debugger sources viewer.",requires:[d.IDebugger,r.IEditorServices,d.IDebuggerSources,m.ITranslator],provides:d.IDebuggerSourceViewer,autoStart:!0,activate:async(e,t,n,a,i)=>{const r=new d.Debugger.ReadOnlyEditorFactory({editorServices:n}),{model:s}=t;s.callstack.currentFrameChanged.connect(((e,n)=>{var o,i,r,s,l,c,u,g,b;a.find({focus:!0,kernel:null!==(s=null===(r=null===(i=null===(o=t.session)||void 0===o?void 0:o.connection)||void 0===i?void 0:i.kernel)||void 0===r?void 0:r.name)&&void 0!==s?s:"",path:null!==(u=null===(c=null===(l=t.session)||void 0===l?void 0:l.connection)||void 0===c?void 0:c.path)&&void 0!==u?u:"",source:null!==(b=null===(g=null==n?void 0:n.source)||void 0===g?void 0:g.path)&&void 0!==b?b:""}).forEach((e=>{requestAnimationFrame((()=>{e.reveal().then((()=>{const t=e.get();t&&d.Debugger.EditorHandler.showCurrentLine(t,n.line)}))}))}))}));const c=(e,n)=>{var o,i,s,c,u,g,b;if(!e)return;const{content:p,mimeType:v,path:m}=e,h=a.find({focus:!0,kernel:null!==(c=null===(s=null===(i=null===(o=t.session)||void 0===o?void 0:o.connection)||void 0===i?void 0:i.kernel)||void 0===s?void 0:s.name)&&void 0!==c?c:"",path:null!==(b=null===(g=null===(u=t.session)||void 0===u?void 0:u.connection)||void 0===g?void 0:g.path)&&void 0!==b?b:"",source:m});if(h.length>0)return void(n&&void 0!==n.line&&h.forEach((e=>{e.reveal().then((()=>{var t;null===(t=e.get())||void 0===t||t.revealPosition({line:n.line-1,column:n.column||0})}))})));const I=r.createNewEditor({content:p,mimeType:v,path:m}),f=I.editor,y=new d.Debugger.EditorHandler({debuggerService:t,editorReady:()=>Promise.resolve(f),getEditor:()=>f,path:m,src:f.model.sharedModel});I.disposed.connect((()=>y.dispose())),a.open({label:l.PathExt.basename(m),caption:m,editorWrapper:I});const C=t.model.callstack.frame;C&&d.Debugger.EditorHandler.showCurrentLine(f,C.line)},u=i.load("jupyterlab");return e.commands.addCommand(d.Debugger.CommandIDs.openSource,{label:u.__("Open Source"),caption:u.__("Open Source"),isEnabled:()=>!!x,execute:async e=>{const n=e.path||"";if(!n)throw Error("Path to open is needed");if(!t.isStarted){if(!(await(0,o.showDialog)({title:u.__("Start debugger?"),body:u.__("The debugger service is needed to open the source %1",n),buttons:[o.Dialog.cancelButton({label:u.__("Cancel")}),o.Dialog.okButton({label:u.__("Start debugger")})]})).button.accept)return;await t.start()}const a=await t.getSource({path:n});return c(a)}}),Object.freeze({open:c})}},k={id:"@jupyterlab/debugger-extension:main",description:"Initialize the debugger user interface.",requires:[d.IDebugger,d.IDebuggerSidebar,r.IEditorServices,m.ITranslator],optional:[o.ICommandPalette,d.IDebuggerSourceViewer,a.ILabShell,a.ILayoutRestorer,g.ILoggerRegistry,v.ISettingRegistry],autoStart:!0,activate:async(e,t,n,a,r,s,c,u,g,b,v)=>{var m;const I=r.load("jupyterlab"),{commands:f,shell:y,serviceManager:C}=e,{kernelspecs:D}=C,_=d.Debugger.CommandIDs;if("true"!==l.PageConfig.getOption("alwaysShowDebuggerExtension").toLowerCase()){await D.ready;const e=null===(m=D.specs)||void 0===m?void 0:m.kernelspecs;if(!e)return;const t=Object.keys(e).some((t=>{var n,a,o;return!(null===(o=null===(a=null===(n=e[t])||void 0===n?void 0:n.metadata)||void 0===a?void 0:a.debugger)||void 0===o||!o)}));if(!t)return}const S=new p.RenderMimeRegistry({initialFactories:p.standardRendererFactories});f.addCommand(_.evaluate,{label:I.__("Evaluate Code"),caption:I.__("Evaluate Code"),icon:d.Debugger.Icons.evaluateIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{var e,n,o;const r=await(async()=>{var e,n,o;const i=null===(n=null===(e=t.session)||void 0===e?void 0:e.connection)||void 0===n?void 0:n.kernel;if(!i)return"";const r=(await i.info).language_info.name;return null!==(o=a.mimeTypeService.getMimeTypeByLanguage({name:r}))&&void 0!==o?o:""})(),s=await d.Debugger.Dialogs.getCode({title:I.__("Evaluate Code"),okLabel:I.__("Evaluate"),cancelLabel:I.__("Cancel"),mimeType:r,contentFactory:new i.CodeCell.ContentFactory({editorFactory:e=>a.factoryService.newInlineEditor(e)}),rendermime:S}),l=s.value;if(!s.button.accept||!l)return;const c=await t.evaluate(l);if(c){const a=c.result,i=null===(n=null===(e=null==t?void 0:t.session)||void 0===e?void 0:e.connection)||void 0===n?void 0:n.path,r=i?null===(o=null==b?void 0:b.getLogger)||void 0===o?void 0:o.call(b,i):void 0;r?r.log({type:"text",data:a,level:r.level}):console.debug(a)}}}),f.addCommand(_.debugContinue,{label:()=>t.hasStoppedThreads()?I.__("Continue"):I.__("Pause"),caption:()=>t.hasStoppedThreads()?I.__("Continue"):I.__("Pause"),icon:()=>t.hasStoppedThreads()?d.Debugger.Icons.continueIcon:d.Debugger.Icons.pauseIcon,isEnabled:()=>{var e,n;return null!==(n=null===(e=t.session)||void 0===e?void 0:e.isStarted)&&void 0!==n&&n},execute:async()=>{t.hasStoppedThreads()?await t.continue():await t.pause(),f.notifyCommandChanged(_.debugContinue)}}),f.addCommand(_.terminate,{label:I.__("Terminate"),caption:I.__("Terminate"),icon:d.Debugger.Icons.terminateIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.restart(),h(e.commands,t)}}),f.addCommand(_.next,{label:I.__("Next"),caption:I.__("Next"),icon:d.Debugger.Icons.stepOverIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.next()}}),f.addCommand(_.stepIn,{label:I.__("Step In"),caption:I.__("Step In"),icon:d.Debugger.Icons.stepIntoIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.stepIn()}}),f.addCommand(_.stepOut,{label:I.__("Step Out"),caption:I.__("Step Out"),icon:d.Debugger.Icons.stepOutIcon,isEnabled:()=>t.hasStoppedThreads(),execute:async()=>{await t.stepOut()}}),f.addCommand(_.pauseOnExceptions,{label:e=>e.filter||"Breakpoints on exception",caption:e=>e.description,isToggled:e=>{var n;return(null===(n=t.session)||void 0===n?void 0:n.isPausingOnException(e.filter))||!1},isEnabled:()=>t.pauseOnExceptionsIsValid(),execute:async e=>{var n,a,i;if(null==e?void 0:e.filter){let n=e.filter;await t.pauseOnExceptionsFilter(n)}else{let e=[];null===(a=null===(n=t.session)||void 0===n?void 0:n.exceptionBreakpointFilters)||void 0===a||a.forEach((t=>{e.push(t.filter)}));const r=await o.InputDialog.getMultipleItems({title:I.__("Select a filter for breakpoints on exception"),items:e,defaults:(null===(i=t.session)||void 0===i?void 0:i.currentExceptionFilters)||[]});let s=r.button.accept?r.value:null;null!==s&&await t.pauseOnExceptions(s)}}});let w=!1;if(v){const e=await v.load(k.id),t=()=>{w=e.get("autoCollapseDebuggerSidebar").composite};t(),e.changed.connect(t)}if(t.eventMessage.connect(((a,o)=>{h(e.commands,t),u&&"initialized"===o.event?u.activateById(n.id):u&&n.isVisible&&"terminated"===o.event&&w&&u.collapseRight()})),t.sessionChanged.connect((n=>{h(e.commands,t)})),g&&g.add(n,"debugger-sidebar"),n.node.setAttribute("role","region"),n.node.setAttribute("aria-label",I.__("Debugger section")),n.title.caption=I.__("Debugger"),y.add(n,"right",{type:"Debugger"}),f.addCommand(_.showPanel,{label:I.__("Debugger Panel"),execute:()=>{y.activateById(n.id)}}),s){const e=I.__("Debugger");[_.debugContinue,_.terminate,_.next,_.stepIn,_.stepOut,_.evaluate,_.pauseOnExceptions].forEach((t=>{s.addItem({command:t,category:e})}))}if(c){const{model:e}=t,n=(e,t,n)=>{t&&c.open(t,n)};e.sources.currentSourceOpened.connect(((e,t)=>{c.open(t)})),e.kernelSources.kernelSourceOpened.connect(n),e.breakpoints.clicked.connect((async(e,n)=>{var a;const o=null===(a=n.source)||void 0===a?void 0:a.path,i=await t.getSource({sourceReference:0,path:o});c.open(i,n)}))}}},T=[C,I,f,y,S,w,k,_,x,D]}}]);
|
notebook/static/2311.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2311],{22311:(e,n,t)=>{t.r(n),t.d(n,{default:()=>m});var a=t(
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2311],{22311:(e,n,t)=>{t.r(n),t.d(n,{default:()=>m});var a=t(73852),i=t(53876),o=t(98922),s=t(3012),l=t(93050),d=t(76878);const r="@jupyterlab/extensionmanager-extension:plugin";var c;!function(e){e.showPanel="extensionmanager:show-panel",e.toggle="extensionmanager:toggle"}(c||(c={}));const g={id:r,description:"Adds the extension manager plugin.",autoStart:!0,requires:[s.ISettingRegistry],optional:[l.ITranslator,a.ILayoutRestorer,i.ICommandPalette],activate:async(e,n,t,a,i)=>{const{commands:s,shell:m,serviceManager:b}=e,h=(t=null!=t?t:l.nullTranslator).load("jupyterlab"),p=new o.ListModel(b,t),_=()=>{const e=new o.ExtensionsPanel({model:p,translator:t});return e.id="extensionmanager.main-view",e.title.icon=d.extensionIcon,e.title.caption=h.__("Extension Manager"),e.node.setAttribute("role","region"),e.node.setAttribute("aria-label",h.__("Extension Manager section")),a&&a.add(e,e.id),m.add(e,"left",{rank:1e3}),e};let E=_();Promise.all([e.restored,n.load(r)]).then((([,n])=>{p.isDisclaimed=n.get("disclaimed").composite,p.isEnabled=n.get("enabled").composite,p.stateChanged.connect((()=>{p.isDisclaimed!==n.get("disclaimed").composite&&n.set("disclaimed",p.isDisclaimed).catch((e=>{console.error(`Failed to set setting 'disclaimed'.\n${e}`)})),p.isEnabled!==n.get("enabled").composite&&n.set("enabled",p.isEnabled).catch((e=>{console.error(`Failed to set setting 'enabled'.\n${e}`)}))})),p.isEnabled?E=null!=E?E:_():(null==E||E.dispose(),E=null),n.changed.connect((async()=>{if(p.isDisclaimed=n.get("disclaimed").composite,p.isEnabled=n.get("enabled").composite,e.commands.notifyCommandChanged(c.toggle),p.isEnabled){if(!(null!==E&&E.isAttached||await u.showWarning(h)))return void n.set("enabled",!1);E=null!=E?E:_()}else null==E||E.dispose(),E=null}))})).catch((e=>{console.error(`Something went wrong when reading the settings.\n${e}`)})),s.addCommand(c.showPanel,{label:h.__("Extension Manager"),execute:()=>{E&&m.activateById(E.id)},isVisible:()=>p.isEnabled}),s.addCommand(c.toggle,{label:h.__("Enable Extension Manager"),execute:()=>{n&&n.set(g.id,"enabled",!p.isEnabled)},isToggled:()=>p.isEnabled}),i&&i.addItem({command:c.toggle,category:h.__("Extension Manager")})}},m=g;var u;!function(e){e.showWarning=async function(e){return(await(0,i.showDialog)({title:e.__("Enable Extension Manager?"),body:e.__("Thanks for trying out JupyterLab's extension manager.\nThe JupyterLab development team is excited to have a robust\nthird-party extension community.\nHowever, we cannot vouch for every extension,\nand some may introduce security risks.\nDo you want to continue?"),buttons:[i.Dialog.cancelButton({label:e.__("Disable")}),i.Dialog.warnButton({label:e.__("Enable")})]})).button.accept}}(u||(u={}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3030],{92323:(t,e,n)=>{n.r(e),n.d(e,{Annotation:()=>lt,AnnotationType:()=>at,ChangeDesc:()=>M,ChangeSet:()=>A,CharCategory:()=>wt,Compartment:()=>K,EditorSelection:()=>L,EditorState:()=>yt,Facet:()=>j,Line:()=>f,MapMode:()=>E,Prec:()=>Y,Range:()=>Pt,RangeSet:()=>At,RangeSetBuilder:()=>Rt,RangeValue:()=>bt,SelectionRange:()=>J,StateEffect:()=>ft,StateEffectType:()=>ct,StateField:()=>W,Text:()=>i,Transaction:()=>ut,codePointAt:()=>y,codePointSize:()=>b,combineConfig:()=>It,countColumn:()=>qt,findClusterBreak:()=>v,findColumn:()=>$t,fromCodePoint:()=>I});class i{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=u(this,t,e);let i=[];return this.decompose(0,t,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(e,this.length,i,1),r.from(i,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=u(this,t,e);let n=[];return this.decompose(t,e,n,0),r.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new l(this),s=new l(t);for(let t=e,r=e;;){if(i.next(t),s.next(t),t=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(r+=i.value.length,i.done||r>=n)return!0}}iter(t=1){return new l(this,t)}iterRange(t,e=this.length){return new a(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):r.from(s.split(t,[])):i.empty}}class s extends i{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.text[s],h=i+r.length;if((e?n:h)>=t)return new f(i,h,n,r);i=h+1,n++}}decompose(t,e,n,i){let r=t<=0&&e>=this.length?this:new s(o(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){let t=n.pop(),e=h(r.text,t.text.slice(),0,r.length);if(e.length<=32)n.push(new s(e,t.length+r.length));else{let t=e.length>>1;n.push(new s(e.slice(0,t)),new s(e.slice(t)))}}else n.push(r)}replace(t,e,n){if(!(n instanceof s))return super.replace(t,e,n);[t,e]=u(this,t,e);let i=h(this.text,h(n.text,o(this.text,0,t)),e),l=this.length+n.length-(e-t);return i.length<=32?new s(i,l):r.from(s.split(i,[]),l)}sliceString(t,e=this.length,n="\n"){[t,e]=u(this,t,e);let i="";for(let s=0,r=0;s<=e&&r<this.text.length;r++){let h=this.text[r],o=s+h.length;s>t&&r&&(i+=n),t<o&&e>s&&(i+=h.slice(Math.max(0,t-s),e-s)),s=o+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],i=-1;for(let r of t)n.push(r),i+=r.length+1,32==n.length&&(e.push(new s(n,i)),n=[],i=-1);return i>-1&&e.push(new s(n,i)),e}}class r extends i{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.children[s],h=i+r.length,o=n+r.lines-1;if((e?o:h)>=t)return r.lineInner(t,e,n,i);i=h+1,n=o+1}}decompose(t,e,n,i){for(let s=0,r=0;r<=e&&s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(t<=o&&e>=r){let s=i&((r<=t?1:0)|(o>=e?2:0));r>=t&&o<=e&&!s?n.push(h):h.decompose(t-r,e-r,n,s)}r=o+1}}replace(t,e,n){if([t,e]=u(this,t,e),n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let h=this.children[i],o=s+h.length;if(t>=s&&e<=o){let l=h.replace(t-s,e-s,n),a=this.lines-h.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let s=this.children.slice();return s[i]=l,new r(s,this.length-(e-t)+n.length)}return super.replace(s,o,l)}s=o+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=u(this,t,e);let i="";for(let s=0,r=0;s<this.children.length&&r<=e;s++){let h=this.children[s],o=r+h.length;r>t&&s&&(i+=n),t<o&&e>r&&(i+=h.sliceString(t-r,e-r,n)),r=o+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof r))return 0;let n=0,[i,s,h,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=e,s+=e){if(i==h||s==o)return n;let r=this.children[i],l=t.children[s];if(r!=l)return n+r.scanIdentical(l,e);n+=r.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let n=0;for(let e of t)n+=e.lines;if(n<32){let n=[];for(let e of t)e.flatten(n);return new s(n,e)}let i=Math.max(32,n>>5),h=i<<1,o=i>>1,l=[],a=0,c=-1,f=[];function u(t){let e;if(t.lines>h&&t instanceof r)for(let e of t.children)u(e);else t.lines>o&&(a>o||!a)?(g(),l.push(t)):t instanceof s&&a&&(e=f[f.length-1])instanceof s&&t.lines+e.lines<=32?(a+=t.lines,c+=t.length+1,f[f.length-1]=new s(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>i&&g(),a+=t.lines,c+=t.length+1,f.push(t))}function g(){0!=a&&(l.push(1==f.length?f[0]:r.from(f,c)),c=-1,a=f.length=0)}for(let e of t)u(e);return g(),1==l.length?l[0]:new r(l,e)}}function h(t,e,n=0,i=1e9){for(let s=0,r=0,h=!0;r<t.length&&s<=i;r++){let o=t[r],l=s+o.length;l>=n&&(l>i&&(o=o.slice(0,i-s)),s<n&&(o=o.slice(n-s)),h?(e[e.length-1]+=o,h=!1):e.push(o)),s=l+1}return e}function o(t,e,n){return h(t,[""],e,n)}i.empty=new s([""],0);class l{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],h=r>>1,o=i instanceof s?i.text.length:i.children.length;if(h==(e>0?o:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(i instanceof s){let s=i.text[h+(e<0?-1:0)];if(this.offsets[n]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let r=i.children[h+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof s?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class a{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new l(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class c{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=function(){return this.iter()},l.prototype[Symbol.iterator]=a.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this});class f{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}function u(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}let g="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let t=1;t<g.length;t++)g[t]+=g[t-1];function d(t){for(let e=1;e<g.length;e+=2)if(g[e]>t)return g[e-1]<=t;return!1}function p(t){return t>=127462&&t<=127487}const m=8205;function v(t,e,n=!0,i=!0){return(n?x:w)(t,e,i)}function x(t,e,n){if(e==t.length)return e;e&&k(t.charCodeAt(e))&&S(t.charCodeAt(e-1))&&e--;let i=y(t,e);for(e+=b(i);e<t.length;){let s=y(t,e);if(i==m||s==m||n&&d(s))e+=b(s),i=s;else{if(!p(s))break;{let n=0,i=e-2;for(;i>=0&&p(y(t,i));)n++,i-=2;if(n%2==0)break;e+=2}}}return e}function w(t,e,n){for(;e>0;){let i=x(t,e-2,n);if(i<e)return i;e--}return 0}function k(t){return t>=56320&&t<57344}function S(t){return t>=55296&&t<56320}function y(t,e){let n=t.charCodeAt(e);if(!S(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return k(i)?i-56320+(n-55296<<10)+65536:n}function I(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function b(t){return t<65536?1:2}const P=/\r\n?|\n/;var E=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(E||(E={}));class M{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,i=0;e<this.sections.length;){let s=this.sections[e++],r=this.sections[e++];r<0?(t(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(t,e=!1){O(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];i<0?t.push(n,i):t.push(i,n)}return new M(t)}composeDesc(t){return this.empty?t:t.empty?this:B(this,t)}mapDesc(t,e=!1){return t.empty?this:T(this,t,e)}mapPos(t,e=-1,n=E.Simple){let i=0,s=0;for(let r=0;r<this.sections.length;){let h=this.sections[r++],o=this.sections[r++],l=i+h;if(o<0){if(l>t)return s+(t-i);s+=h}else{if(n!=E.Simple&&l>=t&&(n==E.TrackDel&&i<t&&l>t||n==E.TrackBefore&&i<t||n==E.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!h)return t==i||e<0?s:s+o;s+=o}i=l}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return s}touchesRange(t,e=t){for(let n=0,i=0;n<this.sections.length&&i<=e;){let s=i+this.sections[n++];if(this.sections[n++]>=0&&i<=e&&s>=t)return!(i<t&&s>e)||"cover";i=s}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];t+=(t?" ":"")+n+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new M(t)}static create(t){return new M(t)}}class A extends M{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return O(this,((e,n,i,s,r)=>t=t.replace(i,i+(n-e),r)),!1),t}mapDesc(t,e=!1){return T(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let s=0,r=0;s<e.length;s+=2){let h=e[s],o=e[s+1];if(o>=0){e[s]=o,e[s+1]=h;let l=s>>1;for(;n.length<l;)n.push(i.empty);n.push(h?t.slice(r,r+h):i.empty)}r+=h}return new A(e,n)}compose(t){return this.empty?t:t.empty?this:B(this,t,!0)}map(t,e=!1){return t.empty?this:T(this,t,e,!0)}iterChanges(t,e=!1){O(this,t,e)}get desc(){return M.create(this.sections)}filter(t){let e=[],n=[],i=[],s=new F(this);t:for(let r=0,h=0;;){let o=r==t.length?1e9:t[r++];for(;h<o||h==o&&0==s.len;){if(s.done)break t;let t=Math.min(s.len,o-h);R(i,t,-1);let r=-1==s.ins?-1:0==s.off?s.ins:0;R(e,t,r),r>0&&C(n,e,s.text),s.forward(t),h+=t}let l=t[r++];for(;h<l;){if(s.done)break t;let t=Math.min(s.len,l-h);R(e,t,-1),R(i,t,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(t),h+=t}}return{changes:new A(e,n),filtered:M.create(i)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],i=this.sections[e+1];i<0?t.push(n):0==i?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,n){let s=[],r=[],h=0,o=null;function l(t=!1){if(!t&&!s.length)return;h<e&&R(s,e-h,-1);let n=new A(s,r);o=o?o.compose(n.map(o)):n,s=[],r=[],h=0}return function t(a){if(Array.isArray(a))for(let e of a)t(e);else if(a instanceof A){if(a.length!=e)throw new RangeError(`Mismatched change set length (got ${a.length}, expected ${e})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:t,to:o=t,insert:c}=a;if(t>o||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let f=c?"string"==typeof c?i.of(c.split(n||P)):c:i.empty,u=f.length;if(t==o&&0==u)return;t<h&&l(),t>h&&R(s,t-h,-1),R(s,o-t,u),C(r,s,f),h=o}}(t),l(!o),o}static empty(t){return new A(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let s=0;s<t.length;s++){let r=t[s];if("number"==typeof r)e.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)e.push(r[0],0);else{for(;n.length<s;)n.push(i.empty);n[s]=i.of(r.slice(1)),e.push(r[0],n[s].length)}}}return new A(e,n)}static createSet(t,e){return new A(t,e)}}function R(t,e,n,i=!1){if(0==e&&n<=0)return;let s=t.length-2;s>=0&&n<=0&&n==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=n:i?(t[s]+=e,t[s+1]+=n):t.push(e,n)}function C(t,e,n){if(0==n.length)return;let s=e.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<s;)t.push(i.empty);t.push(n)}}function O(t,e,n){let s=t.inserted;for(let r=0,h=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)r+=l,h+=l;else{let c=r,f=h,u=i.empty;for(;c+=l,f+=a,a&&s&&(u=u.append(s[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];e(r,c,h,f,u),r=c,h=f}}}function T(t,e,n,i=!1){let s=[],r=i?[]:null,h=new F(t),o=new F(e);for(let t=-1;;)if(-1==h.ins&&-1==o.ins){let t=Math.min(h.len,o.len);R(s,t,-1),h.forward(t),o.forward(t)}else if(o.ins>=0&&(h.ins<0||t==h.i||0==h.off&&(o.len<h.len||o.len==h.len&&!n))){let e=o.len;for(R(s,o.ins,-1);e;){let n=Math.min(h.len,e);h.ins>=0&&t<h.i&&h.len<=n&&(R(s,0,h.ins),r&&C(r,s,h.text),t=h.i),h.forward(n),e-=n}o.next()}else{if(!(h.ins>=0)){if(h.done&&o.done)return r?A.createSet(s,r):M.create(s);throw new Error("Mismatched change set lengths")}{let e=0,n=h.len;for(;n;)if(-1==o.ins){let t=Math.min(n,o.len);e+=t,n-=t,o.forward(t)}else{if(!(0==o.ins&&o.len<n))break;n-=o.len,o.next()}R(s,e,t<h.i?h.ins:0),r&&t<h.i&&C(r,s,h.text),t=h.i,h.forward(h.len-n)}}}function B(t,e,n=!1){let i=[],s=n?[]:null,r=new F(t),h=new F(e);for(let t=!1;;){if(r.done&&h.done)return s?A.createSet(i,s):M.create(i);if(0==r.ins)R(i,r.len,0,t),r.next();else if(0!=h.len||h.done){if(r.done||h.done)throw new Error("Mismatched change set lengths");{let e=Math.min(r.len2,h.len),n=i.length;if(-1==r.ins){let n=-1==h.ins?-1:h.off?0:h.ins;R(i,e,n,t),s&&n&&C(s,i,h.text)}else-1==h.ins?(R(i,r.off?0:r.len,e,t),s&&C(s,i,r.textBit(e))):(R(i,r.off?0:r.len,h.off?0:h.ins,t),s&&!h.off&&C(s,i,h.text));t=(r.ins>e||h.ins>=0&&h.len>e)&&(t||i.length>n),r.forward2(e),h.forward(e)}}else R(i,0,h.ins,t),s&&C(s,i,h.text),h.next()}}class F{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?i.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?i.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class J{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new J(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return L.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return L.range(this.anchor,n)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return L.range(t.anchor,t.head)}static create(t,e,n){return new J(t,e,n)}}class L{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:L.create(this.ranges.map((n=>n.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new L([this.main],0)}addRange(t,e=!0){return L.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,L.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new L(t.ranges.map((t=>J.fromJSON(t))),t.main)}static single(t,e=t){return new L([L.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<t.length;i++){let s=t[i];if(s.empty?s.from<=n:s.from<n)return L.normalized(t.slice(),e);n=s.to}return new L(t,e)}static cursor(t,e=0,n,i){return J.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(t,e,n,i){let s=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return e<t?J.create(e,t,48|s):J.create(t,e,(e>t?8:0)|s)}static normalized(t,e=0){let n=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(n);for(let n=1;n<t.length;n++){let i=t[n],s=t[n-1];if(i.empty?i.from<=s.to:i.from<s.to){let r=s.from,h=Math.max(i.to,s.to);n<=e&&e--,t.splice(--n,2,i.anchor>i.head?L.range(h,r):L.range(r,h))}}return new L(t,e)}}function N(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let D=0;class j{constructor(t,e,n,i,s){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=D++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new j(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:q),!!t.static,t.enables)}of(t){return new $([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(n=>e(n.field(t))))}}function q(t,e){return t==e||t.length==e.length&&t.every(((t,n)=>t===e[n]))}class ${constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=D++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,s=this.id,r=t[s]>>1,h=2==this.type,o=!1,l=!1,a=[];for(let n of this.dependencies)"doc"==n?o=!0:"selection"==n?l=!0:0==(1&(null!==(e=t[n.id])&&void 0!==e?e:1))&&a.push(t[n.id]);return{create:t=>(t.values[r]=n(t),1),update(t,e){if(o&&e.docChanged||l&&(e.docChanged||e.selection)||z(t,a)){let e=n(t);if(h?!_(e,t.values[r],i):!i(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let o,l=e.config.address[s];if(null!=l){let s=tt(e,l);if(this.dependencies.every((n=>n instanceof j?e.facet(n)===t.facet(n):!(n instanceof W)||e.field(n,!1)==t.field(n,!1)))||(h?_(o=n(t),s,i):i(o=n(t),s)))return t.values[r]=s,0}else o=n(t);return t.values[r]=o,1}}}}function _(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function z(t,e){let n=!1;for(let i of e)1&Z(t,i)&&(n=!0);return n}function V(t,e,n){let i=n.map((e=>t[e.id])),s=n.map((t=>t.type)),r=i.filter((t=>!(1&t))),h=t[e.id]>>1;function o(t){let n=[];for(let e=0;e<i.length;e++){let r=tt(t,i[e]);if(2==s[e])for(let t of r)n.push(t);else n.push(r)}return e.combine(n)}return{create(t){for(let e of i)Z(t,e);return t.values[h]=o(t),1},update(t,n){if(!z(t,r))return 0;let i=o(t);return e.compare(i,t.values[h])?0:(t.values[h]=i,1)},reconfigure(t,s){let r=z(t,i),l=s.config.facets[e.id],a=s.facet(e);if(l&&!r&&q(n,l))return t.values[h]=a,0;let c=o(t);return e.compare(c,a)?(t.values[h]=a,0):(t.values[h]=c,1)}}}const U=j.define({static:!0});class W{constructor(t,e,n,i,s){this.id=t,this.createF=e,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(t){let e=new W(D++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(U).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],s=this.updateF(i,n);return this.compareF(i,s)?0:(t.values[e]=s,1)},reconfigure:(t,n)=>null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,U.of({field:this,create:t})]}get extension(){return this}}function G(t){return e=>new H(e,t)}const Y={highest:G(0),high:G(1),default:G(2),low:G(3),lowest:G(4)};class H{constructor(t,e){this.inner=t,this.prec=e}}class K{of(t){return new Q(this,t)}reconfigure(t){return K.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Q{constructor(t,e){this.compartment=t,this.inner=e}}class X{constructor(t,e,n,i,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){let i=[],s=Object.create(null),r=new Map;for(let n of function(t,e,n){let i=[[],[],[],[],[]],s=new Map;return function t(r,h){let o=s.get(r);if(null!=o){if(o<=h)return;let t=i[o].indexOf(r);t>-1&&i[o].splice(t,1),r instanceof Q&&n.delete(r.compartment)}if(s.set(r,h),Array.isArray(r))for(let e of r)t(e,h);else if(r instanceof Q){if(n.has(r.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=e.get(r.compartment)||r.inner;n.set(r.compartment,i),t(i,h)}else if(r instanceof H)t(r.inner,r.prec);else if(r instanceof W)i[h].push(r),r.provides&&t(r.provides,h);else if(r instanceof $)i[h].push(r),r.facet.extensions&&t(r.facet.extensions,2);else{let e=r.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,h)}}(t,2),i.reduce(((t,e)=>t.concat(e)))}(t,e,r))n instanceof W?i.push(n):(s[n.facet.id]||(s[n.facet.id]=[])).push(n);let h=Object.create(null),o=[],l=[];for(let t of i)h[t.id]=l.length<<1,l.push((e=>t.slot(e)));let a=null==n?void 0:n.config.facets;for(let t in s){let e=s[t],i=e[0].facet,r=a&&a[t]||[];if(e.every((t=>0==t.type)))if(h[i.id]=o.length<<1|1,q(r,e))o.push(n.facet(i));else{let t=i.combine(e.map((t=>t.value)));o.push(n&&i.compare(t,n.facet(i))?n.facet(i):t)}else{for(let t of e)0==t.type?(h[t.id]=o.length<<1|1,o.push(t.value)):(h[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));h[i.id]=l.length<<1,l.push((t=>V(t,i,e)))}}let c=l.map((t=>t(h)));return new X(t,r,c,h,o,s)}}function Z(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let s=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|s}function tt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const et=j.define(),nt=j.define({combine:t=>t.some((t=>t)),static:!0}),it=j.define({combine:t=>t.length?t[0]:void 0,static:!0}),st=j.define(),rt=j.define(),ht=j.define(),ot=j.define({combine:t=>!!t.length&&t[0]});class lt{constructor(t,e){this.type=t,this.value=e}static define(){return new at}}class at{of(t){return new lt(this,t)}}class ct{constructor(t){this.map=t}of(t){return new ft(this,t)}}class ft{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new ft(this.type,e)}is(t){return this.type==t}static define(t={}){return new ct(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let t=i.map(e);t&&n.push(t)}return n}}ft.reconfigure=ft.define(),ft.appendConfig=ft.define();class ut{constructor(t,e,n,i,s,r){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,n&&N(n,e.newLength),s.some((t=>t.type==ut.time))||(this.annotations=s.concat(ut.time.of(Date.now())))}static create(t,e,n,i,s,r){return new ut(t,e,n,i,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(ut.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function gt(t,e){let n=[];for(let i=0,s=0;;){let r,h;if(i<t.length&&(s==e.length||e[s]>=t[i]))r=t[i++],h=t[i++];else{if(!(s<e.length))return n;r=e[s++],h=e[s++]}!n.length||n[n.length-1]<r?n.push(r,h):n[n.length-1]<h&&(n[n.length-1]=h)}}function dt(t,e,n){var i;let s,r,h;return n?(s=e.changes,r=A.empty(e.changes.length),h=t.changes.compose(e.changes)):(s=e.changes.map(t.changes),r=t.changes.mapDesc(e.changes,!0),h=t.changes.compose(s)),{changes:h,selection:e.selection?e.selection.map(r):null===(i=t.selection)||void 0===i?void 0:i.map(s),effects:ft.mapEffects(t.effects,s).concat(ft.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function pt(t,e,n){let i=e.selection,s=xt(e.annotations);return e.userEvent&&(s=s.concat(ut.userEvent.of(e.userEvent))),{changes:e.changes instanceof A?e.changes:A.of(e.changes||[],n,t.facet(it)),selection:i&&(i instanceof L?i:L.single(i.anchor,i.head)),effects:xt(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function mt(t,e,n){let i=pt(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(let s=1;s<e.length;s++){!1===e[s].filter&&(n=!1);let r=!!e[s].sequential;i=dt(i,pt(t,e[s],r?i.changes.newLength:t.doc.length),r)}let s=ut.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(t){let e=t.startState,n=e.facet(ht),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=dt(i,pt(e,r,t.changes.newLength),!0))}return i==t?t:ut.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let i of e.facet(st)){let e=i(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:gt(n,e))}if(!0!==n){let i,s;if(!1===n)s=t.changes.invertedDesc,i=A.empty(e.doc.length);else{let e=t.changes.filter(n);i=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=ut.create(e,i,t.selection&&t.selection.map(s),ft.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(rt);for(let n=i.length-1;n>=0;n--){let s=i[n](t);t=s instanceof ut?s:Array.isArray(s)&&1==s.length&&s[0]instanceof ut?s[0]:mt(e,xt(s),!1)}return t}(s):s)}ut.time=lt.define(),ut.userEvent=lt.define(),ut.addToHistory=lt.define(),ut.remote=lt.define();const vt=[];function xt(t){return null==t?vt:Array.isArray(t)?t:[t]}var wt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(wt||(wt={}));const kt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let St;try{St=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}class yt{constructor(t,e,n,i,s,r){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)Z(this,t<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return Z(this,n),tt(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return mt(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:s}=n;for(let e of t.effects)e.is(K.reconfigure)?(n&&(s=new Map,n.compartments.forEach(((t,e)=>s.set(e,t))),n=null),s.set(e.value.compartment,e.value.extension)):e.is(ft.reconfigure)?(n=null,i=e.value):e.is(ft.appendConfig)&&(n=null,i=xt(i).concat(e.value));n?e=t.startState.values.slice():(n=X.resolve(i,s,this),e=new yt(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let r=t.startState.facet(nt)?t.newSelection:t.newSelection.asSingle();new yt(n,t.newDoc,r,e,((e,n)=>n.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:L.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),s=[n.range],r=xt(n.effects);for(let n=1;n<e.ranges.length;n++){let h=t(e.ranges[n]),o=this.changes(h.changes),l=o.map(i);for(let t=0;t<n;t++)s[t]=s[t].map(l);let a=i.mapDesc(o,!0);s.push(h.range.map(a)),i=i.compose(l),r=ft.mapEffects(r,l).concat(ft.mapEffects(xt(h.effects),a))}return{changes:i,selection:L.create(s,e.mainIndex),effects:r}}changes(t=[]){return t instanceof A?t:A.of(t,this.doc.length,this.facet(yt.lineSeparator))}toText(t){return i.of(t.split(this.facet(yt.lineSeparator)||P))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(Z(this,e),tt(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let i=t[n];i instanceof W&&null!=this.config.address[i.id]&&(e[n]=i.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let e in n)if(Object.prototype.hasOwnProperty.call(t,e)){let s=n[e],r=t[e];i.push(s.init((t=>s.spec.fromJSON(r,t))))}return yt.create({doc:t.doc,selection:L.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=X.resolve(t.extensions||[],new Map),n=t.doc instanceof i?t.doc:i.of((t.doc||"").split(e.staticFacet(yt.lineSeparator)||P)),s=t.selection?t.selection instanceof L?t.selection:L.single(t.selection.anchor,t.selection.head):L.single(0);return N(s,n.length),e.staticFacet(nt)||(s=s.asSingle()),new yt(e,n,s,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(yt.tabSize)}get lineBreak(){return this.facet(yt.lineSeparator)||"\n"}get readOnly(){return this.facet(ot)}phrase(t,...e){for(let e of this.facet(yt.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]}))),t}languageDataAt(t,e,n=-1){let i=[];for(let s of this.facet(et))for(let r of s(this,e,n))Object.prototype.hasOwnProperty.call(r,t)&&i.push(r[t]);return i}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return wt.Space;if(function(t){if(St)return St.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||kt.test(n)))return!0}return!1}(t))return wt.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return wt.Word;return wt.Other};var e}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-n,h=t-n;for(;r>0;){let t=v(e,r,!1);if(s(e.slice(t,r))!=wt.Word)break;r=t}for(;h<i;){let t=v(e,h);if(s(e.slice(h,t))!=wt.Word)break;h=t}return r==h?null:L.range(r+n,h+n)}}function It(t,e,n={}){let i={};for(let e of t)for(let t of Object.keys(e)){let s=e[t],r=i[t];if(void 0===r)i[t]=s;else if(r===s||void 0===s);else{if(!Object.hasOwnProperty.call(n,t))throw new Error("Config merge conflict for field "+t);i[t]=n[t](r,s)}}for(let t in e)void 0===i[t]&&(i[t]=e[t]);return i}yt.allowMultipleSelections=nt,yt.tabSize=j.define({combine:t=>t.length?t[0]:4}),yt.lineSeparator=it,yt.readOnly=ot,yt.phrases=j.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every((n=>t[n]==e[n]))}}),yt.languageData=et,yt.changeFilter=st,yt.transactionFilter=rt,yt.transactionExtender=ht,K.reconfigure=ft.define();class bt{eq(t){return this==t}range(t,e=t){return Pt.create(t,e,this)}}bt.prototype.startSide=bt.prototype.endSide=0,bt.prototype.point=!1,bt.prototype.mapMode=E.TrackDel;class Pt{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new Pt(t,e,n)}}function Et(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Mt{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let i=r+h>>1,o=s[i]-t||(n?this.value[i].endSide:this.value[i].startSide)-e;if(i==r)return o>=0?r:h;o>=0?h=i:r=i+1}}between(t,e,n,i){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(!1===i(this.from[s]+t,this.to[s]+t,this.value[s]))return!1}map(t,e){let n=[],i=[],s=[],r=-1,h=-1;for(let o=0;o<this.value.length;o++){let l,a,c=this.value[o],f=this.from[o]+t,u=this.to[o]+t;if(f==u){let t=e.mapPos(f,c.startSide,c.mapMode);if(null==t)continue;if(l=a=t,c.startSide!=c.endSide&&(a=e.mapPos(f,c.endSide),a<l))continue}else if(l=e.mapPos(f,c.startSide),a=e.mapPos(u,c.endSide),l>a||l==a&&c.startSide>0&&c.endSide<=0)continue;(a-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(h=Math.max(h,a-l)),n.push(c),i.push(l-r),s.push(a-r))}return{mapped:n.length?new Mt(i,s,n,h):null,pos:r}}}class At{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new At(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(n&&(e=e.slice().sort(Et)),this.isEmpty)return e.length?At.of(e):this;let h=new Ot(this,null,-1).goto(0),o=0,l=[],a=new Rt;for(;h.value||o<e.length;)if(o<e.length&&(h.from-e[o].from||h.startSide-e[o].value.startSide)>=0){let t=e[o++];a.addInner(t.from,t.to,t.value)||l.push(t)}else 1==h.rangeIndex&&h.chunkIndex<this.chunk.length&&(o==e.length||this.chunkEnd(h.chunkIndex)<e[o].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&a.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(a.addInner(h.from,h.to,h.value)||l.push(Pt.create(h.from,h.to,h.value))),h.next());return a.finishInner(this.nextLayer.isEmpty&&!l.length?At.empty:this.nextLayer.update({add:l,filter:r,filterFrom:i,filterTo:s}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],i=-1;for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],h=this.chunk[s],o=t.touchesRange(r,r+h.length);if(!1===o)i=Math.max(i,h.maxPoint),e.push(h),n.push(t.mapPos(r));else if(!0===o){let{mapped:s,pos:o}=h.map(r,t);s&&(i=Math.max(i,s.maxPoint),e.push(s),n.push(o))}}let s=this.nextLayer.map(t);return 0==e.length?s:new At(n,e,s||At.empty,i)}between(t,e,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(e>=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return Tt.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Tt.from(t).goto(e)}static compare(t,e,n,i,s=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),h=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),o=Ct(r,h,n),l=new Ft(r,o,s),a=new Ft(h,o,s);n.iterGaps(((t,e,n)=>Jt(l,t,a,e,n,i))),n.empty&&0==n.length&&Jt(l,0,a,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let h=Ct(s,r),o=new Ft(s,h,0).goto(n),l=new Ft(r,h,0).goto(n);for(;;){if(o.to!=l.to||!Lt(o.active,l.active)||o.point&&(!l.point||!o.point.eq(l.point)))return!1;if(o.to>i)return!0;o.next(),l.next()}}static spans(t,e,n,i,s=-1){let r=new Ft(t,null,s).goto(e),h=e,o=r.openStart;for(;;){let t=Math.min(r.to,n);if(r.point){let n=r.activeForPoint(r.to),s=r.pointFrom<e?n.length+1:r.point.startSide<0?n.length:Math.min(n.length,o);i.point(h,t,r.point,n,s,r.pointRank),o=Math.min(r.openEnd(t),n.length)}else t>h&&(i.span(h,t,r.active,o),o=r.openEnd(t));if(r.to>n)return o+(r.point&&r.to>n?1:0);h=r.to,r.next()}}static of(t,e=!1){let n=new Rt;for(let i of t instanceof Pt?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(Et(e,i)>0)return t.slice().sort(Et);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}static join(t){if(!t.length)return At.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let i=t[n];i!=At.empty;i=i.nextLayer)e=new At(i.chunkPos,i.chunk,e,Math.max(i.maxPoint,e.maxPoint));return e}}At.empty=new At([],[],null,-1),At.empty.nextLayer=At.empty;class Rt{finishChunk(t){this.chunks.push(new Mt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new Rt)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(At.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=At.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Ct(t,e,n){let i=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&i.set(e.chunk[t],e.chunkPos[t]);let s=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let r=i.get(t.chunk[e]);null==r||(n?n.mapPos(r):r)!=t.chunkPos[e]||(null==n?void 0:n.touchesRange(r,r+t.chunk[e].length))||s.add(t.chunk[e])}return s}class Ot{constructor(t,e,n,i=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Tt{constructor(t){this.heap=t}static from(t,e=null,n=-1){let i=[];for(let s=0;s<t.length;s++)for(let r=t[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new Ot(r,e,n,s));return 1==i.length?i[0]:new Tt(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Bt(this.heap,t);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Bt(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Bt(this.heap,0)}}}function Bt(t,e){for(let n=t[e];;){let i=1+(e<<1);if(i>=t.length)break;let s=t[i];if(i+1<t.length&&s.compare(t[i+1])>=0&&(s=t[i+1],i++),n.compare(s)<0)break;t[i]=n,t[e]=s,e=i}}class Ft{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Tt.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Nt(this.active,t),Nt(this.activeTo,t),Nt(this.activeRank,t),this.minActive=jt(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:s}=this.cursor;for(;e<this.activeRank.length&&(s-this.activeRank[e]||i-this.activeTo[e])>0;)e++;Dt(this.active,e,n),Dt(this.activeTo,e,i),Dt(this.activeRank,e,s),t&&Dt(t,e,this.cursor.from),this.minActive=jt(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&Nt(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function Jt(t,e,n,i,s,r){t.goto(e),n.goto(i);let h=i+s,o=i,l=i-e;for(;;){let e=t.to+l-n.to||t.endSide-n.endSide,i=e<0?t.to+l:n.to,s=Math.min(i,h);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Lt(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(o,s,t.point,n.point):s>o&&!Lt(t.active,n.active)&&r.compareRange(o,s,t.active,n.active),i>h)break;o=i,e<=0&&t.next(),e>=0&&n.next()}}function Lt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Nt(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Dt(t,e,n){for(let n=t.length-1;n>=e;n--)t[n+1]=t[n];t[e]=n}function jt(t,e){let n=-1,i=1e9;for(let s=0;s<e.length;s++)(e[s]-i||t[s].endSide-t[n].endSide)<0&&(n=s,i=e[s]);return n}function qt(t,e,n=t.length){let i=0;for(let s=0;s<n;)9==t.charCodeAt(s)?(i+=e-i%e,s++):(i++,s=v(t,s));return i}function $t(t,e,n,i){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=9==t.charCodeAt(i)?n-s%n:1,i=v(t,i)}return!0===i?-1:t.length}}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2323],{92323:(t,e,n)=>{n.r(e),n.d(e,{Annotation:()=>lt,AnnotationType:()=>at,ChangeDesc:()=>M,ChangeSet:()=>A,CharCategory:()=>wt,Compartment:()=>K,EditorSelection:()=>L,EditorState:()=>yt,Facet:()=>j,Line:()=>f,MapMode:()=>E,Prec:()=>Y,Range:()=>Pt,RangeSet:()=>At,RangeSetBuilder:()=>Rt,RangeValue:()=>bt,SelectionRange:()=>J,StateEffect:()=>ft,StateEffectType:()=>ct,StateField:()=>W,Text:()=>i,Transaction:()=>ut,codePointAt:()=>y,codePointSize:()=>b,combineConfig:()=>It,countColumn:()=>qt,findClusterBreak:()=>v,findColumn:()=>$t,fromCodePoint:()=>I});class i{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=u(this,t,e);let i=[];return this.decompose(0,t,i,2),n.length&&n.decompose(0,n.length,i,3),this.decompose(e,this.length,i,1),r.from(i,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=u(this,t,e);let n=[];return this.decompose(t,e,n,0),r.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),i=new l(this),s=new l(t);for(let t=e,r=e;;){if(i.next(t),s.next(t),t=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(r+=i.value.length,i.done||r>=n)return!0}}iter(t=1){return new l(this,t)}iterRange(t,e=this.length){return new a(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let i=this.line(t).from;n=this.iterRange(i,Math.max(i,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):r.from(s.split(t,[])):i.empty}}class s extends i{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.text[s],h=i+r.length;if((e?n:h)>=t)return new f(i,h,n,r);i=h+1,n++}}decompose(t,e,n,i){let r=t<=0&&e>=this.length?this:new s(o(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&i){let t=n.pop(),e=h(r.text,t.text.slice(),0,r.length);if(e.length<=32)n.push(new s(e,t.length+r.length));else{let t=e.length>>1;n.push(new s(e.slice(0,t)),new s(e.slice(t)))}}else n.push(r)}replace(t,e,n){if(!(n instanceof s))return super.replace(t,e,n);[t,e]=u(this,t,e);let i=h(this.text,h(n.text,o(this.text,0,t)),e),l=this.length+n.length-(e-t);return i.length<=32?new s(i,l):r.from(s.split(i,[]),l)}sliceString(t,e=this.length,n="\n"){[t,e]=u(this,t,e);let i="";for(let s=0,r=0;s<=e&&r<this.text.length;r++){let h=this.text[r],o=s+h.length;s>t&&r&&(i+=n),t<o&&e>s&&(i+=h.slice(Math.max(0,t-s),e-s)),s=o+1}return i}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],i=-1;for(let r of t)n.push(r),i+=r.length+1,32==n.length&&(e.push(new s(n,i)),n=[],i=-1);return i>-1&&e.push(new s(n,i)),e}}class r extends i{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,n,i){for(let s=0;;s++){let r=this.children[s],h=i+r.length,o=n+r.lines-1;if((e?o:h)>=t)return r.lineInner(t,e,n,i);i=h+1,n=o+1}}decompose(t,e,n,i){for(let s=0,r=0;r<=e&&s<this.children.length;s++){let h=this.children[s],o=r+h.length;if(t<=o&&e>=r){let s=i&((r<=t?1:0)|(o>=e?2:0));r>=t&&o<=e&&!s?n.push(h):h.decompose(t-r,e-r,n,s)}r=o+1}}replace(t,e,n){if([t,e]=u(this,t,e),n.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let h=this.children[i],o=s+h.length;if(t>=s&&e<=o){let l=h.replace(t-s,e-s,n),a=this.lines-h.lines+l.lines;if(l.lines<a>>4&&l.lines>a>>6){let s=this.children.slice();return s[i]=l,new r(s,this.length-(e-t)+n.length)}return super.replace(s,o,l)}s=o+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=u(this,t,e);let i="";for(let s=0,r=0;s<this.children.length&&r<=e;s++){let h=this.children[s],o=r+h.length;r>t&&s&&(i+=n),t<o&&e>r&&(i+=h.sliceString(t-r,e-r,n)),r=o+1}return i}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof r))return 0;let n=0,[i,s,h,o]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;i+=e,s+=e){if(i==h||s==o)return n;let r=this.children[i],l=t.children[s];if(r!=l)return n+r.scanIdentical(l,e);n+=r.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let n=0;for(let e of t)n+=e.lines;if(n<32){let n=[];for(let e of t)e.flatten(n);return new s(n,e)}let i=Math.max(32,n>>5),h=i<<1,o=i>>1,l=[],a=0,c=-1,f=[];function u(t){let e;if(t.lines>h&&t instanceof r)for(let e of t.children)u(e);else t.lines>o&&(a>o||!a)?(g(),l.push(t)):t instanceof s&&a&&(e=f[f.length-1])instanceof s&&t.lines+e.lines<=32?(a+=t.lines,c+=t.length+1,f[f.length-1]=new s(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>i&&g(),a+=t.lines,c+=t.length+1,f.push(t))}function g(){0!=a&&(l.push(1==f.length?f[0]:r.from(f,c)),c=-1,a=f.length=0)}for(let e of t)u(e);return g(),1==l.length?l[0]:new r(l,e)}}function h(t,e,n=0,i=1e9){for(let s=0,r=0,h=!0;r<t.length&&s<=i;r++){let o=t[r],l=s+o.length;l>=n&&(l>i&&(o=o.slice(0,i-s)),s<n&&(o=o.slice(n-s)),h?(e[e.length-1]+=o,h=!1):e.push(o)),s=l+1}return e}function o(t,e,n){return h(t,[""],e,n)}i.empty=new s([""],0);class l{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,i=this.nodes[n],r=this.offsets[n],h=r>>1,o=i instanceof s?i.text.length:i.children.length;if(h==(e>0?o:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&r)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(i instanceof s){let s=i.text[h+(e<0?-1:0)];if(this.offsets[n]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let r=i.children[h+(e<0?-1:0)];t>r.length?(t-=r.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(r),this.offsets.push(e>0?1:(r instanceof s?r.text.length:r.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class a{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new l(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:i}=this.cursor.next(t);return this.pos+=(i.length+t)*e,this.value=i.length<=n?i:e<0?i.slice(i.length-n):i.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class c{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:i}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=function(){return this.iter()},l.prototype[Symbol.iterator]=a.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this});class f{constructor(t,e,n,i){this.from=t,this.to=e,this.number=n,this.text=i}get length(){return this.to-this.from}}function u(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}let g="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let t=1;t<g.length;t++)g[t]+=g[t-1];function d(t){for(let e=1;e<g.length;e+=2)if(g[e]>t)return g[e-1]<=t;return!1}function p(t){return t>=127462&&t<=127487}const m=8205;function v(t,e,n=!0,i=!0){return(n?x:w)(t,e,i)}function x(t,e,n){if(e==t.length)return e;e&&k(t.charCodeAt(e))&&S(t.charCodeAt(e-1))&&e--;let i=y(t,e);for(e+=b(i);e<t.length;){let s=y(t,e);if(i==m||s==m||n&&d(s))e+=b(s),i=s;else{if(!p(s))break;{let n=0,i=e-2;for(;i>=0&&p(y(t,i));)n++,i-=2;if(n%2==0)break;e+=2}}}return e}function w(t,e,n){for(;e>0;){let i=x(t,e-2,n);if(i<e)return i;e--}return 0}function k(t){return t>=56320&&t<57344}function S(t){return t>=55296&&t<56320}function y(t,e){let n=t.charCodeAt(e);if(!S(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return k(i)?i-56320+(n-55296<<10)+65536:n}function I(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function b(t){return t<65536?1:2}const P=/\r\n?|\n/;var E=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(E||(E={}));class M{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,i=0;e<this.sections.length;){let s=this.sections[e++],r=this.sections[e++];r<0?(t(n,i,s),i+=s):i+=r,n+=s}}iterChangedRanges(t,e=!1){O(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];i<0?t.push(n,i):t.push(i,n)}return new M(t)}composeDesc(t){return this.empty?t:t.empty?this:B(this,t)}mapDesc(t,e=!1){return t.empty?this:T(this,t,e)}mapPos(t,e=-1,n=E.Simple){let i=0,s=0;for(let r=0;r<this.sections.length;){let h=this.sections[r++],o=this.sections[r++],l=i+h;if(o<0){if(l>t)return s+(t-i);s+=h}else{if(n!=E.Simple&&l>=t&&(n==E.TrackDel&&i<t&&l>t||n==E.TrackBefore&&i<t||n==E.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!h)return t==i||e<0?s:s+o;s+=o}i=l}if(t>i)throw new RangeError(`Position ${t} is out of range for changeset of length ${i}`);return s}touchesRange(t,e=t){for(let n=0,i=0;n<this.sections.length&&i<=e;){let s=i+this.sections[n++];if(this.sections[n++]>=0&&i<=e&&s>=t)return!(i<t&&s>e)||"cover";i=s}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],i=this.sections[e++];t+=(t?" ":"")+n+(i>=0?":"+i:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new M(t)}static create(t){return new M(t)}}class A extends M{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return O(this,((e,n,i,s,r)=>t=t.replace(i,i+(n-e),r)),!1),t}mapDesc(t,e=!1){return T(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let s=0,r=0;s<e.length;s+=2){let h=e[s],o=e[s+1];if(o>=0){e[s]=o,e[s+1]=h;let l=s>>1;for(;n.length<l;)n.push(i.empty);n.push(h?t.slice(r,r+h):i.empty)}r+=h}return new A(e,n)}compose(t){return this.empty?t:t.empty?this:B(this,t,!0)}map(t,e=!1){return t.empty?this:T(this,t,e,!0)}iterChanges(t,e=!1){O(this,t,e)}get desc(){return M.create(this.sections)}filter(t){let e=[],n=[],i=[],s=new F(this);t:for(let r=0,h=0;;){let o=r==t.length?1e9:t[r++];for(;h<o||h==o&&0==s.len;){if(s.done)break t;let t=Math.min(s.len,o-h);R(i,t,-1);let r=-1==s.ins?-1:0==s.off?s.ins:0;R(e,t,r),r>0&&C(n,e,s.text),s.forward(t),h+=t}let l=t[r++];for(;h<l;){if(s.done)break t;let t=Math.min(s.len,l-h);R(e,t,-1),R(i,t,-1==s.ins?-1:0==s.off?s.ins:0),s.forward(t),h+=t}}return{changes:new A(e,n),filtered:M.create(i)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],i=this.sections[e+1];i<0?t.push(n):0==i?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,n){let s=[],r=[],h=0,o=null;function l(t=!1){if(!t&&!s.length)return;h<e&&R(s,e-h,-1);let n=new A(s,r);o=o?o.compose(n.map(o)):n,s=[],r=[],h=0}return function t(a){if(Array.isArray(a))for(let e of a)t(e);else if(a instanceof A){if(a.length!=e)throw new RangeError(`Mismatched change set length (got ${a.length}, expected ${e})`);l(),o=o?o.compose(a.map(o)):a}else{let{from:t,to:o=t,insert:c}=a;if(t>o||t<0||o>e)throw new RangeError(`Invalid change range ${t} to ${o} (in doc of length ${e})`);let f=c?"string"==typeof c?i.of(c.split(n||P)):c:i.empty,u=f.length;if(t==o&&0==u)return;t<h&&l(),t>h&&R(s,t-h,-1),R(s,o-t,u),C(r,s,f),h=o}}(t),l(!o),o}static empty(t){return new A(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let s=0;s<t.length;s++){let r=t[s];if("number"==typeof r)e.push(r,-1);else{if(!Array.isArray(r)||"number"!=typeof r[0]||r.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==r.length)e.push(r[0],0);else{for(;n.length<s;)n.push(i.empty);n[s]=i.of(r.slice(1)),e.push(r[0],n[s].length)}}}return new A(e,n)}static createSet(t,e){return new A(t,e)}}function R(t,e,n,i=!1){if(0==e&&n<=0)return;let s=t.length-2;s>=0&&n<=0&&n==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=n:i?(t[s]+=e,t[s+1]+=n):t.push(e,n)}function C(t,e,n){if(0==n.length)return;let s=e.length-2>>1;if(s<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<s;)t.push(i.empty);t.push(n)}}function O(t,e,n){let s=t.inserted;for(let r=0,h=0,o=0;o<t.sections.length;){let l=t.sections[o++],a=t.sections[o++];if(a<0)r+=l,h+=l;else{let c=r,f=h,u=i.empty;for(;c+=l,f+=a,a&&s&&(u=u.append(s[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],a=t.sections[o++];e(r,c,h,f,u),r=c,h=f}}}function T(t,e,n,i=!1){let s=[],r=i?[]:null,h=new F(t),o=new F(e);for(let t=-1;;)if(-1==h.ins&&-1==o.ins){let t=Math.min(h.len,o.len);R(s,t,-1),h.forward(t),o.forward(t)}else if(o.ins>=0&&(h.ins<0||t==h.i||0==h.off&&(o.len<h.len||o.len==h.len&&!n))){let e=o.len;for(R(s,o.ins,-1);e;){let n=Math.min(h.len,e);h.ins>=0&&t<h.i&&h.len<=n&&(R(s,0,h.ins),r&&C(r,s,h.text),t=h.i),h.forward(n),e-=n}o.next()}else{if(!(h.ins>=0)){if(h.done&&o.done)return r?A.createSet(s,r):M.create(s);throw new Error("Mismatched change set lengths")}{let e=0,n=h.len;for(;n;)if(-1==o.ins){let t=Math.min(n,o.len);e+=t,n-=t,o.forward(t)}else{if(!(0==o.ins&&o.len<n))break;n-=o.len,o.next()}R(s,e,t<h.i?h.ins:0),r&&t<h.i&&C(r,s,h.text),t=h.i,h.forward(h.len-n)}}}function B(t,e,n=!1){let i=[],s=n?[]:null,r=new F(t),h=new F(e);for(let t=!1;;){if(r.done&&h.done)return s?A.createSet(i,s):M.create(i);if(0==r.ins)R(i,r.len,0,t),r.next();else if(0!=h.len||h.done){if(r.done||h.done)throw new Error("Mismatched change set lengths");{let e=Math.min(r.len2,h.len),n=i.length;if(-1==r.ins){let n=-1==h.ins?-1:h.off?0:h.ins;R(i,e,n,t),s&&n&&C(s,i,h.text)}else-1==h.ins?(R(i,r.off?0:r.len,e,t),s&&C(s,i,r.textBit(e))):(R(i,r.off?0:r.len,h.off?0:h.ins,t),s&&!h.off&&C(s,i,h.text));t=(r.ins>e||h.ins>=0&&h.len>e)&&(t||i.length>n),r.forward2(e),h.forward(e)}}else R(i,0,h.ins,t),s&&C(s,i,h.text),h.next()}}class F{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?i.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?i.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class J{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,i;return this.empty?n=i=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),i=t.mapPos(this.to,-1)),n==this.from&&i==this.to?this:new J(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return L.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return L.range(this.anchor,n)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return L.range(t.anchor,t.head)}static create(t,e,n){return new J(t,e,n)}}class L{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:L.create(this.ranges.map((n=>n.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new L([this.main],0)}addRange(t,e=!0){return L.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,L.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new L(t.ranges.map((t=>J.fromJSON(t))),t.main)}static single(t,e=t){return new L([L.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,i=0;i<t.length;i++){let s=t[i];if(s.empty?s.from<=n:s.from<n)return L.normalized(t.slice(),e);n=s.to}return new L(t,e)}static cursor(t,e=0,n,i){return J.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=i?i:16777215)<<6)}static range(t,e,n,i){let s=(null!=n?n:16777215)<<6|(null==i?7:Math.min(6,i));return e<t?J.create(e,t,48|s):J.create(t,e,(e>t?8:0)|s)}static normalized(t,e=0){let n=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(n);for(let n=1;n<t.length;n++){let i=t[n],s=t[n-1];if(i.empty?i.from<=s.to:i.from<s.to){let r=s.from,h=Math.max(i.to,s.to);n<=e&&e--,t.splice(--n,2,i.anchor>i.head?L.range(h,r):L.range(r,h))}}return new L(t,e)}}function N(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let D=0;class j{constructor(t,e,n,i,s){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=D++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new j(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:q),!!t.static,t.enables)}of(t){return new $([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new $(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(n=>e(n.field(t))))}}function q(t,e){return t==e||t.length==e.length&&t.every(((t,n)=>t===e[n]))}class ${constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=D++}dynamicSlot(t){var e;let n=this.value,i=this.facet.compareInput,s=this.id,r=t[s]>>1,h=2==this.type,o=!1,l=!1,a=[];for(let n of this.dependencies)"doc"==n?o=!0:"selection"==n?l=!0:0==(1&(null!==(e=t[n.id])&&void 0!==e?e:1))&&a.push(t[n.id]);return{create:t=>(t.values[r]=n(t),1),update(t,e){if(o&&e.docChanged||l&&(e.docChanged||e.selection)||z(t,a)){let e=n(t);if(h?!_(e,t.values[r],i):!i(e,t.values[r]))return t.values[r]=e,1}return 0},reconfigure:(t,e)=>{let o,l=e.config.address[s];if(null!=l){let s=tt(e,l);if(this.dependencies.every((n=>n instanceof j?e.facet(n)===t.facet(n):!(n instanceof W)||e.field(n,!1)==t.field(n,!1)))||(h?_(o=n(t),s,i):i(o=n(t),s)))return t.values[r]=s,0}else o=n(t);return t.values[r]=o,1}}}}function _(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function z(t,e){let n=!1;for(let i of e)1&Z(t,i)&&(n=!0);return n}function V(t,e,n){let i=n.map((e=>t[e.id])),s=n.map((t=>t.type)),r=i.filter((t=>!(1&t))),h=t[e.id]>>1;function o(t){let n=[];for(let e=0;e<i.length;e++){let r=tt(t,i[e]);if(2==s[e])for(let t of r)n.push(t);else n.push(r)}return e.combine(n)}return{create(t){for(let e of i)Z(t,e);return t.values[h]=o(t),1},update(t,n){if(!z(t,r))return 0;let i=o(t);return e.compare(i,t.values[h])?0:(t.values[h]=i,1)},reconfigure(t,s){let r=z(t,i),l=s.config.facets[e.id],a=s.facet(e);if(l&&!r&&q(n,l))return t.values[h]=a,0;let c=o(t);return e.compare(c,a)?(t.values[h]=a,0):(t.values[h]=c,1)}}}const U=j.define({static:!0});class W{constructor(t,e,n,i,s){this.id=t,this.createF=e,this.updateF=n,this.compareF=i,this.spec=s,this.provides=void 0}static define(t){let e=new W(D++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(U).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let i=t.values[e],s=this.updateF(i,n);return this.compareF(i,s)?0:(t.values[e]=s,1)},reconfigure:(t,n)=>null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,U.of({field:this,create:t})]}get extension(){return this}}function G(t){return e=>new H(e,t)}const Y={highest:G(0),high:G(1),default:G(2),low:G(3),lowest:G(4)};class H{constructor(t,e){this.inner=t,this.prec=e}}class K{of(t){return new Q(this,t)}reconfigure(t){return K.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Q{constructor(t,e){this.compartment=t,this.inner=e}}class X{constructor(t,e,n,i,s,r){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=i,this.staticValues=s,this.facets=r,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){let i=[],s=Object.create(null),r=new Map;for(let n of function(t,e,n){let i=[[],[],[],[],[]],s=new Map;return function t(r,h){let o=s.get(r);if(null!=o){if(o<=h)return;let t=i[o].indexOf(r);t>-1&&i[o].splice(t,1),r instanceof Q&&n.delete(r.compartment)}if(s.set(r,h),Array.isArray(r))for(let e of r)t(e,h);else if(r instanceof Q){if(n.has(r.compartment))throw new RangeError("Duplicate use of compartment in extensions");let i=e.get(r.compartment)||r.inner;n.set(r.compartment,i),t(i,h)}else if(r instanceof H)t(r.inner,r.prec);else if(r instanceof W)i[h].push(r),r.provides&&t(r.provides,h);else if(r instanceof $)i[h].push(r),r.facet.extensions&&t(r.facet.extensions,2);else{let e=r.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${r}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,h)}}(t,2),i.reduce(((t,e)=>t.concat(e)))}(t,e,r))n instanceof W?i.push(n):(s[n.facet.id]||(s[n.facet.id]=[])).push(n);let h=Object.create(null),o=[],l=[];for(let t of i)h[t.id]=l.length<<1,l.push((e=>t.slot(e)));let a=null==n?void 0:n.config.facets;for(let t in s){let e=s[t],i=e[0].facet,r=a&&a[t]||[];if(e.every((t=>0==t.type)))if(h[i.id]=o.length<<1|1,q(r,e))o.push(n.facet(i));else{let t=i.combine(e.map((t=>t.value)));o.push(n&&i.compare(t,n.facet(i))?n.facet(i):t)}else{for(let t of e)0==t.type?(h[t.id]=o.length<<1|1,o.push(t.value)):(h[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));h[i.id]=l.length<<1,l.push((t=>V(t,i,e)))}}let c=l.map((t=>t(h)));return new X(t,r,c,h,o,s)}}function Z(t,e){if(1&e)return 2;let n=e>>1,i=t.status[n];if(4==i)throw new Error("Cyclic dependency between fields and/or facets");if(2&i)return i;t.status[n]=4;let s=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|s}function tt(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const et=j.define(),nt=j.define({combine:t=>t.some((t=>t)),static:!0}),it=j.define({combine:t=>t.length?t[0]:void 0,static:!0}),st=j.define(),rt=j.define(),ht=j.define(),ot=j.define({combine:t=>!!t.length&&t[0]});class lt{constructor(t,e){this.type=t,this.value=e}static define(){return new at}}class at{of(t){return new lt(this,t)}}class ct{constructor(t){this.map=t}of(t){return new ft(this,t)}}class ft{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new ft(this.type,e)}is(t){return this.type==t}static define(t={}){return new ct(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let i of t){let t=i.map(e);t&&n.push(t)}return n}}ft.reconfigure=ft.define(),ft.appendConfig=ft.define();class ut{constructor(t,e,n,i,s,r){this.startState=t,this.changes=e,this.selection=n,this.effects=i,this.annotations=s,this.scrollIntoView=r,this._doc=null,this._state=null,n&&N(n,e.newLength),s.some((t=>t.type==ut.time))||(this.annotations=s.concat(ut.time.of(Date.now())))}static create(t,e,n,i,s,r){return new ut(t,e,n,i,s,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(ut.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function gt(t,e){let n=[];for(let i=0,s=0;;){let r,h;if(i<t.length&&(s==e.length||e[s]>=t[i]))r=t[i++],h=t[i++];else{if(!(s<e.length))return n;r=e[s++],h=e[s++]}!n.length||n[n.length-1]<r?n.push(r,h):n[n.length-1]<h&&(n[n.length-1]=h)}}function dt(t,e,n){var i;let s,r,h;return n?(s=e.changes,r=A.empty(e.changes.length),h=t.changes.compose(e.changes)):(s=e.changes.map(t.changes),r=t.changes.mapDesc(e.changes,!0),h=t.changes.compose(s)),{changes:h,selection:e.selection?e.selection.map(r):null===(i=t.selection)||void 0===i?void 0:i.map(s),effects:ft.mapEffects(t.effects,s).concat(ft.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function pt(t,e,n){let i=e.selection,s=xt(e.annotations);return e.userEvent&&(s=s.concat(ut.userEvent.of(e.userEvent))),{changes:e.changes instanceof A?e.changes:A.of(e.changes||[],n,t.facet(it)),selection:i&&(i instanceof L?i:L.single(i.anchor,i.head)),effects:xt(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function mt(t,e,n){let i=pt(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(let s=1;s<e.length;s++){!1===e[s].filter&&(n=!1);let r=!!e[s].sequential;i=dt(i,pt(t,e[s],r?i.changes.newLength:t.doc.length),r)}let s=ut.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(t){let e=t.startState,n=e.facet(ht),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=dt(i,pt(e,r,t.changes.newLength),!0))}return i==t?t:ut.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let i of e.facet(st)){let e=i(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:gt(n,e))}if(!0!==n){let i,s;if(!1===n)s=t.changes.invertedDesc,i=A.empty(e.doc.length);else{let e=t.changes.filter(n);i=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=ut.create(e,i,t.selection&&t.selection.map(s),ft.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(rt);for(let n=i.length-1;n>=0;n--){let s=i[n](t);t=s instanceof ut?s:Array.isArray(s)&&1==s.length&&s[0]instanceof ut?s[0]:mt(e,xt(s),!1)}return t}(s):s)}ut.time=lt.define(),ut.userEvent=lt.define(),ut.addToHistory=lt.define(),ut.remote=lt.define();const vt=[];function xt(t){return null==t?vt:Array.isArray(t)?t:[t]}var wt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(wt||(wt={}));const kt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let St;try{St=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}class yt{constructor(t,e,n,i,s,r){this.config=t,this.doc=e,this.selection=n,this.values=i,this.status=t.statusTemplate.slice(),this.computeSlot=s,r&&(r._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)Z(this,t<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return Z(this,n),tt(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return mt(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:s}=n;for(let e of t.effects)e.is(K.reconfigure)?(n&&(s=new Map,n.compartments.forEach(((t,e)=>s.set(e,t))),n=null),s.set(e.value.compartment,e.value.extension)):e.is(ft.reconfigure)?(n=null,i=e.value):e.is(ft.appendConfig)&&(n=null,i=xt(i).concat(e.value));n?e=t.startState.values.slice():(n=X.resolve(i,s,this),e=new yt(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let r=t.startState.facet(nt)?t.newSelection:t.newSelection.asSingle();new yt(n,t.newDoc,r,e,((e,n)=>n.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:L.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),i=this.changes(n.changes),s=[n.range],r=xt(n.effects);for(let n=1;n<e.ranges.length;n++){let h=t(e.ranges[n]),o=this.changes(h.changes),l=o.map(i);for(let t=0;t<n;t++)s[t]=s[t].map(l);let a=i.mapDesc(o,!0);s.push(h.range.map(a)),i=i.compose(l),r=ft.mapEffects(r,l).concat(ft.mapEffects(xt(h.effects),a))}return{changes:i,selection:L.create(s,e.mainIndex),effects:r}}changes(t=[]){return t instanceof A?t:A.of(t,this.doc.length,this.facet(yt.lineSeparator))}toText(t){return i.of(t.split(this.facet(yt.lineSeparator)||P))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(Z(this,e),tt(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let i=t[n];i instanceof W&&null!=this.config.address[i.id]&&(e[n]=i.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(n)for(let e in n)if(Object.prototype.hasOwnProperty.call(t,e)){let s=n[e],r=t[e];i.push(s.init((t=>s.spec.fromJSON(r,t))))}return yt.create({doc:t.doc,selection:L.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=X.resolve(t.extensions||[],new Map),n=t.doc instanceof i?t.doc:i.of((t.doc||"").split(e.staticFacet(yt.lineSeparator)||P)),s=t.selection?t.selection instanceof L?t.selection:L.single(t.selection.anchor,t.selection.head):L.single(0);return N(s,n.length),e.staticFacet(nt)||(s=s.asSingle()),new yt(e,n,s,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(yt.tabSize)}get lineBreak(){return this.facet(yt.lineSeparator)||"\n"}get readOnly(){return this.facet(ot)}phrase(t,...e){for(let e of this.facet(yt.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,n)=>{if("$"==n)return"$";let i=+(n||1);return!i||i>e.length?t:e[i-1]}))),t}languageDataAt(t,e,n=-1){let i=[];for(let s of this.facet(et))for(let r of s(this,e,n))Object.prototype.hasOwnProperty.call(r,t)&&i.push(r[t]);return i}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return wt.Space;if(function(t){if(St)return St.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||kt.test(n)))return!0}return!1}(t))return wt.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return wt.Word;return wt.Other};var e}wordAt(t){let{text:e,from:n,length:i}=this.doc.lineAt(t),s=this.charCategorizer(t),r=t-n,h=t-n;for(;r>0;){let t=v(e,r,!1);if(s(e.slice(t,r))!=wt.Word)break;r=t}for(;h<i;){let t=v(e,h);if(s(e.slice(h,t))!=wt.Word)break;h=t}return r==h?null:L.range(r+n,h+n)}}function It(t,e,n={}){let i={};for(let e of t)for(let t of Object.keys(e)){let s=e[t],r=i[t];if(void 0===r)i[t]=s;else if(r===s||void 0===s);else{if(!Object.hasOwnProperty.call(n,t))throw new Error("Config merge conflict for field "+t);i[t]=n[t](r,s)}}for(let t in e)void 0===i[t]&&(i[t]=e[t]);return i}yt.allowMultipleSelections=nt,yt.tabSize=j.define({combine:t=>t.length?t[0]:4}),yt.lineSeparator=it,yt.readOnly=ot,yt.phrases=j.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every((n=>t[n]==e[n]))}}),yt.languageData=et,yt.changeFilter=st,yt.transactionFilter=rt,yt.transactionExtender=ht,K.reconfigure=ft.define();class bt{eq(t){return this==t}range(t,e=t){return Pt.create(t,e,this)}}bt.prototype.startSide=bt.prototype.endSide=0,bt.prototype.point=!1,bt.prototype.mapMode=E.TrackDel;class Pt{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new Pt(t,e,n)}}function Et(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Mt{constructor(t,e,n,i){this.from=t,this.to=e,this.value=n,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,i=0){let s=n?this.to:this.from;for(let r=i,h=s.length;;){if(r==h)return r;let i=r+h>>1,o=s[i]-t||(n?this.value[i].endSide:this.value[i].startSide)-e;if(i==r)return o>=0?r:h;o>=0?h=i:r=i+1}}between(t,e,n,i){for(let s=this.findIndex(e,-1e9,!0),r=this.findIndex(n,1e9,!1,s);s<r;s++)if(!1===i(this.from[s]+t,this.to[s]+t,this.value[s]))return!1}map(t,e){let n=[],i=[],s=[],r=-1,h=-1;for(let o=0;o<this.value.length;o++){let l,a,c=this.value[o],f=this.from[o]+t,u=this.to[o]+t;if(f==u){let t=e.mapPos(f,c.startSide,c.mapMode);if(null==t)continue;if(l=a=t,c.startSide!=c.endSide&&(a=e.mapPos(f,c.endSide),a<l))continue}else if(l=e.mapPos(f,c.startSide),a=e.mapPos(u,c.endSide),l>a||l==a&&c.startSide>0&&c.endSide<=0)continue;(a-l||c.endSide-c.startSide)<0||(r<0&&(r=l),c.point&&(h=Math.max(h,a-l)),n.push(c),i.push(l-r),s.push(a-r))}return{mapped:n.length?new Mt(i,s,n,h):null,pos:r}}}class At{constructor(t,e,n,i){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=i}static create(t,e,n,i){return new At(t,e,n,i)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:i=0,filterTo:s=this.length}=t,r=t.filter;if(0==e.length&&!r)return this;if(n&&(e=e.slice().sort(Et)),this.isEmpty)return e.length?At.of(e):this;let h=new Ot(this,null,-1).goto(0),o=0,l=[],a=new Rt;for(;h.value||o<e.length;)if(o<e.length&&(h.from-e[o].from||h.startSide-e[o].value.startSide)>=0){let t=e[o++];a.addInner(t.from,t.to,t.value)||l.push(t)}else 1==h.rangeIndex&&h.chunkIndex<this.chunk.length&&(o==e.length||this.chunkEnd(h.chunkIndex)<e[o].from)&&(!r||i>this.chunkEnd(h.chunkIndex)||s<this.chunkPos[h.chunkIndex])&&a.addChunk(this.chunkPos[h.chunkIndex],this.chunk[h.chunkIndex])?h.nextChunk():((!r||i>h.to||s<h.from||r(h.from,h.to,h.value))&&(a.addInner(h.from,h.to,h.value)||l.push(Pt.create(h.from,h.to,h.value))),h.next());return a.finishInner(this.nextLayer.isEmpty&&!l.length?At.empty:this.nextLayer.update({add:l,filter:r,filterFrom:i,filterTo:s}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],i=-1;for(let s=0;s<this.chunk.length;s++){let r=this.chunkPos[s],h=this.chunk[s],o=t.touchesRange(r,r+h.length);if(!1===o)i=Math.max(i,h.maxPoint),e.push(h),n.push(t.mapPos(r));else if(!0===o){let{mapped:s,pos:o}=h.map(r,t);s&&(i=Math.max(i,s.maxPoint),e.push(s),n.push(o))}}let s=this.nextLayer.map(t);return 0==e.length?s:new At(n,e,s||At.empty,i)}between(t,e,n){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],r=this.chunk[i];if(e>=s&&t<=s+r.length&&!1===r.between(s,t-s,e-s,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return Tt.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Tt.from(t).goto(e)}static compare(t,e,n,i,s=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),h=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),o=Ct(r,h,n),l=new Ft(r,o,s),a=new Ft(h,o,s);n.iterGaps(((t,e,n)=>Jt(l,t,a,e,n,i))),n.empty&&0==n.length&&Jt(l,0,a,0,0,i)}static eq(t,e,n=0,i){null==i&&(i=999999999);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=r.length)return!1;if(!s.length)return!0;let h=Ct(s,r),o=new Ft(s,h,0).goto(n),l=new Ft(r,h,0).goto(n);for(;;){if(o.to!=l.to||!Lt(o.active,l.active)||o.point&&(!l.point||!o.point.eq(l.point)))return!1;if(o.to>i)return!0;o.next(),l.next()}}static spans(t,e,n,i,s=-1){let r=new Ft(t,null,s).goto(e),h=e,o=r.openStart;for(;;){let t=Math.min(r.to,n);if(r.point){let n=r.activeForPoint(r.to),s=r.pointFrom<e?n.length+1:r.point.startSide<0?n.length:Math.min(n.length,o);i.point(h,t,r.point,n,s,r.pointRank),o=Math.min(r.openEnd(t),n.length)}else t>h&&(i.span(h,t,r.active,o),o=r.openEnd(t));if(r.to>n)return o+(r.point&&r.to>n?1:0);h=r.to,r.next()}}static of(t,e=!1){let n=new Rt;for(let i of t instanceof Pt?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(Et(e,i)>0)return t.slice().sort(Et);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}static join(t){if(!t.length)return At.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let i=t[n];i!=At.empty;i=i.nextLayer)e=new At(i.chunkPos,i.chunk,e,Math.max(i.maxPoint,e.maxPoint));return e}}At.empty=new At([],[],null,-1),At.empty.nextLayer=At.empty;class Rt{finishChunk(t){this.chunks.push(new Mt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new Rt)).add(t,e,n)}addInner(t,e,n){let i=t-this.lastTo||n.startSide-this.last.endSide;if(i<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(i<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(At.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=At.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Ct(t,e,n){let i=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&i.set(e.chunk[t],e.chunkPos[t]);let s=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let r=i.get(t.chunk[e]);null==r||(n?n.mapPos(r):r)!=t.chunkPos[e]||(null==n?void 0:n.touchesRange(r,r+t.chunk[e].length))||s.add(t.chunk[e])}return s}class Ot{constructor(t,e,n,i=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Tt{constructor(t){this.heap=t}static from(t,e=null,n=-1){let i=[];for(let s=0;s<t.length;s++)for(let r=t[s];!r.isEmpty;r=r.nextLayer)r.maxPoint>=n&&i.push(new Ot(r,e,n,s));return 1==i.length?i[0]:new Tt(i)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Bt(this.heap,t);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Bt(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Bt(this.heap,0)}}}function Bt(t,e){for(let n=t[e];;){let i=1+(e<<1);if(i>=t.length)break;let s=t[i];if(i+1<t.length&&s.compare(t[i+1])>=0&&(s=t[i+1],i++),n.compare(s)<0)break;t[i]=n,t[e]=s,e=i}}class Ft{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Tt.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Nt(this.active,t),Nt(this.activeTo,t),Nt(this.activeRank,t),this.minActive=jt(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:s}=this.cursor;for(;e<this.activeRank.length&&(s-this.activeRank[e]||i-this.activeTo[e])>0;)e++;Dt(this.active,e,n),Dt(this.activeTo,e,i),Dt(this.activeRank,e,s),t&&Dt(t,e,this.cursor.from),this.minActive=jt(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>t){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),n&&Nt(n,i)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function Jt(t,e,n,i,s,r){t.goto(e),n.goto(i);let h=i+s,o=i,l=i-e;for(;;){let e=t.to+l-n.to||t.endSide-n.endSide,i=e<0?t.to+l:n.to,s=Math.min(i,h);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&Lt(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(o,s,t.point,n.point):s>o&&!Lt(t.active,n.active)&&r.compareRange(o,s,t.active,n.active),i>h)break;o=i,e<=0&&t.next(),e>=0&&n.next()}}function Lt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function Nt(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Dt(t,e,n){for(let n=t.length-1;n>=e;n--)t[n+1]=t[n];t[e]=n}function jt(t,e){let n=-1,i=1e9;for(let s=0;s<e.length;s++)(e[s]-i||t[s].endSide-t[n].endSide)<0&&(n=s,i=e[s]);return n}function qt(t,e,n=t.length){let i=0;for(let s=0;s<n;)9==t.charCodeAt(s)?(i+=e-i%e,s++):(i++,s=v(t,s));return i}function $t(t,e,n,i){for(let i=0,s=0;;){if(s>=e)return i;if(i==t.length)break;s+=9==t.charCodeAt(i)?n-s%n:1,i=v(t,i)}return!0===i?-1:t.length}}}]);
|