notebook 7.1.2__py3-none-any.whl → 7.2.0__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/static/113.bundle.js +1 -0
- notebook/static/1198.bundle.js +1 -1
- notebook/static/131.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/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1828.bundle.js +1 -0
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1846.bundle.js +1 -1
- notebook/static/1884.bundle.js +386 -0
- notebook/static/1958.bundle.js +1 -1
- notebook/static/1962.bundle.js +1 -0
- notebook/static/2007.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/2323.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2552.bundle.js +1 -1
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/2636.bundle.js +1 -0
- 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 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3154.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/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3462.bundle.js +1 -0
- notebook/static/3466.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 -0
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3797.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/4212.bundle.js +1 -1
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4430.bundle.js +1 -0
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4630.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4670.bundle.js +1 -1
- notebook/static/4708.bundle.js +1 -0
- notebook/static/4810.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 -0
- notebook/static/5254.bundle.js +1 -0
- notebook/static/5261.bundle.js +1 -1
- notebook/static/5263.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5425.bundle.js +1 -1
- notebook/static/5426.bundle.js +1 -1
- notebook/static/545.bundle.js +1 -0
- 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/5828.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/{1053.bundle.js → 6078.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/6281.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6417.bundle.js +1 -1
- notebook/static/6521.bundle.js +1 -0
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6731.bundle.js +1 -1
- notebook/static/6748.bundle.js +1 -0
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -0
- notebook/static/6893.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6972.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7153.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/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7450.bundle.js +1 -1
- notebook/static/7506.bundle.js +703 -0
- notebook/static/7543.bundle.js +1 -0
- notebook/static/755.bundle.js +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7655.bundle.js +1 -0
- notebook/static/7674.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/7854.bundle.js +1 -0
- notebook/static/7866.bundle.js +1 -1
- notebook/static/7884.bundle.js +1 -0
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7995.bundle.js +1 -1
- notebook/static/7997.bundle.js +1 -1
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8032.bundle.js +1 -1
- notebook/static/8471.bundle.js +1 -0
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -1
- notebook/static/8845.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 -0
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9239.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/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 -1
- 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 +173 -161
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +15 -15
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +10 -10
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +17 -17
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +12 -12
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +11 -11
- notebook-7.1.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/246.7bfc2ac5bb3d27d6e0b9.js → notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/302.8a8d0af0376cb309e580.js +1 -1
- notebook-7.1.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.6e8d43b976f4be45b3d2.js → notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.aff74c88f76bc9000e65.js +1 -1
- notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.76f40c4b4ee1c8583ca3.js +1 -0
- notebook-7.1.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.832d780237fca436ff92.js → notebook-7.2.0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.eced2d228ddfce366f36.js +1 -1
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +2 -2
- {notebook-7.1.2.dist-info → notebook-7.2.0.dist-info}/METADATA +5 -5
- {notebook-7.1.2.dist-info → notebook-7.2.0.dist-info}/RECORD +208 -206
- {notebook-7.1.2.dist-info → notebook-7.2.0.dist-info}/WHEEL +1 -1
- notebook/static/1337.bundle.js +0 -1
- notebook/static/1664.bundle.js +0 -743
- notebook/static/1682.bundle.js +0 -1
- notebook/static/1835.bundle.js +0 -1
- notebook/static/1950.bundle.js +0 -1
- notebook/static/2067.bundle.js +0 -1
- notebook/static/2094.bundle.js +0 -1
- notebook/static/2512.bundle.js +0 -1
- notebook/static/2577.bundle.js +0 -1
- notebook/static/2758.bundle.js +0 -1
- notebook/static/3654.bundle.js +0 -1
- notebook/static/4558.bundle.js +0 -1
- notebook/static/4928.bundle.js +0 -1
- notebook/static/4997.bundle.js +0 -1
- notebook/static/5088.bundle.js +0 -1
- notebook/static/514.bundle.js +0 -1
- notebook/static/6256.bundle.js +0 -1
- notebook/static/6467.bundle.js +0 -1
- notebook/static/7394.bundle.js +0 -1
- notebook/static/853.bundle.js +0 -1
- notebook-7.1.2.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.65b9457e7bb7d428c0a7.js +0 -1
- /notebook/static/{1664.bundle.js.LICENSE.txt → 7506.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/edit-notebook-metadata.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +0 -0
- {notebook-7.1.2.data → notebook-7.2.0.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.1.2.dist-info → notebook-7.2.0.dist-info}/entry_points.txt +0 -0
- {notebook-7.1.2.dist-info → notebook-7.2.0.dist-info}/licenses/LICENSE +0 -0
notebook/static/2323.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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:()=>ot,AnnotationType:()=>lt,ChangeDesc:()=>E,ChangeSet:()=>A,CharCategory:()=>xt,Compartment:()=>H,EditorSelection:()=>J,EditorState:()=>St,Facet:()=>D,Line:()=>f,MapMode:()=>P,Prec:()=>G,Range:()=>bt,RangeSet:()=>At,RangeSetBuilder:()=>Rt,RangeValue:()=>It,SelectionRange:()=>B,StateEffect:()=>ct,StateEffectType:()=>at,StateField:()=>U,Text:()=>i,Transaction:()=>ft,codePointAt:()=>S,codePointSize:()=>I,combineConfig:()=>yt,countColumn:()=>jt,findClusterBreak:()=>m,findColumn:()=>qt,fromCodePoint:()=>y});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){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){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);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"){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(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"){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.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}}let u="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<u.length;t++)u[t]+=u[t-1];function g(t){for(let e=1;e<u.length;e+=2)if(u[e]>t)return u[e-1]<=t;return!1}function d(t){return t>=127462&&t<=127487}const p=8205;function m(t,e,n=!0,i=!0){return(n?v:x)(t,e,i)}function v(t,e,n){if(e==t.length)return e;e&&w(t.charCodeAt(e))&&k(t.charCodeAt(e-1))&&e--;let i=S(t,e);for(e+=I(i);e<t.length;){let s=S(t,e);if(i==p||s==p||n&&g(s))e+=I(s),i=s;else{if(!d(s))break;{let n=0,i=e-2;for(;i>=0&&d(S(t,i));)n++,i-=2;if(n%2==0)break;e+=2}}}return e}function x(t,e,n){for(;e>0;){let i=v(t,e-2,n);if(i<e)return i;e--}return 0}function w(t){return t>=56320&&t<57344}function k(t){return t>=55296&&t<56320}function S(t,e){let n=t.charCodeAt(e);if(!k(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return w(i)?i-56320+(n-55296<<10)+65536:n}function y(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function I(t){return t<65536?1:2}const b=/\r\n?|\n/;var P=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(P||(P={}));class E{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){M(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 E(t)}composeDesc(t){return this.empty?t:t.empty?this:T(this,t)}mapDesc(t,e=!1){return t.empty?this:O(this,t,e)}mapPos(t,e=-1,n=P.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!=P.Simple&&l>=t&&(n==P.TrackDel&&i<t&&l>t||n==P.TrackBefore&&i<t||n==P.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 E(t)}static create(t){return new E(t)}}class A extends E{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 M(this,((e,n,i,s,r)=>t=t.replace(i,i+(n-e),r)),!1),t}mapDesc(t,e=!1){return O(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:T(this,t,!0)}map(t,e=!1){return t.empty?this:O(this,t,e,!0)}iterChanges(t,e=!1){M(this,t,e)}get desc(){return E.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:E.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||b)):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 M(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 O(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):E.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 T(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):E.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 B{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let t=3&this.flags;return 3==t?null:t}get goalColumn(){let t=this.flags>>5;return 33554431==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 B(n,i,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return J.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return J.range(this.anchor,n)}eq(t){return this.anchor==t.anchor&&this.head==t.head}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 J.range(t.anchor,t.head)}static create(t,e,n){return new B(t,e,n)}}class J{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:J.create(this.ranges.map((n=>n.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let e=0;e<this.ranges.length;e++)if(!this.ranges[e].eq(t.ranges[e]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new J([this.main],0)}addRange(t,e=!0){return J.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,J.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 J(t.ranges.map((t=>B.fromJSON(t))),t.main)}static single(t,e=t){return new J([J.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 J.normalized(t.slice(),e);n=s.to}return new J(t,e)}static cursor(t,e=0,n,i){return B.create(t,t,(0==e?0:e<0?4:8)|(null==n?3:Math.min(2,n))|(null!=i?i:33554431)<<5)}static range(t,e,n,i){let s=(null!=n?n:33554431)<<5|(null==i?3:Math.min(2,i));return e<t?B.create(e,t,24|s):B.create(t,e,(e>t?4: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?J.range(h,r):J.range(r,h))}}return new J(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 L=0;class D{constructor(t,e,n,i,s){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=i,this.id=L++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}static define(t={}){return new D(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:j),!!t.static,t.enables)}of(t){return new q([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new q(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new q(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(n=>e(n.field(t))))}}function j(t,e){return t==e||t.length==e.length&&t.every(((t,n)=>t===e[n]))}class q{constructor(t,e,n,i){this.dependencies=t,this.facet=e,this.type=n,this.value=i,this.id=L++}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)||_(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=Z(e,l);if(this.dependencies.every((n=>n instanceof D?e.facet(n)===t.facet(n):!(n instanceof U)||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 _(t,e){let n=!1;for(let i of e)1&X(t,i)&&(n=!0);return n}function z(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=Z(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)X(t,e);return t.values[h]=o(t),1},update(t,n){if(!_(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=_(t,i),l=s.config.facets[e.id],a=s.facet(e);if(l&&!r&&j(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 V=D.define({static:!0});class U{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 U(L++,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(V).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,V.of({field:this,create:t})]}get extension(){return this}}function W(t){return e=>new Y(e,t)}const G={highest:W(0),high:W(1),default:W(2),low:W(3),lowest:W(4)};class Y{constructor(t,e){this.inner=t,this.prec=e}}class H{of(t){return new K(this,t)}reconfigure(t){return H.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class K{constructor(t,e){this.compartment=t,this.inner=e}}class Q{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 K&&n.delete(r.compartment)}if(s.set(r,h),Array.isArray(r))for(let e of r)t(e,h);else if(r instanceof K){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 Y)t(r.inner,r.prec);else if(r instanceof U)i[h].push(r),r.provides&&t(r.provides,h);else if(r instanceof q)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 U?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,j(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=>z(t,i,e)))}}let c=l.map((t=>t(h)));return new Q(t,r,c,h,o,s)}}function X(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 Z(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const tt=D.define(),et=D.define({combine:t=>t.some((t=>t)),static:!0}),nt=D.define({combine:t=>t.length?t[0]:void 0,static:!0}),it=D.define(),st=D.define(),rt=D.define(),ht=D.define({combine:t=>!!t.length&&t[0]});class ot{constructor(t,e){this.type=t,this.value=e}static define(){return new lt}}class lt{of(t){return new ot(this,t)}}class at{constructor(t){this.map=t}of(t){return new ct(this,t)}}class ct{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 ct(this.type,e)}is(t){return this.type==t}static define(t={}){return new at(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}}ct.reconfigure=ct.define(),ct.appendConfig=ct.define();class ft{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==ft.time))||(this.annotations=s.concat(ft.time.of(Date.now())))}static create(t,e,n,i,s,r){return new ft(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(ft.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function ut(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 gt(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:ct.mapEffects(t.effects,s).concat(ct.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function dt(t,e,n){let i=e.selection,s=vt(e.annotations);return e.userEvent&&(s=s.concat(ft.userEvent.of(e.userEvent))),{changes:e.changes instanceof A?e.changes:A.of(e.changes||[],n,t.facet(nt)),selection:i&&(i instanceof J?i:J.single(i.anchor,i.head)),effects:vt(e.effects),annotations:s,scrollIntoView:!!e.scrollIntoView}}function pt(t,e,n){let i=dt(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=gt(i,dt(t,e[s],r?i.changes.newLength:t.doc.length),r)}let s=ft.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return function(t){let e=t.startState,n=e.facet(rt),i=t;for(let s=n.length-1;s>=0;s--){let r=n[s](t);r&&Object.keys(r).length&&(i=gt(i,dt(e,r,t.changes.newLength),!0))}return i==t?t:ft.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(it)){let e=i(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:ut(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=ft.create(e,i,t.selection&&t.selection.map(s),ct.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(st);for(let n=i.length-1;n>=0;n--){let s=i[n](t);t=s instanceof ft?s:Array.isArray(s)&&1==s.length&&s[0]instanceof ft?s[0]:pt(e,vt(s),!1)}return t}(s):s)}ft.time=ot.define(),ft.userEvent=ot.define(),ft.addToHistory=ot.define(),ft.remote=ot.define();const mt=[];function vt(t){return null==t?mt:Array.isArray(t)?t:[t]}var xt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(xt||(xt={}));const wt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let kt;try{kt=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}class St{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++)X(this,t<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return X(this,n),Z(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return pt(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:i,compartments:s}=n;for(let e of t.effects)e.is(H.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(ct.reconfigure)?(n=null,i=e.value):e.is(ct.appendConfig)&&(n=null,i=vt(i).concat(e.value));n?e=t.startState.values.slice():(n=Q.resolve(i,s,this),e=new St(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values),new St(n,t.newDoc,t.newSelection,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:J.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=vt(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=ct.mapEffects(r,l).concat(ct.mapEffects(vt(h.effects),a))}return{changes:i,selection:J.create(s,e.mainIndex),effects:r}}changes(t=[]){return t instanceof A?t:A.of(t,this.doc.length,this.facet(St.lineSeparator))}toText(t){return i.of(t.split(this.facet(St.lineSeparator)||b))}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:(X(this,e),Z(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 U&&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 St.create({doc:t.doc,selection:J.fromJSON(t.selection),extensions:e.extensions?i.concat([e.extensions]):i})}static create(t={}){let e=Q.resolve(t.extensions||[],new Map),n=t.doc instanceof i?t.doc:i.of((t.doc||"").split(e.staticFacet(St.lineSeparator)||b)),s=t.selection?t.selection instanceof J?t.selection:J.single(t.selection.anchor,t.selection.head):J.single(0);return N(s,n.length),e.staticFacet(et)||(s=s.asSingle()),new St(e,n,s,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(St.tabSize)}get lineBreak(){return this.facet(St.lineSeparator)||"\n"}get readOnly(){return this.facet(ht)}phrase(t,...e){for(let e of this.facet(St.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(tt))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 xt.Space;if(function(t){if(kt)return kt.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||wt.test(n)))return!0}return!1}(t))return xt.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return xt.Word;return xt.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=m(e,r,!1);if(s(e.slice(t,r))!=xt.Word)break;r=t}for(;h<i;){let t=m(e,h);if(s(e.slice(h,t))!=xt.Word)break;h=t}return r==h?null:J.range(r+n,h+n)}}function yt(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}St.allowMultipleSelections=et,St.tabSize=D.define({combine:t=>t.length?t[0]:4}),St.lineSeparator=nt,St.readOnly=ht,St.phrases=D.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]))}}),St.languageData=tt,St.changeFilter=it,St.transactionFilter=st,St.transactionExtender=rt,H.reconfigure=ct.define();class It{eq(t){return this==t}range(t,e=t){return bt.create(t,e,this)}}It.prototype.startSide=It.prototype.endSide=0,It.prototype.point=!1,It.prototype.mapMode=P.TrackDel;class bt{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new bt(t,e,n)}}function Pt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Et{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 Et(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(Pt)),this.isEmpty)return e.length?At.of(e):this;let h=new Mt(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(bt.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 Ot.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Ot.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)=>Bt(l,t,a,e,n,i))),n.empty&&0==n.length&&Bt(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||!Jt(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: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 bt?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(Pt(e,i)>0)return t.slice().sort(Pt);e=i}return t}(t):t)n.add(i.from,i.to,i.value);return n.finish()}}At.empty=new At([],[],null,-1),At.empty.nextLayer=At.empty;class Rt{finishChunk(t){this.chunks.push(new Et(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 Mt{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 Ot{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 Mt(r,e,n,s));return 1==i.length?i[0]:new Ot(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--)Tt(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--)Tt(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(),Tt(this.heap,0)}}}function Tt(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=Ot.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=Dt(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:i,rank:s}=this.cursor;for(;e<this.activeRank.length&&this.activeRank[e]<=s;)e++;Lt(this.active,e,n),Lt(this.activeTo,e,i),Lt(this.activeRank,e,s),t&&Lt(t,e,this.cursor.from),this.minActive=Dt(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 Bt(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))&&Jt(t.activeForPoint(t.to),n.activeForPoint(n.to))||r.comparePoint(o,s,t.point,n.point):s>o&&!Jt(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 Jt(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 Lt(t,e,n){for(let n=t.length-1;n>=e;n--)t[n+1]=t[n];t[e]=n}function Dt(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 jt(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=m(t,s));return i}function qt(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=m(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}}}]);
|
notebook/static/2401.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2401],{43967:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});var r,s=n(11351),a=n(20998),i=n(81997);class o{constructor(e){this.trusted=!1,this._changed=new i.Signal(this),this._raw={};const t=r.getData(e.value);this._data=new s.ObservableJSON({values:t}),this._rawData=t;const n=e.value;for(const e in n)"data"===e||(this._raw[e]=r.extract(n,e))}get changed(){return this._changed}dispose(){this._data.dispose(),i.Signal.clearData(this)}get data(){return this._rawData}get metadata(){return{}}setData(e){e.data&&(this._updateObservable(this._data,e.data),this._rawData=e.data),this._changed.emit(void 0)}toJSON(){const e={};for(const t in this._raw)e[t]=r.extract(this._raw,t);return e}_updateObservable(e,t){const n=e.keys(),r=Object.keys(t);for(const t of n)-1===r.indexOf(t)&&e.delete(t);for(const n of r){const r=e.get(n),s=t[n];r!==s&&e.set(n,s)}}}!function(e){e.getData=function(e){return r.getData(e)}}(o||(o={})),function(e){function t(e){return function(e){const t=Object.create(null);for(const r in e)t[r]=n(e,r);return t}(e)}function n(e,t){const n=e[t];return void 0===n||a.JSONExt.isPrimitive(n)?n:a.JSONExt.deepCopy(n)}e.getData=t,e.getBundleOptions=function(e){return{data:t(e.value)}},e.extract=n}(r||(r={}))},15862:(e,t,n)=>{"use strict";n.d(t,{BJ:()=>d,Dq:()=>c,F:()=>l,Lz:()=>a,Nf:()=>u,hJ:()=>i,nF:()=>h,vy:()=>s,xr:()=>o});var r=n(28182);const s={safe:!0,mimeTypes:["text/html"],defaultRank:50,createRenderer:e=>new r.oI(e)},a={safe:!0,mimeTypes:["image/bmp","image/png","image/jpeg","image/gif","image/webp"],defaultRank:90,createRenderer:e=>new r.UH(e)},i={safe:!0,mimeTypes:["text/latex"],defaultRank:70,createRenderer:e=>new r.FK(e)},o={safe:!0,mimeTypes:["text/markdown"],defaultRank:60,createRenderer:e=>new r.cw(e)},l={safe:!1,mimeTypes:["image/svg+xml"],defaultRank:80,createRenderer:e=>new r.zt(e)},c={safe:!0,mimeTypes:["application/vnd.jupyter.stderr"],defaultRank:110,createRenderer:e=>new r.Hw(e)},d={safe:!0,mimeTypes:["text/plain","application/vnd.jupyter.stdout"],defaultRank:120,createRenderer:e=>new r.lH(e)},h={safe:!1,mimeTypes:["text/javascript","application/javascript"],defaultRank:110,createRenderer:e=>new r.ND(e)},u=[s,o,i,l,a,h,c,d]},72401:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AttachmentModel:()=>a.g,ILatexTypesetter:()=>u._y,IMarkdownParser:()=>u.sc,IRenderMimeRegistry:()=>u.ZD,MimeModel:()=>l.a,OutputModel:()=>c.M,RenderMimeRegistry:()=>d.D,RenderedCommon:()=>p.pY,RenderedError:()=>p.Hw,RenderedHTML:()=>p.oI,RenderedHTMLCommon:()=>p.BP,RenderedImage:()=>p.UH,RenderedJavaScript:()=>p.ND,RenderedLatex:()=>p.FK,RenderedMarkdown:()=>p.cw,RenderedSVG:()=>p.zt,RenderedText:()=>p.lH,errorRendererFactory:()=>i.Dq,htmlRendererFactory:()=>i.vy,imageRendererFactory:()=>i.Lz,javaScriptRendererFactory:()=>i.nF,latexRendererFactory:()=>i.hJ,markdownRendererFactory:()=>i.xr,removeMath:()=>o.D,renderError:()=>h.Op,renderHTML:()=>h.NN,renderImage:()=>h.co,renderLatex:()=>h.K3,renderMarkdown:()=>h.ap,renderSVG:()=>h.KB,renderText:()=>h.IY,replaceMath:()=>o.b,standardRendererFactories:()=>i.Nf,svgRendererFactory:()=>i.F,textRendererFactory:()=>i.BJ});var r=n(56710),s={};for(const e in r)"default"!==e&&(s[e]=()=>r[e]);n.d(t,s);var a=n(43967),i=n(15862),o=n(69837),l=n(32021),c=n(4800),d=n(32549),h=n(3328),u=n(2186),p=n(28182)},69837:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,b:()=>i});const r="$",s=/(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[{}$]|[{}]|(?:\n\s*)+|@@\d+@@|\\\\(?:\(|\)|\[|\]))/i;function a(e){const t=[];let n,a=null,i=null,l=null,c=0;e.includes("`")||e.includes("~~~")?(e=e.replace(/~/g,"~T").replace(/^(?<fence>`{3,}|(~T){3,})[^`\n]*\n([\s\S]*?)^\k<fence>`*$/gm,(e=>e.replace(/\$/g,"~D"))).replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm,(e=>e.replace(/\$/g,"~D"))),n=e=>e.replace(/~([TD])/g,((e,t)=>"T"===t?"~":r))):n=e=>e;let d=e.replace(/\r\n?/g,"\n").split(s);for(let e=1,s=d.length;e<s;e+=2){const s=d[e];"@"===s.charAt(0)?(d[e]="@@"+t.length+"@@",t.push(s)):null!==a?s===i?c?l=e:(d=o(a,e,n,t,d),a=null,i=null,l=null):s.match(/\n.*\n/)?(null!==l&&(e=l,d=o(a,e,n,t,d)),a=null,i=null,l=null,c=0):"{"===s?c++:"}"===s&&c&&c--:s===r||"$$"===s?(a=e,i=s,c=0):"\\\\("===s||"\\\\["===s?(a=e,i="("===s.slice(-1)?"\\\\)":"\\\\]",c=0):"begin"===s.substr(1,5)&&(a=e,i="\\end"+s.substr(6),c=0)}return null!==a&&null!==l&&(d=o(a,l,n,t,d),a=null,i=null,l=null),{text:n(d.join("")),math:t}}function i(e,t){return e.replace(/@@(\d+)@@/g,((e,n)=>{let r=t[n];return"\\\\("===r.substr(0,3)&&"\\\\)"===r.substr(r.length-3)?r="\\("+r.substring(3,r.length-3)+"\\)":"\\\\["===r.substr(0,3)&&"\\\\]"===r.substr(r.length-3)&&(r="\\["+r.substring(3,r.length-3)+"\\]"),r}))}function o(e,t,n,r,s){let a=s.slice(e,t+1).join("").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");for(navigator&&"Microsoft Internet Explorer"===navigator.appName&&(a=a.replace(/(%[^\n]*)\n/g,"$1<br/>\n"));t>e;)s[t]="",t--;return s[e]="@@"+r.length+"@@",n&&(a=n(a)),r.push(a),s}},32021:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});class r{constructor(e={}){this.trusted=!!e.trusted,this._data=e.data||{},this._metadata=e.metadata||{},this._callback=e.callback||s.noOp}get data(){return this._data}get metadata(){return this._metadata}setData(e){this._data=e.data||this._data,this._metadata=e.metadata||this._metadata,this._callback(e)}}var s;!function(e){e.noOp=function(){}}(s||(s={}))},4800:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var r,s=n(85923),a=n(11351),i=n(20998),o=n(81997);class l{constructor(e){this._changed=new o.Signal(this),this._raw={};const{data:t,metadata:n,trusted:i}=r.getBundleOptions(e);this._data=new a.ObservableJSON({values:t}),this._rawData=t,this._metadata=new a.ObservableJSON({values:n}),this._rawMetadata=n,this.trusted=i;const l=e.value;for(const e in l)switch(e){case"data":case"metadata":break;default:this._raw[e]=r.extract(l,e)}this.type=l.output_type,s.isExecuteResult(l)?this.executionCount=l.execution_count:this.executionCount=null}get changed(){return this._changed}dispose(){this._data.dispose(),this._metadata.dispose(),o.Signal.clearData(this)}get data(){return this._rawData}get metadata(){return this._rawMetadata}setData(e){e.data&&(this._updateObservable(this._data,e.data),this._rawData=e.data),e.metadata&&(this._updateObservable(this._metadata,e.metadata),this._rawMetadata=e.metadata),this._changed.emit()}toJSON(){const e={};for(const t in this._raw)e[t]=r.extract(this._raw,t);switch(this.type){case"display_data":case"execute_result":case"update_display_data":e.data=this.data,e.metadata=this.metadata}return delete e.transient,e}_updateObservable(e,t){const n=e.keys(),r=Object.keys(t);for(const t of n)-1===r.indexOf(t)&&e.delete(t);for(const n of r){const r=e.get(n),s=t[n];r!==s&&e.set(n,s)}}}!function(e){e.getData=function(e){return r.getData(e)},e.getMetadata=function(e){return r.getMetadata(e)}}(l||(l={})),function(e){function t(e){let t={};if(s.isExecuteResult(e)||s.isDisplayData(e)||s.isDisplayUpdate(e))t=e.data;else if(s.isStream(e))"stderr"===e.name?t["application/vnd.jupyter.stderr"]=e.text:t["application/vnd.jupyter.stdout"]=e.text;else if(s.isError(e)){t["application/vnd.jupyter.error"]=e;const n=e.traceback.join("\n");t["application/vnd.jupyter.stderr"]=n||`${e.ename}: ${e.evalue}`}return function(e){const t=Object.create(null);for(const n in e)t[n]=r(e,n);return t}(t)}function n(e){const t=Object.create(null);if(s.isExecuteResult(e)||s.isDisplayData(e))for(const n in e.metadata)t[n]=r(e.metadata,n);return t}function r(e,t){const n=e[t];return void 0===n||i.JSONExt.isPrimitive(n)?n:JSON.parse(JSON.stringify(n))}e.getData=t,e.getMetadata=n,e.getBundleOptions=function(e){return{data:t(e.value),metadata:n(e.value),trusted:!!e.trusted}},e.extract=r}(r||(r={}))},32549:(e,t,n)=>{"use strict";n.d(t,{D:()=>l});var r,s=n(12982),a=n(38639),i=n(71677),o=n(32021);class l{constructor(e={}){var t,n,r,a,o,l;if(this._id=0,this._ranks={},this._types=null,this._factories={},this.translator=null!==(t=e.translator)&&void 0!==t?t:i.nullTranslator,this.resolver=null!==(n=e.resolver)&&void 0!==n?n:null,this.linkHandler=null!==(r=e.linkHandler)&&void 0!==r?r:null,this.latexTypesetter=null!==(a=e.latexTypesetter)&&void 0!==a?a:null,this.markdownParser=null!==(o=e.markdownParser)&&void 0!==o?o:null,this.sanitizer=null!==(l=e.sanitizer)&&void 0!==l?l:new s.Sanitizer,e.initialFactories)for(const t of e.initialFactories)this.addFactory(t)}get mimeTypes(){return this._types||(this._types=r.sortedTypes(this._ranks))}preferredMimeType(e,t="ensure"){if("ensure"===t||"prefer"===t)for(const t of this.mimeTypes)if(t in e&&this._factories[t].safe)return t;if("ensure"!==t)for(const t of this.mimeTypes)if(t in e)return t}createRenderer(e){if(!(e in this._factories))throw new Error(`No factory for mime type: '${e}'`);return this._factories[e].createRenderer({mimeType:e,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,latexTypesetter:this.latexTypesetter,markdownParser:this.markdownParser,translator:this.translator})}createModel(e={}){return new o.a(e)}clone(e={}){var t,n,r,s,a,i,o,c,d,h;const u=new l({resolver:null!==(n=null!==(t=e.resolver)&&void 0!==t?t:this.resolver)&&void 0!==n?n:void 0,sanitizer:null!==(s=null!==(r=e.sanitizer)&&void 0!==r?r:this.sanitizer)&&void 0!==s?s:void 0,linkHandler:null!==(i=null!==(a=e.linkHandler)&&void 0!==a?a:this.linkHandler)&&void 0!==i?i:void 0,latexTypesetter:null!==(c=null!==(o=e.latexTypesetter)&&void 0!==o?o:this.latexTypesetter)&&void 0!==c?c:void 0,markdownParser:null!==(h=null!==(d=e.markdownParser)&&void 0!==d?d:this.markdownParser)&&void 0!==h?h:void 0,translator:this.translator});return u._factories={...this._factories},u._ranks={...this._ranks},u._id=this._id,u}getFactory(e){return this._factories[e]}addFactory(e,t){void 0===t&&void 0===(t=e.defaultRank)&&(t=100);for(const n of e.mimeTypes)this._factories[n]=e,this._ranks[n]={rank:t,id:this._id++};this._types=null}removeMimeType(e){delete this._factories[e],delete this._ranks[e],this._types=null}getRank(e){const t=this._ranks[e];return t&&t.rank}setRank(e,t){if(!this._ranks[e])return;const n=this._id++;this._ranks[e]={rank:t,id:n},this._types=null}}!function(e){e.UrlResolver=class{constructor(e){this._path=e.path,this._contents=e.contents}get path(){return this._path}set path(e){this._path=e}async resolveUrl(e){if(this.isLocal(e)){const t=encodeURI(a.PathExt.dirname(this.path));e=a.PathExt.resolve(t,e)}return e}async getDownloadUrl(e){return this.isLocal(e)?this._contents.getDownloadUrl(decodeURIComponent(e)):e}isLocal(e,t=!1){return!this.isMalformed(e)&&(a.URLExt.isLocal(e,t)||!!this._contents.driveName(decodeURI(e)))}async resolvePath(e){const t=a.PageConfig.getOption("rootUri").replace("file://","");if(e.startsWith("~/")&&t.startsWith("/home/")&&(e=t.split("/").slice(0,3).join("/")+e.substring(1)),e.startsWith(t)||e.startsWith("./"))try{const n=e.replace(t,"");return{path:(await this._contents.get(n,{content:!1})).path,scope:"server"}}catch(t){return console.warn(`Could not resolve location of ${e} on server`),null}return{path:e,scope:"kernel"}}isMalformed(e){try{return decodeURI(e),!1}catch(e){if(e instanceof URIError)return!0;throw e}}}}(l||(l={})),function(e){e.sortedTypes=function(e){return Object.keys(e).sort(((t,n)=>{const r=e[t],s=e[n];return r.rank!==s.rank?r.rank-s.rank:r.id-s.id}))}}(r||(r={}))},3328:(e,t,n)=>{"use strict";n.d(t,{IY:()=>w,K3:()=>u,KB:()=>f,NN:()=>d,Op:()=>T,ap:()=>p,co:()=>h});var r,s,a=n(38639),i=n(71677),o=n(8872),l=n.n(o),c=n(69837);function d(e){let{host:t,source:n,trusted:r,sanitizer:a,resolver:o,linkHandler:l,shouldTypeset:c,latexTypesetter:d,translator:h}=e;h=h||i.nullTranslator;const u=null==h?void 0:h.load("jupyterlab");let p,f=n;if(!n)return t.textContent="",Promise.resolve(void 0);if(r||(f=`${n}`,n=a.sanitize(n)),t.innerHTML=n,t.getElementsByTagName("script").length>0)if(r)s.evalInnerHTMLScriptTags(t);else{const e=document.createElement("div"),n=document.createElement("pre");n.textContent=u.__("This HTML output contains inline scripts. Are you sure that you want to run arbitrary Javascript within your JupyterLab session?");const r=document.createElement("button");r.textContent=u.__("Run"),r.onclick=e=>{t.innerHTML=f,s.evalInnerHTMLScriptTags(t),t.firstChild&&t.removeChild(t.firstChild)},e.appendChild(n),e.appendChild(r),t.insertBefore(e,t.firstChild)}return s.handleDefaults(t,o),p=o?s.handleUrls(t,o,l):Promise.resolve(void 0),p.then((()=>{c&&d&&d.typeset(t)}))}function h(e){const{host:t,mimeType:n,source:r,width:s,height:a,needsBackground:i,unconfined:o}=e;t.textContent="";const l=document.createElement("img");return l.src=`data:${n};base64,${r}`,"number"==typeof a&&(l.height=a),"number"==typeof s&&(l.width=s),"light"===i?l.classList.add("jp-needs-light-background"):"dark"===i&&l.classList.add("jp-needs-dark-background"),!0===o&&l.classList.add("jp-mod-unconfined"),t.appendChild(l),Promise.resolve(void 0)}function u(e){const{host:t,source:n,shouldTypeset:r,latexTypesetter:s}=e;return t.textContent=n,r&&s&&s.typeset(t),Promise.resolve(void 0)}async function p(e){const{host:t,source:n,markdownParser:r,...a}=e;if(!n)return void(t.textContent="");let i="";if(r){const e=(0,c.D)(n);i=await r.render(e.text),i=(0,c.b)(i,e.math)}else i=`<pre>${n}</pre>`;await d({host:t,source:i,...a}),s.headerAnchors(t)}function f(e){let{host:t,source:n,trusted:r,unconfined:s}=e;if(!n)return t.textContent="",Promise.resolve(void 0);if(!r)return t.textContent="Cannot display an untrusted SVG. Maybe you need to run the cell?",Promise.resolve(void 0);n.search("<svg[^>]+xmlns=[^>]+svg")<0&&(n=n.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));const a=new Image;return a.src=`data:image/svg+xml,${encodeURIComponent(n)}`,t.appendChild(a),!0===s&&t.classList.add("jp-mod-unconfined"),Promise.resolve()}!function(e){e.createHeaderId=function(e){var t;return(null!==(t=e.textContent)&&void 0!==t?t:"").replace(/ /g,"-")}}(p||(p={})),function(e){const t="\\u0000-\\u0020\\u007f-\\u009f";e.webLinkRegex=new RegExp("(?<path>(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+t+'"]{2,}[^\\s'+t+"\"'(){}\\[\\],:;.!?])","ug");const n=new RegExp(`(${/(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/.source}|${/(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/.source})`),r=navigator.userAgent.indexOf("Windows")>=0;e.pathLinkRegex=new RegExp(`(?<path>${r?n.source:/((?:\~|\.)?(?:\/[\w\.-]*)+)/.source})${/(?:(?:\:|", line )(?<line>[\d]+))?(?:\:(?<column>[\d]+))?/.source}`,"g")}(r||(r={}));class m{constructor(){this.regex=r.webLinkRegex}createAnchor(e,t){const n=document.createElement("a");return n.href=e.startsWith("www.")?"https://"+e:e,n.rel="noopener",n.target="_blank",n.appendChild(document.createTextNode(t)),n}processPath(e){const t=e.slice(-1),n=-1!==[">","<"].indexOf(t)?e.length-1:e.length;return e.slice(0,n)}processLabel(e){return this.processPath(e)}}class g{constructor(){this.regex=r.pathLinkRegex}createAnchor(e,t,n){const r=document.createElement("a");r.dataset.path=e;const s=parseInt(n.line,10);let a=isNaN(s)?"":"line="+(s-1);return r.dataset.locator=a,r.appendChild(document.createTextNode(t)),r}}function y(e,t){const n=[];t.checkWeb&&n.push(new m),t.checkPaths&&n.push(new g);const r=[],s=(e,t)=>{if(t>=n.length)return void r.push(document.createTextNode(e));const a=n[t];let i,o=0;const l=a.regex;for(l.lastIndex=0;null!=(i=l.exec(e));){const n=e.substring(o,i.index);n&&s(n,t+1);const{path:l,...c}=i.groups,d=a.processPath?a.processPath(l):l,h=a.processLabel?a.processLabel(i[0]):i[0];r.push(a.createAnchor(d,h,c)),o=i.index+h.length}const c=e.substring(o);c&&s(c,t+1)};return s(e,0),r}function v(e,t){var n,r;const s=e.cloneNode();s.textContent=null===(n=e.textContent)||void 0===n?void 0:n.slice(0,t);const a=e.cloneNode();return a.textContent=null===(r=e.textContent)||void 0===r?void 0:r.slice(t),{pre:s,post:a}}function*x(e){var t;let n,r=0;for(let s of e)n=r+((null===(t=s.textContent)||void 0===t?void 0:t.length)||0),yield{node:s,start:r,end:n,isText:s.nodeType===Node.TEXT_NODE},r=n}function w(e){var t,n;const{host:r,sanitizer:a,source:i}=e,o=a.sanitize(s.ansiSpan(i),{allowedTags:["span"]}),l=document.createElement("pre");l.innerHTML=o;const c=l.textContent;let d;if(c){const e=null===(n=null===(t=a.getAutolink)||void 0===t?void 0:t.call(a))||void 0===n||n?y(c,{checkWeb:!0,checkPaths:!1}):[document.createTextNode(o)];d=b(Array.from(l.childNodes),e)}else d=document.createElement("pre");return r.appendChild(d),Promise.resolve(void 0)}function T(e){var t,n;const{host:r,linkHandler:a,sanitizer:i,resolver:o,source:l}=e,c=i.sanitize(s.ansiSpan(l),{allowedTags:["span"]}),d=document.createElement("pre");d.innerHTML=c;const h=d.textContent;let u,p;if(h){const e=null===(n=null===(t=i.getAutolink)||void 0===t?void 0:t.call(i))||void 0===n||n?y(h,{checkWeb:!0,checkPaths:!0}):[document.createTextNode(c)];u=b(Array.from(d.childNodes),e)}else u=document.createElement("pre");return r.appendChild(u),p=o?s.handlePaths(r,o,a):Promise.resolve(void 0),p}function b(e,t){const n=document.createElement("pre");let r=!1;const s=[];for(let n of function*(e,t){var n,r;let s=x(e),a=x(t),i=s.next(),o=a.next();for(;!i.done&&!o.done;){let e=i.value,t=o.value;if(e.isText&&e.start<=t.start&&e.end>=t.end)yield[null,t.node],o=a.next();else if(t.isText&&t.start<=e.start&&t.end>=e.end)yield[e.node,null],i=s.next();else if(e.end===t.end&&e.start===t.start)yield[e.node,t.node],i=s.next(),o=a.next();else if(e.end>t.end){let{pre:r,post:s}=v(e.node,t.end-e.start);t.start<e.start&&(t.node.textContent=null===(n=t.node.textContent)||void 0===n?void 0:n.slice(e.start-t.start)),yield[r,t.node],e.node=s,e.start=t.end,o=a.next()}else{if(!(t.end>e.end))throw new Error(`Unexpected intersection: ${JSON.stringify(e)} ${JSON.stringify(t)}`);{let{pre:n,post:a}=v(t.node,e.end-t.start);e.start<t.start&&(e.node.textContent=null===(r=e.node.textContent)||void 0===r?void 0:r.slice(t.start-e.start)),yield[e.node,n],t.node=a,t.start=e.end,i=s.next()}}}}(e,t)){if(!n[0]){s.push(n[1]),r=n[1].nodeType!==Node.TEXT_NODE;continue}if(!n[1]){s.push(n[0]),r=!1;continue}let[e,t]=n;const a=s[s.length-1];r&&t.href===a.href?a.appendChild(e):t.nodeType!==Node.TEXT_NODE?(t.textContent="",t.appendChild(e),s.push(t),r=!0):(s.push(e),r=!1)}for(const e of s)n.appendChild(e);return n}!function(e){async function t(e,t,n){const r=e.getAttribute(t)||"",s=n.isLocal?n.isLocal(r):a.URLExt.isLocal(r);if(r&&s)try{const s=await n.resolveUrl(r);let i=await n.getDownloadUrl(s);"data:"!==a.URLExt.parse(i).protocol&&(i+=(/\?/.test(i)?"&":"?")+(new Date).getTime()),e.setAttribute(t,i)}catch(n){throw e.setAttribute(t,""),n}}function n(e,t,n){let r=e.getAttribute("href")||"";const s=t.isLocal?t.isLocal(r):a.URLExt.isLocal(r);if(!r||!s)return Promise.resolve(void 0);const i=e.hash;if(i){if(i===r)return e.target="_self",Promise.resolve(void 0);r=r.replace(i,"")}return t.resolveUrl(r).then((r=>{const s=decodeURIComponent(r);return n&&n.handleLink(e,s,i),t.getDownloadUrl(r)})).then((t=>{e.href=t+i})).catch((t=>{e.href=""}))}async function r(e,t,n){let r=e.dataset.path||"",s=e.dataset.locator?"#"+e.dataset.locator:"";delete e.dataset.path,delete e.dataset.locator;const i=t.isLocal?t.isLocal(r,!0):a.URLExt.isLocal(r,!0);if(!(r&&i&&t.resolvePath&&n&&n.handlePath))return e.replaceWith(...e.childNodes),Promise.resolve(void 0);try{const a=await t.resolvePath(r);if(!a)return console.log("Path resolution bailing: does not exist"),Promise.resolve(void 0);n.handlePath(e,a.path,a.scope,s),e.href=a.path+s}catch(t){console.warn("Path anchor error:",t),e.href="#linking-failed-see-console"}}e.evalInnerHTMLScriptTags=function(e){const t=Array.from(e.getElementsByTagName("script"));for(const e of t){if(!e.parentNode)continue;const t=document.createElement("script"),n=e.attributes;for(let e=0,r=n.length;e<r;++e){const{name:r,value:s}=n[e];t.setAttribute(r,s)}t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}},e.handleDefaults=function(e,t){const n=e.getElementsByTagName("a");for(let e=0;e<n.length;e++){const r=n[e];if(!(r instanceof HTMLAnchorElement))continue;const s=r.href,i=t&&t.isLocal?t.isLocal(s):a.URLExt.isLocal(s);r.target||(r.target=i?"_self":"_blank"),i||(r.rel="noopener")}const r=e.getElementsByTagName("img");for(let e=0;e<r.length;e++)r[e].alt||(r[e].alt="Image")},e.handleUrls=function(e,r,s){const a=[],i=e.querySelectorAll("*[src]");for(let e=0;e<i.length;e++)a.push(t(i[e],"src",r));const o=e.getElementsByTagName("a");for(let e=0;e<o.length;e++)a.push(n(o[e],r,s));const l=e.getElementsByTagName("link");for(let e=0;e<l.length;e++)a.push(t(l[e],"href",r));return Promise.all(a).then((()=>{}))},e.handlePaths=async function(e,t,n){const s=e.getElementsByTagName("a");for(let e=0;e<s.length;e++)await r(s[e],t,n)},e.headerAnchors=function(e){const t=["h1","h2","h3","h4","h5","h6"];for(const n of t){const t=e.getElementsByTagName(n);for(let e=0;e<t.length;e++){const n=t[e];n.id=p.createHeaderId(n);const r=document.createElement("a");r.target="_self",r.textContent="¶",r.href="#"+n.id,r.classList.add("jp-InternalAnchorLink"),n.appendChild(r)}}};const s=["ansi-black","ansi-red","ansi-green","ansi-yellow","ansi-blue","ansi-magenta","ansi-cyan","ansi-white","ansi-black-intense","ansi-red-intense","ansi-green-intense","ansi-yellow-intense","ansi-blue-intense","ansi-magenta-intense","ansi-cyan-intense","ansi-white-intense"];function i(e,t,n,r,a,i,o){if(e){const l=[],c=[];r&&"number"==typeof t&&0<=t&&t<8&&(t+=8),i&&([t,n]=[n,t]),"number"==typeof t?l.push(s[t]+"-fg"):t.length?c.push(`color: rgb(${t})`):i&&l.push("ansi-default-inverse-fg"),"number"==typeof n?l.push(s[n]+"-bg"):n.length?c.push(`background-color: rgb(${n})`):i&&l.push("ansi-default-inverse-bg"),r&&l.push("ansi-bold"),a&&l.push("ansi-underline"),l.length||c.length?(o.push("<span"),l.length&&o.push(` class="${l.join(" ")}"`),c.length&&o.push(` style="${c.join("; ")}"`),o.push(">"),o.push(e),o.push("</span>")):o.push(e)}}function o(e){let t,n,r;const s=e.shift();if(2===s&&e.length>=3){if(t=e.shift(),n=e.shift(),r=e.shift(),[t,n,r].some((e=>e<0||255<e)))throw new RangeError("Invalid range for RGB colors")}else{if(!(5===s&&e.length>=1))throw new RangeError("Invalid extended color specification");{const s=e.shift();if(s<0)throw new RangeError("Color index must be >= 0");if(s<16)return s;if(s<232)t=Math.floor((s-16)/36),t=t>0?55+40*t:0,n=Math.floor((s-16)%36/6),n=n>0?55+40*n:0,r=(s-16)%6,r=r>0?55+40*r:0;else{if(!(s<256))throw new RangeError("Color index must be < 256");t=n=r=10*(s-232)+8}}}return[t,n,r]}e.ansiSpan=function(e){const t=/\x1b\[(.*?)([@-~])/g;let n,r=[],s=[],a=!1,c=!1,d=!1;const h=[],u=[];let p=0;for(e=l()(e),e+="[m";n=t.exec(e);){if("m"===n[2]){const e=n[1].split(";");for(let t=0;t<e.length;t++){const n=e[t];if(""===n)u.push(0);else{if(-1===n.search(/^\d+$/)){u.length=0;break}u.push(parseInt(n,10))}}}for(i(e.substring(p,n.index),r,s,a,c,d,h),p=t.lastIndex;u.length;){const e=u.shift();switch(e){case 0:r=s=[],a=!1,c=!1,d=!1;break;case 1:case 5:a=!0;break;case 4:c=!0;break;case 7:d=!0;break;case 21:case 22:a=!1;break;case 24:c=!1;break;case 27:d=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:r=e-30;break;case 38:try{r=o(u)}catch(e){u.length=0}break;case 39:r=[];break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:s=e-40;break;case 48:try{s=o(u)}catch(e){u.length=0}break;case 49:s=[];break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:r=e-90+8;break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:s=e-100+8}}}return h.join("")}}(s||(s={}))},2186:(e,t,n)=>{"use strict";n.d(t,{ZD:()=>s,_y:()=>a,sc:()=>i});var r=n(20998);const s=new r.Token("@jupyterlab/rendermime:IRenderMimeRegistry",'A service for the rendermime registry for the application. Use this to create renderers for various mime-types in your extension. Many times it will be easier to create a "mime renderer extension" rather than using this service directly.'),a=new r.Token("@jupyterlab/rendermime:ILatexTypesetter","A service for the LaTeX typesetter for the application. Use this if you want to typeset math in your extension."),i=new r.Token("@jupyterlab/rendermime:IMarkdownParser","A service for rendering markdown syntax as HTML content.")},28182:(e,t,n)=>{"use strict";n.d(t,{BP:()=>o,FK:()=>c,Hw:()=>f,ND:()=>m,UH:()=>d,cw:()=>h,lH:()=>p,oI:()=>l,pY:()=>i,zt:()=>u});var r=n(71677),s=n(31516),a=n(3328);class i extends s.Widget{constructor(e){var t,n;super(),this.mimeType=e.mimeType,this.sanitizer=e.sanitizer,this.resolver=e.resolver,this.linkHandler=e.linkHandler,this.translator=null!==(t=e.translator)&&void 0!==t?t:r.nullTranslator,this.latexTypesetter=e.latexTypesetter,this.markdownParser=null!==(n=e.markdownParser)&&void 0!==n?n:null,this.node.dataset.mimeType=this.mimeType}async renderModel(e,t){if(!t)for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.toggleClass("jp-mod-trusted",e.trusted),await this.render(e);const{fragment:n}=e.metadata;n&&this.setFragment(n)}setFragment(e){}}class o extends i{constructor(e){super(e),this.addClass("jp-RenderedHTMLCommon")}setFragment(e){let t;try{t=this.node.querySelector(e.startsWith("#")?`#${CSS.escape(e.slice(1))}`:e)}catch(e){console.warn("Unable to set URI fragment identifier.",e)}t&&t.scrollIntoView()}}class l extends o{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedHTML")}render(e){return this._rendered=a.NN({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter,translator:this.translator})}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class c extends i{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedLatex")}render(e){return this._rendered=a.K3({host:this.node,source:String(e.data[this.mimeType]),shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter})}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class d extends i{constructor(e){super(e),this.addClass("jp-RenderedImage")}render(e){const t=e.metadata[this.mimeType];return a.co({host:this.node,mimeType:this.mimeType,source:String(e.data[this.mimeType]),width:t&&t.width,height:t&&t.height,needsBackground:e.metadata.needs_background,unconfined:t&&t.unconfined})}}class h extends o{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedMarkdown")}render(e){return this._rendered=a.ap({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter,markdownParser:this.markdownParser,translator:this.translator})}async renderModel(e){await super.renderModel(e,!0)}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class u extends i{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedSVG")}render(e){const t=e.metadata[this.mimeType];return this._rendered=a.KB({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,unconfined:t&&t.unconfined,translator:this.translator})}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class p extends i{constructor(e){super(e),this.addClass("jp-RenderedText")}render(e){return a.IY({host:this.node,sanitizer:this.sanitizer,source:String(e.data[this.mimeType]),translator:this.translator})}}class f extends i{constructor(e){super(e),this.addClass("jp-RenderedText")}render(e){return a.Op({host:this.node,sanitizer:this.sanitizer,source:String(e.data[this.mimeType]),linkHandler:this.linkHandler,resolver:this.resolver,translator:this.translator})}}class m extends i{constructor(e){super(e),this.addClass("jp-RenderedJavaScript")}render(e){const t=this.translator.load("jupyterlab");return a.IY({host:this.node,sanitizer:this.sanitizer,source:t.__("JavaScript output is disabled in JupyterLab"),translator:this.translator})}}},8872:(e,t,n)=>{var r,s=/[&<>"'`]/g,a=RegExp(s.source),i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,l=i||o||Function("return this")(),c=(r={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==r?void 0:r[e]}),d=Object.prototype.toString,h=l.Symbol,u=h?h.prototype:void 0,p=u?u.toString:void 0;e.exports=function(e){var t;return(e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return p?p.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t))&&a.test(e)?e.replace(s,c):e}}}]);
|
|
1
|
+
(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[2401],{43967:(e,t,n)=>{"use strict";n.d(t,{g:()=>o});var r,s=n(31231),a=n(20998),i=n(81997);class o{constructor(e){this.trusted=!1,this._changed=new i.Signal(this),this._raw={};const t=r.getData(e.value);this._data=new s.ObservableJSON({values:t}),this._rawData=t;const n=e.value;for(const e in n)"data"===e||(this._raw[e]=r.extract(n,e))}get changed(){return this._changed}dispose(){this._data.dispose(),i.Signal.clearData(this)}get data(){return this._rawData}get metadata(){return{}}setData(e){e.data&&(this._updateObservable(this._data,e.data),this._rawData=e.data),this._changed.emit(void 0)}toJSON(){const e={};for(const t in this._raw)e[t]=r.extract(this._raw,t);return e}_updateObservable(e,t){const n=e.keys(),r=Object.keys(t);for(const t of n)-1===r.indexOf(t)&&e.delete(t);for(const n of r){const r=e.get(n),s=t[n];r!==s&&e.set(n,s)}}}!function(e){e.getData=function(e){return r.getData(e)}}(o||(o={})),function(e){function t(e){return function(e){const t=Object.create(null);for(const r in e)t[r]=n(e,r);return t}(e)}function n(e,t){const n=e[t];return void 0===n||a.JSONExt.isPrimitive(n)?n:a.JSONExt.deepCopy(n)}e.getData=t,e.getBundleOptions=function(e){return{data:t(e.value)}},e.extract=n}(r||(r={}))},15862:(e,t,n)=>{"use strict";n.d(t,{BJ:()=>d,Dq:()=>c,F:()=>l,Lz:()=>a,Nf:()=>u,hJ:()=>i,nF:()=>h,vy:()=>s,xr:()=>o});var r=n(28182);const s={safe:!0,mimeTypes:["text/html"],defaultRank:50,createRenderer:e=>new r.oI(e)},a={safe:!0,mimeTypes:["image/bmp","image/png","image/jpeg","image/gif","image/webp"],defaultRank:90,createRenderer:e=>new r.UH(e)},i={safe:!0,mimeTypes:["text/latex"],defaultRank:70,createRenderer:e=>new r.FK(e)},o={safe:!0,mimeTypes:["text/markdown"],defaultRank:60,createRenderer:e=>new r.cw(e)},l={safe:!1,mimeTypes:["image/svg+xml"],defaultRank:80,createRenderer:e=>new r.zt(e)},c={safe:!0,mimeTypes:["application/vnd.jupyter.stderr"],defaultRank:110,createRenderer:e=>new r.Hw(e)},d={safe:!0,mimeTypes:["text/plain","application/vnd.jupyter.stdout"],defaultRank:120,createRenderer:e=>new r.lH(e)},h={safe:!1,mimeTypes:["text/javascript","application/javascript"],defaultRank:110,createRenderer:e=>new r.ND(e)},u=[s,o,i,l,a,h,c,d]},72401:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AttachmentModel:()=>a.g,ILatexTypesetter:()=>u._y,IMarkdownParser:()=>u.sc,IRenderMimeRegistry:()=>u.ZD,MimeModel:()=>l.a,OutputModel:()=>c.M,RenderMimeRegistry:()=>d.D,RenderedCommon:()=>p.pY,RenderedError:()=>p.Hw,RenderedHTML:()=>p.oI,RenderedHTMLCommon:()=>p.BP,RenderedImage:()=>p.UH,RenderedJavaScript:()=>p.ND,RenderedLatex:()=>p.FK,RenderedMarkdown:()=>p.cw,RenderedSVG:()=>p.zt,RenderedText:()=>p.lH,errorRendererFactory:()=>i.Dq,htmlRendererFactory:()=>i.vy,imageRendererFactory:()=>i.Lz,javaScriptRendererFactory:()=>i.nF,latexRendererFactory:()=>i.hJ,markdownRendererFactory:()=>i.xr,removeMath:()=>o.D,renderError:()=>h.Op,renderHTML:()=>h.NN,renderImage:()=>h.co,renderLatex:()=>h.K3,renderMarkdown:()=>h.ap,renderSVG:()=>h.KB,renderText:()=>h.IY,replaceMath:()=>o.b,standardRendererFactories:()=>i.Nf,svgRendererFactory:()=>i.F,textRendererFactory:()=>i.BJ});var r=n(22425),s={};for(const e in r)"default"!==e&&(s[e]=()=>r[e]);n.d(t,s);var a=n(43967),i=n(15862),o=n(69837),l=n(32021),c=n(4800),d=n(32549),h=n(3328),u=n(2186),p=n(28182)},69837:(e,t,n)=>{"use strict";n.d(t,{D:()=>a,b:()=>i});const r="$",s=/(\$\$?|\\(?:begin|end)\{[a-z]*\*?\}|\\[{}$]|[{}]|(?:\n\s*)+|@@\d+@@|\\\\(?:\(|\)|\[|\]))/i;function a(e){const t=[];let n,a=null,i=null,l=null,c=0;e.includes("`")||e.includes("~~~")?(e=e.replace(/~/g,"~T").replace(/^(?<fence>`{3,}|(~T){3,})[^`\n]*\n([\s\S]*?)^\k<fence>`*$/gm,(e=>e.replace(/\$/g,"~D"))).replace(/(^|[^\\])(`+)([^\n]*?[^`\n])\2(?!`)/gm,(e=>e.replace(/\$/g,"~D"))),n=e=>e.replace(/~([TD])/g,((e,t)=>"T"===t?"~":r))):n=e=>e;let d=e.replace(/\r\n?/g,"\n").split(s);for(let e=1,s=d.length;e<s;e+=2){const s=d[e];"@"===s.charAt(0)?(d[e]="@@"+t.length+"@@",t.push(s)):null!==a?s===i?c?l=e:(d=o(a,e,n,t,d),a=null,i=null,l=null):s.match(/\n.*\n/)?(null!==l&&(e=l,d=o(a,e,n,t,d)),a=null,i=null,l=null,c=0):"{"===s?c++:"}"===s&&c&&c--:s===r||"$$"===s?(a=e,i=s,c=0):"\\\\("===s||"\\\\["===s?(a=e,i="("===s.slice(-1)?"\\\\)":"\\\\]",c=0):"begin"===s.substr(1,5)&&(a=e,i="\\end"+s.substr(6),c=0)}return null!==a&&null!==l&&(d=o(a,l,n,t,d),a=null,i=null,l=null),{text:n(d.join("")),math:t}}function i(e,t){return e.replace(/@@(\d+)@@/g,((e,n)=>{let r=t[n];return"\\\\("===r.substr(0,3)&&"\\\\)"===r.substr(r.length-3)?r="\\("+r.substring(3,r.length-3)+"\\)":"\\\\["===r.substr(0,3)&&"\\\\]"===r.substr(r.length-3)&&(r="\\["+r.substring(3,r.length-3)+"\\]"),r}))}function o(e,t,n,r,s){let a=s.slice(e,t+1).join("").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");for(navigator&&"Microsoft Internet Explorer"===navigator.appName&&(a=a.replace(/(%[^\n]*)\n/g,"$1<br/>\n"));t>e;)s[t]="",t--;return s[e]="@@"+r.length+"@@",n&&(a=n(a)),r.push(a),s}},32021:(e,t,n)=>{"use strict";n.d(t,{a:()=>r});class r{constructor(e={}){this.trusted=!!e.trusted,this._data=e.data||{},this._metadata=e.metadata||{},this._callback=e.callback||s.noOp}get data(){return this._data}get metadata(){return this._metadata}setData(e){this._data=e.data||this._data,this._metadata=e.metadata||this._metadata,this._callback(e)}}var s;!function(e){e.noOp=function(){}}(s||(s={}))},4800:(e,t,n)=>{"use strict";n.d(t,{M:()=>l});var r,s=n(81139),a=n(31231),i=n(20998),o=n(81997);class l{constructor(e){this._changed=new o.Signal(this),this._raw={};const{data:t,metadata:n,trusted:i}=r.getBundleOptions(e);this._data=new a.ObservableJSON({values:t}),this._rawData=t,this._metadata=new a.ObservableJSON({values:n}),this._rawMetadata=n,this.trusted=i;const l=e.value;for(const e in l)switch(e){case"data":case"metadata":break;default:this._raw[e]=r.extract(l,e)}this.type=l.output_type,s.isExecuteResult(l)?this.executionCount=l.execution_count:this.executionCount=null}get changed(){return this._changed}dispose(){this._data.dispose(),this._metadata.dispose(),o.Signal.clearData(this)}get data(){return this._rawData}get metadata(){return this._rawMetadata}setData(e){e.data&&(this._updateObservable(this._data,e.data),this._rawData=e.data),e.metadata&&(this._updateObservable(this._metadata,e.metadata),this._rawMetadata=e.metadata),this._changed.emit()}toJSON(){const e={};for(const t in this._raw)e[t]=r.extract(this._raw,t);switch(this.type){case"display_data":case"execute_result":case"update_display_data":e.data=this.data,e.metadata=this.metadata}return delete e.transient,e}_updateObservable(e,t){const n=e.keys(),r=Object.keys(t);for(const t of n)-1===r.indexOf(t)&&e.delete(t);for(const n of r){const r=e.get(n),s=t[n];r!==s&&e.set(n,s)}}}!function(e){e.getData=function(e){return r.getData(e)},e.getMetadata=function(e){return r.getMetadata(e)}}(l||(l={})),function(e){function t(e){let t={};if(s.isExecuteResult(e)||s.isDisplayData(e)||s.isDisplayUpdate(e))t=e.data;else if(s.isStream(e))"stderr"===e.name?t["application/vnd.jupyter.stderr"]=e.text:t["application/vnd.jupyter.stdout"]=e.text;else if(s.isError(e)){t["application/vnd.jupyter.error"]=e;const n=e.traceback.join("\n");t["application/vnd.jupyter.stderr"]=n||`${e.ename}: ${e.evalue}`}return function(e){const t=Object.create(null);for(const n in e)t[n]=r(e,n);return t}(t)}function n(e){const t=Object.create(null);if(s.isExecuteResult(e)||s.isDisplayData(e))for(const n in e.metadata)t[n]=r(e.metadata,n);return t}function r(e,t){const n=e[t];return void 0===n||i.JSONExt.isPrimitive(n)?n:JSON.parse(JSON.stringify(n))}e.getData=t,e.getMetadata=n,e.getBundleOptions=function(e){return{data:t(e.value),metadata:n(e.value),trusted:!!e.trusted}},e.extract=r}(r||(r={}))},32549:(e,t,n)=>{"use strict";n.d(t,{D:()=>l});var r,s=n(53312),a=n(68722),i=n(12030),o=n(32021);class l{constructor(e={}){var t,n,r,a,o,l;if(this._id=0,this._ranks={},this._types=null,this._factories={},this.translator=null!==(t=e.translator)&&void 0!==t?t:i.nullTranslator,this.resolver=null!==(n=e.resolver)&&void 0!==n?n:null,this.linkHandler=null!==(r=e.linkHandler)&&void 0!==r?r:null,this.latexTypesetter=null!==(a=e.latexTypesetter)&&void 0!==a?a:null,this.markdownParser=null!==(o=e.markdownParser)&&void 0!==o?o:null,this.sanitizer=null!==(l=e.sanitizer)&&void 0!==l?l:new s.Sanitizer,e.initialFactories)for(const t of e.initialFactories)this.addFactory(t)}get mimeTypes(){return this._types||(this._types=r.sortedTypes(this._ranks))}preferredMimeType(e,t="ensure"){if("ensure"===t||"prefer"===t)for(const t of this.mimeTypes)if(t in e&&this._factories[t].safe)return t;if("ensure"!==t)for(const t of this.mimeTypes)if(t in e)return t}createRenderer(e){if(!(e in this._factories))throw new Error(`No factory for mime type: '${e}'`);return this._factories[e].createRenderer({mimeType:e,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,latexTypesetter:this.latexTypesetter,markdownParser:this.markdownParser,translator:this.translator})}createModel(e={}){return new o.a(e)}clone(e={}){var t,n,r,s,a,i,o,c,d,h;const u=new l({resolver:null!==(n=null!==(t=e.resolver)&&void 0!==t?t:this.resolver)&&void 0!==n?n:void 0,sanitizer:null!==(s=null!==(r=e.sanitizer)&&void 0!==r?r:this.sanitizer)&&void 0!==s?s:void 0,linkHandler:null!==(i=null!==(a=e.linkHandler)&&void 0!==a?a:this.linkHandler)&&void 0!==i?i:void 0,latexTypesetter:null!==(c=null!==(o=e.latexTypesetter)&&void 0!==o?o:this.latexTypesetter)&&void 0!==c?c:void 0,markdownParser:null!==(h=null!==(d=e.markdownParser)&&void 0!==d?d:this.markdownParser)&&void 0!==h?h:void 0,translator:this.translator});return u._factories={...this._factories},u._ranks={...this._ranks},u._id=this._id,u}getFactory(e){return this._factories[e]}addFactory(e,t){void 0===t&&void 0===(t=e.defaultRank)&&(t=100);for(const n of e.mimeTypes)this._factories[n]=e,this._ranks[n]={rank:t,id:this._id++};this._types=null}removeMimeType(e){delete this._factories[e],delete this._ranks[e],this._types=null}getRank(e){const t=this._ranks[e];return t&&t.rank}setRank(e,t){if(!this._ranks[e])return;const n=this._id++;this._ranks[e]={rank:t,id:n},this._types=null}}!function(e){e.UrlResolver=class{constructor(e){this._path=e.path,this._contents=e.contents}get path(){return this._path}set path(e){this._path=e}async resolveUrl(e){if(this.isLocal(e)){const t=encodeURI(a.PathExt.dirname(this.path));e=a.PathExt.resolve(t,e)}return e}async getDownloadUrl(e){return this.isLocal(e)?this._contents.getDownloadUrl(decodeURIComponent(e)):e}isLocal(e,t=!1){return!this.isMalformed(e)&&(a.URLExt.isLocal(e,t)||!!this._contents.driveName(decodeURI(e)))}async resolvePath(e){const t=a.PageConfig.getOption("rootUri").replace("file://","");if(e.startsWith("~/")&&t.startsWith("/home/")&&(e=t.split("/").slice(0,3).join("/")+e.substring(1)),e.startsWith(t)||e.startsWith("./"))try{const n=e.replace(t,"");return{path:(await this._contents.get(n,{content:!1})).path,scope:"server"}}catch(t){return console.warn(`Could not resolve location of ${e} on server`),null}return{path:e,scope:"kernel"}}isMalformed(e){try{return decodeURI(e),!1}catch(e){if(e instanceof URIError)return!0;throw e}}}}(l||(l={})),function(e){e.sortedTypes=function(e){return Object.keys(e).sort(((t,n)=>{const r=e[t],s=e[n];return r.rank!==s.rank?r.rank-s.rank:r.id-s.id}))}}(r||(r={}))},3328:(e,t,n)=>{"use strict";n.d(t,{IY:()=>w,K3:()=>u,KB:()=>f,NN:()=>d,Op:()=>T,ap:()=>p,co:()=>h});var r,s,a=n(68722),i=n(12030),o=n(8872),l=n.n(o),c=n(69837);function d(e){let{host:t,source:n,trusted:r,sanitizer:a,resolver:o,linkHandler:l,shouldTypeset:c,latexTypesetter:d,translator:h}=e;h=h||i.nullTranslator;const u=null==h?void 0:h.load("jupyterlab");let p,f=n;if(!n)return t.textContent="",Promise.resolve(void 0);if(r||(f=`${n}`,n=a.sanitize(n)),t.innerHTML=n,t.getElementsByTagName("script").length>0)if(r)s.evalInnerHTMLScriptTags(t);else{const e=document.createElement("div"),n=document.createElement("pre");n.textContent=u.__("This HTML output contains inline scripts. Are you sure that you want to run arbitrary Javascript within your JupyterLab session?");const r=document.createElement("button");r.textContent=u.__("Run"),r.onclick=e=>{t.innerHTML=f,s.evalInnerHTMLScriptTags(t),t.firstChild&&t.removeChild(t.firstChild)},e.appendChild(n),e.appendChild(r),t.insertBefore(e,t.firstChild)}return s.handleDefaults(t,o),p=o?s.handleUrls(t,o,l):Promise.resolve(void 0),p.then((()=>{c&&d&&d.typeset(t)}))}function h(e){const{host:t,mimeType:n,source:r,width:s,height:a,needsBackground:i,unconfined:o}=e;t.textContent="";const l=document.createElement("img");return l.src=`data:${n};base64,${r}`,"number"==typeof a&&(l.height=a),"number"==typeof s&&(l.width=s),"light"===i?l.classList.add("jp-needs-light-background"):"dark"===i&&l.classList.add("jp-needs-dark-background"),!0===o&&l.classList.add("jp-mod-unconfined"),t.appendChild(l),Promise.resolve(void 0)}function u(e){const{host:t,source:n,shouldTypeset:r,latexTypesetter:s}=e;return t.textContent=n,r&&s&&s.typeset(t),Promise.resolve(void 0)}async function p(e){const{host:t,source:n,markdownParser:r,...a}=e;if(!n)return void(t.textContent="");let i="";if(r){const e=(0,c.D)(n);i=await r.render(e.text),i=(0,c.b)(i,e.math)}else i=`<pre>${n}</pre>`;await d({host:t,source:i,...a}),s.headerAnchors(t)}function f(e){let{host:t,source:n,trusted:r,unconfined:s}=e;if(!n)return t.textContent="",Promise.resolve(void 0);if(!r)return t.textContent="Cannot display an untrusted SVG. Maybe you need to run the cell?",Promise.resolve(void 0);n.search("<svg[^>]+xmlns=[^>]+svg")<0&&(n=n.replace("<svg",'<svg xmlns="http://www.w3.org/2000/svg"'));const a=new Image;return a.src=`data:image/svg+xml,${encodeURIComponent(n)}`,t.appendChild(a),!0===s&&t.classList.add("jp-mod-unconfined"),Promise.resolve()}!function(e){e.createHeaderId=function(e){var t;return(null!==(t=e.textContent)&&void 0!==t?t:"").replace(/ /g,"-")}}(p||(p={})),function(e){const t="\\u0000-\\u0020\\u007f-\\u009f";e.webLinkRegex=new RegExp("(?<path>(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+t+'"]{2,}[^\\s'+t+"\"'(){}\\[\\],:;.!?])","ug");const n=new RegExp(`(${/(?:[a-zA-Z]:(?:(?:\\|\/)[\w\.-]*)+)/.source}|${/(?:(?:\~|\.)(?:(?:\\|\/)[\w\.-]*)+)/.source})`),r=navigator.userAgent.indexOf("Windows")>=0;e.pathLinkRegex=new RegExp(`(?<path>${r?n.source:/((?:\~|\.)?(?:\/[\w\.-]*)+)/.source})${/(?:(?:\:|", line )(?<line>[\d]+))?(?:\:(?<column>[\d]+))?/.source}`,"g")}(r||(r={}));class m{constructor(){this.regex=r.webLinkRegex}createAnchor(e,t){const n=document.createElement("a");return n.href=e.startsWith("www.")?"https://"+e:e,n.rel="noopener",n.target="_blank",n.appendChild(document.createTextNode(t)),n}processPath(e){const t=e.slice(-1),n=-1!==[">","<"].indexOf(t)?e.length-1:e.length;return e.slice(0,n)}processLabel(e){return this.processPath(e)}}class g{constructor(){this.regex=r.pathLinkRegex}createAnchor(e,t,n){const r=document.createElement("a");r.dataset.path=e;const s=parseInt(n.line,10);let a=isNaN(s)?"":"line="+(s-1);return r.dataset.locator=a,r.appendChild(document.createTextNode(t)),r}}function y(e,t){const n=[];t.checkWeb&&n.push(new m),t.checkPaths&&n.push(new g);const r=[],s=(e,t)=>{if(t>=n.length)return void r.push(document.createTextNode(e));const a=n[t];let i,o=0;const l=a.regex;for(l.lastIndex=0;null!=(i=l.exec(e));){const n=e.substring(o,i.index);n&&s(n,t+1);const{path:l,...c}=i.groups,d=a.processPath?a.processPath(l):l,h=a.processLabel?a.processLabel(i[0]):i[0];r.push(a.createAnchor(d,h,c)),o=i.index+h.length}const c=e.substring(o);c&&s(c,t+1)};return s(e,0),r}function v(e,t){var n,r;const s=e.cloneNode();s.textContent=null===(n=e.textContent)||void 0===n?void 0:n.slice(0,t);const a=e.cloneNode();return a.textContent=null===(r=e.textContent)||void 0===r?void 0:r.slice(t),{pre:s,post:a}}function*x(e){var t;let n,r=0;for(let s of e)n=r+((null===(t=s.textContent)||void 0===t?void 0:t.length)||0),yield{node:s,start:r,end:n,isText:s.nodeType===Node.TEXT_NODE},r=n}function w(e){var t,n;const{host:r,sanitizer:a,source:i}=e,o=a.sanitize(s.ansiSpan(i),{allowedTags:["span"]}),l=document.createElement("pre");l.innerHTML=o;const c=l.textContent;let d;if(c){const e=null===(n=null===(t=a.getAutolink)||void 0===t?void 0:t.call(a))||void 0===n||n?y(c,{checkWeb:!0,checkPaths:!1}):[document.createTextNode(o)];d=b(Array.from(l.childNodes),e)}else d=document.createElement("pre");return r.appendChild(d),Promise.resolve(void 0)}function T(e){var t,n;const{host:r,linkHandler:a,sanitizer:i,resolver:o,source:l}=e,c=i.sanitize(s.ansiSpan(l),{allowedTags:["span"]}),d=document.createElement("pre");d.innerHTML=c;const h=d.textContent;let u,p;if(h){const e=null===(n=null===(t=i.getAutolink)||void 0===t?void 0:t.call(i))||void 0===n||n?y(h,{checkWeb:!0,checkPaths:!0}):[document.createTextNode(c)];u=b(Array.from(d.childNodes),e)}else u=document.createElement("pre");return r.appendChild(u),p=o?s.handlePaths(r,o,a):Promise.resolve(void 0),p}function b(e,t){const n=document.createElement("pre");let r=!1;const s=[];for(let n of function*(e,t){var n,r;let s=x(e),a=x(t),i=s.next(),o=a.next();for(;!i.done&&!o.done;){let e=i.value,t=o.value;if(e.isText&&e.start<=t.start&&e.end>=t.end)yield[null,t.node],o=a.next();else if(t.isText&&t.start<=e.start&&t.end>=e.end)yield[e.node,null],i=s.next();else if(e.end===t.end&&e.start===t.start)yield[e.node,t.node],i=s.next(),o=a.next();else if(e.end>t.end){let{pre:r,post:s}=v(e.node,t.end-e.start);t.start<e.start&&(t.node.textContent=null===(n=t.node.textContent)||void 0===n?void 0:n.slice(e.start-t.start)),yield[r,t.node],e.node=s,e.start=t.end,o=a.next()}else{if(!(t.end>e.end))throw new Error(`Unexpected intersection: ${JSON.stringify(e)} ${JSON.stringify(t)}`);{let{pre:n,post:a}=v(t.node,e.end-t.start);e.start<t.start&&(e.node.textContent=null===(r=e.node.textContent)||void 0===r?void 0:r.slice(t.start-e.start)),yield[e.node,n],t.node=a,t.start=e.end,i=s.next()}}}}(e,t)){if(!n[0]){s.push(n[1]),r=n[1].nodeType!==Node.TEXT_NODE;continue}if(!n[1]){s.push(n[0]),r=!1;continue}let[e,t]=n;const a=s[s.length-1];r&&t.href===a.href?a.appendChild(e):t.nodeType!==Node.TEXT_NODE?(t.textContent="",t.appendChild(e),s.push(t),r=!0):(s.push(e),r=!1)}for(const e of s)n.appendChild(e);return n}!function(e){async function t(e,t,n){const r=e.getAttribute(t)||"",s=n.isLocal?n.isLocal(r):a.URLExt.isLocal(r);if(r&&s)try{const s=await n.resolveUrl(r);let i=await n.getDownloadUrl(s);"data:"!==a.URLExt.parse(i).protocol&&(i+=(/\?/.test(i)?"&":"?")+(new Date).getTime()),e.setAttribute(t,i)}catch(n){throw e.setAttribute(t,""),n}}function n(e,t,n){let r=e.getAttribute("href")||"";const s=t.isLocal?t.isLocal(r):a.URLExt.isLocal(r);if(!r||!s)return Promise.resolve(void 0);const i=e.hash;if(i){if(i===r)return e.target="_self",Promise.resolve(void 0);r=r.replace(i,"")}return t.resolveUrl(r).then((r=>{const s=decodeURIComponent(r);return n&&n.handleLink(e,s,i),t.getDownloadUrl(r)})).then((t=>{e.href=t+i})).catch((t=>{e.href=""}))}async function r(e,t,n){let r=e.dataset.path||"",s=e.dataset.locator?"#"+e.dataset.locator:"";delete e.dataset.path,delete e.dataset.locator;const i=t.isLocal?t.isLocal(r,!0):a.URLExt.isLocal(r,!0);if(!(r&&i&&t.resolvePath&&n&&n.handlePath))return e.replaceWith(...e.childNodes),Promise.resolve(void 0);try{const a=await t.resolvePath(r);if(!a)return console.log("Path resolution bailing: does not exist"),Promise.resolve(void 0);n.handlePath(e,a.path,a.scope,s),e.href=a.path+s}catch(t){console.warn("Path anchor error:",t),e.href="#linking-failed-see-console"}}e.evalInnerHTMLScriptTags=function(e){const t=Array.from(e.getElementsByTagName("script"));for(const e of t){if(!e.parentNode)continue;const t=document.createElement("script"),n=e.attributes;for(let e=0,r=n.length;e<r;++e){const{name:r,value:s}=n[e];t.setAttribute(r,s)}t.textContent=e.textContent,e.parentNode.replaceChild(t,e)}},e.handleDefaults=function(e,t){const n=e.getElementsByTagName("a");for(let e=0;e<n.length;e++){const r=n[e];if(!(r instanceof HTMLAnchorElement))continue;const s=r.href,i=t&&t.isLocal?t.isLocal(s):a.URLExt.isLocal(s);r.target||(r.target=i?"_self":"_blank"),i||(r.rel="noopener")}const r=e.getElementsByTagName("img");for(let e=0;e<r.length;e++)r[e].alt||(r[e].alt="Image")},e.handleUrls=function(e,r,s){const a=[],i=e.querySelectorAll("*[src]");for(let e=0;e<i.length;e++)a.push(t(i[e],"src",r));const o=e.getElementsByTagName("a");for(let e=0;e<o.length;e++)a.push(n(o[e],r,s));const l=e.getElementsByTagName("link");for(let e=0;e<l.length;e++)a.push(t(l[e],"href",r));return Promise.all(a).then((()=>{}))},e.handlePaths=async function(e,t,n){const s=e.getElementsByTagName("a");for(let e=0;e<s.length;e++)await r(s[e],t,n)},e.headerAnchors=function(e){const t=["h1","h2","h3","h4","h5","h6"];for(const n of t){const t=e.getElementsByTagName(n);for(let e=0;e<t.length;e++){const n=t[e];n.id=p.createHeaderId(n);const r=document.createElement("a");r.target="_self",r.textContent="¶",r.href="#"+n.id,r.classList.add("jp-InternalAnchorLink"),n.appendChild(r)}}};const s=["ansi-black","ansi-red","ansi-green","ansi-yellow","ansi-blue","ansi-magenta","ansi-cyan","ansi-white","ansi-black-intense","ansi-red-intense","ansi-green-intense","ansi-yellow-intense","ansi-blue-intense","ansi-magenta-intense","ansi-cyan-intense","ansi-white-intense"];function i(e,t,n,r,a,i,o){if(e){const l=[],c=[];r&&"number"==typeof t&&0<=t&&t<8&&(t+=8),i&&([t,n]=[n,t]),"number"==typeof t?l.push(s[t]+"-fg"):t.length?c.push(`color: rgb(${t})`):i&&l.push("ansi-default-inverse-fg"),"number"==typeof n?l.push(s[n]+"-bg"):n.length?c.push(`background-color: rgb(${n})`):i&&l.push("ansi-default-inverse-bg"),r&&l.push("ansi-bold"),a&&l.push("ansi-underline"),l.length||c.length?(o.push("<span"),l.length&&o.push(` class="${l.join(" ")}"`),c.length&&o.push(` style="${c.join("; ")}"`),o.push(">"),o.push(e),o.push("</span>")):o.push(e)}}function o(e){let t,n,r;const s=e.shift();if(2===s&&e.length>=3){if(t=e.shift(),n=e.shift(),r=e.shift(),[t,n,r].some((e=>e<0||255<e)))throw new RangeError("Invalid range for RGB colors")}else{if(!(5===s&&e.length>=1))throw new RangeError("Invalid extended color specification");{const s=e.shift();if(s<0)throw new RangeError("Color index must be >= 0");if(s<16)return s;if(s<232)t=Math.floor((s-16)/36),t=t>0?55+40*t:0,n=Math.floor((s-16)%36/6),n=n>0?55+40*n:0,r=(s-16)%6,r=r>0?55+40*r:0;else{if(!(s<256))throw new RangeError("Color index must be < 256");t=n=r=10*(s-232)+8}}}return[t,n,r]}e.ansiSpan=function(e){const t=/\x1b\[(.*?)([@-~])/g;let n,r=[],s=[],a=!1,c=!1,d=!1;const h=[],u=[];let p=0;for(e=l()(e),e+="[m";n=t.exec(e);){if("m"===n[2]){const e=n[1].split(";");for(let t=0;t<e.length;t++){const n=e[t];if(""===n)u.push(0);else{if(-1===n.search(/^\d+$/)){u.length=0;break}u.push(parseInt(n,10))}}}for(i(e.substring(p,n.index),r,s,a,c,d,h),p=t.lastIndex;u.length;){const e=u.shift();switch(e){case 0:r=s=[],a=!1,c=!1,d=!1;break;case 1:case 5:a=!0;break;case 4:c=!0;break;case 7:d=!0;break;case 21:case 22:a=!1;break;case 24:c=!1;break;case 27:d=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:r=e-30;break;case 38:try{r=o(u)}catch(e){u.length=0}break;case 39:r=[];break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:s=e-40;break;case 48:try{s=o(u)}catch(e){u.length=0}break;case 49:s=[];break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:r=e-90+8;break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:s=e-100+8}}}return h.join("")}}(s||(s={}))},2186:(e,t,n)=>{"use strict";n.d(t,{ZD:()=>s,_y:()=>a,sc:()=>i});var r=n(20998);const s=new r.Token("@jupyterlab/rendermime:IRenderMimeRegistry",'A service for the rendermime registry for the application. Use this to create renderers for various mime-types in your extension. Many times it will be easier to create a "mime renderer extension" rather than using this service directly.'),a=new r.Token("@jupyterlab/rendermime:ILatexTypesetter","A service for the LaTeX typesetter for the application. Use this if you want to typeset math in your extension."),i=new r.Token("@jupyterlab/rendermime:IMarkdownParser","A service for rendering markdown syntax as HTML content.")},28182:(e,t,n)=>{"use strict";n.d(t,{BP:()=>o,FK:()=>c,Hw:()=>f,ND:()=>m,UH:()=>d,cw:()=>h,lH:()=>p,oI:()=>l,pY:()=>i,zt:()=>u});var r=n(12030),s=n(63485),a=n(3328);class i extends s.Widget{constructor(e){var t,n;super(),this.mimeType=e.mimeType,this.sanitizer=e.sanitizer,this.resolver=e.resolver,this.linkHandler=e.linkHandler,this.translator=null!==(t=e.translator)&&void 0!==t?t:r.nullTranslator,this.latexTypesetter=e.latexTypesetter,this.markdownParser=null!==(n=e.markdownParser)&&void 0!==n?n:null,this.node.dataset.mimeType=this.mimeType}async renderModel(e,t){if(!t)for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.toggleClass("jp-mod-trusted",e.trusted),await this.render(e);const{fragment:n}=e.metadata;n&&this.setFragment(n)}setFragment(e){}}class o extends i{constructor(e){super(e),this.addClass("jp-RenderedHTMLCommon")}setFragment(e){let t;try{t=this.node.querySelector(e.startsWith("#")?`#${CSS.escape(e.slice(1))}`:e)}catch(e){console.warn("Unable to set URI fragment identifier.",e)}t&&t.scrollIntoView()}}class l extends o{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedHTML")}render(e){return this._rendered=a.NN({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter,translator:this.translator})}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class c extends i{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedLatex")}render(e){return this._rendered=a.K3({host:this.node,source:String(e.data[this.mimeType]),shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter})}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class d extends i{constructor(e){super(e),this.addClass("jp-RenderedImage")}render(e){const t=e.metadata[this.mimeType];return a.co({host:this.node,mimeType:this.mimeType,source:String(e.data[this.mimeType]),width:t&&t.width,height:t&&t.height,needsBackground:e.metadata.needs_background,unconfined:t&&t.unconfined})}}class h extends o{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedMarkdown")}render(e){return this._rendered=a.ap({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,resolver:this.resolver,sanitizer:this.sanitizer,linkHandler:this.linkHandler,shouldTypeset:this.isAttached,latexTypesetter:this.latexTypesetter,markdownParser:this.markdownParser,translator:this.translator})}async renderModel(e){await super.renderModel(e,!0)}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class u extends i{constructor(e){super(e),this._rendered=Promise.resolve(),this.addClass("jp-RenderedSVG")}render(e){const t=e.metadata[this.mimeType];return this._rendered=a.KB({host:this.node,source:String(e.data[this.mimeType]),trusted:e.trusted,unconfined:t&&t.unconfined,translator:this.translator})}onAfterAttach(e){this._rendered.then((()=>{this.latexTypesetter&&this.latexTypesetter.typeset(this.node)})).catch(console.warn)}}class p extends i{constructor(e){super(e),this.addClass("jp-RenderedText")}render(e){return a.IY({host:this.node,sanitizer:this.sanitizer,source:String(e.data[this.mimeType]),translator:this.translator})}}class f extends i{constructor(e){super(e),this.addClass("jp-RenderedText")}render(e){return a.Op({host:this.node,sanitizer:this.sanitizer,source:String(e.data[this.mimeType]),linkHandler:this.linkHandler,resolver:this.resolver,translator:this.translator})}}class m extends i{constructor(e){super(e),this.addClass("jp-RenderedJavaScript")}render(e){const t=this.translator.load("jupyterlab");return a.IY({host:this.node,sanitizer:this.sanitizer,source:t.__("JavaScript output is disabled in JupyterLab"),translator:this.translator})}}},8872:(e,t,n)=>{var r,s=/[&<>"'`]/g,a=RegExp(s.source),i="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,o="object"==typeof self&&self&&self.Object===Object&&self,l=i||o||Function("return this")(),c=(r={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==r?void 0:r[e]}),d=Object.prototype.toString,h=l.Symbol,u=h?h.prototype:void 0,p=u?u.toString:void 0;e.exports=function(e){var t;return(e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==d.call(e)}(e))return p?p.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t))&&a.test(e)?e.replace(s,c):e}}}]);
|